@keboola/api-client 29.0.0 → 31.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 (344) hide show
  1. package/API-SURFACE.md +6 -1
  2. package/CHANGELOG.md +1785 -0
  3. package/dist/{ManagementClientAuthError-B97OtOQ7.js → ManagementClientAuthError-90pvsej0.js} +2 -2
  4. package/dist/{ManagementClientAuthError-B97OtOQ7.js.map → ManagementClientAuthError-90pvsej0.js.map} +1 -1
  5. package/dist/{ManagementClientAuthError-ZJ2-RoKT.cjs → ManagementClientAuthError-DFhi5yxe.cjs} +2 -2
  6. package/dist/{ManagementClientAuthError-ZJ2-RoKT.cjs.map → ManagementClientAuthError-DFhi5yxe.cjs.map} +1 -1
  7. package/dist/ai/index.cjs +2 -2
  8. package/dist/ai/index.d.cts +2 -2
  9. package/dist/ai/index.d.ts +2 -2
  10. package/dist/ai/index.js +2 -2
  11. package/dist/ai/types.d.cts +1 -1
  12. package/dist/ai/types.d.ts +1 -1
  13. package/dist/{appLogs-CNG3yby-.cjs → appLogs-BCCi02w6.cjs} +2 -2
  14. package/dist/{appLogs-CNG3yby-.cjs.map → appLogs-BCCi02w6.cjs.map} +1 -1
  15. package/dist/{appLogs-VdgP08aX.d.ts → appLogs-BdMG6Cvn.d.ts} +2 -2
  16. package/dist/{appLogs-enL9XR9r.js → appLogs-CLHhkQJn.js} +2 -2
  17. package/dist/{appLogs-enL9XR9r.js.map → appLogs-CLHhkQJn.js.map} +1 -1
  18. package/dist/{appLogs-Dl5BcCSD.d.cts → appLogs-hQdKt_8J.d.cts} +2 -2
  19. package/dist/apps/index.cjs +3 -3
  20. package/dist/apps/index.d.cts +3 -3
  21. package/dist/apps/index.d.ts +3 -3
  22. package/dist/apps/index.js +3 -3
  23. package/dist/apps/types.d.cts +2 -2
  24. package/dist/apps/types.d.ts +2 -2
  25. package/dist/assets/index.cjs +1 -1
  26. package/dist/assets/index.d.cts +1 -1
  27. package/dist/assets/index.d.ts +1 -1
  28. package/dist/assets/index.js +1 -1
  29. package/dist/auth/index.cjs +2 -1
  30. package/dist/auth/index.d.cts +2 -2
  31. package/dist/auth/index.d.ts +2 -2
  32. package/dist/auth/index.js +2 -2
  33. package/dist/auth/types.d.cts +2 -2
  34. package/dist/auth/types.d.ts +2 -2
  35. package/dist/{auth-D2jfNlpX.js → auth-CE6Hlc9W.js} +2 -2
  36. package/dist/{auth-D2jfNlpX.js.map → auth-CE6Hlc9W.js.map} +1 -1
  37. package/dist/{auth-5HCvCsZO.cjs → auth-DmgTH0uY.cjs} +2 -2
  38. package/dist/{auth-5HCvCsZO.cjs.map → auth-DmgTH0uY.cjs.map} +1 -1
  39. package/dist/{authClient-Bgj2Ay7h.d.cts → authClient-BL6h78Q1.d.cts} +52 -5
  40. package/dist/{authClient-Dsd7W99W.d.ts → authClient-Bc_bDisO.d.ts} +52 -5
  41. package/dist/{authClient-Z8Eg8rlN.cjs → authClient-Cixa8_L1.cjs} +81 -10
  42. package/dist/authClient-Cixa8_L1.cjs.map +1 -0
  43. package/dist/{authClient-DOk6VKdV.js → authClient-XBAUz9g-.js} +76 -11
  44. package/dist/authClient-XBAUz9g-.js.map +1 -0
  45. package/dist/chat/index.cjs +3 -3
  46. package/dist/chat/index.d.cts +2 -2
  47. package/dist/chat/index.d.ts +2 -2
  48. package/dist/chat/index.js +3 -3
  49. package/dist/chat/types.d.cts +1 -1
  50. package/dist/chat/types.d.ts +1 -1
  51. package/dist/constants/index.cjs +3 -1
  52. package/dist/constants/index.d.cts +2 -2
  53. package/dist/constants/index.d.ts +2 -2
  54. package/dist/constants/index.js +2 -2
  55. package/dist/{constants-CqyyBkXW.cjs → constants-CkAVvuUq.cjs} +23 -1
  56. package/dist/constants-CkAVvuUq.cjs.map +1 -0
  57. package/dist/{constants-_HhqKvBg.js → constants-qeWGfk_7.js} +12 -2
  58. package/dist/constants-qeWGfk_7.js.map +1 -0
  59. package/dist/{createFetchClient-BK0TZK-U.js → createFetchClient-B1h3-p65.js} +10 -2
  60. package/dist/createFetchClient-B1h3-p65.js.map +1 -0
  61. package/dist/{createFetchClient-BsG719K1.cjs → createFetchClient-B9Cv0W9f.cjs} +15 -1
  62. package/dist/createFetchClient-B9Cv0W9f.cjs.map +1 -0
  63. package/dist/{createGenericFetchClient-DLbjX0eM.cjs → createGenericFetchClient-BWoSkTki.cjs} +2 -2
  64. package/dist/{createGenericFetchClient-DLbjX0eM.cjs.map → createGenericFetchClient-BWoSkTki.cjs.map} +1 -1
  65. package/dist/{createGenericFetchClient-CVZYekDk.js → createGenericFetchClient-DhpvUSlX.js} +2 -2
  66. package/dist/{createGenericFetchClient-CVZYekDk.js.map → createGenericFetchClient-DhpvUSlX.js.map} +1 -1
  67. package/dist/{createOpenapiFetchClient-B5U1fCHS.js → createOpenapiFetchClient-0_oqhdPv.js} +2 -2
  68. package/dist/{createOpenapiFetchClient-B5U1fCHS.js.map → createOpenapiFetchClient-0_oqhdPv.js.map} +1 -1
  69. package/dist/{createOpenapiFetchClient-Cr90VXY4.cjs → createOpenapiFetchClient-yirrW6Tg.cjs} +2 -2
  70. package/dist/{createOpenapiFetchClient-Cr90VXY4.cjs.map → createOpenapiFetchClient-yirrW6Tg.cjs.map} +1 -1
  71. package/dist/{credential-0c6yFwtp.cjs → credential-D-tX9gP4.cjs} +2 -2
  72. package/dist/{credential-0c6yFwtp.cjs.map → credential-D-tX9gP4.cjs.map} +1 -1
  73. package/dist/{credential-kEGLnVez.js → credential-dKxArMic.js} +2 -2
  74. package/dist/{credential-kEGLnVez.js.map → credential-dKxArMic.js.map} +1 -1
  75. package/dist/dataScience/index.cjs +2 -2
  76. package/dist/dataScience/index.d.cts +2 -2
  77. package/dist/dataScience/index.d.ts +2 -2
  78. package/dist/dataScience/index.js +2 -2
  79. package/dist/dataScience/types.d.cts +2 -2
  80. package/dist/dataScience/types.d.ts +2 -2
  81. package/dist/{dataScience-C-JrA0Uk.cjs → dataScience-BqNWX-Gr.cjs} +5 -5
  82. package/dist/{dataScience-C-JrA0Uk.cjs.map → dataScience-BqNWX-Gr.cjs.map} +1 -1
  83. package/dist/{dataScience-CE0pSWbl.js → dataScience-jdbSSPYF.js} +5 -5
  84. package/dist/{dataScience-CE0pSWbl.js.map → dataScience-jdbSSPYF.js.map} +1 -1
  85. package/dist/developerPortal/index.cjs +1 -1
  86. package/dist/developerPortal/index.d.cts +2 -2
  87. package/dist/developerPortal/index.d.ts +2 -2
  88. package/dist/developerPortal/index.js +1 -1
  89. package/dist/developerPortal/types.d.cts +1 -1
  90. package/dist/developerPortal/types.d.ts +1 -1
  91. package/dist/{developerPortalClient-BPPEAdJW.js → developerPortalClient-5ABcxz1U.js} +3 -3
  92. package/dist/{developerPortalClient-BPPEAdJW.js.map → developerPortalClient-5ABcxz1U.js.map} +1 -1
  93. package/dist/{developerPortalClient-C8oq48xW.cjs → developerPortalClient-B7lNR5q0.cjs} +3 -3
  94. package/dist/{developerPortalClient-C8oq48xW.cjs.map → developerPortalClient-B7lNR5q0.cjs.map} +1 -1
  95. package/dist/domain/permissions/index.d.cts +2 -2
  96. package/dist/domain/permissions/index.d.ts +2 -2
  97. package/dist/editor/index.cjs +2 -2
  98. package/dist/editor/index.d.cts +2 -2
  99. package/dist/editor/index.d.ts +2 -2
  100. package/dist/editor/index.js +2 -2
  101. package/dist/editor/types.d.cts +1 -1
  102. package/dist/editor/types.d.ts +1 -1
  103. package/dist/encryption/index.cjs +1 -1
  104. package/dist/encryption/index.d.cts +1 -1
  105. package/dist/encryption/index.d.ts +1 -1
  106. package/dist/encryption/index.js +1 -1
  107. package/dist/encryption/types.d.cts +1 -1
  108. package/dist/encryption/types.d.ts +1 -1
  109. package/dist/import/index.cjs +1 -1
  110. package/dist/import/index.d.cts +3 -3
  111. package/dist/import/index.d.ts +3 -3
  112. package/dist/import/index.js +1 -1
  113. package/dist/{import-Cf0W-7YD.js → import-CExRbskw.js} +3 -3
  114. package/dist/{import-Cf0W-7YD.js.map → import-CExRbskw.js.map} +1 -1
  115. package/dist/{import-KLH1uRtx.cjs → import-CXHppAxd.cjs} +3 -3
  116. package/dist/{import-KLH1uRtx.cjs.map → import-CXHppAxd.cjs.map} +1 -1
  117. package/dist/{index-vb9Rfqca.d.cts → index--pxLseaw.d.cts} +13 -3
  118. package/dist/{index-vb9Rfqca.d.ts → index--pxLseaw.d.ts} +13 -3
  119. package/dist/{index-DYQt4zxC.d.ts → index-7RvXnXmd.d.ts} +6 -6
  120. package/dist/{index-CLPrlyIz.d.cts → index-B-frWtGW.d.cts} +19 -2
  121. package/dist/{index-WQkVzx5e.d.cts → index-B6q7HxKJ.d.cts} +4 -4
  122. package/dist/{index-Dwp8tF6O.d.ts → index-BR2Fu-Wo.d.ts} +32 -31
  123. package/dist/{index-IN0qzs52.d.cts → index-BSjfVDTr.d.cts} +5 -5
  124. package/dist/{index-BEKaJ7Cc.d.cts → index-BfVv8isU.d.cts} +4 -4
  125. package/dist/{index-DXi6wsr5.d.cts → index-C9mAoXF6.d.cts} +6 -6
  126. package/dist/{index-KKJkrxjx.d.ts → index-CMb0ygwb.d.ts} +3 -3
  127. package/dist/{index-DVsnxZap.d.cts → index-CR9LsDaG.d.cts} +4 -4
  128. package/dist/{index-Cfrl7sd5.d.ts → index-CW4VC9oN.d.ts} +4 -4
  129. package/dist/{index-CeistZnj.d.ts → index-CYMAwD3E.d.ts} +4 -4
  130. package/dist/{index-CXQRvZ-f.d.cts → index-Cpjh05sx.d.cts} +4 -4
  131. package/dist/{index-eEBVG5s3.d.cts → index-CwJE18PJ.d.cts} +3 -3
  132. package/dist/{index-DIM8KZly.d.ts → index-D_TnbEtp.d.cts} +3 -3
  133. package/dist/{index-BthgbVdd.d.ts → index-Daks5CeX.d.ts} +4 -4
  134. package/dist/{index-BmjeNd9u.d.ts → index-DeMDxHTz.d.ts} +4 -4
  135. package/dist/{index-8pN6Emos.d.ts → index-Ds8e0l7-.d.ts} +19 -2
  136. package/dist/{index-DNlX-H1V.d.ts → index-J1I2HlSm.d.ts} +5 -5
  137. package/dist/{index-BWBScAYc.d.cts → index-NicJZIzu.d.ts} +3 -3
  138. package/dist/{index-DplMbm9E.d.cts → index-cu8THqZV.d.cts} +32 -31
  139. package/dist/index.cjs +28 -19
  140. package/dist/index.cjs.map +1 -1
  141. package/dist/index.d.cts +6 -6
  142. package/dist/index.d.ts +6 -6
  143. package/dist/index.js +27 -20
  144. package/dist/index.js.map +1 -1
  145. package/dist/management/index.cjs +1 -1
  146. package/dist/management/index.d.cts +1 -1
  147. package/dist/management/index.d.ts +1 -1
  148. package/dist/management/index.js +1 -1
  149. package/dist/management/types.d.cts +1 -1
  150. package/dist/management/types.d.ts +1 -1
  151. package/dist/{management-DqwQcDCx.js → management-Cc8mKfnf.js} +6 -7
  152. package/dist/management-Cc8mKfnf.js.map +1 -0
  153. package/dist/{management-WOmlBt6H.cjs → management-DlVdxzPw.cjs} +6 -7
  154. package/dist/management-DlVdxzPw.cjs.map +1 -0
  155. package/dist/metastore/index.cjs +1 -1
  156. package/dist/metastore/index.d.cts +1 -1
  157. package/dist/metastore/index.d.ts +1 -1
  158. package/dist/metastore/index.js +1 -1
  159. package/dist/metastore/types.d.cts +1 -1
  160. package/dist/metastore/types.d.ts +1 -1
  161. package/dist/{metastore-CNEhL66f.js → metastore-CNf1412Z.js} +4 -4
  162. package/dist/{metastore-CNEhL66f.js.map → metastore-CNf1412Z.js.map} +1 -1
  163. package/dist/{metastore-CkQluyX1.cjs → metastore-DbsxqjhS.cjs} +4 -4
  164. package/dist/{metastore-CkQluyX1.cjs.map → metastore-DbsxqjhS.cjs.map} +1 -1
  165. package/dist/notifications/index.cjs +3 -3
  166. package/dist/notifications/index.d.cts +2 -2
  167. package/dist/notifications/index.d.ts +2 -2
  168. package/dist/notifications/index.js +3 -3
  169. package/dist/notifications/types.d.cts +1 -1
  170. package/dist/notifications/types.d.ts +1 -1
  171. package/dist/oauth/index.cjs +1 -1
  172. package/dist/oauth/index.d.cts +2 -2
  173. package/dist/oauth/index.d.ts +2 -2
  174. package/dist/oauth/index.js +1 -1
  175. package/dist/oauth/types.d.cts +1 -1
  176. package/dist/oauth/types.d.ts +1 -1
  177. package/dist/{oauth-DYDObUX9.js → oauth-ClksaYRY.js} +5 -5
  178. package/dist/{oauth-DYDObUX9.js.map → oauth-ClksaYRY.js.map} +1 -1
  179. package/dist/{oauth-DTvrqe6P.cjs → oauth-DsZgmtPj.cjs} +5 -5
  180. package/dist/{oauth-DTvrqe6P.cjs.map → oauth-DsZgmtPj.cjs.map} +1 -1
  181. package/dist/omnisearch/index.cjs +2 -2
  182. package/dist/omnisearch/index.d.cts +2 -2
  183. package/dist/omnisearch/index.d.ts +2 -2
  184. package/dist/omnisearch/index.js +2 -2
  185. package/dist/omnisearch/types.d.cts +1 -1
  186. package/dist/omnisearch/types.d.ts +1 -1
  187. package/dist/{project-io1pY-hW.d.ts → project-5SLw86eZ.d.ts} +2 -2
  188. package/dist/{project-CcGxXIW_.d.cts → project-CRrsxSAK.d.cts} +2 -2
  189. package/dist/queryService/index.cjs +1 -1
  190. package/dist/queryService/index.d.cts +1 -1
  191. package/dist/queryService/index.d.ts +1 -1
  192. package/dist/queryService/index.js +1 -1
  193. package/dist/queryService/types.d.cts +1 -1
  194. package/dist/queryService/types.d.ts +1 -1
  195. package/dist/{queryService-BHV_OZI2.js → queryService-BlyAcBxP.js} +5 -5
  196. package/dist/{queryService-BHV_OZI2.js.map → queryService-BlyAcBxP.js.map} +1 -1
  197. package/dist/{queryService-CvqDqigW.cjs → queryService-DxUUkTcy.cjs} +5 -5
  198. package/dist/{queryService-CvqDqigW.cjs.map → queryService-DxUUkTcy.cjs.map} +1 -1
  199. package/dist/queue/index.cjs +1 -1
  200. package/dist/queue/index.d.cts +3 -3
  201. package/dist/queue/index.d.ts +3 -3
  202. package/dist/queue/index.js +1 -1
  203. package/dist/queue/types.d.cts +1 -1
  204. package/dist/queue/types.d.ts +1 -1
  205. package/dist/{queue-CUHKupTA.cjs → queue-CpcqeMPz.cjs} +4 -4
  206. package/dist/{queue-CUHKupTA.cjs.map → queue-CpcqeMPz.cjs.map} +1 -1
  207. package/dist/{queue-uofE4Eu6.js → queue-DpZTm7U7.js} +4 -4
  208. package/dist/{queue-uofE4Eu6.js.map → queue-DpZTm7U7.js.map} +1 -1
  209. package/dist/scheduler/index.cjs +3 -3
  210. package/dist/scheduler/index.d.cts +2 -2
  211. package/dist/scheduler/index.d.ts +2 -2
  212. package/dist/scheduler/index.js +3 -3
  213. package/dist/scheduler/types.d.cts +1 -1
  214. package/dist/scheduler/types.d.ts +1 -1
  215. package/dist/sdk/configurations/index.d.cts +4 -4
  216. package/dist/sdk/configurations/index.d.ts +4 -4
  217. package/dist/sdk/developerPortal/index.cjs +3 -3
  218. package/dist/sdk/developerPortal/index.d.cts +3 -3
  219. package/dist/sdk/developerPortal/index.d.ts +3 -3
  220. package/dist/sdk/developerPortal/index.js +3 -3
  221. package/dist/sdk/queryService/index.d.cts +1 -1
  222. package/dist/sdk/queryService/index.d.ts +1 -1
  223. package/dist/sdk/semanticLayer/index.d.cts +1 -1
  224. package/dist/sdk/semanticLayer/index.d.ts +1 -1
  225. package/dist/sdk/semanticLayer/types.d.cts +1 -1
  226. package/dist/sdk/semanticLayer/types.d.ts +1 -1
  227. package/dist/sdk/storage/index.d.cts +1 -1
  228. package/dist/sdk/storage/index.d.ts +1 -1
  229. package/dist/sdk/tag/index.d.cts +2 -2
  230. package/dist/sdk/tag/index.d.ts +2 -2
  231. package/dist/sdk/tag/types.d.cts +1 -1
  232. package/dist/sdk/tag/types.d.ts +1 -1
  233. package/dist/sdk/vault/index.d.cts +1 -1
  234. package/dist/sdk/vault/index.d.ts +1 -1
  235. package/dist/status/index.cjs +1 -1
  236. package/dist/status/index.d.cts +1 -1
  237. package/dist/status/index.d.ts +1 -1
  238. package/dist/status/index.js +1 -1
  239. package/dist/storage/index.cjs +6 -3
  240. package/dist/storage/index.d.cts +3 -3
  241. package/dist/storage/index.d.ts +3 -3
  242. package/dist/storage/index.js +5 -4
  243. package/dist/storage/types.d.cts +2 -2
  244. package/dist/storage/types.d.ts +2 -2
  245. package/dist/{storage-luq7YBZF.js → storage-CQxu0EY3.js} +10 -7
  246. package/dist/{storage-luq7YBZF.js.map → storage-CQxu0EY3.js.map} +1 -1
  247. package/dist/{storage-DbyNnkIJ.cjs → storage-vnH64B_Q.cjs} +10 -7
  248. package/dist/storage-vnH64B_Q.cjs.map +1 -0
  249. package/dist/stream/index.cjs +3 -3
  250. package/dist/stream/index.d.cts +2 -2
  251. package/dist/stream/index.d.ts +2 -2
  252. package/dist/stream/index.js +3 -3
  253. package/dist/stream/types.d.cts +1 -1
  254. package/dist/stream/types.d.ts +1 -1
  255. package/dist/syncActions/index.cjs +1 -1
  256. package/dist/syncActions/index.d.cts +1 -1
  257. package/dist/syncActions/index.d.ts +1 -1
  258. package/dist/syncActions/index.js +1 -1
  259. package/dist/syncActions/types.d.cts +1 -1
  260. package/dist/syncActions/types.d.ts +1 -1
  261. package/dist/{syncActions-ssWWVN_4.js → syncActions-AgFiMjRS.js} +5 -5
  262. package/dist/{syncActions-ssWWVN_4.js.map → syncActions-AgFiMjRS.js.map} +1 -1
  263. package/dist/{syncActions-DKWeJ8GH.cjs → syncActions-DPcAPYgJ.cjs} +5 -5
  264. package/dist/{syncActions-DKWeJ8GH.cjs.map → syncActions-DPcAPYgJ.cjs.map} +1 -1
  265. package/dist/telemetry/index.cjs +1 -1
  266. package/dist/telemetry/index.d.cts +2 -2
  267. package/dist/telemetry/index.d.ts +2 -2
  268. package/dist/telemetry/index.js +1 -1
  269. package/dist/{telemetry-2IrE8HaZ.cjs → telemetry-BLgaYEvi.cjs} +3 -3
  270. package/dist/{telemetry-2IrE8HaZ.cjs.map → telemetry-BLgaYEvi.cjs.map} +1 -1
  271. package/dist/{telemetry-yQfQxBBI.js → telemetry-CPiGWpLi.js} +3 -3
  272. package/dist/{telemetry-yQfQxBBI.js.map → telemetry-CPiGWpLi.js.map} +1 -1
  273. package/dist/{types-DCBKso0t.d.cts → types-056giLrn.d.cts} +2 -2
  274. package/dist/{types-B1S2H7q1.d.ts → types-B1S60aS2.d.ts} +2 -2
  275. package/dist/{types-DwX1uxp_.d.ts → types-B2Al1BNh.d.ts} +2 -2
  276. package/dist/{types--T-vBqdd.d.cts → types-B2El99VY.d.cts} +2 -2
  277. package/dist/{types-BXK6Ebtm.d.ts → types-BHCigZFc.d.ts} +3 -3
  278. package/dist/{types-CtdyAkzI.d.cts → types-BIAP4CYp.d.cts} +2 -2
  279. package/dist/{types-B1glyy_Q.d.ts → types-BJLRgXw0.d.ts} +2 -2
  280. package/dist/{types-h9TTimS_.d.ts → types-BMsK6T5k.d.ts} +2 -2
  281. package/dist/{types-DebL68-g.d.ts → types-BV74LS5r.d.ts} +3 -3
  282. package/dist/{types-V8rC5if7.d.cts → types-BXnUqdBB.d.cts} +2 -2
  283. package/dist/{types-BREBK0xX.d.ts → types-Bc3-a3DT.d.cts} +2 -2
  284. package/dist/{types-C8XiTXxi.d.cts → types-BdKtW2Ml.d.cts} +2 -2
  285. package/dist/{types-DgaYUtu_.d.cts → types-Bv5vw2dc.d.cts} +2 -2
  286. package/dist/{types-D2n3h1gp.d.ts → types-BvXODdf5.d.ts} +2 -2
  287. package/dist/{types-CyRK5z-E.d.cts → types-By47HWwB.d.cts} +2 -2
  288. package/dist/{types-DeApSCzx.d.cts → types-C0bGZqFI.d.cts} +2 -2
  289. package/dist/{types-BefwoXik.d.cts → types-C2p7JYQ3.d.cts} +2 -2
  290. package/dist/{types-QOIQ-dZU.d.cts → types-CFhAduFK.d.cts} +3 -3
  291. package/dist/{types-ISUNM_BR.d.cts → types-CIJAtX8q.d.cts} +2 -2
  292. package/dist/{types-DvsGS8By.d.cts → types-CIybfUJ9.d.cts} +3 -3
  293. package/dist/{types-x4xPlrr0.d.ts → types-COFrOmuO.d.ts} +2 -2
  294. package/dist/{types-CexuN7Mw.d.cts → types-CQd9PuKY.d.cts} +7 -5
  295. package/dist/{types-CvADp-x-.d.ts → types-CgF9R0Na.d.ts} +2 -2
  296. package/dist/{types-BCt0EMiO.d.ts → types-Co8WobOo.d.ts} +3 -3
  297. package/dist/{types-DMvU4kZ2.d.cts → types-CuAoZH8w.d.cts} +2 -2
  298. package/dist/{types-SGuvOEV8.d.ts → types-Culr5v8R.d.ts} +3 -3
  299. package/dist/{types-BD6czYPH.d.ts → types-D5VvEdOv.d.ts} +7 -5
  300. package/dist/{types-DEKF5pbg.d.cts → types-D7YGPUsm.d.ts} +2 -2
  301. package/dist/{types-CwvOcTOm.d.cts → types-DG_FlLJt.d.cts} +3 -3
  302. package/dist/{types-B06L4-WE.d.cts → types-DLazCdFR.d.cts} +3 -3
  303. package/dist/{types-CC0wymfG.d.ts → types-DMMMQuNt.d.ts} +3 -3
  304. package/dist/{types-bws2RtKq.d.ts → types-DN7RWWBw.d.ts} +2 -2
  305. package/dist/{types-BhBvnvqe.d.ts → types-DQOOWgLt.d.cts} +2 -2
  306. package/dist/{types-CAOvDtMC.d.cts → types-DSBNqF1J.d.cts} +2 -2
  307. package/dist/{types-Z-vUwgym.d.ts → types-DWUd__fe.d.ts} +2 -2
  308. package/dist/{types-CjAia48k.d.ts → types-DdeZK3BO.d.ts} +2 -2
  309. package/dist/{types-BpWqpMkL.d.ts → types-Dirp9mni.d.ts} +3 -3
  310. package/dist/{types-DkbfBOBr.d.cts → types-DkoyCUqv.d.ts} +2 -2
  311. package/dist/{types-BmFyDKe6.d.ts → types-DnOGCb-p.d.cts} +24 -3
  312. package/dist/{types-CSmttcZ_.d.ts → types-Drk7PEhk.d.ts} +2 -2
  313. package/dist/{types-n4FFKqa4.d.ts → types-DyIKgbGB.d.ts} +2 -2
  314. package/dist/{types-2mHlPakp.d.cts → types-RmbvQimP.d.ts} +24 -3
  315. package/dist/{types-7H6Dnz0Y.d.ts → types-SX78XZZ0.d.ts} +2 -2
  316. package/dist/{types-CRYtdj5w.d.ts → types-X-gQF8F8.d.ts} +2 -2
  317. package/dist/{types-DBOEA7l0.d.cts → types-ca-YNg1r.d.cts} +3 -3
  318. package/dist/{types-BO-mTxKb.d.cts → types-eP06LqcE.d.cts} +2 -2
  319. package/dist/{types-CI1mW2lA.d.ts → types-lVXf05pr.d.ts} +2 -2
  320. package/dist/{types-BRQAKEC1.d.cts → types-mXM8MrYS.d.cts} +3 -3
  321. package/dist/{types-DS8uFAeq.d.cts → types-sTH4KiPc.d.cts} +2 -2
  322. package/dist/{types-CbZ8aMKW.d.cts → types-uP64XthM.d.cts} +2 -2
  323. package/dist/validateConnectionStatus-CBhXmvWC.js +38 -0
  324. package/dist/validateConnectionStatus-CBhXmvWC.js.map +1 -0
  325. package/dist/validateConnectionStatus-DVHXGTdi.cjs +55 -0
  326. package/dist/validateConnectionStatus-DVHXGTdi.cjs.map +1 -0
  327. package/dist/vault/index.cjs +4 -4
  328. package/dist/vault/index.d.cts +1 -1
  329. package/dist/vault/index.d.ts +1 -1
  330. package/dist/vault/index.js +4 -4
  331. package/dist/vault/types.d.cts +1 -1
  332. package/dist/vault/types.d.ts +1 -1
  333. package/package.json +4 -3
  334. package/surface/auth.md +9 -2
  335. package/surface/kaiAgent.md +1 -0
  336. package/dist/authClient-DOk6VKdV.js.map +0 -1
  337. package/dist/authClient-Z8Eg8rlN.cjs.map +0 -1
  338. package/dist/constants-CqyyBkXW.cjs.map +0 -1
  339. package/dist/constants-_HhqKvBg.js.map +0 -1
  340. package/dist/createFetchClient-BK0TZK-U.js.map +0 -1
  341. package/dist/createFetchClient-BsG719K1.cjs.map +0 -1
  342. package/dist/management-DqwQcDCx.js.map +0 -1
  343. package/dist/management-WOmlBt6H.cjs.map +0 -1
  344. package/dist/storage-DbyNnkIJ.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
