@keboola/api-client 32.0.0 → 33.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 (377) hide show
  1. package/AGENTS.md +80 -2
  2. package/API-SURFACE.md +4 -1
  3. package/CHANGELOG.md +222 -0
  4. package/dist/{ManagementClientAuthError-B-tyPlyG.cjs → ManagementClientAuthError-DqeXL8nv.cjs} +2 -2
  5. package/dist/{ManagementClientAuthError-B-tyPlyG.cjs.map → ManagementClientAuthError-DqeXL8nv.cjs.map} +1 -1
  6. package/dist/{ManagementClientAuthError-BAFNvOdf.js → ManagementClientAuthError-iKbBugKC.js} +2 -2
  7. package/dist/{ManagementClientAuthError-BAFNvOdf.js.map → ManagementClientAuthError-iKbBugKC.js.map} +1 -1
  8. package/dist/ai/index.cjs +2 -2
  9. package/dist/ai/index.d.cts +2 -2
  10. package/dist/ai/index.d.ts +2 -2
  11. package/dist/ai/index.js +2 -2
  12. package/dist/ai/types.d.cts +1 -1
  13. package/dist/ai/types.d.ts +1 -1
  14. package/dist/{appLogs-DTLE6HTy.js → appLogs-D72eD8vP.js} +2 -2
  15. package/dist/{appLogs-DTLE6HTy.js.map → appLogs-D72eD8vP.js.map} +1 -1
  16. package/dist/{appLogs-NIEDTDHf.cjs → appLogs-D8K0VeNM.cjs} +2 -2
  17. package/dist/{appLogs-NIEDTDHf.cjs.map → appLogs-D8K0VeNM.cjs.map} +1 -1
  18. package/dist/{appLogs-BAaaGYKg.d.cts → appLogs-Q4A7A_Fc.d.cts} +2 -2
  19. package/dist/{appLogs-DX_WTBCa.d.ts → appLogs-u0XMZLjS.d.ts} +2 -2
  20. package/dist/apps/index.cjs +3 -3
  21. package/dist/apps/index.d.cts +3 -3
  22. package/dist/apps/index.d.ts +3 -3
  23. package/dist/apps/index.js +3 -3
  24. package/dist/apps/types.d.cts +2 -2
  25. package/dist/apps/types.d.ts +2 -2
  26. package/dist/assets/index.cjs +1 -1
  27. package/dist/assets/index.d.cts +1 -1
  28. package/dist/assets/index.d.ts +1 -1
  29. package/dist/assets/index.js +1 -1
  30. package/dist/auth/index.cjs +1 -1
  31. package/dist/auth/index.d.cts +1 -1
  32. package/dist/auth/index.d.ts +1 -1
  33. package/dist/auth/index.js +1 -1
  34. package/dist/auth/types.d.cts +2 -2
  35. package/dist/auth/types.d.ts +2 -2
  36. package/dist/{auth-DP-6TFiM.cjs → auth-C2_JLisH.cjs} +2 -2
  37. package/dist/{auth-DP-6TFiM.cjs.map → auth-C2_JLisH.cjs.map} +1 -1
  38. package/dist/{auth-DtbQaeDj.js → auth-CE9rQV3-.js} +2 -2
  39. package/dist/{auth-DtbQaeDj.js.map → auth-CE9rQV3-.js.map} +1 -1
  40. package/dist/{authClient--BtZgjIc.js → authClient-DEyqR7GW.js} +43 -9
  41. package/dist/authClient-DEyqR7GW.js.map +1 -0
  42. package/dist/{authClient-DhfzOUaa.d.cts → authClient-DZ_8lvdJ.d.cts} +6 -6
  43. package/dist/{authClient-CtfyVHRD.d.ts → authClient-DwT6xdg5.d.ts} +6 -6
  44. package/dist/{authClient-b7uec7sw.cjs → authClient-IwQ9Ti0J.cjs} +43 -9
  45. package/dist/authClient-IwQ9Ti0J.cjs.map +1 -0
  46. package/dist/chat/index.cjs +3 -3
  47. package/dist/chat/index.d.cts +2 -2
  48. package/dist/chat/index.d.ts +2 -2
  49. package/dist/chat/index.js +3 -3
  50. package/dist/chat/types.d.cts +1 -1
  51. package/dist/chat/types.d.ts +1 -1
  52. package/dist/{createFetchClient-BbG46bL0.js → createFetchClient-DdyZMhxO.js} +3 -2
  53. package/dist/{createFetchClient-BbG46bL0.js.map → createFetchClient-DdyZMhxO.js.map} +1 -1
  54. package/dist/{createFetchClient-BRfTjBLV.cjs → createFetchClient-DvZvD31l.cjs} +8 -1
  55. package/dist/{createFetchClient-BRfTjBLV.cjs.map → createFetchClient-DvZvD31l.cjs.map} +1 -1
  56. package/dist/{createGenericFetchClient-BHYQLZhe.js → createGenericFetchClient-MQeLRiNW.js} +2 -2
  57. package/dist/{createGenericFetchClient-BHYQLZhe.js.map → createGenericFetchClient-MQeLRiNW.js.map} +1 -1
  58. package/dist/{createGenericFetchClient-DHs-i7_O.cjs → createGenericFetchClient-qfCZlCTv.cjs} +2 -2
  59. package/dist/{createGenericFetchClient-DHs-i7_O.cjs.map → createGenericFetchClient-qfCZlCTv.cjs.map} +1 -1
  60. package/dist/{createOpenapiFetchClient-CyDUFxHB.cjs → createOpenapiFetchClient-C57Ljzi6.cjs} +2 -2
  61. package/dist/{createOpenapiFetchClient-CyDUFxHB.cjs.map → createOpenapiFetchClient-C57Ljzi6.cjs.map} +1 -1
  62. package/dist/{createOpenapiFetchClient-Bn6_Pn0H.js → createOpenapiFetchClient-E7OIVkYv.js} +2 -2
  63. package/dist/{createOpenapiFetchClient-Bn6_Pn0H.js.map → createOpenapiFetchClient-E7OIVkYv.js.map} +1 -1
  64. package/dist/{credential-d2RDcXRB.js → credential-Bxv7yxOZ.js} +7 -4
  65. package/dist/credential-Bxv7yxOZ.js.map +1 -0
  66. package/dist/{credential-DOXH7XRS.cjs → credential-D-X5QQrM.cjs} +7 -4
  67. package/dist/credential-D-X5QQrM.cjs.map +1 -0
  68. package/dist/dataScience/index.cjs +2 -2
  69. package/dist/dataScience/index.d.cts +2 -2
  70. package/dist/dataScience/index.d.ts +2 -2
  71. package/dist/dataScience/index.js +2 -2
  72. package/dist/dataScience/types.d.cts +2 -2
  73. package/dist/dataScience/types.d.ts +2 -2
  74. package/dist/{dataScience-wexHEIue.cjs → dataScience-BPW993AG.cjs} +5 -5
  75. package/dist/{dataScience-wexHEIue.cjs.map → dataScience-BPW993AG.cjs.map} +1 -1
  76. package/dist/{dataScience-Sm8iONhP.js → dataScience-B_TA7wCB.js} +5 -5
  77. package/dist/{dataScience-Sm8iONhP.js.map → dataScience-B_TA7wCB.js.map} +1 -1
  78. package/dist/developerPortal/index.cjs +1 -1
  79. package/dist/developerPortal/index.d.cts +2 -2
  80. package/dist/developerPortal/index.d.ts +2 -2
  81. package/dist/developerPortal/index.js +1 -1
  82. package/dist/developerPortal/types.d.cts +1 -1
  83. package/dist/developerPortal/types.d.ts +1 -1
  84. package/dist/{developerPortalClient-CgTSzLoG.cjs → developerPortalClient-Db2XVB_o.cjs} +3 -3
  85. package/dist/{developerPortalClient-CgTSzLoG.cjs.map → developerPortalClient-Db2XVB_o.cjs.map} +1 -1
  86. package/dist/{developerPortalClient-DywKpDlW.js → developerPortalClient-jk46sjwP.js} +3 -3
  87. package/dist/{developerPortalClient-DywKpDlW.js.map → developerPortalClient-jk46sjwP.js.map} +1 -1
  88. package/dist/domain/permissions/index.d.cts +2 -2
  89. package/dist/domain/permissions/index.d.ts +2 -2
  90. package/dist/editor/index.cjs +2 -2
  91. package/dist/editor/index.d.cts +2 -2
  92. package/dist/editor/index.d.ts +2 -2
  93. package/dist/editor/index.js +2 -2
  94. package/dist/editor/types.d.cts +1 -1
  95. package/dist/editor/types.d.ts +1 -1
  96. package/dist/emitter-dLF1Fyfg.d.cts +11 -0
  97. package/dist/emitter-dLF1Fyfg.d.ts +11 -0
  98. package/dist/encryption/index.cjs +1 -1
  99. package/dist/encryption/index.d.cts +1 -1
  100. package/dist/encryption/index.d.ts +1 -1
  101. package/dist/encryption/index.js +1 -1
  102. package/dist/encryption/types.d.cts +1 -1
  103. package/dist/encryption/types.d.ts +1 -1
  104. package/dist/import/index.cjs +1 -1
  105. package/dist/import/index.d.cts +3 -3
  106. package/dist/import/index.d.ts +3 -3
  107. package/dist/import/index.js +1 -1
  108. package/dist/{import-SQuurg1G.js → import-2nqxQ9Rt.js} +3 -3
  109. package/dist/{import-SQuurg1G.js.map → import-2nqxQ9Rt.js.map} +1 -1
  110. package/dist/{import-C0-y1GQK.cjs → import-DJilJ6tq.cjs} +3 -3
  111. package/dist/{import-C0-y1GQK.cjs.map → import-DJilJ6tq.cjs.map} +1 -1
  112. package/dist/{index-FhKX7Cv1.d.ts → index-B0V1pJAa.d.ts} +241 -200
  113. package/dist/{index-Bg1P6Bb2.d.ts → index-B2OGaUap.d.ts} +6 -6
  114. package/dist/{index-Dbzjvy5h.d.ts → index-BjKjp3Rf.d.ts} +5 -5
  115. package/dist/{index-DeKPpYQy.d.ts → index-C7gxKoDF.d.cts} +3 -3
  116. package/dist/{index-D_7yCRKy.d.cts → index-CTd4YY8e.d.cts} +4 -4
  117. package/dist/{index-DiHHyMEo.d.cts → index-CUXEFQ7i.d.cts} +6 -6
  118. package/dist/{index-eAlN694c.d.cts → index-CVqk63at.d.ts} +3 -3
  119. package/dist/{index-Bc_hXWae.d.ts → index-C_cxKL1V.d.ts} +3 -3
  120. package/dist/{index-tKsiUarj.d.ts → index-ChMtULt4.d.ts} +4 -4
  121. package/dist/{index-Gn1H63Hk.d.cts → index-DCN2lH0v.d.cts} +4 -4
  122. package/dist/{index-Bjk-tCpG.d.cts → index-DIVvL54G.d.cts} +241 -200
  123. package/dist/{index-C7e3wBt9.d.cts → index-DLYAvSWZ.d.cts} +3 -3
  124. package/dist/{index-fHfc_VqS.d.ts → index-DQef014j.d.ts} +4 -4
  125. package/dist/{index-CeJOmN-P.d.ts → index-DVhTNwvu.d.ts} +3 -2
  126. package/dist/{index-CQrKS7PV.d.cts → index-DhVFuQDv.d.cts} +3 -2
  127. package/dist/{index-Ctqkm3Fx.d.ts → index-GNKwr7EQ.d.ts} +4 -4
  128. package/dist/{index-GDdFZCXp.d.ts → index-bB6wvw1f.d.ts} +4 -4
  129. package/dist/{index-BKh0prif.d.cts → index-exNi3I2Q.d.cts} +4 -4
  130. package/dist/{index-CXtdQ7be.d.cts → index-qOK5FtAH.d.cts} +4 -4
  131. package/dist/{index-DqOAjqxN.d.cts → index-t-a7kYnx.d.cts} +5 -5
  132. package/dist/index.cjs +303 -47
  133. package/dist/index.cjs.map +1 -1
  134. package/dist/index.d.cts +7 -6
  135. package/dist/index.d.ts +7 -6
  136. package/dist/index.js +285 -30
  137. package/dist/index.js.map +1 -1
  138. package/dist/{jobStatus-kQ9JqF8t.cjs → jobStatus-0_Y3Sr4i.cjs} +37 -20
  139. package/dist/jobStatus-0_Y3Sr4i.cjs.map +1 -0
  140. package/dist/{jobStatus-DbMupQEK.js → jobStatus-PSZJMTiA.js} +35 -18
  141. package/dist/jobStatus-PSZJMTiA.js.map +1 -0
  142. package/dist/kaiAgent/index.cjs +1 -1
  143. package/dist/kaiAgent/index.d.cts +2 -210
  144. package/dist/kaiAgent/index.d.ts +2 -210
  145. package/dist/kaiAgent/index.js +1 -1
  146. package/dist/kaiAgent/types.d.cts +1 -1
  147. package/dist/kaiAgent/types.d.ts +1 -1
  148. package/dist/{kaiAgent-4OiIK1C2.cjs → kaiAgent-CMVub6Sc.cjs} +48 -4
  149. package/dist/kaiAgent-CMVub6Sc.cjs.map +1 -0
  150. package/dist/{kaiAgent-HDaFS9BR.js → kaiAgent-CYYn0QJW.js} +48 -4
  151. package/dist/kaiAgent-CYYn0QJW.js.map +1 -0
  152. package/dist/kaiAgentClient-B2O0DF4d.d.ts +249 -0
  153. package/dist/kaiAgentClient-iCFR2tRU.d.cts +249 -0
  154. package/dist/management/index.cjs +1 -1
  155. package/dist/management/index.d.cts +1 -1
  156. package/dist/management/index.d.ts +1 -1
  157. package/dist/management/index.js +1 -1
  158. package/dist/management/types.d.cts +1 -1
  159. package/dist/management/types.d.ts +1 -1
  160. package/dist/{management-DfjwQo7z.cjs → management-DGfgKsaA.cjs} +5 -5
  161. package/dist/{management-DfjwQo7z.cjs.map → management-DGfgKsaA.cjs.map} +1 -1
  162. package/dist/{management-CIFhu1Nm.js → management-DNEKhR6a.js} +5 -5
  163. package/dist/{management-CIFhu1Nm.js.map → management-DNEKhR6a.js.map} +1 -1
  164. package/dist/metastore/index.cjs +1 -1
  165. package/dist/metastore/index.d.cts +1 -1
  166. package/dist/metastore/index.d.ts +1 -1
  167. package/dist/metastore/index.js +1 -1
  168. package/dist/metastore/types.d.cts +1 -1
  169. package/dist/metastore/types.d.ts +1 -1
  170. package/dist/{metastore-CrXkKufo.js → metastore-CjwktHvw.js} +4 -4
  171. package/dist/{metastore-CrXkKufo.js.map → metastore-CjwktHvw.js.map} +1 -1
  172. package/dist/{metastore-Dq2NS6jb.cjs → metastore-DksEte8P.cjs} +4 -4
  173. package/dist/{metastore-Dq2NS6jb.cjs.map → metastore-DksEte8P.cjs.map} +1 -1
  174. package/dist/microsoftGraph/index.cjs +2 -2
  175. package/dist/microsoftGraph/index.d.cts +2 -2
  176. package/dist/microsoftGraph/index.d.ts +2 -2
  177. package/dist/microsoftGraph/index.js +2 -2
  178. package/dist/microsoftGraph/types.d.cts +1 -1
  179. package/dist/microsoftGraph/types.d.ts +1 -1
  180. package/dist/notifications/index.cjs +3 -3
  181. package/dist/notifications/index.d.cts +2 -2
  182. package/dist/notifications/index.d.ts +2 -2
  183. package/dist/notifications/index.js +3 -3
  184. package/dist/notifications/types.d.cts +1 -1
  185. package/dist/notifications/types.d.ts +1 -1
  186. package/dist/oauth/index.cjs +1 -1
  187. package/dist/oauth/index.d.cts +2 -2
  188. package/dist/oauth/index.d.ts +2 -2
  189. package/dist/oauth/index.js +1 -1
  190. package/dist/oauth/types.d.cts +1 -1
  191. package/dist/oauth/types.d.ts +1 -1
  192. package/dist/{oauth-CFwSNz37.js → oauth-Bg5zro5S.js} +5 -5
  193. package/dist/{oauth-CFwSNz37.js.map → oauth-Bg5zro5S.js.map} +1 -1
  194. package/dist/{oauth-CkW5gln-.cjs → oauth-DFsI1TE5.cjs} +5 -5
  195. package/dist/{oauth-CkW5gln-.cjs.map → oauth-DFsI1TE5.cjs.map} +1 -1
  196. package/dist/omnisearch/index.cjs +2 -2
  197. package/dist/omnisearch/index.d.cts +2 -2
  198. package/dist/omnisearch/index.d.ts +2 -2
  199. package/dist/omnisearch/index.js +2 -2
  200. package/dist/omnisearch/types.d.cts +1 -1
  201. package/dist/omnisearch/types.d.ts +1 -1
  202. package/dist/{project-BOGaVs-q.d.ts → project-Bh954iOA.d.ts} +2 -2
  203. package/dist/{project-BnQkL8cb.d.cts → project-D25GH8zK.d.cts} +2 -2
  204. package/dist/queryService/index.cjs +1 -1
  205. package/dist/queryService/index.d.cts +1 -1
  206. package/dist/queryService/index.d.ts +1 -1
  207. package/dist/queryService/index.js +1 -1
  208. package/dist/queryService/types.d.cts +1 -1
  209. package/dist/queryService/types.d.ts +1 -1
  210. package/dist/{queryService-BLaGbpm-.cjs → queryService--t_W9PSJ.cjs} +6 -6
  211. package/dist/{queryService-BLaGbpm-.cjs.map → queryService--t_W9PSJ.cjs.map} +1 -1
  212. package/dist/{queryService-DK-jUnET.js → queryService-DX6zeAs_.js} +6 -6
  213. package/dist/{queryService-DK-jUnET.js.map → queryService-DX6zeAs_.js.map} +1 -1
  214. package/dist/queue/index.cjs +1 -1
  215. package/dist/queue/index.d.cts +3 -3
  216. package/dist/queue/index.d.ts +3 -3
  217. package/dist/queue/index.js +1 -1
  218. package/dist/queue/types.d.cts +1 -1
  219. package/dist/queue/types.d.ts +1 -1
  220. package/dist/{queue-B7TY4JLf.cjs → queue-D1_TCe0z.cjs} +5 -5
  221. package/dist/{queue-B7TY4JLf.cjs.map → queue-D1_TCe0z.cjs.map} +1 -1
  222. package/dist/{queue-DViSQ-eq.js → queue-DrLUbk98.js} +5 -5
  223. package/dist/{queue-DViSQ-eq.js.map → queue-DrLUbk98.js.map} +1 -1
  224. package/dist/scheduler/index.cjs +3 -3
  225. package/dist/scheduler/index.d.cts +2 -2
  226. package/dist/scheduler/index.d.ts +2 -2
  227. package/dist/scheduler/index.js +3 -3
  228. package/dist/scheduler/types.d.cts +1 -1
  229. package/dist/scheduler/types.d.ts +1 -1
  230. package/dist/sdk/configurations/index.d.cts +4 -4
  231. package/dist/sdk/configurations/index.d.ts +4 -4
  232. package/dist/sdk/developerPortal/index.cjs +5 -5
  233. package/dist/sdk/developerPortal/index.cjs.map +1 -1
  234. package/dist/sdk/developerPortal/index.d.cts +5 -4
  235. package/dist/sdk/developerPortal/index.d.ts +5 -4
  236. package/dist/sdk/developerPortal/index.js +4 -4
  237. package/dist/sdk/queryService/index.cjs +1 -1
  238. package/dist/sdk/queryService/index.d.cts +1 -1
  239. package/dist/sdk/queryService/index.d.ts +1 -1
  240. package/dist/sdk/queryService/index.js +1 -1
  241. package/dist/sdk/semanticLayer/index.cjs +163 -74
  242. package/dist/sdk/semanticLayer/index.cjs.map +1 -1
  243. package/dist/sdk/semanticLayer/index.d.cts +16 -13
  244. package/dist/sdk/semanticLayer/index.d.ts +16 -13
  245. package/dist/sdk/semanticLayer/index.js +158 -75
  246. package/dist/sdk/semanticLayer/index.js.map +1 -1
  247. package/dist/sdk/semanticLayer/types.d.cts +2 -2
  248. package/dist/sdk/semanticLayer/types.d.ts +2 -2
  249. package/dist/sdk/storage/index.d.cts +1 -1
  250. package/dist/sdk/storage/index.d.ts +1 -1
  251. package/dist/sdk/tag/index.d.cts +2 -2
  252. package/dist/sdk/tag/index.d.ts +2 -2
  253. package/dist/sdk/tag/types.d.cts +1 -1
  254. package/dist/sdk/tag/types.d.ts +1 -1
  255. package/dist/sdk/vault/index.d.cts +1 -1
  256. package/dist/sdk/vault/index.d.ts +1 -1
  257. package/dist/status/index.cjs +1 -1
  258. package/dist/status/index.d.cts +1 -1
  259. package/dist/status/index.d.ts +1 -1
  260. package/dist/status/index.js +1 -1
  261. package/dist/storage/index.cjs +4 -4
  262. package/dist/storage/index.d.cts +2 -2
  263. package/dist/storage/index.d.ts +2 -2
  264. package/dist/storage/index.js +4 -4
  265. package/dist/storage/types.d.cts +2 -2
  266. package/dist/storage/types.d.ts +2 -2
  267. package/dist/{storage-kgxscFEg.js → storage--cVaecFq.js} +7 -7
  268. package/dist/{storage-kgxscFEg.js.map → storage--cVaecFq.js.map} +1 -1
  269. package/dist/{storage-CihHwZ7z.cjs → storage-DexWot8H.cjs} +7 -7
  270. package/dist/{storage-CihHwZ7z.cjs.map → storage-DexWot8H.cjs.map} +1 -1
  271. package/dist/store-C9FQCHGe.js +74 -0
  272. package/dist/store-C9FQCHGe.js.map +1 -0
  273. package/dist/store-xS-Cu_VS.cjs +85 -0
  274. package/dist/store-xS-Cu_VS.cjs.map +1 -0
  275. package/dist/stream/index.cjs +3 -3
  276. package/dist/stream/index.d.cts +2 -2
  277. package/dist/stream/index.d.ts +2 -2
  278. package/dist/stream/index.js +3 -3
  279. package/dist/stream/types.d.cts +1 -1
  280. package/dist/stream/types.d.ts +1 -1
  281. package/dist/syncActions/index.cjs +1 -1
  282. package/dist/syncActions/index.d.cts +1 -1
  283. package/dist/syncActions/index.d.ts +1 -1
  284. package/dist/syncActions/index.js +1 -1
  285. package/dist/syncActions/types.d.cts +1 -1
  286. package/dist/syncActions/types.d.ts +1 -1
  287. package/dist/{syncActions-B75t0NwP.js → syncActions-CkMHM-jB.js} +5 -5
  288. package/dist/{syncActions-B75t0NwP.js.map → syncActions-CkMHM-jB.js.map} +1 -1
  289. package/dist/{syncActions-CevF_TEb.cjs → syncActions-DQq_A9v6.cjs} +5 -5
  290. package/dist/{syncActions-CevF_TEb.cjs.map → syncActions-DQq_A9v6.cjs.map} +1 -1
  291. package/dist/telemetry/index.cjs +1 -1
  292. package/dist/telemetry/index.d.cts +2 -2
  293. package/dist/telemetry/index.d.ts +2 -2
  294. package/dist/telemetry/index.js +1 -1
  295. package/dist/{telemetry-DwlSLVAU.cjs → telemetry-CAu1Qt7B.cjs} +3 -3
  296. package/dist/{telemetry-DwlSLVAU.cjs.map → telemetry-CAu1Qt7B.cjs.map} +1 -1
  297. package/dist/{telemetry-FXpodtJN.js → telemetry-Ca6j0i9w.js} +3 -3
  298. package/dist/{telemetry-FXpodtJN.js.map → telemetry-Ca6j0i9w.js.map} +1 -1
  299. package/dist/{types-CGH_lfxS.d.cts → types-0xa_7cgo.d.cts} +2 -2
  300. package/dist/{types-CyiRYRVq.d.cts → types-3p0adMdd.d.cts} +3 -3
  301. package/dist/{types-BlCoTm7n.d.ts → types-6ThDkaJw.d.ts} +2 -2
  302. package/dist/{types-CkcMoXRk.d.ts → types-6hh_3SZs.d.ts} +3 -3
  303. package/dist/{types-dybUhlU2.d.ts → types-6ku2LeX6.d.ts} +2 -2
  304. package/dist/{types-BH9ljNmj.d.cts → types-B42HhyB0.d.cts} +2 -2
  305. package/dist/{types-C1vhYcic.d.cts → types-B4_MM5Wf.d.cts} +2 -2
  306. package/dist/{types-DlbiVsVo.d.cts → types-B6JJCta-.d.cts} +2 -2
  307. package/dist/{types-sVYo0o9_.d.ts → types-B6lOyHY_.d.ts} +3 -3
  308. package/dist/{types-BZBdLUpH.d.ts → types-B7O5koJb.d.cts} +2 -2
  309. package/dist/{types-De_DA2ga.d.ts → types-BHI8Lin9.d.ts} +2 -2
  310. package/dist/{types-Cj4bLPp5.d.cts → types-BO3sCD0a.d.cts} +37 -6
  311. package/dist/{types-zA3H84SM.d.cts → types-BOnf68s5.d.cts} +2 -2
  312. package/dist/{types-CPanB0p7.d.cts → types-BS5M67xm.d.cts} +3 -3
  313. package/dist/{types-COIsNoTQ.d.cts → types-BT46XIgn.d.cts} +2 -2
  314. package/dist/types-BUYqdN7B.d.ts +205 -0
  315. package/dist/{types-D-qI9ne4.d.ts → types-BYKHr5bR.d.ts} +2 -2
  316. package/dist/{types-D1uloiuY.d.cts → types-Be3Wgn1U.d.cts} +2 -2
  317. package/dist/{types-BTbczawY.d.ts → types-BgVKG4vg.d.ts} +2 -2
  318. package/dist/{types-CyHZ1ZQe.d.ts → types-C2gzqtjf.d.ts} +2 -2
  319. package/dist/{types-Av2egS_l.d.ts → types-C35GWNmq.d.ts} +2 -2
  320. package/dist/{types-D6jKxUv_.d.ts → types-C4mr0lop.d.ts} +35 -3
  321. package/dist/{types-BI2jI-3-.d.cts → types-CCr1-9Q6.d.cts} +3 -3
  322. package/dist/{types-DeSd3gqW.d.ts → types-CHCM9oNk.d.ts} +3 -3
  323. package/dist/{types-BMQW-2Yw.d.ts → types-CNQdtffE.d.ts} +729 -79
  324. package/dist/{types-MbcIiKDI.d.cts → types-CPaluTW7.d.cts} +3 -3
  325. package/dist/{types-CXTqFYah.d.ts → types-CSc8NQCY.d.ts} +37 -6
  326. package/dist/{types-Cz1dj_TM.d.ts → types-C_ilZZkQ.d.ts} +2 -2
  327. package/dist/{types-EJEoI3ZK.d.ts → types-CaMfshWX.d.ts} +2 -2
  328. package/dist/{types-BoV9M5Xg.d.cts → types-Ccgbipp4.d.cts} +2 -2
  329. package/dist/{types-DuiUN0h8.d.ts → types-Cpjk0-ta.d.ts} +2 -2
  330. package/dist/{types-GuWtMCMn.d.cts → types-CrH4H8M4.d.cts} +2 -2
  331. package/dist/{types-DNXC_-fA.d.cts → types-Cu-0LT4f.d.cts} +2 -2
  332. package/dist/{types-BptQ7jpP.d.cts → types-CxmV36rp.d.cts} +2 -2
  333. package/dist/{types-DwpRt3e9.d.ts → types-D-98DirB.d.ts} +2 -2
  334. package/dist/{types-BV2BDccJ.d.cts → types-D6ocCyGh.d.cts} +35 -3
  335. package/dist/{types-COc-nind.d.cts → types-D7Wgcp0u.d.ts} +2 -2
  336. package/dist/{types-ByWD2oeV.d.ts → types-DAzmGzlb.d.ts} +2 -2
  337. package/dist/{types-BREGN3qo.d.cts → types-DHI0g51U.d.cts} +2 -2
  338. package/dist/{types-Dfc58bPE.d.ts → types-DHqIJKwx.d.ts} +2 -2
  339. package/dist/types-DONxb2-c.d.cts +205 -0
  340. package/dist/{types-Di8VIZwQ.d.ts → types-DTTC70Ac.d.ts} +2 -2
  341. package/dist/{types-C2CLlR4i.d.ts → types-DlvZeert.d.ts} +2 -2
  342. package/dist/{types-cDU_J45_.d.cts → types-DqniGeDJ.d.cts} +2 -2
  343. package/dist/{types-iNlsdRkx.d.cts → types-E3VT-zYz.d.cts} +729 -79
  344. package/dist/{types-B4jdPHoL.d.cts → types-Jt0ipbSm.d.cts} +2 -2
  345. package/dist/{types-Bpnpa2Wt.d.ts → types-Ur37iOqb.d.ts} +3 -3
  346. package/dist/{types-BnaAo7xn.d.ts → types-ZGAWRIBW.d.ts} +2 -2
  347. package/dist/{types-CvkqEvhv.d.cts → types-bY6K3y0O.d.cts} +2 -2
  348. package/dist/{types-CpALS017.d.ts → types-k4R8gQ4U.d.ts} +2 -2
  349. package/dist/{types-CcuG9cid.d.cts → types-sO52qIAA.d.cts} +2 -2
  350. package/dist/{types-CJHi0zdD.d.cts → types-sp1rJY9E.d.cts} +2 -2
  351. package/dist/{validateConnectionStatus-V9q6Nl6u.cjs → validateConnectionStatus-24zqIQ0p.cjs} +2 -2
  352. package/dist/{validateConnectionStatus-V9q6Nl6u.cjs.map → validateConnectionStatus-24zqIQ0p.cjs.map} +1 -1
  353. package/dist/{validateConnectionStatus-BrLXkoSI.js → validateConnectionStatus-DhkWg6Eq.js} +2 -2
  354. package/dist/{validateConnectionStatus-BrLXkoSI.js.map → validateConnectionStatus-DhkWg6Eq.js.map} +1 -1
  355. package/dist/vault/index.cjs +4 -4
  356. package/dist/vault/index.d.cts +1 -1
  357. package/dist/vault/index.d.ts +1 -1
  358. package/dist/vault/index.js +4 -4
  359. package/dist/vault/types.d.cts +1 -1
  360. package/dist/vault/types.d.ts +1 -1
  361. package/package.json +2 -2
  362. package/surface/auth.md +2 -2
  363. package/surface/kaiAgent.md +5 -2
  364. package/dist/authClient--BtZgjIc.js.map +0 -1
  365. package/dist/authClient-b7uec7sw.cjs.map +0 -1
  366. package/dist/createStore-BNiCRQXa.js +0 -148
  367. package/dist/createStore-BNiCRQXa.js.map +0 -1
  368. package/dist/createStore-MQbboXcB.cjs +0 -177
  369. package/dist/createStore-MQbboXcB.cjs.map +0 -1
  370. package/dist/credential-DOXH7XRS.cjs.map +0 -1
  371. package/dist/credential-d2RDcXRB.js.map +0 -1
  372. package/dist/jobStatus-DbMupQEK.js.map +0 -1
  373. package/dist/jobStatus-kQ9JqF8t.cjs.map +0 -1
  374. package/dist/kaiAgent-4OiIK1C2.cjs.map +0 -1
  375. package/dist/kaiAgent-HDaFS9BR.js.map +0 -1
  376. package/dist/types-B2vmg_UF.d.cts +0 -148
  377. package/dist/types-RfaldD4P.d.ts +0 -148
