@osdk/client 2.8.0-beta.31 → 2.8.0-beta.32

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 (30) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/build/browser/createMediaFromReference.js +5 -7
  3. package/build/browser/createMediaFromReference.js.map +1 -1
  4. package/build/browser/observable/internal/OrderByCanonicalizer.js +1 -1
  5. package/build/browser/observable/internal/OrderByCanonicalizer.js.map +1 -1
  6. package/build/browser/observable/internal/WhereClauseCanonicalizer.js +1 -1
  7. package/build/browser/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
  8. package/build/browser/util/UserAgent.js +2 -2
  9. package/build/cjs/MediaReferenceProperty-3LVGUKXN.cjs +22 -0
  10. package/build/cjs/{MediaReferenceProperty-MZ2PACD4.cjs.map → MediaReferenceProperty-3LVGUKXN.cjs.map} +1 -1
  11. package/build/cjs/{chunk-7NPAYZLW.cjs → chunk-3LPMQ5DJ.cjs} +82 -73
  12. package/build/cjs/chunk-3LPMQ5DJ.cjs.map +1 -0
  13. package/build/cjs/{chunk-ZZ6DP3W4.cjs → chunk-6MWGZMBV.cjs} +10 -10
  14. package/build/cjs/{chunk-ZZ6DP3W4.cjs.map → chunk-6MWGZMBV.cjs.map} +1 -1
  15. package/build/cjs/{chunk-GSVXEVM4.cjs → chunk-LCI6OHTV.cjs} +3 -3
  16. package/build/cjs/{chunk-GSVXEVM4.cjs.map → chunk-LCI6OHTV.cjs.map} +1 -1
  17. package/build/cjs/index.cjs +11 -11
  18. package/build/cjs/public/internal.cjs +8 -8
  19. package/build/cjs/public/unstable-do-not-use.cjs +70 -70
  20. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  21. package/build/esm/createMediaFromReference.js +5 -7
  22. package/build/esm/createMediaFromReference.js.map +1 -1
  23. package/build/esm/observable/internal/OrderByCanonicalizer.js +1 -1
  24. package/build/esm/observable/internal/OrderByCanonicalizer.js.map +1 -1
  25. package/build/esm/observable/internal/WhereClauseCanonicalizer.js +1 -1
  26. package/build/esm/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
  27. package/build/esm/util/UserAgent.js +2 -2
  28. package/package.json +11 -11
  29. package/build/cjs/MediaReferenceProperty-MZ2PACD4.cjs +0 -22
  30. package/build/cjs/chunk-7NPAYZLW.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkZZ6DP3W4_cjs = require('./chunk-ZZ6DP3W4.cjs');
4
- var chunkGSVXEVM4_cjs = require('./chunk-GSVXEVM4.cjs');
3
+ var chunk6MWGZMBV_cjs = require('./chunk-6MWGZMBV.cjs');
4
+ var chunkLCI6OHTV_cjs = require('./chunk-LCI6OHTV.cjs');
5
5
  var chunkD26YLHTV_cjs = require('./chunk-D26YLHTV.cjs');
6
6
  var chunkYJG67XL4_cjs = require('./chunk-YJG67XL4.cjs');
7
7
  var chunkHEMBBCBS_cjs = require('./chunk-HEMBBCBS.cjs');
@@ -47,8 +47,8 @@ function extractPrimaryKeyFromObjectSpecifier(ObjectSpecifier) {
47
47
  return ObjectSpecifier.split(":")[1];
48
48
  }
49
49
 
50
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.50.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
51
- var _apply = [1, "/v2/ontologies/{0}/actions/{1}/apply", 3];
50
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.57.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
51
+ var _apply = [1, "/v2/ontologies/{0}/actions/{1}/apply", 7];
52
52
  function apply($ctx, ...args) {
53
53
  return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _apply, ...args);
54
54
  }
@@ -57,13 +57,15 @@ function applyBatch($ctx, ...args) {
57
57
  return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _applyBatch, ...args);
58
58
  }
59
59
 
60
- // ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.50.0/node_modules/@osdk/foundry.mediasets/build/esm/public/MediaSet.js
60
+ // ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.57.0/node_modules/@osdk/foundry.mediasets/build/esm/public/MediaSet.js
61
61
  var MediaSet_exports = {};
