@osdk/client 2.8.0-beta.13 → 2.8.0-beta.15

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 (143) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/build/browser/createMediaFromReference.js +61 -0
  3. package/build/browser/createMediaFromReference.js.map +1 -0
  4. package/build/browser/index.js +1 -0
  5. package/build/browser/index.js.map +1 -1
  6. package/build/browser/object/mediaUpload.js +3 -0
  7. package/build/browser/object/mediaUpload.js.map +1 -1
  8. package/build/browser/observable/LinkPayload.js.map +1 -1
  9. package/build/browser/observable/ListPayload.js.map +1 -1
  10. package/build/browser/observable/ObservableClient/ObserveLink.js.map +1 -1
  11. package/build/browser/observable/ObservableClient.js.map +1 -1
  12. package/build/browser/observable/computeObjectSetCacheKey.js.map +1 -1
  13. package/build/browser/observable/internal/ListQueryView.js +4 -3
  14. package/build/browser/observable/internal/ListQueryView.js.map +1 -1
  15. package/build/browser/observable/internal/ObservableClientImpl.js +1 -1
  16. package/build/browser/observable/internal/ObservableClientImpl.js.map +1 -1
  17. package/build/browser/observable/internal/Store.test.js +11 -11
  18. package/build/browser/observable/internal/Store.test.js.map +1 -1
  19. package/build/browser/observable/internal/base-list/BaseCollectionQuery.js.map +1 -1
  20. package/build/browser/observable/internal/base-list/BaseListQuery.js +12 -13
  21. package/build/browser/observable/internal/base-list/BaseListQuery.js.map +1 -1
  22. package/build/browser/observable/internal/base-list/createCollectionConnectable.js +2 -2
  23. package/build/browser/observable/internal/base-list/createCollectionConnectable.js.map +1 -1
  24. package/build/browser/observable/internal/base-list/createCollectionConnectable.test.js +2 -2
  25. package/build/browser/observable/internal/base-list/createCollectionConnectable.test.js.map +1 -1
  26. package/build/browser/observable/internal/list/InterfaceListQuery.js +1 -1
  27. package/build/browser/observable/internal/list/InterfaceListQuery.js.map +1 -1
  28. package/build/browser/observable/internal/list/ListQuery.test.js +45 -46
  29. package/build/browser/observable/internal/list/ListQuery.test.js.map +1 -1
  30. package/build/browser/observable/internal/object/ObjectsHelper.js +22 -1
  31. package/build/browser/observable/internal/object/ObjectsHelper.js.map +1 -1
  32. package/build/browser/observable/internal/object/ObjectsHelper.test.js +132 -0
  33. package/build/browser/observable/internal/object/ObjectsHelper.test.js.map +1 -1
  34. package/build/browser/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
  35. package/build/browser/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
  36. package/build/browser/observable/internal/testUtils/observeLink/expectStandardObserveLink.js +1 -1
  37. package/build/browser/observable/internal/testUtils/observeLink/expectStandardObserveLink.js.map +1 -1
  38. package/build/browser/observable/internal/testUtils.js +2 -2
  39. package/build/browser/observable/internal/testUtils.js.map +1 -1
  40. package/build/browser/queries/applyQuery.js +8 -1
  41. package/build/browser/queries/applyQuery.js.map +1 -1
  42. package/build/browser/queries/queries.test.js +80 -2
  43. package/build/browser/queries/queries.test.js.map +1 -1
  44. package/build/browser/util/UserAgent.js +2 -2
  45. package/build/browser/util/toDataValue.js +7 -7
  46. package/build/browser/util/toDataValue.js.map +1 -1
  47. package/build/browser/util/toDataValue.test.js +23 -0
  48. package/build/browser/util/toDataValue.test.js.map +1 -1
  49. package/build/browser/util/toDataValueQueries.js +19 -0
  50. package/build/browser/util/toDataValueQueries.js.map +1 -1
  51. package/build/cjs/{chunk-JVLSSAAP.cjs → chunk-Q2XRNNC7.cjs} +68 -68
  52. package/build/cjs/{chunk-JVLSSAAP.cjs.map → chunk-Q2XRNNC7.cjs.map} +1 -1
  53. package/build/cjs/{chunk-LDTMSHUZ.cjs → chunk-QPPKY7HT.cjs} +4 -4
  54. package/build/cjs/{chunk-LDTMSHUZ.cjs.map → chunk-QPPKY7HT.cjs.map} +1 -1
  55. package/build/cjs/{chunk-FE6Q5R5O.cjs → chunk-RTSJQAWK.cjs} +189 -123
  56. package/build/cjs/chunk-RTSJQAWK.cjs.map +1 -0
  57. package/build/cjs/createObjectSet-BagR_R7M.d.cts +15 -0
  58. package/build/cjs/index.cjs +20 -12
  59. package/build/cjs/index.cjs.map +1 -1
  60. package/build/cjs/index.d.cts +2 -1
  61. package/build/cjs/public/internal-node.cjs +219 -219
  62. package/build/cjs/public/internal.cjs +14 -14
  63. package/build/cjs/public/unstable-do-not-use.cjs +164 -145
  64. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  65. package/build/cjs/public/unstable-do-not-use.d.cts +11 -14
  66. package/build/esm/createMediaFromReference.js +61 -0
  67. package/build/esm/createMediaFromReference.js.map +1 -0
  68. package/build/esm/index.js +1 -0
  69. package/build/esm/index.js.map +1 -1
  70. package/build/esm/object/mediaUpload.js +3 -0
  71. package/build/esm/object/mediaUpload.js.map +1 -1
  72. package/build/esm/observable/LinkPayload.js.map +1 -1
  73. package/build/esm/observable/ListPayload.js.map +1 -1
  74. package/build/esm/observable/ObservableClient/ObserveLink.js.map +1 -1
  75. package/build/esm/observable/ObservableClient.js.map +1 -1
  76. package/build/esm/observable/computeObjectSetCacheKey.js.map +1 -1
  77. package/build/esm/observable/internal/ListQueryView.js +4 -3
  78. package/build/esm/observable/internal/ListQueryView.js.map +1 -1
  79. package/build/esm/observable/internal/ObservableClientImpl.js +1 -1
  80. package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -1
  81. package/build/esm/observable/internal/Store.test.js +11 -11
  82. package/build/esm/observable/internal/Store.test.js.map +1 -1
  83. package/build/esm/observable/internal/base-list/BaseCollectionQuery.js.map +1 -1
  84. package/build/esm/observable/internal/base-list/BaseListQuery.js +12 -13
  85. package/build/esm/observable/internal/base-list/BaseListQuery.js.map +1 -1
  86. package/build/esm/observable/internal/base-list/createCollectionConnectable.js +2 -2
  87. package/build/esm/observable/internal/base-list/createCollectionConnectable.js.map +1 -1
  88. package/build/esm/observable/internal/base-list/createCollectionConnectable.test.js +2 -2
  89. package/build/esm/observable/internal/base-list/createCollectionConnectable.test.js.map +1 -1
  90. package/build/esm/observable/internal/list/InterfaceListQuery.js +1 -1
  91. package/build/esm/observable/internal/list/InterfaceListQuery.js.map +1 -1
  92. package/build/esm/observable/internal/list/ListQuery.test.js +45 -46
  93. package/build/esm/observable/internal/list/ListQuery.test.js.map +1 -1
  94. package/build/esm/observable/internal/object/ObjectsHelper.js +22 -1
  95. package/build/esm/observable/internal/object/ObjectsHelper.js.map +1 -1
  96. package/build/esm/observable/internal/object/ObjectsHelper.test.js +132 -0
  97. package/build/esm/observable/internal/object/ObjectsHelper.test.js.map +1 -1
  98. package/build/esm/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
  99. package/build/esm/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
  100. package/build/esm/observable/internal/testUtils/observeLink/expectStandardObserveLink.js +1 -1
  101. package/build/esm/observable/internal/testUtils/observeLink/expectStandardObserveLink.js.map +1 -1
  102. package/build/esm/observable/internal/testUtils.js +2 -2
  103. package/build/esm/observable/internal/testUtils.js.map +1 -1
  104. package/build/esm/queries/applyQuery.js +8 -1
  105. package/build/esm/queries/applyQuery.js.map +1 -1
  106. package/build/esm/queries/queries.test.js +80 -2
  107. package/build/esm/queries/queries.test.js.map +1 -1
  108. package/build/esm/util/UserAgent.js +2 -2
  109. package/build/esm/util/toDataValue.js +7 -7
  110. package/build/esm/util/toDataValue.js.map +1 -1
  111. package/build/esm/util/toDataValue.test.js +23 -0
  112. package/build/esm/util/toDataValue.test.js.map +1 -1
  113. package/build/esm/util/toDataValueQueries.js +19 -0
  114. package/build/esm/util/toDataValueQueries.js.map +1 -1
  115. package/build/types/createMediaFromReference.d.ts +1 -0
  116. package/build/types/createMediaFromReference.d.ts.map +1 -0
  117. package/build/types/index.d.ts +2 -0
  118. package/build/types/index.d.ts.map +1 -1
  119. package/build/types/object/mediaUpload.d.ts +2 -1
  120. package/build/types/object/mediaUpload.d.ts.map +1 -1
  121. package/build/types/observable/LinkPayload.d.ts +1 -1
  122. package/build/types/observable/ListPayload.d.ts +1 -1
  123. package/build/types/observable/ObservableClient/ObserveLink.d.ts +1 -1
  124. package/build/types/observable/ObservableClient.d.ts +4 -4
  125. package/build/types/observable/ObservableClient.d.ts.map +1 -1
  126. package/build/types/observable/computeObjectSetCacheKey.d.ts +2 -2
  127. package/build/types/observable/computeObjectSetCacheKey.d.ts.map +1 -1
  128. package/build/types/observable/internal/ListQueryView.d.ts.map +1 -1
  129. package/build/types/observable/internal/Store.test.d.ts.map +1 -1
  130. package/build/types/observable/internal/base-list/BaseCollectionQuery.d.ts +4 -4
  131. package/build/types/observable/internal/base-list/BaseListQuery.d.ts +1 -1
  132. package/build/types/observable/internal/base-list/BaseListQuery.d.ts.map +1 -1
  133. package/build/types/observable/internal/object/ObjectsHelper.d.ts.map +1 -1
  134. package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts +1 -1
  135. package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts.map +1 -1
  136. package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts +2 -2
  137. package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts.map +1 -1
  138. package/build/types/observable/internal/testUtils.d.ts +1 -1
  139. package/build/types/observable/internal/testUtils.d.ts.map +1 -1
  140. package/build/types/queries/applyQuery.d.ts.map +1 -1
  141. package/package.json +10 -10
  142. package/build/cjs/chunk-FE6Q5R5O.cjs.map +0 -1
  143. package/build/cjs/createClient-BPK4om7e.d.cts +0 -10
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkJVLSSAAP_cjs = require('./chunk-JVLSSAAP.cjs');
4
- var chunkLDTMSHUZ_cjs = require('./chunk-LDTMSHUZ.cjs');
3
+ var chunkQ2XRNNC7_cjs = require('./chunk-Q2XRNNC7.cjs');
4
+ var chunkQPPKY7HT_cjs = require('./chunk-QPPKY7HT.cjs');
5
5
  var unstable = require('@osdk/api/unstable');
