@osdk/client 2.2.0-beta.14 → 2.2.0-beta.16

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 (80) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/build/browser/__unstable/ConjureSupport.js.map +1 -1
  3. package/build/browser/logger/BaseLogger.js +7 -1
  4. package/build/browser/logger/BaseLogger.js.map +1 -1
  5. package/build/browser/logger/BrowserLogger.js +67 -0
  6. package/build/browser/logger/BrowserLogger.js.map +1 -0
  7. package/build/browser/logger/MinimalLogger.js +12 -14
  8. package/build/browser/logger/MinimalLogger.js.map +1 -1
  9. package/build/browser/logger/MinimalLogger.test.js +60 -0
  10. package/build/browser/logger/MinimalLogger.test.js.map +1 -0
  11. package/build/browser/logger/TestLogger.js +3 -6
  12. package/build/browser/logger/TestLogger.js.map +1 -1
  13. package/build/browser/object/convertWireToOsdkObjects.js +0 -5
  14. package/build/browser/object/convertWireToOsdkObjects.js.map +1 -1
  15. package/build/browser/object/fetchPage.js +2 -2
  16. package/build/browser/object/fetchPage.js.map +1 -1
  17. package/build/browser/ontology/loadFullObjectMetadata.js +0 -1
  18. package/build/browser/ontology/loadFullObjectMetadata.js.map +1 -1
  19. package/build/browser/public/internal.js +2 -0
  20. package/build/browser/public/internal.js.map +1 -1
  21. package/build/browser/util/UserAgent.js +1 -1
  22. package/build/browser/util/extractRdpDefinition.js +74 -21
  23. package/build/browser/util/extractRdpDefinition.js.map +1 -1
  24. package/build/browser/util/extractRdpDefinition.test.js +93 -4
  25. package/build/browser/util/extractRdpDefinition.test.js.map +1 -1
  26. package/build/cjs/Logger-a5UcHtrk.d.cts +19 -0
  27. package/build/cjs/{chunk-VT3UM6EP.cjs → chunk-6KYD7ZWT.cjs} +83 -14
  28. package/build/cjs/chunk-6KYD7ZWT.cjs.map +1 -0
  29. package/build/cjs/{chunk-USHAX4EP.cjs → chunk-KAJABLKV.cjs} +94 -37
  30. package/build/cjs/chunk-KAJABLKV.cjs.map +1 -0
  31. package/build/cjs/index.cjs +47 -114
  32. package/build/cjs/index.cjs.map +1 -1
  33. package/build/cjs/index.d.cts +2 -19
  34. package/build/cjs/public/internal.cjs +61 -6
  35. package/build/cjs/public/internal.cjs.map +1 -1
  36. package/build/cjs/public/internal.d.cts +50 -2
  37. package/build/cjs/public/unstable-do-not-use.cjs +8 -8
  38. package/build/esm/__unstable/ConjureSupport.js.map +1 -1
  39. package/build/esm/logger/BaseLogger.js +7 -1
  40. package/build/esm/logger/BaseLogger.js.map +1 -1
  41. package/build/esm/logger/BrowserLogger.js +67 -0
  42. package/build/esm/logger/BrowserLogger.js.map +1 -0
  43. package/build/esm/logger/MinimalLogger.js +12 -14
  44. package/build/esm/logger/MinimalLogger.js.map +1 -1
  45. package/build/esm/logger/MinimalLogger.test.js +60 -0
  46. package/build/esm/logger/MinimalLogger.test.js.map +1 -0
  47. package/build/esm/logger/TestLogger.js +3 -6
  48. package/build/esm/logger/TestLogger.js.map +1 -1
  49. package/build/esm/object/convertWireToOsdkObjects.js +0 -5
  50. package/build/esm/object/convertWireToOsdkObjects.js.map +1 -1
  51. package/build/esm/object/fetchPage.js +2 -2
  52. package/build/esm/object/fetchPage.js.map +1 -1
  53. package/build/esm/ontology/loadFullObjectMetadata.js +0 -1
  54. package/build/esm/ontology/loadFullObjectMetadata.js.map +1 -1
  55. package/build/esm/public/internal.js +2 -0
  56. package/build/esm/public/internal.js.map +1 -1
  57. package/build/esm/util/UserAgent.js +1 -1
  58. package/build/esm/util/extractRdpDefinition.js +74 -21
  59. package/build/esm/util/extractRdpDefinition.js.map +1 -1
  60. package/build/esm/util/extractRdpDefinition.test.js +93 -4
  61. package/build/esm/util/extractRdpDefinition.test.js.map +1 -1
  62. package/build/types/__unstable/ConjureSupport.d.ts +2 -2
  63. package/build/types/logger/BaseLogger.d.ts +4 -1
  64. package/build/types/logger/BaseLogger.d.ts.map +1 -1
  65. package/build/types/logger/BrowserLogger.d.ts +10 -0
  66. package/build/types/logger/BrowserLogger.d.ts.map +1 -0
  67. package/build/types/logger/MinimalLogger.d.ts +2 -1
  68. package/build/types/logger/MinimalLogger.d.ts.map +1 -1
  69. package/build/types/logger/MinimalLogger.test.d.ts +1 -0
  70. package/build/types/logger/MinimalLogger.test.d.ts.map +1 -0
  71. package/build/types/logger/TestLogger.d.ts +2 -2
  72. package/build/types/logger/TestLogger.d.ts.map +1 -1
  73. package/build/types/object/convertWireToOsdkObjects.d.ts.map +1 -1
  74. package/build/types/public/internal.d.ts +2 -0
  75. package/build/types/public/internal.d.ts.map +1 -1
  76. package/build/types/util/extractRdpDefinition.d.ts +1 -1
  77. package/build/types/util/extractRdpDefinition.d.ts.map +1 -1
  78. package/package.json +11 -11
  79. package/build/cjs/chunk-USHAX4EP.cjs.map +0 -1
  80. package/build/cjs/chunk-VT3UM6EP.cjs.map +0 -1
