@osdk/client 2.6.0-beta.6 → 2.6.0-beta.7
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 +12 -0
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js +18 -8
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
- package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js +171 -63
- package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
- package/build/browser/observable/internal/base-list/BaseListQuery.js +133 -2
- package/build/browser/observable/internal/base-list/BaseListQuery.js.map +1 -1
- package/build/browser/observable/internal/links/LinksHelper.js +3 -0
- package/build/browser/observable/internal/links/LinksHelper.js.map +1 -1
- package/build/browser/observable/internal/list/ListQuery.js +6 -58
- package/build/browser/observable/internal/list/ListQuery.js.map +1 -1
- package/build/browser/observable/internal/objectset/ObjectSetHelper.js +5 -1
- package/build/browser/observable/internal/objectset/ObjectSetHelper.js.map +1 -1
- package/build/browser/observable/internal/objectset/ObjectSetQuery.js +3 -0
- package/build/browser/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
- package/build/browser/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
- package/build/browser/observable/internal/types/ObjectUpdate.js +2 -0
- package/build/browser/observable/internal/types/ObjectUpdate.js.map +1 -0
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/{chunk-VNLY3YOJ.cjs → chunk-3LMKH6RS.cjs} +55 -47
- package/build/cjs/chunk-3LMKH6RS.cjs.map +1 -0
- package/build/cjs/{chunk-3ZJESPX6.cjs → chunk-4ZOXOCQX.cjs} +54 -54
- package/build/cjs/{chunk-3ZJESPX6.cjs.map → chunk-4ZOXOCQX.cjs.map} +1 -1
- package/build/cjs/index.cjs +8 -8
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/unstable-do-not-use.cjs +179 -92
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.d.cts +1 -0
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js +18 -8
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
- package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js +171 -63
- package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
- package/build/esm/observable/internal/base-list/BaseListQuery.js +133 -2
- package/build/esm/observable/internal/base-list/BaseListQuery.js.map +1 -1
- package/build/esm/observable/internal/links/LinksHelper.js +3 -0
- package/build/esm/observable/internal/links/LinksHelper.js.map +1 -1
- package/build/esm/observable/internal/list/ListQuery.js +6 -58
- package/build/esm/observable/internal/list/ListQuery.js.map +1 -1
- package/build/esm/observable/internal/objectset/ObjectSetHelper.js +5 -1
- package/build/esm/observable/internal/objectset/ObjectSetHelper.js.map +1 -1
- package/build/esm/observable/internal/objectset/ObjectSetQuery.js +3 -0
- package/build/esm/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
- package/build/esm/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
- package/build/esm/observable/internal/types/ObjectUpdate.js +2 -0
- package/build/esm/observable/internal/types/ObjectUpdate.js.map +1 -0
- package/build/esm/util/UserAgent.js +2 -2
- package/build/types/observable/internal/base-list/BaseListQuery.d.ts +42 -2
- package/build/types/observable/internal/base-list/BaseListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/links/LinksHelper.d.ts +4 -0
- package/build/types/observable/internal/links/LinksHelper.d.ts.map +1 -1
- package/build/types/observable/internal/list/ListQuery.d.ts +2 -8
- package/build/types/observable/internal/list/ListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/objectset/ObjectSetHelper.d.ts.map +1 -1
- package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts +2 -1
- package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts.map +1 -1
- package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts +1 -0
- package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts.map +1 -1
- package/build/types/observable/internal/types/ObjectUpdate.d.ts +11 -0
- package/build/types/observable/internal/types/ObjectUpdate.d.ts.map +1 -0
- package/package.json +6 -6
- package/build/cjs/chunk-VNLY3YOJ.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3LMKH6RS_cjs = require('./chunk-3LMKH6RS.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 chunk3LMKH6RS_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 chunk3LMKH6RS_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 chunk3LMKH6RS_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 (chunk3LMKH6RS_cjs.isWireObjectSet(value)) {
|
|
477
477
|
return value;
|
|
478
478
|
}
|
|
479
|
-
if (
|
|
480
|
-
return
|
|
479
|
+
if (chunk3LMKH6RS_cjs.isObjectSet(value)) {
|
|
480
|
+
return chunk3LMKH6RS_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 = chunk3LMKH6RS_cjs.addUserAgentAndRequestContextHeaders(chunk3LMKH6RS_cjs.augmentRequestContext(client, (_) => ({
|
|
504
504
|
finalMethodCall: "applyAction"
|
|
505
505
|
})), action);
|
|
506
506
|
if (Array.isArray(parameters)) {
|
|
507
|
-
const response = await
|
|
507
|
+
const response = await chunk3LMKH6RS_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
508
508
|
requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)) : [],
|
|
509
509
|
options: {
|
|
510
510
|
returnEdits: options?.$returnEdits ? "ALL" : "NONE"
|
|
@@ -515,7 +515,7 @@ async function applyAction(client, action, parameters, options = {}) {
|
|
|
515
515
|
const edits = response.edits;
|
|
516
516
|
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
517
517
|
} else {
|
|
518
|
-
const response = await
|
|
518
|
+
const response = await chunk3LMKH6RS_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
519
519
|
parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
|
|
520
520
|
options: {
|
|
521
521
|
mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
|
|
@@ -722,7 +722,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
async getLatestValue() {
|
|
725
|
-
const latestPointPromise =
|
|
725
|
+
const latestPointPromise = chunk3LMKH6RS_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
726
726
|
latestPointPromise.then(
|
|
727
727
|
(latestPoint) => this.lastFetchedValue = latestPoint,
|
|
728
728
|
// eslint-disable-next-line no-console
|
|
@@ -738,7 +738,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
738
738
|
return allPoints;
|
|
739
739
|
}
|
|
740
740
|
async *asyncIterValues(query) {
|
|
741
|
-
const streamPointsIterator = await
|
|
741
|
+
const streamPointsIterator = await chunk3LMKH6RS_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
742
742
|
range: getTimeRange(query)
|
|
743
743
|
} : {});
|
|
744
744
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -765,13 +765,13 @@ var MediaReferencePropertyImpl = class {
|
|
|
765
765
|
this.#mediaReference = mediaReference;
|
|
766
766
|
}
|
|
767
767
|
async fetchContents() {
|
|
768
|
-
return
|
|
768
|
+
return chunk3LMKH6RS_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
769
769
|
preview: true
|
|
770
770
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
771
771
|
});
|
|
772
772
|
}
|
|
773
773
|
async fetchMetadata() {
|
|
774
|
-
const r = await
|
|
774
|
+
const r = await chunk3LMKH6RS_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
775
775
|
preview: true
|
|
776
776
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
777
777
|
});
|
|
@@ -795,10 +795,10 @@ var TimeSeriesPropertyImpl = class {
|
|
|
795
795
|
this.#triplet = [objectApiName, primaryKey, propertyName];
|
|
796
796
|
}
|
|
797
797
|
async getFirstPoint() {
|
|
798
|
-
return
|
|
798
|
+
return chunk3LMKH6RS_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
799
799
|
}
|
|
800
800
|
async getLastPoint() {
|
|
801
|
-
return
|
|
801
|
+
return chunk3LMKH6RS_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
802
802
|
}
|
|
803
803
|
async getAllPoints(query) {
|
|
804
804
|
const allPoints = [];
|
|
@@ -808,7 +808,7 @@ var TimeSeriesPropertyImpl = class {
|
|
|
808
808
|
return allPoints;
|
|
809
809
|
}
|
|
810
810
|
async *asyncIterPoints(query) {
|
|
811
|
-
const streamPointsIterator = await
|
|
811
|
+
const streamPointsIterator = await chunk3LMKH6RS_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
812
812
|
range: getTimeRange(query)
|
|
813
813
|
} : {});
|
|
814
814
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -1205,8 +1205,8 @@ function get$link(holder) {
|
|
|
1205
1205
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1206
1206
|
}).pivotTo(linkName);
|
|
1207
1207
|
const value = !linkDef.multiplicity ? {
|
|
1208
|
-
fetchOne: (options) =>
|
|
1209
|
-
fetchOneWithErrors: (options) =>
|
|
1208
|
+
fetchOne: (options) => chunk3LMKH6RS_cjs.fetchSingle(client, objDef, options ?? {}, chunk3LMKH6RS_cjs.getWireObjectSet(objectSet)),
|
|
1209
|
+
fetchOneWithErrors: (options) => chunk3LMKH6RS_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunk3LMKH6RS_cjs.getWireObjectSet(objectSet))
|
|
1210
1210
|
} : objectSet;
|
|
1211
1211
|
return [linkName, value];
|
|
1212
1212
|
})));
|
|
@@ -1222,8 +1222,8 @@ function get$linkForInterface(holder) {
|
|
|
1222
1222
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1223
1223
|
})).pivotTo(linkName);
|
|
1224
1224
|
const value = !linkDef.multiplicity ? {
|
|
1225
|
-
fetchOne: (options) =>
|
|
1226
|
-
fetchOneWithErrors: (options) =>
|
|
1225
|
+
fetchOne: (options) => chunk3LMKH6RS_cjs.fetchSingle(client, objDef, options ?? {}, chunk3LMKH6RS_cjs.getWireObjectSet(objectSet)),
|
|
1226
|
+
fetchOneWithErrors: (options) => chunk3LMKH6RS_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunk3LMKH6RS_cjs.getWireObjectSet(objectSet))
|
|
1227
1227
|
} : objectSet;
|
|
1228
1228
|
return [linkName, value];
|
|
1229
1229
|
})));
|
|
@@ -1231,7 +1231,7 @@ function get$linkForInterface(holder) {
|
|
|
1231
1231
|
|
|
1232
1232
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
1233
1233
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1234
|
-
const [objApiNamespace] =
|
|
1234
|
+
const [objApiNamespace] = chunk3LMKH6RS_cjs.extractNamespace(interfaceDef.apiName);
|
|
1235
1235
|
return Object.freeze(Object.defineProperties({}, {
|
|
1236
1236
|
// first to minimize hidden classes
|
|
1237
1237
|
[UnderlyingOsdkObject]: {
|
|
@@ -1290,7 +1290,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1290
1290
|
},
|
|
1291
1291
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1292
1292
|
const objDef = underlying[ObjectDefRef];
|
|
1293
|
-
const [apiNamespace, apiName] =
|
|
1293
|
+
const [apiNamespace, apiName] = chunk3LMKH6RS_cjs.extractNamespace(p);
|
|
1294
1294
|
const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
|
|
1295
1295
|
return [apiNamespace === objApiNamespace ? apiName : p, {
|
|
1296
1296
|
enumerable: targetPropName in underlying,
|
|
@@ -1451,9 +1451,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1451
1451
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1452
1452
|
case "attachment":
|
|
1453
1453
|
if (Array.isArray(rawValue)) {
|
|
1454
|
-
return rawValue.map((a) =>
|
|
1454
|
+
return rawValue.map((a) => chunk3LMKH6RS_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1455
1455
|
} else {
|
|
1456
|
-
return
|
|
1456
|
+
return chunk3LMKH6RS_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1457
1457
|
}
|
|
1458
1458
|
default:
|
|
1459
1459
|
process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
|
|
@@ -1469,9 +1469,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1469
1469
|
}
|
|
1470
1470
|
if (propDef.type === "attachment") {
|
|
1471
1471
|
if (Array.isArray(rawValue)) {
|
|
1472
|
-
return rawValue.map((a) =>
|
|
1472
|
+
return rawValue.map((a) => chunk3LMKH6RS_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1473
1473
|
}
|
|
1474
|
-
return
|
|
1474
|
+
return chunk3LMKH6RS_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1475
1475
|
}
|
|
1476
1476
|
if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
|
|
1477
1477
|
return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
|
|
@@ -1695,13 +1695,13 @@ function deepFreeze(obj) {
|
|
|
1695
1695
|
return Object.freeze(obj);
|
|
1696
1696
|
}
|
|
1697
1697
|
async function loadActionMetadata(client, actionType) {
|
|
1698
|
-
const r = await
|
|
1698
|
+
const r = await chunk3LMKH6RS_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType, {
|
|
1699
1699
|
branch: client.branch
|
|
1700
1700
|
});
|
|
1701
1701
|
return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
|
|
1702
1702
|
}
|
|
1703
1703
|
async function loadFullObjectMetadata(client, objectType) {
|
|
1704
|
-
const full = await
|
|
1704
|
+
const full = await chunk3LMKH6RS_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
|
|
1705
1705
|
preview: true,
|
|
1706
1706
|
branch: client.branch
|
|
1707
1707
|
});
|
|
@@ -1711,7 +1711,7 @@ async function loadFullObjectMetadata(client, objectType) {
|
|
|
1711
1711
|
};
|
|
1712
1712
|
}
|
|
1713
1713
|
async function loadInterfaceMetadata(client, objectType) {
|
|
1714
|
-
const r = await
|
|
1714
|
+
const r = await chunk3LMKH6RS_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
|
|
1715
1715
|
preview: true,
|
|
1716
1716
|
branch: client.branch
|
|
1717
1717
|
});
|
|
@@ -1719,7 +1719,7 @@ async function loadInterfaceMetadata(client, objectType) {
|
|
|
1719
1719
|
}
|
|
1720
1720
|
async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
|
|
1721
1721
|
const [apiName, version] = queryTypeApiNameAndVersion.split(":");
|
|
1722
|
-
const r = await
|
|
1722
|
+
const r = await chunk3LMKH6RS_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
|
|
1723
1723
|
version
|
|
1724
1724
|
});
|
|
1725
1725
|
return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
|
|
@@ -1776,11 +1776,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1776
1776
|
};
|
|
1777
1777
|
|
|
1778
1778
|
// src/util/UserAgent.ts
|
|
1779
|
-
var USER_AGENT = `osdk-client/${"2.6.0-beta.
|
|
1780
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.6.0-beta.
|
|
1779
|
+
var USER_AGENT = `osdk-client/${"2.6.0-beta.7"}`;
|
|
1780
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.6.0-beta.7"}`;
|
|
1781
1781
|
|
|
1782
1782
|
// src/createMinimalClient.ts
|
|
1783
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1783
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunk3LMKH6RS_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1784
1784
|
if (process.env.NODE_ENV !== "production") {
|
|
1785
1785
|
try {
|
|
1786
1786
|
new URL(baseUrl);
|
|
@@ -1848,13 +1848,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1848
1848
|
switch (desiredType.type) {
|
|
1849
1849
|
case "attachment": {
|
|
1850
1850
|
if (isAttachmentUpload(value)) {
|
|
1851
|
-
const attachment = await
|
|
1851
|
+
const attachment = await chunk3LMKH6RS_cjs.Attachment_exports.upload(client, value.data, {
|
|
1852
1852
|
filename: value.name
|
|
1853
1853
|
});
|
|
1854
1854
|
return attachment.rid;
|
|
1855
1855
|
}
|
|
1856
1856
|
if (isAttachmentFile(value)) {
|
|
1857
|
-
const attachment = await
|
|
1857
|
+
const attachment = await chunk3LMKH6RS_cjs.Attachment_exports.upload(client, value, {
|
|
1858
1858
|
filename: value.name
|
|
1859
1859
|
});
|
|
1860
1860
|
return attachment.rid;
|
|
@@ -1894,11 +1894,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1894
1894
|
}
|
|
1895
1895
|
case "objectSet":
|
|
1896
1896
|
case "interfaceObjectSet": {
|
|
1897
|
-
if (
|
|
1897
|
+
if (chunk3LMKH6RS_cjs.isWireObjectSet(value)) {
|
|
1898
1898
|
return value;
|
|
1899
1899
|
}
|
|
1900
|
-
if (
|
|
1901
|
-
return
|
|
1900
|
+
if (chunk3LMKH6RS_cjs.isObjectSet(value)) {
|
|
1901
|
+
return chunk3LMKH6RS_cjs.getWireObjectSet(value);
|
|
1902
1902
|
}
|
|
1903
1903
|
break;
|
|
1904
1904
|
}
|
|
@@ -1940,7 +1940,7 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1940
1940
|
// src/queries/applyQuery.ts
|
|
1941
1941
|
async function applyQuery(client, query, params) {
|
|
1942
1942
|
const qd = client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : void 0);
|
|
1943
|
-
const response = await
|
|
1943
|
+
const response = await chunk3LMKH6RS_cjs.Query_exports.execute(chunk3LMKH6RS_cjs.addUserAgentAndRequestContextHeaders(chunk3LMKH6RS_cjs.augmentRequestContext(client, (_) => ({
|
|
1944
1944
|
finalMethodCall: "applyQuery"
|
|
1945
1945
|
})), query), await client.ontologyRid, query.apiName, {
|
|
1946
1946
|
parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
|
|
@@ -1987,7 +1987,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1987
1987
|
return responseValue;
|
|
1988
1988
|
}
|
|
1989
1989
|
case "attachment": {
|
|
1990
|
-
return
|
|
1990
|
+
return chunk3LMKH6RS_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
1991
1991
|
}
|
|
1992
1992
|
case "object": {
|
|
1993
1993
|
const def = definitions.get(responseDataType.object);
|
|
@@ -2009,7 +2009,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2009
2009
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
2010
2010
|
}
|
|
2011
2011
|
if (typeof responseValue === "string") {
|
|
2012
|
-
return
|
|
2012
|
+
return chunk3LMKH6RS_cjs.createObjectSet(def, client, {
|
|
2013
2013
|
type: "intersect",
|
|
2014
2014
|
objectSets: [{
|
|
2015
2015
|
type: "base",
|
|
@@ -2020,7 +2020,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2020
2020
|
}]
|
|
2021
2021
|
});
|
|
2022
2022
|
}
|
|
2023
|
-
return
|
|
2023
|
+
return chunk3LMKH6RS_cjs.createObjectSet(def, client, responseValue);
|
|
2024
2024
|
}
|
|
2025
2025
|
case "struct": {
|
|
2026
2026
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -2206,7 +2206,7 @@ function createClientInternal(objectSetFactory, transactionRid, baseUrl, ontolog
|
|
|
2206
2206
|
ontologyRid
|
|
2207
2207
|
}, baseUrl, tokenProvider, {
|
|
2208
2208
|
...options,
|
|
2209
|
-
logger: options?.logger ?? new
|
|
2209
|
+
logger: options?.logger ?? new chunk3LMKH6RS_cjs.MinimalLogger(),
|
|
2210
2210
|
transactionRid,
|
|
2211
2211
|
branch: options?.branch
|
|
2212
2212
|
}, fetchFn, objectSetFactory);
|
|
@@ -2229,7 +2229,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2229
2229
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2230
2230
|
return {
|
|
2231
2231
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2232
|
-
return await
|
|
2232
|
+
return await chunk3LMKH6RS_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2233
2233
|
}
|
|
2234
2234
|
};
|
|
2235
2235
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -2241,7 +2241,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2241
2241
|
objectType,
|
|
2242
2242
|
propertyType
|
|
2243
2243
|
} = args;
|
|
2244
|
-
return await
|
|
2244
|
+
return await chunk3LMKH6RS_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
|
|
2245
2245
|
mediaItemPath: fileName,
|
|
2246
2246
|
preview: true
|
|
2247
2247
|
});
|
|
@@ -2250,10 +2250,10 @@ function createClientFromContext(clientCtx) {
|
|
|
2250
2250
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
2251
2251
|
return {
|
|
2252
2252
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
2253
|
-
return await
|
|
2253
|
+
return await chunk3LMKH6RS_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
2254
2254
|
},
|
|
2255
2255
|
fetchPageByRidNoType: async (rids, options) => {
|
|
2256
|
-
return await
|
|
2256
|
+
return await chunk3LMKH6RS_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
2257
2257
|
}
|
|
2258
2258
|
};
|
|
2259
2259
|
}
|
|
@@ -2265,13 +2265,13 @@ function createClientFromContext(clientCtx) {
|
|
|
2265
2265
|
const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
|
|
2266
2266
|
const symbolClientContext2 = "__osdkClientContext";
|
|
2267
2267
|
const client = Object.defineProperties(clientFn, {
|
|
2268
|
-
[
|
|
2268
|
+
[chunk3LMKH6RS_cjs.symbolClientContext]: {
|
|
2269
2269
|
value: clientCtx
|
|
2270
2270
|
},
|
|
2271
2271
|
[symbolClientContext2]: {
|
|
2272
2272
|
value: clientCtx
|
|
2273
2273
|
},
|
|
2274
|
-
[
|
|
2274
|
+
[chunk3LMKH6RS_cjs.additionalContext]: {
|
|
2275
2275
|
value: clientCtx
|
|
2276
2276
|
},
|
|
2277
2277
|
fetchMetadata: {
|
|
@@ -2280,8 +2280,8 @@ function createClientFromContext(clientCtx) {
|
|
|
2280
2280
|
});
|
|
2281
2281
|
return client;
|
|
2282
2282
|
}
|
|
2283
|
-
var createClient = createClientInternal.bind(void 0,
|
|
2284
|
-
var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(
|
|
2283
|
+
var createClient = createClientInternal.bind(void 0, chunk3LMKH6RS_cjs.createObjectSet, void 0);
|
|
2284
|
+
var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(chunk3LMKH6RS_cjs.createObjectSet, transactionRid, ...args);
|
|
2285
2285
|
function createWithRid(rids) {
|
|
2286
2286
|
const withRid = {
|
|
2287
2287
|
type: "static",
|
|
@@ -2301,5 +2301,5 @@ exports.createClientFromContext = createClientFromContext;
|
|
|
2301
2301
|
exports.createClientWithTransaction = createClientWithTransaction;
|
|
2302
2302
|
exports.createObjectSpecifierFromPrimaryKey = createObjectSpecifierFromPrimaryKey;
|
|
2303
2303
|
exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
|
|
2304
|
-
//# sourceMappingURL=chunk-
|
|
2305
|
-
//# sourceMappingURL=chunk-
|
|
2304
|
+
//# sourceMappingURL=chunk-4ZOXOCQX.cjs.map
|
|
2305
|
+
//# sourceMappingURL=chunk-4ZOXOCQX.cjs.map
|