@osdk/client 2.2.0-beta.11 → 2.2.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.
Files changed (166) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/build/browser/actions/actions.test.js +1 -1
  3. package/build/browser/actions/actions.test.js.map +1 -1
  4. package/build/browser/index.js +1 -1
  5. package/build/browser/index.js.map +1 -1
  6. package/build/browser/logger/TestLogger.js +59 -0
  7. package/build/browser/logger/TestLogger.js.map +1 -0
  8. package/build/browser/object/attachment.test.js.map +1 -1
  9. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +4 -0
  10. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  11. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +44 -33
  12. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  13. package/build/browser/object/convertWireToOsdkObjects.js +4 -9
  14. package/build/browser/object/convertWireToOsdkObjects.js.map +1 -1
  15. package/build/browser/object/convertWireToOsdkObjects.test.js +29 -25
  16. package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
  17. package/build/browser/object/fetchPage.js +4 -3
  18. package/build/browser/object/fetchPage.js.map +1 -1
  19. package/build/browser/object/object.test.js +17 -1
  20. package/build/browser/object/object.test.js.map +1 -1
  21. package/build/browser/object/timeseries.test.js.map +1 -1
  22. package/build/browser/objectSet/ObjectSet.test.js +98 -1
  23. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  24. package/build/browser/objectSet/ObjectSetListenerWebsocket.js +2 -2
  25. package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  26. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js +2 -3
  27. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
  28. package/build/browser/objectSet/createObjectSet.js +1 -0
  29. package/build/browser/objectSet/createObjectSet.js.map +1 -1
  30. package/build/browser/observable/internal/ActionApplication.js +4 -4
  31. package/build/browser/observable/internal/ActionApplication.js.map +1 -1
  32. package/build/browser/observable/internal/ObjectQuery.js +1 -1
  33. package/build/browser/observable/internal/ObjectQuery.js.map +1 -1
  34. package/build/browser/observable/internal/OptimisticJob.js +1 -1
  35. package/build/browser/observable/internal/OptimisticJob.js.map +1 -1
  36. package/build/browser/observable/internal/Store.js +2 -2
  37. package/build/browser/observable/internal/Store.js.map +1 -1
  38. package/build/browser/observable/internal/Store.test.js +173 -216
  39. package/build/browser/observable/internal/Store.test.js.map +1 -1
  40. package/build/browser/public/unstable-do-not-use.js +1 -0
  41. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  42. package/build/browser/public-utils/osdkConfig.js +49 -0
  43. package/build/browser/public-utils/osdkConfig.js.map +1 -0
  44. package/build/browser/{object/createObjectSpecifierFromPrimaryKey.js → public-utils/vite-env.d.ts} +2 -3
  45. package/build/browser/queries/applyQuery.js +3 -3
  46. package/build/browser/queries/applyQuery.js.map +1 -1
  47. package/build/browser/util/UserAgent.js +1 -1
  48. package/build/browser/util/extractRdpDefinition.js +87 -0
  49. package/build/browser/util/extractRdpDefinition.js.map +1 -0
  50. package/build/browser/util/extractRdpDefinition.test.js +144 -0
  51. package/build/browser/util/extractRdpDefinition.test.js.map +1 -0
  52. package/build/browser/util/objectSpecifierUtils.js +48 -0
  53. package/build/browser/util/objectSpecifierUtils.js.map +1 -0
  54. package/build/browser/util/objectSpecifierUtils.test.js +42 -0
  55. package/build/browser/util/objectSpecifierUtils.test.js.map +1 -0
  56. package/build/browser/util/toDataValueQueries.js +2 -4
  57. package/build/browser/util/toDataValueQueries.js.map +1 -1
  58. package/build/cjs/{chunk-EY52J5Z4.cjs → chunk-USHAX4EP.cjs} +89 -17
  59. package/build/cjs/chunk-USHAX4EP.cjs.map +1 -0
  60. package/build/cjs/{chunk-MCQVHD2F.cjs → chunk-VT3UM6EP.cjs} +17 -16
  61. package/build/cjs/chunk-VT3UM6EP.cjs.map +1 -0
  62. package/build/cjs/index.cjs +104 -95
  63. package/build/cjs/index.cjs.map +1 -1
  64. package/build/cjs/index.d.cts +11 -3
  65. package/build/cjs/public/internal.cjs +6 -7
  66. package/build/cjs/public/internal.cjs.map +1 -1
  67. package/build/cjs/public/unstable-do-not-use.cjs +103 -66
  68. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  69. package/build/cjs/public/unstable-do-not-use.d.cts +10 -1
  70. package/build/esm/actions/actions.test.js +1 -1
  71. package/build/esm/actions/actions.test.js.map +1 -1
  72. package/build/esm/index.js +1 -1
  73. package/build/esm/index.js.map +1 -1
  74. package/build/esm/logger/TestLogger.js +59 -0
  75. package/build/esm/logger/TestLogger.js.map +1 -0
  76. package/build/esm/object/attachment.test.js.map +1 -1
  77. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +4 -0
  78. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  79. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +44 -33
  80. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  81. package/build/esm/object/convertWireToOsdkObjects.js +4 -9
  82. package/build/esm/object/convertWireToOsdkObjects.js.map +1 -1
  83. package/build/esm/object/convertWireToOsdkObjects.test.js +29 -25
  84. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
  85. package/build/esm/object/fetchPage.js +4 -3
  86. package/build/esm/object/fetchPage.js.map +1 -1
  87. package/build/esm/object/object.test.js +17 -1
  88. package/build/esm/object/object.test.js.map +1 -1
  89. package/build/esm/object/timeseries.test.js.map +1 -1
  90. package/build/esm/objectSet/ObjectSet.test.js +98 -1
  91. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  92. package/build/esm/objectSet/ObjectSetListenerWebsocket.js +2 -2
  93. package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  94. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js +2 -3
  95. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -1
  96. package/build/esm/objectSet/createObjectSet.js +1 -0
  97. package/build/esm/objectSet/createObjectSet.js.map +1 -1
  98. package/build/esm/observable/internal/ActionApplication.js +4 -4
  99. package/build/esm/observable/internal/ActionApplication.js.map +1 -1
  100. package/build/esm/observable/internal/ObjectQuery.js +1 -1
  101. package/build/esm/observable/internal/ObjectQuery.js.map +1 -1
  102. package/build/esm/observable/internal/OptimisticJob.js +1 -1
  103. package/build/esm/observable/internal/OptimisticJob.js.map +1 -1
  104. package/build/esm/observable/internal/Store.js +2 -2
  105. package/build/esm/observable/internal/Store.js.map +1 -1
  106. package/build/esm/observable/internal/Store.test.js +173 -216
  107. package/build/esm/observable/internal/Store.test.js.map +1 -1
  108. package/build/esm/public/unstable-do-not-use.js +1 -0
  109. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  110. package/build/esm/public-utils/osdkConfig.js +49 -0
  111. package/build/esm/public-utils/osdkConfig.js.map +1 -0
  112. package/build/esm/{object/createObjectSpecifierFromPrimaryKey.js → public-utils/vite-env.d.ts} +2 -3
  113. package/build/esm/queries/applyQuery.js +3 -3
  114. package/build/esm/queries/applyQuery.js.map +1 -1
  115. package/build/esm/util/UserAgent.js +1 -1
  116. package/build/esm/util/extractRdpDefinition.js +87 -0
  117. package/build/esm/util/extractRdpDefinition.js.map +1 -0
  118. package/build/esm/util/extractRdpDefinition.test.js +144 -0
  119. package/build/esm/util/extractRdpDefinition.test.js.map +1 -0
  120. package/build/esm/util/objectSpecifierUtils.js +48 -0
  121. package/build/esm/util/objectSpecifierUtils.js.map +1 -0
  122. package/build/esm/util/objectSpecifierUtils.test.js +42 -0
  123. package/build/esm/util/objectSpecifierUtils.test.js.map +1 -0
  124. package/build/esm/util/toDataValueQueries.js +2 -4
  125. package/build/esm/util/toDataValueQueries.js.map +1 -1
  126. package/build/types/index.d.ts +1 -1
  127. package/build/types/index.d.ts.map +1 -1
  128. package/build/types/logger/TestLogger.d.ts +14 -0
  129. package/build/types/logger/TestLogger.d.ts.map +1 -0
  130. package/build/types/object/convertWireToOsdkObjects.d.ts +4 -4
  131. package/build/types/object/convertWireToOsdkObjects.d.ts.map +1 -1
  132. package/build/types/object/fetchPage.d.ts.map +1 -1
  133. package/build/types/object/object.test.d.ts.map +1 -1
  134. package/build/types/objectSet/ObjectSet.test.d.ts.map +1 -1
  135. package/build/types/observable/internal/ActionApplication.d.ts +2 -2
  136. package/build/types/observable/internal/ActionApplication.d.ts.map +1 -1
  137. package/build/types/observable/internal/OptimisticJob.d.ts.map +1 -1
  138. package/build/types/observable/internal/Store.d.ts +2 -2
  139. package/build/types/observable/internal/Store.d.ts.map +1 -1
  140. package/build/types/public/unstable-do-not-use.d.ts +2 -0
  141. package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
  142. package/build/types/public-utils/osdkConfig.d.ts +8 -0
  143. package/build/types/public-utils/osdkConfig.d.ts.map +1 -0
  144. package/build/types/public-utils/vite-env.d.d.ts +3 -0
  145. package/build/types/public-utils/vite-env.d.d.ts.map +1 -0
  146. package/build/types/queries/applyQuery.d.ts +2 -2
  147. package/build/types/queries/applyQuery.d.ts.map +1 -1
  148. package/build/types/util/extractRdpDefinition.d.ts +4 -0
  149. package/build/types/util/extractRdpDefinition.d.ts.map +1 -0
  150. package/build/types/util/extractRdpDefinition.test.d.ts +1 -0
  151. package/build/types/util/extractRdpDefinition.test.d.ts.map +1 -0
  152. package/build/types/util/objectSpecifierUtils.d.ts +24 -0
  153. package/build/types/util/objectSpecifierUtils.d.ts.map +1 -0
  154. package/build/types/util/objectSpecifierUtils.test.d.ts +1 -0
  155. package/build/types/util/objectSpecifierUtils.test.d.ts.map +1 -0
  156. package/package.json +11 -11
  157. package/build/browser/object/createObjectSpecifierFromPrimaryKey.js.map +0 -1
  158. package/build/cjs/chunk-EY52J5Z4.cjs.map +0 -1
  159. package/build/cjs/chunk-MCQVHD2F.cjs.map +0 -1
  160. package/build/cjs/chunk-Q7SFCCGT.cjs +0 -11
  161. package/build/cjs/chunk-Q7SFCCGT.cjs.map +0 -1
  162. package/build/cjs/graphql-RGM5SRWV.cjs +0 -10532
  163. package/build/cjs/graphql-RGM5SRWV.cjs.map +0 -1
  164. package/build/esm/object/createObjectSpecifierFromPrimaryKey.js.map +0 -1
  165. package/build/types/object/createObjectSpecifierFromPrimaryKey.d.ts +0 -2
  166. package/build/types/object/createObjectSpecifierFromPrimaryKey.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { ActionValidationResponse, AttachmentUpload, ObjectOrInterfaceDefinition, PrimaryKeyType, ObjectSpecifier } from '@osdk/api';
