@osdk/client 2.8.0-beta.12 → 2.8.0-beta.14

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 (135) hide show
  1. package/CHANGELOG.md +33 -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/objectset/ObjectSetQuery.js.map +1 -1
  31. package/build/browser/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
  32. package/build/browser/observable/internal/testUtils/observeLink/expectStandardObserveLink.js +1 -1
  33. package/build/browser/observable/internal/testUtils/observeLink/expectStandardObserveLink.js.map +1 -1
  34. package/build/browser/observable/internal/testUtils.js +2 -2
  35. package/build/browser/observable/internal/testUtils.js.map +1 -1
  36. package/build/browser/queries/applyQuery.js +10 -2
  37. package/build/browser/queries/applyQuery.js.map +1 -1
  38. package/build/browser/queries/queries.test.js +80 -2
  39. package/build/browser/queries/queries.test.js.map +1 -1
  40. package/build/browser/util/UserAgent.js +2 -2
  41. package/build/browser/util/toDataValue.js +7 -7
  42. package/build/browser/util/toDataValue.js.map +1 -1
  43. package/build/browser/util/toDataValue.test.js +23 -0
  44. package/build/browser/util/toDataValue.test.js.map +1 -1
  45. package/build/browser/util/toDataValueQueries.js +19 -0
  46. package/build/browser/util/toDataValueQueries.js.map +1 -1
  47. package/build/cjs/{chunk-22QZVXHI.cjs → chunk-4HVAJSMV.cjs} +205 -123
  48. package/build/cjs/chunk-4HVAJSMV.cjs.map +1 -0
  49. package/build/cjs/{chunk-YVZM2JPW.cjs → chunk-Q2XRNNC7.cjs} +95 -90
  50. package/build/cjs/chunk-Q2XRNNC7.cjs.map +1 -0
  51. package/build/cjs/{chunk-LDTMSHUZ.cjs → chunk-QPPKY7HT.cjs} +4 -4
  52. package/build/cjs/{chunk-LDTMSHUZ.cjs.map → chunk-QPPKY7HT.cjs.map} +1 -1
  53. package/build/cjs/createObjectSet-BagR_R7M.d.cts +15 -0
  54. package/build/cjs/index.cjs +20 -12
  55. package/build/cjs/index.cjs.map +1 -1
  56. package/build/cjs/index.d.cts +2 -1
  57. package/build/cjs/public/internal-node.cjs +219 -219
  58. package/build/cjs/public/internal.cjs +14 -14
  59. package/build/cjs/public/unstable-do-not-use.cjs +148 -144
  60. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  61. package/build/cjs/public/unstable-do-not-use.d.cts +11 -14
  62. package/build/esm/createMediaFromReference.js +61 -0
  63. package/build/esm/createMediaFromReference.js.map +1 -0
  64. package/build/esm/index.js +1 -0
  65. package/build/esm/index.js.map +1 -1
  66. package/build/esm/object/mediaUpload.js +3 -0
  67. package/build/esm/object/mediaUpload.js.map +1 -1
  68. package/build/esm/observable/LinkPayload.js.map +1 -1
  69. package/build/esm/observable/ListPayload.js.map +1 -1
  70. package/build/esm/observable/ObservableClient/ObserveLink.js.map +1 -1
  71. package/build/esm/observable/ObservableClient.js.map +1 -1
  72. package/build/esm/observable/computeObjectSetCacheKey.js.map +1 -1
  73. package/build/esm/observable/internal/ListQueryView.js +4 -3
  74. package/build/esm/observable/internal/ListQueryView.js.map +1 -1
  75. package/build/esm/observable/internal/ObservableClientImpl.js +1 -1
  76. package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -1
  77. package/build/esm/observable/internal/Store.test.js +11 -11
  78. package/build/esm/observable/internal/Store.test.js.map +1 -1
  79. package/build/esm/observable/internal/base-list/BaseCollectionQuery.js.map +1 -1
  80. package/build/esm/observable/internal/base-list/BaseListQuery.js +12 -13
  81. package/build/esm/observable/internal/base-list/BaseListQuery.js.map +1 -1
  82. package/build/esm/observable/internal/base-list/createCollectionConnectable.js +2 -2
  83. package/build/esm/observable/internal/base-list/createCollectionConnectable.js.map +1 -1
  84. package/build/esm/observable/internal/base-list/createCollectionConnectable.test.js +2 -2
  85. package/build/esm/observable/internal/base-list/createCollectionConnectable.test.js.map +1 -1
  86. package/build/esm/observable/internal/list/InterfaceListQuery.js +1 -1
  87. package/build/esm/observable/internal/list/InterfaceListQuery.js.map +1 -1
  88. package/build/esm/observable/internal/list/ListQuery.test.js +45 -46
  89. package/build/esm/observable/internal/list/ListQuery.test.js.map +1 -1
  90. package/build/esm/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
  91. package/build/esm/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
  92. package/build/esm/observable/internal/testUtils/observeLink/expectStandardObserveLink.js +1 -1
  93. package/build/esm/observable/internal/testUtils/observeLink/expectStandardObserveLink.js.map +1 -1
  94. package/build/esm/observable/internal/testUtils.js +2 -2
  95. package/build/esm/observable/internal/testUtils.js.map +1 -1
  96. package/build/esm/queries/applyQuery.js +10 -2
  97. package/build/esm/queries/applyQuery.js.map +1 -1
  98. package/build/esm/queries/queries.test.js +80 -2
  99. package/build/esm/queries/queries.test.js.map +1 -1
  100. package/build/esm/util/UserAgent.js +2 -2
  101. package/build/esm/util/toDataValue.js +7 -7
  102. package/build/esm/util/toDataValue.js.map +1 -1
  103. package/build/esm/util/toDataValue.test.js +23 -0
  104. package/build/esm/util/toDataValue.test.js.map +1 -1
  105. package/build/esm/util/toDataValueQueries.js +19 -0
  106. package/build/esm/util/toDataValueQueries.js.map +1 -1
  107. package/build/types/createMediaFromReference.d.ts +1 -0
  108. package/build/types/createMediaFromReference.d.ts.map +1 -0
  109. package/build/types/index.d.ts +2 -0
  110. package/build/types/index.d.ts.map +1 -1
  111. package/build/types/object/mediaUpload.d.ts +2 -1
  112. package/build/types/object/mediaUpload.d.ts.map +1 -1
  113. package/build/types/observable/LinkPayload.d.ts +1 -1
  114. package/build/types/observable/ListPayload.d.ts +1 -1
  115. package/build/types/observable/ObservableClient/ObserveLink.d.ts +1 -1
  116. package/build/types/observable/ObservableClient.d.ts +4 -4
  117. package/build/types/observable/ObservableClient.d.ts.map +1 -1
  118. package/build/types/observable/computeObjectSetCacheKey.d.ts +2 -2
  119. package/build/types/observable/computeObjectSetCacheKey.d.ts.map +1 -1
  120. package/build/types/observable/internal/ListQueryView.d.ts.map +1 -1
  121. package/build/types/observable/internal/Store.test.d.ts.map +1 -1
  122. package/build/types/observable/internal/base-list/BaseCollectionQuery.d.ts +4 -4
  123. package/build/types/observable/internal/base-list/BaseListQuery.d.ts +1 -1
  124. package/build/types/observable/internal/base-list/BaseListQuery.d.ts.map +1 -1
  125. package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts +1 -1
  126. package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts.map +1 -1
  127. package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts +2 -2
  128. package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts.map +1 -1
  129. package/build/types/observable/internal/testUtils.d.ts +1 -1
  130. package/build/types/observable/internal/testUtils.d.ts.map +1 -1
  131. package/build/types/queries/applyQuery.d.ts.map +1 -1
  132. package/package.json +13 -13
  133. package/build/cjs/chunk-22QZVXHI.cjs.map +0 -1
  134. package/build/cjs/chunk-YVZM2JPW.cjs.map +0 -1
  135. package/build/cjs/createClient-BPK4om7e.d.cts +0 -10
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkYVZM2JPW_cjs = require('./chunk-YVZM2JPW.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,87 +409,105 @@ 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
- // ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.47.0/node_modules/@osdk/foundry.mediasets/build/esm/index.js
418
- chunkLDTMSHUZ_cjs.init_cjs_shims();
417
+ // ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.50.0/node_modules/@osdk/foundry.mediasets/build/esm/index.js
418
+ chunkQPPKY7HT_cjs.init_cjs_shims();
419
419
 
420
- // ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.47.0/node_modules/@osdk/foundry.mediasets/build/esm/public/MediaSet.js
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,
426
426
  create: () => create,
427
+ getResult: () => getResult,
427
428
  getRidByPath: () => getRidByPath,
429
+ getStatus: () => getStatus,
428
430
  info: () => info,
429
431
  metadata: () => metadata,
430
432
  read: () => read,
431
433
  readOriginal: () => readOriginal,
432
434
  reference: () => reference,
433
435
  retrieve: () => retrieve,
436
+ transform: () => transform,
434
437
  upload: () => upload,
435
438
  uploadMedia: () => uploadMedia
436
439
  });
