@keboola/api-client 45.0.0 → 47.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 +86 -21
- package/API-SURFACE.md +49 -29
- package/CHANGELOG.md +69 -0
- package/README.md +47 -37
- package/dist/ManagementSessionMintError-4Pkn5Oob.js +36 -0
- package/dist/ManagementSessionMintError-4Pkn5Oob.js.map +1 -0
- package/dist/ManagementSessionMintError-Cu9beG7j.cjs +47 -0
- package/dist/ManagementSessionMintError-Cu9beG7j.cjs.map +1 -0
- package/dist/QueryJobError-ZZZ043Nm.js +22 -0
- package/dist/QueryJobError-ZZZ043Nm.js.map +1 -0
- package/dist/{QueryJobTimeoutError-CVNPdCWX.cjs → QueryJobError-irGiP5zh.cjs} +1 -29
- package/dist/QueryJobError-irGiP5zh.cjs.map +1 -0
- package/dist/QueueJobError-6qSEizWo.cjs +30 -0
- package/dist/QueueJobError-6qSEizWo.cjs.map +1 -0
- package/dist/QueueJobError-8bThS_Mc.js +19 -0
- package/dist/QueueJobError-8bThS_Mc.js.map +1 -0
- package/dist/adminRoles-B40yBcmq.js.map +1 -1
- package/dist/adminRoles-CO7J5qAy.cjs.map +1 -1
- package/dist/{adminRoles-C696kD_U.d.cts → adminRoles-CvdIUkiC.d.ts} +4 -2
- package/dist/{adminRoles-C696kD_U.d.ts → adminRoles-DGM8SuuF.d.cts} +4 -2
- package/dist/ai/index.cjs +2 -2
- package/dist/ai/index.d.cts +2 -2
- package/dist/ai/index.d.ts +2 -2
- package/dist/ai/index.js +2 -2
- package/dist/ai/types.d.cts +1 -1
- package/dist/ai/types.d.ts +1 -1
- package/dist/{appLogs-BG9ueGxA.cjs → appLogs-Cix2KWra.cjs} +2 -2
- package/dist/{appLogs-BG9ueGxA.cjs.map → appLogs-Cix2KWra.cjs.map} +1 -1
- package/dist/{appLogs-C9YlJ2g8.d.cts → appLogs-Cxhm2Rkn.d.cts} +2 -2
- package/dist/{appLogs-CEKz68bE.js → appLogs-KslK7qHr.js} +2 -2
- package/dist/{appLogs-CEKz68bE.js.map → appLogs-KslK7qHr.js.map} +1 -1
- package/dist/{appLogs-BS6ViVGR.d.ts → appLogs-xW0-JQXg.d.ts} +2 -2
- package/dist/apps/index.cjs +3 -3
- package/dist/apps/index.d.cts +3 -3
- package/dist/apps/index.d.ts +3 -3
- package/dist/apps/index.js +3 -3
- package/dist/apps/types.d.cts +2 -2
- package/dist/apps/types.d.ts +2 -2
- package/dist/assets/index.cjs +1 -1
- package/dist/assets/index.d.cts +1 -1
- package/dist/assets/index.d.ts +1 -1
- package/dist/assets/index.js +1 -1
- package/dist/auth/index.cjs +1 -1
- package/dist/auth/index.d.cts +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/auth/types.d.cts +2 -2
- package/dist/auth/types.d.ts +2 -2
- package/dist/{auth-C6cHWIWx.js → auth-4coY1uwo.js} +2 -2
- package/dist/{auth-C6cHWIWx.js.map → auth-4coY1uwo.js.map} +1 -1
- package/dist/{auth-C9o_0bft.cjs → auth-C8Pjl0Mu.cjs} +2 -2
- package/dist/{auth-C9o_0bft.cjs.map → auth-C8Pjl0Mu.cjs.map} +1 -1
- package/dist/{authClient-CACOwVt0.js → authClient-2e8ZmzSP.js} +71 -7
- package/dist/authClient-2e8ZmzSP.js.map +1 -0
- package/dist/{authClient-CBVAT3v9.d.cts → authClient-Bso5UaXS.d.ts} +45 -33
- package/dist/{authClient-DZcAR-eW.cjs → authClient-DfkKlc-2.cjs} +82 -6
- package/dist/authClient-DfkKlc-2.cjs.map +1 -0
- package/dist/{authClient-CRumc934.d.ts → authClient-aud2dUZd.d.cts} +45 -33
- package/dist/billing/index.cjs +2 -2
- package/dist/billing/index.d.cts +1 -1
- package/dist/billing/index.d.ts +1 -1
- package/dist/billing/index.js +2 -2
- package/dist/billing/types.d.cts +1 -1
- package/dist/billing/types.d.ts +1 -1
- package/dist/chat/index.cjs +3 -3
- package/dist/chat/index.d.cts +2 -2
- package/dist/chat/index.d.ts +2 -2
- package/dist/chat/index.js +3 -3
- package/dist/chat/types.d.cts +1 -1
- package/dist/chat/types.d.ts +1 -1
- package/dist/{collect-97WhfEpt.js → collectByOffset-2XzJqmvr.js} +6 -6
- package/dist/collectByOffset-2XzJqmvr.js.map +1 -0
- package/dist/{collect-B5TCNiT1.cjs → collectByOffset-DQsqtmJg.cjs} +7 -7
- package/dist/collectByOffset-DQsqtmJg.cjs.map +1 -0
- package/dist/componentsMcp/index.cjs +3 -0
- package/dist/componentsMcp/index.d.cts +2 -0
- package/dist/componentsMcp/index.d.ts +2 -0
- package/dist/componentsMcp/index.js +2 -0
- package/dist/componentsMcp/types.cjs +0 -0
- package/dist/componentsMcp/types.d.cts +2 -0
- package/dist/componentsMcp/types.d.ts +2 -0
- package/dist/componentsMcp/types.js +1 -0
- package/dist/componentsMcp-CHobIsuU.js +57 -0
- package/dist/componentsMcp-CHobIsuU.js.map +1 -0
- package/dist/componentsMcp-pG-PcQrg.cjs +62 -0
- package/dist/componentsMcp-pG-PcQrg.cjs.map +1 -0
- package/dist/configurations-BTRHVSRq.cjs.map +1 -1
- package/dist/configurations-Chg_JwJ1.js.map +1 -1
- package/dist/constants/index.cjs +1 -1
- package/dist/constants/index.d.cts +2 -3
- package/dist/constants/index.d.ts +2 -3
- package/dist/constants/index.js +1 -1
- package/dist/{constants-Cifrqsls.js → constants-CA4UN2Xv.js} +11 -10
- package/dist/constants-CA4UN2Xv.js.map +1 -0
- package/dist/{constants-BDGRQqij.cjs → constants-a0jswUeK.cjs} +10 -9
- package/dist/constants-a0jswUeK.cjs.map +1 -0
- package/dist/{createFetchClient-DITkTV2k.js → createFetchClient-CkHdS_IG.js} +5 -5
- package/dist/createFetchClient-CkHdS_IG.js.map +1 -0
- package/dist/{createFetchClient-ClWD4ua3.cjs → createFetchClient-lZ_93Yrb.cjs} +5 -5
- package/dist/createFetchClient-lZ_93Yrb.cjs.map +1 -0
- package/dist/{createGenericFetchClient-KqiJhw8G.js → createGenericFetchClient-CQdNcPC3.js} +2 -2
- package/dist/{createGenericFetchClient-KqiJhw8G.js.map → createGenericFetchClient-CQdNcPC3.js.map} +1 -1
- package/dist/{createGenericFetchClient-B81Iezpb.cjs → createGenericFetchClient-MOx97wi-.cjs} +2 -2
- package/dist/{createGenericFetchClient-B81Iezpb.cjs.map → createGenericFetchClient-MOx97wi-.cjs.map} +1 -1
- package/dist/{createOpenapiFetchClient-CioTX11-.cjs → createOpenapiFetchClient-DHYo_k3t.cjs} +2 -2
- package/dist/{createOpenapiFetchClient-CioTX11-.cjs.map → createOpenapiFetchClient-DHYo_k3t.cjs.map} +1 -1
- package/dist/{createOpenapiFetchClient-wq8iGLZM.js → createOpenapiFetchClient-DXiMv9WL.js} +2 -2
- package/dist/{createOpenapiFetchClient-wq8iGLZM.js.map → createOpenapiFetchClient-DXiMv9WL.js.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-BwHmDoQb.js → dataScience-AwPMeGfz.js} +5 -5
- package/dist/{dataScience-BwHmDoQb.js.map → dataScience-AwPMeGfz.js.map} +1 -1
- package/dist/{dataScience-Hhoqoql_.cjs → dataScience-BjS1p8WO.cjs} +5 -5
- package/dist/{dataScience-Hhoqoql_.cjs.map → dataScience-BjS1p8WO.cjs.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 -1
- package/dist/developerPortal/types.d.cts +1 -1
- package/dist/developerPortal/types.d.ts +1 -1
- package/dist/{developerPortalClient-loKq7X_U.js → developerPortalClient-Bb2suezr.js} +13 -5
- package/dist/{developerPortalClient-loKq7X_U.js.map → developerPortalClient-Bb2suezr.js.map} +1 -1
- package/dist/{developerPortalClient-COm7wJxS.cjs → developerPortalClient-DUerKw-7.cjs} +13 -5
- package/dist/{developerPortalClient-COm7wJxS.cjs.map → developerPortalClient-DUerKw-7.cjs.map} +1 -1
- package/dist/domain/permissions/index.cjs +1 -1
- package/dist/domain/permissions/index.d.cts +1 -2
- package/dist/domain/permissions/index.d.ts +1 -2
- package/dist/domain/permissions/index.js +1 -1
- package/dist/editor/index.cjs +2 -2
- package/dist/editor/index.d.cts +2 -2
- package/dist/editor/index.d.ts +2 -2
- package/dist/editor/index.js +2 -2
- package/dist/editor/types.d.cts +1 -1
- package/dist/editor/types.d.ts +1 -1
- package/dist/encryption/index.cjs +1 -1
- package/dist/encryption/index.d.cts +1 -1
- package/dist/encryption/index.d.ts +1 -1
- package/dist/encryption/index.js +1 -1
- package/dist/encryption/types.d.cts +1 -1
- package/dist/encryption/types.d.ts +1 -1
- package/dist/import/index.cjs +1 -1
- package/dist/import/index.d.cts +3 -3
- package/dist/import/index.d.ts +3 -3
- package/dist/import/index.js +1 -1
- package/dist/{import-B5DcJGMI.cjs → import-BahNYv91.cjs} +3 -3
- package/dist/{import-B5DcJGMI.cjs.map → import-BahNYv91.cjs.map} +1 -1
- package/dist/{import-JlH_QaDd.js → import-FWy_wQZ1.js} +3 -3
- package/dist/{import-JlH_QaDd.js.map → import-FWy_wQZ1.js.map} +1 -1
- package/dist/{index-DeQDdut6.d.ts → index-8ZjY7YD8.d.cts} +34 -2
- package/dist/{index-CA6QxbhZ.d.ts → index-BGEuaZqI.d.cts} +238 -252
- package/dist/{index-R-w0Zncz.d.ts → index-BIP0PoMW.d.ts} +4 -4
- package/dist/index-B_MzjCeE.d.ts +46 -0
- package/dist/{index-CGCXR_6Q.d.ts → index-BeOd45XE.d.ts} +4 -4
- package/dist/{index-DeQDdut6.d.cts → index-BnPmXDVP.d.ts} +34 -2
- package/dist/{index-Cvkrjh--.d.cts → index-C2OAOK0s.d.ts} +30 -4
- package/dist/{index-Bl2EloC0.d.ts → index-CAWy1qjR.d.ts} +22482 -17133
- package/dist/{index-CGFGd3tF.d.cts → index-CkwZ5x7E.d.cts} +22482 -17133
- package/dist/{index-D9UsQOuT.d.cts → index-DTysQ_yn.d.cts} +5 -5
- package/dist/{index-CX8GAP2g.d.ts → index-DUB0BwQv.d.cts} +30 -4
- package/dist/{index-zyxZVJnd.d.ts → index-DloFSSj3.d.ts} +3 -3
- package/dist/{index-DtuwWYDR.d.ts → index-Dp-a2DdI.d.ts} +4 -4
- package/dist/{index-BHWTa4YN.d.cts → index-Ds0tViQS.d.cts} +3 -3
- package/dist/{index-BCgmwncs.d.ts → index-HSkjm3QW.d.ts} +5 -5
- package/dist/index-URgNfi5L.d.cts +46 -0
- package/dist/{index-04pgr-EO.d.cts → index-XG5cO-4H.d.cts} +4 -4
- package/dist/{types-BhEx9iRx.d.ts → index-XaPb6unB.d.cts} +4813 -1757
- package/dist/{index-DINB7vsV.d.cts → index-ZYvgoqgW.d.cts} +4 -4
- package/dist/{index-DkvrbR2i.d.cts → index-_Va9wynk.d.ts} +238 -252
- package/dist/{types-sV9OaqTI.d.cts → index-r6YSe8B-.d.ts} +4813 -1757
- package/dist/{index-BKOFRmTB.d.cts → index-x_kS_5x_.d.cts} +4 -4
- package/dist/index.cjs +171 -163
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +100 -97
- package/dist/index.js.map +1 -1
- package/dist/{isLoginPageRedirect-CsyRa3_v.js → isLoginPageRedirect-B4QKSiSa.js} +2 -2
- package/dist/{isLoginPageRedirect-CsyRa3_v.js.map → isLoginPageRedirect-B4QKSiSa.js.map} +1 -1
- package/dist/{isLoginPageRedirect-iNbwl3iz.cjs → isLoginPageRedirect-r0Opgc1n.cjs} +2 -2
- package/dist/{isLoginPageRedirect-iNbwl3iz.cjs.map → isLoginPageRedirect-r0Opgc1n.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 -1
- package/dist/kaiAgent/types.d.cts +1 -1
- package/dist/kaiAgent/types.d.ts +1 -1
- package/dist/{kaiAgent-BhcUsBDk.cjs → kaiAgent-BmfUG8bB.cjs} +5 -5
- package/dist/{kaiAgent-BhcUsBDk.cjs.map → kaiAgent-BmfUG8bB.cjs.map} +1 -1
- package/dist/{kaiAgent-CUeT53-K.js → kaiAgent-CBPbMwBh.js} +5 -5
- package/dist/{kaiAgent-CUeT53-K.js.map → kaiAgent-CBPbMwBh.js.map} +1 -1
- package/dist/{kaiMemory-DaOh0zVn.js → kaiMemory-C9di17bd.js} +2 -2
- package/dist/{kaiMemory-DaOh0zVn.js.map → kaiMemory-C9di17bd.js.map} +1 -1
- package/dist/{kaiMemory-Cf81ghNd.cjs → kaiMemory-Qch09f-m.cjs} +2 -2
- package/dist/{kaiMemory-Cf81ghNd.cjs.map → kaiMemory-Qch09f-m.cjs.map} +1 -1
- package/dist/management/index.cjs +2 -1
- package/dist/management/index.d.cts +2 -2
- package/dist/management/index.d.ts +2 -2
- package/dist/management/index.js +2 -2
- package/dist/management/types.d.cts +2 -2
- package/dist/management/types.d.ts +2 -2
- package/dist/{management-C5lf9nsU.cjs → management-BUGPJ1Bu.cjs} +46 -10
- package/dist/management-BUGPJ1Bu.cjs.map +1 -0
- package/dist/{management-WAtKH6Tu.js → management-DAg2obYt.js} +39 -9
- package/dist/management-DAg2obYt.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 -1
- package/dist/metastore/types.d.cts +1 -1
- package/dist/metastore/types.d.ts +1 -1
- package/dist/{metastore-YPHUK3jJ.cjs → metastore-BXHg33ku.cjs} +4 -4
- package/dist/{metastore-YPHUK3jJ.cjs.map → metastore-BXHg33ku.cjs.map} +1 -1
- package/dist/{metastore-D0C6uaPX.js → metastore-Ywq08DBz.js} +4 -4
- package/dist/{metastore-D0C6uaPX.js.map → metastore-Ywq08DBz.js.map} +1 -1
- package/dist/microsoftGraph/index.cjs +2 -2
- package/dist/microsoftGraph/index.d.cts +3 -3
- package/dist/microsoftGraph/index.d.ts +3 -3
- package/dist/microsoftGraph/index.js +2 -2
- package/dist/microsoftGraph/types.d.cts +2 -2
- package/dist/microsoftGraph/types.d.ts +2 -2
- package/dist/{middleware-DmR6OhTY.js → middleware-CWaLMlG1.js} +2 -2
- package/dist/{middleware-DmR6OhTY.js.map → middleware-CWaLMlG1.js.map} +1 -1
- package/dist/{middleware-D_p5TctO.cjs → middleware-DU_5pFDW.cjs} +2 -2
- package/dist/{middleware-D_p5TctO.cjs.map → middleware-DU_5pFDW.cjs.map} +1 -1
- package/dist/notifications/index.cjs +3 -3
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/index.js +3 -3
- package/dist/notifications/types.d.cts +1 -1
- package/dist/notifications/types.d.ts +1 -1
- package/dist/oauth/index.cjs +1 -1
- package/dist/oauth/index.d.cts +6 -2
- package/dist/oauth/index.d.ts +6 -2
- package/dist/oauth/index.js +1 -1
- package/dist/oauth/types.d.cts +2 -2
- package/dist/oauth/types.d.ts +2 -2
- package/dist/{oauth-DyUwTqHJ.cjs → oauth-DKZPuUlt.cjs} +17 -6
- package/dist/{oauth-DyUwTqHJ.cjs.map → oauth-DKZPuUlt.cjs.map} +1 -1
- package/dist/{oauth-Ck_Fe14o.js → oauth-GXmZ9agP.js} +17 -6
- package/dist/{oauth-Ck_Fe14o.js.map → oauth-GXmZ9agP.js.map} +1 -1
- package/dist/omnisearch/index.cjs +2 -2
- package/dist/omnisearch/index.d.cts +2 -2
- package/dist/omnisearch/index.d.ts +2 -2
- package/dist/omnisearch/index.js +2 -2
- package/dist/omnisearch/types.d.cts +1 -1
- package/dist/omnisearch/types.d.ts +1 -1
- package/dist/project-BMmfPhXg.d.ts +74 -0
- package/dist/{project-DWwZv66D.js → project-BXLFrWJ6.js} +7 -1
- package/dist/project-BXLFrWJ6.js.map +1 -0
- package/dist/{project-BvFi19K_.cjs → project-CpgplgCr.cjs} +7 -1
- package/dist/project-CpgplgCr.cjs.map +1 -0
- package/dist/project-dxCJbFay.d.cts +74 -0
- 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 -1
- package/dist/queryService/types.d.cts +2 -2
- package/dist/queryService/types.d.ts +2 -2
- package/dist/{queryService-Blfz59Ms.js → queryService-C-pZha5p.js} +36 -27
- package/dist/queryService-C-pZha5p.js.map +1 -0
- package/dist/{queryService-RlNYw7LG.cjs → queryService-CzK53q94.cjs} +36 -27
- package/dist/queryService-CzK53q94.cjs.map +1 -0
- package/dist/queue/index.cjs +1 -1
- package/dist/queue/index.d.cts +75 -7
- package/dist/queue/index.d.ts +75 -7
- package/dist/queue/index.js +1 -1
- package/dist/queue/types.d.cts +1 -1
- package/dist/queue/types.d.ts +1 -1
- package/dist/{queue-BrgRdtOr.cjs → queue-BJvDWriM.cjs} +35 -25
- package/dist/queue-BJvDWriM.cjs.map +1 -0
- package/dist/{queue-CNvR-M23.js → queue-D6-x4OGF.js} +35 -25
- package/dist/queue-D6-x4OGF.js.map +1 -0
- package/dist/scheduler/index.cjs +3 -3
- package/dist/scheduler/index.d.cts +2 -2
- package/dist/scheduler/index.d.ts +2 -2
- package/dist/scheduler/index.js +3 -3
- package/dist/scheduler/types.d.cts +1 -1
- package/dist/scheduler/types.d.ts +1 -1
- package/dist/{schema-DJa9WBjR.d.cts → schema-BUyMwQnM.d.cts} +7 -1
- package/dist/{schema-DJa9WBjR.d.ts → schema-BUyMwQnM.d.ts} +7 -1
- package/dist/sdk/configurations/index.d.cts +2 -4
- package/dist/sdk/configurations/index.d.ts +2 -4
- package/dist/sdk/developerPortal/index.cjs +3 -3
- package/dist/sdk/developerPortal/index.d.cts +29 -3
- package/dist/sdk/developerPortal/index.d.ts +29 -3
- package/dist/sdk/developerPortal/index.js +3 -3
- package/dist/sdk/kaiMemory/index.cjs +1 -1
- package/dist/sdk/kaiMemory/index.d.cts +1 -1
- package/dist/sdk/kaiMemory/index.d.ts +1 -1
- package/dist/sdk/kaiMemory/index.js +1 -1
- package/dist/sdk/kaiMemory/types.d.cts +1 -1
- package/dist/sdk/kaiMemory/types.d.ts +1 -1
- package/dist/sdk/queryService/index.cjs +34 -55
- package/dist/sdk/queryService/index.cjs.map +1 -1
- package/dist/sdk/queryService/index.d.cts +2 -2
- package/dist/sdk/queryService/index.d.ts +2 -2
- package/dist/sdk/queryService/index.js +34 -55
- package/dist/sdk/queryService/index.js.map +1 -1
- package/dist/sdk/semanticLayer/index.d.cts +1 -1
- package/dist/sdk/semanticLayer/index.d.ts +1 -1
- package/dist/sdk/semanticLayer/types.d.cts +1 -1
- package/dist/sdk/semanticLayer/types.d.ts +1 -1
- package/dist/sdk/storage/index.cjs +0 -119
- package/dist/sdk/storage/index.cjs.map +1 -1
- package/dist/sdk/storage/index.d.cts +103 -2
- package/dist/sdk/storage/index.d.ts +103 -2
- package/dist/sdk/storage/index.js +1 -119
- package/dist/sdk/storage/index.js.map +1 -1
- package/dist/sdk/tag/index.d.cts +2 -2
- package/dist/sdk/tag/index.d.ts +2 -2
- package/dist/sdk/tag/types.d.cts +1 -1
- package/dist/sdk/tag/types.d.ts +1 -1
- package/dist/sdk/vault/index.d.cts +1 -1
- package/dist/sdk/vault/index.d.ts +1 -1
- package/dist/status/index.cjs +1 -1
- package/dist/status/index.d.cts +1 -1
- package/dist/status/index.d.ts +1 -1
- package/dist/status/index.js +1 -1
- package/dist/storage/index.cjs +15 -10
- package/dist/storage/index.d.cts +3 -3
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +7 -6
- package/dist/storage/types.d.cts +6 -5
- package/dist/storage/types.d.ts +6 -5
- package/dist/{storage-RkNaOFJ-.js → storage-DyR7hDdv.js} +347 -168
- package/dist/storage-DyR7hDdv.js.map +1 -0
- package/dist/{storage-76Sf_z_H.cjs → storage-yovv11k6.cjs} +366 -169
- package/dist/storage-yovv11k6.cjs.map +1 -0
- package/dist/stream/index.cjs +3 -3
- package/dist/stream/index.d.cts +2 -2
- package/dist/stream/index.d.ts +2 -2
- package/dist/stream/index.js +3 -3
- package/dist/stream/types.d.cts +1 -1
- package/dist/stream/types.d.ts +1 -1
- package/dist/syncActions/index.cjs +1 -1
- package/dist/syncActions/index.d.cts +2 -2
- package/dist/syncActions/index.d.ts +2 -2
- package/dist/syncActions/index.js +1 -1
- package/dist/syncActions/types.d.cts +1 -1
- package/dist/syncActions/types.d.ts +1 -1
- package/dist/{syncActions-DlNPhZY4.cjs → syncActions-C1rE4R3f.cjs} +5 -5
- package/dist/{syncActions-DlNPhZY4.cjs.map → syncActions-C1rE4R3f.cjs.map} +1 -1
- package/dist/{syncActions-BvFUa9xV.js → syncActions-DM8vP7p3.js} +5 -5
- package/dist/{syncActions-BvFUa9xV.js.map → syncActions-DM8vP7p3.js.map} +1 -1
- package/dist/telemetry/index.cjs +3 -6
- package/dist/telemetry/index.cjs.map +1 -1
- package/dist/telemetry/index.d.cts +2 -5
- package/dist/telemetry/index.d.ts +2 -5
- package/dist/telemetry/index.js +3 -6
- package/dist/telemetry/index.js.map +1 -1
- package/dist/telemetry/types.d.cts +1 -1
- package/dist/telemetry/types.d.ts +1 -1
- package/dist/{jobStatus-BJdbZ72V.js → transientRetries-B4iusp69.js} +79 -37
- package/dist/transientRetries-B4iusp69.js.map +1 -0
- package/dist/{jobStatus-B0E-MZ9I.cjs → transientRetries-DdJfH9QK.cjs} +82 -40
- package/dist/transientRetries-DdJfH9QK.cjs.map +1 -0
- package/dist/{types-tgU8XvPs.d.cts → types--qQPfxWt.d.cts} +2 -2
- package/dist/types-4CjbcUdD.d.cts +1536 -0
- package/dist/{types-DaMmgW-O.d.ts → types-4HmtNuJf.d.ts} +2 -2
- package/dist/types-4bSZLxq3.d.cts +1973 -0
- package/dist/{types-BaSlU0uo.d.ts → types-7DBpH7Rf.d.ts} +2 -2
- package/dist/types-B2ZLjagf.d.ts +1536 -0
- package/dist/{types-DgPt4LY_.d.cts → types-B6ozaDkl.d.cts} +192 -78
- package/dist/{types-YHUEArkR.d.cts → types-BBbzWczQ.d.cts} +2 -2
- package/dist/{types-CgBzm1YR.d.cts → types-BG0oWq8u.d.cts} +2 -2
- package/dist/types-BIDKSQdc.d.ts +1973 -0
- package/dist/{types-ByLH46Dt.d.cts → types-BKIcow3B.d.cts} +2 -2
- package/dist/{types-CfwqVkEA.d.ts → types-BNPvFLgC.d.ts} +2 -2
- package/dist/{types-DlQw6FCi.d.ts → types-BXgINefw.d.ts} +2 -2
- package/dist/{types-CalDJHCX.d.cts → types-BZBU3mwz.d.cts} +3 -3
- package/dist/{types-Bydx6ga_.d.cts → types-B_1plf0y.d.cts} +2 -2
- package/dist/{types-Ccd9O6ca.d.cts → types-B_3zoXA1.d.cts} +3 -3
- package/dist/{types-BBUZ9EHs.d.ts → types-BcQ3j8xK.d.ts} +8 -2
- package/dist/{types-B8N_k79M.d.cts → types-BdF6NDvo.d.cts} +2 -2
- package/dist/{types-CABWhTa9.d.ts → types-BiBBKcin.d.ts} +3 -3
- package/dist/{types-DVt0qlzI.d.cts → types-BiTn_JVW.d.cts} +736 -289
- package/dist/{types-CN6huo55.d.ts → types-BjEiUOL6.d.ts} +192 -78
- package/dist/{types-z82gSTx8.d.ts → types-BoH7NFCh.d.ts} +3 -3
- package/dist/{types-CcYxlqtB.d.cts → types-BwsE-pFo.d.cts} +2 -2
- package/dist/{types-DrvKfXXd.d.cts → types-Bx0TSdwF.d.cts} +2 -2
- package/dist/{types-DazRtukc.d.ts → types-C2JMisvL.d.ts} +736 -289
- package/dist/{types-DVZpKGBJ.d.ts → types-C2j6Jsie.d.ts} +3 -3
- package/dist/{types-BZDV8DZk.d.ts → types-C3IQu1gV.d.ts} +11 -6
- package/dist/{types-WZBztugL.d.ts → types-C7t_6FLh.d.ts} +2 -2
- package/dist/{types-Fs4a3mVs.d.ts → types-CBrNIgEy.d.ts} +64 -5
- package/dist/{types-CZJlLCbA.d.ts → types-CEw2IzWk.d.ts} +2 -2
- package/dist/{types-DdsYv2WG.d.cts → types-CMKIdreQ.d.cts} +3 -3
- package/dist/{types-AYX7VtS6.d.ts → types-COQOzyac.d.ts} +212 -2
- package/dist/{types-BiEh5c_t.d.cts → types-CZCPdPqv.d.cts} +132 -5
- package/dist/{types-B2w2TtSA.d.ts → types-Cw9UISvM.d.ts} +2 -2
- package/dist/{types-D9axmt5o.d.cts → types-D51g4h9w.d.cts} +8 -2
- package/dist/{types-CBPKpLTf.d.cts → types-D8w9lyb8.d.cts} +212 -2
- package/dist/{types-Dd31Lw4S.d.cts → types-DBJ8c3hN.d.cts} +2 -2
- package/dist/{types-DzV6LaZq.d.ts → types-DHlXKVEM.d.ts} +132 -5
- package/dist/{types-c_bsDkV6.d.cts → types-DPDq8C4q.d.cts} +16 -4
- package/dist/{types-D3wcs4tp.d.ts → types-DWJVbskE.d.ts} +2 -2
- package/dist/{types-CAp1VexS.d.ts → types-Dg8a7m7f.d.ts} +16 -4
- package/dist/{types-CoJVrRAD.d.ts → types-DgIzXY-Y.d.ts} +2 -2
- package/dist/{types-pvQzbgNE.d.cts → types-L50Y6ATu.d.cts} +11 -6
- package/dist/{types-DoZtE9tz.d.cts → types-OkQWmonU.d.cts} +2 -2
- package/dist/{types-BPy5Ozee.d.cts → types-TRJiPqJr.d.cts} +2 -2
- package/dist/{types-B-5ya_L5.d.ts → types-ij6BpTzR.d.ts} +2 -2
- package/dist/{types-DicSaNwq.d.ts → types-ituiCs8g.d.ts} +2 -2
- package/dist/{types-CGm2fQKK.d.cts → types-kbyIaA7p.d.cts} +64 -5
- package/dist/{validateConnectionStatus-DR-0h35y.cjs → validateConnectionStatus-BalWEyRk.cjs} +3 -3
- package/dist/{validateConnectionStatus-DR-0h35y.cjs.map → validateConnectionStatus-BalWEyRk.cjs.map} +1 -1
- package/dist/{validateConnectionStatus-CdTV3gsP.js → validateConnectionStatus-DyrYpn0G.js} +3 -3
- package/dist/{validateConnectionStatus-CdTV3gsP.js.map → validateConnectionStatus-DyrYpn0G.js.map} +1 -1
- package/dist/vault/index.cjs +6 -6
- package/dist/vault/index.cjs.map +1 -1
- package/dist/vault/index.d.cts +1 -1
- package/dist/vault/index.d.ts +1 -1
- package/dist/vault/index.js +6 -6
- package/dist/vault/index.js.map +1 -1
- package/dist/vault/types.d.cts +1 -1
- package/dist/vault/types.d.ts +1 -1
- package/package.json +27 -1
- package/surface/apps.md +5 -5
- package/surface/auth.md +21 -19
- package/surface/chat.md +2 -2
- package/surface/componentsMcp.md +9 -0
- package/surface/dataScience.md +2 -2
- package/surface/kaiAgent.md +2 -2
- package/surface/management.md +43 -41
- package/surface/oauth.md +1 -0
- package/surface/queryService.md +4 -4
- package/surface/queue.md +2 -2
- package/surface/sdk.md +0 -24
- package/surface/storage.md +101 -71
- package/dist/ManagementClientAuthError-BcPYxAWZ.js +0 -16
- package/dist/ManagementClientAuthError-BcPYxAWZ.js.map +0 -1
- package/dist/ManagementClientAuthError-DHuykEPF.cjs +0 -21
- package/dist/ManagementClientAuthError-DHuykEPF.cjs.map +0 -1
- package/dist/QueryJobTimeoutError-C7JbNGOM.js +0 -38
- package/dist/QueryJobTimeoutError-C7JbNGOM.js.map +0 -1
- package/dist/QueryJobTimeoutError-CVNPdCWX.cjs.map +0 -1
- package/dist/authClient-CACOwVt0.js.map +0 -1
- package/dist/authClient-DZcAR-eW.cjs.map +0 -1
- package/dist/collect-97WhfEpt.js.map +0 -1
- package/dist/collect-B5TCNiT1.cjs.map +0 -1
- package/dist/constants-BDGRQqij.cjs.map +0 -1
- package/dist/constants-Cifrqsls.js.map +0 -1
- package/dist/createFetchClient-ClWD4ua3.cjs.map +0 -1
- package/dist/createFetchClient-DITkTV2k.js.map +0 -1
- package/dist/index-BVhHt5lx.d.cts +0 -241
- package/dist/index-Bf8dr2KQ.d.ts +0 -16
- package/dist/index-BgR5zcjJ.d.ts +0 -241
- package/dist/index-CWPi7lBF.d.ts +0 -77
- package/dist/index-Dd40ojPr.d.cts +0 -77
- package/dist/index-DkCXaYsn.d.cts +0 -16
- package/dist/jobStatus-B0E-MZ9I.cjs.map +0 -1
- package/dist/jobStatus-BJdbZ72V.js.map +0 -1
- package/dist/management-C5lf9nsU.cjs.map +0 -1
- package/dist/management-WAtKH6Tu.js.map +0 -1
- package/dist/project-B8wtlstY.d.cts +0 -18
- package/dist/project-BCc3mpAy.d.ts +0 -18
- package/dist/project-BvFi19K_.cjs.map +0 -1
- package/dist/project-DWwZv66D.js.map +0 -1
- package/dist/queryService-Blfz59Ms.js.map +0 -1
- package/dist/queryService-RlNYw7LG.cjs.map +0 -1
- package/dist/queue-BrgRdtOr.cjs.map +0 -1
- package/dist/queue-CNvR-M23.js.map +0 -1
- package/dist/serviceIds-DRcoTnSd.d.cts +0 -32
- package/dist/serviceIds-DRcoTnSd.d.ts +0 -32
- package/dist/storage-76Sf_z_H.cjs.map +0 -1
- package/dist/storage-RkNaOFJ-.js.map +0 -1
- package/dist/types-9SEE4icc.d.ts +0 -1298
- package/dist/types-BhOUS9j1.d.cts +0 -749
- package/dist/types-BjR8Yodc.d.cts +0 -1298
- package/dist/types-CLHaZv9f.d.cts +0 -1868
- package/dist/types-CaOtNjSZ.d.ts +0 -957
- package/dist/types-D1A4mAG0.d.cts +0 -66
- package/dist/types-D8pGSkRe.d.ts +0 -1868
- package/dist/types-DxN2siRW.d.ts +0 -66
- package/dist/types-ePSqbXRr.d.cts +0 -957
- package/dist/types-gcAb6olM.d.ts +0 -749
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as
|
|
3
|
-
import { r as AuthStrategy, t as BaseClientOptions } from "./types-
|
|
4
|
-
import { n as parseLogLines } from "./appLogs-
|
|
5
|
-
import { t as isManagementClientAuthError } from "./index-DkvrbR2i.cjs";
|
|
6
|
-
import { r as createEmitter, t as Emitter } from "./emitter-dLF1Fyfg.cjs";
|
|
1
|
+
import { $r as ManagementSessionMintError, C as isValidationError, E as isStorageJobError, Rr as QueueJobError, S as formatValidationIssues, T as StorageJobError, _ as isAbortError, b as isTimeoutError, ci as ApiError, ei as ManagementClientAuthError, g as FetchClientError, h as HttpHeader, m as HttpContentType, ni as isHtmlResponseError, oi as MiddlewareFn, p as createGenericFetchClient, ti as HtmlResponseError, v as isApiError, w as parseOrThrow, x as ValidationError, y as isFetchClientError, zr as isQueueJobError } from "./index-XaPb6unB.cjs";
|
|
2
|
+
import { $t as PollResult, A as Log, An as CollectByOffsetOptions, At as isKeboolaError, B as SESSION_STORAGE_KEY, Bs as isQueryJobError, Bt as PollRegistry, C as AdminAccount, Cn as dedupe, Ct as FetchStatus, D as createUiVersionMiddleware, Dn as CursorPage, Dt as State, E as KeboolaHttpHeader, En as CollectByCursorOptions, Et as Stack, F as ResponseLog, Fs as SyncActionError, Ft as Result, G as KeboolaApi, Gt as PollState, H as createKeboola, Ht as ObservedPoller, I as createLoggingMiddleware, Is as isSyncActionError, It as Success, Jt as emitter, K as ProjectClients, Kt as Poller, L as BearerSession, Ls as ServiceUnavailableError, Lt as asError, M as Logger, Mn as coalesce, Mt as isStorageTokenMutatingRequest, N as LoggingOptions, Nn as TaskFn, O as RetryOptions, On as collectByCursor, Ot as KeboolaError, P as RequestLog, Pt as Failure, Qt as PollOptions, R as LegacySession, Rs as readableReason, Rt as series, Sn as delay, St as CredentialType, T as jobStatus, Tn as concurrent, Tt as Project, U as KeboolaOptions, Ut as PollKey, V as createLegacyKeboola, Vs as UserError, Vt as createPollRegistry, W as LegacyKeboolaOptions, Wt as PollSnapshot, Xt as poller, Yt as failureOf, Zt as PollContext, _n as createStore, an as createMemoryStorage, bn as assert, bt as Auth, cn as deepMerge, dn as AsyncState, en as PollTick, fn as createDerivedAsyncStore, gn as Store, hn as ReadableStore, in as createLocalStorage, j as LogLevel, jn as collectByOffset, jt as ClientContext, k as createRetryMiddleware, kn as nextCursorOf, kt as KeboolaErrorType, ln as isEmptyDeep, mn as shallowEqual, nn as createPersistor, on as createNullStorage, pn as createDerivedStore, qt as PollerOptions, rn as StorageAdapter, sn as createSessionStorage, tn as Persistor, un as isPlainObject, vn as generateUUID, w as createAdminAccount, wn as ConcurrentOptions, wt as Location, x as createQueryServiceSdk, xn as lazy, xt as Credential, yn as ensure, z as RestoreStatus, zs as QueryJobError, zt as PollEntry } from "./index-CkwZ5x7E.cjs";
|
|
3
|
+
import { r as AuthStrategy, t as BaseClientOptions } from "./types-OkQWmonU.cjs";
|
|
4
|
+
import { n as parseLogLines } from "./appLogs-Cxhm2Rkn.cjs";
|
|
7
5
|
import { n as KeboolaObjectId, r as keboolaUID, t as schemaGuidedMerge } from "./index-BfqkgPGI.cjs";
|
|
8
|
-
|
|
6
|
+
import { r as createEmitter, t as Emitter } from "./emitter-dLF1Fyfg.cjs";
|
|
7
|
+
import { n as isManagementSessionMintError, t as isManagementClientAuthError } from "./index-BGEuaZqI.cjs";
|
|
8
|
+
export { type Location as ActiveLocation, type AdminAccount, ApiError, type AsyncState, type Auth as AuthPhase, type AuthStrategy, type BaseClientOptions, BearerSession, type ClientContext, CollectByCursorOptions, CollectByOffsetOptions, ConcurrentOptions, type Credential as CredentialEntry, type CredentialType, CursorPage, type Emitter, Failure, type FetchClientError, type FetchStatus, HtmlResponseError, HttpContentType, HttpHeader, type KeboolaApi, KeboolaError, KeboolaErrorType, KeboolaHttpHeader, KeboolaObjectId, type KeboolaOptions, type LegacyKeboolaOptions, LegacySession, Log, LogLevel, Logger, LoggingOptions, ManagementClientAuthError, ManagementSessionMintError, MiddlewareFn, ObservedPoller, Persistor, type PollContext, PollEntry, PollKey, type PollOptions, PollRegistry, type PollResult, PollSnapshot, PollState, type PollTick, Poller, PollerOptions, type ProjectClients, type Project as ProjectEntry, QueryJobError, QueueJobError, type ReadableStore, RequestLog, ResponseLog, type RestoreStatus, Result, RetryOptions, SESSION_STORAGE_KEY, ServiceUnavailableError, type State as SessionState, type Stack as StackEntry, type StorageAdapter, StorageJobError, type Store, Success, SyncActionError, TaskFn, UserError, ValidationError, asError, assert, coalesce, collectByCursor, collectByOffset, concurrent, createAdminAccount, createDerivedAsyncStore, createDerivedStore, createEmitter, createGenericFetchClient, createKeboola, createLegacyKeboola, createLocalStorage, createLoggingMiddleware, createMemoryStorage, createNullStorage, createPersistor, createPollRegistry, createQueryServiceSdk, createRetryMiddleware, createSessionStorage, createStore, createUiVersionMiddleware, dedupe, deepMerge, delay, emitter, ensure, failureOf, formatValidationIssues, generateUUID, isAbortError, isApiError, isEmptyDeep, isFetchClientError, isHtmlResponseError, isKeboolaError, isManagementClientAuthError, isManagementSessionMintError, isPlainObject, isQueryJobError, isQueueJobError, isStorageJobError, isStorageTokenMutatingRequest, isSyncActionError, isTimeoutError, isValidationError, jobStatus, keboolaUID, lazy, nextCursorOf, parseLogLines, parseOrThrow, poller, readableReason, schemaGuidedMerge, series, shallowEqual };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as
|
|
3
|
-
import { r as AuthStrategy, t as BaseClientOptions } from "./types-
|
|
4
|
-
import { n as parseLogLines } from "./appLogs-
|
|
5
|
-
import { t as isManagementClientAuthError } from "./index-CA6QxbhZ.js";
|
|
6
|
-
import { r as createEmitter, t as Emitter } from "./emitter-dLF1Fyfg.js";
|
|
1
|
+
import { $r as ManagementSessionMintError, C as isValidationError, E as isStorageJobError, Rr as QueueJobError, S as formatValidationIssues, T as StorageJobError, _ as isAbortError, b as isTimeoutError, ci as ApiError, ei as ManagementClientAuthError, g as FetchClientError, h as HttpHeader, m as HttpContentType, ni as isHtmlResponseError, oi as MiddlewareFn, p as createGenericFetchClient, ti as HtmlResponseError, v as isApiError, w as parseOrThrow, x as ValidationError, y as isFetchClientError, zr as isQueueJobError } from "./index-r6YSe8B-.js";
|
|
2
|
+
import { $t as PollResult, A as Log, An as CollectByOffsetOptions, At as isKeboolaError, B as SESSION_STORAGE_KEY, Bs as isQueryJobError, Bt as PollRegistry, C as AdminAccount, Cn as dedupe, Ct as FetchStatus, D as createUiVersionMiddleware, Dn as CursorPage, Dt as State, E as KeboolaHttpHeader, En as CollectByCursorOptions, Et as Stack, F as ResponseLog, Fs as SyncActionError, Ft as Result, G as KeboolaApi, Gt as PollState, H as createKeboola, Ht as ObservedPoller, I as createLoggingMiddleware, Is as isSyncActionError, It as Success, Jt as emitter, K as ProjectClients, Kt as Poller, L as BearerSession, Ls as ServiceUnavailableError, Lt as asError, M as Logger, Mn as coalesce, Mt as isStorageTokenMutatingRequest, N as LoggingOptions, Nn as TaskFn, O as RetryOptions, On as collectByCursor, Ot as KeboolaError, P as RequestLog, Pt as Failure, Qt as PollOptions, R as LegacySession, Rs as readableReason, Rt as series, Sn as delay, St as CredentialType, T as jobStatus, Tn as concurrent, Tt as Project, U as KeboolaOptions, Ut as PollKey, V as createLegacyKeboola, Vs as UserError, Vt as createPollRegistry, W as LegacyKeboolaOptions, Wt as PollSnapshot, Xt as poller, Yt as failureOf, Zt as PollContext, _n as createStore, an as createMemoryStorage, bn as assert, bt as Auth, cn as deepMerge, dn as AsyncState, en as PollTick, fn as createDerivedAsyncStore, gn as Store, hn as ReadableStore, in as createLocalStorage, j as LogLevel, jn as collectByOffset, jt as ClientContext, k as createRetryMiddleware, kn as nextCursorOf, kt as KeboolaErrorType, ln as isEmptyDeep, mn as shallowEqual, nn as createPersistor, on as createNullStorage, pn as createDerivedStore, qt as PollerOptions, rn as StorageAdapter, sn as createSessionStorage, tn as Persistor, un as isPlainObject, vn as generateUUID, w as createAdminAccount, wn as ConcurrentOptions, wt as Location, x as createQueryServiceSdk, xn as lazy, xt as Credential, yn as ensure, z as RestoreStatus, zs as QueryJobError, zt as PollEntry } from "./index-CAWy1qjR.js";
|
|
3
|
+
import { r as AuthStrategy, t as BaseClientOptions } from "./types-Cw9UISvM.js";
|
|
4
|
+
import { n as parseLogLines } from "./appLogs-xW0-JQXg.js";
|
|
7
5
|
import { n as KeboolaObjectId, r as keboolaUID, t as schemaGuidedMerge } from "./index-BfqkgPGI.js";
|
|
8
|
-
|
|
6
|
+
import { r as createEmitter, t as Emitter } from "./emitter-dLF1Fyfg.js";
|
|
7
|
+
import { n as isManagementSessionMintError, t as isManagementClientAuthError } from "./index-_Va9wynk.js";
|
|
8
|
+
export { type Location as ActiveLocation, type AdminAccount, ApiError, type AsyncState, type Auth as AuthPhase, type AuthStrategy, type BaseClientOptions, BearerSession, type ClientContext, CollectByCursorOptions, CollectByOffsetOptions, ConcurrentOptions, type Credential as CredentialEntry, type CredentialType, CursorPage, type Emitter, Failure, type FetchClientError, type FetchStatus, HtmlResponseError, HttpContentType, HttpHeader, type KeboolaApi, KeboolaError, KeboolaErrorType, KeboolaHttpHeader, KeboolaObjectId, type KeboolaOptions, type LegacyKeboolaOptions, LegacySession, Log, LogLevel, Logger, LoggingOptions, ManagementClientAuthError, ManagementSessionMintError, MiddlewareFn, ObservedPoller, Persistor, type PollContext, PollEntry, PollKey, type PollOptions, PollRegistry, type PollResult, PollSnapshot, PollState, type PollTick, Poller, PollerOptions, type ProjectClients, type Project as ProjectEntry, QueryJobError, QueueJobError, type ReadableStore, RequestLog, ResponseLog, type RestoreStatus, Result, RetryOptions, SESSION_STORAGE_KEY, ServiceUnavailableError, type State as SessionState, type Stack as StackEntry, type StorageAdapter, StorageJobError, type Store, Success, SyncActionError, TaskFn, UserError, ValidationError, asError, assert, coalesce, collectByCursor, collectByOffset, concurrent, createAdminAccount, createDerivedAsyncStore, createDerivedStore, createEmitter, createGenericFetchClient, createKeboola, createLegacyKeboola, createLocalStorage, createLoggingMiddleware, createMemoryStorage, createNullStorage, createPersistor, createPollRegistry, createQueryServiceSdk, createRetryMiddleware, createSessionStorage, createStore, createUiVersionMiddleware, dedupe, deepMerge, delay, emitter, ensure, failureOf, formatValidationIssues, generateUUID, isAbortError, isApiError, isEmptyDeep, isFetchClientError, isHtmlResponseError, isKeboolaError, isManagementClientAuthError, isManagementSessionMintError, isPlainObject, isQueryJobError, isQueueJobError, isStorageJobError, isStorageTokenMutatingRequest, isSyncActionError, isTimeoutError, isValidationError, jobStatus, keboolaUID, lazy, nextCursorOf, parseLogLines, parseOrThrow, poller, readableReason, schemaGuidedMerge, series, shallowEqual };
|
package/dist/index.js
CHANGED
|
@@ -1,52 +1,53 @@
|
|
|
1
|
-
import { t as createProject } from "./project-
|
|
2
|
-
import { t as
|
|
1
|
+
import { t as createProject } from "./project-BXLFrWJ6.js";
|
|
2
|
+
import { t as collectByOffset } from "./collectByOffset-2XzJqmvr.js";
|
|
3
|
+
import { t as createAuthClient, v as collectByCursor, y as nextCursorOf } from "./authClient-2e8ZmzSP.js";
|
|
3
4
|
import { t as concurrent } from "./concurrent-BacWxPwi.js";
|
|
4
5
|
import { t as dedupe } from "./dedupe-Cky1gSUu.js";
|
|
5
|
-
import { a as poller, c as Result, d as delay, i as
|
|
6
|
+
import { a as poller, c as Result, d as delay, i as failureOf, l as asError, n as jobStatus, o as clamp, r as emitter, s as finiteOr, u as lazy } from "./transientRetries-B4iusp69.js";
|
|
6
7
|
import { n as createEmitter, t as createStore } from "./store-C9FQCHGe.js";
|
|
7
|
-
import { a as readableReason,
|
|
8
|
+
import { a as StorageJobError, c as readableReason, l as series, o as isStorageJobError, s as ServiceUnavailableError, t as createStorageClient } from "./storage-DyR7hDdv.js";
|
|
8
9
|
import { n as keboolaUID, t as createTagSdk } from "./tag-hh-1nhNr.js";
|
|
9
10
|
import { t as generateUUID } from "./generateUUID-Dr8l-aoc.js";
|
|
10
11
|
import { t as isPlainObject } from "./isPlainObject-LYW-03uB.js";
|
|
11
12
|
import { n as schemaGuidedMerge, r as isEmptyDeep, t as createConfigurationSdk } from "./configurations-DcpUlC8I.js";
|
|
12
13
|
import { t as UserError } from "./UserError-By_Zckmc.js";
|
|
13
|
-
import { _ as KeboolaHttpHeader, a as isTimeoutError, d as normalizeBaseUrl, g as HttpStatus, i as isFetchClientError, m as CREDENTIAL_HEADERS, n as isAbortError, o as HttpContentType, p as ApiError, r as isApiError, s as HttpHeader, v as REDACTED, y as redactHeaders } from "./createFetchClient-
|
|
14
|
-
import { n as HtmlResponseError, r as isHtmlResponseError } from "./validateConnectionStatus-
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import { _ as KeboolaHttpHeader, a as isTimeoutError, d as normalizeBaseUrl, g as HttpStatus, i as isFetchClientError, m as CREDENTIAL_HEADERS, n as isAbortError, o as HttpContentType, p as ApiError, r as isApiError, s as HttpHeader, v as REDACTED, y as redactHeaders } from "./createFetchClient-CkHdS_IG.js";
|
|
15
|
+
import { n as HtmlResponseError, r as isHtmlResponseError } from "./validateConnectionStatus-DyrYpn0G.js";
|
|
16
|
+
import { n as ManagementClientAuthError, t as ManagementSessionMintError } from "./ManagementSessionMintError-4Pkn5Oob.js";
|
|
17
|
+
import { n as isQueryJobError, t as QueryJobError } from "./QueryJobError-ZZZ043Nm.js";
|
|
18
|
+
import { n as isQueueJobError, t as QueueJobError } from "./QueueJobError-8bThS_Mc.js";
|
|
17
19
|
import { n as isSyncActionError, t as SyncActionError } from "./SyncActionError-CoZFsdUk.js";
|
|
18
20
|
import { i as parseOrThrow, n as formatValidationIssues, r as isValidationError, t as ValidationError } from "./ValidationError-DjhtNMfZ.js";
|
|
19
|
-
import { t as createGenericFetchClient } from "./createGenericFetchClient-
|
|
20
|
-
import { t as createImportClient } from "./import-
|
|
21
|
-
import { t as
|
|
22
|
-
import {
|
|
23
|
-
import { s as ProjectFeature } from "./constants-Cifrqsls.js";
|
|
21
|
+
import { t as createGenericFetchClient } from "./createGenericFetchClient-CQdNcPC3.js";
|
|
22
|
+
import { t as createImportClient } from "./import-FWy_wQZ1.js";
|
|
23
|
+
import { n as isManagementClientAuthError, r as isManagementSessionMintError, t as createManagementClient } from "./management-DAg2obYt.js";
|
|
24
|
+
import { o as ServiceId, s as ProjectFeature } from "./constants-CA4UN2Xv.js";
|
|
24
25
|
import { t as createStorageTable } from "./storageTable-BldTNyEk.js";
|
|
25
|
-
import { i as createKaiMemorySdk } from "./kaiMemory-
|
|
26
|
+
import { i as createKaiMemorySdk } from "./kaiMemory-C9di17bd.js";
|
|
26
27
|
import { i as createSemanticLayerSdk } from "./semanticLayer-DvjS_nzo.js";
|
|
27
|
-
import { createStorageSdk } from "./sdk/storage/index.js";
|
|
28
28
|
import { createVaultSdk } from "./sdk/vault/index.js";
|
|
29
29
|
import { createAiClient } from "./ai/index.js";
|
|
30
|
-
import { t as parseLogLines } from "./appLogs-
|
|
30
|
+
import { t as parseLogLines } from "./appLogs-KslK7qHr.js";
|
|
31
31
|
import { createAppsClient } from "./apps/index.js";
|
|
32
32
|
import { createBillingClient } from "./billing/index.js";
|
|
33
33
|
import { createChatClient } from "./chat/index.js";
|
|
34
|
-
import { t as
|
|
34
|
+
import { t as createComponentsMcpClient } from "./componentsMcp-CHobIsuU.js";
|
|
35
|
+
import { t as createDataScienceClient } from "./dataScience-AwPMeGfz.js";
|
|
35
36
|
import { createEditorClient } from "./editor/index.js";
|
|
36
37
|
import { createEncryptionClient } from "./encryption/index.js";
|
|
37
|
-
import { t as createKaiAgentClient } from "./kaiAgent-
|
|
38
|
-
import { t as createMetastoreClient } from "./metastore-
|
|
38
|
+
import { t as createKaiAgentClient } from "./kaiAgent-CBPbMwBh.js";
|
|
39
|
+
import { t as createMetastoreClient } from "./metastore-Ywq08DBz.js";
|
|
39
40
|
import { createNotificationsClient } from "./notifications/index.js";
|
|
40
|
-
import { t as createOauthClient } from "./oauth-
|
|
41
|
+
import { t as createOauthClient } from "./oauth-GXmZ9agP.js";
|
|
41
42
|
import { createOmnisearchClient } from "./omnisearch/index.js";
|
|
42
|
-
import { t as createQueryServiceClient } from "./queryService-
|
|
43
|
-
import { t as createQueueClient } from "./queue-
|
|
43
|
+
import { t as createQueryServiceClient } from "./queryService-C-pZha5p.js";
|
|
44
|
+
import { t as createQueueClient } from "./queue-D6-x4OGF.js";
|
|
44
45
|
import { createSchedulerClient } from "./scheduler/index.js";
|
|
45
46
|
import { createStreamClient } from "./stream/index.js";
|
|
46
|
-
import { t as createSyncActionsClient } from "./syncActions-
|
|
47
|
+
import { t as createSyncActionsClient } from "./syncActions-DM8vP7p3.js";
|
|
47
48
|
import { createTelemetryClient } from "./telemetry/index.js";
|
|
48
49
|
import { createVaultClient } from "./vault/index.js";
|
|
49
|
-
import { n as isUnauthorized, t as createBearerAuthMiddleware } from "./middleware-
|
|
50
|
+
import { n as isUnauthorized, t as createBearerAuthMiddleware } from "./middleware-CWaLMlG1.js";
|
|
50
51
|
import { createQueryServiceSdk } from "./sdk/queryService/index.js";
|
|
51
52
|
import * as z$1 from "zod";
|
|
52
53
|
//#region src/utils/assert.ts
|
|
@@ -208,7 +209,7 @@ const createDerivedAsyncStore = ({ source, dependsOn, build, keyEquals = shallow
|
|
|
208
209
|
//#endregion
|
|
209
210
|
//#region src/utils/async/poll/registry.ts
|
|
210
211
|
const DEFAULT_LIMIT = 50;
|
|
211
|
-
const isFinished = ({ snapshot }) => snapshot.state !== "idle" && snapshot.state !== "polling";
|
|
212
|
+
const isFinished = ({ snapshot }) => snapshot.state !== "idle" && snapshot.state !== "requesting" && snapshot.state !== "polling";
|
|
212
213
|
const createPollRegistry = ({ limit = DEFAULT_LIMIT } = {}) => {
|
|
213
214
|
const entries = createStore([]);
|
|
214
215
|
const unsubscribes = /* @__PURE__ */ new Map();
|
|
@@ -427,8 +428,7 @@ const KeboolaErrorType = {
|
|
|
427
428
|
NotBearer: "not-bearer",
|
|
428
429
|
NotReady: "not-ready",
|
|
429
430
|
InvalidBuildTransition: "invalid-build-transition",
|
|
430
|
-
StackActive: "stack-active"
|
|
431
|
-
CredentialKindMismatch: "credential-kind-mismatch"
|
|
431
|
+
StackActive: "stack-active"
|
|
432
432
|
};
|
|
433
433
|
const MESSAGES = {
|
|
434
434
|
[KeboolaErrorType.Unconfigured]: "The session is not configured — set a baseUrl first.",
|
|
@@ -441,8 +441,7 @@ const MESSAGES = {
|
|
|
441
441
|
[KeboolaErrorType.NotBearer]: "This operation requires a bearer (OAuth) session.",
|
|
442
442
|
[KeboolaErrorType.NotReady]: "The client is not ready — authenticate the storage realm first.",
|
|
443
443
|
[KeboolaErrorType.InvalidBuildTransition]: "Invalid storage build transition — the build goes idle → initializing → ready | failed.",
|
|
444
|
-
[KeboolaErrorType.StackActive]: "The active stack cannot be closed — select another first."
|
|
445
|
-
[KeboolaErrorType.CredentialKindMismatch]: "This client renews the other credential kind — log in the way its `credentials` mode expects."
|
|
444
|
+
[KeboolaErrorType.StackActive]: "The active stack cannot be closed — select another first."
|
|
446
445
|
};
|
|
447
446
|
var KeboolaError = class KeboolaError extends Error {
|
|
448
447
|
type;
|
|
@@ -603,10 +602,12 @@ const createDefaultBranch = ({ devBranches }) => {
|
|
|
603
602
|
};
|
|
604
603
|
//#endregion
|
|
605
604
|
//#region src/domain/stack.ts
|
|
605
|
+
const isServiceId = (id) => Object.values(ServiceId).includes(id);
|
|
606
606
|
const SERVICE_URL_OVERRIDES = { "kai-assistant": (url) => `${url}/api` };
|
|
607
607
|
const createStack = ({ stackInfo, clientServiceUrls }) => {
|
|
608
608
|
const { services, components, features, ...infoRest } = stackInfo;
|
|
609
609
|
const serviceMap = new Map(services.map((service) => {
|
|
610
|
+
if (!isServiceId(service.id)) return [service.id, service.url];
|
|
610
611
|
const devOverride = clientServiceUrls?.[service.id]?.(service.url);
|
|
611
612
|
const prodOverride = SERVICE_URL_OVERRIDES[service.id]?.(service.url);
|
|
612
613
|
const url = devOverride ?? prodOverride ?? service.url;
|
|
@@ -730,7 +731,6 @@ const createSdk = ({ storage, services, context }) => ({
|
|
|
730
731
|
tag: createTagSdk({ metastoreClient: services.metastore }),
|
|
731
732
|
semanticLayer: createSemanticLayerSdk({ metastoreClient: services.metastore }),
|
|
732
733
|
kaiMemory: createKaiMemorySdk({ metastoreClient: services.metastore }),
|
|
733
|
-
storage: createStorageSdk({ storageClient: storage }),
|
|
734
734
|
vault: createVaultSdk({
|
|
735
735
|
vaultClient: services.vault,
|
|
736
736
|
encryptionClient: services.encryption
|
|
@@ -857,6 +857,14 @@ const createServiceClients = ({ baseUrl, auth, getServiceBaseUrl, middlewareFor,
|
|
|
857
857
|
middlewares: middlewareFor("kaiAgent", [attachTokenMiddleware]),
|
|
858
858
|
auth
|
|
859
859
|
})
|
|
860
|
+
}).add({
|
|
861
|
+
serviceId: "components-mcp",
|
|
862
|
+
clientName: "componentsMcp",
|
|
863
|
+
clientFn: (serviceBaseUrl) => createComponentsMcpClient({
|
|
864
|
+
baseUrl: serviceBaseUrl,
|
|
865
|
+
middlewares: middlewareFor("componentsMcp", [attachTokenMiddleware]),
|
|
866
|
+
auth
|
|
867
|
+
})
|
|
860
868
|
}).add({
|
|
861
869
|
serviceId: "oauth",
|
|
862
870
|
clientName: "oauth",
|
|
@@ -1095,7 +1103,12 @@ const renew = async (client, grant) => {
|
|
|
1095
1103
|
//#region src/keboola/bearer/credentials/credentials.ts
|
|
1096
1104
|
const DEFAULT_REFRESH_THRESHOLD = .9;
|
|
1097
1105
|
const signInEnded = () => new KeboolaError(KeboolaErrorType.SignInEnded);
|
|
1098
|
-
const
|
|
1106
|
+
const toRestoreStatus = (outcome) => {
|
|
1107
|
+
if (outcome === void 0 || outcome === "skipped") return "empty";
|
|
1108
|
+
if (outcome === "refused") return "expired";
|
|
1109
|
+
return outcome;
|
|
1110
|
+
};
|
|
1111
|
+
const createCredentials = ({ state, persistor, middlewares, refreshThreshold = DEFAULT_REFRESH_THRESHOLD, onSignedOut, onExpired }) => {
|
|
1099
1112
|
const rotationMap = /* @__PURE__ */ new Map();
|
|
1100
1113
|
const generations = /* @__PURE__ */ new Map();
|
|
1101
1114
|
const generationOf = (baseUrl) => generations.get(baseUrl) ?? 0;
|
|
@@ -1122,11 +1135,12 @@ const createCredentials = ({ state, persistor, middlewares, mode = "token", refr
|
|
|
1122
1135
|
/**
|
|
1123
1136
|
* The rotation, and the one place a credential is declared dead.
|
|
1124
1137
|
*
|
|
1138
|
+
* - Renews by the credential's own kind: the refresh token, or the session id with the cookie.
|
|
1125
1139
|
* - A refused refresh token or session is unambiguous.
|
|
1126
1140
|
* - The triggering 401 is not (an unreachable project answers the same), so never sign out on a replay.
|
|
1127
1141
|
*/
|
|
1128
1142
|
const rotateOnce = async (baseUrl) => {
|
|
1129
|
-
const credential = state.auth.
|
|
1143
|
+
const credential = state.auth.requireCredential(baseUrl);
|
|
1130
1144
|
if (!credential.success) return credential;
|
|
1131
1145
|
const refreshed = await refresh(baseUrl, renewalGrant(credential.data));
|
|
1132
1146
|
if (!refreshed.success) {
|
|
@@ -1158,30 +1172,25 @@ const createCredentials = ({ state, persistor, middlewares, mode = "token", refr
|
|
|
1158
1172
|
* when persistence may start.
|
|
1159
1173
|
*/
|
|
1160
1174
|
const restore = async () => {
|
|
1161
|
-
const
|
|
1162
|
-
const stacks = hydrated.stacks.map((stack) => stack.credential && stack.credential.type !== "static" && stack.credential.type !== mode ? {
|
|
1163
|
-
...stack,
|
|
1164
|
-
credential: null
|
|
1165
|
-
} : stack);
|
|
1166
|
-
const { current } = hydrated;
|
|
1175
|
+
const { stacks, current } = persistor.hydrate();
|
|
1167
1176
|
const scoped = stacks.find(({ baseUrl }) => baseUrl === current?.baseUrl);
|
|
1168
1177
|
const restored = stacks.map(async ({ baseUrl, credential, projects }) => {
|
|
1169
1178
|
state.stacks.ensure(baseUrl);
|
|
1170
1179
|
if (!credential) return "unreachable";
|
|
1171
1180
|
if (Result.unwrapOr(state.auth.getEpoch(baseUrl), 0) > 0) return "skipped";
|
|
1172
|
-
const outcome =
|
|
1181
|
+
const outcome = await restoreStack(baseUrl, credential);
|
|
1173
1182
|
if (outcome === "restored") restoreProjects(baseUrl, projects);
|
|
1174
1183
|
return outcome;
|
|
1175
1184
|
});
|
|
1176
1185
|
const results = await Promise.all(restored);
|
|
1177
|
-
const
|
|
1186
|
+
const scopedOutcome = scoped?.credential ? results[stacks.indexOf(scoped)] : void 0;
|
|
1178
1187
|
return {
|
|
1179
1188
|
lastActive: current,
|
|
1180
|
-
status:
|
|
1189
|
+
status: toRestoreStatus(scopedOutcome)
|
|
1181
1190
|
};
|
|
1182
1191
|
};
|
|
1183
1192
|
const isStale = (baseUrl) => {
|
|
1184
|
-
const ageing = Result.map(state.auth.
|
|
1193
|
+
const ageing = Result.map(state.auth.requireCredential(baseUrl), ({ issuedAt, expiresIn }) => Date.now() >= issuedAt + expiresIn * 1e3 * refreshThreshold);
|
|
1185
1194
|
return Result.unwrapOr(ageing, false);
|
|
1186
1195
|
};
|
|
1187
1196
|
const signOut = (baseUrl) => {
|
|
@@ -1191,14 +1200,18 @@ const createCredentials = ({ state, persistor, middlewares, mode = "token", refr
|
|
|
1191
1200
|
return signedOut;
|
|
1192
1201
|
};
|
|
1193
1202
|
const expire = (baseUrl) => {
|
|
1194
|
-
if (state.auth.notifyExpired(baseUrl))
|
|
1203
|
+
if (!state.auth.notifyExpired(baseUrl)) return;
|
|
1204
|
+
signOut(baseUrl);
|
|
1205
|
+
onExpired?.(baseUrl);
|
|
1195
1206
|
};
|
|
1196
|
-
const canRefresh = (baseUrl) => state.auth.requireCredentialOf(baseUrl, mode).success;
|
|
1197
1207
|
const renewIfStale = async (baseUrl) => {
|
|
1198
1208
|
if (isStale(baseUrl)) await rotate(baseUrl);
|
|
1199
1209
|
};
|
|
1200
1210
|
const middleware = (baseUrl) => createBearerAuthMiddleware({ getAccessToken: async ({ forceRefresh = false } = {}) => {
|
|
1201
|
-
if (forceRefresh)
|
|
1211
|
+
if (forceRefresh) {
|
|
1212
|
+
if (!state.auth.requireCredential(baseUrl).success) return null;
|
|
1213
|
+
return Result.unwrap(await rotate(baseUrl));
|
|
1214
|
+
}
|
|
1202
1215
|
await renewIfStale(baseUrl);
|
|
1203
1216
|
return state.auth.getAccessToken(baseUrl);
|
|
1204
1217
|
} });
|
|
@@ -1229,10 +1242,10 @@ const authenticatedAuth = (credential) => ({
|
|
|
1229
1242
|
status: "authenticated",
|
|
1230
1243
|
credential
|
|
1231
1244
|
});
|
|
1232
|
-
const bearerCredential = (input) =>
|
|
1245
|
+
const bearerCredential = (input) => ({
|
|
1233
1246
|
...input,
|
|
1234
1247
|
issuedAt: Date.now()
|
|
1235
|
-
};
|
|
1248
|
+
});
|
|
1236
1249
|
const expiredCredential = (credential) => ({
|
|
1237
1250
|
...credential,
|
|
1238
1251
|
issuedAt: Date.now() - credential.expiresIn * 1e3
|
|
@@ -1291,8 +1304,6 @@ const Errors = {
|
|
|
1291
1304
|
notReady: () => new KeboolaError(KeboolaErrorType.NotReady),
|
|
1292
1305
|
alreadyRestoring: (baseUrl) => /* @__PURE__ */ new Error(`Stack "${baseUrl}" is already being restored`),
|
|
1293
1306
|
notRestoring: (baseUrl) => /* @__PURE__ */ new Error(`Stack "${baseUrl}" is not being restored`),
|
|
1294
|
-
unexpectedCredentialKind: (baseUrl, kind) => /* @__PURE__ */ new Error(`Stack "${baseUrl}" holds a ${kind} credential`),
|
|
1295
|
-
notRotatingCredential: (baseUrl) => /* @__PURE__ */ new Error(`Stack "${baseUrl}" holds a static credential`),
|
|
1296
1307
|
credentialKindChanged: (from, to) => /* @__PURE__ */ new Error(`A ${from} credential cannot become ${to}`),
|
|
1297
1308
|
missingProject: (id) => /* @__PURE__ */ new Error(`No project "${id}"`)
|
|
1298
1309
|
};
|
|
@@ -1325,8 +1336,6 @@ const createAuth = ({ stacks, projects, expiry }) => {
|
|
|
1325
1336
|
const requireUnauthenticated = (baseUrl) => Result.andThen(stacks.get(baseUrl), (stack) => stack.auth.status === "authenticated" ? Result.failure(Errors.alreadyAuthenticated()) : Result.success(stack));
|
|
1326
1337
|
const requireAnonymous = (baseUrl) => Result.andThen(requireUnauthenticated(baseUrl), (stack) => stack.auth.status === "restoring" ? Result.failure(Errors.alreadyRestoring(baseUrl)) : Result.success(stack));
|
|
1327
1338
|
const requireRestoring = (baseUrl) => Result.andThen(stacks.get(baseUrl), (stack) => stack.auth.status === "restoring" ? Result.success(stack) : Result.failure(Errors.notRestoring(baseUrl)));
|
|
1328
|
-
const requireRotatingCredential = (baseUrl) => Result.andThen(stacks.requireCredential(baseUrl), (credential) => credential.type === "static" ? Result.failure(Errors.notRotatingCredential(baseUrl)) : Result.success(credential));
|
|
1329
|
-
const requireCredentialOf = (baseUrl, mode) => Result.andThen(requireRotatingCredential(baseUrl), (credential) => credential.type === mode ? Result.success(credential) : Result.failure(Errors.unexpectedCredentialKind(baseUrl, credential.type)));
|
|
1330
1339
|
const startRestore = (baseUrl) => Result.map(requireAnonymous(baseUrl), (stack) => stacks.set({
|
|
1331
1340
|
...stack,
|
|
1332
1341
|
auth: Entry.restoringAuth()
|
|
@@ -1343,11 +1352,11 @@ const createAuth = ({ stacks, projects, expiry }) => {
|
|
|
1343
1352
|
auth: Entry.authenticatedAuth(Entry.bearerCredential(input))
|
|
1344
1353
|
});
|
|
1345
1354
|
});
|
|
1346
|
-
const applyRefresh = (baseUrl, input) => Result.andThen(
|
|
1355
|
+
const applyRefresh = (baseUrl, input) => Result.andThen(stacks.requireCredential(baseUrl), (credential) => credential.type !== input.type ? Result.failure(Errors.credentialKindChanged(credential.type, input.type)) : Result.map(stacks.get(baseUrl), (stack) => stacks.set({
|
|
1347
1356
|
...stack,
|
|
1348
1357
|
auth: Entry.authenticatedAuth(Entry.bearerCredential(input))
|
|
1349
1358
|
})));
|
|
1350
|
-
const forceExpire = (baseUrl) => Result.andThen(
|
|
1359
|
+
const forceExpire = (baseUrl) => Result.andThen(stacks.requireCredential(baseUrl), (credential) => Result.map(stacks.get(baseUrl), (stack) => stacks.set({
|
|
1351
1360
|
...stack,
|
|
1352
1361
|
auth: Entry.authenticatedAuth(Entry.expiredCredential(credential))
|
|
1353
1362
|
})));
|
|
@@ -1370,8 +1379,6 @@ const createAuth = ({ stacks, projects, expiry }) => {
|
|
|
1370
1379
|
signOut,
|
|
1371
1380
|
notifyExpired: expiry.report,
|
|
1372
1381
|
requireCredential: stacks.requireCredential,
|
|
1373
|
-
requireRotatingCredential,
|
|
1374
|
-
requireCredentialOf,
|
|
1375
1382
|
getEpoch,
|
|
1376
1383
|
getAccessToken
|
|
1377
1384
|
};
|
|
@@ -1943,24 +1950,16 @@ const SESSION_STORAGE_KEY = "keboola:session";
|
|
|
1943
1950
|
*
|
|
1944
1951
|
* - `token`: the refresh token. It rotates, is single-use and is server-revocable, so a leaked
|
|
1945
1952
|
* snapshot has limited and revocable value. The access token is never written.
|
|
1946
|
-
* - `static`: the token itself — a long-lived PAT the user pasted, which nothing can re-mint.
|
|
1947
1953
|
* - `cookie`: the session id. The session cookie is the durable half and the browser keeps it;
|
|
1948
1954
|
* the id alone renews nothing.
|
|
1949
1955
|
*/
|
|
1950
|
-
const persistedCredentialSchema = z$1.discriminatedUnion("type", [
|
|
1951
|
-
z$1.
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
z$1.
|
|
1956
|
-
|
|
1957
|
-
sessionId: z$1.string()
|
|
1958
|
-
}),
|
|
1959
|
-
z$1.object({
|
|
1960
|
-
type: z$1.literal("static"),
|
|
1961
|
-
accessToken: z$1.string()
|
|
1962
|
-
})
|
|
1963
|
-
]);
|
|
1956
|
+
const persistedCredentialSchema = z$1.discriminatedUnion("type", [z$1.object({
|
|
1957
|
+
type: z$1.literal("token"),
|
|
1958
|
+
refreshToken: z$1.string()
|
|
1959
|
+
}), z$1.object({
|
|
1960
|
+
type: z$1.literal("cookie"),
|
|
1961
|
+
sessionId: z$1.string()
|
|
1962
|
+
})]);
|
|
1964
1963
|
/** A record per project rather than a bare id, so a project can grow a field without a migration. */
|
|
1965
1964
|
const persistedProjectSchema = z$1.object({ projectId: z$1.number() });
|
|
1966
1965
|
const persistedSessionSchema = z$1.object({
|
|
@@ -1970,7 +1969,7 @@ const persistedSessionSchema = z$1.object({
|
|
|
1970
1969
|
}).nullable(),
|
|
1971
1970
|
stacks: z$1.array(z$1.object({
|
|
1972
1971
|
baseUrl: z$1.string(),
|
|
1973
|
-
credential: persistedCredentialSchema.nullable(),
|
|
1972
|
+
credential: persistedCredentialSchema.nullable().catch(null),
|
|
1974
1973
|
projects: z$1.array(persistedProjectSchema)
|
|
1975
1974
|
}))
|
|
1976
1975
|
});
|
|
@@ -1981,18 +1980,13 @@ const EMPTY_PERSISTED_SESSION = {
|
|
|
1981
1980
|
const durableCredential = (stack) => {
|
|
1982
1981
|
if (stack.auth.status !== "authenticated") return null;
|
|
1983
1982
|
const { credential } = stack.auth;
|
|
1984
|
-
|
|
1983
|
+
return credential.type === "token" ? {
|
|
1985
1984
|
type: "token",
|
|
1986
1985
|
refreshToken: credential.refreshToken
|
|
1987
|
-
}
|
|
1988
|
-
if (credential.type === "cookie") return {
|
|
1986
|
+
} : {
|
|
1989
1987
|
type: "cookie",
|
|
1990
1988
|
sessionId: credential.sessionId
|
|
1991
1989
|
};
|
|
1992
|
-
return {
|
|
1993
|
-
type: "static",
|
|
1994
|
-
accessToken: credential.accessToken
|
|
1995
|
-
};
|
|
1996
1990
|
};
|
|
1997
1991
|
const createSessionPersistor = (storage) => {
|
|
1998
1992
|
const persistor = createPersistor({
|
|
@@ -2059,7 +2053,7 @@ const createPerStack = ({ state, credentials, middlewareFor }) => {
|
|
|
2059
2053
|
*
|
|
2060
2054
|
* - Credential-derived state is owned by the scope whose end ends it (`perStack`, `perProject`).
|
|
2061
2055
|
*/
|
|
2062
|
-
const createKeboola = ({ defaultBaseUrl, storage, middlewares, clientServiceUrls,
|
|
2056
|
+
const createKeboola = ({ defaultBaseUrl, storage, middlewares, clientServiceUrls, onExpired }) => {
|
|
2063
2057
|
const state = createState(normalizeBaseUrl(defaultBaseUrl));
|
|
2064
2058
|
const persistor = createSessionPersistor(storage);
|
|
2065
2059
|
const middlewareFor = createMiddlewareFor(middlewares);
|
|
@@ -2067,8 +2061,8 @@ const createKeboola = ({ defaultBaseUrl, storage, middlewares, clientServiceUrls
|
|
|
2067
2061
|
state,
|
|
2068
2062
|
persistor,
|
|
2069
2063
|
middlewares: middlewareFor("auth"),
|
|
2070
|
-
|
|
2071
|
-
|
|
2064
|
+
onSignedOut: (baseUrl) => perProject.forgetUnder(baseUrl),
|
|
2065
|
+
onExpired
|
|
2072
2066
|
});
|
|
2073
2067
|
const perStack = createPerStack({
|
|
2074
2068
|
state,
|
|
@@ -2134,7 +2128,6 @@ const createKeboola = ({ defaultBaseUrl, storage, middlewares, clientServiceUrls
|
|
|
2134
2128
|
};
|
|
2135
2129
|
const authenticate = (input) => {
|
|
2136
2130
|
const stack = state.scope.getActiveStack();
|
|
2137
|
-
if (input.type !== "static" && input.type !== mode) throw new KeboolaError(KeboolaErrorType.CredentialKindMismatch);
|
|
2138
2131
|
if (input.type !== "token") return Result.unwrap(state.auth.authenticate(stack.baseUrl, input));
|
|
2139
2132
|
const { refreshToken } = input;
|
|
2140
2133
|
if (!refreshToken) throw new KeboolaError(KeboolaErrorType.NotAuthenticated);
|
|
@@ -2197,19 +2190,6 @@ const createKeboola = ({ defaultBaseUrl, storage, middlewares, clientServiceUrls
|
|
|
2197
2190
|
return authenticate(input);
|
|
2198
2191
|
};
|
|
2199
2192
|
/**
|
|
2200
|
-
* A server-injected `token` credential, adopted whatever this client's mode.
|
|
2201
|
-
*
|
|
2202
|
-
* @deprecated Temporary, for the agent-project claim page only: Connection injects an API-mode
|
|
2203
|
-
* session through `UiConfig.programmaticAuth`. Remove together with that injection.
|
|
2204
|
-
*
|
|
2205
|
-
* - Replaces the active stack's sign-in, like `replace`.
|
|
2206
|
-
* - A cookie-mode client never rotates it, so it lasts as long as its access token.
|
|
2207
|
-
*/
|
|
2208
|
-
const adoptInjected = (input) => {
|
|
2209
|
-
signOut();
|
|
2210
|
-
return Result.unwrap(state.auth.authenticate(getActiveStack().baseUrl, input));
|
|
2211
|
-
};
|
|
2212
|
-
/**
|
|
2213
2193
|
* Leave one project: its row and everything built for it; its handles stop answering.
|
|
2214
2194
|
*
|
|
2215
2195
|
* - Counterpart of `getApi(projectId)`; without it the project is held and persisted until sign-out.
|
|
@@ -2315,7 +2295,6 @@ const createKeboola = ({ defaultBaseUrl, storage, middlewares, clientServiceUrls
|
|
|
2315
2295
|
auth: {
|
|
2316
2296
|
authenticate: byCaller(authenticate),
|
|
2317
2297
|
replace: byCaller(replace),
|
|
2318
|
-
adoptInjected: byCaller(adoptInjected),
|
|
2319
2298
|
signOut: byCaller(signOut),
|
|
2320
2299
|
/** Whether the active stack holds a credential — `restoring` is not one yet. */
|
|
2321
2300
|
isAuthenticated,
|
|
@@ -2486,6 +2465,30 @@ const createUiVersionMiddleware = (uiVersion) => {
|
|
|
2486
2465
|
};
|
|
2487
2466
|
};
|
|
2488
2467
|
//#endregion
|
|
2489
|
-
|
|
2468
|
+
//#region src/domain/adminAccount.ts
|
|
2469
|
+
/**
|
|
2470
|
+
* The admin behind a Manage token: `GET /manage/tokens/verify`, with the admin-level helpers.
|
|
2471
|
+
*
|
|
2472
|
+
* - `user` is absent for a token with no admin behind it (an application token) and for no token
|
|
2473
|
+
* at all (a session the Manage API refused); every helper then answers `false`.
|
|
2474
|
+
*/
|
|
2475
|
+
const createAdminAccount = ({ managementToken }) => {
|
|
2476
|
+
const user = managementToken?.user;
|
|
2477
|
+
const adminFeatureSet = new Set(user?.features ?? []);
|
|
2478
|
+
const hasAdminFeature = (...feature) => {
|
|
2479
|
+
if (feature.length === 0) return false;
|
|
2480
|
+
return feature.every((x) => adminFeatureSet.has(x));
|
|
2481
|
+
};
|
|
2482
|
+
const hasAnyAdminFeature = (...feature) => feature.some((x) => adminFeatureSet.has(x));
|
|
2483
|
+
return {
|
|
2484
|
+
isSuperAdmin: user?.isSuperAdmin ?? false,
|
|
2485
|
+
hasAdminFeature,
|
|
2486
|
+
hasAnyAdminFeature,
|
|
2487
|
+
user,
|
|
2488
|
+
managementToken
|
|
2489
|
+
};
|
|
2490
|
+
};
|
|
2491
|
+
//#endregion
|
|
2492
|
+
export { ApiError, HtmlResponseError, HttpContentType, HttpHeader, KeboolaError, KeboolaErrorType, KeboolaHttpHeader, ManagementClientAuthError, ManagementSessionMintError, QueryJobError, QueueJobError, Result, SESSION_STORAGE_KEY, ServiceUnavailableError, StorageJobError, SyncActionError, UserError, ValidationError, asError, assert, coalesce, collectByCursor, collectByOffset, concurrent, createAdminAccount, createDerivedAsyncStore, createDerivedStore, createEmitter, createGenericFetchClient, createKeboola, createLegacyKeboola, createLocalStorage, createLoggingMiddleware, createMemoryStorage, createNullStorage, createPersistor, createPollRegistry, createQueryServiceSdk, createRetryMiddleware, createSessionStorage, createStore, createUiVersionMiddleware, dedupe, deepMerge, delay, emitter, ensure, failureOf, formatValidationIssues, generateUUID, isAbortError, isApiError, isEmptyDeep, isFetchClientError, isHtmlResponseError, isKeboolaError, isManagementClientAuthError, isManagementSessionMintError, isPlainObject, isQueryJobError, isQueueJobError, isStorageJobError, isStorageTokenMutatingRequest, isSyncActionError, isTimeoutError, isValidationError, jobStatus, keboolaUID, lazy, nextCursorOf, parseLogLines, parseOrThrow, poller, readableReason, schemaGuidedMerge, series, shallowEqual };
|
|
2490
2493
|
|
|
2491
2494
|
//# sourceMappingURL=index.js.map
|