6
6
  var client_unstable = require('@osdk/client.unstable');
7
7
  var invariant3 = require('tiny-invariant');
@@ -14,7 +14,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
14
14
  var invariant3__default = /*#__PURE__*/_interopDefault(invariant3);
15
15
 
16
16
  // src/actions/ActionValidationError.ts
17
- chunkLDTMSHUZ_cjs.init_cjs_shims();
17
+ chunkQPPKY7HT_cjs.init_cjs_shims();
18
18
  var ActionValidationError = class extends Error {
19
19
  constructor(validation) {
20
20
  super("Validation Error: " + JSON.stringify(validation, null, 2));
@@ -23,7 +23,7 @@ var ActionValidationError = class extends Error {
23
23
  };
24
24
 
25
25
  // src/object/AttachmentUpload.ts
26
- chunkLDTMSHUZ_cjs.init_cjs_shims();
26
+ chunkQPPKY7HT_cjs.init_cjs_shims();
27
27
  function isAttachmentUpload(o) {
28
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
  }
@@ -38,7 +38,7 @@ function createAttachmentUpload(data, name) {
38
38
  }
39
39
 
40
40
  // src/util/objectSpecifierUtils.ts
41
- chunkLDTMSHUZ_cjs.init_cjs_shims();
41
+ chunkQPPKY7HT_cjs.init_cjs_shims();
42
42
  function createObjectSpecifierFromPrimaryKey(objectDef, primaryKey) {
43
43
  return `${objectDef.apiName}:${primaryKey}`;
44
44
  }
@@ -50,13 +50,13 @@ function extractPrimaryKeyFromObjectSpecifier(ObjectSpecifier) {
50
50
  }
51
51
 
52
52
  // src/createClient.ts
53
- chunkLDTMSHUZ_cjs.init_cjs_shims();
53
+ chunkQPPKY7HT_cjs.init_cjs_shims();
54
54
 
55
55
  // src/__unstable/createBulkLinksAsyncIterFactory.ts
56
- chunkLDTMSHUZ_cjs.init_cjs_shims();
56
+ chunkQPPKY7HT_cjs.init_cjs_shims();
57
57
 
58
58
  // src/objectSet/conjureUnionType.ts
59
- chunkLDTMSHUZ_cjs.init_cjs_shims();
59
+ chunkQPPKY7HT_cjs.init_cjs_shims();
60
60
  function conjureUnionType(type, value) {
61
61
  return {
62
62
  type,
@@ -65,7 +65,7 @@ function conjureUnionType(type, value) {
65
65
  }
66
66
 
67
67
  // src/ontology/makeConjureContext.ts
68
- chunkLDTMSHUZ_cjs.init_cjs_shims();
68
+ chunkQPPKY7HT_cjs.init_cjs_shims();
69
69
  function makeConjureContext({
70
70
  baseUrl,
71
71
  fetch: fetchFn,
@@ -80,7 +80,7 @@ function makeConjureContext({
80
80
  }
81
81
 
82
82
  // src/pageRequestAsAsyncIter.ts
83
- chunkLDTMSHUZ_cjs.init_cjs_shims();
83
+ chunkQPPKY7HT_cjs.init_cjs_shims();
84
84
  function getResults(x) {
85
85
  return x.results;
86
86
  }
@@ -104,10 +104,10 @@ async function* pageRequestAsAsyncIter(call, values, nextArgs, initialPayload) {
104
104
  }
105
105
 
106
106
  // src/__unstable/ConjureSupport.ts
107
- chunkLDTMSHUZ_cjs.init_cjs_shims();
107
+ chunkQPPKY7HT_cjs.init_cjs_shims();
108
108
 
109
109
  // src/object/SimpleCache.ts
110
- chunkLDTMSHUZ_cjs.init_cjs_shims();
110
+ chunkQPPKY7HT_cjs.init_cjs_shims();
111
111
  function createSimpleCache(map = /* @__PURE__ */ new Map(), fn) {
112
112
  function get(key) {
113
113
  const r = map.get(key);
@@ -409,17 +409,17 @@ function getPrimaryKeyOrThrow(ref) {
409
409
  }
410
410
 
411
411
  // src/actions/applyAction.ts
412
- chunkLDTMSHUZ_cjs.init_cjs_shims();
412
+ chunkQPPKY7HT_cjs.init_cjs_shims();
413
413
 
414
414
  // src/util/toDataValue.ts
415
- chunkLDTMSHUZ_cjs.init_cjs_shims();
415
+ chunkQPPKY7HT_cjs.init_cjs_shims();
416
416
 
417
417
  // ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.50.0/node_modules/@osdk/foundry.mediasets/build/esm/index.js
418
- chunkLDTMSHUZ_cjs.init_cjs_shims();
418
+ chunkQPPKY7HT_cjs.init_cjs_shims();
419
419
 
420
420
  // ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.50.0/node_modules/@osdk/foundry.mediasets/build/esm/public/MediaSet.js
421
421
  var MediaSet_exports = {};
422
- chunkLDTMSHUZ_cjs.__export(MediaSet_exports, {
422
+ chunkQPPKY7HT_cjs.__export(MediaSet_exports, {
423
423
  abort: () => abort,
424
424
  calculate: () => calculate,
425
425
  commit: () => commit,
@@ -437,74 +437,77 @@ chunkLDTMSHUZ_cjs.__export(MediaSet_exports, {
437
437
  upload: () => upload,
438
438
  uploadMedia: () => uploadMedia
439
439
  });
440
- chunkLDTMSHUZ_cjs.init_cjs_shims();
440
+ chunkQPPKY7HT_cjs.init_cjs_shims();
441
441
  var _abort = [1, "/v2/mediasets/{0}/transactions/{1}/abort", 2];
442
442
  function abort($ctx, ...args) {
443
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _abort, ...args);
443
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _abort, ...args);
444
444
  }
445
445
  var _calculate = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/calculate", 6];
446
446
  function calculate($ctx, ...args) {
447
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _calculate, ...args);
447
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _calculate, ...args);
448
448
  }
449
449
  var _commit = [1, "/v2/mediasets/{0}/transactions/{1}/commit", 2];
450
450
  function commit($ctx, ...args) {
451
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _commit, ...args);
451
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _commit, ...args);
452
452
  }
453
453
  var _create = [1, "/v2/mediasets/{0}/transactions", 2];
454
454
  function create($ctx, ...args) {
455
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _create, ...args);
455
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _create, ...args);
456
456
  }
457
457
  var _info = [0, "/v2/mediasets/{0}/items/{1}", 6];
458
458
  function info($ctx, ...args) {
459
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _info, ...args);
459
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _info, ...args);
460
460
  }
461
461
  var _metadata = [0, "/v2/mediasets/{0}/items/{1}/metadata", 6];
462
462
  function metadata($ctx, ...args) {
463
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _metadata, ...args);
463
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _metadata, ...args);
464
464
  }
465
465
  var _reference = [0, "/v2/mediasets/{0}/items/{1}/reference", 6];
466
466
  function reference($ctx, ...args) {
467
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _reference, ...args);
467
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _reference, ...args);
468
468
  }
