@keboola/api-client 33.0.0 → 34.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 +2 -2
- package/API-SURFACE.md +16 -2
- package/CHANGELOG.md +243 -0
- package/dist/{ManagementClientAuthError-DqeXL8nv.cjs → ManagementClientAuthError-DD4u0EU7.cjs} +2 -2
- package/dist/{ManagementClientAuthError-DqeXL8nv.cjs.map → ManagementClientAuthError-DD4u0EU7.cjs.map} +1 -1
- package/dist/{ManagementClientAuthError-iKbBugKC.js → ManagementClientAuthError-ey-f03vy.js} +2 -2
- package/dist/{ManagementClientAuthError-iKbBugKC.js.map → ManagementClientAuthError-ey-f03vy.js.map} +1 -1
- package/dist/{ValidationError-CzPWydEb.js → ValidationError-BekhphAq.js} +11 -7
- package/dist/ValidationError-BekhphAq.js.map +1 -0
- package/dist/{ValidationError-h5qvwahi.cjs → ValidationError-CLVJCCwH.cjs} +16 -6
- package/dist/ValidationError-CLVJCCwH.cjs.map +1 -0
- 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-D8K0VeNM.cjs → appLogs-BjfUoWzs.cjs} +2 -2
- package/dist/{appLogs-D8K0VeNM.cjs.map → appLogs-BjfUoWzs.cjs.map} +1 -1
- package/dist/{appLogs-u0XMZLjS.d.ts → appLogs-Ch7DYpzx.d.ts} +2 -2
- package/dist/{appLogs-Q4A7A_Fc.d.cts → appLogs-D5A13Y0y.d.cts} +2 -2
- package/dist/{appLogs-D72eD8vP.js → appLogs-xsVkTriU.js} +2 -2
- package/dist/{appLogs-D72eD8vP.js.map → appLogs-xsVkTriU.js.map} +1 -1
- package/dist/apps/index.cjs +3 -3
- package/dist/apps/index.d.cts +3 -3
- package/dist/apps/index.d.ts +3 -3
- package/dist/apps/index.js +3 -3
- package/dist/apps/types.d.cts +2 -2
- package/dist/apps/types.d.ts +2 -2
- package/dist/assets/index.cjs +1 -1
- package/dist/assets/index.d.cts +1 -1
- package/dist/assets/index.d.ts +1 -1
- package/dist/assets/index.js +1 -1
- package/dist/auth/index.cjs +1 -1
- package/dist/auth/index.d.cts +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/auth/types.d.cts +1 -1
- package/dist/auth/types.d.ts +1 -1
- package/dist/{auth-C2_JLisH.cjs → auth-JQ33o3nU.cjs} +2 -2
- package/dist/{auth-C2_JLisH.cjs.map → auth-JQ33o3nU.cjs.map} +1 -1
- package/dist/{auth-CE9rQV3-.js → auth-aItmDu45.js} +2 -2
- package/dist/{auth-CE9rQV3-.js.map → auth-aItmDu45.js.map} +1 -1
- package/dist/{authClient-DZ_8lvdJ.d.cts → authClient-CTHNs6Tq.d.cts} +4 -4
- package/dist/{authClient-DEyqR7GW.js → authClient-D7W9vWPR.js} +5 -5
- package/dist/{authClient-DEyqR7GW.js.map → authClient-D7W9vWPR.js.map} +1 -1
- package/dist/{authClient-DwT6xdg5.d.ts → authClient-D8i3JTM-.d.ts} +4 -4
- package/dist/{authClient-IwQ9Ti0J.cjs → authClient-_PpvGgZJ.cjs} +5 -5
- package/dist/{authClient-IwQ9Ti0J.cjs.map → authClient-_PpvGgZJ.cjs.map} +1 -1
- package/dist/billing/index.cjs +46 -0
- package/dist/billing/index.cjs.map +1 -0
- package/dist/billing/index.d.cts +48 -0
- package/dist/billing/index.d.ts +48 -0
- package/dist/billing/index.js +45 -0
- package/dist/billing/index.js.map +1 -0
- package/dist/billing/types.cjs +0 -0
- package/dist/billing/types.d.cts +635 -0
- package/dist/billing/types.d.ts +635 -0
- package/dist/billing/types.js +1 -0
- package/dist/chat/index.cjs +3 -3
- package/dist/chat/index.d.cts +2 -2
- package/dist/chat/index.d.ts +2 -2
- package/dist/chat/index.js +3 -3
- package/dist/chat/types.cjs +18 -0
- package/dist/chat/types.cjs.map +1 -1
- package/dist/chat/types.d.cts +2 -2
- package/dist/chat/types.d.ts +2 -2
- package/dist/chat/types.js +18 -1
- package/dist/chat/types.js.map +1 -1
- package/dist/{configurations-d7SZmw69.js → configurations-BVvcimzo.js} +17 -2
- package/dist/configurations-BVvcimzo.js.map +1 -0
- package/dist/{configurations-CqwAxiQL.cjs → configurations-CyFF9Dtu.cjs} +22 -1
- package/dist/configurations-CyFF9Dtu.cjs.map +1 -0
- package/dist/{configurations-ZwBXilW-.js → configurations-VtNE0nrT.js} +2 -2
- package/dist/{configurations-ZwBXilW-.js.map → configurations-VtNE0nrT.js.map} +1 -1
- package/dist/{configurations-Ck-mNB_E.cjs → configurations-zkNjr73Q.cjs} +2 -2
- package/dist/{configurations-Ck-mNB_E.cjs.map → configurations-zkNjr73Q.cjs.map} +1 -1
- package/dist/constants/index.cjs +1 -1
- package/dist/constants/index.d.cts +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/{constants-lIfSdTzS.cjs → constants-C4DlsF_M.cjs} +3 -2
- package/dist/constants-C4DlsF_M.cjs.map +1 -0
- package/dist/{constants-ByEwVtGf.js → constants-wfbFsqqN.js} +3 -2
- package/dist/constants-wfbFsqqN.js.map +1 -0
- package/dist/{createFetchClient-DvZvD31l.cjs → createFetchClient-DgMiqTJ8.cjs} +19 -4
- package/dist/createFetchClient-DgMiqTJ8.cjs.map +1 -0
- package/dist/{createFetchClient-DdyZMhxO.js → createFetchClient-U-ZrwPl2.js} +14 -5
- package/dist/{createFetchClient-DvZvD31l.cjs.map → createFetchClient-U-ZrwPl2.js.map} +1 -1
- package/dist/{createGenericFetchClient-qfCZlCTv.cjs → createGenericFetchClient-o3cPJeRn.cjs} +2 -2
- package/dist/{createGenericFetchClient-qfCZlCTv.cjs.map → createGenericFetchClient-o3cPJeRn.cjs.map} +1 -1
- package/dist/{createGenericFetchClient-MQeLRiNW.js → createGenericFetchClient-rxvUUbap.js} +2 -2
- package/dist/{createGenericFetchClient-MQeLRiNW.js.map → createGenericFetchClient-rxvUUbap.js.map} +1 -1
- package/dist/{createOpenapiFetchClient-E7OIVkYv.js → createOpenapiFetchClient-BVSc9ibR.js} +2 -2
- package/dist/{createOpenapiFetchClient-E7OIVkYv.js.map → createOpenapiFetchClient-BVSc9ibR.js.map} +1 -1
- package/dist/{createOpenapiFetchClient-C57Ljzi6.cjs → createOpenapiFetchClient-DhUU3M1W.cjs} +2 -2
- package/dist/{createOpenapiFetchClient-C57Ljzi6.cjs.map → createOpenapiFetchClient-DhUU3M1W.cjs.map} +1 -1
- package/dist/{credential-Bxv7yxOZ.js → credential-CihSf_xs.js} +2 -2
- package/dist/{credential-Bxv7yxOZ.js.map → credential-CihSf_xs.js.map} +1 -1
- package/dist/{credential-D-X5QQrM.cjs → credential-DVWvJFJs.cjs} +2 -2
- package/dist/{credential-D-X5QQrM.cjs.map → credential-DVWvJFJs.cjs.map} +1 -1
- package/dist/dataScience/index.cjs +2 -2
- package/dist/dataScience/index.d.cts +2 -2
- package/dist/dataScience/index.d.ts +2 -2
- package/dist/dataScience/index.js +2 -2
- package/dist/dataScience/types.d.cts +2 -2
- package/dist/dataScience/types.d.ts +2 -2
- package/dist/{dataScience-BPW993AG.cjs → dataScience-0Rl_EuV_.cjs} +5 -5
- package/dist/{dataScience-BPW993AG.cjs.map → dataScience-0Rl_EuV_.cjs.map} +1 -1
- package/dist/{dataScience-B_TA7wCB.js → dataScience-C1gO5zUn.js} +5 -5
- package/dist/{dataScience-B_TA7wCB.js.map → dataScience-C1gO5zUn.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-jk46sjwP.js → developerPortalClient-C_48z8BN.js} +3 -3
- package/dist/{developerPortalClient-jk46sjwP.js.map → developerPortalClient-C_48z8BN.js.map} +1 -1
- package/dist/{developerPortalClient-Db2XVB_o.cjs → developerPortalClient-ki0XS_OD.cjs} +3 -3
- package/dist/{developerPortalClient-Db2XVB_o.cjs.map → developerPortalClient-ki0XS_OD.cjs.map} +1 -1
- package/dist/domain/permissions/index.cjs +2 -1
- package/dist/domain/permissions/index.d.cts +18 -3
- package/dist/domain/permissions/index.d.ts +18 -3
- package/dist/domain/permissions/index.js +2 -2
- package/dist/editor/index.cjs +2 -2
- package/dist/editor/index.d.cts +2 -2
- package/dist/editor/index.d.ts +2 -2
- package/dist/editor/index.js +2 -2
- package/dist/editor/types.d.cts +1 -1
- package/dist/editor/types.d.ts +1 -1
- package/dist/encryption/index.cjs +1 -1
- package/dist/encryption/index.d.cts +1 -1
- package/dist/encryption/index.d.ts +1 -1
- package/dist/encryption/index.js +1 -1
- package/dist/encryption/types.d.cts +1 -1
- package/dist/encryption/types.d.ts +1 -1
- package/dist/import/index.cjs +1 -1
- package/dist/import/index.d.cts +3 -3
- package/dist/import/index.d.ts +3 -3
- package/dist/import/index.js +1 -1
- package/dist/{import-DJilJ6tq.cjs → import-C83w7BKz.cjs} +3 -3
- package/dist/{import-DJilJ6tq.cjs.map → import-C83w7BKz.cjs.map} +1 -1
- package/dist/{import-2nqxQ9Rt.js → import-CROEK82b.js} +3 -3
- package/dist/{import-2nqxQ9Rt.js.map → import-CROEK82b.js.map} +1 -1
- package/dist/{index-DQef014j.d.ts → index-3LUk2rpD.d.ts} +4 -4
- package/dist/{index-BjKjp3Rf.d.ts → index-6Xe81qN3.d.ts} +5 -5
- package/dist/{index-DIVvL54G.d.cts → index-BLx14ZI4.d.cts} +104 -44
- package/dist/{index-CUXEFQ7i.d.cts → index-BgLnWTZU.d.cts} +6 -6
- package/dist/{index-C_cxKL1V.d.ts → index-BuegqrS1.d.ts} +3 -3
- package/dist/{index-bB6wvw1f.d.ts → index-C77vTm2K.d.ts} +4 -4
- package/dist/{index-qOK5FtAH.d.cts → index-CW3Pj7DY.d.cts} +4 -4
- package/dist/{index-B2OGaUap.d.ts → index-CqgtL2NU.d.ts} +6 -6
- package/dist/{index-C7gxKoDF.d.cts → index-D8rcUbnk.d.ts} +3 -3
- package/dist/{index-B0V1pJAa.d.ts → index-DFBFa3SS.d.ts} +104 -44
- package/dist/{index-CVqk63at.d.ts → index-DR4QqItd.d.cts} +3 -3
- package/dist/{index-DCN2lH0v.d.cts → index-DXSmFkol.d.cts} +4 -4
- package/dist/{index-CTd4YY8e.d.cts → index-Dodwl64k.d.cts} +69 -36
- package/dist/{index-t-a7kYnx.d.cts → index-DppA4k3b.d.cts} +5 -5
- package/dist/{index-DLYAvSWZ.d.cts → index-Dx52hNLP.d.cts} +3 -3
- package/dist/{index-exNi3I2Q.d.cts → index-GjcJTCbz.d.cts} +4 -4
- package/dist/{index-DhVFuQDv.d.cts → index-KuQ79Mnz.d.ts} +13 -3
- package/dist/{index-GNKwr7EQ.d.ts → index-P-iT5THa.d.ts} +69 -36
- package/dist/{index-DVhTNwvu.d.ts → index-V7XKUQm9.d.cts} +13 -3
- package/dist/{index-ChMtULt4.d.ts → index-pXN4LWUX.d.ts} +4 -4
- package/dist/index.cjs +77 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +74 -35
- package/dist/index.js.map +1 -1
- package/dist/isLoginPageRedirect-B0EmRsHr.cjs +25 -0
- package/dist/isLoginPageRedirect-B0EmRsHr.cjs.map +1 -0
- package/dist/isLoginPageRedirect-BTTAedW-.js +20 -0
- package/dist/isLoginPageRedirect-BTTAedW-.js.map +1 -0
- package/dist/kaiAgent/index.cjs +1 -1
- package/dist/kaiAgent/index.d.cts +1 -1
- package/dist/kaiAgent/index.d.ts +1 -1
- package/dist/kaiAgent/index.js +1 -1
- package/dist/kaiAgent/types.d.cts +1 -1
- package/dist/kaiAgent/types.d.ts +1 -1
- package/dist/{kaiAgent-CYYn0QJW.js → kaiAgent-8LNzGhZc.js} +4 -4
- package/dist/{kaiAgent-CYYn0QJW.js.map → kaiAgent-8LNzGhZc.js.map} +1 -1
- package/dist/{kaiAgent-CMVub6Sc.cjs → kaiAgent-B_TaUPRt.cjs} +4 -4
- package/dist/{kaiAgent-CMVub6Sc.cjs.map → kaiAgent-B_TaUPRt.cjs.map} +1 -1
- package/dist/{kaiAgentClient-B2O0DF4d.d.ts → kaiAgentClient-BJj_2aqt.d.ts} +4 -3
- package/dist/{kaiAgentClient-iCFR2tRU.d.cts → kaiAgentClient-DhTaM3GC.d.cts} +4 -3
- 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 +2 -2
- package/dist/management/types.d.ts +2 -2
- package/dist/{management-DGfgKsaA.cjs → management-BoxlRNg2.cjs} +53 -10
- package/dist/management-BoxlRNg2.cjs.map +1 -0
- package/dist/{management-DNEKhR6a.js → management-Bp440RsV.js} +53 -10
- package/dist/management-Bp440RsV.js.map +1 -0
- package/dist/metastore/index.cjs +1 -1
- package/dist/metastore/index.d.cts +1 -1
- package/dist/metastore/index.d.ts +1 -1
- package/dist/metastore/index.js +1 -1
- package/dist/metastore/types.d.cts +1 -1
- package/dist/metastore/types.d.ts +1 -1
- package/dist/{metastore-DksEte8P.cjs → metastore-BYYWTb3m.cjs} +4 -4
- package/dist/{metastore-DksEte8P.cjs.map → metastore-BYYWTb3m.cjs.map} +1 -1
- package/dist/{metastore-CjwktHvw.js → metastore-VCDRVhUT.js} +4 -4
- package/dist/{metastore-CjwktHvw.js.map → metastore-VCDRVhUT.js.map} +1 -1
- package/dist/microsoftGraph/index.cjs +2 -2
- package/dist/microsoftGraph/index.d.cts +2 -2
- package/dist/microsoftGraph/index.d.ts +2 -2
- package/dist/microsoftGraph/index.js +2 -2
- package/dist/microsoftGraph/types.d.cts +1 -1
- package/dist/microsoftGraph/types.d.ts +1 -1
- package/dist/notifications/index.cjs +3 -3
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/index.js +3 -3
- package/dist/notifications/types.d.cts +1 -1
- package/dist/notifications/types.d.ts +1 -1
- package/dist/oauth/index.cjs +1 -1
- package/dist/oauth/index.d.cts +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-Bg5zro5S.js → oauth--asfePw-.js} +5 -5
- package/dist/{oauth-Bg5zro5S.js.map → oauth--asfePw-.js.map} +1 -1
- package/dist/{oauth-DFsI1TE5.cjs → oauth-B8yqG6Sy.cjs} +5 -5
- package/dist/{oauth-DFsI1TE5.cjs.map → oauth-B8yqG6Sy.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-Bh954iOA.d.ts → project-C2wvX0xZ.d.ts} +2 -2
- package/dist/{project-D25GH8zK.d.cts → project-hePfzUY0.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--t_W9PSJ.cjs → queryService-BVtjkXy1.cjs} +5 -5
- package/dist/{queryService--t_W9PSJ.cjs.map → queryService-BVtjkXy1.cjs.map} +1 -1
- package/dist/{queryService-DX6zeAs_.js → queryService-Ca65E5KH.js} +5 -5
- package/dist/{queryService-DX6zeAs_.js.map → queryService-Ca65E5KH.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-DrLUbk98.js → queue-DyotLFJi.js} +4 -4
- package/dist/{queue-DrLUbk98.js.map → queue-DyotLFJi.js.map} +1 -1
- package/dist/{queue-D1_TCe0z.cjs → queue-OJJUUqc2.cjs} +4 -4
- package/dist/{queue-D1_TCe0z.cjs.map → queue-OJJUUqc2.cjs.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/sdk/configurations/index.cjs +1 -1
- package/dist/sdk/configurations/index.d.cts +4 -4
- package/dist/sdk/configurations/index.d.ts +4 -4
- package/dist/sdk/configurations/index.js +1 -1
- package/dist/sdk/developerPortal/index.cjs +3 -3
- package/dist/sdk/developerPortal/index.d.cts +3 -3
- package/dist/sdk/developerPortal/index.d.ts +3 -3
- package/dist/sdk/developerPortal/index.js +3 -3
- package/dist/sdk/queryService/index.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 +21 -448
- package/dist/sdk/semanticLayer/index.d.cts +21 -2
- package/dist/sdk/semanticLayer/index.d.ts +21 -2
- package/dist/sdk/semanticLayer/index.js +2 -430
- 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/semanticLayer-CSqmtHRo.js +692 -0
- package/dist/semanticLayer-CSqmtHRo.js.map +1 -0
- package/dist/semanticLayer-E0Vilu8u.cjs +811 -0
- package/dist/semanticLayer-E0Vilu8u.cjs.map +1 -0
- package/dist/{serviceIds-fHLDwOg9.d.ts → serviceIds-DRcoTnSd.d.cts} +2 -1
- package/dist/{serviceIds-fHLDwOg9.d.cts → serviceIds-DRcoTnSd.d.ts} +2 -1
- package/dist/status/index.cjs +1 -1
- package/dist/status/index.d.cts +1 -1
- package/dist/status/index.d.ts +1 -1
- package/dist/status/index.js +1 -1
- package/dist/storage/index.cjs +6 -5
- package/dist/storage/index.d.cts +3 -3
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +6 -6
- package/dist/storage/types.d.cts +3 -3
- package/dist/storage/types.d.ts +3 -3
- package/dist/{storage-DexWot8H.cjs → storage-BKm7cztt.cjs} +6 -6
- package/dist/{storage-DexWot8H.cjs.map → storage-BKm7cztt.cjs.map} +1 -1
- package/dist/{storage--cVaecFq.js → storage-LYwFQPNO.js} +6 -6
- package/dist/{storage--cVaecFq.js.map → storage-LYwFQPNO.js.map} +1 -1
- 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-DQq_A9v6.cjs → syncActions-OEZdVffK.cjs} +6 -6
- package/dist/{syncActions-DQq_A9v6.cjs.map → syncActions-OEZdVffK.cjs.map} +1 -1
- package/dist/{syncActions-CkMHM-jB.js → syncActions-QeBhIVhG.js} +6 -6
- package/dist/{syncActions-CkMHM-jB.js.map → syncActions-QeBhIVhG.js.map} +1 -1
- package/dist/telemetry/index.cjs +38 -2
- package/dist/telemetry/index.cjs.map +1 -0
- package/dist/telemetry/index.d.cts +15 -8
- package/dist/telemetry/index.d.ts +15 -8
- package/dist/telemetry/index.js +37 -1
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/types.d.cts +2 -2
- package/dist/telemetry/types.d.ts +2 -2
- package/dist/{types-Be3Wgn1U.d.cts → types-3eUgOA7I.d.cts} +2 -2
- package/dist/{types-bY6K3y0O.d.cts → types-52irAt99.d.cts} +2 -2
- package/dist/{types-C2gzqtjf.d.ts → types-B2U9cFcx.d.ts} +2 -2
- package/dist/{types-C35GWNmq.d.ts → types-B3GOGUJ7.d.cts} +753 -45
- package/dist/{types-B42HhyB0.d.cts → types-BEe50G2r.d.cts} +2 -2
- package/dist/{types-6ThDkaJw.d.ts → types-BH5LLeJy.d.ts} +2 -2
- package/dist/{types-CxmV36rp.d.cts → types-BMeDOB_D.d.ts} +753 -45
- package/dist/{types-CPaluTW7.d.cts → types-BOqD3Hqy.d.cts} +3 -3
- package/dist/{types-CHCM9oNk.d.ts → types-BQsOHNI0.d.ts} +3 -3
- package/dist/{types-Cu-0LT4f.d.cts → types-BQvv4RaI.d.cts} +2 -2
- package/dist/{types-ZGAWRIBW.d.ts → types-BTWIPEiU.d.ts} +2 -2
- package/dist/{types-B4_MM5Wf.d.cts → types-BW2BXUB4.d.cts} +2 -2
- package/dist/{types-CSc8NQCY.d.ts → types-BrYkBQo4.d.ts} +2 -2
- package/dist/{types-D7Wgcp0u.d.ts → types-BsxLGDoC.d.cts} +2 -2
- package/dist/{types-CNQdtffE.d.ts → types-BupPADSm.d.ts} +10 -3
- package/dist/{types-B7O5koJb.d.cts → types-Bxhh2SJr.d.ts} +2 -2
- package/dist/{types-DAzmGzlb.d.ts → types-BztF4HeB.d.ts} +2 -2
- package/dist/{types-6ku2LeX6.d.ts → types-C0_2KZ-A.d.ts} +2 -2
- package/dist/{types-BUYqdN7B.d.ts → types-C2vefB4D.d.ts} +17 -4
- package/dist/{types-6hh_3SZs.d.ts → types-CBgLCkYe.d.ts} +3 -3
- package/dist/{types-C_ilZZkQ.d.ts → types-CKiW3n6v.d.ts} +2 -2
- package/dist/{types-sO52qIAA.d.cts → types-COL1kVEB.d.cts} +2 -2
- package/dist/types-CPB-eF82.d.ts +289 -0
- package/dist/{types-Ccgbipp4.d.cts → types-CW6lCqrC.d.cts} +2 -2
- package/dist/{types-BS5M67xm.d.cts → types-CaYtinmA.d.cts} +3 -3
- package/dist/{types-BHI8Lin9.d.ts → types-CcrvrAJX.d.ts} +2 -2
- package/dist/{types-D-98DirB.d.ts → types-Ct0YPy2w.d.ts} +2 -2
- package/dist/{types-Jt0ipbSm.d.cts → types-Cz83RiVu.d.cts} +2 -2
- package/dist/{types-B6JJCta-.d.cts → types-D8Rrz51O.d.cts} +2 -2
- package/dist/{types-3p0adMdd.d.cts → types-DARv_P6O.d.cts} +3 -3
- package/dist/{types-Cpjk0-ta.d.ts → types-DBOSvWtD.d.ts} +2 -2
- package/dist/{types-C4mr0lop.d.ts → types-DEc55spK.d.ts} +13 -4
- package/dist/{types-DqniGeDJ.d.cts → types-DNxOHnZI.d.cts} +2 -2
- package/dist/{types-CrH4H8M4.d.cts → types-DPS8nwkV.d.cts} +2 -2
- package/dist/{types-DTTC70Ac.d.ts → types-DYzJ6K2e.d.ts} +2 -2
- package/dist/{types-CCr1-9Q6.d.cts → types-DZk3XHiN.d.cts} +3 -3
- package/dist/{types-DHqIJKwx.d.ts → types-DajzGOKB.d.ts} +2 -2
- package/dist/{types-DlvZeert.d.ts → types-DfvdbRPL.d.ts} +2 -2
- package/dist/{types-k4R8gQ4U.d.ts → types-DhDNS-5B.d.ts} +21 -3
- package/dist/{types-D6ocCyGh.d.cts → types-DjrRmQUe.d.cts} +13 -4
- package/dist/{types-B6lOyHY_.d.ts → types-Dmu-8g4O.d.ts} +3 -3
- package/dist/{types-BT46XIgn.d.cts → types-DqxIx9Pi.d.cts} +2 -2
- package/dist/{types-BO3sCD0a.d.cts → types-Jw10xuOW.d.cts} +2 -2
- package/dist/{types-sp1rJY9E.d.cts → types-M46WuBSm.d.cts} +2 -2
- package/dist/{types-BOnf68s5.d.cts → types-N3EChotg.d.cts} +2 -2
- package/dist/{types-Ur37iOqb.d.ts → types-OaD-cbbl.d.ts} +3 -3
- package/dist/{types-DHI0g51U.d.cts → types-_RhBCj4_.d.cts} +2 -2
- package/dist/{types-0xa_7cgo.d.cts → types-bGQb4Jtl.d.cts} +21 -3
- package/dist/{types-E3VT-zYz.d.cts → types-f8W_j6qD.d.cts} +10 -3
- package/dist/{types-DONxb2-c.d.cts → types-fX4gbxfV.d.cts} +17 -4
- package/dist/types-g3vU7hcg.d.cts +289 -0
- package/dist/{types-BYKHr5bR.d.ts → types-l9o4gFsI.d.ts} +2 -2
- package/dist/{types-CaMfshWX.d.ts → types-nrviNdzZ.d.ts} +2 -2
- package/dist/{types-BgVKG4vg.d.ts → types-zZBxJ0P-.d.ts} +2 -2
- package/dist/{validateConnectionStatus-24zqIQ0p.cjs → validateConnectionStatus-CsvYmCOI.cjs} +5 -4
- package/dist/validateConnectionStatus-CsvYmCOI.cjs.map +1 -0
- package/dist/{validateConnectionStatus-DhkWg6Eq.js → validateConnectionStatus-olE2sQ3U.js} +5 -4
- package/dist/{validateConnectionStatus-DhkWg6Eq.js.map → validateConnectionStatus-olE2sQ3U.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 +29 -3
- package/surface/billing.md +9 -0
- package/surface/kaiAgent.md +2 -2
- package/surface/management.md +13 -3
- package/surface/telemetry.md +2 -4
- package/dist/ValidationError-CzPWydEb.js.map +0 -1
- package/dist/ValidationError-h5qvwahi.cjs.map +0 -1
- package/dist/configurations-CqwAxiQL.cjs.map +0 -1
- package/dist/configurations-d7SZmw69.js.map +0 -1
- package/dist/constants-ByEwVtGf.js.map +0 -1
- package/dist/constants-lIfSdTzS.cjs.map +0 -1
- package/dist/createFetchClient-DdyZMhxO.js.map +0 -1
- package/dist/management-DGfgKsaA.cjs.map +0 -1
- package/dist/management-DNEKhR6a.js.map +0 -1
- package/dist/sdk/semanticLayer/index.cjs.map +0 -1
- package/dist/sdk/semanticLayer/index.js.map +0 -1
- package/dist/telemetry-CAu1Qt7B.cjs +0 -29
- package/dist/telemetry-CAu1Qt7B.cjs.map +0 -1
- package/dist/telemetry-Ca6j0i9w.js +0 -24
- package/dist/telemetry-Ca6j0i9w.js.map +0 -1
- package/dist/types-lFsTSkhe.d.cts +0 -14
- package/dist/types-lFsTSkhe.d.ts +0 -14
- package/dist/validateConnectionStatus-24zqIQ0p.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurations-Ck-mNB_E.cjs","names":["isPlainObject","z","isPlainObject","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","snowflakeCommon","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","ComponentId"],"sources":["../src/utils/isEmptyDeep.ts","../src/utils/schemaGuidedMerge.ts","../src/sdks/configurations/schemas/appDataGatewaySchema.ts","../src/sdks/configurations/schemas/common/dbConfig.ts","../src/sdks/configurations/schemas/common/dbConnection.ts","../src/sdks/configurations/schemas/common/forbidden.ts","../src/sdks/configurations/schemas/common/oauthAuthorization.ts","../src/sdks/configurations/schemas/common/sshTunnelSchema.ts","../src/sdks/configurations/schemas/common/sslSchema.ts","../src/sdks/configurations/schemas/appSnowflakeDwhManagerSchema.ts","../src/sdks/configurations/schemas/ex/exAwsS3Schema.ts","../src/sdks/configurations/schemas/ex/exAzureBlobStorageSchema.ts","../src/sdks/configurations/schemas/ex/exAzureDataLakeSchema.ts","../src/sdks/configurations/schemas/ex/exFtpSchema.ts","../src/sdks/configurations/schemas/ex/exHttpSchema.ts","../src/sdks/configurations/schemas/exDb/exDbDefaultSchema.ts","../src/sdks/configurations/schemas/exDb/exDbPgsqlSchema.ts","../src/sdks/configurations/schemas/exDb/exDbProgressSchema.ts","../src/sdks/configurations/schemas/exDb/exDbMysqlSchema.ts","../src/sdks/configurations/schemas/exDb/exDbMssqlSchema.ts","../src/sdks/configurations/schemas/exDb/exDbOracleSchema.ts","../src/sdks/configurations/schemas/exDb/exDbFirebirdSchema.ts","../src/sdks/configurations/schemas/exDb/exTeradataSchema.ts","../src/sdks/configurations/schemas/exDb/exDbInformixSchema.ts","../src/sdks/configurations/schemas/exDb/exDbSnowflakeSchema.ts","../src/sdks/configurations/schemas/exDb/exDbNetsuiteSchema.ts","../src/sdks/configurations/schemas/gooddataWriterSchema.ts","../src/sdks/configurations/schemas/googleAdsSchema.ts","../src/sdks/configurations/schemas/schedulerSchema.ts","../src/sdks/configurations/schemas/wrDb/wrDbDefaultSchema.ts","../src/sdks/configurations/schemas/wrDb/wrDbPgsqlSchema.ts","../src/sdks/configurations/schemas/wrDb/wrDbOracleSchema.ts","../src/sdks/configurations/schemas/wrDb/wrSynapseSchema.ts","../src/sdks/configurations/schemas/wrDb/wrRedshiftSchema.ts","../src/sdks/configurations/schemas/wrDb/wrDbMssqlSchema.ts","../src/sdks/configurations/schemas/wrDb/wrDbImpalaSchema.ts","../src/sdks/configurations/schemas/wrDb/wrExasolSchema.ts","../src/sdks/configurations/schemas/wrDb/wrFireboltSchema.ts","../src/sdks/configurations/schemas/wrDb/wrHiveCsasSchema.ts","../src/sdks/configurations/schemas/wrDb/wrThoughtspotSchema.ts","../src/sdks/configurations/schemas/wrDb/wrSisenseSchema.ts","../src/sdks/configurations/schemas/wrDb/wrDbSnowflakeSchema.ts","../src/sdks/configurations/createRegistry/createRegistry.ts","../src/sdks/configurations/registry.ts","../src/sdks/configurations/configurationsSdk.ts"],"sourcesContent":["import { isPlainObject } from './isPlainObject';\n\n/**\n * Is `value` \"deeply empty\" — i.e. carries no leaf data? `null`/`undefined`, `{}`, `[]`, and\n * nested structures whose every leaf is itself empty (e.g. `{ parameters: {} }`) are empty.\n * Any present primitive (string, number, boolean — including `''`) counts as content.\n *\n * Used to skip a pointless encryption round-trip when a validated configuration has nothing\n * to encrypt.\n */\nexport const isEmptyDeep = (value: unknown): boolean => {\n if (value == null) return true;\n if (Array.isArray(value)) return value.every(isEmptyDeep);\n if (isPlainObject(value)) return Object.values(value).every(isEmptyDeep);\n return false;\n};\n","import { z } from 'zod';\n\nimport { isPlainObject } from './isPlainObject';\n\n/** Strip optional/nullable/default wrappers to reach the structural schema node. */\nconst unwrap = (schema: z.core.$ZodType): z.core.$ZodType =>\n schema instanceof z.ZodOptional ||\n schema instanceof z.ZodNullable ||\n schema instanceof z.ZodDefault\n ? unwrap(schema.unwrap())\n : schema;\n\n/**\n * Merge `patch` into `base`, guided by `schema`: descend only through object schemas, merging\n * key-by-key. At every non-object node — a `z.union` (e.g. Snowflake's password|keypair auth),\n * an array, or a primitive — the patch REPLACES the base wholesale. That replace is what lets an\n * update *delete* keys the additive `deepMerge` cannot: switching a credential union to the other\n * variant drops the abandoned variant's secret, because the entire union subtree is swapped.\n *\n * Consequence: a union (or array) subtree is all-or-nothing — the caller must send the complete\n * block, since a partial patch replaces (and so loses) the omitted siblings.\n *\n * Object keys present only in `base` (e.g. `storage`, `processors`, anything the schema omits) are\n * preserved at every level; `undefined` patch values are skipped. Assumes `patch` is already\n * schema-validated (so every object-valued patch key has a matching schema node). Pure — neither\n * argument is mutated.\n */\nexport const schemaGuidedMerge = <T extends Record<string, unknown>>(\n schema: z.core.$ZodType,\n base: T,\n patch: Record<string, unknown>,\n): T => {\n const node = unwrap(schema);\n if (!(node instanceof z.ZodObject) || !isPlainObject(base)) return patch as T;\n\n const out: Record<string, unknown> = { ...base };\n for (const [key, value] of Object.entries(patch)) {\n if (value === undefined) continue;\n const child = node.shape[key];\n const current = out[key];\n out[key] =\n child && isPlainObject(current) && isPlainObject(value)\n ? schemaGuidedMerge(child, current, value)\n : value;\n }\n\n return out as T;\n};\n","import { z } from 'zod';\n\n/**\n * `keboola.app-data-gateway` — the Data Gateway provisions and manages its own Snowflake\n * workspace, so the config carries no credentials: just the id of the workspace it runs\n * against, stored at `parameters.db.workspaceId`.\n */\nexport const appDataGatewaySchema = z.object({\n parameters: z.object({\n db: z.object({\n workspaceId: z.number(),\n }),\n }),\n});\n","import { z } from 'zod';\n\n/** Wrap a `parameters.db` credential schema into the full component config shape. */\nexport const dbConfig = <Db extends z.ZodType>(db: Db) =>\n z.object({ parameters: z.object({ db }) });\n","import { z } from 'zod';\n\n/**\n * The credential fields shared by virtually every DB writer, stored at `parameters.db`.\n * Components extend this with driver-specific fields (`schema`, `warehouse`, `ssh`, …) and\n * override where they differ (e.g. Snowflake makes `#password` optional). Secret leaves use\n * the `#` prefix the encryption service recognizes.\n */\nexport const dbConnectionSchema = z.object({\n host: z.string().describe('Hostname'),\n port: z.number().describe('Port'),\n user: z.string().describe('Username'),\n '#password': z.string().describe('Password'),\n database: z.string().describe('Database Name'),\n});\n","import { z } from 'zod';\n\n/**\n * Marks a field as \"must be absent\" in one arm of a mutually-exclusive union: `z.undefined()`\n * rejects any value while `.optional()` lets the key be omitted entirely. Pairing it with a\n * required field in the sibling arm (e.g. `#password` XOR `#privateKey`) is what makes an\n * \"exactly one of\" union reject configs that set both keys — or neither — at runtime and in\n * the inferred type. Without it the arms would be open objects that silently strip the extra key.\n */\nexport const forbidden = z.undefined().optional();\n","import { z } from 'zod';\n\n/**\n * The OAuth credential reference components store under a top-level `authorization` key. `id`\n * points at the vault-stored credential; `version` is the OAuth-API version (3 on modern stacks).\n * Shared by every OAuth-backed component (Google family, Facebook, …).\n */\nexport const oauthAuthorizationSchema = z.object({\n oauth_api: z.object({\n id: z.string(),\n version: z.number().optional(),\n }),\n});\n","import { z } from 'zod';\n\nexport const sshTunnelSchema = z.object({\n enabled: z.boolean(),\n sshHost: z.string().optional(),\n user: z.string().optional(),\n sshPort: z.number().optional(),\n /** FTP passive-mode port range (e.g. `10000:10005`); only relevant to FTP extractors. */\n passivePortRange: z.string().optional(),\n keys: z\n .object({\n public: z.string().optional(),\n '#private': z.string().optional(),\n })\n .optional(),\n});\n","import { z } from 'zod';\n\n/** SSL options nested at `parameters.db.ssl` (drivers that support it, e.g. MySQL, Hive). */\nexport const sslSchema = z.object({\n enabled: z.boolean(),\n cert: z.string().optional(),\n '#key': z.string().optional(),\n ca: z.string().optional(),\n cipher: z.string().optional(),\n verifyServerCert: z.boolean().optional(),\n});\n","import { z } from 'zod';\n\nimport { forbidden } from './common';\n\n/**\n * `keboola.app-snowflake-dwh-manager` — master Snowflake connection. Auth is a password OR a\n * key-pair (exactly one). The common fields are shared; each variant requires its own secret and\n * *forbids the other* (`forbidden`), so a config carrying both — or neither — is rejected at\n * runtime and at the type level, matching the `wr-db-snowflake` XOR pattern.\n */\nconst dwhMasterBase = z.object({\n master_host: z.string(),\n master_user: z.string(),\n master_database: z.string(),\n warehouse: z.string(),\n});\n\nexport const appSnowflakeDwhManagerSchema = z.object({\n parameters: z.union([\n dwhMasterBase.extend({ '#master_password': z.string(), '#master_private_key': forbidden }),\n dwhMasterBase.extend({ '#master_private_key': z.string(), '#master_password': forbidden }),\n ]),\n});\n","import { z } from 'zod';\n\nimport { forbidden } from '../common';\n\n// `.loose()`: the auth block is validated, but the extractor's other `parameters` (bucket, key,\n// saveAs, …) are component-managed and must pass through rather than be stripped on create/update.\n/** Access-key credentials — forbids the IAM-role fields so the variants stay exclusive. */\nconst awsCredentialsAuth = z\n .object({\n loginType: z.literal('credentials'),\n accessKeyId: z.string(),\n '#secretAccessKey': z.string(),\n accountId: forbidden,\n roleName: forbidden,\n })\n .loose();\n\n/** IAM-role auth — forbids the access-key fields so the variants stay exclusive. */\nconst awsRoleAuth = z\n .object({\n loginType: z.literal('role'),\n accountId: z.string(),\n roleName: z.string(),\n accessKeyId: forbidden,\n '#secretAccessKey': forbidden,\n })\n .loose();\n\n/**\n * `keboola.ex-aws-s3` — access-key credentials OR IAM-role auth (exactly one). `loginType` is the\n * discriminant, and each arm *forbids the other* variant's fields (`z.undefined()`) so a config\n * mixing both — e.g. credentials + a stale `roleName` — is rejected rather than silently stripped.\n * The outer object is `.loose()` so top-level component-managed keys (`storage`, `processors`)\n * pass through.\n */\nexport const exAwsS3Schema = z\n .object({\n parameters: z.union([awsCredentialsAuth, awsRoleAuth]),\n })\n .loose();\n","import { z } from 'zod';\n\n/**\n * `kds-team.ex-azure-blob-storage-v2` — account name + key + container. Both levels are `.loose()`:\n * the connection block is validated, but component-managed `parameters` and top-level keys\n * (`storage`, `processors`) pass through rather than being stripped on create/update.\n */\nexport const exAzureBlobSchema = z\n .object({\n parameters: z\n .object({\n account_name: z.string(),\n '#account_key': z.string(),\n container_name: z.string(),\n })\n .loose(),\n })\n .loose();\n","import { z } from 'zod';\n\n/**\n * `kds-team.ex-azure-data-lake-gen2` — like Blob, but a `file_system` instead of a container. Both\n * levels are `.loose()`: the connection block is validated, but component-managed `parameters` and\n * top-level keys (`storage`, `processors`) pass through rather than being stripped on create/update.\n */\nexport const exAzureDataLakeSchema = z\n .object({\n parameters: z\n .object({\n account_name: z.string(),\n '#account_key': z.string(),\n file_system: z.string(),\n })\n .loose(),\n })\n .loose();\n","import { z } from 'zod';\n\nimport { forbidden, sshTunnelSchema } from '../common';\n\n/** Connection fields shared by both auth variants. */\nconst ftpConnection = z.object({\n host: z.string(),\n port: z.number(),\n connectionType: z.enum(['FTP', 'FTPS', 'SFTP']),\n username: z.string(),\n ignorePassiveAddress: z.boolean().optional(),\n ssh: sshTunnelSchema.optional(),\n path: z.string().optional(),\n onlyNewFiles: z.boolean().optional(),\n});\n\n// `.loose()`: validate the connection block but let component-managed parameter keys pass through.\n/** Password auth — forbids the private key so the variants stay exclusive. */\nconst ftpPasswordAuth = ftpConnection\n .extend({ '#password': z.string(), '#privateKey': forbidden })\n .loose();\n\n/** Private-key auth — forbids the password so the variants stay exclusive. */\nconst ftpPrivateKeyAuth = ftpConnection\n .extend({ '#privateKey': z.string(), '#password': forbidden })\n .loose();\n\n/**\n * `keboola.ex-ftp` / `keboola.ex-ftp-csas` — FTP/FTPS/SFTP server connection. Auth is a password\n * OR a private key (exactly one): each variant requires its secret and *forbids the other*\n * (`z.undefined()`), so a config with both — or neither — is rejected, and switching variants via\n * an update drops the abandoned secret (the whole `parameters` union subtree is replaced wholesale\n * by `schemaGuidedMerge`, so a partial patch must carry the complete connection block). The outer\n * object is `.loose()` so top-level component-managed keys (`storage`, `processors`) pass through.\n */\nexport const exFtpSchema = z\n .object({\n parameters: z.union([ftpPasswordAuth, ftpPrivateKeyAuth]),\n })\n .loose();\n","import { z } from 'zod';\n\n/**\n * `keboola.ex-http` — only the connection block is stable here. The request/job definitions are\n * component-managed and left unvalidated, so both levels are `.loose()`: extra `parameters` keys\n * and top-level keys (`storage`, `processors`) pass through `schema`/`inputSchema` unchanged rather\n * than being stripped on create/update.\n */\nexport const exHttpSchema = z\n .object({\n parameters: z.object({ baseUrl: z.string(), maxRedirects: z.number().optional() }).loose(),\n })\n .loose();\n","import { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/**\n * Default extractor credentials — host/port/user/#password/database + optional SSH tunnel, the\n * same `parameters.db` block the writers use. Tunnel support mirrors kbc-ui's `hasSshTunnel` /\n * `hasSsl` (`apps/kbc-ui/src/scripts/modules/ex-db-generic/helpers.ts`): most drivers accept an\n * SSH tunnel, only pgsql/mysql/mssql also accept SSL, and a handful accept neither. This shared\n * schema covers the generic SSH-only drivers: redshift, db2(-bata), mssql-cdata, impala,\n * hive(-csas, -csas-test). SSL-capable pgsql and the tunnel-less progress-db get their own\n * schema, as do drivers with extra/renamed fields.\n */\nexport const exDbDefaultSchema = dbConfig(\n dbConnectionSchema.extend({ ssh: sshTunnelSchema.optional() }),\n);\n","import { dbConfig, dbConnectionSchema, sshTunnelSchema, sslSchema } from '../common';\n\n/** `keboola.ex-db-pgsql` — generic credentials that also accept SSL. */\nexport const exDbPgsqlSchema = dbConfig(\n dbConnectionSchema.extend({ ssh: sshTunnelSchema.optional(), ssl: sslSchema.optional() }),\n);\n","import { dbConfig, dbConnectionSchema } from '../common';\n\n/** `kds-team.ex-progress-db` — generic credentials, no SSH tunnel or SSL. */\nexport const exDbProgressSchema = dbConfig(dbConnectionSchema);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema, sslSchema } from '../common';\n\n/** `keboola.ex-db-mysql` — `database` optional + transaction-isolation / network-compression. */\nexport const exDbMysqlSchema = dbConfig(\n dbConnectionSchema.extend({\n database: z.string().optional(),\n transactionIsolationLevel: z\n .enum(['REPEATABLE READ', 'READ COMMITTED', 'READ UNCOMMITTED', 'SERIALIZABLE'])\n .optional(),\n networkCompression: z.boolean().optional(),\n ssh: sshTunnelSchema.optional(),\n ssl: sslSchema.optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema, sslSchema } from '../common';\n\n/** `keboola.ex-db-mssql` — `port` optional, otherwise the shared base. */\nexport const exDbMssqlSchema = dbConfig(\n dbConnectionSchema.extend({\n port: z.number().optional(),\n ssh: sshTunnelSchema.optional(),\n ssl: sslSchema.optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.ex-db-oracle` — host/port/database all optional (tnsnames is the alternative). */\nexport const exDbOracleSchema = dbConfig(\n dbConnectionSchema.omit({ host: true, port: true, database: true }).extend({\n host: z.string().optional(),\n port: z.number().optional(),\n database: z.string().optional(),\n tnsnames: z.string().optional(),\n connectThrough: z.boolean().optional(),\n ssh: sshTunnelSchema.optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig } from '../common';\n\n/** `keboola.ex-db-firebird` — `dbname` + user/#password only (no host/port/database fields). */\nexport const exDbFirebirdSchema = dbConfig(\n z.object({ dbname: z.string(), user: z.string(), '#password': z.string() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema } from '../common';\n\n/** `keboola.ex-teradata` — shared base with optional `database`. */\nexport const exTeradataSchema = dbConfig(\n dbConnectionSchema.extend({ database: z.string().optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema } from '../common';\n\n/** `keboola.ex-db-informix` — Informix server name + protocol + optional locale. */\nexport const exDbInformixSchema = dbConfig(\n dbConnectionSchema.extend({\n serverName: z.string(),\n protocol: z.enum(['onsoctcp', 'onsocssl']),\n dbLocale: z.string().optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, forbidden } from '../common';\n\n/**\n * `keboola.ex-db-snowflake` — auth is a union: password OR key-pair (exactly one). The common\n * fields (host/port/user/database + optional schema/warehouse) are shared; each variant requires\n * its own secret and forbids the other, so a config carrying both — or neither — is rejected at\n * runtime and at the type level.\n */\nconst snowflakeCommon = dbConnectionSchema\n .omit({ '#password': true })\n .extend({ schema: z.string().optional(), warehouse: z.string().optional() });\n\nexport const exDbSnowflakeSchema = dbConfig(\n z.union([\n snowflakeCommon.extend({ '#password': z.string(), '#privateKey': forbidden }),\n snowflakeCommon.extend({ '#privateKey': z.string(), '#password': forbidden }),\n ]),\n);\n","import { z } from 'zod';\n\nimport { dbConfig } from '../common';\n\n/** `keboola.ex-db-netsuite` — SuiteAnalytics account/role + user/#password (no host/port/db). */\nexport const exDbNetsuiteSchema = dbConfig(\n z.object({\n accountId: z.string(),\n roleId: z.string(),\n user: z.string(),\n '#password': z.string(),\n }),\n);\n\n/** `kds-team.ex-netsuite` — Connect host/port + server data source + account/role. */\nexport const exKdsNetsuiteSchema = dbConfig(\n z.object({\n host: z.string(),\n port: z.number(),\n server_data_source: z.enum(['NetSuite.com', 'NetSuite2.com']),\n account_id: z.string(),\n role_id: z.string(),\n user: z.string(),\n '#password': z.string(),\n }),\n);\n","import { z } from 'zod';\n\n/**\n * A single exported column. `type` is always present and drives which of the other fields the\n * UI shows (and persists): `dataType`/`dataTypeSize` for the base types + LABEL, `reference` for\n * LABEL/HYPERLINK, `schemaReference` for REFERENCE, `format`/`dateDimension` for DATE, and\n * `sortLabel`/`sortOrder` + the `identifier*` fields for ATTRIBUTE. They're optional here since a\n * given column only carries the subset relevant to its type. Mirrors the kbc-ui column adapter\n * (`apps/kbc-ui/src/scripts/modules/gooddata-writer-v3/helpers/makeColumnDefinition.ts`).\n */\nconst gooddataColumn = z.object({\n type: z.enum([\n 'ATTRIBUTE',\n 'CONNECTION_POINT',\n 'DATE',\n 'FACT',\n 'HYPERLINK',\n 'LABEL',\n 'REFERENCE',\n 'IGNORE',\n ]),\n id: z.string().optional(),\n title: z.string().optional(),\n dataType: z.enum(['BIGINT', 'DATE', 'DECIMAL', 'INT', 'VARCHAR']).optional(),\n dataTypeSize: z.string().optional(),\n reference: z.string().optional(),\n schemaReference: z.string().optional(),\n sortLabel: z.string().optional(),\n sortOrder: z.enum(['ASC', 'DESC']).optional(),\n format: z.string().optional(),\n dateDimension: z.string().optional(),\n identifier: z.string().optional(),\n identifierLabel: z.string().optional(),\n identifierSortLabel: z.string().optional(),\n});\n\n/** One exported table: a GoodData `title`, its `columns` keyed by source column name, and an\n * optional `disabled` flag toggled when export is switched off. */\nconst gooddataTable = z.object({\n title: z.string(),\n disabled: z.boolean().optional(),\n identifier: z.string().optional(),\n columns: z.record(z.string(), gooddataColumn),\n});\n\n/** One date dimension; `template` selects the date-dimension template (`gooddata` / `keboola` /\n * a custom template id). */\nconst gooddataDimension = z.object({\n template: z.string(),\n includeTime: z.boolean().optional(),\n identifier: z.string().optional(),\n});\n\n/**\n * `keboola.gooddata-writer` — GoodData project + login credentials plus the exported model:\n * `tables` (keyed by source table id) and `dimensions` (keyed by dimension name). Both are\n * optional — a fresh config has credentials before any table/dimension is mapped — and must be\n * declared: the registry validates create/update input with a deep-partial that strips keys\n * absent from this shape, so an undeclared `tables`/`dimensions` payload would be dropped before\n * it's stored.\n */\nexport const gooddataWriterSchema = z.object({\n parameters: z.object({\n project: z.object({ pid: z.string(), backendUrl: z.string().optional() }),\n user: z.object({ login: z.string(), '#password': z.string() }),\n loadOnly: z.boolean().optional(),\n multiLoad: z.boolean().optional(),\n tables: z.record(z.string(), gooddataTable).optional(),\n dimensions: z.record(z.string(), gooddataDimension).optional(),\n }),\n});\n","import { z } from 'zod';\n\nimport { oauthAuthorizationSchema } from './common';\n\n/** `keboola.ex-google-ads` — OAuth credential reference + account selection. */\nexport const exGoogleAdsSchema = z.object({\n authorization: oauthAuthorizationSchema,\n parameters: z.object({\n customerId: z.array(z.string()),\n onlyEnabledCustomers: z.boolean().optional(),\n getAccountChildren: z.boolean().optional(),\n }),\n});\n","import { z } from 'zod';\n\n/**\n * `keboola.scheduler` — drives a target component config on a cron schedule. Unlike the\n * writer configs, scheduler state lives at the top level (no `parameters` wrapper):\n * `schedule` holds the cron expression + timezone + enabled/disabled state, `target`\n * identifies which component configuration to run.\n */\nexport const schedulerSchema = z.object({\n schedule: z.object({\n cronTab: z.string(),\n // Legacy configs predate the timezone field; the UI falls back to 'UTC' when it's\n // missing, so a config without it is still runnable. Keep it optional to match.\n timezone: z.string().optional(),\n state: z.enum(['enabled', 'disabled']),\n }),\n target: z.object({\n componentId: z.string(),\n configurationId: z.string(),\n mode: z.literal('run'),\n }),\n});\n","import { dbConfig, dbConnectionSchema, sshTunnelSchema, sslSchema } from '../common';\n\n/**\n * Default writer credentials — host/port/user/#password/database + optional SSH and SSL tunnels.\n * Shared by the writers that add no extra fields (`keboola.wr-db-mysql`, `keboola.wr-db-hive`);\n * writers that add or rename fields get their own schema.\n */\nexport const wrDbDefaultSchema = dbConfig(\n dbConnectionSchema.extend({ ssh: sshTunnelSchema.optional(), ssl: sslSchema.optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.wr-db-pgsql` — adds a required `schema`, optional SSH. */\nexport const wrDbPgsqlSchema = dbConfig(\n dbConnectionSchema.extend({ schema: z.string(), ssh: sshTunnelSchema.optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.wr-db-oracle` — optional `schema`, optional SSH. */\nexport const wrDbOracleSchema = dbConfig(\n dbConnectionSchema.extend({ schema: z.string().optional(), ssh: sshTunnelSchema.optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema } from '../common';\n\n/** `keboola.wr-synapse` — optional `schema` (defaults to `dbo` in the UI). */\nexport const wrSynapseSchema = dbConfig(\n dbConnectionSchema.extend({ schema: z.string().optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.wr-redshift-v2` — required `schema`, optional SSH. */\nexport const wrRedshiftSchema = dbConfig(\n dbConnectionSchema.extend({ schema: z.string(), ssh: sshTunnelSchema.optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.wr-db-mssql-v2` — optional `instance`, required `tdsVersion`, optional SSH. */\nexport const wrDbMssqlSchema = dbConfig(\n dbConnectionSchema.extend({\n instance: z.string().optional(),\n tdsVersion: z.enum(['7.0', '7.1', '7.2', '7.3', '7.4']),\n ssh: sshTunnelSchema.optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.wr-db-impala` — adds `auth_mech`, optional SSH. */\nexport const wrDbImpalaSchema = dbConfig(\n dbConnectionSchema.extend({ auth_mech: z.number(), ssh: sshTunnelSchema.optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig } from '../common';\n\n/**\n * `kds-team.wr-exasol` — no `database`; auth is password OR SaaS personal-access-token\n * (`#refresh_token`), at least one required (both may coexist). Mirrors kbc-ui's\n * `apps/kbc-ui/src/scripts/modules/wr-db/templates/hasValidCredentials.ts`, which drops the\n * `#password` requirement once a `#refresh_token` is present.\n */\nconst exasolBase = z.object({\n host: z.string(),\n port: z.number(),\n user: z.string(),\n schema: z.string(),\n});\n\nexport const wrExasolSchema = dbConfig(\n z.union([\n exasolBase.extend({ '#password': z.string(), '#refresh_token': z.string().optional() }),\n exasolBase.extend({ '#refresh_token': z.string(), '#password': z.string().optional() }),\n ]),\n);\n","import { z } from 'zod';\n\nimport { dbConfig } from '../common';\n\n/** `kds-team.wr-firebolt` — no host/port; engine + AWS staging credentials. */\nexport const wrFireboltSchema = dbConfig(\n z.object({\n user: z.string(),\n '#password': z.string(),\n database: z.string(),\n aws_api_key_id: z.string(),\n '#aws_api_key_secret': z.string(),\n staging_bucket: z.string(),\n engine_name: z.string().optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `kds-team.wr-hive-csas` — Hive base + Kerberos auth. */\nexport const wrHiveCsasSchema = dbConfig(\n dbConnectionSchema.extend({\n kinitPrincipal: z.string(),\n servicePrincipal: z.string(),\n config: z.string(),\n '#keytab': z.string(),\n ssh: sshTunnelSchema.optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema } from '../common';\n\n/** `keboola.wr-thoughtspot` — SSH tunnel creds carried as top-level fields, not nested. */\nexport const wrThoughtspotSchema = dbConfig(\n dbConnectionSchema.extend({\n schema: z.string().optional(),\n sshUser: z.string(),\n '#sshPassword': z.string(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig } from '../common';\n\n/** `keboola.wr-sisense` — uses `username` (not `user`). */\nexport const wrSisenseSchema = dbConfig(\n z.object({\n host: z.string(),\n port: z.number(),\n username: z.string(),\n '#password': z.string(),\n database: z.string(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, forbidden } from '../common';\n\n/**\n * `keboola.wr-db-snowflake` — auth is a union: password OR key-pair (exactly one). The common\n * fields (host/port/user/database/schema/warehouse) are shared; each variant requires its own\n * secret and *forbids the other* (`z.undefined()`), so a config carrying both — or neither —\n * is rejected at runtime and at the type level. Without the `forbidden` half, the variants\n * would be open objects: the extra key is excess (TS allows it) and stripped (Zod accepts it).\n */\nconst snowflakeCommon = dbConnectionSchema\n .omit({ '#password': true })\n .extend({ schema: z.string(), warehouse: z.string().optional() });\n\nexport const wrDbSnowflakeSchema = dbConfig(\n z.union([\n snowflakeCommon.extend({ '#password': z.string(), '#privateKey': forbidden }),\n snowflakeCommon.extend({ '#privateKey': z.string(), '#password': forbidden }),\n ]),\n);\n","import { z } from 'zod';\n\n/** Deep-partial any schema: objects → keys optional (recursing), unions → each member\n * deep-partialed, anything else left as-is. Lets a union schema (e.g. Snowflake's\n * password | key-pair auth) still produce a partial input schema. */\nconst partialize = (schema: z.ZodType): z.ZodType => {\n if (schema instanceof z.ZodObject) return deepPartial(schema);\n if (schema instanceof z.ZodUnion) {\n const options = (schema.options as z.ZodType[]).map(partialize);\n return z.union(options as [z.ZodType, z.ZodType, ...z.ZodType[]]);\n }\n return schema;\n};\n\nconst deepPartial = (schema: z.ZodObject): z.ZodObject => {\n const shape: Record<string, z.ZodType> = {};\n for (const [key, value] of Object.entries(schema.shape)) {\n const field = value as z.ZodType;\n const inner = field instanceof z.ZodOptional ? (field.unwrap() as z.ZodType) : field;\n shape[key] = partialize(inner);\n }\n const partial = z.object(shape).partial();\n // Preserve the source object's catchall (e.g. a `.loose()` `parameters` block that must let\n // component-managed keys pass through) — rebuilding via `z.object` would otherwise strip it.\n return schema.def.catchall ? partial.catchall(schema.def.catchall) : partial;\n};\n\nexport type Registry<M extends Record<string, z.ZodObject>> = {\n add: <const Id extends string, Schema extends z.ZodObject>(\n componentId: Id,\n schema: Schema,\n ) => Registry<M & Record<Id, Schema>>;\n get: <Id extends keyof M>(\n componentId: Id,\n ) => {\n /** The component's complete runnable schema (precise per id). */\n schema: M[Id];\n /** Its deep-partial — the accepted create/update input. Loose `z.ZodObject` (the precise\n * partial type isn't worth deriving; callers get input typing from `schema` via `z.input`). */\n inputSchema: z.ZodObject;\n };\n has: (componentId: string) => boolean;\n};\n\n/** Extracts the registered component-id union from a registry instance type. */\nexport type InferComponentId<R> = R extends Registry<infer M> ? keyof M & string : never;\n\nexport const createRegistry = (): Registry<Record<never, never>> => {\n const map = new Map<string, z.ZodObject>();\n\n const registry = {\n add(componentId: string, schema: z.ZodObject) {\n map.set(componentId, schema);\n return registry;\n },\n get(componentId: string) {\n const schema = map.get(componentId);\n if (!schema) throw new Error(`No configuration registered for component \"${componentId}\".`);\n return { schema, inputSchema: deepPartial(schema) };\n },\n has: (componentId: string) => map.has(componentId),\n };\n\n return registry as unknown as Registry<Record<never, never>>;\n};\n","import { ComponentId } from '../../constants/componentId';\n\nimport { appDataGatewaySchema } from './schemas/appDataGatewaySchema';\nimport { appSnowflakeDwhManagerSchema } from './schemas/appSnowflakeDwhManagerSchema';\nimport {\n exAwsS3Schema,\n exAzureBlobSchema,\n exAzureDataLakeSchema,\n exFtpSchema,\n exHttpSchema,\n} from './schemas/ex';\nimport {\n exDbDefaultSchema,\n exDbFirebirdSchema,\n exDbInformixSchema,\n exDbMssqlSchema,\n exDbMysqlSchema,\n exDbNetsuiteSchema,\n exDbOracleSchema,\n exDbPgsqlSchema,\n exDbProgressSchema,\n exDbSnowflakeSchema,\n exKdsNetsuiteSchema,\n exTeradataSchema,\n} from './schemas/exDb';\nimport { gooddataWriterSchema } from './schemas/gooddataWriterSchema';\nimport { exGoogleAdsSchema } from './schemas/googleAdsSchema';\nimport { schedulerSchema } from './schemas/schedulerSchema';\nimport {\n wrDbDefaultSchema,\n wrDbImpalaSchema,\n wrDbMssqlSchema,\n wrDbOracleSchema,\n wrDbPgsqlSchema,\n wrDbSnowflakeSchema,\n wrExasolSchema,\n wrFireboltSchema,\n wrHiveCsasSchema,\n wrRedshiftSchema,\n wrSisenseSchema,\n wrSynapseSchema,\n wrThoughtspotSchema,\n} from './schemas/wrDb';\nimport { createRegistry, type GetRegisteredId } from './createRegistry';\n\nexport const registry = createRegistry()\n /**\n * DB writers (`wr-db-*` family + related SaaS targets). Split into the standard writers\n * built on the shared `parameters.db` connection base and the special-cased targets whose\n * config diverges (extra auth, no host/port, or a provisioned workspace).\n */\n\n // Standard writers — host/port/user/#password/database, plus per-driver extras (schema, ssh…).\n .add(ComponentId.WR_DB_MYSQL, wrDbDefaultSchema)\n .add(ComponentId.WR_DB_PGSQL, wrDbPgsqlSchema)\n .add(ComponentId.WR_PAIRITY, wrDbPgsqlSchema) // pgsql variant\n .add(ComponentId.WR_DB_ORACLE, wrDbOracleSchema)\n .add(ComponentId.WR_DB_SNOWFLAKE, wrDbSnowflakeSchema)\n .add(ComponentId.WR_DB_SNOWFLAKE_GCS, wrDbSnowflakeSchema)\n .add(ComponentId.WR_DB_SNOWFLAKE_GCS_S3, wrDbSnowflakeSchema)\n .add(ComponentId.WR_SNOWFLAKE_BLOB_STORAGE, wrDbSnowflakeSchema)\n .add(ComponentId.WR_LOOKER_V2, wrDbSnowflakeSchema) // legacy snowflake\n .add(ComponentId.WR_SYNAPSE, wrSynapseSchema)\n .add(ComponentId.WR_REDSHIFT, wrRedshiftSchema)\n .add(ComponentId.WR_DB_MSSQL, wrDbMssqlSchema)\n .add(ComponentId.WR_DB_HIVE, wrDbDefaultSchema)\n .add(ComponentId.WR_DB_IMPALA, wrDbImpalaSchema)\n\n // Special-cased targets — diverging auth or credential shape.\n .add(ComponentId.WR_HIVE_CSAS, wrHiveCsasSchema) // Kerberos auth\n .add(ComponentId.WR_THOUGHTSPOT, wrThoughtspotSchema) // top-level SSH creds\n .add(ComponentId.WR_EXASOL, wrExasolSchema)\n .add(ComponentId.WR_FIREBOLT, wrFireboltSchema)\n .add(ComponentId.WR_SISENSE, wrSisenseSchema)\n .add(ComponentId.APP_DATA_GATEWAY, appDataGatewaySchema) // provisioned workspace, no creds\n .add(ComponentId.SCHEDULER, schedulerSchema)\n\n // App-specific writers — bespoke credential blocks.\n .add(ComponentId.APP_SNOWFLAKE_DWH_MANAGER, appSnowflakeDwhManagerSchema)\n .add(ComponentId.GOODDATA_WRITER, gooddataWriterSchema)\n\n /**\n * DB extractors (`ex-db-*` family) — same `parameters.db` credentials as the writers above.\n * Split into the generic-credentials drivers that reuse `exDbDefaultSchema` and the drivers\n * whose credentials diverge enough to need their own schema.\n */\n\n // Default credentials — host/port/user/#password/database + optional SSH tunnel.\n .add(ComponentId.EX_DB_REDSHIFT, exDbDefaultSchema)\n .add(ComponentId.EX_DB_DB2, exDbDefaultSchema)\n .add(ComponentId.EX_DB_DB2_BATA, exDbDefaultSchema)\n .add(ComponentId.EX_DB_MSSQL_CDATA, exDbDefaultSchema)\n .add(ComponentId.EX_DB_IMPALA, exDbDefaultSchema)\n .add(ComponentId.EX_DB_HIVE, exDbDefaultSchema)\n .add(ComponentId.EX_DB_HIVE_CSAS, exDbDefaultSchema)\n .add(ComponentId.EX_DB_HIVE_CSAS_TEST, exDbDefaultSchema)\n\n // Driver-specific credentials — extra/renamed fields or different SSH tunnel / SSL support.\n .add(ComponentId.EX_DB_PGSQL, exDbPgsqlSchema) // generic creds + SSL\n .add(ComponentId.EX_DB_MYSQL, exDbMysqlSchema)\n .add(ComponentId.EX_DB_MSSQL, exDbMssqlSchema)\n .add(ComponentId.EX_DB_ORACLE, exDbOracleSchema)\n .add(ComponentId.EX_DB_SNOWFLAKE, exDbSnowflakeSchema)\n .add(ComponentId.EX_DB_FIREBIRD, exDbFirebirdSchema)\n .add(ComponentId.EX_DB_NETSUITE, exDbNetsuiteSchema)\n .add(ComponentId.EX_DB_INFORMIX, exDbInformixSchema)\n .add(ComponentId.EX_TERADATA, exTeradataSchema)\n .add(ComponentId.KDS_EX_NETSUITE, exKdsNetsuiteSchema)\n .add(ComponentId.KDS_EX_PROGRESS_DB, exDbProgressSchema) // generic creds, no SSH/SSL\n // Google (OAuth) components\n .add(ComponentId.EX_GOOGLE_ADS, exGoogleAdsSchema)\n\n /**\n * File/connection extractors (`ex` family) — no shared credential base; each has its own\n * connection/credentials shape, so each is its own schema (ftp-csas reuses ftp).\n */\n .add(ComponentId.EX_HTTP, exHttpSchema)\n .add(ComponentId.EX_FTP, exFtpSchema)\n .add(ComponentId.EX_FTP_CSAS, exFtpSchema) // same shape as ftp\n .add(ComponentId.EX_AWS_S3, exAwsS3Schema)\n .add(ComponentId.KDS_EX_AZURE_BLOB_STORAGE_V2, exAzureBlobSchema)\n .add(ComponentId.KDS_EX_AZURE_DATA_LAKE_GEN2, exAzureDataLakeSchema);\n\nexport type RegisteredComponentId = GetRegisteredId<typeof registry>;\n","import type { z } from 'zod';\n\nimport type { createEncryptionClient } from '../../clients/encryption/encryptionClient';\nimport type * as storage from '../../clients/storage';\nimport type {\n BaseComponentConfig,\n ConfigurationPath,\n CreateConfigurationInput,\n UpdateConfigurationInput,\n} from '../../clients/storage/types';\nimport type { createDefaultBranch } from '../../domain/defaultBranch';\nimport {\n assertCanCreateConfiguration,\n assertCanUpdateConfiguration,\n} from '../../domain/permissions/configurations';\nimport type { Project } from '../../domain/project';\nimport { isEmptyDeep } from '../../utils/isEmptyDeep';\nimport { schemaGuidedMerge } from '../../utils/schemaGuidedMerge';\n\nimport { type RegisteredComponentId, registry } from './registry';\n\ntype ConfigurationSdkContext = {\n project: Project;\n defaultBranch: ReturnType<typeof createDefaultBranch>;\n};\n\ntype Options = {\n storageClient: ReturnType<typeof storage.createStorageClient>;\n encryptionClient: ReturnType<typeof createEncryptionClient>;\n context: ConfigurationSdkContext;\n};\n\ntype DeepPartial<T> = T extends object ? { [K in keyof T]?: DeepPartial<T[K]> } : T;\n\ntype ConfigurationSchema<ComponentId extends RegisteredComponentId> = z.input<\n ReturnType<typeof registry.get<ComponentId>>['schema']\n>;\n\ntype TypedConfiguration<ComponentId extends RegisteredComponentId> = {\n componentId: ComponentId;\n configuration: DeepPartial<ConfigurationSchema<ComponentId>>;\n};\n\n/**\n * How an update writes the patch against the stored configuration:\n * - `'merge'` (default) — schema-guided deep merge: object fields patch individually, while a\n * credential union or array subtree is replaced wholesale (so switching auth variants deletes\n * the abandoned secret). Untouched leaves and out-of-schema keys are preserved. Reads the\n * current config first to merge onto.\n * - `'replace'` — store exactly what the caller sends (after validation + encryption); no read,\n * no merge. Completeness is on the caller — any field or sibling key (e.g. `storage`) it omits\n * is gone.\n */\ntype UpdateMode = 'merge' | 'replace';\n\nconst toConfigResult = <ComponentId extends RegisteredComponentId>(\n data: BaseComponentConfig,\n schema: z.ZodType,\n) => {\n const result = schema.safeParse(data.configuration);\n\n return {\n data: data as BaseComponentConfig<ConfigurationSchema<ComponentId>>,\n runnable: result.success,\n error: result.error,\n };\n};\n\nexport const createConfigurationSdk = ({ storageClient, encryptionClient, context }: Options) => {\n const _encrypt = async (\n componentId: RegisteredComponentId,\n data: Record<string, unknown>,\n ): Promise<Record<string, unknown>> => {\n if (isEmptyDeep(data)) return data;\n\n return encryptionClient.encryptScopedSecrets({\n scope: 'ProjectSecure',\n componentId,\n projectId: context.project.sapiToken.owner.id,\n data,\n });\n };\n\n const getConfiguration = async <ComponentId extends RegisteredComponentId>(\n path: ConfigurationPath<ComponentId>,\n ) => {\n const data = await storageClient.configurations.getConfiguration(path);\n const def = registry.get(path.componentId);\n\n return toConfigResult<ComponentId>(data, def.schema);\n };\n\n const createConfiguration = async <ComponentId extends RegisteredComponentId>(\n input: Omit<CreateConfigurationInput<ComponentId>, 'componentId' | 'configuration'> &\n TypedConfiguration<ComponentId>,\n ) => {\n const { componentId, branchId, configuration, ...rest } = input;\n assertCanCreateConfiguration(context.project.sapiToken, {\n isDevModeActive: context.defaultBranch.isDev(branchId),\n });\n const def = registry.get(componentId);\n const validated = def.inputSchema.parse(configuration);\n const encrypted = await _encrypt(componentId, validated);\n\n const data = await storageClient.configurations.createConfiguration({\n ...rest,\n branchId,\n componentId,\n configuration: encrypted,\n });\n\n return toConfigResult<ComponentId>(data, def.schema);\n };\n\n const updateConfiguration = async <ComponentId extends RegisteredComponentId>(\n input: Omit<UpdateConfigurationInput<ComponentId>, 'componentId' | 'configuration'> &\n TypedConfiguration<ComponentId> & { mode?: UpdateMode },\n ) => {\n const { componentId, branchId, configId, configuration, mode = 'merge', ...rest } = input;\n assertCanUpdateConfiguration(context.project.sapiToken, {\n isDevModeActive: context.defaultBranch.isDev(branchId),\n });\n const def = registry.get(componentId);\n\n const validated = def.inputSchema.parse(configuration);\n const encrypted = await _encrypt(componentId, validated);\n\n let newConfiguration: Record<string, unknown> = encrypted;\n if (mode === 'merge') {\n const original = await storageClient.configurations.getConfiguration({\n componentId,\n branchId,\n configId,\n });\n newConfiguration = schemaGuidedMerge(def.schema, original.configuration ?? {}, encrypted);\n }\n\n const { configuration: data } = await storageClient.configurations.updateConfiguration({\n ...rest,\n branchId,\n componentId,\n configId,\n configuration: newConfiguration,\n });\n\n return toConfigResult<ComponentId>(data, def.schema);\n };\n\n return { getConfiguration, createConfiguration, updateConfiguration };\n};\n"],"mappings":";;;;;;;;;;;;;AAUA,MAAa,eAAe,UAA4B;CACtD,IAAI,SAAS,MAAM,OAAO;CAC1B,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,MAAM,WAAW;CACxD,IAAIA,sBAAAA,cAAc,KAAK,GAAG,OAAO,OAAO,OAAO,KAAK,CAAC,CAAC,MAAM,WAAW;CACvE,OAAO;AACT;;;;ACVA,MAAM,UAAU,WACd,kBAAkBC,IAAAA,EAAE,eACpB,kBAAkBA,IAAAA,EAAE,eACpB,kBAAkBA,IAAAA,EAAE,aAChB,OAAO,OAAO,OAAO,CAAC,IACtB;;;;;;;;;;;;;;;;AAiBN,MAAa,qBACX,QACA,MACA,UACM;CACN,MAAM,OAAO,OAAO,MAAM;CAC1B,IAAI,EAAE,gBAAgBA,IAAAA,EAAE,cAAc,CAACC,sBAAAA,cAAc,IAAI,GAAG,OAAO;CAEnE,MAAM,MAA+B,EAAE,GAAG,KAAK;CAC/C,KAAK,MAAM,CAAC,KAAK,U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I,QAAQ,SAAS,iBAAiB,CAAC,GAAG,SAAS;EAC1F;EAEA,MAAM,EAAE,eAAe,SAAS,MAAM,cAAc,eAAe,oBAAoB;GACrF,GAAG;GACH;GACA;GACA;GACA,eAAe;EACjB,CAAC;EAED,OAAO,eAA4B,MAAM,IAAI,MAAM;CACrD;CAEA,OAAO;EAAE;EAAkB;EAAqB;CAAoB;AACtE"}
|
|
1
|
+
{"version":3,"file":"configurations-zkNjr73Q.cjs","names":["isPlainObject","z","isPlainObject","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","snowflakeCommon","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","z","ComponentId"],"sources":["../src/utils/isEmptyDeep.ts","../src/utils/schemaGuidedMerge.ts","../src/sdks/configurations/schemas/appDataGatewaySchema.ts","../src/sdks/configurations/schemas/common/dbConfig.ts","../src/sdks/configurations/schemas/common/dbConnection.ts","../src/sdks/configurations/schemas/common/forbidden.ts","../src/sdks/configurations/schemas/common/oauthAuthorization.ts","../src/sdks/configurations/schemas/common/sshTunnelSchema.ts","../src/sdks/configurations/schemas/common/sslSchema.ts","../src/sdks/configurations/schemas/appSnowflakeDwhManagerSchema.ts","../src/sdks/configurations/schemas/ex/exAwsS3Schema.ts","../src/sdks/configurations/schemas/ex/exAzureBlobStorageSchema.ts","../src/sdks/configurations/schemas/ex/exAzureDataLakeSchema.ts","../src/sdks/configurations/schemas/ex/exFtpSchema.ts","../src/sdks/configurations/schemas/ex/exHttpSchema.ts","../src/sdks/configurations/schemas/exDb/exDbDefaultSchema.ts","../src/sdks/configurations/schemas/exDb/exDbPgsqlSchema.ts","../src/sdks/configurations/schemas/exDb/exDbProgressSchema.ts","../src/sdks/configurations/schemas/exDb/exDbMysqlSchema.ts","../src/sdks/configurations/schemas/exDb/exDbMssqlSchema.ts","../src/sdks/configurations/schemas/exDb/exDbOracleSchema.ts","../src/sdks/configurations/schemas/exDb/exDbFirebirdSchema.ts","../src/sdks/configurations/schemas/exDb/exTeradataSchema.ts","../src/sdks/configurations/schemas/exDb/exDbInformixSchema.ts","../src/sdks/configurations/schemas/exDb/exDbSnowflakeSchema.ts","../src/sdks/configurations/schemas/exDb/exDbNetsuiteSchema.ts","../src/sdks/configurations/schemas/gooddataWriterSchema.ts","../src/sdks/configurations/schemas/googleAdsSchema.ts","../src/sdks/configurations/schemas/schedulerSchema.ts","../src/sdks/configurations/schemas/wrDb/wrDbDefaultSchema.ts","../src/sdks/configurations/schemas/wrDb/wrDbPgsqlSchema.ts","../src/sdks/configurations/schemas/wrDb/wrDbOracleSchema.ts","../src/sdks/configurations/schemas/wrDb/wrSynapseSchema.ts","../src/sdks/configurations/schemas/wrDb/wrRedshiftSchema.ts","../src/sdks/configurations/schemas/wrDb/wrDbMssqlSchema.ts","../src/sdks/configurations/schemas/wrDb/wrDbImpalaSchema.ts","../src/sdks/configurations/schemas/wrDb/wrExasolSchema.ts","../src/sdks/configurations/schemas/wrDb/wrFireboltSchema.ts","../src/sdks/configurations/schemas/wrDb/wrHiveCsasSchema.ts","../src/sdks/configurations/schemas/wrDb/wrThoughtspotSchema.ts","../src/sdks/configurations/schemas/wrDb/wrSisenseSchema.ts","../src/sdks/configurations/schemas/wrDb/wrDbSnowflakeSchema.ts","../src/sdks/configurations/createRegistry/createRegistry.ts","../src/sdks/configurations/registry.ts","../src/sdks/configurations/configurationsSdk.ts"],"sourcesContent":["import { isPlainObject } from './isPlainObject';\n\n/**\n * Is `value` \"deeply empty\" — i.e. carries no leaf data? `null`/`undefined`, `{}`, `[]`, and\n * nested structures whose every leaf is itself empty (e.g. `{ parameters: {} }`) are empty.\n * Any present primitive (string, number, boolean — including `''`) counts as content.\n *\n * Used to skip a pointless encryption round-trip when a validated configuration has nothing\n * to encrypt.\n */\nexport const isEmptyDeep = (value: unknown): boolean => {\n if (value == null) return true;\n if (Array.isArray(value)) return value.every(isEmptyDeep);\n if (isPlainObject(value)) return Object.values(value).every(isEmptyDeep);\n return false;\n};\n","import { z } from 'zod';\n\nimport { isPlainObject } from './isPlainObject';\n\n/** Strip optional/nullable/default wrappers to reach the structural schema node. */\nconst unwrap = (schema: z.core.$ZodType): z.core.$ZodType =>\n schema instanceof z.ZodOptional ||\n schema instanceof z.ZodNullable ||\n schema instanceof z.ZodDefault\n ? unwrap(schema.unwrap())\n : schema;\n\n/**\n * Merge `patch` into `base`, guided by `schema`: descend only through object schemas, merging\n * key-by-key. At every non-object node — a `z.union` (e.g. Snowflake's password|keypair auth),\n * an array, or a primitive — the patch REPLACES the base wholesale. That replace is what lets an\n * update *delete* keys the additive `deepMerge` cannot: switching a credential union to the other\n * variant drops the abandoned variant's secret, because the entire union subtree is swapped.\n *\n * Consequence: a union (or array) subtree is all-or-nothing — the caller must send the complete\n * block, since a partial patch replaces (and so loses) the omitted siblings.\n *\n * Object keys present only in `base` (e.g. `storage`, `processors`, anything the schema omits) are\n * preserved at every level; `undefined` patch values are skipped. Assumes `patch` is already\n * schema-validated (so every object-valued patch key has a matching schema node). Pure — neither\n * argument is mutated.\n */\nexport const schemaGuidedMerge = <T extends Record<string, unknown>>(\n schema: z.core.$ZodType,\n base: T,\n patch: Record<string, unknown>,\n): T => {\n const node = unwrap(schema);\n if (!(node instanceof z.ZodObject) || !isPlainObject(base)) return patch as T;\n\n const out: Record<string, unknown> = { ...base };\n for (const [key, value] of Object.entries(patch)) {\n if (value === undefined) continue;\n const child = node.shape[key];\n const current = out[key];\n out[key] =\n child && isPlainObject(current) && isPlainObject(value)\n ? schemaGuidedMerge(child, current, value)\n : value;\n }\n\n return out as T;\n};\n","import { z } from 'zod';\n\n/**\n * `keboola.app-data-gateway` — the Data Gateway provisions and manages its own Snowflake\n * workspace, so the config carries no credentials: just the id of the workspace it runs\n * against, stored at `parameters.db.workspaceId`.\n */\nexport const appDataGatewaySchema = z.object({\n parameters: z.object({\n db: z.object({\n workspaceId: z.number(),\n }),\n }),\n});\n","import { z } from 'zod';\n\n/** Wrap a `parameters.db` credential schema into the full component config shape. */\nexport const dbConfig = <Db extends z.ZodType>(db: Db) =>\n z.object({ parameters: z.object({ db }) });\n","import { z } from 'zod';\n\n/**\n * The credential fields shared by virtually every DB writer, stored at `parameters.db`.\n * Components extend this with driver-specific fields (`schema`, `warehouse`, `ssh`, …) and\n * override where they differ (e.g. Snowflake makes `#password` optional). Secret leaves use\n * the `#` prefix the encryption service recognizes.\n */\nexport const dbConnectionSchema = z.object({\n host: z.string().describe('Hostname'),\n port: z.number().describe('Port'),\n user: z.string().describe('Username'),\n '#password': z.string().describe('Password'),\n database: z.string().describe('Database Name'),\n});\n","import { z } from 'zod';\n\n/**\n * Marks a field as \"must be absent\" in one arm of a mutually-exclusive union: `z.undefined()`\n * rejects any value while `.optional()` lets the key be omitted entirely. Pairing it with a\n * required field in the sibling arm (e.g. `#password` XOR `#privateKey`) is what makes an\n * \"exactly one of\" union reject configs that set both keys — or neither — at runtime and in\n * the inferred type. Without it the arms would be open objects that silently strip the extra key.\n */\nexport const forbidden = z.undefined().optional();\n","import { z } from 'zod';\n\n/**\n * The OAuth credential reference components store under a top-level `authorization` key. `id`\n * points at the vault-stored credential; `version` is the OAuth-API version (3 on modern stacks).\n * Shared by every OAuth-backed component (Google family, Facebook, …).\n */\nexport const oauthAuthorizationSchema = z.object({\n oauth_api: z.object({\n id: z.string(),\n version: z.number().optional(),\n }),\n});\n","import { z } from 'zod';\n\nexport const sshTunnelSchema = z.object({\n enabled: z.boolean(),\n sshHost: z.string().optional(),\n user: z.string().optional(),\n sshPort: z.number().optional(),\n /** FTP passive-mode port range (e.g. `10000:10005`); only relevant to FTP extractors. */\n passivePortRange: z.string().optional(),\n keys: z\n .object({\n public: z.string().optional(),\n '#private': z.string().optional(),\n })\n .optional(),\n});\n","import { z } from 'zod';\n\n/** SSL options nested at `parameters.db.ssl` (drivers that support it, e.g. MySQL, Hive). */\nexport const sslSchema = z.object({\n enabled: z.boolean(),\n cert: z.string().optional(),\n '#key': z.string().optional(),\n ca: z.string().optional(),\n cipher: z.string().optional(),\n verifyServerCert: z.boolean().optional(),\n});\n","import { z } from 'zod';\n\nimport { forbidden } from './common';\n\n/**\n * `keboola.app-snowflake-dwh-manager` — master Snowflake connection. Auth is a password OR a\n * key-pair (exactly one). The common fields are shared; each variant requires its own secret and\n * *forbids the other* (`forbidden`), so a config carrying both — or neither — is rejected at\n * runtime and at the type level, matching the `wr-db-snowflake` XOR pattern.\n */\nconst dwhMasterBase = z.object({\n master_host: z.string(),\n master_user: z.string(),\n master_database: z.string(),\n warehouse: z.string(),\n});\n\nexport const appSnowflakeDwhManagerSchema = z.object({\n parameters: z.union([\n dwhMasterBase.extend({ '#master_password': z.string(), '#master_private_key': forbidden }),\n dwhMasterBase.extend({ '#master_private_key': z.string(), '#master_password': forbidden }),\n ]),\n});\n","import { z } from 'zod';\n\nimport { forbidden } from '../common';\n\n// `.loose()`: the auth block is validated, but the extractor's other `parameters` (bucket, key,\n// saveAs, …) are component-managed and must pass through rather than be stripped on create/update.\n/** Access-key credentials — forbids the IAM-role fields so the variants stay exclusive. */\nconst awsCredentialsAuth = z\n .object({\n loginType: z.literal('credentials'),\n accessKeyId: z.string(),\n '#secretAccessKey': z.string(),\n accountId: forbidden,\n roleName: forbidden,\n })\n .loose();\n\n/** IAM-role auth — forbids the access-key fields so the variants stay exclusive. */\nconst awsRoleAuth = z\n .object({\n loginType: z.literal('role'),\n accountId: z.string(),\n roleName: z.string(),\n accessKeyId: forbidden,\n '#secretAccessKey': forbidden,\n })\n .loose();\n\n/**\n * `keboola.ex-aws-s3` — access-key credentials OR IAM-role auth (exactly one). `loginType` is the\n * discriminant, and each arm *forbids the other* variant's fields (`z.undefined()`) so a config\n * mixing both — e.g. credentials + a stale `roleName` — is rejected rather than silently stripped.\n * The outer object is `.loose()` so top-level component-managed keys (`storage`, `processors`)\n * pass through.\n */\nexport const exAwsS3Schema = z\n .object({\n parameters: z.union([awsCredentialsAuth, awsRoleAuth]),\n })\n .loose();\n","import { z } from 'zod';\n\n/**\n * `kds-team.ex-azure-blob-storage-v2` — account name + key + container. Both levels are `.loose()`:\n * the connection block is validated, but component-managed `parameters` and top-level keys\n * (`storage`, `processors`) pass through rather than being stripped on create/update.\n */\nexport const exAzureBlobSchema = z\n .object({\n parameters: z\n .object({\n account_name: z.string(),\n '#account_key': z.string(),\n container_name: z.string(),\n })\n .loose(),\n })\n .loose();\n","import { z } from 'zod';\n\n/**\n * `kds-team.ex-azure-data-lake-gen2` — like Blob, but a `file_system` instead of a container. Both\n * levels are `.loose()`: the connection block is validated, but component-managed `parameters` and\n * top-level keys (`storage`, `processors`) pass through rather than being stripped on create/update.\n */\nexport const exAzureDataLakeSchema = z\n .object({\n parameters: z\n .object({\n account_name: z.string(),\n '#account_key': z.string(),\n file_system: z.string(),\n })\n .loose(),\n })\n .loose();\n","import { z } from 'zod';\n\nimport { forbidden, sshTunnelSchema } from '../common';\n\n/** Connection fields shared by both auth variants. */\nconst ftpConnection = z.object({\n host: z.string(),\n port: z.number(),\n connectionType: z.enum(['FTP', 'FTPS', 'SFTP']),\n username: z.string(),\n ignorePassiveAddress: z.boolean().optional(),\n ssh: sshTunnelSchema.optional(),\n path: z.string().optional(),\n onlyNewFiles: z.boolean().optional(),\n});\n\n// `.loose()`: validate the connection block but let component-managed parameter keys pass through.\n/** Password auth — forbids the private key so the variants stay exclusive. */\nconst ftpPasswordAuth = ftpConnection\n .extend({ '#password': z.string(), '#privateKey': forbidden })\n .loose();\n\n/** Private-key auth — forbids the password so the variants stay exclusive. */\nconst ftpPrivateKeyAuth = ftpConnection\n .extend({ '#privateKey': z.string(), '#password': forbidden })\n .loose();\n\n/**\n * `keboola.ex-ftp` / `keboola.ex-ftp-csas` — FTP/FTPS/SFTP server connection. Auth is a password\n * OR a private key (exactly one): each variant requires its secret and *forbids the other*\n * (`z.undefined()`), so a config with both — or neither — is rejected, and switching variants via\n * an update drops the abandoned secret (the whole `parameters` union subtree is replaced wholesale\n * by `schemaGuidedMerge`, so a partial patch must carry the complete connection block). The outer\n * object is `.loose()` so top-level component-managed keys (`storage`, `processors`) pass through.\n */\nexport const exFtpSchema = z\n .object({\n parameters: z.union([ftpPasswordAuth, ftpPrivateKeyAuth]),\n })\n .loose();\n","import { z } from 'zod';\n\n/**\n * `keboola.ex-http` — only the connection block is stable here. The request/job definitions are\n * component-managed and left unvalidated, so both levels are `.loose()`: extra `parameters` keys\n * and top-level keys (`storage`, `processors`) pass through `schema`/`inputSchema` unchanged rather\n * than being stripped on create/update.\n */\nexport const exHttpSchema = z\n .object({\n parameters: z.object({ baseUrl: z.string(), maxRedirects: z.number().optional() }).loose(),\n })\n .loose();\n","import { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/**\n * Default extractor credentials — host/port/user/#password/database + optional SSH tunnel, the\n * same `parameters.db` block the writers use. Tunnel support mirrors kbc-ui's `hasSshTunnel` /\n * `hasSsl` (`apps/kbc-ui/src/scripts/modules/ex-db-generic/helpers.ts`): most drivers accept an\n * SSH tunnel, only pgsql/mysql/mssql also accept SSL, and a handful accept neither. This shared\n * schema covers the generic SSH-only drivers: redshift, db2(-bata), mssql-cdata, impala,\n * hive(-csas, -csas-test). SSL-capable pgsql and the tunnel-less progress-db get their own\n * schema, as do drivers with extra/renamed fields.\n */\nexport const exDbDefaultSchema = dbConfig(\n dbConnectionSchema.extend({ ssh: sshTunnelSchema.optional() }),\n);\n","import { dbConfig, dbConnectionSchema, sshTunnelSchema, sslSchema } from '../common';\n\n/** `keboola.ex-db-pgsql` — generic credentials that also accept SSL. */\nexport const exDbPgsqlSchema = dbConfig(\n dbConnectionSchema.extend({ ssh: sshTunnelSchema.optional(), ssl: sslSchema.optional() }),\n);\n","import { dbConfig, dbConnectionSchema } from '../common';\n\n/** `kds-team.ex-progress-db` — generic credentials, no SSH tunnel or SSL. */\nexport const exDbProgressSchema = dbConfig(dbConnectionSchema);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema, sslSchema } from '../common';\n\n/** `keboola.ex-db-mysql` — `database` optional + transaction-isolation / network-compression. */\nexport const exDbMysqlSchema = dbConfig(\n dbConnectionSchema.extend({\n database: z.string().optional(),\n transactionIsolationLevel: z\n .enum(['REPEATABLE READ', 'READ COMMITTED', 'READ UNCOMMITTED', 'SERIALIZABLE'])\n .optional(),\n networkCompression: z.boolean().optional(),\n ssh: sshTunnelSchema.optional(),\n ssl: sslSchema.optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema, sslSchema } from '../common';\n\n/** `keboola.ex-db-mssql` — `port` optional, otherwise the shared base. */\nexport const exDbMssqlSchema = dbConfig(\n dbConnectionSchema.extend({\n port: z.number().optional(),\n ssh: sshTunnelSchema.optional(),\n ssl: sslSchema.optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.ex-db-oracle` — host/port/database all optional (tnsnames is the alternative). */\nexport const exDbOracleSchema = dbConfig(\n dbConnectionSchema.omit({ host: true, port: true, database: true }).extend({\n host: z.string().optional(),\n port: z.number().optional(),\n database: z.string().optional(),\n tnsnames: z.string().optional(),\n connectThrough: z.boolean().optional(),\n ssh: sshTunnelSchema.optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig } from '../common';\n\n/** `keboola.ex-db-firebird` — `dbname` + user/#password only (no host/port/database fields). */\nexport const exDbFirebirdSchema = dbConfig(\n z.object({ dbname: z.string(), user: z.string(), '#password': z.string() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema } from '../common';\n\n/** `keboola.ex-teradata` — shared base with optional `database`. */\nexport const exTeradataSchema = dbConfig(\n dbConnectionSchema.extend({ database: z.string().optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema } from '../common';\n\n/** `keboola.ex-db-informix` — Informix server name + protocol + optional locale. */\nexport const exDbInformixSchema = dbConfig(\n dbConnectionSchema.extend({\n serverName: z.string(),\n protocol: z.enum(['onsoctcp', 'onsocssl']),\n dbLocale: z.string().optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, forbidden } from '../common';\n\n/**\n * `keboola.ex-db-snowflake` — auth is a union: password OR key-pair (exactly one). The common\n * fields (host/port/user/database + optional schema/warehouse) are shared; each variant requires\n * its own secret and forbids the other, so a config carrying both — or neither — is rejected at\n * runtime and at the type level.\n */\nconst snowflakeCommon = dbConnectionSchema\n .omit({ '#password': true })\n .extend({ schema: z.string().optional(), warehouse: z.string().optional() });\n\nexport const exDbSnowflakeSchema = dbConfig(\n z.union([\n snowflakeCommon.extend({ '#password': z.string(), '#privateKey': forbidden }),\n snowflakeCommon.extend({ '#privateKey': z.string(), '#password': forbidden }),\n ]),\n);\n","import { z } from 'zod';\n\nimport { dbConfig } from '../common';\n\n/** `keboola.ex-db-netsuite` — SuiteAnalytics account/role + user/#password (no host/port/db). */\nexport const exDbNetsuiteSchema = dbConfig(\n z.object({\n accountId: z.string(),\n roleId: z.string(),\n user: z.string(),\n '#password': z.string(),\n }),\n);\n\n/** `kds-team.ex-netsuite` — Connect host/port + server data source + account/role. */\nexport const exKdsNetsuiteSchema = dbConfig(\n z.object({\n host: z.string(),\n port: z.number(),\n server_data_source: z.enum(['NetSuite.com', 'NetSuite2.com']),\n account_id: z.string(),\n role_id: z.string(),\n user: z.string(),\n '#password': z.string(),\n }),\n);\n","import { z } from 'zod';\n\n/**\n * A single exported column. `type` is always present and drives which of the other fields the\n * UI shows (and persists): `dataType`/`dataTypeSize` for the base types + LABEL, `reference` for\n * LABEL/HYPERLINK, `schemaReference` for REFERENCE, `format`/`dateDimension` for DATE, and\n * `sortLabel`/`sortOrder` + the `identifier*` fields for ATTRIBUTE. They're optional here since a\n * given column only carries the subset relevant to its type. Mirrors the kbc-ui column adapter\n * (`apps/kbc-ui/src/scripts/modules/gooddata-writer-v3/helpers/makeColumnDefinition.ts`).\n */\nconst gooddataColumn = z.object({\n type: z.enum([\n 'ATTRIBUTE',\n 'CONNECTION_POINT',\n 'DATE',\n 'FACT',\n 'HYPERLINK',\n 'LABEL',\n 'REFERENCE',\n 'IGNORE',\n ]),\n id: z.string().optional(),\n title: z.string().optional(),\n dataType: z.enum(['BIGINT', 'DATE', 'DECIMAL', 'INT', 'VARCHAR']).optional(),\n dataTypeSize: z.string().optional(),\n reference: z.string().optional(),\n schemaReference: z.string().optional(),\n sortLabel: z.string().optional(),\n sortOrder: z.enum(['ASC', 'DESC']).optional(),\n format: z.string().optional(),\n dateDimension: z.string().optional(),\n identifier: z.string().optional(),\n identifierLabel: z.string().optional(),\n identifierSortLabel: z.string().optional(),\n});\n\n/** One exported table: a GoodData `title`, its `columns` keyed by source column name, and an\n * optional `disabled` flag toggled when export is switched off. */\nconst gooddataTable = z.object({\n title: z.string(),\n disabled: z.boolean().optional(),\n identifier: z.string().optional(),\n columns: z.record(z.string(), gooddataColumn),\n});\n\n/** One date dimension; `template` selects the date-dimension template (`gooddata` / `keboola` /\n * a custom template id). */\nconst gooddataDimension = z.object({\n template: z.string(),\n includeTime: z.boolean().optional(),\n identifier: z.string().optional(),\n});\n\n/**\n * `keboola.gooddata-writer` — GoodData project + login credentials plus the exported model:\n * `tables` (keyed by source table id) and `dimensions` (keyed by dimension name). Both are\n * optional — a fresh config has credentials before any table/dimension is mapped — and must be\n * declared: the registry validates create/update input with a deep-partial that strips keys\n * absent from this shape, so an undeclared `tables`/`dimensions` payload would be dropped before\n * it's stored.\n */\nexport const gooddataWriterSchema = z.object({\n parameters: z.object({\n project: z.object({ pid: z.string(), backendUrl: z.string().optional() }),\n user: z.object({ login: z.string(), '#password': z.string() }),\n loadOnly: z.boolean().optional(),\n multiLoad: z.boolean().optional(),\n tables: z.record(z.string(), gooddataTable).optional(),\n dimensions: z.record(z.string(), gooddataDimension).optional(),\n }),\n});\n","import { z } from 'zod';\n\nimport { oauthAuthorizationSchema } from './common';\n\n/** `keboola.ex-google-ads` — OAuth credential reference + account selection. */\nexport const exGoogleAdsSchema = z.object({\n authorization: oauthAuthorizationSchema,\n parameters: z.object({\n customerId: z.array(z.string()),\n onlyEnabledCustomers: z.boolean().optional(),\n getAccountChildren: z.boolean().optional(),\n }),\n});\n","import { z } from 'zod';\n\n/**\n * `keboola.scheduler` — drives a target component config on a cron schedule. Unlike the\n * writer configs, scheduler state lives at the top level (no `parameters` wrapper):\n * `schedule` holds the cron expression + timezone + enabled/disabled state, `target`\n * identifies which component configuration to run.\n */\nexport const schedulerSchema = z.object({\n schedule: z.object({\n cronTab: z.string(),\n // Legacy configs predate the timezone field; the UI falls back to 'UTC' when it's\n // missing, so a config without it is still runnable. Keep it optional to match.\n timezone: z.string().optional(),\n state: z.enum(['enabled', 'disabled']),\n }),\n target: z.object({\n componentId: z.string(),\n configurationId: z.string(),\n mode: z.literal('run'),\n }),\n});\n","import { dbConfig, dbConnectionSchema, sshTunnelSchema, sslSchema } from '../common';\n\n/**\n * Default writer credentials — host/port/user/#password/database + optional SSH and SSL tunnels.\n * Shared by the writers that add no extra fields (`keboola.wr-db-mysql`, `keboola.wr-db-hive`);\n * writers that add or rename fields get their own schema.\n */\nexport const wrDbDefaultSchema = dbConfig(\n dbConnectionSchema.extend({ ssh: sshTunnelSchema.optional(), ssl: sslSchema.optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.wr-db-pgsql` — adds a required `schema`, optional SSH. */\nexport const wrDbPgsqlSchema = dbConfig(\n dbConnectionSchema.extend({ schema: z.string(), ssh: sshTunnelSchema.optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.wr-db-oracle` — optional `schema`, optional SSH. */\nexport const wrDbOracleSchema = dbConfig(\n dbConnectionSchema.extend({ schema: z.string().optional(), ssh: sshTunnelSchema.optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema } from '../common';\n\n/** `keboola.wr-synapse` — optional `schema` (defaults to `dbo` in the UI). */\nexport const wrSynapseSchema = dbConfig(\n dbConnectionSchema.extend({ schema: z.string().optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.wr-redshift-v2` — required `schema`, optional SSH. */\nexport const wrRedshiftSchema = dbConfig(\n dbConnectionSchema.extend({ schema: z.string(), ssh: sshTunnelSchema.optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.wr-db-mssql-v2` — optional `instance`, required `tdsVersion`, optional SSH. */\nexport const wrDbMssqlSchema = dbConfig(\n dbConnectionSchema.extend({\n instance: z.string().optional(),\n tdsVersion: z.enum(['7.0', '7.1', '7.2', '7.3', '7.4']),\n ssh: sshTunnelSchema.optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `keboola.wr-db-impala` — adds `auth_mech`, optional SSH. */\nexport const wrDbImpalaSchema = dbConfig(\n dbConnectionSchema.extend({ auth_mech: z.number(), ssh: sshTunnelSchema.optional() }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig } from '../common';\n\n/**\n * `kds-team.wr-exasol` — no `database`; auth is password OR SaaS personal-access-token\n * (`#refresh_token`), at least one required (both may coexist). Mirrors kbc-ui's\n * `apps/kbc-ui/src/scripts/modules/wr-db/templates/hasValidCredentials.ts`, which drops the\n * `#password` requirement once a `#refresh_token` is present.\n */\nconst exasolBase = z.object({\n host: z.string(),\n port: z.number(),\n user: z.string(),\n schema: z.string(),\n});\n\nexport const wrExasolSchema = dbConfig(\n z.union([\n exasolBase.extend({ '#password': z.string(), '#refresh_token': z.string().optional() }),\n exasolBase.extend({ '#refresh_token': z.string(), '#password': z.string().optional() }),\n ]),\n);\n","import { z } from 'zod';\n\nimport { dbConfig } from '../common';\n\n/** `kds-team.wr-firebolt` — no host/port; engine + AWS staging credentials. */\nexport const wrFireboltSchema = dbConfig(\n z.object({\n user: z.string(),\n '#password': z.string(),\n database: z.string(),\n aws_api_key_id: z.string(),\n '#aws_api_key_secret': z.string(),\n staging_bucket: z.string(),\n engine_name: z.string().optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, sshTunnelSchema } from '../common';\n\n/** `kds-team.wr-hive-csas` — Hive base + Kerberos auth. */\nexport const wrHiveCsasSchema = dbConfig(\n dbConnectionSchema.extend({\n kinitPrincipal: z.string(),\n servicePrincipal: z.string(),\n config: z.string(),\n '#keytab': z.string(),\n ssh: sshTunnelSchema.optional(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema } from '../common';\n\n/** `keboola.wr-thoughtspot` — SSH tunnel creds carried as top-level fields, not nested. */\nexport const wrThoughtspotSchema = dbConfig(\n dbConnectionSchema.extend({\n schema: z.string().optional(),\n sshUser: z.string(),\n '#sshPassword': z.string(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig } from '../common';\n\n/** `keboola.wr-sisense` — uses `username` (not `user`). */\nexport const wrSisenseSchema = dbConfig(\n z.object({\n host: z.string(),\n port: z.number(),\n username: z.string(),\n '#password': z.string(),\n database: z.string(),\n }),\n);\n","import { z } from 'zod';\n\nimport { dbConfig, dbConnectionSchema, forbidden } from '../common';\n\n/**\n * `keboola.wr-db-snowflake` — auth is a union: password OR key-pair (exactly one). The common\n * fields (host/port/user/database/schema/warehouse) are shared; each variant requires its own\n * secret and *forbids the other* (`z.undefined()`), so a config carrying both — or neither —\n * is rejected at runtime and at the type level. Without the `forbidden` half, the variants\n * would be open objects: the extra key is excess (TS allows it) and stripped (Zod accepts it).\n */\nconst snowflakeCommon = dbConnectionSchema\n .omit({ '#password': true })\n .extend({ schema: z.string(), warehouse: z.string().optional() });\n\nexport const wrDbSnowflakeSchema = dbConfig(\n z.union([\n snowflakeCommon.extend({ '#password': z.string(), '#privateKey': forbidden }),\n snowflakeCommon.extend({ '#privateKey': z.string(), '#password': forbidden }),\n ]),\n);\n","import { z } from 'zod';\n\n/** Deep-partial any schema: objects → keys optional (recursing), unions → each member\n * deep-partialed, anything else left as-is. Lets a union schema (e.g. Snowflake's\n * password | key-pair auth) still produce a partial input schema. */\nconst partialize = (schema: z.ZodType): z.ZodType => {\n if (schema instanceof z.ZodObject) return deepPartial(schema);\n if (schema instanceof z.ZodUnion) {\n const options = (schema.options as z.ZodType[]).map(partialize);\n return z.union(options as [z.ZodType, z.ZodType, ...z.ZodType[]]);\n }\n return schema;\n};\n\nconst deepPartial = (schema: z.ZodObject): z.ZodObject => {\n const shape: Record<string, z.ZodType> = {};\n for (const [key, value] of Object.entries(schema.shape)) {\n const field = value as z.ZodType;\n const inner = field instanceof z.ZodOptional ? (field.unwrap() as z.ZodType) : field;\n shape[key] = partialize(inner);\n }\n const partial = z.object(shape).partial();\n // Preserve the source object's catchall (e.g. a `.loose()` `parameters` block that must let\n // component-managed keys pass through) — rebuilding via `z.object` would otherwise strip it.\n return schema.def.catchall ? partial.catchall(schema.def.catchall) : partial;\n};\n\nexport type Registry<M extends Record<string, z.ZodObject>> = {\n add: <const Id extends string, Schema extends z.ZodObject>(\n componentId: Id,\n schema: Schema,\n ) => Registry<M & Record<Id, Schema>>;\n get: <Id extends keyof M>(\n componentId: Id,\n ) => {\n /** The component's complete runnable schema (precise per id). */\n schema: M[Id];\n /** Its deep-partial — the accepted create/update input. Loose `z.ZodObject` (the precise\n * partial type isn't worth deriving; callers get input typing from `schema` via `z.input`). */\n inputSchema: z.ZodObject;\n };\n has: (componentId: string) => boolean;\n};\n\n/** Extracts the registered component-id union from a registry instance type. */\nexport type InferComponentId<R> = R extends Registry<infer M> ? keyof M & string : never;\n\nexport const createRegistry = (): Registry<Record<never, never>> => {\n const map = new Map<string, z.ZodObject>();\n\n const registry = {\n add(componentId: string, schema: z.ZodObject) {\n map.set(componentId, schema);\n return registry;\n },\n get(componentId: string) {\n const schema = map.get(componentId);\n if (!schema) throw new Error(`No configuration registered for component \"${componentId}\".`);\n return { schema, inputSchema: deepPartial(schema) };\n },\n has: (componentId: string) => map.has(componentId),\n };\n\n return registry as unknown as Registry<Record<never, never>>;\n};\n","import { ComponentId } from '../../constants/componentId';\n\nimport { appDataGatewaySchema } from './schemas/appDataGatewaySchema';\nimport { appSnowflakeDwhManagerSchema } from './schemas/appSnowflakeDwhManagerSchema';\nimport {\n exAwsS3Schema,\n exAzureBlobSchema,\n exAzureDataLakeSchema,\n exFtpSchema,\n exHttpSchema,\n} from './schemas/ex';\nimport {\n exDbDefaultSchema,\n exDbFirebirdSchema,\n exDbInformixSchema,\n exDbMssqlSchema,\n exDbMysqlSchema,\n exDbNetsuiteSchema,\n exDbOracleSchema,\n exDbPgsqlSchema,\n exDbProgressSchema,\n exDbSnowflakeSchema,\n exKdsNetsuiteSchema,\n exTeradataSchema,\n} from './schemas/exDb';\nimport { gooddataWriterSchema } from './schemas/gooddataWriterSchema';\nimport { exGoogleAdsSchema } from './schemas/googleAdsSchema';\nimport { schedulerSchema } from './schemas/schedulerSchema';\nimport {\n wrDbDefaultSchema,\n wrDbImpalaSchema,\n wrDbMssqlSchema,\n wrDbOracleSchema,\n wrDbPgsqlSchema,\n wrDbSnowflakeSchema,\n wrExasolSchema,\n wrFireboltSchema,\n wrHiveCsasSchema,\n wrRedshiftSchema,\n wrSisenseSchema,\n wrSynapseSchema,\n wrThoughtspotSchema,\n} from './schemas/wrDb';\nimport { createRegistry, type GetRegisteredId } from './createRegistry';\n\nexport const registry = createRegistry()\n /**\n * DB writers (`wr-db-*` family + related SaaS targets). Split into the standard writers\n * built on the shared `parameters.db` connection base and the special-cased targets whose\n * config diverges (extra auth, no host/port, or a provisioned workspace).\n */\n\n // Standard writers — host/port/user/#password/database, plus per-driver extras (schema, ssh…).\n .add(ComponentId.WR_DB_MYSQL, wrDbDefaultSchema)\n .add(ComponentId.WR_DB_PGSQL, wrDbPgsqlSchema)\n .add(ComponentId.WR_PAIRITY, wrDbPgsqlSchema) // pgsql variant\n .add(ComponentId.WR_DB_ORACLE, wrDbOracleSchema)\n .add(ComponentId.WR_DB_SNOWFLAKE, wrDbSnowflakeSchema)\n .add(ComponentId.WR_DB_SNOWFLAKE_GCS, wrDbSnowflakeSchema)\n .add(ComponentId.WR_DB_SNOWFLAKE_GCS_S3, wrDbSnowflakeSchema)\n .add(ComponentId.WR_SNOWFLAKE_BLOB_STORAGE, wrDbSnowflakeSchema)\n .add(ComponentId.WR_LOOKER_V2, wrDbSnowflakeSchema) // legacy snowflake\n .add(ComponentId.WR_SYNAPSE, wrSynapseSchema)\n .add(ComponentId.WR_REDSHIFT, wrRedshiftSchema)\n .add(ComponentId.WR_DB_MSSQL, wrDbMssqlSchema)\n .add(ComponentId.WR_DB_HIVE, wrDbDefaultSchema)\n .add(ComponentId.WR_DB_IMPALA, wrDbImpalaSchema)\n\n // Special-cased targets — diverging auth or credential shape.\n .add(ComponentId.WR_HIVE_CSAS, wrHiveCsasSchema) // Kerberos auth\n .add(ComponentId.WR_THOUGHTSPOT, wrThoughtspotSchema) // top-level SSH creds\n .add(ComponentId.WR_EXASOL, wrExasolSchema)\n .add(ComponentId.WR_FIREBOLT, wrFireboltSchema)\n .add(ComponentId.WR_SISENSE, wrSisenseSchema)\n .add(ComponentId.APP_DATA_GATEWAY, appDataGatewaySchema) // provisioned workspace, no creds\n .add(ComponentId.SCHEDULER, schedulerSchema)\n\n // App-specific writers — bespoke credential blocks.\n .add(ComponentId.APP_SNOWFLAKE_DWH_MANAGER, appSnowflakeDwhManagerSchema)\n .add(ComponentId.GOODDATA_WRITER, gooddataWriterSchema)\n\n /**\n * DB extractors (`ex-db-*` family) — same `parameters.db` credentials as the writers above.\n * Split into the generic-credentials drivers that reuse `exDbDefaultSchema` and the drivers\n * whose credentials diverge enough to need their own schema.\n */\n\n // Default credentials — host/port/user/#password/database + optional SSH tunnel.\n .add(ComponentId.EX_DB_REDSHIFT, exDbDefaultSchema)\n .add(ComponentId.EX_DB_DB2, exDbDefaultSchema)\n .add(ComponentId.EX_DB_DB2_BATA, exDbDefaultSchema)\n .add(ComponentId.EX_DB_MSSQL_CDATA, exDbDefaultSchema)\n .add(ComponentId.EX_DB_IMPALA, exDbDefaultSchema)\n .add(ComponentId.EX_DB_HIVE, exDbDefaultSchema)\n .add(ComponentId.EX_DB_HIVE_CSAS, exDbDefaultSchema)\n .add(ComponentId.EX_DB_HIVE_CSAS_TEST, exDbDefaultSchema)\n\n // Driver-specific credentials — extra/renamed fields or different SSH tunnel / SSL support.\n .add(ComponentId.EX_DB_PGSQL, exDbPgsqlSchema) // generic creds + SSL\n .add(ComponentId.EX_DB_MYSQL, exDbMysqlSchema)\n .add(ComponentId.EX_DB_MSSQL, exDbMssqlSchema)\n .add(ComponentId.EX_DB_ORACLE, exDbOracleSchema)\n .add(ComponentId.EX_DB_SNOWFLAKE, exDbSnowflakeSchema)\n .add(ComponentId.EX_DB_FIREBIRD, exDbFirebirdSchema)\n .add(ComponentId.EX_DB_NETSUITE, exDbNetsuiteSchema)\n .add(ComponentId.EX_DB_INFORMIX, exDbInformixSchema)\n .add(ComponentId.EX_TERADATA, exTeradataSchema)\n .add(ComponentId.KDS_EX_NETSUITE, exKdsNetsuiteSchema)\n .add(ComponentId.KDS_EX_PROGRESS_DB, exDbProgressSchema) // generic creds, no SSH/SSL\n // Google (OAuth) components\n .add(ComponentId.EX_GOOGLE_ADS, exGoogleAdsSchema)\n\n /**\n * File/connection extractors (`ex` family) — no shared credential base; each has its own\n * connection/credentials shape, so each is its own schema (ftp-csas reuses ftp).\n */\n .add(ComponentId.EX_HTTP, exHttpSchema)\n .add(ComponentId.EX_FTP, exFtpSchema)\n .add(ComponentId.EX_FTP_CSAS, exFtpSchema) // same shape as ftp\n .add(ComponentId.EX_AWS_S3, exAwsS3Schema)\n .add(ComponentId.KDS_EX_AZURE_BLOB_STORAGE_V2, exAzureBlobSchema)\n .add(ComponentId.KDS_EX_AZURE_DATA_LAKE_GEN2, exAzureDataLakeSchema);\n\nexport type RegisteredComponentId = GetRegisteredId<typeof registry>;\n","import type { z } from 'zod';\n\nimport type { createEncryptionClient } from '../../clients/encryption/encryptionClient';\nimport type * as storage from '../../clients/storage';\nimport type {\n BaseComponentConfig,\n ConfigurationPath,\n CreateConfigurationInput,\n UpdateConfigurationInput,\n} from '../../clients/storage/types';\nimport type { createDefaultBranch } from '../../domain/defaultBranch';\nimport {\n assertCanCreateConfiguration,\n assertCanUpdateConfiguration,\n} from '../../domain/permissions/configurations';\nimport type { Project } from '../../domain/project';\nimport { isEmptyDeep } from '../../utils/isEmptyDeep';\nimport { schemaGuidedMerge } from '../../utils/schemaGuidedMerge';\n\nimport { type RegisteredComponentId, registry } from './registry';\n\ntype ConfigurationSdkContext = {\n project: Project;\n defaultBranch: ReturnType<typeof createDefaultBranch>;\n};\n\ntype Options = {\n storageClient: ReturnType<typeof storage.createStorageClient>;\n encryptionClient: ReturnType<typeof createEncryptionClient>;\n context: ConfigurationSdkContext;\n};\n\ntype DeepPartial<T> = T extends object ? { [K in keyof T]?: DeepPartial<T[K]> } : T;\n\ntype ConfigurationSchema<ComponentId extends RegisteredComponentId> = z.input<\n ReturnType<typeof registry.get<ComponentId>>['schema']\n>;\n\ntype TypedConfiguration<ComponentId extends RegisteredComponentId> = {\n componentId: ComponentId;\n configuration: DeepPartial<ConfigurationSchema<ComponentId>>;\n};\n\n/**\n * How an update writes the patch against the stored configuration:\n * - `'merge'` (default) — schema-guided deep merge: object fields patch individually, while a\n * credential union or array subtree is replaced wholesale (so switching auth variants deletes\n * the abandoned secret). Untouched leaves and out-of-schema keys are preserved. Reads the\n * current config first to merge onto.\n * - `'replace'` — store exactly what the caller sends (after validation + encryption); no read,\n * no merge. Completeness is on the caller — any field or sibling key (e.g. `storage`) it omits\n * is gone.\n */\ntype UpdateMode = 'merge' | 'replace';\n\nconst toConfigResult = <ComponentId extends RegisteredComponentId>(\n data: BaseComponentConfig,\n schema: z.ZodType,\n) => {\n const result = schema.safeParse(data.configuration);\n\n return {\n data: data as BaseComponentConfig<ConfigurationSchema<ComponentId>>,\n runnable: result.success,\n error: result.error,\n };\n};\n\nexport const createConfigurationSdk = ({ storageClient, encryptionClient, context }: Options) => {\n const _encrypt = async (\n componentId: RegisteredComponentId,\n data: Record<string, unknown>,\n ): Promise<Record<string, unknown>> => {\n if (isEmptyDeep(data)) return data;\n\n return encryptionClient.encryptScopedSecrets({\n scope: 'ProjectSecure',\n componentId,\n projectId: context.project.sapiToken.owner.id,\n data,\n });\n };\n\n const getConfiguration = async <ComponentId extends RegisteredComponentId>(\n path: ConfigurationPath<ComponentId>,\n ) => {\n const data = await storageClient.configurations.getConfiguration(path);\n const def = registry.get(path.componentId);\n\n return toConfigResult<ComponentId>(data, def.schema);\n };\n\n const createConfiguration = async <ComponentId extends RegisteredComponentId>(\n input: Omit<CreateConfigurationInput<ComponentId>, 'componentId' | 'configuration'> &\n TypedConfiguration<ComponentId>,\n ) => {\n const { componentId, branchId, configuration, ...rest } = input;\n assertCanCreateConfiguration(context.project.sapiToken, {\n isDevModeActive: context.defaultBranch.isDev(branchId),\n });\n const def = registry.get(componentId);\n const validated = def.inputSchema.parse(configuration);\n const encrypted = await _encrypt(componentId, validated);\n\n const data = await storageClient.configurations.createConfiguration({\n ...rest,\n branchId,\n componentId,\n configuration: encrypted,\n });\n\n return toConfigResult<ComponentId>(data, def.schema);\n };\n\n const updateConfiguration = async <ComponentId extends RegisteredComponentId>(\n input: Omit<UpdateConfigurationInput<ComponentId>, 'componentId' | 'configuration'> &\n TypedConfiguration<ComponentId> & { mode?: UpdateMode },\n ) => {\n const { componentId, branchId, configId, configuration, mode = 'merge', ...rest } = input;\n assertCanUpdateConfiguration(context.project.sapiToken, {\n isDevModeActive: context.defaultBranch.isDev(branchId),\n });\n const def = registry.get(componentId);\n\n const validated = def.inputSchema.parse(configuration);\n const encrypted = await _encrypt(componentId, validated);\n\n let newConfiguration: Record<string, unknown> = encrypted;\n if (mode === 'merge') {\n const original = await storageClient.configurations.getConfiguration({\n componentId,\n branchId,\n configId,\n });\n newConfiguration = schemaGuidedMerge(def.schema, original.configuration ?? {}, encrypted);\n }\n\n const { configuration: data } = await storageClient.configurations.updateConfiguration({\n ...rest,\n branchId,\n componentId,\n configId,\n configuration: newConfiguration,\n });\n\n return toConfigResult<ComponentId>(data, def.schema);\n };\n\n return { getConfiguration, createConfiguration, updateConfiguration };\n};\n"],"mappings":";;;;;;;;;;;;;AAUA,MAAa,eAAe,UAA4B;CACtD,IAAI,SAAS,MAAM,OAAO;CAC1B,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,MAAM,WAAW;CACxD,IAAIA,sBAAAA,cAAc,KAAK,GAAG,OAAO,OAAO,OAAO,KAAK,CAAC,CAAC,MAAM,WAAW;CACvE,OAAO;AACT;;;;ACVA,MAAM,UAAU,WACd,kBAAkBC,IAAAA,EAAE,eACpB,kBAAkBA,IAAAA,EAAE,eACpB,kBAAkBA,IAAAA,EAAE,aAChB,OAAO,OAAO,OAAO,CAAC,IACtB;;;;;;;;;;;;;;;;AAiBN,MAAa,qBACX,QACA,MACA,UACM;CACN,MAAM,OAAO,OAAO,MAAM;CAC1B,IAAI,EAAE,gBAAgBA,IAAAA,EAAE,cAAc,CAACC,sBAAAA,cAAc,IAAI,GAAG,OAAO;CAEnE,MAAM,MAA+B,EAAE,GAAG,KAAK;CAC/C,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,KAAK,GAAG;EAChD,IAAI,UAAU,KAAA,GAAW;EACzB,MAAM,QAAQ,KAAK,MAAM;EACzB,MAAM,UAAU,IAAI;EACpB,IAAI,OACF,SAASA,sBAAAA,cAAc,OAAO,KAAKA,sBAAAA,cAAc,KAAK,IAClD,kBAAkB,OAAO,SAAS,KAAK,IACvC;CACR;CAEA,OAAO;AACT;;;;;;;;ACxCA,MAAa,uBAAuBC,IAAAA,EAAE,OAAO,EAC3C,YAAYA,IAAAA,EAAE,OAAO,EACnB,IAAIA,IAAAA,EAAE,OAAO,EACX,aAA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1B,UAEG;EACH,MAAM,EAAE,aAAa,UAAU,eAAe,GAAG,SAAS;EAC1D,uBAAA,6BAA6B,QAAQ,QAAQ,WAAW,EACtD,iBAAiB,QAAQ,cAAc,MAAM,QAAQ,EACvD,CAAC;EACD,MAAM,MAAM,SAAS,IAAI,WAAW;EACpC,MAAM,YAAY,IAAI,YAAY,MAAM,aAAa;EACrD,MAAM,YAAY,MAAM,SAAS,aAAa,SAAS;EAEvD,MAAM,OAAO,MAAM,cAAc,eAAe,oBAAoB;GAClE,GAAG;GACH;GACA;GACA,eAAe;EACjB,CAAC;EAED,OAAO,eAA4B,MAAM,IAAI,MAAM;CACrD;CAEA,MAAM,sBAAsB,OAC1B,UAEG;EACH,MAAM,EAAE,aAAa,UAAU,UAAU,eAAe,OAAO,SAAS,GAAG,SAAS;EACpF,uBAAA,6BAA6B,QAAQ,QAAQ,WAAW,EACtD,iBAAiB,QAAQ,cAAc,MAAM,QAAQ,EACvD,CAAC;EACD,MAAM,MAAM,SAAS,IAAI,WAAW;EAEpC,MAAM,YAAY,IAAI,YAAY,MAAM,aAAa;EACrD,MAAM,YAAY,MAAM,SAAS,aAAa,SAAS;EAEvD,IAAI,mBAA4C;EAChD,IAAI,SAAS,SAAS;GACpB,MAAM,WAAW,MAAM,cAAc,eAAe,iBAAiB;IACnE;IACA;IACA;GACF,CAAC;GACD,mBAAmB,kBAAkB,IAAI,QAAQ,SAAS,iBAAiB,CAAC,GAAG,SAAS;EAC1F;EAEA,MAAM,EAAE,eAAe,SAAS,MAAM,cAAc,eAAe,oBAAoB;GACrF,GAAG;GACH;GACA;GACA;GACA,eAAe;EACjB,CAAC;EAED,OAAO,eAA4B,MAAM,IAAI,MAAM;CACrD;CAEA,OAAO;EAAE;EAAkB;EAAqB;CAAoB;AACtE"}
|
package/dist/constants/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_constants = require("../constants-
|
|
2
|
+
const require_constants = require("../constants-C4DlsF_M.cjs");
|
|
3
3
|
const require_adminRoles = require("../adminRoles-CO7J5qAy.cjs");
|
|
4
4
|
const require_componentId = require("../componentId-DkyQ8PM0.cjs");
|
|
5
5
|
exports.AdminRole = require_adminRoles.AdminRole;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ServiceId } from "../serviceIds-
|
|
1
|
+
import { t as ServiceId } from "../serviceIds-DRcoTnSd.cjs";
|
|
2
2
|
import { t as AdminRole } from "../adminRoles-C696kD_U.cjs";
|
|
3
3
|
import { t as Backend } from "../backends-DKBz5OxE.cjs";
|
|
4
4
|
import { a as STACKS, i as Provider, n as Continent, o as ProjectFeature, r as KeboolaStack, s as ComponentId, t as URLS } from "../index-NaYLwG_h.cjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ServiceId } from "../serviceIds-
|
|
1
|
+
import { t as ServiceId } from "../serviceIds-DRcoTnSd.js";
|
|
2
2
|
import { t as AdminRole } from "../adminRoles-C696kD_U.js";
|
|
3
3
|
import { t as Backend } from "../backends-DKBz5OxE.js";
|
|
4
4
|
import { a as STACKS, i as Provider, n as Continent, o as ProjectFeature, r as KeboolaStack, s as ComponentId, t as URLS } from "../index-NaYLwG_h.js";
|
package/dist/constants/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ServiceId, i as STACKS, n as Continent, o as Backend, r as Provider, s as ProjectFeature, t as URLS } from "../constants-
|
|
1
|
+
import { a as ServiceId, i as STACKS, n as Continent, o as Backend, r as Provider, s as ProjectFeature, t as URLS } from "../constants-wfbFsqqN.js";
|
|
2
2
|
import { t as AdminRole } from "../adminRoles-B40yBcmq.js";
|
|
3
3
|
import { t as ComponentId } from "../componentId-vJz-kWs6.js";
|
|
4
4
|
export { AdminRole, Backend, ComponentId, Continent, ProjectFeature, Provider, STACKS, ServiceId, URLS };
|
|
@@ -36,7 +36,8 @@ const ServiceId = {
|
|
|
36
36
|
Stream: "stream",
|
|
37
37
|
Notification: "notification",
|
|
38
38
|
Scheduler: "scheduler",
|
|
39
|
-
Metastore: "metastore"
|
|
39
|
+
Metastore: "metastore",
|
|
40
|
+
Billing: "billing"
|
|
40
41
|
};
|
|
41
42
|
//#endregion
|
|
42
43
|
//#region src/constants/stacks.ts
|
|
@@ -258,4 +259,4 @@ Object.defineProperty(exports, "URLS", {
|
|
|
258
259
|
}
|
|
259
260
|
});
|
|
260
261
|
|
|
261
|
-
//# sourceMappingURL=constants-
|
|
262
|
+
//# sourceMappingURL=constants-C4DlsF_M.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-C4DlsF_M.cjs","names":[],"sources":["../src/constants/projectFeatures.ts","../src/constants/backends.ts","../src/constants/serviceIds.ts","../src/constants/stacks.ts","../src/constants/index.ts"],"sourcesContent":["export const ProjectFeature = {\n DisableLegacyBucketPrefix: 'disable-legacy-bucket-prefix',\n SoxProtectedDefaultBranch: 'protected-default-branch',\n StorageBranches: 'storage-branches',\n} as const;\n\nexport type ProjectFeature = (typeof ProjectFeature)[keyof typeof ProjectFeature];\n","export const Backend = {\n Snowflake: 'snowflake',\n Bigquery: 'bigquery',\n} as const;\n\nexport type Backend = (typeof Backend)[keyof typeof Backend];\n","/**\n * Every service a Keboola stack can announce in its `GET /v2/storage` index.\n *\n * - The values are the `id`s the stack reports; `Service['id']` and the service-client registry\n * both narrow on them.\n * - Callers enumerate them at runtime — a test double announcing every service, for one.\n */\nexport const ServiceId = {\n Vault: 'vault',\n DataScience: 'data-science',\n Encryption: 'encryption',\n Telemetry: 'telemetry',\n Ai: 'ai',\n Editor: 'editor',\n Import: 'import',\n Oauth: 'oauth',\n Query: 'query',\n Queue: 'queue',\n KaiAssistant: 'kai-assistant',\n KaiAgent: 'kai-agent',\n SyncActions: 'sync-actions',\n Stream: 'stream',\n Notification: 'notification',\n Scheduler: 'scheduler',\n Metastore: 'metastore',\n Billing: 'billing',\n} as const;\n\nexport type ServiceId = (typeof ServiceId)[keyof typeof ServiceId];\n","export const Provider = {\n Aws: 'aws',\n Azure: 'azure',\n Gcp: 'gcp',\n} as const;\n\nexport type Provider = (typeof Provider)[keyof typeof Provider];\n\nexport const Continent = {\n Us: 'us',\n Europe: 'europe',\n} as const;\n\nexport type Continent = (typeof Continent)[keyof typeof Continent];\n\nexport type KeboolaStack = {\n id: string;\n host: string;\n isSingleTenant?: boolean;\n isTesting?: boolean;\n isPayg?: boolean;\n provider?: Provider;\n continent?: Continent;\n region?: string;\n isCanary?: boolean;\n};\n\nconst stacks = {\n NORTH_EUROPE_AZURE: {\n id: 'com-keboola-azure-north-europe',\n region: 'north-europe',\n host: 'connection.north-europe.azure.keboola.com',\n provider: 'azure',\n continent: 'europe',\n isPayg: true,\n },\n EU_CENTRAL_1_AWS: {\n id: 'kbc-eu-central-1',\n region: 'eu-central-1',\n host: 'connection.eu-central-1.keboola.com',\n provider: 'aws',\n continent: 'europe',\n },\n US_EAST_1_AWS: {\n id: 'kbc-us-east-1',\n region: 'us-east-1',\n host: 'connection.keboola.com',\n provider: 'aws',\n continent: 'us',\n },\n EUROPE_WEST3_GCP: {\n id: 'com-keboola-gcp-europe-west3',\n region: 'europe-west3',\n host: 'connection.europe-west3.gcp.keboola.com',\n provider: 'gcp',\n continent: 'europe',\n },\n US_EAST_4_GCP: {\n id: 'com-keboola-gcp-us-east4',\n region: 'us-east4',\n host: 'connection.us-east4.gcp.keboola.com',\n provider: 'gcp',\n continent: 'us',\n isPayg: true,\n },\n\n /* PRIVATE SINGLE TENANT STACKS\n ---------------------------- */\n HCI: {\n id: 'cloud-keboola-hci',\n host: 'connection.hci.keboola.cloud',\n isSingleTenant: true,\n },\n CSAS_PROD: {\n id: 'cloud-keboola-cs',\n host: 'connection.cs.keboola.cloud',\n isSingleTenant: true,\n },\n CSAS_TEST: {\n id: 'cloud-keboola-cs-test',\n host: 'connection.cs-test.keboola.cloud',\n isSingleTenant: true,\n },\n INNOGY: {\n id: 'cloud-keboola-innogy-hub',\n host: 'connection.innogy-hub.keboola.cloud',\n isSingleTenant: true,\n },\n GROUPON: {\n id: 'cloud-keboola-groupon',\n host: 'connection.groupon.keboola.cloud',\n isSingleTenant: true,\n },\n CREDIT_INFO: {\n id: 'cloud-keboola-creditinfo',\n host: 'connection.creditinfo.keboola.cloud',\n isSingleTenant: true,\n },\n COATES: {\n id: 'cloud-keboola-coates',\n host: 'connection.coates.keboola.cloud',\n isSingleTenant: true,\n },\n SLSP: {\n id: 'cloud-keboola-slsp',\n host: 'connection.slsp.keboola.cloud',\n isSingleTenant: true,\n },\n HCKZ: {\n id: 'cloud-keboola-hckz',\n host: 'connection.hckz.keboola.cloud',\n isSingleTenant: true,\n },\n PASHA: {\n id: 'cloud-keboola-pasha',\n host: 'connection.pasha.keboola.cloud',\n isSingleTenant: true,\n },\n RBI: {\n id: 'cloud-keboola-rbi',\n host: 'connection.rbi.keboola.cloud',\n isSingleTenant: true,\n },\n NAH: {\n id: 'cloud-keboola-nah',\n host: 'connection.nah.keboola.cloud',\n isSingleTenant: true,\n provider: 'azure',\n continent: 'us',\n },\n\n /* DEV STACKS\n ---------------------------- */\n DEV_US_CENTRAL_1_GCP: {\n id: 'dev-keboola-gcp-us-central1',\n region: 'us-central1',\n host: 'connection.us-central1.gcp.keboola.dev',\n provider: 'gcp',\n continent: 'us',\n isTesting: true,\n },\n DEV_EU_WEST_1_AWS: {\n id: 'dev-keboola-aws-eu-west-1',\n region: 'eu-west-1',\n host: 'connection.eu-west-1.aws.keboola.dev',\n provider: 'aws',\n continent: 'europe',\n isTesting: true,\n },\n DEV_US_EAST_2_AZURE: {\n id: 'kbc-testing-azure-east-us-2',\n region: 'east-us-2',\n host: 'connection.east-us-2.azure.keboola-testing.com',\n provider: 'azure',\n continent: 'us',\n isTesting: true,\n },\n DEV_KEBOOLA_CANARY_ORION: {\n id: 'dev-keboola-canary-orion',\n region: 'europe-west3',\n host: 'connection.canary-orion.keboola.dev',\n provider: 'gcp',\n continent: 'europe',\n isCanary: true,\n },\n} satisfies Record<string, Readonly<KeboolaStack>>;\n\n/**\n * Every stack the platform knows, keyed by name.\n *\n * - The key set is literal, so a name that is not in the object is a compile error at the call site\n * rather than an `undefined` to fall back from.\n * - The value type stays the uniform `KeboolaStack`, so `stack.isCanary` reads on any entry, not\n * only on the ones that carry the flag.\n */\nexport const STACKS: Record<keyof typeof stacks, Readonly<KeboolaStack>> = stacks;\n","export { ComponentId } from './componentId';\nexport { ProjectFeature } from './projectFeatures';\nexport { Backend } from './backends';\nexport { AdminRole } from './adminRoles';\nexport { ServiceId } from './serviceIds';\nexport { Continent, Provider, STACKS } from './stacks';\nexport type { KeboolaStack } from './stacks';\n\nexport const URLS = {\n USER_DOCUMENTATION: 'https://help.keboola.com',\n COMPONENTS: 'https://components.keboola.com',\n DEVELOPERS_DOCUMENTATION: 'https://developers.keboola.com',\n ACADEMY: 'https://academy.keboola.com',\n SALES_CONTACT_FORM: 'https://keboola.com/contact',\n SNOWFLAKE: 'https://www.snowflake.com',\n SNOWFLAKE_DOCS: 'https://docs.snowflake.com',\n MCP: 'https://www.keboola.com/mcp',\n CLI: 'https://www.keboola.com/cli',\n NODE_JS: 'https://nodejs.org/en',\n CLAUDE_CONNECTORS: 'https://claude.ai/customize/connectors',\n // Vendor \"how do I get this client\" pages linked from the connect surfaces.\n CLIENT_CLAUDE_CODE_QUICKSTART: 'https://code.claude.com/docs/en/quickstart',\n CLIENT_CLAUDE_AI: 'https://claude.ai',\n CLIENT_CLAUDE_DESKTOP_DOWNLOAD: 'https://claude.com/download',\n CLIENT_CURSOR_QUICKSTART: 'https://cursor.com/docs/get-started/quickstart',\n CLIENT_VS_CODE_SETUP: 'https://code.visualstudio.com/docs/setup/setup-overview',\n CLIENT_CODEX_QUICKSTART: 'https://developers.openai.com/codex/cli',\n CLIENT_CHATGPT_DOWNLOAD: 'https://chatgpt.com/download',\n CLIENT_MAKE_GET_STARTED: 'https://help.make.com/get-started',\n CLIENT_DEVIN_DESKTOP: 'https://docs.devin.ai/desktop/getting-started',\n} as const;\n"],"mappings":";AAAA,MAAa,iBAAiB;CAC5B,2BAA2B;CAC3B,2BAA2B;CAC3B,iBAAiB;AACnB;;;ACJA,MAAa,UAAU;CACrB,WAAW;CACX,UAAU;AACZ;;;;;;;;;;ACIA,MAAa,YAAY;CACvB,OAAO;CACP,aAAa;CACb,YAAY;CACZ,WAAW;CACX,IAAI;CACJ,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,OAAO;CACP,OAAO;CACP,cAAc;CACd,UAAU;CACV,aAAa;CACb,QAAQ;CACR,cAAc;CACd,WAAW;CACX,WAAW;CACX,SAAS;AACX;;;AC1BA,MAAa,WAAW;CACtB,KAAK;CACL,OAAO;CACP,KAAK;AACP;AAIA,MAAa,YAAY;CACvB,IAAI;CACJ,QAAQ;AACV;;;;;;;;;AAoKA,MAAa,SAA8D;CAnJzE,oBAAoB;EAClB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;EACX,QAAQ;CACV;CACA,kBAAkB;EAChB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;CACb;CACA,eAAe;EACb,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;CACb;CACA,kBAAkB;EAChB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;CACb;CACA,eAAe;EACb,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;EACX,QAAQ;CACV;CAIA,KAAK;EACH,IAAI;EACJ,MAAM;EACN,gBAAgB;CAClB;CACA,WAAW;EACT,IAAI;EACJ,MAAM;EACN,gBAAgB;CAClB;CACA,WAAW;EACT,IAAI;EACJ,MAAM;EACN,gBAAgB;CAClB;CACA,QAAQ;EACN,IAAI;EACJ,MAAM;EACN,gBAAgB;CAClB;CACA,SAAS;EACP,IAAI;EACJ,MAAM;EACN,gBAAgB;CAClB;CACA,aAAa;EACX,IAAI;EACJ,MAAM;EACN,gBAAgB;CAClB;CACA,QAAQ;EACN,IAAI;EACJ,MAAM;EACN,gBAAgB;CAClB;CACA,MAAM;EACJ,IAAI;EACJ,MAAM;EACN,gBAAgB;CAClB;CACA,MAAM;EACJ,IAAI;EACJ,MAAM;EACN,gBAAgB;CAClB;CACA,OAAO;EACL,IAAI;EACJ,MAAM;EACN,gBAAgB;CAClB;CACA,KAAK;EACH,IAAI;EACJ,MAAM;EACN,gBAAgB;CAClB;CACA,KAAK;EACH,IAAI;EACJ,MAAM;EACN,gBAAgB;EAChB,UAAU;EACV,WAAW;CACb;CAIA,sBAAsB;EACpB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;EACX,WAAW;CACb;CACA,mBAAmB;EACjB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;EACX,WAAW;CACb;CACA,qBAAqB;EACnB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;EACX,WAAW;CACb;CACA,0BAA0B;EACxB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;EACX,UAAU;CACZ;AAWyE;;;ACvK3E,MAAa,OAAO;CAClB,oBAAoB;CACpB,YAAY;CACZ,0BAA0B;CAC1B,SAAS;CACT,oBAAoB;CACpB,WAAW;CACX,gBAAgB;CAChB,KAAK;CACL,KAAK;CACL,SAAS;CACT,mBAAmB;CAEnB,+BAA+B;CAC/B,kBAAkB;CAClB,gCAAgC;CAChC,0BAA0B;CAC1B,sBAAsB;CACtB,yBAAyB;CACzB,yBAAyB;CACzB,yBAAyB;CACzB,sBAAsB;AACxB"}
|
|
@@ -36,7 +36,8 @@ const ServiceId = {
|
|
|
36
36
|
Stream: "stream",
|
|
37
37
|
Notification: "notification",
|
|
38
38
|
Scheduler: "scheduler",
|
|
39
|
-
Metastore: "metastore"
|
|
39
|
+
Metastore: "metastore",
|
|
40
|
+
Billing: "billing"
|
|
40
41
|
};
|
|
41
42
|
//#endregion
|
|
42
43
|
//#region src/constants/stacks.ts
|
|
@@ -217,4 +218,4 @@ const URLS = {
|
|
|
217
218
|
//#endregion
|
|
218
219
|
export { ServiceId as a, STACKS as i, Continent as n, Backend as o, Provider as r, ProjectFeature as s, URLS as t };
|
|
219
220
|
|
|
220
|
-
//# sourceMappingURL=constants-
|
|
221
|
+
//# sourceMappingURL=constants-wfbFsqqN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-wfbFsqqN.js","names":[],"sources":["../src/constants/projectFeatures.ts","../src/constants/backends.ts","../src/constants/serviceIds.ts","../src/constants/stacks.ts","../src/constants/index.ts"],"sourcesContent":["export const ProjectFeature = {\n DisableLegacyBucketPrefix: 'disable-legacy-bucket-prefix',\n SoxProtectedDefaultBranch: 'protected-default-branch',\n StorageBranches: 'storage-branches',\n} as const;\n\nexport type ProjectFeature = (typeof ProjectFeature)[keyof typeof ProjectFeature];\n","export const Backend = {\n Snowflake: 'snowflake',\n Bigquery: 'bigquery',\n} as const;\n\nexport type Backend = (typeof Backend)[keyof typeof Backend];\n","/**\n * Every service a Keboola stack can announce in its `GET /v2/storage` index.\n *\n * - The values are the `id`s the stack reports; `Service['id']` and the service-client registry\n * both narrow on them.\n * - Callers enumerate them at runtime — a test double announcing every service, for one.\n */\nexport const ServiceId = {\n Vault: 'vault',\n DataScience: 'data-science',\n Encryption: 'encryption',\n Telemetry: 'telemetry',\n Ai: 'ai',\n Editor: 'editor',\n Import: 'import',\n Oauth: 'oauth',\n Query: 'query',\n Queue: 'queue',\n KaiAssistant: 'kai-assistant',\n KaiAgent: 'kai-agent',\n SyncActions: 'sync-actions',\n Stream: 'stream',\n Notification: 'notification',\n Scheduler: 'scheduler',\n Metastore: 'metastore',\n Billing: 'billing',\n} as const;\n\nexport type ServiceId = (typeof ServiceId)[keyof typeof ServiceId];\n","export const Provider = {\n Aws: 'aws',\n Azure: 'azure',\n Gcp: 'gcp',\n} as const;\n\nexport type Provider = (typeof Provider)[keyof typeof Provider];\n\nexport const Continent = {\n Us: 'us',\n Europe: 'europe',\n} as const;\n\nexport type Continent = (typeof Continent)[keyof typeof Continent];\n\nexport type KeboolaStack = {\n id: string;\n host: string;\n isSingleTenant?: boolean;\n isTesting?: boolean;\n isPayg?: boolean;\n provider?: Provider;\n continent?: Continent;\n region?: string;\n isCanary?: boolean;\n};\n\nconst stacks = {\n NORTH_EUROPE_AZURE: {\n id: 'com-keboola-azure-north-europe',\n region: 'north-europe',\n host: 'connection.north-europe.azure.keboola.com',\n provider: 'azure',\n continent: 'europe',\n isPayg: true,\n },\n EU_CENTRAL_1_AWS: {\n id: 'kbc-eu-central-1',\n region: 'eu-central-1',\n host: 'connection.eu-central-1.keboola.com',\n provider: 'aws',\n continent: 'europe',\n },\n US_EAST_1_AWS: {\n id: 'kbc-us-east-1',\n region: 'us-east-1',\n host: 'connection.keboola.com',\n provider: 'aws',\n continent: 'us',\n },\n EUROPE_WEST3_GCP: {\n id: 'com-keboola-gcp-europe-west3',\n region: 'europe-west3',\n host: 'connection.europe-west3.gcp.keboola.com',\n provider: 'gcp',\n continent: 'europe',\n },\n US_EAST_4_GCP: {\n id: 'com-keboola-gcp-us-east4',\n region: 'us-east4',\n host: 'connection.us-east4.gcp.keboola.com',\n provider: 'gcp',\n continent: 'us',\n isPayg: true,\n },\n\n /* PRIVATE SINGLE TENANT STACKS\n ---------------------------- */\n HCI: {\n id: 'cloud-keboola-hci',\n host: 'connection.hci.keboola.cloud',\n isSingleTenant: true,\n },\n CSAS_PROD: {\n id: 'cloud-keboola-cs',\n host: 'connection.cs.keboola.cloud',\n isSingleTenant: true,\n },\n CSAS_TEST: {\n id: 'cloud-keboola-cs-test',\n host: 'connection.cs-test.keboola.cloud',\n isSingleTenant: true,\n },\n INNOGY: {\n id: 'cloud-keboola-innogy-hub',\n host: 'connection.innogy-hub.keboola.cloud',\n isSingleTenant: true,\n },\n GROUPON: {\n id: 'cloud-keboola-groupon',\n host: 'connection.groupon.keboola.cloud',\n isSingleTenant: true,\n },\n CREDIT_INFO: {\n id: 'cloud-keboola-creditinfo',\n host: 'connection.creditinfo.keboola.cloud',\n isSingleTenant: true,\n },\n COATES: {\n id: 'cloud-keboola-coates',\n host: 'connection.coates.keboola.cloud',\n isSingleTenant: true,\n },\n SLSP: {\n id: 'cloud-keboola-slsp',\n host: 'connection.slsp.keboola.cloud',\n isSingleTenant: true,\n },\n HCKZ: {\n id: 'cloud-keboola-hckz',\n host: 'connection.hckz.keboola.cloud',\n isSingleTenant: true,\n },\n PASHA: {\n id: 'cloud-keboola-pasha',\n host: 'connection.pasha.keboola.cloud',\n isSingleTenant: true,\n },\n RBI: {\n id: 'cloud-keboola-rbi',\n host: 'connection.rbi.keboola.cloud',\n isSingleTenant: true,\n },\n NAH: {\n id: 'cloud-keboola-nah',\n host: 'connection.nah.keboola.cloud',\n isSingleTenant: true,\n provider: 'azure',\n continent: 'us',\n },\n\n /* DEV STACKS\n ---------------------------- */\n DEV_US_CENTRAL_1_GCP: {\n id: 'dev-keboola-gcp-us-central1',\n region: 'us-central1',\n host: 'connection.us-central1.gcp.keboola.dev',\n provider: 'gcp',\n continent: 'us',\n isTesting: true,\n },\n DEV_EU_WEST_1_AWS: {\n id: 'dev-keboola-aws-eu-west-1',\n region: 'eu-west-1',\n host: 'connection.eu-west-1.aws.keboola.dev',\n provider: 'aws',\n continent: 'europe',\n isTesting: true,\n },\n DEV_US_EAST_2_AZURE: {\n id: 'kbc-testing-azure-east-us-2',\n region: 'east-us-2',\n host: 'connection.east-us-2.azure.keboola-testing.com',\n provider: 'azure',\n continent: 'us',\n isTesting: true,\n },\n DEV_KEBOOLA_CANARY_ORION: {\n id: 'dev-keboola-canary-orion',\n region: 'europe-west3',\n host: 'connection.canary-orion.keboola.dev',\n provider: 'gcp',\n continent: 'europe',\n isCanary: true,\n },\n} satisfies Record<string, Readonly<KeboolaStack>>;\n\n/**\n * Every stack the platform knows, keyed by name.\n *\n * - The key set is literal, so a name that is not in the object is a compile error at the call site\n * rather than an `undefined` to fall back from.\n * - The value type stays the uniform `KeboolaStack`, so `stack.isCanary` reads on any entry, not\n * only on the ones that carry the flag.\n */\nexport const STACKS: Record<keyof typeof stacks, Readonly<KeboolaStack>> = stacks;\n","export { ComponentId } from './componentId';\nexport { ProjectFeature } from './projectFeatures';\nexport { Backend } from './backends';\nexport { AdminRole } from './adminRoles';\nexport { ServiceId } from './serviceIds';\nexport { Continent, Provider, STACKS } from './stacks';\nexport type { KeboolaStack } from './stacks';\n\nexport const URLS = {\n USER_DOCUMENTATION: 'https://help.keboola.com',\n COMPONENTS: 'https://components.keboola.com',\n DEVELOPERS_DOCUMENTATION: 'https://developers.keboola.com',\n ACADEMY: 'https://academy.keboola.com',\n SALES_CONTACT_FORM: 'https://keboola.com/contact',\n SNOWFLAKE: 'https://www.snowflake.com',\n SNOWFLAKE_DOCS: 'https://docs.snowflake.com',\n MCP: 'https://www.keboola.com/mcp',\n CLI: 'https://www.keboola.com/cli',\n NODE_JS: 'https://nodejs.org/en',\n CLAUDE_CONNECTORS: 'https://claude.ai/customize/connectors',\n // Vendor \"how do I get this client\" pages linked from the connect surfaces.\n CLIENT_CLAUDE_CODE_QUICKSTART: 'https://code.claude.com/docs/en/quickstart',\n CLIENT_CLAUDE_AI: 'https://claude.ai',\n CLIENT_CLAUDE_DESKTOP_DOWNLOAD: 'https://claude.com/download',\n CLIENT_CURSOR_QUICKSTART: 'https://cursor.com/docs/get-started/quickstart',\n CLIENT_VS_CODE_SETUP: 'https://code.visualstudio.com/docs/setup/setup-overview',\n CLIENT_CODEX_QUICKSTART: 'https://developers.openai.com/codex/cli',\n CLIENT_CHATGPT_DOWNLOAD: 'https://chatgpt.com/download',\n CLIENT_MAKE_GET_STARTED: 'https://help.make.com/get-started',\n CLIENT_DEVIN_DESKTOP: 'https://docs.devin.ai/desktop/getting-started',\n} as const;\n"],"mappings":";AAAA,MAAa,iBAAiB;CAC5B,2BAA2B;CAC3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A,MAAM;EACJ,IAAI;EACJ,MAAM;EACN,gBAAgB;CAClB;CACA,MAAM;EACJ,IAAI;EACJ,MAAM;EACN,gBAAgB;CAClB;CACA,OAAO;EACL,IAAI;EACJ,MAAM;EACN,gBAAgB;CAClB;CACA,KAAK;EACH,IAAI;EACJ,MAAM;EACN,gBAAgB;CAClB;CACA,KAAK;EACH,IAAI;EACJ,MAAM;EACN,gBAAgB;EAChB,UAAU;EACV,WAAW;CACb;CAIA,sBAAsB;EACpB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;EACX,WAAW;CACb;CACA,mBAAmB;EACjB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;EACX,WAAW;CACb;CACA,qBAAqB;EACnB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;EACX,WAAW;CACb;CACA,0BAA0B;EACxB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;EACX,UAAU;CACZ;AAWyE;;;ACvK3E,MAAa,OAAO;CAClB,oBAAoB;CACpB,YAAY;CACZ,0BAA0B;CAC1B,SAAS;CACT,oBAAoB;CACpB,WAAW;CACX,gBAAgB;CAChB,KAAK;CACL,KAAK;CACL,SAAS;CACT,mBAAmB;CAEnB,+BAA+B;CAC/B,kBAAkB;CAClB,gCAAgC;CAChC,0BAA0B;CAC1B,sBAAsB;CACtB,yBAAyB;CACzB,yBAAyB;CACzB,yBAAyB;CACzB,sBAAsB;AACxB"}
|
|
@@ -60,12 +60,21 @@ const HttpContentType = {
|
|
|
60
60
|
};
|
|
61
61
|
const defaultValidateStatus = ({ response }) => response.status >= 200 && response.status <= 299;
|
|
62
62
|
/**
|
|
63
|
-
* Whether a response
|
|
63
|
+
* Whether a response declares HTML.
|
|
64
64
|
*
|
|
65
|
-
* - Media types are case-insensitive, so
|
|
66
|
-
* -
|
|
65
|
+
* - Media types are case-insensitive, so `Text/HTML` counts.
|
|
66
|
+
* - A header fact only: a `text/html` response may still carry no body at all.
|
|
67
67
|
*/
|
|
68
68
|
const isHtmlResponse = ({ response }) => !!response.headers.get(HttpHeader.CONTENT_TYPE)?.toLowerCase().includes(HttpContentType.TEXT_HTML);
|
|
69
|
+
/**
|
|
70
|
+
* Whether a response carried no payload, across every shape `parseData` produces for one:
|
|
71
|
+
*
|
|
72
|
+
* 1. `null` — a `204`, or a JSON body that was empty or whitespace.
|
|
73
|
+
* 2. `''` — any other media type with an empty body, read as text.
|
|
74
|
+
*
|
|
75
|
+
* Whitespace-only text counts as empty, matching how `parseJson` already treats it.
|
|
76
|
+
*/
|
|
77
|
+
const isContentEmpty = ({ data }) => data === null || data === void 0 || typeof data === "string" && data.trim() === "";
|
|
69
78
|
function removeUndefined(obj) {
|
|
70
79
|
const objCopy = { ...obj };
|
|
71
80
|
for (const [key, value] of Object.entries(objCopy)) if (value == null) delete objCopy[key];
|
|
@@ -255,6 +264,12 @@ Object.defineProperty(exports, "isApiError", {
|
|
|
255
264
|
return isApiError;
|
|
256
265
|
}
|
|
257
266
|
});
|
|
267
|
+
Object.defineProperty(exports, "isContentEmpty", {
|
|
268
|
+
enumerable: true,
|
|
269
|
+
get: function() {
|
|
270
|
+
return isContentEmpty;
|
|
271
|
+
}
|
|
272
|
+
});
|
|
258
273
|
Object.defineProperty(exports, "isFetchClientError", {
|
|
259
274
|
enumerable: true,
|
|
260
275
|
get: function() {
|
|
@@ -286,4 +301,4 @@ Object.defineProperty(exports, "parseContentDispositionHeader", {
|
|
|
286
301
|
}
|
|
287
302
|
});
|
|
288
303
|
|
|
289
|
-
//# sourceMappingURL=createFetchClient-
|
|
304
|
+
//# sourceMappingURL=createFetchClient-DgMiqTJ8.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFetchClient-DgMiqTJ8.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 declares HTML.\n *\n * - Media types are case-insensitive, so `Text/HTML` counts.\n * - A header fact only: a `text/html` response may still carry no body at all.\n */\nexport const isHtmlResponse = ({ response }: ApiResponse) =>\n !!response.headers\n .get(HttpHeader.CONTENT_TYPE)\n ?.toLowerCase()\n .includes(HttpContentType.TEXT_HTML);\n\n/**\n * Whether a response carried no payload, across every shape `parseData` produces for one:\n *\n * 1. `null` — a `204`, or a JSON body that was empty or whitespace.\n * 2. `''` — any other media type with an empty body, read as text.\n *\n * Whitespace-only text counts as empty, matching how `parseJson` already treats it.\n */\nexport const isContentEmpty = ({ data }: ApiResponse) =>\n data === null || data === undefined || (typeof data === 'string' && data.trim() === '');\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 pat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BAAkB,KAAK;EAC5B,OAAO,kBAAkB,OAAO;EAChC,QAAQ,kBAAkB,QAAQ;CACpC;AACF"}
|
|
@@ -58,12 +58,21 @@ const HttpContentType = {
|
|
|
58
58
|
};
|
|
59
59
|
const defaultValidateStatus = ({ response }) => response.status >= 200 && response.status <= 299;
|
|
60
60
|
/**
|
|
61
|
-
* Whether a response
|
|
61
|
+
* Whether a response declares HTML.
|
|
62
62
|
*
|
|
63
|
-
* - Media types are case-insensitive, so
|
|
64
|
-
* -
|
|
63
|
+
* - Media types are case-insensitive, so `Text/HTML` counts.
|
|
64
|
+
* - A header fact only: a `text/html` response may still carry no body at all.
|
|
65
65
|
*/
|
|
66
66
|
const isHtmlResponse = ({ response }) => !!response.headers.get(HttpHeader.CONTENT_TYPE)?.toLowerCase().includes(HttpContentType.TEXT_HTML);
|
|
67
|
+
/**
|
|
68
|
+
* Whether a response carried no payload, across every shape `parseData` produces for one:
|
|
69
|
+
*
|
|
70
|
+
* 1. `null` — a `204`, or a JSON body that was empty or whitespace.
|
|
71
|
+
* 2. `''` — any other media type with an empty body, read as text.
|
|
72
|
+
*
|
|
73
|
+
* Whitespace-only text counts as empty, matching how `parseJson` already treats it.
|
|
74
|
+
*/
|
|
75
|
+
const isContentEmpty = ({ data }) => data === null || data === void 0 || typeof data === "string" && data.trim() === "";
|
|
67
76
|
function removeUndefined(obj) {
|
|
68
77
|
const objCopy = { ...obj };
|
|
69
78
|
for (const [key, value] of Object.entries(objCopy)) if (value == null) delete objCopy[key];
|
|
@@ -193,6 +202,6 @@ const createFetchClient = ({ middlewares = [], ...defaultOptions }) => {
|
|
|
193
202
|
};
|
|
194
203
|
};
|
|
195
204
|
//#endregion
|
|
196
|
-
export { isTimeoutError as a, defaultValidateStatus as c,
|
|
205
|
+
export { isTimeoutError as a, defaultValidateStatus as c, normalizeBaseUrl as d, parseContentDispositionHeader as f, ApiError as g, KeboolaHttpHeader as h, isFetchClientError as i, isContentEmpty as l, HttpStatus as m, isAbortError as n, HttpContentType as o, ENCRYPTED_VALUE_PREFIX as p, isApiError as r, HttpHeader as s, createFetchClient as t, isHtmlResponse as u };
|
|
197
206
|
|
|
198
|
-
//# sourceMappingURL=createFetchClient-
|
|
207
|
+
//# sourceMappingURL=createFetchClient-U-ZrwPl2.js.map
|