@keboola/api-client 46.0.0 → 47.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 (462) hide show
  1. package/AGENTS.md +86 -21
  2. package/API-SURFACE.md +49 -29
  3. package/CHANGELOG.md +54 -0
  4. package/README.md +47 -37
  5. package/dist/{ManagementSessionMintError-5FFyvBZi.js → ManagementSessionMintError-4Pkn5Oob.js} +2 -2
  6. package/dist/{ManagementSessionMintError-5FFyvBZi.js.map → ManagementSessionMintError-4Pkn5Oob.js.map} +1 -1
  7. package/dist/{ManagementSessionMintError-Bm8s6yDB.cjs → ManagementSessionMintError-Cu9beG7j.cjs} +2 -2
  8. package/dist/{ManagementSessionMintError-Bm8s6yDB.cjs.map → ManagementSessionMintError-Cu9beG7j.cjs.map} +1 -1
  9. package/dist/QueryJobError-ZZZ043Nm.js +22 -0
  10. package/dist/QueryJobError-ZZZ043Nm.js.map +1 -0
  11. package/dist/{QueryJobTimeoutError-CVNPdCWX.cjs → QueryJobError-irGiP5zh.cjs} +1 -29
  12. package/dist/QueryJobError-irGiP5zh.cjs.map +1 -0
  13. package/dist/QueueJobError-6qSEizWo.cjs +30 -0
  14. package/dist/QueueJobError-6qSEizWo.cjs.map +1 -0
  15. package/dist/QueueJobError-8bThS_Mc.js +19 -0
  16. package/dist/QueueJobError-8bThS_Mc.js.map +1 -0
  17. package/dist/adminRoles-B40yBcmq.js.map +1 -1
  18. package/dist/adminRoles-CO7J5qAy.cjs.map +1 -1
  19. package/dist/{adminRoles-C696kD_U.d.cts → adminRoles-CvdIUkiC.d.ts} +4 -2
  20. package/dist/{adminRoles-C696kD_U.d.ts → adminRoles-DGM8SuuF.d.cts} +4 -2
  21. package/dist/ai/index.cjs +2 -2
  22. package/dist/ai/index.d.cts +2 -2
  23. package/dist/ai/index.d.ts +2 -2
  24. package/dist/ai/index.js +2 -2
  25. package/dist/ai/types.d.cts +1 -1
  26. package/dist/ai/types.d.ts +1 -1
  27. package/dist/{appLogs-BG9ueGxA.cjs → appLogs-Cix2KWra.cjs} +2 -2
  28. package/dist/{appLogs-BG9ueGxA.cjs.map → appLogs-Cix2KWra.cjs.map} +1 -1
  29. package/dist/{appLogs-Dl0v684o.d.cts → appLogs-Cxhm2Rkn.d.cts} +2 -2
  30. package/dist/{appLogs-CEKz68bE.js → appLogs-KslK7qHr.js} +2 -2
  31. package/dist/{appLogs-CEKz68bE.js.map → appLogs-KslK7qHr.js.map} +1 -1
  32. package/dist/{appLogs-DGIctwbb.d.ts → appLogs-xW0-JQXg.d.ts} +2 -2
  33. package/dist/apps/index.cjs +3 -3
  34. package/dist/apps/index.d.cts +3 -3
  35. package/dist/apps/index.d.ts +3 -3
  36. package/dist/apps/index.js +3 -3
  37. package/dist/apps/types.d.cts +2 -2
  38. package/dist/apps/types.d.ts +2 -2
  39. package/dist/assets/index.cjs +1 -1
  40. package/dist/assets/index.d.cts +1 -1
  41. package/dist/assets/index.d.ts +1 -1
  42. package/dist/assets/index.js +1 -1
  43. package/dist/auth/index.cjs +1 -1
  44. package/dist/auth/index.d.cts +1 -1
  45. package/dist/auth/index.d.ts +1 -1
  46. package/dist/auth/index.js +1 -1
  47. package/dist/auth/types.d.cts +2 -2
  48. package/dist/auth/types.d.ts +2 -2
  49. package/dist/{auth-C6cHWIWx.js → auth-4coY1uwo.js} +2 -2
  50. package/dist/{auth-C6cHWIWx.js.map → auth-4coY1uwo.js.map} +1 -1
  51. package/dist/{auth-C9o_0bft.cjs → auth-C8Pjl0Mu.cjs} +2 -2
  52. package/dist/{auth-C9o_0bft.cjs.map → auth-C8Pjl0Mu.cjs.map} +1 -1
  53. package/dist/{authClient-CACOwVt0.js → authClient-2e8ZmzSP.js} +71 -7
  54. package/dist/authClient-2e8ZmzSP.js.map +1 -0
  55. package/dist/{authClient-DSa5t2Ft.d.cts → authClient-Bso5UaXS.d.ts} +22 -4
  56. package/dist/{authClient-DZcAR-eW.cjs → authClient-DfkKlc-2.cjs} +82 -6
  57. package/dist/authClient-DfkKlc-2.cjs.map +1 -0
  58. package/dist/{authClient-ZiaKSKpp.d.ts → authClient-aud2dUZd.d.cts} +22 -4
  59. package/dist/billing/index.cjs +2 -2
  60. package/dist/billing/index.d.cts +1 -1
  61. package/dist/billing/index.d.ts +1 -1
  62. package/dist/billing/index.js +2 -2
  63. package/dist/billing/types.d.cts +1 -1
  64. package/dist/billing/types.d.ts +1 -1
  65. package/dist/chat/index.cjs +3 -3
  66. package/dist/chat/index.d.cts +2 -2
  67. package/dist/chat/index.d.ts +2 -2
  68. package/dist/chat/index.js +3 -3
  69. package/dist/chat/types.d.cts +1 -1
  70. package/dist/chat/types.d.ts +1 -1
  71. package/dist/{collect-97WhfEpt.js → collectByOffset-2XzJqmvr.js} +6 -6
  72. package/dist/collectByOffset-2XzJqmvr.js.map +1 -0
  73. package/dist/{collect-B5TCNiT1.cjs → collectByOffset-DQsqtmJg.cjs} +7 -7
  74. package/dist/collectByOffset-DQsqtmJg.cjs.map +1 -0
  75. package/dist/componentsMcp/index.cjs +3 -0
  76. package/dist/componentsMcp/index.d.cts +2 -0
  77. package/dist/componentsMcp/index.d.ts +2 -0
  78. package/dist/componentsMcp/index.js +2 -0
  79. package/dist/componentsMcp/types.cjs +0 -0
  80. package/dist/componentsMcp/types.d.cts +2 -0
  81. package/dist/componentsMcp/types.d.ts +2 -0
  82. package/dist/componentsMcp/types.js +1 -0
  83. package/dist/componentsMcp-CHobIsuU.js +57 -0
  84. package/dist/componentsMcp-CHobIsuU.js.map +1 -0
  85. package/dist/componentsMcp-pG-PcQrg.cjs +62 -0
  86. package/dist/componentsMcp-pG-PcQrg.cjs.map +1 -0
  87. package/dist/configurations-BTRHVSRq.cjs.map +1 -1
  88. package/dist/configurations-Chg_JwJ1.js.map +1 -1
  89. package/dist/constants/index.cjs +1 -1
  90. package/dist/constants/index.d.cts +2 -3
  91. package/dist/constants/index.d.ts +2 -3
  92. package/dist/constants/index.js +1 -1
  93. package/dist/{constants-Cifrqsls.js → constants-CA4UN2Xv.js} +11 -10
  94. package/dist/constants-CA4UN2Xv.js.map +1 -0
  95. package/dist/{constants-BDGRQqij.cjs → constants-a0jswUeK.cjs} +10 -9
  96. package/dist/constants-a0jswUeK.cjs.map +1 -0
  97. package/dist/{createFetchClient-DITkTV2k.js → createFetchClient-CkHdS_IG.js} +5 -5
  98. package/dist/createFetchClient-CkHdS_IG.js.map +1 -0
  99. package/dist/{createFetchClient-ClWD4ua3.cjs → createFetchClient-lZ_93Yrb.cjs} +5 -5
  100. package/dist/createFetchClient-lZ_93Yrb.cjs.map +1 -0
  101. package/dist/{createGenericFetchClient-KqiJhw8G.js → createGenericFetchClient-CQdNcPC3.js} +2 -2
  102. package/dist/{createGenericFetchClient-KqiJhw8G.js.map → createGenericFetchClient-CQdNcPC3.js.map} +1 -1
  103. package/dist/{createGenericFetchClient-B81Iezpb.cjs → createGenericFetchClient-MOx97wi-.cjs} +2 -2
  104. package/dist/{createGenericFetchClient-B81Iezpb.cjs.map → createGenericFetchClient-MOx97wi-.cjs.map} +1 -1
  105. package/dist/{createOpenapiFetchClient-CioTX11-.cjs → createOpenapiFetchClient-DHYo_k3t.cjs} +2 -2
  106. package/dist/{createOpenapiFetchClient-CioTX11-.cjs.map → createOpenapiFetchClient-DHYo_k3t.cjs.map} +1 -1
  107. package/dist/{createOpenapiFetchClient-wq8iGLZM.js → createOpenapiFetchClient-DXiMv9WL.js} +2 -2
  108. package/dist/{createOpenapiFetchClient-wq8iGLZM.js.map → createOpenapiFetchClient-DXiMv9WL.js.map} +1 -1
  109. package/dist/dataScience/index.cjs +2 -2
  110. package/dist/dataScience/index.d.cts +2 -2
  111. package/dist/dataScience/index.d.ts +2 -2
  112. package/dist/dataScience/index.js +2 -2
  113. package/dist/dataScience/types.d.cts +2 -2
  114. package/dist/dataScience/types.d.ts +2 -2
  115. package/dist/{dataScience-BwHmDoQb.js → dataScience-AwPMeGfz.js} +5 -5
  116. package/dist/{dataScience-BwHmDoQb.js.map → dataScience-AwPMeGfz.js.map} +1 -1
  117. package/dist/{dataScience-Hhoqoql_.cjs → dataScience-BjS1p8WO.cjs} +5 -5
  118. package/dist/{dataScience-Hhoqoql_.cjs.map → dataScience-BjS1p8WO.cjs.map} +1 -1
  119. package/dist/developerPortal/index.cjs +1 -1
  120. package/dist/developerPortal/index.d.cts +2 -2
  121. package/dist/developerPortal/index.d.ts +2 -2
  122. package/dist/developerPortal/index.js +1 -1
  123. package/dist/developerPortal/types.d.cts +1 -1
  124. package/dist/developerPortal/types.d.ts +1 -1
  125. package/dist/{developerPortalClient-loKq7X_U.js → developerPortalClient-Bb2suezr.js} +13 -5
  126. package/dist/{developerPortalClient-loKq7X_U.js.map → developerPortalClient-Bb2suezr.js.map} +1 -1
  127. package/dist/{developerPortalClient-COm7wJxS.cjs → developerPortalClient-DUerKw-7.cjs} +13 -5
  128. package/dist/{developerPortalClient-COm7wJxS.cjs.map → developerPortalClient-DUerKw-7.cjs.map} +1 -1
  129. package/dist/domain/permissions/index.d.cts +1 -2
  130. package/dist/domain/permissions/index.d.ts +1 -2
  131. package/dist/editor/index.cjs +2 -2
  132. package/dist/editor/index.d.cts +2 -2
  133. package/dist/editor/index.d.ts +2 -2
  134. package/dist/editor/index.js +2 -2
  135. package/dist/editor/types.d.cts +1 -1
  136. package/dist/editor/types.d.ts +1 -1
  137. package/dist/encryption/index.cjs +1 -1
  138. package/dist/encryption/index.d.cts +1 -1
  139. package/dist/encryption/index.d.ts +1 -1
  140. package/dist/encryption/index.js +1 -1
  141. package/dist/encryption/types.d.cts +1 -1
  142. package/dist/encryption/types.d.ts +1 -1
  143. package/dist/import/index.cjs +1 -1
  144. package/dist/import/index.d.cts +3 -3
  145. package/dist/import/index.d.ts +3 -3
  146. package/dist/import/index.js +1 -1
  147. package/dist/{import-B5DcJGMI.cjs → import-BahNYv91.cjs} +3 -3
  148. package/dist/{import-B5DcJGMI.cjs.map → import-BahNYv91.cjs.map} +1 -1
  149. package/dist/{import-JlH_QaDd.js → import-FWy_wQZ1.js} +3 -3
  150. package/dist/{import-JlH_QaDd.js.map → import-FWy_wQZ1.js.map} +1 -1
  151. package/dist/{index-DeQDdut6.d.cts → index-8ZjY7YD8.d.cts} +34 -2
  152. package/dist/{index-DCxVLGHH.d.ts → index-BGEuaZqI.d.cts} +11 -28
  153. package/dist/{index-se5ee8U1.d.ts → index-BIP0PoMW.d.ts} +4 -4
  154. package/dist/index-B_MzjCeE.d.ts +46 -0
  155. package/dist/{index-DXcTukgn.d.ts → index-BeOd45XE.d.ts} +4 -4
  156. package/dist/{index-DeQDdut6.d.ts → index-BnPmXDVP.d.ts} +34 -2
  157. package/dist/{index-yJ0HrxY6.d.ts → index-C2OAOK0s.d.ts} +4 -4
  158. package/dist/{index-BP3choXr.d.ts → index-CAWy1qjR.d.ts} +19771 -14468
  159. package/dist/{index-syAYY5LC.d.cts → index-CkwZ5x7E.d.cts} +19771 -14468
  160. package/dist/{index-Bt43tKyu.d.cts → index-DTysQ_yn.d.cts} +5 -5
  161. package/dist/{index-CTKC-mwi.d.cts → index-DUB0BwQv.d.cts} +4 -4
  162. package/dist/{index-BnPYPXGQ.d.ts → index-DloFSSj3.d.ts} +3 -3
  163. package/dist/{index-DWFxcmVD.d.ts → index-Dp-a2DdI.d.ts} +4 -4
  164. package/dist/{index-x8ET_BTN.d.cts → index-Ds0tViQS.d.cts} +3 -3
  165. package/dist/{index-DRaVzOLM.d.ts → index-HSkjm3QW.d.ts} +5 -5
  166. package/dist/index-URgNfi5L.d.cts +46 -0
  167. package/dist/{index-BhDxP0x4.d.cts → index-XG5cO-4H.d.cts} +4 -4
  168. package/dist/{types-CESP1ONj.d.ts → index-XaPb6unB.d.cts} +3635 -627
  169. package/dist/{index-D-4TT5yW.d.cts → index-ZYvgoqgW.d.cts} +4 -4
  170. package/dist/{index-GVxpBH6j.d.cts → index-_Va9wynk.d.ts} +11 -28
  171. package/dist/{types-GaOcVZ3d.d.cts → index-r6YSe8B-.d.ts} +3635 -627
  172. package/dist/{index-DS6O4UDB.d.cts → index-x_kS_5x_.d.cts} +4 -4
  173. package/dist/index.cjs +142 -161
  174. package/dist/index.cjs.map +1 -1
  175. package/dist/index.d.cts +7 -7
  176. package/dist/index.d.ts +7 -7
  177. package/dist/index.js +75 -96
  178. package/dist/index.js.map +1 -1
  179. package/dist/{isLoginPageRedirect-CsyRa3_v.js → isLoginPageRedirect-B4QKSiSa.js} +2 -2
  180. package/dist/{isLoginPageRedirect-CsyRa3_v.js.map → isLoginPageRedirect-B4QKSiSa.js.map} +1 -1
  181. package/dist/{isLoginPageRedirect-iNbwl3iz.cjs → isLoginPageRedirect-r0Opgc1n.cjs} +2 -2
  182. package/dist/{isLoginPageRedirect-iNbwl3iz.cjs.map → isLoginPageRedirect-r0Opgc1n.cjs.map} +1 -1
  183. package/dist/kaiAgent/index.cjs +1 -1
  184. package/dist/kaiAgent/index.d.cts +2 -2
  185. package/dist/kaiAgent/index.d.ts +2 -2
  186. package/dist/kaiAgent/index.js +1 -1
  187. package/dist/kaiAgent/types.d.cts +1 -1
  188. package/dist/kaiAgent/types.d.ts +1 -1
  189. package/dist/{kaiAgent-BhcUsBDk.cjs → kaiAgent-BmfUG8bB.cjs} +5 -5
  190. package/dist/{kaiAgent-BhcUsBDk.cjs.map → kaiAgent-BmfUG8bB.cjs.map} +1 -1
  191. package/dist/{kaiAgent-CUeT53-K.js → kaiAgent-CBPbMwBh.js} +5 -5
  192. package/dist/{kaiAgent-CUeT53-K.js.map → kaiAgent-CBPbMwBh.js.map} +1 -1
  193. package/dist/{kaiMemory-DaOh0zVn.js → kaiMemory-C9di17bd.js} +2 -2
  194. package/dist/{kaiMemory-DaOh0zVn.js.map → kaiMemory-C9di17bd.js.map} +1 -1
  195. package/dist/{kaiMemory-Cf81ghNd.cjs → kaiMemory-Qch09f-m.cjs} +2 -2
  196. package/dist/{kaiMemory-Cf81ghNd.cjs.map → kaiMemory-Qch09f-m.cjs.map} +1 -1
  197. package/dist/management/index.cjs +1 -1
  198. package/dist/management/index.d.cts +1 -1
  199. package/dist/management/index.d.ts +1 -1
  200. package/dist/management/index.js +1 -1
  201. package/dist/management/types.d.cts +2 -2
  202. package/dist/management/types.d.ts +2 -2
  203. package/dist/{management-0cWVLHei.cjs → management-BUGPJ1Bu.cjs} +23 -6
  204. package/dist/{management-0cWVLHei.cjs.map → management-BUGPJ1Bu.cjs.map} +1 -1
  205. package/dist/{management-eg4Ig-Cx.js → management-DAg2obYt.js} +23 -6
  206. package/dist/{management-eg4Ig-Cx.js.map → management-DAg2obYt.js.map} +1 -1
  207. package/dist/metastore/index.cjs +1 -1
  208. package/dist/metastore/index.d.cts +1 -1
  209. package/dist/metastore/index.d.ts +1 -1
  210. package/dist/metastore/index.js +1 -1
  211. package/dist/metastore/types.d.cts +1 -1
  212. package/dist/metastore/types.d.ts +1 -1
  213. package/dist/{metastore-YPHUK3jJ.cjs → metastore-BXHg33ku.cjs} +4 -4
  214. package/dist/{metastore-YPHUK3jJ.cjs.map → metastore-BXHg33ku.cjs.map} +1 -1
  215. package/dist/{metastore-D0C6uaPX.js → metastore-Ywq08DBz.js} +4 -4
  216. package/dist/{metastore-D0C6uaPX.js.map → metastore-Ywq08DBz.js.map} +1 -1
  217. package/dist/microsoftGraph/index.cjs +2 -2
  218. package/dist/microsoftGraph/index.d.cts +2 -2
  219. package/dist/microsoftGraph/index.d.ts +2 -2
  220. package/dist/microsoftGraph/index.js +2 -2
  221. package/dist/microsoftGraph/types.d.cts +1 -1
  222. package/dist/microsoftGraph/types.d.ts +1 -1
  223. package/dist/{middleware-DmR6OhTY.js → middleware-CWaLMlG1.js} +2 -2
  224. package/dist/{middleware-DmR6OhTY.js.map → middleware-CWaLMlG1.js.map} +1 -1
  225. package/dist/{middleware-D_p5TctO.cjs → middleware-DU_5pFDW.cjs} +2 -2
  226. package/dist/{middleware-D_p5TctO.cjs.map → middleware-DU_5pFDW.cjs.map} +1 -1
  227. package/dist/notifications/index.cjs +3 -3
  228. package/dist/notifications/index.d.cts +2 -2
  229. package/dist/notifications/index.d.ts +2 -2
  230. package/dist/notifications/index.js +3 -3
  231. package/dist/notifications/types.d.cts +1 -1
  232. package/dist/notifications/types.d.ts +1 -1
  233. package/dist/oauth/index.cjs +1 -1
  234. package/dist/oauth/index.d.cts +6 -2
  235. package/dist/oauth/index.d.ts +6 -2
  236. package/dist/oauth/index.js +1 -1
  237. package/dist/oauth/types.d.cts +2 -2
  238. package/dist/oauth/types.d.ts +2 -2
  239. package/dist/{oauth-DyUwTqHJ.cjs → oauth-DKZPuUlt.cjs} +17 -6
  240. package/dist/{oauth-DyUwTqHJ.cjs.map → oauth-DKZPuUlt.cjs.map} +1 -1
  241. package/dist/{oauth-Ck_Fe14o.js → oauth-GXmZ9agP.js} +17 -6
  242. package/dist/{oauth-Ck_Fe14o.js.map → oauth-GXmZ9agP.js.map} +1 -1
  243. package/dist/omnisearch/index.cjs +2 -2
  244. package/dist/omnisearch/index.d.cts +2 -2
  245. package/dist/omnisearch/index.d.ts +2 -2
  246. package/dist/omnisearch/index.js +2 -2
  247. package/dist/omnisearch/types.d.cts +1 -1
  248. package/dist/omnisearch/types.d.ts +1 -1
  249. package/dist/project-BMmfPhXg.d.ts +74 -0
  250. package/dist/project-dxCJbFay.d.cts +74 -0
  251. package/dist/queryService/index.cjs +1 -1
  252. package/dist/queryService/index.d.cts +1 -1
  253. package/dist/queryService/index.d.ts +1 -1
  254. package/dist/queryService/index.js +1 -1
  255. package/dist/queryService/types.d.cts +2 -2
  256. package/dist/queryService/types.d.ts +2 -2
  257. package/dist/{queryService-Blfz59Ms.js → queryService-C-pZha5p.js} +36 -27
  258. package/dist/queryService-C-pZha5p.js.map +1 -0
  259. package/dist/{queryService-RlNYw7LG.cjs → queryService-CzK53q94.cjs} +36 -27
  260. package/dist/queryService-CzK53q94.cjs.map +1 -0
  261. package/dist/queue/index.cjs +1 -1
  262. package/dist/queue/index.d.cts +75 -7
  263. package/dist/queue/index.d.ts +75 -7
  264. package/dist/queue/index.js +1 -1
  265. package/dist/queue/types.d.cts +1 -1
  266. package/dist/queue/types.d.ts +1 -1
  267. package/dist/{queue-BrgRdtOr.cjs → queue-BJvDWriM.cjs} +35 -25
  268. package/dist/queue-BJvDWriM.cjs.map +1 -0
  269. package/dist/{queue-CNvR-M23.js → queue-D6-x4OGF.js} +35 -25
  270. package/dist/queue-D6-x4OGF.js.map +1 -0
  271. package/dist/scheduler/index.cjs +3 -3
  272. package/dist/scheduler/index.d.cts +2 -2
  273. package/dist/scheduler/index.d.ts +2 -2
  274. package/dist/scheduler/index.js +3 -3
  275. package/dist/scheduler/types.d.cts +1 -1
  276. package/dist/scheduler/types.d.ts +1 -1
  277. package/dist/sdk/configurations/index.d.cts +2 -4
  278. package/dist/sdk/configurations/index.d.ts +2 -4
  279. package/dist/sdk/developerPortal/index.cjs +3 -3
  280. package/dist/sdk/developerPortal/index.d.cts +3 -3
  281. package/dist/sdk/developerPortal/index.d.ts +3 -3
  282. package/dist/sdk/developerPortal/index.js +3 -3
  283. package/dist/sdk/kaiMemory/index.cjs +1 -1
  284. package/dist/sdk/kaiMemory/index.d.cts +1 -1
  285. package/dist/sdk/kaiMemory/index.d.ts +1 -1
  286. package/dist/sdk/kaiMemory/index.js +1 -1
  287. package/dist/sdk/kaiMemory/types.d.cts +1 -1
  288. package/dist/sdk/kaiMemory/types.d.ts +1 -1
  289. package/dist/sdk/queryService/index.cjs +34 -55
  290. package/dist/sdk/queryService/index.cjs.map +1 -1
  291. package/dist/sdk/queryService/index.d.cts +2 -2
  292. package/dist/sdk/queryService/index.d.ts +2 -2
  293. package/dist/sdk/queryService/index.js +34 -55
  294. package/dist/sdk/queryService/index.js.map +1 -1
  295. package/dist/sdk/semanticLayer/index.d.cts +1 -1
  296. package/dist/sdk/semanticLayer/index.d.ts +1 -1
  297. package/dist/sdk/semanticLayer/types.d.cts +1 -1
  298. package/dist/sdk/semanticLayer/types.d.ts +1 -1
  299. package/dist/sdk/storage/index.cjs +0 -119
  300. package/dist/sdk/storage/index.cjs.map +1 -1
  301. package/dist/sdk/storage/index.d.cts +103 -2
  302. package/dist/sdk/storage/index.d.ts +103 -2
  303. package/dist/sdk/storage/index.js +1 -119
  304. package/dist/sdk/storage/index.js.map +1 -1
  305. package/dist/sdk/tag/index.d.cts +2 -2
  306. package/dist/sdk/tag/index.d.ts +2 -2
  307. package/dist/sdk/tag/types.d.cts +1 -1
  308. package/dist/sdk/tag/types.d.ts +1 -1
  309. package/dist/sdk/vault/index.d.cts +1 -1
  310. package/dist/sdk/vault/index.d.ts +1 -1
  311. package/dist/status/index.cjs +1 -1
  312. package/dist/status/index.d.cts +1 -1
  313. package/dist/status/index.d.ts +1 -1
  314. package/dist/status/index.js +1 -1
  315. package/dist/storage/index.cjs +13 -9
  316. package/dist/storage/index.d.cts +3 -3
  317. package/dist/storage/index.d.ts +3 -3
  318. package/dist/storage/index.js +7 -6
  319. package/dist/storage/types.d.cts +6 -5
  320. package/dist/storage/types.d.ts +6 -5
  321. package/dist/{storage-RkNaOFJ-.js → storage-DyR7hDdv.js} +347 -168
  322. package/dist/storage-DyR7hDdv.js.map +1 -0
  323. package/dist/{storage-76Sf_z_H.cjs → storage-yovv11k6.cjs} +366 -169
  324. package/dist/storage-yovv11k6.cjs.map +1 -0
  325. package/dist/stream/index.cjs +3 -3
  326. package/dist/stream/index.d.cts +2 -2
  327. package/dist/stream/index.d.ts +2 -2
  328. package/dist/stream/index.js +3 -3
  329. package/dist/stream/types.d.cts +1 -1
  330. package/dist/stream/types.d.ts +1 -1
  331. package/dist/syncActions/index.cjs +1 -1
  332. package/dist/syncActions/index.d.cts +2 -2
  333. package/dist/syncActions/index.d.ts +2 -2
  334. package/dist/syncActions/index.js +1 -1
  335. package/dist/syncActions/types.d.cts +1 -1
  336. package/dist/syncActions/types.d.ts +1 -1
  337. package/dist/{syncActions-DlNPhZY4.cjs → syncActions-C1rE4R3f.cjs} +5 -5
  338. package/dist/{syncActions-DlNPhZY4.cjs.map → syncActions-C1rE4R3f.cjs.map} +1 -1
  339. package/dist/{syncActions-BvFUa9xV.js → syncActions-DM8vP7p3.js} +5 -5
  340. package/dist/{syncActions-BvFUa9xV.js.map → syncActions-DM8vP7p3.js.map} +1 -1
  341. package/dist/telemetry/index.cjs +3 -6
  342. package/dist/telemetry/index.cjs.map +1 -1
  343. package/dist/telemetry/index.d.cts +2 -5
  344. package/dist/telemetry/index.d.ts +2 -5
  345. package/dist/telemetry/index.js +3 -6
  346. package/dist/telemetry/index.js.map +1 -1
  347. package/dist/telemetry/types.d.cts +1 -1
  348. package/dist/telemetry/types.d.ts +1 -1
  349. package/dist/{jobStatus-BJdbZ72V.js → transientRetries-B4iusp69.js} +79 -37
  350. package/dist/transientRetries-B4iusp69.js.map +1 -0
  351. package/dist/{jobStatus-B0E-MZ9I.cjs → transientRetries-DdJfH9QK.cjs} +82 -40
  352. package/dist/transientRetries-DdJfH9QK.cjs.map +1 -0
  353. package/dist/{types-5HdT1rSH.d.cts → types--qQPfxWt.d.cts} +2 -2
  354. package/dist/{types-sg2xnYlr.d.cts → types-4CjbcUdD.d.cts} +95 -26
  355. package/dist/{types-B1GN_I06.d.ts → types-4HmtNuJf.d.ts} +2 -2
  356. package/dist/types-4bSZLxq3.d.cts +1973 -0
  357. package/dist/{types-BHxsCu0f.d.ts → types-7DBpH7Rf.d.ts} +2 -2
  358. package/dist/{types-Btb8r9iw.d.ts → types-B2ZLjagf.d.ts} +95 -26
  359. package/dist/{types--owScV0r.d.cts → types-B6ozaDkl.d.cts} +11 -3
  360. package/dist/{types-DUDQg4ry.d.cts → types-BBbzWczQ.d.cts} +2 -2
  361. package/dist/{types-CyO8qCKl.d.cts → types-BG0oWq8u.d.cts} +2 -2
  362. package/dist/types-BIDKSQdc.d.ts +1973 -0
  363. package/dist/{types-CFurl1xe.d.cts → types-BKIcow3B.d.cts} +2 -2
  364. package/dist/{types-Nwq1QtYe.d.ts → types-BNPvFLgC.d.ts} +2 -2
  365. package/dist/{types-DDjp9lXD.d.ts → types-BXgINefw.d.ts} +2 -2
  366. package/dist/{types-C05ALlV6.d.cts → types-BZBU3mwz.d.cts} +3 -3
  367. package/dist/{types-LxDyOfdY.d.cts → types-B_1plf0y.d.cts} +2 -2
  368. package/dist/{types-DHdXufVf.d.cts → types-B_3zoXA1.d.cts} +3 -3
  369. package/dist/{types-BE7mRarT.d.ts → types-BcQ3j8xK.d.ts} +2 -2
  370. package/dist/{types-tJLoKlMX.d.cts → types-BdF6NDvo.d.cts} +2 -2
  371. package/dist/{types-DiE081mn.d.ts → types-BiBBKcin.d.ts} +3 -3
  372. package/dist/{types-fAqPUl-a.d.ts → types-BiTn_JVW.d.cts} +233 -37
  373. package/dist/{types-BtII5RSD.d.ts → types-BjEiUOL6.d.ts} +11 -3
  374. package/dist/{types-BMWeCO5M.d.ts → types-BoH7NFCh.d.ts} +3 -3
  375. package/dist/{types-BGICH80a.d.cts → types-BwsE-pFo.d.cts} +2 -2
  376. package/dist/{types-B5kkD7h4.d.cts → types-Bx0TSdwF.d.cts} +2 -2
  377. package/dist/{types-sI3K5t3w.d.cts → types-C2JMisvL.d.ts} +233 -37
  378. package/dist/{types-CaBhH99H.d.ts → types-C2j6Jsie.d.ts} +3 -3
  379. package/dist/{types-DSv1XS7s.d.ts → types-C3IQu1gV.d.ts} +3 -3
  380. package/dist/{types-DQauEri3.d.ts → types-C7t_6FLh.d.ts} +2 -2
  381. package/dist/{types-UI2aZ74n.d.ts → types-CBrNIgEy.d.ts} +3 -3
  382. package/dist/{types-Dvysi2Eo.d.ts → types-CEw2IzWk.d.ts} +2 -2
  383. package/dist/{types-C8oZX0oP.d.cts → types-CMKIdreQ.d.cts} +3 -3
  384. package/dist/{types-qGMVZGSB.d.ts → types-COQOzyac.d.ts} +45 -2
  385. package/dist/{types-Csmy6qFk.d.cts → types-CZCPdPqv.d.cts} +2 -2
  386. package/dist/{types-BksK2Eo0.d.cts → types-Cw9UISvM.d.ts} +2 -2
  387. package/dist/{types-YdE2VJzw.d.cts → types-D51g4h9w.d.cts} +2 -2
  388. package/dist/{types-DGu-wPPm.d.cts → types-D8w9lyb8.d.cts} +45 -2
  389. package/dist/{types-XHNJRi3-.d.cts → types-DBJ8c3hN.d.cts} +2 -2
  390. package/dist/{types-C4yryy-R.d.ts → types-DHlXKVEM.d.ts} +2 -2
  391. package/dist/{types-ggpJFEWZ.d.cts → types-DPDq8C4q.d.cts} +2 -2
  392. package/dist/{types-qWA5iU0j.d.ts → types-DWJVbskE.d.ts} +2 -2
  393. package/dist/{types-Br04cEri.d.ts → types-Dg8a7m7f.d.ts} +2 -2
  394. package/dist/{types-CoQET4Ep.d.ts → types-DgIzXY-Y.d.ts} +2 -2
  395. package/dist/{types-QroFANIW.d.cts → types-L50Y6ATu.d.cts} +3 -3
  396. package/dist/{types-BuKviWct.d.ts → types-OkQWmonU.d.cts} +2 -2
  397. package/dist/{types-DMWfdZ5C.d.cts → types-TRJiPqJr.d.cts} +2 -2
  398. package/dist/{types-BTqxM-IN.d.ts → types-ij6BpTzR.d.ts} +2 -2
  399. package/dist/{types-BoNqe_Lz.d.ts → types-ituiCs8g.d.ts} +2 -2
  400. package/dist/{types-BRvs3fXN.d.cts → types-kbyIaA7p.d.cts} +3 -3
  401. package/dist/{validateConnectionStatus-DR-0h35y.cjs → validateConnectionStatus-BalWEyRk.cjs} +3 -3
  402. package/dist/{validateConnectionStatus-DR-0h35y.cjs.map → validateConnectionStatus-BalWEyRk.cjs.map} +1 -1
  403. package/dist/{validateConnectionStatus-CdTV3gsP.js → validateConnectionStatus-DyrYpn0G.js} +3 -3
  404. package/dist/{validateConnectionStatus-CdTV3gsP.js.map → validateConnectionStatus-DyrYpn0G.js.map} +1 -1
  405. package/dist/vault/index.cjs +6 -6
  406. package/dist/vault/index.cjs.map +1 -1
  407. package/dist/vault/index.d.cts +1 -1
  408. package/dist/vault/index.d.ts +1 -1
  409. package/dist/vault/index.js +6 -6
  410. package/dist/vault/index.js.map +1 -1
  411. package/dist/vault/types.d.cts +1 -1
  412. package/dist/vault/types.d.ts +1 -1
  413. package/package.json +27 -1
  414. package/surface/apps.md +5 -5
  415. package/surface/auth.md +2 -0
  416. package/surface/chat.md +2 -2
  417. package/surface/componentsMcp.md +9 -0
  418. package/surface/dataScience.md +2 -2
  419. package/surface/kaiAgent.md +2 -2
  420. package/surface/management.md +4 -2
  421. package/surface/oauth.md +1 -0
  422. package/surface/queryService.md +4 -4
  423. package/surface/queue.md +2 -2
  424. package/surface/sdk.md +0 -24
  425. package/surface/storage.md +87 -57
  426. package/dist/QueryJobTimeoutError-C7JbNGOM.js +0 -38
  427. package/dist/QueryJobTimeoutError-C7JbNGOM.js.map +0 -1
  428. package/dist/QueryJobTimeoutError-CVNPdCWX.cjs.map +0 -1
  429. package/dist/authClient-CACOwVt0.js.map +0 -1
  430. package/dist/authClient-DZcAR-eW.cjs.map +0 -1
  431. package/dist/collect-97WhfEpt.js.map +0 -1
  432. package/dist/collect-B5TCNiT1.cjs.map +0 -1
  433. package/dist/constants-BDGRQqij.cjs.map +0 -1
  434. package/dist/constants-Cifrqsls.js.map +0 -1
  435. package/dist/createFetchClient-ClWD4ua3.cjs.map +0 -1
  436. package/dist/createFetchClient-DITkTV2k.js.map +0 -1
  437. package/dist/index-BzhLY7el.d.cts +0 -254
  438. package/dist/index-CH5Sg3rk.d.ts +0 -77
  439. package/dist/index-CiwWDu-q.d.cts +0 -16
  440. package/dist/index-DCAnnlcL.d.ts +0 -16
  441. package/dist/index-DQwjlSJi.d.cts +0 -77
  442. package/dist/index-PyTPrtaL.d.ts +0 -254
  443. package/dist/jobStatus-B0E-MZ9I.cjs.map +0 -1
  444. package/dist/jobStatus-BJdbZ72V.js.map +0 -1
  445. package/dist/project-BN7YRWFS.d.cts +0 -24
  446. package/dist/project-BpWTnoQ_.d.ts +0 -24
  447. package/dist/queryService-Blfz59Ms.js.map +0 -1
  448. package/dist/queryService-RlNYw7LG.cjs.map +0 -1
  449. package/dist/queue-BrgRdtOr.cjs.map +0 -1
  450. package/dist/queue-CNvR-M23.js.map +0 -1
  451. package/dist/serviceIds-DRcoTnSd.d.cts +0 -32
  452. package/dist/serviceIds-DRcoTnSd.d.ts +0 -32
  453. package/dist/storage-76Sf_z_H.cjs.map +0 -1
  454. package/dist/storage-RkNaOFJ-.js.map +0 -1
  455. package/dist/types-1B3ioN33.d.cts +0 -1868
  456. package/dist/types-BjIuVrAZ.d.ts +0 -66
  457. package/dist/types-CGhu0tID.d.cts +0 -1298
  458. package/dist/types-CclheyE7.d.cts +0 -66
  459. package/dist/types-M9vU_ONp.d.ts +0 -1868
  460. package/dist/types-P_61P9Nd.d.ts +0 -1298
  461. package/dist/types-j30rKMe6.d.ts +0 -957
  462. package/dist/types-q5lgElyc.d.cts +0 -957
