@osdk/client 2.7.0-beta.2 → 2.7.0-beta.3

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 (57) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/build/browser/fetchMetadata.test.js +11 -0
  3. package/build/browser/fetchMetadata.test.js.map +1 -1
  4. package/build/browser/object/AttachmentUpload.js +1 -1
  5. package/build/browser/object/AttachmentUpload.js.map +1 -1
  6. package/build/browser/object/convertWireToOsdkObjects.js +15 -3
  7. package/build/browser/object/convertWireToOsdkObjects.js.map +1 -1
  8. package/build/browser/object/convertWireToOsdkObjects.test.js +132 -4
  9. package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
  10. package/build/browser/object/fetchPage.js +2 -2
  11. package/build/browser/object/fetchPage.js.map +1 -1
  12. package/build/browser/object/fetchPage.test.js.map +1 -1
  13. package/build/browser/object/mediaUpload.js +1 -1
  14. package/build/browser/object/mediaUpload.js.map +1 -1
  15. package/build/browser/objectSet/InterfaceObjectSet.test.js +1 -1
  16. package/build/browser/objectSet/InterfaceObjectSet.test.js.map +1 -1
  17. package/build/browser/objectSet/ObjectSet.test.js +1 -0
  18. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  19. package/build/browser/observable/ObservableClient.js.map +1 -1
  20. package/build/browser/observable/internal/ObservableClientImpl.js.map +1 -1
  21. package/build/browser/util/UserAgent.js +2 -2
  22. package/build/cjs/{chunk-VYHIAGVJ.cjs → chunk-C47MWNFV.cjs} +4 -4
  23. package/build/cjs/chunk-C47MWNFV.cjs.map +1 -0
  24. package/build/cjs/{chunk-R5RI54KA.cjs → chunk-WEN63HAL.cjs} +74 -70
  25. package/build/cjs/chunk-WEN63HAL.cjs.map +1 -0
  26. package/build/cjs/index.cjs +8 -8
  27. package/build/cjs/public/internal.cjs +8 -8
  28. package/build/cjs/public/unstable-do-not-use.cjs +33 -33
  29. package/build/cjs/public/unstable-do-not-use.d.cts +2 -2
  30. package/build/esm/fetchMetadata.test.js +11 -0
  31. package/build/esm/fetchMetadata.test.js.map +1 -1
  32. package/build/esm/object/AttachmentUpload.js +1 -1
  33. package/build/esm/object/AttachmentUpload.js.map +1 -1
  34. package/build/esm/object/convertWireToOsdkObjects.js +15 -3
  35. package/build/esm/object/convertWireToOsdkObjects.js.map +1 -1
  36. package/build/esm/object/convertWireToOsdkObjects.test.js +132 -4
  37. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
  38. package/build/esm/object/fetchPage.js +2 -2
  39. package/build/esm/object/fetchPage.js.map +1 -1
  40. package/build/esm/object/fetchPage.test.js.map +1 -1
  41. package/build/esm/object/mediaUpload.js +1 -1
  42. package/build/esm/object/mediaUpload.js.map +1 -1
  43. package/build/esm/objectSet/InterfaceObjectSet.test.js +1 -1
  44. package/build/esm/objectSet/InterfaceObjectSet.test.js.map +1 -1
  45. package/build/esm/objectSet/ObjectSet.test.js +1 -0
  46. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  47. package/build/esm/observable/ObservableClient.js.map +1 -1
  48. package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -1
  49. package/build/esm/util/UserAgent.js +2 -2
  50. package/build/types/object/AttachmentUpload.d.ts.map +1 -1
  51. package/build/types/object/convertWireToOsdkObjects.d.ts +4 -4
  52. package/build/types/object/convertWireToOsdkObjects.d.ts.map +1 -1
  53. package/build/types/observable/ObservableClient.d.ts +2 -2
  54. package/build/types/observable/ObservableClient.d.ts.map +1 -1
  55. package/package.json +5 -5
  56. package/build/cjs/chunk-R5RI54KA.cjs.map +0 -1
  57. package/build/cjs/chunk-VYHIAGVJ.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkVYHIAGVJ_cjs = require('./chunk-VYHIAGVJ.cjs');
3
+ var chunkC47MWNFV_cjs = require('./chunk-C47MWNFV.cjs');
4
4
  var chunk6SCDLAU2_cjs = require('./chunk-6SCDLAU2.cjs');
