@keboola/api-client 29.0.0 → 32.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 (396) hide show
  1. package/AGENTS.md +11 -5
  2. package/API-SURFACE.md +7 -2
  3. package/CHANGELOG.md +1890 -0
  4. package/README.md +45 -19
  5. package/dist/{ManagementClientAuthError-ZJ2-RoKT.cjs → ManagementClientAuthError-B-tyPlyG.cjs} +2 -2
  6. package/dist/{ManagementClientAuthError-ZJ2-RoKT.cjs.map → ManagementClientAuthError-B-tyPlyG.cjs.map} +1 -1
  7. package/dist/{ManagementClientAuthError-B97OtOQ7.js → ManagementClientAuthError-BAFNvOdf.js} +2 -2
  8. package/dist/{ManagementClientAuthError-B97OtOQ7.js.map → ManagementClientAuthError-BAFNvOdf.js.map} +1 -1
  9. package/dist/ai/index.cjs +2 -2
  10. package/dist/ai/index.d.cts +2 -2
  11. package/dist/ai/index.d.ts +2 -2
  12. package/dist/ai/index.js +2 -2
  13. package/dist/ai/types.d.cts +1 -1
  14. package/dist/ai/types.d.ts +1 -1
  15. package/dist/{appLogs-Dl5BcCSD.d.cts → appLogs-BAaaGYKg.d.cts} +2 -2
  16. package/dist/{appLogs-enL9XR9r.js → appLogs-DTLE6HTy.js} +2 -2
  17. package/dist/{appLogs-enL9XR9r.js.map → appLogs-DTLE6HTy.js.map} +1 -1
  18. package/dist/{appLogs-VdgP08aX.d.ts → appLogs-DX_WTBCa.d.ts} +2 -2
  19. package/dist/{appLogs-CNG3yby-.cjs → appLogs-NIEDTDHf.cjs} +2 -2
  20. package/dist/{appLogs-CNG3yby-.cjs.map → appLogs-NIEDTDHf.cjs.map} +1 -1
  21. package/dist/apps/index.cjs +3 -3
  22. package/dist/apps/index.d.cts +3 -3
  23. package/dist/apps/index.d.ts +3 -3
  24. package/dist/apps/index.js +3 -3
  25. package/dist/apps/types.d.cts +2 -2
  26. package/dist/apps/types.d.ts +2 -2
  27. package/dist/assets/index.cjs +1 -1
  28. package/dist/assets/index.d.cts +1 -1
  29. package/dist/assets/index.d.ts +1 -1
  30. package/dist/assets/index.js +1 -1
  31. package/dist/auth/index.cjs +2 -1
  32. package/dist/auth/index.d.cts +2 -2
  33. package/dist/auth/index.d.ts +2 -2
  34. package/dist/auth/index.js +2 -2
  35. package/dist/auth/types.d.cts +2 -2
  36. package/dist/auth/types.d.ts +2 -2
  37. package/dist/{auth-5HCvCsZO.cjs → auth-DP-6TFiM.cjs} +2 -2
  38. package/dist/{auth-5HCvCsZO.cjs.map → auth-DP-6TFiM.cjs.map} +1 -1
  39. package/dist/{auth-D2jfNlpX.js → auth-DtbQaeDj.js} +2 -2
  40. package/dist/{auth-D2jfNlpX.js.map → auth-DtbQaeDj.js.map} +1 -1
  41. package/dist/{authClient-DOk6VKdV.js → authClient--BtZgjIc.js} +76 -11
  42. package/dist/authClient--BtZgjIc.js.map +1 -0
  43. package/dist/{authClient-Dsd7W99W.d.ts → authClient-CtfyVHRD.d.ts} +52 -5
  44. package/dist/{authClient-Bgj2Ay7h.d.cts → authClient-DhfzOUaa.d.cts} +52 -5
  45. package/dist/{authClient-Z8Eg8rlN.cjs → authClient-b7uec7sw.cjs} +81 -10
  46. package/dist/authClient-b7uec7sw.cjs.map +1 -0
  47. package/dist/chat/index.cjs +3 -3
  48. package/dist/chat/index.d.cts +2 -7
  49. package/dist/chat/index.d.ts +2 -7
  50. package/dist/chat/index.js +3 -3
  51. package/dist/chat/types.d.cts +1 -1
  52. package/dist/chat/types.d.ts +1 -1
  53. package/dist/{configurations-CujCwDcB.cjs → configurations-Ck-mNB_E.cjs} +2 -2
  54. package/dist/{configurations-CujCwDcB.cjs.map → configurations-Ck-mNB_E.cjs.map} +1 -1
  55. package/dist/{configurations-DCOJONZZ.cjs → configurations-CqwAxiQL.cjs} +5 -1
  56. package/dist/configurations-CqwAxiQL.cjs.map +1 -0
  57. package/dist/{configurations-Byt59bIa.js → configurations-ZwBXilW-.js} +2 -2
  58. package/dist/{configurations-Byt59bIa.js.map → configurations-ZwBXilW-.js.map} +1 -1
  59. package/dist/{configurations-iCbhe0tb.js → configurations-d7SZmw69.js} +5 -1
  60. package/dist/configurations-d7SZmw69.js.map +1 -0
  61. package/dist/constants/index.cjs +4 -1
  62. package/dist/constants/index.d.cts +3 -2
  63. package/dist/constants/index.d.ts +3 -2
  64. package/dist/constants/index.js +2 -2
  65. package/dist/{constants-CqyyBkXW.cjs → constants-ByEwVtGf.js} +48 -25
  66. package/dist/constants-ByEwVtGf.js.map +1 -0
  67. package/dist/{constants-_HhqKvBg.js → constants-lIfSdTzS.cjs} +89 -2
  68. package/dist/constants-lIfSdTzS.cjs.map +1 -0
  69. package/dist/{createFetchClient-BsG719K1.cjs → createFetchClient-BRfTjBLV.cjs} +29 -10
  70. package/dist/createFetchClient-BRfTjBLV.cjs.map +1 -0
  71. package/dist/{createFetchClient-BK0TZK-U.js → createFetchClient-BbG46bL0.js} +24 -11
  72. package/dist/createFetchClient-BbG46bL0.js.map +1 -0
  73. package/dist/{createGenericFetchClient-CVZYekDk.js → createGenericFetchClient-BHYQLZhe.js} +2 -2
  74. package/dist/{createGenericFetchClient-CVZYekDk.js.map → createGenericFetchClient-BHYQLZhe.js.map} +1 -1
  75. package/dist/{createGenericFetchClient-DLbjX0eM.cjs → createGenericFetchClient-DHs-i7_O.cjs} +2 -2
  76. package/dist/{createGenericFetchClient-DLbjX0eM.cjs.map → createGenericFetchClient-DHs-i7_O.cjs.map} +1 -1
  77. package/dist/{createOpenapiFetchClient-B5U1fCHS.js → createOpenapiFetchClient-Bn6_Pn0H.js} +2 -2
  78. package/dist/{createOpenapiFetchClient-B5U1fCHS.js.map → createOpenapiFetchClient-Bn6_Pn0H.js.map} +1 -1
  79. package/dist/{createOpenapiFetchClient-Cr90VXY4.cjs → createOpenapiFetchClient-CyDUFxHB.cjs} +2 -2
  80. package/dist/{createOpenapiFetchClient-Cr90VXY4.cjs.map → createOpenapiFetchClient-CyDUFxHB.cjs.map} +1 -1
  81. package/dist/{credential-0c6yFwtp.cjs → credential-DOXH7XRS.cjs} +2 -2
  82. package/dist/{credential-0c6yFwtp.cjs.map → credential-DOXH7XRS.cjs.map} +1 -1
  83. package/dist/{credential-kEGLnVez.js → credential-d2RDcXRB.js} +2 -2
  84. package/dist/{credential-kEGLnVez.js.map → credential-d2RDcXRB.js.map} +1 -1
  85. package/dist/dataScience/index.cjs +2 -2
  86. package/dist/dataScience/index.d.cts +2 -2
  87. package/dist/dataScience/index.d.ts +2 -2
  88. package/dist/dataScience/index.js +2 -2
  89. package/dist/dataScience/types.d.cts +2 -2
  90. package/dist/dataScience/types.d.ts +2 -2
  91. package/dist/{dataScience-CE0pSWbl.js → dataScience-Sm8iONhP.js} +5 -5
  92. package/dist/{dataScience-CE0pSWbl.js.map → dataScience-Sm8iONhP.js.map} +1 -1
  93. package/dist/{dataScience-C-JrA0Uk.cjs → dataScience-wexHEIue.cjs} +5 -5
  94. package/dist/{dataScience-C-JrA0Uk.cjs.map → dataScience-wexHEIue.cjs.map} +1 -1
  95. package/dist/developerPortal/index.cjs +1 -1
  96. package/dist/developerPortal/index.d.cts +2 -2
  97. package/dist/developerPortal/index.d.ts +2 -2
  98. package/dist/developerPortal/index.js +1 -1
  99. package/dist/developerPortal/types.d.cts +1 -1
  100. package/dist/developerPortal/types.d.ts +1 -1
  101. package/dist/{developerPortalClient-C8oq48xW.cjs → developerPortalClient-CgTSzLoG.cjs} +3 -3
  102. package/dist/{developerPortalClient-C8oq48xW.cjs.map → developerPortalClient-CgTSzLoG.cjs.map} +1 -1
  103. package/dist/{developerPortalClient-BPPEAdJW.js → developerPortalClient-DywKpDlW.js} +3 -3
  104. package/dist/{developerPortalClient-BPPEAdJW.js.map → developerPortalClient-DywKpDlW.js.map} +1 -1
  105. package/dist/domain/permissions/index.cjs +63 -1
  106. package/dist/domain/permissions/index.cjs.map +1 -0
  107. package/dist/domain/permissions/index.d.cts +52 -3
  108. package/dist/domain/permissions/index.d.ts +52 -3
  109. package/dist/domain/permissions/index.js +59 -2
  110. package/dist/domain/permissions/index.js.map +1 -0
  111. package/dist/editor/index.cjs +2 -2
  112. package/dist/editor/index.d.cts +2 -2
  113. package/dist/editor/index.d.ts +2 -2
  114. package/dist/editor/index.js +2 -2
  115. package/dist/editor/types.d.cts +1 -1
  116. package/dist/editor/types.d.ts +1 -1
  117. package/dist/encryption/index.cjs +1 -1
  118. package/dist/encryption/index.d.cts +1 -1
  119. package/dist/encryption/index.d.ts +1 -1
  120. package/dist/encryption/index.js +1 -1
  121. package/dist/encryption/types.d.cts +1 -1
  122. package/dist/encryption/types.d.ts +1 -1
  123. package/dist/import/index.cjs +1 -1
  124. package/dist/import/index.d.cts +3 -3
  125. package/dist/import/index.d.ts +3 -3
  126. package/dist/import/index.js +1 -1
  127. package/dist/{import-KLH1uRtx.cjs → import-C0-y1GQK.cjs} +3 -3
  128. package/dist/{import-KLH1uRtx.cjs.map → import-C0-y1GQK.cjs.map} +1 -1
  129. package/dist/{import-Cf0W-7YD.js → import-SQuurg1G.js} +3 -3
  130. package/dist/{import-Cf0W-7YD.js.map → import-SQuurg1G.js.map} +1 -1
  131. package/dist/{index-BEKaJ7Cc.d.cts → index-BKh0prif.d.cts} +4 -4
  132. package/dist/{index-KKJkrxjx.d.ts → index-Bc_hXWae.d.ts} +3 -3
  133. package/dist/{index-DYQt4zxC.d.ts → index-Bg1P6Bb2.d.ts} +6 -6
  134. package/dist/{index-DplMbm9E.d.cts → index-Bjk-tCpG.d.cts} +548 -3073
  135. package/dist/{index-eEBVG5s3.d.cts → index-C7e3wBt9.d.cts} +3 -3
  136. package/dist/{index-8pN6Emos.d.ts → index-CQrKS7PV.d.cts} +24 -4
  137. package/dist/{index-DVsnxZap.d.cts → index-CXtdQ7be.d.cts} +4 -4
  138. package/dist/{index-CLPrlyIz.d.cts → index-CeJOmN-P.d.ts} +24 -4
  139. package/dist/{index-BmjeNd9u.d.ts → index-Ctqkm3Fx.d.ts} +4 -4
  140. package/dist/{index-WQkVzx5e.d.cts → index-D_7yCRKy.d.cts} +4 -4
  141. package/dist/{index-DNlX-H1V.d.ts → index-Dbzjvy5h.d.ts} +5 -5
  142. package/dist/{index-BWBScAYc.d.cts → index-DeKPpYQy.d.ts} +3 -3
  143. package/dist/{index-DXi6wsr5.d.cts → index-DiHHyMEo.d.cts} +6 -6
  144. package/dist/{index-IN0qzs52.d.cts → index-DqOAjqxN.d.cts} +5 -5
  145. package/dist/{index-Dwp8tF6O.d.ts → index-FhKX7Cv1.d.ts} +548 -3073
  146. package/dist/{index-BthgbVdd.d.ts → index-GDdFZCXp.d.ts} +4 -4
  147. package/dist/{index-CXQRvZ-f.d.cts → index-Gn1H63Hk.d.cts} +4 -4
  148. package/dist/{index-vb9Rfqca.d.ts → index-NaYLwG_h.d.cts} +155 -4
  149. package/dist/{index-vb9Rfqca.d.cts → index-NaYLwG_h.d.ts} +155 -4
  150. package/dist/{index-DIM8KZly.d.ts → index-eAlN694c.d.cts} +3 -3
  151. package/dist/{index-Cfrl7sd5.d.ts → index-fHfc_VqS.d.ts} +4 -4
  152. package/dist/{index-CeistZnj.d.ts → index-tKsiUarj.d.ts} +4 -4
  153. package/dist/index.cjs +46 -225
  154. package/dist/index.cjs.map +1 -1
  155. package/dist/index.d.cts +6 -6
  156. package/dist/index.d.ts +6 -6
  157. package/dist/index.js +44 -226
  158. package/dist/index.js.map +1 -1
  159. package/dist/kaiAgent/index.cjs +3 -0
  160. package/dist/kaiAgent/index.d.cts +210 -0
  161. package/dist/kaiAgent/index.d.ts +210 -0
  162. package/dist/kaiAgent/index.js +2 -0
  163. package/dist/kaiAgent/types.cjs +0 -0
  164. package/dist/kaiAgent/types.d.cts +2 -0
  165. package/dist/kaiAgent/types.d.ts +2 -0
  166. package/dist/kaiAgent/types.js +1 -0
  167. package/dist/kaiAgent-4OiIK1C2.cjs +222 -0
  168. package/dist/kaiAgent-4OiIK1C2.cjs.map +1 -0
  169. package/dist/kaiAgent-HDaFS9BR.js +217 -0
  170. package/dist/kaiAgent-HDaFS9BR.js.map +1 -0
  171. package/dist/management/index.cjs +1 -1
  172. package/dist/management/index.d.cts +1 -1
  173. package/dist/management/index.d.ts +1 -1
  174. package/dist/management/index.js +1 -1
  175. package/dist/management/types.d.cts +1 -1
  176. package/dist/management/types.d.ts +1 -1
  177. package/dist/{management-DqwQcDCx.js → management-CIFhu1Nm.js} +6 -7
  178. package/dist/management-CIFhu1Nm.js.map +1 -0
  179. package/dist/{management-WOmlBt6H.cjs → management-DfjwQo7z.cjs} +6 -7
  180. package/dist/management-DfjwQo7z.cjs.map +1 -0
  181. package/dist/metastore/index.cjs +1 -1
  182. package/dist/metastore/index.d.cts +1 -1
  183. package/dist/metastore/index.d.ts +1 -1
  184. package/dist/metastore/index.js +1 -1
  185. package/dist/metastore/types.d.cts +1 -1
  186. package/dist/metastore/types.d.ts +1 -1
  187. package/dist/{metastore-CNEhL66f.js → metastore-CrXkKufo.js} +4 -4
  188. package/dist/{metastore-CNEhL66f.js.map → metastore-CrXkKufo.js.map} +1 -1
  189. package/dist/{metastore-CkQluyX1.cjs → metastore-Dq2NS6jb.cjs} +4 -4
  190. package/dist/{metastore-CkQluyX1.cjs.map → metastore-Dq2NS6jb.cjs.map} +1 -1
  191. package/dist/microsoftGraph/index.cjs +92 -0
  192. package/dist/microsoftGraph/index.cjs.map +1 -0
  193. package/dist/microsoftGraph/index.d.cts +305 -0
  194. package/dist/microsoftGraph/index.d.ts +305 -0
  195. package/dist/microsoftGraph/index.js +90 -0
  196. package/dist/microsoftGraph/index.js.map +1 -0
  197. package/dist/microsoftGraph/types.cjs +0 -0
  198. package/dist/microsoftGraph/types.d.cts +10 -0
  199. package/dist/microsoftGraph/types.d.ts +10 -0
  200. package/dist/microsoftGraph/types.js +1 -0
  201. package/dist/notifications/index.cjs +3 -3
  202. package/dist/notifications/index.d.cts +2 -2
  203. package/dist/notifications/index.d.ts +2 -2
  204. package/dist/notifications/index.js +3 -3
  205. package/dist/notifications/types.d.cts +1 -1
  206. package/dist/notifications/types.d.ts +1 -1
  207. package/dist/oauth/index.cjs +1 -1
  208. package/dist/oauth/index.d.cts +2 -2
  209. package/dist/oauth/index.d.ts +2 -2
  210. package/dist/oauth/index.js +1 -1
  211. package/dist/oauth/types.d.cts +1 -1
  212. package/dist/oauth/types.d.ts +1 -1
  213. package/dist/{oauth-DYDObUX9.js → oauth-CFwSNz37.js} +5 -5
  214. package/dist/{oauth-DYDObUX9.js.map → oauth-CFwSNz37.js.map} +1 -1
  215. package/dist/{oauth-DTvrqe6P.cjs → oauth-CkW5gln-.cjs} +5 -5
  216. package/dist/{oauth-DTvrqe6P.cjs.map → oauth-CkW5gln-.cjs.map} +1 -1
  217. package/dist/omnisearch/index.cjs +2 -2
  218. package/dist/omnisearch/index.d.cts +2 -2
  219. package/dist/omnisearch/index.d.ts +2 -2
  220. package/dist/omnisearch/index.js +2 -2
  221. package/dist/omnisearch/types.d.cts +1 -1
  222. package/dist/omnisearch/types.d.ts +1 -1
  223. package/dist/{project-io1pY-hW.d.ts → project-BOGaVs-q.d.ts} +2 -2
  224. package/dist/{project-CcGxXIW_.d.cts → project-BnQkL8cb.d.cts} +2 -2
  225. package/dist/queryService/index.cjs +1 -1
  226. package/dist/queryService/index.d.cts +1 -1
  227. package/dist/queryService/index.d.ts +1 -1
  228. package/dist/queryService/index.js +1 -1
  229. package/dist/queryService/types.d.cts +1 -1
  230. package/dist/queryService/types.d.ts +1 -1
  231. package/dist/{queryService-CvqDqigW.cjs → queryService-BLaGbpm-.cjs} +5 -5
  232. package/dist/{queryService-CvqDqigW.cjs.map → queryService-BLaGbpm-.cjs.map} +1 -1
  233. package/dist/{queryService-BHV_OZI2.js → queryService-DK-jUnET.js} +5 -5
  234. package/dist/{queryService-BHV_OZI2.js.map → queryService-DK-jUnET.js.map} +1 -1
  235. package/dist/queue/index.cjs +1 -1
  236. package/dist/queue/index.d.cts +3 -3
  237. package/dist/queue/index.d.ts +3 -3
  238. package/dist/queue/index.js +1 -1
  239. package/dist/queue/types.d.cts +1 -1
  240. package/dist/queue/types.d.ts +1 -1
  241. package/dist/{queue-CUHKupTA.cjs → queue-B7TY4JLf.cjs} +4 -4
  242. package/dist/{queue-CUHKupTA.cjs.map → queue-B7TY4JLf.cjs.map} +1 -1
  243. package/dist/{queue-uofE4Eu6.js → queue-DViSQ-eq.js} +4 -4
  244. package/dist/{queue-uofE4Eu6.js.map → queue-DViSQ-eq.js.map} +1 -1
  245. package/dist/scheduler/index.cjs +3 -3
  246. package/dist/scheduler/index.d.cts +2 -2
  247. package/dist/scheduler/index.d.ts +2 -2
  248. package/dist/scheduler/index.js +3 -3
  249. package/dist/scheduler/types.d.cts +1 -1
  250. package/dist/scheduler/types.d.ts +1 -1
  251. package/dist/schema-D1oxyn1O.d.cts +8760 -0
  252. package/dist/schema-D1oxyn1O.d.ts +8760 -0
  253. package/dist/sdk/configurations/index.cjs +1 -1
  254. package/dist/sdk/configurations/index.d.cts +4 -4
  255. package/dist/sdk/configurations/index.d.ts +4 -4
  256. package/dist/sdk/configurations/index.js +1 -1
  257. package/dist/sdk/developerPortal/index.cjs +3 -3
  258. package/dist/sdk/developerPortal/index.d.cts +3 -3
  259. package/dist/sdk/developerPortal/index.d.ts +3 -3
  260. package/dist/sdk/developerPortal/index.js +3 -3
  261. package/dist/sdk/queryService/index.d.cts +1 -1
  262. package/dist/sdk/queryService/index.d.ts +1 -1
  263. package/dist/sdk/semanticLayer/index.d.cts +1 -1
  264. package/dist/sdk/semanticLayer/index.d.ts +1 -1
  265. package/dist/sdk/semanticLayer/types.d.cts +1 -1
  266. package/dist/sdk/semanticLayer/types.d.ts +1 -1
  267. package/dist/sdk/storage/index.d.cts +1 -1
  268. package/dist/sdk/storage/index.d.ts +1 -1
  269. package/dist/sdk/tag/index.d.cts +2 -2
  270. package/dist/sdk/tag/index.d.ts +2 -2
  271. package/dist/sdk/tag/types.d.cts +1 -1
  272. package/dist/sdk/tag/types.d.ts +1 -1
  273. package/dist/sdk/vault/index.d.cts +1 -1
  274. package/dist/sdk/vault/index.d.ts +1 -1
  275. package/dist/serviceIds-fHLDwOg9.d.cts +31 -0
  276. package/dist/serviceIds-fHLDwOg9.d.ts +31 -0
  277. package/dist/status/index.cjs +1 -1
  278. package/dist/status/index.d.cts +1 -1
  279. package/dist/status/index.d.ts +1 -1
  280. package/dist/status/index.js +1 -1
  281. package/dist/storage/index.cjs +6 -3
  282. package/dist/storage/index.d.cts +3 -3
  283. package/dist/storage/index.d.ts +3 -3
  284. package/dist/storage/index.js +5 -4
  285. package/dist/storage/types.d.cts +4 -3
  286. package/dist/storage/types.d.ts +4 -3
  287. package/dist/{storage-DbyNnkIJ.cjs → storage-CihHwZ7z.cjs} +153 -161
  288. package/dist/storage-CihHwZ7z.cjs.map +1 -0
  289. package/dist/{storage-luq7YBZF.js → storage-kgxscFEg.js} +153 -161
  290. package/dist/storage-kgxscFEg.js.map +1 -0
  291. package/dist/stream/index.cjs +3 -3
  292. package/dist/stream/index.d.cts +2 -2
  293. package/dist/stream/index.d.ts +2 -2
  294. package/dist/stream/index.js +3 -3
  295. package/dist/stream/types.d.cts +1 -1
  296. package/dist/stream/types.d.ts +1 -1
  297. package/dist/syncActions/index.cjs +1 -1
  298. package/dist/syncActions/index.d.cts +1 -1
  299. package/dist/syncActions/index.d.ts +1 -1
  300. package/dist/syncActions/index.js +1 -1
  301. package/dist/syncActions/types.d.cts +1 -1
  302. package/dist/syncActions/types.d.ts +1 -1
  303. package/dist/{syncActions-ssWWVN_4.js → syncActions-B75t0NwP.js} +5 -5
  304. package/dist/{syncActions-ssWWVN_4.js.map → syncActions-B75t0NwP.js.map} +1 -1
  305. package/dist/{syncActions-DKWeJ8GH.cjs → syncActions-CevF_TEb.cjs} +5 -5
  306. package/dist/{syncActions-DKWeJ8GH.cjs.map → syncActions-CevF_TEb.cjs.map} +1 -1
  307. package/dist/telemetry/index.cjs +1 -1
  308. package/dist/telemetry/index.d.cts +2 -2
  309. package/dist/telemetry/index.d.ts +2 -2
  310. package/dist/telemetry/index.js +1 -1
  311. package/dist/{telemetry-2IrE8HaZ.cjs → telemetry-DwlSLVAU.cjs} +3 -3
  312. package/dist/{telemetry-2IrE8HaZ.cjs.map → telemetry-DwlSLVAU.cjs.map} +1 -1
  313. package/dist/{telemetry-yQfQxBBI.js → telemetry-FXpodtJN.js} +3 -3
  314. package/dist/{telemetry-yQfQxBBI.js.map → telemetry-FXpodtJN.js.map} +1 -1
  315. package/dist/{types-DEKF5pbg.d.cts → types-Av2egS_l.d.ts} +408 -24
  316. package/dist/{types-DBOEA7l0.d.cts → types-B2vmg_UF.d.cts} +3 -3
  317. package/dist/{types-DMvU4kZ2.d.cts → types-B4jdPHoL.d.cts} +2 -2
  318. package/dist/{types-CAOvDtMC.d.cts → types-BH9ljNmj.d.cts} +2 -2
  319. package/dist/{types-QOIQ-dZU.d.cts → types-BI2jI-3-.d.cts} +3 -3
  320. package/dist/types-BMQW-2Yw.d.ts +2804 -0
  321. package/dist/{types-C8XiTXxi.d.cts → types-BREGN3qo.d.cts} +2 -2
  322. package/dist/{types-B1S2H7q1.d.ts → types-BTbczawY.d.ts} +2 -2
  323. package/dist/{types-CwvOcTOm.d.cts → types-BV2BDccJ.d.cts} +247 -430
  324. package/dist/{types-BREBK0xX.d.ts → types-BZBdLUpH.d.ts} +2 -2
  325. package/dist/{types-Z-vUwgym.d.ts → types-BlCoTm7n.d.ts} +2 -2
  326. package/dist/{types-CSmttcZ_.d.ts → types-BnaAo7xn.d.ts} +2 -2
  327. package/dist/{types-V8rC5if7.d.cts → types-BoV9M5Xg.d.cts} +2 -2
  328. package/dist/{types-BCt0EMiO.d.ts → types-Bpnpa2Wt.d.ts} +3 -3
  329. package/dist/{types-BhBvnvqe.d.ts → types-BptQ7jpP.d.cts} +408 -24
  330. package/dist/{types-x4xPlrr0.d.ts → types-ByWD2oeV.d.ts} +2 -2
  331. package/dist/{types-BefwoXik.d.cts → types-C1vhYcic.d.cts} +2 -2
  332. package/dist/{types-DwX1uxp_.d.ts → types-C2CLlR4i.d.ts} +2 -2
  333. package/dist/{types-BO-mTxKb.d.cts → types-CGH_lfxS.d.cts} +2 -16
  334. package/dist/{types-CyRK5z-E.d.cts → types-CJHi0zdD.d.cts} +2 -2
  335. package/dist/{types-DeApSCzx.d.cts → types-COIsNoTQ.d.cts} +2 -2
  336. package/dist/{types-DkbfBOBr.d.cts → types-COc-nind.d.cts} +2 -2
  337. package/dist/{types-DvsGS8By.d.cts → types-CPanB0p7.d.cts} +3 -3
  338. package/dist/{types-BmFyDKe6.d.ts → types-CXTqFYah.d.ts} +28 -7
  339. package/dist/{types-DS8uFAeq.d.cts → types-CcuG9cid.d.cts} +2 -2
  340. package/dist/{types-2mHlPakp.d.cts → types-Cj4bLPp5.d.cts} +28 -7
  341. package/dist/{types-SGuvOEV8.d.ts → types-CkcMoXRk.d.ts} +3 -3
  342. package/dist/{types-D2n3h1gp.d.ts → types-CpALS017.d.ts} +2 -16
  343. package/dist/{types-DCBKso0t.d.cts → types-CvkqEvhv.d.cts} +2 -2
  344. package/dist/{types-B1glyy_Q.d.ts → types-CyHZ1ZQe.d.ts} +2 -2
  345. package/dist/{types-B06L4-WE.d.cts → types-CyiRYRVq.d.cts} +3 -3
  346. package/dist/{types-CvADp-x-.d.ts → types-Cz1dj_TM.d.ts} +2 -2
  347. package/dist/{types-CjAia48k.d.ts → types-D-qI9ne4.d.ts} +2 -2
  348. package/dist/{types-CtdyAkzI.d.cts → types-D1uloiuY.d.cts} +2 -2
  349. package/dist/{types-CC0wymfG.d.ts → types-D6jKxUv_.d.ts} +247 -430
  350. package/dist/{types-CexuN7Mw.d.cts → types-DNXC_-fA.d.cts} +7 -5
  351. package/dist/{types-BpWqpMkL.d.ts → types-DeSd3gqW.d.ts} +3 -3
  352. package/dist/{types-BD6czYPH.d.ts → types-De_DA2ga.d.ts} +7 -5
  353. package/dist/{types-h9TTimS_.d.ts → types-Dfc58bPE.d.ts} +2 -2
  354. package/dist/{types-n4FFKqa4.d.ts → types-Di8VIZwQ.d.ts} +2 -2
  355. package/dist/{types--T-vBqdd.d.cts → types-DlbiVsVo.d.cts} +2 -2
  356. package/dist/types-DuiUN0h8.d.ts +33557 -0
  357. package/dist/{types-7H6Dnz0Y.d.ts → types-DwpRt3e9.d.ts} +2 -2
  358. package/dist/{types-CI1mW2lA.d.ts → types-EJEoI3ZK.d.ts} +2 -2
  359. package/dist/types-GuWtMCMn.d.cts +33557 -0
  360. package/dist/{types-BRQAKEC1.d.cts → types-MbcIiKDI.d.cts} +3 -3
  361. package/dist/{types-DebL68-g.d.ts → types-RfaldD4P.d.ts} +3 -3
  362. package/dist/{types-CbZ8aMKW.d.cts → types-cDU_J45_.d.cts} +2 -2
  363. package/dist/{types-bws2RtKq.d.ts → types-dybUhlU2.d.ts} +2 -2
  364. package/dist/types-iNlsdRkx.d.cts +2804 -0
  365. package/dist/{types-BXK6Ebtm.d.ts → types-sVYo0o9_.d.ts} +3 -3
  366. package/dist/{types-DgaYUtu_.d.cts → types-zA3H84SM.d.cts} +2 -2
  367. package/dist/validateConnectionStatus-BrLXkoSI.js +38 -0
  368. package/dist/validateConnectionStatus-BrLXkoSI.js.map +1 -0
  369. package/dist/validateConnectionStatus-V9q6Nl6u.cjs +55 -0
  370. package/dist/validateConnectionStatus-V9q6Nl6u.cjs.map +1 -0
  371. package/dist/vault/index.cjs +4 -4
  372. package/dist/vault/index.d.cts +1 -1
  373. package/dist/vault/index.d.ts +1 -1
  374. package/dist/vault/index.js +4 -4
  375. package/dist/vault/types.d.cts +1 -1
  376. package/dist/vault/types.d.ts +1 -1
  377. package/package.json +57 -4
  378. package/surface/auth.md +9 -2
  379. package/surface/chat.md +1 -1
  380. package/surface/kaiAgent.md +1 -0
  381. package/surface/sdk.md +4 -4
  382. package/surface/storage.md +44 -44
  383. package/dist/authClient-DOk6VKdV.js.map +0 -1
  384. package/dist/authClient-Z8Eg8rlN.cjs.map +0 -1
  385. package/dist/configurations-DCOJONZZ.cjs.map +0 -1
  386. package/dist/configurations-iCbhe0tb.js.map +0 -1
  387. package/dist/constants-CqyyBkXW.cjs.map +0 -1
  388. package/dist/constants-_HhqKvBg.js.map +0 -1
  389. package/dist/createFetchClient-BK0TZK-U.js.map +0 -1
  390. package/dist/createFetchClient-BsG719K1.cjs.map +0 -1
  391. package/dist/management-DqwQcDCx.js.map +0 -1
  392. package/dist/management-WOmlBt6H.cjs.map +0 -1
  393. package/dist/storage-DbyNnkIJ.cjs.map +0 -1
  394. package/dist/storage-luq7YBZF.js.map +0 -1
  395. package/dist/types-CRYtdj5w.d.ts +0 -18784
  396. package/dist/types-ISUNM_BR.d.cts +0 -18784
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-DTvrqe6P.cjs","names":["createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient","isApiError","HttpStatus"],"sources":["../src/clients/oauth/utils.ts","../src/clients/oauth/oauthClient.ts"],"sourcesContent":["/**\n * Which credentials to list:\n *\n * - `all` — the whole project: branch-scoped and branchless alike.\n * - `branchless` — only what is tied to no branch at all, not even the default one.\n * - `branched` — only the branch whose id it carries.\n *\n * Discriminated on `scope`, not on `branchId` being present: a `string | 'all' | 'branchless'` union\n * collapses to `string`, so a mistyped scope would silently become a branch-id filter.\n */\nexport type GetCredentialsInput =\n | { scope: 'all'; componentId?: string }\n | { scope: 'branchless'; componentId?: string }\n | { scope: 'branched'; branchId: string; componentId?: string };\n\n/**\n * All three scopes ride the one `branchId` query parameter:\n *\n * - `all` → omitted, which the service reads as no filter.\n * - `branchless` → the literal string `'null'`, which it reads as `branchId IS NULL`.\n * - `branched` → the branch id itself.\n */\nexport type CredentialsDataFormat = 'encrypted' | 'plain';\n\n/**\n * The credentials payload rides one of two fields, and only one of them is in the current spec:\n *\n * - `encrypted` — `#data`, the payload serialized to a string. The `#` marks it for the service to\n * encrypt at rest.\n * - `plain` — `data`, the payload as an object. Only services predating the spec accept it.\n */\nexport const encodeCredentialsData = (\n data: Record<string, unknown>,\n format: CredentialsDataFormat,\n) => (format === 'encrypted' ? { '#data': JSON.stringify(data) } : { data });\n\nexport const getScopedBranchId = (scope: GetCredentialsInput) => {\n switch (scope.scope) {\n case 'all':\n return undefined;\n case 'branchless':\n return 'null';\n case 'branched':\n return scope.branchId;\n }\n};\n","import { createGenericFetchClient, createOpenapiFetchClient, isApiError } from '../../fetchClient';\nimport { HttpStatus } from '../../internal';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type { CreateCredentialInput, CredentialInput } from './types';\nimport type { CredentialsDataFormat, GetCredentialsInput } from './utils';\nimport { encodeCredentialsData, getScopedBranchId } from './utils';\n\nexport const createOauthClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const getCredentials = async (scope: GetCredentialsInput, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/credentials',\n { query: { branchId: getScopedBranchId(scope), componentId: scope.componentId } },\n { signal },\n );\n return data;\n };\n\n const getCredential = async ({ componentId, id }: CredentialInput, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/credentials/{componentId}/{name}',\n { path: { componentId, name: id } },\n { signal },\n );\n return data;\n };\n\n const createCredential = async (\n { componentId, data, ...rest }: CreateCredentialInput,\n signal?: AbortSignal,\n ) => {\n const post = (format: CredentialsDataFormat) =>\n client\n .post(\n '/credentials/{componentId}',\n {\n path: { componentId },\n // The plain shape predates the spec, so no schema can describe it. It borrows the\n // encrypted field's type to get past the generated body — the one assertion here.\n body: { ...rest, ...(encodeCredentialsData(data, format) as { '#data': string }) },\n },\n { signal },\n )\n .then((response) => response.data);\n\n try {\n return await post('plain');\n } catch (error) {\n if (isApiError(error) && error.response.status === HttpStatus.UNPROCESSABLE_ENTITY) {\n return post('encrypted');\n }\n throw error;\n }\n };\n\n const deleteCredential = async ({ componentId, id }: CredentialInput, signal?: AbortSignal) => {\n await client.delete(\n '/credentials/{componentId}/{name}',\n { path: { componentId, name: id } },\n { signal },\n );\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n getCredentials,\n getCredential,\n createCredential,\n deleteCredential,\n };\n};\n"],"mappings":";;;;;;;;;;;;AA+BA,MAAa,yBACX,MACA,WACI,WAAW,cAAc,EAAE,SAAS,KAAK,UAAU,IAAI,EAAE,IAAI,EAAE,KAAK;AAE1E,MAAa,qBAAqB,UAA+B;CAC/D,QAAQ,MAAM,OAAd;EACE,KAAK,OACH;EACF,KAAK,cACH,OAAO;EACT,KAAK,YACH,OAAO,MAAM;CACjB;AACF;;;ACnCA,MAAa,qBAAqB,EAAE,SAAS,aAAa,WAA8B;CACtF,MAAM,SAASA,iCAAAA,yBAAgC;EAC7C;EACA;EACA,SAASC,aAAAA,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgBC,iCAAAA,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,iBAAiB,OAAO,OAA4B,WAAyB;EACjF,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,gBACA,EAAE,OAAO;GAAE,UAAU,kBAAkB,KAAK;GAAG,aAAa,MAAM;EAAY,EAAE,GAChF,EAAE,OAAO,CACX;EACA,OAAO;CACT;CAEA,MAAM,gBAAgB,OAAO,EAAE,aAAa,MAAuB,WAAyB;EAC1F,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,qCACA,EAAE,MAAM;GAAE;GAAa,MAAM;EAAG,EAAE,GAClC,EAAE,OAAO,CACX;EACA,OAAO;CACT;CAEA,MAAM,mBAAmB,OACvB,EAAE,aAAa,MAAM,GAAG,QACxB,WACG;EACH,MAAM,QAAQ,WACZ,OACG,KACC,8BACA;GACE,MAAM,EAAE,YAAY;GAGpB,MAAM;IAAE,GAAG;IAAM,GAAI,sBAAsB,MAAM,MAAM;GAA0B;EACnF,GACA,EAAE,OAAO,CACX,CAAC,CACA,MAAM,aAAa,SAAS,IAAI;EAErC,IAAI;GACF,OAAO,MAAM,KAAK,OAAO;EAC3B,SAAS,OAAO;GACd,IAAIC,0BAAAA,WAAW,KAAK,KAAK,MAAM,SAAS,WAAWC,0BAAAA,WAAW,sBAC5D,OAAO,KAAK,WAAW;GAEzB,MAAM;EACR;CACF;CAEA,MAAM,mBAAmB,OAAO,EAAE,aAAa,MAAuB,WAAyB;EAC7F,MAAM,OAAO,OACX,qCACA,EAAE,MAAM;GAAE;GAAa,MAAM;EAAG,EAAE,GAClC,EAAE,OAAO,CACX;CACF;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"oauth-CkW5gln-.cjs","names":["createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient","isApiError","HttpStatus"],"sources":["../src/clients/oauth/utils.ts","../src/clients/oauth/oauthClient.ts"],"sourcesContent":["/**\n * Which credentials to list:\n *\n * - `all` — the whole project: branch-scoped and branchless alike.\n * - `branchless` — only what is tied to no branch at all, not even the default one.\n * - `branched` — only the branch whose id it carries.\n *\n * Discriminated on `scope`, not on `branchId` being present: a `string | 'all' | 'branchless'` union\n * collapses to `string`, so a mistyped scope would silently become a branch-id filter.\n */\nexport type GetCredentialsInput =\n | { scope: 'all'; componentId?: string }\n | { scope: 'branchless'; componentId?: string }\n | { scope: 'branched'; branchId: string; componentId?: string };\n\n/**\n * All three scopes ride the one `branchId` query parameter:\n *\n * - `all` → omitted, which the service reads as no filter.\n * - `branchless` → the literal string `'null'`, which it reads as `branchId IS NULL`.\n * - `branched` → the branch id itself.\n */\nexport type CredentialsDataFormat = 'encrypted' | 'plain';\n\n/**\n * The credentials payload rides one of two fields, and only one of them is in the current spec:\n *\n * - `encrypted` — `#data`, the payload serialized to a string. The `#` marks it for the service to\n * encrypt at rest.\n * - `plain` — `data`, the payload as an object. Only services predating the spec accept it.\n */\nexport const encodeCredentialsData = (\n data: Record<string, unknown>,\n format: CredentialsDataFormat,\n) => (format === 'encrypted' ? { '#data': JSON.stringify(data) } : { data });\n\nexport const getScopedBranchId = (scope: GetCredentialsInput) => {\n switch (scope.scope) {\n case 'all':\n return undefined;\n case 'branchless':\n return 'null';\n case 'branched':\n return scope.branchId;\n }\n};\n","import { createGenericFetchClient, createOpenapiFetchClient, isApiError } from '../../fetchClient';\nimport { HttpStatus } from '../../internal';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type { CreateCredentialInput, CredentialInput } from './types';\nimport type { CredentialsDataFormat, GetCredentialsInput } from './utils';\nimport { encodeCredentialsData, getScopedBranchId } from './utils';\n\nexport const createOauthClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const getCredentials = async (scope: GetCredentialsInput, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/credentials',\n { query: { branchId: getScopedBranchId(scope), componentId: scope.componentId } },\n { signal },\n );\n return data;\n };\n\n const getCredential = async ({ componentId, id }: CredentialInput, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/credentials/{componentId}/{name}',\n { path: { componentId, name: id } },\n { signal },\n );\n return data;\n };\n\n const createCredential = async (\n { componentId, data, ...rest }: CreateCredentialInput,\n signal?: AbortSignal,\n ) => {\n const post = (format: CredentialsDataFormat) =>\n client\n .post(\n '/credentials/{componentId}',\n {\n path: { componentId },\n // The plain shape predates the spec, so no schema can describe it. It borrows the\n // encrypted field's type to get past the generated body — the one assertion here.\n body: { ...rest, ...(encodeCredentialsData(data, format) as { '#data': string }) },\n },\n { signal },\n )\n .then((response) => response.data);\n\n try {\n return await post('plain');\n } catch (error) {\n if (isApiError(error) && error.response.status === HttpStatus.UNPROCESSABLE_ENTITY) {\n return post('encrypted');\n }\n throw error;\n }\n };\n\n const deleteCredential = async ({ componentId, id }: CredentialInput, signal?: AbortSignal) => {\n await client.delete(\n '/credentials/{componentId}/{name}',\n { path: { componentId, name: id } },\n { signal },\n );\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n getCredentials,\n getCredential,\n createCredential,\n deleteCredential,\n };\n};\n"],"mappings":";;;;;;;;;;;;AA+BA,MAAa,yBACX,MACA,WACI,WAAW,cAAc,EAAE,SAAS,KAAK,UAAU,IAAI,EAAE,IAAI,EAAE,KAAK;AAE1E,MAAa,qBAAqB,UAA+B;CAC/D,QAAQ,MAAM,OAAd;EACE,KAAK,OACH;EACF,KAAK,cACH,OAAO;EACT,KAAK,YACH,OAAO,MAAM;CACjB;AACF;;;ACnCA,MAAa,qBAAqB,EAAE,SAAS,aAAa,WAA8B;CACtF,MAAM,SAASA,iCAAAA,yBAAgC;EAC7C;EACA;EACA,SAASC,aAAAA,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgBC,iCAAAA,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,iBAAiB,OAAO,OAA4B,WAAyB;EACjF,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,gBACA,EAAE,OAAO;GAAE,UAAU,kBAAkB,KAAK;GAAG,aAAa,MAAM;EAAY,EAAE,GAChF,EAAE,OAAO,CACX;EACA,OAAO;CACT;CAEA,MAAM,gBAAgB,OAAO,EAAE,aAAa,MAAuB,WAAyB;EAC1F,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,qCACA,EAAE,MAAM;GAAE;GAAa,MAAM;EAAG,EAAE,GAClC,EAAE,OAAO,CACX;EACA,OAAO;CACT;CAEA,MAAM,mBAAmB,OACvB,EAAE,aAAa,MAAM,GAAG,QACxB,WACG;EACH,MAAM,QAAQ,WACZ,OACG,KACC,8BACA;GACE,MAAM,EAAE,YAAY;GAGpB,MAAM;IAAE,GAAG;IAAM,GAAI,sBAAsB,MAAM,MAAM;GAA0B;EACnF,GACA,EAAE,OAAO,CACX,CAAC,CACA,MAAM,aAAa,SAAS,IAAI;EAErC,IAAI;GACF,OAAO,MAAM,KAAK,OAAO;EAC3B,SAAS,OAAO;GACd,IAAIC,0BAAAA,WAAW,KAAK,KAAK,MAAM,SAAS,WAAWC,0BAAAA,WAAW,sBAC5D,OAAO,KAAK,WAAW;GAEzB,MAAM;EACR;CACF;CAEA,MAAM,mBAAmB,OAAO,EAAE,aAAa,MAAuB,WAAyB;EAC7F,MAAM,OAAO,OACX,qCACA,EAAE,MAAM;GAAE;GAAa,MAAM;EAAG,EAAE,GAClC,EAAE,OAAO,CACX;CACF;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-Cr90VXY4.cjs");
3
- const require_auth = require("../auth-5HCvCsZO.cjs");
2
+ const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-CyDUFxHB.cjs");
3
+ const require_auth = require("../auth-DP-6TFiM.cjs");
4
4
  //#region src/clients/omnisearch/omnisearchClient.ts
5
5
  /**
6
6
  * Omnisearch — data lineage (and, later, cross-project metadata search).
@@ -1,5 +1,5 @@
1
- import { n as ClientInitOptions } from "../types-C8XiTXxi.cjs";
2
- import { h as components, m as TablesLineageResponse, n as GetTablesLineageQuery, t as GetProjectsLineageQuery } from "../types-DeApSCzx.cjs";
1
+ import { n as ClientInitOptions } from "../types-BREGN3qo.cjs";
2
+ import { h as components, m as TablesLineageResponse, n as GetTablesLineageQuery, t as GetProjectsLineageQuery } from "../types-COIsNoTQ.cjs";
3
3
  //#region src/clients/omnisearch/omnisearchClient.d.ts
4
4
  /**
5
5
  * Omnisearch — data lineage (and, later, cross-project metadata search).
@@ -1,5 +1,5 @@
1
- import { n as ClientInitOptions } from "../types-7H6Dnz0Y.js";
2
- import { h as components, m as TablesLineageResponse, n as GetTablesLineageQuery, t as GetProjectsLineageQuery } from "../types-bws2RtKq.js";
1
+ import { n as ClientInitOptions } from "../types-DwpRt3e9.js";
2
+ import { h as components, m as TablesLineageResponse, n as GetTablesLineageQuery, t as GetProjectsLineageQuery } from "../types-dybUhlU2.js";
3
3
  //#region src/clients/omnisearch/omnisearchClient.d.ts
4
4
  /**
5
5
  * Omnisearch — data lineage (and, later, cross-project metadata search).
@@ -1,5 +1,5 @@
1
- import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-B5U1fCHS.js";
2
- import { t as createAuthHeaders } from "../auth-D2jfNlpX.js";
1
+ import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-Bn6_Pn0H.js";
2
+ import { t as createAuthHeaders } from "../auth-DtbQaeDj.js";
3
3
  //#region src/clients/omnisearch/omnisearchClient.ts
4
4
  /**
5
5
  * Omnisearch — data lineage (and, later, cross-project metadata search).
@@ -1,2 +1,2 @@
1
- import { a as LineageMetadata, c as LineageTable, d as ProjectsLineageResponse, f as TableLineageRelation, i as LineageConfiguration, l as ProjectLineageRelation, m as TablesLineageResponse, n as GetTablesLineageQuery, o as LineageProject, p as TablesLineage, r as LineageBucket, s as LineageSource, t as GetProjectsLineageQuery, u as ProjectsLineage } from "../types-DeApSCzx.cjs";
1
+ import { a as LineageMetadata, c as LineageTable, d as ProjectsLineageResponse, f as TableLineageRelation, i as LineageConfiguration, l as ProjectLineageRelation, m as TablesLineageResponse, n as GetTablesLineageQuery, o as LineageProject, p as TablesLineage, r as LineageBucket, s as LineageSource, t as GetProjectsLineageQuery, u as ProjectsLineage } from "../types-COIsNoTQ.cjs";
2
2
  export { GetProjectsLineageQuery, GetTablesLineageQuery, LineageBucket, LineageConfiguration, LineageMetadata, LineageProject, LineageSource, LineageTable, ProjectLineageRelation, ProjectsLineage, ProjectsLineageResponse, TableLineageRelation, TablesLineage, TablesLineageResponse };
@@ -1,2 +1,2 @@
1
- import { a as LineageMetadata, c as LineageTable, d as ProjectsLineageResponse, f as TableLineageRelation, i as LineageConfiguration, l as ProjectLineageRelation, m as TablesLineageResponse, n as GetTablesLineageQuery, o as LineageProject, p as TablesLineage, r as LineageBucket, s as LineageSource, t as GetProjectsLineageQuery, u as ProjectsLineage } from "../types-bws2RtKq.js";
1
+ import { a as LineageMetadata, c as LineageTable, d as ProjectsLineageResponse, f as TableLineageRelation, i as LineageConfiguration, l as ProjectLineageRelation, m as TablesLineageResponse, n as GetTablesLineageQuery, o as LineageProject, p as TablesLineage, r as LineageBucket, s as LineageSource, t as GetProjectsLineageQuery, u as ProjectsLineage } from "../types-dybUhlU2.js";
2
2
  export { GetProjectsLineageQuery, GetTablesLineageQuery, LineageBucket, LineageConfiguration, LineageMetadata, LineageProject, LineageSource, LineageTable, ProjectLineageRelation, ProjectsLineage, ProjectsLineageResponse, TableLineageRelation, TablesLineage, TablesLineageResponse };
@@ -1,4 +1,4 @@
1
- import { l as StorageToken } from "./types-CRYtdj5w.js";
1
+ import { l as StorageToken } from "./types-DuiUN0h8.js";
2
2
  import { t as Backend } from "./backends-DKBz5OxE.js";
3
3
  //#region src/domain/project.d.ts
4
4
  type Options = {
@@ -15,4 +15,4 @@ declare const createProject: ({ sapiToken }: Options) => {
15
15
  type Project = ReturnType<typeof createProject>;
16
16
  //#endregion
17
17
  export { hasAdminFeature as n, hasFeature as r, Project as t };
18
- //# sourceMappingURL=project-io1pY-hW.d.ts.map
18
+ //# sourceMappingURL=project-BOGaVs-q.d.ts.map
@@ -1,4 +1,4 @@
1
- import { l as StorageToken } from "./types-ISUNM_BR.cjs";
1
+ import { l as StorageToken } from "./types-GuWtMCMn.cjs";
2
2
  import { t as Backend } from "./backends-DKBz5OxE.cjs";
3
3
  //#region src/domain/project.d.ts
4
4
  type Options = {
@@ -15,4 +15,4 @@ declare const createProject: ({ sapiToken }: Options) => {
15
15
  type Project = ReturnType<typeof createProject>;
16
16
  //#endregion
17
17
  export { hasAdminFeature as n, hasFeature as r, Project as t };
18
- //# sourceMappingURL=project-CcGxXIW_.d.cts.map
18
+ //# sourceMappingURL=project-BnQkL8cb.d.cts.map
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_queryService = require("../queryService-CvqDqigW.cjs");
2
+ const require_queryService = require("../queryService-BLaGbpm-.cjs");
3
3
  exports.createQueryServiceClient = require_queryService.createQueryServiceClient;
@@ -1,2 +1,2 @@
1
- import { t as createQueryServiceClient } from "../index-DplMbm9E.cjs";
1
+ import { t as createQueryServiceClient } from "../index-Bjk-tCpG.cjs";
2
2
  export { createQueryServiceClient };
@@ -1,2 +1,2 @@
1
- import { t as createQueryServiceClient } from "../index-Dwp8tF6O.js";
1
+ import { t as createQueryServiceClient } from "../index-FhKX7Cv1.js";
2
2
  export { createQueryServiceClient };
@@ -1,2 +1,2 @@
1
- import { t as createQueryServiceClient } from "../queryService-BHV_OZI2.js";
1
+ import { t as createQueryServiceClient } from "../queryService-DK-jUnET.js";
2
2
  export { createQueryServiceClient };
@@ -1,2 +1,2 @@
1
- import { a as GetQueryJobPath, c as JobStatusResponse, d as PostQueryPath, f as QueryJobStatus, i as GetQueriesPath, l as PostCancelQueryJobPath, m as Statements, n as GetExportResultsQuery, o as GetQueryResultsPath, p as QueryResult, r as GetQueriesHistoryQuery, s as GetQueryResutsQuery, t as ExportResultsResponse, u as PostQueryBody } from "../types-CtdyAkzI.cjs";
1
+ import { a as GetQueryJobPath, c as JobStatusResponse, d as PostQueryPath, f as QueryJobStatus, i as GetQueriesPath, l as PostCancelQueryJobPath, m as Statements, n as GetExportResultsQuery, o as GetQueryResultsPath, p as QueryResult, r as GetQueriesHistoryQuery, s as GetQueryResutsQuery, t as ExportResultsResponse, u as PostQueryBody } from "../types-D1uloiuY.cjs";
2
2
  export { ExportResultsResponse, GetExportResultsQuery, GetQueriesHistoryQuery, GetQueriesPath, GetQueryJobPath, GetQueryResultsPath, GetQueryResutsQuery, JobStatusResponse, PostCancelQueryJobPath, PostQueryBody, PostQueryPath, QueryJobStatus, QueryResult, Statements };
@@ -1,2 +1,2 @@
1
- import { a as GetQueryJobPath, c as JobStatusResponse, d as PostQueryPath, f as QueryJobStatus, i as GetQueriesPath, l as PostCancelQueryJobPath, m as Statements, n as GetExportResultsQuery, o as GetQueryResultsPath, p as QueryResult, r as GetQueriesHistoryQuery, s as GetQueryResutsQuery, t as ExportResultsResponse, u as PostQueryBody } from "../types-x4xPlrr0.js";
1
+ import { a as GetQueryJobPath, c as JobStatusResponse, d as PostQueryPath, f as QueryJobStatus, i as GetQueriesPath, l as PostCancelQueryJobPath, m as Statements, n as GetExportResultsQuery, o as GetQueryResultsPath, p as QueryResult, r as GetQueriesHistoryQuery, s as GetQueryResutsQuery, t as ExportResultsResponse, u as PostQueryBody } from "../types-ByWD2oeV.js";
2
2
  export { ExportResultsResponse, GetExportResultsQuery, GetQueriesHistoryQuery, GetQueriesPath, GetQueryJobPath, GetQueryResultsPath, GetQueryResutsQuery, JobStatusResponse, PostCancelQueryJobPath, PostQueryBody, PostQueryPath, QueryJobStatus, QueryResult, Statements };
@@ -1,8 +1,8 @@
1
1
  const require_jobStatus = require("./jobStatus-kQ9JqF8t.cjs");
2
- const require_createFetchClient = require("./createFetchClient-BsG719K1.cjs");
3
- const require_createGenericFetchClient = require("./createGenericFetchClient-DLbjX0eM.cjs");
4
- const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-Cr90VXY4.cjs");
5
- const require_auth = require("./auth-5HCvCsZO.cjs");
2
+ const require_createFetchClient = require("./createFetchClient-BRfTjBLV.cjs");
3
+ const require_createGenericFetchClient = require("./createGenericFetchClient-DHs-i7_O.cjs");
4
+ const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-CyDUFxHB.cjs");
5
+ const require_auth = require("./auth-DP-6TFiM.cjs");
6
6
  //#region src/clients/queryService/poller.ts
7
7
  const DEFAULT_POLL_INTERVAL = 2e3;
8
8
  /**
@@ -116,4 +116,4 @@ Object.defineProperty(exports, "createQueryServiceClient", {
116
116
  }
117
117
  });
118
118
 
119
- //# sourceMappingURL=queryService-CvqDqigW.cjs.map
119
+ //# sourceMappingURL=queryService-BLaGbpm-.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"queryService-CvqDqigW.cjs","names":["poller","jobStatus","createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient","HttpHeader","parseContentDispositionHeader"],"sources":["../src/clients/queryService/poller.ts","../src/clients/queryService/queryServiceClient.ts"],"sourcesContent":["import { jobStatus } from '../../domain/jobStatus';\nimport { poller } from '../../utils/async';\n\nimport type { GetQueryJobPath, JobStatusResponse } from './types';\n\nconst DEFAULT_POLL_INTERVAL = 2000;\n\ntype QueryJobPollOptions = {\n interval?: number;\n maxAttempts?: number;\n timeout?: number;\n signal?: AbortSignal;\n};\n\ntype GetQueryJob = (\n queryJobId: GetQueryJobPath['queryJobId'],\n signal?: AbortSignal,\n) => Promise<JobStatusResponse>;\n\n/**\n * Waits on a query job.\n *\n * - Takes the job rather than its id, so a caller hands over what `createQueryJob` gave it.\n * - The request reads the id off the key rather than out of a closure, which is what makes the key\n * the whole input.\n * - Terminal is the job's own terminal set, not its statements': a `completed` job can still hold a\n * statement that failed, and what that means is the caller's business.\n */\nexport const createJobPoller =\n ({ getQueryJob }: { getQueryJob: GetQueryJob }) =>\n (\n { id }: { id: GetQueryJobPath['queryJobId'] },\n { interval, maxAttempts, timeout, signal }: QueryJobPollOptions = {},\n ) =>\n poller({\n pollKey: ['queryService.job', { queryJobId: id }] as const,\n pollFn: ({ pollKey: [, params], signal: pollSignal }) =>\n getQueryJob(params.queryJobId, pollSignal),\n until: ({ data }) => jobStatus.query.isTerminal(data.status),\n backoff: { type: 'constant', interval: interval ?? DEFAULT_POLL_INTERVAL },\n maxAttempts,\n timeout,\n signal,\n });\n","import {\n createGenericFetchClient,\n createOpenapiFetchClient,\n HttpHeader,\n parseContentDispositionHeader,\n} from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport { createJobPoller } from './poller';\nimport type {\n ExportResultsResponse,\n GetExportResultsQuery,\n GetQueriesHistoryQuery,\n GetQueriesPath,\n GetQueryJobPath,\n GetQueryResultsPath,\n GetQueryResutsQuery,\n PostCancelQueryJobPath,\n PostQueryBody,\n PostQueryPath,\n} from './types';\n\nexport const createQueryServiceClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const createQueryJob = async (\n branchId: PostQueryPath['branchId'],\n workspaceId: PostQueryPath['workspaceId'],\n body: PostQueryBody,\n ) => {\n const { data } = await client.post(\n '/api/v1/branches/{branchId}/workspaces/{workspaceId}/queries',\n { path: { branchId, workspaceId }, body },\n );\n\n return data;\n };\n\n const cancelQueryJob = async (queryJobId: PostCancelQueryJobPath['queryJobId']) => {\n const { data } = await client.post('/api/v1/queries/{queryJobId}/cancel', {\n path: { queryJobId },\n body: { reason: 'Cancelled by user' },\n });\n\n return data;\n };\n\n const getQueryJob = async (queryJobId: GetQueryJobPath['queryJobId'], signal?: AbortSignal) => {\n const { data } = await client.get(\n '/api/v1/queries/{queryJobId}',\n { path: { queryJobId } },\n { signal },\n );\n\n return data;\n };\n\n const getQueryResults = async (\n queryJobId: GetQueryResultsPath['queryJobId'],\n statementId: GetQueryResultsPath['statementId'],\n query?: GetQueryResutsQuery,\n ) => {\n const { data } = await client.get('/api/v1/queries/{queryJobId}/{statementId}/results', {\n path: { queryJobId, statementId },\n query,\n });\n\n return data;\n };\n\n const getQueryHistory = async (\n branchId: GetQueriesPath['branchId'],\n workspaceId: GetQueriesPath['workspaceId'],\n query?: GetQueriesHistoryQuery,\n ) => {\n const { data } = await client.get(\n '/api/v1/branches/{branchId}/workspaces/{workspaceId}/queries',\n {\n path: { branchId, workspaceId },\n query,\n },\n );\n\n return data;\n };\n\n const exportResults = async (\n queryJobId: GetQueryResultsPath['queryJobId'],\n statementId: GetQueryResultsPath['statementId'],\n query: GetExportResultsQuery,\n signal?: AbortSignal,\n ): Promise<ExportResultsResponse> => {\n const { data, response } = await client.get(\n '/api/v1/queries/{queryJobId}/{statementId}/export',\n {\n path: { queryJobId, statementId },\n query,\n },\n { signal },\n );\n\n const mimeType = response.headers.get(HttpHeader.CONTENT_TYPE) ?? 'text/csv';\n const contentDisposition = parseContentDispositionHeader(\n response.headers.get(HttpHeader.CONTENT_DISPOSITION),\n );\n\n return {\n mimeType,\n content: data,\n fileName: contentDisposition?.filename ?? 'export.csv',\n };\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n // Every wait on a query job is the same wait, so it is the client's rather than a caller's.\n const poller = createJobPoller({ getQueryJob });\n\n return {\n healthCheck,\n poller,\n createQueryJob,\n cancelQueryJob,\n getQueryJob,\n getQueryResults,\n getQueryHistory,\n exportResults,\n };\n};\n"],"mappings":";;;;;;AAKA,MAAM,wBAAwB;;;;;;;;;;AAuB9B,MAAa,mBACV,EAAE,mBAED,EAAE,MACF,EAAE,UAAU,aAAa,SAAS,WAAgC,CAAC,MAEnEA,kBAAAA,OAAO;CACL,SAAS,CAAC,oBAAoB,EAAE,YAAY,GAAG,CAAC;CAChD,SAAS,EAAE,SAAS,GAAG,SAAS,QAAQ,iBACtC,YAAY,OAAO,YAAY,UAAU;CAC3C,QAAQ,EAAE,WAAWC,kBAAAA,U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C;EACF,GACA,EAAE,OAAO,CACX;EAOA,OAAO;GACL,UANe,SAAS,QAAQ,IAAIC,0BAAAA,WAAW,YAAY,KAAK;GAOhE,SAAS;GACT,UAPyBC,0BAAAA,8BACzB,SAAS,QAAQ,IAAID,0BAAAA,WAAW,mBAAmB,CAMxB,CAAC,EAAE,YAAY;EAC5C;CACF;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAKA,OAAO;EACL;EACA,QAJa,gBAAgB,EAAE,YAAY,CAItC;EACL;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"queryService-BLaGbpm-.cjs","names":["poller","jobStatus","createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient","HttpHeader","parseContentDispositionHeader"],"sources":["../src/clients/queryService/poller.ts","../src/clients/queryService/queryServiceClient.ts"],"sourcesContent":["import { jobStatus } from '../../domain/jobStatus';\nimport { poller } from '../../utils/async';\n\nimport type { GetQueryJobPath, JobStatusResponse } from './types';\n\nconst DEFAULT_POLL_INTERVAL = 2000;\n\ntype QueryJobPollOptions = {\n interval?: number;\n maxAttempts?: number;\n timeout?: number;\n signal?: AbortSignal;\n};\n\ntype GetQueryJob = (\n queryJobId: GetQueryJobPath['queryJobId'],\n signal?: AbortSignal,\n) => Promise<JobStatusResponse>;\n\n/**\n * Waits on a query job.\n *\n * - Takes the job rather than its id, so a caller hands over what `createQueryJob` gave it.\n * - The request reads the id off the key rather than out of a closure, which is what makes the key\n * the whole input.\n * - Terminal is the job's own terminal set, not its statements': a `completed` job can still hold a\n * statement that failed, and what that means is the caller's business.\n */\nexport const createJobPoller =\n ({ getQueryJob }: { getQueryJob: GetQueryJob }) =>\n (\n { id }: { id: GetQueryJobPath['queryJobId'] },\n { interval, maxAttempts, timeout, signal }: QueryJobPollOptions = {},\n ) =>\n poller({\n pollKey: ['queryService.job', { queryJobId: id }] as const,\n pollFn: ({ pollKey: [, params], signal: pollSignal }) =>\n getQueryJob(params.queryJobId, pollSignal),\n until: ({ data }) => jobStatus.query.isTerminal(data.status),\n backoff: { type: 'constant', interval: interval ?? DEFAULT_POLL_INTERVAL },\n maxAttempts,\n timeout,\n signal,\n });\n","import {\n createGenericFetchClient,\n createOpenapiFetchClient,\n HttpHeader,\n parseContentDispositionHeader,\n} from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport { createJobPoller } from './poller';\nimport type {\n ExportResultsResponse,\n GetExportResultsQuery,\n GetQueriesHistoryQuery,\n GetQueriesPath,\n GetQueryJobPath,\n GetQueryResultsPath,\n GetQueryResutsQuery,\n PostCancelQueryJobPath,\n PostQueryBody,\n PostQueryPath,\n} from './types';\n\nexport const createQueryServiceClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const createQueryJob = async (\n branchId: PostQueryPath['branchId'],\n workspaceId: PostQueryPath['workspaceId'],\n body: PostQueryBody,\n ) => {\n const { data } = await client.post(\n '/api/v1/branches/{branchId}/workspaces/{workspaceId}/queries',\n { path: { branchId, workspaceId }, body },\n );\n\n return data;\n };\n\n const cancelQueryJob = async (queryJobId: PostCancelQueryJobPath['queryJobId']) => {\n const { data } = await client.post('/api/v1/queries/{queryJobId}/cancel', {\n path: { queryJobId },\n body: { reason: 'Cancelled by user' },\n });\n\n return data;\n };\n\n const getQueryJob = async (queryJobId: GetQueryJobPath['queryJobId'], signal?: AbortSignal) => {\n const { data } = await client.get(\n '/api/v1/queries/{queryJobId}',\n { path: { queryJobId } },\n { signal },\n );\n\n return data;\n };\n\n const getQueryResults = async (\n queryJobId: GetQueryResultsPath['queryJobId'],\n statementId: GetQueryResultsPath['statementId'],\n query?: GetQueryResutsQuery,\n ) => {\n const { data } = await client.get('/api/v1/queries/{queryJobId}/{statementId}/results', {\n path: { queryJobId, statementId },\n query,\n });\n\n return data;\n };\n\n const getQueryHistory = async (\n branchId: GetQueriesPath['branchId'],\n workspaceId: GetQueriesPath['workspaceId'],\n query?: GetQueriesHistoryQuery,\n ) => {\n const { data } = await client.get(\n '/api/v1/branches/{branchId}/workspaces/{workspaceId}/queries',\n {\n path: { branchId, workspaceId },\n query,\n },\n );\n\n return data;\n };\n\n const exportResults = async (\n queryJobId: GetQueryResultsPath['queryJobId'],\n statementId: GetQueryResultsPath['statementId'],\n query: GetExportResultsQuery,\n signal?: AbortSignal,\n ): Promise<ExportResultsResponse> => {\n const { data, response } = await client.get(\n '/api/v1/queries/{queryJobId}/{statementId}/export',\n {\n path: { queryJobId, statementId },\n query,\n },\n { signal },\n );\n\n const mimeType = response.headers.get(HttpHeader.CONTENT_TYPE) ?? 'text/csv';\n const contentDisposition = parseContentDispositionHeader(\n response.headers.get(HttpHeader.CONTENT_DISPOSITION),\n );\n\n return {\n mimeType,\n content: data,\n fileName: contentDisposition?.filename ?? 'export.csv',\n };\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n // Every wait on a query job is the same wait, so it is the client's rather than a caller's.\n const poller = createJobPoller({ getQueryJob });\n\n return {\n healthCheck,\n poller,\n createQueryJob,\n cancelQueryJob,\n getQueryJob,\n getQueryResults,\n getQueryHistory,\n exportResults,\n };\n};\n"],"mappings":";;;;;;AAKA,MAAM,wBAAwB;;;;;;;;;;AAuB9B,MAAa,mBACV,EAAE,mBAED,EAAE,MACF,EAAE,UAAU,aAAa,SAAS,WAAgC,CAAC,MAEnEA,kBAAAA,OAAO;CACL,SAAS,CAAC,oBAAoB,EAAE,YAAY,GAAG,CAAC;CAChD,SAAS,EAAE,SAAS,GAAG,SAAS,QAAQ,iBACtC,YAAY,OAAO,YAAY,UA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C,qDACA;GACE,MAAM;IAAE;IAAY;GAAY;GAChC;EACF,GACA,EAAE,OAAO,CACX;EAOA,OAAO;GACL,UANe,SAAS,QAAQ,IAAIC,0BAAAA,WAAW,YAAY,KAAK;GAOhE,SAAS;GACT,UAPyBC,0BAAAA,8BACzB,SAAS,QAAQ,IAAID,0BAAAA,WAAW,mBAAmB,CAMxB,CAAC,EAAE,YAAY;EAC5C;CACF;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAKA,OAAO;EACL;EACA,QAJa,gBAAgB,EAAE,YAAY,CAItC;EACL;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -1,8 +1,8 @@
1
1
  import { a as poller, t as jobStatus } from "./jobStatus-DbMupQEK.js";
2
- import { l as parseContentDispositionHeader, o as HttpHeader } from "./createFetchClient-BK0TZK-U.js";
3
- import { t as createGenericFetchClient } from "./createGenericFetchClient-CVZYekDk.js";
4
- import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-B5U1fCHS.js";
5
- import { t as createAuthHeaders } from "./auth-D2jfNlpX.js";
2
+ import { o as HttpHeader, u as parseContentDispositionHeader } from "./createFetchClient-BbG46bL0.js";
3
+ import { t as createGenericFetchClient } from "./createGenericFetchClient-BHYQLZhe.js";
4
+ import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-Bn6_Pn0H.js";
5
+ import { t as createAuthHeaders } from "./auth-DtbQaeDj.js";
6
6
  //#region src/clients/queryService/poller.ts
7
7
  const DEFAULT_POLL_INTERVAL = 2e3;
8
8
  /**
@@ -111,4 +111,4 @@ const createQueryServiceClient = ({ baseUrl, middlewares, auth }) => {
111
111
  //#endregion
112
112
  export { createQueryServiceClient as t };
113
113
 
114
- //# sourceMappingURL=queryService-BHV_OZI2.js.map
114
+ //# sourceMappingURL=queryService-DK-jUnET.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"queryService-BHV_OZI2.js","names":[],"sources":["../src/clients/queryService/poller.ts","../src/clients/queryService/queryServiceClient.ts"],"sourcesContent":["import { jobStatus } from '../../domain/jobStatus';\nimport { poller } from '../../utils/async';\n\nimport type { GetQueryJobPath, JobStatusResponse } from './types';\n\nconst DEFAULT_POLL_INTERVAL = 2000;\n\ntype QueryJobPollOptions = {\n interval?: number;\n maxAttempts?: number;\n timeout?: number;\n signal?: AbortSignal;\n};\n\ntype GetQueryJob = (\n queryJobId: GetQueryJobPath['queryJobId'],\n signal?: AbortSignal,\n) => Promise<JobStatusResponse>;\n\n/**\n * Waits on a query job.\n *\n * - Takes the job rather than its id, so a caller hands over what `createQueryJob` gave it.\n * - The request reads the id off the key rather than out of a closure, which is what makes the key\n * the whole input.\n * - Terminal is the job's own terminal set, not its statements': a `completed` job can still hold a\n * statement that failed, and what that means is the caller's business.\n */\nexport const createJobPoller =\n ({ getQueryJob }: { getQueryJob: GetQueryJob }) =>\n (\n { id }: { id: GetQueryJobPath['queryJobId'] },\n { interval, maxAttempts, timeout, signal }: QueryJobPollOptions = {},\n ) =>\n poller({\n pollKey: ['queryService.job', { queryJobId: id }] as const,\n pollFn: ({ pollKey: [, params], signal: pollSignal }) =>\n getQueryJob(params.queryJobId, pollSignal),\n until: ({ data }) => jobStatus.query.isTerminal(data.status),\n backoff: { type: 'constant', interval: interval ?? DEFAULT_POLL_INTERVAL },\n maxAttempts,\n timeout,\n signal,\n });\n","import {\n createGenericFetchClient,\n createOpenapiFetchClient,\n HttpHeader,\n parseContentDispositionHeader,\n} from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport { createJobPoller } from './poller';\nimport type {\n ExportResultsResponse,\n GetExportResultsQuery,\n GetQueriesHistoryQuery,\n GetQueriesPath,\n GetQueryJobPath,\n GetQueryResultsPath,\n GetQueryResutsQuery,\n PostCancelQueryJobPath,\n PostQueryBody,\n PostQueryPath,\n} from './types';\n\nexport const createQueryServiceClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const createQueryJob = async (\n branchId: PostQueryPath['branchId'],\n workspaceId: PostQueryPath['workspaceId'],\n body: PostQueryBody,\n ) => {\n const { data } = await client.post(\n '/api/v1/branches/{branchId}/workspaces/{workspaceId}/queries',\n { path: { branchId, workspaceId }, body },\n );\n\n return data;\n };\n\n const cancelQueryJob = async (queryJobId: PostCancelQueryJobPath['queryJobId']) => {\n const { data } = await client.post('/api/v1/queries/{queryJobId}/cancel', {\n path: { queryJobId },\n body: { reason: 'Cancelled by user' },\n });\n\n return data;\n };\n\n const getQueryJob = async (queryJobId: GetQueryJobPath['queryJobId'], signal?: AbortSignal) => {\n const { data } = await client.get(\n '/api/v1/queries/{queryJobId}',\n { path: { queryJobId } },\n { signal },\n );\n\n return data;\n };\n\n const getQueryResults = async (\n queryJobId: GetQueryResultsPath['queryJobId'],\n statementId: GetQueryResultsPath['statementId'],\n query?: GetQueryResutsQuery,\n ) => {\n const { data } = await client.get('/api/v1/queries/{queryJobId}/{statementId}/results', {\n path: { queryJobId, statementId },\n query,\n });\n\n return data;\n };\n\n const getQueryHistory = async (\n branchId: GetQueriesPath['branchId'],\n workspaceId: GetQueriesPath['workspaceId'],\n query?: GetQueriesHistoryQuery,\n ) => {\n const { data } = await client.get(\n '/api/v1/branches/{branchId}/workspaces/{workspaceId}/queries',\n {\n path: { branchId, workspaceId },\n query,\n },\n );\n\n return data;\n };\n\n const exportResults = async (\n queryJobId: GetQueryResultsPath['queryJobId'],\n statementId: GetQueryResultsPath['statementId'],\n query: GetExportResultsQuery,\n signal?: AbortSignal,\n ): Promise<ExportResultsResponse> => {\n const { data, response } = await client.get(\n '/api/v1/queries/{queryJobId}/{statementId}/export',\n {\n path: { queryJobId, statementId },\n query,\n },\n { signal },\n );\n\n const mimeType = response.headers.get(HttpHeader.CONTENT_TYPE) ?? 'text/csv';\n const contentDisposition = parseContentDispositionHeader(\n response.headers.get(HttpHeader.CONTENT_DISPOSITION),\n );\n\n return {\n mimeType,\n content: data,\n fileName: contentDisposition?.filename ?? 'export.csv',\n };\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n // Every wait on a query job is the same wait, so it is the client's rather than a caller's.\n const poller = createJobPoller({ getQueryJob });\n\n return {\n healthCheck,\n poller,\n createQueryJob,\n cancelQueryJob,\n getQueryJob,\n getQueryResults,\n getQueryHistory,\n exportResults,\n };\n};\n"],"mappings":";;;;;;AAKA,MAAM,wBAAwB;;;;;;;;;;AAuB9B,MAAa,mBACV,EAAE,mBAED,EAAE,MACF,EAAE,UAAU,aAAa,SAAS,WAAgC,CAAC,MAEnE,OAAO;CACL,SAAS,CAAC,oBAAoB,EAAE,YAAY,GAAG,CAAC;CAChD,SAAS,EAAE,SAAS,GAAG,SAAS,QAAQ,iBACtC,YAAY,OAAO,YAAY,UAAU;CAC3C,QAAQ,EAAE,WAAW,UAAU,MAAM,WAAW,KAAK,MAAM;CAC3D,SAAS;EAAE,MAAM;EAAY,UAAU,YAAY;CAAsB;CACzE;CACA;CACA;AACF,CAAC;;;ACnBL,MAAa,4BAA4B,EAAE,SAAS,aAAa,WAA8B;CAC7F,MAAM,SAAS,yBAAgC;EAC7C;EACA;EACA,SAAS,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgB,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,iBAAiB,OACrB,UACA,aACA,SACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,gEACA;GAAE,MAAM;IAAE;IAAU;GAAY;GAAG;EAAK,CAC1C;EAEA,OAAO;CACT;CAEA,MAAM,iBAAiB,OAAO,eAAqD;EACjF,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,uCAAuC;GACxE,MAAM,EAAE,WAAW;GACnB,MAAM,EAAE,QAAQ,oBAAoB;EACtC,CAAC;EAED,OAAO;CACT;CAEA,MAAM,cAAc,OAAO,YAA2C,WAAyB;EAC7F,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,gCACA,EAAE,MAAM,EAAE,WAAW,EAAE,GACvB,EAAE,OAAO,CACX;EAEA,OAAO;CACT;CAEA,MAAM,kBAAkB,OACtB,YACA,aACA,UACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sDAAsD;GACtF,MAAM;IAAE;IAAY;GAAY;GAChC;EACF,CAAC;EAED,OAAO;CACT;CAEA,MAAM,kBAAkB,OACtB,UACA,aACA,UACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,gEACA;GACE,MAAM;IAAE;IAAU;GAAY;GAC9B;EACF,CACF;EAEA,OAAO;CACT;CAEA,MAAM,gBAAgB,OACpB,YACA,aACA,OACA,WACmC;EACnC,MAAM,EAAE,MAAM,aAAa,MAAM,OAAO,IACtC,qDACA;GACE,MAAM;IAAE;IAAY;GAAY;GAChC;EACF,GACA,EAAE,OAAO,CACX;EAOA,OAAO;GACL,UANe,SAAS,QAAQ,IAAI,WAAW,YAAY,KAAK;GAOhE,SAAS;GACT,UAPyB,8BACzB,SAAS,QAAQ,IAAI,WAAW,mBAAmB,CAMxB,CAAC,EAAE,YAAY;EAC5C;CACF;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAKA,OAAO;EACL;EACA,QAJa,gBAAgB,EAAE,YAAY,CAItC;EACL;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"queryService-DK-jUnET.js","names":[],"sources":["../src/clients/queryService/poller.ts","../src/clients/queryService/queryServiceClient.ts"],"sourcesContent":["import { jobStatus } from '../../domain/jobStatus';\nimport { poller } from '../../utils/async';\n\nimport type { GetQueryJobPath, JobStatusResponse } from './types';\n\nconst DEFAULT_POLL_INTERVAL = 2000;\n\ntype QueryJobPollOptions = {\n interval?: number;\n maxAttempts?: number;\n timeout?: number;\n signal?: AbortSignal;\n};\n\ntype GetQueryJob = (\n queryJobId: GetQueryJobPath['queryJobId'],\n signal?: AbortSignal,\n) => Promise<JobStatusResponse>;\n\n/**\n * Waits on a query job.\n *\n * - Takes the job rather than its id, so a caller hands over what `createQueryJob` gave it.\n * - The request reads the id off the key rather than out of a closure, which is what makes the key\n * the whole input.\n * - Terminal is the job's own terminal set, not its statements': a `completed` job can still hold a\n * statement that failed, and what that means is the caller's business.\n */\nexport const createJobPoller =\n ({ getQueryJob }: { getQueryJob: GetQueryJob }) =>\n (\n { id }: { id: GetQueryJobPath['queryJobId'] },\n { interval, maxAttempts, timeout, signal }: QueryJobPollOptions = {},\n ) =>\n poller({\n pollKey: ['queryService.job', { queryJobId: id }] as const,\n pollFn: ({ pollKey: [, params], signal: pollSignal }) =>\n getQueryJob(params.queryJobId, pollSignal),\n until: ({ data }) => jobStatus.query.isTerminal(data.status),\n backoff: { type: 'constant', interval: interval ?? DEFAULT_POLL_INTERVAL },\n maxAttempts,\n timeout,\n signal,\n });\n","import {\n createGenericFetchClient,\n createOpenapiFetchClient,\n HttpHeader,\n parseContentDispositionHeader,\n} from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport { createJobPoller } from './poller';\nimport type {\n ExportResultsResponse,\n GetExportResultsQuery,\n GetQueriesHistoryQuery,\n GetQueriesPath,\n GetQueryJobPath,\n GetQueryResultsPath,\n GetQueryResutsQuery,\n PostCancelQueryJobPath,\n PostQueryBody,\n PostQueryPath,\n} from './types';\n\nexport const createQueryServiceClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const createQueryJob = async (\n branchId: PostQueryPath['branchId'],\n workspaceId: PostQueryPath['workspaceId'],\n body: PostQueryBody,\n ) => {\n const { data } = await client.post(\n '/api/v1/branches/{branchId}/workspaces/{workspaceId}/queries',\n { path: { branchId, workspaceId }, body },\n );\n\n return data;\n };\n\n const cancelQueryJob = async (queryJobId: PostCancelQueryJobPath['queryJobId']) => {\n const { data } = await client.post('/api/v1/queries/{queryJobId}/cancel', {\n path: { queryJobId },\n body: { reason: 'Cancelled by user' },\n });\n\n return data;\n };\n\n const getQueryJob = async (queryJobId: GetQueryJobPath['queryJobId'], signal?: AbortSignal) => {\n const { data } = await client.get(\n '/api/v1/queries/{queryJobId}',\n { path: { queryJobId } },\n { signal },\n );\n\n return data;\n };\n\n const getQueryResults = async (\n queryJobId: GetQueryResultsPath['queryJobId'],\n statementId: GetQueryResultsPath['statementId'],\n query?: GetQueryResutsQuery,\n ) => {\n const { data } = await client.get('/api/v1/queries/{queryJobId}/{statementId}/results', {\n path: { queryJobId, statementId },\n query,\n });\n\n return data;\n };\n\n const getQueryHistory = async (\n branchId: GetQueriesPath['branchId'],\n workspaceId: GetQueriesPath['workspaceId'],\n query?: GetQueriesHistoryQuery,\n ) => {\n const { data } = await client.get(\n '/api/v1/branches/{branchId}/workspaces/{workspaceId}/queries',\n {\n path: { branchId, workspaceId },\n query,\n },\n );\n\n return data;\n };\n\n const exportResults = async (\n queryJobId: GetQueryResultsPath['queryJobId'],\n statementId: GetQueryResultsPath['statementId'],\n query: GetExportResultsQuery,\n signal?: AbortSignal,\n ): Promise<ExportResultsResponse> => {\n const { data, response } = await client.get(\n '/api/v1/queries/{queryJobId}/{statementId}/export',\n {\n path: { queryJobId, statementId },\n query,\n },\n { signal },\n );\n\n const mimeType = response.headers.get(HttpHeader.CONTENT_TYPE) ?? 'text/csv';\n const contentDisposition = parseContentDispositionHeader(\n response.headers.get(HttpHeader.CONTENT_DISPOSITION),\n );\n\n return {\n mimeType,\n content: data,\n fileName: contentDisposition?.filename ?? 'export.csv',\n };\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n // Every wait on a query job is the same wait, so it is the client's rather than a caller's.\n const poller = createJobPoller({ getQueryJob });\n\n return {\n healthCheck,\n poller,\n createQueryJob,\n cancelQueryJob,\n getQueryJob,\n getQueryResults,\n getQueryHistory,\n exportResults,\n };\n};\n"],"mappings":";;;;;;AAKA,MAAM,wBAAwB;;;;;;;;;;AAuB9B,MAAa,mBACV,EAAE,mBAED,EAAE,MACF,EAAE,UAAU,aAAa,SAAS,WAAgC,CAAC,MAEnE,OAAO;CACL,SAAS,CAAC,oBAAoB,EAAE,YAAY,GAAG,CAAC;CAChD,SAAS,EAAE,SAAS,GAAG,SAAS,QAAQ,iBACtC,YAAY,OAAO,YAAY,UAAU;CAC3C,QAAQ,EAAE,WAAW,UAAU,MAAM,WAAW,KAAK,MAAM;CAC3D,SAAS;EAAE,MAAM;EAAY,UAAU,YAAY;CAAsB;CACzE;CACA;CACA;AACF,CAAC;;;ACnBL,MAAa,4BAA4B,EAAE,SAAS,aAAa,WAA8B;CAC7F,MAAM,SAAS,yBAAgC;EAC7C;EACA;EACA,SAAS,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgB,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,iBAAiB,OACrB,UACA,aACA,SACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,gEACA;GAAE,MAAM;IAAE;IAAU;GAAY;GAAG;EAAK,CAC1C;EAEA,OAAO;CACT;CAEA,MAAM,iBAAiB,OAAO,eAAqD;EACjF,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,uCAAuC;GACxE,MAAM,EAAE,WAAW;GACnB,MAAM,EAAE,QAAQ,oBAAoB;EACtC,CAAC;EAED,OAAO;CACT;CAEA,MAAM,cAAc,OAAO,YAA2C,WAAyB;EAC7F,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,gCACA,EAAE,MAAM,EAAE,WAAW,EAAE,GACvB,EAAE,OAAO,CACX;EAEA,OAAO;CACT;CAEA,MAAM,kBAAkB,OACtB,YACA,aACA,UACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sDAAsD;GACtF,MAAM;IAAE;IAAY;GAAY;GAChC;EACF,CAAC;EAED,OAAO;CACT;CAEA,MAAM,kBAAkB,OACtB,UACA,aACA,UACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,gEACA;GACE,MAAM;IAAE;IAAU;GAAY;GAC9B;EACF,CACF;EAEA,OAAO;CACT;CAEA,MAAM,gBAAgB,OACpB,YACA,aACA,OACA,WACmC;EACnC,MAAM,EAAE,MAAM,aAAa,MAAM,OAAO,IACtC,qDACA;GACE,MAAM;IAAE;IAAY;GAAY;GAChC;EACF,GACA,EAAE,OAAO,CACX;EAOA,OAAO;GACL,UANe,SAAS,QAAQ,IAAI,WAAW,YAAY,KAAK;GAOhE,SAAS;GACT,UAPyB,8BACzB,SAAS,QAAQ,IAAI,WAAW,mBAAmB,CAMxB,CAAC,EAAE,YAAY;EAC5C;CACF;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAKA,OAAO;EACL;EACA,QAJa,gBAAgB,EAAE,YAAY,CAItC;EACL;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_queue = require("../queue-CUHKupTA.cjs");
2
+ const require_queue = require("../queue-B7TY4JLf.cjs");
3
3
  exports.createQueueClient = require_queue.createQueueClient;
@@ -1,6 +1,6 @@
1
- import { ut as Poller } from "../index-DplMbm9E.cjs";
2
- import { n as ClientInitOptions } from "../types-C8XiTXxi.cjs";
3
- import { a as OrchestrationRerunPlanPath, c as SearchAllJobsQuery, d as SearchJobsQuery, l as SearchGroupedJobsQuery, n as GetQueueJobPath, p as components, r as KillJobPath, t as CreateJobBody } from "../types-CexuN7Mw.cjs";
1
+ import { ut as Poller } from "../index-Bjk-tCpG.cjs";
2
+ import { n as ClientInitOptions } from "../types-BREGN3qo.cjs";
3
+ import { a as OrchestrationRerunPlanPath, c as SearchAllJobsQuery, d as SearchJobsQuery, l as SearchGroupedJobsQuery, n as GetQueueJobPath, p as components, r as KillJobPath, t as CreateJobBody } from "../types-DNXC_-fA.cjs";
4
4
  //#region src/clients/queue/queueClient.d.ts
5
5
  declare const createQueueClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
6
6
  healthCheck: (signal?: AbortSignal) => Promise<unknown>;
@@ -1,6 +1,6 @@
1
- import { ut as Poller } from "../index-Dwp8tF6O.js";
2
- import { n as ClientInitOptions } from "../types-7H6Dnz0Y.js";
3
- import { a as OrchestrationRerunPlanPath, c as SearchAllJobsQuery, d as SearchJobsQuery, l as SearchGroupedJobsQuery, n as GetQueueJobPath, p as components, r as KillJobPath, t as CreateJobBody } from "../types-BD6czYPH.js";
1
+ import { ut as Poller } from "../index-FhKX7Cv1.js";
2
+ import { n as ClientInitOptions } from "../types-DwpRt3e9.js";
3
+ import { a as OrchestrationRerunPlanPath, c as SearchAllJobsQuery, d as SearchJobsQuery, l as SearchGroupedJobsQuery, n as GetQueueJobPath, p as components, r as KillJobPath, t as CreateJobBody } from "../types-De_DA2ga.js";
4
4
  //#region src/clients/queue/queueClient.d.ts
5
5
  declare const createQueueClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
6
6
  healthCheck: (signal?: AbortSignal) => Promise<unknown>;
@@ -1,2 +1,2 @@
1
- import { t as createQueueClient } from "../queue-uofE4Eu6.js";
1
+ import { t as createQueueClient } from "../queue-DViSQ-eq.js";
2
2
  export { createQueueClient };
@@ -1,2 +1,2 @@
1
- import { a as OrchestrationRerunPlanPath, c as SearchAllJobsQuery, d as SearchJobsQuery, f as SearchJobsResponse, i as OrchestrationRerunPlan, l as SearchGroupedJobsQuery, n as GetQueueJobPath, o as QueueJob, r as KillJobPath, s as QueueJobStatus, t as CreateJobBody, u as SearchGroupedJobsResponse } from "../types-CexuN7Mw.cjs";
1
+ import { a as OrchestrationRerunPlanPath, c as SearchAllJobsQuery, d as SearchJobsQuery, f as SearchJobsResponse, i as OrchestrationRerunPlan, l as SearchGroupedJobsQuery, n as GetQueueJobPath, o as QueueJob, r as KillJobPath, s as QueueJobStatus, t as CreateJobBody, u as SearchGroupedJobsResponse } from "../types-DNXC_-fA.cjs";
2
2
  export { CreateJobBody, GetQueueJobPath, KillJobPath, OrchestrationRerunPlan, OrchestrationRerunPlanPath, QueueJob, QueueJobStatus, SearchAllJobsQuery, SearchGroupedJobsQuery, SearchGroupedJobsResponse, SearchJobsQuery, SearchJobsResponse };
@@ -1,2 +1,2 @@
1
- import { a as OrchestrationRerunPlanPath, c as SearchAllJobsQuery, d as SearchJobsQuery, f as SearchJobsResponse, i as OrchestrationRerunPlan, l as SearchGroupedJobsQuery, n as GetQueueJobPath, o as QueueJob, r as KillJobPath, s as QueueJobStatus, t as CreateJobBody, u as SearchGroupedJobsResponse } from "../types-BD6czYPH.js";
1
+ import { a as OrchestrationRerunPlanPath, c as SearchAllJobsQuery, d as SearchJobsQuery, f as SearchJobsResponse, i as OrchestrationRerunPlan, l as SearchGroupedJobsQuery, n as GetQueueJobPath, o as QueueJob, r as KillJobPath, s as QueueJobStatus, t as CreateJobBody, u as SearchGroupedJobsResponse } from "../types-De_DA2ga.js";
2
2
  export { CreateJobBody, GetQueueJobPath, KillJobPath, OrchestrationRerunPlan, OrchestrationRerunPlanPath, QueueJob, QueueJobStatus, SearchAllJobsQuery, SearchGroupedJobsQuery, SearchGroupedJobsResponse, SearchJobsQuery, SearchJobsResponse };
@@ -1,7 +1,7 @@
1
1
  const require_jobStatus = require("./jobStatus-kQ9JqF8t.cjs");
2
- const require_createGenericFetchClient = require("./createGenericFetchClient-DLbjX0eM.cjs");
3
- const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-Cr90VXY4.cjs");
4
- const require_auth = require("./auth-5HCvCsZO.cjs");
2
+ const require_createGenericFetchClient = require("./createGenericFetchClient-DHs-i7_O.cjs");
3
+ const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-CyDUFxHB.cjs");
4
+ const require_auth = require("./auth-DP-6TFiM.cjs");
5
5
  //#region src/utils/async/collect.ts
6
6
  /**
7
7
  * Collects items from an offset-paginated endpoint — up to `limit` of them, or all of them when
@@ -134,4 +134,4 @@ Object.defineProperty(exports, "createQueueClient", {
134
134
  }
135
135
  });
136
136
 
137
- //# sourceMappingURL=queue-CUHKupTA.cjs.map
137
+ //# sourceMappingURL=queue-B7TY4JLf.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"queue-CUHKupTA.cjs","names":["createAbortError","poller","jobStatus","createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient"],"sources":["../src/utils/async/collect.ts","../src/clients/queue/poller.ts","../src/clients/queue/queueClient.ts"],"sourcesContent":["import { createAbortError } from '../createAbortError';\n\nexport type CollectOptions<T> = {\n fetchFrom: (offset: number, pageSize?: number, signal?: AbortSignal) => Promise<T[]>;\n pageSize?: number;\n limit?: number;\n signal?: AbortSignal;\n};\n\n/**\n * Collects items from an offset-paginated endpoint — up to `limit` of them, or all of them when\n * `limit` is omitted. Calls `fetchFrom` sequentially with the offset advancing by the number of\n * items received, and hands it `pageSize` so the request and the traversal agree on one value.\n *\n * Traversal ends on a page shorter than `pageSize`, or — when `pageSize` is omitted — only on an\n * empty page. Passing it therefore saves the trailing request, at the cost of stopping early if the\n * endpoint returns fewer items per page than asked for.\n */\nexport const collect = async <T>({\n fetchFrom,\n pageSize,\n limit,\n signal,\n}: CollectOptions<T>): Promise<T[]> => {\n if (signal?.aborted) throw createAbortError(signal.reason);\n if (limit !== undefined && limit < 0) throw new Error('Invalid collect limit');\n if (pageSize !== undefined && pageSize < 1) throw new Error('Invalid collect pageSize');\n\n const items: T[] = [];\n\n if (limit === 0) return items;\n\n let offset = 0;\n\n while (true) {\n const batch = await fetchFrom(offset, pageSize, signal);\n\n items.push(...batch);\n offset += batch.length;\n\n if (limit !== undefined && items.length >= limit) return items.slice(0, limit);\n if (pageSize === undefined ? batch.length === 0 : batch.length < pageSize) return items;\n }\n};\n","import { jobStatus } from '../../domain/jobStatus';\nimport { poller } from '../../utils/async';\n\nimport type { GetQueueJobPath, QueueJob } from './types';\n\nconst DEFAULT_POLL_INTERVAL = 2000;\n\ntype QueueJobPollOptions = {\n interval?: number;\n maxAttempts?: number;\n timeout?: number;\n signal?: AbortSignal;\n};\n\ntype GetJob = (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => Promise<QueueJob>;\n\n/**\n * Waits on a queue job.\n *\n * - Takes the job, not its id: the component is what makes a poll legible in dev tools, and only the\n * job carries it.\n * - The request reads the id off the key rather than out of a closure, which is what makes the key\n * the whole input.\n * - Terminal is terminal: a job that ended as `error` is a `done` poll carrying a failed job, and\n * what that means is the caller's business.\n */\nexport const createJobPoller =\n ({ getJob }: { getJob: GetJob }) =>\n (\n { id, component }: { id: GetQueueJobPath['jobId']; component: string },\n { interval, maxAttempts, timeout, signal }: QueueJobPollOptions = {},\n ) =>\n poller({\n pollKey: ['queue.job', { jobId: id, component }] as const,\n pollFn: ({ pollKey: [, params], signal: pollSignal }) => getJob(params.jobId, pollSignal),\n until: ({ data }) => jobStatus.queue.isTerminal(data.status),\n backoff: { type: 'constant', interval: interval ?? DEFAULT_POLL_INTERVAL },\n maxAttempts,\n timeout,\n signal,\n });\n","import { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { collect } from '../../utils';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport { createJobPoller } from './poller';\nimport type {\n CreateJobBody,\n GetQueueJobPath,\n KillJobPath,\n OrchestrationRerunPlanPath,\n SearchAllJobsQuery,\n SearchGroupedJobsQuery,\n SearchJobsQuery,\n} from './types';\n\nexport const createQueueClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const getJob = async (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => {\n const { data } = await client.get(\n '/jobs/{jobId}',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const searchJobs = async (query?: SearchJobsQuery, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/search/jobs',\n {\n query,\n },\n { signal },\n );\n\n return data;\n };\n\n const searchAllJobs = (query: SearchAllJobsQuery, signal?: AbortSignal) => {\n return collect({\n pageSize: query.limit,\n signal,\n fetchFrom: (offset, pageSize, batchSignal) => {\n return searchJobs({ ...query, limit: pageSize, offset }, batchSignal);\n },\n });\n };\n\n const createJob = async (body: CreateJobBody, signal?: AbortSignal) => {\n const { data } = await client.post('/jobs', { body }, { signal });\n\n return data;\n };\n\n const killJob = async (jobId: KillJobPath['jobId'], signal?: AbortSignal) => {\n const { data } = await client.post(\n '/jobs/{jobId}/kill',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const searchGroupedJobs = async (query: SearchGroupedJobsQuery, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/search/grouped-jobs',\n {\n query,\n },\n { signal },\n );\n\n return data;\n };\n\n const getOrchestrationRerunPlan = async (\n jobId: OrchestrationRerunPlanPath['jobId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/orchestration-rerun-plan/{jobId}',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n // Every wait on a queue job is the same wait, so it is the client's rather than a caller's.\n const poller = createJobPoller({ getJob });\n\n return {\n healthCheck,\n poller,\n getJob,\n searchJobs,\n searchAllJobs,\n createJob,\n killJob,\n searchGroupedJobs,\n getOrchestrationRerunPlan,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAa,UAAU,OAAU,EAC/B,WACA,UACA,OACA,aACqC;CACrC,IAAI,QAAQ,SAAS,MAAMA,kBAAAA,iBAAiB,OAAO,MAAM;CACzD,IAAI,UAAU,KAAA,KAAa,QAAQ,GAAG,MAAM,IAAI,MAAM,uBAAuB;CAC7E,IAAI,aAAa,KAAA,KAAa,WAAW,GAAG,MAAM,IAAI,MAAM,0BAA0B;CAEtF,MAAM,QAAa,CAAC;CAEpB,IAAI,UAAU,GAAG,OAAO;CAExB,IAAI,SAAS;CAEb,OAAO,MAAM;EACX,MAAM,QAAQ,MAAM,UAAU,QAAQ,UAAU,MAAM;EAEtD,MAAM,KAAK,GAAG,KAAK;EACnB,UAAU,MAAM;EAEhB,IAAI,UAAU,KAAA,KAAa,MAAM,UAAU,OAAO,OAAO,MAAM,MAAM,GAAG,KAAK;EAC7E,IAAI,aAAa,KAAA,IAAY,MAAM,WAAW,IAAI,MAAM,SAAS,UAAU,OAAO;CACpF;AACF;;;ACtCA,MAAM,wBAAwB;;;;;;;;;;;AAqB9B,MAAa,mBACV,EAAE,cAED,EAAE,IAAI,aACN,EAAE,UAAU,aAAa,SAAS,WAAgC,CAAC,MAEnEC,kBAAAA,OAAO;CACL,SAAS,CAAC,aAAa;EAAE,OAAO;EAAI;CAAU,CAAC;CAC/C,SAAS,EAAE,SAAS,GAAG,SAAS,QAAQ,iBAAiB,OAAO,OAAO,OAAO,UAAU;CACxF,QAAQ,EAAE,WAAWC,kBAAAA,UAAU,MAAM,WAAW,KAAK,MAAM;CAC3D,SAAS;EAAE,MAAM;EAAY,UAAU,YAAY;CAAsB;CACzE;CACA;CACA;AACF,CAAC;;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AAM,EAChB,GACA,EAAE,OAAO,CACX;EAEA,OAAO;CACT;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAKA,OAAO;EACL;EACA,QAJa,gBAAgB,EAAE,OAAO,CAIjC;EACL;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"queue-B7TY4JLf.cjs","names":["createAbortError","poller","jobStatus","createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient"],"sources":["../src/utils/async/collect.ts","../src/clients/queue/poller.ts","../src/clients/queue/queueClient.ts"],"sourcesContent":["import { createAbortError } from '../createAbortError';\n\nexport type CollectOptions<T> = {\n fetchFrom: (offset: number, pageSize?: number, signal?: AbortSignal) => Promise<T[]>;\n pageSize?: number;\n limit?: number;\n signal?: AbortSignal;\n};\n\n/**\n * Collects items from an offset-paginated endpoint — up to `limit` of them, or all of them when\n * `limit` is omitted. Calls `fetchFrom` sequentially with the offset advancing by the number of\n * items received, and hands it `pageSize` so the request and the traversal agree on one value.\n *\n * Traversal ends on a page shorter than `pageSize`, or — when `pageSize` is omitted — only on an\n * empty page. Passing it therefore saves the trailing request, at the cost of stopping early if the\n * endpoint returns fewer items per page than asked for.\n */\nexport const collect = async <T>({\n fetchFrom,\n pageSize,\n limit,\n signal,\n}: CollectOptions<T>): Promise<T[]> => {\n if (signal?.aborted) throw createAbortError(signal.reason);\n if (limit !== undefined && limit < 0) throw new Error('Invalid collect limit');\n if (pageSize !== undefined && pageSize < 1) throw new Error('Invalid collect pageSize');\n\n const items: T[] = [];\n\n if (limit === 0) return items;\n\n let offset = 0;\n\n while (true) {\n const batch = await fetchFrom(offset, pageSize, signal);\n\n items.push(...batch);\n offset += batch.length;\n\n if (limit !== undefined && items.length >= limit) return items.slice(0, limit);\n if (pageSize === undefined ? batch.length === 0 : batch.length < pageSize) return items;\n }\n};\n","import { jobStatus } from '../../domain/jobStatus';\nimport { poller } from '../../utils/async';\n\nimport type { GetQueueJobPath, QueueJob } from './types';\n\nconst DEFAULT_POLL_INTERVAL = 2000;\n\ntype QueueJobPollOptions = {\n interval?: number;\n maxAttempts?: number;\n timeout?: number;\n signal?: AbortSignal;\n};\n\ntype GetJob = (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => Promise<QueueJob>;\n\n/**\n * Waits on a queue job.\n *\n * - Takes the job, not its id: the component is what makes a poll legible in dev tools, and only the\n * job carries it.\n * - The request reads the id off the key rather than out of a closure, which is what makes the key\n * the whole input.\n * - Terminal is terminal: a job that ended as `error` is a `done` poll carrying a failed job, and\n * what that means is the caller's business.\n */\nexport const createJobPoller =\n ({ getJob }: { getJob: GetJob }) =>\n (\n { id, component }: { id: GetQueueJobPath['jobId']; component: string },\n { interval, maxAttempts, timeout, signal }: QueueJobPollOptions = {},\n ) =>\n poller({\n pollKey: ['queue.job', { jobId: id, component }] as const,\n pollFn: ({ pollKey: [, params], signal: pollSignal }) => getJob(params.jobId, pollSignal),\n until: ({ data }) => jobStatus.queue.isTerminal(data.status),\n backoff: { type: 'constant', interval: interval ?? DEFAULT_POLL_INTERVAL },\n maxAttempts,\n timeout,\n signal,\n });\n","import { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { collect } from '../../utils';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport { createJobPoller } from './poller';\nimport type {\n CreateJobBody,\n GetQueueJobPath,\n KillJobPath,\n OrchestrationRerunPlanPath,\n SearchAllJobsQuery,\n SearchGroupedJobsQuery,\n SearchJobsQuery,\n} from './types';\n\nexport const createQueueClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const getJob = async (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => {\n const { data } = await client.get(\n '/jobs/{jobId}',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const searchJobs = async (query?: SearchJobsQuery, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/search/jobs',\n {\n query,\n },\n { signal },\n );\n\n return data;\n };\n\n const searchAllJobs = (query: SearchAllJobsQuery, signal?: AbortSignal) => {\n return collect({\n pageSize: query.limit,\n signal,\n fetchFrom: (offset, pageSize, batchSignal) => {\n return searchJobs({ ...query, limit: pageSize, offset }, batchSignal);\n },\n });\n };\n\n const createJob = async (body: CreateJobBody, signal?: AbortSignal) => {\n const { data } = await client.post('/jobs', { body }, { signal });\n\n return data;\n };\n\n const killJob = async (jobId: KillJobPath['jobId'], signal?: AbortSignal) => {\n const { data } = await client.post(\n '/jobs/{jobId}/kill',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const searchGroupedJobs = async (query: SearchGroupedJobsQuery, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/search/grouped-jobs',\n {\n query,\n },\n { signal },\n );\n\n return data;\n };\n\n const getOrchestrationRerunPlan = async (\n jobId: OrchestrationRerunPlanPath['jobId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/orchestration-rerun-plan/{jobId}',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n // Every wait on a queue job is the same wait, so it is the client's rather than a caller's.\n const poller = createJobPoller({ getJob });\n\n return {\n healthCheck,\n poller,\n getJob,\n searchJobs,\n searchAllJobs,\n createJob,\n killJob,\n searchGroupedJobs,\n getOrchestrationRerunPlan,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAa,UAAU,OAAU,EAC/B,WACA,UACA,OACA,aACqC;CACrC,IAAI,QAAQ,SAAS,MAAMA,kBAAAA,iBA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  import { a as poller, f as createAbortError, t as jobStatus } from "./jobStatus-DbMupQEK.js";
2
- import { t as createGenericFetchClient } from "./createGenericFetchClient-CVZYekDk.js";
3
- import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-B5U1fCHS.js";
4
- import { t as createAuthHeaders } from "./auth-D2jfNlpX.js";
2
+ import { t as createGenericFetchClient } from "./createGenericFetchClient-BHYQLZhe.js";
3
+ import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-Bn6_Pn0H.js";
4
+ import { t as createAuthHeaders } from "./auth-DtbQaeDj.js";
5
5
  //#region src/utils/async/collect.ts
6
6
  /**
7
7
  * Collects items from an offset-paginated endpoint — up to `limit` of them, or all of them when
@@ -123,4 +123,4 @@ const createQueueClient = ({ baseUrl, middlewares, auth }) => {
123
123
  //#endregion
124
124
  export { collect as n, createQueueClient as t };
125
125
 
126
- //# sourceMappingURL=queue-uofE4Eu6.js.map
126
+ //# sourceMappingURL=queue-DViSQ-eq.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"queue-uofE4Eu6.js","names":[],"sources":["../src/utils/async/collect.ts","../src/clients/queue/poller.ts","../src/clients/queue/queueClient.ts"],"sourcesContent":["import { createAbortError } from '../createAbortError';\n\nexport type CollectOptions<T> = {\n fetchFrom: (offset: number, pageSize?: number, signal?: AbortSignal) => Promise<T[]>;\n pageSize?: number;\n limit?: number;\n signal?: AbortSignal;\n};\n\n/**\n * Collects items from an offset-paginated endpoint — up to `limit` of them, or all of them when\n * `limit` is omitted. Calls `fetchFrom` sequentially with the offset advancing by the number of\n * items received, and hands it `pageSize` so the request and the traversal agree on one value.\n *\n * Traversal ends on a page shorter than `pageSize`, or — when `pageSize` is omitted — only on an\n * empty page. Passing it therefore saves the trailing request, at the cost of stopping early if the\n * endpoint returns fewer items per page than asked for.\n */\nexport const collect = async <T>({\n fetchFrom,\n pageSize,\n limit,\n signal,\n}: CollectOptions<T>): Promise<T[]> => {\n if (signal?.aborted) throw createAbortError(signal.reason);\n if (limit !== undefined && limit < 0) throw new Error('Invalid collect limit');\n if (pageSize !== undefined && pageSize < 1) throw new Error('Invalid collect pageSize');\n\n const items: T[] = [];\n\n if (limit === 0) return items;\n\n let offset = 0;\n\n while (true) {\n const batch = await fetchFrom(offset, pageSize, signal);\n\n items.push(...batch);\n offset += batch.length;\n\n if (limit !== undefined && items.length >= limit) return items.slice(0, limit);\n if (pageSize === undefined ? batch.length === 0 : batch.length < pageSize) return items;\n }\n};\n","import { jobStatus } from '../../domain/jobStatus';\nimport { poller } from '../../utils/async';\n\nimport type { GetQueueJobPath, QueueJob } from './types';\n\nconst DEFAULT_POLL_INTERVAL = 2000;\n\ntype QueueJobPollOptions = {\n interval?: number;\n maxAttempts?: number;\n timeout?: number;\n signal?: AbortSignal;\n};\n\ntype GetJob = (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => Promise<QueueJob>;\n\n/**\n * Waits on a queue job.\n *\n * - Takes the job, not its id: the component is what makes a poll legible in dev tools, and only the\n * job carries it.\n * - The request reads the id off the key rather than out of a closure, which is what makes the key\n * the whole input.\n * - Terminal is terminal: a job that ended as `error` is a `done` poll carrying a failed job, and\n * what that means is the caller's business.\n */\nexport const createJobPoller =\n ({ getJob }: { getJob: GetJob }) =>\n (\n { id, component }: { id: GetQueueJobPath['jobId']; component: string },\n { interval, maxAttempts, timeout, signal }: QueueJobPollOptions = {},\n ) =>\n poller({\n pollKey: ['queue.job', { jobId: id, component }] as const,\n pollFn: ({ pollKey: [, params], signal: pollSignal }) => getJob(params.jobId, pollSignal),\n until: ({ data }) => jobStatus.queue.isTerminal(data.status),\n backoff: { type: 'constant', interval: interval ?? DEFAULT_POLL_INTERVAL },\n maxAttempts,\n timeout,\n signal,\n });\n","import { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { collect } from '../../utils';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport { createJobPoller } from './poller';\nimport type {\n CreateJobBody,\n GetQueueJobPath,\n KillJobPath,\n OrchestrationRerunPlanPath,\n SearchAllJobsQuery,\n SearchGroupedJobsQuery,\n SearchJobsQuery,\n} from './types';\n\nexport const createQueueClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const getJob = async (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => {\n const { data } = await client.get(\n '/jobs/{jobId}',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const searchJobs = async (query?: SearchJobsQuery, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/search/jobs',\n {\n query,\n },\n { signal },\n );\n\n return data;\n };\n\n const searchAllJobs = (query: SearchAllJobsQuery, signal?: AbortSignal) => {\n return collect({\n pageSize: query.limit,\n signal,\n fetchFrom: (offset, pageSize, batchSignal) => {\n return searchJobs({ ...query, limit: pageSize, offset }, batchSignal);\n },\n });\n };\n\n const createJob = async (body: CreateJobBody, signal?: AbortSignal) => {\n const { data } = await client.post('/jobs', { body }, { signal });\n\n return data;\n };\n\n const killJob = async (jobId: KillJobPath['jobId'], signal?: AbortSignal) => {\n const { data } = await client.post(\n '/jobs/{jobId}/kill',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const searchGroupedJobs = async (query: SearchGroupedJobsQuery, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/search/grouped-jobs',\n {\n query,\n },\n { signal },\n );\n\n return data;\n };\n\n const getOrchestrationRerunPlan = async (\n jobId: OrchestrationRerunPlanPath['jobId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/orchestration-rerun-plan/{jobId}',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n // Every wait on a queue job is the same wait, so it is the client's rather than a caller's.\n const poller = createJobPoller({ getJob });\n\n return {\n healthCheck,\n poller,\n getJob,\n searchJobs,\n searchAllJobs,\n createJob,\n killJob,\n searchGroupedJobs,\n getOrchestrationRerunPlan,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAa,UAAU,OAAU,EAC/B,WACA,UACA,OACA,aACqC;CACrC,IAAI,QAAQ,SAAS,MAAM,iBAAiB,OAAO,MAAM;CACzD,IAAI,UAAU,KAAA,KAAa,QAAQ,GAAG,MAAM,IAAI,MAAM,uBAAuB;CAC7E,IAAI,aAAa,KAAA,KAAa,WAAW,GAAG,MAAM,IAAI,MAAM,0BAA0B;CAEtF,MAAM,QAAa,CAAC;CAEpB,IAAI,UAAU,GAAG,OAAO;CAExB,IAAI,SAAS;CAEb,OAAO,MAAM;EACX,MAAM,QAAQ,MAAM,UAAU,QAAQ,UAAU,MAAM;EAEtD,MAAM,KAAK,GAAG,KAAK;EACnB,UAAU,MAAM;EAEhB,IAAI,UAAU,KAAA,KAAa,MAAM,UAAU,OAAO,OAAO,MAAM,MAAM,GAAG,KAAK;EAC7E,IAAI,aAAa,KAAA,IAAY,MAAM,WAAW,IAAI,MAAM,SAAS,UAAU,OAAO;CACpF;AACF;;;ACtCA,MAAM,wBAAwB;;;;;;;;;;;AAqB9B,MAAa,mBACV,EAAE,cAED,EAAE,IAAI,aACN,EAAE,UAAU,aAAa,SAAS,WAAgC,CAAC,MAEnE,OAAO;CACL,SAAS,CAAC,aAAa;EAAE,OAAO;EAAI;CAAU,CAAC;CAC/C,SAAS,EAAE,SAAS,GAAG,SAAS,QAAQ,iBAAiB,OAAO,OAAO,OAAO,UAAU;CACxF,QAAQ,EAAE,WAAW,UAAU,MAAM,WAAW,KAAK,MAAM;CAC3D,SAAS;EAAE,MAAM;EAAY,UAAU,YAAY;CAAsB;CACzE;CACA;CACA;AACF,CAAC;;;ACvBL,MAAa,qBAAqB,EAAE,SAAS,aAAa,WAA8B;C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AAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAKA,OAAO;EACL;EACA,QAJa,gBAAgB,EAAE,OAAO,CAIjC;EACL;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"queue-DViSQ-eq.js","names":[],"sources":["../src/utils/async/collect.ts","../src/clients/queue/poller.ts","../src/clients/queue/queueClient.ts"],"sourcesContent":["import { createAbortError } from '../createAbortError';\n\nexport type CollectOptions<T> = {\n fetchFrom: (offset: number, pageSize?: number, signal?: AbortSignal) => Promise<T[]>;\n pageSize?: number;\n limit?: number;\n signal?: AbortSignal;\n};\n\n/**\n * Collects items from an offset-paginated endpoint — up to `limit` of them, or all of them when\n * `limit` is omitted. Calls `fetchFrom` sequentially with the offset advancing by the number of\n * items received, and hands it `pageSize` so the request and the traversal agree on one value.\n *\n * Traversal ends on a page shorter than `pageSize`, or — when `pageSize` is omitted — only on an\n * empty page. Passing it therefore saves the trailing request, at the cost of stopping early if the\n * endpoint returns fewer items per page than asked for.\n */\nexport const collect = async <T>({\n fetchFrom,\n pageSize,\n limit,\n signal,\n}: CollectOptions<T>): Promise<T[]> => {\n if (signal?.aborted) throw createAbortError(signal.reason);\n if (limit !== undefined && limit < 0) throw new Error('Invalid collect limit');\n if (pageSize !== undefined && pageSize < 1) throw new Error('Invalid collect pageSize');\n\n const items: T[] = [];\n\n if (limit === 0) return items;\n\n let offset = 0;\n\n while (true) {\n const batch = await fetchFrom(offset, pageSize, signal);\n\n items.push(...batch);\n offset += batch.length;\n\n if (limit !== undefined && items.length >= limit) return items.slice(0, limit);\n if (pageSize === undefined ? batch.length === 0 : batch.length < pageSize) return items;\n }\n};\n","import { jobStatus } from '../../domain/jobStatus';\nimport { poller } from '../../utils/async';\n\nimport type { GetQueueJobPath, QueueJob } from './types';\n\nconst DEFAULT_POLL_INTERVAL = 2000;\n\ntype QueueJobPollOptions = {\n interval?: number;\n maxAttempts?: number;\n timeout?: number;\n signal?: AbortSignal;\n};\n\ntype GetJob = (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => Promise<QueueJob>;\n\n/**\n * Waits on a queue job.\n *\n * - Takes the job, not its id: the component is what makes a poll legible in dev tools, and only the\n * job carries it.\n * - The request reads the id off the key rather than out of a closure, which is what makes the key\n * the whole input.\n * - Terminal is terminal: a job that ended as `error` is a `done` poll carrying a failed job, and\n * what that means is the caller's business.\n */\nexport const createJobPoller =\n ({ getJob }: { getJob: GetJob }) =>\n (\n { id, component }: { id: GetQueueJobPath['jobId']; component: string },\n { interval, maxAttempts, timeout, signal }: QueueJobPollOptions = {},\n ) =>\n poller({\n pollKey: ['queue.job', { jobId: id, component }] as const,\n pollFn: ({ pollKey: [, params], signal: pollSignal }) => getJob(params.jobId, pollSignal),\n until: ({ data }) => jobStatus.queue.isTerminal(data.status),\n backoff: { type: 'constant', interval: interval ?? DEFAULT_POLL_INTERVAL },\n maxAttempts,\n timeout,\n signal,\n });\n","import { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { collect } from '../../utils';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport { createJobPoller } from './poller';\nimport type {\n CreateJobBody,\n GetQueueJobPath,\n KillJobPath,\n OrchestrationRerunPlanPath,\n SearchAllJobsQuery,\n SearchGroupedJobsQuery,\n SearchJobsQuery,\n} from './types';\n\nexport const createQueueClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const getJob = async (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => {\n const { data } = await client.get(\n '/jobs/{jobId}',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const searchJobs = async (query?: SearchJobsQuery, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/search/jobs',\n {\n query,\n },\n { signal },\n );\n\n return data;\n };\n\n const searchAllJobs = (query: SearchAllJobsQuery, signal?: AbortSignal) => {\n return collect({\n pageSize: query.limit,\n signal,\n fetchFrom: (offset, pageSize, batchSignal) => {\n return searchJobs({ ...query, limit: pageSize, offset }, batchSignal);\n },\n });\n };\n\n const createJob = async (body: CreateJobBody, signal?: AbortSignal) => {\n const { data } = await client.post('/jobs', { body }, { signal });\n\n return data;\n };\n\n const killJob = async (jobId: KillJobPath['jobId'], signal?: AbortSignal) => {\n const { data } = await client.post(\n '/jobs/{jobId}/kill',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const searchGroupedJobs = async (query: SearchGroupedJobsQuery, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/search/grouped-jobs',\n {\n query,\n },\n { signal },\n );\n\n return data;\n };\n\n const getOrchestrationRerunPlan = async (\n jobId: OrchestrationRerunPlanPath['jobId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/orchestration-rerun-plan/{jobId}',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n // Every wait on a queue job is the same wait, so it is the client's rather than a caller's.\n const poller = createJobPoller({ getJob });\n\n return {\n healthCheck,\n poller,\n getJob,\n searchJobs,\n searchAllJobs,\n createJob,\n killJob,\n searchGroupedJobs,\n getOrchestrationRerunPlan,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAa,UAAU,OAAU,EAC/B,WACA,UACA,OACA,aACqC;CACrC,IAAI,QAAQ,SAAS,MAAM,iBAAiB,OAAO,MAAM;CACzD,IAAI,UAAU,KAAA,KAAa,QAAQ,GAAG,MAAM,IAAI,MAAM,uBAAuB;CAC7E,IAAI,aAAa,KAAA,KAAa,WAAW,GAAG,MAAM,IAAI,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;CACT;CAEA,MAAM,iBAAiB,OAA2B,WAAyB;EACzE,OAAO,QAAQ;GACb,UAAU,MAAM;GAChB;GACA,YAAY,QAAQ,UAAU,gBAAgB;IAC5C,OAAO,WAAW;KAAE,GAAG;KAAO,OAAO;KAAU;IAAO,GAAG,WAAW;GACtE;EACF,CAAC;CACH;CAEA,MAAM,YAAY,OAAO,MAAqB,WAAyB;EACrE,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,OAAO,CAAC;EAEhE,OAAO;CACT;CAEA,MAAM,UAAU,OAAO,OAA6B,WAAyB;EAC3E,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,sBACA,EACE,MAAM,EAAE,MAAM,EAChB,GACA,EAAE,OAAO,CACX;EAEA,OAAO;CACT;CAEA,MAAM,oBAAoB,OAAO,OAA+B,WAAyB;EACvF,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,wBACA,EACE,MACF,GACA,EAAE,OAAO,CACX;EAEA,OAAO;CACT;CAEA,MAAM,4BAA4B,OAChC,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,qCACA,EACE,MAAM,EAAE,MAAM,EAChB,GACA,EAAE,OAAO,CACX;EAEA,OAAO;CACT;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAKA,OAAO;EACL;EACA,QAJa,gBAAgB,EAAE,OAAO,CAIjC;EACL;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_concurrent = require("../concurrent-tbiIa0UL.cjs");
3
- const require_createGenericFetchClient = require("../createGenericFetchClient-DLbjX0eM.cjs");
4
- const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-Cr90VXY4.cjs");
5
- const require_auth = require("../auth-5HCvCsZO.cjs");
3
+ const require_createGenericFetchClient = require("../createGenericFetchClient-DHs-i7_O.cjs");
4
+ const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-CyDUFxHB.cjs");
5
+ const require_auth = require("../auth-DP-6TFiM.cjs");
6
6
  //#region src/clients/scheduler/schedulerClient.ts
7
7
  const createSchedulerClient = ({ baseUrl, middlewares, auth }) => {
8
8
  const client = require_createOpenapiFetchClient.createOpenapiFetchClient({
@@ -1,5 +1,5 @@
1
- import { n as ClientInitOptions } from "../types-C8XiTXxi.cjs";
2
- import { a as SchedulePath, n as ConfigurationPath, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-BefwoXik.cjs";
1
+ import { n as ClientInitOptions } from "../types-BREGN3qo.cjs";
2
+ import { a as SchedulePath, n as ConfigurationPath, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-C1vhYcic.cjs";
3
3
  //#region src/clients/scheduler/schedulerClient.d.ts
4
4
  declare const createSchedulerClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
5
5
  healthCheck: (signal?: AbortSignal) => Promise<unknown>;
@@ -1,5 +1,5 @@
1
- import { n as ClientInitOptions } from "../types-7H6Dnz0Y.js";
2
- import { a as SchedulePath, n as ConfigurationPath, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-B1S2H7q1.js";
1
+ import { n as ClientInitOptions } from "../types-DwpRt3e9.js";
2
+ import { a as SchedulePath, n as ConfigurationPath, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-BTbczawY.js";
3
3
  //#region src/clients/scheduler/schedulerClient.d.ts
4
4
  declare const createSchedulerClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
5
5
  healthCheck: (signal?: AbortSignal) => Promise<unknown>;
@@ -1,7 +1,7 @@
1
1
  import { t as concurrent } from "../concurrent-CH9fbNr3.js";
2
- import { t as createGenericFetchClient } from "../createGenericFetchClient-CVZYekDk.js";
3
- import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-B5U1fCHS.js";
4
- import { t as createAuthHeaders } from "../auth-D2jfNlpX.js";
2
+ import { t as createGenericFetchClient } from "../createGenericFetchClient-BHYQLZhe.js";
3
+ import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-Bn6_Pn0H.js";
4
+ import { t as createAuthHeaders } from "../auth-DtbQaeDj.js";
5
5
  //#region src/clients/scheduler/schedulerClient.ts
6
6
  const createSchedulerClient = ({ baseUrl, middlewares, auth }) => {
7
7
  const client = createOpenapiFetchClient({
@@ -1,2 +1,2 @@
1
- import { a as SchedulePath, i as Schedule, n as ConfigurationPath, o as Schedules, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-BefwoXik.cjs";
1
+ import { a as SchedulePath, i as Schedule, n as ConfigurationPath, o as Schedules, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-C1vhYcic.cjs";
2
2
  export { ActivateScheduleBody, ConfigurationPath, GetSchedulesQuery, Schedule, SchedulePath, Schedules };
@@ -1,2 +1,2 @@
1
- import { a as SchedulePath, i as Schedule, n as ConfigurationPath, o as Schedules, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-B1S2H7q1.js";
1
+ import { a as SchedulePath, i as Schedule, n as ConfigurationPath, o as Schedules, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-BTbczawY.js";
2
2
  export { ActivateScheduleBody, ConfigurationPath, GetSchedulesQuery, Schedule, SchedulePath, Schedules };