@keboola/api-client 49.0.0 → 51.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +109 -95
- package/API-SURFACE.md +13 -31
- package/CHANGELOG.md +54 -0
- package/README.md +33 -29
- package/dist/{ManagementSessionMintError-Cu9beG7j.cjs → ManagementSessionMintError-ByOulHQH.cjs} +4 -6
- package/dist/{ManagementSessionMintError-Cu9beG7j.cjs.map → ManagementSessionMintError-ByOulHQH.cjs.map} +1 -1
- package/dist/{ManagementSessionMintError-4Pkn5Oob.js → ManagementSessionMintError-DNMbYauw.js} +4 -6
- package/dist/{ManagementSessionMintError-4Pkn5Oob.js.map → ManagementSessionMintError-DNMbYauw.js.map} +1 -1
- package/dist/{QueryJobError-ZZZ043Nm.js → QueryJobError-Iq9O90Uh.js} +2 -3
- package/dist/{QueryJobError-ZZZ043Nm.js.map → QueryJobError-Iq9O90Uh.js.map} +1 -1
- package/dist/{QueryJobError-irGiP5zh.cjs → QueryJobError-Oy0fl4aw.cjs} +2 -3
- package/dist/{QueryJobError-irGiP5zh.cjs.map → QueryJobError-Oy0fl4aw.cjs.map} +1 -1
- package/dist/{QueueJobError-8bThS_Mc.js → QueueJobError-BJNUINXW.js} +2 -3
- package/dist/{QueueJobError-8bThS_Mc.js.map → QueueJobError-BJNUINXW.js.map} +1 -1
- package/dist/{QueueJobError-6qSEizWo.cjs → QueueJobError-DruZK3tc.cjs} +2 -3
- package/dist/{QueueJobError-6qSEizWo.cjs.map → QueueJobError-DruZK3tc.cjs.map} +1 -1
- package/dist/{SyncActionError-CoZFsdUk.js → SyncActionError-DuGcDbkd.js} +2 -3
- package/dist/{SyncActionError-CoZFsdUk.js.map → SyncActionError-DuGcDbkd.js.map} +1 -1
- package/dist/{SyncActionError-BG0zwchi.cjs → SyncActionError-mbpVg63X.cjs} +2 -3
- package/dist/{SyncActionError-BG0zwchi.cjs.map → SyncActionError-mbpVg63X.cjs.map} +1 -1
- package/dist/{UserError-By_Zckmc.js → UserError-BxoOJJ_u.js} +2 -3
- package/dist/{UserError-By_Zckmc.js.map → UserError-BxoOJJ_u.js.map} +1 -1
- package/dist/{UserError-CSGO1qII.cjs → UserError-D4P9Tbhf.cjs} +2 -3
- package/dist/{UserError-CSGO1qII.cjs.map → UserError-D4P9Tbhf.cjs.map} +1 -1
- package/dist/{ValidationError-D65QU0uq.cjs → ValidationError-BXcFX4nD.cjs} +2 -3
- package/dist/{ValidationError-D65QU0uq.cjs.map → ValidationError-BXcFX4nD.cjs.map} +1 -1
- package/dist/{ValidationError-DjhtNMfZ.js → ValidationError-BsdFDGY2.js} +2 -3
- package/dist/{ValidationError-DjhtNMfZ.js.map → ValidationError-BsdFDGY2.js.map} +1 -1
- package/dist/{configurations-CL0ouUMa.js → admin-CbMOsfgs.js} +5 -53
- package/dist/admin-CbMOsfgs.js.map +1 -0
- package/dist/{configurations-D9J3jh3g.cjs → admin-Di-MmGFP.cjs} +4 -124
- package/dist/admin-Di-MmGFP.cjs.map +1 -0
- package/dist/{adminRoles-BX1gk3At.d.ts → adminRoles-DAwl657q.d.ts} +2 -4
- package/dist/{adminRoles-CO7J5qAy.cjs → adminRoles-DnFpO_2W.cjs} +2 -3
- package/dist/{adminRoles-CO7J5qAy.cjs.map → adminRoles-DnFpO_2W.cjs.map} +1 -1
- package/dist/{adminRoles-BbxFgfX-.d.cts → adminRoles-FFyl7Dyx.d.cts} +2 -4
- package/dist/{adminRoles-B40yBcmq.js → adminRoles-asa-MhDD.js} +2 -3
- package/dist/{adminRoles-B40yBcmq.js.map → adminRoles-asa-MhDD.js.map} +1 -1
- package/dist/ai/index.cjs +3 -4
- package/dist/ai/index.d.cts +2 -4
- package/dist/ai/index.d.ts +2 -4
- package/dist/ai/index.js +3 -4
- package/dist/ai/types.d.cts +1 -1
- package/dist/ai/types.d.ts +1 -1
- package/dist/{appLogs-DI2Y4imY.d.ts → appLogs-CTvZAihm.d.ts} +2 -4
- package/dist/{appLogs-IhRA3xyv.d.cts → appLogs-CnLNMH7M.d.cts} +2 -4
- package/dist/{appLogs-Cix2KWra.cjs → appLogs-CoAWQGxs.cjs} +5 -6
- package/dist/{appLogs-Cix2KWra.cjs.map → appLogs-CoAWQGxs.cjs.map} +1 -1
- package/dist/{appLogs-KslK7qHr.js → appLogs-DFcPwVk8.js} +4 -5
- package/dist/{appLogs-KslK7qHr.js.map → appLogs-DFcPwVk8.js.map} +1 -1
- package/dist/apps/index.cjs +28 -5
- package/dist/apps/index.cjs.map +1 -1
- package/dist/apps/index.d.cts +22 -5
- package/dist/apps/index.d.ts +22 -5
- package/dist/apps/index.js +28 -5
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/types.d.cts +3 -3
- package/dist/apps/types.d.ts +3 -3
- package/dist/assets/index.cjs +2 -3
- package/dist/assets/index.d.cts +1 -3
- package/dist/assets/index.d.ts +1 -3
- package/dist/assets/index.js +2 -3
- package/dist/assets/schema.cjs +2 -3
- package/dist/assets/schema.d.cts +0 -2
- package/dist/assets/schema.d.ts +0 -2
- package/dist/assets/schema.js +1 -2
- 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 -2
- package/dist/auth/types.d.cts +1 -1
- package/dist/auth/types.d.ts +1 -1
- package/dist/{auth-C8Pjl0Mu.cjs → auth-CvB4MukT.cjs} +3 -4
- package/dist/{auth-C8Pjl0Mu.cjs.map → auth-CvB4MukT.cjs.map} +1 -1
- package/dist/{auth-4coY1uwo.js → auth-DYfQMQCs.js} +3 -4
- package/dist/{auth-4coY1uwo.js.map → auth-DYfQMQCs.js.map} +1 -1
- package/dist/{authClient-DfkKlc-2.cjs → authClient-DcKBpMcU.cjs} +66 -85
- package/dist/{authClient-DfkKlc-2.cjs.map → authClient-DcKBpMcU.cjs.map} +1 -1
- package/dist/{authClient-6Aau_4Zt.d.ts → authClient-Df3U4q_6.d.cts} +4 -16
- package/dist/{authClient-B3P6WtWW.d.cts → authClient-JtMVJWXY.d.ts} +4 -16
- package/dist/{authClient-2e8ZmzSP.js → authClient-oB5ydxWp.js} +66 -85
- package/dist/{authClient-2e8ZmzSP.js.map → authClient-oB5ydxWp.js.map} +1 -1
- package/dist/{backends-DKBz5OxE.d.ts → backends-BHotIdL0.d.cts} +1 -3
- package/dist/{backends-DKBz5OxE.d.cts → backends-BHotIdL0.d.ts} +1 -3
- package/dist/billing/index.cjs +3 -4
- package/dist/billing/index.d.cts +1 -3
- package/dist/billing/index.d.ts +1 -3
- package/dist/billing/index.js +3 -4
- package/dist/billing/types.d.cts +1 -5
- package/dist/billing/types.d.ts +1 -5
- package/dist/chat/index.cjs +4 -5
- package/dist/chat/index.d.cts +3 -5
- package/dist/chat/index.d.ts +3 -5
- package/dist/chat/index.js +4 -5
- package/dist/chat/suggestions.cjs +1 -2
- package/dist/chat/suggestions.d.cts +1 -1
- package/dist/chat/suggestions.d.ts +1 -1
- package/dist/chat/suggestions.js +1 -2
- package/dist/chat/types.cjs +1 -2
- package/dist/chat/types.d.cts +1 -1
- package/dist/chat/types.d.ts +1 -1
- package/dist/chat/types.js +1 -2
- package/dist/{collectByOffset-DQsqtmJg.cjs → collectByOffset-DgxJ3zT9.cjs} +3 -4
- package/dist/{collectByOffset-DQsqtmJg.cjs.map → collectByOffset-DgxJ3zT9.cjs.map} +1 -1
- package/dist/{collectByOffset-2XzJqmvr.js → collectByOffset-i8Tdoze7.js} +3 -4
- package/dist/{collectByOffset-2XzJqmvr.js.map → collectByOffset-i8Tdoze7.js.map} +1 -1
- package/dist/{componentId-D4jp6a13.cjs → componentId-C8ZTXXDo.cjs} +2 -3
- package/dist/{componentId-D4jp6a13.cjs.map → componentId-C8ZTXXDo.cjs.map} +1 -1
- package/dist/{componentId-DmHwHG5V.js → componentId-b_qBbJEM.js} +2 -3
- package/dist/{componentId-DmHwHG5V.js.map → componentId-b_qBbJEM.js.map} +1 -1
- package/dist/componentsMcp/index.cjs +1 -1
- package/dist/componentsMcp/index.d.cts +1 -1
- package/dist/componentsMcp/index.d.ts +1 -1
- package/dist/componentsMcp/index.js +1 -2
- package/dist/componentsMcp/types.d.cts +1 -1
- package/dist/componentsMcp/types.d.ts +1 -1
- package/dist/{componentsMcp-pG-PcQrg.cjs → componentsMcp-BaHy5iLr.cjs} +5 -7
- package/dist/{componentsMcp-pG-PcQrg.cjs.map → componentsMcp-BaHy5iLr.cjs.map} +1 -1
- package/dist/{componentsMcp-CHobIsuU.js → componentsMcp-BrB4js6b.js} +5 -7
- package/dist/{componentsMcp-CHobIsuU.js.map → componentsMcp-BrB4js6b.js.map} +1 -1
- package/dist/{concurrent-BacWxPwi.js → concurrent-BtsT10Xe.js} +2 -3
- package/dist/{concurrent-BacWxPwi.js.map → concurrent-BtsT10Xe.js.map} +1 -1
- package/dist/{concurrent-CdVfR1N5.cjs → concurrent-DnTV_ppY.cjs} +2 -3
- package/dist/{concurrent-CdVfR1N5.cjs.map → concurrent-DnTV_ppY.cjs.map} +1 -1
- package/dist/configurations-Cd6Nsox-.js +49 -0
- package/dist/configurations-Cd6Nsox-.js.map +1 -0
- package/dist/configurations-WI8H4zLk.cjs +120 -0
- package/dist/configurations-WI8H4zLk.cjs.map +1 -0
- package/dist/constants/index.cjs +3 -3
- package/dist/constants/index.d.cts +4 -4
- package/dist/constants/index.d.ts +4 -4
- package/dist/constants/index.js +3 -3
- package/dist/{constants-VpSwBtCb.js → constants-BMSHGwOR.js} +46 -52
- package/dist/constants-BMSHGwOR.js.map +1 -0
- package/dist/{constants-DErcRkWl.cjs → constants-DhFQWQgy.cjs} +45 -51
- package/dist/constants-DhFQWQgy.cjs.map +1 -0
- package/dist/{createAbortError-RendOpo7.cjs → createAbortError-Dzc9yObN.cjs} +2 -3
- package/dist/{createAbortError-RendOpo7.cjs.map → createAbortError-Dzc9yObN.cjs.map} +1 -1
- package/dist/{createAbortError-BxupOt-6.js → createAbortError-c6ekCpRy.js} +2 -3
- package/dist/{createAbortError-BxupOt-6.js.map → createAbortError-c6ekCpRy.js.map} +1 -1
- package/dist/{createFetchClient-lZ_93Yrb.cjs → createFetchClient-DEkUH662.cjs} +6 -10
- package/dist/{createFetchClient-lZ_93Yrb.cjs.map → createFetchClient-DEkUH662.cjs.map} +1 -1
- package/dist/{createFetchClient-CkHdS_IG.js → createFetchClient-DlGCbltR.js} +5 -9
- package/dist/{createFetchClient-CkHdS_IG.js.map → createFetchClient-DlGCbltR.js.map} +1 -1
- package/dist/{createGenericFetchClient-MOx97wi-.cjs → createGenericFetchClient-2oU-PXVo.cjs} +3 -4
- package/dist/{createGenericFetchClient-MOx97wi-.cjs.map → createGenericFetchClient-2oU-PXVo.cjs.map} +1 -1
- package/dist/createGenericFetchClient-wGxemBwR.js +6 -0
- package/dist/{createGenericFetchClient-CQdNcPC3.js.map → createGenericFetchClient-wGxemBwR.js.map} +1 -1
- package/dist/createOpenapiFetchClient-Bhz62MUE.js +6 -0
- package/dist/{createOpenapiFetchClient-DXiMv9WL.js.map → createOpenapiFetchClient-Bhz62MUE.js.map} +1 -1
- package/dist/{createOpenapiFetchClient-DHYo_k3t.cjs → createOpenapiFetchClient-DL9w7vU-.cjs} +3 -4
- package/dist/{createOpenapiFetchClient-DHYo_k3t.cjs.map → createOpenapiFetchClient-DL9w7vU-.cjs.map} +1 -1
- package/dist/dataScience/index.cjs +2 -2
- package/dist/dataScience/index.d.cts +2 -2
- package/dist/dataScience/index.d.ts +2 -2
- package/dist/dataScience/index.js +2 -2
- package/dist/dataScience/types.d.cts +2 -2
- package/dist/dataScience/types.d.ts +2 -2
- package/dist/{dataScience-AwPMeGfz.js → dataScience-CXmkEOAi.js} +7 -9
- package/dist/{dataScience-AwPMeGfz.js.map → dataScience-CXmkEOAi.js.map} +1 -1
- package/dist/{dataScience-BjS1p8WO.cjs → dataScience-CufjHPSd.cjs} +7 -9
- package/dist/{dataScience-BjS1p8WO.cjs.map → dataScience-CufjHPSd.cjs.map} +1 -1
- package/dist/{dedupe-OSnnst2u.cjs → dedupe-Bf0gl9TJ.cjs} +2 -3
- package/dist/{dedupe-OSnnst2u.cjs.map → dedupe-Bf0gl9TJ.cjs.map} +1 -1
- package/dist/{dedupe-Cky1gSUu.js → dedupe-Bu0d2i_w.js} +2 -3
- package/dist/{dedupe-Cky1gSUu.js.map → dedupe-Bu0d2i_w.js.map} +1 -1
- package/dist/developerPortal/index.cjs +1 -1
- package/dist/developerPortal/index.d.cts +2 -2
- package/dist/developerPortal/index.d.ts +2 -2
- package/dist/developerPortal/index.js +1 -2
- package/dist/developerPortal/types.d.cts +1 -1
- package/dist/developerPortal/types.d.ts +1 -1
- package/dist/{developerPortalClient-DUerKw-7.cjs → developerPortalClient-BfRxYrWj.cjs} +9 -15
- package/dist/{developerPortalClient-DUerKw-7.cjs.map → developerPortalClient-BfRxYrWj.cjs.map} +1 -1
- package/dist/{developerPortalClient-Bb2suezr.js → developerPortalClient-D9XOYwWF.js} +9 -15
- package/dist/{developerPortalClient-Bb2suezr.js.map → developerPortalClient-D9XOYwWF.js.map} +1 -1
- package/dist/domain/permissions/index.cjs +18 -17
- package/dist/domain/permissions/index.d.cts +1 -11
- package/dist/domain/permissions/index.d.ts +1 -11
- package/dist/domain/permissions/index.js +3 -2
- package/dist/domain/storageTable/index.cjs +403 -9
- package/dist/domain/storageTable/index.cjs.map +1 -0
- package/dist/domain/storageTable/index.d.cts +189 -2
- package/dist/domain/storageTable/index.d.ts +189 -2
- package/dist/domain/storageTable/index.js +395 -1
- package/dist/domain/storageTable/index.js.map +1 -0
- package/dist/editor/index.cjs +3 -4
- package/dist/editor/index.d.cts +2 -4
- package/dist/editor/index.d.ts +2 -4
- package/dist/editor/index.js +3 -4
- package/dist/editor/types.d.cts +1 -1
- package/dist/editor/types.d.ts +1 -1
- package/dist/{emitter-dLF1Fyfg.d.ts → emitter-raKkIqRp.d.cts} +1 -3
- package/dist/{emitter-dLF1Fyfg.d.cts → emitter-raKkIqRp.d.ts} +1 -3
- package/dist/encryption/index.cjs +2 -3
- package/dist/encryption/index.d.cts +1 -1
- package/dist/encryption/index.d.ts +1 -1
- package/dist/encryption/index.js +2 -3
- package/dist/encryption/types.d.cts +1 -1
- package/dist/encryption/types.d.ts +1 -1
- package/dist/generateUUID-DE9sNyJF.js +5 -0
- package/dist/{generateUUID-Dr8l-aoc.js.map → generateUUID-DE9sNyJF.js.map} +1 -1
- package/dist/{generateUUID-C6qKBPIv.cjs → generateUUID-DbSTmvVP.cjs} +2 -3
- package/dist/{generateUUID-C6qKBPIv.cjs.map → generateUUID-DbSTmvVP.cjs.map} +1 -1
- package/dist/import/index.cjs +1 -1
- package/dist/import/index.d.cts +3 -5
- package/dist/import/index.d.ts +3 -5
- package/dist/import/index.js +1 -2
- package/dist/{import-BahNYv91.cjs → import-CABlFMQX.cjs} +6 -9
- package/dist/{import-BahNYv91.cjs.map → import-CABlFMQX.cjs.map} +1 -1
- package/dist/{import-FWy_wQZ1.js → import-CT1Ce5Rp.js} +6 -9
- package/dist/{import-FWy_wQZ1.js.map → import-CT1Ce5Rp.js.map} +1 -1
- package/dist/index-24GpnYhn.d.cts +150 -0
- package/dist/{index-BT88-GpA.d.ts → index-AA3MRfRn.d.cts} +4 -16
- package/dist/{index-C6oPUTWZ.d.ts → index-BDPxm9qu.d.ts} +3 -7
- package/dist/index-BUZ-vTRt.d.ts +150 -0
- package/dist/{index-XcnkRVb0.d.ts → index-BZDxWvZW.d.ts} +5 -7
- package/dist/index-BfAcp7O2.d.ts +10 -0
- package/dist/index-BsT_cBJd.d.ts +15117 -0
- package/dist/index-C1ndNdrN.d.cts +10 -0
- package/dist/{index-BiZR9BjN.d.ts → index-CbSh3KFw.d.cts} +4 -12
- package/dist/{index-BM_fXKq5.d.cts → index-ClIV2Lch.d.cts} +5 -7
- package/dist/{index-DReKz9Zt.d.ts → index-CuI8OI9E.d.ts} +4 -13
- package/dist/{index-BPMr8PQJ.d.ts → index-D1mduJne.d.cts} +2 -52
- package/dist/{index-CL4iKFic.d.cts → index-D1mduJne.d.ts} +1 -51
- package/dist/{index-DorowSay.d.ts → index-DIPMzH--.d.ts} +5 -9
- package/dist/{index-CbZQCDkD.d.cts → index-DQagqTVa.d.cts} +3 -7
- package/dist/{index-dgu6udMy.d.ts → index-DVBQgFg0.d.ts} +4 -6
- package/dist/{index-CrrHvDiX.d.cts → index-Day1Yr5s.d.ts} +8 -7
- package/dist/{index-Dkb8CynB.d.cts → index-Db266tLz.d.cts} +5 -9
- package/dist/{index-BVjhAkXW.d.cts → index-DgGpQsAT.d.cts} +4 -6
- package/dist/{index-PqJGDHHl.d.cts → index-DjSthn8d.d.ts} +4 -16
- package/dist/{index-DhZTIejy.d.ts → index-lTrNMlj6.d.ts} +3 -5
- package/dist/{index-DYNVbgm8.d.cts → index-m9-mN8Gg.d.ts} +4 -12
- package/dist/index-qJ2IjXIM.d.cts +15117 -0
- package/dist/{index-CtQl-Iqw.d.cts → index-xX8-Stoq.d.cts} +4 -13
- package/dist/{index-D6JMbJ9b.d.ts → index-xhzuWloV.d.cts} +8 -7
- package/dist/{index-DGKCTQkb.d.cts → index-z-2okomN.d.cts} +3 -5
- package/dist/index.cjs +433 -1055
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.js +429 -1052
- package/dist/index.js.map +1 -1
- package/dist/{isLoginPageRedirect-r0Opgc1n.cjs → isLoginPageRedirect-CoUxJi2x.cjs} +3 -4
- package/dist/{isLoginPageRedirect-r0Opgc1n.cjs.map → isLoginPageRedirect-CoUxJi2x.cjs.map} +1 -1
- package/dist/{isLoginPageRedirect-B4QKSiSa.js → isLoginPageRedirect-D-lqF_kZ.js} +3 -4
- package/dist/{isLoginPageRedirect-B4QKSiSa.js.map → isLoginPageRedirect-D-lqF_kZ.js.map} +1 -1
- package/dist/{isPlainObject-LYW-03uB.js → isPlainObject-BxsT8_t2.js} +2 -3
- package/dist/{isPlainObject-LYW-03uB.js.map → isPlainObject-BxsT8_t2.js.map} +1 -1
- package/dist/{isPlainObject-BB3iy87C.cjs → isPlainObject-CcvQt0qB.cjs} +2 -3
- package/dist/{isPlainObject-BB3iy87C.cjs.map → isPlainObject-CcvQt0qB.cjs.map} +1 -1
- package/dist/kaiAgent/index.cjs +1 -1
- package/dist/kaiAgent/index.d.cts +2 -2
- package/dist/kaiAgent/index.d.ts +2 -2
- package/dist/kaiAgent/index.js +1 -2
- package/dist/kaiAgent/types.d.cts +1 -1
- package/dist/kaiAgent/types.d.ts +1 -1
- package/dist/{kaiAgent-N2qbUFZm.cjs → kaiAgent-CDhg0MAw.cjs} +16 -7
- package/dist/kaiAgent-CDhg0MAw.cjs.map +1 -0
- package/dist/{kaiAgent-CYvrS8oZ.js → kaiAgent-CYU1Uda8.js} +16 -7
- package/dist/kaiAgent-CYU1Uda8.js.map +1 -0
- package/dist/{kaiMemory-Qch09f-m.cjs → kaiMemory-CkLQfJXD.cjs} +6 -9
- package/dist/{kaiMemory-Qch09f-m.cjs.map → kaiMemory-CkLQfJXD.cjs.map} +1 -1
- package/dist/{kaiMemory-C9di17bd.js → kaiMemory-oir_qCo_.js} +6 -9
- package/dist/{kaiMemory-C9di17bd.js.map → kaiMemory-oir_qCo_.js.map} +1 -1
- package/dist/management/index.cjs +1 -1
- package/dist/management/index.d.cts +1 -1
- package/dist/management/index.d.ts +1 -1
- package/dist/management/index.js +1 -2
- package/dist/management/types.cjs +1 -2
- package/dist/management/types.d.cts +2 -2
- package/dist/management/types.d.ts +2 -2
- package/dist/management/types.js +1 -2
- package/dist/{management-B1o6RpKF.cjs → management-BEGOEQxM.cjs} +26 -45
- package/dist/management-BEGOEQxM.cjs.map +1 -0
- package/dist/{management-C9w3DNhs.js → management-BcGHyxAP.js} +26 -45
- package/dist/management-BcGHyxAP.js.map +1 -0
- package/dist/metastore/index.cjs +1 -1
- package/dist/metastore/index.d.cts +1 -1
- package/dist/metastore/index.d.ts +1 -1
- package/dist/metastore/index.js +1 -2
- package/dist/metastore/types.d.cts +1 -1
- package/dist/metastore/types.d.ts +1 -1
- package/dist/{metastore-Ywq08DBz.js → metastore-CGsgxjng.js} +7 -10
- package/dist/{metastore-Ywq08DBz.js.map → metastore-CGsgxjng.js.map} +1 -1
- package/dist/{metastore-BXHg33ku.cjs → metastore-DeRQ2VIv.cjs} +7 -10
- package/dist/{metastore-BXHg33ku.cjs.map → metastore-DeRQ2VIv.cjs.map} +1 -1
- package/dist/microsoftGraph/index.cjs +5 -8
- package/dist/microsoftGraph/index.cjs.map +1 -1
- package/dist/microsoftGraph/index.d.cts +3 -7
- package/dist/microsoftGraph/index.d.ts +3 -7
- package/dist/microsoftGraph/index.js +5 -8
- package/dist/microsoftGraph/index.js.map +1 -1
- package/dist/microsoftGraph/types.d.cts +2 -4
- package/dist/microsoftGraph/types.d.ts +2 -4
- package/dist/{middleware-GOfx8Apu.js → middleware-8zaJWcyU.js} +3 -5
- package/dist/middleware-8zaJWcyU.js.map +1 -0
- package/dist/{middleware-CEP6uu_D.cjs → middleware-B9RNuLfD.cjs} +3 -5
- package/dist/middleware-B9RNuLfD.cjs.map +1 -0
- package/dist/notifications/index.cjs +5 -6
- package/dist/notifications/index.d.cts +2 -4
- package/dist/notifications/index.d.ts +2 -4
- package/dist/notifications/index.js +5 -6
- package/dist/notifications/types.d.cts +1 -1
- package/dist/notifications/types.d.ts +1 -1
- package/dist/oauth/index.cjs +1 -1
- package/dist/oauth/index.d.cts +2 -4
- package/dist/oauth/index.d.ts +2 -4
- package/dist/oauth/index.js +1 -2
- package/dist/oauth/types.d.cts +1 -1
- package/dist/oauth/types.d.ts +1 -1
- package/dist/{oauth-DKZPuUlt.cjs → oauth-B5Biqz21.cjs} +7 -9
- package/dist/{oauth-DKZPuUlt.cjs.map → oauth-B5Biqz21.cjs.map} +1 -1
- package/dist/{oauth-GXmZ9agP.js → oauth-ByCdISsV.js} +7 -9
- package/dist/{oauth-GXmZ9agP.js.map → oauth-ByCdISsV.js.map} +1 -1
- package/dist/omnisearch/index.cjs +3 -4
- package/dist/omnisearch/index.d.cts +2 -4
- package/dist/omnisearch/index.d.ts +2 -4
- package/dist/omnisearch/index.js +3 -4
- package/dist/omnisearch/types.d.cts +1 -1
- package/dist/omnisearch/types.d.ts +1 -1
- package/dist/{project-ClH22nzH.js → project-DmuC0bMK.js} +6 -9
- package/dist/{project-ClH22nzH.js.map → project-DmuC0bMK.js.map} +1 -1
- package/dist/{project-Rh4nXiWh.cjs → project-Onf-IcPW.cjs} +9 -12
- package/dist/{project-Rh4nXiWh.cjs.map → project-Onf-IcPW.cjs.map} +1 -1
- package/dist/{project-DTfBtIJs.d.ts → project-UHZGFmmG.d.cts} +5 -9
- package/dist/{project-vOnvjo80.d.cts → project-iBm4cIIR.d.ts} +5 -9
- package/dist/queryService/index.cjs +1 -1
- package/dist/queryService/index.d.cts +1 -1
- package/dist/queryService/index.d.ts +1 -1
- package/dist/queryService/index.js +1 -2
- package/dist/queryService/types.d.cts +1 -1
- package/dist/queryService/types.d.ts +1 -1
- package/dist/{queryService-CzK53q94.cjs → queryService-Cg-eMysa.cjs} +9 -11
- package/dist/{queryService-CzK53q94.cjs.map → queryService-Cg-eMysa.cjs.map} +1 -1
- package/dist/{queryService-C-pZha5p.js → queryService-x8kq8Z2-.js} +9 -11
- package/dist/{queryService-C-pZha5p.js.map → queryService-x8kq8Z2-.js.map} +1 -1
- package/dist/queue/index.cjs +1 -1
- package/dist/queue/index.d.cts +4 -5
- package/dist/queue/index.d.ts +4 -5
- package/dist/queue/index.js +1 -2
- package/dist/queue/types.d.cts +1 -1
- package/dist/queue/types.d.ts +1 -1
- package/dist/{queue-D6-x4OGF.js → queue-BiIs9fX4.js} +9 -11
- package/dist/{queue-D6-x4OGF.js.map → queue-BiIs9fX4.js.map} +1 -1
- package/dist/{queue-BJvDWriM.cjs → queue-CBi9Q8vp.cjs} +9 -11
- package/dist/{queue-BJvDWriM.cjs.map → queue-CBi9Q8vp.cjs.map} +1 -1
- package/dist/{rolldown-runtime-VH7oDXx4.cjs → rolldown-runtime-CmQyd0Gu.cjs} +1 -2
- package/dist/scheduler/index.cjs +5 -6
- package/dist/scheduler/index.d.cts +2 -4
- package/dist/scheduler/index.d.ts +2 -4
- package/dist/scheduler/index.js +5 -6
- package/dist/scheduler/types.d.cts +1 -1
- package/dist/scheduler/types.d.ts +1 -1
- package/dist/{schema-BUyMwQnM.d.cts → schema-DLmBEgPM.d.cts} +1 -3
- package/dist/{schema-BUyMwQnM.d.ts → schema-DLmBEgPM.d.ts} +1 -3
- package/dist/schemaGuidedMerge-C8CqrNGe.cjs +55 -0
- package/dist/schemaGuidedMerge-C8CqrNGe.cjs.map +1 -0
- package/dist/schemaGuidedMerge-DFNqj9Nz.js +44 -0
- package/dist/schemaGuidedMerge-DFNqj9Nz.js.map +1 -0
- package/dist/sdk/configurations/index.cjs +634 -2
- package/dist/sdk/configurations/index.cjs.map +1 -0
- package/dist/sdk/configurations/index.d.cts +1030 -4
- package/dist/sdk/configurations/index.d.ts +1030 -4
- package/dist/sdk/configurations/index.js +633 -1
- package/dist/sdk/configurations/index.js.map +1 -0
- package/dist/sdk/developerPortal/index.cjs +9 -13
- package/dist/sdk/developerPortal/index.cjs.map +1 -1
- package/dist/sdk/developerPortal/index.d.cts +4 -6
- package/dist/sdk/developerPortal/index.d.ts +4 -6
- package/dist/sdk/developerPortal/index.js +9 -13
- package/dist/sdk/developerPortal/index.js.map +1 -1
- package/dist/sdk/kaiMemory/index.cjs +1 -1
- package/dist/sdk/kaiMemory/index.d.cts +1 -3
- package/dist/sdk/kaiMemory/index.d.ts +1 -3
- package/dist/sdk/kaiMemory/index.js +1 -2
- package/dist/sdk/kaiMemory/types.d.cts +1 -1
- package/dist/sdk/kaiMemory/types.d.ts +1 -1
- package/dist/sdk/queryService/index.cjs +3 -4
- package/dist/sdk/queryService/index.d.cts +1 -1
- package/dist/sdk/queryService/index.d.ts +1 -1
- package/dist/sdk/queryService/index.js +3 -4
- package/dist/sdk/semanticLayer/index.cjs +1 -1
- package/dist/sdk/semanticLayer/index.d.cts +1 -7
- package/dist/sdk/semanticLayer/index.d.ts +1 -7
- package/dist/sdk/semanticLayer/index.js +1 -2
- package/dist/sdk/semanticLayer/types.d.cts +1 -1
- package/dist/sdk/semanticLayer/types.d.ts +1 -1
- package/dist/sdk/storage/index.cjs +3 -6
- package/dist/sdk/storage/index.cjs.map +1 -1
- package/dist/sdk/storage/index.d.cts +0 -6
- package/dist/sdk/storage/index.d.ts +0 -6
- package/dist/sdk/storage/index.js +3 -6
- package/dist/sdk/storage/index.js.map +1 -1
- package/dist/sdk/tag/index.cjs +1 -1
- package/dist/sdk/tag/index.d.cts +3 -5
- package/dist/sdk/tag/index.d.ts +3 -5
- package/dist/sdk/tag/index.js +1 -2
- package/dist/sdk/tag/types.d.cts +1 -1
- package/dist/sdk/tag/types.d.ts +1 -1
- package/dist/sdk/vault/index.cjs +3 -5
- package/dist/sdk/vault/index.cjs.map +1 -1
- package/dist/sdk/vault/index.d.cts +1 -1
- package/dist/sdk/vault/index.d.ts +1 -1
- package/dist/sdk/vault/index.js +3 -5
- package/dist/sdk/vault/index.js.map +1 -1
- package/dist/{semanticLayer-DvjS_nzo.js → semanticLayer-BdPW_wLo.js} +9 -14
- package/dist/{semanticLayer-DvjS_nzo.js.map → semanticLayer-BdPW_wLo.js.map} +1 -1
- package/dist/{semanticLayer-7BejcMj_.cjs → semanticLayer-djom-J78.cjs} +9 -14
- package/dist/{semanticLayer-7BejcMj_.cjs.map → semanticLayer-djom-J78.cjs.map} +1 -1
- package/dist/status/index.cjs +2 -3
- package/dist/status/index.d.cts +1 -3
- package/dist/status/index.d.ts +1 -3
- package/dist/status/index.js +2 -3
- package/dist/status/types.d.cts +0 -2
- package/dist/status/types.d.ts +0 -2
- package/dist/storage/index.cjs +9 -9
- package/dist/storage/index.d.cts +3 -2
- package/dist/storage/index.d.ts +3 -2
- package/dist/storage/index.js +9 -9
- package/dist/storage/types.d.cts +6 -6
- package/dist/storage/types.d.ts +6 -6
- package/dist/{storage-CChfKlrb.js → storage-BpOLWT6h.js} +54 -89
- package/dist/{storage-CChfKlrb.js.map → storage-BpOLWT6h.js.map} +1 -1
- package/dist/{storage-Ci9gXgcw.cjs → storage-KJ5Ki_ma.cjs} +53 -88
- package/dist/{storage-Ci9gXgcw.cjs.map → storage-KJ5Ki_ma.cjs.map} +1 -1
- package/dist/{store-xS-Cu_VS.cjs → store-2OyH1XOP.cjs} +3 -5
- package/dist/{store-xS-Cu_VS.cjs.map → store-2OyH1XOP.cjs.map} +1 -1
- package/dist/{store-C9FQCHGe.js → store-HP0zRcLz.js} +3 -5
- package/dist/{store-C9FQCHGe.js.map → store-HP0zRcLz.js.map} +1 -1
- package/dist/stream/index.cjs +4 -5
- package/dist/stream/index.d.cts +2 -4
- package/dist/stream/index.d.ts +2 -4
- package/dist/stream/index.js +4 -5
- package/dist/stream/types.d.cts +1 -1
- package/dist/stream/types.d.ts +1 -1
- package/dist/{suggestions-BH3x7xU7.d.ts → suggestions-xhIjrlvi.d.cts} +1 -3
- package/dist/{suggestions-BH3x7xU7.d.cts → suggestions-xhIjrlvi.d.ts} +1 -3
- package/dist/syncActions/index.cjs +1 -1
- package/dist/syncActions/index.d.cts +2 -2
- package/dist/syncActions/index.d.ts +2 -2
- package/dist/syncActions/index.js +1 -2
- package/dist/syncActions/types.d.cts +2 -2
- package/dist/syncActions/types.d.ts +2 -2
- package/dist/{syncActions-C1rE4R3f.cjs → syncActions-BcX3jm2E.cjs} +74 -187
- package/dist/syncActions-BcX3jm2E.cjs.map +1 -0
- package/dist/{syncActions-DM8vP7p3.js → syncActions-giPLTfje.js} +73 -186
- package/dist/syncActions-giPLTfje.js.map +1 -0
- package/dist/{tag-DHS_soa7.cjs → tag-A5z4tJn1.cjs} +5 -7
- package/dist/{tag-DHS_soa7.cjs.map → tag-A5z4tJn1.cjs.map} +1 -1
- package/dist/{tag-hh-1nhNr.js → tag-BwjbG3tT.js} +5 -7
- package/dist/{tag-hh-1nhNr.js.map → tag-BwjbG3tT.js.map} +1 -1
- package/dist/telemetry/index.cjs +4 -5
- package/dist/telemetry/index.d.cts +2 -4
- package/dist/telemetry/index.d.ts +2 -4
- package/dist/telemetry/index.js +4 -5
- package/dist/telemetry/types.d.cts +1 -1
- package/dist/telemetry/types.d.ts +1 -1
- package/dist/{transientRetries-B4iusp69.js → transientRetries-BKqmb85B.js} +13 -22
- package/dist/{transientRetries-B4iusp69.js.map → transientRetries-BKqmb85B.js.map} +1 -1
- package/dist/{transientRetries-DdJfH9QK.cjs → transientRetries-CM7rAEXQ.cjs} +13 -22
- package/dist/{transientRetries-DdJfH9QK.cjs.map → transientRetries-CM7rAEXQ.cjs.map} +1 -1
- package/dist/{types-DODAZKEm.d.ts → types--Rp5wvaz.d.ts} +2 -6
- package/dist/{types-JZ0Bdlpk.d.cts → types-1IBnjBVJ.d.cts} +2 -6
- package/dist/{types-BZ--6pIt.d.ts → types-37vwxse4.d.cts} +2 -6
- package/dist/{types-RogkWzOu.d.ts → types-6T04_qUf.d.ts} +2 -6
- package/dist/{types-TmrPVMhy.d.cts → types-B0e-no6u.d.ts} +18 -38
- package/dist/{types-ptynVnkv.d.cts → types-B1qe1etN.d.cts} +3 -7
- package/dist/{types-BXybSjn-.d.ts → types-B3ri-iiC.d.ts} +2 -26
- package/dist/{types-Duurgaqk.d.cts → types-B8k1DqlU.d.ts} +129 -10
- package/dist/{types-BOT6TgOS.d.ts → types-BE8abIig.d.cts} +2 -6
- package/dist/{types-BrpIEj_N.d.ts → types-BWMOK6eL.d.cts} +2 -6
- package/dist/{types-D53zBV25.d.ts → types-Bat0SIZA.d.cts} +16 -97
- package/dist/{types-Dy6EdWPG.d.ts → types-Bdl7EFMc.d.ts} +2 -6
- package/dist/{types-_zKX6JmD.d.ts → types-BiDdBXSm.d.ts} +2 -8
- package/dist/{types-dn6MHur3.d.cts → types-BrEVh0WE.d.cts} +253 -10
- package/dist/{types-BnmsuDfH.d.cts → types-BuclMPeY.d.cts} +2 -26
- package/dist/{types-302-NBaU.d.ts → types-C9okze_R.d.ts} +3 -7
- package/dist/{types-BT5e9TSQ.d.ts → types-CPWjRdnj.d.cts} +18 -38
- package/dist/{types-C614wC5h.d.cts → types-CRubbBcU.d.cts} +2 -6
- package/dist/{types-DlhNay1n.d.ts → types-CWcdaq-K.d.ts} +2 -6
- package/dist/{types-D9ZKJYZk.d.ts → types-CcGp6O3B.d.cts} +3 -7
- package/dist/{types-45O2dU2w.d.ts → types-Cr5lyI99.d.ts} +2 -6
- package/dist/{types-CY8X39qv.d.cts → types-CxEJ77m3.d.cts} +3 -7
- package/dist/{types-DmzSFOhK.d.cts → types-D-tJt0hQ.d.cts} +2 -6
- package/dist/{types-BjwbzqJd.d.ts → types-D6lre27s.d.ts} +2 -8
- package/dist/{types-0R9-osUJ.d.ts → types-DHMxPJZq.d.cts} +2 -6
- package/dist/{types-jN2KmMet.d.cts → types-DJzTVMu1.d.ts} +2 -6
- package/dist/{types-CfXqFz2e.d.ts → types-DKSUG2dZ.d.ts} +253 -10
- package/dist/{types-CpJhWBmH.d.cts → types-DNgazFnF.d.cts} +2 -8
- package/dist/{types-DjadPty5.d.ts → types-DRCttnIN.d.ts} +2 -6
- package/dist/{types-CeqZuOEC.d.ts → types-DUpVIuk7.d.ts} +2 -6
- package/dist/{types-DqOxIujY.d.ts → types-DeyXJzWz.d.cts} +2 -6
- package/dist/{types-O6XM48J8.d.cts → types-Dryq2GGE.d.cts} +2 -6
- package/dist/{types-CjNl7O7f.d.cts → types-DschSZHf.d.cts} +3 -5
- package/dist/{types-BUirSne-.d.ts → types-DtOfhDzz.d.ts} +3 -5
- package/dist/{types-CkJxMoTk.d.cts → types-Du5o-tud.d.ts} +16 -97
- package/dist/{types-ChLWY8aU.d.cts → types-DwbTiyhZ.d.cts} +2 -6
- package/dist/{types-HmK8iKp5.d.cts → types-E8tzafsk.d.cts} +3 -7
- package/dist/{types-DpbrGDRf.d.cts → types-LconaX98.d.cts} +2 -6
- package/dist/{types-tdIo5FpR.d.ts → types-PZzNANiS.d.cts} +129 -10
- package/dist/{types-CTS2NSIb.d.cts → types-YpOm4yXE.d.cts} +2 -8
- package/dist/{types-DbXV0g8U.d.cts → types-ZZwdKCBl.d.ts} +2 -6
- package/dist/{types-jfPoUlO8.d.cts → types-eFi8xJIM.d.cts} +2 -6
- package/dist/{types-DV7K07oX.d.cts → types-inG9y3dP.d.ts} +2 -6
- package/dist/{types-BM6rri7-.d.ts → types-ir7T2a9a.d.ts} +3 -7
- package/dist/{types-BAsYMltG.d.cts → types-jjOulnni.d.ts} +2 -6
- package/dist/{types-vvw_H7wp.d.cts → types-wYrC2boT.d.ts} +3 -7
- package/dist/{types-BWzt1ju_.d.ts → types-xzt_2H63.d.ts} +3 -7
- package/dist/{types-D2Pb_4FA.d.cts → types-zPY-XGnM.d.ts} +2 -6
- package/dist/{validateConnectionStatus-BalWEyRk.cjs → validateConnectionStatus-BjemGI1e.cjs} +5 -7
- package/dist/{validateConnectionStatus-BalWEyRk.cjs.map → validateConnectionStatus-BjemGI1e.cjs.map} +1 -1
- package/dist/{validateConnectionStatus-DyrYpn0G.js → validateConnectionStatus-DYwWeWVo.js} +5 -7
- package/dist/{validateConnectionStatus-DyrYpn0G.js.map → validateConnectionStatus-DYwWeWVo.js.map} +1 -1
- package/dist/vault/index.cjs +7 -8
- package/dist/vault/index.d.cts +1 -1
- package/dist/vault/index.d.ts +1 -1
- package/dist/vault/index.js +7 -8
- package/dist/vault/types.d.cts +1 -1
- package/dist/vault/types.d.ts +1 -1
- package/package.json +7 -7
- package/surface/apps.md +12 -10
- package/surface/chat.md +1 -1
- package/surface/dataScience.md +1 -1
- package/surface/editor.md +5 -5
- package/surface/kaiAgent.md +5 -4
- package/surface/management.md +1 -1
- package/surface/queue.md +3 -3
- package/surface/sdk.md +0 -6
- package/surface/stack.md +11 -0
- package/surface/storage.md +2 -2
- package/surface/stream.md +6 -6
- package/surface/syncActions.md +1 -2
- package/dist/configurations-B44z6BSO.js +0 -718
- package/dist/configurations-B44z6BSO.js.map +0 -1
- package/dist/configurations-CL0ouUMa.js.map +0 -1
- package/dist/configurations-D9J3jh3g.cjs.map +0 -1
- package/dist/configurations-Dkxsa3Uf.cjs +0 -735
- package/dist/configurations-Dkxsa3Uf.cjs.map +0 -1
- package/dist/constants-DErcRkWl.cjs.map +0 -1
- package/dist/constants-VpSwBtCb.js.map +0 -1
- package/dist/createGenericFetchClient-CQdNcPC3.js +0 -7
- package/dist/createOpenapiFetchClient-DXiMv9WL.js +0 -7
- package/dist/generateUUID-Dr8l-aoc.js +0 -6
- package/dist/index-Be2dNJ_N.d.cts +0 -23582
- package/dist/index-BfqkgPGI.d.cts +0 -34
- package/dist/index-BfqkgPGI.d.ts +0 -34
- package/dist/index-fMoM8SeH.d.cts +0 -199
- package/dist/index-fMoM8SeH.d.ts +0 -199
- package/dist/index-uGRdAORl.d.ts +0 -23582
- package/dist/kaiAgent-CYvrS8oZ.js.map +0 -1
- package/dist/kaiAgent-N2qbUFZm.cjs.map +0 -1
- package/dist/management-B1o6RpKF.cjs.map +0 -1
- package/dist/management-C9w3DNhs.js.map +0 -1
- package/dist/middleware-CEP6uu_D.cjs.map +0 -1
- package/dist/middleware-GOfx8Apu.js.map +0 -1
- package/dist/storageTable-BNOR2FCh.cjs +0 -442
- package/dist/storageTable-BNOR2FCh.cjs.map +0 -1
- package/dist/storageTable-BldTNyEk.js +0 -395
- package/dist/storageTable-BldTNyEk.js.map +0 -1
- package/dist/syncActions-C1rE4R3f.cjs.map +0 -1
- package/dist/syncActions-DM8vP7p3.js.map +0 -1
- package/surface/context.md +0 -40
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["snowflakeCommon"],"sources":["../../../src/sdks/configurations/schemas/appDataGatewaySchema.ts","../../../src/sdks/configurations/schemas/common/dbConfig.ts","../../../src/sdks/configurations/schemas/common/dbConnection.ts","../../../src/sdks/configurations/schemas/common/forbidden.ts","../../../src/sdks/configurations/schemas/common/oauthAuthorization.ts","../../../src/sdks/configurations/schemas/common/sshTunnelSchema.ts","../../../src/sdks/configurations/schemas/common/sslSchema.ts","../../../src/sdks/configurations/schemas/appSnowflakeDwhManagerSchema.ts","../../../src/sdks/configurations/schemas/ex/exAwsS3Schema.ts","../../../src/sdks/configurations/schemas/ex/exAzureBlobStorageSchema.ts","../../../src/sdks/configurations/schemas/ex/exAzureDataLakeSchema.ts","../../../src/sdks/configurations/schemas/ex/exFtpSchema.ts","../../../src/sdks/configurations/schemas/ex/exHttpSchema.ts","../../../src/sdks/configurations/schemas/exDb/exDbDefaultSchema.ts","../../../src/sdks/configurations/schemas/exDb/exDbPgsqlSchema.ts","../../../src/sdks/configurations/schemas/exDb/exDbProgressSchema.ts","../../../src/sdks/configurations/schemas/exDb/exDbMysqlSchema.ts","../../../src/sdks/configurations/schemas/exDb/exDbMssqlSchema.ts","../../../src/sdks/configurations/schemas/exDb/exDbOracleSchema.ts","../../../src/sdks/configurations/schemas/exDb/exDbFirebirdSchema.ts","../../../src/sdks/configurations/schemas/exDb/exTeradataSchema.ts","../../../src/sdks/configurations/schemas/exDb/exDbInformixSchema.ts","../../../src/sdks/configurations/schemas/exDb/exDbSnowflakeSchema.ts","../../../src/sdks/configurations/schemas/exDb/exDbNetsuiteSchema.ts","../../../src/sdks/configurations/schemas/gooddataWriterSchema.ts","../../../src/sdks/configurations/schemas/googleAdsSchema.ts","../../../src/sdks/configurations/schemas/schedulerSchema.ts","../../../src/sdks/configurations/schemas/wrDb/wrDbDefaultSchema.ts","../../../src/sdks/configurations/schemas/wrDb/wrDbPgsqlSchema.ts","../../../src/sdks/configurations/schemas/wrDb/wrDbOracleSchema.ts","../../../src/sdks/configurations/schemas/wrDb/wrSynapseSchema.ts","../../../src/sdks/configurations/schemas/wrDb/wrRedshiftSchema.ts","../../../src/sdks/configurations/schemas/wrDb/wrDbMssqlSchema.ts","../../../src/sdks/configurations/schemas/wrDb/wrDbImpalaSchema.ts","../../../src/sdks/configurations/schemas/wrDb/wrExasolSchema.ts","../../../src/sdks/configurations/schemas/wrDb/wrFireboltSchema.ts","../../../src/sdks/configurations/schemas/wrDb/wrHiveCsasSchema.ts","../../../src/sdks/configurations/schemas/wrDb/wrThoughtspotSchema.ts","../../../src/sdks/configurations/schemas/wrDb/wrSisenseSchema.ts","../../../src/sdks/configurations/schemas/wrDb/wrDbSnowflakeSchema.ts","../../../src/sdks/configurations/createRegistry/createRegistry.ts","../../../src/sdks/configurations/registry.ts","../../../src/sdks/configurations/configurationsSdk.ts"],"sourcesContent":["import { z } from 'zod';\n\n/**\n * `keboola.app-data-gateway` — the Data Gateway provisions and manages its own Snowflake\n * workspace, so the config carries no credentials: just the id of the workspace it runs\n * against, stored at `parameters.db.workspaceId`.\n */\nexport const appDataGatewaySchema = z.object({\n parameters: z.object({\n db: z.object({\n workspaceId: z.number(),\n }),\n }),\n});\n","import { z } from 'zod';\n\n/** Wrap a `parameters.db` credential schema into the full component config shape. */\nexport const dbConfig = <Db extends z.ZodType>(db: Db) =>\n z.object({ parameters: z.object({ db }) });\n","import { z } from 'zod';\n\n/**\n * The credential fields shared by virtually every DB writer, stored at `parameters.db`.\n * Components extend this with driver-specific fields (`schema`, `warehouse`, `ssh`, …) and\n * override where they differ (e.g. Snowflake makes `#password` optional). Secret leaves use\n * the `#` prefix the encryption service recognizes.\n */\nexport const dbConnectionSchema = z.object({\n host: z.string().describe('Hostname'),\n port: z.number().describe('Port'),\n user: z.string().describe('Username'),\n '#password': z.string().describe('Password'),\n database: z.string().describe('Database Name'),\n});\n","import { z } from 'zod';\n\n/**\n * Marks a field as \"must be absent\" in one arm of a mutually-exclusive union: `z.undefined()`\n * rejects any value while `.optional()` lets the key be omitted entirely. Pairing it with a\n * required field in the sibling arm (e.g. `#password` XOR `#privateKey`) is what makes an\n * \"exactly one of\" union reject configs that set both keys — or neither — at runtime and in\n * the inferred type. Without it the arms would be open objects that silently strip the extra key.\n */\nexport const forbidden = z.undefined().optional();\n","import { z } from 'zod';\n\n/**\n * The OAuth credential reference components store under a top-level `authorization` key. `id`\n * points at the vault-stored credential; `version` is the OAuth-API version (3 on modern stacks).\n * Shared by every OAuth-backed component (Google family, Facebook, …).\n */\nexport const oauthAuthorizationSchema = z.object({\n oauth_api: z.object({\n id: z.string(),\n version: z.number().optional(),\n }),\n});\n","import { z } from 'zod';\n\nexport const sshTunnelSchema = z.object({\n enabled: z.boolean(),\n sshHost: z.string().optional(),\n user: z.string().optional(),\n sshPort: z.number().optional(),\n /** FTP passive-mode port range (e.g. `10000:10005`); only relevant to FTP extractors. */\n passivePortRange: z.string().optional(),\n keys: z\n .object({\n public: z.string().optional(),\n '#private': z.string().optional(),\n })\n .optional(),\n});\n","import { z } from 'zod';\n\n/** SSL options nested at `parameters.db.ssl` (drivers that support it, e.g. MySQL, Hive). */\nexport const sslSchema = z.object({\n enabled: z.boolean(),\n cert: z.string().optional(),\n '#key': z.string().optional(),\n ca: z.string().optional(),\n cipher: z.string().optional(),\n verifyServerCert: z.boolean().optional(),\n});\n","import { z } from 'zod';\n\nimport { forbidden } from './common';\n\n/**\n * `keboola.app-snowflake-dwh-manager` — master Snowflake connection. Auth is a password OR a\n * key-pair (exactly one). The common fields are shared; each variant requires its own secret and\n * *forbids the other* (`forbidden`), so a config carrying both — or neither — is rejected at\n * runtime and at the type level, matching the `wr-db-snowflake` XOR pattern.\n */\nconst dwhMasterBase = z.object({\n master_host: z.string(),\n master_user: z.string(),\n master_database: z.string(),\n warehouse: z.string(),\n});\n\nexport const appSnowflakeDwhManagerSchema = z.object({\n parameters: z.union([\n dwhMasterBase.extend({ '#master_password': z.string(), '#master_private_key': forbidden }),\n dwhMasterBase.extend({ '#master_private_key': z.string(), '#master_password': forbidden }),\n ]),\n});\n","import { z } from 'zod';\n\nimport { forbidden } from '../common';\n\n// `.loose()`: the auth block is validated, but the extractor's other `parameters` (bucket, key,\n// saveAs, …) are component-managed and must pass through rather than be stripped on create/update.\n/** Access-key credentials — forbids the IAM-role fields so the variants stay exclusive. */\nconst awsCredentialsAuth = z\n .object({\n loginType: z.literal('credentials'),\n accessKeyId: z.string(),\n '#secretAccessKey': z.string(),\n accountId: forbidden,\n roleName: forbidden,\n })\n .loose();\n\n/** IAM-role auth — forbids the access-key fields so the variants stay exclusive. */\nconst awsRoleAuth = z\n .object({\n loginType: z.literal('role'),\n accountId: z.string(),\n roleName: z.string(),\n accessKeyId: forbidden,\n '#secretAccessKey': forbidden,\n })\n .loose();\n\n/**\n * `keboola.ex-aws-s3` — access-key credentials OR IAM-role auth (exactly one). `loginType` is the\n * discriminant, and each arm *forbids the other* variant's fields (`z.undefined()`) so a config\n * mixing both — e.g. credentials + a stale `roleName` — is rejected rather than silently stripped.\n * The outer object is `.loose()` so top-level component-managed keys (`storage`, `processors`)\n * pass through.\n */\nexport const exAwsS3Schema = z\n .object({\n parameters: z.union([awsCredentialsAuth, awsRoleAuth]),\n })\n .loose();\n","import { z } from 'zod';\n\n/**\n * `kds-team.ex-azure-blob-storage-v2` — account name + key + container. Both levels are `.loose()`:\n * the connection block is validated, but component-managed `parameters` and top-level keys\n * (`storage`, `processors`) pass through rather than being stripped on create/update.\n */\nexport const exAzureBlobSchema = z\n .object({\n parameters: z\n .object({\n account_name: z.string(),\n '#account_key': z.string(),\n container_name: z.string(),\n })\n .loose(),\n })\n .loose();\n","import { z } from 'zod';\n\n/**\n * `kds-team.ex-azure-data-lake-gen2` — like Blob, but a `file_system` instead of a container. Both\n * levels are `.loose()`: the connection block is validated, but component-managed `parameters` and\n * top-level keys (`storage`, `processors`) pass through rather than being stripped on create/update.\n */\nexport const exAzureDataLakeSchema = z\n .object({\n parameters: z\n .object({\n account_name: z.string(),\n '#account_key': z.string(),\n file_system: z.string(),\n })\n .loose(),\n })\n .loose();\n","import { z } from 'zod';\n\nimport { forbidden, sshTunnelSchema } from '../common';\n\n/** Connection fields shared by both auth variants. */\nconst ftpConnection = z.object({\n host: z.string(),\n port: z.number(),\n connectionType: z.enum(['FTP', 'FTPS', 'SFTP']),\n username: z.string(),\n ignorePassiveAddress: z.boolean().optional(),\n ssh: sshTunnelSchema.optional(),\n path: z.string().optional(),\n onlyNewFiles: z.boolean().optional(),\n});\n\n// `.loose()`: validate the connection block but let component-managed parameter keys pass through.\n/** Password auth — forbids the private key so the variants stay exclusive. */\nconst ftpPasswordAuth = ftpConnection\n .extend({ '#password': z.string(), '#privateKey': forbidden })\n .loose();\n\n/** Private-key auth — forbids the password so the variants stay exclusive. */\nconst ftpPrivateKeyAuth = ftpConnection\n .extend({ '#privateKey': z.string(), '#password': forbidden })\n .loose();\n\n/**\n * `keboola.ex-ftp` / `keboola.ex-ftp-csas` — FTP/FTPS/SFTP server connection. Auth is a password\n * OR a private key (exactly one): each variant requires its secret and *forbids the other*\n * (`z.undefined()`), so a config with both — or neither — is rejected, and switching variants via\n * an update drops the abandoned secret (the whole `parameters` union subtree is replaced wholesale\n * by `schemaGuidedMerge`, so a partial patch must carry the complete connection block). The outer\n * object is `.loose()` so top-level component-managed keys (`storage`, `processors`) pass through.\n */\nexport const exFtpSchema = z\n .object({\n parameters: z.union([ftpPasswordAuth, ftpPrivateKeyAuth]),\n })\n .loose();\n","import { z } from 'zod';\n\n/**\n * `keboola.ex-http` — only the connection block is stable here. The request/job definitions are\n * component-managed and left unvalidated, so both levels are `.loose()`: extra `parameters` keys\n * and top-level keys (`storage`, `processors`) pass through `schema`/`inputSchema` unchanged rather\n * than being stripped on create/update.\n */\nexport const exHttpSchema = z\n .object({\n parameters: z.object({ baseUrl: z.string(), maxRedirects: z.number().optional() }).loose(),\n })\n .loose();\n","import { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/**\n * Default extractor credentials with an optional SSH tunnel, for the generic SSH-only drivers.\n *\n * - Keep in sync with kbc-ui's `hasSshTunnel` / `hasSsl` (`ex-db-generic/helpers.ts`).\n * - SSL-capable, tunnel-less and extra-field drivers get their own schema.\n */\nexport const exDbDefaultSchema = dbConfig(\n dbConnectionSchema.extend({ ssh: sshTunnelSchema.optional() }),\n);\n","import { dbConfig, dbConnectionSchema, sshTunnelSchema, sslSchema } from '../common';\n\n/** `keboola.ex-db-pgsql` — generic credentials that also accept SSL. */\nexport const exDbPgsqlSchema = dbConfig(\n dbConnectionSchema.extend({ ssh: sshTunnelSchema.optional(), ssl: sslSchema.optional() }),\n);\n","import { dbConfig, dbConnectionSchema } from '../common';\n\n/** `kds-team.ex-progress-db` — generic credentials, no SSH tunnel or SSL. */\nexport const exDbProgressSchema = dbConfig(dbConnectionSchema);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema, sslSchema } from '../common';\n\n/** `keboola.ex-db-mysql` — `database` optional + transaction-isolation / network-compression. */\nexport const exDbMysqlSchema = dbConfig(\n dbConnectionSchema.extend({\n database: z.string().optional(),\n transactionIsolationLevel: z\n .enum(['REPEATABLE READ', 'READ COMMITTED', 'READ UNCOMMITTED', 'SERIALIZABLE'])\n .optional(),\n networkCompression: z.boolean().optional(),\n ssh: sshTunnelSchema.optional(),\n ssl: sslSchema.optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema, sslSchema } from '../common';\n\n/** `keboola.ex-db-mssql` — `port` optional, otherwise the shared base. */\nexport const exDbMssqlSchema = dbConfig(\n dbConnectionSchema.extend({\n port: z.number().optional(),\n ssh: sshTunnelSchema.optional(),\n ssl: sslSchema.optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.ex-db-oracle` — host/port/database all optional (tnsnames is the alternative). */\nexport const exDbOracleSchema = dbConfig(\n dbConnectionSchema.omit({ host: true, port: true, database: true }).extend({\n host: z.string().optional(),\n port: z.number().optional(),\n database: z.string().optional(),\n tnsnames: z.string().optional(),\n connectThrough: z.boolean().optional(),\n ssh: sshTunnelSchema.optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig } from '../common';\n\n/** `keboola.ex-db-firebird` — `dbname` + user/#password only (no host/port/database fields). */\nexport const exDbFirebirdSchema = dbConfig(\n z.object({ dbname: z.string(), user: z.string(), '#password': z.string() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema } from '../common';\n\n/** `keboola.ex-teradata` — shared base with optional `database`. */\nexport const exTeradataSchema = dbConfig(\n dbConnectionSchema.extend({ database: z.string().optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema } from '../common';\n\n/** `keboola.ex-db-informix` — Informix server name + protocol + optional locale. */\nexport const exDbInformixSchema = dbConfig(\n dbConnectionSchema.extend({\n serverName: z.string(),\n protocol: z.enum(['onsoctcp', 'onsocssl']),\n dbLocale: z.string().optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, forbidden } from '../common';\n\n/**\n * `keboola.ex-db-snowflake` — auth is a union: password OR key-pair (exactly one). The common\n * fields (host/port/user/database + optional schema/warehouse) are shared; each variant requires\n * its own secret and forbids the other, so a config carrying both — or neither — is rejected at\n * runtime and at the type level.\n */\nconst snowflakeCommon = dbConnectionSchema\n .omit({ '#password': true })\n .extend({ schema: z.string().optional(), warehouse: z.string().optional() });\n\nexport const exDbSnowflakeSchema = dbConfig(\n z.union([\n snowflakeCommon.extend({ '#password': z.string(), '#privateKey': forbidden }),\n snowflakeCommon.extend({ '#privateKey': z.string(), '#password': forbidden }),\n ]),\n);\n","import { z } from 'zod';\n\nimport { dbConfig } from '../common';\n\n/** `keboola.ex-db-netsuite` — SuiteAnalytics account/role + user/#password (no host/port/db). */\nexport const exDbNetsuiteSchema = dbConfig(\n z.object({\n accountId: z.string(),\n roleId: z.string(),\n user: z.string(),\n '#password': z.string(),\n }),\n);\n\n/** `kds-team.ex-netsuite` — Connect host/port + server data source + account/role. */\nexport const exKdsNetsuiteSchema = dbConfig(\n z.object({\n host: z.string(),\n port: z.number(),\n server_data_source: z.enum(['NetSuite.com', 'NetSuite2.com']),\n account_id: z.string(),\n role_id: z.string(),\n user: z.string(),\n '#password': z.string(),\n }),\n);\n","import { z } from 'zod';\n\n/**\n * A single exported column. `type` is always present and drives which of the other fields the\n * UI shows (and persists): `dataType`/`dataTypeSize` for the base types + LABEL, `reference` for\n * LABEL/HYPERLINK, `schemaReference` for REFERENCE, `format`/`dateDimension` for DATE, and\n * `sortLabel`/`sortOrder` + the `identifier*` fields for ATTRIBUTE. They're optional here since a\n * given column only carries the subset relevant to its type. Mirrors the kbc-ui column adapter\n * (`apps/kbc-ui/src/scripts/modules/gooddata-writer-v3/helpers/makeColumnDefinition.ts`).\n */\nconst gooddataColumn = z.object({\n type: z.enum([\n 'ATTRIBUTE',\n 'CONNECTION_POINT',\n 'DATE',\n 'FACT',\n 'HYPERLINK',\n 'LABEL',\n 'REFERENCE',\n 'IGNORE',\n ]),\n id: z.string().optional(),\n title: z.string().optional(),\n dataType: z.enum(['BIGINT', 'DATE', 'DECIMAL', 'INT', 'VARCHAR']).optional(),\n dataTypeSize: z.string().optional(),\n reference: z.string().optional(),\n schemaReference: z.string().optional(),\n sortLabel: z.string().optional(),\n sortOrder: z.enum(['ASC', 'DESC']).optional(),\n format: z.string().optional(),\n dateDimension: z.string().optional(),\n identifier: z.string().optional(),\n identifierLabel: z.string().optional(),\n identifierSortLabel: z.string().optional(),\n});\n\n/** One exported table: a GoodData `title`, its `columns` keyed by source column name, and an\n * optional `disabled` flag toggled when export is switched off. */\nconst gooddataTable = z.object({\n title: z.string(),\n disabled: z.boolean().optional(),\n identifier: z.string().optional(),\n columns: z.record(z.string(), gooddataColumn),\n});\n\n/** One date dimension; `template` selects the date-dimension template (`gooddata` / `keboola` /\n * a custom template id). */\nconst gooddataDimension = z.object({\n template: z.string(),\n includeTime: z.boolean().optional(),\n identifier: z.string().optional(),\n});\n\n/**\n * `keboola.gooddata-writer` — GoodData project + login credentials plus the exported model:\n * `tables` (keyed by source table id) and `dimensions` (keyed by dimension name). Both are\n * optional — a fresh config has credentials before any table/dimension is mapped — and must be\n * declared: the registry validates create/update input with a deep-partial that strips keys\n * absent from this shape, so an undeclared `tables`/`dimensions` payload would be dropped before\n * it's stored.\n */\nexport const gooddataWriterSchema = z.object({\n parameters: z.object({\n project: z.object({ pid: z.string(), backendUrl: z.string().optional() }),\n user: z.object({ login: z.string(), '#password': z.string() }),\n loadOnly: z.boolean().optional(),\n multiLoad: z.boolean().optional(),\n tables: z.record(z.string(), gooddataTable).optional(),\n dimensions: z.record(z.string(), gooddataDimension).optional(),\n }),\n});\n","import { z } from 'zod';\n\nimport { oauthAuthorizationSchema } from './common';\n\n/** `keboola.ex-google-ads` — OAuth credential reference + account selection. */\nexport const exGoogleAdsSchema = z.object({\n authorization: oauthAuthorizationSchema,\n parameters: z.object({\n customerId: z.array(z.string()),\n onlyEnabledCustomers: z.boolean().optional(),\n continueOnFailure: z.boolean().optional(),\n getAccountChildren: z.boolean().optional(),\n }),\n});\n","import { z } from 'zod';\n\n/**\n * `keboola.scheduler` — drives a target component config on a cron schedule. Unlike the\n * writer configs, scheduler state lives at the top level (no `parameters` wrapper):\n * `schedule` holds the cron expression + timezone + enabled/disabled state, `target`\n * identifies which component configuration to run.\n */\nexport const schedulerSchema = z.object({\n schedule: z.object({\n cronTab: z.string(),\n // Legacy configs predate the timezone field; the UI falls back to 'UTC' when it's\n // missing, so a config without it is still runnable. Keep it optional to match.\n timezone: z.string().optional(),\n state: z.enum(['enabled', 'disabled']),\n }),\n target: z.object({\n componentId: z.string(),\n configurationId: z.string(),\n mode: z.literal('run'),\n }),\n});\n","import { dbConfig, dbConnectionSchema, sshTunnelSchema, sslSchema } from '../common';\n\n/**\n * Default writer credentials — host/port/user/#password/database + optional SSH and SSL tunnels.\n * Shared by the writers that add no extra fields (`keboola.wr-db-mysql`, `keboola.wr-db-hive`);\n * writers that add or rename fields get their own schema.\n */\nexport const wrDbDefaultSchema = dbConfig(\n dbConnectionSchema.extend({ ssh: sshTunnelSchema.optional(), ssl: sslSchema.optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.wr-db-pgsql` — adds a required `schema`, optional SSH. */\nexport const wrDbPgsqlSchema = dbConfig(\n dbConnectionSchema.extend({ schema: z.string(), ssh: sshTunnelSchema.optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.wr-db-oracle` — optional `schema`, optional SSH. */\nexport const wrDbOracleSchema = dbConfig(\n dbConnectionSchema.extend({ schema: z.string().optional(), ssh: sshTunnelSchema.optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema } from '../common';\n\n/** `keboola.wr-synapse` — optional `schema` (defaults to `dbo` in the UI). */\nexport const wrSynapseSchema = dbConfig(\n dbConnectionSchema.extend({ schema: z.string().optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.wr-redshift-v2` — required `schema`, optional SSH. */\nexport const wrRedshiftSchema = dbConfig(\n dbConnectionSchema.extend({ schema: z.string(), ssh: sshTunnelSchema.optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.wr-db-mssql-v2` — optional `instance`, required `tdsVersion`, optional SSH. */\nexport const wrDbMssqlSchema = dbConfig(\n dbConnectionSchema.extend({\n instance: z.string().optional(),\n tdsVersion: z.enum(['7.0', '7.1', '7.2', '7.3', '7.4']),\n ssh: sshTunnelSchema.optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.wr-db-impala` — adds `auth_mech`, optional SSH. */\nexport const wrDbImpalaSchema = dbConfig(\n dbConnectionSchema.extend({ auth_mech: z.number(), ssh: sshTunnelSchema.optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig } from '../common';\n\n/**\n * `kds-team.wr-exasol` — no `database`; auth is password OR SaaS personal-access-token\n * (`#refresh_token`), at least one required (both may coexist). Mirrors kbc-ui's\n * `apps/kbc-ui/src/scripts/modules/wr-db/templates/hasValidCredentials.ts`, which drops the\n * `#password` requirement once a `#refresh_token` is present.\n */\nconst exasolBase = z.object({\n host: z.string(),\n port: z.number(),\n user: z.string(),\n schema: z.string(),\n});\n\nexport const wrExasolSchema = dbConfig(\n z.union([\n exasolBase.extend({ '#password': z.string(), '#refresh_token': z.string().optional() }),\n exasolBase.extend({ '#refresh_token': z.string(), '#password': z.string().optional() }),\n ]),\n);\n","import { z } from 'zod';\n\nimport { dbConfig } from '../common';\n\n/** `kds-team.wr-firebolt` — no host/port; engine + AWS staging credentials. */\nexport const wrFireboltSchema = dbConfig(\n z.object({\n user: z.string(),\n '#password': z.string(),\n database: z.string(),\n aws_api_key_id: z.string(),\n '#aws_api_key_secret': z.string(),\n staging_bucket: z.string(),\n engine_name: z.string().optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `kds-team.wr-hive-csas` — Hive base + Kerberos auth. */\nexport const wrHiveCsasSchema = dbConfig(\n dbConnectionSchema.extend({\n kinitPrincipal: z.string(),\n servicePrincipal: z.string(),\n config: z.string(),\n '#keytab': z.string(),\n ssh: sshTunnelSchema.optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema } from '../common';\n\n/** `keboola.wr-thoughtspot` — SSH tunnel creds carried as top-level fields, not nested. */\nexport const wrThoughtspotSchema = dbConfig(\n dbConnectionSchema.extend({\n schema: z.string().optional(),\n sshUser: z.string(),\n '#sshPassword': z.string(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig } from '../common';\n\n/** `keboola.wr-sisense` — uses `username` (not `user`). */\nexport const wrSisenseSchema = dbConfig(\n z.object({\n host: z.string(),\n port: z.number(),\n username: z.string(),\n '#password': z.string(),\n database: z.string(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, forbidden } from '../common';\n\n/**\n * `keboola.wr-db-snowflake` — auth is a union: password OR key-pair (exactly one). The common\n * fields (host/port/user/database/schema/warehouse) are shared; each variant requires its own\n * secret and *forbids the other* (`z.undefined()`), so a config carrying both — or neither —\n * is rejected at runtime and at the type level. Without the `forbidden` half, the variants\n * would be open objects: the extra key is excess (TS allows it) and stripped (Zod accepts it).\n */\nconst snowflakeCommon = dbConnectionSchema\n .omit({ '#password': true })\n .extend({ schema: z.string(), warehouse: z.string().optional() });\n\nexport const wrDbSnowflakeSchema = dbConfig(\n z.union([\n snowflakeCommon.extend({ '#password': z.string(), '#privateKey': forbidden }),\n snowflakeCommon.extend({ '#privateKey': z.string(), '#password': forbidden }),\n ]),\n);\n","import { z } from 'zod';\n\n/** Deep-partial any schema: objects → keys optional (recursing), unions → each member\n * deep-partialed, anything else left as-is. Lets a union schema (e.g. Snowflake's\n * password | key-pair auth) still produce a partial input schema. */\nconst partialize = (schema: z.ZodType): z.ZodType => {\n if (schema instanceof z.ZodObject) return deepPartial(schema);\n if (schema instanceof z.ZodUnion) {\n const options = (schema.options as z.ZodType[]).map(partialize);\n return z.union(options as [z.ZodType, z.ZodType, ...z.ZodType[]]);\n }\n return schema;\n};\n\nconst deepPartial = (schema: z.ZodObject): z.ZodObject => {\n const shape: Record<string, z.ZodType> = {};\n for (const [key, value] of Object.entries(schema.shape)) {\n const field = value as z.ZodType;\n const inner = field instanceof z.ZodOptional ? (field.unwrap() as z.ZodType) : field;\n shape[key] = partialize(inner);\n }\n const partial = z.object(shape).partial();\n // Preserve the source object's catchall (e.g. a `.loose()` `parameters` block that must let\n // component-managed keys pass through) — rebuilding via `z.object` would otherwise strip it.\n return schema.def.catchall ? partial.catchall(schema.def.catchall) : partial;\n};\n\nexport type Registry<M extends Record<string, z.ZodObject>> = {\n add: <const Id extends string, Schema extends z.ZodObject>(\n componentId: Id,\n schema: Schema,\n ) => Registry<M & Record<Id, Schema>>;\n get: <Id extends keyof M>(\n componentId: Id,\n ) => {\n /** The component's complete runnable schema (precise per id). */\n schema: M[Id];\n /** Its deep-partial — the accepted create/update input. Loose `z.ZodObject` (the precise\n * partial type isn't worth deriving; callers get input typing from `schema` via `z.input`). */\n inputSchema: z.ZodObject;\n };\n has: (componentId: string) => boolean;\n};\n\n/** Extracts the registered component-id union from a registry instance type. */\nexport type InferComponentId<R> = R extends Registry<infer M> ? keyof M & string : never;\n\nexport const createRegistry = (): Registry<Record<never, never>> => {\n const map = new Map<string, z.ZodObject>();\n\n const registry = {\n add(componentId: string, schema: z.ZodObject) {\n map.set(componentId, schema);\n return registry;\n },\n get(componentId: string) {\n const schema = map.get(componentId);\n if (!schema) throw new Error(`No configuration registered for component \"${componentId}\".`);\n return { schema, inputSchema: deepPartial(schema) };\n },\n has: (componentId: string) => map.has(componentId),\n };\n\n return registry as unknown as Registry<Record<never, never>>;\n};\n","import { ComponentId } from '../../constants/componentId';\n\nimport { appDataGatewaySchema } from './schemas/appDataGatewaySchema';\nimport { appSnowflakeDwhManagerSchema } from './schemas/appSnowflakeDwhManagerSchema';\nimport {\n exAwsS3Schema,\n exAzureBlobSchema,\n exAzureDataLakeSchema,\n exFtpSchema,\n exHttpSchema,\n} from './schemas/ex';\nimport {\n exDbDefaultSchema,\n exDbFirebirdSchema,\n exDbInformixSchema,\n exDbMssqlSchema,\n exDbMysqlSchema,\n exDbNetsuiteSchema,\n exDbOracleSchema,\n exDbPgsqlSchema,\n exDbProgressSchema,\n exDbSnowflakeSchema,\n exKdsNetsuiteSchema,\n exTeradataSchema,\n} from './schemas/exDb';\nimport { gooddataWriterSchema } from './schemas/gooddataWriterSchema';\nimport { exGoogleAdsSchema } from './schemas/googleAdsSchema';\nimport { schedulerSchema } from './schemas/schedulerSchema';\nimport {\n wrDbDefaultSchema,\n wrDbImpalaSchema,\n wrDbMssqlSchema,\n wrDbOracleSchema,\n wrDbPgsqlSchema,\n wrDbSnowflakeSchema,\n wrExasolSchema,\n wrFireboltSchema,\n wrHiveCsasSchema,\n wrRedshiftSchema,\n wrSisenseSchema,\n wrSynapseSchema,\n wrThoughtspotSchema,\n} from './schemas/wrDb';\nimport { createRegistry, type GetRegisteredId } from './createRegistry';\n\nexport const registry = createRegistry()\n /**\n * DB writers (`wr-db-*` family + related SaaS targets). Split into the standard writers\n * built on the shared `parameters.db` connection base and the special-cased targets whose\n * config diverges (extra auth, no host/port, or a provisioned workspace).\n */\n\n // Standard writers — host/port/user/#password/database, plus per-driver extras (schema, ssh…).\n .add(ComponentId.WR_DB_MYSQL, wrDbDefaultSchema)\n .add(ComponentId.WR_DB_PGSQL, wrDbPgsqlSchema)\n .add(ComponentId.WR_PAIRITY, wrDbPgsqlSchema) // pgsql variant\n .add(ComponentId.WR_DB_ORACLE, wrDbOracleSchema)\n .add(ComponentId.WR_DB_SNOWFLAKE, wrDbSnowflakeSchema)\n .add(ComponentId.WR_DB_SNOWFLAKE_GCS, wrDbSnowflakeSchema)\n .add(ComponentId.WR_DB_SNOWFLAKE_GCS_S3, wrDbSnowflakeSchema)\n .add(ComponentId.WR_SNOWFLAKE_BLOB_STORAGE, wrDbSnowflakeSchema)\n .add(ComponentId.WR_LOOKER_V2, wrDbSnowflakeSchema) // legacy snowflake\n .add(ComponentId.WR_SYNAPSE, wrSynapseSchema)\n .add(ComponentId.WR_REDSHIFT, wrRedshiftSchema)\n .add(ComponentId.WR_DB_MSSQL, wrDbMssqlSchema)\n .add(ComponentId.WR_DB_HIVE, wrDbDefaultSchema)\n .add(ComponentId.WR_DB_IMPALA, wrDbImpalaSchema)\n\n // Special-cased targets — diverging auth or credential shape.\n .add(ComponentId.WR_HIVE_CSAS, wrHiveCsasSchema) // Kerberos auth\n .add(ComponentId.WR_THOUGHTSPOT, wrThoughtspotSchema) // top-level SSH creds\n .add(ComponentId.WR_EXASOL, wrExasolSchema)\n .add(ComponentId.WR_FIREBOLT, wrFireboltSchema)\n .add(ComponentId.WR_SISENSE, wrSisenseSchema)\n .add(ComponentId.APP_DATA_GATEWAY, appDataGatewaySchema) // provisioned workspace, no creds\n .add(ComponentId.SCHEDULER, schedulerSchema)\n\n // App-specific writers — bespoke credential blocks.\n .add(ComponentId.APP_SNOWFLAKE_DWH_MANAGER, appSnowflakeDwhManagerSchema)\n .add(ComponentId.GOODDATA_WRITER, gooddataWriterSchema)\n\n /**\n * DB extractors (`ex-db-*` family) — same `parameters.db` credentials as the writers above.\n * Split into the generic-credentials drivers that reuse `exDbDefaultSchema` and the drivers\n * whose credentials diverge enough to need their own schema.\n */\n\n // Default credentials — host/port/user/#password/database + optional SSH tunnel.\n .add(ComponentId.EX_DB_REDSHIFT, exDbDefaultSchema)\n .add(ComponentId.EX_DB_DB2, exDbDefaultSchema)\n .add(ComponentId.EX_DB_DB2_BATA, exDbDefaultSchema)\n .add(ComponentId.EX_DB_MSSQL_CDATA, exDbDefaultSchema)\n .add(ComponentId.EX_DB_IMPALA, exDbDefaultSchema)\n .add(ComponentId.EX_DB_HIVE, exDbDefaultSchema)\n .add(ComponentId.EX_DB_HIVE_CSAS, exDbDefaultSchema)\n .add(ComponentId.EX_DB_HIVE_CSAS_TEST, exDbDefaultSchema)\n\n // Driver-specific credentials — extra/renamed fields or different SSH tunnel / SSL support.\n .add(ComponentId.EX_DB_PGSQL, exDbPgsqlSchema) // generic creds + SSL\n .add(ComponentId.EX_DB_MYSQL, exDbMysqlSchema)\n .add(ComponentId.EX_DB_MSSQL, exDbMssqlSchema)\n .add(ComponentId.EX_DB_ORACLE, exDbOracleSchema)\n .add(ComponentId.EX_DB_SNOWFLAKE, exDbSnowflakeSchema)\n .add(ComponentId.EX_DB_FIREBIRD, exDbFirebirdSchema)\n .add(ComponentId.EX_DB_NETSUITE, exDbNetsuiteSchema)\n .add(ComponentId.EX_DB_INFORMIX, exDbInformixSchema)\n .add(ComponentId.EX_TERADATA, exTeradataSchema)\n .add(ComponentId.KDS_EX_NETSUITE, exKdsNetsuiteSchema)\n .add(ComponentId.KDS_EX_PROGRESS_DB, exDbProgressSchema) // generic creds, no SSH/SSL\n // Google (OAuth) components\n .add(ComponentId.EX_GOOGLE_ADS, exGoogleAdsSchema)\n\n /**\n * File/connection extractors (`ex` family) — no shared credential base; each has its own\n * connection/credentials shape, so each is its own schema (ftp-csas reuses ftp).\n */\n .add(ComponentId.EX_HTTP, exHttpSchema)\n .add(ComponentId.EX_FTP, exFtpSchema)\n .add(ComponentId.EX_FTP_CSAS, exFtpSchema) // same shape as ftp\n .add(ComponentId.EX_AWS_S3, exAwsS3Schema)\n .add(ComponentId.KDS_EX_AZURE_BLOB_STORAGE_V2, exAzureBlobSchema)\n .add(ComponentId.KDS_EX_AZURE_DATA_LAKE_GEN2, exAzureDataLakeSchema);\n\nexport type RegisteredComponentId = GetRegisteredId<typeof registry>;\n","import type { z } from 'zod';\n\nimport type { createEncryptionClient } from '../../clients/encryption/encryptionClient';\nimport type * as storage from '../../clients/storage';\nimport type {\n BaseComponentConfig,\n ConfigurationPath,\n CreateConfigurationInput,\n UpdateConfigurationInput,\n} from '../../clients/storage/types';\nimport type { createDefaultBranch } from '../../domain/defaultBranch';\nimport {\n assertCanCreateConfiguration,\n assertCanUpdateConfiguration,\n} from '../../domain/permissions/configurations';\nimport type { Project } from '../../domain/project';\nimport { isEmptyDeep } from '../../utils/isEmptyDeep';\nimport { schemaGuidedMerge } from '../../utils/schemaGuidedMerge';\n\nimport { type RegisteredComponentId, registry } from './registry';\n\ntype ConfigurationSdkContext = {\n project: Project;\n defaultBranch: ReturnType<typeof createDefaultBranch>;\n};\n\ntype Options = {\n storageClient: ReturnType<typeof storage.createStorageClient>;\n encryptionClient: ReturnType<typeof createEncryptionClient>;\n context: ConfigurationSdkContext;\n};\n\ntype DeepPartial<T> = T extends object ? { [K in keyof T]?: DeepPartial<T[K]> } : T;\n\ntype ConfigurationSchema<ComponentId extends RegisteredComponentId> = z.input<\n ReturnType<typeof registry.get<ComponentId>>['schema']\n>;\n\ntype TypedConfiguration<ComponentId extends RegisteredComponentId> = {\n componentId: ComponentId;\n configuration: DeepPartial<ConfigurationSchema<ComponentId>>;\n};\n\n/**\n * How an update writes the patch against the stored configuration:\n * - `'merge'` (default) — reads the config, deep-merges by schema; credential unions and arrays are\n * replaced wholesale (dropping an abandoned secret), out-of-schema keys kept.\n * - `'replace'` — stores exactly what is sent (validated + encrypted); anything omitted,\n * e.g. `storage`, is gone.\n */\ntype UpdateMode = 'merge' | 'replace';\n\nconst toConfigResult = <ComponentId extends RegisteredComponentId>(\n data: BaseComponentConfig,\n schema: z.ZodType,\n) => {\n const result = schema.safeParse(data.configuration);\n\n return {\n data: data as BaseComponentConfig<ConfigurationSchema<ComponentId>>,\n runnable: result.success,\n error: result.error,\n };\n};\n\nexport const createConfigurationSdk = ({ storageClient, encryptionClient, context }: Options) => {\n const _encrypt = async (\n componentId: RegisteredComponentId,\n data: Record<string, unknown>,\n ): Promise<Record<string, unknown>> => {\n if (isEmptyDeep(data)) return data;\n\n return encryptionClient.encryptScopedSecrets({\n scope: 'ProjectSecure',\n componentId,\n projectId: context.project.sapiToken.owner.id,\n data,\n });\n };\n\n const getConfiguration = async <ComponentId extends RegisteredComponentId>(\n path: ConfigurationPath<ComponentId>,\n ) => {\n const data = await storageClient.configurations.getConfiguration(path);\n const def = registry.get(path.componentId);\n\n return toConfigResult<ComponentId>(data, def.schema);\n };\n\n const createConfiguration = async <ComponentId extends RegisteredComponentId>(\n input: Omit<CreateConfigurationInput<ComponentId>, 'componentId' | 'configuration'> &\n TypedConfiguration<ComponentId>,\n ) => {\n const { componentId, branchId, configuration, ...rest } = input;\n assertCanCreateConfiguration(context.project.sapiToken, {\n isDevModeActive: context.defaultBranch.isDev(branchId),\n });\n const def = registry.get(componentId);\n const validated = def.inputSchema.parse(configuration);\n const encrypted = await _encrypt(componentId, validated);\n\n const data = await storageClient.configurations.createConfiguration({\n ...rest,\n branchId,\n componentId,\n configuration: encrypted,\n });\n\n return toConfigResult<ComponentId>(data, def.schema);\n };\n\n const updateConfiguration = async <ComponentId extends RegisteredComponentId>(\n input: Omit<UpdateConfigurationInput<ComponentId>, 'componentId' | 'configuration'> &\n TypedConfiguration<ComponentId> & { mode?: UpdateMode },\n ) => {\n const { componentId, branchId, configId, configuration, mode = 'merge', ...rest } = input;\n assertCanUpdateConfiguration(context.project.sapiToken, {\n isDevModeActive: context.defaultBranch.isDev(branchId),\n });\n const def = registry.get(componentId);\n\n const validated = def.inputSchema.parse(configuration);\n const encrypted = await _encrypt(componentId, validated);\n\n let newConfiguration: Record<string, unknown> = encrypted;\n if (mode === 'merge') {\n const original = await storageClient.configurations.getConfiguration({\n componentId,\n branchId,\n configId,\n });\n newConfiguration = schemaGuidedMerge(def.schema, original.configuration ?? {}, encrypted);\n }\n\n const { configuration: data } = await storageClient.configurations.updateConfiguration({\n ...rest,\n branchId,\n componentId,\n configId,\n configuration: newConfiguration,\n });\n\n return toConfigResult<ComponentId>(data, def.schema);\n };\n\n return { getConfiguration, createConfiguration, updateConfiguration };\n};\n"],"mappings":";;;;;;;;;;AAOA,MAAa,uBAAuB,EAAE,OAAO,EAC3C,YAAY,EAAE,OAAO,EACnB,IAAI,EAAE,OAAO,EACX,aAAa,EAAE,OAAO,EACxB,CAAC,EACH,CAAC,EACH,CAAC;;;ACVD,MAAa,YAAkC,OAC7C,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC;;;;;;;;ACI3C,MAAa,qBAAqB,EAAE,OAAO;CACzC,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,UAAU;CACpC,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,MAAM;CAChC,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,UAAU;CACpC,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,UAAU;CAC3C,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,eAAe;AAC/C,CAAC;;;;;;;;;ACLD,MAAa,YAAY,EAAE,UAAU,CAAC,CAAC,SAAS;;;;;;;ACFhD,MAAa,2BAA2B,EAAE,OAAO,EAC/C,WAAW,EAAE,OAAO;CAClB,IAAI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e;EACjB,CAAC;EAED,OAAO,eAA4B,MAAM,IAAI,MAAM;CACrD;CAEA,MAAM,sBAAsB,OAC1B,UAEG;EACH,MAAM,EAAE,aAAa,UAAU,UAAU,eAAe,OAAO,SAAS,GAAG,SAAS;EACpF,6BAA6B,QAAQ,QAAQ,WAAW,EACtD,iBAAiB,QAAQ,cAAc,MAAM,QAAQ,EACvD,CAAC;EACD,MAAM,MAAM,SAAS,IAAI,WAAW;EAEpC,MAAM,YAAY,IAAI,YAAY,MAAM,aAAa;EACrD,MAAM,YAAY,MAAM,SAAS,aAAa,SAAS;EAEvD,IAAI,mBAA4C;EAChD,IAAI,SAAS,SAAS;GACpB,MAAM,WAAW,MAAM,cAAc,eAAe,iBAAiB;IACnE;IACA;IACA;GACF,CAAC;GACD,mBAAmB,kBAAkB,IAAI,QAAQ,SAAS,iBAAiB,CAAC,GAAG,SAAS;EAC1F;EAEA,MAAM,EAAE,eAAe,SAAS,MAAM,cAAc,eAAe,oBAAoB;GACrF,GAAG;GACH;GACA;GACA;GACA,eAAe;EACjB,CAAC;EAED,OAAO,eAA4B,MAAM,IAAI,MAAM;CACrD;CAEA,OAAO;EAAE;EAAkB;EAAqB;CAAoB;AACtE"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const require_middleware = require("../../middleware-
|
|
6
|
-
const require_developerPortalClient = require("../../developerPortalClient-
|
|
7
|
-
|
|
2
|
+
const require_createFetchClient = require("../../createFetchClient-DEkUH662.cjs");
|
|
3
|
+
const require_dedupe = require("../../dedupe-Bf0gl9TJ.cjs");
|
|
4
|
+
const require_store = require("../../store-2OyH1XOP.cjs");
|
|
5
|
+
const require_middleware = require("../../middleware-B9RNuLfD.cjs");
|
|
6
|
+
const require_developerPortalClient = require("../../developerPortalClient-BfRxYrWj.cjs");
|
|
7
|
+
// src/sdks/developerPortal/tokenExpiry.ts
|
|
8
8
|
/**
|
|
9
9
|
* Reads a JWT's `exp` claim as milliseconds, or `null` when unparseable ("expiry unknown", which the
|
|
10
10
|
* caller leaves to the 401 path). A read, not a verification.
|
|
@@ -29,8 +29,7 @@ const readTokenExpiry = (token) => {
|
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
|
|
33
|
-
//#region src/sdks/developerPortal/credential.ts
|
|
32
|
+
// src/sdks/developerPortal/credential.ts
|
|
34
33
|
const DEFAULT_REFRESH_LEAD_TIME_MS = 3e5;
|
|
35
34
|
/** Mirrors `createBearerCredential`, over the id token of the trio. */
|
|
36
35
|
const createDeveloperPortalCredential = ({ refresh, getTokens, onSessionExpired, refreshLeadTimeMs = DEFAULT_REFRESH_LEAD_TIME_MS }) => {
|
|
@@ -58,8 +57,7 @@ const createDeveloperPortalCredential = ({ refresh, getTokens, onSessionExpired,
|
|
|
58
57
|
notifyExpired: () => onSessionExpired?.()
|
|
59
58
|
};
|
|
60
59
|
};
|
|
61
|
-
|
|
62
|
-
//#region src/sdks/developerPortal/middleware.ts
|
|
60
|
+
// src/sdks/developerPortal/middleware.ts
|
|
63
61
|
/**
|
|
64
62
|
* Stamps the id token, and on a 401 force-refreshes and replays once. Mirrors
|
|
65
63
|
* `createBearerAuthMiddleware`, minus the `Bearer ` prefix apps-api does not use.
|
|
@@ -91,8 +89,7 @@ const createDeveloperPortalAuthMiddleware = (credential) => {
|
|
|
91
89
|
}
|
|
92
90
|
};
|
|
93
91
|
};
|
|
94
|
-
|
|
95
|
-
//#region src/sdks/developerPortal/developerPortalSdk.ts
|
|
92
|
+
// src/sdks/developerPortal/developerPortalSdk.ts
|
|
96
93
|
/**
|
|
97
94
|
* `createDeveloperPortalClient` plus the session that keeps it authenticated.
|
|
98
95
|
*
|
|
@@ -189,7 +186,6 @@ const createDeveloperPortalSdk = ({ baseUrl, tokens: initialTokens = null, onTok
|
|
|
189
186
|
}
|
|
190
187
|
};
|
|
191
188
|
};
|
|
192
|
-
//#endregion
|
|
193
189
|
exports.createDeveloperPortalSdk = createDeveloperPortalSdk;
|
|
194
190
|
|
|
195
191
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["isUnauthorized","dedupe","HttpHeader","isUnauthorized","createStore","createDeveloperPortalClient"],"sources":["../../../src/sdks/developerPortal/tokenExpiry.ts","../../../src/sdks/developerPortal/credential.ts","../../../src/sdks/developerPortal/middleware.ts","../../../src/sdks/developerPortal/developerPortalSdk.ts"],"sourcesContent":["/**\n * Reads a JWT's `exp` claim as milliseconds, or `null` when unparseable (\"expiry unknown\", which the\n * caller leaves to the 401 path). A read, not a verification.\n *\n * Needed because apps-api reports `expiresIn` on login but never on refresh, so it cannot keep a\n * proactive-refresh clock honest past the first rotation. The token always carries its own expiry.\n */\nexport const readTokenExpiry = (token: string): number | null => {\n const segments = token.split('.');\n if (segments.length !== 3) return null;\n\n const payload = segments[1];\n if (payload === undefined || payload === '') return null;\n\n try {\n // base64url -> base64, and re-pad: `atob` requires padding, base64url omits it.\n const base64 = payload.replaceAll('-', '+').replaceAll('_', '/');\n const padded = base64.padEnd(base64.length + ((4 - (base64.length % 4)) % 4), '=');\n const claims: unknown = JSON.parse(atob(padded));\n if (typeof claims !== 'object' || claims === null || !('exp' in claims)) return null;\n const { exp } = claims as { exp: unknown };\n if (typeof exp !== 'number' || !Number.isFinite(exp)) return null;\n return exp * 1000;\n } catch {\n return null;\n }\n};\n","import type { DeveloperPortalTokens } from '../../clients/developerPortal/tokens';\nimport { isUnauthorized } from '../../keboola/bearer/credentials';\nimport { dedupe } from '../../utils';\n\nimport { readTokenExpiry } from './tokenExpiry';\n\ntype Options = {\n refresh: () => Promise<DeveloperPortalTokens>;\n /** Live read from the session, so this holds no token of its own. `null` when signed out. */\n getTokens: () => DeveloperPortalTokens | null;\n /** May fire more than once; the caller owns any fire-once latch. */\n onSessionExpired?: () => void;\n /**\n * An absolute lead time rather than `createBearerCredential`'s fractional threshold: that needs the\n * token's full lifetime, and apps-api reports `expiresIn` on login only, never on refresh.\n */\n refreshLeadTimeMs?: number;\n};\n\nconst DEFAULT_REFRESH_LEAD_TIME_MS = 5 * 60 * 1000;\n\nexport type DeveloperPortalCredential = {\n getIdToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n getTokens: () => DeveloperPortalTokens | null;\n notifyExpired: () => void;\n};\n\n/** Mirrors `createBearerCredential`, over the id token of the trio. */\nexport const createDeveloperPortalCredential = ({\n refresh,\n getTokens,\n onSessionExpired,\n refreshLeadTimeMs = DEFAULT_REFRESH_LEAD_TIME_MS,\n}: Options): DeveloperPortalCredential => {\n const doRefresh = async (): Promise<DeveloperPortalTokens> => {\n try {\n return await refresh();\n } catch (error) {\n // Only a 401 means the refresh token is dead. Signing out over a 5xx would be a self-inflicted\n // logout, so anything else propagates without expiring the session.\n if (isUnauthorized(error)) onSessionExpired?.();\n throw error;\n }\n };\n\n // N concurrent 401s must cause one rotation: each extra one invalidates the tokens the others got.\n const refreshShared = dedupe(doRefresh);\n\n const getIdToken = async ({ forceRefresh = false } = {}): Promise<string | null> => {\n const tokens = getTokens();\n if (tokens === null) return null;\n if (forceRefresh) return (await refreshShared()).token;\n\n const expiresAt = readTokenExpiry(tokens.token);\n // Unknown expiry is left to the 401 path; a `0` here would rotate on every request.\n if (expiresAt === null) return tokens.token;\n if (Date.now() < expiresAt - refreshLeadTimeMs) return tokens.token;\n\n // Proactive rotation is best-effort — a real 401 drives the mandatory one.\n return refreshShared()\n .then((fresh) => fresh.token)\n .catch(() => tokens.token);\n };\n\n return { getIdToken, getTokens, notifyExpired: () => onSessionExpired?.() };\n};\n","import { HttpHeader, type MiddlewareFn } from '../../fetchClient';\nimport { isUnauthorized } from '../../keboola/bearer/credentials';\n\nimport type { DeveloperPortalCredential } from './credential';\n\n/**\n * Stamps the id token, and on a 401 force-refreshes and replays once. Mirrors\n * `createBearerAuthMiddleware`, minus the `Bearer ` prefix apps-api does not use.\n *\n * An anonymous session passes through unstamped, so a failed login is never read as session expiry.\n */\nexport const createDeveloperPortalAuthMiddleware = (\n credential: DeveloperPortalCredential,\n): MiddlewareFn => {\n return (next) => async (request) => {\n const token = await credential.getIdToken();\n if (token === null) return next(request);\n\n // Cloned before the first attempt consumes the body. Cloning the `Request` carries a binary or\n // FormData payload through byte-for-byte.\n const retryRequest = request.request.clone();\n request.request.headers.set(HttpHeader.AUTHORIZATION, token);\n\n try {\n return await next(request);\n } catch (error) {\n if (!isUnauthorized(error)) throw error;\n\n const refreshed = await credential.getIdToken({ forceRefresh: true }).catch(() => null);\n // Nothing to replay with, because a concurrent sign-out landed or the rotation failed. The\n // caller's request failed with a 401, so that is what they see.\n if (refreshed === null) throw error;\n retryRequest.headers.set(HttpHeader.AUTHORIZATION, refreshed);\n\n try {\n return await next({ ...request, request: retryRequest });\n } catch (retryError) {\n if (isUnauthorized(retryError)) credential.notifyExpired();\n throw retryError;\n }\n }\n };\n};\n","import { createDeveloperPortalClient } from '../../clients/developerPortal/developerPortalClient';\nimport type { DeveloperPortalTokens } from '../../clients/developerPortal/tokens';\nimport type { LoginSuccess } from '../../clients/developerPortal/types';\nimport type { MiddlewareFn } from '../../fetchClient';\nimport { createStore } from '../../utils';\n\nimport { createDeveloperPortalCredential } from './credential';\nimport { createDeveloperPortalAuthMiddleware } from './middleware';\n\nexport type DeveloperPortalSdkOptions = {\n baseUrl: string;\n /** Session to restore on construction. */\n tokens?: DeveloperPortalTokens | null;\n /** Persistence hook, fired on sign-in, every rotation, and with `null` on sign-out or expiry. */\n onTokensChange?: (tokens: DeveloperPortalTokens | null) => void;\n /** The session is dead; tokens are already cleared. The consumer redirects to sign-in. */\n onSessionExpired?: () => void;\n refreshLeadTimeMs?: number;\n middlewares?: MiddlewareFn[];\n};\n\n/**\n * `createDeveloperPortalClient` plus the session that keeps it authenticated.\n *\n * - Builds its own client: middleware, credential and session depend on each other in a cycle.\n */\nexport const createDeveloperPortalSdk = ({\n baseUrl,\n tokens: initialTokens = null,\n onTokensChange,\n onSessionExpired,\n refreshLeadTimeMs,\n middlewares = [],\n}: DeveloperPortalSdkOptions) => {\n const store = createStore<DeveloperPortalTokens | null>(initialTokens);\n store.subscribe((value) => onTokensChange?.(value));\n\n const getTokens = () => store.get();\n\n const requireTokens = (action: string): DeveloperPortalTokens => {\n const tokens = store.get();\n if (tokens === null) {\n throw new Error(`Developer Portal: ${action} requires a signed-in session.`);\n }\n return tokens;\n };\n\n // No auth middleware, so a rotation cannot recurse into the middleware that triggered it.\n const refreshClient = createDeveloperPortalClient({ baseUrl, middlewares });\n\n const refresh = async (): Promise<DeveloperPortalTokens> => {\n const before = store.get();\n if (before === null) {\n throw new Error('Cannot refresh the Developer Portal session: signed out.');\n }\n\n const { token, accessToken } = await refreshClient.auth.refreshTokens(before.refreshToken);\n const next: DeveloperPortalTokens = { token, accessToken, refreshToken: before.refreshToken };\n\n // Sign-out wins over an in-flight rotation; otherwise the response signs the user back in.\n const after = store.get();\n if (after === null || after.refreshToken !== before.refreshToken) {\n throw new Error('Developer Portal session changed while refreshing; discarding the result.');\n }\n\n store.set(next);\n return next;\n };\n\n const clear = () => store.set(null);\n\n const credential = createDeveloperPortalCredential({\n refresh,\n getTokens,\n refreshLeadTimeMs,\n onSessionExpired: () => {\n clear();\n onSessionExpired?.();\n },\n });\n\n const client = createDeveloperPortalClient({\n baseUrl,\n middlewares,\n authMiddleware: createDeveloperPortalAuthMiddleware(credential),\n });\n\n // `refreshTokens` is not re-exposed: rotating outside the store leaves stale tokens.\n const { refreshTokens: _storeBypassingRotation, ...auth } = client.auth;\n\n const api = {\n ...client,\n auth: {\n ...auth,\n logout: async (signal?: AbortSignal) =>\n client.auth.logout(requireTokens('sign-out').accessToken, signal),\n // Both MFA calls bypass the reactive 401 path, so rotate proactively first.\n setupMfa: async (signal?: AbortSignal) => {\n await credential.getIdToken();\n const { token, accessToken } = requireTokens('MFA enrolment');\n return client.auth.setupMfa({ idToken: token, accessToken }, signal);\n },\n confirmMfa: async (code: string, signal?: AbortSignal) => {\n await credential.getIdToken();\n const { token, accessToken } = requireTokens('MFA confirmation');\n return client.auth.confirmMfa({ idToken: token, accessToken, code }, signal);\n },\n },\n };\n\n const session = {\n set: (result: LoginSuccess) => {\n store.set({\n token: result.token,\n accessToken: result.accessToken,\n refreshToken: result.refreshToken,\n });\n },\n get: getTokens,\n subscribe: store.subscribe,\n clear,\n /** Rotates if the id token is inside the lead time. Best-effort; the 401 path is the guarantee. */\n ensureFresh: async (): Promise<void> => {\n await credential.getIdToken();\n },\n /** Rotates now, for a change of claims (e.g. leaving a vendor). Propagates failure. */\n refresh: async (): Promise<void> => {\n await credential.getIdToken({ forceRefresh: true });\n },\n isAuthenticated: () => store.get() !== null,\n };\n\n return { api, session };\n};\n\nexport type DeveloperPortalSdk = ReturnType<typeof createDeveloperPortalSdk>;\nexport type DeveloperPortalSession = DeveloperPortalSdk['session'];\n"],"mappings":";;;;;;;;;;;;;;AAOA,MAAa,mBAAmB,UAAiC;CAC/D,MAAM,WAAW,MAAM,MAAM,GAAG;CAChC,IAAI,SAAS,WAAW,GAAG,OAAO;CAElC,MAAM,UAAU,SAAS;CACzB,IAAI,YAAY,KAAA,KAAa,YAAY,IAAI,OAAO;CAEpD,IAAI;EAEF,MAAM,SAAS,QAAQ,WAAW,KAAK,GAAG,CAAC,CAAC,WAAW,KAAK,GAAG;EAC/D,MAAM,SAAS,OAAO,OAAO,OAAO,UAAW,IAAK,OAAO,SAAS,KAAM,GAAI,GAAG;EACjF,MAAM,SAAkB,KAAK,MAAM,KAAK,MAAM,CAAC;EAC/C,IAAI,OAAO,WAAW,YAAY,WAAW,QAAQ,EAAE,SAAS,SAAS,OAAO;EAChF,MAAM,EAAE,QAAQ;EAChB,IAAI,OAAO,QAAQ,YAAY,CAAC,OAAO,SAAS,GAAG,GAAG,OAAO;EAC7D,OAAO,MAAM;CACf,QAAQ;EACN,OAAO;CACT;AACF;;;ACPA,MAAM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,GAAG,SAAS,OAAO;CA4CnE,OAAO;EAAE,KAAA;GAzCP,GAAG;GACH,MAAM;IACJ,GAAG;IACH,QAAQ,OAAO,WACb,OAAO,KAAK,OAAO,cAAc,UAAU,CAAC,CAAC,aAAa,MAAM;IAElE,UAAU,OAAO,WAAyB;KACxC,MAAM,WAAW,WAAW;KAC5B,MAAM,EAAE,OAAO,gBAAgB,cAAc,eAAe;KAC5D,OAAO,OAAO,KAAK,SAAS;MAAE,SAAS;MAAO;KAAY,GAAG,MAAM;IACrE;IACA,YAAY,OAAO,MAAc,WAAyB;KACxD,MAAM,WAAW,WAAW;KAC5B,MAAM,EAAE,OAAO,gBAAgB,cAAc,kBAAkB;KAC/D,OAAO,OAAO,KAAK,WAAW;MAAE,SAAS;MAAO;MAAa;KAAK,GAAG,MAAM;IAC7E;GACF;EAyBS;EAAG,SAAA;GArBZ,MAAM,WAAyB;IAC7B,MAAM,IAAI;KACR,OAAO,OAAO;KACd,aAAa,OAAO;KACpB,cAAc,OAAO;IACvB,CAAC;GACH;GACA,KAAK;GACL,WAAW,MAAM;GACjB;;GAEA,aAAa,YAA2B;IACtC,MAAM,WAAW,WAAW;GAC9B;;GAEA,SAAS,YAA2B;IAClC,MAAM,WAAW,WAAW,EAAE,cAAc,KAAK,CAAC;GACpD;GACA,uBAAuB,MAAM,IAAI,MAAM;EAGrB;CAAE;AACxB"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["isUnauthorized","dedupe","HttpHeader","isUnauthorized","createStore","createDeveloperPortalClient"],"sources":["../../../src/sdks/developerPortal/tokenExpiry.ts","../../../src/sdks/developerPortal/credential.ts","../../../src/sdks/developerPortal/middleware.ts","../../../src/sdks/developerPortal/developerPortalSdk.ts"],"sourcesContent":["/**\n * Reads a JWT's `exp` claim as milliseconds, or `null` when unparseable (\"expiry unknown\", which the\n * caller leaves to the 401 path). A read, not a verification.\n *\n * Needed because apps-api reports `expiresIn` on login but never on refresh, so it cannot keep a\n * proactive-refresh clock honest past the first rotation. The token always carries its own expiry.\n */\nexport const readTokenExpiry = (token: string): number | null => {\n const segments = token.split('.');\n if (segments.length !== 3) return null;\n\n const payload = segments[1];\n if (payload === undefined || payload === '') return null;\n\n try {\n // base64url -> base64, and re-pad: `atob` requires padding, base64url omits it.\n const base64 = payload.replaceAll('-', '+').replaceAll('_', '/');\n const padded = base64.padEnd(base64.length + ((4 - (base64.length % 4)) % 4), '=');\n const claims: unknown = JSON.parse(atob(padded));\n if (typeof claims !== 'object' || claims === null || !('exp' in claims)) return null;\n const { exp } = claims as { exp: unknown };\n if (typeof exp !== 'number' || !Number.isFinite(exp)) return null;\n return exp * 1000;\n } catch {\n return null;\n }\n};\n","import type { DeveloperPortalTokens } from '../../clients/developerPortal/tokens';\nimport { isUnauthorized } from '../../keboola/bearer/credentials';\nimport { dedupe } from '../../utils';\n\nimport { readTokenExpiry } from './tokenExpiry';\n\ntype Options = {\n refresh: () => Promise<DeveloperPortalTokens>;\n /** Live read from the session, so this holds no token of its own. `null` when signed out. */\n getTokens: () => DeveloperPortalTokens | null;\n /** May fire more than once; the caller owns any fire-once latch. */\n onSessionExpired?: () => void;\n /**\n * An absolute lead time rather than `createBearerCredential`'s fractional threshold: that needs the\n * token's full lifetime, and apps-api reports `expiresIn` on login only, never on refresh.\n */\n refreshLeadTimeMs?: number;\n};\n\nconst DEFAULT_REFRESH_LEAD_TIME_MS = 5 * 60 * 1000;\n\nexport type DeveloperPortalCredential = {\n getIdToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n getTokens: () => DeveloperPortalTokens | null;\n notifyExpired: () => void;\n};\n\n/** Mirrors `createBearerCredential`, over the id token of the trio. */\nexport const createDeveloperPortalCredential = ({\n refresh,\n getTokens,\n onSessionExpired,\n refreshLeadTimeMs = DEFAULT_REFRESH_LEAD_TIME_MS,\n}: Options): DeveloperPortalCredential => {\n const doRefresh = async (): Promise<DeveloperPortalTokens> => {\n try {\n return await refresh();\n } catch (error) {\n // Only a 401 means the refresh token is dead. Signing out over a 5xx would be a self-inflicted\n // logout, so anything else propagates without expiring the session.\n if (isUnauthorized(error)) onSessionExpired?.();\n throw error;\n }\n };\n\n // N concurrent 401s must cause one rotation: each extra one invalidates the tokens the others got.\n const refreshShared = dedupe(doRefresh);\n\n const getIdToken = async ({ forceRefresh = false } = {}): Promise<string | null> => {\n const tokens = getTokens();\n if (tokens === null) return null;\n if (forceRefresh) return (await refreshShared()).token;\n\n const expiresAt = readTokenExpiry(tokens.token);\n // Unknown expiry is left to the 401 path; a `0` here would rotate on every request.\n if (expiresAt === null) return tokens.token;\n if (Date.now() < expiresAt - refreshLeadTimeMs) return tokens.token;\n\n // Proactive rotation is best-effort — a real 401 drives the mandatory one.\n return refreshShared()\n .then((fresh) => fresh.token)\n .catch(() => tokens.token);\n };\n\n return { getIdToken, getTokens, notifyExpired: () => onSessionExpired?.() };\n};\n","import { HttpHeader, type MiddlewareFn } from '../../fetchClient';\nimport { isUnauthorized } from '../../keboola/bearer/credentials';\n\nimport type { DeveloperPortalCredential } from './credential';\n\n/**\n * Stamps the id token, and on a 401 force-refreshes and replays once. Mirrors\n * `createBearerAuthMiddleware`, minus the `Bearer ` prefix apps-api does not use.\n *\n * An anonymous session passes through unstamped, so a failed login is never read as session expiry.\n */\nexport const createDeveloperPortalAuthMiddleware = (\n credential: DeveloperPortalCredential,\n): MiddlewareFn => {\n return (next) => async (request) => {\n const token = await credential.getIdToken();\n if (token === null) return next(request);\n\n // Cloned before the first attempt consumes the body. Cloning the `Request` carries a binary or\n // FormData payload through byte-for-byte.\n const retryRequest = request.request.clone();\n request.request.headers.set(HttpHeader.AUTHORIZATION, token);\n\n try {\n return await next(request);\n } catch (error) {\n if (!isUnauthorized(error)) throw error;\n\n const refreshed = await credential.getIdToken({ forceRefresh: true }).catch(() => null);\n // Nothing to replay with, because a concurrent sign-out landed or the rotation failed. The\n // caller's request failed with a 401, so that is what they see.\n if (refreshed === null) throw error;\n retryRequest.headers.set(HttpHeader.AUTHORIZATION, refreshed);\n\n try {\n return await next({ ...request, request: retryRequest });\n } catch (retryError) {\n if (isUnauthorized(retryError)) credential.notifyExpired();\n throw retryError;\n }\n }\n };\n};\n","import { createDeveloperPortalClient } from '../../clients/developerPortal/developerPortalClient';\nimport type { DeveloperPortalTokens } from '../../clients/developerPortal/tokens';\nimport type { LoginSuccess } from '../../clients/developerPortal/types';\nimport type { MiddlewareFn } from '../../fetchClient';\nimport { createStore } from '../../utils';\n\nimport { createDeveloperPortalCredential } from './credential';\nimport { createDeveloperPortalAuthMiddleware } from './middleware';\n\nexport type DeveloperPortalSdkOptions = {\n baseUrl: string;\n /** Session to restore on construction. */\n tokens?: DeveloperPortalTokens | null;\n /** Persistence hook, fired on sign-in, every rotation, and with `null` on sign-out or expiry. */\n onTokensChange?: (tokens: DeveloperPortalTokens | null) => void;\n /** The session is dead; tokens are already cleared. The consumer redirects to sign-in. */\n onSessionExpired?: () => void;\n refreshLeadTimeMs?: number;\n middlewares?: MiddlewareFn[];\n};\n\n/**\n * `createDeveloperPortalClient` plus the session that keeps it authenticated.\n *\n * - Builds its own client: middleware, credential and session depend on each other in a cycle.\n */\nexport const createDeveloperPortalSdk = ({\n baseUrl,\n tokens: initialTokens = null,\n onTokensChange,\n onSessionExpired,\n refreshLeadTimeMs,\n middlewares = [],\n}: DeveloperPortalSdkOptions) => {\n const store = createStore<DeveloperPortalTokens | null>(initialTokens);\n store.subscribe((value) => onTokensChange?.(value));\n\n const getTokens = () => store.get();\n\n const requireTokens = (action: string): DeveloperPortalTokens => {\n const tokens = store.get();\n if (tokens === null) {\n throw new Error(`Developer Portal: ${action} requires a signed-in session.`);\n }\n return tokens;\n };\n\n // No auth middleware, so a rotation cannot recurse into the middleware that triggered it.\n const refreshClient = createDeveloperPortalClient({ baseUrl, middlewares });\n\n const refresh = async (): Promise<DeveloperPortalTokens> => {\n const before = store.get();\n if (before === null) {\n throw new Error('Cannot refresh the Developer Portal session: signed out.');\n }\n\n const { token, accessToken } = await refreshClient.auth.refreshTokens(before.refreshToken);\n const next: DeveloperPortalTokens = { token, accessToken, refreshToken: before.refreshToken };\n\n // Sign-out wins over an in-flight rotation; otherwise the response signs the user back in.\n const after = store.get();\n if (after === null || after.refreshToken !== before.refreshToken) {\n throw new Error('Developer Portal session changed while refreshing; discarding the result.');\n }\n\n store.set(next);\n return next;\n };\n\n const clear = () => store.set(null);\n\n const credential = createDeveloperPortalCredential({\n refresh,\n getTokens,\n refreshLeadTimeMs,\n onSessionExpired: () => {\n clear();\n onSessionExpired?.();\n },\n });\n\n const client = createDeveloperPortalClient({\n baseUrl,\n middlewares,\n authMiddleware: createDeveloperPortalAuthMiddleware(credential),\n });\n\n // `refreshTokens` is not re-exposed: rotating outside the store leaves stale tokens.\n const { refreshTokens: _storeBypassingRotation, ...auth } = client.auth;\n\n const api = {\n ...client,\n auth: {\n ...auth,\n logout: async (signal?: AbortSignal) =>\n client.auth.logout(requireTokens('sign-out').accessToken, signal),\n // Both MFA calls bypass the reactive 401 path, so rotate proactively first.\n setupMfa: async (signal?: AbortSignal) => {\n await credential.getIdToken();\n const { token, accessToken } = requireTokens('MFA enrolment');\n return client.auth.setupMfa({ idToken: token, accessToken }, signal);\n },\n confirmMfa: async (code: string, signal?: AbortSignal) => {\n await credential.getIdToken();\n const { token, accessToken } = requireTokens('MFA confirmation');\n return client.auth.confirmMfa({ idToken: token, accessToken, code }, signal);\n },\n },\n };\n\n const session = {\n set: (result: LoginSuccess) => {\n store.set({\n token: result.token,\n accessToken: result.accessToken,\n refreshToken: result.refreshToken,\n });\n },\n get: getTokens,\n subscribe: store.subscribe,\n clear,\n /** Rotates if the id token is inside the lead time. Best-effort; the 401 path is the guarantee. */\n ensureFresh: async (): Promise<void> => {\n await credential.getIdToken();\n },\n /** Rotates now, for a change of claims (e.g. leaving a vendor). Propagates failure. */\n refresh: async (): Promise<void> => {\n await credential.getIdToken({ forceRefresh: true });\n },\n isAuthenticated: () => store.get() !== null,\n };\n\n return { api, session };\n};\n\nexport type DeveloperPortalSdk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,SAAA;GArBZ,MAAM,WAAyB;IAC7B,MAAM,IAAI;KACR,OAAO,OAAO;KACd,aAAa,OAAO;KACpB,cAAc,OAAO;IACvB,CAAC;GACH;GACA,KAAK;GACL,WAAW,MAAM;GACjB;;GAEA,aAAa,YAA2B;IACtC,MAAM,WAAW,WAAW;GAC9B;;GAEA,SAAS,YAA2B;IAClC,MAAM,WAAW,WAAW,EAAE,cAAc,KAAK,CAAC;GACpD;GACA,uBAAuB,MAAM,IAAI,MAAM;EAGrB;CAAE;AACxB"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { li as MiddlewareFn } from "../../index-
|
|
2
|
-
import { A as ResetPasswordConfirmInput, E as PaginationQuery, F as UpdateAppAsAdminInput, I as UpdateAppInput, L as UpdateVendorAsAdminInput, N as SignUpInput, R as UpdateVendorInput, S as LoginSuccess, W as components, _ as GetVendorUsersQuery, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, k as RejectAppInput, l as CreateAppInput, p as DeprecateAppInput, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput } from "../../types-
|
|
3
|
-
import { t as DeveloperPortalTokens } from "../../index-
|
|
4
|
-
import { n as Listener } from "../../emitter-
|
|
5
|
-
//#region src/sdks/developerPortal/developerPortalSdk.d.ts
|
|
1
|
+
import { li as MiddlewareFn } from "../../index-D1mduJne.cjs";
|
|
2
|
+
import { A as ResetPasswordConfirmInput, E as PaginationQuery, F as UpdateAppAsAdminInput, I as UpdateAppInput, L as UpdateVendorAsAdminInput, N as SignUpInput, R as UpdateVendorInput, S as LoginSuccess, W as components, _ as GetVendorUsersQuery, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, k as RejectAppInput, l as CreateAppInput, p as DeprecateAppInput, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput } from "../../types-DHMxPJZq.cjs";
|
|
3
|
+
import { t as DeveloperPortalTokens } from "../../index-CbSh3KFw.cjs";
|
|
4
|
+
import { n as Listener } from "../../emitter-raKkIqRp.cjs";
|
|
6
5
|
type DeveloperPortalSdkOptions = {
|
|
7
6
|
baseUrl: string;
|
|
8
7
|
/** Session to restore on construction. */
|
|
@@ -1390,6 +1389,5 @@ declare const createDeveloperPortalSdk: ({ baseUrl, tokens: initialTokens, onTok
|
|
|
1390
1389
|
};
|
|
1391
1390
|
type DeveloperPortalSdk = ReturnType<typeof createDeveloperPortalSdk>;
|
|
1392
1391
|
type DeveloperPortalSession = DeveloperPortalSdk['session'];
|
|
1393
|
-
//#endregion
|
|
1394
1392
|
export { DeveloperPortalSdk, DeveloperPortalSdkOptions, DeveloperPortalSession, createDeveloperPortalSdk };
|
|
1395
1393
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { li as MiddlewareFn } from "../../index-
|
|
2
|
-
import { A as ResetPasswordConfirmInput, E as PaginationQuery, F as UpdateAppAsAdminInput, I as UpdateAppInput, L as UpdateVendorAsAdminInput, N as SignUpInput, R as UpdateVendorInput, S as LoginSuccess, W as components, _ as GetVendorUsersQuery, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, k as RejectAppInput, l as CreateAppInput, p as DeprecateAppInput, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput } from "../../types-
|
|
3
|
-
import { t as DeveloperPortalTokens } from "../../index-
|
|
4
|
-
import { n as Listener } from "../../emitter-
|
|
5
|
-
//#region src/sdks/developerPortal/developerPortalSdk.d.ts
|
|
1
|
+
import { li as MiddlewareFn } from "../../index-D1mduJne.js";
|
|
2
|
+
import { A as ResetPasswordConfirmInput, E as PaginationQuery, F as UpdateAppAsAdminInput, I as UpdateAppInput, L as UpdateVendorAsAdminInput, N as SignUpInput, R as UpdateVendorInput, S as LoginSuccess, W as components, _ as GetVendorUsersQuery, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, k as RejectAppInput, l as CreateAppInput, p as DeprecateAppInput, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput } from "../../types-jjOulnni.js";
|
|
3
|
+
import { t as DeveloperPortalTokens } from "../../index-m9-mN8Gg.js";
|
|
4
|
+
import { n as Listener } from "../../emitter-raKkIqRp.js";
|
|
6
5
|
type DeveloperPortalSdkOptions = {
|
|
7
6
|
baseUrl: string;
|
|
8
7
|
/** Session to restore on construction. */
|
|
@@ -1390,6 +1389,5 @@ declare const createDeveloperPortalSdk: ({ baseUrl, tokens: initialTokens, onTok
|
|
|
1390
1389
|
};
|
|
1391
1390
|
type DeveloperPortalSdk = ReturnType<typeof createDeveloperPortalSdk>;
|
|
1392
1391
|
type DeveloperPortalSession = DeveloperPortalSdk['session'];
|
|
1393
|
-
//#endregion
|
|
1394
1392
|
export { DeveloperPortalSdk, DeveloperPortalSdkOptions, DeveloperPortalSession, createDeveloperPortalSdk };
|
|
1395
1393
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
4
|
-
import { n as isUnauthorized } from "../../middleware-
|
|
5
|
-
import { t as createDeveloperPortalClient } from "../../developerPortalClient-
|
|
6
|
-
|
|
1
|
+
import { s as HttpHeader } from "../../createFetchClient-DlGCbltR.js";
|
|
2
|
+
import { t as dedupe } from "../../dedupe-Bu0d2i_w.js";
|
|
3
|
+
import { t as createStore } from "../../store-HP0zRcLz.js";
|
|
4
|
+
import { n as isUnauthorized } from "../../middleware-8zaJWcyU.js";
|
|
5
|
+
import { t as createDeveloperPortalClient } from "../../developerPortalClient-D9XOYwWF.js";
|
|
6
|
+
// src/sdks/developerPortal/tokenExpiry.ts
|
|
7
7
|
/**
|
|
8
8
|
* Reads a JWT's `exp` claim as milliseconds, or `null` when unparseable ("expiry unknown", which the
|
|
9
9
|
* caller leaves to the 401 path). A read, not a verification.
|
|
@@ -28,8 +28,7 @@ const readTokenExpiry = (token) => {
|
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
|
|
32
|
-
//#region src/sdks/developerPortal/credential.ts
|
|
31
|
+
// src/sdks/developerPortal/credential.ts
|
|
33
32
|
const DEFAULT_REFRESH_LEAD_TIME_MS = 3e5;
|
|
34
33
|
/** Mirrors `createBearerCredential`, over the id token of the trio. */
|
|
35
34
|
const createDeveloperPortalCredential = ({ refresh, getTokens, onSessionExpired, refreshLeadTimeMs = DEFAULT_REFRESH_LEAD_TIME_MS }) => {
|
|
@@ -57,8 +56,7 @@ const createDeveloperPortalCredential = ({ refresh, getTokens, onSessionExpired,
|
|
|
57
56
|
notifyExpired: () => onSessionExpired?.()
|
|
58
57
|
};
|
|
59
58
|
};
|
|
60
|
-
|
|
61
|
-
//#region src/sdks/developerPortal/middleware.ts
|
|
59
|
+
// src/sdks/developerPortal/middleware.ts
|
|
62
60
|
/**
|
|
63
61
|
* Stamps the id token, and on a 401 force-refreshes and replays once. Mirrors
|
|
64
62
|
* `createBearerAuthMiddleware`, minus the `Bearer ` prefix apps-api does not use.
|
|
@@ -90,8 +88,7 @@ const createDeveloperPortalAuthMiddleware = (credential) => {
|
|
|
90
88
|
}
|
|
91
89
|
};
|
|
92
90
|
};
|
|
93
|
-
|
|
94
|
-
//#region src/sdks/developerPortal/developerPortalSdk.ts
|
|
91
|
+
// src/sdks/developerPortal/developerPortalSdk.ts
|
|
95
92
|
/**
|
|
96
93
|
* `createDeveloperPortalClient` plus the session that keeps it authenticated.
|
|
97
94
|
*
|
|
@@ -188,7 +185,6 @@ const createDeveloperPortalSdk = ({ baseUrl, tokens: initialTokens = null, onTok
|
|
|
188
185
|
}
|
|
189
186
|
};
|
|
190
187
|
};
|
|
191
|
-
//#endregion
|
|
192
188
|
export { createDeveloperPortalSdk };
|
|
193
189
|
|
|
194
190
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/sdks/developerPortal/tokenExpiry.ts","../../../src/sdks/developerPortal/credential.ts","../../../src/sdks/developerPortal/middleware.ts","../../../src/sdks/developerPortal/developerPortalSdk.ts"],"sourcesContent":["/**\n * Reads a JWT's `exp` claim as milliseconds, or `null` when unparseable (\"expiry unknown\", which the\n * caller leaves to the 401 path). A read, not a verification.\n *\n * Needed because apps-api reports `expiresIn` on login but never on refresh, so it cannot keep a\n * proactive-refresh clock honest past the first rotation. The token always carries its own expiry.\n */\nexport const readTokenExpiry = (token: string): number | null => {\n const segments = token.split('.');\n if (segments.length !== 3) return null;\n\n const payload = segments[1];\n if (payload === undefined || payload === '') return null;\n\n try {\n // base64url -> base64, and re-pad: `atob` requires padding, base64url omits it.\n const base64 = payload.replaceAll('-', '+').replaceAll('_', '/');\n const padded = base64.padEnd(base64.length + ((4 - (base64.length % 4)) % 4), '=');\n const claims: unknown = JSON.parse(atob(padded));\n if (typeof claims !== 'object' || claims === null || !('exp' in claims)) return null;\n const { exp } = claims as { exp: unknown };\n if (typeof exp !== 'number' || !Number.isFinite(exp)) return null;\n return exp * 1000;\n } catch {\n return null;\n }\n};\n","import type { DeveloperPortalTokens } from '../../clients/developerPortal/tokens';\nimport { isUnauthorized } from '../../keboola/bearer/credentials';\nimport { dedupe } from '../../utils';\n\nimport { readTokenExpiry } from './tokenExpiry';\n\ntype Options = {\n refresh: () => Promise<DeveloperPortalTokens>;\n /** Live read from the session, so this holds no token of its own. `null` when signed out. */\n getTokens: () => DeveloperPortalTokens | null;\n /** May fire more than once; the caller owns any fire-once latch. */\n onSessionExpired?: () => void;\n /**\n * An absolute lead time rather than `createBearerCredential`'s fractional threshold: that needs the\n * token's full lifetime, and apps-api reports `expiresIn` on login only, never on refresh.\n */\n refreshLeadTimeMs?: number;\n};\n\nconst DEFAULT_REFRESH_LEAD_TIME_MS = 5 * 60 * 1000;\n\nexport type DeveloperPortalCredential = {\n getIdToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n getTokens: () => DeveloperPortalTokens | null;\n notifyExpired: () => void;\n};\n\n/** Mirrors `createBearerCredential`, over the id token of the trio. */\nexport const createDeveloperPortalCredential = ({\n refresh,\n getTokens,\n onSessionExpired,\n refreshLeadTimeMs = DEFAULT_REFRESH_LEAD_TIME_MS,\n}: Options): DeveloperPortalCredential => {\n const doRefresh = async (): Promise<DeveloperPortalTokens> => {\n try {\n return await refresh();\n } catch (error) {\n // Only a 401 means the refresh token is dead. Signing out over a 5xx would be a self-inflicted\n // logout, so anything else propagates without expiring the session.\n if (isUnauthorized(error)) onSessionExpired?.();\n throw error;\n }\n };\n\n // N concurrent 401s must cause one rotation: each extra one invalidates the tokens the others got.\n const refreshShared = dedupe(doRefresh);\n\n const getIdToken = async ({ forceRefresh = false } = {}): Promise<string | null> => {\n const tokens = getTokens();\n if (tokens === null) return null;\n if (forceRefresh) return (await refreshShared()).token;\n\n const expiresAt = readTokenExpiry(tokens.token);\n // Unknown expiry is left to the 401 path; a `0` here would rotate on every request.\n if (expiresAt === null) return tokens.token;\n if (Date.now() < expiresAt - refreshLeadTimeMs) return tokens.token;\n\n // Proactive rotation is best-effort — a real 401 drives the mandatory one.\n return refreshShared()\n .then((fresh) => fresh.token)\n .catch(() => tokens.token);\n };\n\n return { getIdToken, getTokens, notifyExpired: () => onSessionExpired?.() };\n};\n","import { HttpHeader, type MiddlewareFn } from '../../fetchClient';\nimport { isUnauthorized } from '../../keboola/bearer/credentials';\n\nimport type { DeveloperPortalCredential } from './credential';\n\n/**\n * Stamps the id token, and on a 401 force-refreshes and replays once. Mirrors\n * `createBearerAuthMiddleware`, minus the `Bearer ` prefix apps-api does not use.\n *\n * An anonymous session passes through unstamped, so a failed login is never read as session expiry.\n */\nexport const createDeveloperPortalAuthMiddleware = (\n credential: DeveloperPortalCredential,\n): MiddlewareFn => {\n return (next) => async (request) => {\n const token = await credential.getIdToken();\n if (token === null) return next(request);\n\n // Cloned before the first attempt consumes the body. Cloning the `Request` carries a binary or\n // FormData payload through byte-for-byte.\n const retryRequest = request.request.clone();\n request.request.headers.set(HttpHeader.AUTHORIZATION, token);\n\n try {\n return await next(request);\n } catch (error) {\n if (!isUnauthorized(error)) throw error;\n\n const refreshed = await credential.getIdToken({ forceRefresh: true }).catch(() => null);\n // Nothing to replay with, because a concurrent sign-out landed or the rotation failed. The\n // caller's request failed with a 401, so that is what they see.\n if (refreshed === null) throw error;\n retryRequest.headers.set(HttpHeader.AUTHORIZATION, refreshed);\n\n try {\n return await next({ ...request, request: retryRequest });\n } catch (retryError) {\n if (isUnauthorized(retryError)) credential.notifyExpired();\n throw retryError;\n }\n }\n };\n};\n","import { createDeveloperPortalClient } from '../../clients/developerPortal/developerPortalClient';\nimport type { DeveloperPortalTokens } from '../../clients/developerPortal/tokens';\nimport type { LoginSuccess } from '../../clients/developerPortal/types';\nimport type { MiddlewareFn } from '../../fetchClient';\nimport { createStore } from '../../utils';\n\nimport { createDeveloperPortalCredential } from './credential';\nimport { createDeveloperPortalAuthMiddleware } from './middleware';\n\nexport type DeveloperPortalSdkOptions = {\n baseUrl: string;\n /** Session to restore on construction. */\n tokens?: DeveloperPortalTokens | null;\n /** Persistence hook, fired on sign-in, every rotation, and with `null` on sign-out or expiry. */\n onTokensChange?: (tokens: DeveloperPortalTokens | null) => void;\n /** The session is dead; tokens are already cleared. The consumer redirects to sign-in. */\n onSessionExpired?: () => void;\n refreshLeadTimeMs?: number;\n middlewares?: MiddlewareFn[];\n};\n\n/**\n * `createDeveloperPortalClient` plus the session that keeps it authenticated.\n *\n * - Builds its own client: middleware, credential and session depend on each other in a cycle.\n */\nexport const createDeveloperPortalSdk = ({\n baseUrl,\n tokens: initialTokens = null,\n onTokensChange,\n onSessionExpired,\n refreshLeadTimeMs,\n middlewares = [],\n}: DeveloperPortalSdkOptions) => {\n const store = createStore<DeveloperPortalTokens | null>(initialTokens);\n store.subscribe((value) => onTokensChange?.(value));\n\n const getTokens = () => store.get();\n\n const requireTokens = (action: string): DeveloperPortalTokens => {\n const tokens = store.get();\n if (tokens === null) {\n throw new Error(`Developer Portal: ${action} requires a signed-in session.`);\n }\n return tokens;\n };\n\n // No auth middleware, so a rotation cannot recurse into the middleware that triggered it.\n const refreshClient = createDeveloperPortalClient({ baseUrl, middlewares });\n\n const refresh = async (): Promise<DeveloperPortalTokens> => {\n const before = store.get();\n if (before === null) {\n throw new Error('Cannot refresh the Developer Portal session: signed out.');\n }\n\n const { token, accessToken } = await refreshClient.auth.refreshTokens(before.refreshToken);\n const next: DeveloperPortalTokens = { token, accessToken, refreshToken: before.refreshToken };\n\n // Sign-out wins over an in-flight rotation; otherwise the response signs the user back in.\n const after = store.get();\n if (after === null || after.refreshToken !== before.refreshToken) {\n throw new Error('Developer Portal session changed while refreshing; discarding the result.');\n }\n\n store.set(next);\n return next;\n };\n\n const clear = () => store.set(null);\n\n const credential = createDeveloperPortalCredential({\n refresh,\n getTokens,\n refreshLeadTimeMs,\n onSessionExpired: () => {\n clear();\n onSessionExpired?.();\n },\n });\n\n const client = createDeveloperPortalClient({\n baseUrl,\n middlewares,\n authMiddleware: createDeveloperPortalAuthMiddleware(credential),\n });\n\n // `refreshTokens` is not re-exposed: rotating outside the store leaves stale tokens.\n const { refreshTokens: _storeBypassingRotation, ...auth } = client.auth;\n\n const api = {\n ...client,\n auth: {\n ...auth,\n logout: async (signal?: AbortSignal) =>\n client.auth.logout(requireTokens('sign-out').accessToken, signal),\n // Both MFA calls bypass the reactive 401 path, so rotate proactively first.\n setupMfa: async (signal?: AbortSignal) => {\n await credential.getIdToken();\n const { token, accessToken } = requireTokens('MFA enrolment');\n return client.auth.setupMfa({ idToken: token, accessToken }, signal);\n },\n confirmMfa: async (code: string, signal?: AbortSignal) => {\n await credential.getIdToken();\n const { token, accessToken } = requireTokens('MFA confirmation');\n return client.auth.confirmMfa({ idToken: token, accessToken, code }, signal);\n },\n },\n };\n\n const session = {\n set: (result: LoginSuccess) => {\n store.set({\n token: result.token,\n accessToken: result.accessToken,\n refreshToken: result.refreshToken,\n });\n },\n get: getTokens,\n subscribe: store.subscribe,\n clear,\n /** Rotates if the id token is inside the lead time. Best-effort; the 401 path is the guarantee. */\n ensureFresh: async (): Promise<void> => {\n await credential.getIdToken();\n },\n /** Rotates now, for a change of claims (e.g. leaving a vendor). Propagates failure. */\n refresh: async (): Promise<void> => {\n await credential.getIdToken({ forceRefresh: true });\n },\n isAuthenticated: () => store.get() !== null,\n };\n\n return { api, session };\n};\n\nexport type DeveloperPortalSdk = ReturnType<typeof createDeveloperPortalSdk>;\nexport type DeveloperPortalSession = DeveloperPortalSdk['session'];\n"],"mappings":";;;;;;;;;;;;;AAOA,MAAa,mBAAmB,UAAiC;CAC/D,MAAM,WAAW,MAAM,MAAM,GAAG;CAChC,IAAI,SAAS,WAAW,GAAG,OAAO;CAElC,MAAM,UAAU,SAAS;CACzB,IAAI,YAAY,KAAA,KAAa,YAAY,IAAI,OAAO;CAEpD,IAAI;EAEF,MAAM,SAAS,QAAQ,WAAW,KAAK,GAAG,CAAC,CAAC,WAAW,KAAK,GAAG;EAC/D,MAAM,SAAS,OAAO,OAAO,OAAO,UAAW,IAAK,OAAO,SAAS,KAAM,GAAI,GAAG;EACjF,MAAM,SAAkB,KAAK,MAAM,KAAK,MAAM,CAAC;EAC/C,IAAI,OAAO,WAAW,YAAY,WAAW,QAAQ,EAAE,SAAS,SAAS,OAAO;EAChF,MAAM,EAAE,QAAQ;EAChB,IAAI,OAAO,QAAQ,YAAY,CAAC,OAAO,SAAS,GAAG,GAAG,OAAO;EAC7D,OAAO,MAAM;CACf,QAAQ;EACN,OAAO;CACT;AACF;;;ACPA,MAAM,+BAA+B;;AASrC,MAAa,mCAAmC,EAC9C,SACA,WACA,kBACA,oBAAoB,mCACoB;CACxC,MAAM,YAAY,YAA4C;EAC5D,IAAI;G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,MAAM,WAAW,WAAW;KAC5B,MAAM,EAAE,OAAO,gBAAgB,cAAc,eAAe;KAC5D,OAAO,OAAO,KAAK,SAAS;MAAE,SAAS;MAAO;KAAY,GAAG,MAAM;IACrE;IACA,YAAY,OAAO,MAAc,WAAyB;KACxD,MAAM,WAAW,WAAW;KAC5B,MAAM,EAAE,OAAO,gBAAgB,cAAc,kBAAkB;KAC/D,OAAO,OAAO,KAAK,WAAW;MAAE,SAAS;MAAO;MAAa;KAAK,GAAG,MAAM;IAC7E;GACF;EAyBS;EAAG,SAAA;GArBZ,MAAM,WAAyB;IAC7B,MAAM,IAAI;KACR,OAAO,OAAO;KACd,aAAa,OAAO;KACpB,cAAc,OAAO;IACvB,CAAC;GACH;GACA,KAAK;GACL,WAAW,MAAM;GACjB;;GAEA,aAAa,YAA2B;IACtC,MAAM,WAAW,WAAW;GAC9B;;GAEA,SAAS,YAA2B;IAClC,MAAM,WAAW,WAAW,EAAE,cAAc,KAAK,CAAC;GACpD;GACA,uBAAuB,MAAM,IAAI,MAAM;EAGrB;CAAE;AACxB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/sdks/developerPortal/tokenExpiry.ts","../../../src/sdks/developerPortal/credential.ts","../../../src/sdks/developerPortal/middleware.ts","../../../src/sdks/developerPortal/developerPortalSdk.ts"],"sourcesContent":["/**\n * Reads a JWT's `exp` claim as milliseconds, or `null` when unparseable (\"expiry unknown\", which the\n * caller leaves to the 401 path). A read, not a verification.\n *\n * Needed because apps-api reports `expiresIn` on login but never on refresh, so it cannot keep a\n * proactive-refresh clock honest past the first rotation. The token always carries its own expiry.\n */\nexport const readTokenExpiry = (token: string): number | null => {\n const segments = token.split('.');\n if (segments.length !== 3) return null;\n\n const payload = segments[1];\n if (payload === undefined || payload === '') return null;\n\n try {\n // base64url -> base64, and re-pad: `atob` requires padding, base64url omits it.\n const base64 = payload.replaceAll('-', '+').replaceAll('_', '/');\n const padded = base64.padEnd(base64.length + ((4 - (base64.length % 4)) % 4), '=');\n const claims: unknown = JSON.parse(atob(padded));\n if (typeof claims !== 'object' || claims === null || !('exp' in claims)) return null;\n const { exp } = claims as { exp: unknown };\n if (typeof exp !== 'number' || !Number.isFinite(exp)) return null;\n return exp * 1000;\n } catch {\n return null;\n }\n};\n","import type { DeveloperPortalTokens } from '../../clients/developerPortal/tokens';\nimport { isUnauthorized } from '../../keboola/bearer/credentials';\nimport { dedupe } from '../../utils';\n\nimport { readTokenExpiry } from './tokenExpiry';\n\ntype Options = {\n refresh: () => Promise<DeveloperPortalTokens>;\n /** Live read from the session, so this holds no token of its own. `null` when signed out. */\n getTokens: () => DeveloperPortalTokens | null;\n /** May fire more than once; the caller owns any fire-once latch. */\n onSessionExpired?: () => void;\n /**\n * An absolute lead time rather than `createBearerCredential`'s fractional threshold: that needs the\n * token's full lifetime, and apps-api reports `expiresIn` on login only, never on refresh.\n */\n refreshLeadTimeMs?: number;\n};\n\nconst DEFAULT_REFRESH_LEAD_TIME_MS = 5 * 60 * 1000;\n\nexport type DeveloperPortalCredential = {\n getIdToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n getTokens: () => DeveloperPortalTokens | null;\n notifyExpired: () => void;\n};\n\n/** Mirrors `createBearerCredential`, over the id token of the trio. */\nexport const createDeveloperPortalCredential = ({\n refresh,\n getTokens,\n onSessionExpired,\n refreshLeadTimeMs = DEFAULT_REFRESH_LEAD_TIME_MS,\n}: Options): DeveloperPortalCredential => {\n const doRefresh = async (): Promise<DeveloperPortalTokens> => {\n try {\n return await refresh();\n } catch (error) {\n // Only a 401 means the refresh token is dead. Signing out over a 5xx would be a self-inflicted\n // logout, so anything else propagates without expiring the session.\n if (isUnauthorized(error)) onSessionExpired?.();\n throw error;\n }\n };\n\n // N concurrent 401s must cause one rotation: each extra one invalidates the tokens the others got.\n const refreshShared = dedupe(doRefresh);\n\n const getIdToken = async ({ forceRefresh = false } = {}): Promise<string | null> => {\n const tokens = getTokens();\n if (tokens === null) return null;\n if (forceRefresh) return (await refreshShared()).token;\n\n const expiresAt = readTokenExpiry(tokens.token);\n // Unknown expiry is left to the 401 path; a `0` here would rotate on every request.\n if (expiresAt === null) return tokens.token;\n if (Date.now() < expiresAt - refreshLeadTimeMs) return tokens.token;\n\n // Proactive rotation is best-effort — a real 401 drives the mandatory one.\n return refreshShared()\n .then((fresh) => fresh.token)\n .catch(() => tokens.token);\n };\n\n return { getIdToken, getTokens, notifyExpired: () => onSessionExpired?.() };\n};\n","import { HttpHeader, type MiddlewareFn } from '../../fetchClient';\nimport { isUnauthorized } from '../../keboola/bearer/credentials';\n\nimport type { DeveloperPortalCredential } from './credential';\n\n/**\n * Stamps the id token, and on a 401 force-refreshes and replays once. Mirrors\n * `createBearerAuthMiddleware`, minus the `Bearer ` prefix apps-api does not use.\n *\n * An anonymous session passes through unstamped, so a failed login is never read as session expiry.\n */\nexport const createDeveloperPortalAuthMiddleware = (\n credential: DeveloperPortalCredential,\n): MiddlewareFn => {\n return (next) => async (request) => {\n const token = await credential.getIdToken();\n if (token === null) return next(request);\n\n // Cloned before the first attempt consumes the body. Cloning the `Request` carries a binary or\n // FormData payload through byte-for-byte.\n const retryRequest = request.request.clone();\n request.request.headers.set(HttpHeader.AUTHORIZATION, token);\n\n try {\n return await next(request);\n } catch (error) {\n if (!isUnauthorized(error)) throw error;\n\n const refreshed = await credential.getIdToken({ forceRefresh: true }).catch(() => null);\n // Nothing to replay with, because a concurrent sign-out landed or the rotation failed. The\n // caller's request failed with a 401, so that is what they see.\n if (refreshed === null) throw error;\n retryRequest.headers.set(HttpHeader.AUTHORIZATION, refreshed);\n\n try {\n return await next({ ...request, request: retryRequest });\n } catch (retryError) {\n if (isUnauthorized(retryError)) credential.notifyExpired();\n throw retryError;\n }\n }\n };\n};\n","import { createDeveloperPortalClient } from '../../clients/developerPortal/developerPortalClient';\nimport type { DeveloperPortalTokens } from '../../clients/developerPortal/tokens';\nimport type { LoginSuccess } from '../../clients/developerPortal/types';\nimport type { MiddlewareFn } from '../../fetchClient';\nimport { createStore } from '../../utils';\n\nimport { createDeveloperPortalCredential } from './credential';\nimport { createDeveloperPortalAuthMiddleware } from './middleware';\n\nexport type DeveloperPortalSdkOptions = {\n baseUrl: string;\n /** Session to restore on construction. */\n tokens?: DeveloperPortalTokens | null;\n /** Persistence hook, fired on sign-in, every rotation, and with `null` on sign-out or expiry. */\n onTokensChange?: (tokens: DeveloperPortalTokens | null) => void;\n /** The session is dead; tokens are already cleared. The consumer redirects to sign-in. */\n onSessionExpired?: () => void;\n refreshLeadTimeMs?: number;\n middlewares?: MiddlewareFn[];\n};\n\n/**\n * `createDeveloperPortalClient` plus the session that keeps it authenticated.\n *\n * - Builds its own client: middleware, credential and session depend on each other in a cycle.\n */\nexport const createDeveloperPortalSdk = ({\n baseUrl,\n tokens: initialTokens = null,\n onTokensChange,\n onSessionExpired,\n refreshLeadTimeMs,\n middlewares = [],\n}: DeveloperPortalSdkOptions) => {\n const store = createStore<DeveloperPortalTokens | null>(initialTokens);\n store.subscribe((value) => onTokensChange?.(value));\n\n const getTokens = () => store.get();\n\n const requireTokens = (action: string): DeveloperPortalTokens => {\n const tokens = store.get();\n if (tokens === null) {\n throw new Error(`Developer Portal: ${action} requires a signed-in session.`);\n }\n return tokens;\n };\n\n // No auth middleware, so a rotation cannot recurse into the middleware that triggered it.\n const refreshClient = createDeveloperPortalClient({ baseUrl, middlewares });\n\n const refresh = async (): Promise<DeveloperPortalTokens> => {\n const before = store.get();\n if (before === null) {\n throw new Error('Cannot refresh the Developer Portal session: signed out.');\n }\n\n const { token, accessToken } = await refreshClient.auth.refreshTokens(before.refreshToken);\n const next: DeveloperPortalTokens = { token, accessToken, refreshToken: before.refreshToken };\n\n // Sign-out wins over an in-flight rotation; otherwise the response signs the user back in.\n const after = store.get();\n if (after === null || after.refreshToken !== before.refreshToken) {\n throw new Error('Developer Portal session changed while refreshing; discarding the result.');\n }\n\n store.set(next);\n return next;\n };\n\n const clear = () => store.set(null);\n\n const credential = createDeveloperPortalCredential({\n refresh,\n getTokens,\n refreshLeadTimeMs,\n onSessionExpired: () => {\n clear();\n onSessionExpired?.();\n },\n });\n\n const client = createDeveloperPortalClient({\n baseUrl,\n middlewares,\n authMiddleware: createDeveloperPortalAuthMiddleware(credential),\n });\n\n // `refreshTokens` is not re-exposed: rotating outside the store leaves stale tokens.\n const { refreshTokens: _storeBypassingRotation, ...auth } = client.auth;\n\n const api = {\n ...client,\n auth: {\n ...auth,\n logout: async (signal?: AbortSignal) =>\n client.auth.logout(requireTokens('sign-out').accessToken, signal),\n // Both MFA calls bypass the reactive 401 path, so rotate proactively first.\n setupMfa: async (signal?: AbortSignal) => {\n await credential.getIdToken();\n const { token, accessToken } = requireTokens('MFA enrolment');\n return client.auth.setupMfa({ idToken: token, accessToken }, signal);\n },\n confirmMfa: async (code: string, signal?: AbortSignal) => {\n await credential.getIdToken();\n const { token, accessToken } = requireTokens('MFA confirmation');\n return client.auth.confirmMfa({ idToken: token, accessToken, code }, signal);\n },\n },\n };\n\n const session = {\n set: (result: LoginSuccess) => {\n store.set({\n token: result.token,\n accessToken: result.accessToken,\n refreshToken: result.refreshToken,\n });\n },\n get: getTokens,\n subscribe: store.subscribe,\n clear,\n /** Rotates if the id token is inside the lead time. Best-effort; the 401 path is the guarantee. */\n ensureFresh: async (): Promise<void> => {\n await credential.getIdToken();\n },\n /** Rotates now, for a change of claims (e.g. leaving a vendor). Propagates failure. */\n refresh: async (): Promise<void> => {\n await credential.getIdToken({ forceRefresh: true });\n },\n isAuthenticated: () => store.get() !== null,\n };\n\n return { api, session };\n};\n\nexport type DeveloperPortalSdk = ReturnType<typeof createDeveloperPortalSdk>;\nexport type DeveloperPortalSession = DeveloperPortalSdk['session'];\n"],"mappings":";;;;;;;;;;;;;AAOA,MAAa,mBAAmB,UAAiC;CAC/D,MAAM,WAAW,MAAM,MAAM,GAAG;CAChC,IAAI,SAAS,WAAW,GAAG,OAAO;CAElC,MAAM,UAAU,SAAS;CACzB,IAAI,YAAY,KAAA,KA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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_kaiMemory = require("../../kaiMemory-
|
|
2
|
+
const require_kaiMemory = require("../../kaiMemory-CkLQfJXD.cjs");
|
|
3
3
|
exports.KAI_MEMORY_OBJECT_TYPE = require_kaiMemory.KAI_MEMORY_OBJECT_TYPE;
|
|
4
4
|
exports.KAI_MEMORY_STATUSES = require_kaiMemory.KAI_MEMORY_STATUSES;
|
|
5
5
|
exports.KaiMemoryReviewConflictError = require_kaiMemory.KaiMemoryReviewConflictError;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { a as KaiMemoryStatus, c as KAI_MEMORY_STATUSES, o as MetastoreClient, r as KaiMemoryItem, s as UpdateKaiMemoryMeta, t as CreateKaiMemoryMeta } from "../../types-
|
|
2
|
-
//#region src/sdks/kaiMemory/kaiMemorySdk.d.ts
|
|
1
|
+
import { a as KaiMemoryStatus, c as KAI_MEMORY_STATUSES, o as MetastoreClient, r as KaiMemoryItem, s as UpdateKaiMemoryMeta, t as CreateKaiMemoryMeta } from "../../types-CxEJ77m3.cjs";
|
|
3
2
|
/** The metastore object type this SDK addresses — see `SEMANTIC_OBJECT_TYPE` for the convention. */
|
|
4
3
|
declare const KAI_MEMORY_OBJECT_TYPE = "kai-memory";
|
|
5
4
|
/**
|
|
@@ -36,6 +35,5 @@ declare const createKaiMemorySdk: ({ metastoreClient }: Options) => {
|
|
|
36
35
|
}, meta?: CreateKaiMemoryMeta) => Promise<KaiMemoryItem>;
|
|
37
36
|
updateStatus: (uuid: string, status: KaiMemoryStatus, meta?: UpdateKaiMemoryMeta) => Promise<KaiMemoryItem>;
|
|
38
37
|
};
|
|
39
|
-
//#endregion
|
|
40
38
|
export { KAI_MEMORY_OBJECT_TYPE, KAI_MEMORY_STATUSES, KaiMemoryReviewConflictError, KaiMemoryUnreadableItemsError, createKaiMemorySdk };
|
|
41
39
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { a as KaiMemoryStatus, c as KAI_MEMORY_STATUSES, o as MetastoreClient, r as KaiMemoryItem, s as UpdateKaiMemoryMeta, t as CreateKaiMemoryMeta } from "../../types-
|
|
2
|
-
//#region src/sdks/kaiMemory/kaiMemorySdk.d.ts
|
|
1
|
+
import { a as KaiMemoryStatus, c as KAI_MEMORY_STATUSES, o as MetastoreClient, r as KaiMemoryItem, s as UpdateKaiMemoryMeta, t as CreateKaiMemoryMeta } from "../../types-xzt_2H63.js";
|
|
3
2
|
/** The metastore object type this SDK addresses — see `SEMANTIC_OBJECT_TYPE` for the convention. */
|
|
4
3
|
declare const KAI_MEMORY_OBJECT_TYPE = "kai-memory";
|
|
5
4
|
/**
|
|
@@ -36,6 +35,5 @@ declare const createKaiMemorySdk: ({ metastoreClient }: Options) => {
|
|
|
36
35
|
}, meta?: CreateKaiMemoryMeta) => Promise<KaiMemoryItem>;
|
|
37
36
|
updateStatus: (uuid: string, status: KaiMemoryStatus, meta?: UpdateKaiMemoryMeta) => Promise<KaiMemoryItem>;
|
|
38
37
|
};
|
|
39
|
-
//#endregion
|
|
40
38
|
export { KAI_MEMORY_OBJECT_TYPE, KAI_MEMORY_STATUSES, KaiMemoryReviewConflictError, KaiMemoryUnreadableItemsError, createKaiMemorySdk };
|
|
41
39
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { KAI_MEMORY_OBJECT_TYPE, KAI_MEMORY_STATUSES, KaiMemoryReviewConflictError, KaiMemoryUnreadableItemsError, createKaiMemorySdk };
|
|
1
|
+
export { t as KAI_MEMORY_OBJECT_TYPE, a as KAI_MEMORY_STATUSES, n as KaiMemoryReviewConflictError, r as KaiMemoryUnreadableItemsError, i as createKaiMemorySdk } from "../../kaiMemory-oir_qCo_.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as KaiMemoryStatus, i as KaiMemoryMeta, n as KaiMemoryData, o as MetastoreClient, r as KaiMemoryItem, s as UpdateKaiMemoryMeta, t as CreateKaiMemoryMeta } from "../../types-
|
|
1
|
+
import { a as KaiMemoryStatus, i as KaiMemoryMeta, n as KaiMemoryData, o as MetastoreClient, r as KaiMemoryItem, s as UpdateKaiMemoryMeta, t as CreateKaiMemoryMeta } from "../../types-CxEJ77m3.cjs";
|
|
2
2
|
export { CreateKaiMemoryMeta, KaiMemoryData, KaiMemoryItem, KaiMemoryMeta, KaiMemoryStatus, MetastoreClient, UpdateKaiMemoryMeta };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as KaiMemoryStatus, i as KaiMemoryMeta, n as KaiMemoryData, o as MetastoreClient, r as KaiMemoryItem, s as UpdateKaiMemoryMeta, t as CreateKaiMemoryMeta } from "../../types-
|
|
1
|
+
import { a as KaiMemoryStatus, i as KaiMemoryMeta, n as KaiMemoryData, o as MetastoreClient, r as KaiMemoryItem, s as UpdateKaiMemoryMeta, t as CreateKaiMemoryMeta } from "../../types-xzt_2H63.js";
|
|
2
2
|
export { CreateKaiMemoryMeta, KaiMemoryData, KaiMemoryItem, KaiMemoryMeta, KaiMemoryStatus, MetastoreClient, UpdateKaiMemoryMeta };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
2
|
+
const require_ValidationError = require("../../ValidationError-BXcFX4nD.cjs");
|
|
3
|
+
const require_collectByOffset = require("../../collectByOffset-DgxJ3zT9.cjs");
|
|
4
|
+
// src/sdks/queryService/queryServiceSdk.ts
|
|
5
5
|
const DEFAULT_EXECUTE_QUERY_PAGE_SIZE = 5e3;
|
|
6
6
|
const DEFAULT_POLL_INTERVAL = 500;
|
|
7
7
|
const DEFAULT_TIMEOUT = 3e5;
|
|
@@ -66,7 +66,6 @@ const createQueryServiceSdk = ({ queryServiceClient }) => {
|
|
|
66
66
|
};
|
|
67
67
|
return { executeQuery };
|
|
68
68
|
};
|
|
69
|
-
//#endregion
|
|
70
69
|
exports.createQueryServiceSdk = createQueryServiceSdk;
|
|
71
70
|
|
|
72
71
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { b as ExecuteQueryOptions, x as createQueryServiceSdk } from "../../index-
|
|
1
|
+
import { b as ExecuteQueryOptions, x as createQueryServiceSdk } from "../../index-qJ2IjXIM.cjs";
|
|
2
2
|
export { ExecuteQueryOptions, createQueryServiceSdk };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { b as ExecuteQueryOptions, x as createQueryServiceSdk } from "../../index-
|
|
1
|
+
import { b as ExecuteQueryOptions, x as createQueryServiceSdk } from "../../index-BsT_cBJd.js";
|
|
2
2
|
export { ExecuteQueryOptions, createQueryServiceSdk };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t as
|
|
3
|
-
|
|
1
|
+
import { t as ValidationError } from "../../ValidationError-BsdFDGY2.js";
|
|
2
|
+
import { t as collectByOffset } from "../../collectByOffset-i8Tdoze7.js";
|
|
3
|
+
// src/sdks/queryService/queryServiceSdk.ts
|
|
4
4
|
const DEFAULT_EXECUTE_QUERY_PAGE_SIZE = 5e3;
|
|
5
5
|
const DEFAULT_POLL_INTERVAL = 500;
|
|
6
6
|
const DEFAULT_TIMEOUT = 3e5;
|
|
@@ -65,7 +65,6 @@ const createQueryServiceSdk = ({ queryServiceClient }) => {
|
|
|
65
65
|
};
|
|
66
66
|
return { executeQuery };
|
|
67
67
|
};
|
|
68
|
-
//#endregion
|
|
69
68
|
export { createQueryServiceSdk };
|
|
70
69
|
|
|
71
70
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_semanticLayer = require("../../semanticLayer-
|
|
2
|
+
const require_semanticLayer = require("../../semanticLayer-djom-J78.cjs");
|
|
3
3
|
exports.CONSTRAINT_SCOPES = require_semanticLayer.CONSTRAINT_SCOPES;
|
|
4
4
|
exports.CONSTRAINT_SEVERITIES = require_semanticLayer.CONSTRAINT_SEVERITIES;
|
|
5
5
|
exports.CONSTRAINT_TYPES = require_semanticLayer.CONSTRAINT_TYPES;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { A as CONSTRAINT_TYPES, D as UpdateSemanticObjectMeta, F as SQL_DIALECTS, M as RELATIONSHIP_JOIN_TYPES, N as RULE_OPERATORS, O as CONSTRAINT_SCOPES, P as SEMANTIC_OBJECT_SCOPES, T as SemanticUnreadableObjectRef, _ as SemanticObject, a as SemanticChildObjectType, b as SemanticObjectType, g as SemanticModelData, h as SemanticModelChildRef, i as SemanticChildObjectDataMap, j as FIELD_ROLES, k as CONSTRAINT_SEVERITIES, m as SemanticMetricData, n as MetastoreClient, o as SemanticConstraintData, p as SemanticGlossaryData, t as CreateSemanticObjectMeta, u as SemanticDatasetData, x as SemanticRelationshipData } from "../../types-
|
|
1
|
+
import { A as CONSTRAINT_TYPES, D as UpdateSemanticObjectMeta, F as SQL_DIALECTS, M as RELATIONSHIP_JOIN_TYPES, N as RULE_OPERATORS, O as CONSTRAINT_SCOPES, P as SEMANTIC_OBJECT_SCOPES, T as SemanticUnreadableObjectRef, _ as SemanticObject, a as SemanticChildObjectType, b as SemanticObjectType, g as SemanticModelData, h as SemanticModelChildRef, i as SemanticChildObjectDataMap, j as FIELD_ROLES, k as CONSTRAINT_SEVERITIES, m as SemanticMetricData, n as MetastoreClient, o as SemanticConstraintData, p as SemanticGlossaryData, t as CreateSemanticObjectMeta, u as SemanticDatasetData, x as SemanticRelationshipData } from "../../types-B1qe1etN.cjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
//#region src/sdks/semanticLayer/errorMessage.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* The message out of a metastore error body.
|
|
6
5
|
*
|
|
@@ -9,8 +8,6 @@ import { z } from "zod";
|
|
|
9
8
|
* - Only the first error: the metastore reports fields one at a time.
|
|
10
9
|
*/
|
|
11
10
|
declare const metastoreErrorMessage: (data: unknown) => string | undefined;
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/sdks/semanticLayer/schemas.d.ts
|
|
14
11
|
/**
|
|
15
12
|
* Write validators for untrusted input; the metastore's own validation errors are opaque.
|
|
16
13
|
*
|
|
@@ -91,8 +88,6 @@ declare const SEMANTIC_CHILD_OBJECT_SCHEMAS: {
|
|
|
91
88
|
rule: z.ZodString;
|
|
92
89
|
}, z.core.$loose>;
|
|
93
90
|
};
|
|
94
|
-
//#endregion
|
|
95
|
-
//#region src/sdks/semanticLayer/semanticLayerSdk.d.ts
|
|
96
91
|
/**
|
|
97
92
|
* Thrown by `listModelChildren` when some child could not be parsed; fails closed.
|
|
98
93
|
*
|
|
@@ -145,6 +140,5 @@ declare const createSemanticLayerSdk: ({ metastoreClient }: Options) => {
|
|
|
145
140
|
listPendingScopeElevationRequests: (objectType: SemanticObjectType, signal?: AbortSignal) => Promise<SemanticObject<Record<string, unknown>>[]>;
|
|
146
141
|
listMyPendingScopeElevationRequests: (objectType: SemanticObjectType, signal?: AbortSignal) => Promise<SemanticObject<Record<string, unknown>>[]>;
|
|
147
142
|
};
|
|
148
|
-
//#endregion
|
|
149
143
|
export { CONSTRAINT_SCOPES, CONSTRAINT_SEVERITIES, CONSTRAINT_TYPES, FIELD_ROLES, MODEL_CHILD_OBJECT_TYPES, RELATIONSHIP_JOIN_TYPES, RULE_OPERATORS, SEMANTIC_CHILD_OBJECT_SCHEMAS, SEMANTIC_OBJECT_SCOPES, SEMANTIC_OBJECT_TYPE, SQL_DIALECTS, SemanticLayerUnreadableChildrenError, createSemanticLayerSdk, metastoreErrorMessage, semanticConstraintSchema, semanticDatasetSchema, semanticGlossarySchema, semanticMetricSchema, semanticModelSchema, semanticRelationshipSchema };
|
|
150
144
|
//# sourceMappingURL=index.d.cts.map
|