@osdk/client 2.4.0-beta.13 → 2.4.0-beta.15

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.
@@ -0,0 +1,74 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ require('./chunk-Q7SFCCGT.cjs');
6
+
7
+ // ../../node_modules/.pnpm/delay@6.0.0/node_modules/delay/index.js
8
+ var randomInteger = (minimum, maximum) => Math.floor(Math.random() * (maximum - minimum + 1) + minimum);
9
+ var createAbortError = () => {
10
+ const error = new Error("Delay aborted");
11
+ error.name = "AbortError";
12
+ return error;
13
+ };
14
+ var clearMethods = /* @__PURE__ */ new WeakMap();
15
+ function createDelay({
16
+ clearTimeout: defaultClear,
17
+ setTimeout: defaultSet
18
+ } = {}) {
19
+ return (milliseconds, {
20
+ value,
21
+ signal
22
+ } = {}) => {
23
+ if (signal?.aborted) {
24
+ return Promise.reject(createAbortError());
25
+ }
26
+ let timeoutId;
27
+ let settle;
28
+ let rejectFunction;
29
+ const clear = defaultClear ?? clearTimeout;
30
+ const signalListener = () => {
31
+ clear(timeoutId);
32
+ rejectFunction(createAbortError());
33
+ };
34
+ const cleanup = () => {
35
+ if (signal) {
36
+ signal.removeEventListener("abort", signalListener);
37
+ }
38
+ };
39
+ const delayPromise = new Promise((resolve, reject) => {
40
+ settle = () => {
41
+ cleanup();
42
+ resolve(value);
43
+ };
44
+ rejectFunction = reject;
45
+ timeoutId = (defaultSet ?? setTimeout)(settle, milliseconds);
46
+ });
47
+ if (signal) {
48
+ signal.addEventListener("abort", signalListener, {
49
+ once: true
50
+ });
51
+ }
52
+ clearMethods.set(delayPromise, () => {
53
+ clear(timeoutId);
54
+ timeoutId = null;
55
+ settle();
56
+ });
57
+ return delayPromise;
58
+ };
59
+ }
60
+ var delay = createDelay();
61
+ var delay_default = delay;
62
+ async function rangeDelay(minimum, maximum, options = {}) {
63
+ return delay(randomInteger(minimum, maximum), options);
64
+ }
65
+ function clearDelay(promise) {
66
+ clearMethods.get(promise)?.();
67
+ }
68
+
69
+ exports.clearDelay = clearDelay;
70
+ exports.createDelay = createDelay;
71
+ exports.default = delay_default;
72
+ exports.rangeDelay = rangeDelay;
73
+ //# sourceMappingURL=delay-QK4T7RVX.cjs.map
74
+ //# sourceMappingURL=delay-QK4T7RVX.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../node_modules/.pnpm/delay@6.0.0/node_modules/delay/index.js"],"names":[],"mappings":";;;;;;;AACA,IAAM,aAAgB,GAAA,CAAC,OAAS,EAAA,OAAA,KAAY,IAAK,CAAA,KAAA,CAAM,IAAK,CAAA,MAAA,EAAY,IAAA,OAAA,GAAU,OAAU,GAAA,CAAA,CAAA,GAAK,OAAO,CAAA;AACxG,IAAM,mBAAmB,MAAM;AAC7B,EAAM,MAAA,KAAA,GAAQ,IAAI,KAAA,CAAM,eAAe,CAAA;AACvC,EAAA,KAAA,CAAM,IAAO,GAAA,YAAA;AACb,EAAO,OAAA,KAAA;AACT,CAAA;AACA,IAAM,YAAA,uBAAmB,OAAQ,EAAA;AAC1B,SAAS,WAAY,CAAA;AAAA,EAC1B,YAAc,EAAA,YAAA;AAAA,EACd,UAAY,EAAA;AACd,CAAA,GAAI,EAAI,EAAA;AAEN,EAAA,OAAO,CAAC,YAAc,EAAA;AAAA,IACpB,KAAA;AAAA,IACA;AAAA,GACF,GAAI,EAAO,KAAA;AAET,IAAA,IAAI,QAAQ,OAAS,EAAA;AACnB,MAAO,OAAA,OAAA,CAAQ,MAAO,CAAA,gBAAA,EAAkB,CAAA;AAAA;AAE1C,IAAI,IAAA,SAAA;AACJ,IAAI,IAAA,MAAA;AACJ,IAAI,IAAA,cAAA;AACJ,IAAA,MAAM,QAAQ,YAAgB,IAAA,YAAA;AAC9B,IAAA,MAAM,iBAAiB,MAAM;AAC3B,MAAA,KAAA,CAAM,SAAS,CAAA;AACf,MAAA,cAAA,CAAe,kBAAkB,CAAA;AAAA,KACnC;AACA,IAAA,MAAM,UAAU,MAAM;AACpB,MAAA,IAAI,MAAQ,EAAA;AACV,QAAO,MAAA,CAAA,mBAAA,CAAoB,SAAS,cAAc,CAAA;AAAA;AACpD,KACF;AACA,IAAA,MAAM,YAAe,GAAA,IAAI,OAAQ,CAAA,CAAC,SAAS,MAAW,KAAA;AACpD,MAAA,MAAA,GAAS,MAAM;AACb,QAAQ,OAAA,EAAA;AACR,QAAA,OAAA,CAAQ,KAAK,CAAA;AAAA,OACf;AACA,MAAiB,cAAA,GAAA,MAAA;AACjB,MAAa,SAAA,GAAA,CAAA,UAAA,IAAc,UAAY,EAAA,MAAA,EAAQ,YAAY,CAAA;AAAA,KAC5D,CAAA;AACD,IAAA,IAAI,MAAQ,EAAA;AACV,MAAO,MAAA,CAAA,gBAAA,CAAiB,SAAS,cAAgB,EAAA;AAAA,QAC/C,IAAM,EAAA;AAAA,OACP,CAAA;AAAA;AAEH,IAAa,YAAA,CAAA,GAAA,CAAI,cAAc,MAAM;AACnC,MAAA,KAAA,CAAM,SAAS,CAAA;AACf,MAAY,SAAA,GAAA,IAAA;AACZ,MAAO,MAAA,EAAA;AAAA,KACR,CAAA;AACD,IAAO,OAAA,YAAA;AAAA,GACT;AACF;AACA,IAAM,QAAQ,WAAY,EAAA;AAC1B,IAAO,aAAQ,GAAA;AACf,eAAsB,UAAW,CAAA,OAAA,EAAS,OAAS,EAAA,OAAA,GAAU,EAAI,EAAA;AAC/D,EAAA,OAAO,KAAM,CAAA,aAAA,CAAc,OAAS,EAAA,OAAO,GAAG,OAAO,CAAA;AACvD;AACO,SAAS,WAAW,OAAS,EAAA;AAClC,EAAa,YAAA,CAAA,GAAA,CAAI,OAAO,CAAI,IAAA;AAC9B","file":"delay-QK4T7RVX.cjs","sourcesContent":["// From https://github.com/sindresorhus/random-int/blob/c37741b56f76b9160b0b63dae4e9c64875128146/index.js#L13-L15\nconst randomInteger = (minimum, maximum) => Math.floor(Math.random() * (maximum - minimum + 1) + minimum);\nconst createAbortError = () => {\n const error = new Error('Delay aborted');\n error.name = 'AbortError';\n return error;\n};\nconst clearMethods = new WeakMap();\nexport function createDelay({\n clearTimeout: defaultClear,\n setTimeout: defaultSet\n} = {}) {\n // We cannot use `async` here as we need the promise identity.\n return (milliseconds, {\n value,\n signal\n } = {}) => {\n // TODO: Use `signal?.throwIfAborted()` when targeting Node.js 18.\n if (signal?.aborted) {\n return Promise.reject(createAbortError());\n }\n let timeoutId;\n let settle;\n let rejectFunction;\n const clear = defaultClear ?? clearTimeout;\n const signalListener = () => {\n clear(timeoutId);\n rejectFunction(createAbortError());\n };\n const cleanup = () => {\n if (signal) {\n signal.removeEventListener('abort', signalListener);\n }\n };\n const delayPromise = new Promise((resolve, reject) => {\n settle = () => {\n cleanup();\n resolve(value);\n };\n rejectFunction = reject;\n timeoutId = (defaultSet ?? setTimeout)(settle, milliseconds);\n });\n if (signal) {\n signal.addEventListener('abort', signalListener, {\n once: true\n });\n }\n clearMethods.set(delayPromise, () => {\n clear(timeoutId);\n timeoutId = null;\n settle();\n });\n return delayPromise;\n };\n}\nconst delay = createDelay();\nexport default delay;\nexport async function rangeDelay(minimum, maximum, options = {}) {\n return delay(randomInteger(minimum, maximum), options);\n}\nexport function clearDelay(promise) {\n clearMethods.get(promise)?.();\n}"]}
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkZU44HMSL_cjs = require('./chunk-ZU44HMSL.cjs');
4
- require('./chunk-VDP26RI3.cjs');
3
+ var chunk6HUH5WJA_cjs = require('./chunk-6HUH5WJA.cjs');
4
+ require('./chunk-L3OU54Q5.cjs');
5
+ require('./chunk-Q7SFCCGT.cjs');
5
6
  var api = require('@osdk/api');
