@osdk/client 2.46.0 → 2.47.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 +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/cjs/{applyStreamingQuery-TWNEY45A.cjs → applyStreamingQuery-QIL33BYK.cjs} +9 -9
- package/build/cjs/{applyStreamingQuery-TWNEY45A.cjs.map → applyStreamingQuery-QIL33BYK.cjs.map} +1 -1
- package/build/cjs/{chunk-NAA6LK6A.cjs → chunk-FVEA6DER.cjs} +2 -2
- package/build/cjs/{chunk-NAA6LK6A.cjs.map → chunk-FVEA6DER.cjs.map} +1 -1
- package/build/cjs/{chunk-GRALTYQI.cjs → chunk-L6WZ4TZD.cjs} +47 -47
- package/build/cjs/{chunk-GRALTYQI.cjs.map → chunk-L6WZ4TZD.cjs.map} +1 -1
- package/build/cjs/{chunk-4O6723FC.cjs → chunk-LIM24DBZ.cjs} +13 -13
- package/build/cjs/{chunk-4O6723FC.cjs.map → chunk-LIM24DBZ.cjs.map} +1 -1
- package/build/cjs/{chunk-2LTFLIBH.cjs → chunk-R6OXL7NT.cjs} +80 -80
- package/build/cjs/{chunk-2LTFLIBH.cjs.map → chunk-R6OXL7NT.cjs.map} +1 -1
- package/build/cjs/index.cjs +11 -11
- package/build/cjs/public/experimental.cjs +6 -6
- 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 +17 -17
- 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/types/Client.d.ts +1 -1
- package/package.json +8 -8
|
@@ -4,8 +4,8 @@ var chunkIWUIN6JJ_cjs = require('./chunk-IWUIN6JJ.cjs');
|
|
|
4
4
|
var chunkIBY4PG26_cjs = require('./chunk-IBY4PG26.cjs');
|
|
5
5
|
var chunkI2SCCYG7_cjs = require('./chunk-I2SCCYG7.cjs');
|
|
6
6
|
var chunkPIWGMK3H_cjs = require('./chunk-PIWGMK3H.cjs');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
7
|
+
var chunkLIM24DBZ_cjs = require('./chunk-LIM24DBZ.cjs');
|
|
8
|
+
var chunkFVEA6DER_cjs = require('./chunk-FVEA6DER.cjs');
|
|
9
9
|
var chunkROJIXXGF_cjs = require('./chunk-ROJIXXGF.cjs');
|
|
10
10
|
var chunkH6PXPU6F_cjs = require('./chunk-H6PXPU6F.cjs');
|
|
11
11
|
var chunkQ7SFCCGT_cjs = require('./chunk-Q7SFCCGT.cjs');
|
|
@@ -131,7 +131,7 @@ function isScenarioClient(value) {
|
|
|
131
131
|
return value != null && (typeof value === "object" || typeof value === "function") && typeof value.getScenarioReference === "function";
|
|
132
132
|
}
|
|
133
133
|
function buildScenarioClient(parent, scenarioRid) {
|
|
134
|
-
const ctx = parent[
|
|
134
|
+
const ctx = parent[chunkFVEA6DER_cjs.additionalContext];
|
|
135
135
|
if (ctx.transactionId != null) {
|
|
136
136
|
console.warn("withScenario / createScenario: the supplied client has an active transaction. Ignoring the transaction and scoping to the scenario instead.");
|
|
137
137
|
}
|
|
@@ -142,7 +142,7 @@ function buildScenarioClient(parent, scenarioRid) {
|
|
|
142
142
|
logger: ctx.logger,
|
|
143
143
|
UNSTABLE_DO_NOT_USE_BRANCH: ctx.branch
|
|
144
144
|
}, ctx.fetch);
|
|
145
|
-
const innerCtx = inner[
|
|
145
|
+
const innerCtx = inner[chunkFVEA6DER_cjs.additionalContext];
|
|
146
146
|
async function getEditedEntityTypes() {
|
|
147
147
|
const ontologyRid = await innerCtx.ontologyRid;
|
|
148
148
|
const response = await OntologyScenario_exports.listScenarioEditedEntityTypes(innerCtx, ontologyRid, scenarioRid, {
|
|
@@ -284,7 +284,7 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
284
284
|
}
|
|
285
285
|
if (Array.isArray(value) || value instanceof Set) {
|
|
286
286
|
const values = Array.from(value);
|
|
287
|
-
if (values.some((dataValue) =>
|
|
287
|
+
if (values.some((dataValue) => chunkLIM24DBZ_cjs.isAttachmentUpload(dataValue) || chunkLIM24DBZ_cjs.isAttachmentFile(dataValue))) {
|
|
288
288
|
const converted = [];
|
|
289
289
|
for (const value2 of values) {
|
|
290
290
|
converted.push(await toDataValue(value2, client));
|
|
@@ -294,44 +294,44 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
294
294
|
const promiseArray = Array.from(value, async (innerValue) => await toDataValue(innerValue, client));
|
|
295
295
|
return Promise.all(promiseArray);
|
|
296
296
|
}
|
|
297
|
-
if (
|
|
298
|
-
const attachment = await
|
|
297
|
+
if (chunkLIM24DBZ_cjs.isAttachmentUpload(value)) {
|
|
298
|
+
const attachment = await chunkFVEA6DER_cjs.upload(client, value.data, {
|
|
299
299
|
filename: value.name
|
|
300
300
|
});
|
|
301
301
|
return await toDataValue(attachment.rid, client);
|
|
302
302
|
}
|
|
303
|
-
if (
|
|
304
|
-
const attachment = await
|
|
303
|
+
if (chunkLIM24DBZ_cjs.isAttachmentFile(value)) {
|
|
304
|
+
const attachment = await chunkFVEA6DER_cjs.upload(client, value, {
|
|
305
305
|
filename: value.name
|
|
306
306
|
});
|
|
307
307
|
return await toDataValue(attachment.rid, client);
|
|
308
308
|
}
|
|
309
|
-
if (
|
|
309
|
+
if (chunkLIM24DBZ_cjs.isMediaUpload(value)) {
|
|
310
310
|
const mediaRef = await chunkROJIXXGF_cjs.MediaSet_exports.uploadMedia(client, value.data, {
|
|
311
311
|
filename: value.fileName,
|
|
312
312
|
preview: true
|
|
313
313
|
});
|
|
314
314
|
return await toDataValue(mediaRef, client);
|
|
315
315
|
}
|
|
316
|
-
if (
|
|
316
|
+
if (chunkLIM24DBZ_cjs.isMedia(value)) {
|
|
317
317
|
return value.getMediaReference();
|
|
318
318
|
}
|
|
319
|
-
if (
|
|
319
|
+
if (chunkLIM24DBZ_cjs.isMediaReference(value)) {
|
|
320
320
|
return value;
|
|
321
321
|
}
|
|
322
322
|
if (isOntologyObjectV2(value)) {
|
|
323
323
|
return await toDataValue(value.__primaryKey, client);
|
|
324
324
|
}
|
|
325
|
-
if (
|
|
325
|
+
if (chunkLIM24DBZ_cjs.isObjectSpecifiersObject(value)) {
|
|
326
326
|
return await toDataValue(value.$primaryKey, client);
|
|
327
327
|
}
|
|
328
|
-
if (
|
|
328
|
+
if (chunkFVEA6DER_cjs.isWireObjectSet(value)) {
|
|
329
329
|
return value;
|
|
330
330
|
}
|
|
331
|
-
if (
|
|
332
|
-
return
|
|
331
|
+
if (chunkFVEA6DER_cjs.isObjectSet(value)) {
|
|
332
|
+
return chunkFVEA6DER_cjs.getWireObjectSet(value);
|
|
333
333
|
}
|
|
334
|
-
if (
|
|
334
|
+
if (chunkLIM24DBZ_cjs.isInterfaceActionParam(value)) {
|
|
335
335
|
return {
|
|
336
336
|
objectTypeApiName: value.$objectType,
|
|
337
337
|
primaryKeyValue: value.$primaryKey
|
|
@@ -352,7 +352,7 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
352
352
|
|
|
353
353
|
// src/actions/applyAction.ts
|
|
354
354
|
async function applyAction(client, action, parameters, options = {}) {
|
|
355
|
-
const clientWithHeaders =
|
|
355
|
+
const clientWithHeaders = chunkFVEA6DER_cjs.addUserAgentAndRequestContextHeaders(chunkFVEA6DER_cjs.augmentRequestContext(client, (_) => ({
|
|
356
356
|
finalMethodCall: "applyAction"
|
|
357
357
|
})), action);
|
|
358
358
|
if (Array.isArray(parameters)) {
|
|
@@ -504,7 +504,7 @@ function getTimeRange(body) {
|
|
|
504
504
|
}
|
|
505
505
|
async function* asyncIterPointsHelper(iterator) {
|
|
506
506
|
const reader = iterator.body?.getReader();
|
|
507
|
-
for await (const point of
|
|
507
|
+
for await (const point of chunkLIM24DBZ_cjs.parseStreamedResponse(chunkLIM24DBZ_cjs.iterateReadableStream(reader))) {
|
|
508
508
|
yield {
|
|
509
509
|
time: point.time,
|
|
510
510
|
value: point.value
|
|
@@ -600,7 +600,7 @@ var MediaReferencePropertyImpl = class {
|
|
|
600
600
|
ReadToken: token
|
|
601
601
|
} : void 0);
|
|
602
602
|
return {
|
|
603
|
-
itemMetadata:
|
|
603
|
+
itemMetadata: chunkFVEA6DER_cjs.validateMediaItemMetadata(raw)
|
|
604
604
|
};
|
|
605
605
|
}
|
|
606
606
|
getMediaReference() {
|
|
@@ -1028,8 +1028,8 @@ function get$link(holder) {
|
|
|
1028
1028
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1029
1029
|
}).pivotTo(linkName);
|
|
1030
1030
|
const value = !linkDef.multiplicity ? {
|
|
1031
|
-
fetchOne: (options) =>
|
|
1032
|
-
fetchOneWithErrors: (options) =>
|
|
1031
|
+
fetchOne: (options) => chunkFVEA6DER_cjs.fetchSingle(client, objDef, options ?? {}, chunkFVEA6DER_cjs.getWireObjectSet(objectSet)),
|
|
1032
|
+
fetchOneWithErrors: (options) => chunkFVEA6DER_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkFVEA6DER_cjs.getWireObjectSet(objectSet))
|
|
1033
1033
|
} : objectSet;
|
|
1034
1034
|
return [linkName, value];
|
|
1035
1035
|
})));
|
|
@@ -1052,8 +1052,8 @@ function get$linkForInterface(holder) {
|
|
|
1052
1052
|
apiName: linkDef.targetTypeApiName
|
|
1053
1053
|
};
|
|
1054
1054
|
const value = !linkDef.multiplicity ? {
|
|
1055
|
-
fetchOne: (options) =>
|
|
1056
|
-
fetchOneWithErrors: (options) =>
|
|
1055
|
+
fetchOne: (options) => chunkFVEA6DER_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkFVEA6DER_cjs.getWireObjectSet(objectSet)),
|
|
1056
|
+
fetchOneWithErrors: (options) => chunkFVEA6DER_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkFVEA6DER_cjs.getWireObjectSet(objectSet))
|
|
1057
1057
|
} : objectSet;
|
|
1058
1058
|
return [linkName, value];
|
|
1059
1059
|
})));
|
|
@@ -1081,7 +1081,7 @@ function extractValueByImplementation(underlying, impl) {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
1083
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1084
|
-
const [objApiNamespace] =
|
|
1084
|
+
const [objApiNamespace] = chunkFVEA6DER_cjs.extractNamespace(interfaceDef.apiName);
|
|
1085
1085
|
const objDef = underlying[ObjectDefRef];
|
|
1086
1086
|
return Object.freeze(Object.defineProperties({}, {
|
|
1087
1087
|
// first to minimize hidden classes
|
|
@@ -1144,7 +1144,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1144
1144
|
value: interfaceDef
|
|
1145
1145
|
},
|
|
1146
1146
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1147
|
-
const [apiNamespace, apiName] =
|
|
1147
|
+
const [apiNamespace, apiName] = chunkFVEA6DER_cjs.extractNamespace(p);
|
|
1148
1148
|
const exposedName = apiNamespace === objApiNamespace ? apiName : p;
|
|
1149
1149
|
const impl = objDef.interfaceImplementations?.[interfaceDef.apiName]?.[p];
|
|
1150
1150
|
if (impl != null) {
|
|
@@ -1193,7 +1193,7 @@ function remapPropertySecuritiesForInterface(underlyingSecurities, objDef, inter
|
|
|
1193
1193
|
}
|
|
1194
1194
|
const interfacePropName = inverseMap[objPropName];
|
|
1195
1195
|
if (interfacePropName == null) continue;
|
|
1196
|
-
const [apiNamespace, apiName] =
|
|
1196
|
+
const [apiNamespace, apiName] = chunkFVEA6DER_cjs.extractNamespace(interfacePropName);
|
|
1197
1197
|
const key = apiNamespace === objApiNamespace ? apiName : interfacePropName;
|
|
1198
1198
|
remapped[key] = underlyingSecurities[objPropName];
|
|
1199
1199
|
}
|
|
@@ -1286,7 +1286,7 @@ var basePropDefs = {
|
|
|
1286
1286
|
$objectSpecifier: {
|
|
1287
1287
|
get() {
|
|
1288
1288
|
const rawObj = this[UnderlyingOsdkObject];
|
|
1289
|
-
return
|
|
1289
|
+
return chunkLIM24DBZ_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
|
|
1290
1290
|
},
|
|
1291
1291
|
enumerable: true
|
|
1292
1292
|
},
|
|
@@ -1358,9 +1358,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1358
1358
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1359
1359
|
case "attachment":
|
|
1360
1360
|
if (Array.isArray(rawValue)) {
|
|
1361
|
-
return rawValue.map((a) =>
|
|
1361
|
+
return rawValue.map((a) => chunkFVEA6DER_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1362
1362
|
} else {
|
|
1363
|
-
return
|
|
1363
|
+
return chunkFVEA6DER_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1364
1364
|
}
|
|
1365
1365
|
default:
|
|
1366
1366
|
process.env.NODE_ENV !== "production" ? invariant3__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant3__default.default(false) ;
|
|
@@ -1376,9 +1376,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1376
1376
|
}
|
|
1377
1377
|
if (propDef.type === "attachment") {
|
|
1378
1378
|
if (Array.isArray(rawValue)) {
|
|
1379
|
-
return rawValue.map((a) =>
|
|
1379
|
+
return rawValue.map((a) => chunkFVEA6DER_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1380
1380
|
}
|
|
1381
|
-
return
|
|
1381
|
+
return chunkFVEA6DER_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1382
1382
|
}
|
|
1383
1383
|
if (propDef.type === "cipherText") {
|
|
1384
1384
|
return new CipherTextPropertyImpl({
|
|
@@ -1731,11 +1731,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1731
1731
|
};
|
|
1732
1732
|
|
|
1733
1733
|
// src/util/UserAgent.ts
|
|
1734
|
-
var USER_AGENT = `osdk-client/${"2.
|
|
1735
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.
|
|
1734
|
+
var USER_AGENT = `osdk-client/${"2.47.0"}`;
|
|
1735
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.47.0"}`;
|
|
1736
1736
|
|
|
1737
1737
|
// src/createMinimalClient.ts
|
|
1738
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1738
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkFVEA6DER_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1739
1739
|
if (process.env.NODE_ENV !== "production") {
|
|
1740
1740
|
try {
|
|
1741
1741
|
new URL(baseUrl);
|
|
@@ -2328,7 +2328,7 @@ var ActionInvoker = class {
|
|
|
2328
2328
|
};
|
|
2329
2329
|
var QueryInvoker = class {
|
|
2330
2330
|
constructor(clientCtx, queryDef) {
|
|
2331
|
-
this.executeFunction =
|
|
2331
|
+
this.executeFunction = chunkLIM24DBZ_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
|
|
2332
2332
|
}
|
|
2333
2333
|
};
|
|
2334
2334
|
function createClientInternal(objectSetFactory, transactionRid, flushEdits, scenarioRid, subscribeConnectionFn, baseUrl, ontologyRid, tokenProvider, options = void 0, fetchFn = fetch) {
|
|
@@ -2371,7 +2371,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2371
2371
|
async *executeStreamingFunction(query, params) {
|
|
2372
2372
|
const {
|
|
2373
2373
|
applyStreamingQuery
|
|
2374
|
-
} = await import('./applyStreamingQuery-
|
|
2374
|
+
} = await import('./applyStreamingQuery-QIL33BYK.cjs');
|
|
2375
2375
|
yield* applyStreamingQuery(clientCtx, query, params);
|
|
2376
2376
|
}
|
|
2377
2377
|
};
|
|
@@ -2387,7 +2387,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2387
2387
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2388
2388
|
return {
|
|
2389
2389
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2390
|
-
return await
|
|
2390
|
+
return await chunkFVEA6DER_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2391
2391
|
}
|
|
2392
2392
|
};
|
|
2393
2393
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -2411,10 +2411,10 @@ function createClientFromContext(clientCtx) {
|
|
|
2411
2411
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
2412
2412
|
return {
|
|
2413
2413
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
2414
|
-
return await
|
|
2414
|
+
return await chunkFVEA6DER_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
2415
2415
|
},
|
|
2416
2416
|
fetchPageByRidNoType: async (rids, options) => {
|
|
2417
|
-
return await
|
|
2417
|
+
return await chunkFVEA6DER_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
2418
2418
|
}
|
|
2419
2419
|
};
|
|
2420
2420
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet.name:
|
|
@@ -2458,7 +2458,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2458
2458
|
[symbolClientContext2]: {
|
|
2459
2459
|
value: clientCtx
|
|
2460
2460
|
},
|
|
2461
|
-
[
|
|
2461
|
+
[chunkFVEA6DER_cjs.additionalContext]: {
|
|
2462
2462
|
value: clientCtx
|
|
2463
2463
|
},
|
|
2464
2464
|
fetchMetadata: {
|
|
@@ -2467,10 +2467,10 @@ function createClientFromContext(clientCtx) {
|
|
|
2467
2467
|
});
|
|
2468
2468
|
return client;
|
|
2469
2469
|
}
|
|
2470
|
-
var createClient = createClientInternal.bind(void 0,
|
|
2471
|
-
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(
|
|
2472
|
-
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(
|
|
2473
|
-
var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(
|
|
2470
|
+
var createClient = createClientInternal.bind(void 0, chunkFVEA6DER_cjs.createObjectSet, void 0, void 0, void 0, void 0);
|
|
2471
|
+
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkFVEA6DER_cjs.createObjectSet, transactionRid, flushEdits, void 0, void 0, ...args);
|
|
2472
|
+
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(chunkFVEA6DER_cjs.createObjectSet, void 0, void 0, void 0, createSubscriptionConnection, ...args);
|
|
2473
|
+
var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(chunkFVEA6DER_cjs.createObjectSet, void 0, void 0, scenarioRid, void 0, ...args);
|
|
2474
2474
|
function createWithRid(rids) {
|
|
2475
2475
|
const withRid = {
|
|
2476
2476
|
type: "static",
|
|
@@ -2494,5 +2494,5 @@ exports.createClientFromContext = createClientFromContext;
|
|
|
2494
2494
|
exports.createClientWithSubscriptionConnection = createClientWithSubscriptionConnection;
|
|
2495
2495
|
exports.createClientWithTransaction = createClientWithTransaction;
|
|
2496
2496
|
exports.createOsdkObject = createOsdkObject;
|
|
2497
|
-
//# sourceMappingURL=chunk-
|
|
2498
|
-
//# sourceMappingURL=chunk-
|
|
2497
|
+
//# sourceMappingURL=chunk-L6WZ4TZD.cjs.map
|
|
2498
|
+
//# sourceMappingURL=chunk-L6WZ4TZD.cjs.map
|