@osdk/client 2.71.0 → 2.71.1-main-e5023d02bf53a3ce0ad950a3a57e8a0e78ec711a
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 +8 -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-H3X3C5FU.cjs → applyStreamingQuery-HBQPRJ4I.cjs} +8 -8
- package/build/cjs/{applyStreamingQuery-H3X3C5FU.cjs.map → applyStreamingQuery-HBQPRJ4I.cjs.map} +1 -1
- package/build/cjs/{chunk-PDBUYKWG.cjs → chunk-ANTHHHST.cjs} +80 -80
- package/build/cjs/{chunk-PDBUYKWG.cjs.map → chunk-ANTHHHST.cjs.map} +1 -1
- package/build/cjs/{chunk-DKODJJ7N.cjs → chunk-GOPEJNNA.cjs} +13 -13
- package/build/cjs/{chunk-DKODJJ7N.cjs.map → chunk-GOPEJNNA.cjs.map} +1 -1
- package/build/cjs/{chunk-RNB7M3QX.cjs → chunk-J2UASCCP.cjs} +8 -8
- package/build/cjs/{chunk-RNB7M3QX.cjs.map → chunk-J2UASCCP.cjs.map} +1 -1
- package/build/cjs/{chunk-ZWABEEHA.cjs → chunk-NQPEDXAP.cjs} +46 -46
- package/build/cjs/chunk-NQPEDXAP.cjs.map +1 -0
- package/build/cjs/{chunk-2E3QVQUU.cjs → chunk-TSHX2JAX.cjs} +2 -2
- package/build/cjs/{chunk-2E3QVQUU.cjs.map → chunk-TSHX2JAX.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 +7 -7
- 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 +6 -6
- package/build/cjs/chunk-ZWABEEHA.cjs.map +0 -1
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkIBY4PG26_cjs = require('./chunk-IBY4PG26.cjs');
|
|
4
4
|
var chunkG2EJPP5V_cjs = require('./chunk-G2EJPP5V.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkGOPEJNNA_cjs = require('./chunk-GOPEJNNA.cjs');
|
|
6
|
+
var chunkTSHX2JAX_cjs = require('./chunk-TSHX2JAX.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[chunkTSHX2JAX_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[chunkTSHX2JAX_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) => chunkGOPEJNNA_cjs.isAttachmentUpload(dataValue) || chunkGOPEJNNA_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 (chunkGOPEJNNA_cjs.isAttachmentUpload(value)) {
|
|
359
|
+
const attachment = await chunkTSHX2JAX_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 (chunkGOPEJNNA_cjs.isAttachmentFile(value)) {
|
|
365
|
+
const attachment = await chunkTSHX2JAX_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 (chunkGOPEJNNA_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 (chunkGOPEJNNA_cjs.isMedia(value)) {
|
|
377
377
|
return value.getMediaReference();
|
|
378
378
|
}
|
|
379
|
-
if (
|
|
379
|
+
if (chunkGOPEJNNA_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 (chunkGOPEJNNA_cjs.isObjectSpecifiersObject(value)) {
|
|
386
386
|
return await toDataValue(value.$primaryKey, client);
|
|
387
387
|
}
|
|
388
|
-
if (
|
|
388
|
+
if (chunkTSHX2JAX_cjs.isWireObjectSet(value)) {
|
|
389
389
|
return value;
|
|
390
390
|
}
|
|
391
|
-
if (
|
|
392
|
-
return
|
|
391
|
+
if (chunkTSHX2JAX_cjs.isObjectSet(value)) {
|
|
392
|
+
return chunkTSHX2JAX_cjs.getWireObjectSet(value);
|
|
393
393
|
}
|
|
394
|
-
if (
|
|
394
|
+
if (chunkGOPEJNNA_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 = chunkTSHX2JAX_cjs.addUserAgentAndRequestContextHeaders(chunkTSHX2JAX_cjs.augmentRequestContext(client, (_) => ({
|
|
416
416
|
finalMethodCall: "applyAction"
|
|
417
417
|
})), action);
|
|
418
418
|
if (Array.isArray(parameters)) {
|
|
@@ -738,7 +738,7 @@ var MediaReferencePropertyImpl = class {
|
|
|
738
738
|
ReadToken: token
|
|
739
739
|
} : void 0);
|
|
740
740
|
return {
|
|
741
|
-
itemMetadata:
|
|
741
|
+
itemMetadata: chunkTSHX2JAX_cjs.validateMediaItemMetadata(raw)
|
|
742
742
|
};
|
|
743
743
|
}
|
|
744
744
|
getMediaReference() {
|
|
@@ -1166,8 +1166,8 @@ function get$link(holder) {
|
|
|
1166
1166
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1167
1167
|
}).pivotTo(linkName);
|
|
1168
1168
|
const value = !linkDef.multiplicity ? {
|
|
1169
|
-
fetchOne: (options) =>
|
|
1170
|
-
fetchOneWithErrors: (options) =>
|
|
1169
|
+
fetchOne: (options) => chunkTSHX2JAX_cjs.fetchSingle(client, objDef, options ?? {}, chunkTSHX2JAX_cjs.getWireObjectSet(objectSet)),
|
|
1170
|
+
fetchOneWithErrors: (options) => chunkTSHX2JAX_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkTSHX2JAX_cjs.getWireObjectSet(objectSet))
|
|
1171
1171
|
} : objectSet;
|
|
1172
1172
|
return [linkName, value];
|
|
1173
1173
|
})));
|
|
@@ -1190,8 +1190,8 @@ function get$linkForInterface(holder) {
|
|
|
1190
1190
|
apiName: linkDef.targetTypeApiName
|
|
1191
1191
|
};
|
|
1192
1192
|
const value = !linkDef.multiplicity ? {
|
|
1193
|
-
fetchOne: (options) =>
|
|
1194
|
-
fetchOneWithErrors: (options) =>
|
|
1193
|
+
fetchOne: (options) => chunkTSHX2JAX_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkTSHX2JAX_cjs.getWireObjectSet(objectSet)),
|
|
1194
|
+
fetchOneWithErrors: (options) => chunkTSHX2JAX_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkTSHX2JAX_cjs.getWireObjectSet(objectSet))
|
|
1195
1195
|
} : objectSet;
|
|
1196
1196
|
return [linkName, value];
|
|
1197
1197
|
})));
|
|
@@ -1236,7 +1236,7 @@ function isStruct(value) {
|
|
|
1236
1236
|
return typeof value === "object" && value != null && !Array.isArray(value);
|
|
1237
1237
|
}
|
|
1238
1238
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1239
|
-
const [objApiNamespace] =
|
|
1239
|
+
const [objApiNamespace] = chunkTSHX2JAX_cjs.extractNamespace(interfaceDef.apiName);
|
|
1240
1240
|
const objDef = underlying[ObjectDefRef];
|
|
1241
1241
|
const underlyingProperties = underlying;
|
|
1242
1242
|
return Object.freeze(Object.defineProperties({}, {
|
|
@@ -1300,7 +1300,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1300
1300
|
value: interfaceDef
|
|
1301
1301
|
},
|
|
1302
1302
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1303
|
-
const [apiNamespace, apiName] =
|
|
1303
|
+
const [apiNamespace, apiName] = chunkTSHX2JAX_cjs.extractNamespace(p);
|
|
1304
1304
|
const exposedName = apiNamespace === objApiNamespace ? apiName : p;
|
|
1305
1305
|
const impl = objDef.interfaceImplementations?.[interfaceDef.apiName]?.[p];
|
|
1306
1306
|
if (impl != null) {
|
|
@@ -1349,7 +1349,7 @@ function remapPropertySecuritiesForInterface(underlyingSecurities, objDef, inter
|
|
|
1349
1349
|
}
|
|
1350
1350
|
const interfacePropName = inverseMap[objPropName];
|
|
1351
1351
|
if (interfacePropName == null) continue;
|
|
1352
|
-
const [apiNamespace, apiName] =
|
|
1352
|
+
const [apiNamespace, apiName] = chunkTSHX2JAX_cjs.extractNamespace(interfacePropName);
|
|
1353
1353
|
const key = apiNamespace === objApiNamespace ? apiName : interfacePropName;
|
|
1354
1354
|
remapped[key] = underlyingSecurities[objPropName];
|
|
1355
1355
|
}
|
|
@@ -1442,7 +1442,7 @@ var basePropDefs = {
|
|
|
1442
1442
|
$objectSpecifier: {
|
|
1443
1443
|
get() {
|
|
1444
1444
|
const rawObj = this[UnderlyingOsdkObject];
|
|
1445
|
-
return
|
|
1445
|
+
return chunkGOPEJNNA_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
|
|
1446
1446
|
},
|
|
1447
1447
|
enumerable: true
|
|
1448
1448
|
},
|
|
@@ -1514,9 +1514,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1514
1514
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1515
1515
|
case "attachment":
|
|
1516
1516
|
if (Array.isArray(rawValue)) {
|
|
1517
|
-
return rawValue.map((a) =>
|
|
1517
|
+
return rawValue.map((a) => chunkTSHX2JAX_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1518
1518
|
} else {
|
|
1519
|
-
return
|
|
1519
|
+
return chunkTSHX2JAX_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1520
1520
|
}
|
|
1521
1521
|
default:
|
|
1522
1522
|
process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant4__default.default(false) ;
|
|
@@ -1532,9 +1532,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1532
1532
|
}
|
|
1533
1533
|
if (propDef.type === "attachment") {
|
|
1534
1534
|
if (Array.isArray(rawValue)) {
|
|
1535
|
-
return rawValue.map((a) =>
|
|
1535
|
+
return rawValue.map((a) => chunkTSHX2JAX_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1536
1536
|
}
|
|
1537
|
-
return
|
|
1537
|
+
return chunkTSHX2JAX_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1538
1538
|
}
|
|
1539
1539
|
if (propDef.type === "cipherText") {
|
|
1540
1540
|
return new CipherTextPropertyImpl({
|
|
@@ -1890,11 +1890,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1890
1890
|
};
|
|
1891
1891
|
|
|
1892
1892
|
// src/util/UserAgent.ts
|
|
1893
|
-
var USER_AGENT = `osdk-client/${"2.71.
|
|
1894
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.71.
|
|
1893
|
+
var USER_AGENT = `osdk-client/${"2.71.1-main-e5023d02bf53a3ce0ad950a3a57e8a0e78ec711a"}`;
|
|
1894
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.71.1-main-e5023d02bf53a3ce0ad950a3a57e8a0e78ec711a"}`;
|
|
1895
1895
|
|
|
1896
1896
|
// src/createMinimalClient.ts
|
|
1897
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1897
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkTSHX2JAX_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1898
1898
|
if (process.env.NODE_ENV !== "production") {
|
|
1899
1899
|
try {
|
|
1900
1900
|
new URL(baseUrl);
|
|
@@ -2577,7 +2577,7 @@ var ActionInvoker = class {
|
|
|
2577
2577
|
};
|
|
2578
2578
|
var QueryInvoker = class {
|
|
2579
2579
|
constructor(clientCtx, queryDef) {
|
|
2580
|
-
this.executeFunction =
|
|
2580
|
+
this.executeFunction = chunkGOPEJNNA_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
|
|
2581
2581
|
}
|
|
2582
2582
|
};
|
|
2583
2583
|
function createClientInternal(objectSetFactory, transactionRid, flushEdits, scenarioRid, subscribeConnectionFn, baseUrl, ontologyRid, tokenProvider, options = void 0, fetchFn = fetch) {
|
|
@@ -2620,7 +2620,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2620
2620
|
async *executeStreamingFunction(query, params) {
|
|
2621
2621
|
const {
|
|
2622
2622
|
applyStreamingQuery
|
|
2623
|
-
} = await import('./applyStreamingQuery-
|
|
2623
|
+
} = await import('./applyStreamingQuery-HBQPRJ4I.cjs');
|
|
2624
2624
|
yield* applyStreamingQuery(clientCtx, query, params);
|
|
2625
2625
|
}
|
|
2626
2626
|
};
|
|
@@ -2647,16 +2647,16 @@ function createClientFromContext(clientCtx) {
|
|
|
2647
2647
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2648
2648
|
return {
|
|
2649
2649
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2650
|
-
return await
|
|
2650
|
+
return await chunkTSHX2JAX_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2651
2651
|
}
|
|
2652
2652
|
};
|
|
2653
2653
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
2654
2654
|
return {
|
|
2655
2655
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
2656
|
-
return await
|
|
2656
|
+
return await chunkTSHX2JAX_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
2657
2657
|
},
|
|
2658
2658
|
fetchPageByRidNoType: async (rids, options) => {
|
|
2659
|
-
return await
|
|
2659
|
+
return await chunkTSHX2JAX_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
2660
2660
|
}
|
|
2661
2661
|
};
|
|
2662
2662
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet.name:
|
|
@@ -2700,7 +2700,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2700
2700
|
[symbolClientContext2]: {
|
|
2701
2701
|
value: clientCtx
|
|
2702
2702
|
},
|
|
2703
|
-
[
|
|
2703
|
+
[chunkTSHX2JAX_cjs.additionalContext]: {
|
|
2704
2704
|
value: clientCtx
|
|
2705
2705
|
},
|
|
2706
2706
|
fetchMetadata: {
|
|
@@ -2709,10 +2709,10 @@ function createClientFromContext(clientCtx) {
|
|
|
2709
2709
|
});
|
|
2710
2710
|
return client;
|
|
2711
2711
|
}
|
|
2712
|
-
var createClient = createClientInternal.bind(void 0,
|
|
2713
|
-
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(
|
|
2714
|
-
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(
|
|
2715
|
-
var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(
|
|
2712
|
+
var createClient = createClientInternal.bind(void 0, chunkTSHX2JAX_cjs.createObjectSet, void 0, void 0, void 0, void 0);
|
|
2713
|
+
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkTSHX2JAX_cjs.createObjectSet, transactionRid, flushEdits, void 0, void 0, ...args);
|
|
2714
|
+
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(chunkTSHX2JAX_cjs.createObjectSet, void 0, void 0, void 0, createSubscriptionConnection, ...args);
|
|
2715
|
+
var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(chunkTSHX2JAX_cjs.createObjectSet, void 0, void 0, scenarioRid, void 0, ...args);
|
|
2716
2716
|
function createWithRid(rids) {
|
|
2717
2717
|
const withRid = {
|
|
2718
2718
|
type: "static",
|
|
@@ -2737,5 +2737,5 @@ exports.createClientFromContext = createClientFromContext;
|
|
|
2737
2737
|
exports.createClientWithSubscriptionConnection = createClientWithSubscriptionConnection;
|
|
2738
2738
|
exports.createClientWithTransaction = createClientWithTransaction;
|
|
2739
2739
|
exports.createOsdkObject = createOsdkObject;
|
|
2740
|
-
//# sourceMappingURL=chunk-
|
|
2741
|
-
//# sourceMappingURL=chunk-
|
|
2740
|
+
//# sourceMappingURL=chunk-NQPEDXAP.cjs.map
|
|
2741
|
+
//# sourceMappingURL=chunk-NQPEDXAP.cjs.map
|