@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
@@ -0,0 +1,67 @@
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
+ export function createSimpleCache(map = new Map(), fn) {
17
+ function set(key, value) {
18
+ map.set(key, value);
19
+ return value;
20
+ }
21
+ return {
22
+ get: function (key) {
23
+ let r = map.get(key);
24
+ if (r === undefined && fn !== undefined) {
25
+ return set(key, fn(key));
26
+ } else {
27
+ return r;
28
+ }
29
+ },
30
+ set,
31
+ remove: function (key) {
32
+ return map.delete(key);
33
+ }
34
+ };
35
+ }
36
+ /**
37
+ * Create a new cache with an async factory function.
38
+ * @param fn A factory function that will be used to create the value if it does not exist in the cache.
39
+ * @returns
40
+ */
41
+ export function createSimpleAsyncCache(type, fn, createCacheLocal = createSimpleCache) {
42
+ const cache = createCacheLocal(type === "weak" ? new WeakMap() : new Map());
43
+ const inProgress = createCacheLocal(type === "weak" ? new WeakMap() : new Map());
44
+ const ret = {
45
+ getOrUndefined: function (key) {
46
+ return cache.get(key);
47
+ },
48
+ get: async function (key) {
49
+ return cache.get(key) ?? inProgress.get(key) ?? ret.set(key, fn(key));
50
+ },
51
+ set: async function (k, v) {
52
+ // the `.set` happens first to prevent races.
53
+ try {
54
+ const r = await inProgress.set(k, v); // returns v
55
+ cache.set(k, r);
56
+ inProgress.remove(k);
57
+ return r;
58
+ } catch (e) {
59
+ // we don't want to cache failures
60
+ inProgress.remove(k);
61
+ throw e;
62
+ }
63
+ }
64
+ };
65
+ return ret;
66
+ }
67
+ //# sourceMappingURL=SimpleCache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleCache.js","names":["createSimpleCache","map","Map","fn","set","key","value","get","r","undefined","remove","delete","createSimpleAsyncCache","type","createCacheLocal","cache","WeakMap","inProgress","ret","getOrUndefined","k","v","e"],"sources":["SimpleCache.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 */\nexport function createSimpleCache(map = new Map(), fn) {\n function get(key) {\n let r = map.get(key);\n if (r === undefined && fn !== undefined) {\n return set(key, fn(key));\n }\n else {\n return r;\n }\n }\n function set(key, value) {\n map.set(key, value);\n return value;\n }\n function remove(key) {\n return map.delete(key);\n }\n return { get, set, remove };\n}\n/**\n * Create a new cache with an async factory function.\n * @param fn A factory function that will be used to create the value if it does not exist in the cache.\n * @returns\n */\nexport function createSimpleAsyncCache(type, fn, createCacheLocal = createSimpleCache) {\n const cache = createCacheLocal((type === \"weak\" ? new WeakMap() : new Map()));\n const inProgress = createCacheLocal((type === \"weak\" ? new WeakMap() : new Map()));\n const ret = {\n getOrUndefined: function getOrUndefined(key) {\n return cache.get(key);\n },\n get: async function get(key) {\n return cache.get(key) ?? inProgress.get(key)\n ?? ret.set(key, fn(key));\n },\n set: async function set(k, v) {\n // the `.set` happens first to prevent races.\n try {\n const r = await inProgress.set(k, v); // returns v\n cache.set(k, r);\n inProgress.remove(k);\n return r;\n }\n catch (e) {\n // we don't want to cache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AAG,EAAE;MACzC,OAAOU,KAAK,CAACR,GAAG,CAACF,GAAG,CAAC;IACzB,CAAC;IACDE,GAAG,EAAE,eAAAA,CAAmBF,GAAG,EAAE;MACzB,OAAOU,KAAK,CAACR,GAAG,CAACF,GAAG,CAAC,IAAIY,UAAU,CAACV,GAAG,CAACF,GAAG,CAAC,IACrCa,GAAG,CAACd,GAAG,CAACC,GAAG,EAAEF,EAAE,CAACE,GAAG,CAAC,CAAC;IAChC,CAAC;IACDD,GAAG,EAAE,eAAAA,CAAmBgB,CAAC,EAAEC,CAAC,EAAE;MAC1B;MACA,IAAI;QACA,MAAMb,CAAC,GAAG,MAAMS,UAAU,CAACb,GAAG,CAACgB,CAAC,EAAEC,CAAC,CAAC,CAAC,CAAC;QACtCN,KAAK,CAACX,GAAG,CAACgB,CAAC,EAAEZ,CAAC,CAAC;QACfS,UAAU,CAACP,MAAM,CAACU,CAAC,CAAC;QACpB,OAAOZ,CAAC;MACZ,CAAC,CACD,OAAOc,CAAC,EAAE;QACN;QACAL,UAAU,CAACP,MAAM,CAACU,CAAC,CAAC;QACpB,MAAME,CAAC;MACX;IACJ;EACJ,CAAC;EACD,OAAOJ,GAAG;AACd","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=aggregate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregate.d.ts","sourceRoot":"","sources":["../../../src/object/aggregate.ts"],"names":[],"mappings":""}
@@ -0,0 +1,69 @@
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 * as OntologiesV2 from "@osdk/internal.foundry.ontologiesv2";
17
+ import invariant from "tiny-invariant";
18
+ import { legacyToModernSingleAggregationResult } from "../internal/conversions/legacyToModernSingleAggregationResult.js";
19
+ import { modernToLegacyAggregationClause } from "../internal/conversions/modernToLegacyAggregationClause.js";
20
+ import { modernToLegacyGroupByClause } from "../internal/conversions/modernToLegacyGroupByClause.js";
21
+ import { modernToLegacyWhereClause } from "../internal/conversions/modernToLegacyWhereClause.js";
22
+ import { addUserAgentAndRequestContextHeaders } from "../util/addUserAgentAndRequestContextHeaders.js";
23
+ /** @internal */
24
+ export async function aggregate(clientCtx, objectType, objectSet = {
25
+ type: "base",
26
+ objectType: objectType["apiName"]
27
+ }, req) {
28
+ const body = {
29
+ aggregation: modernToLegacyAggregationClause(req.$select),
30
+ groupBy: [],
31
+ where: undefined
32
+ };
33
+ if (req.$groupBy) {
34
+ body.groupBy = modernToLegacyGroupByClause(req.$groupBy);
35
+ }
36
+ if (req.$where) {
37
+ body.where = modernToLegacyWhereClause(req.$where);
38
+ }
39
+ const result = await OntologiesV2.OntologyObjectSets.aggregateObjectSetV2(addUserAgentAndRequestContextHeaders(clientCtx, objectType), await clientCtx.ontologyRid, {
40
+ objectSet,
41
+ groupBy: body.groupBy,
42
+ aggregation: body.aggregation
43
+ });
44
+ if (!req.$groupBy) {
45
+ !(result.data.length === 1) ? invariant(false, "no group by clause should mean only one data result") : void 0;
46
+ return {
47
+ ...aggregationToCountResult(result.data[0]),
48
+ ...legacyToModernSingleAggregationResult(result.data[0])
49
+ };
50
+ }
51
+ const ret = result.data.map(entry => {
52
+ return {
53
+ $group: entry.group,
54
+ ...aggregationToCountResult(entry),
55
+ ...legacyToModernSingleAggregationResult(entry)
56
+ };
57
+ }); // fixme
58
+ return ret; // FIXME
59
+ }
60
+ function aggregationToCountResult(entry) {
61
+ for (const aggregateResult of entry.metrics) {
62
+ if (aggregateResult.name === "count") {
63
+ return {
64
+ $count: aggregateResult.value
65
+ };
66
+ }
67
+ }
68
+ }
69
+ //# sourceMappingURL=aggregate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregate.js","names":["OntologiesV2","invariant","legacyToModernSingleAggregationResult","modernToLegacyAggregationClause","modernToLegacyGroupByClause","modernToLegacyWhereClause","addUserAgentAndRequestContextHeaders","aggregate","clientCtx","objectType","objectSet","type","req","body","aggregation","$select","groupBy","where","undefined","$groupBy","$where","result","OntologyObjectSets","aggregateObjectSetV2","ontologyRid","data","length","aggregationToCountResult","ret","map","entry","$group","group","aggregateResult","metrics","name","$count","value"],"sources":["aggregate.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 * as OntologiesV2 from \"@osdk/internal.foundry.ontologiesv2\";\nimport invariant from \"tiny-invariant\";\nimport { legacyToModernSingleAggregationResult } from \"../internal/conversions/legacyToModernSingleAggregationResult.js\";\nimport { modernToLegacyAggregationClause } from \"../internal/conversions/modernToLegacyAggregationClause.js\";\nimport { modernToLegacyGroupByClause } from \"../internal/conversions/modernToLegacyGroupByClause.js\";\nimport { modernToLegacyWhereClause } from \"../internal/conversions/modernToLegacyWhereClause.js\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\n/** @internal */\nexport async function aggregate(clientCtx, objectType, objectSet = {\n type: \"base\",\n objectType: objectType[\"apiName\"],\n}, req) {\n const body = {\n aggregation: modernToLegacyAggregationClause(req.$select),\n groupBy: [],\n where: undefined,\n };\n if (req.$groupBy) {\n body.groupBy = modernToLegacyGroupByClause(req.$groupBy);\n }\n if (req.$where) {\n body.where = modernToLegacyWhereClause(req.$where);\n }\n const result = await OntologiesV2.OntologyObjectSets.aggregateObjectSetV2(addUserAgentAndRequestContextHeaders(clientCtx, objectType), await clientCtx.ontologyRid, {\n objectSet,\n groupBy: body.groupBy,\n aggregation: body.aggregation,\n });\n if (!req.$groupBy) {\n invariant(result.data.length === 1, \"no group by clause should mean only one data result\");\n return {\n ...aggregationToCountResult(result.data[0]),\n ...legacyToModernSingleAggregationResult(result.data[0]),\n };\n }\n const ret = result.data\n .map((entry) => {\n return {\n $group: entry.group,\n ...aggregationToCountResult(entry),\n ...legacyToModernSingleAggregationResult(entry),\n };\n }); // fixme\n return ret; // FIXME\n}\nfunction aggregationToCountResult(entry) {\n for (const aggregateResult of entry.metrics) {\n if (aggregateResult.name === \"count\") {\n return { $count: aggregateResult.value };\n }\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,YAAY,MAAM,qCAAqC;AACnE,OAAOC,SAAS,MAAM,gBAAgB;AACtC,SAASC,qCAAqC,QAAQ,kEAAkE;AACxH,SAASC,+BAA+B,QAAQ,4DAA4D;AAC5G,SAASC,2BAA2B,QAAQ,wDAAwD;AACpG,SAASC,yBAAyB,QAAQ,sDAAsD;AAChG,SAASC,oCAAoC,QAAQ,iDAAiD;AACtG;AACA,OAAO,eAAeC,SAASA,CAACC,SAAS,EAAEC,UAAU,EAAEC,SAAS,GAAG;EAC/DC,IAAI,EAAE,MAAM;EACZF,UAAU,EAAEA,UAAU,CAAC,SAAS;AACpC,CAAC,EAAEG,GAAG,EAAE;EACJ,MAAMC,IAAI,GAAG;IACTC,WAAW,EAAEX,+BAA+B,CAACS,GAAG,CAACG,OAAO,CAAC;IACzDC,OAAO,EAAE,EAAE;IACXC,KAAK,EAAEC;EACX,CAAC;EACD,I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AAe,CAACI;MAAM,CAAC;IAC5C;EACJ;AACJ","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=aggregate.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregate.test.d.ts","sourceRoot":"","sources":["../../../src/object/aggregate.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,398 @@
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 { objectTypeWithAllPropertyTypes, Todo } from "@osdk/client.test.ontology";
17
+ import { expectType } from "ts-expect";
18
+ import { beforeAll, describe, expect, expectTypeOf, it, vi } from "vitest";
19
+ import { createMinimalClient } from "../createMinimalClient.js";
20
+ import { aggregate } from "./aggregate.js";
21
+ const metadata = {
22
+ expectsClientVersion: "0.0.0",
23
+ ontologyRid: "ri.a.b.c.d",
24
+ ontologyApiName: "apiName",
25
+ userAgent: ""
26
+ };
27
+ let mockFetch;
28
+ let clientCtx;
29
+ beforeAll(() => {
30
+ mockFetch = vi.fn();
31
+ mockFetch.mockResolvedValue({
32
+ ok: true,
33
+ status: 200,
34
+ json: () => new Promise(resolve => resolve(aggregationResponse))
35
+ });
36
+ clientCtx = createMinimalClient(metadata, "https://host.com", async () => "", {}, mockFetch);
37
+ });
38
+ const aggregationResponse = {
39
+ accuracy: "APPROXIMATE",
40
+ data: [{
41
+ group: {
42
+ string: "hello"
43
+ },
44
+ metrics: [{
45
+ name: "string.approximateDistinct",
46
+ value: 1
47
+ }, {
48
+ name: "string.exactDistinct",
49
+ value: 1
50
+ }, {
51
+ name: "id.max",
52
+ value: 1
53
+ }, {
54
+ name: "id.avg",
55
+ value: 1
56
+ }]
57
+ }]
58
+ };
59
+ describe("aggregate", () => {
60
+ it("works", async () => {
61
+ expectTypeOf().toEqualTypeOf;
62
+ const notGrouped = await aggregate(clientCtx, objectTypeWithAllPropertyTypes, {
63
+ type: "base",
64
+ objectType: "ToDo"
65
+ }, {
66
+ $select: {
67
+ "string:approximateDistinct": "unordered",
68
+ "string:exactDistinct": "unordered",
69
+ "id:max": "unordered",
70
+ "id:avg": "unordered",
71
+ "$count": "unordered"
72
+ }
73
+ });
74
+ expect(mockFetch).toHaveBeenCalledWith("https://host.com/api/v2/ontologies/ri.a.b.c.d/objectSets/aggregate", {
75
+ body: JSON.stringify({
76
+ "objectSet": {
77
+ "type": "base",
78
+ "objectType": "ToDo"
79
+ },
80
+ "groupBy": [],
81
+ "aggregation": [{
82
+ "type": "approximateDistinct",
83
+ "name": "string.approximateDistinct",
84
+ "field": "string"
85
+ }, {
86
+ "type": "exactDistinct",
87
+ "name": "string.exactDistinct",
88
+ "field": "string"
89
+ }, {
90
+ "type": "max",
91
+ "name": "id.max",
92
+ "field": "id"
93
+ }, {
94
+ "type": "avg",
95
+ "name": "id.avg",
96
+ "field": "id"
97
+ }, {
98
+ "type": "count",
99
+ "name": "count"
100
+ }]
101
+ }),
102
+ method: "POST",
103
+ headers: expect.anything()
104
+ });
105
+ expectType(notGrouped.string.approximateDistinct);
106
+ expectType(notGrouped.string.exactDistinct);
107
+ expectType(notGrouped.id.max);
108
+ expectType(notGrouped.id.avg);
109
+ expectType(notGrouped.$count);
110
+ expectType(false); // subSelect should hide unused keys
111
+ const grouped = await aggregate(clientCtx, objectTypeWithAllPropertyTypes, {
112
+ type: "base",
113
+ objectType: "ToDo"
114
+ }, {
115
+ $select: {
116
+ "id:approximateDistinct": "unordered",
117
+ "id:exactDistinct": "unordered",
118
+ "id:max": "unordered",
119
+ "$count": "unordered"
120
+ },
121
+ $groupBy: {
122
+ string: "exact",
123
+ id: {
124
+ $exactWithLimit: 10
125
+ },
126
+ integer: {
127
+ $ranges: [[1, 2]]
128
+ },
129
+ short: {
130
+ $ranges: [[2, 3], [4, 5]]
131
+ },
132
+ float: {
133
+ $fixedWidth: 10
134
+ },
135
+ dateTime: {
136
+ $duration: [10, "seconds"]
137
+ },
138
+ date: {
139
+ $ranges: [["2024-01-02", "2024-01-09"]]
140
+ },
141
+ boolean: "exact"
142
+ }
143
+ });
144
+ expectType(grouped);
145
+ expectType(grouped[0].$group.string);
146
+ expectType(grouped[0].id.approximateDistinct);
147
+ expectType(grouped[0].id.exactDistinct);
148
+ expectType(grouped[0].$group.id);
149
+ expectType(grouped[0].$count);
150
+ expectType(grouped[0].$group.integer);
151
+ expectType(grouped[0].$group.short);
152
+ expectType(grouped[0].$group.float);
153
+ expectType(grouped[0].$group.dateTime);
154
+ expectType(grouped[0].$group.date);
155
+ expectType(grouped[0].$group.boolean);
156
+ expectType({
157
+ $select: {
158
+ "id:approximateDistinct": "unordered",
159
+ "$count": "unordered"
160
+ },
161
+ $groupBy: {
162
+ string: "exact",
163
+ id: {
164
+ $exactWithLimit: 10
165
+ },
166
+ integer: {
167
+ $ranges: [[1, 2]]
168
+ },
169
+ short: {
170
+ $ranges: [[2, 3], [4, 5]]
171
+ },
172
+ float: {
173
+ $fixedWidth: 10
174
+ }
175
+ }
176
+ });
177
+ expectType({
178
+ $select: {
179
+ id: "approximateDistinct",
180
+ // @ts-expect-error
181
+ wrongSelectKey: "don't work",
182
+ "$count": "unordered"
183
+ },
184
+ $groupBy: {
185
+ // @ts-expect-error
186
+ wrongKey: "don't work",
187
+ string: "exact",
188
+ id: {
189
+ $exactWithLimit: 10
190
+ },
191
+ integer: {
192
+ $ranges: [[1, 2]]
193
+ },
194
+ short: {
195
+ $ranges: [[2, 3], [4, 5]]
196
+ },
197
+ float: {
198
+ $fixedWidth: 10
199
+ }
200
+ }
201
+ });
202
+ expectTypeOf().toBeCallableWith(clientCtx, objectTypeWithAllPropertyTypes, {
203
+ type: "base",
204
+ objectType: "ToDo"
205
+ }, {
206
+ $select: {
207
+ "id:approximateDistinct": "unordered",
208
+ // @ts-expect-error
209
+ "wrongSelectKey": "don't work",
210
+ "$count": "unordered"
211
+ },
212
+ $groupBy: {
213
+ string: "exact",
214
+ // @ts-expect-error
215
+ wrongKey: "wrongKey",
216
+ id: {
217
+ $exactWithLimit: 10
218
+ },
219
+ integer: {
220
+ $ranges: [[1, 2]]
221
+ },
222
+ short: {
223
+ $ranges: [[2, 3], [4, 5]]
224
+ },
225
+ float: {
226
+ $fixedWidth: 10
227
+ }
228
+ }
229
+ });
230
+ expectType({
231
+ dateTime: {
232
+ $duration: [10, "seconds"]
233
+ },
234
+ date: {
235
+ $duration: [1, "years"]
236
+ }
237
+ });
238
+ // Can't use value greater than 1 for years
239
+ expectType({
240
+ // @ts-expect-error
241
+ date: {
242
+ $duration: [10, "years"]
243
+ }
244
+ });
245
+ // Can't use arbitrary string for time unit
246
+ expectType({
247
+ // @ts-expect-error
248
+ dateTime: {
249
+ $duration: [1, "nonexistentTimeUnit"]
250
+ }
251
+ });
252
+ // Can't use time unit smaller than days for date type
253
+ expectType({
254
+ // @ts-expect-error
255
+ date: {
256
+ $duration: [1, "seconds"]
257
+ }
258
+ });
259
+ });
260
+ it("works with $orderBy (no groups)", async () => {
261
+ const notGrouped = await aggregate(clientCtx, objectTypeWithAllPropertyTypes, {
262
+ type: "base",
263
+ objectType: "ToDo"
264
+ }, {
265
+ $select: {
266
+ "string:approximateDistinct": "asc",
267
+ "id:exactDistinct": "asc",
268
+ "id:avg": "desc",
269
+ "id:max": "asc",
270
+ "$count": "unordered"
271
+ }
272
+ });
273
+ expect(mockFetch).toHaveBeenCalledWith("https://host.com/api/v2/ontologies/ri.a.b.c.d/objectSets/aggregate", {
274
+ body: JSON.stringify({
275
+ "objectSet": {
276
+ "type": "base",
277
+ "objectType": "ToDo"
278
+ },
279
+ "groupBy": [],
280
+ "aggregation": [{
281
+ "type": "approximateDistinct",
282
+ "name": "string.approximateDistinct",
283
+ direction: "ASC",
284
+ "field": "string"
285
+ }, {
286
+ "type": "exactDistinct",
287
+ "name": "id.exactDistinct",
288
+ direction: "ASC",
289
+ "field": "id"
290
+ }, {
291
+ "type": "avg",
292
+ "name": "id.avg",
293
+ direction: "DESC",
294
+ "field": "id"
295
+ }, {
296
+ "type": "max",
297
+ "name": "id.max",
298
+ direction: "ASC",
299
+ "field": "id"
300
+ }, {
301
+ "type": "count",
302
+ "name": "count"
303
+ }]
304
+ }),
305
+ method: "POST",
306
+ headers: expect.anything()
307
+ });
308
+ expectType(notGrouped.string.approximateDistinct);
309
+ expectType(notGrouped.id.exactDistinct);
310
+ expectType(notGrouped.id.max);
311
+ expectType(notGrouped.id.avg);
312
+ expectType(notGrouped.$count);
313
+ expectType(false); // subselect should hide unused keys
314
+ });
315
+ it("works with $orderBy (1 group)", async () => {
316
+ const grouped = await aggregate(clientCtx, objectTypeWithAllPropertyTypes, {
317
+ type: "base",
318
+ objectType: "ToDo"
319
+ }, {
320
+ $select: {
321
+ "id:max": "desc",
322
+ "string:approximateDistinct": "asc",
323
+ "id:avg": "unordered",
324
+ "$count": "unordered",
325
+ "string:exactDistinct": "desc"
326
+ },
327
+ $groupBy: {
328
+ id: "exact"
329
+ }
330
+ });
331
+ expect(mockFetch).toHaveBeenCalledWith("https://host.com/api/v2/ontologies/ri.a.b.c.d/objectSets/aggregate", {
332
+ body: JSON.stringify({
333
+ "objectSet": {
334
+ "type": "base",
335
+ "objectType": "ToDo"
336
+ },
337
+ "groupBy": [{
338
+ "type": "exact",
339
+ "field": "id"
340
+ }],
341
+ "aggregation": [{
342
+ "type": "max",
343
+ "name": "id.max",
344
+ direction: "DESC",
345
+ "field": "id"
346
+ }, {
347
+ "type": "approximateDistinct",
348
+ "name": "string.approximateDistinct",
349
+ direction: "ASC",
350
+ "field": "string"
351
+ }, {
352
+ "type": "avg",
353
+ "name": "id.avg",
354
+ "field": "id"
355
+ }, {
356
+ "type": "count",
357
+ "name": "count"
358
+ }, {
359
+ "type": "exactDistinct",
360
+ "name": "string.exactDistinct",
361
+ direction: "DESC",
362
+ "field": "string"
363
+ }]
364
+ }),
365
+ method: "POST",
366
+ headers: expect.anything()
367
+ });
368
+ expectType(grouped[0].string.approximateDistinct);
369
+ expectType(grouped[0].id.max);
370
+ expectType(grouped[0].id.avg);
371
+ expectType(grouped[0].$count);
372
+ expectType(grouped[0].string.exactDistinct);
373
+ expectType(false); // subselect should hide unused keys
374
+ });
375
+ it("prohibits ordered select with multiple groupBy", async () => {
376
+ aggregate(clientCtx, Todo, {
377
+ type: "base",
378
+ objectType: "ToDo"
379
+ }, {
380
+ $select: {
381
+ // @ts-expect-error
382
+ "id:max": "desc",
383
+ // @ts-expect-error
384
+ "text:approximateDistinct": "asc",
385
+ // @ts-expect-error
386
+ "text:exactDistinct": "desc",
387
+ "id:avg": "unordered",
388
+ "$count": "unordered"
389
+ },
390
+ $groupBy: {
391
+ id: "exact",
392
+ timestamp: "exact"
393
+ }
394
+ });
395
+ });
396
+ it("works with where: todo", async () => {});
397
+ });
398
+ //# sourceMappingURL=aggregate.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregate.test.js","names":["objectTypeWithAllPropertyTypes","Todo","expectType","beforeAll","describe","expect","expectTypeOf","it","vi","createMinimalClient","aggregate","metadata","expectsClientVersion","ontologyRid","ontologyApiName","userAgent","mockFetch","clientCtx","fn","mockResolvedValue","ok","status","json","Promise","resolve","aggregationResponse","accuracy","data","group","string","metrics","name","value","toEqualTypeOf","notGrouped","type","objectType","$select","toHaveBeenCalledWith","body","JSON","stringify","method","headers","anything","approximateDistinct","exactDistinct","id","max","avg","$count","grouped","$groupBy","$exactWithLimit","integer","$ranges","short","float","$fixedWidth","dateTime","$duration","date","boolean","$group","wrongSelectKey","wrongKey","toBeCallableWith","direction","timestamp"],"sources":["aggregate.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 { objectTypeWithAllPropertyTypes, Todo, } from \"@osdk/client.test.ontology\";\nimport { expectType } from \"ts-expect\";\nimport { beforeAll, describe, expect, expectTypeOf, it, vi, } from \"vitest\";\nimport { createMinimalClient } from \"../createMinimalClient.js\";\nimport { aggregate } from \"./aggregate.js\";\nconst metadata = {\n expectsClientVersion: \"0.0.0\",\n ontologyRid: \"ri.a.b.c.d\",\n ontologyApiName: \"apiName\",\n userAgent: \"\",\n};\nlet mockFetch;\nlet clientCtx;\nbeforeAll(() => {\n mockFetch = vi.fn();\n mockFetch.mockResolvedValue({\n ok: true,\n status: 200,\n json: () => new Promise((resolve) => resolve(aggregationResponse)),\n });\n clientCtx = createMinimalClient(metadata, \"https://host.com\", async () => \"\", {}, mockFetch);\n});\nconst aggregationResponse = {\n accuracy: \"APPROXIMATE\",\n data: [\n {\n group: {\n string: \"hello\",\n },\n metrics: [\n {\n name: \"string.approximateDistinct\",\n value: 1,\n },\n {\n name: \"string.exactDistinct\",\n value: 1,\n },\n {\n name: \"id.max\",\n value: 1,\n },\n {\n name: \"id.avg\",\n value: 1,\n },\n ],\n },\n ],\n};\ndescribe(\"aggregate\", () => {\n it(\"works\", async () => {\n expectTypeOf().toEqualTypeOf;\n const notGrouped = await aggregate(clientCtx, objectTypeWithAllPropertyTypes, {\n type: \"base\",\n objectType: \"ToDo\",\n }, {\n $select: {\n \"string:approximateDistinct\": \"unordered\",\n \"string:exactDistinct\": \"unordered\",\n \"id:max\": \"unordered\",\n \"id:avg\": \"unordered\",\n \"$count\": \"unordered\",\n },\n });\n expect(mockFetch).toHaveBeenCalledWith(\"https://host.com/api/v2/ontologies/ri.a.b.c.d/objectSets/aggregate\", {\n body: JSON.stringify({\n \"objectSet\": { \"type\": \"base\", \"objectType\": \"ToDo\" },\n \"groupBy\": [],\n \"aggregation\": [\n {\n \"type\": \"approximateDistinct\",\n \"name\": \"string.approximateDistinct\",\n \"field\": \"string\",\n },\n {\n \"type\": \"exactDistinct\",\n \"name\": \"string.exactDistinct\",\n \"field\": \"string\",\n },\n { \"type\": \"max\", \"name\": \"id.max\", \"field\": \"id\" },\n { \"type\": \"avg\", \"name\": \"id.avg\", \"field\": \"id\" },\n { \"type\": \"count\", \"name\": \"count\" },\n ],\n }),\n method: \"POST\",\n headers: expect.anything(),\n });\n expectType(notGrouped.string.approximateDistinct);\n expectType(notGrouped.string.exactDistinct);\n expectType(notGrouped.id.max);\n expectType(notGrouped.id.avg);\n expectType(notGrouped.$count);\n expectType(false); // subSelect should hide unused keys\n const grouped = await aggregate(clientCtx, objectTypeWithAllPropertyTypes, {\n type: \"base\",\n objectType: \"ToDo\",\n }, {\n $select: {\n \"id:approximateDistinct\": \"unordered\",\n \"id:exactDistinct\": \"unordered\",\n \"id:max\": \"unordered\",\n \"$count\": \"unordered\",\n },\n $groupBy: {\n string: \"exact\",\n id: { $exactWithLimit: 10 },\n integer: { $ranges: [[1, 2]] },\n short: {\n $ranges: [[2, 3], [4, 5]],\n },\n float: { $fixedWidth: 10 },\n dateTime: { $duration: [10, \"seconds\"] },\n date: { $ranges: [[\"2024-01-02\", \"2024-01-09\"]] },\n boolean: \"exact\",\n },\n });\n expectType(grouped);\n expectType(grouped[0].$group.string);\n expectType(grouped[0].id.approximateDistinct);\n expectType(grouped[0].id.exactDistinct);\n expectType(grouped[0].$group.id);\n expectType(grouped[0].$count);\n expectType(grouped[0].$group.integer);\n expectType(grouped[0].$group.short);\n expectType(grouped[0].$group.float);\n expectType(grouped[0].$group.dateTime);\n expectType(grouped[0].$group.date);\n expectType(grouped[0].$group.boolean);\n expectType({\n $select: {\n \"id:approximateDistinct\": \"unordered\",\n \"$count\": \"unordered\",\n },\n $groupBy: {\n string: \"exact\",\n id: { $exactWithLimit: 10 },\n integer: { $ranges: [[1, 2]] },\n short: {\n $ranges: [[2, 3], [4, 5]],\n },\n float: { $fixedWidth: 10 },\n },\n });\n expectType({\n $select: {\n id: \"approximateDistinct\",\n // @ts-expect-error\n wrongSelectKey: \"don't work\",\n \"$count\": \"unordered\",\n },\n $groupBy: {\n // @ts-expect-error\n wrongKey: \"don't work\",\n string: \"exact\",\n id: { $exactWithLimit: 10 },\n integer: { $ranges: [[1, 2]] },\n short: {\n $ranges: [[2, 3], [4, 5]],\n },\n float: { $fixedWidth: 10 },\n },\n });\n expectTypeOf().toBeCallableWith(clientCtx, objectTypeWithAllPropertyTypes, {\n type: \"base\",\n objectType: \"ToDo\",\n }, {\n $select: {\n \"id:approximateDistinct\": \"unordered\",\n // @ts-expect-error\n \"wrongSelectKey\": \"don't work\",\n \"$count\": \"unordered\",\n },\n $groupBy: {\n string: \"exact\",\n // @ts-expect-error\n wrongKey: \"wrongKey\",\n id: { $exactWithLimit: 10 },\n integer: { $ranges: [[1, 2]] },\n short: {\n $ranges: [[2, 3], [4, 5]],\n },\n float: { $fixedWidth: 10 },\n },\n });\n expectType({\n dateTime: { $duration: [10, \"seconds\"] },\n date: { $duration: [1, \"years\"] },\n });\n // Can't use value greater than 1 for years\n expectType({\n // @ts-expect-error\n date: { $duration: [10, \"years\"] },\n });\n // Can't use arbitrary string for time unit\n expectType({\n // @ts-expect-error\n dateTime: { $duration: [1, \"nonexistentTimeUnit\"] },\n });\n // Can't use time unit smaller than days for date type\n expectType({\n // @ts-expect-error\n date: { $duration: [1, \"seconds\"] },\n });\n });\n it(\"works with $orderBy (no groups)\", async () => {\n const notGrouped = await aggregate(clientCtx, objectTypeWithAllPropertyTypes, {\n type: \"base\",\n objectType: \"ToDo\",\n }, {\n $select: {\n \"string:approximateDistinct\": \"asc\",\n \"id:exactDistinct\": \"asc\",\n \"id:avg\": \"desc\",\n \"id:max\": \"asc\",\n \"$count\": \"unordered\",\n },\n });\n expect(mockFetch).toHaveBeenCalledWith(\"https://host.com/api/v2/ontologies/ri.a.b.c.d/objectSets/aggregate\", {\n body: JSON.stringify({\n \"objectSet\": { \"type\": \"base\", \"objectType\": \"ToDo\" },\n \"groupBy\": [],\n \"aggregation\": [\n {\n \"type\": \"approximateDistinct\",\n \"name\": \"string.approximateDistinct\",\n direction: \"ASC\",\n \"field\": \"string\",\n },\n {\n \"type\": \"exactDistinct\",\n \"name\": \"id.exactDistinct\",\n direction: \"ASC\",\n \"field\": \"id\",\n },\n {\n \"type\": \"avg\",\n \"name\": \"id.avg\",\n direction: \"DESC\",\n \"field\": \"id\",\n },\n {\n \"type\": \"max\",\n \"name\": \"id.max\",\n direction: \"ASC\",\n \"field\": \"id\",\n },\n { \"type\": \"count\", \"name\": \"count\" },\n ],\n }),\n method: \"POST\",\n headers: expect.anything(),\n });\n expectType(notGrouped.string.approximateDistinct);\n expectType(notGrouped.id.exactDistinct);\n expectType(notGrouped.id.max);\n expectType(notGrouped.id.avg);\n expectType(notGrouped.$count);\n expectType(false); // subselect should hide unused keys\n });\n it(\"works with $orderBy (1 group)\", async () => {\n const grouped = await aggregate(clientCtx, objectTypeWithAllPropertyTypes, {\n type: \"base\",\n objectType: \"ToDo\",\n }, {\n $select: {\n \"id:max\": \"desc\",\n \"string:approximateDistinct\": \"asc\",\n \"id:avg\": \"unordered\",\n \"$count\": \"unordered\",\n \"string:exactDistinct\": \"desc\",\n },\n $groupBy: {\n id: \"exact\",\n },\n });\n expect(mockFetch).toHaveBeenCalledWith(\"https://host.com/api/v2/ontologies/ri.a.b.c.d/objectSets/aggregate\", {\n body: JSON.stringify({\n \"objectSet\": { \"type\": \"base\", \"objectType\": \"ToDo\" },\n \"groupBy\": [{ \"type\": \"exact\", \"field\": \"id\" }],\n \"aggregation\": [\n {\n \"type\": \"max\",\n \"name\": \"id.max\",\n direction: \"DESC\",\n \"field\": \"id\",\n },\n {\n \"type\": \"approximateDistinct\",\n \"name\": \"string.approximateDistinct\",\n direction: \"ASC\",\n \"field\": \"string\",\n },\n { \"type\": \"avg\", \"name\": \"id.avg\", \"field\": \"id\" },\n { \"type\": \"count\", \"name\": \"count\" },\n {\n \"type\": \"exactDistinct\",\n \"name\": \"string.exactDistinct\",\n direction: \"DESC\",\n \"field\": \"string\",\n },\n ],\n }),\n method: \"POST\",\n headers: expect.anything(),\n });\n expectType(grouped[0].string.approximateDistinct);\n expectType(grouped[0].id.max);\n expectType(grouped[0].id.avg);\n expectType(grouped[0].$count);\n expectType(grouped[0].string.exactDistinct);\n expectType(false); // subselect should hide unused keys\n });\n it(\"prohibits ordered select with multiple groupBy\", async () => {\n aggregate(clientCtx, Todo, {\n type: \"base\",\n objectType: \"ToDo\",\n }, {\n $select: {\n // @ts-expect-error\n \"id:max\": \"desc\",\n // @ts-expect-error\n \"text:approximateDistinct\": \"asc\",\n // @ts-expect-error\n \"text:exactDistinct\": \"desc\",\n \"id:avg\": \"unordered\",\n \"$count\": \"unordered\",\n },\n $groupBy: {\n id: \"exact\",\n timestamp: \"exact\",\n },\n });\n });\n it(\"works with where: todo\", async () => {\n const f = {\n $select: {\n \"office:approximateDistinct\": \"unordered\",\n },\n };\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,8BAA8B,EAAEC,IAAI,QAAS,4BAA4B;AAClF,SAASC,UAAU,QAAQ,WAAW;AACtC,SAASC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,YAAY,EAAEC,EAAE,EAAEC,EAAE,QAAS,QAAQ;AAC3E,SAASC,mBAAmB,QAAQ,2BAA2B;AAC/D,SAASC,SAAS,QAAQ,gBAAgB;AAC1C,MAAMC,QAAQ,GAAG;EACbC,oBAAoB,EAAE,OAAO;E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ACNL,EAAE,EAAE,OAAO;QACXqB,SAAS,EAAE;MACf;IACJ,CAAC,CAAC;EACN,CAAC,CAAC;EACF7D,EAAE,CAAC,wBAAwB,EAAE,YAAY,CAMzC,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=attachment.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment.test.d.ts","sourceRoot":"","sources":["../../../src/object/attachment.test.ts"],"names":[],"mappings":""}