@keboola/api-client 33.0.0 → 34.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 (420) hide show
  1. package/AGENTS.md +2 -2
  2. package/API-SURFACE.md +16 -2
  3. package/CHANGELOG.md +243 -0
  4. package/dist/{ManagementClientAuthError-DqeXL8nv.cjs → ManagementClientAuthError-DD4u0EU7.cjs} +2 -2
  5. package/dist/{ManagementClientAuthError-DqeXL8nv.cjs.map → ManagementClientAuthError-DD4u0EU7.cjs.map} +1 -1
  6. package/dist/{ManagementClientAuthError-iKbBugKC.js → ManagementClientAuthError-ey-f03vy.js} +2 -2
  7. package/dist/{ManagementClientAuthError-iKbBugKC.js.map → ManagementClientAuthError-ey-f03vy.js.map} +1 -1
  8. package/dist/{ValidationError-CzPWydEb.js → ValidationError-BekhphAq.js} +11 -7
  9. package/dist/ValidationError-BekhphAq.js.map +1 -0
  10. package/dist/{ValidationError-h5qvwahi.cjs → ValidationError-CLVJCCwH.cjs} +16 -6
  11. package/dist/ValidationError-CLVJCCwH.cjs.map +1 -0
  12. package/dist/ai/index.cjs +2 -2
  13. package/dist/ai/index.d.cts +2 -2
  14. package/dist/ai/index.d.ts +2 -2
  15. package/dist/ai/index.js +2 -2
  16. package/dist/ai/types.d.cts +1 -1
  17. package/dist/ai/types.d.ts +1 -1
  18. package/dist/{appLogs-D8K0VeNM.cjs → appLogs-BjfUoWzs.cjs} +2 -2
  19. package/dist/{appLogs-D8K0VeNM.cjs.map → appLogs-BjfUoWzs.cjs.map} +1 -1
  20. package/dist/{appLogs-u0XMZLjS.d.ts → appLogs-Ch7DYpzx.d.ts} +2 -2
  21. package/dist/{appLogs-Q4A7A_Fc.d.cts → appLogs-D5A13Y0y.d.cts} +2 -2
  22. package/dist/{appLogs-D72eD8vP.js → appLogs-xsVkTriU.js} +2 -2
  23. package/dist/{appLogs-D72eD8vP.js.map → appLogs-xsVkTriU.js.map} +1 -1
  24. package/dist/apps/index.cjs +3 -3
  25. package/dist/apps/index.d.cts +3 -3
  26. package/dist/apps/index.d.ts +3 -3
  27. package/dist/apps/index.js +3 -3
  28. package/dist/apps/types.d.cts +2 -2
  29. package/dist/apps/types.d.ts +2 -2
  30. package/dist/assets/index.cjs +1 -1
  31. package/dist/assets/index.d.cts +1 -1
  32. package/dist/assets/index.d.ts +1 -1
  33. package/dist/assets/index.js +1 -1
  34. package/dist/auth/index.cjs +1 -1
  35. package/dist/auth/index.d.cts +1 -1
  36. package/dist/auth/index.d.ts +1 -1
  37. package/dist/auth/index.js +1 -1
  38. package/dist/auth/types.d.cts +1 -1
  39. package/dist/auth/types.d.ts +1 -1
  40. package/dist/{auth-C2_JLisH.cjs → auth-JQ33o3nU.cjs} +2 -2
  41. package/dist/{auth-C2_JLisH.cjs.map → auth-JQ33o3nU.cjs.map} +1 -1
  42. package/dist/{auth-CE9rQV3-.js → auth-aItmDu45.js} +2 -2
  43. package/dist/{auth-CE9rQV3-.js.map → auth-aItmDu45.js.map} +1 -1
  44. package/dist/{authClient-DZ_8lvdJ.d.cts → authClient-CTHNs6Tq.d.cts} +4 -4
  45. package/dist/{authClient-DEyqR7GW.js → authClient-D7W9vWPR.js} +5 -5
  46. package/dist/{authClient-DEyqR7GW.js.map → authClient-D7W9vWPR.js.map} +1 -1
  47. package/dist/{authClient-DwT6xdg5.d.ts → authClient-D8i3JTM-.d.ts} +4 -4
  48. package/dist/{authClient-IwQ9Ti0J.cjs → authClient-_PpvGgZJ.cjs} +5 -5
  49. package/dist/{authClient-IwQ9Ti0J.cjs.map → authClient-_PpvGgZJ.cjs.map} +1 -1
  50. package/dist/billing/index.cjs +46 -0
  51. package/dist/billing/index.cjs.map +1 -0
  52. package/dist/billing/index.d.cts +48 -0
  53. package/dist/billing/index.d.ts +48 -0
  54. package/dist/billing/index.js +45 -0
  55. package/dist/billing/index.js.map +1 -0
  56. package/dist/billing/types.cjs +0 -0
  57. package/dist/billing/types.d.cts +635 -0
  58. package/dist/billing/types.d.ts +635 -0
  59. package/dist/billing/types.js +1 -0
  60. package/dist/chat/index.cjs +3 -3
  61. package/dist/chat/index.d.cts +2 -2
  62. package/dist/chat/index.d.ts +2 -2
  63. package/dist/chat/index.js +3 -3
  64. package/dist/chat/types.cjs +18 -0
  65. package/dist/chat/types.cjs.map +1 -1
  66. package/dist/chat/types.d.cts +2 -2
  67. package/dist/chat/types.d.ts +2 -2
  68. package/dist/chat/types.js +18 -1
  69. package/dist/chat/types.js.map +1 -1
  70. package/dist/{configurations-d7SZmw69.js → configurations-BVvcimzo.js} +17 -2
  71. package/dist/configurations-BVvcimzo.js.map +1 -0
  72. package/dist/{configurations-CqwAxiQL.cjs → configurations-CyFF9Dtu.cjs} +22 -1
  73. package/dist/configurations-CyFF9Dtu.cjs.map +1 -0
  74. package/dist/{configurations-ZwBXilW-.js → configurations-VtNE0nrT.js} +2 -2
  75. package/dist/{configurations-ZwBXilW-.js.map → configurations-VtNE0nrT.js.map} +1 -1
  76. package/dist/{configurations-Ck-mNB_E.cjs → configurations-zkNjr73Q.cjs} +2 -2
  77. package/dist/{configurations-Ck-mNB_E.cjs.map → configurations-zkNjr73Q.cjs.map} +1 -1
  78. package/dist/constants/index.cjs +1 -1
  79. package/dist/constants/index.d.cts +1 -1
  80. package/dist/constants/index.d.ts +1 -1
  81. package/dist/constants/index.js +1 -1
  82. package/dist/{constants-lIfSdTzS.cjs → constants-C4DlsF_M.cjs} +3 -2
  83. package/dist/constants-C4DlsF_M.cjs.map +1 -0
  84. package/dist/{constants-ByEwVtGf.js → constants-wfbFsqqN.js} +3 -2
  85. package/dist/constants-wfbFsqqN.js.map +1 -0
  86. package/dist/{createFetchClient-DvZvD31l.cjs → createFetchClient-DgMiqTJ8.cjs} +19 -4
  87. package/dist/createFetchClient-DgMiqTJ8.cjs.map +1 -0
  88. package/dist/{createFetchClient-DdyZMhxO.js → createFetchClient-U-ZrwPl2.js} +14 -5
  89. package/dist/{createFetchClient-DvZvD31l.cjs.map → createFetchClient-U-ZrwPl2.js.map} +1 -1
  90. package/dist/{createGenericFetchClient-qfCZlCTv.cjs → createGenericFetchClient-o3cPJeRn.cjs} +2 -2
  91. package/dist/{createGenericFetchClient-qfCZlCTv.cjs.map → createGenericFetchClient-o3cPJeRn.cjs.map} +1 -1
  92. package/dist/{createGenericFetchClient-MQeLRiNW.js → createGenericFetchClient-rxvUUbap.js} +2 -2
  93. package/dist/{createGenericFetchClient-MQeLRiNW.js.map → createGenericFetchClient-rxvUUbap.js.map} +1 -1
  94. package/dist/{createOpenapiFetchClient-E7OIVkYv.js → createOpenapiFetchClient-BVSc9ibR.js} +2 -2
  95. package/dist/{createOpenapiFetchClient-E7OIVkYv.js.map → createOpenapiFetchClient-BVSc9ibR.js.map} +1 -1
  96. package/dist/{createOpenapiFetchClient-C57Ljzi6.cjs → createOpenapiFetchClient-DhUU3M1W.cjs} +2 -2
  97. package/dist/{createOpenapiFetchClient-C57Ljzi6.cjs.map → createOpenapiFetchClient-DhUU3M1W.cjs.map} +1 -1
  98. package/dist/{credential-Bxv7yxOZ.js → credential-CihSf_xs.js} +2 -2
  99. package/dist/{credential-Bxv7yxOZ.js.map → credential-CihSf_xs.js.map} +1 -1
  100. package/dist/{credential-D-X5QQrM.cjs → credential-DVWvJFJs.cjs} +2 -2
  101. package/dist/{credential-D-X5QQrM.cjs.map → credential-DVWvJFJs.cjs.map} +1 -1
  102. package/dist/dataScience/index.cjs +2 -2
  103. package/dist/dataScience/index.d.cts +2 -2
  104. package/dist/dataScience/index.d.ts +2 -2
  105. package/dist/dataScience/index.js +2 -2
  106. package/dist/dataScience/types.d.cts +2 -2
  107. package/dist/dataScience/types.d.ts +2 -2
  108. package/dist/{dataScience-BPW993AG.cjs → dataScience-0Rl_EuV_.cjs} +5 -5
  109. package/dist/{dataScience-BPW993AG.cjs.map → dataScience-0Rl_EuV_.cjs.map} +1 -1
  110. package/dist/{dataScience-B_TA7wCB.js → dataScience-C1gO5zUn.js} +5 -5
  111. package/dist/{dataScience-B_TA7wCB.js.map → dataScience-C1gO5zUn.js.map} +1 -1
  112. package/dist/developerPortal/index.cjs +1 -1
  113. package/dist/developerPortal/index.d.cts +2 -2
  114. package/dist/developerPortal/index.d.ts +2 -2
  115. package/dist/developerPortal/index.js +1 -1
  116. package/dist/developerPortal/types.d.cts +1 -1
  117. package/dist/developerPortal/types.d.ts +1 -1
  118. package/dist/{developerPortalClient-jk46sjwP.js → developerPortalClient-C_48z8BN.js} +3 -3
  119. package/dist/{developerPortalClient-jk46sjwP.js.map → developerPortalClient-C_48z8BN.js.map} +1 -1
  120. package/dist/{developerPortalClient-Db2XVB_o.cjs → developerPortalClient-ki0XS_OD.cjs} +3 -3
  121. package/dist/{developerPortalClient-Db2XVB_o.cjs.map → developerPortalClient-ki0XS_OD.cjs.map} +1 -1
  122. package/dist/domain/permissions/index.cjs +2 -1
  123. package/dist/domain/permissions/index.d.cts +18 -3
  124. package/dist/domain/permissions/index.d.ts +18 -3
  125. package/dist/domain/permissions/index.js +2 -2
  126. package/dist/editor/index.cjs +2 -2
  127. package/dist/editor/index.d.cts +2 -2
  128. package/dist/editor/index.d.ts +2 -2
  129. package/dist/editor/index.js +2 -2
  130. package/dist/editor/types.d.cts +1 -1
  131. package/dist/editor/types.d.ts +1 -1
  132. package/dist/encryption/index.cjs +1 -1
  133. package/dist/encryption/index.d.cts +1 -1
  134. package/dist/encryption/index.d.ts +1 -1
  135. package/dist/encryption/index.js +1 -1
  136. package/dist/encryption/types.d.cts +1 -1
  137. package/dist/encryption/types.d.ts +1 -1
  138. package/dist/import/index.cjs +1 -1
  139. package/dist/import/index.d.cts +3 -3
  140. package/dist/import/index.d.ts +3 -3
  141. package/dist/import/index.js +1 -1
  142. package/dist/{import-DJilJ6tq.cjs → import-C83w7BKz.cjs} +3 -3
  143. package/dist/{import-DJilJ6tq.cjs.map → import-C83w7BKz.cjs.map} +1 -1
  144. package/dist/{import-2nqxQ9Rt.js → import-CROEK82b.js} +3 -3
  145. package/dist/{import-2nqxQ9Rt.js.map → import-CROEK82b.js.map} +1 -1
  146. package/dist/{index-DQef014j.d.ts → index-3LUk2rpD.d.ts} +4 -4
  147. package/dist/{index-BjKjp3Rf.d.ts → index-6Xe81qN3.d.ts} +5 -5
  148. package/dist/{index-DIVvL54G.d.cts → index-BLx14ZI4.d.cts} +104 -44
  149. package/dist/{index-CUXEFQ7i.d.cts → index-BgLnWTZU.d.cts} +6 -6
  150. package/dist/{index-C_cxKL1V.d.ts → index-BuegqrS1.d.ts} +3 -3
  151. package/dist/{index-bB6wvw1f.d.ts → index-C77vTm2K.d.ts} +4 -4
  152. package/dist/{index-qOK5FtAH.d.cts → index-CW3Pj7DY.d.cts} +4 -4
  153. package/dist/{index-B2OGaUap.d.ts → index-CqgtL2NU.d.ts} +6 -6
  154. package/dist/{index-C7gxKoDF.d.cts → index-D8rcUbnk.d.ts} +3 -3
  155. package/dist/{index-B0V1pJAa.d.ts → index-DFBFa3SS.d.ts} +104 -44
  156. package/dist/{index-CVqk63at.d.ts → index-DR4QqItd.d.cts} +3 -3
  157. package/dist/{index-DCN2lH0v.d.cts → index-DXSmFkol.d.cts} +4 -4
  158. package/dist/{index-CTd4YY8e.d.cts → index-Dodwl64k.d.cts} +69 -36
  159. package/dist/{index-t-a7kYnx.d.cts → index-DppA4k3b.d.cts} +5 -5
  160. package/dist/{index-DLYAvSWZ.d.cts → index-Dx52hNLP.d.cts} +3 -3
  161. package/dist/{index-exNi3I2Q.d.cts → index-GjcJTCbz.d.cts} +4 -4
  162. package/dist/{index-DhVFuQDv.d.cts → index-KuQ79Mnz.d.ts} +13 -3
  163. package/dist/{index-GNKwr7EQ.d.ts → index-P-iT5THa.d.ts} +69 -36
  164. package/dist/{index-DVhTNwvu.d.ts → index-V7XKUQm9.d.cts} +13 -3
  165. package/dist/{index-ChMtULt4.d.ts → index-pXN4LWUX.d.ts} +4 -4
  166. package/dist/index.cjs +77 -37
  167. package/dist/index.cjs.map +1 -1
  168. package/dist/index.d.cts +6 -6
  169. package/dist/index.d.ts +6 -6
  170. package/dist/index.js +74 -35
  171. package/dist/index.js.map +1 -1
  172. package/dist/isLoginPageRedirect-B0EmRsHr.cjs +25 -0
  173. package/dist/isLoginPageRedirect-B0EmRsHr.cjs.map +1 -0
  174. package/dist/isLoginPageRedirect-BTTAedW-.js +20 -0
  175. package/dist/isLoginPageRedirect-BTTAedW-.js.map +1 -0
  176. package/dist/kaiAgent/index.cjs +1 -1
  177. package/dist/kaiAgent/index.d.cts +1 -1
  178. package/dist/kaiAgent/index.d.ts +1 -1
  179. package/dist/kaiAgent/index.js +1 -1
  180. package/dist/kaiAgent/types.d.cts +1 -1
  181. package/dist/kaiAgent/types.d.ts +1 -1
  182. package/dist/{kaiAgent-CYYn0QJW.js → kaiAgent-8LNzGhZc.js} +4 -4
  183. package/dist/{kaiAgent-CYYn0QJW.js.map → kaiAgent-8LNzGhZc.js.map} +1 -1
  184. package/dist/{kaiAgent-CMVub6Sc.cjs → kaiAgent-B_TaUPRt.cjs} +4 -4
  185. package/dist/{kaiAgent-CMVub6Sc.cjs.map → kaiAgent-B_TaUPRt.cjs.map} +1 -1
  186. package/dist/{kaiAgentClient-B2O0DF4d.d.ts → kaiAgentClient-BJj_2aqt.d.ts} +4 -3
  187. package/dist/{kaiAgentClient-iCFR2tRU.d.cts → kaiAgentClient-DhTaM3GC.d.cts} +4 -3
  188. package/dist/management/index.cjs +1 -1
  189. package/dist/management/index.d.cts +1 -1
  190. package/dist/management/index.d.ts +1 -1
  191. package/dist/management/index.js +1 -1
  192. package/dist/management/types.d.cts +2 -2
  193. package/dist/management/types.d.ts +2 -2
  194. package/dist/{management-DGfgKsaA.cjs → management-BoxlRNg2.cjs} +53 -10
  195. package/dist/management-BoxlRNg2.cjs.map +1 -0
  196. package/dist/{management-DNEKhR6a.js → management-Bp440RsV.js} +53 -10
  197. package/dist/management-Bp440RsV.js.map +1 -0
  198. package/dist/metastore/index.cjs +1 -1
  199. package/dist/metastore/index.d.cts +1 -1
  200. package/dist/metastore/index.d.ts +1 -1
  201. package/dist/metastore/index.js +1 -1
  202. package/dist/metastore/types.d.cts +1 -1
  203. package/dist/metastore/types.d.ts +1 -1
  204. package/dist/{metastore-DksEte8P.cjs → metastore-BYYWTb3m.cjs} +4 -4
  205. package/dist/{metastore-DksEte8P.cjs.map → metastore-BYYWTb3m.cjs.map} +1 -1
  206. package/dist/{metastore-CjwktHvw.js → metastore-VCDRVhUT.js} +4 -4
  207. package/dist/{metastore-CjwktHvw.js.map → metastore-VCDRVhUT.js.map} +1 -1
  208. package/dist/microsoftGraph/index.cjs +2 -2
  209. package/dist/microsoftGraph/index.d.cts +2 -2
  210. package/dist/microsoftGraph/index.d.ts +2 -2
  211. package/dist/microsoftGraph/index.js +2 -2
  212. package/dist/microsoftGraph/types.d.cts +1 -1
  213. package/dist/microsoftGraph/types.d.ts +1 -1
  214. package/dist/notifications/index.cjs +3 -3
  215. package/dist/notifications/index.d.cts +2 -2
  216. package/dist/notifications/index.d.ts +2 -2
  217. package/dist/notifications/index.js +3 -3
  218. package/dist/notifications/types.d.cts +1 -1
  219. package/dist/notifications/types.d.ts +1 -1
  220. package/dist/oauth/index.cjs +1 -1
  221. package/dist/oauth/index.d.cts +2 -2
  222. package/dist/oauth/index.d.ts +2 -2
  223. package/dist/oauth/index.js +1 -1
  224. package/dist/oauth/types.d.cts +1 -1
  225. package/dist/oauth/types.d.ts +1 -1
  226. package/dist/{oauth-Bg5zro5S.js → oauth--asfePw-.js} +5 -5
  227. package/dist/{oauth-Bg5zro5S.js.map → oauth--asfePw-.js.map} +1 -1
  228. package/dist/{oauth-DFsI1TE5.cjs → oauth-B8yqG6Sy.cjs} +5 -5
  229. package/dist/{oauth-DFsI1TE5.cjs.map → oauth-B8yqG6Sy.cjs.map} +1 -1
  230. package/dist/omnisearch/index.cjs +2 -2
  231. package/dist/omnisearch/index.d.cts +2 -2
  232. package/dist/omnisearch/index.d.ts +2 -2
  233. package/dist/omnisearch/index.js +2 -2
  234. package/dist/omnisearch/types.d.cts +1 -1
  235. package/dist/omnisearch/types.d.ts +1 -1
  236. package/dist/{project-Bh954iOA.d.ts → project-C2wvX0xZ.d.ts} +2 -2
  237. package/dist/{project-D25GH8zK.d.cts → project-hePfzUY0.d.cts} +2 -2
  238. package/dist/queryService/index.cjs +1 -1
  239. package/dist/queryService/index.d.cts +1 -1
  240. package/dist/queryService/index.d.ts +1 -1
  241. package/dist/queryService/index.js +1 -1
  242. package/dist/queryService/types.d.cts +1 -1
  243. package/dist/queryService/types.d.ts +1 -1
  244. package/dist/{queryService--t_W9PSJ.cjs → queryService-BVtjkXy1.cjs} +5 -5
  245. package/dist/{queryService--t_W9PSJ.cjs.map → queryService-BVtjkXy1.cjs.map} +1 -1
  246. package/dist/{queryService-DX6zeAs_.js → queryService-Ca65E5KH.js} +5 -5
  247. package/dist/{queryService-DX6zeAs_.js.map → queryService-Ca65E5KH.js.map} +1 -1
  248. package/dist/queue/index.cjs +1 -1
  249. package/dist/queue/index.d.cts +3 -3
  250. package/dist/queue/index.d.ts +3 -3
  251. package/dist/queue/index.js +1 -1
  252. package/dist/queue/types.d.cts +1 -1
  253. package/dist/queue/types.d.ts +1 -1
  254. package/dist/{queue-DrLUbk98.js → queue-DyotLFJi.js} +4 -4
  255. package/dist/{queue-DrLUbk98.js.map → queue-DyotLFJi.js.map} +1 -1
  256. package/dist/{queue-D1_TCe0z.cjs → queue-OJJUUqc2.cjs} +4 -4
  257. package/dist/{queue-D1_TCe0z.cjs.map → queue-OJJUUqc2.cjs.map} +1 -1
  258. package/dist/scheduler/index.cjs +3 -3
  259. package/dist/scheduler/index.d.cts +2 -2
  260. package/dist/scheduler/index.d.ts +2 -2
  261. package/dist/scheduler/index.js +3 -3
  262. package/dist/scheduler/types.d.cts +1 -1
  263. package/dist/scheduler/types.d.ts +1 -1
  264. package/dist/sdk/configurations/index.cjs +1 -1
  265. package/dist/sdk/configurations/index.d.cts +4 -4
  266. package/dist/sdk/configurations/index.d.ts +4 -4
  267. package/dist/sdk/configurations/index.js +1 -1
  268. package/dist/sdk/developerPortal/index.cjs +3 -3
  269. package/dist/sdk/developerPortal/index.d.cts +3 -3
  270. package/dist/sdk/developerPortal/index.d.ts +3 -3
  271. package/dist/sdk/developerPortal/index.js +3 -3
  272. package/dist/sdk/queryService/index.cjs +1 -1
  273. package/dist/sdk/queryService/index.d.cts +1 -1
  274. package/dist/sdk/queryService/index.d.ts +1 -1
  275. package/dist/sdk/queryService/index.js +1 -1
  276. package/dist/sdk/semanticLayer/index.cjs +21 -448
  277. package/dist/sdk/semanticLayer/index.d.cts +21 -2
  278. package/dist/sdk/semanticLayer/index.d.ts +21 -2
  279. package/dist/sdk/semanticLayer/index.js +2 -430
  280. package/dist/sdk/semanticLayer/types.d.cts +2 -2
  281. package/dist/sdk/semanticLayer/types.d.ts +2 -2
  282. package/dist/sdk/storage/index.d.cts +1 -1
  283. package/dist/sdk/storage/index.d.ts +1 -1
  284. package/dist/sdk/tag/index.d.cts +2 -2
  285. package/dist/sdk/tag/index.d.ts +2 -2
  286. package/dist/sdk/tag/types.d.cts +1 -1
  287. package/dist/sdk/tag/types.d.ts +1 -1
  288. package/dist/sdk/vault/index.d.cts +1 -1
  289. package/dist/sdk/vault/index.d.ts +1 -1
  290. package/dist/semanticLayer-CSqmtHRo.js +692 -0
  291. package/dist/semanticLayer-CSqmtHRo.js.map +1 -0
  292. package/dist/semanticLayer-E0Vilu8u.cjs +811 -0
  293. package/dist/semanticLayer-E0Vilu8u.cjs.map +1 -0
  294. package/dist/{serviceIds-fHLDwOg9.d.ts → serviceIds-DRcoTnSd.d.cts} +2 -1
  295. package/dist/{serviceIds-fHLDwOg9.d.cts → serviceIds-DRcoTnSd.d.ts} +2 -1
  296. package/dist/status/index.cjs +1 -1
  297. package/dist/status/index.d.cts +1 -1
  298. package/dist/status/index.d.ts +1 -1
  299. package/dist/status/index.js +1 -1
  300. package/dist/storage/index.cjs +6 -5
  301. package/dist/storage/index.d.cts +3 -3
  302. package/dist/storage/index.d.ts +3 -3
  303. package/dist/storage/index.js +6 -6
  304. package/dist/storage/types.d.cts +3 -3
  305. package/dist/storage/types.d.ts +3 -3
  306. package/dist/{storage-DexWot8H.cjs → storage-BKm7cztt.cjs} +6 -6
  307. package/dist/{storage-DexWot8H.cjs.map → storage-BKm7cztt.cjs.map} +1 -1
  308. package/dist/{storage--cVaecFq.js → storage-LYwFQPNO.js} +6 -6
  309. package/dist/{storage--cVaecFq.js.map → storage-LYwFQPNO.js.map} +1 -1
  310. package/dist/stream/index.cjs +3 -3
  311. package/dist/stream/index.d.cts +2 -2
  312. package/dist/stream/index.d.ts +2 -2
  313. package/dist/stream/index.js +3 -3
  314. package/dist/stream/types.d.cts +1 -1
  315. package/dist/stream/types.d.ts +1 -1
  316. package/dist/syncActions/index.cjs +1 -1
  317. package/dist/syncActions/index.d.cts +1 -1
  318. package/dist/syncActions/index.d.ts +1 -1
  319. package/dist/syncActions/index.js +1 -1
  320. package/dist/syncActions/types.d.cts +1 -1
  321. package/dist/syncActions/types.d.ts +1 -1
  322. package/dist/{syncActions-DQq_A9v6.cjs → syncActions-OEZdVffK.cjs} +6 -6
  323. package/dist/{syncActions-DQq_A9v6.cjs.map → syncActions-OEZdVffK.cjs.map} +1 -1
  324. package/dist/{syncActions-CkMHM-jB.js → syncActions-QeBhIVhG.js} +6 -6
  325. package/dist/{syncActions-CkMHM-jB.js.map → syncActions-QeBhIVhG.js.map} +1 -1
  326. package/dist/telemetry/index.cjs +38 -2
  327. package/dist/telemetry/index.cjs.map +1 -0
  328. package/dist/telemetry/index.d.cts +15 -8
  329. package/dist/telemetry/index.d.ts +15 -8
  330. package/dist/telemetry/index.js +37 -1
  331. package/dist/telemetry/index.js.map +1 -0
  332. package/dist/telemetry/types.d.cts +2 -2
  333. package/dist/telemetry/types.d.ts +2 -2
  334. package/dist/{types-Be3Wgn1U.d.cts → types-3eUgOA7I.d.cts} +2 -2
  335. package/dist/{types-bY6K3y0O.d.cts → types-52irAt99.d.cts} +2 -2
  336. package/dist/{types-C2gzqtjf.d.ts → types-B2U9cFcx.d.ts} +2 -2
  337. package/dist/{types-C35GWNmq.d.ts → types-B3GOGUJ7.d.cts} +753 -45
  338. package/dist/{types-B42HhyB0.d.cts → types-BEe50G2r.d.cts} +2 -2
  339. package/dist/{types-6ThDkaJw.d.ts → types-BH5LLeJy.d.ts} +2 -2
  340. package/dist/{types-CxmV36rp.d.cts → types-BMeDOB_D.d.ts} +753 -45
  341. package/dist/{types-CPaluTW7.d.cts → types-BOqD3Hqy.d.cts} +3 -3
  342. package/dist/{types-CHCM9oNk.d.ts → types-BQsOHNI0.d.ts} +3 -3
  343. package/dist/{types-Cu-0LT4f.d.cts → types-BQvv4RaI.d.cts} +2 -2
  344. package/dist/{types-ZGAWRIBW.d.ts → types-BTWIPEiU.d.ts} +2 -2
  345. package/dist/{types-B4_MM5Wf.d.cts → types-BW2BXUB4.d.cts} +2 -2
  346. package/dist/{types-CSc8NQCY.d.ts → types-BrYkBQo4.d.ts} +2 -2
  347. package/dist/{types-D7Wgcp0u.d.ts → types-BsxLGDoC.d.cts} +2 -2
  348. package/dist/{types-CNQdtffE.d.ts → types-BupPADSm.d.ts} +10 -3
  349. package/dist/{types-B7O5koJb.d.cts → types-Bxhh2SJr.d.ts} +2 -2
  350. package/dist/{types-DAzmGzlb.d.ts → types-BztF4HeB.d.ts} +2 -2
  351. package/dist/{types-6ku2LeX6.d.ts → types-C0_2KZ-A.d.ts} +2 -2
  352. package/dist/{types-BUYqdN7B.d.ts → types-C2vefB4D.d.ts} +17 -4
  353. package/dist/{types-6hh_3SZs.d.ts → types-CBgLCkYe.d.ts} +3 -3
  354. package/dist/{types-C_ilZZkQ.d.ts → types-CKiW3n6v.d.ts} +2 -2
  355. package/dist/{types-sO52qIAA.d.cts → types-COL1kVEB.d.cts} +2 -2
  356. package/dist/types-CPB-eF82.d.ts +289 -0
  357. package/dist/{types-Ccgbipp4.d.cts → types-CW6lCqrC.d.cts} +2 -2
  358. package/dist/{types-BS5M67xm.d.cts → types-CaYtinmA.d.cts} +3 -3
  359. package/dist/{types-BHI8Lin9.d.ts → types-CcrvrAJX.d.ts} +2 -2
  360. package/dist/{types-D-98DirB.d.ts → types-Ct0YPy2w.d.ts} +2 -2
  361. package/dist/{types-Jt0ipbSm.d.cts → types-Cz83RiVu.d.cts} +2 -2
  362. package/dist/{types-B6JJCta-.d.cts → types-D8Rrz51O.d.cts} +2 -2
  363. package/dist/{types-3p0adMdd.d.cts → types-DARv_P6O.d.cts} +3 -3
  364. package/dist/{types-Cpjk0-ta.d.ts → types-DBOSvWtD.d.ts} +2 -2
  365. package/dist/{types-C4mr0lop.d.ts → types-DEc55spK.d.ts} +13 -4
  366. package/dist/{types-DqniGeDJ.d.cts → types-DNxOHnZI.d.cts} +2 -2
  367. package/dist/{types-CrH4H8M4.d.cts → types-DPS8nwkV.d.cts} +2 -2
  368. package/dist/{types-DTTC70Ac.d.ts → types-DYzJ6K2e.d.ts} +2 -2
  369. package/dist/{types-CCr1-9Q6.d.cts → types-DZk3XHiN.d.cts} +3 -3
  370. package/dist/{types-DHqIJKwx.d.ts → types-DajzGOKB.d.ts} +2 -2
  371. package/dist/{types-DlvZeert.d.ts → types-DfvdbRPL.d.ts} +2 -2
  372. package/dist/{types-k4R8gQ4U.d.ts → types-DhDNS-5B.d.ts} +21 -3
  373. package/dist/{types-D6ocCyGh.d.cts → types-DjrRmQUe.d.cts} +13 -4
  374. package/dist/{types-B6lOyHY_.d.ts → types-Dmu-8g4O.d.ts} +3 -3
  375. package/dist/{types-BT46XIgn.d.cts → types-DqxIx9Pi.d.cts} +2 -2
  376. package/dist/{types-BO3sCD0a.d.cts → types-Jw10xuOW.d.cts} +2 -2
  377. package/dist/{types-sp1rJY9E.d.cts → types-M46WuBSm.d.cts} +2 -2
  378. package/dist/{types-BOnf68s5.d.cts → types-N3EChotg.d.cts} +2 -2
  379. package/dist/{types-Ur37iOqb.d.ts → types-OaD-cbbl.d.ts} +3 -3
  380. package/dist/{types-DHI0g51U.d.cts → types-_RhBCj4_.d.cts} +2 -2
  381. package/dist/{types-0xa_7cgo.d.cts → types-bGQb4Jtl.d.cts} +21 -3
  382. package/dist/{types-E3VT-zYz.d.cts → types-f8W_j6qD.d.cts} +10 -3
  383. package/dist/{types-DONxb2-c.d.cts → types-fX4gbxfV.d.cts} +17 -4
  384. package/dist/types-g3vU7hcg.d.cts +289 -0
  385. package/dist/{types-BYKHr5bR.d.ts → types-l9o4gFsI.d.ts} +2 -2
  386. package/dist/{types-CaMfshWX.d.ts → types-nrviNdzZ.d.ts} +2 -2
  387. package/dist/{types-BgVKG4vg.d.ts → types-zZBxJ0P-.d.ts} +2 -2
  388. package/dist/{validateConnectionStatus-24zqIQ0p.cjs → validateConnectionStatus-CsvYmCOI.cjs} +5 -4
  389. package/dist/validateConnectionStatus-CsvYmCOI.cjs.map +1 -0
  390. package/dist/{validateConnectionStatus-DhkWg6Eq.js → validateConnectionStatus-olE2sQ3U.js} +5 -4
  391. package/dist/{validateConnectionStatus-DhkWg6Eq.js.map → validateConnectionStatus-olE2sQ3U.js.map} +1 -1
  392. package/dist/vault/index.cjs +4 -4
  393. package/dist/vault/index.d.cts +1 -1
  394. package/dist/vault/index.d.ts +1 -1
  395. package/dist/vault/index.js +4 -4
  396. package/dist/vault/types.d.cts +1 -1
  397. package/dist/vault/types.d.ts +1 -1
  398. package/package.json +29 -3
  399. package/surface/billing.md +9 -0
  400. package/surface/kaiAgent.md +2 -2
  401. package/surface/management.md +13 -3
  402. package/surface/telemetry.md +2 -4
  403. package/dist/ValidationError-CzPWydEb.js.map +0 -1
  404. package/dist/ValidationError-h5qvwahi.cjs.map +0 -1
  405. package/dist/configurations-CqwAxiQL.cjs.map +0 -1
  406. package/dist/configurations-d7SZmw69.js.map +0 -1
  407. package/dist/constants-ByEwVtGf.js.map +0 -1
  408. package/dist/constants-lIfSdTzS.cjs.map +0 -1
  409. package/dist/createFetchClient-DdyZMhxO.js.map +0 -1
  410. package/dist/management-DGfgKsaA.cjs.map +0 -1
  411. package/dist/management-DNEKhR6a.js.map +0 -1
  412. package/dist/sdk/semanticLayer/index.cjs.map +0 -1
  413. package/dist/sdk/semanticLayer/index.js.map +0 -1
  414. package/dist/telemetry-CAu1Qt7B.cjs +0 -29
  415. package/dist/telemetry-CAu1Qt7B.cjs.map +0 -1
  416. package/dist/telemetry-Ca6j0i9w.js +0 -24
  417. package/dist/telemetry-Ca6j0i9w.js.map +0 -1
  418. package/dist/types-lFsTSkhe.d.cts +0 -14
  419. package/dist/types-lFsTSkhe.d.ts +0 -14
  420. package/dist/validateConnectionStatus-24zqIQ0p.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"createFetchClient-DvZvD31l.cjs","names":[],"sources":["../src/errors/ApiError.ts","../src/internal.ts","../src/fetchClient/createFetchClient/utils.ts","../src/fetchClient/createFetchClient/createFetchClient.ts"],"sourcesContent":["import type { ApiResponse } from '../fetchClient/createFetchClient/types';\n\nexport class ApiError extends Error {\n response: Response;\n request: Request;\n data: unknown;\n\n constructor({ response, request, data }: ApiResponse) {\n super(response.statusText);\n this.response = response;\n this.request = request;\n this.data = data;\n }\n}\n","// Package-internal constants. Not part of the public\n// `@keboola/api-client/constants` sub-path (that is the `constants/` directory).\n\nexport const KeboolaHttpHeader = {\n STORAGE_API_TOKEN: 'X-StorageApi-Token',\n MANAGEMENT_API_TOKEN: 'X-Kbc-Manageapitoken',\n STORAGE_API_URL: 'x-storageapi-url',\n PROJECT_ID: 'X-KBC-ProjectId',\n /** Storage job a request enqueued, reported on the response rather than in its body. */\n STORAGE_API_JOB_ID: 'X-StorageApi-Job-Id',\n} as const;\n\nexport const HttpStatus = {\n NO_CONTENT: 204,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n UNPROCESSABLE_ENTITY: 422,\n INTERNAL_SERVER_ERROR: 500,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n} as const;\n\nexport const ENCRYPTED_VALUE_PREFIX = 'KBC::';\n","import type { IStringifyOptions } from 'qs';\nimport qs from 'qs';\n\nimport { HttpStatus } from '../../internal';\n\nimport type {\n ApiResponse,\n BodyParam,\n CreateFetchRequestFn,\n ParseAs,\n PathParam,\n ValidateStatusFn,\n} from './types';\n\n/**\n * Strips trailing slashes from a base URL so concatenating a leading-slash\n * path (e.g. `/v2/storage`) never produces a double slash.\n *\n * Without this, callers that pass `https://connection.keboola.com/` end up\n * issuing requests to `https://connection.keboola.com//v2/storage/...`, which\n * the Storage API rejects with a 404.\n */\nexport const normalizeBaseUrl = (baseUrl: string): string => baseUrl.replace(/\\/+$/, '');\n\nexport const HttpHeader = {\n CONTENT_TYPE: 'content-type',\n CONTENT_DISPOSITION: 'content-disposition',\n AUTHORIZATION: 'Authorization',\n IDEMPOTENCY_KEY: 'Idempotency-Key',\n IF_MATCH: 'If-Match',\n};\n\nexport const HttpContentType = {\n JSON: 'application/json',\n TEXT_PLAIN: 'text/plain',\n FORM_DATA: 'multipart/form-data',\n TEXT_HTML: 'text/html',\n};\n\nexport const defaultValidateStatus: ValidateStatusFn = ({ response }) =>\n response.status >= 200 && response.status <= 299;\n\n/**\n * Whether a response carries an HTML document.\n *\n * - Media types are case-insensitive, so a `Text/HTML` login page is still one.\n * - Only meaningful on a *successful* response: HTML on a failed one is a real error page.\n */\nexport const isHtmlResponse = ({ response }: ApiResponse) =>\n !!response.headers\n .get(HttpHeader.CONTENT_TYPE)\n ?.toLowerCase()\n .includes(HttpContentType.TEXT_HTML);\n\nfunction removeUndefined(obj: Record<string, string>) {\n const objCopy = { ...obj };\n for (const [key, value] of Object.entries(objCopy)) {\n if (value == null) delete objCopy[key];\n }\n return objCopy;\n}\n\n// `application/json`, but also `application/json; charset=utf-8` and the `+json` suffix family.\n// Comparing the raw header for equality misses every response that carries a charset.\nconst JSON_MEDIA_TYPE = /^application\\/([\\w.-]+\\+)?json$/;\n\nconst getMediaType = (response: Response) =>\n response.headers.get(HttpHeader.CONTENT_TYPE)?.split(';')[0]?.trim().toLowerCase() ?? '';\n\n// Declared JSON is parsed strictly: a body that doesn't parse is a broken response, not a text\n// payload, and `JSON.parse` throwing is the right answer. Read it as text first only so an empty\n// body can resolve to `null` like a 204 — matching the charset form brings `application/json;\n// charset=utf-8` onto this path, where `response.json()` would turn a 200-with-no-body into a\n// `SyntaxError` it never used to be.\nconst parseJson = async (response: Response) => {\n const text = await response.text();\n return text.trim() === '' ? null : JSON.parse(text);\n};\n\nexport const parseData = async (response: Response, parseAs: ParseAs = 'auto') => {\n // No body to read, whatever the caller asked for.\n if (response.status === HttpStatus.NO_CONTENT) return null;\n\n // Per-method-call override\n if (parseAs === 'text') return response.text();\n if (parseAs === 'blob') return response.blob();\n if (parseAs === 'json') return parseJson(response);\n\n const mediaType = getMediaType(response);\n if (JSON_MEDIA_TYPE.test(mediaType)) return parseJson(response);\n\n // A declared binary payload must come back as bytes — `text()` would decode it as UTF-8 and\n // corrupt it. `application/octet-stream` is the only binary type an endpoint declares today\n // (kai-agent's sandbox file download); widen deliberately, never by sniffing.\n if (mediaType === 'application/octet-stream') return response.blob();\n\n // Any other declared type describes its own payload — the query-service CSV export, the\n // data-science `text/plain` endpoints — so hand back the exact bytes instead of sniffing them.\n return response.text();\n};\n\n// Header instance serialize undefined value as `undefined`, we do not want that\nconst cleanHeadersInit = (headersInit: HeadersInit | undefined) => {\n if (Array.isArray(headersInit)) return headersInit;\n if (headersInit instanceof Headers) return headersInit;\n if (headersInit == null) return headersInit;\n\n return removeUndefined(headersInit);\n};\n\nconst createHeaders = (\n headersInitA: HeadersInit | undefined,\n headersInitB: HeadersInit | undefined,\n) => {\n const headersA = new Headers(cleanHeadersInit(headersInitA));\n const headersB = new Headers(cleanHeadersInit(headersInitB));\n\n headersB.forEach((value, key) => {\n headersA.set(key, value);\n });\n\n return headersA;\n};\n\nexport const createPath = (path: string, pathParam: PathParam = {}) =>\n path.replace(/\\{([^}]+)}/g, (_, key) => {\n if (!(key in pathParam))\n throw new Error(`Path parameter \"${key}\" is missing in the path \"${path}\"`);\n\n return encodeURIComponent(pathParam[key]!);\n });\n\nexport const createSearch = (\n query: Record<string, unknown>,\n options: Pick<IStringifyOptions, 'arrayFormat'> = {},\n) => {\n return qs.stringify(query, {\n encodeValuesOnly: true,\n skipNulls: true,\n ...options,\n });\n};\n\nexport const createBody = (body: BodyParam, headers: Headers) => {\n if (body == null) return null;\n if (body instanceof FormData) return body; // fetch automatically sets content-type header\n if (typeof body === 'string') return body; // fetch automatically sets content-type header\n\n const stringifyBody = JSON.stringify(body);\n const stringBody = stringifyBody === '{}' ? null : stringifyBody;\n if (stringBody) headers.set(HttpHeader.CONTENT_TYPE, HttpContentType.JSON);\n\n return stringBody;\n};\n\nexport const parseContentDispositionHeader = (contentDisposition?: string | null) => {\n // extract the type ('inline' or 'attachment'), default the type to 'unknown'\n const type = (() => {\n const typeMatch = contentDisposition?.match(/^\\s*(inline|attachment)\\s*;/i);\n return (typeMatch?.[1]?.toLowerCase() ?? 'unknown') as 'inline' | 'attachment' | 'unknown';\n })();\n\n // extract the filename, default the type to null\n const filename = (() => {\n const filenameMatch = contentDisposition?.match(/filename=\"([^\"]+)\"/i);\n if (filenameMatch) return filenameMatch[1];\n\n // If no filename=\"...\", check for encoded filename*=UTF-8''\n const encodedFilenameMatch = contentDisposition?.match(/filename\\*=(?:UTF-8'')?([^;]+)/i);\n if (encodedFilenameMatch?.[1]) return decodeURIComponent(encodedFilenameMatch[1]);\n\n // Check for unquoted filenames (rare but possible)\n const unquotedFilenameMatch = contentDisposition?.match(/filename=([^;]+)/i);\n return unquotedFilenameMatch?.[1] ?? null;\n })();\n\n // Return the parsed result\n return { type, filename };\n};\n\nexport const createFetchRequest: CreateFetchRequestFn = ({\n url,\n method,\n params,\n options = {},\n defaultOptions,\n}) => {\n const {\n baseUrl,\n validateStatus: defValidateStatus = defaultValidateStatus,\n headers: defaultHeaders,\n fetchFn: defaultFetchFn,\n ...restDefaultOptions\n } = defaultOptions;\n const {\n validateStatus,\n queryArrayFormat,\n headers: endpointHeaders,\n fetchFn,\n parseAs,\n ...restOptions\n } = options;\n\n const headers = createHeaders(defaultHeaders, endpointHeaders);\n const path = createPath(url, params.path);\n const search = createSearch(params.query ?? {}, { arrayFormat: queryArrayFormat });\n const body = createBody(params.body, headers);\n\n const urlInstance = new URL(normalizeBaseUrl(baseUrl) + path);\n urlInstance.search = search;\n\n const request = new Request(urlInstance, {\n ...restDefaultOptions,\n ...restOptions,\n headers,\n method: method.toUpperCase(),\n body,\n });\n\n return {\n request,\n validateStatus: validateStatus ?? defValidateStatus,\n fetchFn: fetchFn ?? defaultFetchFn,\n parseAs,\n };\n};\n","import { ApiError } from '../../errors';\n\nimport type {\n BaseFetchParams,\n CoreFetchFn,\n CreateFetchClientOptions,\n FetchClientOptions,\n HttpMethod,\n} from './types';\nimport { createFetchRequest, parseData } from './utils';\n\nexport type FetchClientError = TypeError | ApiError | SyntaxError | DOMException;\n\nexport const isApiError = (error: unknown): error is ApiError => error instanceof ApiError;\n\nexport const isAbortError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'AbortError';\n\nexport const isTimeoutError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'TimeoutError';\n\nexport const isFetchClientError = (error: unknown): error is FetchClientError =>\n error instanceof TypeError || error instanceof SyntaxError || isApiError(error);\n\n// `fetchFn` is resolved per request by `createFetchRequest` (endpoint option beats client option),\n// so a single request can swap the transport without rebuilding the client.\nconst coreFetch: CoreFetchFn = async ({ request, validateStatus, fetchFn = fetch, parseAs }) => {\n const response = await fetchFn(request);\n const data = await parseData(response, parseAs);\n\n const apiResponse = {\n request,\n response,\n data,\n };\n\n const boolOrError = validateStatus(apiResponse);\n if (isApiError(boolOrError)) throw boolOrError;\n if (!boolOrError) throw new ApiError(apiResponse);\n\n return apiResponse;\n};\n\nexport const createFetchClient = ({\n middlewares = [],\n ...defaultOptions\n}: CreateFetchClientOptions) => {\n const fetchWithMiddlewares = middlewares.reduceRight(\n (next, middleware) => middleware(next),\n coreFetch,\n );\n\n const createFetchMethod =\n (method: HttpMethod) =>\n async (url: string, params: BaseFetchParams, options: FetchClientOptions = {}) => {\n const request = createFetchRequest({\n url,\n method,\n params,\n defaultOptions,\n options,\n });\n\n const methodMiddlewares = options?.middlewares ?? [];\n\n return methodMiddlewares.reduceRight(\n (next, middleware) => middleware(next),\n fetchWithMiddlewares,\n )(request);\n };\n\n return {\n get: createFetchMethod('get'),\n post: createFetchMethod('post'),\n put: createFetchMethod('put'),\n patch: createFetchMethod('patch'),\n delete: createFetchMethod('delete'),\n };\n};\n"],"mappings":";;;;AAEA,IAAa,WAAb,cAA8B,MAAM;CAClC;CACA;CACA;CAEA,YAAY,EAAE,UAAU,SAAS,QAAqB;EACpD,MAAM,SAAS,UAAU;EACzB,KAAK,WAAW;EAChB,KAAK,UAAU;EACf,KAAK,OAAO;CACd;AACF;;;ACVA,MAAa,oBAAoB;CAC/B,mBAAmB;CACnB,sBAAsB;CACtB,iBAAiB;CACjB,YAAY;;CAEZ,oBAAoB;AACtB;AAEA,MAAa,aAAa;CACxB,YAAY;CACZ,aAAa;CACb,cAAc;CACd,sBAAsB;CACtB,uBAAuB;CACvB,aAAa;CACb,qBAAqB;CACrB,iBAAiB;AACnB;AAEA,MAAa,yBAAyB;;;;;;;;;;;ACDtC,MAAa,oBAAoB,YAA4B,QAAQ,QAAQ,QAAQ,EAAE;AAEvF,MAAa,aAAa;CACxB,cAAc;CACd,qBAAqB;CACrB,eAAe;CACf,iBAAiB;CACjB,UAAU;AACZ;AAEA,MAAa,kBAAkB;CAC7B,MAAM;CACN,YAAY;CACZ,WAAW;CACX,WAAW;AACb;AAEA,MAAa,yBAA2C,EAAE,eACxD,SAAS,UAAU,OAAO,SAAS,UAAU;;;;;;;AAQ/C,MAAa,kBAAkB,EAAE,eAC/B,CAAC,CAAC,SAAS,QACR,IAAI,WAAW,YAAY,CAAC,EAC3B,YAAY,CAAC,CACd,SAAS,gBAAgB,SAAS;AAEvC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GACA;GACA;EACF,CAAC;EAID,QAF0B,SAAS,eAAe,CAAC,EAAA,CAE1B,aACtB,MAAM,eAAe,WAAW,IAAI,GACrC,oBACF,CAAC,CAAC,OAAO;CACX;CAEF,OAAO;EACL,KAAK,kBAAkB,KAAK;EAC5B,MAAM,kBAAkB,MAAM;EAC9B,KAAK,kBAAkB,KAAK;EAC5B,OAAO,kBAAkB,OAAO;EAChC,QAAQ,kBAAkB,QAAQ;CACpC;AACF"}
