@osdk/client 2.8.0-beta.27 → 2.8.0-beta.28

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 (76) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js +1 -17
  3. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  4. package/build/browser/observable/ObservableClient/MediaObservableTypes.js +2 -0
  5. package/build/browser/observable/ObservableClient/MediaObservableTypes.js.map +1 -0
  6. package/build/browser/observable/ObservableClient/MediaTypes.js +2 -0
  7. package/build/browser/observable/ObservableClient/MediaTypes.js.map +1 -0
  8. package/build/browser/observable/internal/Changes.js.map +1 -1
  9. package/build/browser/observable/internal/KnownCacheKey.js.map +1 -1
  10. package/build/browser/observable/internal/ListQueryView.js +21 -9
  11. package/build/browser/observable/internal/ListQueryView.js.map +1 -1
  12. package/build/browser/observable/internal/Store.js +5 -1
  13. package/build/browser/observable/internal/Store.js.map +1 -1
  14. package/build/browser/observable/internal/list/ListQuery.js +0 -9
  15. package/build/browser/observable/internal/list/ListQuery.js.map +1 -1
  16. package/build/browser/observable/internal/media/BlobMemoryManager.js +116 -0
  17. package/build/browser/observable/internal/media/BlobMemoryManager.js.map +1 -0
  18. package/build/browser/observable/internal/media/MediaMetadataCacheKey.js +2 -0
  19. package/build/browser/observable/internal/media/MediaMetadataCacheKey.js.map +1 -0
  20. package/build/browser/observable/internal/media/MediaMetadataQuery.js +159 -0
  21. package/build/browser/observable/internal/media/MediaMetadataQuery.js.map +1 -0
  22. package/build/browser/observable/internal/media/getMediaCacheKey.js +28 -0
  23. package/build/browser/observable/internal/media/getMediaCacheKey.js.map +1 -0
  24. package/build/browser/util/UserAgent.js +2 -2
  25. package/build/cjs/{chunk-ZPGIIKEZ.cjs → chunk-66XI45ES.cjs} +39 -39
  26. package/build/cjs/{chunk-ZPGIIKEZ.cjs.map → chunk-66XI45ES.cjs.map} +1 -1
  27. package/build/cjs/{chunk-BWOPPEUP.cjs → chunk-SV4AIIV4.cjs} +2 -19
  28. package/build/cjs/chunk-SV4AIIV4.cjs.map +1 -0
  29. package/build/cjs/index.cjs +10 -10
  30. package/build/cjs/public/internal.cjs +8 -8
  31. package/build/cjs/public/unstable-do-not-use.cjs +86 -81
  32. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  33. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js +1 -17
  34. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  35. package/build/esm/observable/ObservableClient/MediaObservableTypes.js +2 -0
  36. package/build/esm/observable/ObservableClient/MediaObservableTypes.js.map +1 -0
  37. package/build/esm/observable/ObservableClient/MediaTypes.js +2 -0
  38. package/build/esm/observable/ObservableClient/MediaTypes.js.map +1 -0
  39. package/build/esm/observable/internal/Changes.js.map +1 -1
  40. package/build/esm/observable/internal/KnownCacheKey.js.map +1 -1
  41. package/build/esm/observable/internal/ListQueryView.js +21 -9
  42. package/build/esm/observable/internal/ListQueryView.js.map +1 -1
  43. package/build/esm/observable/internal/Store.js +5 -1
  44. package/build/esm/observable/internal/Store.js.map +1 -1
  45. package/build/esm/observable/internal/list/ListQuery.js +0 -9
  46. package/build/esm/observable/internal/list/ListQuery.js.map +1 -1
  47. package/build/esm/observable/internal/media/BlobMemoryManager.js +116 -0
  48. package/build/esm/observable/internal/media/BlobMemoryManager.js.map +1 -0
  49. package/build/esm/observable/internal/media/MediaMetadataCacheKey.js +2 -0
  50. package/build/esm/observable/internal/media/MediaMetadataCacheKey.js.map +1 -0
  51. package/build/esm/observable/internal/media/MediaMetadataQuery.js +159 -0
  52. package/build/esm/observable/internal/media/MediaMetadataQuery.js.map +1 -0
  53. package/build/esm/observable/internal/media/getMediaCacheKey.js +28 -0
  54. package/build/esm/observable/internal/media/getMediaCacheKey.js.map +1 -0
  55. package/build/esm/util/UserAgent.js +2 -2
  56. package/build/types/observable/ObservableClient/MediaObservableTypes.d.ts +35 -0
  57. package/build/types/observable/ObservableClient/MediaObservableTypes.d.ts.map +1 -0
  58. package/build/types/observable/ObservableClient/MediaTypes.d.ts +1 -0
  59. package/build/types/observable/ObservableClient/MediaTypes.d.ts.map +1 -0
  60. package/build/types/observable/internal/Changes.d.ts +4 -3
  61. package/build/types/observable/internal/Changes.d.ts.map +1 -1
  62. package/build/types/observable/internal/KnownCacheKey.d.ts +2 -1
  63. package/build/types/observable/internal/KnownCacheKey.d.ts.map +1 -1
  64. package/build/types/observable/internal/ListQueryView.d.ts.map +1 -1
  65. package/build/types/observable/internal/Store.d.ts.map +1 -1
  66. package/build/types/observable/internal/list/ListQuery.d.ts.map +1 -1
  67. package/build/types/observable/internal/media/BlobMemoryManager.d.ts +10 -0
  68. package/build/types/observable/internal/media/BlobMemoryManager.d.ts.map +1 -0
  69. package/build/types/observable/internal/media/MediaMetadataCacheKey.d.ts +4 -0
  70. package/build/types/observable/internal/media/MediaMetadataCacheKey.d.ts.map +1 -0
  71. package/build/types/observable/internal/media/MediaMetadataQuery.d.ts +23 -0
  72. package/build/types/observable/internal/media/MediaMetadataQuery.d.ts.map +1 -0
  73. package/build/types/observable/internal/media/getMediaCacheKey.d.ts +2 -0
  74. package/build/types/observable/internal/media/getMediaCacheKey.d.ts.map +1 -0
  75. package/package.json +9 -9
  76. package/build/cjs/chunk-BWOPPEUP.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkZPGIIKEZ_cjs = require('../chunk-ZPGIIKEZ.cjs');