62
62
  chunkHEMBBCBS_cjs.__export(MediaSet_exports, {
63
63
  abort: () => abort,
64
64
  calculate: () => calculate,
65
+ clear: () => clear,
65
66
  commit: () => commit,
66
67
  create: () => create,
68
+ get: () => get2,
67
69
  getResult: () => getResult,
68
70
  getRidByPath: () => getRidByPath,
69
71
  getStatus: () => getStatus,
@@ -72,6 +74,7 @@ chunkHEMBBCBS_cjs.__export(MediaSet_exports, {
72
74
  read: () => read,
73
75
  readOriginal: () => readOriginal,
74
76
  reference: () => reference,
77
+ register: () => register,
75
78
  retrieve: () => retrieve,
76
79
  transform: () => transform,
77
80
  upload: () => upload2,
@@ -85,6 +88,10 @@ var _calculate = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/ca
85
88
  function calculate($ctx, ...args) {
86
89
  return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _calculate, ...args);
87
90
  }
91
+ var _clear = [3, "/v2/mediasets/{0}/items/clearAtPath", 2];
92
+ function clear($ctx, ...args) {
93
+ return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _clear, ...args);
94
+ }
88
95
  var _commit = [1, "/v2/mediasets/{0}/transactions/{1}/commit", 2];
89
96
  function commit($ctx, ...args) {
90
97
  return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _commit, ...args);
@@ -109,6 +116,10 @@ var _getRidByPath = [0, "/v2/mediasets/{0}/items/getRidByPath", 2];
109
116
  function getRidByPath($ctx, ...args) {
110
117
  return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _getRidByPath, ...args);
111
118
  }
119
+ var _get = [0, "/v2/mediasets/{0}", 2];
120
+ function get2($ctx, ...args) {
121
+ return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _get, ...args);
122
+ }
112
123
  var _getResult = [0, "/v2/mediasets/{0}/items/{1}/transformationJobs/{2}/result", 6, , "*/*"];
113
124
  function getResult($ctx, ...args) {
114
125
  return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _getResult, ...args);
@@ -129,6 +140,10 @@ var _readOriginal = [0, "/v2/mediasets/{0}/items/{1}/original", 6, , "*/*"];
129
140
  function readOriginal($ctx, ...args) {
130
141
  return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _readOriginal, ...args);
131
142
  }