@@ -1,5 +1,5 @@
1
- import { T as MiddlewareFn } from "../index-CQrKS7PV.cjs";
2
- import { n as ClientInitOptions } from "../types-BREGN3qo.cjs";
1
+ import { E as MiddlewareFn } from "../index-DhVFuQDv.cjs";
2
+ import { n as ClientInitOptions } from "../types-DHI0g51U.cjs";
3
3
  import { t as components } from "../schema-D1oxyn1O.cjs";
4
4
  //#region src/clients/microsoftGraph/microsoftGraphClient.d.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { T as MiddlewareFn } from "../index-CeJOmN-P.js";
2
- import { n as ClientInitOptions } from "../types-DwpRt3e9.js";
1
+ import { E as MiddlewareFn } from "../index-DVhTNwvu.js";
2
+ import { n as ClientInitOptions } from "../types-D-98DirB.js";
3
3
  import { t as components } from "../schema-D1oxyn1O.js";
4
4
  //#region src/clients/microsoftGraph/microsoftGraphClient.d.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { o as HttpHeader } from "../createFetchClient-BbG46bL0.js";
2
- import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-Bn6_Pn0H.js";
1
+ import { s as HttpHeader } from "../createFetchClient-DdyZMhxO.js";
2
+ import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-E7OIVkYv.js";
3
3
  //#region src/clients/microsoftGraph/utils.ts