4
- var chunkBWOPPEUP_cjs = require('../chunk-BWOPPEUP.cjs');
3
+ var chunk66XI45ES_cjs = require('../chunk-66XI45ES.cjs');
4
+ var chunkSV4AIIV4_cjs = require('../chunk-SV4AIIV4.cjs');
5
5
  require('../chunk-GSVXEVM4.cjs');
6
6
  require('../chunk-D26YLHTV.cjs');
7
7
  require('../chunk-YJG67XL4.cjs');
@@ -139,7 +139,7 @@ var WhereClauseCanonicalizer = class {
139
139
  var whereCanonicalizer = new WhereClauseCanonicalizer();
140
140
  var orderByCanonicalizer = new OrderByCanonicalizer();
141
141
  function computeObjectSetCacheKey(objectSet, options) {
142
- const keyParts = ["objectSet", chunkBWOPPEUP_cjs.getWireObjectSet(objectSet)];
142
+ const keyParts = ["objectSet", chunkSV4AIIV4_cjs.getWireObjectSet(objectSet)];
143
143
  if (!options) {
144
144
  return JSON.stringify(keyParts);
145
145
  }
@@ -151,13 +151,13 @@ function computeObjectSetCacheKey(objectSet, options) {
151
151
  keyParts.push("props", propKeys);
152
152
  }
153
153
  if (options.union && options.union.length > 0) {
154
- keyParts.push("union", options.union.map((os) => chunkBWOPPEUP_cjs.getWireObjectSet(os)));
154
+ keyParts.push("union", options.union.map((os) => chunkSV4AIIV4_cjs.getWireObjectSet(os)));
155
155
  }
156
156
  if (options.intersect && options.intersect.length > 0) {
157
- keyParts.push("intersect", options.intersect.map((os) => chunkBWOPPEUP_cjs.getWireObjectSet(os)));
157
+ keyParts.push("intersect", options.intersect.map((os) => chunkSV4AIIV4_cjs.getWireObjectSet(os)));
158
158
  }
159
159
  if (options.subtract && options.subtract.length > 0) {
160
- keyParts.push("subtract", options.subtract.map((os) => chunkBWOPPEUP_cjs.getWireObjectSet(os)));
160
+ keyParts.push("subtract", options.subtract.map((os) => chunkSV4AIIV4_cjs.getWireObjectSet(os)));
161
161
  }
162
162
  if (options.pivotTo) {
163
163
  keyParts.push("pivotTo", options.pivotTo);
@@ -221,8 +221,8 @@ var ObservableClientImpl = class {
221
221
  const instances = [];
222
222
  const objectSetWires = [];
223
223
  for (const item of options.dependsOnObjects ?? []) {
224
- if (chunkBWOPPEUP_cjs.isObjectSet(item)) {
225
- objectSetWires.push(chunkBWOPPEUP_cjs.getWireObjectSet(item));
224
+ if (chunkSV4AIIV4_cjs.isObjectSet(item)) {
225
+ objectSetWires.push(chunkSV4AIIV4_cjs.getWireObjectSet(item));
226
226
  } else {
227
227
  instances.push({
228
228
  $apiName: item.$objectType ?? item.$apiName,
@@ -230,7 +230,7 @@ var ObservableClientImpl = class {
230
230
  });
231
231
  }
232
232
  }
233
- const objectSetTypesPromise = objectSetWires.length > 0 ? Promise.all(objectSetWires.map((wire) => chunkBWOPPEUP_cjs.extractObjectOrInterfaceType(this.__experimentalStore.client[chunkBWOPPEUP_cjs.additionalContext], wire))).then((types) => types.filter((t) => t != null).map((t) => t.apiName)) : void 0;
233
+ const objectSetTypesPromise = objectSetWires.length > 0 ? Promise.all(objectSetWires.map((wire) => chunkSV4AIIV4_cjs.extractObjectOrInterfaceType(this.__experimentalStore.client[chunkSV4AIIV4_cjs.additionalContext], wire))).then((types) => types.filter((t) => t != null).map((t) => t.apiName)) : void 0;
234
234
  return this.__experimentalStore.functions.observe({
235
235
  ...options,
236
236
  queryDef,
@@ -459,7 +459,7 @@ var OptimisticJob = class {
459
459
  return this;
460
460
  },
461
461
  createObject(type, pk, properties) {
462
- const create = store.client[chunkBWOPPEUP_cjs.additionalContext].objectFactory2(store.client[chunkBWOPPEUP_cjs.additionalContext], [{
462
+ const create = store.client[chunkSV4AIIV4_cjs.additionalContext].objectFactory2(store.client[chunkSV4AIIV4_cjs.additionalContext], [{
463
463
  $primaryKey: pk,
464
464
  $apiName: type.apiName,
465
465
  $objectType: type.apiName,
@@ -597,7 +597,7 @@ var ListQueryView = class {
597
597
  #viewLimit;
598
598
  #pageSize;
599
599
  #viewId;
600
- #hasAutoFetch;
600
+ #autoFetchMinimum;
601
601
  #fetchMore;
602
602
  #pendingFetchMore;
603
603
  #lastPayload;
@@ -606,8 +606,8 @@ var ListQueryView = class {
606
606
  this.#query = query;
607
607
  this.#pageSize = pageSize;
608
608
  this.#viewId = `view_${++viewIdCounter}`;
609
- this.#hasAutoFetch = autoFetchMore === true || typeof autoFetchMore === "number" && autoFetchMore > 0;
610
- this.#viewLimit = this.#hasAutoFetch ? Number.MAX_SAFE_INTEGER : pageSize;
609
+ this.#autoFetchMinimum = autoFetchMore === true ? Number.MAX_SAFE_INTEGER : typeof autoFetchMore === "number" && autoFetchMore > 0 ? autoFetchMore : 0;
610
+ this.#viewLimit = this.#autoFetchMinimum > 0 ? Number.MAX_SAFE_INTEGER : pageSize;
611
611
  this.#fetchMore = this.#createFetchMore();
612
612
  query.registerFetchPageSize(this.#viewId, pageSize);
613
613
  }
@@ -616,8 +616,10 @@ var ListQueryView = class {
616
616
  const sub = this.#query.subscribe({
617
617
  next: (payload) => {
618
618
  this.#lastPayload = payload;
619
- observer.next?.(this.#transformPayload(payload));
620
- if (!this.#hasAutoFetch && payload.status === "loaded" && (payload.resolvedList?.length ?? 0) < this.#viewLimit && this.#query.hasMorePages()) {
619
+ this.#observer?.next?.(this.#transformPayload(payload));
620
+ const loadedCount = payload.resolvedList?.length ?? 0;
621
+ const fetchThreshold = this.#autoFetchMinimum > 0 ? this.#autoFetchMinimum : this.#viewLimit;
622
+ if (payload.status === "loaded" && this.#query.hasMorePages() && loadedCount < fetchThreshold) {
621
623
  void this.#query.fetchMore();
622
624
  }
623
625
  },
@@ -639,12 +641,19 @@ var ListQueryView = class {
639
641
  #transformPayload(payload) {
640
642
  const resolvedList = payload.resolvedList;
641
643
  const loadedCount = resolvedList?.length ?? 0;
644
+ let status = payload.status;
645
+ if (this.#autoFetchMinimum > 0 && status === "loaded" && this.#query.hasMorePages() && loadedCount < this.#autoFetchMinimum) {
646
+ status = "loading";
647
+ }
648
+ if (loadedCount >= this.#viewLimit && status === "loading") {
649
+ status = "loaded";
650
+ }
642
651
  return {
643
652
  ...payload,
644
653
  resolvedList: resolvedList?.slice(0, this.#viewLimit),
645
654
  hasMore: this.#viewLimit < loadedCount || payload.hasMore,
646
655
  fetchMore: this.#fetchMore,
647
- status: loadedCount >= this.#viewLimit && payload.status === "loading" ? "loaded" : payload.status
656
+ status
648
657
  };
649
658
  }
650
659
  #createFetchMore() {
@@ -917,7 +926,7 @@ var Query = class {
917
926
  this.store = store;
918
927
  this.cacheKeys = store.cacheKeys;
919
928
  this.#subject = observable;
920
- this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkBWOPPEUP_cjs.additionalContext].logger : store.client[chunkBWOPPEUP_cjs.additionalContext].logger?.child({}, {
929
+ this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkSV4AIIV4_cjs.additionalContext].logger : store.client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
921
930
  msgPrefix: process.env.NODE_ENV !== "production" ? `Query<${cacheKey.type}, ${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>` : "Query"
922
931
  }));
923
932
  }
@@ -1079,7 +1088,7 @@ var AggregationQuery = class extends Query {
1079
1088
  #invalidationTypes;
1080
1089
  #invalidationTypesPromise;
1081
1090
  constructor(store, subject, cacheKey, opts) {
1082
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkBWOPPEUP_cjs.additionalContext].logger?.child({}, {
1091
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
1083
1092
  msgPrefix: `AggregationQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
1084
1093
  }) : void 0);
1085
1094
  this.apiName = cacheKey.otherKeys[API_NAME_IDX];
@@ -1097,7 +1106,7 @@ var AggregationQuery = class extends Query {
1097
1106
  try {
1098
1107
  const {
1099
1108
  invalidationSet
1100
- } = await getObjectTypesThatInvalidate(this.store.client[chunkBWOPPEUP_cjs.additionalContext], wireObjectSet);
1109
+ } = await getObjectTypesThatInvalidate(this.store.client[chunkSV4AIIV4_cjs.additionalContext], wireObjectSet);
1101
1110
  return /* @__PURE__ */ new Set([this.apiName, ...invalidationSet]);
1102
1111
  } catch (error) {
1103
1112
  this.store.logger?.error("Failed to compute invalidation types for aggregation, falling back to base type only", error);
@@ -1168,7 +1177,7 @@ var ObjectAggregationQuery = class extends AggregationQuery {
1168
1177
  };
1169
1178
  let objectSet;
1170
1179
  if (this.parsedWireObjectSet) {
1171
- objectSet = chunkBWOPPEUP_cjs.createObjectSet(objectTypeDef, this.store.client[chunkBWOPPEUP_cjs.additionalContext], this.parsedWireObjectSet);
1180
+ objectSet = chunkSV4AIIV4_cjs.createObjectSet(objectTypeDef, this.store.client[chunkSV4AIIV4_cjs.additionalContext], this.parsedWireObjectSet);
1172
1181
  } else {
1173
1182
  objectSet = this.store.client(objectTypeDef);
1174
1183
  }
@@ -1210,7 +1219,7 @@ var AggregationsHelper = class extends AbstractHelper {
1210
1219
  return this.getOrCreateQuery(options, void 0);
1211
1220
  }
1212
1221
  getQueryWithObjectSet(options) {
1213
- const serializedObjectSet = JSON.stringify(chunkBWOPPEUP_cjs.getWireObjectSet(options.objectSet));
1222
+ const serializedObjectSet = JSON.stringify(chunkSV4AIIV4_cjs.getWireObjectSet(options.objectSet));
1214
1223
  return this.getOrCreateQuery(options, serializedObjectSet);
1215
1224
  }
1216
1225
  getOrCreateQuery(options, serializedObjectSet) {
@@ -1533,7 +1542,7 @@ var FunctionParamsCanonicalizer = class {
1533
1542
  path.push("$:map_end");
1534
1543
  return arr;
1535
1544
  }
1536
- if (chunkZPGIIKEZ_cjs.isObjectSpecifiersObject(value)) {
1545
+ if (chunk66XI45ES_cjs.isObjectSpecifiersObject(value)) {
1537
1546
  const objectType = value.$objectType ?? value.$apiName;
1538
1547
  path.push("$:osdk", objectType, value.$primaryKey);
1539
1548
  return {
@@ -1541,8 +1550,8 @@ var FunctionParamsCanonicalizer = class {
1541
1550
  $primaryKey: value.$primaryKey
1542
1551
  };
1543
1552
  }
1544
- if (chunkBWOPPEUP_cjs.isObjectSet(value)) {
1545
- const wire = chunkBWOPPEUP_cjs.getWireObjectSet(value);
1553
+ if (chunkSV4AIIV4_cjs.isObjectSet(value)) {
1554
+ const wire = chunkSV4AIIV4_cjs.getWireObjectSet(value);
1546
1555
  path.push("$:objectset", wire);
1547
1556
  return wire;
1548
1557
  }
@@ -1602,7 +1611,7 @@ var FunctionQuery = class extends Query {
1602
1611
  #dependsOnObjects;
1603
1612
  #queryDef;
1604
1613
  constructor(store, subject, queryDef, params, cacheKey, opts, objectSetTypesPromise) {
1605
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkBWOPPEUP_cjs.additionalContext].logger?.child({}, {
1614
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
1606
1615
  msgPrefix: `FunctionQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
1607
1616
  }) : void 0);
1608
1617
  this.#apiName = queryDef.apiName;
@@ -1659,7 +1668,7 @@ var FunctionQuery = class extends Query {
1659
1668
  }).debug("calling _fetchAndStore");
1660
1669
  }
1661
1670
  try {
1662
- const result = await chunkZPGIIKEZ_cjs.applyQuery(this.store.client[chunkBWOPPEUP_cjs.additionalContext], this.#queryDef, this.#params);
1671
+ const result = await chunk66XI45ES_cjs.applyQuery(this.store.client[chunkSV4AIIV4_cjs.additionalContext], this.#queryDef, this.#params);
1663
1672
  const executedAt = Date.now();
1664
1673
  this.store.batch({}, (batch) => {
1665
1674
  this.writeToStore({
@@ -2873,7 +2882,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
2873
2882
  batch.changes.modified.add(this.cacheKey);
2874
2883
  }
2875
2884
  constructor(store, subject, cacheKey, opts) {
2876
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkBWOPPEUP_cjs.additionalContext].logger?.child({}, {
2885
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
2877
2886
  msgPrefix: `SpecificLinkQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
2878
2887
  }) : void 0);
2879
2888
  [this.#sourceApiName, this.#sourceTypeKind, this.#sourceUnderlyingObjectType, this.#sourcePk, this.#linkName, this.#whereClause, this.#orderBy] = cacheKey.otherKeys;
@@ -2887,7 +2896,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
2887
2896
  */
2888
2897
  async fetchPageData(signal) {
2889
2898
  const client = this.store.client;
2890
- const ontologyProvider = client[chunkBWOPPEUP_cjs.additionalContext].ontologyProvider;
2899
+ const ontologyProvider = client[chunkSV4AIIV4_cjs.additionalContext].ontologyProvider;
2891
2900
  const isInterface = this.#sourceTypeKind === "interface";
2892
2901
  if (this.#orderBy && Object.keys(this.#orderBy).length > 0) {
2893
2902
  let targetTypeApiName;
@@ -2998,7 +3007,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
2998
3007
  }
2999
3008
  return (async () => {
3000
3009
  try {
3001
- const ontologyProvider = this.store.client[chunkBWOPPEUP_cjs.additionalContext].ontologyProvider;
3010
+ const ontologyProvider = this.store.client[chunkSV4AIIV4_cjs.additionalContext].ontologyProvider;
3002
3011
  if (this.#sourceTypeKind === "interface") {
3003
3012
  const objectMetadata = await ontologyProvider.getObjectDefinition(objectType);
3004
3013
  if (this.#sourceApiName in objectMetadata.interfaceMap) {
@@ -3160,7 +3169,6 @@ function objectSortaMatchesWhereClause(o, whereClause, strict) {
3160
3169
  var ListQuery = class extends BaseListQuery {
3161
3170
  // pageSize?: number; // this is the internal page size. we need to track this properly
3162
3171
  #whereClause;
3163
- // Using base class minResultsToLoad instead of a private property
3164
3172
  #orderBy;
3165
3173
  #select;
3166
3174
  #intersectWith;
@@ -3174,7 +3182,7 @@ var ListQuery = class extends BaseListQuery {
3174
3182
  batch.changes.registerList(this.cacheKey);
3175
3183
  }
3176
3184
  constructor(store, subject, apiName, cacheKey, opts) {
3177
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkBWOPPEUP_cjs.additionalContext].logger?.child({}, {
3185
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
3178
3186
  msgPrefix: `ListQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
3179
3187
  }) : void 0);
3180
3188
  this.apiName = apiName;
@@ -3187,13 +3195,6 @@ var ListQuery = class extends BaseListQuery {
3187
3195
  if (!this.#pivotInfo) {
3188
3196
  this.sortingStrategy = new OrderBySortingStrategy(this.apiName, this.#orderBy);
3189
3197
  }
3190
- if (opts.autoFetchMore === true) {
3191
- this.minResultsToLoad = Number.MAX_SAFE_INTEGER;
3192
- } else if (typeof opts.autoFetchMore === "number") {
3193
- this.minResultsToLoad = Math.max(0, opts.autoFetchMore);
3194
- } else {
3195
- this.minResultsToLoad = 0;
3196
- }
3197
3198
  }
3198
3199
  get canonicalWhere() {
3199
3200
  return this.#whereClause;
@@ -3217,10 +3218,10 @@ var ListQuery = class extends BaseListQuery {
3217
3218
  async fetchPageData(signal) {
3218
3219
  const needsResultType = Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy) || this.#pivotInfo != null && this.#intersectWith != null && this.#intersectWith.length > 0 && !this.#pivotIntersectApplied;
3219
3220
  if (needsResultType) {
3220
- const wireObjectSet = chunkBWOPPEUP_cjs.getWireObjectSet(this.#objectSet);
3221
+ const wireObjectSet = chunkSV4AIIV4_cjs.getWireObjectSet(this.#objectSet);
3221
3222
  const {
3222
3223
  resultType
3223
- } = await getObjectTypesThatInvalidate(this.store.client[chunkBWOPPEUP_cjs.additionalContext], wireObjectSet);
3224
+ } = await getObjectTypesThatInvalidate(this.store.client[chunkSV4AIIV4_cjs.additionalContext], wireObjectSet);
3224
3225
  if (Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
3225
3226
  this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#orderBy);
3226
3227
  }
@@ -3495,7 +3496,7 @@ var InterfaceListQuery = class extends ListQuery {
3495
3496
  type,
3496
3497
  apiName: this.apiName
3497
3498
  };
3498
- const clientCtx = store.client[chunkBWOPPEUP_cjs.additionalContext];
3499
+ const clientCtx = store.client[chunkSV4AIIV4_cjs.additionalContext];
3499
3500
  let objectSet;
3500
3501
  if (rids != null) {
3501
3502
  objectSet = clientCtx.objectSetFactory(objectTypeDef, clientCtx, {
@@ -3538,7 +3539,7 @@ var InterfaceListQuery = class extends ListQuery {
3538
3539
  }
3539
3540
  extractRelevantObjects(changes) {
3540
3541
  const matchesApiName = ([, object]) => {
3541
- return this.apiName in object[chunkZPGIIKEZ_cjs.ObjectDefRef].interfaceMap;
3542
+ return this.apiName in object[chunk66XI45ES_cjs.ObjectDefRef].interfaceMap;
3542
3543
  };
3543
3544
  const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
3544
3545
  const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
@@ -3557,7 +3558,7 @@ var InterfaceListQuery = class extends ListQuery {
3557
3558
  }
3558
3559
  };
3559
3560
  function createSourceSetForPivot(store, pivotInfo, rids) {
3560
- const clientCtx = store.client[chunkBWOPPEUP_cjs.additionalContext];
3561
+ const clientCtx = store.client[chunkSV4AIIV4_cjs.additionalContext];
3561
3562
  if (rids != null) {
3562
3563
  return clientCtx.objectSetFactory({
3563
3564
  type: "object",
@@ -3612,7 +3613,7 @@ var ObjectListQuery = class extends ListQuery {
3612
3613
  const intersectWith = this.cacheKey.otherKeys[INTERSECT_IDX2];
3613
3614
  const pivotInfo = this.cacheKey.otherKeys[PIVOT_IDX];
3614
3615
  const rids = this.cacheKey.otherKeys[RIDS_IDX];
3615
- const clientCtx = store.client[chunkBWOPPEUP_cjs.additionalContext];
3616
+ const clientCtx = store.client[chunkSV4AIIV4_cjs.additionalContext];
3616
3617
  const typeDefinition = {
3617
3618
  type: "object",
3618
3619
  apiName: this.apiName
@@ -3758,8 +3759,8 @@ function stripRdpFields(value, rdpFields) {
3758
3759
  if (rdpFields.size === 0) {
3759
3760
  return value;
3760
3761
  }
3761
- const underlying = value[chunkZPGIIKEZ_cjs.UnderlyingOsdkObject];
3762
- const objectDef = value[chunkZPGIIKEZ_cjs.ObjectDefRef];
3762
+ const underlying = value[chunk66XI45ES_cjs.UnderlyingOsdkObject];
3763
+ const objectDef = value[chunk66XI45ES_cjs.ObjectDefRef];
3763
3764
  const newProps = {
3764
3765
  $apiName: underlying.$apiName,
3765
3766
  $objectType: underlying.$objectType,
@@ -3772,7 +3773,7 @@ function stripRdpFields(value, rdpFields) {
3772
3773
  newProps[key] = underlying[key];
3773
3774
  }
3774
3775
  }
3775
- return chunkZPGIIKEZ_cjs.createOsdkObject(value[chunkZPGIIKEZ_cjs.ClientRef], objectDef, newProps);
3776
+ return chunk66XI45ES_cjs.createOsdkObject(value[chunk66XI45ES_cjs.ClientRef], objectDef, newProps);
3776
3777
  }
3777
3778
  function isSuperset(superset, subset) {
3778
3779
  for (const field of subset) {
@@ -3783,8 +3784,8 @@ function isSuperset(superset, subset) {
3783
3784
  return true;
3784
3785
  }
3785
3786
  function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
3786
- const underlying = value[chunkZPGIIKEZ_cjs.UnderlyingOsdkObject];
3787
- const objectDef = value[chunkZPGIIKEZ_cjs.ObjectDefRef];
3787
+ const underlying = value[chunk66XI45ES_cjs.UnderlyingOsdkObject];
3788
+ const objectDef = value[chunk66XI45ES_cjs.ObjectDefRef];
3788
3789
  const newProps = {
3789
3790
  $apiName: underlying.$apiName,
3790
3791
  $objectType: underlying.$objectType,
@@ -3800,12 +3801,12 @@ function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
3800
3801
  }
3801
3802
  }
3802
3803
  }
3803
- return chunkZPGIIKEZ_cjs.createOsdkObject(value[chunkZPGIIKEZ_cjs.ClientRef], objectDef, newProps);
3804
+ return chunk66XI45ES_cjs.createOsdkObject(value[chunk66XI45ES_cjs.ClientRef], objectDef, newProps);
3804
3805
  }
3805
3806
  function mergeSelectFields(sourceValue, selectFields, existingValue) {
3806
- const sourceUnderlying = sourceValue[chunkZPGIIKEZ_cjs.UnderlyingOsdkObject];
3807
- const existingUnderlying = existingValue[chunkZPGIIKEZ_cjs.UnderlyingOsdkObject];
3808
- const objectDef = sourceValue[chunkZPGIIKEZ_cjs.ObjectDefRef];
3807
+ const sourceUnderlying = sourceValue[chunk66XI45ES_cjs.UnderlyingOsdkObject];
3808
+ const existingUnderlying = existingValue[chunk66XI45ES_cjs.UnderlyingOsdkObject];
3809
+ const objectDef = sourceValue[chunk66XI45ES_cjs.ObjectDefRef];
3809
3810
  const newProps = {
3810
3811
  $apiName: sourceUnderlying.$apiName,
3811
3812
  $objectType: sourceUnderlying.$objectType,
@@ -3823,7 +3824,7 @@ function mergeSelectFields(sourceValue, selectFields, existingValue) {
3823
3824
  newProps[key] = sourceUnderlying[key];
3824
3825
  }
3825
3826
  }
3826
- return chunkZPGIIKEZ_cjs.createOsdkObject(sourceValue[chunkZPGIIKEZ_cjs.ClientRef], objectDef, newProps);
3827
+ return chunk66XI45ES_cjs.createOsdkObject(sourceValue[chunk66XI45ES_cjs.ClientRef], objectDef, newProps);
3827
3828
  }
3828
3829
  function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, targetCurrentValue) {
3829
3830
  if (targetRdpFields.size === 0) {
@@ -3835,8 +3836,8 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
3835
3836
  }
3836
3837
  return filterToRdpFields(sourceValue, targetRdpFields, sourceRdpFields);
3837
3838
  }
3838
- const sourceUnderlying = sourceValue[chunkZPGIIKEZ_cjs.UnderlyingOsdkObject];
3839
- const objectDef = sourceValue[chunkZPGIIKEZ_cjs.ObjectDefRef];
3839
+ const sourceUnderlying = sourceValue[chunk66XI45ES_cjs.UnderlyingOsdkObject];
3840
+ const objectDef = sourceValue[chunk66XI45ES_cjs.ObjectDefRef];
3840
3841
  const newProps = {
3841
3842
  $apiName: sourceUnderlying.$apiName,
3842
3843
  $objectType: sourceUnderlying.$objectType,
@@ -3850,7 +3851,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
3850
3851
  }
3851
3852
  }
3852
3853
  if (targetCurrentValue) {
3853
- const targetUnderlying = targetCurrentValue[chunkZPGIIKEZ_cjs.UnderlyingOsdkObject];
3854
+ const targetUnderlying = targetCurrentValue[chunk66XI45ES_cjs.UnderlyingOsdkObject];
3854
3855
  for (const field of targetRdpFields) {
3855
3856
  if (field in targetUnderlying) {
3856
3857
  if (!sourceRdpFields.has(field) || newProps[field] === void 0) {
@@ -3859,7 +3860,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
3859
3860
  }
3860
3861
  }
3861
3862
  }
3862
- return chunkZPGIIKEZ_cjs.createOsdkObject(sourceValue[chunkZPGIIKEZ_cjs.ClientRef], objectDef, newProps);
3863
+ return chunk66XI45ES_cjs.createOsdkObject(sourceValue[chunk66XI45ES_cjs.ClientRef], objectDef, newProps);
3863
3864
  }
3864
3865
 
3865
3866
  // src/observable/internal/object/ObjectCacheKeyRegistry.ts
@@ -4014,7 +4015,7 @@ var BulkObjectLoader = class {
4014
4015
  #maxEntries;
4015
4016
  constructor(client, maxWait = 25, maxEntries = 100) {
4016
4017
  this.#client = client;
4017
- this.#logger = client[chunkBWOPPEUP_cjs.additionalContext].logger;
4018
+ this.#logger = client[chunkSV4AIIV4_cjs.additionalContext].logger;
4018
4019
  this.#maxWait = maxWait;
4019
4020
  this.#maxEntries = maxEntries;
4020
4021
  }
@@ -4164,7 +4165,7 @@ var ObjectQuery = class extends Query {
4164
4165
  #loadPropertySecurityMetadata;
4165
4166
  #implementingTypes;
4166
4167
  constructor(store, subject, type, pk, cacheKey, opts, defType = "object", select, loadPropertySecurityMetadata) {
4167
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkBWOPPEUP_cjs.additionalContext].logger?.child({}, {
4168
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
4168
4169
  msgPrefix: `ObjectQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
4169
4170
  }) : void 0);
4170
4171
  this.#apiName = type;
@@ -4266,7 +4267,7 @@ var ObjectsHelper = class extends AbstractHelper {
4266
4267
  select,
4267
4268
  $loadPropertySecurityMetadata
4268
4269
  } = options;
4269
- const defType = chunkZPGIIKEZ_cjs.getDefType(options.apiName);
4270
+ const defType = chunk66XI45ES_cjs.getDefType(options.apiName);
4270
4271
  const objectCacheKey = this.cacheKeys.get("object", apiName, pk, rdpConfig ?? void 0);
4271
4272
  return this.store.queries.get(objectCacheKey, () => new ObjectQuery(this.store, this.store.subjects.get(objectCacheKey), apiName, pk, objectCacheKey, {
4272
4273
  dedupeInterval: 0
@@ -4304,7 +4305,7 @@ var ObjectsHelper = class extends AbstractHelper {
4304
4305
  if (valueToWrite !== tombstone && existing?.value && this.isObjectHolder(existing.value)) {
4305
4306
  const expectedRdpFields = this.store.objectCacheKeyRegistry.getRdpFieldSet(sourceCacheKey);
4306
4307
  if (expectedRdpFields.size > 0) {
4307
- const underlying = valueToWrite[chunkZPGIIKEZ_cjs.UnderlyingOsdkObject];
4308
+ const underlying = valueToWrite[chunk66XI45ES_cjs.UnderlyingOsdkObject];
4308
4309
  const actualRdpFields = /* @__PURE__ */ new Set();
4309
4310
  for (const field of expectedRdpFields) {
4310
4311
  if (underlying && field in underlying) {
@@ -4374,7 +4375,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
4374
4375
  #requiresServerEvaluation;
4375
4376
  #resultTypeApiName;
4376
4377
  constructor(store, subject, baseObjectSetWire, operations, cacheKey, opts) {
4377
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkBWOPPEUP_cjs.additionalContext].logger?.child({}, {
4378
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
4378
4379
  msgPrefix: `ObjectSetQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
4379
4380
  }) : void 0);
4380
4381
  this.#baseObjectSetWire = baseObjectSetWire;
@@ -4442,7 +4443,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
4442
4443
  return;
4443
4444
  }
4444
4445
  for (const os of sets) {
4445
- const typeName = _ObjectSetQuery.#extractTypeFromWireObjectSet(chunkBWOPPEUP_cjs.getWireObjectSet(os));
4446
+ const typeName = _ObjectSetQuery.#extractTypeFromWireObjectSet(chunkSV4AIIV4_cjs.getWireObjectSet(os));
4446
4447
  if (typeName) {
4447
4448
  types.add(typeName);
4448
4449
  }
@@ -4469,10 +4470,10 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
4469
4470
  */
4470
4471
  async fetchPageData(signal) {
4471
4472
  if (this.#operations.orderBy && Object.keys(this.#operations.orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
4472
- const wireObjectSet = chunkBWOPPEUP_cjs.getWireObjectSet(this.#composedObjectSet);
4473
+ const wireObjectSet = chunkSV4AIIV4_cjs.getWireObjectSet(this.#composedObjectSet);
4473
4474
  const {
4474
4475
  resultType
4475
- } = await getObjectTypesThatInvalidate(this.store.client[chunkBWOPPEUP_cjs.additionalContext], wireObjectSet);
4476
+ } = await getObjectTypesThatInvalidate(this.store.client[chunkSV4AIIV4_cjs.additionalContext], wireObjectSet);
4476
4477
  this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#operations.orderBy);
4477
4478
  }
4478
4479
  const resp = await this.#composedObjectSet.fetchPage({
@@ -4693,7 +4694,7 @@ var ObjectSetHelper = class extends AbstractHelper {
4693
4694
  const {
4694
4695
  baseObjectSet
4695
4696
  } = options;
4696
- const baseObjectSetWire = JSON.stringify(chunkBWOPPEUP_cjs.getWireObjectSet(baseObjectSet));
4697
+ const baseObjectSetWire = JSON.stringify(chunkSV4AIIV4_cjs.getWireObjectSet(baseObjectSet));
4697
4698
  const operations = this.buildCanonicalizedOperations(options);
4698
4699
  const objectSetCacheKey = this.cacheKeys.get("objectSet", baseObjectSetWire, operations);
4699
4700
  return this.store.queries.get(objectSetCacheKey, () => {
@@ -4709,13 +4710,13 @@ var ObjectSetHelper = class extends AbstractHelper {
4709
4710
  operations.withProperties = this.rdpCanonicalizer.canonicalize(options.withProperties);
4710
4711
  }
4711
4712
  if (options.union && options.union.length > 0) {
4712
- operations.union = this.objectSetArrayCanonicalizer.canonicalizeUnion(options.union.map((os) => JSON.stringify(chunkBWOPPEUP_cjs.getWireObjectSet(os))));
4713
+ operations.union = this.objectSetArrayCanonicalizer.canonicalizeUnion(options.union.map((os) => JSON.stringify(chunkSV4AIIV4_cjs.getWireObjectSet(os))));
4713
4714
  }
4714
4715
  if (options.intersect && options.intersect.length > 0) {
4715
- operations.intersect = this.objectSetArrayCanonicalizer.canonicalizeIntersect(options.intersect.map((os) => JSON.stringify(chunkBWOPPEUP_cjs.getWireObjectSet(os))));
4716
+ operations.intersect = this.objectSetArrayCanonicalizer.canonicalizeIntersect(options.intersect.map((os) => JSON.stringify(chunkSV4AIIV4_cjs.getWireObjectSet(os))));
4716
4717
  }
4717
4718
  if (options.subtract && options.subtract.length > 0) {
4718
- operations.subtract = this.objectSetArrayCanonicalizer.canonicalizeSubtract(options.subtract.map((os) => JSON.stringify(chunkBWOPPEUP_cjs.getWireObjectSet(os))));
4719
+ operations.subtract = this.objectSetArrayCanonicalizer.canonicalizeSubtract(options.subtract.map((os) => JSON.stringify(chunkSV4AIIV4_cjs.getWireObjectSet(os))));
4719
4720
  }
4720
4721
  if (options.pivotTo) {
4721
4722
  operations.pivotTo = options.pivotTo;
@@ -4808,7 +4809,7 @@ var RdpCanonicalizer = class extends CachingCanonicalizer {
4808
4809
  apiName: "__rdp_canonicalizer_holder__"
4809
4810
  };
4810
4811
  for (const [key, rdpFunction] of Object.entries(rdp)) {
4811
- const builder = chunkBWOPPEUP_cjs.createWithPropertiesObjectSet(
4812
+ const builder = chunkSV4AIIV4_cjs.createWithPropertiesObjectSet(
4812
4813
  objectTypeHolder,
4813
4814
  {
4814
4815
  type: "methodInput"
@@ -4904,7 +4905,7 @@ var Store = class {
4904
4905
  subjects = this.layers.subjects;
4905
4906
  // these are hopefully temporary
4906
4907
  constructor(client) {
4907
- this.logger = client[chunkBWOPPEUP_cjs.additionalContext].logger?.child({}, {
4908
+ this.logger = client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
4908
4909
  msgPrefix: "Store"
4909
4910
  });
4910
4911
  this.client = client;
@@ -5094,6 +5095,8 @@ var Store = class {
5094
5095
  if (query) {
5095
5096
  return query.rdpConfig;
5096
5097
  }
5098
+ } else if (cacheKey.type === "mediaMetadata") {
5099
+ return void 0;
5097
5100
  }
5098
5101
  }
5099
5102
  return void 0;
@@ -5112,6 +5115,8 @@ var Store = class {
5112
5115
  return cacheKey.otherKeys[API_NAME_IDX2];
5113
5116
  } else if (cacheKey.type === "aggregation") {
5114
5117
  return cacheKey.otherKeys[API_NAME_IDX];
5118
+ } else if (cacheKey.type === "mediaMetadata") {
5119
+ return cacheKey.otherKeys[0];
5115
5120
  }
5116
5121
  }
5117
5122
  return void 0;
@@ -5161,7 +5166,7 @@ var Store = class {
5161
5166
  }
5162
5167
  const promises = [];
5163
5168
  for (const cacheKey of this.layers.truth.keys()) {
5164
- if (changes && changes.modified.has(cacheKey)) {
5169
+ if (cacheKey.type !== "mediaMetadata" && changes && changes.modified.has(cacheKey)) {
5165
5170
  continue;
5166
5171
  }
5167
5172
  const query = this.queries.peek(cacheKey);
@@ -5198,10 +5203,10 @@ var Store = class {
5198
5203
 
5199
5204
  // src/observable/ObservableClient.ts
5200
5205
  function createObservableClient(client) {
5201
- const tweakedClient = chunkZPGIIKEZ_cjs.createClientFromContext({
5202
- ...client[chunkBWOPPEUP_cjs.additionalContext],
5203
- fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkBWOPPEUP_cjs.additionalContext].fetch, (headers) => {
5204
- headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkZPGIIKEZ_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
5206
+ const tweakedClient = chunk66XI45ES_cjs.createClientFromContext({
5207
+ ...client[chunkSV4AIIV4_cjs.additionalContext],
5208
+ fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkSV4AIIV4_cjs.additionalContext].fetch, (headers) => {
5209
+ headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunk66XI45ES_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
5205
5210
  return headers;
5206
5211
  })
5207
5212
  });
@@ -5244,19 +5249,19 @@ function getOsdkConfig(ontologyRid) {
5244
5249
 
5245
5250
  Object.defineProperty(exports, "createClientWithTransaction", {
5246
5251
  enumerable: true,
5247
- get: function () { return chunkZPGIIKEZ_cjs.createClientWithTransaction; }
5252
+ get: function () { return chunk66XI45ES_cjs.createClientWithTransaction; }
5248
5253
  });
5249
5254
  Object.defineProperty(exports, "augment", {
5250
5255
  enumerable: true,
5251
- get: function () { return chunkBWOPPEUP_cjs.augment; }
5256
+ get: function () { return chunkSV4AIIV4_cjs.augment; }
5252
5257
  });
5253
5258
  Object.defineProperty(exports, "getWireObjectSet", {
5254
5259
  enumerable: true,
5255
- get: function () { return chunkBWOPPEUP_cjs.getWireObjectSet; }
5260
+ get: function () { return chunkSV4AIIV4_cjs.getWireObjectSet; }
5256
5261
  });
5257
5262
  Object.defineProperty(exports, "isObjectSet", {
5258
5263
  enumerable: true,
5259
- get: function () { return chunkBWOPPEUP_cjs.isObjectSet; }
5264
+ get: function () { return chunkSV4AIIV4_cjs.isObjectSet; }
5260
5265
  });
5261
5266
  exports.computeObjectSetCacheKey = computeObjectSetCacheKey;
5262
5267
  exports.createObservableClient = createObservableClient;