@osdk/client 2.0.0-beta.9 → 2.0.0

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 (605) hide show
  1. package/CHANGELOG.md +270 -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 -12
  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 -878
  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 +24 -4
  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.d.ts +19 -0
  361. package/build/esm/Logger.d.ts.map +1 -0
  362. package/build/esm/Logger.js +17 -0
  363. package/build/esm/Logger.js.map +1 -0
  364. package/build/esm/MinimalClientContext.d.ts +1 -1
  365. package/build/esm/MinimalClientContext.d.ts.map +1 -1
  366. package/build/esm/MinimalClientContext.js +17 -0
  367. package/build/esm/MinimalClientContext.js.map +1 -0
  368. package/build/esm/ResultOrError.js +19 -0
  369. package/build/esm/ResultOrError.js.map +1 -0
  370. package/build/esm/SatisfiesSemver.js +17 -0
  371. package/build/esm/SatisfiesSemver.js.map +1 -0
  372. package/build/esm/SatisfiesSemver.test.js +69 -0
  373. package/build/esm/SatisfiesSemver.test.js.map +1 -0
  374. package/build/esm/__unstable/ConjureSupport.js +174 -0
  375. package/build/esm/__unstable/ConjureSupport.js.map +1 -0
  376. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts +1 -1
  377. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.d.ts.map +1 -1
  378. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js +114 -0
  379. package/build/esm/__unstable/createBulkLinksAsyncIterFactory.js.map +1 -0
  380. package/build/esm/actions/ActionValidationError.d.ts +1 -1
  381. package/build/esm/actions/ActionValidationError.d.ts.map +1 -1
  382. package/build/esm/actions/ActionValidationError.js +23 -0
  383. package/build/esm/actions/ActionValidationError.js.map +1 -0
  384. package/build/esm/actions/actions.test.js +323 -0
  385. package/build/esm/actions/actions.test.js.map +1 -0
  386. package/build/esm/actions/applyAction.d.ts +9 -10
  387. package/build/esm/actions/applyAction.d.ts.map +1 -1
  388. package/build/esm/actions/applyAction.js +114 -0
  389. package/build/esm/actions/applyAction.js.map +1 -0
  390. package/build/esm/createAttachmentFromRid.d.ts +1 -1
  391. package/build/esm/createAttachmentFromRid.d.ts.map +1 -1
  392. package/build/esm/createAttachmentFromRid.js +38 -0
  393. package/build/esm/createAttachmentFromRid.js.map +1 -0
  394. package/build/esm/createClient.d.ts +1 -1
  395. package/build/esm/createClient.d.ts.map +1 -1
  396. package/build/esm/createClient.js +88 -0
  397. package/build/esm/createClient.js.map +1 -0
  398. package/build/esm/createClient.test.js +45 -0
  399. package/build/esm/createClient.test.js.map +1 -0
  400. package/build/esm/createMinimalClient.js +42 -0
  401. package/build/esm/createMinimalClient.js.map +1 -0
  402. package/build/esm/createPlatformClient.js +33 -0
  403. package/build/esm/createPlatformClient.js.map +1 -0
  404. package/build/esm/createTimeseriesProperty.d.ts +12 -2
  405. package/build/esm/createTimeseriesProperty.d.ts.map +1 -1
  406. package/build/esm/createTimeseriesProperty.js +79 -0
  407. package/build/esm/createTimeseriesProperty.js.map +1 -0
  408. package/build/esm/definitions/LinkDefinitions.test.js +41 -0
  409. package/build/esm/definitions/LinkDefinitions.test.js.map +1 -0
  410. package/build/esm/fetchMetadata.d.ts +2 -0
  411. package/build/esm/fetchMetadata.d.ts.map +1 -0
  412. package/build/esm/fetchMetadata.js +35 -0
  413. package/build/esm/fetchMetadata.js.map +1 -0
  414. package/build/esm/fetchMetadata.test.d.ts +2 -0
  415. package/build/esm/fetchMetadata.test.d.ts.map +1 -0
  416. package/build/esm/fetchMetadata.test.js +218 -0
  417. package/build/esm/fetchMetadata.test.js.map +1 -0
  418. package/build/esm/index.d.ts +3 -2
  419. package/build/esm/index.d.ts.map +1 -1
  420. package/build/esm/index.js +22 -12
  421. package/build/esm/index.js.map +1 -1
  422. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js +25 -0
  423. package/build/esm/intellisense.test.helpers/callsQueryAcceptsObject.js.map +1 -0
  424. package/build/esm/intellisense.test.js +86 -0
  425. package/build/esm/intellisense.test.js.map +1 -0
  426. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js +34 -0
  427. package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -0
  428. package/build/esm/internal/conversions/modernToLegacyAggregationClause.js +38 -0
  429. package/build/esm/internal/conversions/modernToLegacyAggregationClause.js.map +1 -0
  430. package/build/esm/internal/conversions/modernToLegacyGroupByClause.js +62 -0
  431. package/build/esm/internal/conversions/modernToLegacyGroupByClause.js.map +1 -0
  432. package/build/esm/internal/conversions/modernToLegacyWhereClause.js +144 -0
  433. package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -0
  434. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js +486 -0
  435. package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -0
  436. package/build/esm/object/AttachmentUpload.d.ts +1 -1
  437. package/build/esm/object/AttachmentUpload.d.ts.map +1 -1
  438. package/build/esm/object/AttachmentUpload.js +27 -0
  439. package/build/esm/object/AttachmentUpload.js.map +1 -0
  440. package/build/esm/object/Cache.js +76 -0
  441. package/build/esm/object/Cache.js.map +1 -0
  442. package/build/esm/object/Cache.test.js +283 -0
  443. package/build/esm/object/Cache.test.js.map +1 -0
  444. package/build/esm/object/SimpleCache.js +67 -0
  445. package/build/esm/object/SimpleCache.js.map +1 -0
  446. package/build/esm/object/aggregate.js +69 -0
  447. package/build/esm/object/aggregate.js.map +1 -0
  448. package/build/esm/object/aggregate.test.js +398 -0
  449. package/build/esm/object/aggregate.test.js.map +1 -0
  450. package/build/esm/object/attachment.test.js +55 -0
  451. package/build/esm/object/attachment.test.js.map +1 -0
  452. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts +4 -5
  453. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.d.ts.map +1 -1
  454. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js +17 -0
  455. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -0
  456. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts +2 -3
  457. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.d.ts.map +1 -1
  458. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js +22 -0
  459. package/build/esm/object/convertWireToOsdkObjects/InternalSymbols.js.map +1 -0
  460. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js +17 -0
  461. package/build/esm/object/convertWireToOsdkObjects/ObjectHolder.js.map +1 -0
  462. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.d.ts.map +1 -1
  463. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js +48 -0
  464. package/build/esm/object/convertWireToOsdkObjects/OsdkCustomInspectPrototype.js.map +1 -0
  465. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js +17 -0
  466. package/build/esm/object/convertWireToOsdkObjects/PropertyDescriptorRecord.js.map +1 -0
  467. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +82 -0
  468. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -0
  469. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +114 -0
  470. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -0
  471. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts +1 -1
  472. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.d.ts.map +1 -1
  473. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js +55 -0
  474. package/build/esm/object/convertWireToOsdkObjects/getDollarAs.js.map +1 -0
  475. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js +60 -0
  476. package/build/esm/object/convertWireToOsdkObjects/getDollarLink.js.map +1 -0
  477. package/build/esm/object/convertWireToOsdkObjects.js +150 -0
  478. package/build/esm/object/convertWireToOsdkObjects.js.map +1 -0
  479. package/build/esm/object/convertWireToOsdkObjects.test.js +254 -0
  480. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -0
  481. package/build/esm/object/fetchPage.d.ts +2 -3
  482. package/build/esm/object/fetchPage.d.ts.map +1 -1
  483. package/build/esm/object/fetchPage.js +135 -0
  484. package/build/esm/object/fetchPage.js.map +1 -0
  485. package/build/esm/object/fetchPage.test.js +106 -0
  486. package/build/esm/object/fetchPage.test.js.map +1 -0
  487. package/build/esm/object/fetchSingle.js +47 -0
  488. package/build/esm/object/fetchSingle.js.map +1 -0
  489. package/build/esm/object/object.test.d.ts +4 -5
  490. package/build/esm/object/object.test.d.ts.map +1 -1
  491. package/build/esm/object/object.test.js +179 -0
  492. package/build/esm/object/object.test.js.map +1 -0
  493. package/build/esm/object/timeseries.test.js +163 -0
  494. package/build/esm/object/timeseries.test.js.map +1 -0
  495. package/build/esm/objectSet/ObjectSet.test.js +313 -0
  496. package/build/esm/objectSet/ObjectSet.test.js.map +1 -0
  497. package/build/esm/objectSet/ObjectSetFactory.js +17 -0
  498. package/build/esm/objectSet/ObjectSetFactory.js.map +1 -0
  499. package/build/esm/objectSet/ObjectSetListenerWebsocket.d.ts.map +1 -1
  500. package/build/esm/objectSet/ObjectSetListenerWebsocket.js +536 -0
  501. package/build/esm/objectSet/ObjectSetListenerWebsocket.js.map +1 -0
  502. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js +338 -0
  503. package/build/esm/objectSet/ObjectSetListenerWebsocket.test.js.map +1 -0
  504. package/build/esm/objectSet/conjureUnionType.js +27 -0
  505. package/build/esm/objectSet/conjureUnionType.js.map +1 -0
  506. package/build/esm/objectSet/createObjectSet.js +136 -0
  507. package/build/esm/objectSet/createObjectSet.js.map +1 -0
  508. package/build/esm/objectSet/toConjureObjectSet.js +158 -0
  509. package/build/esm/objectSet/toConjureObjectSet.js.map +1 -0
  510. package/build/esm/ontology/OntologyProvider.d.ts +7 -13
  511. package/build/esm/ontology/OntologyProvider.d.ts.map +1 -1
  512. package/build/esm/ontology/OntologyProvider.js +17 -0
  513. package/build/esm/ontology/OntologyProvider.js.map +1 -0
  514. package/build/esm/ontology/StandardOntologyProvider.d.ts.map +1 -1
  515. package/build/esm/ontology/StandardOntologyProvider.js +59 -0
  516. package/build/esm/ontology/StandardOntologyProvider.js.map +1 -0
  517. package/build/esm/ontology/StandardOntologyProvider.test.js +48 -0
  518. package/build/esm/ontology/StandardOntologyProvider.test.js.map +1 -0
  519. package/build/esm/ontology/loadActionMetadata.d.ts +4 -0
  520. package/build/esm/ontology/loadActionMetadata.d.ts.map +1 -0
  521. package/build/esm/ontology/loadActionMetadata.js +22 -0
  522. package/build/esm/ontology/loadActionMetadata.js.map +1 -0
  523. package/build/esm/ontology/loadFullObjectMetadata.d.ts +2 -2
  524. package/build/esm/ontology/loadFullObjectMetadata.d.ts.map +1 -1
  525. package/build/esm/ontology/loadFullObjectMetadata.js +28 -0
  526. package/build/esm/ontology/loadFullObjectMetadata.js.map +1 -0
  527. package/build/esm/ontology/loadInterfaceMetadata.d.ts +4 -0
  528. package/build/esm/ontology/loadInterfaceMetadata.d.ts.map +1 -0
  529. package/build/esm/ontology/loadInterfaceMetadata.js +24 -0
  530. package/build/esm/ontology/loadInterfaceMetadata.js.map +1 -0
  531. package/build/esm/ontology/loadQueryMetadata.d.ts +4 -0
  532. package/build/esm/ontology/loadQueryMetadata.d.ts.map +1 -0
  533. package/build/esm/ontology/loadQueryMetadata.js +22 -0
  534. package/build/esm/ontology/loadQueryMetadata.js.map +1 -0
  535. package/build/esm/ontology/makeConjureContext.js +28 -0
  536. package/build/esm/ontology/makeConjureContext.js.map +1 -0
  537. package/build/esm/pageRequestAsAsyncIter.js +37 -0
  538. package/build/esm/pageRequestAsAsyncIter.js.map +1 -0
  539. package/build/esm/public/unstable-do-not-use.d.ts +0 -4
  540. package/build/esm/public/unstable-do-not-use.d.ts.map +1 -1
  541. package/build/esm/public/unstable-do-not-use.js +16 -881
  542. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  543. package/build/esm/queries/applyQuery.d.ts +3 -4
  544. package/build/esm/queries/applyQuery.d.ts.map +1 -1
  545. package/build/esm/queries/applyQuery.js +234 -0
  546. package/build/esm/queries/applyQuery.js.map +1 -0
  547. package/build/esm/queries/queries.test.js +171 -0
  548. package/build/esm/queries/queries.test.js.map +1 -0
  549. package/build/esm/queries/types.d.ts +10 -11
  550. package/build/esm/queries/types.d.ts.map +1 -1
  551. package/build/esm/queries/types.js +17 -0
  552. package/build/esm/queries/types.js.map +1 -0
  553. package/build/esm/tsserver.d.ts +1 -1
  554. package/build/esm/tsserver.d.ts.map +1 -1
  555. package/build/esm/tsserver.js +133 -0
  556. package/build/esm/tsserver.js.map +1 -0
  557. package/build/esm/util/ArrayElement.js +17 -0
  558. package/build/esm/util/ArrayElement.js.map +1 -0
  559. package/build/esm/util/NOOP.js +17 -0
  560. package/build/esm/util/NOOP.js.map +1 -0
  561. package/build/esm/util/NullableProps.js +17 -0
  562. package/build/esm/util/NullableProps.js.map +1 -0
  563. package/build/esm/util/UserAgent.js +17 -0
  564. package/build/esm/util/UserAgent.js.map +1 -0
  565. package/build/esm/util/WireObjectSet.js +21 -0
  566. package/build/esm/util/WireObjectSet.js.map +1 -0
  567. package/build/esm/util/addUserAgentAndRequestContextHeaders.js +27 -0
  568. package/build/esm/util/addUserAgentAndRequestContextHeaders.js.map +1 -0
  569. package/build/esm/util/augmentRequestContext.js +52 -0
  570. package/build/esm/util/augmentRequestContext.js.map +1 -0
  571. package/build/esm/util/isOntologyObjectV2.js +20 -0
  572. package/build/esm/util/isOntologyObjectV2.js.map +1 -0
  573. package/build/esm/util/isOsdkBaseObject.d.ts +1 -1
  574. package/build/esm/util/isOsdkBaseObject.d.ts.map +1 -1
  575. package/build/esm/util/isOsdkBaseObject.js +19 -0
  576. package/build/esm/util/isOsdkBaseObject.js.map +1 -0
  577. package/build/esm/util/isOsdkObject.d.ts +1 -1
  578. package/build/esm/util/isOsdkObject.d.ts.map +1 -1
  579. package/build/esm/util/isOsdkObject.js +19 -0
  580. package/build/esm/util/isOsdkObject.js.map +1 -0
  581. package/build/esm/util/partialBy.js +17 -0
  582. package/build/esm/util/partialBy.js.map +1 -0
  583. package/build/esm/util/streamutils.js +95 -0
  584. package/build/esm/util/streamutils.js.map +1 -0
  585. package/build/esm/util/toDataValue.js +73 -0
  586. package/build/esm/util/toDataValue.js.map +1 -0
  587. package/build/esm/util/toDataValue.test.js +117 -0
  588. package/build/esm/util/toDataValue.test.js.map +1 -0
  589. package/build/esm/util/toDataValueQueries.js +107 -0
  590. package/build/esm/util/toDataValueQueries.js.map +1 -0
  591. package/package.json +15 -27
  592. package/build/browser/chunk-ITBKY5DE.js +0 -2327
  593. package/build/browser/chunk-ITBKY5DE.js.map +0 -1
  594. package/build/esm/__unstable/UNSTABLE_createClient.d.ts +0 -4
  595. package/build/esm/__unstable/UNSTABLE_createClient.d.ts.map +0 -1
  596. package/build/esm/__unstable/UnstableClient.d.ts +0 -12
  597. package/build/esm/__unstable/UnstableClient.d.ts.map +0 -1
  598. package/build/esm/chunk-ITBKY5DE.js +0 -2327
  599. package/build/esm/chunk-ITBKY5DE.js.map +0 -1
  600. package/build/esm/objectSet/ObjectSetListener.d.ts +0 -18
  601. package/build/esm/objectSet/ObjectSetListener.d.ts.map +0 -1
  602. package/build/esm/objectSet/createUnstableObjectSet.d.ts +0 -8
  603. package/build/esm/objectSet/createUnstableObjectSet.d.ts.map +0 -1
  604. package/build/esm/ontology/loadInterfaceDefinition.d.ts +0 -4
  605. package/build/esm/ontology/loadInterfaceDefinition.d.ts.map +0 -1
