@osdk/client 2.7.0-beta.4 → 2.7.0-beta.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 +13 -0
- package/build/browser/fetchMetadata.test.js +1 -1
- package/build/browser/fetchMetadata.test.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects.test.js +1 -1
- package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
- package/build/browser/object/fetchPage.js +2 -0
- package/build/browser/object/fetchPage.js.map +1 -1
- package/build/browser/queries/applyQuery.js +2 -1
- package/build/browser/queries/applyQuery.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/{chunk-MXNJ2KQH.cjs → chunk-HM4EXGFD.cjs} +31 -24
- package/build/cjs/chunk-HM4EXGFD.cjs.map +1 -0
- package/build/cjs/{chunk-ESGXYLZT.cjs → chunk-LBXKB67X.cjs} +69 -68
- package/build/cjs/chunk-LBXKB67X.cjs.map +1 -0
- package/build/cjs/index.cjs +8 -8
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/unstable-do-not-use.cjs +33 -33
- package/build/esm/fetchMetadata.test.js +1 -1
- package/build/esm/fetchMetadata.test.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects.test.js +1 -1
- package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
- package/build/esm/object/fetchPage.js +2 -0
- package/build/esm/object/fetchPage.js.map +1 -1
- package/build/esm/queries/applyQuery.js +2 -1
- package/build/esm/queries/applyQuery.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/types/object/convertWireToOsdkObjects.d.ts.map +1 -1
- package/build/types/queries/applyQuery.d.ts.map +1 -1
- package/package.json +9 -9
- package/build/cjs/chunk-ESGXYLZT.cjs.map +0 -1
- package/build/cjs/chunk-MXNJ2KQH.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHM4EXGFD_cjs = require('./chunk-HM4EXGFD.cjs');
|
|
4
4
|
var chunk6SCDLAU2_cjs = require('./chunk-6SCDLAU2.cjs');
|
|
5
5
|
var unstable = require('@osdk/api/unstable');
|
|
6
6
|
var client_unstable = require('@osdk/client.unstable');
|
|
@@ -414,10 +414,10 @@ chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
|
414
414
|
// src/util/toDataValue.ts
|
|
415
415
|
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
416
416
|
|
|
417
|
-
// ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.
|
|
417
|
+
// ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.44.0/node_modules/@osdk/foundry.mediasets/build/esm/index.js
|
|
418
418
|
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
419
419
|
|
|
420
|
-
// ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.
|
|
420
|
+
// ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.44.0/node_modules/@osdk/foundry.mediasets/build/esm/public/MediaSet.js
|
|
421
421
|
var MediaSet_exports = {};
|
|
422
422
|
chunk6SCDLAU2_cjs.__export(MediaSet_exports, {
|
|
423
423
|
abort: () => abort,
|
|
@@ -436,51 +436,51 @@ chunk6SCDLAU2_cjs.__export(MediaSet_exports, {
|
|
|
436
436
|
chunk6SCDLAU2_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 chunkHM4EXGFD_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 chunkHM4EXGFD_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 chunkHM4EXGFD_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 chunkHM4EXGFD_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 chunkHM4EXGFD_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 chunkHM4EXGFD_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 chunkHM4EXGFD_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 chunkHM4EXGFD_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 chunkHM4EXGFD_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 chunkHM4EXGFD_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 chunkHM4EXGFD_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 chunkHM4EXGFD_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 chunkHM4EXGFD_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 chunkHM4EXGFD_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 (chunkHM4EXGFD_cjs.isWireObjectSet(value)) {
|
|
574
574
|
return value;
|
|
575
575
|
}
|
|
576
|
-
if (
|
|
577
|
-
return
|
|
576
|
+
if (chunkHM4EXGFD_cjs.isObjectSet(value)) {
|
|
577
|
+
return chunkHM4EXGFD_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 = chunkHM4EXGFD_cjs.addUserAgentAndRequestContextHeaders(chunkHM4EXGFD_cjs.augmentRequestContext(client, (_) => ({
|
|
601
601
|
finalMethodCall: "applyAction"
|
|
602
602
|
})), action);
|
|
603
603
|
if (Array.isArray(parameters)) {
|
|
604
|
-
const response = await
|
|
604
|
+
const response = await chunkHM4EXGFD_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"
|
|
@@ -612,7 +612,7 @@ async function applyAction(client, action, parameters, options = {}) {
|
|
|
612
612
|
const edits = response.edits;
|
|
613
613
|
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
614
614
|
} else {
|
|
615
|
-
const response = await
|
|
615
|
+
const response = await chunkHM4EXGFD_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
616
616
|
parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
|
|
617
617
|
options: {
|
|
618
618
|
mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
|
|
@@ -835,7 +835,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
837
|
async getLatestValue() {
|
|
838
|
-
const latestPointPromise =
|
|
838
|
+
const latestPointPromise = chunkHM4EXGFD_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
839
839
|
latestPointPromise.then(
|
|
840
840
|
(latestPoint) => this.lastFetchedValue = latestPoint,
|
|
841
841
|
// eslint-disable-next-line no-console
|
|
@@ -851,7 +851,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
851
851
|
return allPoints;
|
|
852
852
|
}
|
|
853
853
|
async *asyncIterValues(query) {
|
|
854
|
-
const streamPointsIterator = await
|
|
854
|
+
const streamPointsIterator = await chunkHM4EXGFD_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
855
855
|
range: getTimeRange(query)
|
|
856
856
|
} : {});
|
|
857
857
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -879,13 +879,13 @@ var MediaReferencePropertyImpl = class {
|
|
|
879
879
|
this.#mediaReference = mediaReference;
|
|
880
880
|
}
|
|
881
881
|
async fetchContents() {
|
|
882
|
-
return
|
|
882
|
+
return chunkHM4EXGFD_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
883
883
|
preview: true
|
|
884
884
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
885
885
|
});
|
|
886
886
|
}
|
|
887
887
|
async fetchMetadata() {
|
|
888
|
-
const r = await
|
|
888
|
+
const r = await chunkHM4EXGFD_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
889
889
|
preview: true
|
|
890
890
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
891
891
|
});
|
|
@@ -910,10 +910,10 @@ var TimeSeriesPropertyImpl = class {
|
|
|
910
910
|
this.#triplet = [objectApiName, primaryKey, propertyName];
|
|
911
911
|
}
|
|
912
912
|
async getFirstPoint() {
|
|
913
|
-
return
|
|
913
|
+
return chunkHM4EXGFD_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
914
914
|
}
|
|
915
915
|
async getLastPoint() {
|
|
916
|
-
return
|
|
916
|
+
return chunkHM4EXGFD_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
917
917
|
}
|
|
918
918
|
async getAllPoints(query) {
|
|
919
919
|
const allPoints = [];
|
|
@@ -923,7 +923,7 @@ var TimeSeriesPropertyImpl = class {
|
|
|
923
923
|
return allPoints;
|
|
924
924
|
}
|
|
925
925
|
async *asyncIterPoints(query) {
|
|
926
|
-
const streamPointsIterator = await
|
|
926
|
+
const streamPointsIterator = await chunkHM4EXGFD_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
927
927
|
range: getTimeRange(query)
|
|
928
928
|
} : {});
|
|
929
929
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -1340,8 +1340,8 @@ function get$link(holder) {
|
|
|
1340
1340
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1341
1341
|
}).pivotTo(linkName);
|
|
1342
1342
|
const value = !linkDef.multiplicity ? {
|
|
1343
|
-
fetchOne: (options) =>
|
|
1344
|
-
fetchOneWithErrors: (options) =>
|
|
1343
|
+
fetchOne: (options) => chunkHM4EXGFD_cjs.fetchSingle(client, objDef, options ?? {}, chunkHM4EXGFD_cjs.getWireObjectSet(objectSet)),
|
|
1344
|
+
fetchOneWithErrors: (options) => chunkHM4EXGFD_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkHM4EXGFD_cjs.getWireObjectSet(objectSet))
|
|
1345
1345
|
} : objectSet;
|
|
1346
1346
|
return [linkName, value];
|
|
1347
1347
|
})));
|
|
@@ -1357,8 +1357,8 @@ function get$linkForInterface(holder) {
|
|
|
1357
1357
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1358
1358
|
})).pivotTo(linkName);
|
|
1359
1359
|
const value = !linkDef.multiplicity ? {
|
|
1360
|
-
fetchOne: (options) =>
|
|
1361
|
-
fetchOneWithErrors: (options) =>
|
|
1360
|
+
fetchOne: (options) => chunkHM4EXGFD_cjs.fetchSingle(client, objDef, options ?? {}, chunkHM4EXGFD_cjs.getWireObjectSet(objectSet)),
|
|
1361
|
+
fetchOneWithErrors: (options) => chunkHM4EXGFD_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkHM4EXGFD_cjs.getWireObjectSet(objectSet))
|
|
1362
1362
|
} : objectSet;
|
|
1363
1363
|
return [linkName, value];
|
|
1364
1364
|
})));
|
|
@@ -1366,7 +1366,7 @@ function get$linkForInterface(holder) {
|
|
|
1366
1366
|
|
|
1367
1367
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
1368
1368
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1369
|
-
const [objApiNamespace] =
|
|
1369
|
+
const [objApiNamespace] = chunkHM4EXGFD_cjs.extractNamespace(interfaceDef.apiName);
|
|
1370
1370
|
return Object.freeze(Object.defineProperties({}, {
|
|
1371
1371
|
// first to minimize hidden classes
|
|
1372
1372
|
[UnderlyingOsdkObject]: {
|
|
@@ -1425,7 +1425,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1425
1425
|
},
|
|
1426
1426
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1427
1427
|
const objDef = underlying[ObjectDefRef];
|
|
1428
|
-
const [apiNamespace, apiName] =
|
|
1428
|
+
const [apiNamespace, apiName] = chunkHM4EXGFD_cjs.extractNamespace(p);
|
|
1429
1429
|
const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
|
|
1430
1430
|
return [apiNamespace === objApiNamespace ? apiName : p, {
|
|
1431
1431
|
enumerable: targetPropName in underlying,
|
|
@@ -1586,9 +1586,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1586
1586
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1587
1587
|
case "attachment":
|
|
1588
1588
|
if (Array.isArray(rawValue)) {
|
|
1589
|
-
return rawValue.map((a) =>
|
|
1589
|
+
return rawValue.map((a) => chunkHM4EXGFD_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1590
1590
|
} else {
|
|
1591
|
-
return
|
|
1591
|
+
return chunkHM4EXGFD_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1592
1592
|
}
|
|
1593
1593
|
default:
|
|
1594
1594
|
process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
|
|
@@ -1604,9 +1604,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1604
1604
|
}
|
|
1605
1605
|
if (propDef.type === "attachment") {
|
|
1606
1606
|
if (Array.isArray(rawValue)) {
|
|
1607
|
-
return rawValue.map((a) =>
|
|
1607
|
+
return rawValue.map((a) => chunkHM4EXGFD_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1608
1608
|
}
|
|
1609
|
-
return
|
|
1609
|
+
return chunkHM4EXGFD_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1610
1610
|
}
|
|
1611
1611
|
if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
|
|
1612
1612
|
return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
|
|
@@ -1842,7 +1842,7 @@ function deepFreeze(obj) {
|
|
|
1842
1842
|
// src/ontology/loadActionMetadata.ts
|
|
1843
1843
|
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1844
1844
|
async function loadActionMetadata(client, actionType) {
|
|
1845
|
-
const r = await
|
|
1845
|
+
const r = await chunkHM4EXGFD_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType, {
|
|
1846
1846
|
branch: client.branch
|
|
1847
1847
|
});
|
|
1848
1848
|
return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
|
|
@@ -1851,7 +1851,7 @@ async function loadActionMetadata(client, actionType) {
|
|
|
1851
1851
|
// src/ontology/loadFullObjectMetadata.ts
|
|
1852
1852
|
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1853
1853
|
async function loadFullObjectMetadata(client, objectType) {
|
|
1854
|
-
const full = await
|
|
1854
|
+
const full = await chunkHM4EXGFD_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
|
|
1855
1855
|
preview: true,
|
|
1856
1856
|
branch: client.branch
|
|
1857
1857
|
});
|
|
@@ -1864,7 +1864,7 @@ async function loadFullObjectMetadata(client, objectType) {
|
|
|
1864
1864
|
// src/ontology/loadInterfaceMetadata.ts
|
|
1865
1865
|
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1866
1866
|
async function loadInterfaceMetadata(client, objectType) {
|
|
1867
|
-
const r = await
|
|
1867
|
+
const r = await chunkHM4EXGFD_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
|
|
1868
1868
|
preview: true,
|
|
1869
1869
|
branch: client.branch
|
|
1870
1870
|
});
|
|
@@ -1875,7 +1875,7 @@ async function loadInterfaceMetadata(client, objectType) {
|
|
|
1875
1875
|
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1876
1876
|
async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
|
|
1877
1877
|
const [apiName, version] = queryTypeApiNameAndVersion.split(":");
|
|
1878
|
-
const r = await
|
|
1878
|
+
const r = await chunkHM4EXGFD_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
|
|
1879
1879
|
version
|
|
1880
1880
|
});
|
|
1881
1881
|
return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
|
|
@@ -1933,11 +1933,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1933
1933
|
|
|
1934
1934
|
// src/util/UserAgent.ts
|
|
1935
1935
|
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1936
|
-
var USER_AGENT = `osdk-client/${"2.7.0-beta.
|
|
1937
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.0-beta.
|
|
1936
|
+
var USER_AGENT = `osdk-client/${"2.7.0-beta.5"}`;
|
|
1937
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.0-beta.5"}`;
|
|
1938
1938
|
|
|
1939
1939
|
// src/createMinimalClient.ts
|
|
1940
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1940
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkHM4EXGFD_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1941
1941
|
if (process.env.NODE_ENV !== "production") {
|
|
1942
1942
|
try {
|
|
1943
1943
|
new URL(baseUrl);
|
|
@@ -2010,13 +2010,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
2010
2010
|
switch (desiredType.type) {
|
|
2011
2011
|
case "attachment": {
|
|
2012
2012
|
if (isAttachmentUpload(value)) {
|
|
2013
|
-
const attachment = await
|
|
2013
|
+
const attachment = await chunkHM4EXGFD_cjs.Attachment_exports.upload(client, value.data, {
|
|
2014
2014
|
filename: value.name
|
|
2015
2015
|
});
|
|
2016
2016
|
return attachment.rid;
|
|
2017
2017
|
}
|
|
2018
2018
|
if (isAttachmentFile(value)) {
|
|
2019
|
-
const attachment = await
|
|
2019
|
+
const attachment = await chunkHM4EXGFD_cjs.Attachment_exports.upload(client, value, {
|
|
2020
2020
|
filename: value.name
|
|
2021
2021
|
});
|
|
2022
2022
|
return attachment.rid;
|
|
@@ -2056,11 +2056,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
2056
2056
|
}
|
|
2057
2057
|
case "objectSet":
|
|
2058
2058
|
case "interfaceObjectSet": {
|
|
2059
|
-
if (
|
|
2059
|
+
if (chunkHM4EXGFD_cjs.isWireObjectSet(value)) {
|
|
2060
2060
|
return value;
|
|
2061
2061
|
}
|
|
2062
|
-
if (
|
|
2063
|
-
return
|
|
2062
|
+
if (chunkHM4EXGFD_cjs.isObjectSet(value)) {
|
|
2063
|
+
return chunkHM4EXGFD_cjs.getWireObjectSet(value);
|
|
2064
2064
|
}
|
|
2065
2065
|
break;
|
|
2066
2066
|
}
|
|
@@ -2102,12 +2102,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
2102
2102
|
// src/queries/applyQuery.ts
|
|
2103
2103
|
async function applyQuery(client, query, params) {
|
|
2104
2104
|
const qd = client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : void 0);
|
|
2105
|
-
const response = await
|
|
2105
|
+
const response = await chunkHM4EXGFD_cjs.Query_exports.execute(chunkHM4EXGFD_cjs.addUserAgentAndRequestContextHeaders(chunkHM4EXGFD_cjs.augmentRequestContext(client, (_) => ({
|
|
2106
2106
|
finalMethodCall: "applyQuery"
|
|
2107
2107
|
})), query), await client.ontologyRid, query.apiName, {
|
|
2108
2108
|
parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
|
|
2109
2109
|
}, {
|
|
2110
|
-
version: query.isFixedVersion ? query.version : void 0
|
|
2110
|
+
version: query.isFixedVersion ? query.version : void 0,
|
|
2111
|
+
transactionId: client.transactionId
|
|
2111
2112
|
});
|
|
2112
2113
|
const objectOutputDefs = await getRequiredDefinitions((await qd).output, client);
|
|
2113
2114
|
const remappedResponse = await remapQueryResponse(client, (await qd).output, response.value, objectOutputDefs);
|
|
@@ -2145,7 +2146,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2145
2146
|
return responseValue;
|
|
2146
2147
|
}
|
|
2147
2148
|
case "attachment": {
|
|
2148
|
-
return
|
|
2149
|
+
return chunkHM4EXGFD_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
2149
2150
|
}
|
|
2150
2151
|
case "object": {
|
|
2151
2152
|
const def = definitions.get(responseDataType.object);
|
|
@@ -2167,7 +2168,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2167
2168
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
2168
2169
|
}
|
|
2169
2170
|
if (typeof responseValue === "string") {
|
|
2170
|
-
return
|
|
2171
|
+
return chunkHM4EXGFD_cjs.createObjectSet(def, client, {
|
|
2171
2172
|
type: "intersect",
|
|
2172
2173
|
objectSets: [{
|
|
2173
2174
|
type: "base",
|
|
@@ -2178,7 +2179,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2178
2179
|
}]
|
|
2179
2180
|
});
|
|
2180
2181
|
}
|
|
2181
|
-
return
|
|
2182
|
+
return chunkHM4EXGFD_cjs.createObjectSet(def, client, responseValue);
|
|
2182
2183
|
}
|
|
2183
2184
|
case "struct": {
|
|
2184
2185
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -2364,7 +2365,7 @@ function createClientInternal(objectSetFactory, transactionRid, baseUrl, ontolog
|
|
|
2364
2365
|
ontologyRid
|
|
2365
2366
|
}, baseUrl, tokenProvider, {
|
|
2366
2367
|
...options,
|
|
2367
|
-
logger: options?.logger ?? new
|
|
2368
|
+
logger: options?.logger ?? new chunkHM4EXGFD_cjs.MinimalLogger(),
|
|
2368
2369
|
transactionId: transactionRid,
|
|
2369
2370
|
branch: options?.branch
|
|
2370
2371
|
}, fetchFn, objectSetFactory);
|
|
@@ -2387,7 +2388,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2387
2388
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2388
2389
|
return {
|
|
2389
2390
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2390
|
-
return await
|
|
2391
|
+
return await chunkHM4EXGFD_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2391
2392
|
}
|
|
2392
2393
|
};
|
|
2393
2394
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -2399,7 +2400,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2399
2400
|
objectType,
|
|
2400
2401
|
propertyType
|
|
2401
2402
|
} = args;
|
|
2402
|
-
return await
|
|
2403
|
+
return await chunkHM4EXGFD_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
|
|
2403
2404
|
mediaItemPath: fileName,
|
|
2404
2405
|
preview: true
|
|
2405
2406
|
});
|
|
@@ -2408,10 +2409,10 @@ function createClientFromContext(clientCtx) {
|
|
|
2408
2409
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
2409
2410
|
return {
|
|
2410
2411
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
2411
|
-
return await
|
|
2412
|
+
return await chunkHM4EXGFD_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
2412
2413
|
},
|
|
2413
2414
|
fetchPageByRidNoType: async (rids, options) => {
|
|
2414
|
-
return await
|
|
2415
|
+
return await chunkHM4EXGFD_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
2415
2416
|
}
|
|
2416
2417
|
};
|
|
2417
2418
|
}
|
|
@@ -2423,13 +2424,13 @@ function createClientFromContext(clientCtx) {
|
|
|
2423
2424
|
const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
|
|
2424
2425
|
const symbolClientContext2 = "__osdkClientContext";
|
|
2425
2426
|
const client = Object.defineProperties(clientFn, {
|
|
2426
|
-
[
|
|
2427
|
+
[chunkHM4EXGFD_cjs.symbolClientContext]: {
|
|
2427
2428
|
value: clientCtx
|
|
2428
2429
|
},
|
|
2429
2430
|
[symbolClientContext2]: {
|
|
2430
2431
|
value: clientCtx
|
|
2431
2432
|
},
|
|
2432
|
-
[
|
|
2433
|
+
[chunkHM4EXGFD_cjs.additionalContext]: {
|
|
2433
2434
|
value: clientCtx
|
|
2434
2435
|
},
|
|
2435
2436
|
fetchMetadata: {
|
|
@@ -2438,8 +2439,8 @@ function createClientFromContext(clientCtx) {
|
|
|
2438
2439
|
});
|
|
2439
2440
|
return client;
|
|
2440
2441
|
}
|
|
2441
|
-
var createClient = createClientInternal.bind(void 0,
|
|
2442
|
-
var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(
|
|
2442
|
+
var createClient = createClientInternal.bind(void 0, chunkHM4EXGFD_cjs.createObjectSet, void 0);
|
|
2443
|
+
var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(chunkHM4EXGFD_cjs.createObjectSet, transactionRid, ...args);
|
|
2443
2444
|
function createWithRid(rids) {
|
|
2444
2445
|
const withRid = {
|
|
2445
2446
|
type: "static",
|
|
@@ -2459,5 +2460,5 @@ exports.createClientFromContext = createClientFromContext;
|
|
|
2459
2460
|
exports.createClientWithTransaction = createClientWithTransaction;
|
|
2460
2461
|
exports.createObjectSpecifierFromPrimaryKey = createObjectSpecifierFromPrimaryKey;
|
|
2461
2462
|
exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
|
|
2462
|
-
//# sourceMappingURL=chunk-
|
|
2463
|
-
//# sourceMappingURL=chunk-
|
|
2463
|
+
//# sourceMappingURL=chunk-LBXKB67X.cjs.map
|
|
2464
|
+
//# sourceMappingURL=chunk-LBXKB67X.cjs.map
|