@osdk/client 2.3.0-beta.9 → 2.4.0-beta.1

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 (55) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/build/browser/index.js +1 -1
  3. package/build/browser/index.js.map +1 -1
  4. package/build/browser/object/fetchPage.js +9 -7
  5. package/build/browser/object/fetchPage.js.map +1 -1
  6. package/build/browser/objectSet/createObjectSet.js +1 -1
  7. package/build/browser/objectSet/createObjectSet.js.map +1 -1
  8. package/build/browser/public/internal.js +1 -0
  9. package/build/browser/public/internal.js.map +1 -1
  10. package/build/browser/public-utils/hydrateObjectSetFromObjectRids.js +42 -0
  11. package/build/browser/public-utils/hydrateObjectSetFromObjectRids.js.map +1 -0
  12. package/build/browser/queries/applyQuery.js +8 -4
  13. package/build/browser/queries/applyQuery.js.map +1 -1
  14. package/build/browser/util/UserAgent.js +2 -2
  15. package/build/browser/util/toDataValue.js +6 -0
  16. package/build/browser/util/toDataValue.js.map +1 -1
  17. package/build/browser/util/toDataValue.test.js +9 -0
  18. package/build/browser/util/toDataValue.test.js.map +1 -1
  19. package/build/cjs/{chunk-HTPVXLYY.cjs → chunk-YGJRXE4F.cjs} +12 -10
  20. package/build/cjs/chunk-YGJRXE4F.cjs.map +1 -0
  21. package/build/cjs/{chunk-6OJ3OWCR.cjs → chunk-Z6X7WQDP.cjs} +62 -55
  22. package/build/cjs/chunk-Z6X7WQDP.cjs.map +1 -0
  23. package/build/cjs/index.cjs +10 -6
  24. package/build/cjs/index.d.cts +1 -1
  25. package/build/cjs/public/internal.cjs +25 -7
  26. package/build/cjs/public/internal.cjs.map +1 -1
  27. package/build/cjs/public/internal.d.cts +10 -1
  28. package/build/cjs/public/unstable-do-not-use.cjs +15 -15
  29. package/build/esm/index.js +1 -1
  30. package/build/esm/index.js.map +1 -1
  31. package/build/esm/object/fetchPage.js +9 -7
  32. package/build/esm/object/fetchPage.js.map +1 -1
  33. package/build/esm/objectSet/createObjectSet.js +1 -1
  34. package/build/esm/objectSet/createObjectSet.js.map +1 -1
  35. package/build/esm/public/internal.js +1 -0
  36. package/build/esm/public/internal.js.map +1 -1
  37. package/build/esm/public-utils/hydrateObjectSetFromObjectRids.js +42 -0
  38. package/build/esm/public-utils/hydrateObjectSetFromObjectRids.js.map +1 -0
  39. package/build/esm/queries/applyQuery.js +8 -4
  40. package/build/esm/queries/applyQuery.js.map +1 -1
  41. package/build/esm/util/UserAgent.js +2 -2
  42. package/build/esm/util/toDataValue.js +6 -0
  43. package/build/esm/util/toDataValue.js.map +1 -1
  44. package/build/esm/util/toDataValue.test.js +9 -0
  45. package/build/esm/util/toDataValue.test.js.map +1 -1
  46. package/build/types/index.d.ts +1 -1
  47. package/build/types/index.d.ts.map +1 -1
  48. package/build/types/public/internal.d.ts +1 -0
  49. package/build/types/public/internal.d.ts.map +1 -1
  50. package/build/types/public-utils/hydrateObjectSetFromObjectRids.d.ts +10 -0
  51. package/build/types/public-utils/hydrateObjectSetFromObjectRids.d.ts.map +1 -0
  52. package/build/types/queries/applyQuery.d.ts.map +1 -1
  53. package/package.json +11 -11
  54. package/build/cjs/chunk-6OJ3OWCR.cjs.map +0 -1
  55. package/build/cjs/chunk-HTPVXLYY.cjs.map +0 -1
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkHTPVXLYY_cjs = require('./chunk-HTPVXLYY.cjs');
3
+ var chunkYGJRXE4F_cjs = require('./chunk-YGJRXE4F.cjs');
4
4
  var unstable = require('@osdk/api/unstable');
5
5
  var client_unstable = require('@osdk/client.unstable');
6
6
  var invariant = require('tiny-invariant');