@@ -0,0 +1,88 @@
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
+ import { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks, __EXPERIMENTAL__NOT_SUPPORTED_YET__preexistingObjectSet } from "@osdk/api/unstable";
17
+ import { symbolClientContext } from "@osdk/shared.client";
18
+ import { createBulkLinksAsyncIterFactory } from "./__unstable/createBulkLinksAsyncIterFactory.js";
19
+ import { applyAction } from "./actions/applyAction.js";
20
+ import { createMinimalClient } from "./createMinimalClient.js";
21
+ import { fetchMetadataInternal } from "./fetchMetadata.js";
22
+ import { createObjectSet } from "./objectSet/createObjectSet.js";
23
+ import { applyQuery } from "./queries/applyQuery.js";
24
+ class ActionInvoker {
25
+ constructor(clientCtx, actionDef) {
26
+ // We type the property as a generic function as binding `applyAction`
27
+ // doesn't return a type thats all that useful anyway
28
+ // The implements covers us for the most part here as this exact type doesn't
29
+ // escape this file
30
+ this.applyAction = applyAction.bind(undefined, clientCtx, actionDef);
31
+ this.batchApplyAction = applyAction.bind(undefined, clientCtx, actionDef);
32
+ }
33
+ applyAction;
34
+ batchApplyAction;
35
+ }
36
+ class QueryInvoker {
37
+ constructor(clientCtx, queryDef) {
38
+ this.executeFunction = applyQuery.bind(undefined, clientCtx, queryDef);
39
+ }
40
+ executeFunction;
41
+ }
42
+ /** @internal */
43
+ export function createClientInternal(objectSetFactory,
44
+ // first so i can bind
45
+ baseUrl, ontologyRid, tokenProvider, options = undefined, fetchFn = fetch) {
46
+ const clientCtx = createMinimalClient({
47
+ ontologyRid
48
+ }, baseUrl, tokenProvider, options, fetchFn, objectSetFactory);
49
+ const fetchMetadata = fetchMetadataInternal.bind(undefined, clientCtx);
50
+ const client = Object.defineProperties(function (o) {
51
+ if (o.type === "object" || o.type === "interface") {
52
+ return objectSetFactory(o, clientCtx);
53
+ } else if (o.type === "action") {
54
+ return new ActionInvoker(clientCtx, o); // then as any for dealing with the conditional return value
55
+ } else if (o.type === "query") {
56
+ return new QueryInvoker(clientCtx, o);
57
+ } else {
58
+ throw new Error("not implemented");
59
+ }
60
+ }, {
61
+ [symbolClientContext]: {
62
+ value: clientCtx
63
+ },
64
+ [__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks]: {
65
+ get: () => createBulkLinksAsyncIterFactory(clientCtx)
66
+ },
67
+ [__EXPERIMENTAL__NOT_SUPPORTED_YET__preexistingObjectSet]: {
68
+ get: () => (definition, rid) => {
69
+ return createObjectSet(definition, client[symbolClientContext], {
70
+ type: "intersect",
71
+ objectSets: [{
72
+ type: "base",
73
+ objectType: definition.apiName
74
+ }, {
75
+ type: "reference",
76
+ reference: rid
77
+ }]
78
+ });
79
+ }
80
+ },
81
+ fetchMetadata: {
82
+ value: fetchMetadata
83
+ }
84
+ });
85
+ return client;
86
+ }
87
+ export const createClient = createClientInternal.bind(undefined, createObjectSet);
88
+ //# sourceMappingURL=createClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createClient.js","names":["__EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks","__EXPERIMENTAL__NOT_SUPPORTED_YET__preexistingObjectSet","symbolClientContext","createBulkLinksAsyncIterFactory","applyAction","createMinimalClient","fetchMetadataInternal","createObjectSet","applyQuery","ActionInvoker","constructor","clientCtx","actionDef","bind","undefined","batchApplyAction","QueryInvoker","queryDef","executeFunction","createClientInternal","objectSetFactory","baseUrl","ontologyRid","tokenProvider","options","fetchFn","fetch","fetchMetadata","client","Object","defineProperties","o","type","Error","value","get","definition","rid","objectSets","objectType","apiName","reference","createClient"],"sources":["createClient.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 */\nimport { __EXPERIMENTAL__NOT_SUPPORTED_YET__getBulkLinks, __EXPERIMENTAL__NOT_SUPPORTED_YET__preexistingObjectSet, } from \"@osdk/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 applyAction;\n batchApplyAction;\n}\nclass QueryInvoker {\n constructor(clientCtx, queryDef) {\n this.executeFunction = applyQuery.bind(undefined, clientCtx, queryDef);\n }\n executeFunction;\n}\n/** @internal */\nexport function createClientInternal(objectSetFactory, // first so i can bind\nbaseUrl, ontologyRid, tokenProvider, options = undefined, fetchFn = fetch) {\n const clientCtx = createMinimalClient({ ontologyRid }, baseUrl, tokenProvider, options, fetchFn, objectSetFactory);\n function clientFn(o) {\n if (o.type === \"object\" || o.type === \"interface\") {\n return objectSetFactory(o, clientCtx);\n }\n else if (o.type === \"action\") {\n return new ActionInvoker(clientCtx, o); // then as any for dealing with the conditional return value\n }\n else if (o.type === \"query\") {\n return new QueryInvoker(clientCtx, o);\n }\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 {\n type: \"base\",\n objectType: definition.apiName,\n },\n {\n type: \"reference\",\n reference: rid,\n },\n ],\n });\n },\n },\n fetchMetadata: {\n value: fetchMetadata,\n },\n });\n return client;\n}\nexport const createClient = createClientInternal.bind(undefined, createObjectSet);\n"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,45 @@
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 { Task } from "@osdk/client.test.ontology";
17
+ import { mockFetchResponse, MockOntology } from "@osdk/shared.test";
18
+ import { beforeEach, describe, expect, it, vi } from "vitest";
19
+ import { createClient } from "./createClient.js";
20
+ import { USER_AGENT } from "./util/UserAgent.js";
21
+ describe(createClient, () => {
22
+ let fetchFunction;
23
+ let client;
24
+ beforeEach(() => {
25
+ fetchFunction = vi.fn();
26
+ client = createClient("https://mock.com", MockOntology.metadata.ontologyRid, async () => "Token", undefined, fetchFunction);
27
+ mockFetchResponse(fetchFunction, {
28
+ data: []
29
+ });
30
+ });
31
+ describe("user agent passing", () => {
32
+ function getUserAgentPartsFromMockedFetch() {
33
+ const userAgent = (fetchFunction.mock.calls[0][1]?.headers).get("Fetch-User-Agent");
34
+ const parts = userAgent?.split(" ") ?? [];
35
+ return parts;
36
+ }
37
+ it("works for objects", async () => {
38
+ await client(Task).fetchPage();
39
+ expect(fetchFunction).toHaveBeenCalledTimes(1);
40
+ const parts = getUserAgentPartsFromMockedFetch();
41
+ expect(parts).toEqual([...Task.osdkMetadata.extraUserAgent.split(" "), USER_AGENT]);
42
+ });
43
+ });
44
+ });
45
+ //# sourceMappingURL=createClient.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createClient.test.js","names":["Task","mockFetchResponse","MockOntology","beforeEach","describe","expect","it","vi","createClient","USER_AGENT","fetchFunction","client","fn","metadata","ontologyRid","undefined","data","getUserAgentPartsFromMockedFetch","userAgent","mock","calls","headers","get","parts","split","fetchPage","toHaveBeenCalledTimes","toEqual","osdkMetadata","extraUserAgent"],"sources":["createClient.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 { Task } from \"@osdk/client.test.ontology\";\nimport { mockFetchResponse, MockOntology } from \"@osdk/shared.test\";\nimport { beforeEach, describe, expect, it, vi } from \"vitest\";\nimport { createClient } from \"./createClient.js\";\nimport { USER_AGENT } from \"./util/UserAgent.js\";\ndescribe(createClient, () => {\n const validOlderVersion = \"0.13.0\";\n const validCurrentVersion = \"0.14.0\";\n const invalidFutureVersion = \"100.100.100\";\n let fetchFunction;\n let client;\n beforeEach(() => {\n fetchFunction = vi.fn();\n client = createClient(\"https://mock.com\", MockOntology.metadata.ontologyRid, async () => \"Token\", undefined, fetchFunction);\n mockFetchResponse(fetchFunction, { data: [] });\n });\n describe(\"user agent passing\", () => {\n function getUserAgentPartsFromMockedFetch() {\n const userAgent = (fetchFunction.mock.calls[0][1]?.headers)\n .get(\"Fetch-User-Agent\");\n const parts = userAgent?.split(\" \") ?? [];\n return parts;\n }\n it(\"works for objects\", async () => {\n await client(Task).fetchPage();\n expect(fetchFunction).toHaveBeenCalledTimes(1);\n const parts = getUserAgentPartsFromMockedFetch();\n expect(parts).toEqual([\n ...Task.osdkMetadata\n .extraUserAgent\n .split(\" \"),\n USER_AGENT,\n ]);\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,4BAA4B;AACjD,SAASC,iBAAiB,EAAEC,YAAY,QAAQ,mBAAmB;AACnE,SAASC,UAAU,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,EAAEC,EAAE,QAAQ,QAAQ;AAC7D,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,UAAU,QAAQ,qBAAqB;AAChDL,QAAQ,CAACI,YAAY,EAAE,MAAM;EAIzB,IAAIE,aAAa;EACjB,IAAIC,MAAM;EACVR,UAAU,CAAC,MAAM;IACbO,aAAa,GAAGH,EAAE,CAACK,EAAE,CAAC,CAAC;IACvBD,MAAM,GAAGH,YAAY,CAAC,kBAAkB,EAAEN,YAAY,CAACW,QAAQ,CAACC,WAAW,EAAE,YAAY,OAAO,EAAEC,SAAS,EAAEL,aAAa,CAAC;IAC3HT,iBAAiB,CAACS,aAAa,EAAE;MAAEM,IAAI,EAAE;IAAG,CAAC,CAAC;EAClD,CAAC,CAAC;EACFZ,QAAQ,CAAC,oBAAoB,EAAE,MAAM;IACjC,SAASa,gCAAgCA,CAAA,EAAG;MACxC,MAAMC,SAAS,GAAG,CAACR,aAAa,CAACS,IAAI,CAACC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAEC,OAAO,EACrDC,GAAG,CAAC,kBAAkB,CAAC;MAC5B,MAAMC,KAAK,GAAGL,SAAS,EAAEM,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE;MACzC,OAAOD,KAAK;IAChB;IACAjB,EAAE,CAAC,mBAAmB,EAAE,YAAY;MAChC,MAAMK,MAAM,CAACX,IAAI,CAAC,CAACyB,SAAS,CAAC,CAAC;MAC9BpB,MAAM,CAACK,aAAa,CAAC,CAACgB,qBAAqB,CAAC,CAAC,CAAC;MAC9C,MAAMH,KAAK,GAAGN,gCAAgC,CAAC,CAAC;MAChDZ,MAAM,CAACkB,KAAK,CAAC,CAACI,OAAO,CAAC,CAClB,GAAG3B,IAAI,CAAC4B,YAAY,CACfC,cAAc,CACdL,KAAK,CAAC,GAAG,CAAC,EACff,UAAU,CACb,CAAC;IACN,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,42 @@
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
+ import { createSharedClientContext } from "@osdk/shared.client.impl";
17
+ import { createObjectSet } from "./objectSet/createObjectSet.js";
18
+ import { createStandardOntologyProviderFactory } from "./ontology/StandardOntologyProvider.js";
19
+ import { USER_AGENT } from "./util/UserAgent.js";
20
+ /** @internal */
21
+ export function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = createObjectSet) {
22
+ if (process?.env?.NODE_ENV !== "production") {
23
+ try {
24
+ new URL(baseUrl);
25
+ } catch (e) {
26
+ const hint = !baseUrl.startsWith("http://") || !baseUrl.startsWith("https://") ? ". Did you forget to add 'http://' or 'https://'?" : "";
27
+ throw new Error(`Invalid stack URL: ${baseUrl}${hint}`);
28
+ }
29
+ }
30
+ const minimalClient = {
31
+ ...createSharedClientContext(baseUrl, tokenProvider, USER_AGENT, fetchFn),
32
+ objectSetFactory,
33
+ ontologyRid: metadata.ontologyRid,
34
+ logger: options.logger,
35
+ clientCacheKey: {},
36
+ requestContext: {}
37
+ };
38
+ return Object.assign(minimalClient, {
39
+ ontologyProvider: createStandardOntologyProviderFactory(options)(minimalClient)
40
+ });
41
+ }
42
+ //# sourceMappingURL=createMinimalClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createMinimalClient.js","names":["createSharedClientContext","createObjectSet","createStandardOntologyProviderFactory","USER_AGENT","createMinimalClient","metadata","baseUrl","tokenProvider","options","fetchFn","global","fetch","objectSetFactory","process","env","NODE_ENV","URL","e","hint","startsWith","Error","minimalClient","ontologyRid","logger","clientCacheKey","requestContext","Object","assign","ontologyProvider"],"sources":["createMinimalClient.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 */\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/** @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 }\n catch (e) {\n const hint = !baseUrl.startsWith(\"http://\") || !baseUrl.startsWith(\"https://\")\n ? \". Did you forget to add 'http://' or 'https://'?\"\n : \"\";\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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,yBAAyB,QAAQ,0BAA0B;AACpE,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SAASC,qCAAqC,QAAS,wCAAwC;AAC/F,SAASC,UAAU,QAAQ,qBAAqB;AAChD;AACA,OAAO,SAASC,mBAAmBA,CAACC,QAAQ,EAAEC,OAAO,EAAEC,aAAa,EAAEC,OAAO,GAAG,CAAC,CAAC,EAAEC,OAAO,GAAGC,MAAM,CAACC,KAAK,EAAEC,gBAAgB,GAAGX,eAAe,EAAE;EAC5I,IAAIY,OAAO,EAAEC,GAAG,EAAEC,QAAQ,KAAK,YAAY,EAAE;IACzC,IAAI;MACA,IAAIC,GAAG,CAACV,OAAO,CAAC;IACpB,CAAC,CACD,OAAOW,CAAC,EAAE;MACN,MAAMC,IAAI,GAAG,CAACZ,OAAO,CAACa,UAAU,CAAC,SAAS,CAAC,IAAI,CAACb,OAAO,CAACa,UAAU,CAAC,UAAU,CAAC,GACxE,kDAAkD,GAClD,EAAE;MACR,MAAM,IAAIC,KAAK,CAAC,sBAAsBd,OAAO,GAAGY,IAAI,EAAE,CAAC;IAC3D;EACJ;EACA,MAAMG,aAAa,GAAG;IAClB,GAAGrB,yBAAyB,CAACM,OAAO,EAAEC,aAAa,EAAEJ,UAAU,EAAEM,OAAO,CAAC;IACzEG,gBAAgB;IAChBU,WAAW,EAAEjB,QAAQ,CAACiB,WAAW;IACjCC,MAAM,EAAEf,OAAO,CAACe,MAAM;IACtBC,cAAc,EAAE,CAAC,CAAC;IAClBC,cAAc,EAAE,CAAC;EACrB,CAAC;EACD,OAAOC,MAAM,CAACC,MAAM,CAACN,aAAa,EAAE;IAChCO,gBAAgB,EAAE1B,qCAAqC,CAACM,OAAO,CAAC,CAACa,aAAa;EAClF,CAAC,CAAC;AACN","ignoreList":[]}
@@ -0,0 +1,33 @@
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
+ import { createSharedClientContext } from "@osdk/shared.client.impl";
17
+ import { USER_AGENT } from "./util/UserAgent.js";
18
+ /**
19
+ * Creates a client that can only be used with Platform APIs.
20
+ *
21
+ * If you already have an OSDK Client (from `createClient`), you do not need to
22
+ * create one of these - those clients can be used with Platform APIs as well.
23
+ *
24
+ * @param baseUrl
25
+ * @param tokenProvider
26
+ * @param options Currently unused, reserved for future use.
27
+ * @param fetchFn
28
+ * @returns
29
+ */
30
+ export function createPlatformClient(baseUrl, tokenProvider, options = undefined, fetchFn = fetch) {
31
+ return createSharedClientContext(baseUrl, tokenProvider, USER_AGENT, fetchFn);
32
+ }
33
+ //# sourceMappingURL=createPlatformClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createPlatformClient.js","names":["createSharedClientContext","USER_AGENT","createPlatformClient","baseUrl","tokenProvider","options","undefined","fetchFn","fetch"],"sources":["createPlatformClient.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 */\nimport { createSharedClientContext } from \"@osdk/shared.client.impl\";\nimport { USER_AGENT } from \"./util/UserAgent.js\";\n/**\n * Creates a client that can only be used with Platform APIs.\n *\n * If you already have an OSDK Client (from `createClient`), you do not need to\n * create one of these - those clients can be used with Platform APIs as well.\n *\n * @param baseUrl\n * @param tokenProvider\n * @param options Currently unused, reserved for future use.\n * @param fetchFn\n * @returns\n */\nexport function createPlatformClient(baseUrl, tokenProvider, options = undefined, fetchFn = fetch) {\n return createSharedClientContext(baseUrl, tokenProvider, USER_AGENT, fetchFn);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,yBAAyB,QAAQ,0BAA0B;AACpE,SAASC,UAAU,QAAQ,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAACC,OAAO,EAAEC,aAAa,EAAEC,OAAO,GAAGC,SAAS,EAAEC,OAAO,GAAGC,KAAK,EAAE;EAC/F,OAAOR,yBAAyB,CAACG,OAAO,EAAEC,aAAa,EAAEH,UAAU,EAAEM,OAAO,CAAC;AACjF","ignoreList":[]}
@@ -1,4 +1,14 @@
1
- import { TimeSeriesProperty } from "@osdk/client.api";
1
+ import type { TimeSeriesPoint, TimeSeriesProperty, TimeSeriesQuery } from "@osdk/api";
2
2
  import type { MinimalClient } from "./MinimalClientContext.js";