6
7
  var shared_net_errors = require('@osdk/shared.net.errors');
7
8
  var shared_client_impl = require('@osdk/shared.client.impl');
@@ -12,7 +13,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
13
  var invariant__default = /*#__PURE__*/_interopDefault(invariant);
13
14
 
14
15
  function createPlatformClient(baseUrl, tokenProvider, options = void 0, fetchFn = fetch) {
15
- return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunkZU44HMSL_cjs.USER_AGENT, fetchFn);
16
+ return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunk6HUH5WJA_cjs.USER_AGENT, fetchFn);
16
17
  }
17
18
  var isoRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;
18
19
  var extractDate = (dateTime) => {
@@ -36,15 +37,15 @@ var extractDateFromIsoString = (dateTime) => {
36
37
 
37
38
  Object.defineProperty(exports, "ActionValidationError", {
38
39
  enumerable: true,
39
- get: function () { return chunkZU44HMSL_cjs.ActionValidationError; }
40
+ get: function () { return chunk6HUH5WJA_cjs.ActionValidationError; }
40
41
  });
41
42
  Object.defineProperty(exports, "createAttachmentUpload", {
42
43
  enumerable: true,
43
- get: function () { return chunkZU44HMSL_cjs.createAttachmentUpload; }
44
+ get: function () { return chunk6HUH5WJA_cjs.createAttachmentUpload; }
44
45
  });
45
46
  Object.defineProperty(exports, "createClient", {
46
47
  enumerable: true,
47
- get: function () { return chunkZU44HMSL_cjs.createClient; }
48
+ get: function () { return chunk6HUH5WJA_cjs.createClient; }
48
49
  });
49
50
  Object.defineProperty(exports, "NULL_VALUE", {
50
51
  enumerable: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/createPlatformClient.ts","../../src/util/datetimeConverters.ts"],"names":["createSharedClientContext","USER_AGENT","invariant"],"mappings":";;;;;;;;;;;;;AA8BO,SAAS,qBAAqB,OAAS,EAAA,aAAA,EAAe,OAAU,GAAA,MAAA,EAAW,UAAU,KAAO,EAAA;AACjG,EAAA,OAAOA,4CAA0B,CAAA,OAAA,EAAS,aAAe,EAAAC,4BAAA,EAAY,OAAO,CAAA;AAC9E;ACfA,IAAM,QAAW,GAAA,uEAAA;AAQV,IAAM,cAAc,CAAY,QAAA,KAAA;AACrC,EAAA,EAAE,QAAS,CAAA,MAAA,GAAS,EAAM,CAAA,GAAA,OAAA,CAAQ,GAAI,CAAA,QAAA,KAAa,YAAe,GAAAC,0BAAA,CAAU,KAAO,EAAA,kDAAkD,CAAI,GAAAA,0BAAA,CAAU,KAAK,CAAI,GAAA,MAAA;AAC5J,EAAA,CAAC,SAAS,IAAK,CAAA,QAAQ,CAAI,GAAA,OAAA,CAAQ,IAAI,QAAa,KAAA,YAAA,GAAeA,0BAAU,CAAA,KAAA,EAAO,+DAA+D,QAAQ,CAAA,CAAE,CAAI,GAAAA,0BAAA,CAAU,KAAK,CAAI,GAAA,MAAA;AACpL,EAAA,OAAO,yBAAyB,QAAQ,CAAA;AAC1C;AAQO,IAAM,mBAAmB,CAAQ,IAAA,KAAA;AACtC,EAAO,OAAA,wBAAA,CAAyB,IAAK,CAAA,WAAA,EAAa,CAAA;AACpD;AAQO,IAAM,yBAAyB,CAAQ,IAAA,KAAA;AAC5C,EAAO,OAAA,wBAAA,CAAyB,uBAAwB,CAAA,IAAI,CAAC,CAAA;AAC/D;AAGO,IAAM,0BAA0B,CAAQ,IAAA,KAAA;AAC7C,EAAA,MAAM,QAAW,GAAA,IAAA,CAAK,iBAAkB,EAAA,GAAI,EAAK,GAAA,GAAA;AACjD,EAAA,OAAO,IAAI,IAAK,CAAA,IAAA,CAAK,SAAY,GAAA,QAAQ,EAAE,WAAY,EAAA;AACzD,CAAA;AACA,IAAM,2BAA2B,CAAY,QAAA,KAAA;AAC3C,EAAA,OAAO,QAAS,CAAA,KAAA,CAAM,GAAG,CAAA,CAAE,CAAC,CAAA;AAC9B,CAAA","file":"index.cjs","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createSharedClientContext } from \"@osdk/shared.client.impl\";\nimport { USER_AGENT } from \"./util/UserAgent.js\";\n/**\n * Creates a client that can only be used with Platform APIs.\n *\n * If you already have an OSDK Client (from `createClient`), you do not need to\n * create one of these - those clients can be used with Platform APIs as well.\n *\n * @param baseUrl\n * @param tokenProvider\n * @param options Currently unused, reserved for future use.\n * @param fetchFn\n * @returns\n */\nexport function createPlatformClient(baseUrl, tokenProvider, options = undefined, fetchFn = fetch) {\n return createSharedClientContext(baseUrl, tokenProvider, USER_AGENT, fetchFn);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nconst isoRegex = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})?$/;\n\n/**\n * Extracts the date from a ISO 8601 formatted date time string. Throws if the input is not in the correct format.\n *\n * @param dateTime An ISO 8601 formatted date time string\n * @returns The date part of the input string\n */\nexport const extractDate = dateTime => {\n !(dateTime.length < 33) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Invalid date format. Provided input is too long.\") : invariant(false) : void 0;\n !isoRegex.test(dateTime) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Invalid date format. Expected ISO 8601 format, but received ${dateTime}`) : invariant(false) : void 0;\n return extractDateFromIsoString(dateTime);\n};\n\n/**\n * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in UTC time.\n *\n * @param date\n * @returns The date part of a ISO 8601 formatted date time string\n */\nexport const extractDateInUTC = date => {\n return extractDateFromIsoString(date.toISOString());\n};\n\n/**\n * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in the local time zone.\n *\n * @param date\n * @returns The date part of a ISO 8601 formatted date time string\n */\nexport const extractDateInLocalTime = date => {\n return extractDateFromIsoString(generateOffsetUtcString(date));\n};\n\n/** @internal */\nexport const generateOffsetUtcString = date => {\n const offsetMs = date.getTimezoneOffset() * 60 * 1000;\n return new Date(date.getTime() - offsetMs).toISOString();\n};\nconst extractDateFromIsoString = dateTime => {\n return dateTime.split(\"T\")[0];\n};"]}
1
+ {"version":3,"sources":["../../src/createPlatformClient.ts","../../src/util/datetimeConverters.ts"],"names":["createSharedClientContext","USER_AGENT","invariant"],"mappings":";;;;;;;;;;;;;;AA8BO,SAAS,qBAAqB,OAAS,EAAA,aAAA,EAAe,OAAU,GAAA,MAAA,EAAW,UAAU,KAAO,EAAA;AACjG,EAAA,OAAOA,4CAA0B,CAAA,OAAA,EAAS,aAAe,EAAAC,4BAAA,EAAY,OAAO,CAAA;AAC9E;ACfA,IAAM,QAAW,GAAA,uEAAA;AAQV,IAAM,cAAc,CAAY,QAAA,KAAA;AACrC,EAAA,EAAE,QAAS,CAAA,MAAA,GAAS,EAAM,CAAA,GAAA,OAAA,CAAQ,GAAI,CAAA,QAAA,KAAa,YAAe,GAAAC,0BAAA,CAAU,KAAO,EAAA,kDAAkD,CAAI,GAAAA,0BAAA,CAAU,KAAK,CAAI,GAAA,MAAA;AAC5J,EAAA,CAAC,SAAS,IAAK,CAAA,QAAQ,CAAI,GAAA,OAAA,CAAQ,IAAI,QAAa,KAAA,YAAA,GAAeA,0BAAU,CAAA,KAAA,EAAO,+DAA+D,QAAQ,CAAA,CAAE,CAAI,GAAAA,0BAAA,CAAU,KAAK,CAAI,GAAA,MAAA;AACpL,EAAA,OAAO,yBAAyB,QAAQ,CAAA;AAC1C;AAQO,IAAM,mBAAmB,CAAQ,IAAA,KAAA;AACtC,EAAO,OAAA,wBAAA,CAAyB,IAAK,CAAA,WAAA,EAAa,CAAA;AACpD;AAQO,IAAM,yBAAyB,CAAQ,IAAA,KAAA;AAC5C,EAAO,OAAA,wBAAA,CAAyB,uBAAwB,CAAA,IAAI,CAAC,CAAA;AAC/D;AAGO,IAAM,0BAA0B,CAAQ,IAAA,KAAA;AAC7C,EAAA,MAAM,QAAW,GAAA,IAAA,CAAK,iBAAkB,EAAA,GAAI,EAAK,GAAA,GAAA;AACjD,EAAA,OAAO,IAAI,IAAK,CAAA,IAAA,CAAK,SAAY,GAAA,QAAQ,EAAE,WAAY,EAAA;AACzD,CAAA;AACA,IAAM,2BAA2B,CAAY,QAAA,KAAA;AAC3C,EAAA,OAAO,QAAS,CAAA,KAAA,CAAM,GAAG,CAAA,CAAE,CAAC,CAAA;AAC9B,CAAA","file":"index.cjs","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createSharedClientContext } from \"@osdk/shared.client.impl\";\nimport { USER_AGENT } from \"./util/UserAgent.js\";\n/**\n * Creates a client that can only be used with Platform APIs.\n *\n * If you already have an OSDK Client (from `createClient`), you do not need to\n * create one of these - those clients can be used with Platform APIs as well.\n *\n * @param baseUrl\n * @param tokenProvider\n * @param options Currently unused, reserved for future use.\n * @param fetchFn\n * @returns\n */\nexport function createPlatformClient(baseUrl, tokenProvider, options = undefined, fetchFn = fetch) {\n return createSharedClientContext(baseUrl, tokenProvider, USER_AGENT, fetchFn);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport invariant from \"tiny-invariant\";\nconst isoRegex = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})?$/;\n\n/**\n * Extracts the date from a ISO 8601 formatted date time string. Throws if the input is not in the correct format.\n *\n * @param dateTime An ISO 8601 formatted date time string\n * @returns The date part of the input string\n */\nexport const extractDate = dateTime => {\n !(dateTime.length < 33) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Invalid date format. Provided input is too long.\") : invariant(false) : void 0;\n !isoRegex.test(dateTime) ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Invalid date format. Expected ISO 8601 format, but received ${dateTime}`) : invariant(false) : void 0;\n return extractDateFromIsoString(dateTime);\n};\n\n/**\n * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in UTC time.\n *\n * @param date\n * @returns The date part of a ISO 8601 formatted date time string\n */\nexport const extractDateInUTC = date => {\n return extractDateFromIsoString(date.toISOString());\n};\n\n/**\n * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in the local time zone.\n *\n * @param date\n * @returns The date part of a ISO 8601 formatted date time string\n */\nexport const extractDateInLocalTime = date => {\n return extractDateFromIsoString(generateOffsetUtcString(date));\n};\n\n/** @internal */\nexport const generateOffsetUtcString = date => {\n const offsetMs = date.getTimezoneOffset() * 60 * 1000;\n return new Date(date.getTime() - offsetMs).toISOString();\n};\nconst extractDateFromIsoString = dateTime => {\n return dateTime.split(\"T\")[0];\n};"]}
@@ -1,18 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var chunkVDP26RI3_cjs = require('../chunk-VDP26RI3.cjs');
3
+ var chunkL3OU54Q5_cjs = require('../chunk-L3OU54Q5.cjs');
4
+ require('../chunk-Q7SFCCGT.cjs');
4
5
 
