@osdk/client 2.59.0 → 2.59.1-main-e879ad72ab90abfe5e9a17509e8f8a5112d320ff
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 +11 -0
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/object/fetchPage.js +1 -0
- package/build/browser/object/fetchPage.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/cjs/{chunk-UVDNMTHI.cjs → chunk-2DZAEW6I.cjs} +3 -2
- package/build/cjs/chunk-2DZAEW6I.cjs.map +1 -0
- package/build/cjs/{chunk-2TKPZIW3.cjs → chunk-CK44NIFX.cjs} +8 -8
- package/build/cjs/{chunk-2TKPZIW3.cjs.map → chunk-CK44NIFX.cjs.map} +1 -1
- package/build/cjs/{chunk-UNIBPL7K.cjs → chunk-GE5QOLOL.cjs} +45 -45
- package/build/cjs/chunk-GE5QOLOL.cjs.map +1 -0
- package/build/cjs/{chunk-B3G4DXXU.cjs → chunk-XMYQ7I2H.cjs} +79 -79
- package/build/cjs/{chunk-B3G4DXXU.cjs.map → chunk-XMYQ7I2H.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/object/fetchPage.js +1 -0
- package/build/esm/object/fetchPage.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 +8 -8
- package/build/cjs/chunk-UNIBPL7K.cjs.map +0 -1
- package/build/cjs/chunk-UVDNMTHI.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2DZAEW6I_cjs = require('./chunk-2DZAEW6I.cjs');
|
|
4
4
|
var chunkE2U5O543_cjs = require('./chunk-E2U5O543.cjs');
|
|
5
5
|
var chunkI2SCCYG7_cjs = require('./chunk-I2SCCYG7.cjs');
|
|
6
6
|
var chunkIWUIN6JJ_cjs = require('./chunk-IWUIN6JJ.cjs');
|
|
@@ -194,7 +194,7 @@ function isScenarioClient(value) {
|
|
|
194
194
|
return value != null && (typeof value === "object" || typeof value === "function") && typeof value.getScenarioReference === "function";
|
|
195
195
|
}
|
|
196
196
|
function buildScenarioClient(parent, scenarioRid) {
|
|
197
|
-
const ctx = parent[
|
|
197
|
+
const ctx = parent[chunk2DZAEW6I_cjs.additionalContext];
|
|
198
198
|
if (ctx.transactionId != null) {
|
|
199
199
|
console.warn("withScenario / createScenario: the supplied client has an active transaction. Ignoring the transaction and scoping to the scenario instead.");
|
|
200
200
|
}
|
|
@@ -205,7 +205,7 @@ function buildScenarioClient(parent, scenarioRid) {
|
|
|
205
205
|
logger: ctx.logger,
|
|
206
206
|
UNSTABLE_DO_NOT_USE_BRANCH: ctx.branch
|
|
207
207
|
}, ctx.fetch);
|
|
208
|
-
const innerCtx = inner[
|
|
208
|
+
const innerCtx = inner[chunk2DZAEW6I_cjs.additionalContext];
|
|
209
209
|
async function getEditedEntityTypes() {
|
|
210
210
|
const ontologyRid = await innerCtx.ontologyRid;
|
|
211
211
|
const response = await OntologyScenario_exports.listScenarioEditedEntityTypes(innerCtx, ontologyRid, scenarioRid, {
|
|
@@ -377,13 +377,13 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
377
377
|
return Promise.all(promiseArray);
|
|
378
378
|
}
|
|
379
379
|
if (isAttachmentUpload(value)) {
|
|
380
|
-
const attachment = await
|
|
380
|
+
const attachment = await chunk2DZAEW6I_cjs.upload(client, value.data, {
|
|
381
381
|
filename: value.name
|
|
382
382
|
});
|
|
383
383
|
return await toDataValue(attachment.rid, client);
|
|
384
384
|
}
|
|
385
385
|
if (isAttachmentFile(value)) {
|
|
386
|
-
const attachment = await
|
|
386
|
+
const attachment = await chunk2DZAEW6I_cjs.upload(client, value, {
|
|
387
387
|
filename: value.name
|
|
388
388
|
});
|
|
389
389
|
return await toDataValue(attachment.rid, client);
|
|
@@ -406,11 +406,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
406
406
|
if (isObjectSpecifiersObject(value)) {
|
|
407
407
|
return await toDataValue(value.$primaryKey, client);
|
|
408
408
|
}
|
|
409
|
-
if (
|
|
409
|
+
if (chunk2DZAEW6I_cjs.isWireObjectSet(value)) {
|
|
410
410
|
return value;
|
|
411
411
|
}
|
|
412
|
-
if (
|
|
413
|
-
return
|
|
412
|
+
if (chunk2DZAEW6I_cjs.isObjectSet(value)) {
|
|
413
|
+
return chunk2DZAEW6I_cjs.getWireObjectSet(value);
|
|
414
414
|
}
|
|
415
415
|
if (isInterfaceActionParam(value)) {
|
|
416
416
|
return {
|
|
@@ -433,7 +433,7 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
433
433
|
|
|
434
434
|
// src/actions/applyAction.ts
|
|
435
435
|
async function applyAction(client, action, parameters, options = {}) {
|
|
436
|
-
const clientWithHeaders =
|
|
436
|
+
const clientWithHeaders = chunk2DZAEW6I_cjs.addUserAgentAndRequestContextHeaders(chunk2DZAEW6I_cjs.augmentRequestContext(client, (_) => ({
|
|
437
437
|
finalMethodCall: "applyAction"
|
|
438
438
|
})), action);
|
|
439
439
|
if (Array.isArray(parameters)) {
|
|
@@ -753,7 +753,7 @@ var MediaReferencePropertyImpl = class {
|
|
|
753
753
|
ReadToken: token
|
|
754
754
|
} : void 0);
|
|
755
755
|
return {
|
|
756
|
-
itemMetadata:
|
|
756
|
+
itemMetadata: chunk2DZAEW6I_cjs.validateMediaItemMetadata(raw)
|
|
757
757
|
};
|
|
758
758
|
}
|
|
759
759
|
getMediaReference() {
|
|
@@ -1181,8 +1181,8 @@ function get$link(holder) {
|
|
|
1181
1181
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1182
1182
|
}).pivotTo(linkName);
|
|
1183
1183
|
const value = !linkDef.multiplicity ? {
|
|
1184
|
-
fetchOne: (options) =>
|
|
1185
|
-
fetchOneWithErrors: (options) =>
|
|
1184
|
+
fetchOne: (options) => chunk2DZAEW6I_cjs.fetchSingle(client, objDef, options ?? {}, chunk2DZAEW6I_cjs.getWireObjectSet(objectSet)),
|
|
1185
|
+
fetchOneWithErrors: (options) => chunk2DZAEW6I_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunk2DZAEW6I_cjs.getWireObjectSet(objectSet))
|
|
1186
1186
|
} : objectSet;
|
|
1187
1187
|
return [linkName, value];
|
|
1188
1188
|
})));
|
|
@@ -1205,8 +1205,8 @@ function get$linkForInterface(holder) {
|
|
|
1205
1205
|
apiName: linkDef.targetTypeApiName
|
|
1206
1206
|
};
|
|
1207
1207
|
const value = !linkDef.multiplicity ? {
|
|
1208
|
-
fetchOne: (options) =>
|
|
1209
|
-
fetchOneWithErrors: (options) =>
|
|
1208
|
+
fetchOne: (options) => chunk2DZAEW6I_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunk2DZAEW6I_cjs.getWireObjectSet(objectSet)),
|
|
1209
|
+
fetchOneWithErrors: (options) => chunk2DZAEW6I_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunk2DZAEW6I_cjs.getWireObjectSet(objectSet))
|
|
1210
1210
|
} : objectSet;
|
|
1211
1211
|
return [linkName, value];
|
|
1212
1212
|
})));
|
|
@@ -1234,7 +1234,7 @@ function extractValueByImplementation(underlying, impl) {
|
|
|
1234
1234
|
}
|
|
1235
1235
|
}
|
|
1236
1236
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1237
|
-
const [objApiNamespace] =
|
|
1237
|
+
const [objApiNamespace] = chunk2DZAEW6I_cjs.extractNamespace(interfaceDef.apiName);
|
|
1238
1238
|
const objDef = underlying[ObjectDefRef];
|
|
1239
1239
|
return Object.freeze(Object.defineProperties({}, {
|
|
1240
1240
|
// first to minimize hidden classes
|
|
@@ -1297,7 +1297,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1297
1297
|
value: interfaceDef
|
|
1298
1298
|
},
|
|
1299
1299
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1300
|
-
const [apiNamespace, apiName] =
|
|
1300
|
+
const [apiNamespace, apiName] = chunk2DZAEW6I_cjs.extractNamespace(p);
|
|
1301
1301
|
const exposedName = apiNamespace === objApiNamespace ? apiName : p;
|
|
1302
1302
|
const impl = objDef.interfaceImplementations?.[interfaceDef.apiName]?.[p];
|
|
1303
1303
|
if (impl != null) {
|
|
@@ -1346,7 +1346,7 @@ function remapPropertySecuritiesForInterface(underlyingSecurities, objDef, inter
|
|
|
1346
1346
|
}
|
|
1347
1347
|
const interfacePropName = inverseMap[objPropName];
|
|
1348
1348
|
if (interfacePropName == null) continue;
|
|
1349
|
-
const [apiNamespace, apiName] =
|
|
1349
|
+
const [apiNamespace, apiName] = chunk2DZAEW6I_cjs.extractNamespace(interfacePropName);
|
|
1350
1350
|
const key = apiNamespace === objApiNamespace ? apiName : interfacePropName;
|
|
1351
1351
|
remapped[key] = underlyingSecurities[objPropName];
|
|
1352
1352
|
}
|
|
@@ -1511,9 +1511,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1511
1511
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1512
1512
|
case "attachment":
|
|
1513
1513
|
if (Array.isArray(rawValue)) {
|
|
1514
|
-
return rawValue.map((a) =>
|
|
1514
|
+
return rawValue.map((a) => chunk2DZAEW6I_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1515
1515
|
} else {
|
|
1516
|
-
return
|
|
1516
|
+
return chunk2DZAEW6I_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1517
1517
|
}
|
|
1518
1518
|
default:
|
|
1519
1519
|
process.env.NODE_ENV !== "production" ? invariant3__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant3__default.default(false) ;
|
|
@@ -1529,9 +1529,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1529
1529
|
}
|
|
1530
1530
|
if (propDef.type === "attachment") {
|
|
1531
1531
|
if (Array.isArray(rawValue)) {
|
|
1532
|
-
return rawValue.map((a) =>
|
|
1532
|
+
return rawValue.map((a) => chunk2DZAEW6I_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1533
1533
|
}
|
|
1534
|
-
return
|
|
1534
|
+
return chunk2DZAEW6I_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1535
1535
|
}
|
|
1536
1536
|
if (propDef.type === "cipherText") {
|
|
1537
1537
|
return new CipherTextPropertyImpl({
|
|
@@ -1884,11 +1884,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1884
1884
|
};
|
|
1885
1885
|
|
|
1886
1886
|
// src/util/UserAgent.ts
|
|
1887
|
-
var USER_AGENT = `osdk-client/${"2.59.
|
|
1888
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.59.
|
|
1887
|
+
var USER_AGENT = `osdk-client/${"2.59.1-main-e879ad72ab90abfe5e9a17509e8f8a5112d320ff"}`;
|
|
1888
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.59.1-main-e879ad72ab90abfe5e9a17509e8f8a5112d320ff"}`;
|
|
1889
1889
|
|
|
1890
1890
|
// src/createMinimalClient.ts
|
|
1891
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1891
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunk2DZAEW6I_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1892
1892
|
if (process.env.NODE_ENV !== "production") {
|
|
1893
1893
|
try {
|
|
1894
1894
|
new URL(baseUrl);
|
|
@@ -2566,13 +2566,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
2566
2566
|
switch (desiredType.type) {
|
|
2567
2567
|
case "attachment": {
|
|
2568
2568
|
if (isAttachmentUpload(value)) {
|
|
2569
|
-
const attachment = await
|
|
2569
|
+
const attachment = await chunk2DZAEW6I_cjs.upload(client, value.data, {
|
|
2570
2570
|
filename: value.name
|
|
2571
2571
|
});
|
|
2572
2572
|
return attachment.rid;
|
|
2573
2573
|
}
|
|
2574
2574
|
if (isAttachmentFile(value)) {
|
|
2575
|
-
const attachment = await
|
|
2575
|
+
const attachment = await chunk2DZAEW6I_cjs.upload(client, value, {
|
|
2576
2576
|
filename: value.name
|
|
2577
2577
|
});
|
|
2578
2578
|
return attachment.rid;
|
|
@@ -2627,11 +2627,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
2627
2627
|
}
|
|
2628
2628
|
case "objectSet":
|
|
2629
2629
|
case "interfaceObjectSet": {
|
|
2630
|
-
if (
|
|
2630
|
+
if (chunk2DZAEW6I_cjs.isWireObjectSet(value)) {
|
|
2631
2631
|
return value;
|
|
2632
2632
|
}
|
|
2633
|
-
if (
|
|
2634
|
-
return
|
|
2633
|
+
if (chunk2DZAEW6I_cjs.isObjectSet(value)) {
|
|
2634
|
+
return chunk2DZAEW6I_cjs.getWireObjectSet(value);
|
|
2635
2635
|
}
|
|
2636
2636
|
break;
|
|
2637
2637
|
}
|
|
@@ -2676,7 +2676,7 @@ async function applyQuery(client, query, params) {
|
|
|
2676
2676
|
if (client.flushEdits != null) {
|
|
2677
2677
|
await client.flushEdits();
|
|
2678
2678
|
}
|
|
2679
|
-
const response = await execute(
|
|
2679
|
+
const response = await execute(chunk2DZAEW6I_cjs.addUserAgentAndRequestContextHeaders(chunk2DZAEW6I_cjs.augmentRequestContext(client, (_) => ({
|
|
2680
2680
|
finalMethodCall: "applyQuery"
|
|
2681
2681
|
})), query), await client.ontologyRid, query.apiName, {
|
|
2682
2682
|
parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
|
|
@@ -2722,10 +2722,10 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2722
2722
|
return responseValue;
|
|
2723
2723
|
}
|
|
2724
2724
|
case "attachment": {
|
|
2725
|
-
return
|
|
2725
|
+
return chunk2DZAEW6I_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
2726
2726
|
}
|
|
2727
2727
|
case "mediaReference": {
|
|
2728
|
-
return
|
|
2728
|
+
return chunk2DZAEW6I_cjs.createMediaFromReferenceInternal(client, responseValue);
|
|
2729
2729
|
}
|
|
2730
2730
|
case "object": {
|
|
2731
2731
|
const def = definitions.get(responseDataType.object);
|
|
@@ -2747,7 +2747,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2747
2747
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
2748
2748
|
}
|
|
2749
2749
|
if (typeof responseValue === "string") {
|
|
2750
|
-
return
|
|
2750
|
+
return chunk2DZAEW6I_cjs.createObjectSet(def, client, {
|
|
2751
2751
|
type: "intersect",
|
|
2752
2752
|
objectSets: [{
|
|
2753
2753
|
type: "base",
|
|
@@ -2758,7 +2758,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2758
2758
|
}]
|
|
2759
2759
|
});
|
|
2760
2760
|
}
|
|
2761
|
-
return
|
|
2761
|
+
return chunk2DZAEW6I_cjs.createObjectSet(def, client, responseValue);
|
|
2762
2762
|
}
|
|
2763
2763
|
case "struct": {
|
|
2764
2764
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -2953,7 +2953,7 @@ function createClientInternal(objectSetFactory, transactionRid, flushEdits, scen
|
|
|
2953
2953
|
ontologyRid
|
|
2954
2954
|
}, baseUrl, tokenProvider, {
|
|
2955
2955
|
...options,
|
|
2956
|
-
logger: options?.logger ?? new
|
|
2956
|
+
logger: options?.logger ?? new chunk2DZAEW6I_cjs.MinimalLogger(),
|
|
2957
2957
|
transactionId: transactionRid,
|
|
2958
2958
|
flushEdits,
|
|
2959
2959
|
scenarioRid,
|
|
@@ -2993,16 +2993,16 @@ function createClientFromContext(clientCtx) {
|
|
|
2993
2993
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2994
2994
|
return {
|
|
2995
2995
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2996
|
-
return await
|
|
2996
|
+
return await chunk2DZAEW6I_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2997
2997
|
}
|
|
2998
2998
|
};
|
|
2999
2999
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
3000
3000
|
return {
|
|
3001
3001
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
3002
|
-
return await
|
|
3002
|
+
return await chunk2DZAEW6I_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
3003
3003
|
},
|
|
3004
3004
|
fetchPageByRidNoType: async (rids, options) => {
|
|
3005
|
-
return await
|
|
3005
|
+
return await chunk2DZAEW6I_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
3006
3006
|
}
|
|
3007
3007
|
};
|
|
3008
3008
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet.name:
|
|
@@ -3046,7 +3046,7 @@ function createClientFromContext(clientCtx) {
|
|
|
3046
3046
|
[symbolClientContext2]: {
|
|
3047
3047
|
value: clientCtx
|
|
3048
3048
|
},
|
|
3049
|
-
[
|
|
3049
|
+
[chunk2DZAEW6I_cjs.additionalContext]: {
|
|
3050
3050
|
value: clientCtx
|
|
3051
3051
|
},
|
|
3052
3052
|
fetchMetadata: {
|
|
@@ -3055,10 +3055,10 @@ function createClientFromContext(clientCtx) {
|
|
|
3055
3055
|
});
|
|
3056
3056
|
return client;
|
|
3057
3057
|
}
|
|
3058
|
-
var createClient = createClientInternal.bind(void 0,
|
|
3059
|
-
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(
|
|
3060
|
-
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(
|
|
3061
|
-
var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(
|
|
3058
|
+
var createClient = createClientInternal.bind(void 0, chunk2DZAEW6I_cjs.createObjectSet, void 0, void 0, void 0, void 0);
|
|
3059
|
+
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunk2DZAEW6I_cjs.createObjectSet, transactionRid, flushEdits, void 0, void 0, ...args);
|
|
3060
|
+
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(chunk2DZAEW6I_cjs.createObjectSet, void 0, void 0, void 0, createSubscriptionConnection, ...args);
|
|
3061
|
+
var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(chunk2DZAEW6I_cjs.createObjectSet, void 0, void 0, scenarioRid, void 0, ...args);
|
|
3062
3062
|
function createWithRid(rids) {
|
|
3063
3063
|
const withRid = {
|
|
3064
3064
|
type: "static",
|
|
@@ -3089,5 +3089,5 @@ exports.createOsdkObject = createOsdkObject;
|
|
|
3089
3089
|
exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
|
|
3090
3090
|
exports.getDefType = getDefType;
|
|
3091
3091
|
exports.isObjectSpecifiersObject = isObjectSpecifiersObject;
|
|
3092
|
-
//# sourceMappingURL=chunk-
|
|
3093
|
-
//# sourceMappingURL=chunk-
|
|
3092
|
+
//# sourceMappingURL=chunk-GE5QOLOL.cjs.map
|
|
3093
|
+
//# sourceMappingURL=chunk-GE5QOLOL.cjs.map
|