@@ -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-Br04cEri.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-Dg8a7m7f.js";
2
2
  export { GetProjectsLineageQuery, GetTablesLineageQuery, LineageBucket, LineageConfiguration, LineageMetadata, LineageProject, LineageSource, LineageTable, ProjectLineageRelation, ProjectsLineage, ProjectsLineageResponse, TableLineageRelation, TablesLineage, TablesLineageResponse };
@@ -0,0 +1,74 @@
1
+ import { Lr as paths, c as OpenapiQueryType, l as OpenapiReturnType, r as OpenapiBodyType, s as OpenapiPathType } from "./index-r6YSe8B-.js";
2
+ import "./adminRoles-CvdIUkiC.js";
3
+ import { t as Backend } from "./backends-DKBz5OxE.js";
4
+ //#region src/clients/storage/tokens/types.d.ts
5
+ type ProjectId = number;
6
+ type CreateTokenSchemaBody = OpenapiBodyType<paths['/v2/storage/tokens']['post']>;
7
+ type UpdateTokenSchemaBody = OpenapiBodyType<paths['/v2/storage/tokens/{id}']['put']>;
8
+ type TokenListItem = OpenapiReturnType<paths['/v2/storage/tokens']['get']>[number];
9
+ type GetTokenEventsPath = OpenapiPathType<paths['/v2/storage/tokens/{id}/events']['get']>;
10
+ type GetTokenEventsInput = GetTokenEventsPath & NonNullable<OpenapiQueryType<paths['/v2/storage/tokens/{id}/events']['get']>>;
11
+ /**
12
+ * The create payload with `token` required.
13
+ *
14
+ * - The spec shares the schema with update, where `token` is omitted; create always returns it.
15
+ */
16
+ type CreateTokenResponse = Omit<OpenapiReturnType<paths['/v2/storage/tokens']['post']>, 'token'> & {
17
+ token: string;
18
+ };
19
+ /** The verify payload as the spec declares it — `StorageToken` is the corrected shape. */
20
+ type StorageTokenRaw = OpenapiReturnType<paths['/v2/storage/tokens/verify']['get']>;
21
+ /**
22
+ * `StorageTokenRaw` tightened to what an admin session always gets.
23
+ *
24
+ * - `admin` and `adminOwner` are optional in the spec (a token without an admin); every token the
25
+ * SDK verifies belongs to one, and `domain/permissions` narrows on `admin.role`.
26
+ * - `admin.role` stays the spec's enum and nullable: Connection stores memberships without a role.
27
+ * - `owner.assignedBackends` narrows to the backends the SDK knows; the spec types them `string`.
28
+ */
29
+ type StorageToken = Omit<StorageTokenRaw, 'owner' | 'admin' | 'adminOwner'> & {
30
+ owner: Omit<StorageTokenRaw['owner'], 'assignedBackends'> & {
31
+ assignedBackends: Backend[];
32
+ };
33
+ admin: NonNullable<StorageTokenRaw['admin']>;
34
+ adminOwner: NonNullable<StorageTokenRaw['adminOwner']>;
35
+ };
36
+ /**
37
+ * The create body with every field optional.
38
+ * - Connection defaults each boolean (`?? false`) and declares no `required` list; the generator
39
+ * marks a property with a `default` as required (`--default-non-nullable`), hence the `Partial`.
40
+ * - `canManageBuckets` only picks the full arm of the spec's union; the limited arm is a subset.
41
+ */
42
+ type CreateTokenBody = Partial<Extract<CreateTokenSchemaBody, {
43
+ canManageBuckets: boolean;
44
+ }>>;
45
+ /** Update takes these five fields and ignores the rest (`allowExtraFields`); `canManageBuckets` is set at creation only. */
46
+ type UpdateTokenBody = UpdateTokenSchemaBody;
47
+ type UpdateTokenPath = OpenapiPathType<paths['/v2/storage/tokens/{id}']['put']>;
48
+ type UpdateTokenInput = UpdateTokenPath & UpdateTokenBody;
49
+ type ShareTokenBody = OpenapiBodyType<paths['/v2/storage/tokens/{id}/share']['post']>;
50
+ type ShareTokenPath = OpenapiPathType<paths['/v2/storage/tokens/{id}/share']['post']>;
51
+ type ShareTokenInput = ShareTokenPath & ShareTokenBody;
52
+ //#endregion
53
+ //#region src/domain/project.d.ts
54
+ type Options = {
55
+ sapiToken: StorageToken;
56
+ };
57
+ declare const hasFeature: (token: StorageToken, ...feature: string[]) => boolean;
58
+ /**
59
+ * The admin's features as the Storage token carries them.
60
+ *
61
+ * - The same list `createAdminAccount` reads from the Manage token: Connection serialises both
62
+ * from the admin row, so prefer the account where one is at hand — it also knows `isSuperAdmin`.
63
+ */
64
+ declare const hasAdminFeature: (token: StorageToken, ...feature: string[]) => boolean;
65
+ declare const createProject: ({ sapiToken }: Options) => {
66
+ hasFeature: (...feature: string[]) => boolean;
67
+ hasAdminFeature: (...feature: string[]) => boolean;
68
+ hasBackend: (backend: Backend) => boolean;
69
+ sapiToken: StorageToken;
70
+ };
71
+ type Project = ReturnType<typeof createProject>;
72
+ //#endregion
73
+ export { UpdateTokenInput as _, CreateTokenResponse as a, GetTokenEventsPath as c, ShareTokenInput as d, ShareTokenPath as f, UpdateTokenBody as g, TokenListItem as h, CreateTokenBody as i, ProjectId as l, StorageTokenRaw as m, hasAdminFeature as n, CreateTokenSchemaBody as o, StorageToken as p, hasFeature as r, GetTokenEventsInput as s, Project as t, ShareTokenBody as u, UpdateTokenPath as v, UpdateTokenSchemaBody as y };
74
+ //# sourceMappingURL=project-BMmfPhXg.d.ts.map
@@ -0,0 +1,74 @@
1
+ import { Lr as paths, c as OpenapiQueryType, l as OpenapiReturnType, r as OpenapiBodyType, s as OpenapiPathType } from "./index-XaPb6unB.cjs";
2
+ import "./adminRoles-DGM8SuuF.cjs";
3
+ import { t as Backend } from "./backends-DKBz5OxE.cjs";
4
+ //#region src/clients/storage/tokens/types.d.ts
5
+ type ProjectId = number;
6
+ type CreateTokenSchemaBody = OpenapiBodyType<paths['/v2/storage/tokens']['post']>;
7
+ type UpdateTokenSchemaBody = OpenapiBodyType<paths['/v2/storage/tokens/{id}']['put']>;
8
+ type TokenListItem = OpenapiReturnType<paths['/v2/storage/tokens']['get']>[number];
9
+ type GetTokenEventsPath = OpenapiPathType<paths['/v2/storage/tokens/{id}/events']['get']>;
10
+ type GetTokenEventsInput = GetTokenEventsPath & NonNullable<OpenapiQueryType<paths['/v2/storage/tokens/{id}/events']['get']>>;
11
+ /**
12
+ * The create payload with `token` required.
13
+ *
14
+ * - The spec shares the schema with update, where `token` is omitted; create always returns it.
15
+ */
16
+ type CreateTokenResponse = Omit<OpenapiReturnType<paths['/v2/storage/tokens']['post']>, 'token'> & {
17
+ token: string;
18
+ };
19
+ /** The verify payload as the spec declares it — `StorageToken` is the corrected shape. */
20
+ type StorageTokenRaw = OpenapiReturnType<paths['/v2/storage/tokens/verify']['get']>;
21
+ /**
22
+ * `StorageTokenRaw` tightened to what an admin session always gets.
23
+ *
24
+ * - `admin` and `adminOwner` are optional in the spec (a token without an admin); every token the
25
+ * SDK verifies belongs to one, and `domain/permissions` narrows on `admin.role`.
26
+ * - `admin.role` stays the spec's enum and nullable: Connection stores memberships without a role.
27
+ * - `owner.assignedBackends` narrows to the backends the SDK knows; the spec types them `string`.
28
+ */
29
+ type StorageToken = Omit<StorageTokenRaw, 'owner' | 'admin' | 'adminOwner'> & {
30
+ owner: Omit<StorageTokenRaw['owner'], 'assignedBackends'> & {
31
+ assignedBackends: Backend[];
32
+ };
33
+ admin: NonNullable<StorageTokenRaw['admin']>;
34
+ adminOwner: NonNullable<StorageTokenRaw['adminOwner']>;
35
+ };
36
+ /**
37
+ * The create body with every field optional.
38
+ * - Connection defaults each boolean (`?? false`) and declares no `required` list; the generator
39
+ * marks a property with a `default` as required (`--default-non-nullable`), hence the `Partial`.
40
+ * - `canManageBuckets` only picks the full arm of the spec's union; the limited arm is a subset.
41
+ */
42
+ type CreateTokenBody = Partial<Extract<CreateTokenSchemaBody, {
43
+ canManageBuckets: boolean;
44
+ }>>;
45
+ /** Update takes these five fields and ignores the rest (`allowExtraFields`); `canManageBuckets` is set at creation only. */
46
+ type UpdateTokenBody = UpdateTokenSchemaBody;
47
+ type UpdateTokenPath = OpenapiPathType<paths['/v2/storage/tokens/{id}']['put']>;
48
+ type UpdateTokenInput = UpdateTokenPath & UpdateTokenBody;
49
+ type ShareTokenBody = OpenapiBodyType<paths['/v2/storage/tokens/{id}/share']['post']>;
50
+ type ShareTokenPath = OpenapiPathType<paths['/v2/storage/tokens/{id}/share']['post']>;
51
+ type ShareTokenInput = ShareTokenPath & ShareTokenBody;
52
+ //#endregion
53
+ //#region src/domain/project.d.ts
54
+ type Options = {
55
+ sapiToken: StorageToken;
56
+ };
57
+ declare const hasFeature: (token: StorageToken, ...feature: string[]) => boolean;
58
+ /**
59
+ * The admin's features as the Storage token carries them.
60
+ *
61
+ * - The same list `createAdminAccount` reads from the Manage token: Connection serialises both
62
+ * from the admin row, so prefer the account where one is at hand — it also knows `isSuperAdmin`.
63
+ */
64
+ declare const hasAdminFeature: (token: StorageToken, ...feature: string[]) => boolean;
65
+ declare const createProject: ({ sapiToken }: Options) => {
66
+ hasFeature: (...feature: string[]) => boolean;
67
+ hasAdminFeature: (...feature: string[]) => boolean;
68
+ hasBackend: (backend: Backend) => boolean;
69
+ sapiToken: StorageToken;
70
+ };
71
+ type Project = ReturnType<typeof createProject>;
72
+ //#endregion
73
+ export { UpdateTokenInput as _, CreateTokenResponse as a, GetTokenEventsPath as c, ShareTokenInput as d, ShareTokenPath as f, UpdateTokenBody as g, TokenListItem as h, CreateTokenBody as i, ProjectId as l, StorageTokenRaw as m, hasAdminFeature as n, CreateTokenSchemaBody as o, StorageToken as p, hasFeature as r, GetTokenEventsInput as s, Project as t, ShareTokenBody as u, UpdateTokenPath as v, UpdateTokenSchemaBody as y };
74
+ //# sourceMappingURL=project-dxCJbFay.d.cts.map
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_queryService = require("../queryService-RlNYw7LG.cjs");
2
+ const require_queryService = require("../queryService-CzK53q94.cjs");
3
3
  exports.createQueryServiceClient = require_queryService.createQueryServiceClient;