1
+ {"version":3,"file":"createFetchClient-U-ZrwPl2.js","names":[],"sources":["../src/errors/ApiError.ts","../src/internal.ts","../src/fetchClient/createFetchClient/utils.ts","../src/fetchClient/createFetchClient/createFetchClient.ts"],"sourcesContent":["import type { ApiResponse } from '../fetchClient/createFetchClient/types';\n\nexport class ApiError extends Error {\n response: Response;\n request: Request;\n data: unknown;\n\n constructor({ response, request, data }: ApiResponse) {\n super(response.statusText);\n this.response = response;\n this.request = request;\n this.data = data;\n }\n}\n","// Package-internal constants. Not part of the public\n// `@keboola/api-client/constants` sub-path (that is the `constants/` directory).\n\nexport const KeboolaHttpHeader = {\n STORAGE_API_TOKEN: 'X-StorageApi-Token',\n MANAGEMENT_API_TOKEN: 'X-Kbc-Manageapitoken',\n STORAGE_API_URL: 'x-storageapi-url',\n PROJECT_ID: 'X-KBC-ProjectId',\n /** Storage job a request enqueued, reported on the response rather than in its body. */\n STORAGE_API_JOB_ID: 'X-StorageApi-Job-Id',\n} as const;\n\nexport const HttpStatus = {\n NO_CONTENT: 204,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n UNPROCESSABLE_ENTITY: 422,\n INTERNAL_SERVER_ERROR: 500,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n} as const;\n\nexport const ENCRYPTED_VALUE_PREFIX = 'KBC::';\n","import type { IStringifyOptions } from 'qs';\nimport qs from 'qs';\n\nimport { HttpStatus } from '../../internal';\n\nimport type {\n ApiResponse,\n BodyParam,\n CreateFetchRequestFn,\n ParseAs,\n PathParam,\n ValidateStatusFn,\n} from './types';\n\n/**\n * Strips trailing slashes from a base URL so concatenating a leading-slash\n * path (e.g. `/v2/storage`) never produces a double slash.\n *\n * Without this, callers that pass `https://connection.keboola.com/` end up\n * issuing requests to `https://connection.keboola.com//v2/storage/...`, which\n * the Storage API rejects with a 404.\n */\nexport const normalizeBaseUrl = (baseUrl: string): string => baseUrl.replace(/\\/+$/, '');\n\nexport const HttpHeader = {\n CONTENT_TYPE: 'content-type',\n CONTENT_DISPOSITION: 'content-disposition',\n AUTHORIZATION: 'Authorization',\n IDEMPOTENCY_KEY: 'Idempotency-Key',\n IF_MATCH: 'If-Match',\n};\n\nexport const HttpContentType = {\n JSON: 'application/json',\n TEXT_PLAIN: 'text/plain',\n FORM_DATA: 'multipart/form-data',\n TEXT_HTML: 'text/html',\n};\n\nexport const defaultValidateStatus: ValidateStatusFn = ({ response }) =>\n response.status >= 200 && response.status <= 299;\n\n/**\n * Whether a response declares HTML.\n *\n * - Media types are case-insensitive, so `Text/HTML` counts.\n * - A header fact only: a `text/html` response may still carry no body at all.\n */\nexport const isHtmlResponse = ({ response }: ApiResponse) =>\n !!response.headers\n .get(HttpHeader.CONTENT_TYPE)\n ?.toLowerCase()\n .includes(HttpContentType.TEXT_HTML);\n\n/**\n * Whether a response carried no payload, across every shape `parseData` produces for one:\n *\n * 1. `null` — a `204`, or a JSON body that was empty or whitespace.\n * 2. `''` — any other media type with an empty body, read as text.\n *\n * Whitespace-only text counts as empty, matching how `parseJson` already treats it.\n */\nexport const isContentEmpty = ({ data }: ApiResponse) =>\n data === null || data === undefined || (typeof data === 'string' && data.trim() === '');\n\nfunction removeUndefined(obj: Record<string, string>) {\n const objCopy = { ...obj };\n for (const [key, value] of Object.entries(objCopy)) {\n if (value == null) delete objCopy[key];\n }\n return objCopy;\n}\n\n// `application/json`, but also `application/json; charset=utf-8` and the `+json` suffix family.\n// Comparing the raw header for equality misses every response that carries a charset.\nconst JSON_MEDIA_TYPE = /^application\\/([\\w.-]+\\+)?json$/;\n\nconst getMediaType = (response: Response) =>\n response.headers.get(HttpHeader.CONTENT_TYPE)?.split(';')[0]?.trim().toLowerCase() ?? '';\n\n// Declared JSON is parsed strictly: a body that doesn't parse is a broken response, not a text\n// payload, and `JSON.parse` throwing is the right answer. Read it as text first only so an empty\n// body can resolve to `null` like a 204 — matching the charset form brings `application/json;\n// charset=utf-8` onto this path, where `response.json()` would turn a 200-with-no-body into a\n// `SyntaxError` it never used to be.\nconst parseJson = async (response: Response) => {\n const text = await response.text();\n return text.trim() === '' ? null : JSON.parse(text);\n};\n\nexport const parseData = async (response: Response, parseAs: ParseAs = 'auto') => {\n // No body to read, whatever the caller asked for.\n if (response.status === HttpStatus.NO_CONTENT) return null;\n\n // Per-method-call override\n if (parseAs === 'text') return response.text();\n if (parseAs === 'blob') return response.blob();\n if (parseAs === 'json') return parseJson(response);\n\n const mediaType = getMediaType(response);\n if (JSON_MEDIA_TYPE.test(mediaType)) return parseJson(response);\n\n // A declared binary payload must come back as bytes — `text()` would decode it as UTF-8 and\n // corrupt it. `application/octet-stream` is the only binary type an endpoint declares today\n // (kai-agent's sandbox file download); widen deliberately, never by sniffing.\n if (mediaType === 'application/octet-stream') return response.blob();\n\n // Any other declared type describes its own payload — the query-service CSV export, the\n // data-science `text/plain` endpoints — so hand back the exact bytes instead of sniffing them.\n return response.text();\n};\n\n// Header instance serialize undefined value as `undefined`, we do not want that\nconst cleanHeadersInit = (headersInit: HeadersInit | undefined) => {\n if (Array.isArray(headersInit)) return headersInit;\n if (headersInit instanceof Headers) return headersInit;\n if (headersInit == null) return headersInit;\n\n return removeUndefined(headersInit);\n};\n\nconst createHeaders = (\n headersInitA: HeadersInit | undefined,\n headersInitB: HeadersInit | undefined,\n) => {\n const headersA = new Headers(cleanHeadersInit(headersInitA));\n const headersB = new Headers(cleanHeadersInit(headersInitB));\n\n headersB.forEach((value, key) => {\n headersA.set(key, value);\n });\n\n return headersA;\n};\n\nexport const createPath = (path: string, pathParam: PathParam = {}) =>\n path.replace(/\\{([^}]+)}/g, (_, key) => {\n if (!(key in pathParam))\n throw new Error(`Path parameter \"${key}\" is missing in the path \"${path}\"`);\n\n return encodeURIComponent(pathParam[key]!);\n });\n\nexport const createSearch = (\n query: Record<string, unknown>,\n options: Pick<IStringifyOptions, 'arrayFormat'> = {},\n) => {\n return qs.stringify(query, {\n encodeValuesOnly: true,\n skipNulls: true,\n ...options,\n });\n};\n\nexport const createBody = (body: BodyParam, headers: Headers) => {\n if (body == null) return null;\n if (body instanceof FormData) return body; // fetch automatically sets content-type header\n if (typeof body === 'string') return body; // fetch automatically sets content-type header\n\n const stringifyBody = JSON.stringify(body);\n const stringBody = stringifyBody === '{}' ? null : stringifyBody;\n if (stringBody) headers.set(HttpHeader.CONTENT_TYPE, HttpContentType.JSON);\n\n return stringBody;\n};\n\nexport const parseContentDispositionHeader = (contentDisposition?: string | null) => {\n // extract the type ('inline' or 'attachment'), default the type to 'unknown'\n const type = (() => {\n const typeMatch = contentDisposition?.match(/^\\s*(inline|attachment)\\s*;/i);\n return (typeMatch?.[1]?.toLowerCase() ?? 'unknown') as 'inline' | 'attachment' | 'unknown';\n })();\n\n // extract the filename, default the type to null\n const filename = (() => {\n const filenameMatch = contentDisposition?.match(/filename=\"([^\"]+)\"/i);\n if (filenameMatch) return filenameMatch[1];\n\n // If no filename=\"...\", check for encoded filename*=UTF-8''\n const encodedFilenameMatch = contentDisposition?.match(/filename\\*=(?:UTF-8'')?([^;]+)/i);\n if (encodedFilenameMatch?.[1]) return decodeURIComponent(encodedFilenameMatch[1]);\n\n // Check for unquoted filenames (rare but possible)\n const unquotedFilenameMatch = contentDisposition?.match(/filename=([^;]+)/i);\n return unquotedFilenameMatch?.[1] ?? null;\n })();\n\n // Return the parsed result\n return { type, filename };\n};\n\nexport const createFetchRequest: CreateFetchRequestFn = ({\n url,\n method,\n params,\n options = {},\n defaultOptions,\n}) => {\n const {\n baseUrl,\n validateStatus: defValidateStatus = defaultValidateStatus,\n headers: defaultHeaders,\n fetchFn: defaultFetchFn,\n ...restDefaultOptions\n } = defaultOptions;\n const {\n validateStatus,\n queryArrayFormat,\n headers: endpointHeaders,\n fetchFn,\n parseAs,\n ...restOptions\n } = options;\n\n const headers = createHeaders(defaultHeaders, endpointHeaders);\n const path = createPath(url, params.path);\n const search = createSearch(params.query ?? {}, { arrayFormat: queryArrayFormat });\n const body = createBody(params.body, headers);\n\n const urlInstance = new URL(normalizeBaseUrl(baseUrl) + path);\n urlInstance.search = search;\n\n const request = new Request(urlInstance, {\n ...restDefaultOptions,\n ...restOptions,\n headers,\n method: method.toUpperCase(),\n body,\n });\n\n return {\n request,\n validateStatus: validateStatus ?? defValidateStatus,\n fetchFn: fetchFn ?? defaultFetchFn,\n parseAs,\n };\n};\n","import { ApiError } from '../../errors';\n\nimport type {\n BaseFetchParams,\n CoreFetchFn,\n CreateFetchClientOptions,\n FetchClientOptions,\n HttpMethod,\n} from './types';\nimport { createFetchRequest, parseData } from './utils';\n\nexport type FetchClientError = TypeError | ApiError | SyntaxError | DOMException;\n\nexport const isApiError = (error: unknown): error is ApiError => error instanceof ApiError;\n\nexport const isAbortError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'AbortError';\n\nexport const isTimeoutError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'TimeoutError';\n\nexport const isFetchClientError = (error: unknown): error is FetchClientError =>\n error instanceof TypeError || error instanceof SyntaxError || isApiError(error);\n\n// `fetchFn` is resolved per request by `createFetchRequest` (endpoint option beats client option),\n// so a single request can swap the transport without rebuilding the client.\nconst coreFetch: CoreFetchFn = async ({ request, validateStatus, fetchFn = fetch, parseAs }) => {\n const response = await fetchFn(request);\n const data = await parseData(response, parseAs);\n\n const apiResponse = {\n request,\n response,\n data,\n };\n\n const boolOrError = validateStatus(apiResponse);\n if (isApiError(boolOrError)) throw boolOrError;\n if (!boolOrError) throw new ApiError(apiResponse);\n\n return apiResponse;\n};\n\nexport const createFetchClient = ({\n middlewares = [],\n ...defaultOptions\n}: CreateFetchClientOptions) => {\n const fetchWithMiddlewares = middlewares.reduceRight(\n (next, middleware) => middleware(next),\n coreFetch,\n );\n\n const createFetchMethod =\n (method: HttpMethod) =>\n async (url: string, params: BaseFetchParams, options: FetchClientOptions = {}) => {\n const request = createFetchRequest({\n url,\n method,\n params,\n defaultOptions,\n options,\n });\n\n const methodMiddlewares = options?.middlewares ?? [];\n\n return methodMiddlewares.reduceRight(\n (next, middleware) => middleware(next),\n fetchWithMiddlewares,\n )(request);\n };\n\n return {\n get: createFetchMethod('get'),\n post: createFetchMethod('post'),\n put: createFetchMethod('put'),\n patch: createFetchMethod('patch'),\n delete: createFetchMethod('delete'),\n };\n};\n"],"mappings":";;AAEA,IAAa,WAAb,cAA8B,MAAM;CAClC;CACA;CACA;CAEA,YAAY,EAAE,UAAU,SAAS,QAAqB;EACpD,MAAM,SAAS,UAAU;EACzB,KAAK,WAAW;EAChB,KAAK,UAAU;EACf,KAAK,OAAO;CACd;AACF;;;ACVA,MAAa,oBAAoB;CAC/B,mBAAmB;CACnB,sBAAsB;CACtB,iBAAiB;CACjB,YAAY;;CAEZ,oBAAoB;AACtB;AAEA,MAAa,aAAa;CACxB,YAAY;CACZ,aAAa;CACb,cAAc;CACd,sBAAsB;CACtB,uBAAuB;CACvB,aAAa;CACb,qBAAqB;CACrB,iBAAiB;AACnB;AAEA,MAAa,yBAAyB;;;;;;;;;;;ACDtC,MAAa,oBAAoB,YAA4B,QAAQ,QAAQ,QAAQ,EAAE;AAEvF,MAAa,aAAa;CACxB,cAAc;CACd,qBAAqB;CACrB,eAAe;CACf,iBAAiB;CACjB,UAAU;AACZ;AAEA,MAAa,kBAAkB;CAC7B,MAAM;CACN,YAAY;CACZ,WAAW;CACX,WAAW;AACb;AAEA,MAAa,yBAA2C,EAAE,eACxD,SAAS,UAAU,OAAO,SAAS,UAAU;;;;;;;AAQ/C,MAAa,kBAAkB,EAAE,eAC/B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,cAAc,CAAC,GACf,GAAG,qBAC2B;CAC9B,MAAM,uBAAuB,YAAY,aACtC,MAAM,eAAe,WAAW,IAAI,GACrC,SACF;CAEA,MAAM,qBACH,WACD,OAAO,KAAa,QAAyB,UAA8B,CAAC,MAAM;EAChF,MAAM,UAAU,mBAAmB;GACjC;GACA;GACA;GACA;GACA;EACF,CAAC;EAID,QAF0B,SAAS,eAAe,CAAC,EAAA,CAE1B,aACtB,MAAM,eAAe,WAAW,IAAI,GACrC,oBACF,CAAC,CAAC,OAAO;CACX;CAEF,OAAO;EACL,KAAK,kBAAkB,KAAK;EAC5B,MAAM,kBAAkB,MAAM;EAC9B,KAAK,kBAAkB,KAAK;EAC5B,OAAO,kBAAkB,OAAO;EAChC,QAAQ,kBAAkB,QAAQ;CACpC;AACF"}
@@ -1,4 +1,4 @@
1
- const require_createFetchClient = require("./createFetchClient-DvZvD31l.cjs");
1
+ const require_createFetchClient = require("./createFetchClient-DgMiqTJ8.cjs");
2
2
  //#region src/fetchClient/createGenericFetchClient.ts