143
+ var _register = [1, "/v2/mediasets/{0}/items/register", 3];
144
+ function register($ctx, ...args) {
145
+ return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _register, ...args);
146
+ }
132
147
  var _retrieve = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/retrieve", 6, , "*/*"];
133
148
  function retrieve($ctx, ...args) {
134
149
  return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _retrieve, ...args);
@@ -200,13 +215,13 @@ async function toDataValue(value, client, actionMetadata) {
200
215
  return Promise.all(promiseArray);
201
216
  }
202
217
  if (isAttachmentUpload(value)) {
203
- const attachment = await chunkZZ6DP3W4_cjs.upload(client, value.data, {
218
+ const attachment = await chunk6MWGZMBV_cjs.upload(client, value.data, {
204
219
  filename: value.name
205
220
  });
206
221
  return await toDataValue(attachment.rid, client);
207
222
  }
208
223
  if (isAttachmentFile(value)) {
209
- const attachment = await chunkZZ6DP3W4_cjs.upload(client, value, {
224
+ const attachment = await chunk6MWGZMBV_cjs.upload(client, value, {
210
225
  filename: value.name
211
226
  });
212
227
  return await toDataValue(attachment.rid, client);
@@ -233,11 +248,11 @@ async function toDataValue(value, client, actionMetadata) {
233
248
  if (isPoint(value)) {
234
249
  return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client);
235
250
  }
236
- if (chunkZZ6DP3W4_cjs.isWireObjectSet(value)) {
251
+ if (chunk6MWGZMBV_cjs.isWireObjectSet(value)) {
237
252
  return value;
238
253
  }
239
- if (chunkZZ6DP3W4_cjs.isObjectSet(value)) {
240
- return chunkZZ6DP3W4_cjs.getWireObjectSet(value);
254
+ if (chunk6MWGZMBV_cjs.isObjectSet(value)) {
255
+ return chunk6MWGZMBV_cjs.getWireObjectSet(value);
241
256
  }
242
257
  if (isInterfaceActionParam(value)) {
243
258
  return {
@@ -257,7 +272,7 @@ async function toDataValue(value, client, actionMetadata) {
257
272
 
258
273
  // src/actions/applyAction.ts
259
274
  async function applyAction(client, action, parameters, options = {}) {
260
- const clientWithHeaders = chunkZZ6DP3W4_cjs.addUserAgentAndRequestContextHeaders(chunkZZ6DP3W4_cjs.augmentRequestContext(client, (_) => ({
275
+ const clientWithHeaders = chunk6MWGZMBV_cjs.addUserAgentAndRequestContextHeaders(chunk6MWGZMBV_cjs.augmentRequestContext(client, (_) => ({
261
276
  finalMethodCall: "applyAction"
262
277
  })), action);
263
278
  if (Array.isArray(parameters)) {
@@ -361,7 +376,7 @@ function remapActionResponse(response) {
361
376
  }
362
377
  }
363
378
 
364
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.50.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
379
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.57.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
365
380
  var _getLatestValue = [0, "/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/latestValue", 2];
366
381
  function getLatestValue($ctx, ...args) {
367
382
  return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _getLatestValue, ...args);
@@ -533,13 +548,13 @@ var MediaReferencePropertyImpl = class {
533
548
  this.#mediaReference = mediaReference;
534
549
  }
535
550
  async fetchContents() {
536
- return chunkGSVXEVM4_cjs.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
551
+ return chunkLCI6OHTV_cjs.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
537
552
  preview: true
538
553
  // TODO: Can turn this back off when backend is no longer in beta.
539
554
  });
540
555
  }
541
556
  async fetchMetadata() {
542
- const r = await chunkGSVXEVM4_cjs.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
557
+ const r = await chunkLCI6OHTV_cjs.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
543
558
  preview: true
544
559
  // TODO: Can turn this back off when backend is no longer in beta.
545
560
  });
@@ -554,7 +569,7 @@ var MediaReferencePropertyImpl = class {
554
569
  }
555
570
  };
556
571
 
557
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.50.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
572
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.57.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
558
573
  var _getFirstPoint = [0, "/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/firstPoint", 2];
559
574
  function getFirstPoint($ctx, ...args) {
560
575
  return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _getFirstPoint, ...args);
@@ -988,8 +1003,8 @@ function get$link(holder) {
988
1003
  [objDef.primaryKeyApiName]: rawObj.$primaryKey
989
1004
  }).pivotTo(linkName);
990
1005
  const value = !linkDef.multiplicity ? {
991
- fetchOne: (options) => chunkZZ6DP3W4_cjs.fetchSingle(client, objDef, options ?? {}, chunkZZ6DP3W4_cjs.getWireObjectSet(objectSet)),
992
- fetchOneWithErrors: (options) => chunkZZ6DP3W4_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkZZ6DP3W4_cjs.getWireObjectSet(objectSet))
1006
+ fetchOne: (options) => chunk6MWGZMBV_cjs.fetchSingle(client, objDef, options ?? {}, chunk6MWGZMBV_cjs.getWireObjectSet(objectSet)),
1007
+ fetchOneWithErrors: (options) => chunk6MWGZMBV_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunk6MWGZMBV_cjs.getWireObjectSet(objectSet))
993
1008
  } : objectSet;
994
1009
  return [linkName, value];
995
1010
  })));
@@ -1012,8 +1027,8 @@ function get$linkForInterface(holder) {
1012
1027
  apiName: linkDef.targetTypeApiName
1013
1028
  };
1014
1029
  const value = !linkDef.multiplicity ? {
1015
- fetchOne: (options) => chunkZZ6DP3W4_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkZZ6DP3W4_cjs.getWireObjectSet(objectSet)),
1016
- fetchOneWithErrors: (options) => chunkZZ6DP3W4_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkZZ6DP3W4_cjs.getWireObjectSet(objectSet))
1030
+ fetchOne: (options) => chunk6MWGZMBV_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunk6MWGZMBV_cjs.getWireObjectSet(objectSet)),
1031
+ fetchOneWithErrors: (options) => chunk6MWGZMBV_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunk6MWGZMBV_cjs.getWireObjectSet(objectSet))
1017
1032
  } : objectSet;
1018
1033
  return [linkName, value];
1019
1034
  })));
@@ -1021,7 +1036,7 @@ function get$linkForInterface(holder) {
1021
1036
 
1022
1037
  // src/object/convertWireToOsdkObjects/createOsdkInterface.ts
1023
1038
  function createOsdkInterface(underlying, interfaceDef) {
1024
- const [objApiNamespace] = chunkZZ6DP3W4_cjs.extractNamespace(interfaceDef.apiName);
1039
+ const [objApiNamespace] = chunk6MWGZMBV_cjs.extractNamespace(interfaceDef.apiName);
1025
1040
  return Object.freeze(Object.defineProperties({}, {
1026
1041
  // first to minimize hidden classes
1027
1042
  [UnderlyingOsdkObject]: {
@@ -1084,7 +1099,7 @@ function createOsdkInterface(underlying, interfaceDef) {
1084
1099
  },
1085
1100
  ...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
1086
1101
  const objDef = underlying[ObjectDefRef];
1087
- const [apiNamespace, apiName] = chunkZZ6DP3W4_cjs.extractNamespace(p);
1102
+ const [apiNamespace, apiName] = chunk6MWGZMBV_cjs.extractNamespace(p);
1088
1103
  const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
1089
1104
  return [apiNamespace === objApiNamespace ? apiName : p, {
1090
1105
  enumerable: targetPropName in underlying,
@@ -1259,9 +1274,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
1259
1274
  switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
1260
1275
  case "attachment":
1261
1276
  if (Array.isArray(rawValue)) {
1262
- return rawValue.map((a) => chunkZZ6DP3W4_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1277
+ return rawValue.map((a) => chunk6MWGZMBV_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1263
1278
  } else {
1264
- return chunkZZ6DP3W4_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1279
+ return chunk6MWGZMBV_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1265
1280
  }
1266
1281
  default:
1267
1282
  process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
@@ -1277,9 +1292,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
1277
1292
  }
1278
1293
  if (propDef.type === "attachment") {
1279
1294
  if (Array.isArray(rawValue)) {
1280
- return rawValue.map((a) => chunkZZ6DP3W4_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1295
+ return rawValue.map((a) => chunk6MWGZMBV_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1281
1296
  }
1282
- return chunkZZ6DP3W4_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1297
+ return chunk6MWGZMBV_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1283
1298
  }
1284
1299
  if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
1285
1300
  return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
@@ -1508,7 +1523,7 @@ function convertInterfaceToObjectTypeMappingsV2ToV1(mappingsV2) {
1508
1523
  // src/object/Cache.ts
1509
1524
  function createClientCache(fn) {
1510
1525
  const cache = /* @__PURE__ */ new WeakMap();
