@osdk/client 2.5.0-beta.3 → 2.5.0-beta.4

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 chunkAOGMSVFN_cjs = require('../chunk-AOGMSVFN.cjs');
4
- var chunkBL56QBYG_cjs = require('../chunk-BL56QBYG.cjs');
3
+ var chunk6CBVXAAV_cjs = require('../chunk-6CBVXAAV.cjs');
4
+ var chunkQR7IBJPZ_cjs = require('../chunk-QR7IBJPZ.cjs');
5
5
  require('../chunk-Q7SFCCGT.cjs');
6
6
  var shared_net_fetch = require('@osdk/shared.net.fetch');
7
7
  var rxjs = require('rxjs');
@@ -142,7 +142,7 @@ var OptimisticJob = class {
142
142
  return this;
143
143
  },
144
144
  createObject(type, pk, properties) {
145
- const create = store.client[chunkBL56QBYG_cjs.additionalContext].objectFactory2(store.client[chunkBL56QBYG_cjs.additionalContext], [{
145
+ const create = store.client[chunkQR7IBJPZ_cjs.additionalContext].objectFactory2(store.client[chunkQR7IBJPZ_cjs.additionalContext], [{
146
146
  $primaryKey: pk,
147
147
  $apiName: type.apiName,
148
148
  $objectType: type.apiName,
@@ -707,7 +707,7 @@ var BulkObjectLoader = class {
707
707
  #maxEntries;
708
708
  constructor(client, maxWait = 25, maxEntries = 100) {
709
709
  this.#client = client;
710
- this.#logger = client[chunkBL56QBYG_cjs.additionalContext].logger;
710
+ this.#logger = client[chunkQR7IBJPZ_cjs.additionalContext].logger;
711
711
  this.#maxWait = maxWait;
712
712
  this.#maxEntries = maxEntries;
713
713
  }
@@ -777,7 +777,7 @@ var Query = class {
777
777
  this.cacheKey = cacheKey;
778
778
  this.store = store;
779
779
  this.#subject = observable;
780
- this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkBL56QBYG_cjs.additionalContext].logger : store.client[chunkBL56QBYG_cjs.additionalContext].logger?.child({}, {
780
+ this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkQR7IBJPZ_cjs.additionalContext].logger : store.client[chunkQR7IBJPZ_cjs.additionalContext].logger?.child({}, {
781
781
  msgPrefix: process.env.NODE_ENV !== "production" ? `Query<${cacheKey.type}, ${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>` : "Query"
782
782
  }));
783
783
  }
@@ -899,7 +899,7 @@ var ObjectQuery = class extends Query {
899
899
  #apiName;
900
900
  #pk;
901
901
  constructor(store, subject, type, pk, cacheKey, opts) {
902
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkBL56QBYG_cjs.additionalContext].logger?.child({}, {
902
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkQR7IBJPZ_cjs.additionalContext].logger?.child({}, {
903
903
  msgPrefix: `ObjectQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
904
904
  }) : void 0);
905
905
  this.#apiName = type;
@@ -1421,7 +1421,7 @@ var ListQuery = class extends BaseListQuery {
1421
1421
  batch.changes.registerList(this.cacheKey);
1422
1422
  }
1423
1423
  constructor(store, subject, apiType, apiName, whereClause, orderBy, cacheKey, opts) {
1424
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkBL56QBYG_cjs.additionalContext].logger?.child({}, {
1424
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkQR7IBJPZ_cjs.additionalContext].logger?.child({}, {
1425
1425
  msgPrefix: `ListQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
1426
1426
  }) : void 0);
1427
1427
  this.#type = apiType;
@@ -1614,7 +1614,7 @@ var ListQuery = class extends BaseListQuery {
1614
1614
  }
1615
1615
  #extractRelevantObjectsForTypeInterface(changes) {
1616
1616
  const matchesApiName = ([, object]) => {
1617
- return this.#apiName in object[chunkAOGMSVFN_cjs.ObjectDefRef].interfaceMap;
1617
+ return this.#apiName in object[chunk6CBVXAAV_cjs.ObjectDefRef].interfaceMap;
1618
1618
  };
1619
1619
  const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.#apiName));
1620
1620
  const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.#apiName));
@@ -1745,7 +1745,7 @@ var ListQuery = class extends BaseListQuery {
1745
1745
  async function reloadDataAsFullObjects(client, data) {
1746
1746
  const groups = groupBy__default.default(data, (x) => x.$objectType);
1747
1747
  const objectTypeToPrimaryKeyToObject = Object.fromEntries(await Promise.all(Object.entries(groups).map(async ([apiName, objects]) => {
1748
- const objectDef = objects[0][chunkAOGMSVFN_cjs.UnderlyingOsdkObject][chunkAOGMSVFN_cjs.ObjectDefRef];
1748
+ const objectDef = objects[0][chunk6CBVXAAV_cjs.UnderlyingOsdkObject][chunk6CBVXAAV_cjs.ObjectDefRef];
1749
1749
  const where = {
1750
1750
  [objectDef.primaryKeyApiName]: {
1751
1751
  $in: objects.map((x) => x.$primaryKey)
@@ -1775,7 +1775,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
1775
1775
  batch.changes.modified.add(this.cacheKey);
1776
1776
  }
1777
1777
  constructor(store, subject, cacheKey, opts) {
1778
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkBL56QBYG_cjs.additionalContext].logger?.child({}, {
1778
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkQR7IBJPZ_cjs.additionalContext].logger?.child({}, {
1779
1779
  msgPrefix: `SpecificLinkQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
1780
1780
  }) : void 0);
1781
1781
  [this.#sourceApiName, this.#sourcePk, this.#linkName, this.#whereClause, this.#orderBy] = cacheKey.otherKeys;
@@ -1792,7 +1792,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
1792
1792
  type: "object",
1793
1793
  apiName: this.#sourceApiName
1794
1794
  };
1795
- const sourceMetadata = await client[chunkBL56QBYG_cjs.additionalContext].ontologyProvider.getObjectDefinition(this.#sourceApiName);
1795
+ const sourceMetadata = await client[chunkQR7IBJPZ_cjs.additionalContext].ontologyProvider.getObjectDefinition(this.#sourceApiName);
1796
1796
  const sourceQuery = client(sourceObjectDef).where({
1797
1797
  [sourceMetadata.primaryKeyApiName]: this.#sourcePk
1798
1798
  });
@@ -1856,7 +1856,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
1856
1856
  return this.revalidate(true);
1857
1857
  } else {
1858
1858
  return (async () => {
1859
- const sourceMetadata = await this.store.client[chunkBL56QBYG_cjs.additionalContext].ontologyProvider.getObjectDefinition(this.#sourceApiName);
1859
+ const sourceMetadata = await this.store.client[chunkQR7IBJPZ_cjs.additionalContext].ontologyProvider.getObjectDefinition(this.#sourceApiName);
1860
1860
  const linkDef = sourceMetadata.links?.[this.#linkName];
1861
1861
  if (!linkDef || linkDef.targetType !== objectType) return;
1862
1862
  const promise = this.revalidate(true);
@@ -2126,7 +2126,7 @@ var Store = class {
2126
2126
  // these are hopefully temporary
2127
2127
  constructor(client) {
2128
2128
  this.client = client;
2129
- this.logger = client[chunkBL56QBYG_cjs.additionalContext].logger?.child({}, {
2129
+ this.logger = client[chunkQR7IBJPZ_cjs.additionalContext].logger?.child({}, {
2130
2130
  msgPrefix: "Store"
2131
2131
  });
2132
2132
  this.lists = new ListsHelper(this, this.whereCanonicalizer, this.orderByCanonicalizer);
@@ -2372,10 +2372,10 @@ var Store = class {
2372
2372
 
2373
2373
  // src/observable/ObservableClient.ts
2374
2374
  function createObservableClient(client) {
2375
- const tweakedClient = chunkAOGMSVFN_cjs.createClientFromContext({
2376
- ...client[chunkBL56QBYG_cjs.additionalContext],
2377
- fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkBL56QBYG_cjs.additionalContext].fetch, (headers) => {
2378
- headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkAOGMSVFN_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
2375
+ const tweakedClient = chunk6CBVXAAV_cjs.createClientFromContext({
2376
+ ...client[chunkQR7IBJPZ_cjs.additionalContext],
2377
+ fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkQR7IBJPZ_cjs.additionalContext].fetch, (headers) => {
2378
+ headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunk6CBVXAAV_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
2379
2379
  return headers;
2380
2380
  })
2381
2381
  });
@@ -2418,11 +2418,11 @@ function getOsdkConfig(ontologyRid) {
2418
2418
 
2419
2419
  Object.defineProperty(exports, "createClientWithTransaction", {
2420
2420
  enumerable: true,
2421
- get: function () { return chunkAOGMSVFN_cjs.createClientWithTransaction; }
2421
+ get: function () { return chunk6CBVXAAV_cjs.createClientWithTransaction; }
2422
2422
  });
2423
2423
  Object.defineProperty(exports, "augment", {
2424
2424
  enumerable: true,
2425
- get: function () { return chunkBL56QBYG_cjs.augment; }
2425
+ get: function () { return chunkQR7IBJPZ_cjs.augment; }
2426
2426
  });
2427
2427
  exports.createObservableClient = createObservableClient;
2428
2428
  exports.getMetaTagContent = getMetaTagContent;
@@ -14,6 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- export const USER_AGENT = `osdk-client/${"2.5.0-beta.3"}`;
18
- export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.5.0-beta.3"}`;
17
+ export const USER_AGENT = `osdk-client/${"2.5.0-beta.4"}`;
18
+ export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.5.0-beta.4"}`;
19
19
  //# sourceMappingURL=UserAgent.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/client",
3
- "version": "2.5.0-beta.3",
3
+ "version": "2.5.0-beta.4",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -47,8 +47,8 @@
47
47
  }
48
48
  },
49
49
  "dependencies": {
50
- "@osdk/foundry.core": "2.27.0",
51
- "@osdk/foundry.ontologies": "2.27.0",
50
+ "@osdk/foundry.core": "2.30.0",
51
+ "@osdk/foundry.ontologies": "2.30.0",
52
52
  "@osdk/shared.client": "^1.0.1",
53
53
  "@osdk/shared.client2": "^1.0.0",
54
54
  "@types/geojson": "^7946.0.14",
@@ -65,12 +65,12 @@
65
65
  "tiny-invariant": "^1.3.1",
66
66
  "type-fest": "^4.18.2",
67
67
  "ws": "^8.18.0",
68
- "@osdk/api": "2.5.0-beta.3",
69
- "@osdk/client.unstable": "2.5.0-beta.3",
70
- "@osdk/generator-converters": "2.5.0-beta.3",
68
+ "@osdk/api": "2.5.0-beta.4",
69
+ "@osdk/client.unstable": "2.5.0-beta.4",
70
+ "@osdk/generator-converters": "2.5.0-beta.4",
71
71
  "@osdk/shared.client.impl": "~1.5.0-beta.1",
72
- "@osdk/shared.net.fetch": "~1.5.0-beta.1",
73
- "@osdk/shared.net.errors": "~2.5.0-beta.1"
72
+ "@osdk/shared.net.errors": "~2.5.0-beta.1",
73
+ "@osdk/shared.net.fetch": "~1.5.0-beta.1"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@microsoft/api-documenter": "^7.26.5",
@@ -91,10 +91,10 @@
91
91
  "ts-expect": "^1.3.0",
92
92
  "typescript": "~5.5.4",
93
93
  "zod": "^3.23.8",
94
- "@osdk/client.test.ontology": "~2.5.0-beta.3",
95
94
  "@osdk/monorepo.api-extractor": "~0.4.0-beta.1",
96
95
  "@osdk/monorepo.tsconfig": "~0.4.0-beta.1",
97
- "@osdk/shared.test": "~2.5.0-beta.3"
96
+ "@osdk/shared.test": "~2.5.0-beta.4",
97
+ "@osdk/client.test.ontology": "~2.5.0-beta.4"
98
98
  },
99
99
  "publishConfig": {
100
100
  "access": "public"