@@ -1,2 +1,2 @@
1
- import { t as createQueryServiceClient } from "../index-syAYY5LC.cjs";
1
+ import { S as createQueryServiceClient } from "../index-CkwZ5x7E.cjs";
2
2
  export { createQueryServiceClient };
@@ -1,2 +1,2 @@
1
- import { t as createQueryServiceClient } from "../index-BP3choXr.js";
1
+ import { S as createQueryServiceClient } from "../index-CAWy1qjR.js";
2
2
  export { createQueryServiceClient };
@@ -1,2 +1,2 @@
1
- import { t as createQueryServiceClient } from "../queryService-Blfz59Ms.js";
1
+ import { t as createQueryServiceClient } from "../queryService-C-pZha5p.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-q5lgElyc.cjs";
2
- export { ExportResultsResponse, GetExportResultsQuery, GetQueriesHistoryQuery, GetQueriesPath, GetQueryJobPath, GetQueryResultsPath, GetQueryResutsQuery, JobStatusResponse, PostCancelQueryJobPath, PostQueryBody, PostQueryPath, QueryJobStatus, QueryResult, Statements };
1
+ import { $ as GetQueryResultsPath, J as ExportResultsResponse, Q as GetQueryJobPath, X as GetQueriesHistoryQuery, Y as GetExportResultsQuery, Z as GetQueriesPath, at as QueryJobStatus, et as GetQueryResutsQuery, it as PostQueryPath, nt as PostCancelQueryJobPath, ot as QueryResult, q as QueryJobPollOptions, rt as PostQueryBody, st as Statements, tt as JobStatusResponse } from "../index-CkwZ5x7E.cjs";
2
+ export { ExportResultsResponse, GetExportResultsQuery, GetQueriesHistoryQuery, GetQueriesPath, GetQueryJobPath, GetQueryResultsPath, GetQueryResutsQuery, JobStatusResponse, PostCancelQueryJobPath, PostQueryBody, PostQueryPath, type QueryJobPollOptions, 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-j30rKMe6.js";
2
- export { ExportResultsResponse, GetExportResultsQuery, GetQueriesHistoryQuery, GetQueriesPath, GetQueryJobPath, GetQueryResultsPath, GetQueryResutsQuery, JobStatusResponse, PostCancelQueryJobPath, PostQueryBody, PostQueryPath, QueryJobStatus, QueryResult, Statements };
1
+ import { $ as GetQueryResultsPath, J as ExportResultsResponse, Q as GetQueryJobPath, X as GetQueriesHistoryQuery, Y as GetExportResultsQuery, Z as GetQueriesPath, at as QueryJobStatus, et as GetQueryResutsQuery, it as PostQueryPath, nt as PostCancelQueryJobPath, ot as QueryResult, q as QueryJobPollOptions, rt as PostQueryBody, st as Statements, tt as JobStatusResponse } from "../index-CAWy1qjR.js";
2
+ export { ExportResultsResponse, GetExportResultsQuery, GetQueriesHistoryQuery, GetQueriesPath, GetQueryJobPath, GetQueryResultsPath, GetQueryResutsQuery, JobStatusResponse, PostCancelQueryJobPath, PostQueryBody, PostQueryPath, type QueryJobPollOptions, QueryJobStatus, QueryResult, Statements };
@@ -1,31 +1,40 @@
1
- import { a as poller, t as jobStatus } from "./jobStatus-BJdbZ72V.js";
2
- import { f as parseContentDispositionHeader, s as HttpHeader } from "./createFetchClient-DITkTV2k.js";
3
- import { t as createGenericFetchClient } from "./createGenericFetchClient-KqiJhw8G.js";
4
- import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-wq8iGLZM.js";
5
- import { t as createAuthHeaders } from "./auth-C6cHWIWx.js";
1
+ import { a as poller, n as jobStatus, t as transientRetries } from "./transientRetries-B4iusp69.js";
2
+ import { f as parseContentDispositionHeader, s as HttpHeader } from "./createFetchClient-CkHdS_IG.js";
3
+ import { t as QueryJobError } from "./QueryJobError-ZZZ043Nm.js";
4
+ import { t as createGenericFetchClient } from "./createGenericFetchClient-CQdNcPC3.js";
5
+ import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-DXiMv9WL.js";
6
+ import { t as createAuthHeaders } from "./auth-4coY1uwo.js";
6
7
  //#region src/clients/queryService/poller.ts
7
8
  const DEFAULT_POLL_INTERVAL = 2e3;
8
- /**
9
- * Waits on a query job.
10
- *
11
- * - Takes the job rather than its id, so a caller hands over what `createQueryJob` gave it.
12
- * - The request reads the id off the key rather than out of a closure, which is what makes the key
13
- * the whole input.
14
- * - Terminal is the job's own terminal set, not its statements': a `completed` job can still hold a
15
- * statement that failed, and what that means is the caller's business.
16
- */
17
- const createJobPoller = ({ getQueryJob }) => ({ id }, { interval, maxAttempts, timeout, signal } = {}) => poller({
18
- pollKey: ["queryService.job", { queryJobId: id }],
19
- pollFn: ({ pollKey: [, params], signal: pollSignal }) => getQueryJob(params.queryJobId, pollSignal),
20
- until: ({ data }) => jobStatus.query.isTerminal(data.status),
21
- backoff: {
22
- type: "constant",
23
- interval: interval ?? DEFAULT_POLL_INTERVAL
24
- },
25
- maxAttempts,
26
- timeout,
27
- signal
28
- });
9
+ const createJobPoller = ({ getQueryJob }) => ({ init, interval, maxAttempts, timeout, signal }) => {
10
+ const retries = transientRetries();
11
+ return poller({
12
+ pollKey: ({ id }) => ["queryService.job", { id }],
13
+ init,
14
+ pollFn: async ({ init: { id }, signal: pollSignal }) => {
15
+ const job = await getQueryJob(id, pollSignal);
16
+ retries.reset();
17
+ return job;
18
+ },
19
+ isRetryable: retries.isRetryable,
20
+ until: ({ data }) => jobStatus.query.isTerminal(data.status),
21
+ failed: (job) => {
22
+ if (job.status !== "failed") return void 0;
23
+ const failedStatements = job.statements.filter((statement) => statement.status === "failed").map((statement) => ({
24
+ id: statement.id,
25
+ error: statement.error
26
+ }));
27
+ return new QueryJobError(failedStatements[0]?.error ?? "Job failed", job.queryJobId, { failedStatements });
28
+ },
29
+ backoff: {
30
+ type: "constant",
31
+ interval: interval ?? DEFAULT_POLL_INTERVAL
32
+ },
33
+ maxAttempts,
34
+ timeout,
35
+ signal
36
+ });
37
+ };
29
38
  //#endregion
30
39
  //#region src/clients/queryService/queryServiceClient.ts
31
40
  const createQueryServiceClient = ({ baseUrl, middlewares, auth }) => {
@@ -111,4 +120,4 @@ const createQueryServiceClient = ({ baseUrl, middlewares, auth }) => {
111
120
  //#endregion
112
121
  export { createQueryServiceClient as t };
113
122
 
114
- //# sourceMappingURL=queryService-Blfz59Ms.js.map
123
+ //# sourceMappingURL=queryService-C-pZha5p.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryService-C-pZha5p.js","names":[],"sources":["../src/clients/queryService/poller.ts","../src/clients/queryService/queryServiceClient.ts"],"sourcesContent":["import { jobStatus } from '../../domain/jobStatus';\nimport { QueryJobError } from '../../errors';\nimport { poller } from '../../utils/async';\nimport { transientRetries } from '../transientRetries';\n\nimport type { GetQueryJobPath, JobStatusResponse } from './types';\n\nconst DEFAULT_POLL_INTERVAL = 2000;\n\nexport type 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 * - `init` is the job, or the request that yields it, so a caller hands over what `createQueryJob` gave it.\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 */\ntype JobRef = { id: GetQueryJobPath['queryJobId'] };\n\nexport const createJobPoller =\n ({ getQueryJob }: { getQueryJob: GetQueryJob }) =>\n ({\n init,\n interval,\n maxAttempts,\n timeout,\n signal,\n }: QueryJobPollOptions & { init: JobRef | ((signal: AbortSignal) => Promise<JobRef>) }) => {\n const retries = transientRetries();\n\n return poller({\n pollKey: ({ id }) => ['queryService.job', { id }] as const,\n init,\n pollFn: async ({ init: { id }, signal: pollSignal }) => {\n const job = await getQueryJob(id, pollSignal);\n retries.reset();\n return job;\n },\n isRetryable: retries.isRetryable,\n until: ({ data }) => jobStatus.query.isTerminal(data.status),\n failed: (job) => {\n if (job.status !== 'failed') return undefined;\n const failedStatements = job.statements\n .filter((statement) => statement.status === 'failed')\n .map((statement) => ({ id: statement.id, error: statement.error }));\n\n return new QueryJobError(failedStatements[0]?.error ?? 'Job failed', job.queryJobId, {\n failedStatements,\n });\n },\n backoff: { type: 'constant', interval: interval ?? DEFAULT_POLL_INTERVAL },\n maxAttempts,\n timeout,\n signal,\n });\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":";;;;;;;AAOA,MAAM,wBAAwB;AAuB9B,MAAa,mBACV,EAAE,mBACF,EACC,MACA,UACA,aACA,SACA,aACyF;CACzF,MAAM,UAAU,iBAAiB;CAEjC,OAAO,OAAO;EACZ,UAAU,EAAE,SAAS,CAAC,oBAAoB,EAAE,GAAG,CAAC;EAChD;EACA,QAAQ,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,iBAAiB;GACtD,MAAM,MAAM,MAAM,YAAY,IAAI,UAAU;GAC5C,QAAQ,MAAM;GACd,OAAO;EACT;EACA,aAAa,QAAQ;EACrB,QAAQ,EAAE,WAAW,UAAU,MAAM,WAAW,KAAK,MAAM;EAC3D,SAAS,QAAQ;GACf,IAAI,IAAI,WAAW,UAAU,OAAO,KAAA;GACpC,MAAM,mBAAmB,IAAI,WAC1B,QAAQ,cAAc,UAAU,WAAW,QAAQ,CAAC,CACpD,KAAK,eAAe;IAAE,IAAI,UAAU;IAAI,OAAO,UAAU;GAAM,EAAE;GAEpE,OAAO,IAAI,cAAc,iBAAiB,EAAE,EAAE,SAAS,cAAc,IAAI,YAAY,EACnF,iBACF,CAAC;EACH;EACA,SAAS;GAAE,MAAM;GAAY,UAAU,YAAY;EAAsB;EACzE;EACA;EACA;CACF,CAAC;AACH;;;AC1CF,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,31 +1,40 @@
1
- const require_jobStatus = require("./jobStatus-B0E-MZ9I.cjs");
2
- const require_createFetchClient = require("./createFetchClient-ClWD4ua3.cjs");
3
- const require_createGenericFetchClient = require("./createGenericFetchClient-B81Iezpb.cjs");
4
- const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-CioTX11-.cjs");
5
- const require_auth = require("./auth-C9o_0bft.cjs");
1
+ const require_transientRetries = require("./transientRetries-DdJfH9QK.cjs");
2
+ const require_createFetchClient = require("./createFetchClient-lZ_93Yrb.cjs");
3
+ const require_QueryJobError = require("./QueryJobError-irGiP5zh.cjs");
4
+ const require_createGenericFetchClient = require("./createGenericFetchClient-MOx97wi-.cjs");
5
+ const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-DHYo_k3t.cjs");
6
+ const require_auth = require("./auth-C8Pjl0Mu.cjs");
6
7
  //#region src/clients/queryService/poller.ts
7
8
  const DEFAULT_POLL_INTERVAL = 2e3;
8
- /**
9
- * Waits on a query job.
10
- *
11
- * - Takes the job rather than its id, so a caller hands over what `createQueryJob` gave it.
12
- * - The request reads the id off the key rather than out of a closure, which is what makes the key
13
- * the whole input.
14
- * - Terminal is the job's own terminal set, not its statements': a `completed` job can still hold a
15
- * statement that failed, and what that means is the caller's business.
16
- */
17
- const createJobPoller = ({ getQueryJob }) => ({ id }, { interval, maxAttempts, timeout, signal } = {}) => require_jobStatus.poller({
18
- pollKey: ["queryService.job", { queryJobId: id }],
19
- pollFn: ({ pollKey: [, params], signal: pollSignal }) => getQueryJob(params.queryJobId, pollSignal),
20
- until: ({ data }) => require_jobStatus.jobStatus.query.isTerminal(data.status),
21
- backoff: {
22
- type: "constant",
23
- interval: interval ?? DEFAULT_POLL_INTERVAL
24
- },
25
- maxAttempts,
26
- timeout,
27
- signal
28
- });
9
+ const createJobPoller = ({ getQueryJob }) => ({ init, interval, maxAttempts, timeout, signal }) => {
10
+ const retries = require_transientRetries.transientRetries();
11
+ return require_transientRetries.poller({
12
+ pollKey: ({ id }) => ["queryService.job", { id }],
13
+ init,
14
+ pollFn: async ({ init: { id }, signal: pollSignal }) => {
15
+ const job = await getQueryJob(id, pollSignal);
16
+ retries.reset();
17
+ return job;
18
+ },
19
+ isRetryable: retries.isRetryable,
20
+ until: ({ data }) => require_transientRetries.jobStatus.query.isTerminal(data.status),
21
+ failed: (job) => {
22
+ if (job.status !== "failed") return void 0;
23
+ const failedStatements = job.statements.filter((statement) => statement.status === "failed").map((statement) => ({
24
+ id: statement.id,
25
+ error: statement.error
26
+ }));
27
+ return new require_QueryJobError.QueryJobError(failedStatements[0]?.error ?? "Job failed", job.queryJobId, { failedStatements });
28
+ },
29
+ backoff: {
30
+ type: "constant",
31
+ interval: interval ?? DEFAULT_POLL_INTERVAL
32
+ },
33
+ maxAttempts,
34
+ timeout,
35
+ signal
36
+ });
37
+ };
29
38
  //#endregion
30
39
  //#region src/clients/queryService/queryServiceClient.ts
31
40
  const createQueryServiceClient = ({ baseUrl, middlewares, auth }) => {
@@ -116,4 +125,4 @@ Object.defineProperty(exports, "createQueryServiceClient", {
116
125
  }
117
126
  });
118
127
 
119
- //# sourceMappingURL=queryService-RlNYw7LG.cjs.map
128
+ //# sourceMappingURL=queryService-CzK53q94.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryService-CzK53q94.cjs","names":["transientRetries","poller","jobStatus","QueryJobError","createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient","HttpHeader","parseContentDispositionHeader"],"sources":["../src/clients/queryService/poller.ts","../src/clients/queryService/queryServiceClient.ts"],"sourcesContent":["import { jobStatus } from '../../domain/jobStatus';\nimport { QueryJobError } from '../../errors';\nimport { poller } from '../../utils/async';\nimport { transientRetries } from '../transientRetries';\n\nimport type { GetQueryJobPath, JobStatusResponse } from './types';\n\nconst DEFAULT_POLL_INTERVAL = 2000;\n\nexport type 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 * - `init` is the job, or the request that yields it, so a caller hands over what `createQueryJob` gave it.\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 */\ntype JobRef = { id: GetQueryJobPath['queryJobId'] };\n\nexport const createJobPoller =\n ({ getQueryJob }: { getQueryJob: GetQueryJob }) =>\n ({\n init,\n interval,\n maxAttempts,\n timeout,\n signal,\n }: QueryJobPollOptions & { init: JobRef | ((signal: AbortSignal) => Promise<JobRef>) }) => {\n const retries = transientRetries();\n\n return poller({\n pollKey: ({ id }) => ['queryService.job', { id }] as const,\n init,\n pollFn: async ({ init: { id }, signal: pollSignal }) => {\n const job = await getQueryJob(id, pollSignal);\n retries.reset();\n return job;\n },\n isRetryable: retries.isRetryable,\n until: ({ data }) => jobStatus.query.isTerminal(data.status),\n failed: (job) => {\n if (job.status !== 'failed') return undefined;\n const failedStatements = job.statements\n .filter((statement) => statement.status === 'failed')\n .map((statement) => ({ id: statement.id, error: statement.error }));\n\n return new QueryJobError(failedStatements[0]?.error ?? 'Job failed', job.queryJobId, {\n failedStatements,\n });\n },\n backoff: { type: 'constant', interval: interval ?? DEFAULT_POLL_INTERVAL },\n maxAttempts,\n timeout,\n signal,\n });\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":";;;;;;;AAOA,MAAM,wBAAwB;AAuB9B,MAAa,mBACV,EAAE,mBACF,EACC,MACA,UACA,aACA,SACA,aACyF;CACzF,MAAM,UAAUA,yBAAAA,iBAAiB;CAEjC,OAAOC,yBAAAA,OAAO;EACZ,UAAU,EAAE,SAAS,CAAC,oBAAoB,EAAE,GAAG,CAAC;EAChD;EACA,QAAQ,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,iBAAiB;GACtD,MAAM,MAAM,MAAM,YAAY,IAAI,UAAU;GAC5C,QAAQ,MAAM;GACd,OAAO;EACT;EACA,aAAa,QAAQ;EACrB,QAAQ,EAAE,WAAWC,yBAAAA,UAAU,MAAM,WAAW,KAAK,MAAM;EAC3D,SAAS,QAAQ;GACf,IAAI,IAAI,WAAW,UAAU,OAAO,KAAA;GACpC,MAAM,mBAAmB,IAAI,WAC1B,QAAQ,cAAc,UAAU,WAAW,QAAQ,CAAC,CACpD,KAAK,eAAe;IAAE,IAAI,UAAU;IAAI,OAAO,UAAU;GAAM,EAAE;GAEpE,OAAO,IAAIC,sBAAAA,cAAc,iBAAiB,EAAE,EAAE,SAAS,cAAc,IAAI,YAAY,EACnF,iBACF,CAAC;EACH;EACA,SAAS;GAAE,MAAM;GAAY,UAAU,YAAY;EAAsB;EACzE;EACA;EACA;CACF,CAAC;AACH;;;AC1CF,MAAa,4BAA4B,EAAE,SAAS,aAAa,WAA8B;CAC7F,MAAM,SAASC,iCAAAA,yBAAgC;EAC7C;EACA;EACA,SAASC,aAAAA,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgBC,iCAAAA,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,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,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_queue = require("../queue-BrgRdtOr.cjs");
2
+ const require_queue = require("../queue-BJvDWriM.cjs");
3
3
  exports.createQueueClient = require_queue.createQueueClient;
@@ -1,17 +1,22 @@
1
- import { kt as Poller } from "../index-syAYY5LC.cjs";
2
- import { n as ClientInitOptions } from "../types-BksK2Eo0.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-CGhu0tID.cjs";
1
+ import { Br as CreateJobBody, Hr as KillJobPath, Jr as SearchGroupedJobsQuery, Qr as components, Vr as GetQueueJobPath, Wr as OrchestrationRerunPlanPath, Xr as SearchJobsQuery, qr as SearchAllJobsQuery } from "../index-XaPb6unB.cjs";
2
+ import { Kt as Poller } from "../index-CkwZ5x7E.cjs";
3
+ import { n as ClientInitOptions } from "../types-OkQWmonU.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>;
7
- poller: ({ id, component }: {
8
- id: GetQueueJobPath['jobId'];
9
- component: string;
10
- }, { interval, maxAttempts, timeout, signal }?: {
7
+ poller: ({ init, interval, maxAttempts, timeout, signal }: {
11
8
  interval?: number;
12
9
  maxAttempts?: number;
13
10
  timeout?: number;
14
11
  signal?: AbortSignal;
12
+ } & {
13
+ init: {
14
+ id: GetQueueJobPath['jobId'];
15
+ component: string;
16
+ } | ((signal: AbortSignal) => Promise<{
17
+ id: GetQueueJobPath['jobId'];
18
+ component: string;
19
+ }>);
15
20
  }) => Poller<{
16
21
  id: string;
17
22
  runId: string;
@@ -75,6 +80,69 @@ declare const createQueueClient: ({ baseUrl, middlewares, auth }: ClientInitOpti
75
80
  previousJobId?: string | null;
76
81
  onlyOrchestrationTaskIds?: string[] | null;
77
82
  onlyFlowTaskIds?: string[] | null;
83
+ }, {
84
+ id: string;
85
+ runId: string;
86
+ branchId?: string;
87
+ project: {
88
+ id: string;
89
+ };
90
+ token: {
91
+ id?: string;
92
+ description?: string;
93
+ };
94
+ status: components['schemas']['JobStatus'];
95
+ desiredStatus?: 'processing' | 'terminating' | null;
96
+ component: string;
97
+ mode: 'run' | 'debug';
98
+ tag?: string | null;
99
+ config?: string | null;
100
+ configRow?: string | null;
101
+ configData?: Record<string, never> | null;
102
+ result?: {
103
+ images?: {
104
+ digests?: string[];
105
+ id?: string;
106
+ }[];
107
+ configVersion?: number;
108
+ message?: string;
109
+ } | null;
110
+ createdTime: string;
111
+ startTime?: string | null;
112
+ endTime?: string | null;
113
+ delayedStartTime?: string | null;
114
+ durationSeconds?: number | null;
115
+ isFinished: boolean;
116
+ isSuccess: boolean | null;
117
+ url: string;
118
+ variableValuesId?: string | null;
119
+ variableValuesData?: {
120
+ values?: {
121
+ name?: string;
122
+ value?: string;
123
+ }[];
124
+ } | null;
125
+ backend?: {
126
+ type?: string;
127
+ containerType?: string;
128
+ context?: string;
129
+ } | null;
130
+ metrics?: {
131
+ storage?: {
132
+ inputTablesBytesSum?: number;
133
+ outputTablesBytesSum?: number;
134
+ };
135
+ backend?: {
136
+ type?: string;
137
+ containerType?: string;
138
+ context?: string;
139
+ };
140
+ } | null;
141
+ type?: components['schemas']['JobType'];
142
+ orchestrationTaskId?: string | null;
143
+ previousJobId?: string | null;
144
+ onlyOrchestrationTaskIds?: string[] | null;
145
+ onlyFlowTaskIds?: string[] | null;
78
146
  }>;
79
147
  getJob: (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => Promise<{
80
148
  id: string;
@@ -1,17 +1,22 @@
1
- import { kt as Poller } from "../index-BP3choXr.js";
2
- import { n as ClientInitOptions } from "../types-BuKviWct.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-P_61P9Nd.js";
1
+ import { Br as CreateJobBody, Hr as KillJobPath, Jr as SearchGroupedJobsQuery, Qr as components, Vr as GetQueueJobPath, Wr as OrchestrationRerunPlanPath, Xr as SearchJobsQuery, qr as SearchAllJobsQuery } from "../index-r6YSe8B-.js";
2
+ import { Kt as Poller } from "../index-CAWy1qjR.js";
3
+ import { n as ClientInitOptions } from "../types-Cw9UISvM.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>;
7
- poller: ({ id, component }: {
8
- id: GetQueueJobPath['jobId'];
9
- component: string;
10
- }, { interval, maxAttempts, timeout, signal }?: {
7
+ poller: ({ init, interval, maxAttempts, timeout, signal }: {
11
8
  interval?: number;
12
9
  maxAttempts?: number;
13
10
  timeout?: number;
14
11
  signal?: AbortSignal;
12
+ } & {
13
+ init: {
14
+ id: GetQueueJobPath['jobId'];
15
+ component: string;
16
+ } | ((signal: AbortSignal) => Promise<{
17
+ id: GetQueueJobPath['jobId'];
18
+ component: string;
19
+ }>);
15
20
  }) => Poller<{
16
21
  id: string;
17
22
  runId: string;
@@ -75,6 +80,69 @@ declare const createQueueClient: ({ baseUrl, middlewares, auth }: ClientInitOpti
75
80
  previousJobId?: string | null;
76
81
  onlyOrchestrationTaskIds?: string[] | null;
77
82
  onlyFlowTaskIds?: string[] | null;
83
+ }, {
84
+ id: string;
85
+ runId: string;
86
+ branchId?: string;
87
+ project: {
88
+ id: string;
89
+ };
90
+ token: {
91
+ id?: string;
92
+ description?: string;
93
+ };
94
+ status: components['schemas']['JobStatus'];
95
+ desiredStatus?: 'processing' | 'terminating' | null;
96
+ component: string;
97
+ mode: 'run' | 'debug';
98
+ tag?: string | null;
99
+ config?: string | null;
100
+ configRow?: string | null;
101
+ configData?: Record<string, never> | null;
102
+ result?: {
103
+ images?: {
104
+ digests?: string[];
105
+ id?: string;
106
+ }[];
107
+ configVersion?: number;
108
+ message?: string;
109
+ } | null;
110
+ createdTime: string;
111
+ startTime?: string | null;
112
+ endTime?: string | null;
113
+ delayedStartTime?: string | null;
114
+ durationSeconds?: number | null;
115
+ isFinished: boolean;
116
+ isSuccess: boolean | null;
117
+ url: string;
118
+ variableValuesId?: string | null;
119
+ variableValuesData?: {
120
+ values?: {
121
+ name?: string;
122
+ value?: string;
123
+ }[];
124
+ } | null;
125
+ backend?: {
126
+ type?: string;
127
+ containerType?: string;
128
+ context?: string;
129
+ } | null;
130
+ metrics?: {
131
+ storage?: {
132
+ inputTablesBytesSum?: number;
133
+ outputTablesBytesSum?: number;
134
+ };
135
+ backend?: {
136
+ type?: string;
137
+ containerType?: string;
138
+ context?: string;
139
+ };
140
+ } | null;
141
+ type?: components['schemas']['JobType'];
142
+ orchestrationTaskId?: string | null;
143
+ previousJobId?: string | null;
144
+ onlyOrchestrationTaskIds?: string[] | null;
145
+ onlyFlowTaskIds?: string[] | null;
78
146
  }>;
79
147
  getJob: (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => Promise<{
80
148
  id: string;
@@ -1,2 +1,2 @@
1
- import { t as createQueueClient } from "../queue-CNvR-M23.js";
1
+ import { t as createQueueClient } from "../queue-D6-x4OGF.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-CGhu0tID.cjs";
1
+ import { Br as CreateJobBody, Gr as QueueJob, Hr as KillJobPath, Jr as SearchGroupedJobsQuery, Kr as QueueJobStatus, Ur as OrchestrationRerunPlan, Vr as GetQueueJobPath, Wr as OrchestrationRerunPlanPath, Xr as SearchJobsQuery, Yr as SearchGroupedJobsResponse, Zr as SearchJobsResponse, qr as SearchAllJobsQuery } from "../index-XaPb6unB.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-P_61P9Nd.js";
1
+ import { Br as CreateJobBody, Gr as QueueJob, Hr as KillJobPath, Jr as SearchGroupedJobsQuery, Kr as QueueJobStatus, Ur as OrchestrationRerunPlan, Vr as GetQueueJobPath, Wr as OrchestrationRerunPlanPath, Xr as SearchJobsQuery, Yr as SearchGroupedJobsResponse, Zr as SearchJobsResponse, qr as SearchAllJobsQuery } from "../index-r6YSe8B-.js";
2
2
  export { CreateJobBody, GetQueueJobPath, KillJobPath, OrchestrationRerunPlan, OrchestrationRerunPlanPath, QueueJob, QueueJobStatus, SearchAllJobsQuery, SearchGroupedJobsQuery, SearchGroupedJobsResponse, SearchJobsQuery, SearchJobsResponse };