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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (579) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/build/browser/Client.d.ts +39 -0
  3. package/build/browser/Client.d.ts.map +1 -0
  4. package/build/browser/Client.js +20 -0
  5. package/build/browser/Client.js.map +1 -0
  6. package/build/browser/Definitions.test.d.ts +2 -0
  7. package/build/browser/Definitions.test.d.ts.map +1 -0
  8. package/build/browser/Definitions.test.js +35 -0
  9. package/build/browser/Definitions.test.js.map +1 -0
  10. package/build/browser/Logger.d.ts +19 -0
  11. package/build/browser/Logger.d.ts.map +1 -0
  12. package/build/browser/Logger.js +17 -0
  13. package/build/browser/Logger.js.map +1 -0
  14. package/build/browser/MinimalClientContext.d.ts +26 -0
  15. package/build/browser/MinimalClientContext.d.ts.map +1 -0
  16. package/build/browser/MinimalClientContext.js +17 -0
  17. package/build/browser/MinimalClientContext.js.map +1 -0
  18. package/build/browser/ResultOrError.d.ts +12 -0
  19. package/build/browser/ResultOrError.d.ts.map +1 -0
  20. package/build/browser/ResultOrError.js +19 -0
  21. package/build/browser/ResultOrError.js.map +1 -0
  22. package/build/browser/SatisfiesSemver.d.ts +4 -0
  23. package/build/browser/SatisfiesSemver.d.ts.map +1 -0
  24. package/build/browser/SatisfiesSemver.js +17 -0
  25. package/build/browser/SatisfiesSemver.js.map +1 -0
  26. package/build/browser/SatisfiesSemver.test.d.ts +2 -0
  27. package/build/browser/SatisfiesSemver.test.d.ts.map +1 -0
  28. package/build/browser/SatisfiesSemver.test.js +69 -0
  29. package/build/browser/SatisfiesSemver.test.js.map +1 -0
  30. package/build/browser/__unstable/ConjureSupport.d.ts +55 -0
  31. package/build/browser/__unstable/ConjureSupport.d.ts.map +1 -0
  32. package/build/browser/__unstable/ConjureSupport.js +174 -0
  33. package/build/browser/__unstable/ConjureSupport.js.map +1 -0
  34. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.d.ts +10 -0
  35. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +1 -0
  36. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.js +114 -0
  37. package/build/browser/__unstable/createBulkLinksAsyncIterFactory.js.map +1 -0
  38. package/build/browser/actions/ActionValidationError.d.ts +6 -0
  39. package/build/browser/actions/ActionValidationError.d.ts.map +1 -0
  40. package/build/browser/actions/ActionValidationError.js +23 -0
  41. package/build/browser/actions/ActionValidationError.js.map +1 -0
  42. package/build/browser/actions/actions.test.d.ts +2 -0
  43. package/build/browser/actions/actions.test.d.ts.map +1 -0
  44. package/build/browser/actions/actions.test.js +323 -0
  45. package/build/browser/actions/actions.test.js.map +1 -0
  46. package/build/browser/actions/applyAction.d.ts +30 -0
  47. package/build/browser/actions/applyAction.d.ts.map +1 -0
  48. package/build/browser/actions/applyAction.js +114 -0
  49. package/build/browser/actions/applyAction.js.map +1 -0
  50. package/build/browser/createAttachmentFromRid.d.ts +10 -0
  51. package/build/browser/createAttachmentFromRid.d.ts.map +1 -0
  52. package/build/browser/createAttachmentFromRid.js +38 -0
  53. package/build/browser/createAttachmentFromRid.js.map +1 -0
  54. package/build/browser/createClient.d.ts +6 -0
  55. package/build/browser/createClient.d.ts.map +1 -0
  56. package/build/browser/createClient.js +88 -0
  57. package/build/browser/createClient.js.map +1 -0
  58. package/build/browser/createClient.test.d.ts +2 -0
  59. package/build/browser/createClient.test.d.ts.map +1 -0
  60. package/build/browser/createClient.test.js +45 -0
  61. package/build/browser/createClient.test.js.map +1 -0
  62. package/build/browser/createMinimalClient.d.ts +2 -0
  63. package/build/browser/createMinimalClient.d.ts.map +1 -0
  64. package/build/browser/createMinimalClient.js +42 -0
  65. package/build/browser/createMinimalClient.js.map +1 -0
  66. package/build/browser/createPlatformClient.d.ts +17 -0
  67. package/build/browser/createPlatformClient.d.ts.map +1 -0
  68. package/build/browser/createPlatformClient.js +33 -0
  69. package/build/browser/createPlatformClient.js.map +1 -0
  70. package/build/browser/createTimeseriesProperty.d.ts +14 -0
  71. package/build/browser/createTimeseriesProperty.d.ts.map +1 -0
  72. package/build/browser/createTimeseriesProperty.js +79 -0
  73. package/build/browser/createTimeseriesProperty.js.map +1 -0
  74. package/build/browser/definitions/LinkDefinitions.test.d.ts +2 -0
  75. package/build/browser/definitions/LinkDefinitions.test.d.ts.map +1 -0
  76. package/build/browser/definitions/LinkDefinitions.test.js +41 -0
  77. package/build/browser/definitions/LinkDefinitions.test.js.map +1 -0
  78. package/build/browser/fetchMetadata.d.ts +2 -0
  79. package/build/browser/fetchMetadata.d.ts.map +1 -0
  80. package/build/browser/fetchMetadata.js +35 -0
  81. package/build/browser/fetchMetadata.js.map +1 -0
  82. package/build/browser/fetchMetadata.test.d.ts +2 -0
  83. package/build/browser/fetchMetadata.test.d.ts.map +1 -0
  84. package/build/browser/fetchMetadata.test.js +218 -0
  85. package/build/browser/fetchMetadata.test.js.map +1 -0
  86. package/build/browser/index.d.ts +13 -0
  87. package/build/browser/index.d.ts.map +1 -0
  88. package/build/browser/index.js +22 -725
  89. package/build/browser/index.js.map +1 -1
  90. package/build/browser/intellisense.test.d.ts +2 -0
  91. package/build/browser/intellisense.test.d.ts.map +1 -0
  92. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.d.ts +2 -0
  93. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.d.ts.map +1 -0
  94. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.js +25 -0
  95. package/build/browser/intellisense.test.helpers/callsQueryAcceptsObject.js.map +1 -0
  96. package/build/browser/intellisense.test.js +86 -0
  97. package/build/browser/intellisense.test.js.map +1 -0
  98. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.d.ts +2 -0
  99. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.d.ts.map +1 -0
  100. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.js +34 -0
  101. package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -0
  102. package/build/browser/internal/conversions/modernToLegacyAggregationClause.d.ts +2 -0
  103. package/build/browser/internal/conversions/modernToLegacyAggregationClause.d.ts.map +1 -0
  104. package/build/browser/internal/conversions/modernToLegacyAggregationClause.js +38 -0
  105. package/build/browser/internal/conversions/modernToLegacyAggregationClause.js.map +1 -0
  106. package/build/browser/internal/conversions/modernToLegacyGroupByClause.d.ts +2 -0
  107. package/build/browser/internal/conversions/modernToLegacyGroupByClause.d.ts.map +1 -0
  108. package/build/browser/internal/conversions/modernToLegacyGroupByClause.js +62 -0
  109. package/build/browser/internal/conversions/modernToLegacyGroupByClause.js.map +1 -0
  110. package/build/browser/internal/conversions/modernToLegacyWhereClause.d.ts +2 -0
  111. package/build/browser/internal/conversions/modernToLegacyWhereClause.d.ts.map +1 -0
  112. package/build/browser/internal/conversions/modernToLegacyWhereClause.js +144 -0
  113. package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -0
  114. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.d.ts +2 -0
  115. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.d.ts.map +1 -0
  116. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js +486 -0
  117. package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -0
  118. package/build/browser/object/AttachmentUpload.d.ts +4 -0
  119. package/build/browser/object/AttachmentUpload.d.ts.map +1 -0
  120. package/build/browser/object/AttachmentUpload.js +27 -0
  121. package/build/browser/object/AttachmentUpload.js.map +1 -0
  122. package/build/browser/object/Cache.d.ts +2 -0
  123. package/build/browser/object/Cache.d.ts.map +1 -0
  124. package/build/browser/object/Cache.js +76 -0
  125. package/build/browser/object/Cache.js.map +1 -0
  126. package/build/browser/object/Cache.test.d.ts +11 -0
  127. package/build/browser/object/Cache.test.d.ts.map +1 -0
  128. package/build/browser/object/Cache.test.js +283 -0
  129. package/build/browser/object/Cache.test.js.map +1 -0
  130. package/build/browser/object/SimpleCache.d.ts +38 -0
  131. package/build/browser/object/SimpleCache.d.ts.map +1 -0
  132. package/build/browser/object/SimpleCache.js +67 -0
  133. package/build/browser/object/SimpleCache.js.map +1 -0
  134. package/build/browser/object/aggregate.d.ts +2 -0
  135. package/build/browser/object/aggregate.d.ts.map +1 -0
  136. package/build/browser/object/aggregate.js +69 -0
  137. package/build/browser/object/aggregate.js.map +1 -0
  138. package/build/browser/object/aggregate.test.d.ts +2 -0
  139. package/build/browser/object/aggregate.test.d.ts.map +1 -0
  140. package/build/browser/object/aggregate.test.js +398 -0
  141. package/build/browser/object/aggregate.test.js.map +1 -0
  142. package/build/browser/object/attachment.test.d.ts +2 -0
  143. package/build/browser/object/attachment.test.d.ts.map +1 -0
  144. package/build/browser/object/attachment.test.js +55 -0
  145. package/build/browser/object/attachment.test.js.map +1 -0
  146. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +11 -0
  147. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +1 -0
  148. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js +17 -0
  149. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -0
  150. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.d.ts +13 -0
  151. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +1 -0
  152. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.js +22 -0
  153. package/build/browser/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -0
  154. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.d.ts +2 -0
  155. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.d.ts.map +1 -0
  156. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.js +17 -0
  157. package/build/browser/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -0
  158. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts +2 -0
  159. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +1 -0
  160. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js +48 -0
  161. package/build/browser/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js.map +1 -0
  162. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts +8 -0
  163. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.d.ts.map +1 -0
  164. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js +17 -0
  165. package/build/browser/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js.map +1 -0
  166. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.d.ts +2 -0
  167. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.d.ts.map +1 -0
  168. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +82 -0
  169. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -0
  170. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.d.ts +2 -0
  171. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.d.ts.map +1 -0
  172. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +114 -0
  173. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -0
  174. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.d.ts +3 -0
  175. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +1 -0
  176. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.js +55 -0
  177. package/build/browser/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -0
  178. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.d.ts +2 -0
  179. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.d.ts.map +1 -0
  180. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js +60 -0
  181. package/build/browser/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -0
  182. package/build/browser/object/convertWireToOsdkObjects.d.ts +2 -0
  183. package/build/browser/object/convertWireToOsdkObjects.d.ts.map +1 -0
  184. package/build/browser/object/convertWireToOsdkObjects.js +150 -0
  185. package/build/browser/object/convertWireToOsdkObjects.js.map +1 -0
  186. package/build/browser/object/convertWireToOsdkObjects.test.d.ts +2 -0
  187. package/build/browser/object/convertWireToOsdkObjects.test.d.ts.map +1 -0
  188. package/build/browser/object/convertWireToOsdkObjects.test.js +254 -0
  189. package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -0
  190. package/build/browser/object/fetchPage.d.ts +3 -0
  191. package/build/browser/object/fetchPage.d.ts.map +1 -0
  192. package/build/browser/object/fetchPage.js +135 -0
  193. package/build/browser/object/fetchPage.js.map +1 -0
  194. package/build/browser/object/fetchPage.test.d.ts +2 -0
  195. package/build/browser/object/fetchPage.test.d.ts.map +1 -0
  196. package/build/browser/object/fetchPage.test.js +106 -0
  197. package/build/browser/object/fetchPage.test.js.map +1 -0
  198. package/build/browser/object/fetchSingle.d.ts +2 -0
  199. package/build/browser/object/fetchSingle.d.ts.map +1 -0
  200. package/build/browser/object/fetchSingle.js +47 -0
  201. package/build/browser/object/fetchSingle.js.map +1 -0
  202. package/build/browser/object/object.test.d.ts +12 -0
  203. package/build/browser/object/object.test.d.ts.map +1 -0
  204. package/build/browser/object/object.test.js +179 -0
  205. package/build/browser/object/object.test.js.map +1 -0
  206. package/build/browser/object/timeseries.test.d.ts +2 -0
  207. package/build/browser/object/timeseries.test.d.ts.map +1 -0
  208. package/build/browser/object/timeseries.test.js +163 -0
  209. package/build/browser/object/timeseries.test.js.map +1 -0
  210. package/build/browser/objectSet/ObjectSet.test.d.ts +2 -0
  211. package/build/browser/objectSet/ObjectSet.test.d.ts.map +1 -0
  212. package/build/browser/objectSet/ObjectSet.test.js +313 -0
  213. package/build/browser/objectSet/ObjectSet.test.js.map +1 -0
  214. package/build/browser/objectSet/ObjectSetFactory.d.ts +2 -0
  215. package/build/browser/objectSet/ObjectSetFactory.d.ts.map +1 -0
  216. package/build/browser/objectSet/ObjectSetFactory.js +17 -0
  217. package/build/browser/objectSet/ObjectSetFactory.js.map +1 -0
  218. package/build/browser/objectSet/ObjectSetListenerWebsocket.d.ts +7 -0
  219. package/build/browser/objectSet/ObjectSetListenerWebsocket.d.ts.map +1 -0
  220. package/build/browser/objectSet/ObjectSetListenerWebsocket.js +533 -0
  221. package/build/browser/objectSet/ObjectSetListenerWebsocket.js.map +1 -0
  222. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.d.ts +2 -0
  223. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.d.ts.map +1 -0
  224. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js +338 -0
  225. package/build/browser/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -0
  226. package/build/browser/objectSet/conjureUnionType.d.ts +13 -0
  227. package/build/browser/objectSet/conjureUnionType.d.ts.map +1 -0
  228. package/build/browser/objectSet/conjureUnionType.js +27 -0
  229. package/build/browser/objectSet/conjureUnionType.js.map +1 -0
  230. package/build/browser/objectSet/createObjectSet.d.ts +2 -0
  231. package/build/browser/objectSet/createObjectSet.d.ts.map +1 -0
  232. package/build/browser/objectSet/createObjectSet.js +136 -0
  233. package/build/browser/objectSet/createObjectSet.js.map +1 -0
  234. package/build/browser/objectSet/toConjureObjectSet.d.ts +2 -0
  235. package/build/browser/objectSet/toConjureObjectSet.d.ts.map +1 -0
  236. package/build/browser/objectSet/toConjureObjectSet.js +158 -0
  237. package/build/browser/objectSet/toConjureObjectSet.js.map +1 -0
  238. package/build/browser/ontology/OntologyProvider.d.ts +32 -0
  239. package/build/browser/ontology/OntologyProvider.d.ts.map +1 -0
  240. package/build/browser/ontology/OntologyProvider.js +17 -0
  241. package/build/browser/ontology/OntologyProvider.js.map +1 -0
  242. package/build/browser/ontology/StandardOntologyProvider.d.ts +5 -0
  243. package/build/browser/ontology/StandardOntologyProvider.d.ts.map +1 -0
  244. package/build/browser/ontology/StandardOntologyProvider.js +59 -0
  245. package/build/browser/ontology/StandardOntologyProvider.js.map +1 -0
  246. package/build/browser/ontology/StandardOntologyProvider.test.d.ts +2 -0
  247. package/build/browser/ontology/StandardOntologyProvider.test.d.ts.map +1 -0
  248. package/build/browser/ontology/StandardOntologyProvider.test.js +48 -0
  249. package/build/browser/ontology/StandardOntologyProvider.test.js.map +1 -0
  250. package/build/browser/ontology/loadActionMetadata.d.ts +4 -0
  251. package/build/browser/ontology/loadActionMetadata.d.ts.map +1 -0
  252. package/build/browser/ontology/loadActionMetadata.js +22 -0
  253. package/build/browser/ontology/loadActionMetadata.js.map +1 -0
  254. package/build/browser/ontology/loadFullObjectMetadata.d.ts +6 -0
  255. package/build/browser/ontology/loadFullObjectMetadata.d.ts.map +1 -0
  256. package/build/browser/ontology/loadFullObjectMetadata.js +28 -0
  257. package/build/browser/ontology/loadFullObjectMetadata.js.map +1 -0
  258. package/build/browser/ontology/loadInterfaceMetadata.d.ts +4 -0
  259. package/build/browser/ontology/loadInterfaceMetadata.d.ts.map +1 -0
  260. package/build/browser/ontology/loadInterfaceMetadata.js +24 -0
  261. package/build/browser/ontology/loadInterfaceMetadata.js.map +1 -0
  262. package/build/browser/ontology/loadQueryMetadata.d.ts +4 -0
  263. package/build/browser/ontology/loadQueryMetadata.d.ts.map +1 -0
  264. package/build/browser/ontology/loadQueryMetadata.js +22 -0
  265. package/build/browser/ontology/loadQueryMetadata.js.map +1 -0
  266. package/build/browser/ontology/makeConjureContext.d.ts +4 -0
  267. package/build/browser/ontology/makeConjureContext.d.ts.map +1 -0
  268. package/build/browser/ontology/makeConjureContext.js +28 -0
  269. package/build/browser/ontology/makeConjureContext.js.map +1 -0
  270. package/build/browser/pageRequestAsAsyncIter.d.ts +10 -0
  271. package/build/browser/pageRequestAsAsyncIter.d.ts.map +1 -0
  272. package/build/browser/pageRequestAsAsyncIter.js +37 -0
  273. package/build/browser/pageRequestAsAsyncIter.js.map +1 -0
  274. package/build/browser/public/unstable-do-not-use.d.ts +2 -0
  275. package/build/browser/public/unstable-do-not-use.d.ts.map +1 -0
  276. package/build/browser/public/unstable-do-not-use.js +16 -2
  277. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  278. package/build/browser/queries/applyQuery.d.ts +6 -0
  279. package/build/browser/queries/applyQuery.d.ts.map +1 -0
  280. package/build/browser/queries/applyQuery.js +234 -0
  281. package/build/browser/queries/applyQuery.js.map +1 -0
  282. package/build/browser/queries/queries.test.d.ts +2 -0
  283. package/build/browser/queries/queries.test.d.ts.map +1 -0
  284. package/build/browser/queries/queries.test.js +171 -0
  285. package/build/browser/queries/queries.test.js.map +1 -0
  286. package/build/browser/queries/types.d.ts +20 -0
  287. package/build/browser/queries/types.d.ts.map +1 -0
  288. package/build/browser/queries/types.js +17 -0
  289. package/build/browser/queries/types.js.map +1 -0
  290. package/build/browser/tsserver.d.ts +34 -0
  291. package/build/browser/tsserver.d.ts.map +1 -0
  292. package/build/browser/tsserver.js +133 -0
  293. package/build/browser/tsserver.js.map +1 -0
  294. package/build/browser/util/ArrayElement.d.ts +2 -0
  295. package/build/browser/util/ArrayElement.d.ts.map +1 -0
  296. package/build/browser/util/ArrayElement.js +17 -0
  297. package/build/browser/util/ArrayElement.js.map +1 -0
  298. package/build/browser/util/NOOP.d.ts +4 -0
  299. package/build/browser/util/NOOP.d.ts.map +1 -0
  300. package/build/browser/util/NOOP.js +17 -0
  301. package/build/browser/util/NOOP.js.map +1 -0
  302. package/build/browser/util/NullableProps.d.ts +6 -0
  303. package/build/browser/util/NullableProps.d.ts.map +1 -0
  304. package/build/browser/util/NullableProps.js +17 -0
  305. package/build/browser/util/NullableProps.js.map +1 -0
  306. package/build/browser/util/UserAgent.d.ts +2 -0
  307. package/build/browser/util/UserAgent.d.ts.map +1 -0
  308. package/build/browser/util/UserAgent.js +17 -0
  309. package/build/browser/util/UserAgent.js.map +1 -0
  310. package/build/browser/util/WireObjectSet.d.ts +2 -0
  311. package/build/browser/util/WireObjectSet.d.ts.map +1 -0
  312. package/build/browser/util/WireObjectSet.js +21 -0
  313. package/build/browser/util/WireObjectSet.js.map +1 -0
  314. package/build/browser/util/addUserAgentAndRequestContextHeaders.d.ts +4 -0
  315. package/build/browser/util/addUserAgentAndRequestContextHeaders.d.ts.map +1 -0
  316. package/build/browser/util/addUserAgentAndRequestContextHeaders.js +27 -0
  317. package/build/browser/util/addUserAgentAndRequestContextHeaders.js.map +1 -0
  318. package/build/browser/util/augmentRequestContext.d.ts +32 -0
  319. package/build/browser/util/augmentRequestContext.d.ts.map +1 -0
  320. package/build/browser/util/augmentRequestContext.js +52 -0
  321. package/build/browser/util/augmentRequestContext.js.map +1 -0
  322. package/build/browser/util/isOntologyObjectV2.d.ts +2 -0
  323. package/build/browser/util/isOntologyObjectV2.d.ts.map +1 -0
  324. package/build/browser/util/isOntologyObjectV2.js +20 -0
  325. package/build/browser/util/isOntologyObjectV2.js.map +1 -0
  326. package/build/browser/util/isOsdkBaseObject.d.ts +3 -0
  327. package/build/browser/util/isOsdkBaseObject.d.ts.map +1 -0
  328. package/build/browser/util/isOsdkBaseObject.js +19 -0
  329. package/build/browser/util/isOsdkBaseObject.js.map +1 -0
  330. package/build/browser/util/isOsdkObject.d.ts +3 -0
  331. package/build/browser/util/isOsdkObject.d.ts.map +1 -0
  332. package/build/browser/util/isOsdkObject.js +19 -0
  333. package/build/browser/util/isOsdkObject.js.map +1 -0
  334. package/build/browser/util/partialBy.d.ts +3 -0
  335. package/build/browser/util/partialBy.d.ts.map +1 -0
  336. package/build/browser/util/partialBy.js +17 -0
  337. package/build/browser/util/partialBy.js.map +1 -0
  338. package/build/browser/util/streamutils.d.ts +3 -0
  339. package/build/browser/util/streamutils.d.ts.map +1 -0
  340. package/build/browser/util/streamutils.js +95 -0
  341. package/build/browser/util/streamutils.js.map +1 -0
  342. package/build/browser/util/toDataValue.d.ts +2 -0
  343. package/build/browser/util/toDataValue.d.ts.map +1 -0
  344. package/build/browser/util/toDataValue.js +73 -0
  345. package/build/browser/util/toDataValue.js.map +1 -0
  346. package/build/browser/util/toDataValue.test.d.ts +2 -0
  347. package/build/browser/util/toDataValue.test.d.ts.map +1 -0
  348. package/build/browser/util/toDataValue.test.js +117 -0
  349. package/build/browser/util/toDataValue.test.js.map +1 -0
  350. package/build/browser/util/toDataValueQueries.d.ts +2 -0
  351. package/build/browser/util/toDataValueQueries.d.ts.map +1 -0
  352. package/build/browser/util/toDataValueQueries.js +107 -0
  353. package/build/browser/util/toDataValueQueries.js.map +1 -0
  354. package/build/esm/Client.d.ts +6 -7
  355. package/build/esm/Client.d.ts.map +1 -1
  356. package/build/esm/Client.js +20 -0
  357. package/build/esm/Client.js.map +1 -0
  358. package/build/esm/Definitions.test.js +35 -0
  359. package/build/esm/Definitions.test.js.map +1 -0
  360. package/build/esm/Logger.js +17 -0
  361. package/build/esm/Logger.js.map +1 -0
  362. package/build/esm/MinimalClientContext.js +17 -0
  363. package/build/esm/MinimalClientContext.js.map +1 -0
  364. package/build/esm/ResultOrError.js +19 -0
  365. package/build/esm/ResultOrError.js.map +1 -0
  366. package/build/esm/SatisfiesSemver.js +17 -0
  367. package/build/esm/SatisfiesSemver.js.map +1 -0
  368. package/build/esm/SatisfiesSemver.test.js +69 -0
  369. package/build/esm/SatisfiesSemver.test.js.map +1 -0
  370. package/build/esm/__unstable/ConjureSupport.js +174 -0
  371. package/build/esm/__unstable/ConjureSupport.js.map +1 -0
  372. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts +1 -1
  373. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +1 -1
  374. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js +114 -0
  375. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js.map +1 -0
  376. package/build/esm/actions/ActionValidationError.d.ts +1 -1
  377. package/build/esm/actions/ActionValidationError.d.ts.map +1 -1
  378. package/build/esm/actions/ActionValidationError.js +23 -0
  379. package/build/esm/actions/ActionValidationError.js.map +1 -0
  380. package/build/esm/actions/actions.test.js +323 -0
  381. package/build/esm/actions/actions.test.js.map +1 -0
  382. package/build/esm/actions/applyAction.d.ts +9 -10
  383. package/build/esm/actions/applyAction.d.ts.map +1 -1
  384. package/build/esm/actions/applyAction.js +114 -0
  385. package/build/esm/actions/applyAction.js.map +1 -0
  386. package/build/esm/createAttachmentFromRid.d.ts +1 -1
  387. package/build/esm/createAttachmentFromRid.d.ts.map +1 -1
  388. package/build/esm/createAttachmentFromRid.js +38 -0
  389. package/build/esm/createAttachmentFromRid.js.map +1 -0
  390. package/build/esm/createClient.d.ts.map +1 -1
  391. package/build/esm/createClient.js +88 -0
  392. package/build/esm/createClient.js.map +1 -0
  393. package/build/esm/createClient.test.js +45 -0
  394. package/build/esm/createClient.test.js.map +1 -0
  395. package/build/esm/createMinimalClient.js +42 -0
  396. package/build/esm/createMinimalClient.js.map +1 -0
  397. package/build/esm/createPlatformClient.js +33 -0
  398. package/build/esm/createPlatformClient.js.map +1 -0
  399. package/build/esm/createTimeseriesProperty.d.ts +12 -2
  400. package/build/esm/createTimeseriesProperty.d.ts.map +1 -1
  401. package/build/esm/createTimeseriesProperty.js +79 -0
  402. package/build/esm/createTimeseriesProperty.js.map +1 -0
  403. package/build/esm/definitions/LinkDefinitions.test.js +41 -0
  404. package/build/esm/definitions/LinkDefinitions.test.js.map +1 -0
  405. package/build/esm/fetchMetadata.js +35 -0
  406. package/build/esm/fetchMetadata.js.map +1 -0
  407. package/build/esm/fetchMetadata.test.js +218 -0
  408. package/build/esm/fetchMetadata.test.js.map +1 -0
  409. package/build/esm/index.d.ts +2 -2
  410. package/build/esm/index.d.ts.map +1 -1
  411. package/build/esm/index.js +22 -725
  412. package/build/esm/index.js.map +1 -1
  413. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js +25 -0
  414. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js.map +1 -0
  415. package/build/esm/intellisense.test.js +86 -0
  416. package/build/esm/intellisense.test.js.map +1 -0
  417. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js +34 -0
  418. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -0
  419. package/build/esm/internal/conversions/modernToLegacyAggregationClause.js +38 -0
  420. package/build/esm/internal/conversions/modernToLegacyAggregationClause.js.map +1 -0
  421. package/build/esm/internal/conversions/modernToLegacyGroupByClause.js +62 -0
  422. package/build/esm/internal/conversions/modernToLegacyGroupByClause.js.map +1 -0
  423. package/build/esm/internal/conversions/modernToLegacyWhereClause.js +144 -0
  424. package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -0
  425. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js +486 -0
  426. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -0
  427. package/build/esm/object/AttachmentUpload.d.ts +1 -1
  428. package/build/esm/object/AttachmentUpload.d.ts.map +1 -1
  429. package/build/esm/object/AttachmentUpload.js +27 -0
  430. package/build/esm/object/AttachmentUpload.js.map +1 -0
  431. package/build/esm/object/Cache.js +76 -0
  432. package/build/esm/object/Cache.js.map +1 -0
  433. package/build/esm/object/Cache.test.js +283 -0
  434. package/build/esm/object/Cache.test.js.map +1 -0
  435. package/build/esm/object/SimpleCache.js +67 -0
  436. package/build/esm/object/SimpleCache.js.map +1 -0
  437. package/build/esm/object/aggregate.js +69 -0
  438. package/build/esm/object/aggregate.js.map +1 -0
  439. package/build/esm/object/aggregate.test.js +398 -0
  440. package/build/esm/object/aggregate.test.js.map +1 -0
  441. package/build/esm/object/attachment.test.js +55 -0
  442. package/build/esm/object/attachment.test.js.map +1 -0
  443. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +4 -5
  444. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +1 -1
  445. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js +17 -0
  446. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -0
  447. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts +2 -3
  448. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +1 -1
  449. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js +22 -0
  450. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -0
  451. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js +17 -0
  452. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -0
  453. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +1 -1
  454. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js +48 -0
  455. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js.map +1 -0
  456. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js +17 -0
  457. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js.map +1 -0
  458. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +82 -0
  459. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -0
  460. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +114 -0
  461. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -0
  462. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts +1 -1
  463. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +1 -1
  464. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js +55 -0
  465. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -0
  466. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js +60 -0
  467. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -0
  468. package/build/esm/object/convertWireToOsdkObjects.js +150 -0
  469. package/build/esm/object/convertWireToOsdkObjects.js.map +1 -0
  470. package/build/esm/object/convertWireToOsdkObjects.test.js +254 -0
  471. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -0
  472. package/build/esm/object/fetchPage.d.ts +2 -3
  473. package/build/esm/object/fetchPage.d.ts.map +1 -1
  474. package/build/esm/object/fetchPage.js +135 -0
  475. package/build/esm/object/fetchPage.js.map +1 -0
  476. package/build/esm/object/fetchPage.test.js +106 -0
  477. package/build/esm/object/fetchPage.test.js.map +1 -0
  478. package/build/esm/object/fetchSingle.js +47 -0
  479. package/build/esm/object/fetchSingle.js.map +1 -0
  480. package/build/esm/object/object.test.d.ts +1 -1
  481. package/build/esm/object/object.test.d.ts.map +1 -1
  482. package/build/esm/object/object.test.js +179 -0
  483. package/build/esm/object/object.test.js.map +1 -0
  484. package/build/esm/object/timeseries.test.js +163 -0
  485. package/build/esm/object/timeseries.test.js.map +1 -0
  486. package/build/esm/objectSet/ObjectSet.test.js +313 -0
  487. package/build/esm/objectSet/ObjectSet.test.js.map +1 -0
  488. package/build/esm/objectSet/ObjectSetFactory.js +17 -0
  489. package/build/esm/objectSet/ObjectSetFactory.js.map +1 -0
  490. package/build/esm/objectSet/ObjectSetListenerWebsocket.d.ts.map +1 -1
  491. package/build/esm/objectSet/ObjectSetListenerWebsocket.js +536 -0
  492. package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -0
  493. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js +338 -0
  494. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -0
  495. package/build/esm/objectSet/conjureUnionType.js +27 -0
  496. package/build/esm/objectSet/conjureUnionType.js.map +1 -0
  497. package/build/esm/objectSet/createObjectSet.js +136 -0
  498. package/build/esm/objectSet/createObjectSet.js.map +1 -0
  499. package/build/esm/objectSet/toConjureObjectSet.js +158 -0
  500. package/build/esm/objectSet/toConjureObjectSet.js.map +1 -0
  501. package/build/esm/ontology/OntologyProvider.d.ts +5 -5
  502. package/build/esm/ontology/OntologyProvider.d.ts.map +1 -1
  503. package/build/esm/ontology/OntologyProvider.js +17 -0
  504. package/build/esm/ontology/OntologyProvider.js.map +1 -0
  505. package/build/esm/ontology/StandardOntologyProvider.js +59 -0
  506. package/build/esm/ontology/StandardOntologyProvider.js.map +1 -0
  507. package/build/esm/ontology/StandardOntologyProvider.test.js +48 -0
  508. package/build/esm/ontology/StandardOntologyProvider.test.js.map +1 -0
  509. package/build/esm/ontology/loadActionMetadata.d.ts +1 -1
  510. package/build/esm/ontology/loadActionMetadata.d.ts.map +1 -1
  511. package/build/esm/ontology/loadActionMetadata.js +22 -0
  512. package/build/esm/ontology/loadActionMetadata.js.map +1 -0
  513. package/build/esm/ontology/loadFullObjectMetadata.d.ts +1 -1
  514. package/build/esm/ontology/loadFullObjectMetadata.d.ts.map +1 -1
  515. package/build/esm/ontology/loadFullObjectMetadata.js +28 -0
  516. package/build/esm/ontology/loadFullObjectMetadata.js.map +1 -0
  517. package/build/esm/ontology/loadInterfaceMetadata.d.ts +1 -1
  518. package/build/esm/ontology/loadInterfaceMetadata.d.ts.map +1 -1
  519. package/build/esm/ontology/loadInterfaceMetadata.js +24 -0
  520. package/build/esm/ontology/loadInterfaceMetadata.js.map +1 -0
  521. package/build/esm/ontology/loadQueryMetadata.js +22 -0
  522. package/build/esm/ontology/loadQueryMetadata.js.map +1 -0
  523. package/build/esm/ontology/makeConjureContext.js +28 -0
  524. package/build/esm/ontology/makeConjureContext.js.map +1 -0
  525. package/build/esm/pageRequestAsAsyncIter.js +37 -0
  526. package/build/esm/pageRequestAsAsyncIter.js.map +1 -0
  527. package/build/esm/public/unstable-do-not-use.js +16 -2
  528. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  529. package/build/esm/queries/applyQuery.d.ts +1 -2
  530. package/build/esm/queries/applyQuery.d.ts.map +1 -1
  531. package/build/esm/queries/applyQuery.js +234 -0
  532. package/build/esm/queries/applyQuery.js.map +1 -0
  533. package/build/esm/queries/queries.test.js +171 -0
  534. package/build/esm/queries/queries.test.js.map +1 -0
  535. package/build/esm/queries/types.d.ts +1 -2
  536. package/build/esm/queries/types.d.ts.map +1 -1
  537. package/build/esm/queries/types.js +17 -0
  538. package/build/esm/queries/types.js.map +1 -0
  539. package/build/esm/tsserver.js +133 -0
  540. package/build/esm/tsserver.js.map +1 -0
  541. package/build/esm/util/ArrayElement.js +17 -0
  542. package/build/esm/util/ArrayElement.js.map +1 -0
  543. package/build/esm/util/NOOP.js +17 -0
  544. package/build/esm/util/NOOP.js.map +1 -0
  545. package/build/esm/util/NullableProps.js +17 -0
  546. package/build/esm/util/NullableProps.js.map +1 -0
  547. package/build/esm/util/UserAgent.js +17 -0
  548. package/build/esm/util/UserAgent.js.map +1 -0
  549. package/build/esm/util/WireObjectSet.js +21 -0
  550. package/build/esm/util/WireObjectSet.js.map +1 -0
  551. package/build/esm/util/addUserAgentAndRequestContextHeaders.js +27 -0
  552. package/build/esm/util/addUserAgentAndRequestContextHeaders.js.map +1 -0
  553. package/build/esm/util/augmentRequestContext.js +52 -0
  554. package/build/esm/util/augmentRequestContext.js.map +1 -0
  555. package/build/esm/util/isOntologyObjectV2.js +20 -0
  556. package/build/esm/util/isOntologyObjectV2.js.map +1 -0
  557. package/build/esm/util/isOsdkBaseObject.d.ts +1 -1
  558. package/build/esm/util/isOsdkBaseObject.d.ts.map +1 -1
  559. package/build/esm/util/isOsdkBaseObject.js +19 -0
  560. package/build/esm/util/isOsdkBaseObject.js.map +1 -0
  561. package/build/esm/util/isOsdkObject.d.ts +1 -1
  562. package/build/esm/util/isOsdkObject.d.ts.map +1 -1
  563. package/build/esm/util/isOsdkObject.js +19 -0
  564. package/build/esm/util/isOsdkObject.js.map +1 -0
  565. package/build/esm/util/partialBy.js +17 -0
  566. package/build/esm/util/partialBy.js.map +1 -0
  567. package/build/esm/util/streamutils.js +95 -0
  568. package/build/esm/util/streamutils.js.map +1 -0
  569. package/build/esm/util/toDataValue.js +73 -0
  570. package/build/esm/util/toDataValue.js.map +1 -0
  571. package/build/esm/util/toDataValue.test.js +117 -0
  572. package/build/esm/util/toDataValue.test.js.map +1 -0
  573. package/build/esm/util/toDataValueQueries.js +107 -0
  574. package/build/esm/util/toDataValueQueries.js.map +1 -0
  575. package/package.json +14 -18
  576. package/build/browser/chunk-CG25K4WC.js +0 -2502
  577. package/build/browser/chunk-CG25K4WC.js.map +0 -1
  578. package/build/esm/chunk-MQTCPUPF.js +0 -2505
  579. package/build/esm/chunk-MQTCPUPF.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/actions/ActionValidationError.ts","../../src/pageRequestAsAsyncIter.ts","../../src/__unstable/createBulkLinksAsyncIterFactory.ts","../../src/object/AttachmentUpload.ts","../../src/util/isOntologyObjectV2.ts","../../src/util/isOsdkObject.ts","../../src/util/toDataValue.ts","../../src/actions/applyAction.ts","../../src/ontology/loadActionMetadata.ts","../../src/ontology/loadFullObjectMetadata.ts","../../src/ontology/loadInterfaceMetadata.ts","../../src/ontology/loadQueryMetadata.ts","../../src/ontology/StandardOntologyProvider.ts","../../src/util/UserAgent.ts","../../src/createMinimalClient.ts","../../src/fetchMetadata.ts","../../src/util/isOsdkBaseObject.ts","../../src/util/toDataValueQueries.ts","../../src/queries/applyQuery.ts","../../src/createClient.ts","../../src/createPlatformClient.ts"],"names":["invariant","client","isOsdkBaseObject","createSharedClientContext"],"mappings":";;;;;;;;;;;;AAgBa,IAAA,qBAAA,GAAN,cAAoC,KAAM,CAAA;AAAA,EAC/C,YAAY,UAAY,EAAA;AACtB,IAAA,KAAA,CAAM,kBAAkB,CAAA,CAAA;AACxB,IAAA,IAAA,CAAK,UAAa,GAAA,UAAA,CAAA;AAAA,GACpB;AACF,EAAA;;;ACLO,SAAS,WAAW,CAAG,EAAA;AAC5B,EAAA,OAAO,CAAE,CAAA,OAAA,CAAA;AACX,CAAA;AACO,SAAS,eAAe,OAAS,EAAA;AAAA,EACtC,SAAA;AACF,CAAG,EAAA;AACD,EAAA,OAAO,SAAY,GAAA;AAAA,IACjB,GAAG,OAAA;AAAA,IACH,SAAA;AAAA,GACE,GAAA,KAAA,CAAA,CAAA;AACN,CAAA;AACA,gBAAuB,sBAAuB,CAAA,IAAA,EAAM,MAAQ,EAAA,QAAA,EAAU,cAAgB,EAAA;AACpF,EAAA,IAAI,OAAU,GAAA,cAAA,C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ACrB,KAAO,EAAA,SAAA;AAAA,KACT;AAAA,IACA,CAAC,+CAA+C,GAAG;AAAA,MACjD,GAAA,EAAK,MAAM,+BAAA,CAAgC,SAAS,CAAA;AAAA,KACtD;AAAA,IACA,CAAC,uDAAuD,GAAG;AAAA,MACzD,GAAK,EAAA,MAAM,CAAC,UAAA,EAAY,GAAQ,KAAA;AAC9B,QAAA,OAAO,eAAgB,CAAA,UAAA,EAAY,MAAO,CAAA,mBAAmB,CAAG,EAAA;AAAA,UAC9D,IAAM,EAAA,WAAA;AAAA,UACN,YAAY,CAAC;AAAA,YACX,IAAM,EAAA,MAAA;AAAA,YACN,YAAY,UAAW,CAAA,OAAA;AAAA,WACtB,EAAA;AAAA,YACD,IAAM,EAAA,WAAA;AAAA,YACN,SAAW,EAAA,GAAA;AAAA,WACZ,CAAA;AAAA,SACF,CAAA,CAAA;AAAA,OACH;AAAA,KACF;AAAA,IACA,aAAe,EAAA;AAAA,MACb,KAAO,EAAA,aAAA;AAAA,KACT;AAAA,GACD,CAAA,CAAA;AACD,EAAO,OAAA,MAAA,CAAA;AACT,CAAA;AACO,IAAM,YAAe,GAAA,oBAAA,CAAqB,IAAK,CAAA,KAAA,CAAA,EAAW,eAAe,EAAA;ACxDzE,SAAS,qBAAqB,OAAS,EAAA,aAAA,EAAe,OAAU,GAAA,KAAA,CAAA,EAAW,UAAU,KAAO,EAAA;AACjG,EAAA,OAAOC,yBAA0B,CAAA,OAAA,EAAS,aAAe,EAAA,UAAA,EAAY,OAAO,CAAA,CAAA;AAC9E","file":"index.js","sourcesContent":["/*\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\nexport class ActionValidationError extends Error {\n constructor(validation) {\n super(\"Validation Error\");\n this.validation = validation;\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 getResults(x) {\n return x.results;\n}\nexport function applyPageToken(payload, {\n pageToken\n}) {\n return pageToken ? {\n ...payload,\n pageToken\n } : undefined;\n}\nexport async function* pageRequestAsAsyncIter(call, values, nextArgs, initialPayload) {\n let payload = initialPayload;\n while (payload) {\n const r = await call(payload);\n for (const q of values(r)) {\n yield q;\n }\n payload = nextArgs(payload, r);\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 { getBulkLinksPage } from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport { conjureUnionType } from \"../objectSet/conjureUnionType.js\";\nimport { makeConjureContext } from \"../ontology/makeConjureContext.js\";\nimport { applyPageToken, getResults, pageRequestAsAsyncIter } from \"../pageRequestAsAsyncIter.js\";\nimport { metadataCacheClient } from \"./ConjureSupport.js\";\nexport function createBulkLinksAsyncIterFactory(ctx) {\n return async function* (objs, linkTypes) {\n if (objs.length === 0) {\n return;\n }\n ctx.logger?.debug(\"Preparing to fetch bulk links\");\n\n // require all objects to be the same type for now\n !objs.every(a => a.$objectType === objs[0].$objectType) ? process.env.NODE_ENV !== \"production\" ? invariant(false) : invariant(false) : void 0;\n const mcc = await metadataCacheClient(ctx);\n const helper = await mcc.forObjectByApiName(objs[0].$objectType);\n const [objectTypeRid, propertyMapping, fullLinkMapping] = await Promise.all([helper.getRid(), helper.getPropertyMapping(), helper.getLinkMapping()]);\n const linkMapping = Object.fromEntries(Object.entries(fullLinkMapping).filter(([apiName]) => linkTypes.includes(apiName)));\n\n // make sure the link being requested exists\n for (const linkType of linkTypes) {\n if (linkMapping[linkType] == null) {\n throw \"Unable to find link type: \" + linkType;\n }\n }\n const req = {\n objectSetContext: {\n forkRid: undefined,\n objectSetFilterContext: {\n parameterOverrides: {}\n },\n ontologyBranchRid: undefined,\n owningRid: undefined,\n reportUsage: undefined,\n workstateRid: undefined\n },\n responseOptions: {\n includeObjectSetEntities: true,\n includeUsageCost: false\n },\n pageSize: 1000,\n pageToken: undefined,\n linksRequests: [{\n directedLinkTypes: Object.values(linkMapping).map(({\n directedLinkTypeRid\n }) => directedLinkTypeRid),\n objects: conjureUnionType(\"objects\", objs.map(o => conjureUnionType(\"objectLocatorV2\", {\n objectTypeRid,\n objectPrimaryKey: {\n [propertyMapping.pk.rid]: conjureUnionType(propertyMapping.pk.type.type, o.$primaryKey)\n }\n })))\n }]\n };\n const bulkLinksIter = pageRequestAsAsyncIter(getBulkLinksPage.bind(undefined, makeConjureContext(ctx, \"/object-set-service/api\")), getResults, applyPageToken, req);\n for await (const item of bulkLinksIter) {\n const {\n objectIdentifier\n } = item;\n const obj = findObject(objectIdentifier, objs);\n for (const link of item.links) {\n const ref = link.link[link.linkSide === \"SOURCE\" ? \"objectSideB\" : \"objectSideA\"];\n const pk = getPrimaryKeyOrThrow(ref);\n const otherObjectApiName = await (await mcc.forObjectByRid(pk.objectTypeRid)).getApiName();\n const mappedLink = Object.values(linkMapping).find(a => a.directedLinkTypeRid.linkTypeRid === link.link.linkTypeRid && a.directedLinkTypeRid.linkSide === link.linkSide);\n if (!mappedLink) throw new Error(\"Could not find link type\"); // should not happens\n\n yield {\n object: obj,\n linkApiName: mappedLink.apiName,\n otherObjectApiName: otherObjectApiName,\n otherObjectPk: pk.pkValue\n };\n }\n }\n };\n}\nfunction findObject(objectIdentifier, objs) {\n const {\n pkValue\n } = getPrimaryKeyOrThrow(objectIdentifier);\n const obj = objs.find(o => o.$primaryKey === pkValue);\n if (obj == null) {\n throw new Error(`Needed to find object with pk ${pkValue}} and could not`);\n }\n return obj;\n}\nfunction getPrimaryKeyOrThrow(ref) {\n if (\"type\" in ref && ref.type !== \"objectLocatorV2\") {\n throw new Error(\"We do not support looking up object by rid\");\n }\n const pks = Object.entries(ref.objectLocatorV2.objectPrimaryKey);\n if (pks.length !== 1) {\n throw new Error(\"Unable to support this request due to multiple pks\");\n }\n return {\n objectTypeRid: ref.objectLocatorV2.objectTypeRid,\n pkValue: pks[0][1][pks[0][1].type]\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\nexport function isAttachmentUpload(o) {\n return o instanceof Blob && \"name\" in o;\n}\nexport function createAttachmentUpload(data, name) {\n const attachmentUpload = Object.create(data, {\n name: {\n value: name\n }\n });\n return attachmentUpload;\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/** @internal */\nexport function isOntologyObjectV2(o) {\n return o && typeof o === \"object\" && typeof o.__apiName === \"string\" && o.__primaryKey != null;\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 isOsdkBaseObject(o) {\n return o && typeof o === \"object\" && typeof o.$apiName === \"string\" && o.$primaryKey != null;\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 { OntologiesV2 } from \"@osdk/internal.foundry\";\nimport { isAttachmentUpload } from \"../object/AttachmentUpload.js\";\nimport { getWireObjectSet, isObjectSet } from \"../objectSet/createObjectSet.js\";\nimport { isOntologyObjectV2 } from \"./isOntologyObjectV2.js\";\nimport { isOsdkBaseObject } from \"./isOsdkObject.js\";\nimport { isWireObjectSet } from \"./WireObjectSet.js\";\n\n/**\n * Marshall user-facing data into the wire DataValue type\n *\n * @see DataValue for the expected payloads\n * @internal\n */\nexport async function toDataValue(value, client) {\n if (value == null) {\n // typeof null is 'object' so do this first\n return value;\n }\n\n // arrays and sets are both sent over the wire as arrays\n if (Array.isArray(value) || value instanceof Set) {\n const promiseArray = Array.from(value, async innerValue => await toDataValue(innerValue, client));\n return Promise.all(promiseArray);\n }\n\n // For uploads, we need to upload ourselves first to get the RID of the attachment\n if (isAttachmentUpload(value)) {\n const attachment = await OntologiesV2.Attachments.uploadAttachmentV2(client, value, {\n filename: value.name\n });\n return await toDataValue(attachment.rid, client);\n }\n\n // objects just send the JSON'd primaryKey\n if (isOntologyObjectV2(value)) {\n return await toDataValue(value.__primaryKey, client);\n }\n if (isOsdkBaseObject(value)) {\n return await toDataValue(value.$primaryKey, client);\n }\n\n // object set (the rid as a string (passes through the last return), or the ObjectSet definition directly)\n if (isWireObjectSet(value)) {\n return value;\n }\n if (isObjectSet(value)) {\n return getWireObjectSet(value);\n }\n\n // TODO (during queries implementation)\n // two dimensional aggregation\n // three dimensional aggregation\n\n // struct\n if (typeof value === \"object\") {\n return Object.entries(value).reduce(async (promisedAcc, [key, structValue]) => {\n const acc = await promisedAcc;\n acc[key] = await toDataValue(structValue, client);\n return acc;\n }, Promise.resolve({}));\n }\n\n // expected to pass through - boolean, byte, date, decimal, float, double, integer, long, short, string, timestamp\n return value;\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 { OntologiesV2 } from \"@osdk/internal.foundry\";\nimport invariant from \"tiny-invariant\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { toDataValue } from \"../util/toDataValue.js\";\nimport { ActionValidationError } from \"./ActionValidationError.js\";\nexport async function applyAction(client, action, parameters, options = {}) {\n const clientWithHeaders = addUserAgentAndRequestContextHeaders(augmentRequestContext(client, _ => ({\n finalMethodCall: \"applyAction\"\n })), action);\n if (Array.isArray(parameters)) {\n const response = await OntologiesV2.Actions.applyActionBatchV2(clientWithHeaders, await client.ontologyRid, action.apiName, {\n requests: parameters ? await remapBatchActionParams(parameters, client) : [],\n options: {\n returnEdits: options?.$returnEdits ? \"ALL\" : \"NONE\"\n }\n });\n const edits = response.edits;\n return options?.$returnEdits ? edits?.type === \"edits\" ? remapActionResponse(response) : edits : undefined;\n } else {\n const response = await OntologiesV2.Actions.applyActionV2(clientWithHeaders, await client.ontologyRid, action.apiName, {\n parameters: await remapActionParams(parameters, client),\n options: {\n mode: options?.$validateOnly ? \"VALIDATE_ONLY\" : \"VALIDATE_AND_EXECUTE\",\n returnEdits: options?.$returnEdits ? \"ALL\" : \"NONE\"\n }\n });\n if (options?.$validateOnly) {\n return response.validation;\n }\n if (response.validation?.result === \"INVALID\") {\n throw new ActionValidationError(response.validation);\n }\n const edits = response.edits;\n return options?.$returnEdits ? edits?.type === \"edits\" ? remapActionResponse(response) : edits : undefined;\n }\n}\nasync function remapActionParams(params, client) {\n if (params == null) {\n return {};\n }\n const parameterMap = {};\n for (const [key, value] of Object.entries(params)) {\n parameterMap[key] = await toDataValue(value, client);\n }\n return parameterMap;\n}\nasync function remapBatchActionParams(params, client) {\n const remappedParams = await Promise.all(params.map(async param => {\n return {\n parameters: await remapActionParams(param, client)\n };\n }));\n return remappedParams;\n}\nexport function remapActionResponse(response) {\n const editResponses = response?.edits;\n if (editResponses?.type === \"edits\") {\n const remappedActionResponse = {\n type: editResponses.type,\n deletedLinksCount: editResponses.deletedLinksCount,\n deletedObjectsCount: editResponses.deletedObjectsCount,\n addedLinks: [],\n addedObjects: [],\n modifiedObjects: [],\n editedObjectTypes: []\n };\n const editedObjectTypesSet = new Set();\n for (const edit of editResponses.edits) {\n if (edit.type === \"addLink\") {\n remappedActionResponse.addedLinks.push({\n linkTypeApiNameAtoB: edit.linkTypeApiNameAtoB,\n linkTypeApiNameBtoA: edit.linkTypeApiNameBtoA,\n aSideObject: edit.aSideObject,\n bSideObject: edit.bSideObject\n });\n editedObjectTypesSet.add(edit.aSideObject.objectType);\n editedObjectTypesSet.add(edit.bSideObject.objectType);\n } else if (edit.type === \"addObject\") {\n remappedActionResponse.addedObjects.push({\n objectType: edit.objectType,\n primaryKey: edit.primaryKey\n });\n editedObjectTypesSet.add(edit.objectType);\n } else if (edit.type === \"modifyObject\") {\n remappedActionResponse.modifiedObjects.push({\n objectType: edit.objectType,\n primaryKey: edit.primaryKey\n });\n editedObjectTypesSet.add(edit.objectType);\n } else {\n !false ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Unknown edit type\") : invariant(false) : void 0;\n }\n }\n remappedActionResponse.editedObjectTypes = [...editedObjectTypesSet];\n return remappedActionResponse;\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 { wireActionTypeV2ToSdkActionMetadata } from \"@osdk/generator-converters\";\nimport { OntologiesV2 } from \"@osdk/internal.foundry\";\nexport async function loadActionMetadata(client, actionType) {\n const r = await OntologiesV2.ActionTypesV2.getActionTypeV2(client, await client.ontologyRid, actionType);\n return wireActionTypeV2ToSdkActionMetadata(r);\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 { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"@osdk/generator-converters\";\nimport { OntologiesV2 } from \"@osdk/internal.foundry\";\nexport async function loadFullObjectMetadata(client, objectType) {\n const full = await OntologiesV2.ObjectTypesV2.getObjectTypeFullMetadata(client, await client.ontologyRid, objectType, {\n preview: true\n });\n const ret = wireObjectTypeFullMetadataToSdkObjectMetadata(full, true);\n client.logger?.debug(`END loadFullObjectMetadata(${objectType})`);\n return {\n ...ret\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 { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"@osdk/generator-converters\";\nimport { OntologiesV2 } from \"@osdk/internal.foundry\";\nexport async function loadInterfaceMetadata(client, objectType) {\n const r = await OntologiesV2.OntologyInterfaces.getInterfaceType(client, await client.ontologyRid, objectType, {\n preview: true\n });\n return __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(r, true);\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 { wireQueryTypeV2ToSdkQueryMetadata } from \"@osdk/generator-converters\";\nimport { OntologiesV2 } from \"@osdk/internal.foundry\";\nexport async function loadQueryMetadata(client, queryType) {\n const r = await OntologiesV2.QueryTypes.getQueryTypeV2(client, await client.ontologyRid, queryType);\n return wireQueryTypeV2ToSdkQueryMetadata(r);\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 { createAsyncClientCache } from \"../object/Cache.js\";\nimport { loadActionMetadata } from \"./loadActionMetadata.js\";\nimport { loadFullObjectMetadata } from \"./loadFullObjectMetadata.js\";\nimport { loadInterfaceMetadata } from \"./loadInterfaceMetadata.js\";\nimport { loadQueryMetadata } from \"./loadQueryMetadata.js\";\nimport { InterfaceDefinitions } from \"./OntologyProvider.js\";\nexport const createStandardOntologyProviderFactory = client => {\n return client => {\n async function loadObject(client, key) {\n let objectDef = await loadFullObjectMetadata(client, key);\n\n // ensure we have all of the interfaces loaded\n const interfaceDefs = Object.fromEntries((await Promise.all(objectDef.implements?.map(i => ret.getInterfaceDefinition(i)) ?? [])).map(i => [i.apiName, {\n def: i,\n handler: undefined\n }]));\n const fullObjectDef = {\n ...objectDef,\n [InterfaceDefinitions]: interfaceDefs\n };\n return fullObjectDef;\n }\n async function loadInterface(client, key) {\n return loadInterfaceMetadata(client, key);\n }\n async function loadQuery(client, key) {\n const r = await loadQueryMetadata(client, key);\n return r;\n }\n async function loadAction(client, key) {\n const r = await loadActionMetadata(client, key);\n return r;\n }\n function makeGetter(fn) {\n const cache = createAsyncClientCache((client, key) => fn(client, key, false));\n return async apiName => {\n return await cache.get(client, apiName);\n };\n }\n const ret = {\n getObjectDefinition: makeGetter(loadObject),\n getInterfaceDefinition: makeGetter(loadInterface),\n getQueryDefinition: makeGetter(loadQuery),\n getActionDefinition: makeGetter(loadAction)\n };\n return ret;\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\nexport const USER_AGENT = `osdk-client/${process.env.PACKAGE_VERSION}`;","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createSharedClientContext } from \"@osdk/shared.client.impl\";\nimport { createObjectSet } from \"./objectSet/createObjectSet.js\";\nimport { createStandardOntologyProviderFactory } from \"./ontology/StandardOntologyProvider.js\";\nimport { USER_AGENT } from \"./util/UserAgent.js\";\n\n/** @internal */\nexport function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = createObjectSet) {\n if (process?.env?.NODE_ENV !== \"production\") {\n try {\n new URL(baseUrl);\n } catch (e) {\n const hint = !baseUrl.startsWith(\"http://\") || !baseUrl.startsWith(\"https://\") ? \". Did you forget to add 'http://' or 'https://'?\" : \"\";\n throw new Error(`Invalid stack URL: ${baseUrl}${hint}`);\n }\n }\n const minimalClient = {\n ...createSharedClientContext(baseUrl, tokenProvider, USER_AGENT, fetchFn),\n objectSetFactory,\n ontologyRid: metadata.ontologyRid,\n logger: options.logger,\n clientCacheKey: {},\n requestContext: {}\n };\n return Object.assign(minimalClient, {\n ontologyProvider: createStandardOntologyProviderFactory(options)(minimalClient)\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 { InterfaceDefinitions } from \"./ontology/OntologyProvider.js\";\n\n/** @internal */\nexport const fetchMetadataInternal = async (client, definition) => {\n if (definition.type === \"object\") {\n const {\n [InterfaceDefinitions]: interfaceDefs,\n ...objectTypeDef\n } = await client.ontologyProvider.getObjectDefinition(definition.apiName);\n return objectTypeDef;\n } else if (definition.type === \"interface\") {\n return client.ontologyProvider.getInterfaceDefinition(definition.apiName);\n } else if (definition.type === \"action\") {\n return client.ontologyProvider.getActionDefinition(definition.apiName);\n } else if (definition.type === \"query\") {\n return client.ontologyProvider.getQueryDefinition(definition.apiName);\n } else {\n throw new Error(\"Not implemented for given definition\");\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 isOsdkBaseObject(o) {\n return o && typeof o === \"object\" && typeof o.$apiName === \"string\" && o.$primaryKey != null;\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 { OntologiesV2 } from \"@osdk/internal.foundry\";\nimport { isAttachmentUpload } from \"../object/AttachmentUpload.js\";\nimport { getWireObjectSet, isObjectSet } from \"../objectSet/createObjectSet.js\";\nimport { isOsdkBaseObject } from \"./isOsdkBaseObject.js\";\nimport { isWireObjectSet } from \"./WireObjectSet.js\";\n\n/**\n * Marshall user-facing data into the wire DataValue type\n *\n * @see DataValue for the expected payloads\n * @internal\n */\nexport async function toDataValueQueries(value, client, desiredType) {\n if (value == null) {\n return value;\n }\n if (Array.isArray(value) && desiredType.multiplicity) {\n const promiseArray = Array.from(value, async innerValue => await toDataValueQueries(innerValue, client, desiredType));\n return Promise.all(promiseArray);\n }\n switch (desiredType.type) {\n case \"attachment\":\n {\n if (isAttachmentUpload(value)) {\n const attachment = await OntologiesV2.Attachments.uploadAttachmentV2(client, value, {\n filename: value.name\n });\n return attachment.rid;\n }\n\n // If it's not an upload, it's just an attachment rid string which we can pass through\n return value;\n }\n case \"twoDimensionalAggregation\":\n {\n return {\n groups: value\n };\n }\n case \"threeDimensionalAggregation\":\n {\n return {\n groups: value\n };\n }\n case \"set\":\n {\n if (value instanceof Set) {\n const promiseArray = Array.from(value, async innerValue => await toDataValueQueries(innerValue, client, desiredType[\"set\"]));\n return Promise.all(promiseArray);\n }\n break;\n }\n case \"object\":\n {\n if (isOsdkBaseObject(value)) {\n return value.$primaryKey;\n }\n break;\n }\n case \"objectSet\":\n {\n // object set (the rid as a string (passes through the last return), or the ObjectSet definition directly)\n if (isWireObjectSet(value)) {\n return value;\n }\n if (isObjectSet(value)) {\n return getWireObjectSet(value);\n }\n break;\n }\n case \"struct\":\n {\n if (typeof value === \"object\") {\n const structMap = {};\n for (const [key, structValue] of Object.entries(value)) {\n structMap[key] = await toDataValueQueries(structValue, client, desiredType[\"struct\"][key]);\n }\n return structMap;\n }\n }\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"string\":\n case \"timestamp\":\n return value;\n }\n return value;\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 { OntologiesV2 } from \"@osdk/internal.foundry\";\nimport { createAttachmentFromRid } from \"../createAttachmentFromRid.js\";\nimport { createObjectSet } from \"../objectSet/createObjectSet.js\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { toDataValueQueries } from \"../util/toDataValueQueries.js\";\nexport async function applyQuery(client, query, params) {\n const qd = await client.ontologyProvider.getQueryDefinition(query.apiName);\n const response = await OntologiesV2.Queries.executeQueryV2(addUserAgentAndRequestContextHeaders(augmentRequestContext(client, _ => ({\n finalMethodCall: \"applyQuery\"\n })), query), await client.ontologyRid, query.apiName, {\n parameters: params ? await remapQueryParams(params, client, qd.parameters) : {}\n });\n const objectOutputDefs = await getRequiredDefinitions(qd.output, client);\n const remappedResponse = await remapQueryResponse(client, qd.output, response.value, objectOutputDefs);\n return remappedResponse;\n}\nasync function remapQueryParams(params, client, paramTypes) {\n const parameterMap = {};\n for (const [key, value] of Object.entries(params)) {\n parameterMap[key] = await toDataValueQueries(value, client, paramTypes[key]);\n }\n return parameterMap;\n}\nasync function remapQueryResponse(client, responseDataType, responseValue, definitions) {\n // handle null responses\n if (responseValue == null) {\n if (responseDataType.nullable) {\n return undefined;\n } else {\n throw new Error(\"Got null response when nullable was not allowed\");\n }\n }\n if (responseDataType.multiplicity != null && responseDataType.multiplicity !== false) {\n const withoutMultiplicity = {\n ...responseDataType,\n multiplicity: false\n };\n for (let i = 0; i < responseValue.length; i++) {\n responseValue[i] = await remapQueryResponse(responseValue[i], withoutMultiplicity, client, definitions);\n }\n return responseValue;\n }\n switch (responseDataType.type) {\n case \"union\":\n {\n throw new Error(\"Union return types are not yet supported\");\n }\n case \"set\":\n {\n for (let i = 0; i < responseValue.length; i++) {\n responseValue[i] = await remapQueryResponse(responseValue[i], responseDataType.set, client, definitions);\n }\n return responseValue;\n }\n case \"attachment\":\n {\n return createAttachmentFromRid(client, responseValue);\n }\n case \"object\":\n {\n const def = definitions.get(responseDataType.object);\n if (!def) {\n throw new Error(`Missing definition for ${responseDataType.object}`);\n }\n return createQueryObjectResponse(responseValue, def);\n }\n case \"objectSet\":\n {\n const def = definitions.get(responseDataType.objectSet);\n if (!def) {\n throw new Error(`Missing definition for ${responseDataType.objectSet}`);\n }\n if (typeof responseValue === \"string\") {\n return createObjectSet(def, client, {\n type: \"intersect\",\n objectSets: [{\n type: \"base\",\n objectType: responseDataType.objectSet\n }, {\n type: \"reference\",\n reference: responseValue\n }]\n });\n }\n return createObjectSet(def, client, responseValue);\n }\n case \"struct\":\n {\n // figure out what keys need to be fixed up\n for (const [key, subtype] of Object.entries(responseDataType.struct)) {\n if (requiresConversion(subtype)) {\n responseValue[key] = await remapQueryResponse(responseValue[key], subtype, client, definitions);\n }\n }\n return responseValue;\n }\n case \"twoDimensionalAggregation\":\n {\n const result = [];\n for (const {\n key,\n value\n } of responseValue.groups) {\n result.push({\n key,\n value\n });\n }\n return result;\n }\n case \"threeDimensionalAggregation\":\n {\n const result = [];\n for (const {\n key,\n groups\n } of responseValue.groups) {\n const subResult = [];\n for (const {\n key: subKey,\n value\n } of groups) {\n subResult.push({\n key: subKey,\n value\n });\n }\n result.push({\n key,\n groups: subResult\n });\n }\n return result;\n }\n }\n return responseValue;\n}\nasync function getRequiredDefinitions(dataType, client) {\n const result = new Map();\n switch (dataType.type) {\n case \"objectSet\":\n {\n const objectDef = await client.ontologyProvider.getObjectDefinition(dataType.objectSet);\n result.set(dataType.objectSet, objectDef);\n break;\n }\n case \"object\":\n {\n const objectDef = await client.ontologyProvider.getObjectDefinition(dataType.object);\n result.set(dataType.object, objectDef);\n break;\n }\n case \"set\":\n {\n return getRequiredDefinitions(dataType.set, client);\n }\n case \"struct\":\n {\n for (const value of Object.values(dataType.struct)) {\n for (const [type, objectDef] of await getRequiredDefinitions(value, client)) {\n result.set(type, objectDef);\n }\n }\n break;\n }\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"object\":\n case \"string\":\n case \"threeDimensionalAggregation\":\n case \"timestamp\":\n case \"twoDimensionalAggregation\":\n case \"union\":\n break;\n }\n return result;\n}\nfunction requiresConversion(dataType) {\n switch (dataType.type) {\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"object\": // JSON encoded primary key\n case \"string\":\n case \"timestamp\":\n return false;\n case \"union\":\n return true;\n case \"struct\":\n return Object.values(dataType.struct).some(requiresConversion);\n case \"set\":\n return requiresConversion(dataType.set);\n case \"attachment\":\n case \"objectSet\":\n case \"twoDimensionalAggregation\":\n case \"threeDimensionalAggregation\":\n return true;\n default:\n return false;\n }\n}\nexport function createQueryObjectResponse(primaryKey, objectDef) {\n return {\n $apiName: objectDef.apiName,\n $title: undefined,\n $objectType: objectDef.apiName,\n $primaryKey: primaryKey\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 { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks, __EXPERIMENTAL__NOT_SUPPORTED_YET__preexistingObjectSet } from \"@osdk/client.api/unstable\";\nimport { symbolClientContext } from \"@osdk/shared.client\";\nimport { createBulkLinksAsyncIterFactory } from \"./__unstable/createBulkLinksAsyncIterFactory.js\";\nimport { applyAction } from \"./actions/applyAction.js\";\nimport { createMinimalClient } from \"./createMinimalClient.js\";\nimport { fetchMetadataInternal } from \"./fetchMetadata.js\";\nimport { createObjectSet } from \"./objectSet/createObjectSet.js\";\nimport { applyQuery } from \"./queries/applyQuery.js\";\nclass ActionInvoker {\n constructor(clientCtx, actionDef) {\n // We type the property as a generic function as binding `applyAction`\n // doesn't return a type thats all that useful anyway\n // The implements covers us for the most part here as this exact type doesn't\n // escape this file\n this.applyAction = applyAction.bind(undefined, clientCtx, actionDef);\n this.batchApplyAction = applyAction.bind(undefined, clientCtx, actionDef);\n }\n}\nclass QueryInvoker {\n constructor(clientCtx, queryDef) {\n this.executeFunction = applyQuery.bind(undefined, clientCtx, queryDef);\n }\n}\n\n/** @internal */\nexport function createClientInternal(objectSetFactory,\n// first so i can bind\nbaseUrl, ontologyRid, tokenProvider, options = undefined, fetchFn = fetch) {\n const clientCtx = createMinimalClient({\n ontologyRid\n }, baseUrl, tokenProvider, options, fetchFn, objectSetFactory);\n function clientFn(o) {\n if (o.type === \"object\" || o.type === \"interface\") {\n return objectSetFactory(o, clientCtx);\n } else if (o.type === \"action\") {\n return new ActionInvoker(clientCtx, o); // then as any for dealing with the conditional return value\n } else if (o.type === \"query\") {\n return new QueryInvoker(clientCtx, o);\n } else {\n throw new Error(\"not implemented\");\n }\n }\n const fetchMetadata = fetchMetadataInternal.bind(undefined, clientCtx);\n const client = Object.defineProperties(clientFn, {\n [symbolClientContext]: {\n value: clientCtx\n },\n [__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks]: {\n get: () => createBulkLinksAsyncIterFactory(clientCtx)\n },\n [__EXPERIMENTAL__NOT_SUPPORTED_YET__preexistingObjectSet]: {\n get: () => (definition, rid) => {\n return createObjectSet(definition, client[symbolClientContext], {\n type: \"intersect\",\n objectSets: [{\n type: \"base\",\n objectType: definition.apiName\n }, {\n type: \"reference\",\n reference: rid\n }]\n });\n }\n },\n fetchMetadata: {\n value: fetchMetadata\n }\n });\n return client;\n}\nexport const createClient = createClientInternal.bind(undefined, createObjectSet);","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createSharedClientContext } from \"@osdk/shared.client.impl\";\nimport { USER_AGENT } from \"./util/UserAgent.js\";\n/**\n * Creates a client that can only be used with Platform APIs.\n *\n * If you already have an OSDK Client (from `createClient`), you do not need to\n * create one of these - those clients can be used with Platform APIs as well.\n *\n * @param baseUrl\n * @param tokenProvider\n * @param options Currently unused, reserved for future use.\n * @param fetchFn\n * @returns\n */\nexport function createPlatformClient(baseUrl, tokenProvider, options = undefined, fetchFn = fetch) {\n return createSharedClientContext(baseUrl, tokenProvider, USER_AGENT, fetchFn);\n}"]}
