@osdk/client 2.2.0-beta.8 → 2.2.0-beta.9

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 (202) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/build/browser/createMinimalClient.js +2 -2
  3. package/build/browser/createMinimalClient.js.map +1 -1
  4. package/build/browser/object/SimpleOsdkProperties.js +2 -0
  5. package/build/browser/object/SimpleOsdkProperties.js.map +1 -0
  6. package/build/browser/object/convertWireToOsdkObjects/BaseHolder.js +2 -0
  7. package/build/browser/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -0
  8. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  9. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -1
  10. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  11. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +10 -3
  12. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  13. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -1
  14. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -1
  15. package/build/browser/object/convertWireToOsdkObjects.js +4 -2
  16. package/build/browser/object/convertWireToOsdkObjects.js.map +1 -1
  17. package/build/browser/object/fetchPage.js +13 -1
  18. package/build/browser/object/fetchPage.js.map +1 -1
  19. package/build/browser/object/fetchPage.test.js +56 -2
  20. package/build/browser/object/fetchPage.test.js.map +1 -1
  21. package/build/browser/object/object.test.js.map +1 -1
  22. package/build/browser/objectSet/InterfaceObjectSet.test.js +18 -2
  23. package/build/browser/objectSet/InterfaceObjectSet.test.js.map +1 -1
  24. package/build/browser/objectSet/ObjectSet.test.js +92 -102
  25. package/build/browser/objectSet/ObjectSet.test.js.map +1 -1
  26. package/build/browser/objectSet/ObjectSetListenerWebsocket.js +18 -14
  27. package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  28. package/build/browser/objectSet/createObjectSet.js.map +1 -1
  29. package/build/browser/observable/ListPayload.js.map +1 -1
  30. package/build/browser/observable/ObjectPayload.js.map +1 -1
  31. package/build/browser/observable/ObservableClient.js.map +1 -1
  32. package/build/browser/observable/internal/ActionApplication.js +29 -29
  33. package/build/browser/observable/internal/ActionApplication.js.map +1 -1
  34. package/build/browser/observable/internal/CacheKey.js +1 -1
  35. package/build/browser/observable/internal/CacheKey.js.map +1 -1
  36. package/build/browser/observable/internal/CacheKeys.js +2 -2
  37. package/build/browser/observable/internal/CacheKeys.js.map +1 -1
  38. package/build/browser/observable/internal/{ChangedObjects.js → Changes.js} +20 -9
  39. package/build/browser/observable/internal/Changes.js.map +1 -0
  40. package/build/browser/observable/internal/Layer.js +3 -0
  41. package/build/browser/observable/internal/Layer.js.map +1 -1
  42. package/build/browser/observable/internal/ListQuery.js +411 -170
  43. package/build/browser/observable/internal/ListQuery.js.map +1 -1
  44. package/build/browser/observable/internal/ObjectQuery.js +32 -16
  45. package/build/browser/observable/internal/ObjectQuery.js.map +1 -1
  46. package/build/browser/observable/internal/ObservableClientImpl.js +4 -12
  47. package/build/browser/observable/internal/ObservableClientImpl.js.map +1 -1
  48. package/build/browser/observable/internal/OptimisticJob.js.map +1 -1
  49. package/build/browser/observable/internal/OrderByCanonicalizer.js +73 -0
  50. package/build/browser/observable/internal/OrderByCanonicalizer.js.map +1 -0
  51. package/build/browser/observable/internal/OrderByCanonicalizer.test.js +78 -0
  52. package/build/browser/observable/internal/OrderByCanonicalizer.test.js.map +1 -0
  53. package/build/browser/observable/internal/Query.js +64 -31
  54. package/build/browser/observable/internal/Query.js.map +1 -1
  55. package/build/browser/observable/internal/RefCounts.js +7 -2
  56. package/build/browser/observable/internal/RefCounts.js.map +1 -1
  57. package/build/browser/observable/internal/SimpleWhereClause.js +2 -0
  58. package/build/browser/observable/internal/SimpleWhereClause.js.map +1 -0
  59. package/build/browser/observable/internal/Store.js +84 -267
  60. package/build/browser/observable/internal/Store.js.map +1 -1
  61. package/build/browser/observable/internal/Store.test.js +264 -247
  62. package/build/browser/observable/internal/Store.test.js.map +1 -1
  63. package/build/browser/observable/internal/WhereClauseCanonicalizer.js +11 -3
  64. package/build/browser/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
  65. package/build/browser/observable/internal/objectMatchesWhereClause.js.map +1 -1
  66. package/build/browser/observable/internal/objectMatchesWhereClause.test.js.map +1 -1
  67. package/build/browser/observable/internal/testUtils.js +82 -18
  68. package/build/browser/observable/internal/testUtils.js.map +1 -1
  69. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  70. package/build/browser/util/UserAgent.js +1 -1
  71. package/build/cjs/{chunk-JPENHIJB.cjs → chunk-EY52J5Z4.cjs} +25 -15
  72. package/build/cjs/chunk-EY52J5Z4.cjs.map +1 -0
  73. package/build/cjs/{chunk-IU47QMYO.cjs → chunk-MCQVHD2F.cjs} +32 -28
  74. package/build/cjs/chunk-MCQVHD2F.cjs.map +1 -0
  75. package/build/cjs/chunk-T4NIFYZS.cjs +14 -0
  76. package/build/cjs/chunk-T4NIFYZS.cjs.map +1 -0
  77. package/build/cjs/index.cjs +69 -72
  78. package/build/cjs/index.cjs.map +1 -1
  79. package/build/cjs/public/internal.cjs +6 -6
  80. package/build/cjs/public/unstable-do-not-use.cjs +683 -539
  81. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  82. package/build/cjs/public/unstable-do-not-use.d.cts +27 -26
  83. package/build/esm/createMinimalClient.js +2 -2
  84. package/build/esm/createMinimalClient.js.map +1 -1
  85. package/build/esm/object/SimpleOsdkProperties.js +2 -0
  86. package/build/esm/object/SimpleOsdkProperties.js.map +1 -0
  87. package/build/esm/object/convertWireToOsdkObjects/BaseHolder.js +2 -0
  88. package/build/esm/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -0
  89. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  90. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -1
  91. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  92. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +10 -3
  93. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  94. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -1
  95. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -1
  96. package/build/esm/object/convertWireToOsdkObjects.js +4 -2
  97. package/build/esm/object/convertWireToOsdkObjects.js.map +1 -1
  98. package/build/esm/object/fetchPage.js +13 -1
  99. package/build/esm/object/fetchPage.js.map +1 -1
  100. package/build/esm/object/fetchPage.test.js +56 -2
  101. package/build/esm/object/fetchPage.test.js.map +1 -1
  102. package/build/esm/object/object.test.js.map +1 -1
  103. package/build/esm/objectSet/InterfaceObjectSet.test.js +18 -2
  104. package/build/esm/objectSet/InterfaceObjectSet.test.js.map +1 -1
  105. package/build/esm/objectSet/ObjectSet.test.js +92 -102
  106. package/build/esm/objectSet/ObjectSet.test.js.map +1 -1
  107. package/build/esm/objectSet/ObjectSetListenerWebsocket.js +18 -14
  108. package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -1
  109. package/build/esm/objectSet/createObjectSet.js.map +1 -1
  110. package/build/esm/observable/ListPayload.js.map +1 -1
  111. package/build/esm/observable/ObjectPayload.js.map +1 -1
  112. package/build/esm/observable/ObservableClient.js.map +1 -1
  113. package/build/esm/observable/internal/ActionApplication.js +29 -29
  114. package/build/esm/observable/internal/ActionApplication.js.map +1 -1
  115. package/build/esm/observable/internal/CacheKey.js +1 -1
  116. package/build/esm/observable/internal/CacheKey.js.map +1 -1
  117. package/build/esm/observable/internal/CacheKeys.js +2 -2
  118. package/build/esm/observable/internal/CacheKeys.js.map +1 -1
  119. package/build/esm/observable/internal/{ChangedObjects.js → Changes.js} +20 -9
  120. package/build/esm/observable/internal/Changes.js.map +1 -0
  121. package/build/esm/observable/internal/Layer.js +3 -0
  122. package/build/esm/observable/internal/Layer.js.map +1 -1
  123. package/build/esm/observable/internal/ListQuery.js +411 -170
  124. package/build/esm/observable/internal/ListQuery.js.map +1 -1
  125. package/build/esm/observable/internal/ObjectQuery.js +32 -16
  126. package/build/esm/observable/internal/ObjectQuery.js.map +1 -1
  127. package/build/esm/observable/internal/ObservableClientImpl.js +4 -12
  128. package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -1
  129. package/build/esm/observable/internal/OptimisticJob.js.map +1 -1
  130. package/build/esm/observable/internal/OrderByCanonicalizer.js +73 -0
  131. package/build/esm/observable/internal/OrderByCanonicalizer.js.map +1 -0
  132. package/build/esm/observable/internal/OrderByCanonicalizer.test.js +78 -0
  133. package/build/esm/observable/internal/OrderByCanonicalizer.test.js.map +1 -0
  134. package/build/esm/observable/internal/Query.js +64 -31
  135. package/build/esm/observable/internal/Query.js.map +1 -1
  136. package/build/esm/observable/internal/RefCounts.js +7 -2
  137. package/build/esm/observable/internal/RefCounts.js.map +1 -1
  138. package/build/esm/observable/internal/SimpleWhereClause.js +2 -0
  139. package/build/esm/observable/internal/SimpleWhereClause.js.map +1 -0
  140. package/build/esm/observable/internal/Store.js +84 -267
  141. package/build/esm/observable/internal/Store.js.map +1 -1
  142. package/build/esm/observable/internal/Store.test.js +264 -247
  143. package/build/esm/observable/internal/Store.test.js.map +1 -1
  144. package/build/esm/observable/internal/WhereClauseCanonicalizer.js +11 -3
  145. package/build/esm/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
  146. package/build/esm/observable/internal/objectMatchesWhereClause.js.map +1 -1
  147. package/build/esm/observable/internal/objectMatchesWhereClause.test.js.map +1 -1
  148. package/build/esm/observable/internal/testUtils.js +82 -18
  149. package/build/esm/observable/internal/testUtils.js.map +1 -1
  150. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  151. package/build/esm/util/UserAgent.js +1 -1
  152. package/build/types/object/SimpleOsdkProperties.d.ts +1 -0
  153. package/build/types/object/SimpleOsdkProperties.d.ts.map +1 -0
  154. package/build/types/object/convertWireToOsdkObjects/BaseHolder.d.ts +1 -0
  155. package/build/types/object/convertWireToOsdkObjects/BaseHolder.d.ts.map +1 -0
  156. package/build/types/object/convertWireToOsdkObjects.d.ts +8 -1
  157. package/build/types/object/convertWireToOsdkObjects.d.ts.map +1 -1
  158. package/build/types/observable/ListPayload.d.ts +5 -9
  159. package/build/types/observable/ListPayload.d.ts.map +1 -1
  160. package/build/types/observable/ObjectPayload.d.ts +4 -7
  161. package/build/types/observable/ObjectPayload.d.ts.map +1 -1
  162. package/build/types/observable/ObservableClient.d.ts +27 -11
  163. package/build/types/observable/ObservableClient.d.ts.map +1 -1
  164. package/build/types/observable/internal/ActionApplication.d.ts.map +1 -1
  165. package/build/types/observable/internal/CacheKeys.d.ts +1 -1
  166. package/build/types/observable/internal/CacheKeys.d.ts.map +1 -1
  167. package/build/types/observable/internal/Changes.d.ts +15 -0
  168. package/build/types/observable/internal/Changes.d.ts.map +1 -0
  169. package/build/types/observable/internal/Layer.d.ts +1 -0
  170. package/build/types/observable/internal/Layer.d.ts.map +1 -1
  171. package/build/types/observable/internal/ListQuery.d.ts +59 -14
  172. package/build/types/observable/internal/ListQuery.d.ts.map +1 -1
  173. package/build/types/observable/internal/ObjectQuery.d.ts +5 -6
  174. package/build/types/observable/internal/ObjectQuery.d.ts.map +1 -1
  175. package/build/types/observable/internal/OptimisticJob.d.ts +1 -1
  176. package/build/types/observable/internal/OptimisticJob.d.ts.map +1 -1
  177. package/build/types/observable/internal/OrderByCanonicalizer.d.ts +12 -0
  178. package/build/types/observable/internal/OrderByCanonicalizer.d.ts.map +1 -0
  179. package/build/types/observable/internal/OrderByCanonicalizer.test.d.ts +1 -0
  180. package/build/types/observable/internal/OrderByCanonicalizer.test.d.ts.map +1 -0
  181. package/build/types/observable/internal/Query.d.ts +39 -4
  182. package/build/types/observable/internal/Query.d.ts.map +1 -1
  183. package/build/types/observable/internal/RefCounts.d.ts.map +1 -1
  184. package/build/types/observable/internal/SimpleWhereClause.d.ts +2 -0
  185. package/build/types/observable/internal/SimpleWhereClause.d.ts.map +1 -0
  186. package/build/types/observable/internal/Store.d.ts +19 -43
  187. package/build/types/observable/internal/Store.d.ts.map +1 -1
  188. package/build/types/observable/internal/WhereClauseCanonicalizer.d.ts +2 -1
  189. package/build/types/observable/internal/WhereClauseCanonicalizer.d.ts.map +1 -1
  190. package/build/types/observable/internal/objectMatchesWhereClause.d.ts +4 -2
  191. package/build/types/observable/internal/objectMatchesWhereClause.d.ts.map +1 -1
  192. package/build/types/observable/internal/testUtils.d.ts +39 -9
  193. package/build/types/observable/internal/testUtils.d.ts.map +1 -1
  194. package/build/types/public/unstable-do-not-use.d.ts +1 -4
  195. package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
  196. package/package.json +12 -10
  197. package/build/browser/observable/internal/ChangedObjects.js.map +0 -1
  198. package/build/cjs/chunk-IU47QMYO.cjs.map +0 -1
  199. package/build/cjs/chunk-JPENHIJB.cjs.map +0 -1
  200. package/build/esm/observable/internal/ChangedObjects.js.map +0 -1
  201. package/build/types/observable/internal/ChangedObjects.d.ts +0 -11
  202. package/build/types/observable/internal/ChangedObjects.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js","../../../../node_modules/.pnpm/@osdk+shared.client@1.0.1/node_modules/@osdk/shared.client/index.js","../../../../node_modules/.pnpm/@osdk+shared.client2@1.0.0/node_modules/@osdk/shared.client2/index.js","../../../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.3.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.16.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js","../../src/util/addUserAgentAndRequestContextHeaders.ts","../../src/util/objectSetUtils.ts","../../src/object/fetchPage.ts","../../src/Client.ts"],"names":["__export","symbolClientContext","PalantirApiError","UnknownError","get","_get","upload","_upload","list","_list","aggregate","_aggregate","createFetchHeaderMutator","result"],"mappings":";;;;;;;AAAA,IAAA,cAAA,GAAA;AAAAA,0BAAA,CAAA,cAAA,EAAA;AAAA,EAAA,KAAA,EAAA,MAAA,KAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,UAAA,EAAA,MAAA;AAAA,CAAA,CAAA;;;ACgBa,IAAA,mBAAA,GAAsB,OAAO,eAAe;;;ACAlD,IAAMC,oBAAsB,GAAA,qBAAA;ACEnC,eAAsB,oBAAA,CAAqB,QAAQ,CAAC,aAAA,EAAe,UAAU,KAAO,EAAA,WAAA,EAAa,mBAAmB,CA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,IAC5J,SAAA;AAAA;AAAA,IAEA,MAAA,EAAQ,IAAM,EAAA,OAAA,IAAW,EAAC;AAAA;AAAA,IAE1B,UAAA,EAAY,CAAC,IAAM,EAAA;AAAA,GACpB,CAAC,CAAA;AACF,EAAA,OAAO,QAAQ,OAAQ,CAAA;AAAA,IACrB,IAAA,EAAM,MAAM,MAAA,CAAO,aAAc,CAAA,MAAA,EAAQ,EAAE,IAAM,EAAA,SAAA,EAAW,SAAW,EAAA,IAAA,CAAK,OAAO,CAAA;AAAA,IACnF,eAAe,CAAE,CAAA,aAAA;AAAA,IACjB,YAAY,CAAE,CAAA;AAAA,GACf,CAAA;AACH;;;AC/Ia,IAAA,iBAAA,GAAoB,OAAO,mBAAmB","file":"chunk-EY52J5Z4.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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _apply = [1, \"/v2/ontologies/{0}/actions/{1}/apply\", 3];\n/**\n * Applies an action using the given parameters.\n *\n * Changes to the Ontology are eventually consistent and may take some time to be visible.\n *\n * Note that [parameter default values](https://www.palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by\n * this endpoint.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read api:ontologies-write`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/apply\n */\nexport function apply($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _apply, ...args);\n}\nconst _applyAsync = [1, \"/v2/ontologies/{0}/actions/{1}/applyAsync\", 3];\n/**\n * Applies an action using the given parameters.\n *\n * Changes to the Ontology are eventually consistent and may take some time to be visible.\n *\n * Note that [parameter default values](https://www.palantir.com/docs/foundry/action-types/parameters-default-value/) are not currently supported by\n * this endpoint.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read api:ontologies-write`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/applyAsync\n */\nexport function applyAsync($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _applyAsync, ...args);\n}\nconst _applyBatch = [1, \"/v2/ontologies/{0}/actions/{1}/applyBatch\", 3];\n/**\n * Applies multiple actions (of the same Action Type) using the given parameters.\n * Changes to the Ontology are eventually consistent and may take some time to be visible.\n *\n * Up to 20 actions may be applied in one call. Actions that only modify objects in Object Storage v2 and do not\n * call Functions may receive a higher limit.\n *\n * Note that [notifications](https://www.palantir.com/docs/foundry/action-types/notifications/) are not currently supported by this endpoint.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read api:ontologies-write`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/actions/{action}/applyBatch\n */\nexport function applyBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _applyBatch, ...args);\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\nexport const symbolClientContext = Symbol(\"ClientContext\");","/*\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\nexport const symbolClientContext = \"__osdkClientContext\";","/*\n * Copyright 2023 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 */\nimport { symbolClientContext as oldSymbolClientContext } from \"@osdk/shared.client\";\nimport { symbolClientContext } from \"@osdk/shared.client2\";\nimport { PalantirApiError, UnknownError } from \"@osdk/shared.net.errors\";\nexport async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {\n const path = origPath.replace(/\\{([^}]+)\\}/g, () => encodeURIComponent(args.shift()));\n const body = flags & 1 ? args.shift() : undefined;\n const queryArgs = flags & 2 ? args.shift() : undefined;\n const headerArgs = flags & 4 ? args.shift() : undefined;\n const method = [\"GET\", \"POST\", \"PUT\", \"DELETE\", \"PATCH\"][httpMethodNum];\n return await apiFetch(client[symbolClientContext] ?? client[oldSymbolClientContext] ?? client, method, path, body, queryArgs, headerArgs, contentType, responseContentType);\n}\nasync function apiFetch(clientCtx, method, endpointPath, data, queryArguments, headers, requestMediaType, responseMediaType) {\n const url = parseUrl(clientCtx.baseUrl, endpointPath);\n for (const [key, value] of Object.entries(queryArguments || {})) {\n if (value == null) {\n continue;\n }\n if (Array.isArray(value)) {\n for (const item of value) {\n url.searchParams.append(key, item);\n }\n } else {\n url.searchParams.append(key, value);\n }\n }\n const headersInit = new Headers();\n headersInit.set(\"Content-Type\", requestMediaType ?? \"application/json\");\n headersInit.set(\"Accept\", responseMediaType ?? \"application/json\");\n Object.entries(headers || {}).forEach(([key, value]) => {\n if (value != null) {\n headersInit.append(key, value.toString());\n }\n });\n const body = data == null || data instanceof globalThis.Blob ? data : JSON.stringify(data);\n // Because this uses the client's fetch, there is a 99.99% chance that it is already going\n // to handle the error case and throw a PalantirApiError since its wrapped in a\n // createFetchOrThrow.\n const response = await clientCtx.fetch(url.toString(), {\n body,\n method: method,\n headers: headersInit\n });\n // However, if we ended up using a \"regular\" fetch, the\n // error status codes are not thrown by fetch automatically,\n // we have to look at the ok property and behave accordingly\n if (!response.ok) {\n try {\n const convertedError = await response.json();\n return new PalantirApiError(convertedError.message, convertedError.errorName, convertedError.errorCode, response.status, convertedError.errorInstanceId, convertedError.parameters);\n } catch (e) {\n if (e instanceof Error) {\n return new UnknownError(e.message, \"UNKNOWN\");\n }\n return new UnknownError(\"Unable to parse error response\", \"UNKNOWN\");\n }\n }\n // Do not return anything if its a 204. Do not parse either!\n if (response.status === 204) {\n return;\n }\n if (responseMediaType == null || responseMediaType === \"application/json\") {\n return await response.json();\n }\n return response;\n}\nexport function parseUrl(baseUrl, endpointPath) {\n baseUrl += baseUrl.endsWith(\"/\") ? \"\" : \"/\";\n return new URL(`api${endpointPath}`, baseUrl);\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/actionTypes\", 2];\n/**\n * Lists the action types for the given Ontology.\n *\n * Each page may be smaller than the requested page size. However, it is guaranteed that if there are more\n * results available, at least one result will be present in the response.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/actionTypes/{1}\"];\n/**\n * Gets a specific action type with the given API name.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/actionTypes/{actionType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _upload = [1, \"/v2/ontologies/attachments/upload\", 7, \"*/*\"];\n/**\n * Upload an attachment to use in an action. Any attachment which has not been linked to an object via\n * an action within one hour after upload will be removed.\n * Previously mapped attachments which are not connected to any object anymore are also removed on\n * a biweekly basis.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-write`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-write]\n * URL: /v2/ontologies/attachments/upload\n */\nexport function upload($ctx, ...args) {\n const headerParams = {\n ...args[2],\n \"Content-Type\": args[2]?.[\"Content-Type\"] ?? args[0].type,\n \"Content-Length\": args[0].size.toString()\n };\n return $foundryPlatformFetch($ctx, _upload, args[0], args[1], headerParams);\n}\nconst _read = [0, \"/v2/ontologies/attachments/{0}/content\",,, \"*/*\"];\n/**\n * Get the content of an attachment.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/attachments/{attachmentRid}/content\n */\nexport function read($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _read, ...args);\n}\nconst _get = [0, \"/v2/ontologies/attachments/{0}\"];\n/**\n * Get the metadata of an attachment.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/attachments/{attachmentRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _getMediaContent = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/media/{3}/content\", 2,, \"*/*\"];\n/**\n * Gets the content of a media item referenced by this property.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content\n */\nexport function getMediaContent($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getMediaContent, ...args);\n}\nconst _getMediaMetadata = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/media/{3}/metadata\", 2];\n/**\n * Gets metadata about the media item referenced by this property.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/metadata\n */\nexport function getMediaMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getMediaMetadata, ...args);\n}\nconst _upload = [1, \"/v2/ontologies/{0}/objectTypes/{1}/media/{2}/upload\", 3, \"*/*\"];\n/**\n * Uploads a media item to the media set which backs the specified property. The property must be backed by a single media set and branch, otherwise an error will be thrown.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/media/{property}/upload\n */\nexport function upload($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _upload, ...args);\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/objectTypes\", 2];\n/**\n * Lists the object types for the given Ontology.\n *\n * Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are\n * more results available, at least one result will be present in the\n * response.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/objectTypes/{1}\"];\n/**\n * Gets a specific object type with the given API name.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getFullMetadata = [0, \"/v2/ontologies/{0}/objectTypes/{1}/fullMetadata\", 2];\n/**\n * Gets the full metadata for a specific object type with the given API name.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/fullMetadata\n */\nexport function getFullMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getFullMetadata, ...args);\n}\nconst _listOutgoingLinkTypes = [0, \"/v2/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes\", 2];\n/**\n * List the outgoing links for an object type.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes\n */\nexport function listOutgoingLinkTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _listOutgoingLinkTypes, ...args);\n}\nconst _getOutgoingLinkType = [0, \"/v2/ontologies/{0}/objectTypes/{1}/outgoingLinkTypes/{2}\"];\n/**\n * Get an outgoing link for an object type.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}\n */\nexport function getOutgoingLinkType($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getOutgoingLinkType, ...args);\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/interfaceTypes\", 2];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint is in preview and may be modified or removed at any time.\n * To use this endpoint, add `preview=true` to the request query parameters.\n * :::\n *\n * Lists the interface types for the given Ontology.\n *\n * Each page may be smaller than the requested page size. However, it is guaranteed that if there are more\n * results available, at least one result will be present in the response.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/interfaceTypes/{1}\", 2];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint is in preview and may be modified or removed at any time.\n * To use this endpoint, add `preview=true` to the request query parameters.\n * :::\n *\n * Gets a specific interface type with the given API name.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaceTypes/{interfaceType}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _search = [1, \"/v2/ontologies/{0}/interfaces/{1}/search\", 3];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint will be removed once TS OSDK is updated to use `objectSets/loadObjects` with interface object\n * sets.\n * :::\n * :::callout{theme=warning title=Warning}\n * This endpoint is in preview and may be modified or removed at any time.\n * To use this endpoint, add `preview=true` to the request query parameters.\n * :::\n *\n * Search for objects in the specified ontology and interface type. Any properties specified in the \"where\" or\n * \"orderBy\" parameters must be shared property type API names defined on the interface. The following search\n * queries are supported:\n *\n * | Query type | Description | Supported Types |\n * |-----------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------|\n * | lt | The provided property is less than the provided value. | number, string, date, timestamp |\n * | gt | The provided property is greater than the provided value. | number, string, date, timestamp |\n * | lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp |\n * | gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp |\n * | eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp |\n * | isNull | The provided property is (or is not) null. | all |\n * | contains | The provided property contains the provided value. | array |\n * | not | The sub-query does not match. | N/A (applied on a query) |\n * | and | All the sub-queries match. | N/A (applied on queries) |\n * | or | At least one of the sub-queries match. | N/A (applied on queries) |\n * | startsWith | The provided property starts with the provided term. | string |\n * | containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string |\n * | containsAllTermsInOrder | The provided property contains the provided terms as a substring. | string |\n * | containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string |\n * | containsAllTerms | The provided property contains all the terms separated by whitespace. | string |\n *\n * Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (`?!,:;-[](){}'\"~`). Periods (`.`) on their own are ignored.\n * Partial terms are not matched by terms filters except where explicitly noted.\n *\n * Attempting to use an unsupported query will result in a validation error. Third-party applications using this\n * endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/search\n */\nexport function search($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _search, ...args);\n}\nconst _aggregate = [1, \"/v2/ontologies/{0}/interfaces/{1}/aggregate\", 3];\n/**\n * :::callout{theme=warning title=Warning}\n * This endpoint will be removed once TS OSDK is updated to use `objectSets/aggregate` with interface object\n * sets.\n * :::\n * :::callout{theme=warning title=Warning}\n * This endpoint is in preview and may be modified or removed at any time.\n * To use this endpoint, add `preview=true` to the request query parameters.\n * :::\n *\n * Perform functions on object fields in the specified ontology and of the specified interface type. Any\n * properties specified in the query must be shared property type API names defined on the interface.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/interfaces/{interfaceType}/aggregate\n */\nexport function aggregate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _aggregate, ...args);\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _createTemporary = [1, \"/v2/ontologies/{0}/objectSets/createTemporary\", 1];\n/**\n * Creates a temporary `ObjectSet` from the given definition. This `ObjectSet` expires after one hour.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read api:ontologies-write`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/objectSets/createTemporary\n */\nexport function createTemporary($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _createTemporary, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/objectSets/{1}\"];\n/**\n * Gets the definition of the `ObjectSet` with the given RID.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @alpha\n *\n * Required Scopes: []\n * URL: /v2/ontologies/{ontology}/objectSets/{objectSetRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _load = [1, \"/v2/ontologies/{0}/objectSets/loadObjects\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Note that null value properties will not be returned.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjects\n */\nexport function load($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _load, ...args);\n}\nconst _loadMultipleObjectTypes = [1, \"/v2/ontologies/{0}/objectSets/loadObjectsMultipleObjectTypes\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition. The resulting\n * objects may be scoped to an object type, in which all the selected properties on the object type are returned, or scoped\n * to an interface, in which only the object type properties that implement the properties of any interfaces in its\n * scope are returned. For objects that are scoped to an interface in the result, a mapping from interface to\n * object implementation is returned in order to interpret the objects as the interfaces that they implement.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey)\n * will be prefixed with '$' instead of '\\_\\_' as is the case in `loadObjects`.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjectsMultipleObjectTypes\n */\nexport function loadMultipleObjectTypes($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadMultipleObjectTypes, ...args);\n}\nconst _loadObjectsOrInterfaces = [1, \"/v2/ontologies/{0}/objectSets/loadObjectsOrInterfaces\", 3];\n/**\n * Load the ontology objects present in the `ObjectSet` from the provided object set definition. If the requested\n * object set contains interfaces and the object can be viewed as an interface, it will contain the properties\n * defined by the interface. If not, it will contain the properties defined by its object type. This allows directly\n * loading all objects of an interface where all objects are viewed as the interface, for example.\n *\n * Note that the result object set cannot contain a mix of objects with \"interface\" properties and \"object type\"\n * properties. Attempting to load an object set like this will result in an error.\n *\n * For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects\n * are available, attempting to load another page will result in an `ObjectsExceededLimit` error being returned. There is no limit on Object Storage V2 backed objects.\n *\n * Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey)\n * will be prefixed with '$' instead of '\\_\\_' as is the case in `/loadObjects`.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/loadObjectsOrInterfaces\n */\nexport function loadObjectsOrInterfaces($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _loadObjectsOrInterfaces, ...args);\n}\nconst _aggregate = [1, \"/v2/ontologies/{0}/objectSets/aggregate\", 3];\n/**\n * Aggregates the ontology objects present in the `ObjectSet` from the provided object set definition.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objectSets/aggregate\n */\nexport function aggregate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _aggregate, ...args);\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _execute = [1, \"/v2/ontologies/{0}/queries/{1}/execute\", 3];\n/**\n * Executes a Query using the given parameters.\n *\n * Optional parameters do not need to be supplied.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queries/{queryApiName}/execute\n */\nexport function execute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _execute, ...args);\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _list = [0, \"/v2/ontologies/{0}/queryTypes\", 2];\n/**\n * Lists the query types for the given Ontology.\n *\n * Each page may be smaller than the requested page size. However, it is guaranteed that if there are more\n * results available, at least one result will be present in the response.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queryTypes\n */\nexport function list($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _list, ...args);\n}\nconst _get = [0, \"/v2/ontologies/{0}/queryTypes/{1}\"];\n/**\n * Gets a specific query type with the given API name.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queryTypes/{queryApiName}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _getFirstPoint = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/firstPoint\", 2];\n/**\n * Get the first point of a time series property.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/firstPoint\n */\nexport function getFirstPoint($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getFirstPoint, ...args);\n}\nconst _getLastPoint = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/lastPoint\", 2];\n/**\n * Get the last point of a time series property.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/lastPoint\n */\nexport function getLastPoint($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getLastPoint, ...args);\n}\nconst _streamPoints = [1, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/streamPoints\", 3,, \"*/*\"];\n/**\n * Stream all of the points of a time series property.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamPoints\n */\nexport function streamPoints($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamPoints, ...args);\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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _getLatestValue = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/latestValue\", 2];\n/**\n * Get the latest value of a property backed by a timeseries. If a specific geotime series integration has both a history and a live integration, we will give precedence to the live integration.\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{propertyName}/latestValue\n */\nexport function getLatestValue($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getLatestValue, ...args);\n}\nconst _streamValues = [1, \"/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/streamValues\", 3,, \"*/*\"];\n/**\n * Stream all of the points of a time series property (this includes geotime series references).\n *\n * Third-party applications using this endpoint via OAuth2 must request the\n * following operation scopes: `api:ontologies-read`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/timeseries/{property}/streamValues\n */\nexport function streamValues($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamValues, ...args);\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 { createFetchHeaderMutator } from \"@osdk/shared.net.fetch\";\nexport const addUserAgentAndRequestContextHeaders = (client, withMetadata) => ({\n ...client,\n fetch: createFetchHeaderMutator(client.fetch, headers => {\n headers.set(\"X-OSDK-Request-Context\", JSON.stringify(client.requestContext));\n if (withMetadata.osdkMetadata) {\n headers.set(\"Fetch-User-Agent\", withMetadata.osdkMetadata.extraUserAgent);\n }\n return headers;\n })\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\nexport function resolveBaseObjectSetType(objectType) {\n return objectType.type === \"interface\" ? {\n type: \"interfaceBase\",\n interfaceType: objectType[\"apiName\"]\n } : {\n type: \"base\",\n objectType: objectType[\"apiName\"]\n };\n}","/*\n * Copyright 2023 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 * as OntologiesV2 from \"@osdk/foundry.ontologies\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { resolveBaseObjectSetType } from \"../util/objectSetUtils.js\";\nexport function augment(type, ...properties) {\n return {\n [type.apiName]: properties\n };\n}\n\n/** @internal */\nexport function objectSetToSearchJsonV2(objectSet, expectedApiName, existingWhere = undefined) {\n if (objectSet.type === \"base\" || objectSet.type === \"interfaceBase\") {\n if (objectSet.type === \"base\" && objectSet.objectType !== expectedApiName) {\n throw new Error(`Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.objectType}`);\n }\n if (objectSet.type === \"interfaceBase\" && objectSet.interfaceType !== expectedApiName) {\n throw new Error(`Expected objectSet.objectType to be ${expectedApiName}, but got ${objectSet.interfaceType}`);\n }\n return existingWhere;\n }\n if (objectSet.type === \"filter\") {\n return objectSetToSearchJsonV2(objectSet.objectSet, expectedApiName, existingWhere == null ? objectSet.where : {\n type: \"and\",\n value: [existingWhere, objectSet.where]\n });\n }\n throw new Error(`Unsupported objectSet type: ${objectSet.type}`);\n}\n\n/** @internal */\nexport function resolveInterfaceObjectSet(objectSet, interfaceTypeApiName, args) {\n return args?.$includeAllBaseObjectProperties ? {\n type: \"intersect\",\n objectSets: [objectSet, {\n type: \"interfaceBase\",\n interfaceType: interfaceTypeApiName,\n includeAllBaseObjectProperties: true\n }]\n } : objectSet;\n}\nasync function fetchInterfacePage(client, interfaceType, args, objectSet) {\n if (args.$__UNSTABLE_useOldInterfaceApis) {\n const result = await OntologiesV2.OntologyInterfaces.search(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, interfaceType.apiName, applyFetchArgs(args, {\n augmentedProperties: {},\n augmentedSharedPropertyTypes: {},\n otherInterfaceTypes: [],\n selectedObjectTypes: [],\n selectedSharedPropertyTypes: args.$select ?? [],\n where: objectSetToSearchJsonV2(objectSet, interfaceType.apiName)\n }), {\n preview: true\n });\n result.data = await client.objectFactory(client, result.data,\n // drop readonly\n interfaceType.apiName, !args.$includeRid);\n return result;\n }\n const result = await OntologiesV2.OntologyObjectSets.loadMultipleObjectTypes(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, applyFetchArgs(args, {\n objectSet: resolveInterfaceObjectSet(objectSet, interfaceType.apiName, args),\n select: args?.$select ?? [],\n excludeRid: !args?.$includeRid\n }), {\n preview: true\n });\n return Promise.resolve({\n data: await client.objectFactory2(client, result.data, interfaceType.apiName, !args.$includeRid, args.$select, false, result.interfaceToObjectTypeMappings),\n nextPageToken: result.nextPageToken,\n totalCount: result.totalCount\n });\n}\n\n/** @internal */\nexport async function fetchPageInternal(client, objectType, objectSet, args = {}) {\n if (objectType.type === \"interface\") {\n return await fetchInterfacePage(client, objectType, args, objectSet); // fixme\n } else {\n return await fetchObjectPage(client, objectType, args, objectSet); // fixme\n }\n}\n\n/** @internal */\nexport async function fetchPageWithErrorsInternal(client, objectType, objectSet, args = {}) {\n try {\n const result = await fetchPageInternal(client, objectType, objectSet, args);\n return {\n value: result\n };\n } catch (e) {\n if (e instanceof Error) {\n return {\n error: e\n };\n }\n return {\n error: e\n };\n }\n}\n\n/**\n * @param client\n * @param objectType\n * @param args\n * @param objectSet\n * @returns\n * @internal\n */\nexport async function fetchPage(client, objectType, args, objectSet = resolveBaseObjectSetType(objectType)) {\n return fetchPageInternal(client, objectType, objectSet, args);\n}\n\n/** @internal */\nexport async function fetchPageWithErrors(client, objectType, args, objectSet = resolveBaseObjectSetType(objectType)) {\n return fetchPageWithErrorsInternal(client, objectType, objectSet, args);\n}\nfunction applyFetchArgs(args, body) {\n if (args?.$nextPageToken) {\n body.pageToken = args.$nextPageToken;\n }\n if (args?.$pageSize != null) {\n body.pageSize = args.$pageSize;\n }\n if (args?.$orderBy != null) {\n body.orderBy = {\n fields: Object.entries(args.$orderBy).map(([field, direction]) => ({\n field,\n direction\n }))\n };\n }\n return body;\n}\n\n/** @internal */\nexport async function fetchObjectPage(client, objectType, args, objectSet) {\n const r = await OntologiesV2.OntologyObjectSets.load(addUserAgentAndRequestContextHeaders(client, objectType), await client.ontologyRid, applyFetchArgs(args, {\n objectSet,\n // We have to do the following case because LoadObjectSetRequestV2 isn't readonly\n select: args?.$select ?? [],\n // FIXME?\n excludeRid: !args?.$includeRid\n }));\n return Promise.resolve({\n data: await client.objectFactory(client, r.data, undefined, undefined, args.$select),\n nextPageToken: r.nextPageToken,\n totalCount: r.totalCount\n });\n}","/*\n * Copyright 2023 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\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\n\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext = Symbol(\"additionalContext\");\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.2.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\n\nconst ErrorMessage = Symbol(\"ErrorMessage\");"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkJPENHIJB_cjs = require('./chunk-JPENHIJB.cjs');
3
+ var chunkEY52J5Z4_cjs = require('./chunk-EY52J5Z4.cjs');
4
4
  var shared_net_errors = require('@osdk/shared.net.errors');
5
5
  var invariant5 = require('tiny-invariant');
6
6
  var api = require('@osdk/api');
@@ -13,16 +13,16 @@ var WebSocket__default = /*#__PURE__*/_interopDefault(WebSocket);
13
13
 
14
14
  // src/public-utils/hydrateAttachmentFromRid.ts
15
15
  function hydrateAttachmentFromRid(client, rid) {
16
- return hydrateAttachmentFromRidInternal(client[chunkJPENHIJB_cjs.additionalContext], rid);
16
+ return hydrateAttachmentFromRidInternal(client[chunkEY52J5Z4_cjs.additionalContext], rid);
17
17
  }
18
18
  function hydrateAttachmentFromRidInternal(client, rid) {
19
19
  return {
20
20
  rid,
21
21
  async fetchContents() {
22
- return chunkJPENHIJB_cjs.Attachment_exports.read(client, rid);
22
+ return chunkEY52J5Z4_cjs.Attachment_exports.read(client, rid);
23
23
  },
24
24
  async fetchMetadata() {
25
- const r = await chunkJPENHIJB_cjs.Attachment_exports.get(client, rid);
25
+ const r = await chunkEY52J5Z4_cjs.Attachment_exports.get(client, rid);
26
26
  return {
27
27
  ...r,
28
28
  sizeBytes: Number(r.sizeBytes)
@@ -31,7 +31,7 @@ function hydrateAttachmentFromRidInternal(client, rid) {
31
31
  };
32
32
  }
33
33
  async function fetchSingle(client, objectType, args, objectSet) {
34
- const result = await chunkJPENHIJB_cjs.fetchPage(client, objectType, {
34
+ const result = await chunkEY52J5Z4_cjs.fetchPage(client, objectType, {
35
35
  ...args,
36
36
  $pageSize: 1
37
37
  }, objectSet);
@@ -417,8 +417,8 @@ function convertRange(range) {
417
417
  }
418
418
 
419
419
  // src/object/aggregate.ts
420
- async function aggregate(clientCtx, objectType, objectSet = chunkJPENHIJB_cjs.resolveBaseObjectSetType(objectType), req) {
421
- chunkJPENHIJB_cjs.resolveBaseObjectSetType(objectType);
420
+ async function aggregate(clientCtx, objectType, objectSet = chunkEY52J5Z4_cjs.resolveBaseObjectSetType(objectType), req) {
421
+ chunkEY52J5Z4_cjs.resolveBaseObjectSetType(objectType);
422
422
  const body = {
423
423
  aggregation: modernToLegacyAggregationClause(req.$select),
424
424
  groupBy: [],
@@ -427,7 +427,7 @@ async function aggregate(clientCtx, objectType, objectSet = chunkJPENHIJB_cjs.re
427
427
  if (req.$groupBy) {
428
428
  body.groupBy = modernToLegacyGroupByClause(req.$groupBy);
429
429
  }
430
- const result = await chunkJPENHIJB_cjs.OntologyObjectSet_exports.aggregate(chunkJPENHIJB_cjs.addUserAgentAndRequestContextHeaders(clientCtx, objectType), await clientCtx.ontologyRid, {
430
+ const result = await chunkEY52J5Z4_cjs.OntologyObjectSet_exports.aggregate(chunkEY52J5Z4_cjs.addUserAgentAndRequestContextHeaders(clientCtx, objectType), await clientCtx.ontologyRid, {
431
431
  objectSet,
432
432
  groupBy: body.groupBy,
433
433
  aggregation: body.aggregation
@@ -569,7 +569,7 @@ var ObjectSetListenerWebsocket = class _ObjectSetListenerWebsocket {
569
569
  */
570
570
  async #initiateSubscribe(sub) {
571
571
  if (process.env.NODE_ENV !== "production") {
572
- this.#logger?.trace("#initiateSubscribe()");
572
+ this.#logger?.debug("#initiateSubscribe()");
573
573
  }
574
574
  try {
575
575
  await this.#ensureWebsocket();
@@ -587,7 +587,7 @@ var ObjectSetListenerWebsocket = class _ObjectSetListenerWebsocket {
587
587
  }
588
588
  #sendSubscribeMessage() {
589
589
  if (process.env.NODE_ENV !== "production") {
590
- this.#logger?.trace("#sendSubscribeMessage()");
590
+ this.#logger?.debug("#sendSubscribeMessage()");
591
591
  }
592
592
  const readySubs = [...this.#subscriptions.values()].filter(isReady);
593
593
  const id = nextUuid();
@@ -608,7 +608,7 @@ var ObjectSetListenerWebsocket = class _ObjectSetListenerWebsocket {
608
608
  })
609
609
  };
610
610
  if (process.env.NODE_ENV !== "production") {
611
- this.#logger?.trace({
611
+ this.#logger?.debug({
612
612
  payload: subscribe
613
613
  }, "sending subscribe message");
614
614
  }
@@ -655,7 +655,7 @@ var ObjectSetListenerWebsocket = class _ObjectSetListenerWebsocket {
655
655
  this.#lastWsConnect = Date.now();
656
656
  if (this.#ws == null) {
657
657
  if (process.env.NODE_ENV !== "production") {
658
- this.#logger?.trace("Creating websocket");
658
+ this.#logger?.debug("Creating websocket");
659
659
  }
660
660
  this.#ws = new WebSocket__default.default(url, [`Bearer-${token}`]);
661
661
  this.#ws.addEventListener("close", this.#onClose);
@@ -692,19 +692,23 @@ var ObjectSetListenerWebsocket = class _ObjectSetListenerWebsocket {
692
692
  #onMessage = async (message) => {
693
693
  const data = JSON.parse(message.data.toString());
694
694
  if (process.env.NODE_ENV !== "production") {
695
- this.#logger?.trace({
695
+ this.#logger?.debug({
696
696
  payload: data
697
697
  }, "received message from ws");
698
698
  }
699
699
  switch (data.type) {
700
700
  case "objectSetChanged":
701
- return void this.#handleMessage_objectSetChanged(data);
701
+ await this.#handleMessage_objectSetChanged(data);
702
+ return;
702
703
  case "refreshObjectSet":
703
- return void this.#handleMessage_refreshObjectSet(data);
704
+ this.#handleMessage_refreshObjectSet(data);
705
+ return;
704
706
  case "subscribeResponses":
705
- return void this.#handleMessage_subscribeResponses(data);
707
+ this.#handleMessage_subscribeResponses(data);
708
+ return;
706
709
  case "subscriptionClosed": {
707
- return void this.#handleMessage_subscriptionClosed(data);
710
+ this.#handleMessage_subscriptionClosed(data);
711
+ return;
708
712
  }
709
713
  default:
710
714
  process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Unexpected message type") : invariant5__default.default(false) ;
@@ -728,10 +732,10 @@ var ObjectSetListenerWebsocket = class _ObjectSetListenerWebsocket {
728
732
  state: "ADDED_OR_UPDATED"
729
733
  } : undefined;
730
734
  }));
731
- for (const osdkObject of osdkObjectsWithReferenceUpdates) {
732
- if (osdkObject != null) {
735
+ for (const update of osdkObjectsWithReferenceUpdates) {
736
+ if (update != null) {
733
737
  try {
734
- sub.listener.onChange?.(osdkObject);
738
+ sub.listener.onChange?.(update);
735
739
  } catch (error) {
736
740
  this.#logger?.error(error, "Error in onChange callback");
737
741
  this.#tryCatchOnError(sub, false, error);
@@ -802,7 +806,7 @@ var ObjectSetListenerWebsocket = class _ObjectSetListenerWebsocket {
802
806
  case "success":
803
807
  const shouldFireOutOfDate = sub.status === "expired" || sub.status === "reconnecting";
804
808
  if (process.env.NODE_ENV !== "production") {
805
- this.#logger?.trace({
809
+ this.#logger?.debug({
806
810
  shouldFireOutOfDate
807
811
  }, "success");
808
812
  }
@@ -834,7 +838,7 @@ var ObjectSetListenerWebsocket = class _ObjectSetListenerWebsocket {
834
838
  }
835
839
  #onClose = (event) => {
836
840
  if (process.env.NODE_ENV !== "production") {
837
- this.#logger?.trace({
841
+ this.#logger?.debug({
838
842
  event
839
843
  }, "Received close event from ws", event);
840
844
  }
@@ -902,15 +906,15 @@ function getWireObjectSet(objectSet) {
902
906
  return objectSetDefinitions.get(objectSet);
903
907
  }
904
908
  var objectSetDefinitions = /* @__PURE__ */ new WeakMap();
905
- function createObjectSet(objectType, clientCtx, objectSet = chunkJPENHIJB_cjs.resolveBaseObjectSetType(objectType)) {
909
+ function createObjectSet(objectType, clientCtx, objectSet = chunkEY52J5Z4_cjs.resolveBaseObjectSetType(objectType)) {
906
910
  const base = {
907
911
  aggregate: aggregate.bind(globalThis, augmentRequestContext(clientCtx, (_) => ({
908
912
  finalMethodCall: "aggregate"
909
913
  })), objectType, objectSet),
910
- fetchPage: chunkJPENHIJB_cjs.fetchPageInternal.bind(globalThis, augmentRequestContext(clientCtx, (_) => ({
914
+ fetchPage: chunkEY52J5Z4_cjs.fetchPageInternal.bind(globalThis, augmentRequestContext(clientCtx, (_) => ({
911
915
  finalMethodCall: "fetchPage"
912
916
  })), objectType, objectSet),
913
- fetchPageWithErrors: chunkJPENHIJB_cjs.fetchPageWithErrorsInternal.bind(globalThis, augmentRequestContext(clientCtx, (_) => ({
917
+ fetchPageWithErrors: chunkEY52J5Z4_cjs.fetchPageWithErrorsInternal.bind(globalThis, augmentRequestContext(clientCtx, (_) => ({
914
918
  finalMethodCall: "fetchPageWithErrors"
915
919
  })), objectType, objectSet),
916
920
  where: (clause) => {
@@ -944,7 +948,7 @@ function createObjectSet(objectType, clientCtx, objectSet = chunkJPENHIJB_cjs.re
944
948
  asyncIter: async function* (args) {
945
949
  let $nextPageToken = undefined;
946
950
  do {
947
- const result = await chunkJPENHIJB_cjs.fetchPageInternal(augmentRequestContext(clientCtx, (_) => ({
951
+ const result = await chunkEY52J5Z4_cjs.fetchPageInternal(augmentRequestContext(clientCtx, (_) => ({
948
952
  finalMethodCall: "asyncIter"
949
953
  })), objectType, objectSet, {
950
954
  ...args,
@@ -1027,5 +1031,5 @@ exports.hydrateAttachmentFromRid = hydrateAttachmentFromRid;
1027
1031
  exports.hydrateAttachmentFromRidInternal = hydrateAttachmentFromRidInternal;
1028
1032
  exports.isObjectSet = isObjectSet;
1029
1033
  exports.isWireObjectSet = isWireObjectSet;
1030
- //# sourceMappingURL=chunk-IU47QMYO.cjs.map
1031
- //# sourceMappingURL=chunk-IU47QMYO.cjs.map
1034
+ //# sourceMappingURL=chunk-MCQVHD2F.cjs.map
1035
+ //# sourceMappingURL=chunk-MCQVHD2F.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/public-utils/hydrateAttachmentFromRid.ts","../../src/object/fetchSingle.ts","../../src/internal/conversions/modernToLegacyWhereClause.ts","../../src/derivedProperties/createWithPropertiesObjectSet.ts","../../src/internal/conversions/legacyToModernSingleAggregationResult.ts","../../src/internal/conversions/modernToLegacyAggregationClause.ts","../../src/internal/conversions/modernToLegacyGroupByClause.ts","../../src/object/aggregate.ts","../../src/util/augmentRequestContext.ts","../../src/util/WireObjectSet.ts","../../src/objectSet/ObjectSetListenerWebsocket.ts","../../src/objectSet/createObjectSet.ts"],"names":["additionalContext","Attachment_exports","fetchPage","PalantirApiError","invariant","DistanceUnitMapping","DurationMapping","resolveBaseObjectSetType","OntologyObjectSet_exports","addUserAgentAndRequestContextHeaders","WebSocket","fetchPageInternal","fetchPageWithErrorsInternal"],"mappings":";;;;;;;;;;;;;;AAwBO,SAAS,wBAAA,CAAyB,QAAQ,GAAK,EAAA;AACpD,EAAA,OAAO,gCAAiC,CAAA,MAAA,CAAOA,mCAAiB,CAAA,EAAG,GAAG,CAAA;AACxE;AAGO,SAAS,gCAAA,CAAiC,QAAQ,GAAK,EAAA;AAC5D,EAAO,OAAA;AAAA,IACL,GAAA;AAAA,IACA,MAAM,aAAgB,GAAA;AACpB,MAAoB,OAAAC,oCAAA,CAAY,IAAK,CAAA,MAAA,EAAQ,GAAG,CAAA;AAAA,KAClD;AAAA,IACA,MAAM,aAAgB,GAAA;AACpB,MAAA,MAAM,CAAI,GAAA,MAAmBA,oCAAY,CAAA,GAAA,CAAI,QAAQ,GAAG,CAAA;AACxD,MAAO,OAAA;AAAA,QACL,GAAG,CAAA;AAAA,QACH,SAAA,EAAW,MAAO,CAAA,CAAA,CAAE,SAAS;AAAA,OAC/B;AAAA;AACF,GACF;AACF;ACvBA,eAAsB,WAAY,CAAA,MAAA,EAAQ,UAAY,EAAA,IAAA,EAAM,SAAW,EAAA;AACrE,EAAA,MAAM,MAAS,GAAA,MAAMC,2BAAU,CAAA,MAAA,EAAQ,UAAY,EAAA;AAAA,IACjD,GAAG,IAAA;AAAA,IACH,SAAW,EAAA;AAAA,K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b,IAAM,EAAA,QAAA;AAAA,IACN,SAAA;AAAA,IACA,KAAO,EAAA;AAAA,MACL,IAAM,EAAA,IAAA;AAAA,MACN,OAAO,MAAO,CAAA,iBAAA;AAAA,MACd,KAAO,EAAA;AAAA;AACT,GACF;AACA,EAAO,OAAA,MAAA;AACT","file":"chunk-MCQVHD2F.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 * as OntologiesV2 from \"@osdk/foundry.ontologies\";\nimport { additionalContext } from \"../Client.js\";\n/**\n * Helper function to create an attachment type from a rid\n * @param client - An OSDK client.\n * @param rid - The rid of attachment in Foundry.\n * @returns An OSDK attachment object\n */\nexport function hydrateAttachmentFromRid(client, rid) {\n return hydrateAttachmentFromRidInternal(client[additionalContext], rid);\n}\n\n/** @internal */\nexport function hydrateAttachmentFromRidInternal(client, rid) {\n return {\n rid,\n async fetchContents() {\n return OntologiesV2.Attachments.read(client, rid);\n },\n async fetchMetadata() {\n const r = await OntologiesV2.Attachments.get(client, rid);\n return {\n ...r,\n sizeBytes: Number(r.sizeBytes)\n };\n }\n };\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 { PalantirApiError } from \"@osdk/shared.net.errors\";\nimport { fetchPage } from \"./fetchPage.js\";\n\n/** @internal */\nexport async function fetchSingle(client, objectType, args, objectSet) {\n const result = await fetchPage(client, objectType, {\n ...args,\n $pageSize: 1\n }, objectSet);\n if (result.data.length !== 1 || result.nextPageToken != null) {\n throw new PalantirApiError(`Expected a single result but got ${result.data.length} instead${result.nextPageToken != null ? \" with nextPageToken set\" : \"\"}`);\n }\n return result.data[0];\n}\n\n/** @internal */\nexport async function fetchSingleWithErrors(client, objectType, args, objectSet) {\n try {\n const result = await fetchSingle(client, objectType, args, objectSet);\n return {\n value: result\n };\n } catch (e) {\n if (e instanceof Error) {\n return {\n error: e\n };\n }\n return {\n error: e\n };\n }\n}","/*\n * Copyright 2023 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 { DistanceUnitMapping } from \"@osdk/api\";\nimport invariant from \"tiny-invariant\";\nexport function extractNamespace(fqApiName) {\n const last = fqApiName.lastIndexOf(\".\");\n if (last === -1) return [undefined, fqApiName];\n return [fqApiName.slice(0, last), fqApiName.slice(last + 1)];\n}\n\n/** @internal */\nexport function modernToLegacyWhereClause(whereClause, objectOrInterface) {\n if (\"$and\" in whereClause) {\n return {\n type: \"and\",\n value: whereClause.$and.map(clause => modernToLegacyWhereClause(clause, objectOrInterface))\n };\n } else if (\"$or\" in whereClause) {\n return {\n type: \"or\",\n value: whereClause.$or.map(clause => modernToLegacyWhereClause(clause, objectOrInterface))\n };\n } else if (\"$not\" in whereClause) {\n return {\n type: \"not\",\n value: modernToLegacyWhereClause(whereClause.$not, objectOrInterface)\n };\n }\n const parts = Object.entries(whereClause);\n if (parts.length === 1) {\n return handleWherePair(parts[0], objectOrInterface);\n }\n return {\n type: \"and\",\n value: parts.map(v => handleWherePair(v, objectOrInterface))\n };\n}\nfunction makeGeoFilterBbox(bbox, filterType, propertyIdentifier, field) {\n return {\n type: filterType === \"$within\" ? \"withinBoundingBox\" : \"intersectsBoundingBox\",\n /**\n * This is a bit ugly, but did this so that propertyIdentifier only shows up in the return object if its defined,\n * this makes it so we don't need to go update our entire test bed either to include a field which may change in near future.\n * Once we solidify that this is the way forward, I can remove field and clean this up\n */\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: {\n topLeft: {\n type: \"Point\",\n coordinates: [bbox[0], bbox[3]]\n },\n bottomRight: {\n type: \"Point\",\n coordinates: [bbox[2], bbox[1]]\n }\n }\n };\n}\nfunction makeGeoFilterPolygon(coordinates, filterType, propertyIdentifier, field) {\n return {\n type: filterType,\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: {\n type: \"Polygon\",\n coordinates\n }\n };\n}\nfunction handleWherePair([fieldName, filter], objectOrInterface, structFieldSelector) {\n !(filter != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Defined key values are only allowed when they are not undefined.\") : invariant(false) : void 0;\n const propertyIdentifier = structFieldSelector != null ? {\n type: \"structField\",\n ...structFieldSelector,\n propertyApiName: fullyQualifyPropName(structFieldSelector.propertyApiName, objectOrInterface)\n } : undefined;\n const field = structFieldSelector == null ? fullyQualifyPropName(fieldName, objectOrInterface) : undefined;\n if (typeof filter === \"string\" || typeof filter === \"number\" || typeof filter === \"boolean\") {\n propertyIdentifier;\n return {\n type: \"eq\",\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: filter\n };\n }\n const keysOfFilter = Object.keys(filter);\n\n // If any of the keys start with `$` then they must be the only one.\n // e.g. `where({ name: { $eq: \"foo\", $ne: \"bar\" } })` is invalid currently\n const hasDollarSign = keysOfFilter.some(key => key.startsWith(\"$\"));\n !(!hasDollarSign || keysOfFilter.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"A WhereClause Filter with multiple clauses/fields is not allowed. Instead, use an 'or'/'and' clause to combine multiple filters.\") : invariant(false) : void 0;\n if (!hasDollarSign) {\n const structFilter = Object.entries(filter);\n !(structFilter.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Cannot filter on more than one struct field in the same clause, need to use an and clause\") : invariant(false) : void 0;\n const structFieldApiName = keysOfFilter[0];\n return handleWherePair(Object.entries(filter)[0], objectOrInterface, {\n propertyApiName: fieldName,\n structFieldApiName\n });\n }\n const firstKey = keysOfFilter[0];\n !(filter[firstKey] != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n if (firstKey === \"$ne\") {\n return {\n type: \"not\",\n value: {\n type: \"eq\",\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: filter[firstKey]\n }\n };\n }\n if (firstKey === \"$within\") {\n const withinBody = filter[firstKey];\n if (Array.isArray(withinBody)) {\n return makeGeoFilterBbox(withinBody, firstKey, propertyIdentifier, field);\n } else if (\"$bbox\" in withinBody && withinBody.$bbox != null) {\n return makeGeoFilterBbox(withinBody.$bbox, firstKey, propertyIdentifier, field);\n } else if (\"$distance\" in withinBody && \"$of\" in withinBody && withinBody.$distance != null && withinBody.$of != null) {\n return {\n type: \"withinDistanceOf\",\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: {\n center: Array.isArray(withinBody.$of) ? {\n type: \"Point\",\n coordinates: withinBody.$of\n } : withinBody.$of,\n distance: {\n value: withinBody.$distance[0],\n unit: DistanceUnitMapping[withinBody.$distance[1]]\n }\n }\n };\n } else {\n const coordinates = \"$polygon\" in withinBody ? withinBody.$polygon : withinBody.coordinates;\n return makeGeoFilterPolygon(coordinates, \"withinPolygon\", propertyIdentifier, fieldName);\n }\n }\n if (firstKey === \"$intersects\") {\n const intersectsBody = filter[firstKey];\n if (Array.isArray(intersectsBody)) {\n return makeGeoFilterBbox(intersectsBody, firstKey, propertyIdentifier, field);\n } else if (\"$bbox\" in intersectsBody && intersectsBody.$bbox != null) {\n return makeGeoFilterBbox(intersectsBody.$bbox, firstKey, propertyIdentifier, field);\n } else {\n const coordinates = \"$polygon\" in intersectsBody ? intersectsBody.$polygon : intersectsBody.coordinates;\n return makeGeoFilterPolygon(coordinates, \"intersectsPolygon\", propertyIdentifier, field);\n }\n }\n if (firstKey === \"$containsAllTerms\" || firstKey === \"$containsAnyTerm\") {\n return {\n type: firstKey.substring(1),\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: typeof filter[firstKey] === \"string\" ? filter[firstKey] : filter[firstKey][\"term\"],\n fuzzy: typeof filter[firstKey] === \"string\" ? false : filter[firstKey][\"fuzzySearch\"] ?? false\n };\n }\n return {\n type: firstKey.substring(1),\n ...(propertyIdentifier != null && {\n propertyIdentifier\n }),\n field,\n value: filter[firstKey]\n };\n}\nfunction fullyQualifyPropName(fieldName, objectOrInterface) {\n if (objectOrInterface.type === \"interface\") {\n const [objApiNamespace] = extractNamespace(objectOrInterface.apiName);\n const [fieldApiNamespace, fieldShortName] = extractNamespace(fieldName);\n return fieldApiNamespace == null && objApiNamespace != null ? `${objApiNamespace}.${fieldShortName}` : fieldName;\n }\n return fieldName;\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\";\nimport { modernToLegacyWhereClause } from \"../internal/conversions/modernToLegacyWhereClause.js\";\nconst idCounter = 0;\n\n/** @internal */\nexport function createWithPropertiesObjectSet(objectType, objectSet, definitionMap) {\n const base = {\n pivotTo: link => {\n return createWithPropertiesObjectSet(objectType, {\n type: \"searchAround\",\n objectSet,\n link\n }, definitionMap);\n },\n where: clause => {\n return createWithPropertiesObjectSet(objectType, {\n type: \"filter\",\n objectSet: objectSet,\n where: modernToLegacyWhereClause(clause, objectType)\n }, definitionMap);\n },\n aggregate: (aggregation, opt) => {\n const splitAggregation = aggregation.split(\":\");\n !(splitAggregation.length === 2 || splitAggregation[0] === \"$count\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Invalid aggregation format\") : invariant(false) : void 0;\n const [aggregationPropertyName, aggregationOperation] = splitAggregation;\n let aggregationOperationDefinition;\n switch (aggregationOperation) {\n case \"sum\":\n case \"avg\":\n case \"min\":\n case \"max\":\n case \"exactDistinct\":\n case \"approximateDistinct\":\n aggregationOperationDefinition = {\n type: aggregationOperation,\n selectedPropertyApiName: aggregationPropertyName\n };\n break;\n case \"approximatePercentile\":\n aggregationOperationDefinition = {\n type: \"approximatePercentile\",\n selectedPropertyApiName: aggregationPropertyName,\n approximatePercentile: opt?.percentile ?? .5\n };\n break;\n case \"collectSet\":\n case \"collectList\":\n aggregationOperationDefinition = {\n type: aggregationOperation,\n selectedPropertyApiName: aggregationPropertyName,\n limit: opt?.limit ?? 100\n };\n break;\n case undefined:\n if (aggregationPropertyName === \"$count\") {\n aggregationOperationDefinition = {\n type: \"count\"\n };\n break;\n }\n default:\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Invalid aggregation operation \" + aggregationOperation) : invariant(false) : void 0;\n }\n const selectorResult = {\n type: {}\n };\n definitionMap.set(selectorResult, {\n type: \"selection\",\n objectSet: objectSet,\n operation: aggregationOperationDefinition\n });\n return selectorResult;\n },\n selectProperty: name => {\n const selectorResult = {\n type: {}\n };\n definitionMap.set(selectorResult, {\n type: \"selection\",\n objectSet: objectSet,\n operation: {\n type: \"get\",\n selectedPropertyApiName: name\n }\n });\n return selectorResult;\n }\n };\n return base;\n}","/*\n * Copyright 2023 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\";\n/** @internal */\nexport function legacyToModernSingleAggregationResult(entry) {\n return entry.metrics.reduce((accumulator, curValue) => {\n const parts = curValue.name.split(\".\");\n if (parts[0] === \"count\") {\n return accumulator;\n }\n !(parts.length === 2) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"assumed we were getting a `${key}.${type}`\") : invariant(false) : void 0;\n const property = parts[0];\n const metricType = parts[1];\n if (!(property in accumulator)) {\n accumulator[property] = {}; // fixme?\n }\n accumulator[property][metricType] = curValue.value; // fixme?\n\n return accumulator;\n }, {});\n}","/*\n * Copyright 2023 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\nconst directionFieldMap = dir => dir === \"asc\" ? \"ASC\" : dir === \"desc\" ? \"DESC\" : undefined;\n\n/** @internal */\nexport function modernToLegacyAggregationClause(select) {\n return Object.entries(select).flatMap(([propAndMetric, aggregationType]) => {\n if (propAndMetric === \"$count\") {\n return {\n type: \"count\",\n name: \"count\",\n direction: directionFieldMap(aggregationType)\n };\n }\n const colonPos = propAndMetric.lastIndexOf(\":\");\n const property = propAndMetric.slice(0, colonPos);\n const metric = propAndMetric.slice(colonPos + 1);\n return [{\n type: metric,\n name: `${property}.${metric}`,\n direction: directionFieldMap(aggregationType),\n field: property\n }];\n });\n}","/*\n * Copyright 2023 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 { DurationMapping } from \"@osdk/api\";\n/** @internal */\nexport function modernToLegacyGroupByClause(groupByClause) {\n if (!groupByClause) return [];\n return Object.entries(groupByClause).flatMap(([field, type]) => {\n if (type === \"exact\") {\n return [{\n type,\n field\n }];\n } else if (\"$exactWithLimit\" in type) {\n {\n return [{\n type: \"exact\",\n field,\n maxGroupCount: type.$exactWithLimit\n }];\n }\n } else if (\"$exact\" in type) {\n return [{\n type: \"exact\",\n field,\n maxGroupCount: type.$exact?.$limit ?? undefined,\n defaultValue: type.$exact.$defaultValue ?? undefined\n }];\n } else if (\"$fixedWidth\" in type) {\n return [{\n type: \"fixedWidth\",\n field,\n fixedWidth: type.$fixedWidth\n }];\n } else if (\"$ranges\" in type) {\n return [{\n type: \"ranges\",\n field,\n ranges: type.$ranges.map(range => convertRange(range))\n }];\n } else if (\"$duration\" in type) {\n return [{\n type: \"duration\",\n field,\n value: type.$duration[0],\n unit: DurationMapping[type.$duration[1]]\n }];\n } else return [];\n });\n}\nfunction convertRange(range) {\n return {\n startValue: range[0],\n endValue: range[1]\n };\n}","/*\n * Copyright 2023 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 * as OntologiesV2 from \"@osdk/foundry.ontologies\";\nimport invariant from \"tiny-invariant\";\nimport { legacyToModernSingleAggregationResult } from \"../internal/conversions/legacyToModernSingleAggregationResult.js\";\nimport { modernToLegacyAggregationClause } from \"../internal/conversions/modernToLegacyAggregationClause.js\";\nimport { modernToLegacyGroupByClause } from \"../internal/conversions/modernToLegacyGroupByClause.js\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { resolveBaseObjectSetType } from \"../util/objectSetUtils.js\";\n\n/** @internal */\nexport async function aggregate(clientCtx, objectType, objectSet = resolveBaseObjectSetType(objectType), req) {\n const resolvedObjectSet = resolveBaseObjectSetType(objectType);\n const body = {\n aggregation: modernToLegacyAggregationClause(req.$select),\n groupBy: [],\n where: undefined\n };\n if (req.$groupBy) {\n body.groupBy = modernToLegacyGroupByClause(req.$groupBy);\n }\n const result = await OntologiesV2.OntologyObjectSets.aggregate(addUserAgentAndRequestContextHeaders(clientCtx, objectType), await clientCtx.ontologyRid, {\n objectSet,\n groupBy: body.groupBy,\n aggregation: body.aggregation\n });\n if (!req.$groupBy) {\n !(result.data.length === 1) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"no group by clause should mean only one data result\") : invariant(false) : void 0;\n return {\n ...aggregationToCountResult(result.data[0]),\n ...legacyToModernSingleAggregationResult(result.data[0])\n };\n }\n const ret = result.data.map(entry => {\n return {\n $group: entry.group,\n ...aggregationToCountResult(entry),\n ...legacyToModernSingleAggregationResult(entry)\n };\n }); // fixme\n\n return ret; // FIXME\n}\nfunction aggregationToCountResult(entry) {\n for (const aggregateResult of entry.metrics) {\n if (aggregateResult.name === \"count\") {\n return {\n $count: aggregateResult.value\n };\n }\n }\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\n/**\nReturns a client with its `requestContext` merged with the result of applying\n`augment` to its `requestContext`.\n\nThe second argument is an `Partial<RequestContext>`-returning `augment` function\ninstead of a `RequestContext` object to make referencing the current request\ncontext easier. For example, modifying the `fetchPage` function to add its name\nto the object set's called method chain could look like:\n```\naugmentRequestContext(\n clientContext,\n ctx => ({ methodChain: [...ctx.methodChain, \"fetchPage\"] })\n)\n```\nor\n```\naugmentRequestContext(\n clientContext,\n ({ methodChain }) => ({ methodChain: [...methodChain, \"fetchPage\"] })\n)\n```\ninstead of\n```\naugmentRequestContext(\n clientContext,\n { methodChain: [...clientContext.requestContext.methodChain, \"fetchPage\"] }\n)\n```\n*/\nexport const augmentRequestContext = (client, augment) => ({\n ...client,\n requestContext: {\n ...client.requestContext,\n ...augment(client.requestContext)\n }\n});","/*\n * Copyright 2023 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\nconst WIRE_OBJECT_SET_TYPES = new Set([\"base\", \"filter\", \"intersect\", \"reference\", \"searchAround\", \"static\", \"subtract\", \"union\"]);\n\n/** @internal */\nexport function isWireObjectSet(o) {\n return o != null && typeof o === \"object\" && WIRE_OBJECT_SET_TYPES.has(o.type);\n}","/*\n * Copyright 2023 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 WebSocket from \"isomorphic-ws\";\nimport invariant from \"tiny-invariant\";\nconst MINIMUM_RECONNECT_DELAY_MS = 5 * 1000;\n\n/** Noop function to reduce conditional checks */\nfunction doNothing() {}\n\n/**\n * Converts an ObjectSetListener to one where all the functions are defined.\n */\nfunction fillOutListener({\n onChange = doNothing,\n onError = doNothing,\n onOutOfDate = doNothing,\n onSuccessfulSubscription = doNothing\n}) {\n return {\n onChange,\n onError,\n onOutOfDate,\n onSuccessfulSubscription\n };\n}\nfunction isReady(sub) {\n return sub.isReady != null;\n}\nfunction subscriptionIsDone(sub) {\n return sub.status === \"done\" || sub.status === \"error\";\n}\n\n/** @internal */\nexport class ObjectSetListenerWebsocket {\n static #instances = new WeakMap();\n // FIXME\n static getInstance(client) {\n let instance = ObjectSetListenerWebsocket.#instances.get(client.clientCacheKey);\n if (instance == null) {\n instance = new ObjectSetListenerWebsocket(client);\n ObjectSetListenerWebsocket.#instances.set(client.clientCacheKey, instance);\n }\n return instance;\n }\n #ws;\n #lastWsConnect = 0;\n #client;\n #logger;\n\n /**\n * map of requestId to all active subscriptions at the time of the request\n */\n #pendingSubscriptions = new Map();\n\n /**\n * Map of subscriptionId to Subscription. Note: the subscriptionId may be\n * temporary and not the actual subscriptionId from the server.\n */\n #subscriptions = new Map();\n #endedSubscriptions = new Set();\n #maybeDisconnectTimeout;\n\n // DO NOT CONSTRUCT DIRECTLY. ONLY EXPOSED AS A TESTING SEAM\n constructor(client, {\n minimumReconnectDelayMs = MINIMUM_RECONNECT_DELAY_MS\n } = {}) {\n this.MINIMUM_RECONNECT_DELAY_MS = minimumReconnectDelayMs;\n this.#client = client;\n this.#logger = client.logger?.child({}, {\n msgPrefix: \"<OSW> \"\n });\n !(client.baseUrl.startsWith(\"https://\") || client.baseUrl.startsWith(\"http://\")) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Stack must be a URL\") : invariant(false) : void 0;\n }\n async subscribe(objectType, objectSet, listener, properties = []) {\n const objOrInterfaceDef = objectType.type === \"object\" ? await this.#client.ontologyProvider.getObjectDefinition(objectType.apiName) : await this.#client.ontologyProvider.getInterfaceDefinition(objectType.apiName);\n let objectProperties = [];\n let referenceProperties = [];\n if (properties.length === 0) {\n properties = Object.keys(objOrInterfaceDef.properties);\n }\n objectProperties = properties.filter(p => objOrInterfaceDef.properties[p].type !== \"geotimeSeriesReference\");\n referenceProperties = properties.filter(p => objOrInterfaceDef.properties[p].type === \"geotimeSeriesReference\");\n const sub = {\n listener: fillOutListener(listener),\n objectSet,\n primaryKeyPropertyName: objOrInterfaceDef.type === \"interface\" ? undefined : objOrInterfaceDef.primaryKeyApiName,\n requestedProperties: objectProperties,\n requestedReferenceProperties: referenceProperties,\n status: \"preparing\",\n // Since we don't have a real subscription id yet but we need to keep\n // track of this reference, we can just use a random uuid.\n subscriptionId: `TMP-${nextUuid()}}`,\n interfaceApiName: objOrInterfaceDef.type === \"object\" ? undefined : objOrInterfaceDef.apiName\n };\n this.#subscriptions.set(sub.subscriptionId, sub);\n\n // actually prepares the subscription, ensures the ws is ready, and sends\n // a subscribe message. We don't want to block on this.\n void this.#initiateSubscribe(sub);\n return () => {\n this.#unsubscribe(sub);\n };\n }\n\n /**\n * Called at least once for every subscription.\n *\n * - Resets pending expiry\n * - Recreates temporary object set\n * - Triggers a full subscribe message\n *\n * @returns\n */\n async #initiateSubscribe(sub) {\n if (process.env.NODE_ENV !== \"production\") {\n this.#logger?.debug(\"#initiateSubscribe()\");\n }\n try {\n await this.#ensureWebsocket();\n\n // the consumer may have already unsubscribed before we are ready to request a subscription\n // so we have to acquire the pendingSubscription after the await.\n if (subscriptionIsDone(sub)) {\n return;\n }\n sub.isReady = true;\n // if we aren't open, then this happens after we #onConnect\n if (this.#ws?.readyState === WebSocket.OPEN) {\n this.#sendSubscribeMessage();\n }\n } catch (error) {\n this.#logger?.error(error, \"Error in #initiateSubscribe\");\n this.#tryCatchOnError(sub, true, error);\n }\n }\n #sendSubscribeMessage() {\n if (process.env.NODE_ENV !== \"production\") {\n this.#logger?.debug(\"#sendSubscribeMessage()\");\n }\n // If two calls to `.subscribe()` happen at once (or if the connection is reset),\n // we may have multiple subscriptions that don't have a subscriptionId yet,\n // so we filter those out.\n const readySubs = [...this.#subscriptions.values()].filter(isReady);\n const id = nextUuid();\n // responses come back as an array of subIds, so we need to know the sources\n this.#pendingSubscriptions.set(id, readySubs);\n\n // every subscribe message \"overwrites\" the previous ones that are not\n // re-included, so we have to reconstitute the entire list of subscriptions\n const subscribe = {\n id,\n requests: readySubs.map(({\n objectSet,\n requestedProperties,\n requestedReferenceProperties,\n interfaceApiName\n }) => {\n return {\n objectSet: objectSet,\n propertySet: requestedProperties,\n referenceSet: requestedReferenceProperties\n };\n })\n };\n if (process.env.NODE_ENV !== \"production\") {\n this.#logger?.debug({\n payload: subscribe\n }, \"sending subscribe message\");\n }\n this.#ws?.send(JSON.stringify(subscribe));\n }\n #unsubscribe(sub, newStatus = \"done\") {\n if (subscriptionIsDone(sub)) {\n // if we are already done, we don't need to do anything\n return;\n }\n sub.status = newStatus;\n\n // make sure listeners do nothing now\n sub.listener = fillOutListener({});\n this.#subscriptions.delete(sub.subscriptionId);\n this.#endedSubscriptions.add(sub.subscriptionId);\n this.#sendSubscribeMessage();\n\n // If we have no more subscriptions, we can disconnect the websocket\n // however we should wait a bit to see if we get any more subscriptions.\n // For example, when switching between react views, you may unsubscribe\n // in the old view and subscribe in the new view. We don't need to re-establish\n // the websocket connection in that case.\n if (this.#maybeDisconnectTimeout) {\n // We reset the timeout on every unsubscribe so its always at least 15s from\n // the last time we are empty. E.g.:\n // - 0s: Subscribe(A)\n // - 10s: Unsubscribe(A)\n // - 11s: Subscribe(B)\n // - 20s: Unsubscribe(B)\n // If we do not clear out the timeout we would disconnect at 25s but that would only be\n // 5s after the last subscription was removed instead of at 35s for the desired 15s.\n clearTimeout(this.#maybeDisconnectTimeout);\n }\n this.#maybeDisconnectTimeout = setTimeout(() => {\n this.#maybeDisconnectTimeout = undefined;\n if (this.#subscriptions.size === 0) {\n this.#cycleWebsocket();\n }\n }, 15_000 /* ms */);\n }\n async #ensureWebsocket() {\n if (this.#ws == null) {\n const {\n baseUrl,\n tokenProvider\n } = this.#client;\n const url = constructWebsocketUrl(baseUrl, await this.#client.ontologyRid);\n const token = await tokenProvider();\n\n // tokenProvider is async, there could potentially be a race to create the websocket.\n // Only the first call to reach here will find a null this.#ws, the rest will bail out\n if (this.#ws == null) {\n // TODO this can probably be exponential backoff with jitter\n // don't reconnect more quickly than MINIMUM_RECONNECT_DELAY\n const nextConnectTime = (this.#lastWsConnect ?? 0) + this.MINIMUM_RECONNECT_DELAY_MS;\n if (nextConnectTime > Date.now()) {\n await new Promise(resolve => {\n setTimeout(resolve, nextConnectTime - Date.now());\n });\n }\n this.#lastWsConnect = Date.now();\n\n // we again may have lost the race after our minimum backoff time\n if (this.#ws == null) {\n if (process.env.NODE_ENV !== \"production\") {\n this.#logger?.debug(\"Creating websocket\");\n }\n this.#ws = new WebSocket(url, [`Bearer-${token}`]);\n this.#ws.addEventListener(\"close\", this.#onClose);\n this.#ws.addEventListener(\"message\", this.#onMessage);\n this.#ws.addEventListener(\"open\", this.#onOpen);\n }\n }\n // Allow await-ing the websocket open event if it isn't open already.\n // This needs to happen even for callers that didn't just create this.#ws\n if (this.#ws.readyState === WebSocket.CONNECTING) {\n const ws = this.#ws;\n return new Promise((resolve, reject) => {\n function cleanup() {\n ws.removeEventListener(\"open\", open);\n ws.removeEventListener(\"error\", error);\n ws.removeEventListener(\"close\", cleanup);\n }\n function open() {\n cleanup();\n resolve();\n }\n function error(evt) {\n cleanup();\n reject(evt);\n }\n ws.addEventListener(\"open\", open);\n ws.addEventListener(\"error\", error);\n ws.addEventListener(\"close\", cleanup);\n });\n }\n }\n }\n #onOpen = () => {\n // resubscribe all of the listeners\n this.#sendSubscribeMessage();\n };\n #onMessage = async message => {\n const data = JSON.parse(message.data.toString());\n if (process.env.NODE_ENV !== \"production\") {\n this.#logger?.debug({\n payload: data\n }, \"received message from ws\");\n }\n switch (data.type) {\n case \"objectSetChanged\":\n await this.#handleMessage_objectSetChanged(data);\n return;\n case \"refreshObjectSet\":\n this.#handleMessage_refreshObjectSet(data);\n return;\n case \"subscribeResponses\":\n this.#handleMessage_subscribeResponses(data);\n return;\n case \"subscriptionClosed\":\n {\n this.#handleMessage_subscriptionClosed(data);\n return;\n }\n default:\n const _ = data;\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Unexpected message type\") : invariant(false) : void 0;\n }\n };\n #handleMessage_objectSetChanged = async payload => {\n const sub = this.#subscriptions.get(payload.id);\n if (sub == null) return;\n const objectUpdates = payload.updates.filter(update => update.type === \"object\");\n const referenceUpdates = payload.updates.filter(update => update.type === \"reference\");\n const osdkObjectsWithReferenceUpdates = await Promise.all(referenceUpdates.map(async o => {\n const osdkObjectArray = await this.#client.objectFactory2(this.#client, [{\n __apiName: o.objectType,\n __primaryKey: sub.primaryKeyPropertyName != null ? o.primaryKey[sub.primaryKeyPropertyName] : undefined,\n ...o.primaryKey,\n [o.property]: o.value\n }], sub.interfaceApiName, false, undefined, false, await this.#fetchInterfaceMapping(o.objectType, sub.interfaceApiName));\n const singleOsdkObject = osdkObjectArray[0] ?? undefined;\n return singleOsdkObject != null ? {\n object: singleOsdkObject,\n state: \"ADDED_OR_UPDATED\"\n } : undefined;\n }));\n for (const update of osdkObjectsWithReferenceUpdates) {\n if (update != null) {\n try {\n sub.listener.onChange?.(update);\n } catch (error) {\n this.#logger?.error(error, \"Error in onChange callback\");\n this.#tryCatchOnError(sub, false, error);\n }\n }\n }\n const osdkObjects = await Promise.all(objectUpdates.map(async o => {\n const keysToDelete = Object.keys(o.object).filter(key => sub.requestedReferenceProperties.includes(key));\n for (const key of keysToDelete) {\n delete o.object[key];\n }\n const osdkObjectArray = await this.#client.objectFactory2(this.#client, [o.object], sub.interfaceApiName, false, undefined, false, await this.#fetchInterfaceMapping(o.object.__apiName, sub.interfaceApiName));\n const singleOsdkObject = osdkObjectArray[0] ?? undefined;\n return singleOsdkObject != null ? {\n object: singleOsdkObject,\n state: o.state\n } : undefined;\n }));\n for (const osdkObject of osdkObjects) {\n if (osdkObject != null) {\n try {\n sub.listener.onChange?.(osdkObject);\n } catch (error) {\n this.#logger?.error(error, \"Error in onChange callback\");\n this.#tryCatchOnError(sub, false, error);\n }\n }\n }\n };\n async #fetchInterfaceMapping(objectTypeApiName, interfaceApiName) {\n if (interfaceApiName == null) return {};\n const interfaceMap = (await this.#client.ontologyProvider.getObjectDefinition(objectTypeApiName)).interfaceMap;\n return {\n [interfaceApiName]: {\n [objectTypeApiName]: interfaceMap[interfaceApiName]\n }\n };\n }\n #handleMessage_refreshObjectSet = payload => {\n const sub = this.#subscriptions.get(payload.id);\n !sub ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Expected subscription id ${payload.id}`) : invariant(false) : void 0;\n try {\n sub.listener.onOutOfDate();\n } catch (error) {\n this.#logger?.error(error, \"Error in onOutOfDate callback\");\n this.#tryCatchOnError(sub, false, error);\n }\n };\n #handleMessage_subscribeResponses = payload => {\n const {\n id,\n responses\n } = payload;\n const subs = this.#pendingSubscriptions.get(id);\n !subs ? process.env.NODE_ENV !== \"production\" ? invariant(false, `should have a pending subscription for ${id}`) : invariant(false) : void 0;\n this.#pendingSubscriptions.delete(id);\n for (let i = 0; i < responses.length; i++) {\n const sub = subs[i];\n const response = responses[i];\n switch (response.type) {\n case \"error\":\n this.#tryCatchOnError(sub, true, response.errors);\n this.#unsubscribe(sub, \"error\");\n break;\n case \"qos\":\n // the server has requested that we tear down our websocket and reconnect to help load balance\n this.#cycleWebsocket();\n break;\n case \"success\":\n // `\"preparing\"` should only be the status on an initial subscribe.\n const shouldFireOutOfDate = sub.status === \"expired\" || sub.status === \"reconnecting\";\n if (process.env.NODE_ENV !== \"production\") {\n this.#logger?.debug({\n shouldFireOutOfDate\n }, \"success\");\n }\n sub.status = \"subscribed\";\n if (sub.subscriptionId !== response.id) {\n // might be the temporary one\n this.#subscriptions.delete(sub.subscriptionId);\n sub.subscriptionId = response.id;\n this.#subscriptions.set(sub.subscriptionId, sub); // future messages come by this subId\n }\n try {\n if (shouldFireOutOfDate) sub.listener.onOutOfDate();else sub.listener.onSuccessfulSubscription();\n } catch (error) {\n this.#logger?.error(error, \"Error in onOutOfDate or onSuccessfulSubscription callback\");\n this.#tryCatchOnError(sub, false, error);\n }\n break;\n default:\n this.#tryCatchOnError(sub, true, response);\n }\n }\n };\n #handleMessage_subscriptionClosed(payload) {\n const sub = this.#subscriptions.get(payload.id);\n if (sub == null && this.#endedSubscriptions.has(payload.id)) return;\n !sub ? process.env.NODE_ENV !== \"production\" ? invariant(false, `Expected subscription id ${payload.id}`) : invariant(false) : void 0;\n this.#tryCatchOnError(sub, true, payload.cause);\n this.#unsubscribe(sub, \"error\");\n }\n #onClose = event => {\n if (process.env.NODE_ENV !== \"production\") {\n this.#logger?.debug({\n event\n }, \"Received close event from ws\", event);\n }\n // TODO we should probably throttle this so we don't abuse the backend\n this.#cycleWebsocket();\n };\n #cycleWebsocket = () => {\n if (this.#ws) {\n this.#ws.removeEventListener(\"open\", this.#onOpen);\n this.#ws.removeEventListener(\"message\", this.#onMessage);\n this.#ws.removeEventListener(\"close\", this.#onClose);\n if (this.#ws.readyState !== WebSocket.CLOSING && this.#ws.readyState !== WebSocket.CLOSED) {\n this.#ws.close();\n }\n this.#ws = undefined;\n }\n\n // if we have any listeners that are still depending on us, go ahead and reopen the websocket\n if (this.#subscriptions.size > 0) {\n if (process.env.NODE_ENV !== \"production\") {\n for (const s of this.#subscriptions.values()) {\n !(s.status !== \"done\" && s.status !== \"error\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"should not have done/error subscriptions still\") : invariant(false) : void 0;\n }\n }\n for (const s of this.#subscriptions.values()) {\n if (s.status === \"subscribed\") s.status = \"reconnecting\";\n }\n\n // we don't care about the result of this (we want cycleWebsocket to be fire and forget)\n // just that it happens\n void this.#ensureWebsocket();\n }\n };\n #tryCatchOnError = (sub, subscriptionClosed, error) => {\n try {\n sub.listener.onError({\n subscriptionClosed: subscriptionClosed,\n error\n });\n } catch (onErrorError) {\n // eslint-disable-next-line no-console\n console.error(`Error encountered in an onError callback for an OSDK subscription`, onErrorError);\n // eslint-disable-next-line no-console\n console.error(`This onError call was triggered by an error in another callback`, error);\n // eslint-disable-next-line no-console\n console.error(`The subscription has been closed.`, error);\n if (!subscriptionClosed) {\n this.#logger?.error(error, \"Error in onError callback\");\n this.#unsubscribe(sub, \"error\");\n this.#tryCatchOnError(sub, true, onErrorError);\n }\n }\n };\n}\n\n/** @internal */\nexport function constructWebsocketUrl(baseUrl, ontologyRid) {\n const base = new URL(baseUrl);\n const url = new URL(`api/v2/ontologySubscriptions/ontologies/${ontologyRid}/streamSubscriptions`, base);\n url.protocol = url.protocol.replace(\"https\", \"wss\");\n return url;\n}\nlet uuidCounter = 0;\nfunction nextUuid() {\n return `00000000-0000-0000-0000-${(uuidCounter++).toString().padStart(12, \"0\")}`;\n}","/*\n * Copyright 2023 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 { createWithPropertiesObjectSet } from \"../derivedProperties/createWithPropertiesObjectSet.js\";\nimport { modernToLegacyWhereClause } from \"../internal/conversions/modernToLegacyWhereClause.js\";\nimport { aggregate } from \"../object/aggregate.js\";\nimport { fetchPageInternal, fetchPageWithErrorsInternal } from \"../object/fetchPage.js\";\nimport { fetchSingle, fetchSingleWithErrors } from \"../object/fetchSingle.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { resolveBaseObjectSetType } from \"../util/objectSetUtils.js\";\nimport { isWireObjectSet } from \"../util/WireObjectSet.js\";\nimport { ObjectSetListenerWebsocket } from \"./ObjectSetListenerWebsocket.js\";\nfunction isObjectTypeDefinition(def) {\n return def.type === \"object\";\n}\n\n/* @internal */\nexport function isObjectSet(o) {\n return o != null && typeof o === \"object\" && isWireObjectSet(objectSetDefinitions.get(o));\n}\n\n/** @internal */\nexport function getWireObjectSet(objectSet) {\n return objectSetDefinitions.get(objectSet);\n}\nconst objectSetDefinitions = new WeakMap();\n\n/** @internal */\nexport function createObjectSet(objectType, clientCtx, objectSet = resolveBaseObjectSetType(objectType)) {\n const base = {\n aggregate: aggregate.bind(globalThis, augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"aggregate\"\n })), objectType, objectSet),\n fetchPage: fetchPageInternal.bind(globalThis, augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchPage\"\n })), objectType, objectSet),\n fetchPageWithErrors: fetchPageWithErrorsInternal.bind(globalThis, augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchPageWithErrors\"\n })), objectType, objectSet),\n where: clause => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"filter\",\n objectSet: objectSet,\n where: modernToLegacyWhereClause(clause, objectType)\n });\n },\n pivotTo: function (type) {\n return createSearchAround(type)();\n },\n union: (...objectSets) => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"union\",\n objectSets: [objectSet, ...objectSets.map(os => objectSetDefinitions.get(os))]\n });\n },\n intersect: (...objectSets) => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"intersect\",\n objectSets: [objectSet, ...objectSets.map(os => objectSetDefinitions.get(os))]\n });\n },\n subtract: (...objectSets) => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"subtract\",\n objectSets: [objectSet, ...objectSets.map(os => objectSetDefinitions.get(os))]\n });\n },\n asyncIter: async function* (args) {\n let $nextPageToken = undefined;\n do {\n const result = await fetchPageInternal(augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"asyncIter\"\n })), objectType, objectSet, {\n ...args,\n $nextPageToken\n });\n $nextPageToken = result.nextPageToken;\n for (const obj of result.data) {\n yield obj;\n }\n } while ($nextPageToken != null);\n },\n fetchOne: isObjectTypeDefinition(objectType) ? async (primaryKey, options) => {\n return await fetchSingle(augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchOne\"\n })), objectType, options, await createWithPk(clientCtx, objectType, objectSet, primaryKey));\n } : undefined,\n fetchOneWithErrors: isObjectTypeDefinition(objectType) ? async (primaryKey, options) => {\n return await fetchSingleWithErrors(augmentRequestContext(clientCtx, _ => ({\n finalMethodCall: \"fetchOneWithErrors\"\n })), objectType, options, await createWithPk(clientCtx, objectType, objectSet, primaryKey));\n } : undefined,\n subscribe: (listener, opts) => {\n const pendingSubscribe = ObjectSetListenerWebsocket.getInstance(clientCtx).subscribe(objectType, objectSet, listener, opts?.properties);\n return {\n unsubscribe: async () => (await pendingSubscribe)()\n };\n },\n withProperties: clause => {\n const definitionMap = new Map();\n const derivedProperties = {};\n for (const key of Object.keys(clause)) {\n const derivedPropertyDefinition = clause[key](createWithPropertiesObjectSet(objectType, {\n type: \"methodInput\"\n }, definitionMap));\n derivedProperties[key] = definitionMap.get(derivedPropertyDefinition);\n }\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"withProperties\",\n derivedProperties: derivedProperties,\n objectSet: objectSet\n });\n },\n $objectSetInternals: {\n def: objectType\n }\n };\n function createSearchAround(link) {\n return () => {\n return clientCtx.objectSetFactory(objectType, clientCtx, {\n type: \"searchAround\",\n objectSet,\n link\n });\n };\n }\n objectSetDefinitions.set(base, objectSet);\n\n // we are using a type assertion because the marker symbol defined in BaseObjectSet isn't actually used\n // at runtime.\n return base;\n}\nasync function createWithPk(clientCtx, objectType, objectSet, primaryKey) {\n const objDef = await clientCtx.ontologyProvider.getObjectDefinition(objectType.apiName);\n const withPk = {\n type: \"filter\",\n objectSet: objectSet,\n where: {\n type: \"eq\",\n field: objDef.primaryKeyApiName,\n value: primaryKey\n }\n };\n return withPk;\n}"]}
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ // src/object/convertWireToOsdkObjects/InternalSymbols.ts
4
+ var UnderlyingOsdkObject = Symbol("Underlying Object" );
5
+ var ObjectDefRef = Symbol("ObjectDefinition" );
6
+ var InterfaceDefRef = Symbol("InterfaceDefinition" );
7
+ var ClientRef = Symbol("ClientRef" );
8
+
9
+ exports.ClientRef = ClientRef;
10
+ exports.InterfaceDefRef = InterfaceDefRef;
11
+ exports.ObjectDefRef = ObjectDefRef;
12
+ exports.UnderlyingOsdkObject = UnderlyingOsdkObject;
13
+ //# sourceMappingURL=chunk-T4NIFYZS.cjs.map
14
+ //# sourceMappingURL=chunk-T4NIFYZS.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/object/convertWireToOsdkObjects/InternalSymbols.ts"],"names":[],"mappings":";;;AAiBO,IAAM,oBAAuB,GAAA,MAAA,CAA2C,mBAAA,CAA+B;AAGvG,IAAM,YAAe,GAAA,MAAA,CAA2C,kBAAA,CAA8B;AAG9F,IAAM,eAAkB,GAAA,MAAA,CAA2C,qBAAA,CAAiC;AAGpG,IAAM,SAAY,GAAA,MAAA,CAA2C,WAAA,CAAuB","file":"chunk-T4NIFYZS.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\n/** @internal */\nexport const UnderlyingOsdkObject = Symbol(process.env.MODE !== \"production\" ? \"Underlying Object\" : undefined);\n\n/** @internal */\nexport const ObjectDefRef = Symbol(process.env.MODE !== \"production\" ? \"ObjectDefinition\" : undefined);\n\n/** @internal */\nexport const InterfaceDefRef = Symbol(process.env.MODE !== \"production\" ? \"InterfaceDefinition\" : undefined);\n\n/** @internal */\nexport const ClientRef = Symbol(process.env.MODE !== \"production\" ? \"ClientRef\" : undefined);"]}