@@ -14,7 +14,7 @@ var __export = (target, all) => {
14
14
  __defProp(target, name, { get: all[name], enumerable: true });
15
15
  };
16
16
 
17
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
17
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
18
18
  var Action_exports = {};
19
19
  __export(Action_exports, {
20
20
  apply: () => apply,
@@ -87,7 +87,7 @@ function parseUrl(baseUrl, endpointPath) {
87
87
  return new URL(`api${endpointPath}`, baseUrl);
88
88
  }
89
89
 
90
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
90
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
91
91
  var _apply = [1, "/v2/ontologies/{0}/actions/{1}/apply", 3];
92
92
  function apply($ctx, ...args) {
93
93
  return foundryPlatformFetch($ctx, _apply, ...args);
@@ -101,10 +101,11 @@ function applyBatch($ctx, ...args) {
101
101
  return foundryPlatformFetch($ctx, _applyBatch, ...args);
102
102
  }
103
103
 
104
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
104
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
105
105
  var ActionTypeV2_exports = {};
106
106
  __export(ActionTypeV2_exports, {
107
107
  get: () => get,
108
+ getByRid: () => getByRid,
108
109
  list: () => list
109
110
  });
110
111
  var _list = [0, "/v2/ontologies/{0}/actionTypes", 2];
@@ -115,8 +116,12 @@ var _get = [0, "/v2/ontologies/{0}/actionTypes/{1}"];
115
116
  function get($ctx, ...args) {
116
117
  return foundryPlatformFetch($ctx, _get, ...args);
117
118
  }
119
+ var _getByRid = [0, "/v2/ontologies/{0}/actionTypes/byRid/{1}"];
120
+ function getByRid($ctx, ...args) {
121
+ return foundryPlatformFetch($ctx, _getByRid, ...args);
122
+ }
118
123
 
119
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js
124
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js
120
125
  var Attachment_exports = {};
121
126
  __export(Attachment_exports, {
122
127
  get: () => get2,
@@ -141,7 +146,7 @@ function get2($ctx, ...args) {
141
146
  return foundryPlatformFetch($ctx, _get2, ...args);
142
147
  }
143
148
 
144
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js
149
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js
145
150
  var MediaReferenceProperty_exports = {};
146
151
  __export(MediaReferenceProperty_exports, {
147
152
  getMediaContent: () => getMediaContent,
@@ -161,7 +166,7 @@ function upload2($ctx, ...args) {
161
166
  return foundryPlatformFetch($ctx, _upload2, ...args);
162
167
  }
163
168
 
164
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
169
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
165
170
  var ObjectTypeV2_exports = {};
166
171
  __export(ObjectTypeV2_exports, {
167
172
  get: () => get3,
@@ -191,7 +196,7 @@ function getOutgoingLinkType($ctx, ...args) {
191
196
  return foundryPlatformFetch($ctx, _getOutgoingLinkType, ...args);
192
197
  }
193
198
 
194
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
199
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
195
200
  var OntologyInterface_exports = {};
196
201
  __export(OntologyInterface_exports, {
197
202
  aggregate: () => aggregate,
@@ -216,7 +221,7 @@ function aggregate($ctx, ...args) {
216
221
  return foundryPlatformFetch($ctx, _aggregate, ...args);
217
222
  }
218
223
 
219
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js
224
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js
220
225
  var OntologyObjectSet_exports = {};
221
226
  __export(OntologyObjectSet_exports, {
222
227
  aggregate: () => aggregate2,
@@ -251,7 +256,7 @@ function aggregate2($ctx, ...args) {
251
256
  return foundryPlatformFetch($ctx, _aggregate2, ...args);
252
257
  }
253
258
 
254
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
259
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
255
260
  var Query_exports = {};
256
261
  __export(Query_exports, {
257
262
  execute: () => execute
@@ -261,7 +266,7 @@ function execute($ctx, ...args) {
261
266
  return foundryPlatformFetch($ctx, _execute, ...args);
262
267
  }
263
268
 
264
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
269
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
265
270
  var QueryType_exports = {};
266
271
  __export(QueryType_exports, {
267
272
  get: () => get6,
@@ -276,7 +281,7 @@ function get6($ctx, ...args) {
276
281
  return foundryPlatformFetch($ctx, _get6, ...args);
277
282
  }
278
283
 
279
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
284
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
280
285
  var TimeSeriesPropertyV2_exports = {};
281
286
  __export(TimeSeriesPropertyV2_exports, {
282
287
  getFirstPoint: () => getFirstPoint,
@@ -296,7 +301,7 @@ function streamPoints($ctx, ...args) {
296
301
  return foundryPlatformFetch($ctx, _streamPoints, ...args);
297
302
  }
298
303
 
299
- // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
304
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
300
305
  var TimeSeriesValueBankProperty_exports = {};
301
306
  __export(TimeSeriesValueBankProperty_exports, {
302
307
  getLatestValue: () => getLatestValue,
@@ -320,24 +325,39 @@ var addUserAgentAndRequestContextHeaders = (client, withMetadata) => ({
320
325
  return headers;
321
326
  })
322
327
  });
323
- async function extractRdpDefinition(clientCtx, objectSet, methodInputObjectType) {
324
- return (await extractRdpDefinitionInternal(clientCtx, objectSet, methodInputObjectType))[0];
328
+ async function extractRdpDefinition(clientCtx, objectSet) {
329
+ return (await extractRdpDefinitionInternal(clientCtx, objectSet, undefined)).definitions;
325
330
  }
326
331
  async function extractRdpDefinitionInternal(clientCtx, objectSet, methodInputObjectType) {
327
- const result = {};
328
332
  switch (objectSet.type) {
329
333
  case "searchAround": {
330
- const [definitions, childObjectType] = await extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);
334
+ const {
335
+ definitions: definitions2,
336
+ childObjectType
337
+ } = await extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);
338
+ if (childObjectType === undefined || childObjectType === "") {
339
+ return {
340
+ definitions: {}
341
+ };
342
+ }
331
343
  const objDef = await clientCtx.ontologyProvider.getObjectDefinition(childObjectType);
332
344
  const linkDef = objDef.links[objectSet.link];
333
345
  !linkDef ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Missing link definition for '${objectSet.link}'`) : invariant__default.default(false) : undefined;
334
- return [{
335
- ...result,
336
- ...definitions
337
- }, objDef.links[objectSet.link].targetType];
346
+ return {
347
+ definitions: definitions2,
348
+ childObjectType: objDef.links[objectSet.link].targetType
349
+ };
338
350
  }
339
351
  case "withProperties": {
340
- const [definitions, childObjectType] = await extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);
352
+ const {
353
+ definitions: definitions2,
354
+ childObjectType
355
+ } = await extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);
356
+ if (childObjectType === undefined || childObjectType === "") {
357
+ return {
358
+ definitions: {}
359
+ };
360
+ }
341
361
  for (const [name, definition] of Object.entries(objectSet.derivedProperties)) {
342
362
  if (definition.type !== "selection") {
343
363
  continue;
@@ -346,24 +366,40 @@ async function extractRdpDefinitionInternal(clientCtx, objectSet, methodInputObj
346
366
  case "collectList":
347
367
  case "collectSet":
348
368
  case "get":
349
- const [_2, operationLevelObjectType] = await extractRdpDefinitionInternal(clientCtx, definition.objectSet, childObjectType);
369
+ const {
370
+ childObjectType: operationLevelObjectType
371
+ } = await extractRdpDefinitionInternal(clientCtx, definition.objectSet, childObjectType);
372
+ if (operationLevelObjectType === undefined || operationLevelObjectType === "") {
373
+ return {
374
+ definitions: {}
375
+ };
376
+ }
350
377
  const objDef = await clientCtx.ontologyProvider.getObjectDefinition(operationLevelObjectType);
351
- result[name] = objDef.properties[definition.operation.selectedPropertyApiName];
378
+ definitions2[name] = objDef.properties[definition.operation.selectedPropertyApiName];
352
379
  default:
353
380
  continue;
354
381
  }
355
382
  }
356
- return [{
357
- ...result,
358
- ...definitions
359
- }, childObjectType];
383
+ return {
384
+ definitions: definitions2,
385
+ childObjectType
386
+ };
360
387
  }
361
388
  case "methodInput":
362
- return [{}, methodInputObjectType];
389
+ return {
390
+ definitions: {},
391
+ childObjectType: methodInputObjectType
392
+ };
363
393
  case "base":
364
- return [{}, objectSet.objectType];
394
+ return {
395
+ definitions: {},
396
+ childObjectType: objectSet.objectType
397
+ };
365
398
  case "interfaceBase":
366
- return [{}, objectSet.interfaceType];
399
+ return {
400
+ definitions: {},
401
+ childObjectType: objectSet.interfaceType
402
+ };
367
403
  case "filter":
368
404
  case "asBaseObjectTypes":
369
405
  case "asType":
@@ -371,12 +407,33 @@ async function extractRdpDefinitionInternal(clientCtx, objectSet, methodInputObj
371
407
  return extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);
372
408
  // These will throw in OSS so we should throw here so no request is made
373
409
  case "intersect":
374
- case "static":
375
410
  case "subtract":
376
411
  case "union":
412
+ const objectSets = objectSet.objectSets;
413
+ const objectSetTypes = await Promise.all(objectSets.map((os) => extractRdpDefinitionInternal(clientCtx, os, methodInputObjectType)));
414
+ const definitions = objectSetTypes.reduce((acc, {
415
+ definitions: definitions2
416
+ }) => ({
417
+ ...acc,
418
+ ...definitions2
419
+ }), {});
420
+ !(Object.keys(definitions).length === 0) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Object sets combined using intersect, subtract, or union must not contain any derived property definitions") : invariant__default.default(false) : undefined;
421
+ const firstValidChildObjectType = objectSetTypes.find(({
422
+ childObjectType
423
+ }) => childObjectType != null)?.childObjectType;
424
+ !objectSetTypes.every(({
425
+ childObjectType
426
+ }) => childObjectType === firstValidChildObjectType || childObjectType == null) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "All object sets in an intersect, subtract, or union must have the same child object type") : invariant__default.default(false) : undefined;
427
+ return {
428
+ definitions: {},
429
+ childObjectType: firstValidChildObjectType
430
+ };
431
+ case "static":
377
432
  case "reference":
378
- return [{}, ""];
379
- // We don't have to worry about new object sets being added and breaking people since the OSDK is always constructing these.
433
+ return {
434
+ definitions: {}
435
+ };
436
+ // We don't have to worry about new object sets being added and doing a runtime break and breaking people since the OSDK is always constructing these.
380
437
  default:
381
438
  process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Unsupported object set type for Runtime Derived Properties`) : invariant__default.default(false) ;
382
439
  }
@@ -445,7 +502,7 @@ async function fetchInterfacePage(client, interfaceType, args, objectSet) {
445
502
  // drop readonly
446
503
  interfaceType.apiName,
447
504
  !args.$includeRid,
448
- await extractRdpDefinition(client, objectSet, interfaceType.apiName)
505
+ await extractRdpDefinition(client, objectSet)
449
506
  );
450
507
  return result2;
451
508
  }
@@ -515,7 +572,7 @@ async function fetchObjectPage(client, objectType, args, objectSet) {
515
572
  excludeRid: !args?.$includeRid
516
573
  }));
517
574
  return Promise.resolve({
518
- data: await client.objectFactory(client, r.data, undefined, undefined, await extractRdpDefinition(client, objectSet, objectType.apiName), args.$select),
575
+ data: await client.objectFactory(client, r.data, undefined, undefined, await extractRdpDefinition(client, objectSet), args.$select),
519
576
  nextPageToken: r.nextPageToken,
520
577
  totalCount: r.totalCount
521
578
  });
@@ -543,5 +600,5 @@ exports.fetchPageInternal = fetchPageInternal;
543
600
  exports.fetchPageWithErrorsInternal = fetchPageWithErrorsInternal;
544
601
  exports.resolveBaseObjectSetType = resolveBaseObjectSetType;
545
602
  exports.symbolClientContext = symbolClientContext;
546
- //# sourceMappingURL=chunk-USHAX4EP.cjs.map
547
- //# sourceMappingURL=chunk-USHAX4EP.cjs.map
603
+ //# sourceMappingURL=chunk-KAJABLKV.cjs.map
604
+ //# sourceMappingURL=chunk-KAJABLKV.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js","../../../../node_modules/.pnpm/@osdk+shared.client@1.0.1/node_modules/@osdk/shared.client/index.js","../../../../node_modules/.pnpm/@osdk+shared.client2@1.0.0/node_modules/@osdk/shared.client2/index.js","../../../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.3.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.17.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js","../../src/util/addUserAgentAndRequestContextHeaders.ts","../../src/util/extractRdpDefinition.ts","../../src/util/objectSetUtils.ts","../../src/object/fetchPage.ts","../../src/Client.ts"],"names":["symbolClientContext","PalantirApiError","UnknownError","get","_get","upload","_upload","list","_list","aggregate","_aggregate","createFetchHeaderMutator","definitions","invariant","result"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAA,cAAA,GAAA;AAAA,QAAA,CAAA,cAAA,EAAA;AAAA,EAAA,KAAA,EAAA,MAAA,KAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,UAAA,EAAA,MAAA;AAAA,CAAA,CAAA;;;ACgBa,IAAA,mBAAA,GAAsB,OAAO,eAAe;;;ACAlD,IAAMA,oBAAsB,GAAA,qBAAA;ACEnC,eAAsB,oBAAA,CAAqB,QAAQ,CAAC,aAAA,EAAe,UAAU,KAAO,EAAA,WAAA,EAAa,mBAAmB,CAAA,EAAA,GAAM,IAAM,EAAA;AAC9H,EAAM,MAAA,IAAA,GAAO,SAAS,OAAQ,CAAA,cAAA,EAAgB,MAAM,kBAAmB,CAAA,IAAA,CAAK,KAAM,EAAC,CAAC,CAAA;AACpF,EAAA,MAAM,IAAO,GAAA,KAAA,GAAQ,CAAI,GAAA,IAAA,CAAK,OAAU,GAAA,SAAA;AACxC,EAAA,MAAM,SAAY,GAAA,KAAA,GAAQ,CAAI,GAAA,IAAA,CAAK,OAAU,GAAA,SAAA;AAC7C,EAAA,MAAM,UAAa,GAAA,KAAA,GAA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AA;AACT;AAGA,eAAsB,eAAgB,CAAA,MAAA,EAAQ,UAAY,EAAA,IAAA,EAAM,SAAW,EAAA;AACzE,EAAA,MAAM,CAAI,GAAA,MAAmB,yBAAmB,CAAA,IAAA,CAAK,oCAAqC,CAAA,MAAA,EAAQ,UAAU,CAAA,EAAG,MAAM,MAAA,CAAO,WAAa,EAAA,cAAA,CAAe,IAAM,EAAA;AAAA,IAC5J,SAAA;AAAA;AAAA,IAEA,MAAA,EAAQ,IAAM,EAAA,OAAA,IAAW,EAAC;AAAA;AAAA,IAE1B,UAAA,EAAY,CAAC,IAAM,EAAA;AAAA,GACpB,CAAC,CAAA;AACF,EAAA,OAAO,QAAQ,OAAQ,CAAA;AAAA,IACrB,IAAM,EAAA,MAAM,MAAO,CAAA,aAAA,CAAc,QAAQ,CAAE,CAAA,IAAA,EAAM,SAAW,EAAA,SAAA,EAAW,MAAM,oBAAqB,CAAA,MAAA,EAAQ,SAAS,CAAA,EAAG,KAAK,OAAO,CAAA;AAAA,IAClI,eAAe,CAAE,CAAA,aAAA;AAAA,IACjB,YAAY,CAAE,CAAA;AAAA,GACf,CAAA;AACH;;;AChJa,IAAA,iBAAA,GAAoB,OAAO,mBAAmB","file":"chunk-KAJABLKV.cjs","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _apply = [1, \"/v2/ontologies/{0}/actions/{1}/apply\", 3];\n/**\n * Applies an action using the given parameters.\n *\n * Changes to the Ontology are eventually consistent and may take some time to be visible.\n *\n * Note that [parameter default values](https://www.palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by\n * this endpoint.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read api:ontologies-write`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/apply\n */\nexport function apply($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _apply, ...args);\n}\nconst _applyAsync = [1, \"/v2/ontologies/{0}/actions/{1}/applyAsync\", 3];\n/**\n * Applies an action using the given parameters.\n *\n * Changes to the Ontology are eventually consistent and may take some time to be visible.\n *\n * Note that [parameter default values](https://www.palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by\n * this endpoint.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read api:ontologies-write`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/applyAsync\n */\nexport function applyAsync($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _applyAsync, ...args);\n}\nconst _applyBatch = [1, \"/v2/ontologies/{0}/actions/{1}/applyBatch\", 3];\n/**\n * Applies multiple actions (of the same Action Type) using the given parameters.\n * Changes to the Ontology are eventually consistent and may take some time to be visible.\n *\n * Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not\n * call Functions may receive a higher limit.\n *\n * Note that [notifications](https://www.palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read api:ontologies-write`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/applyBatch\n */\nexport function applyBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _applyBatch, ...args);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const symbolClientContext = Symbol(\"ClientContext\");","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const symbolClientContext = \"__osdkClientContext\";","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { symbolClientContext as oldSymbolClientContext } from \"@osdk/shared.client\";\nimport { symbolClientContext } from \"@osdk/shared.client2\";\nimport { PalantirApiError, UnknownError } from \"@osdk/shared.net.errors\";\nexport async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {\n const path = origPath.replace(/\\{([^}]+)\\}/g, () => encodeURIComponent(args.shift()));\n const body = flags & 1 ? args.shift() : undefined;\n const queryArgs = flags & 2 ? args.shift() : undefined;\n const headerArgs = flags & 4 ? args.shift() : undefined;\n const method = [\"GET\", \"POST\", \"PUT\", \"DELETE\", \"PATCH\"][httpMethodNum];\n return await apiFetch(client[symbolClientContext] ?? client[oldSymbolClientContext] ?? client, method, path, body, queryArgs, headerArgs, contentType, responseContentType);\n}\nasync function apiFetch(clientCtx, method, endpointPath, data, queryArguments, headers, requestMediaType, responseMediaType) {\n const url = parseUrl(clientCtx.baseUrl, endpointPath);\n for (const [key, value] of Object.entries(queryArguments || {})) {\n if (value == null) {\n continue;\n }\n if (Array.isArray(value)) {\n for (const item of value) {\n url.searchParams.append(key, item);\n }\n } else {\n url.searchParams.append(key, value);\n }\n }\n const headersInit = new Headers();\n headersInit.set(\"Content-Type\", requestMediaType ?? \"application/json\");\n headersInit.set(\"Accept\", responseMediaType ?? \"application/json\");\n Object.entries(headers || {}).forEach(([key, value]) => {\n if (value != null) {\n headersInit.append(key, value.toString());\n }\n });\n const body = data == null || data instanceof globalThis.Blob ? data : JSON.stringify(data);\n // Because this uses the client's fetch, there is a 99.99% chance that it is already going\n // to handle the error case and throw a PalantirApiError since its wrapped in a\n // createFetchOrThrow.\n const response = await clientCtx.fetch(url.toString(), {\n body,\n method: method,\n headers: headersInit\n });\n // However, if we ended up using a \"regular\" fetch, the\n // error status codes are not thrown by fetch automatically,\n // we have to look at the ok property and behave accordingly\n if (!response.ok) {\n try {\n const convertedError = await response.json();\n return new PalantirApiError(convertedError.message, convertedError.errorName, convertedError.errorCode, response.status, convertedError.errorInstanceId, convertedError.parameters);\n } catch (e) {\n if (e instanceof Error) {\n return new UnknownError(e.message, \"UNKNOWN\");\n }\n return new UnknownError(\"Unable to parse error response\", \"UNKNOWN\");\n }\n }\n // Do not return anything if its a 204. Do not parse either!\n if (response.status === 204) {\n return;\n }\n if (responseMediaType == null || responseMediaType === \"application/json\") {\n return await response.json();\n }\n return response;\n}\nexport function parseUrl(baseUrl, endpointPath) {\n baseUrl += baseUrl.endsWith(\"/\") ? \"\" : \"/\";\n return new URL(`api${endpointPath}`, baseUrl);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/actionTypes\", 2];\n/**\n * Lists the action types for the given Ontology.\n *\n * Each page may be smaller than the requested page size. However, it is guaranteed that if there are more\n * results available, at least one result will be present in the response.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/actionTypes/{1}\"];\n/**\n * Gets a specific action type with the given API name.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes/{actionType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getByRid = [0, \"/v2/ontologies/{0}/actionTypes/byRid/{1}\"];\n/**\n * Gets a specific action type with the given RID.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes/byRid/{actionTypeRid}\n */\nexport function getByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRid, ...args);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _upload = [1, \"/v2/ontologies/attachments/upload\", 7, \"*/*\"];\n/**\n * Upload an attachment to use in an action. Any attachment which has not been linked to an object via\n * an action within one hour after upload will be removed.\n * Previously mapped attachments which are not connected to any object anymore are also removed on\n * a biweekly basis.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-write`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-write]\n * URL: /v2/ontologies/attachments/upload\n */\nexport function upload($ctx, ...args) {\n const headerParams = {\n ...args[2],\n \"Content-Type\": args[2]?.[\"Content-Type\"] ?? args[0].type,\n \"Content-Length\": args[0].size.toString()\n };\n return $foundryPlatformFetch($ctx, _upload, args[0], args[1], headerParams);\n}\nconst _read = [0, \"/v2/ontologies/attachments/{0}/content\",,, \"*/*\"];\n/**\n * Get the content of an attachment.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/attachments/{attachmentRid}/content\n */\nexport function read($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _read, ...args);\n}\nconst _get = [0, \"/v2/ontologies/attachments/{0}\"];\n/**\n * Get the metadata of an attachment.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/attachments/{attachmentRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _getMediaContent = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/media/{3}/content\", 2,, \"*/*\"];\n/**\n * Gets the content of a media item referenced by this property.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content\n */\nexport function getMediaContent($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getMediaContent, ...args);\n}\nconst _getMediaMetadata = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/media/{3}/metadata\", 2];\n/**\n * Gets metadata about the media item referenced by this property.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/metadata\n */\nexport function getMediaMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getMediaMetadata, ...args);\n}\nconst _upload = [1, \"/v2/ontologies/{0}/objectTypes/{1}/media/{2}/upload\", 3, \"*/*\"];\n/**\n * Uploads a media item to the media set which backs the specified property. The property must be backed by a single media set and branch, otherwise an error will be thrown.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/media/{property}/upload\n */\nexport function upload($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _upload, ...args);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/objectTypes\", 2];\n/**\n * Lists the object types for the given Ontology.\n *\n * Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are\n * more results available, at least one result will be present in the\n * response.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/objectTypes/{1}\"];\n/**\n * Gets a specific object type with the given API name.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getFullMetadata = [0, \"/v2/ontologies/{0}/objectTypes/{1}/fullMetadata\", 2];\n/**\n * Gets the full metadata for a specific object type with the given API name.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/fullMetadata\n */\nexport function getFullMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getFullMetadata, ...args);\n}\nconst _listOutgoingLinkTypes = [0, \"/v2/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes\", 2];\n/**\n * List the outgoing links for an object type.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes\n */\nexport function listOutgoingLinkTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listOutgoingLinkTypes, ...args);\n}\nconst _getOutgoingLinkType = [0, \"/v2/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes/{2}\"];\n/**\n * Get an outgoing link for an object type.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}\n */\nexport function getOutgoingLinkType($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getOutgoingLinkType, ...args);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/interfaceTypes\", 2];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint is in preview and may be modified or removed at any time.\n * To use this endpoint, add `preview=true` to the request query parameters.\n * :::\n *\n * Lists the interface types for the given Ontology.\n *\n * Each page may be smaller than the requested page size. However, it is guaranteed that if there are more\n * results available, at least one result will be present in the response.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/interfaceTypes/{1}\", 2];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint is in preview and may be modified or removed at any time.\n * To use this endpoint, add `preview=true` to the request query parameters.\n * :::\n *\n * Gets a specific interface type with the given API name.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _search = [1, \"/v2/ontologies/{0}/interfaces/{1}/search\", 3];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint will be removed once TS OSDK is updated to use `objectSets/loadObjects` with interface object\n * sets.\n * :::\n * :::callout{theme=warning title=Warning}\n * This endpoint is in preview and may be modified or removed at any time.\n * To use this endpoint, add `preview=true` to the request query parameters.\n * :::\n *\n * Search for objects in the specified ontology and interface type. Any properties specified in the \"where\" or\n * \"orderBy\" parameters must be shared property type API names defined on the interface. The following search\n * queries are supported:\n *\n * | Query type | Description | Supported Types |\n * |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------|\n * | lt | The provided property is less than the provided value. | number, string, date, timestamp |\n * | gt | The provided property is greater than the provided value. | number, string, date, timestamp |\n * | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp |\n * | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp |\n * | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp |\n * | isNull | The provided property is (or is not) null. | all |\n * | contains | The provided property contains the provided value. | array |\n * | not | The sub-query does not match. | N/A (applied on a query) |\n * | and | All the sub-queries match. | N/A (applied on queries) |\n * | or | At least one of the sub-queries match. | N/A (applied on queries) |\n * | startsWith | The provided property starts with the provided term. | string |\n * | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string |\n * | containsAllTermsInOrder | The provided property contains the provided terms as a substring. | string |\n * | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string |\n * | containsAllTerms | The provided property contains all the terms separated by whitespace. | string |\n *\n * Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'\"~`). Periods (`.`) on their own are ignored.\n * Partial terms are not matched by terms filters except where explicitly noted.\n *\n * Attempting to use an unsupported query will result in a validation error. Third-party applications using this\n * endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/search\n */\nexport function search($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _search, ...args);\n}\nconst _aggregate = [1, \"/v2/ontologies/{0}/interfaces/{1}/aggregate\", 3];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint will be removed once TS OSDK is updated to use `objectSets/aggregate` with interface object\n * sets.\n * :::\n * :::callout{theme=warning title=Warning}\n * This endpoint is in preview and may be modified or removed at any time.\n * To use this endpoint, add `preview=true` to the request query parameters.\n * :::\n *\n * Perform functions on object fields in the specified ontology and of the specified interface type. Any\n * properties specified in the query must be shared property type API names defined on the interface.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/aggregate\n */\nexport function aggregate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _aggregate, ...args);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _createTemporary = [1, \"/v2/ontologies/{0}/objectSets/createTemporary\", 1];\n/**\n * Creates a temporary `ObjectSet` from the given definition. This `ObjectSet` expires after one hour.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read api:ontologies-write`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/objectSets/createTemporary\n */\nexport function createTemporary($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _createTemporary, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/objectSets/{1}\"];\n/**\n * Gets the definition of the `ObjectSet` with the given RID.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @alpha\n *\n * Required Scopes: []\n * URL: /v2/ontologies/{ontology}/objectSets/{objectSetRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _load = [1, \"/v2/ontologies/{0}/objectSets/loadObjects\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Note that null value properties will not be returned.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjects\n */\nexport function load($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _load, ...args);\n}\nconst _loadMultipleObjectTypes = [1, \"/v2/ontologies/{0}/objectSets/loadObjectsMultipleObjectTypes\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition. The resulting\n * objects may be scoped to an object type, in which all the selected properties on the object type are returned, or scoped\n * to an interface, in which only the object type properties that implement the properties of any interfaces in its\n * scope are returned. For objects that are scoped to an interface in the result, a mapping from interface to\n * object implementation is returned in order to interpret the objects as the interfaces that they implement.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey)\n * will be prefixed with '$' instead of '\\_\\_' as is the case in `loadObjects`.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjectsMultipleObjectTypes\n */\nexport function loadMultipleObjectTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadMultipleObjectTypes, ...args);\n}\nconst _loadObjectsOrInterfaces = [1, \"/v2/ontologies/{0}/objectSets/loadObjectsOrInterfaces\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition. If the requested\n * object set contains interfaces and the object can be viewed as an interface, it will contain the properties\n * defined by the interface. If not, it will contain the properties defined by its object type. This allows directly\n * loading all objects of an interface where all objects are viewed as the interface, for example.\n *\n * Note that the result object set cannot contain a mix of objects with \"interface\" properties and \"object type\"\n * properties. Attempting to load an object set like this will result in an error.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey)\n * will be prefixed with '$' instead of '\\_\\_' as is the case in `/loadObjects`.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjectsOrInterfaces\n */\nexport function loadObjectsOrInterfaces($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadObjectsOrInterfaces, ...args);\n}\nconst _aggregate = [1, \"/v2/ontologies/{0}/objectSets/aggregate\", 3];\n/**\n * Aggregates the ontology objects present in the `ObjectSet` from the provided object set definition.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/aggregate\n */\nexport function aggregate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _aggregate, ...args);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _execute = [1, \"/v2/ontologies/{0}/queries/{1}/execute\", 3];\n/**\n * Executes a Query using the given parameters.\n *\n * Optional parameters do not need to be supplied.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queries/{queryApiName}/execute\n */\nexport function execute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _execute, ...args);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/queryTypes\", 2];\n/**\n * Lists the query types for the given Ontology.\n *\n * Each page may be smaller than the requested page size. However, it is guaranteed that if there are more\n * results available, at least one result will be present in the response.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queryTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/queryTypes/{1}\"];\n/**\n * Gets a specific query type with the given API name.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queryTypes/{queryApiName}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _getFirstPoint = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/firstPoint\", 2];\n/**\n * Get the first point of a time series property.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/firstPoint\n */\nexport function getFirstPoint($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getFirstPoint, ...args);\n}\nconst _getLastPoint = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/lastPoint\", 2];\n/**\n * Get the last point of a time series property.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/lastPoint\n */\nexport function getLastPoint($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getLastPoint, ...args);\n}\nconst _streamPoints = [1, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/streamPoints\", 3,, \"*/*\"];\n/**\n * Stream all of the points of a time series property.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamPoints\n */\nexport function streamPoints($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamPoints, ...args);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _getLatestValue = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/latestValue\", 2];\n/**\n * Get the latest value of a property backed by a timeseries. If a specific geotime series integration has both a history and a live integration, we will give precedence to the live integration.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{propertyName}/latestValue\n */\nexport function getLatestValue($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getLatestValue, ...args);\n}\nconst _streamValues = [1, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/streamValues\", 3,, \"*/*\"];\n/**\n * Stream all of the points of a time series property (this includes geotime series references).\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamValues\n */\nexport function streamValues($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamValues, ...args);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFetchHeaderMutator } from \"@osdk/shared.net.fetch\";\nexport const addUserAgentAndRequestContextHeaders = (client, withMetadata) => ({\n ...client,\n fetch: createFetchHeaderMutator(client.fetch, headers => {\n headers.set(\"X-OSDK-Request-Context\", JSON.stringify(client.requestContext));\n if (withMetadata.osdkMetadata) {\n headers.set(\"Fetch-User-Agent\", withMetadata.osdkMetadata.extraUserAgent);\n }\n return headers;\n })\n});","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nexport async function extractRdpDefinition(clientCtx, objectSet) {\n return (await extractRdpDefinitionInternal(clientCtx, objectSet, undefined)).definitions;\n}\n\n/* @internal\n* Returns a tuple of the derived property definitions and the object type that the derived property is defined on.\n*/\nasync function extractRdpDefinitionInternal(clientCtx, objectSet, methodInputObjectType) {\n switch (objectSet.type) {\n case \"searchAround\":\n {\n const {\n definitions,\n childObjectType\n } = await extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);\n if (childObjectType === undefined || childObjectType === \"\") {\n return {\n definitions: {}\n };\n }\n const objDef = await clientCtx.ontologyProvider.getObjectDefinition(childObjectType);\n const linkDef = objDef.links[objectSet.link];\n !linkDef ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Missing link definition for '${objectSet.link}'`) : invariant(false) : void 0;\n return {\n definitions,\n childObjectType: objDef.links[objectSet.link].targetType\n };\n }\n case \"withProperties\":\n {\n // These are the definitions and current object type for all object set operations prior to the definition (e.g. filter, pivotTo, etc.)\n const {\n definitions,\n childObjectType\n } = await extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);\n if (childObjectType === undefined || childObjectType === \"\") {\n return {\n definitions: {}\n };\n }\n for (const [name, definition] of Object.entries(objectSet.derivedProperties)) {\n if (definition.type !== \"selection\") {\n continue;\n }\n switch (definition.operation.type) {\n case \"collectList\":\n case \"collectSet\":\n case \"get\":\n // This is the object set construction for the derived property definition construction. We pass in childObjectType so that when we reach MethodInputObjectSet, we know where to start looking.\n const {\n childObjectType: operationLevelObjectType\n } = await extractRdpDefinitionInternal(clientCtx, definition.objectSet, childObjectType);\n if (operationLevelObjectType === undefined || operationLevelObjectType === \"\") {\n return {\n definitions: {}\n };\n }\n const objDef = await clientCtx.ontologyProvider.getObjectDefinition(operationLevelObjectType);\n definitions[name] = objDef.properties[definition.operation.selectedPropertyApiName];\n default:\n continue;\n }\n }\n return {\n definitions,\n childObjectType\n };\n }\n case \"methodInput\":\n return {\n definitions: {},\n childObjectType: methodInputObjectType\n };\n case \"base\":\n return {\n definitions: {},\n childObjectType: objectSet.objectType\n };\n case \"interfaceBase\":\n return {\n definitions: {},\n childObjectType: objectSet.interfaceType\n };\n case \"filter\":\n case \"asBaseObjectTypes\":\n case \"asType\":\n case \"nearestNeighbors\":\n return extractRdpDefinitionInternal(clientCtx, objectSet.objectSet, methodInputObjectType);\n // These will throw in OSS so we should throw here so no request is made\n case \"intersect\":\n case \"subtract\":\n case \"union\":\n const objectSets = objectSet.objectSets;\n const objectSetTypes = await Promise.all(objectSets.map(os => extractRdpDefinitionInternal(clientCtx, os, methodInputObjectType)));\n const definitions = objectSetTypes.reduce((acc, {\n definitions\n }) => ({\n ...acc,\n ...definitions\n }), {});\n !(Object.keys(definitions).length === 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Object sets combined using intersect, subtract, or union must not contain any derived property definitions\") : invariant(false) : void 0;\n const firstValidChildObjectType = objectSetTypes.find(({\n childObjectType\n }) => childObjectType != null)?.childObjectType;\n !objectSetTypes.every(({\n childObjectType\n }) => childObjectType === firstValidChildObjectType || childObjectType == null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"All object sets in an intersect, subtract, or union must have the same child object type\") : invariant(false) : void 0;\n return {\n definitions: {},\n childObjectType: firstValidChildObjectType\n };\n case \"static\":\n case \"reference\":\n // Static and reference object sets are always intersected with a base object set, so we can just return no child object type.\n return {\n definitions: {}\n };\n // We don't have to worry about new object sets being added and doing a runtime break and breaking people since the OSDK is always constructing these.\n default:\n const _ = objectSet;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Unsupported object set type for Runtime Derived Properties`) : invariant(false) : void 0;\n }\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function resolveBaseObjectSetType(objectType) {\n return objectType.type === \"interface\" ? {\n type: \"interfaceBase\",\n interfaceType: objectType[\"apiName\"]\n } : {\n type: \"base\",\n objectType: objectType[\"apiName\"]\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as OntologiesV2 from \"@osdk/foundry.ontologies\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { extractRdpDefinition } from \"../util/extractRdpDefinition.js\";\nimport { resolveBaseObjectSetType } from \"../util/objectSetUtils.js\";\nexport function augment(type, ...properties) {\n return {\n [type.apiName]: properties\n };\n}\n\n/** @internal */\nexport function objectSetToSearchJsonV2(objectSet, expectedApiName, existingWhere = undefined) {\n if (objectSet.type === \"base\" || objectSet.type === \"interfaceBase\") {\n if (objectSet.type === \"base\" && objectSet.objectType !== expectedApiName) {\n throw new Error(`Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.objectType}`);\n }\n if (objectSet.type === \"interfaceBase\" && objectSet.interfaceType !== expectedApiName) {\n throw new Error(`Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.interfaceType}`);\n }\n return existingWhere;\n }\n if (objectSet.type === \"filter\") {\n return objectSetToSearchJsonV2(objectSet.objectSet, expectedApiName, existingWhere == null ? objectSet.where : {\n type: \"and\",\n value: [existingWhere, objectSet.where]\n });\n }\n throw new Error(`Unsupported objectSet type: ${objectSet.type}`);\n}\n\n/** @internal */\nexport function resolveInterfaceObjectSet(objectSet, interfaceTypeApiName, args) {\n return args?.$includeAllBaseObjectProperties ? {\n type: \"intersect\",\n objectSets: [objectSet, {\n type: \"interfaceBase\",\n interfaceType: interfaceTypeApiName,\n includeAllBaseObjectProperties: true\n }]\n } : objectSet;\n}\nasync function fetchInterfacePage(client, interfaceType, args, objectSet) {\n if (args.$__UNSTABLE_useOldInterfaceApis) {\n const result = await OntologiesV2.OntologyInterfaces.search(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, interfaceType.apiName, applyFetchArgs(args, {\n augmentedProperties: {},\n augmentedSharedPropertyTypes: {},\n otherInterfaceTypes: [],\n selectedObjectTypes: [],\n selectedSharedPropertyTypes: args.$select ?? [],\n where: objectSetToSearchJsonV2(objectSet, interfaceType.apiName)\n }), {\n preview: true\n });\n result.data = await client.objectFactory(client, result.data,\n // drop readonly\n interfaceType.apiName, !args.$includeRid, await extractRdpDefinition(client, objectSet));\n return result;\n }\n const result = await OntologiesV2.OntologyObjectSets.loadMultipleObjectTypes(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, applyFetchArgs(args, {\n objectSet: resolveInterfaceObjectSet(objectSet, interfaceType.apiName, args),\n select: args?.$select ?? [],\n excludeRid: !args?.$includeRid\n }), {\n preview: true\n });\n return Promise.resolve({\n data: await client.objectFactory2(client, result.data, interfaceType.apiName, {}, !args.$includeRid, args.$select, false, result.interfaceToObjectTypeMappings),\n nextPageToken: result.nextPageToken,\n totalCount: result.totalCount\n });\n}\n\n/** @internal */\nexport async function fetchPageInternal(client, objectType, objectSet, args = {}) {\n if (objectType.type === \"interface\") {\n return await fetchInterfacePage(client, objectType, args, objectSet); // fixme\n } else {\n return await fetchObjectPage(client, objectType, args, objectSet); // fixme\n }\n}\n\n/** @internal */\nexport async function fetchPageWithErrorsInternal(client, objectType, objectSet, args = {}) {\n try {\n const result = await fetchPageInternal(client, objectType, objectSet, args);\n return {\n value: result\n };\n } catch (e) {\n if (e instanceof Error) {\n return {\n error: e\n };\n }\n return {\n error: e\n };\n }\n}\n\n/**\n * @param client\n * @param objectType\n * @param args\n * @param objectSet\n * @returns\n * @internal\n */\nexport async function fetchPage(client, objectType, args, objectSet = resolveBaseObjectSetType(objectType)) {\n return fetchPageInternal(client, objectType, objectSet, args);\n}\n\n/** @internal */\nexport async function fetchPageWithErrors(client, objectType, args, objectSet = resolveBaseObjectSetType(objectType)) {\n return fetchPageWithErrorsInternal(client, objectType, objectSet, args);\n}\nfunction applyFetchArgs(args, body) {\n if (args?.$nextPageToken) {\n body.pageToken = args.$nextPageToken;\n }\n if (args?.$pageSize != null) {\n body.pageSize = args.$pageSize;\n }\n if (args?.$orderBy != null) {\n body.orderBy = {\n fields: Object.entries(args.$orderBy).map(([field, direction]) => ({\n field,\n direction\n }))\n };\n }\n return body;\n}\n\n/** @internal */\nexport async function fetchObjectPage(client, objectType, args, objectSet) {\n const r = await OntologiesV2.OntologyObjectSets.load(addUserAgentAndRequestContextHeaders(client, objectType), await client.ontologyRid, applyFetchArgs(args, {\n objectSet,\n // We have to do the following case because LoadObjectSetRequestV2 isn't readonly\n select: args?.$select ?? [],\n // FIXME?\n excludeRid: !args?.$includeRid\n }));\n return Promise.resolve({\n data: await client.objectFactory(client, r.data, undefined, undefined, await extractRdpDefinition(client, objectSet), args.$select),\n nextPageToken: r.nextPageToken,\n totalCount: r.totalCount\n });\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\n\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext = Symbol(\"additionalContext\");\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.2.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\n\nconst ErrorMessage = Symbol(\"ErrorMessage\");"]}