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

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 (64) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js +3 -3
  3. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  4. package/build/browser/observable/ObservableClient.js.map +1 -1
  5. package/build/browser/observable/internal/ObservableClientImpl.js +32 -0
  6. package/build/browser/observable/internal/ObservableClientImpl.js.map +1 -1
  7. package/build/browser/observable/internal/OrderByCanonicalizer.js +5 -2
  8. package/build/browser/observable/internal/OrderByCanonicalizer.js.map +1 -1
  9. package/build/browser/observable/internal/SelectCanonicalizer.js +3 -0
  10. package/build/browser/observable/internal/SelectCanonicalizer.js.map +1 -1
  11. package/build/browser/observable/internal/WhereClauseCanonicalizer.js +3 -0
  12. package/build/browser/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
  13. package/build/browser/observable/internal/list/InterfaceListQuery.js +2 -6
  14. package/build/browser/observable/internal/list/InterfaceListQuery.js.map +1 -1
  15. package/build/browser/observable/internal/list/ListQuery.js +6 -0
  16. package/build/browser/observable/internal/list/ListQuery.js.map +1 -1
  17. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  18. package/build/browser/queries/applyQuery.js +1 -1
  19. package/build/browser/queries/applyQuery.js.map +1 -1
  20. package/build/browser/util/UserAgent.js +2 -2
  21. package/build/cjs/{chunk-SV4AIIV4.cjs → chunk-KGWUPXAM.cjs} +2 -2
  22. package/build/cjs/{chunk-SV4AIIV4.cjs.map → chunk-KGWUPXAM.cjs.map} +1 -1
  23. package/build/cjs/{chunk-66XI45ES.cjs → chunk-XYZOCIVH.cjs} +40 -40
  24. package/build/cjs/chunk-XYZOCIVH.cjs.map +1 -0
  25. package/build/cjs/index.cjs +10 -10
  26. package/build/cjs/public/internal.cjs +8 -8
  27. package/build/cjs/public/unstable-do-not-use.cjs +117 -74
  28. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  29. package/build/cjs/public/unstable-do-not-use.d.cts +19 -1
  30. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js +3 -3
  31. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  32. package/build/esm/observable/ObservableClient.js.map +1 -1
  33. package/build/esm/observable/internal/ObservableClientImpl.js +32 -0
  34. package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -1
  35. package/build/esm/observable/internal/OrderByCanonicalizer.js +5 -2
  36. package/build/esm/observable/internal/OrderByCanonicalizer.js.map +1 -1
  37. package/build/esm/observable/internal/SelectCanonicalizer.js +3 -0
  38. package/build/esm/observable/internal/SelectCanonicalizer.js.map +1 -1
  39. package/build/esm/observable/internal/WhereClauseCanonicalizer.js +3 -0
  40. package/build/esm/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
  41. package/build/esm/observable/internal/list/InterfaceListQuery.js +2 -6
  42. package/build/esm/observable/internal/list/InterfaceListQuery.js.map +1 -1
  43. package/build/esm/observable/internal/list/ListQuery.js +6 -0
  44. package/build/esm/observable/internal/list/ListQuery.js.map +1 -1
  45. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  46. package/build/esm/queries/applyQuery.js +1 -1
  47. package/build/esm/queries/applyQuery.js.map +1 -1
  48. package/build/esm/util/UserAgent.js +2 -2
  49. package/build/types/observable/ObservableClient.d.ts +19 -0
  50. package/build/types/observable/ObservableClient.d.ts.map +1 -1
  51. package/build/types/observable/internal/OrderByCanonicalizer.d.ts +2 -1
  52. package/build/types/observable/internal/OrderByCanonicalizer.d.ts.map +1 -1
  53. package/build/types/observable/internal/SelectCanonicalizer.d.ts +2 -0
  54. package/build/types/observable/internal/SelectCanonicalizer.d.ts.map +1 -1
  55. package/build/types/observable/internal/WhereClauseCanonicalizer.d.ts +1 -0
  56. package/build/types/observable/internal/WhereClauseCanonicalizer.d.ts.map +1 -1
  57. package/build/types/observable/internal/list/InterfaceListQuery.d.ts.map +1 -1
  58. package/build/types/observable/internal/list/ListQuery.d.ts +2 -0
  59. package/build/types/observable/internal/list/ListQuery.d.ts.map +1 -1
  60. package/build/types/public/unstable-do-not-use.d.ts +1 -1
  61. package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
  62. package/build/types/queries/applyQuery.d.ts.map +1 -1
  63. package/package.json +7 -7
  64. package/build/cjs/chunk-66XI45ES.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk66XI45ES_cjs = require('../chunk-66XI45ES.cjs');
4
- var chunkSV4AIIV4_cjs = require('../chunk-SV4AIIV4.cjs');
3
+ var chunkXYZOCIVH_cjs = require('../chunk-XYZOCIVH.cjs');
4
+ var chunkKGWUPXAM_cjs = require('../chunk-KGWUPXAM.cjs');
5
5
  require('../chunk-GSVXEVM4.cjs');
6
6
  require('../chunk-D26YLHTV.cjs');
7
7
  require('../chunk-YJG67XL4.cjs');
@@ -65,10 +65,13 @@ var OrderByCanonicalizer = class {
65
65
  const data = Object.fromEntries(pairs);
66
66
  return data;
67
67
  });
