@osdk/client 2.53.0 → 2.54.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 +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/cjs/{chunk-E5UOKLCW.cjs → chunk-7VOMQUIX.cjs} +2 -2
- package/build/cjs/{chunk-E5UOKLCW.cjs.map → chunk-7VOMQUIX.cjs.map} +1 -1
- package/build/cjs/{chunk-B7IRP73C.cjs → chunk-DPWQXPBJ.cjs} +45 -45
- package/build/cjs/{chunk-B7IRP73C.cjs.map → chunk-DPWQXPBJ.cjs.map} +1 -1
- package/build/cjs/{chunk-SYOUIMHV.cjs → chunk-JFTS2NKV.cjs} +79 -79
- package/build/cjs/{chunk-SYOUIMHV.cjs.map → chunk-JFTS2NKV.cjs.map} +1 -1
- package/build/cjs/{chunk-BXUXE2VL.cjs → chunk-ZPPYQPTN.cjs} +8 -8
- package/build/cjs/{chunk-BXUXE2VL.cjs.map → chunk-ZPPYQPTN.cjs.map} +1 -1
- package/build/cjs/index.cjs +10 -10
- package/build/cjs/public/experimental.cjs +8 -8
- package/build/cjs/public/internal.cjs +9 -9
- package/build/cjs/public/observable.cjs +4 -4
- package/build/cjs/public/unstable-do-not-use.cjs +15 -15
- 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 +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkIWUIN6JJ_cjs = require('./chunk-IWUIN6JJ.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunk7VOMQUIX_cjs = require('./chunk-7VOMQUIX.cjs');
|
|
5
5
|
var chunkBHRMH4Q2_cjs = require('./chunk-BHRMH4Q2.cjs');
|
|
6
6
|
var chunkI2SCCYG7_cjs = require('./chunk-I2SCCYG7.cjs');
|
|
7
7
|
var chunk7R2DRDPC_cjs = require('./chunk-7R2DRDPC.cjs');
|
|
@@ -176,7 +176,7 @@ function isScenarioClient(value) {
|
|
|
176
176
|
return value != null && (typeof value === "object" || typeof value === "function") && typeof value.getScenarioReference === "function";
|
|
177
177
|
}
|
|
178
178
|
function buildScenarioClient(parent, scenarioRid) {
|
|
179
|
-
const ctx = parent[
|
|
179
|
+
const ctx = parent[chunk7VOMQUIX_cjs.additionalContext];
|
|
180
180
|
if (ctx.transactionId != null) {
|
|
181
181
|
console.warn("withScenario / createScenario: the supplied client has an active transaction. Ignoring the transaction and scoping to the scenario instead.");
|
|
182
182
|
}
|
|
@@ -187,7 +187,7 @@ function buildScenarioClient(parent, scenarioRid) {
|
|
|
187
187
|
logger: ctx.logger,
|
|
188
188
|
UNSTABLE_DO_NOT_USE_BRANCH: ctx.branch
|
|
189
189
|
}, ctx.fetch);
|
|
190
|
-
const innerCtx = inner[
|
|
190
|
+
const innerCtx = inner[chunk7VOMQUIX_cjs.additionalContext];
|
|
191
191
|
async function getEditedEntityTypes() {
|
|
192
192
|
const ontologyRid = await innerCtx.ontologyRid;
|
|
193
193
|
const response = await OntologyScenario_exports.listScenarioEditedEntityTypes(innerCtx, ontologyRid, scenarioRid, {
|
|
@@ -359,13 +359,13 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
359
359
|
return Promise.all(promiseArray);
|
|
360
360
|
}
|
|
361
361
|
if (isAttachmentUpload(value)) {
|
|
362
|
-
const attachment = await
|
|
362
|
+
const attachment = await chunk7VOMQUIX_cjs.upload(client, value.data, {
|
|
363
363
|
filename: value.name
|
|
364
364
|
});
|
|
365
365
|
return await toDataValue(attachment.rid, client);
|
|
366
366
|
}
|
|
367
367
|
if (isAttachmentFile(value)) {
|
|
368
|
-
const attachment = await
|
|
368
|
+
const attachment = await chunk7VOMQUIX_cjs.upload(client, value, {
|
|
369
369
|
filename: value.name
|
|
370
370
|
});
|
|
371
371
|
return await toDataValue(attachment.rid, client);
|
|
@@ -389,11 +389,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
389
389
|
if (isObjectSpecifiersObject(value)) {
|
|
390
390
|
return await toDataValue(value.$primaryKey, client);
|
|
391
391
|
}
|
|
392
|
-
if (
|
|
392
|
+
if (chunk7VOMQUIX_cjs.isWireObjectSet(value)) {
|
|
393
393
|
return value;
|
|
394
394
|
}
|
|
395
|
-
if (
|
|
396
|
-
return
|
|
395
|
+
if (chunk7VOMQUIX_cjs.isObjectSet(value)) {
|
|
396
|
+
return chunk7VOMQUIX_cjs.getWireObjectSet(value);
|
|
397
397
|
}
|
|
398
398
|
if (isInterfaceActionParam(value)) {
|
|
399
399
|
return {
|
|
@@ -416,7 +416,7 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
416
416
|
|
|
417
417
|
// src/actions/applyAction.ts
|
|
418
418
|
async function applyAction(client, action, parameters, options = {}) {
|
|
419
|
-
const clientWithHeaders =
|
|
419
|
+
const clientWithHeaders = chunk7VOMQUIX_cjs.addUserAgentAndRequestContextHeaders(chunk7VOMQUIX_cjs.augmentRequestContext(client, (_) => ({
|
|
420
420
|
finalMethodCall: "applyAction"
|
|
421
421
|
})), action);
|
|
422
422
|
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: chunk7VOMQUIX_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) => chunk7VOMQUIX_cjs.fetchSingle(client, objDef, options ?? {}, chunk7VOMQUIX_cjs.getWireObjectSet(objectSet)),
|
|
1170
|
+
fetchOneWithErrors: (options) => chunk7VOMQUIX_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunk7VOMQUIX_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) => chunk7VOMQUIX_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunk7VOMQUIX_cjs.getWireObjectSet(objectSet)),
|
|
1194
|
+
fetchOneWithErrors: (options) => chunk7VOMQUIX_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunk7VOMQUIX_cjs.getWireObjectSet(objectSet))
|
|
1195
1195
|
} : objectSet;
|
|
1196
1196
|
return [linkName, value];
|
|
1197
1197
|
})));
|
|
@@ -1219,7 +1219,7 @@ function extractValueByImplementation(underlying, impl) {
|
|
|
1219
1219
|
}
|
|
1220
1220
|
}
|
|
1221
1221
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1222
|
-
const [objApiNamespace] =
|
|
1222
|
+
const [objApiNamespace] = chunk7VOMQUIX_cjs.extractNamespace(interfaceDef.apiName);
|
|
1223
1223
|
const objDef = underlying[ObjectDefRef];
|
|
1224
1224
|
return Object.freeze(Object.defineProperties({}, {
|
|
1225
1225
|
// first to minimize hidden classes
|
|
@@ -1282,7 +1282,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1282
1282
|
value: interfaceDef
|
|
1283
1283
|
},
|
|
1284
1284
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1285
|
-
const [apiNamespace, apiName] =
|
|
1285
|
+
const [apiNamespace, apiName] = chunk7VOMQUIX_cjs.extractNamespace(p);
|
|
1286
1286
|
const exposedName = apiNamespace === objApiNamespace ? apiName : p;
|
|
1287
1287
|
const impl = objDef.interfaceImplementations?.[interfaceDef.apiName]?.[p];
|
|
1288
1288
|
if (impl != null) {
|
|
@@ -1331,7 +1331,7 @@ function remapPropertySecuritiesForInterface(underlyingSecurities, objDef, inter
|
|
|
1331
1331
|
}
|
|
1332
1332
|
const interfacePropName = inverseMap[objPropName];
|
|
1333
1333
|
if (interfacePropName == null) continue;
|
|
1334
|
-
const [apiNamespace, apiName] =
|
|
1334
|
+
const [apiNamespace, apiName] = chunk7VOMQUIX_cjs.extractNamespace(interfacePropName);
|
|
1335
1335
|
const key = apiNamespace === objApiNamespace ? apiName : interfacePropName;
|
|
1336
1336
|
remapped[key] = underlyingSecurities[objPropName];
|
|
1337
1337
|
}
|
|
@@ -1496,9 +1496,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1496
1496
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1497
1497
|
case "attachment":
|
|
1498
1498
|
if (Array.isArray(rawValue)) {
|
|
1499
|
-
return rawValue.map((a) =>
|
|
1499
|
+
return rawValue.map((a) => chunk7VOMQUIX_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1500
1500
|
} else {
|
|
1501
|
-
return
|
|
1501
|
+
return chunk7VOMQUIX_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1502
1502
|
}
|
|
1503
1503
|
default:
|
|
1504
1504
|
process.env.NODE_ENV !== "production" ? invariant3__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant3__default.default(false) ;
|
|
@@ -1514,9 +1514,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1514
1514
|
}
|
|
1515
1515
|
if (propDef.type === "attachment") {
|
|
1516
1516
|
if (Array.isArray(rawValue)) {
|
|
1517
|
-
return rawValue.map((a) =>
|
|
1517
|
+
return rawValue.map((a) => chunk7VOMQUIX_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1518
1518
|
}
|
|
1519
|
-
return
|
|
1519
|
+
return chunk7VOMQUIX_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1520
1520
|
}
|
|
1521
1521
|
if (propDef.type === "cipherText") {
|
|
1522
1522
|
return new CipherTextPropertyImpl({
|
|
@@ -1869,11 +1869,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1869
1869
|
};
|
|
1870
1870
|
|
|
1871
1871
|
// src/util/UserAgent.ts
|
|
1872
|
-
var USER_AGENT = `osdk-client/${"2.
|
|
1873
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.
|
|
1872
|
+
var USER_AGENT = `osdk-client/${"2.54.0"}`;
|
|
1873
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.54.0"}`;
|
|
1874
1874
|
|
|
1875
1875
|
// src/createMinimalClient.ts
|
|
1876
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1876
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunk7VOMQUIX_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1877
1877
|
if (process.env.NODE_ENV !== "production") {
|
|
1878
1878
|
try {
|
|
1879
1879
|
new URL(baseUrl);
|
|
@@ -2551,13 +2551,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
2551
2551
|
switch (desiredType.type) {
|
|
2552
2552
|
case "attachment": {
|
|
2553
2553
|
if (isAttachmentUpload(value)) {
|
|
2554
|
-
const attachment = await
|
|
2554
|
+
const attachment = await chunk7VOMQUIX_cjs.upload(client, value.data, {
|
|
2555
2555
|
filename: value.name
|
|
2556
2556
|
});
|
|
2557
2557
|
return attachment.rid;
|
|
2558
2558
|
}
|
|
2559
2559
|
if (isAttachmentFile(value)) {
|
|
2560
|
-
const attachment = await
|
|
2560
|
+
const attachment = await chunk7VOMQUIX_cjs.upload(client, value, {
|
|
2561
2561
|
filename: value.name
|
|
2562
2562
|
});
|
|
2563
2563
|
return attachment.rid;
|
|
@@ -2613,11 +2613,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
2613
2613
|
}
|
|
2614
2614
|
case "objectSet":
|
|
2615
2615
|
case "interfaceObjectSet": {
|
|
2616
|
-
if (
|
|
2616
|
+
if (chunk7VOMQUIX_cjs.isWireObjectSet(value)) {
|
|
2617
2617
|
return value;
|
|
2618
2618
|
}
|
|
2619
|
-
if (
|
|
2620
|
-
return
|
|
2619
|
+
if (chunk7VOMQUIX_cjs.isObjectSet(value)) {
|
|
2620
|
+
return chunk7VOMQUIX_cjs.getWireObjectSet(value);
|
|
2621
2621
|
}
|
|
2622
2622
|
break;
|
|
2623
2623
|
}
|
|
@@ -2662,7 +2662,7 @@ async function applyQuery(client, query, params) {
|
|
|
2662
2662
|
if (client.flushEdits != null) {
|
|
2663
2663
|
await client.flushEdits();
|
|
2664
2664
|
}
|
|
2665
|
-
const response = await execute(
|
|
2665
|
+
const response = await execute(chunk7VOMQUIX_cjs.addUserAgentAndRequestContextHeaders(chunk7VOMQUIX_cjs.augmentRequestContext(client, (_) => ({
|
|
2666
2666
|
finalMethodCall: "applyQuery"
|
|
2667
2667
|
})), query), await client.ontologyRid, query.apiName, {
|
|
2668
2668
|
parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
|
|
@@ -2708,10 +2708,10 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2708
2708
|
return responseValue;
|
|
2709
2709
|
}
|
|
2710
2710
|
case "attachment": {
|
|
2711
|
-
return
|
|
2711
|
+
return chunk7VOMQUIX_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
2712
2712
|
}
|
|
2713
2713
|
case "mediaReference": {
|
|
2714
|
-
return
|
|
2714
|
+
return chunk7VOMQUIX_cjs.createMediaFromReferenceInternal(client, responseValue);
|
|
2715
2715
|
}
|
|
2716
2716
|
case "object": {
|
|
2717
2717
|
const def = definitions.get(responseDataType.object);
|
|
@@ -2733,7 +2733,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2733
2733
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
2734
2734
|
}
|
|
2735
2735
|
if (typeof responseValue === "string") {
|
|
2736
|
-
return
|
|
2736
|
+
return chunk7VOMQUIX_cjs.createObjectSet(def, client, {
|
|
2737
2737
|
type: "intersect",
|
|
2738
2738
|
objectSets: [{
|
|
2739
2739
|
type: "base",
|
|
@@ -2744,7 +2744,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2744
2744
|
}]
|
|
2745
2745
|
});
|
|
2746
2746
|
}
|
|
2747
|
-
return
|
|
2747
|
+
return chunk7VOMQUIX_cjs.createObjectSet(def, client, responseValue);
|
|
2748
2748
|
}
|
|
2749
2749
|
case "struct": {
|
|
2750
2750
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -2939,7 +2939,7 @@ function createClientInternal(objectSetFactory, transactionRid, flushEdits, scen
|
|
|
2939
2939
|
ontologyRid
|
|
2940
2940
|
}, baseUrl, tokenProvider, {
|
|
2941
2941
|
...options,
|
|
2942
|
-
logger: options?.logger ?? new
|
|
2942
|
+
logger: options?.logger ?? new chunk7VOMQUIX_cjs.MinimalLogger(),
|
|
2943
2943
|
transactionId: transactionRid,
|
|
2944
2944
|
flushEdits,
|
|
2945
2945
|
scenarioRid,
|
|
@@ -2979,7 +2979,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2979
2979
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2980
2980
|
return {
|
|
2981
2981
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2982
|
-
return await
|
|
2982
|
+
return await chunk7VOMQUIX_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2983
2983
|
}
|
|
2984
2984
|
};
|
|
2985
2985
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -3003,10 +3003,10 @@ function createClientFromContext(clientCtx) {
|
|
|
3003
3003
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
3004
3004
|
return {
|
|
3005
3005
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
3006
|
-
return await
|
|
3006
|
+
return await chunk7VOMQUIX_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
3007
3007
|
},
|
|
3008
3008
|
fetchPageByRidNoType: async (rids, options) => {
|
|
3009
|
-
return await
|
|
3009
|
+
return await chunk7VOMQUIX_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
3010
3010
|
}
|
|
3011
3011
|
};
|
|
3012
3012
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet.name:
|
|
@@ -3050,7 +3050,7 @@ function createClientFromContext(clientCtx) {
|
|
|
3050
3050
|
[symbolClientContext2]: {
|
|
3051
3051
|
value: clientCtx
|
|
3052
3052
|
},
|
|
3053
|
-
[
|
|
3053
|
+
[chunk7VOMQUIX_cjs.additionalContext]: {
|
|
3054
3054
|
value: clientCtx
|
|
3055
3055
|
},
|
|
3056
3056
|
fetchMetadata: {
|
|
@@ -3059,10 +3059,10 @@ function createClientFromContext(clientCtx) {
|
|
|
3059
3059
|
});
|
|
3060
3060
|
return client;
|
|
3061
3061
|
}
|
|
3062
|
-
var createClient = createClientInternal.bind(void 0,
|
|
3063
|
-
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(
|
|
3064
|
-
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(
|
|
3065
|
-
var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(
|
|
3062
|
+
var createClient = createClientInternal.bind(void 0, chunk7VOMQUIX_cjs.createObjectSet, void 0, void 0, void 0, void 0);
|
|
3063
|
+
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunk7VOMQUIX_cjs.createObjectSet, transactionRid, flushEdits, void 0, void 0, ...args);
|
|
3064
|
+
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(chunk7VOMQUIX_cjs.createObjectSet, void 0, void 0, void 0, createSubscriptionConnection, ...args);
|
|
3065
|
+
var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(chunk7VOMQUIX_cjs.createObjectSet, void 0, void 0, scenarioRid, void 0, ...args);
|
|
3066
3066
|
function createWithRid(rids) {
|
|
3067
3067
|
const withRid = {
|
|
3068
3068
|
type: "static",
|
|
@@ -3092,5 +3092,5 @@ exports.createOsdkObject = createOsdkObject;
|
|
|
3092
3092
|
exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
|
|
3093
3093
|
exports.getDefType = getDefType;
|
|
3094
3094
|
exports.isObjectSpecifiersObject = isObjectSpecifiersObject;
|
|
3095
|
-
//# sourceMappingURL=chunk-
|
|
3096
|
-
//# sourceMappingURL=chunk-
|
|
3095
|
+
//# sourceMappingURL=chunk-DPWQXPBJ.cjs.map
|
|
3096
|
+
//# sourceMappingURL=chunk-DPWQXPBJ.cjs.map
|