1
+ {"version":3,"file":"index.js","names":["isOk","PalantirApiError","ActionValidationError","createAttachmentFromRid","createClient","createPlatformClient","createAttachmentUpload"],"sources":["index.js"],"sourcesContent":["/*\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 */\nexport { isOk } from \"@osdk/api\";\nexport { PalantirApiError } from \"@osdk/shared.net.errors\";\nexport { ActionValidationError } from \"./actions/ActionValidationError.js\";\nexport { createAttachmentFromRid } from \"./createAttachmentFromRid.js\";\nexport { createClient } from \"./createClient.js\";\nexport { createPlatformClient } from \"./createPlatformClient.js\";\nexport { createAttachmentUpload } from \"./object/AttachmentUpload.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,WAAW;AAChC,SAASC,gBAAgB,QAAQ,yBAAyB;AAC1D,SAASC,qBAAqB,QAAQ,oCAAoC;AAC1E,SAASC,uBAAuB,QAAQ,8BAA8B;AACtE,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,sBAAsB,QAAQ,8BAA8B","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=intellisense.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intellisense.test.d.ts","sourceRoot":"","sources":["../../src/intellisense.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=callsQueryAcceptsObject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callsQueryAcceptsObject.d.ts","sourceRoot":"","sources":["../../../src/intellisense.test.helpers/callsQueryAcceptsObject.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ // WARNING!
17
+ // WARNING!
18
+ // This file is used for tests that check intellisense. Editing this file by hand will likely
19
+ // break tests that have hard coded line numbers and line offsets.
20
+ import { queryAcceptsObject } from "@osdk/client.test.ontology";
21
+ const client = {};
22
+ client(queryAcceptsObject).executeFunction({
23
+ object: undefined
24
+ });
25
+ //# sourceMappingURL=callsQueryAcceptsObject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callsQueryAcceptsObject.js","names":["queryAcceptsObject","client","executeFunction","object","undefined"],"sources":["callsQueryAcceptsObject.js"],"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// WARNING!\n// WARNING!\n// This file is used for tests that check intellisense. Editing this file by hand will likely\n// break tests that have hard coded line numbers and line offsets.\nimport { queryAcceptsObject } from \"@osdk/client.test.ontology\";\nconst client = {};\nclient(queryAcceptsObject).executeFunction({\n object: undefined,\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,kBAAkB,QAAQ,4BAA4B;AAC/D,MAAMC,MAAM,GAAG,CAAC,CAAC;AACjBA,MAAM,CAACD,kBAAkB,CAAC,CAACE,eAAe,CAAC;EACvCC,MAAM,EAAEC;AACZ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,86 @@
1
+ /*
2
+ * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { findUpSync } from "find-up";
17
+ import * as path from "node:path";
18
+ import invariant from "tiny-invariant";
19
+ import * as ts from "typescript";
20
+ import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
21
+ import { startTsServer } from "./tsserver.js";
22
+ // it needs to be hoisted because its referenced from our mocked WebSocket
23
+ // which must be hoisted to work
24
+ const rootLogger = await vi.hoisted(async () => {
25
+ const pino = (await import("pino")).pino;
26
+ const pinoPretty = await import("pino-pretty");
27
+ const {
28
+ EventEmitter
29
+ } = await import("node:events");
30
+ return Promise.resolve(pino({
31
+ level: "info"
32
+ }, pinoPretty.build({
33
+ sync: true,
34
+ timestampKey: undefined,
35
+ errorLikeObjectKeys: ["error", "err", "exception"],
36
+ errorProps: "stack,cause,properties",
37
+ ignore: "time,hostname,pid",
38
+ destination: new class extends EventEmitter {
39
+ write(a) {
40
+ // remove trailing newline since console.log adds one
41
+ if (a.at(-1) === "\n") a = a.slice(0, -1);
42
+ // This lets the test framework aggregate the logs per test, whereas direct to stdout does not
43
+ console.log(a);
44
+ }
45
+ }()
46
+ })));
47
+ });
48
+ describe("intellisense", () => {
49
+ let packagesDir;
50
+ let clientPackagePath;
51
+ beforeAll(() => {
52
+ const clientsPackageJson = findUpSync("package.json", {
53
+ cwd: import.meta.url
54
+ });
55
+ !(clientsPackageJson != null) ? invariant(false) : void 0;
56
+ packagesDir = path.join(path.dirname(clientsPackageJson), "..");
57
+ clientPackagePath = path.join(packagesDir, "client");
58
+ });
59
+ let tsServer;
60
+ let intellisenseFilePath;
61
+ beforeEach(async a => {
62
+ intellisenseFilePath = path.join(clientPackagePath, "src", "intellisense.test.helpers", `${a.task.name}.ts`);
63
+ expect(ts.sys.fileExists(intellisenseFilePath)).toBeTruthy();
64
+ tsServer = await startTsServer(rootLogger);
65
+ await tsServer.sendOpenRequest({
66
+ file: intellisenseFilePath
67
+ });
68
+ });
69
+ afterEach(async () => {
70
+ tsServer.stop();
71
+ tsServer = undefined;
72
+ });
73
+ it("callsQueryAcceptsObject", {
74
+ timeout: 20_000
75
+ }, async () => {
76
+ const {
77
+ resp
78
+ } = await tsServer.sendQuickInfoRequest({
79
+ file: intellisenseFilePath,
80
+ line: 27,
81
+ offset: 6
82
+ });
83
+ expect(resp.body?.documentation).toMatchInlineSnapshot(`"(no ontology metadata)"`);
84
+ });
85
+ });
86
+ //# sourceMappingURL=intellisense.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intellisense.test.js","names":["findUpSync","path","invariant","ts","afterEach","beforeAll","beforeEach","describe","expect","it","vi","startTsServer","rootLogger","hoisted","pino","pinoPretty","EventEmitter","Promise","resolve","level","build","sync","timestampKey","undefined","errorLikeObjectKeys","errorProps","ignore","destination","write","a","at","slice","console","log","packagesDir","clientPackagePath","clientsPackageJson","cwd","import","meta","url","join","dirname","tsServer","intellisenseFilePath","task","name","sys","fileExists","toBeTruthy","sendOpenRequest","file","stop","timeout","resp","sendQuickInfoRequest","line","offset","body","documentation","toMatchInlineSnapshot"],"sources":["intellisense.test.js"],"sourcesContent":["/*\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 { findUpSync } from \"find-up\";\nimport * as path from \"node:path\";\nimport invariant from \"tiny-invariant\";\nimport * as ts from \"typescript\";\nimport { afterEach, beforeAll, beforeEach, describe, expect, it, vi, } from \"vitest\";\nimport { startTsServer } from \"./tsserver.js\";\n// it needs to be hoisted because its referenced from our mocked WebSocket\n// which must be hoisted to work\nconst rootLogger = await vi.hoisted(async () => {\n const pino = (await import(\"pino\")).pino;\n const pinoPretty = await import(\"pino-pretty\");\n const { EventEmitter } = await import(\"node:events\");\n class PinoConsoleLogDestination extends EventEmitter {\n write(a) {\n // remove trailing newline since console.log adds one\n if (a.at(-1) === \"\\n\")\n a = a.slice(0, -1);\n // This lets the test framework aggregate the logs per test, whereas direct to stdout does not\n console.log(a);\n }\n }\n return Promise.resolve(pino({ level: \"info\" }, (pinoPretty.build)({\n sync: true,\n timestampKey: undefined,\n errorLikeObjectKeys: [\"error\", \"err\", \"exception\"],\n errorProps: \"stack,cause,properties\",\n ignore: \"time,hostname,pid\",\n destination: new PinoConsoleLogDestination(),\n })));\n});\ndescribe(\"intellisense\", () => {\n let packagesDir;\n let clientPackagePath;\n beforeAll(() => {\n const clientsPackageJson = findUpSync(\"package.json\", {\n cwd: import.meta.url,\n });\n invariant(clientsPackageJson != null);\n packagesDir = path.join(path.dirname(clientsPackageJson), \"..\");\n clientPackagePath = path.join(packagesDir, \"client\");\n });\n let tsServer;\n let intellisenseFilePath;\n beforeEach(async (a) => {\n intellisenseFilePath = path.join(clientPackagePath, \"src\", \"intellisense.test.helpers\", `${a.task.name}.ts`);\n expect(ts.sys.fileExists(intellisenseFilePath)).toBeTruthy();\n tsServer = await startTsServer(rootLogger);\n await tsServer.sendOpenRequest({ file: intellisenseFilePath });\n });\n afterEach(async () => {\n tsServer.stop();\n tsServer = undefined;\n });\n it(\"callsQueryAcceptsObject\", { timeout: 20_000 }, async () => {\n const { resp } = await tsServer.sendQuickInfoRequest({\n file: intellisenseFilePath,\n line: 27,\n offset: 6,\n });\n expect(resp.body?.documentation).toMatchInlineSnapshot(`\"(no ontology metadata)\"`);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,SAAS;AACpC,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAOC,SAAS,MAAM,gBAAgB;AACtC,OAAO,KAAKC,EAAE,MAAM,YAAY;AAChC,SAASC,SAAS,EAAEC,SAAS,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,EAAEC,EAAE,QAAS,QAAQ;AACpF,SAASC,aAAa,QAAQ,eAAe;AAC7C;AACA;AACA,MAAMC,UAAU,GAAG,MAAMF,EAAE,CAACG,OAAO,CAAC,YAAY;EAC5C,MAAMC,IAAI,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,EAAEA,IAAI;EACxC,MAAMC,UAAU,GAAG,MAAM,MA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BAAoB;EACxBtC,UAAU,CAAC,MAAOuB,CAAC,IAAK;IACpBe,oBAAoB,GAAG3C,IAAI,CAACwC,IAAI,CAACN,iBAAiB,EAAE,KAAK,EAAE,2BAA2B,EAAE,GAAGN,CAAC,CAACgB,IAAI,CAACC,IAAI,KAAK,CAAC;IAC5GtC,MAAM,CAACL,EAAE,CAAC4C,GAAG,CAACC,UAAU,CAACJ,oBAAoB,CAAC,CAAC,CAACK,UAAU,CAAC,CAAC;IAC5DN,QAAQ,GAAG,MAAMhC,aAAa,CAACC,UAAU,CAAC;IAC1C,MAAM+B,QAAQ,CAACO,eAAe,CAAC;MAAEC,IAAI,EAAEP;IAAqB,CAAC,CAAC;EAClE,CAAC,CAAC;EACFxC,SAAS,CAAC,YAAY;IAClBuC,QAAQ,CAACS,IAAI,CAAC,CAAC;IACfT,QAAQ,GAAGpB,SAAS;EACxB,CAAC,CAAC;EACFd,EAAE,CAAC,yBAAyB,EAAE;IAAE4C,OAAO,EAAE;EAAO,CAAC,EAAE,YAAY;IAC3D,MAAM;MAAEC;IAAK,CAAC,GAAG,MAAMX,QAAQ,CAACY,oBAAoB,CAAC;MACjDJ,IAAI,EAAEP,oBAAoB;MAC1BY,IAAI,EAAE,EAAE;MACRC,MAAM,EAAE;IACZ,CAAC,CAAC;IACFjD,MAAM,CAAC8C,IAAI,CAACI,IAAI,EAAEC,aAAa,CAAC,CAACC,qBAAqB,CAAC,0BAA0B,CAAC;EACtF,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=legacyToModernSingleAggregationResult.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacyToModernSingleAggregationResult.d.ts","sourceRoot":"","sources":["../../../../src/internal/conversions/legacyToModernSingleAggregationResult.ts"],"names":[],"mappings":""}
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import invariant from "tiny-invariant";
17
+ /** @internal */
18
+ export function legacyToModernSingleAggregationResult(entry) {
19
+ return entry.metrics.reduce((accumulator, curValue) => {
20
+ const parts = curValue.name.split(".");
21
+ if (parts[0] === "count") {
22
+ return accumulator;
23
+ }
24
+ !(parts.length === 2) ? invariant(false, "assumed we were getting a `${key}.${type}`") : void 0;
25
+ const property = parts[0];
26
+ const metricType = parts[1];
27
+ if (!(property in accumulator)) {
28
+ accumulator[property] = {}; // fixme?
29
+ }
30
+ accumulator[property][metricType] = curValue.value; // fixme?
31
+ return accumulator;
32
+ }, {});
33
+ }
34
+ //# sourceMappingURL=legacyToModernSingleAggregationResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacyToModernSingleAggregationResult.js","names":["invariant","legacyToModernSingleAggregationResult","entry","metrics","reduce","accumulator","curValue","parts","name","split","length","property","metricType","value"],"sources":["legacyToModernSingleAggregationResult.js"],"sourcesContent":["/*\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 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 invariant(parts.length === 2, \"assumed we were getting a `${key}.${type}`\");\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 return accumulator;\n }, {});\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,SAAS,MAAM,gBAAgB;AACtC;AACA,OAAO,SAASC,qCAAqCA,CAACC,KAAK,EAAE;EACzD,OAAOA,KAAK,CAACC,OAAO,CAACC,MAAM,CAAC,CAACC,WAAW,EAAEC,QAAQ,KAAK;IACnD,MAAMC,KAAK,GAAGD,QAAQ,CAACE,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC;IACtC,IAAIF,KAAK,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE;MACtB,OAAOF,WAAW;IACtB;IACA,EAAUE,KAAK,CAACG,MAAM,KAAK,CAAC,IAA5BV,SAAS,QAAqB,4CAA4C;IAC1E,MAAMW,QAAQ,GAAGJ,KAAK,CAAC,CAAC,CAAC;IACzB,MAAMK,UAAU,GAAGL,KAAK,CAAC,CAAC,CAAC;IAC3B,IAAI,EAAEI,QAAQ,IAAIN,WAAW,CAAC,EAAE;MAC5BA,WAAW,CAACM,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAChC;IACAN,WAAW,CAACM,QAAQ,CAAC,CAACC,UAAU,CAAC,GAAGN,QAAQ,CAACO,KAAK,CAAC,CAAC;IACpD,OAAOR,WAAW;EACtB,CAAC,EAAE,CAAC,CAAC,CAAC;AACV","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=modernToLegacyAggregationClause.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modernToLegacyAggregationClause.d.ts","sourceRoot":"","sources":["../../../../src/internal/conversions/modernToLegacyAggregationClause.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ const directionFieldMap = dir => dir === "asc" ? "ASC" : dir === "desc" ? "DESC" : undefined;
17
+ /** @internal */
18
+ export function modernToLegacyAggregationClause(select) {
19
+ return Object.entries(select).flatMap(([propAndMetric, aggregationType]) => {
20
+ if (propAndMetric === "$count") {
21
+ return {
22
+ type: "count",
23
+ name: "count",
24
+ direction: directionFieldMap(aggregationType)
25
+ };
26
+ }
27
+ const colonPos = propAndMetric.lastIndexOf(":");
28
+ const property = propAndMetric.slice(0, colonPos);
29
+ const metric = propAndMetric.slice(colonPos + 1);
30
+ return [{
31
+ type: metric,
32
+ name: `${property}.${metric}`,
33
+ direction: directionFieldMap(aggregationType),
34
+ field: property
35
+ }];
36
+ });
37
+ }
38
+ //# sourceMappingURL=modernToLegacyAggregationClause.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modernToLegacyAggregationClause.js","names":["directionFieldMap","dir","undefined","modernToLegacyAggregationClause","select","Object","entries","flatMap","propAndMetric","aggregationType","type","name","direction","colonPos","lastIndexOf","property","slice","metric","field"],"sources":["modernToLegacyAggregationClause.js"],"sourcesContent":["/*\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 */\nconst directionFieldMap = (dir) => dir === \"asc\" ? \"ASC\" : dir === \"desc\" ? \"DESC\" : undefined;\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 {\n type: metric,\n name: `${property}.${metric}`,\n direction: directionFieldMap(aggregationType),\n field: property,\n },\n ];\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,iBAAiB,GAAIC,GAAG,IAAKA,GAAG,KAAK,KAAK,GAAG,KAAK,GAAGA,GAAG,KAAK,MAAM,GAAG,MAAM,GAAGC,SAAS;AAC9F;AACA,OAAO,SAASC,+BAA+BA,CAACC,MAAM,EAAE;EACpD,OAAOC,MAAM,CAACC,OAAO,CAACF,MAAM,CAAC,CAACG,OAAO,CAAC,CAAC,CAACC,aAAa,EAAEC,eAAe,CAAC,KAAK;IACxE,IAAID,aAAa,KAAK,QAAQ,EAAE;MAC5B,OAAO;QACHE,IAAI,EAAE,OAAO;QACbC,IAAI,EAAE,OAAO;QACbC,SAAS,EAAEZ,iBAAiB,CAACS,eAAe;MAChD,CAAC;IACL;IACA,MAAMI,QAAQ,GAAGL,aAAa,CAACM,WAAW,CAAC,GAAG,CAAC;IAC/C,MAAMC,QAAQ,GAAGP,aAAa,CAACQ,KAAK,CAAC,CAAC,EAAEH,QAAQ,CAAC;IACjD,MAAMI,MAAM,GAAGT,aAAa,CAACQ,KAAK,CAACH,QAAQ,GAAG,CAAC,CAAC;IAChD,OAAO,CACH;MACIH,IAAI,EAAEO,MAAM;MACZN,IAAI,EAAE,GAAGI,QAAQ,IAAIE,MAAM,EAAE;MAC7BL,SAAS,EAAEZ,iBAAiB,CAACS,eAAe,CAAC;MAC7CS,KAAK,EAAEH;IACX,CAAC,CACJ;EACL,CAAC,CAAC;AACN","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=modernToLegacyGroupByClause.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modernToLegacyGroupByClause.d.ts","sourceRoot":"","sources":["../../../../src/internal/conversions/modernToLegacyGroupByClause.ts"],"names":[],"mappings":""}
@@ -0,0 +1,62 @@
1
+ /*
2
+ * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { DurationMapping } from "@osdk/api";
17
+ /** @internal */
18
+ export function modernToLegacyGroupByClause(groupByClause) {
19
+ if (!groupByClause) return [];
20
+ return Object.entries(groupByClause).flatMap(([field, type]) => {
21
+ if (type === "exact") {
22
+ return [{
23
+ type,
24
+ field
25
+ }];
26
+ } else if ("$exactWithLimit" in type) {
27
+ {
28
+ return [{
29
+ type: "exact",
30
+ field,
31
+ maxGroupCount: type.$exactWithLimit
32
+ }];
33
+ }
34
+ } else if ("$fixedWidth" in type) {
35
+ return [{
36
+ type: "fixedWidth",
37
+ field,
38
+ fixedWidth: type.$fixedWidth
39
+ }];
40
+ } else if ("$ranges" in type) {
41
+ return [{
42
+ type: "ranges",
43
+ field,
44
+ ranges: type.$ranges.map(range => convertRange(range))
45
+ }];
46
+ } else if ("$duration" in type) {
47
+ return [{
48
+ type: "duration",
49
+ field,
50
+ value: type.$duration[0],
51
+ unit: DurationMapping[type.$duration[1]]
52
+ }];
53
+ } else return [];
54
+ });
55
+ }
56
+ function convertRange(range) {
57
+ return {
58
+ startValue: range[0],
59
+ endValue: range[1]
60
+ };
61
+ }
62
+ //# sourceMappingURL=modernToLegacyGroupByClause.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modernToLegacyGroupByClause.js","names":["DurationMapping","modernToLegacyGroupByClause","groupByClause","Object","entries","flatMap","field","type","maxGroupCount","$exactWithLimit","fixedWidth","$fixedWidth","ranges","$ranges","map","range","convertRange","value","$duration","unit","startValue","endValue"],"sources":["modernToLegacyGroupByClause.js"],"sourcesContent":["/*\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 { DurationMapping } from \"@osdk/api\";\n/** @internal */\nexport function modernToLegacyGroupByClause(groupByClause) {\n if (!groupByClause)\n return [];\n return Object.entries(groupByClause).flatMap(([field, type]) => {\n if (type === \"exact\") {\n return [{ type, field }];\n }\n else if (\"$exactWithLimit\" in type) {\n {\n return [\n {\n type: \"exact\",\n field,\n maxGroupCount: type.$exactWithLimit,\n },\n ];\n }\n }\n else if (\"$fixedWidth\" in type) {\n return [{\n type: \"fixedWidth\",\n field,\n fixedWidth: type.$fixedWidth,\n }];\n }\n else if (\"$ranges\" in type) {\n return [{\n type: \"ranges\",\n field,\n ranges: type.$ranges.map(range => convertRange(range)),\n }];\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 }\n else\n return [];\n });\n}\nfunction convertRange(range) {\n return { startValue: range[0], endValue: range[1] };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,WAAW;AAC3C;AACA,OAAO,SAASC,2BAA2BA,CAACC,aAAa,EAAE;EACvD,IAAI,CAACA,aAAa,EACd,OAAO,EAAE;EACb,OAAOC,MAAM,CAACC,OAAO,CAACF,aAAa,CAAC,CAACG,OAAO,CAAC,CAAC,CAACC,KAAK,EAAEC,IAAI,CAAC,KAAK;IAC5D,IAAIA,IAAI,KAAK,OAAO,EAAE;MAClB,OAAO,CAAC;QAAEA,IAAI;QAAED;MAAM,CAAC,CAAC;IAC5B,CAAC,MACI,IAAI,iBAAiB,IAAIC,IAAI,EAAE;MAChC;QACI,OAAO,CACH;UACIA,IAAI,EAAE,OAAO;UACbD,KAAK;UACLE,aAAa,EAAED,IAAI,CAACE;QACxB,CAAC,CACJ;MACL;IACJ,CAAC,MACI,IAAI,aAAa,IAAIF,IAAI,EAAE;MAC5B,OAAO,CAAC;QACAA,IAAI,EAAE,YAAY;QAClBD,KAAK;QACLI,UAAU,EAAEH,IAAI,CAACI;MACrB,CAAC,CAAC;IACV,CAAC,MACI,IAAI,SAAS,IAAIJ,IAAI,EAAE;MACxB,OAAO,CAAC;QACAA,IAAI,EAAE,QAAQ;QACdD,KAAK;QACLM,MAAM,EAAEL,IAAI,CAACM,OAAO,CAACC,GAAG,CAACC,KAAK,IAAIC,YAAY,CAACD,KAAK,CAAC;MACzD,CAAC,CAAC;IACV,CAAC,MACI,IAAI,WAAW,IAAIR,IAAI,EAAE;MAC1B,OAAO,CAAC;QACAA,IAAI,EAAE,UAAU;QAChBD,KAAK;QACLW,KAAK,EAAEV,IAAI,CAACW,SAAS,CAAC,CAAC,CAAC;QACxBC,IAAI,EAAEnB,eAAe,CAACO,IAAI,CAACW,SAAS,CAAC,CAAC,CAAC;MAC3C,CAAC,CAAC;IACV,CAAC,MAEG,OAAO,EAAE;EACjB,CAAC,CAAC;AACN;AACA,SAASF,YAAYA,CAACD,KAAK,EAAE;EACzB,OAAO;IAAEK,UAAU,EAAEL,KAAK,CAAC,CAAC,CAAC;IAAEM,QAAQ,EAAEN,KAAK,CAAC,CAAC;EAAE,CAAC;AACvD","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=modernToLegacyWhereClause.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modernToLegacyWhereClause.d.ts","sourceRoot":"","sources":["../../../../src/internal/conversions/modernToLegacyWhereClause.ts"],"names":[],"mappings":""}