@osdk/client 2.3.0-rc.11 → 2.3.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 +169 -0
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/MinimalClientContext.js.map +1 -1
- package/build/browser/createClient.js +5 -5
- package/build/browser/createClient.js.map +1 -1
- package/build/browser/createMinimalClient.js +1 -0
- package/build/browser/createMinimalClient.js.map +1 -1
- package/build/browser/index.js.map +1 -1
- package/build/browser/public/unstable-do-not-use.js +1 -0
- package/build/browser/public/unstable-do-not-use.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/cjs/{chunk-LZ4GFSOQ.cjs → chunk-FWYXUSCF.cjs} +54 -50
- package/build/cjs/chunk-FWYXUSCF.cjs.map +1 -0
- package/build/cjs/{chunk-QHPACIXZ.cjs → chunk-T5KGTBH2.cjs} +2 -2
- package/build/cjs/{chunk-QHPACIXZ.cjs.map → chunk-T5KGTBH2.cjs.map} +1 -1
- package/build/cjs/createClient-DJq2ecGM.d.cts +9 -0
- package/build/cjs/index.cjs +6 -6
- package/build/cjs/index.d.cts +5 -8
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/unstable-do-not-use.cjs +19 -15
- package/build/cjs/public/unstable-do-not-use.d.cts +1 -0
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/MinimalClientContext.js.map +1 -1
- package/build/esm/createClient.js +5 -5
- package/build/esm/createClient.js.map +1 -1
- package/build/esm/createMinimalClient.js +1 -0
- package/build/esm/createMinimalClient.js.map +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/public/unstable-do-not-use.js +1 -0
- package/build/esm/public/unstable-do-not-use.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/types/Client.d.ts +1 -1
- package/build/types/MinimalClientContext.d.ts +1 -0
- package/build/types/MinimalClientContext.d.ts.map +1 -1
- package/build/types/createClient.d.ts +1 -0
- package/build/types/createClient.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/public/unstable-do-not-use.d.ts +1 -0
- package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
- package/package.json +11 -11
- package/build/cjs/chunk-LZ4GFSOQ.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkT5KGTBH2_cjs = require('./chunk-T5KGTBH2.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');
|
|
@@ -423,13 +423,13 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
423
423
|
return Promise.all(promiseArray);
|
|
424
424
|
}
|
|
425
425
|
if (isAttachmentUpload(value)) {
|
|
426
|
-
const attachment = await
|
|
426
|
+
const attachment = await chunkT5KGTBH2_cjs.Attachment_exports.upload(client, value.data, {
|
|
427
427
|
filename: value.name
|
|
428
428
|
});
|
|
429
429
|
return await toDataValue(attachment.rid, client);
|
|
430
430
|
}
|
|
431
431
|
if (isAttachmentFile(value)) {
|
|
432
|
-
const attachment = await
|
|
432
|
+
const attachment = await chunkT5KGTBH2_cjs.Attachment_exports.upload(client, value, {
|
|
433
433
|
filename: value.name
|
|
434
434
|
});
|
|
435
435
|
return await toDataValue(attachment.rid, client);
|
|
@@ -443,11 +443,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
443
443
|
if (isPoint(value)) {
|
|
444
444
|
return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client);
|
|
445
445
|
}
|
|
446
|
-
if (
|
|
446
|
+
if (chunkT5KGTBH2_cjs.isWireObjectSet(value)) {
|
|
447
447
|
return value;
|
|
448
448
|
}
|
|
449
|
-
if (
|
|
450
|
-
return
|
|
449
|
+
if (chunkT5KGTBH2_cjs.isObjectSet(value)) {
|
|
450
|
+
return chunkT5KGTBH2_cjs.getWireObjectSet(value);
|
|
451
451
|
}
|
|
452
452
|
if (isMediaReference(value)) {
|
|
453
453
|
return value;
|
|
@@ -470,11 +470,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
470
470
|
|
|
471
471
|
// src/actions/applyAction.ts
|
|
472
472
|
async function applyAction(client, action, parameters, options = {}) {
|
|
473
|
-
const clientWithHeaders =
|
|
473
|
+
const clientWithHeaders = chunkT5KGTBH2_cjs.addUserAgentAndRequestContextHeaders(chunkT5KGTBH2_cjs.augmentRequestContext(client, (_) => ({
|
|
474
474
|
finalMethodCall: "applyAction"
|
|
475
475
|
})), action);
|
|
476
476
|
if (Array.isArray(parameters)) {
|
|
477
|
-
const response = await
|
|
477
|
+
const response = await chunkT5KGTBH2_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
478
478
|
requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)) : [],
|
|
479
479
|
options: {
|
|
480
480
|
returnEdits: options?.$returnEdits ? "ALL" : "NONE"
|
|
@@ -483,7 +483,7 @@ async function applyAction(client, action, parameters, options = {}) {
|
|
|
483
483
|
const edits = response.edits;
|
|
484
484
|
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
485
485
|
} else {
|
|
486
|
-
const response = await
|
|
486
|
+
const response = await chunkT5KGTBH2_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
487
487
|
parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
|
|
488
488
|
options: {
|
|
489
489
|
mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
|
|
@@ -688,7 +688,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
690
|
async getLatestValue() {
|
|
691
|
-
const latestPointPromise =
|
|
691
|
+
const latestPointPromise = chunkT5KGTBH2_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
692
692
|
latestPointPromise.then(
|
|
693
693
|
(latestPoint) => this.lastFetchedValue = latestPoint,
|
|
694
694
|
// eslint-disable-next-line no-console
|
|
@@ -704,7 +704,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
704
704
|
return allPoints;
|
|
705
705
|
}
|
|
706
706
|
async *asyncIterValues(query) {
|
|
707
|
-
const streamPointsIterator = await
|
|
707
|
+
const streamPointsIterator = await chunkT5KGTBH2_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
708
708
|
range: getTimeRange(query)
|
|
709
709
|
} : {});
|
|
710
710
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -731,13 +731,13 @@ var MediaReferencePropertyImpl = class {
|
|
|
731
731
|
this.#mediaReference = mediaReference;
|
|
732
732
|
}
|
|
733
733
|
async fetchContents() {
|
|
734
|
-
return
|
|
734
|
+
return chunkT5KGTBH2_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
735
735
|
preview: true
|
|
736
736
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
737
737
|
});
|
|
738
738
|
}
|
|
739
739
|
async fetchMetadata() {
|
|
740
|
-
const r = await
|
|
740
|
+
const r = await chunkT5KGTBH2_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
741
741
|
preview: true
|
|
742
742
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
743
743
|
});
|
|
@@ -761,10 +761,10 @@ var TimeSeriesPropertyImpl = class {
|
|
|
761
761
|
this.#triplet = [objectApiName, primaryKey, propertyName];
|
|
762
762
|
}
|
|
763
763
|
async getFirstPoint() {
|
|
764
|
-
return
|
|
764
|
+
return chunkT5KGTBH2_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
765
765
|
}
|
|
766
766
|
async getLastPoint() {
|
|
767
|
-
return
|
|
767
|
+
return chunkT5KGTBH2_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
768
768
|
}
|
|
769
769
|
async getAllPoints(query) {
|
|
770
770
|
const allPoints = [];
|
|
@@ -774,7 +774,7 @@ var TimeSeriesPropertyImpl = class {
|
|
|
774
774
|
return allPoints;
|
|
775
775
|
}
|
|
776
776
|
async *asyncIterPoints(query) {
|
|
777
|
-
const streamPointsIterator = await
|
|
777
|
+
const streamPointsIterator = await chunkT5KGTBH2_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
778
778
|
range: getTimeRange(query)
|
|
779
779
|
} : {});
|
|
780
780
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -802,7 +802,7 @@ var ClientRef = Symbol("ClientRef" );
|
|
|
802
802
|
|
|
803
803
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
804
804
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
805
|
-
const [objApiNamespace] =
|
|
805
|
+
const [objApiNamespace] = chunkT5KGTBH2_cjs.extractNamespace(interfaceDef.apiName);
|
|
806
806
|
return Object.freeze(Object.defineProperties({}, {
|
|
807
807
|
// first to minimize hidden classes
|
|
808
808
|
[UnderlyingOsdkObject]: {
|
|
@@ -845,7 +845,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
845
845
|
},
|
|
846
846
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
847
847
|
const objDef = underlying[ObjectDefRef];
|
|
848
|
-
const [apiNamespace, apiName] =
|
|
848
|
+
const [apiNamespace, apiName] = chunkT5KGTBH2_cjs.extractNamespace(p);
|
|
849
849
|
const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
|
|
850
850
|
return [apiNamespace === objApiNamespace ? apiName : p, {
|
|
851
851
|
enumerable: targetPropName in underlying,
|
|
@@ -921,8 +921,8 @@ function get$link(holder) {
|
|
|
921
921
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
922
922
|
}).pivotTo(linkName);
|
|
923
923
|
const value = !linkDef.multiplicity ? {
|
|
924
|
-
fetchOne: (options) =>
|
|
925
|
-
fetchOneWithErrors: (options) =>
|
|
924
|
+
fetchOne: (options) => chunkT5KGTBH2_cjs.fetchSingle(client, objDef, options ?? {}, chunkT5KGTBH2_cjs.getWireObjectSet(objectSet)),
|
|
925
|
+
fetchOneWithErrors: (options) => chunkT5KGTBH2_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkT5KGTBH2_cjs.getWireObjectSet(objectSet))
|
|
926
926
|
} : objectSet;
|
|
927
927
|
return [linkName, value];
|
|
928
928
|
})));
|
|
@@ -1006,9 +1006,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1006
1006
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1007
1007
|
case "attachment":
|
|
1008
1008
|
if (Array.isArray(rawValue)) {
|
|
1009
|
-
return rawValue.map((a) =>
|
|
1009
|
+
return rawValue.map((a) => chunkT5KGTBH2_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1010
1010
|
} else {
|
|
1011
|
-
return
|
|
1011
|
+
return chunkT5KGTBH2_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1012
1012
|
}
|
|
1013
1013
|
default:
|
|
1014
1014
|
process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
|
|
@@ -1024,9 +1024,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1024
1024
|
}
|
|
1025
1025
|
if (propDef.type === "attachment") {
|
|
1026
1026
|
if (Array.isArray(rawValue)) {
|
|
1027
|
-
return rawValue.map((a) =>
|
|
1027
|
+
return rawValue.map((a) => chunkT5KGTBH2_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1028
1028
|
}
|
|
1029
|
-
return
|
|
1029
|
+
return chunkT5KGTBH2_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1030
1030
|
}
|
|
1031
1031
|
if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
|
|
1032
1032
|
return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
|
|
@@ -1234,11 +1234,11 @@ function createAsyncClientCache(fn, createCacheLocal = createClientCache) {
|
|
|
1234
1234
|
return ret;
|
|
1235
1235
|
}
|
|
1236
1236
|
async function loadActionMetadata(client, actionType) {
|
|
1237
|
-
const r = await
|
|
1237
|
+
const r = await chunkT5KGTBH2_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType);
|
|
1238
1238
|
return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
|
|
1239
1239
|
}
|
|
1240
1240
|
async function loadFullObjectMetadata(client, objectType) {
|
|
1241
|
-
const full = await
|
|
1241
|
+
const full = await chunkT5KGTBH2_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
|
|
1242
1242
|
preview: true
|
|
1243
1243
|
});
|
|
1244
1244
|
const ret = generatorConverters.wireObjectTypeFullMetadataToSdkObjectMetadata(full, true);
|
|
@@ -1247,14 +1247,14 @@ async function loadFullObjectMetadata(client, objectType) {
|
|
|
1247
1247
|
};
|
|
1248
1248
|
}
|
|
1249
1249
|
async function loadInterfaceMetadata(client, objectType) {
|
|
1250
|
-
const r = await
|
|
1250
|
+
const r = await chunkT5KGTBH2_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
|
|
1251
1251
|
preview: true
|
|
1252
1252
|
});
|
|
1253
1253
|
return generatorConverters.__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(r, true);
|
|
1254
1254
|
}
|
|
1255
1255
|
async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
|
|
1256
1256
|
const [apiName, version] = queryTypeApiNameAndVersion.split(":");
|
|
1257
|
-
const r = await
|
|
1257
|
+
const r = await chunkT5KGTBH2_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
|
|
1258
1258
|
version
|
|
1259
1259
|
});
|
|
1260
1260
|
return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
|
|
@@ -1311,11 +1311,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1311
1311
|
};
|
|
1312
1312
|
|
|
1313
1313
|
// src/util/UserAgent.ts
|
|
1314
|
-
var USER_AGENT = `osdk-client/${"2.3.
|
|
1315
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.3.
|
|
1314
|
+
var USER_AGENT = `osdk-client/${"2.3.1"}`;
|
|
1315
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.3.1"}`;
|
|
1316
1316
|
|
|
1317
1317
|
// src/createMinimalClient.ts
|
|
1318
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1318
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkT5KGTBH2_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1319
1319
|
if (process.env.NODE_ENV !== "production") {
|
|
1320
1320
|
try {
|
|
1321
1321
|
new URL(baseUrl);
|
|
@@ -1333,6 +1333,7 @@ function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fet
|
|
|
1333
1333
|
objectFactory2: convertWireToOsdkObjects2,
|
|
1334
1334
|
ontologyRid: metadata.ontologyRid,
|
|
1335
1335
|
logger: options.logger,
|
|
1336
|
+
transactionRid: options.transactionRid,
|
|
1336
1337
|
clientCacheKey: {},
|
|
1337
1338
|
requestContext: {}
|
|
1338
1339
|
};
|
|
@@ -1380,13 +1381,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1380
1381
|
switch (desiredType.type) {
|
|
1381
1382
|
case "attachment": {
|
|
1382
1383
|
if (isAttachmentUpload(value)) {
|
|
1383
|
-
const attachment = await
|
|
1384
|
+
const attachment = await chunkT5KGTBH2_cjs.Attachment_exports.upload(client, value.data, {
|
|
1384
1385
|
filename: value.name
|
|
1385
1386
|
});
|
|
1386
1387
|
return attachment.rid;
|
|
1387
1388
|
}
|
|
1388
1389
|
if (isAttachmentFile(value)) {
|
|
1389
|
-
const attachment = await
|
|
1390
|
+
const attachment = await chunkT5KGTBH2_cjs.Attachment_exports.upload(client, value, {
|
|
1390
1391
|
filename: value.name
|
|
1391
1392
|
});
|
|
1392
1393
|
return attachment.rid;
|
|
@@ -1417,11 +1418,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1417
1418
|
break;
|
|
1418
1419
|
}
|
|
1419
1420
|
case "objectSet": {
|
|
1420
|
-
if (
|
|
1421
|
+
if (chunkT5KGTBH2_cjs.isWireObjectSet(value)) {
|
|
1421
1422
|
return value;
|
|
1422
1423
|
}
|
|
1423
|
-
if (
|
|
1424
|
-
return
|
|
1424
|
+
if (chunkT5KGTBH2_cjs.isObjectSet(value)) {
|
|
1425
|
+
return chunkT5KGTBH2_cjs.getWireObjectSet(value);
|
|
1425
1426
|
}
|
|
1426
1427
|
break;
|
|
1427
1428
|
}
|
|
@@ -1463,7 +1464,7 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1463
1464
|
// src/queries/applyQuery.ts
|
|
1464
1465
|
async function applyQuery(client, query, params) {
|
|
1465
1466
|
const qd = await client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : void 0);
|
|
1466
|
-
const response = await
|
|
1467
|
+
const response = await chunkT5KGTBH2_cjs.Query_exports.execute(chunkT5KGTBH2_cjs.addUserAgentAndRequestContextHeaders(chunkT5KGTBH2_cjs.augmentRequestContext(client, (_) => ({
|
|
1467
1468
|
finalMethodCall: "applyQuery"
|
|
1468
1469
|
})), query), await client.ontologyRid, query.apiName, {
|
|
1469
1470
|
parameters: params ? await remapQueryParams(params, client, qd.parameters) : {}
|
|
@@ -1510,7 +1511,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1510
1511
|
return responseValue;
|
|
1511
1512
|
}
|
|
1512
1513
|
case "attachment": {
|
|
1513
|
-
return
|
|
1514
|
+
return chunkT5KGTBH2_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
1514
1515
|
}
|
|
1515
1516
|
case "object": {
|
|
1516
1517
|
const def = definitions.get(responseDataType.object);
|
|
@@ -1525,7 +1526,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1525
1526
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
1526
1527
|
}
|
|
1527
1528
|
if (typeof responseValue === "string") {
|
|
1528
|
-
return
|
|
1529
|
+
return chunkT5KGTBH2_cjs.createObjectSet(def, client, {
|
|
1529
1530
|
type: "intersect",
|
|
1530
1531
|
objectSets: [{
|
|
1531
1532
|
type: "base",
|
|
@@ -1536,7 +1537,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1536
1537
|
}]
|
|
1537
1538
|
});
|
|
1538
1539
|
}
|
|
1539
|
-
return
|
|
1540
|
+
return chunkT5KGTBH2_cjs.createObjectSet(def, client, responseValue);
|
|
1540
1541
|
}
|
|
1541
1542
|
case "struct": {
|
|
1542
1543
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -1692,7 +1693,7 @@ var QueryInvoker = class {
|
|
|
1692
1693
|
this.executeFunction = applyQuery.bind(void 0, clientCtx, queryDef);
|
|
1693
1694
|
}
|
|
1694
1695
|
};
|
|
1695
|
-
function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvider, options = void 0, fetchFn = fetch) {
|
|
1696
|
+
function createClientInternal(objectSetFactory, transactionRid, baseUrl, ontologyRid, tokenProvider, options = void 0, fetchFn = fetch) {
|
|
1696
1697
|
if (typeof ontologyRid === "string") {
|
|
1697
1698
|
if (!ontologyRid.startsWith("ri.")) {
|
|
1698
1699
|
throw new Error("Invalid ontology RID");
|
|
@@ -1708,7 +1709,8 @@ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvi
|
|
|
1708
1709
|
ontologyRid
|
|
1709
1710
|
}, baseUrl, tokenProvider, {
|
|
1710
1711
|
...options,
|
|
1711
|
-
logger: options?.logger ?? new
|
|
1712
|
+
logger: options?.logger ?? new chunkT5KGTBH2_cjs.MinimalLogger(),
|
|
1713
|
+
transactionRid
|
|
1712
1714
|
}, fetchFn, objectSetFactory);
|
|
1713
1715
|
return createClientFromContext(clientCtx);
|
|
1714
1716
|
}
|
|
@@ -1729,7 +1731,7 @@ function createClientFromContext(clientCtx) {
|
|
|
1729
1731
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
1730
1732
|
return {
|
|
1731
1733
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
1732
|
-
return await
|
|
1734
|
+
return await chunkT5KGTBH2_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
1733
1735
|
}
|
|
1734
1736
|
};
|
|
1735
1737
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -1741,7 +1743,7 @@ function createClientFromContext(clientCtx) {
|
|
|
1741
1743
|
objectType,
|
|
1742
1744
|
propertyType
|
|
1743
1745
|
} = args;
|
|
1744
|
-
return await
|
|
1746
|
+
return await chunkT5KGTBH2_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
|
|
1745
1747
|
mediaItemPath: fileName,
|
|
1746
1748
|
preview: true
|
|
1747
1749
|
});
|
|
@@ -1750,7 +1752,7 @@ function createClientFromContext(clientCtx) {
|
|
|
1750
1752
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
1751
1753
|
return {
|
|
1752
1754
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
1753
|
-
return await
|
|
1755
|
+
return await chunkT5KGTBH2_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
1754
1756
|
}
|
|
1755
1757
|
};
|
|
1756
1758
|
}
|
|
@@ -1762,13 +1764,13 @@ function createClientFromContext(clientCtx) {
|
|
|
1762
1764
|
const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
|
|
1763
1765
|
const symbolClientContext2 = "__osdkClientContext";
|
|
1764
1766
|
const client = Object.defineProperties(clientFn, {
|
|
1765
|
-
[
|
|
1767
|
+
[chunkT5KGTBH2_cjs.symbolClientContext]: {
|
|
1766
1768
|
value: clientCtx
|
|
1767
1769
|
},
|
|
1768
1770
|
[symbolClientContext2]: {
|
|
1769
1771
|
value: clientCtx
|
|
1770
1772
|
},
|
|
1771
|
-
[
|
|
1773
|
+
[chunkT5KGTBH2_cjs.additionalContext]: {
|
|
1772
1774
|
value: clientCtx
|
|
1773
1775
|
},
|
|
1774
1776
|
fetchMetadata: {
|
|
@@ -1777,7 +1779,8 @@ function createClientFromContext(clientCtx) {
|
|
|
1777
1779
|
});
|
|
1778
1780
|
return client;
|
|
1779
1781
|
}
|
|
1780
|
-
var createClient = createClientInternal.bind(void 0,
|
|
1782
|
+
var createClient = createClientInternal.bind(void 0, chunkT5KGTBH2_cjs.createObjectSet, void 0);
|
|
1783
|
+
var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(chunkT5KGTBH2_cjs.createObjectSet, transactionRid, ...args);
|
|
1781
1784
|
function createWithRid(rids) {
|
|
1782
1785
|
const withRid = {
|
|
1783
1786
|
type: "static",
|
|
@@ -1794,5 +1797,6 @@ exports.UnderlyingOsdkObject = UnderlyingOsdkObject;
|
|
|
1794
1797
|
exports.createAttachmentUpload = createAttachmentUpload;
|
|
1795
1798
|
exports.createClient = createClient;
|
|
1796
1799
|
exports.createClientFromContext = createClientFromContext;
|
|
1797
|
-
|
|
1798
|
-
//# sourceMappingURL=chunk-
|
|
1800
|
+
exports.createClientWithTransaction = createClientWithTransaction;
|
|
1801
|
+
//# sourceMappingURL=chunk-FWYXUSCF.cjs.map
|
|
1802
|
+
//# sourceMappingURL=chunk-FWYXUSCF.cjs.map
|