437
- chunkLDTMSHUZ_cjs.init_cjs_shims();
440
+ chunkQPPKY7HT_cjs.init_cjs_shims();
438
441
  var _abort = [1, "/v2/mediasets/{0}/transactions/{1}/abort", 2];
439
442
  function abort($ctx, ...args) {
440
- return chunkYVZM2JPW_cjs.foundryPlatformFetch($ctx, _abort, ...args);
443
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _abort, ...args);
441
444
  }
442
445
  var _calculate = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/calculate", 6];
443
446
  function calculate($ctx, ...args) {
444
- return chunkYVZM2JPW_cjs.foundryPlatformFetch($ctx, _calculate, ...args);
447
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _calculate, ...args);
445
448
  }
446
449
  var _commit = [1, "/v2/mediasets/{0}/transactions/{1}/commit", 2];
447
450
  function commit($ctx, ...args) {
448
- return chunkYVZM2JPW_cjs.foundryPlatformFetch($ctx, _commit, ...args);
451
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _commit, ...args);
449
452
  }
450
453
  var _create = [1, "/v2/mediasets/{0}/transactions", 2];
451
454
  function create($ctx, ...args) {
452
- return chunkYVZM2JPW_cjs.foundryPlatformFetch($ctx, _create, ...args);
455
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _create, ...args);
453
456
  }
454
457
  var _info = [0, "/v2/mediasets/{0}/items/{1}", 6];
455
458
  function info($ctx, ...args) {
456
- return chunkYVZM2JPW_cjs.foundryPlatformFetch($ctx, _info, ...args);
459
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _info, ...args);
457
460
  }
458
461
  var _metadata = [0, "/v2/mediasets/{0}/items/{1}/metadata", 6];
459
462
  function metadata($ctx, ...args) {
460
- return chunkYVZM2JPW_cjs.foundryPlatformFetch($ctx, _metadata, ...args);
463
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _metadata, ...args);
461
464
  }
462
465
  var _reference = [0, "/v2/mediasets/{0}/items/{1}/reference", 6];
463
466
  function reference($ctx, ...args) {
464
- return chunkYVZM2JPW_cjs.foundryPlatformFetch($ctx, _reference, ...args);
467
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _reference, ...args);
465
468
  }
