@keboola/api-client 31.0.0 → 32.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 +11 -5
- package/API-SURFACE.md +1 -1
- package/CHANGELOG.md +105 -0
- package/README.md +45 -19
- package/dist/{ManagementClientAuthError-DFhi5yxe.cjs → ManagementClientAuthError-B-tyPlyG.cjs} +2 -2
- package/dist/{ManagementClientAuthError-DFhi5yxe.cjs.map → ManagementClientAuthError-B-tyPlyG.cjs.map} +1 -1
- package/dist/{ManagementClientAuthError-90pvsej0.js → ManagementClientAuthError-BAFNvOdf.js} +2 -2
- package/dist/{ManagementClientAuthError-90pvsej0.js.map → ManagementClientAuthError-BAFNvOdf.js.map} +1 -1
- 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-hQdKt_8J.d.cts → appLogs-BAaaGYKg.d.cts} +2 -2
- package/dist/{appLogs-CLHhkQJn.js → appLogs-DTLE6HTy.js} +2 -2
- package/dist/{appLogs-CLHhkQJn.js.map → appLogs-DTLE6HTy.js.map} +1 -1
- package/dist/{appLogs-BdMG6Cvn.d.ts → appLogs-DX_WTBCa.d.ts} +2 -2
- package/dist/{appLogs-BCCi02w6.cjs → appLogs-NIEDTDHf.cjs} +2 -2
- package/dist/{appLogs-BCCi02w6.cjs.map → appLogs-NIEDTDHf.cjs.map} +1 -1
- 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 +1 -1
- package/dist/auth/types.d.ts +1 -1
- package/dist/{auth-DmgTH0uY.cjs → auth-DP-6TFiM.cjs} +2 -2
- package/dist/{auth-DmgTH0uY.cjs.map → auth-DP-6TFiM.cjs.map} +1 -1
- package/dist/{auth-CE6Hlc9W.js → auth-DtbQaeDj.js} +2 -2
- package/dist/{auth-CE6Hlc9W.js.map → auth-DtbQaeDj.js.map} +1 -1
- package/dist/{authClient-XBAUz9g-.js → authClient--BtZgjIc.js} +5 -5
- package/dist/{authClient-XBAUz9g-.js.map → authClient--BtZgjIc.js.map} +1 -1
- package/dist/{authClient-Bc_bDisO.d.ts → authClient-CtfyVHRD.d.ts} +4 -4
- package/dist/{authClient-BL6h78Q1.d.cts → authClient-DhfzOUaa.d.cts} +4 -4
- package/dist/{authClient-Cixa8_L1.cjs → authClient-b7uec7sw.cjs} +5 -5
- package/dist/{authClient-Cixa8_L1.cjs.map → authClient-b7uec7sw.cjs.map} +1 -1
- package/dist/chat/index.cjs +3 -3
- package/dist/chat/index.d.cts +2 -7
- package/dist/chat/index.d.ts +2 -7
- 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/{configurations-CujCwDcB.cjs → configurations-Ck-mNB_E.cjs} +2 -2
- package/dist/{configurations-CujCwDcB.cjs.map → configurations-Ck-mNB_E.cjs.map} +1 -1
- package/dist/{configurations-DCOJONZZ.cjs → configurations-CqwAxiQL.cjs} +5 -1
- package/dist/configurations-CqwAxiQL.cjs.map +1 -0
- package/dist/{configurations-Byt59bIa.js → configurations-ZwBXilW-.js} +2 -2
- package/dist/{configurations-Byt59bIa.js.map → configurations-ZwBXilW-.js.map} +1 -1
- package/dist/{configurations-iCbhe0tb.js → configurations-d7SZmw69.js} +5 -1
- package/dist/configurations-d7SZmw69.js.map +1 -0
- package/dist/constants/index.cjs +2 -1
- package/dist/constants/index.d.cts +3 -2
- package/dist/constants/index.d.ts +3 -2
- package/dist/constants/index.js +2 -2
- package/dist/{constants-qeWGfk_7.js → constants-ByEwVtGf.js} +38 -2
- package/dist/constants-ByEwVtGf.js.map +1 -0
- package/dist/{constants-CkAVvuUq.cjs → constants-lIfSdTzS.cjs} +43 -1
- package/dist/constants-lIfSdTzS.cjs.map +1 -0
- package/dist/{createFetchClient-B9Cv0W9f.cjs → createFetchClient-BRfTjBLV.cjs} +15 -10
- package/dist/createFetchClient-BRfTjBLV.cjs.map +1 -0
- package/dist/{createFetchClient-B1h3-p65.js → createFetchClient-BbG46bL0.js} +15 -10
- package/dist/createFetchClient-BbG46bL0.js.map +1 -0
- package/dist/{createGenericFetchClient-DhpvUSlX.js → createGenericFetchClient-BHYQLZhe.js} +2 -2
- package/dist/{createGenericFetchClient-DhpvUSlX.js.map → createGenericFetchClient-BHYQLZhe.js.map} +1 -1
- package/dist/{createGenericFetchClient-BWoSkTki.cjs → createGenericFetchClient-DHs-i7_O.cjs} +2 -2
- package/dist/{createGenericFetchClient-BWoSkTki.cjs.map → createGenericFetchClient-DHs-i7_O.cjs.map} +1 -1
- package/dist/{createOpenapiFetchClient-0_oqhdPv.js → createOpenapiFetchClient-Bn6_Pn0H.js} +2 -2
- package/dist/{createOpenapiFetchClient-0_oqhdPv.js.map → createOpenapiFetchClient-Bn6_Pn0H.js.map} +1 -1
- package/dist/{createOpenapiFetchClient-yirrW6Tg.cjs → createOpenapiFetchClient-CyDUFxHB.cjs} +2 -2
- package/dist/{createOpenapiFetchClient-yirrW6Tg.cjs.map → createOpenapiFetchClient-CyDUFxHB.cjs.map} +1 -1
- package/dist/{credential-D-tX9gP4.cjs → credential-DOXH7XRS.cjs} +2 -2
- package/dist/{credential-D-tX9gP4.cjs.map → credential-DOXH7XRS.cjs.map} +1 -1
- package/dist/{credential-dKxArMic.js → credential-d2RDcXRB.js} +2 -2
- package/dist/{credential-dKxArMic.js.map → credential-d2RDcXRB.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-jdbSSPYF.js → dataScience-Sm8iONhP.js} +5 -5
- package/dist/{dataScience-jdbSSPYF.js.map → dataScience-Sm8iONhP.js.map} +1 -1
- package/dist/{dataScience-BqNWX-Gr.cjs → dataScience-wexHEIue.cjs} +5 -5
- package/dist/{dataScience-BqNWX-Gr.cjs.map → dataScience-wexHEIue.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-B7lNR5q0.cjs → developerPortalClient-CgTSzLoG.cjs} +3 -3
- package/dist/{developerPortalClient-B7lNR5q0.cjs.map → developerPortalClient-CgTSzLoG.cjs.map} +1 -1
- package/dist/{developerPortalClient-5ABcxz1U.js → developerPortalClient-DywKpDlW.js} +3 -3
- package/dist/{developerPortalClient-5ABcxz1U.js.map → developerPortalClient-DywKpDlW.js.map} +1 -1
- package/dist/domain/permissions/index.cjs +63 -1
- package/dist/domain/permissions/index.cjs.map +1 -0
- package/dist/domain/permissions/index.d.cts +52 -3
- package/dist/domain/permissions/index.d.ts +52 -3
- package/dist/domain/permissions/index.js +59 -2
- package/dist/domain/permissions/index.js.map +1 -0
- 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-CXHppAxd.cjs → import-C0-y1GQK.cjs} +3 -3
- package/dist/{import-CXHppAxd.cjs.map → import-C0-y1GQK.cjs.map} +1 -1
- package/dist/{import-CExRbskw.js → import-SQuurg1G.js} +3 -3
- package/dist/{import-CExRbskw.js.map → import-SQuurg1G.js.map} +1 -1
- package/dist/{index-BfVv8isU.d.cts → index-BKh0prif.d.cts} +4 -4
- package/dist/{index-CMb0ygwb.d.ts → index-Bc_hXWae.d.ts} +3 -3
- package/dist/{index-7RvXnXmd.d.ts → index-Bg1P6Bb2.d.ts} +6 -6
- package/dist/{index-cu8THqZV.d.cts → index-Bjk-tCpG.d.cts} +547 -3073
- package/dist/{index-CwJE18PJ.d.cts → index-C7e3wBt9.d.cts} +3 -3
- package/dist/{index-B-frWtGW.d.cts → index-CQrKS7PV.d.cts} +5 -2
- package/dist/{index-CR9LsDaG.d.cts → index-CXtdQ7be.d.cts} +4 -4
- package/dist/{index-Ds8e0l7-.d.ts → index-CeJOmN-P.d.ts} +5 -2
- package/dist/{index-DeMDxHTz.d.ts → index-Ctqkm3Fx.d.ts} +4 -4
- package/dist/{index-B6q7HxKJ.d.cts → index-D_7yCRKy.d.cts} +4 -4
- package/dist/{index-J1I2HlSm.d.ts → index-Dbzjvy5h.d.ts} +5 -5
- package/dist/{index-NicJZIzu.d.ts → index-DeKPpYQy.d.ts} +3 -3
- package/dist/{index-C9mAoXF6.d.cts → index-DiHHyMEo.d.cts} +6 -6
- package/dist/{index-BSjfVDTr.d.cts → index-DqOAjqxN.d.cts} +5 -5
- package/dist/{index-BR2Fu-Wo.d.ts → index-FhKX7Cv1.d.ts} +547 -3073
- package/dist/{index-Daks5CeX.d.ts → index-GDdFZCXp.d.ts} +4 -4
- package/dist/{index-Cpjh05sx.d.cts → index-Gn1H63Hk.d.cts} +4 -4
- package/dist/{index--pxLseaw.d.cts → index-NaYLwG_h.d.cts} +143 -2
- package/dist/{index--pxLseaw.d.ts → index-NaYLwG_h.d.ts} +143 -2
- package/dist/{index-D_TnbEtp.d.cts → index-eAlN694c.d.cts} +3 -3
- package/dist/{index-CW4VC9oN.d.ts → index-fHfc_VqS.d.ts} +4 -4
- package/dist/{index-CYMAwD3E.d.ts → index-tKsiUarj.d.ts} +4 -4
- package/dist/index.cjs +44 -232
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +43 -232
- package/dist/index.js.map +1 -1
- package/dist/kaiAgent/index.cjs +3 -0
- package/dist/kaiAgent/index.d.cts +210 -0
- package/dist/kaiAgent/index.d.ts +210 -0
- package/dist/kaiAgent/index.js +2 -0
- package/dist/kaiAgent/types.cjs +0 -0
- package/dist/kaiAgent/types.d.cts +2 -0
- package/dist/kaiAgent/types.d.ts +2 -0
- package/dist/kaiAgent/types.js +1 -0
- package/dist/kaiAgent-4OiIK1C2.cjs +222 -0
- package/dist/kaiAgent-4OiIK1C2.cjs.map +1 -0
- package/dist/kaiAgent-HDaFS9BR.js +217 -0
- package/dist/kaiAgent-HDaFS9BR.js.map +1 -0
- package/dist/management/index.cjs +1 -1
- package/dist/management/index.d.cts +1 -1
- package/dist/management/index.d.ts +1 -1
- package/dist/management/index.js +1 -1
- package/dist/management/types.d.cts +1 -1
- package/dist/management/types.d.ts +1 -1
- package/dist/{management-Cc8mKfnf.js → management-CIFhu1Nm.js} +5 -5
- package/dist/{management-Cc8mKfnf.js.map → management-CIFhu1Nm.js.map} +1 -1
- package/dist/{management-DlVdxzPw.cjs → management-DfjwQo7z.cjs} +5 -5
- package/dist/{management-DlVdxzPw.cjs.map → management-DfjwQo7z.cjs.map} +1 -1
- 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-CNf1412Z.js → metastore-CrXkKufo.js} +4 -4
- package/dist/{metastore-CNf1412Z.js.map → metastore-CrXkKufo.js.map} +1 -1
- package/dist/{metastore-DbsxqjhS.cjs → metastore-Dq2NS6jb.cjs} +4 -4
- package/dist/{metastore-DbsxqjhS.cjs.map → metastore-Dq2NS6jb.cjs.map} +1 -1
- package/dist/microsoftGraph/index.cjs +92 -0
- package/dist/microsoftGraph/index.cjs.map +1 -0
- package/dist/microsoftGraph/index.d.cts +305 -0
- package/dist/microsoftGraph/index.d.ts +305 -0
- package/dist/microsoftGraph/index.js +90 -0
- package/dist/microsoftGraph/index.js.map +1 -0
- package/dist/microsoftGraph/types.cjs +0 -0
- package/dist/microsoftGraph/types.d.cts +10 -0
- package/dist/microsoftGraph/types.d.ts +10 -0
- package/dist/microsoftGraph/types.js +1 -0
- package/dist/notifications/index.cjs +3 -3
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/index.js +3 -3
- package/dist/notifications/types.d.cts +1 -1
- package/dist/notifications/types.d.ts +1 -1
- package/dist/oauth/index.cjs +1 -1
- package/dist/oauth/index.d.cts +2 -2
- package/dist/oauth/index.d.ts +2 -2
- package/dist/oauth/index.js +1 -1
- package/dist/oauth/types.d.cts +1 -1
- package/dist/oauth/types.d.ts +1 -1
- package/dist/{oauth-ClksaYRY.js → oauth-CFwSNz37.js} +5 -5
- package/dist/{oauth-ClksaYRY.js.map → oauth-CFwSNz37.js.map} +1 -1
- package/dist/{oauth-DsZgmtPj.cjs → oauth-CkW5gln-.cjs} +5 -5
- package/dist/{oauth-DsZgmtPj.cjs.map → oauth-CkW5gln-.cjs.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-5SLw86eZ.d.ts → project-BOGaVs-q.d.ts} +2 -2
- package/dist/{project-CRrsxSAK.d.cts → project-BnQkL8cb.d.cts} +2 -2
- 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 +1 -1
- package/dist/queryService/types.d.ts +1 -1
- package/dist/{queryService-DxUUkTcy.cjs → queryService-BLaGbpm-.cjs} +5 -5
- package/dist/{queryService-DxUUkTcy.cjs.map → queryService-BLaGbpm-.cjs.map} +1 -1
- package/dist/{queryService-BlyAcBxP.js → queryService-DK-jUnET.js} +5 -5
- package/dist/{queryService-BlyAcBxP.js.map → queryService-DK-jUnET.js.map} +1 -1
- package/dist/queue/index.cjs +1 -1
- package/dist/queue/index.d.cts +3 -3
- package/dist/queue/index.d.ts +3 -3
- package/dist/queue/index.js +1 -1
- package/dist/queue/types.d.cts +1 -1
- package/dist/queue/types.d.ts +1 -1
- package/dist/{queue-CpcqeMPz.cjs → queue-B7TY4JLf.cjs} +4 -4
- package/dist/{queue-CpcqeMPz.cjs.map → queue-B7TY4JLf.cjs.map} +1 -1
- package/dist/{queue-DpZTm7U7.js → queue-DViSQ-eq.js} +4 -4
- package/dist/{queue-DpZTm7U7.js.map → queue-DViSQ-eq.js.map} +1 -1
- 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-D1oxyn1O.d.cts +8760 -0
- package/dist/schema-D1oxyn1O.d.ts +8760 -0
- package/dist/sdk/configurations/index.cjs +1 -1
- package/dist/sdk/configurations/index.d.cts +4 -4
- package/dist/sdk/configurations/index.d.ts +4 -4
- package/dist/sdk/configurations/index.js +1 -1
- package/dist/sdk/developerPortal/index.cjs +3 -3
- package/dist/sdk/developerPortal/index.d.cts +3 -3
- package/dist/sdk/developerPortal/index.d.ts +3 -3
- package/dist/sdk/developerPortal/index.js +3 -3
- package/dist/sdk/queryService/index.d.cts +1 -1
- package/dist/sdk/queryService/index.d.ts +1 -1
- package/dist/sdk/semanticLayer/index.d.cts +1 -1
- package/dist/sdk/semanticLayer/index.d.ts +1 -1
- package/dist/sdk/semanticLayer/types.d.cts +1 -1
- package/dist/sdk/semanticLayer/types.d.ts +1 -1
- package/dist/sdk/storage/index.d.cts +1 -1
- package/dist/sdk/storage/index.d.ts +1 -1
- package/dist/sdk/tag/index.d.cts +2 -2
- package/dist/sdk/tag/index.d.ts +2 -2
- package/dist/sdk/tag/types.d.cts +1 -1
- package/dist/sdk/tag/types.d.ts +1 -1
- package/dist/sdk/vault/index.d.cts +1 -1
- package/dist/sdk/vault/index.d.ts +1 -1
- package/dist/serviceIds-fHLDwOg9.d.cts +31 -0
- package/dist/serviceIds-fHLDwOg9.d.ts +31 -0
- package/dist/status/index.cjs +1 -1
- package/dist/status/index.d.cts +1 -1
- package/dist/status/index.d.ts +1 -1
- package/dist/status/index.js +1 -1
- package/dist/storage/index.cjs +4 -4
- package/dist/storage/index.d.cts +2 -2
- package/dist/storage/index.d.ts +2 -2
- package/dist/storage/index.js +4 -4
- package/dist/storage/types.d.cts +4 -3
- package/dist/storage/types.d.ts +4 -3
- package/dist/{storage-vnH64B_Q.cjs → storage-CihHwZ7z.cjs} +149 -160
- package/dist/storage-CihHwZ7z.cjs.map +1 -0
- package/dist/{storage-CQxu0EY3.js → storage-kgxscFEg.js} +149 -160
- package/dist/storage-kgxscFEg.js.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 +1 -1
- package/dist/syncActions/index.d.ts +1 -1
- 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-AgFiMjRS.js → syncActions-B75t0NwP.js} +5 -5
- package/dist/{syncActions-AgFiMjRS.js.map → syncActions-B75t0NwP.js.map} +1 -1
- package/dist/{syncActions-DPcAPYgJ.cjs → syncActions-CevF_TEb.cjs} +5 -5
- package/dist/{syncActions-DPcAPYgJ.cjs.map → syncActions-CevF_TEb.cjs.map} +1 -1
- package/dist/telemetry/index.cjs +1 -1
- package/dist/telemetry/index.d.cts +2 -2
- package/dist/telemetry/index.d.ts +2 -2
- package/dist/telemetry/index.js +1 -1
- package/dist/{telemetry-BLgaYEvi.cjs → telemetry-DwlSLVAU.cjs} +3 -3
- package/dist/{telemetry-BLgaYEvi.cjs.map → telemetry-DwlSLVAU.cjs.map} +1 -1
- package/dist/{telemetry-CPiGWpLi.js → telemetry-FXpodtJN.js} +3 -3
- package/dist/{telemetry-CPiGWpLi.js.map → telemetry-FXpodtJN.js.map} +1 -1
- package/dist/{types-DQOOWgLt.d.cts → types-Av2egS_l.d.ts} +408 -24
- package/dist/{types-ca-YNg1r.d.cts → types-B2vmg_UF.d.cts} +3 -3
- package/dist/{types-CuAoZH8w.d.cts → types-B4jdPHoL.d.cts} +2 -2
- package/dist/{types-DSBNqF1J.d.cts → types-BH9ljNmj.d.cts} +2 -2
- package/dist/{types-CFhAduFK.d.cts → types-BI2jI-3-.d.cts} +3 -3
- package/dist/types-BMQW-2Yw.d.ts +2804 -0
- package/dist/{types-BdKtW2Ml.d.cts → types-BREGN3qo.d.cts} +2 -2
- package/dist/{types-B1S60aS2.d.ts → types-BTbczawY.d.ts} +2 -2
- package/dist/{types-DG_FlLJt.d.cts → types-BV2BDccJ.d.cts} +247 -430
- package/dist/{types-Bc3-a3DT.d.cts → types-BZBdLUpH.d.ts} +2 -2
- package/dist/{types-DWUd__fe.d.ts → types-BlCoTm7n.d.ts} +2 -2
- package/dist/{types-Drk7PEhk.d.ts → types-BnaAo7xn.d.ts} +2 -2
- package/dist/{types-BXnUqdBB.d.cts → types-BoV9M5Xg.d.cts} +2 -2
- package/dist/{types-Co8WobOo.d.ts → types-Bpnpa2Wt.d.ts} +3 -3
- package/dist/{types-D7YGPUsm.d.ts → types-BptQ7jpP.d.cts} +408 -24
- package/dist/{types-COFrOmuO.d.ts → types-ByWD2oeV.d.ts} +2 -2
- package/dist/{types-C2p7JYQ3.d.cts → types-C1vhYcic.d.cts} +2 -2
- package/dist/{types-B2Al1BNh.d.ts → types-C2CLlR4i.d.ts} +2 -2
- package/dist/{types-eP06LqcE.d.cts → types-CGH_lfxS.d.cts} +2 -16
- package/dist/{types-By47HWwB.d.cts → types-CJHi0zdD.d.cts} +2 -2
- package/dist/{types-C0bGZqFI.d.cts → types-COIsNoTQ.d.cts} +2 -2
- package/dist/{types-DkoyCUqv.d.ts → types-COc-nind.d.cts} +2 -2
- package/dist/{types-CIybfUJ9.d.cts → types-CPanB0p7.d.cts} +3 -3
- package/dist/{types-DnOGCb-p.d.cts → types-CXTqFYah.d.ts} +6 -6
- package/dist/{types-sTH4KiPc.d.cts → types-CcuG9cid.d.cts} +2 -2
- package/dist/{types-RmbvQimP.d.ts → types-Cj4bLPp5.d.cts} +6 -6
- package/dist/{types-Culr5v8R.d.ts → types-CkcMoXRk.d.ts} +3 -3
- package/dist/{types-BvXODdf5.d.ts → types-CpALS017.d.ts} +2 -16
- package/dist/{types-056giLrn.d.cts → types-CvkqEvhv.d.cts} +2 -2
- package/dist/{types-BJLRgXw0.d.ts → types-CyHZ1ZQe.d.ts} +2 -2
- package/dist/{types-DLazCdFR.d.cts → types-CyiRYRVq.d.cts} +3 -3
- package/dist/{types-CgF9R0Na.d.ts → types-Cz1dj_TM.d.ts} +2 -2
- package/dist/{types-DdeZK3BO.d.ts → types-D-qI9ne4.d.ts} +2 -2
- package/dist/{types-BIAP4CYp.d.cts → types-D1uloiuY.d.cts} +2 -2
- package/dist/{types-DMMMQuNt.d.ts → types-D6jKxUv_.d.ts} +247 -430
- package/dist/{types-CQd9PuKY.d.cts → types-DNXC_-fA.d.cts} +2 -2
- package/dist/{types-Dirp9mni.d.ts → types-DeSd3gqW.d.ts} +3 -3
- package/dist/{types-D5VvEdOv.d.ts → types-De_DA2ga.d.ts} +2 -2
- package/dist/{types-BMsK6T5k.d.ts → types-Dfc58bPE.d.ts} +2 -2
- package/dist/{types-DyIKgbGB.d.ts → types-Di8VIZwQ.d.ts} +2 -2
- package/dist/{types-B2El99VY.d.cts → types-DlbiVsVo.d.cts} +2 -2
- package/dist/types-DuiUN0h8.d.ts +33557 -0
- package/dist/{types-SX78XZZ0.d.ts → types-DwpRt3e9.d.ts} +2 -2
- package/dist/{types-lVXf05pr.d.ts → types-EJEoI3ZK.d.ts} +2 -2
- package/dist/types-GuWtMCMn.d.cts +33557 -0
- package/dist/{types-mXM8MrYS.d.cts → types-MbcIiKDI.d.cts} +3 -3
- package/dist/{types-BV74LS5r.d.ts → types-RfaldD4P.d.ts} +3 -3
- package/dist/{types-uP64XthM.d.cts → types-cDU_J45_.d.cts} +2 -2
- package/dist/{types-DN7RWWBw.d.ts → types-dybUhlU2.d.ts} +2 -2
- package/dist/types-iNlsdRkx.d.cts +2804 -0
- package/dist/{types-BHCigZFc.d.ts → types-sVYo0o9_.d.ts} +3 -3
- package/dist/{types-Bv5vw2dc.d.cts → types-zA3H84SM.d.cts} +2 -2
- package/dist/{validateConnectionStatus-CBhXmvWC.js → validateConnectionStatus-BrLXkoSI.js} +2 -2
- package/dist/{validateConnectionStatus-CBhXmvWC.js.map → validateConnectionStatus-BrLXkoSI.js.map} +1 -1
- package/dist/{validateConnectionStatus-DVHXGTdi.cjs → validateConnectionStatus-V9q6Nl6u.cjs} +2 -2
- package/dist/{validateConnectionStatus-DVHXGTdi.cjs.map → validateConnectionStatus-V9q6Nl6u.cjs.map} +1 -1
- package/dist/vault/index.cjs +4 -4
- package/dist/vault/index.d.cts +1 -1
- package/dist/vault/index.d.ts +1 -1
- package/dist/vault/index.js +4 -4
- package/dist/vault/types.d.cts +1 -1
- package/dist/vault/types.d.ts +1 -1
- package/package.json +54 -2
- package/surface/chat.md +1 -1
- package/surface/sdk.md +4 -4
- package/surface/storage.md +44 -44
- package/dist/configurations-DCOJONZZ.cjs.map +0 -1
- package/dist/configurations-iCbhe0tb.js.map +0 -1
- package/dist/constants-CkAVvuUq.cjs.map +0 -1
- package/dist/constants-qeWGfk_7.js.map +0 -1
- package/dist/createFetchClient-B1h3-p65.js.map +0 -1
- package/dist/createFetchClient-B9Cv0W9f.cjs.map +0 -1
- package/dist/storage-CQxu0EY3.js.map +0 -1
- package/dist/storage-vnH64B_Q.cjs.map +0 -1
- package/dist/types-CIJAtX8q.d.cts +0 -18784
- package/dist/types-X-gQF8F8.d.ts +0 -18784
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as StorageToken } from "../../types-
|
|
2
|
-
import { n as hasAdminFeature, r as hasFeature } from "../../project-
|
|
1
|
+
import { l as StorageToken } from "../../types-DuiUN0h8.js";
|
|
2
|
+
import { n as hasAdminFeature, r as hasFeature } from "../../project-BOGaVs-q.js";
|
|
3
3
|
//#region src/domain/permissions/errors.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* @module domain/permissions/errors
|
|
@@ -59,6 +59,10 @@ declare const isKnownAdminRole: (adminRole: string | null | undefined) => boolea
|
|
|
59
59
|
* would admit each new one silently with no test failing. Takes the raw role
|
|
60
60
|
* string so a caller holding an unparsed `tokens.verify()` response can use it
|
|
61
61
|
* without fabricating a `StorageToken`. AI-3671.
|
|
62
|
+
*
|
|
63
|
+
* @see ./organization#canWriteKaiSpendCaps — spend caps (AI-3738) are
|
|
64
|
+
* organization-admin only and use that predicate; do not widen this one to
|
|
65
|
+
* cover them.
|
|
62
66
|
*/
|
|
63
67
|
declare const isKaiSettingsWriterRole: (adminRole: string | null | undefined) => boolean;
|
|
64
68
|
/**
|
|
@@ -74,6 +78,51 @@ declare const assertCanAdminOrShare: (token: StorageToken) => void;
|
|
|
74
78
|
declare const assertCanProductionManage: (token: StorageToken) => void;
|
|
75
79
|
declare const assertCanDevelopOrReview: (token: StorageToken) => void;
|
|
76
80
|
//#endregion
|
|
81
|
+
//#region src/domain/permissions/organization.d.ts
|
|
82
|
+
/**
|
|
83
|
+
* The raw signal: is this token's admin a member of the organization owning
|
|
84
|
+
* the project?
|
|
85
|
+
*
|
|
86
|
+
* A limited (non-master) token never is — it carries no `admin` block at all
|
|
87
|
+
* despite the hand-authored type declaring it required (AI-3593), hence the
|
|
88
|
+
* optional chain and the `isMasterToken` requirement. Prefer
|
|
89
|
+
* `isOrganizationAdmin` for authorization decisions; this bare signal exists
|
|
90
|
+
* because a few kbc-ui call sites use it with no role conjunction (e.g.
|
|
91
|
+
* `privileges.ts`'s `canManageUsers`/`canUnlinkBucket`), and porting those must
|
|
92
|
+
* not change behaviour.
|
|
93
|
+
*/
|
|
94
|
+
declare const isOrganizationMember: (token: StorageToken) => boolean;
|
|
95
|
+
/**
|
|
96
|
+
* May this token administer organization-owned settings on this project?
|
|
97
|
+
*
|
|
98
|
+
* `isOrganizationMember` AND `admin`/`share`. The conjunction — not the bare
|
|
99
|
+
* flag — is the shape kbc-ui already uses wherever org authority gates a
|
|
100
|
+
* project-level *write* (e.g. `privileges.ts`'s `canChangeUserRole` for the
|
|
101
|
+
* SHARE target). Keeping the conjunction means an org member holding a
|
|
102
|
+
* `readOnly` or `guest` token on this particular project still cannot write,
|
|
103
|
+
* matching every existing write-shaped call site.
|
|
104
|
+
*/
|
|
105
|
+
declare const isOrganizationAdmin: (token: StorageToken) => boolean;
|
|
106
|
+
declare const assertCanAdministerOrganization: (token: StorageToken) => void;
|
|
107
|
+
/**
|
|
108
|
+
* Whether this token may write Kai's **spend caps** — the project cap, the
|
|
109
|
+
* default per-user limit, and per-user overrides (AI-3738).
|
|
110
|
+
*
|
|
111
|
+
* Strictly stricter than `canWriteKaiSettings` (`./admin`), and deliberately a
|
|
112
|
+
* distinct predicate rather than a widening of it. `canWriteKaiSettings` is
|
|
113
|
+
* `admin`/`share` — the authority to rewrite shared project *config* (a
|
|
114
|
+
* prompt-injection surface). Spend caps commit the organization's money across
|
|
115
|
+
* every project it owns, so per AI-3738 they are organization-admin only: a
|
|
116
|
+
* project admin sees which caps apply and cannot change them. A project whose
|
|
117
|
+
* own admin could raise its own cap has no cap.
|
|
118
|
+
*
|
|
119
|
+
* Lives here rather than beside `canWriteKaiSettings` in `admin.ts` because its
|
|
120
|
+
* rule is org-scoped and `admin.ts` is documented as depending purely on the
|
|
121
|
+
* project role string.
|
|
122
|
+
*/
|
|
123
|
+
declare const canWriteKaiSpendCaps: (token: StorageToken) => boolean;
|
|
124
|
+
declare const assertCanWriteKaiSpendCaps: (token: StorageToken) => void;
|
|
125
|
+
//#endregion
|
|
77
126
|
//#region src/domain/permissions/configurations.d.ts
|
|
78
127
|
/**
|
|
79
128
|
* Caller-supplied context for configuration predicates.
|
|
@@ -115,5 +164,5 @@ declare const assertCanMigrateFromTemplate: (token: StorageToken, ctx: Configura
|
|
|
115
164
|
declare const assertCanPurgeConfiguration: (token: StorageToken, ctx: ConfigurationCtx) => void;
|
|
116
165
|
declare const assertCanAssignFolder: (token: StorageToken, ctx: ConfigurationCtx) => void;
|
|
117
166
|
//#endregion
|
|
118
|
-
export { ConfigurationCtx, PermissionDeniedError, assertCanAdmin, assertCanAdminOrShare, assertCanAssignFolder, assertCanCopyConfiguration, assertCanCreateConfiguration, assertCanDevelopOrReview, assertCanMigrateFromTemplate, assertCanProductionManage, assertCanPurgeConfiguration, assertCanUpdateConfiguration, assertCanWriteKaiSettings, canAssignFolder, canCopyConfiguration, canCreateConfiguration, canMigrateFromTemplate, canPurgeConfiguration, canUpdateConfiguration, canWriteKaiSettings, hasAdminFeature, hasFeature, isAdmin, isAdminOrShare, isDeveloperOrReviewer, isKaiSettingsWriterRole, isKnownAdminRole, isProductionManager, isReadOnlyRole };
|
|
167
|
+
export { ConfigurationCtx, PermissionDeniedError, assertCanAdmin, assertCanAdminOrShare, assertCanAdministerOrganization, assertCanAssignFolder, assertCanCopyConfiguration, assertCanCreateConfiguration, assertCanDevelopOrReview, assertCanMigrateFromTemplate, assertCanProductionManage, assertCanPurgeConfiguration, assertCanUpdateConfiguration, assertCanWriteKaiSettings, assertCanWriteKaiSpendCaps, canAssignFolder, canCopyConfiguration, canCreateConfiguration, canMigrateFromTemplate, canPurgeConfiguration, canUpdateConfiguration, canWriteKaiSettings, canWriteKaiSpendCaps, hasAdminFeature, hasFeature, isAdmin, isAdminOrShare, isDeveloperOrReviewer, isKaiSettingsWriterRole, isKnownAdminRole, isOrganizationAdmin, isOrganizationMember, isProductionManager, isReadOnlyRole };
|
|
119
168
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,60 @@
|
|
|
1
1
|
import { n as hasAdminFeature, r as hasFeature } from "../../project-DWwZv66D.js";
|
|
2
|
-
import { C as isKnownAdminRole, E as PermissionDeniedError, S as isKaiSettingsWriterRole, T as isReadOnlyRole, _ as assertCanWriteKaiSettings, a as assertCanPurgeConfiguration, b as isAdminOrShare, c as canCopyConfiguration, d as canPurgeConfiguration, f as canUpdateConfiguration, g as assertCanProductionManage, h as assertCanDevelopOrReview, i as assertCanMigrateFromTemplate, l as canCreateConfiguration, m as assertCanAdminOrShare, n as assertCanCopyConfiguration, o as assertCanUpdateConfiguration, p as assertCanAdmin, r as assertCanCreateConfiguration, s as canAssignFolder, t as assertCanAssignFolder, u as canMigrateFromTemplate, v as canWriteKaiSettings, w as isProductionManager, x as isDeveloperOrReviewer, y as isAdmin } from "../../configurations-
|
|
3
|
-
|
|
2
|
+
import { C as isKnownAdminRole, E as PermissionDeniedError, S as isKaiSettingsWriterRole, T as isReadOnlyRole, _ as assertCanWriteKaiSettings, a as assertCanPurgeConfiguration, b as isAdminOrShare, c as canCopyConfiguration, d as canPurgeConfiguration, f as canUpdateConfiguration, g as assertCanProductionManage, h as assertCanDevelopOrReview, i as assertCanMigrateFromTemplate, l as canCreateConfiguration, m as assertCanAdminOrShare, n as assertCanCopyConfiguration, o as assertCanUpdateConfiguration, p as assertCanAdmin, r as assertCanCreateConfiguration, s as canAssignFolder, t as assertCanAssignFolder, u as canMigrateFromTemplate, v as canWriteKaiSettings, w as isProductionManager, x as isDeveloperOrReviewer, y as isAdmin } from "../../configurations-d7SZmw69.js";
|
|
3
|
+
//#region src/domain/permissions/organization.ts
|
|
4
|
+
/**
|
|
5
|
+
* The raw signal: is this token's admin a member of the organization owning
|
|
6
|
+
* the project?
|
|
7
|
+
*
|
|
8
|
+
* A limited (non-master) token never is — it carries no `admin` block at all
|
|
9
|
+
* despite the hand-authored type declaring it required (AI-3593), hence the
|
|
10
|
+
* optional chain and the `isMasterToken` requirement. Prefer
|
|
11
|
+
* `isOrganizationAdmin` for authorization decisions; this bare signal exists
|
|
12
|
+
* because a few kbc-ui call sites use it with no role conjunction (e.g.
|
|
13
|
+
* `privileges.ts`'s `canManageUsers`/`canUnlinkBucket`), and porting those must
|
|
14
|
+
* not change behaviour.
|
|
15
|
+
*/
|
|
16
|
+
const isOrganizationMember = (token) => token.isMasterToken && (token.admin?.isOrganizationMember ?? false);
|
|
17
|
+
/**
|
|
18
|
+
* May this token administer organization-owned settings on this project?
|
|
19
|
+
*
|
|
20
|
+
* `isOrganizationMember` AND `admin`/`share`. The conjunction — not the bare
|
|
21
|
+
* flag — is the shape kbc-ui already uses wherever org authority gates a
|
|
22
|
+
* project-level *write* (e.g. `privileges.ts`'s `canChangeUserRole` for the
|
|
23
|
+
* SHARE target). Keeping the conjunction means an org member holding a
|
|
24
|
+
* `readOnly` or `guest` token on this particular project still cannot write,
|
|
25
|
+
* matching every existing write-shaped call site.
|
|
26
|
+
*/
|
|
27
|
+
const isOrganizationAdmin = (token) => isOrganizationMember(token) && isAdminOrShare(token);
|
|
28
|
+
const assertCanAdministerOrganization = (token) => {
|
|
29
|
+
if (!isOrganizationAdmin(token)) throw new PermissionDeniedError({
|
|
30
|
+
action: "administer-organization",
|
|
31
|
+
reason: token.isMasterToken ? `role '${token.admin?.role ?? "none"}' with isOrganizationMember=${token.admin?.isOrganizationMember ?? false} may not administer organization settings` : "a limited (non-master) token may not administer organization settings"
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Whether this token may write Kai's **spend caps** — the project cap, the
|
|
36
|
+
* default per-user limit, and per-user overrides (AI-3738).
|
|
37
|
+
*
|
|
38
|
+
* Strictly stricter than `canWriteKaiSettings` (`./admin`), and deliberately a
|
|
39
|
+
* distinct predicate rather than a widening of it. `canWriteKaiSettings` is
|
|
40
|
+
* `admin`/`share` — the authority to rewrite shared project *config* (a
|
|
41
|
+
* prompt-injection surface). Spend caps commit the organization's money across
|
|
42
|
+
* every project it owns, so per AI-3738 they are organization-admin only: a
|
|
43
|
+
* project admin sees which caps apply and cannot change them. A project whose
|
|
44
|
+
* own admin could raise its own cap has no cap.
|
|
45
|
+
*
|
|
46
|
+
* Lives here rather than beside `canWriteKaiSettings` in `admin.ts` because its
|
|
47
|
+
* rule is org-scoped and `admin.ts` is documented as depending purely on the
|
|
48
|
+
* project role string.
|
|
49
|
+
*/
|
|
50
|
+
const canWriteKaiSpendCaps = (token) => isOrganizationAdmin(token);
|
|
51
|
+
const assertCanWriteKaiSpendCaps = (token) => {
|
|
52
|
+
if (!canWriteKaiSpendCaps(token)) throw new PermissionDeniedError({
|
|
53
|
+
action: "write-kai-spend-caps",
|
|
54
|
+
reason: token.isMasterToken ? `role '${token.admin?.role ?? "none"}' with isOrganizationMember=${token.admin?.isOrganizationMember ?? false} may not change Kai spend caps` : "a limited (non-master) token may not change Kai spend caps"
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
export { PermissionDeniedError, assertCanAdmin, assertCanAdminOrShare, assertCanAdministerOrganization, assertCanAssignFolder, assertCanCopyConfiguration, assertCanCreateConfiguration, assertCanDevelopOrReview, assertCanMigrateFromTemplate, assertCanProductionManage, assertCanPurgeConfiguration, assertCanUpdateConfiguration, assertCanWriteKaiSettings, assertCanWriteKaiSpendCaps, canAssignFolder, canCopyConfiguration, canCreateConfiguration, canMigrateFromTemplate, canPurgeConfiguration, canUpdateConfiguration, canWriteKaiSettings, canWriteKaiSpendCaps, hasAdminFeature, hasFeature, isAdmin, isAdminOrShare, isDeveloperOrReviewer, isKaiSettingsWriterRole, isKnownAdminRole, isOrganizationAdmin, isOrganizationMember, isProductionManager, isReadOnlyRole };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/domain/permissions/organization.ts"],"sourcesContent":["/**\n * @module domain/permissions/organization\n *\n * Organization-scope predicates. Token-only, like `admin.ts`, but these read\n * `StorageToken.admin.isOrganizationMember` rather than the project role\n * string — the two answer different questions and neither implies the other.\n *\n * The upstream field is named `isOrganizationMember`, but in Keboola\n * organization membership *is* organization administration — an org member\n * administers every project the organization owns. kbc-ui already reads it\n * under that meaning (e.g. `BranchProtectionTab.tsx`, `ActivateChatContent.tsx`\n * both assign it to a local `isOrgAdmin`), so `isOrganizationAdmin` below is a\n * rename of the existing reading, not a new semantic.\n *\n * `isOrganizationAdmin` and `canWriteKaiSpendCaps` each have an `assertCan*`\n * pair (`assertCanAdministerOrganization`, `assertCanWriteKaiSpendCaps`)\n * throwing `PermissionDeniedError` with a stable kebab-case `action`, per the\n * conventions in `packages/api-client/AGENTS.md`. `isOrganizationMember` is a\n * raw signal only — nothing asserts on bare membership.\n */\nimport type { StorageToken } from '../../clients/storage/tokens/types';\n\nimport { isAdminOrShare } from './admin';\nimport { PermissionDeniedError } from './errors';\n\n/**\n * The raw signal: is this token's admin a member of the organization owning\n * the project?\n *\n * A limited (non-master) token never is — it carries no `admin` block at all\n * despite the hand-authored type declaring it required (AI-3593), hence the\n * optional chain and the `isMasterToken` requirement. Prefer\n * `isOrganizationAdmin` for authorization decisions; this bare signal exists\n * because a few kbc-ui call sites use it with no role conjunction (e.g.\n * `privileges.ts`'s `canManageUsers`/`canUnlinkBucket`), and porting those must\n * not change behaviour.\n */\nexport const isOrganizationMember = (token: StorageToken): boolean =>\n token.isMasterToken && (token.admin?.isOrganizationMember ?? false);\n\n/**\n * May this token administer organization-owned settings on this project?\n *\n * `isOrganizationMember` AND `admin`/`share`. The conjunction — not the bare\n * flag — is the shape kbc-ui already uses wherever org authority gates a\n * project-level *write* (e.g. `privileges.ts`'s `canChangeUserRole` for the\n * SHARE target). Keeping the conjunction means an org member holding a\n * `readOnly` or `guest` token on this particular project still cannot write,\n * matching every existing write-shaped call site.\n */\nexport const isOrganizationAdmin = (token: StorageToken): boolean =>\n isOrganizationMember(token) && isAdminOrShare(token);\n\nexport const assertCanAdministerOrganization = (token: StorageToken): void => {\n if (!isOrganizationAdmin(token)) {\n throw new PermissionDeniedError({\n action: 'administer-organization',\n reason: token.isMasterToken\n ? `role '${token.admin?.role ?? 'none'}' with isOrganizationMember=${token.admin?.isOrganizationMember ?? false} may not administer organization settings`\n : 'a limited (non-master) token may not administer organization settings',\n });\n }\n};\n\n/**\n * Whether this token may write Kai's **spend caps** — the project cap, the\n * default per-user limit, and per-user overrides (AI-3738).\n *\n * Strictly stricter than `canWriteKaiSettings` (`./admin`), and deliberately a\n * distinct predicate rather than a widening of it. `canWriteKaiSettings` is\n * `admin`/`share` — the authority to rewrite shared project *config* (a\n * prompt-injection surface). Spend caps commit the organization's money across\n * every project it owns, so per AI-3738 they are organization-admin only: a\n * project admin sees which caps apply and cannot change them. A project whose\n * own admin could raise its own cap has no cap.\n *\n * Lives here rather than beside `canWriteKaiSettings` in `admin.ts` because its\n * rule is org-scoped and `admin.ts` is documented as depending purely on the\n * project role string.\n */\nexport const canWriteKaiSpendCaps = (token: StorageToken): boolean => isOrganizationAdmin(token);\n\nexport const assertCanWriteKaiSpendCaps = (token: StorageToken): void => {\n if (!canWriteKaiSpendCaps(token)) {\n throw new PermissionDeniedError({\n action: 'write-kai-spend-caps',\n reason: token.isMasterToken\n ? `role '${token.admin?.role ?? 'none'}' with isOrganizationMember=${token.admin?.isOrganizationMember ?? false} may not change Kai spend caps`\n : 'a limited (non-master) token may not change Kai spend caps',\n });\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;AAqCA,MAAa,wBAAwB,UACnC,MAAM,kBAAkB,MAAM,OAAO,wBAAwB;;;;;;;;;;;AAY/D,MAAa,uBAAuB,UAClC,qBAAqB,KAAK,KAAK,eAAe,KAAK;AAErD,MAAa,mCAAmC,UAA8B;CAC5E,IAAI,CAAC,oBAAoB,KAAK,GAC5B,MAAM,IAAI,sBAAsB;EAC9B,QAAQ;EACR,QAAQ,MAAM,gBACV,SAAS,MAAM,OAAO,QAAQ,OAAO,8BAA8B,MAAM,OAAO,wBAAwB,MAAM,6CAC9G;CACN,CAAC;AAEL;;;;;;;;;;;;;;;;;AAkBA,MAAa,wBAAwB,UAAiC,oBAAoB,KAAK;AAE/F,MAAa,8BAA8B,UAA8B;CACvE,IAAI,CAAC,qBAAqB,KAAK,GAC7B,MAAM,IAAI,sBAAsB;EAC9B,QAAQ;EACR,QAAQ,MAAM,gBACV,SAAS,MAAM,OAAO,QAAQ,OAAO,8BAA8B,MAAM,OAAO,wBAAwB,MAAM,kCAC9G;CACN,CAAC;AAEL"}
|
package/dist/editor/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-
|
|
3
|
-
const require_auth = require("../auth-
|
|
2
|
+
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-CyDUFxHB.cjs");
|
|
3
|
+
const require_auth = require("../auth-DP-6TFiM.cjs");
|
|
4
4
|
//#region src/clients/editor/editorClient.ts
|
|
5
5
|
const createEditorClient = ({ baseUrl, middlewares, auth }) => {
|
|
6
6
|
const client = require_createOpenapiFetchClient.createOpenapiFetchClient({
|
package/dist/editor/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
2
|
-
import { C as components, a as GetSqlSessionTableDdlPath, c as PostSqlRunQueryBody, d as PostSqlSessionLoadPath, f as PostSqlSessionUnloadBody, h as PostSqlTablePreviewPath, i as GetSqlSessionSchemaQuery, l as PostSqlRunQueryPath, m as PostSqlTablePreviewBody, n as GetSqlSessionPath, o as GetSqlSessionTableDdlQuery, p as PostSqlSessionUnloadPath, r as GetSqlSessionSchemaPath, s as GetSqlSessionsQuery, t as CreateSqlSessionBody, u as PostSqlSessionLoadBody } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-BREGN3qo.cjs";
|
|
2
|
+
import { C as components, a as GetSqlSessionTableDdlPath, c as PostSqlRunQueryBody, d as PostSqlSessionLoadPath, f as PostSqlSessionUnloadBody, h as PostSqlTablePreviewPath, i as GetSqlSessionSchemaQuery, l as PostSqlRunQueryPath, m as PostSqlTablePreviewBody, n as GetSqlSessionPath, o as GetSqlSessionTableDdlQuery, p as PostSqlSessionUnloadPath, r as GetSqlSessionSchemaPath, s as GetSqlSessionsQuery, t as CreateSqlSessionBody, u as PostSqlSessionLoadBody } from "../types-CcuG9cid.cjs";
|
|
3
3
|
//#region src/clients/editor/editorClient.d.ts
|
|
4
4
|
declare const createEditorClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
5
5
|
healthCheck: (signal?: AbortSignal) => Promise<{
|
package/dist/editor/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
2
|
-
import { C as components, a as GetSqlSessionTableDdlPath, c as PostSqlRunQueryBody, d as PostSqlSessionLoadPath, f as PostSqlSessionUnloadBody, h as PostSqlTablePreviewPath, i as GetSqlSessionSchemaQuery, l as PostSqlRunQueryPath, m as PostSqlTablePreviewBody, n as GetSqlSessionPath, o as GetSqlSessionTableDdlQuery, p as PostSqlSessionUnloadPath, r as GetSqlSessionSchemaPath, s as GetSqlSessionsQuery, t as CreateSqlSessionBody, u as PostSqlSessionLoadBody } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-DwpRt3e9.js";
|
|
2
|
+
import { C as components, a as GetSqlSessionTableDdlPath, c as PostSqlRunQueryBody, d as PostSqlSessionLoadPath, f as PostSqlSessionUnloadBody, h as PostSqlTablePreviewPath, i as GetSqlSessionSchemaQuery, l as PostSqlRunQueryPath, m as PostSqlTablePreviewBody, n as GetSqlSessionPath, o as GetSqlSessionTableDdlQuery, p as PostSqlSessionUnloadPath, r as GetSqlSessionSchemaPath, s as GetSqlSessionsQuery, t as CreateSqlSessionBody, u as PostSqlSessionLoadBody } from "../types-C2CLlR4i.js";
|
|
3
3
|
//#region src/clients/editor/editorClient.d.ts
|
|
4
4
|
declare const createEditorClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
5
5
|
healthCheck: (signal?: AbortSignal) => Promise<{
|
package/dist/editor/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-Bn6_Pn0H.js";
|
|
2
|
+
import { t as createAuthHeaders } from "../auth-DtbQaeDj.js";
|
|
3
3
|
//#region src/clients/editor/editorClient.ts
|
|
4
4
|
const createEditorClient = ({ baseUrl, middlewares, auth }) => {
|
|
5
5
|
const client = createOpenapiFetchClient({
|
package/dist/editor/types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as SqlSession, _ as SessionSchema, a as GetSqlSessionTableDdlPath, b as SessionSchemaDatabase, c as PostSqlRunQueryBody, d as PostSqlSessionLoadPath, f as PostSqlSessionUnloadBody, g as Session, h as PostSqlTablePreviewPath, i as GetSqlSessionSchemaQuery, l as PostSqlRunQueryPath, m as PostSqlTablePreviewBody, n as GetSqlSessionPath, o as GetSqlSessionTableDdlQuery, p as PostSqlSessionUnloadPath, r as GetSqlSessionSchemaPath, s as GetSqlSessionsQuery, t as CreateSqlSessionBody, u as PostSqlSessionLoadBody, v as SessionSchemaBucket, x as SessionSchemaTable, y as SessionSchemaColumn } from "../types-
|
|
1
|
+
import { S as SqlSession, _ as SessionSchema, a as GetSqlSessionTableDdlPath, b as SessionSchemaDatabase, c as PostSqlRunQueryBody, d as PostSqlSessionLoadPath, f as PostSqlSessionUnloadBody, g as Session, h as PostSqlTablePreviewPath, i as GetSqlSessionSchemaQuery, l as PostSqlRunQueryPath, m as PostSqlTablePreviewBody, n as GetSqlSessionPath, o as GetSqlSessionTableDdlQuery, p as PostSqlSessionUnloadPath, r as GetSqlSessionSchemaPath, s as GetSqlSessionsQuery, t as CreateSqlSessionBody, u as PostSqlSessionLoadBody, v as SessionSchemaBucket, x as SessionSchemaTable, y as SessionSchemaColumn } from "../types-CcuG9cid.cjs";
|
|
2
2
|
export { CreateSqlSessionBody, GetSqlSessionPath, GetSqlSessionSchemaPath, GetSqlSessionSchemaQuery, GetSqlSessionTableDdlPath, GetSqlSessionTableDdlQuery, GetSqlSessionsQuery, PostSqlRunQueryBody, PostSqlRunQueryPath, PostSqlSessionLoadBody, PostSqlSessionLoadPath, PostSqlSessionUnloadBody, PostSqlSessionUnloadPath, PostSqlTablePreviewBody, PostSqlTablePreviewPath, Session, SessionSchema, SessionSchemaBucket, SessionSchemaColumn, SessionSchemaDatabase, SessionSchemaTable, SqlSession };
|
package/dist/editor/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as SqlSession, _ as SessionSchema, a as GetSqlSessionTableDdlPath, b as SessionSchemaDatabase, c as PostSqlRunQueryBody, d as PostSqlSessionLoadPath, f as PostSqlSessionUnloadBody, g as Session, h as PostSqlTablePreviewPath, i as GetSqlSessionSchemaQuery, l as PostSqlRunQueryPath, m as PostSqlTablePreviewBody, n as GetSqlSessionPath, o as GetSqlSessionTableDdlQuery, p as PostSqlSessionUnloadPath, r as GetSqlSessionSchemaPath, s as GetSqlSessionsQuery, t as CreateSqlSessionBody, u as PostSqlSessionLoadBody, v as SessionSchemaBucket, x as SessionSchemaTable, y as SessionSchemaColumn } from "../types-
|
|
1
|
+
import { S as SqlSession, _ as SessionSchema, a as GetSqlSessionTableDdlPath, b as SessionSchemaDatabase, c as PostSqlRunQueryBody, d as PostSqlSessionLoadPath, f as PostSqlSessionUnloadBody, g as Session, h as PostSqlTablePreviewPath, i as GetSqlSessionSchemaQuery, l as PostSqlRunQueryPath, m as PostSqlTablePreviewBody, n as GetSqlSessionPath, o as GetSqlSessionTableDdlQuery, p as PostSqlSessionUnloadPath, r as GetSqlSessionSchemaPath, s as GetSqlSessionsQuery, t as CreateSqlSessionBody, u as PostSqlSessionLoadBody, v as SessionSchemaBucket, x as SessionSchemaTable, y as SessionSchemaColumn } from "../types-C2CLlR4i.js";
|
|
2
2
|
export { CreateSqlSessionBody, GetSqlSessionPath, GetSqlSessionSchemaPath, GetSqlSessionSchemaQuery, GetSqlSessionTableDdlPath, GetSqlSessionTableDdlQuery, GetSqlSessionsQuery, PostSqlRunQueryBody, PostSqlRunQueryPath, PostSqlSessionLoadBody, PostSqlSessionLoadPath, PostSqlSessionUnloadBody, PostSqlSessionUnloadPath, PostSqlTablePreviewBody, PostSqlTablePreviewPath, Session, SessionSchema, SessionSchemaBucket, SessionSchemaColumn, SessionSchemaDatabase, SessionSchemaTable, SqlSession };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_createGenericFetchClient = require("../createGenericFetchClient-
|
|
2
|
+
const require_createGenericFetchClient = require("../createGenericFetchClient-DHs-i7_O.cjs");
|
|
3
3
|
//#region src/clients/encryption/encryptionClient.ts
|
|
4
4
|
const createEncryptionClient = ({ baseUrl, middlewares }) => {
|
|
5
5
|
const client = require_createGenericFetchClient.createGenericFetchClient({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createEncryptionClient } from "../index-
|
|
1
|
+
import { t as createEncryptionClient } from "../index-eAlN694c.cjs";
|
|
2
2
|
export { createEncryptionClient };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createEncryptionClient } from "../index-
|
|
1
|
+
import { t as createEncryptionClient } from "../index-DeKPpYQy.js";
|
|
2
2
|
export { createEncryptionClient };
|
package/dist/encryption/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createGenericFetchClient } from "../createGenericFetchClient-
|
|
1
|
+
import { t as createGenericFetchClient } from "../createGenericFetchClient-BHYQLZhe.js";
|
|
2
2
|
//#region src/clients/encryption/encryptionClient.ts
|
|
3
3
|
const createEncryptionClient = ({ baseUrl, middlewares }) => {
|
|
4
4
|
const client = createGenericFetchClient({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as EncryptQuery, i as EncryptParamsByScope, n as EncryptBody, o as EncryptionScope, r as EncryptParams, s as ScopedSecrets, t as BranchType } from "../types-
|
|
1
|
+
import { a as EncryptQuery, i as EncryptParamsByScope, n as EncryptBody, o as EncryptionScope, r as EncryptParams, s as ScopedSecrets, t as BranchType } from "../types-CPanB0p7.cjs";
|
|
2
2
|
export { BranchType, EncryptBody, EncryptParams, EncryptParamsByScope, EncryptQuery, EncryptionScope, ScopedSecrets };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as EncryptQuery, i as EncryptParamsByScope, n as EncryptBody, o as EncryptionScope, r as EncryptParams, s as ScopedSecrets, t as BranchType } from "../types-
|
|
1
|
+
import { a as EncryptQuery, i as EncryptParamsByScope, n as EncryptBody, o as EncryptionScope, r as EncryptParams, s as ScopedSecrets, t as BranchType } from "../types-DeSd3gqW.js";
|
|
2
2
|
export { BranchType, EncryptBody, EncryptParams, EncryptParamsByScope, EncryptQuery, EncryptionScope, ScopedSecrets };
|
package/dist/import/index.cjs
CHANGED
package/dist/import/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as UploadProgress } from "../index-
|
|
2
|
-
import { n as ClientInitOptions } from "../types-
|
|
3
|
-
import { n as WriteTableInput, t as UploadFileInput } from "../types-
|
|
1
|
+
import { l as UploadProgress } from "../index-CQrKS7PV.cjs";
|
|
2
|
+
import { n as ClientInitOptions } from "../types-BREGN3qo.cjs";
|
|
3
|
+
import { n as WriteTableInput, t as UploadFileInput } from "../types-BH9ljNmj.cjs";
|
|
4
4
|
//#region src/clients/import/importClient.d.ts
|
|
5
5
|
type Options = {
|
|
6
6
|
signal?: AbortSignal;
|
package/dist/import/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as UploadProgress } from "../index-
|
|
2
|
-
import { n as ClientInitOptions } from "../types-
|
|
3
|
-
import { n as WriteTableInput, t as UploadFileInput } from "../types-
|
|
1
|
+
import { l as UploadProgress } from "../index-CeJOmN-P.js";
|
|
2
|
+
import { n as ClientInitOptions } from "../types-DwpRt3e9.js";
|
|
3
|
+
import { n as WriteTableInput, t as UploadFileInput } from "../types-EJEoI3ZK.js";
|
|
4
4
|
//#region src/clients/import/importClient.d.ts
|
|
5
5
|
type Options = {
|
|
6
6
|
signal?: AbortSignal;
|
package/dist/import/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createImportClient } from "../import-
|
|
1
|
+
import { t as createImportClient } from "../import-SQuurg1G.js";
|
|
2
2
|
export { createImportClient };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-
|
|
2
|
-
const require_auth = require("./auth-
|
|
1
|
+
const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-CyDUFxHB.cjs");
|
|
2
|
+
const require_auth = require("./auth-DP-6TFiM.cjs");
|
|
3
3
|
//#region src/fetchClient/xhrFetch.ts
|
|
4
4
|
const parseResponseHeaders = (raw) => {
|
|
5
5
|
const headers = new Headers();
|
|
@@ -118,4 +118,4 @@ Object.defineProperty(exports, "createImportClient", {
|
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
120
|
|
|
121
|
-
//# sourceMappingURL=import-
|
|
121
|
+
//# sourceMappingURL=import-C0-y1GQK.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-
|
|
1
|
+
{"version":3,"file":"import-C0-y1GQK.cjs","names":["createOpenapiFetchClient","createAuthHeaders"],"sources":["../src/fetchClient/xhrFetch.ts","../src/clients/import/utils.ts","../src/clients/import/importClient.ts"],"sourcesContent":["import type { FetchFn } from './createFetchClient';\n\nexport type UploadProgress = {\n loaded: number;\n total: number;\n percent: number;\n};\n\nconst parseResponseHeaders = (raw: string) => {\n const headers = new Headers();\n\n for (const line of raw.trim().split(/[\\r\\n]+/)) {\n const separator = line.indexOf(':');\n if (separator < 0) continue;\n\n headers.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim());\n }\n\n return headers;\n};\n\nconst createAbortError = () => new DOMException('The operation was aborted.', 'AbortError');\n\n// `new Response(body)` throws for these statuses even when the body is empty.\nconst BODILESS_STATUSES = [204, 205];\n\nconst BODILESS_METHODS = ['GET', 'HEAD'];\n\n/**\n * A `fetch` implementation backed by XHR, for the `fetchFn` escape hatch: `fetch` cannot observe\n * request-body upload progress outside Chromium, `xhr.upload.onprogress` can.\n */\nexport const xhrFetch = (onProgress: (progress: UploadProgress) => void): FetchFn => {\n return async (input, init) => {\n // Node has no XHR, and asking for progress is not worth failing an upload over — the caller\n // simply gets no progress events there.\n if (typeof XMLHttpRequest === 'undefined') return fetch(input, init);\n\n const request = new Request(input, init);\n const body = BODILESS_METHODS.includes(request.method) ? null : await request.blob();\n\n if (request.signal.aborted) throw createAbortError();\n\n const { promise, resolve, reject } = Promise.withResolvers<Response>();\n const xhr = new XMLHttpRequest();\n\n const handleProgress = (event: ProgressEvent) => {\n if (!event.lengthComputable) return;\n\n onProgress({\n loaded: event.loaded,\n total: event.total,\n percent: (event.loaded / event.total) * 100,\n });\n };\n\n const handleLoad = () => {\n resolve(\n new Response(BODILESS_STATUSES.includes(xhr.status) ? null : xhr.response, {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseResponseHeaders(xhr.getAllResponseHeaders()),\n }),\n );\n };\n\n // `TypeError` for parity with `fetch` — `isFetchClientError` keys off it.\n const handleError = () => reject(new TypeError('Failed to fetch'));\n const handleAbort = () => reject(createAbortError());\n\n xhr.open(request.method, request.url, true);\n xhr.responseType = 'blob';\n xhr.withCredentials = request.credentials === 'include';\n\n // The body we send is the one this `Request` serialized, so its `content-type` — multipart\n // boundary included — describes those exact bytes and can be forwarded as-is.\n request.headers.forEach((value, name) => xhr.setRequestHeader(name, value));\n\n xhr.upload.addEventListener('progress', handleProgress);\n xhr.addEventListener('load', handleLoad);\n xhr.addEventListener('error', handleError);\n xhr.addEventListener('abort', handleAbort);\n request.signal.addEventListener('abort', () => xhr.abort(), { once: true });\n\n xhr.send(body);\n\n return promise;\n };\n};\n","/**\n * Every field the importer takes is a form part, named exactly as the spec names it: flags go as\n * `1` when on and are left out when off (so the service applies its own default), and arrays repeat\n * under the `[]`-suffixed name. The payload rides along as the `data` part — `file` is the public\n * API's word for it, not the wire's.\n */\nexport const createFormData = (\n fields: Record<string, string | boolean | string[] | File | null | undefined>,\n) => {\n const formData = new FormData();\n\n for (const [name, value] of Object.entries(fields)) {\n if (!value) {\n continue;\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n formData.append(`${name}[]`, item);\n }\n } else {\n formData.append(name, value === true ? '1' : value);\n }\n }\n\n return formData;\n};\n","import type { UploadProgress } from '../../fetchClient';\nimport { createOpenapiFetchClient, xhrFetch } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type { UploadFileInput, WriteTableInput } from './types';\nimport { createFormData } from './utils';\n\ntype Options = {\n signal?: AbortSignal;\n onProgress?: (progress: UploadProgress) => void;\n};\n\nexport const createImportClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n\n const uploadFile = async (\n { file, ...fields }: UploadFileInput,\n { signal, onProgress }: Options = {},\n ) => {\n const { data } = await client.post(\n '/upload-file',\n { body: createFormData({ data: file, ...fields }) },\n { signal, fetchFn: onProgress ? xhrFetch(onProgress) : undefined },\n );\n\n return data;\n };\n\n const writeTable = async (\n { file, ...fields }: WriteTableInput,\n { signal, onProgress }: Options = {},\n ) => {\n const { data } = await client.post(\n '/write-table',\n { body: createFormData({ data: file, ...fields }) },\n { signal, fetchFn: onProgress ? xhrFetch(onProgress) : undefined },\n );\n\n return data;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await client.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n uploadFile,\n writeTable,\n };\n};\n"],"mappings":";;;AAQA,MAAM,wBAAwB,QAAgB;CAC5C,MAAM,UAAU,IAAI,QAAQ;CAE5B,KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,CAAC,MAAM,SAAS,GAAG;EAC9C,MAAM,YAAY,KAAK,QAAQ,GAAG;EAClC,IAAI,YAAY,GAAG;EAEnB,QAAQ,OAAO,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC,KAAK,GAAG,KAAK,MAAM,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC;CAClF;CAEA,OAAO;AACT;AAEA,MAAM,yBAAyB,IAAI,aAAa,8BAA8B,YAAY;AAG1F,MAAM,oBAAoB,CAAC,KAAK,GAAG;AAEnC,MAAM,mB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@ -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-Bn6_Pn0H.js";
|
|
2
|
+
import { t as createAuthHeaders } from "./auth-DtbQaeDj.js";
|
|
3
3
|
//#region src/fetchClient/xhrFetch.ts
|
|
4
4
|
const parseResponseHeaders = (raw) => {
|
|
5
5
|
const headers = new Headers();
|
|
@@ -113,4 +113,4 @@ const createImportClient = ({ baseUrl, middlewares, auth }) => {
|
|
|
113
113
|
//#endregion
|
|
114
114
|
export { createImportClient as t };
|
|
115
115
|
|
|
116
|
-
//# sourceMappingURL=import-
|
|
116
|
+
//# sourceMappingURL=import-SQuurg1G.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-
|
|
1
|
+
{"version":3,"file":"import-SQuurg1G.js","names":[],"sources":["../src/fetchClient/xhrFetch.ts","../src/clients/import/utils.ts","../src/clients/import/importClient.ts"],"sourcesContent":["import type { FetchFn } from './createFetchClient';\n\nexport type UploadProgress = {\n loaded: number;\n total: number;\n percent: number;\n};\n\nconst parseResponseHeaders = (raw: string) => {\n const headers = new Headers();\n\n for (const line of raw.trim().split(/[\\r\\n]+/)) {\n const separator = line.indexOf(':');\n if (separator < 0) continue;\n\n headers.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim());\n }\n\n return headers;\n};\n\nconst createAbortError = () => new DOMException('The operation was aborted.', 'AbortError');\n\n// `new Response(body)` throws for these statuses even when the body is empty.\nconst BODILESS_STATUSES = [204, 205];\n\nconst BODILESS_METHODS = ['GET', 'HEAD'];\n\n/**\n * A `fetch` implementation backed by XHR, for the `fetchFn` escape hatch: `fetch` cannot observe\n * request-body upload progress outside Chromium, `xhr.upload.onprogress` can.\n */\nexport const xhrFetch = (onProgress: (progress: UploadProgress) => void): FetchFn => {\n return async (input, init) => {\n // Node has no XHR, and asking for progress is not worth failing an upload over — the caller\n // simply gets no progress events there.\n if (typeof XMLHttpRequest === 'undefined') return fetch(input, init);\n\n const request = new Request(input, init);\n const body = BODILESS_METHODS.includes(request.method) ? null : await request.blob();\n\n if (request.signal.aborted) throw createAbortError();\n\n const { promise, resolve, reject } = Promise.withResolvers<Response>();\n const xhr = new XMLHttpRequest();\n\n const handleProgress = (event: ProgressEvent) => {\n if (!event.lengthComputable) return;\n\n onProgress({\n loaded: event.loaded,\n total: event.total,\n percent: (event.loaded / event.total) * 100,\n });\n };\n\n const handleLoad = () => {\n resolve(\n new Response(BODILESS_STATUSES.includes(xhr.status) ? null : xhr.response, {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseResponseHeaders(xhr.getAllResponseHeaders()),\n }),\n );\n };\n\n // `TypeError` for parity with `fetch` — `isFetchClientError` keys off it.\n const handleError = () => reject(new TypeError('Failed to fetch'));\n const handleAbort = () => reject(createAbortError());\n\n xhr.open(request.method, request.url, true);\n xhr.responseType = 'blob';\n xhr.withCredentials = request.credentials === 'include';\n\n // The body we send is the one this `Request` serialized, so its `content-type` — multipart\n // boundary included — describes those exact bytes and can be forwarded as-is.\n request.headers.forEach((value, name) => xhr.setRequestHeader(name, value));\n\n xhr.upload.addEventListener('progress', handleProgress);\n xhr.addEventListener('load', handleLoad);\n xhr.addEventListener('error', handleError);\n xhr.addEventListener('abort', handleAbort);\n request.signal.addEventListener('abort', () => xhr.abort(), { once: true });\n\n xhr.send(body);\n\n return promise;\n };\n};\n","/**\n * Every field the importer takes is a form part, named exactly as the spec names it: flags go as\n * `1` when on and are left out when off (so the service applies its own default), and arrays repeat\n * under the `[]`-suffixed name. The payload rides along as the `data` part — `file` is the public\n * API's word for it, not the wire's.\n */\nexport const createFormData = (\n fields: Record<string, string | boolean | string[] | File | null | undefined>,\n) => {\n const formData = new FormData();\n\n for (const [name, value] of Object.entries(fields)) {\n if (!value) {\n continue;\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n formData.append(`${name}[]`, item);\n }\n } else {\n formData.append(name, value === true ? '1' : value);\n }\n }\n\n return formData;\n};\n","import type { UploadProgress } from '../../fetchClient';\nimport { createOpenapiFetchClient, xhrFetch } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type { UploadFileInput, WriteTableInput } from './types';\nimport { createFormData } from './utils';\n\ntype Options = {\n signal?: AbortSignal;\n onProgress?: (progress: UploadProgress) => void;\n};\n\nexport const createImportClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n\n const uploadFile = async (\n { file, ...fields }: UploadFileInput,\n { signal, onProgress }: Options = {},\n ) => {\n const { data } = await client.post(\n '/upload-file',\n { body: createFormData({ data: file, ...fields }) },\n { signal, fetchFn: onProgress ? xhrFetch(onProgress) : undefined },\n );\n\n return data;\n };\n\n const writeTable = async (\n { file, ...fields }: WriteTableInput,\n { signal, onProgress }: Options = {},\n ) => {\n const { data } = await client.post(\n '/write-table',\n { body: createFormData({ data: file, ...fields }) },\n { signal, fetchFn: onProgress ? xhrFetch(onProgress) : undefined },\n );\n\n return data;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await client.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n uploadFile,\n writeTable,\n };\n};\n"],"mappings":";;;AAQA,MAAM,wBAAwB,QAAgB;CAC5C,MAAM,UAAU,IAAI,QAAQ;CAE5B,KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,CAAC,MAAM,SAAS,GAAG;EAC9C,MAAM,YAAY,KAAK,QAAQ,GAAG;EAClC,IAAI,YAAY,GAAG;EAEnB,QAAQ,OAAO,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC,KAAK,GAAG,KAAK,MAAM,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC;CAClF;CAEA,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AiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAEjE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;CACF;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as MiddlewareFn, t as createOpenapiFetchClient } from "./index-
|
|
2
|
-
import { n as ClientInitOptions } from "./types-
|
|
3
|
-
import { A as ResetPasswordConfirmInput, E as PaginationQuery, F as UpdateAppAsAdminInput, G as paths, I as UpdateAppInput, L as UpdateVendorAsAdminInput, N as SignUpInput, R as UpdateVendorInput, W as components, _ as GetVendorUsersQuery, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, k as RejectAppInput, l as CreateAppInput, p as DeprecateAppInput, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, x as LoginResult, y as LoginChallenge } from "./types-
|
|
1
|
+
import { T as MiddlewareFn, t as createOpenapiFetchClient } from "./index-CQrKS7PV.cjs";
|
|
2
|
+
import { n as ClientInitOptions } from "./types-BREGN3qo.cjs";
|
|
3
|
+
import { A as ResetPasswordConfirmInput, E as PaginationQuery, F as UpdateAppAsAdminInput, G as paths, I as UpdateAppInput, L as UpdateVendorAsAdminInput, N as SignUpInput, R as UpdateVendorInput, W as components, _ as GetVendorUsersQuery, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, k as RejectAppInput, l as CreateAppInput, p as DeprecateAppInput, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, x as LoginResult, y as LoginChallenge } from "./types-DlbiVsVo.cjs";
|
|
4
4
|
//#region src/clients/developerPortal/developerPortalClient.d.ts
|
|
5
5
|
type DeveloperPortalFetchClient = ReturnType<typeof createOpenapiFetchClient<paths>>;
|
|
6
6
|
type DeveloperPortalClientInitOptions = Omit<ClientInitOptions, 'auth' | 'middlewares'> & {
|
|
@@ -1385,4 +1385,4 @@ type DeveloperPortalTokens = {
|
|
|
1385
1385
|
declare const authHeader: (token: string) => Record<string, string>;
|
|
1386
1386
|
//#endregion
|
|
1387
1387
|
export { DeveloperPortalClient as a, createDeveloperPortalClient as c, isMfaChallengeResponse as i, authHeader as n, DeveloperPortalClientInitOptions as o, uploadAppIcon as r, DeveloperPortalFetchClient as s, DeveloperPortalTokens as t };
|
|
1388
|
-
//# sourceMappingURL=index-
|
|
1388
|
+
//# sourceMappingURL=index-BKh0prif.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "./types-
|
|
2
|
-
import { a as GetVariablesQuery, i as GetVariablesByBranchId, n as CreateVariableBody, o as VariableWithHash, r as DeleteVariablePath } from "./types-
|
|
1
|
+
import { n as ClientInitOptions } from "./types-DwpRt3e9.js";
|
|
2
|
+
import { a as GetVariablesQuery, i as GetVariablesByBranchId, n as CreateVariableBody, o as VariableWithHash, r as DeleteVariablePath } from "./types-D-qI9ne4.js";
|
|
3
3
|
//#region src/clients/vault/vaultClient.d.ts
|
|
4
4
|
declare const createVaultClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
5
5
|
healthCheck: (signal?: AbortSignal) => Promise<unknown>;
|
|
@@ -23,4 +23,4 @@ declare const createVaultClient: ({ baseUrl, middlewares, auth }: ClientInitOpti
|
|
|
23
23
|
};
|
|
24
24
|
//#endregion
|
|
25
25
|
export { createVaultClient as t };
|
|
26
|
-
//# sourceMappingURL=index-
|
|
26
|
+
//# sourceMappingURL=index-Bc_hXWae.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as ProjectId } from "./types-
|
|
2
|
-
import "./types-
|
|
3
|
-
import { t as createEncryptionClient } from "./index-
|
|
4
|
-
import { n as CreateVariableBody, o as VariableWithHash, t as AnyVariable } from "./types-
|
|
5
|
-
import { t as createVaultClient } from "./index-
|
|
1
|
+
import { a as ProjectId } from "./types-DuiUN0h8.js";
|
|
2
|
+
import "./types-D6jKxUv_.js";
|
|
3
|
+
import { t as createEncryptionClient } from "./index-DeKPpYQy.js";
|
|
4
|
+
import { n as CreateVariableBody, o as VariableWithHash, t as AnyVariable } from "./types-D-qI9ne4.js";
|
|
5
|
+
import { t as createVaultClient } from "./index-Bc_hXWae.js";
|
|
6
6
|
//#region src/sdks/vault/types.d.ts
|
|
7
7
|
type VaultClient = ReturnType<typeof createVaultClient>;
|
|
8
8
|
type EncryptionClient = ReturnType<typeof createEncryptionClient>;
|
|
@@ -74,4 +74,4 @@ declare const partitionByOauth: <T extends AnyVariable>(variables: T[]) => {
|
|
|
74
74
|
};
|
|
75
75
|
//#endregion
|
|
76
76
|
export { vaultRef as a, partitionByOauth as i, isVariableEncryptionRequired as n, createVaultSdk as o, isVariableOauth as r, EncryptionCtx as s, isSameVariable as t };
|
|
77
|
-
//# sourceMappingURL=index-
|
|
77
|
+
//# sourceMappingURL=index-Bg1P6Bb2.d.ts.map
|