@osdk/client 2.5.0-beta.2 → 2.5.0-beta.4
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 +32 -0
- package/build/browser/createClient.js +4 -1
- package/build/browser/createClient.js.map +1 -1
- package/build/browser/fetchMetadata.test.js +11 -0
- package/build/browser/fetchMetadata.test.js.map +1 -1
- package/build/browser/object/convertWireToOsdkObjects.test.js +12 -0
- package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
- package/build/browser/object/fetchPage.js +22 -0
- package/build/browser/object/fetchPage.js.map +1 -1
- package/build/browser/objectSet/ObjectSet.test.js +6 -0
- package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/{chunk-N5DMNYGH.cjs → chunk-6CBVXAAV.cjs} +54 -51
- package/build/cjs/chunk-6CBVXAAV.cjs.map +1 -0
- package/build/cjs/{chunk-NWD33DSJ.cjs → chunk-QR7IBJPZ.cjs} +41 -15
- package/build/cjs/chunk-QR7IBJPZ.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 +19 -19
- package/build/esm/createClient.js +4 -1
- package/build/esm/createClient.js.map +1 -1
- package/build/esm/fetchMetadata.test.js +11 -0
- package/build/esm/fetchMetadata.test.js.map +1 -1
- package/build/esm/object/convertWireToOsdkObjects.test.js +12 -0
- package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
- package/build/esm/object/fetchPage.js +22 -0
- package/build/esm/object/fetchPage.js.map +1 -1
- package/build/esm/objectSet/ObjectSet.test.js +6 -0
- package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/types/createClient.d.ts.map +1 -1
- package/package.json +8 -8
- package/build/cjs/chunk-N5DMNYGH.cjs.map +0 -1
- package/build/cjs/chunk-NWD33DSJ.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQR7IBJPZ_cjs = require('./chunk-QR7IBJPZ.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 chunkQR7IBJPZ_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 chunkQR7IBJPZ_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 chunkQR7IBJPZ_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 (chunkQR7IBJPZ_cjs.isWireObjectSet(value)) {
|
|
477
477
|
return value;
|
|
478
478
|
}
|
|
479
|
-
if (
|
|
480
|
-
return
|
|
479
|
+
if (chunkQR7IBJPZ_cjs.isObjectSet(value)) {
|
|
480
|
+
return chunkQR7IBJPZ_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 = chunkQR7IBJPZ_cjs.addUserAgentAndRequestContextHeaders(chunkQR7IBJPZ_cjs.augmentRequestContext(client, (_) => ({
|
|
504
504
|
finalMethodCall: "applyAction"
|
|
505
505
|
})), action);
|
|
506
506
|
if (Array.isArray(parameters)) {
|
|
507
|
-
const response = await
|
|
507
|
+
const response = await chunkQR7IBJPZ_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"
|
|
@@ -513,7 +513,7 @@ async function applyAction(client, action, parameters, options = {}) {
|
|
|
513
513
|
const edits = response.edits;
|
|
514
514
|
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
515
515
|
} else {
|
|
516
|
-
const response = await
|
|
516
|
+
const response = await chunkQR7IBJPZ_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
517
517
|
parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
|
|
518
518
|
options: {
|
|
519
519
|
mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
|
|
@@ -718,7 +718,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
720
|
async getLatestValue() {
|
|
721
|
-
const latestPointPromise =
|
|
721
|
+
const latestPointPromise = chunkQR7IBJPZ_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
722
722
|
latestPointPromise.then(
|
|
723
723
|
(latestPoint) => this.lastFetchedValue = latestPoint,
|
|
724
724
|
// eslint-disable-next-line no-console
|
|
@@ -734,7 +734,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
734
734
|
return allPoints;
|
|
735
735
|
}
|
|
736
736
|
async *asyncIterValues(query) {
|
|
737
|
-
const streamPointsIterator = await
|
|
737
|
+
const streamPointsIterator = await chunkQR7IBJPZ_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
738
738
|
range: getTimeRange(query)
|
|
739
739
|
} : {});
|
|
740
740
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -761,13 +761,13 @@ var MediaReferencePropertyImpl = class {
|
|
|
761
761
|
this.#mediaReference = mediaReference;
|
|
762
762
|
}
|
|
763
763
|
async fetchContents() {
|
|
764
|
-
return
|
|
764
|
+
return chunkQR7IBJPZ_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
765
765
|
preview: true
|
|
766
766
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
767
767
|
});
|
|
768
768
|
}
|
|
769
769
|
async fetchMetadata() {
|
|
770
|
-
const r = await
|
|
770
|
+
const r = await chunkQR7IBJPZ_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
771
771
|
preview: true
|
|
772
772
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
773
773
|
});
|
|
@@ -791,10 +791,10 @@ var TimeSeriesPropertyImpl = class {
|
|
|
791
791
|
this.#triplet = [objectApiName, primaryKey, propertyName];
|
|
792
792
|
}
|
|
793
793
|
async getFirstPoint() {
|
|
794
|
-
return
|
|
794
|
+
return chunkQR7IBJPZ_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
795
795
|
}
|
|
796
796
|
async getLastPoint() {
|
|
797
|
-
return
|
|
797
|
+
return chunkQR7IBJPZ_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
798
798
|
}
|
|
799
799
|
async getAllPoints(query) {
|
|
800
800
|
const allPoints = [];
|
|
@@ -804,7 +804,7 @@ var TimeSeriesPropertyImpl = class {
|
|
|
804
804
|
return allPoints;
|
|
805
805
|
}
|
|
806
806
|
async *asyncIterPoints(query) {
|
|
807
|
-
const streamPointsIterator = await
|
|
807
|
+
const streamPointsIterator = await chunkQR7IBJPZ_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
808
808
|
range: getTimeRange(query)
|
|
809
809
|
} : {});
|
|
810
810
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -824,7 +824,7 @@ var ClientRef = Symbol("ClientRef" );
|
|
|
824
824
|
|
|
825
825
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
826
826
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
827
|
-
const [objApiNamespace] =
|
|
827
|
+
const [objApiNamespace] = chunkQR7IBJPZ_cjs.extractNamespace(interfaceDef.apiName);
|
|
828
828
|
return Object.freeze(Object.defineProperties({}, {
|
|
829
829
|
// first to minimize hidden classes
|
|
830
830
|
[UnderlyingOsdkObject]: {
|
|
@@ -874,7 +874,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
874
874
|
},
|
|
875
875
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
876
876
|
const objDef = underlying[ObjectDefRef];
|
|
877
|
-
const [apiNamespace, apiName] =
|
|
877
|
+
const [apiNamespace, apiName] = chunkQR7IBJPZ_cjs.extractNamespace(p);
|
|
878
878
|
const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
|
|
879
879
|
return [apiNamespace === objApiNamespace ? apiName : p, {
|
|
880
880
|
enumerable: targetPropName in underlying,
|
|
@@ -950,8 +950,8 @@ function get$link(holder) {
|
|
|
950
950
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
951
951
|
}).pivotTo(linkName);
|
|
952
952
|
const value = !linkDef.multiplicity ? {
|
|
953
|
-
fetchOne: (options) =>
|
|
954
|
-
fetchOneWithErrors: (options) =>
|
|
953
|
+
fetchOne: (options) => chunkQR7IBJPZ_cjs.fetchSingle(client, objDef, options ?? {}, chunkQR7IBJPZ_cjs.getWireObjectSet(objectSet)),
|
|
954
|
+
fetchOneWithErrors: (options) => chunkQR7IBJPZ_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkQR7IBJPZ_cjs.getWireObjectSet(objectSet))
|
|
955
955
|
} : objectSet;
|
|
956
956
|
return [linkName, value];
|
|
957
957
|
})));
|
|
@@ -1044,9 +1044,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1044
1044
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1045
1045
|
case "attachment":
|
|
1046
1046
|
if (Array.isArray(rawValue)) {
|
|
1047
|
-
return rawValue.map((a) =>
|
|
1047
|
+
return rawValue.map((a) => chunkQR7IBJPZ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1048
1048
|
} else {
|
|
1049
|
-
return
|
|
1049
|
+
return chunkQR7IBJPZ_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1050
1050
|
}
|
|
1051
1051
|
default:
|
|
1052
1052
|
process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
|
|
@@ -1062,9 +1062,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
if (propDef.type === "attachment") {
|
|
1064
1064
|
if (Array.isArray(rawValue)) {
|
|
1065
|
-
return rawValue.map((a) =>
|
|
1065
|
+
return rawValue.map((a) => chunkQR7IBJPZ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1066
1066
|
}
|
|
1067
|
-
return
|
|
1067
|
+
return chunkQR7IBJPZ_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1068
1068
|
}
|
|
1069
1069
|
if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
|
|
1070
1070
|
return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
|
|
@@ -1288,11 +1288,11 @@ function deepFreeze(obj) {
|
|
|
1288
1288
|
return Object.freeze(obj);
|
|
1289
1289
|
}
|
|
1290
1290
|
async function loadActionMetadata(client, actionType) {
|
|
1291
|
-
const r = await
|
|
1291
|
+
const r = await chunkQR7IBJPZ_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType);
|
|
1292
1292
|
return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
|
|
1293
1293
|
}
|
|
1294
1294
|
async function loadFullObjectMetadata(client, objectType) {
|
|
1295
|
-
const full = await
|
|
1295
|
+
const full = await chunkQR7IBJPZ_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
|
|
1296
1296
|
preview: true
|
|
1297
1297
|
});
|
|
1298
1298
|
const ret = generatorConverters.wireObjectTypeFullMetadataToSdkObjectMetadata(full, true);
|
|
@@ -1301,14 +1301,14 @@ async function loadFullObjectMetadata(client, objectType) {
|
|
|
1301
1301
|
};
|
|
1302
1302
|
}
|
|
1303
1303
|
async function loadInterfaceMetadata(client, objectType) {
|
|
1304
|
-
const r = await
|
|
1304
|
+
const r = await chunkQR7IBJPZ_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
|
|
1305
1305
|
preview: true
|
|
1306
1306
|
});
|
|
1307
1307
|
return generatorConverters.__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(r, true);
|
|
1308
1308
|
}
|
|
1309
1309
|
async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
|
|
1310
1310
|
const [apiName, version] = queryTypeApiNameAndVersion.split(":");
|
|
1311
|
-
const r = await
|
|
1311
|
+
const r = await chunkQR7IBJPZ_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
|
|
1312
1312
|
version
|
|
1313
1313
|
});
|
|
1314
1314
|
return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
|
|
@@ -1365,11 +1365,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1365
1365
|
};
|
|
1366
1366
|
|
|
1367
1367
|
// src/util/UserAgent.ts
|
|
1368
|
-
var USER_AGENT = `osdk-client/${"2.5.0-beta.
|
|
1369
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.5.0-beta.
|
|
1368
|
+
var USER_AGENT = `osdk-client/${"2.5.0-beta.4"}`;
|
|
1369
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.5.0-beta.4"}`;
|
|
1370
1370
|
|
|
1371
1371
|
// src/createMinimalClient.ts
|
|
1372
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1372
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkQR7IBJPZ_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1373
1373
|
if (process.env.NODE_ENV !== "production") {
|
|
1374
1374
|
try {
|
|
1375
1375
|
new URL(baseUrl);
|
|
@@ -1435,13 +1435,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1435
1435
|
switch (desiredType.type) {
|
|
1436
1436
|
case "attachment": {
|
|
1437
1437
|
if (isAttachmentUpload(value)) {
|
|
1438
|
-
const attachment = await
|
|
1438
|
+
const attachment = await chunkQR7IBJPZ_cjs.Attachment_exports.upload(client, value.data, {
|
|
1439
1439
|
filename: value.name
|
|
1440
1440
|
});
|
|
1441
1441
|
return attachment.rid;
|
|
1442
1442
|
}
|
|
1443
1443
|
if (isAttachmentFile(value)) {
|
|
1444
|
-
const attachment = await
|
|
1444
|
+
const attachment = await chunkQR7IBJPZ_cjs.Attachment_exports.upload(client, value, {
|
|
1445
1445
|
filename: value.name
|
|
1446
1446
|
});
|
|
1447
1447
|
return attachment.rid;
|
|
@@ -1481,11 +1481,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1481
1481
|
}
|
|
1482
1482
|
case "objectSet":
|
|
1483
1483
|
case "interfaceObjectSet": {
|
|
1484
|
-
if (
|
|
1484
|
+
if (chunkQR7IBJPZ_cjs.isWireObjectSet(value)) {
|
|
1485
1485
|
return value;
|
|
1486
1486
|
}
|
|
1487
|
-
if (
|
|
1488
|
-
return
|
|
1487
|
+
if (chunkQR7IBJPZ_cjs.isObjectSet(value)) {
|
|
1488
|
+
return chunkQR7IBJPZ_cjs.getWireObjectSet(value);
|
|
1489
1489
|
}
|
|
1490
1490
|
break;
|
|
1491
1491
|
}
|
|
@@ -1527,7 +1527,7 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1527
1527
|
// src/queries/applyQuery.ts
|
|
1528
1528
|
async function applyQuery(client, query, params) {
|
|
1529
1529
|
const qd = await client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : void 0);
|
|
1530
|
-
const response = await
|
|
1530
|
+
const response = await chunkQR7IBJPZ_cjs.Query_exports.execute(chunkQR7IBJPZ_cjs.addUserAgentAndRequestContextHeaders(chunkQR7IBJPZ_cjs.augmentRequestContext(client, (_) => ({
|
|
1531
1531
|
finalMethodCall: "applyQuery"
|
|
1532
1532
|
})), query), await client.ontologyRid, query.apiName, {
|
|
1533
1533
|
parameters: params ? await remapQueryParams(params, client, qd.parameters) : {}
|
|
@@ -1574,7 +1574,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1574
1574
|
return responseValue;
|
|
1575
1575
|
}
|
|
1576
1576
|
case "attachment": {
|
|
1577
|
-
return
|
|
1577
|
+
return chunkQR7IBJPZ_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
1578
1578
|
}
|
|
1579
1579
|
case "object": {
|
|
1580
1580
|
const def = definitions.get(responseDataType.object);
|
|
@@ -1596,7 +1596,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1596
1596
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
1597
1597
|
}
|
|
1598
1598
|
if (typeof responseValue === "string") {
|
|
1599
|
-
return
|
|
1599
|
+
return chunkQR7IBJPZ_cjs.createObjectSet(def, client, {
|
|
1600
1600
|
type: "intersect",
|
|
1601
1601
|
objectSets: [{
|
|
1602
1602
|
type: "base",
|
|
@@ -1607,7 +1607,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1607
1607
|
}]
|
|
1608
1608
|
});
|
|
1609
1609
|
}
|
|
1610
|
-
return
|
|
1610
|
+
return chunkQR7IBJPZ_cjs.createObjectSet(def, client, responseValue);
|
|
1611
1611
|
}
|
|
1612
1612
|
case "struct": {
|
|
1613
1613
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -1793,7 +1793,7 @@ function createClientInternal(objectSetFactory, transactionRid, baseUrl, ontolog
|
|
|
1793
1793
|
ontologyRid
|
|
1794
1794
|
}, baseUrl, tokenProvider, {
|
|
1795
1795
|
...options,
|
|
1796
|
-
logger: options?.logger ?? new
|
|
1796
|
+
logger: options?.logger ?? new chunkQR7IBJPZ_cjs.MinimalLogger(),
|
|
1797
1797
|
transactionRid
|
|
1798
1798
|
}, fetchFn, objectSetFactory);
|
|
1799
1799
|
return createClientFromContext(clientCtx);
|
|
@@ -1815,7 +1815,7 @@ function createClientFromContext(clientCtx) {
|
|
|
1815
1815
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
1816
1816
|
return {
|
|
1817
1817
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
1818
|
-
return await
|
|
1818
|
+
return await chunkQR7IBJPZ_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
1819
1819
|
}
|
|
1820
1820
|
};
|
|
1821
1821
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -1827,7 +1827,7 @@ function createClientFromContext(clientCtx) {
|
|
|
1827
1827
|
objectType,
|
|
1828
1828
|
propertyType
|
|
1829
1829
|
} = args;
|
|
1830
|
-
return await
|
|
1830
|
+
return await chunkQR7IBJPZ_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
|
|
1831
1831
|
mediaItemPath: fileName,
|
|
1832
1832
|
preview: true
|
|
1833
1833
|
});
|
|
@@ -1836,7 +1836,10 @@ function createClientFromContext(clientCtx) {
|
|
|
1836
1836
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
1837
1837
|
return {
|
|
1838
1838
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
1839
|
-
return await
|
|
1839
|
+
return await chunkQR7IBJPZ_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
1840
|
+
},
|
|
1841
|
+
fetchPageByRidNoType: async (rids, options) => {
|
|
1842
|
+
return await chunkQR7IBJPZ_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
1840
1843
|
}
|
|
1841
1844
|
};
|
|
1842
1845
|
}
|
|
@@ -1848,13 +1851,13 @@ function createClientFromContext(clientCtx) {
|
|
|
1848
1851
|
const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
|
|
1849
1852
|
const symbolClientContext2 = "__osdkClientContext";
|
|
1850
1853
|
const client = Object.defineProperties(clientFn, {
|
|
1851
|
-
[
|
|
1854
|
+
[chunkQR7IBJPZ_cjs.symbolClientContext]: {
|
|
1852
1855
|
value: clientCtx
|
|
1853
1856
|
},
|
|
1854
1857
|
[symbolClientContext2]: {
|
|
1855
1858
|
value: clientCtx
|
|
1856
1859
|
},
|
|
1857
|
-
[
|
|
1860
|
+
[chunkQR7IBJPZ_cjs.additionalContext]: {
|
|
1858
1861
|
value: clientCtx
|
|
1859
1862
|
},
|
|
1860
1863
|
fetchMetadata: {
|
|
@@ -1863,8 +1866,8 @@ function createClientFromContext(clientCtx) {
|
|
|
1863
1866
|
});
|
|
1864
1867
|
return client;
|
|
1865
1868
|
}
|
|
1866
|
-
var createClient = createClientInternal.bind(void 0,
|
|
1867
|
-
var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(
|
|
1869
|
+
var createClient = createClientInternal.bind(void 0, chunkQR7IBJPZ_cjs.createObjectSet, void 0);
|
|
1870
|
+
var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(chunkQR7IBJPZ_cjs.createObjectSet, transactionRid, ...args);
|
|
1868
1871
|
function createWithRid(rids) {
|
|
1869
1872
|
const withRid = {
|
|
1870
1873
|
type: "static",
|
|
@@ -1883,5 +1886,5 @@ exports.createClient = createClient;
|
|
|
1883
1886
|
exports.createClientFromContext = createClientFromContext;
|
|
1884
1887
|
exports.createClientWithTransaction = createClientWithTransaction;
|
|
1885
1888
|
exports.createObjectSpecifierFromPrimaryKey = createObjectSpecifierFromPrimaryKey;
|
|
1886
|
-
//# sourceMappingURL=chunk-
|
|
1887
|
-
//# sourceMappingURL=chunk-
|
|
1889
|
+
//# sourceMappingURL=chunk-6CBVXAAV.cjs.map
|
|
1890
|
+
//# sourceMappingURL=chunk-6CBVXAAV.cjs.map
|