@osdk/client 2.3.1 → 2.3.3
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 +18 -0
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/observable/internal/ActionApplication.js +1 -1
- package/build/browser/observable/internal/ActionApplication.js.map +1 -1
- package/build/browser/public-utils/hydrateObjectSetFromRid.js +4 -1
- package/build/browser/public-utils/hydrateObjectSetFromRid.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/{chunk-T5KGTBH2.cjs → chunk-ERTC3NWZ.cjs} +14 -19
- package/build/cjs/chunk-ERTC3NWZ.cjs.map +1 -0
- package/build/cjs/chunk-Q7SFCCGT.cjs +11 -0
- package/build/cjs/chunk-Q7SFCCGT.cjs.map +1 -0
- package/build/cjs/{chunk-FWYXUSCF.cjs → chunk-QJKAH6UM.cjs} +50 -50
- package/build/cjs/{chunk-FWYXUSCF.cjs.map → chunk-QJKAH6UM.cjs.map} +1 -1
- package/build/cjs/delay-QK4T7RVX.cjs +74 -0
- package/build/cjs/delay-QK4T7RVX.cjs.map +1 -0
- package/build/cjs/index.cjs +7 -6
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/public/internal.cjs +13 -9
- package/build/cjs/public/internal.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.cjs +19 -72
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/observable/internal/ActionApplication.js +1 -1
- package/build/esm/observable/internal/ActionApplication.js.map +1 -1
- package/build/esm/public-utils/hydrateObjectSetFromRid.js +4 -1
- package/build/esm/public-utils/hydrateObjectSetFromRid.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/types/Client.d.ts +1 -1
- package/build/types/observable/internal/ActionApplication.d.ts.map +1 -1
- package/package.json +8 -8
- package/build/cjs/chunk-T5KGTBH2.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @osdk/client
|
|
2
2
|
|
|
3
|
+
## 2.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6b963aa: Fix module resolution for node when importing unstable code
|
|
8
|
+
- @osdk/api@2.3.3
|
|
9
|
+
- @osdk/client.unstable@2.3.3
|
|
10
|
+
- @osdk/generator-converters@2.3.3
|
|
11
|
+
|
|
12
|
+
## 2.3.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 5faf3b8: Fix hydrate to support interface object sets.
|
|
17
|
+
- @osdk/api@2.3.2
|
|
18
|
+
- @osdk/client.unstable@2.3.2
|
|
19
|
+
- @osdk/generator-converters@2.3.2
|
|
20
|
+
|
|
3
21
|
## 2.3.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/build/browser/Client.js
CHANGED
|
@@ -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.3.
|
|
24
|
+
const MaxOsdkVersion = "2.3.3";
|
|
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.3.
|
|
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.3.3\";\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":[]}
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import delay from "delay";
|
|
18
17
|
import { runOptimisticJob } from "./OptimisticJob.js";
|
|
19
18
|
const ACTION_DELAY = process.env.NODE_ENV === "production" ? 0 : 1000;
|
|
20
19
|
export class ActionApplication {
|
|
@@ -51,6 +50,7 @@ export class ActionApplication {
|
|
|
51
50
|
if (process.env.NODE_ENV !== "production") {
|
|
52
51
|
if (ACTION_DELAY > 0) {
|
|
53
52
|
logger?.debug("action done, pausing", actionResults);
|
|
53
|
+
const delay = (await import("delay")).default;
|
|
54
54
|
await delay(ACTION_DELAY);
|
|
55
55
|
logger?.debug("action done, pausing done");
|
|
56
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionApplication.js","names":["
|
|
1
|
+
{"version":3,"file":"ActionApplication.js","names":["runOptimisticJob","ACTION_DELAY","process","env","NODE_ENV","ActionApplication","constructor","store","applyAction","action","args","optimisticUpdate","logger","child","methodName","removeOptimisticResult","Array","isArray","debug","results","client","batchApplyAction","$returnEdits","invalidateActionEditResponse","actionResults","delay","default","#invalidateActionEditResponse","deletedObjects","modifiedObjects","addedObjects","editedObjectTypes","type","changes","promisesToWait","list","obj","push","invalidateObject","objectType","primaryKey","batch","cacheKey","getCacheKey","peekQuery","deleteFromStore","Promise","all","apiName","invalidateObjectType"],"sources":["ActionApplication.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 ActionDefinition,\n ActionEditResponse,\n ActionReturnTypeForOptions,\n} from \"@osdk/api\";\nimport type { ActionSignatureFromDef } from \"../../actions/applyAction.js\";\nimport { type Changes } from \"./Changes.js\";\nimport type { ObjectCacheKey } from \"./ObjectQuery.js\";\nimport { runOptimisticJob } from \"./OptimisticJob.js\";\nimport type { Store } from \"./Store.js\";\n\nconst ACTION_DELAY = process.env.NODE_ENV === \"production\" ? 0 : 1000;\n\nexport class ActionApplication {\n constructor(private store: Store) {}\n\n applyAction: <Q extends ActionDefinition<any>>(\n action: Q,\n args:\n | Parameters<ActionSignatureFromDef<Q>[\"applyAction\"]>[0]\n | Array<Parameters<ActionSignatureFromDef<Q>[\"applyAction\"]>[0]>,\n opts?: Store.ApplyActionOptions,\n ) => Promise<ActionEditResponse> = async (\n action,\n args,\n { optimisticUpdate } = {},\n ) => {\n const logger = process.env.NODE_ENV !== \"production\"\n ? this.store.logger?.child({ methodName: \"applyAction\" })\n : this.store.logger;\n const removeOptimisticResult = runOptimisticJob(\n this.store,\n optimisticUpdate,\n );\n\n return await (async () => {\n try {\n if (Array.isArray(args)) {\n if (process.env.NODE_ENV !== \"production\") {\n logger?.debug(\"applying action to multiple args\", args);\n }\n\n const results: ActionReturnTypeForOptions<{ $returnEdits: true }> =\n await this.store\n .client(action).batchApplyAction(\n args,\n { $returnEdits: true },\n );\n\n await this.#invalidateActionEditResponse(results);\n\n return results;\n }\n\n // The types for client get confused when we dynamically applyAction so we\n // have to deal with the `any` here and force cast it to what it should be.\n // TODO: Update the types so this doesn't happen!\n\n const actionResults: ActionEditResponse = await this.store.client(\n action,\n ).applyAction(args as any, { $returnEdits: true });\n\n if (process.env.NODE_ENV !== \"production\") {\n if (ACTION_DELAY > 0) {\n logger?.debug(\"action done, pausing\", actionResults);\n const delay = (await import(\"delay\")).default;\n await delay(ACTION_DELAY);\n logger?.debug(\"action done, pausing done\");\n }\n }\n await this.#invalidateActionEditResponse(actionResults);\n return actionResults;\n } finally {\n if (process.env.NODE_ENV !== \"production\") {\n logger?.debug(\n \"optimistic action complete; remove the results\",\n );\n }\n // make sure this happens even if the action fails\n await removeOptimisticResult();\n }\n })();\n };\n\n #invalidateActionEditResponse = async (\n { deletedObjects, modifiedObjects, addedObjects, editedObjectTypes, type }:\n ActionEditResponse,\n ): Promise<void> => {\n let changes: Changes | undefined;\n if (type === \"edits\") {\n const promisesToWait: Promise<any>[] = [];\n\n for (const list of [deletedObjects, modifiedObjects, addedObjects]) {\n for (const obj of list ?? []) {\n promisesToWait.push(\n this.store.invalidateObject(obj.objectType, obj.primaryKey),\n );\n }\n }\n\n this.store.batch({}, (batch) => {\n for (const { objectType, primaryKey } of deletedObjects ?? []) {\n const cacheKey = this.store.getCacheKey<ObjectCacheKey>(\n \"object\",\n objectType,\n primaryKey,\n );\n this.store.peekQuery(cacheKey)?.deleteFromStore(\n \"loaded\", // this is probably not the best value to use\n batch,\n );\n }\n });\n await Promise.all(promisesToWait);\n } else {\n for (const apiName of editedObjectTypes) {\n await this.store.invalidateObjectType(apiName as string, changes);\n }\n }\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,SAASA,gBAAgB,QAAQ,oBAAoB;AAGrD,MAAMC,YAAY,GAAGC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAAG,CAAC,GAAG,IAA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,UAAU,EACVC,UACF,CAAC;UACD,IAAI,CAACjC,KAAK,CAACqC,SAAS,CAACF,QAAQ,CAAC,EAAEG,eAAe,CAC7C,QAAQ;UAAE;UACVJ,KACF,CAAC;QACH;MACF,CAAC,CAAC;MACF,MAAMK,OAAO,CAACC,GAAG,CAACb,cAAc,CAAC;IACnC,CAAC,MAAM;MACL,KAAK,MAAMc,OAAO,IAAIjB,iBAAiB,EAAE;QACvC,MAAM,IAAI,CAACxB,KAAK,CAAC0C,oBAAoB,CAACD,OAAO,EAAYf,OAAO,CAAC;MACnE;IACF;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -27,7 +27,10 @@ import { createObjectSet } from "../objectSet/createObjectSet.js";
|
|
|
27
27
|
export function hydrateObjectSetFromRid(client, definition, rid) {
|
|
28
28
|
return createObjectSet(definition, client[additionalContext], {
|
|
29
29
|
type: "intersect",
|
|
30
|
-
objectSets: [{
|
|
30
|
+
objectSets: [definition.type === "interface" ? {
|
|
31
|
+
type: "interfaceBase",
|
|
32
|
+
interfaceType: definition.apiName
|
|
33
|
+
} : {
|
|
31
34
|
type: "base",
|
|
32
35
|
objectType: definition.apiName
|
|
33
36
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydrateObjectSetFromRid.js","names":["additionalContext","createObjectSet","hydrateObjectSetFromRid","client","definition","rid","type","objectSets","
|
|
1
|
+
{"version":3,"file":"hydrateObjectSetFromRid.js","names":["additionalContext","createObjectSet","hydrateObjectSetFromRid","client","definition","rid","type","objectSets","interfaceType","apiName","objectType","reference"],"sources":["hydrateObjectSetFromRid.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 { ObjectOrInterfaceDefinition, ObjectSet } from \"@osdk/api\";\nimport type { Client } from \"../Client.js\";\nimport { additionalContext } from \"../Client.js\";\nimport { createObjectSet } from \"../objectSet/createObjectSet.js\";\n\n/**\n * Creates an OSDK object set from an object set RID.\n * @param client - An OSDK client.\n * @param definition - An OSDK object or interface definition.\n * @param rid - The RID of an object set.\n * @returns An OSDK object set.\n */\nexport function hydrateObjectSetFromRid<T extends ObjectOrInterfaceDefinition>(\n client: Client,\n definition: T,\n rid: string,\n): ObjectSet<T> {\n return createObjectSet(\n definition,\n client[additionalContext],\n {\n type: \"intersect\",\n objectSets: [\n definition.type === \"interface\"\n ? { type: \"interfaceBase\", interfaceType: definition.apiName }\n : {\n type: \"base\",\n objectType: definition.apiName,\n },\n {\n type: \"reference\",\n reference: rid,\n },\n ],\n },\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,iBAAiB,QAAQ,cAAc;AAChD,SAASC,eAAe,QAAQ,iCAAiC;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CACrCC,MAAc,EACdC,UAAa,EACbC,GAAW,EACG;EACd,OAAOJ,eAAe,CACpBG,UAAU,EACVD,MAAM,CAACH,iBAAiB,CAAC,EACzB;IACEM,IAAI,EAAE,WAAW;IACjBC,UAAU,EAAE,CACVH,UAAU,CAACE,IAAI,KAAK,WAAW,GAC3B;MAAEA,IAAI,EAAE,eAAe;MAAEE,aAAa,EAAEJ,UAAU,CAACK;IAAQ,CAAC,GAC5D;MACAH,IAAI,EAAE,MAAM;MACZI,UAAU,EAAEN,UAAU,CAACK;IACzB,CAAC,EACH;MACEH,IAAI,EAAE,WAAW;MACjBK,SAAS,EAAEN;IACb,CAAC;EAEL,CACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
export const USER_AGENT = `osdk-client/${"2.3.
|
|
18
|
-
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.3.
|
|
17
|
+
export const USER_AGENT = `osdk-client/${"2.3.3"}`;
|
|
18
|
+
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.3.3"}`;
|
|
19
19
|
//# sourceMappingURL=UserAgent.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkQ7SFCCGT_cjs = require('./chunk-Q7SFCCGT.cjs');
|
|
3
4
|
var shared_net_errors = require('@osdk/shared.net.errors');
|
|
4
5
|
var shared_net_fetch = require('@osdk/shared.net.fetch');
|
|
5
6
|
var invariant6 = require('tiny-invariant');
|
|
@@ -11,15 +12,9 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
11
12
|
var invariant6__default = /*#__PURE__*/_interopDefault(invariant6);
|
|
12
13
|
var WebSocket__default = /*#__PURE__*/_interopDefault(WebSocket);
|
|
13
14
|
|
|
14
|
-
var __defProp = Object.defineProperty;
|
|
15
|
-
var __export = (target, all) => {
|
|
16
|
-
for (var name in all)
|
|
17
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
|
-
};
|
|
19
|
-
|
|
20
15
|
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
|
|
21
16
|
var Action_exports = {};
|
|
22
|
-
__export(Action_exports, {
|
|
17
|
+
chunkQ7SFCCGT_cjs.__export(Action_exports, {
|
|
23
18
|
apply: () => apply,
|
|
24
19
|
applyAsync: () => applyAsync,
|
|
25
20
|
applyBatch: () => applyBatch
|
|
@@ -106,7 +101,7 @@ function applyBatch($ctx, ...args) {
|
|
|
106
101
|
|
|
107
102
|
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
|
|
108
103
|
var ActionTypeV2_exports = {};
|
|
109
|
-
__export(ActionTypeV2_exports, {
|
|
104
|
+
chunkQ7SFCCGT_cjs.__export(ActionTypeV2_exports, {
|
|
110
105
|
get: () => get,
|
|
111
106
|
getByRid: () => getByRid,
|
|
112
107
|
list: () => list
|
|
@@ -126,7 +121,7 @@ function getByRid($ctx, ...args) {
|
|
|
126
121
|
|
|
127
122
|
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js
|
|
128
123
|
var Attachment_exports = {};
|
|
129
|
-
__export(Attachment_exports, {
|
|
124
|
+
chunkQ7SFCCGT_cjs.__export(Attachment_exports, {
|
|
130
125
|
get: () => get2,
|
|
131
126
|
read: () => read,
|
|
132
127
|
upload: () => upload
|
|
@@ -151,7 +146,7 @@ function get2($ctx, ...args) {
|
|
|
151
146
|
|
|
152
147
|
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js
|
|
153
148
|
var MediaReferenceProperty_exports = {};
|
|
154
|
-
__export(MediaReferenceProperty_exports, {
|
|
149
|
+
chunkQ7SFCCGT_cjs.__export(MediaReferenceProperty_exports, {
|
|
155
150
|
getMediaContent: () => getMediaContent,
|
|
156
151
|
getMediaMetadata: () => getMediaMetadata,
|
|
157
152
|
upload: () => upload2,
|
|
@@ -176,7 +171,7 @@ function uploadMedia($ctx, ...args) {
|
|
|
176
171
|
|
|
177
172
|
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
|
|
178
173
|
var ObjectTypeV2_exports = {};
|
|
179
|
-
__export(ObjectTypeV2_exports, {
|
|
174
|
+
chunkQ7SFCCGT_cjs.__export(ObjectTypeV2_exports, {
|
|
180
175
|
get: () => get3,
|
|
181
176
|
getFullMetadata: () => getFullMetadata,
|
|
182
177
|
getOutgoingLinkType: () => getOutgoingLinkType,
|
|
@@ -206,7 +201,7 @@ function getOutgoingLinkType($ctx, ...args) {
|
|
|
206
201
|
|
|
207
202
|
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
|
|
208
203
|
var OntologyInterface_exports = {};
|
|
209
|
-
__export(OntologyInterface_exports, {
|
|
204
|
+
chunkQ7SFCCGT_cjs.__export(OntologyInterface_exports, {
|
|
210
205
|
aggregate: () => aggregate,
|
|
211
206
|
get: () => get4,
|
|
212
207
|
list: () => list3,
|
|
@@ -231,7 +226,7 @@ function aggregate($ctx, ...args) {
|
|
|
231
226
|
|
|
232
227
|
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js
|
|
233
228
|
var OntologyObjectSet_exports = {};
|
|
234
|
-
__export(OntologyObjectSet_exports, {
|
|
229
|
+
chunkQ7SFCCGT_cjs.__export(OntologyObjectSet_exports, {
|
|
235
230
|
aggregate: () => aggregate2,
|
|
236
231
|
createTemporary: () => createTemporary,
|
|
237
232
|
get: () => get5,
|
|
@@ -266,7 +261,7 @@ function aggregate2($ctx, ...args) {
|
|
|
266
261
|
|
|
267
262
|
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
|
|
268
263
|
var Query_exports = {};
|
|
269
|
-
__export(Query_exports, {
|
|
264
|
+
chunkQ7SFCCGT_cjs.__export(Query_exports, {
|
|
270
265
|
execute: () => execute
|
|
271
266
|
});
|
|
272
267
|
var _execute = [1, "/v2/ontologies/{0}/queries/{1}/execute", 3];
|
|
@@ -276,7 +271,7 @@ function execute($ctx, ...args) {
|
|
|
276
271
|
|
|
277
272
|
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
|
|
278
273
|
var QueryType_exports = {};
|
|
279
|
-
__export(QueryType_exports, {
|
|
274
|
+
chunkQ7SFCCGT_cjs.__export(QueryType_exports, {
|
|
280
275
|
get: () => get6,
|
|
281
276
|
list: () => list4
|
|
282
277
|
});
|
|
@@ -291,7 +286,7 @@ function get6($ctx, ...args) {
|
|
|
291
286
|
|
|
292
287
|
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
|
|
293
288
|
var TimeSeriesPropertyV2_exports = {};
|
|
294
|
-
__export(TimeSeriesPropertyV2_exports, {
|
|
289
|
+
chunkQ7SFCCGT_cjs.__export(TimeSeriesPropertyV2_exports, {
|
|
295
290
|
getFirstPoint: () => getFirstPoint,
|
|
296
291
|
getLastPoint: () => getLastPoint,
|
|
297
292
|
streamPoints: () => streamPoints
|
|
@@ -311,7 +306,7 @@ function streamPoints($ctx, ...args) {
|
|
|
311
306
|
|
|
312
307
|
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.24.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
|
|
313
308
|
var TimeSeriesValueBankProperty_exports = {};
|
|
314
|
-
__export(TimeSeriesValueBankProperty_exports, {
|
|
309
|
+
chunkQ7SFCCGT_cjs.__export(TimeSeriesValueBankProperty_exports, {
|
|
315
310
|
getLatestValue: () => getLatestValue,
|
|
316
311
|
streamValues: () => streamValues
|
|
317
312
|
});
|
|
@@ -1692,5 +1687,5 @@ exports.hydrateAttachmentFromRidInternal = hydrateAttachmentFromRidInternal;
|
|
|
1692
1687
|
exports.isObjectSet = isObjectSet;
|
|
1693
1688
|
exports.isWireObjectSet = isWireObjectSet;
|
|
1694
1689
|
exports.symbolClientContext = symbolClientContext;
|
|
1695
|
-
//# sourceMappingURL=chunk-
|
|
1696
|
-
//# sourceMappingURL=chunk-
|
|
1690
|
+
//# sourceMappingURL=chunk-ERTC3NWZ.cjs.map
|
|
1691
|
+
//# sourceMappingURL=chunk-ERTC3NWZ.cjs.map
|