@osdk/client 2.79.1-main-e9bf2deb57f18f15410f802b0584fe2d350434aa → 2.80.0
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 +4 -4
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/cjs/{applyStreamingQuery-LCBRYPDD.cjs → applyStreamingQuery-WC4DBZP4.cjs} +8 -8
- package/build/cjs/{applyStreamingQuery-LCBRYPDD.cjs.map → applyStreamingQuery-WC4DBZP4.cjs.map} +1 -1
- package/build/cjs/{chunk-ZDZRUQAV.cjs → chunk-BVGIIRQT.cjs} +2 -2
- package/build/cjs/{chunk-ZDZRUQAV.cjs.map → chunk-BVGIIRQT.cjs.map} +1 -1
- package/build/cjs/{chunk-EWWIWE4B.cjs → chunk-DXIPLYMT.cjs} +47 -47
- package/build/cjs/chunk-DXIPLYMT.cjs.map +1 -0
- package/build/cjs/{chunk-SU526EEQ.cjs → chunk-DYIOTYPW.cjs} +14 -14
- package/build/cjs/{chunk-SU526EEQ.cjs.map → chunk-DYIOTYPW.cjs.map} +1 -1
- package/build/cjs/{chunk-5QJSHUTC.cjs → chunk-JK6HXQ25.cjs} +83 -83
- package/build/cjs/{chunk-5QJSHUTC.cjs.map → chunk-JK6HXQ25.cjs.map} +1 -1
- package/build/cjs/{chunk-YOPZKZLH.cjs → chunk-JYHCG2M6.cjs} +8 -8
- package/build/cjs/{chunk-YOPZKZLH.cjs.map → chunk-JYHCG2M6.cjs.map} +1 -1
- package/build/cjs/index.cjs +11 -11
- package/build/cjs/public/experimental.cjs +9 -9
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/observable.cjs +5 -5
- package/build/cjs/public/unstable-do-not-use.cjs +16 -16
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.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/package.json +7 -7
- package/build/cjs/chunk-EWWIWE4B.cjs.map +0 -1
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkIBY4PG26_cjs = require('./chunk-IBY4PG26.cjs');
|
|
4
4
|
var chunk6OIQ3CCD_cjs = require('./chunk-6OIQ3CCD.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkDYIOTYPW_cjs = require('./chunk-DYIOTYPW.cjs');
|
|
6
|
+
var chunkBVGIIRQT_cjs = require('./chunk-BVGIIRQT.cjs');
|
|
7
7
|
var chunk4L3NEGLF_cjs = require('./chunk-4L3NEGLF.cjs');
|
|
8
8
|
var chunkIWUIN6JJ_cjs = require('./chunk-IWUIN6JJ.cjs');
|
|
9
9
|
var chunkQ7SFCCGT_cjs = require('./chunk-Q7SFCCGT.cjs');
|
|
@@ -154,7 +154,7 @@ function isScenarioClient(value) {
|
|
|
154
154
|
return value != null && (typeof value === "object" || typeof value === "function") && typeof value.getScenarioReference === "function";
|
|
155
155
|
}
|
|
156
156
|
function buildScenarioClient(parent, scenarioRid) {
|
|
157
|
-
const ctx = parent[
|
|
157
|
+
const ctx = parent[chunkBVGIIRQT_cjs.additionalContext];
|
|
158
158
|
if (ctx.transactionId != null) {
|
|
159
159
|
console.warn("withScenario / createScenario: the supplied client has an active transaction. Ignoring the transaction and scoping to the scenario instead.");
|
|
160
160
|
}
|
|
@@ -168,7 +168,7 @@ function buildScenarioClient(parent, scenarioRid) {
|
|
|
168
168
|
scenarioRid,
|
|
169
169
|
clientCacheKey: {}
|
|
170
170
|
});
|
|
171
|
-
const innerCtx = inner[
|
|
171
|
+
const innerCtx = inner[chunkBVGIIRQT_cjs.additionalContext];
|
|
172
172
|
async function getEditedEntityTypes() {
|
|
173
173
|
const ontologyRid = await innerCtx.ontologyRid;
|
|
174
174
|
const response = await OntologyScenario_exports.listScenarioEditedEntityTypes(innerCtx, ontologyRid, scenarioRid, {
|
|
@@ -345,7 +345,7 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
345
345
|
}
|
|
346
346
|
if (Array.isArray(value) || value instanceof Set) {
|
|
347
347
|
const values = Array.from(value);
|
|
348
|
-
if (values.some((dataValue) =>
|
|
348
|
+
if (values.some((dataValue) => chunkDYIOTYPW_cjs.isAttachmentUpload(dataValue) || chunkDYIOTYPW_cjs.isAttachmentFile(dataValue))) {
|
|
349
349
|
const converted = [];
|
|
350
350
|
for (const value2 of values) {
|
|
351
351
|
converted.push(await toDataValue(value2, client));
|
|
@@ -355,43 +355,43 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
355
355
|
const promiseArray = Array.from(value, async (innerValue) => await toDataValue(innerValue, client));
|
|
356
356
|
return Promise.all(promiseArray);
|
|
357
357
|
}
|
|
358
|
-
if (
|
|
359
|
-
const attachment = await
|
|
358
|
+
if (chunkDYIOTYPW_cjs.isAttachmentUpload(value)) {
|
|
359
|
+
const attachment = await chunkBVGIIRQT_cjs.upload(client, value.data, {
|
|
360
360
|
filename: value.name
|
|
361
361
|
});
|
|
362
362
|
return await toDataValue(attachment.rid, client);
|
|
363
363
|
}
|
|
364
|
-
if (
|
|
365
|
-
const attachment = await
|
|
364
|
+
if (chunkDYIOTYPW_cjs.isAttachmentFile(value)) {
|
|
365
|
+
const attachment = await chunkBVGIIRQT_cjs.upload(client, value, {
|
|
366
366
|
filename: value.name
|
|
367
367
|
});
|
|
368
368
|
return await toDataValue(attachment.rid, client);
|
|
369
369
|
}
|
|
370
|
-
if (
|
|
370
|
+
if (chunkDYIOTYPW_cjs.isMediaUpload(value)) {
|
|
371
371
|
const mediaRef = await chunk4L3NEGLF_cjs.MediaSet_exports.uploadMedia(client, value.data, {
|
|
372
372
|
filename: value.fileName
|
|
373
373
|
});
|
|
374
374
|
return await toDataValue(mediaRef, client);
|
|
375
375
|
}
|
|
376
|
-
if (
|
|
376
|
+
if (chunkDYIOTYPW_cjs.isMedia(value)) {
|
|
377
377
|
return value.getMediaReference();
|
|
378
378
|
}
|
|
379
|
-
if (
|
|
379
|
+
if (chunkDYIOTYPW_cjs.isMediaReference(value)) {
|
|
380
380
|
return value;
|
|
381
381
|
}
|
|
382
382
|
if (isOntologyObjectV2(value)) {
|
|
383
383
|
return await toDataValue(value.__primaryKey, client);
|
|
384
384
|
}
|
|
385
|
-
if (
|
|
385
|
+
if (chunkDYIOTYPW_cjs.isObjectSpecifiersObject(value)) {
|
|
386
386
|
return await toDataValue(value.$primaryKey, client);
|
|
387
387
|
}
|
|
388
|
-
if (
|
|
389
|
-
return
|
|
388
|
+
if (chunkBVGIIRQT_cjs.isWireObjectSet(value)) {
|
|
389
|
+
return chunkBVGIIRQT_cjs.normalizeInterfaceLinkSearchArounds(client, value);
|
|
390
390
|
}
|
|
391
|
-
if (
|
|
392
|
-
return
|
|
391
|
+
if (chunkBVGIIRQT_cjs.isObjectSet(value)) {
|
|
392
|
+
return chunkBVGIIRQT_cjs.normalizeInterfaceLinkSearchArounds(client, chunkBVGIIRQT_cjs.getWireObjectSet(value));
|
|
393
393
|
}
|
|
394
|
-
if (
|
|
394
|
+
if (chunkDYIOTYPW_cjs.isInterfaceActionParam(value)) {
|
|
395
395
|
return {
|
|
396
396
|
objectTypeApiName: value.$objectType,
|
|
397
397
|
primaryKeyValue: value.$primaryKey
|
|
@@ -412,7 +412,7 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
412
412
|
|
|
413
413
|
// src/actions/applyAction.ts
|
|
414
414
|
async function applyAction(client, action, parameters, options = {}) {
|
|
415
|
-
const clientWithHeaders =
|
|
415
|
+
const clientWithHeaders = chunkBVGIIRQT_cjs.addUserAgentHeader(client, action);
|
|
416
416
|
if (Array.isArray(parameters)) {
|
|
417
417
|
!(client.transactionId == null) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Batch actions are not supported for staged edit functions or when supplying a transaction ID") : invariant4__default.default(false) : void 0;
|
|
418
418
|
const response = await applyBatch(clientWithHeaders, await client.ontologyRid, action.unsanitizedApiName ?? action.apiName, {
|
|
@@ -534,7 +534,7 @@ async function createAgentSession(client, agent, args) {
|
|
|
534
534
|
if (client.branch != null) {
|
|
535
535
|
throw new Error("Agent sessions are not supported on branches");
|
|
536
536
|
}
|
|
537
|
-
const clientWithHeaders =
|
|
537
|
+
const clientWithHeaders = chunkBVGIIRQT_cjs.addUserAgentHeader(client, agent);
|
|
538
538
|
const ontologyRid = await client.ontologyRid;
|
|
539
539
|
const response = await create(clientWithHeaders, {
|
|
540
540
|
agent: {
|
|
@@ -781,7 +781,7 @@ var MediaReferencePropertyImpl = class {
|
|
|
781
781
|
ReadToken: token
|
|
782
782
|
} : void 0);
|
|
783
783
|
return {
|
|
784
|
-
itemMetadata:
|
|
784
|
+
itemMetadata: chunkBVGIIRQT_cjs.validateMediaItemMetadata(raw)
|
|
785
785
|
};
|
|
786
786
|
}
|
|
787
787
|
getMediaReference() {
|
|
@@ -1209,8 +1209,8 @@ function get$link(holder) {
|
|
|
1209
1209
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1210
1210
|
}).pivotTo(linkName);
|
|
1211
1211
|
const value = !linkDef.multiplicity ? {
|
|
1212
|
-
fetchOne: (options) =>
|
|
1213
|
-
fetchOneWithErrors: (options) =>
|
|
1212
|
+
fetchOne: (options) => chunkBVGIIRQT_cjs.fetchSingle(client, objDef, options ?? {}, chunkBVGIIRQT_cjs.getWireObjectSet(objectSet)),
|
|
1213
|
+
fetchOneWithErrors: (options) => chunkBVGIIRQT_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkBVGIIRQT_cjs.getWireObjectSet(objectSet))
|
|
1214
1214
|
} : objectSet;
|
|
1215
1215
|
return [linkName, value];
|
|
1216
1216
|
})));
|
|
@@ -1233,8 +1233,8 @@ function get$linkForInterface(holder) {
|
|
|
1233
1233
|
apiName: linkDef.targetTypeApiName
|
|
1234
1234
|
};
|
|
1235
1235
|
const value = !linkDef.multiplicity ? {
|
|
1236
|
-
fetchOne: (options) =>
|
|
1237
|
-
fetchOneWithErrors: (options) =>
|
|
1236
|
+
fetchOne: (options) => chunkBVGIIRQT_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkBVGIIRQT_cjs.getWireObjectSet(objectSet)),
|
|
1237
|
+
fetchOneWithErrors: (options) => chunkBVGIIRQT_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkBVGIIRQT_cjs.getWireObjectSet(objectSet))
|
|
1238
1238
|
} : objectSet;
|
|
1239
1239
|
return [linkName, value];
|
|
1240
1240
|
})));
|
|
@@ -1279,7 +1279,7 @@ function isStruct(value) {
|
|
|
1279
1279
|
return typeof value === "object" && value != null && !Array.isArray(value);
|
|
1280
1280
|
}
|
|
1281
1281
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1282
|
-
const [objApiNamespace] =
|
|
1282
|
+
const [objApiNamespace] = chunkBVGIIRQT_cjs.extractNamespace(interfaceDef.apiName);
|
|
1283
1283
|
const objDef = underlying[ObjectDefRef];
|
|
1284
1284
|
const underlyingProperties = underlying;
|
|
1285
1285
|
return Object.freeze(Object.defineProperties({}, {
|
|
@@ -1343,7 +1343,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1343
1343
|
value: interfaceDef
|
|
1344
1344
|
},
|
|
1345
1345
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1346
|
-
const [apiNamespace, apiName] =
|
|
1346
|
+
const [apiNamespace, apiName] = chunkBVGIIRQT_cjs.extractNamespace(p);
|
|
1347
1347
|
const exposedName = apiNamespace === objApiNamespace ? apiName : p;
|
|
1348
1348
|
const impl = objDef.interfaceImplementations?.[interfaceDef.apiName]?.[p];
|
|
1349
1349
|
if (impl != null) {
|
|
@@ -1392,7 +1392,7 @@ function remapPropertySecuritiesForInterface(underlyingSecurities, objDef, inter
|
|
|
1392
1392
|
}
|
|
1393
1393
|
const interfacePropName = inverseMap[objPropName];
|
|
1394
1394
|
if (interfacePropName == null) continue;
|
|
1395
|
-
const [apiNamespace, apiName] =
|
|
1395
|
+
const [apiNamespace, apiName] = chunkBVGIIRQT_cjs.extractNamespace(interfacePropName);
|
|
1396
1396
|
const key = apiNamespace === objApiNamespace ? apiName : interfacePropName;
|
|
1397
1397
|
remapped[key] = underlyingSecurities[objPropName];
|
|
1398
1398
|
}
|
|
@@ -1485,7 +1485,7 @@ var basePropDefs = {
|
|
|
1485
1485
|
$objectSpecifier: {
|
|
1486
1486
|
get() {
|
|
1487
1487
|
const rawObj = this[UnderlyingOsdkObject];
|
|
1488
|
-
return
|
|
1488
|
+
return chunkDYIOTYPW_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
|
|
1489
1489
|
},
|
|
1490
1490
|
enumerable: true
|
|
1491
1491
|
},
|
|
@@ -1557,9 +1557,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1557
1557
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1558
1558
|
case "attachment":
|
|
1559
1559
|
if (Array.isArray(rawValue)) {
|
|
1560
|
-
return rawValue.map((a) =>
|
|
1560
|
+
return rawValue.map((a) => chunkBVGIIRQT_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1561
1561
|
} else {
|
|
1562
|
-
return
|
|
1562
|
+
return chunkBVGIIRQT_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1563
1563
|
}
|
|
1564
1564
|
default:
|
|
1565
1565
|
process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant4__default.default(false) ;
|
|
@@ -1575,9 +1575,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1575
1575
|
}
|
|
1576
1576
|
if (propDef.type === "attachment") {
|
|
1577
1577
|
if (Array.isArray(rawValue)) {
|
|
1578
|
-
return rawValue.map((a) =>
|
|
1578
|
+
return rawValue.map((a) => chunkBVGIIRQT_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1579
1579
|
}
|
|
1580
|
-
return
|
|
1580
|
+
return chunkBVGIIRQT_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1581
1581
|
}
|
|
1582
1582
|
if (propDef.type === "cipherText") {
|
|
1583
1583
|
return new CipherTextPropertyImpl({
|
|
@@ -1933,11 +1933,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1933
1933
|
};
|
|
1934
1934
|
|
|
1935
1935
|
// src/util/UserAgent.ts
|
|
1936
|
-
var USER_AGENT = `osdk-client/${"2.
|
|
1937
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.
|
|
1936
|
+
var USER_AGENT = `osdk-client/${"2.80.0"}`;
|
|
1937
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.80.0"}`;
|
|
1938
1938
|
|
|
1939
1939
|
// src/createMinimalClient.ts
|
|
1940
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1940
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkBVGIIRQT_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1941
1941
|
if (process.env.NODE_ENV !== "production") {
|
|
1942
1942
|
try {
|
|
1943
1943
|
new URL(baseUrl);
|
|
@@ -2626,7 +2626,7 @@ var ActionInvoker = class {
|
|
|
2626
2626
|
};
|
|
2627
2627
|
var QueryInvoker = class {
|
|
2628
2628
|
constructor(clientCtx, queryDef) {
|
|
2629
|
-
this.executeFunction =
|
|
2629
|
+
this.executeFunction = chunkDYIOTYPW_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
|
|
2630
2630
|
}
|
|
2631
2631
|
};
|
|
2632
2632
|
var AgentClient = class {
|
|
@@ -2676,7 +2676,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2676
2676
|
async *executeStreamingFunction(query, params) {
|
|
2677
2677
|
const {
|
|
2678
2678
|
applyStreamingQuery
|
|
2679
|
-
} = await import('./applyStreamingQuery-
|
|
2679
|
+
} = await import('./applyStreamingQuery-WC4DBZP4.cjs');
|
|
2680
2680
|
yield* applyStreamingQuery(clientCtx, query, params);
|
|
2681
2681
|
}
|
|
2682
2682
|
};
|
|
@@ -2703,16 +2703,16 @@ function createClientFromContext(clientCtx) {
|
|
|
2703
2703
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2704
2704
|
return {
|
|
2705
2705
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2706
|
-
return await
|
|
2706
|
+
return await chunkBVGIIRQT_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2707
2707
|
}
|
|
2708
2708
|
};
|
|
2709
2709
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
2710
2710
|
return {
|
|
2711
2711
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
2712
|
-
return await
|
|
2712
|
+
return await chunkBVGIIRQT_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
2713
2713
|
},
|
|
2714
2714
|
fetchPageByRidNoType: async (rids, options) => {
|
|
2715
|
-
return await
|
|
2715
|
+
return await chunkBVGIIRQT_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
2716
2716
|
}
|
|
2717
2717
|
};
|
|
2718
2718
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet.name:
|
|
@@ -2756,7 +2756,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2756
2756
|
[symbolClientContext2]: {
|
|
2757
2757
|
value: clientCtx
|
|
2758
2758
|
},
|
|
2759
|
-
[
|
|
2759
|
+
[chunkBVGIIRQT_cjs.additionalContext]: {
|
|
2760
2760
|
value: clientCtx
|
|
2761
2761
|
},
|
|
2762
2762
|
fetchMetadata: {
|
|
@@ -2765,9 +2765,9 @@ function createClientFromContext(clientCtx) {
|
|
|
2765
2765
|
});
|
|
2766
2766
|
return client;
|
|
2767
2767
|
}
|
|
2768
|
-
var createClient = createClientInternal.bind(void 0,
|
|
2769
|
-
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(
|
|
2770
|
-
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(
|
|
2768
|
+
var createClient = createClientInternal.bind(void 0, chunkBVGIIRQT_cjs.createObjectSet, void 0, void 0, void 0, void 0);
|
|
2769
|
+
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkBVGIIRQT_cjs.createObjectSet, transactionRid, flushEdits, void 0, void 0, ...args);
|
|
2770
|
+
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(chunkBVGIIRQT_cjs.createObjectSet, void 0, void 0, void 0, createSubscriptionConnection, ...args);
|
|
2771
2771
|
function createWithRid(rids) {
|
|
2772
2772
|
const withRid = {
|
|
2773
2773
|
type: "static",
|
|
@@ -2792,5 +2792,5 @@ exports.createClientFromContext = createClientFromContext;
|
|
|
2792
2792
|
exports.createClientWithSubscriptionConnection = createClientWithSubscriptionConnection;
|
|
2793
2793
|
exports.createClientWithTransaction = createClientWithTransaction;
|
|
2794
2794
|
exports.createOsdkObject = createOsdkObject;
|
|
2795
|
-
//# sourceMappingURL=chunk-
|
|
2796
|
-
//# sourceMappingURL=chunk-
|
|
2795
|
+
//# sourceMappingURL=chunk-DXIPLYMT.cjs.map
|
|
2796
|
+
//# sourceMappingURL=chunk-DXIPLYMT.cjs.map
|