3
3
  const createGenericFetchClient = (defaultOptions) => require_createFetchClient.createFetchClient(defaultOptions);
4
4
  //#endregion
@@ -9,4 +9,4 @@ Object.defineProperty(exports, "createGenericFetchClient", {
9
9
  }
10
10
  });
11
11
 
12
- //# sourceMappingURL=createGenericFetchClient-qfCZlCTv.cjs.map
12
+ //# sourceMappingURL=createGenericFetchClient-o3cPJeRn.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"createGenericFetchClient-qfCZlCTv.cjs","names":["createFetchClient"],"sources":["../src/fetchClient/createGenericFetchClient.ts"],"sourcesContent":["import type {\n ApiResponse,\n BodyParam,\n CreateFetchClientOptions,\n FetchClientOptions,\n PathParam,\n QueryParam,\n} from './createFetchClient';\nimport { createFetchClient } from './createFetchClient';\n\ntype FetchParams<Path = PathParam, Query = QueryParam, Body = BodyParam> = {\n path?: Path;\n query?: Query;\n body?: Body;\n};\n\ntype FetchMethod = <Data, Path = PathParam, Query = QueryParam, Body = BodyParam>(\n url: string,\n params: FetchParams<Path, Query, Body>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<Data>>;\n\ntype FetchClient = {\n get: FetchMethod;\n post: FetchMethod;\n put: FetchMethod;\n patch: FetchMethod;\n delete: FetchMethod;\n};\n\nexport const createGenericFetchClient = (defaultOptions: CreateFetchClientOptions) =>\n createFetchClient(defaultOptions) as FetchClient;\n"],"mappings":";;AA8BA,MAAa,4BAA4B,mBACvCA,0BAAAA,kBAAkB,cAAc"}
1
+ {"version":3,"file":"createGenericFetchClient-o3cPJeRn.cjs","names":["createFetchClient"],"sources":["../src/fetchClient/createGenericFetchClient.ts"],"sourcesContent":["import type {\n ApiResponse,\n BodyParam,\n CreateFetchClientOptions,\n FetchClientOptions,\n PathParam,\n QueryParam,\n} from './createFetchClient';\nimport { createFetchClient } from './createFetchClient';\n\ntype FetchParams<Path = PathParam, Query = QueryParam, Body = BodyParam> = {\n path?: Path;\n query?: Query;\n body?: Body;\n};\n\ntype FetchMethod = <Data, Path = PathParam, Query = QueryParam, Body = BodyParam>(\n url: string,\n params: FetchParams<Path, Query, Body>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<Data>>;\n\ntype FetchClient = {\n get: FetchMethod;\n post: FetchMethod;\n put: FetchMethod;\n patch: FetchMethod;\n delete: FetchMethod;\n};\n\nexport const createGenericFetchClient = (defaultOptions: CreateFetchClientOptions) =>\n createFetchClient(defaultOptions) as FetchClient;\n"],"mappings":";;AA8BA,MAAa,4BAA4B,mBACvCA,0BAAAA,kBAAkB,cAAc"}
@@ -1,7 +1,7 @@
1
- import { t as createFetchClient } from "./createFetchClient-DdyZMhxO.js";
1
+ import { t as createFetchClient } from "./createFetchClient-U-ZrwPl2.js";
2
2
  //#region src/fetchClient/createGenericFetchClient.ts
