@osdk/client 2.4.0-beta.11 → 2.4.0-beta.13
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 +25 -0
- package/build/browser/fetchMetadata.test.js +7 -1
- package/build/browser/fetchMetadata.test.js.map +1 -1
- package/build/browser/index.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects.js +3 -2
- package/build/browser/object/convertWireToOsdkObjects.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects.test.js +35 -23
- package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
- package/build/browser/objectSet/InterfaceObjectSet.test.js +5 -1
- package/build/browser/objectSet/InterfaceObjectSet.test.js.map +1 -1
- package/build/browser/objectSet/createObjectSet.js +5 -1
- package/build/browser/objectSet/createObjectSet.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/{chunk-E5BQ7757.cjs → chunk-VDP26RI3.cjs} +7 -3
- package/build/cjs/chunk-VDP26RI3.cjs.map +1 -0
- package/build/cjs/{chunk-NKDL5OWO.cjs → chunk-ZU44HMSL.cjs} +54 -53
- package/build/cjs/chunk-ZU44HMSL.cjs.map +1 -0
- package/build/cjs/index.cjs +6 -6
- package/build/cjs/index.d.cts +1 -1
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/unstable-do-not-use.cjs +16 -16
- package/build/esm/fetchMetadata.test.js +7 -1
- package/build/esm/fetchMetadata.test.js.map +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects.js +3 -2
- package/build/esm/object/convertWireToOsdkObjects.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects.test.js +35 -23
- package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
- package/build/esm/objectSet/InterfaceObjectSet.test.js +5 -1
- package/build/esm/objectSet/InterfaceObjectSet.test.js.map +1 -1
- package/build/esm/objectSet/createObjectSet.js +5 -1
- package/build/esm/objectSet/createObjectSet.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/package.json +7 -7
- package/build/cjs/chunk-E5BQ7757.cjs.map +0 -1
- package/build/cjs/chunk-NKDL5OWO.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkVDP26RI3_cjs = require('./chunk-VDP26RI3.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');
|
|
@@ -429,19 +429,19 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
429
429
|
return Promise.all(promiseArray);
|
|
430
430
|
}
|
|
431
431
|
if (isAttachmentUpload(value)) {
|
|
432
|
-
const attachment = await
|
|
432
|
+
const attachment = await chunkVDP26RI3_cjs.Attachment_exports.upload(client, value.data, {
|
|
433
433
|
filename: value.name
|
|
434
434
|
});
|
|
435
435
|
return await toDataValue(attachment.rid, client, actionMetadata);
|
|
436
436
|
}
|
|
437
437
|
if (isAttachmentFile(value)) {
|
|
438
|
-
const attachment = await
|
|
438
|
+
const attachment = await chunkVDP26RI3_cjs.Attachment_exports.upload(client, value, {
|
|
439
439
|
filename: value.name
|
|
440
440
|
});
|
|
441
441
|
return await toDataValue(attachment.rid, client, actionMetadata);
|
|
442
442
|
}
|
|
443
443
|
if (isMediaUpload(value)) {
|
|
444
|
-
const mediaRef = await
|
|
444
|
+
const mediaRef = await chunkVDP26RI3_cjs.MediaReferenceProperty_exports.uploadMedia(client, await client.ontologyRid, actionMetadata.apiName, value.data, {
|
|
445
445
|
mediaItemPath: value.path,
|
|
446
446
|
preview: true
|
|
447
447
|
});
|
|
@@ -456,11 +456,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
456
456
|
if (isPoint(value)) {
|
|
457
457
|
return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client, actionMetadata);
|
|
458
458
|
}
|
|
459
|
-
if (
|
|
459
|
+
if (chunkVDP26RI3_cjs.isWireObjectSet(value)) {
|
|
460
460
|
return value;
|
|
461
461
|
}
|
|
462
|
-
if (
|
|
463
|
-
return
|
|
462
|
+
if (chunkVDP26RI3_cjs.isObjectSet(value)) {
|
|
463
|
+
return chunkVDP26RI3_cjs.getWireObjectSet(value);
|
|
464
464
|
}
|
|
465
465
|
if (isMediaReference(value)) {
|
|
466
466
|
return value;
|
|
@@ -483,11 +483,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
483
483
|
|
|
484
484
|
// src/actions/applyAction.ts
|
|
485
485
|
async function applyAction(client, action, parameters, options = {}) {
|
|
486
|
-
const clientWithHeaders =
|
|
486
|
+
const clientWithHeaders = chunkVDP26RI3_cjs.addUserAgentAndRequestContextHeaders(chunkVDP26RI3_cjs.augmentRequestContext(client, (_) => ({
|
|
487
487
|
finalMethodCall: "applyAction"
|
|
488
488
|
})), action);
|
|
489
489
|
if (Array.isArray(parameters)) {
|
|
490
|
-
const response = await
|
|
490
|
+
const response = await chunkVDP26RI3_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
491
491
|
requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)) : [],
|
|
492
492
|
options: {
|
|
493
493
|
returnEdits: options?.$returnEdits ? "ALL" : "NONE"
|
|
@@ -496,7 +496,7 @@ async function applyAction(client, action, parameters, options = {}) {
|
|
|
496
496
|
const edits = response.edits;
|
|
497
497
|
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
498
498
|
} else {
|
|
499
|
-
const response = await
|
|
499
|
+
const response = await chunkVDP26RI3_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
500
500
|
parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
|
|
501
501
|
options: {
|
|
502
502
|
mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
|
|
@@ -701,7 +701,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
703
|
async getLatestValue() {
|
|
704
|
-
const latestPointPromise =
|
|
704
|
+
const latestPointPromise = chunkVDP26RI3_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
705
705
|
latestPointPromise.then(
|
|
706
706
|
(latestPoint) => this.lastFetchedValue = latestPoint,
|
|
707
707
|
// eslint-disable-next-line no-console
|
|
@@ -717,7 +717,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
717
717
|
return allPoints;
|
|
718
718
|
}
|
|
719
719
|
async *asyncIterValues(query) {
|
|
720
|
-
const streamPointsIterator = await
|
|
720
|
+
const streamPointsIterator = await chunkVDP26RI3_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
721
721
|
range: getTimeRange(query)
|
|
722
722
|
} : {});
|
|
723
723
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -744,13 +744,13 @@ var MediaReferencePropertyImpl = class {
|
|
|
744
744
|
this.#mediaReference = mediaReference;
|
|
745
745
|
}
|
|
746
746
|
async fetchContents() {
|
|
747
|
-
return
|
|
747
|
+
return chunkVDP26RI3_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
748
748
|
preview: true
|
|
749
749
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
750
750
|
});
|
|
751
751
|
}
|
|
752
752
|
async fetchMetadata() {
|
|
753
|
-
const r = await
|
|
753
|
+
const r = await chunkVDP26RI3_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
754
754
|
preview: true
|
|
755
755
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
756
756
|
});
|
|
@@ -774,10 +774,10 @@ var TimeSeriesPropertyImpl = class {
|
|
|
774
774
|
this.#triplet = [objectApiName, primaryKey, propertyName];
|
|
775
775
|
}
|
|
776
776
|
async getFirstPoint() {
|
|
777
|
-
return
|
|
777
|
+
return chunkVDP26RI3_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
778
778
|
}
|
|
779
779
|
async getLastPoint() {
|
|
780
|
-
return
|
|
780
|
+
return chunkVDP26RI3_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
781
781
|
}
|
|
782
782
|
async getAllPoints(query) {
|
|
783
783
|
const allPoints = [];
|
|
@@ -787,7 +787,7 @@ var TimeSeriesPropertyImpl = class {
|
|
|
787
787
|
return allPoints;
|
|
788
788
|
}
|
|
789
789
|
async *asyncIterPoints(query) {
|
|
790
|
-
const streamPointsIterator = await
|
|
790
|
+
const streamPointsIterator = await chunkVDP26RI3_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
791
791
|
range: getTimeRange(query)
|
|
792
792
|
} : {});
|
|
793
793
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -815,7 +815,7 @@ var ClientRef = Symbol("ClientRef" );
|
|
|
815
815
|
|
|
816
816
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
817
817
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
818
|
-
const [objApiNamespace] =
|
|
818
|
+
const [objApiNamespace] = chunkVDP26RI3_cjs.extractNamespace(interfaceDef.apiName);
|
|
819
819
|
return Object.freeze(Object.defineProperties({}, {
|
|
820
820
|
// first to minimize hidden classes
|
|
821
821
|
[UnderlyingOsdkObject]: {
|
|
@@ -865,7 +865,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
865
865
|
},
|
|
866
866
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
867
867
|
const objDef = underlying[ObjectDefRef];
|
|
868
|
-
const [apiNamespace, apiName] =
|
|
868
|
+
const [apiNamespace, apiName] = chunkVDP26RI3_cjs.extractNamespace(p);
|
|
869
869
|
const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
|
|
870
870
|
return [apiNamespace === objApiNamespace ? apiName : p, {
|
|
871
871
|
enumerable: targetPropName in underlying,
|
|
@@ -941,8 +941,8 @@ function get$link(holder) {
|
|
|
941
941
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
942
942
|
}).pivotTo(linkName);
|
|
943
943
|
const value = !linkDef.multiplicity ? {
|
|
944
|
-
fetchOne: (options) =>
|
|
945
|
-
fetchOneWithErrors: (options) =>
|
|
944
|
+
fetchOne: (options) => chunkVDP26RI3_cjs.fetchSingle(client, objDef, options ?? {}, chunkVDP26RI3_cjs.getWireObjectSet(objectSet)),
|
|
945
|
+
fetchOneWithErrors: (options) => chunkVDP26RI3_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkVDP26RI3_cjs.getWireObjectSet(objectSet))
|
|
946
946
|
} : objectSet;
|
|
947
947
|
return [linkName, value];
|
|
948
948
|
})));
|
|
@@ -1035,9 +1035,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1035
1035
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1036
1036
|
case "attachment":
|
|
1037
1037
|
if (Array.isArray(rawValue)) {
|
|
1038
|
-
return rawValue.map((a) =>
|
|
1038
|
+
return rawValue.map((a) => chunkVDP26RI3_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1039
1039
|
} else {
|
|
1040
|
-
return
|
|
1040
|
+
return chunkVDP26RI3_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1041
1041
|
}
|
|
1042
1042
|
default:
|
|
1043
1043
|
process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
|
|
@@ -1053,9 +1053,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1053
1053
|
}
|
|
1054
1054
|
if (propDef.type === "attachment") {
|
|
1055
1055
|
if (Array.isArray(rawValue)) {
|
|
1056
|
-
return rawValue.map((a) =>
|
|
1056
|
+
return rawValue.map((a) => chunkVDP26RI3_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1057
1057
|
}
|
|
1058
|
-
return
|
|
1058
|
+
return chunkVDP26RI3_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1059
1059
|
}
|
|
1060
1060
|
if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
|
|
1061
1061
|
return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
|
|
@@ -1113,11 +1113,12 @@ async function convertWireToOsdkObjects(client, objects, interfaceApiName, force
|
|
|
1113
1113
|
}
|
|
1114
1114
|
async function convertWireToOsdkObjects2(client, objects, interfaceApiName, derivedPropertyTypeByName, forceRemoveRid = false, selectedProps, strictNonNull = false, interfaceToObjectTypeMappings = {}) {
|
|
1115
1115
|
fixObjectPropertiesInPlace(objects, forceRemoveRid);
|
|
1116
|
+
const isInterfaceScoped = Object.keys(interfaceToObjectTypeMappings).length > 0;
|
|
1116
1117
|
const ret = [];
|
|
1117
1118
|
for (const rawObj of objects) {
|
|
1118
1119
|
const objectDef = await client.ontologyProvider.getObjectDefinition(rawObj.$apiName);
|
|
1119
1120
|
!objectDef ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Missing definition for '${rawObj.$apiName}'`) : invariant__default.default(false) : void 0;
|
|
1120
|
-
const interfaceToObjMapping = interfaceApiName ? interfaceToObjectTypeMappings[interfaceApiName][rawObj.$apiName] : void 0;
|
|
1121
|
+
const interfaceToObjMapping = interfaceApiName && isInterfaceScoped ? interfaceToObjectTypeMappings[interfaceApiName][rawObj.$apiName] : void 0;
|
|
1121
1122
|
const ifaceSelected = interfaceApiName && interfaceToObjMapping ? selectedProps ? Object.keys(interfaceToObjMapping).filter((val) => {
|
|
1122
1123
|
selectedProps?.includes(interfaceToObjMapping[val]);
|
|
1123
1124
|
}) : [...Object.values(interfaceToObjMapping), objectDef.primaryKeyApiName] : void 0;
|
|
@@ -1136,7 +1137,7 @@ async function convertWireToOsdkObjects2(client, objects, interfaceApiName, deri
|
|
|
1136
1137
|
continue;
|
|
1137
1138
|
}
|
|
1138
1139
|
let osdkObject = createOsdkObject(client, objectDef, rawObj, derivedPropertyTypeByName);
|
|
1139
|
-
if (interfaceApiName) osdkObject = osdkObject.$as(interfaceApiName);
|
|
1140
|
+
if (interfaceApiName && isInterfaceScoped) osdkObject = osdkObject.$as(interfaceApiName);
|
|
1140
1141
|
ret.push(osdkObject);
|
|
1141
1142
|
}
|
|
1142
1143
|
return ret;
|
|
@@ -1274,11 +1275,11 @@ function deepFreeze(obj) {
|
|
|
1274
1275
|
return Object.freeze(obj);
|
|
1275
1276
|
}
|
|
1276
1277
|
async function loadActionMetadata(client, actionType) {
|
|
1277
|
-
const r = await
|
|
1278
|
+
const r = await chunkVDP26RI3_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType);
|
|
1278
1279
|
return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
|
|
1279
1280
|
}
|
|
1280
1281
|
async function loadFullObjectMetadata(client, objectType) {
|
|
1281
|
-
const full = await
|
|
1282
|
+
const full = await chunkVDP26RI3_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
|
|
1282
1283
|
preview: true
|
|
1283
1284
|
});
|
|
1284
1285
|
const ret = generatorConverters.wireObjectTypeFullMetadataToSdkObjectMetadata(full, true);
|
|
@@ -1287,14 +1288,14 @@ async function loadFullObjectMetadata(client, objectType) {
|
|
|
1287
1288
|
};
|
|
1288
1289
|
}
|
|
1289
1290
|
async function loadInterfaceMetadata(client, objectType) {
|
|
1290
|
-
const r = await
|
|
1291
|
+
const r = await chunkVDP26RI3_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
|
|
1291
1292
|
preview: true
|
|
1292
1293
|
});
|
|
1293
1294
|
return generatorConverters.__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(r, true);
|
|
1294
1295
|
}
|
|
1295
1296
|
async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
|
|
1296
1297
|
const [apiName, version] = queryTypeApiNameAndVersion.split(":");
|
|
1297
|
-
const r = await
|
|
1298
|
+
const r = await chunkVDP26RI3_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
|
|
1298
1299
|
version
|
|
1299
1300
|
});
|
|
1300
1301
|
return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
|
|
@@ -1351,11 +1352,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1351
1352
|
};
|
|
1352
1353
|
|
|
1353
1354
|
// src/util/UserAgent.ts
|
|
1354
|
-
var USER_AGENT = `osdk-client/${"2.4.0-beta.
|
|
1355
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.4.0-beta.
|
|
1355
|
+
var USER_AGENT = `osdk-client/${"2.4.0-beta.13"}`;
|
|
1356
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.4.0-beta.13"}`;
|
|
1356
1357
|
|
|
1357
1358
|
// src/createMinimalClient.ts
|
|
1358
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1359
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkVDP26RI3_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1359
1360
|
if (process.env.NODE_ENV !== "production") {
|
|
1360
1361
|
try {
|
|
1361
1362
|
new URL(baseUrl);
|
|
@@ -1421,13 +1422,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1421
1422
|
switch (desiredType.type) {
|
|
1422
1423
|
case "attachment": {
|
|
1423
1424
|
if (isAttachmentUpload(value)) {
|
|
1424
|
-
const attachment = await
|
|
1425
|
+
const attachment = await chunkVDP26RI3_cjs.Attachment_exports.upload(client, value.data, {
|
|
1425
1426
|
filename: value.name
|
|
1426
1427
|
});
|
|
1427
1428
|
return attachment.rid;
|
|
1428
1429
|
}
|
|
1429
1430
|
if (isAttachmentFile(value)) {
|
|
1430
|
-
const attachment = await
|
|
1431
|
+
const attachment = await chunkVDP26RI3_cjs.Attachment_exports.upload(client, value, {
|
|
1431
1432
|
filename: value.name
|
|
1432
1433
|
});
|
|
1433
1434
|
return attachment.rid;
|
|
@@ -1458,11 +1459,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1458
1459
|
break;
|
|
1459
1460
|
}
|
|
1460
1461
|
case "objectSet": {
|
|
1461
|
-
if (
|
|
1462
|
+
if (chunkVDP26RI3_cjs.isWireObjectSet(value)) {
|
|
1462
1463
|
return value;
|
|
1463
1464
|
}
|
|
1464
|
-
if (
|
|
1465
|
-
return
|
|
1465
|
+
if (chunkVDP26RI3_cjs.isObjectSet(value)) {
|
|
1466
|
+
return chunkVDP26RI3_cjs.getWireObjectSet(value);
|
|
1466
1467
|
}
|
|
1467
1468
|
break;
|
|
1468
1469
|
}
|
|
@@ -1504,7 +1505,7 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1504
1505
|
// src/queries/applyQuery.ts
|
|
1505
1506
|
async function applyQuery(client, query, params) {
|
|
1506
1507
|
const qd = await client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : void 0);
|
|
1507
|
-
const response = await
|
|
1508
|
+
const response = await chunkVDP26RI3_cjs.Query_exports.execute(chunkVDP26RI3_cjs.addUserAgentAndRequestContextHeaders(chunkVDP26RI3_cjs.augmentRequestContext(client, (_) => ({
|
|
1508
1509
|
finalMethodCall: "applyQuery"
|
|
1509
1510
|
})), query), await client.ontologyRid, query.apiName, {
|
|
1510
1511
|
parameters: params ? await remapQueryParams(params, client, qd.parameters) : {}
|
|
@@ -1551,7 +1552,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1551
1552
|
return responseValue;
|
|
1552
1553
|
}
|
|
1553
1554
|
case "attachment": {
|
|
1554
|
-
return
|
|
1555
|
+
return chunkVDP26RI3_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
1555
1556
|
}
|
|
1556
1557
|
case "object": {
|
|
1557
1558
|
const def = definitions.get(responseDataType.object);
|
|
@@ -1566,7 +1567,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1566
1567
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
1567
1568
|
}
|
|
1568
1569
|
if (typeof responseValue === "string") {
|
|
1569
|
-
return
|
|
1570
|
+
return chunkVDP26RI3_cjs.createObjectSet(def, client, {
|
|
1570
1571
|
type: "intersect",
|
|
1571
1572
|
objectSets: [{
|
|
1572
1573
|
type: "base",
|
|
@@ -1577,7 +1578,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1577
1578
|
}]
|
|
1578
1579
|
});
|
|
1579
1580
|
}
|
|
1580
|
-
return
|
|
1581
|
+
return chunkVDP26RI3_cjs.createObjectSet(def, client, responseValue);
|
|
1581
1582
|
}
|
|
1582
1583
|
case "struct": {
|
|
1583
1584
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -1749,7 +1750,7 @@ function createClientInternal(objectSetFactory, transactionRid, baseUrl, ontolog
|
|
|
1749
1750
|
ontologyRid
|
|
1750
1751
|
}, baseUrl, tokenProvider, {
|
|
1751
1752
|
...options,
|
|
1752
|
-
logger: options?.logger ?? new
|
|
1753
|
+
logger: options?.logger ?? new chunkVDP26RI3_cjs.MinimalLogger(),
|
|
1753
1754
|
transactionRid
|
|
1754
1755
|
}, fetchFn, objectSetFactory);
|
|
1755
1756
|
return createClientFromContext(clientCtx);
|
|
@@ -1771,7 +1772,7 @@ function createClientFromContext(clientCtx) {
|
|
|
1771
1772
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
1772
1773
|
return {
|
|
1773
1774
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
1774
|
-
return await
|
|
1775
|
+
return await chunkVDP26RI3_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
1775
1776
|
}
|
|
1776
1777
|
};
|
|
1777
1778
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -1783,7 +1784,7 @@ function createClientFromContext(clientCtx) {
|
|
|
1783
1784
|
objectType,
|
|
1784
1785
|
propertyType
|
|
1785
1786
|
} = args;
|
|
1786
|
-
return await
|
|
1787
|
+
return await chunkVDP26RI3_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
|
|
1787
1788
|
mediaItemPath: fileName,
|
|
1788
1789
|
preview: true
|
|
1789
1790
|
});
|
|
@@ -1792,7 +1793,7 @@ function createClientFromContext(clientCtx) {
|
|
|
1792
1793
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
1793
1794
|
return {
|
|
1794
1795
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
1795
|
-
return await
|
|
1796
|
+
return await chunkVDP26RI3_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
1796
1797
|
}
|
|
1797
1798
|
};
|
|
1798
1799
|
}
|
|
@@ -1804,13 +1805,13 @@ function createClientFromContext(clientCtx) {
|
|
|
1804
1805
|
const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
|
|
1805
1806
|
const symbolClientContext2 = "__osdkClientContext";
|
|
1806
1807
|
const client = Object.defineProperties(clientFn, {
|
|
1807
|
-
[
|
|
1808
|
+
[chunkVDP26RI3_cjs.symbolClientContext]: {
|
|
1808
1809
|
value: clientCtx
|
|
1809
1810
|
},
|
|
1810
1811
|
[symbolClientContext2]: {
|
|
1811
1812
|
value: clientCtx
|
|
1812
1813
|
},
|
|
1813
|
-
[
|
|
1814
|
+
[chunkVDP26RI3_cjs.additionalContext]: {
|
|
1814
1815
|
value: clientCtx
|
|
1815
1816
|
},
|
|
1816
1817
|
fetchMetadata: {
|
|
@@ -1819,8 +1820,8 @@ function createClientFromContext(clientCtx) {
|
|
|
1819
1820
|
});
|
|
1820
1821
|
return client;
|
|
1821
1822
|
}
|
|
1822
|
-
var createClient = createClientInternal.bind(void 0,
|
|
1823
|
-
var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(
|
|
1823
|
+
var createClient = createClientInternal.bind(void 0, chunkVDP26RI3_cjs.createObjectSet, void 0);
|
|
1824
|
+
var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(chunkVDP26RI3_cjs.createObjectSet, transactionRid, ...args);
|
|
1824
1825
|
function createWithRid(rids) {
|
|
1825
1826
|
const withRid = {
|
|
1826
1827
|
type: "static",
|
|
@@ -1838,5 +1839,5 @@ exports.createAttachmentUpload = createAttachmentUpload;
|
|
|
1838
1839
|
exports.createClient = createClient;
|
|
1839
1840
|
exports.createClientFromContext = createClientFromContext;
|
|
1840
1841
|
exports.createClientWithTransaction = createClientWithTransaction;
|
|
1841
|
-
//# sourceMappingURL=chunk-
|
|
1842
|
-
//# sourceMappingURL=chunk-
|
|
1842
|
+
//# sourceMappingURL=chunk-ZU44HMSL.cjs.map
|
|
1843
|
+
//# sourceMappingURL=chunk-ZU44HMSL.cjs.map
|