Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interfaces for Subscribe #1018

Merged
merged 4 commits into from
Nov 26, 2024
Merged

Interfaces for Subscribe #1018

merged 4 commits into from
Nov 26, 2024

Conversation

nihalbhatnagar
Copy link
Contributor

Allows for interfaces on object set subscriptions

@@ -432,15 +452,17 @@ export class ObjectSetListenerWebsocket {
);
const osdkObjectsWithReferenceUpdates = await Promise.all(
referenceUpdates.map(async (o) => {
const osdkObjectArray = await convertWireToOsdkObjects(
const osdkObjectArray = await this.#client.objectFactory(
Copy link
Contributor Author

@nihalbhatnagar nihalbhatnagar Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using the old interface API's since the our new implementations require an interface to object type properties map. I could manually create this, but I think it would be best to talk through this @ssanjay1 and just unblock for right now

objDef.properties[p].type === "geotimeSeriesReference"
);
} else {
objectProperties = [];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OSW assumes the names we provide them are the API names for the actual object type implementations instead of the SPT names. Therefore the current API I decided on was assuming if you pass an interface in that you are only specifying reference properties. This does require any casting what is passed in, and I think it's a larger conversation if the TS OSDK supports specifying anything beyond an SPT.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are ongoing discussions to allow OSW to take in the SPT names instead of the object type property API names here. I'll also open up the discussion as to how we want to allow requesting reference properties in the finalized API

Copy link
Member

@ericanderson ericanderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to unblock

@nihalbhatnagar nihalbhatnagar merged commit 1c59d93 into main Nov 26, 2024
8 checks passed
@nihalbhatnagar nihalbhatnagar deleted the nihalb/osw-interfaces branch November 26, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants