@osdk/client 2.26.0 → 2.27.0

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 (46) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/build/browser/Client.js +1 -1
  3. package/build/browser/Client.js.map +1 -1
  4. package/build/browser/scenarios/ScenarioClient.js +10 -4
  5. package/build/browser/scenarios/ScenarioClient.js.map +1 -1
  6. package/build/browser/scenarios/createScenario.js +3 -1
  7. package/build/browser/scenarios/createScenario.js.map +1 -1
  8. package/build/browser/util/UserAgent.js +2 -2
  9. package/build/cjs/MediaReferenceProperty-SYUA2YYQ.cjs +22 -0
  10. package/build/cjs/{MediaReferenceProperty-CBPMMD73.cjs.map → MediaReferenceProperty-SYUA2YYQ.cjs.map} +1 -1
  11. package/build/cjs/{applyStreamingQuery-US6OU3WN.cjs → applyStreamingQuery-ZUGQCOWE.cjs} +13 -13
  12. package/build/cjs/{applyStreamingQuery-US6OU3WN.cjs.map → applyStreamingQuery-ZUGQCOWE.cjs.map} +1 -1
  13. package/build/cjs/{chunk-GVKJAORH.cjs → chunk-5QXHJGSL.cjs} +75 -75
  14. package/build/cjs/{chunk-GVKJAORH.cjs.map → chunk-5QXHJGSL.cjs.map} +1 -1
  15. package/build/cjs/{chunk-YP43NHIA.cjs → chunk-AN2R7X5W.cjs} +7 -7
  16. package/build/cjs/{chunk-YP43NHIA.cjs.map → chunk-AN2R7X5W.cjs.map} +1 -1
  17. package/build/cjs/{chunk-D26YLHTV.cjs → chunk-H6PXPU6F.cjs} +2 -2
  18. package/build/cjs/{chunk-D26YLHTV.cjs.map → chunk-H6PXPU6F.cjs.map} +1 -1
  19. package/build/cjs/{chunk-ZFNHWPQA.cjs → chunk-HRWHTCP3.cjs} +23 -23
  20. package/build/cjs/{chunk-ZFNHWPQA.cjs.map → chunk-HRWHTCP3.cjs.map} +1 -1
  21. package/build/cjs/{chunk-W2AWD4AH.cjs → chunk-SVB5K454.cjs} +93 -87
  22. package/build/cjs/chunk-SVB5K454.cjs.map +1 -0
  23. package/build/cjs/{chunk-CAUXOFUO.cjs → chunk-YLVUONG3.cjs} +16 -16
  24. package/build/cjs/chunk-YLVUONG3.cjs.map +1 -0
  25. package/build/cjs/{chunk-42JVCEPG.cjs → chunk-YRGYLMU5.cjs} +18 -18
  26. package/build/cjs/{chunk-42JVCEPG.cjs.map → chunk-YRGYLMU5.cjs.map} +1 -1
  27. package/build/cjs/index.cjs +14 -14
  28. package/build/cjs/public/experimental.cjs +9 -9
  29. package/build/cjs/public/internal.cjs +9 -9
  30. package/build/cjs/public/observable.cjs +8 -8
  31. package/build/cjs/public/unstable-do-not-use.cjs +20 -18
  32. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  33. package/build/cjs/{transformAndWaitInternal-2GORZXPK.cjs → transformAndWaitInternal-JGUDGNDJ.cjs} +7 -7
  34. package/build/cjs/{transformAndWaitInternal-2GORZXPK.cjs.map → transformAndWaitInternal-JGUDGNDJ.cjs.map} +1 -1
  35. package/build/esm/Client.js +1 -1
  36. package/build/esm/Client.js.map +1 -1
  37. package/build/esm/scenarios/ScenarioClient.js +10 -4
  38. package/build/esm/scenarios/ScenarioClient.js.map +1 -1
  39. package/build/esm/scenarios/createScenario.js +3 -1
  40. package/build/esm/scenarios/createScenario.js.map +1 -1
  41. package/build/esm/util/UserAgent.js +2 -2
  42. package/build/types/Client.d.ts +1 -1
  43. package/package.json +12 -12
  44. package/build/cjs/MediaReferenceProperty-CBPMMD73.cjs +0 -22
  45. package/build/cjs/chunk-CAUXOFUO.cjs.map +0 -1
  46. package/build/cjs/chunk-W2AWD4AH.cjs.map +0 -1
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkW2AWD4AH_cjs = require('./chunk-W2AWD4AH.cjs');
4
- var chunk42JVCEPG_cjs = require('./chunk-42JVCEPG.cjs');
5
- var chunkCAUXOFUO_cjs = require('./chunk-CAUXOFUO.cjs');
6
- var chunkYP43NHIA_cjs = require('./chunk-YP43NHIA.cjs');
3
+ var chunkSVB5K454_cjs = require('./chunk-SVB5K454.cjs');
4
+ var chunkYRGYLMU5_cjs = require('./chunk-YRGYLMU5.cjs');
5
+ var chunkYLVUONG3_cjs = require('./chunk-YLVUONG3.cjs');
6
+ var chunkAN2R7X5W_cjs = require('./chunk-AN2R7X5W.cjs');
7
7
  var shared_net_fetch = require('@osdk/shared.net.fetch');
8
8
  var rxjs = require('rxjs');
9
9
  var invariant4 = require('tiny-invariant');
@@ -66,8 +66,8 @@ var ObservableClientImpl = class {
66
66
  const instances = [];
67
67
  const objectSetWires = [];
68
68
  for (const item of options.dependsOnObjects ?? []) {
69
- if (chunkCAUXOFUO_cjs.isObjectSet(item)) {
70
- objectSetWires.push(chunkCAUXOFUO_cjs.getWireObjectSet(item));
69
+ if (chunkYLVUONG3_cjs.isObjectSet(item)) {
70
+ objectSetWires.push(chunkYLVUONG3_cjs.getWireObjectSet(item));
71
71
  } else {
72
72
  instances.push({
73
73
  $apiName: item.$objectType ?? item.$apiName,
@@ -75,7 +75,7 @@ var ObservableClientImpl = class {
75
75
  });
76
76
  }
77
77
  }
78
- const objectSetTypesPromise = objectSetWires.length > 0 ? Promise.all(objectSetWires.map((wire) => chunkCAUXOFUO_cjs.extractObjectOrInterfaceType(this.__experimentalStore.client[chunkCAUXOFUO_cjs.additionalContext], wire))).then((types) => types.filter((t) => t != null).map((t) => t.apiName)) : void 0;
78
+ const objectSetTypesPromise = objectSetWires.length > 0 ? Promise.all(objectSetWires.map((wire) => chunkYLVUONG3_cjs.extractObjectOrInterfaceType(this.__experimentalStore.client[chunkYLVUONG3_cjs.additionalContext], wire))).then((types) => types.filter((t) => t != null).map((t) => t.apiName)) : void 0;
79
79
  return this.__experimentalStore.functions.observe({
80
80
  ...options,
81
81
  queryDef,
@@ -138,7 +138,7 @@ var ObservableClientImpl = class {
138
138
  if (!arr || arr.length === 0) {
139
139
  return arr;
140
140
  }
141
- const wireStrings = arr.map((os) => JSON.stringify(chunkCAUXOFUO_cjs.getWireObjectSet(os)));
141
+ const wireStrings = arr.map((os) => JSON.stringify(chunkYLVUONG3_cjs.getWireObjectSet(os)));
142
142
  const canonKey = canonicalize(wireStrings);
143
143
  let cached = cache.get(canonKey);
144
144
  if (!cached) {
@@ -352,7 +352,7 @@ var OptimisticJob = class {
352
352
  return this;
353
353
  },
354
354
  createObject(type, pk, properties) {
355
- const create = store.client[chunkCAUXOFUO_cjs.additionalContext].objectFactory(store.client[chunkCAUXOFUO_cjs.additionalContext], [{
355
+ const create = store.client[chunkYLVUONG3_cjs.additionalContext].objectFactory(store.client[chunkYLVUONG3_cjs.additionalContext], [{
356
356
  $primaryKey: pk,
357
357
  $apiName: type.apiName,
358
358
  $objectType: type.apiName,
@@ -857,7 +857,7 @@ var Query = class {
857
857
  this.store = store;
858
858
  this.cacheKeys = store.cacheKeys;
859
859
  this.#subject = observable;
860
- this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkCAUXOFUO_cjs.additionalContext].logger : store.client[chunkCAUXOFUO_cjs.additionalContext].logger?.child({}, {
860
+ this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkYLVUONG3_cjs.additionalContext].logger : store.client[chunkYLVUONG3_cjs.additionalContext].logger?.child({}, {
861
861
  msgPrefix: process.env.NODE_ENV !== "production" ? `Query<${cacheKey.type}, ${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>` : "Query"
862
862
  }));
863
863
  }
@@ -1019,7 +1019,7 @@ var AggregationQuery = class extends Query {
1019
1019
  #invalidationTypes;
1020
1020
  #invalidationTypesPromise;
1021
1021
  constructor(store, subject, cacheKey, opts) {
1022
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkCAUXOFUO_cjs.additionalContext].logger?.child({}, {
1022
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkYLVUONG3_cjs.additionalContext].logger?.child({}, {
1023
1023
  msgPrefix: `AggregationQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
1024
1024
  }) : void 0);
1025
1025
  this.apiName = cacheKey.otherKeys[API_NAME_IDX2];
@@ -1037,7 +1037,7 @@ var AggregationQuery = class extends Query {
1037
1037
  try {
1038
1038
  const {
1039
1039
  invalidationSet
1040
- } = await getObjectTypesThatInvalidate(this.store.client[chunkCAUXOFUO_cjs.additionalContext], wireObjectSet);
1040
+ } = await getObjectTypesThatInvalidate(this.store.client[chunkYLVUONG3_cjs.additionalContext], wireObjectSet);
1041
1041
  return /* @__PURE__ */ new Set([this.apiName, ...invalidationSet]);
1042
1042
  } catch (error) {
1043
1043
  this.store.logger?.error("Failed to compute invalidation types for aggregation, falling back to base type only", error);
@@ -1108,7 +1108,7 @@ var ObjectAggregationQuery = class extends AggregationQuery {
1108
1108
  };
1109
1109
  let objectSet;
1110
1110
  if (this.parsedWireObjectSet) {
1111
- objectSet = chunkCAUXOFUO_cjs.createObjectSet(objectTypeDef, this.store.client[chunkCAUXOFUO_cjs.additionalContext], this.parsedWireObjectSet);
1111
+ objectSet = chunkYLVUONG3_cjs.createObjectSet(objectTypeDef, this.store.client[chunkYLVUONG3_cjs.additionalContext], this.parsedWireObjectSet);
1112
1112
  } else {
1113
1113
  objectSet = this.store.client(objectTypeDef);
1114
1114
  }
@@ -1150,7 +1150,7 @@ var AggregationsHelper = class extends AbstractHelper {
1150
1150
  return this.getOrCreateQuery(options, void 0);
1151
1151
  }
1152
1152
  getQueryWithObjectSet(options) {
1153
- const serializedObjectSet = JSON.stringify(chunkCAUXOFUO_cjs.getWireObjectSet(options.objectSet));
1153
+ const serializedObjectSet = JSON.stringify(chunkYLVUONG3_cjs.getWireObjectSet(options.objectSet));
1154
1154
  return this.getOrCreateQuery(options, serializedObjectSet);
1155
1155
  }
1156
1156
  getOrCreateQuery(options, serializedObjectSet) {
@@ -1473,7 +1473,7 @@ var FunctionParamsCanonicalizer = class {
1473
1473
  path.push("$:map_end");
1474
1474
  return arr;
1475
1475
  }
1476
- if (chunk42JVCEPG_cjs.isObjectSpecifiersObject(value)) {
1476
+ if (chunkYRGYLMU5_cjs.isObjectSpecifiersObject(value)) {
1477
1477
  const objectType = value.$objectType ?? value.$apiName;
1478
1478
  path.push("$:osdk", objectType, value.$primaryKey);
1479
1479
  return {
@@ -1481,8 +1481,8 @@ var FunctionParamsCanonicalizer = class {
1481
1481
  $primaryKey: value.$primaryKey
1482
1482
  };
1483
1483
  }
1484
- if (chunkCAUXOFUO_cjs.isObjectSet(value)) {
1485
- const wire = JSON.stringify(chunkCAUXOFUO_cjs.getWireObjectSet(value));
1484
+ if (chunkYLVUONG3_cjs.isObjectSet(value)) {
1485
+ const wire = JSON.stringify(chunkYLVUONG3_cjs.getWireObjectSet(value));
1486
1486
  path.push("$:objectset", wire);
1487
1487
  return wire;
1488
1488
  }
@@ -1542,7 +1542,7 @@ var FunctionQuery = class extends Query {
1542
1542
  #dependsOnObjects;
1543
1543
  #queryDef;
1544
1544
  constructor(store, subject, queryDef, params, cacheKey, opts, objectSetTypesPromise) {
1545
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkCAUXOFUO_cjs.additionalContext].logger?.child({}, {
1545
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkYLVUONG3_cjs.additionalContext].logger?.child({}, {
1546
1546
  msgPrefix: `FunctionQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
1547
1547
  }) : void 0);
1548
1548
  this.#apiName = queryDef.apiName;
@@ -1599,7 +1599,7 @@ var FunctionQuery = class extends Query {
1599
1599
  }).debug("calling _fetchAndStore");
1600
1600
  }
1601
1601
  try {
1602
- const result = await chunk42JVCEPG_cjs.applyQuery(this.store.client[chunkCAUXOFUO_cjs.additionalContext], this.#queryDef, this.#params);
1602
+ const result = await chunkYRGYLMU5_cjs.applyQuery(this.store.client[chunkYLVUONG3_cjs.additionalContext], this.#queryDef, this.#params);
1603
1603
  const executedAt = Date.now();
1604
1604
  this.store.batch({}, (batch) => {
1605
1605
  this.writeToStore({
@@ -2807,7 +2807,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
2807
2807
  batch.changes.modified.add(this.cacheKey);
2808
2808
  }
2809
2809
  constructor(store, subject, cacheKey, opts) {
2810
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkCAUXOFUO_cjs.additionalContext].logger?.child({}, {
2810
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkYLVUONG3_cjs.additionalContext].logger?.child({}, {
2811
2811
  msgPrefix: `SpecificLinkQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
2812
2812
  }) : void 0);
2813
2813
  [this.#sourceApiName, this.#sourceTypeKind, this.#sourceUnderlyingObjectType, this.#sourcePk, this.#linkName, this.#whereClause, this.#orderBy] = cacheKey.otherKeys;
@@ -2828,7 +2828,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
2828
2828
  */
2829
2829
  async fetchPageData(signal) {
2830
2830
  const client = this.store.client;
2831
- const ontologyProvider = client[chunkCAUXOFUO_cjs.additionalContext].ontologyProvider;
2831
+ const ontologyProvider = client[chunkYLVUONG3_cjs.additionalContext].ontologyProvider;
2832
2832
  const isInterface = this.#sourceTypeKind === "interface";
2833
2833
  const hasOrderBy = this.#orderBy && Object.keys(this.#orderBy).length > 0;
2834
2834
  let target;
@@ -2951,7 +2951,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
2951
2951
  }
2952
2952
  return (async () => {
2953
2953
  try {
2954
- const ontologyProvider = this.store.client[chunkCAUXOFUO_cjs.additionalContext].ontologyProvider;
2954
+ const ontologyProvider = this.store.client[chunkYLVUONG3_cjs.additionalContext].ontologyProvider;
2955
2955
  if (this.#sourceTypeKind === "interface") {
2956
2956
  const objectMetadata2 = await ontologyProvider.getObjectDefinition(objectType);
2957
2957
  if (this.#sourceApiName in objectMetadata2.interfaceMap) {
@@ -3132,7 +3132,7 @@ var ListQuery = class extends BaseListQuery {
3132
3132
  batch.changes.registerList(this.cacheKey);
3133
3133
  }
3134
3134
  constructor(store, subject, apiName, cacheKey, opts) {
3135
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkCAUXOFUO_cjs.additionalContext].logger?.child({}, {
3135
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkYLVUONG3_cjs.additionalContext].logger?.child({}, {
3136
3136
  msgPrefix: `ListQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
3137
3137
  }) : void 0);
3138
3138
  this.apiName = apiName;
@@ -3185,11 +3185,11 @@ var ListQuery = class extends BaseListQuery {
3185
3185
  async fetchPageData(signal) {
3186
3186
  const needsResultType = Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy) || this.#pivotInfo != null && this.#intersectWith != null && this.#intersectWith.length > 0 && !this.#pivotIntersectApplied;
3187
3187
  if (needsResultType) {
3188
- const wireObjectSet = chunkCAUXOFUO_cjs.getWireObjectSet(this.#objectSet);
3188
+ const wireObjectSet = chunkYLVUONG3_cjs.getWireObjectSet(this.#objectSet);
3189
3189
  const {
3190
3190
  resultType,
3191
3191
  invalidationSet
3192
- } = await getObjectTypesThatInvalidate(this.store.client[chunkCAUXOFUO_cjs.additionalContext], wireObjectSet);
3192
+ } = await getObjectTypesThatInvalidate(this.store.client[chunkYLVUONG3_cjs.additionalContext], wireObjectSet);
3193
3193
  this.#updateFetchedObjectType(resultType.apiName);
3194
3194
  this.#rdpInvalidationSet = invalidationSet;
3195
3195
  if (Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
@@ -3219,11 +3219,11 @@ var ListQuery = class extends BaseListQuery {
3219
3219
  }
3220
3220
  if (this.#fetchedObjectType == null) {
3221
3221
  try {
3222
- const wireObjectSet = chunkCAUXOFUO_cjs.getWireObjectSet(this.#objectSet);
3222
+ const wireObjectSet = chunkYLVUONG3_cjs.getWireObjectSet(this.#objectSet);
3223
3223
  const {
3224
3224
  resultType,
3225
3225
  invalidationSet
3226
- } = await getObjectTypesThatInvalidate(this.store.client[chunkCAUXOFUO_cjs.additionalContext], wireObjectSet);
3226
+ } = await getObjectTypesThatInvalidate(this.store.client[chunkYLVUONG3_cjs.additionalContext], wireObjectSet);
3227
3227
  this.#updateFetchedObjectType(resultType.apiName);
3228
3228
  this.#rdpInvalidationSet = invalidationSet;
3229
3229
  } catch {
@@ -3493,7 +3493,7 @@ var InterfaceListQuery = class extends ListQuery {
3493
3493
  type,
3494
3494
  apiName: this.apiName
3495
3495
  };
3496
- const clientCtx = store.client[chunkCAUXOFUO_cjs.additionalContext];
3496
+ const clientCtx = store.client[chunkYLVUONG3_cjs.additionalContext];
3497
3497
  let objectSet;
3498
3498
  if (rids != null) {
3499
3499
  objectSet = clientCtx.objectSetFactory(objectTypeDef, clientCtx, {
@@ -3532,7 +3532,7 @@ var InterfaceListQuery = class extends ListQuery {
3532
3532
  }
3533
3533
  extractRelevantObjects(changes) {
3534
3534
  const matchesApiName = ([, object]) => {
3535
- return this.apiName in object[chunkW2AWD4AH_cjs.ObjectDefRef].interfaceMap;
3535
+ return this.apiName in object[chunkSVB5K454_cjs.ObjectDefRef].interfaceMap;
3536
3536
  };
3537
3537
  const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
3538
3538
  const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
@@ -3551,7 +3551,7 @@ var InterfaceListQuery = class extends ListQuery {
3551
3551
  }
3552
3552
  };
3553
3553
  function createSourceSetForPivot(store, pivotInfo, rids) {
3554
- const clientCtx = store.client[chunkCAUXOFUO_cjs.additionalContext];
3554
+ const clientCtx = store.client[chunkYLVUONG3_cjs.additionalContext];
3555
3555
  if (rids != null) {
3556
3556
  return clientCtx.objectSetFactory({
3557
3557
  type: "object",
@@ -3606,7 +3606,7 @@ var ObjectListQuery = class extends ListQuery {
3606
3606
  const intersectWith = this.cacheKey.otherKeys[INTERSECT_IDX];
3607
3607
  const pivotInfo = this.cacheKey.otherKeys[PIVOT_IDX];
3608
3608
  const rids = this.cacheKey.otherKeys[RIDS_IDX];
3609
- const clientCtx = store.client[chunkCAUXOFUO_cjs.additionalContext];
3609
+ const clientCtx = store.client[chunkYLVUONG3_cjs.additionalContext];
3610
3610
  const typeDefinition = {
3611
3611
  type: "object",
3612
3612
  apiName: this.apiName
@@ -3865,7 +3865,7 @@ var MediaMetadataQuery = class extends Query {
3865
3865
  #propertyName;
3866
3866
  #preview;
3867
3867
  constructor(store, subject, objectType, primaryKey, propertyName, cacheKey, opts) {
3868
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkCAUXOFUO_cjs.additionalContext].logger?.child({}, {
3868
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkYLVUONG3_cjs.additionalContext].logger?.child({}, {
3869
3869
  msgPrefix: `MediaMetadataQuery<${objectType}, ${JSON.stringify(primaryKey)}, ${propertyName}>`
3870
3870
  }) : void 0);
3871
3871
  this.#objectType = objectType;
@@ -3898,8 +3898,8 @@ var MediaMetadataQuery = class extends Query {
3898
3898
  this.setStatus("loading", batch);
3899
3899
  });
3900
3900
  try {
3901
- const ontologyRid = await this.store.client[chunkCAUXOFUO_cjs.additionalContext].ontologyRid;
3902
- const response = await chunkYP43NHIA_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[chunkCAUXOFUO_cjs.additionalContext], ontologyRid, this.#objectType, String(this.#primaryKey), this.#propertyName, {
3901
+ const ontologyRid = await this.store.client[chunkYLVUONG3_cjs.additionalContext].ontologyRid;
3902
+ const response = await chunkAN2R7X5W_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[chunkYLVUONG3_cjs.additionalContext], ontologyRid, this.#objectType, String(this.#primaryKey), this.#propertyName, {
3903
3903
  preview: this.#preview
3904
3904
  });
3905
3905
  const metadata = {
@@ -4021,8 +4021,8 @@ var MediaHelper = class extends AbstractHelper {
4021
4021
  return this._subscribe(query, options, observer);
4022
4022
  }
4023
4023
  async fetchMetadata(coords, options) {
4024
- const ontologyRid = await this.store.client[chunkCAUXOFUO_cjs.additionalContext].ontologyRid;
4025
- const response = await chunkYP43NHIA_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[chunkCAUXOFUO_cjs.additionalContext], ontologyRid, coords.objectType, String(coords.primaryKey), coords.propertyName, {
4024
+ const ontologyRid = await this.store.client[chunkYLVUONG3_cjs.additionalContext].ontologyRid;
4025
+ const response = await chunkAN2R7X5W_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[chunkYLVUONG3_cjs.additionalContext], ontologyRid, coords.objectType, String(coords.primaryKey), coords.propertyName, {
4026
4026
  preview: options?.preview ?? true
4027
4027
  });
4028
4028
  return {
@@ -4042,8 +4042,8 @@ var MediaHelper = class extends AbstractHelper {
4042
4042
  let response;
4043
4043
  const coords = this.resolveToCoords(mediaOrLocation);
4044
4044
  if (coords) {
4045
- const ontologyRid = await this.store.client[chunkCAUXOFUO_cjs.additionalContext].ontologyRid;
4046
- response = await chunkYP43NHIA_cjs.MediaReferenceProperty_exports.getMediaContent(this.store.client[chunkCAUXOFUO_cjs.additionalContext], ontologyRid, coords.objectType, String(coords.primaryKey), coords.propertyName, {
4045
+ const ontologyRid = await this.store.client[chunkYLVUONG3_cjs.additionalContext].ontologyRid;
4046
+ response = await chunkAN2R7X5W_cjs.MediaReferenceProperty_exports.getMediaContent(this.store.client[chunkYLVUONG3_cjs.additionalContext], ontologyRid, coords.objectType, String(coords.primaryKey), coords.propertyName, {
4047
4047
  preview
4048
4048
  });
4049
4049
  } else if ("fetchContents" in mediaOrLocation) {
@@ -4143,8 +4143,8 @@ function stripRdpFields(value, rdpFields) {
4143
4143
  if (rdpFields.size === 0) {
4144
4144
  return value;
4145
4145
  }
4146
- const underlying = value[chunkW2AWD4AH_cjs.UnderlyingOsdkObject];
4147
- const objectDef = value[chunkW2AWD4AH_cjs.ObjectDefRef];
4146
+ const underlying = value[chunkSVB5K454_cjs.UnderlyingOsdkObject];
4147
+ const objectDef = value[chunkSVB5K454_cjs.ObjectDefRef];
4148
4148
  const newProps = {
4149
4149
  $apiName: underlying.$apiName,
4150
4150
  $objectType: underlying.$objectType,
@@ -4157,7 +4157,7 @@ function stripRdpFields(value, rdpFields) {
4157
4157
  newProps[key] = underlying[key];
4158
4158
  }
4159
4159
  }
4160
- return chunkW2AWD4AH_cjs.createOsdkObject(value[chunkW2AWD4AH_cjs.ClientRef], objectDef, newProps);
4160
+ return chunkSVB5K454_cjs.createOsdkObject(value[chunkSVB5K454_cjs.ClientRef], objectDef, newProps);
4161
4161
  }
4162
4162
  function isSuperset(superset, subset) {
4163
4163
  for (const field of subset) {
@@ -4168,8 +4168,8 @@ function isSuperset(superset, subset) {
4168
4168
  return true;
4169
4169
  }
4170
4170
  function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
4171
- const underlying = value[chunkW2AWD4AH_cjs.UnderlyingOsdkObject];
4172
- const objectDef = value[chunkW2AWD4AH_cjs.ObjectDefRef];
4171
+ const underlying = value[chunkSVB5K454_cjs.UnderlyingOsdkObject];
4172
+ const objectDef = value[chunkSVB5K454_cjs.ObjectDefRef];
4173
4173
  const newProps = {
4174
4174
  $apiName: underlying.$apiName,
4175
4175
  $objectType: underlying.$objectType,
@@ -4185,12 +4185,12 @@ function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
4185
4185
  }
4186
4186
  }
4187
4187
  }
4188
- return chunkW2AWD4AH_cjs.createOsdkObject(value[chunkW2AWD4AH_cjs.ClientRef], objectDef, newProps);
4188
+ return chunkSVB5K454_cjs.createOsdkObject(value[chunkSVB5K454_cjs.ClientRef], objectDef, newProps);
4189
4189
  }
4190
4190
  function mergeSelectFields(sourceValue, selectFields, existingValue) {
4191
- const sourceUnderlying = sourceValue[chunkW2AWD4AH_cjs.UnderlyingOsdkObject];
4192
- const existingUnderlying = existingValue[chunkW2AWD4AH_cjs.UnderlyingOsdkObject];
4193
- const objectDef = sourceValue[chunkW2AWD4AH_cjs.ObjectDefRef];
4191
+ const sourceUnderlying = sourceValue[chunkSVB5K454_cjs.UnderlyingOsdkObject];
4192
+ const existingUnderlying = existingValue[chunkSVB5K454_cjs.UnderlyingOsdkObject];
4193
+ const objectDef = sourceValue[chunkSVB5K454_cjs.ObjectDefRef];
4194
4194
  const newProps = {
4195
4195
  $apiName: sourceUnderlying.$apiName,
4196
4196
  $objectType: sourceUnderlying.$objectType,
@@ -4208,7 +4208,7 @@ function mergeSelectFields(sourceValue, selectFields, existingValue) {
4208
4208
  newProps[key] = sourceUnderlying[key];
4209
4209
  }
4210
4210
  }
4211
- return chunkW2AWD4AH_cjs.createOsdkObject(sourceValue[chunkW2AWD4AH_cjs.ClientRef], objectDef, newProps);
4211
+ return chunkSVB5K454_cjs.createOsdkObject(sourceValue[chunkSVB5K454_cjs.ClientRef], objectDef, newProps);
4212
4212
  }
4213
4213
  function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, targetCurrentValue) {
4214
4214
  if (targetRdpFields.size === 0) {
@@ -4220,8 +4220,8 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
4220
4220
  }
4221
4221
  return filterToRdpFields(sourceValue, targetRdpFields, sourceRdpFields);
4222
4222
  }
4223
- const sourceUnderlying = sourceValue[chunkW2AWD4AH_cjs.UnderlyingOsdkObject];
4224
- const objectDef = sourceValue[chunkW2AWD4AH_cjs.ObjectDefRef];
4223
+ const sourceUnderlying = sourceValue[chunkSVB5K454_cjs.UnderlyingOsdkObject];
4224
+ const objectDef = sourceValue[chunkSVB5K454_cjs.ObjectDefRef];
4225
4225
  const newProps = {
4226
4226
  $apiName: sourceUnderlying.$apiName,
4227
4227
  $objectType: sourceUnderlying.$objectType,
@@ -4235,7 +4235,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
4235
4235
  }
4236
4236
  }
4237
4237
  if (targetCurrentValue) {
4238
- const targetUnderlying = targetCurrentValue[chunkW2AWD4AH_cjs.UnderlyingOsdkObject];
4238
+ const targetUnderlying = targetCurrentValue[chunkSVB5K454_cjs.UnderlyingOsdkObject];
4239
4239
  for (const field of targetRdpFields) {
4240
4240
  if (field in targetUnderlying) {
4241
4241
  if (!sourceRdpFields.has(field) || newProps[field] === void 0) {
@@ -4244,7 +4244,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
4244
4244
  }
4245
4245
  }
4246
4246
  }
4247
- return chunkW2AWD4AH_cjs.createOsdkObject(sourceValue[chunkW2AWD4AH_cjs.ClientRef], objectDef, newProps);
4247
+ return chunkSVB5K454_cjs.createOsdkObject(sourceValue[chunkSVB5K454_cjs.ClientRef], objectDef, newProps);
4248
4248
  }
4249
4249
 
4250
4250
  // src/observable/internal/object/ObjectCacheKeyRegistry.ts
@@ -4399,7 +4399,7 @@ var BulkObjectLoader = class {
4399
4399
  #maxEntries;
4400
4400
  constructor(client, maxWait = 25, maxEntries = 100) {
4401
4401
  this.#client = client;
4402
- this.#logger = client[chunkCAUXOFUO_cjs.additionalContext].logger;
4402
+ this.#logger = client[chunkYLVUONG3_cjs.additionalContext].logger;
4403
4403
  this.#maxWait = maxWait;
4404
4404
  this.#maxEntries = maxEntries;
4405
4405
  }
@@ -4568,7 +4568,7 @@ var ObjectQuery = class extends Query {
4568
4568
  #includeAllBaseObjectProperties;
4569
4569
  #implementingTypes;
4570
4570
  constructor(store, subject, type, pk, cacheKey, opts, defType = "object", select, loadPropertySecurityMetadata, includeAllBaseObjectProperties) {
4571
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkCAUXOFUO_cjs.additionalContext].logger?.child({}, {
4571
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkYLVUONG3_cjs.additionalContext].logger?.child({}, {
4572
4572
  msgPrefix: `ObjectQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
4573
4573
  }) : void 0);
4574
4574
  this.#apiName = type;
@@ -4674,7 +4674,7 @@ var ObjectsHelper = class extends AbstractHelper {
4674
4674
  select,
4675
4675
  $loadPropertySecurityMetadata
4676
4676
  } = options;
4677
- const defType = chunk42JVCEPG_cjs.getDefType(options.apiName);
4677
+ const defType = chunkYRGYLMU5_cjs.getDefType(options.apiName);
4678
4678
  const $includeAllBaseObjectProperties = defType === "interface" && options.$includeAllBaseObjectProperties ? true : void 0;
4679
4679
  const canonSelect = select && select.length > 0 ? this.store.selectCanonicalizer.canonicalize(select) : void 0;
4680
4680
  const objectCacheKey = this.cacheKeys.get("object", apiName, pk, rdpConfig ?? void 0, canonSelect, $loadPropertySecurityMetadata ? true : void 0, $includeAllBaseObjectProperties);
@@ -4715,7 +4715,7 @@ var ObjectsHelper = class extends AbstractHelper {
4715
4715
  if (valueToWrite !== tombstone && existing?.value && this.isObjectHolder(existing.value)) {
4716
4716
  const expectedRdpFields = this.store.objectCacheKeyRegistry.getRdpFieldSet(sourceCacheKey);
4717
4717
  if (expectedRdpFields.size > 0) {
4718
- const underlying = valueToWrite[chunkW2AWD4AH_cjs.UnderlyingOsdkObject];
4718
+ const underlying = valueToWrite[chunkSVB5K454_cjs.UnderlyingOsdkObject];
4719
4719
  const actualRdpFields = /* @__PURE__ */ new Set();
4720
4720
  for (const field of expectedRdpFields) {
4721
4721
  if (underlying && field in underlying) {
@@ -4796,7 +4796,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
4796
4796
  // revalidation. Lazily populated on first fetch when `withProperties` is set.
4797
4797
  #rdpInvalidationSet;
4798
4798
  constructor(store, subject, baseObjectSetWire, operations, cacheKey, opts) {
4799
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkCAUXOFUO_cjs.additionalContext].logger?.child({}, {
4799
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkYLVUONG3_cjs.additionalContext].logger?.child({}, {
4800
4800
  msgPrefix: `ObjectSetQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
4801
4801
  }) : void 0);
4802
4802
  this.#baseObjectSetWire = baseObjectSetWire;
@@ -4864,7 +4864,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
4864
4864
  return;
4865
4865
  }
4866
4866
  for (const os of sets) {
4867
- const typeName = _ObjectSetQuery.#extractTypeFromWireObjectSet(chunkCAUXOFUO_cjs.getWireObjectSet(os));
4867
+ const typeName = _ObjectSetQuery.#extractTypeFromWireObjectSet(chunkYLVUONG3_cjs.getWireObjectSet(os));
4868
4868
  if (typeName) {
4869
4869
  types.add(typeName);
4870
4870
  }
@@ -4891,16 +4891,16 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
4891
4891
  */
4892
4892
  async fetchPageData(signal) {
4893
4893
  if (this.#operations.orderBy && Object.keys(this.#operations.orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
4894
- const wireObjectSet = chunkCAUXOFUO_cjs.getWireObjectSet(this.#composedObjectSet);
4894
+ const wireObjectSet = chunkYLVUONG3_cjs.getWireObjectSet(this.#composedObjectSet);
4895
4895
  const {
4896
4896
  resultType,
4897
4897
  invalidationSet
4898
- } = await getObjectTypesThatInvalidate(this.store.client[chunkCAUXOFUO_cjs.additionalContext], wireObjectSet);
4898
+ } = await getObjectTypesThatInvalidate(this.store.client[chunkYLVUONG3_cjs.additionalContext], wireObjectSet);
4899
4899
  this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#operations.orderBy);
4900
4900
  this.#rdpInvalidationSet = invalidationSet;
4901
4901
  }
4902
4902
  if (this.#rdpInvalidationSet == null && this.#operations.withProperties != null) {
4903
- const wireObjectSet = chunkCAUXOFUO_cjs.getWireObjectSet(this.#composedObjectSet);
4903
+ const wireObjectSet = chunkYLVUONG3_cjs.getWireObjectSet(this.#composedObjectSet);
4904
4904
  this.#rdpInvalidationSet = await this.#computeInvalidationTypes(wireObjectSet);
4905
4905
  }
4906
4906
  const resp = await this.#composedObjectSet.fetchPage({
@@ -5049,7 +5049,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
5049
5049
  try {
5050
5050
  const {
5051
5051
  invalidationSet
5052
- } = await getObjectTypesThatInvalidate(this.store.client[chunkCAUXOFUO_cjs.additionalContext], wireObjectSet);
5052
+ } = await getObjectTypesThatInvalidate(this.store.client[chunkYLVUONG3_cjs.additionalContext], wireObjectSet);
5053
5053
  return invalidationSet;
5054
5054
  } catch (error) {
5055
5055
  this.store.logger?.error("Failed to compute invalidation types for object set query, falling back to empty set", error);
@@ -5128,7 +5128,7 @@ var ObjectSetHelper = class extends AbstractHelper {
5128
5128
  if (process.env.NODE_ENV !== "production") {
5129
5129
  console.warn("[@osdk/client] streamUpdates is not supported with pivotTo. The server does not support websocket subscriptions for link-traversal queries. Ignoring streamUpdates.");
5130
5130
  }
5131
- } else if (options.withProperties || chunkCAUXOFUO_cjs.hasWithProperties(chunkCAUXOFUO_cjs.getWireObjectSet(options.baseObjectSet))) {
5131
+ } else if (options.withProperties || chunkYLVUONG3_cjs.hasWithProperties(chunkYLVUONG3_cjs.getWireObjectSet(options.baseObjectSet))) {
5132
5132
  if (process.env.NODE_ENV !== "production") {
5133
5133
  console.warn("[@osdk/client] streamUpdates is not supported with withProperties. The server does not support websocket subscriptions for object sets that include derived properties. Ignoring streamUpdates.");
5134
5134
  }
@@ -5142,7 +5142,7 @@ var ObjectSetHelper = class extends AbstractHelper {
5142
5142
  const {
5143
5143
  baseObjectSet
5144
5144
  } = options;
5145
- const baseObjectSetWire = JSON.stringify(chunkCAUXOFUO_cjs.getWireObjectSet(baseObjectSet));
5145
+ const baseObjectSetWire = JSON.stringify(chunkYLVUONG3_cjs.getWireObjectSet(baseObjectSet));
5146
5146
  const operations = this.buildCanonicalizedOperations(options);
5147
5147
  const objectSetCacheKey = this.cacheKeys.get("objectSet", baseObjectSetWire, operations);
5148
5148
  return this.store.queries.get(objectSetCacheKey, () => {
@@ -5158,13 +5158,13 @@ var ObjectSetHelper = class extends AbstractHelper {
5158
5158
  operations.withProperties = this.rdpCanonicalizer.canonicalize(options.withProperties);
5159
5159
  }
5160
5160
  if (options.union && options.union.length > 0) {
5161
- operations.union = this.objectSetArrayCanonicalizer.canonicalizeUnion(options.union.map((os) => JSON.stringify(chunkCAUXOFUO_cjs.getWireObjectSet(os))));
5161
+ operations.union = this.objectSetArrayCanonicalizer.canonicalizeUnion(options.union.map((os) => JSON.stringify(chunkYLVUONG3_cjs.getWireObjectSet(os))));
5162
5162
  }
5163
5163
  if (options.intersect && options.intersect.length > 0) {
5164
- operations.intersect = this.objectSetArrayCanonicalizer.canonicalizeIntersect(options.intersect.map((os) => JSON.stringify(chunkCAUXOFUO_cjs.getWireObjectSet(os))));
5164
+ operations.intersect = this.objectSetArrayCanonicalizer.canonicalizeIntersect(options.intersect.map((os) => JSON.stringify(chunkYLVUONG3_cjs.getWireObjectSet(os))));
5165
5165
  }
5166
5166
  if (options.subtract && options.subtract.length > 0) {
5167
- operations.subtract = this.objectSetArrayCanonicalizer.canonicalizeSubtract(options.subtract.map((os) => JSON.stringify(chunkCAUXOFUO_cjs.getWireObjectSet(os))));
5167
+ operations.subtract = this.objectSetArrayCanonicalizer.canonicalizeSubtract(options.subtract.map((os) => JSON.stringify(chunkYLVUONG3_cjs.getWireObjectSet(os))));
5168
5168
  }
5169
5169
  if (options.pivotTo) {
5170
5170
  operations.pivotTo = options.pivotTo;
@@ -5312,7 +5312,7 @@ var RdpCanonicalizer = class extends CachingCanonicalizer {
5312
5312
  apiName: "__rdp_canonicalizer_holder__"
5313
5313
  };
5314
5314
  for (const [key, rdpFunction] of Object.entries(rdp)) {
5315
- const builder = chunkCAUXOFUO_cjs.createWithPropertiesObjectSet(
5315
+ const builder = chunkYLVUONG3_cjs.createWithPropertiesObjectSet(
5316
5316
  objectTypeHolder,
5317
5317
  {
5318
5318
  type: "methodInput"
@@ -5479,7 +5479,7 @@ var Store = class {
5479
5479
  subjects = this.layers.subjects;
5480
5480
  // these are hopefully temporary
5481
5481
  constructor(client) {
5482
- this.logger = client[chunkCAUXOFUO_cjs.additionalContext].logger?.child({}, {
5482
+ this.logger = client[chunkYLVUONG3_cjs.additionalContext].logger?.child({}, {
5483
5483
  msgPrefix: "Store"
5484
5484
  });
5485
5485
  this.client = client;
@@ -5890,10 +5890,10 @@ var Store = class {
5890
5890
 
5891
5891
  // src/observable/ObservableClient.ts
5892
5892
  function createObservableClient(client, extraUserAgents) {
5893
- const tweakedClient = chunkW2AWD4AH_cjs.createClientFromContext({
5894
- ...client[chunkCAUXOFUO_cjs.additionalContext],
5895
- fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkCAUXOFUO_cjs.additionalContext].fetch, (headers) => {
5896
- headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkW2AWD4AH_cjs.OBSERVABLE_USER_AGENT, ...extraUserAgents?.() ?? []].filter((x) => x && x?.length > 0).join(" "));
5893
+ const tweakedClient = chunkSVB5K454_cjs.createClientFromContext({
5894
+ ...client[chunkYLVUONG3_cjs.additionalContext],
5895
+ fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkYLVUONG3_cjs.additionalContext].fetch, (headers) => {
5896
+ headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkSVB5K454_cjs.OBSERVABLE_USER_AGENT, ...extraUserAgents?.() ?? []].filter((x) => x && x?.length > 0).join(" "));
5897
5897
  return headers;
5898
5898
  })
5899
5899
  });
@@ -5901,5 +5901,5 @@ function createObservableClient(client, extraUserAgents) {
5901
5901
  }
5902
5902
 
5903
5903
  exports.createObservableClient = createObservableClient;
5904
- //# sourceMappingURL=chunk-GVKJAORH.cjs.map
5905
- //# sourceMappingURL=chunk-GVKJAORH.cjs.map
5904
+ //# sourceMappingURL=chunk-5QXHJGSL.cjs.map
5905
+ //# sourceMappingURL=chunk-5QXHJGSL.cjs.map