@osdk/client 2.76.0 → 2.76.1-main-2ab4d7c15acb64b37bce29eadae5a6190ebf2fde
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 +9 -0
- 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-T5LPS5RC.cjs → applyStreamingQuery-VUL744HX.cjs} +8 -8
- package/build/cjs/{applyStreamingQuery-T5LPS5RC.cjs.map → applyStreamingQuery-VUL744HX.cjs.map} +1 -1
- package/build/cjs/{chunk-EX6B3IL7.cjs → chunk-6WORJX26.cjs} +14 -14
- package/build/cjs/{chunk-EX6B3IL7.cjs.map → chunk-6WORJX26.cjs.map} +1 -1
- package/build/cjs/{chunk-FY5MUMSI.cjs → chunk-MC6EO4TV.cjs} +2 -2
- package/build/cjs/{chunk-FY5MUMSI.cjs.map → chunk-MC6EO4TV.cjs.map} +1 -1
- package/build/cjs/{chunk-LOONJRYY.cjs → chunk-WD63KCSA.cjs} +83 -83
- package/build/cjs/{chunk-LOONJRYY.cjs.map → chunk-WD63KCSA.cjs.map} +1 -1
- package/build/cjs/{chunk-E3VV6MCF.cjs → chunk-YM5ZA37Q.cjs} +47 -47
- package/build/cjs/chunk-YM5ZA37Q.cjs.map +1 -0
- package/build/cjs/{chunk-KVB6LP4F.cjs → chunk-YNHMY4IJ.cjs} +8 -8
- package/build/cjs/{chunk-KVB6LP4F.cjs.map → chunk-YNHMY4IJ.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-E3VV6MCF.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 chunk6WORJX26_cjs = require('./chunk-6WORJX26.cjs');
|
|
6
|
+
var chunkMC6EO4TV_cjs = require('./chunk-MC6EO4TV.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[chunkMC6EO4TV_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
|
// resolved to no branch must stay on the default branch here too.
|
|
169
169
|
UNSTABLE_DO_NOT_USE_BRANCH: ctx.branch ?? null
|
|
170
170
|
}, ctx.fetch);
|
|
171
|
-
const innerCtx = inner[
|
|
171
|
+
const innerCtx = inner[chunkMC6EO4TV_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) => chunk6WORJX26_cjs.isAttachmentUpload(dataValue) || chunk6WORJX26_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 (chunk6WORJX26_cjs.isAttachmentUpload(value)) {
|
|
359
|
+
const attachment = await chunkMC6EO4TV_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 (chunk6WORJX26_cjs.isAttachmentFile(value)) {
|
|
365
|
+
const attachment = await chunkMC6EO4TV_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 (chunk6WORJX26_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 (chunk6WORJX26_cjs.isMedia(value)) {
|
|
377
377
|
return value.getMediaReference();
|
|
378
378
|
}
|
|
379
|
-
if (
|
|
379
|
+
if (chunk6WORJX26_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 (chunk6WORJX26_cjs.isObjectSpecifiersObject(value)) {
|
|
386
386
|
return await toDataValue(value.$primaryKey, client);
|
|
387
387
|
}
|
|
388
|
-
if (
|
|
389
|
-
return
|
|
388
|
+
if (chunkMC6EO4TV_cjs.isWireObjectSet(value)) {
|
|
389
|
+
return chunkMC6EO4TV_cjs.normalizeInterfaceLinkSearchArounds(client, value);
|
|
390
390
|
}
|
|
391
|
-
if (
|
|
392
|
-
return
|
|
391
|
+
if (chunkMC6EO4TV_cjs.isObjectSet(value)) {
|
|
392
|
+
return chunkMC6EO4TV_cjs.normalizeInterfaceLinkSearchArounds(client, chunkMC6EO4TV_cjs.getWireObjectSet(value));
|
|
393
393
|
}
|
|
394
|
-
if (
|
|
394
|
+
if (chunk6WORJX26_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 = chunkMC6EO4TV_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, {
|
|
@@ -744,7 +744,7 @@ var MediaReferencePropertyImpl = class {
|
|
|
744
744
|
ReadToken: token
|
|
745
745
|
} : void 0);
|
|
746
746
|
return {
|
|
747
|
-
itemMetadata:
|
|
747
|
+
itemMetadata: chunkMC6EO4TV_cjs.validateMediaItemMetadata(raw)
|
|
748
748
|
};
|
|
749
749
|
}
|
|
750
750
|
getMediaReference() {
|
|
@@ -1172,8 +1172,8 @@ function get$link(holder) {
|
|
|
1172
1172
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1173
1173
|
}).pivotTo(linkName);
|
|
1174
1174
|
const value = !linkDef.multiplicity ? {
|
|
1175
|
-
fetchOne: (options) =>
|
|
1176
|
-
fetchOneWithErrors: (options) =>
|
|
1175
|
+
fetchOne: (options) => chunkMC6EO4TV_cjs.fetchSingle(client, objDef, options ?? {}, chunkMC6EO4TV_cjs.getWireObjectSet(objectSet)),
|
|
1176
|
+
fetchOneWithErrors: (options) => chunkMC6EO4TV_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkMC6EO4TV_cjs.getWireObjectSet(objectSet))
|
|
1177
1177
|
} : objectSet;
|
|
1178
1178
|
return [linkName, value];
|
|
1179
1179
|
})));
|
|
@@ -1196,8 +1196,8 @@ function get$linkForInterface(holder) {
|
|
|
1196
1196
|
apiName: linkDef.targetTypeApiName
|
|
1197
1197
|
};
|
|
1198
1198
|
const value = !linkDef.multiplicity ? {
|
|
1199
|
-
fetchOne: (options) =>
|
|
1200
|
-
fetchOneWithErrors: (options) =>
|
|
1199
|
+
fetchOne: (options) => chunkMC6EO4TV_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkMC6EO4TV_cjs.getWireObjectSet(objectSet)),
|
|
1200
|
+
fetchOneWithErrors: (options) => chunkMC6EO4TV_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkMC6EO4TV_cjs.getWireObjectSet(objectSet))
|
|
1201
1201
|
} : objectSet;
|
|
1202
1202
|
return [linkName, value];
|
|
1203
1203
|
})));
|
|
@@ -1242,7 +1242,7 @@ function isStruct(value) {
|
|
|
1242
1242
|
return typeof value === "object" && value != null && !Array.isArray(value);
|
|
1243
1243
|
}
|
|
1244
1244
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1245
|
-
const [objApiNamespace] =
|
|
1245
|
+
const [objApiNamespace] = chunkMC6EO4TV_cjs.extractNamespace(interfaceDef.apiName);
|
|
1246
1246
|
const objDef = underlying[ObjectDefRef];
|
|
1247
1247
|
const underlyingProperties = underlying;
|
|
1248
1248
|
return Object.freeze(Object.defineProperties({}, {
|
|
@@ -1306,7 +1306,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1306
1306
|
value: interfaceDef
|
|
1307
1307
|
},
|
|
1308
1308
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1309
|
-
const [apiNamespace, apiName] =
|
|
1309
|
+
const [apiNamespace, apiName] = chunkMC6EO4TV_cjs.extractNamespace(p);
|
|
1310
1310
|
const exposedName = apiNamespace === objApiNamespace ? apiName : p;
|
|
1311
1311
|
const impl = objDef.interfaceImplementations?.[interfaceDef.apiName]?.[p];
|
|
1312
1312
|
if (impl != null) {
|
|
@@ -1355,7 +1355,7 @@ function remapPropertySecuritiesForInterface(underlyingSecurities, objDef, inter
|
|
|
1355
1355
|
}
|
|
1356
1356
|
const interfacePropName = inverseMap[objPropName];
|
|
1357
1357
|
if (interfacePropName == null) continue;
|
|
1358
|
-
const [apiNamespace, apiName] =
|
|
1358
|
+
const [apiNamespace, apiName] = chunkMC6EO4TV_cjs.extractNamespace(interfacePropName);
|
|
1359
1359
|
const key = apiNamespace === objApiNamespace ? apiName : interfacePropName;
|
|
1360
1360
|
remapped[key] = underlyingSecurities[objPropName];
|
|
1361
1361
|
}
|
|
@@ -1448,7 +1448,7 @@ var basePropDefs = {
|
|
|
1448
1448
|
$objectSpecifier: {
|
|
1449
1449
|
get() {
|
|
1450
1450
|
const rawObj = this[UnderlyingOsdkObject];
|
|
1451
|
-
return
|
|
1451
|
+
return chunk6WORJX26_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
|
|
1452
1452
|
},
|
|
1453
1453
|
enumerable: true
|
|
1454
1454
|
},
|
|
@@ -1520,9 +1520,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1520
1520
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1521
1521
|
case "attachment":
|
|
1522
1522
|
if (Array.isArray(rawValue)) {
|
|
1523
|
-
return rawValue.map((a) =>
|
|
1523
|
+
return rawValue.map((a) => chunkMC6EO4TV_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1524
1524
|
} else {
|
|
1525
|
-
return
|
|
1525
|
+
return chunkMC6EO4TV_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1526
1526
|
}
|
|
1527
1527
|
default:
|
|
1528
1528
|
process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant4__default.default(false) ;
|
|
@@ -1538,9 +1538,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1538
1538
|
}
|
|
1539
1539
|
if (propDef.type === "attachment") {
|
|
1540
1540
|
if (Array.isArray(rawValue)) {
|
|
1541
|
-
return rawValue.map((a) =>
|
|
1541
|
+
return rawValue.map((a) => chunkMC6EO4TV_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1542
1542
|
}
|
|
1543
|
-
return
|
|
1543
|
+
return chunkMC6EO4TV_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1544
1544
|
}
|
|
1545
1545
|
if (propDef.type === "cipherText") {
|
|
1546
1546
|
return new CipherTextPropertyImpl({
|
|
@@ -1896,11 +1896,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1896
1896
|
};
|
|
1897
1897
|
|
|
1898
1898
|
// src/util/UserAgent.ts
|
|
1899
|
-
var USER_AGENT = `osdk-client/${"2.76.
|
|
1900
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.76.
|
|
1899
|
+
var USER_AGENT = `osdk-client/${"2.76.1-main-2ab4d7c15acb64b37bce29eadae5a6190ebf2fde"}`;
|
|
1900
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.76.1-main-2ab4d7c15acb64b37bce29eadae5a6190ebf2fde"}`;
|
|
1901
1901
|
|
|
1902
1902
|
// src/createMinimalClient.ts
|
|
1903
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1903
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkMC6EO4TV_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1904
1904
|
if (process.env.NODE_ENV !== "production") {
|
|
1905
1905
|
try {
|
|
1906
1906
|
new URL(baseUrl);
|
|
@@ -2589,7 +2589,7 @@ var ActionInvoker = class {
|
|
|
2589
2589
|
};
|
|
2590
2590
|
var QueryInvoker = class {
|
|
2591
2591
|
constructor(clientCtx, queryDef) {
|
|
2592
|
-
this.executeFunction =
|
|
2592
|
+
this.executeFunction = chunk6WORJX26_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
|
|
2593
2593
|
}
|
|
2594
2594
|
};
|
|
2595
2595
|
function createClientInternal(objectSetFactory, transactionRid, flushEdits, scenarioRid, subscribeConnectionFn, baseUrl, ontologyRid, tokenProvider, options = void 0, fetchFn = fetch) {
|
|
@@ -2632,7 +2632,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2632
2632
|
async *executeStreamingFunction(query, params) {
|
|
2633
2633
|
const {
|
|
2634
2634
|
applyStreamingQuery
|
|
2635
|
-
} = await import('./applyStreamingQuery-
|
|
2635
|
+
} = await import('./applyStreamingQuery-VUL744HX.cjs');
|
|
2636
2636
|
yield* applyStreamingQuery(clientCtx, query, params);
|
|
2637
2637
|
}
|
|
2638
2638
|
};
|
|
@@ -2659,16 +2659,16 @@ function createClientFromContext(clientCtx) {
|
|
|
2659
2659
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2660
2660
|
return {
|
|
2661
2661
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2662
|
-
return await
|
|
2662
|
+
return await chunkMC6EO4TV_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2663
2663
|
}
|
|
2664
2664
|
};
|
|
2665
2665
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
2666
2666
|
return {
|
|
2667
2667
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
2668
|
-
return await
|
|
2668
|
+
return await chunkMC6EO4TV_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
2669
2669
|
},
|
|
2670
2670
|
fetchPageByRidNoType: async (rids, options) => {
|
|
2671
|
-
return await
|
|
2671
|
+
return await chunkMC6EO4TV_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
2672
2672
|
}
|
|
2673
2673
|
};
|
|
2674
2674
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet.name:
|
|
@@ -2712,7 +2712,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2712
2712
|
[symbolClientContext2]: {
|
|
2713
2713
|
value: clientCtx
|
|
2714
2714
|
},
|
|
2715
|
-
[
|
|
2715
|
+
[chunkMC6EO4TV_cjs.additionalContext]: {
|
|
2716
2716
|
value: clientCtx
|
|
2717
2717
|
},
|
|
2718
2718
|
fetchMetadata: {
|
|
@@ -2721,10 +2721,10 @@ function createClientFromContext(clientCtx) {
|
|
|
2721
2721
|
});
|
|
2722
2722
|
return client;
|
|
2723
2723
|
}
|
|
2724
|
-
var createClient = createClientInternal.bind(void 0,
|
|
2725
|
-
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(
|
|
2726
|
-
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(
|
|
2727
|
-
var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(
|
|
2724
|
+
var createClient = createClientInternal.bind(void 0, chunkMC6EO4TV_cjs.createObjectSet, void 0, void 0, void 0, void 0);
|
|
2725
|
+
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkMC6EO4TV_cjs.createObjectSet, transactionRid, flushEdits, void 0, void 0, ...args);
|
|
2726
|
+
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(chunkMC6EO4TV_cjs.createObjectSet, void 0, void 0, void 0, createSubscriptionConnection, ...args);
|
|
2727
|
+
var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(chunkMC6EO4TV_cjs.createObjectSet, void 0, void 0, scenarioRid, void 0, ...args);
|
|
2728
2728
|
function createWithRid(rids) {
|
|
2729
2729
|
const withRid = {
|
|
2730
2730
|
type: "static",
|
|
@@ -2749,5 +2749,5 @@ exports.createClientFromContext = createClientFromContext;
|
|
|
2749
2749
|
exports.createClientWithSubscriptionConnection = createClientWithSubscriptionConnection;
|
|
2750
2750
|
exports.createClientWithTransaction = createClientWithTransaction;
|
|
2751
2751
|
exports.createOsdkObject = createOsdkObject;
|
|
2752
|
-
//# sourceMappingURL=chunk-
|
|
2753
|
-
//# sourceMappingURL=chunk-
|
|
2752
|
+
//# sourceMappingURL=chunk-YM5ZA37Q.cjs.map
|
|
2753
|
+
//# sourceMappingURL=chunk-YM5ZA37Q.cjs.map
|