@osdk/client 2.53.0 → 2.53.1-main-8bd0053fc10e5e255c19c5974e6caf3b5d8ec905
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/{chunk-SYOUIMHV.cjs → chunk-FNDZYKIG.cjs} +79 -79
- package/build/cjs/{chunk-SYOUIMHV.cjs.map → chunk-FNDZYKIG.cjs.map} +1 -1
- package/build/cjs/{chunk-E5UOKLCW.cjs → chunk-NE4HFRFJ.cjs} +2 -2
- package/build/cjs/{chunk-E5UOKLCW.cjs.map → chunk-NE4HFRFJ.cjs.map} +1 -1
- package/build/cjs/{chunk-BXUXE2VL.cjs → chunk-PHZZ7DBS.cjs} +8 -8
- package/build/cjs/{chunk-BXUXE2VL.cjs.map → chunk-PHZZ7DBS.cjs.map} +1 -1
- package/build/cjs/{chunk-B7IRP73C.cjs → chunk-ZBJFDSXR.cjs} +45 -45
- package/build/cjs/chunk-ZBJFDSXR.cjs.map +1 -0
- 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/esm/util/UserAgent.js.map +1 -1
- package/build/types/Client.d.ts +1 -1
- package/package.json +5 -5
- package/build/cjs/chunk-B7IRP73C.cjs.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkZBJFDSXR_cjs = require('./chunk-ZBJFDSXR.cjs');
|
|
4
|
+
var chunkNE4HFRFJ_cjs = require('./chunk-NE4HFRFJ.cjs');
|
|
5
5
|
|
|
6
6
|
// src/scenarios/createScenario.ts
|
|
7
7
|
async function createScenario(client) {
|
|
8
|
-
const ctx = client[
|
|
8
|
+
const ctx = client[chunkNE4HFRFJ_cjs.additionalContext];
|
|
9
9
|
if (ctx.scenarioRid != null) {
|
|
10
10
|
throw new Error("createScenario: the supplied client already has an active scenario. Scenarios cannot be nested.");
|
|
11
11
|
}
|
|
12
|
-
const response = await
|
|
12
|
+
const response = await chunkZBJFDSXR_cjs.OntologyScenario_exports.createScenario(ctx, await ctx.ontologyRid, ctx.branch != null ? {
|
|
13
13
|
base: {
|
|
14
14
|
type: "branch",
|
|
15
15
|
branch: ctx.branch
|
|
@@ -17,15 +17,15 @@ async function createScenario(client) {
|
|
|
17
17
|
} : {}, {
|
|
18
18
|
preview: true
|
|
19
19
|
});
|
|
20
|
-
return
|
|
20
|
+
return chunkZBJFDSXR_cjs.buildScenarioClient(client, response.scenarioRid);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
// src/scenarios/withScenario.ts
|
|
24
24
|
function withScenario(client, scenarioRid) {
|
|
25
|
-
return
|
|
25
|
+
return chunkZBJFDSXR_cjs.buildScenarioClient(client, scenarioRid);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
exports.createScenario = createScenario;
|
|
29
29
|
exports.withScenario = withScenario;
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-PHZZ7DBS.cjs.map
|
|
31
|
+
//# sourceMappingURL=chunk-PHZZ7DBS.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/scenarios/createScenario.ts","../../src/scenarios/withScenario.ts"],"names":["additionalContext","OntologyScenario_exports","buildScenarioClient"],"mappings":";;;;;;AAuCA,eAAsB,eAAe,MAAA,EAAQ;AAC3C,EAAA,MAAM,GAAA,GAAM,OAAOA,mCAAiB,CAAA;AACpC,EAAA,IAAI,GAAA,CAAI,eAAe,IAAA,EAAM;AAC3B,IAAA,MAAM,IAAI,MAAM,iGAAiG,CAAA;AAAA,EACnH;AACA,EAAA,MAAM,QAAA,GAAW,MAAMC,0CAAA,CAAkB,cAAA,CAAe,GAAA,EAAK,MAAM,GAAA,CAAI,WAAA,EAAa,GAAA,CAAI,MAAA,IAAU,IAAA,GAAO;AAAA,IACvG,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,QAAA;AAAA,MACN,QAAQ,GAAA,CAAI;AAAA;AACd,GACF,GAAI,EAAC,EAAG;AAAA,IACN,OAAA,EAAS;AAAA,GACV,CAAA;AACD,EAAA,OAAOC,qCAAA,CAAoB,MAAA,EAAQ,QAAA,CAAS,WAAW,CAAA;AACzD;;;ACdO,SAAS,YAAA,CAAa,QAAQ,WAAA,EAAa;AAChD,EAAA,OAAOA,qCAAA,CAAoB,QAAQ,WAAW,CAAA;AAChD","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../../src/scenarios/createScenario.ts","../../src/scenarios/withScenario.ts"],"names":["additionalContext","OntologyScenario_exports","buildScenarioClient"],"mappings":";;;;;;AAuCA,eAAsB,eAAe,MAAA,EAAQ;AAC3C,EAAA,MAAM,GAAA,GAAM,OAAOA,mCAAiB,CAAA;AACpC,EAAA,IAAI,GAAA,CAAI,eAAe,IAAA,EAAM;AAC3B,IAAA,MAAM,IAAI,MAAM,iGAAiG,CAAA;AAAA,EACnH;AACA,EAAA,MAAM,QAAA,GAAW,MAAMC,0CAAA,CAAkB,cAAA,CAAe,GAAA,EAAK,MAAM,GAAA,CAAI,WAAA,EAAa,GAAA,CAAI,MAAA,IAAU,IAAA,GAAO;AAAA,IACvG,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,QAAA;AAAA,MACN,QAAQ,GAAA,CAAI;AAAA;AACd,GACF,GAAI,EAAC,EAAG;AAAA,IACN,OAAA,EAAS;AAAA,GACV,CAAA;AACD,EAAA,OAAOC,qCAAA,CAAoB,MAAA,EAAQ,QAAA,CAAS,WAAW,CAAA;AACzD;;;ACdO,SAAS,YAAA,CAAa,QAAQ,WAAA,EAAa;AAChD,EAAA,OAAOA,qCAAA,CAAoB,QAAQ,WAAW,CAAA;AAChD","file":"chunk-PHZZ7DBS.cjs","sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OntologyScenarios } from \"@osdk/foundry.ontologies\";\nimport { additionalContext } from \"../Client.js\";\nimport { buildScenarioClient } from \"./ScenarioClient.js\";\n\n/**\n * Mint a fresh ontology scenario and return a client scoped to it.\n *\n * @param client - The base {@link Client} to derive context (`baseUrl`, `ontologyRid`, `tokenProvider`, `branch`, …)\n * from. Throws at runtime if the client is already scoped to a scenario. If the client has an active transaction,\n * the transaction is ignored (a warning is logged) and the client is scoped to the new scenario. When the base\n * client has a branch set, the newly minted scenario uses that branch as its base.\n * @returns a {@link EXPERIMENTAL_ScenarioClient} bound to the freshly minted scenario RID.\n *\n * @beta This is an experimental, unstable feature subject to change.\n *\n * @example\n * ```ts\n * import { createScenario } from \"@osdk/client/unstable-do-not-use\";\n *\n * const scenario = await createScenario(client);\n * const scenarioRid = scenario.getScenarioReference();\n * ```\n */\nexport async function createScenario(client) {\n const ctx = client[additionalContext];\n if (ctx.scenarioRid != null) {\n throw new Error(\"createScenario: the supplied client already has an active scenario. Scenarios cannot be nested.\");\n }\n const response = await OntologyScenarios.createScenario(ctx, await ctx.ontologyRid, ctx.branch != null ? {\n base: {\n type: \"branch\",\n branch: ctx.branch\n }\n } : {}, {\n preview: true\n });\n return buildScenarioClient(client, response.scenarioRid);\n}","/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { buildScenarioClient } from \"./ScenarioClient.js\";\n\n/**\n * Attach to an existing ontology scenario. Synchronous — no network call is made. The returned client scopes all\n * subsequent operations (`fetchPage`, `applyAction`, `executeFunction`, etc.) to the given `scenarioRid`.\n *\n * @param client - The base {@link Client} to derive context (`baseUrl`, `ontologyRid`, `tokenProvider`, `branch`, …)\n * from. Throws at runtime if the client is already scoped to a scenario. If the client has an active transaction,\n * the transaction is ignored (a warning is logged) and the client is scoped to the scenario.\n * @param scenarioRid - The RID of the scenario to attach to.\n * @returns a {@link EXPERIMENTAL_ScenarioClient} bound to `scenarioRid`.\n *\n * @beta This is an experimental, unstable feature subject to change.\n *\n * @example\n * ```ts\n * import { withScenario } from \"@osdk/client/unstable-do-not-use\";\n *\n * const scenario = withScenario(client, \"ri.actions..scenario.abc\");\n * const page = await scenario(Doctor).fetchPage();\n * await scenario(Schedule).applyAction({ doctor: page.data[0], shift: \"AM\" });\n * ```\n */\nexport function withScenario(client, scenarioRid) {\n return buildScenarioClient(client, scenarioRid);\n}"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkIWUIN6JJ_cjs = require('./chunk-IWUIN6JJ.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkNE4HFRFJ_cjs = require('./chunk-NE4HFRFJ.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[chunkNE4HFRFJ_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[chunkNE4HFRFJ_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 chunkNE4HFRFJ_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 chunkNE4HFRFJ_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 (chunkNE4HFRFJ_cjs.isWireObjectSet(value)) {
|
|
393
393
|
return value;
|
|
394
394
|
}
|
|
395
|
-
if (
|
|
396
|
-
return
|
|
395
|
+
if (chunkNE4HFRFJ_cjs.isObjectSet(value)) {
|
|
396
|
+
return chunkNE4HFRFJ_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 = chunkNE4HFRFJ_cjs.addUserAgentAndRequestContextHeaders(chunkNE4HFRFJ_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: chunkNE4HFRFJ_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) => chunkNE4HFRFJ_cjs.fetchSingle(client, objDef, options ?? {}, chunkNE4HFRFJ_cjs.getWireObjectSet(objectSet)),
|
|
1170
|
+
fetchOneWithErrors: (options) => chunkNE4HFRFJ_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkNE4HFRFJ_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) => chunkNE4HFRFJ_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkNE4HFRFJ_cjs.getWireObjectSet(objectSet)),
|
|
1194
|
+
fetchOneWithErrors: (options) => chunkNE4HFRFJ_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkNE4HFRFJ_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] = chunkNE4HFRFJ_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] = chunkNE4HFRFJ_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] = chunkNE4HFRFJ_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) => chunkNE4HFRFJ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1500
1500
|
} else {
|
|
1501
|
-
return
|
|
1501
|
+
return chunkNE4HFRFJ_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) => chunkNE4HFRFJ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1518
1518
|
}
|
|
1519
|
-
return
|
|
1519
|
+
return chunkNE4HFRFJ_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.53.
|
|
1873
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.53.
|
|
1872
|
+
var USER_AGENT = `osdk-client/${"2.53.1-main-8bd0053fc10e5e255c19c5974e6caf3b5d8ec905"}`;
|
|
1873
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.53.1-main-8bd0053fc10e5e255c19c5974e6caf3b5d8ec905"}`;
|
|
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 = chunkNE4HFRFJ_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 chunkNE4HFRFJ_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 chunkNE4HFRFJ_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 (chunkNE4HFRFJ_cjs.isWireObjectSet(value)) {
|
|
2617
2617
|
return value;
|
|
2618
2618
|
}
|
|
2619
|
-
if (
|
|
2620
|
-
return
|
|
2619
|
+
if (chunkNE4HFRFJ_cjs.isObjectSet(value)) {
|
|
2620
|
+
return chunkNE4HFRFJ_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(chunkNE4HFRFJ_cjs.addUserAgentAndRequestContextHeaders(chunkNE4HFRFJ_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 chunkNE4HFRFJ_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
2712
2712
|
}
|
|
2713
2713
|
case "mediaReference": {
|
|
2714
|
-
return
|
|
2714
|
+
return chunkNE4HFRFJ_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 chunkNE4HFRFJ_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 chunkNE4HFRFJ_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 chunkNE4HFRFJ_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 chunkNE4HFRFJ_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 chunkNE4HFRFJ_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
3007
3007
|
},
|
|
3008
3008
|
fetchPageByRidNoType: async (rids, options) => {
|
|
3009
|
-
return await
|
|
3009
|
+
return await chunkNE4HFRFJ_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
|
+
[chunkNE4HFRFJ_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, chunkNE4HFRFJ_cjs.createObjectSet, void 0, void 0, void 0, void 0);
|
|
3063
|
+
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkNE4HFRFJ_cjs.createObjectSet, transactionRid, flushEdits, void 0, void 0, ...args);
|
|
3064
|
+
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(chunkNE4HFRFJ_cjs.createObjectSet, void 0, void 0, void 0, createSubscriptionConnection, ...args);
|
|
3065
|
+
var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(chunkNE4HFRFJ_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-ZBJFDSXR.cjs.map
|
|
3096
|
+
//# sourceMappingURL=chunk-ZBJFDSXR.cjs.map
|