@osdk/client 2.7.0-beta.1 → 2.7.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @osdk/client
2
2
 
3
+ ## 2.7.0-beta.2
4
+
5
+ ### Minor Changes
6
+
7
+ - 03db734: Move platform SDK deps to pnpm catalog
8
+ - c8da6b7: fix useLinks sorting strategy initialization
9
+
10
+ ### Patch Changes
11
+
12
+ - @osdk/api@2.7.0-beta.2
13
+ - @osdk/client.unstable@2.7.0-beta.2
14
+ - @osdk/generator-converters@2.7.0-beta.2
15
+
3
16
  ## 2.6.0-beta.13
4
17
 
5
18
  ### Minor Changes
@@ -21,7 +21,7 @@
21
21
  export const additionalContext = Symbol("additionalContext");
22
22
 
23
23
  // BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.
24
- const MaxOsdkVersion = "2.6.0";
24
+ const MaxOsdkVersion = "2.7.0";
25
25
  // END: THIS IS GENERATED CODE. DO NOT EDIT.
26
26
 
27
27
  const ErrorMessage = Symbol("ErrorMessage");
@@ -1 +1 @@
1
- {"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionDefinition,\n ActionMetadata,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n ObjectMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n VersionBound,\n} from \"@osdk/api\";\nimport type {\n Experiment,\n ExperimentFns,\n MinimalObjectSet,\n} from \"@osdk/api/unstable\";\nimport type { SharedClient } from \"@osdk/shared.client2\";\nimport type { ActionSignatureFromDef } from \"./actions/applyAction.js\";\nimport type { MinimalClient } from \"./MinimalClientContext.js\";\nimport type { QuerySignatureFromDef } from \"./queries/types.js\";\nimport type { SatisfiesSemver } from \"./SatisfiesSemver.js\";\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\ntype OldSharedClient = import(\"@osdk/shared.client\").SharedClient;\n\nexport type CheckVersionBound<Q> = Q extends VersionBound<infer V> ? (\n SatisfiesSemver<V, MaxOsdkVersion> extends true ? Q\n : Q & {\n [ErrorMessage]:\n `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\n }\n )\n : Q;\n\nexport interface Client extends SharedClient, OldSharedClient {\n <Q extends ObjectTypeDefinition>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? ObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n <Q extends (InterfaceDefinition)>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? MinimalObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n <Q extends ActionDefinition<any>>(\n o: Q,\n ): ActionSignatureFromDef<Q>;\n\n <Q extends QueryDefinition<any>>(\n o: Q,\n ): QuerySignatureFromDef<Q>;\n\n <Q extends Experiment<\"2.0.8\"> | Experiment<\"2.1.0\"> | Experiment<\"2.2.0\">>(\n experiment: Q,\n ): ExperimentFns<Q>;\n\n fetchMetadata<\n Q extends (\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>\n ),\n >(o: Q): Promise<\n Q extends ObjectTypeDefinition ? ObjectMetadata\n : Q extends InterfaceDefinition ? InterfaceMetadata\n : Q extends ActionDefinition<any> ? ActionMetadata\n : Q extends QueryDefinition<any> ? QueryMetadata\n : never\n >;\n\n /** @internal */\n [additionalContext]: MinimalClient;\n}\n\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext: unique symbol = Symbol(\"additionalContext\");\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.6.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\nexport type MaxOsdkVersion = typeof MaxOsdkVersion;\nconst ErrorMessage: unique symbol = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA0BA;;AAsDA;AACA;AACA,OAAO,MAAMA,iBAAgC,GAAGC,MAAM,CAAC,mBAAmB,CAAC;;AAE3E;AACA,MAAMC,cAAc,GAAG,OAAO;AAC9B;;AAEA,MAAMC,YAA2B,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionDefinition,\n ActionMetadata,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n ObjectMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n VersionBound,\n} from \"@osdk/api\";\nimport type {\n Experiment,\n ExperimentFns,\n MinimalObjectSet,\n} from \"@osdk/api/unstable\";\nimport type { SharedClient } from \"@osdk/shared.client2\";\nimport type { ActionSignatureFromDef } from \"./actions/applyAction.js\";\nimport type { MinimalClient } from \"./MinimalClientContext.js\";\nimport type { QuerySignatureFromDef } from \"./queries/types.js\";\nimport type { SatisfiesSemver } from \"./SatisfiesSemver.js\";\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\ntype OldSharedClient = import(\"@osdk/shared.client\").SharedClient;\n\nexport type CheckVersionBound<Q> = Q extends VersionBound<infer V> ? (\n SatisfiesSemver<V, MaxOsdkVersion> extends true ? Q\n : Q & {\n [ErrorMessage]:\n `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\n }\n )\n : Q;\n\nexport interface Client extends SharedClient, OldSharedClient {\n <Q extends ObjectTypeDefinition>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? ObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n <Q extends (InterfaceDefinition)>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? MinimalObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n <Q extends ActionDefinition<any>>(\n o: Q,\n ): ActionSignatureFromDef<Q>;\n\n <Q extends QueryDefinition<any>>(\n o: Q,\n ): QuerySignatureFromDef<Q>;\n\n <Q extends Experiment<\"2.0.8\"> | Experiment<\"2.1.0\"> | Experiment<\"2.2.0\">>(\n experiment: Q,\n ): ExperimentFns<Q>;\n\n fetchMetadata<\n Q extends (\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>\n ),\n >(o: Q): Promise<\n Q extends ObjectTypeDefinition ? ObjectMetadata\n : Q extends InterfaceDefinition ? InterfaceMetadata\n : Q extends ActionDefinition<any> ? ActionMetadata\n : Q extends QueryDefinition<any> ? QueryMetadata\n : never\n >;\n\n /** @internal */\n [additionalContext]: MinimalClient;\n}\n\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext: unique symbol = Symbol(\"additionalContext\");\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.7.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\nexport type MaxOsdkVersion = typeof MaxOsdkVersion;\nconst ErrorMessage: unique symbol = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA0BA;;AAsDA;AACA;AACA,OAAO,MAAMA,iBAAgC,GAAGC,MAAM,CAAC,mBAAmB,CAAC;;AAE3E;AACA,MAAMC,cAAc,GAAG,OAAO;AAC9B;;AAEA,MAAMC,YAA2B,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
@@ -46,7 +46,6 @@ export class SpecificLinkQuery extends BaseListQuery {
46
46
 
47
47
  // Extract the necessary parameters from the cache key
48
48
  [this.#sourceApiName, this.#sourcePk, this.#linkName, this.#whereClause, this.#orderBy] = cacheKey.otherKeys;
49
- this.sortingStrategy = new OrderBySortingStrategy(this.#linkName, this.#orderBy);
50
49
  }
51
50
 
52
51
  // _fetchAndStore is now implemented in BaseCollectionQuery
@@ -68,6 +67,15 @@ export class SpecificLinkQuery extends BaseListQuery {
68
67
  // Use the client's ontologyProvider to get metadata, which has built-in caching
69
68
  const sourceMetadata = await client[additionalContext].ontologyProvider.getObjectDefinition(this.#sourceApiName);
70
69
 
70
+ // Initialize sorting strategy with the link's target object type
71
+ if (this.#orderBy && Object.keys(this.#orderBy).length > 0) {
72
+ const linkDef = sourceMetadata.links?.[this.#linkName];
73
+ if (!linkDef?.targetType) {
74
+ throw new Error(`Missing link definition or targetType for link '${this.#linkName}' on object type '${this.#sourceApiName}'`);
75
+ }
76
+ this.sortingStrategy = new OrderBySortingStrategy(linkDef.targetType, this.#orderBy);
77
+ }
78
+
71
79
  // Query for the specific source object
72
80
  const sourceQuery = client(sourceObjectDef).where({
73
81
  [sourceMetadata.primaryKeyApiName]: this.#sourcePk
@@ -1 +1 @@
1
- {"version":3,"file":"SpecificLinkQuery.js","names":["deepEqual","additionalContext","BaseListQuery","OrderBySortingStrategy","tombstone","SpecificLinkQuery","sourceApiName","sourcePk","linkName","whereClause","orderBy","registerCacheChanges","batch","changes","modified","add","cacheKey","constructor","store","subject","opts","process","env","NODE_ENV","client","logger","child","msgPrefix","otherKeys","map","x","JSON","stringify","join","undefined","sortingStrategy","fetchPageData","signal","sourceObjectDef","type","apiName","sourceMetadata","ontologyProvider","getObjectDefinition","sourceQuery","where","primaryKeyApiName","linkQuery","pivotTo","aborted","Error","queryParams","$pageSize","options","pageSize","$nextPageToken","nextPageToken","Object","keys","length","$orderBy","$where","response","fetchPage","deleteFromStore","status","entry","read","value","methodName","debug","write","ret","delete","deleted","maybeUpdateAndRevalidate","has","revalidate","Promise","resolve","invalidateObjectType","objectType","linkDef","links","targetType","promise","isSpecificLinkCacheKey","key"],"sources":["SpecificLinkQuery.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectTypeDefinition,\n Osdk,\n PageResult,\n PrimaryKeyType,\n WhereClause,\n} from \"@osdk/api\";\nimport deepEqual from \"fast-deep-equal\";\nimport { type Subject } from \"rxjs\";\nimport { additionalContext } from \"../../../Client.js\";\nimport type { SpecificLinkPayload } from \"../../LinkPayload.js\";\nimport type { Status } from \"../../ObservableClient/common.js\";\nimport type { ObserveLinks } from \"../../ObservableClient/ObserveLink.js\";\nimport { BaseListQuery } from \"../base-list/BaseListQuery.js\";\nimport type { BatchContext } from \"../BatchContext.js\";\nimport type { CacheKey } from \"../CacheKey.js\";\nimport type { Canonical } from \"../Canonical.js\";\nimport type { Changes } from \"../Changes.js\";\nimport type { Entry } from \"../Layer.js\";\nimport type { OptimisticId } from \"../OptimisticId.js\";\nimport type { SimpleWhereClause } from \"../SimpleWhereClause.js\";\nimport { OrderBySortingStrategy } from \"../sorting/SortingStrategy.js\";\nimport type { Store } from \"../Store.js\";\nimport type { SubjectPayload } from \"../SubjectPayload.js\";\nimport { tombstone } from \"../tombstone.js\";\nimport type { SpecificLinkCacheKey } from \"./SpecificLinkCacheKey.js\";\n\n/**\n * Query implementation for retrieving linked objects from a specific object.\n * - Stores links as ObjectCacheKey[] references\n * - Creates indirect dependencies on linked objects\n * - Supports filtering and sorting of linked collections\n * - Handles proper invalidation of related objects\n */\nexport class SpecificLinkQuery extends BaseListQuery<\n SpecificLinkCacheKey,\n SpecificLinkPayload,\n ObserveLinks.Options<ObjectTypeDefinition, string>\n> {\n #sourceApiName: string;\n #sourcePk: PrimaryKeyType<ObjectTypeDefinition>;\n #linkName: string;\n #whereClause: Canonical<SimpleWhereClause>;\n #orderBy: Canonical<Record<string, \"asc\" | \"desc\" | undefined>>;\n\n /**\n * Register changes to the cache specific to SpecificLinkQuery\n */\n protected registerCacheChanges(batch: BatchContext): void {\n batch.changes.modified.add(this.cacheKey);\n }\n\n constructor(\n store: Store,\n subject: Subject<SubjectPayload<SpecificLinkCacheKey>>,\n cacheKey: SpecificLinkCacheKey,\n opts: ObserveLinks.Options<\n ObjectTypeDefinition,\n string\n >,\n ) {\n super(\n store,\n subject,\n opts,\n cacheKey,\n process.env.NODE_ENV !== \"production\"\n ? (\n store.client[additionalContext].logger?.child({}, {\n msgPrefix: `SpecificLinkQuery<${\n cacheKey.otherKeys.map(x => JSON.stringify(x)).join(\", \")\n }>`,\n })\n )\n : undefined,\n );\n\n // Extract the necessary parameters from the cache key\n [\n this.#sourceApiName,\n this.#sourcePk,\n this.#linkName,\n this.#whereClause,\n this.#orderBy,\n ] = cacheKey.otherKeys;\n\n this.sortingStrategy = new OrderBySortingStrategy(\n this.#linkName,\n this.#orderBy,\n );\n }\n\n // _fetchAndStore is now implemented in BaseCollectionQuery\n\n /**\n * Implements fetchPageData from the BaseCollectionQuery template method pattern\n * Fetches a page of linked objects\n */\n protected async fetchPageData(\n signal: AbortSignal | undefined,\n ): Promise<PageResult<Osdk.Instance<any>>> {\n // Use the client API to create a query that pivots to linked objects\n const client = this.store.client;\n\n // First, get metadata for the source object to know the primary key field name\n const sourceObjectDef = {\n type: \"object\",\n apiName: this.#sourceApiName,\n } as ObjectTypeDefinition;\n\n // Use the client's ontologyProvider to get metadata, which has built-in caching\n const sourceMetadata = await client[additionalContext].ontologyProvider\n .getObjectDefinition(this.#sourceApiName);\n\n // Query for the specific source object\n const sourceQuery = client(sourceObjectDef).where({\n [sourceMetadata.primaryKeyApiName]: this.#sourcePk,\n } as WhereClause<any>);\n\n // Pivot to the linked objects\n const linkQuery = sourceQuery.pivotTo(this.#linkName);\n\n // Check for abort signal again before fetching\n if (signal?.aborted) {\n throw new Error(\"Aborted\");\n }\n\n // Fetch the linked objects with pagination\n // Add orderBy to the query parameters if specified\n const queryParams: any = {\n $pageSize: this.options.pageSize || 100,\n $nextPageToken: this.nextPageToken,\n };\n\n // Include orderBy if it has entries\n if (this.#orderBy && Object.keys(this.#orderBy).length > 0) {\n queryParams.$orderBy = this.#orderBy;\n }\n\n // Include whereClause if it has entries\n if (this.#whereClause && Object.keys(this.#whereClause).length > 0) {\n queryParams.$where = this.#whereClause;\n }\n\n const response = await linkQuery.fetchPage(queryParams);\n\n // Store the next page token for pagination\n this.nextPageToken = response.nextPageToken;\n\n return response;\n }\n\n /**\n * Removes a link query from the store\n */\n deleteFromStore(\n status: Status,\n batch: BatchContext,\n ): Entry<SpecificLinkCacheKey> | undefined {\n const entry = batch.read(this.cacheKey);\n\n if (entry && deepEqual(tombstone, entry.value)) {\n if (process.env.NODE_ENV !== \"production\") {\n this.logger?.child({ methodName: \"deleteFromStore\" }).debug(\n `Links were already deleted, just setting status`,\n );\n }\n return batch.write(this.cacheKey, entry.value, status);\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n this.logger?.child({ methodName: \"deleteFromStore\" }).debug(\n JSON.stringify({ status }),\n );\n }\n\n // If there is no entry then there is nothing to do\n if (!entry || !entry.value) {\n return;\n }\n\n const ret = batch.delete(this.cacheKey, status);\n batch.changes.deleted.add(this.cacheKey);\n\n return ret;\n }\n\n /**\n * Implements Query.maybeUpdateAndRevalidate to handle cache invalidation\n */\n maybeUpdateAndRevalidate = async (\n changes: Changes,\n _optimisticId: OptimisticId | undefined,\n ): Promise<void> => {\n // TODO: Implement proper invalidation logic for linked objects\n // This would check if any of the linked objects have changed,\n // or if the source object's links might have changed\n\n // For now, simply check if this specific link cache key was modified\n if (changes.modified.has(this.cacheKey)) {\n return this.revalidate(true);\n }\n\n // No relevant changes were detected\n return Promise.resolve();\n };\n\n invalidateObjectType = (\n objectType: string,\n changes: Changes | undefined,\n ): Promise<void> => {\n // We need to invalidate links in two cases:\n // 1. When the source object type matches the apiName (direct invalidation)\n // 2. When the target object type might be the invalidated type (affected by target changes)\n\n // For case 1 - direct source object type match\n if (this.#sourceApiName === objectType) {\n changes?.modified.add(this.cacheKey);\n return this.revalidate(true);\n } else {\n // For case 2 - check if the link's target type matches the invalidated type\n // We need to use the ontology provider to get the link metadata\n // Since this is async, we'll collect all the metadata check promises\n return (async () => {\n // Get the source object metadata to determine link target type\n const sourceMetadata = await this.store.client[additionalContext]\n .ontologyProvider\n .getObjectDefinition(this.#sourceApiName);\n\n const linkDef = sourceMetadata.links?.[this.#linkName];\n if (!linkDef || linkDef.targetType !== objectType) return;\n\n const promise = this.revalidate(true);\n changes?.modified.add(this.cacheKey);\n return promise;\n })();\n }\n };\n}\n\n/**\n * Type guard to check if a cache key is a SpecificLinkCacheKey\n */\nexport function isSpecificLinkCacheKey(\n key: CacheKey,\n): key is SpecificLinkCacheKey {\n return key.type === \"specificLink\";\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,OAAOA,SAAS,MAAM,iBAAiB;AAEvC,SAASC,iBAAiB,QAAQ,oBAAoB;AAItD,SAASC,aAAa,QAAQ,+BAA+B;AAQ7D,SAASC,sBAAsB,QAAQ,+BAA+B;AAGtE,SAASC,SAAS,QAAQ,iBAAiB;AAG3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,SAASH,aAAa,CAIlD;EACA,CAACI,aAAa;EACd,CAACC,QAAQ;EACT,CAACC,QAAQ;EACT,CAACC,WAAW;EACZ,CAACC,OAAO;;EAER;AACF;AACA;EACYC,oBAAoBA,CAACC,KAAmB,EAAQ;IACxDA,KAAK,CAACC,OAAO,CAACC,QAAQ,CAACC,GAAG,CAAC,IAAI,CAACC,QAAQ,CAAC;EAC3C;EAEAC,WAAWA,CACTC,KAAY,EACZC,OAAsD,EACtDH,QAA8B,EAC9BI,IAGC,EACD;IACA,KAAK,CACHF,KAAK,EACLC,OAAO,EACPC,IAAI,EACJJ,QAAQ,EACRK,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAEjCL,KAAK,CAACM,MAAM,CAACvB,iBAAiB,CAAC,CAACwB,MAAM,EAAEC,KAAK,CAAC,CAAC,CAAC,EAAE;MAChDC,SAAS,EAAE,qBACTX,QAAQ,CAACY,SAAS,CAACC,GAAG,CAACC,CAAC,IAAIC,IAAI,CAACC,SAAS,CAACF,CAAC,CAAC,CAAC,CAACG,IAAI,CAAC,IAAI,CAAC;IAE7D,CAAC,CAAC,GAEFC,SACN,CAAC;;IAED;IACA,CACE,IAAI,CAAC,CAAC5B,aAAa,EACnB,IAAI,CAAC,CAACC,QAAQ,EACd,IAAI,CAAC,CAACC,QAAQ,EACd,IAAI,CAAC,CAACC,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CAACC,QAAQ,CAAC;QACpC,OAAOqE,OAAO;MAChB,CAAC,EAAE,CAAC;IACN;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CACpCC,GAAa,EACgB;EAC7B,OAAOA,GAAG,CAAChD,IAAI,KAAK,cAAc;AACpC","ignoreList":[]}
1
+ {"version":3,"file":"SpecificLinkQuery.js","names":["deepEqual","additionalContext","BaseListQuery","OrderBySortingStrategy","tombstone","SpecificLinkQuery","sourceApiName","sourcePk","linkName","whereClause","orderBy","registerCacheChanges","batch","changes","modified","add","cacheKey","constructor","store","subject","opts","process","env","NODE_ENV","client","logger","child","msgPrefix","otherKeys","map","x","JSON","stringify","join","undefined","fetchPageData","signal","sourceObjectDef","type","apiName","sourceMetadata","ontologyProvider","getObjectDefinition","Object","keys","length","linkDef","links","targetType","Error","sortingStrategy","sourceQuery","where","primaryKeyApiName","linkQuery","pivotTo","aborted","queryParams","$pageSize","options","pageSize","$nextPageToken","nextPageToken","$orderBy","$where","response","fetchPage","deleteFromStore","status","entry","read","value","methodName","debug","write","ret","delete","deleted","maybeUpdateAndRevalidate","has","revalidate","Promise","resolve","invalidateObjectType","objectType","promise","isSpecificLinkCacheKey","key"],"sources":["SpecificLinkQuery.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ObjectTypeDefinition,\n Osdk,\n PageResult,\n PrimaryKeyType,\n WhereClause,\n} from \"@osdk/api\";\nimport deepEqual from \"fast-deep-equal\";\nimport { type Subject } from \"rxjs\";\nimport { additionalContext } from \"../../../Client.js\";\nimport type { SpecificLinkPayload } from \"../../LinkPayload.js\";\nimport type { Status } from \"../../ObservableClient/common.js\";\nimport type { ObserveLinks } from \"../../ObservableClient/ObserveLink.js\";\nimport { BaseListQuery } from \"../base-list/BaseListQuery.js\";\nimport type { BatchContext } from \"../BatchContext.js\";\nimport type { CacheKey } from \"../CacheKey.js\";\nimport type { Canonical } from \"../Canonical.js\";\nimport type { Changes } from \"../Changes.js\";\nimport type { Entry } from \"../Layer.js\";\nimport type { OptimisticId } from \"../OptimisticId.js\";\nimport type { SimpleWhereClause } from \"../SimpleWhereClause.js\";\nimport { OrderBySortingStrategy } from \"../sorting/SortingStrategy.js\";\nimport type { Store } from \"../Store.js\";\nimport type { SubjectPayload } from \"../SubjectPayload.js\";\nimport { tombstone } from \"../tombstone.js\";\nimport type { SpecificLinkCacheKey } from \"./SpecificLinkCacheKey.js\";\n\n/**\n * Query implementation for retrieving linked objects from a specific object.\n * - Stores links as ObjectCacheKey[] references\n * - Creates indirect dependencies on linked objects\n * - Supports filtering and sorting of linked collections\n * - Handles proper invalidation of related objects\n */\nexport class SpecificLinkQuery extends BaseListQuery<\n SpecificLinkCacheKey,\n SpecificLinkPayload,\n ObserveLinks.Options<ObjectTypeDefinition, string>\n> {\n #sourceApiName: string;\n #sourcePk: PrimaryKeyType<ObjectTypeDefinition>;\n #linkName: string;\n #whereClause: Canonical<SimpleWhereClause>;\n #orderBy: Canonical<Record<string, \"asc\" | \"desc\" | undefined>>;\n\n /**\n * Register changes to the cache specific to SpecificLinkQuery\n */\n protected registerCacheChanges(batch: BatchContext): void {\n batch.changes.modified.add(this.cacheKey);\n }\n\n constructor(\n store: Store,\n subject: Subject<SubjectPayload<SpecificLinkCacheKey>>,\n cacheKey: SpecificLinkCacheKey,\n opts: ObserveLinks.Options<\n ObjectTypeDefinition,\n string\n >,\n ) {\n super(\n store,\n subject,\n opts,\n cacheKey,\n process.env.NODE_ENV !== \"production\"\n ? (\n store.client[additionalContext].logger?.child({}, {\n msgPrefix: `SpecificLinkQuery<${\n cacheKey.otherKeys.map(x => JSON.stringify(x)).join(\", \")\n }>`,\n })\n )\n : undefined,\n );\n\n // Extract the necessary parameters from the cache key\n [\n this.#sourceApiName,\n this.#sourcePk,\n this.#linkName,\n this.#whereClause,\n this.#orderBy,\n ] = cacheKey.otherKeys;\n }\n\n // _fetchAndStore is now implemented in BaseCollectionQuery\n\n /**\n * Implements fetchPageData from the BaseCollectionQuery template method pattern\n * Fetches a page of linked objects\n */\n protected async fetchPageData(\n signal: AbortSignal | undefined,\n ): Promise<PageResult<Osdk.Instance<any>>> {\n // Use the client API to create a query that pivots to linked objects\n const client = this.store.client;\n\n // First, get metadata for the source object to know the primary key field name\n const sourceObjectDef = {\n type: \"object\",\n apiName: this.#sourceApiName,\n } as ObjectTypeDefinition;\n\n // Use the client's ontologyProvider to get metadata, which has built-in caching\n const sourceMetadata = await client[additionalContext].ontologyProvider\n .getObjectDefinition(this.#sourceApiName);\n\n // Initialize sorting strategy with the link's target object type\n if (this.#orderBy && Object.keys(this.#orderBy).length > 0) {\n const linkDef = sourceMetadata.links?.[this.#linkName];\n if (!linkDef?.targetType) {\n throw new Error(\n `Missing link definition or targetType for link '${this.#linkName}' on object type '${this.#sourceApiName}'`,\n );\n }\n this.sortingStrategy = new OrderBySortingStrategy(\n linkDef.targetType,\n this.#orderBy,\n );\n }\n\n // Query for the specific source object\n const sourceQuery = client(sourceObjectDef).where({\n [sourceMetadata.primaryKeyApiName]: this.#sourcePk,\n } as WhereClause<any>);\n\n // Pivot to the linked objects\n const linkQuery = sourceQuery.pivotTo(this.#linkName);\n\n // Check for abort signal again before fetching\n if (signal?.aborted) {\n throw new Error(\"Aborted\");\n }\n\n // Fetch the linked objects with pagination\n // Add orderBy to the query parameters if specified\n const queryParams: any = {\n $pageSize: this.options.pageSize || 100,\n $nextPageToken: this.nextPageToken,\n };\n\n // Include orderBy if it has entries\n if (this.#orderBy && Object.keys(this.#orderBy).length > 0) {\n queryParams.$orderBy = this.#orderBy;\n }\n\n // Include whereClause if it has entries\n if (this.#whereClause && Object.keys(this.#whereClause).length > 0) {\n queryParams.$where = this.#whereClause;\n }\n\n const response = await linkQuery.fetchPage(queryParams);\n\n // Store the next page token for pagination\n this.nextPageToken = response.nextPageToken;\n\n return response;\n }\n\n /**\n * Removes a link query from the store\n */\n deleteFromStore(\n status: Status,\n batch: BatchContext,\n ): Entry<SpecificLinkCacheKey> | undefined {\n const entry = batch.read(this.cacheKey);\n\n if (entry && deepEqual(tombstone, entry.value)) {\n if (process.env.NODE_ENV !== \"production\") {\n this.logger?.child({ methodName: \"deleteFromStore\" }).debug(\n `Links were already deleted, just setting status`,\n );\n }\n return batch.write(this.cacheKey, entry.value, status);\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n this.logger?.child({ methodName: \"deleteFromStore\" }).debug(\n JSON.stringify({ status }),\n );\n }\n\n // If there is no entry then there is nothing to do\n if (!entry || !entry.value) {\n return;\n }\n\n const ret = batch.delete(this.cacheKey, status);\n batch.changes.deleted.add(this.cacheKey);\n\n return ret;\n }\n\n /**\n * Implements Query.maybeUpdateAndRevalidate to handle cache invalidation\n */\n maybeUpdateAndRevalidate = async (\n changes: Changes,\n _optimisticId: OptimisticId | undefined,\n ): Promise<void> => {\n // TODO: Implement proper invalidation logic for linked objects\n // This would check if any of the linked objects have changed,\n // or if the source object's links might have changed\n\n // For now, simply check if this specific link cache key was modified\n if (changes.modified.has(this.cacheKey)) {\n return this.revalidate(true);\n }\n\n // No relevant changes were detected\n return Promise.resolve();\n };\n\n invalidateObjectType = (\n objectType: string,\n changes: Changes | undefined,\n ): Promise<void> => {\n // We need to invalidate links in two cases:\n // 1. When the source object type matches the apiName (direct invalidation)\n // 2. When the target object type might be the invalidated type (affected by target changes)\n\n // For case 1 - direct source object type match\n if (this.#sourceApiName === objectType) {\n changes?.modified.add(this.cacheKey);\n return this.revalidate(true);\n } else {\n // For case 2 - check if the link's target type matches the invalidated type\n // We need to use the ontology provider to get the link metadata\n // Since this is async, we'll collect all the metadata check promises\n return (async () => {\n // Get the source object metadata to determine link target type\n const sourceMetadata = await this.store.client[additionalContext]\n .ontologyProvider\n .getObjectDefinition(this.#sourceApiName);\n\n const linkDef = sourceMetadata.links?.[this.#linkName];\n if (!linkDef || linkDef.targetType !== objectType) return;\n\n const promise = this.revalidate(true);\n changes?.modified.add(this.cacheKey);\n return promise;\n })();\n }\n };\n}\n\n/**\n * Type guard to check if a cache key is a SpecificLinkCacheKey\n */\nexport function isSpecificLinkCacheKey(\n key: CacheKey,\n): key is SpecificLinkCacheKey {\n return key.type === \"specificLink\";\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,OAAOA,SAAS,MAAM,iBAAiB;AAEvC,SAASC,iBAAiB,QAAQ,oBAAoB;AAItD,SAASC,aAAa,QAAQ,+BAA+B;AAQ7D,SAASC,sBAAsB,QAAQ,+BAA+B;AAGtE,SAASC,SAAS,QAAQ,iBAAiB;AAG3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,SAASH,aAAa,CAIlD;EACA,CAACI,aAAa;EACd,CAACC,QAAQ;EACT,CAACC,QAAQ;EACT,CAACC,WAAW;EACZ,CAACC,OAAO;;EAER;AACF;AACA;EACYC,oBAAoBA,CAACC,KAAmB,EAAQ;IACxDA,KAAK,CAACC,OAAO,CAACC,QAAQ,CAACC,GAAG,CAAC,IAAI,CAACC,QAAQ,CAAC;EAC3C;EAEAC,WAAWA,CACTC,KAAY,EACZC,OAAsD,EACtDH,QAA8B,EAC9BI,IAGC,EACD;IACA,KAAK,CACHF,KAAK,EACLC,OAAO,EACPC,IAAI,EACJJ,QAAQ,EACRK,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAEjCL,KAAK,CAACM,MAAM,CAACvB,iBAAiB,CAAC,CAACwB,MAAM,EAAEC,KAAK,CAAC,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B,EAClBvE,OAA4B,KACV;IAClB;IACA;IACA;;IAEA;IACA,IAAI,IAAI,CAAC,CAACP,aAAa,KAAK8E,UAAU,EAAE;MACtCvE,OAAO,EAAEC,QAAQ,CAACC,GAAG,CAAC,IAAI,CAACC,QAAQ,CAAC;MACpC,OAAO,IAAI,CAACgE,UAAU,CAAC,IAAI,CAAC;IAC9B,CAAC,MAAM;MACL;MACA;MACA;MACA,OAAO,CAAC,YAAY;QAClB;QACA,MAAMxC,cAAc,GAAG,MAAM,IAAI,CAACtB,KAAK,CAACM,MAAM,CAACvB,iBAAiB,CAAC,CAC9DwC,gBAAgB,CAChBC,mBAAmB,CAAC,IAAI,CAAC,CAACpC,aAAa,CAAC;QAE3C,MAAMwC,OAAO,GAAGN,cAAc,CAACO,KAAK,GAAG,IAAI,CAAC,CAACvC,QAAQ,CAAC;QACtD,IAAI,CAACsC,OAAO,IAAIA,OAAO,CAACE,UAAU,KAAKoC,UAAU,EAAE;QAEnD,MAAMC,OAAO,GAAG,IAAI,CAACL,UAAU,CAAC,IAAI,CAAC;QACrCnE,OAAO,EAAEC,QAAQ,CAACC,GAAG,CAAC,IAAI,CAACC,QAAQ,CAAC;QACpC,OAAOqE,OAAO;MAChB,CAAC,EAAE,CAAC;IACN;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CACpCC,GAAa,EACgB;EAC7B,OAAOA,GAAG,CAACjD,IAAI,KAAK,cAAc;AACpC","ignoreList":[]}
@@ -14,6 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- export const USER_AGENT = `osdk-client/${"2.7.0-beta.1"}`;
18
- export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.0-beta.1"}`;
17
+ export const USER_AGENT = `osdk-client/${"2.7.0-beta.2"}`;
18
+ export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.0-beta.2"}`;
19
19
  //# sourceMappingURL=UserAgent.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkVDAI3GGL_cjs = require('./chunk-VDAI3GGL.cjs');
3
+ var chunkVYHIAGVJ_cjs = require('./chunk-VYHIAGVJ.cjs');
4
4
  var chunk6SCDLAU2_cjs = require('./chunk-6SCDLAU2.cjs');
5
5
  var unstable = require('@osdk/api/unstable');
6
6
  var client_unstable = require('@osdk/client.unstable');
@@ -436,51 +436,51 @@ chunk6SCDLAU2_cjs.__export(MediaSet_exports, {
436
436
  chunk6SCDLAU2_cjs.init_cjs_shims();
437
437
  var _abort = [1, "/v2/mediasets/{0}/transactions/{1}/abort", 2];
438
438
  function abort($ctx, ...args) {
439
- return chunkVDAI3GGL_cjs.foundryPlatformFetch($ctx, _abort, ...args);
439
+ return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _abort, ...args);
440
440
  }
441
441
  var _calculate = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/calculate", 6];
442
442
  function calculate($ctx, ...args) {
443
- return chunkVDAI3GGL_cjs.foundryPlatformFetch($ctx, _calculate, ...args);
443
+ return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _calculate, ...args);
444
444
  }
445
445
  var _commit = [1, "/v2/mediasets/{0}/transactions/{1}/commit", 2];
446
446
  function commit($ctx, ...args) {
447
- return chunkVDAI3GGL_cjs.foundryPlatformFetch($ctx, _commit, ...args);
447
+ return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _commit, ...args);
448
448
  }
449
449
  var _create = [1, "/v2/mediasets/{0}/transactions", 2];
450
450
  function create($ctx, ...args) {
451
- return chunkVDAI3GGL_cjs.foundryPlatformFetch($ctx, _create, ...args);
451
+ return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _create, ...args);
452
452
  }
453
453
  var _info = [0, "/v2/mediasets/{0}/items/{1}", 6];
454
454
  function info($ctx, ...args) {
455
- return chunkVDAI3GGL_cjs.foundryPlatformFetch($ctx, _info, ...args);
455
+ return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _info, ...args);
456
456
  }
457
457
  var _reference = [0, "/v2/mediasets/{0}/items/{1}/reference", 6];
458
458
  function reference($ctx, ...args) {
459
- return chunkVDAI3GGL_cjs.foundryPlatformFetch($ctx, _reference, ...args);
459
+ return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _reference, ...args);
460
460
  }
461
461
  var _getRidByPath = [0, "/v2/mediasets/{0}/items/getRidByPath", 2];
462
462
  function getRidByPath($ctx, ...args) {
463
- return chunkVDAI3GGL_cjs.foundryPlatformFetch($ctx, _getRidByPath, ...args);
463
+ return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _getRidByPath, ...args);
464
464
  }
465
465
  var _upload = [1, "/v2/mediasets/{0}/items", 3, "*/*"];
466
466
  function upload($ctx, ...args) {
467
- return chunkVDAI3GGL_cjs.foundryPlatformFetch($ctx, _upload, ...args);
467
+ return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _upload, ...args);
468
468
  }
469
469
  var _read = [0, "/v2/mediasets/{0}/items/{1}/content", 6, , "*/*"];
470
470
  function read($ctx, ...args) {
471
- return chunkVDAI3GGL_cjs.foundryPlatformFetch($ctx, _read, ...args);
471
+ return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _read, ...args);
472
472
  }
473
473
  var _readOriginal = [0, "/v2/mediasets/{0}/items/{1}/original", 6, , "*/*"];
474
474
  function readOriginal($ctx, ...args) {
475
- return chunkVDAI3GGL_cjs.foundryPlatformFetch($ctx, _readOriginal, ...args);
475
+ return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _readOriginal, ...args);
476
476
  }
477
477
  var _retrieve = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/retrieve", 6, , "*/*"];
478
478
  function retrieve($ctx, ...args) {
479
- return chunkVDAI3GGL_cjs.foundryPlatformFetch($ctx, _retrieve, ...args);
479
+ return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _retrieve, ...args);
480
480
  }
481
481
  var _uploadMedia = [2, "/v2/mediasets/media/upload", 7, "*/*"];
482
482
  function uploadMedia($ctx, ...args) {
483
- return chunkVDAI3GGL_cjs.foundryPlatformFetch($ctx, _uploadMedia, ...args);
483
+ return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _uploadMedia, ...args);
484
484
  }
485
485
 
486
486
  // src/object/mediaUpload.ts
@@ -543,13 +543,13 @@ async function toDataValue(value, client, actionMetadata) {
543
543
  return Promise.all(promiseArray);
544
544
  }
545
545
  if (isAttachmentUpload(value)) {
546
- const attachment = await chunkVDAI3GGL_cjs.Attachment_exports.upload(client, value.data, {
546
+ const attachment = await chunkVYHIAGVJ_cjs.Attachment_exports.upload(client, value.data, {
547
547
  filename: value.name
548
548
  });
549
549
  return await toDataValue(attachment.rid, client);
550
550
  }
551
551
  if (isAttachmentFile(value)) {
552
- const attachment = await chunkVDAI3GGL_cjs.Attachment_exports.upload(client, value, {
552
+ const attachment = await chunkVYHIAGVJ_cjs.Attachment_exports.upload(client, value, {
553
553
  filename: value.name
554
554
  });
555
555
  return await toDataValue(attachment.rid, client);
@@ -570,11 +570,11 @@ async function toDataValue(value, client, actionMetadata) {
570
570
  if (isPoint(value)) {
571
571
  return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client);
572
572
  }
573
- if (chunkVDAI3GGL_cjs.isWireObjectSet(value)) {
573
+ if (chunkVYHIAGVJ_cjs.isWireObjectSet(value)) {
574
574
  return value;
575
575
  }
576
- if (chunkVDAI3GGL_cjs.isObjectSet(value)) {
577
- return chunkVDAI3GGL_cjs.getWireObjectSet(value);
576
+ if (chunkVYHIAGVJ_cjs.isObjectSet(value)) {
577
+ return chunkVYHIAGVJ_cjs.getWireObjectSet(value);
578
578
  }
579
579
  if (isMediaReference(value)) {
580
580
  return value;
@@ -597,11 +597,11 @@ async function toDataValue(value, client, actionMetadata) {
597
597
 
598
598
  // src/actions/applyAction.ts
599
599
  async function applyAction(client, action, parameters, options = {}) {
600
- const clientWithHeaders = chunkVDAI3GGL_cjs.addUserAgentAndRequestContextHeaders(chunkVDAI3GGL_cjs.augmentRequestContext(client, (_) => ({
600
+ const clientWithHeaders = chunkVYHIAGVJ_cjs.addUserAgentAndRequestContextHeaders(chunkVYHIAGVJ_cjs.augmentRequestContext(client, (_) => ({
601
601
  finalMethodCall: "applyAction"
602
602
  })), action);
603
603
  if (Array.isArray(parameters)) {
604
- const response = await chunkVDAI3GGL_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
604
+ const response = await chunkVYHIAGVJ_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
605
605
  requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)) : [],
606
606
  options: {
607
607
  returnEdits: options?.$returnEdits ? "ALL" : "NONE"
@@ -612,7 +612,7 @@ async function applyAction(client, action, parameters, options = {}) {
612
612
  const edits = response.edits;
613
613
  return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
614
614
  } else {
615
- const response = await chunkVDAI3GGL_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
615
+ const response = await chunkVYHIAGVJ_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
616
616
  parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
617
617
  options: {
618
618
  mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
@@ -835,7 +835,7 @@ var GeotimeSeriesPropertyImpl = class {
835
835
  }
836
836
  }
837
837
  async getLatestValue() {
838
- const latestPointPromise = chunkVDAI3GGL_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
838
+ const latestPointPromise = chunkVYHIAGVJ_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
839
839
  latestPointPromise.then(
840
840
  (latestPoint) => this.lastFetchedValue = latestPoint,
841
841
  // eslint-disable-next-line no-console
@@ -851,7 +851,7 @@ var GeotimeSeriesPropertyImpl = class {
851
851
  return allPoints;
852
852
  }
853
853
  async *asyncIterValues(query) {
854
- const streamPointsIterator = await chunkVDAI3GGL_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
854
+ const streamPointsIterator = await chunkVYHIAGVJ_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
855
855
  range: getTimeRange(query)
856
856
  } : {});
857
857
  for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
@@ -879,13 +879,13 @@ var MediaReferencePropertyImpl = class {
879
879
  this.#mediaReference = mediaReference;
880
880
  }
881
881
  async fetchContents() {
882
- return chunkVDAI3GGL_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
882
+ return chunkVYHIAGVJ_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
883
883
  preview: true
884
884
  // TODO: Can turn this back off when backend is no longer in beta.
885
885
  });
886
886
  }
887
887
  async fetchMetadata() {
888
- const r = await chunkVDAI3GGL_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
888
+ const r = await chunkVYHIAGVJ_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
889
889
  preview: true
890
890
  // TODO: Can turn this back off when backend is no longer in beta.
891
891
  });
@@ -910,10 +910,10 @@ var TimeSeriesPropertyImpl = class {
910
910
  this.#triplet = [objectApiName, primaryKey, propertyName];
911
911
  }
912
912
  async getFirstPoint() {
913
- return chunkVDAI3GGL_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
913
+ return chunkVYHIAGVJ_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
914
914
  }
915
915
  async getLastPoint() {
916
- return chunkVDAI3GGL_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
916
+ return chunkVYHIAGVJ_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
917
917
  }
918
918
  async getAllPoints(query) {
919
919
  const allPoints = [];
@@ -923,7 +923,7 @@ var TimeSeriesPropertyImpl = class {
923
923
  return allPoints;
924
924
  }
925
925
  async *asyncIterPoints(query) {
926
- const streamPointsIterator = await chunkVDAI3GGL_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
926
+ const streamPointsIterator = await chunkVYHIAGVJ_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
927
927
  range: getTimeRange(query)
928
928
  } : {});
929
929
  for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
@@ -1340,8 +1340,8 @@ function get$link(holder) {
1340
1340
  [objDef.primaryKeyApiName]: rawObj.$primaryKey
1341
1341
  }).pivotTo(linkName);
1342
1342
  const value = !linkDef.multiplicity ? {
1343
- fetchOne: (options) => chunkVDAI3GGL_cjs.fetchSingle(client, objDef, options ?? {}, chunkVDAI3GGL_cjs.getWireObjectSet(objectSet)),
1344
- fetchOneWithErrors: (options) => chunkVDAI3GGL_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkVDAI3GGL_cjs.getWireObjectSet(objectSet))
1343
+ fetchOne: (options) => chunkVYHIAGVJ_cjs.fetchSingle(client, objDef, options ?? {}, chunkVYHIAGVJ_cjs.getWireObjectSet(objectSet)),
1344
+ fetchOneWithErrors: (options) => chunkVYHIAGVJ_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkVYHIAGVJ_cjs.getWireObjectSet(objectSet))
1345
1345
  } : objectSet;
1346
1346
  return [linkName, value];
1347
1347
  })));
@@ -1357,8 +1357,8 @@ function get$linkForInterface(holder) {
1357
1357
  [objDef.primaryKeyApiName]: rawObj.$primaryKey
1358
1358
  })).pivotTo(linkName);
1359
1359
  const value = !linkDef.multiplicity ? {
1360
- fetchOne: (options) => chunkVDAI3GGL_cjs.fetchSingle(client, objDef, options ?? {}, chunkVDAI3GGL_cjs.getWireObjectSet(objectSet)),
1361
- fetchOneWithErrors: (options) => chunkVDAI3GGL_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkVDAI3GGL_cjs.getWireObjectSet(objectSet))
1360
+ fetchOne: (options) => chunkVYHIAGVJ_cjs.fetchSingle(client, objDef, options ?? {}, chunkVYHIAGVJ_cjs.getWireObjectSet(objectSet)),
1361
+ fetchOneWithErrors: (options) => chunkVYHIAGVJ_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkVYHIAGVJ_cjs.getWireObjectSet(objectSet))
1362
1362
  } : objectSet;
1363
1363
  return [linkName, value];
1364
1364
  })));