3
- export declare function createTimeseriesProperty<T extends number | string>(client: MinimalClient, objectApiName: string, primaryKey: any, propertyName: string): TimeSeriesProperty<T>;
3
+ export declare class TimeSeriesPropertyImpl<T extends number | string> implements TimeSeriesProperty<T> {
4
+ #private;
5
+ constructor(client: MinimalClient, objectApiName: string, primaryKey: any, propertyName: string);
6
+ getFirstPoint(): Promise<TimeSeriesPoint<T>>;
7
+ getLastPoint(): Promise<TimeSeriesPoint<T>>;
8
+ getAllPoints(query?: TimeSeriesQuery): Promise<TimeSeriesPoint<T>[]>;
9
+ asyncIterPoints(query?: TimeSeriesQuery): AsyncGenerator<{
10
+ time: any;
11
+ value: T;
12
+ }, void, unknown>;
13
+ }
4
14
  //# sourceMappingURL=createTimeseriesProperty.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createTimeseriesProperty.d.ts","sourceRoot":"","sources":["../../src/createTimeseriesProperty.ts"],"names":[],"mappings":"AAgBA,OAAO,EAIL,kBAAkB,EAEnB,MAAM,kBAAkB,CAAC;AAS1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAM/D,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAChE,MAAM,EAAE,aAAa,EACrB,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,GAAG,EACf,YAAY,EAAE,MAAM,GACnB,kBAAkB,CAAC,CAAC,CAAC,CAmDvB"}