4
4
  const encodeSharingUrl = (sharingUrl) => {
5
5
  const binary = String.fromCharCode(...new TextEncoder().encode(sharingUrl));
@@ -1,4 +1,4 @@
1
- import { c as OpenapiReturnType } from "../index-CQrKS7PV.cjs";
1
+ import { c as OpenapiReturnType } from "../index-DhVFuQDv.cjs";
2
2
  import { n as paths } from "../schema-D1oxyn1O.cjs";
3
3
  //#region src/clients/microsoftGraph/types.d.ts
4
4
  type User = OpenapiReturnType<paths['/me']['get']>;
@@ -1,4 +1,4 @@
1
- import { c as OpenapiReturnType } from "../index-CeJOmN-P.js";
1
+ import { c as OpenapiReturnType } from "../index-DVhTNwvu.js";
2
2
  import { n as paths } from "../schema-D1oxyn1O.js";
3
3
  //#region src/clients/microsoftGraph/types.d.ts
4
4
  type User = OpenapiReturnType<paths['/me']['get']>;
@@ -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-DHs-i7_O.cjs");
4
- const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-CyDUFxHB.cjs");
5
- const require_auth = require("../auth-DP-6TFiM.cjs");
3
+ const require_createGenericFetchClient = require("../createGenericFetchClient-qfCZlCTv.cjs");
4
+ const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-C57Ljzi6.cjs");
5
+ const require_auth = require("../auth-C2_JLisH.cjs");
6
6
  //#region src/clients/notifications/notificationsClient.ts
7
7
  const createNotificationsClient = ({ baseUrl, middlewares, auth }) => {
8
8
  const client = require_createOpenapiFetchClient.createOpenapiFetchClient({
@@ -1,5 +1,5 @@
1
- import { n as ClientInitOptions } from "../types-BREGN3qo.cjs";
2
- import { a as SubscriptionId, n as ListSubscriptionsQuery, s as components, t as CreateSubscriptionBody } from "../types-cDU_J45_.cjs";
1
+ import { n as ClientInitOptions } from "../types-DHI0g51U.cjs";
2
+ import { a as SubscriptionId, n as ListSubscriptionsQuery, s as components, t as CreateSubscriptionBody } from "../types-DqniGeDJ.cjs";
3
3
  //#region src/clients/notifications/notificationsClient.d.ts
4
4
  declare const createNotificationsClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
5
5
  healthCheck: (signal?: AbortSignal) => Promise<unknown>;
@@ -1,5 +1,5 @@
1
- import { n as ClientInitOptions } from "../types-DwpRt3e9.js";
2
- import { a as SubscriptionId, n as ListSubscriptionsQuery, s as components, t as CreateSubscriptionBody } from "../types-Cz1dj_TM.js";
1
+ import { n as ClientInitOptions } from "../types-D-98DirB.js";
2
+ import { a as SubscriptionId, n as ListSubscriptionsQuery, s as components, t as CreateSubscriptionBody } from "../types-C_ilZZkQ.js";
3
3
  //#region src/clients/notifications/notificationsClient.d.ts
4
4
  declare const createNotificationsClient: ({ 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-BHYQLZhe.js";
3
- import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-Bn6_Pn0H.js";
4
- import { t as createAuthHeaders } from "../auth-DtbQaeDj.js";
2
+ import { t as createGenericFetchClient } from "../createGenericFetchClient-MQeLRiNW.js";
3
+ import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-E7OIVkYv.js";
4
+ import { t as createAuthHeaders } from "../auth-CE9rQV3-.js";
5
5
  //#region src/clients/notifications/notificationsClient.ts
6
6
  const createNotificationsClient = ({ baseUrl, middlewares, auth }) => {
7
7
  const client = createOpenapiFetchClient({
@@ -1,2 +1,2 @@
1
- import { a as SubscriptionId, i as SubscriptionFilter, n as ListSubscriptionsQuery, o as SubscriptionRecipient, r as ProjectSubscription, t as CreateSubscriptionBody } from "../types-cDU_J45_.cjs";
1
+ import { a as SubscriptionId, i as SubscriptionFilter, n as ListSubscriptionsQuery, o as SubscriptionRecipient, r as ProjectSubscription, t as CreateSubscriptionBody } from "../types-DqniGeDJ.cjs";
2
2
  export { CreateSubscriptionBody, ListSubscriptionsQuery, ProjectSubscription, SubscriptionFilter, SubscriptionId, SubscriptionRecipient };
@@ -1,2 +1,2 @@
1
- import { a as SubscriptionId, i as SubscriptionFilter, n as ListSubscriptionsQuery, o as SubscriptionRecipient, r as ProjectSubscription, t as CreateSubscriptionBody } from "../types-Cz1dj_TM.js";
1
+ import { a as SubscriptionId, i as SubscriptionFilter, n as ListSubscriptionsQuery, o as SubscriptionRecipient, r as ProjectSubscription, t as CreateSubscriptionBody } from "../types-C_ilZZkQ.js";
2
2
  export { CreateSubscriptionBody, ListSubscriptionsQuery, ProjectSubscription, SubscriptionFilter, SubscriptionId, SubscriptionRecipient };
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_oauth = require("../oauth-CkW5gln-.cjs");
2
+ const require_oauth = require("../oauth-DFsI1TE5.cjs");
3
3
  exports.createOauthClient = require_oauth.createOauthClient;
@@ -1,5 +1,5 @@
1
- import { n as ClientInitOptions } from "../types-BREGN3qo.cjs";
2
- import { a as CredentialInput, r as CreateCredentialInput, s as GetCredentialsInput } from "../types-zA3H84SM.cjs";
1
+ import { n as ClientInitOptions } from "../types-DHI0g51U.cjs";
2
+ import { a as CredentialInput, r as CreateCredentialInput, s as GetCredentialsInput } from "../types-BOnf68s5.cjs";
3
3
  //#region src/clients/oauth/oauthClient.d.ts
4
4
  declare const createOauthClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
5
5
  healthCheck: (signal?: AbortSignal) => Promise<unknown>;
@@ -1,5 +1,5 @@
1
- import { n as ClientInitOptions } from "../types-DwpRt3e9.js";
2
- import { a as CredentialInput, r as CreateCredentialInput, s as GetCredentialsInput } from "../types-CyHZ1ZQe.js";
1
+ import { n as ClientInitOptions } from "../types-D-98DirB.js";
2
+ import { a as CredentialInput, r as CreateCredentialInput, s as GetCredentialsInput } from "../types-C2gzqtjf.js";
3
3
  //#region src/clients/oauth/oauthClient.d.ts
4
4
  declare const createOauthClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
5
5
  healthCheck: (signal?: AbortSignal) => Promise<unknown>;
@@ -1,2 +1,2 @@
1
- import { t as createOauthClient } from "../oauth-CFwSNz37.js";
1
+ import { t as createOauthClient } from "../oauth-Bg5zro5S.js";
2
2
  export { createOauthClient };
@@ -1,2 +1,2 @@
1
- import { a as CredentialInput, i as Credential, n as CreateCredentialBody, o as CredentialPath, r as CreateCredentialInput, s as GetCredentialsInput, t as ComponentPath } from "../types-zA3H84SM.cjs";
1
+ import { a as CredentialInput, i as Credential, n as CreateCredentialBody, o as CredentialPath, r as CreateCredentialInput, s as GetCredentialsInput, t as ComponentPath } from "../types-BOnf68s5.cjs";
2
2
  export { ComponentPath, CreateCredentialBody, CreateCredentialInput, Credential, CredentialInput, CredentialPath, type GetCredentialsInput };
@@ -1,2 +1,2 @@
1
- import { a as CredentialInput, i as Credential, n as CreateCredentialBody, o as CredentialPath, r as CreateCredentialInput, s as GetCredentialsInput, t as ComponentPath } from "../types-CyHZ1ZQe.js";
1
+ import { a as CredentialInput, i as Credential, n as CreateCredentialBody, o as CredentialPath, r as CreateCredentialInput, s as GetCredentialsInput, t as ComponentPath } from "../types-C2gzqtjf.js";
2
2
  export { ComponentPath, CreateCredentialBody, CreateCredentialInput, Credential, CredentialInput, CredentialPath, type GetCredentialsInput };
@@ -1,7 +1,7 @@
1
- import { f as HttpStatus, r as isApiError } from "./createFetchClient-BbG46bL0.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";
1
+ import { p as HttpStatus, r as isApiError } from "./createFetchClient-DdyZMhxO.js";
2
+ import { t as createGenericFetchClient } from "./createGenericFetchClient-MQeLRiNW.js";
3
+ import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-E7OIVkYv.js";
4
+ import { t as createAuthHeaders } from "./auth-CE9rQV3-.js";
5
5
  //#region src/clients/oauth/utils.ts
6
6
  /**
7
7
  * The credentials payload rides one of two fields, and only one of them is in the current spec:
@@ -80,4 +80,4 @@ const createOauthClient = ({ baseUrl, middlewares, auth }) => {
80
80
  //#endregion
81
81
  export { createOauthClient as t };
82
82
 
83
- //# sourceMappingURL=oauth-CFwSNz37.js.map
83
+ //# sourceMappingURL=oauth-Bg5zro5S.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-CFwSNz37.js","names":[],"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,SAAS,yBAAgC;EAC7C;EACA;EACA,SAAS,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgB,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,IAAI,WAAW,KAAK,KAAK,MAAM,SAAS,WAAW,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-Bg5zro5S.js","names":[],"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,SAAS,yBAAgC;EAC7C;EACA;EACA,SAAS,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgB,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,IAAI,WAAW,KAAK,KAAK,MAAM,SAAS,WAAW,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,7 +1,7 @@
1
- const require_createFetchClient = require("./createFetchClient-BRfTjBLV.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");
1
+ const require_createFetchClient = require("./createFetchClient-DvZvD31l.cjs");
2
+ const require_createGenericFetchClient = require("./createGenericFetchClient-qfCZlCTv.cjs");
3
+ const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-C57Ljzi6.cjs");
4
+ const require_auth = require("./auth-C2_JLisH.cjs");
5
5
  //#region src/clients/oauth/utils.ts
6
6
  /**
7
7
  * The credentials payload rides one of two fields, and only one of them is in the current spec:
@@ -85,4 +85,4 @@ Object.defineProperty(exports, "createOauthClient", {
85
85
  }
86
86
  });
87
87
 
88
- //# sourceMappingURL=oauth-CkW5gln-.cjs.map
88
+ //# sourceMappingURL=oauth-DFsI1TE5.cjs.map
@@ -1 +1 @@
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
+ {"version":3,"file":"oauth-DFsI1TE5.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-CyDUFxHB.cjs");
3
- const require_auth = require("../auth-DP-6TFiM.cjs");
2
+ const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-C57Ljzi6.cjs");
3
+ const require_auth = require("../auth-C2_JLisH.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-BREGN3qo.cjs";
2
- import { h as components, m as TablesLineageResponse, n as GetTablesLineageQuery, t as GetProjectsLineageQuery } from "../types-COIsNoTQ.cjs";
1
+ import { n as ClientInitOptions } from "../types-DHI0g51U.cjs";
2
+ import { h as components, m as TablesLineageResponse, n as GetTablesLineageQuery, t as GetProjectsLineageQuery } from "../types-BT46XIgn.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-DwpRt3e9.js";
2
- import { h as components, m as TablesLineageResponse, n as GetTablesLineageQuery, t as GetProjectsLineageQuery } from "../types-dybUhlU2.js";
1
+ import { n as ClientInitOptions } from "../types-D-98DirB.js";
2
+ import { h as components, m as TablesLineageResponse, n as GetTablesLineageQuery, t as GetProjectsLineageQuery } from "../types-6ku2LeX6.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-Bn6_Pn0H.js";
2
- import { t as createAuthHeaders } from "../auth-DtbQaeDj.js";
1
+ import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-E7OIVkYv.js";
2
+ import { t as createAuthHeaders } from "../auth-CE9rQV3-.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-COIsNoTQ.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-BT46XIgn.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-dybUhlU2.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-6ku2LeX6.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-DuiUN0h8.js";
1
+ import { l as StorageToken } from "./types-Cpjk0-ta.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-BOGaVs-q.d.ts.map
18
+ //# sourceMappingURL=project-Bh954iOA.d.ts.map
@@ -1,4 +1,4 @@
1
- import { l as StorageToken } from "./types-GuWtMCMn.cjs";
1
+ import { l as StorageToken } from "./types-CrH4H8M4.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-BnQkL8cb.d.cts.map
18
+ //# sourceMappingURL=project-D25GH8zK.d.cts.map
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_queryService = require("../queryService-BLaGbpm-.cjs");
2
+ const require_queryService = require("../queryService--t_W9PSJ.cjs");
3
3
  exports.createQueryServiceClient = require_queryService.createQueryServiceClient;
@@ -1,2 +1,2 @@
1
- import { t as createQueryServiceClient } from "../index-Bjk-tCpG.cjs";
1
+ import { t as createQueryServiceClient } from "../index-DIVvL54G.cjs";
2
2
  export { createQueryServiceClient };
@@ -1,2 +1,2 @@
1
- import { t as createQueryServiceClient } from "../index-FhKX7Cv1.js";
1
+ import { t as createQueryServiceClient } from "../index-B0V1pJAa.js";
2
2
  export { createQueryServiceClient };
@@ -1,2 +1,2 @@
1
- import { t as createQueryServiceClient } from "../queryService-DK-jUnET.js";
1
+ import { t as createQueryServiceClient } from "../queryService-DX6zeAs_.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-D1uloiuY.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-Be3Wgn1U.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-ByWD2oeV.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-DAzmGzlb.js";
2
2
  export { ExportResultsResponse, GetExportResultsQuery, GetQueriesHistoryQuery, GetQueriesPath, GetQueryJobPath, GetQueryResultsPath, GetQueryResutsQuery, JobStatusResponse, PostCancelQueryJobPath, PostQueryBody, PostQueryPath, QueryJobStatus, QueryResult, Statements };
@@ -1,8 +1,8 @@
1
- const require_jobStatus = require("./jobStatus-kQ9JqF8t.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");
1
+ const require_jobStatus = require("./jobStatus-0_Y3Sr4i.cjs");
2
+ const require_createFetchClient = require("./createFetchClient-DvZvD31l.cjs");
3
+ const require_createGenericFetchClient = require("./createGenericFetchClient-qfCZlCTv.cjs");
4
+ const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-C57Ljzi6.cjs");
5
+ const require_auth = require("./auth-C2_JLisH.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-BLaGbpm-.cjs.map
119
+ //# sourceMappingURL=queryService--t_W9PSJ.cjs.map
@@ -1 +1 @@
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,UAAU;CAC3C,QAAQ,EAAE,WAAWC,kBAAAA,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,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
+ {"version":3,"file":"queryService--t_W9PSJ.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,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,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,8 +1,8 @@
1
- import { a as poller, t as jobStatus } from "./jobStatus-DbMupQEK.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";
1
+ import { a as poller, t as jobStatus } from "./jobStatus-PSZJMTiA.js";
2
+ import { d as parseContentDispositionHeader, s as HttpHeader } from "./createFetchClient-DdyZMhxO.js";
3
+ import { t as createGenericFetchClient } from "./createGenericFetchClient-MQeLRiNW.js";
4
+ import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-E7OIVkYv.js";
5
+ import { t as createAuthHeaders } from "./auth-CE9rQV3-.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-DK-jUnET.js.map
114
+ //# sourceMappingURL=queryService-DX6zeAs_.js.map
@@ -1 +1 @@
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
+ {"version":3,"file":"queryService-DX6zeAs_.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-B7TY4JLf.cjs");
2
+ const require_queue = require("../queue-D1_TCe0z.cjs");
3
3
  exports.createQueueClient = require_queue.createQueueClient;
@@ -1,6 +1,6 @@
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";
1
+ import { _t as Poller } from "../index-DIVvL54G.cjs";
2
+ import { n as ClientInitOptions } from "../types-DHI0g51U.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-Cu-0LT4f.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-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";
1
+ import { _t as Poller } from "../index-B0V1pJAa.js";
2
+ import { n as ClientInitOptions } from "../types-D-98DirB.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-BHI8Lin9.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-DViSQ-eq.js";
1
+ import { t as createQueueClient } from "../queue-DrLUbk98.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-DNXC_-fA.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-Cu-0LT4f.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-De_DA2ga.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-BHI8Lin9.js";
2
2
  export { CreateJobBody, GetQueueJobPath, KillJobPath, OrchestrationRerunPlan, OrchestrationRerunPlanPath, QueueJob, QueueJobStatus, SearchAllJobsQuery, SearchGroupedJobsQuery, SearchGroupedJobsResponse, SearchJobsQuery, SearchJobsResponse };
@@ -1,7 +1,7 @@
1
- const require_jobStatus = require("./jobStatus-kQ9JqF8t.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");
1
+ const require_jobStatus = require("./jobStatus-0_Y3Sr4i.cjs");
2
+ const require_createGenericFetchClient = require("./createGenericFetchClient-qfCZlCTv.cjs");
3
+ const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-C57Ljzi6.cjs");
4
+ const require_auth = require("./auth-C2_JLisH.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-B7TY4JLf.cjs.map
137
+ //# sourceMappingURL=queue-D1_TCe0z.cjs.map