@keboola/api-client 55.0.0 → 56.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/API-SURFACE.md +3 -1
- package/CHANGELOG.md +16 -0
- package/dist/{adminRoles-BTKVwEy8.d.cts → adminRoles-BFOPSedO.d.cts} +2 -2
- package/dist/{adminRoles-Cm513r1G.d.ts → adminRoles-CUB0JddB.d.ts} +2 -2
- package/dist/ai/index.d.cts +2 -2
- package/dist/ai/index.d.ts +2 -2
- package/dist/ai/types.d.cts +1 -1
- package/dist/ai/types.d.ts +1 -1
- package/dist/apps/index.d.cts +2 -2
- package/dist/apps/index.d.ts +2 -2
- package/dist/apps/types.d.cts +1 -1
- package/dist/apps/types.d.ts +1 -1
- package/dist/assets/index.d.cts +1 -1
- package/dist/assets/index.d.ts +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/{authClient-BM4L8XEN.js → authClient-B_Mb4Vzs.js} +3 -45
- package/dist/authClient-B_Mb4Vzs.js.map +1 -0
- package/dist/{authClient-DspK50e7.cjs → authClient-C9QqhT2M.cjs} +6 -60
- package/dist/authClient-C9QqhT2M.cjs.map +1 -0
- package/dist/{authClient-NBi0pqD5.d.cts → authClient-DOetdp2k.d.cts} +4 -4
- package/dist/{authClient-ij_Rm2Yn.d.ts → authClient-Dgyb0EFi.d.ts} +4 -4
- package/dist/billing/index.d.cts +1 -1
- package/dist/billing/index.d.ts +1 -1
- package/dist/billing/types.d.cts +1 -1
- package/dist/billing/types.d.ts +1 -1
- package/dist/chat/index.d.cts +2 -2
- package/dist/chat/index.d.ts +2 -2
- package/dist/chat/types.d.cts +1 -1
- package/dist/chat/types.d.ts +1 -1
- package/dist/collectByCursor-2-8SuJ-8.js +76 -0
- package/dist/collectByCursor-2-8SuJ-8.js.map +1 -0
- package/dist/collectByCursor-D58__WD1.cjs +105 -0
- package/dist/collectByCursor-D58__WD1.cjs.map +1 -0
- package/dist/componentsMcp/index.d.cts +1 -1
- package/dist/componentsMcp/index.d.ts +1 -1
- package/dist/componentsMcp/types.d.cts +1 -1
- package/dist/componentsMcp/types.d.ts +1 -1
- package/dist/constants/index.d.cts +3 -3
- package/dist/constants/index.d.ts +3 -3
- package/dist/dataScience/index.d.cts +3 -3
- package/dist/dataScience/index.d.ts +3 -3
- package/dist/dataScience/types.d.cts +1 -1
- package/dist/dataScience/types.d.ts +1 -1
- package/dist/developerPortal/index.d.cts +2 -2
- package/dist/developerPortal/index.d.ts +2 -2
- package/dist/developerPortal/types.d.cts +1 -1
- package/dist/developerPortal/types.d.ts +1 -1
- package/dist/domain/permissions/index.d.cts +1 -1
- package/dist/domain/permissions/index.d.ts +1 -1
- package/dist/editor/index.d.cts +2 -2
- package/dist/editor/index.d.ts +2 -2
- package/dist/editor/types.d.cts +1 -1
- package/dist/editor/types.d.ts +1 -1
- package/dist/encryption/index.d.cts +1 -1
- package/dist/encryption/index.d.ts +1 -1
- package/dist/encryption/types.d.cts +1 -1
- package/dist/encryption/types.d.ts +1 -1
- package/dist/import/index.d.cts +3 -3
- package/dist/import/index.d.ts +3 -3
- package/dist/{index-DLWMm1-T.d.ts → index-A8udJCGv.d.ts} +4 -4
- package/dist/{index-d9zxFmNI.d.cts → index-B-HhOTVk.d.cts} +4 -4
- package/dist/{index-BVe4S2CK.d.ts → index-B2YNTI4p.d.ts} +4 -4
- package/dist/{index-CEDjFidH.d.ts → index-B30dBBBH.d.ts} +3 -3
- package/dist/{index-D3hWR_e4.d.ts → index-B7Ogo2SK.d.ts} +2 -2
- package/dist/{index-CdeWTy8t.d.ts → index-BH1jo-bb.d.ts} +4 -4
- package/dist/{index-DTGOEke4.d.ts → index-BaJ-GMa7.d.ts} +3 -3
- package/dist/{index-DeWeUUfE.d.ts → index-Bgu3hnMO.d.ts} +4 -4
- package/dist/{index-BGsP2QBc.d.ts → index-C6FI_Lc7.d.ts} +3 -3
- package/dist/{index-BGE3eZfd.d.cts → index-CLqZfRpv.d.cts} +3 -3
- package/dist/{index-CZvBjQvl.d.ts → index-CLxvW_pn.d.ts} +4 -4
- package/dist/{index-CQNwp6wX.d.ts → index-C_A0JS9s.d.ts} +3 -3
- package/dist/{index-CWowDl63.d.cts → index-CmtqbTse.d.cts} +3 -3
- package/dist/{index-BE6qM0vu.d.cts → index-CpidrJQc.d.cts} +4 -4
- package/dist/{index-CYk7Aa8u.d.cts → index-CxoJuIzB.d.cts} +2 -2
- package/dist/{index-B8K-Bbdq.d.cts → index-DAb1g6je.d.cts} +3 -3
- package/dist/{index-CmyFWQXn.d.cts → index-DPhGNQC5.d.cts} +140 -34
- package/dist/{index-CNJBmCHM.d.cts → index-DXNRd61K.d.cts} +4 -4
- package/dist/{index-FrsEkDvX.d.cts → index-DcKc3_Y1.d.cts} +3 -2
- package/dist/{index-FrsEkDvX.d.ts → index-DcKc3_Y1.d.ts} +3 -2
- package/dist/{index-8QhOqFLY.d.cts → index-Dx02AUpZ.d.cts} +4 -4
- package/dist/{index-BXgjPlZN.d.cts → index-DxbqDi_0.d.cts} +4 -4
- package/dist/{index-CQPs3hrp.d.ts → index-GlHJ4j3a.d.ts} +140 -34
- package/dist/{index-iFCann29.d.cts → index-RHYdFrfn.d.cts} +3 -3
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +3 -3
- package/dist/kaiAgent/index.d.cts +2 -2
- package/dist/kaiAgent/index.d.ts +2 -2
- package/dist/kaiAgent/types.d.cts +1 -1
- package/dist/kaiAgent/types.d.ts +1 -1
- package/dist/management/index.d.cts +1 -1
- package/dist/management/index.d.ts +1 -1
- package/dist/management/types.d.cts +1 -1
- package/dist/management/types.d.ts +1 -1
- package/dist/{metaObject-D7oudegV.d.cts → metaObject-BsBMgWRt.d.cts} +2 -2
- package/dist/{metaObject-ClvW342q.d.ts → metaObject-qWyZAD-5.d.ts} +2 -2
- package/dist/metastore/index.d.cts +1 -1
- package/dist/metastore/index.d.ts +1 -1
- package/dist/metastore/types.d.cts +1 -1
- package/dist/metastore/types.d.ts +1 -1
- package/dist/microsoftGraph/index.d.cts +2 -2
- package/dist/microsoftGraph/index.d.ts +2 -2
- package/dist/microsoftGraph/types.d.cts +1 -1
- package/dist/microsoftGraph/types.d.ts +1 -1
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/types.d.cts +1 -1
- package/dist/notifications/types.d.ts +1 -1
- package/dist/oauth/index.d.cts +2 -2
- package/dist/oauth/index.d.ts +2 -2
- package/dist/oauth/types.d.cts +1 -1
- package/dist/oauth/types.d.ts +1 -1
- package/dist/omnisearch/index.d.cts +2 -2
- package/dist/omnisearch/index.d.ts +2 -2
- package/dist/omnisearch/types.d.cts +1 -1
- package/dist/omnisearch/types.d.ts +1 -1
- package/dist/{project-DS0HOV3M.d.ts → project-CmV1OhK4.d.ts} +3 -3
- package/dist/{project-BGk9CtOq.d.cts → project-F6eHCACz.d.cts} +3 -3
- package/dist/queryService/index.d.cts +1 -1
- package/dist/queryService/index.d.ts +1 -1
- package/dist/queryService/types.d.cts +1 -1
- package/dist/queryService/types.d.ts +1 -1
- package/dist/queue/index.d.cts +3 -3
- package/dist/queue/index.d.ts +3 -3
- package/dist/queue/types.d.cts +1 -1
- package/dist/queue/types.d.ts +1 -1
- package/dist/scheduler/index.d.cts +2 -2
- package/dist/scheduler/index.d.ts +2 -2
- package/dist/scheduler/types.d.cts +1 -1
- package/dist/scheduler/types.d.ts +1 -1
- package/dist/sdk/configurations/index.d.cts +3 -3
- package/dist/sdk/configurations/index.d.ts +3 -3
- package/dist/sdk/dataAppServer/index.cjs +1 -1
- package/dist/sdk/dataAppServer/index.d.cts +1 -1
- package/dist/sdk/dataAppServer/index.d.ts +1 -1
- package/dist/sdk/dataAppServer/index.js +1 -1
- package/dist/sdk/developerPortal/index.d.cts +3 -3
- package/dist/sdk/developerPortal/index.d.ts +3 -3
- package/dist/sdk/kaiMemory/index.d.cts +1 -1
- package/dist/sdk/kaiMemory/index.d.ts +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/securityPolicy/index.d.cts +2 -2
- package/dist/sdk/securityPolicy/index.d.ts +2 -2
- package/dist/sdk/securityPolicy/types.d.cts +1 -1
- package/dist/sdk/securityPolicy/types.d.ts +1 -1
- package/dist/sdk/semanticLayer/index.d.cts +1 -1
- package/dist/sdk/semanticLayer/index.d.ts +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/status/index.d.cts +1 -1
- package/dist/status/index.d.ts +1 -1
- package/dist/storage/index.cjs +4 -4
- package/dist/storage/index.d.cts +3 -3
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +2 -2
- package/dist/storage/types.d.cts +6 -6
- package/dist/storage/types.d.ts +6 -6
- package/dist/{storage-DEJN8sw-.js → storage-Bw-HSnPp.js} +55 -2
- package/dist/storage-Bw-HSnPp.js.map +1 -0
- package/dist/{storage-BL-TfHp8.cjs → storage-jLhVrKZh.cjs} +57 -4
- package/dist/storage-jLhVrKZh.cjs.map +1 -0
- package/dist/stream/index.d.cts +2 -2
- package/dist/stream/index.d.ts +2 -2
- package/dist/stream/types.d.cts +1 -1
- package/dist/stream/types.d.ts +1 -1
- package/dist/syncActions/index.d.cts +2 -2
- package/dist/syncActions/index.d.ts +2 -2
- package/dist/syncActions/types.d.cts +1 -1
- package/dist/syncActions/types.d.ts +1 -1
- package/dist/telemetry/index.d.cts +2 -2
- package/dist/telemetry/index.d.ts +2 -2
- package/dist/telemetry/types.d.cts +1 -1
- package/dist/telemetry/types.d.ts +1 -1
- package/dist/{types-B6f6LpZ_.d.cts → types--mz2z0Zm.d.cts} +2 -2
- package/dist/{types-Bwvss_gW.d.cts → types-2CMPwArl.d.ts} +2 -2
- package/dist/{types-CRC4lbPw.d.cts → types-3ZE32k8V.d.cts} +2 -2
- package/dist/{types-Do3__S4Q.d.cts → types-6oLbURTK.d.cts} +2 -2
- package/dist/{types-B4Vwz45w.d.cts → types-B452bFfS.d.ts} +2 -2
- package/dist/{types-zlYUn0oi.d.ts → types-B5FgsIiY.d.ts} +3 -3
- package/dist/{types-DMhgKHCP.d.cts → types-B6OG1lLf.d.cts} +2 -2
- package/dist/{types-DNwIMEuB.d.cts → types-BDGkMVWf.d.cts} +2 -2
- package/dist/{types-CQYyULrw.d.ts → types-BEEGI4aq.d.ts} +2 -2
- package/dist/{types-Bv2Ds1hL.d.cts → types-BJRRAQ9R.d.cts} +2 -2
- package/dist/{types-D5bxXqEU.d.ts → types-B_yv00AL.d.ts} +2 -2
- package/dist/{types-DoSZQ1Bi.d.ts → types-BhGr9OQ4.d.ts} +2 -2
- package/dist/{types-D-ufoskb.d.cts → types-BmcZyKgM.d.cts} +17 -2
- package/dist/{types-dU3EA8gk.d.ts → types-BnkHyxdp.d.ts} +2 -2
- package/dist/{types-B4ezB18r.d.cts → types-BqJycQNM.d.cts} +2 -2
- package/dist/{types-p_lWvuQJ.d.ts → types-ByKSM08P.d.ts} +2 -2
- package/dist/{types-Y4e8GGa3.d.cts → types-C3Kf_ggm.d.cts} +2 -2
- package/dist/{types-CIlBSV99.d.cts → types-CF5ZROX5.d.cts} +2 -2
- package/dist/{types-ChOJ-Az7.d.cts → types-CFuT8zr3.d.cts} +2 -2
- package/dist/{types-BXKL0wTI.d.cts → types-CNDemlfn.d.cts} +3 -3
- package/dist/{types-Rrcx-8LM.d.ts → types-CUovU--e.d.ts} +2 -2
- package/dist/{types-DU8aPTFW.d.cts → types-C_JO7FI9.d.cts} +2 -2
- package/dist/{types-BVJmcoqA.d.cts → types-CbPO9cGq.d.cts} +2 -2
- package/dist/{types-Dsf7CYmm.d.ts → types-Cg_66Toy.d.ts} +2 -2
- package/dist/{types-J_dgwMjP.d.ts → types-CjqFLXVx.d.cts} +2 -2
- package/dist/{types-CSE8bHiq.d.cts → types-Cm1iOHE5.d.cts} +3 -3
- package/dist/{types-BD0B1KQ6.d.ts → types-CnKiVVb8.d.ts} +2 -2
- package/dist/{types-D2hhEGem.d.cts → types-CrXoqs8E.d.cts} +2 -2
- package/dist/{types-DCARsJWs.d.cts → types-CuYaiy4R.d.cts} +4 -4
- package/dist/{types-DjSjUKUl.d.ts → types-Cvbcjdgf.d.ts} +2 -2
- package/dist/{types-DKKHKj19.d.cts → types-D0BOES7q.d.cts} +2 -2
- package/dist/{types-kGZQQcIK.d.ts → types-D0Gqu-Xz.d.cts} +2 -2
- package/dist/{types-d5Bt8Mr3.d.ts → types-D2J3SaoY.d.ts} +2 -2
- package/dist/{types-Bp8G9yta.d.ts → types-D4knWlwr.d.ts} +2 -2
- package/dist/{types-BDgOF2WN.d.ts → types-D6Fbf_y3.d.ts} +4 -4
- package/dist/{types-Tg3euEN_.d.ts → types-DMEl2iet.d.ts} +2 -2
- package/dist/{types-CTYTMXXj.d.ts → types-DPFG6AAA.d.ts} +2 -2
- package/dist/{types-BynQKst1.d.cts → types-DQguGTlM.d.cts} +2 -2
- package/dist/{types-DbthI3r-.d.ts → types-DaRxZt3v.d.ts} +2 -2
- package/dist/{types-DX1Dz0xK.d.ts → types-DgAMVyiT.d.ts} +2 -2
- package/dist/{types-Cr6WA6CN.d.ts → types-DhE7iY90.d.ts} +17 -2
- package/dist/{types-B6JcEPEu.d.ts → types-DiXeO0yB.d.ts} +2 -2
- package/dist/{types-CKdNf_2k.d.cts → types-DslO1S5E.d.cts} +3 -3
- package/dist/{types-Cf0WE6qK.d.cts → types-DtS7qAdz.d.cts} +2 -2
- package/dist/{types-C5B3Pfob.d.cts → types-DykEfF2N.d.cts} +2 -2
- package/dist/{types-DSWIIMdv.d.ts → types-EdL0Eb0B.d.ts} +3 -3
- package/dist/{types-DK1bSUNr.d.ts → types-Foy0RnqF.d.ts} +3 -3
- package/dist/{types-BEw98Dd2.d.cts → types-LOf_GCej.d.cts} +2 -2
- package/dist/{types-OHt0D_f2.d.ts → types-lZRyNwOH.d.ts} +2 -2
- package/dist/{types-CepTvkfm.d.ts → types-p6UYqJo_.d.ts} +2 -2
- package/dist/vault/index.d.cts +1 -1
- package/dist/vault/index.d.ts +1 -1
- package/dist/vault/types.d.cts +1 -1
- package/dist/vault/types.d.ts +1 -1
- package/package.json +1 -1
- package/surface/storage.md +5 -0
- package/dist/authClient-BM4L8XEN.js.map +0 -1
- package/dist/authClient-DspK50e7.cjs.map +0 -1
- package/dist/storage-BL-TfHp8.cjs.map +0 -1
- package/dist/storage-DEJN8sw-.js.map +0 -1
- package/dist/validateConnectionStatus-DV00sDmu.js +0 -34
- package/dist/validateConnectionStatus-DV00sDmu.js.map +0 -1
- package/dist/validateConnectionStatus-ckaHcRx8.cjs +0 -51
- package/dist/validateConnectionStatus-ckaHcRx8.cjs.map +0 -1
package/API-SURFACE.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Every namespace and method reachable from a ready `ProjectApi` — one project's api (`createKeboola(...).getProjectApi(id)` / `createLegacyKeboola(...).api`, or `useProjectApi()`). Generated from the TypeScript type checker — see `scripts/gen-surface.mjs`.
|
|
6
6
|
|
|
7
|
-
26 top-level namespaces,
|
|
7
|
+
26 top-level namespaces, 707 methods. This index lists method **names** only — full signatures live per namespace under [`surface/`](./surface). Open `surface/<namespace>.md` for the one you need.
|
|
8
8
|
|
|
9
9
|
## [`api.ai`](./surface/ai.md)
|
|
10
10
|
|
|
@@ -646,6 +646,8 @@ Every namespace and method reachable from a ready `ProjectApi` — one project's
|
|
|
646
646
|
- `snapshots.getSnapshot`
|
|
647
647
|
- `snapshots.getTableSnapshots`
|
|
648
648
|
- `stats.getRunIdStats`
|
|
649
|
+
- `tableList.getAllTables`
|
|
650
|
+
- `tableList.getTables`
|
|
649
651
|
- `tables.createAliasTable`
|
|
650
652
|
- `tables.createTableAsync`
|
|
651
653
|
- `tables.createTableDefinitionAsync`
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @keboola/api-client
|
|
2
2
|
|
|
3
|
+
## 56.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Storage client: `tableList` reads table list V2, the cursor-paginated `GET /v2/storage/branch/{branchId}/table-list`.
|
|
8
|
+
|
|
9
|
+
- `tableList.getTables` fetches one page with `include` (`columns`, `metadata`, `definition`), `filter` and the `page[limit]` / `page[after]` cursor.
|
|
10
|
+
- `tableList.getAllTables` follows `links.next` and returns every table; `include` types the result (`definition` is required when it was requested).
|
|
11
|
+
- `TableListItem.definition` is `null` for a typed table with non-native column types and for its aliases; read the table detail for those.
|
|
12
|
+
- `TableDefinition` is exported.
|
|
13
|
+
|
|
14
|
+
- The Lineage sidebar shows a table's native description, `definition.description`, as the table detail does.
|
|
15
|
+
|
|
16
|
+
- The lineage `TableNode` type carries `definition.description`.
|
|
17
|
+
- While the lineage API still serves a `KBC.description` metadata entry, the sidebar falls back to it when the native description is empty.
|
|
18
|
+
|
|
3
19
|
## 55.0.0
|
|
4
20
|
|
|
5
21
|
### Major Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Rr as paths, l as OpenapiReturnType } from "./index-DcKc3_Y1.cjs";
|
|
2
2
|
type SpecAdminRole = NonNullable<NonNullable<OpenapiReturnType<paths['/v2/storage/tokens/verify']['get']>['admin']>['role']>;
|
|
3
3
|
declare const AdminRole: {
|
|
4
4
|
readonly Admin: 'admin';
|
|
@@ -11,4 +11,4 @@ declare const AdminRole: {
|
|
|
11
11
|
};
|
|
12
12
|
type AdminRole = SpecAdminRole;
|
|
13
13
|
export { AdminRole as t };
|
|
14
|
-
//# sourceMappingURL=adminRoles-
|
|
14
|
+
//# sourceMappingURL=adminRoles-BFOPSedO.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Rr as paths, l as OpenapiReturnType } from "./index-DcKc3_Y1.js";
|
|
2
2
|
type SpecAdminRole = NonNullable<NonNullable<OpenapiReturnType<paths['/v2/storage/tokens/verify']['get']>['admin']>['role']>;
|
|
3
3
|
declare const AdminRole: {
|
|
4
4
|
readonly Admin: 'admin';
|
|
@@ -11,4 +11,4 @@ declare const AdminRole: {
|
|
|
11
11
|
};
|
|
12
12
|
type AdminRole = SpecAdminRole;
|
|
13
13
|
export { AdminRole as t };
|
|
14
|
-
//# sourceMappingURL=adminRoles-
|
|
14
|
+
//# sourceMappingURL=adminRoles-CUB0JddB.d.ts.map
|
package/dist/ai/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as DescribeConfigurationVersionBody, d as SuggestComponentBody, f as components, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, r as DescribeConfigurationBody, s as DocsQuestionBody } from "../types-
|
|
2
|
-
import { n as ClientInitOptions } from "../types-
|
|
1
|
+
import { a as DescribeConfigurationVersionBody, d as SuggestComponentBody, f as components, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, r as DescribeConfigurationBody, s as DocsQuestionBody } from "../types-D0BOES7q.cjs";
|
|
2
|
+
import { n as ClientInitOptions } from "../types-BqJycQNM.cjs";
|
|
3
3
|
declare const createAiClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
4
4
|
healthCheck: (signal?: AbortSignal) => Promise<{
|
|
5
5
|
status: 'ok';
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as DescribeConfigurationVersionBody, d as SuggestComponentBody, f as components, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, r as DescribeConfigurationBody, s as DocsQuestionBody } from "../types-
|
|
2
|
-
import { n as ClientInitOptions } from "../types-
|
|
1
|
+
import { a as DescribeConfigurationVersionBody, d as SuggestComponentBody, f as components, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, r as DescribeConfigurationBody, s as DocsQuestionBody } from "../types-B_yv00AL.js";
|
|
2
|
+
import { n as ClientInitOptions } from "../types-DMEl2iet.js";
|
|
3
3
|
declare const createAiClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
4
4
|
healthCheck: (signal?: AbortSignal) => Promise<{
|
|
5
5
|
status: 'ok';
|
package/dist/ai/types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DescribeConfigurationVersionBody, c as ErrorExplanation, d as SuggestComponentBody, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, n as ComponentSuggestion, o as DocsAnswer, r as DescribeConfigurationBody, s as DocsQuestionBody, t as ComponentDocsDetail, u as ObjectDescription } from "../types-
|
|
1
|
+
import { a as DescribeConfigurationVersionBody, c as ErrorExplanation, d as SuggestComponentBody, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, n as ComponentSuggestion, o as DocsAnswer, r as DescribeConfigurationBody, s as DocsQuestionBody, t as ComponentDocsDetail, u as ObjectDescription } from "../types-D0BOES7q.cjs";
|
|
2
2
|
export { ComponentDocsDetail, ComponentSuggestion, DescribeConfigurationBody, DescribeConfigurationMergeBody, DescribeConfigurationVersionBody, DocsAnswer, DocsQuestionBody, ErrorExplanation, ExplainErrorBody, ObjectDescription, SuggestComponentBody };
|
package/dist/ai/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DescribeConfigurationVersionBody, c as ErrorExplanation, d as SuggestComponentBody, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, n as ComponentSuggestion, o as DocsAnswer, r as DescribeConfigurationBody, s as DocsQuestionBody, t as ComponentDocsDetail, u as ObjectDescription } from "../types-
|
|
1
|
+
import { a as DescribeConfigurationVersionBody, c as ErrorExplanation, d as SuggestComponentBody, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, n as ComponentSuggestion, o as DocsAnswer, r as DescribeConfigurationBody, s as DocsQuestionBody, t as ComponentDocsDetail, u as ObjectDescription } from "../types-B_yv00AL.js";
|
|
2
2
|
export { ComponentDocsDetail, ComponentSuggestion, DescribeConfigurationBody, DescribeConfigurationMergeBody, DescribeConfigurationVersionBody, DocsAnswer, DocsQuestionBody, ErrorExplanation, ExplainErrorBody, ObjectDescription, SuggestComponentBody };
|
package/dist/apps/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { T as parseLogLines } from "../types-
|
|
2
|
-
import { t as createAppsClient } from "../index-
|
|
1
|
+
import { T as parseLogLines } from "../types-3ZE32k8V.cjs";
|
|
2
|
+
import { t as createAppsClient } from "../index-DAb1g6je.cjs";
|
|
3
3
|
export { createAppsClient, parseLogLines };
|
package/dist/apps/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { T as parseLogLines } from "../types-
|
|
2
|
-
import { t as createAppsClient } from "../index-
|
|
1
|
+
import { T as parseLogLines } from "../types-BhGr9OQ4.js";
|
|
2
|
+
import { t as createAppsClient } from "../index-C_A0JS9s.js";
|
|
3
3
|
export { createAppsClient, parseLogLines };
|
package/dist/apps/types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as RunId, S as GetLogsTailQuery, _ as DeploymentRunState, a as AppRun, b as GetAppsQuery, c as CreateCredentialBody, d as Credential, f as CredentialId, g as DeploymentId, h as DeploymentBuildState, i as AppPassword, l as CreateDeploymentBody, m as Deployment, n as AppGitRepo, o as AppState, p as CredentialList, r as AppId, s as CreateAppBody, t as App, u as CreatedCredential, v as GetAppGitEntrypointsQuery, w as LogEntry, x as GetDeploymentsQuery, y as GetAppRunsQuery } from "../types-
|
|
1
|
+
import { C as RunId, S as GetLogsTailQuery, _ as DeploymentRunState, a as AppRun, b as GetAppsQuery, c as CreateCredentialBody, d as Credential, f as CredentialId, g as DeploymentId, h as DeploymentBuildState, i as AppPassword, l as CreateDeploymentBody, m as Deployment, n as AppGitRepo, o as AppState, p as CredentialList, r as AppId, s as CreateAppBody, t as App, u as CreatedCredential, v as GetAppGitEntrypointsQuery, w as LogEntry, x as GetDeploymentsQuery, y as GetAppRunsQuery } from "../types-3ZE32k8V.cjs";
|
|
2
2
|
export { App, AppGitRepo, AppId, AppPassword, AppRun, AppState, CreateAppBody, CreateCredentialBody, CreateDeploymentBody, CreatedCredential, Credential, CredentialId, CredentialList, Deployment, DeploymentBuildState, DeploymentId, DeploymentRunState, GetAppGitEntrypointsQuery, GetAppRunsQuery, GetAppsQuery, GetDeploymentsQuery, GetLogsTailQuery, type LogEntry, RunId };
|
package/dist/apps/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as RunId, S as GetLogsTailQuery, _ as DeploymentRunState, a as AppRun, b as GetAppsQuery, c as CreateCredentialBody, d as Credential, f as CredentialId, g as DeploymentId, h as DeploymentBuildState, i as AppPassword, l as CreateDeploymentBody, m as Deployment, n as AppGitRepo, o as AppState, p as CredentialList, r as AppId, s as CreateAppBody, t as App, u as CreatedCredential, v as GetAppGitEntrypointsQuery, w as LogEntry, x as GetDeploymentsQuery, y as GetAppRunsQuery } from "../types-
|
|
1
|
+
import { C as RunId, S as GetLogsTailQuery, _ as DeploymentRunState, a as AppRun, b as GetAppsQuery, c as CreateCredentialBody, d as Credential, f as CredentialId, g as DeploymentId, h as DeploymentBuildState, i as AppPassword, l as CreateDeploymentBody, m as Deployment, n as AppGitRepo, o as AppState, p as CredentialList, r as AppId, s as CreateAppBody, t as App, u as CreatedCredential, v as GetAppGitEntrypointsQuery, w as LogEntry, x as GetDeploymentsQuery, y as GetAppRunsQuery } from "../types-BhGr9OQ4.js";
|
|
2
2
|
export { App, AppGitRepo, AppId, AppPassword, AppRun, AppState, CreateAppBody, CreateCredentialBody, CreateDeploymentBody, CreatedCredential, Credential, CredentialId, CredentialList, Deployment, DeploymentBuildState, DeploymentId, DeploymentRunState, GetAppGitEntrypointsQuery, GetAppRunsQuery, GetAppsQuery, GetDeploymentsQuery, GetLogsTailQuery, type LogEntry, RunId };
|
package/dist/assets/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-BqJycQNM.cjs";
|
|
2
2
|
declare const createAssetsClient: ({ baseUrl, middlewares }: Omit<ClientInitOptions, 'auth'>) => {
|
|
3
3
|
getPublishedChangelogPosts: (signal?: AbortSignal) => Promise<{
|
|
4
4
|
title: string;
|
package/dist/assets/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-DMEl2iet.js";
|
|
2
2
|
declare const createAssetsClient: ({ baseUrl, middlewares }: Omit<ClientInitOptions, 'auth'>) => {
|
|
3
3
|
getPublishedChangelogPosts: (signal?: AbortSignal) => Promise<{
|
|
4
4
|
title: string;
|
package/dist/auth/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_authClient = require("../authClient-
|
|
2
|
+
const require_authClient = require("../authClient-C9QqhT2M.cjs");
|
|
3
3
|
exports.MFA_METHOD = require_authClient.MFA_METHOD;
|
|
4
4
|
exports.apiLoginResultSchema = require_authClient.apiLoginResultSchema;
|
|
5
5
|
exports.apiLoginSuccessSchema = require_authClient.apiLoginSuccessSchema;
|
package/dist/auth/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as PasswordInput, C as ApiLoginSuccess, D as LoginUser, E as LoginResultFor, F as mfaChallengeSchema, I as oidcInputSchema, L as passwordInputSchema, M as apiLoginSuccessSchema, N as browserLoginResultSchema, O as MfaChallenge, P as browserLoginSuccessSchema, S as ApiLoginResult, T as BrowserLoginSuccess, _ as MfaWebauthnInput, a as RefreshTokenInput, b as mfaWebauthnInputSchema, c as ChangePasswordInput, d as changeInputSchema, f as resetInputSchema, g as MfaMethod, h as MfaCodeInput, i as RefreshSessionInput, j as apiLoginResultSchema, k as OidcInput, l as ResetInput, m as MFA_METHOD, n as AuthOpenApiFetchClient, o as refreshSessionInputSchema, p as resetRequestInputSchema, r as createAuthClient, s as refreshTokenInputSchema, t as AuthClientInitOptions, u as ResetRequestInput, v as TotpVerifyInput, w as BrowserLoginResult, x as totpVerifyInputSchema, y as mfaCodeInputSchema } from "../authClient-
|
|
1
|
+
import { A as PasswordInput, C as ApiLoginSuccess, D as LoginUser, E as LoginResultFor, F as mfaChallengeSchema, I as oidcInputSchema, L as passwordInputSchema, M as apiLoginSuccessSchema, N as browserLoginResultSchema, O as MfaChallenge, P as browserLoginSuccessSchema, S as ApiLoginResult, T as BrowserLoginSuccess, _ as MfaWebauthnInput, a as RefreshTokenInput, b as mfaWebauthnInputSchema, c as ChangePasswordInput, d as changeInputSchema, f as resetInputSchema, g as MfaMethod, h as MfaCodeInput, i as RefreshSessionInput, j as apiLoginResultSchema, k as OidcInput, l as ResetInput, m as MFA_METHOD, n as AuthOpenApiFetchClient, o as refreshSessionInputSchema, p as resetRequestInputSchema, r as createAuthClient, s as refreshTokenInputSchema, t as AuthClientInitOptions, u as ResetRequestInput, v as TotpVerifyInput, w as BrowserLoginResult, x as totpVerifyInputSchema, y as mfaCodeInputSchema } from "../authClient-DOetdp2k.cjs";
|
|
2
2
|
export { ApiLoginResult, ApiLoginSuccess, AuthClientInitOptions, AuthOpenApiFetchClient, BrowserLoginResult, BrowserLoginSuccess, ChangePasswordInput, LoginResultFor, LoginUser, MFA_METHOD, MfaChallenge, MfaCodeInput, MfaMethod, MfaWebauthnInput, OidcInput, PasswordInput, RefreshSessionInput, RefreshTokenInput, ResetInput, ResetRequestInput, TotpVerifyInput, apiLoginResultSchema, apiLoginSuccessSchema, browserLoginResultSchema, browserLoginSuccessSchema, changeInputSchema, createAuthClient, mfaChallengeSchema, mfaCodeInputSchema, mfaWebauthnInputSchema, oidcInputSchema, passwordInputSchema, refreshSessionInputSchema, refreshTokenInputSchema, resetInputSchema, resetRequestInputSchema, totpVerifyInputSchema };
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as PasswordInput, C as ApiLoginSuccess, D as LoginUser, E as LoginResultFor, F as mfaChallengeSchema, I as oidcInputSchema, L as passwordInputSchema, M as apiLoginSuccessSchema, N as browserLoginResultSchema, O as MfaChallenge, P as browserLoginSuccessSchema, S as ApiLoginResult, T as BrowserLoginSuccess, _ as MfaWebauthnInput, a as RefreshTokenInput, b as mfaWebauthnInputSchema, c as ChangePasswordInput, d as changeInputSchema, f as resetInputSchema, g as MfaMethod, h as MfaCodeInput, i as RefreshSessionInput, j as apiLoginResultSchema, k as OidcInput, l as ResetInput, m as MFA_METHOD, n as AuthOpenApiFetchClient, o as refreshSessionInputSchema, p as resetRequestInputSchema, r as createAuthClient, s as refreshTokenInputSchema, t as AuthClientInitOptions, u as ResetRequestInput, v as TotpVerifyInput, w as BrowserLoginResult, x as totpVerifyInputSchema, y as mfaCodeInputSchema } from "../authClient-
|
|
1
|
+
import { A as PasswordInput, C as ApiLoginSuccess, D as LoginUser, E as LoginResultFor, F as mfaChallengeSchema, I as oidcInputSchema, L as passwordInputSchema, M as apiLoginSuccessSchema, N as browserLoginResultSchema, O as MfaChallenge, P as browserLoginSuccessSchema, S as ApiLoginResult, T as BrowserLoginSuccess, _ as MfaWebauthnInput, a as RefreshTokenInput, b as mfaWebauthnInputSchema, c as ChangePasswordInput, d as changeInputSchema, f as resetInputSchema, g as MfaMethod, h as MfaCodeInput, i as RefreshSessionInput, j as apiLoginResultSchema, k as OidcInput, l as ResetInput, m as MFA_METHOD, n as AuthOpenApiFetchClient, o as refreshSessionInputSchema, p as resetRequestInputSchema, r as createAuthClient, s as refreshTokenInputSchema, t as AuthClientInitOptions, u as ResetRequestInput, v as TotpVerifyInput, w as BrowserLoginResult, x as totpVerifyInputSchema, y as mfaCodeInputSchema } from "../authClient-Dgyb0EFi.js";
|
|
2
2
|
export { ApiLoginResult, ApiLoginSuccess, AuthClientInitOptions, AuthOpenApiFetchClient, BrowserLoginResult, BrowserLoginSuccess, ChangePasswordInput, LoginResultFor, LoginUser, MFA_METHOD, MfaChallenge, MfaCodeInput, MfaMethod, MfaWebauthnInput, OidcInput, PasswordInput, RefreshSessionInput, RefreshTokenInput, ResetInput, ResetRequestInput, TotpVerifyInput, apiLoginResultSchema, apiLoginSuccessSchema, browserLoginResultSchema, browserLoginSuccessSchema, changeInputSchema, createAuthClient, mfaChallengeSchema, mfaCodeInputSchema, mfaWebauthnInputSchema, oidcInputSchema, passwordInputSchema, refreshSessionInputSchema, refreshTokenInputSchema, resetInputSchema, resetRequestInputSchema, totpVerifyInputSchema };
|
package/dist/auth/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { s as MFA_METHOD,
|
|
1
|
+
export { s as MFA_METHOD, d as apiLoginResultSchema, f as apiLoginSuccessSchema, p as browserLoginResultSchema, m as browserLoginSuccessSchema, i as changeInputSchema, t as createAuthClient, h as mfaChallengeSchema, c as mfaCodeInputSchema, l as mfaWebauthnInputSchema, g as oidcInputSchema, _ as passwordInputSchema, n as refreshSessionInputSchema, r as refreshTokenInputSchema, a as resetInputSchema, o as resetRequestInputSchema, u as totpVerifyInputSchema } from "../authClient-B_Mb4Vzs.js";
|
package/dist/auth/types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as CreateDeviceAuthorizationBody, A as PatScopeInput, B as GetMeMaintainersResult, C as GetPkceTokenResult, D as ExchangePatBodyRaw, E as CreatePatResult, F as TotpVerifyResult, G as MeMaintainer, H as GetMeOrganizationsResult, I as VerifyMfaBody, J as MeResult, K as MeOrganization, L as VerifyMfaResult, M as DisableTotpPath, N as RegenerateRecoveryCodesResult, O as ExchangePatInput, P as TotpSetupResult, Q as ApproveDeviceAuthorizationResult, R as VerifyMfaType, S as GetPkceTokenBody, T as CreatePatInput, U as GetMeProjectsQuery, V as GetMeOrganizationsQuery, W as GetMeProjectsResult, X as LoginBody, Y as MeUser, Z as ApproveDeviceAuthorizationBody, _ as RevokeSessionPath, a as RemoveWebauthnInput, b as InitiateSamlBody, c as IntrospectTokenResult, d as RefreshTokenResult, et as CreateDeviceAuthorizationResult, f as RevokeTokenBody, g as SudoResult, h as SudoChallengeResult, i as RegisterWebauthnResult, j as RevokePatPath, k as ListPatsResult, l as RefreshTokenBody, m as SudoBodyRaw, n as RegisterWebauthnInput, nt as GetDeviceAuthorizationTokenResult, o as RemoveWebauthnPath, p as SudoBody, q as MeProject, r as RegisterWebauthnOptionsResult, s as RemoveWebauthnQuery, t as ListWebauthnCredentialsResult, tt as GetDeviceAuthorizationTokenBody, u as RefreshTokenPartialBody, v as AssertSamlBody, w as CreatePatBodyRaw, x as InitiateSamlResult, y as AssertSamlResult, z as GetMeMaintainersQuery } from "../types-
|
|
1
|
+
import { $ as CreateDeviceAuthorizationBody, A as PatScopeInput, B as GetMeMaintainersResult, C as GetPkceTokenResult, D as ExchangePatBodyRaw, E as CreatePatResult, F as TotpVerifyResult, G as MeMaintainer, H as GetMeOrganizationsResult, I as VerifyMfaBody, J as MeResult, K as MeOrganization, L as VerifyMfaResult, M as DisableTotpPath, N as RegenerateRecoveryCodesResult, O as ExchangePatInput, P as TotpSetupResult, Q as ApproveDeviceAuthorizationResult, R as VerifyMfaType, S as GetPkceTokenBody, T as CreatePatInput, U as GetMeProjectsQuery, V as GetMeOrganizationsQuery, W as GetMeProjectsResult, X as LoginBody, Y as MeUser, Z as ApproveDeviceAuthorizationBody, _ as RevokeSessionPath, a as RemoveWebauthnInput, b as InitiateSamlBody, c as IntrospectTokenResult, d as RefreshTokenResult, et as CreateDeviceAuthorizationResult, f as RevokeTokenBody, g as SudoResult, h as SudoChallengeResult, i as RegisterWebauthnResult, j as RevokePatPath, k as ListPatsResult, l as RefreshTokenBody, m as SudoBodyRaw, n as RegisterWebauthnInput, nt as GetDeviceAuthorizationTokenResult, o as RemoveWebauthnPath, p as SudoBody, q as MeProject, r as RegisterWebauthnOptionsResult, s as RemoveWebauthnQuery, t as ListWebauthnCredentialsResult, tt as GetDeviceAuthorizationTokenBody, u as RefreshTokenPartialBody, v as AssertSamlBody, w as CreatePatBodyRaw, x as InitiateSamlResult, y as AssertSamlResult, z as GetMeMaintainersQuery } from "../types-DykEfF2N.cjs";
|
|
2
2
|
export { ApproveDeviceAuthorizationBody, ApproveDeviceAuthorizationResult, AssertSamlBody, AssertSamlResult, CreateDeviceAuthorizationBody, CreateDeviceAuthorizationResult, CreatePatBodyRaw, CreatePatInput, CreatePatResult, DisableTotpPath, ExchangePatBodyRaw, ExchangePatInput, GetDeviceAuthorizationTokenBody, GetDeviceAuthorizationTokenResult, GetMeMaintainersQuery, GetMeMaintainersResult, GetMeOrganizationsQuery, GetMeOrganizationsResult, GetMeProjectsQuery, GetMeProjectsResult, GetPkceTokenBody, GetPkceTokenResult, InitiateSamlBody, InitiateSamlResult, IntrospectTokenResult, ListPatsResult, ListWebauthnCredentialsResult, LoginBody, MeMaintainer, MeOrganization, MeProject, MeResult, MeUser, PatScopeInput, RefreshTokenBody, RefreshTokenPartialBody, RefreshTokenResult, RegenerateRecoveryCodesResult, RegisterWebauthnInput, RegisterWebauthnOptionsResult, RegisterWebauthnResult, RemoveWebauthnInput, RemoveWebauthnPath, RemoveWebauthnQuery, RevokePatPath, RevokeSessionPath, RevokeTokenBody, SudoBody, SudoBodyRaw, SudoChallengeResult, SudoResult, TotpSetupResult, TotpVerifyResult, VerifyMfaBody, VerifyMfaResult, VerifyMfaType };
|
package/dist/auth/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as CreateDeviceAuthorizationBody, A as PatScopeInput, B as GetMeMaintainersResult, C as GetPkceTokenResult, D as ExchangePatBodyRaw, E as CreatePatResult, F as TotpVerifyResult, G as MeMaintainer, H as GetMeOrganizationsResult, I as VerifyMfaBody, J as MeResult, K as MeOrganization, L as VerifyMfaResult, M as DisableTotpPath, N as RegenerateRecoveryCodesResult, O as ExchangePatInput, P as TotpSetupResult, Q as ApproveDeviceAuthorizationResult, R as VerifyMfaType, S as GetPkceTokenBody, T as CreatePatInput, U as GetMeProjectsQuery, V as GetMeOrganizationsQuery, W as GetMeProjectsResult, X as LoginBody, Y as MeUser, Z as ApproveDeviceAuthorizationBody, _ as RevokeSessionPath, a as RemoveWebauthnInput, b as InitiateSamlBody, c as IntrospectTokenResult, d as RefreshTokenResult, et as CreateDeviceAuthorizationResult, f as RevokeTokenBody, g as SudoResult, h as SudoChallengeResult, i as RegisterWebauthnResult, j as RevokePatPath, k as ListPatsResult, l as RefreshTokenBody, m as SudoBodyRaw, n as RegisterWebauthnInput, nt as GetDeviceAuthorizationTokenResult, o as RemoveWebauthnPath, p as SudoBody, q as MeProject, r as RegisterWebauthnOptionsResult, s as RemoveWebauthnQuery, t as ListWebauthnCredentialsResult, tt as GetDeviceAuthorizationTokenBody, u as RefreshTokenPartialBody, v as AssertSamlBody, w as CreatePatBodyRaw, x as InitiateSamlResult, y as AssertSamlResult, z as GetMeMaintainersQuery } from "../types-
|
|
1
|
+
import { $ as CreateDeviceAuthorizationBody, A as PatScopeInput, B as GetMeMaintainersResult, C as GetPkceTokenResult, D as ExchangePatBodyRaw, E as CreatePatResult, F as TotpVerifyResult, G as MeMaintainer, H as GetMeOrganizationsResult, I as VerifyMfaBody, J as MeResult, K as MeOrganization, L as VerifyMfaResult, M as DisableTotpPath, N as RegenerateRecoveryCodesResult, O as ExchangePatInput, P as TotpSetupResult, Q as ApproveDeviceAuthorizationResult, R as VerifyMfaType, S as GetPkceTokenBody, T as CreatePatInput, U as GetMeProjectsQuery, V as GetMeOrganizationsQuery, W as GetMeProjectsResult, X as LoginBody, Y as MeUser, Z as ApproveDeviceAuthorizationBody, _ as RevokeSessionPath, a as RemoveWebauthnInput, b as InitiateSamlBody, c as IntrospectTokenResult, d as RefreshTokenResult, et as CreateDeviceAuthorizationResult, f as RevokeTokenBody, g as SudoResult, h as SudoChallengeResult, i as RegisterWebauthnResult, j as RevokePatPath, k as ListPatsResult, l as RefreshTokenBody, m as SudoBodyRaw, n as RegisterWebauthnInput, nt as GetDeviceAuthorizationTokenResult, o as RemoveWebauthnPath, p as SudoBody, q as MeProject, r as RegisterWebauthnOptionsResult, s as RemoveWebauthnQuery, t as ListWebauthnCredentialsResult, tt as GetDeviceAuthorizationTokenBody, u as RefreshTokenPartialBody, v as AssertSamlBody, w as CreatePatBodyRaw, x as InitiateSamlResult, y as AssertSamlResult, z as GetMeMaintainersQuery } from "../types-Cvbcjdgf.js";
|
|
2
2
|
export { ApproveDeviceAuthorizationBody, ApproveDeviceAuthorizationResult, AssertSamlBody, AssertSamlResult, CreateDeviceAuthorizationBody, CreateDeviceAuthorizationResult, CreatePatBodyRaw, CreatePatInput, CreatePatResult, DisableTotpPath, ExchangePatBodyRaw, ExchangePatInput, GetDeviceAuthorizationTokenBody, GetDeviceAuthorizationTokenResult, GetMeMaintainersQuery, GetMeMaintainersResult, GetMeOrganizationsQuery, GetMeOrganizationsResult, GetMeProjectsQuery, GetMeProjectsResult, GetPkceTokenBody, GetPkceTokenResult, InitiateSamlBody, InitiateSamlResult, IntrospectTokenResult, ListPatsResult, ListWebauthnCredentialsResult, LoginBody, MeMaintainer, MeOrganization, MeProject, MeResult, MeUser, PatScopeInput, RefreshTokenBody, RefreshTokenPartialBody, RefreshTokenResult, RegenerateRecoveryCodesResult, RegisterWebauthnInput, RegisterWebauthnOptionsResult, RegisterWebauthnResult, RemoveWebauthnInput, RemoveWebauthnPath, RemoveWebauthnQuery, RevokePatPath, RevokeSessionPath, RevokeTokenBody, SudoBody, SudoBodyRaw, SudoChallengeResult, SudoResult, TotpSetupResult, TotpVerifyResult, VerifyMfaBody, VerifyMfaResult, VerifyMfaType };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { s as HttpHeader, v as KeboolaHttpHeader } from "./createFetchClient-Dc_ZMuq7.js";
|
|
2
|
-
import {
|
|
2
|
+
import { r as validateConnectionStatus, t as collectByCursor } from "./collectByCursor-2-8SuJ-8.js";
|
|
3
3
|
import { t as createGenericFetchClient } from "./createGenericFetchClient-Ba4E4T-Y.js";
|
|
4
4
|
import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-DSk29o_s.js";
|
|
5
|
-
import { t as createAbortError } from "./createAbortError-c6ekCpRy.js";
|
|
6
5
|
import * as z$1 from "zod";
|
|
7
6
|
// src/clients/auth/device/device.ts
|
|
8
7
|
const createDevice = (client) => {
|
|
@@ -144,47 +143,6 @@ const createManageTokens = (client) => {
|
|
|
144
143
|
revoke
|
|
145
144
|
};
|
|
146
145
|
};
|
|
147
|
-
// src/utils/async/collectByCursor.ts
|
|
148
|
-
/**
|
|
149
|
-
* The `page[after]` cursor `links.next` carries; `undefined` on the last page.
|
|
150
|
-
*
|
|
151
|
-
* - Read from the link, not rebuilt from the last row, so the encoding stays the server's.
|
|
152
|
-
* - Only the query is parsed, so a relative link works too.
|
|
153
|
-
*/
|
|
154
|
-
const nextCursorOf = (next) => {
|
|
155
|
-
if (next === null) return void 0;
|
|
156
|
-
const queryStart = next.indexOf("?");
|
|
157
|
-
if (queryStart === -1) return void 0;
|
|
158
|
-
const query = next.slice(queryStart + 1).split("#")[0];
|
|
159
|
-
return new URLSearchParams(query).get("page[after]") ?? void 0;
|
|
160
|
-
};
|
|
161
|
-
/**
|
|
162
|
-
* Collects items from a cursor-paginated endpoint — up to `limit`, or all when it is omitted.
|
|
163
|
-
*
|
|
164
|
-
* - Calls `fetchFrom` sequentially with the cursor each `links.next` carries, and hands it `pageSize`.
|
|
165
|
-
* - Ends on a `null` `links.next`, or on a link without a `page[after]`.
|
|
166
|
-
* - A cursor seen before means the server is looping; the walk throws rather than spin.
|
|
167
|
-
*/
|
|
168
|
-
const collectByCursor = async ({ fetchFrom, pageSize, limit, signal }) => {
|
|
169
|
-
if (signal?.aborted) throw createAbortError(signal.reason);
|
|
170
|
-
if (limit !== void 0 && limit < 0) throw new Error("Invalid collectByCursor limit");
|
|
171
|
-
if (pageSize !== void 0 && pageSize < 1) throw new Error("Invalid collectByCursor pageSize");
|
|
172
|
-
const items = [];
|
|
173
|
-
if (limit === 0) return items;
|
|
174
|
-
let after;
|
|
175
|
-
const seen = /* @__PURE__ */ new Set();
|
|
176
|
-
do {
|
|
177
|
-
const page = await fetchFrom(after, pageSize, signal);
|
|
178
|
-
items.push(...page.data);
|
|
179
|
-
if (limit !== void 0 && items.length >= limit) return items.slice(0, limit);
|
|
180
|
-
after = nextCursorOf(page.links.next);
|
|
181
|
-
if (after !== void 0) {
|
|
182
|
-
if (seen.has(after)) throw new Error(`collectByCursor: links.next repeats the cursor ${after}`);
|
|
183
|
-
seen.add(after);
|
|
184
|
-
}
|
|
185
|
-
} while (after !== void 0);
|
|
186
|
-
return items;
|
|
187
|
-
};
|
|
188
146
|
// src/clients/auth/me/me.ts
|
|
189
147
|
const PAGE_LIMIT = 200;
|
|
190
148
|
/**
|
|
@@ -574,6 +532,6 @@ const createAuthClient = ({ baseUrl, middlewares }) => {
|
|
|
574
532
|
webauthn: createWebauthn(client)
|
|
575
533
|
};
|
|
576
534
|
};
|
|
577
|
-
export {
|
|
535
|
+
export { passwordInputSchema as _, resetInputSchema as a, mfaCodeInputSchema as c, apiLoginResultSchema as d, apiLoginSuccessSchema as f, oidcInputSchema as g, mfaChallengeSchema as h, changeInputSchema as i, mfaWebauthnInputSchema as l, browserLoginSuccessSchema as m, refreshSessionInputSchema as n, resetRequestInputSchema as o, browserLoginResultSchema as p, refreshTokenInputSchema as r, MFA_METHOD as s, createAuthClient as t, totpVerifyInputSchema as u };
|
|
578
536
|
|
|
579
|
-
//# sourceMappingURL=authClient-
|
|
537
|
+
//# sourceMappingURL=authClient-B_Mb4Vzs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authClient-B_Mb4Vzs.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/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 { 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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AM;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,9 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-CmQyd0Gu.cjs");
|
|
2
2
|
const require_createFetchClient = require("./createFetchClient-CDKSkd7i.cjs");
|
|
3
|
-
const
|
|
3
|
+
const require_collectByCursor = require("./collectByCursor-D58__WD1.cjs");
|
|
4
4
|
const require_createGenericFetchClient = require("./createGenericFetchClient-BuYzzV_D.cjs");
|
|
5
5
|
const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-dkssExkU.cjs");
|
|
6
|
-
const require_createAbortError = require("./createAbortError-Dzc9yObN.cjs");
|
|
7
6
|
let zod = require("zod");
|
|
8
7
|
zod = require_rolldown_runtime.__toESM(zod, 1);
|
|
9
8
|
// src/clients/auth/device/device.ts
|
|
@@ -146,47 +145,6 @@ const createManageTokens = (client) => {
|
|
|
146
145
|
revoke
|
|
147
146
|
};
|
|
148
147
|
};
|
|
149
|
-
// src/utils/async/collectByCursor.ts
|
|
150
|
-
/**
|
|
151
|
-
* The `page[after]` cursor `links.next` carries; `undefined` on the last page.
|
|
152
|
-
*
|
|
153
|
-
* - Read from the link, not rebuilt from the last row, so the encoding stays the server's.
|
|
154
|
-
* - Only the query is parsed, so a relative link works too.
|
|
155
|
-
*/
|
|
156
|
-
const nextCursorOf = (next) => {
|
|
157
|
-
if (next === null) return void 0;
|
|
158
|
-
const queryStart = next.indexOf("?");
|
|
159
|
-
if (queryStart === -1) return void 0;
|
|
160
|
-
const query = next.slice(queryStart + 1).split("#")[0];
|
|
161
|
-
return new URLSearchParams(query).get("page[after]") ?? void 0;
|
|
162
|
-
};
|
|
163
|
-
/**
|
|
164
|
-
* Collects items from a cursor-paginated endpoint — up to `limit`, or all when it is omitted.
|
|
165
|
-
*
|
|
166
|
-
* - Calls `fetchFrom` sequentially with the cursor each `links.next` carries, and hands it `pageSize`.
|
|
167
|
-
* - Ends on a `null` `links.next`, or on a link without a `page[after]`.
|
|
168
|
-
* - A cursor seen before means the server is looping; the walk throws rather than spin.
|
|
169
|
-
*/
|
|
170
|
-
const collectByCursor = async ({ fetchFrom, pageSize, limit, signal }) => {
|
|
171
|
-
if (signal?.aborted) throw require_createAbortError.createAbortError(signal.reason);
|
|
172
|
-
if (limit !== void 0 && limit < 0) throw new Error("Invalid collectByCursor limit");
|
|
173
|
-
if (pageSize !== void 0 && pageSize < 1) throw new Error("Invalid collectByCursor pageSize");
|
|
174
|
-
const items = [];
|
|
175
|
-
if (limit === 0) return items;
|
|
176
|
-
let after;
|
|
177
|
-
const seen = /* @__PURE__ */ new Set();
|
|
178
|
-
do {
|
|
179
|
-
const page = await fetchFrom(after, pageSize, signal);
|
|
180
|
-
items.push(...page.data);
|
|
181
|
-
if (limit !== void 0 && items.length >= limit) return items.slice(0, limit);
|
|
182
|
-
after = nextCursorOf(page.links.next);
|
|
183
|
-
if (after !== void 0) {
|
|
184
|
-
if (seen.has(after)) throw new Error(`collectByCursor: links.next repeats the cursor ${after}`);
|
|
185
|
-
seen.add(after);
|
|
186
|
-
}
|
|
187
|
-
} while (after !== void 0);
|
|
188
|
-
return items;
|
|
189
|
-
};
|
|
190
148
|
// src/clients/auth/me/me.ts
|
|
191
149
|
const PAGE_LIMIT = 200;
|
|
192
150
|
/**
|
|
@@ -214,7 +172,7 @@ const createMe = (client) => {
|
|
|
214
172
|
return data;
|
|
215
173
|
};
|
|
216
174
|
/** Every organization the caller reaches, across all pages. */
|
|
217
|
-
const getAllOrganizations = (signal) => collectByCursor({
|
|
175
|
+
const getAllOrganizations = (signal) => require_collectByCursor.collectByCursor({
|
|
218
176
|
pageSize: PAGE_LIMIT,
|
|
219
177
|
signal,
|
|
220
178
|
fetchFrom: (after, limit, pageSignal) => getOrganizations({ page: {
|
|
@@ -223,7 +181,7 @@ const createMe = (client) => {
|
|
|
223
181
|
} }, pageSignal)
|
|
224
182
|
});
|
|
225
183
|
/** Every project the caller can open, across all pages. */
|
|
226
|
-
const getAllProjects = (signal) => collectByCursor({
|
|
184
|
+
const getAllProjects = (signal) => require_collectByCursor.collectByCursor({
|
|
227
185
|
pageSize: PAGE_LIMIT,
|
|
228
186
|
signal,
|
|
229
187
|
fetchFrom: (after, limit, pageSignal) => getProjects({ page: {
|
|
@@ -548,12 +506,12 @@ const createAuthClient = ({ baseUrl, middlewares }) => {
|
|
|
548
506
|
const client = require_createOpenapiFetchClient.createOpenapiFetchClient({
|
|
549
507
|
baseUrl,
|
|
550
508
|
middlewares,
|
|
551
|
-
validateStatus:
|
|
509
|
+
validateStatus: require_collectByCursor.validateConnectionStatus
|
|
552
510
|
});
|
|
553
511
|
const genericClient = require_createGenericFetchClient.createGenericFetchClient({
|
|
554
512
|
baseUrl,
|
|
555
513
|
middlewares,
|
|
556
|
-
validateStatus:
|
|
514
|
+
validateStatus: require_collectByCursor.validateConnectionStatus
|
|
557
515
|
});
|
|
558
516
|
const healthCheck = async (signal) => {
|
|
559
517
|
const { data } = await genericClient.get("/health-check", {}, { signal });
|
|
@@ -612,12 +570,6 @@ Object.defineProperty(exports, "changeInputSchema", {
|
|
|
612
570
|
return changeInputSchema;
|
|
613
571
|
}
|
|
614
572
|
});
|
|
615
|
-
Object.defineProperty(exports, "collectByCursor", {
|
|
616
|
-
enumerable: true,
|
|
617
|
-
get: function() {
|
|
618
|
-
return collectByCursor;
|
|
619
|
-
}
|
|
620
|
-
});
|
|
621
573
|
Object.defineProperty(exports, "createAuthClient", {
|
|
622
574
|
enumerable: true,
|
|
623
575
|
get: function() {
|
|
@@ -642,12 +594,6 @@ Object.defineProperty(exports, "mfaWebauthnInputSchema", {
|
|
|
642
594
|
return mfaWebauthnInputSchema;
|
|
643
595
|
}
|
|
644
596
|
});
|
|
645
|
-
Object.defineProperty(exports, "nextCursorOf", {
|
|
646
|
-
enumerable: true,
|
|
647
|
-
get: function() {
|
|
648
|
-
return nextCursorOf;
|
|
649
|
-
}
|
|
650
|
-
});
|
|
651
597
|
Object.defineProperty(exports, "oidcInputSchema", {
|
|
652
598
|
enumerable: true,
|
|
653
599
|
get: function() {
|
|
@@ -691,4 +637,4 @@ Object.defineProperty(exports, "totpVerifyInputSchema", {
|
|
|
691
637
|
}
|
|
692
638
|
});
|
|
693
639
|
|
|
694
|
-
//# sourceMappingURL=authClient-
|
|
640
|
+
//# sourceMappingURL=authClient-C9QqhT2M.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authClient-C9QqhT2M.cjs","names":["z","collectByCursor","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/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 { 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;CAC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