466
469
  var _getRidByPath = [0, "/v2/mediasets/{0}/items/getRidByPath", 2];
467
470
  function getRidByPath($ctx, ...args) {
468
- return chunkYVZM2JPW_cjs.foundryPlatformFetch($ctx, _getRidByPath, ...args);
471
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _getRidByPath, ...args);
472
+ }
473
+ var _getResult = [0, "/v2/mediasets/{0}/items/{1}/transformationJobs/{2}/result", 6, , "*/*"];
474
+ function getResult($ctx, ...args) {
475
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _getResult, ...args);
476
+ }
477
+ var _getStatus = [0, "/v2/mediasets/{0}/items/{1}/transformationJobs/{2}", 6];
478
+ function getStatus($ctx, ...args) {
479
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _getStatus, ...args);
469
480
  }
470
481
  var _upload = [1, "/v2/mediasets/{0}/items", 3, "*/*"];
471
482
  function upload($ctx, ...args) {
472
- return chunkYVZM2JPW_cjs.foundryPlatformFetch($ctx, _upload, ...args);
483
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _upload, ...args);
473
484
  }
474
485
  var _read = [0, "/v2/mediasets/{0}/items/{1}/content", 6, , "*/*"];
475
486
  function read($ctx, ...args) {
476
- return chunkYVZM2JPW_cjs.foundryPlatformFetch($ctx, _read, ...args);
487
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _read, ...args);
477
488
  }
478
489
  var _readOriginal = [0, "/v2/mediasets/{0}/items/{1}/original", 6, , "*/*"];
479
490
  function readOriginal($ctx, ...args) {
480
- return chunkYVZM2JPW_cjs.foundryPlatformFetch($ctx, _readOriginal, ...args);
491
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _readOriginal, ...args);
481
492
  }
482
493
  var _retrieve = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/retrieve", 6, , "*/*"];
483
494
  function retrieve($ctx, ...args) {
484
- return chunkYVZM2JPW_cjs.foundryPlatformFetch($ctx, _retrieve, ...args);
495
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _retrieve, ...args);
496
+ }
497
+ var _transform = [1, "/v2/mediasets/{0}/items/{1}/transform", 7];
498
+ function transform($ctx, ...args) {
499
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _transform, ...args);
485
500
  }
486
501
  var _uploadMedia = [2, "/v2/mediasets/media/upload", 7, "*/*"];
487
502
  function uploadMedia($ctx, ...args) {
488
- return chunkYVZM2JPW_cjs.foundryPlatformFetch($ctx, _uploadMedia, ...args);
503
+ return chunkQ2XRNNC7_cjs.foundryPlatformFetch($ctx, _uploadMedia, ...args);
489
504
  }
490
505
 
491
506
  // src/object/mediaUpload.ts
492
- 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
+ }
493
511
  function isMediaReference(o) {
494
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";
495
513
  }
@@ -498,7 +516,7 @@ function isMediaUpload(o) {
498
516
  }
499
517
 
500
518
  // src/util/interfaceUtils.ts
501
- chunkLDTMSHUZ_cjs.init_cjs_shims();
519
+ chunkQPPKY7HT_cjs.init_cjs_shims();
502
520
  function getDefType(apiNameOrDef) {
503
521
  return typeof apiNameOrDef === "string" ? "object" : apiNameOrDef.type;
504
522
  }
@@ -513,19 +531,19 @@ function isInterfaceSpecifier(o) {
513
531
  }
514
532
 
515
533
  // src/util/isObjectSpecifiersObject.ts
516
- chunkLDTMSHUZ_cjs.init_cjs_shims();
534
+ chunkQPPKY7HT_cjs.init_cjs_shims();
517
535
  function isObjectSpecifiersObject(o) {
518
536
  return o && typeof o === "object" && typeof o.$apiName === "string" && o.$primaryKey != null;
519
537
  }
520
538
 
521
539
  // src/util/isOntologyObjectV2.ts
522
- chunkLDTMSHUZ_cjs.init_cjs_shims();
540
+ chunkQPPKY7HT_cjs.init_cjs_shims();
523
541
  function isOntologyObjectV2(o) {
524
542
  return o && typeof o === "object" && typeof o.__apiName === "string" && o.__primaryKey != null;
525
543
  }
526
544
 
527
545
  // src/util/isPoint.ts
528
- chunkLDTMSHUZ_cjs.init_cjs_shims();
546
+ chunkQPPKY7HT_cjs.init_cjs_shims();
529
547
  function isPoint(o) {
530
548
  return o && typeof o === "object" && "type" in o && o.type === "Point" && "coordinates" in o && o.coordinates.length === 2;
531
549
  }
@@ -548,13 +566,13 @@ async function toDataValue(value, client, actionMetadata) {
548
566
  return Promise.all(promiseArray);
549
567
  }