5
5
  var unstable = require('@osdk/api/unstable');
6
6
  var client_unstable = require('@osdk/client.unstable');
@@ -25,7 +25,7 @@ var ActionValidationError = class extends Error {
25
25
  // src/object/AttachmentUpload.ts
26
26
  chunk6SCDLAU2_cjs.init_cjs_shims();
27
27
  function isAttachmentUpload(o) {
28
- return typeof o === `object` && "name" in o && "data" in o && o.data instanceof Blob;
28
+ return typeof o === "object" && o != null && "name" in o && typeof o.name === "string" && "data" in o && o.data instanceof Blob && !("fileName" in o);
29
29
  }
30
30
  function isAttachmentFile(o) {
31
31
  return typeof o === "object" && o instanceof Blob && "name" in o;
@@ -436,51 +436,51 @@ chunk6SCDLAU2_cjs.__export(MediaSet_exports, {
436
436
  chunk6SCDLAU2_cjs.init_cjs_shims();
437
437
  var _abort = [1, "/v2/mediasets/{0}/transactions/{1}/abort", 2];
438
438
  function abort($ctx, ...args) {
439
- return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _abort, ...args);
439
+ return chunkC47MWNFV_cjs.foundryPlatformFetch($ctx, _abort, ...args);
440
440
  }
441
441
  var _calculate = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/calculate", 6];
442
442
  function calculate($ctx, ...args) {
443
- return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _calculate, ...args);
443
+ return chunkC47MWNFV_cjs.foundryPlatformFetch($ctx, _calculate, ...args);
444
444
  }
445
445
  var _commit = [1, "/v2/mediasets/{0}/transactions/{1}/commit", 2];
446
446
  function commit($ctx, ...args) {
447
- return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _commit, ...args);
447
+ return chunkC47MWNFV_cjs.foundryPlatformFetch($ctx, _commit, ...args);
448
448
  }
449
449
  var _create = [1, "/v2/mediasets/{0}/transactions", 2];
450
450
  function create($ctx, ...args) {
451
- return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _create, ...args);
451
+ return chunkC47MWNFV_cjs.foundryPlatformFetch($ctx, _create, ...args);
452
452
  }
453
453
  var _info = [0, "/v2/mediasets/{0}/items/{1}", 6];
454
454
  function info($ctx, ...args) {
455
- return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _info, ...args);
455
+ return chunkC47MWNFV_cjs.foundryPlatformFetch($ctx, _info, ...args);
456
456
  }
457
457
  var _reference = [0, "/v2/mediasets/{0}/items/{1}/reference", 6];
458
458
  function reference($ctx, ...args) {
459
- return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _reference, ...args);
459
+ return chunkC47MWNFV_cjs.foundryPlatformFetch($ctx, _reference, ...args);
460
460
  }
461
461
  var _getRidByPath = [0, "/v2/mediasets/{0}/items/getRidByPath", 2];
462
462
  function getRidByPath($ctx, ...args) {
463
- return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _getRidByPath, ...args);
463
+ return chunkC47MWNFV_cjs.foundryPlatformFetch($ctx, _getRidByPath, ...args);
464
464
  }
465
465
  var _upload = [1, "/v2/mediasets/{0}/items", 3, "*/*"];
466
466
  function upload($ctx, ...args) {
467
- return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _upload, ...args);
467
+ return chunkC47MWNFV_cjs.foundryPlatformFetch($ctx, _upload, ...args);
468
468
  }
469
469
  var _read = [0, "/v2/mediasets/{0}/items/{1}/content", 6, , "*/*"];
470
470
  function read($ctx, ...args) {
471
- return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _read, ...args);
471
+ return chunkC47MWNFV_cjs.foundryPlatformFetch($ctx, _read, ...args);
472
472
  }
473
473
  var _readOriginal = [0, "/v2/mediasets/{0}/items/{1}/original", 6, , "*/*"];
474
474
  function readOriginal($ctx, ...args) {
475
- return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _readOriginal, ...args);
475
+ return chunkC47MWNFV_cjs.foundryPlatformFetch($ctx, _readOriginal, ...args);
476
476
  }
477
477
  var _retrieve = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/retrieve", 6, , "*/*"];
478
478
  function retrieve($ctx, ...args) {
479
- return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _retrieve, ...args);
479
+ return chunkC47MWNFV_cjs.foundryPlatformFetch($ctx, _retrieve, ...args);
480
480
  }
481
481
  var _uploadMedia = [2, "/v2/mediasets/media/upload", 7, "*/*"];