- import { t as createOpenapiFetchClient } from "./index-8pN6Emos.js";
2
- import { n as ClientInitOptions } from "./types-7H6Dnz0Y.js";
3
- import { A as CreateDeviceAuthorizationBody, F as paths, M as GetDeviceAuthorizationTokenBody, O as ApproveDeviceAuthorizationBody, P as components, _ as ExchangePatBody, b as RevokePatPath, c as RevokeSessionPath, d as InitiateSamlBody, h as CreatePatBody, i as SudoBody, l as AssertSamlBody, p as GetPkceTokenBody, r as RevokeTokenBody, x as DisableTotpPath } from "./types-BmFyDKe6.js";
1
+ import { t as createOpenapiFetchClient } from "./index-Ds8e0l7-.js";
2
+ import { n as ClientInitOptions } from "./types-SX78XZZ0.js";
3
+ import { D as RevokePatPath, F as ApproveDeviceAuthorizationBody, H as paths, L as CreateDeviceAuthorizationBody, O as DisableTotpPath, S as CreatePatBody, V as components, a as RemoveWebauthnInput, b as GetPkceTokenBody, d as SudoBody, g as AssertSamlBody, h as RevokeSessionPath, n as RegisterWebauthnInput, r as RegisterWebauthnOptionsResult, u as RevokeTokenBody, v as InitiateSamlBody, w as ExchangePatBody, z as GetDeviceAuthorizationTokenBody } from "./types-RmbvQimP.js";
4
4
  import * as z$1 from "zod";