469
469
  var _getRidByPath = [0, "/v2/mediasets/{0}/items/getRidByPath", 2];
470
470
  function getRidByPath($ctx, ...args) {
471
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _getRidByPath, ...args);
471
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _getRidByPath, ...args);
472
472
  }
473
473
  var _getResult = [0, "/v2/mediasets/{0}/items/{1}/transformationJobs/{2}/result", 6, , "*/*"];
474
474
  function getResult($ctx, ...args) {
475
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _getResult, ...args);
475
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _getResult, ...args);
476
476
  }
477
477
  var _getStatus = [0, "/v2/mediasets/{0}/items/{1}/transformationJobs/{2}", 6];
478
478
  function getStatus($ctx, ...args) {
479
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _getStatus, ...args);
479
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _getStatus, ...args);
480
480
  }
481
481
  var _upload = [1, "/v2/mediasets/{0}/items", 3, "*/*"];
482
482
  function upload($ctx, ...args) {
483
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _upload, ...args);
483
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _upload, ...args);
484
484
  }
485
485
  var _read = [0, "/v2/mediasets/{0}/items/{1}/content", 6, , "*/*"];
486
486
  function read($ctx, ...args) {
487
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _read, ...args);
487
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _read, ...args);
488
488
  }
489
489
  var _readOriginal = [0, "/v2/mediasets/{0}/items/{1}/original", 6, , "*/*"];
490
490
  function readOriginal($ctx, ...args) {
491
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _readOriginal, ...args);
491
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _readOriginal, ...args);
492
492
  }
493
493
  var _retrieve = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/retrieve", 6, , "*/*"];
494
494
  function retrieve($ctx, ...args) {
495
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _retrieve, ...args);
495
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _retrieve, ...args);
496
496
  }
497
497
  var _transform = [1, "/v2/mediasets/{0}/items/{1}/transform", 7];
498
498
  function transform($ctx, ...args) {
499
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _transform, ...args);
499
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _transform, ...args);
500
500
  }
501
501
  var _uploadMedia = [2, "/v2/mediasets/media/upload", 7, "*/*"];
502
502
  function uploadMedia($ctx, ...args) {
503
- return chunkJVLSSAAP_cjs.foundryPlatformFetch($ctx, _uploadMedia, ...args);
503
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _uploadMedia, ...args);
504
504
  }
505
505
 
506
506
  // src/object/mediaUpload.ts
