@osdk/client 2.2.0-beta.6 → 2.2.0-beta.7

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 (41) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/build/browser/actions/actions.test.js +52 -4
  3. package/build/browser/actions/actions.test.js.map +1 -1
  4. package/build/browser/actions/applyAction.js +21 -15
  5. package/build/browser/actions/applyAction.js.map +1 -1
  6. package/build/browser/internal/conversions/modernToLegacyWhereClause.js +1 -1
  7. package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  8. package/build/browser/observable/internal/Store.js +1 -1
  9. package/build/browser/observable/internal/Store.js.map +1 -1
  10. package/build/browser/observable/internal/testUtils.js +2 -0
  11. package/build/browser/observable/internal/testUtils.js.map +1 -1
  12. package/build/browser/util/UserAgent.js +1 -1
  13. package/build/cjs/{chunk-2FVV5A63.cjs → chunk-IU47QMYO.cjs} +48 -48
  14. package/build/cjs/chunk-IU47QMYO.cjs.map +1 -0
  15. package/build/cjs/{chunk-X7WGNFZ4.cjs → chunk-JPENHIJB.cjs} +19 -19
  16. package/build/cjs/chunk-JPENHIJB.cjs.map +1 -0
  17. package/build/cjs/{graphql-JJX5MZPQ.cjs → graphql-RGM5SRWV.cjs} +306 -265
  18. package/build/cjs/graphql-RGM5SRWV.cjs.map +1 -0
  19. package/build/cjs/index.cjs +105 -99
  20. package/build/cjs/index.cjs.map +1 -1
  21. package/build/cjs/public/internal.cjs +6 -6
  22. package/build/cjs/public/internal.cjs.map +1 -1
  23. package/build/cjs/public/unstable-do-not-use.cjs +41 -70
  24. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  25. package/build/esm/actions/actions.test.js +52 -4
  26. package/build/esm/actions/actions.test.js.map +1 -1
  27. package/build/esm/actions/applyAction.js +21 -15
  28. package/build/esm/actions/applyAction.js.map +1 -1
  29. package/build/esm/internal/conversions/modernToLegacyWhereClause.js +1 -1
  30. package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  31. package/build/esm/observable/internal/Store.js +1 -1
  32. package/build/esm/observable/internal/Store.js.map +1 -1
  33. package/build/esm/observable/internal/testUtils.js +2 -0
  34. package/build/esm/observable/internal/testUtils.js.map +1 -1
  35. package/build/esm/util/UserAgent.js +1 -1
  36. package/build/types/actions/applyAction.d.ts.map +1 -1
  37. package/build/types/observable/internal/testUtils.d.ts.map +1 -1
  38. package/package.json +9 -9
  39. package/build/cjs/chunk-2FVV5A63.cjs.map +0 -1
  40. package/build/cjs/chunk-X7WGNFZ4.cjs.map +0 -1
  41. package/build/cjs/graphql-JJX5MZPQ.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk2FVV5A63_cjs = require('./chunk-2FVV5A63.cjs');
4
- var chunkX7WGNFZ4_cjs = require('./chunk-X7WGNFZ4.cjs');
3
+ var chunkIU47QMYO_cjs = require('./chunk-IU47QMYO.cjs');
4
+ var chunkJPENHIJB_cjs = require('./chunk-JPENHIJB.cjs');
5
5
  require('./chunk-Q7SFCCGT.cjs');
6
6
  var api = require('@osdk/api');
7
7
  var shared_net_errors = require('@osdk/shared.net.errors');
@@ -55,7 +55,7 @@ function applyPageToken(payload, {
55
55
  return pageToken ? {
56
56
  ...payload,
57
57
  pageToken
58
- } : void 0;
58
+ } : undefined;
59
59
  }
60
60
  async function* pageRequestAsAsyncIter(call, values, nextArgs, initialPayload) {
61
61
  let payload = initialPayload;
@@ -72,7 +72,7 @@ async function* pageRequestAsAsyncIter(call, values, nextArgs, initialPayload) {
72
72
  function createSimpleCache(map = /* @__PURE__ */ new Map(), fn) {
73
73
  function get(key) {
74
74
  let r = map.get(key);
75
- if (r === void 0 && fn !== void 0) {
75
+ if (r === undefined && fn !== undefined) {
76
76
  return set(key, fn(key));
77
77
  } else {
78
78
  return r;
@@ -120,7 +120,7 @@ function createSimpleAsyncCache(type, fn, createCacheLocal = createSimpleCache)
120
120
  var cachedAllOntologies;
121
121
  async function getOntologyVersionForRid(ctx, ontologyRid) {
122
122
  cachedAllOntologies ??= await client_unstable.loadAllOntologies(ctx, {});
123
- !cachedAllOntologies.ontologies[ontologyRid] ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "ontology should be loaded") : invariant__default.default(false) : void 0;
123
+ !cachedAllOntologies.ontologies[ontologyRid] ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "ontology should be loaded") : invariant__default.default(false) : undefined;
124
124
  return cachedAllOntologies.ontologies[ontologyRid].currentOntologyVersion;
125
125
  }
126
126
  var strongMemoAsync = (fn) => createSimpleAsyncCache("strong", fn).get;
@@ -162,7 +162,7 @@ var MetadataClient = class {
162
162
  [objectTypeRid]: await this.ontologyVersion("")
163
163
  }
164
164
  });
165
- !linkTypes.linkTypes[objectTypeRid] ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "link type should be loaded") : invariant__default.default(false) : void 0;
165
+ !linkTypes.linkTypes[objectTypeRid] ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "link type should be loaded") : invariant__default.default(false) : undefined;
166
166
  const ret = {};
167
167
  for (const l of linkTypes.linkTypes[objectTypeRid]) {
168
168
  const helper = ({
@@ -232,22 +232,22 @@ var MetadataClient = class {
232
232
  interfaceTypes: [],
233
233
  typeGroups: [],
234
234
  loadRedacted: false,
235
- includeObjectTypeCount: void 0,
235
+ includeObjectTypeCount: undefined,
236
236
  includeObjectTypesWithoutSearchableDatasources: true,
237
- includeEntityMetadata: void 0,
237
+ includeEntityMetadata: undefined,
238
238
  actionTypes: [],
239
- includeTypeGroupEntitiesCount: void 0,
240
- entityMetadata: void 0
239
+ includeTypeGroupEntitiesCount: undefined,
240
+ entityMetadata: undefined
241
241
  };
242
- const entities = await client_unstable.bulkLoadOntologyEntities(this.#ctx, void 0, body);
243
- !entities.objectTypes[0]?.objectType ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "object type should be loaded") : invariant__default.default(false) : void 0;
242
+ const entities = await client_unstable.bulkLoadOntologyEntities(this.#ctx, undefined, body);
243
+ !entities.objectTypes[0]?.objectType ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "object type should be loaded") : invariant__default.default(false) : undefined;
244
244
  return entities.objectTypes[0].objectType;
245
245
  });
246
246
  ontologyVersion = strongMemoAsync(async (_) => getOntologyVersionForRid(this.#ctx, await this.#client.ontologyRid));
247
247
  };
248
248
  var metadataCacheClient = weakMemoAsync((client) => Promise.resolve(new MetadataClient(client)));
249
249
  function createObjectPropertyMapping(conjureOT) {
250
- !(conjureOT.primaryKeys.length === 1) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `only one primary key supported, got ${conjureOT.primaryKeys.length}`) : invariant__default.default(false) : void 0;
250
+ !(conjureOT.primaryKeys.length === 1) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `only one primary key supported, got ${conjureOT.primaryKeys.length}`) : invariant__default.default(false) : undefined;
251
251
  const pkRid = conjureOT.primaryKeys[0];
252
252
  const pkProperty = Object.values(conjureOT.propertyTypes).find((a) => a.rid === pkRid);
253
253
  if (!pkProperty) {
@@ -279,7 +279,7 @@ function createBulkLinksAsyncIterFactory(ctx) {
279
279
  return;
280
280
  }
281
281
  ctx.logger?.debug("Preparing to fetch bulk links");
282
- !objs.every((a) => a.$objectType === objs[0].$objectType) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false) : invariant__default.default(false) : void 0;
282
+ !objs.every((a) => a.$objectType === objs[0].$objectType) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false) : invariant__default.default(false) : undefined;
283
283
  const mcc = await metadataCacheClient(ctx);
284
284
  const helper = await mcc.forObjectByApiName(objs[0].$objectType);
285
285
  const [objectTypeRid, propertyMapping, fullLinkMapping] = await Promise.all([helper.getRid(), helper.getPropertyMapping(), helper.getLinkMapping()]);
@@ -291,21 +291,21 @@ function createBulkLinksAsyncIterFactory(ctx) {
291
291
  }
292
292
  const req = {
293
293
  objectSetContext: {
294
- forkRid: void 0,
294
+ forkRid: undefined,
295
295
  objectSetFilterContext: {
296
296
  parameterOverrides: {}
297
297
  },
298
- ontologyBranchRid: void 0,
299
- owningRid: void 0,
300
- reportUsage: void 0,
301
- workstateRid: void 0
298
+ ontologyBranchRid: undefined,
299
+ owningRid: undefined,
300
+ reportUsage: undefined,
301
+ workstateRid: undefined
302
302
  },
303
303
  responseOptions: {
304
304
  includeObjectSetEntities: true,
305
305
  includeUsageCost: false
306
306
  },
307
307
  pageSize: 1e3,
308
- pageToken: void 0,
308
+ pageToken: undefined,
309
309
  linksRequests: [{
310
310
  directedLinkTypes: Object.values(linkMapping).map(({
311
311
  directedLinkTypeRid
@@ -318,7 +318,7 @@ function createBulkLinksAsyncIterFactory(ctx) {
318
318
  })))
319
319
  }]
320
320
  };
321
- const bulkLinksIter = pageRequestAsAsyncIter(client_unstable.getBulkLinksPage.bind(void 0, makeConjureContext(ctx, "object-set-service/api")), getResults, applyPageToken, req);
321
+ const bulkLinksIter = pageRequestAsAsyncIter(client_unstable.getBulkLinksPage.bind(undefined, makeConjureContext(ctx, "object-set-service/api")), getResults, applyPageToken, req);
322
322
  for await (const item of bulkLinksIter) {
323
323
  const {
324
324
  objectIdentifier
@@ -416,13 +416,13 @@ async function toDataValue(value, client) {
416
416
  return Promise.all(promiseArray);
417
417
  }
418
418
  if (isAttachmentUpload(value)) {
419
- const attachment = await chunkX7WGNFZ4_cjs.Attachment_exports.upload(client, value.data, {
419
+ const attachment = await chunkJPENHIJB_cjs.Attachment_exports.upload(client, value.data, {
420
420
  filename: value.name
421
421
  });
422
422
  return await toDataValue(attachment.rid, client);
423
423
  }
424
424
  if (isAttachmentFile(value)) {
425
- const attachment = await chunkX7WGNFZ4_cjs.Attachment_exports.upload(client, value, {
425
+ const attachment = await chunkJPENHIJB_cjs.Attachment_exports.upload(client, value, {
426
426
  filename: value.name
427
427
  });
428
428
  return await toDataValue(attachment.rid, client);
@@ -433,11 +433,11 @@ async function toDataValue(value, client) {
433
433
  if (isOsdkBaseObject(value)) {
434
434
  return await toDataValue(value.$primaryKey, client);
435
435
  }
436
- if (chunk2FVV5A63_cjs.isWireObjectSet(value)) {
436
+ if (chunkIU47QMYO_cjs.isWireObjectSet(value)) {
437
437
  return value;
438
438
  }
439
- if (chunk2FVV5A63_cjs.isObjectSet(value)) {
440
- return chunk2FVV5A63_cjs.getWireObjectSet(value);
439
+ if (chunkIU47QMYO_cjs.isObjectSet(value)) {
440
+ return chunkIU47QMYO_cjs.getWireObjectSet(value);
441
441
  }
442
442
  if (isMediaReference(value)) {
443
443
  return value;
@@ -460,24 +460,24 @@ async function toDataValue(value, client) {
460
460
 
461
461
  // src/actions/applyAction.ts
462
462
  async function applyAction(client, action, parameters, options = {}) {
463
- const clientWithHeaders = chunkX7WGNFZ4_cjs.addUserAgentAndRequestContextHeaders(chunk2FVV5A63_cjs.augmentRequestContext(client, (_) => ({
463
+ const clientWithHeaders = chunkJPENHIJB_cjs.addUserAgentAndRequestContextHeaders(chunkIU47QMYO_cjs.augmentRequestContext(client, (_) => ({
464
464
  finalMethodCall: "applyAction"
465
465
  })), action);
466
466
  if (Array.isArray(parameters)) {
467
- const response = await chunkX7WGNFZ4_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
467
+ const response = await chunkJPENHIJB_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
468
468
  requests: parameters ? await remapBatchActionParams(parameters, client) : [],
469
469
  options: {
470
470
  returnEdits: options?.$returnEdits ? "ALL" : "NONE"
471
471
  }
472
472
  });
473
473
  const edits = response.edits;
474
- return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
474
+ return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : undefined;
475
475
  } else {
476
- const response = await chunkX7WGNFZ4_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
476
+ const response = await chunkJPENHIJB_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
477
477
  parameters: await remapActionParams(parameters, client),
478
478
  options: {
479
479
  mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
480
- returnEdits: options?.$returnEdits ? "ALL" : "NONE"
480
+ returnEdits: options?.$returnEdits ? "ALL_V2_WITH_DELETIONS" : "NONE"
481
481
  }
482
482
  });
483
483
  if (options?.$validateOnly) {
@@ -487,7 +487,7 @@ async function applyAction(client, action, parameters, options = {}) {
487
487
  throw new ActionValidationError(response.validation);
488
488
  }
489
489
  const edits = response.edits;
490
- return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
490
+ return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : undefined;
491
491
  }
492
492
  }
493
493
  async function remapActionParams(params, client) {
@@ -516,35 +516,41 @@ function remapActionResponse(response) {
516
516
  deletedLinksCount: editResponses.deletedLinksCount,
517
517
  deletedObjectsCount: editResponses.deletedObjectsCount,
518
518
  addedLinks: [],
519
+ deletedLinks: [],
519
520
  addedObjects: [],
521
+ deletedObjects: [],
520
522
  modifiedObjects: [],
521
523
  editedObjectTypes: []
522
524
  };
523
525
  const editedObjectTypesSet = /* @__PURE__ */ new Set();
524
526
  for (const edit of editResponses.edits) {
525
- if (edit.type === "addLink") {
526
- remappedActionResponse.addedLinks.push({
527
+ if (edit.type === "addLink" || edit.type === "deleteLink") {
528
+ const osdkEdit = {
527
529
  linkTypeApiNameAtoB: edit.linkTypeApiNameAtoB,
528
530
  linkTypeApiNameBtoA: edit.linkTypeApiNameBtoA,
529
531
  aSideObject: edit.aSideObject,
530
532
  bSideObject: edit.bSideObject
531
- });
533
+ };
534
+ edit.type === "addLink" ? remappedActionResponse.addedLinks.push(osdkEdit) : remappedActionResponse.deletedLinks?.push(osdkEdit);
532
535
  editedObjectTypesSet.add(edit.aSideObject.objectType);
533
536
  editedObjectTypesSet.add(edit.bSideObject.objectType);
534
- } else if (edit.type === "addObject") {
535
- remappedActionResponse.addedObjects.push({
537
+ } else if (edit.type === "addObject" || edit.type === "deleteObject" || edit.type === "modifyObject") {
538
+ const osdkEdit = {
536
539
  objectType: edit.objectType,
537
540
  primaryKey: edit.primaryKey
538
- });
539
- editedObjectTypesSet.add(edit.objectType);
540
- } else if (edit.type === "modifyObject") {
541
- remappedActionResponse.modifiedObjects.push({
542
- objectType: edit.objectType,
543
- primaryKey: edit.primaryKey
544
- });
541
+ };
542
+ if (edit.type === "addObject") {
543
+ remappedActionResponse.addedObjects.push(osdkEdit);
544
+ } else if (edit.type === "deleteObject") {
545
+ remappedActionResponse.deletedObjects?.push(osdkEdit);
546
+ } else if (edit.type === "modifyObject") {
547
+ remappedActionResponse.modifiedObjects.push(osdkEdit);
548
+ }
545
549
  editedObjectTypesSet.add(edit.objectType);
546
550
  } else {
547
- process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Unknown edit type") : invariant__default.default(false) ;
551
+ if (process.env.NODE_ENV !== "production") {
552
+ console.warn(`Unexpected edit type: ${JSON.stringify(edit)}`);
553
+ }
548
554
  }
549
555
  }
550
556
  remappedActionResponse.editedObjectTypes = [...editedObjectTypesSet];
@@ -671,7 +677,7 @@ var GeotimeSeriesPropertyImpl = class {
671
677
  }
672
678
  }
673
679
  async getLatestValue() {
674
- const latestPointPromise = chunkX7WGNFZ4_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
680
+ const latestPointPromise = chunkJPENHIJB_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
675
681
  latestPointPromise.then(
676
682
  (latestPoint) => this.lastFetchedValue = latestPoint,
677
683
  // eslint-disable-next-line no-console
@@ -687,7 +693,7 @@ var GeotimeSeriesPropertyImpl = class {
687
693
  return allPoints;
688
694
  }
689
695
  async *asyncIterValues(query) {
690
- const streamPointsIterator = await chunkX7WGNFZ4_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
696
+ const streamPointsIterator = await chunkJPENHIJB_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
691
697
  range: getTimeRange(query)
692
698
  } : {});
693
699
  for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
@@ -711,13 +717,13 @@ var MediaReferencePropertyImpl = class {
711
717
  this.#triplet = [objectApiName, primaryKey, propertyName];
712
718
  }
713
719
  async fetchContents() {
714
- return chunkX7WGNFZ4_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
720
+ return chunkJPENHIJB_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
715
721
  preview: true
716
722
  // TODO: Can turn this back off when backend is no longer in beta.
717
723
  });
718
724
  }
719
725
  async fetchMetadata() {
720
- const r = await chunkX7WGNFZ4_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
726
+ const r = await chunkJPENHIJB_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
721
727
  preview: true
722
728
  // TODO: Can turn this back off when backend is no longer in beta.
723
729
  });
@@ -738,10 +744,10 @@ var TimeSeriesPropertyImpl = class {
738
744
  this.#triplet = [objectApiName, primaryKey, propertyName];
739
745
  }
740
746
  async getFirstPoint() {
741
- return chunkX7WGNFZ4_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
747
+ return chunkJPENHIJB_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
742
748
  }
743
749
  async getLastPoint() {
744
- return chunkX7WGNFZ4_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
750
+ return chunkJPENHIJB_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
745
751
  }
746
752
  async getAllPoints(query) {
747
753
  const allPoints = [];
@@ -751,7 +757,7 @@ var TimeSeriesPropertyImpl = class {
751
757
  return allPoints;
752
758
  }
753
759
  async *asyncIterPoints(query) {
754
- const streamPointsIterator = await chunkX7WGNFZ4_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
760
+ const streamPointsIterator = await chunkJPENHIJB_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
755
761
  range: getTimeRange(query)
756
762
  } : {});
757
763
  for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
@@ -771,7 +777,7 @@ var ClientRef = Symbol("ClientRef" );
771
777
 
772
778
  // src/object/convertWireToOsdkObjects/createOsdkInterface.ts
773
779
  function createOsdkInterface(underlying, interfaceDef) {
774
- const [objApiNamespace] = chunk2FVV5A63_cjs.extractNamespace(interfaceDef.apiName);
780
+ const [objApiNamespace] = chunkIU47QMYO_cjs.extractNamespace(interfaceDef.apiName);
775
781
  return Object.freeze(Object.defineProperties({}, {
776
782
  // first to minimize hidden classes
777
783
  [UnderlyingOsdkObject]: {
@@ -806,7 +812,7 @@ function createOsdkInterface(underlying, interfaceDef) {
806
812
  },
807
813
  ...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
808
814
  const objDef = underlying[ObjectDefRef];
809
- const [apiNamespace, apiName] = chunk2FVV5A63_cjs.extractNamespace(p);
815
+ const [apiNamespace, apiName] = chunkIU47QMYO_cjs.extractNamespace(p);
810
816
  const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
811
817
  return [apiNamespace === objApiNamespace ? apiName : p, {
812
818
  enumerable: targetPropName in underlying,
@@ -862,8 +868,8 @@ function get$link(holder) {
862
868
  [objDef.primaryKeyApiName]: rawObj.$primaryKey
863
869
  }).pivotTo(linkName);
864
870
  const value = !linkDef.multiplicity ? {
865
- fetchOne: (options) => chunk2FVV5A63_cjs.fetchSingle(client, objDef, options ?? {}, chunk2FVV5A63_cjs.getWireObjectSet(objectSet)),
866
- fetchOneWithErrors: (options) => chunk2FVV5A63_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunk2FVV5A63_cjs.getWireObjectSet(objectSet))
871
+ fetchOne: (options) => chunkIU47QMYO_cjs.fetchSingle(client, objDef, options ?? {}, chunkIU47QMYO_cjs.getWireObjectSet(objectSet)),
872
+ fetchOneWithErrors: (options) => chunkIU47QMYO_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkIU47QMYO_cjs.getWireObjectSet(objectSet))
867
873
  } : objectSet;
868
874
  return [linkName, value];
869
875
  })));
@@ -932,7 +938,7 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
932
938
  const rawValue = rawObject[p];
933
939
  const propDef = objectDef.properties[p];
934
940
  if (process.env.NODE_ENV !== "production") {
935
- !(propDef != null && typeof propDef.type === "string" && specialPropertyTypes.has(propDef.type)) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false) : invariant__default.default(false) : void 0;
941
+ !(propDef != null && typeof propDef.type === "string" && specialPropertyTypes.has(propDef.type)) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false) : invariant__default.default(false) : undefined;
936
942
  }
937
943
  {
938
944
  {
@@ -940,9 +946,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
940
946
  {
941
947
  if (propDef.type === "attachment") {
942
948
  if (Array.isArray(rawValue)) {
943
- return rawValue.map((a) => chunk2FVV5A63_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
949
+ return rawValue.map((a) => chunkIU47QMYO_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
944
950
  }
945
- return chunk2FVV5A63_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
951
+ return chunkIU47QMYO_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
946
952
  }
947
953
  if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
948
954
  return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
@@ -954,7 +960,7 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
954
960
  type: "Point",
955
961
  coordinates: rawValue.position
956
962
  }
957
- } : void 0);
963
+ } : undefined);
958
964
  }
959
965
  if (propDef.type === "mediaReference") {
960
966
  return new MediaReferencePropertyImpl({
@@ -974,12 +980,12 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
974
980
  async function convertWireToOsdkObjects(client, objects, interfaceApiName, forceRemoveRid = false, selectedProps, strictNonNull = false) {
975
981
  client.logger?.debug(`START convertWireToOsdkObjects()`);
976
982
  fixObjectPropertiesInPlace(objects, forceRemoveRid);
977
- const ifaceDef = interfaceApiName ? await client.ontologyProvider.getInterfaceDefinition(interfaceApiName) : void 0;
978
- const ifaceSelected = ifaceDef ? selectedProps ?? Object.keys(ifaceDef.properties) : void 0;
983
+ const ifaceDef = interfaceApiName ? await client.ontologyProvider.getInterfaceDefinition(interfaceApiName) : undefined;
984
+ const ifaceSelected = ifaceDef ? selectedProps ?? Object.keys(ifaceDef.properties) : undefined;
979
985
  const ret = [];
980
986
  for (const rawObj of objects) {
981
987
  const objectDef = await client.ontologyProvider.getObjectDefinition(rawObj.$apiName);
982
- !objectDef ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Missing definition for '${rawObj.$apiName}'`) : invariant__default.default(false) : void 0;
988
+ !objectDef ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Missing definition for '${rawObj.$apiName}'`) : invariant__default.default(false) : undefined;
983
989
  let objProps;
984
990
  let conforming = true;
985
991
  if (ifaceDef && ifaceSelected) {
@@ -1009,11 +1015,11 @@ async function convertWireToOsdkObjects2(client, objects, interfaceApiName, forc
1009
1015
  const ret = [];
1010
1016
  for (const rawObj of objects) {
1011
1017
  const objectDef = await client.ontologyProvider.getObjectDefinition(rawObj.$apiName);
1012
- !objectDef ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Missing definition for '${rawObj.$apiName}'`) : invariant__default.default(false) : void 0;
1013
- const interfaceToObjMapping = interfaceApiName ? interfaceToObjectTypeMappings[interfaceApiName][rawObj.$apiName] : void 0;
1018
+ !objectDef ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Missing definition for '${rawObj.$apiName}'`) : invariant__default.default(false) : undefined;
1019
+ const interfaceToObjMapping = interfaceApiName ? interfaceToObjectTypeMappings[interfaceApiName][rawObj.$apiName] : undefined;
1014
1020
  const ifaceSelected = interfaceApiName && interfaceToObjMapping ? selectedProps ? Object.keys(interfaceToObjMapping).filter((val) => {
1015
1021
  selectedProps?.includes(interfaceToObjMapping[val]);
1016
- }) : [...Object.values(interfaceToObjMapping), objectDef.primaryKeyApiName] : void 0;
1022
+ }) : [...Object.values(interfaceToObjMapping), objectDef.primaryKeyApiName] : undefined;
1017
1023
  let objProps;
1018
1024
  let conforming = true;
1019
1025
  if (interfaceApiName && ifaceSelected) {
@@ -1044,7 +1050,7 @@ function reframeAsObjectInPlace(objectDef, interfaceApiName, rawObj) {
1044
1050
  if (sptProp in rawObj) {
1045
1051
  const value = rawObj[sptProp];
1046
1052
  delete rawObj[sptProp];
1047
- if (value !== void 0) {
1053
+ if (value !== undefined) {
1048
1054
  newProps[regularProp] = value;
1049
1055
  }
1050
1056
  }
@@ -1108,7 +1114,7 @@ function createClientCache(fn) {
1108
1114
  cache.set(client.clientCacheKey, /* @__PURE__ */ new Map());
1109
1115
  }
1110
1116
  let r = cache.get(client.clientCacheKey).get(key);
1111
- if (r === void 0 && fn !== void 0) {
1117
+ if (r === undefined && fn !== undefined) {
1112
1118
  return set(client, key, fn(client, key));
1113
1119
  } else {
1114
1120
  return r;
@@ -1156,11 +1162,11 @@ function createAsyncClientCache(fn, createCacheLocal = createClientCache) {
1156
1162
  return ret;
1157
1163
  }
1158
1164
  async function loadActionMetadata(client, actionType) {
1159
- const r = await chunkX7WGNFZ4_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType);
1165
+ const r = await chunkJPENHIJB_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType);
1160
1166
  return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
1161
1167
  }
1162
1168
  async function loadFullObjectMetadata(client, objectType) {
1163
- const full = await chunkX7WGNFZ4_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
1169
+ const full = await chunkJPENHIJB_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
1164
1170
  preview: true
1165
1171
  });
1166
1172
  const ret = generatorConverters.wireObjectTypeFullMetadataToSdkObjectMetadata(full, true);
@@ -1170,13 +1176,13 @@ async function loadFullObjectMetadata(client, objectType) {
1170
1176
  };
1171
1177
  }
1172
1178
  async function loadInterfaceMetadata(client, objectType) {
1173
- const r = await chunkX7WGNFZ4_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
1179
+ const r = await chunkJPENHIJB_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
1174
1180
  preview: true
1175
1181
  });
1176
1182
  return generatorConverters.__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(r, true);
1177
1183
  }
1178
1184
  async function loadQueryMetadata(client, queryType) {
1179
- const r = await chunkX7WGNFZ4_cjs.QueryType_exports.get(client, await client.ontologyRid, queryType);
1185
+ const r = await chunkJPENHIJB_cjs.QueryType_exports.get(client, await client.ontologyRid, queryType);
1180
1186
  return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
1181
1187
  }
1182
1188
 
@@ -1187,7 +1193,7 @@ var createStandardOntologyProviderFactory = (client) => {
1187
1193
  let objectDef = await loadFullObjectMetadata(client3, key);
1188
1194
  const interfaceDefs = Object.fromEntries((await Promise.all(objectDef.implements?.map((i) => ret.getInterfaceDefinition(i)) ?? [])).map((i) => [i.apiName, {
1189
1195
  def: i,
1190
- handler: void 0
1196
+ handler: undefined
1191
1197
  }]));
1192
1198
  const fullObjectDef = {
1193
1199
  ...objectDef,
@@ -1223,10 +1229,10 @@ var createStandardOntologyProviderFactory = (client) => {
1223
1229
  };
1224
1230
 
1225
1231
  // src/util/UserAgent.ts
1226
- var USER_AGENT = `osdk-client/${"2.2.0-beta.6"}`;
1232
+ var USER_AGENT = `osdk-client/${"2.2.0-beta.7"}`;
1227
1233
 
1228
1234
  // src/createMinimalClient.ts
1229
- function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunk2FVV5A63_cjs.createObjectSet) {
1235
+ function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkIU47QMYO_cjs.createObjectSet) {
1230
1236
  if (process.env.NODE_ENV !== "production") {
1231
1237
  try {
1232
1238
  new URL(baseUrl);
@@ -1296,13 +1302,13 @@ async function toDataValueQueries(value, client, desiredType) {
1296
1302
  switch (desiredType.type) {
1297
1303
  case "attachment": {
1298
1304
  if (isAttachmentUpload(value)) {
1299
- const attachment = await chunkX7WGNFZ4_cjs.Attachment_exports.upload(client, value.data, {
1305
+ const attachment = await chunkJPENHIJB_cjs.Attachment_exports.upload(client, value.data, {
1300
1306
  filename: value.name
1301
1307
  });
1302
1308
  return attachment.rid;
1303
1309
  }
1304
1310
  if (isAttachmentFile(value)) {
1305
- const attachment = await chunkX7WGNFZ4_cjs.Attachment_exports.upload(client, value, {
1311
+ const attachment = await chunkJPENHIJB_cjs.Attachment_exports.upload(client, value, {
1306
1312
  filename: value.name
1307
1313
  });
1308
1314
  return attachment.rid;
@@ -1333,11 +1339,11 @@ async function toDataValueQueries(value, client, desiredType) {
1333
1339
  break;
1334
1340
  }
1335
1341
  case "objectSet": {
1336
- if (chunk2FVV5A63_cjs.isWireObjectSet(value)) {
1342
+ if (chunkIU47QMYO_cjs.isWireObjectSet(value)) {
1337
1343
  return value;
1338
1344
  }
1339
- if (chunk2FVV5A63_cjs.isObjectSet(value)) {
1340
- return chunk2FVV5A63_cjs.getWireObjectSet(value);
1345
+ if (chunkIU47QMYO_cjs.isObjectSet(value)) {
1346
+ return chunkIU47QMYO_cjs.getWireObjectSet(value);
1341
1347
  }
1342
1348
  break;
1343
1349
  }
@@ -1366,7 +1372,7 @@ async function toDataValueQueries(value, client, desiredType) {
1366
1372
  // src/queries/applyQuery.ts
1367
1373
  async function applyQuery(client, query, params) {
1368
1374
  const qd = await client.ontologyProvider.getQueryDefinition(query.apiName);
1369
- const response = await chunkX7WGNFZ4_cjs.Query_exports.execute(chunkX7WGNFZ4_cjs.addUserAgentAndRequestContextHeaders(chunk2FVV5A63_cjs.augmentRequestContext(client, (_) => ({
1375
+ const response = await chunkJPENHIJB_cjs.Query_exports.execute(chunkJPENHIJB_cjs.addUserAgentAndRequestContextHeaders(chunkIU47QMYO_cjs.augmentRequestContext(client, (_) => ({
1370
1376
  finalMethodCall: "applyQuery"
1371
1377
  })), query), await client.ontologyRid, query.apiName, {
1372
1378
  parameters: params ? await remapQueryParams(params, client, qd.parameters) : {}
@@ -1385,7 +1391,7 @@ async function remapQueryParams(params, client, paramTypes) {
1385
1391
  async function remapQueryResponse(client, responseDataType, responseValue, definitions) {
1386
1392
  if (responseValue == null) {
1387
1393
  if (responseDataType.nullable) {
1388
- return void 0;
1394
+ return undefined;
1389
1395
  } else {
1390
1396
  throw new Error("Got null response when nullable was not allowed");
1391
1397
  }
@@ -1411,7 +1417,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
1411
1417
  return responseValue;
1412
1418
  }
1413
1419
  case "attachment": {
1414
- return chunk2FVV5A63_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
1420
+ return chunkIU47QMYO_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
1415
1421
  }
1416
1422
  case "object": {
1417
1423
  const def = definitions.get(responseDataType.object);
@@ -1426,7 +1432,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
1426
1432
  throw new Error(`Missing definition for ${responseDataType.objectSet}`);
1427
1433
  }
1428
1434
  if (typeof responseValue === "string") {
1429
- return chunk2FVV5A63_cjs.createObjectSet(def, client, {
1435
+ return chunkIU47QMYO_cjs.createObjectSet(def, client, {
1430
1436
  type: "intersect",
1431
1437
  objectSets: [{
1432
1438
  type: "base",
@@ -1437,7 +1443,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
1437
1443
  }]
1438
1444
  });
1439
1445
  }
1440
- return chunk2FVV5A63_cjs.createObjectSet(def, client, responseValue);
1446
+ return chunkIU47QMYO_cjs.createObjectSet(def, client, responseValue);
1441
1447
  }
1442
1448
  case "struct": {
1443
1449
  for (const [key, subtype] of Object.entries(responseDataType.struct)) {
@@ -1543,7 +1549,7 @@ function requiresConversion(dataType) {
1543
1549
  function createQueryObjectResponse(primaryKey, objectDef) {
1544
1550
  return {
1545
1551
  $apiName: objectDef.apiName,
1546
- $title: void 0,
1552
+ $title: undefined,
1547
1553
  $objectType: objectDef.apiName,
1548
1554
  $primaryKey: primaryKey
1549
1555
  };
@@ -1552,16 +1558,16 @@ function createQueryObjectResponse(primaryKey, objectDef) {
1552
1558
  // src/createClient.ts
1553
1559
  var ActionInvoker = class {
1554
1560
  constructor(clientCtx, actionDef) {
1555
- this.applyAction = applyAction.bind(void 0, clientCtx, actionDef);
1556
- this.batchApplyAction = applyAction.bind(void 0, clientCtx, actionDef);
1561
+ this.applyAction = applyAction.bind(undefined, clientCtx, actionDef);
1562
+ this.batchApplyAction = applyAction.bind(undefined, clientCtx, actionDef);
1557
1563
  }
1558
1564
  };
1559
1565
  var QueryInvoker = class {
1560
1566
  constructor(clientCtx, queryDef) {
1561
- this.executeFunction = applyQuery.bind(void 0, clientCtx, queryDef);
1567
+ this.executeFunction = applyQuery.bind(undefined, clientCtx, queryDef);
1562
1568
  }
1563
1569
  };
1564
- function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvider, options = void 0, fetchFn = fetch) {
1570
+ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvider, options = undefined, fetchFn = fetch) {
1565
1571
  if (typeof ontologyRid === "string") {
1566
1572
  if (!ontologyRid.startsWith("ri.")) {
1567
1573
  throw new Error("Invalid ontology RID");
@@ -1592,7 +1598,7 @@ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvi
1592
1598
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
1593
1599
  return {
1594
1600
  fetchOneByRid: async (objectType, rid, options2) => {
1595
- return await chunk2FVV5A63_cjs.fetchSingle(clientCtx, objectType, options2, createWithRid(rid));
1601
+ return await chunkIU47QMYO_cjs.fetchSingle(clientCtx, objectType, options2, createWithRid(rid));
1596
1602
  }
1597
1603
  };
1598
1604
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
@@ -1604,7 +1610,7 @@ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvi
1604
1610
  objectType,
1605
1611
  propertyType
1606
1612
  } = args;
1607
- return await chunkX7WGNFZ4_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
1613
+ return await chunkJPENHIJB_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
1608
1614
  mediaItemPath: fileName,
1609
1615
  preview: true
1610
1616
  });
@@ -1616,16 +1622,16 @@ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvi
1616
1622
  throw new Error("not implemented");
1617
1623
  }
1618
1624
  }
1619
- const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
1625
+ const fetchMetadata = fetchMetadataInternal.bind(undefined, clientCtx);
1620
1626
  const symbolClientContext2 = "__osdkClientContext";
1621
1627
  const client = Object.defineProperties(clientFn, {
1622
- [chunkX7WGNFZ4_cjs.symbolClientContext]: {
1628
+ [chunkJPENHIJB_cjs.symbolClientContext]: {
1623
1629
  value: clientCtx
1624
1630
  },
1625
1631
  [symbolClientContext2]: {
1626
1632
  value: clientCtx
1627
1633
  },
1628
- [chunkX7WGNFZ4_cjs.additionalContext]: {
1634
+ [chunkJPENHIJB_cjs.additionalContext]: {
1629
1635
  value: clientCtx
1630
1636
  },
1631
1637
  fetchMetadata: {
@@ -1634,7 +1640,7 @@ function createClientInternal(objectSetFactory, baseUrl, ontologyRid, tokenProvi
1634
1640
  });
1635
1641
  return client;
1636
1642
  }
1637
- var createClient = createClientInternal.bind(void 0, chunk2FVV5A63_cjs.createObjectSet);
1643
+ var createClient = createClientInternal.bind(undefined, chunkIU47QMYO_cjs.createObjectSet);
1638
1644
  function createWithRid(rid) {
1639
1645
  const withRid = {
1640
1646
  type: "static",
@@ -1642,13 +1648,13 @@ function createWithRid(rid) {
1642
1648
  };
1643
1649
  return withRid;
1644
1650
  }
1645
- function createPlatformClient(baseUrl, tokenProvider, options = void 0, fetchFn = fetch) {
1651
+ function createPlatformClient(baseUrl, tokenProvider, options = undefined, fetchFn = fetch) {
1646
1652
  return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, USER_AGENT, fetchFn);
1647
1653
  }
1648
1654
  var isoRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;
1649
1655
  var extractDate = (dateTime) => {
1650
- !(dateTime.length < 33) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Invalid date format. Provided input is too long.") : invariant__default.default(false) : void 0;
1651
- !isoRegex.test(dateTime) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Invalid date format. Expected ISO 8601 format, but received ${dateTime}`) : invariant__default.default(false) : void 0;
1656
+ !(dateTime.length < 33) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Invalid date format. Provided input is too long.") : invariant__default.default(false) : undefined;
1657
+ !isoRegex.test(dateTime) ? process.env.NODE_ENV !== "production" ? invariant__default.default(false, `Invalid date format. Expected ISO 8601 format, but received ${dateTime}`) : invariant__default.default(false) : undefined;
1652
1658
  return extractDateFromIsoString(dateTime);
1653
1659
  };
1654
1660
  var extractDateInUTC = (date) => {