5
6
  // src/public-utils/createAndFetchTempObjectSetRid.ts
6
7
  async function createAndFetchTempObjectSetRid(client, objectSet) {
7
- const response = await chunkVDP26RI3_cjs.OntologyObjectSet_exports.createTemporary(client, await client[chunkVDP26RI3_cjs.additionalContext].ontologyRid, {
8
- objectSet: chunkVDP26RI3_cjs.getWireObjectSet(objectSet)
8
+ const response = await chunkL3OU54Q5_cjs.OntologyObjectSet_exports.createTemporary(client, await client[chunkL3OU54Q5_cjs.additionalContext].ontologyRid, {
9
+ objectSet: chunkL3OU54Q5_cjs.getWireObjectSet(objectSet)
9
10
  });
10
11
  return response.objectSetRid;
11
12
  }
12
13
 
13
14
  // src/public-utils/hydrateObjectSetFromObjectRids.ts
14
15
  function hydrateObjectSetFromObjectRids(client, definition, rids) {
15
- return chunkVDP26RI3_cjs.createObjectSet(definition, client[chunkVDP26RI3_cjs.additionalContext], {
16
+ return chunkL3OU54Q5_cjs.createObjectSet(definition, client[chunkL3OU54Q5_cjs.additionalContext], {
16
17
  type: "intersect",
17
18
  objectSets: [{
18
19
  type: "base",
@@ -29,7 +30,7 @@ function asMutableArray(array) {
29
30
 
30
31
  // src/public-utils/hydrateObjectSetFromRid.ts
31
32
  function hydrateObjectSetFromRid(client, definition, rid) {
32
- return chunkVDP26RI3_cjs.createObjectSet(definition, client[chunkVDP26RI3_cjs.additionalContext], {
33
+ return chunkL3OU54Q5_cjs.createObjectSet(definition, client[chunkL3OU54Q5_cjs.additionalContext], {
33
34
  type: "intersect",
34
35
  objectSets: [definition.type === "interface" ? {
35
36
  type: "interfaceBase",
@@ -70,7 +71,7 @@ var levelStyles = {
70
71
  color: "orange"
71
72
  })
72
73
  };
73
- var BrowserLogger = class _BrowserLogger extends chunkVDP26RI3_cjs.BaseLogger {
74
+ var BrowserLogger = class _BrowserLogger extends chunkL3OU54Q5_cjs.BaseLogger {
74
75
  constructor(bindings = {}, options = {}) {
75
76
  super(bindings, {
76
77
  ...options,
@@ -96,11 +97,11 @@ var BrowserLogger = class _BrowserLogger extends chunkVDP26RI3_cjs.BaseLogger {
96
97
 
97
98
  Object.defineProperty(exports, "MinimalLogger", {
98
99
  enumerable: true,
99
- get: function () { return chunkVDP26RI3_cjs.MinimalLogger; }
100
+ get: function () { return chunkL3OU54Q5_cjs.MinimalLogger; }
100
101
  });
101
102
  Object.defineProperty(exports, "hydrateAttachmentFromRid", {
102
103
  enumerable: true,
103
- get: function () { return chunkVDP26RI3_cjs.hydrateAttachmentFromRid; }
104
+ get: function () { return chunkL3OU54Q5_cjs.hydrateAttachmentFromRid; }
104
105
  });
105
106
  exports.BrowserLogger = BrowserLogger;
106
107
  exports.createAndFetchTempObjectSetRid = createAndFetchTempObjectSetRid;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/public-utils/createAndFetchTempObjectSetRid.ts","../../../src/public-utils/hydrateObjectSetFromObjectRids.ts","../../../src/public-utils/hydrateObjectSetFromRid.ts","../../../src/logger/BrowserLogger.ts"],"names":["OntologyObjectSet_exports","additionalContext","getWireObjectSet","createObjectSet","BaseLogger"],"mappings":";;;;;AA2BA,eAAsB,8BAAA,CAA+B,QAAQ,SAAW,EAAA;AACtE,EAAM,MAAA,QAAA,GAAW,MAAMA,2CAAmB,CAAA,eAAA,CAAgB,QAAQ,MAAM,MAAA,CAAOC,mCAAiB,CAAA,CAAE,WAAa,EAAA;AAAA,IAC7G,SAAA,EAAWC,mCAAiB,SAAS;AAAA,GACtC,CAAA;AACD,EAAA,OAAO,QAAS,CAAA,YAAA;AAClB;;;ACNO,SAAS,8BAAA,CAA+B,MAAQ,EAAA,UAAA,EAAY,IAAM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IAAI,CAAE,CAAA,IAAA,CAAK,IAAK,CAAA,GAAG,CAAG,EAAA,GAAG,MAAQ,EAAA,GAAG,IAAI,CAAA;AAAA,KAC/E;AAAA;AAEJ","file":"internal.cjs","sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OntologyObjectSets } from \"@osdk/foundry.ontologies\";\nimport { additionalContext } from \"../Client.js\";\nimport { getWireObjectSet } from \"../objectSet/createObjectSet.js\";\n\n/**\n * Fetches a temporary object set RID from the Foundry stack for the given object set.\n *\n * @param client - An OSDK client.\n * @param objectSet - The object set to fetch a RID for.\n * @returns A promise that resolves to the RID of the temporary object set.\n */\nexport async function createAndFetchTempObjectSetRid(client, objectSet) {\n const response = await OntologyObjectSets.createTemporary(client, await client[additionalContext].ontologyRid, {\n objectSet: getWireObjectSet(objectSet)\n });\n return response.objectSetRid;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { additionalContext } from \"../Client.js\";\nimport { createObjectSet } from \"../objectSet/createObjectSet.js\";\n\n/**\n * Creates an OSDK object set from object RIDs.\n * @param client - An OSDK client.\n * @param definition - An OSDK object or interface definition.\n * @param rids - An array of object RIDs.\n * @returns An OSDK object set.\n */\nexport function hydrateObjectSetFromObjectRids(client, definition, rids) {\n return createObjectSet(definition, client[additionalContext], {\n type: \"intersect\",\n objectSets: [{\n type: \"base\",\n objectType: definition.apiName\n }, {\n type: \"static\",\n objects: asMutableArray(rids)\n }]\n });\n}\nfunction asMutableArray(array) {\n return array;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { additionalContext } from \"../Client.js\";\nimport { createObjectSet } from \"../objectSet/createObjectSet.js\";\n\n/**\n * Creates an OSDK object set from an object set RID.\n * @param client - An OSDK client.\n * @param definition - An OSDK object or interface definition.\n * @param rid - The RID of an object set.\n * @returns An OSDK object set.\n */\nexport function hydrateObjectSetFromRid(client, definition, rid) {\n return createObjectSet(definition, client[additionalContext], {\n type: \"intersect\",\n objectSets: [definition.type === \"interface\" ? {\n type: \"interfaceBase\",\n interfaceType: definition.apiName\n } : {\n type: \"base\",\n objectType: definition.apiName\n }, {\n type: \"reference\",\n reference: rid\n }]\n });\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BaseLogger } from \"./BaseLogger.js\";\nfunction createStyle({\n color\n}) {\n return `color: ${color}; border: 1px solid ${color}; padding: 2px; border-radius: 3px;`;\n}\nconst levelStyles = {\n debug: createStyle({\n color: \"LightBlue\"\n }),\n error: createStyle({\n color: \"red\"\n }),\n fatal: createStyle({\n color: \"red\"\n }),\n info: createStyle({\n color: \"green\"\n }),\n trace: createStyle({\n color: \"gray\"\n }),\n warn: createStyle({\n color: \"orange\"\n })\n};\nexport class BrowserLogger extends BaseLogger {\n constructor(bindings = {}, options = {}) {\n super(bindings, {\n ...options,\n level: options.level ?? \"error\"\n }, BrowserLogger);\n }\n createLogMethod(name, bindings) {\n const msgs = [`%c${name}%c`];\n const styles = [levelStyles[name], \"\"];\n if (this.options?.msgPrefix) {\n msgs.push(`%c${this.options.msgPrefix}%c`);\n styles.push(\"font-style: italic; color: gray\", \"\");\n }\n if (typeof bindings === \"object\" && \"methodName\" in bindings) {\n msgs.push(`%c.${bindings.methodName}()%c`);\n styles.push(\"font-style: italic;color: orchid\", \"\");\n }\n return (...args) => {\n // eslint-disable-next-line no-console\n console[name === \"fatal\" ? \"error\" : name](msgs.join(\" \"), ...styles, ...args);\n };\n }\n}"]}
1
+ {"version":3,"sources":["../../../src/public-utils/createAndFetchTempObjectSetRid.ts","../../../src/public-utils/hydrateObjectSetFromObjectRids.ts","../../../src/public-utils/hydrateObjectSetFromRid.ts","../../../src/logger/BrowserLogger.ts"],"names":["OntologyObjectSet_exports","additionalContext","getWireObjectSet","createObjectSet","BaseLogger"],"mappings":";;;;;;AA2BA,eAAsB,8BAAA,CAA+B,QAAQ,SAAW,EAAA;AACtE,EAAM,MAAA,QAAA,GAAW,MAAMA,2CAAmB,CAAA,eAAA,CAAgB,QAAQ,MAAM,MAAA,CAAOC,mCAAiB,CAAA,CAAE,WAAa,EAAA;AAAA,IAC7G,SAAA,EAAWC,mCAAiB,SAAS;AAAA,GACtC,CAAA;AACD,EAAA,OAAO,QAAS,CAAA,YAAA;AAClB;;;ACN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AA,OAAA,CAAQ,IAAS,KAAA,OAAA,GAAU,OAAU,GAAA,IAAI,CAAE,CAAA,IAAA,CAAK,IAAK,CAAA,GAAG,CAAG,EAAA,GAAG,MAAQ,EAAA,GAAG,IAAI,CAAA;AAAA,KAC/E;AAAA;AAEJ","file":"internal.cjs","sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OntologyObjectSets } from \"@osdk/foundry.ontologies\";\nimport { additionalContext } from \"../Client.js\";\nimport { getWireObjectSet } from \"../objectSet/createObjectSet.js\";\n\n/**\n * Fetches a temporary object set RID from the Foundry stack for the given object set.\n *\n * @param client - An OSDK client.\n * @param objectSet - The object set to fetch a RID for.\n * @returns A promise that resolves to the RID of the temporary object set.\n */\nexport async function createAndFetchTempObjectSetRid(client, objectSet) {\n const response = await OntologyObjectSets.createTemporary(client, await client[additionalContext].ontologyRid, {\n objectSet: getWireObjectSet(objectSet)\n });\n return response.objectSetRid;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { additionalContext } from \"../Client.js\";\nimport { createObjectSet } from \"../objectSet/createObjectSet.js\";\n\n/**\n * Creates an OSDK object set from object RIDs.\n * @param client - An OSDK client.\n * @param definition - An OSDK object or interface definition.\n * @param rids - An array of object RIDs.\n * @returns An OSDK object set.\n */\nexport function hydrateObjectSetFromObjectRids(client, definition, rids) {\n return createObjectSet(definition, client[additionalContext], {\n type: \"intersect\",\n objectSets: [{\n type: \"base\",\n objectType: definition.apiName\n }, {\n type: \"static\",\n objects: asMutableArray(rids)\n }]\n });\n}\nfunction asMutableArray(array) {\n return array;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { additionalContext } from \"../Client.js\";\nimport { createObjectSet } from \"../objectSet/createObjectSet.js\";\n\n/**\n * Creates an OSDK object set from an object set RID.\n * @param client - An OSDK client.\n * @param definition - An OSDK object or interface definition.\n * @param rid - The RID of an object set.\n * @returns An OSDK object set.\n */\nexport function hydrateObjectSetFromRid(client, definition, rid) {\n return createObjectSet(definition, client[additionalContext], {\n type: \"intersect\",\n objectSets: [definition.type === \"interface\" ? {\n type: \"interfaceBase\",\n interfaceType: definition.apiName\n } : {\n type: \"base\",\n objectType: definition.apiName\n }, {\n type: \"reference\",\n reference: rid\n }]\n });\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BaseLogger } from \"./BaseLogger.js\";\nfunction createStyle({\n color\n}) {\n return `color: ${color}; border: 1px solid ${color}; padding: 2px; border-radius: 3px;`;\n}\nconst levelStyles = {\n debug: createStyle({\n color: \"LightBlue\"\n }),\n error: createStyle({\n color: \"red\"\n }),\n fatal: createStyle({\n color: \"red\"\n }),\n info: createStyle({\n color: \"green\"\n }),\n trace: createStyle({\n color: \"gray\"\n }),\n warn: createStyle({\n color: \"orange\"\n })\n};\nexport class BrowserLogger extends BaseLogger {\n constructor(bindings = {}, options = {}) {\n super(bindings, {\n ...options,\n level: options.level ?? \"error\"\n }, BrowserLogger);\n }\n createLogMethod(name, bindings) {\n const msgs = [`%c${name}%c`];\n const styles = [levelStyles[name], \"\"];\n if (this.options?.msgPrefix) {\n msgs.push(`%c${this.options.msgPrefix}%c`);\n styles.push(\"font-style: italic; color: gray\", \"\");\n }\n if (typeof bindings === \"object\" && \"methodName\" in bindings) {\n msgs.push(`%c.${bindings.methodName}()%c`);\n styles.push(\"font-style: italic;color: orchid\", \"\");\n }\n return (...args) => {\n // eslint-disable-next-line no-console\n console[name === \"fatal\" ? \"error\" : name](msgs.join(\" \"), ...styles, ...args);\n };\n }\n}"]}
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkZU44HMSL_cjs = require('../chunk-ZU44HMSL.cjs');
4
- var chunkVDP26RI3_cjs = require('../chunk-VDP26RI3.cjs');
3
+ var chunk6HUH5WJA_cjs = require('../chunk-6HUH5WJA.cjs');
4
+ var chunkL3OU54Q5_cjs = require('../chunk-L3OU54Q5.cjs');
5
+ require('../chunk-Q7SFCCGT.cjs');
5
6
  var shared_net_fetch = require('@osdk/shared.net.fetch');
6
7
  var rxjs = require('rxjs');
7
8
  var invariant2 = require('tiny-invariant');
@@ -33,61 +34,6 @@ var ObservableClientImpl = class {
33
34
  process.env.NODE_ENV !== "production" && false;
34
35
  var DEBUG_CACHE_KEYS = process.env.NODE_ENV !== "production" && false;
35
36
 
36
- // ../../node_modules/.pnpm/delay@6.0.0/node_modules/delay/index.js
37
- var createAbortError = () => {
38
- const error = new Error("Delay aborted");
39
- error.name = "AbortError";
40
- return error;
41
- };
42
- var clearMethods = /* @__PURE__ */ new WeakMap();
43
- function createDelay({
44
- clearTimeout: defaultClear,
45
- setTimeout: defaultSet
46
- } = {}) {
47
- return (milliseconds, {
48
- value,
49
- signal
50
- } = {}) => {
51
- if (signal?.aborted) {
52
- return Promise.reject(createAbortError());
53
- }
54
- let timeoutId;
55
- let settle;
56
- let rejectFunction;
57
- const clear = defaultClear ?? clearTimeout;
58
- const signalListener = () => {
59
- clear(timeoutId);
60
- rejectFunction(createAbortError());
61
- };
62
- const cleanup = () => {
63
- if (signal) {
64
- signal.removeEventListener("abort", signalListener);
65
- }
66
- };
67
- const delayPromise = new Promise((resolve, reject) => {
68
- settle = () => {
69
- cleanup();
70
- resolve(value);
71
- };
72
- rejectFunction = reject;
73
- timeoutId = (defaultSet ?? setTimeout)(settle, milliseconds);
74
- });
75
- if (signal) {
76
- signal.addEventListener("abort", signalListener, {
77
- once: true
78
- });
79
- }
80
- clearMethods.set(delayPromise, () => {
81
- clear(timeoutId);
82
- timeoutId = null;
83
- settle();
84
- });
85
- return delayPromise;
86
- };
87
- }
88
- var delay = createDelay();
89
- var delay_default = delay;
90
-
91
37
  // src/observable/internal/OptimisticId.ts
92
38
  function createOptimisticId() {
93
39
  if (process.env.NODE_ENV !== "production") {
@@ -139,7 +85,7 @@ var OptimisticJob = class {
139
85
  return this;
140
86
  },
141
87
  createObject(type, pk, properties) {
142
- const create = store.client[chunkVDP26RI3_cjs.additionalContext].objectFactory2(store.client[chunkVDP26RI3_cjs.additionalContext], [{
88
+ const create = store.client[chunkL3OU54Q5_cjs.additionalContext].objectFactory2(store.client[chunkL3OU54Q5_cjs.additionalContext], [{
143
89
  $primaryKey: pk,
144
90
  $apiName: type.apiName,
145
91
  $objectType: type.apiName,
@@ -206,7 +152,8 @@ var ActionApplication = class {
206
152
  if (process.env.NODE_ENV !== "production") {
207
153
  if (ACTION_DELAY > 0) {
208
154
  logger?.debug("action done, pausing", actionResults);
209
- await delay_default(ACTION_DELAY);
155
+ const delay = (await import('../delay-QK4T7RVX.cjs')).default;
156
+ await delay(ACTION_DELAY);
210
157
  logger?.debug("action done, pausing done");
211
158
  }
212
159
  }
@@ -619,7 +566,7 @@ var BulkObjectLoader = class {
619
566
  #maxEntries;
620
567
  constructor(client, maxWait = 25, maxEntries = 100) {
621
568
  this.#client = client;
622
- this.#logger = client[chunkVDP26RI3_cjs.additionalContext].logger;
569
+ this.#logger = client[chunkL3OU54Q5_cjs.additionalContext].logger;
623
570
  this.#maxWait = maxWait;
624
571
  this.#maxEntries = maxEntries;
625
572
  }
@@ -689,7 +636,7 @@ var Query = class {
689
636
  this.cacheKey = cacheKey;
690
637
  this.store = store;
691
638
  this.#subject = observable;
692
- this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkVDP26RI3_cjs.additionalContext].logger : store.client[chunkVDP26RI3_cjs.additionalContext].logger?.child({}, {
639
+ this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkL3OU54Q5_cjs.additionalContext].logger : store.client[chunkL3OU54Q5_cjs.additionalContext].logger?.child({}, {
693
640
  msgPrefix: process.env.NODE_ENV !== "production" ? `Query<${cacheKey.type}, ${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>` : "Query"
694
641
  }));
695
642
  }
@@ -799,7 +746,7 @@ var ObjectQuery = class extends Query {
799
746
  #apiName;
800
747
  #pk;
801
748
  constructor(store, subject, type, pk, cacheKey, opts) {
802
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkVDP26RI3_cjs.additionalContext].logger?.child({}, {
749
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkL3OU54Q5_cjs.additionalContext].logger?.child({}, {
803
750
  msgPrefix: `ObjectQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
804
751
  }) : void 0);
805
752
  this.#apiName = type;
@@ -984,7 +931,7 @@ var ListQuery = class extends BaseListQuery {
984
931
  #objectSet;
985
932
  #sortFns;
986
933
  constructor(store, subject, apiType, apiName, whereClause, orderBy, cacheKey, opts) {
987
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkVDP26RI3_cjs.additionalContext].logger?.child({}, {
934
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkL3OU54Q5_cjs.additionalContext].logger?.child({}, {
988
935
  msgPrefix: `ListQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
989
936
  }) : void 0);
990
937
  this.#type = apiType;
@@ -1229,7 +1176,7 @@ var ListQuery = class extends BaseListQuery {
1229
1176
  }
1230
1177
  #extractRelevantObjectsForTypeInterface(changes) {
1231
1178
  const matchesApiName = ([, object]) => {
1232
- return this.#apiName in object[chunkZU44HMSL_cjs.ObjectDefRef].interfaceMap;
1179
+ return this.#apiName in object[chunk6HUH5WJA_cjs.ObjectDefRef].interfaceMap;
1233
1180
  };
1234
1181
  const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.#apiName));
1235
1182
  const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.#apiName));
@@ -1405,7 +1352,7 @@ function createOrderBySortFns(orderBy) {
1405
1352
  async function reloadDataAsFullObjects(client, data) {
1406
1353
  const groups = groupBy__default.default(data, (x) => x.$objectType);
1407
1354
  const objectTypeToPrimaryKeyToObject = Object.fromEntries(await Promise.all(Object.entries(groups).map(async ([apiName, objects]) => {
1408
- const objectDef = objects[0][chunkZU44HMSL_cjs.UnderlyingOsdkObject][chunkZU44HMSL_cjs.ObjectDefRef];
1355
+ const objectDef = objects[0][chunk6HUH5WJA_cjs.UnderlyingOsdkObject][chunk6HUH5WJA_cjs.ObjectDefRef];
1409
1356
  const where = {
1410
1357
  [objectDef.primaryKeyApiName]: {
1411
1358
  $in: objects.map((x) => x.$primaryKey)
@@ -1613,7 +1560,7 @@ var Store = class {
1613
1560
  #finalizationRegistry;
1614
1561
  constructor(client) {
1615
1562
  this.client = client;
1616
- this.logger = client[chunkVDP26RI3_cjs.additionalContext].logger?.child({}, {
1563
+ this.logger = client[chunkL3OU54Q5_cjs.additionalContext].logger?.child({}, {
1617
1564
  msgPrefix: "Store"
1618
1565
  });
1619
1566
  this.#topLayer = this.#truthLayer;
@@ -1914,10 +1861,10 @@ var Store = class {
1914
1861
 
1915
1862
  // src/observable/ObservableClient.ts
1916
1863
  function createObservableClient(client) {
1917
- const tweakedClient = chunkZU44HMSL_cjs.createClientFromContext({
1918
- ...client[chunkVDP26RI3_cjs.additionalContext],
1919
- fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkVDP26RI3_cjs.additionalContext].fetch, (headers) => {
1920
- headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkZU44HMSL_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
1864
+ const tweakedClient = chunk6HUH5WJA_cjs.createClientFromContext({
1865
+ ...client[chunkL3OU54Q5_cjs.additionalContext],
1866
+ fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkL3OU54Q5_cjs.additionalContext].fetch, (headers) => {
1867
+ headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunk6HUH5WJA_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
1921
1868
  return headers;
1922
1869
  })
1923
1870
  });
@@ -1960,11 +1907,11 @@ function getOsdkConfig(ontologyRid) {
1960
1907
 
1961
1908
  Object.defineProperty(exports, "createClientWithTransaction", {
1962
1909
  enumerable: true,
1963
- get: function () { return chunkZU44HMSL_cjs.createClientWithTransaction; }
1910
+ get: function () { return chunk6HUH5WJA_cjs.createClientWithTransaction; }
1964
1911
  });
1965
1912
  Object.defineProperty(exports, "augment", {
1966
1913
  enumerable: true,
1967
- get: function () { return chunkVDP26RI3_cjs.augment; }
1914
+ get: function () { return chunkL3OU54Q5_cjs.augment; }
1968
1915
  });
1969
1916
  exports.createObservableClient = createObservableClient;
1970
1917
  exports.getMetaTagContent = getMetaTagContent;