@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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as paths } from "../schema-
|
|
1
|
+
import { l as OpenapiReturnType } from "../index-XaPb6unB.cjs";
|
|
2
|
+
import { n as paths } from "../schema-BUyMwQnM.cjs";
|
|
3
3
|
//#region src/clients/microsoftGraph/types.d.ts
|
|
4
4
|
type User = OpenapiReturnType<paths['/me']['get']>;
|
|
5
5
|
type Drive = OpenapiReturnType<paths['/me/drive']['get']>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as paths } from "../schema-
|
|
1
|
+
import { l as OpenapiReturnType } from "../index-r6YSe8B-.js";
|
|
2
|
+
import { n as paths } from "../schema-BUyMwQnM.js";
|
|
3
3
|
//#region src/clients/microsoftGraph/types.d.ts
|
|
4
4
|
type User = OpenapiReturnType<paths['/me']['get']>;
|
|
5
5
|
type Drive = OpenapiReturnType<paths['/me/drive']['get']>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as HttpStatus, p as ApiError, s as HttpHeader } from "./createFetchClient-
|
|
1
|
+
import { g as HttpStatus, p as ApiError, s as HttpHeader } from "./createFetchClient-CkHdS_IG.js";
|
|
2
2
|
//#region src/keboola/bearer/credentials/middleware.ts
|
|
3
3
|
const isUnauthorized = (error) => error instanceof ApiError && error.response.status === HttpStatus.UNAUTHORIZED;
|
|
4
4
|
/**
|
|
@@ -31,4 +31,4 @@ const createBearerAuthMiddleware = (credential) => {
|
|
|
31
31
|
//#endregion
|
|
32
32
|
export { isUnauthorized as n, createBearerAuthMiddleware as t };
|
|
33
33
|
|
|
34
|
-
//# sourceMappingURL=middleware-
|
|
34
|
+
//# sourceMappingURL=middleware-CWaLMlG1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware-
|
|
1
|
+
{"version":3,"file":"middleware-CWaLMlG1.js","names":[],"sources":["../src/keboola/bearer/credentials/middleware.ts"],"sourcesContent":["import { ApiError } from '../../../errors';\nimport { HttpHeader, type MiddlewareFn } from '../../../fetchClient';\nimport { HttpStatus } from '../../../internal';\n\nexport const isUnauthorized = (error: unknown): boolean =>\n error instanceof ApiError && error.response.status === HttpStatus.UNAUTHORIZED;\n\n/** What this middleware needs of a credential; whether it is dead is the credential's call. */\nexport type BearerCredential = {\n /** `null` while anonymous — nothing to stamp. */\n getAccessToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n};\n\n/**\n * Bearer auth: stamps the access token; on a 401, force-refreshes and replays once.\n *\n * - A replay that still 401s passes on, not as expiry: an unreachable project gets the same 401.\n * - Anonymous (`null` token): passes through untouched, so `login` / `refresh` work.\n * - A `forceRefresh` answering `null` stops the replay.\n */\nexport const createBearerAuthMiddleware = (credential: BearerCredential): MiddlewareFn => {\n return (next) => async (request) => {\n const token = await credential.getAccessToken({ forceRefresh: false });\n if (token === null) return next(request);\n\n // Cloned for the replay: the first attempt may consume the body.\n const retryRequest = request.request.clone();\n request.request.headers.set(HttpHeader.AUTHORIZATION, `Bearer ${token}`);\n\n try {\n return await next(request);\n } catch (error) {\n if (!isUnauthorized(error)) throw error;\n\n const refreshed = await credential.getAccessToken({ forceRefresh: true });\n // Went anonymous mid-flight — surface the original 401.\n if (refreshed === null) throw error;\n retryRequest.headers.set(HttpHeader.AUTHORIZATION, `Bearer ${refreshed}`);\n\n return await next({ ...request, request: retryRequest });\n }\n };\n};\n"],"mappings":";;AAIA,MAAa,kBAAkB,UAC7B,iBAAiB,YAAY,MAAM,SAAS,WAAW,WAAW;;;;;;;;AAepE,MAAa,8BAA8B,eAA+C;CACxF,QAAQ,SAAS,OAAO,YAAY;EAClC,MAAM,QAAQ,MAAM,WAAW,eAAe,EAAE,cAAc,MAAM,CAAC;EACrE,IAAI,UAAU,MAAM,OAAO,KAAK,OAAO;EAGvC,MAAM,eAAe,QAAQ,QAAQ,MAAM;EAC3C,QAAQ,QAAQ,QAAQ,IAAI,WAAW,eAAe,UAAU,OAAO;EAEvE,IAAI;GACF,OAAO,MAAM,KAAK,OAAO;EAC3B,SAAS,OAAO;GACd,IAAI,CAAC,eAAe,KAAK,GAAG,MAAM;GAElC,MAAM,YAAY,MAAM,WAAW,eAAe,EAAE,cAAc,KAAK,CAAC;GAExE,IAAI,cAAc,MAAM,MAAM;GAC9B,aAAa,QAAQ,IAAI,WAAW,eAAe,UAAU,WAAW;GAExE,OAAO,MAAM,KAAK;IAAE,GAAG;IAAS,SAAS;GAAa,CAAC;EACzD;CACF;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_createFetchClient = require("./createFetchClient-
|
|
1
|
+
const require_createFetchClient = require("./createFetchClient-lZ_93Yrb.cjs");
|
|
2
2
|
//#region src/keboola/bearer/credentials/middleware.ts
|
|
3
3
|
const isUnauthorized = (error) => error instanceof require_createFetchClient.ApiError && error.response.status === require_createFetchClient.HttpStatus.UNAUTHORIZED;
|
|
4
4
|
/**
|
|
@@ -42,4 +42,4 @@ Object.defineProperty(exports, "isUnauthorized", {
|
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
-
//# sourceMappingURL=middleware-
|
|
45
|
+
//# sourceMappingURL=middleware-DU_5pFDW.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware-
|
|
1
|
+
{"version":3,"file":"middleware-DU_5pFDW.cjs","names":["ApiError","HttpStatus","HttpHeader"],"sources":["../src/keboola/bearer/credentials/middleware.ts"],"sourcesContent":["import { ApiError } from '../../../errors';\nimport { HttpHeader, type MiddlewareFn } from '../../../fetchClient';\nimport { HttpStatus } from '../../../internal';\n\nexport const isUnauthorized = (error: unknown): boolean =>\n error instanceof ApiError && error.response.status === HttpStatus.UNAUTHORIZED;\n\n/** What this middleware needs of a credential; whether it is dead is the credential's call. */\nexport type BearerCredential = {\n /** `null` while anonymous — nothing to stamp. */\n getAccessToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n};\n\n/**\n * Bearer auth: stamps the access token; on a 401, force-refreshes and replays once.\n *\n * - A replay that still 401s passes on, not as expiry: an unreachable project gets the same 401.\n * - Anonymous (`null` token): passes through untouched, so `login` / `refresh` work.\n * - A `forceRefresh` answering `null` stops the replay.\n */\nexport const createBearerAuthMiddleware = (credential: BearerCredential): MiddlewareFn => {\n return (next) => async (request) => {\n const token = await credential.getAccessToken({ forceRefresh: false });\n if (token === null) return next(request);\n\n // Cloned for the replay: the first attempt may consume the body.\n const retryRequest = request.request.clone();\n request.request.headers.set(HttpHeader.AUTHORIZATION, `Bearer ${token}`);\n\n try {\n return await next(request);\n } catch (error) {\n if (!isUnauthorized(error)) throw error;\n\n const refreshed = await credential.getAccessToken({ forceRefresh: true });\n // Went anonymous mid-flight — surface the original 401.\n if (refreshed === null) throw error;\n retryRequest.headers.set(HttpHeader.AUTHORIZATION, `Bearer ${refreshed}`);\n\n return await next({ ...request, request: retryRequest });\n }\n };\n};\n"],"mappings":";;AAIA,MAAa,kBAAkB,UAC7B,iBAAiBA,0BAAAA,YAAY,MAAM,SAAS,WAAWC,0BAAAA,WAAW;;;;;;;;AAepE,MAAa,8BAA8B,eAA+C;CACxF,QAAQ,SAAS,OAAO,YAAY;EAClC,MAAM,QAAQ,MAAM,WAAW,eAAe,EAAE,cAAc,MAAM,CAAC;EACrE,IAAI,UAAU,MAAM,OAAO,KAAK,OAAO;EAGvC,MAAM,eAAe,QAAQ,QAAQ,MAAM;EAC3C,QAAQ,QAAQ,QAAQ,IAAIC,0BAAAA,WAAW,eAAe,UAAU,OAAO;EAEvE,IAAI;GACF,OAAO,MAAM,KAAK,OAAO;EAC3B,SAAS,OAAO;GACd,IAAI,CAAC,eAAe,KAAK,GAAG,MAAM;GAElC,MAAM,YAAY,MAAM,WAAW,eAAe,EAAE,cAAc,KAAK,CAAC;GAExE,IAAI,cAAc,MAAM,MAAM;GAC9B,aAAa,QAAQ,IAAIA,0BAAAA,WAAW,eAAe,UAAU,WAAW;GAExE,OAAO,MAAM,KAAK;IAAE,GAAG;IAAS,SAAS;GAAa,CAAC;EACzD;CACF;AACF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_concurrent = require("../concurrent-CdVfR1N5.cjs");
|
|
3
|
-
const require_createGenericFetchClient = require("../createGenericFetchClient-
|
|
4
|
-
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-
|
|
5
|
-
const require_auth = require("../auth-
|
|
3
|
+
const require_createGenericFetchClient = require("../createGenericFetchClient-MOx97wi-.cjs");
|
|
4
|
+
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-DHYo_k3t.cjs");
|
|
5
|
+
const require_auth = require("../auth-C8Pjl0Mu.cjs");
|
|
6
6
|
//#region src/clients/notifications/notificationsClient.ts
|
|
7
7
|
const createNotificationsClient = ({ baseUrl, middlewares, auth }) => {
|
|
8
8
|
const client = require_createOpenapiFetchClient.createOpenapiFetchClient({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
2
|
-
import { a as SubscriptionId, n as ListSubscriptionsQuery, s as components, t as CreateSubscriptionBody } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-OkQWmonU.cjs";
|
|
2
|
+
import { a as SubscriptionId, n as ListSubscriptionsQuery, s as components, t as CreateSubscriptionBody } from "../types-DBJ8c3hN.cjs";
|
|
3
3
|
//#region src/clients/notifications/notificationsClient.d.ts
|
|
4
4
|
declare const createNotificationsClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
5
5
|
healthCheck: (signal?: AbortSignal) => Promise<unknown>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
2
|
-
import { a as SubscriptionId, n as ListSubscriptionsQuery, s as components, t as CreateSubscriptionBody } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-Cw9UISvM.js";
|
|
2
|
+
import { a as SubscriptionId, n as ListSubscriptionsQuery, s as components, t as CreateSubscriptionBody } from "../types-DWJVbskE.js";
|
|
3
3
|
//#region src/clients/notifications/notificationsClient.d.ts
|
|
4
4
|
declare const createNotificationsClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
5
5
|
healthCheck: (signal?: AbortSignal) => Promise<unknown>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as concurrent } from "../concurrent-BacWxPwi.js";
|
|
2
|
-
import { t as createGenericFetchClient } from "../createGenericFetchClient-
|
|
3
|
-
import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-
|
|
4
|
-
import { t as createAuthHeaders } from "../auth-
|
|
2
|
+
import { t as createGenericFetchClient } from "../createGenericFetchClient-CQdNcPC3.js";
|
|
3
|
+
import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-DXiMv9WL.js";
|
|
4
|
+
import { t as createAuthHeaders } from "../auth-4coY1uwo.js";
|
|
5
5
|
//#region src/clients/notifications/notificationsClient.ts
|
|
6
6
|
const createNotificationsClient = ({ baseUrl, middlewares, auth }) => {
|
|
7
7
|
const client = createOpenapiFetchClient({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SubscriptionId, i as SubscriptionFilter, n as ListSubscriptionsQuery, o as SubscriptionRecipient, r as ProjectSubscription, t as CreateSubscriptionBody } from "../types-
|
|
1
|
+
import { a as SubscriptionId, i as SubscriptionFilter, n as ListSubscriptionsQuery, o as SubscriptionRecipient, r as ProjectSubscription, t as CreateSubscriptionBody } from "../types-DBJ8c3hN.cjs";
|
|
2
2
|
export { CreateSubscriptionBody, ListSubscriptionsQuery, ProjectSubscription, SubscriptionFilter, SubscriptionId, SubscriptionRecipient };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SubscriptionId, i as SubscriptionFilter, n as ListSubscriptionsQuery, o as SubscriptionRecipient, r as ProjectSubscription, t as CreateSubscriptionBody } from "../types-
|
|
1
|
+
import { a as SubscriptionId, i as SubscriptionFilter, n as ListSubscriptionsQuery, o as SubscriptionRecipient, r as ProjectSubscription, t as CreateSubscriptionBody } from "../types-DWJVbskE.js";
|
|
2
2
|
export { CreateSubscriptionBody, ListSubscriptionsQuery, ProjectSubscription, SubscriptionFilter, SubscriptionId, SubscriptionRecipient };
|
package/dist/oauth/index.cjs
CHANGED
package/dist/oauth/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
2
|
-
import { a as CredentialInput,
|
|
1
|
+
import { n as ClientInitOptions } from "../types-OkQWmonU.cjs";
|
|
2
|
+
import { a as CredentialInput, c as GetCredentialsInput, r as CreateCredentialInput } from "../types-4CjbcUdD.cjs";
|
|
3
3
|
//#region src/clients/oauth/oauthClient.d.ts
|
|
4
4
|
declare const createOauthClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
5
5
|
healthCheck: (signal?: AbortSignal) => Promise<unknown>;
|
|
@@ -46,6 +46,10 @@ declare const createOauthClient: ({ baseUrl, middlewares, auth }: ClientInitOpti
|
|
|
46
46
|
'#data': string;
|
|
47
47
|
}>;
|
|
48
48
|
deleteCredential: ({ componentId, id }: CredentialInput, signal?: AbortSignal) => Promise<void>;
|
|
49
|
+
getOrganizationConnections: (signal?: AbortSignal) => Promise<{
|
|
50
|
+
accountLogin: string;
|
|
51
|
+
host: string;
|
|
52
|
+
}[]>;
|
|
49
53
|
};
|
|
50
54
|
//#endregion
|
|
51
55
|
export { createOauthClient };
|
package/dist/oauth/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
2
|
-
import { a as CredentialInput,
|
|
1
|
+
import { n as ClientInitOptions } from "../types-Cw9UISvM.js";
|
|
2
|
+
import { a as CredentialInput, c as GetCredentialsInput, r as CreateCredentialInput } from "../types-B2ZLjagf.js";
|
|
3
3
|
//#region src/clients/oauth/oauthClient.d.ts
|
|
4
4
|
declare const createOauthClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
5
5
|
healthCheck: (signal?: AbortSignal) => Promise<unknown>;
|
|
@@ -46,6 +46,10 @@ declare const createOauthClient: ({ baseUrl, middlewares, auth }: ClientInitOpti
|
|
|
46
46
|
'#data': string;
|
|
47
47
|
}>;
|
|
48
48
|
deleteCredential: ({ componentId, id }: CredentialInput, signal?: AbortSignal) => Promise<void>;
|
|
49
|
+
getOrganizationConnections: (signal?: AbortSignal) => Promise<{
|
|
50
|
+
accountLogin: string;
|
|
51
|
+
host: string;
|
|
52
|
+
}[]>;
|
|
49
53
|
};
|
|
50
54
|
//#endregion
|
|
51
55
|
export { createOauthClient };
|
package/dist/oauth/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createOauthClient } from "../oauth-
|
|
1
|
+
import { t as createOauthClient } from "../oauth-GXmZ9agP.js";
|
|
2
2
|
export { createOauthClient };
|
package/dist/oauth/types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CredentialInput, i as Credential, n as CreateCredentialBody, o as CredentialPath, r as CreateCredentialInput, s as
|
|
2
|
-
export { ComponentPath, CreateCredentialBody, CreateCredentialInput, Credential, CredentialInput, CredentialPath, type GetCredentialsInput };
|
|
1
|
+
import { a as CredentialInput, c as GetCredentialsInput, i as Credential, n as CreateCredentialBody, o as CredentialPath, r as CreateCredentialInput, s as OrganizationConnection, t as ComponentPath } from "../types-4CjbcUdD.cjs";
|
|
2
|
+
export { ComponentPath, CreateCredentialBody, CreateCredentialInput, Credential, CredentialInput, CredentialPath, type GetCredentialsInput, OrganizationConnection };
|
package/dist/oauth/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CredentialInput, i as Credential, n as CreateCredentialBody, o as CredentialPath, r as CreateCredentialInput, s as
|
|
2
|
-
export { ComponentPath, CreateCredentialBody, CreateCredentialInput, Credential, CredentialInput, CredentialPath, type GetCredentialsInput };
|
|
1
|
+
import { a as CredentialInput, c as GetCredentialsInput, i as Credential, n as CreateCredentialBody, o as CredentialPath, r as CreateCredentialInput, s as OrganizationConnection, t as ComponentPath } from "../types-B2ZLjagf.js";
|
|
2
|
+
export { ComponentPath, CreateCredentialBody, CreateCredentialInput, Credential, CredentialInput, CredentialPath, type GetCredentialsInput, OrganizationConnection };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_createFetchClient = require("./createFetchClient-
|
|
2
|
-
const require_createGenericFetchClient = require("./createGenericFetchClient-
|
|
3
|
-
const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-
|
|
4
|
-
const require_auth = require("./auth-
|
|
1
|
+
const require_createFetchClient = require("./createFetchClient-lZ_93Yrb.cjs");
|
|
2
|
+
const require_createGenericFetchClient = require("./createGenericFetchClient-MOx97wi-.cjs");
|
|
3
|
+
const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-DHYo_k3t.cjs");
|
|
4
|
+
const require_auth = require("./auth-C8Pjl0Mu.cjs");
|
|
5
5
|
//#region src/clients/oauth/utils.ts
|
|
6
6
|
/**
|
|
7
7
|
* The credentials payload rides one of two fields, and only one of them is in the current spec:
|
|
@@ -65,6 +65,16 @@ const createOauthClient = ({ baseUrl, middlewares, auth }) => {
|
|
|
65
65
|
name: id
|
|
66
66
|
} }, { signal });
|
|
67
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* The GitHub connections of the project's organization; any project member's token may read them.
|
|
70
|
+
*
|
|
71
|
+
* - Empty when the organization has none.
|
|
72
|
+
* - A listed connection does not guarantee a repository: the App installation must cover it.
|
|
73
|
+
*/
|
|
74
|
+
const getOrganizationConnections = async (signal) => {
|
|
75
|
+
const { data } = await client.get("/organization-credentials/connections", {}, { signal });
|
|
76
|
+
return data.connections;
|
|
77
|
+
};
|
|
68
78
|
const healthCheck = async (signal) => {
|
|
69
79
|
const { data } = await genericClient.get("/health-check", {}, { signal });
|
|
70
80
|
return data;
|
|
@@ -74,7 +84,8 @@ const createOauthClient = ({ baseUrl, middlewares, auth }) => {
|
|
|
74
84
|
getCredentials,
|
|
75
85
|
getCredential,
|
|
76
86
|
createCredential,
|
|
77
|
-
deleteCredential
|
|
87
|
+
deleteCredential,
|
|
88
|
+
getOrganizationConnections
|
|
78
89
|
};
|
|
79
90
|
};
|
|
80
91
|
//#endregion
|
|
@@ -85,4 +96,4 @@ Object.defineProperty(exports, "createOauthClient", {
|
|
|
85
96
|
}
|
|
86
97
|
});
|
|
87
98
|
|
|
88
|
-
//# sourceMappingURL=oauth-
|
|
99
|
+
//# sourceMappingURL=oauth-DKZPuUlt.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-
|
|
1
|
+
{"version":3,"file":"oauth-DKZPuUlt.cjs","names":["createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient","isApiError","HttpStatus"],"sources":["../src/clients/oauth/utils.ts","../src/clients/oauth/oauthClient.ts"],"sourcesContent":["/**\n * Which credentials to list:\n *\n * - `all` — the whole project: branch-scoped and branchless alike.\n * - `branchless` — only what is tied to no branch at all, not even the default one.\n * - `branched` — only the branch whose id it carries.\n *\n * Discriminated on `scope`, not on `branchId` being present: a `string | 'all' | 'branchless'` union\n * collapses to `string`, so a mistyped scope would silently become a branch-id filter.\n */\nexport type GetCredentialsInput =\n | { scope: 'all'; componentId?: string }\n | { scope: 'branchless'; componentId?: string }\n | { scope: 'branched'; branchId: string; componentId?: string };\n\n/**\n * All three scopes ride the one `branchId` query parameter:\n *\n * - `all` → omitted, which the service reads as no filter.\n * - `branchless` → the literal string `'null'`, which it reads as `branchId IS NULL`.\n * - `branched` → the branch id itself.\n */\nexport type CredentialsDataFormat = 'encrypted' | 'plain';\n\n/**\n * The credentials payload rides one of two fields, and only one of them is in the current spec:\n *\n * - `encrypted` — `#data`, the payload serialized to a string. The `#` marks it for the service to\n * encrypt at rest.\n * - `plain` — `data`, the payload as an object. Only services predating the spec accept it.\n */\nexport const encodeCredentialsData = (\n data: Record<string, unknown>,\n format: CredentialsDataFormat,\n) => (format === 'encrypted' ? { '#data': JSON.stringify(data) } : { data });\n\nexport const getScopedBranchId = (scope: GetCredentialsInput) => {\n switch (scope.scope) {\n case 'all':\n return undefined;\n case 'branchless':\n return 'null';\n case 'branched':\n return scope.branchId;\n }\n};\n","import { createGenericFetchClient, createOpenapiFetchClient, isApiError } from '../../fetchClient';\nimport { HttpStatus } from '../../internal';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type { CreateCredentialInput, CredentialInput } from './types';\nimport type { CredentialsDataFormat, GetCredentialsInput } from './utils';\nimport { encodeCredentialsData, getScopedBranchId } from './utils';\n\nexport const createOauthClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const getCredentials = async (scope: GetCredentialsInput, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/credentials',\n { query: { branchId: getScopedBranchId(scope), componentId: scope.componentId } },\n { signal },\n );\n return data;\n };\n\n const getCredential = async ({ componentId, id }: CredentialInput, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/credentials/{componentId}/{name}',\n { path: { componentId, name: id } },\n { signal },\n );\n return data;\n };\n\n const createCredential = async (\n { componentId, data, ...rest }: CreateCredentialInput,\n signal?: AbortSignal,\n ) => {\n const post = (format: CredentialsDataFormat) =>\n client\n .post(\n '/credentials/{componentId}',\n {\n path: { componentId },\n // The plain shape predates the spec, so no schema can describe it. It borrows the\n // encrypted field's type to get past the generated body — the one assertion here.\n body: { ...rest, ...(encodeCredentialsData(data, format) as { '#data': string }) },\n },\n { signal },\n )\n .then((response) => response.data);\n\n try {\n return await post('plain');\n } catch (error) {\n if (isApiError(error) && error.response.status === HttpStatus.UNPROCESSABLE_ENTITY) {\n return post('encrypted');\n }\n throw error;\n }\n };\n\n const deleteCredential = async ({ componentId, id }: CredentialInput, signal?: AbortSignal) => {\n await client.delete(\n '/credentials/{componentId}/{name}',\n { path: { componentId, name: id } },\n { signal },\n );\n };\n\n /**\n * The GitHub connections of the project's organization; any project member's token may read them.\n *\n * - Empty when the organization has none.\n * - A listed connection does not guarantee a repository: the App installation must cover it.\n */\n const getOrganizationConnections = async (signal?: AbortSignal) => {\n const { data } = await client.get('/organization-credentials/connections', {}, { signal });\n return data.connections;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n getCredentials,\n getCredential,\n createCredential,\n deleteCredential,\n getOrganizationConnections,\n };\n};\n"],"mappings":";;;;;;;;;;;;AA+BA,MAAa,yBACX,MACA,WACI,WAAW,cAAc,EAAE,SAAS,KAAK,UAAU,IAAI,EAAE,IAAI,EAAE,KAAK;AAE1E,MAAa,qBAAqB,UAA+B;CAC/D,QAAQ,MAAM,OAAd;EACE,KAAK,OACH;EACF,KAAK,cACH,OAAO;EACT,KAAK,YACH,OAAO,MAAM;CACjB;AACF;;;ACnCA,MAAa,qBAAqB,EAAE,SAAS,aAAa,WAA8B;CACtF,MAAM,SAASA,iCAAAA,yBAAgC;EAC7C;EACA;EACA,SAASC,aAAAA,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgBC,iCAAAA,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,iBAAiB,OAAO,OAA4B,WAAyB;EACjF,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,gBACA,EAAE,OAAO;GAAE,UAAU,kBAAkB,KAAK;GAAG,aAAa,MAAM;EAAY,EAAE,GAChF,EAAE,OAAO,CACX;EACA,OAAO;CACT;CAEA,MAAM,gBAAgB,OAAO,EAAE,aAAa,MAAuB,WAAyB;EAC1F,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,qCACA,EAAE,MAAM;GAAE;GAAa,MAAM;EAAG,EAAE,GAClC,EAAE,OAAO,CACX;EACA,OAAO;CACT;CAEA,MAAM,mBAAmB,OACvB,EAAE,aAAa,MAAM,GAAG,QACxB,WACG;EACH,MAAM,QAAQ,WACZ,OACG,KACC,8BACA;GACE,MAAM,EAAE,YAAY;GAGpB,MAAM;IAAE,GAAG;IAAM,GAAI,sBAAsB,MAAM,MAAM;GAA0B;EACnF,GACA,EAAE,OAAO,CACX,CAAC,CACA,MAAM,aAAa,SAAS,IAAI;EAErC,IAAI;GACF,OAAO,MAAM,KAAK,OAAO;EAC3B,SAAS,OAAO;GACd,IAAIC,0BAAAA,WAAW,KAAK,KAAK,MAAM,SAAS,WAAWC,0BAAAA,WAAW,sBAC5D,OAAO,KAAK,WAAW;GAEzB,MAAM;EACR;CACF;CAEA,MAAM,mBAAmB,OAAO,EAAE,aAAa,MAAuB,WAAyB;EAC7F,MAAM,OAAO,OACX,qCACA,EAAE,MAAM;GAAE;GAAa,MAAM;EAAG,EAAE,GAClC,EAAE,OAAO,CACX;CACF;;;;;;;CAQA,MAAM,6BAA6B,OAAO,WAAyB;EACjE,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,yCAAyC,CAAC,GAAG,EAAE,OAAO,CAAC;EACzF,OAAO,KAAK;CACd;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as HttpStatus, r as isApiError } from "./createFetchClient-
|
|
2
|
-
import { t as createGenericFetchClient } from "./createGenericFetchClient-
|
|
3
|
-
import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-
|
|
4
|
-
import { t as createAuthHeaders } from "./auth-
|
|
1
|
+
import { g as HttpStatus, r as isApiError } from "./createFetchClient-CkHdS_IG.js";
|
|
2
|
+
import { t as createGenericFetchClient } from "./createGenericFetchClient-CQdNcPC3.js";
|
|
3
|
+
import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-DXiMv9WL.js";
|
|
4
|
+
import { t as createAuthHeaders } from "./auth-4coY1uwo.js";
|
|
5
5
|
//#region src/clients/oauth/utils.ts
|
|
6
6
|
/**
|
|
7
7
|
* The credentials payload rides one of two fields, and only one of them is in the current spec:
|
|
@@ -65,6 +65,16 @@ const createOauthClient = ({ baseUrl, middlewares, auth }) => {
|
|
|
65
65
|
name: id
|
|
66
66
|
} }, { signal });
|
|
67
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* The GitHub connections of the project's organization; any project member's token may read them.
|
|
70
|
+
*
|
|
71
|
+
* - Empty when the organization has none.
|
|
72
|
+
* - A listed connection does not guarantee a repository: the App installation must cover it.
|
|
73
|
+
*/
|
|
74
|
+
const getOrganizationConnections = async (signal) => {
|
|
75
|
+
const { data } = await client.get("/organization-credentials/connections", {}, { signal });
|
|
76
|
+
return data.connections;
|
|
77
|
+
};
|
|
68
78
|
const healthCheck = async (signal) => {
|
|
69
79
|
const { data } = await genericClient.get("/health-check", {}, { signal });
|
|
70
80
|
return data;
|
|
@@ -74,10 +84,11 @@ const createOauthClient = ({ baseUrl, middlewares, auth }) => {
|
|
|
74
84
|
getCredentials,
|
|
75
85
|
getCredential,
|
|
76
86
|
createCredential,
|
|
77
|
-
deleteCredential
|
|
87
|
+
deleteCredential,
|
|
88
|
+
getOrganizationConnections
|
|
78
89
|
};
|
|
79
90
|
};
|
|
80
91
|
//#endregion
|
|
81
92
|
export { createOauthClient as t };
|
|
82
93
|
|
|
83
|
-
//# sourceMappingURL=oauth-
|
|
94
|
+
//# sourceMappingURL=oauth-GXmZ9agP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-
|
|
1
|
+
{"version":3,"file":"oauth-GXmZ9agP.js","names":[],"sources":["../src/clients/oauth/utils.ts","../src/clients/oauth/oauthClient.ts"],"sourcesContent":["/**\n * Which credentials to list:\n *\n * - `all` — the whole project: branch-scoped and branchless alike.\n * - `branchless` — only what is tied to no branch at all, not even the default one.\n * - `branched` — only the branch whose id it carries.\n *\n * Discriminated on `scope`, not on `branchId` being present: a `string | 'all' | 'branchless'` union\n * collapses to `string`, so a mistyped scope would silently become a branch-id filter.\n */\nexport type GetCredentialsInput =\n | { scope: 'all'; componentId?: string }\n | { scope: 'branchless'; componentId?: string }\n | { scope: 'branched'; branchId: string; componentId?: string };\n\n/**\n * All three scopes ride the one `branchId` query parameter:\n *\n * - `all` → omitted, which the service reads as no filter.\n * - `branchless` → the literal string `'null'`, which it reads as `branchId IS NULL`.\n * - `branched` → the branch id itself.\n */\nexport type CredentialsDataFormat = 'encrypted' | 'plain';\n\n/**\n * The credentials payload rides one of two fields, and only one of them is in the current spec:\n *\n * - `encrypted` — `#data`, the payload serialized to a string. The `#` marks it for the service to\n * encrypt at rest.\n * - `plain` — `data`, the payload as an object. Only services predating the spec accept it.\n */\nexport const encodeCredentialsData = (\n data: Record<string, unknown>,\n format: CredentialsDataFormat,\n) => (format === 'encrypted' ? { '#data': JSON.stringify(data) } : { data });\n\nexport const getScopedBranchId = (scope: GetCredentialsInput) => {\n switch (scope.scope) {\n case 'all':\n return undefined;\n case 'branchless':\n return 'null';\n case 'branched':\n return scope.branchId;\n }\n};\n","import { createGenericFetchClient, createOpenapiFetchClient, isApiError } from '../../fetchClient';\nimport { HttpStatus } from '../../internal';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type { CreateCredentialInput, CredentialInput } from './types';\nimport type { CredentialsDataFormat, GetCredentialsInput } from './utils';\nimport { encodeCredentialsData, getScopedBranchId } from './utils';\n\nexport const createOauthClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const getCredentials = async (scope: GetCredentialsInput, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/credentials',\n { query: { branchId: getScopedBranchId(scope), componentId: scope.componentId } },\n { signal },\n );\n return data;\n };\n\n const getCredential = async ({ componentId, id }: CredentialInput, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/credentials/{componentId}/{name}',\n { path: { componentId, name: id } },\n { signal },\n );\n return data;\n };\n\n const createCredential = async (\n { componentId, data, ...rest }: CreateCredentialInput,\n signal?: AbortSignal,\n ) => {\n const post = (format: CredentialsDataFormat) =>\n client\n .post(\n '/credentials/{componentId}',\n {\n path: { componentId },\n // The plain shape predates the spec, so no schema can describe it. It borrows the\n // encrypted field's type to get past the generated body — the one assertion here.\n body: { ...rest, ...(encodeCredentialsData(data, format) as { '#data': string }) },\n },\n { signal },\n )\n .then((response) => response.data);\n\n try {\n return await post('plain');\n } catch (error) {\n if (isApiError(error) && error.response.status === HttpStatus.UNPROCESSABLE_ENTITY) {\n return post('encrypted');\n }\n throw error;\n }\n };\n\n const deleteCredential = async ({ componentId, id }: CredentialInput, signal?: AbortSignal) => {\n await client.delete(\n '/credentials/{componentId}/{name}',\n { path: { componentId, name: id } },\n { signal },\n );\n };\n\n /**\n * The GitHub connections of the project's organization; any project member's token may read them.\n *\n * - Empty when the organization has none.\n * - A listed connection does not guarantee a repository: the App installation must cover it.\n */\n const getOrganizationConnections = async (signal?: AbortSignal) => {\n const { data } = await client.get('/organization-credentials/connections', {}, { signal });\n return data.connections;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n getCredentials,\n getCredential,\n createCredential,\n deleteCredential,\n getOrganizationConnections,\n };\n};\n"],"mappings":";;;;;;;;;;;;AA+BA,MAAa,yBACX,MACA,WACI,WAAW,cAAc,EAAE,SAAS,KAAK,UAAU,IAAI,EAAE,IAAI,EAAE,KAAK;AAE1E,MAAa,qBAAqB,UAA+B;CAC/D,QAAQ,MAAM,OAAd;EACE,KAAK,OACH;EACF,KAAK,cACH,OAAO;EACT,KAAK,YACH,OAAO,MAAM;CACjB;AACF;;;ACnCA,MAAa,qBAAqB,EAAE,SAAS,aAAa,WAA8B;CACtF,MAAM,SAAS,yBAAgC;EAC7C;EACA;EACA,SAAS,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgB,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,iBAAiB,OAAO,OAA4B,WAAyB;EACjF,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,gBACA,EAAE,OAAO;GAAE,UAAU,kBAAkB,KAAK;GAAG,aAAa,MAAM;EAAY,EAAE,GAChF,EAAE,OAAO,CACX;EACA,OAAO;CACT;CAEA,MAAM,gBAAgB,OAAO,EAAE,aAAa,MAAuB,WAAyB;EAC1F,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,qCACA,EAAE,MAAM;GAAE;GAAa,MAAM;EAAG,EAAE,GAClC,EAAE,OAAO,CACX;EACA,OAAO;CACT;CAEA,MAAM,mBAAmB,OACvB,EAAE,aAAa,MAAM,GAAG,QACxB,WACG;EACH,MAAM,QAAQ,WACZ,OACG,KACC,8BACA;GACE,MAAM,EAAE,YAAY;GAGpB,MAAM;IAAE,GAAG;IAAM,GAAI,sBAAsB,MAAM,MAAM;GAA0B;EACnF,GACA,EAAE,OAAO,CACX,CAAC,CACA,MAAM,aAAa,SAAS,IAAI;EAErC,IAAI;GACF,OAAO,MAAM,KAAK,OAAO;EAC3B,SAAS,OAAO;GACd,IAAI,WAAW,KAAK,KAAK,MAAM,SAAS,WAAW,WAAW,sBAC5D,OAAO,KAAK,WAAW;GAEzB,MAAM;EACR;CACF;CAEA,MAAM,mBAAmB,OAAO,EAAE,aAAa,MAAuB,WAAyB;EAC7F,MAAM,OAAO,OACX,qCACA,EAAE,MAAM;GAAE;GAAa,MAAM;EAAG,EAAE,GAClC,EAAE,OAAO,CACX;CACF;;;;;;;CAQA,MAAM,6BAA6B,OAAO,WAAyB;EACjE,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,yCAAyC,CAAC,GAAG,EAAE,OAAO,CAAC;EACzF,OAAO,KAAK;CACd;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-
|
|
3
|
-
const require_auth = require("../auth-
|
|
2
|
+
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-DHYo_k3t.cjs");
|
|
3
|
+
const require_auth = require("../auth-C8Pjl0Mu.cjs");
|
|
4
4
|
//#region src/clients/omnisearch/omnisearchClient.ts
|
|
5
5
|
/**
|
|
6
6
|
* Omnisearch — data lineage.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
2
|
-
import { h as components, m as TablesLineageResponse, n as GetTablesLineageQuery, t as GetProjectsLineageQuery } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-OkQWmonU.cjs";
|
|
2
|
+
import { h as components, m as TablesLineageResponse, n as GetTablesLineageQuery, t as GetProjectsLineageQuery } from "../types-DPDq8C4q.cjs";
|
|
3
3
|
//#region src/clients/omnisearch/omnisearchClient.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Omnisearch — data lineage.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
2
|
-
import { h as components, m as TablesLineageResponse, n as GetTablesLineageQuery, t as GetProjectsLineageQuery } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-Cw9UISvM.js";
|
|
2
|
+
import { h as components, m as TablesLineageResponse, n as GetTablesLineageQuery, t as GetProjectsLineageQuery } from "../types-Dg8a7m7f.js";
|
|
3
3
|
//#region src/clients/omnisearch/omnisearchClient.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Omnisearch — data lineage.
|
package/dist/omnisearch/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-
|
|
2
|
-
import { t as createAuthHeaders } from "../auth-
|
|
1
|
+
import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-DXiMv9WL.js";
|
|
2
|
+
import { t as createAuthHeaders } from "../auth-4coY1uwo.js";
|
|
3
3
|
//#region src/clients/omnisearch/omnisearchClient.ts
|
|
4
4
|
/**
|
|
5
5
|
* Omnisearch — data lineage.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as LineageMetadata, c as LineageTable, d as ProjectsLineageResponse, f as TableLineageRelation, i as LineageConfiguration, l as ProjectLineageRelation, m as TablesLineageResponse, n as GetTablesLineageQuery, o as LineageProject, p as TablesLineage, r as LineageBucket, s as LineageSource, t as GetProjectsLineageQuery, u as ProjectsLineage } from "../types-
|
|
1
|
+
import { a as LineageMetadata, c as LineageTable, d as ProjectsLineageResponse, f as TableLineageRelation, i as LineageConfiguration, l as ProjectLineageRelation, m as TablesLineageResponse, n as GetTablesLineageQuery, o as LineageProject, p as TablesLineage, r as LineageBucket, s as LineageSource, t as GetProjectsLineageQuery, u as ProjectsLineage } from "../types-DPDq8C4q.cjs";
|
|
2
2
|
export { GetProjectsLineageQuery, GetTablesLineageQuery, LineageBucket, LineageConfiguration, LineageMetadata, LineageProject, LineageSource, LineageTable, ProjectLineageRelation, ProjectsLineage, ProjectsLineageResponse, TableLineageRelation, TablesLineage, TablesLineageResponse };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as LineageMetadata, c as LineageTable, d as ProjectsLineageResponse, f as TableLineageRelation, i as LineageConfiguration, l as ProjectLineageRelation, m as TablesLineageResponse, n as GetTablesLineageQuery, o as LineageProject, p as TablesLineage, r as LineageBucket, s as LineageSource, t as GetProjectsLineageQuery, u as ProjectsLineage } from "../types-
|
|
1
|
+
import { a as LineageMetadata, c as LineageTable, d as ProjectsLineageResponse, f as TableLineageRelation, i as LineageConfiguration, l as ProjectLineageRelation, m as TablesLineageResponse, n as GetTablesLineageQuery, o as LineageProject, p as TablesLineage, r as LineageBucket, s as LineageSource, t as GetProjectsLineageQuery, u as ProjectsLineage } from "../types-Dg8a7m7f.js";
|
|
2
2
|
export { GetProjectsLineageQuery, GetTablesLineageQuery, LineageBucket, LineageConfiguration, LineageMetadata, LineageProject, LineageSource, LineageTable, ProjectLineageRelation, ProjectsLineage, ProjectsLineageResponse, TableLineageRelation, TablesLineage, TablesLineageResponse };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Lr as paths, c as OpenapiQueryType, l as OpenapiReturnType, r as OpenapiBodyType, s as OpenapiPathType } from "./index-r6YSe8B-.js";
|
|
2
|
+
import "./adminRoles-CvdIUkiC.js";
|
|
3
|
+
import { t as Backend } from "./backends-DKBz5OxE.js";
|
|
4
|
+
//#region src/clients/storage/tokens/types.d.ts
|
|
5
|
+
type ProjectId = number;
|
|
6
|
+
type CreateTokenSchemaBody = OpenapiBodyType<paths['/v2/storage/tokens']['post']>;
|
|
7
|
+
type UpdateTokenSchemaBody = OpenapiBodyType<paths['/v2/storage/tokens/{id}']['put']>;
|
|
8
|
+
type TokenListItem = OpenapiReturnType<paths['/v2/storage/tokens']['get']>[number];
|
|
9
|
+
type GetTokenEventsPath = OpenapiPathType<paths['/v2/storage/tokens/{id}/events']['get']>;
|
|
10
|
+
type GetTokenEventsInput = GetTokenEventsPath & NonNullable<OpenapiQueryType<paths['/v2/storage/tokens/{id}/events']['get']>>;
|
|
11
|
+
/**
|
|
12
|
+
* The create payload with `token` required.
|
|
13
|
+
*
|
|
14
|
+
* - The spec shares the schema with update, where `token` is omitted; create always returns it.
|
|
15
|
+
*/
|
|
16
|
+
type CreateTokenResponse = Omit<OpenapiReturnType<paths['/v2/storage/tokens']['post']>, 'token'> & {
|
|
17
|
+
token: string;
|
|
18
|
+
};
|
|
19
|
+
/** The verify payload as the spec declares it — `StorageToken` is the corrected shape. */
|
|
20
|
+
type StorageTokenRaw = OpenapiReturnType<paths['/v2/storage/tokens/verify']['get']>;
|
|
21
|
+
/**
|
|
22
|
+
* `StorageTokenRaw` tightened to what an admin session always gets.
|
|
23
|
+
*
|
|
24
|
+
* - `admin` and `adminOwner` are optional in the spec (a token without an admin); every token the
|
|
25
|
+
* SDK verifies belongs to one, and `domain/permissions` narrows on `admin.role`.
|
|
26
|
+
* - `admin.role` stays the spec's enum and nullable: Connection stores memberships without a role.
|
|
27
|
+
* - `owner.assignedBackends` narrows to the backends the SDK knows; the spec types them `string`.
|
|
28
|
+
*/
|
|
29
|
+
type StorageToken = Omit<StorageTokenRaw, 'owner' | 'admin' | 'adminOwner'> & {
|
|
30
|
+
owner: Omit<StorageTokenRaw['owner'], 'assignedBackends'> & {
|
|
31
|
+
assignedBackends: Backend[];
|
|
32
|
+
};
|
|
33
|
+
admin: NonNullable<StorageTokenRaw['admin']>;
|
|
34
|
+
adminOwner: NonNullable<StorageTokenRaw['adminOwner']>;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* The create body with every field optional.
|
|
38
|
+
* - Connection defaults each boolean (`?? false`) and declares no `required` list; the generator
|
|
39
|
+
* marks a property with a `default` as required (`--default-non-nullable`), hence the `Partial`.
|
|
40
|
+
* - `canManageBuckets` only picks the full arm of the spec's union; the limited arm is a subset.
|
|
41
|
+
*/
|
|
42
|
+
type CreateTokenBody = Partial<Extract<CreateTokenSchemaBody, {
|
|
43
|
+
canManageBuckets: boolean;
|
|
44
|
+
}>>;
|
|
45
|
+
/** Update takes these five fields and ignores the rest (`allowExtraFields`); `canManageBuckets` is set at creation only. */
|
|
46
|
+
type UpdateTokenBody = UpdateTokenSchemaBody;
|
|
47
|
+
type UpdateTokenPath = OpenapiPathType<paths['/v2/storage/tokens/{id}']['put']>;
|
|
48
|
+
type UpdateTokenInput = UpdateTokenPath & UpdateTokenBody;
|
|
49
|
+
type ShareTokenBody = OpenapiBodyType<paths['/v2/storage/tokens/{id}/share']['post']>;
|
|
50
|
+
type ShareTokenPath = OpenapiPathType<paths['/v2/storage/tokens/{id}/share']['post']>;
|
|
51
|
+
type ShareTokenInput = ShareTokenPath & ShareTokenBody;
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/domain/project.d.ts
|
|
54
|
+
type Options = {
|
|
55
|
+
sapiToken: StorageToken;
|
|
56
|
+
};
|
|
57
|
+
declare const hasFeature: (token: StorageToken, ...feature: string[]) => boolean;
|
|
58
|
+
/**
|
|
59
|
+
* The admin's features as the Storage token carries them.
|
|
60
|
+
*
|
|
61
|
+
* - The same list `createAdminAccount` reads from the Manage token: Connection serialises both
|
|
62
|
+
* from the admin row, so prefer the account where one is at hand — it also knows `isSuperAdmin`.
|
|
63
|
+
*/
|
|
64
|
+
declare const hasAdminFeature: (token: StorageToken, ...feature: string[]) => boolean;
|
|
65
|
+
declare const createProject: ({ sapiToken }: Options) => {
|
|
66
|
+
hasFeature: (...feature: string[]) => boolean;
|
|
67
|
+
hasAdminFeature: (...feature: string[]) => boolean;
|
|
68
|
+
hasBackend: (backend: Backend) => boolean;
|
|
69
|
+
sapiToken: StorageToken;
|
|
70
|
+
};
|
|
71
|
+
type Project = ReturnType<typeof createProject>;
|
|
72
|
+
//#endregion
|
|
73
|
+
export { UpdateTokenInput as _, CreateTokenResponse as a, GetTokenEventsPath as c, ShareTokenInput as d, ShareTokenPath as f, UpdateTokenBody as g, TokenListItem as h, CreateTokenBody as i, ProjectId as l, StorageTokenRaw as m, hasAdminFeature as n, CreateTokenSchemaBody as o, StorageToken as p, hasFeature as r, GetTokenEventsInput as s, Project as t, ShareTokenBody as u, UpdateTokenPath as v, UpdateTokenSchemaBody as y };
|
|
74
|
+
//# sourceMappingURL=project-BMmfPhXg.d.ts.map
|
|
@@ -4,6 +4,12 @@ const hasFeature = (token, ...feature) => {
|
|
|
4
4
|
const projectFeatureSet = new Set(token.owner.features);
|
|
5
5
|
return feature.every((x) => projectFeatureSet.has(x));
|
|
6
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* The admin's features as the Storage token carries them.
|
|
9
|
+
*
|
|
10
|
+
* - The same list `createAdminAccount` reads from the Manage token: Connection serialises both
|
|
11
|
+
* from the admin row, so prefer the account where one is at hand — it also knows `isSuperAdmin`.
|
|
12
|
+
*/
|
|
7
13
|
const hasAdminFeature = (token, ...feature) => {
|
|
8
14
|
if (feature.length === 0) return false;
|
|
9
15
|
const adminFeatureSet = new Set(token.admin?.features ?? []);
|
|
@@ -36,4 +42,4 @@ const createProject = ({ sapiToken }) => {
|
|
|
36
42
|
//#endregion
|
|
37
43
|
export { hasAdminFeature as n, hasFeature as r, createProject as t };
|
|
38
44
|
|
|
39
|
-
//# sourceMappingURL=project-
|
|
45
|
+
//# sourceMappingURL=project-BXLFrWJ6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-BXLFrWJ6.js","names":[],"sources":["../src/domain/project.ts"],"sourcesContent":["import type { Backend, StorageToken } from '../clients/storage/tokens/types';\n\ntype Options = {\n sapiToken: StorageToken;\n};\n\nexport const hasFeature = (token: StorageToken, ...feature: string[]): boolean => {\n if (feature.length === 0) return false;\n const projectFeatureSet = new Set(token.owner.features);\n return feature.every((x) => projectFeatureSet.has(x));\n};\n\n/**\n * The admin's features as the Storage token carries them.\n *\n * - The same list `createAdminAccount` reads from the Manage token: Connection serialises both\n * from the admin row, so prefer the account where one is at hand — it also knows `isSuperAdmin`.\n */\nexport const hasAdminFeature = (token: StorageToken, ...feature: string[]): boolean => {\n if (feature.length === 0) return false;\n const adminFeatureSet = new Set(token.admin?.features ?? []);\n return feature.every((x) => adminFeatureSet.has(x));\n};\n\nexport const createProject = ({ sapiToken }: Options) => {\n const { owner, admin } = sapiToken;\n const projectFeatureSet = new Set(owner.features);\n // `verify` omits `admin` for a token created via `POST /v2/storage/tokens`, even though the type\n // declares it: an admin-less token holds no admin features, rather than failing to build at all.\n const adminFeatureSet = new Set(admin?.features ?? []);\n\n const hasFeature = (...feature: string[]) => {\n if (feature.length === 0) return false;\n return feature.every((x) => projectFeatureSet.has(x));\n };\n\n // Same list as `createAdminAccount`'s; prefer the account where one is at hand.\n const hasAdminFeature = (...feature: string[]) => {\n if (feature.length === 0) return false;\n return feature.every((x) => adminFeatureSet.has(x));\n };\n\n const hasBackend = (backend: Backend): boolean => {\n if (backend === 'bigquery') return owner.hasBigquery;\n if (backend === 'snowflake') return owner.hasSnowflake;\n return false;\n };\n\n return {\n hasFeature,\n hasAdminFeature,\n hasBackend,\n sapiToken,\n };\n};\n\nexport type Project = ReturnType<typeof createProject>;\n"],"mappings":";AAMA,MAAa,cAAc,OAAqB,GAAG,YAA+B;CAChF,IAAI,QAAQ,WAAW,GAAG,OAAO;CACjC,MAAM,oBAAoB,IAAI,IAAI,MAAM,MAAM,QAAQ;CACtD,OAAO,QAAQ,OAAO,MAAM,kBAAkB,IAAI,CAAC,CAAC;AACtD;;;;;;;AAQA,MAAa,mBAAmB,OAAqB,GAAG,YAA+B;CACrF,IAAI,QAAQ,WAAW,GAAG,OAAO;CACjC,MAAM,kBAAkB,IAAI,IAAI,MAAM,OAAO,YAAY,CAAC,CAAC;CAC3D,OAAO,QAAQ,OAAO,MAAM,gBAAgB,IAAI,CAAC,CAAC;AACpD;AAEA,MAAa,iBAAiB,EAAE,gBAAyB;CACvD,MAAM,EAAE,OAAO,UAAU;CACzB,MAAM,oBAAoB,IAAI,IAAI,MAAM,QAAQ;CAGhD,MAAM,kBAAkB,IAAI,IAAI,OAAO,YAAY,CAAC,CAAC;CAErD,MAAM,cAAc,GAAG,YAAsB;EAC3C,IAAI,QAAQ,WAAW,GAAG,OAAO;EACjC,OAAO,QAAQ,OAAO,MAAM,kBAAkB,IAAI,CAAC,CAAC;CACtD;CAGA,MAAM,mBAAmB,GAAG,YAAsB;EAChD,IAAI,QAAQ,WAAW,GAAG,OAAO;EACjC,OAAO,QAAQ,OAAO,MAAM,gBAAgB,IAAI,CAAC,CAAC;CACpD;CAEA,MAAM,cAAc,YAA8B;EAChD,IAAI,YAAY,YAAY,OAAO,MAAM;EACzC,IAAI,YAAY,aAAa,OAAO,MAAM;EAC1C,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -4,6 +4,12 @@ const hasFeature = (token, ...feature) => {
|
|
|
4
4
|
const projectFeatureSet = new Set(token.owner.features);
|
|
5
5
|
return feature.every((x) => projectFeatureSet.has(x));
|
|
6
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* The admin's features as the Storage token carries them.
|
|
9
|
+
*
|
|
10
|
+
* - The same list `createAdminAccount` reads from the Manage token: Connection serialises both
|
|
11
|
+
* from the admin row, so prefer the account where one is at hand — it also knows `isSuperAdmin`.
|
|
12
|
+
*/
|
|
7
13
|
const hasAdminFeature = (token, ...feature) => {
|
|
8
14
|
if (feature.length === 0) return false;
|
|
9
15
|
const adminFeatureSet = new Set(token.admin?.features ?? []);
|
|
@@ -53,4 +59,4 @@ Object.defineProperty(exports, "hasFeature", {
|
|
|
53
59
|
}
|
|
54
60
|
});
|
|
55
61
|
|
|
56
|
-
//# sourceMappingURL=project-
|
|
62
|
+
//# sourceMappingURL=project-CpgplgCr.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-CpgplgCr.cjs","names":[],"sources":["../src/domain/project.ts"],"sourcesContent":["import type { Backend, StorageToken } from '../clients/storage/tokens/types';\n\ntype Options = {\n sapiToken: StorageToken;\n};\n\nexport const hasFeature = (token: StorageToken, ...feature: string[]): boolean => {\n if (feature.length === 0) return false;\n const projectFeatureSet = new Set(token.owner.features);\n return feature.every((x) => projectFeatureSet.has(x));\n};\n\n/**\n * The admin's features as the Storage token carries them.\n *\n * - The same list `createAdminAccount` reads from the Manage token: Connection serialises both\n * from the admin row, so prefer the account where one is at hand — it also knows `isSuperAdmin`.\n */\nexport const hasAdminFeature = (token: StorageToken, ...feature: string[]): boolean => {\n if (feature.length === 0) return false;\n const adminFeatureSet = new Set(token.admin?.features ?? []);\n return feature.every((x) => adminFeatureSet.has(x));\n};\n\nexport const createProject = ({ sapiToken }: Options) => {\n const { owner, admin } = sapiToken;\n const projectFeatureSet = new Set(owner.features);\n // `verify` omits `admin` for a token created via `POST /v2/storage/tokens`, even though the type\n // declares it: an admin-less token holds no admin features, rather than failing to build at all.\n const adminFeatureSet = new Set(admin?.features ?? []);\n\n const hasFeature = (...feature: string[]) => {\n if (feature.length === 0) return false;\n return feature.every((x) => projectFeatureSet.has(x));\n };\n\n // Same list as `createAdminAccount`'s; prefer the account where one is at hand.\n const hasAdminFeature = (...feature: string[]) => {\n if (feature.length === 0) return false;\n return feature.every((x) => adminFeatureSet.has(x));\n };\n\n const hasBackend = (backend: Backend): boolean => {\n if (backend === 'bigquery') return owner.hasBigquery;\n if (backend === 'snowflake') return owner.hasSnowflake;\n return false;\n };\n\n return {\n hasFeature,\n hasAdminFeature,\n hasBackend,\n sapiToken,\n };\n};\n\nexport type Project = ReturnType<typeof createProject>;\n"],"mappings":";AAMA,MAAa,cAAc,OAAqB,GAAG,YAA+B;CAChF,IAAI,QAAQ,WAAW,GAAG,OAAO;CACjC,MAAM,oBAAoB,IAAI,IAAI,MAAM,MAAM,QAAQ;CACtD,OAAO,QAAQ,OAAO,MAAM,kBAAkB,IAAI,CAAC,CAAC;AACtD;;;;;;;AAQA,MAAa,mBAAmB,OAAqB,GAAG,YAA+B;CACrF,IAAI,QAAQ,WAAW,GAAG,OAAO;CACjC,MAAM,kBAAkB,IAAI,IAAI,MAAM,OAAO,YAAY,CAAC,CAAC;CAC3D,OAAO,QAAQ,OAAO,MAAM,gBAAgB,IAAI,CAAC,CAAC;AACpD;AAEA,MAAa,iBAAiB,EAAE,gBAAyB;CACvD,MAAM,EAAE,OAAO,UAAU;CACzB,MAAM,oBAAoB,IAAI,IAAI,MAAM,QAAQ;CAGhD,MAAM,kBAAkB,IAAI,IAAI,OAAO,YAAY,CAAC,CAAC;CAErD,MAAM,cAAc,GAAG,YAAsB;EAC3C,IAAI,QAAQ,WAAW,GAAG,OAAO;EACjC,OAAO,QAAQ,OAAO,MAAM,kBAAkB,IAAI,CAAC,CAAC;CACtD;CAGA,MAAM,mBAAmB,GAAG,YAAsB;EAChD,IAAI,QAAQ,WAAW,GAAG,OAAO;EACjC,OAAO,QAAQ,OAAO,MAAM,gBAAgB,IAAI,CAAC,CAAC;CACpD;CAEA,MAAM,cAAc,YAA8B;EAChD,IAAI,YAAY,YAAY,OAAO,MAAM;EACzC,IAAI,YAAY,aAAa,OAAO,MAAM;EAC1C,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;CACF;AACF"}
|