@osdk/client 2.8.0-beta.11 → 2.8.0-beta.13

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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk2MMKVFIE_cjs = require('./chunk-2MMKVFIE.cjs');
4
- require('./chunk-YVZM2JPW.cjs');
3
+ var chunkFE6Q5R5O_cjs = require('./chunk-FE6Q5R5O.cjs');
4
+ require('./chunk-JVLSSAAP.cjs');
5
5
  var chunkLDTMSHUZ_cjs = require('./chunk-LDTMSHUZ.cjs');
6
6
  var api = require('@osdk/api');
7
7
  var shared_net_errors = require('@osdk/shared.net.errors');
@@ -18,7 +18,7 @@ chunkLDTMSHUZ_cjs.init_cjs_shims();
18
18
  // src/createPlatformClient.ts
19
19
  chunkLDTMSHUZ_cjs.init_cjs_shims();
20
20
  function createPlatformClient(baseUrl, tokenProvider, options = void 0, fetchFn = fetch) {
21
- return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunk2MMKVFIE_cjs.USER_AGENT, fetchFn);
21
+ return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunkFE6Q5R5O_cjs.USER_AGENT, fetchFn);
22
22
  }
23
23
 
24
24
  // src/util/datetimeConverters.ts
@@ -45,23 +45,23 @@ var extractDateFromIsoString = (dateTime) => {
45
45
 
46
46
  Object.defineProperty(exports, "ActionValidationError", {
47
47
  enumerable: true,
48
- get: function () { return chunk2MMKVFIE_cjs.ActionValidationError; }
48
+ get: function () { return chunkFE6Q5R5O_cjs.ActionValidationError; }
49
49
  });
50
50
  Object.defineProperty(exports, "createAttachmentUpload", {
51
51
  enumerable: true,
52
- get: function () { return chunk2MMKVFIE_cjs.createAttachmentUpload; }
52
+ get: function () { return chunkFE6Q5R5O_cjs.createAttachmentUpload; }
53
53
  });
54
54
  Object.defineProperty(exports, "createClient", {
55
55
  enumerable: true,
56
- get: function () { return chunk2MMKVFIE_cjs.createClient; }
56
+ get: function () { return chunkFE6Q5R5O_cjs.createClient; }
57
57
  });
58
58
  Object.defineProperty(exports, "createObjectSpecifierFromPrimaryKey", {
59
59
  enumerable: true,
60
- get: function () { return chunk2MMKVFIE_cjs.createObjectSpecifierFromPrimaryKey; }
60
+ get: function () { return chunkFE6Q5R5O_cjs.createObjectSpecifierFromPrimaryKey; }
61
61
  });
62
62
  Object.defineProperty(exports, "extractPrimaryKeyFromObjectSpecifier", {
63
63
  enumerable: true,
64
- get: function () { return chunk2MMKVFIE_cjs.extractPrimaryKeyFromObjectSpecifier; }
64
+ get: function () { return chunkFE6Q5R5O_cjs.extractPrimaryKeyFromObjectSpecifier; }
65
65
  });
66
66
  Object.defineProperty(exports, "isOk", {
67
67
  enumerable: true,
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkYVZM2JPW_cjs = require('../chunk-YVZM2JPW.cjs');
3
+ var chunkJVLSSAAP_cjs = require('../chunk-JVLSSAAP.cjs');
4
4
  var chunkLDTMSHUZ_cjs = require('../chunk-LDTMSHUZ.cjs');
5
5
 
6
6
  // src/public/internal.ts
@@ -9,8 +9,8 @@ chunkLDTMSHUZ_cjs.init_cjs_shims();
9
9
  // src/public-utils/createAndFetchTempObjectSetRid.ts
10
10
  chunkLDTMSHUZ_cjs.init_cjs_shims();
11
11
  async function createAndFetchTempObjectSetRid(client, objectSet) {
12
- const response = await chunkYVZM2JPW_cjs.OntologyObjectSet_exports.createTemporary(client, await client[chunkYVZM2JPW_cjs.additionalContext].ontologyRid, {
13
- objectSet: chunkYVZM2JPW_cjs.getWireObjectSet(objectSet)
12
+ const response = await chunkJVLSSAAP_cjs.OntologyObjectSet_exports.createTemporary(client, await client[chunkJVLSSAAP_cjs.additionalContext].ontologyRid, {
13
+ objectSet: chunkJVLSSAAP_cjs.getWireObjectSet(objectSet)
14
14
  });
15
15
  return response.objectSetRid;
16
16
  }
@@ -18,7 +18,7 @@ async function createAndFetchTempObjectSetRid(client, objectSet) {
18
18
  // src/public-utils/hydrateObjectSetFromObjectRids.ts
19
19
  chunkLDTMSHUZ_cjs.init_cjs_shims();
20
20
  function hydrateObjectSetFromObjectRids(client, definition, rids) {
21
- return chunkYVZM2JPW_cjs.createObjectSet(definition, client[chunkYVZM2JPW_cjs.additionalContext], {
21
+ return chunkJVLSSAAP_cjs.createObjectSet(definition, client[chunkJVLSSAAP_cjs.additionalContext], {
22
22
  type: "intersect",
23
23
  objectSets: [definition.type === "interface" ? {
24
24
  type: "interfaceBase",
@@ -39,7 +39,7 @@ function asMutableArray(array) {
39
39
  // src/public-utils/hydrateObjectSetFromRid.ts
40
40
  chunkLDTMSHUZ_cjs.init_cjs_shims();
41
41
  function hydrateObjectSetFromRid(client, definition, rid) {
42
- return chunkYVZM2JPW_cjs.createObjectSet(definition, client[chunkYVZM2JPW_cjs.additionalContext], {
42
+ return chunkJVLSSAAP_cjs.createObjectSet(definition, client[chunkJVLSSAAP_cjs.additionalContext], {
43
43
  type: "intersect",
44
44
  objectSets: [definition.type === "interface" ? {
45
45
  type: "interfaceBase",
@@ -81,7 +81,7 @@ var levelStyles = {
81
81
  color: "orange"
82
82
  })
83
83
  };
84
- var BrowserLogger = class _BrowserLogger extends chunkYVZM2JPW_cjs.BaseLogger {
84
+ var BrowserLogger = class _BrowserLogger extends chunkJVLSSAAP_cjs.BaseLogger {
85
85
  constructor(bindings = {}, options = {}) {
86
86
  super(bindings, {
87
87
  ...options,
@@ -107,11 +107,11 @@ var BrowserLogger = class _BrowserLogger extends chunkYVZM2JPW_cjs.BaseLogger {
107
107
 
108
108
  Object.defineProperty(exports, "MinimalLogger", {
109
109
  enumerable: true,
110
- get: function () { return chunkYVZM2JPW_cjs.MinimalLogger; }
110
+ get: function () { return chunkJVLSSAAP_cjs.MinimalLogger; }
111
111
  });
112
112
  Object.defineProperty(exports, "hydrateAttachmentFromRid", {
113
113
  enumerable: true,
114
- get: function () { return chunkYVZM2JPW_cjs.hydrateAttachmentFromRid; }
114
+ get: function () { return chunkJVLSSAAP_cjs.hydrateAttachmentFromRid; }
115
115
  });
116
116
  exports.BrowserLogger = BrowserLogger;
117
117
  exports.createAndFetchTempObjectSetRid = createAndFetchTempObjectSetRid;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk2MMKVFIE_cjs = require('../chunk-2MMKVFIE.cjs');
4
- var chunkYVZM2JPW_cjs = require('../chunk-YVZM2JPW.cjs');
3
+ var chunkFE6Q5R5O_cjs = require('../chunk-FE6Q5R5O.cjs');
4
+ var chunkJVLSSAAP_cjs = require('../chunk-JVLSSAAP.cjs');
5
5
  var chunkLDTMSHUZ_cjs = require('../chunk-LDTMSHUZ.cjs');
6
6
  var trie = require('@wry/trie');
7
7
  var deepEqual = require('fast-deep-equal');
@@ -153,7 +153,7 @@ var WhereClauseCanonicalizer = class {
153
153
  var whereCanonicalizer = new WhereClauseCanonicalizer();
154
154
  var orderByCanonicalizer = new OrderByCanonicalizer();
155
155
  function computeObjectSetCacheKey(objectSet, options) {
156
- const keyParts = ["objectSet", chunkYVZM2JPW_cjs.getWireObjectSet(objectSet)];
156
+ const keyParts = ["objectSet", chunkJVLSSAAP_cjs.getWireObjectSet(objectSet)];
157
157
  if (!options) {
158
158
  return JSON.stringify(keyParts);
159
159
  }
@@ -165,13 +165,13 @@ function computeObjectSetCacheKey(objectSet, options) {
165
165
  keyParts.push("props", propKeys);
166
166
  }
167
167
  if (options.union && options.union.length > 0) {
168
- keyParts.push("union", options.union.map((os) => chunkYVZM2JPW_cjs.getWireObjectSet(os)));
168
+ keyParts.push("union", options.union.map((os) => chunkJVLSSAAP_cjs.getWireObjectSet(os)));
169
169
  }
170
170
  if (options.intersect && options.intersect.length > 0) {
171
- keyParts.push("intersect", options.intersect.map((os) => chunkYVZM2JPW_cjs.getWireObjectSet(os)));
171
+ keyParts.push("intersect", options.intersect.map((os) => chunkJVLSSAAP_cjs.getWireObjectSet(os)));
172
172
  }
173
173
  if (options.subtract && options.subtract.length > 0) {
174
- keyParts.push("subtract", options.subtract.map((os) => chunkYVZM2JPW_cjs.getWireObjectSet(os)));
174
+ keyParts.push("subtract", options.subtract.map((os) => chunkJVLSSAAP_cjs.getWireObjectSet(os)));
175
175
  }
176
176
  if (options.pivotTo) {
177
177
  keyParts.push("pivotTo", options.pivotTo);
@@ -239,8 +239,8 @@ var ObservableClientImpl = class {
239
239
  const instances = [];
240
240
  const objectSetWires = [];
241
241
  for (const item of options.dependsOnObjects ?? []) {
242
- if (chunkYVZM2JPW_cjs.isObjectSet(item)) {
243
- objectSetWires.push(chunkYVZM2JPW_cjs.getWireObjectSet(item));
242
+ if (chunkJVLSSAAP_cjs.isObjectSet(item)) {
243
+ objectSetWires.push(chunkJVLSSAAP_cjs.getWireObjectSet(item));
244
244
  } else {
245
245
  instances.push({
246
246
  $apiName: item.$objectType ?? item.$apiName,
@@ -248,7 +248,7 @@ var ObservableClientImpl = class {
248
248
  });
249
249
  }
250
250
  }
251
- const objectSetTypesPromise = objectSetWires.length > 0 ? Promise.all(objectSetWires.map((wire) => chunkYVZM2JPW_cjs.extractObjectOrInterfaceType(this.__experimentalStore.client[chunkYVZM2JPW_cjs.additionalContext], wire))).then((types) => types.filter((t) => t != null).map((t) => t.apiName)) : void 0;
251
+ const objectSetTypesPromise = objectSetWires.length > 0 ? Promise.all(objectSetWires.map((wire) => chunkJVLSSAAP_cjs.extractObjectOrInterfaceType(this.__experimentalStore.client[chunkJVLSSAAP_cjs.additionalContext], wire))).then((types) => types.filter((t) => t != null).map((t) => t.apiName)) : void 0;
252
252
  return this.__experimentalStore.functions.observe({
253
253
  ...options,
254
254
  queryDef,
@@ -476,7 +476,7 @@ var OptimisticJob = class {
476
476
  return this;
477
477
  },
478
478
  createObject(type, pk, properties) {
479
- const create = store.client[chunkYVZM2JPW_cjs.additionalContext].objectFactory2(store.client[chunkYVZM2JPW_cjs.additionalContext], [{
479
+ const create = store.client[chunkJVLSSAAP_cjs.additionalContext].objectFactory2(store.client[chunkJVLSSAAP_cjs.additionalContext], [{
480
480
  $primaryKey: pk,
481
481
  $apiName: type.apiName,
482
482
  $objectType: type.apiName,
@@ -952,7 +952,7 @@ var Query = class {
952
952
  this.store = store;
953
953
  this.cacheKeys = store.cacheKeys;
954
954
  this.#subject = observable;
955
- this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkYVZM2JPW_cjs.additionalContext].logger : store.client[chunkYVZM2JPW_cjs.additionalContext].logger?.child({}, {
955
+ this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkJVLSSAAP_cjs.additionalContext].logger : store.client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
956
956
  msgPrefix: process.env.NODE_ENV !== "production" ? `Query<${cacheKey.type}, ${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>` : "Query"
957
957
  }));
958
958
  }
@@ -1114,7 +1114,7 @@ var AggregationQuery = class extends Query {
1114
1114
  #invalidationTypes;
1115
1115
  #invalidationTypesPromise;
1116
1116
  constructor(store, subject, cacheKey, opts) {
1117
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkYVZM2JPW_cjs.additionalContext].logger?.child({}, {
1117
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
1118
1118
  msgPrefix: `AggregationQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
1119
1119
  }) : void 0);
1120
1120
  this.apiName = cacheKey.otherKeys[API_NAME_IDX];
@@ -1132,7 +1132,7 @@ var AggregationQuery = class extends Query {
1132
1132
  try {
1133
1133
  const {
1134
1134
  invalidationSet
1135
- } = await getObjectTypesThatInvalidate(this.store.client[chunkYVZM2JPW_cjs.additionalContext], wireObjectSet);
1135
+ } = await getObjectTypesThatInvalidate(this.store.client[chunkJVLSSAAP_cjs.additionalContext], wireObjectSet);
1136
1136
  return /* @__PURE__ */ new Set([this.apiName, ...invalidationSet]);
1137
1137
  } catch (error) {
1138
1138
  this.store.logger?.error("Failed to compute invalidation types for aggregation, falling back to base type only", error);
@@ -1203,7 +1203,7 @@ var ObjectAggregationQuery = class extends AggregationQuery {
1203
1203
  };
1204
1204
  let objectSet;
1205
1205
  if (this.parsedWireObjectSet) {
1206
- objectSet = chunkYVZM2JPW_cjs.createObjectSet(objectTypeDef, this.store.client[chunkYVZM2JPW_cjs.additionalContext], this.parsedWireObjectSet);
1206
+ objectSet = chunkJVLSSAAP_cjs.createObjectSet(objectTypeDef, this.store.client[chunkJVLSSAAP_cjs.additionalContext], this.parsedWireObjectSet);
1207
1207
  } else {
1208
1208
  objectSet = this.store.client(objectTypeDef);
1209
1209
  }
@@ -1245,7 +1245,7 @@ var AggregationsHelper = class extends AbstractHelper {
1245
1245
  return this.getOrCreateQuery(options, void 0);
1246
1246
  }
1247
1247
  getQueryWithObjectSet(options) {
1248
- const serializedObjectSet = JSON.stringify(chunkYVZM2JPW_cjs.getWireObjectSet(options.objectSet));
1248
+ const serializedObjectSet = JSON.stringify(chunkJVLSSAAP_cjs.getWireObjectSet(options.objectSet));
1249
1249
  return this.getOrCreateQuery(options, serializedObjectSet);
1250
1250
  }
1251
1251
  getOrCreateQuery(options, serializedObjectSet) {
@@ -1550,7 +1550,7 @@ var FunctionParamsCanonicalizer = class {
1550
1550
  path.push("$:map_end");
1551
1551
  return arr;
1552
1552
  }
1553
- if (chunk2MMKVFIE_cjs.isObjectSpecifiersObject(value)) {
1553
+ if (chunkFE6Q5R5O_cjs.isObjectSpecifiersObject(value)) {
1554
1554
  const objectType = value.$objectType ?? value.$apiName;
1555
1555
  path.push("$:osdk", objectType, value.$primaryKey);
1556
1556
  return {
@@ -1558,8 +1558,8 @@ var FunctionParamsCanonicalizer = class {
1558
1558
  $primaryKey: value.$primaryKey
1559
1559
  };
1560
1560
  }
1561
- if (chunkYVZM2JPW_cjs.isObjectSet(value)) {
1562
- const wire = chunkYVZM2JPW_cjs.getWireObjectSet(value);
1561
+ if (chunkJVLSSAAP_cjs.isObjectSet(value)) {
1562
+ const wire = chunkJVLSSAAP_cjs.getWireObjectSet(value);
1563
1563
  path.push("$:objectset", wire);
1564
1564
  return wire;
1565
1565
  }
@@ -1622,7 +1622,7 @@ var FunctionQuery = class extends Query {
1622
1622
  #dependsOnObjects;
1623
1623
  #queryDef;
1624
1624
  constructor(store, subject, queryDef, params, cacheKey, opts, objectSetTypesPromise) {
1625
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkYVZM2JPW_cjs.additionalContext].logger?.child({}, {
1625
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
1626
1626
  msgPrefix: `FunctionQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
1627
1627
  }) : void 0);
1628
1628
  this.#apiName = queryDef.apiName;
@@ -1679,7 +1679,7 @@ var FunctionQuery = class extends Query {
1679
1679
  }).debug("calling _fetchAndStore");
1680
1680
  }
1681
1681
  try {
1682
- const result = await chunk2MMKVFIE_cjs.applyQuery(this.store.client[chunkYVZM2JPW_cjs.additionalContext], this.#queryDef, this.#params);
1682
+ const result = await chunkFE6Q5R5O_cjs.applyQuery(this.store.client[chunkJVLSSAAP_cjs.additionalContext], this.#queryDef, this.#params);
1683
1683
  const executedAt = Date.now();
1684
1684
  this.store.batch({}, (batch) => {
1685
1685
  this.writeToStore({
@@ -2839,7 +2839,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
2839
2839
  batch.changes.modified.add(this.cacheKey);
2840
2840
  }
2841
2841
  constructor(store, subject, cacheKey, opts) {
2842
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkYVZM2JPW_cjs.additionalContext].logger?.child({}, {
2842
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
2843
2843
  msgPrefix: `SpecificLinkQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
2844
2844
  }) : void 0);
2845
2845
  [this.#sourceApiName, this.#sourceTypeKind, this.#sourceUnderlyingObjectType, this.#sourcePk, this.#linkName, this.#whereClause, this.#orderBy] = cacheKey.otherKeys;
@@ -2849,7 +2849,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
2849
2849
  */
2850
2850
  async fetchPageData(signal) {
2851
2851
  const client = this.store.client;
2852
- const ontologyProvider = client[chunkYVZM2JPW_cjs.additionalContext].ontologyProvider;
2852
+ const ontologyProvider = client[chunkJVLSSAAP_cjs.additionalContext].ontologyProvider;
2853
2853
  const isInterface = this.#sourceTypeKind === "interface";
2854
2854
  if (this.#orderBy && Object.keys(this.#orderBy).length > 0) {
2855
2855
  let targetTypeApiName;
@@ -2957,7 +2957,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
2957
2957
  }
2958
2958
  return (async () => {
2959
2959
  try {
2960
- const ontologyProvider = this.store.client[chunkYVZM2JPW_cjs.additionalContext].ontologyProvider;
2960
+ const ontologyProvider = this.store.client[chunkJVLSSAAP_cjs.additionalContext].ontologyProvider;
2961
2961
  if (this.#sourceTypeKind === "interface") {
2962
2962
  const objectMetadata = await ontologyProvider.getObjectDefinition(objectType);
2963
2963
  if (this.#sourceApiName in objectMetadata.interfaceMap) {
@@ -3144,7 +3144,7 @@ var ListQuery = class extends BaseListQuery {
3144
3144
  batch.changes.registerList(this.cacheKey);
3145
3145
  }
3146
3146
  constructor(store, subject, apiName, cacheKey, opts) {
3147
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkYVZM2JPW_cjs.additionalContext].logger?.child({}, {
3147
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
3148
3148
  msgPrefix: `ListQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
3149
3149
  }) : void 0);
3150
3150
  this.apiName = apiName;
@@ -3180,10 +3180,10 @@ var ListQuery = class extends BaseListQuery {
3180
3180
  async fetchPageData(signal) {
3181
3181
  const needsResultType = Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy) || this.#pivotInfo != null && this.#intersectWith != null && this.#intersectWith.length > 0 && !this.#pivotIntersectApplied;
3182
3182
  if (needsResultType) {
3183
- const wireObjectSet = chunkYVZM2JPW_cjs.getWireObjectSet(this.#objectSet);
3183
+ const wireObjectSet = chunkJVLSSAAP_cjs.getWireObjectSet(this.#objectSet);
3184
3184
  const {
3185
3185
  resultType
3186
- } = await getObjectTypesThatInvalidate(this.store.client[chunkYVZM2JPW_cjs.additionalContext], wireObjectSet);
3186
+ } = await getObjectTypesThatInvalidate(this.store.client[chunkJVLSSAAP_cjs.additionalContext], wireObjectSet);
3187
3187
  if (Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
3188
3188
  this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#orderBy);
3189
3189
  }
@@ -3435,29 +3435,34 @@ var InterfaceListQuery = class extends ListQuery {
3435
3435
  createObjectSet(store) {
3436
3436
  const rdpConfig = this.cacheKey.otherKeys[RDP_IDX2];
3437
3437
  const pivotInfo = this.cacheKey.otherKeys[PIVOT_IDX];
3438
+ const rids = this.cacheKey.otherKeys[RIDS_IDX];
3438
3439
  if (pivotInfo != null) {
3439
- const sourceSet = pivotInfo.sourceTypeKind === "interface" ? store.client({
3440
- type: "interface",
3441
- apiName: pivotInfo.sourceType
3442
- }) : store.client({
3443
- type: "object",
3444
- apiName: pivotInfo.sourceType
3445
- });
3446
- let objectSet = sourceSet.where(this.canonicalWhere).pivotTo(pivotInfo.linkName);
3440
+ const sourceSet = createSourceSetForPivot(store, pivotInfo, rids);
3441
+ let objectSet2 = sourceSet.where(this.canonicalWhere).pivotTo(pivotInfo.linkName);
3447
3442
  if (rdpConfig != null) {
3448
- objectSet = objectSet.withProperties(rdpConfig);
3443
+ objectSet2 = objectSet2.withProperties(rdpConfig);
3449
3444
  }
3450
- return objectSet;
3445
+ return objectSet2;
3451
3446
  }
3452
3447
  const type = "interface";
3453
3448
  const objectTypeDef = {
3454
3449
  type,
3455
3450
  apiName: this.apiName
3456
3451
  };
3452
+ const clientCtx = store.client[chunkJVLSSAAP_cjs.additionalContext];
3453
+ let objectSet;
3454
+ if (rids != null) {
3455
+ objectSet = clientCtx.objectSetFactory(objectTypeDef, clientCtx, {
3456
+ type: "static",
3457
+ objects: [...rids]
3458
+ });
3459
+ } else {
3460
+ objectSet = store.client(objectTypeDef);
3461
+ }
3457
3462
  if (rdpConfig != null) {
3458
- return store.client(objectTypeDef).withProperties(rdpConfig).where(this.canonicalWhere);
3463
+ objectSet = objectSet.withProperties(rdpConfig);
3459
3464
  }
3460
- return store.client(objectTypeDef).where(this.canonicalWhere);
3465
+ return objectSet.where(this.canonicalWhere);
3461
3466
  }
3462
3467
  async revalidateObjectType(apiName) {
3463
3468
  const objectMetadata = await this.store.client.fetchMetadata({
@@ -3487,7 +3492,7 @@ var InterfaceListQuery = class extends ListQuery {
3487
3492
  }
3488
3493
  extractRelevantObjects(changes) {
3489
3494
  const matchesApiName = ([, object]) => {
3490
- return this.apiName in object[chunk2MMKVFIE_cjs.ObjectDefRef].interfaceMap;
3495
+ return this.apiName in object[chunkFE6Q5R5O_cjs.ObjectDefRef].interfaceMap;
3491
3496
  };
3492
3497
  const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
3493
3498
  const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
@@ -3505,6 +3510,28 @@ var InterfaceListQuery = class extends ListQuery {
3505
3510
  };
3506
3511
  }
3507
3512
  };
3513
+ function createSourceSetForPivot(store, pivotInfo, rids) {
3514
+ const clientCtx = store.client[chunkJVLSSAAP_cjs.additionalContext];
3515
+ if (rids != null) {
3516
+ return clientCtx.objectSetFactory({
3517
+ type: "object",
3518
+ apiName: pivotInfo.sourceType
3519
+ }, clientCtx, {
3520
+ type: "static",
3521
+ objects: [...rids]
3522
+ });
3523
+ }
3524
+ if (pivotInfo.sourceTypeKind === "interface") {
3525
+ return store.client({
3526
+ type: "interface",
3527
+ apiName: pivotInfo.sourceType
3528
+ });
3529
+ }
3530
+ return store.client({
3531
+ type: "object",
3532
+ apiName: pivotInfo.sourceType
3533
+ });
3534
+ }
3508
3535
  async function reloadDataAsFullObjects(client, data) {
3509
3536
  if (data.length === 0) {
3510
3537
  return data;
@@ -3540,7 +3567,7 @@ var ObjectListQuery = class extends ListQuery {
3540
3567
  const intersectWith = this.cacheKey.otherKeys[INTERSECT_IDX2];
3541
3568
  const pivotInfo = this.cacheKey.otherKeys[PIVOT_IDX];
3542
3569
  const rids = this.cacheKey.otherKeys[RIDS_IDX];
3543
- const clientCtx = store.client[chunkYVZM2JPW_cjs.additionalContext];
3570
+ const clientCtx = store.client[chunkJVLSSAAP_cjs.additionalContext];
3544
3571
  const typeDefinition = {
3545
3572
  type: "object",
3546
3573
  apiName: this.apiName
@@ -3691,8 +3718,8 @@ function stripRdpFields(value, rdpFields) {
3691
3718
  if (rdpFields.size === 0) {
3692
3719
  return value;
3693
3720
  }
3694
- const underlying = value[chunk2MMKVFIE_cjs.UnderlyingOsdkObject];
3695
- const objectDef = value[chunk2MMKVFIE_cjs.ObjectDefRef];
3721
+ const underlying = value[chunkFE6Q5R5O_cjs.UnderlyingOsdkObject];
3722
+ const objectDef = value[chunkFE6Q5R5O_cjs.ObjectDefRef];
3696
3723
  const newProps = {
3697
3724
  $apiName: underlying.$apiName,
3698
3725
  $objectType: underlying.$objectType,
@@ -3705,7 +3732,7 @@ function stripRdpFields(value, rdpFields) {
3705
3732
  newProps[key] = underlying[key];
3706
3733
  }
3707
3734
  }
3708
- return chunk2MMKVFIE_cjs.createOsdkObject(value[chunk2MMKVFIE_cjs.ClientRef], objectDef, newProps);
3735
+ return chunkFE6Q5R5O_cjs.createOsdkObject(value[chunkFE6Q5R5O_cjs.ClientRef], objectDef, newProps);
3709
3736
  }
3710
3737
  function isSuperset(superset, subset) {
3711
3738
  for (const field of subset) {
@@ -3716,8 +3743,8 @@ function isSuperset(superset, subset) {
3716
3743
  return true;
3717
3744
  }
3718
3745
  function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
3719
- const underlying = value[chunk2MMKVFIE_cjs.UnderlyingOsdkObject];
3720
- const objectDef = value[chunk2MMKVFIE_cjs.ObjectDefRef];
3746
+ const underlying = value[chunkFE6Q5R5O_cjs.UnderlyingOsdkObject];
3747
+ const objectDef = value[chunkFE6Q5R5O_cjs.ObjectDefRef];
3721
3748
  const newProps = {
3722
3749
  $apiName: underlying.$apiName,
3723
3750
  $objectType: underlying.$objectType,
@@ -3733,7 +3760,7 @@ function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
3733
3760
  }
3734
3761
  }
3735
3762
  }
3736
- return chunk2MMKVFIE_cjs.createOsdkObject(value[chunk2MMKVFIE_cjs.ClientRef], objectDef, newProps);
3763
+ return chunkFE6Q5R5O_cjs.createOsdkObject(value[chunkFE6Q5R5O_cjs.ClientRef], objectDef, newProps);
3737
3764
  }
3738
3765
  function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, targetCurrentValue) {
3739
3766
  if (targetRdpFields.size === 0) {
@@ -3745,8 +3772,8 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
3745
3772
  }
3746
3773
  return filterToRdpFields(sourceValue, targetRdpFields, sourceRdpFields);
3747
3774
  }
3748
- const sourceUnderlying = sourceValue[chunk2MMKVFIE_cjs.UnderlyingOsdkObject];
3749
- const objectDef = sourceValue[chunk2MMKVFIE_cjs.ObjectDefRef];
3775
+ const sourceUnderlying = sourceValue[chunkFE6Q5R5O_cjs.UnderlyingOsdkObject];
3776
+ const objectDef = sourceValue[chunkFE6Q5R5O_cjs.ObjectDefRef];
3750
3777
  const newProps = {
3751
3778
  $apiName: sourceUnderlying.$apiName,
3752
3779
  $objectType: sourceUnderlying.$objectType,
@@ -3760,7 +3787,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
3760
3787
  }
3761
3788
  }
3762
3789
  if (targetCurrentValue) {
3763
- const targetUnderlying = targetCurrentValue[chunk2MMKVFIE_cjs.UnderlyingOsdkObject];
3790
+ const targetUnderlying = targetCurrentValue[chunkFE6Q5R5O_cjs.UnderlyingOsdkObject];
3764
3791
  for (const field of targetRdpFields) {
3765
3792
  if (field in targetUnderlying) {
3766
3793
  if (!sourceRdpFields.has(field) || newProps[field] === void 0) {
@@ -3769,7 +3796,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
3769
3796
  }
3770
3797
  }
3771
3798
  }
3772
- return chunk2MMKVFIE_cjs.createOsdkObject(sourceValue[chunk2MMKVFIE_cjs.ClientRef], objectDef, newProps);
3799
+ return chunkFE6Q5R5O_cjs.createOsdkObject(sourceValue[chunkFE6Q5R5O_cjs.ClientRef], objectDef, newProps);
3773
3800
  }
3774
3801
 
3775
3802
  // src/observable/internal/object/ObjectCacheKeyRegistry.ts
@@ -3904,7 +3931,7 @@ var BulkObjectLoader = class {
3904
3931
  #maxEntries;
3905
3932
  constructor(client, maxWait = 25, maxEntries = 100) {
3906
3933
  this.#client = client;
3907
- this.#logger = client[chunkYVZM2JPW_cjs.additionalContext].logger;
3934
+ this.#logger = client[chunkJVLSSAAP_cjs.additionalContext].logger;
3908
3935
  this.#maxWait = maxWait;
3909
3936
  this.#maxEntries = maxEntries;
3910
3937
  }
@@ -4038,7 +4065,7 @@ var ObjectQuery = class extends Query {
4038
4065
  #defType;
4039
4066
  #implementingTypes;
4040
4067
  constructor(store, subject, type, pk, cacheKey, opts, defType = "object") {
4041
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkYVZM2JPW_cjs.additionalContext].logger?.child({}, {
4068
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
4042
4069
  msgPrefix: `ObjectQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
4043
4070
  }) : void 0);
4044
4071
  this.#apiName = type;
@@ -4132,7 +4159,7 @@ var ObjectsHelper = class extends AbstractHelper {
4132
4159
  const {
4133
4160
  pk
4134
4161
  } = options;
4135
- const defType = chunk2MMKVFIE_cjs.getDefType(options.apiName);
4162
+ const defType = chunkFE6Q5R5O_cjs.getDefType(options.apiName);
4136
4163
  const objectCacheKey = this.cacheKeys.get("object", apiName, pk, rdpConfig ?? void 0);
4137
4164
  return this.store.queries.get(objectCacheKey, () => new ObjectQuery(this.store, this.store.subjects.get(objectCacheKey), apiName, pk, objectCacheKey, {
4138
4165
  dedupeInterval: 0
@@ -4222,7 +4249,7 @@ var ObjectSetQuery = class extends BaseListQuery {
4222
4249
  #composedObjectSet;
4223
4250
  #objectTypes;
4224
4251
  constructor(store, subject, baseObjectSetWire, operations, cacheKey, opts) {
4225
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkYVZM2JPW_cjs.additionalContext].logger?.child({}, {
4252
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
4226
4253
  msgPrefix: `ObjectSetQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
4227
4254
  }) : void 0);
4228
4255
  this.#baseObjectSetWire = baseObjectSetWire;
@@ -4270,7 +4297,7 @@ var ObjectSetQuery = class extends BaseListQuery {
4270
4297
  }
4271
4298
  if (opts.union) {
4272
4299
  for (const os of opts.union) {
4273
- const wire = chunkYVZM2JPW_cjs.getWireObjectSet(os);
4300
+ const wire = chunkJVLSSAAP_cjs.getWireObjectSet(os);
4274
4301
  if (wire.type) {
4275
4302
  types.add(wire.type);
4276
4303
  }
@@ -4278,7 +4305,7 @@ var ObjectSetQuery = class extends BaseListQuery {
4278
4305
  }
4279
4306
  if (opts.intersect) {
4280
4307
  for (const os of opts.intersect) {
4281
- const wire = chunkYVZM2JPW_cjs.getWireObjectSet(os);
4308
+ const wire = chunkJVLSSAAP_cjs.getWireObjectSet(os);
4282
4309
  if (wire.type) {
4283
4310
  types.add(wire.type);
4284
4311
  }
@@ -4286,7 +4313,7 @@ var ObjectSetQuery = class extends BaseListQuery {
4286
4313
  }
4287
4314
  if (opts.subtract) {
4288
4315
  for (const os of opts.subtract) {
4289
- const wire = chunkYVZM2JPW_cjs.getWireObjectSet(os);
4316
+ const wire = chunkJVLSSAAP_cjs.getWireObjectSet(os);
4290
4317
  if (wire.type) {
4291
4318
  types.add(wire.type);
4292
4319
  }
@@ -4306,10 +4333,10 @@ var ObjectSetQuery = class extends BaseListQuery {
4306
4333
  */
4307
4334
  async fetchPageData(signal) {
4308
4335
  if (this.#operations.orderBy && Object.keys(this.#operations.orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
4309
- const wireObjectSet = chunkYVZM2JPW_cjs.getWireObjectSet(this.#composedObjectSet);
4336
+ const wireObjectSet = chunkJVLSSAAP_cjs.getWireObjectSet(this.#composedObjectSet);
4310
4337
  const {
4311
4338
  resultType
4312
- } = await getObjectTypesThatInvalidate(this.store.client[chunkYVZM2JPW_cjs.additionalContext], wireObjectSet);
4339
+ } = await getObjectTypesThatInvalidate(this.store.client[chunkJVLSSAAP_cjs.additionalContext], wireObjectSet);
4313
4340
  this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#operations.orderBy);
4314
4341
  }
4315
4342
  const resp = await this.#composedObjectSet.fetchPage({
@@ -4379,7 +4406,7 @@ var ObjectSetHelper = class extends AbstractHelper {
4379
4406
  const {
4380
4407
  baseObjectSet
4381
4408
  } = options;
4382
- const baseObjectSetWire = JSON.stringify(chunkYVZM2JPW_cjs.getWireObjectSet(baseObjectSet));
4409
+ const baseObjectSetWire = JSON.stringify(chunkJVLSSAAP_cjs.getWireObjectSet(baseObjectSet));
4383
4410
  const operations = this.buildCanonicalizedOperations(options);
4384
4411
  const objectSetCacheKey = this.cacheKeys.get("objectSet", baseObjectSetWire, operations);
4385
4412
  return this.store.queries.get(objectSetCacheKey, () => {
@@ -4395,13 +4422,13 @@ var ObjectSetHelper = class extends AbstractHelper {
4395
4422
  operations.withProperties = this.rdpCanonicalizer.canonicalize(options.withProperties);
4396
4423
  }
4397
4424
  if (options.union && options.union.length > 0) {
4398
- operations.union = options.union.map((os) => JSON.stringify(chunkYVZM2JPW_cjs.getWireObjectSet(os)));
4425
+ operations.union = options.union.map((os) => JSON.stringify(chunkJVLSSAAP_cjs.getWireObjectSet(os)));
4399
4426
  }
4400
4427
  if (options.intersect && options.intersect.length > 0) {
4401
- operations.intersect = options.intersect.map((os) => JSON.stringify(chunkYVZM2JPW_cjs.getWireObjectSet(os)));
4428
+ operations.intersect = options.intersect.map((os) => JSON.stringify(chunkJVLSSAAP_cjs.getWireObjectSet(os)));
4402
4429
  }
4403
4430
  if (options.subtract && options.subtract.length > 0) {
4404
- operations.subtract = options.subtract.map((os) => JSON.stringify(chunkYVZM2JPW_cjs.getWireObjectSet(os)));
4431
+ operations.subtract = options.subtract.map((os) => JSON.stringify(chunkJVLSSAAP_cjs.getWireObjectSet(os)));
4405
4432
  }
4406
4433
  if (options.pivotTo) {
4407
4434
  operations.pivotTo = options.pivotTo;
@@ -4473,7 +4500,7 @@ var RdpCanonicalizer = class extends CachingCanonicalizer {
4473
4500
  apiName: "__rdp_canonicalizer_holder__"
4474
4501
  };
4475
4502
  for (const [key, rdpFunction] of Object.entries(rdp)) {
4476
- const builder = chunkYVZM2JPW_cjs.createWithPropertiesObjectSet(
4503
+ const builder = chunkJVLSSAAP_cjs.createWithPropertiesObjectSet(
4477
4504
  objectTypeHolder,
4478
4505
  {
4479
4506
  type: "methodInput"
@@ -4552,7 +4579,7 @@ var Store = class {
4552
4579
  subjects = this.layers.subjects;
4553
4580
  // these are hopefully temporary
4554
4581
  constructor(client) {
4555
- this.logger = client[chunkYVZM2JPW_cjs.additionalContext].logger?.child({}, {
4582
+ this.logger = client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
4556
4583
  msgPrefix: "Store"
4557
4584
  });
4558
4585
  this.client = client;
@@ -4830,10 +4857,10 @@ var Store = class {
4830
4857
 
4831
4858
  // src/observable/ObservableClient.ts
4832
4859
  function createObservableClient(client) {
4833
- const tweakedClient = chunk2MMKVFIE_cjs.createClientFromContext({
4834
- ...client[chunkYVZM2JPW_cjs.additionalContext],
4835
- fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkYVZM2JPW_cjs.additionalContext].fetch, (headers) => {
4836
- headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunk2MMKVFIE_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
4860
+ const tweakedClient = chunkFE6Q5R5O_cjs.createClientFromContext({
4861
+ ...client[chunkJVLSSAAP_cjs.additionalContext],
4862
+ fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkJVLSSAAP_cjs.additionalContext].fetch, (headers) => {
4863
+ headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkFE6Q5R5O_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
4837
4864
  return headers;
4838
4865
  })
4839
4866
  });
@@ -4877,19 +4904,19 @@ function getOsdkConfig(ontologyRid) {
4877
4904
 
4878
4905
  Object.defineProperty(exports, "createClientWithTransaction", {
4879
4906
  enumerable: true,
4880
- get: function () { return chunk2MMKVFIE_cjs.createClientWithTransaction; }
4907
+ get: function () { return chunkFE6Q5R5O_cjs.createClientWithTransaction; }
4881
4908
  });
4882
4909
  Object.defineProperty(exports, "augment", {
4883
4910
  enumerable: true,
4884
- get: function () { return chunkYVZM2JPW_cjs.augment; }
4911
+ get: function () { return chunkJVLSSAAP_cjs.augment; }
4885
4912
  });
4886
4913
  Object.defineProperty(exports, "getWireObjectSet", {
4887
4914
  enumerable: true,
4888
- get: function () { return chunkYVZM2JPW_cjs.getWireObjectSet; }
4915
+ get: function () { return chunkJVLSSAAP_cjs.getWireObjectSet; }
4889
4916
  });
4890
4917
  Object.defineProperty(exports, "isObjectSet", {
4891
4918
  enumerable: true,
4892
- get: function () { return chunkYVZM2JPW_cjs.isObjectSet; }
4919
+ get: function () { return chunkJVLSSAAP_cjs.isObjectSet; }
4893
4920
  });
4894
4921
  exports.computeObjectSetCacheKey = computeObjectSetCacheKey;
4895
4922
  exports.createObservableClient = createObservableClient;