@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.
@@ -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 chunk4O6723FC_cjs = require('./chunk-4O6723FC.cjs');
8
- var chunkNAA6LK6A_cjs = require('./chunk-NAA6LK6A.cjs');
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[chunkNAA6LK6A_cjs.additionalContext];
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[chunkNAA6LK6A_cjs.additionalContext];
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) => chunk4O6723FC_cjs.isAttachmentUpload(dataValue) || chunk4O6723FC_cjs.isAttachmentFile(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 (chunk4O6723FC_cjs.isAttachmentUpload(value)) {
298
- const attachment = await chunkNAA6LK6A_cjs.upload(client, value.data, {
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 (chunk4O6723FC_cjs.isAttachmentFile(value)) {
304
- const attachment = await chunkNAA6LK6A_cjs.upload(client, value, {
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 (chunk4O6723FC_cjs.isMediaUpload(value)) {
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 (chunk4O6723FC_cjs.isMedia(value)) {
316
+ if (chunkLIM24DBZ_cjs.isMedia(value)) {
317
317
  return value.getMediaReference();
318
318
  }
319
- if (chunk4O6723FC_cjs.isMediaReference(value)) {
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 (chunk4O6723FC_cjs.isObjectSpecifiersObject(value)) {
325
+ if (chunkLIM24DBZ_cjs.isObjectSpecifiersObject(value)) {
326
326
  return await toDataValue(value.$primaryKey, client);
327
327
  }
328
- if (chunkNAA6LK6A_cjs.isWireObjectSet(value)) {
328
+ if (chunkFVEA6DER_cjs.isWireObjectSet(value)) {
329
329
  return value;
330
330
  }
331
- if (chunkNAA6LK6A_cjs.isObjectSet(value)) {
332
- return chunkNAA6LK6A_cjs.getWireObjectSet(value);
331
+ if (chunkFVEA6DER_cjs.isObjectSet(value)) {
332
+ return chunkFVEA6DER_cjs.getWireObjectSet(value);
333
333
  }
334
- if (chunk4O6723FC_cjs.isInterfaceActionParam(value)) {
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 = chunkNAA6LK6A_cjs.addUserAgentAndRequestContextHeaders(chunkNAA6LK6A_cjs.augmentRequestContext(client, (_) => ({
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 chunk4O6723FC_cjs.parseStreamedResponse(chunk4O6723FC_cjs.iterateReadableStream(reader))) {
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: chunkNAA6LK6A_cjs.validateMediaItemMetadata(raw)
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) => chunkNAA6LK6A_cjs.fetchSingle(client, objDef, options ?? {}, chunkNAA6LK6A_cjs.getWireObjectSet(objectSet)),
1032
- fetchOneWithErrors: (options) => chunkNAA6LK6A_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkNAA6LK6A_cjs.getWireObjectSet(objectSet))
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) => chunkNAA6LK6A_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkNAA6LK6A_cjs.getWireObjectSet(objectSet)),
1056
- fetchOneWithErrors: (options) => chunkNAA6LK6A_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkNAA6LK6A_cjs.getWireObjectSet(objectSet))
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] = chunkNAA6LK6A_cjs.extractNamespace(interfaceDef.apiName);
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] = chunkNAA6LK6A_cjs.extractNamespace(p);
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] = chunkNAA6LK6A_cjs.extractNamespace(interfacePropName);
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 chunk4O6723FC_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
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) => chunkNAA6LK6A_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1361
+ return rawValue.map((a) => chunkFVEA6DER_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1362
1362
  } else {
1363
- return chunkNAA6LK6A_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
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) => chunkNAA6LK6A_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1379
+ return rawValue.map((a) => chunkFVEA6DER_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1380
1380
  }
1381
- return chunkNAA6LK6A_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
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.46.0"}`;
1735
- var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.46.0"}`;
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 = chunkNAA6LK6A_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
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 = chunk4O6723FC_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
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-TWNEY45A.cjs');
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 chunkNAA6LK6A_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
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 chunkNAA6LK6A_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2414
+ return await chunkFVEA6DER_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2415
2415
  },
2416
2416
  fetchPageByRidNoType: async (rids, options) => {
2417
- return await chunkNAA6LK6A_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
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
- [chunkNAA6LK6A_cjs.additionalContext]: {
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, chunkNAA6LK6A_cjs.createObjectSet, void 0, void 0, void 0, void 0);
2471
- var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkNAA6LK6A_cjs.createObjectSet, transactionRid, flushEdits, void 0, void 0, ...args);
2472
- var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(chunkNAA6LK6A_cjs.createObjectSet, void 0, void 0, void 0, createSubscriptionConnection, ...args);
2473
- var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(chunkNAA6LK6A_cjs.createObjectSet, void 0, void 0, scenarioRid, void 0, ...args);
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-GRALTYQI.cjs.map
2498
- //# sourceMappingURL=chunk-GRALTYQI.cjs.map
2497
+ //# sourceMappingURL=chunk-L6WZ4TZD.cjs.map
2498
+ //# sourceMappingURL=chunk-L6WZ4TZD.cjs.map