507
- chunkLDTMSHUZ_cjs.init_cjs_shims();
507
+ chunkQPPKY7HT_cjs.init_cjs_shims();
508
+ function isMedia(o) {
509
+ return typeof o === "object" && o != null && typeof o.fetchMetadata === "function" && typeof o.fetchContents === "function" && typeof o.getMediaReference === "function";
510
+ }
508
511
  function isMediaReference(o) {
509
512
  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";
510
513
  }
@@ -513,7 +516,7 @@ function isMediaUpload(o) {
513
516
  }
514
517
 
515
518
  // src/util/interfaceUtils.ts
516
- chunkLDTMSHUZ_cjs.init_cjs_shims();
519
+ chunkQPPKY7HT_cjs.init_cjs_shims();
517
520
  function getDefType(apiNameOrDef) {
518
521
  return typeof apiNameOrDef === "string" ? "object" : apiNameOrDef.type;
519
522
  }
@@ -528,19 +531,19 @@ function isInterfaceSpecifier(o) {
528
531
  }
529
532
 
530
533
  // src/util/isObjectSpecifiersObject.ts
531
- chunkLDTMSHUZ_cjs.init_cjs_shims();
534
+ chunkQPPKY7HT_cjs.init_cjs_shims();
532
535
  function isObjectSpecifiersObject(o) {
533
536
  return o && typeof o === "object" && typeof o.$apiName === "string" && o.$primaryKey != null;
534
537
  }
535
538
 
536
539
  // src/util/isOntologyObjectV2.ts
537
- chunkLDTMSHUZ_cjs.init_cjs_shims();
540
+ chunkQPPKY7HT_cjs.init_cjs_shims();
538
541
  function isOntologyObjectV2(o) {
539
542
  return o && typeof o === "object" && typeof o.__apiName === "string" && o.__primaryKey != null;
540
543
  }
541
544
 
542
545
  // src/util/isPoint.ts
543
- chunkLDTMSHUZ_cjs.init_cjs_shims();
546
+ chunkQPPKY7HT_cjs.init_cjs_shims();
544
547
  function isPoint(o) {
545
548
  return o && typeof o === "object" && "type" in o && o.type === "Point" && "coordinates" in o && o.coordinates.length === 2;
546
549
  }
@@ -563,13 +566,13 @@ async function toDataValue(value, client, actionMetadata) {
563
566
  return Promise.all(promiseArray);
564
567
  }