7
- var shared_client_impl = require('@osdk/shared.client.impl');
8
7
  var api = require('@osdk/api');
8
+ var shared_client_impl = require('@osdk/shared.client.impl');
9
9
  var generatorConverters = require('@osdk/generator-converters');
10
10
 
11
11
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -413,6 +413,9 @@ async function toDataValue(value, client, actionMetadata) {
413
413
  if (value == null) {
414
414
  return value;
415
415
  }
416
+ if (value === api.NULL_VALUE) {
417
+ return null;
418
+ }
416
419
  if (Array.isArray(value) || value instanceof Set) {
417
420
  const values = Array.from(value);
418
421
  if (values.some((dataValue) => isAttachmentUpload(dataValue) || isAttachmentFile(dataValue))) {
@@ -426,19 +429,19 @@ async function toDataValue(value, client, actionMetadata) {
426
429
  return Promise.all(promiseArray);
427
430
  }
428
431
  if (isAttachmentUpload(value)) {
429
- const attachment = await chunkHTPVXLYY_cjs.Attachment_exports.upload(client, value.data, {
432
+ const attachment = await chunkYGJRXE4F_cjs.Attachment_exports.upload(client, value.data, {
430
433
  filename: value.name
431
434
  });
432
435
  return await toDataValue(attachment.rid, client, actionMetadata);
433
436
  }
434
437
  if (isAttachmentFile(value)) {
435
- const attachment = await chunkHTPVXLYY_cjs.Attachment_exports.upload(client, value, {
438
+ const attachment = await chunkYGJRXE4F_cjs.Attachment_exports.upload(client, value, {
436
439
  filename: value.name
437
440
  });
438
441
  return await toDataValue(attachment.rid, client, actionMetadata);
439
442
  }
440
443
  if (isMediaUpload(value)) {
441
- const mediaRef = await chunkHTPVXLYY_cjs.MediaReferenceProperty_exports.uploadMedia(client, await client.ontologyRid, actionMetadata.apiName, value.data, {
444
+ const mediaRef = await chunkYGJRXE4F_cjs.MediaReferenceProperty_exports.uploadMedia(client, await client.ontologyRid, actionMetadata.apiName, value.data, {
442
445
  mediaItemPath: value.path,
443
446
  preview: true
444
447
  });
@@ -453,11 +456,11 @@ async function toDataValue(value, client, actionMetadata) {
453
456
  if (isPoint(value)) {
454
457
  return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client, actionMetadata);
455
458
  }
456
- if (chunkHTPVXLYY_cjs.isWireObjectSet(value)) {
459
+ if (chunkYGJRXE4F_cjs.isWireObjectSet(value)) {
457
460
  return value;
458
461
  }
459
- if (chunkHTPVXLYY_cjs.isObjectSet(value)) {
460
- return chunkHTPVXLYY_cjs.getWireObjectSet(value);
462
+ if (chunkYGJRXE4F_cjs.isObjectSet(value)) {
463
+ return chunkYGJRXE4F_cjs.getWireObjectSet(value);
461
464
  }
462
465
  if (isMediaReference(value)) {
463
466
  return value;
@@ -480,11 +483,11 @@ async function toDataValue(value, client, actionMetadata) {
480
483
 
481
484
  // src/actions/applyAction.ts
482
485
  async function applyAction(client, action, parameters, options = {}) {
483
- const clientWithHeaders = chunkHTPVXLYY_cjs.addUserAgentAndRequestContextHeaders(chunkHTPVXLYY_cjs.augmentRequestContext(client, (_) => ({
486
+ const clientWithHeaders = chunkYGJRXE4F_cjs.addUserAgentAndRequestContextHeaders(chunkYGJRXE4F_cjs.augmentRequestContext(client, (_) => ({
484
487
  finalMethodCall: "applyAction"
485
488
  })), action);
486
489
  if (Array.isArray(parameters)) {
487
- const response = await chunkHTPVXLYY_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
490
+ const response = await chunkYGJRXE4F_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
488
491
  requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)) : [],
489
492
  options: {
490
493
  returnEdits: options?.$returnEdits ? "ALL" : "NONE"
@@ -493,7 +496,7 @@ async function applyAction(client, action, parameters, options = {}) {
493
496
  const edits = response.edits;
494
497
  return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
495
498
  } else {
496
- const response = await chunkHTPVXLYY_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
499
+ const response = await chunkYGJRXE4F_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
497
500
  parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
498
501
  options: {
499
502
  mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
@@ -698,7 +701,7 @@ var GeotimeSeriesPropertyImpl = class {
698
701
  }
699
702
  }
700
703
  async getLatestValue() {
701
- const latestPointPromise = chunkHTPVXLYY_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
704
+ const latestPointPromise = chunkYGJRXE4F_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
702
705
  latestPointPromise.then(
703
706
  (latestPoint) => this.lastFetchedValue = latestPoint,
704
707
  // eslint-disable-next-line no-console
@@ -714,7 +717,7 @@ var GeotimeSeriesPropertyImpl = class {
714
717
  return allPoints;
715
718
  }
716
719
  async *asyncIterValues(query) {
717
- const streamPointsIterator = await chunkHTPVXLYY_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
720
+ const streamPointsIterator = await chunkYGJRXE4F_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
718
721
  range: getTimeRange(query)
719
722
  } : {});
720
723
  for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
@@ -741,13 +744,13 @@ var MediaReferencePropertyImpl = class {
741
744
  this.#mediaReference = mediaReference;
742
745
  }
743
746
  async fetchContents() {
744
- return chunkHTPVXLYY_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
747
+ return chunkYGJRXE4F_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
745
748
  preview: true
746
749
  // TODO: Can turn this back off when backend is no longer in beta.
747
750
  });
748
751
  }
749
752
  async fetchMetadata() {
750
- const r = await chunkHTPVXLYY_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
753
+ const r = await chunkYGJRXE4F_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
751
754
  preview: true
752
755
  // TODO: Can turn this back off when backend is no longer in beta.
753
756
  });
@@ -771,10 +774,10 @@ var TimeSeriesPropertyImpl = class {
771
774
  this.#triplet = [objectApiName, primaryKey, propertyName];
772
775
  }
773
776
  async getFirstPoint() {
774
- return chunkHTPVXLYY_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
777
+ return chunkYGJRXE4F_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
775
778
  }
776
779
  async getLastPoint() {
777
- return chunkHTPVXLYY_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
780
+ return chunkYGJRXE4F_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
778
781
  }
779
782
  async getAllPoints(query) {
780
783
  const allPoints = [];
@@ -784,7 +787,7 @@ var TimeSeriesPropertyImpl = class {
784
787
  return allPoints;
785
788
  }
786
789
  async *asyncIterPoints(query) {
787
- const streamPointsIterator = await chunkHTPVXLYY_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
790
+ const streamPointsIterator = await chunkYGJRXE4F_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
788
791
  range: getTimeRange(query)
789
792
  } : {});
790
793
  for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
@@ -812,7 +815,7 @@ var ClientRef = Symbol("ClientRef" );
812
815
 
813
816
  // src/object/convertWireToOsdkObjects/createOsdkInterface.ts
814
817
  function createOsdkInterface(underlying, interfaceDef) {
815
- const [objApiNamespace] = chunkHTPVXLYY_cjs.extractNamespace(interfaceDef.apiName);
818
+ const [objApiNamespace] = chunkYGJRXE4F_cjs.extractNamespace(interfaceDef.apiName);
816
819
  return Object.freeze(Object.defineProperties({}, {
817
820
  // first to minimize hidden classes
818
821
  [UnderlyingOsdkObject]: {
@@ -855,7 +858,7 @@ function createOsdkInterface(underlying, interfaceDef) {
855
858
  },
856
859
  ...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
857
860
  const objDef = underlying[ObjectDefRef];
858
- const [apiNamespace, apiName] = chunkHTPVXLYY_cjs.extractNamespace(p);
861
+ const [apiNamespace, apiName] = chunkYGJRXE4F_cjs.extractNamespace(p);
859
862
  const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
860
863
  return [apiNamespace === objApiNamespace ? apiName : p, {
861
864
  enumerable: targetPropName in underlying,
@@ -931,8 +934,8 @@ function get$link(holder) {
931
934
  [objDef.primaryKeyApiName]: rawObj.$primaryKey
932
935
  }).pivotTo(linkName);
933
936
  const value = !linkDef.multiplicity ? {
934
- fetchOne: (options) => chunkHTPVXLYY_cjs.fetchSingle(client, objDef, options ?? {}, chunkHTPVXLYY_cjs.getWireObjectSet(objectSet)),
935
- fetchOneWithErrors: (options) => chunkHTPVXLYY_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkHTPVXLYY_cjs.getWireObjectSet(objectSet))
937
+ fetchOne: (options) => chunkYGJRXE4F_cjs.fetchSingle(client, objDef, options ?? {}, chunkYGJRXE4F_cjs.getWireObjectSet(objectSet)),
938
+ fetchOneWithErrors: (options) => chunkYGJRXE4F_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkYGJRXE4F_cjs.getWireObjectSet(objectSet))
936
939
  } : objectSet;
937
940
  return [linkName, value];
938
941
  })));
@@ -1016,9 +1019,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
1016
1019
  switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
1017
1020
  case "attachment":
1018
1021
  if (Array.isArray(rawValue)) {
1019
- return rawValue.map((a) => chunkHTPVXLYY_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1022
+ return rawValue.map((a) => chunkYGJRXE4F_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1020
1023
  } else {
1021
- return chunkHTPVXLYY_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1024
+ return chunkYGJRXE4F_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1022
1025
  }
1023
1026
  default:
1024
1027
  process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
@@ -1034,9 +1037,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
1034
1037
  }
1035
1038
  if (propDef.type === "attachment") {
1036
1039
  if (Array.isArray(rawValue)) {
1037
- return rawValue.map((a) => chunkHTPVXLYY_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1040
+ return rawValue.map((a) => chunkYGJRXE4F_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1038
1041
  }
1039
- return chunkHTPVXLYY_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1042
+ return chunkYGJRXE4F_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1040
1043
  }
1041
1044
  if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
1042
1045
  return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
@@ -1244,11 +1247,11 @@ function createAsyncClientCache(fn, createCacheLocal = createClientCache) {
1244
1247
  return ret;
1245
1248
  }
1246
1249
  async function loadActionMetadata(client, actionType) {
1247
- const r = await chunkHTPVXLYY_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType);
1250
+ const r = await chunkYGJRXE4F_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType);
1248
1251
  return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
1249
1252
  }
1250
1253
  async function loadFullObjectMetadata(client, objectType) {
1251
- const full = await chunkHTPVXLYY_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
1254
+ const full = await chunkYGJRXE4F_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
1252
1255
  preview: true
1253
1256
  });
1254
1257
  const ret = generatorConverters.wireObjectTypeFullMetadataToSdkObjectMetadata(full, true);
@@ -1257,14 +1260,14 @@ async function loadFullObjectMetadata(client, objectType) {
1257
1260
  };
1258
1261
  }
1259
1262
  async function loadInterfaceMetadata(client, objectType) {
1260
- const r = await chunkHTPVXLYY_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
1263
+ const r = await chunkYGJRXE4F_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
1261
1264
  preview: true
1262
1265
  });
1263
1266
  return generatorConverters.__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(r, true);
1264
1267
  }
1265
1268
  async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
1266
1269
  const [apiName, version] = queryTypeApiNameAndVersion.split(":");
1267
- const r = await chunkHTPVXLYY_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
1270
+ const r = await chunkYGJRXE4F_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
1268
1271
  version
1269
1272
  });
1270
1273
  return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
@@ -1321,11 +1324,11 @@ var createStandardOntologyProviderFactory = (client) => {
1321
1324
  };
1322
1325
 
1323
1326
  // src/util/UserAgent.ts
1324
- var USER_AGENT = `osdk-client/${"2.3.0-beta.9"}`;
1325
- var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.3.0-beta.9"}`;
1327
+ var USER_AGENT = `osdk-client/${"2.4.0-beta.1"}`;
1328
+ var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.4.0-beta.1"}`;
1326
1329
 
1327
1330
  // src/createMinimalClient.ts
1328
- function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkHTPVXLYY_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1331
+ function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkYGJRXE4F_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1329
1332
  if (process.env.NODE_ENV !== "production") {
1330
1333
  try {
1331
1334
  new URL(baseUrl);
@@ -1390,13 +1393,13 @@ async function toDataValueQueries(value, client, desiredType) {
1390
1393
  switch (desiredType.type) {
1391
1394
  case "attachment": {
1392
1395
  if (isAttachmentUpload(value)) {
1393
- const attachment = await chunkHTPVXLYY_cjs.Attachment_exports.upload(client, value.data, {
1396
+ const attachment = await chunkYGJRXE4F_cjs.Attachment_exports.upload(client, value.data, {
1394
1397
  filename: value.name
1395
1398
  });
1396
1399
  return attachment.rid;
1397
1400
  }
1398
1401
  if (isAttachmentFile(value)) {
1399
- const attachment = await chunkHTPVXLYY_cjs.Attachment_exports.upload(client, value, {
1402
+ const attachment = await chunkYGJRXE4F_cjs.Attachment_exports.upload(client, value, {
1400
1403
  filename: value.name
1401
1404
  });
1402
1405
  return attachment.rid;
@@ -1427,11 +1430,11 @@ async function toDataValueQueries(value, client, desiredType) {
1427
1430
  break;
1428
1431
  }
1429
1432
  case "objectSet": {
1430
- if (chunkHTPVXLYY_cjs.isWireObjectSet(value)) {
1433
+ if (chunkYGJRXE4F_cjs.isWireObjectSet(value)) {
1431
1434
  return value;
1432
1435
  }
1433
- if (chunkHTPVXLYY_cjs.isObjectSet(value)) {
1434
- return chunkHTPVXLYY_cjs.getWireObjectSet(value);
1436
+ if (chunkYGJRXE4F_cjs.isObjectSet(value)) {
1437
+ return chunkYGJRXE4F_cjs.getWireObjectSet(value);
1435
1438
  }
1436
1439
  break;
1437
1440
  }
@@ -1473,7 +1476,7 @@ async function toDataValueQueries(value, client, desiredType) {
1473
1476
  // src/queries/applyQuery.ts
1474
1477
  async function applyQuery(client, query, params) {
1475
1478
  const qd = await client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : void 0);
1476
- const response = await chunkHTPVXLYY_cjs.Query_exports.execute(chunkHTPVXLYY_cjs.addUserAgentAndRequestContextHeaders(chunkHTPVXLYY_cjs.augmentRequestContext(client, (_) => ({
1479
+ const response = await chunkYGJRXE4F_cjs.Query_exports.execute(chunkYGJRXE4F_cjs.addUserAgentAndRequestContextHeaders(chunkYGJRXE4F_cjs.augmentRequestContext(client, (_) => ({
1477
1480
  finalMethodCall: "applyQuery"
1478
1481
  })), query), await client.ontologyRid, query.apiName, {
1479
1482
  parameters: params ? await remapQueryParams(params, client, qd.parameters) : {}
@@ -1520,7 +1523,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
1520
1523
  return responseValue;
1521
1524
  }
1522
1525
  case "attachment": {
1523
- return chunkHTPVXLYY_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
1526
+ return chunkYGJRXE4F_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
1524
1527
  }
1525
1528
  case "object": {
1526
1529
  const def = definitions.get(responseDataType.object);
@@ -1535,7 +1538,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
1535
1538
  throw new Error(`Missing definition for ${responseDataType.objectSet}`);
1536
1539
  }
1537
1540
  if (typeof responseValue === "string") {
1538
- return chunkHTPVXLYY_cjs.createObjectSet(def, client, {
1541
+ return chunkYGJRXE4F_cjs.createObjectSet(def, client, {
1539
1542
  type: "intersect",
1540
1543
  objectSets: [{
1541
1544
  type: "base",
@@ -1546,7 +1549,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
1546
1549
  }]
1547
1550
  });
1548
1551
  }
1549
- return chunkHTPVXLYY_cjs.createObjectSet(def, client, responseValue);
1552
+ return chunkYGJRXE4F_cjs.createObjectSet(def, client, responseValue);
1550
1553
  }
1551
1554
  case "struct": {
1552
1555
  for (const [key, subtype] of Object.entries(responseDataType.struct)) {
@@ -1624,16 +1627,20 @@ async function getRequiredDefinitions(dataType, client) {
1624
1627
  return getRequiredDefinitions(dataType.set, client);
1625
1628
  }
1626
1629
  case "map": {
1627
- for (const value of [dataType.keyType, dataType.valueType]) {
1628
- for (const [type, objectDef] of await getRequiredDefinitions(value, client)) {
1630
+ const types = [dataType.keyType, dataType.valueType];
1631
+ const allDefs = await Promise.all(types.map((value) => getRequiredDefinitions(value, client)));
1632
+ for (const defs of allDefs) {
1633
+ for (const [type, objectDef] of defs) {
1629
1634
  result.set(type, objectDef);
1630
1635
  }
1631
1636
  }
1632
1637
  break;
1633
1638
  }
1634
1639
  case "struct": {
1635
- for (const value of Object.values(dataType.struct)) {
1636
- for (const [type, objectDef] of await getRequiredDefinitions(value, client)) {
1640
+ const structValues = Object.values(dataType.struct);
1641
+ const allDefs = await Promise.all(structValues.map((value) => getRequiredDefinitions(value, client)));
1642
+ for (const defs of allDefs) {
1643
+ for (const [type, objectDef] of defs) {
1637
1644
  result.set(type, objectDef);
1638
1645
  }
1639
1646
  }
@@ -1714,7 +1721,7 @@ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvi
1714
1721
  ontologyRid
1715
1722
  }, baseUrl, tokenProvider, {
1716
1723
  ...options,
1717
- logger: options?.logger ?? new chunkHTPVXLYY_cjs.MinimalLogger()
1724
+ logger: options?.logger ?? new chunkYGJRXE4F_cjs.MinimalLogger()
1718
1725
  }, fetchFn, objectSetFactory);
1719
1726
  return createClientFromContext(clientCtx);
1720
1727
  }
@@ -1735,7 +1742,7 @@ function createClientFromContext(clientCtx) {
1735
1742
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
1736
1743
  return {
1737
1744
  fetchOneByRid: async (objectType, rid, options) => {
1738
- return await chunkHTPVXLYY_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
1745
+ return await chunkYGJRXE4F_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
1739
1746
  }
1740
1747
  };
1741
1748
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
@@ -1747,7 +1754,7 @@ function createClientFromContext(clientCtx) {
1747
1754
  objectType,
1748
1755
  propertyType
1749
1756
  } = args;
1750
- return await chunkHTPVXLYY_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
1757
+ return await chunkYGJRXE4F_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
1751
1758
  mediaItemPath: fileName,
1752
1759
  preview: true
1753
1760
  });
@@ -1756,7 +1763,7 @@ function createClientFromContext(clientCtx) {
1756
1763
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
1757
1764
  return {
1758
1765
  fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
1759
- return await chunkHTPVXLYY_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
1766
+ return await chunkYGJRXE4F_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
1760
1767
  }
1761
1768
  };
1762
1769
  }
@@ -1768,13 +1775,13 @@ function createClientFromContext(clientCtx) {
1768
1775
  const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
1769
1776
  const symbolClientContext2 = "__osdkClientContext";
1770
1777
  const client = Object.defineProperties(clientFn, {
1771
- [chunkHTPVXLYY_cjs.symbolClientContext]: {
1778
+ [chunkYGJRXE4F_cjs.symbolClientContext]: {
1772
1779
  value: clientCtx
1773
1780
  },
1774
1781
  [symbolClientContext2]: {
1775
1782
  value: clientCtx
1776
1783
  },
1777
- [chunkHTPVXLYY_cjs.additionalContext]: {
1784
+ [chunkYGJRXE4F_cjs.additionalContext]: {
1778
1785
  value: clientCtx
1779
1786
  },
1780
1787
  fetchMetadata: {
@@ -1783,7 +1790,7 @@ function createClientFromContext(clientCtx) {
1783
1790
  });
1784
1791
  return client;
1785
1792
  }
1786
- var createClient = createClientInternal.bind(void 0, chunkHTPVXLYY_cjs.createObjectSet);
1793
+ var createClient = createClientInternal.bind(void 0, chunkYGJRXE4F_cjs.createObjectSet);
1787
1794
  function createWithRid(rids) {
1788
1795
  const withRid = {
1789
1796
  type: "static",
@@ -1800,5 +1807,5 @@ exports.UnderlyingOsdkObject = UnderlyingOsdkObject;
1800
1807
  exports.createAttachmentUpload = createAttachmentUpload;
1801
1808
  exports.createClient = createClient;
1802
1809
  exports.createClientFromContext = createClientFromContext;
1803
- //# sourceMappingURL=chunk-6OJ3OWCR.cjs.map
1804
- //# sourceMappingURL=chunk-6OJ3OWCR.cjs.map
1810
+ //# sourceMappingURL=chunk-Z6X7WQDP.cjs.map
1811
+ //# sourceMappingURL=chunk-Z6X7WQDP.cjs.map