@keboola/api-client 31.0.0 → 33.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 +91 -7
- package/API-SURFACE.md +5 -2
- package/CHANGELOG.md +327 -0
- package/README.md +45 -19
- package/dist/{ManagementClientAuthError-DFhi5yxe.cjs → ManagementClientAuthError-DqeXL8nv.cjs} +2 -2
- package/dist/{ManagementClientAuthError-DFhi5yxe.cjs.map → ManagementClientAuthError-DqeXL8nv.cjs.map} +1 -1
- package/dist/{ManagementClientAuthError-90pvsej0.js → ManagementClientAuthError-iKbBugKC.js} +2 -2
- package/dist/{ManagementClientAuthError-90pvsej0.js.map → ManagementClientAuthError-iKbBugKC.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-CLHhkQJn.js → appLogs-D72eD8vP.js} +2 -2
- package/dist/{appLogs-CLHhkQJn.js.map → appLogs-D72eD8vP.js.map} +1 -1
- package/dist/{appLogs-BCCi02w6.cjs → appLogs-D8K0VeNM.cjs} +2 -2
- package/dist/{appLogs-BCCi02w6.cjs.map → appLogs-D8K0VeNM.cjs.map} +1 -1
- package/dist/{appLogs-hQdKt_8J.d.cts → appLogs-Q4A7A_Fc.d.cts} +2 -2
- package/dist/{appLogs-BdMG6Cvn.d.ts → appLogs-u0XMZLjS.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-DmgTH0uY.cjs → auth-C2_JLisH.cjs} +2 -2
- package/dist/{auth-DmgTH0uY.cjs.map → auth-C2_JLisH.cjs.map} +1 -1
- package/dist/{auth-CE6Hlc9W.js → auth-CE9rQV3-.js} +2 -2
- package/dist/{auth-CE6Hlc9W.js.map → auth-CE9rQV3-.js.map} +1 -1
- package/dist/{authClient-XBAUz9g-.js → authClient-DEyqR7GW.js} +43 -9
- package/dist/authClient-DEyqR7GW.js.map +1 -0
- package/dist/{authClient-BL6h78Q1.d.cts → authClient-DZ_8lvdJ.d.cts} +6 -6
- package/dist/{authClient-Bc_bDisO.d.ts → authClient-DwT6xdg5.d.ts} +6 -6
- package/dist/{authClient-Cixa8_L1.cjs → authClient-IwQ9Ti0J.cjs} +43 -9
- package/dist/authClient-IwQ9Ti0J.cjs.map +1 -0
- 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-B1h3-p65.js → createFetchClient-DdyZMhxO.js} +17 -11
- package/dist/createFetchClient-DdyZMhxO.js.map +1 -0
- package/dist/{createFetchClient-B9Cv0W9f.cjs → createFetchClient-DvZvD31l.cjs} +22 -10
- package/dist/createFetchClient-DvZvD31l.cjs.map +1 -0
- package/dist/{createGenericFetchClient-DhpvUSlX.js → createGenericFetchClient-MQeLRiNW.js} +2 -2
- package/dist/{createGenericFetchClient-DhpvUSlX.js.map → createGenericFetchClient-MQeLRiNW.js.map} +1 -1
- package/dist/{createGenericFetchClient-BWoSkTki.cjs → createGenericFetchClient-qfCZlCTv.cjs} +2 -2
- package/dist/{createGenericFetchClient-BWoSkTki.cjs.map → createGenericFetchClient-qfCZlCTv.cjs.map} +1 -1
- package/dist/{createOpenapiFetchClient-yirrW6Tg.cjs → createOpenapiFetchClient-C57Ljzi6.cjs} +2 -2
- package/dist/{createOpenapiFetchClient-yirrW6Tg.cjs.map → createOpenapiFetchClient-C57Ljzi6.cjs.map} +1 -1
- package/dist/{createOpenapiFetchClient-0_oqhdPv.js → createOpenapiFetchClient-E7OIVkYv.js} +2 -2
- package/dist/{createOpenapiFetchClient-0_oqhdPv.js.map → createOpenapiFetchClient-E7OIVkYv.js.map} +1 -1
- package/dist/{credential-dKxArMic.js → credential-Bxv7yxOZ.js} +7 -4
- package/dist/credential-Bxv7yxOZ.js.map +1 -0
- package/dist/{credential-D-tX9gP4.cjs → credential-D-X5QQrM.cjs} +7 -4
- package/dist/credential-D-X5QQrM.cjs.map +1 -0
- 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-BqNWX-Gr.cjs → dataScience-BPW993AG.cjs} +5 -5
- package/dist/{dataScience-BqNWX-Gr.cjs.map → dataScience-BPW993AG.cjs.map} +1 -1
- package/dist/{dataScience-jdbSSPYF.js → dataScience-B_TA7wCB.js} +5 -5
- package/dist/{dataScience-jdbSSPYF.js.map → dataScience-B_TA7wCB.js.map} +1 -1
- package/dist/developerPortal/index.cjs +1 -1
- package/dist/developerPortal/index.d.cts +2 -2
- package/dist/developerPortal/index.d.ts +2 -2
- package/dist/developerPortal/index.js +1 -1
- package/dist/developerPortal/types.d.cts +1 -1
- package/dist/developerPortal/types.d.ts +1 -1
- package/dist/{developerPortalClient-B7lNR5q0.cjs → developerPortalClient-Db2XVB_o.cjs} +3 -3
- package/dist/{developerPortalClient-B7lNR5q0.cjs.map → developerPortalClient-Db2XVB_o.cjs.map} +1 -1
- package/dist/{developerPortalClient-5ABcxz1U.js → developerPortalClient-jk46sjwP.js} +3 -3
- package/dist/{developerPortalClient-5ABcxz1U.js.map → developerPortalClient-jk46sjwP.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/emitter-dLF1Fyfg.d.cts +11 -0
- package/dist/emitter-dLF1Fyfg.d.ts +11 -0
- 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-CExRbskw.js → import-2nqxQ9Rt.js} +3 -3
- package/dist/{import-CExRbskw.js.map → import-2nqxQ9Rt.js.map} +1 -1
- package/dist/{import-CXHppAxd.cjs → import-DJilJ6tq.cjs} +3 -3
- package/dist/{import-CXHppAxd.cjs.map → import-DJilJ6tq.cjs.map} +1 -1
- package/dist/{index-BR2Fu-Wo.d.ts → index-B0V1pJAa.d.ts} +618 -3103
- package/dist/{index-7RvXnXmd.d.ts → index-B2OGaUap.d.ts} +6 -6
- package/dist/{index-J1I2HlSm.d.ts → index-BjKjp3Rf.d.ts} +5 -5
- package/dist/{index-NicJZIzu.d.ts → index-C7gxKoDF.d.cts} +3 -3
- package/dist/{index-B6q7HxKJ.d.cts → index-CTd4YY8e.d.cts} +4 -4
- package/dist/{index-C9mAoXF6.d.cts → index-CUXEFQ7i.d.cts} +6 -6
- package/dist/{index-D_TnbEtp.d.cts → index-CVqk63at.d.ts} +3 -3
- package/dist/{index-CMb0ygwb.d.ts → index-C_cxKL1V.d.ts} +3 -3
- package/dist/{index-CYMAwD3E.d.ts → index-ChMtULt4.d.ts} +4 -4
- package/dist/{index-Cpjh05sx.d.cts → index-DCN2lH0v.d.cts} +4 -4
- package/dist/{index-cu8THqZV.d.cts → index-DIVvL54G.d.cts} +618 -3103
- package/dist/{index-CwJE18PJ.d.cts → index-DLYAvSWZ.d.cts} +3 -3
- package/dist/{index-CW4VC9oN.d.ts → index-DQef014j.d.ts} +4 -4
- package/dist/{index-Ds8e0l7-.d.ts → index-DVhTNwvu.d.ts} +7 -3
- package/dist/{index-B-frWtGW.d.cts → index-DhVFuQDv.d.cts} +7 -3
- package/dist/{index-DeMDxHTz.d.ts → index-GNKwr7EQ.d.ts} +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-Daks5CeX.d.ts → index-bB6wvw1f.d.ts} +4 -4
- package/dist/{index-BfVv8isU.d.cts → index-exNi3I2Q.d.cts} +4 -4
- package/dist/{index-CR9LsDaG.d.cts → index-qOK5FtAH.d.cts} +4 -4
- package/dist/{index-BSjfVDTr.d.cts → index-t-a7kYnx.d.cts} +5 -5
- package/dist/index.cjs +325 -257
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +306 -240
- package/dist/index.js.map +1 -1
- package/dist/{jobStatus-kQ9JqF8t.cjs → jobStatus-0_Y3Sr4i.cjs} +37 -20
- package/dist/jobStatus-0_Y3Sr4i.cjs.map +1 -0
- package/dist/{jobStatus-DbMupQEK.js → jobStatus-PSZJMTiA.js} +35 -18
- package/dist/jobStatus-PSZJMTiA.js.map +1 -0
- package/dist/kaiAgent/index.cjs +3 -0
- package/dist/kaiAgent/index.d.cts +2 -0
- package/dist/kaiAgent/index.d.ts +2 -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-CMVub6Sc.cjs +266 -0
- package/dist/kaiAgent-CMVub6Sc.cjs.map +1 -0
- package/dist/kaiAgent-CYYn0QJW.js +261 -0
- package/dist/kaiAgent-CYYn0QJW.js.map +1 -0
- package/dist/kaiAgentClient-B2O0DF4d.d.ts +249 -0
- package/dist/kaiAgentClient-iCFR2tRU.d.cts +249 -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-DlVdxzPw.cjs → management-DGfgKsaA.cjs} +5 -5
- package/dist/{management-DlVdxzPw.cjs.map → management-DGfgKsaA.cjs.map} +1 -1
- package/dist/{management-Cc8mKfnf.js → management-DNEKhR6a.js} +5 -5
- package/dist/{management-Cc8mKfnf.js.map → management-DNEKhR6a.js.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-CjwktHvw.js} +4 -4
- package/dist/{metastore-CNf1412Z.js.map → metastore-CjwktHvw.js.map} +1 -1
- package/dist/{metastore-DbsxqjhS.cjs → metastore-DksEte8P.cjs} +4 -4
- package/dist/{metastore-DbsxqjhS.cjs.map → metastore-DksEte8P.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-Bg5zro5S.js} +5 -5
- package/dist/{oauth-ClksaYRY.js.map → oauth-Bg5zro5S.js.map} +1 -1
- package/dist/{oauth-DsZgmtPj.cjs → oauth-DFsI1TE5.cjs} +5 -5
- package/dist/{oauth-DsZgmtPj.cjs.map → oauth-DFsI1TE5.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-Bh954iOA.d.ts} +2 -2
- package/dist/{project-CRrsxSAK.d.cts → project-D25GH8zK.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--t_W9PSJ.cjs} +6 -6
- package/dist/{queryService-DxUUkTcy.cjs.map → queryService--t_W9PSJ.cjs.map} +1 -1
- package/dist/{queryService-BlyAcBxP.js → queryService-DX6zeAs_.js} +6 -6
- package/dist/{queryService-BlyAcBxP.js.map → queryService-DX6zeAs_.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-D1_TCe0z.cjs} +5 -5
- package/dist/{queue-CpcqeMPz.cjs.map → queue-D1_TCe0z.cjs.map} +1 -1
- package/dist/{queue-DpZTm7U7.js → queue-DrLUbk98.js} +5 -5
- package/dist/{queue-DpZTm7U7.js.map → queue-DrLUbk98.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 +5 -5
- package/dist/sdk/developerPortal/index.cjs.map +1 -1
- package/dist/sdk/developerPortal/index.d.cts +5 -4
- package/dist/sdk/developerPortal/index.d.ts +5 -4
- package/dist/sdk/developerPortal/index.js +4 -4
- package/dist/sdk/queryService/index.cjs +1 -1
- package/dist/sdk/queryService/index.d.cts +1 -1
- package/dist/sdk/queryService/index.d.ts +1 -1
- package/dist/sdk/queryService/index.js +1 -1
- package/dist/sdk/semanticLayer/index.cjs +163 -74
- package/dist/sdk/semanticLayer/index.cjs.map +1 -1
- package/dist/sdk/semanticLayer/index.d.cts +16 -13
- package/dist/sdk/semanticLayer/index.d.ts +16 -13
- package/dist/sdk/semanticLayer/index.js +158 -75
- package/dist/sdk/semanticLayer/index.js.map +1 -1
- package/dist/sdk/semanticLayer/types.d.cts +2 -2
- package/dist/sdk/semanticLayer/types.d.ts +2 -2
- 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-CQxu0EY3.js → storage--cVaecFq.js} +150 -161
- package/dist/storage--cVaecFq.js.map +1 -0
- package/dist/{storage-vnH64B_Q.cjs → storage-DexWot8H.cjs} +150 -161
- package/dist/storage-DexWot8H.cjs.map +1 -0
- package/dist/store-C9FQCHGe.js +74 -0
- package/dist/store-C9FQCHGe.js.map +1 -0
- package/dist/store-xS-Cu_VS.cjs +85 -0
- package/dist/store-xS-Cu_VS.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 +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-CkMHM-jB.js} +5 -5
- package/dist/{syncActions-AgFiMjRS.js.map → syncActions-CkMHM-jB.js.map} +1 -1
- package/dist/{syncActions-DPcAPYgJ.cjs → syncActions-DQq_A9v6.cjs} +5 -5
- package/dist/{syncActions-DPcAPYgJ.cjs.map → syncActions-DQq_A9v6.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-CAu1Qt7B.cjs} +3 -3
- package/dist/{telemetry-BLgaYEvi.cjs.map → telemetry-CAu1Qt7B.cjs.map} +1 -1
- package/dist/{telemetry-CPiGWpLi.js → telemetry-Ca6j0i9w.js} +3 -3
- package/dist/{telemetry-CPiGWpLi.js.map → telemetry-Ca6j0i9w.js.map} +1 -1
- package/dist/{types-eP06LqcE.d.cts → types-0xa_7cgo.d.cts} +2 -16
- package/dist/{types-DLazCdFR.d.cts → types-3p0adMdd.d.cts} +3 -3
- package/dist/{types-DWUd__fe.d.ts → types-6ThDkaJw.d.ts} +2 -2
- package/dist/{types-Culr5v8R.d.ts → types-6hh_3SZs.d.ts} +3 -3
- package/dist/{types-DN7RWWBw.d.ts → types-6ku2LeX6.d.ts} +2 -2
- package/dist/{types-DSBNqF1J.d.cts → types-B42HhyB0.d.cts} +2 -2
- package/dist/{types-C2p7JYQ3.d.cts → types-B4_MM5Wf.d.cts} +2 -2
- package/dist/{types-B2El99VY.d.cts → types-B6JJCta-.d.cts} +2 -2
- package/dist/{types-BHCigZFc.d.ts → types-B6lOyHY_.d.ts} +3 -3
- package/dist/{types-Bc3-a3DT.d.cts → types-B7O5koJb.d.cts} +2 -2
- package/dist/{types-D5VvEdOv.d.ts → types-BHI8Lin9.d.ts} +2 -2
- package/dist/{types-DnOGCb-p.d.cts → types-BO3sCD0a.d.cts} +41 -10
- package/dist/{types-Bv5vw2dc.d.cts → types-BOnf68s5.d.cts} +2 -2
- package/dist/{types-CIybfUJ9.d.cts → types-BS5M67xm.d.cts} +3 -3
- package/dist/{types-C0bGZqFI.d.cts → types-BT46XIgn.d.cts} +2 -2
- package/dist/types-BUYqdN7B.d.ts +205 -0
- package/dist/{types-DdeZK3BO.d.ts → types-BYKHr5bR.d.ts} +2 -2
- package/dist/{types-BIAP4CYp.d.cts → types-Be3Wgn1U.d.cts} +2 -2
- package/dist/{types-B1S60aS2.d.ts → types-BgVKG4vg.d.ts} +2 -2
- package/dist/{types-BJLRgXw0.d.ts → types-C2gzqtjf.d.ts} +2 -2
- package/dist/{types-DQOOWgLt.d.cts → types-C35GWNmq.d.ts} +408 -24
- package/dist/{types-DMMMQuNt.d.ts → types-C4mr0lop.d.ts} +279 -430
- package/dist/{types-CFhAduFK.d.cts → types-CCr1-9Q6.d.cts} +3 -3
- package/dist/{types-Dirp9mni.d.ts → types-CHCM9oNk.d.ts} +3 -3
- package/dist/types-CNQdtffE.d.ts +3454 -0
- package/dist/{types-mXM8MrYS.d.cts → types-CPaluTW7.d.cts} +3 -3
- package/dist/{types-RmbvQimP.d.ts → types-CSc8NQCY.d.ts} +41 -10
- package/dist/{types-CgF9R0Na.d.ts → types-C_ilZZkQ.d.ts} +2 -2
- package/dist/{types-lVXf05pr.d.ts → types-CaMfshWX.d.ts} +2 -2
- package/dist/{types-BXnUqdBB.d.cts → types-Ccgbipp4.d.cts} +2 -2
- package/dist/types-Cpjk0-ta.d.ts +33557 -0
- package/dist/types-CrH4H8M4.d.cts +33557 -0
- package/dist/{types-CQd9PuKY.d.cts → types-Cu-0LT4f.d.cts} +2 -2
- package/dist/{types-D7YGPUsm.d.ts → types-CxmV36rp.d.cts} +408 -24
- package/dist/{types-SX78XZZ0.d.ts → types-D-98DirB.d.ts} +2 -2
- package/dist/{types-DG_FlLJt.d.cts → types-D6ocCyGh.d.cts} +279 -430
- package/dist/{types-DkoyCUqv.d.ts → types-D7Wgcp0u.d.ts} +2 -2
- package/dist/{types-COFrOmuO.d.ts → types-DAzmGzlb.d.ts} +2 -2
- package/dist/{types-BdKtW2Ml.d.cts → types-DHI0g51U.d.cts} +2 -2
- package/dist/{types-BMsK6T5k.d.ts → types-DHqIJKwx.d.ts} +2 -2
- package/dist/types-DONxb2-c.d.cts +205 -0
- package/dist/{types-DyIKgbGB.d.ts → types-DTTC70Ac.d.ts} +2 -2
- package/dist/{types-B2Al1BNh.d.ts → types-DlvZeert.d.ts} +2 -2
- package/dist/{types-uP64XthM.d.cts → types-DqniGeDJ.d.cts} +2 -2
- package/dist/types-E3VT-zYz.d.cts +3454 -0
- package/dist/{types-CuAoZH8w.d.cts → types-Jt0ipbSm.d.cts} +2 -2
- package/dist/{types-Co8WobOo.d.ts → types-Ur37iOqb.d.ts} +3 -3
- package/dist/{types-Drk7PEhk.d.ts → types-ZGAWRIBW.d.ts} +2 -2
- package/dist/{types-056giLrn.d.cts → types-bY6K3y0O.d.cts} +2 -2
- package/dist/{types-BvXODdf5.d.ts → types-k4R8gQ4U.d.ts} +2 -16
- package/dist/{types-sTH4KiPc.d.cts → types-sO52qIAA.d.cts} +2 -2
- package/dist/{types-By47HWwB.d.cts → types-sp1rJY9E.d.cts} +2 -2
- package/dist/{validateConnectionStatus-DVHXGTdi.cjs → validateConnectionStatus-24zqIQ0p.cjs} +2 -2
- package/dist/{validateConnectionStatus-DVHXGTdi.cjs.map → validateConnectionStatus-24zqIQ0p.cjs.map} +1 -1
- package/dist/{validateConnectionStatus-CBhXmvWC.js → validateConnectionStatus-DhkWg6Eq.js} +2 -2
- package/dist/{validateConnectionStatus-CBhXmvWC.js.map → validateConnectionStatus-DhkWg6Eq.js.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 +55 -3
- package/surface/auth.md +2 -2
- package/surface/chat.md +1 -1
- package/surface/kaiAgent.md +5 -2
- package/surface/sdk.md +4 -4
- package/surface/storage.md +44 -44
- package/dist/authClient-Cixa8_L1.cjs.map +0 -1
- package/dist/authClient-XBAUz9g-.js.map +0 -1
- 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/createStore-BNiCRQXa.js +0 -148
- package/dist/createStore-BNiCRQXa.js.map +0 -1
- package/dist/createStore-MQbboXcB.cjs +0 -177
- package/dist/createStore-MQbboXcB.cjs.map +0 -1
- package/dist/credential-D-tX9gP4.cjs.map +0 -1
- package/dist/credential-dKxArMic.js.map +0 -1
- package/dist/jobStatus-DbMupQEK.js.map +0 -1
- package/dist/jobStatus-kQ9JqF8t.cjs.map +0 -1
- package/dist/storage-CQxu0EY3.js.map +0 -1
- package/dist/storage-vnH64B_Q.cjs.map +0 -1
- package/dist/types-BV74LS5r.d.ts +0 -148
- package/dist/types-CIJAtX8q.d.cts +0 -18784
- package/dist/types-X-gQF8F8.d.ts +0 -18784
- package/dist/types-ca-YNg1r.d.cts +0 -148
|
@@ -71,13 +71,17 @@ function removeUndefined(obj) {
|
|
|
71
71
|
}
|
|
72
72
|
const JSON_MEDIA_TYPE = /^application\/([\w.-]+\+)?json$/;
|
|
73
73
|
const getMediaType = (response) => response.headers.get(HttpHeader.CONTENT_TYPE)?.split(";")[0]?.trim().toLowerCase() ?? "";
|
|
74
|
-
const
|
|
74
|
+
const parseJson = async (response) => {
|
|
75
|
+
const text = await response.text();
|
|
76
|
+
return text.trim() === "" ? null : JSON.parse(text);
|
|
77
|
+
};
|
|
78
|
+
const parseData = async (response, parseAs = "auto") => {
|
|
75
79
|
if (response.status === HttpStatus.NO_CONTENT) return null;
|
|
80
|
+
if (parseAs === "text") return response.text();
|
|
81
|
+
if (parseAs === "blob") return response.blob();
|
|
82
|
+
if (parseAs === "json") return parseJson(response);
|
|
76
83
|
const mediaType = getMediaType(response);
|
|
77
|
-
if (JSON_MEDIA_TYPE.test(mediaType))
|
|
78
|
-
const text = await response.text();
|
|
79
|
-
return text.trim() === "" ? null : JSON.parse(text);
|
|
80
|
-
}
|
|
84
|
+
if (JSON_MEDIA_TYPE.test(mediaType)) return parseJson(response);
|
|
81
85
|
if (mediaType === "application/octet-stream") return response.blob();
|
|
82
86
|
return response.text();
|
|
83
87
|
};
|
|
@@ -130,7 +134,7 @@ const parseContentDispositionHeader = (contentDisposition) => {
|
|
|
130
134
|
};
|
|
131
135
|
const createFetchRequest = ({ url, method, params, options = {}, defaultOptions }) => {
|
|
132
136
|
const { baseUrl, validateStatus: defValidateStatus = defaultValidateStatus, headers: defaultHeaders, fetchFn: defaultFetchFn, ...restDefaultOptions } = defaultOptions;
|
|
133
|
-
const { validateStatus, queryArrayFormat, headers: endpointHeaders, fetchFn, ...restOptions } = options;
|
|
137
|
+
const { validateStatus, queryArrayFormat, headers: endpointHeaders, fetchFn, parseAs, ...restOptions } = options;
|
|
134
138
|
const headers = createHeaders(defaultHeaders, endpointHeaders);
|
|
135
139
|
const path = createPath(url, params.path);
|
|
136
140
|
const search = createSearch(params.query ?? {}, { arrayFormat: queryArrayFormat });
|
|
@@ -146,20 +150,22 @@ const createFetchRequest = ({ url, method, params, options = {}, defaultOptions
|
|
|
146
150
|
body
|
|
147
151
|
}),
|
|
148
152
|
validateStatus: validateStatus ?? defValidateStatus,
|
|
149
|
-
fetchFn: fetchFn ?? defaultFetchFn
|
|
153
|
+
fetchFn: fetchFn ?? defaultFetchFn,
|
|
154
|
+
parseAs
|
|
150
155
|
};
|
|
151
156
|
};
|
|
152
157
|
//#endregion
|
|
153
158
|
//#region src/fetchClient/createFetchClient/createFetchClient.ts
|
|
154
159
|
const isApiError = (error) => error instanceof ApiError;
|
|
155
160
|
const isAbortError = (error) => error instanceof DOMException && error.name === "AbortError";
|
|
161
|
+
const isTimeoutError = (error) => error instanceof DOMException && error.name === "TimeoutError";
|
|
156
162
|
const isFetchClientError = (error) => error instanceof TypeError || error instanceof SyntaxError || isApiError(error);
|
|
157
|
-
const coreFetch = async ({ request, validateStatus, fetchFn = fetch }) => {
|
|
163
|
+
const coreFetch = async ({ request, validateStatus, fetchFn = fetch, parseAs }) => {
|
|
158
164
|
const response = await fetchFn(request);
|
|
159
165
|
const apiResponse = {
|
|
160
166
|
request,
|
|
161
167
|
response,
|
|
162
|
-
data: await parseData(response)
|
|
168
|
+
data: await parseData(response, parseAs)
|
|
163
169
|
};
|
|
164
170
|
const boolOrError = validateStatus(apiResponse);
|
|
165
171
|
if (isApiError(boolOrError)) throw boolOrError;
|
|
@@ -187,6 +193,6 @@ const createFetchClient = ({ middlewares = [], ...defaultOptions }) => {
|
|
|
187
193
|
};
|
|
188
194
|
};
|
|
189
195
|
//#endregion
|
|
190
|
-
export {
|
|
196
|
+
export { isTimeoutError as a, defaultValidateStatus as c, parseContentDispositionHeader as d, ENCRYPTED_VALUE_PREFIX as f, ApiError as h, isFetchClientError as i, isHtmlResponse as l, KeboolaHttpHeader as m, isAbortError as n, HttpContentType as o, HttpStatus as p, isApiError as r, HttpHeader as s, createFetchClient as t, normalizeBaseUrl as u };
|
|
191
197
|
|
|
192
|
-
//# sourceMappingURL=createFetchClient-
|
|
198
|
+
//# sourceMappingURL=createFetchClient-DdyZMhxO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFetchClient-DdyZMhxO.js","names":[],"sources":["../src/errors/ApiError.ts","../src/internal.ts","../src/fetchClient/createFetchClient/utils.ts","../src/fetchClient/createFetchClient/createFetchClient.ts"],"sourcesContent":["import type { ApiResponse } from '../fetchClient/createFetchClient/types';\n\nexport class ApiError extends Error {\n response: Response;\n request: Request;\n data: unknown;\n\n constructor({ response, request, data }: ApiResponse) {\n super(response.statusText);\n this.response = response;\n this.request = request;\n this.data = data;\n }\n}\n","// Package-internal constants. Not part of the public\n// `@keboola/api-client/constants` sub-path (that is the `constants/` directory).\n\nexport const KeboolaHttpHeader = {\n STORAGE_API_TOKEN: 'X-StorageApi-Token',\n MANAGEMENT_API_TOKEN: 'X-Kbc-Manageapitoken',\n STORAGE_API_URL: 'x-storageapi-url',\n PROJECT_ID: 'X-KBC-ProjectId',\n /** Storage job a request enqueued, reported on the response rather than in its body. */\n STORAGE_API_JOB_ID: 'X-StorageApi-Job-Id',\n} as const;\n\nexport const HttpStatus = {\n NO_CONTENT: 204,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n UNPROCESSABLE_ENTITY: 422,\n INTERNAL_SERVER_ERROR: 500,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n} as const;\n\nexport const ENCRYPTED_VALUE_PREFIX = 'KBC::';\n","import type { IStringifyOptions } from 'qs';\nimport qs from 'qs';\n\nimport { HttpStatus } from '../../internal';\n\nimport type {\n ApiResponse,\n BodyParam,\n CreateFetchRequestFn,\n ParseAs,\n PathParam,\n ValidateStatusFn,\n} from './types';\n\n/**\n * Strips trailing slashes from a base URL so concatenating a leading-slash\n * path (e.g. `/v2/storage`) never produces a double slash.\n *\n * Without this, callers that pass `https://connection.keboola.com/` end up\n * issuing requests to `https://connection.keboola.com//v2/storage/...`, which\n * the Storage API rejects with a 404.\n */\nexport const normalizeBaseUrl = (baseUrl: string): string => baseUrl.replace(/\\/+$/, '');\n\nexport const HttpHeader = {\n CONTENT_TYPE: 'content-type',\n CONTENT_DISPOSITION: 'content-disposition',\n AUTHORIZATION: 'Authorization',\n IDEMPOTENCY_KEY: 'Idempotency-Key',\n IF_MATCH: 'If-Match',\n};\n\nexport const HttpContentType = {\n JSON: 'application/json',\n TEXT_PLAIN: 'text/plain',\n FORM_DATA: 'multipart/form-data',\n TEXT_HTML: 'text/html',\n};\n\nexport const defaultValidateStatus: ValidateStatusFn = ({ response }) =>\n response.status >= 200 && response.status <= 299;\n\n/**\n * Whether a response carries an HTML document.\n *\n * - Media types are case-insensitive, so a `Text/HTML` login page is still one.\n * - Only meaningful on a *successful* response: HTML on a failed one is a real error page.\n */\nexport const isHtmlResponse = ({ response }: ApiResponse) =>\n !!response.headers\n .get(HttpHeader.CONTENT_TYPE)\n ?.toLowerCase()\n .includes(HttpContentType.TEXT_HTML);\n\nfunction removeUndefined(obj: Record<string, string>) {\n const objCopy = { ...obj };\n for (const [key, value] of Object.entries(objCopy)) {\n if (value == null) delete objCopy[key];\n }\n return objCopy;\n}\n\n// `application/json`, but also `application/json; charset=utf-8` and the `+json` suffix family.\n// Comparing the raw header for equality misses every response that carries a charset.\nconst JSON_MEDIA_TYPE = /^application\\/([\\w.-]+\\+)?json$/;\n\nconst getMediaType = (response: Response) =>\n response.headers.get(HttpHeader.CONTENT_TYPE)?.split(';')[0]?.trim().toLowerCase() ?? '';\n\n// Declared JSON is parsed strictly: a body that doesn't parse is a broken response, not a text\n// payload, and `JSON.parse` throwing is the right answer. Read it as text first only so an empty\n// body can resolve to `null` like a 204 — matching the charset form brings `application/json;\n// charset=utf-8` onto this path, where `response.json()` would turn a 200-with-no-body into a\n// `SyntaxError` it never used to be.\nconst parseJson = async (response: Response) => {\n const text = await response.text();\n return text.trim() === '' ? null : JSON.parse(text);\n};\n\nexport const parseData = async (response: Response, parseAs: ParseAs = 'auto') => {\n // No body to read, whatever the caller asked for.\n if (response.status === HttpStatus.NO_CONTENT) return null;\n\n // Per-method-call override\n if (parseAs === 'text') return response.text();\n if (parseAs === 'blob') return response.blob();\n if (parseAs === 'json') return parseJson(response);\n\n const mediaType = getMediaType(response);\n if (JSON_MEDIA_TYPE.test(mediaType)) return parseJson(response);\n\n // A declared binary payload must come back as bytes — `text()` would decode it as UTF-8 and\n // corrupt it. `application/octet-stream` is the only binary type an endpoint declares today\n // (kai-agent's sandbox file download); widen deliberately, never by sniffing.\n if (mediaType === 'application/octet-stream') return response.blob();\n\n // Any other declared type describes its own payload — the query-service CSV export, the\n // data-science `text/plain` endpoints — so hand back the exact bytes instead of sniffing them.\n return response.text();\n};\n\n// Header instance serialize undefined value as `undefined`, we do not want that\nconst cleanHeadersInit = (headersInit: HeadersInit | undefined) => {\n if (Array.isArray(headersInit)) return headersInit;\n if (headersInit instanceof Headers) return headersInit;\n if (headersInit == null) return headersInit;\n\n return removeUndefined(headersInit);\n};\n\nconst createHeaders = (\n headersInitA: HeadersInit | undefined,\n headersInitB: HeadersInit | undefined,\n) => {\n const headersA = new Headers(cleanHeadersInit(headersInitA));\n const headersB = new Headers(cleanHeadersInit(headersInitB));\n\n headersB.forEach((value, key) => {\n headersA.set(key, value);\n });\n\n return headersA;\n};\n\nexport const createPath = (path: string, pathParam: PathParam = {}) =>\n path.replace(/\\{([^}]+)}/g, (_, key) => {\n if (!(key in pathParam))\n throw new Error(`Path parameter \"${key}\" is missing in the path \"${path}\"`);\n\n return encodeURIComponent(pathParam[key]!);\n });\n\nexport const createSearch = (\n query: Record<string, unknown>,\n options: Pick<IStringifyOptions, 'arrayFormat'> = {},\n) => {\n return qs.stringify(query, {\n encodeValuesOnly: true,\n skipNulls: true,\n ...options,\n });\n};\n\nexport const createBody = (body: BodyParam, headers: Headers) => {\n if (body == null) return null;\n if (body instanceof FormData) return body; // fetch automatically sets content-type header\n if (typeof body === 'string') return body; // fetch automatically sets content-type header\n\n const stringifyBody = JSON.stringify(body);\n const stringBody = stringifyBody === '{}' ? null : stringifyBody;\n if (stringBody) headers.set(HttpHeader.CONTENT_TYPE, HttpContentType.JSON);\n\n return stringBody;\n};\n\nexport const parseContentDispositionHeader = (contentDisposition?: string | null) => {\n // extract the type ('inline' or 'attachment'), default the type to 'unknown'\n const type = (() => {\n const typeMatch = contentDisposition?.match(/^\\s*(inline|attachment)\\s*;/i);\n return (typeMatch?.[1]?.toLowerCase() ?? 'unknown') as 'inline' | 'attachment' | 'unknown';\n })();\n\n // extract the filename, default the type to null\n const filename = (() => {\n const filenameMatch = contentDisposition?.match(/filename=\"([^\"]+)\"/i);\n if (filenameMatch) return filenameMatch[1];\n\n // If no filename=\"...\", check for encoded filename*=UTF-8''\n const encodedFilenameMatch = contentDisposition?.match(/filename\\*=(?:UTF-8'')?([^;]+)/i);\n if (encodedFilenameMatch?.[1]) return decodeURIComponent(encodedFilenameMatch[1]);\n\n // Check for unquoted filenames (rare but possible)\n const unquotedFilenameMatch = contentDisposition?.match(/filename=([^;]+)/i);\n return unquotedFilenameMatch?.[1] ?? null;\n })();\n\n // Return the parsed result\n return { type, filename };\n};\n\nexport const createFetchRequest: CreateFetchRequestFn = ({\n url,\n method,\n params,\n options = {},\n defaultOptions,\n}) => {\n const {\n baseUrl,\n validateStatus: defValidateStatus = defaultValidateStatus,\n headers: defaultHeaders,\n fetchFn: defaultFetchFn,\n ...restDefaultOptions\n } = defaultOptions;\n const {\n validateStatus,\n queryArrayFormat,\n headers: endpointHeaders,\n fetchFn,\n parseAs,\n ...restOptions\n } = options;\n\n const headers = createHeaders(defaultHeaders, endpointHeaders);\n const path = createPath(url, params.path);\n const search = createSearch(params.query ?? {}, { arrayFormat: queryArrayFormat });\n const body = createBody(params.body, headers);\n\n const urlInstance = new URL(normalizeBaseUrl(baseUrl) + path);\n urlInstance.search = search;\n\n const request = new Request(urlInstance, {\n ...restDefaultOptions,\n ...restOptions,\n headers,\n method: method.toUpperCase(),\n body,\n });\n\n return {\n request,\n validateStatus: validateStatus ?? defValidateStatus,\n fetchFn: fetchFn ?? defaultFetchFn,\n parseAs,\n };\n};\n","import { ApiError } from '../../errors';\n\nimport type {\n BaseFetchParams,\n CoreFetchFn,\n CreateFetchClientOptions,\n FetchClientOptions,\n HttpMethod,\n} from './types';\nimport { createFetchRequest, parseData } from './utils';\n\nexport type FetchClientError = TypeError | ApiError | SyntaxError | DOMException;\n\nexport const isApiError = (error: unknown): error is ApiError => error instanceof ApiError;\n\nexport const isAbortError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'AbortError';\n\nexport const isTimeoutError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'TimeoutError';\n\nexport const isFetchClientError = (error: unknown): error is FetchClientError =>\n error instanceof TypeError || error instanceof SyntaxError || isApiError(error);\n\n// `fetchFn` is resolved per request by `createFetchRequest` (endpoint option beats client option),\n// so a single request can swap the transport without rebuilding the client.\nconst coreFetch: CoreFetchFn = async ({ request, validateStatus, fetchFn = fetch, parseAs }) => {\n const response = await fetchFn(request);\n const data = await parseData(response, parseAs);\n\n const apiResponse = {\n request,\n response,\n data,\n };\n\n const boolOrError = validateStatus(apiResponse);\n if (isApiError(boolOrError)) throw boolOrError;\n if (!boolOrError) throw new ApiError(apiResponse);\n\n return apiResponse;\n};\n\nexport const createFetchClient = ({\n middlewares = [],\n ...defaultOptions\n}: CreateFetchClientOptions) => {\n const fetchWithMiddlewares = middlewares.reduceRight(\n (next, middleware) => middleware(next),\n coreFetch,\n );\n\n const createFetchMethod =\n (method: HttpMethod) =>\n async (url: string, params: BaseFetchParams, options: FetchClientOptions = {}) => {\n const request = createFetchRequest({\n url,\n method,\n params,\n defaultOptions,\n options,\n });\n\n const methodMiddlewares = options?.middlewares ?? [];\n\n return methodMiddlewares.reduceRight(\n (next, middleware) => middleware(next),\n fetchWithMiddlewares,\n )(request);\n };\n\n return {\n get: createFetchMethod('get'),\n post: createFetchMethod('post'),\n put: createFetchMethod('put'),\n patch: createFetchMethod('patch'),\n delete: createFetchMethod('delete'),\n };\n};\n"],"mappings":";;AAEA,IAAa,WAAb,cAA8B,MAAM;CAClC;CACA;CACA;CAEA,YAAY,EAAE,UAAU,SAAS,QAAqB;EACpD,MAAM,SAAS,UAAU;EACzB,KAAK,WAAW;EAChB,KAAK,UAAU;EACf,KAAK,OAAO;CACd;AACF;;;ACVA,MAAa,oBAAoB;CAC/B,mBAAmB;CACnB,sBAAsB;CACtB,iBAAiB;CACjB,YAAY;;CAEZ,oBAAoB;AACtB;AAEA,MAAa,aAAa;CACxB,YAAY;CACZ,aAAa;CACb,cAAc;CACd,sBAAsB;CACtB,uBAAuB;CACvB,aAAa;CACb,qBAAqB;CACrB,iBAAiB;AACnB;AAEA,MAAa,yBAAyB;;;;;;;;;;;ACDtC,MAAa,oBAAoB,YAA4B,QAAQ,QAAQ,QAAQ,EAAE;AAEvF,MAAa,aAAa;CACxB,cAAc;CACd,qBAAqB;CACrB,eAAe;CACf,iBAAiB;CACjB,UAAU;AACZ;AAEA,MAAa,kBAAkB;CAC7B,MAAM;CACN,YAAY;CACZ,WAAW;CACX,WAAW;AACb;AAEA,MAAa,yBA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,qBAC2B;CAC9B,MAAM,uBAAuB,YAAY,aACtC,MAAM,eAAe,WAAW,IAAI,GACrC,SACF;CAEA,MAAM,qBACH,WACD,OAAO,KAAa,QAAyB,UAA8B,CAAC,MAAM;EAChF,MAAM,UAAU,mBAAmB;GACjC;GACA;GACA;GACA;GACA;EACF,CAAC;EAID,QAF0B,SAAS,eAAe,CAAC,EAAA,CAE1B,aACtB,MAAM,eAAe,WAAW,IAAI,GACrC,oBACF,CAAC,CAAC,OAAO;CACX;CAEF,OAAO;EACL,KAAK,kBAAkB,KAAK;EAC5B,MAAM,kBAAkB,MAAM;EAC9B,KAAK,kBAAkB,KAAK;EAC5B,OAAO,kBAAkB,OAAO;EAChC,QAAQ,kBAAkB,QAAQ;CACpC;AACF"}
|
|
@@ -73,13 +73,17 @@ function removeUndefined(obj) {
|
|
|
73
73
|
}
|
|
74
74
|
const JSON_MEDIA_TYPE = /^application\/([\w.-]+\+)?json$/;
|
|
75
75
|
const getMediaType = (response) => response.headers.get(HttpHeader.CONTENT_TYPE)?.split(";")[0]?.trim().toLowerCase() ?? "";
|
|
76
|
-
const
|
|
76
|
+
const parseJson = async (response) => {
|
|
77
|
+
const text = await response.text();
|
|
78
|
+
return text.trim() === "" ? null : JSON.parse(text);
|
|
79
|
+
};
|
|
80
|
+
const parseData = async (response, parseAs = "auto") => {
|
|
77
81
|
if (response.status === HttpStatus.NO_CONTENT) return null;
|
|
82
|
+
if (parseAs === "text") return response.text();
|
|
83
|
+
if (parseAs === "blob") return response.blob();
|
|
84
|
+
if (parseAs === "json") return parseJson(response);
|
|
78
85
|
const mediaType = getMediaType(response);
|
|
79
|
-
if (JSON_MEDIA_TYPE.test(mediaType))
|
|
80
|
-
const text = await response.text();
|
|
81
|
-
return text.trim() === "" ? null : JSON.parse(text);
|
|
82
|
-
}
|
|
86
|
+
if (JSON_MEDIA_TYPE.test(mediaType)) return parseJson(response);
|
|
83
87
|
if (mediaType === "application/octet-stream") return response.blob();
|
|
84
88
|
return response.text();
|
|
85
89
|
};
|
|
@@ -132,7 +136,7 @@ const parseContentDispositionHeader = (contentDisposition) => {
|
|
|
132
136
|
};
|
|
133
137
|
const createFetchRequest = ({ url, method, params, options = {}, defaultOptions }) => {
|
|
134
138
|
const { baseUrl, validateStatus: defValidateStatus = defaultValidateStatus, headers: defaultHeaders, fetchFn: defaultFetchFn, ...restDefaultOptions } = defaultOptions;
|
|
135
|
-
const { validateStatus, queryArrayFormat, headers: endpointHeaders, fetchFn, ...restOptions } = options;
|
|
139
|
+
const { validateStatus, queryArrayFormat, headers: endpointHeaders, fetchFn, parseAs, ...restOptions } = options;
|
|
136
140
|
const headers = createHeaders(defaultHeaders, endpointHeaders);
|
|
137
141
|
const path = createPath(url, params.path);
|
|
138
142
|
const search = createSearch(params.query ?? {}, { arrayFormat: queryArrayFormat });
|
|
@@ -148,20 +152,22 @@ const createFetchRequest = ({ url, method, params, options = {}, defaultOptions
|
|
|
148
152
|
body
|
|
149
153
|
}),
|
|
150
154
|
validateStatus: validateStatus ?? defValidateStatus,
|
|
151
|
-
fetchFn: fetchFn ?? defaultFetchFn
|
|
155
|
+
fetchFn: fetchFn ?? defaultFetchFn,
|
|
156
|
+
parseAs
|
|
152
157
|
};
|
|
153
158
|
};
|
|
154
159
|
//#endregion
|
|
155
160
|
//#region src/fetchClient/createFetchClient/createFetchClient.ts
|
|
156
161
|
const isApiError = (error) => error instanceof ApiError;
|
|
157
162
|
const isAbortError = (error) => error instanceof DOMException && error.name === "AbortError";
|
|
163
|
+
const isTimeoutError = (error) => error instanceof DOMException && error.name === "TimeoutError";
|
|
158
164
|
const isFetchClientError = (error) => error instanceof TypeError || error instanceof SyntaxError || isApiError(error);
|
|
159
|
-
const coreFetch = async ({ request, validateStatus, fetchFn = fetch }) => {
|
|
165
|
+
const coreFetch = async ({ request, validateStatus, fetchFn = fetch, parseAs }) => {
|
|
160
166
|
const response = await fetchFn(request);
|
|
161
167
|
const apiResponse = {
|
|
162
168
|
request,
|
|
163
169
|
response,
|
|
164
|
-
data: await parseData(response)
|
|
170
|
+
data: await parseData(response, parseAs)
|
|
165
171
|
};
|
|
166
172
|
const boolOrError = validateStatus(apiResponse);
|
|
167
173
|
if (isApiError(boolOrError)) throw boolOrError;
|
|
@@ -261,6 +267,12 @@ Object.defineProperty(exports, "isHtmlResponse", {
|
|
|
261
267
|
return isHtmlResponse;
|
|
262
268
|
}
|
|
263
269
|
});
|
|
270
|
+
Object.defineProperty(exports, "isTimeoutError", {
|
|
271
|
+
enumerable: true,
|
|
272
|
+
get: function() {
|
|
273
|
+
return isTimeoutError;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
264
276
|
Object.defineProperty(exports, "normalizeBaseUrl", {
|
|
265
277
|
enumerable: true,
|
|
266
278
|
get: function() {
|
|
@@ -274,4 +286,4 @@ Object.defineProperty(exports, "parseContentDispositionHeader", {
|
|
|
274
286
|
}
|
|
275
287
|
});
|
|
276
288
|
|
|
277
|
-
//# sourceMappingURL=createFetchClient-
|
|
289
|
+
//# sourceMappingURL=createFetchClient-DvZvD31l.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFetchClient-DvZvD31l.cjs","names":[],"sources":["../src/errors/ApiError.ts","../src/internal.ts","../src/fetchClient/createFetchClient/utils.ts","../src/fetchClient/createFetchClient/createFetchClient.ts"],"sourcesContent":["import type { ApiResponse } from '../fetchClient/createFetchClient/types';\n\nexport class ApiError extends Error {\n response: Response;\n request: Request;\n data: unknown;\n\n constructor({ response, request, data }: ApiResponse) {\n super(response.statusText);\n this.response = response;\n this.request = request;\n this.data = data;\n }\n}\n","// Package-internal constants. Not part of the public\n// `@keboola/api-client/constants` sub-path (that is the `constants/` directory).\n\nexport const KeboolaHttpHeader = {\n STORAGE_API_TOKEN: 'X-StorageApi-Token',\n MANAGEMENT_API_TOKEN: 'X-Kbc-Manageapitoken',\n STORAGE_API_URL: 'x-storageapi-url',\n PROJECT_ID: 'X-KBC-ProjectId',\n /** Storage job a request enqueued, reported on the response rather than in its body. */\n STORAGE_API_JOB_ID: 'X-StorageApi-Job-Id',\n} as const;\n\nexport const HttpStatus = {\n NO_CONTENT: 204,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n UNPROCESSABLE_ENTITY: 422,\n INTERNAL_SERVER_ERROR: 500,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n} as const;\n\nexport const ENCRYPTED_VALUE_PREFIX = 'KBC::';\n","import type { IStringifyOptions } from 'qs';\nimport qs from 'qs';\n\nimport { HttpStatus } from '../../internal';\n\nimport type {\n ApiResponse,\n BodyParam,\n CreateFetchRequestFn,\n ParseAs,\n PathParam,\n ValidateStatusFn,\n} from './types';\n\n/**\n * Strips trailing slashes from a base URL so concatenating a leading-slash\n * path (e.g. `/v2/storage`) never produces a double slash.\n *\n * Without this, callers that pass `https://connection.keboola.com/` end up\n * issuing requests to `https://connection.keboola.com//v2/storage/...`, which\n * the Storage API rejects with a 404.\n */\nexport const normalizeBaseUrl = (baseUrl: string): string => baseUrl.replace(/\\/+$/, '');\n\nexport const HttpHeader = {\n CONTENT_TYPE: 'content-type',\n CONTENT_DISPOSITION: 'content-disposition',\n AUTHORIZATION: 'Authorization',\n IDEMPOTENCY_KEY: 'Idempotency-Key',\n IF_MATCH: 'If-Match',\n};\n\nexport const HttpContentType = {\n JSON: 'application/json',\n TEXT_PLAIN: 'text/plain',\n FORM_DATA: 'multipart/form-data',\n TEXT_HTML: 'text/html',\n};\n\nexport const defaultValidateStatus: ValidateStatusFn = ({ response }) =>\n response.status >= 200 && response.status <= 299;\n\n/**\n * Whether a response carries an HTML document.\n *\n * - Media types are case-insensitive, so a `Text/HTML` login page is still one.\n * - Only meaningful on a *successful* response: HTML on a failed one is a real error page.\n */\nexport const isHtmlResponse = ({ response }: ApiResponse) =>\n !!response.headers\n .get(HttpHeader.CONTENT_TYPE)\n ?.toLowerCase()\n .includes(HttpContentType.TEXT_HTML);\n\nfunction removeUndefined(obj: Record<string, string>) {\n const objCopy = { ...obj };\n for (const [key, value] of Object.entries(objCopy)) {\n if (value == null) delete objCopy[key];\n }\n return objCopy;\n}\n\n// `application/json`, but also `application/json; charset=utf-8` and the `+json` suffix family.\n// Comparing the raw header for equality misses every response that carries a charset.\nconst JSON_MEDIA_TYPE = /^application\\/([\\w.-]+\\+)?json$/;\n\nconst getMediaType = (response: Response) =>\n response.headers.get(HttpHeader.CONTENT_TYPE)?.split(';')[0]?.trim().toLowerCase() ?? '';\n\n// Declared JSON is parsed strictly: a body that doesn't parse is a broken response, not a text\n// payload, and `JSON.parse` throwing is the right answer. Read it as text first only so an empty\n// body can resolve to `null` like a 204 — matching the charset form brings `application/json;\n// charset=utf-8` onto this path, where `response.json()` would turn a 200-with-no-body into a\n// `SyntaxError` it never used to be.\nconst parseJson = async (response: Response) => {\n const text = await response.text();\n return text.trim() === '' ? null : JSON.parse(text);\n};\n\nexport const parseData = async (response: Response, parseAs: ParseAs = 'auto') => {\n // No body to read, whatever the caller asked for.\n if (response.status === HttpStatus.NO_CONTENT) return null;\n\n // Per-method-call override\n if (parseAs === 'text') return response.text();\n if (parseAs === 'blob') return response.blob();\n if (parseAs === 'json') return parseJson(response);\n\n const mediaType = getMediaType(response);\n if (JSON_MEDIA_TYPE.test(mediaType)) return parseJson(response);\n\n // A declared binary payload must come back as bytes — `text()` would decode it as UTF-8 and\n // corrupt it. `application/octet-stream` is the only binary type an endpoint declares today\n // (kai-agent's sandbox file download); widen deliberately, never by sniffing.\n if (mediaType === 'application/octet-stream') return response.blob();\n\n // Any other declared type describes its own payload — the query-service CSV export, the\n // data-science `text/plain` endpoints — so hand back the exact bytes instead of sniffing them.\n return response.text();\n};\n\n// Header instance serialize undefined value as `undefined`, we do not want that\nconst cleanHeadersInit = (headersInit: HeadersInit | undefined) => {\n if (Array.isArray(headersInit)) return headersInit;\n if (headersInit instanceof Headers) return headersInit;\n if (headersInit == null) return headersInit;\n\n return removeUndefined(headersInit);\n};\n\nconst createHeaders = (\n headersInitA: HeadersInit | undefined,\n headersInitB: HeadersInit | undefined,\n) => {\n const headersA = new Headers(cleanHeadersInit(headersInitA));\n const headersB = new Headers(cleanHeadersInit(headersInitB));\n\n headersB.forEach((value, key) => {\n headersA.set(key, value);\n });\n\n return headersA;\n};\n\nexport const createPath = (path: string, pathParam: PathParam = {}) =>\n path.replace(/\\{([^}]+)}/g, (_, key) => {\n if (!(key in pathParam))\n throw new Error(`Path parameter \"${key}\" is missing in the path \"${path}\"`);\n\n return encodeURIComponent(pathParam[key]!);\n });\n\nexport const createSearch = (\n query: Record<string, unknown>,\n options: Pick<IStringifyOptions, 'arrayFormat'> = {},\n) => {\n return qs.stringify(query, {\n encodeValuesOnly: true,\n skipNulls: true,\n ...options,\n });\n};\n\nexport const createBody = (body: BodyParam, headers: Headers) => {\n if (body == null) return null;\n if (body instanceof FormData) return body; // fetch automatically sets content-type header\n if (typeof body === 'string') return body; // fetch automatically sets content-type header\n\n const stringifyBody = JSON.stringify(body);\n const stringBody = stringifyBody === '{}' ? null : stringifyBody;\n if (stringBody) headers.set(HttpHeader.CONTENT_TYPE, HttpContentType.JSON);\n\n return stringBody;\n};\n\nexport const parseContentDispositionHeader = (contentDisposition?: string | null) => {\n // extract the type ('inline' or 'attachment'), default the type to 'unknown'\n const type = (() => {\n const typeMatch = contentDisposition?.match(/^\\s*(inline|attachment)\\s*;/i);\n return (typeMatch?.[1]?.toLowerCase() ?? 'unknown') as 'inline' | 'attachment' | 'unknown';\n })();\n\n // extract the filename, default the type to null\n const filename = (() => {\n const filenameMatch = contentDisposition?.match(/filename=\"([^\"]+)\"/i);\n if (filenameMatch) return filenameMatch[1];\n\n // If no filename=\"...\", check for encoded filename*=UTF-8''\n const encodedFilenameMatch = contentDisposition?.match(/filename\\*=(?:UTF-8'')?([^;]+)/i);\n if (encodedFilenameMatch?.[1]) return decodeURIComponent(encodedFilenameMatch[1]);\n\n // Check for unquoted filenames (rare but possible)\n const unquotedFilenameMatch = contentDisposition?.match(/filename=([^;]+)/i);\n return unquotedFilenameMatch?.[1] ?? null;\n })();\n\n // Return the parsed result\n return { type, filename };\n};\n\nexport const createFetchRequest: CreateFetchRequestFn = ({\n url,\n method,\n params,\n options = {},\n defaultOptions,\n}) => {\n const {\n baseUrl,\n validateStatus: defValidateStatus = defaultValidateStatus,\n headers: defaultHeaders,\n fetchFn: defaultFetchFn,\n ...restDefaultOptions\n } = defaultOptions;\n const {\n validateStatus,\n queryArrayFormat,\n headers: endpointHeaders,\n fetchFn,\n parseAs,\n ...restOptions\n } = options;\n\n const headers = createHeaders(defaultHeaders, endpointHeaders);\n const path = createPath(url, params.path);\n const search = createSearch(params.query ?? {}, { arrayFormat: queryArrayFormat });\n const body = createBody(params.body, headers);\n\n const urlInstance = new URL(normalizeBaseUrl(baseUrl) + path);\n urlInstance.search = search;\n\n const request = new Request(urlInstance, {\n ...restDefaultOptions,\n ...restOptions,\n headers,\n method: method.toUpperCase(),\n body,\n });\n\n return {\n request,\n validateStatus: validateStatus ?? defValidateStatus,\n fetchFn: fetchFn ?? defaultFetchFn,\n parseAs,\n };\n};\n","import { ApiError } from '../../errors';\n\nimport type {\n BaseFetchParams,\n CoreFetchFn,\n CreateFetchClientOptions,\n FetchClientOptions,\n HttpMethod,\n} from './types';\nimport { createFetchRequest, parseData } from './utils';\n\nexport type FetchClientError = TypeError | ApiError | SyntaxError | DOMException;\n\nexport const isApiError = (error: unknown): error is ApiError => error instanceof ApiError;\n\nexport const isAbortError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'AbortError';\n\nexport const isTimeoutError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'TimeoutError';\n\nexport const isFetchClientError = (error: unknown): error is FetchClientError =>\n error instanceof TypeError || error instanceof SyntaxError || isApiError(error);\n\n// `fetchFn` is resolved per request by `createFetchRequest` (endpoint option beats client option),\n// so a single request can swap the transport without rebuilding the client.\nconst coreFetch: CoreFetchFn = async ({ request, validateStatus, fetchFn = fetch, parseAs }) => {\n const response = await fetchFn(request);\n const data = await parseData(response, parseAs);\n\n const apiResponse = {\n request,\n response,\n data,\n };\n\n const boolOrError = validateStatus(apiResponse);\n if (isApiError(boolOrError)) throw boolOrError;\n if (!boolOrError) throw new ApiError(apiResponse);\n\n return apiResponse;\n};\n\nexport const createFetchClient = ({\n middlewares = [],\n ...defaultOptions\n}: CreateFetchClientOptions) => {\n const fetchWithMiddlewares = middlewares.reduceRight(\n (next, middleware) => middleware(next),\n coreFetch,\n );\n\n const createFetchMethod =\n (method: HttpMethod) =>\n async (url: string, params: BaseFetchParams, options: FetchClientOptions = {}) => {\n const request = createFetchRequest({\n url,\n method,\n params,\n defaultOptions,\n options,\n });\n\n const methodMiddlewares = options?.middlewares ?? [];\n\n return methodMiddlewares.reduceRight(\n (next, middleware) => middleware(next),\n fetchWithMiddlewares,\n )(request);\n };\n\n return {\n get: createFetchMethod('get'),\n post: createFetchMethod('post'),\n put: createFetchMethod('put'),\n patch: createFetchMethod('patch'),\n delete: createFetchMethod('delete'),\n };\n};\n"],"mappings":";;;;AAEA,IAAa,WAAb,cAA8B,MAAM;CAClC;CACA;CACA;CAEA,YAAY,EAAE,UAAU,SAAS,QAAqB;EACpD,MAAM,SAAS,UAAU;EACzB,KAAK,WAAW;EAChB,KAAK,UAAU;EACf,KAAK,OAAO;CACd;AACF;;;ACVA,MAAa,oBAAoB;CAC/B,mBAAmB;CACnB,sBAAsB;CACtB,iBAAiB;CACjB,YAAY;;CAEZ,oBAAoB;AACtB;AAEA,MAAa,aAAa;CACxB,YAAY;CACZ,aAAa;CACb,cAAc;CACd,sBAAsB;CACtB,uBAAuB;CACvB,aAAa;CACb,qBAAqB;CACrB,iBAAiB;AACnB;AAEA,MAAa,yBAAyB;;;;;;;;;;;ACDtC,MAAa,oBAAoB,YAA4B,QAAQ,QAAQ,QAAQ,EAAE;AAEvF,MAAa,aAAa;CACxB,cAAc;CACd,qBAAqB;CACrB,eAAe;CACf,iBAAiB;CACjB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AAI,CAAC,aAAa,MAAM,IAAI,SAAS,WAAW;CAEhD,OAAO;AACT;AAEA,MAAa,qBAAqB,EAChC,cAAc,CAAC,GACf,GAAG,qBAC2B;CAC9B,MAAM,uBAAuB,YAAY,aACtC,MAAM,eAAe,WAAW,IAAI,GACrC,SACF;CAEA,MAAM,qBACH,WACD,OAAO,KAAa,QAAyB,UAA8B,CAAC,MAAM;EAChF,MAAM,UAAU,mBAAmB;GACjC;GACA;GACA;GACA;GACA;EACF,CAAC;EAID,QAF0B,SAAS,eAAe,CAAC,EAAA,CAE1B,aACtB,MAAM,eAAe,WAAW,IAAI,GACrC,oBACF,CAAC,CAAC,OAAO;CACX;CAEF,OAAO;EACL,KAAK,kBAAkB,KAAK;EAC5B,MAAM,kBAAkB,MAAM;EAC9B,KAAK,kBAAkB,KAAK;EAC5B,OAAO,kBAAkB,OAAO;EAChC,QAAQ,kBAAkB,QAAQ;CACpC;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createFetchClient } from "./createFetchClient-
|
|
1
|
+
import { t as createFetchClient } from "./createFetchClient-DdyZMhxO.js";
|
|
2
2
|
//#region src/fetchClient/createGenericFetchClient.ts
|
|
3
3
|
const createGenericFetchClient = (defaultOptions) => createFetchClient(defaultOptions);
|
|
4
4
|
//#endregion
|
|
5
5
|
export { createGenericFetchClient as t };
|
|
6
6
|
|
|
7
|
-
//# sourceMappingURL=createGenericFetchClient-
|
|
7
|
+
//# sourceMappingURL=createGenericFetchClient-MQeLRiNW.js.map
|
package/dist/{createGenericFetchClient-DhpvUSlX.js.map → createGenericFetchClient-MQeLRiNW.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createGenericFetchClient-
|
|
1
|
+
{"version":3,"file":"createGenericFetchClient-MQeLRiNW.js","names":[],"sources":["../src/fetchClient/createGenericFetchClient.ts"],"sourcesContent":["import type {\n ApiResponse,\n BodyParam,\n CreateFetchClientOptions,\n FetchClientOptions,\n PathParam,\n QueryParam,\n} from './createFetchClient';\nimport { createFetchClient } from './createFetchClient';\n\ntype FetchParams<Path = PathParam, Query = QueryParam, Body = BodyParam> = {\n path?: Path;\n query?: Query;\n body?: Body;\n};\n\ntype FetchMethod = <Data, Path = PathParam, Query = QueryParam, Body = BodyParam>(\n url: string,\n params: FetchParams<Path, Query, Body>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<Data>>;\n\ntype FetchClient = {\n get: FetchMethod;\n post: FetchMethod;\n put: FetchMethod;\n patch: FetchMethod;\n delete: FetchMethod;\n};\n\nexport const createGenericFetchClient = (defaultOptions: CreateFetchClientOptions) =>\n createFetchClient(defaultOptions) as FetchClient;\n"],"mappings":";;AA8BA,MAAa,4BAA4B,mBACvC,kBAAkB,cAAc"}
|
package/dist/{createGenericFetchClient-BWoSkTki.cjs → createGenericFetchClient-qfCZlCTv.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_createFetchClient = require("./createFetchClient-
|
|
1
|
+
const require_createFetchClient = require("./createFetchClient-DvZvD31l.cjs");
|
|
2
2
|
//#region src/fetchClient/createGenericFetchClient.ts
|
|
3
3
|
const createGenericFetchClient = (defaultOptions) => require_createFetchClient.createFetchClient(defaultOptions);
|
|
4
4
|
//#endregion
|
|
@@ -9,4 +9,4 @@ Object.defineProperty(exports, "createGenericFetchClient", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
//# sourceMappingURL=createGenericFetchClient-
|
|
12
|
+
//# sourceMappingURL=createGenericFetchClient-qfCZlCTv.cjs.map
|
package/dist/{createGenericFetchClient-BWoSkTki.cjs.map → createGenericFetchClient-qfCZlCTv.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createGenericFetchClient-
|
|
1
|
+
{"version":3,"file":"createGenericFetchClient-qfCZlCTv.cjs","names":["createFetchClient"],"sources":["../src/fetchClient/createGenericFetchClient.ts"],"sourcesContent":["import type {\n ApiResponse,\n BodyParam,\n CreateFetchClientOptions,\n FetchClientOptions,\n PathParam,\n QueryParam,\n} from './createFetchClient';\nimport { createFetchClient } from './createFetchClient';\n\ntype FetchParams<Path = PathParam, Query = QueryParam, Body = BodyParam> = {\n path?: Path;\n query?: Query;\n body?: Body;\n};\n\ntype FetchMethod = <Data, Path = PathParam, Query = QueryParam, Body = BodyParam>(\n url: string,\n params: FetchParams<Path, Query, Body>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<Data>>;\n\ntype FetchClient = {\n get: FetchMethod;\n post: FetchMethod;\n put: FetchMethod;\n patch: FetchMethod;\n delete: FetchMethod;\n};\n\nexport const createGenericFetchClient = (defaultOptions: CreateFetchClientOptions) =>\n createFetchClient(defaultOptions) as FetchClient;\n"],"mappings":";;AA8BA,MAAa,4BAA4B,mBACvCA,0BAAAA,kBAAkB,cAAc"}
|
package/dist/{createOpenapiFetchClient-yirrW6Tg.cjs → createOpenapiFetchClient-C57Ljzi6.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_createFetchClient = require("./createFetchClient-
|
|
1
|
+
const require_createFetchClient = require("./createFetchClient-DvZvD31l.cjs");
|
|
2
2
|
//#region src/fetchClient/createOpenapiFetchClient.ts
|
|
3
3
|
const createOpenapiFetchClient = (defaultOptions) => require_createFetchClient.createFetchClient(defaultOptions);
|
|
4
4
|
//#endregion
|
|
@@ -9,4 +9,4 @@ Object.defineProperty(exports, "createOpenapiFetchClient", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
//# sourceMappingURL=createOpenapiFetchClient-
|
|
12
|
+
//# sourceMappingURL=createOpenapiFetchClient-C57Ljzi6.cjs.map
|
package/dist/{createOpenapiFetchClient-yirrW6Tg.cjs.map → createOpenapiFetchClient-C57Ljzi6.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createOpenapiFetchClient-
|
|
1
|
+
{"version":3,"file":"createOpenapiFetchClient-C57Ljzi6.cjs","names":["createFetchClient"],"sources":["../src/fetchClient/createOpenapiFetchClient.ts"],"sourcesContent":["import {\n type ApiResponse,\n createFetchClient,\n type CreateFetchClientOptions,\n type FetchClientOptions,\n type HttpMethod,\n} from './createFetchClient';\nimport type { OpenapiParametersType, OpenapiReturnType } from './types';\n\ntype OpenapiPaths<Paths> = {\n [P in keyof Paths]: {\n [M in HttpMethod]?: unknown;\n };\n};\n\ntype PathsWithMethod<Paths extends OpenapiPaths<Paths>, PathnameMethod extends HttpMethod> = {\n [Pathname in keyof Paths]: Paths[Pathname] extends {\n [K in PathnameMethod]: any;\n }\n ? Pathname\n : never;\n}[keyof Paths];\n\ntype FetchMethod<Paths extends OpenapiPaths<Paths>, Method extends HttpMethod> = <\n Path extends PathsWithMethod<Paths, Method>,\n>(\n url: Path,\n params: OpenapiParametersType<Paths[Path][Method]>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<OpenapiReturnType<Paths[Path][Method]>>>;\n\ntype FetchClient<Paths extends OpenapiPaths<Paths>> = {\n get: FetchMethod<Paths, 'get'>;\n post: FetchMethod<Paths, 'post'>;\n put: FetchMethod<Paths, 'put'>;\n patch: FetchMethod<Paths, 'patch'>;\n delete: FetchMethod<Paths, 'delete'>;\n};\n\nexport const createOpenapiFetchClient = <Paths extends OpenapiPaths<Paths>>(\n defaultOptions: CreateFetchClientOptions,\n) => createFetchClient(defaultOptions) as FetchClient<Paths>;\n"],"mappings":";;AAuCA,MAAa,4BACX,mBACGA,0BAAAA,kBAAkB,cAAc"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createFetchClient } from "./createFetchClient-
|
|
1
|
+
import { t as createFetchClient } from "./createFetchClient-DdyZMhxO.js";
|
|
2
2
|
//#region src/fetchClient/createOpenapiFetchClient.ts
|
|
3
3
|
const createOpenapiFetchClient = (defaultOptions) => createFetchClient(defaultOptions);
|
|
4
4
|
//#endregion
|
|
5
5
|
export { createOpenapiFetchClient as t };
|
|
6
6
|
|
|
7
|
-
//# sourceMappingURL=createOpenapiFetchClient-
|
|
7
|
+
//# sourceMappingURL=createOpenapiFetchClient-E7OIVkYv.js.map
|
package/dist/{createOpenapiFetchClient-0_oqhdPv.js.map → createOpenapiFetchClient-E7OIVkYv.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createOpenapiFetchClient-
|
|
1
|
+
{"version":3,"file":"createOpenapiFetchClient-E7OIVkYv.js","names":[],"sources":["../src/fetchClient/createOpenapiFetchClient.ts"],"sourcesContent":["import {\n type ApiResponse,\n createFetchClient,\n type CreateFetchClientOptions,\n type FetchClientOptions,\n type HttpMethod,\n} from './createFetchClient';\nimport type { OpenapiParametersType, OpenapiReturnType } from './types';\n\ntype OpenapiPaths<Paths> = {\n [P in keyof Paths]: {\n [M in HttpMethod]?: unknown;\n };\n};\n\ntype PathsWithMethod<Paths extends OpenapiPaths<Paths>, PathnameMethod extends HttpMethod> = {\n [Pathname in keyof Paths]: Paths[Pathname] extends {\n [K in PathnameMethod]: any;\n }\n ? Pathname\n : never;\n}[keyof Paths];\n\ntype FetchMethod<Paths extends OpenapiPaths<Paths>, Method extends HttpMethod> = <\n Path extends PathsWithMethod<Paths, Method>,\n>(\n url: Path,\n params: OpenapiParametersType<Paths[Path][Method]>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<OpenapiReturnType<Paths[Path][Method]>>>;\n\ntype FetchClient<Paths extends OpenapiPaths<Paths>> = {\n get: FetchMethod<Paths, 'get'>;\n post: FetchMethod<Paths, 'post'>;\n put: FetchMethod<Paths, 'put'>;\n patch: FetchMethod<Paths, 'patch'>;\n delete: FetchMethod<Paths, 'delete'>;\n};\n\nexport const createOpenapiFetchClient = <Paths extends OpenapiPaths<Paths>>(\n defaultOptions: CreateFetchClientOptions,\n) => createFetchClient(defaultOptions) as FetchClient<Paths>;\n"],"mappings":";;AAuCA,MAAa,4BACX,mBACG,kBAAkB,cAAc"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as dedupe } from "./dedupe-DYIHgZoG.js";
|
|
2
|
-
import {
|
|
2
|
+
import { h as ApiError, p as HttpStatus } from "./createFetchClient-DdyZMhxO.js";
|
|
3
3
|
//#region src/keboola/bearer/credential.ts
|
|
4
4
|
const DEFAULT_REFRESH_THRESHOLD = .9;
|
|
5
5
|
const isUnauthorized = (error) => error instanceof ApiError && error.response.status === HttpStatus.UNAUTHORIZED;
|
|
@@ -12,7 +12,7 @@ const createBearerCredential = ({ refresh, getToken, onSessionExpired, refreshTh
|
|
|
12
12
|
throw error;
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
let refreshShared = dedupe(doRefresh);
|
|
16
16
|
const refreshAt = (timing) => timing.issuedAt + timing.expiresIn * 1e3 * refreshThreshold;
|
|
17
17
|
const getAccessToken = async ({ forceRefresh = false } = {}) => {
|
|
18
18
|
const snapshot = getToken();
|
|
@@ -24,10 +24,13 @@ const createBearerCredential = ({ refresh, getToken, onSessionExpired, refreshTh
|
|
|
24
24
|
};
|
|
25
25
|
return {
|
|
26
26
|
getAccessToken,
|
|
27
|
-
notifyExpired: () => onSessionExpired?.()
|
|
27
|
+
notifyExpired: () => onSessionExpired?.(),
|
|
28
|
+
abandonRefresh: () => {
|
|
29
|
+
refreshShared = dedupe(doRefresh);
|
|
30
|
+
}
|
|
28
31
|
};
|
|
29
32
|
};
|
|
30
33
|
//#endregion
|
|
31
34
|
export { isUnauthorized as n, createBearerCredential as t };
|
|
32
35
|
|
|
33
|
-
//# sourceMappingURL=credential-
|
|
36
|
+
//# sourceMappingURL=credential-Bxv7yxOZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-Bxv7yxOZ.js","names":[],"sources":["../src/keboola/bearer/credential.ts"],"sourcesContent":["import { ApiError } from '../../errors';\nimport { HttpStatus } from '../../internal';\nimport { dedupe } from '../../utils';\n\ntype TokenTiming = { issuedAt: number; expiresIn: number };\ntype TokenSnapshot = { accessToken: string; timing: TokenTiming };\n\ntype Options = {\n // Rotate the credential (single-use refresh-token flow); resolves to the fresh access token.\n refresh: () => Promise<string>;\n // Live read of the current token + timing from the single source of truth (config). `null` when the\n // session is anonymous (no credential yet) — e.g. a pre-auth `login` request.\n getToken: () => TokenSnapshot | null;\n // Called when the session is found dead (refresh or replay rejected). The caller owns the\n // fire-once latch + per-session re-arm (see `config.notifyExpired`), so this may fire more than once.\n onSessionExpired?: () => void;\n refreshThreshold?: number;\n};\n\nconst DEFAULT_REFRESH_THRESHOLD = 0.9;\n\nexport const isUnauthorized = (error: unknown): boolean =>\n error instanceof ApiError && error.response.status === HttpStatus.UNAUTHORIZED;\n\nexport type BearerCredential = {\n // Resolves the current access token, or `null` when the session is anonymous (nothing to stamp).\n getAccessToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n notifyExpired: () => void;\n /**\n * Forget any in-flight rotation, so the next caller starts one of its own. Call on session death.\n *\n * - The dedupe slot is per-session state living on a cross-session singleton — the same reason\n * `config` and not this credential owns the expiry latch.\n * - Without it a request from the *next* session joins the dying session's run, and `refresh`\n * refuses that result for belonging to a session that ended (see `keboola.ts`).\n * - Does not cancel the run: whoever already joined it still gets its outcome.\n */\n abandonRefresh: () => void;\n};\n\nexport const createBearerCredential = ({\n refresh,\n getToken,\n onSessionExpired,\n refreshThreshold = DEFAULT_REFRESH_THRESHOLD,\n}: Options): BearerCredential => {\n const doRefresh = async (): Promise<string> => {\n try {\n return await refresh();\n } catch (error) {\n if (isUnauthorized(error)) onSessionExpired?.();\n throw error;\n }\n };\n\n // Reassigned, not mutated: a fresh `dedupe` is a fresh slot, and the abandoned one keeps its joiners.\n let refreshShared = dedupe(doRefresh);\n\n const refreshAt = (timing: TokenTiming): number =>\n timing.issuedAt + timing.expiresIn * 1000 * refreshThreshold;\n\n const getAccessToken = async ({ forceRefresh = false } = {}): Promise<string | null> => {\n const snapshot = getToken();\n if (snapshot === null) return null; // anonymous: nothing to stamp (pre-auth request)\n const { accessToken, timing } = snapshot;\n if (forceRefresh) return refreshShared(); // 401 path: must succeed, propagate failure\n if (Date.now() < refreshAt(timing)) return accessToken; // still fresh: current token\n // Proactive: best-effort — if the ahead-of-time refresh fails, proceed with the current token\n // and let a real 401 drive the mandatory refresh.\n return refreshShared().catch(() => accessToken);\n };\n\n return {\n getAccessToken,\n notifyExpired: () => onSessionExpired?.(),\n abandonRefresh: () => {\n refreshShared = dedupe(doRefresh);\n },\n };\n};\n"],"mappings":";;;AAmBA,MAAM,4BAA4B;AAElC,MAAa,kBAAkB,UAC7B,iBAAiB,YAAY,MAAM,SAAS,WAAW,WAAW;AAkBpE,MAAa,0BAA0B,EACrC,SACA,UACA,kBACA,mBAAmB,gCACY;CAC/B,MAAM,YAAY,YAA6B;EAC7C,IAAI;GACF,OAAO,MAAM,QAAQ;EACvB,SAAS,OAAO;GACd,IAAI,eAAe,KAAK,GAAG,mBAAmB;GAC9C,MAAM;EACR;CACF;CAGA,IAAI,gBAAgB,OAAO,SAAS;CAEpC,MAAM,aAAa,WACjB,OAAO,WAAW,OAAO,YAAY,MAAO;CAE9C,MAAM,iBAAiB,OAAO,EAAE,eAAe,UAAU,CAAC,MAA8B;EACtF,MAAM,WAAW,SAAS;EAC1B,IAAI,aAAa,MAAM,OAAO;EAC9B,MAAM,EAAE,aAAa,WAAW;EAChC,IAAI,cAAc,OAAO,cAAc;EACvC,IAAI,KAAK,IAAI,IAAI,UAAU,MAAM,GAAG,OAAO;EAG3C,OAAO,cAAc,CAAC,CAAC,YAAY,WAAW;CAChD;CAEA,OAAO;EACL;EACA,qBAAqB,mBAAmB;EACxC,sBAAsB;GACpB,gBAAgB,OAAO,SAAS;EAClC;CACF;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_dedupe = require("./dedupe-CiskLkGR.cjs");
|
|
2
|
-
const require_createFetchClient = require("./createFetchClient-
|
|
2
|
+
const require_createFetchClient = require("./createFetchClient-DvZvD31l.cjs");
|
|
3
3
|
//#region src/keboola/bearer/credential.ts
|
|
4
4
|
const DEFAULT_REFRESH_THRESHOLD = .9;
|
|
5
5
|
const isUnauthorized = (error) => error instanceof require_createFetchClient.ApiError && error.response.status === require_createFetchClient.HttpStatus.UNAUTHORIZED;
|
|
@@ -12,7 +12,7 @@ const createBearerCredential = ({ refresh, getToken, onSessionExpired, refreshTh
|
|
|
12
12
|
throw error;
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
let refreshShared = require_dedupe.dedupe(doRefresh);
|
|
16
16
|
const refreshAt = (timing) => timing.issuedAt + timing.expiresIn * 1e3 * refreshThreshold;
|
|
17
17
|
const getAccessToken = async ({ forceRefresh = false } = {}) => {
|
|
18
18
|
const snapshot = getToken();
|
|
@@ -24,7 +24,10 @@ const createBearerCredential = ({ refresh, getToken, onSessionExpired, refreshTh
|
|
|
24
24
|
};
|
|
25
25
|
return {
|
|
26
26
|
getAccessToken,
|
|
27
|
-
notifyExpired: () => onSessionExpired?.()
|
|
27
|
+
notifyExpired: () => onSessionExpired?.(),
|
|
28
|
+
abandonRefresh: () => {
|
|
29
|
+
refreshShared = require_dedupe.dedupe(doRefresh);
|
|
30
|
+
}
|
|
28
31
|
};
|
|
29
32
|
};
|
|
30
33
|
//#endregion
|
|
@@ -41,4 +44,4 @@ Object.defineProperty(exports, "isUnauthorized", {
|
|
|
41
44
|
}
|
|
42
45
|
});
|
|
43
46
|
|
|
44
|
-
//# sourceMappingURL=credential-D-
|
|
47
|
+
//# sourceMappingURL=credential-D-X5QQrM.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-D-X5QQrM.cjs","names":["ApiError","HttpStatus","dedupe"],"sources":["../src/keboola/bearer/credential.ts"],"sourcesContent":["import { ApiError } from '../../errors';\nimport { HttpStatus } from '../../internal';\nimport { dedupe } from '../../utils';\n\ntype TokenTiming = { issuedAt: number; expiresIn: number };\ntype TokenSnapshot = { accessToken: string; timing: TokenTiming };\n\ntype Options = {\n // Rotate the credential (single-use refresh-token flow); resolves to the fresh access token.\n refresh: () => Promise<string>;\n // Live read of the current token + timing from the single source of truth (config). `null` when the\n // session is anonymous (no credential yet) — e.g. a pre-auth `login` request.\n getToken: () => TokenSnapshot | null;\n // Called when the session is found dead (refresh or replay rejected). The caller owns the\n // fire-once latch + per-session re-arm (see `config.notifyExpired`), so this may fire more than once.\n onSessionExpired?: () => void;\n refreshThreshold?: number;\n};\n\nconst DEFAULT_REFRESH_THRESHOLD = 0.9;\n\nexport const isUnauthorized = (error: unknown): boolean =>\n error instanceof ApiError && error.response.status === HttpStatus.UNAUTHORIZED;\n\nexport type BearerCredential = {\n // Resolves the current access token, or `null` when the session is anonymous (nothing to stamp).\n getAccessToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n notifyExpired: () => void;\n /**\n * Forget any in-flight rotation, so the next caller starts one of its own. Call on session death.\n *\n * - The dedupe slot is per-session state living on a cross-session singleton — the same reason\n * `config` and not this credential owns the expiry latch.\n * - Without it a request from the *next* session joins the dying session's run, and `refresh`\n * refuses that result for belonging to a session that ended (see `keboola.ts`).\n * - Does not cancel the run: whoever already joined it still gets its outcome.\n */\n abandonRefresh: () => void;\n};\n\nexport const createBearerCredential = ({\n refresh,\n getToken,\n onSessionExpired,\n refreshThreshold = DEFAULT_REFRESH_THRESHOLD,\n}: Options): BearerCredential => {\n const doRefresh = async (): Promise<string> => {\n try {\n return await refresh();\n } catch (error) {\n if (isUnauthorized(error)) onSessionExpired?.();\n throw error;\n }\n };\n\n // Reassigned, not mutated: a fresh `dedupe` is a fresh slot, and the abandoned one keeps its joiners.\n let refreshShared = dedupe(doRefresh);\n\n const refreshAt = (timing: TokenTiming): number =>\n timing.issuedAt + timing.expiresIn * 1000 * refreshThreshold;\n\n const getAccessToken = async ({ forceRefresh = false } = {}): Promise<string | null> => {\n const snapshot = getToken();\n if (snapshot === null) return null; // anonymous: nothing to stamp (pre-auth request)\n const { accessToken, timing } = snapshot;\n if (forceRefresh) return refreshShared(); // 401 path: must succeed, propagate failure\n if (Date.now() < refreshAt(timing)) return accessToken; // still fresh: current token\n // Proactive: best-effort — if the ahead-of-time refresh fails, proceed with the current token\n // and let a real 401 drive the mandatory refresh.\n return refreshShared().catch(() => accessToken);\n };\n\n return {\n getAccessToken,\n notifyExpired: () => onSessionExpired?.(),\n abandonRefresh: () => {\n refreshShared = dedupe(doRefresh);\n },\n };\n};\n"],"mappings":";;;AAmBA,MAAM,4BAA4B;AAElC,MAAa,kBAAkB,UAC7B,iBAAiBA,0BAAAA,YAAY,MAAM,SAAS,WAAWC,0BAAAA,WAAW;AAkBpE,MAAa,0BAA0B,EACrC,SACA,UACA,kBACA,mBAAmB,gCACY;CAC/B,MAAM,YAAY,YAA6B;EAC7C,IAAI;GACF,OAAO,MAAM,QAAQ;EACvB,SAAS,OAAO;GACd,IAAI,eAAe,KAAK,GAAG,mBAAmB;GAC9C,MAAM;EACR;CACF;CAGA,IAAI,gBAAgBC,eAAAA,OAAO,SAAS;CAEpC,MAAM,aAAa,WACjB,OAAO,WAAW,OAAO,YAAY,MAAO;CAE9C,MAAM,iBAAiB,OAAO,EAAE,eAAe,UAAU,CAAC,MAA8B;EACtF,MAAM,WAAW,SAAS;EAC1B,IAAI,aAAa,MAAM,OAAO;EAC9B,MAAM,EAAE,aAAa,WAAW;EAChC,IAAI,cAAc,OAAO,cAAc;EACvC,IAAI,KAAK,IAAI,IAAI,UAAU,MAAM,GAAG,OAAO;EAG3C,OAAO,cAAc,CAAC,CAAC,YAAY,WAAW;CAChD;CAEA,OAAO;EACL;EACA,qBAAqB,mBAAmB;EACxC,sBAAsB;GACpB,gBAAgBA,eAAAA,OAAO,SAAS;EAClC;CACF;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_appLogs = require("../appLogs-
|
|
3
|
-
const require_dataScience = require("../dataScience-
|
|
2
|
+
const require_appLogs = require("../appLogs-D8K0VeNM.cjs");
|
|
3
|
+
const require_dataScience = require("../dataScience-BPW993AG.cjs");
|
|
4
4
|
exports.createDataScienceClient = require_dataScience.createDataScienceClient;
|
|
5
5
|
exports.parseLogLines = require_appLogs.parseLogLines;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as parseLogLines } from "../appLogs-
|
|
2
|
-
import { t as createDataScienceClient } from "../index-
|
|
1
|
+
import { n as parseLogLines } from "../appLogs-Q4A7A_Fc.cjs";
|
|
2
|
+
import { t as createDataScienceClient } from "../index-t-a7kYnx.cjs";
|
|
3
3
|
export { createDataScienceClient, parseLogLines };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as parseLogLines } from "../appLogs-
|
|
2
|
-
import { t as createDataScienceClient } from "../index-
|
|
1
|
+
import { n as parseLogLines } from "../appLogs-u0XMZLjS.js";
|
|
2
|
+
import { t as createDataScienceClient } from "../index-BjKjp3Rf.js";
|
|
3
3
|
export { createDataScienceClient, parseLogLines };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as parseLogLines } from "../appLogs-
|
|
2
|
-
import { t as createDataScienceClient } from "../dataScience-
|
|
1
|
+
import { t as parseLogLines } from "../appLogs-D72eD8vP.js";
|
|
2
|
+
import { t as createDataScienceClient } from "../dataScience-B_TA7wCB.js";
|
|
3
3
|
export { createDataScienceClient, parseLogLines };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as LogEntry } from "../appLogs-
|
|
2
|
-
import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-
|
|
1
|
+
import { t as LogEntry } from "../appLogs-Q4A7A_Fc.cjs";
|
|
2
|
+
import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-CCr1-9Q6.cjs";
|
|
3
3
|
export { CreateDataAppBody, DataApp, DataAppRun, DeleteDataAppPath, DeleteSandboxPath, GetAppsQuery, GetDataAppLogsDownloadPath, GetDataAppLogsTailPath, GetDataAppLogsTailQuery, GetDataAppPasswordPath, GetDataAppPath, GetDataAppRunPath, GetDataAppRunsPath, GetDataAppRunsQuery, GetSandboxPath, type LogEntry, PatchDataAppBody, PatchDataAppPath, RawAppRun, ResetDataAppPasswordPath, Runtime, RuntimeImageKey, Sandbox };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as LogEntry } from "../appLogs-
|
|
2
|
-
import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-
|
|
1
|
+
import { t as LogEntry } from "../appLogs-u0XMZLjS.js";
|
|
2
|
+
import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-Ur37iOqb.js";
|
|
3
3
|
export { CreateDataAppBody, DataApp, DataAppRun, DeleteDataAppPath, DeleteSandboxPath, GetAppsQuery, GetDataAppLogsDownloadPath, GetDataAppLogsTailPath, GetDataAppLogsTailQuery, GetDataAppPasswordPath, GetDataAppPath, GetDataAppRunPath, GetDataAppRunsPath, GetDataAppRunsQuery, GetSandboxPath, type LogEntry, PatchDataAppBody, PatchDataAppPath, RawAppRun, ResetDataAppPasswordPath, Runtime, RuntimeImageKey, Sandbox };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_createGenericFetchClient = require("./createGenericFetchClient-
|
|
2
|
-
const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-
|
|
3
|
-
const require_auth = require("./auth-
|
|
4
|
-
const require_appLogs = require("./appLogs-
|
|
1
|
+
const require_createGenericFetchClient = require("./createGenericFetchClient-qfCZlCTv.cjs");
|
|
2
|
+
const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-C57Ljzi6.cjs");
|
|
3
|
+
const require_auth = require("./auth-C2_JLisH.cjs");
|
|
4
|
+
const require_appLogs = require("./appLogs-D8K0VeNM.cjs");
|
|
5
5
|
//#region src/clients/dataScience/utils.ts
|
|
6
6
|
const prepareAppRun = (appRun) => {
|
|
7
7
|
return {
|
|
@@ -111,4 +111,4 @@ Object.defineProperty(exports, "createDataScienceClient", {
|
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
113
|
|
|
114
|
-
//# sourceMappingURL=dataScience-
|
|
114
|
+
//# sourceMappingURL=dataScience-BPW993AG.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataScience-
|
|
1
|
+
{"version":3,"file":"dataScience-BPW993AG.cjs","names":["createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient","readAppLogsDownload","readAppLogsTail"],"sources":["../src/clients/dataScience/utils.ts","../src/clients/dataScience/dataScienceClient.ts"],"sourcesContent":["import type { RawAppRun } from './types';\n\nexport const prepareAppRun = (appRun: RawAppRun) => {\n return {\n ...appRun,\n state: appRun.state ?? (appRun.stoppedAt ? 'finished' : 'running'), // fallback state for historic non migrated runs\n };\n};\n","import { readAppLogsDownload, readAppLogsTail } from '../../domain/appLogs';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n CreateDataAppBody,\n DeleteDataAppPath,\n DeleteSandboxPath,\n GetAppsQuery,\n GetDataAppLogsDownloadPath,\n GetDataAppLogsTailPath,\n GetDataAppLogsTailQuery,\n GetDataAppPasswordPath,\n GetDataAppPath,\n GetDataAppRunPath,\n GetDataAppRunsPath,\n GetDataAppRunsQuery,\n GetSandboxPath,\n PatchDataAppBody,\n PatchDataAppPath,\n ResetDataAppPasswordPath,\n} from './types';\nimport { prepareAppRun } from './utils';\n\nexport const createDataScienceClient = ({ 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 getAppRuns = async (\n appId: GetDataAppRunsPath['appId'],\n query?: GetDataAppRunsQuery,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get('/apps/{appId}/runs', { path: { appId }, query }, { signal });\n\n return data.map(prepareAppRun);\n };\n\n const getAppRun = async (\n appId: GetDataAppRunPath['appId'],\n runId: GetDataAppRunPath['runId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/runs/{runId}',\n { path: { appId, runId } },\n { signal },\n );\n\n return prepareAppRun(data);\n };\n\n const getAppLogsDownload = (id: GetDataAppLogsDownloadPath['appId'], signal?: AbortSignal) =>\n readAppLogsDownload(() =>\n client.get('/apps/{appId}/logs/download', { path: { appId: id } }, { signal }),\n );\n\n const getAppLogsTail = (\n id: GetDataAppLogsTailPath['appId'],\n { query, signal }: { query?: GetDataAppLogsTailQuery; signal?: AbortSignal } = {},\n ) =>\n readAppLogsTail(() =>\n client.get('/apps/{appId}/logs/tail', { query, path: { appId: id } }, { signal }),\n );\n\n const getApps = async (query: GetAppsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/apps', { query }, { signal });\n\n return data;\n };\n\n const getApp = async (appId: GetDataAppPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const createApp = async (body: CreateDataAppBody, signal?: AbortSignal) => {\n const { data } = await client.post('/apps', { body }, { signal });\n\n return data;\n };\n\n const patchApp = async (\n appId: PatchDataAppPath['appId'],\n body: PatchDataAppBody,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.patch(\n '/apps/{appId}',\n {\n path: { appId: appId },\n body: body,\n },\n { signal },\n );\n return data;\n };\n\n const deleteApp = async (appId: DeleteDataAppPath['appId'], signal?: AbortSignal) => {\n return client.delete('/apps/{appId}', { path: { appId } }, { signal });\n };\n\n const getAppPassword = async (appId: GetDataAppPasswordPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/password', { path: { appId } }, { signal });\n\n return data;\n };\n\n const resetAppPassword = async (\n appId: ResetDataAppPasswordPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/reset-password',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n const getRuntimes = async (signal?: AbortSignal) => {\n const { data } = await client.get('/runtimes', {}, { signal });\n\n return data;\n };\n\n const getSandbox = async (appId: GetSandboxPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/sandboxes/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const deleteSandbox = async (appId: DeleteSandboxPath['appId'], signal?: AbortSignal) => {\n return client.delete('/sandboxes/{appId}', { path: { appId } }, { signal });\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 getAppRuns,\n getAppRun,\n getAppLogsDownload,\n getAppLogsTail,\n getApps,\n getApp,\n createApp,\n patchApp,\n deleteApp,\n getAppPassword,\n resetAppPassword,\n getRuntimes,\n getSandbox,\n deleteSandbox,\n };\n};\n"],"mappings":";;;;;AAEA,MAAa,iBAAiB,WAAsB;CAClD,OAAO;EACL,GAAG;EACH,OAAO,OAAO,UAAU,OAAO,YAAY,aAAa;CAC1D;AACF;;;ACmBA,MAAa,2BAA2B,EAAE,SAAS,aAAa,WAA8B;CAC5F,MAAM,SAASA,iCAAAA,yBAAgC;EAC7C;EACA;EACA,SAASC,aAAAA,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgBC,iCAAAA,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,aAAa,OACjB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB;GAAE,MAAM,EAAE,MAAM;GAAG;EAAM,GAAG,EAAE,OAAO,CAAC;EAE9F,OAAO,KAAK,IAAI,aAAa;CAC/B;CAEA,MAAM,YAAY,OAChB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,8BACA,EAAE,MAAM;GAAE;GAAO;EAAM,EAAE,GACzB,EAAE,OAAO,CACX;EAEA,OAAO,cAAc,IAAI;CAC3B;CAEA,MAAM,sBAAsB,IAAyC,WACnE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O,KAC5B,gCACA,EAAE,MAAM,EAAE,MAAM,EAAE,GAClB,EAAE,OAAO,CACX;EAEA,OAAO;CACT;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;EAE7D,OAAO;CACT;CAEA,MAAM,aAAa,OAAO,OAAgC,WAAyB;EACjF,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;EAEvF,OAAO;CACT;CAEA,MAAM,gBAAgB,OAAO,OAAmC,WAAyB;EACvF,OAAO,OAAO,OAAO,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;CAC5E;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;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createGenericFetchClient } from "./createGenericFetchClient-
|
|
2
|
-
import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-
|
|
3
|
-
import { t as createAuthHeaders } from "./auth-
|
|
4
|
-
import { n as readAppLogsDownload, r as readAppLogsTail } from "./appLogs-
|
|
1
|
+
import { t as createGenericFetchClient } from "./createGenericFetchClient-MQeLRiNW.js";
|
|
2
|
+
import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-E7OIVkYv.js";
|
|
3
|
+
import { t as createAuthHeaders } from "./auth-CE9rQV3-.js";
|
|
4
|
+
import { n as readAppLogsDownload, r as readAppLogsTail } from "./appLogs-D72eD8vP.js";
|
|
5
5
|
//#region src/clients/dataScience/utils.ts
|
|
6
6
|
const prepareAppRun = (appRun) => {
|
|
7
7
|
return {
|
|
@@ -106,4 +106,4 @@ const createDataScienceClient = ({ baseUrl, middlewares, auth }) => {
|
|
|
106
106
|
//#endregion
|
|
107
107
|
export { createDataScienceClient as t };
|
|
108
108
|
|
|
109
|
-
//# sourceMappingURL=dataScience-
|
|
109
|
+
//# sourceMappingURL=dataScience-B_TA7wCB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataScience-
|
|
1
|
+
{"version":3,"file":"dataScience-B_TA7wCB.js","names":[],"sources":["../src/clients/dataScience/utils.ts","../src/clients/dataScience/dataScienceClient.ts"],"sourcesContent":["import type { RawAppRun } from './types';\n\nexport const prepareAppRun = (appRun: RawAppRun) => {\n return {\n ...appRun,\n state: appRun.state ?? (appRun.stoppedAt ? 'finished' : 'running'), // fallback state for historic non migrated runs\n };\n};\n","import { readAppLogsDownload, readAppLogsTail } from '../../domain/appLogs';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n CreateDataAppBody,\n DeleteDataAppPath,\n DeleteSandboxPath,\n GetAppsQuery,\n GetDataAppLogsDownloadPath,\n GetDataAppLogsTailPath,\n GetDataAppLogsTailQuery,\n GetDataAppPasswordPath,\n GetDataAppPath,\n GetDataAppRunPath,\n GetDataAppRunsPath,\n GetDataAppRunsQuery,\n GetSandboxPath,\n PatchDataAppBody,\n PatchDataAppPath,\n ResetDataAppPasswordPath,\n} from './types';\nimport { prepareAppRun } from './utils';\n\nexport const createDataScienceClient = ({ 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 getAppRuns = async (\n appId: GetDataAppRunsPath['appId'],\n query?: GetDataAppRunsQuery,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get('/apps/{appId}/runs', { path: { appId }, query }, { signal });\n\n return data.map(prepareAppRun);\n };\n\n const getAppRun = async (\n appId: GetDataAppRunPath['appId'],\n runId: GetDataAppRunPath['runId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/runs/{runId}',\n { path: { appId, runId } },\n { signal },\n );\n\n return prepareAppRun(data);\n };\n\n const getAppLogsDownload = (id: GetDataAppLogsDownloadPath['appId'], signal?: AbortSignal) =>\n readAppLogsDownload(() =>\n client.get('/apps/{appId}/logs/download', { path: { appId: id } }, { signal }),\n );\n\n const getAppLogsTail = (\n id: GetDataAppLogsTailPath['appId'],\n { query, signal }: { query?: GetDataAppLogsTailQuery; signal?: AbortSignal } = {},\n ) =>\n readAppLogsTail(() =>\n client.get('/apps/{appId}/logs/tail', { query, path: { appId: id } }, { signal }),\n );\n\n const getApps = async (query: GetAppsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/apps', { query }, { signal });\n\n return data;\n };\n\n const getApp = async (appId: GetDataAppPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const createApp = async (body: CreateDataAppBody, signal?: AbortSignal) => {\n const { data } = await client.post('/apps', { body }, { signal });\n\n return data;\n };\n\n const patchApp = async (\n appId: PatchDataAppPath['appId'],\n body: PatchDataAppBody,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.patch(\n '/apps/{appId}',\n {\n path: { appId: appId },\n body: body,\n },\n { signal },\n );\n return data;\n };\n\n const deleteApp = async (appId: DeleteDataAppPath['appId'], signal?: AbortSignal) => {\n return client.delete('/apps/{appId}', { path: { appId } }, { signal });\n };\n\n const getAppPassword = async (appId: GetDataAppPasswordPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/password', { path: { appId } }, { signal });\n\n return data;\n };\n\n const resetAppPassword = async (\n appId: ResetDataAppPasswordPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/reset-password',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n const getRuntimes = async (signal?: AbortSignal) => {\n const { data } = await client.get('/runtimes', {}, { signal });\n\n return data;\n };\n\n const getSandbox = async (appId: GetSandboxPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/sandboxes/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const deleteSandbox = async (appId: DeleteSandboxPath['appId'], signal?: AbortSignal) => {\n return client.delete('/sandboxes/{appId}', { path: { appId } }, { signal });\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 getAppRuns,\n getAppRun,\n getAppLogsDownload,\n getAppLogsTail,\n getApps,\n getApp,\n createApp,\n patchApp,\n deleteApp,\n getAppPassword,\n resetAppPassword,\n getRuntimes,\n getSandbox,\n deleteSandbox,\n };\n};\n"],"mappings":";;;;;AAEA,MAAa,iBAAiB,WAAsB;CAClD,OAAO;EACL,GAAG;EACH,OAAO,OAAO,UAAU,OAAO,YAAY,aAAa;CAC1D;AACF;;;ACmBA,MAAa,2BAA2B,EAAE,SAAS,aAAa,WAA8B;CAC5F,MAAM,SAAS,yBAAgC;EAC7C;EACA;EACA,SAAS,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgB,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,aAAa,OACjB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB;GAAE,MAAM,EAAE,MAAM;GAAG;EAAM,GAAG,EAAE,OAAO,CAAC;EAE9F,OAAO,KAAK,IAAI,aAAa;CAC/B;CAEA,MAAM,YAAY,OAChB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,8BACA,EAAE,MAAM;GAAE;GAAO;EAAM,EAAE,GACzB,EAAE,OA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AmB,OACvB,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,gCACA,EAAE,MAAM,EAAE,MAAM,EAAE,GAClB,EAAE,OAAO,CACX;EAEA,OAAO;CACT;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;EAE7D,OAAO;CACT;CAEA,MAAM,aAAa,OAAO,OAAgC,WAAyB;EACjF,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;EAEvF,OAAO;CACT;CAEA,MAAM,gBAAgB,OAAO,OAAmC,WAAyB;EACvF,OAAO,OAAO,OAAO,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;CAC5E;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;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_developerPortalClient = require("../developerPortalClient-
|
|
2
|
+
const require_developerPortalClient = require("../developerPortalClient-Db2XVB_o.cjs");
|
|
3
3
|
exports.authHeader = require_developerPortalClient.authHeader;
|
|
4
4
|
exports.createDeveloperPortalClient = require_developerPortalClient.createDeveloperPortalClient;
|
|
5
5
|
exports.isMfaChallengeResponse = require_developerPortalClient.isMfaChallengeResponse;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-
|
|
2
|
-
import { a as DeveloperPortalClient, c as createDeveloperPortalClient, i as isMfaChallengeResponse, n as authHeader, o as DeveloperPortalClientInitOptions, r as uploadAppIcon, s as DeveloperPortalFetchClient, t as DeveloperPortalTokens } from "../index-
|
|
1
|
+
import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-B6JJCta-.cjs";
|
|
2
|
+
import { a as DeveloperPortalClient, c as createDeveloperPortalClient, i as isMfaChallengeResponse, n as authHeader, o as DeveloperPortalClientInitOptions, r as uploadAppIcon, s as DeveloperPortalFetchClient, t as DeveloperPortalTokens } from "../index-exNi3I2Q.cjs";
|
|
3
3
|
export { type AdminPaginationQuery, type AdminVendor, type App, type AppChange, type AppRepository, type AppVendor, type ApproveVendorInput, type ConfirmAccountInput, type CreateAppInput, type CreateServiceAccountInput, type CreateVendorAsAdminInput, type CreateVendorInput, type DeprecateAppInput, DeveloperPortalClient, DeveloperPortalClientInitOptions, type DeveloperPortalError, DeveloperPortalFetchClient, type DeveloperPortalTokens, type GetAppsQuery, type GetChangesQuery, type GetVendorUsersQuery, type IconUploadLink, type LoginChallenge, type LoginInput, type LoginResult, type LoginSuccess, type MfaConfirmInput, type MfaSetupInput, type MfaSetupResult, type PaginationQuery, type Profile, type RefreshTokensResult, type RejectAppInput, type ResetPasswordConfirmInput, type ServiceAccount, type ServiceIndex, type SignUpInput, type Stack, type UpdateAppAsAdminInput, type UpdateAppInput, type UpdateVendorAsAdminInput, type UpdateVendorInput, type User, type UserRequest, type Vendor, type VendorListItem, type Version, authHeader, createDeveloperPortalClient, isMfaChallengeResponse, uploadAppIcon };
|