565
568
  if (isAttachmentUpload(value)) {
566
- const attachment = await chunkJVLSSAAP_cjs.Attachment_exports.upload(client, value.data, {
569
+ const attachment = await chunkQ2XRNNC7_cjs.Attachment_exports.upload(client, value.data, {
567
570
  filename: value.name
568
571
  });
569
572
  return await toDataValue(attachment.rid, client);
570
573
  }
571
574
  if (isAttachmentFile(value)) {
572
- const attachment = await chunkJVLSSAAP_cjs.Attachment_exports.upload(client, value, {
575
+ const attachment = await chunkQ2XRNNC7_cjs.Attachment_exports.upload(client, value, {
573
576
  filename: value.name
574
577
  });
575
578
  return await toDataValue(attachment.rid, client);
@@ -581,6 +584,12 @@ async function toDataValue(value, client, actionMetadata) {
581
584
  });
582
585
  return await toDataValue(mediaRef, client);
583
586
  }
587
+ if (isMedia(value)) {
588
+ return value.getMediaReference();
589
+ }
590
+ if (isMediaReference(value)) {
591
+ return value;
592
+ }
584
593
  if (isOntologyObjectV2(value)) {
585
594
  return await toDataValue(value.__primaryKey, client);
586
595
  }
@@ -590,14 +599,11 @@ async function toDataValue(value, client, actionMetadata) {
590
599
  if (isPoint(value)) {
591
600
  return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client);
592
601
  }
593
- if (chunkJVLSSAAP_cjs.isWireObjectSet(value)) {
602
+ if (chunkQ2XRNNC7_cjs.isWireObjectSet(value)) {
594
603
  return value;
595
604
  }
596
- if (chunkJVLSSAAP_cjs.isObjectSet(value)) {
597
- return chunkJVLSSAAP_cjs.getWireObjectSet(value);
598
- }
599
- if (isMediaReference(value)) {
600
- return value;
605
+ if (chunkQ2XRNNC7_cjs.isObjectSet(value)) {
606
+ return chunkQ2XRNNC7_cjs.getWireObjectSet(value);
601
607
  }
602
608
  if (isInterfaceActionParam(value)) {
603
609
  return {
@@ -617,11 +623,11 @@ async function toDataValue(value, client, actionMetadata) {
617
623
 
618
624
  // src/actions/applyAction.ts
619
625
  async function applyAction(client, action, parameters, options = {}) {
620
- const clientWithHeaders = chunkJVLSSAAP_cjs.addUserAgentAndRequestContextHeaders(chunkJVLSSAAP_cjs.augmentRequestContext(client, (_) => ({
626
+ const clientWithHeaders = chunkQ2XRNNC7_cjs.addUserAgentAndRequestContextHeaders(chunkQ2XRNNC7_cjs.augmentRequestContext(client, (_) => ({
621
627
  finalMethodCall: "applyAction"
622
628
  })), action);
623
629
  if (Array.isArray(parameters)) {
624
- const response = await chunkJVLSSAAP_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
630
+ const response = await chunkQ2XRNNC7_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
625
631
  requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)) : [],
626
632
  options: {
627
633
  returnEdits: options?.$returnEdits ? "ALL" : "NONE"
@@ -632,7 +638,7 @@ async function applyAction(client, action, parameters, options = {}) {
632
638
  const edits = response.edits;
633
639
  return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
634
640
  } else {
635
- const response = await chunkJVLSSAAP_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
641
+ const response = await chunkQ2XRNNC7_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
636
642
  parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
637
643
  options: {
638
644
  mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
@@ -722,22 +728,22 @@ function remapActionResponse(response) {
722
728
  }
723
729
 
724
730
  // src/createMinimalClient.ts
725
- chunkLDTMSHUZ_cjs.init_cjs_shims();
731
+ chunkQPPKY7HT_cjs.init_cjs_shims();
726
732
 
727
733
  // src/object/convertWireToOsdkObjects.ts
728
- chunkLDTMSHUZ_cjs.init_cjs_shims();
734
+ chunkQPPKY7HT_cjs.init_cjs_shims();
729
735
 
730
736
  // src/object/convertWireToOsdkObjects/createOsdkObject.ts
731
- chunkLDTMSHUZ_cjs.init_cjs_shims();
737
+ chunkQPPKY7HT_cjs.init_cjs_shims();
732
738
 
733
739
  // src/createGeotimeSeriesProperty.ts
734
- chunkLDTMSHUZ_cjs.init_cjs_shims();
740
+ chunkQPPKY7HT_cjs.init_cjs_shims();
735
741
 
736
742
  // src/util/timeseriesUtils.ts
737
- chunkLDTMSHUZ_cjs.init_cjs_shims();
743
+ chunkQPPKY7HT_cjs.init_cjs_shims();
738
744
 
739
745
  // src/util/streamutils.ts
740
- chunkLDTMSHUZ_cjs.init_cjs_shims();
746
+ chunkQPPKY7HT_cjs.init_cjs_shims();
741
747
  var START_TOKEN = new Uint8Array([123, 34, 100, 97, 116, 97, 34, 58, 91]);
742
748
  var OBJECT_OPEN_CHAR_CODE = 123;
743
749
  var OBJECT_CLOSE_CHAR_CODE = 125;
@@ -856,7 +862,7 @@ var GeotimeSeriesPropertyImpl = class {
856
862
  }
857
863
  }
858
864
  async getLatestValue() {
859
- const latestPointPromise = chunkJVLSSAAP_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
865
+ const latestPointPromise = chunkQ2XRNNC7_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
860
866
  latestPointPromise.then(
861
867
  (latestPoint) => this.lastFetchedValue = latestPoint,
862
868
  // eslint-disable-next-line no-console
@@ -872,7 +878,7 @@ var GeotimeSeriesPropertyImpl = class {
872
878
  return allPoints;
873
879
  }
874
880
  async *asyncIterValues(query) {
875
- const streamPointsIterator = await chunkJVLSSAAP_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
881
+ const streamPointsIterator = await chunkQ2XRNNC7_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
876
882
  range: getTimeRange(query)
877
883
  } : {});
878
884
  for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
@@ -882,7 +888,7 @@ var GeotimeSeriesPropertyImpl = class {
882
888
  };
883
889
 
884
890
  // src/createMediaReferenceProperty.ts
885
- chunkLDTMSHUZ_cjs.init_cjs_shims();
891
+ chunkQPPKY7HT_cjs.init_cjs_shims();
886
892
  var MediaReferencePropertyImpl = class {
887
893
  #mediaReference;
888
894
  #triplet;
@@ -900,13 +906,13 @@ var MediaReferencePropertyImpl = class {
900
906
  this.#mediaReference = mediaReference;
901
907
  }
902
908
  async fetchContents() {
903
- return chunkJVLSSAAP_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
909
+ return chunkQ2XRNNC7_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
904
910
  preview: true
905
911
  // TODO: Can turn this back off when backend is no longer in beta.
906
912
  });
907
913
  }
908
914
  async fetchMetadata() {
909
- const r = await chunkJVLSSAAP_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
915
+ const r = await chunkQ2XRNNC7_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
910
916
  preview: true
911
917
  // TODO: Can turn this back off when backend is no longer in beta.
912
918
  });
@@ -922,7 +928,7 @@ var MediaReferencePropertyImpl = class {
922
928
  };
923
929
 
924
930
  // src/createTimeseriesProperty.ts
925
- chunkLDTMSHUZ_cjs.init_cjs_shims();
931
+ chunkQPPKY7HT_cjs.init_cjs_shims();
926
932
  var TimeSeriesPropertyImpl = class {
927
933
  #triplet;
928
934
  #client;
@@ -931,10 +937,10 @@ var TimeSeriesPropertyImpl = class {
931
937
  this.#triplet = [objectApiName, primaryKey, propertyName];
932
938
  }
933
939
  async getFirstPoint() {
934
- return chunkJVLSSAAP_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
940
+ return chunkQ2XRNNC7_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
935
941
  }
936
942
  async getLastPoint() {
937
- return chunkJVLSSAAP_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
943
+ return chunkQ2XRNNC7_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
938
944
  }
939
945
  async getAllPoints(query) {
940
946
  const allPoints = [];
@@ -944,7 +950,7 @@ var TimeSeriesPropertyImpl = class {
944
950
  return allPoints;
945
951
  }
946
952
  async *asyncIterPoints(query) {
947
- const streamPointsIterator = await chunkJVLSSAAP_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
953
+ const streamPointsIterator = await chunkQ2XRNNC7_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
948
954
  range: getTimeRange(query)
949
955
  } : {});
950
956
  for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
@@ -954,19 +960,19 @@ var TimeSeriesPropertyImpl = class {
954
960
  };
955
961
 
956
962
  // src/object/formatting/applyPropertyFormatter.ts
957
- chunkLDTMSHUZ_cjs.init_cjs_shims();
963
+ chunkQPPKY7HT_cjs.init_cjs_shims();
958
964
 
959
965
  // src/object/formatting/formatBoolean.ts
960
- chunkLDTMSHUZ_cjs.init_cjs_shims();
966
+ chunkQPPKY7HT_cjs.init_cjs_shims();
961
967
  function formatBoolean(value, rule) {
962
968
  return value ? rule.valueIfTrue : rule.valueIfFalse;
963
969
  }
964
970
 
965
971
  // src/object/formatting/formatDateTime.ts
966
- chunkLDTMSHUZ_cjs.init_cjs_shims();
972
+ chunkQPPKY7HT_cjs.init_cjs_shims();
967
973
 
968
974
  // src/object/formatting/propertyFormattingUtils.ts
969
- chunkLDTMSHUZ_cjs.init_cjs_shims();
975
+ chunkQPPKY7HT_cjs.init_cjs_shims();
970
976
  function resolvePropertyReference(ref, objectData) {
971
977
  if (ref.type === "constant") {
972
978
  return ref.value;
@@ -1116,7 +1122,7 @@ function formatRelativeToNow(date, locale, timezone) {
1116
1122
  }
1117
1123
 
1118
1124
  // src/object/formatting/formatNumber.ts
1119
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1125
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1120
1126
  function formatNumber(value, numberType, objectData, locale) {
1121
1127
  switch (numberType.type) {
1122
1128
  case "standard":
@@ -1331,20 +1337,20 @@ function formatPropertyValue(value, rule, objectData, options) {
1331
1337
  }
1332
1338
 
1333
1339
  // src/object/convertWireToOsdkObjects/getDollarAs.ts
1334
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1340
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1335
1341
 
1336
1342
  // src/ontology/OntologyProvider.ts
1337
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1343
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1338
1344
  var InterfaceDefinitions = Symbol("InterfaceDefinitions" );
1339
1345
 
1340
1346
  // src/object/convertWireToOsdkObjects/createOsdkInterface.ts
1341
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1347
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1342
1348
 
1343
1349
  // src/object/convertWireToOsdkObjects/getDollarLink.ts
1344
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1350
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1345
1351
 
1346
1352
  // src/object/convertWireToOsdkObjects/InternalSymbols.ts
1347
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1353
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1348
1354
  var UnderlyingOsdkObject = Symbol("Underlying Object" );
1349
1355
  var ObjectDefRef = Symbol("ObjectDefinition" );
1350
1356
  var InterfaceDefRef = Symbol("InterfaceDefinition" );
@@ -1362,8 +1368,8 @@ function get$link(holder) {
1362
1368
  [objDef.primaryKeyApiName]: rawObj.$primaryKey
1363
1369
  }).pivotTo(linkName);
1364
1370
  const value = !linkDef.multiplicity ? {
1365
- fetchOne: (options) => chunkJVLSSAAP_cjs.fetchSingle(client, objDef, options ?? {}, chunkJVLSSAAP_cjs.getWireObjectSet(objectSet)),
1366
- fetchOneWithErrors: (options) => chunkJVLSSAAP_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkJVLSSAAP_cjs.getWireObjectSet(objectSet))
1371
+ fetchOne: (options) => chunkQ2XRNNC7_cjs.fetchSingle(client, objDef, options ?? {}, chunkQ2XRNNC7_cjs.getWireObjectSet(objectSet)),
1372
+ fetchOneWithErrors: (options) => chunkQ2XRNNC7_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkQ2XRNNC7_cjs.getWireObjectSet(objectSet))
1367
1373
  } : objectSet;
1368
1374
  return [linkName, value];
1369
1375
  })));
@@ -1379,8 +1385,8 @@ function get$linkForInterface(holder) {
1379
1385
  [objDef.primaryKeyApiName]: rawObj.$primaryKey
1380
1386
  })).pivotTo(linkName);
1381
1387
  const value = !linkDef.multiplicity ? {
1382
- fetchOne: (options) => chunkJVLSSAAP_cjs.fetchSingle(client, objDef, options ?? {}, chunkJVLSSAAP_cjs.getWireObjectSet(objectSet)),
1383
- fetchOneWithErrors: (options) => chunkJVLSSAAP_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkJVLSSAAP_cjs.getWireObjectSet(objectSet))
1388
+ fetchOne: (options) => chunkQ2XRNNC7_cjs.fetchSingle(client, objDef, options ?? {}, chunkQ2XRNNC7_cjs.getWireObjectSet(objectSet)),
1389
+ fetchOneWithErrors: (options) => chunkQ2XRNNC7_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkQ2XRNNC7_cjs.getWireObjectSet(objectSet))
1384
1390
  } : objectSet;
1385
1391
  return [linkName, value];
1386
1392
  })));
@@ -1388,7 +1394,7 @@ function get$linkForInterface(holder) {
1388
1394
 
1389
1395
  // src/object/convertWireToOsdkObjects/createOsdkInterface.ts
1390
1396
  function createOsdkInterface(underlying, interfaceDef) {
1391
- const [objApiNamespace] = chunkJVLSSAAP_cjs.extractNamespace(interfaceDef.apiName);
1397
+ const [objApiNamespace] = chunkQ2XRNNC7_cjs.extractNamespace(interfaceDef.apiName);
1392
1398
  return Object.freeze(Object.defineProperties({}, {
1393
1399
  // first to minimize hidden classes
1394
1400
  [UnderlyingOsdkObject]: {
@@ -1451,7 +1457,7 @@ function createOsdkInterface(underlying, interfaceDef) {
1451
1457
  },
1452
1458
  ...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
1453
1459
  const objDef = underlying[ObjectDefRef];
1454
- const [apiNamespace, apiName] = chunkJVLSSAAP_cjs.extractNamespace(p);
1460
+ const [apiNamespace, apiName] = chunkQ2XRNNC7_cjs.extractNamespace(p);
1455
1461
  const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
1456
1462
  return [apiNamespace === objApiNamespace ? apiName : p, {
1457
1463
  enumerable: targetPropName in underlying,
@@ -1626,9 +1632,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
1626
1632
  switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
1627
1633
  case "attachment":
1628
1634
  if (Array.isArray(rawValue)) {
1629
- return rawValue.map((a) => chunkJVLSSAAP_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1635
+ return rawValue.map((a) => chunkQ2XRNNC7_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1630
1636
  } else {
1631
- return chunkJVLSSAAP_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1637
+ return chunkQ2XRNNC7_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1632
1638
  }
1633
1639
  default:
1634
1640
  process.env.NODE_ENV !== "production" ? invariant3__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant3__default.default(false) ;
@@ -1644,9 +1650,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
1644
1650
  }
1645
1651
  if (propDef.type === "attachment") {
1646
1652
  if (Array.isArray(rawValue)) {
1647
- return rawValue.map((a) => chunkJVLSSAAP_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1653
+ return rawValue.map((a) => chunkQ2XRNNC7_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1648
1654
  }
1649
- return chunkJVLSSAAP_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1655
+ return chunkQ2XRNNC7_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1650
1656
  }
1651
1657
  if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
1652
1658
  return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
@@ -1873,10 +1879,10 @@ function convertInterfaceToObjectTypeMappingsV2ToV1(mappingsV2) {
1873
1879
  }
1874
1880
 
1875
1881
  // src/ontology/StandardOntologyProvider.ts
1876
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1882
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1877
1883
 
1878
1884
  // src/object/Cache.ts
1879
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1885
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1880
1886
  function createClientCache(fn) {
1881
1887
  const cache = /* @__PURE__ */ new WeakMap();
1882
1888
  function get(client, key) {
@@ -1933,7 +1939,7 @@ function createAsyncClientCache(fn, createCacheLocal = createClientCache) {
1933
1939
  }
1934
1940
 
1935
1941
  // src/util/deepFreeze.ts
1936
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1942
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1937
1943
  function deepFreeze(obj) {
1938
1944
  Object.getOwnPropertyNames(obj).forEach((name) => {
1939
1945
  const prop = obj[name];
@@ -1945,18 +1951,18 @@ function deepFreeze(obj) {
1945
1951
  }
1946
1952
 
1947
1953
  // src/ontology/loadActionMetadata.ts
1948
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1954
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1949
1955
  async function loadActionMetadata(client, actionType) {
1950
- const r = await chunkJVLSSAAP_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType, {
1956
+ const r = await chunkQ2XRNNC7_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType, {
1951
1957
  branch: client.branch
1952
1958
  });
1953
1959
  return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
1954
1960
  }
1955
1961
 
1956
1962
  // src/ontology/loadFullObjectMetadata.ts
1957
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1963
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1958
1964
  async function loadFullObjectMetadata(client, objectType) {
1959
- const full = await chunkJVLSSAAP_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
1965
+ const full = await chunkQ2XRNNC7_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
1960
1966
  preview: true,
1961
1967
  branch: client.branch
1962
1968
  });
@@ -1967,9 +1973,9 @@ async function loadFullObjectMetadata(client, objectType) {
1967
1973
  }
1968
1974
 
1969
1975
  // src/ontology/loadInterfaceMetadata.ts
1970
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1976
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1971
1977
  async function loadInterfaceMetadata(client, objectType) {
1972
- const r = await chunkJVLSSAAP_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
1978
+ const r = await chunkQ2XRNNC7_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
1973
1979
  preview: true,
1974
1980
  branch: client.branch
1975
1981
  });
@@ -1977,10 +1983,10 @@ async function loadInterfaceMetadata(client, objectType) {
1977
1983
  }
1978
1984
 
1979
1985
  // src/ontology/loadQueryMetadata.ts
1980
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1986
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1981
1987
  async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
1982
1988
  const [apiName, version] = queryTypeApiNameAndVersion.split(":");
1983
- const r = await chunkJVLSSAAP_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
1989
+ const r = await chunkQ2XRNNC7_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
1984
1990
  version
1985
1991
  });
1986
1992
  return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
@@ -2037,12 +2043,12 @@ var createStandardOntologyProviderFactory = (client) => {
2037
2043
  };
2038
2044
 
2039
2045
  // src/util/UserAgent.ts
2040
- chunkLDTMSHUZ_cjs.init_cjs_shims();
2041
- var USER_AGENT = `osdk-client/${"2.8.0-beta.13"}`;
2042
- var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.8.0-beta.13"}`;
2046
+ chunkQPPKY7HT_cjs.init_cjs_shims();
2047
+ var USER_AGENT = `osdk-client/${"2.8.0-beta.15"}`;
2048
+ var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.8.0-beta.15"}`;
2043
2049
 
2044
2050
  // src/createMinimalClient.ts
2045
- function createMinimalClient(metadata2, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkJVLSSAAP_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
2051
+ function createMinimalClient(metadata2, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkQ2XRNNC7_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
2046
2052
  if (process.env.NODE_ENV !== "production") {
2047
2053
  try {
2048
2054
  new URL(baseUrl);
@@ -2072,7 +2078,7 @@ function createMinimalClient(metadata2, baseUrl, tokenProvider, options = {}, fe
2072
2078
  }
2073
2079
 
2074
2080
  // src/fetchMetadata.ts
2075
- chunkLDTMSHUZ_cjs.init_cjs_shims();
2081
+ chunkQPPKY7HT_cjs.init_cjs_shims();
2076
2082
  var fetchMetadataInternal = async (client, definition) => {
2077
2083
  if (definition.type === "object") {
2078
2084
  const {
@@ -2092,10 +2098,50 @@ var fetchMetadataInternal = async (client, definition) => {
2092
2098
  };
2093
2099
 
2094
2100
  // src/queries/applyQuery.ts
2095
- chunkLDTMSHUZ_cjs.init_cjs_shims();
2101
+ chunkQPPKY7HT_cjs.init_cjs_shims();
2102
+
2103
+ // src/createMediaFromReference.ts
2104
+ chunkQPPKY7HT_cjs.init_cjs_shims();
2105
+ function createMediaFromReference(client, mediaReference) {
2106
+ const {
2107
+ mediaSetRid,
2108
+ mediaItemRid
2109
+ } = mediaReference.reference.mediaSetViewItem;
2110
+ const token = mediaReference.reference.mediaSetViewItem.token;
2111
+ return {
2112
+ async fetchContents() {
2113
+ return MediaSet_exports.read(client, mediaSetRid, mediaItemRid, {
2114
+ preview: true
2115
+ }, token ? {
2116
+ ReadToken: token
2117
+ } : void 0);
2118
+ },
2119
+ async fetchMetadata() {
2120
+ const metadata2 = await MediaSet_exports.metadata(client, mediaSetRid, mediaItemRid, {
2121
+ preview: true
2122
+ }, token ? {
2123
+ ReadToken: token
2124
+ } : void 0);
2125
+ const info2 = await MediaSet_exports.info(client, mediaSetRid, mediaItemRid, {
2126
+ preview: true
2127
+ }, token ? {
2128
+ ReadToken: token
2129
+ } : void 0);
2130
+ return {
2131
+ path: info2.path,
2132
+ sizeBytes: metadata2.sizeBytes,
2133
+ mediaType: void 0
2134
+ // Media type is not currently returned by the API, so we return undefined here. This can be updated when the API returns media type.
2135
+ };
2136
+ },
2137
+ getMediaReference() {
2138
+ return mediaReference;
2139
+ }
2140
+ };
2141
+ }
2096
2142
 
2097
2143
  // src/util/toDataValueQueries.ts
2098
- chunkLDTMSHUZ_cjs.init_cjs_shims();
2144
+ chunkQPPKY7HT_cjs.init_cjs_shims();
2099
2145
  async function toDataValueQueries(value, client, desiredType) {
2100
2146
  if (value == null) {
2101
2147
  return value;
@@ -2115,13 +2161,13 @@ async function toDataValueQueries(value, client, desiredType) {
2115
2161
  switch (desiredType.type) {
2116
2162
  case "attachment": {
2117
2163
  if (isAttachmentUpload(value)) {
2118
- const attachment = await chunkJVLSSAAP_cjs.Attachment_exports.upload(client, value.data, {
2164
+ const attachment = await chunkQ2XRNNC7_cjs.Attachment_exports.upload(client, value.data, {
2119
2165
  filename: value.name
2120
2166
  });
2121
2167
  return attachment.rid;
2122
2168
  }
2123
2169
  if (isAttachmentFile(value)) {
2124
- const attachment = await chunkJVLSSAAP_cjs.Attachment_exports.upload(client, value, {
2170
+ const attachment = await chunkQ2XRNNC7_cjs.Attachment_exports.upload(client, value, {
2125
2171
  filename: value.name
2126
2172
  });
2127
2173
  return attachment.rid;
@@ -2138,6 +2184,22 @@ async function toDataValueQueries(value, client, desiredType) {
2138
2184
  groups: value
2139
2185
  };
2140
2186
  }
2187
+ case "mediaReference": {
2188
+ if (isMediaUpload(value)) {
2189
+ const mediaRef = await MediaSet_exports.uploadMedia(client, value.data, {
2190
+ filename: value.fileName,
2191
+ preview: true
2192
+ });
2193
+ return mediaRef;
2194
+ }
2195
+ if (isMedia(value)) {
2196
+ return value.getMediaReference();
2197
+ }
2198
+ if (isMediaReference(value)) {
2199
+ return value;
2200
+ }
2201
+ throw new Error("Expected media reference type but got value that is not a MediaReference or MediaUpload");
2202
+ }
2141
2203
  case "set": {
2142
2204
  if (value instanceof Set) {
2143
2205
  const promiseArray = Array.from(value, async (innerValue) => await toDataValueQueries(innerValue, client, desiredType["set"]));
@@ -2161,11 +2223,11 @@ async function toDataValueQueries(value, client, desiredType) {
2161
2223
  }
2162
2224
  case "objectSet":
2163
2225
  case "interfaceObjectSet": {
2164
- if (chunkJVLSSAAP_cjs.isWireObjectSet(value)) {
2226
+ if (chunkQ2XRNNC7_cjs.isWireObjectSet(value)) {
2165
2227
  return value;
2166
2228
  }
2167
- if (chunkJVLSSAAP_cjs.isObjectSet(value)) {
2168
- return chunkJVLSSAAP_cjs.getWireObjectSet(value);
2229
+ if (chunkQ2XRNNC7_cjs.isObjectSet(value)) {
2230
+ return chunkQ2XRNNC7_cjs.getWireObjectSet(value);
2169
2231
  }
2170
2232
  break;
2171
2233
  }
@@ -2210,7 +2272,7 @@ async function applyQuery(client, query, params) {
2210
2272
  if (client.flushEdits != null) {
2211
2273
  await client.flushEdits();
2212
2274
  }
2213
- const response = await chunkJVLSSAAP_cjs.Query_exports.execute(chunkJVLSSAAP_cjs.addUserAgentAndRequestContextHeaders(chunkJVLSSAAP_cjs.augmentRequestContext(client, (_) => ({
2275
+ const response = await chunkQ2XRNNC7_cjs.Query_exports.execute(chunkQ2XRNNC7_cjs.addUserAgentAndRequestContextHeaders(chunkQ2XRNNC7_cjs.augmentRequestContext(client, (_) => ({
2214
2276
  finalMethodCall: "applyQuery"
2215
2277
  })), query), await client.ontologyRid, query.apiName, {
2216
2278
  parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
@@ -2255,7 +2317,10 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
2255
2317
  return responseValue;
2256
2318
  }
2257
2319
  case "attachment": {
2258
- return chunkJVLSSAAP_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
2320
+ return chunkQ2XRNNC7_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
2321
+ }
2322
+ case "mediaReference": {
2323
+ return createMediaFromReference(client, responseValue);
2259
2324
  }
2260
2325
  case "object": {
2261
2326
  const def = definitions.get(responseDataType.object);
@@ -2277,7 +2342,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
2277
2342
  throw new Error(`Missing definition for ${responseDataType.objectSet}`);
2278
2343
  }
2279
2344
  if (typeof responseValue === "string") {
2280
- return chunkJVLSSAAP_cjs.createObjectSet(def, client, {
2345
+ return chunkQ2XRNNC7_cjs.createObjectSet(def, client, {
2281
2346
  type: "intersect",
2282
2347
  objectSets: [{
2283
2348
  type: "base",
@@ -2288,11 +2353,11 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
2288
2353
  }]
2289
2354
  });
2290
2355
  }
2291
- return chunkJVLSSAAP_cjs.createObjectSet(def, client, responseValue);
2356
+ return chunkQ2XRNNC7_cjs.createObjectSet(def, client, responseValue);
2292
2357
  }
2293
2358
  case "struct": {
2294
2359
  for (const [key, subtype] of Object.entries(responseDataType.struct)) {
2295
- if (requiresConversion(subtype)) {
2360
+ if (requiresConversion(subtype) || responseValue[key] == null) {
2296
2361
  responseValue[key] = await remapQueryResponse(client, subtype, responseValue[key], definitions);
2297
2362
  }
2298
2363
  }
@@ -2419,6 +2484,7 @@ function requiresConversion(dataType) {
2419
2484
  case "set":
2420
2485
  return requiresConversion(dataType.set);
2421
2486
  case "attachment":
2487
+ case "mediaReference":
2422
2488
  case "objectSet":
2423
2489
  case "twoDimensionalAggregation":
2424
2490
  case "threeDimensionalAggregation":
@@ -2482,7 +2548,7 @@ function createClientInternal(objectSetFactory, transactionRid, flushEdits, base
2482
2548
  ontologyRid
2483
2549
  }, baseUrl, tokenProvider, {
2484
2550
  ...options,
2485
- logger: options?.logger ?? new chunkJVLSSAAP_cjs.MinimalLogger(),
2551
+ logger: options?.logger ?? new chunkQ2XRNNC7_cjs.MinimalLogger(),
2486
2552
  transactionId: transactionRid,
2487
2553
  flushEdits,
2488
2554
  branch: options?.branch
@@ -2506,7 +2572,7 @@ function createClientFromContext(clientCtx) {
2506
2572
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
2507
2573
  return {
2508
2574
  fetchOneByRid: async (objectType, rid, options) => {
2509
- return await chunkJVLSSAAP_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2575
+ return await chunkQ2XRNNC7_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2510
2576
  }
2511
2577
  };
2512
2578
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
@@ -2518,7 +2584,7 @@ function createClientFromContext(clientCtx) {
2518
2584
  objectType,
2519
2585
  propertyType
2520
2586
  } = args;
2521
- return await chunkJVLSSAAP_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
2587
+ return await chunkQ2XRNNC7_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
2522
2588
  mediaItemPath: fileName,
2523
2589
  preview: true
2524
2590
  });
@@ -2527,10 +2593,10 @@ function createClientFromContext(clientCtx) {
2527
2593
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
2528
2594
  return {
2529
2595
  fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
2530
- return await chunkJVLSSAAP_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2596
+ return await chunkQ2XRNNC7_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2531
2597
  },
2532
2598
  fetchPageByRidNoType: async (rids, options) => {
2533
- return await chunkJVLSSAAP_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2599
+ return await chunkQ2XRNNC7_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2534
2600
  }
2535
2601
  };
2536
2602
  }
@@ -2542,13 +2608,13 @@ function createClientFromContext(clientCtx) {
2542
2608
  const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
2543
2609
  const symbolClientContext2 = "__osdkClientContext";
2544
2610
  const client = Object.defineProperties(clientFn, {
2545
- [chunkJVLSSAAP_cjs.symbolClientContext]: {
2611
+ [chunkQ2XRNNC7_cjs.symbolClientContext]: {
2546
2612
  value: clientCtx
2547
2613
  },
2548
2614
  [symbolClientContext2]: {
2549
2615
  value: clientCtx
2550
2616
  },
2551
- [chunkJVLSSAAP_cjs.additionalContext]: {
2617
+ [chunkQ2XRNNC7_cjs.additionalContext]: {
2552
2618
  value: clientCtx
2553
2619
  },
2554
2620
  fetchMetadata: {
@@ -2557,8 +2623,8 @@ function createClientFromContext(clientCtx) {
2557
2623
  });
2558
2624
  return client;
2559
2625
  }
2560
- var createClient = createClientInternal.bind(void 0, chunkJVLSSAAP_cjs.createObjectSet, void 0, void 0);
2561
- var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkJVLSSAAP_cjs.createObjectSet, transactionRid, flushEdits, ...args);
2626
+ var createClient = createClientInternal.bind(void 0, chunkQ2XRNNC7_cjs.createObjectSet, void 0, void 0);
2627
+ var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkQ2XRNNC7_cjs.createObjectSet, transactionRid, flushEdits, ...args);
2562
2628
  function createWithRid(rids) {
2563
2629
  const withRid = {
2564
2630
  type: "static",
@@ -2583,5 +2649,5 @@ exports.createOsdkObject = createOsdkObject;
2583
2649
  exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
2584
2650
  exports.getDefType = getDefType;
2585
2651
  exports.isObjectSpecifiersObject = isObjectSpecifiersObject;
2586
- //# sourceMappingURL=chunk-FE6Q5R5O.cjs.map
2587
- //# sourceMappingURL=chunk-FE6Q5R5O.cjs.map
2652
+ //# sourceMappingURL=chunk-RTSJQAWK.cjs.map
2653
+ //# sourceMappingURL=chunk-RTSJQAWK.cjs.map