@osdk/client 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/createMediaReferenceProperty.js +7 -1
- package/build/browser/createMediaReferenceProperty.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +2 -1
- package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
- package/build/browser/object/media.test.js +20 -1
- package/build/browser/object/media.test.js.map +1 -1
- package/build/browser/util/UserAgent.js +1 -1
- package/build/cjs/{chunk-5JZGGCIW.cjs → chunk-LPYAXRWJ.cjs} +14 -14
- package/build/cjs/{chunk-5JZGGCIW.cjs.map → chunk-LPYAXRWJ.cjs.map} +1 -1
- package/build/cjs/{chunk-HDAQ6JIR.cjs → chunk-UCW7RLKM.cjs} +2 -2
- package/build/cjs/{chunk-HDAQ6JIR.cjs.map → chunk-UCW7RLKM.cjs.map} +1 -1
- package/build/cjs/index.cjs +56 -49
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/unstable-do-not-use.cjs +8 -8
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/createMediaReferenceProperty.js +7 -1
- package/build/esm/createMediaReferenceProperty.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +2 -1
- package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
- package/build/esm/object/media.test.js +20 -1
- package/build/esm/object/media.test.js.map +1 -1
- package/build/esm/util/UserAgent.js +1 -1
- package/build/types/Client.d.ts +1 -1
- package/build/types/createMediaReferenceProperty.d.ts +4 -1
- package/build/types/createMediaReferenceProperty.d.ts.map +1 -1
- package/package.json +7 -7
package/build/cjs/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkLPYAXRWJ_cjs = require('./chunk-LPYAXRWJ.cjs');
|
|
4
4
|
var chunkT4NIFYZS_cjs = require('./chunk-T4NIFYZS.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkUCW7RLKM_cjs = require('./chunk-UCW7RLKM.cjs');
|
|
6
6
|
var api = require('@osdk/api');
|
|
7
7
|
var shared_net_errors = require('@osdk/shared.net.errors');
|
|
8
8
|
var unstable = require('@osdk/api/unstable');
|
|
@@ -421,13 +421,13 @@ async function toDataValue(value, client) {
|
|
|
421
421
|
return Promise.all(promiseArray);
|
|
422
422
|
}
|
|
423
423
|
if (isAttachmentUpload(value)) {
|
|
424
|
-
const attachment = await
|
|
424
|
+
const attachment = await chunkUCW7RLKM_cjs.Attachment_exports.upload(client, value.data, {
|
|
425
425
|
filename: value.name
|
|
426
426
|
});
|
|
427
427
|
return await toDataValue(attachment.rid, client);
|
|
428
428
|
}
|
|
429
429
|
if (isAttachmentFile(value)) {
|
|
430
|
-
const attachment = await
|
|
430
|
+
const attachment = await chunkUCW7RLKM_cjs.Attachment_exports.upload(client, value, {
|
|
431
431
|
filename: value.name
|
|
432
432
|
});
|
|
433
433
|
return await toDataValue(attachment.rid, client);
|
|
@@ -441,11 +441,11 @@ async function toDataValue(value, client) {
|
|
|
441
441
|
if (isPoint(value)) {
|
|
442
442
|
return await toDataValue(value.coordinates.join(), client);
|
|
443
443
|
}
|
|
444
|
-
if (
|
|
444
|
+
if (chunkLPYAXRWJ_cjs.isWireObjectSet(value)) {
|
|
445
445
|
return value;
|
|
446
446
|
}
|
|
447
|
-
if (
|
|
448
|
-
return
|
|
447
|
+
if (chunkLPYAXRWJ_cjs.isObjectSet(value)) {
|
|
448
|
+
return chunkLPYAXRWJ_cjs.getWireObjectSet(value);
|
|
449
449
|
}
|
|
450
450
|
if (isMediaReference(value)) {
|
|
451
451
|
return value;
|
|
@@ -468,11 +468,11 @@ async function toDataValue(value, client) {
|
|
|
468
468
|
|
|
469
469
|
// src/actions/applyAction.ts
|
|
470
470
|
async function applyAction(client, action, parameters, options = {}) {
|
|
471
|
-
const clientWithHeaders =
|
|
471
|
+
const clientWithHeaders = chunkUCW7RLKM_cjs.addUserAgentAndRequestContextHeaders(chunkLPYAXRWJ_cjs.augmentRequestContext(client, (_) => ({
|
|
472
472
|
finalMethodCall: "applyAction"
|
|
473
473
|
})), action);
|
|
474
474
|
if (Array.isArray(parameters)) {
|
|
475
|
-
const response = await
|
|
475
|
+
const response = await chunkUCW7RLKM_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
476
476
|
requests: parameters ? await remapBatchActionParams(parameters, client) : [],
|
|
477
477
|
options: {
|
|
478
478
|
returnEdits: options?.$returnEdits ? "ALL" : "NONE"
|
|
@@ -481,7 +481,7 @@ async function applyAction(client, action, parameters, options = {}) {
|
|
|
481
481
|
const edits = response.edits;
|
|
482
482
|
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
483
483
|
} else {
|
|
484
|
-
const response = await
|
|
484
|
+
const response = await chunkUCW7RLKM_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
485
485
|
parameters: await remapActionParams(parameters, client),
|
|
486
486
|
options: {
|
|
487
487
|
mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
|
|
@@ -685,7 +685,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
687
|
async getLatestValue() {
|
|
688
|
-
const latestPointPromise =
|
|
688
|
+
const latestPointPromise = chunkUCW7RLKM_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
689
689
|
latestPointPromise.then(
|
|
690
690
|
(latestPoint) => this.lastFetchedValue = latestPoint,
|
|
691
691
|
// eslint-disable-next-line no-console
|
|
@@ -701,7 +701,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
701
701
|
return allPoints;
|
|
702
702
|
}
|
|
703
703
|
async *asyncIterValues(query) {
|
|
704
|
-
const streamPointsIterator = await
|
|
704
|
+
const streamPointsIterator = await chunkUCW7RLKM_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
705
705
|
range: getTimeRange(query)
|
|
706
706
|
} : {});
|
|
707
707
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -712,6 +712,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
712
712
|
|
|
713
713
|
// src/createMediaReferenceProperty.ts
|
|
714
714
|
var MediaReferencePropertyImpl = class {
|
|
715
|
+
#mediaReference;
|
|
715
716
|
#triplet;
|
|
716
717
|
#client;
|
|
717
718
|
constructor(args) {
|
|
@@ -719,19 +720,21 @@ var MediaReferencePropertyImpl = class {
|
|
|
719
720
|
client,
|
|
720
721
|
objectApiName,
|
|
721
722
|
primaryKey,
|
|
722
|
-
propertyName
|
|
723
|
+
propertyName,
|
|
724
|
+
mediaReference
|
|
723
725
|
} = args;
|
|
724
726
|
this.#client = client;
|
|
725
727
|
this.#triplet = [objectApiName, primaryKey, propertyName];
|
|
728
|
+
this.#mediaReference = mediaReference;
|
|
726
729
|
}
|
|
727
730
|
async fetchContents() {
|
|
728
|
-
return
|
|
731
|
+
return chunkUCW7RLKM_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
729
732
|
preview: true
|
|
730
733
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
731
734
|
});
|
|
732
735
|
}
|
|
733
736
|
async fetchMetadata() {
|
|
734
|
-
const r = await
|
|
737
|
+
const r = await chunkUCW7RLKM_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
735
738
|
preview: true
|
|
736
739
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
737
740
|
});
|
|
@@ -741,6 +744,9 @@ var MediaReferencePropertyImpl = class {
|
|
|
741
744
|
mediaType: r.mediaType
|
|
742
745
|
};
|
|
743
746
|
}
|
|
747
|
+
getMediaReference() {
|
|
748
|
+
return this.#mediaReference;
|
|
749
|
+
}
|
|
744
750
|
};
|
|
745
751
|
|
|
746
752
|
// src/createTimeseriesProperty.ts
|
|
@@ -752,10 +758,10 @@ var TimeSeriesPropertyImpl = class {
|
|
|
752
758
|
this.#triplet = [objectApiName, primaryKey, propertyName];
|
|
753
759
|
}
|
|
754
760
|
async getFirstPoint() {
|
|
755
|
-
return
|
|
761
|
+
return chunkUCW7RLKM_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
756
762
|
}
|
|
757
763
|
async getLastPoint() {
|
|
758
|
-
return
|
|
764
|
+
return chunkUCW7RLKM_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
759
765
|
}
|
|
760
766
|
async getAllPoints(query) {
|
|
761
767
|
const allPoints = [];
|
|
@@ -765,7 +771,7 @@ var TimeSeriesPropertyImpl = class {
|
|
|
765
771
|
return allPoints;
|
|
766
772
|
}
|
|
767
773
|
async *asyncIterPoints(query) {
|
|
768
|
-
const streamPointsIterator = await
|
|
774
|
+
const streamPointsIterator = await chunkUCW7RLKM_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
769
775
|
range: getTimeRange(query)
|
|
770
776
|
} : {});
|
|
771
777
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -787,7 +793,7 @@ var InterfaceDefinitions = Symbol("InterfaceDefinitions" );
|
|
|
787
793
|
|
|
788
794
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
789
795
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
790
|
-
const [objApiNamespace] =
|
|
796
|
+
const [objApiNamespace] = chunkLPYAXRWJ_cjs.extractNamespace(interfaceDef.apiName);
|
|
791
797
|
return Object.freeze(Object.defineProperties({}, {
|
|
792
798
|
// first to minimize hidden classes
|
|
793
799
|
[chunkT4NIFYZS_cjs.UnderlyingOsdkObject]: {
|
|
@@ -830,7 +836,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
830
836
|
},
|
|
831
837
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
832
838
|
const objDef = underlying[chunkT4NIFYZS_cjs.ObjectDefRef];
|
|
833
|
-
const [apiNamespace, apiName] =
|
|
839
|
+
const [apiNamespace, apiName] = chunkLPYAXRWJ_cjs.extractNamespace(p);
|
|
834
840
|
const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
|
|
835
841
|
return [apiNamespace === objApiNamespace ? apiName : p, {
|
|
836
842
|
enumerable: targetPropName in underlying,
|
|
@@ -906,8 +912,8 @@ function get$link(holder) {
|
|
|
906
912
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
907
913
|
}).pivotTo(linkName);
|
|
908
914
|
const value = !linkDef.multiplicity ? {
|
|
909
|
-
fetchOne: (options) =>
|
|
910
|
-
fetchOneWithErrors: (options) =>
|
|
915
|
+
fetchOne: (options) => chunkLPYAXRWJ_cjs.fetchSingle(client, objDef, options ?? {}, chunkLPYAXRWJ_cjs.getWireObjectSet(objectSet)),
|
|
916
|
+
fetchOneWithErrors: (options) => chunkLPYAXRWJ_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkLPYAXRWJ_cjs.getWireObjectSet(objectSet))
|
|
911
917
|
} : objectSet;
|
|
912
918
|
return [linkName, value];
|
|
913
919
|
})));
|
|
@@ -991,9 +997,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
991
997
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
992
998
|
case "attachment":
|
|
993
999
|
if (Array.isArray(rawValue)) {
|
|
994
|
-
return rawValue.map((a) =>
|
|
1000
|
+
return rawValue.map((a) => chunkLPYAXRWJ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
995
1001
|
} else {
|
|
996
|
-
return
|
|
1002
|
+
return chunkLPYAXRWJ_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
997
1003
|
}
|
|
998
1004
|
default:
|
|
999
1005
|
process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
|
|
@@ -1009,9 +1015,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1009
1015
|
}
|
|
1010
1016
|
if (propDef.type === "attachment") {
|
|
1011
1017
|
if (Array.isArray(rawValue)) {
|
|
1012
|
-
return rawValue.map((a) =>
|
|
1018
|
+
return rawValue.map((a) => chunkLPYAXRWJ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1013
1019
|
}
|
|
1014
|
-
return
|
|
1020
|
+
return chunkLPYAXRWJ_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1015
1021
|
}
|
|
1016
1022
|
if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
|
|
1017
1023
|
return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
|
|
@@ -1030,7 +1036,8 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1030
1036
|
client,
|
|
1031
1037
|
objectApiName: objectDef.apiName,
|
|
1032
1038
|
primaryKey: rawObject[objectDef.primaryKeyApiName],
|
|
1033
|
-
propertyName: p
|
|
1039
|
+
propertyName: p,
|
|
1040
|
+
mediaReference: rawValue
|
|
1034
1041
|
});
|
|
1035
1042
|
}
|
|
1036
1043
|
}
|
|
@@ -1218,11 +1225,11 @@ function createAsyncClientCache(fn, createCacheLocal = createClientCache) {
|
|
|
1218
1225
|
return ret;
|
|
1219
1226
|
}
|
|
1220
1227
|
async function loadActionMetadata(client, actionType) {
|
|
1221
|
-
const r = await
|
|
1228
|
+
const r = await chunkUCW7RLKM_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType);
|
|
1222
1229
|
return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
|
|
1223
1230
|
}
|
|
1224
1231
|
async function loadFullObjectMetadata(client, objectType) {
|
|
1225
|
-
const full = await
|
|
1232
|
+
const full = await chunkUCW7RLKM_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
|
|
1226
1233
|
preview: true
|
|
1227
1234
|
});
|
|
1228
1235
|
const ret = generatorConverters.wireObjectTypeFullMetadataToSdkObjectMetadata(full, true);
|
|
@@ -1231,14 +1238,14 @@ async function loadFullObjectMetadata(client, objectType) {
|
|
|
1231
1238
|
};
|
|
1232
1239
|
}
|
|
1233
1240
|
async function loadInterfaceMetadata(client, objectType) {
|
|
1234
|
-
const r = await
|
|
1241
|
+
const r = await chunkUCW7RLKM_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
|
|
1235
1242
|
preview: true
|
|
1236
1243
|
});
|
|
1237
1244
|
return generatorConverters.__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(r, true);
|
|
1238
1245
|
}
|
|
1239
1246
|
async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
|
|
1240
1247
|
const [apiName, version] = queryTypeApiNameAndVersion.split(":");
|
|
1241
|
-
const r = await
|
|
1248
|
+
const r = await chunkUCW7RLKM_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
|
|
1242
1249
|
version
|
|
1243
1250
|
});
|
|
1244
1251
|
return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
|
|
@@ -1295,10 +1302,10 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1295
1302
|
};
|
|
1296
1303
|
|
|
1297
1304
|
// src/util/UserAgent.ts
|
|
1298
|
-
var USER_AGENT = `osdk-client/${"2.2.
|
|
1305
|
+
var USER_AGENT = `osdk-client/${"2.2.1"}`;
|
|
1299
1306
|
|
|
1300
1307
|
// src/createMinimalClient.ts
|
|
1301
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1308
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkLPYAXRWJ_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1302
1309
|
if (process.env.NODE_ENV !== "production") {
|
|
1303
1310
|
try {
|
|
1304
1311
|
new URL(baseUrl);
|
|
@@ -1363,13 +1370,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1363
1370
|
switch (desiredType.type) {
|
|
1364
1371
|
case "attachment": {
|
|
1365
1372
|
if (isAttachmentUpload(value)) {
|
|
1366
|
-
const attachment = await
|
|
1373
|
+
const attachment = await chunkUCW7RLKM_cjs.Attachment_exports.upload(client, value.data, {
|
|
1367
1374
|
filename: value.name
|
|
1368
1375
|
});
|
|
1369
1376
|
return attachment.rid;
|
|
1370
1377
|
}
|
|
1371
1378
|
if (isAttachmentFile(value)) {
|
|
1372
|
-
const attachment = await
|
|
1379
|
+
const attachment = await chunkUCW7RLKM_cjs.Attachment_exports.upload(client, value, {
|
|
1373
1380
|
filename: value.name
|
|
1374
1381
|
});
|
|
1375
1382
|
return attachment.rid;
|
|
@@ -1400,11 +1407,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1400
1407
|
break;
|
|
1401
1408
|
}
|
|
1402
1409
|
case "objectSet": {
|
|
1403
|
-
if (
|
|
1410
|
+
if (chunkLPYAXRWJ_cjs.isWireObjectSet(value)) {
|
|
1404
1411
|
return value;
|
|
1405
1412
|
}
|
|
1406
|
-
if (
|
|
1407
|
-
return
|
|
1413
|
+
if (chunkLPYAXRWJ_cjs.isObjectSet(value)) {
|
|
1414
|
+
return chunkLPYAXRWJ_cjs.getWireObjectSet(value);
|
|
1408
1415
|
}
|
|
1409
1416
|
break;
|
|
1410
1417
|
}
|
|
@@ -1446,7 +1453,7 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1446
1453
|
// src/queries/applyQuery.ts
|
|
1447
1454
|
async function applyQuery(client, query, params) {
|
|
1448
1455
|
const qd = await client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : void 0);
|
|
1449
|
-
const response = await
|
|
1456
|
+
const response = await chunkUCW7RLKM_cjs.Query_exports.execute(chunkUCW7RLKM_cjs.addUserAgentAndRequestContextHeaders(chunkLPYAXRWJ_cjs.augmentRequestContext(client, (_) => ({
|
|
1450
1457
|
finalMethodCall: "applyQuery"
|
|
1451
1458
|
})), query), await client.ontologyRid, query.apiName, {
|
|
1452
1459
|
parameters: params ? await remapQueryParams(params, client, qd.parameters) : {}
|
|
@@ -1493,7 +1500,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1493
1500
|
return responseValue;
|
|
1494
1501
|
}
|
|
1495
1502
|
case "attachment": {
|
|
1496
|
-
return
|
|
1503
|
+
return chunkLPYAXRWJ_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
1497
1504
|
}
|
|
1498
1505
|
case "object": {
|
|
1499
1506
|
const def = definitions.get(responseDataType.object);
|
|
@@ -1508,7 +1515,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1508
1515
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
1509
1516
|
}
|
|
1510
1517
|
if (typeof responseValue === "string") {
|
|
1511
|
-
return
|
|
1518
|
+
return chunkLPYAXRWJ_cjs.createObjectSet(def, client, {
|
|
1512
1519
|
type: "intersect",
|
|
1513
1520
|
objectSets: [{
|
|
1514
1521
|
type: "base",
|
|
@@ -1519,7 +1526,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1519
1526
|
}]
|
|
1520
1527
|
});
|
|
1521
1528
|
}
|
|
1522
|
-
return
|
|
1529
|
+
return chunkLPYAXRWJ_cjs.createObjectSet(def, client, responseValue);
|
|
1523
1530
|
}
|
|
1524
1531
|
case "struct": {
|
|
1525
1532
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -1687,7 +1694,7 @@ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvi
|
|
|
1687
1694
|
ontologyRid
|
|
1688
1695
|
}, baseUrl, tokenProvider, {
|
|
1689
1696
|
...options,
|
|
1690
|
-
logger: options?.logger ?? new
|
|
1697
|
+
logger: options?.logger ?? new chunkLPYAXRWJ_cjs.MinimalLogger()
|
|
1691
1698
|
}, fetchFn, objectSetFactory);
|
|
1692
1699
|
function clientFn(o) {
|
|
1693
1700
|
if (o.type === "object" || o.type === "interface") {
|
|
@@ -1705,7 +1712,7 @@ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvi
|
|
|
1705
1712
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
1706
1713
|
return {
|
|
1707
1714
|
fetchOneByRid: async (objectType, rid, options2) => {
|
|
1708
|
-
return await
|
|
1715
|
+
return await chunkLPYAXRWJ_cjs.fetchSingle(clientCtx, objectType, options2, createWithRid([rid]));
|
|
1709
1716
|
}
|
|
1710
1717
|
};
|
|
1711
1718
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -1717,7 +1724,7 @@ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvi
|
|
|
1717
1724
|
objectType,
|
|
1718
1725
|
propertyType
|
|
1719
1726
|
} = args;
|
|
1720
|
-
return await
|
|
1727
|
+
return await chunkUCW7RLKM_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
|
|
1721
1728
|
mediaItemPath: fileName,
|
|
1722
1729
|
preview: true
|
|
1723
1730
|
});
|
|
@@ -1726,7 +1733,7 @@ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvi
|
|
|
1726
1733
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
1727
1734
|
return {
|
|
1728
1735
|
fetchPageByRid: async (objectOrInterfaceType, rids, options2 = {}) => {
|
|
1729
|
-
return await
|
|
1736
|
+
return await chunkUCW7RLKM_cjs.fetchPage(clientCtx, objectOrInterfaceType, options2, createWithRid(rids));
|
|
1730
1737
|
}
|
|
1731
1738
|
};
|
|
1732
1739
|
}
|
|
@@ -1738,13 +1745,13 @@ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvi
|
|
|
1738
1745
|
const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
|
|
1739
1746
|
const symbolClientContext2 = "__osdkClientContext";
|
|
1740
1747
|
const client = Object.defineProperties(clientFn, {
|
|
1741
|
-
[
|
|
1748
|
+
[chunkUCW7RLKM_cjs.symbolClientContext]: {
|
|
1742
1749
|
value: clientCtx
|
|
1743
1750
|
},
|
|
1744
1751
|
[symbolClientContext2]: {
|
|
1745
1752
|
value: clientCtx
|
|
1746
1753
|
},
|
|
1747
|
-
[
|
|
1754
|
+
[chunkUCW7RLKM_cjs.additionalContext]: {
|
|
1748
1755
|
value: clientCtx
|
|
1749
1756
|
},
|
|
1750
1757
|
fetchMetadata: {
|
|
@@ -1753,7 +1760,7 @@ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvi
|
|
|
1753
1760
|
});
|
|
1754
1761
|
return client;
|
|
1755
1762
|
}
|
|
1756
|
-
var createClient = createClientInternal.bind(void 0,
|
|
1763
|
+
var createClient = createClientInternal.bind(void 0, chunkLPYAXRWJ_cjs.createObjectSet);
|
|
1757
1764
|
function createWithRid(rids) {
|
|
1758
1765
|
const withRid = {
|
|
1759
1766
|
type: "static",
|