68
- canonicalize = (orderBy) => {
68
+ canonicalize(orderBy) {
69
+ if (orderBy == null) {
70
+ return void 0;
71
+ }
69
72
  const strings = Object.entries(orderBy).flat();
70
73
  return this.#trie.lookupArray(strings);
71
- };
74
+ }
72
75
  };
73
76
  var WhereClauseCanonicalizer = class {
74
77
  /**
@@ -92,6 +95,9 @@ var WhereClauseCanonicalizer = class {
92
95
  */
93
96
  #existingOptions = /* @__PURE__ */ new Map();
94
97
  canonicalize(where) {
98
+ if (where == null) {
99
+ return void 0;
100
+ }
95
101
  if (this.#cache.has(where)) {
96
102
  return this.#cache.get(where);
97
103
  }
@@ -139,7 +145,7 @@ var WhereClauseCanonicalizer = class {
139
145
  var whereCanonicalizer = new WhereClauseCanonicalizer();
140
146
  var orderByCanonicalizer = new OrderByCanonicalizer();
141
147
  function computeObjectSetCacheKey(objectSet, options) {
142
- const keyParts = ["objectSet", chunkSV4AIIV4_cjs.getWireObjectSet(objectSet)];
148
+ const keyParts = ["objectSet", chunkKGWUPXAM_cjs.getWireObjectSet(objectSet)];
143
149
  if (!options) {
144
150
  return JSON.stringify(keyParts);
145
151
  }
@@ -151,13 +157,13 @@ function computeObjectSetCacheKey(objectSet, options) {
151
157
  keyParts.push("props", propKeys);
152
158
  }
153
159
  if (options.union && options.union.length > 0) {
154
- keyParts.push("union", options.union.map((os) => chunkSV4AIIV4_cjs.getWireObjectSet(os)));
160
+ keyParts.push("union", options.union.map((os) => chunkKGWUPXAM_cjs.getWireObjectSet(os)));
155
161
  }
156
162
  if (options.intersect && options.intersect.length > 0) {
157
- keyParts.push("intersect", options.intersect.map((os) => chunkSV4AIIV4_cjs.getWireObjectSet(os)));
163
+ keyParts.push("intersect", options.intersect.map((os) => chunkKGWUPXAM_cjs.getWireObjectSet(os)));
158
164
  }
159
165
  if (options.subtract && options.subtract.length > 0) {
160
- keyParts.push("subtract", options.subtract.map((os) => chunkSV4AIIV4_cjs.getWireObjectSet(os)));
166
+ keyParts.push("subtract", options.subtract.map((os) => chunkKGWUPXAM_cjs.getWireObjectSet(os)));
161
167
  }
162
168
  if (options.pivotTo) {
163
169
  keyParts.push("pivotTo", options.pivotTo);
@@ -187,6 +193,9 @@ var UnsubscribableWrapper = class {
187
193
 
188
194
  // src/observable/internal/ObservableClientImpl.ts
189
195
  var ObservableClientImpl = class {
196
+ #unionCache = /* @__PURE__ */ new WeakMap();
197
+ #intersectCache = /* @__PURE__ */ new WeakMap();
198
+ #subtractCache = /* @__PURE__ */ new WeakMap();
190
199
  constructor(store) {
191
200
  this.__experimentalStore = store;
192
201
  this.applyAction = store.applyAction.bind(store);
@@ -221,8 +230,8 @@ var ObservableClientImpl = class {
221
230
  const instances = [];
222
231
  const objectSetWires = [];
223
232
  for (const item of options.dependsOnObjects ?? []) {
224
- if (chunkSV4AIIV4_cjs.isObjectSet(item)) {
225
- objectSetWires.push(chunkSV4AIIV4_cjs.getWireObjectSet(item));
233
+ if (chunkKGWUPXAM_cjs.isObjectSet(item)) {
234
+ objectSetWires.push(chunkKGWUPXAM_cjs.getWireObjectSet(item));
226
235
  } else {
227
236
  instances.push({
228
237
  $apiName: item.$objectType ?? item.$apiName,
@@ -230,7 +239,7 @@ var ObservableClientImpl = class {
230
239
  });
231
240
  }
232
241
  }
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;
242
+ const objectSetTypesPromise = objectSetWires.length > 0 ? Promise.all(objectSetWires.map((wire) => chunkKGWUPXAM_cjs.extractObjectOrInterfaceType(this.__experimentalStore.client[chunkKGWUPXAM_cjs.additionalContext], wire))).then((types) => types.filter((t) => t != null).map((t) => t.apiName)) : void 0;
234
243
  return this.__experimentalStore.functions.observe({
235
244
  ...options,
236
245
  queryDef,
@@ -273,6 +282,35 @@ var ObservableClientImpl = class {
273
282
  canonicalizeWhereClause(where) {
274
283
  return this.__experimentalStore.whereCanonicalizer.canonicalize(where);
275
284
  }
285
+ canonicalizeOptions(options) {
286
+ const store = this.__experimentalStore;
287
+ const result = {
288
+ ...options
289
+ };
290
+ result.where = store.whereCanonicalizer.canonicalize(result.where);
291
+ result.withProperties = store.genericCanonicalizer.canonicalize(result.withProperties);
292
+ result.orderBy = store.orderByCanonicalizer.canonicalize(result.orderBy);
293
+ result.aggregate = store.genericCanonicalizer.canonicalize(result.aggregate);
294
+ result.intersectWith = store.genericCanonicalizer.canonicalize(result.intersectWith);
295
+ result.$select = store.selectCanonicalizer.canonicalize(result.$select);
296
+ result.union = this.#canonObjectSetArray(result.union, store.objectSetArrayCanonicalizer.canonicalizeUnion.bind(store.objectSetArrayCanonicalizer), this.#unionCache);
297
+ result.intersect = this.#canonObjectSetArray(result.intersect, store.objectSetArrayCanonicalizer.canonicalizeIntersect.bind(store.objectSetArrayCanonicalizer), this.#intersectCache);
298
+ result.subtract = this.#canonObjectSetArray(result.subtract, store.objectSetArrayCanonicalizer.canonicalizeSubtract.bind(store.objectSetArrayCanonicalizer), this.#subtractCache);
299
+ return result;
300
+ }
301
+ #canonObjectSetArray(arr, canonicalize, cache) {
302
+ if (!arr || arr.length === 0) {
303
+ return arr;
304
+ }
305
+ const wireStrings = arr.map((os) => JSON.stringify(chunkKGWUPXAM_cjs.getWireObjectSet(os)));
306
+ const canonKey = canonicalize(wireStrings);
307
+ let cached = cache.get(canonKey);
308
+ if (!cached) {
309
+ cached = arr;
310
+ cache.set(canonKey, cached);
311
+ }
312
+ return cached;
313
+ }
276
314
  };
277
315
  function observeSingleLink(store, objectsArray, linkName, options, observer) {
278
316
  if (objectsArray.length === 0) {
@@ -459,7 +497,7 @@ var OptimisticJob = class {
459
497
  return this;
460
498
  },
461
499
  createObject(type, pk, properties) {
462
- const create = store.client[chunkSV4AIIV4_cjs.additionalContext].objectFactory2(store.client[chunkSV4AIIV4_cjs.additionalContext], [{
500
+ const create = store.client[chunkKGWUPXAM_cjs.additionalContext].objectFactory2(store.client[chunkKGWUPXAM_cjs.additionalContext], [{
463
501
  $primaryKey: pk,
464
502
  $apiName: type.apiName,
465
503
  $objectType: type.apiName,
@@ -926,7 +964,7 @@ var Query = class {
926
964
  this.store = store;
927
965
  this.cacheKeys = store.cacheKeys;
928
966
  this.#subject = observable;
929
- this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkSV4AIIV4_cjs.additionalContext].logger : store.client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
967
+ this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkKGWUPXAM_cjs.additionalContext].logger : store.client[chunkKGWUPXAM_cjs.additionalContext].logger?.child({}, {
930
968
  msgPrefix: process.env.NODE_ENV !== "production" ? `Query<${cacheKey.type}, ${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>` : "Query"
931
969
  }));
932
970
  }
@@ -1088,7 +1126,7 @@ var AggregationQuery = class extends Query {
1088
1126
  #invalidationTypes;
1089
1127
  #invalidationTypesPromise;
1090
1128
  constructor(store, subject, cacheKey, opts) {
1091
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
1129
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkKGWUPXAM_cjs.additionalContext].logger?.child({}, {
1092
1130
  msgPrefix: `AggregationQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
1093
1131
  }) : void 0);
1094
1132
  this.apiName = cacheKey.otherKeys[API_NAME_IDX];
@@ -1106,7 +1144,7 @@ var AggregationQuery = class extends Query {
1106
1144
  try {
1107
1145
  const {
1108
1146
  invalidationSet
1109
- } = await getObjectTypesThatInvalidate(this.store.client[chunkSV4AIIV4_cjs.additionalContext], wireObjectSet);
1147
+ } = await getObjectTypesThatInvalidate(this.store.client[chunkKGWUPXAM_cjs.additionalContext], wireObjectSet);
1110
1148
  return /* @__PURE__ */ new Set([this.apiName, ...invalidationSet]);
1111
1149
  } catch (error) {
1112
1150
  this.store.logger?.error("Failed to compute invalidation types for aggregation, falling back to base type only", error);
@@ -1177,7 +1215,7 @@ var ObjectAggregationQuery = class extends AggregationQuery {
1177
1215
  };
1178
1216
  let objectSet;
1179
1217
  if (this.parsedWireObjectSet) {
1180
- objectSet = chunkSV4AIIV4_cjs.createObjectSet(objectTypeDef, this.store.client[chunkSV4AIIV4_cjs.additionalContext], this.parsedWireObjectSet);
1218
+ objectSet = chunkKGWUPXAM_cjs.createObjectSet(objectTypeDef, this.store.client[chunkKGWUPXAM_cjs.additionalContext], this.parsedWireObjectSet);
1181
1219
  } else {
1182
1220
  objectSet = this.store.client(objectTypeDef);
1183
1221
  }
@@ -1219,7 +1257,7 @@ var AggregationsHelper = class extends AbstractHelper {
1219
1257
  return this.getOrCreateQuery(options, void 0);
1220
1258
  }
1221
1259
  getQueryWithObjectSet(options) {
1222
- const serializedObjectSet = JSON.stringify(chunkSV4AIIV4_cjs.getWireObjectSet(options.objectSet));
1260
+ const serializedObjectSet = JSON.stringify(chunkKGWUPXAM_cjs.getWireObjectSet(options.objectSet));
1223
1261
  return this.getOrCreateQuery(options, serializedObjectSet);
1224
1262
  }
1225
1263
  getOrCreateQuery(options, serializedObjectSet) {
@@ -1542,7 +1580,7 @@ var FunctionParamsCanonicalizer = class {
1542
1580
  path.push("$:map_end");
1543
1581
  return arr;
1544
1582
  }
1545
- if (chunk66XI45ES_cjs.isObjectSpecifiersObject(value)) {
1583
+ if (chunkXYZOCIVH_cjs.isObjectSpecifiersObject(value)) {
1546
1584
  const objectType = value.$objectType ?? value.$apiName;
1547
1585
  path.push("$:osdk", objectType, value.$primaryKey);
1548
1586
  return {
@@ -1550,8 +1588,8 @@ var FunctionParamsCanonicalizer = class {
1550
1588
  $primaryKey: value.$primaryKey
1551
1589
  };
1552
1590
  }
1553
- if (chunkSV4AIIV4_cjs.isObjectSet(value)) {
1554
- const wire = chunkSV4AIIV4_cjs.getWireObjectSet(value);
1591
+ if (chunkKGWUPXAM_cjs.isObjectSet(value)) {
1592
+ const wire = chunkKGWUPXAM_cjs.getWireObjectSet(value);
1555
1593
  path.push("$:objectset", wire);
1556
1594
  return wire;
1557
1595
  }
@@ -1611,7 +1649,7 @@ var FunctionQuery = class extends Query {
1611
1649
  #dependsOnObjects;
1612
1650
  #queryDef;
1613
1651
  constructor(store, subject, queryDef, params, cacheKey, opts, objectSetTypesPromise) {
1614
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
1652
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkKGWUPXAM_cjs.additionalContext].logger?.child({}, {
1615
1653
  msgPrefix: `FunctionQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
1616
1654
  }) : void 0);
1617
1655
  this.#apiName = queryDef.apiName;
@@ -1668,7 +1706,7 @@ var FunctionQuery = class extends Query {
1668
1706
  }).debug("calling _fetchAndStore");
1669
1707
  }
1670
1708
  try {
1671
- const result = await chunk66XI45ES_cjs.applyQuery(this.store.client[chunkSV4AIIV4_cjs.additionalContext], this.#queryDef, this.#params);
1709
+ const result = await chunkXYZOCIVH_cjs.applyQuery(this.store.client[chunkKGWUPXAM_cjs.additionalContext], this.#queryDef, this.#params);
1672
1710
  const executedAt = Date.now();
1673
1711
  this.store.batch({}, (batch) => {
1674
1712
  this.writeToStore({
@@ -2882,7 +2920,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
2882
2920
  batch.changes.modified.add(this.cacheKey);
2883
2921
  }
2884
2922
  constructor(store, subject, cacheKey, opts) {
2885
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
2923
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkKGWUPXAM_cjs.additionalContext].logger?.child({}, {
2886
2924
  msgPrefix: `SpecificLinkQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
2887
2925
  }) : void 0);
2888
2926
  [this.#sourceApiName, this.#sourceTypeKind, this.#sourceUnderlyingObjectType, this.#sourcePk, this.#linkName, this.#whereClause, this.#orderBy] = cacheKey.otherKeys;
@@ -2896,7 +2934,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
2896
2934
  */
2897
2935
  async fetchPageData(signal) {
2898
2936
  const client = this.store.client;
2899
- const ontologyProvider = client[chunkSV4AIIV4_cjs.additionalContext].ontologyProvider;
2937
+ const ontologyProvider = client[chunkKGWUPXAM_cjs.additionalContext].ontologyProvider;
2900
2938
  const isInterface = this.#sourceTypeKind === "interface";
2901
2939
  if (this.#orderBy && Object.keys(this.#orderBy).length > 0) {
2902
2940
  let targetTypeApiName;
@@ -3007,7 +3045,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
3007
3045
  }
3008
3046
  return (async () => {
3009
3047
  try {
3010
- const ontologyProvider = this.store.client[chunkSV4AIIV4_cjs.additionalContext].ontologyProvider;
3048
+ const ontologyProvider = this.store.client[chunkKGWUPXAM_cjs.additionalContext].ontologyProvider;
3011
3049
  if (this.#sourceTypeKind === "interface") {
3012
3050
  const objectMetadata = await ontologyProvider.getObjectDefinition(objectType);
3013
3051
  if (this.#sourceApiName in objectMetadata.interfaceMap) {
@@ -3182,7 +3220,7 @@ var ListQuery = class extends BaseListQuery {
3182
3220
  batch.changes.registerList(this.cacheKey);
3183
3221
  }
3184
3222
  constructor(store, subject, apiName, cacheKey, opts) {
3185
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
3223
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkKGWUPXAM_cjs.additionalContext].logger?.child({}, {
3186
3224
  msgPrefix: `ListQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
3187
3225
  }) : void 0);
3188
3226
  this.apiName = apiName;
@@ -3211,6 +3249,12 @@ var ListQuery = class extends BaseListQuery {
3211
3249
  get canonicalPivotInfo() {
3212
3250
  return this.#pivotInfo;
3213
3251
  }
3252
+ createPayload(params) {
3253
+ return {
3254
+ ...super.createPayload(params),
3255
+ objectSet: this.#objectSet
3256
+ };
3257
+ }
3214
3258
  /**
3215
3259
  * Implements fetchPageData from BaseCollectionQuery template method
3216
3260
  * Fetches a page of data
@@ -3218,10 +3262,10 @@ var ListQuery = class extends BaseListQuery {
3218
3262
  async fetchPageData(signal) {
3219
3263
  const needsResultType = Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy) || this.#pivotInfo != null && this.#intersectWith != null && this.#intersectWith.length > 0 && !this.#pivotIntersectApplied;
3220
3264
  if (needsResultType) {
3221
- const wireObjectSet = chunkSV4AIIV4_cjs.getWireObjectSet(this.#objectSet);
3265
+ const wireObjectSet = chunkKGWUPXAM_cjs.getWireObjectSet(this.#objectSet);
3222
3266
  const {
3223
3267
  resultType
3224
- } = await getObjectTypesThatInvalidate(this.store.client[chunkSV4AIIV4_cjs.additionalContext], wireObjectSet);
3268
+ } = await getObjectTypesThatInvalidate(this.store.client[chunkKGWUPXAM_cjs.additionalContext], wireObjectSet);
3225
3269
  if (Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
3226
3270
  this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#orderBy);
3227
3271
  }
@@ -3496,7 +3540,7 @@ var InterfaceListQuery = class extends ListQuery {
3496
3540
  type,
3497
3541
  apiName: this.apiName
3498
3542
  };
3499
- const clientCtx = store.client[chunkSV4AIIV4_cjs.additionalContext];
3543
+ const clientCtx = store.client[chunkKGWUPXAM_cjs.additionalContext];
3500
3544
  let objectSet;
3501
3545
  if (rids != null) {
3502
3546
  objectSet = clientCtx.objectSetFactory(objectTypeDef, clientCtx, {
@@ -3529,17 +3573,13 @@ var InterfaceListQuery = class extends ListQuery {
3529
3573
  createPayload(params) {
3530
3574
  const resolvedList = params.resolvedData?.map((obj) => obj.$as(this.apiName));
3531
3575
  return {
3532
- resolvedList,
3533
- isOptimistic: params.isOptimistic,
3534
- fetchMore: this.fetchMore,
3535
- hasMore: this.nextPageToken != null,
3536
- status: params.status,
3537
- lastUpdated: params.lastUpdated
3576
+ ...super.createPayload(params),
3577
+ resolvedList
3538
3578
  };
3539
3579
  }
3540
3580
  extractRelevantObjects(changes) {
3541
3581
  const matchesApiName = ([, object]) => {
3542
- return this.apiName in object[chunk66XI45ES_cjs.ObjectDefRef].interfaceMap;
3582
+ return this.apiName in object[chunkXYZOCIVH_cjs.ObjectDefRef].interfaceMap;
3543
3583
  };
3544
3584
  const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
3545
3585
  const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
@@ -3558,7 +3598,7 @@ var InterfaceListQuery = class extends ListQuery {
3558
3598
  }
3559
3599
  };
3560
3600
  function createSourceSetForPivot(store, pivotInfo, rids) {
3561
- const clientCtx = store.client[chunkSV4AIIV4_cjs.additionalContext];
3601
+ const clientCtx = store.client[chunkKGWUPXAM_cjs.additionalContext];
3562
3602
  if (rids != null) {
3563
3603
  return clientCtx.objectSetFactory({
3564
3604
  type: "object",
@@ -3613,7 +3653,7 @@ var ObjectListQuery = class extends ListQuery {
3613
3653
  const intersectWith = this.cacheKey.otherKeys[INTERSECT_IDX2];
3614
3654
  const pivotInfo = this.cacheKey.otherKeys[PIVOT_IDX];
3615
3655
  const rids = this.cacheKey.otherKeys[RIDS_IDX];
3616
- const clientCtx = store.client[chunkSV4AIIV4_cjs.additionalContext];
3656
+ const clientCtx = store.client[chunkKGWUPXAM_cjs.additionalContext];
3617
3657
  const typeDefinition = {
3618
3658
  type: "object",
3619
3659
  apiName: this.apiName
@@ -3759,8 +3799,8 @@ function stripRdpFields(value, rdpFields) {
3759
3799
  if (rdpFields.size === 0) {
3760
3800
  return value;
3761
3801
  }
3762
- const underlying = value[chunk66XI45ES_cjs.UnderlyingOsdkObject];
3763
- const objectDef = value[chunk66XI45ES_cjs.ObjectDefRef];
3802
+ const underlying = value[chunkXYZOCIVH_cjs.UnderlyingOsdkObject];
3803
+ const objectDef = value[chunkXYZOCIVH_cjs.ObjectDefRef];
3764
3804
  const newProps = {
3765
3805
  $apiName: underlying.$apiName,
3766
3806
  $objectType: underlying.$objectType,
@@ -3773,7 +3813,7 @@ function stripRdpFields(value, rdpFields) {
3773
3813
  newProps[key] = underlying[key];
3774
3814
  }
3775
3815
  }
3776
- return chunk66XI45ES_cjs.createOsdkObject(value[chunk66XI45ES_cjs.ClientRef], objectDef, newProps);
3816
+ return chunkXYZOCIVH_cjs.createOsdkObject(value[chunkXYZOCIVH_cjs.ClientRef], objectDef, newProps);
3777
3817
  }
3778
3818
  function isSuperset(superset, subset) {
3779
3819
  for (const field of subset) {
@@ -3784,8 +3824,8 @@ function isSuperset(superset, subset) {
3784
3824
  return true;
3785
3825
  }
3786
3826
  function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
3787
- const underlying = value[chunk66XI45ES_cjs.UnderlyingOsdkObject];
3788
- const objectDef = value[chunk66XI45ES_cjs.ObjectDefRef];
3827
+ const underlying = value[chunkXYZOCIVH_cjs.UnderlyingOsdkObject];
3828
+ const objectDef = value[chunkXYZOCIVH_cjs.ObjectDefRef];
3789
3829
  const newProps = {
3790
3830
  $apiName: underlying.$apiName,
3791
3831
  $objectType: underlying.$objectType,
@@ -3801,12 +3841,12 @@ function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
3801
3841
  }
3802
3842
  }
3803
3843
  }
3804
- return chunk66XI45ES_cjs.createOsdkObject(value[chunk66XI45ES_cjs.ClientRef], objectDef, newProps);
3844
+ return chunkXYZOCIVH_cjs.createOsdkObject(value[chunkXYZOCIVH_cjs.ClientRef], objectDef, newProps);
3805
3845
  }
3806
3846
  function mergeSelectFields(sourceValue, selectFields, existingValue) {
3807
- const sourceUnderlying = sourceValue[chunk66XI45ES_cjs.UnderlyingOsdkObject];
3808
- const existingUnderlying = existingValue[chunk66XI45ES_cjs.UnderlyingOsdkObject];
3809
- const objectDef = sourceValue[chunk66XI45ES_cjs.ObjectDefRef];
3847
+ const sourceUnderlying = sourceValue[chunkXYZOCIVH_cjs.UnderlyingOsdkObject];
3848
+ const existingUnderlying = existingValue[chunkXYZOCIVH_cjs.UnderlyingOsdkObject];
3849
+ const objectDef = sourceValue[chunkXYZOCIVH_cjs.ObjectDefRef];
3810
3850
  const newProps = {
3811
3851
  $apiName: sourceUnderlying.$apiName,
3812
3852
  $objectType: sourceUnderlying.$objectType,
@@ -3824,7 +3864,7 @@ function mergeSelectFields(sourceValue, selectFields, existingValue) {
3824
3864
  newProps[key] = sourceUnderlying[key];
3825
3865
  }
3826
3866
  }
3827
- return chunk66XI45ES_cjs.createOsdkObject(sourceValue[chunk66XI45ES_cjs.ClientRef], objectDef, newProps);
3867
+ return chunkXYZOCIVH_cjs.createOsdkObject(sourceValue[chunkXYZOCIVH_cjs.ClientRef], objectDef, newProps);
3828
3868
  }
3829
3869
  function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, targetCurrentValue) {
3830
3870
  if (targetRdpFields.size === 0) {
@@ -3836,8 +3876,8 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
3836
3876
  }
3837
3877
  return filterToRdpFields(sourceValue, targetRdpFields, sourceRdpFields);
3838
3878
  }
3839
- const sourceUnderlying = sourceValue[chunk66XI45ES_cjs.UnderlyingOsdkObject];
3840
- const objectDef = sourceValue[chunk66XI45ES_cjs.ObjectDefRef];
3879
+ const sourceUnderlying = sourceValue[chunkXYZOCIVH_cjs.UnderlyingOsdkObject];
3880
+ const objectDef = sourceValue[chunkXYZOCIVH_cjs.ObjectDefRef];
3841
3881
  const newProps = {
3842
3882
  $apiName: sourceUnderlying.$apiName,
3843
3883
  $objectType: sourceUnderlying.$objectType,
@@ -3851,7 +3891,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
3851
3891
  }
3852
3892
  }
3853
3893
  if (targetCurrentValue) {
3854
- const targetUnderlying = targetCurrentValue[chunk66XI45ES_cjs.UnderlyingOsdkObject];
3894
+ const targetUnderlying = targetCurrentValue[chunkXYZOCIVH_cjs.UnderlyingOsdkObject];
3855
3895
  for (const field of targetRdpFields) {
3856
3896
  if (field in targetUnderlying) {
3857
3897
  if (!sourceRdpFields.has(field) || newProps[field] === void 0) {
@@ -3860,7 +3900,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
3860
3900
  }
3861
3901
  }
3862
3902
  }
3863
- return chunk66XI45ES_cjs.createOsdkObject(sourceValue[chunk66XI45ES_cjs.ClientRef], objectDef, newProps);
3903
+ return chunkXYZOCIVH_cjs.createOsdkObject(sourceValue[chunkXYZOCIVH_cjs.ClientRef], objectDef, newProps);
3864
3904
  }
3865
3905
 
3866
3906
  // src/observable/internal/object/ObjectCacheKeyRegistry.ts
@@ -4015,7 +4055,7 @@ var BulkObjectLoader = class {
4015
4055
  #maxEntries;
4016
4056
  constructor(client, maxWait = 25, maxEntries = 100) {
4017
4057
  this.#client = client;
4018
- this.#logger = client[chunkSV4AIIV4_cjs.additionalContext].logger;
4058
+ this.#logger = client[chunkKGWUPXAM_cjs.additionalContext].logger;
4019
4059
  this.#maxWait = maxWait;
4020
4060
  this.#maxEntries = maxEntries;
4021
4061
  }
@@ -4165,7 +4205,7 @@ var ObjectQuery = class extends Query {
4165
4205
  #loadPropertySecurityMetadata;
4166
4206
  #implementingTypes;
4167
4207
  constructor(store, subject, type, pk, cacheKey, opts, defType = "object", select, loadPropertySecurityMetadata) {
4168
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
4208
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkKGWUPXAM_cjs.additionalContext].logger?.child({}, {
4169
4209
  msgPrefix: `ObjectQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
4170
4210
  }) : void 0);
4171
4211
  this.#apiName = type;
@@ -4267,7 +4307,7 @@ var ObjectsHelper = class extends AbstractHelper {
4267
4307
  select,
4268
4308
  $loadPropertySecurityMetadata
4269
4309
  } = options;
4270
- const defType = chunk66XI45ES_cjs.getDefType(options.apiName);
4310
+ const defType = chunkXYZOCIVH_cjs.getDefType(options.apiName);
4271
4311
  const objectCacheKey = this.cacheKeys.get("object", apiName, pk, rdpConfig ?? void 0);
4272
4312
  return this.store.queries.get(objectCacheKey, () => new ObjectQuery(this.store, this.store.subjects.get(objectCacheKey), apiName, pk, objectCacheKey, {
4273
4313
  dedupeInterval: 0
@@ -4305,7 +4345,7 @@ var ObjectsHelper = class extends AbstractHelper {
4305
4345
  if (valueToWrite !== tombstone && existing?.value && this.isObjectHolder(existing.value)) {
4306
4346
  const expectedRdpFields = this.store.objectCacheKeyRegistry.getRdpFieldSet(sourceCacheKey);
4307
4347
  if (expectedRdpFields.size > 0) {
4308
- const underlying = valueToWrite[chunk66XI45ES_cjs.UnderlyingOsdkObject];
4348
+ const underlying = valueToWrite[chunkXYZOCIVH_cjs.UnderlyingOsdkObject];
4309
4349
  const actualRdpFields = /* @__PURE__ */ new Set();
4310
4350
  for (const field of expectedRdpFields) {
4311
4351
  if (underlying && field in underlying) {
@@ -4375,7 +4415,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
4375
4415
  #requiresServerEvaluation;
4376
4416
  #resultTypeApiName;
4377
4417
  constructor(store, subject, baseObjectSetWire, operations, cacheKey, opts) {
4378
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
4418
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkKGWUPXAM_cjs.additionalContext].logger?.child({}, {
4379
4419
  msgPrefix: `ObjectSetQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
4380
4420
  }) : void 0);
4381
4421
  this.#baseObjectSetWire = baseObjectSetWire;
@@ -4443,7 +4483,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
4443
4483
  return;
4444
4484
  }
4445
4485
  for (const os of sets) {
4446
- const typeName = _ObjectSetQuery.#extractTypeFromWireObjectSet(chunkSV4AIIV4_cjs.getWireObjectSet(os));
4486
+ const typeName = _ObjectSetQuery.#extractTypeFromWireObjectSet(chunkKGWUPXAM_cjs.getWireObjectSet(os));
4447
4487
  if (typeName) {
4448
4488
  types.add(typeName);
4449
4489
  }
@@ -4470,10 +4510,10 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
4470
4510
  */
4471
4511
  async fetchPageData(signal) {
4472
4512
  if (this.#operations.orderBy && Object.keys(this.#operations.orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
4473
- const wireObjectSet = chunkSV4AIIV4_cjs.getWireObjectSet(this.#composedObjectSet);
4513
+ const wireObjectSet = chunkKGWUPXAM_cjs.getWireObjectSet(this.#composedObjectSet);
4474
4514
  const {
4475
4515
  resultType
4476
- } = await getObjectTypesThatInvalidate(this.store.client[chunkSV4AIIV4_cjs.additionalContext], wireObjectSet);
4516
+ } = await getObjectTypesThatInvalidate(this.store.client[chunkKGWUPXAM_cjs.additionalContext], wireObjectSet);
4477
4517
  this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#operations.orderBy);
4478
4518
  }
4479
4519
  const resp = await this.#composedObjectSet.fetchPage({
@@ -4694,7 +4734,7 @@ var ObjectSetHelper = class extends AbstractHelper {
4694
4734
  const {
4695
4735
  baseObjectSet
4696
4736
  } = options;
4697
- const baseObjectSetWire = JSON.stringify(chunkSV4AIIV4_cjs.getWireObjectSet(baseObjectSet));
4737
+ const baseObjectSetWire = JSON.stringify(chunkKGWUPXAM_cjs.getWireObjectSet(baseObjectSet));
4698
4738
  const operations = this.buildCanonicalizedOperations(options);
4699
4739
  const objectSetCacheKey = this.cacheKeys.get("objectSet", baseObjectSetWire, operations);
4700
4740
  return this.store.queries.get(objectSetCacheKey, () => {
@@ -4710,13 +4750,13 @@ var ObjectSetHelper = class extends AbstractHelper {
4710
4750
  operations.withProperties = this.rdpCanonicalizer.canonicalize(options.withProperties);
4711
4751
  }
4712
4752
  if (options.union && options.union.length > 0) {
4713
- operations.union = this.objectSetArrayCanonicalizer.canonicalizeUnion(options.union.map((os) => JSON.stringify(chunkSV4AIIV4_cjs.getWireObjectSet(os))));
4753
+ operations.union = this.objectSetArrayCanonicalizer.canonicalizeUnion(options.union.map((os) => JSON.stringify(chunkKGWUPXAM_cjs.getWireObjectSet(os))));
4714
4754
  }
4715
4755
  if (options.intersect && options.intersect.length > 0) {
4716
- operations.intersect = this.objectSetArrayCanonicalizer.canonicalizeIntersect(options.intersect.map((os) => JSON.stringify(chunkSV4AIIV4_cjs.getWireObjectSet(os))));
4756
+ operations.intersect = this.objectSetArrayCanonicalizer.canonicalizeIntersect(options.intersect.map((os) => JSON.stringify(chunkKGWUPXAM_cjs.getWireObjectSet(os))));
4717
4757
  }
4718
4758
  if (options.subtract && options.subtract.length > 0) {
4719
- operations.subtract = this.objectSetArrayCanonicalizer.canonicalizeSubtract(options.subtract.map((os) => JSON.stringify(chunkSV4AIIV4_cjs.getWireObjectSet(os))));
4759
+ operations.subtract = this.objectSetArrayCanonicalizer.canonicalizeSubtract(options.subtract.map((os) => JSON.stringify(chunkKGWUPXAM_cjs.getWireObjectSet(os))));
4720
4760
  }
4721
4761
  if (options.pivotTo) {
4722
4762
  operations.pivotTo = options.pivotTo;
@@ -4809,7 +4849,7 @@ var RdpCanonicalizer = class extends CachingCanonicalizer {
4809
4849
  apiName: "__rdp_canonicalizer_holder__"
4810
4850
  };
4811
4851
  for (const [key, rdpFunction] of Object.entries(rdp)) {
4812
- const builder = chunkSV4AIIV4_cjs.createWithPropertiesObjectSet(
4852
+ const builder = chunkKGWUPXAM_cjs.createWithPropertiesObjectSet(
4813
4853
  objectTypeHolder,
4814
4854
  {
4815
4855
  type: "methodInput"
@@ -4862,6 +4902,9 @@ var RidListCanonicalizer = class {
4862
4902
  var SelectCanonicalizer = class {
4863
4903
  cache = /* @__PURE__ */ new Map();
4864
4904
  canonicalize(select) {
4905
+ if (select == null) {
4906
+ return void 0;
4907
+ }
4865
4908
  const sorted = [...new Set(select)].sort();
4866
4909
  const key = sorted.join("\0");
4867
4910
  let canonical = this.cache.get(key);
@@ -4905,7 +4948,7 @@ var Store = class {
4905
4948
  subjects = this.layers.subjects;
4906
4949
  // these are hopefully temporary
4907
4950
  constructor(client) {
4908
- this.logger = client[chunkSV4AIIV4_cjs.additionalContext].logger?.child({}, {
4951
+ this.logger = client[chunkKGWUPXAM_cjs.additionalContext].logger?.child({}, {
4909
4952
  msgPrefix: "Store"
4910
4953
  });
4911
4954
  this.client = client;
@@ -5203,10 +5246,10 @@ var Store = class {
5203
5246
 
5204
5247
  // src/observable/ObservableClient.ts
5205
5248
  function createObservableClient(client) {
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(" "));
5249
+ const tweakedClient = chunkXYZOCIVH_cjs.createClientFromContext({
5250
+ ...client[chunkKGWUPXAM_cjs.additionalContext],
5251
+ fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkKGWUPXAM_cjs.additionalContext].fetch, (headers) => {
5252
+ headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkXYZOCIVH_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
5210
5253
  return headers;
5211
5254
  })
5212
5255
  });
@@ -5249,19 +5292,19 @@ function getOsdkConfig(ontologyRid) {
5249
5292
 
5250
5293
  Object.defineProperty(exports, "createClientWithTransaction", {
5251
5294
  enumerable: true,
5252
- get: function () { return chunk66XI45ES_cjs.createClientWithTransaction; }
5295
+ get: function () { return chunkXYZOCIVH_cjs.createClientWithTransaction; }
5253
5296
  });
5254
5297
  Object.defineProperty(exports, "augment", {
5255
5298
  enumerable: true,
5256
- get: function () { return chunkSV4AIIV4_cjs.augment; }
5299
+ get: function () { return chunkKGWUPXAM_cjs.augment; }
5257
5300
  });
5258
5301
  Object.defineProperty(exports, "getWireObjectSet", {
5259
5302
  enumerable: true,
5260
- get: function () { return chunkSV4AIIV4_cjs.getWireObjectSet; }
5303
+ get: function () { return chunkKGWUPXAM_cjs.getWireObjectSet; }
5261
5304
  });
5262
5305
  Object.defineProperty(exports, "isObjectSet", {
5263
5306
  enumerable: true,
5264
- get: function () { return chunkSV4AIIV4_cjs.isObjectSet; }
5307
+ get: function () { return chunkKGWUPXAM_cjs.isObjectSet; }
5265
5308
  });
5266
5309
  exports.computeObjectSetCacheKey = computeObjectSetCacheKey;
5267
5310
  exports.createObservableClient = createObservableClient;