482
482
  function uploadMedia($ctx, ...args) {
483
- return chunkVYHIAGVJ_cjs.foundryPlatformFetch($ctx, _uploadMedia, ...args);
483
+ return chunkC47MWNFV_cjs.foundryPlatformFetch($ctx, _uploadMedia, ...args);
484
484
  }
485
485
 
486
486
  // src/object/mediaUpload.ts
@@ -489,7 +489,7 @@ function isMediaReference(o) {
489
489
  return typeof o === `object` && typeof o.mimeType === "string" && "reference" in o && typeof o.reference === "object" && o.reference.type === "mediaSetViewItem" && "mediaSetViewItem" in o.reference && typeof o.reference.mediaSetViewItem === "object" && typeof o.reference.mediaSetViewItem.mediaSetRid === "string" && typeof o.reference.mediaSetViewItem.mediaSetViewRid === "string" && typeof o.reference.mediaSetViewItem.mediaItemRid === "string";
490
490
  }
491
491
  function isMediaUpload(o) {
492
- return typeof o === "object" && "fileName" in o && typeof o.fileName === "string" && "data" in o && typeof o.data === "object" && o.data instanceof Blob;
492
+ return typeof o === "object" && o != null && "fileName" in o && typeof o.fileName === "string" && "data" in o && typeof o.data === "object" && o.data instanceof Blob;
493
493
  }
494
494
 
495
495
  // src/util/interfaceUtils.ts
@@ -543,13 +543,13 @@ async function toDataValue(value, client, actionMetadata) {
543
543
  return Promise.all(promiseArray);
544
544
  }
