@osdk/client 2.8.0-beta.30 → 2.8.0-beta.31

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,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk3QMUE6AG_cjs = require('./chunk-3QMUE6AG.cjs');
3
+ var chunk7NPAYZLW_cjs = require('./chunk-7NPAYZLW.cjs');
4
4
  var chunkZZ6DP3W4_cjs = require('./chunk-ZZ6DP3W4.cjs');
5
5
  require('./chunk-GSVXEVM4.cjs');
6
6
  require('./chunk-D26YLHTV.cjs');
@@ -16,7 +16,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
16
16
  var invariant__default = /*#__PURE__*/_interopDefault(invariant);
17
17
 
18
18
  function createPlatformClient(baseUrl, tokenProvider, options = void 0, fetchFn = fetch) {
19
- return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunk3QMUE6AG_cjs.USER_AGENT, fetchFn);
19
+ return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunk7NPAYZLW_cjs.USER_AGENT, fetchFn);
20
20
  }
21
21
  var isoRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;
22
22
  var extractDate = (dateTime) => {
@@ -40,23 +40,23 @@ var extractDateFromIsoString = (dateTime) => {
40
40
 
41
41
  Object.defineProperty(exports, "ActionValidationError", {
42
42
  enumerable: true,
43
- get: function () { return chunk3QMUE6AG_cjs.ActionValidationError; }
43
+ get: function () { return chunk7NPAYZLW_cjs.ActionValidationError; }
44
44
  });
45
45
  Object.defineProperty(exports, "createAttachmentUpload", {
46
46
  enumerable: true,
47
- get: function () { return chunk3QMUE6AG_cjs.createAttachmentUpload; }
47
+ get: function () { return chunk7NPAYZLW_cjs.createAttachmentUpload; }
48
48
  });
49
49
  Object.defineProperty(exports, "createClient", {
50
50
  enumerable: true,
51
- get: function () { return chunk3QMUE6AG_cjs.createClient; }
51
+ get: function () { return chunk7NPAYZLW_cjs.createClient; }
52
52
  });
53
53
  Object.defineProperty(exports, "createObjectSpecifierFromPrimaryKey", {
54
54
  enumerable: true,
55
- get: function () { return chunk3QMUE6AG_cjs.createObjectSpecifierFromPrimaryKey; }
55
+ get: function () { return chunk7NPAYZLW_cjs.createObjectSpecifierFromPrimaryKey; }
56
56
  });
57
57
  Object.defineProperty(exports, "extractPrimaryKeyFromObjectSpecifier", {
58
58
  enumerable: true,
59
- get: function () { return chunk3QMUE6AG_cjs.extractPrimaryKeyFromObjectSpecifier; }
59
+ get: function () { return chunk7NPAYZLW_cjs.extractPrimaryKeyFromObjectSpecifier; }
60
60
  });
61
61
  Object.defineProperty(exports, "getWireObjectSet", {
62
62
  enumerable: true,
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk3QMUE6AG_cjs = require('../chunk-3QMUE6AG.cjs');
3
+ var chunk7NPAYZLW_cjs = require('../chunk-7NPAYZLW.cjs');
4
4
  var chunkZZ6DP3W4_cjs = require('../chunk-ZZ6DP3W4.cjs');
5
5
  require('../chunk-GSVXEVM4.cjs');
6
6
  require('../chunk-D26YLHTV.cjs');
@@ -1580,7 +1580,7 @@ var FunctionParamsCanonicalizer = class {
1580
1580
  path.push("$:map_end");
1581
1581
  return arr;
1582
1582
  }
1583
- if (chunk3QMUE6AG_cjs.isObjectSpecifiersObject(value)) {
1583
+ if (chunk7NPAYZLW_cjs.isObjectSpecifiersObject(value)) {
1584
1584
  const objectType = value.$objectType ?? value.$apiName;
1585
1585
  path.push("$:osdk", objectType, value.$primaryKey);
1586
1586
  return {
@@ -1706,7 +1706,7 @@ var FunctionQuery = class extends Query {
1706
1706
  }).debug("calling _fetchAndStore");
1707
1707
  }
1708
1708
  try {
1709
- const result = await chunk3QMUE6AG_cjs.applyQuery(this.store.client[chunkZZ6DP3W4_cjs.additionalContext], this.#queryDef, this.#params);
1709
+ const result = await chunk7NPAYZLW_cjs.applyQuery(this.store.client[chunkZZ6DP3W4_cjs.additionalContext], this.#queryDef, this.#params);
1710
1710
  const executedAt = Date.now();
1711
1711
  this.store.batch({}, (batch) => {
1712
1712
  this.writeToStore({
@@ -3579,7 +3579,7 @@ var InterfaceListQuery = class extends ListQuery {
3579
3579
  }
3580
3580
  extractRelevantObjects(changes) {
3581
3581
  const matchesApiName = ([, object]) => {
3582
- return this.apiName in object[chunk3QMUE6AG_cjs.ObjectDefRef].interfaceMap;
3582
+ return this.apiName in object[chunk7NPAYZLW_cjs.ObjectDefRef].interfaceMap;
3583
3583
  };
3584
3584
  const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
3585
3585
  const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
@@ -3799,8 +3799,8 @@ function stripRdpFields(value, rdpFields) {
3799
3799
  if (rdpFields.size === 0) {
3800
3800
  return value;
3801
3801
  }
3802
- const underlying = value[chunk3QMUE6AG_cjs.UnderlyingOsdkObject];
3803
- const objectDef = value[chunk3QMUE6AG_cjs.ObjectDefRef];
3802
+ const underlying = value[chunk7NPAYZLW_cjs.UnderlyingOsdkObject];
3803
+ const objectDef = value[chunk7NPAYZLW_cjs.ObjectDefRef];
3804
3804
  const newProps = {
3805
3805
  $apiName: underlying.$apiName,
3806
3806
  $objectType: underlying.$objectType,
@@ -3813,7 +3813,7 @@ function stripRdpFields(value, rdpFields) {
3813
3813
  newProps[key] = underlying[key];
3814
3814
  }
3815
3815
  }
3816
- return chunk3QMUE6AG_cjs.createOsdkObject(value[chunk3QMUE6AG_cjs.ClientRef], objectDef, newProps);
3816
+ return chunk7NPAYZLW_cjs.createOsdkObject(value[chunk7NPAYZLW_cjs.ClientRef], objectDef, newProps);
3817
3817
  }
3818
3818
  function isSuperset(superset, subset) {
3819
3819
  for (const field of subset) {
@@ -3824,8 +3824,8 @@ function isSuperset(superset, subset) {
3824
3824
  return true;
3825
3825
  }
3826
3826
  function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
3827
- const underlying = value[chunk3QMUE6AG_cjs.UnderlyingOsdkObject];
3828
- const objectDef = value[chunk3QMUE6AG_cjs.ObjectDefRef];
3827
+ const underlying = value[chunk7NPAYZLW_cjs.UnderlyingOsdkObject];
3828
+ const objectDef = value[chunk7NPAYZLW_cjs.ObjectDefRef];
3829
3829
  const newProps = {
3830
3830
  $apiName: underlying.$apiName,
3831
3831
  $objectType: underlying.$objectType,
@@ -3841,12 +3841,12 @@ function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
3841
3841
  }
3842
3842
  }
3843
3843
  }
3844
- return chunk3QMUE6AG_cjs.createOsdkObject(value[chunk3QMUE6AG_cjs.ClientRef], objectDef, newProps);
3844
+ return chunk7NPAYZLW_cjs.createOsdkObject(value[chunk7NPAYZLW_cjs.ClientRef], objectDef, newProps);
3845
3845
  }
3846
3846
  function mergeSelectFields(sourceValue, selectFields, existingValue) {
3847
- const sourceUnderlying = sourceValue[chunk3QMUE6AG_cjs.UnderlyingOsdkObject];
3848
- const existingUnderlying = existingValue[chunk3QMUE6AG_cjs.UnderlyingOsdkObject];
3849
- const objectDef = sourceValue[chunk3QMUE6AG_cjs.ObjectDefRef];
3847
+ const sourceUnderlying = sourceValue[chunk7NPAYZLW_cjs.UnderlyingOsdkObject];
3848
+ const existingUnderlying = existingValue[chunk7NPAYZLW_cjs.UnderlyingOsdkObject];
3849
+ const objectDef = sourceValue[chunk7NPAYZLW_cjs.ObjectDefRef];
3850
3850
  const newProps = {
3851
3851
  $apiName: sourceUnderlying.$apiName,
3852
3852
  $objectType: sourceUnderlying.$objectType,
@@ -3864,7 +3864,7 @@ function mergeSelectFields(sourceValue, selectFields, existingValue) {
3864
3864
  newProps[key] = sourceUnderlying[key];
3865
3865
  }
3866
3866
  }
3867
- return chunk3QMUE6AG_cjs.createOsdkObject(sourceValue[chunk3QMUE6AG_cjs.ClientRef], objectDef, newProps);
3867
+ return chunk7NPAYZLW_cjs.createOsdkObject(sourceValue[chunk7NPAYZLW_cjs.ClientRef], objectDef, newProps);
3868
3868
  }
3869
3869
  function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, targetCurrentValue) {
3870
3870
  if (targetRdpFields.size === 0) {
@@ -3876,8 +3876,8 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
3876
3876
  }
3877
3877
  return filterToRdpFields(sourceValue, targetRdpFields, sourceRdpFields);
3878
3878
  }
3879
- const sourceUnderlying = sourceValue[chunk3QMUE6AG_cjs.UnderlyingOsdkObject];
3880
- const objectDef = sourceValue[chunk3QMUE6AG_cjs.ObjectDefRef];
3879
+ const sourceUnderlying = sourceValue[chunk7NPAYZLW_cjs.UnderlyingOsdkObject];
3880
+ const objectDef = sourceValue[chunk7NPAYZLW_cjs.ObjectDefRef];
3881
3881
  const newProps = {
3882
3882
  $apiName: sourceUnderlying.$apiName,
3883
3883
  $objectType: sourceUnderlying.$objectType,
@@ -3891,7 +3891,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
3891
3891
  }
3892
3892
  }
3893
3893
  if (targetCurrentValue) {
3894
- const targetUnderlying = targetCurrentValue[chunk3QMUE6AG_cjs.UnderlyingOsdkObject];
3894
+ const targetUnderlying = targetCurrentValue[chunk7NPAYZLW_cjs.UnderlyingOsdkObject];
3895
3895
  for (const field of targetRdpFields) {
3896
3896
  if (field in targetUnderlying) {
3897
3897
  if (!sourceRdpFields.has(field) || newProps[field] === void 0) {
@@ -3900,7 +3900,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
3900
3900
  }
3901
3901
  }
3902
3902
  }
3903
- return chunk3QMUE6AG_cjs.createOsdkObject(sourceValue[chunk3QMUE6AG_cjs.ClientRef], objectDef, newProps);
3903
+ return chunk7NPAYZLW_cjs.createOsdkObject(sourceValue[chunk7NPAYZLW_cjs.ClientRef], objectDef, newProps);
3904
3904
  }
3905
3905
 
3906
3906
  // src/observable/internal/object/ObjectCacheKeyRegistry.ts
@@ -4307,7 +4307,7 @@ var ObjectsHelper = class extends AbstractHelper {
4307
4307
  select,
4308
4308
  $loadPropertySecurityMetadata
4309
4309
  } = options;
4310
- const defType = chunk3QMUE6AG_cjs.getDefType(options.apiName);
4310
+ const defType = chunk7NPAYZLW_cjs.getDefType(options.apiName);
4311
4311
  const objectCacheKey = this.cacheKeys.get("object", apiName, pk, rdpConfig ?? void 0);
4312
4312
  return this.store.queries.get(objectCacheKey, () => new ObjectQuery(this.store, this.store.subjects.get(objectCacheKey), apiName, pk, objectCacheKey, {
4313
4313
  dedupeInterval: 0
@@ -4345,7 +4345,7 @@ var ObjectsHelper = class extends AbstractHelper {
4345
4345
  if (valueToWrite !== tombstone && existing?.value && this.isObjectHolder(existing.value)) {
4346
4346
  const expectedRdpFields = this.store.objectCacheKeyRegistry.getRdpFieldSet(sourceCacheKey);
4347
4347
  if (expectedRdpFields.size > 0) {
4348
- const underlying = valueToWrite[chunk3QMUE6AG_cjs.UnderlyingOsdkObject];
4348
+ const underlying = valueToWrite[chunk7NPAYZLW_cjs.UnderlyingOsdkObject];
4349
4349
  const actualRdpFields = /* @__PURE__ */ new Set();
4350
4350
  for (const field of expectedRdpFields) {
4351
4351
  if (underlying && field in underlying) {
@@ -4973,6 +4973,9 @@ var Store = class {
4973
4973
  }
4974
4974
  this.subjects.delete(key);
4975
4975
  this.queries.delete(key);
4976
+ if (key.type === "object") {
4977
+ this.objectCacheKeyRegistry.unregister(key);
4978
+ }
4976
4979
  };
4977
4980
  applyAction = async (action, args, opts) => {
4978
4981
  return await new ActionApplication(this).applyAction(action, args, opts);
@@ -5246,10 +5249,10 @@ var Store = class {
5246
5249
 
5247
5250
  // src/observable/ObservableClient.ts
5248
5251
  function createObservableClient(client) {
5249
- const tweakedClient = chunk3QMUE6AG_cjs.createClientFromContext({
5252
+ const tweakedClient = chunk7NPAYZLW_cjs.createClientFromContext({
5250
5253
  ...client[chunkZZ6DP3W4_cjs.additionalContext],
5251
5254
  fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkZZ6DP3W4_cjs.additionalContext].fetch, (headers) => {
5252
- headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunk3QMUE6AG_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
5255
+ headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunk7NPAYZLW_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
5253
5256
  return headers;
5254
5257
  })
5255
5258
  });
@@ -5292,7 +5295,7 @@ function getOsdkConfig(ontologyRid) {
5292
5295
 
5293
5296
  Object.defineProperty(exports, "createClientWithTransaction", {
5294
5297
  enumerable: true,
5295
- get: function () { return chunk3QMUE6AG_cjs.createClientWithTransaction; }
5298
+ get: function () { return chunk7NPAYZLW_cjs.createClientWithTransaction; }
5296
5299
  });
5297
5300
  Object.defineProperty(exports, "augment", {
5298
5301
  enumerable: true,