5
5
  //#region src/clients/auth/login/schemas.d.ts
6
6
  declare const loginInputSchema: z$1.ZodObject<{
@@ -34,12 +34,27 @@ declare const loginSuccessSchema: z$1.ZodObject<{
34
34
  name: z$1.ZodString;
35
35
  }, z$1.core.$strip>;
36
36
  }, z$1.core.$strip>;
37
+ /**
38
+ * MFA-challenge shape. `mfaRequired` is always true here — it is the discriminant.
39
+ *
40
+ * - `mfaType` is the account's single active factor, `allowedMethods` everything that may satisfy
41
+ * it. Both stay `string`: a stack that grows a method must not fail to parse, so callers branch
42
+ * and handle the unknown case themselves.
43
+ * - `webauthn` carries the serialized `PublicKeyCredentialRequestOptionsJSON` for a passkey
44
+ * challenge, inlined so the ceremony costs no extra round-trip. The spec declares it
45
+ * required-and-nullable while the serializer omits the key outright for TOTP, so it must tolerate
46
+ * present, `null` and absent alike.
47
+ * - `unknown`, not a record: this sits inside the union `login` hard-parses, so a shape nobody
48
+ * expected here would fail *both* branches and lock every MFA user out of sign-in — not merely
49
+ * out of the passkey path. Whoever runs the ceremony validates it properly instead.
50
+ */
37
51
  declare const mfaChallengeSchema: z$1.ZodObject<{
38
52
  mfaRequired: z$1.ZodLiteral<true>;
39
53
  mfaType: z$1.ZodString;
40
54
  mfaToken: z$1.ZodString;
41
55
  expiresIn: z$1.ZodNumber;
42
56
  allowedMethods: z$1.ZodArray<z$1.ZodString>;
57
+ webauthn: z$1.ZodOptional<z$1.ZodUnknown>;
43
58
  }, z$1.core.$strip>;
44
59
  declare const loginResultSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
45
60
  mfaRequired: z$1.ZodDefault<z$1.ZodLiteral<false>>;
@@ -59,12 +74,29 @@ declare const loginResultSchema: z$1.ZodUnion<readonly [z$1.ZodObject<{
59
74
  mfaToken: z$1.ZodString;
60
75
  expiresIn: z$1.ZodNumber;
61
76
  allowedMethods: z$1.ZodArray<z$1.ZodString>;
77
+ webauthn: z$1.ZodOptional<z$1.ZodUnknown>;
62
78
  }, z$1.core.$strip>]>;
63
79
  type LoginUser = z$1.infer<typeof userSchema>;
64
80
  type LoginSuccess = z$1.infer<typeof loginSuccessSchema>;
81
+ type MfaChallenge = z$1.infer<typeof mfaChallengeSchema>;
65
82
  type LoginResult = z$1.infer<typeof loginResultSchema>;
66
83
  //#endregion
67
84
  //#region src/clients/auth/mfa/schemas.d.ts
