@osdk/client 2.72.0 → 2.73.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.
Files changed (26) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/build/browser/Client.js +1 -1
  3. package/build/browser/Client.js.map +1 -1
  4. package/build/browser/util/UserAgent.js +2 -2
  5. package/build/cjs/{applyStreamingQuery-CN7NXX4A.cjs → applyStreamingQuery-FKYWPEUU.cjs} +8 -8
  6. package/build/cjs/{applyStreamingQuery-CN7NXX4A.cjs.map → applyStreamingQuery-FKYWPEUU.cjs.map} +1 -1
  7. package/build/cjs/{chunk-ZVGQ66VU.cjs → chunk-DPEZMSW2.cjs} +13 -13
  8. package/build/cjs/{chunk-ZVGQ66VU.cjs.map → chunk-DPEZMSW2.cjs.map} +1 -1
  9. package/build/cjs/{chunk-WBDUOV47.cjs → chunk-FLPBVSKK.cjs} +46 -46
  10. package/build/cjs/{chunk-WBDUOV47.cjs.map → chunk-FLPBVSKK.cjs.map} +1 -1
  11. package/build/cjs/{chunk-IGHO3GM6.cjs → chunk-IGVLXS2Y.cjs} +83 -83
  12. package/build/cjs/{chunk-IGHO3GM6.cjs.map → chunk-IGVLXS2Y.cjs.map} +1 -1
  13. package/build/cjs/{chunk-D6LIBHAQ.cjs → chunk-PTLM24GW.cjs} +2 -2
  14. package/build/cjs/{chunk-D6LIBHAQ.cjs.map → chunk-PTLM24GW.cjs.map} +1 -1
  15. package/build/cjs/{chunk-57EC6SQO.cjs → chunk-RYZGPQTZ.cjs} +8 -8
  16. package/build/cjs/{chunk-57EC6SQO.cjs.map → chunk-RYZGPQTZ.cjs.map} +1 -1
  17. package/build/cjs/index.cjs +11 -11
  18. package/build/cjs/public/experimental.cjs +9 -9
  19. package/build/cjs/public/internal.cjs +8 -8
  20. package/build/cjs/public/observable.cjs +5 -5
  21. package/build/cjs/public/unstable-do-not-use.cjs +16 -16
  22. package/build/esm/Client.js +1 -1
  23. package/build/esm/Client.js.map +1 -1
  24. package/build/esm/util/UserAgent.js +2 -2
  25. package/build/types/Client.d.ts +1 -1
  26. package/package.json +6 -6
@@ -2,8 +2,8 @@
2
2
 
3
3
  var chunkIBY4PG26_cjs = require('./chunk-IBY4PG26.cjs');
4
4
  var chunk6OIQ3CCD_cjs = require('./chunk-6OIQ3CCD.cjs');
5
- var chunkZVGQ66VU_cjs = require('./chunk-ZVGQ66VU.cjs');
6
- var chunkD6LIBHAQ_cjs = require('./chunk-D6LIBHAQ.cjs');
5
+ var chunkDPEZMSW2_cjs = require('./chunk-DPEZMSW2.cjs');
6
+ var chunkPTLM24GW_cjs = require('./chunk-PTLM24GW.cjs');
7
7
  var chunk4L3NEGLF_cjs = require('./chunk-4L3NEGLF.cjs');
8
8
  var chunkIWUIN6JJ_cjs = require('./chunk-IWUIN6JJ.cjs');
9
9
  var chunkQ7SFCCGT_cjs = require('./chunk-Q7SFCCGT.cjs');
@@ -154,7 +154,7 @@ function isScenarioClient(value) {
154
154
  return value != null && (typeof value === "object" || typeof value === "function") && typeof value.getScenarioReference === "function";
155
155
  }
156
156
  function buildScenarioClient(parent, scenarioRid) {
157
- const ctx = parent[chunkD6LIBHAQ_cjs.additionalContext];
157
+ const ctx = parent[chunkPTLM24GW_cjs.additionalContext];
158
158
  if (ctx.transactionId != null) {
159
159
  console.warn("withScenario / createScenario: the supplied client has an active transaction. Ignoring the transaction and scoping to the scenario instead.");
160
160
  }
@@ -168,7 +168,7 @@ function buildScenarioClient(parent, scenarioRid) {
168
168
  // resolved to no branch must stay on the default branch here too.
169
169
  UNSTABLE_DO_NOT_USE_BRANCH: ctx.branch ?? null
170
170
  }, ctx.fetch);
