@osdk/client 2.7.4 → 2.7.5
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/observable/ObservableClient.js.map +1 -1
- package/build/browser/observable/computeObjectSetCacheKey.js.map +1 -1
- package/build/browser/observable/internal/ObservableClientImpl.js.map +1 -1
- package/build/browser/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/{chunk-PB7MVFLN.cjs → chunk-B5QGX6YV.cjs} +2 -2
- package/build/cjs/{chunk-PB7MVFLN.cjs.map → chunk-B5QGX6YV.cjs.map} +1 -1
- package/build/cjs/{chunk-6LJGUV2Z.cjs → chunk-N4XMAVKO.cjs} +65 -65
- package/build/cjs/{chunk-6LJGUV2Z.cjs.map → chunk-N4XMAVKO.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 +55 -55
- package/build/cjs/public/unstable-do-not-use.d.cts +3 -3
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/observable/ObservableClient.js.map +1 -1
- package/build/esm/observable/computeObjectSetCacheKey.js.map +1 -1
- package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -1
- package/build/esm/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/types/Client.d.ts +1 -1
- package/build/types/observable/ObservableClient.d.ts +1 -1
- package/build/types/observable/computeObjectSetCacheKey.d.ts +2 -2
- package/build/types/observable/computeObjectSetCacheKey.d.ts.map +1 -1
- package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts +2 -2
- package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkB5QGX6YV_cjs = require('./chunk-B5QGX6YV.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 chunkB5QGX6YV_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 chunkB5QGX6YV_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 chunkB5QGX6YV_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 chunkB5QGX6YV_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 chunkB5QGX6YV_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 chunkB5QGX6YV_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 chunkB5QGX6YV_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 chunkB5QGX6YV_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 chunkB5QGX6YV_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 chunkB5QGX6YV_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 chunkB5QGX6YV_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 chunkB5QGX6YV_cjs.foundryPlatformFetch($ctx, _uploadMedia, ...args);
|
|
484
484
|
}
|
|
485
485
|
|
|
486
486
|
// src/object/mediaUpload.ts
|
|
@@ -543,13 +543,13 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
543
543
|
return Promise.all(promiseArray);
|
|
544
544
|
}
|
|
545
545
|
if (isAttachmentUpload(value)) {
|
|
546
|
-
const attachment = await
|
|
546
|
+
const attachment = await chunkB5QGX6YV_cjs.Attachment_exports.upload(client, value.data, {
|
|
547
547
|
filename: value.name
|
|
548
548
|
});
|
|
549
549
|
return await toDataValue(attachment.rid, client);
|
|
550
550
|
}
|
|
551
551
|
if (isAttachmentFile(value)) {
|
|
552
|
-
const attachment = await
|
|
552
|
+
const attachment = await chunkB5QGX6YV_cjs.Attachment_exports.upload(client, value, {
|
|
553
553
|
filename: value.name
|
|
554
554
|
});
|
|
555
555
|
return await toDataValue(attachment.rid, client);
|
|
@@ -570,11 +570,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
570
570
|
if (isPoint(value)) {
|
|
571
571
|
return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client);
|
|
572
572
|
}
|
|
573
|
-
if (
|
|
573
|
+
if (chunkB5QGX6YV_cjs.isWireObjectSet(value)) {
|
|
574
574
|
return value;
|
|
575
575
|
}
|
|
576
|
-
if (
|
|
577
|
-
return
|
|
576
|
+
if (chunkB5QGX6YV_cjs.isObjectSet(value)) {
|
|
577
|
+
return chunkB5QGX6YV_cjs.getWireObjectSet(value);
|
|
578
578
|
}
|
|
579
579
|
if (isMediaReference(value)) {
|
|
580
580
|
return value;
|
|
@@ -597,11 +597,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
597
597
|
|
|
598
598
|
// src/actions/applyAction.ts
|
|
599
599
|
async function applyAction(client, action, parameters, options = {}) {
|
|
600
|
-
const clientWithHeaders =
|
|
600
|
+
const clientWithHeaders = chunkB5QGX6YV_cjs.addUserAgentAndRequestContextHeaders(chunkB5QGX6YV_cjs.augmentRequestContext(client, (_) => ({
|
|
601
601
|
finalMethodCall: "applyAction"
|
|
602
602
|
})), action);
|
|
603
603
|
if (Array.isArray(parameters)) {
|
|
604
|
-
const response = await
|
|
604
|
+
const response = await chunkB5QGX6YV_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
605
605
|
requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)) : [],
|
|
606
606
|
options: {
|
|
607
607
|
returnEdits: options?.$returnEdits ? "ALL" : "NONE"
|
|
@@ -610,7 +610,7 @@ async function applyAction(client, action, parameters, options = {}) {
|
|
|
610
610
|
const edits = response.edits;
|
|
611
611
|
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
612
612
|
} else {
|
|
613
|
-
const response = await
|
|
613
|
+
const response = await chunkB5QGX6YV_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
614
614
|
parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
|
|
615
615
|
options: {
|
|
616
616
|
mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
|
|
@@ -831,7 +831,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
831
831
|
}
|
|
832
832
|
}
|
|
833
833
|
async getLatestValue() {
|
|
834
|
-
const latestPointPromise =
|
|
834
|
+
const latestPointPromise = chunkB5QGX6YV_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
835
835
|
latestPointPromise.then(
|
|
836
836
|
(latestPoint) => this.lastFetchedValue = latestPoint,
|
|
837
837
|
// eslint-disable-next-line no-console
|
|
@@ -847,7 +847,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
847
847
|
return allPoints;
|
|
848
848
|
}
|
|
849
849
|
async *asyncIterValues(query) {
|
|
850
|
-
const streamPointsIterator = await
|
|
850
|
+
const streamPointsIterator = await chunkB5QGX6YV_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
851
851
|
range: getTimeRange(query)
|
|
852
852
|
} : {});
|
|
853
853
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -875,13 +875,13 @@ var MediaReferencePropertyImpl = class {
|
|
|
875
875
|
this.#mediaReference = mediaReference;
|
|
876
876
|
}
|
|
877
877
|
async fetchContents() {
|
|
878
|
-
return
|
|
878
|
+
return chunkB5QGX6YV_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
879
879
|
preview: true
|
|
880
880
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
881
881
|
});
|
|
882
882
|
}
|
|
883
883
|
async fetchMetadata() {
|
|
884
|
-
const r = await
|
|
884
|
+
const r = await chunkB5QGX6YV_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
885
885
|
preview: true
|
|
886
886
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
887
887
|
});
|
|
@@ -906,10 +906,10 @@ var TimeSeriesPropertyImpl = class {
|
|
|
906
906
|
this.#triplet = [objectApiName, primaryKey, propertyName];
|
|
907
907
|
}
|
|
908
908
|
async getFirstPoint() {
|
|
909
|
-
return
|
|
909
|
+
return chunkB5QGX6YV_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
910
910
|
}
|
|
911
911
|
async getLastPoint() {
|
|
912
|
-
return
|
|
912
|
+
return chunkB5QGX6YV_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
913
913
|
}
|
|
914
914
|
async getAllPoints(query) {
|
|
915
915
|
const allPoints = [];
|
|
@@ -919,7 +919,7 @@ var TimeSeriesPropertyImpl = class {
|
|
|
919
919
|
return allPoints;
|
|
920
920
|
}
|
|
921
921
|
async *asyncIterPoints(query) {
|
|
922
|
-
const streamPointsIterator = await
|
|
922
|
+
const streamPointsIterator = await chunkB5QGX6YV_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
923
923
|
range: getTimeRange(query)
|
|
924
924
|
} : {});
|
|
925
925
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -1336,8 +1336,8 @@ function get$link(holder) {
|
|
|
1336
1336
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1337
1337
|
}).pivotTo(linkName);
|
|
1338
1338
|
const value = !linkDef.multiplicity ? {
|
|
1339
|
-
fetchOne: (options) =>
|
|
1340
|
-
fetchOneWithErrors: (options) =>
|
|
1339
|
+
fetchOne: (options) => chunkB5QGX6YV_cjs.fetchSingle(client, objDef, options ?? {}, chunkB5QGX6YV_cjs.getWireObjectSet(objectSet)),
|
|
1340
|
+
fetchOneWithErrors: (options) => chunkB5QGX6YV_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkB5QGX6YV_cjs.getWireObjectSet(objectSet))
|
|
1341
1341
|
} : objectSet;
|
|
1342
1342
|
return [linkName, value];
|
|
1343
1343
|
})));
|
|
@@ -1353,8 +1353,8 @@ function get$linkForInterface(holder) {
|
|
|
1353
1353
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1354
1354
|
})).pivotTo(linkName);
|
|
1355
1355
|
const value = !linkDef.multiplicity ? {
|
|
1356
|
-
fetchOne: (options) =>
|
|
1357
|
-
fetchOneWithErrors: (options) =>
|
|
1356
|
+
fetchOne: (options) => chunkB5QGX6YV_cjs.fetchSingle(client, objDef, options ?? {}, chunkB5QGX6YV_cjs.getWireObjectSet(objectSet)),
|
|
1357
|
+
fetchOneWithErrors: (options) => chunkB5QGX6YV_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkB5QGX6YV_cjs.getWireObjectSet(objectSet))
|
|
1358
1358
|
} : objectSet;
|
|
1359
1359
|
return [linkName, value];
|
|
1360
1360
|
})));
|
|
@@ -1362,7 +1362,7 @@ function get$linkForInterface(holder) {
|
|
|
1362
1362
|
|
|
1363
1363
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
1364
1364
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1365
|
-
const [objApiNamespace] =
|
|
1365
|
+
const [objApiNamespace] = chunkB5QGX6YV_cjs.extractNamespace(interfaceDef.apiName);
|
|
1366
1366
|
return Object.freeze(Object.defineProperties({}, {
|
|
1367
1367
|
// first to minimize hidden classes
|
|
1368
1368
|
[UnderlyingOsdkObject]: {
|
|
@@ -1421,7 +1421,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1421
1421
|
},
|
|
1422
1422
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1423
1423
|
const objDef = underlying[ObjectDefRef];
|
|
1424
|
-
const [apiNamespace, apiName] =
|
|
1424
|
+
const [apiNamespace, apiName] = chunkB5QGX6YV_cjs.extractNamespace(p);
|
|
1425
1425
|
const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
|
|
1426
1426
|
return [apiNamespace === objApiNamespace ? apiName : p, {
|
|
1427
1427
|
enumerable: targetPropName in underlying,
|
|
@@ -1582,9 +1582,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1582
1582
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1583
1583
|
case "attachment":
|
|
1584
1584
|
if (Array.isArray(rawValue)) {
|
|
1585
|
-
return rawValue.map((a) =>
|
|
1585
|
+
return rawValue.map((a) => chunkB5QGX6YV_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1586
1586
|
} else {
|
|
1587
|
-
return
|
|
1587
|
+
return chunkB5QGX6YV_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1588
1588
|
}
|
|
1589
1589
|
default:
|
|
1590
1590
|
process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
|
|
@@ -1600,9 +1600,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1600
1600
|
}
|
|
1601
1601
|
if (propDef.type === "attachment") {
|
|
1602
1602
|
if (Array.isArray(rawValue)) {
|
|
1603
|
-
return rawValue.map((a) =>
|
|
1603
|
+
return rawValue.map((a) => chunkB5QGX6YV_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1604
1604
|
}
|
|
1605
|
-
return
|
|
1605
|
+
return chunkB5QGX6YV_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1606
1606
|
}
|
|
1607
1607
|
if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
|
|
1608
1608
|
return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
|
|
@@ -1838,14 +1838,14 @@ function deepFreeze(obj) {
|
|
|
1838
1838
|
// src/ontology/loadActionMetadata.ts
|
|
1839
1839
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1840
1840
|
async function loadActionMetadata(client, actionType) {
|
|
1841
|
-
const r = await
|
|
1841
|
+
const r = await chunkB5QGX6YV_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType);
|
|
1842
1842
|
return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
|
|
1843
1843
|
}
|
|
1844
1844
|
|
|
1845
1845
|
// src/ontology/loadFullObjectMetadata.ts
|
|
1846
1846
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1847
1847
|
async function loadFullObjectMetadata(client, objectType) {
|
|
1848
|
-
const full = await
|
|
1848
|
+
const full = await chunkB5QGX6YV_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
|
|
1849
1849
|
preview: true
|
|
1850
1850
|
});
|
|
1851
1851
|
const ret = generatorConverters.wireObjectTypeFullMetadataToSdkObjectMetadata(full, true);
|
|
@@ -1857,7 +1857,7 @@ async function loadFullObjectMetadata(client, objectType) {
|
|
|
1857
1857
|
// src/ontology/loadInterfaceMetadata.ts
|
|
1858
1858
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1859
1859
|
async function loadInterfaceMetadata(client, objectType) {
|
|
1860
|
-
const r = await
|
|
1860
|
+
const r = await chunkB5QGX6YV_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
|
|
1861
1861
|
preview: true
|
|
1862
1862
|
});
|
|
1863
1863
|
return generatorConverters.__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(r, true);
|
|
@@ -1867,7 +1867,7 @@ async function loadInterfaceMetadata(client, objectType) {
|
|
|
1867
1867
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1868
1868
|
async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
|
|
1869
1869
|
const [apiName, version] = queryTypeApiNameAndVersion.split(":");
|
|
1870
|
-
const r = await
|
|
1870
|
+
const r = await chunkB5QGX6YV_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
|
|
1871
1871
|
version
|
|
1872
1872
|
});
|
|
1873
1873
|
return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
|
|
@@ -1925,11 +1925,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1925
1925
|
|
|
1926
1926
|
// src/util/UserAgent.ts
|
|
1927
1927
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
1928
|
-
var USER_AGENT = `osdk-client/${"2.7.
|
|
1929
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.
|
|
1928
|
+
var USER_AGENT = `osdk-client/${"2.7.5"}`;
|
|
1929
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.5"}`;
|
|
1930
1930
|
|
|
1931
1931
|
// src/createMinimalClient.ts
|
|
1932
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1932
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkB5QGX6YV_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1933
1933
|
if (process.env.NODE_ENV !== "production") {
|
|
1934
1934
|
try {
|
|
1935
1935
|
new URL(baseUrl);
|
|
@@ -2001,13 +2001,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
2001
2001
|
switch (desiredType.type) {
|
|
2002
2002
|
case "attachment": {
|
|
2003
2003
|
if (isAttachmentUpload(value)) {
|
|
2004
|
-
const attachment = await
|
|
2004
|
+
const attachment = await chunkB5QGX6YV_cjs.Attachment_exports.upload(client, value.data, {
|
|
2005
2005
|
filename: value.name
|
|
2006
2006
|
});
|
|
2007
2007
|
return attachment.rid;
|
|
2008
2008
|
}
|
|
2009
2009
|
if (isAttachmentFile(value)) {
|
|
2010
|
-
const attachment = await
|
|
2010
|
+
const attachment = await chunkB5QGX6YV_cjs.Attachment_exports.upload(client, value, {
|
|
2011
2011
|
filename: value.name
|
|
2012
2012
|
});
|
|
2013
2013
|
return attachment.rid;
|
|
@@ -2047,11 +2047,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
2047
2047
|
}
|
|
2048
2048
|
case "objectSet":
|
|
2049
2049
|
case "interfaceObjectSet": {
|
|
2050
|
-
if (
|
|
2050
|
+
if (chunkB5QGX6YV_cjs.isWireObjectSet(value)) {
|
|
2051
2051
|
return value;
|
|
2052
2052
|
}
|
|
2053
|
-
if (
|
|
2054
|
-
return
|
|
2053
|
+
if (chunkB5QGX6YV_cjs.isObjectSet(value)) {
|
|
2054
|
+
return chunkB5QGX6YV_cjs.getWireObjectSet(value);
|
|
2055
2055
|
}
|
|
2056
2056
|
break;
|
|
2057
2057
|
}
|
|
@@ -2096,7 +2096,7 @@ async function applyQuery(client, query, params) {
|
|
|
2096
2096
|
if (client.flushEdits != null) {
|
|
2097
2097
|
await client.flushEdits();
|
|
2098
2098
|
}
|
|
2099
|
-
const response = await
|
|
2099
|
+
const response = await chunkB5QGX6YV_cjs.Query_exports.execute(chunkB5QGX6YV_cjs.addUserAgentAndRequestContextHeaders(chunkB5QGX6YV_cjs.augmentRequestContext(client, (_) => ({
|
|
2100
2100
|
finalMethodCall: "applyQuery"
|
|
2101
2101
|
})), query), await client.ontologyRid, query.apiName, {
|
|
2102
2102
|
parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
|
|
@@ -2140,7 +2140,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2140
2140
|
return responseValue;
|
|
2141
2141
|
}
|
|
2142
2142
|
case "attachment": {
|
|
2143
|
-
return
|
|
2143
|
+
return chunkB5QGX6YV_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
2144
2144
|
}
|
|
2145
2145
|
case "object": {
|
|
2146
2146
|
const def = definitions.get(responseDataType.object);
|
|
@@ -2162,7 +2162,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2162
2162
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
2163
2163
|
}
|
|
2164
2164
|
if (typeof responseValue === "string") {
|
|
2165
|
-
return
|
|
2165
|
+
return chunkB5QGX6YV_cjs.createObjectSet(def, client, {
|
|
2166
2166
|
type: "intersect",
|
|
2167
2167
|
objectSets: [{
|
|
2168
2168
|
type: "base",
|
|
@@ -2173,7 +2173,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2173
2173
|
}]
|
|
2174
2174
|
});
|
|
2175
2175
|
}
|
|
2176
|
-
return
|
|
2176
|
+
return chunkB5QGX6YV_cjs.createObjectSet(def, client, responseValue);
|
|
2177
2177
|
}
|
|
2178
2178
|
case "struct": {
|
|
2179
2179
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -2367,7 +2367,7 @@ function createClientInternal(objectSetFactory, transactionRid, flushEdits, base
|
|
|
2367
2367
|
ontologyRid
|
|
2368
2368
|
}, baseUrl, tokenProvider, {
|
|
2369
2369
|
...options,
|
|
2370
|
-
logger: options?.logger ?? new
|
|
2370
|
+
logger: options?.logger ?? new chunkB5QGX6YV_cjs.MinimalLogger(),
|
|
2371
2371
|
transactionId: transactionRid,
|
|
2372
2372
|
flushEdits
|
|
2373
2373
|
}, fetchFn, objectSetFactory);
|
|
@@ -2390,7 +2390,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2390
2390
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2391
2391
|
return {
|
|
2392
2392
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2393
|
-
return await
|
|
2393
|
+
return await chunkB5QGX6YV_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2394
2394
|
}
|
|
2395
2395
|
};
|
|
2396
2396
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -2402,7 +2402,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2402
2402
|
objectType,
|
|
2403
2403
|
propertyType
|
|
2404
2404
|
} = args;
|
|
2405
|
-
return await
|
|
2405
|
+
return await chunkB5QGX6YV_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
|
|
2406
2406
|
mediaItemPath: fileName,
|
|
2407
2407
|
preview: true
|
|
2408
2408
|
});
|
|
@@ -2411,10 +2411,10 @@ function createClientFromContext(clientCtx) {
|
|
|
2411
2411
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
2412
2412
|
return {
|
|
2413
2413
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
2414
|
-
return await
|
|
2414
|
+
return await chunkB5QGX6YV_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
2415
2415
|
},
|
|
2416
2416
|
fetchPageByRidNoType: async (rids, options) => {
|
|
2417
|
-
return await
|
|
2417
|
+
return await chunkB5QGX6YV_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
2418
2418
|
}
|
|
2419
2419
|
};
|
|
2420
2420
|
}
|
|
@@ -2426,13 +2426,13 @@ function createClientFromContext(clientCtx) {
|
|
|
2426
2426
|
const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
|
|
2427
2427
|
const symbolClientContext2 = "__osdkClientContext";
|
|
2428
2428
|
const client = Object.defineProperties(clientFn, {
|
|
2429
|
-
[
|
|
2429
|
+
[chunkB5QGX6YV_cjs.symbolClientContext]: {
|
|
2430
2430
|
value: clientCtx
|
|
2431
2431
|
},
|
|
2432
2432
|
[symbolClientContext2]: {
|
|
2433
2433
|
value: clientCtx
|
|
2434
2434
|
},
|
|
2435
|
-
[
|
|
2435
|
+
[chunkB5QGX6YV_cjs.additionalContext]: {
|
|
2436
2436
|
value: clientCtx
|
|
2437
2437
|
},
|
|
2438
2438
|
fetchMetadata: {
|
|
@@ -2441,8 +2441,8 @@ function createClientFromContext(clientCtx) {
|
|
|
2441
2441
|
});
|
|
2442
2442
|
return client;
|
|
2443
2443
|
}
|
|
2444
|
-
var createClient = createClientInternal.bind(void 0,
|
|
2445
|
-
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(
|
|
2444
|
+
var createClient = createClientInternal.bind(void 0, chunkB5QGX6YV_cjs.createObjectSet, void 0, void 0);
|
|
2445
|
+
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkB5QGX6YV_cjs.createObjectSet, transactionRid, flushEdits, ...args);
|
|
2446
2446
|
function createWithRid(rids) {
|
|
2447
2447
|
const withRid = {
|
|
2448
2448
|
type: "static",
|
|
@@ -2467,5 +2467,5 @@ exports.createOsdkObject = createOsdkObject;
|
|
|
2467
2467
|
exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
|
|
2468
2468
|
exports.getDefType = getDefType;
|
|
2469
2469
|
exports.isObjectSpecifiersObject = isObjectSpecifiersObject;
|
|
2470
|
-
//# sourceMappingURL=chunk-
|
|
2471
|
-
//# sourceMappingURL=chunk-
|
|
2470
|
+
//# sourceMappingURL=chunk-N4XMAVKO.cjs.map
|
|
2471
|
+
//# sourceMappingURL=chunk-N4XMAVKO.cjs.map
|