1511
- function get4(client, key) {
1526
+ function get5(client, key) {
1512
1527
  if (cache.get(client.clientCacheKey) == null) {
1513
1528
  cache.set(client.clientCacheKey, /* @__PURE__ */ new Map());
1514
1529
  }
@@ -1531,7 +1546,7 @@ function createClientCache(fn) {
1531
1546
  return cache.get(client.clientCacheKey).delete(key);
1532
1547
  }
1533
1548
  return {
1534
- get: get4,
1549
+ get: get5,
1535
1550
  set,
1536
1551
  remove
1537
1552
  };
@@ -1543,7 +1558,7 @@ function createAsyncClientCache(fn, createCacheLocal = createClientCache) {
1543
1558
  getOrUndefined: function getOrUndefined(client, key) {
1544
1559
  return cache.get(client, key);
1545
1560
  },
1546
- get: async function get4(client, key) {
1561
+ get: async function get5(client, key) {
1547
1562
  return cache.get(client, key) ?? inProgress.get(client, key) ?? ret.set(client, key, fn(client, key));
1548
1563
  },
1549
1564
  set: async function set(client, k, v) {
@@ -1572,15 +1587,15 @@ function deepFreeze(obj) {
1572
1587
  return Object.freeze(obj);
1573
1588
  }
1574
1589
 
1575
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.50.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
1576
- var _get = [0, "/v2/ontologies/{0}/actionTypes/{1}", 2];
1577
- function get2($ctx, ...args) {
1578
- return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _get, ...args);
1590
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.57.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
1591
+ var _get2 = [0, "/v2/ontologies/{0}/actionTypes/{1}", 2];
1592
+ function get3($ctx, ...args) {
1593
+ return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _get2, ...args);
1579
1594
  }
1580
1595
 
1581
1596
  // src/ontology/loadActionMetadata.ts
1582
1597
  async function loadActionMetadata(client, actionType) {
1583
- const r = await get2(client, await client.ontologyRid, actionType, {
1598
+ const r = await get3(client, await client.ontologyRid, actionType, {
1584
1599
  branch: client.branch
1585
1600
  });
1586
1601
  const {
@@ -1589,7 +1604,7 @@ async function loadActionMetadata(client, actionType) {
1589
1604
  return wireActionTypeV2ToSdkActionMetadata(r);
1590
1605
  }
1591
1606
 
1592
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.50.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
1607
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.57.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
1593
1608
  var _getFullMetadata = [0, "/v2/ontologies/{0}/objectTypes/{1}/fullMetadata", 2];
1594
1609
  function getFullMetadata($ctx, ...args) {
1595
1610
  return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _getFullMetadata, ...args);
@@ -1612,7 +1627,7 @@ async function loadFullObjectMetadata(client, objectType) {
1612
1627
 
1613
1628
  // src/ontology/loadInterfaceMetadata.ts
1614
1629
  async function loadInterfaceMetadata(client, objectType) {
1615
- const r = await chunkZZ6DP3W4_cjs.get(client, await client.ontologyRid, objectType, {
1630
+ const r = await chunk6MWGZMBV_cjs.get(client, await client.ontologyRid, objectType, {
1616
1631
  preview: true,
1617
1632
  branch: client.branch
1618
1633
  });
@@ -1622,16 +1637,16 @@ async function loadInterfaceMetadata(client, objectType) {
1622
1637
  return __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(r, true);
1623
1638
  }
1624
1639
 
1625
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.50.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
1626
- var _get2 = [0, "/v2/ontologies/{0}/queryTypes/{1}", 2];
1627
- function get3($ctx, ...args) {
1628
- return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _get2, ...args);
1640
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.57.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
1641
+ var _get3 = [0, "/v2/ontologies/{0}/queryTypes/{1}", 2];
1642
+ function get4($ctx, ...args) {
1643
+ return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _get3, ...args);
1629
1644
  }
1630
1645
 
1631
1646
  // src/ontology/loadQueryMetadata.ts
1632
1647
  async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
1633
1648
  const [apiName, version] = queryTypeApiNameAndVersion.split(":");
1634
- const r = await get3(client, await client.ontologyRid, apiName, {
1649
+ const r = await get4(client, await client.ontologyRid, apiName, {
1635
1650
  version
1636
1651
  });
1637
1652
  const {
@@ -1691,11 +1706,11 @@ var createStandardOntologyProviderFactory = (client) => {
1691
1706
  };
1692
1707
 
1693
1708
  // src/util/UserAgent.ts
1694
- var USER_AGENT = `osdk-client/${"2.8.0-beta.31"}`;
1695
- var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.8.0-beta.31"}`;
1709
+ var USER_AGENT = `osdk-client/${"2.8.0-beta.32"}`;
1710
+ var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.8.0-beta.32"}`;
1696
1711
 
1697
1712
  // src/createMinimalClient.ts
1698
- function createMinimalClient(metadata2, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkZZ6DP3W4_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1713
+ function createMinimalClient(metadata2, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunk6MWGZMBV_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1699
1714
  if (process.env.NODE_ENV !== "production") {
1700
1715
  try {
1701
1716
  new URL(baseUrl);
@@ -1743,13 +1758,11 @@ var fetchMetadataInternal = async (client, definition) => {
1743
1758
  }
1744
1759
  };
1745
1760
 
1746
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.50.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
1761
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.57.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
1747
1762
  var _execute = [1, "/v2/ontologies/{0}/queries/{1}/execute", 7];
1748
1763
  function execute($ctx, ...args) {
1749
1764
  return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _execute, ...args);
1750
1765
  }
1751
-
1752
- // src/createMediaFromReference.ts
1753
1766
  function createMediaFromReference(client, mediaReference) {
1754
1767
  const {
1755
1768
  mediaSetRid,
@@ -1765,21 +1778,17 @@ function createMediaFromReference(client, mediaReference) {
1765
1778
  } : void 0);
1766
1779
  },
1767
1780
  async fetchMetadata() {
1768
- const metadata2 = await MediaSet_exports.metadata(client, mediaSetRid, mediaItemRid, {
1769
- preview: true
1770
- }, token ? {
1771
- ReadToken: token
1772
- } : void 0);
1773
1781
  const info2 = await MediaSet_exports.info(client, mediaSetRid, mediaItemRid, {
1774
1782
  preview: true
1775
1783
  }, token ? {
1776
1784
  ReadToken: token
1777
1785
  } : void 0);
1786
+ !(info2.sizeBytes != null) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Expected sizeBytes in media info") : invariant__default.default(false) : void 0;
1787
+ !(info2.mimeType != null) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Expected mimeType in media info") : invariant__default.default(false) : void 0;
1778
1788
  return {
1779
1789
  path: info2.path,
1780
- sizeBytes: metadata2.sizeBytes,
1781
- mediaType: void 0
1782
- // Media type is not currently returned by the API, so we return undefined here. This can be updated when the API returns media type.
1790
+ sizeBytes: info2.sizeBytes,
1791
+ mediaType: info2.mimeType
1783
1792
  };
1784
1793
  },
1785
1794
  getMediaReference() {
@@ -1808,13 +1817,13 @@ async function toDataValueQueries(value, client, desiredType) {
1808
1817
  switch (desiredType.type) {
1809
1818
  case "attachment": {
1810
1819
  if (isAttachmentUpload(value)) {
1811
- const attachment = await chunkZZ6DP3W4_cjs.upload(client, value.data, {
1820
+ const attachment = await chunk6MWGZMBV_cjs.upload(client, value.data, {
1812
1821
  filename: value.name
1813
1822
  });
1814
1823
  return attachment.rid;
1815
1824
  }
1816
1825
  if (isAttachmentFile(value)) {
1817
- const attachment = await chunkZZ6DP3W4_cjs.upload(client, value, {
1826
+ const attachment = await chunk6MWGZMBV_cjs.upload(client, value, {
1818
1827
  filename: value.name
1819
1828
  });
1820
1829
  return attachment.rid;
@@ -1870,11 +1879,11 @@ async function toDataValueQueries(value, client, desiredType) {
1870
1879
  }
1871
1880
  case "objectSet":
1872
1881
  case "interfaceObjectSet": {
1873
- if (chunkZZ6DP3W4_cjs.isWireObjectSet(value)) {
1882
+ if (chunk6MWGZMBV_cjs.isWireObjectSet(value)) {
1874
1883
  return value;
1875
1884
  }
1876
- if (chunkZZ6DP3W4_cjs.isObjectSet(value)) {
1877
- return chunkZZ6DP3W4_cjs.getWireObjectSet(value);
1885
+ if (chunk6MWGZMBV_cjs.isObjectSet(value)) {
1886
+ return chunk6MWGZMBV_cjs.getWireObjectSet(value);
1878
1887
  }
1879
1888
  break;
1880
1889
  }
@@ -1919,7 +1928,7 @@ async function applyQuery(client, query, params) {
1919
1928
  if (client.flushEdits != null) {
1920
1929
  await client.flushEdits();
1921
1930
  }
1922
- const response = await execute(chunkZZ6DP3W4_cjs.addUserAgentAndRequestContextHeaders(chunkZZ6DP3W4_cjs.augmentRequestContext(client, (_) => ({
1931
+ const response = await execute(chunk6MWGZMBV_cjs.addUserAgentAndRequestContextHeaders(chunk6MWGZMBV_cjs.augmentRequestContext(client, (_) => ({
1923
1932
  finalMethodCall: "applyQuery"
1924
1933
  })), query), await client.ontologyRid, query.apiName, {
1925
1934
  parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
@@ -1964,7 +1973,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
1964
1973
  return responseValue;
1965
1974
  }
1966
1975
  case "attachment": {
1967
- return chunkZZ6DP3W4_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
1976
+ return chunk6MWGZMBV_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
1968
1977
  }
1969
1978
  case "mediaReference": {
1970
1979
  return createMediaFromReference(client, responseValue);
@@ -1989,7 +1998,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
1989
1998
  throw new Error(`Missing definition for ${responseDataType.objectSet}`);
1990
1999
  }
1991
2000
  if (typeof responseValue === "string") {
1992
- return chunkZZ6DP3W4_cjs.createObjectSet(def, client, {
2001
+ return chunk6MWGZMBV_cjs.createObjectSet(def, client, {
1993
2002
  type: "intersect",
1994
2003
  objectSets: [{
1995
2004
  type: "base",
@@ -2000,7 +2009,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
2000
2009
  }]
2001
2010
  });
2002
2011
  }
2003
- return chunkZZ6DP3W4_cjs.createObjectSet(def, client, responseValue);
2012
+ return chunk6MWGZMBV_cjs.createObjectSet(def, client, responseValue);
2004
2013
  }
2005
2014
  case "struct": {
2006
2015
  for (const [key, subtype] of Object.entries(responseDataType.struct)) {
@@ -2195,7 +2204,7 @@ function createClientInternal(objectSetFactory, transactionRid, flushEdits, base
2195
2204
  ontologyRid
2196
2205
  }, baseUrl, tokenProvider, {
2197
2206
  ...options,
2198
- logger: options?.logger ?? new chunkZZ6DP3W4_cjs.MinimalLogger(),
2207
+ logger: options?.logger ?? new chunk6MWGZMBV_cjs.MinimalLogger(),
2199
2208
  transactionId: transactionRid,
2200
2209
  flushEdits,
2201
2210
  branch: options?.UNSTABLE_DO_NOT_USE_BRANCH
@@ -2224,7 +2233,7 @@ function createClientFromContext(clientCtx) {
2224
2233
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
2225
2234
  return {
2226
2235
  fetchOneByRid: async (objectType, rid, options) => {
2227
- return await chunkZZ6DP3W4_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2236
+ return await chunk6MWGZMBV_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2228
2237
  }
2229
2238
  };
2230
2239
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
@@ -2238,7 +2247,7 @@ function createClientFromContext(clientCtx) {
2238
2247
  } = args;
2239
2248
  const {
2240
2249
  upload: upload3
2241
- } = await import('./MediaReferenceProperty-MZ2PACD4.cjs');
2250
+ } = await import('./MediaReferenceProperty-3LVGUKXN.cjs');
2242
2251
  return await upload3(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
2243
2252
  mediaItemPath: fileName,
2244
2253
  preview: true
@@ -2248,10 +2257,10 @@ function createClientFromContext(clientCtx) {
2248
2257
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
2249
2258
  return {
2250
2259
  fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
2251
- return await chunkZZ6DP3W4_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2260
+ return await chunk6MWGZMBV_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2252
2261
  },
2253
2262
  fetchPageByRidNoType: async (rids, options) => {
2254
- return await chunkZZ6DP3W4_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2263
+ return await chunk6MWGZMBV_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2255
2264
  }
2256
2265
  };
2257
2266
  }
@@ -2269,7 +2278,7 @@ function createClientFromContext(clientCtx) {
2269
2278
  [symbolClientContext2]: {
2270
2279
  value: clientCtx
2271
2280
  },
2272
- [chunkZZ6DP3W4_cjs.additionalContext]: {
2281
+ [chunk6MWGZMBV_cjs.additionalContext]: {
2273
2282
  value: clientCtx
2274
2283
  },
2275
2284
  fetchMetadata: {
@@ -2278,8 +2287,8 @@ function createClientFromContext(clientCtx) {
2278
2287
  });
2279
2288
  return client;
2280
2289
  }
2281
- var createClient = createClientInternal.bind(void 0, chunkZZ6DP3W4_cjs.createObjectSet, void 0, void 0);
2282
- var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkZZ6DP3W4_cjs.createObjectSet, transactionRid, flushEdits, ...args);
2290
+ var createClient = createClientInternal.bind(void 0, chunk6MWGZMBV_cjs.createObjectSet, void 0, void 0);
2291
+ var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunk6MWGZMBV_cjs.createObjectSet, transactionRid, flushEdits, ...args);
2283
2292
  function createWithRid(rids) {
2284
2293
  const withRid = {
2285
2294
  type: "static",
@@ -2304,5 +2313,5 @@ exports.createOsdkObject = createOsdkObject;
2304
2313
  exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
2305
2314
  exports.getDefType = getDefType;
2306
2315
  exports.isObjectSpecifiersObject = isObjectSpecifiersObject;
2307
- //# sourceMappingURL=chunk-7NPAYZLW.cjs.map
2308
- //# sourceMappingURL=chunk-7NPAYZLW.cjs.map
2316
+ //# sourceMappingURL=chunk-3LPMQ5DJ.cjs.map
2317
+ //# sourceMappingURL=chunk-3LPMQ5DJ.cjs.map