1
+ {"version":3,"file":"createTimeseriesProperty.d.ts","sourceRoot":"","sources":["../../src/createTimeseriesProperty.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EAClB,eAAe,EAChB,MAAM,WAAW,CAAC;AAInB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAM/D,qBAAa,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAC3D,YAAW,kBAAkB,CAAC,CAAC,CAAC;;gBAM9B,MAAM,EAAE,aAAa,EACrB,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,GAAG,EACf,YAAY,EAAE,MAAM;IAMT,aAAa;IAQb,YAAY;IAQZ,YAAY,CAAC,KAAK,CAAC,EAAE,eAAe;IAYnC,eAAe,CAC3B,KAAK,CAAC,EAAE,eAAe;;eAgBG,CAAC;;CAI9B"}
@@ -0,0 +1,79 @@
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
+ import { TimeseriesDurationMapping } from "@osdk/api";
17
+ import * as OntologiesV2 from "@osdk/internal.foundry.ontologiesv2";
18
+ import { iterateReadableStream, parseStreamedResponse } from "./util/streamutils.js";
19
+ export class TimeSeriesPropertyImpl {
20
+ #triplet;
21
+ #client;
22
+ constructor(client, objectApiName, primaryKey, propertyName) {
23
+ this.#client = client;
24
+ this.#triplet = [objectApiName, primaryKey, propertyName];
25
+ }
26
+ async getFirstPoint() {
27
+ return OntologiesV2.TimeSeriesPropertiesV2.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
28
+ }
29
+ async getLastPoint() {
30
+ return OntologiesV2.TimeSeriesPropertiesV2.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
31
+ }
32
+ async getAllPoints(query) {
33
+ const allPoints = [];
34
+ for await (const point of this.asyncIterPoints(query)) {
35
+ allPoints.push({
36
+ time: point.time,
37
+ value: point.value
38
+ });
39
+ }
40
+ return allPoints;
41
+ }
42
+ async *asyncIterPoints(query) {
43
+ const streamPointsIterator = await OntologiesV2.TimeSeriesPropertiesV2.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
44
+ range: getTimeRange(query)
45
+ } : {});
46
+ const reader = streamPointsIterator.stream().getReader();
47
+ for await (const point of parseStreamedResponse(iterateReadableStream(reader))) {
48
+ yield {
49
+ time: point.time,
50
+ value: point.value
51
+ };
52
+ }
53
+ }
54
+ }
55
+ function getTimeRange(body) {
56
+ if ("$startTime" in body || "$endTime" in body) {
57
+ return {
58
+ type: "absolute",
59
+ startTime: body.$startTime,
60
+ endTime: body.$endTime
61
+ };
62
+ }
63
+ return body.$before ? {
64
+ type: "relative",
65
+ startTime: {
66
+ when: "BEFORE",
67
+ value: body.$before,
68
+ unit: TimeseriesDurationMapping[body.$unit]
69
+ }
70
+ } : {
71
+ type: "relative",
72
+ endTime: {
73
+ when: "AFTER",
74
+ value: body.$after,
75
+ unit: TimeseriesDurationMapping[body.$unit]
76
+ }
77
+ };
78
+ }
79
+ //# sourceMappingURL=createTimeseriesProperty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createTimeseriesProperty.js","names":["TimeseriesDurationMapping","OntologiesV2","iterateReadableStream","parseStreamedResponse","TimeSeriesPropertyImpl","triplet","client","constructor","objectApiName","primaryKey","propertyName","getFirstPoint","TimeSeriesPropertiesV2","ontologyRid","getLastPoint","getAllPoints","query","allPoints","point","asyncIterPoints","push","time","value","streamPointsIterator","streamPoints","range","getTimeRange","reader","stream","getReader","body","type","startTime","$startTime","endTime","$endTime","$before","when","unit","$unit","$after"],"sources":["createTimeseriesProperty.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 */\nimport { TimeseriesDurationMapping } from \"@osdk/api\";\nimport * as OntologiesV2 from \"@osdk/internal.foundry.ontologiesv2\";\nimport { iterateReadableStream, parseStreamedResponse, } from \"./util/streamutils.js\";\nexport class TimeSeriesPropertyImpl {\n #triplet;\n #client;\n constructor(client, objectApiName, primaryKey, propertyName) {\n this.#client = client;\n this.#triplet = [objectApiName, primaryKey, propertyName];\n }\n async getFirstPoint() {\n return OntologiesV2.TimeSeriesPropertiesV2.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);\n }\n async getLastPoint() {\n return OntologiesV2.TimeSeriesPropertiesV2.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);\n }\n async getAllPoints(query) {\n const allPoints = [];\n for await (const point of this.asyncIterPoints(query)) {\n allPoints.push({\n time: point.time,\n value: point.value,\n });\n }\n return allPoints;\n }\n async *asyncIterPoints(query) {\n const streamPointsIterator = await OntologiesV2.TimeSeriesPropertiesV2\n .streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? { range: getTimeRange(query) } : {});\n const reader = streamPointsIterator.stream().getReader();\n for await (const point of parseStreamedResponse(iterateReadableStream(reader))) {\n yield {\n time: point.time,\n value: point.value,\n };\n }\n }\n}\nfunction getTimeRange(body) {\n if (\"$startTime\" in body || \"$endTime\" in body) {\n return {\n type: \"absolute\",\n startTime: body.$startTime,\n endTime: body.$endTime,\n };\n }\n return body.$before\n ? {\n type: \"relative\",\n startTime: {\n when: \"BEFORE\",\n value: body.$before,\n unit: TimeseriesDurationMapping[body.$unit],\n },\n }\n : {\n type: \"relative\",\n endTime: {\n when: \"AFTER\",\n value: body.$after,\n unit: TimeseriesDurationMapping[body.$unit],\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,yBAAyB,QAAQ,WAAW;AACrD,OAAO,KAAKC,YAAY,MAAM,qCAAqC;AACnE,SAASC,qBAAqB,EAAEC,qBAAqB,QAAS,uBAAuB;AACrF,OAAO,MAAMC,sBAAsB,CAAC;EAChC,CAACC,OAAO;EACR,CAACC,MAAM;EACPC,WAAWA,CAACD,MAAM,EAAEE,aAAa,EAAEC,UAAU,EAAEC,YAAY,EAAE;IACzD,IAAI,CAAC,CAACJ,MAAM,GAAGA,MAAM;IACrB,IAAI,CAAC,CAACD,OAAO,GAAG,CAACG,aAAa,EAAEC,UAAU,EAAEC,YAAY,CAAC;EAC7D;EACA,MAAMC,aAAaA,CAAA,EAAG;IAClB,OAAOV,YAAY,CAACW,sBAAsB,CAACD,aAAa,CAAC,IAAI,CAAC,CAACL,MAAM,EAAE,MAAM,IAAI,CAAC,CAACA,MAAM,CAACO,WAAW,EAAE,GAAG,IAAI,CAAC,CAACR,OAAO,CAAC;EAC5H;EACA,MAAMS,YAAYA,CAAA,EAAG;IACjB,OAAOb,YAAY,CAACW,sBAAsB,CAACE,YAAY,CAAC,IAAI,CAAC,CAACR,MAAM,EAAE,MAAM,IAAI,CAAC,CAACA,MAAM,CAACO,WAAW,EAAE,GAAG,IAAI,CAAC,CAACR,OAAO,CAAC;EAC3H;EACA,MAAMU,YAAYA,CAACC,KAAK,EAAE;IACtB,MAAMC,SAAS,GAAG,EAAE;IACpB,WAAW,MAAMC,KAAK,IAAI,IAAI,CAACC,eAAe,CAACH,KAAK,CAAC,EAAE;MACnDC,SAAS,CAACG,IAAI,CAAC;QACXC,IAAI,EAAEH,KAAK,CAACG,IAAI;QAChBC,KAAK,EAAEJ,KAAK,CAACI;MACjB,CAAC,CAAC;IACN;IACA,OAAOL,SAAS;EACpB;EACA,OAAOE,eAAeA,CAACH,KAAK,EAAE;IAC1B,MAAMO,oBAAoB,GAAG,MAAMtB,YAAY,CAACW,sBAAsB,CACjEY,YAAY,CAAC,IAAI,CAAC,CAAClB,MAAM,EAAE,MAAM,IAAI,CAAC,CAACA,MAAM,CAACO,WAAW,EAAE,GAAG,IAAI,CAAC,CAACR,OAAO,EAAEW,KAAK,GAAG;MAAES,KAAK,EAAEC,YAAY,CAACV,KAAK;IAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9H,MAAMW,MAAM,GAAGJ,oBAAoB,CAACK,MAAM,CAAC,CAAC,CAACC,SAAS,CAAC,CAAC;IACxD,WAAW,MAAMX,KAAK,IAAIf,qBAAqB,CAACD,qBAAqB,CAACyB,MAAM,CAAC,CAAC,EAAE;MAC5E,MAAM;QACFN,IAAI,EAAEH,KAAK,CAACG,IAAI;QAChBC,KAAK,EAAEJ,KAAK,CAACI;MACjB,CAAC;IACL;EACJ;AACJ;AACA,SAASI,YAAYA,CAACI,IAAI,EAAE;EACxB,IAAI,YAAY,IAAIA,IAAI,IAAI,UAAU,IAAIA,IAAI,EAAE;IAC5C,OAAO;MACHC,IAAI,EAAE,UAAU;MAChBC,SAAS,EAAEF,IAAI,CAACG,UAAU;MAC1BC,OAAO,EAAEJ,IAAI,CAACK;IAClB,CAAC;EACL;EACA,OAAOL,IAAI,CAACM,OAAO,GACb;IACEL,IAAI,EAAE,UAAU;IAChBC,SAAS,EAAE;MACPK,IAAI,EAAE,QAAQ;MACdf,KAAK,EAAEQ,IAAI,CAACM,OAAO;MACnBE,IAAI,EAAEtC,yBAAyB,CAAC8B,IAAI,CAACS,KAAK;IAC9C;EACJ,CAAC,GACC;IACER,IAAI,EAAE,UAAU;IAChBG,OAAO,EAAE;MACLG,IAAI,EAAE,OAAO;MACbf,KAAK,EAAEQ,IAAI,CAACU,MAAM;MAClBF,IAAI,EAAEtC,yBAAyB,CAAC8B,IAAI,CAACS,KAAK;IAC9C;EACJ,CAAC;AACT","ignoreList":[]}
@@ -0,0 +1,41 @@
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 { describe, expectTypeOf, it } from "vitest";
17
+ describe("LinkDefinitions", () => {
18
+ describe("OsdkObjectLinkObject", () => {
19
+ it("is correctly absent on types with no links", () => {
20
+ expectTypeOf().toEqualTypeOf();
21
+ });
22
+ it("populates on types with links", () => {
23
+ expectTypeOf().toEqualTypeOf();
24
+ });
25
+ describe("SingletonLinkAccessor", () => {
26
+ it("infers select properly", () => {
27
+ // this helper lets us get return types of functions that are generic
28
+
29
+ // // e.g. .lead.fetchOne({});
30
+ expectTypeOf().branded.toEqualTypeOf();
31
+ // e.g. .lead.fetchOne();
32
+ expectTypeOf().branded.toEqualTypeOf();
33
+ // e.g. .lead.fetchOne({ select: [] });
34
+ expectTypeOf().branded.toEqualTypeOf();
35
+ // e.g. .lead.fetchOne({ select: ["name"] });
36
+ expectTypeOf().toEqualTypeOf();
37
+ });
38
+ });
39
+ });
40
+ });
41
+ //# sourceMappingURL=LinkDefinitions.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkDefinitions.test.js","names":["describe","expectTypeOf","it","toEqualTypeOf","branded"],"sources":["LinkDefinitions.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 { describe, expectTypeOf, it } from \"vitest\";\ndescribe(\"LinkDefinitions\", () => {\n describe(\"OsdkObjectLinkObject\", () => {\n it(\"is correctly absent on types with no links\", () => {\n expectTypeOf()\n .toEqualTypeOf();\n });\n it(\"populates on types with links\", () => {\n expectTypeOf()\n .toEqualTypeOf();\n });\n describe(\"SingletonLinkAccessor\", () => {\n it(\"infers select properly\", () => {\n // this helper lets us get return types of functions that are generic\n class Helper {\n accessor;\n constructor(accessor) {\n this.accessor = accessor;\n }\n fetchOne() {\n return this.accessor.fetchOne();\n }\n }\n // // e.g. .lead.fetchOne({});\n expectTypeOf()\n .branded.toEqualTypeOf();\n // e.g. .lead.fetchOne();\n expectTypeOf().branded\n .toEqualTypeOf();\n // e.g. .lead.fetchOne({ select: [] });\n expectTypeOf().branded\n .toEqualTypeOf();\n // e.g. .lead.fetchOne({ select: [\"name\"] });\n expectTypeOf()\n .toEqualTypeOf();\n });\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AACnDF,QAAQ,CAAC,iBAAiB,EAAE,MAAM;EAC9BA,QAAQ,CAAC,sBAAsB,EAAE,MAAM;IACnCE,EAAE,CAAC,4CAA4C,EAAE,MAAM;MACnDD,YAAY,CAAC,CAAC,CACTE,aAAa,CAAC,CAAC;IACxB,CAAC,CAAC;IACFD,EAAE,CAAC,+BAA+B,EAAE,MAAM;MACtCD,YAAY,CAAC,CAAC,CACTE,aAAa,CAAC,CAAC;IACxB,CAAC,CAAC;IACFH,QAAQ,CAAC,uBAAuB,EAAE,MAAM;MACpCE,EAAE,CAAC,wBAAwB,EAAE,MAAM;QAC/B;;QAUA;QACAD,YAAY,CAAC,CAAC,CACTG,OAAO,CAACD,aAAa,CAAC,CAAC;QAC5B;QACAF,YAAY,CAAC,CAAC,CAACG,OAAO,CACjBD,aAAa,CAAC,CAAC;QACpB;QACAF,YAAY,CAAC,CAAC,CAACG,OAAO,CACjBD,aAAa,CAAC,CAAC;QACpB;QACAF,YAAY,CAAC,CAAC,CACTE,aAAa,CAAC,CAAC;MACxB,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=fetchMetadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchMetadata.d.ts","sourceRoot":"","sources":["../../src/fetchMetadata.ts"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
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
+ import { InterfaceDefinitions } from "./ontology/OntologyProvider.js";
17
+ /** @internal */
18
+ export const fetchMetadataInternal = async (client, definition) => {
19
+ if (definition.type === "object") {
20
+ const {
21
+ [InterfaceDefinitions]: interfaceDefs,
22
+ ...objectTypeDef
23
+ } = await client.ontologyProvider.getObjectDefinition(definition.apiName);
24
+ return objectTypeDef;
25
+ } else if (definition.type === "interface") {
26
+ return client.ontologyProvider.getInterfaceDefinition(definition.apiName);
27
+ } else if (definition.type === "action") {
28
+ return client.ontologyProvider.getActionDefinition(definition.apiName);
29
+ } else if (definition.type === "query") {
30
+ return client.ontologyProvider.getQueryDefinition(definition.apiName);
31
+ } else {
32
+ throw new Error("Not implemented for given definition");
33
+ }
34
+ };
35
+ //# sourceMappingURL=fetchMetadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchMetadata.js","names":["InterfaceDefinitions","fetchMetadataInternal","client","definition","type","interfaceDefs","objectTypeDef","ontologyProvider","getObjectDefinition","apiName","getInterfaceDefinition","getActionDefinition","getQueryDefinition","Error"],"sources":["fetchMetadata.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 */\nimport { InterfaceDefinitions } from \"./ontology/OntologyProvider.js\";\n/** @internal */\nexport const fetchMetadataInternal = async (client, definition) => {\n if (definition.type === \"object\") {\n const { [InterfaceDefinitions]: interfaceDefs, ...objectTypeDef } = await client.ontologyProvider\n .getObjectDefinition(definition.apiName);\n return objectTypeDef;\n }\n else if (definition.type === \"interface\") {\n return client.ontologyProvider.getInterfaceDefinition(definition.apiName);\n }\n else if (definition.type === \"action\") {\n return client.ontologyProvider.getActionDefinition(definition.apiName);\n }\n else if (definition.type === \"query\") {\n return client.ontologyProvider.getQueryDefinition(definition.apiName);\n }\n else {\n throw new Error(\"Not implemented for given definition\");\n }\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,QAAQ,gCAAgC;AACrE;AACA,OAAO,MAAMC,qBAAqB,GAAG,MAAAA,CAAOC,MAAM,EAAEC,UAAU,KAAK;EAC/D,IAAIA,UAAU,CAACC,IAAI,KAAK,QAAQ,EAAE;IAC9B,MAAM;MAAE,CAACJ,oBAAoB,GAAGK,aAAa;MAAE,GAAGC;IAAc,CAAC,GAAG,MAAMJ,MAAM,CAACK,gBAAgB,CAC5FC,mBAAmB,CAACL,UAAU,CAACM,OAAO,CAAC;IAC5C,OAAOH,aAAa;EACxB,CAAC,MACI,IAAIH,UAAU,CAACC,IAAI,KAAK,WAAW,EAAE;IACtC,OAAOF,MAAM,CAACK,gBAAgB,CAACG,sBAAsB,CAACP,UAAU,CAACM,OAAO,CAAC;EAC7E,CAAC,MACI,IAAIN,UAAU,CAACC,IAAI,KAAK,QAAQ,EAAE;IACnC,OAAOF,MAAM,CAACK,gBAAgB,CAACI,mBAAmB,CAACR,UAAU,CAACM,OAAO,CAAC;EAC1E,CAAC,MACI,IAAIN,UAAU,CAACC,IAAI,KAAK,OAAO,EAAE;IAClC,OAAOF,MAAM,CAACK,gBAAgB,CAACK,kBAAkB,CAACT,UAAU,CAACM,OAAO,CAAC;EACzE,CAAC,MACI;IACD,MAAM,IAAII,KAAK,CAAC,sCAAsC,CAAC;EAC3D;AACJ,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=fetchMetadata.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchMetadata.test.d.ts","sourceRoot":"","sources":["../../src/fetchMetadata.test.ts"],"names":[],"mappings":""}