171
- const innerCtx = inner[chunkD6LIBHAQ_cjs.additionalContext];
171
+ const innerCtx = inner[chunkPTLM24GW_cjs.additionalContext];
172
172
  async function getEditedEntityTypes() {
173
173
  const ontologyRid = await innerCtx.ontologyRid;
174
174
  const response = await OntologyScenario_exports.listScenarioEditedEntityTypes(innerCtx, ontologyRid, scenarioRid, {
@@ -345,7 +345,7 @@ async function toDataValue(value, client, actionMetadata) {
345
345
  }
346
346
  if (Array.isArray(value) || value instanceof Set) {
347
347
  const values = Array.from(value);
348
- if (values.some((dataValue) => chunkZVGQ66VU_cjs.isAttachmentUpload(dataValue) || chunkZVGQ66VU_cjs.isAttachmentFile(dataValue))) {
348
+ if (values.some((dataValue) => chunkDPEZMSW2_cjs.isAttachmentUpload(dataValue) || chunkDPEZMSW2_cjs.isAttachmentFile(dataValue))) {
349
349
  const converted = [];
350
350
  for (const value2 of values) {
351
351
  converted.push(await toDataValue(value2, client));
@@ -355,43 +355,43 @@ async function toDataValue(value, client, actionMetadata) {
355
355
  const promiseArray = Array.from(value, async (innerValue) => await toDataValue(innerValue, client));
356
356
  return Promise.all(promiseArray);
357
357
  }
358
- if (chunkZVGQ66VU_cjs.isAttachmentUpload(value)) {
359
- const attachment = await chunkD6LIBHAQ_cjs.upload(client, value.data, {
358
+ if (chunkDPEZMSW2_cjs.isAttachmentUpload(value)) {
359
+ const attachment = await chunkPTLM24GW_cjs.upload(client, value.data, {
360
360
  filename: value.name
361
361
  });
362
362
  return await toDataValue(attachment.rid, client);
363
363
  }
364
- if (chunkZVGQ66VU_cjs.isAttachmentFile(value)) {
365
- const attachment = await chunkD6LIBHAQ_cjs.upload(client, value, {
364
+ if (chunkDPEZMSW2_cjs.isAttachmentFile(value)) {
365
+ const attachment = await chunkPTLM24GW_cjs.upload(client, value, {
366
366
  filename: value.name
367
367
  });
368
368
  return await toDataValue(attachment.rid, client);
369
369
  }
370
- if (chunkZVGQ66VU_cjs.isMediaUpload(value)) {
370
+ if (chunkDPEZMSW2_cjs.isMediaUpload(value)) {
371
371
  const mediaRef = await chunk4L3NEGLF_cjs.MediaSet_exports.uploadMedia(client, value.data, {
372
372
  filename: value.fileName
373
373
  });
374
374
  return await toDataValue(mediaRef, client);
375
375
  }
376
- if (chunkZVGQ66VU_cjs.isMedia(value)) {
376
+ if (chunkDPEZMSW2_cjs.isMedia(value)) {
377
377
  return value.getMediaReference();
378
378
  }
379
- if (chunkZVGQ66VU_cjs.isMediaReference(value)) {
379
+ if (chunkDPEZMSW2_cjs.isMediaReference(value)) {
380
380
  return value;
381
381
  }
382
382
  if (isOntologyObjectV2(value)) {
383
383
  return await toDataValue(value.__primaryKey, client);
384
384
  }
385
- if (chunkZVGQ66VU_cjs.isObjectSpecifiersObject(value)) {
385
+ if (chunkDPEZMSW2_cjs.isObjectSpecifiersObject(value)) {
386
386
  return await toDataValue(value.$primaryKey, client);
387
387
  }
388
- if (chunkD6LIBHAQ_cjs.isWireObjectSet(value)) {
388
+ if (chunkPTLM24GW_cjs.isWireObjectSet(value)) {
389
389
  return value;
390
390
  }
391
- if (chunkD6LIBHAQ_cjs.isObjectSet(value)) {
392
- return chunkD6LIBHAQ_cjs.getWireObjectSet(value);
391
+ if (chunkPTLM24GW_cjs.isObjectSet(value)) {
392
+ return chunkPTLM24GW_cjs.getWireObjectSet(value);
393
393
  }
394
- if (chunkZVGQ66VU_cjs.isInterfaceActionParam(value)) {
394
+ if (chunkDPEZMSW2_cjs.isInterfaceActionParam(value)) {
395
395
  return {
396
396
  objectTypeApiName: value.$objectType,
397
397
  primaryKeyValue: value.$primaryKey
@@ -412,7 +412,7 @@ async function toDataValue(value, client, actionMetadata) {
412
412
 
413
413
  // src/actions/applyAction.ts
414
414
  async function applyAction(client, action, parameters, options = {}) {
415
- const clientWithHeaders = chunkD6LIBHAQ_cjs.addUserAgentAndRequestContextHeaders(chunkD6LIBHAQ_cjs.augmentRequestContext(client, (_) => ({
415
+ const clientWithHeaders = chunkPTLM24GW_cjs.addUserAgentAndRequestContextHeaders(chunkPTLM24GW_cjs.augmentRequestContext(client, (_) => ({
416
416
  finalMethodCall: "applyAction"
417
417
  })), action);
418
418
  if (Array.isArray(parameters)) {
@@ -746,7 +746,7 @@ var MediaReferencePropertyImpl = class {
746
746
  ReadToken: token
747
747
  } : void 0);
748
748
  return {
749
- itemMetadata: chunkD6LIBHAQ_cjs.validateMediaItemMetadata(raw)
749
+ itemMetadata: chunkPTLM24GW_cjs.validateMediaItemMetadata(raw)
750
750
  };
751
751
  }
752
752
  getMediaReference() {
@@ -1174,8 +1174,8 @@ function get$link(holder) {
1174
1174
  [objDef.primaryKeyApiName]: rawObj.$primaryKey
1175
1175
  }).pivotTo(linkName);
1176
1176
  const value = !linkDef.multiplicity ? {
1177
- fetchOne: (options) => chunkD6LIBHAQ_cjs.fetchSingle(client, objDef, options ?? {}, chunkD6LIBHAQ_cjs.getWireObjectSet(objectSet)),
1178
- fetchOneWithErrors: (options) => chunkD6LIBHAQ_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkD6LIBHAQ_cjs.getWireObjectSet(objectSet))
1177
+ fetchOne: (options) => chunkPTLM24GW_cjs.fetchSingle(client, objDef, options ?? {}, chunkPTLM24GW_cjs.getWireObjectSet(objectSet)),
1178
+ fetchOneWithErrors: (options) => chunkPTLM24GW_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkPTLM24GW_cjs.getWireObjectSet(objectSet))
1179
1179
  } : objectSet;
1180
1180
  return [linkName, value];
1181
1181
  })));
@@ -1198,8 +1198,8 @@ function get$linkForInterface(holder) {
1198
1198
  apiName: linkDef.targetTypeApiName
1199
1199
  };
1200
1200
  const value = !linkDef.multiplicity ? {
1201
- fetchOne: (options) => chunkD6LIBHAQ_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkD6LIBHAQ_cjs.getWireObjectSet(objectSet)),
1202
- fetchOneWithErrors: (options) => chunkD6LIBHAQ_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkD6LIBHAQ_cjs.getWireObjectSet(objectSet))
1201
+ fetchOne: (options) => chunkPTLM24GW_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkPTLM24GW_cjs.getWireObjectSet(objectSet)),
1202
+ fetchOneWithErrors: (options) => chunkPTLM24GW_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkPTLM24GW_cjs.getWireObjectSet(objectSet))
1203
1203
  } : objectSet;
1204
1204
  return [linkName, value];
1205
1205
  })));
@@ -1244,7 +1244,7 @@ function isStruct(value) {
1244
1244
  return typeof value === "object" && value != null && !Array.isArray(value);
1245
1245
  }
1246
1246
  function createOsdkInterface(underlying, interfaceDef) {
1247
- const [objApiNamespace] = chunkD6LIBHAQ_cjs.extractNamespace(interfaceDef.apiName);
1247
+ const [objApiNamespace] = chunkPTLM24GW_cjs.extractNamespace(interfaceDef.apiName);
1248
1248
  const objDef = underlying[ObjectDefRef];
1249
1249
  const underlyingProperties = underlying;
1250
1250
  return Object.freeze(Object.defineProperties({}, {
@@ -1308,7 +1308,7 @@ function createOsdkInterface(underlying, interfaceDef) {
1308
1308
  value: interfaceDef
1309
1309
  },
1310
1310
  ...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
1311
- const [apiNamespace, apiName] = chunkD6LIBHAQ_cjs.extractNamespace(p);
1311
+ const [apiNamespace, apiName] = chunkPTLM24GW_cjs.extractNamespace(p);
1312
1312
  const exposedName = apiNamespace === objApiNamespace ? apiName : p;
1313
1313
  const impl = objDef.interfaceImplementations?.[interfaceDef.apiName]?.[p];
1314
1314
  if (impl != null) {
@@ -1357,7 +1357,7 @@ function remapPropertySecuritiesForInterface(underlyingSecurities, objDef, inter
1357
1357
  }
1358
1358
  const interfacePropName = inverseMap[objPropName];
1359
1359
  if (interfacePropName == null) continue;
1360
- const [apiNamespace, apiName] = chunkD6LIBHAQ_cjs.extractNamespace(interfacePropName);
1360
+ const [apiNamespace, apiName] = chunkPTLM24GW_cjs.extractNamespace(interfacePropName);
1361
1361
  const key = apiNamespace === objApiNamespace ? apiName : interfacePropName;
1362
1362
  remapped[key] = underlyingSecurities[objPropName];
1363
1363
  }
@@ -1450,7 +1450,7 @@ var basePropDefs = {
1450
1450
  $objectSpecifier: {
1451
1451
  get() {
1452
1452
  const rawObj = this[UnderlyingOsdkObject];
1453
- return chunkZVGQ66VU_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
1453
+ return chunkDPEZMSW2_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
1454
1454
  },
1455
1455
  enumerable: true
1456
1456
  },
@@ -1522,9 +1522,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
1522
1522
  switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
1523
1523
  case "attachment":
1524
1524
  if (Array.isArray(rawValue)) {
1525
- return rawValue.map((a) => chunkD6LIBHAQ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1525
+ return rawValue.map((a) => chunkPTLM24GW_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1526
1526
  } else {
1527
- return chunkD6LIBHAQ_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1527
+ return chunkPTLM24GW_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1528
1528
  }
1529
1529
  default:
1530
1530
  process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant4__default.default(false) ;
@@ -1540,9 +1540,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
1540
1540
  }
1541
1541
  if (propDef.type === "attachment") {
1542
1542
  if (Array.isArray(rawValue)) {
1543
- return rawValue.map((a) => chunkD6LIBHAQ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1543
+ return rawValue.map((a) => chunkPTLM24GW_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1544
1544
  }
1545
- return chunkD6LIBHAQ_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1545
+ return chunkPTLM24GW_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1546
1546
  }
1547
1547
  if (propDef.type === "cipherText") {
1548
1548
  return new CipherTextPropertyImpl({
@@ -1898,11 +1898,11 @@ var createStandardOntologyProviderFactory = (client) => {
1898
1898
  };
1899
1899
 
1900
1900
  // src/util/UserAgent.ts
1901
- var USER_AGENT = `osdk-client/${"2.72.0"}`;
1902
- var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.72.0"}`;
1901
+ var USER_AGENT = `osdk-client/${"2.73.0"}`;
1902
+ var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.73.0"}`;
1903
1903
 
1904
1904
  // src/createMinimalClient.ts
1905
- function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkD6LIBHAQ_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1905
+ function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkPTLM24GW_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1906
1906
  if (process.env.NODE_ENV !== "production") {
1907
1907
  try {
1908
1908
  new URL(baseUrl);
@@ -2585,7 +2585,7 @@ var ActionInvoker = class {
2585
2585
  };
2586
2586
  var QueryInvoker = class {
2587
2587
  constructor(clientCtx, queryDef) {
2588
- this.executeFunction = chunkZVGQ66VU_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
2588
+ this.executeFunction = chunkDPEZMSW2_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
2589
2589
  }
2590
2590
  };
2591
2591
  function createClientInternal(objectSetFactory, transactionRid, flushEdits, scenarioRid, subscribeConnectionFn, baseUrl, ontologyRid, tokenProvider, options = void 0, fetchFn = fetch) {
@@ -2628,7 +2628,7 @@ function createClientFromContext(clientCtx) {
2628
2628
  async *executeStreamingFunction(query, params) {
2629
2629
  const {
2630
2630
  applyStreamingQuery
2631
- } = await import('./applyStreamingQuery-CN7NXX4A.cjs');
2631
+ } = await import('./applyStreamingQuery-FKYWPEUU.cjs');
2632
2632
  yield* applyStreamingQuery(clientCtx, query, params);
2633
2633
  }
2634
2634
  };
@@ -2655,16 +2655,16 @@ function createClientFromContext(clientCtx) {
2655
2655
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
2656
2656
  return {
2657
2657
  fetchOneByRid: async (objectType, rid, options) => {
2658
- return await chunkD6LIBHAQ_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2658
+ return await chunkPTLM24GW_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2659
2659
  }
2660
2660
  };
2661
2661
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
2662
2662
  return {
2663
2663
  fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
2664
- return await chunkD6LIBHAQ_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2664
+ return await chunkPTLM24GW_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2665
2665
  },
2666
2666
  fetchPageByRidNoType: async (rids, options) => {
2667
- return await chunkD6LIBHAQ_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2667
+ return await chunkPTLM24GW_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2668
2668
  }
2669
2669
  };
2670
2670
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet.name:
@@ -2708,7 +2708,7 @@ function createClientFromContext(clientCtx) {
2708
2708
  [symbolClientContext2]: {
2709
2709
  value: clientCtx
2710
2710
  },
2711
- [chunkD6LIBHAQ_cjs.additionalContext]: {
2711
+ [chunkPTLM24GW_cjs.additionalContext]: {
2712
2712
  value: clientCtx
2713
2713
  },
2714
2714
  fetchMetadata: {
@@ -2717,10 +2717,10 @@ function createClientFromContext(clientCtx) {
2717
2717
  });
2718
2718
  return client;
2719
2719
  }
2720
- var createClient = createClientInternal.bind(void 0, chunkD6LIBHAQ_cjs.createObjectSet, void 0, void 0, void 0, void 0);
2721
- var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkD6LIBHAQ_cjs.createObjectSet, transactionRid, flushEdits, void 0, void 0, ...args);
2722
- var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(chunkD6LIBHAQ_cjs.createObjectSet, void 0, void 0, void 0, createSubscriptionConnection, ...args);
2723
- var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(chunkD6LIBHAQ_cjs.createObjectSet, void 0, void 0, scenarioRid, void 0, ...args);
2720
+ var createClient = createClientInternal.bind(void 0, chunkPTLM24GW_cjs.createObjectSet, void 0, void 0, void 0, void 0);
2721
+ var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkPTLM24GW_cjs.createObjectSet, transactionRid, flushEdits, void 0, void 0, ...args);
2722
+ var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(chunkPTLM24GW_cjs.createObjectSet, void 0, void 0, void 0, createSubscriptionConnection, ...args);
2723
+ var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(chunkPTLM24GW_cjs.createObjectSet, void 0, void 0, scenarioRid, void 0, ...args);
2724
2724
  function createWithRid(rids) {
2725
2725
  const withRid = {
2726
2726
  type: "static",
@@ -2745,5 +2745,5 @@ exports.createClientFromContext = createClientFromContext;
2745
2745
  exports.createClientWithSubscriptionConnection = createClientWithSubscriptionConnection;
2746
2746
  exports.createClientWithTransaction = createClientWithTransaction;
2747
2747
  exports.createOsdkObject = createOsdkObject;
2748
- //# sourceMappingURL=chunk-WBDUOV47.cjs.map
2749
- //# sourceMappingURL=chunk-WBDUOV47.cjs.map
2748
+ //# sourceMappingURL=chunk-FLPBVSKK.cjs.map
2749
+ //# sourceMappingURL=chunk-FLPBVSKK.cjs.map