545
545
  if (isAttachmentUpload(value)) {
546
- const attachment = await chunkVYHIAGVJ_cjs.Attachment_exports.upload(client, value.data, {
546
+ const attachment = await chunkC47MWNFV_cjs.Attachment_exports.upload(client, value.data, {
547
547
  filename: value.name
548
548
  });
549
549
  return await toDataValue(attachment.rid, client);
550
550
  }
551
551
  if (isAttachmentFile(value)) {
552
- const attachment = await chunkVYHIAGVJ_cjs.Attachment_exports.upload(client, value, {
552
+ const attachment = await chunkC47MWNFV_cjs.Attachment_exports.upload(client, value, {
553
553
  filename: value.name
554
554
  });
555
555
  return await toDataValue(attachment.rid, client);
@@ -570,11 +570,11 @@ async function toDataValue(value, client, actionMetadata) {
570
570
  if (isPoint(value)) {
571
571
  return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client);
572
572
  }
573
- if (chunkVYHIAGVJ_cjs.isWireObjectSet(value)) {
573
+ if (chunkC47MWNFV_cjs.isWireObjectSet(value)) {
574
574
  return value;
575
575
  }
576
- if (chunkVYHIAGVJ_cjs.isObjectSet(value)) {
577
- return chunkVYHIAGVJ_cjs.getWireObjectSet(value);
576
+ if (chunkC47MWNFV_cjs.isObjectSet(value)) {
577
+ return chunkC47MWNFV_cjs.getWireObjectSet(value);
578
578
  }
579
579
  if (isMediaReference(value)) {
580
580
  return value;
@@ -597,11 +597,11 @@ async function toDataValue(value, client, actionMetadata) {
597
597
 
598
598
  // src/actions/applyAction.ts
599
599
  async function applyAction(client, action, parameters, options = {}) {
600
- const clientWithHeaders = chunkVYHIAGVJ_cjs.addUserAgentAndRequestContextHeaders(chunkVYHIAGVJ_cjs.augmentRequestContext(client, (_) => ({
600
+ const clientWithHeaders = chunkC47MWNFV_cjs.addUserAgentAndRequestContextHeaders(chunkC47MWNFV_cjs.augmentRequestContext(client, (_) => ({
601
601
  finalMethodCall: "applyAction"
602
602
  })), action);
603
603
  if (Array.isArray(parameters)) {
604
- const response = await chunkVYHIAGVJ_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
604
+ const response = await chunkC47MWNFV_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
605
605
  requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)) : [],
606
606
  options: {
607
607
  returnEdits: options?.$returnEdits ? "ALL" : "NONE"
@@ -612,7 +612,7 @@ async function applyAction(client, action, parameters, options = {}) {
612
612
  const edits = response.edits;
613
613
  return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
614
614
  } else {
615
- const response = await chunkVYHIAGVJ_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
615
+ const response = await chunkC47MWNFV_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
616
616
  parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
617
617
  options: {
618
618
  mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
@@ -835,7 +835,7 @@ var GeotimeSeriesPropertyImpl = class {
835
835
  }
836
836
  }
837
837
  async getLatestValue() {
838
- const latestPointPromise = chunkVYHIAGVJ_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
838
+ const latestPointPromise = chunkC47MWNFV_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
839
839
  latestPointPromise.then(
840
840
  (latestPoint) => this.lastFetchedValue = latestPoint,
841
841
  // eslint-disable-next-line no-console
@@ -851,7 +851,7 @@ var GeotimeSeriesPropertyImpl = class {
851
851
  return allPoints;
852
852
  }
853
853
  async *asyncIterValues(query) {
854
- const streamPointsIterator = await chunkVYHIAGVJ_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
854
+ const streamPointsIterator = await chunkC47MWNFV_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
855
855
  range: getTimeRange(query)
856
856
  } : {});
857
857
  for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
@@ -879,13 +879,13 @@ var MediaReferencePropertyImpl = class {
879
879
  this.#mediaReference = mediaReference;
880
880
  }
881
881
  async fetchContents() {
882
- return chunkVYHIAGVJ_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
882
+ return chunkC47MWNFV_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
883
883
  preview: true
884
884
  // TODO: Can turn this back off when backend is no longer in beta.
885
885
  });
886
886
  }
887
887
  async fetchMetadata() {
888
- const r = await chunkVYHIAGVJ_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
888
+ const r = await chunkC47MWNFV_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
889
889
  preview: true
890
890
  // TODO: Can turn this back off when backend is no longer in beta.
891
891
  });
@@ -910,10 +910,10 @@ var TimeSeriesPropertyImpl = class {
910
910
  this.#triplet = [objectApiName, primaryKey, propertyName];
911
911
  }
912
912
  async getFirstPoint() {
913
- return chunkVYHIAGVJ_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
913
+ return chunkC47MWNFV_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
914
914
  }
915
915
  async getLastPoint() {
916
- return chunkVYHIAGVJ_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
916
+ return chunkC47MWNFV_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
917
917
  }
918
918
  async getAllPoints(query) {
919
919
  const allPoints = [];
@@ -923,7 +923,7 @@ var TimeSeriesPropertyImpl = class {
923
923
  return allPoints;
924
924
  }
925
925
  async *asyncIterPoints(query) {
926
- const streamPointsIterator = await chunkVYHIAGVJ_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
926
+ const streamPointsIterator = await chunkC47MWNFV_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
927
927
  range: getTimeRange(query)
928
928
  } : {});
929
929
  for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
@@ -1340,8 +1340,8 @@ function get$link(holder) {
1340
1340
  [objDef.primaryKeyApiName]: rawObj.$primaryKey
1341
1341
  }).pivotTo(linkName);
1342
1342
  const value = !linkDef.multiplicity ? {
1343
- fetchOne: (options) => chunkVYHIAGVJ_cjs.fetchSingle(client, objDef, options ?? {}, chunkVYHIAGVJ_cjs.getWireObjectSet(objectSet)),
1344
- fetchOneWithErrors: (options) => chunkVYHIAGVJ_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkVYHIAGVJ_cjs.getWireObjectSet(objectSet))
1343
+ fetchOne: (options) => chunkC47MWNFV_cjs.fetchSingle(client, objDef, options ?? {}, chunkC47MWNFV_cjs.getWireObjectSet(objectSet)),
1344
+ fetchOneWithErrors: (options) => chunkC47MWNFV_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkC47MWNFV_cjs.getWireObjectSet(objectSet))
1345
1345
  } : objectSet;
1346
1346
  return [linkName, value];
1347
1347
  })));
@@ -1357,8 +1357,8 @@ function get$linkForInterface(holder) {
1357
1357
  [objDef.primaryKeyApiName]: rawObj.$primaryKey
1358
1358
  })).pivotTo(linkName);
1359
1359
  const value = !linkDef.multiplicity ? {
1360
- fetchOne: (options) => chunkVYHIAGVJ_cjs.fetchSingle(client, objDef, options ?? {}, chunkVYHIAGVJ_cjs.getWireObjectSet(objectSet)),
1361
- fetchOneWithErrors: (options) => chunkVYHIAGVJ_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkVYHIAGVJ_cjs.getWireObjectSet(objectSet))
1360
+ fetchOne: (options) => chunkC47MWNFV_cjs.fetchSingle(client, objDef, options ?? {}, chunkC47MWNFV_cjs.getWireObjectSet(objectSet)),
1361
+ fetchOneWithErrors: (options) => chunkC47MWNFV_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkC47MWNFV_cjs.getWireObjectSet(objectSet))
1362
1362
  } : objectSet;
1363
1363
  return [linkName, value];
1364
1364
  })));