550
568
  if (isAttachmentUpload(value)) {
551
- const attachment = await chunkYVZM2JPW_cjs.Attachment_exports.upload(client, value.data, {
569
+ const attachment = await chunkQ2XRNNC7_cjs.Attachment_exports.upload(client, value.data, {
552
570
  filename: value.name
553
571
  });
554
572
  return await toDataValue(attachment.rid, client);
555
573
  }
556
574
  if (isAttachmentFile(value)) {
557
- const attachment = await chunkYVZM2JPW_cjs.Attachment_exports.upload(client, value, {
575
+ const attachment = await chunkQ2XRNNC7_cjs.Attachment_exports.upload(client, value, {
558
576
  filename: value.name
559
577
  });
560
578
  return await toDataValue(attachment.rid, client);
@@ -566,6 +584,12 @@ async function toDataValue(value, client, actionMetadata) {
566
584
  });
567
585
  return await toDataValue(mediaRef, client);
568
586
  }
587
+ if (isMedia(value)) {
588
+ return value.getMediaReference();
589
+ }
590
+ if (isMediaReference(value)) {
591
+ return value;
592
+ }
569
593
  if (isOntologyObjectV2(value)) {
570
594
  return await toDataValue(value.__primaryKey, client);
571
595
  }
@@ -575,14 +599,11 @@ async function toDataValue(value, client, actionMetadata) {
575
599
  if (isPoint(value)) {
576
600
  return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client);
577
601
  }
578
- if (chunkYVZM2JPW_cjs.isWireObjectSet(value)) {
602
+ if (chunkQ2XRNNC7_cjs.isWireObjectSet(value)) {
579
603
  return value;
580
604
  }
581
- if (chunkYVZM2JPW_cjs.isObjectSet(value)) {
582
- return chunkYVZM2JPW_cjs.getWireObjectSet(value);
583
- }
584
- if (isMediaReference(value)) {
585
- return value;
605
+ if (chunkQ2XRNNC7_cjs.isObjectSet(value)) {
606
+ return chunkQ2XRNNC7_cjs.getWireObjectSet(value);
586
607
  }
587
608
  if (isInterfaceActionParam(value)) {
588
609
  return {
@@ -602,11 +623,11 @@ async function toDataValue(value, client, actionMetadata) {
602
623
 
603
624
  // src/actions/applyAction.ts
604
625
  async function applyAction(client, action, parameters, options = {}) {
605
- const clientWithHeaders = chunkYVZM2JPW_cjs.addUserAgentAndRequestContextHeaders(chunkYVZM2JPW_cjs.augmentRequestContext(client, (_) => ({
626
+ const clientWithHeaders = chunkQ2XRNNC7_cjs.addUserAgentAndRequestContextHeaders(chunkQ2XRNNC7_cjs.augmentRequestContext(client, (_) => ({
606
627
  finalMethodCall: "applyAction"
607
628
  })), action);
608
629
  if (Array.isArray(parameters)) {
609
- const response = await chunkYVZM2JPW_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, {
610
631
  requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)) : [],
611
632
  options: {
612
633
  returnEdits: options?.$returnEdits ? "ALL" : "NONE"
@@ -617,7 +638,7 @@ async function applyAction(client, action, parameters, options = {}) {
617
638
  const edits = response.edits;
618
639
  return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
619
640
  } else {
620
- const response = await chunkYVZM2JPW_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, {
621
642
  parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
622
643
  options: {
623
644
  mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
@@ -707,22 +728,22 @@ function remapActionResponse(response) {
707
728
  }
708
729
 
709
730
  // src/createMinimalClient.ts
710
- chunkLDTMSHUZ_cjs.init_cjs_shims();
731
+ chunkQPPKY7HT_cjs.init_cjs_shims();
711
732
 
712
733
  // src/object/convertWireToOsdkObjects.ts
713
- chunkLDTMSHUZ_cjs.init_cjs_shims();
734
+ chunkQPPKY7HT_cjs.init_cjs_shims();
714
735
 
715
736
  // src/object/convertWireToOsdkObjects/createOsdkObject.ts
716
- chunkLDTMSHUZ_cjs.init_cjs_shims();
737
+ chunkQPPKY7HT_cjs.init_cjs_shims();
717
738
 
718
739
  // src/createGeotimeSeriesProperty.ts
719
- chunkLDTMSHUZ_cjs.init_cjs_shims();
740
+ chunkQPPKY7HT_cjs.init_cjs_shims();
720
741
 
721
742
  // src/util/timeseriesUtils.ts
722
- chunkLDTMSHUZ_cjs.init_cjs_shims();
743
+ chunkQPPKY7HT_cjs.init_cjs_shims();
723
744
 
724
745
  // src/util/streamutils.ts
725
- chunkLDTMSHUZ_cjs.init_cjs_shims();
746
+ chunkQPPKY7HT_cjs.init_cjs_shims();
726
747
  var START_TOKEN = new Uint8Array([123, 34, 100, 97, 116, 97, 34, 58, 91]);
727
748
  var OBJECT_OPEN_CHAR_CODE = 123;
728
749
  var OBJECT_CLOSE_CHAR_CODE = 125;
@@ -841,7 +862,7 @@ var GeotimeSeriesPropertyImpl = class {
841
862
  }
842
863
  }
843
864
  async getLatestValue() {
844
- const latestPointPromise = chunkYVZM2JPW_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);
845
866
  latestPointPromise.then(
846
867
  (latestPoint) => this.lastFetchedValue = latestPoint,
847
868
  // eslint-disable-next-line no-console
@@ -857,7 +878,7 @@ var GeotimeSeriesPropertyImpl = class {
857
878
  return allPoints;
858
879
  }
859
880
  async *asyncIterValues(query) {
860
- const streamPointsIterator = await chunkYVZM2JPW_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 ? {
861
882
  range: getTimeRange(query)
862
883
  } : {});
863
884
  for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
@@ -867,7 +888,7 @@ var GeotimeSeriesPropertyImpl = class {
867
888
  };
868
889
 
869
890
  // src/createMediaReferenceProperty.ts
870
- chunkLDTMSHUZ_cjs.init_cjs_shims();
891
+ chunkQPPKY7HT_cjs.init_cjs_shims();
871
892
  var MediaReferencePropertyImpl = class {
872
893
  #mediaReference;
873
894
  #triplet;
@@ -885,13 +906,13 @@ var MediaReferencePropertyImpl = class {
885
906
  this.#mediaReference = mediaReference;
886
907
  }
887
908
  async fetchContents() {
888
- return chunkYVZM2JPW_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, {
889
910
  preview: true
890
911
  // TODO: Can turn this back off when backend is no longer in beta.
891
912
  });
892
913
  }
893
914
  async fetchMetadata() {
894
- const r = await chunkYVZM2JPW_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, {
895
916
  preview: true
896
917
  // TODO: Can turn this back off when backend is no longer in beta.
897
918
  });
@@ -907,7 +928,7 @@ var MediaReferencePropertyImpl = class {
907
928
  };
908
929
 
909
930
  // src/createTimeseriesProperty.ts
910
- chunkLDTMSHUZ_cjs.init_cjs_shims();
931
+ chunkQPPKY7HT_cjs.init_cjs_shims();
911
932
  var TimeSeriesPropertyImpl = class {
912
933
  #triplet;
913
934
  #client;
@@ -916,10 +937,10 @@ var TimeSeriesPropertyImpl = class {
916
937
  this.#triplet = [objectApiName, primaryKey, propertyName];
917
938
  }
918
939
  async getFirstPoint() {
919
- return chunkYVZM2JPW_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);
920
941
  }
921
942
  async getLastPoint() {
922
- return chunkYVZM2JPW_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);
923
944
  }
924
945
  async getAllPoints(query) {
925
946
  const allPoints = [];
@@ -929,7 +950,7 @@ var TimeSeriesPropertyImpl = class {
929
950
  return allPoints;
930
951
  }
931
952
  async *asyncIterPoints(query) {
932
- const streamPointsIterator = await chunkYVZM2JPW_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 ? {
933
954
  range: getTimeRange(query)
934
955
  } : {});
935
956
  for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
@@ -939,19 +960,19 @@ var TimeSeriesPropertyImpl = class {
939
960
  };
940
961
 
941
962
  // src/object/formatting/applyPropertyFormatter.ts
942
- chunkLDTMSHUZ_cjs.init_cjs_shims();
963
+ chunkQPPKY7HT_cjs.init_cjs_shims();
943
964
 
944
965
  // src/object/formatting/formatBoolean.ts
945
- chunkLDTMSHUZ_cjs.init_cjs_shims();
966
+ chunkQPPKY7HT_cjs.init_cjs_shims();
946
967
  function formatBoolean(value, rule) {
947
968
  return value ? rule.valueIfTrue : rule.valueIfFalse;
948
969
  }
949
970
 
950
971
  // src/object/formatting/formatDateTime.ts
951
- chunkLDTMSHUZ_cjs.init_cjs_shims();
972
+ chunkQPPKY7HT_cjs.init_cjs_shims();
952
973
 
953
974
  // src/object/formatting/propertyFormattingUtils.ts
954
- chunkLDTMSHUZ_cjs.init_cjs_shims();
975
+ chunkQPPKY7HT_cjs.init_cjs_shims();
955
976
  function resolvePropertyReference(ref, objectData) {
956
977
  if (ref.type === "constant") {
957
978
  return ref.value;
@@ -1101,7 +1122,7 @@ function formatRelativeToNow(date, locale, timezone) {
1101
1122
  }
1102
1123
 
1103
1124
  // src/object/formatting/formatNumber.ts
1104
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1125
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1105
1126
  function formatNumber(value, numberType, objectData, locale) {
1106
1127
  switch (numberType.type) {
1107
1128
  case "standard":
@@ -1316,20 +1337,20 @@ function formatPropertyValue(value, rule, objectData, options) {
1316
1337
  }
1317
1338
 
1318
1339
  // src/object/convertWireToOsdkObjects/getDollarAs.ts
1319
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1340
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1320
1341
 
1321
1342
  // src/ontology/OntologyProvider.ts
1322
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1343
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1323
1344
  var InterfaceDefinitions = Symbol("InterfaceDefinitions" );
1324
1345
 
1325
1346
  // src/object/convertWireToOsdkObjects/createOsdkInterface.ts
1326
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1347
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1327
1348
 
1328
1349
  // src/object/convertWireToOsdkObjects/getDollarLink.ts
1329
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1350
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1330
1351
 
1331
1352
  // src/object/convertWireToOsdkObjects/InternalSymbols.ts
1332
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1353
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1333
1354
  var UnderlyingOsdkObject = Symbol("Underlying Object" );
1334
1355
  var ObjectDefRef = Symbol("ObjectDefinition" );
1335
1356
  var InterfaceDefRef = Symbol("InterfaceDefinition" );
@@ -1347,8 +1368,8 @@ function get$link(holder) {
1347
1368
  [objDef.primaryKeyApiName]: rawObj.$primaryKey
1348
1369
  }).pivotTo(linkName);
1349
1370
  const value = !linkDef.multiplicity ? {
1350
- fetchOne: (options) => chunkYVZM2JPW_cjs.fetchSingle(client, objDef, options ?? {}, chunkYVZM2JPW_cjs.getWireObjectSet(objectSet)),
1351
- fetchOneWithErrors: (options) => chunkYVZM2JPW_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkYVZM2JPW_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))
1352
1373
  } : objectSet;
1353
1374
  return [linkName, value];
1354
1375
  })));
@@ -1364,8 +1385,8 @@ function get$linkForInterface(holder) {
1364
1385
  [objDef.primaryKeyApiName]: rawObj.$primaryKey
1365
1386
  })).pivotTo(linkName);
1366
1387
  const value = !linkDef.multiplicity ? {
1367
- fetchOne: (options) => chunkYVZM2JPW_cjs.fetchSingle(client, objDef, options ?? {}, chunkYVZM2JPW_cjs.getWireObjectSet(objectSet)),
1368
- fetchOneWithErrors: (options) => chunkYVZM2JPW_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkYVZM2JPW_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))
1369
1390
  } : objectSet;
1370
1391
  return [linkName, value];
1371
1392
  })));
@@ -1373,7 +1394,7 @@ function get$linkForInterface(holder) {
1373
1394
 
1374
1395
  // src/object/convertWireToOsdkObjects/createOsdkInterface.ts
1375
1396
  function createOsdkInterface(underlying, interfaceDef) {
1376
- const [objApiNamespace] = chunkYVZM2JPW_cjs.extractNamespace(interfaceDef.apiName);
1397
+ const [objApiNamespace] = chunkQ2XRNNC7_cjs.extractNamespace(interfaceDef.apiName);
1377
1398
  return Object.freeze(Object.defineProperties({}, {
1378
1399
  // first to minimize hidden classes
1379
1400
  [UnderlyingOsdkObject]: {
@@ -1436,7 +1457,7 @@ function createOsdkInterface(underlying, interfaceDef) {
1436
1457
  },
1437
1458
  ...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
1438
1459
  const objDef = underlying[ObjectDefRef];
1439
- const [apiNamespace, apiName] = chunkYVZM2JPW_cjs.extractNamespace(p);
1460
+ const [apiNamespace, apiName] = chunkQ2XRNNC7_cjs.extractNamespace(p);
1440
1461
  const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
1441
1462
  return [apiNamespace === objApiNamespace ? apiName : p, {
1442
1463
  enumerable: targetPropName in underlying,
@@ -1611,9 +1632,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
1611
1632
  switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
1612
1633
  case "attachment":
1613
1634
  if (Array.isArray(rawValue)) {
1614
- return rawValue.map((a) => chunkYVZM2JPW_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1635
+ return rawValue.map((a) => chunkQ2XRNNC7_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1615
1636
  } else {
1616
- return chunkYVZM2JPW_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1637
+ return chunkQ2XRNNC7_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1617
1638
  }
1618
1639
  default:
1619
1640
  process.env.NODE_ENV !== "production" ? invariant3__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant3__default.default(false) ;
@@ -1629,9 +1650,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
1629
1650
  }
1630
1651
  if (propDef.type === "attachment") {
1631
1652
  if (Array.isArray(rawValue)) {
1632
- return rawValue.map((a) => chunkYVZM2JPW_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1653
+ return rawValue.map((a) => chunkQ2XRNNC7_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1633
1654
  }
1634
- return chunkYVZM2JPW_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1655
+ return chunkQ2XRNNC7_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1635
1656
  }
1636
1657
  if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
1637
1658
  return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
@@ -1858,10 +1879,10 @@ function convertInterfaceToObjectTypeMappingsV2ToV1(mappingsV2) {
1858
1879
  }
1859
1880
 
1860
1881
  // src/ontology/StandardOntologyProvider.ts
1861
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1882
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1862
1883
 
1863
1884
  // src/object/Cache.ts
1864
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1885
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1865
1886
  function createClientCache(fn) {
1866
1887
  const cache = /* @__PURE__ */ new WeakMap();
1867
1888
  function get(client, key) {
@@ -1918,7 +1939,7 @@ function createAsyncClientCache(fn, createCacheLocal = createClientCache) {
1918
1939
  }
1919
1940
 
1920
1941
  // src/util/deepFreeze.ts
1921
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1942
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1922
1943
  function deepFreeze(obj) {
1923
1944
  Object.getOwnPropertyNames(obj).forEach((name) => {
1924
1945
  const prop = obj[name];
@@ -1930,18 +1951,18 @@ function deepFreeze(obj) {
1930
1951
  }
1931
1952
 
1932
1953
  // src/ontology/loadActionMetadata.ts
1933
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1954
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1934
1955
  async function loadActionMetadata(client, actionType) {
1935
- const r = await chunkYVZM2JPW_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType, {
1956
+ const r = await chunkQ2XRNNC7_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType, {
1936
1957
  branch: client.branch
1937
1958
  });
1938
1959
  return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
1939
1960
  }
1940
1961
 
1941
1962
  // src/ontology/loadFullObjectMetadata.ts
1942
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1963
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1943
1964
  async function loadFullObjectMetadata(client, objectType) {
1944
- const full = await chunkYVZM2JPW_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
1965
+ const full = await chunkQ2XRNNC7_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
1945
1966
  preview: true,
1946
1967
  branch: client.branch
1947
1968
  });
@@ -1952,9 +1973,9 @@ async function loadFullObjectMetadata(client, objectType) {
1952
1973
  }
1953
1974
 
1954
1975
  // src/ontology/loadInterfaceMetadata.ts
1955
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1976
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1956
1977
  async function loadInterfaceMetadata(client, objectType) {
1957
- const r = await chunkYVZM2JPW_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
1978
+ const r = await chunkQ2XRNNC7_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
1958
1979
  preview: true,
1959
1980
  branch: client.branch
1960
1981
  });
@@ -1962,10 +1983,10 @@ async function loadInterfaceMetadata(client, objectType) {
1962
1983
  }
1963
1984
 
1964
1985
  // src/ontology/loadQueryMetadata.ts
1965
- chunkLDTMSHUZ_cjs.init_cjs_shims();
1986
+ chunkQPPKY7HT_cjs.init_cjs_shims();
1966
1987
  async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
1967
1988
  const [apiName, version] = queryTypeApiNameAndVersion.split(":");
1968
- const r = await chunkYVZM2JPW_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
1989
+ const r = await chunkQ2XRNNC7_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
1969
1990
  version
1970
1991
  });
1971
1992
  return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
@@ -2022,12 +2043,12 @@ var createStandardOntologyProviderFactory = (client) => {
2022
2043
  };
2023
2044
 
2024
2045
  // src/util/UserAgent.ts
2025
- chunkLDTMSHUZ_cjs.init_cjs_shims();
2026
- var USER_AGENT = `osdk-client/${"2.8.0-beta.12"}`;
2027
- var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.8.0-beta.12"}`;
2046
+ chunkQPPKY7HT_cjs.init_cjs_shims();
2047
+ var USER_AGENT = `osdk-client/${"2.8.0-beta.14"}`;
2048
+ var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.8.0-beta.14"}`;
2028
2049
 
2029
2050
  // src/createMinimalClient.ts
2030
- function createMinimalClient(metadata2, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkYVZM2JPW_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
2051
+ function createMinimalClient(metadata2, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkQ2XRNNC7_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
2031
2052
  if (process.env.NODE_ENV !== "production") {
2032
2053
  try {
2033
2054
  new URL(baseUrl);
@@ -2057,7 +2078,7 @@ function createMinimalClient(metadata2, baseUrl, tokenProvider, options = {}, fe
2057
2078
  }
2058
2079
 
2059
2080
  // src/fetchMetadata.ts
2060
- chunkLDTMSHUZ_cjs.init_cjs_shims();
2081
+ chunkQPPKY7HT_cjs.init_cjs_shims();
2061
2082
  var fetchMetadataInternal = async (client, definition) => {
2062
2083
  if (definition.type === "object") {
2063
2084
  const {
@@ -2077,10 +2098,50 @@ var fetchMetadataInternal = async (client, definition) => {
2077
2098
  };
2078
2099
 
2079
2100
  // src/queries/applyQuery.ts
2080
- 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
+ }
2081
2142
 
2082
2143
  // src/util/toDataValueQueries.ts
2083
- chunkLDTMSHUZ_cjs.init_cjs_shims();
2144
+ chunkQPPKY7HT_cjs.init_cjs_shims();
2084
2145
  async function toDataValueQueries(value, client, desiredType) {
2085
2146
  if (value == null) {
2086
2147
  return value;
@@ -2100,13 +2161,13 @@ async function toDataValueQueries(value, client, desiredType) {
2100
2161
  switch (desiredType.type) {
2101
2162
  case "attachment": {
2102
2163
  if (isAttachmentUpload(value)) {
2103
- const attachment = await chunkYVZM2JPW_cjs.Attachment_exports.upload(client, value.data, {
2164
+ const attachment = await chunkQ2XRNNC7_cjs.Attachment_exports.upload(client, value.data, {
2104
2165
  filename: value.name
2105
2166
  });
2106
2167
  return attachment.rid;
2107
2168
  }
2108
2169
  if (isAttachmentFile(value)) {
2109
- const attachment = await chunkYVZM2JPW_cjs.Attachment_exports.upload(client, value, {
2170
+ const attachment = await chunkQ2XRNNC7_cjs.Attachment_exports.upload(client, value, {
2110
2171
  filename: value.name
2111
2172
  });
2112
2173
  return attachment.rid;
@@ -2123,6 +2184,22 @@ async function toDataValueQueries(value, client, desiredType) {
2123
2184
  groups: value
2124
2185
  };
2125
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
+ }
2126
2203
  case "set": {
2127
2204
  if (value instanceof Set) {
2128
2205
  const promiseArray = Array.from(value, async (innerValue) => await toDataValueQueries(innerValue, client, desiredType["set"]));
@@ -2146,11 +2223,11 @@ async function toDataValueQueries(value, client, desiredType) {
2146
2223
  }
2147
2224
  case "objectSet":
2148
2225
  case "interfaceObjectSet": {
2149
- if (chunkYVZM2JPW_cjs.isWireObjectSet(value)) {
2226
+ if (chunkQ2XRNNC7_cjs.isWireObjectSet(value)) {
2150
2227
  return value;
2151
2228
  }
2152
- if (chunkYVZM2JPW_cjs.isObjectSet(value)) {
2153
- return chunkYVZM2JPW_cjs.getWireObjectSet(value);
2229
+ if (chunkQ2XRNNC7_cjs.isObjectSet(value)) {
2230
+ return chunkQ2XRNNC7_cjs.getWireObjectSet(value);
2154
2231
  }
2155
2232
  break;
2156
2233
  }
@@ -2195,13 +2272,14 @@ async function applyQuery(client, query, params) {
2195
2272
  if (client.flushEdits != null) {
2196
2273
  await client.flushEdits();
2197
2274
  }
2198
- const response = await chunkYVZM2JPW_cjs.Query_exports.execute(chunkYVZM2JPW_cjs.addUserAgentAndRequestContextHeaders(chunkYVZM2JPW_cjs.augmentRequestContext(client, (_) => ({
2275
+ const response = await chunkQ2XRNNC7_cjs.Query_exports.execute(chunkQ2XRNNC7_cjs.addUserAgentAndRequestContextHeaders(chunkQ2XRNNC7_cjs.augmentRequestContext(client, (_) => ({
2199
2276
  finalMethodCall: "applyQuery"
2200
2277
  })), query), await client.ontologyRid, query.apiName, {
2201
2278
  parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
2202
2279
  }, {
2203
2280
  version: query.isFixedVersion ? query.version : void 0,
2204
- transactionId: client.transactionId
2281
+ transactionId: client.transactionId,
2282
+ branch: client.branch
2205
2283
  });
2206
2284
  const objectOutputDefs = await getRequiredDefinitions((await qd).output, client);
2207
2285
  const remappedResponse = await remapQueryResponse(client, (await qd).output, response.value, objectOutputDefs);
@@ -2239,7 +2317,10 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
2239
2317
  return responseValue;
2240
2318
  }
2241
2319
  case "attachment": {
2242
- return chunkYVZM2JPW_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
2320
+ return chunkQ2XRNNC7_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
2321
+ }
2322
+ case "mediaReference": {
2323
+ return createMediaFromReference(client, responseValue);
2243
2324
  }
2244
2325
  case "object": {
2245
2326
  const def = definitions.get(responseDataType.object);
@@ -2261,7 +2342,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
2261
2342
  throw new Error(`Missing definition for ${responseDataType.objectSet}`);
2262
2343
  }
2263
2344
  if (typeof responseValue === "string") {
2264
- return chunkYVZM2JPW_cjs.createObjectSet(def, client, {
2345
+ return chunkQ2XRNNC7_cjs.createObjectSet(def, client, {
2265
2346
  type: "intersect",
2266
2347
  objectSets: [{
2267
2348
  type: "base",
@@ -2272,11 +2353,11 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
2272
2353
  }]
2273
2354
  });
2274
2355
  }
2275
- return chunkYVZM2JPW_cjs.createObjectSet(def, client, responseValue);
2356
+ return chunkQ2XRNNC7_cjs.createObjectSet(def, client, responseValue);
2276
2357
  }
2277
2358
  case "struct": {
2278
2359
  for (const [key, subtype] of Object.entries(responseDataType.struct)) {
2279
- if (requiresConversion(subtype)) {
2360
+ if (requiresConversion(subtype) || responseValue[key] == null) {
2280
2361
  responseValue[key] = await remapQueryResponse(client, subtype, responseValue[key], definitions);
2281
2362
  }
2282
2363
  }
@@ -2403,6 +2484,7 @@ function requiresConversion(dataType) {
2403
2484
  case "set":
2404
2485
  return requiresConversion(dataType.set);
2405
2486
  case "attachment":
2487
+ case "mediaReference":
2406
2488
  case "objectSet":
2407
2489
  case "twoDimensionalAggregation":
2408
2490
  case "threeDimensionalAggregation":
@@ -2466,7 +2548,7 @@ function createClientInternal(objectSetFactory, transactionRid, flushEdits, base
2466
2548
  ontologyRid
2467
2549
  }, baseUrl, tokenProvider, {
2468
2550
  ...options,
2469
- logger: options?.logger ?? new chunkYVZM2JPW_cjs.MinimalLogger(),
2551
+ logger: options?.logger ?? new chunkQ2XRNNC7_cjs.MinimalLogger(),
2470
2552
  transactionId: transactionRid,
2471
2553
  flushEdits,
2472
2554
  branch: options?.branch
@@ -2490,7 +2572,7 @@ function createClientFromContext(clientCtx) {
2490
2572
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
2491
2573
  return {
2492
2574
  fetchOneByRid: async (objectType, rid, options) => {
2493
- return await chunkYVZM2JPW_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2575
+ return await chunkQ2XRNNC7_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2494
2576
  }
2495
2577
  };
2496
2578
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
@@ -2502,7 +2584,7 @@ function createClientFromContext(clientCtx) {
2502
2584
  objectType,
2503
2585
  propertyType
2504
2586
  } = args;
2505
- return await chunkYVZM2JPW_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, {
2506
2588
  mediaItemPath: fileName,
2507
2589
  preview: true
2508
2590
  });
@@ -2511,10 +2593,10 @@ function createClientFromContext(clientCtx) {
2511
2593
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
2512
2594
  return {
2513
2595
  fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
2514
- return await chunkYVZM2JPW_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2596
+ return await chunkQ2XRNNC7_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2515
2597
  },
2516
2598
  fetchPageByRidNoType: async (rids, options) => {
2517
- return await chunkYVZM2JPW_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2599
+ return await chunkQ2XRNNC7_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2518
2600
  }
2519
2601
  };
2520
2602
  }
@@ -2526,13 +2608,13 @@ function createClientFromContext(clientCtx) {
2526
2608
  const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
2527
2609
  const symbolClientContext2 = "__osdkClientContext";
2528
2610
  const client = Object.defineProperties(clientFn, {
2529
- [chunkYVZM2JPW_cjs.symbolClientContext]: {
2611
+ [chunkQ2XRNNC7_cjs.symbolClientContext]: {
2530
2612
  value: clientCtx
2531
2613
  },
2532
2614
  [symbolClientContext2]: {
2533
2615
  value: clientCtx
2534
2616
  },
2535
- [chunkYVZM2JPW_cjs.additionalContext]: {
2617
+ [chunkQ2XRNNC7_cjs.additionalContext]: {
2536
2618
  value: clientCtx
2537
2619
  },
2538
2620
  fetchMetadata: {
@@ -2541,8 +2623,8 @@ function createClientFromContext(clientCtx) {
2541
2623
  });
2542
2624
  return client;
2543
2625
  }
2544
- var createClient = createClientInternal.bind(void 0, chunkYVZM2JPW_cjs.createObjectSet, void 0, void 0);
2545
- var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkYVZM2JPW_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);
2546
2628
  function createWithRid(rids) {
2547
2629
  const withRid = {
2548
2630
  type: "static",
@@ -2567,5 +2649,5 @@ exports.createOsdkObject = createOsdkObject;
2567
2649
  exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
2568
2650
  exports.getDefType = getDefType;
2569
2651
  exports.isObjectSpecifiersObject = isObjectSpecifiersObject;
2570
- //# sourceMappingURL=chunk-22QZVXHI.cjs.map
2571
- //# sourceMappingURL=chunk-22QZVXHI.cjs.map
2652
+ //# sourceMappingURL=chunk-4HVAJSMV.cjs.map
2653
+ //# sourceMappingURL=chunk-4HVAJSMV.cjs.map