@@ -1366,7 +1366,7 @@ function get$linkForInterface(holder) {
1366
1366
 
1367
1367
  // src/object/convertWireToOsdkObjects/createOsdkInterface.ts
1368
1368
  function createOsdkInterface(underlying, interfaceDef) {
1369
- const [objApiNamespace] = chunkVDAI3GGL_cjs.extractNamespace(interfaceDef.apiName);
1369
+ const [objApiNamespace] = chunkVYHIAGVJ_cjs.extractNamespace(interfaceDef.apiName);
1370
1370
  return Object.freeze(Object.defineProperties({}, {
1371
1371
  // first to minimize hidden classes
1372
1372
  [UnderlyingOsdkObject]: {
@@ -1425,7 +1425,7 @@ function createOsdkInterface(underlying, interfaceDef) {
1425
1425
  },
1426
1426
  ...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
1427
1427
  const objDef = underlying[ObjectDefRef];
1428
- const [apiNamespace, apiName] = chunkVDAI3GGL_cjs.extractNamespace(p);
1428
+ const [apiNamespace, apiName] = chunkVYHIAGVJ_cjs.extractNamespace(p);
1429
1429
  const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
1430
1430
  return [apiNamespace === objApiNamespace ? apiName : p, {
1431
1431
  enumerable: targetPropName in underlying,
@@ -1586,9 +1586,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
1586
1586
  switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
1587
1587
  case "attachment":
1588
1588
  if (Array.isArray(rawValue)) {
1589
- return rawValue.map((a) => chunkVDAI3GGL_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1589
+ return rawValue.map((a) => chunkVYHIAGVJ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1590
1590
  } else {
1591
- return chunkVDAI3GGL_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1591
+ return chunkVYHIAGVJ_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1592
1592
  }
1593
1593
  default:
1594
1594
  process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
@@ -1604,9 +1604,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
1604
1604
  }
1605
1605
  if (propDef.type === "attachment") {
1606
1606
  if (Array.isArray(rawValue)) {
1607
- return rawValue.map((a) => chunkVDAI3GGL_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1607
+ return rawValue.map((a) => chunkVYHIAGVJ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1608
1608
  }
1609
- return chunkVDAI3GGL_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1609
+ return chunkVYHIAGVJ_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1610
1610
  }
1611
1611
  if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
1612
1612
  return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
@@ -1838,7 +1838,7 @@ function deepFreeze(obj) {
1838
1838
  // src/ontology/loadActionMetadata.ts
1839
1839
  chunk6SCDLAU2_cjs.init_cjs_shims();
1840
1840
  async function loadActionMetadata(client, actionType) {
1841
- const r = await chunkVDAI3GGL_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType, {
1841
+ const r = await chunkVYHIAGVJ_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType, {
1842
1842
  branch: client.branch
1843
1843
  });
1844
1844
  return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
@@ -1847,7 +1847,7 @@ async function loadActionMetadata(client, actionType) {
1847
1847
  // src/ontology/loadFullObjectMetadata.ts
1848
1848
  chunk6SCDLAU2_cjs.init_cjs_shims();
1849
1849
  async function loadFullObjectMetadata(client, objectType) {
1850
- const full = await chunkVDAI3GGL_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
1850
+ const full = await chunkVYHIAGVJ_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
1851
1851
  preview: true,
1852
1852
  branch: client.branch
1853
1853
  });
@@ -1860,7 +1860,7 @@ async function loadFullObjectMetadata(client, objectType) {
1860
1860
  // src/ontology/loadInterfaceMetadata.ts
1861
1861
  chunk6SCDLAU2_cjs.init_cjs_shims();
1862
1862
  async function loadInterfaceMetadata(client, objectType) {
1863
- const r = await chunkVDAI3GGL_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
1863
+ const r = await chunkVYHIAGVJ_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
1864
1864
  preview: true,
1865
1865
  branch: client.branch
1866
1866
  });
@@ -1871,7 +1871,7 @@ async function loadInterfaceMetadata(client, objectType) {
1871
1871
  chunk6SCDLAU2_cjs.init_cjs_shims();
1872
1872
  async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
1873
1873
  const [apiName, version] = queryTypeApiNameAndVersion.split(":");
1874
- const r = await chunkVDAI3GGL_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
1874
+ const r = await chunkVYHIAGVJ_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
1875
1875
  version
1876
1876
  });
1877
1877
  return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
@@ -1929,11 +1929,11 @@ var createStandardOntologyProviderFactory = (client) => {
1929
1929
 
1930
1930
  // src/util/UserAgent.ts
1931
1931
  chunk6SCDLAU2_cjs.init_cjs_shims();
1932
- var USER_AGENT = `osdk-client/${"2.7.0-beta.1"}`;
1933
- var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.0-beta.1"}`;
1932
+ var USER_AGENT = `osdk-client/${"2.7.0-beta.2"}`;
1933
+ var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.0-beta.2"}`;
1934
1934
 
1935
1935
  // src/createMinimalClient.ts
1936
- function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkVDAI3GGL_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1936
+ function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkVYHIAGVJ_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1937
1937
  if (process.env.NODE_ENV !== "production") {
1938
1938
  try {
1939
1939
  new URL(baseUrl);
@@ -2006,13 +2006,13 @@ async function toDataValueQueries(value, client, desiredType) {
2006
2006
  switch (desiredType.type) {
2007
2007
  case "attachment": {
2008
2008
  if (isAttachmentUpload(value)) {
2009
- const attachment = await chunkVDAI3GGL_cjs.Attachment_exports.upload(client, value.data, {
2009
+ const attachment = await chunkVYHIAGVJ_cjs.Attachment_exports.upload(client, value.data, {
2010
2010
  filename: value.name
2011
2011
  });
2012
2012
  return attachment.rid;
2013
2013
  }
2014
2014
  if (isAttachmentFile(value)) {
2015
- const attachment = await chunkVDAI3GGL_cjs.Attachment_exports.upload(client, value, {
2015
+ const attachment = await chunkVYHIAGVJ_cjs.Attachment_exports.upload(client, value, {
2016
2016
  filename: value.name
2017
2017
  });
2018
2018
  return attachment.rid;
@@ -2052,11 +2052,11 @@ async function toDataValueQueries(value, client, desiredType) {
2052
2052
  }
2053
2053
  case "objectSet":
2054
2054
  case "interfaceObjectSet": {
2055
- if (chunkVDAI3GGL_cjs.isWireObjectSet(value)) {
2055
+ if (chunkVYHIAGVJ_cjs.isWireObjectSet(value)) {
2056
2056
  return value;
2057
2057
  }
2058
- if (chunkVDAI3GGL_cjs.isObjectSet(value)) {
2059
- return chunkVDAI3GGL_cjs.getWireObjectSet(value);
2058
+ if (chunkVYHIAGVJ_cjs.isObjectSet(value)) {
2059
+ return chunkVYHIAGVJ_cjs.getWireObjectSet(value);
2060
2060
  }
2061
2061
  break;
2062
2062
  }
@@ -2098,7 +2098,7 @@ async function toDataValueQueries(value, client, desiredType) {
2098
2098
  // src/queries/applyQuery.ts
2099
2099
  async function applyQuery(client, query, params) {
2100
2100
  const qd = client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : void 0);
2101
- const response = await chunkVDAI3GGL_cjs.Query_exports.execute(chunkVDAI3GGL_cjs.addUserAgentAndRequestContextHeaders(chunkVDAI3GGL_cjs.augmentRequestContext(client, (_) => ({
2101
+ const response = await chunkVYHIAGVJ_cjs.Query_exports.execute(chunkVYHIAGVJ_cjs.addUserAgentAndRequestContextHeaders(chunkVYHIAGVJ_cjs.augmentRequestContext(client, (_) => ({
2102
2102
  finalMethodCall: "applyQuery"
2103
2103
  })), query), await client.ontologyRid, query.apiName, {
2104
2104
  parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
@@ -2141,7 +2141,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
2141
2141
  return responseValue;
2142
2142
  }
2143
2143
  case "attachment": {
2144
- return chunkVDAI3GGL_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
2144
+ return chunkVYHIAGVJ_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
2145
2145
  }
2146
2146
  case "object": {
2147
2147
  const def = definitions.get(responseDataType.object);
@@ -2163,7 +2163,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
2163
2163
  throw new Error(`Missing definition for ${responseDataType.objectSet}`);
2164
2164
  }
2165
2165
  if (typeof responseValue === "string") {
2166
- return chunkVDAI3GGL_cjs.createObjectSet(def, client, {
2166
+ return chunkVYHIAGVJ_cjs.createObjectSet(def, client, {
2167
2167
  type: "intersect",
2168
2168
  objectSets: [{
2169
2169
  type: "base",
@@ -2174,7 +2174,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
2174
2174
  }]
2175
2175
  });
2176
2176
  }
2177
- return chunkVDAI3GGL_cjs.createObjectSet(def, client, responseValue);
2177
+ return chunkVYHIAGVJ_cjs.createObjectSet(def, client, responseValue);
2178
2178
  }
2179
2179
  case "struct": {
2180
2180
  for (const [key, subtype] of Object.entries(responseDataType.struct)) {
@@ -2360,7 +2360,7 @@ function createClientInternal(objectSetFactory, transactionRid, baseUrl, ontolog
2360
2360
  ontologyRid
2361
2361
  }, baseUrl, tokenProvider, {
2362
2362
  ...options,
2363
- logger: options?.logger ?? new chunkVDAI3GGL_cjs.MinimalLogger(),
2363
+ logger: options?.logger ?? new chunkVYHIAGVJ_cjs.MinimalLogger(),
2364
2364
  transactionId: transactionRid,
2365
2365
  branch: options?.branch
2366
2366
  }, fetchFn, objectSetFactory);
@@ -2383,7 +2383,7 @@ function createClientFromContext(clientCtx) {
2383
2383
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
2384
2384
  return {
2385
2385
  fetchOneByRid: async (objectType, rid, options) => {
2386
- return await chunkVDAI3GGL_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2386
+ return await chunkVYHIAGVJ_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2387
2387
  }
2388
2388
  };
2389
2389
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
@@ -2395,7 +2395,7 @@ function createClientFromContext(clientCtx) {
2395
2395
  objectType,
2396
2396
  propertyType
2397
2397
  } = args;
2398
- return await chunkVDAI3GGL_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
2398
+ return await chunkVYHIAGVJ_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
2399
2399
  mediaItemPath: fileName,
2400
2400
  preview: true
2401
2401
  });
@@ -2404,10 +2404,10 @@ function createClientFromContext(clientCtx) {
2404
2404
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
2405
2405
  return {
2406
2406
  fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
2407
- return await chunkVDAI3GGL_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2407
+ return await chunkVYHIAGVJ_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2408
2408
  },
2409
2409
  fetchPageByRidNoType: async (rids, options) => {
2410
- return await chunkVDAI3GGL_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2410
+ return await chunkVYHIAGVJ_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2411
2411
  }
2412
2412
  };
2413
2413
  }
@@ -2419,13 +2419,13 @@ function createClientFromContext(clientCtx) {
2419
2419
  const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
2420
2420
  const symbolClientContext2 = "__osdkClientContext";
2421
2421
  const client = Object.defineProperties(clientFn, {
2422
- [chunkVDAI3GGL_cjs.symbolClientContext]: {
2422
+ [chunkVYHIAGVJ_cjs.symbolClientContext]: {
2423
2423
  value: clientCtx
2424
2424
  },
2425
2425
  [symbolClientContext2]: {
2426
2426
  value: clientCtx
2427
2427
  },
2428
- [chunkVDAI3GGL_cjs.additionalContext]: {
2428
+ [chunkVYHIAGVJ_cjs.additionalContext]: {
2429
2429
  value: clientCtx
2430
2430
  },
2431
2431
  fetchMetadata: {
@@ -2434,8 +2434,8 @@ function createClientFromContext(clientCtx) {
2434
2434
  });
2435
2435
  return client;
2436
2436
  }
2437
- var createClient = createClientInternal.bind(void 0, chunkVDAI3GGL_cjs.createObjectSet, void 0);
2438
- var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(chunkVDAI3GGL_cjs.createObjectSet, transactionRid, ...args);
2437
+ var createClient = createClientInternal.bind(void 0, chunkVYHIAGVJ_cjs.createObjectSet, void 0);
2438
+ var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(chunkVYHIAGVJ_cjs.createObjectSet, transactionRid, ...args);
2439
2439
  function createWithRid(rids) {
2440
2440
  const withRid = {
2441
2441
  type: "static",
@@ -2455,5 +2455,5 @@ exports.createClientFromContext = createClientFromContext;
2455
2455
  exports.createClientWithTransaction = createClientWithTransaction;
2456
2456
  exports.createObjectSpecifierFromPrimaryKey = createObjectSpecifierFromPrimaryKey;
2457
2457
  exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
2458
- //# sourceMappingURL=chunk-WQL7SQ7H.cjs.map
2459
- //# sourceMappingURL=chunk-WQL7SQ7H.cjs.map
2458
+ //# sourceMappingURL=chunk-R5RI54KA.cjs.map
2459
+ //# sourceMappingURL=chunk-R5RI54KA.cjs.map