@@ -1366,7 +1366,7 @@ function get$linkForInterface(holder) {
1366
1366
 
1367
1367
  // src/object/convertWireToOsdkObjects/createOsdkInterface.ts
1368
1368
  function createOsdkInterface(underlying, interfaceDef) {
1369
- const [objApiNamespace] = chunkVYHIAGVJ_cjs.extractNamespace(interfaceDef.apiName);
1369
+ const [objApiNamespace] = chunkC47MWNFV_cjs.extractNamespace(interfaceDef.apiName);
1370
1370
  return Object.freeze(Object.defineProperties({}, {
1371
1371
  // first to minimize hidden classes
1372
1372
  [UnderlyingOsdkObject]: {
@@ -1425,7 +1425,7 @@ function createOsdkInterface(underlying, interfaceDef) {
1425
1425
  },
1426
1426
  ...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
1427
1427
  const objDef = underlying[ObjectDefRef];
1428
- const [apiNamespace, apiName] = chunkVYHIAGVJ_cjs.extractNamespace(p);
1428
+ const [apiNamespace, apiName] = chunkC47MWNFV_cjs.extractNamespace(p);
1429
1429
  const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
1430
1430
  return [apiNamespace === objApiNamespace ? apiName : p, {
1431
1431
  enumerable: targetPropName in underlying,
@@ -1586,9 +1586,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
1586
1586
  switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
1587
1587
  case "attachment":
1588
1588
  if (Array.isArray(rawValue)) {
1589
- return rawValue.map((a) => chunkVYHIAGVJ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1589
+ return rawValue.map((a) => chunkC47MWNFV_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1590
1590
  } else {
1591
- return chunkVYHIAGVJ_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1591
+ return chunkC47MWNFV_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1592
1592
  }
1593
1593
  default:
1594
1594
  process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
@@ -1604,9 +1604,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
1604
1604
  }
1605
1605
  if (propDef.type === "attachment") {
1606
1606
  if (Array.isArray(rawValue)) {
1607
- return rawValue.map((a) => chunkVYHIAGVJ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1607
+ return rawValue.map((a) => chunkC47MWNFV_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1608
1608
  }
1609
- return chunkVYHIAGVJ_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1609
+ return chunkC47MWNFV_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1610
1610
  }
1611
1611
  if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
1612
1612
  return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
@@ -1662,14 +1662,15 @@ async function convertWireToOsdkObjects(client, objects, interfaceApiName, force
1662
1662
  }
1663
1663
  return ret;
1664
1664
  }
1665
- async function convertWireToOsdkObjects2(client, objects, interfaceApiName, derivedPropertyTypeByName, forceRemoveRid = false, selectedProps, strictNonNull = false, interfaceToObjectTypeMappings = {}) {
1665
+ async function convertWireToOsdkObjects2(client, objects, interfaceApiName, derivedPropertyTypeByName, forceRemoveRid = false, selectedProps, strictNonNull = false, interfaceToObjectTypeMappings = {}, interfaceToObjectTypeMappingsV2 = {}) {
1666
1666
  fixObjectPropertiesInPlace(objects, forceRemoveRid);
1667
- const isInterfaceScoped = Object.keys(interfaceToObjectTypeMappings).length > 0;
1667
+ const effectiveMappings = Object.keys(interfaceToObjectTypeMappingsV2).length > 0 ? convertInterfaceToObjectTypeMappingsV2ToV1(interfaceToObjectTypeMappingsV2) : interfaceToObjectTypeMappings;
1668
+ const isInterfaceScoped = Object.keys(effectiveMappings).length > 0;
1668
1669
  const ret = [];
1669
1670
  for (const rawObj of objects) {
1670
1671
  const objectDef = await client.ontologyProvider.getObjectDefinition(rawObj.$apiName);
1671
1672
  !objectDef ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Missing definition for '${rawObj.$apiName}'`) : invariant__default.default(false) : void 0;
1672
- const interfaceToObjMapping = interfaceApiName && isInterfaceScoped ? interfaceToObjectTypeMappings[interfaceApiName][rawObj.$apiName] : void 0;
1673
+ const interfaceToObjMapping = interfaceApiName && isInterfaceScoped ? effectiveMappings[interfaceApiName][rawObj.$apiName] : void 0;
1673
1674
  const ifaceSelected = interfaceApiName && interfaceToObjMapping ? selectedProps ? Object.keys(interfaceToObjMapping).filter((val) => {
1674
1675
  selectedProps?.includes(interfaceToObjMapping[val]);
1675
1676
  }) : [...Object.values(interfaceToObjMapping), objectDef.primaryKeyApiName] : void 0;
@@ -1762,6 +1763,9 @@ function fixObjectPropertiesInPlace(objs, forceRemoveRid) {
1762
1763
  delete obj.__title;
1763
1764
  }
1764
1765
  }
1766
+ function convertInterfaceToObjectTypeMappingsV2ToV1(mappingsV2) {
1767
+ return Object.fromEntries(Object.entries(mappingsV2).map(([interfaceApiName, objectTypeMappingsV2]) => [interfaceApiName, Object.fromEntries(Object.entries(objectTypeMappingsV2).map(([objectTypeName, propertyMappings]) => [objectTypeName, Object.fromEntries(Object.entries(propertyMappings).filter(([, impl]) => impl.type === "localPropertyImplementation").map(([interfaceProp, impl]) => [interfaceProp, impl.propertyApiName]))]))]));
1768
+ }
1765
1769
 
1766
1770
  // src/ontology/StandardOntologyProvider.ts
1767
1771
  chunk6SCDLAU2_cjs.init_cjs_shims();
@@ -1838,7 +1842,7 @@ function deepFreeze(obj) {
1838
1842
  // src/ontology/loadActionMetadata.ts
1839
1843
  chunk6SCDLAU2_cjs.init_cjs_shims();
1840
1844
  async function loadActionMetadata(client, actionType) {
1841
- const r = await chunkVYHIAGVJ_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType, {
1845
+ const r = await chunkC47MWNFV_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType, {
1842
1846
  branch: client.branch
1843
1847
  });
1844
1848
  return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
@@ -1847,7 +1851,7 @@ async function loadActionMetadata(client, actionType) {
1847
1851
  // src/ontology/loadFullObjectMetadata.ts
1848
1852
  chunk6SCDLAU2_cjs.init_cjs_shims();
1849
1853
  async function loadFullObjectMetadata(client, objectType) {
1850
- const full = await chunkVYHIAGVJ_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
1854
+ const full = await chunkC47MWNFV_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
1851
1855
  preview: true,
1852
1856
  branch: client.branch
1853
1857
  });
@@ -1860,7 +1864,7 @@ async function loadFullObjectMetadata(client, objectType) {
1860
1864
  // src/ontology/loadInterfaceMetadata.ts
1861
1865
  chunk6SCDLAU2_cjs.init_cjs_shims();
1862
1866
  async function loadInterfaceMetadata(client, objectType) {
1863
- const r = await chunkVYHIAGVJ_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
1867
+ const r = await chunkC47MWNFV_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
1864
1868
  preview: true,
1865
1869
  branch: client.branch
1866
1870
  });
@@ -1871,7 +1875,7 @@ async function loadInterfaceMetadata(client, objectType) {
1871
1875
  chunk6SCDLAU2_cjs.init_cjs_shims();
1872
1876
  async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
1873
1877
  const [apiName, version] = queryTypeApiNameAndVersion.split(":");
1874
- const r = await chunkVYHIAGVJ_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
1878
+ const r = await chunkC47MWNFV_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
1875
1879
  version
1876
1880
  });
1877
1881
  return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
@@ -1929,11 +1933,11 @@ var createStandardOntologyProviderFactory = (client) => {
1929
1933
 
1930
1934
  // src/util/UserAgent.ts
1931
1935
  chunk6SCDLAU2_cjs.init_cjs_shims();
1932
- var USER_AGENT = `osdk-client/${"2.7.0-beta.2"}`;
1933
- var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.0-beta.2"}`;
1936
+ var USER_AGENT = `osdk-client/${"2.7.0-beta.3"}`;
1937
+ var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.7.0-beta.3"}`;
1934
1938
 
1935
1939
  // src/createMinimalClient.ts
1936
- function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkVYHIAGVJ_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1940
+ function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkC47MWNFV_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1937
1941
  if (process.env.NODE_ENV !== "production") {
1938
1942
  try {
1939
1943
  new URL(baseUrl);
@@ -2006,13 +2010,13 @@ async function toDataValueQueries(value, client, desiredType) {
2006
2010
  switch (desiredType.type) {
2007
2011
  case "attachment": {
2008
2012
  if (isAttachmentUpload(value)) {
2009
- const attachment = await chunkVYHIAGVJ_cjs.Attachment_exports.upload(client, value.data, {
2013
+ const attachment = await chunkC47MWNFV_cjs.Attachment_exports.upload(client, value.data, {
2010
2014
  filename: value.name
2011
2015
  });
2012
2016
  return attachment.rid;
2013
2017
  }
2014
2018
  if (isAttachmentFile(value)) {
2015
- const attachment = await chunkVYHIAGVJ_cjs.Attachment_exports.upload(client, value, {
2019
+ const attachment = await chunkC47MWNFV_cjs.Attachment_exports.upload(client, value, {
2016
2020
  filename: value.name
2017
2021
  });
2018
2022
  return attachment.rid;
@@ -2052,11 +2056,11 @@ async function toDataValueQueries(value, client, desiredType) {
2052
2056
  }
2053
2057
  case "objectSet":
2054
2058
  case "interfaceObjectSet": {
2055
- if (chunkVYHIAGVJ_cjs.isWireObjectSet(value)) {
2059
+ if (chunkC47MWNFV_cjs.isWireObjectSet(value)) {
2056
2060
  return value;
2057
2061
  }
2058
- if (chunkVYHIAGVJ_cjs.isObjectSet(value)) {
2059
- return chunkVYHIAGVJ_cjs.getWireObjectSet(value);
2062
+ if (chunkC47MWNFV_cjs.isObjectSet(value)) {
2063
+ return chunkC47MWNFV_cjs.getWireObjectSet(value);
2060
2064
  }
2061
2065
  break;
2062
2066
  }
@@ -2098,7 +2102,7 @@ async function toDataValueQueries(value, client, desiredType) {
2098
2102
  // src/queries/applyQuery.ts
2099
2103
  async function applyQuery(client, query, params) {
2100
2104
  const qd = client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : void 0);
2101
- const response = await chunkVYHIAGVJ_cjs.Query_exports.execute(chunkVYHIAGVJ_cjs.addUserAgentAndRequestContextHeaders(chunkVYHIAGVJ_cjs.augmentRequestContext(client, (_) => ({
2105
+ const response = await chunkC47MWNFV_cjs.Query_exports.execute(chunkC47MWNFV_cjs.addUserAgentAndRequestContextHeaders(chunkC47MWNFV_cjs.augmentRequestContext(client, (_) => ({
2102
2106
  finalMethodCall: "applyQuery"
2103
2107
  })), query), await client.ontologyRid, query.apiName, {
2104
2108
  parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
@@ -2141,7 +2145,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
2141
2145
  return responseValue;
2142
2146
  }
2143
2147
  case "attachment": {
2144
- return chunkVYHIAGVJ_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
2148
+ return chunkC47MWNFV_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
2145
2149
  }
2146
2150
  case "object": {
2147
2151
  const def = definitions.get(responseDataType.object);
@@ -2163,7 +2167,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
2163
2167
  throw new Error(`Missing definition for ${responseDataType.objectSet}`);
2164
2168
  }
2165
2169
  if (typeof responseValue === "string") {
2166
- return chunkVYHIAGVJ_cjs.createObjectSet(def, client, {
2170
+ return chunkC47MWNFV_cjs.createObjectSet(def, client, {
2167
2171
  type: "intersect",
2168
2172
  objectSets: [{
2169
2173
  type: "base",
@@ -2174,7 +2178,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
2174
2178
  }]
2175
2179
  });
2176
2180
  }
2177
- return chunkVYHIAGVJ_cjs.createObjectSet(def, client, responseValue);
2181
+ return chunkC47MWNFV_cjs.createObjectSet(def, client, responseValue);
2178
2182
  }
2179
2183
  case "struct": {
2180
2184
  for (const [key, subtype] of Object.entries(responseDataType.struct)) {
@@ -2360,7 +2364,7 @@ function createClientInternal(objectSetFactory, transactionRid, baseUrl, ontolog
2360
2364
  ontologyRid
2361
2365
  }, baseUrl, tokenProvider, {
2362
2366
  ...options,
2363
- logger: options?.logger ?? new chunkVYHIAGVJ_cjs.MinimalLogger(),
2367
+ logger: options?.logger ?? new chunkC47MWNFV_cjs.MinimalLogger(),
2364
2368
  transactionId: transactionRid,
2365
2369
  branch: options?.branch
2366
2370
  }, fetchFn, objectSetFactory);
@@ -2383,7 +2387,7 @@ function createClientFromContext(clientCtx) {
2383
2387
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
2384
2388
  return {
2385
2389
  fetchOneByRid: async (objectType, rid, options) => {
2386
- return await chunkVYHIAGVJ_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2390
+ return await chunkC47MWNFV_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2387
2391
  }
2388
2392
  };
2389
2393
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
@@ -2395,7 +2399,7 @@ function createClientFromContext(clientCtx) {
2395
2399
  objectType,
2396
2400
  propertyType
2397
2401
  } = args;
2398
- return await chunkVYHIAGVJ_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
2402
+ return await chunkC47MWNFV_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
2399
2403
  mediaItemPath: fileName,
2400
2404
  preview: true
2401
2405
  });
@@ -2404,10 +2408,10 @@ function createClientFromContext(clientCtx) {
2404
2408
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
2405
2409
  return {
2406
2410
  fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
2407
- return await chunkVYHIAGVJ_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2411
+ return await chunkC47MWNFV_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2408
2412
  },
2409
2413
  fetchPageByRidNoType: async (rids, options) => {
2410
- return await chunkVYHIAGVJ_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2414
+ return await chunkC47MWNFV_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2411
2415
  }
2412
2416
  };
2413
2417
  }
@@ -2419,13 +2423,13 @@ function createClientFromContext(clientCtx) {
2419
2423
  const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
2420
2424
  const symbolClientContext2 = "__osdkClientContext";
2421
2425
  const client = Object.defineProperties(clientFn, {
2422
- [chunkVYHIAGVJ_cjs.symbolClientContext]: {
2426
+ [chunkC47MWNFV_cjs.symbolClientContext]: {
2423
2427
  value: clientCtx
2424
2428
  },
2425
2429
  [symbolClientContext2]: {
2426
2430
  value: clientCtx
2427
2431
  },
2428
- [chunkVYHIAGVJ_cjs.additionalContext]: {
2432
+ [chunkC47MWNFV_cjs.additionalContext]: {
2429
2433
  value: clientCtx
2430
2434
  },
2431
2435
  fetchMetadata: {
@@ -2434,8 +2438,8 @@ function createClientFromContext(clientCtx) {
2434
2438
  });
2435
2439
  return client;
2436
2440
  }
2437
- var createClient = createClientInternal.bind(void 0, chunkVYHIAGVJ_cjs.createObjectSet, void 0);
2438
- var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(chunkVYHIAGVJ_cjs.createObjectSet, transactionRid, ...args);
2441
+ var createClient = createClientInternal.bind(void 0, chunkC47MWNFV_cjs.createObjectSet, void 0);
2442
+ var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(chunkC47MWNFV_cjs.createObjectSet, transactionRid, ...args);
2439
2443
  function createWithRid(rids) {
2440
2444
  const withRid = {
2441
2445
  type: "static",
@@ -2455,5 +2459,5 @@ exports.createClientFromContext = createClientFromContext;
2455
2459
  exports.createClientWithTransaction = createClientWithTransaction;
2456
2460
  exports.createObjectSpecifierFromPrimaryKey = createObjectSpecifierFromPrimaryKey;
2457
2461
  exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
2458
- //# sourceMappingURL=chunk-R5RI54KA.cjs.map
2459
- //# sourceMappingURL=chunk-R5RI54KA.cjs.map
2462
+ //# sourceMappingURL=chunk-WEN63HAL.cjs.map
2463
+ //# sourceMappingURL=chunk-WEN63HAL.cjs.map