@osdk/client 2.8.0-beta.1 → 2.8.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/{chunk-7543GRIE.cjs → chunk-II23HDVV.cjs} +65 -65
- package/build/cjs/{chunk-7543GRIE.cjs.map → chunk-II23HDVV.cjs.map} +1 -1
- package/build/cjs/{chunk-VVKEXIIO.cjs → chunk-XUFF6M4V.cjs} +2 -2
- package/build/cjs/{chunk-VVKEXIIO.cjs.map → chunk-XUFF6M4V.cjs.map} +1 -1
- package/build/cjs/index.cjs +8 -8
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/unstable-do-not-use.cjs +52 -52
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/types/Client.d.ts +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
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.
|
|
24
|
+
const MaxOsdkVersion = "2.8.0";
|
|
25
25
|
// END: THIS IS GENERATED CODE. DO NOT EDIT.
|
|
26
26
|
|
|
27
27
|
const ErrorMessage = Symbol("ErrorMessage");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionDefinition,\n ActionMetadata,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n ObjectMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n VersionBound,\n} from \"@osdk/api\";\nimport type {\n Experiment,\n ExperimentFns,\n MinimalObjectSet,\n} from \"@osdk/api/unstable\";\nimport type { SharedClient } from \"@osdk/shared.client2\";\nimport type { ActionSignatureFromDef } from \"./actions/applyAction.js\";\nimport type { MinimalClient } from \"./MinimalClientContext.js\";\nimport type { QuerySignatureFromDef } from \"./queries/types.js\";\nimport type { SatisfiesSemver } from \"./SatisfiesSemver.js\";\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\ntype OldSharedClient = import(\"@osdk/shared.client\").SharedClient;\n\nexport type CheckVersionBound<Q> = Q extends VersionBound<infer V> ? (\n SatisfiesSemver<V, MaxOsdkVersion> extends true ? Q\n : Q & {\n [ErrorMessage]:\n `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\n }\n )\n : Q;\n\nexport interface Client extends SharedClient, OldSharedClient {\n <Q extends ObjectTypeDefinition>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? ObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n <Q extends (InterfaceDefinition)>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? MinimalObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n <Q extends ActionDefinition<any>>(\n o: Q,\n ): ActionSignatureFromDef<Q>;\n\n <Q extends QueryDefinition<any>>(\n o: Q,\n ): QuerySignatureFromDef<Q>;\n\n <Q extends Experiment<\"2.0.8\"> | Experiment<\"2.1.0\"> | Experiment<\"2.2.0\">>(\n experiment: Q,\n ): ExperimentFns<Q>;\n\n fetchMetadata<\n Q extends (\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>\n ),\n >(o: Q): Promise<\n Q extends ObjectTypeDefinition ? ObjectMetadata\n : Q extends InterfaceDefinition ? InterfaceMetadata\n : Q extends ActionDefinition<any> ? ActionMetadata\n : Q extends QueryDefinition<any> ? QueryMetadata\n : never\n >;\n\n /** @internal */\n [additionalContext]: MinimalClient;\n}\n\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext: unique symbol = Symbol(\"additionalContext\");\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.
|
|
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.8.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\nexport type MaxOsdkVersion = typeof MaxOsdkVersion;\nconst ErrorMessage: unique symbol = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA0BA;;AAsDA;AACA;AACA,OAAO,MAAMA,iBAAgC,GAAGC,MAAM,CAAC,mBAAmB,CAAC;;AAE3E;AACA,MAAMC,cAAc,GAAG,OAAO;AAC9B;;AAEA,MAAMC,YAA2B,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
export const USER_AGENT = `osdk-client/${"2.8.0-beta.
|
|
18
|
-
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.8.0-beta.
|
|
17
|
+
export const USER_AGENT = `osdk-client/${"2.8.0-beta.2"}`;
|
|
18
|
+
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.8.0-beta.2"}`;
|
|
19
19
|
//# sourceMappingURL=UserAgent.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXUFF6M4V_cjs = require('./chunk-XUFF6M4V.cjs');
|
|
4
4
|
var chunkLDTMSHUZ_cjs = require('./chunk-LDTMSHUZ.cjs');
|
|
5
5
|
var unstable = require('@osdk/api/unstable');
|
|
6
6
|
var client_unstable = require('@osdk/client.unstable');
|
|
@@ -436,51 +436,51 @@ chunkLDTMSHUZ_cjs.__export(MediaSet_exports, {
|
|
|
436
436
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
437
437
|
var _abort = [1, "/v2/mediasets/{0}/transactions/{1}/abort", 2];
|
|
438
438
|
function abort($ctx, ...args) {
|
|
439
|
-
return
|
|
439
|
+
return chunkXUFF6M4V_cjs.foundryPlatformFetch($ctx, _abort, ...args);
|
|
440
440
|
}
|
|
441
441
|
var _calculate = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/calculate", 6];
|
|
442
442
|
function calculate($ctx, ...args) {
|
|
443
|
-
return
|
|
443
|
+
return chunkXUFF6M4V_cjs.foundryPlatformFetch($ctx, _calculate, ...args);
|
|
444
444
|
}
|
|
445
445
|
var _commit = [1, "/v2/mediasets/{0}/transactions/{1}/commit", 2];
|
|
446
446
|
function commit($ctx, ...args) {
|
|
447
|
-
return
|
|
447
|
+
return chunkXUFF6M4V_cjs.foundryPlatformFetch($ctx, _commit, ...args);
|
|
448
448
|
}
|
|
449
449
|
var _create = [1, "/v2/mediasets/{0}/transactions", 2];
|
|
450
450
|
function create($ctx, ...args) {
|
|
451
|
-
return
|
|
451
|
+
return chunkXUFF6M4V_cjs.foundryPlatformFetch($ctx, _create, ...args);
|
|
452
452
|
}
|
|
453
453
|
var _info = [0, "/v2/mediasets/{0}/items/{1}", 6];
|
|
454
454
|
function info($ctx, ...args) {
|
|
455
|
-
return
|
|
455
|
+
return chunkXUFF6M4V_cjs.foundryPlatformFetch($ctx, _info, ...args);
|
|
456
456
|
}
|
|
457
457
|
var _reference = [0, "/v2/mediasets/{0}/items/{1}/reference", 6];
|
|
458
458
|
function reference($ctx, ...args) {
|
|
459
|
-
return
|
|
459
|
+
return chunkXUFF6M4V_cjs.foundryPlatformFetch($ctx, _reference, ...args);
|
|
460
460
|
}
|
|
461
461
|
var _getRidByPath = [0, "/v2/mediasets/{0}/items/getRidByPath", 2];
|
|
462
462
|
function getRidByPath($ctx, ...args) {
|
|
463
|
-
return
|
|
463
|
+
return chunkXUFF6M4V_cjs.foundryPlatformFetch($ctx, _getRidByPath, ...args);
|
|
464
464
|
}
|
|
465
465
|
var _upload = [1, "/v2/mediasets/{0}/items", 3, "*/*"];
|
|
466
466
|
function upload($ctx, ...args) {
|
|
467
|
-
return
|
|
467
|
+
return chunkXUFF6M4V_cjs.foundryPlatformFetch($ctx, _upload, ...args);
|
|
468
468
|
}
|
|
469
469
|
var _read = [0, "/v2/mediasets/{0}/items/{1}/content", 6, , "*/*"];
|
|
470
470
|
function read($ctx, ...args) {
|
|
471
|
-
return
|
|
471
|
+
return chunkXUFF6M4V_cjs.foundryPlatformFetch($ctx, _read, ...args);
|
|
472
472
|
}
|
|
473
473
|
var _readOriginal = [0, "/v2/mediasets/{0}/items/{1}/original", 6, , "*/*"];
|
|
474
474
|
function readOriginal($ctx, ...args) {
|
|
475
|
-
return
|
|
475
|
+
return chunkXUFF6M4V_cjs.foundryPlatformFetch($ctx, _readOriginal, ...args);
|
|
476
476
|
}
|
|
477
477
|
var _retrieve = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/retrieve", 6, , "*/*"];
|
|
478
478
|
function retrieve($ctx, ...args) {
|
|
479
|
-
return
|
|
479
|
+
return chunkXUFF6M4V_cjs.foundryPlatformFetch($ctx, _retrieve, ...args);
|
|
480
480
|
}
|
|
481
481
|
var _uploadMedia = [2, "/v2/mediasets/media/upload", 7, "*/*"];
|
|
482
482
|
function uploadMedia($ctx, ...args) {
|
|
483
|
-
return
|
|
483
|
+
return chunkXUFF6M4V_cjs.foundryPlatformFetch($ctx, _uploadMedia, ...args);
|
|
484
484
|
}
|
|
485
485
|
|
|
486
486
|
// src/object/mediaUpload.ts
|
|
@@ -540,13 +540,13 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
540
540
|
return Promise.all(promiseArray);
|
|
541
541
|
}
|
|
542
542
|
if (isAttachmentUpload(value)) {
|
|
543
|
-
const attachment = await
|
|
543
|
+
const attachment = await chunkXUFF6M4V_cjs.Attachment_exports.upload(client, value.data, {
|
|
544
544
|
filename: value.name
|
|
545
545
|
});
|
|
546
546
|
return await toDataValue(attachment.rid, client);
|
|
547
547
|
}
|
|
548
548
|
if (isAttachmentFile(value)) {
|
|
549
|
-
const attachment = await
|
|
549
|
+
const attachment = await chunkXUFF6M4V_cjs.Attachment_exports.upload(client, value, {
|
|
550
550
|
filename: value.name
|
|
551
551
|
});
|
|
552
552
|
return await toDataValue(attachment.rid, client);
|
|
@@ -567,11 +567,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
567
567
|
if (isPoint(value)) {
|
|
568
568
|
return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client);
|
|
569
569
|
}
|
|
570
|
-
if (
|
|
570
|
+
if (chunkXUFF6M4V_cjs.isWireObjectSet(value)) {
|
|
571
571
|
return value;
|
|
572
572
|
}
|
|
573
|
-
if (
|
|
574
|
-
return
|
|
573
|
+
if (chunkXUFF6M4V_cjs.isObjectSet(value)) {
|
|
574
|
+
return chunkXUFF6M4V_cjs.getWireObjectSet(value);
|
|
575
575
|
}
|
|
576
576
|
if (isMediaReference(value)) {
|
|
577
577
|
return value;
|
|
@@ -594,11 +594,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
594
594
|
|
|
595
595
|
// src/actions/applyAction.ts
|
|
596
596
|
async function applyAction(client, action, parameters, options = {}) {
|
|
597
|
-
const clientWithHeaders =
|
|
597
|
+
const clientWithHeaders = chunkXUFF6M4V_cjs.addUserAgentAndRequestContextHeaders(chunkXUFF6M4V_cjs.augmentRequestContext(client, (_) => ({
|
|
598
598
|
finalMethodCall: "applyAction"
|
|
599
599
|
})), action);
|
|
600
600
|
if (Array.isArray(parameters)) {
|
|
601
|
-
const response = await
|
|
601
|
+
const response = await chunkXUFF6M4V_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
602
602
|
requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)) : [],
|
|
603
603
|
options: {
|
|
604
604
|
returnEdits: options?.$returnEdits ? "ALL" : "NONE"
|
|
@@ -609,7 +609,7 @@ async function applyAction(client, action, parameters, options = {}) {
|
|
|
609
609
|
const edits = response.edits;
|
|
610
610
|
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
611
611
|
} else {
|
|
612
|
-
const response = await
|
|
612
|
+
const response = await chunkXUFF6M4V_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
613
613
|
parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
|
|
614
614
|
options: {
|
|
615
615
|
mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
|
|
@@ -832,7 +832,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
834
|
async getLatestValue() {
|
|
835
|
-
const latestPointPromise =
|
|
835
|
+
const latestPointPromise = chunkXUFF6M4V_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
836
836
|
latestPointPromise.then(
|
|
837
837
|
(latestPoint) => this.lastFetchedValue = latestPoint,
|
|
838
838
|
// eslint-disable-next-line no-console
|
|
@@ -848,7 +848,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
848
848
|
return allPoints;
|
|
849
849
|
}
|
|
850
850
|
async *asyncIterValues(query) {
|
|
851
|
-
const streamPointsIterator = await
|
|
851
|
+
const streamPointsIterator = await chunkXUFF6M4V_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
852
852
|
range: getTimeRange(query)
|
|
853
853
|
} : {});
|
|
854
854
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -876,13 +876,13 @@ var MediaReferencePropertyImpl = class {
|
|
|
876
876
|
this.#mediaReference = mediaReference;
|
|
877
877
|
}
|
|
878
878
|
async fetchContents() {
|
|
879
|
-
return
|
|
879
|
+
return chunkXUFF6M4V_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
880
880
|
preview: true
|
|
881
881
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
882
882
|
});
|
|
883
883
|
}
|
|
884
884
|
async fetchMetadata() {
|
|
885
|
-
const r = await
|
|
885
|
+
const r = await chunkXUFF6M4V_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
886
886
|
preview: true
|
|
887
887
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
888
888
|
});
|
|
@@ -907,10 +907,10 @@ var TimeSeriesPropertyImpl = class {
|
|
|
907
907
|
this.#triplet = [objectApiName, primaryKey, propertyName];
|
|
908
908
|
}
|
|
909
909
|
async getFirstPoint() {
|
|
910
|
-
return
|
|
910
|
+
return chunkXUFF6M4V_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
911
911
|
}
|
|
912
912
|
async getLastPoint() {
|
|
913
|
-
return
|
|
913
|
+
return chunkXUFF6M4V_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
914
914
|
}
|
|
915
915
|
async getAllPoints(query) {
|
|
916
916
|
const allPoints = [];
|
|
@@ -920,7 +920,7 @@ var TimeSeriesPropertyImpl = class {
|
|
|
920
920
|
return allPoints;
|
|
921
921
|
}
|
|
922
922
|
async *asyncIterPoints(query) {
|
|
923
|
-
const streamPointsIterator = await
|
|
923
|
+
const streamPointsIterator = await chunkXUFF6M4V_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
924
924
|
range: getTimeRange(query)
|
|
925
925
|
} : {});
|
|
926
926
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -1338,8 +1338,8 @@ function get$link(holder) {
|
|
|
1338
1338
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1339
1339
|
}).pivotTo(linkName);
|
|
1340
1340
|
const value = !linkDef.multiplicity ? {
|
|
1341
|
-
fetchOne: (options) =>
|
|
1342
|
-
fetchOneWithErrors: (options) =>
|
|
1341
|
+
fetchOne: (options) => chunkXUFF6M4V_cjs.fetchSingle(client, objDef, options ?? {}, chunkXUFF6M4V_cjs.getWireObjectSet(objectSet)),
|
|
1342
|
+
fetchOneWithErrors: (options) => chunkXUFF6M4V_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkXUFF6M4V_cjs.getWireObjectSet(objectSet))
|
|
1343
1343
|
} : objectSet;
|
|
1344
1344
|
return [linkName, value];
|
|
1345
1345
|
})));
|
|
@@ -1355,8 +1355,8 @@ function get$linkForInterface(holder) {
|
|
|
1355
1355
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1356
1356
|
})).pivotTo(linkName);
|
|
1357
1357
|
const value = !linkDef.multiplicity ? {
|
|
1358
|
-
fetchOne: (options) =>
|
|
1359
|
-
fetchOneWithErrors: (options) =>
|
|
1358
|
+
fetchOne: (options) => chunkXUFF6M4V_cjs.fetchSingle(client, objDef, options ?? {}, chunkXUFF6M4V_cjs.getWireObjectSet(objectSet)),
|
|
1359
|
+
fetchOneWithErrors: (options) => chunkXUFF6M4V_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkXUFF6M4V_cjs.getWireObjectSet(objectSet))
|
|
1360
1360
|
} : objectSet;
|
|
1361
1361
|
return [linkName, value];
|
|
1362
1362
|
})));
|
|
@@ -1364,7 +1364,7 @@ function get$linkForInterface(holder) {
|
|
|
1364
1364
|
|
|
1365
1365
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
1366
1366
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1367
|
-
const [objApiNamespace] =
|
|
1367
|
+
const [objApiNamespace] = chunkXUFF6M4V_cjs.extractNamespace(interfaceDef.apiName);
|
|
1368
1368
|
return Object.freeze(Object.defineProperties({}, {
|
|
1369
1369
|
// first to minimize hidden classes
|
|
1370
1370
|
[UnderlyingOsdkObject]: {
|
|
@@ -1427,7 +1427,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1427
1427
|
},
|
|
1428
1428
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1429
1429
|
const objDef = underlying[ObjectDefRef];
|
|
1430
|
-
const [apiNamespace, apiName] =
|
|
1430
|
+
const [apiNamespace, apiName] = chunkXUFF6M4V_cjs.extractNamespace(p);
|
|
1431
1431
|
const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
|
|
1432
1432
|
return [apiNamespace === objApiNamespace ? apiName : p, {
|
|
1433
1433
|
enumerable: targetPropName in underlying,
|
|
@@ -1602,9 +1602,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1602
1602
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1603
1603
|
case "attachment":
|
|
1604
1604
|
if (Array.isArray(rawValue)) {
|
|
1605
|
-
return rawValue.map((a) =>
|
|
1605
|
+
return rawValue.map((a) => chunkXUFF6M4V_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1606
1606
|
} else {
|
|
1607
|
-
return
|
|
1607
|
+
return chunkXUFF6M4V_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1608
1608
|
}
|
|
1609
1609
|
default:
|
|
1610
1610
|
process.env.NODE_ENV !== "production" ? invariant3__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant3__default.default(false) ;
|
|
@@ -1620,9 +1620,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1620
1620
|
}
|
|
1621
1621
|
if (propDef.type === "attachment") {
|
|
1622
1622
|
if (Array.isArray(rawValue)) {
|
|
1623
|
-
return rawValue.map((a) =>
|
|
1623
|
+
return rawValue.map((a) => chunkXUFF6M4V_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1624
1624
|
}
|
|
1625
|
-
return
|
|
1625
|
+
return chunkXUFF6M4V_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1626
1626
|
}
|
|
1627
1627
|
if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
|
|
1628
1628
|
return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
|
|
@@ -1923,7 +1923,7 @@ function deepFreeze(obj) {
|
|
|
1923
1923
|
// src/ontology/loadActionMetadata.ts
|
|
1924
1924
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1925
1925
|
async function loadActionMetadata(client, actionType) {
|
|
1926
|
-
const r = await
|
|
1926
|
+
const r = await chunkXUFF6M4V_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType, {
|
|
1927
1927
|
branch: client.branch
|
|
1928
1928
|
});
|
|
1929
1929
|
return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
|
|
@@ -1932,7 +1932,7 @@ async function loadActionMetadata(client, actionType) {
|
|
|
1932
1932
|
// src/ontology/loadFullObjectMetadata.ts
|
|
1933
1933
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1934
1934
|
async function loadFullObjectMetadata(client, objectType) {
|
|
1935
|
-
const full = await
|
|
1935
|
+
const full = await chunkXUFF6M4V_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
|
|
1936
1936
|
preview: true,
|
|
1937
1937
|
branch: client.branch
|
|
1938
1938
|
});
|
|
@@ -1945,7 +1945,7 @@ async function loadFullObjectMetadata(client, objectType) {
|
|
|
1945
1945
|
// src/ontology/loadInterfaceMetadata.ts
|
|
1946
1946
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1947
1947
|
async function loadInterfaceMetadata(client, objectType) {
|
|
1948
|
-
const r = await
|
|
1948
|
+
const r = await chunkXUFF6M4V_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
|
|
1949
1949
|
preview: true,
|
|
1950
1950
|
branch: client.branch
|
|
1951
1951
|
});
|
|
@@ -1956,7 +1956,7 @@ async function loadInterfaceMetadata(client, objectType) {
|
|
|
1956
1956
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1957
1957
|
async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
|
|
1958
1958
|
const [apiName, version] = queryTypeApiNameAndVersion.split(":");
|
|
1959
|
-
const r = await
|
|
1959
|
+
const r = await chunkXUFF6M4V_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
|
|
1960
1960
|
version
|
|
1961
1961
|
});
|
|
1962
1962
|
return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
|
|
@@ -2014,11 +2014,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
2014
2014
|
|
|
2015
2015
|
// src/util/UserAgent.ts
|
|
2016
2016
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
2017
|
-
var USER_AGENT = `osdk-client/${"2.8.0-beta.
|
|
2018
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.8.0-beta.
|
|
2017
|
+
var USER_AGENT = `osdk-client/${"2.8.0-beta.2"}`;
|
|
2018
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.8.0-beta.2"}`;
|
|
2019
2019
|
|
|
2020
2020
|
// src/createMinimalClient.ts
|
|
2021
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
2021
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkXUFF6M4V_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
2022
2022
|
if (process.env.NODE_ENV !== "production") {
|
|
2023
2023
|
try {
|
|
2024
2024
|
new URL(baseUrl);
|
|
@@ -2091,13 +2091,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
2091
2091
|
switch (desiredType.type) {
|
|
2092
2092
|
case "attachment": {
|
|
2093
2093
|
if (isAttachmentUpload(value)) {
|
|
2094
|
-
const attachment = await
|
|
2094
|
+
const attachment = await chunkXUFF6M4V_cjs.Attachment_exports.upload(client, value.data, {
|
|
2095
2095
|
filename: value.name
|
|
2096
2096
|
});
|
|
2097
2097
|
return attachment.rid;
|
|
2098
2098
|
}
|
|
2099
2099
|
if (isAttachmentFile(value)) {
|
|
2100
|
-
const attachment = await
|
|
2100
|
+
const attachment = await chunkXUFF6M4V_cjs.Attachment_exports.upload(client, value, {
|
|
2101
2101
|
filename: value.name
|
|
2102
2102
|
});
|
|
2103
2103
|
return attachment.rid;
|
|
@@ -2137,11 +2137,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
2137
2137
|
}
|
|
2138
2138
|
case "objectSet":
|
|
2139
2139
|
case "interfaceObjectSet": {
|
|
2140
|
-
if (
|
|
2140
|
+
if (chunkXUFF6M4V_cjs.isWireObjectSet(value)) {
|
|
2141
2141
|
return value;
|
|
2142
2142
|
}
|
|
2143
|
-
if (
|
|
2144
|
-
return
|
|
2143
|
+
if (chunkXUFF6M4V_cjs.isObjectSet(value)) {
|
|
2144
|
+
return chunkXUFF6M4V_cjs.getWireObjectSet(value);
|
|
2145
2145
|
}
|
|
2146
2146
|
break;
|
|
2147
2147
|
}
|
|
@@ -2186,7 +2186,7 @@ async function applyQuery(client, query, params) {
|
|
|
2186
2186
|
if (client.flushEdits != null) {
|
|
2187
2187
|
await client.flushEdits();
|
|
2188
2188
|
}
|
|
2189
|
-
const response = await
|
|
2189
|
+
const response = await chunkXUFF6M4V_cjs.Query_exports.execute(chunkXUFF6M4V_cjs.addUserAgentAndRequestContextHeaders(chunkXUFF6M4V_cjs.augmentRequestContext(client, (_) => ({
|
|
2190
2190
|
finalMethodCall: "applyQuery"
|
|
2191
2191
|
})), query), await client.ontologyRid, query.apiName, {
|
|
2192
2192
|
parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
|
|
@@ -2230,7 +2230,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2230
2230
|
return responseValue;
|
|
2231
2231
|
}
|
|
2232
2232
|
case "attachment": {
|
|
2233
|
-
return
|
|
2233
|
+
return chunkXUFF6M4V_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
2234
2234
|
}
|
|
2235
2235
|
case "object": {
|
|
2236
2236
|
const def = definitions.get(responseDataType.object);
|
|
@@ -2252,7 +2252,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2252
2252
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
2253
2253
|
}
|
|
2254
2254
|
if (typeof responseValue === "string") {
|
|
2255
|
-
return
|
|
2255
|
+
return chunkXUFF6M4V_cjs.createObjectSet(def, client, {
|
|
2256
2256
|
type: "intersect",
|
|
2257
2257
|
objectSets: [{
|
|
2258
2258
|
type: "base",
|
|
@@ -2263,7 +2263,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2263
2263
|
}]
|
|
2264
2264
|
});
|
|
2265
2265
|
}
|
|
2266
|
-
return
|
|
2266
|
+
return chunkXUFF6M4V_cjs.createObjectSet(def, client, responseValue);
|
|
2267
2267
|
}
|
|
2268
2268
|
case "struct": {
|
|
2269
2269
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -2457,7 +2457,7 @@ function createClientInternal(objectSetFactory, transactionRid, flushEdits, base
|
|
|
2457
2457
|
ontologyRid
|
|
2458
2458
|
}, baseUrl, tokenProvider, {
|
|
2459
2459
|
...options,
|
|
2460
|
-
logger: options?.logger ?? new
|
|
2460
|
+
logger: options?.logger ?? new chunkXUFF6M4V_cjs.MinimalLogger(),
|
|
2461
2461
|
transactionId: transactionRid,
|
|
2462
2462
|
flushEdits,
|
|
2463
2463
|
branch: options?.branch
|
|
@@ -2481,7 +2481,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2481
2481
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2482
2482
|
return {
|
|
2483
2483
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2484
|
-
return await
|
|
2484
|
+
return await chunkXUFF6M4V_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2485
2485
|
}
|
|
2486
2486
|
};
|
|
2487
2487
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -2493,7 +2493,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2493
2493
|
objectType,
|
|
2494
2494
|
propertyType
|
|
2495
2495
|
} = args;
|
|
2496
|
-
return await
|
|
2496
|
+
return await chunkXUFF6M4V_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
|
|
2497
2497
|
mediaItemPath: fileName,
|
|
2498
2498
|
preview: true
|
|
2499
2499
|
});
|
|
@@ -2502,10 +2502,10 @@ function createClientFromContext(clientCtx) {
|
|
|
2502
2502
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
2503
2503
|
return {
|
|
2504
2504
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
2505
|
-
return await
|
|
2505
|
+
return await chunkXUFF6M4V_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
2506
2506
|
},
|
|
2507
2507
|
fetchPageByRidNoType: async (rids, options) => {
|
|
2508
|
-
return await
|
|
2508
|
+
return await chunkXUFF6M4V_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
2509
2509
|
}
|
|
2510
2510
|
};
|
|
2511
2511
|
}
|
|
@@ -2517,13 +2517,13 @@ function createClientFromContext(clientCtx) {
|
|
|
2517
2517
|
const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
|
|
2518
2518
|
const symbolClientContext2 = "__osdkClientContext";
|
|
2519
2519
|
const client = Object.defineProperties(clientFn, {
|
|
2520
|
-
[
|
|
2520
|
+
[chunkXUFF6M4V_cjs.symbolClientContext]: {
|
|
2521
2521
|
value: clientCtx
|
|
2522
2522
|
},
|
|
2523
2523
|
[symbolClientContext2]: {
|
|
2524
2524
|
value: clientCtx
|
|
2525
2525
|
},
|
|
2526
|
-
[
|
|
2526
|
+
[chunkXUFF6M4V_cjs.additionalContext]: {
|
|
2527
2527
|
value: clientCtx
|
|
2528
2528
|
},
|
|
2529
2529
|
fetchMetadata: {
|
|
@@ -2532,8 +2532,8 @@ function createClientFromContext(clientCtx) {
|
|
|
2532
2532
|
});
|
|
2533
2533
|
return client;
|
|
2534
2534
|
}
|
|
2535
|
-
var createClient = createClientInternal.bind(void 0,
|
|
2536
|
-
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(
|
|
2535
|
+
var createClient = createClientInternal.bind(void 0, chunkXUFF6M4V_cjs.createObjectSet, void 0, void 0);
|
|
2536
|
+
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkXUFF6M4V_cjs.createObjectSet, transactionRid, flushEdits, ...args);
|
|
2537
2537
|
function createWithRid(rids) {
|
|
2538
2538
|
const withRid = {
|
|
2539
2539
|
type: "static",
|
|
@@ -2557,5 +2557,5 @@ exports.createObjectSpecifierFromPrimaryKey = createObjectSpecifierFromPrimaryKe
|
|
|
2557
2557
|
exports.createOsdkObject = createOsdkObject;
|
|
2558
2558
|
exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
|
|
2559
2559
|
exports.isObjectSpecifiersObject = isObjectSpecifiersObject;
|
|
2560
|
-
//# sourceMappingURL=chunk-
|
|
2561
|
-
//# sourceMappingURL=chunk-
|
|
2560
|
+
//# sourceMappingURL=chunk-II23HDVV.cjs.map
|
|
2561
|
+
//# sourceMappingURL=chunk-II23HDVV.cjs.map
|