1
+ import { ActionValidationResponse, AttachmentUpload, ObjectTypeDefinition, PrimaryKeyType, ObjectSpecifier } from '@osdk/api';
2
2
  export { ActionDefinition, ActionEditResponse, ActionMetadata, ActionParam, ActionReturnTypeForOptions, ActionValidationResponse, ApplyActionOptions, ApplyBatchActionOptions, InterfaceDefinition, ObjectMetadata, ObjectSet, ObjectSpecifier, ObjectTypeDefinition, Osdk, OsdkObject, PageResult, PropertyDef, PropertyKeys, PropertyValueWireToClient, QueryDefinition, QueryParam, QueryResult, Result, SingleLinkAccessor, VersionBound, WhereClause, isOk } from '@osdk/api';
3
3
  export { PalantirApiError } from '@osdk/shared.net.errors';
4
4
  import { C as Client } from './Client-DBTcM9gB.cjs';
@@ -51,8 +51,6 @@ declare function createPlatformClient(baseUrl: string, tokenProvider: () => Prom
51
51
 
52
52
  declare function createAttachmentUpload(data: Blob, name: string): AttachmentUpload;
53
53
 
54
- declare function createObjectSpecifierFromPrimaryKey<Q extends ObjectOrInterfaceDefinition>(def: Q, primaryKey: PrimaryKeyType<Q>): ObjectSpecifier<Q>;
55
-
56
54
  type ResultOrError<T extends object> = ({
57
55
  type: "ok";
58
56
  err?: never;
@@ -62,6 +60,16 @@ type ResultOrError<T extends object> = ({
62
60
  err?: unknown;
63
61
  };
64
62
 
63
+ /**
64
+ * Creates an Object Specifier. An ObjectSpecifier is a string that uniquely identifies an object in the system,
65
+ * even when loading an interface object where primary key uniqueness is not guaranteed.
66
+ *
67
+ * @param objectDef - An Object Type Definition
68
+ * @param primaryKey - The value you want to use as the primary key
69
+ * @returns An Object Specifier
70
+ */
71
+ declare function createObjectSpecifierFromPrimaryKey<Q extends ObjectTypeDefinition>(objectDef: Q, primaryKey: PrimaryKeyType<Q>): ObjectSpecifier<Q>;
72
+
65
73
  /**
66
74
  * Extracts the date from a ISO 8601 formatted date time string. Throws if the input is not in the correct format.
67
75
  *
@@ -1,20 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var chunkMCQVHD2F_cjs = require('../chunk-MCQVHD2F.cjs');
4
- var chunkEY52J5Z4_cjs = require('../chunk-EY52J5Z4.cjs');
5
- require('../chunk-Q7SFCCGT.cjs');
3
+ var chunkVT3UM6EP_cjs = require('../chunk-VT3UM6EP.cjs');
4
+ var chunkUSHAX4EP_cjs = require('../chunk-USHAX4EP.cjs');
6
5
 
7
6
  // src/public-utils/createAndFetchTempObjectSetRid.ts
8
7
  async function createAndFetchTempObjectSetRid(client, objectSet) {
9
- const response = await chunkEY52J5Z4_cjs.OntologyObjectSet_exports.createTemporary(client, await client[chunkEY52J5Z4_cjs.additionalContext].ontologyRid, {
10
- objectSet: chunkMCQVHD2F_cjs.getWireObjectSet(objectSet)
8
+ const response = await chunkUSHAX4EP_cjs.OntologyObjectSet_exports.createTemporary(client, await client[chunkUSHAX4EP_cjs.additionalContext].ontologyRid, {
9
+ objectSet: chunkVT3UM6EP_cjs.getWireObjectSet(objectSet)
11
10
  });
12
11
  return response.objectSetRid;
13
12
  }
14
13
 
15
14
  // src/public-utils/hydrateObjectSetFromRid.ts
16
15
  function hydrateObjectSetFromRid(client, definition, rid) {
17
- return chunkMCQVHD2F_cjs.createObjectSet(definition, client[chunkEY52J5Z4_cjs.additionalContext], {
16
+ return chunkVT3UM6EP_cjs.createObjectSet(definition, client[chunkUSHAX4EP_cjs.additionalContext], {
18
17
  type: "intersect",
19
18
  objectSets: [{
20
19
  type: "base",
@@ -28,7 +27,7 @@ function hydrateObjectSetFromRid(client, definition, rid) {
28
27
 
29
28
  Object.defineProperty(exports, "hydrateAttachmentFromRid", {
30
29
  enumerable: true,
31
- get: function () { return chunkMCQVHD2F_cjs.hydrateAttachmentFromRid; }
30
+ get: function () { return chunkVT3UM6EP_cjs.hydrateAttachmentFromRid; }
32
31
  });
33
32
  exports.createAndFetchTempObjectSetRid = createAndFetchTempObjectSetRid;
34
33
  exports.hydrateObjectSetFromRid = hydrateObjectSetFromRid;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/public-utils/createAndFetchTempObjectSetRid.ts","../../../src/public-utils/hydrateObjectSetFromRid.ts"],"names":["OntologyObjectSet_exports","additionalContext","getWireObjectSet","createObjectSet"],"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,uBAAA,CAAwB,MAAQ,EAAA,UAAA,EAAY,GAAK,EAAA;AAC/D,EAAA,OAAOC,iCAAgB,CAAA,UAAA,EAAY,MAAO,CAAAF,mCAAiB,CAAG,EAAA;AAAA,IAC5D,IAAM,EAAA,WAAA;AAAA,IACN,YAAY,CAAC;AAAA,MACX,IAAM,EAAA,MAAA;AAAA,MACN,YAAY,UAAW,CAAA;AAAA,KACtB,EAAA;AAAA,MACD,IAAM,EAAA,WAAA;AAAA,MACN,SAAW,EAAA;AAAA,KACZ;AAAA,GACF,CAAA;AACH","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 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: [{\n type: \"base\",\n objectType: definition.apiName\n }, {\n type: \"reference\",\n reference: rid\n }]\n });\n}"]}
1
+ {"version":3,"sources":["../../../src/public-utils/createAndFetchTempObjectSetRid.ts","../../../src/public-utils/hydrateObjectSetFromRid.ts"],"names":["OntologyObjectSet_exports","additionalContext","getWireObjectSet","createObjectSet"],"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,uBAAA,CAAwB,MAAQ,EAAA,UAAA,EAAY,GAAK,EAAA;AAC/D,EAAA,OAAOC,iCAAgB,CAAA,UAAA,EAAY,MAAO,CAAAF,mCAAiB,CAAG,EAAA;AAAA,IAC5D,IAAM,EAAA,WAAA;AAAA,IACN,YAAY,CAAC;AAAA,MACX,IAAM,EAAA,MAAA;AAAA,MACN,YAAY,UAAW,CAAA;AAAA,KACtB,EAAA;AAAA,MACD,IAAM,EAAA,WAAA;AAAA,MACN,SAAW,EAAA;AAAA,KACZ;AAAA,GACF,CAAA;AACH","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 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: [{\n type: \"base\",\n objectType: definition.apiName\n }, {\n type: \"reference\",\n reference: rid\n }]\n });\n}"]}
@@ -1,8 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkT4NIFYZS_cjs = require('../chunk-T4NIFYZS.cjs');
4
- var chunkEY52J5Z4_cjs = require('../chunk-EY52J5Z4.cjs');
5
- require('../chunk-Q7SFCCGT.cjs');
4
+ var chunkUSHAX4EP_cjs = require('../chunk-USHAX4EP.cjs');
6
5
  var rxjs = require('rxjs');
7
6
  var invariant2 = require('tiny-invariant');
8
7
  var mnemonist = require('mnemonist');
@@ -33,58 +32,60 @@ var ObservableClientImpl = class {
33
32
  process.env.NODE_ENV !== "production" && false;
34
33
  var DEBUG_CACHE_KEYS = process.env.NODE_ENV !== "production" && false;
35
34
 
36
- // ../../node_modules/.pnpm/is-node-process@1.2.0/node_modules/is-node-process/lib/index.mjs
37
- function isNodeProcess() {
38
- if (typeof navigator !== "undefined" && navigator.product === "ReactNative") {
39
- return true;
40
- }
41
- if (typeof process !== "undefined") {
42
- const type = process.type;
43
- if (type === "renderer" || type === "worker") {
44
- return false;
45
- }
46
- return !!(process.versions && process.versions.node);
47
- }
48
- return false;
49
- }
50
-
51
- // ../../node_modules/.pnpm/msw@2.7.3_@types+node@22.13.0_typescript@5.5.4/node_modules/msw/lib/core/delay.mjs
52
- var SET_TIMEOUT_MAX_ALLOWED_INT = 2147483647;
53
- var MIN_SERVER_RESPONSE_TIME = 100;
54
- var MAX_SERVER_RESPONSE_TIME = 400;
55
- var NODE_SERVER_RESPONSE_TIME = 5;
56
- function getRealisticResponseTime() {
57
- if (isNodeProcess()) {
58
- return NODE_SERVER_RESPONSE_TIME;
59
- }
60
- return Math.floor(Math.random() * (MAX_SERVER_RESPONSE_TIME - MIN_SERVER_RESPONSE_TIME) + MIN_SERVER_RESPONSE_TIME);
61
- }
62
- async function delay(durationOrMode) {
63
- let delayTime;
64
- if (typeof durationOrMode === "string") {
65
- switch (durationOrMode) {
66
- case "infinite": {
67
- delayTime = SET_TIMEOUT_MAX_ALLOWED_INT;
68
- break;
69
- }
70
- case "real": {
71
- delayTime = getRealisticResponseTime();
72
- break;
73
- }
74
- default: {
75
- throw new Error(`Failed to delay a response: unknown delay mode "${durationOrMode}". Please make sure you provide one of the supported modes ("real", "infinite") or a number.`);
35
+ // ../../node_modules/.pnpm/delay@6.0.0/node_modules/delay/index.js
36
+ var createAbortError = () => {
37
+ const error = new Error("Delay aborted");
38
+ error.name = "AbortError";
39
+ return error;
40
+ };
41
+ var clearMethods = /* @__PURE__ */ new WeakMap();
42
+ function createDelay({
43
+ clearTimeout: defaultClear,
44
+ setTimeout: defaultSet
45
+ } = {}) {
46
+ return (milliseconds, {
47
+ value,
48
+ signal
49
+ } = {}) => {
50
+ if (signal?.aborted) {
51
+ return Promise.reject(createAbortError());
52
+ }
53
+ let timeoutId;
54
+ let settle;
55
+ let rejectFunction;
56
+ const clear = defaultClear ?? clearTimeout;
57
+ const signalListener = () => {
58
+ clear(timeoutId);
59
+ rejectFunction(createAbortError());
60
+ };
61
+ const cleanup = () => {
62
+ if (signal) {
63
+ signal.removeEventListener("abort", signalListener);
76
64
  }
65
+ };
66
+ const delayPromise = new Promise((resolve, reject) => {
67
+ settle = () => {
68
+ cleanup();
69
+ resolve(value);
70
+ };
71
+ rejectFunction = reject;
72
+ timeoutId = (defaultSet ?? setTimeout)(settle, milliseconds);
73
+ });
74
+ if (signal) {
75
+ signal.addEventListener("abort", signalListener, {
76
+ once: true
77
+ });
77
78
  }
78
- } else if (typeof durationOrMode === "undefined") {
79
- delayTime = getRealisticResponseTime();
80
- } else {
81
- if (durationOrMode > SET_TIMEOUT_MAX_ALLOWED_INT) {
82
- throw new Error(`Failed to delay a response: provided delay duration (${durationOrMode}) exceeds the maximum allowed duration for "setTimeout" (${SET_TIMEOUT_MAX_ALLOWED_INT}). This will cause the response to be returned immediately. Please use a number within the allowed range to delay the response by exact duration, or consider the "infinite" delay mode to delay the response indefinitely.`);
83
- }
84
- delayTime = durationOrMode;
85
- }
86
- return new Promise((resolve) => setTimeout(resolve, delayTime));
79
+ clearMethods.set(delayPromise, () => {
80
+ clear(timeoutId);
81
+ timeoutId = null;
82
+ settle();
83
+ });
84
+ return delayPromise;
85
+ };
87
86
  }
87
+ var delay = createDelay();
88
+ var delay_default = delay;
88
89
 
89
90
  // src/observable/internal/CacheKey.ts
90
91
  function DEBUG_ONLY__cacheKeyToString(x) {
@@ -190,12 +191,12 @@ var OptimisticJob = class {
190
191
  return this;
191
192
  },
192
193
  createObject(type, pk, properties) {
193
- const create = store.client[chunkEY52J5Z4_cjs.additionalContext].objectFactory2(store.client[chunkEY52J5Z4_cjs.additionalContext], [{
194
+ const create = store.client[chunkUSHAX4EP_cjs.additionalContext].objectFactory2(store.client[chunkUSHAX4EP_cjs.additionalContext], [{
194
195
  $primaryKey: pk,
195
196
  $apiName: type.apiName,
196
197
  $objectType: type.apiName,
197
198
  ...properties
198
- }], undefined).then((objs) => {
199
+ }], undefined, {}).then((objs) => {
199
200
  return objs[0];
200
201
  });
201
202
  addedObjectPromises.push(create);
@@ -228,22 +229,22 @@ var ActionApplication = class {
228
229
  constructor(store) {
229
230
  this.store = store;
230
231
  }
231
- applyAction = (action, args, {
232
+ applyAction = async (action, args, {
232
233
  optimisticUpdate
233
234
  } = {}) => {
234
235
  const logger = process.env.NODE_ENV !== "production" ? this.store.logger?.child({
235
236
  methodName: "applyAction"
236
237
  }) : this.store.logger;
237
238
  const removeOptimisticResult = runOptimisticJob(this.store, optimisticUpdate);
238
- return (async () => {
239
+ return await (async () => {
239
240
  try {
240
241
  const actionResults = await this.store.client(action).applyAction(args, {
241
242
  $returnEdits: true
242
243
  });
243
244
  if (process.env.NODE_ENV !== "production") {
244
245
  if (ACTION_DELAY > 0) {
245
- logger?.debug("action done, pausing");
246
- await delay(ACTION_DELAY);
246
+ logger?.debug("action done, pausing", actionResults);
247
+ await delay_default(ACTION_DELAY);
247
248
  logger?.debug("action done, pausing done");
248
249
  }
249
250
  }
@@ -595,7 +596,7 @@ var BulkObjectLoader = class {
595
596
  #maxEntries;
596
597
  constructor(client, maxWait = 25, maxEntries = 100) {
597
598
  this.#client = client;
598
- this.#logger = client[chunkEY52J5Z4_cjs.additionalContext].logger;
599
+ this.#logger = client[chunkUSHAX4EP_cjs.additionalContext].logger;
599
600
  this.#maxWait = maxWait;
600
601
  this.#maxEntries = maxEntries;
601
602
  }
@@ -665,7 +666,7 @@ var Query = class {
665
666
  this.cacheKey = cacheKey;
666
667
  this.store = store;
667
668
  this.#subject = observable;
668
- this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkEY52J5Z4_cjs.additionalContext].logger : store.client[chunkEY52J5Z4_cjs.additionalContext].logger?.child({}, {
669
+ this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkUSHAX4EP_cjs.additionalContext].logger : store.client[chunkUSHAX4EP_cjs.additionalContext].logger?.child({}, {
669
670
  msgPrefix: process.env.NODE_ENV !== "production" ? `Query<${cacheKey.type}, ${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>` : "Query"
670
671
  }));
671
672
  }
@@ -772,7 +773,7 @@ var ObjectQuery = class extends Query {
772
773
  #apiName;
773
774
  #pk;
774
775
  constructor(store, subject, type, pk, cacheKey, opts) {
775
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkEY52J5Z4_cjs.additionalContext].logger?.child({}, {
776
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkUSHAX4EP_cjs.additionalContext].logger?.child({}, {
776
777
  msgPrefix: `ObjectQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
777
778
  }) : undefined);
778
779
  this.#apiName = type;
@@ -799,7 +800,7 @@ var ObjectQuery = class extends Query {
799
800
  if (process.env.NODE_ENV !== "production") {
800
801
  this.logger?.child({
801
802
  methodName: "_fetchAndStore"
802
- }).info("calling fetchOne");
803
+ }).info("calling _fetchAndStore");
803
804
  }
804
805
  const obj = await getBulkObjectLoader(this.store.client).fetch(this.#apiName, this.#pk);
805
806
  this.store.batch({}, (batch) => {
@@ -933,7 +934,7 @@ var ListQuery = class extends BaseListQuery {
933
934
  #objectSet;
934
935
  #sortFns;
935
936
  constructor(store, subject, apiType, apiName, whereClause, orderBy, cacheKey, opts) {
936
- super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkEY52J5Z4_cjs.additionalContext].logger?.child({}, {
937
+ super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkUSHAX4EP_cjs.additionalContext].logger?.child({}, {
937
938
  msgPrefix: `ListQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
938
939
  }) : undefined);
939
940
  this.#type = apiType;
@@ -1562,7 +1563,7 @@ var Store = class {
1562
1563
  #finalizationRegistry;
1563
1564
  constructor(client) {
1564
1565
  this.client = client;
1565
- this.logger = client[chunkEY52J5Z4_cjs.additionalContext].logger?.child({}, {
1566
+ this.logger = client[chunkUSHAX4EP_cjs.additionalContext].logger?.child({}, {
1566
1567
  msgPrefix: "Store"
1567
1568
  });
1568
1569
  this.#topLayer = this.#truthLayer;
@@ -1597,8 +1598,8 @@ var Store = class {
1597
1598
  this.#queries.get(key)?.dispose();
1598
1599
  this.#queries.delete(key);
1599
1600
  };
1600
- applyAction = (action, args, opts) => {
1601
- return new ActionApplication(this).applyAction(action, args, opts);
1601
+ applyAction = async (action, args, opts) => {
1602
+ return await new ActionApplication(this).applyAction(action, args, opts);
1602
1603
  };
1603
1604
  removeLayer(layerId) {
1604
1605
  !(layerId != null) ? process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "undefined is the reserved layerId for the truth layer") : invariant2__default.default(false) : undefined;
@@ -1856,10 +1857,46 @@ function createObservableClient(client) {
1856
1857
  return new ObservableClientImpl(new Store(client));
1857
1858
  }
1858
1859
 
1860
+ // src/public-utils/osdkConfig.ts
1861
+ function getMetaTagContent(name) {
1862
+ const element = document.querySelector(`meta[name="${name}"]`);
1863
+ const val = element ? element.getAttribute("content") : null;
1864
+ if (val == null) {
1865
+ throw new Error(`Missing meta tag: ${name}`);
1866
+ }
1867
+ return val;
1868
+ }
1869
+ function getViteEnvVar(name) {
1870
+ const val = undefined[name];
1871
+ if (val == null) {
1872
+ throw new Error(`Missing environment variable: ${name}`);
1873
+ }
1874
+ return val;
1875
+ }
1876
+ function isProduction() {
1877
+ return process.env.NODE_ENV === "production";
1878
+ }
1879
+ function getConfigValue(metaTagName, viteEnvVarName) {
1880
+ return isProduction() ? getMetaTagContent(metaTagName) : getViteEnvVar(viteEnvVarName);
1881
+ }
1882
+ function getOntologyRid(ontologyRid) {
1883
+ return isProduction() ? getMetaTagContent("osdk-ontologyRid") : ontologyRid;
1884
+ }
1885
+ function getOsdkConfig(ontologyRid) {
1886
+ return {
1887
+ clientId: getConfigValue("osdk-clientId", "VITE_FOUNDRY_CLIENT_ID"),
1888
+ redirectUrl: getConfigValue("osdk-redirectUrl", "VITE_FOUNDRY_REDIRECT_URL"),
1889
+ foundryUrl: getConfigValue("osdk-foundryUrl", "VITE_FOUNDRY_API_URL"),
1890
+ ontologyRid: getOntologyRid(ontologyRid)
1891
+ };
1892
+ }
1893
+
1859
1894
  Object.defineProperty(exports, "augment", {
1860
1895
  enumerable: true,
1861
- get: function () { return chunkEY52J5Z4_cjs.augment; }
1896
+ get: function () { return chunkUSHAX4EP_cjs.augment; }
1862
1897
  });
1863
1898
  exports.createObservableClient = createObservableClient;
1899
+ exports.getMetaTagContent = getMetaTagContent;
1900
+ exports.getOsdkConfig = getOsdkConfig;
1864
1901
  //# sourceMappingURL=unstable-do-not-use.cjs.map
1865
1902
  //# sourceMappingURL=unstable-do-not-use.cjs.map