3
3
  const createGenericFetchClient = (defaultOptions) => createFetchClient(defaultOptions);
4
4
  //#endregion
5
5
  export { createGenericFetchClient as t };
6
6
 
7
- //# sourceMappingURL=createGenericFetchClient-MQeLRiNW.js.map
7
+ //# sourceMappingURL=createGenericFetchClient-rxvUUbap.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createGenericFetchClient-MQeLRiNW.js","names":[],"sources":["../src/fetchClient/createGenericFetchClient.ts"],"sourcesContent":["import type {\n ApiResponse,\n BodyParam,\n CreateFetchClientOptions,\n FetchClientOptions,\n PathParam,\n QueryParam,\n} from './createFetchClient';\nimport { createFetchClient } from './createFetchClient';\n\ntype FetchParams<Path = PathParam, Query = QueryParam, Body = BodyParam> = {\n path?: Path;\n query?: Query;\n body?: Body;\n};\n\ntype FetchMethod = <Data, Path = PathParam, Query = QueryParam, Body = BodyParam>(\n url: string,\n params: FetchParams<Path, Query, Body>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<Data>>;\n\ntype FetchClient = {\n get: FetchMethod;\n post: FetchMethod;\n put: FetchMethod;\n patch: FetchMethod;\n delete: FetchMethod;\n};\n\nexport const createGenericFetchClient = (defaultOptions: CreateFetchClientOptions) =>\n createFetchClient(defaultOptions) as FetchClient;\n"],"mappings":";;AA8BA,MAAa,4BAA4B,mBACvC,kBAAkB,cAAc"}
1
+ {"version":3,"file":"createGenericFetchClient-rxvUUbap.js","names":[],"sources":["../src/fetchClient/createGenericFetchClient.ts"],"sourcesContent":["import type {\n ApiResponse,\n BodyParam,\n CreateFetchClientOptions,\n FetchClientOptions,\n PathParam,\n QueryParam,\n} from './createFetchClient';\nimport { createFetchClient } from './createFetchClient';\n\ntype FetchParams<Path = PathParam, Query = QueryParam, Body = BodyParam> = {\n path?: Path;\n query?: Query;\n body?: Body;\n};\n\ntype FetchMethod = <Data, Path = PathParam, Query = QueryParam, Body = BodyParam>(\n url: string,\n params: FetchParams<Path, Query, Body>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<Data>>;\n\ntype FetchClient = {\n get: FetchMethod;\n post: FetchMethod;\n put: FetchMethod;\n patch: FetchMethod;\n delete: FetchMethod;\n};\n\nexport const createGenericFetchClient = (defaultOptions: CreateFetchClientOptions) =>\n createFetchClient(defaultOptions) as FetchClient;\n"],"mappings":";;AA8BA,MAAa,4BAA4B,mBACvC,kBAAkB,cAAc"}
@@ -1,7 +1,7 @@
1
- import { t as createFetchClient } from "./createFetchClient-DdyZMhxO.js";
1
+ import { t as createFetchClient } from "./createFetchClient-U-ZrwPl2.js";
2
2
  //#region src/fetchClient/createOpenapiFetchClient.ts
