@osdk/client 2.5.0-beta.13 → 2.5.0-beta.14
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 +15 -0
- package/build/browser/MinimalClientContext.js.map +1 -1
- package/build/browser/createMinimalClient.js +2 -1
- package/build/browser/createMinimalClient.js.map +1 -1
- package/build/browser/object/fetchPage.js +3 -2
- package/build/browser/object/fetchPage.js.map +1 -1
- package/build/browser/objectSet/createObjectSet.js +11 -0
- package/build/browser/objectSet/createObjectSet.js.map +1 -1
- package/build/browser/observable/internal/testUtils.js +2 -1
- package/build/browser/observable/internal/testUtils.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/browser/util/extractObjectOrInterfaceType.js +5 -1
- package/build/browser/util/extractObjectOrInterfaceType.js.map +1 -1
- package/build/browser/util/extractObjectOrInterfaceType.test.js +21 -2
- package/build/browser/util/extractObjectOrInterfaceType.test.js.map +1 -1
- package/build/cjs/{chunk-2YVNXAHH.cjs → chunk-DCEFUXFS.cjs} +20 -5
- package/build/cjs/chunk-DCEFUXFS.cjs.map +1 -0
- package/build/cjs/{chunk-QTVK57MS.cjs → chunk-XLVCX6PD.cjs} +56 -55
- package/build/cjs/chunk-XLVCX6PD.cjs.map +1 -0
- package/build/cjs/index.cjs +7 -7
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/unstable-do-not-use.cjs +31 -31
- package/build/esm/MinimalClientContext.js.map +1 -1
- package/build/esm/createMinimalClient.js +2 -1
- package/build/esm/createMinimalClient.js.map +1 -1
- package/build/esm/object/fetchPage.js +3 -2
- package/build/esm/object/fetchPage.js.map +1 -1
- package/build/esm/objectSet/createObjectSet.js +11 -0
- package/build/esm/objectSet/createObjectSet.js.map +1 -1
- package/build/esm/observable/internal/testUtils.js +2 -1
- package/build/esm/observable/internal/testUtils.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/esm/util/extractObjectOrInterfaceType.js +5 -1
- package/build/esm/util/extractObjectOrInterfaceType.js.map +1 -1
- package/build/esm/util/extractObjectOrInterfaceType.test.js +21 -2
- package/build/esm/util/extractObjectOrInterfaceType.test.js.map +1 -1
- package/build/types/MinimalClientContext.d.ts +1 -0
- package/build/types/MinimalClientContext.d.ts.map +1 -1
- package/build/types/observable/internal/testUtils.d.ts.map +1 -1
- package/package.json +7 -7
- package/build/cjs/chunk-2YVNXAHH.cjs.map +0 -1
- package/build/cjs/chunk-QTVK57MS.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDCEFUXFS_cjs = require('./chunk-DCEFUXFS.cjs');
|
|
4
4
|
var unstable = require('@osdk/api/unstable');
|
|
5
5
|
var client_unstable = require('@osdk/client.unstable');
|
|
6
6
|
var invariant = require('tiny-invariant');
|
|
@@ -446,19 +446,19 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
446
446
|
return Promise.all(promiseArray);
|
|
447
447
|
}
|
|
448
448
|
if (isAttachmentUpload(value)) {
|
|
449
|
-
const attachment = await
|
|
449
|
+
const attachment = await chunkDCEFUXFS_cjs.Attachment_exports.upload(client, value.data, {
|
|
450
450
|
filename: value.name
|
|
451
451
|
});
|
|
452
452
|
return await toDataValue(attachment.rid, client, actionMetadata);
|
|
453
453
|
}
|
|
454
454
|
if (isAttachmentFile(value)) {
|
|
455
|
-
const attachment = await
|
|
455
|
+
const attachment = await chunkDCEFUXFS_cjs.Attachment_exports.upload(client, value, {
|
|
456
456
|
filename: value.name
|
|
457
457
|
});
|
|
458
458
|
return await toDataValue(attachment.rid, client, actionMetadata);
|
|
459
459
|
}
|
|
460
460
|
if (isMediaUpload(value)) {
|
|
461
|
-
const mediaRef = await
|
|
461
|
+
const mediaRef = await chunkDCEFUXFS_cjs.MediaReferenceProperty_exports.uploadMedia(client, await client.ontologyRid, actionMetadata.apiName, value.data, {
|
|
462
462
|
mediaItemPath: value.path,
|
|
463
463
|
preview: true
|
|
464
464
|
});
|
|
@@ -473,11 +473,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
473
473
|
if (isPoint(value)) {
|
|
474
474
|
return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client, actionMetadata);
|
|
475
475
|
}
|
|
476
|
-
if (
|
|
476
|
+
if (chunkDCEFUXFS_cjs.isWireObjectSet(value)) {
|
|
477
477
|
return value;
|
|
478
478
|
}
|
|
479
|
-
if (
|
|
480
|
-
return
|
|
479
|
+
if (chunkDCEFUXFS_cjs.isObjectSet(value)) {
|
|
480
|
+
return chunkDCEFUXFS_cjs.getWireObjectSet(value);
|
|
481
481
|
}
|
|
482
482
|
if (isMediaReference(value)) {
|
|
483
483
|
return value;
|
|
@@ -500,11 +500,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
500
500
|
|
|
501
501
|
// src/actions/applyAction.ts
|
|
502
502
|
async function applyAction(client, action, parameters, options = {}) {
|
|
503
|
-
const clientWithHeaders =
|
|
503
|
+
const clientWithHeaders = chunkDCEFUXFS_cjs.addUserAgentAndRequestContextHeaders(chunkDCEFUXFS_cjs.augmentRequestContext(client, (_) => ({
|
|
504
504
|
finalMethodCall: "applyAction"
|
|
505
505
|
})), action);
|
|
506
506
|
if (Array.isArray(parameters)) {
|
|
507
|
-
const response = await
|
|
507
|
+
const response = await chunkDCEFUXFS_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
508
508
|
requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)) : [],
|
|
509
509
|
options: {
|
|
510
510
|
returnEdits: options?.$returnEdits ? "ALL" : "NONE"
|
|
@@ -515,7 +515,7 @@ async function applyAction(client, action, parameters, options = {}) {
|
|
|
515
515
|
const edits = response.edits;
|
|
516
516
|
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
517
517
|
} else {
|
|
518
|
-
const response = await
|
|
518
|
+
const response = await chunkDCEFUXFS_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
519
519
|
parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
|
|
520
520
|
options: {
|
|
521
521
|
mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
|
|
@@ -722,7 +722,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
async getLatestValue() {
|
|
725
|
-
const latestPointPromise =
|
|
725
|
+
const latestPointPromise = chunkDCEFUXFS_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
726
726
|
latestPointPromise.then(
|
|
727
727
|
(latestPoint) => this.lastFetchedValue = latestPoint,
|
|
728
728
|
// eslint-disable-next-line no-console
|
|
@@ -738,7 +738,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
738
738
|
return allPoints;
|
|
739
739
|
}
|
|
740
740
|
async *asyncIterValues(query) {
|
|
741
|
-
const streamPointsIterator = await
|
|
741
|
+
const streamPointsIterator = await chunkDCEFUXFS_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
742
742
|
range: getTimeRange(query)
|
|
743
743
|
} : {});
|
|
744
744
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -765,13 +765,13 @@ var MediaReferencePropertyImpl = class {
|
|
|
765
765
|
this.#mediaReference = mediaReference;
|
|
766
766
|
}
|
|
767
767
|
async fetchContents() {
|
|
768
|
-
return
|
|
768
|
+
return chunkDCEFUXFS_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
769
769
|
preview: true
|
|
770
770
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
771
771
|
});
|
|
772
772
|
}
|
|
773
773
|
async fetchMetadata() {
|
|
774
|
-
const r = await
|
|
774
|
+
const r = await chunkDCEFUXFS_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
775
775
|
preview: true
|
|
776
776
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
777
777
|
});
|
|
@@ -795,10 +795,10 @@ var TimeSeriesPropertyImpl = class {
|
|
|
795
795
|
this.#triplet = [objectApiName, primaryKey, propertyName];
|
|
796
796
|
}
|
|
797
797
|
async getFirstPoint() {
|
|
798
|
-
return
|
|
798
|
+
return chunkDCEFUXFS_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
799
799
|
}
|
|
800
800
|
async getLastPoint() {
|
|
801
|
-
return
|
|
801
|
+
return chunkDCEFUXFS_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
802
802
|
}
|
|
803
803
|
async getAllPoints(query) {
|
|
804
804
|
const allPoints = [];
|
|
@@ -808,7 +808,7 @@ var TimeSeriesPropertyImpl = class {
|
|
|
808
808
|
return allPoints;
|
|
809
809
|
}
|
|
810
810
|
async *asyncIterPoints(query) {
|
|
811
|
-
const streamPointsIterator = await
|
|
811
|
+
const streamPointsIterator = await chunkDCEFUXFS_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
812
812
|
range: getTimeRange(query)
|
|
813
813
|
} : {});
|
|
814
814
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -837,8 +837,8 @@ function get$link(holder) {
|
|
|
837
837
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
838
838
|
}).pivotTo(linkName);
|
|
839
839
|
const value = !linkDef.multiplicity ? {
|
|
840
|
-
fetchOne: (options) =>
|
|
841
|
-
fetchOneWithErrors: (options) =>
|
|
840
|
+
fetchOne: (options) => chunkDCEFUXFS_cjs.fetchSingle(client, objDef, options ?? {}, chunkDCEFUXFS_cjs.getWireObjectSet(objectSet)),
|
|
841
|
+
fetchOneWithErrors: (options) => chunkDCEFUXFS_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkDCEFUXFS_cjs.getWireObjectSet(objectSet))
|
|
842
842
|
} : objectSet;
|
|
843
843
|
return [linkName, value];
|
|
844
844
|
})));
|
|
@@ -854,8 +854,8 @@ function get$linkForInterface(holder) {
|
|
|
854
854
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
855
855
|
})).pivotTo(linkName);
|
|
856
856
|
const value = !linkDef.multiplicity ? {
|
|
857
|
-
fetchOne: (options) =>
|
|
858
|
-
fetchOneWithErrors: (options) =>
|
|
857
|
+
fetchOne: (options) => chunkDCEFUXFS_cjs.fetchSingle(client, objDef, options ?? {}, chunkDCEFUXFS_cjs.getWireObjectSet(objectSet)),
|
|
858
|
+
fetchOneWithErrors: (options) => chunkDCEFUXFS_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkDCEFUXFS_cjs.getWireObjectSet(objectSet))
|
|
859
859
|
} : objectSet;
|
|
860
860
|
return [linkName, value];
|
|
861
861
|
})));
|
|
@@ -863,7 +863,7 @@ function get$linkForInterface(holder) {
|
|
|
863
863
|
|
|
864
864
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
865
865
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
866
|
-
const [objApiNamespace] =
|
|
866
|
+
const [objApiNamespace] = chunkDCEFUXFS_cjs.extractNamespace(interfaceDef.apiName);
|
|
867
867
|
return Object.freeze(Object.defineProperties({}, {
|
|
868
868
|
// first to minimize hidden classes
|
|
869
869
|
[UnderlyingOsdkObject]: {
|
|
@@ -918,7 +918,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
918
918
|
},
|
|
919
919
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
920
920
|
const objDef = underlying[ObjectDefRef];
|
|
921
|
-
const [apiNamespace, apiName] =
|
|
921
|
+
const [apiNamespace, apiName] = chunkDCEFUXFS_cjs.extractNamespace(p);
|
|
922
922
|
const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
|
|
923
923
|
return [apiNamespace === objApiNamespace ? apiName : p, {
|
|
924
924
|
enumerable: targetPropName in underlying,
|
|
@@ -1070,9 +1070,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1070
1070
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1071
1071
|
case "attachment":
|
|
1072
1072
|
if (Array.isArray(rawValue)) {
|
|
1073
|
-
return rawValue.map((a) =>
|
|
1073
|
+
return rawValue.map((a) => chunkDCEFUXFS_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1074
1074
|
} else {
|
|
1075
|
-
return
|
|
1075
|
+
return chunkDCEFUXFS_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1076
1076
|
}
|
|
1077
1077
|
default:
|
|
1078
1078
|
process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
|
|
@@ -1088,9 +1088,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1088
1088
|
}
|
|
1089
1089
|
if (propDef.type === "attachment") {
|
|
1090
1090
|
if (Array.isArray(rawValue)) {
|
|
1091
|
-
return rawValue.map((a) =>
|
|
1091
|
+
return rawValue.map((a) => chunkDCEFUXFS_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1092
1092
|
}
|
|
1093
|
-
return
|
|
1093
|
+
return chunkDCEFUXFS_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1094
1094
|
}
|
|
1095
1095
|
if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
|
|
1096
1096
|
return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
|
|
@@ -1314,13 +1314,13 @@ function deepFreeze(obj) {
|
|
|
1314
1314
|
return Object.freeze(obj);
|
|
1315
1315
|
}
|
|
1316
1316
|
async function loadActionMetadata(client, actionType) {
|
|
1317
|
-
const r = await
|
|
1317
|
+
const r = await chunkDCEFUXFS_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType, {
|
|
1318
1318
|
branch: client.branch
|
|
1319
1319
|
});
|
|
1320
1320
|
return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
|
|
1321
1321
|
}
|
|
1322
1322
|
async function loadFullObjectMetadata(client, objectType) {
|
|
1323
|
-
const full = await
|
|
1323
|
+
const full = await chunkDCEFUXFS_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
|
|
1324
1324
|
preview: true,
|
|
1325
1325
|
branch: client.branch
|
|
1326
1326
|
});
|
|
@@ -1330,7 +1330,7 @@ async function loadFullObjectMetadata(client, objectType) {
|
|
|
1330
1330
|
};
|
|
1331
1331
|
}
|
|
1332
1332
|
async function loadInterfaceMetadata(client, objectType) {
|
|
1333
|
-
const r = await
|
|
1333
|
+
const r = await chunkDCEFUXFS_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
|
|
1334
1334
|
preview: true,
|
|
1335
1335
|
branch: client.branch
|
|
1336
1336
|
});
|
|
@@ -1338,7 +1338,7 @@ async function loadInterfaceMetadata(client, objectType) {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
|
|
1340
1340
|
const [apiName, version] = queryTypeApiNameAndVersion.split(":");
|
|
1341
|
-
const r = await
|
|
1341
|
+
const r = await chunkDCEFUXFS_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
|
|
1342
1342
|
version
|
|
1343
1343
|
});
|
|
1344
1344
|
return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
|
|
@@ -1395,11 +1395,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1395
1395
|
};
|
|
1396
1396
|
|
|
1397
1397
|
// src/util/UserAgent.ts
|
|
1398
|
-
var USER_AGENT = `osdk-client/${"2.5.0-beta.
|
|
1399
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.5.0-beta.
|
|
1398
|
+
var USER_AGENT = `osdk-client/${"2.5.0-beta.14"}`;
|
|
1399
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.5.0-beta.14"}`;
|
|
1400
1400
|
|
|
1401
1401
|
// src/createMinimalClient.ts
|
|
1402
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1402
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkDCEFUXFS_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1403
1403
|
if (process.env.NODE_ENV !== "production") {
|
|
1404
1404
|
try {
|
|
1405
1405
|
new URL(baseUrl);
|
|
@@ -1420,7 +1420,8 @@ function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fet
|
|
|
1420
1420
|
transactionRid: options.transactionRid,
|
|
1421
1421
|
clientCacheKey: {},
|
|
1422
1422
|
requestContext: {},
|
|
1423
|
-
branch: options.branch
|
|
1423
|
+
branch: options.branch,
|
|
1424
|
+
asTypeInterfaceOrObjectMapping: {}
|
|
1424
1425
|
};
|
|
1425
1426
|
return Object.freeze(Object.assign(minimalClient, {
|
|
1426
1427
|
ontologyProvider: createOntologyProviderFactory(options)(minimalClient)
|
|
@@ -1466,13 +1467,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1466
1467
|
switch (desiredType.type) {
|
|
1467
1468
|
case "attachment": {
|
|
1468
1469
|
if (isAttachmentUpload(value)) {
|
|
1469
|
-
const attachment = await
|
|
1470
|
+
const attachment = await chunkDCEFUXFS_cjs.Attachment_exports.upload(client, value.data, {
|
|
1470
1471
|
filename: value.name
|
|
1471
1472
|
});
|
|
1472
1473
|
return attachment.rid;
|
|
1473
1474
|
}
|
|
1474
1475
|
if (isAttachmentFile(value)) {
|
|
1475
|
-
const attachment = await
|
|
1476
|
+
const attachment = await chunkDCEFUXFS_cjs.Attachment_exports.upload(client, value, {
|
|
1476
1477
|
filename: value.name
|
|
1477
1478
|
});
|
|
1478
1479
|
return attachment.rid;
|
|
@@ -1512,11 +1513,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1512
1513
|
}
|
|
1513
1514
|
case "objectSet":
|
|
1514
1515
|
case "interfaceObjectSet": {
|
|
1515
|
-
if (
|
|
1516
|
+
if (chunkDCEFUXFS_cjs.isWireObjectSet(value)) {
|
|
1516
1517
|
return value;
|
|
1517
1518
|
}
|
|
1518
|
-
if (
|
|
1519
|
-
return
|
|
1519
|
+
if (chunkDCEFUXFS_cjs.isObjectSet(value)) {
|
|
1520
|
+
return chunkDCEFUXFS_cjs.getWireObjectSet(value);
|
|
1520
1521
|
}
|
|
1521
1522
|
break;
|
|
1522
1523
|
}
|
|
@@ -1558,7 +1559,7 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1558
1559
|
// src/queries/applyQuery.ts
|
|
1559
1560
|
async function applyQuery(client, query, params) {
|
|
1560
1561
|
const qd = await client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : void 0);
|
|
1561
|
-
const response = await
|
|
1562
|
+
const response = await chunkDCEFUXFS_cjs.Query_exports.execute(chunkDCEFUXFS_cjs.addUserAgentAndRequestContextHeaders(chunkDCEFUXFS_cjs.augmentRequestContext(client, (_) => ({
|
|
1562
1563
|
finalMethodCall: "applyQuery"
|
|
1563
1564
|
})), query), await client.ontologyRid, query.apiName, {
|
|
1564
1565
|
parameters: params ? await remapQueryParams(params, client, qd.parameters) : {}
|
|
@@ -1605,7 +1606,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1605
1606
|
return responseValue;
|
|
1606
1607
|
}
|
|
1607
1608
|
case "attachment": {
|
|
1608
|
-
return
|
|
1609
|
+
return chunkDCEFUXFS_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
1609
1610
|
}
|
|
1610
1611
|
case "object": {
|
|
1611
1612
|
const def = definitions.get(responseDataType.object);
|
|
@@ -1627,7 +1628,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1627
1628
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
1628
1629
|
}
|
|
1629
1630
|
if (typeof responseValue === "string") {
|
|
1630
|
-
return
|
|
1631
|
+
return chunkDCEFUXFS_cjs.createObjectSet(def, client, {
|
|
1631
1632
|
type: "intersect",
|
|
1632
1633
|
objectSets: [{
|
|
1633
1634
|
type: "base",
|
|
@@ -1638,7 +1639,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1638
1639
|
}]
|
|
1639
1640
|
});
|
|
1640
1641
|
}
|
|
1641
|
-
return
|
|
1642
|
+
return chunkDCEFUXFS_cjs.createObjectSet(def, client, responseValue);
|
|
1642
1643
|
}
|
|
1643
1644
|
case "struct": {
|
|
1644
1645
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -1824,7 +1825,7 @@ function createClientInternal(objectSetFactory, transactionRid, baseUrl, ontolog
|
|
|
1824
1825
|
ontologyRid
|
|
1825
1826
|
}, baseUrl, tokenProvider, {
|
|
1826
1827
|
...options,
|
|
1827
|
-
logger: options?.logger ?? new
|
|
1828
|
+
logger: options?.logger ?? new chunkDCEFUXFS_cjs.MinimalLogger(),
|
|
1828
1829
|
transactionRid,
|
|
1829
1830
|
branch: options?.branch
|
|
1830
1831
|
}, fetchFn, objectSetFactory);
|
|
@@ -1847,7 +1848,7 @@ function createClientFromContext(clientCtx) {
|
|
|
1847
1848
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
1848
1849
|
return {
|
|
1849
1850
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
1850
|
-
return await
|
|
1851
|
+
return await chunkDCEFUXFS_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
1851
1852
|
}
|
|
1852
1853
|
};
|
|
1853
1854
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -1859,7 +1860,7 @@ function createClientFromContext(clientCtx) {
|
|
|
1859
1860
|
objectType,
|
|
1860
1861
|
propertyType
|
|
1861
1862
|
} = args;
|
|
1862
|
-
return await
|
|
1863
|
+
return await chunkDCEFUXFS_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
|
|
1863
1864
|
mediaItemPath: fileName,
|
|
1864
1865
|
preview: true
|
|
1865
1866
|
});
|
|
@@ -1868,10 +1869,10 @@ function createClientFromContext(clientCtx) {
|
|
|
1868
1869
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
1869
1870
|
return {
|
|
1870
1871
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
1871
|
-
return await
|
|
1872
|
+
return await chunkDCEFUXFS_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
1872
1873
|
},
|
|
1873
1874
|
fetchPageByRidNoType: async (rids, options) => {
|
|
1874
|
-
return await
|
|
1875
|
+
return await chunkDCEFUXFS_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
1875
1876
|
}
|
|
1876
1877
|
};
|
|
1877
1878
|
}
|
|
@@ -1883,13 +1884,13 @@ function createClientFromContext(clientCtx) {
|
|
|
1883
1884
|
const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
|
|
1884
1885
|
const symbolClientContext2 = "__osdkClientContext";
|
|
1885
1886
|
const client = Object.defineProperties(clientFn, {
|
|
1886
|
-
[
|
|
1887
|
+
[chunkDCEFUXFS_cjs.symbolClientContext]: {
|
|
1887
1888
|
value: clientCtx
|
|
1888
1889
|
},
|
|
1889
1890
|
[symbolClientContext2]: {
|
|
1890
1891
|
value: clientCtx
|
|
1891
1892
|
},
|
|
1892
|
-
[
|
|
1893
|
+
[chunkDCEFUXFS_cjs.additionalContext]: {
|
|
1893
1894
|
value: clientCtx
|
|
1894
1895
|
},
|
|
1895
1896
|
fetchMetadata: {
|
|
@@ -1898,8 +1899,8 @@ function createClientFromContext(clientCtx) {
|
|
|
1898
1899
|
});
|
|
1899
1900
|
return client;
|
|
1900
1901
|
}
|
|
1901
|
-
var createClient = createClientInternal.bind(void 0,
|
|
1902
|
-
var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(
|
|
1902
|
+
var createClient = createClientInternal.bind(void 0, chunkDCEFUXFS_cjs.createObjectSet, void 0);
|
|
1903
|
+
var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(chunkDCEFUXFS_cjs.createObjectSet, transactionRid, ...args);
|
|
1903
1904
|
function createWithRid(rids) {
|
|
1904
1905
|
const withRid = {
|
|
1905
1906
|
type: "static",
|
|
@@ -1918,5 +1919,5 @@ exports.createClient = createClient;
|
|
|
1918
1919
|
exports.createClientFromContext = createClientFromContext;
|
|
1919
1920
|
exports.createClientWithTransaction = createClientWithTransaction;
|
|
1920
1921
|
exports.createObjectSpecifierFromPrimaryKey = createObjectSpecifierFromPrimaryKey;
|
|
1921
|
-
//# sourceMappingURL=chunk-
|
|
1922
|
-
//# sourceMappingURL=chunk-
|
|
1922
|
+
//# sourceMappingURL=chunk-XLVCX6PD.cjs.map
|
|
1923
|
+
//# sourceMappingURL=chunk-XLVCX6PD.cjs.map
|