@osdk/client 2.7.0 → 2.7.1
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 +8 -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-W4BHRZWL.cjs → chunk-OVZCGOMG.cjs} +65 -65
- package/build/cjs/{chunk-W4BHRZWL.cjs.map → chunk-OVZCGOMG.cjs.map} +1 -1
- package/build/cjs/{chunk-Y362HOIZ.cjs → chunk-OZNDU7AU.cjs} +2 -2
- package/build/cjs/{chunk-Y362HOIZ.cjs.map → chunk-OZNDU7AU.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 +6 -6
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.7.
|
|
24
|
+
const MaxOsdkVersion = "2.7.1";
|
|
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.7.
|
|
1
|
+
{"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionDefinition,\n ActionMetadata,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n ObjectMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n VersionBound,\n} from \"@osdk/api\";\nimport type {\n Experiment,\n ExperimentFns,\n MinimalObjectSet,\n} from \"@osdk/api/unstable\";\nimport type { SharedClient } from \"@osdk/shared.client2\";\nimport type { ActionSignatureFromDef } from \"./actions/applyAction.js\";\nimport type { MinimalClient } from \"./MinimalClientContext.js\";\nimport type { QuerySignatureFromDef } from \"./queries/types.js\";\nimport type { SatisfiesSemver } from \"./SatisfiesSemver.js\";\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\ntype OldSharedClient = import(\"@osdk/shared.client\").SharedClient;\n\nexport type CheckVersionBound<Q> = Q extends VersionBound<infer V> ? (\n SatisfiesSemver<V, MaxOsdkVersion> extends true ? Q\n : Q & {\n [ErrorMessage]:\n `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\n }\n )\n : Q;\n\nexport interface Client extends SharedClient, OldSharedClient {\n <Q extends ObjectTypeDefinition>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? ObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n <Q extends (InterfaceDefinition)>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? MinimalObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n <Q extends ActionDefinition<any>>(\n o: Q,\n ): ActionSignatureFromDef<Q>;\n\n <Q extends QueryDefinition<any>>(\n o: Q,\n ): QuerySignatureFromDef<Q>;\n\n <Q extends Experiment<\"2.0.8\"> | Experiment<\"2.1.0\"> | Experiment<\"2.2.0\">>(\n experiment: Q,\n ): ExperimentFns<Q>;\n\n fetchMetadata<\n Q extends (\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>\n ),\n >(o: Q): Promise<\n Q extends ObjectTypeDefinition ? ObjectMetadata\n : Q extends InterfaceDefinition ? InterfaceMetadata\n : Q extends ActionDefinition<any> ? ActionMetadata\n : Q extends QueryDefinition<any> ? QueryMetadata\n : never\n >;\n\n /** @internal */\n [additionalContext]: MinimalClient;\n}\n\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext: unique symbol = Symbol(\"additionalContext\");\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.7.1\";\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.7.
|
|
18
|
-
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.
|
|
17
|
+
export const USER_AGENT = `osdk-client/${"2.7.1"}`;
|
|
18
|
+
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.1"}`;
|
|
19
19
|
//# sourceMappingURL=UserAgent.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkOZNDU7AU_cjs = require('./chunk-OZNDU7AU.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 chunkOZNDU7AU_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 chunkOZNDU7AU_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 chunkOZNDU7AU_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 chunkOZNDU7AU_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 chunkOZNDU7AU_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 chunkOZNDU7AU_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 chunkOZNDU7AU_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 chunkOZNDU7AU_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 chunkOZNDU7AU_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 chunkOZNDU7AU_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 chunkOZNDU7AU_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 chunkOZNDU7AU_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 chunkOZNDU7AU_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 chunkOZNDU7AU_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 (chunkOZNDU7AU_cjs.isWireObjectSet(value)) {
|
|
571
571
|
return value;
|
|
572
572
|
}
|
|
573
|
-
if (
|
|
574
|
-
return
|
|
573
|
+
if (chunkOZNDU7AU_cjs.isObjectSet(value)) {
|
|
574
|
+
return chunkOZNDU7AU_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 = chunkOZNDU7AU_cjs.addUserAgentAndRequestContextHeaders(chunkOZNDU7AU_cjs.augmentRequestContext(client, (_) => ({
|
|
598
598
|
finalMethodCall: "applyAction"
|
|
599
599
|
})), action);
|
|
600
600
|
if (Array.isArray(parameters)) {
|
|
601
|
-
const response = await
|
|
601
|
+
const response = await chunkOZNDU7AU_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"
|
|
@@ -607,7 +607,7 @@ async function applyAction(client, action, parameters, options = {}) {
|
|
|
607
607
|
const edits = response.edits;
|
|
608
608
|
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
609
609
|
} else {
|
|
610
|
-
const response = await
|
|
610
|
+
const response = await chunkOZNDU7AU_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
611
611
|
parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
|
|
612
612
|
options: {
|
|
613
613
|
mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
|
|
@@ -828,7 +828,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
828
828
|
}
|
|
829
829
|
}
|
|
830
830
|
async getLatestValue() {
|
|
831
|
-
const latestPointPromise =
|
|
831
|
+
const latestPointPromise = chunkOZNDU7AU_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
832
832
|
latestPointPromise.then(
|
|
833
833
|
(latestPoint) => this.lastFetchedValue = latestPoint,
|
|
834
834
|
// eslint-disable-next-line no-console
|
|
@@ -844,7 +844,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
844
844
|
return allPoints;
|
|
845
845
|
}
|
|
846
846
|
async *asyncIterValues(query) {
|
|
847
|
-
const streamPointsIterator = await
|
|
847
|
+
const streamPointsIterator = await chunkOZNDU7AU_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
848
848
|
range: getTimeRange(query)
|
|
849
849
|
} : {});
|
|
850
850
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -872,13 +872,13 @@ var MediaReferencePropertyImpl = class {
|
|
|
872
872
|
this.#mediaReference = mediaReference;
|
|
873
873
|
}
|
|
874
874
|
async fetchContents() {
|
|
875
|
-
return
|
|
875
|
+
return chunkOZNDU7AU_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
876
876
|
preview: true
|
|
877
877
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
878
878
|
});
|
|
879
879
|
}
|
|
880
880
|
async fetchMetadata() {
|
|
881
|
-
const r = await
|
|
881
|
+
const r = await chunkOZNDU7AU_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
882
882
|
preview: true
|
|
883
883
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
884
884
|
});
|
|
@@ -903,10 +903,10 @@ var TimeSeriesPropertyImpl = class {
|
|
|
903
903
|
this.#triplet = [objectApiName, primaryKey, propertyName];
|
|
904
904
|
}
|
|
905
905
|
async getFirstPoint() {
|
|
906
|
-
return
|
|
906
|
+
return chunkOZNDU7AU_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
907
907
|
}
|
|
908
908
|
async getLastPoint() {
|
|
909
|
-
return
|
|
909
|
+
return chunkOZNDU7AU_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
910
910
|
}
|
|
911
911
|
async getAllPoints(query) {
|
|
912
912
|
const allPoints = [];
|
|
@@ -916,7 +916,7 @@ var TimeSeriesPropertyImpl = class {
|
|
|
916
916
|
return allPoints;
|
|
917
917
|
}
|
|
918
918
|
async *asyncIterPoints(query) {
|
|
919
|
-
const streamPointsIterator = await
|
|
919
|
+
const streamPointsIterator = await chunkOZNDU7AU_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
920
920
|
range: getTimeRange(query)
|
|
921
921
|
} : {});
|
|
922
922
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -1333,8 +1333,8 @@ function get$link(holder) {
|
|
|
1333
1333
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1334
1334
|
}).pivotTo(linkName);
|
|
1335
1335
|
const value = !linkDef.multiplicity ? {
|
|
1336
|
-
fetchOne: (options) =>
|
|
1337
|
-
fetchOneWithErrors: (options) =>
|
|
1336
|
+
fetchOne: (options) => chunkOZNDU7AU_cjs.fetchSingle(client, objDef, options ?? {}, chunkOZNDU7AU_cjs.getWireObjectSet(objectSet)),
|
|
1337
|
+
fetchOneWithErrors: (options) => chunkOZNDU7AU_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkOZNDU7AU_cjs.getWireObjectSet(objectSet))
|
|
1338
1338
|
} : objectSet;
|
|
1339
1339
|
return [linkName, value];
|
|
1340
1340
|
})));
|
|
@@ -1350,8 +1350,8 @@ function get$linkForInterface(holder) {
|
|
|
1350
1350
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1351
1351
|
})).pivotTo(linkName);
|
|
1352
1352
|
const value = !linkDef.multiplicity ? {
|
|
1353
|
-
fetchOne: (options) =>
|
|
1354
|
-
fetchOneWithErrors: (options) =>
|
|
1353
|
+
fetchOne: (options) => chunkOZNDU7AU_cjs.fetchSingle(client, objDef, options ?? {}, chunkOZNDU7AU_cjs.getWireObjectSet(objectSet)),
|
|
1354
|
+
fetchOneWithErrors: (options) => chunkOZNDU7AU_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkOZNDU7AU_cjs.getWireObjectSet(objectSet))
|
|
1355
1355
|
} : objectSet;
|
|
1356
1356
|
return [linkName, value];
|
|
1357
1357
|
})));
|
|
@@ -1359,7 +1359,7 @@ function get$linkForInterface(holder) {
|
|
|
1359
1359
|
|
|
1360
1360
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
1361
1361
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1362
|
-
const [objApiNamespace] =
|
|
1362
|
+
const [objApiNamespace] = chunkOZNDU7AU_cjs.extractNamespace(interfaceDef.apiName);
|
|
1363
1363
|
return Object.freeze(Object.defineProperties({}, {
|
|
1364
1364
|
// first to minimize hidden classes
|
|
1365
1365
|
[UnderlyingOsdkObject]: {
|
|
@@ -1418,7 +1418,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1418
1418
|
},
|
|
1419
1419
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1420
1420
|
const objDef = underlying[ObjectDefRef];
|
|
1421
|
-
const [apiNamespace, apiName] =
|
|
1421
|
+
const [apiNamespace, apiName] = chunkOZNDU7AU_cjs.extractNamespace(p);
|
|
1422
1422
|
const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
|
|
1423
1423
|
return [apiNamespace === objApiNamespace ? apiName : p, {
|
|
1424
1424
|
enumerable: targetPropName in underlying,
|
|
@@ -1579,9 +1579,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1579
1579
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1580
1580
|
case "attachment":
|
|
1581
1581
|
if (Array.isArray(rawValue)) {
|
|
1582
|
-
return rawValue.map((a) =>
|
|
1582
|
+
return rawValue.map((a) => chunkOZNDU7AU_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1583
1583
|
} else {
|
|
1584
|
-
return
|
|
1584
|
+
return chunkOZNDU7AU_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1585
1585
|
}
|
|
1586
1586
|
default:
|
|
1587
1587
|
process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
|
|
@@ -1597,9 +1597,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1597
1597
|
}
|
|
1598
1598
|
if (propDef.type === "attachment") {
|
|
1599
1599
|
if (Array.isArray(rawValue)) {
|
|
1600
|
-
return rawValue.map((a) =>
|
|
1600
|
+
return rawValue.map((a) => chunkOZNDU7AU_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1601
1601
|
}
|
|
1602
|
-
return
|
|
1602
|
+
return chunkOZNDU7AU_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1603
1603
|
}
|
|
1604
1604
|
if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
|
|
1605
1605
|
return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
|
|
@@ -1835,14 +1835,14 @@ function deepFreeze(obj) {
|
|
|
1835
1835
|
// src/ontology/loadActionMetadata.ts
|
|
1836
1836
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1837
1837
|
async function loadActionMetadata(client, actionType) {
|
|
1838
|
-
const r = await
|
|
1838
|
+
const r = await chunkOZNDU7AU_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType);
|
|
1839
1839
|
return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
|
|
1840
1840
|
}
|
|
1841
1841
|
|
|
1842
1842
|
// src/ontology/loadFullObjectMetadata.ts
|
|
1843
1843
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1844
1844
|
async function loadFullObjectMetadata(client, objectType) {
|
|
1845
|
-
const full = await
|
|
1845
|
+
const full = await chunkOZNDU7AU_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
|
|
1846
1846
|
preview: true
|
|
1847
1847
|
});
|
|
1848
1848
|
const ret = generatorConverters.wireObjectTypeFullMetadataToSdkObjectMetadata(full, true);
|
|
@@ -1854,7 +1854,7 @@ async function loadFullObjectMetadata(client, objectType) {
|
|
|
1854
1854
|
// src/ontology/loadInterfaceMetadata.ts
|
|
1855
1855
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1856
1856
|
async function loadInterfaceMetadata(client, objectType) {
|
|
1857
|
-
const r = await
|
|
1857
|
+
const r = await chunkOZNDU7AU_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
|
|
1858
1858
|
preview: true
|
|
1859
1859
|
});
|
|
1860
1860
|
return generatorConverters.__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(r, true);
|
|
@@ -1864,7 +1864,7 @@ async function loadInterfaceMetadata(client, objectType) {
|
|
|
1864
1864
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1865
1865
|
async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
|
|
1866
1866
|
const [apiName, version] = queryTypeApiNameAndVersion.split(":");
|
|
1867
|
-
const r = await
|
|
1867
|
+
const r = await chunkOZNDU7AU_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
|
|
1868
1868
|
version
|
|
1869
1869
|
});
|
|
1870
1870
|
return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
|
|
@@ -1922,11 +1922,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1922
1922
|
|
|
1923
1923
|
// src/util/UserAgent.ts
|
|
1924
1924
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1925
|
-
var USER_AGENT = `osdk-client/${"2.7.
|
|
1926
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.
|
|
1925
|
+
var USER_AGENT = `osdk-client/${"2.7.1"}`;
|
|
1926
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.1"}`;
|
|
1927
1927
|
|
|
1928
1928
|
// src/createMinimalClient.ts
|
|
1929
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1929
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkOZNDU7AU_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1930
1930
|
if (process.env.NODE_ENV !== "production") {
|
|
1931
1931
|
try {
|
|
1932
1932
|
new URL(baseUrl);
|
|
@@ -1998,13 +1998,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1998
1998
|
switch (desiredType.type) {
|
|
1999
1999
|
case "attachment": {
|
|
2000
2000
|
if (isAttachmentUpload(value)) {
|
|
2001
|
-
const attachment = await
|
|
2001
|
+
const attachment = await chunkOZNDU7AU_cjs.Attachment_exports.upload(client, value.data, {
|
|
2002
2002
|
filename: value.name
|
|
2003
2003
|
});
|
|
2004
2004
|
return attachment.rid;
|
|
2005
2005
|
}
|
|
2006
2006
|
if (isAttachmentFile(value)) {
|
|
2007
|
-
const attachment = await
|
|
2007
|
+
const attachment = await chunkOZNDU7AU_cjs.Attachment_exports.upload(client, value, {
|
|
2008
2008
|
filename: value.name
|
|
2009
2009
|
});
|
|
2010
2010
|
return attachment.rid;
|
|
@@ -2044,11 +2044,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
2044
2044
|
}
|
|
2045
2045
|
case "objectSet":
|
|
2046
2046
|
case "interfaceObjectSet": {
|
|
2047
|
-
if (
|
|
2047
|
+
if (chunkOZNDU7AU_cjs.isWireObjectSet(value)) {
|
|
2048
2048
|
return value;
|
|
2049
2049
|
}
|
|
2050
|
-
if (
|
|
2051
|
-
return
|
|
2050
|
+
if (chunkOZNDU7AU_cjs.isObjectSet(value)) {
|
|
2051
|
+
return chunkOZNDU7AU_cjs.getWireObjectSet(value);
|
|
2052
2052
|
}
|
|
2053
2053
|
break;
|
|
2054
2054
|
}
|
|
@@ -2093,7 +2093,7 @@ async function applyQuery(client, query, params) {
|
|
|
2093
2093
|
if (client.flushEdits != null) {
|
|
2094
2094
|
await client.flushEdits();
|
|
2095
2095
|
}
|
|
2096
|
-
const response = await
|
|
2096
|
+
const response = await chunkOZNDU7AU_cjs.Query_exports.execute(chunkOZNDU7AU_cjs.addUserAgentAndRequestContextHeaders(chunkOZNDU7AU_cjs.augmentRequestContext(client, (_) => ({
|
|
2097
2097
|
finalMethodCall: "applyQuery"
|
|
2098
2098
|
})), query), await client.ontologyRid, query.apiName, {
|
|
2099
2099
|
parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
|
|
@@ -2137,7 +2137,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2137
2137
|
return responseValue;
|
|
2138
2138
|
}
|
|
2139
2139
|
case "attachment": {
|
|
2140
|
-
return
|
|
2140
|
+
return chunkOZNDU7AU_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
2141
2141
|
}
|
|
2142
2142
|
case "object": {
|
|
2143
2143
|
const def = definitions.get(responseDataType.object);
|
|
@@ -2159,7 +2159,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2159
2159
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
2160
2160
|
}
|
|
2161
2161
|
if (typeof responseValue === "string") {
|
|
2162
|
-
return
|
|
2162
|
+
return chunkOZNDU7AU_cjs.createObjectSet(def, client, {
|
|
2163
2163
|
type: "intersect",
|
|
2164
2164
|
objectSets: [{
|
|
2165
2165
|
type: "base",
|
|
@@ -2170,7 +2170,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2170
2170
|
}]
|
|
2171
2171
|
});
|
|
2172
2172
|
}
|
|
2173
|
-
return
|
|
2173
|
+
return chunkOZNDU7AU_cjs.createObjectSet(def, client, responseValue);
|
|
2174
2174
|
}
|
|
2175
2175
|
case "struct": {
|
|
2176
2176
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -2364,7 +2364,7 @@ function createClientInternal(objectSetFactory, transactionRid, flushEdits, base
|
|
|
2364
2364
|
ontologyRid
|
|
2365
2365
|
}, baseUrl, tokenProvider, {
|
|
2366
2366
|
...options,
|
|
2367
|
-
logger: options?.logger ?? new
|
|
2367
|
+
logger: options?.logger ?? new chunkOZNDU7AU_cjs.MinimalLogger(),
|
|
2368
2368
|
transactionId: transactionRid,
|
|
2369
2369
|
flushEdits
|
|
2370
2370
|
}, fetchFn, objectSetFactory);
|
|
@@ -2387,7 +2387,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2387
2387
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2388
2388
|
return {
|
|
2389
2389
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2390
|
-
return await
|
|
2390
|
+
return await chunkOZNDU7AU_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2391
2391
|
}
|
|
2392
2392
|
};
|
|
2393
2393
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -2399,7 +2399,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2399
2399
|
objectType,
|
|
2400
2400
|
propertyType
|
|
2401
2401
|
} = args;
|
|
2402
|
-
return await
|
|
2402
|
+
return await chunkOZNDU7AU_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
|
|
2403
2403
|
mediaItemPath: fileName,
|
|
2404
2404
|
preview: true
|
|
2405
2405
|
});
|
|
@@ -2408,10 +2408,10 @@ function createClientFromContext(clientCtx) {
|
|
|
2408
2408
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
2409
2409
|
return {
|
|
2410
2410
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
2411
|
-
return await
|
|
2411
|
+
return await chunkOZNDU7AU_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
2412
2412
|
},
|
|
2413
2413
|
fetchPageByRidNoType: async (rids, options) => {
|
|
2414
|
-
return await
|
|
2414
|
+
return await chunkOZNDU7AU_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
2415
2415
|
}
|
|
2416
2416
|
};
|
|
2417
2417
|
}
|
|
@@ -2423,13 +2423,13 @@ function createClientFromContext(clientCtx) {
|
|
|
2423
2423
|
const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
|
|
2424
2424
|
const symbolClientContext2 = "__osdkClientContext";
|
|
2425
2425
|
const client = Object.defineProperties(clientFn, {
|
|
2426
|
-
[
|
|
2426
|
+
[chunkOZNDU7AU_cjs.symbolClientContext]: {
|
|
2427
2427
|
value: clientCtx
|
|
2428
2428
|
},
|
|
2429
2429
|
[symbolClientContext2]: {
|
|
2430
2430
|
value: clientCtx
|
|
2431
2431
|
},
|
|
2432
|
-
[
|
|
2432
|
+
[chunkOZNDU7AU_cjs.additionalContext]: {
|
|
2433
2433
|
value: clientCtx
|
|
2434
2434
|
},
|
|
2435
2435
|
fetchMetadata: {
|
|
@@ -2438,8 +2438,8 @@ function createClientFromContext(clientCtx) {
|
|
|
2438
2438
|
});
|
|
2439
2439
|
return client;
|
|
2440
2440
|
}
|
|
2441
|
-
var createClient = createClientInternal.bind(void 0,
|
|
2442
|
-
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(
|
|
2441
|
+
var createClient = createClientInternal.bind(void 0, chunkOZNDU7AU_cjs.createObjectSet, void 0, void 0);
|
|
2442
|
+
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkOZNDU7AU_cjs.createObjectSet, transactionRid, flushEdits, ...args);
|
|
2443
2443
|
function createWithRid(rids) {
|
|
2444
2444
|
const withRid = {
|
|
2445
2445
|
type: "static",
|
|
@@ -2463,5 +2463,5 @@ exports.createObjectSpecifierFromPrimaryKey = createObjectSpecifierFromPrimaryKe
|
|
|
2463
2463
|
exports.createOsdkObject = createOsdkObject;
|
|
2464
2464
|
exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
|
|
2465
2465
|
exports.isObjectSpecifiersObject = isObjectSpecifiersObject;
|
|
2466
|
-
//# sourceMappingURL=chunk-
|
|
2467
|
-
//# sourceMappingURL=chunk-
|
|
2466
|
+
//# sourceMappingURL=chunk-OVZCGOMG.cjs.map
|
|
2467
|
+
//# sourceMappingURL=chunk-OVZCGOMG.cjs.map
|