3
3
  const createOpenapiFetchClient = (defaultOptions) => createFetchClient(defaultOptions);
4
4
  //#endregion
5
5
  export { createOpenapiFetchClient as t };
6
6
 
7
- //# sourceMappingURL=createOpenapiFetchClient-E7OIVkYv.js.map
7
+ //# sourceMappingURL=createOpenapiFetchClient-BVSc9ibR.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createOpenapiFetchClient-E7OIVkYv.js","names":[],"sources":["../src/fetchClient/createOpenapiFetchClient.ts"],"sourcesContent":["import {\n type ApiResponse,\n createFetchClient,\n type CreateFetchClientOptions,\n type FetchClientOptions,\n type HttpMethod,\n} from './createFetchClient';\nimport type { OpenapiParametersType, OpenapiReturnType } from './types';\n\ntype OpenapiPaths<Paths> = {\n [P in keyof Paths]: {\n [M in HttpMethod]?: unknown;\n };\n};\n\ntype PathsWithMethod<Paths extends OpenapiPaths<Paths>, PathnameMethod extends HttpMethod> = {\n [Pathname in keyof Paths]: Paths[Pathname] extends {\n [K in PathnameMethod]: any;\n }\n ? Pathname\n : never;\n}[keyof Paths];\n\ntype FetchMethod<Paths extends OpenapiPaths<Paths>, Method extends HttpMethod> = <\n Path extends PathsWithMethod<Paths, Method>,\n>(\n url: Path,\n params: OpenapiParametersType<Paths[Path][Method]>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<OpenapiReturnType<Paths[Path][Method]>>>;\n\ntype FetchClient<Paths extends OpenapiPaths<Paths>> = {\n get: FetchMethod<Paths, 'get'>;\n post: FetchMethod<Paths, 'post'>;\n put: FetchMethod<Paths, 'put'>;\n patch: FetchMethod<Paths, 'patch'>;\n delete: FetchMethod<Paths, 'delete'>;\n};\n\nexport const createOpenapiFetchClient = <Paths extends OpenapiPaths<Paths>>(\n defaultOptions: CreateFetchClientOptions,\n) => createFetchClient(defaultOptions) as FetchClient<Paths>;\n"],"mappings":";;AAuCA,MAAa,4BACX,mBACG,kBAAkB,cAAc"}
1
+ {"version":3,"file":"createOpenapiFetchClient-BVSc9ibR.js","names":[],"sources":["../src/fetchClient/createOpenapiFetchClient.ts"],"sourcesContent":["import {\n type ApiResponse,\n createFetchClient,\n type CreateFetchClientOptions,\n type FetchClientOptions,\n type HttpMethod,\n} from './createFetchClient';\nimport type { OpenapiParametersType, OpenapiReturnType } from './types';\n\ntype OpenapiPaths<Paths> = {\n [P in keyof Paths]: {\n [M in HttpMethod]?: unknown;\n };\n};\n\ntype PathsWithMethod<Paths extends OpenapiPaths<Paths>, PathnameMethod extends HttpMethod> = {\n [Pathname in keyof Paths]: Paths[Pathname] extends {\n [K in PathnameMethod]: any;\n }\n ? Pathname\n : never;\n}[keyof Paths];\n\ntype FetchMethod<Paths extends OpenapiPaths<Paths>, Method extends HttpMethod> = <\n Path extends PathsWithMethod<Paths, Method>,\n>(\n url: Path,\n params: OpenapiParametersType<Paths[Path][Method]>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<OpenapiReturnType<Paths[Path][Method]>>>;\n\ntype FetchClient<Paths extends OpenapiPaths<Paths>> = {\n get: FetchMethod<Paths, 'get'>;\n post: FetchMethod<Paths, 'post'>;\n put: FetchMethod<Paths, 'put'>;\n patch: FetchMethod<Paths, 'patch'>;\n delete: FetchMethod<Paths, 'delete'>;\n};\n\nexport const createOpenapiFetchClient = <Paths extends OpenapiPaths<Paths>>(\n defaultOptions: CreateFetchClientOptions,\n) => createFetchClient(defaultOptions) as FetchClient<Paths>;\n"],"mappings":";;AAuCA,MAAa,4BACX,mBACG,kBAAkB,cAAc"}
@@ -1,4 +1,4 @@
1
- const require_createFetchClient = require("./createFetchClient-DvZvD31l.cjs");
1
+ const require_createFetchClient = require("./createFetchClient-DgMiqTJ8.cjs");
2
2
  //#region src/fetchClient/createOpenapiFetchClient.ts
3
3
  const createOpenapiFetchClient = (defaultOptions) => require_createFetchClient.createFetchClient(defaultOptions);
4
4
  //#endregion
@@ -9,4 +9,4 @@ Object.defineProperty(exports, "createOpenapiFetchClient", {
9
9
  }
10
10
  });
11
11
 
12
- //# sourceMappingURL=createOpenapiFetchClient-C57Ljzi6.cjs.map
12
+ //# sourceMappingURL=createOpenapiFetchClient-DhUU3M1W.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"createOpenapiFetchClient-C57Ljzi6.cjs","names":["createFetchClient"],"sources":["../src/fetchClient/createOpenapiFetchClient.ts"],"sourcesContent":["import {\n type ApiResponse,\n createFetchClient,\n type CreateFetchClientOptions,\n type FetchClientOptions,\n type HttpMethod,\n} from './createFetchClient';\nimport type { OpenapiParametersType, OpenapiReturnType } from './types';\n\ntype OpenapiPaths<Paths> = {\n [P in keyof Paths]: {\n [M in HttpMethod]?: unknown;\n };\n};\n\ntype PathsWithMethod<Paths extends OpenapiPaths<Paths>, PathnameMethod extends HttpMethod> = {\n [Pathname in keyof Paths]: Paths[Pathname] extends {\n [K in PathnameMethod]: any;\n }\n ? Pathname\n : never;\n}[keyof Paths];\n\ntype FetchMethod<Paths extends OpenapiPaths<Paths>, Method extends HttpMethod> = <\n Path extends PathsWithMethod<Paths, Method>,\n>(\n url: Path,\n params: OpenapiParametersType<Paths[Path][Method]>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<OpenapiReturnType<Paths[Path][Method]>>>;\n\ntype FetchClient<Paths extends OpenapiPaths<Paths>> = {\n get: FetchMethod<Paths, 'get'>;\n post: FetchMethod<Paths, 'post'>;\n put: FetchMethod<Paths, 'put'>;\n patch: FetchMethod<Paths, 'patch'>;\n delete: FetchMethod<Paths, 'delete'>;\n};\n\nexport const createOpenapiFetchClient = <Paths extends OpenapiPaths<Paths>>(\n defaultOptions: CreateFetchClientOptions,\n) => createFetchClient(defaultOptions) as FetchClient<Paths>;\n"],"mappings":";;AAuCA,MAAa,4BACX,mBACGA,0BAAAA,kBAAkB,cAAc"}
1
+ {"version":3,"file":"createOpenapiFetchClient-DhUU3M1W.cjs","names":["createFetchClient"],"sources":["../src/fetchClient/createOpenapiFetchClient.ts"],"sourcesContent":["import {\n type ApiResponse,\n createFetchClient,\n type CreateFetchClientOptions,\n type FetchClientOptions,\n type HttpMethod,\n} from './createFetchClient';\nimport type { OpenapiParametersType, OpenapiReturnType } from './types';\n\ntype OpenapiPaths<Paths> = {\n [P in keyof Paths]: {\n [M in HttpMethod]?: unknown;\n };\n};\n\ntype PathsWithMethod<Paths extends OpenapiPaths<Paths>, PathnameMethod extends HttpMethod> = {\n [Pathname in keyof Paths]: Paths[Pathname] extends {\n [K in PathnameMethod]: any;\n }\n ? Pathname\n : never;\n}[keyof Paths];\n\ntype FetchMethod<Paths extends OpenapiPaths<Paths>, Method extends HttpMethod> = <\n Path extends PathsWithMethod<Paths, Method>,\n>(\n url: Path,\n params: OpenapiParametersType<Paths[Path][Method]>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<OpenapiReturnType<Paths[Path][Method]>>>;\n\ntype FetchClient<Paths extends OpenapiPaths<Paths>> = {\n get: FetchMethod<Paths, 'get'>;\n post: FetchMethod<Paths, 'post'>;\n put: FetchMethod<Paths, 'put'>;\n patch: FetchMethod<Paths, 'patch'>;\n delete: FetchMethod<Paths, 'delete'>;\n};\n\nexport const createOpenapiFetchClient = <Paths extends OpenapiPaths<Paths>>(\n defaultOptions: CreateFetchClientOptions,\n) => createFetchClient(defaultOptions) as FetchClient<Paths>;\n"],"mappings":";;AAuCA,MAAa,4BACX,mBACGA,0BAAAA,kBAAkB,cAAc"}
@@ -1,5 +1,5 @@
1
1
  import { t as dedupe } from "./dedupe-DYIHgZoG.js";
2
- import { h as ApiError, p as HttpStatus } from "./createFetchClient-DdyZMhxO.js";
2
+ import { g as ApiError, m as HttpStatus } from "./createFetchClient-U-ZrwPl2.js";
3
3
  //#region src/keboola/bearer/credential.ts
4
4
  const DEFAULT_REFRESH_THRESHOLD = .9;
5
5
  const isUnauthorized = (error) => error instanceof ApiError && error.response.status === HttpStatus.UNAUTHORIZED;
