@keboola/api-client 51.0.0 → 53.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.
- package/AGENTS.md +74 -9
- package/API-SURFACE.md +4 -10
- package/CHANGELOG.md +43 -0
- package/README.md +3 -3
- package/dist/{ManagementSessionMintError-DNMbYauw.js → ManagementSessionMintError-BMHDcEqV.js} +2 -2
- package/dist/{ManagementSessionMintError-DNMbYauw.js.map → ManagementSessionMintError-BMHDcEqV.js.map} +1 -1
- package/dist/{ManagementSessionMintError-ByOulHQH.cjs → ManagementSessionMintError-Bc9bc7Ai.cjs} +2 -2
- package/dist/{ManagementSessionMintError-ByOulHQH.cjs.map → ManagementSessionMintError-Bc9bc7Ai.cjs.map} +1 -1
- package/dist/RowLevelSecurityError-CObFqj3E.js +33 -0
- package/dist/RowLevelSecurityError-CObFqj3E.js.map +1 -0
- package/dist/RowLevelSecurityError-RK_NhhAx.cjs +56 -0
- package/dist/RowLevelSecurityError-RK_NhhAx.cjs.map +1 -0
- package/dist/{adminRoles-FFyl7Dyx.d.cts → adminRoles-BTKVwEy8.d.cts} +2 -2
- package/dist/{adminRoles-DAwl657q.d.ts → adminRoles-Cm513r1G.d.ts} +2 -2
- package/dist/ai/index.cjs +2 -2
- package/dist/ai/index.d.cts +2 -2
- package/dist/ai/index.d.ts +2 -2
- package/dist/ai/index.js +2 -2
- package/dist/ai/types.d.cts +1 -1
- package/dist/ai/types.d.ts +1 -1
- package/dist/apps/index.cjs +3 -234
- package/dist/apps/index.d.cts +3 -221
- package/dist/apps/index.d.ts +3 -221
- package/dist/apps/index.js +1 -234
- package/dist/apps/types.d.cts +1 -2
- package/dist/apps/types.d.ts +1 -2
- package/dist/apps-BN7fWtSm.js +361 -0
- package/dist/apps-BN7fWtSm.js.map +1 -0
- package/dist/apps-C1x5IKNQ.cjs +376 -0
- package/dist/apps-C1x5IKNQ.cjs.map +1 -0
- package/dist/assets/index.cjs +1 -1
- package/dist/assets/index.d.cts +1 -1
- package/dist/assets/index.d.ts +1 -1
- package/dist/assets/index.js +1 -1
- package/dist/auth/index.cjs +1 -1
- package/dist/auth/index.d.cts +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/auth/types.d.cts +1 -1
- package/dist/auth/types.d.ts +1 -1
- package/dist/{auth-CvB4MukT.cjs → auth-AehUDNRK.cjs} +2 -2
- package/dist/{auth-CvB4MukT.cjs.map → auth-AehUDNRK.cjs.map} +1 -1
- package/dist/{auth-DYfQMQCs.js → auth-ZBQWCJPM.js} +2 -2
- package/dist/{auth-DYfQMQCs.js.map → auth-ZBQWCJPM.js.map} +1 -1
- package/dist/{authClient-oB5ydxWp.js → authClient-BM4L8XEN.js} +5 -5
- package/dist/{authClient-oB5ydxWp.js.map → authClient-BM4L8XEN.js.map} +1 -1
- package/dist/{authClient-DcKBpMcU.cjs → authClient-DspK50e7.cjs} +5 -5
- package/dist/{authClient-DcKBpMcU.cjs.map → authClient-DspK50e7.cjs.map} +1 -1
- package/dist/{authClient-Df3U4q_6.d.cts → authClient-NBi0pqD5.d.cts} +4 -4
- package/dist/{authClient-JtMVJWXY.d.ts → authClient-ij_Rm2Yn.d.ts} +4 -4
- package/dist/billing/index.cjs +2 -2
- package/dist/billing/index.d.cts +1 -1
- package/dist/billing/index.d.ts +1 -1
- package/dist/billing/index.js +2 -2
- package/dist/billing/types.d.cts +1 -1
- package/dist/billing/types.d.ts +1 -1
- package/dist/chat/index.cjs +3 -3
- package/dist/chat/index.d.cts +2 -2
- package/dist/chat/index.d.ts +2 -2
- package/dist/chat/index.js +3 -3
- package/dist/chat/types.d.cts +1 -1
- package/dist/chat/types.d.ts +1 -1
- package/dist/{componentId-b_qBbJEM.js → componentId-DZP1rBix.js} +54 -2
- package/dist/componentId-DZP1rBix.js.map +1 -0
- package/dist/{componentId-C8ZTXXDo.cjs → componentId-olp0tltf.cjs} +54 -2
- package/dist/componentId-olp0tltf.cjs.map +1 -0
- package/dist/componentsMcp/index.cjs +1 -1
- package/dist/componentsMcp/index.d.cts +1 -1
- package/dist/componentsMcp/index.d.ts +1 -1
- package/dist/componentsMcp/index.js +1 -1
- package/dist/componentsMcp/types.d.cts +1 -1
- package/dist/componentsMcp/types.d.ts +1 -1
- package/dist/{componentsMcp-BrB4js6b.js → componentsMcp-CAmrCpzV.js} +3 -3
- package/dist/{componentsMcp-BrB4js6b.js.map → componentsMcp-CAmrCpzV.js.map} +1 -1
- package/dist/{componentsMcp-BaHy5iLr.cjs → componentsMcp-DXu-0Qt-.cjs} +3 -3
- package/dist/{componentsMcp-BaHy5iLr.cjs.map → componentsMcp-DXu-0Qt-.cjs.map} +1 -1
- package/dist/constants/index.cjs +4 -3
- package/dist/constants/index.d.cts +3 -3
- package/dist/constants/index.d.ts +3 -3
- package/dist/constants/index.js +3 -2
- package/dist/{constants-BMSHGwOR.js → constants-DLPkpnGv.js} +5 -32
- package/dist/constants-DLPkpnGv.js.map +1 -0
- package/dist/{constants-DhFQWQgy.cjs → constants-Day8CU5i.cjs} +4 -37
- package/dist/constants-Day8CU5i.cjs.map +1 -0
- package/dist/{createFetchClient-DEkUH662.cjs → createFetchClient-CDKSkd7i.cjs} +19 -1
- package/dist/{createFetchClient-DlGCbltR.js.map → createFetchClient-CDKSkd7i.cjs.map} +1 -1
- package/dist/{createFetchClient-DlGCbltR.js → createFetchClient-Dc_ZMuq7.js} +8 -2
- package/dist/createFetchClient-Dc_ZMuq7.js.map +1 -0
- package/dist/{createGenericFetchClient-wGxemBwR.js → createGenericFetchClient-Ba4E4T-Y.js} +2 -2
- package/dist/{createGenericFetchClient-wGxemBwR.js.map → createGenericFetchClient-Ba4E4T-Y.js.map} +1 -1
- package/dist/{createGenericFetchClient-2oU-PXVo.cjs → createGenericFetchClient-BuYzzV_D.cjs} +2 -2
- package/dist/{createGenericFetchClient-2oU-PXVo.cjs.map → createGenericFetchClient-BuYzzV_D.cjs.map} +1 -1
- package/dist/{createOpenapiFetchClient-Bhz62MUE.js → createOpenapiFetchClient-DSk29o_s.js} +2 -2
- package/dist/{createOpenapiFetchClient-Bhz62MUE.js.map → createOpenapiFetchClient-DSk29o_s.js.map} +1 -1
- package/dist/{createOpenapiFetchClient-DL9w7vU-.cjs → createOpenapiFetchClient-dkssExkU.cjs} +2 -2
- package/dist/{createOpenapiFetchClient-DL9w7vU-.cjs.map → createOpenapiFetchClient-dkssExkU.cjs.map} +1 -1
- package/dist/dataScience/index.cjs +60 -4
- package/dist/dataScience/index.cjs.map +1 -0
- package/dist/dataScience/index.d.cts +105 -3
- package/dist/dataScience/index.d.ts +105 -3
- package/dist/dataScience/index.js +60 -3
- package/dist/dataScience/index.js.map +1 -0
- package/dist/dataScience/types.d.cts +2 -3
- package/dist/dataScience/types.d.ts +2 -3
- package/dist/developerPortal/index.cjs +1 -1
- package/dist/developerPortal/index.d.cts +2 -2
- package/dist/developerPortal/index.d.ts +2 -2
- package/dist/developerPortal/index.js +1 -1
- package/dist/developerPortal/types.d.cts +1 -1
- package/dist/developerPortal/types.d.ts +1 -1
- package/dist/{developerPortalClient-BfRxYrWj.cjs → developerPortalClient-BcK9F-Fs.cjs} +3 -3
- package/dist/{developerPortalClient-BfRxYrWj.cjs.map → developerPortalClient-BcK9F-Fs.cjs.map} +1 -1
- package/dist/{developerPortalClient-D9XOYwWF.js → developerPortalClient-CzCJ5sE3.js} +3 -3
- package/dist/{developerPortalClient-D9XOYwWF.js.map → developerPortalClient-CzCJ5sE3.js.map} +1 -1
- package/dist/domain/permissions/index.d.cts +1 -1
- package/dist/domain/permissions/index.d.ts +1 -1
- package/dist/editor/index.cjs +2 -2
- package/dist/editor/index.d.cts +2 -2
- package/dist/editor/index.d.ts +2 -2
- package/dist/editor/index.js +2 -2
- package/dist/editor/types.d.cts +1 -1
- package/dist/editor/types.d.ts +1 -1
- package/dist/encryption/index.cjs +1 -1
- package/dist/encryption/index.d.cts +1 -1
- package/dist/encryption/index.d.ts +1 -1
- package/dist/encryption/index.js +1 -1
- package/dist/encryption/types.d.cts +1 -1
- package/dist/encryption/types.d.ts +1 -1
- package/dist/import/index.cjs +1 -1
- package/dist/import/index.d.cts +3 -3
- package/dist/import/index.d.ts +3 -3
- package/dist/import/index.js +1 -1
- package/dist/{import-CABlFMQX.cjs → import-DHq6q3Fm.cjs} +3 -3
- package/dist/{import-CABlFMQX.cjs.map → import-DHq6q3Fm.cjs.map} +1 -1
- package/dist/{import-CT1Ce5Rp.js → import-DxN6CJzJ.js} +3 -3
- package/dist/{import-CT1Ce5Rp.js.map → import-DxN6CJzJ.js.map} +1 -1
- package/dist/{index-xX8-Stoq.d.cts → index-8QhOqFLY.d.cts} +4 -4
- package/dist/{index-DIPMzH--.d.ts → index-B0prazAi.d.cts} +13 -4
- package/dist/index-B8K-Bbdq.d.cts +220 -0
- package/dist/{index-DQagqTVa.d.cts → index-BGE3eZfd.d.cts} +3 -3
- package/dist/{index-C1ndNdrN.d.cts → index-BL7uXOiY.d.cts} +3 -3
- package/dist/{index-DjSthn8d.d.ts → index-BNwo-zaJ.d.cts} +56 -2
- package/dist/{index-qJ2IjXIM.d.cts → index-BUKMdbKh.d.cts} +76 -151
- package/dist/{index-DVBQgFg0.d.ts → index-BVe4S2CK.d.ts} +4 -4
- package/dist/{index-CbSh3KFw.d.cts → index-BXgjPlZN.d.cts} +4 -4
- package/dist/{index-BfAcp7O2.d.ts → index-BoKrc8wy.d.ts} +3 -3
- package/dist/{index-BsT_cBJd.d.ts → index-BxgHNJ3Q.d.ts} +76 -151
- package/dist/{index-lTrNMlj6.d.ts → index-CEDjFidH.d.ts} +3 -3
- package/dist/{index-DgGpQsAT.d.cts → index-CNJBmCHM.d.cts} +4 -4
- package/dist/index-CQNwp6wX.d.ts +220 -0
- package/dist/{index-CuI8OI9E.d.ts → index-CZvBjQvl.d.ts} +4 -4
- package/dist/{index-Day1Yr5s.d.ts → index-CdeWTy8t.d.ts} +4 -4
- package/dist/{index-AA3MRfRn.d.cts → index-CwUurckF.d.ts} +56 -2
- package/dist/{index-Db266tLz.d.cts → index-D0Gnp2QM.d.ts} +13 -4
- package/dist/{index-m9-mN8Gg.d.ts → index-DLWMm1-T.d.ts} +4 -4
- package/dist/{index-BDPxm9qu.d.ts → index-DTGOEke4.d.ts} +3 -3
- package/dist/{index-D1mduJne.d.cts → index-FrsEkDvX.d.cts} +7 -2
- package/dist/{index-D1mduJne.d.ts → index-FrsEkDvX.d.ts} +7 -2
- package/dist/{index-xhzuWloV.d.cts → index-d9zxFmNI.d.cts} +4 -4
- package/dist/{index-z-2okomN.d.cts → index-iFCann29.d.cts} +3 -3
- package/dist/index.cjs +47 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +39 -34
- package/dist/index.js.map +1 -1
- package/dist/{isLoginPageRedirect-CoUxJi2x.cjs → isLoginPageRedirect-DUmsOC2o.cjs} +2 -2
- package/dist/{isLoginPageRedirect-CoUxJi2x.cjs.map → isLoginPageRedirect-DUmsOC2o.cjs.map} +1 -1
- package/dist/{isLoginPageRedirect-D-lqF_kZ.js → isLoginPageRedirect-lbeVmeB2.js} +2 -2
- package/dist/{isLoginPageRedirect-D-lqF_kZ.js.map → isLoginPageRedirect-lbeVmeB2.js.map} +1 -1
- package/dist/kaiAgent/index.cjs +1 -1
- package/dist/kaiAgent/index.d.cts +2 -2
- package/dist/kaiAgent/index.d.ts +2 -2
- package/dist/kaiAgent/index.js +1 -1
- package/dist/kaiAgent/types.d.cts +1 -1
- package/dist/kaiAgent/types.d.ts +1 -1
- package/dist/{kaiAgent-CYU1Uda8.js → kaiAgent-D0MoKqXe.js} +5 -5
- package/dist/{kaiAgent-CYU1Uda8.js.map → kaiAgent-D0MoKqXe.js.map} +1 -1
- package/dist/{kaiAgent-CDhg0MAw.cjs → kaiAgent-De2T6G4G.cjs} +5 -5
- package/dist/{kaiAgent-CDhg0MAw.cjs.map → kaiAgent-De2T6G4G.cjs.map} +1 -1
- package/dist/{kaiMemory-oir_qCo_.js → kaiMemory-B1wIwH8Y.js} +2 -2
- package/dist/{kaiMemory-oir_qCo_.js.map → kaiMemory-B1wIwH8Y.js.map} +1 -1
- package/dist/{kaiMemory-CkLQfJXD.cjs → kaiMemory-DZ6hXni_.cjs} +2 -2
- package/dist/{kaiMemory-CkLQfJXD.cjs.map → kaiMemory-DZ6hXni_.cjs.map} +1 -1
- package/dist/management/index.cjs +1 -1
- package/dist/management/index.d.cts +1 -1
- package/dist/management/index.d.ts +1 -1
- package/dist/management/index.js +1 -1
- package/dist/management/types.d.cts +2 -2
- package/dist/management/types.d.ts +2 -2
- package/dist/{management-BcGHyxAP.js → management-CmgsWmf0.js} +20 -6
- package/dist/management-CmgsWmf0.js.map +1 -0
- package/dist/{management-BEGOEQxM.cjs → management-Drs5G-hf.cjs} +20 -6
- package/dist/management-Drs5G-hf.cjs.map +1 -0
- package/dist/metastore/index.cjs +1 -1
- package/dist/metastore/index.d.cts +1 -1
- package/dist/metastore/index.d.ts +1 -1
- package/dist/metastore/index.js +1 -1
- package/dist/metastore/types.d.cts +1 -1
- package/dist/metastore/types.d.ts +1 -1
- package/dist/{metastore-DeRQ2VIv.cjs → metastore-CV4DUDxP.cjs} +4 -4
- package/dist/{metastore-DeRQ2VIv.cjs.map → metastore-CV4DUDxP.cjs.map} +1 -1
- package/dist/{metastore-CGsgxjng.js → metastore-CkqFnEfu.js} +4 -4
- package/dist/{metastore-CGsgxjng.js.map → metastore-CkqFnEfu.js.map} +1 -1
- package/dist/microsoftGraph/index.cjs +2 -2
- package/dist/microsoftGraph/index.d.cts +2 -2
- package/dist/microsoftGraph/index.d.ts +2 -2
- package/dist/microsoftGraph/index.js +2 -2
- package/dist/microsoftGraph/types.d.cts +1 -1
- package/dist/microsoftGraph/types.d.ts +1 -1
- package/dist/{middleware-8zaJWcyU.js → middleware-DxGv7DG8.js} +2 -2
- package/dist/{middleware-8zaJWcyU.js.map → middleware-DxGv7DG8.js.map} +1 -1
- package/dist/{middleware-B9RNuLfD.cjs → middleware-vIaPDtQI.cjs} +2 -2
- package/dist/{middleware-B9RNuLfD.cjs.map → middleware-vIaPDtQI.cjs.map} +1 -1
- package/dist/notifications/index.cjs +3 -3
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/index.js +3 -3
- package/dist/notifications/types.d.cts +1 -1
- package/dist/notifications/types.d.ts +1 -1
- package/dist/oauth/index.cjs +1 -1
- package/dist/oauth/index.d.cts +2 -2
- package/dist/oauth/index.d.ts +2 -2
- package/dist/oauth/index.js +1 -1
- package/dist/oauth/types.d.cts +1 -1
- package/dist/oauth/types.d.ts +1 -1
- package/dist/{oauth-B5Biqz21.cjs → oauth-CSBChWuf.cjs} +5 -5
- package/dist/{oauth-B5Biqz21.cjs.map → oauth-CSBChWuf.cjs.map} +1 -1
- package/dist/{oauth-ByCdISsV.js → oauth-DOveZKUv.js} +5 -5
- package/dist/{oauth-ByCdISsV.js.map → oauth-DOveZKUv.js.map} +1 -1
- package/dist/omnisearch/index.cjs +2 -2
- package/dist/omnisearch/index.d.cts +2 -2
- package/dist/omnisearch/index.d.ts +2 -2
- package/dist/omnisearch/index.js +2 -2
- package/dist/omnisearch/types.d.cts +1 -1
- package/dist/omnisearch/types.d.ts +1 -1
- package/dist/{project-UHZGFmmG.d.cts → project-BGk9CtOq.d.cts} +3 -3
- package/dist/{project-iBm4cIIR.d.ts → project-DS0HOV3M.d.ts} +3 -3
- package/dist/queryService/index.cjs +1 -1
- package/dist/queryService/index.d.cts +2 -2
- package/dist/queryService/index.d.ts +2 -2
- package/dist/queryService/index.js +1 -1
- package/dist/queryService/types.d.cts +1 -1
- package/dist/queryService/types.d.ts +1 -1
- package/dist/queryService-C3BQ6GKW.cjs +214 -0
- package/dist/queryService-C3BQ6GKW.cjs.map +1 -0
- package/dist/queryService-DQHtHy2-.js +209 -0
- package/dist/queryService-DQHtHy2-.js.map +1 -0
- package/dist/queue/index.cjs +1 -1
- package/dist/queue/index.d.cts +3 -3
- package/dist/queue/index.d.ts +3 -3
- package/dist/queue/index.js +1 -1
- package/dist/queue/types.d.cts +1 -1
- package/dist/queue/types.d.ts +1 -1
- package/dist/{queue-BiIs9fX4.js → queue-6cywDnA-.js} +5 -5
- package/dist/{queue-BiIs9fX4.js.map → queue-6cywDnA-.js.map} +1 -1
- package/dist/{queue-CBi9Q8vp.cjs → queue-J2uXzXR9.cjs} +5 -5
- package/dist/{queue-CBi9Q8vp.cjs.map → queue-J2uXzXR9.cjs.map} +1 -1
- package/dist/readJwtClaims-CMZ3cNC_.js +28 -0
- package/dist/readJwtClaims-CMZ3cNC_.js.map +1 -0
- package/dist/readJwtClaims-SVJgo04x.cjs +33 -0
- package/dist/readJwtClaims-SVJgo04x.cjs.map +1 -0
- package/dist/scheduler/index.cjs +3 -3
- package/dist/scheduler/index.d.cts +2 -2
- package/dist/scheduler/index.d.ts +2 -2
- package/dist/scheduler/index.js +3 -3
- package/dist/scheduler/types.d.cts +1 -1
- package/dist/scheduler/types.d.ts +1 -1
- package/dist/sdk/configurations/index.cjs +3 -3
- package/dist/sdk/configurations/index.cjs.map +1 -1
- package/dist/sdk/configurations/index.d.cts +4 -4
- package/dist/sdk/configurations/index.d.ts +4 -4
- package/dist/sdk/configurations/index.js +3 -3
- package/dist/sdk/configurations/index.js.map +1 -1
- package/dist/sdk/dataAppServer/index.cjs +266 -0
- package/dist/sdk/dataAppServer/index.cjs.map +1 -0
- package/dist/sdk/dataAppServer/index.d.cts +55 -0
- package/dist/sdk/dataAppServer/index.d.ts +55 -0
- package/dist/sdk/dataAppServer/index.js +264 -0
- package/dist/sdk/dataAppServer/index.js.map +1 -0
- package/dist/sdk/developerPortal/index.cjs +6 -18
- package/dist/sdk/developerPortal/index.cjs.map +1 -1
- package/dist/sdk/developerPortal/index.d.cts +3 -3
- package/dist/sdk/developerPortal/index.d.ts +3 -3
- package/dist/sdk/developerPortal/index.js +6 -18
- package/dist/sdk/developerPortal/index.js.map +1 -1
- package/dist/sdk/kaiMemory/index.cjs +1 -1
- package/dist/sdk/kaiMemory/index.d.cts +1 -1
- package/dist/sdk/kaiMemory/index.d.ts +1 -1
- package/dist/sdk/kaiMemory/index.js +1 -1
- package/dist/sdk/kaiMemory/types.d.cts +1 -1
- package/dist/sdk/kaiMemory/types.d.ts +1 -1
- package/dist/sdk/queryService/index.d.cts +1 -1
- package/dist/sdk/queryService/index.d.ts +1 -1
- package/dist/sdk/semanticLayer/index.cjs +1 -1
- package/dist/sdk/semanticLayer/index.d.cts +6 -1
- package/dist/sdk/semanticLayer/index.d.ts +6 -1
- package/dist/sdk/semanticLayer/index.js +1 -1
- package/dist/sdk/semanticLayer/types.d.cts +1 -1
- package/dist/sdk/semanticLayer/types.d.ts +1 -1
- package/dist/sdk/tag/index.d.cts +2 -2
- package/dist/sdk/tag/index.d.ts +2 -2
- package/dist/sdk/tag/types.d.cts +1 -1
- package/dist/sdk/tag/types.d.ts +1 -1
- package/dist/sdk/vault/index.d.cts +1 -1
- package/dist/sdk/vault/index.d.ts +1 -1
- package/dist/{semanticLayer-BdPW_wLo.js → semanticLayer-CfjDnmsY.js} +16 -1
- package/dist/semanticLayer-CfjDnmsY.js.map +1 -0
- package/dist/{semanticLayer-djom-J78.cjs → semanticLayer-D8D_3hk-.cjs} +16 -1
- package/dist/semanticLayer-D8D_3hk-.cjs.map +1 -0
- package/dist/serviceIds-Bg1pWiPE.cjs +37 -0
- package/dist/serviceIds-Bg1pWiPE.cjs.map +1 -0
- package/dist/serviceIds-RAVtP4nK.js +32 -0
- package/dist/serviceIds-RAVtP4nK.js.map +1 -0
- package/dist/status/index.cjs +1 -1
- package/dist/status/index.d.cts +1 -1
- package/dist/status/index.d.ts +1 -1
- package/dist/status/index.js +1 -1
- package/dist/storage/index.cjs +9 -7
- package/dist/storage/index.d.cts +4 -4
- package/dist/storage/index.d.ts +4 -4
- package/dist/storage/index.js +6 -6
- package/dist/storage/types.d.cts +5 -5
- package/dist/storage/types.d.ts +5 -5
- package/dist/{storage-BpOLWT6h.js → storage--2FvvLAw.js} +7 -7
- package/dist/{storage-BpOLWT6h.js.map → storage--2FvvLAw.js.map} +1 -1
- package/dist/{storage-KJ5Ki_ma.cjs → storage-BMrYlyLB.cjs} +7 -7
- package/dist/{storage-KJ5Ki_ma.cjs.map → storage-BMrYlyLB.cjs.map} +1 -1
- package/dist/stream/index.cjs +3 -3
- package/dist/stream/index.d.cts +2 -2
- package/dist/stream/index.d.ts +2 -2
- package/dist/stream/index.js +3 -3
- package/dist/stream/types.d.cts +1 -1
- package/dist/stream/types.d.ts +1 -1
- package/dist/syncActions/index.cjs +1 -1
- package/dist/syncActions/index.d.cts +2 -2
- package/dist/syncActions/index.d.ts +2 -2
- package/dist/syncActions/index.js +1 -1
- package/dist/syncActions/types.d.cts +1 -1
- package/dist/syncActions/types.d.ts +1 -1
- package/dist/{syncActions-BcX3jm2E.cjs → syncActions-DToUhyP3.cjs} +6 -6
- package/dist/{syncActions-BcX3jm2E.cjs.map → syncActions-DToUhyP3.cjs.map} +1 -1
- package/dist/{syncActions-giPLTfje.js → syncActions-DV_aObTQ.js} +6 -6
- package/dist/{syncActions-giPLTfje.js.map → syncActions-DV_aObTQ.js.map} +1 -1
- package/dist/telemetry/index.cjs +3 -3
- package/dist/telemetry/index.d.cts +2 -2
- package/dist/telemetry/index.d.ts +2 -2
- package/dist/telemetry/index.js +3 -3
- package/dist/telemetry/types.d.cts +1 -1
- package/dist/telemetry/types.d.ts +1 -1
- package/dist/{transientRetries-BKqmb85B.js → transientRetries-BORv47mH.js} +2 -2
- package/dist/{transientRetries-BKqmb85B.js.map → transientRetries-BORv47mH.js.map} +1 -1
- package/dist/{transientRetries-CM7rAEXQ.cjs → transientRetries-CBorl4Ue.cjs} +2 -2
- package/dist/{transientRetries-CM7rAEXQ.cjs.map → transientRetries-CBorl4Ue.cjs.map} +1 -1
- package/dist/{types-BWMOK6eL.d.cts → types-B4Vwz45w.d.cts} +2 -2
- package/dist/{types-Dryq2GGE.d.cts → types-B4ezB18r.d.cts} +2 -2
- package/dist/{types-Bdl7EFMc.d.ts → types-B6JcEPEu.d.ts} +2 -2
- package/dist/{types-eFi8xJIM.d.cts → types-B6f6LpZ_.d.cts} +2 -2
- package/dist/{types-C9okze_R.d.ts → types-BD0B1KQ6.d.ts} +3 -26
- package/dist/{types-DeyXJzWz.d.cts → types-BEw98Dd2.d.cts} +2 -2
- package/dist/{types-1IBnjBVJ.d.cts → types-BVJmcoqA.d.cts} +2 -2
- package/dist/{types-B1qe1etN.d.cts → types-BljDxuWG.d.cts} +3 -3
- package/dist/{types-BiDdBXSm.d.ts → types-Bp8G9yta.d.ts} +2 -2
- package/dist/{types-PZzNANiS.d.cts → types-Bv2Ds1hL.d.cts} +2 -2
- package/dist/{types-D-tJt0hQ.d.cts → types-BynQKst1.d.cts} +2 -2
- package/dist/{types-BuclMPeY.d.cts → types-C5B3Pfob.d.cts} +2 -2
- package/dist/{types-DNgazFnF.d.cts → types-CIlBSV99.d.cts} +2 -2
- package/dist/{types-DschSZHf.d.cts → types-CKdNf_2k.d.cts} +3 -3
- package/dist/{types-Du5o-tud.d.ts → types-CQYyULrw.d.ts} +2 -2
- package/dist/{types-BrEVh0WE.d.cts → types-CRC4lbPw.d.cts} +8 -4
- package/dist/{types-CxEJ77m3.d.cts → types-CSE8bHiq.d.cts} +3 -3
- package/dist/{types-DRCttnIN.d.ts → types-CTYTMXXj.d.ts} +2 -2
- package/dist/{types-6T04_qUf.d.ts → types-CepTvkfm.d.ts} +2 -2
- package/dist/{types-DHMxPJZq.d.cts → types-Cf0WE6qK.d.cts} +2 -2
- package/dist/{types-DwbTiyhZ.d.cts → types-ChOJ-Az7.d.cts} +2 -2
- package/dist/{types-wYrC2boT.d.ts → types-Cr6WA6CN.d.ts} +2 -2
- package/dist/{types-B0e-no6u.d.ts → types-CsRfoHQw.d.cts} +192 -3
- package/dist/{types-D6lre27s.d.ts → types-CsVRsObb.d.ts} +2 -2
- package/dist/{types-CcGp6O3B.d.cts → types-D-ufoskb.d.cts} +2 -2
- package/dist/{types-LconaX98.d.cts → types-D2hhEGem.d.cts} +2 -2
- package/dist/{types-inG9y3dP.d.ts → types-D5bxXqEU.d.ts} +2 -2
- package/dist/{types-BE8abIig.d.cts → types-DKKHKj19.d.cts} +2 -2
- package/dist/{types-CPWjRdnj.d.cts → types-DNldEa7i.d.ts} +192 -3
- package/dist/{types-E8tzafsk.d.cts → types-DNwIMEuB.d.cts} +3 -26
- package/dist/{types-DtOfhDzz.d.ts → types-DSWIIMdv.d.ts} +3 -3
- package/dist/{types-Bat0SIZA.d.cts → types-DU8aPTFW.d.cts} +2 -2
- package/dist/{types-B8k1DqlU.d.ts → types-DX1Dz0xK.d.ts} +2 -2
- package/dist/{types-ZZwdKCBl.d.ts → types-DbthI3r-.d.ts} +2 -2
- package/dist/{types-B3ri-iiC.d.ts → types-DjSjUKUl.d.ts} +2 -2
- package/dist/{types-YpOm4yXE.d.cts → types-DjWubjvP.d.cts} +2 -2
- package/dist/{types-CRubbBcU.d.cts → types-Do3__S4Q.d.cts} +2 -2
- package/dist/{types-DKSUG2dZ.d.ts → types-DoSZQ1Bi.d.ts} +8 -4
- package/dist/{types-CWcdaq-K.d.ts → types-Dsf7CYmm.d.ts} +2 -2
- package/dist/{types--Rp5wvaz.d.ts → types-OHt0D_f2.d.ts} +2 -2
- package/dist/{types-Cr5lyI99.d.ts → types-Rrcx-8LM.d.ts} +2 -2
- package/dist/{types-DUpVIuk7.d.ts → types-Tg3euEN_.d.ts} +2 -2
- package/dist/{types-37vwxse4.d.cts → types-Y4e8GGa3.d.cts} +2 -2
- package/dist/{types-DJzTVMu1.d.ts → types-d5Bt8Mr3.d.ts} +2 -2
- package/dist/{types-jjOulnni.d.ts → types-dU3EA8gk.d.ts} +2 -2
- package/dist/{types-ir7T2a9a.d.ts → types-iU1Sc1IM.d.ts} +3 -3
- package/dist/{types-zPY-XGnM.d.ts → types-kGZQQcIK.d.ts} +2 -2
- package/dist/{types-xzt_2H63.d.ts → types-zlYUn0oi.d.ts} +3 -3
- package/dist/{validateConnectionStatus-DYwWeWVo.js → validateConnectionStatus-DV00sDmu.js} +3 -3
- package/dist/{validateConnectionStatus-DYwWeWVo.js.map → validateConnectionStatus-DV00sDmu.js.map} +1 -1
- package/dist/{validateConnectionStatus-BjemGI1e.cjs → validateConnectionStatus-ckaHcRx8.cjs} +3 -3
- package/dist/{validateConnectionStatus-BjemGI1e.cjs.map → validateConnectionStatus-ckaHcRx8.cjs.map} +1 -1
- package/dist/vault/index.cjs +4 -4
- package/dist/vault/index.d.cts +1 -1
- package/dist/vault/index.d.ts +1 -1
- package/dist/vault/index.js +4 -4
- package/dist/vault/types.d.cts +1 -1
- package/dist/vault/types.d.ts +1 -1
- package/package.json +15 -2
- package/surface/apps.md +3 -3
- package/surface/dataScience.md +2 -11
- package/surface/editor.md +5 -5
- package/surface/management.md +1 -0
- package/surface/queue.md +1 -1
- package/surface/sdk.md +2 -0
- package/dist/QueryJobError-Iq9O90Uh.js +0 -21
- package/dist/QueryJobError-Iq9O90Uh.js.map +0 -1
- package/dist/QueryJobError-Oy0fl4aw.cjs +0 -32
- package/dist/QueryJobError-Oy0fl4aw.cjs.map +0 -1
- package/dist/appLogs-CTvZAihm.d.ts +0 -8
- package/dist/appLogs-CnLNMH7M.d.cts +0 -8
- package/dist/appLogs-CoAWQGxs.cjs +0 -152
- package/dist/appLogs-CoAWQGxs.cjs.map +0 -1
- package/dist/appLogs-DFcPwVk8.js +0 -131
- package/dist/appLogs-DFcPwVk8.js.map +0 -1
- package/dist/apps/index.cjs.map +0 -1
- package/dist/apps/index.js.map +0 -1
- package/dist/componentId-C8ZTXXDo.cjs.map +0 -1
- package/dist/componentId-b_qBbJEM.js.map +0 -1
- package/dist/constants-BMSHGwOR.js.map +0 -1
- package/dist/constants-DhFQWQgy.cjs.map +0 -1
- package/dist/createFetchClient-DEkUH662.cjs.map +0 -1
- package/dist/dataScience-CXmkEOAi.js +0 -118
- package/dist/dataScience-CXmkEOAi.js.map +0 -1
- package/dist/dataScience-CufjHPSd.cjs +0 -123
- package/dist/dataScience-CufjHPSd.cjs.map +0 -1
- package/dist/index-BZDxWvZW.d.ts +0 -214
- package/dist/index-ClIV2Lch.d.cts +0 -214
- package/dist/management-BEGOEQxM.cjs.map +0 -1
- package/dist/management-BcGHyxAP.js.map +0 -1
- package/dist/queryService-Cg-eMysa.cjs +0 -126
- package/dist/queryService-Cg-eMysa.cjs.map +0 -1
- package/dist/queryService-x8kq8Z2-.js +0 -121
- package/dist/queryService-x8kq8Z2-.js.map +0 -1
- package/dist/semanticLayer-BdPW_wLo.js.map +0 -1
- package/dist/semanticLayer-djom-J78.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authClient-oB5ydxWp.js","names":["z","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/manageTokens/manageTokens.ts","../src/utils/async/collectByCursor.ts","../src/clients/auth/me/me.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/schemas.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\nconst loginInputSchema = z.object({\n /** Also mints a session cookie; `Origin` must be the stack app URL, else 403. */\n browserMode: z.boolean().default(false),\n});\n\nexport const passwordInputSchema = loginInputSchema.extend({\n email: z.email(),\n password: z.string().min(1, 'Required'),\n});\n\nexport const oidcInputSchema = loginInputSchema.extend({\n grantType: z.enum(['google', 'microsoft']),\n idToken: z.string().min(1, 'Required'),\n});\n\n// No `browserMode`: as `boolean` it would widen the result; the method signature keeps the literal.\nexport type PasswordInput = Omit<z.input<typeof passwordInputSchema>, 'browserMode'>;\nexport type OidcInput = Omit<z.input<typeof oidcInputSchema>, 'browserMode'>;\n\nconst userSchema = z.object({\n id: z.number(),\n email: z.string(),\n name: z.string(),\n});\n\n// The backend omits `mfaRequired` on success; the `false` default makes it the union discriminant.\nconst loginSuccessBaseSchema = z.object({\n mfaRequired: z.literal(false).default(false),\n accessToken: z.string(),\n tokenType: z.string(),\n expiresIn: z.number(),\n user: userSchema,\n sessionId: z.string(),\n});\n\nexport const apiLoginSuccessSchema = loginSuccessBaseSchema.extend({\n refreshToken: z.string(),\n});\n\nexport const browserLoginSuccessSchema = loginSuccessBaseSchema.extend({\n refreshToken: z.null().optional(),\n});\n\n/**\n * MFA-challenge shape.\n *\n * - `mfaType` / `allowedMethods` stay `string` so a new method still parses.\n * - `webauthn` is `PublicKeyCredentialRequestOptionsJSON`: present, `null` or absent (TOTP).\n * - `unknown`: a stricter shape failing would block every MFA sign-in; the ceremony validates.\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 // zod 4 `z.unknown()` is not implicitly optional; TOTP challenges omit the key.\n webauthn: z.unknown().optional(),\n});\n\nexport const apiLoginResultSchema = z.union([apiLoginSuccessSchema, mfaChallengeSchema]);\nexport const browserLoginResultSchema = z.union([browserLoginSuccessSchema, mfaChallengeSchema]);\n\nexport type LoginUser = z.infer<typeof userSchema>;\nexport type MfaChallenge = z.infer<typeof mfaChallengeSchema>;\nexport type ApiLoginSuccess = z.infer<typeof apiLoginSuccessSchema>;\nexport type BrowserLoginSuccess = z.infer<typeof browserLoginSuccessSchema>;\nexport type ApiLoginResult = z.infer<typeof apiLoginResultSchema>;\nexport type BrowserLoginResult = z.infer<typeof browserLoginResultSchema>;\n\nexport type LoginResultFor<Browser extends boolean> = Browser extends true\n ? BrowserLoginResult\n : ApiLoginResult;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { LoginResultFor, OidcInput, PasswordInput } from './schemas';\nimport {\n apiLoginResultSchema,\n browserLoginResultSchema,\n oidcInputSchema,\n passwordInputSchema,\n} 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 /**\n * Grants parse with our own schemas — the generated response type is unreliable.\n *\n * - `browserMode` picks the schema: only API mode carries a refresh token.\n * - `const Browser` keeps the literal; a `boolean` flag widens the result to the union.\n */\n const withPassword = async <const Browser extends boolean = false>(\n input: Omit<PasswordInput, 'browserMode'> & { browserMode?: Browser },\n signal?: AbortSignal,\n ) => {\n const { email, password, browserMode } = passwordInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login(\n { grantType: 'password', email, password, browserMode } as LoginBody,\n signal,\n );\n const schema = browserMode ? browserLoginResultSchema : apiLoginResultSchema;\n return schema.parse(data) as LoginResultFor<Browser>;\n };\n\n const withOidc = async <const Browser extends boolean = false>(\n input: Omit<OidcInput, 'browserMode'> & { browserMode?: Browser },\n signal?: AbortSignal,\n ) => {\n const { grantType, idToken, browserMode } = oidcInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login({ grantType, idToken, browserMode } as LoginBody, signal);\n const schema = browserMode ? browserLoginResultSchema : apiLoginResultSchema;\n return schema.parse(data) as LoginResultFor<Browser>;\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 type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { CreateManageTokenInput, RevokeManageTokenPath } from './types';\n\nexport const createManageTokens = (client: AuthOpenApiFetchClient) => {\n /**\n * Every Manage API token the caller owns, in two lists.\n *\n * - `tokens` — the ones the caller created by hand, newest first.\n * - `sessionTokens` — the ones a browser sign-in minted, newest first.\n * - A token carries `scopes: []` when it merely inherits the caller's own permissions.\n */\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/manage-tokens', {}, { signal });\n return data;\n };\n\n /**\n * Mint a token and read its secret.\n *\n * - `token` in the response is returned this once and is unreadable afterwards.\n * - `manageToken` is the same row the list endpoint returns.\n * - Needs an active sudo window; without one the endpoint answers `403`.\n * - Rate-limited per caller, answering `429` with `Retry-After`.\n */\n const create = async (input: CreateManageTokenInput, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/manage-tokens', { body: input }, { signal });\n return data;\n };\n\n /** Deleting an id that is already gone answers `404` — the call is not idempotent. */\n const revoke = async (id: RevokeManageTokenPath['id'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/manage-tokens/{id}', { path: { id } }, { signal });\n };\n\n return { getAll, create, revoke };\n};\n","import { createAbortError } from '../createAbortError';\n\n/** One page of a cursor-paginated collection (`data` / `meta` / `links` envelope). */\nexport type CursorPage<T> = { data: T[]; links: { next: string | null } };\n\nexport type CollectByCursorOptions<T> = {\n fetchFrom: (\n after: string | undefined,\n pageSize?: number,\n signal?: AbortSignal,\n ) => Promise<CursorPage<T>>;\n pageSize?: number;\n limit?: number;\n signal?: AbortSignal;\n};\n\n/**\n * The `page[after]` cursor `links.next` carries; `undefined` on the last page.\n *\n * - Read from the link, not rebuilt from the last row, so the encoding stays the server's.\n * - Only the query is parsed, so a relative link works too.\n */\nexport const nextCursorOf = (next: string | null): string | undefined => {\n if (next === null) return undefined;\n const queryStart = next.indexOf('?');\n if (queryStart === -1) return undefined;\n const query = next.slice(queryStart + 1).split('#')[0];\n return new URLSearchParams(query).get('page[after]') ?? undefined;\n};\n\n/**\n * Collects items from a cursor-paginated endpoint — up to `limit`, or all when it is omitted.\n *\n * - Calls `fetchFrom` sequentially with the cursor each `links.next` carries, and hands it `pageSize`.\n * - Ends on a `null` `links.next`, or on a link without a `page[after]`.\n * - A cursor seen before means the server is looping; the walk throws rather than spin.\n */\nexport const collectByCursor = async <T>({\n fetchFrom,\n pageSize,\n limit,\n signal,\n}: CollectByCursorOptions<T>): Promise<T[]> => {\n if (signal?.aborted) throw createAbortError(signal.reason);\n if (limit !== undefined && limit < 0) throw new Error('Invalid collectByCursor limit');\n if (pageSize !== undefined && pageSize < 1) throw new Error('Invalid collectByCursor pageSize');\n\n const items: T[] = [];\n\n if (limit === 0) return items;\n\n let after: string | undefined;\n const seen = new Set<string>();\n\n do {\n const page = await fetchFrom(after, pageSize, signal);\n\n items.push(...page.data);\n\n if (limit !== undefined && items.length >= limit) return items.slice(0, limit);\n\n after = nextCursorOf(page.links.next);\n if (after !== undefined) {\n if (seen.has(after)) {\n throw new Error(`collectByCursor: links.next repeats the cursor ${after}`);\n }\n seen.add(after);\n }\n } while (after !== undefined);\n\n return items;\n};\n","import { collectByCursor } from '../../../utils';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { GetMeMaintainersQuery, GetMeOrganizationsQuery, GetMeProjectsQuery } from './types';\n\n// Connection's `app.auth.me.page.max_limit` (`config/packages/auth_me.yaml`); above it the request is a 400.\nconst PAGE_LIMIT = 200;\n\n/**\n * The signed-in user and the organizations, maintainers and projects they reach.\n *\n * - Session-only: a PAT bearer answers `403`.\n * - `404` while the stack's `programmatic-auth` feature is off.\n */\nexport const createMe = (client: AuthOpenApiFetchClient) => {\n /** Each collection is a counted preview — its first page; the rest is behind the paged methods. */\n const get = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me', {}, { signal });\n return data;\n };\n\n const getOrganizations = async (query?: GetMeOrganizationsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/organizations', { query }, { signal });\n return data;\n };\n\n const getMaintainers = async (query?: GetMeMaintainersQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/maintainers', { query }, { signal });\n return data;\n };\n\n const getProjects = async (query?: GetMeProjectsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/projects', { query }, { signal });\n return data;\n };\n\n /** Every organization the caller reaches, across all pages. */\n const getAllOrganizations = (signal?: AbortSignal) =>\n collectByCursor({\n pageSize: PAGE_LIMIT,\n signal,\n fetchFrom: (after, limit, pageSignal) =>\n getOrganizations({ page: { limit, after } }, pageSignal),\n });\n\n /** Every project the caller can open, across all pages. */\n const getAllProjects = (signal?: AbortSignal) =>\n collectByCursor({\n pageSize: PAGE_LIMIT,\n signal,\n fetchFrom: (after, limit, pageSignal) => getProjects({ page: { limit, after } }, pageSignal),\n });\n\n return {\n get,\n getOrganizations,\n getMaintainers,\n getProjects,\n getAllOrganizations,\n getAllProjects,\n };\n};\n","import * as z from 'zod';\n\nimport type { VerifyMfaType } from './types';\n\n/**\n * Methods `POST /v1/auth/mfa` accepts, also reported in a challenge's `mfaType` / `allowedMethods`.\n *\n * - `satisfies` fails the build if the generated spec renames or drops one.\n * - A challenge may name a method not listed 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, VerifyMfaType>;\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 // Mirrors the backend default; the generated type wrongly marks it required.\n revokeOtherSessions: z.boolean().default(false),\n});\n\nexport type MfaCodeInput = z.infer<typeof mfaCodeInputSchema>;\nexport type MfaWebauthnInput = z.infer<typeof mfaWebauthnInputSchema>;\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 // Defaults to true, matching the backend. 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 // Defaults to true on parse, so the SDK always sends it (matches the backend default).\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`.\nexport type ResetInput = z.input<typeof resetInputSchema>;\n// `z.input`: callers may omit `revokeOtherSessions`.\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 {\n CreatePatBodyRaw,\n CreatePatInput,\n ExchangePatBodyRaw,\n ExchangePatInput,\n PatScopeInput,\n RevokePatPath,\n} from './types';\n\n/**\n * Drop the keys whose value is `null` or `undefined`, and only those — an empty array or string is\n * a value the caller meant.\n *\n * The spec documents each optional PAT field as \"Omit (do not send `null`)\". Callers hold nullables\n * either way — an empty expiry picker, an untouched switch — so the rule lives here rather than at\n * every call site, where one of them would forget it.\n */\nconst withoutNullish = (entries: Record<string, unknown>): Record<string, unknown> =>\n Object.fromEntries(Object.entries(entries).filter(([, value]) => value != null));\n\n/** `undefined` for a scope that narrows nothing — which is what an absent `scope` already asks for. */\nconst toScope = (scope: PatScopeInput | null | undefined): Record<string, unknown> | undefined => {\n if (scope == null) return undefined;\n\n const payload = withoutNullish({ projects: scope.projects, readOnly: scope.readOnly });\n return Object.keys(payload).length > 0 ? payload : undefined;\n};\n\n// `as unknown as` at these two boundaries: `CreatePatBodyRaw` and `ExchangePatBodyRaw` both demand\n// the keys the endpoint documents as omittable, so the honest body is not expressible in either.\nconst toCreateBody = ({ name, expiresIn, scope }: CreatePatInput): CreatePatBodyRaw =>\n ({\n name,\n ...withoutNullish({ expiresIn, scope: toScope(scope) }),\n }) as unknown as CreatePatBodyRaw;\n\nconst toExchangeBody = ({ expiresIn, scope }: ExchangePatInput): ExchangePatBodyRaw =>\n withoutNullish({ expiresIn, scope: toScope(scope) }) as unknown as ExchangePatBodyRaw;\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 (input: CreatePatInput, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/pat', { body: toCreateBody(input) }, { signal });\n return data;\n };\n\n /**\n * Issue a child token from the one this request is authorized with.\n *\n * A child only ever attenuates its parent, so an empty input is a full-inheritance copy.\n */\n const exchange = async (input: ExchangePatInput = {}, signal?: AbortSignal) => {\n const { data } = await client.post(\n '/v1/auth/pat/exchange',\n { body: toExchangeBody(input) },\n { signal },\n );\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 * as z from 'zod';\n\nexport const refreshTokenInputSchema = z.object({\n refreshToken: z.string().min(1, 'Required'),\n});\n\nexport const refreshSessionInputSchema = z.object({\n // The session id the login response carried. The refresh token itself stays in a server-side\n // channel bound to the session cookie, so the client never holds it.\n sessionId: z.string().min(1, 'Required'),\n});\n\nexport type RefreshTokenInput = z.infer<typeof refreshTokenInputSchema>;\nexport type RefreshSessionInput = z.infer<typeof refreshSessionInputSchema>;\n","import { HttpHeader } from '../../../fetchClient';\nimport { KeboolaHttpHeader } from '../../../internal';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { RefreshSessionInput, RefreshTokenInput } from './schemas';\nimport { refreshSessionInputSchema, refreshTokenInputSchema } from './schemas';\nimport type { RefreshTokenBody, RefreshTokenPartialBody, RevokeTokenBody } from './types';\n\nexport const createToken = (client: AuthOpenApiFetchClient) => {\n const _refresh = async (\n body: RefreshTokenPartialBody,\n { signal, headers }: { signal?: AbortSignal; headers?: Record<string, string> } = {},\n ) => {\n const { data } = await client.post(\n '/v1/auth/token/refresh',\n { body: body as RefreshTokenBody },\n { signal, headers },\n );\n\n return data;\n };\n\n /** API mode: rotates the pair. The response carries the next refresh token. */\n const refreshWithToken = async (input: RefreshTokenInput, signal?: AbortSignal) => {\n const { refreshToken } = refreshTokenInputSchema.parse(input);\n return _refresh({ refreshToken }, { signal });\n };\n\n /**\n * Browser/cookie mode: renews the access token off the session cookie.\n *\n * - The `X-KBC-CSRF` header opts in; without it the request is API mode.\n * - Its value is a constant: its presence is the CSRF proof (custom headers need a preflight).\n * - No refresh token in the response; it stays server-side, bound to the cookie.\n * - Works only from the stack's own origin (fetch's default `same-origin` credentials).\n * - An `Authorization` header rejects the request — use a client with no auth middleware.\n */\n const refreshWithSession = async (input: RefreshSessionInput, signal?: AbortSignal) => {\n const { sessionId } = refreshSessionInputSchema.parse(input);\n return _refresh({ sessionId }, { signal, headers: { [KeboolaHttpHeader.CSRF]: '1' } });\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 { refreshWithToken, refreshWithSession, 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 { createManageTokens } from './manageTokens';\nimport { createMe } from './me';\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 manageTokens: createManageTokens(client),\n me: createMe(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,MAAM,mBAAmBA,IAAE,OAAO;;AAEhC,aAAaA,IAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,EACxC,CAAC;AAED,MAAa,sBAAsB,iBAAiB,OAAO;CACzD,OAAOA,IAA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sB,SACvD,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,8BACA,EAAE,MAAM;GAAE;GAAY;GAAY;EAAoB,EAAE,GACxD,EAAE,OAAO,CACX;EACA,OAAO;CACT;CAIA,MAAM,SAAS,OAAO,EAAE,IAAI,GAAG,SAA8B,WAAyB;EACpF,MAAM,OAAO,OAAO,0BAA0B;GAAE,MAAM,EAAE,GAAG;GAAG;EAAM,GAAG,EAAE,OAAO,CAAC;CACnF;CAEA,OAAO;EAAE;EAAQ;EAAiB;EAAU;CAAO;AACrD;;AChBA,MAAa,oBAAoB,EAAE,SAAS,kBAAyC;CACnF,MAAM,SAAS,yBAAgC;EAC7C;EACA;EACA,gBAAgB;CAClB,CAAC;CACD,MAAM,gBAAgB,yBAAyB;EAC7C;EACA;EACA,gBAAgB;CAClB,CAAC;CAKD,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,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,cAAc,mBAAmB,MAAM;EACvC,IAAI,SAAS,MAAM;EACnB,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
|
+
{"version":3,"file":"authClient-BM4L8XEN.js","names":["z","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/manageTokens/manageTokens.ts","../src/utils/async/collectByCursor.ts","../src/clients/auth/me/me.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/schemas.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\nconst loginInputSchema = z.object({\n /** Also mints a session cookie; `Origin` must be the stack app URL, else 403. */\n browserMode: z.boolean().default(false),\n});\n\nexport const passwordInputSchema = loginInputSchema.extend({\n email: z.email(),\n password: z.string().min(1, 'Required'),\n});\n\nexport const oidcInputSchema = loginInputSchema.extend({\n grantType: z.enum(['google', 'microsoft']),\n idToken: z.string().min(1, 'Required'),\n});\n\n// No `browserMode`: as `boolean` it would widen the result; the method signature keeps the literal.\nexport type PasswordInput = Omit<z.input<typeof passwordInputSchema>, 'browserMode'>;\nexport type OidcInput = Omit<z.input<typeof oidcInputSchema>, 'browserMode'>;\n\nconst userSchema = z.object({\n id: z.number(),\n email: z.string(),\n name: z.string(),\n});\n\n// The backend omits `mfaRequired` on success; the `false` default makes it the union discriminant.\nconst loginSuccessBaseSchema = z.object({\n mfaRequired: z.literal(false).default(false),\n accessToken: z.string(),\n tokenType: z.string(),\n expiresIn: z.number(),\n user: userSchema,\n sessionId: z.string(),\n});\n\nexport const apiLoginSuccessSchema = loginSuccessBaseSchema.extend({\n refreshToken: z.string(),\n});\n\nexport const browserLoginSuccessSchema = loginSuccessBaseSchema.extend({\n refreshToken: z.null().optional(),\n});\n\n/**\n * MFA-challenge shape.\n *\n * - `mfaType` / `allowedMethods` stay `string` so a new method still parses.\n * - `webauthn` is `PublicKeyCredentialRequestOptionsJSON`: present, `null` or absent (TOTP).\n * - `unknown`: a stricter shape failing would block every MFA sign-in; the ceremony validates.\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 // zod 4 `z.unknown()` is not implicitly optional; TOTP challenges omit the key.\n webauthn: z.unknown().optional(),\n});\n\nexport const apiLoginResultSchema = z.union([apiLoginSuccessSchema, mfaChallengeSchema]);\nexport const browserLoginResultSchema = z.union([browserLoginSuccessSchema, mfaChallengeSchema]);\n\nexport type LoginUser = z.infer<typeof userSchema>;\nexport type MfaChallenge = z.infer<typeof mfaChallengeSchema>;\nexport type ApiLoginSuccess = z.infer<typeof apiLoginSuccessSchema>;\nexport type BrowserLoginSuccess = z.infer<typeof browserLoginSuccessSchema>;\nexport type ApiLoginResult = z.infer<typeof apiLoginResultSchema>;\nexport type BrowserLoginResult = z.infer<typeof browserLoginResultSchema>;\n\nexport type LoginResultFor<Browser extends boolean> = Browser extends true\n ? BrowserLoginResult\n : ApiLoginResult;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { LoginResultFor, OidcInput, PasswordInput } from './schemas';\nimport {\n apiLoginResultSchema,\n browserLoginResultSchema,\n oidcInputSchema,\n passwordInputSchema,\n} 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 /**\n * Grants parse with our own schemas — the generated response type is unreliable.\n *\n * - `browserMode` picks the schema: only API mode carries a refresh token.\n * - `const Browser` keeps the literal; a `boolean` flag widens the result to the union.\n */\n const withPassword = async <const Browser extends boolean = false>(\n input: Omit<PasswordInput, 'browserMode'> & { browserMode?: Browser },\n signal?: AbortSignal,\n ) => {\n const { email, password, browserMode } = passwordInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login(\n { grantType: 'password', email, password, browserMode } as LoginBody,\n signal,\n );\n const schema = browserMode ? browserLoginResultSchema : apiLoginResultSchema;\n return schema.parse(data) as LoginResultFor<Browser>;\n };\n\n const withOidc = async <const Browser extends boolean = false>(\n input: Omit<OidcInput, 'browserMode'> & { browserMode?: Browser },\n signal?: AbortSignal,\n ) => {\n const { grantType, idToken, browserMode } = oidcInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login({ grantType, idToken, browserMode } as LoginBody, signal);\n const schema = browserMode ? browserLoginResultSchema : apiLoginResultSchema;\n return schema.parse(data) as LoginResultFor<Browser>;\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 type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { CreateManageTokenInput, RevokeManageTokenPath } from './types';\n\nexport const createManageTokens = (client: AuthOpenApiFetchClient) => {\n /**\n * Every Manage API token the caller owns, in two lists.\n *\n * - `tokens` — the ones the caller created by hand, newest first.\n * - `sessionTokens` — the ones a browser sign-in minted, newest first.\n * - A token carries `scopes: []` when it merely inherits the caller's own permissions.\n */\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/manage-tokens', {}, { signal });\n return data;\n };\n\n /**\n * Mint a token and read its secret.\n *\n * - `token` in the response is returned this once and is unreadable afterwards.\n * - `manageToken` is the same row the list endpoint returns.\n * - Needs an active sudo window; without one the endpoint answers `403`.\n * - Rate-limited per caller, answering `429` with `Retry-After`.\n */\n const create = async (input: CreateManageTokenInput, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/manage-tokens', { body: input }, { signal });\n return data;\n };\n\n /** Deleting an id that is already gone answers `404` — the call is not idempotent. */\n const revoke = async (id: RevokeManageTokenPath['id'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/manage-tokens/{id}', { path: { id } }, { signal });\n };\n\n return { getAll, create, revoke };\n};\n","import { createAbortError } from '../createAbortError';\n\n/** One page of a cursor-paginated collection (`data` / `meta` / `links` envelope). */\nexport type CursorPage<T> = { data: T[]; links: { next: string | null } };\n\nexport type CollectByCursorOptions<T> = {\n fetchFrom: (\n after: string | undefined,\n pageSize?: number,\n signal?: AbortSignal,\n ) => Promise<CursorPage<T>>;\n pageSize?: number;\n limit?: number;\n signal?: AbortSignal;\n};\n\n/**\n * The `page[after]` cursor `links.next` carries; `undefined` on the last page.\n *\n * - Read from the link, not rebuilt from the last row, so the encoding stays the server's.\n * - Only the query is parsed, so a relative link works too.\n */\nexport const nextCursorOf = (next: string | null): string | undefined => {\n if (next === null) return undefined;\n const queryStart = next.indexOf('?');\n if (queryStart === -1) return undefined;\n const query = next.slice(queryStart + 1).split('#')[0];\n return new URLSearchParams(query).get('page[after]') ?? undefined;\n};\n\n/**\n * Collects items from a cursor-paginated endpoint — up to `limit`, or all when it is omitted.\n *\n * - Calls `fetchFrom` sequentially with the cursor each `links.next` carries, and hands it `pageSize`.\n * - Ends on a `null` `links.next`, or on a link without a `page[after]`.\n * - A cursor seen before means the server is looping; the walk throws rather than spin.\n */\nexport const collectByCursor = async <T>({\n fetchFrom,\n pageSize,\n limit,\n signal,\n}: CollectByCursorOptions<T>): Promise<T[]> => {\n if (signal?.aborted) throw createAbortError(signal.reason);\n if (limit !== undefined && limit < 0) throw new Error('Invalid collectByCursor limit');\n if (pageSize !== undefined && pageSize < 1) throw new Error('Invalid collectByCursor pageSize');\n\n const items: T[] = [];\n\n if (limit === 0) return items;\n\n let after: string | undefined;\n const seen = new Set<string>();\n\n do {\n const page = await fetchFrom(after, pageSize, signal);\n\n items.push(...page.data);\n\n if (limit !== undefined && items.length >= limit) return items.slice(0, limit);\n\n after = nextCursorOf(page.links.next);\n if (after !== undefined) {\n if (seen.has(after)) {\n throw new Error(`collectByCursor: links.next repeats the cursor ${after}`);\n }\n seen.add(after);\n }\n } while (after !== undefined);\n\n return items;\n};\n","import { collectByCursor } from '../../../utils';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { GetMeMaintainersQuery, GetMeOrganizationsQuery, GetMeProjectsQuery } from './types';\n\n// Connection's `app.auth.me.page.max_limit` (`config/packages/auth_me.yaml`); above it the request is a 400.\nconst PAGE_LIMIT = 200;\n\n/**\n * The signed-in user and the organizations, maintainers and projects they reach.\n *\n * - Session-only: a PAT bearer answers `403`.\n * - `404` while the stack's `programmatic-auth` feature is off.\n */\nexport const createMe = (client: AuthOpenApiFetchClient) => {\n /** Each collection is a counted preview — its first page; the rest is behind the paged methods. */\n const get = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me', {}, { signal });\n return data;\n };\n\n const getOrganizations = async (query?: GetMeOrganizationsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/organizations', { query }, { signal });\n return data;\n };\n\n const getMaintainers = async (query?: GetMeMaintainersQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/maintainers', { query }, { signal });\n return data;\n };\n\n const getProjects = async (query?: GetMeProjectsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/projects', { query }, { signal });\n return data;\n };\n\n /** Every organization the caller reaches, across all pages. */\n const getAllOrganizations = (signal?: AbortSignal) =>\n collectByCursor({\n pageSize: PAGE_LIMIT,\n signal,\n fetchFrom: (after, limit, pageSignal) =>\n getOrganizations({ page: { limit, after } }, pageSignal),\n });\n\n /** Every project the caller can open, across all pages. */\n const getAllProjects = (signal?: AbortSignal) =>\n collectByCursor({\n pageSize: PAGE_LIMIT,\n signal,\n fetchFrom: (after, limit, pageSignal) => getProjects({ page: { limit, after } }, pageSignal),\n });\n\n return {\n get,\n getOrganizations,\n getMaintainers,\n getProjects,\n getAllOrganizations,\n getAllProjects,\n };\n};\n","import * as z from 'zod';\n\nimport type { VerifyMfaType } from './types';\n\n/**\n * Methods `POST /v1/auth/mfa` accepts, also reported in a challenge's `mfaType` / `allowedMethods`.\n *\n * - `satisfies` fails the build if the generated spec renames or drops one.\n * - A challenge may name a method not listed 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, VerifyMfaType>;\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 // Mirrors the backend default; the generated type wrongly marks it required.\n revokeOtherSessions: z.boolean().default(false),\n});\n\nexport type MfaCodeInput = z.infer<typeof mfaCodeInputSchema>;\nexport type MfaWebauthnInput = z.infer<typeof mfaWebauthnInputSchema>;\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 // Defaults to true, matching the backend. 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 // Defaults to true on parse, so the SDK always sends it (matches the backend default).\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`.\nexport type ResetInput = z.input<typeof resetInputSchema>;\n// `z.input`: callers may omit `revokeOtherSessions`.\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 {\n CreatePatBodyRaw,\n CreatePatInput,\n ExchangePatBodyRaw,\n ExchangePatInput,\n PatScopeInput,\n RevokePatPath,\n} from './types';\n\n/**\n * Drop the keys whose value is `null` or `undefined`, and only those — an empty array or string is\n * a value the caller meant.\n *\n * The spec documents each optional PAT field as \"Omit (do not send `null`)\". Callers hold nullables\n * either way — an empty expiry picker, an untouched switch — so the rule lives here rather than at\n * every call site, where one of them would forget it.\n */\nconst withoutNullish = (entries: Record<string, unknown>): Record<string, unknown> =>\n Object.fromEntries(Object.entries(entries).filter(([, value]) => value != null));\n\n/** `undefined` for a scope that narrows nothing — which is what an absent `scope` already asks for. */\nconst toScope = (scope: PatScopeInput | null | undefined): Record<string, unknown> | undefined => {\n if (scope == null) return undefined;\n\n const payload = withoutNullish({ projects: scope.projects, readOnly: scope.readOnly });\n return Object.keys(payload).length > 0 ? payload : undefined;\n};\n\n// `as unknown as` at these two boundaries: `CreatePatBodyRaw` and `ExchangePatBodyRaw` both demand\n// the keys the endpoint documents as omittable, so the honest body is not expressible in either.\nconst toCreateBody = ({ name, expiresIn, scope }: CreatePatInput): CreatePatBodyRaw =>\n ({\n name,\n ...withoutNullish({ expiresIn, scope: toScope(scope) }),\n }) as unknown as CreatePatBodyRaw;\n\nconst toExchangeBody = ({ expiresIn, scope }: ExchangePatInput): ExchangePatBodyRaw =>\n withoutNullish({ expiresIn, scope: toScope(scope) }) as unknown as ExchangePatBodyRaw;\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 (input: CreatePatInput, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/pat', { body: toCreateBody(input) }, { signal });\n return data;\n };\n\n /**\n * Issue a child token from the one this request is authorized with.\n *\n * A child only ever attenuates its parent, so an empty input is a full-inheritance copy.\n */\n const exchange = async (input: ExchangePatInput = {}, signal?: AbortSignal) => {\n const { data } = await client.post(\n '/v1/auth/pat/exchange',\n { body: toExchangeBody(input) },\n { signal },\n );\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 * as z from 'zod';\n\nexport const refreshTokenInputSchema = z.object({\n refreshToken: z.string().min(1, 'Required'),\n});\n\nexport const refreshSessionInputSchema = z.object({\n // The session id the login response carried. The refresh token itself stays in a server-side\n // channel bound to the session cookie, so the client never holds it.\n sessionId: z.string().min(1, 'Required'),\n});\n\nexport type RefreshTokenInput = z.infer<typeof refreshTokenInputSchema>;\nexport type RefreshSessionInput = z.infer<typeof refreshSessionInputSchema>;\n","import { HttpHeader } from '../../../fetchClient';\nimport { KeboolaHttpHeader } from '../../../internal';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { RefreshSessionInput, RefreshTokenInput } from './schemas';\nimport { refreshSessionInputSchema, refreshTokenInputSchema } from './schemas';\nimport type { RefreshTokenBody, RefreshTokenPartialBody, RevokeTokenBody } from './types';\n\nexport const createToken = (client: AuthOpenApiFetchClient) => {\n const _refresh = async (\n body: RefreshTokenPartialBody,\n { signal, headers }: { signal?: AbortSignal; headers?: Record<string, string> } = {},\n ) => {\n const { data } = await client.post(\n '/v1/auth/token/refresh',\n { body: body as RefreshTokenBody },\n { signal, headers },\n );\n\n return data;\n };\n\n /** API mode: rotates the pair. The response carries the next refresh token. */\n const refreshWithToken = async (input: RefreshTokenInput, signal?: AbortSignal) => {\n const { refreshToken } = refreshTokenInputSchema.parse(input);\n return _refresh({ refreshToken }, { signal });\n };\n\n /**\n * Browser/cookie mode: renews the access token off the session cookie.\n *\n * - The `X-KBC-CSRF` header opts in; without it the request is API mode.\n * - Its value is a constant: its presence is the CSRF proof (custom headers need a preflight).\n * - No refresh token in the response; it stays server-side, bound to the cookie.\n * - Works only from the stack's own origin (fetch's default `same-origin` credentials).\n * - An `Authorization` header rejects the request — use a client with no auth middleware.\n */\n const refreshWithSession = async (input: RefreshSessionInput, signal?: AbortSignal) => {\n const { sessionId } = refreshSessionInputSchema.parse(input);\n return _refresh({ sessionId }, { signal, headers: { [KeboolaHttpHeader.CSRF]: '1' } });\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 { refreshWithToken, refreshWithSession, 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 { createManageTokens } from './manageTokens';\nimport { createMe } from './me';\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 manageTokens: createManageTokens(client),\n me: createMe(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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,YAAY,MAAM;EACzB,KAAK,UAAU,MAAM;EACrB,UAAU,eAAe,MAAM;EAC/B,MAAM,WAAW,MAAM;EACvB,KAAK,UAAU,MAAM;EACrB,cAAc,mBAAmB,MAAM;EACvC,IAAI,SAAS,MAAM;EACnB,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,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-CmQyd0Gu.cjs");
|
|
2
|
-
const require_createFetchClient = require("./createFetchClient-
|
|
3
|
-
const require_validateConnectionStatus = require("./validateConnectionStatus-
|
|
4
|
-
const require_createGenericFetchClient = require("./createGenericFetchClient-
|
|
5
|
-
const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-
|
|
2
|
+
const require_createFetchClient = require("./createFetchClient-CDKSkd7i.cjs");
|
|
3
|
+
const require_validateConnectionStatus = require("./validateConnectionStatus-ckaHcRx8.cjs");
|
|
4
|
+
const require_createGenericFetchClient = require("./createGenericFetchClient-BuYzzV_D.cjs");
|
|
5
|
+
const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-dkssExkU.cjs");
|
|
6
6
|
const require_createAbortError = require("./createAbortError-Dzc9yObN.cjs");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
zod = require_rolldown_runtime.__toESM(zod, 1);
|
|
@@ -691,4 +691,4 @@ Object.defineProperty(exports, "totpVerifyInputSchema", {
|
|
|
691
691
|
}
|
|
692
692
|
});
|
|
693
693
|
|
|
694
|
-
//# sourceMappingURL=authClient-
|
|
694
|
+
//# sourceMappingURL=authClient-DspK50e7.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authClient-DcKBpMcU.cjs","names":["z","createAbortError","z","z","z","KeboolaHttpHeader","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/manageTokens/manageTokens.ts","../src/utils/async/collectByCursor.ts","../src/clients/auth/me/me.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/schemas.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\nconst loginInputSchema = z.object({\n /** Also mints a session cookie; `Origin` must be the stack app URL, else 403. */\n browserMode: z.boolean().default(false),\n});\n\nexport const passwordInputSchema = loginInputSchema.extend({\n email: z.email(),\n password: z.string().min(1, 'Required'),\n});\n\nexport const oidcInputSchema = loginInputSchema.extend({\n grantType: z.enum(['google', 'microsoft']),\n idToken: z.string().min(1, 'Required'),\n});\n\n// No `browserMode`: as `boolean` it would widen the result; the method signature keeps the literal.\nexport type PasswordInput = Omit<z.input<typeof passwordInputSchema>, 'browserMode'>;\nexport type OidcInput = Omit<z.input<typeof oidcInputSchema>, 'browserMode'>;\n\nconst userSchema = z.object({\n id: z.number(),\n email: z.string(),\n name: z.string(),\n});\n\n// The backend omits `mfaRequired` on success; the `false` default makes it the union discriminant.\nconst loginSuccessBaseSchema = z.object({\n mfaRequired: z.literal(false).default(false),\n accessToken: z.string(),\n tokenType: z.string(),\n expiresIn: z.number(),\n user: userSchema,\n sessionId: z.string(),\n});\n\nexport const apiLoginSuccessSchema = loginSuccessBaseSchema.extend({\n refreshToken: z.string(),\n});\n\nexport const browserLoginSuccessSchema = loginSuccessBaseSchema.extend({\n refreshToken: z.null().optional(),\n});\n\n/**\n * MFA-challenge shape.\n *\n * - `mfaType` / `allowedMethods` stay `string` so a new method still parses.\n * - `webauthn` is `PublicKeyCredentialRequestOptionsJSON`: present, `null` or absent (TOTP).\n * - `unknown`: a stricter shape failing would block every MFA sign-in; the ceremony validates.\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 // zod 4 `z.unknown()` is not implicitly optional; TOTP challenges omit the key.\n webauthn: z.unknown().optional(),\n});\n\nexport const apiLoginResultSchema = z.union([apiLoginSuccessSchema, mfaChallengeSchema]);\nexport const browserLoginResultSchema = z.union([browserLoginSuccessSchema, mfaChallengeSchema]);\n\nexport type LoginUser = z.infer<typeof userSchema>;\nexport type MfaChallenge = z.infer<typeof mfaChallengeSchema>;\nexport type ApiLoginSuccess = z.infer<typeof apiLoginSuccessSchema>;\nexport type BrowserLoginSuccess = z.infer<typeof browserLoginSuccessSchema>;\nexport type ApiLoginResult = z.infer<typeof apiLoginResultSchema>;\nexport type BrowserLoginResult = z.infer<typeof browserLoginResultSchema>;\n\nexport type LoginResultFor<Browser extends boolean> = Browser extends true\n ? BrowserLoginResult\n : ApiLoginResult;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { LoginResultFor, OidcInput, PasswordInput } from './schemas';\nimport {\n apiLoginResultSchema,\n browserLoginResultSchema,\n oidcInputSchema,\n passwordInputSchema,\n} 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 /**\n * Grants parse with our own schemas — the generated response type is unreliable.\n *\n * - `browserMode` picks the schema: only API mode carries a refresh token.\n * - `const Browser` keeps the literal; a `boolean` flag widens the result to the union.\n */\n const withPassword = async <const Browser extends boolean = false>(\n input: Omit<PasswordInput, 'browserMode'> & { browserMode?: Browser },\n signal?: AbortSignal,\n ) => {\n const { email, password, browserMode } = passwordInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login(\n { grantType: 'password', email, password, browserMode } as LoginBody,\n signal,\n );\n const schema = browserMode ? browserLoginResultSchema : apiLoginResultSchema;\n return schema.parse(data) as LoginResultFor<Browser>;\n };\n\n const withOidc = async <const Browser extends boolean = false>(\n input: Omit<OidcInput, 'browserMode'> & { browserMode?: Browser },\n signal?: AbortSignal,\n ) => {\n const { grantType, idToken, browserMode } = oidcInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login({ grantType, idToken, browserMode } as LoginBody, signal);\n const schema = browserMode ? browserLoginResultSchema : apiLoginResultSchema;\n return schema.parse(data) as LoginResultFor<Browser>;\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 type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { CreateManageTokenInput, RevokeManageTokenPath } from './types';\n\nexport const createManageTokens = (client: AuthOpenApiFetchClient) => {\n /**\n * Every Manage API token the caller owns, in two lists.\n *\n * - `tokens` — the ones the caller created by hand, newest first.\n * - `sessionTokens` — the ones a browser sign-in minted, newest first.\n * - A token carries `scopes: []` when it merely inherits the caller's own permissions.\n */\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/manage-tokens', {}, { signal });\n return data;\n };\n\n /**\n * Mint a token and read its secret.\n *\n * - `token` in the response is returned this once and is unreadable afterwards.\n * - `manageToken` is the same row the list endpoint returns.\n * - Needs an active sudo window; without one the endpoint answers `403`.\n * - Rate-limited per caller, answering `429` with `Retry-After`.\n */\n const create = async (input: CreateManageTokenInput, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/manage-tokens', { body: input }, { signal });\n return data;\n };\n\n /** Deleting an id that is already gone answers `404` — the call is not idempotent. */\n const revoke = async (id: RevokeManageTokenPath['id'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/manage-tokens/{id}', { path: { id } }, { signal });\n };\n\n return { getAll, create, revoke };\n};\n","import { createAbortError } from '../createAbortError';\n\n/** One page of a cursor-paginated collection (`data` / `meta` / `links` envelope). */\nexport type CursorPage<T> = { data: T[]; links: { next: string | null } };\n\nexport type CollectByCursorOptions<T> = {\n fetchFrom: (\n after: string | undefined,\n pageSize?: number,\n signal?: AbortSignal,\n ) => Promise<CursorPage<T>>;\n pageSize?: number;\n limit?: number;\n signal?: AbortSignal;\n};\n\n/**\n * The `page[after]` cursor `links.next` carries; `undefined` on the last page.\n *\n * - Read from the link, not rebuilt from the last row, so the encoding stays the server's.\n * - Only the query is parsed, so a relative link works too.\n */\nexport const nextCursorOf = (next: string | null): string | undefined => {\n if (next === null) return undefined;\n const queryStart = next.indexOf('?');\n if (queryStart === -1) return undefined;\n const query = next.slice(queryStart + 1).split('#')[0];\n return new URLSearchParams(query).get('page[after]') ?? undefined;\n};\n\n/**\n * Collects items from a cursor-paginated endpoint — up to `limit`, or all when it is omitted.\n *\n * - Calls `fetchFrom` sequentially with the cursor each `links.next` carries, and hands it `pageSize`.\n * - Ends on a `null` `links.next`, or on a link without a `page[after]`.\n * - A cursor seen before means the server is looping; the walk throws rather than spin.\n */\nexport const collectByCursor = async <T>({\n fetchFrom,\n pageSize,\n limit,\n signal,\n}: CollectByCursorOptions<T>): Promise<T[]> => {\n if (signal?.aborted) throw createAbortError(signal.reason);\n if (limit !== undefined && limit < 0) throw new Error('Invalid collectByCursor limit');\n if (pageSize !== undefined && pageSize < 1) throw new Error('Invalid collectByCursor pageSize');\n\n const items: T[] = [];\n\n if (limit === 0) return items;\n\n let after: string | undefined;\n const seen = new Set<string>();\n\n do {\n const page = await fetchFrom(after, pageSize, signal);\n\n items.push(...page.data);\n\n if (limit !== undefined && items.length >= limit) return items.slice(0, limit);\n\n after = nextCursorOf(page.links.next);\n if (after !== undefined) {\n if (seen.has(after)) {\n throw new Error(`collectByCursor: links.next repeats the cursor ${after}`);\n }\n seen.add(after);\n }\n } while (after !== undefined);\n\n return items;\n};\n","import { collectByCursor } from '../../../utils';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { GetMeMaintainersQuery, GetMeOrganizationsQuery, GetMeProjectsQuery } from './types';\n\n// Connection's `app.auth.me.page.max_limit` (`config/packages/auth_me.yaml`); above it the request is a 400.\nconst PAGE_LIMIT = 200;\n\n/**\n * The signed-in user and the organizations, maintainers and projects they reach.\n *\n * - Session-only: a PAT bearer answers `403`.\n * - `404` while the stack's `programmatic-auth` feature is off.\n */\nexport const createMe = (client: AuthOpenApiFetchClient) => {\n /** Each collection is a counted preview — its first page; the rest is behind the paged methods. */\n const get = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me', {}, { signal });\n return data;\n };\n\n const getOrganizations = async (query?: GetMeOrganizationsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/organizations', { query }, { signal });\n return data;\n };\n\n const getMaintainers = async (query?: GetMeMaintainersQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/maintainers', { query }, { signal });\n return data;\n };\n\n const getProjects = async (query?: GetMeProjectsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/projects', { query }, { signal });\n return data;\n };\n\n /** Every organization the caller reaches, across all pages. */\n const getAllOrganizations = (signal?: AbortSignal) =>\n collectByCursor({\n pageSize: PAGE_LIMIT,\n signal,\n fetchFrom: (after, limit, pageSignal) =>\n getOrganizations({ page: { limit, after } }, pageSignal),\n });\n\n /** Every project the caller can open, across all pages. */\n const getAllProjects = (signal?: AbortSignal) =>\n collectByCursor({\n pageSize: PAGE_LIMIT,\n signal,\n fetchFrom: (after, limit, pageSignal) => getProjects({ page: { limit, after } }, pageSignal),\n });\n\n return {\n get,\n getOrganizations,\n getMaintainers,\n getProjects,\n getAllOrganizations,\n getAllProjects,\n };\n};\n","import * as z from 'zod';\n\nimport type { VerifyMfaType } from './types';\n\n/**\n * Methods `POST /v1/auth/mfa` accepts, also reported in a challenge's `mfaType` / `allowedMethods`.\n *\n * - `satisfies` fails the build if the generated spec renames or drops one.\n * - A challenge may name a method not listed 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, VerifyMfaType>;\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 // Mirrors the backend default; the generated type wrongly marks it required.\n revokeOtherSessions: z.boolean().default(false),\n});\n\nexport type MfaCodeInput = z.infer<typeof mfaCodeInputSchema>;\nexport type MfaWebauthnInput = z.infer<typeof mfaWebauthnInputSchema>;\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 // Defaults to true, matching the backend. 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 // Defaults to true on parse, so the SDK always sends it (matches the backend default).\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`.\nexport type ResetInput = z.input<typeof resetInputSchema>;\n// `z.input`: callers may omit `revokeOtherSessions`.\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 {\n CreatePatBodyRaw,\n CreatePatInput,\n ExchangePatBodyRaw,\n ExchangePatInput,\n PatScopeInput,\n RevokePatPath,\n} from './types';\n\n/**\n * Drop the keys whose value is `null` or `undefined`, and only those — an empty array or string is\n * a value the caller meant.\n *\n * The spec documents each optional PAT field as \"Omit (do not send `null`)\". Callers hold nullables\n * either way — an empty expiry picker, an untouched switch — so the rule lives here rather than at\n * every call site, where one of them would forget it.\n */\nconst withoutNullish = (entries: Record<string, unknown>): Record<string, unknown> =>\n Object.fromEntries(Object.entries(entries).filter(([, value]) => value != null));\n\n/** `undefined` for a scope that narrows nothing — which is what an absent `scope` already asks for. */\nconst toScope = (scope: PatScopeInput | null | undefined): Record<string, unknown> | undefined => {\n if (scope == null) return undefined;\n\n const payload = withoutNullish({ projects: scope.projects, readOnly: scope.readOnly });\n return Object.keys(payload).length > 0 ? payload : undefined;\n};\n\n// `as unknown as` at these two boundaries: `CreatePatBodyRaw` and `ExchangePatBodyRaw` both demand\n// the keys the endpoint documents as omittable, so the honest body is not expressible in either.\nconst toCreateBody = ({ name, expiresIn, scope }: CreatePatInput): CreatePatBodyRaw =>\n ({\n name,\n ...withoutNullish({ expiresIn, scope: toScope(scope) }),\n }) as unknown as CreatePatBodyRaw;\n\nconst toExchangeBody = ({ expiresIn, scope }: ExchangePatInput): ExchangePatBodyRaw =>\n withoutNullish({ expiresIn, scope: toScope(scope) }) as unknown as ExchangePatBodyRaw;\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 (input: CreatePatInput, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/pat', { body: toCreateBody(input) }, { signal });\n return data;\n };\n\n /**\n * Issue a child token from the one this request is authorized with.\n *\n * A child only ever attenuates its parent, so an empty input is a full-inheritance copy.\n */\n const exchange = async (input: ExchangePatInput = {}, signal?: AbortSignal) => {\n const { data } = await client.post(\n '/v1/auth/pat/exchange',\n { body: toExchangeBody(input) },\n { signal },\n );\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 * as z from 'zod';\n\nexport const refreshTokenInputSchema = z.object({\n refreshToken: z.string().min(1, 'Required'),\n});\n\nexport const refreshSessionInputSchema = z.object({\n // The session id the login response carried. The refresh token itself stays in a server-side\n // channel bound to the session cookie, so the client never holds it.\n sessionId: z.string().min(1, 'Required'),\n});\n\nexport type RefreshTokenInput = z.infer<typeof refreshTokenInputSchema>;\nexport type RefreshSessionInput = z.infer<typeof refreshSessionInputSchema>;\n","import { HttpHeader } from '../../../fetchClient';\nimport { KeboolaHttpHeader } from '../../../internal';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { RefreshSessionInput, RefreshTokenInput } from './schemas';\nimport { refreshSessionInputSchema, refreshTokenInputSchema } from './schemas';\nimport type { RefreshTokenBody, RefreshTokenPartialBody, RevokeTokenBody } from './types';\n\nexport const createToken = (client: AuthOpenApiFetchClient) => {\n const _refresh = async (\n body: RefreshTokenPartialBody,\n { signal, headers }: { signal?: AbortSignal; headers?: Record<string, string> } = {},\n ) => {\n const { data } = await client.post(\n '/v1/auth/token/refresh',\n { body: body as RefreshTokenBody },\n { signal, headers },\n );\n\n return data;\n };\n\n /** API mode: rotates the pair. The response carries the next refresh token. */\n const refreshWithToken = async (input: RefreshTokenInput, signal?: AbortSignal) => {\n const { refreshToken } = refreshTokenInputSchema.parse(input);\n return _refresh({ refreshToken }, { signal });\n };\n\n /**\n * Browser/cookie mode: renews the access token off the session cookie.\n *\n * - The `X-KBC-CSRF` header opts in; without it the request is API mode.\n * - Its value is a constant: its presence is the CSRF proof (custom headers need a preflight).\n * - No refresh token in the response; it stays server-side, bound to the cookie.\n * - Works only from the stack's own origin (fetch's default `same-origin` credentials).\n * - An `Authorization` header rejects the request — use a client with no auth middleware.\n */\n const refreshWithSession = async (input: RefreshSessionInput, signal?: AbortSignal) => {\n const { sessionId } = refreshSessionInputSchema.parse(input);\n return _refresh({ sessionId }, { signal, headers: { [KeboolaHttpHeader.CSRF]: '1' } });\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 { refreshWithToken, refreshWithSession, 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 { createManageTokens } from './manageTokens';\nimport { createMe } from './me';\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 manageTokens: createManageTokens(client),\n me: createMe(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,MAAM,mBAAmBA,IAAE,OAAO;;AAEhC,aAAaA,IAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,EACxC,CAAC;AAED,MAAa,sBAAsB,iBAAiB,OAAO;CACzD,OAAOA,IAAE,MAAM;CACf,UAAUA,IAAE,OAAO,CAAC,CAAC,IAAI,GAAG,UAAU;AACxC,CAAC;AAED,MAAa,kBAAkB,iBAAiB,OAAO;CACrD,WAAWA,IAAE,KAAK,CAAC,UAAU,WAAW,CAAC;CACzC,SAASA,IAAE,OAAO,CAAC,CAAC,IAAI,GAAG,UAAU;AACvC,CAAC;AAMD,MAAM,aAAaA,IAAE,OAAO;CAC1B,IAAIA,IAAE,OAAO;CACb,OAAOA,IAAE,OAAO;CAChB,MAAMA,IAAE,OAAO;AACjB,CAAC;AAGD,MAAM,yBAAyBA,IAAE,OAAO;CACtC,aAAaA,IAAE,QAAQ,KAAK,CAAC,CAAC,QAAQ,KAAK;CAC3C,aAAaA,IAAE,OAAO;CACtB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A;EACA,gBAAgBC,iCAAAA;CAClB,CAAC;CACD,MAAM,gBAAgBC,iCAAAA,yBAAyB;EAC7C;EACA;EACA,gBAAgBD,iCAAAA;CAClB,CAAC;CAKD,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,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,cAAc,mBAAmB,MAAM;EACvC,IAAI,SAAS,MAAM;EACnB,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
|
+
{"version":3,"file":"authClient-DspK50e7.cjs","names":["z","createAbortError","z","z","z","KeboolaHttpHeader","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/manageTokens/manageTokens.ts","../src/utils/async/collectByCursor.ts","../src/clients/auth/me/me.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/schemas.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\nconst loginInputSchema = z.object({\n /** Also mints a session cookie; `Origin` must be the stack app URL, else 403. */\n browserMode: z.boolean().default(false),\n});\n\nexport const passwordInputSchema = loginInputSchema.extend({\n email: z.email(),\n password: z.string().min(1, 'Required'),\n});\n\nexport const oidcInputSchema = loginInputSchema.extend({\n grantType: z.enum(['google', 'microsoft']),\n idToken: z.string().min(1, 'Required'),\n});\n\n// No `browserMode`: as `boolean` it would widen the result; the method signature keeps the literal.\nexport type PasswordInput = Omit<z.input<typeof passwordInputSchema>, 'browserMode'>;\nexport type OidcInput = Omit<z.input<typeof oidcInputSchema>, 'browserMode'>;\n\nconst userSchema = z.object({\n id: z.number(),\n email: z.string(),\n name: z.string(),\n});\n\n// The backend omits `mfaRequired` on success; the `false` default makes it the union discriminant.\nconst loginSuccessBaseSchema = z.object({\n mfaRequired: z.literal(false).default(false),\n accessToken: z.string(),\n tokenType: z.string(),\n expiresIn: z.number(),\n user: userSchema,\n sessionId: z.string(),\n});\n\nexport const apiLoginSuccessSchema = loginSuccessBaseSchema.extend({\n refreshToken: z.string(),\n});\n\nexport const browserLoginSuccessSchema = loginSuccessBaseSchema.extend({\n refreshToken: z.null().optional(),\n});\n\n/**\n * MFA-challenge shape.\n *\n * - `mfaType` / `allowedMethods` stay `string` so a new method still parses.\n * - `webauthn` is `PublicKeyCredentialRequestOptionsJSON`: present, `null` or absent (TOTP).\n * - `unknown`: a stricter shape failing would block every MFA sign-in; the ceremony validates.\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 // zod 4 `z.unknown()` is not implicitly optional; TOTP challenges omit the key.\n webauthn: z.unknown().optional(),\n});\n\nexport const apiLoginResultSchema = z.union([apiLoginSuccessSchema, mfaChallengeSchema]);\nexport const browserLoginResultSchema = z.union([browserLoginSuccessSchema, mfaChallengeSchema]);\n\nexport type LoginUser = z.infer<typeof userSchema>;\nexport type MfaChallenge = z.infer<typeof mfaChallengeSchema>;\nexport type ApiLoginSuccess = z.infer<typeof apiLoginSuccessSchema>;\nexport type BrowserLoginSuccess = z.infer<typeof browserLoginSuccessSchema>;\nexport type ApiLoginResult = z.infer<typeof apiLoginResultSchema>;\nexport type BrowserLoginResult = z.infer<typeof browserLoginResultSchema>;\n\nexport type LoginResultFor<Browser extends boolean> = Browser extends true\n ? BrowserLoginResult\n : ApiLoginResult;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { LoginResultFor, OidcInput, PasswordInput } from './schemas';\nimport {\n apiLoginResultSchema,\n browserLoginResultSchema,\n oidcInputSchema,\n passwordInputSchema,\n} 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 /**\n * Grants parse with our own schemas — the generated response type is unreliable.\n *\n * - `browserMode` picks the schema: only API mode carries a refresh token.\n * - `const Browser` keeps the literal; a `boolean` flag widens the result to the union.\n */\n const withPassword = async <const Browser extends boolean = false>(\n input: Omit<PasswordInput, 'browserMode'> & { browserMode?: Browser },\n signal?: AbortSignal,\n ) => {\n const { email, password, browserMode } = passwordInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login(\n { grantType: 'password', email, password, browserMode } as LoginBody,\n signal,\n );\n const schema = browserMode ? browserLoginResultSchema : apiLoginResultSchema;\n return schema.parse(data) as LoginResultFor<Browser>;\n };\n\n const withOidc = async <const Browser extends boolean = false>(\n input: Omit<OidcInput, 'browserMode'> & { browserMode?: Browser },\n signal?: AbortSignal,\n ) => {\n const { grantType, idToken, browserMode } = oidcInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login({ grantType, idToken, browserMode } as LoginBody, signal);\n const schema = browserMode ? browserLoginResultSchema : apiLoginResultSchema;\n return schema.parse(data) as LoginResultFor<Browser>;\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 type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { CreateManageTokenInput, RevokeManageTokenPath } from './types';\n\nexport const createManageTokens = (client: AuthOpenApiFetchClient) => {\n /**\n * Every Manage API token the caller owns, in two lists.\n *\n * - `tokens` — the ones the caller created by hand, newest first.\n * - `sessionTokens` — the ones a browser sign-in minted, newest first.\n * - A token carries `scopes: []` when it merely inherits the caller's own permissions.\n */\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/manage-tokens', {}, { signal });\n return data;\n };\n\n /**\n * Mint a token and read its secret.\n *\n * - `token` in the response is returned this once and is unreadable afterwards.\n * - `manageToken` is the same row the list endpoint returns.\n * - Needs an active sudo window; without one the endpoint answers `403`.\n * - Rate-limited per caller, answering `429` with `Retry-After`.\n */\n const create = async (input: CreateManageTokenInput, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/manage-tokens', { body: input }, { signal });\n return data;\n };\n\n /** Deleting an id that is already gone answers `404` — the call is not idempotent. */\n const revoke = async (id: RevokeManageTokenPath['id'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/manage-tokens/{id}', { path: { id } }, { signal });\n };\n\n return { getAll, create, revoke };\n};\n","import { createAbortError } from '../createAbortError';\n\n/** One page of a cursor-paginated collection (`data` / `meta` / `links` envelope). */\nexport type CursorPage<T> = { data: T[]; links: { next: string | null } };\n\nexport type CollectByCursorOptions<T> = {\n fetchFrom: (\n after: string | undefined,\n pageSize?: number,\n signal?: AbortSignal,\n ) => Promise<CursorPage<T>>;\n pageSize?: number;\n limit?: number;\n signal?: AbortSignal;\n};\n\n/**\n * The `page[after]` cursor `links.next` carries; `undefined` on the last page.\n *\n * - Read from the link, not rebuilt from the last row, so the encoding stays the server's.\n * - Only the query is parsed, so a relative link works too.\n */\nexport const nextCursorOf = (next: string | null): string | undefined => {\n if (next === null) return undefined;\n const queryStart = next.indexOf('?');\n if (queryStart === -1) return undefined;\n const query = next.slice(queryStart + 1).split('#')[0];\n return new URLSearchParams(query).get('page[after]') ?? undefined;\n};\n\n/**\n * Collects items from a cursor-paginated endpoint — up to `limit`, or all when it is omitted.\n *\n * - Calls `fetchFrom` sequentially with the cursor each `links.next` carries, and hands it `pageSize`.\n * - Ends on a `null` `links.next`, or on a link without a `page[after]`.\n * - A cursor seen before means the server is looping; the walk throws rather than spin.\n */\nexport const collectByCursor = async <T>({\n fetchFrom,\n pageSize,\n limit,\n signal,\n}: CollectByCursorOptions<T>): Promise<T[]> => {\n if (signal?.aborted) throw createAbortError(signal.reason);\n if (limit !== undefined && limit < 0) throw new Error('Invalid collectByCursor limit');\n if (pageSize !== undefined && pageSize < 1) throw new Error('Invalid collectByCursor pageSize');\n\n const items: T[] = [];\n\n if (limit === 0) return items;\n\n let after: string | undefined;\n const seen = new Set<string>();\n\n do {\n const page = await fetchFrom(after, pageSize, signal);\n\n items.push(...page.data);\n\n if (limit !== undefined && items.length >= limit) return items.slice(0, limit);\n\n after = nextCursorOf(page.links.next);\n if (after !== undefined) {\n if (seen.has(after)) {\n throw new Error(`collectByCursor: links.next repeats the cursor ${after}`);\n }\n seen.add(after);\n }\n } while (after !== undefined);\n\n return items;\n};\n","import { collectByCursor } from '../../../utils';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { GetMeMaintainersQuery, GetMeOrganizationsQuery, GetMeProjectsQuery } from './types';\n\n// Connection's `app.auth.me.page.max_limit` (`config/packages/auth_me.yaml`); above it the request is a 400.\nconst PAGE_LIMIT = 200;\n\n/**\n * The signed-in user and the organizations, maintainers and projects they reach.\n *\n * - Session-only: a PAT bearer answers `403`.\n * - `404` while the stack's `programmatic-auth` feature is off.\n */\nexport const createMe = (client: AuthOpenApiFetchClient) => {\n /** Each collection is a counted preview — its first page; the rest is behind the paged methods. */\n const get = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me', {}, { signal });\n return data;\n };\n\n const getOrganizations = async (query?: GetMeOrganizationsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/organizations', { query }, { signal });\n return data;\n };\n\n const getMaintainers = async (query?: GetMeMaintainersQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/maintainers', { query }, { signal });\n return data;\n };\n\n const getProjects = async (query?: GetMeProjectsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/projects', { query }, { signal });\n return data;\n };\n\n /** Every organization the caller reaches, across all pages. */\n const getAllOrganizations = (signal?: AbortSignal) =>\n collectByCursor({\n pageSize: PAGE_LIMIT,\n signal,\n fetchFrom: (after, limit, pageSignal) =>\n getOrganizations({ page: { limit, after } }, pageSignal),\n });\n\n /** Every project the caller can open, across all pages. */\n const getAllProjects = (signal?: AbortSignal) =>\n collectByCursor({\n pageSize: PAGE_LIMIT,\n signal,\n fetchFrom: (after, limit, pageSignal) => getProjects({ page: { limit, after } }, pageSignal),\n });\n\n return {\n get,\n getOrganizations,\n getMaintainers,\n getProjects,\n getAllOrganizations,\n getAllProjects,\n };\n};\n","import * as z from 'zod';\n\nimport type { VerifyMfaType } from './types';\n\n/**\n * Methods `POST /v1/auth/mfa` accepts, also reported in a challenge's `mfaType` / `allowedMethods`.\n *\n * - `satisfies` fails the build if the generated spec renames or drops one.\n * - A challenge may name a method not listed 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, VerifyMfaType>;\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 // Mirrors the backend default; the generated type wrongly marks it required.\n revokeOtherSessions: z.boolean().default(false),\n});\n\nexport type MfaCodeInput = z.infer<typeof mfaCodeInputSchema>;\nexport type MfaWebauthnInput = z.infer<typeof mfaWebauthnInputSchema>;\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 // Defaults to true, matching the backend. 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 // Defaults to true on parse, so the SDK always sends it (matches the backend default).\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`.\nexport type ResetInput = z.input<typeof resetInputSchema>;\n// `z.input`: callers may omit `revokeOtherSessions`.\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 {\n CreatePatBodyRaw,\n CreatePatInput,\n ExchangePatBodyRaw,\n ExchangePatInput,\n PatScopeInput,\n RevokePatPath,\n} from './types';\n\n/**\n * Drop the keys whose value is `null` or `undefined`, and only those — an empty array or string is\n * a value the caller meant.\n *\n * The spec documents each optional PAT field as \"Omit (do not send `null`)\". Callers hold nullables\n * either way — an empty expiry picker, an untouched switch — so the rule lives here rather than at\n * every call site, where one of them would forget it.\n */\nconst withoutNullish = (entries: Record<string, unknown>): Record<string, unknown> =>\n Object.fromEntries(Object.entries(entries).filter(([, value]) => value != null));\n\n/** `undefined` for a scope that narrows nothing — which is what an absent `scope` already asks for. */\nconst toScope = (scope: PatScopeInput | null | undefined): Record<string, unknown> | undefined => {\n if (scope == null) return undefined;\n\n const payload = withoutNullish({ projects: scope.projects, readOnly: scope.readOnly });\n return Object.keys(payload).length > 0 ? payload : undefined;\n};\n\n// `as unknown as` at these two boundaries: `CreatePatBodyRaw` and `ExchangePatBodyRaw` both demand\n// the keys the endpoint documents as omittable, so the honest body is not expressible in either.\nconst toCreateBody = ({ name, expiresIn, scope }: CreatePatInput): CreatePatBodyRaw =>\n ({\n name,\n ...withoutNullish({ expiresIn, scope: toScope(scope) }),\n }) as unknown as CreatePatBodyRaw;\n\nconst toExchangeBody = ({ expiresIn, scope }: ExchangePatInput): ExchangePatBodyRaw =>\n withoutNullish({ expiresIn, scope: toScope(scope) }) as unknown as ExchangePatBodyRaw;\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 (input: CreatePatInput, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/pat', { body: toCreateBody(input) }, { signal });\n return data;\n };\n\n /**\n * Issue a child token from the one this request is authorized with.\n *\n * A child only ever attenuates its parent, so an empty input is a full-inheritance copy.\n */\n const exchange = async (input: ExchangePatInput = {}, signal?: AbortSignal) => {\n const { data } = await client.post(\n '/v1/auth/pat/exchange',\n { body: toExchangeBody(input) },\n { signal },\n );\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 * as z from 'zod';\n\nexport const refreshTokenInputSchema = z.object({\n refreshToken: z.string().min(1, 'Required'),\n});\n\nexport const refreshSessionInputSchema = z.object({\n // The session id the login response carried. The refresh token itself stays in a server-side\n // channel bound to the session cookie, so the client never holds it.\n sessionId: z.string().min(1, 'Required'),\n});\n\nexport type RefreshTokenInput = z.infer<typeof refreshTokenInputSchema>;\nexport type RefreshSessionInput = z.infer<typeof refreshSessionInputSchema>;\n","import { HttpHeader } from '../../../fetchClient';\nimport { KeboolaHttpHeader } from '../../../internal';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { RefreshSessionInput, RefreshTokenInput } from './schemas';\nimport { refreshSessionInputSchema, refreshTokenInputSchema } from './schemas';\nimport type { RefreshTokenBody, RefreshTokenPartialBody, RevokeTokenBody } from './types';\n\nexport const createToken = (client: AuthOpenApiFetchClient) => {\n const _refresh = async (\n body: RefreshTokenPartialBody,\n { signal, headers }: { signal?: AbortSignal; headers?: Record<string, string> } = {},\n ) => {\n const { data } = await client.post(\n '/v1/auth/token/refresh',\n { body: body as RefreshTokenBody },\n { signal, headers },\n );\n\n return data;\n };\n\n /** API mode: rotates the pair. The response carries the next refresh token. */\n const refreshWithToken = async (input: RefreshTokenInput, signal?: AbortSignal) => {\n const { refreshToken } = refreshTokenInputSchema.parse(input);\n return _refresh({ refreshToken }, { signal });\n };\n\n /**\n * Browser/cookie mode: renews the access token off the session cookie.\n *\n * - The `X-KBC-CSRF` header opts in; without it the request is API mode.\n * - Its value is a constant: its presence is the CSRF proof (custom headers need a preflight).\n * - No refresh token in the response; it stays server-side, bound to the cookie.\n * - Works only from the stack's own origin (fetch's default `same-origin` credentials).\n * - An `Authorization` header rejects the request — use a client with no auth middleware.\n */\n const refreshWithSession = async (input: RefreshSessionInput, signal?: AbortSignal) => {\n const { sessionId } = refreshSessionInputSchema.parse(input);\n return _refresh({ sessionId }, { signal, headers: { [KeboolaHttpHeader.CSRF]: '1' } });\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 { refreshWithToken, refreshWithSession, 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 { createManageTokens } from './manageTokens';\nimport { createMe } from './me';\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 manageTokens: createManageTokens(client),\n me: createMe(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,EAA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C7B,OAAO,YAAY,MAAM;EACzB,UAAU,eAAe,MAAM;CACjC;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as OpenapiBodyType, s as OpenapiPathType, t as createOpenapiFetchClient } from "./index-
|
|
2
|
-
import { n as ClientInitOptions } from "./types-
|
|
3
|
-
import { $ as CreateDeviceAuthorizationBody, M as DisableTotpPath, O as ExchangePatInput, S as GetPkceTokenBody, T as CreatePatInput, U as GetMeProjectsQuery, V as GetMeOrganizationsQuery, Z as ApproveDeviceAuthorizationBody, _ as RevokeSessionPath, a as RemoveWebauthnInput, b as InitiateSamlBody, f as RevokeTokenBody, it as paths, j as RevokePatPath, n as RegisterWebauthnInput, p as SudoBody, r as RegisterWebauthnOptionsResult, rt as components, tt as GetDeviceAuthorizationTokenBody, v as AssertSamlBody, z as GetMeMaintainersQuery } from "./types-
|
|
1
|
+
import { r as OpenapiBodyType, s as OpenapiPathType, t as createOpenapiFetchClient } from "./index-FrsEkDvX.cjs";
|
|
2
|
+
import { n as ClientInitOptions } from "./types-B4ezB18r.cjs";
|
|
3
|
+
import { $ as CreateDeviceAuthorizationBody, M as DisableTotpPath, O as ExchangePatInput, S as GetPkceTokenBody, T as CreatePatInput, U as GetMeProjectsQuery, V as GetMeOrganizationsQuery, Z as ApproveDeviceAuthorizationBody, _ as RevokeSessionPath, a as RemoveWebauthnInput, b as InitiateSamlBody, f as RevokeTokenBody, it as paths, j as RevokePatPath, n as RegisterWebauthnInput, p as SudoBody, r as RegisterWebauthnOptionsResult, rt as components, tt as GetDeviceAuthorizationTokenBody, v as AssertSamlBody, z as GetMeMaintainersQuery } from "./types-C5B3Pfob.cjs";
|
|
4
4
|
import * as z$1 from "zod";
|
|
5
5
|
declare const passwordInputSchema: z$1.ZodObject<{
|
|
6
6
|
browserMode: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
@@ -444,4 +444,4 @@ declare const createAuthClient: ({ baseUrl, middlewares }: AuthClientInitOptions
|
|
|
444
444
|
};
|
|
445
445
|
};
|
|
446
446
|
export { PasswordInput as A, ApiLoginSuccess as C, LoginUser as D, LoginResultFor as E, mfaChallengeSchema as F, oidcInputSchema as I, passwordInputSchema as L, apiLoginSuccessSchema as M, browserLoginResultSchema as N, MfaChallenge as O, browserLoginSuccessSchema as P, ApiLoginResult as S, BrowserLoginSuccess as T, MfaWebauthnInput as _, RefreshTokenInput as a, mfaWebauthnInputSchema as b, ChangePasswordInput as c, changeInputSchema as d, resetInputSchema as f, MfaMethod as g, MfaCodeInput as h, RefreshSessionInput as i, apiLoginResultSchema as j, OidcInput as k, ResetInput as l, MFA_METHOD as m, AuthOpenApiFetchClient as n, refreshSessionInputSchema as o, resetRequestInputSchema as p, createAuthClient as r, refreshTokenInputSchema as s, AuthClientInitOptions as t, ResetRequestInput as u, TotpVerifyInput as v, BrowserLoginResult as w, totpVerifyInputSchema as x, mfaCodeInputSchema as y };
|
|
447
|
-
//# sourceMappingURL=authClient-
|
|
447
|
+
//# sourceMappingURL=authClient-NBi0pqD5.d.cts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as OpenapiBodyType, s as OpenapiPathType, t as createOpenapiFetchClient } from "./index-
|
|
2
|
-
import { n as ClientInitOptions } from "./types-
|
|
3
|
-
import { $ as CreateDeviceAuthorizationBody, M as DisableTotpPath, O as ExchangePatInput, S as GetPkceTokenBody, T as CreatePatInput, U as GetMeProjectsQuery, V as GetMeOrganizationsQuery, Z as ApproveDeviceAuthorizationBody, _ as RevokeSessionPath, a as RemoveWebauthnInput, b as InitiateSamlBody, f as RevokeTokenBody, it as paths, j as RevokePatPath, n as RegisterWebauthnInput, p as SudoBody, r as RegisterWebauthnOptionsResult, rt as components, tt as GetDeviceAuthorizationTokenBody, v as AssertSamlBody, z as GetMeMaintainersQuery } from "./types-
|
|
1
|
+
import { r as OpenapiBodyType, s as OpenapiPathType, t as createOpenapiFetchClient } from "./index-FrsEkDvX.js";
|
|
2
|
+
import { n as ClientInitOptions } from "./types-Tg3euEN_.js";
|
|
3
|
+
import { $ as CreateDeviceAuthorizationBody, M as DisableTotpPath, O as ExchangePatInput, S as GetPkceTokenBody, T as CreatePatInput, U as GetMeProjectsQuery, V as GetMeOrganizationsQuery, Z as ApproveDeviceAuthorizationBody, _ as RevokeSessionPath, a as RemoveWebauthnInput, b as InitiateSamlBody, f as RevokeTokenBody, it as paths, j as RevokePatPath, n as RegisterWebauthnInput, p as SudoBody, r as RegisterWebauthnOptionsResult, rt as components, tt as GetDeviceAuthorizationTokenBody, v as AssertSamlBody, z as GetMeMaintainersQuery } from "./types-DjSjUKUl.js";
|
|
4
4
|
import * as z$1 from "zod";
|
|
5
5
|
declare const passwordInputSchema: z$1.ZodObject<{
|
|
6
6
|
browserMode: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
@@ -444,4 +444,4 @@ declare const createAuthClient: ({ baseUrl, middlewares }: AuthClientInitOptions
|
|
|
444
444
|
};
|
|
445
445
|
};
|
|
446
446
|
export { PasswordInput as A, ApiLoginSuccess as C, LoginUser as D, LoginResultFor as E, mfaChallengeSchema as F, oidcInputSchema as I, passwordInputSchema as L, apiLoginSuccessSchema as M, browserLoginResultSchema as N, MfaChallenge as O, browserLoginSuccessSchema as P, ApiLoginResult as S, BrowserLoginSuccess as T, MfaWebauthnInput as _, RefreshTokenInput as a, mfaWebauthnInputSchema as b, ChangePasswordInput as c, changeInputSchema as d, resetInputSchema as f, MfaMethod as g, MfaCodeInput as h, RefreshSessionInput as i, apiLoginResultSchema as j, OidcInput as k, ResetInput as l, MFA_METHOD as m, AuthOpenApiFetchClient as n, refreshSessionInputSchema as o, resetRequestInputSchema as p, createAuthClient as r, refreshTokenInputSchema as s, AuthClientInitOptions as t, ResetRequestInput as u, TotpVerifyInput as v, BrowserLoginResult as w, totpVerifyInputSchema as x, mfaCodeInputSchema as y };
|
|
447
|
-
//# sourceMappingURL=authClient-
|
|
447
|
+
//# sourceMappingURL=authClient-ij_Rm2Yn.d.ts.map
|
package/dist/billing/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-
|
|
3
|
-
const require_auth = require("../auth-
|
|
2
|
+
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-dkssExkU.cjs");
|
|
3
|
+
const require_auth = require("../auth-AehUDNRK.cjs");
|
|
4
4
|
// src/clients/billing/billingClient.ts
|
|
5
5
|
const createBillingClient = ({ baseUrl, middlewares, auth }) => {
|
|
6
6
|
const client = require_createOpenapiFetchClient.createOpenapiFetchClient({
|
package/dist/billing/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-B4ezB18r.cjs";
|
|
2
2
|
declare const createBillingClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
3
3
|
healthCheck: (signal?: AbortSignal) => Promise<{
|
|
4
4
|
status?: string;
|
package/dist/billing/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-Tg3euEN_.js";
|
|
2
2
|
declare const createBillingClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
3
3
|
healthCheck: (signal?: AbortSignal) => Promise<{
|
|
4
4
|
status?: string;
|
package/dist/billing/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-
|
|
2
|
-
import { t as createAuthHeaders } from "../auth-
|
|
1
|
+
import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-DSk29o_s.js";
|
|
2
|
+
import { t as createAuthHeaders } from "../auth-ZBQWCJPM.js";
|
|
3
3
|
// src/clients/billing/billingClient.ts
|
|
4
4
|
const createBillingClient = ({ baseUrl, middlewares, auth }) => {
|
|
5
5
|
const client = createOpenapiFetchClient({
|
package/dist/billing/types.d.cts
CHANGED
package/dist/billing/types.d.ts
CHANGED
package/dist/chat/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_createFetchClient = require("../createFetchClient-
|
|
3
|
-
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-
|
|
4
|
-
const require_auth = require("../auth-
|
|
2
|
+
const require_createFetchClient = require("../createFetchClient-CDKSkd7i.cjs");
|
|
3
|
+
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-dkssExkU.cjs");
|
|
4
|
+
const require_auth = require("../auth-AehUDNRK.cjs");
|
|
5
5
|
const require_chat_suggestions = require("./suggestions.cjs");
|
|
6
6
|
let zod = require("zod");
|
|
7
7
|
// src/clients/chat/chatClient.ts
|
package/dist/chat/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
2
|
-
import { A as components, C as UserAgentSettings, E as VoteRequest, S as UsageResponse, T as Vote, b as UpdateAgentSettingsRequest, d as GetVotesQuery, l as GetChatPath, o as ChatRequest, t as AgentSettings, u as GetHistoryQuery, x as UpdateUserAgentSettingsRequest, y as ToolsListResponse } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-B4ezB18r.cjs";
|
|
2
|
+
import { A as components, C as UserAgentSettings, E as VoteRequest, S as UsageResponse, T as Vote, b as UpdateAgentSettingsRequest, d as GetVotesQuery, l as GetChatPath, o as ChatRequest, t as AgentSettings, u as GetHistoryQuery, x as UpdateUserAgentSettingsRequest, y as ToolsListResponse } from "../types-ChOJ-Az7.cjs";
|
|
3
3
|
import { d as SuggestionsApiResponse, f as SuggestionsRequestBody } from "../suggestions-xhIjrlvi.cjs";
|
|
4
4
|
type ChatClientOptions = ClientInitOptions & {
|
|
5
5
|
storageApiUrl: string;
|
package/dist/chat/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
2
|
-
import { A as components, C as UserAgentSettings, E as VoteRequest, S as UsageResponse, T as Vote, b as UpdateAgentSettingsRequest, d as GetVotesQuery, l as GetChatPath, o as ChatRequest, t as AgentSettings, u as GetHistoryQuery, x as UpdateUserAgentSettingsRequest, y as ToolsListResponse } from "../types
|
|
1
|
+
import { n as ClientInitOptions } from "../types-Tg3euEN_.js";
|
|
2
|
+
import { A as components, C as UserAgentSettings, E as VoteRequest, S as UsageResponse, T as Vote, b as UpdateAgentSettingsRequest, d as GetVotesQuery, l as GetChatPath, o as ChatRequest, t as AgentSettings, u as GetHistoryQuery, x as UpdateUserAgentSettingsRequest, y as ToolsListResponse } from "../types-OHt0D_f2.js";
|
|
3
3
|
import { d as SuggestionsApiResponse, f as SuggestionsRequestBody } from "../suggestions-xhIjrlvi.js";
|
|
4
4
|
type ChatClientOptions = ClientInitOptions & {
|
|
5
5
|
storageApiUrl: string;
|