85
+ /**
86
+ * The methods `POST /v1/auth/mfa` accepts, and the vocabulary a login challenge reports in
87
+ * `mfaType` / `allowedMethods`.
88
+ *
89
+ * - `totp` and `recoveryCode` are verified by a typed code; `webauthn` by an assertion.
90
+ * - `satisfies` binds the values to the generated spec, so a regenerated schema that renames or
91
+ * drops a method fails the build here rather than at runtime mid-sign-in.
92
+ * - A challenge may still name a method absent from here, so the wire fields stay `string`.
93
+ */
94
+ declare const MFA_METHOD: {
95
+ readonly totp: 'totp';
96
+ readonly webauthn: 'webauthn';
97
+ readonly recoveryCode: 'recovery_code';
98
+ };
99
+ type MfaMethod = (typeof MFA_METHOD)[keyof typeof MFA_METHOD];
68
100
  declare const mfaCodeInputSchema: z$1.ZodObject<{
69
101
  mfaToken: z$1.ZodString;
70
102
  type: z$1.ZodEnum<{
@@ -127,6 +159,7 @@ declare const createAuthClient: ({ baseUrl, middlewares }: AuthClientInitOptions
127
159
  mfaToken: string;
128
160
  expiresIn: number;
129
161
  allowedMethods: string[];
162
+ webauthn?: unknown;
130
163
  }>;
131
164
  withOidc: (input: OidcInput, signal?: AbortSignal) => Promise<{
132
165
  mfaRequired: false;
@@ -146,6 +179,7 @@ declare const createAuthClient: ({ baseUrl, middlewares }: AuthClientInitOptions
146
179
  mfaToken: string;
147
180
  expiresIn: number;
148
181
  allowedMethods: string[];
182
+ webauthn?: unknown;
149
183
  }>;
150
184
  methods: (signal?: AbortSignal) => Promise<{
151
185
  methods: components['schemas']['LoginMethod'][];
@@ -314,7 +348,20 @@ declare const createAuthClient: ({ baseUrl, middlewares }: AuthClientInitOptions
314
348
  }>;
315
349
  revoke: (body: RevokeTokenBody, signal?: AbortSignal) => Promise<void>;
316
350
  };
351
+ webauthn: {
352
+ getAll: (signal?: AbortSignal) => Promise<{
353
+ webauthnCredentials?: components['schemas']['WebAuthnCredentialItemResponse'][];
354
+ }>;
355
+ registerOptions: (signal?: AbortSignal) => Promise<RegisterWebauthnOptionsResult>;
356
+ register: ({ credential, deviceName, revokeOtherSessions }: RegisterWebauthnInput, signal?: AbortSignal) => Promise<{
357
+ id: number;
358
+ deviceName: string;
359
+ created: string;
360
+ recoveryCodes?: string[] | null;
361
+ }>;
362
+ remove: ({ id, ...query }: RemoveWebauthnInput, signal?: AbortSignal) => Promise<void>;
363
+ };
317
364
  };
318
365
  //#endregion
319
- export { loginSuccessSchema as C, loginResultSchema as S, oidcInputSchema as T, LoginResult as _, ResetInput as a, OidcInput as b, resetInputSchema as c, MfaWebauthnInput as d, TotpVerifyInput as f, LoginInput as g, totpVerifyInputSchema as h, ChangePasswordInput as i, resetRequestInputSchema as l, mfaWebauthnInputSchema as m, AuthOpenApiFetchClient as n, ResetRequestInput as o, mfaCodeInputSchema as p, createAuthClient as r, changeInputSchema as s, AuthClientInitOptions as t, MfaCodeInput as u, LoginSuccess as v, mfaChallengeSchema as w, loginInputSchema as x, LoginUser as y };
320
- //# sourceMappingURL=authClient-Dsd7W99W.d.ts.map
366
+ export { OidcInput as C, mfaChallengeSchema as D, loginSuccessSchema as E, oidcInputSchema as O, MfaChallenge as S, loginResultSchema as T, totpVerifyInputSchema as _, ResetInput as a, LoginSuccess as b, resetInputSchema as c, MfaCodeInput as d, MfaMethod as f, mfaWebauthnInputSchema as g, mfaCodeInputSchema as h, ChangePasswordInput as i, resetRequestInputSchema as l, TotpVerifyInput as m, AuthOpenApiFetchClient as n, ResetRequestInput as o, MfaWebauthnInput as p, createAuthClient as r, changeInputSchema as s, AuthClientInitOptions as t, MFA_METHOD as u, LoginInput as v, loginInputSchema as w, LoginUser as x, LoginResult as y };
367
+ //# sourceMappingURL=authClient-Bc_bDisO.d.ts.map
@@ -1,7 +1,8 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
- const require_createFetchClient = require("./createFetchClient-BsG719K1.cjs");
3
- const require_createGenericFetchClient = require("./createGenericFetchClient-DLbjX0eM.cjs");
4
- const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-Cr90VXY4.cjs");
2
+ const require_createFetchClient = require("./createFetchClient-B9Cv0W9f.cjs");
3
+ const require_validateConnectionStatus = require("./validateConnectionStatus-DVHXGTdi.cjs");
4
+ const require_createGenericFetchClient = require("./createGenericFetchClient-BWoSkTki.cjs");
5
+ const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-yirrW6Tg.cjs");
5
6
  let zod = require("zod");
6
7
  zod = require_rolldown_runtime.__toESM(zod, 1);
7
8
  //#region src/clients/auth/device/device.ts
@@ -48,12 +49,27 @@ const loginSuccessSchema = zod.object({
48
49
  sessionId: zod.string(),
49
50
  user: userSchema
50
51
  });
52
+ /**
53
+ * MFA-challenge shape. `mfaRequired` is always true here — it is the discriminant.
54
+ *
55
+ * - `mfaType` is the account's single active factor, `allowedMethods` everything that may satisfy
56
+ * it. Both stay `string`: a stack that grows a method must not fail to parse, so callers branch
57
+ * and handle the unknown case themselves.
58
+ * - `webauthn` carries the serialized `PublicKeyCredentialRequestOptionsJSON` for a passkey
59
+ * challenge, inlined so the ceremony costs no extra round-trip. The spec declares it
60
+ * required-and-nullable while the serializer omits the key outright for TOTP, so it must tolerate
61
+ * present, `null` and absent alike.
62
+ * - `unknown`, not a record: this sits inside the union `login` hard-parses, so a shape nobody
63
+ * expected here would fail *both* branches and lock every MFA user out of sign-in — not merely
64
+ * out of the passkey path. Whoever runs the ceremony validates it properly instead.
65
+ */
51
66
  const mfaChallengeSchema = zod.object({
52
67
  mfaRequired: zod.literal(true),
53
68
  mfaType: zod.string(),
54
69
  mfaToken: zod.string(),
55
70
  expiresIn: zod.number(),
56
- allowedMethods: zod.array(zod.string())
71
+ allowedMethods: zod.array(zod.string()),
72
+ webauthn: zod.unknown().optional()
57
73
  });
58
74
  const loginResultSchema = zod.union([loginSuccessSchema, mfaChallengeSchema]);
59
75
  //#endregion
@@ -92,9 +108,23 @@ const createLogin = (client) => {
92
108
  };
93
109
  //#endregion
94
110
  //#region src/clients/auth/mfa/schemas.ts
111
+ /**
112
+ * The methods `POST /v1/auth/mfa` accepts, and the vocabulary a login challenge reports in
113
+ * `mfaType` / `allowedMethods`.
114
+ *
115
+ * - `totp` and `recoveryCode` are verified by a typed code; `webauthn` by an assertion.
116
+ * - `satisfies` binds the values to the generated spec, so a regenerated schema that renames or
117
+ * drops a method fails the build here rather than at runtime mid-sign-in.
118
+ * - A challenge may still name a method absent from here, so the wire fields stay `string`.
119
+ */
120
+ const MFA_METHOD = {
121
+ totp: "totp",
122
+ webauthn: "webauthn",
123
+ recoveryCode: "recovery_code"
124
+ };
95
125
  const mfaCodeInputSchema = zod.object({
96
126
  mfaToken: zod.string(),
97
- type: zod.enum(["totp", "recovery_code"]),
127
+ type: zod.enum([MFA_METHOD.totp, MFA_METHOD.recoveryCode]),
98
128
  code: zod.string().min(1, "Required")
99
129
  });
100
130
  const mfaWebauthnInputSchema = zod.object({
@@ -124,7 +154,7 @@ const createMfa = (client) => {
124
154
  const { mfaToken, assertion } = mfaWebauthnInputSchema.parse(input);
125
155
  return _verify({
126
156
  mfaToken,
127
- type: "webauthn",
157
+ type: MFA_METHOD.webauthn,
128
158
  assertion
129
159
  }, signal);
130
160
  };
@@ -300,15 +330,49 @@ const createToken = (client) => {
300
330
  };
301
331
  };
302
332
  //#endregion
333
+ //#region src/clients/auth/webauthn/webauthn.ts
334
+ const createWebauthn = (client) => {
335
+ const getAll = async (signal) => {
336
+ const { data } = await client.get("/v1/auth/webauthn", {}, { signal });
337
+ return data;
338
+ };
339
+ const registerOptions = async (signal) => {
340
+ const { data } = await client.post("/v1/auth/webauthn/register/options", {}, { signal });
341
+ return data;
342
+ };
343
+ const register = async ({ credential, deviceName = null, revokeOtherSessions = false }, signal) => {
344
+ const { data } = await client.post("/v1/auth/webauthn/register", { body: {
345
+ credential,
346
+ deviceName,
347
+ revokeOtherSessions
348
+ } }, { signal });
349
+ return data;
350
+ };
351
+ const remove = async ({ id, ...query }, signal) => {
352
+ await client.delete("/v1/auth/webauthn/{id}", {
353
+ path: { id },
354
+ query
355
+ }, { signal });
356
+ };
357
+ return {
358
+ getAll,
359
+ registerOptions,
360
+ register,
361
+ remove
362
+ };
363
+ };
364
+ //#endregion
303
365
  //#region src/clients/auth/authClient.ts
304
366
  const createAuthClient = ({ baseUrl, middlewares }) => {
305
367
  const client = require_createOpenapiFetchClient.createOpenapiFetchClient({
306
368
  baseUrl,
307
- middlewares
369
+ middlewares,
370
+ validateStatus: require_validateConnectionStatus.validateConnectionStatus
308
371
  });
309
372
  const genericClient = require_createGenericFetchClient.createGenericFetchClient({
310
373
  baseUrl,
311
- middlewares
374
+ middlewares,
375
+ validateStatus: require_validateConnectionStatus.validateConnectionStatus
312
376
  });
313
377
  const healthCheck = async (signal) => {
314
378
  const { data } = await genericClient.get("/health-check", {}, { signal });
@@ -325,10 +389,17 @@ const createAuthClient = ({ baseUrl, middlewares }) => {
325
389
  sudo: createSudo(client),
326
390
  pkce: createPkce(client),
327
391
  session: createSession(client),
328
- token: createToken(client)
392
+ token: createToken(client),
393
+ webauthn: createWebauthn(client)
329
394
  };
330
395
  };
331
396
  //#endregion
397
+ Object.defineProperty(exports, "MFA_METHOD", {
398
+ enumerable: true,
399
+ get: function() {
400
+ return MFA_METHOD;
401
+ }
402
+ });
332
403
  Object.defineProperty(exports, "changeInputSchema", {
333
404
  enumerable: true,
334
405
  get: function() {
@@ -402,4 +473,4 @@ Object.defineProperty(exports, "totpVerifyInputSchema", {
402
473
  }
403
474
  });
404
475
 
405
- //# sourceMappingURL=authClient-Z8Eg8rlN.cjs.map
476
+ //# sourceMappingURL=authClient-Cixa8_L1.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authClient-Cixa8_L1.cjs","names":["z","z","z","HttpHeader","createOpenapiFetchClient","validateConnectionStatus","createGenericFetchClient"],"sources":["../src/clients/auth/device/device.ts","../src/clients/auth/login/schemas.ts","../src/clients/auth/login/login.ts","../src/clients/auth/mfa/schemas.ts","../src/clients/auth/mfa/mfa.ts","../src/clients/auth/password/schemas.ts","../src/clients/auth/password/password.ts","../src/clients/auth/pat/pat.ts","../src/clients/auth/pkce/pkce.ts","../src/clients/auth/saml/saml.ts","../src/clients/auth/session/session.ts","../src/clients/auth/sudo/sudo.ts","../src/clients/auth/token/token.ts","../src/clients/auth/webauthn/webauthn.ts","../src/clients/auth/authClient.ts"],"sourcesContent":["import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type {\n ApproveDeviceAuthorizationBody,\n CreateDeviceAuthorizationBody,\n GetDeviceAuthorizationTokenBody,\n} from './types';\n\nexport const createDevice = (client: AuthOpenApiFetchClient) => {\n const create = async (body: CreateDeviceAuthorizationBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/device', { body }, { signal });\n return data;\n };\n\n const approve = async (body: ApproveDeviceAuthorizationBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/device/approve', { body }, { signal });\n return data;\n };\n\n const getToken = async (body: GetDeviceAuthorizationTokenBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/device/token', { body }, { signal });\n return data;\n };\n\n return { create, approve, getToken };\n};\n","import * as z from 'zod';\n\nexport const loginInputSchema = z.object({\n email: z.email(),\n password: z.string().min(1, 'Required'),\n});\n\nexport const oidcInputSchema = z.object({\n grantType: z.enum(['google', 'microsoft']),\n idToken: z.string().min(1, 'Required'),\n});\n\nexport type LoginInput = z.infer<typeof loginInputSchema>;\nexport type OidcInput = z.infer<typeof oidcInputSchema>;\n\nconst userSchema = z.object({\n id: z.number(),\n email: z.string(),\n name: z.string(),\n});\n\n// Success shape. The backend omits `mfaRequired` here, so we inject a `false`\n// literal to make the outcome a discriminated union on `mfaRequired`.\nexport const loginSuccessSchema = z.object({\n mfaRequired: z.literal(false).default(false),\n accessToken: z.string(),\n refreshToken: z.string(),\n tokenType: z.string(),\n expiresIn: z.number(),\n sessionId: z.string(),\n user: userSchema,\n});\n\n/**\n * MFA-challenge shape. `mfaRequired` is always true here — it is the discriminant.\n *\n * - `mfaType` is the account's single active factor, `allowedMethods` everything that may satisfy\n * it. Both stay `string`: a stack that grows a method must not fail to parse, so callers branch\n * and handle the unknown case themselves.\n * - `webauthn` carries the serialized `PublicKeyCredentialRequestOptionsJSON` for a passkey\n * challenge, inlined so the ceremony costs no extra round-trip. The spec declares it\n * required-and-nullable while the serializer omits the key outright for TOTP, so it must tolerate\n * present, `null` and absent alike.\n * - `unknown`, not a record: this sits inside the union `login` hard-parses, so a shape nobody\n * expected here would fail *both* branches and lock every MFA user out of sign-in — not merely\n * out of the passkey path. Whoever runs the ceremony validates it properly instead.\n */\nexport const mfaChallengeSchema = z.object({\n mfaRequired: z.literal(true),\n mfaType: z.string(),\n mfaToken: z.string(),\n expiresIn: z.number(),\n allowedMethods: z.array(z.string()),\n // `.optional()` explicitly: zod 4 dropped zod 3's implicit optionality for `z.unknown()`, so\n // without it a TOTP challenge — which omits the key — fails to parse and blocks sign-in.\n webauthn: z.unknown().optional(),\n});\n\nexport const loginResultSchema = z.union([loginSuccessSchema, mfaChallengeSchema]);\n\nexport type LoginUser = z.infer<typeof userSchema>;\nexport type LoginSuccess = z.infer<typeof loginSuccessSchema>;\nexport type MfaChallenge = z.infer<typeof mfaChallengeSchema>;\nexport type LoginResult = z.infer<typeof loginResultSchema>;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { LoginInput, OidcInput } from './schemas';\nimport { loginInputSchema, loginResultSchema, oidcInputSchema } from './schemas';\nimport type { LoginBody } from './types';\n\nexport const createLogin = (client: AuthOpenApiFetchClient) => {\n const _login = async (body: LoginBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/login', { body }, { signal });\n return data;\n };\n\n const withPassword = async (input: LoginInput, signal?: AbortSignal) => {\n const { email, password } = loginInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login({ grantType: 'password', email, password } as LoginBody, signal);\n // Validate against our own schema — the generated response type is unreliable,\n // and this narrows the outcome to a discriminated union on `mfaRequired`.\n return loginResultSchema.parse(data);\n };\n\n const withOidc = async (input: OidcInput, signal?: AbortSignal) => {\n const { grantType, idToken } = oidcInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login({ grantType, idToken } as LoginBody, signal);\n return loginResultSchema.parse(data);\n };\n\n // Unauthenticated. Carries the public OAuth client ids `withOidc` callers mint an id token with.\n const methods = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/methods', {}, { signal });\n return data;\n };\n\n return { withPassword, withOidc, methods };\n};\n","import * as z from 'zod';\n\nimport type { components } from '../__generated__/schema';\n\n/**\n * The methods `POST /v1/auth/mfa` accepts, and the vocabulary a login challenge reports in\n * `mfaType` / `allowedMethods`.\n *\n * - `totp` and `recoveryCode` are verified by a typed code; `webauthn` by an assertion.\n * - `satisfies` binds the values to the generated spec, so a regenerated schema that renames or\n * drops a method fails the build here rather than at runtime mid-sign-in.\n * - A challenge may still name a method absent from here, so the wire fields stay `string`.\n */\nexport const MFA_METHOD = {\n totp: 'totp',\n webauthn: 'webauthn',\n recoveryCode: 'recovery_code',\n} as const satisfies Record<string, components['schemas']['MfaRequest']['type']>;\n\nexport type MfaMethod = (typeof MFA_METHOD)[keyof typeof MFA_METHOD];\n\nexport const mfaCodeInputSchema = z.object({\n mfaToken: z.string(),\n type: z.enum([MFA_METHOD.totp, MFA_METHOD.recoveryCode]),\n code: z.string().min(1, 'Required'),\n});\n\nexport const mfaWebauthnInputSchema = z.object({\n mfaToken: z.string(),\n assertion: z.string(),\n});\n\nexport const totpVerifyInputSchema = z.object({\n code: z.string().min(1, 'Required'),\n // Optional in the spec, but `openapi-typescript` emits every `default`-bearing property as\n // required — the schema fills in the backend's own default so callers may still omit it. Set true\n // to sign the admin out everywhere else as part of enrolling.\n revokeOtherSessions: z.boolean().default(false),\n});\n\nexport type MfaCodeInput = z.infer<typeof mfaCodeInputSchema>;\nexport type MfaWebauthnInput = z.infer<typeof mfaWebauthnInputSchema>;\n// `z.input`: callers may omit `revokeOtherSessions` (the default fills it in on parse).\nexport type TotpVerifyInput = z.input<typeof totpVerifyInputSchema>;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { MfaCodeInput, MfaWebauthnInput, TotpVerifyInput } from './schemas';\nimport {\n MFA_METHOD,\n mfaCodeInputSchema,\n mfaWebauthnInputSchema,\n totpVerifyInputSchema,\n} from './schemas';\nimport type { DisableTotpPath, VerifyMfaBody } from './types';\n\nexport const createMfa = (client: AuthOpenApiFetchClient) => {\n const _verify = async (body: VerifyMfaBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/mfa', { body }, { signal });\n return data;\n };\n\n const verifyWithCode = async (input: MfaCodeInput, signal?: AbortSignal) => {\n const { mfaToken, type, code } = mfaCodeInputSchema.parse(input);\n // Cast: omit fields outside the type — the backend rejects null.\n return _verify({ mfaToken, type, code } as VerifyMfaBody, signal);\n };\n\n const verifyWithWebauthn = async (input: MfaWebauthnInput, signal?: AbortSignal) => {\n const { mfaToken, assertion } = mfaWebauthnInputSchema.parse(input);\n // Cast: omit fields outside the type — the backend rejects null.\n return _verify({ mfaToken, type: MFA_METHOD.webauthn, assertion } as VerifyMfaBody, signal);\n };\n\n const regenerateRecoveryCodes = async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/mfa/recovery-codes', {}, { signal });\n return data;\n };\n\n // TOTP enrollment for the signed-in user (account MFA management). `setup` returns the shared\n // secret + `otpauthUri` to render as a QR; `verify` confirms the first code and hands back the\n // one-time recovery codes plus the new factor `id`; `disable` removes a factor by that `id`.\n const totp = {\n setup: async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/mfa/totp', {}, { signal });\n return data;\n },\n verify: async (input: TotpVerifyInput, signal?: AbortSignal) => {\n const body = totpVerifyInputSchema.parse(input);\n const { data } = await client.post('/v1/auth/mfa/totp/verify', { body }, { signal });\n return data;\n },\n disable: async (id: DisableTotpPath['id'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/mfa/totp/{id}', { path: { id } }, { signal });\n },\n };\n\n return { verifyWithCode, verifyWithWebauthn, regenerateRecoveryCodes, totp };\n};\n","import * as z from 'zod';\n\nexport const resetRequestInputSchema = z.object({\n email: z.email(),\n});\n\nexport const resetInputSchema = z.object({\n // The single-use reset token (`kbc_pr_…`) delivered by e-mail.\n token: z.string().min(1, 'Required'),\n newPassword: z.string().min(1, 'Required'),\n // Revoke every session after the reset. Defaults to true (the backend's own default), so callers\n // may omit it; set false only to keep existing sessions alive. Password policy is backend-enforced.\n revokeSessions: z.boolean().default(true),\n});\n\nexport const changeInputSchema = z.object({\n currentPassword: z.string().min(1, 'Required'),\n newPassword: z.string().min(1, 'Required'),\n // Revoke every other session once the password changes. The schema fills in `true` on parse, so\n // the SDK always sends the field (matching the backend's own default); callers may omit it. Set\n // false only to keep the other sessions alive.\n revokeOtherSessions: z.boolean().default(true),\n});\n\nexport type ResetRequestInput = z.infer<typeof resetRequestInputSchema>;\n// `z.input`, not `z.infer`: callers may omit `revokeSessions` (the default fills it in on parse).\nexport type ResetInput = z.input<typeof resetInputSchema>;\n// `z.input`: callers may omit `revokeOtherSessions` (the default fills it in on parse).\nexport type ChangePasswordInput = z.input<typeof changeInputSchema>;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { ChangePasswordInput, ResetInput, ResetRequestInput } from './schemas';\nimport { changeInputSchema, resetInputSchema, resetRequestInputSchema } from './schemas';\n\nexport const createPassword = (client: AuthOpenApiFetchClient) => {\n // Fire-and-forget from the caller's view: the backend always answers 202 and reveals nothing about\n // whether the account exists. Resolves on 202; rejects on 429 (rate limited) or 400.\n const resetRequest = async (input: ResetRequestInput, signal?: AbortSignal) => {\n const body = resetRequestInputSchema.parse(input);\n await client.post('/v1/auth/password/reset-request', { body }, { signal });\n };\n\n // Applies the new password for the given reset token. Resolves on 204; rejects on 400 (invalid or\n // expired token, or a password that violates the policy).\n const reset = async (input: ResetInput, signal?: AbortSignal) => {\n // `revokeSessions` is defaulted by the schema, so the parsed body always carries all three\n // fields the endpoint requires — no field omission, no type assertion.\n const body = resetInputSchema.parse(input);\n await client.post('/v1/auth/password/reset', { body }, { signal });\n };\n\n // Changes the password for the signed-in user (bearer session). Resolves on 204; rejects on 400\n // (wrong current password, or a new password that violates the policy). Password policy is\n // backend-enforced.\n const change = async (input: ChangePasswordInput, signal?: AbortSignal) => {\n const body = changeInputSchema.parse(input);\n await client.post('/v1/auth/password/change', { body }, { signal });\n };\n\n return { resetRequest, reset, change };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { CreatePatBody, ExchangePatBody, RevokePatPath } from './types';\n\nexport const createPat = (client: AuthOpenApiFetchClient) => {\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/pat', {}, { signal });\n return data;\n };\n\n const create = async (body: CreatePatBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/pat', { body }, { signal });\n return data;\n };\n\n const exchange = async (body?: ExchangePatBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/pat/exchange', { body }, { signal });\n return data;\n };\n\n const revoke = async (id: RevokePatPath['id'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/pat/{id}', { path: { id } }, { signal });\n };\n\n return { create, exchange, revoke, getAll };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { GetPkceTokenBody } from './types';\n\nexport const createPkce = (client: AuthOpenApiFetchClient) => {\n const getToken = async (body: GetPkceTokenBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/pkce/token', { body }, { signal });\n return data;\n };\n\n return { getToken };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { AssertSamlBody, InitiateSamlBody } from './types';\n\nexport const createSaml = (client: AuthOpenApiFetchClient) => {\n const assert = async (body: AssertSamlBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/saml/assert', { body }, { signal });\n return data;\n };\n\n const initiate = async (body?: InitiateSamlBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/saml/initiate', { body }, { signal });\n return data;\n };\n\n return { assert, initiate };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { RevokeSessionPath } from './types';\n\nexport const createSession = (client: AuthOpenApiFetchClient) => {\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/sessions', {}, { signal });\n return data;\n };\n\n const revoke = async (sessionId: RevokeSessionPath['sessionId'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/sessions/{sessionId}', { path: { sessionId } }, { signal });\n };\n\n const revokeAll = async (signal?: AbortSignal) => {\n await client.delete('/v1/auth/sessions', {}, { signal });\n };\n\n return { getAll, revoke, revokeAll };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { SudoBody, SudoBodyRaw } from './types';\n\nexport const createSudo = (client: AuthOpenApiFetchClient) => {\n const verify = async (body: SudoBody, signal?: AbortSignal) => {\n // The generated request body (`SudoBodyRaw`) describes a payload the endpoint rejects — see the\n // `SudoBody` docs. Assert at this one boundary rather than making every caller send the invalid\n // shape; the real fix is the `#[OA\\Schema]`-vs-object mismatch on the backend, upstream of the\n // generated schema. Same pattern as `syncActionsClient`'s `PostActionsBodyRaw`.\n const { data } = await client.post(\n '/v1/auth/sudo',\n { body: body as unknown as SudoBodyRaw },\n { signal },\n );\n return data;\n };\n\n const challenge = async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/sudo/challenge', {}, { signal });\n return data;\n };\n\n return { verify, challenge };\n};\n","import { HttpHeader } from '../../../fetchClient';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { RevokeTokenBody } from './types';\n\nexport const createToken = (client: AuthOpenApiFetchClient) => {\n const refresh = async (refreshToken: string, signal?: AbortSignal) => {\n const { data } = await client.post(\n '/v1/auth/token/refresh',\n { body: { refreshToken } },\n { signal },\n );\n\n return data;\n };\n\n /**\n * Introspects an authenticated session token.\n *\n * @param token - Optional token to introspect (`Authorization: Bearer`); a middleware-set header wins.\n */\n const introspect = async (token?: string, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/v1/auth/token/introspect',\n {},\n { signal, headers: token ? { [HttpHeader.AUTHORIZATION]: `Bearer ${token}` } : undefined },\n );\n return data;\n };\n\n const revoke = async (body: RevokeTokenBody, signal?: AbortSignal) => {\n await client.post('/v1/auth/token/revoke', { body }, { signal });\n };\n\n return { refresh, introspect, revoke };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type {\n RegisterWebauthnInput,\n RegisterWebauthnOptionsResult,\n RemoveWebauthnInput,\n} from './types';\n\nexport const createWebauthn = (client: AuthOpenApiFetchClient) => {\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/webauthn', {}, { signal });\n return data;\n };\n\n const registerOptions = async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/webauthn/register/options', {}, { signal });\n // Cast: the spec types the free-form `options` object as `Record<string, never>`.\n return data as RegisterWebauthnOptionsResult;\n };\n\n const register = async (\n { credential, deviceName = null, revokeOtherSessions = false }: RegisterWebauthnInput,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/v1/auth/webauthn/register',\n { body: { credential, deviceName, revokeOtherSessions } },\n { signal },\n );\n return data;\n };\n\n // `revokeOtherSessions` signs every other session out along with the credential — the calling\n // session and personal access tokens survive. Omitted means the backend's own `false`.\n const remove = async ({ id, ...query }: RemoveWebauthnInput, signal?: AbortSignal) => {\n await client.delete('/v1/auth/webauthn/{id}', { path: { id }, query }, { signal });\n };\n\n return { getAll, registerOptions, register, remove };\n};\n","import { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport type { ClientInitOptions } from '../types';\nimport { validateConnectionStatus } from '../validateConnectionStatus';\n\nimport type { paths } from './__generated__/schema';\nimport { createDevice } from './device';\nimport { createLogin } from './login';\nimport { createMfa } from './mfa';\nimport { createPassword } from './password';\nimport { createPat } from './pat';\nimport { createPkce } from './pkce';\nimport { createSaml } from './saml';\nimport { createSession } from './session';\nimport { createSudo } from './sudo';\nimport { createToken } from './token';\nimport { createWebauthn } from './webauthn';\n\nexport type AuthClientInitOptions = Omit<ClientInitOptions, 'auth'>;\n\nexport type AuthOpenApiFetchClient = ReturnType<typeof createOpenapiFetchClient<paths>>;\n\nexport const createAuthClient = ({ baseUrl, middlewares }: AuthClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n validateStatus: validateConnectionStatus,\n });\n const genericClient = createGenericFetchClient({\n baseUrl,\n middlewares,\n validateStatus: validateConnectionStatus,\n });\n\n // Host-level: Connection serves the storage, management and auth APIs off one baseUrl, so this\n // probes the host, not this API's prefix — `/v2/storage/health-check`, `/manage/health-check`\n // and `/v1/auth/health-check` all 404.\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 login: createLogin(client),\n mfa: createMfa(client),\n password: createPassword(client),\n saml: createSaml(client),\n pat: createPat(client),\n device: createDevice(client),\n sudo: createSudo(client),\n pkce: createPkce(client),\n session: createSession(client),\n token: createToken(client),\n webauthn: createWebauthn(client),\n };\n};\n"],"mappings":";;;;;;;;AAQA,MAAa,gBAAgB,WAAmC;CAC9D,MAAM,SAAS,OAAO,MAAqC,WAAyB;EAClF,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,mBAAmB,EAAE,KAAK,GAAG,EAAE,OAAO,CAAC;EAC1E,OAAO;CACT;CAEA,MAAM,UAAU,OAAO,MAAsC,WAAyB;EACpF,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,2BAA2B,EAAE,KAAK,GAAG,EAAE,OAAO,CAAC;EAClF,OAAO;CACT;CAEA,MAAM,WAAW,OAAO,MAAuC,WAAyB;EACtF,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,yBAAyB,EAAE,KAAK,GAAG,EAAE,OAAO,CAAC;EAChF,OAAO;CACT;CAEA,OAAO;EAAE;EAAQ;EAAS;CAAS;AACrC;;;ACvBA,MAAa,mBAAmBA,IAAE,OAAO;CACvC,OAAOA,IAAE,MAAM;CACf,UAAUA,IAAE,OAAO,CAAC,CAAC,IAAI,GAAG,UAAU;AACxC,CAAC;AAED,MAAa,kBAAkBA,IAAE,OAAO;CACtC,WAAWA,IAAE,KAAK,CAAC,UAAU,WAAW,CAAC;CACzC,SAASA,IAAE,OAAO,CAAC,CAAC,IAAI,GAAG,UAAU;AACvC,CAAC;AAKD,MAAM,aAAaA,IAAE,OAAO;CAC1B,IAAIA,IAAE,OAAO;CACb,OAAOA,IAAE,OAAO;CAChB,MAAMA,IAAE,OAAO;AACjB,CAAC;AAID,MAAa,qBAAqBA,IAAE,OAAO;CACzC,aAAaA,IAAE,QAAQ,KAAK,CAAC,CAAC,QAAQ,KAAK;CAC3C,aAAaA,IAAE,OA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EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA,OAAO,YAAY,MAAM;EACzB,KAAK,UAAU,MAAM;EACrB,UAAU,eAAe,MAAM;EAC/B,MAAM,WAAW,MAAM;EACvB,KAAK,UAAU,MAAM;EACrB,QAAQ,aAAa,MAAM;EAC3B,MAAM,WAAW,MAAM;EACvB,MAAM,WAAW,MAAM;EACvB,SAAS,cAAc,MAAM;EAC7B,OAAO,YAAY,MAAM;EACzB,UAAU,eAAe,MAAM;CACjC;AACF"}
@@ -1,6 +1,7 @@
1
- import { o as HttpHeader } from "./createFetchClient-BK0TZK-U.js";
2
- import { t as createGenericFetchClient } from "./createGenericFetchClient-CVZYekDk.js";
3
- import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-B5U1fCHS.js";
1
+ import { o as HttpHeader } from "./createFetchClient-B1h3-p65.js";
2
+ import { t as validateConnectionStatus } from "./validateConnectionStatus-CBhXmvWC.js";
3
+ import { t as createGenericFetchClient } from "./createGenericFetchClient-DhpvUSlX.js";
4
+ import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-0_oqhdPv.js";
4
5
  import * as z$1 from "zod";
5
6
  //#region src/clients/auth/device/device.ts
6
7
  const createDevice = (client) => {
@@ -46,12 +47,27 @@ const loginSuccessSchema = z$1.object({
46
47
  sessionId: z$1.string(),
47
48
  user: userSchema
48
49
  });
50
+ /**
51
+ * MFA-challenge shape. `mfaRequired` is always true here — it is the discriminant.
52
+ *
53
+ * - `mfaType` is the account's single active factor, `allowedMethods` everything that may satisfy
54
+ * it. Both stay `string`: a stack that grows a method must not fail to parse, so callers branch
55
+ * and handle the unknown case themselves.
56
+ * - `webauthn` carries the serialized `PublicKeyCredentialRequestOptionsJSON` for a passkey
57
+ * challenge, inlined so the ceremony costs no extra round-trip. The spec declares it
58
+ * required-and-nullable while the serializer omits the key outright for TOTP, so it must tolerate
59
+ * present, `null` and absent alike.
60
+ * - `unknown`, not a record: this sits inside the union `login` hard-parses, so a shape nobody
61
+ * expected here would fail *both* branches and lock every MFA user out of sign-in — not merely
62
+ * out of the passkey path. Whoever runs the ceremony validates it properly instead.
63
+ */
49
64
  const mfaChallengeSchema = z$1.object({
50
65
  mfaRequired: z$1.literal(true),
51
66
  mfaType: z$1.string(),
52
67
  mfaToken: z$1.string(),
53
68
  expiresIn: z$1.number(),
54
- allowedMethods: z$1.array(z$1.string())
69
+ allowedMethods: z$1.array(z$1.string()),
70
+ webauthn: z$1.unknown().optional()
55
71
  });
56
72
  const loginResultSchema = z$1.union([loginSuccessSchema, mfaChallengeSchema]);
57
73
  //#endregion
@@ -90,9 +106,23 @@ const createLogin = (client) => {
90
106
  };
91
107
  //#endregion
92
108
  //#region src/clients/auth/mfa/schemas.ts
109
+ /**
110
+ * The methods `POST /v1/auth/mfa` accepts, and the vocabulary a login challenge reports in
111
+ * `mfaType` / `allowedMethods`.
112
+ *
113
+ * - `totp` and `recoveryCode` are verified by a typed code; `webauthn` by an assertion.
114
+ * - `satisfies` binds the values to the generated spec, so a regenerated schema that renames or
115
+ * drops a method fails the build here rather than at runtime mid-sign-in.
116
+ * - A challenge may still name a method absent from here, so the wire fields stay `string`.
117
+ */
118
+ const MFA_METHOD = {
119
+ totp: "totp",
120
+ webauthn: "webauthn",
121
+ recoveryCode: "recovery_code"
122
+ };
93
123
  const mfaCodeInputSchema = z$1.object({
94
124
  mfaToken: z$1.string(),
95
- type: z$1.enum(["totp", "recovery_code"]),
125
+ type: z$1.enum([MFA_METHOD.totp, MFA_METHOD.recoveryCode]),
96
126
  code: z$1.string().min(1, "Required")
97
127
  });
98
128
  const mfaWebauthnInputSchema = z$1.object({
@@ -122,7 +152,7 @@ const createMfa = (client) => {
122
152
  const { mfaToken, assertion } = mfaWebauthnInputSchema.parse(input);
123
153
  return _verify({
124
154
  mfaToken,
125
- type: "webauthn",
155
+ type: MFA_METHOD.webauthn,
126
156
  assertion
127
157
  }, signal);
128
158
  };
@@ -298,15 +328,49 @@ const createToken = (client) => {
298
328
  };
299
329
  };
300
330
  //#endregion
331
+ //#region src/clients/auth/webauthn/webauthn.ts
332
+ const createWebauthn = (client) => {
333
+ const getAll = async (signal) => {
334
+ const { data } = await client.get("/v1/auth/webauthn", {}, { signal });
335
+ return data;
336
+ };
337
+ const registerOptions = async (signal) => {
338
+ const { data } = await client.post("/v1/auth/webauthn/register/options", {}, { signal });
339
+ return data;
340
+ };
341
+ const register = async ({ credential, deviceName = null, revokeOtherSessions = false }, signal) => {
342
+ const { data } = await client.post("/v1/auth/webauthn/register", { body: {
343
+ credential,
344
+ deviceName,
345
+ revokeOtherSessions
346
+ } }, { signal });
347
+ return data;
348
+ };
349
+ const remove = async ({ id, ...query }, signal) => {
350
+ await client.delete("/v1/auth/webauthn/{id}", {
351
+ path: { id },
352
+ query
353
+ }, { signal });
354
+ };
355
+ return {
356
+ getAll,
357
+ registerOptions,
358
+ register,
359
+ remove
360
+ };
361
+ };
362
+ //#endregion
301
363
  //#region src/clients/auth/authClient.ts
302
364
  const createAuthClient = ({ baseUrl, middlewares }) => {
303
365
  const client = createOpenapiFetchClient({
304
366
  baseUrl,
305
- middlewares
367
+ middlewares,
368
+ validateStatus: validateConnectionStatus
306
369
  });
307
370
  const genericClient = createGenericFetchClient({
308
371
  baseUrl,
309
- middlewares
372
+ middlewares,
373
+ validateStatus: validateConnectionStatus
310
374
  });
311
375
  const healthCheck = async (signal) => {
312
376
  const { data } = await genericClient.get("/health-check", {}, { signal });
@@ -323,10 +387,11 @@ const createAuthClient = ({ baseUrl, middlewares }) => {
323
387
  sudo: createSudo(client),
324
388
  pkce: createPkce(client),
325
389
  session: createSession(client),
326
- token: createToken(client)
390
+ token: createToken(client),
391
+ webauthn: createWebauthn(client)
327
392
  };
328
393
  };
329
394
  //#endregion
330
- export { mfaCodeInputSchema as a, loginInputSchema as c, mfaChallengeSchema as d, oidcInputSchema as f, resetRequestInputSchema as i, loginResultSchema as l, changeInputSchema as n, mfaWebauthnInputSchema as o, resetInputSchema as r, totpVerifyInputSchema as s, createAuthClient as t, loginSuccessSchema as u };
395
+ export { MFA_METHOD as a, totpVerifyInputSchema as c, loginSuccessSchema as d, mfaChallengeSchema as f, resetRequestInputSchema as i, loginInputSchema as l, changeInputSchema as n, mfaCodeInputSchema as o, oidcInputSchema as p, resetInputSchema as r, mfaWebauthnInputSchema as s, createAuthClient as t, loginResultSchema as u };
331
396
 
332
- //# sourceMappingURL=authClient-DOk6VKdV.js.map
397
+ //# sourceMappingURL=authClient-XBAUz9g-.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authClient-XBAUz9g-.js","names":["z","z","z"],"sources":["../src/clients/auth/device/device.ts","../src/clients/auth/login/schemas.ts","../src/clients/auth/login/login.ts","../src/clients/auth/mfa/schemas.ts","../src/clients/auth/mfa/mfa.ts","../src/clients/auth/password/schemas.ts","../src/clients/auth/password/password.ts","../src/clients/auth/pat/pat.ts","../src/clients/auth/pkce/pkce.ts","../src/clients/auth/saml/saml.ts","../src/clients/auth/session/session.ts","../src/clients/auth/sudo/sudo.ts","../src/clients/auth/token/token.ts","../src/clients/auth/webauthn/webauthn.ts","../src/clients/auth/authClient.ts"],"sourcesContent":["import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type {\n ApproveDeviceAuthorizationBody,\n CreateDeviceAuthorizationBody,\n GetDeviceAuthorizationTokenBody,\n} from './types';\n\nexport const createDevice = (client: AuthOpenApiFetchClient) => {\n const create = async (body: CreateDeviceAuthorizationBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/device', { body }, { signal });\n return data;\n };\n\n const approve = async (body: ApproveDeviceAuthorizationBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/device/approve', { body }, { signal });\n return data;\n };\n\n const getToken = async (body: GetDeviceAuthorizationTokenBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/device/token', { body }, { signal });\n return data;\n };\n\n return { create, approve, getToken };\n};\n","import * as z from 'zod';\n\nexport const loginInputSchema = z.object({\n email: z.email(),\n password: z.string().min(1, 'Required'),\n});\n\nexport const oidcInputSchema = z.object({\n grantType: z.enum(['google', 'microsoft']),\n idToken: z.string().min(1, 'Required'),\n});\n\nexport type LoginInput = z.infer<typeof loginInputSchema>;\nexport type OidcInput = z.infer<typeof oidcInputSchema>;\n\nconst userSchema = z.object({\n id: z.number(),\n email: z.string(),\n name: z.string(),\n});\n\n// Success shape. The backend omits `mfaRequired` here, so we inject a `false`\n// literal to make the outcome a discriminated union on `mfaRequired`.\nexport const loginSuccessSchema = z.object({\n mfaRequired: z.literal(false).default(false),\n accessToken: z.string(),\n refreshToken: z.string(),\n tokenType: z.string(),\n expiresIn: z.number(),\n sessionId: z.string(),\n user: userSchema,\n});\n\n/**\n * MFA-challenge shape. `mfaRequired` is always true here — it is the discriminant.\n *\n * - `mfaType` is the account's single active factor, `allowedMethods` everything that may satisfy\n * it. Both stay `string`: a stack that grows a method must not fail to parse, so callers branch\n * and handle the unknown case themselves.\n * - `webauthn` carries the serialized `PublicKeyCredentialRequestOptionsJSON` for a passkey\n * challenge, inlined so the ceremony costs no extra round-trip. The spec declares it\n * required-and-nullable while the serializer omits the key outright for TOTP, so it must tolerate\n * present, `null` and absent alike.\n * - `unknown`, not a record: this sits inside the union `login` hard-parses, so a shape nobody\n * expected here would fail *both* branches and lock every MFA user out of sign-in — not merely\n * out of the passkey path. Whoever runs the ceremony validates it properly instead.\n */\nexport const mfaChallengeSchema = z.object({\n mfaRequired: z.literal(true),\n mfaType: z.string(),\n mfaToken: z.string(),\n expiresIn: z.number(),\n allowedMethods: z.array(z.string()),\n // `.optional()` explicitly: zod 4 dropped zod 3's implicit optionality for `z.unknown()`, so\n // without it a TOTP challenge — which omits the key — fails to parse and blocks sign-in.\n webauthn: z.unknown().optional(),\n});\n\nexport const loginResultSchema = z.union([loginSuccessSchema, mfaChallengeSchema]);\n\nexport type LoginUser = z.infer<typeof userSchema>;\nexport type LoginSuccess = z.infer<typeof loginSuccessSchema>;\nexport type MfaChallenge = z.infer<typeof mfaChallengeSchema>;\nexport type LoginResult = z.infer<typeof loginResultSchema>;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { LoginInput, OidcInput } from './schemas';\nimport { loginInputSchema, loginResultSchema, oidcInputSchema } from './schemas';\nimport type { LoginBody } from './types';\n\nexport const createLogin = (client: AuthOpenApiFetchClient) => {\n const _login = async (body: LoginBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/login', { body }, { signal });\n return data;\n };\n\n const withPassword = async (input: LoginInput, signal?: AbortSignal) => {\n const { email, password } = loginInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login({ grantType: 'password', email, password } as LoginBody, signal);\n // Validate against our own schema — the generated response type is unreliable,\n // and this narrows the outcome to a discriminated union on `mfaRequired`.\n return loginResultSchema.parse(data);\n };\n\n const withOidc = async (input: OidcInput, signal?: AbortSignal) => {\n const { grantType, idToken } = oidcInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login({ grantType, idToken } as LoginBody, signal);\n return loginResultSchema.parse(data);\n };\n\n // Unauthenticated. Carries the public OAuth client ids `withOidc` callers mint an id token with.\n const methods = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/methods', {}, { signal });\n return data;\n };\n\n return { withPassword, withOidc, methods };\n};\n","import * as z from 'zod';\n\nimport type { components } from '../__generated__/schema';\n\n/**\n * The methods `POST /v1/auth/mfa` accepts, and the vocabulary a login challenge reports in\n * `mfaType` / `allowedMethods`.\n *\n * - `totp` and `recoveryCode` are verified by a typed code; `webauthn` by an assertion.\n * - `satisfies` binds the values to the generated spec, so a regenerated schema that renames or\n * drops a method fails the build here rather than at runtime mid-sign-in.\n * - A challenge may still name a method absent from here, so the wire fields stay `string`.\n */\nexport const MFA_METHOD = {\n totp: 'totp',\n webauthn: 'webauthn',\n recoveryCode: 'recovery_code',\n} as const satisfies Record<string, components['schemas']['MfaRequest']['type']>;\n\nexport type MfaMethod = (typeof MFA_METHOD)[keyof typeof MFA_METHOD];\n\nexport const mfaCodeInputSchema = z.object({\n mfaToken: z.string(),\n type: z.enum([MFA_METHOD.totp, MFA_METHOD.recoveryCode]),\n code: z.string().min(1, 'Required'),\n});\n\nexport const mfaWebauthnInputSchema = z.object({\n mfaToken: z.string(),\n assertion: z.string(),\n});\n\nexport const totpVerifyInputSchema = z.object({\n code: z.string().min(1, 'Required'),\n // Optional in the spec, but `openapi-typescript` emits every `default`-bearing property as\n // required — the schema fills in the backend's own default so callers may still omit it. Set true\n // to sign the admin out everywhere else as part of enrolling.\n revokeOtherSessions: z.boolean().default(false),\n});\n\nexport type MfaCodeInput = z.infer<typeof mfaCodeInputSchema>;\nexport type MfaWebauthnInput = z.infer<typeof mfaWebauthnInputSchema>;\n// `z.input`: callers may omit `revokeOtherSessions` (the default fills it in on parse).\nexport type TotpVerifyInput = z.input<typeof totpVerifyInputSchema>;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { MfaCodeInput, MfaWebauthnInput, TotpVerifyInput } from './schemas';\nimport {\n MFA_METHOD,\n mfaCodeInputSchema,\n mfaWebauthnInputSchema,\n totpVerifyInputSchema,\n} from './schemas';\nimport type { DisableTotpPath, VerifyMfaBody } from './types';\n\nexport const createMfa = (client: AuthOpenApiFetchClient) => {\n const _verify = async (body: VerifyMfaBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/mfa', { body }, { signal });\n return data;\n };\n\n const verifyWithCode = async (input: MfaCodeInput, signal?: AbortSignal) => {\n const { mfaToken, type, code } = mfaCodeInputSchema.parse(input);\n // Cast: omit fields outside the type — the backend rejects null.\n return _verify({ mfaToken, type, code } as VerifyMfaBody, signal);\n };\n\n const verifyWithWebauthn = async (input: MfaWebauthnInput, signal?: AbortSignal) => {\n const { mfaToken, assertion } = mfaWebauthnInputSchema.parse(input);\n // Cast: omit fields outside the type — the backend rejects null.\n return _verify({ mfaToken, type: MFA_METHOD.webauthn, assertion } as VerifyMfaBody, signal);\n };\n\n const regenerateRecoveryCodes = async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/mfa/recovery-codes', {}, { signal });\n return data;\n };\n\n // TOTP enrollment for the signed-in user (account MFA management). `setup` returns the shared\n // secret + `otpauthUri` to render as a QR; `verify` confirms the first code and hands back the\n // one-time recovery codes plus the new factor `id`; `disable` removes a factor by that `id`.\n const totp = {\n setup: async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/mfa/totp', {}, { signal });\n return data;\n },\n verify: async (input: TotpVerifyInput, signal?: AbortSignal) => {\n const body = totpVerifyInputSchema.parse(input);\n const { data } = await client.post('/v1/auth/mfa/totp/verify', { body }, { signal });\n return data;\n },\n disable: async (id: DisableTotpPath['id'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/mfa/totp/{id}', { path: { id } }, { signal });\n },\n };\n\n return { verifyWithCode, verifyWithWebauthn, regenerateRecoveryCodes, totp };\n};\n","import * as z from 'zod';\n\nexport const resetRequestInputSchema = z.object({\n email: z.email(),\n});\n\nexport const resetInputSchema = z.object({\n // The single-use reset token (`kbc_pr_…`) delivered by e-mail.\n token: z.string().min(1, 'Required'),\n newPassword: z.string().min(1, 'Required'),\n // Revoke every session after the reset. Defaults to true (the backend's own default), so callers\n // may omit it; set false only to keep existing sessions alive. Password policy is backend-enforced.\n revokeSessions: z.boolean().default(true),\n});\n\nexport const changeInputSchema = z.object({\n currentPassword: z.string().min(1, 'Required'),\n newPassword: z.string().min(1, 'Required'),\n // Revoke every other session once the password changes. The schema fills in `true` on parse, so\n // the SDK always sends the field (matching the backend's own default); callers may omit it. Set\n // false only to keep the other sessions alive.\n revokeOtherSessions: z.boolean().default(true),\n});\n\nexport type ResetRequestInput = z.infer<typeof resetRequestInputSchema>;\n// `z.input`, not `z.infer`: callers may omit `revokeSessions` (the default fills it in on parse).\nexport type ResetInput = z.input<typeof resetInputSchema>;\n// `z.input`: callers may omit `revokeOtherSessions` (the default fills it in on parse).\nexport type ChangePasswordInput = z.input<typeof changeInputSchema>;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { ChangePasswordInput, ResetInput, ResetRequestInput } from './schemas';\nimport { changeInputSchema, resetInputSchema, resetRequestInputSchema } from './schemas';\n\nexport const createPassword = (client: AuthOpenApiFetchClient) => {\n // Fire-and-forget from the caller's view: the backend always answers 202 and reveals nothing about\n // whether the account exists. Resolves on 202; rejects on 429 (rate limited) or 400.\n const resetRequest = async (input: ResetRequestInput, signal?: AbortSignal) => {\n const body = resetRequestInputSchema.parse(input);\n await client.post('/v1/auth/password/reset-request', { body }, { signal });\n };\n\n // Applies the new password for the given reset token. Resolves on 204; rejects on 400 (invalid or\n // expired token, or a password that violates the policy).\n const reset = async (input: ResetInput, signal?: AbortSignal) => {\n // `revokeSessions` is defaulted by the schema, so the parsed body always carries all three\n // fields the endpoint requires — no field omission, no type assertion.\n const body = resetInputSchema.parse(input);\n await client.post('/v1/auth/password/reset', { body }, { signal });\n };\n\n // Changes the password for the signed-in user (bearer session). Resolves on 204; rejects on 400\n // (wrong current password, or a new password that violates the policy). Password policy is\n // backend-enforced.\n const change = async (input: ChangePasswordInput, signal?: AbortSignal) => {\n const body = changeInputSchema.parse(input);\n await client.post('/v1/auth/password/change', { body }, { signal });\n };\n\n return { resetRequest, reset, change };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { CreatePatBody, ExchangePatBody, RevokePatPath } from './types';\n\nexport const createPat = (client: AuthOpenApiFetchClient) => {\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/pat', {}, { signal });\n return data;\n };\n\n const create = async (body: CreatePatBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/pat', { body }, { signal });\n return data;\n };\n\n const exchange = async (body?: ExchangePatBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/pat/exchange', { body }, { signal });\n return data;\n };\n\n const revoke = async (id: RevokePatPath['id'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/pat/{id}', { path: { id } }, { signal });\n };\n\n return { create, exchange, revoke, getAll };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { GetPkceTokenBody } from './types';\n\nexport const createPkce = (client: AuthOpenApiFetchClient) => {\n const getToken = async (body: GetPkceTokenBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/pkce/token', { body }, { signal });\n return data;\n };\n\n return { getToken };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { AssertSamlBody, InitiateSamlBody } from './types';\n\nexport const createSaml = (client: AuthOpenApiFetchClient) => {\n const assert = async (body: AssertSamlBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/saml/assert', { body }, { signal });\n return data;\n };\n\n const initiate = async (body?: InitiateSamlBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/saml/initiate', { body }, { signal });\n return data;\n };\n\n return { assert, initiate };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { RevokeSessionPath } from './types';\n\nexport const createSession = (client: AuthOpenApiFetchClient) => {\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/sessions', {}, { signal });\n return data;\n };\n\n const revoke = async (sessionId: RevokeSessionPath['sessionId'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/sessions/{sessionId}', { path: { sessionId } }, { signal });\n };\n\n const revokeAll = async (signal?: AbortSignal) => {\n await client.delete('/v1/auth/sessions', {}, { signal });\n };\n\n return { getAll, revoke, revokeAll };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { SudoBody, SudoBodyRaw } from './types';\n\nexport const createSudo = (client: AuthOpenApiFetchClient) => {\n const verify = async (body: SudoBody, signal?: AbortSignal) => {\n // The generated request body (`SudoBodyRaw`) describes a payload the endpoint rejects — see the\n // `SudoBody` docs. Assert at this one boundary rather than making every caller send the invalid\n // shape; the real fix is the `#[OA\\Schema]`-vs-object mismatch on the backend, upstream of the\n // generated schema. Same pattern as `syncActionsClient`'s `PostActionsBodyRaw`.\n const { data } = await client.post(\n '/v1/auth/sudo',\n { body: body as unknown as SudoBodyRaw },\n { signal },\n );\n return data;\n };\n\n const challenge = async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/sudo/challenge', {}, { signal });\n return data;\n };\n\n return { verify, challenge };\n};\n","import { HttpHeader } from '../../../fetchClient';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { RevokeTokenBody } from './types';\n\nexport const createToken = (client: AuthOpenApiFetchClient) => {\n const refresh = async (refreshToken: string, signal?: AbortSignal) => {\n const { data } = await client.post(\n '/v1/auth/token/refresh',\n { body: { refreshToken } },\n { signal },\n );\n\n return data;\n };\n\n /**\n * Introspects an authenticated session token.\n *\n * @param token - Optional token to introspect (`Authorization: Bearer`); a middleware-set header wins.\n */\n const introspect = async (token?: string, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/v1/auth/token/introspect',\n {},\n { signal, headers: token ? { [HttpHeader.AUTHORIZATION]: `Bearer ${token}` } : undefined },\n );\n return data;\n };\n\n const revoke = async (body: RevokeTokenBody, signal?: AbortSignal) => {\n await client.post('/v1/auth/token/revoke', { body }, { signal });\n };\n\n return { refresh, introspect, revoke };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type {\n RegisterWebauthnInput,\n RegisterWebauthnOptionsResult,\n RemoveWebauthnInput,\n} from './types';\n\nexport const createWebauthn = (client: AuthOpenApiFetchClient) => {\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/webauthn', {}, { signal });\n return data;\n };\n\n const registerOptions = async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/webauthn/register/options', {}, { signal });\n // Cast: the spec types the free-form `options` object as `Record<string, never>`.\n return data as RegisterWebauthnOptionsResult;\n };\n\n const register = async (\n { credential, deviceName = null, revokeOtherSessions = false }: RegisterWebauthnInput,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/v1/auth/webauthn/register',\n { body: { credential, deviceName, revokeOtherSessions } },\n { signal },\n );\n return data;\n };\n\n // `revokeOtherSessions` signs every other session out along with the credential — the calling\n // session and personal access tokens survive. Omitted means the backend's own `false`.\n const remove = async ({ id, ...query }: RemoveWebauthnInput, signal?: AbortSignal) => {\n await client.delete('/v1/auth/webauthn/{id}', { path: { id }, query }, { signal });\n };\n\n return { getAll, registerOptions, register, remove };\n};\n","import { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport type { ClientInitOptions } from '../types';\nimport { validateConnectionStatus } from '../validateConnectionStatus';\n\nimport type { paths } from './__generated__/schema';\nimport { createDevice } from './device';\nimport { createLogin } from './login';\nimport { createMfa } from './mfa';\nimport { createPassword } from './password';\nimport { createPat } from './pat';\nimport { createPkce } from './pkce';\nimport { createSaml } from './saml';\nimport { createSession } from './session';\nimport { createSudo } from './sudo';\nimport { createToken } from './token';\nimport { createWebauthn } from './webauthn';\n\nexport type AuthClientInitOptions = Omit<ClientInitOptions, 'auth'>;\n\nexport type AuthOpenApiFetchClient = ReturnType<typeof createOpenapiFetchClient<paths>>;\n\nexport const createAuthClient = ({ baseUrl, middlewares }: AuthClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n validateStatus: validateConnectionStatus,\n });\n const genericClient = createGenericFetchClient({\n baseUrl,\n middlewares,\n validateStatus: validateConnectionStatus,\n });\n\n // Host-level: Connection serves the storage, management and auth APIs off one baseUrl, so this\n // probes the host, not this API's prefix — `/v2/storage/health-check`, `/manage/health-check`\n // and `/v1/auth/health-check` all 404.\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 login: createLogin(client),\n mfa: createMfa(client),\n password: createPassword(client),\n saml: createSaml(client),\n pat: createPat(client),\n device: createDevice(client),\n sudo: createSudo(client),\n pkce: createPkce(client),\n session: createSession(client),\n token: createToken(client),\n webauthn: createWebauthn(client),\n };\n};\n"],"mappings":";;;;;;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EAC7B,OAAO,YAAY,MAAM;EACzB,UAAU,eAAe,MAAM;CACjC;AACF"}
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_createFetchClient = require("../createFetchClient-BsG719K1.cjs");
3
- const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-Cr90VXY4.cjs");
4
- const require_auth = require("../auth-5HCvCsZO.cjs");
2
+ const require_createFetchClient = require("../createFetchClient-B9Cv0W9f.cjs");
3
+ const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-yirrW6Tg.cjs");
4
+ const require_auth = require("../auth-DmgTH0uY.cjs");
5
5
  const require_chat_suggestions = require("./suggestions.cjs");
6
6
  let zod = require("zod");
7
7
  //#region src/clients/chat/chatClient.ts
@@ -1,5 +1,5 @@
1
- import { n as ClientInitOptions } from "../types-C8XiTXxi.cjs";
2
- import { C as VoteRequest, E as components, S as Vote, _ as UpdateAgentSettingsRequest, a as ChatRequest, b as UserAgentSettings, c as GetChatPath, g as ToolsListResponse, l as GetHistoryQuery, t as AgentSettings, u as GetVotesQuery, v as UpdateUserAgentSettingsRequest, y as UsageResponse } from "../types-BO-mTxKb.cjs";
1
+ import { n as ClientInitOptions } from "../types-BdKtW2Ml.cjs";
2
+ import { C as VoteRequest, E as components, S as Vote, _ as UpdateAgentSettingsRequest, a as ChatRequest, b as UserAgentSettings, c as GetChatPath, g as ToolsListResponse, l as GetHistoryQuery, t as AgentSettings, u as GetVotesQuery, v as UpdateUserAgentSettingsRequest, y as UsageResponse } from "../types-eP06LqcE.cjs";
3
3
  import { d as SuggestionsApiResponse, f as SuggestionsRequestBody } from "../suggestions-BH3x7xU7.cjs";
4
4
  //#region src/clients/chat/chatClient.d.ts
5
5
  type ChatClientOptions = ClientInitOptions & {
@@ -1,5 +1,5 @@
1
- import { n as ClientInitOptions } from "../types-7H6Dnz0Y.js";
2
- import { C as VoteRequest, E as components, S as Vote, _ as UpdateAgentSettingsRequest, a as ChatRequest, b as UserAgentSettings, c as GetChatPath, g as ToolsListResponse, l as GetHistoryQuery, t as AgentSettings, u as GetVotesQuery, v as UpdateUserAgentSettingsRequest, y as UsageResponse } from "../types-D2n3h1gp.js";
1
+ import { n as ClientInitOptions } from "../types-SX78XZZ0.js";
2
+ import { C as VoteRequest, E as components, S as Vote, _ as UpdateAgentSettingsRequest, a as ChatRequest, b as UserAgentSettings, c as GetChatPath, g as ToolsListResponse, l as GetHistoryQuery, t as AgentSettings, u as GetVotesQuery, v as UpdateUserAgentSettingsRequest, y as UsageResponse } from "../types-BvXODdf5.js";
3
3
  import { d as SuggestionsApiResponse, f as SuggestionsRequestBody } from "../suggestions-BH3x7xU7.js";
4
4
  //#region src/clients/chat/chatClient.d.ts
5
5
  type ChatClientOptions = ClientInitOptions & {
@@ -1,6 +1,6 @@
1
- import { f as KeboolaHttpHeader } from "../createFetchClient-BK0TZK-U.js";
2
- import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-B5U1fCHS.js";
3
- import { t as createAuthHeaders } from "../auth-D2jfNlpX.js";
1
+ import { p as KeboolaHttpHeader } from "../createFetchClient-B1h3-p65.js";
2
+ import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-0_oqhdPv.js";
3
+ import { t as createAuthHeaders } from "../auth-CE6Hlc9W.js";
4
4
  import { suggestionsApiResponseSchema } from "./suggestions.js";
5
5
  import { z } from "zod";
6
6
  //#region src/clients/chat/chatClient.ts
@@ -1,2 +1,2 @@
1
- import { C as VoteRequest, S as Vote, T as askUserQuestionAnswersSchema, _ as UpdateAgentSettingsRequest, a as ChatRequest, b as UserAgentSettings, c as GetChatPath, d as HistoryResponse, f as MessageStatus, g as ToolsListResponse, h as ToolPermissionValue, i as ChatMessage, l as GetHistoryQuery, m as ToolInfo, n as AskUserQuestionAnswers, o as ChatWithMessage, p as TextPart, r as Chat, s as ChatWithMessages, t as AgentSettings, u as GetVotesQuery, v as UpdateUserAgentSettingsRequest, w as VotesResponse, x as UserMessage, y as UsageResponse } from "../types-BO-mTxKb.cjs";
1
+ import { C as VoteRequest, S as Vote, T as askUserQuestionAnswersSchema, _ as UpdateAgentSettingsRequest, a as ChatRequest, b as UserAgentSettings, c as GetChatPath, d as HistoryResponse, f as MessageStatus, g as ToolsListResponse, h as ToolPermissionValue, i as ChatMessage, l as GetHistoryQuery, m as ToolInfo, n as AskUserQuestionAnswers, o as ChatWithMessage, p as TextPart, r as Chat, s as ChatWithMessages, t as AgentSettings, u as GetVotesQuery, v as UpdateUserAgentSettingsRequest, w as VotesResponse, x as UserMessage, y as UsageResponse } from "../types-eP06LqcE.cjs";
2
2
  export { AgentSettings, AskUserQuestionAnswers, Chat, ChatMessage, ChatRequest, ChatWithMessage, ChatWithMessages, GetChatPath, GetHistoryQuery, GetVotesQuery, HistoryResponse, MessageStatus, TextPart, ToolInfo, ToolPermissionValue, ToolsListResponse, UpdateAgentSettingsRequest, UpdateUserAgentSettingsRequest, UsageResponse, UserAgentSettings, UserMessage, Vote, VoteRequest, VotesResponse, askUserQuestionAnswersSchema };
@@ -1,2 +1,2 @@
1
- import { C as VoteRequest, S as Vote, T as askUserQuestionAnswersSchema, _ as UpdateAgentSettingsRequest, a as ChatRequest, b as UserAgentSettings, c as GetChatPath, d as HistoryResponse, f as MessageStatus, g as ToolsListResponse, h as ToolPermissionValue, i as ChatMessage, l as GetHistoryQuery, m as ToolInfo, n as AskUserQuestionAnswers, o as ChatWithMessage, p as TextPart, r as Chat, s as ChatWithMessages, t as AgentSettings, u as GetVotesQuery, v as UpdateUserAgentSettingsRequest, w as VotesResponse, x as UserMessage, y as UsageResponse } from "../types-D2n3h1gp.js";
1
+ import { C as VoteRequest, S as Vote, T as askUserQuestionAnswersSchema, _ as UpdateAgentSettingsRequest, a as ChatRequest, b as UserAgentSettings, c as GetChatPath, d as HistoryResponse, f as MessageStatus, g as ToolsListResponse, h as ToolPermissionValue, i as ChatMessage, l as GetHistoryQuery, m as ToolInfo, n as AskUserQuestionAnswers, o as ChatWithMessage, p as TextPart, r as Chat, s as ChatWithMessages, t as AgentSettings, u as GetVotesQuery, v as UpdateUserAgentSettingsRequest, w as VotesResponse, x as UserMessage, y as UsageResponse } from "../types-BvXODdf5.js";
2
2
  export { AgentSettings, AskUserQuestionAnswers, Chat, ChatMessage, ChatRequest, ChatWithMessage, ChatWithMessages, GetChatPath, GetHistoryQuery, GetVotesQuery, HistoryResponse, MessageStatus, TextPart, ToolInfo, ToolPermissionValue, ToolsListResponse, UpdateAgentSettingsRequest, UpdateUserAgentSettingsRequest, UsageResponse, UserAgentSettings, UserMessage, Vote, VoteRequest, VotesResponse, askUserQuestionAnswersSchema };
@@ -1,10 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_constants = require("../constants-CqyyBkXW.cjs");
2
+ const require_constants = require("../constants-CkAVvuUq.cjs");
3
3
  const require_adminRoles = require("../adminRoles-CO7J5qAy.cjs");
4
4
  const require_componentId = require("../componentId-DkyQ8PM0.cjs");
5
5
  exports.AdminRole = require_adminRoles.AdminRole;
6
6
  exports.Backend = require_constants.Backend;
7
7
  exports.ComponentId = require_componentId.ComponentId;
8
+ exports.Continent = require_constants.Continent;
8
9
  exports.ProjectFeature = require_constants.ProjectFeature;
10
+ exports.Provider = require_constants.Provider;
9
11
  exports.STACKS = require_constants.STACKS;
10
12
  exports.URLS = require_constants.URLS;
@@ -1,4 +1,4 @@
1
1
  import { t as AdminRole } from "../adminRoles-C696kD_U.cjs";
2
2
  import { t as Backend } from "../backends-DKBz5OxE.cjs";
3
- import { a as STACKS, i as Provider, n as Continent, o as ProjectFeature, r as KeboolaStack, s as ComponentId, t as URLS } from "../index-vb9Rfqca.cjs";
4
- export { AdminRole, Backend, ComponentId, type Continent, type KeboolaStack, ProjectFeature, type Provider, STACKS, URLS };
3
+ import { a as STACKS, i as Provider, n as Continent, o as ProjectFeature, r as KeboolaStack, s as ComponentId, t as URLS } from "../index--pxLseaw.cjs";
4
+ export { AdminRole, Backend, ComponentId, Continent, type KeboolaStack, ProjectFeature, Provider, STACKS, URLS };