@@ -33,4 +33,4 @@ const createBearerCredential = ({ refresh, getToken, onSessionExpired, refreshTh
33
33
  //#endregion
34
34
  export { isUnauthorized as n, createBearerCredential as t };
35
35
 
36
- //# sourceMappingURL=credential-Bxv7yxOZ.js.map
36
+ //# sourceMappingURL=credential-CihSf_xs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"credential-Bxv7yxOZ.js","names":[],"sources":["../src/keboola/bearer/credential.ts"],"sourcesContent":["import { ApiError } from '../../errors';\nimport { HttpStatus } from '../../internal';\nimport { dedupe } from '../../utils';\n\ntype TokenTiming = { issuedAt: number; expiresIn: number };\ntype TokenSnapshot = { accessToken: string; timing: TokenTiming };\n\ntype Options = {\n // Rotate the credential (single-use refresh-token flow); resolves to the fresh access token.\n refresh: () => Promise<string>;\n // Live read of the current token + timing from the single source of truth (config). `null` when the\n // session is anonymous (no credential yet) — e.g. a pre-auth `login` request.\n getToken: () => TokenSnapshot | null;\n // Called when the session is found dead (refresh or replay rejected). The caller owns the\n // fire-once latch + per-session re-arm (see `config.notifyExpired`), so this may fire more than once.\n onSessionExpired?: () => void;\n refreshThreshold?: number;\n};\n\nconst DEFAULT_REFRESH_THRESHOLD = 0.9;\n\nexport const isUnauthorized = (error: unknown): boolean =>\n error instanceof ApiError && error.response.status === HttpStatus.UNAUTHORIZED;\n\nexport type BearerCredential = {\n // Resolves the current access token, or `null` when the session is anonymous (nothing to stamp).\n getAccessToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n notifyExpired: () => void;\n /**\n * Forget any in-flight rotation, so the next caller starts one of its own. Call on session death.\n *\n * - The dedupe slot is per-session state living on a cross-session singleton — the same reason\n * `config` and not this credential owns the expiry latch.\n * - Without it a request from the *next* session joins the dying session's run, and `refresh`\n * refuses that result for belonging to a session that ended (see `keboola.ts`).\n * - Does not cancel the run: whoever already joined it still gets its outcome.\n */\n abandonRefresh: () => void;\n};\n\nexport const createBearerCredential = ({\n refresh,\n getToken,\n onSessionExpired,\n refreshThreshold = DEFAULT_REFRESH_THRESHOLD,\n}: Options): BearerCredential => {\n const doRefresh = async (): Promise<string> => {\n try {\n return await refresh();\n } catch (error) {\n if (isUnauthorized(error)) onSessionExpired?.();\n throw error;\n }\n };\n\n // Reassigned, not mutated: a fresh `dedupe` is a fresh slot, and the abandoned one keeps its joiners.\n let refreshShared = dedupe(doRefresh);\n\n const refreshAt = (timing: TokenTiming): number =>\n timing.issuedAt + timing.expiresIn * 1000 * refreshThreshold;\n\n const getAccessToken = async ({ forceRefresh = false } = {}): Promise<string | null> => {\n const snapshot = getToken();\n if (snapshot === null) return null; // anonymous: nothing to stamp (pre-auth request)\n const { accessToken, timing } = snapshot;\n if (forceRefresh) return refreshShared(); // 401 path: must succeed, propagate failure\n if (Date.now() < refreshAt(timing)) return accessToken; // still fresh: current token\n // Proactive: best-effort — if the ahead-of-time refresh fails, proceed with the current token\n // and let a real 401 drive the mandatory refresh.\n return refreshShared().catch(() => accessToken);\n };\n\n return {\n getAccessToken,\n notifyExpired: () => onSessionExpired?.(),\n abandonRefresh: () => {\n refreshShared = dedupe(doRefresh);\n },\n };\n};\n"],"mappings":";;;AAmBA,MAAM,4BAA4B;AAElC,MAAa,kBAAkB,UAC7B,iBAAiB,YAAY,MAAM,SAAS,WAAW,WAAW;AAkBpE,MAAa,0BAA0B,EACrC,SACA,UACA,kBACA,mBAAmB,gCACY;CAC/B,MAAM,YAAY,YAA6B;EAC7C,IAAI;GACF,OAAO,MAAM,QAAQ;EACvB,SAAS,OAAO;GACd,IAAI,eAAe,KAAK,GAAG,mBAAmB;GAC9C,MAAM;EACR;CACF;CAGA,IAAI,gBAAgB,OAAO,SAAS;CAEpC,MAAM,aAAa,WACjB,OAAO,WAAW,OAAO,YAAY,MAAO;CAE9C,MAAM,iBAAiB,OAAO,EAAE,eAAe,UAAU,CAAC,MAA8B;EACtF,MAAM,WAAW,SAAS;EAC1B,IAAI,aAAa,MAAM,OAAO;EAC9B,MAAM,EAAE,aAAa,WAAW;EAChC,IAAI,cAAc,OAAO,cAAc;EACvC,IAAI,KAAK,IAAI,IAAI,UAAU,MAAM,GAAG,OAAO;EAG3C,OAAO,cAAc,CAAC,CAAC,YAAY,WAAW;CAChD;CAEA,OAAO;EACL;EACA,qBAAqB,mBAAmB;EACxC,sBAAsB;GACpB,gBAAgB,OAAO,SAAS;EAClC;CACF;AACF"}
1
+ {"version":3,"file":"credential-CihSf_xs.js","names":[],"sources":["../src/keboola/bearer/credential.ts"],"sourcesContent":["import { ApiError } from '../../errors';\nimport { HttpStatus } from '../../internal';\nimport { dedupe } from '../../utils';\n\ntype TokenTiming = { issuedAt: number; expiresIn: number };\ntype TokenSnapshot = { accessToken: string; timing: TokenTiming };\n\ntype Options = {\n // Rotate the credential (single-use refresh-token flow); resolves to the fresh access token.\n refresh: () => Promise<string>;\n // Live read of the current token + timing from the single source of truth (config). `null` when the\n // session is anonymous (no credential yet) — e.g. a pre-auth `login` request.\n getToken: () => TokenSnapshot | null;\n // Called when the session is found dead (refresh or replay rejected). The caller owns the\n // fire-once latch + per-session re-arm (see `config.notifyExpired`), so this may fire more than once.\n onSessionExpired?: () => void;\n refreshThreshold?: number;\n};\n\nconst DEFAULT_REFRESH_THRESHOLD = 0.9;\n\nexport const isUnauthorized = (error: unknown): boolean =>\n error instanceof ApiError && error.response.status === HttpStatus.UNAUTHORIZED;\n\nexport type BearerCredential = {\n // Resolves the current access token, or `null` when the session is anonymous (nothing to stamp).\n getAccessToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n notifyExpired: () => void;\n /**\n * Forget any in-flight rotation, so the next caller starts one of its own. Call on session death.\n *\n * - The dedupe slot is per-session state living on a cross-session singleton — the same reason\n * `config` and not this credential owns the expiry latch.\n * - Without it a request from the *next* session joins the dying session's run, and `refresh`\n * refuses that result for belonging to a session that ended (see `keboola.ts`).\n * - Does not cancel the run: whoever already joined it still gets its outcome.\n */\n abandonRefresh: () => void;\n};\n\nexport const createBearerCredential = ({\n refresh,\n getToken,\n onSessionExpired,\n refreshThreshold = DEFAULT_REFRESH_THRESHOLD,\n}: Options): BearerCredential => {\n const doRefresh = async (): Promise<string> => {\n try {\n return await refresh();\n } catch (error) {\n if (isUnauthorized(error)) onSessionExpired?.();\n throw error;\n }\n };\n\n // Reassigned, not mutated: a fresh `dedupe` is a fresh slot, and the abandoned one keeps its joiners.\n let refreshShared = dedupe(doRefresh);\n\n const refreshAt = (timing: TokenTiming): number =>\n timing.issuedAt + timing.expiresIn * 1000 * refreshThreshold;\n\n const getAccessToken = async ({ forceRefresh = false } = {}): Promise<string | null> => {\n const snapshot = getToken();\n if (snapshot === null) return null; // anonymous: nothing to stamp (pre-auth request)\n const { accessToken, timing } = snapshot;\n if (forceRefresh) return refreshShared(); // 401 path: must succeed, propagate failure\n if (Date.now() < refreshAt(timing)) return accessToken; // still fresh: current token\n // Proactive: best-effort — if the ahead-of-time refresh fails, proceed with the current token\n // and let a real 401 drive the mandatory refresh.\n return refreshShared().catch(() => accessToken);\n };\n\n return {\n getAccessToken,\n notifyExpired: () => onSessionExpired?.(),\n abandonRefresh: () => {\n refreshShared = dedupe(doRefresh);\n },\n };\n};\n"],"mappings":";;;AAmBA,MAAM,4BAA4B;AAElC,MAAa,kBAAkB,UAC7B,iBAAiB,YAAY,MAAM,SAAS,WAAW,WAAW;AAkBpE,MAAa,0BAA0B,EACrC,SACA,UACA,kBACA,mBAAmB,gCACY;CAC/B,MAAM,YAAY,YAA6B;EAC7C,IAAI;GACF,OAAO,MAAM,QAAQ;EACvB,SAAS,OAAO;GACd,IAAI,eAAe,KAAK,GAAG,mBAAmB;GAC9C,MAAM;EACR;CACF;CAGA,IAAI,gBAAgB,OAAO,SAAS;CAEpC,MAAM,aAAa,WACjB,OAAO,WAAW,OAAO,YAAY,MAAO;CAE9C,MAAM,iBAAiB,OAAO,EAAE,eAAe,UAAU,CAAC,MAA8B;EACtF,MAAM,WAAW,SAAS;EAC1B,IAAI,aAAa,MAAM,OAAO;EAC9B,MAAM,EAAE,aAAa,WAAW;EAChC,IAAI,cAAc,OAAO,cAAc;EACvC,IAAI,KAAK,IAAI,IAAI,UAAU,MAAM,GAAG,OAAO;EAG3C,OAAO,cAAc,CAAC,CAAC,YAAY,WAAW;CAChD;CAEA,OAAO;EACL;EACA,qBAAqB,mBAAmB;EACxC,sBAAsB;GACpB,gBAAgB,OAAO,SAAS;EAClC;CACF;AACF"}
@@ -1,5 +1,5 @@
1
1
  const require_dedupe = require("./dedupe-CiskLkGR.cjs");
2
- const require_createFetchClient = require("./createFetchClient-DvZvD31l.cjs");
2
+ const require_createFetchClient = require("./createFetchClient-DgMiqTJ8.cjs");
3
3
  //#region src/keboola/bearer/credential.ts
4
4
  const DEFAULT_REFRESH_THRESHOLD = .9;
5
5
  const isUnauthorized = (error) => error instanceof require_createFetchClient.ApiError && error.response.status === require_createFetchClient.HttpStatus.UNAUTHORIZED;
@@ -44,4 +44,4 @@ Object.defineProperty(exports, "isUnauthorized", {
44
44
  }
45
45
  });
46
46
 
47
- //# sourceMappingURL=credential-D-X5QQrM.cjs.map
47
+ //# sourceMappingURL=credential-DVWvJFJs.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"credential-D-X5QQrM.cjs","names":["ApiError","HttpStatus","dedupe"],"sources":["../src/keboola/bearer/credential.ts"],"sourcesContent":["import { ApiError } from '../../errors';\nimport { HttpStatus } from '../../internal';\nimport { dedupe } from '../../utils';\n\ntype TokenTiming = { issuedAt: number; expiresIn: number };\ntype TokenSnapshot = { accessToken: string; timing: TokenTiming };\n\ntype Options = {\n // Rotate the credential (single-use refresh-token flow); resolves to the fresh access token.\n refresh: () => Promise<string>;\n // Live read of the current token + timing from the single source of truth (config). `null` when the\n // session is anonymous (no credential yet) — e.g. a pre-auth `login` request.\n getToken: () => TokenSnapshot | null;\n // Called when the session is found dead (refresh or replay rejected). The caller owns the\n // fire-once latch + per-session re-arm (see `config.notifyExpired`), so this may fire more than once.\n onSessionExpired?: () => void;\n refreshThreshold?: number;\n};\n\nconst DEFAULT_REFRESH_THRESHOLD = 0.9;\n\nexport const isUnauthorized = (error: unknown): boolean =>\n error instanceof ApiError && error.response.status === HttpStatus.UNAUTHORIZED;\n\nexport type BearerCredential = {\n // Resolves the current access token, or `null` when the session is anonymous (nothing to stamp).\n getAccessToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n notifyExpired: () => void;\n /**\n * Forget any in-flight rotation, so the next caller starts one of its own. Call on session death.\n *\n * - The dedupe slot is per-session state living on a cross-session singleton — the same reason\n * `config` and not this credential owns the expiry latch.\n * - Without it a request from the *next* session joins the dying session's run, and `refresh`\n * refuses that result for belonging to a session that ended (see `keboola.ts`).\n * - Does not cancel the run: whoever already joined it still gets its outcome.\n */\n abandonRefresh: () => void;\n};\n\nexport const createBearerCredential = ({\n refresh,\n getToken,\n onSessionExpired,\n refreshThreshold = DEFAULT_REFRESH_THRESHOLD,\n}: Options): BearerCredential => {\n const doRefresh = async (): Promise<string> => {\n try {\n return await refresh();\n } catch (error) {\n if (isUnauthorized(error)) onSessionExpired?.();\n throw error;\n }\n };\n\n // Reassigned, not mutated: a fresh `dedupe` is a fresh slot, and the abandoned one keeps its joiners.\n let refreshShared = dedupe(doRefresh);\n\n const refreshAt = (timing: TokenTiming): number =>\n timing.issuedAt + timing.expiresIn * 1000 * refreshThreshold;\n\n const getAccessToken = async ({ forceRefresh = false } = {}): Promise<string | null> => {\n const snapshot = getToken();\n if (snapshot === null) return null; // anonymous: nothing to stamp (pre-auth request)\n const { accessToken, timing } = snapshot;\n if (forceRefresh) return refreshShared(); // 401 path: must succeed, propagate failure\n if (Date.now() < refreshAt(timing)) return accessToken; // still fresh: current token\n // Proactive: best-effort — if the ahead-of-time refresh fails, proceed with the current token\n // and let a real 401 drive the mandatory refresh.\n return refreshShared().catch(() => accessToken);\n };\n\n return {\n getAccessToken,\n notifyExpired: () => onSessionExpired?.(),\n abandonRefresh: () => {\n refreshShared = dedupe(doRefresh);\n },\n };\n};\n"],"mappings":";;;AAmBA,MAAM,4BAA4B;AAElC,MAAa,kBAAkB,UAC7B,iBAAiBA,0BAAAA,YAAY,MAAM,SAAS,WAAWC,0BAAAA,WAAW;AAkBpE,MAAa,0BAA0B,EACrC,SACA,UACA,kBACA,mBAAmB,gCACY;CAC/B,MAAM,YAAY,YAA6B;EAC7C,IAAI;GACF,OAAO,MAAM,QAAQ;EACvB,SAAS,OAAO;GACd,IAAI,eAAe,KAAK,GAAG,mBAAmB;GAC9C,MAAM;EACR;CACF;CAGA,IAAI,gBAAgBC,eAAAA,OAAO,SAAS;CAEpC,MAAM,aAAa,WACjB,OAAO,WAAW,OAAO,YAAY,MAAO;CAE9C,MAAM,iBAAiB,OAAO,EAAE,eAAe,UAAU,CAAC,MAA8B;EACtF,MAAM,WAAW,SAAS;EAC1B,IAAI,aAAa,MAAM,OAAO;EAC9B,MAAM,EAAE,aAAa,WAAW;EAChC,IAAI,cAAc,OAAO,cAAc;EACvC,IAAI,KAAK,IAAI,IAAI,UAAU,MAAM,GAAG,OAAO;EAG3C,OAAO,cAAc,CAAC,CAAC,YAAY,WAAW;CAChD;CAEA,OAAO;EACL;EACA,qBAAqB,mBAAmB;EACxC,sBAAsB;GACpB,gBAAgBA,eAAAA,OAAO,SAAS;EAClC;CACF;AACF"}
1
+ {"version":3,"file":"credential-DVWvJFJs.cjs","names":["ApiError","HttpStatus","dedupe"],"sources":["../src/keboola/bearer/credential.ts"],"sourcesContent":["import { ApiError } from '../../errors';\nimport { HttpStatus } from '../../internal';\nimport { dedupe } from '../../utils';\n\ntype TokenTiming = { issuedAt: number; expiresIn: number };\ntype TokenSnapshot = { accessToken: string; timing: TokenTiming };\n\ntype Options = {\n // Rotate the credential (single-use refresh-token flow); resolves to the fresh access token.\n refresh: () => Promise<string>;\n // Live read of the current token + timing from the single source of truth (config). `null` when the\n // session is anonymous (no credential yet) — e.g. a pre-auth `login` request.\n getToken: () => TokenSnapshot | null;\n // Called when the session is found dead (refresh or replay rejected). The caller owns the\n // fire-once latch + per-session re-arm (see `config.notifyExpired`), so this may fire more than once.\n onSessionExpired?: () => void;\n refreshThreshold?: number;\n};\n\nconst DEFAULT_REFRESH_THRESHOLD = 0.9;\n\nexport const isUnauthorized = (error: unknown): boolean =>\n error instanceof ApiError && error.response.status === HttpStatus.UNAUTHORIZED;\n\nexport type BearerCredential = {\n // Resolves the current access token, or `null` when the session is anonymous (nothing to stamp).\n getAccessToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n notifyExpired: () => void;\n /**\n * Forget any in-flight rotation, so the next caller starts one of its own. Call on session death.\n *\n * - The dedupe slot is per-session state living on a cross-session singleton — the same reason\n * `config` and not this credential owns the expiry latch.\n * - Without it a request from the *next* session joins the dying session's run, and `refresh`\n * refuses that result for belonging to a session that ended (see `keboola.ts`).\n * - Does not cancel the run: whoever already joined it still gets its outcome.\n */\n abandonRefresh: () => void;\n};\n\nexport const createBearerCredential = ({\n refresh,\n getToken,\n onSessionExpired,\n refreshThreshold = DEFAULT_REFRESH_THRESHOLD,\n}: Options): BearerCredential => {\n const doRefresh = async (): Promise<string> => {\n try {\n return await refresh();\n } catch (error) {\n if (isUnauthorized(error)) onSessionExpired?.();\n throw error;\n }\n };\n\n // Reassigned, not mutated: a fresh `dedupe` is a fresh slot, and the abandoned one keeps its joiners.\n let refreshShared = dedupe(doRefresh);\n\n const refreshAt = (timing: TokenTiming): number =>\n timing.issuedAt + timing.expiresIn * 1000 * refreshThreshold;\n\n const getAccessToken = async ({ forceRefresh = false } = {}): Promise<string | null> => {\n const snapshot = getToken();\n if (snapshot === null) return null; // anonymous: nothing to stamp (pre-auth request)\n const { accessToken, timing } = snapshot;\n if (forceRefresh) return refreshShared(); // 401 path: must succeed, propagate failure\n if (Date.now() < refreshAt(timing)) return accessToken; // still fresh: current token\n // Proactive: best-effort — if the ahead-of-time refresh fails, proceed with the current token\n // and let a real 401 drive the mandatory refresh.\n return refreshShared().catch(() => accessToken);\n };\n\n return {\n getAccessToken,\n notifyExpired: () => onSessionExpired?.(),\n abandonRefresh: () => {\n refreshShared = dedupe(doRefresh);\n },\n };\n};\n"],"mappings":";;;AAmBA,MAAM,4BAA4B;AAElC,MAAa,kBAAkB,UAC7B,iBAAiBA,0BAAAA,YAAY,MAAM,SAAS,WAAWC,0BAAAA,WAAW;AAkBpE,MAAa,0BAA0B,EACrC,SACA,UACA,kBACA,mBAAmB,gCACY;CAC/B,MAAM,YAAY,YAA6B;EAC7C,IAAI;GACF,OAAO,MAAM,QAAQ;EACvB,SAAS,OAAO;GACd,IAAI,eAAe,KAAK,GAAG,mBAAmB;GAC9C,MAAM;EACR;CACF;CAGA,IAAI,gBAAgBC,eAAAA,OAAO,SAAS;CAEpC,MAAM,aAAa,WACjB,OAAO,WAAW,OAAO,YAAY,MAAO;CAE9C,MAAM,iBAAiB,OAAO,EAAE,eAAe,UAAU,CAAC,MAA8B;EACtF,MAAM,WAAW,SAAS;EAC1B,IAAI,aAAa,MAAM,OAAO;EAC9B,MAAM,EAAE,aAAa,WAAW;EAChC,IAAI,cAAc,OAAO,cAAc;EACvC,IAAI,KAAK,IAAI,IAAI,UAAU,MAAM,GAAG,OAAO;EAG3C,OAAO,cAAc,CAAC,CAAC,YAAY,WAAW;CAChD;CAEA,OAAO;EACL;EACA,qBAAqB,mBAAmB;EACxC,sBAAsB;GACpB,gBAAgBA,eAAAA,OAAO,SAAS;EAClC;CACF;AACF"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_appLogs = require("../appLogs-D8K0VeNM.cjs");
3
- const require_dataScience = require("../dataScience-BPW993AG.cjs");
2
+ const require_appLogs = require("../appLogs-BjfUoWzs.cjs");
3
+ const require_dataScience = require("../dataScience-0Rl_EuV_.cjs");
4
4
  exports.createDataScienceClient = require_dataScience.createDataScienceClient;
5
5
  exports.parseLogLines = require_appLogs.parseLogLines;
@@ -1,3 +1,3 @@
1
- import { n as parseLogLines } from "../appLogs-Q4A7A_Fc.cjs";
2
- import { t as createDataScienceClient } from "../index-t-a7kYnx.cjs";
1
+ import { n as parseLogLines } from "../appLogs-D5A13Y0y.cjs";
2
+ import { t as createDataScienceClient } from "../index-DppA4k3b.cjs";
3
3
  export { createDataScienceClient, parseLogLines };
@@ -1,3 +1,3 @@
1
- import { n as parseLogLines } from "../appLogs-u0XMZLjS.js";
2
- import { t as createDataScienceClient } from "../index-BjKjp3Rf.js";
1
+ import { n as parseLogLines } from "../appLogs-Ch7DYpzx.js";
2
+ import { t as createDataScienceClient } from "../index-6Xe81qN3.js";
3
3
  export { createDataScienceClient, parseLogLines };
@@ -1,3 +1,3 @@
1
- import { t as parseLogLines } from "../appLogs-D72eD8vP.js";
2
- import { t as createDataScienceClient } from "../dataScience-B_TA7wCB.js";
1
+ import { t as parseLogLines } from "../appLogs-xsVkTriU.js";
2
+ import { t as createDataScienceClient } from "../dataScience-C1gO5zUn.js";
3
3
  export { createDataScienceClient, parseLogLines };
@@ -1,3 +1,3 @@
1
- import { t as LogEntry } from "../appLogs-Q4A7A_Fc.cjs";
2
- import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-CCr1-9Q6.cjs";
1
+ import { t as LogEntry } from "../appLogs-D5A13Y0y.cjs";
2
+ import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-DZk3XHiN.cjs";
3
3
  export { CreateDataAppBody, DataApp, DataAppRun, DeleteDataAppPath, DeleteSandboxPath, GetAppsQuery, GetDataAppLogsDownloadPath, GetDataAppLogsTailPath, GetDataAppLogsTailQuery, GetDataAppPasswordPath, GetDataAppPath, GetDataAppRunPath, GetDataAppRunsPath, GetDataAppRunsQuery, GetSandboxPath, type LogEntry, PatchDataAppBody, PatchDataAppPath, RawAppRun, ResetDataAppPasswordPath, Runtime, RuntimeImageKey, Sandbox };
@@ -1,3 +1,3 @@
1
- import { t as LogEntry } from "../appLogs-u0XMZLjS.js";
2
- import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-Ur37iOqb.js";
1
+ import { t as LogEntry } from "../appLogs-Ch7DYpzx.js";
2
+ import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-OaD-cbbl.js";
3
3
  export { CreateDataAppBody, DataApp, DataAppRun, DeleteDataAppPath, DeleteSandboxPath, GetAppsQuery, GetDataAppLogsDownloadPath, GetDataAppLogsTailPath, GetDataAppLogsTailQuery, GetDataAppPasswordPath, GetDataAppPath, GetDataAppRunPath, GetDataAppRunsPath, GetDataAppRunsQuery, GetSandboxPath, type LogEntry, PatchDataAppBody, PatchDataAppPath, RawAppRun, ResetDataAppPasswordPath, Runtime, RuntimeImageKey, Sandbox };
@@ -1,7 +1,7 @@
1
- const require_createGenericFetchClient = require("./createGenericFetchClient-qfCZlCTv.cjs");
2
- const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-C57Ljzi6.cjs");
3
- const require_auth = require("./auth-C2_JLisH.cjs");
4
- const require_appLogs = require("./appLogs-D8K0VeNM.cjs");
1
+ const require_createGenericFetchClient = require("./createGenericFetchClient-o3cPJeRn.cjs");
2
+ const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-DhUU3M1W.cjs");
3
+ const require_auth = require("./auth-JQ33o3nU.cjs");
4
+ const require_appLogs = require("./appLogs-BjfUoWzs.cjs");
5
5
  //#region src/clients/dataScience/utils.ts
6
6
  const prepareAppRun = (appRun) => {
7
7
  return {
@@ -111,4 +111,4 @@ Object.defineProperty(exports, "createDataScienceClient", {
111
111
  }
112
112
  });
113
113
 
114
- //# sourceMappingURL=dataScience-BPW993AG.cjs.map
114
+ //# sourceMappingURL=dataScience-0Rl_EuV_.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataScience-BPW993AG.cjs","names":["createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient","readAppLogsDownload","readAppLogsTail"],"sources":["../src/clients/dataScience/utils.ts","../src/clients/dataScience/dataScienceClient.ts"],"sourcesContent":["import type { RawAppRun } from './types';\n\nexport const prepareAppRun = (appRun: RawAppRun) => {\n return {\n ...appRun,\n state: appRun.state ?? (appRun.stoppedAt ? 'finished' : 'running'), // fallback state for historic non migrated runs\n };\n};\n","import { readAppLogsDownload, readAppLogsTail } from '../../domain/appLogs';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n CreateDataAppBody,\n DeleteDataAppPath,\n DeleteSandboxPath,\n GetAppsQuery,\n GetDataAppLogsDownloadPath,\n GetDataAppLogsTailPath,\n GetDataAppLogsTailQuery,\n GetDataAppPasswordPath,\n GetDataAppPath,\n GetDataAppRunPath,\n GetDataAppRunsPath,\n GetDataAppRunsQuery,\n GetSandboxPath,\n PatchDataAppBody,\n PatchDataAppPath,\n ResetDataAppPasswordPath,\n} from './types';\nimport { prepareAppRun } from './utils';\n\nexport const createDataScienceClient = ({ 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 getAppRuns = async (\n appId: GetDataAppRunsPath['appId'],\n query?: GetDataAppRunsQuery,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get('/apps/{appId}/runs', { path: { appId }, query }, { signal });\n\n return data.map(prepareAppRun);\n };\n\n const getAppRun = async (\n appId: GetDataAppRunPath['appId'],\n runId: GetDataAppRunPath['runId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/runs/{runId}',\n { path: { appId, runId } },\n { signal },\n );\n\n return prepareAppRun(data);\n };\n\n const getAppLogsDownload = (id: GetDataAppLogsDownloadPath['appId'], signal?: AbortSignal) =>\n readAppLogsDownload(() =>\n client.get('/apps/{appId}/logs/download', { path: { appId: id } }, { signal }),\n );\n\n const getAppLogsTail = (\n id: GetDataAppLogsTailPath['appId'],\n { query, signal }: { query?: GetDataAppLogsTailQuery; signal?: AbortSignal } = {},\n ) =>\n readAppLogsTail(() =>\n client.get('/apps/{appId}/logs/tail', { query, path: { appId: id } }, { signal }),\n );\n\n const getApps = async (query: GetAppsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/apps', { query }, { signal });\n\n return data;\n };\n\n const getApp = async (appId: GetDataAppPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const createApp = async (body: CreateDataAppBody, signal?: AbortSignal) => {\n const { data } = await client.post('/apps', { body }, { signal });\n\n return data;\n };\n\n const patchApp = async (\n appId: PatchDataAppPath['appId'],\n body: PatchDataAppBody,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.patch(\n '/apps/{appId}',\n {\n path: { appId: appId },\n body: body,\n },\n { signal },\n );\n return data;\n };\n\n const deleteApp = async (appId: DeleteDataAppPath['appId'], signal?: AbortSignal) => {\n return client.delete('/apps/{appId}', { path: { appId } }, { signal });\n };\n\n const getAppPassword = async (appId: GetDataAppPasswordPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/password', { path: { appId } }, { signal });\n\n return data;\n };\n\n const resetAppPassword = async (\n appId: ResetDataAppPasswordPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/reset-password',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n const getRuntimes = async (signal?: AbortSignal) => {\n const { data } = await client.get('/runtimes', {}, { signal });\n\n return data;\n };\n\n const getSandbox = async (appId: GetSandboxPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/sandboxes/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const deleteSandbox = async (appId: DeleteSandboxPath['appId'], signal?: AbortSignal) => {\n return client.delete('/sandboxes/{appId}', { path: { appId } }, { signal });\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 getAppRuns,\n getAppRun,\n getAppLogsDownload,\n getAppLogsTail,\n getApps,\n getApp,\n createApp,\n patchApp,\n deleteApp,\n getAppPassword,\n resetAppPassword,\n getRuntimes,\n getSandbox,\n deleteSandbox,\n };\n};\n"],"mappings":";;;;;AAEA,MAAa,iBAAiB,WAAsB;CAClD,OAAO;EACL,GAAG;EACH,OAAO,OAAO,UAAU,OAAO,YAAY,aAAa;CAC1D;AACF;;;ACmBA,MAAa,2BAA2B,EAAE,SAAS,aAAa,WAA8B;CAC5F,MAAM,SAASA,iCAAAA,yBAAgC;EAC7C;EACA;EACA,SAASC,aAAAA,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgBC,iCAAAA,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,aAAa,OACjB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB;GAAE,MAAM,EAAE,MAAM;GAAG;EAAM,GAAG,EAAE,OAAO,CAAC;EAE9F,OAAO,KAAK,IAAI,aAAa;CAC/B;CAEA,MAAM,YAAY,OAChB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,8BACA,EAAE,MAAM;GAAE;GAAO;EAAM,EAAE,GACzB,EAAE,OAAO,CACX;EAEA,OAAO,cAAc,IAAI;CAC3B;CAEA,MAAM,sBAAsB,IAAyC,WACnEC,gBAAAA,0BACE,OAAO,IAAI,+BAA+B,EAAE,MAAM,EAAE,OAAO,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAC/E;CAEF,MAAM,kBACJ,IACA,EAAE,OAAO,WAAsE,CAAC,MAEhFC,gBAAAA,sBACE,OAAO,IAAI,2BAA2B;EAAE;EAAO,MAAM,EAAE,OAAO,GAAG;CAAE,GAAG,EAAE,OAAO,CAAC,CAClF;CAEF,MAAM,UAAU,OAAO,OAAqB,WAAyB;EACnE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,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;EAEvF,OAAO;CACT;CAEA,MAAM,gBAAgB,OAAO,OAAmC,WAAyB;EACvF,OAAO,OAAO,OAAO,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;CAC5E;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;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"dataScience-0Rl_EuV_.cjs","names":["createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient","readAppLogsDownload","readAppLogsTail"],"sources":["../src/clients/dataScience/utils.ts","../src/clients/dataScience/dataScienceClient.ts"],"sourcesContent":["import type { RawAppRun } from './types';\n\nexport const prepareAppRun = (appRun: RawAppRun) => {\n return {\n ...appRun,\n state: appRun.state ?? (appRun.stoppedAt ? 'finished' : 'running'), // fallback state for historic non migrated runs\n };\n};\n","import { readAppLogsDownload, readAppLogsTail } from '../../domain/appLogs';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n CreateDataAppBody,\n DeleteDataAppPath,\n DeleteSandboxPath,\n GetAppsQuery,\n GetDataAppLogsDownloadPath,\n GetDataAppLogsTailPath,\n GetDataAppLogsTailQuery,\n GetDataAppPasswordPath,\n GetDataAppPath,\n GetDataAppRunPath,\n GetDataAppRunsPath,\n GetDataAppRunsQuery,\n GetSandboxPath,\n PatchDataAppBody,\n PatchDataAppPath,\n ResetDataAppPasswordPath,\n} from './types';\nimport { prepareAppRun } from './utils';\n\nexport const createDataScienceClient = ({ 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 getAppRuns = async (\n appId: GetDataAppRunsPath['appId'],\n query?: GetDataAppRunsQuery,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get('/apps/{appId}/runs', { path: { appId }, query }, { signal });\n\n return data.map(prepareAppRun);\n };\n\n const getAppRun = async (\n appId: GetDataAppRunPath['appId'],\n runId: GetDataAppRunPath['runId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/runs/{runId}',\n { path: { appId, runId } },\n { signal },\n );\n\n return prepareAppRun(data);\n };\n\n const getAppLogsDownload = (id: GetDataAppLogsDownloadPath['appId'], signal?: AbortSignal) =>\n readAppLogsDownload(() =>\n client.get('/apps/{appId}/logs/download', { path: { appId: id } }, { signal }),\n );\n\n const getAppLogsTail = (\n id: GetDataAppLogsTailPath['appId'],\n { query, signal }: { query?: GetDataAppLogsTailQuery; signal?: AbortSignal } = {},\n ) =>\n readAppLogsTail(() =>\n client.get('/apps/{appId}/logs/tail', { query, path: { appId: id } }, { signal }),\n );\n\n const getApps = async (query: GetAppsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/apps', { query }, { signal });\n\n return data;\n };\n\n const getApp = async (appId: GetDataAppPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const createApp = async (body: CreateDataAppBody, signal?: AbortSignal) => {\n const { data } = await client.post('/apps', { body }, { signal });\n\n return data;\n };\n\n const patchApp = async (\n appId: PatchDataAppPath['appId'],\n body: PatchDataAppBody,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.patch(\n '/apps/{appId}',\n {\n path: { appId: appId },\n body: body,\n },\n { signal },\n );\n return data;\n };\n\n const deleteApp = async (appId: DeleteDataAppPath['appId'], signal?: AbortSignal) => {\n return client.delete('/apps/{appId}', { path: { appId } }, { signal });\n };\n\n const getAppPassword = async (appId: GetDataAppPasswordPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/password', { path: { appId } }, { signal });\n\n return data;\n };\n\n const resetAppPassword = async (\n appId: ResetDataAppPasswordPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/reset-password',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n const getRuntimes = async (signal?: AbortSignal) => {\n const { data } = await client.get('/runtimes', {}, { signal });\n\n return data;\n };\n\n const getSandbox = async (appId: GetSandboxPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/sandboxes/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const deleteSandbox = async (appId: DeleteSandboxPath['appId'], signal?: AbortSignal) => {\n return client.delete('/sandboxes/{appId}', { path: { appId } }, { signal });\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 getAppRuns,\n getAppRun,\n getAppLogsDownload,\n getAppLogsTail,\n getApps,\n getApp,\n createApp,\n patchApp,\n deleteApp,\n getAppPassword,\n resetAppPassword,\n getRuntimes,\n getSandbox,\n deleteSandbox,\n };\n};\n"],"mappings":";;;;;AAEA,MAAa,iBAAiB,WAAsB;CAClD,OAAO;EACL,GAAG;EACH,OAAO,OAAO,UAAU,OAAO,YAAY,aAAa;CAC1D;AACF;;;ACmBA,MAAa,2BAA2B,EAAE,SAAS,aAAa,WAA8B;CAC5F,MAAM,SAASA,iCAAAA,yBAAgC;EAC7C;EACA;EACA,SAASC,aAAAA,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgBC,iCAAAA,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,aAAa,OACjB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB;GAAE,MAAM,EAAE,MAAM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AM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;CACvE;CAEA,MAAM,iBAAiB,OAAO,OAAwC,WAAyB;EAC7F,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,0BAA0B,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;EAE3F,OAAO;CACT;CAEA,MAAM,mBAAmB,OACvB,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,gCACA,EAAE,MAAM,EAAE,MAAM,EAAE,GAClB,EAAE,OAAO,CACX;EAEA,OAAO;CACT;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;EAE7D,OAAO;CACT;CAEA,MAAM,aAAa,OAAO,OAAgC,WAAyB;EACjF,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;EAEvF,OAAO;CACT;CAEA,MAAM,gBAAgB,OAAO,OAAmC,WAAyB;EACvF,OAAO,OAAO,OAAO,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;CAC5E;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;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -1,7 +1,7 @@
1
- import { t as createGenericFetchClient } from "./createGenericFetchClient-MQeLRiNW.js";
2
- import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-E7OIVkYv.js";
3
- import { t as createAuthHeaders } from "./auth-CE9rQV3-.js";
4
- import { n as readAppLogsDownload, r as readAppLogsTail } from "./appLogs-D72eD8vP.js";
1
+ import { t as createGenericFetchClient } from "./createGenericFetchClient-rxvUUbap.js";
2
+ import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-BVSc9ibR.js";
3
+ import { t as createAuthHeaders } from "./auth-aItmDu45.js";
4
+ import { n as readAppLogsDownload, r as readAppLogsTail } from "./appLogs-xsVkTriU.js";
5
5
  //#region src/clients/dataScience/utils.ts
6
6
  const prepareAppRun = (appRun) => {
7
7
  return {
@@ -106,4 +106,4 @@ const createDataScienceClient = ({ baseUrl, middlewares, auth }) => {
106
106
  //#endregion
107
107
  export { createDataScienceClient as t };
108
108
 
109
- //# sourceMappingURL=dataScience-B_TA7wCB.js.map
109
+ //# sourceMappingURL=dataScience-C1gO5zUn.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataScience-B_TA7wCB.js","names":[],"sources":["../src/clients/dataScience/utils.ts","../src/clients/dataScience/dataScienceClient.ts"],"sourcesContent":["import type { RawAppRun } from './types';\n\nexport const prepareAppRun = (appRun: RawAppRun) => {\n return {\n ...appRun,\n state: appRun.state ?? (appRun.stoppedAt ? 'finished' : 'running'), // fallback state for historic non migrated runs\n };\n};\n","import { readAppLogsDownload, readAppLogsTail } from '../../domain/appLogs';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n CreateDataAppBody,\n DeleteDataAppPath,\n DeleteSandboxPath,\n GetAppsQuery,\n GetDataAppLogsDownloadPath,\n GetDataAppLogsTailPath,\n GetDataAppLogsTailQuery,\n GetDataAppPasswordPath,\n GetDataAppPath,\n GetDataAppRunPath,\n GetDataAppRunsPath,\n GetDataAppRunsQuery,\n GetSandboxPath,\n PatchDataAppBody,\n PatchDataAppPath,\n ResetDataAppPasswordPath,\n} from './types';\nimport { prepareAppRun } from './utils';\n\nexport const createDataScienceClient = ({ 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 getAppRuns = async (\n appId: GetDataAppRunsPath['appId'],\n query?: GetDataAppRunsQuery,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get('/apps/{appId}/runs', { path: { appId }, query }, { signal });\n\n return data.map(prepareAppRun);\n };\n\n const getAppRun = async (\n appId: GetDataAppRunPath['appId'],\n runId: GetDataAppRunPath['runId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/runs/{runId}',\n { path: { appId, runId } },\n { signal },\n );\n\n return prepareAppRun(data);\n };\n\n const getAppLogsDownload = (id: GetDataAppLogsDownloadPath['appId'], signal?: AbortSignal) =>\n readAppLogsDownload(() =>\n client.get('/apps/{appId}/logs/download', { path: { appId: id } }, { signal }),\n );\n\n const getAppLogsTail = (\n id: GetDataAppLogsTailPath['appId'],\n { query, signal }: { query?: GetDataAppLogsTailQuery; signal?: AbortSignal } = {},\n ) =>\n readAppLogsTail(() =>\n client.get('/apps/{appId}/logs/tail', { query, path: { appId: id } }, { signal }),\n );\n\n const getApps = async (query: GetAppsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/apps', { query }, { signal });\n\n return data;\n };\n\n const getApp = async (appId: GetDataAppPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const createApp = async (body: CreateDataAppBody, signal?: AbortSignal) => {\n const { data } = await client.post('/apps', { body }, { signal });\n\n return data;\n };\n\n const patchApp = async (\n appId: PatchDataAppPath['appId'],\n body: PatchDataAppBody,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.patch(\n '/apps/{appId}',\n {\n path: { appId: appId },\n body: body,\n },\n { signal },\n );\n return data;\n };\n\n const deleteApp = async (appId: DeleteDataAppPath['appId'], signal?: AbortSignal) => {\n return client.delete('/apps/{appId}', { path: { appId } }, { signal });\n };\n\n const getAppPassword = async (appId: GetDataAppPasswordPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/password', { path: { appId } }, { signal });\n\n return data;\n };\n\n const resetAppPassword = async (\n appId: ResetDataAppPasswordPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/reset-password',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n const getRuntimes = async (signal?: AbortSignal) => {\n const { data } = await client.get('/runtimes', {}, { signal });\n\n return data;\n };\n\n const getSandbox = async (appId: GetSandboxPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/sandboxes/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const deleteSandbox = async (appId: DeleteSandboxPath['appId'], signal?: AbortSignal) => {\n return client.delete('/sandboxes/{appId}', { path: { appId } }, { signal });\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 getAppRuns,\n getAppRun,\n getAppLogsDownload,\n getAppLogsTail,\n getApps,\n getApp,\n createApp,\n patchApp,\n deleteApp,\n getAppPassword,\n resetAppPassword,\n getRuntimes,\n getSandbox,\n deleteSandbox,\n };\n};\n"],"mappings":";;;;;AAEA,MAAa,iBAAiB,WAAsB;CAClD,OAAO;EACL,GAAG;EACH,OAAO,OAAO,UAAU,OAAO,YAAY,aAAa;CAC1D;AACF;;;ACmBA,MAAa,2BAA2B,EAAE,SAAS,aAAa,WAA8B;CAC5F,MAAM,SAAS,yBAAgC;EAC7C;EACA;EACA,SAAS,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgB,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,aAAa,OACjB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB;GAAE,MAAM,EAAE,MAAM;GAAG;EAAM,GAAG,EAAE,OAAO,CAAC;EA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AAM,iBAAiB,OAAO,OAAwC,WAAyB;EAC7F,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,0BAA0B,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;EAE3F,OAAO;CACT;CAEA,MAAM,mBAAmB,OACvB,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,gCACA,EAAE,MAAM,EAAE,MAAM,EAAE,GAClB,EAAE,OAAO,CACX;EAEA,OAAO;CACT;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;EAE7D,OAAO;CACT;CAEA,MAAM,aAAa,OAAO,OAAgC,WAAyB;EACjF,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;EAEvF,OAAO;CACT;CAEA,MAAM,gBAAgB,OAAO,OAAmC,WAAyB;EACvF,OAAO,OAAO,OAAO,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;CAC5E;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;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"dataScience-C1gO5zUn.js","names":[],"sources":["../src/clients/dataScience/utils.ts","../src/clients/dataScience/dataScienceClient.ts"],"sourcesContent":["import type { RawAppRun } from './types';\n\nexport const prepareAppRun = (appRun: RawAppRun) => {\n return {\n ...appRun,\n state: appRun.state ?? (appRun.stoppedAt ? 'finished' : 'running'), // fallback state for historic non migrated runs\n };\n};\n","import { readAppLogsDownload, readAppLogsTail } from '../../domain/appLogs';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n CreateDataAppBody,\n DeleteDataAppPath,\n DeleteSandboxPath,\n GetAppsQuery,\n GetDataAppLogsDownloadPath,\n GetDataAppLogsTailPath,\n GetDataAppLogsTailQuery,\n GetDataAppPasswordPath,\n GetDataAppPath,\n GetDataAppRunPath,\n GetDataAppRunsPath,\n GetDataAppRunsQuery,\n GetSandboxPath,\n PatchDataAppBody,\n PatchDataAppPath,\n ResetDataAppPasswordPath,\n} from './types';\nimport { prepareAppRun } from './utils';\n\nexport const createDataScienceClient = ({ 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 getAppRuns = async (\n appId: GetDataAppRunsPath['appId'],\n query?: GetDataAppRunsQuery,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get('/apps/{appId}/runs', { path: { appId }, query }, { signal });\n\n return data.map(prepareAppRun);\n };\n\n const getAppRun = async (\n appId: GetDataAppRunPath['appId'],\n runId: GetDataAppRunPath['runId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/runs/{runId}',\n { path: { appId, runId } },\n { signal },\n );\n\n return prepareAppRun(data);\n };\n\n const getAppLogsDownload = (id: GetDataAppLogsDownloadPath['appId'], signal?: AbortSignal) =>\n readAppLogsDownload(() =>\n client.get('/apps/{appId}/logs/download', { path: { appId: id } }, { signal }),\n );\n\n const getAppLogsTail = (\n id: GetDataAppLogsTailPath['appId'],\n { query, signal }: { query?: GetDataAppLogsTailQuery; signal?: AbortSignal } = {},\n ) =>\n readAppLogsTail(() =>\n client.get('/apps/{appId}/logs/tail', { query, path: { appId: id } }, { signal }),\n );\n\n const getApps = async (query: GetAppsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/apps', { query }, { signal });\n\n return data;\n };\n\n const getApp = async (appId: GetDataAppPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const createApp = async (body: CreateDataAppBody, signal?: AbortSignal) => {\n const { data } = await client.post('/apps', { body }, { signal });\n\n return data;\n };\n\n const patchApp = async (\n appId: PatchDataAppPath['appId'],\n body: PatchDataAppBody,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.patch(\n '/apps/{appId}',\n {\n path: { appId: appId },\n body: body,\n },\n { signal },\n );\n return data;\n };\n\n const deleteApp = async (appId: DeleteDataAppPath['appId'], signal?: AbortSignal) => {\n return client.delete('/apps/{appId}', { path: { appId } }, { signal });\n };\n\n const getAppPassword = async (appId: GetDataAppPasswordPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/password', { path: { appId } }, { signal });\n\n return data;\n };\n\n const resetAppPassword = async (\n appId: ResetDataAppPasswordPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/reset-password',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n const getRuntimes = async (signal?: AbortSignal) => {\n const { data } = await client.get('/runtimes', {}, { signal });\n\n return data;\n };\n\n const getSandbox = async (appId: GetSandboxPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/sandboxes/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const deleteSandbox = async (appId: DeleteSandboxPath['appId'], signal?: AbortSignal) => {\n return client.delete('/sandboxes/{appId}', { path: { appId } }, { signal });\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 getAppRuns,\n getAppRun,\n getAppLogsDownload,\n getAppLogsTail,\n getApps,\n getApp,\n createApp,\n patchApp,\n deleteApp,\n getAppPassword,\n resetAppPassword,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AAM,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;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_developerPortalClient = require("../developerPortalClient-Db2XVB_o.cjs");
2
+ const require_developerPortalClient = require("../developerPortalClient-ki0XS_OD.cjs");
3
3
  exports.authHeader = require_developerPortalClient.authHeader;
4
4
  exports.createDeveloperPortalClient = require_developerPortalClient.createDeveloperPortalClient;
5
5
  exports.isMfaChallengeResponse = require_developerPortalClient.isMfaChallengeResponse;
@@ -1,3 +1,3 @@
1
- import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-B6JJCta-.cjs";
2
- import { a as DeveloperPortalClient, c as createDeveloperPortalClient, i as isMfaChallengeResponse, n as authHeader, o as DeveloperPortalClientInitOptions, r as uploadAppIcon, s as DeveloperPortalFetchClient, t as DeveloperPortalTokens } from "../index-exNi3I2Q.cjs";
1
+ import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-D8Rrz51O.cjs";
2
+ import { a as DeveloperPortalClient, c as createDeveloperPortalClient, i as isMfaChallengeResponse, n as authHeader, o as DeveloperPortalClientInitOptions, r as uploadAppIcon, s as DeveloperPortalFetchClient, t as DeveloperPortalTokens } from "../index-GjcJTCbz.cjs";
3
3
  export { type AdminPaginationQuery, type AdminVendor, type App, type AppChange, type AppRepository, type AppVendor, type ApproveVendorInput, type ConfirmAccountInput, type CreateAppInput, type CreateServiceAccountInput, type CreateVendorAsAdminInput, type CreateVendorInput, type DeprecateAppInput, DeveloperPortalClient, DeveloperPortalClientInitOptions, type DeveloperPortalError, DeveloperPortalFetchClient, type DeveloperPortalTokens, type GetAppsQuery, type GetChangesQuery, type GetVendorUsersQuery, type IconUploadLink, type LoginChallenge, type LoginInput, type LoginResult, type LoginSuccess, type MfaConfirmInput, type MfaSetupInput, type MfaSetupResult, type PaginationQuery, type Profile, type RefreshTokensResult, type RejectAppInput, type ResetPasswordConfirmInput, type ServiceAccount, type ServiceIndex, type SignUpInput, type Stack, type UpdateAppAsAdminInput, type UpdateAppInput, type UpdateVendorAsAdminInput, type UpdateVendorInput, type User, type UserRequest, type Vendor, type VendorListItem, type Version, authHeader, createDeveloperPortalClient, isMfaChallengeResponse, uploadAppIcon };
@@ -1,3 +1,3 @@
1
- import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-DHqIJKwx.js";
2
- import { a as DeveloperPortalClient, c as createDeveloperPortalClient, i as isMfaChallengeResponse, n as authHeader, o as DeveloperPortalClientInitOptions, r as uploadAppIcon, s as DeveloperPortalFetchClient, t as DeveloperPortalTokens } from "../index-ChMtULt4.js";
1
+ import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-DajzGOKB.js";
2
+ import { a as DeveloperPortalClient, c as createDeveloperPortalClient, i as isMfaChallengeResponse, n as authHeader, o as DeveloperPortalClientInitOptions, r as uploadAppIcon, s as DeveloperPortalFetchClient, t as DeveloperPortalTokens } from "../index-pXN4LWUX.js";
3
3
  export { type AdminPaginationQuery, type AdminVendor, type App, type AppChange, type AppRepository, type AppVendor, type ApproveVendorInput, type ConfirmAccountInput, type CreateAppInput, type CreateServiceAccountInput, type CreateVendorAsAdminInput, type CreateVendorInput, type DeprecateAppInput, DeveloperPortalClient, DeveloperPortalClientInitOptions, type DeveloperPortalError, DeveloperPortalFetchClient, type DeveloperPortalTokens, type GetAppsQuery, type GetChangesQuery, type GetVendorUsersQuery, type IconUploadLink, type LoginChallenge, type LoginInput, type LoginResult, type LoginSuccess, type MfaConfirmInput, type MfaSetupInput, type MfaSetupResult, type PaginationQuery, type Profile, type RefreshTokensResult, type RejectAppInput, type ResetPasswordConfirmInput, type ServiceAccount, type ServiceIndex, type SignUpInput, type Stack, type UpdateAppAsAdminInput, type UpdateAppInput, type UpdateVendorAsAdminInput, type UpdateVendorInput, type User, type UserRequest, type Vendor, type VendorListItem, type Version, authHeader, createDeveloperPortalClient, isMfaChallengeResponse, uploadAppIcon };
@@ -1,2 +1,2 @@
1
- import { i as uploadAppIcon, n as isMfaChallengeResponse, r as authHeader, t as createDeveloperPortalClient } from "../developerPortalClient-jk46sjwP.js";
1
+ import { i as uploadAppIcon, n as isMfaChallengeResponse, r as authHeader, t as createDeveloperPortalClient } from "../developerPortalClient-C_48z8BN.js";
2
2
  export { authHeader, createDeveloperPortalClient, isMfaChallengeResponse, uploadAppIcon };
@@ -1,2 +1,2 @@
1
- import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-B6JJCta-.cjs";
1
+ import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-D8Rrz51O.cjs";
2
2
  export { AdminPaginationQuery, AdminVendor, App, AppChange, AppRepository, AppVendor, ApproveVendorInput, ConfirmAccountInput, CreateAppInput, CreateServiceAccountInput, CreateVendorAsAdminInput, CreateVendorInput, DeprecateAppInput, DeveloperPortalError, GetAppsQuery, GetChangesQuery, GetVendorUsersQuery, IconUploadLink, LoginChallenge, LoginInput, LoginResult, LoginSuccess, MfaConfirmInput, MfaSetupInput, MfaSetupResult, PaginationQuery, Profile, RefreshTokensResult, RejectAppInput, ResetPasswordConfirmInput, ServiceAccount, ServiceIndex, SignUpInput, Stack, UpdateAppAsAdminInput, UpdateAppInput, UpdateVendorAsAdminInput, UpdateVendorInput, User, UserRequest, Vendor, VendorListItem, Version };
@@ -1,2 +1,2 @@
1
- import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-DHqIJKwx.js";
1
+ import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-DajzGOKB.js";
2
2
  export { AdminPaginationQuery, AdminVendor, App, AppChange, AppRepository, AppVendor, ApproveVendorInput, ConfirmAccountInput, CreateAppInput, CreateServiceAccountInput, CreateVendorAsAdminInput, CreateVendorInput, DeprecateAppInput, DeveloperPortalError, GetAppsQuery, GetChangesQuery, GetVendorUsersQuery, IconUploadLink, LoginChallenge, LoginInput, LoginResult, LoginSuccess, MfaConfirmInput, MfaSetupInput, MfaSetupResult, PaginationQuery, Profile, RefreshTokensResult, RejectAppInput, ResetPasswordConfirmInput, ServiceAccount, ServiceIndex, SignUpInput, Stack, UpdateAppAsAdminInput, UpdateAppInput, UpdateVendorAsAdminInput, UpdateVendorInput, User, UserRequest, Vendor, VendorListItem, Version };
@@ -1,5 +1,5 @@
1
- import { s as HttpHeader } from "./createFetchClient-DdyZMhxO.js";
2
- import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-E7OIVkYv.js";
1
+ import { s as HttpHeader } from "./createFetchClient-U-ZrwPl2.js";
2
+ import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-BVSc9ibR.js";
3
3
  //#region src/clients/developerPortal/admin/admin.ts
4
4
  /** Keboola staff only. Every method 403s for a non-admin token; the UI gates on `custom:isAdmin`. */
5
5
  const createAdmin = (client) => {
@@ -482,4 +482,4 @@ const createDeveloperPortalClient = ({ baseUrl, middlewares = [], authMiddleware
482
482
  //#endregion
483
483
  export { uploadAppIcon as i, isMfaChallengeResponse as n, authHeader as r, createDeveloperPortalClient as t };
484
484
 
485
- //# sourceMappingURL=developerPortalClient-jk46sjwP.js.map
485
+ //# sourceMappingURL=developerPortalClient-C_48z8BN.js.map