@osdk/client 2.1.0-beta.1 → 2.1.0-beta.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 +30 -0
- package/build/browser/Client.d.ts +5 -2
- package/build/browser/Client.d.ts.map +1 -1
- package/build/browser/Client.js +2 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/MinimalClientContext.d.ts +1 -1
- package/build/browser/MinimalClientContext.d.ts.map +1 -1
- package/build/browser/createClient.d.ts +1 -1
- package/build/browser/createClient.d.ts.map +1 -1
- package/build/browser/createClient.js +10 -2
- package/build/browser/createClient.js.map +1 -1
- package/build/browser/createGeotimeSeriesProperty.d.ts +1 -1
- package/build/browser/createGeotimeSeriesProperty.d.ts.map +1 -1
- package/build/browser/createGeotimeSeriesProperty.js +4 -1
- package/build/browser/createGeotimeSeriesProperty.js.map +1 -1
- package/build/browser/createMinimalClient.js +2 -2
- package/build/browser/createMinimalClient.js.map +1 -1
- package/build/browser/createPlatformClient.d.ts +1 -1
- package/build/browser/createPlatformClient.d.ts.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +7 -1
- package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects.test.js +10 -10
- package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
- package/build/browser/objectSet/ObjectSetListenerWebsocket.js +40 -12
- package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
- package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js +104 -19
- package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
- package/build/browser/objectSet/createObjectSet.js +1 -1
- package/build/browser/objectSet/createObjectSet.js.map +1 -1
- package/build/browser/ontology/makeConjureContext.d.ts +1 -1
- package/build/browser/ontology/makeConjureContext.d.ts.map +1 -1
- package/build/browser/queries/applyQuery.js +1 -1
- package/build/browser/queries/applyQuery.js.map +1 -1
- package/build/browser/queries/queries.test.js +30 -2
- package/build/browser/queries/queries.test.js.map +1 -1
- package/build/browser/util/UserAgent.js +1 -1
- package/build/esm/Client.d.ts +5 -2
- package/build/esm/Client.d.ts.map +1 -1
- package/build/esm/Client.js +2 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/MinimalClientContext.d.ts +1 -1
- package/build/esm/MinimalClientContext.d.ts.map +1 -1
- package/build/esm/createClient.d.ts +1 -1
- package/build/esm/createClient.d.ts.map +1 -1
- package/build/esm/createClient.js +10 -2
- package/build/esm/createClient.js.map +1 -1
- package/build/esm/createGeotimeSeriesProperty.d.ts +1 -1
- package/build/esm/createGeotimeSeriesProperty.d.ts.map +1 -1
- package/build/esm/createGeotimeSeriesProperty.js +4 -1
- package/build/esm/createGeotimeSeriesProperty.js.map +1 -1
- package/build/esm/createMinimalClient.js +2 -2
- package/build/esm/createMinimalClient.js.map +1 -1
- package/build/esm/createPlatformClient.d.ts +1 -1
- package/build/esm/createPlatformClient.d.ts.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +7 -1
- package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects.test.js +10 -10
- package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
- package/build/esm/objectSet/ObjectSetListenerWebsocket.js +40 -12
- package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
- package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js +104 -19
- package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
- package/build/esm/objectSet/createObjectSet.js +1 -1
- package/build/esm/objectSet/createObjectSet.js.map +1 -1
- package/build/esm/ontology/makeConjureContext.d.ts +1 -1
- package/build/esm/ontology/makeConjureContext.d.ts.map +1 -1
- package/build/esm/queries/applyQuery.js +1 -1
- package/build/esm/queries/applyQuery.js.map +1 -1
- package/build/esm/queries/queries.test.js +30 -2
- package/build/esm/queries/queries.test.js.map +1 -1
- package/build/esm/util/UserAgent.js +1 -1
- package/package.json +12 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @osdk/client
|
|
2
2
|
|
|
3
|
+
## 2.1.0-beta.3
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 05febf4: Adds Reference Update support in subscribe
|
|
8
|
+
- a06ec35: Fixes the lastFetchedValue on a Geotime Series property from reference updates
|
|
9
|
+
- 3703d81: Changed shared context to a version less error prone
|
|
10
|
+
- 6f50516: Fix bug where object return types in a query were not properly mapped when wrapped in a struct.
|
|
11
|
+
- 09eaf24: Update to latest platform sdks
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [05febf4]
|
|
16
|
+
- Updated dependencies [3703d81]
|
|
17
|
+
- Updated dependencies [b79becf]
|
|
18
|
+
- Updated dependencies [09eaf24]
|
|
19
|
+
- @osdk/api@2.1.0-beta.3
|
|
20
|
+
- @osdk/shared.client.impl@1.1.0-beta.0
|
|
21
|
+
- @osdk/generator-converters@2.1.0-beta.3
|
|
22
|
+
- @osdk/client.unstable@2.1.0-beta.3
|
|
23
|
+
|
|
24
|
+
## 2.1.0-beta.2
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [7d777eb]
|
|
29
|
+
- @osdk/generator-converters@2.1.0-beta.2
|
|
30
|
+
- @osdk/client.unstable@2.1.0-beta.2
|
|
31
|
+
- @osdk/api@2.1.0-beta.2
|
|
32
|
+
|
|
3
33
|
## 2.1.0-beta.1
|
|
4
34
|
|
|
5
35
|
### Minor Changes
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ActionDefinition, ActionMetadata, CompileTimeMetadata, InterfaceDefinition, InterfaceMetadata, ObjectMetadata, ObjectOrInterfaceDefinition, ObjectSet, ObjectTypeDefinition, Osdk, QueryDefinition, QueryMetadata, VersionBound } from "@osdk/api";
|
|
2
2
|
import type { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks, __EXPERIMENTAL__NOT_SUPPORTED_YET__preexistingObjectSet, MinimalObjectSet } from "@osdk/api/unstable";
|
|
3
|
-
import type { SharedClient } from "@osdk/shared.client";
|
|
3
|
+
import type { SharedClient as OldSharedClient } from "@osdk/shared.client";
|
|
4
|
+
import type { SharedClient } from "@osdk/shared.client2";
|
|
4
5
|
import type { BulkLinkResult } from "./__unstable/createBulkLinksAsyncIterFactory.js";
|
|
5
6
|
import type { ActionSignatureFromDef } from "./actions/applyAction.js";
|
|
6
7
|
import type { MinimalClient } from "./MinimalClientContext.js";
|
|
@@ -9,7 +10,7 @@ import type { SatisfiesSemver } from "./SatisfiesSemver.js";
|
|
|
9
10
|
export type CheckVersionBound<Q> = Q extends VersionBound<infer V> ? (SatisfiesSemver<V, MaxOsdkVersion> extends true ? Q : Q & {
|
|
10
11
|
[ErrorMessage]: `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;
|
|
11
12
|
}) : Q;
|
|
12
|
-
export interface Client extends SharedClient
|
|
13
|
+
export interface Client extends SharedClient, OldSharedClient {
|
|
13
14
|
<Q extends ObjectTypeDefinition>(o: Q): unknown extends CompileTimeMetadata<Q>["objectSet"] ? ObjectSet<Q> : CompileTimeMetadata<Q>["objectSet"];
|
|
14
15
|
<Q extends (InterfaceDefinition)>(o: Q): unknown extends CompileTimeMetadata<Q>["objectSet"] ? MinimalObjectSet<Q> : CompileTimeMetadata<Q>["objectSet"];
|
|
15
16
|
<Q extends ActionDefinition<any>>(o: Q): ActionSignatureFromDef<Q>;
|
|
@@ -31,7 +32,9 @@ export interface Client extends SharedClient<MinimalClient> {
|
|
|
31
32
|
* @alpha
|
|
32
33
|
*/
|
|
33
34
|
readonly [__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks]: <T extends ObjectOrInterfaceDefinition>(objs: Osdk<T>[], links: string[]) => AsyncGenerator<BulkLinkResult, void, undefined>;
|
|
35
|
+
[additionalContext]: MinimalClient;
|
|
34
36
|
}
|
|
37
|
+
export declare const additionalContext: unique symbol;
|
|
35
38
|
declare const MaxOsdkVersion = "2.1.0";
|
|
36
39
|
export type MaxOsdkVersion = typeof MaxOsdkVersion;
|
|
37
40
|
declare const ErrorMessage: unique symbol;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../src/Client.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,2BAA2B,EAC3B,SAAS,EACT,oBAAoB,EACpB,IAAI,EACJ,eAAe,EACf,aAAa,EACb,YAAY,EACb,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACV,+CAA+C,EAC/C,uDAAuD,EACvD,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../src/Client.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,2BAA2B,EAC3B,SAAS,EACT,oBAAoB,EACpB,IAAI,EACJ,eAAe,EACf,aAAa,EACb,YAAY,EACb,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACV,+CAA+C,EAC/C,uDAAuD,EACvD,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iDAAiD,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CACX,CAAC,SAAS,CACN,oBAAoB,GACpB,mBAAmB,GACnB,gBAAgB,CAAC,GAAG,CAAC,GACrB,eAAe,CAAC,GAAG,CAAC,CACvB,EACD,CAAC,EAAE,CAAC,GAAG,OAAO,CACd,CAAC,SAAS,oBAAoB,GAAG,cAAc,GAC3C,CAAC,SAAS,mBAAmB,GAAG,iBAAiB,GACjD,CAAC,SAAS,gBAAgB,CAAC,GAAG,CAAC,GAAG,cAAc,GAChD,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,GAAG,aAAa,GAC9C,KAAK,CACV,CAAC;IAEF;;;;;;OAMG;IACH,QAAQ,CAAC,CAAC,uDAAuD,CAAC,EAAE,CAClE,CAAC,SAAS,2BAA2B,EAErC,IAAI,EAAE,CAAC,EACP,GAAG,EAAE,MAAM,KACR,SAAS,CAAC,CAAC,CAAC,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,CAAC,CAAC,+CAA+C,CAAC,EAAE,CAC1D,CAAC,SAAS,2BAA2B,EAErC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EACf,KAAK,EAAE,MAAM,EAAE,KACZ,cAAc,CAAC,cAAc,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IAErD,CAAC,iBAAiB,CAAC,EAAE,aAAa,CAAC;CACpC;AAGD,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAG7D,QAAA,MAAM,cAAc,UAAU,CAAC;AAE/B,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AACnD,QAAA,MAAM,YAAY,eAAyB,CAAC"}
|
package/build/browser/Client.js
CHANGED
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
// DO NOT EXPORT FROM PACKAGE
|
|
17
|
+
export const additionalContext = Symbol("additionalContext");
|
|
16
18
|
// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.
|
|
17
19
|
const MaxOsdkVersion = "2.1.0";
|
|
18
20
|
const ErrorMessage = Symbol("ErrorMessage");
|
|
19
|
-
export {};
|
|
20
21
|
//# sourceMappingURL=Client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.js","names":["
|
|
1
|
+
{"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.js"],"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// DO NOT EXPORT FROM PACKAGE\nexport const additionalContext = Symbol(\"additionalContext\");\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.1.0\";\nconst ErrorMessage = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,iBAAiB,GAAGC,MAAM,CAAC,mBAAmB,CAAC;AAC5D;AACA,MAAMC,cAAc,GAAG,OAAO;AAC9B,MAAMC,YAAY,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SharedClientContext } from "@osdk/shared.
|
|
1
|
+
import type { SharedClientContext } from "@osdk/shared.client2";
|
|
2
2
|
import type { Logger } from "./Logger.js";
|
|
3
3
|
import type { OntologyProvider } from "./ontology/OntologyProvider.js";
|
|
4
4
|
declare const tag: unique symbol;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MinimalClientContext.d.ts","sourceRoot":"","sources":["../../src/MinimalClientContext.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"MinimalClientContext.d.ts","sourceRoot":"","sources":["../../src/MinimalClientContext.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,OAAO,CAAC,MAAM,GAAG,EAAE,OAAO,MAAM,CAAC;AAEjC,MAAM,MAAM,cAAc,GAAG,EAAE,GAAG;IAAE,QAAQ,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AAE3D,MAAM,MAAM,cAAc,GAAG;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,WAAW,aAAc,SAAQ,mBAAmB;IACxD,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACtC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,cAAc,EAAE,cAAc,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;CAChC;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,qBAAqB,CAAC;IAChC,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACvC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Client } from "./Client.js";
|
|
2
2
|
import type { Logger } from "./Logger.js";
|
|
3
3
|
export declare const createClient: (baseUrl: string, ontologyRid: string | Promise<string>, tokenProvider: () => Promise<string>, options?: {
|
|
4
4
|
logger?: Logger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createClient.d.ts","sourceRoot":"","sources":["../../src/createClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createClient.d.ts","sourceRoot":"","sources":["../../src/createClient.ts"],"names":[],"mappings":"AAkCA,OAAO,EAAqB,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAG7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AA2J1C,eAAO,MAAM,YAAY,gFA/GF,OAAO,CAAC,MAAM,CAAC;aAChB,MAAM;4DAiH3B,CAAC"}
|
|
@@ -14,9 +14,11 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks, __EXPERIMENTAL__NOT_SUPPORTED_YET__preexistingObjectSet } from "@osdk/api/unstable";
|
|
17
|
-
import { symbolClientContext } from "@osdk/shared.client";
|
|
17
|
+
import { symbolClientContext as oldSymbolClientContext } from "@osdk/shared.client";
|
|
18
|
+
import { symbolClientContext } from "@osdk/shared.client2";
|
|
18
19
|
import { createBulkLinksAsyncIterFactory } from "./__unstable/createBulkLinksAsyncIterFactory.js";
|
|
19
20
|
import { applyAction } from "./actions/applyAction.js";
|
|
21
|
+
import { additionalContext } from "./Client.js";
|
|
20
22
|
import { createMinimalClient } from "./createMinimalClient.js";
|
|
21
23
|
import { fetchMetadataInternal } from "./fetchMetadata.js";
|
|
22
24
|
import { createObjectSet } from "./objectSet/createObjectSet.js";
|
|
@@ -69,15 +71,21 @@ baseUrl, ontologyRid, tokenProvider, options = undefined, fetchFn = fetch) {
|
|
|
69
71
|
throw new Error("not implemented");
|
|
70
72
|
}
|
|
71
73
|
}, {
|
|
74
|
+
[oldSymbolClientContext]: {
|
|
75
|
+
value: clientCtx
|
|
76
|
+
},
|
|
72
77
|
[symbolClientContext]: {
|
|
73
78
|
value: clientCtx
|
|
74
79
|
},
|
|
80
|
+
[additionalContext]: {
|
|
81
|
+
value: clientCtx
|
|
82
|
+
},
|
|
75
83
|
[__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks]: {
|
|
76
84
|
get: () => createBulkLinksAsyncIterFactory(clientCtx)
|
|
77
85
|
},
|
|
78
86
|
[__EXPERIMENTAL__NOT_SUPPORTED_YET__preexistingObjectSet]: {
|
|
79
87
|
get: () => (definition, rid) => {
|
|
80
|
-
return createObjectSet(definition, client[
|
|
88
|
+
return createObjectSet(definition, client[additionalContext], {
|
|
81
89
|
type: "intersect",
|
|
82
90
|
objectSets: [{
|
|
83
91
|
type: "base",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createClient.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks","__EXPERIMENTAL__NOT_SUPPORTED_YET__preexistingObjectSet","symbolClientContext","createBulkLinksAsyncIterFactory","applyAction","createMinimalClient","fetchMetadataInternal","createObjectSet","applyQuery","ActionInvoker","constructor","clientCtx","actionDef","bind","undefined","batchApplyAction","QueryInvoker","queryDef","executeFunction","createClientInternal","objectSetFactory","baseUrl","ontologyRid","tokenProvider","options","fetchFn","fetch","startsWith","Error","then","fetchMetadata","client","Object","defineProperties","o","type","value","get","definition","rid","objectSets","objectType","apiName","reference","createClient"],"sources":["createClient.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks, __EXPERIMENTAL__NOT_SUPPORTED_YET__preexistingObjectSet, } from \"@osdk/api/unstable\";\nimport { symbolClientContext } from \"@osdk/shared.client\";\nimport { createBulkLinksAsyncIterFactory } from \"./__unstable/createBulkLinksAsyncIterFactory.js\";\nimport { applyAction } from \"./actions/applyAction.js\";\nimport { createMinimalClient } from \"./createMinimalClient.js\";\nimport { fetchMetadataInternal } from \"./fetchMetadata.js\";\nimport { createObjectSet } from \"./objectSet/createObjectSet.js\";\nimport { applyQuery } from \"./queries/applyQuery.js\";\nclass ActionInvoker {\n constructor(clientCtx, actionDef) {\n // We type the property as a generic function as binding `applyAction`\n // doesn't return a type thats all that useful anyway\n // The implements covers us for the most part here as this exact type doesn't\n // escape this file\n this.applyAction = applyAction.bind(undefined, clientCtx, actionDef);\n this.batchApplyAction = applyAction.bind(undefined, clientCtx, actionDef);\n }\n applyAction;\n batchApplyAction;\n}\nclass QueryInvoker {\n constructor(clientCtx, queryDef) {\n this.executeFunction = applyQuery.bind(undefined, clientCtx, queryDef);\n }\n executeFunction;\n}\n/** @internal */\nexport function createClientInternal(objectSetFactory, // first so i can bind\nbaseUrl, ontologyRid, tokenProvider, options = undefined, fetchFn = fetch) {\n if (typeof ontologyRid === \"string\") {\n if (!ontologyRid.startsWith(\"ri.\")) {\n throw new Error(\"Invalid ontology RID\");\n }\n }\n else {\n ontologyRid.then((ontologyRid) => {\n if (!ontologyRid.startsWith(\"ri.\")) {\n throw new Error(\"Invalid ontology RID\");\n }\n });\n }\n const clientCtx = createMinimalClient({ ontologyRid }, baseUrl, tokenProvider, options, fetchFn, objectSetFactory);\n function clientFn(o) {\n if (o.type === \"object\" || o.type === \"interface\") {\n return objectSetFactory(o, clientCtx);\n }\n else if (o.type === \"action\") {\n return new ActionInvoker(clientCtx, o); // then as any for dealing with the conditional return value\n }\n else if (o.type === \"query\") {\n return new QueryInvoker(clientCtx, o);\n }\n else {\n throw new Error(\"not implemented\");\n }\n }\n const fetchMetadata = fetchMetadataInternal.bind(undefined, clientCtx);\n const client = Object.defineProperties(clientFn, {\n [symbolClientContext]: {\n value: clientCtx,\n },\n [__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks]: {\n get: () => createBulkLinksAsyncIterFactory(clientCtx),\n },\n [__EXPERIMENTAL__NOT_SUPPORTED_YET__preexistingObjectSet]: {\n get: () => (definition, rid) => {\n return createObjectSet(definition, client[
|
|
1
|
+
{"version":3,"file":"createClient.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks","__EXPERIMENTAL__NOT_SUPPORTED_YET__preexistingObjectSet","symbolClientContext","oldSymbolClientContext","createBulkLinksAsyncIterFactory","applyAction","additionalContext","createMinimalClient","fetchMetadataInternal","createObjectSet","applyQuery","ActionInvoker","constructor","clientCtx","actionDef","bind","undefined","batchApplyAction","QueryInvoker","queryDef","executeFunction","createClientInternal","objectSetFactory","baseUrl","ontologyRid","tokenProvider","options","fetchFn","fetch","startsWith","Error","then","fetchMetadata","client","Object","defineProperties","o","type","value","get","definition","rid","objectSets","objectType","apiName","reference","createClient"],"sources":["createClient.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks, __EXPERIMENTAL__NOT_SUPPORTED_YET__preexistingObjectSet, } from \"@osdk/api/unstable\";\nimport { symbolClientContext as oldSymbolClientContext } from \"@osdk/shared.client\";\nimport { symbolClientContext } from \"@osdk/shared.client2\";\nimport { createBulkLinksAsyncIterFactory } from \"./__unstable/createBulkLinksAsyncIterFactory.js\";\nimport { applyAction } from \"./actions/applyAction.js\";\nimport { additionalContext } from \"./Client.js\";\nimport { createMinimalClient } from \"./createMinimalClient.js\";\nimport { fetchMetadataInternal } from \"./fetchMetadata.js\";\nimport { createObjectSet } from \"./objectSet/createObjectSet.js\";\nimport { applyQuery } from \"./queries/applyQuery.js\";\nclass ActionInvoker {\n constructor(clientCtx, actionDef) {\n // We type the property as a generic function as binding `applyAction`\n // doesn't return a type thats all that useful anyway\n // The implements covers us for the most part here as this exact type doesn't\n // escape this file\n this.applyAction = applyAction.bind(undefined, clientCtx, actionDef);\n this.batchApplyAction = applyAction.bind(undefined, clientCtx, actionDef);\n }\n applyAction;\n batchApplyAction;\n}\nclass QueryInvoker {\n constructor(clientCtx, queryDef) {\n this.executeFunction = applyQuery.bind(undefined, clientCtx, queryDef);\n }\n executeFunction;\n}\n/** @internal */\nexport function createClientInternal(objectSetFactory, // first so i can bind\nbaseUrl, ontologyRid, tokenProvider, options = undefined, fetchFn = fetch) {\n if (typeof ontologyRid === \"string\") {\n if (!ontologyRid.startsWith(\"ri.\")) {\n throw new Error(\"Invalid ontology RID\");\n }\n }\n else {\n ontologyRid.then((ontologyRid) => {\n if (!ontologyRid.startsWith(\"ri.\")) {\n throw new Error(\"Invalid ontology RID\");\n }\n });\n }\n const clientCtx = createMinimalClient({ ontologyRid }, baseUrl, tokenProvider, options, fetchFn, objectSetFactory);\n function clientFn(o) {\n if (o.type === \"object\" || o.type === \"interface\") {\n return objectSetFactory(o, clientCtx);\n }\n else if (o.type === \"action\") {\n return new ActionInvoker(clientCtx, o); // then as any for dealing with the conditional return value\n }\n else if (o.type === \"query\") {\n return new QueryInvoker(clientCtx, o);\n }\n else {\n throw new Error(\"not implemented\");\n }\n }\n const fetchMetadata = fetchMetadataInternal.bind(undefined, clientCtx);\n const client = Object.defineProperties(clientFn, {\n [oldSymbolClientContext]: {\n value: clientCtx,\n },\n [symbolClientContext]: {\n value: clientCtx,\n },\n [additionalContext]: {\n value: clientCtx,\n },\n [__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks]: {\n get: () => createBulkLinksAsyncIterFactory(clientCtx),\n },\n [__EXPERIMENTAL__NOT_SUPPORTED_YET__preexistingObjectSet]: {\n get: () => (definition, rid) => {\n return createObjectSet(definition, client[additionalContext], {\n type: \"intersect\",\n objectSets: [\n {\n type: \"base\",\n objectType: definition.apiName,\n },\n {\n type: \"reference\",\n reference: rid,\n },\n ],\n });\n },\n },\n fetchMetadata: {\n value: fetchMetadata,\n },\n });\n return client;\n}\nexport const createClient = createClientInternal.bind(undefined, createObjectSet);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,+CAA+C,EAAEC,uDAAuD,QAAS,oBAAoB;AAC9I,SAASC,mBAAmB,IAAIC,sBAAsB,QAAQ,qBAAqB;AACnF,SAASD,mBAAmB,QAAQ,sBAAsB;AAC1D,SAASE,+BAA+B,QAAQ,iDAAiD;AACjG,SAASC,WAAW,QAAQ,0BAA0B;AACtD,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,mBAAmB,QAAQ,0BAA0B;AAC9D,SAASC,qBAAqB,QAAQ,oBAAoB;AAC1D,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SAASC,UAAU,QAAQ,yBAAyB;AACpD,MAAMC,aAAa,CAAC;EAChBC,WAAWA,CAACC,SAAS,EAAEC,SAAS,EAAE;IAC9B;IACA;IACA;IACA;IACA,IAAI,CAACT,WAAW,GAAGA,WAAW,CAACU,IAAI,CAACC,SAAS,EAAEH,SAAS,EAAEC,SAAS,CAAC;IACpE,IAAI,CAACG,gBAAgB,GAAGZ,WAAW,CAACU,IAAI,CAACC,SAAS,EAAEH,SAAS,EAAEC,SAAS,CAAC;EAC7E;EACAT,WAAW;EACXY,gBAAgB;AACpB;AACA,MAAMC,YAAY,CAAC;EACfN,WAAWA,CAACC,SAAS,EAAEM,QAAQ,EAAE;IAC7B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AAK,OAAO,EAAE;MACzB,OAAO,IAAInB,YAAY,CAACL,SAAS,EAAEuB,CAAC,CAAC;IACzC,CAAC,MACI;MACD,MAAM,IAAIN,KAAK,CAAC,iBAAiB,CAAC;IACtC;EACJ,CAAC,EAEgD;IAC7C,CAAC3B,sBAAsB,GAAG;MACtBmC,KAAK,EAAEzB;IACX,CAAC;IACD,CAACX,mBAAmB,GAAG;MACnBoC,KAAK,EAAEzB;IACX,CAAC;IACD,CAACP,iBAAiB,GAAG;MACjBgC,KAAK,EAAEzB;IACX,CAAC;IACD,CAACb,+CAA+C,GAAG;MAC/CuC,GAAG,EAAEA,CAAA,KAAMnC,+BAA+B,CAACS,SAAS;IACxD,CAAC;IACD,CAACZ,uDAAuD,GAAG;MACvDsC,GAAG,EAAEA,CAAA,KAAM,CAACC,UAAU,EAAEC,GAAG,KAAK;QAC5B,OAAOhC,eAAe,CAAC+B,UAAU,EAAEP,MAAM,CAAC3B,iBAAiB,CAAC,EAAE;UAC1D+B,IAAI,EAAE,WAAW;UACjBK,UAAU,EAAE,CACR;YACIL,IAAI,EAAE,MAAM;YACZM,UAAU,EAAEH,UAAU,CAACI;UAC3B,CAAC,EACD;YACIP,IAAI,EAAE,WAAW;YACjBQ,SAAS,EAAEJ;UACf,CAAC;QAET,CAAC,CAAC;MACN;IACJ,CAAC;IACDT,aAAa,EAAE;MACXM,KAAK,EAAEN;IACX;EACJ,CAAC,CAAC;EACF,OAAOC,MAAM;AACjB;AACA,OAAO,MAAMa,YAAY,GAAGzB,oBAAoB,CAACN,IAAI,CAACC,SAAS,EAAEP,eAAe,CAAC","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@ import type { MinimalClient } from "./MinimalClientContext.js";
|
|
|
3
3
|
export declare class GeotimeSeriesPropertyImpl<T extends GeoJSON.Point> implements GeotimeSeriesProperty<T> {
|
|
4
4
|
#private;
|
|
5
5
|
lastFetchedValue: TimeSeriesPoint<T> | undefined;
|
|
6
|
-
constructor(client: MinimalClient, objectApiName: string, primaryKey: any, propertyName: string);
|
|
6
|
+
constructor(client: MinimalClient, objectApiName: string, primaryKey: any, propertyName: string, initialValue?: TimeSeriesPoint<T>);
|
|
7
7
|
getLatestValue(): Promise<TimeSeriesPoint<T> | undefined>;
|
|
8
8
|
getAllValues(query?: TimeSeriesQuery): Promise<TimeSeriesPoint<T>[]>;
|
|
9
9
|
asyncIterValues(query?: TimeSeriesQuery): AsyncGenerator<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createGeotimeSeriesProperty.d.ts","sourceRoot":"","sources":["../../src/createGeotimeSeriesProperty.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EAEf,eAAe,EAChB,MAAM,WAAW,CAAC;AAInB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAO/D,qBAAa,yBAAyB,CAAC,CAAC,SAAS,OAAO,CAAC,KAAK,CAC5D,YAAW,qBAAqB,CAAC,CAAC,CAAC;;IAInC,gBAAgB,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;gBAG/C,MAAM,EAAE,aAAa,EACrB,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,GAAG,EACf,YAAY,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"createGeotimeSeriesProperty.d.ts","sourceRoot":"","sources":["../../src/createGeotimeSeriesProperty.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EAEf,eAAe,EAChB,MAAM,WAAW,CAAC;AAInB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAO/D,qBAAa,yBAAyB,CAAC,CAAC,SAAS,OAAO,CAAC,KAAK,CAC5D,YAAW,qBAAqB,CAAC,CAAC,CAAC;;IAInC,gBAAgB,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;gBAG/C,MAAM,EAAE,aAAa,EACrB,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,GAAG,EACf,YAAY,EAAE,MAAM,EACpB,YAAY,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC;IAStB,cAAc,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IAWzD,YAAY,CAAC,KAAK,CAAC,EAAE,eAAe;IASnC,eAAe,CAC3B,KAAK,CAAC,EAAE,eAAe;;;;CAgB1B"}
|
|
@@ -19,9 +19,12 @@ export class GeotimeSeriesPropertyImpl {
|
|
|
19
19
|
#triplet;
|
|
20
20
|
#client;
|
|
21
21
|
lastFetchedValue;
|
|
22
|
-
constructor(client, objectApiName, primaryKey, propertyName) {
|
|
22
|
+
constructor(client, objectApiName, primaryKey, propertyName, initialValue) {
|
|
23
23
|
this.#client = client;
|
|
24
24
|
this.#triplet = [objectApiName, primaryKey, propertyName];
|
|
25
|
+
if (initialValue != null) {
|
|
26
|
+
this.lastFetchedValue = initialValue;
|
|
27
|
+
}
|
|
25
28
|
}
|
|
26
29
|
async getLatestValue() {
|
|
27
30
|
const latestPointPromise = OntologiesV2.TimeSeriesValueBankProperties.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createGeotimeSeriesProperty.js","names":["OntologiesV2","asyncIterPointsHelper","getTimeRange","GeotimeSeriesPropertyImpl","triplet","client","lastFetchedValue","constructor","objectApiName","primaryKey","propertyName","getLatestValue","latestPointPromise","TimeSeriesValueBankProperties","ontologyRid","then","latestPoint","getAllValues","query","allPoints","point","asyncIterValues","push","streamPointsIterator","streamValues","range","timeseriesPoint"],"sources":["createGeotimeSeriesProperty.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport * as OntologiesV2 from \"@osdk/internal.foundry.ontologiesv2\";\nimport { asyncIterPointsHelper, getTimeRange } from \"./util/timeseriesUtils.js\";\nexport class GeotimeSeriesPropertyImpl {\n #triplet;\n #client;\n lastFetchedValue;\n constructor(client, objectApiName, primaryKey, propertyName) {\n this.#client = client;\n this.#triplet = [objectApiName, primaryKey, propertyName];\n }\n async getLatestValue() {\n const latestPointPromise = OntologiesV2.TimeSeriesValueBankProperties\n .getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);\n latestPointPromise.then(latestPoint => this.lastFetchedValue = latestPoint);\n return latestPointPromise;\n }\n async getAllValues(query) {\n const allPoints = [];\n for await (const point of this.asyncIterValues(query)) {\n allPoints.push(point);\n }\n return allPoints;\n }\n async *asyncIterValues(query) {\n const streamPointsIterator = await OntologiesV2\n .TimeSeriesValueBankProperties.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? { range: getTimeRange(query) } : {});\n for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {\n yield timeseriesPoint;\n }\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,YAAY,MAAM,qCAAqC;AACnE,SAASC,qBAAqB,EAAEC,YAAY,QAAQ,2BAA2B;AAC/E,OAAO,MAAMC,yBAAyB,CAAC;EACnC,CAACC,OAAO;EACR,CAACC,MAAM;EACPC,gBAAgB;EAChBC,WAAWA,CAACF,MAAM,EAAEG,aAAa,EAAEC,UAAU,EAAEC,YAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"createGeotimeSeriesProperty.js","names":["OntologiesV2","asyncIterPointsHelper","getTimeRange","GeotimeSeriesPropertyImpl","triplet","client","lastFetchedValue","constructor","objectApiName","primaryKey","propertyName","initialValue","getLatestValue","latestPointPromise","TimeSeriesValueBankProperties","ontologyRid","then","latestPoint","getAllValues","query","allPoints","point","asyncIterValues","push","streamPointsIterator","streamValues","range","timeseriesPoint"],"sources":["createGeotimeSeriesProperty.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport * as OntologiesV2 from \"@osdk/internal.foundry.ontologiesv2\";\nimport { asyncIterPointsHelper, getTimeRange } from \"./util/timeseriesUtils.js\";\nexport class GeotimeSeriesPropertyImpl {\n #triplet;\n #client;\n lastFetchedValue;\n constructor(client, objectApiName, primaryKey, propertyName, initialValue) {\n this.#client = client;\n this.#triplet = [objectApiName, primaryKey, propertyName];\n if (initialValue != null) {\n this.lastFetchedValue = initialValue;\n }\n }\n async getLatestValue() {\n const latestPointPromise = OntologiesV2.TimeSeriesValueBankProperties\n .getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);\n latestPointPromise.then(latestPoint => this.lastFetchedValue = latestPoint);\n return latestPointPromise;\n }\n async getAllValues(query) {\n const allPoints = [];\n for await (const point of this.asyncIterValues(query)) {\n allPoints.push(point);\n }\n return allPoints;\n }\n async *asyncIterValues(query) {\n const streamPointsIterator = await OntologiesV2\n .TimeSeriesValueBankProperties.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? { range: getTimeRange(query) } : {});\n for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {\n yield timeseriesPoint;\n }\n }\n}\n"],"mappings":"AAAA;AACA;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,IAAI,CAAC,CAACA,MAAM,CAACU,WAAW,EAAE,GAAG,IAAI,CAAC,CAACX,OAAO,EAAEe,KAAK,GAAG;MAAEO,KAAK,EAAExB,YAAY,CAACiB,KAAK;IAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5J,WAAW,MAAMQ,eAAe,IAAI1B,qBAAqB,CAACuB,oBAAoB,CAAC,EAAE;MAC7E,MAAMG,eAAe;IACzB;EACJ;AACJ","ignoreList":[]}
|
|
@@ -35,8 +35,8 @@ export function createMinimalClient(metadata, baseUrl, tokenProvider, options =
|
|
|
35
35
|
clientCacheKey: {},
|
|
36
36
|
requestContext: {}
|
|
37
37
|
};
|
|
38
|
-
return Object.assign(minimalClient, {
|
|
38
|
+
return Object.freeze(Object.assign(minimalClient, {
|
|
39
39
|
ontologyProvider: createStandardOntologyProviderFactory(options)(minimalClient)
|
|
40
|
-
});
|
|
40
|
+
}));
|
|
41
41
|
}
|
|
42
42
|
//# sourceMappingURL=createMinimalClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMinimalClient.js","names":["createSharedClientContext","createObjectSet","createStandardOntologyProviderFactory","USER_AGENT","createMinimalClient","metadata","baseUrl","tokenProvider","options","fetchFn","global","fetch","objectSetFactory","process","env","NODE_ENV","URL","e","hint","startsWith","Error","minimalClient","ontologyRid","logger","clientCacheKey","requestContext","Object","assign","ontologyProvider"],"sources":["createMinimalClient.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { createSharedClientContext } from \"@osdk/shared.client.impl\";\nimport { createObjectSet } from \"./objectSet/createObjectSet.js\";\nimport { createStandardOntologyProviderFactory, } from \"./ontology/StandardOntologyProvider.js\";\nimport { USER_AGENT } from \"./util/UserAgent.js\";\n/** @internal */\nexport function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = createObjectSet) {\n if (process?.env?.NODE_ENV !== \"production\") {\n try {\n new URL(baseUrl);\n }\n catch (e) {\n const hint = !baseUrl.startsWith(\"http://\") || !baseUrl.startsWith(\"https://\")\n ? \". Did you forget to add 'http://' or 'https://'?\"\n : \"\";\n throw new Error(`Invalid stack URL: ${baseUrl}${hint}`);\n }\n }\n const minimalClient = {\n ...createSharedClientContext(baseUrl, tokenProvider, USER_AGENT, fetchFn),\n objectSetFactory,\n ontologyRid: metadata.ontologyRid,\n logger: options.logger,\n clientCacheKey: {},\n requestContext: {},\n };\n return Object.assign(minimalClient, {\n ontologyProvider: createStandardOntologyProviderFactory(options)(minimalClient),\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,yBAAyB,QAAQ,0BAA0B;AACpE,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SAASC,qCAAqC,QAAS,wCAAwC;AAC/F,SAASC,UAAU,QAAQ,qBAAqB;AAChD;AACA,OAAO,SAASC,mBAAmBA,CAACC,QAAQ,EAAEC,OAAO,EAAEC,aAAa,EAAEC,OAAO,GAAG,CAAC,CAAC,EAAEC,OAAO,GAAGC,MAAM,CAACC,KAAK,EAAEC,gBAAgB,GAAGX,eAAe,EAAE;EAC5I,IAAIY,OAAO,EAAEC,GAAG,EAAEC,QAAQ,KAAK,YAAY,EAAE;IACzC,IAAI;MACA,IAAIC,GAAG,CAACV,OAAO,CAAC;IACpB,CAAC,CACD,OAAOW,CAAC,EAAE;MACN,MAAMC,IAAI,GAAG,CAACZ,OAAO,CAACa,UAAU,CAAC,SAAS,CAAC,IAAI,CAACb,OAAO,CAACa,UAAU,CAAC,UAAU,CAAC,GACxE,kDAAkD,GAClD,EAAE;MACR,MAAM,IAAIC,KAAK,CAAC,sBAAsBd,OAAO,GAAGY,IAAI,EAAE,CAAC;IAC3D;EACJ;EACA,MAAMG,aAAa,GAAG;IAClB,GAAGrB,yBAAyB,CAACM,OAAO,EAAEC,aAAa,EAAEJ,UAAU,EAAEM,OAAO,CAAC;IACzEG,gBAAgB;IAChBU,WAAW,EAAEjB,QAAQ,CAACiB,WAAW;IACjCC,MAAM,EAAEf,OAAO,CAACe,MAAM;IACtBC,cAAc,EAAE,CAAC,CAAC;IAClBC,cAAc,EAAE,CAAC;EACrB,CAAC;EACD,OAAOC,MAAM,CAACC,MAAM,
|
|
1
|
+
{"version":3,"file":"createMinimalClient.js","names":["createSharedClientContext","createObjectSet","createStandardOntologyProviderFactory","USER_AGENT","createMinimalClient","metadata","baseUrl","tokenProvider","options","fetchFn","global","fetch","objectSetFactory","process","env","NODE_ENV","URL","e","hint","startsWith","Error","minimalClient","ontologyRid","logger","clientCacheKey","requestContext","Object","freeze","assign","ontologyProvider"],"sources":["createMinimalClient.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { createSharedClientContext } from \"@osdk/shared.client.impl\";\nimport { createObjectSet } from \"./objectSet/createObjectSet.js\";\nimport { createStandardOntologyProviderFactory, } from \"./ontology/StandardOntologyProvider.js\";\nimport { USER_AGENT } from \"./util/UserAgent.js\";\n/** @internal */\nexport function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = createObjectSet) {\n if (process?.env?.NODE_ENV !== \"production\") {\n try {\n new URL(baseUrl);\n }\n catch (e) {\n const hint = !baseUrl.startsWith(\"http://\") || !baseUrl.startsWith(\"https://\")\n ? \". Did you forget to add 'http://' or 'https://'?\"\n : \"\";\n throw new Error(`Invalid stack URL: ${baseUrl}${hint}`);\n }\n }\n const minimalClient = {\n ...createSharedClientContext(baseUrl, tokenProvider, USER_AGENT, fetchFn),\n objectSetFactory,\n ontologyRid: metadata.ontologyRid,\n logger: options.logger,\n clientCacheKey: {},\n requestContext: {},\n };\n return Object.freeze(Object.assign(minimalClient, {\n ontologyProvider: createStandardOntologyProviderFactory(options)(minimalClient),\n }));\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,yBAAyB,QAAQ,0BAA0B;AACpE,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SAASC,qCAAqC,QAAS,wCAAwC;AAC/F,SAASC,UAAU,QAAQ,qBAAqB;AAChD;AACA,OAAO,SAASC,mBAAmBA,CAACC,QAAQ,EAAEC,OAAO,EAAEC,aAAa,EAAEC,OAAO,GAAG,CAAC,CAAC,EAAEC,OAAO,GAAGC,MAAM,CAACC,KAAK,EAAEC,gBAAgB,GAAGX,eAAe,EAAE;EAC5I,IAAIY,OAAO,EAAEC,GAAG,EAAEC,QAAQ,KAAK,YAAY,EAAE;IACzC,IAAI;MACA,IAAIC,GAAG,CAACV,OAAO,CAAC;IACpB,CAAC,CACD,OAAOW,CAAC,EAAE;MACN,MAAMC,IAAI,GAAG,CAACZ,OAAO,CAACa,UAAU,CAAC,SAAS,CAAC,IAAI,CAACb,OAAO,CAACa,UAAU,CAAC,UAAU,CAAC,GACxE,kDAAkD,GAClD,EAAE;MACR,MAAM,IAAIC,KAAK,CAAC,sBAAsBd,OAAO,GAAGY,IAAI,EAAE,CAAC;IAC3D;EACJ;EACA,MAAMG,aAAa,GAAG;IAClB,GAAGrB,yBAAyB,CAACM,OAAO,EAAEC,aAAa,EAAEJ,UAAU,EAAEM,OAAO,CAAC;IACzEG,gBAAgB;IAChBU,WAAW,EAAEjB,QAAQ,CAACiB,WAAW;IACjCC,MAAM,EAAEf,OAAO,CAACe,MAAM;IACtBC,cAAc,EAAE,CAAC,CAAC;IAClBC,cAAc,EAAE,CAAC;EACrB,CAAC;EACD,OAAOC,MAAM,CAACC,MAAM,CAACD,MAAM,CAACE,MAAM,CAACP,aAAa,EAAE;IAC9CQ,gBAAgB,EAAE3B,qCAAqC,CAACM,OAAO,CAAC,CAACa,aAAa;EAClF,CAAC,CAAC,CAAC;AACP","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPlatformClient.d.ts","sourceRoot":"","sources":["../../src/createPlatformClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createPlatformClient.d.ts","sourceRoot":"","sources":["../../src/createPlatformClient.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAGhE,MAAM,WAAW,cAAe,SAAQ,mBAAmB;CAAG;AAE9D;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EACpC,OAAO,GAAE,SAAqB,EAC9B,OAAO,GAAE,OAAO,UAAU,CAAC,KAAa,GACvC,cAAc,CAOhB"}
|
|
@@ -90,7 +90,13 @@ export function createOsdkObject(client, objectDef, rawObj) {
|
|
|
90
90
|
if (instance != null) {
|
|
91
91
|
return instance;
|
|
92
92
|
}
|
|
93
|
-
const geotimeProp = new GeotimeSeriesPropertyImpl(client, objectDef.apiName, target[RawObject][objectDef.primaryKeyApiName], p
|
|
93
|
+
const geotimeProp = new GeotimeSeriesPropertyImpl(client, objectDef.apiName, target[RawObject][objectDef.primaryKeyApiName], p, rawValue.type === "geotimeSeriesValue" ? {
|
|
94
|
+
time: rawValue.timestamp,
|
|
95
|
+
value: {
|
|
96
|
+
type: "Point",
|
|
97
|
+
coordinates: rawValue.position
|
|
98
|
+
}
|
|
99
|
+
} : undefined);
|
|
94
100
|
target[CachedPropertiesRef].set(p, geotimeProp);
|
|
95
101
|
return geotimeProp;
|
|
96
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createOsdkObject.js","names":["createAttachmentFromRid","GeotimeSeriesPropertyImpl","TimeSeriesPropertyImpl","createClientCache","get$as","get$link","CachedPropertiesRef","ClientRef","ObjectDefRef","RawObject","UnderlyingOsdkObject","objectPrototypeCache","client","objectDef","Object","create","value","get","newValues","assign","createOsdkObject","rawObj","objectHolderPrototype","writable","Map","holder","osdkObject","Proxy","ownKeys","target","Reflect","p","receiver","rawValue","propDef","properties","type","Array","isArray","map","a","rid","apiName","primaryKeyApiName","instance","geotimeProp","set","newValue","getOwnPropertyDescriptor","configurable","enumerable"
|
|
1
|
+
{"version":3,"file":"createOsdkObject.js","names":["createAttachmentFromRid","GeotimeSeriesPropertyImpl","TimeSeriesPropertyImpl","createClientCache","get$as","get$link","CachedPropertiesRef","ClientRef","ObjectDefRef","RawObject","UnderlyingOsdkObject","objectPrototypeCache","client","objectDef","Object","create","value","get","newValues","assign","createOsdkObject","rawObj","objectHolderPrototype","writable","Map","holder","osdkObject","Proxy","ownKeys","target","Reflect","p","receiver","rawValue","propDef","properties","type","Array","isArray","map","a","rid","apiName","primaryKeyApiName","instance","geotimeProp","time","timestamp","coordinates","position","undefined","set","newValue","getOwnPropertyDescriptor","configurable","enumerable"],"sources":["createOsdkObject.js"],"sourcesContent":["/*\n * Copyright 2024 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 */\nimport { createAttachmentFromRid } from \"../../createAttachmentFromRid.js\";\nimport { GeotimeSeriesPropertyImpl } from \"../../createGeotimeSeriesProperty.js\";\nimport { TimeSeriesPropertyImpl } from \"../../createTimeseriesProperty.js\";\nimport { createClientCache } from \"../Cache.js\";\nimport { get$as } from \"./getDollarAs.js\";\nimport { get$link } from \"./getDollarLink.js\";\nimport { CachedPropertiesRef, ClientRef, ObjectDefRef, RawObject, UnderlyingOsdkObject, } from \"./InternalSymbols.js\";\nconst objectPrototypeCache = createClientCache(function (client, objectDef) {\n return Object.create(null, {\n [ObjectDefRef]: { value: objectDef },\n [ClientRef]: { value: client },\n \"$as\": { value: get$as(objectDef) },\n \"$link\": {\n get: function () {\n return get$link(this);\n },\n },\n \"$updateInternalValues\": {\n value: function (newValues) {\n this[RawObject] = Object.assign({}, this[RawObject], newValues);\n },\n },\n });\n});\n/** @internal */\nexport function createOsdkObject(client, objectDef, rawObj) {\n // We use multiple layers of prototypes to maximize reuse and also to keep\n // [RawObject] out of `ownKeys`. This keeps the code in the proxy below simpler.\n const objectHolderPrototype = Object.create(objectPrototypeCache.get(client, objectDef), {\n [RawObject]: {\n value: rawObj,\n writable: true, // so we can allow updates\n },\n [CachedPropertiesRef]: {\n value: new Map(),\n writable: true,\n },\n });\n // we separate the holder out so we can update\n // the underlying data without having to return a new object\n // we also need the holder so we can customize the console.log output\n const holder = Object.create(objectHolderPrototype);\n const osdkObject = new Proxy(holder, {\n ownKeys(target) {\n return Reflect.ownKeys(target[RawObject]);\n },\n get(target, p, receiver) {\n switch (p) {\n case UnderlyingOsdkObject:\n // effectively point back to the proxy\n return receiver;\n }\n if (p in target)\n return target[p];\n if (p in rawObj) {\n const rawValue = target[RawObject][p];\n const propDef = objectDef.properties[p];\n if (propDef) {\n if (propDef.type === \"attachment\") {\n if (Array.isArray(rawValue)) {\n return rawValue.map(a => createAttachmentFromRid(client, a.rid));\n }\n return createAttachmentFromRid(client, rawValue.rid);\n }\n if (propDef.type === \"numericTimeseries\"\n || propDef.type === \"stringTimeseries\") {\n return new TimeSeriesPropertyImpl(client, objectDef.apiName, target[RawObject][objectDef.primaryKeyApiName], p);\n }\n if (propDef.type === \"geotimeSeriesReference\") {\n const instance = target[CachedPropertiesRef].get(p);\n if (instance != null) {\n return instance;\n }\n const geotimeProp = new GeotimeSeriesPropertyImpl(client, objectDef.apiName, target[RawObject][objectDef.primaryKeyApiName], p, rawValue.type === \"geotimeSeriesValue\"\n ? {\n time: rawValue.timestamp,\n value: {\n type: \"Point\",\n coordinates: rawValue.position,\n },\n }\n : undefined);\n target[CachedPropertiesRef].set(p, geotimeProp);\n return geotimeProp;\n }\n }\n return rawValue;\n }\n // we do not do any fall through to avoid unexpected behavior\n },\n set(target, p, newValue) {\n // allow the prototype to update this value\n if (p === RawObject) {\n // symbol only exists internally so no one else can hit this\n target[p] = newValue;\n return true;\n }\n return false;\n },\n getOwnPropertyDescriptor(target, p) {\n if (p === RawObject) {\n return Reflect.getOwnPropertyDescriptor(target, p);\n }\n if (target[RawObject][p] != null) {\n return { configurable: true, enumerable: true };\n }\n return undefined;\n },\n });\n return osdkObject;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,uBAAuB,QAAQ,kCAAkC;AAC1E,SAASC,yBAAyB,QAAQ,sCAAsC;AAChF,SAASC,sBAAsB,QAAQ,mCAAmC;AAC1E,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,mBAAmB,EAAEC,SAAS,EAAEC,YAAY,EAAEC,SAAS,EAAEC,oBAAoB,QAAS,sBAAsB;AACrH,MAA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AAMC,WAAW,GAAG,IAAI5C,yBAAyB,CAACW,MAAM,EAAEC,SAAS,CAAC6B,OAAO,EAAEb,MAAM,CAACpB,SAAS,CAAC,CAACI,SAAS,CAAC8B,iBAAiB,CAAC,EAAEZ,CAAC,EAAEE,QAAQ,CAACG,IAAI,KAAK,oBAAoB,GAChK;cACEU,IAAI,EAAEb,QAAQ,CAACc,SAAS;cACxB/B,KAAK,EAAE;gBACHoB,IAAI,EAAE,OAAO;gBACbY,WAAW,EAAEf,QAAQ,CAACgB;cAC1B;YACJ,CAAC,GACCC,SAAS,CAAC;YAChBrB,MAAM,CAACvB,mBAAmB,CAAC,CAAC6C,GAAG,CAACpB,CAAC,EAAEc,WAAW,CAAC;YAC/C,OAAOA,WAAW;UACtB;QACJ;QACA,OAAOZ,QAAQ;MACnB;MACA;IACJ,CAAC;IACDkB,GAAGA,CAACtB,MAAM,EAAEE,CAAC,EAAEqB,QAAQ,EAAE;MACrB;MACA,IAAIrB,CAAC,KAAKtB,SAAS,EAAE;QACjB;QACAoB,MAAM,CAACE,CAAC,CAAC,GAAGqB,QAAQ;QACpB,OAAO,IAAI;MACf;MACA,OAAO,KAAK;IAChB,CAAC;IACDC,wBAAwBA,CAACxB,MAAM,EAAEE,CAAC,EAAE;MAChC,IAAIA,CAAC,KAAKtB,SAAS,EAAE;QACjB,OAAOqB,OAAO,CAACuB,wBAAwB,CAACxB,MAAM,EAAEE,CAAC,CAAC;MACtD;MACA,IAAIF,MAAM,CAACpB,SAAS,CAAC,CAACsB,CAAC,CAAC,IAAI,IAAI,EAAE;QAC9B,OAAO;UAAEuB,YAAY,EAAE,IAAI;UAAEC,UAAU,EAAE;QAAK,CAAC;MACnD;MACA,OAAOL,SAAS;IACpB;EACJ,CAAC,CAAC;EACF,OAAOxB,UAAU;AACrB","ignoreList":[]}
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { $ontologyRid, Employee, FooInterface, objectTypeWithAllPropertyTypes } from "@osdk/client.test.ontology";
|
|
17
|
-
import { symbolClientContext } from "@osdk/shared.client";
|
|
18
17
|
import { createSharedClientContext } from "@osdk/shared.client.impl";
|
|
19
18
|
import { apiServer } from "@osdk/shared.test";
|
|
20
19
|
import { afterAll, beforeAll, describe, expect, expectTypeOf, it } from "vitest";
|
|
20
|
+
import { additionalContext } from "../Client.js";
|
|
21
21
|
import { createClient } from "../createClient.js";
|
|
22
22
|
import { createMinimalClient } from "../createMinimalClient.js";
|
|
23
23
|
import { convertWireToOsdkObjects } from "./convertWireToOsdkObjects.js";
|
|
@@ -212,23 +212,23 @@ describe("convertWireToOsdkObjects", () => {
|
|
|
212
212
|
__apiName: "Employee",
|
|
213
213
|
__primaryKey: 0
|
|
214
214
|
};
|
|
215
|
-
await expect(() => convertWireToOsdkObjects(client[
|
|
215
|
+
await expect(() => convertWireToOsdkObjects(client[additionalContext], [object], undefined, undefined, ["employeeId"], "throw")).rejects.toThrowErrorMatchingInlineSnapshot(`[Error: Unable to safely convert objects as some non nullable properties are null]`);
|
|
216
216
|
});
|
|
217
217
|
it("does not throw when optional is missing", async () => {
|
|
218
|
-
await expect(convertWireToOsdkObjects(client[
|
|
218
|
+
await expect(convertWireToOsdkObjects(client[additionalContext], [{
|
|
219
219
|
__apiName: "Employee",
|
|
220
220
|
__primaryKey: 0
|
|
221
221
|
}], undefined, undefined, ["fullName"], "throw")).resolves.to.not.toBeUndefined();
|
|
222
222
|
});
|
|
223
223
|
it("filters when it should", async () => {
|
|
224
|
-
const result = await convertWireToOsdkObjects(client[
|
|
224
|
+
const result = await convertWireToOsdkObjects(client[additionalContext], [{
|
|
225
225
|
__apiName: "Employee",
|
|
226
226
|
__primaryKey: 0
|
|
227
227
|
}], undefined, undefined, ["employeeId"], "drop");
|
|
228
228
|
expect(result.length).toBe(0);
|
|
229
229
|
});
|
|
230
230
|
it("does not filter when it shouldn't", async () => {
|
|
231
|
-
const result = await convertWireToOsdkObjects(client[
|
|
231
|
+
const result = await convertWireToOsdkObjects(client[additionalContext], [{
|
|
232
232
|
__apiName: "Employee",
|
|
233
233
|
__primaryKey: 0
|
|
234
234
|
}], undefined, undefined, ["fullName"], "drop");
|
|
@@ -241,24 +241,24 @@ describe("convertWireToOsdkObjects", () => {
|
|
|
241
241
|
__apiName: "Employee",
|
|
242
242
|
__primaryKey: 0
|
|
243
243
|
};
|
|
244
|
-
await expect(() => convertWireToOsdkObjects(client[
|
|
244
|
+
await expect(() => convertWireToOsdkObjects(client[additionalContext], [object], undefined, undefined, undefined, "throw")).rejects.toThrowErrorMatchingInlineSnapshot(`[Error: Unable to safely convert objects as some non nullable properties are null]`);
|
|
245
245
|
});
|
|
246
246
|
it("does not throw when required is present", async () => {
|
|
247
|
-
await expect(convertWireToOsdkObjects(client[
|
|
247
|
+
await expect(convertWireToOsdkObjects(client[additionalContext], [{
|
|
248
248
|
__apiName: "Employee",
|
|
249
249
|
__primaryKey: 0,
|
|
250
250
|
"employeeId": 0
|
|
251
251
|
}], undefined, undefined, undefined, "throw")).resolves.to.not.toBeUndefined();
|
|
252
252
|
});
|
|
253
253
|
it("filters when it should", async () => {
|
|
254
|
-
const result = await convertWireToOsdkObjects(client[
|
|
254
|
+
const result = await convertWireToOsdkObjects(client[additionalContext], [{
|
|
255
255
|
__apiName: "Employee",
|
|
256
256
|
__primaryKey: 0
|
|
257
257
|
}], undefined, undefined, undefined, "drop");
|
|
258
258
|
expect(result.length).toBe(0);
|
|
259
259
|
});
|
|
260
260
|
it("does not filter when it shouldn't", async () => {
|
|
261
|
-
const result = await convertWireToOsdkObjects(client[
|
|
261
|
+
const result = await convertWireToOsdkObjects(client[additionalContext], [{
|
|
262
262
|
__apiName: "Employee",
|
|
263
263
|
__primaryKey: 0,
|
|
264
264
|
"employeeId": 0
|
|
@@ -267,7 +267,7 @@ describe("convertWireToOsdkObjects", () => {
|
|
|
267
267
|
});
|
|
268
268
|
});
|
|
269
269
|
it("behaves correctly when converting", async () => {
|
|
270
|
-
const result = await convertWireToOsdkObjects(client[
|
|
270
|
+
const result = await convertWireToOsdkObjects(client[additionalContext], [{
|
|
271
271
|
__apiName: "Employee",
|
|
272
272
|
__primaryKey: 0,
|
|
273
273
|
fooSpt: "hi"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertWireToOsdkObjects.test.js","names":["$ontologyRid","Employee","FooInterface","objectTypeWithAllPropertyTypes","symbolClientContext","createSharedClientContext","apiServer","afterAll","beforeAll","describe","expect","expectTypeOf","it","createClient","createMinimalClient","convertWireToOsdkObjects","client","listen","close","data","employee","fetchPage","Object","keys","sort","toEqual","$as","$link","employee2","where","$and","employeeId","$gt","$lt","JSON","stringify","toMatchInlineSnapshot","employees","length","toBeGreaterThanOrEqual","a","b","getPrototypeOf","toBe","withValues","id","attachment","attachmentArray","toMatchTypeOf","rid","Array","isArray","toBeTruthy","withoutValues","emptyAttachment","emptyAttachmentArray","toBeUndefined","clientCtx","ontologyRid","object","__apiName","apiName","__primaryKey","prototypeBefore","object2","undefined","prototypeAfter","not","obj","__title","fullName","objAsFoo","toMatchObject","fooSpt","$apiName","$primaryKey","$objectType","$title","console","log","$updateInternalValues","__rid","$rid","rejects","toThrowErrorMatchingInlineSnapshot","resolves","to","result","instance","osdk"],"sources":["convertWireToOsdkObjects.test.js"],"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 */\nimport { $ontologyRid, Employee, FooInterface, objectTypeWithAllPropertyTypes, } from \"@osdk/client.test.ontology\";\nimport { symbolClientContext } from \"@osdk/shared.client\";\nimport { createSharedClientContext } from \"@osdk/shared.client.impl\";\nimport { apiServer } from \"@osdk/shared.test\";\nimport { afterAll, beforeAll, describe, expect, expectTypeOf, it, } from \"vitest\";\nimport { createClient } from \"../createClient.js\";\nimport { createMinimalClient } from \"../createMinimalClient.js\";\nimport { convertWireToOsdkObjects } from \"./convertWireToOsdkObjects.js\";\ndescribe(\"convertWireToOsdkObjects\", () => {\n let client;\n beforeAll(async () => {\n apiServer.listen();\n client = createClient(\"https://stack.palantir.com\", $ontologyRid, async () => \"myAccessToken\");\n });\n afterAll(() => {\n apiServer.close();\n });\n it(\"configures properties correctly\", async () => {\n const { data: [employee] } = await client(Employee).fetchPage();\n expect(Object.keys(employee).sort()).toEqual([\n \"employeeId\",\n \"fullName\",\n \"office\",\n \"class\",\n \"startDate\",\n \"employeeStatus\",\n \"$apiName\",\n \"$objectType\",\n \"$primaryKey\",\n \"employeeLocation\",\n ].sort());\n expect(Object.keys(employee.$as)).toEqual([]);\n expect(Object.keys(employee.$link)).toEqual([\n \"peeps\",\n \"lead\",\n \"officeLink\",\n ]);\n });\n it(\"stringifies properties on objects and interfaces correctly\", async () => {\n const { data: [employee] } = await client(Employee).fetchPage();\n const { data: [employee2] } = await client(Employee).where({\n $and: [{ employeeId: { $gt: 50030 } }, { employeeId: { $lt: 50032 } }],\n }).fetchPage();\n // Should not have $title\n expect(JSON.stringify(employee)).toMatchInlineSnapshot(`\"{\"employeeId\":50030,\"fullName\":\"John Doe\",\"office\":\"NYC\",\"class\":\"Red\",\"startDate\":\"2019-01-01\",\"employeeStatus\":{},\"employeeLocation\":{},\"$apiName\":\"Employee\",\"$objectType\":\"Employee\",\"$primaryKey\":50030}\"`);\n expect(JSON.stringify(employee.$as(FooInterface))).toMatchInlineSnapshot(`\"{\"$apiName\":\"FooInterface\",\"$objectType\":\"Employee\",\"$primaryKey\":50030,\"fooSpt\":\"John Doe\"}\"`);\n // Should have $title\n expect(JSON.stringify(employee2)).toMatchInlineSnapshot(`\"{\"employeeId\":50031,\"fullName\":\"Jane Doe\",\"office\":\"SEA\",\"class\":\"Blue\",\"startDate\":\"2012-02-12\",\"employeeStatus\":{},\"employeeLocation\":{},\"$apiName\":\"Employee\",\"$objectType\":\"Employee\",\"$primaryKey\":50031,\"$title\":\"Jane Doe\"}\"`);\n expect(JSON.stringify(employee2.$as(FooInterface))).toMatchInlineSnapshot(`\"{\"$apiName\":\"FooInterface\",\"$objectType\":\"Employee\",\"$primaryKey\":50031,\"$title\":\"Jane Doe\",\"fooSpt\":\"Jane Doe\"}\"`);\n });\n it(\"reuses the object prototype across objects\", async () => {\n const employees = await client(Employee).fetchPage();\n expect(employees.data.length).toBeGreaterThanOrEqual(2);\n const [a, b] = employees.data;\n expect(Object.getPrototypeOf(Object.getPrototypeOf(a))).toBe(Object.getPrototypeOf(Object.getPrototypeOf(b)));\n });\n it(\"converts attachments as expected\", async () => {\n const withValues = await client(objectTypeWithAllPropertyTypes)\n .where({ id: 1 })\n .fetchPage();\n expect(withValues.data.length).toBeGreaterThanOrEqual(1);\n const { attachment, attachmentArray } = withValues.data[0];\n expectTypeOf(attachment).toMatchTypeOf;\n expect(attachment?.rid).toEqual(\"ri.attachments.main.attachment.86016861-707f-4292-b258-6a7108915a75\");\n expect(Array.isArray(attachmentArray)).toBeTruthy();\n expectTypeOf(attachmentArray[0]).toMatchTypeOf;\n const withoutValues = await client(objectTypeWithAllPropertyTypes).where({ id: 2 }).fetchPage();\n const { attachment: emptyAttachment, attachmentArray: emptyAttachmentArray, } = withoutValues.data[0];\n expect(emptyAttachment).toBeUndefined();\n expect(emptyAttachmentArray).toBeUndefined();\n });\n it(\"works even with unknown apiNames\", async () => {\n const clientCtx = createMinimalClient({ ontologyRid: $ontologyRid }, \"https://stack.palantir.com\", async () => \"myAccessToken\");\n createSharedClientContext(\"https://stack.palantir.com\", async () => \"myAccessToken\", \"userAgent\");\n let object = {\n __apiName: Employee.apiName,\n __primaryKey: 0,\n };\n const prototypeBefore = Object.getPrototypeOf(object);\n let object2 = await convertWireToOsdkObjects(clientCtx, [object], undefined, undefined, undefined, false);\n const prototypeAfter = Object.getPrototypeOf(object2);\n expect(prototypeBefore).not.toBe(prototypeAfter);\n });\n it(\"updates interface when underlying changes\", async () => {\n const clientCtx = createMinimalClient({ ontologyRid: $ontologyRid }, \"https://stack.palantir.com\", async () => \"myAccessToken\");\n let objectFromWire = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n __title: \"Steve\",\n fullName: \"Steve\",\n employeeId: \"5\",\n };\n const [obj] = (await convertWireToOsdkObjects(clientCtx, [objectFromWire], undefined));\n expect(obj.fullName).toEqual(\"Steve\");\n expect(Object.keys(obj).sort()).toEqual([\n \"$apiName\",\n \"$objectType\",\n \"$primaryKey\",\n \"$title\",\n \"employeeId\",\n \"fullName\",\n ].sort());\n const objAsFoo = obj.$as(FooInterface);\n expect(objAsFoo).toMatchObject({\n fooSpt: obj.fullName,\n $apiName: FooInterface.apiName,\n $primaryKey: obj.$primaryKey,\n $objectType: obj.$objectType,\n $title: obj.$title,\n });\n console.log(obj);\n console.log(objAsFoo);\n obj.$updateInternalValues({\n fullName: \"Bob\",\n });\n expect(obj.fullName).toEqual(\"Bob\");\n expect(objAsFoo.fooSpt).toEqual(obj.fullName);\n expect(Object.keys(objAsFoo).sort()).toEqual([\n \"$apiName\",\n \"$objectType\",\n \"$primaryKey\",\n \"$title\",\n \"fooSpt\",\n ].sort());\n expect(obj).toBe(objAsFoo.$as(Employee));\n expect(objAsFoo).toBe(obj.$as(FooInterface));\n });\n it(\"reconstitutes interfaces properly without rid\", async () => {\n const clientCtx = createMinimalClient({ ontologyRid: $ontologyRid }, \"https://stack.palantir.com\", async () => \"myAccessToken\");\n let objectFromWire = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n __title: \"Steve\",\n fooSpt: \"Steve\",\n };\n const [objAsFoo] = (await convertWireToOsdkObjects(clientCtx, [objectFromWire], FooInterface.apiName));\n expect(objAsFoo).toMatchInlineSnapshot(`\n {\n \"$apiName\": \"FooInterface\",\n \"$objectType\": \"Employee\",\n \"$primaryKey\": 0,\n \"$title\": \"Steve\",\n \"fooSpt\": \"Steve\",\n }\n `);\n const obj = objAsFoo.$as(Employee);\n expect(obj.fullName).toEqual(\"Steve\");\n expect(obj).toMatchInlineSnapshot(`\n {\n \"$apiName\": \"Employee\",\n \"$objectType\": \"Employee\",\n \"$primaryKey\": 0,\n \"$title\": \"Steve\",\n \"employeeId\": 0,\n \"fullName\": \"Steve\",\n }\n `);\n });\n it(\"reconstitutes interfaces properly with rid\", async () => {\n const clientCtx = createMinimalClient({ ontologyRid: $ontologyRid }, \"https://stack.palantir.com\", async () => \"myAccessToken\");\n let objectFromWire = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n __title: \"Steve\",\n __rid: \"hiMom\",\n fooSpt: \"Steve\",\n };\n const [objAsFoo] = (await convertWireToOsdkObjects(clientCtx, [objectFromWire], FooInterface.apiName));\n expect(objAsFoo).toMatchInlineSnapshot(`\n {\n \"$apiName\": \"FooInterface\",\n \"$objectType\": \"Employee\",\n \"$primaryKey\": 0,\n \"$rid\": \"hiMom\",\n \"$title\": \"Steve\",\n \"fooSpt\": \"Steve\",\n }\n `);\n expect(objAsFoo.$rid).toEqual(\"hiMom\");\n const obj = objAsFoo.$as(Employee);\n expect(obj.fullName).toEqual(\"Steve\");\n expect(obj).toMatchInlineSnapshot(`\n {\n \"$apiName\": \"Employee\",\n \"$objectType\": \"Employee\",\n \"$primaryKey\": 0,\n \"$rid\": \"hiMom\",\n \"$title\": \"Steve\",\n \"employeeId\": 0,\n \"fullName\": \"Steve\",\n }\n `);\n expect(obj.$rid).toEqual(\"hiMom\");\n });\n describe(\"selection keys\", () => {\n it(\"throws when required is missing\", async () => {\n let object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n };\n await expect(() => convertWireToOsdkObjects(client[symbolClientContext], [object], undefined, undefined, [\"employeeId\"], \"throw\")).rejects.toThrowErrorMatchingInlineSnapshot(`[Error: Unable to safely convert objects as some non nullable properties are null]`);\n });\n it(\"does not throw when optional is missing\", async () => {\n let object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n };\n await expect(convertWireToOsdkObjects(client[symbolClientContext], [object], undefined, undefined, [\"fullName\"], \"throw\")).resolves.to.not.toBeUndefined();\n });\n it(\"filters when it should\", async () => {\n const object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n };\n const result = await convertWireToOsdkObjects(client[symbolClientContext], [object], undefined, undefined, [\"employeeId\"], \"drop\");\n expect(result.length).toBe(0);\n });\n it(\"does not filter when it shouldn't\", async () => {\n const object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n };\n const result = await convertWireToOsdkObjects(client[symbolClientContext], [object], undefined, undefined, [\"fullName\"], \"drop\");\n expect(result.length).toBe(1);\n });\n });\n describe(\"without selection keys\", () => {\n it(\"throws when required is missing\", async () => {\n let object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n };\n await expect(() => convertWireToOsdkObjects(client[symbolClientContext], [object], undefined, undefined, undefined, \"throw\")).rejects.toThrowErrorMatchingInlineSnapshot(`[Error: Unable to safely convert objects as some non nullable properties are null]`);\n });\n it(\"does not throw when required is present\", async () => {\n let object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n \"employeeId\": 0,\n };\n await expect(convertWireToOsdkObjects(client[symbolClientContext], [object], undefined, undefined, undefined, \"throw\")).resolves.to.not.toBeUndefined();\n });\n it(\"filters when it should\", async () => {\n const object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n };\n const result = await convertWireToOsdkObjects(client[symbolClientContext], [object], undefined, undefined, undefined, \"drop\");\n expect(result.length).toBe(0);\n });\n it(\"does not filter when it shouldn't\", async () => {\n const object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n \"employeeId\": 0,\n };\n const result = await convertWireToOsdkObjects(client[symbolClientContext], [object], undefined, undefined, undefined, \"drop\");\n expect(result.length).toBe(1);\n });\n });\n it(\"behaves correctly when converting\", async () => {\n const object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n fooSpt: \"hi\",\n };\n const result = await convertWireToOsdkObjects(client[symbolClientContext], [object], \"FooInterface\", undefined, [\"fooSpt\"], \"drop\");\n expect(result.length).toBe(1);\n });\n});\ndescribe(\"Osdk.Instance\", () => {\n it(\"is assignable to Osdk<>\", () => {\n const instance = {};\n const osdk = instance;\n });\n it(\"is assignable from Osdk<>\", () => {\n const osdk = {};\n const instance = osdk;\n });\n it(\"is assignable to Osdk<> with $notStrict\", () => {\n const instance = {};\n const osdk = instance;\n const osdk2 = instance;\n });\n it(\"is assignable from Osdk<> with $notStrict\", () => {\n const osdk = {};\n const osdk2 = osdk;\n const instance = osdk;\n const instance2 = osdk2;\n });\n it(\"object with any for props is assignable to its normal self\", () => {\n const foo = {};\n const bar = foo;\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,YAAY,EAAEC,QAAQ,EAAEC,YAAY,EAAEC,8BAA8B,QAAS,4BAA4B;AAClH,SAASC,mBAAmB,QAAQ,qBAAqB;AACzD,SAASC,yBAAyB,QAAQ,0BAA0B;AACpE,SAASC,SAAS,QAAQ,mBAAmB;AAC7C,SAASC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,YAAY,EAAEC,EAAE,QAAS,QAAQ;AACjF,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,mBAAmB,QAAQ,2BAA2B;AAC/D,SAASC,wBAAwB,QAAQ,+BAA+B;AACxEN,QAAQ,CAAC,0BAA0B,EAAE,MAAM;EACvC,IAAIO,MAAM;EACVR,SAAS,CAAC,YAAY;IAClBF,SAAS,CAACW,MAAM,CAAC,CAAC;IAClBD,MAAM,GAAGH,YAAY,CAAC,4BAA4B,EAAEb,YAAY,EAAE,YAAY,eAAe,CAAC;EAClG,CAAC,CAAC;EACFO,QAAQ,CAAC,MAAM;IACXD,SAAS,CAACY,KAAK,CAAC,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EAAE,MAAM;IAClD,MAAM6E,IAAI,GAAG,CAAC,CAAC;EAInB,CAAC,CAAC;EACF7E,EAAE,CAAC,4DAA4D,EAAE,MAAM,CAGvE,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"convertWireToOsdkObjects.test.js","names":["$ontologyRid","Employee","FooInterface","objectTypeWithAllPropertyTypes","createSharedClientContext","apiServer","afterAll","beforeAll","describe","expect","expectTypeOf","it","additionalContext","createClient","createMinimalClient","convertWireToOsdkObjects","client","listen","close","data","employee","fetchPage","Object","keys","sort","toEqual","$as","$link","employee2","where","$and","employeeId","$gt","$lt","JSON","stringify","toMatchInlineSnapshot","employees","length","toBeGreaterThanOrEqual","a","b","getPrototypeOf","toBe","withValues","id","attachment","attachmentArray","toMatchTypeOf","rid","Array","isArray","toBeTruthy","withoutValues","emptyAttachment","emptyAttachmentArray","toBeUndefined","clientCtx","ontologyRid","object","__apiName","apiName","__primaryKey","prototypeBefore","object2","undefined","prototypeAfter","not","obj","__title","fullName","objAsFoo","toMatchObject","fooSpt","$apiName","$primaryKey","$objectType","$title","console","log","$updateInternalValues","__rid","$rid","rejects","toThrowErrorMatchingInlineSnapshot","resolves","to","result","instance","osdk"],"sources":["convertWireToOsdkObjects.test.js"],"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 */\nimport { $ontologyRid, Employee, FooInterface, objectTypeWithAllPropertyTypes, } from \"@osdk/client.test.ontology\";\nimport { createSharedClientContext } from \"@osdk/shared.client.impl\";\nimport { apiServer } from \"@osdk/shared.test\";\nimport { afterAll, beforeAll, describe, expect, expectTypeOf, it, } from \"vitest\";\nimport { additionalContext } from \"../Client.js\";\nimport { createClient } from \"../createClient.js\";\nimport { createMinimalClient } from \"../createMinimalClient.js\";\nimport { convertWireToOsdkObjects } from \"./convertWireToOsdkObjects.js\";\ndescribe(\"convertWireToOsdkObjects\", () => {\n let client;\n beforeAll(async () => {\n apiServer.listen();\n client = createClient(\"https://stack.palantir.com\", $ontologyRid, async () => \"myAccessToken\");\n });\n afterAll(() => {\n apiServer.close();\n });\n it(\"configures properties correctly\", async () => {\n const { data: [employee] } = await client(Employee).fetchPage();\n expect(Object.keys(employee).sort()).toEqual([\n \"employeeId\",\n \"fullName\",\n \"office\",\n \"class\",\n \"startDate\",\n \"employeeStatus\",\n \"$apiName\",\n \"$objectType\",\n \"$primaryKey\",\n \"employeeLocation\",\n ].sort());\n expect(Object.keys(employee.$as)).toEqual([]);\n expect(Object.keys(employee.$link)).toEqual([\n \"peeps\",\n \"lead\",\n \"officeLink\",\n ]);\n });\n it(\"stringifies properties on objects and interfaces correctly\", async () => {\n const { data: [employee] } = await client(Employee).fetchPage();\n const { data: [employee2] } = await client(Employee).where({\n $and: [{ employeeId: { $gt: 50030 } }, { employeeId: { $lt: 50032 } }],\n }).fetchPage();\n // Should not have $title\n expect(JSON.stringify(employee)).toMatchInlineSnapshot(`\"{\"employeeId\":50030,\"fullName\":\"John Doe\",\"office\":\"NYC\",\"class\":\"Red\",\"startDate\":\"2019-01-01\",\"employeeStatus\":{},\"employeeLocation\":{},\"$apiName\":\"Employee\",\"$objectType\":\"Employee\",\"$primaryKey\":50030}\"`);\n expect(JSON.stringify(employee.$as(FooInterface))).toMatchInlineSnapshot(`\"{\"$apiName\":\"FooInterface\",\"$objectType\":\"Employee\",\"$primaryKey\":50030,\"fooSpt\":\"John Doe\"}\"`);\n // Should have $title\n expect(JSON.stringify(employee2)).toMatchInlineSnapshot(`\"{\"employeeId\":50031,\"fullName\":\"Jane Doe\",\"office\":\"SEA\",\"class\":\"Blue\",\"startDate\":\"2012-02-12\",\"employeeStatus\":{},\"employeeLocation\":{},\"$apiName\":\"Employee\",\"$objectType\":\"Employee\",\"$primaryKey\":50031,\"$title\":\"Jane Doe\"}\"`);\n expect(JSON.stringify(employee2.$as(FooInterface))).toMatchInlineSnapshot(`\"{\"$apiName\":\"FooInterface\",\"$objectType\":\"Employee\",\"$primaryKey\":50031,\"$title\":\"Jane Doe\",\"fooSpt\":\"Jane Doe\"}\"`);\n });\n it(\"reuses the object prototype across objects\", async () => {\n const employees = await client(Employee).fetchPage();\n expect(employees.data.length).toBeGreaterThanOrEqual(2);\n const [a, b] = employees.data;\n expect(Object.getPrototypeOf(Object.getPrototypeOf(a))).toBe(Object.getPrototypeOf(Object.getPrototypeOf(b)));\n });\n it(\"converts attachments as expected\", async () => {\n const withValues = await client(objectTypeWithAllPropertyTypes)\n .where({ id: 1 })\n .fetchPage();\n expect(withValues.data.length).toBeGreaterThanOrEqual(1);\n const { attachment, attachmentArray } = withValues.data[0];\n expectTypeOf(attachment).toMatchTypeOf;\n expect(attachment?.rid).toEqual(\"ri.attachments.main.attachment.86016861-707f-4292-b258-6a7108915a75\");\n expect(Array.isArray(attachmentArray)).toBeTruthy();\n expectTypeOf(attachmentArray[0]).toMatchTypeOf;\n const withoutValues = await client(objectTypeWithAllPropertyTypes).where({ id: 2 }).fetchPage();\n const { attachment: emptyAttachment, attachmentArray: emptyAttachmentArray, } = withoutValues.data[0];\n expect(emptyAttachment).toBeUndefined();\n expect(emptyAttachmentArray).toBeUndefined();\n });\n it(\"works even with unknown apiNames\", async () => {\n const clientCtx = createMinimalClient({ ontologyRid: $ontologyRid }, \"https://stack.palantir.com\", async () => \"myAccessToken\");\n createSharedClientContext(\"https://stack.palantir.com\", async () => \"myAccessToken\", \"userAgent\");\n let object = {\n __apiName: Employee.apiName,\n __primaryKey: 0,\n };\n const prototypeBefore = Object.getPrototypeOf(object);\n let object2 = await convertWireToOsdkObjects(clientCtx, [object], undefined, undefined, undefined, false);\n const prototypeAfter = Object.getPrototypeOf(object2);\n expect(prototypeBefore).not.toBe(prototypeAfter);\n });\n it(\"updates interface when underlying changes\", async () => {\n const clientCtx = createMinimalClient({ ontologyRid: $ontologyRid }, \"https://stack.palantir.com\", async () => \"myAccessToken\");\n let objectFromWire = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n __title: \"Steve\",\n fullName: \"Steve\",\n employeeId: \"5\",\n };\n const [obj] = (await convertWireToOsdkObjects(clientCtx, [objectFromWire], undefined));\n expect(obj.fullName).toEqual(\"Steve\");\n expect(Object.keys(obj).sort()).toEqual([\n \"$apiName\",\n \"$objectType\",\n \"$primaryKey\",\n \"$title\",\n \"employeeId\",\n \"fullName\",\n ].sort());\n const objAsFoo = obj.$as(FooInterface);\n expect(objAsFoo).toMatchObject({\n fooSpt: obj.fullName,\n $apiName: FooInterface.apiName,\n $primaryKey: obj.$primaryKey,\n $objectType: obj.$objectType,\n $title: obj.$title,\n });\n console.log(obj);\n console.log(objAsFoo);\n obj.$updateInternalValues({\n fullName: \"Bob\",\n });\n expect(obj.fullName).toEqual(\"Bob\");\n expect(objAsFoo.fooSpt).toEqual(obj.fullName);\n expect(Object.keys(objAsFoo).sort()).toEqual([\n \"$apiName\",\n \"$objectType\",\n \"$primaryKey\",\n \"$title\",\n \"fooSpt\",\n ].sort());\n expect(obj).toBe(objAsFoo.$as(Employee));\n expect(objAsFoo).toBe(obj.$as(FooInterface));\n });\n it(\"reconstitutes interfaces properly without rid\", async () => {\n const clientCtx = createMinimalClient({ ontologyRid: $ontologyRid }, \"https://stack.palantir.com\", async () => \"myAccessToken\");\n let objectFromWire = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n __title: \"Steve\",\n fooSpt: \"Steve\",\n };\n const [objAsFoo] = (await convertWireToOsdkObjects(clientCtx, [objectFromWire], FooInterface.apiName));\n expect(objAsFoo).toMatchInlineSnapshot(`\n {\n \"$apiName\": \"FooInterface\",\n \"$objectType\": \"Employee\",\n \"$primaryKey\": 0,\n \"$title\": \"Steve\",\n \"fooSpt\": \"Steve\",\n }\n `);\n const obj = objAsFoo.$as(Employee);\n expect(obj.fullName).toEqual(\"Steve\");\n expect(obj).toMatchInlineSnapshot(`\n {\n \"$apiName\": \"Employee\",\n \"$objectType\": \"Employee\",\n \"$primaryKey\": 0,\n \"$title\": \"Steve\",\n \"employeeId\": 0,\n \"fullName\": \"Steve\",\n }\n `);\n });\n it(\"reconstitutes interfaces properly with rid\", async () => {\n const clientCtx = createMinimalClient({ ontologyRid: $ontologyRid }, \"https://stack.palantir.com\", async () => \"myAccessToken\");\n let objectFromWire = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n __title: \"Steve\",\n __rid: \"hiMom\",\n fooSpt: \"Steve\",\n };\n const [objAsFoo] = (await convertWireToOsdkObjects(clientCtx, [objectFromWire], FooInterface.apiName));\n expect(objAsFoo).toMatchInlineSnapshot(`\n {\n \"$apiName\": \"FooInterface\",\n \"$objectType\": \"Employee\",\n \"$primaryKey\": 0,\n \"$rid\": \"hiMom\",\n \"$title\": \"Steve\",\n \"fooSpt\": \"Steve\",\n }\n `);\n expect(objAsFoo.$rid).toEqual(\"hiMom\");\n const obj = objAsFoo.$as(Employee);\n expect(obj.fullName).toEqual(\"Steve\");\n expect(obj).toMatchInlineSnapshot(`\n {\n \"$apiName\": \"Employee\",\n \"$objectType\": \"Employee\",\n \"$primaryKey\": 0,\n \"$rid\": \"hiMom\",\n \"$title\": \"Steve\",\n \"employeeId\": 0,\n \"fullName\": \"Steve\",\n }\n `);\n expect(obj.$rid).toEqual(\"hiMom\");\n });\n describe(\"selection keys\", () => {\n it(\"throws when required is missing\", async () => {\n let object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n };\n await expect(() => convertWireToOsdkObjects(client[additionalContext], [object], undefined, undefined, [\"employeeId\"], \"throw\")).rejects.toThrowErrorMatchingInlineSnapshot(`[Error: Unable to safely convert objects as some non nullable properties are null]`);\n });\n it(\"does not throw when optional is missing\", async () => {\n let object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n };\n await expect(convertWireToOsdkObjects(client[additionalContext], [object], undefined, undefined, [\"fullName\"], \"throw\")).resolves.to.not.toBeUndefined();\n });\n it(\"filters when it should\", async () => {\n const object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n };\n const result = await convertWireToOsdkObjects(client[additionalContext], [object], undefined, undefined, [\"employeeId\"], \"drop\");\n expect(result.length).toBe(0);\n });\n it(\"does not filter when it shouldn't\", async () => {\n const object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n };\n const result = await convertWireToOsdkObjects(client[additionalContext], [object], undefined, undefined, [\"fullName\"], \"drop\");\n expect(result.length).toBe(1);\n });\n });\n describe(\"without selection keys\", () => {\n it(\"throws when required is missing\", async () => {\n let object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n };\n await expect(() => convertWireToOsdkObjects(client[additionalContext], [object], undefined, undefined, undefined, \"throw\")).rejects.toThrowErrorMatchingInlineSnapshot(`[Error: Unable to safely convert objects as some non nullable properties are null]`);\n });\n it(\"does not throw when required is present\", async () => {\n let object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n \"employeeId\": 0,\n };\n await expect(convertWireToOsdkObjects(client[additionalContext], [object], undefined, undefined, undefined, \"throw\")).resolves.to.not.toBeUndefined();\n });\n it(\"filters when it should\", async () => {\n const object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n };\n const result = await convertWireToOsdkObjects(client[additionalContext], [object], undefined, undefined, undefined, \"drop\");\n expect(result.length).toBe(0);\n });\n it(\"does not filter when it shouldn't\", async () => {\n const object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n \"employeeId\": 0,\n };\n const result = await convertWireToOsdkObjects(client[additionalContext], [object], undefined, undefined, undefined, \"drop\");\n expect(result.length).toBe(1);\n });\n });\n it(\"behaves correctly when converting\", async () => {\n const object = {\n __apiName: \"Employee\",\n __primaryKey: 0,\n fooSpt: \"hi\",\n };\n const result = await convertWireToOsdkObjects(client[additionalContext], [object], \"FooInterface\", undefined, [\"fooSpt\"], \"drop\");\n expect(result.length).toBe(1);\n });\n});\ndescribe(\"Osdk.Instance\", () => {\n it(\"is assignable to Osdk<>\", () => {\n const instance = {};\n const osdk = instance;\n });\n it(\"is assignable from Osdk<>\", () => {\n const osdk = {};\n const instance = osdk;\n });\n it(\"is assignable to Osdk<> with $notStrict\", () => {\n const instance = {};\n const osdk = instance;\n const osdk2 = instance;\n });\n it(\"is assignable from Osdk<> with $notStrict\", () => {\n const osdk = {};\n const osdk2 = osdk;\n const instance = osdk;\n const instance2 = osdk2;\n });\n it(\"object with any for props is assignable to its normal self\", () => {\n const foo = {};\n const bar = foo;\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,YAAY,EAAEC,QAAQ,EAAEC,YAAY,EAAEC,8BAA8B,QAAS,4BAA4B;AAClH,SAASC,yBAAyB,QAAQ,0BAA0B;AACpE,SAASC,SAAS,QAAQ,mBAAmB;AAC7C,SAASC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,YAAY,EAAEC,EAAE,QAAS,QAAQ;AACjF,SAASC,iBAAiB,QAAQ,cAAc;AAChD,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,mBAAmB,QAAQ,2BAA2B;AAC/D,SAASC,wBAAwB,QAAQ,+BAA+B;AACxEP,QAAQ,CAAC,0BAA0B,EAAE,MAAM;EACvC,IAAIQ,MAAM;EACVT,SAAS,CAAC,YAAY;IAClBF,SAAS,CAACY,MAAM,CAAC,CAAC;IAClBD,MAAM,GAAGH,YAAY,CAAC,4BAA4B,EAAEb,YAAY,EAAE,YAAY,eAAe,CAAC;EAClG,CAAC,CAAC;EACFM,QAAQ,CAAC,MAAM;IACXD,SAAS,CAACa,KAAK,CAAC,CAAC;EACrB,CAAC,CAAC;EACFP,EAAE,CAAC,i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