@keboola/api-client 50.0.0 → 52.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 +46 -8
- package/API-SURFACE.md +2 -10
- package/CHANGELOG.md +37 -0
- package/README.md +2 -2
- package/dist/{ManagementSessionMintError-DNMbYauw.js → ManagementSessionMintError-BMHDcEqV.js} +2 -2
- package/dist/{ManagementSessionMintError-DNMbYauw.js.map → ManagementSessionMintError-BMHDcEqV.js.map} +1 -1
- package/dist/{ManagementSessionMintError-ByOulHQH.cjs → ManagementSessionMintError-Bc9bc7Ai.cjs} +2 -2
- package/dist/{ManagementSessionMintError-ByOulHQH.cjs.map → ManagementSessionMintError-Bc9bc7Ai.cjs.map} +1 -1
- package/dist/RowLevelSecurityError-CObFqj3E.js +33 -0
- package/dist/RowLevelSecurityError-CObFqj3E.js.map +1 -0
- package/dist/RowLevelSecurityError-RK_NhhAx.cjs +56 -0
- package/dist/RowLevelSecurityError-RK_NhhAx.cjs.map +1 -0
- package/dist/{adminRoles-FFyl7Dyx.d.cts → adminRoles-BTKVwEy8.d.cts} +2 -2
- package/dist/{adminRoles-DAwl657q.d.ts → adminRoles-Cm513r1G.d.ts} +2 -2
- package/dist/ai/index.cjs +2 -2
- package/dist/ai/index.d.cts +2 -2
- package/dist/ai/index.d.ts +2 -2
- package/dist/ai/index.js +2 -2
- package/dist/ai/types.d.cts +1 -1
- package/dist/ai/types.d.ts +1 -1
- package/dist/apps/index.cjs +3 -234
- package/dist/apps/index.d.cts +3 -212
- package/dist/apps/index.d.ts +3 -212
- package/dist/apps/index.js +1 -234
- package/dist/apps/types.d.cts +1 -2
- package/dist/apps/types.d.ts +1 -2
- package/dist/apps-BN7fWtSm.js +361 -0
- package/dist/apps-BN7fWtSm.js.map +1 -0
- package/dist/apps-C1x5IKNQ.cjs +376 -0
- package/dist/apps-C1x5IKNQ.cjs.map +1 -0
- 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-CvB4MukT.cjs → auth-AehUDNRK.cjs} +2 -2
- package/dist/{auth-CvB4MukT.cjs.map → auth-AehUDNRK.cjs.map} +1 -1
- package/dist/{auth-DYfQMQCs.js → auth-ZBQWCJPM.js} +2 -2
- package/dist/{auth-DYfQMQCs.js.map → auth-ZBQWCJPM.js.map} +1 -1
- package/dist/{authClient-oB5ydxWp.js → authClient-BM4L8XEN.js} +5 -5
- package/dist/{authClient-oB5ydxWp.js.map → authClient-BM4L8XEN.js.map} +1 -1
- package/dist/{authClient-DcKBpMcU.cjs → authClient-DspK50e7.cjs} +5 -5
- package/dist/{authClient-DcKBpMcU.cjs.map → authClient-DspK50e7.cjs.map} +1 -1
- package/dist/{authClient-Df3U4q_6.d.cts → authClient-NBi0pqD5.d.cts} +4 -4
- package/dist/{authClient-JtMVJWXY.d.ts → authClient-ij_Rm2Yn.d.ts} +4 -4
- package/dist/billing/index.cjs +2 -2
- package/dist/billing/index.d.cts +1 -1
- package/dist/billing/index.d.ts +1 -1
- package/dist/billing/index.js +2 -2
- package/dist/billing/types.d.cts +1 -1
- package/dist/billing/types.d.ts +1 -1
- package/dist/chat/index.cjs +3 -3
- package/dist/chat/index.d.cts +2 -2
- package/dist/chat/index.d.ts +2 -2
- package/dist/chat/index.js +3 -3
- package/dist/chat/types.d.cts +1 -1
- package/dist/chat/types.d.ts +1 -1
- package/dist/{componentId-b_qBbJEM.js → componentId-DZP1rBix.js} +54 -2
- package/dist/componentId-DZP1rBix.js.map +1 -0
- package/dist/{componentId-C8ZTXXDo.cjs → componentId-olp0tltf.cjs} +54 -2
- package/dist/componentId-olp0tltf.cjs.map +1 -0
- package/dist/componentsMcp/index.cjs +1 -1
- package/dist/componentsMcp/index.d.cts +1 -1
- package/dist/componentsMcp/index.d.ts +1 -1
- package/dist/componentsMcp/index.js +1 -1
- package/dist/componentsMcp/types.d.cts +1 -1
- package/dist/componentsMcp/types.d.ts +1 -1
- package/dist/{componentsMcp-BrB4js6b.js → componentsMcp-CAmrCpzV.js} +3 -3
- package/dist/{componentsMcp-BrB4js6b.js.map → componentsMcp-CAmrCpzV.js.map} +1 -1
- package/dist/{componentsMcp-BaHy5iLr.cjs → componentsMcp-DXu-0Qt-.cjs} +3 -3
- package/dist/{componentsMcp-BaHy5iLr.cjs.map → componentsMcp-DXu-0Qt-.cjs.map} +1 -1
- package/dist/constants/index.cjs +2 -2
- package/dist/constants/index.d.cts +3 -3
- package/dist/constants/index.d.ts +3 -3
- package/dist/constants/index.js +2 -2
- package/dist/{constants-BMSHGwOR.js → constants-Dqi0ewGv.js} +3 -2
- package/dist/constants-Dqi0ewGv.js.map +1 -0
- package/dist/{constants-DhFQWQgy.cjs → constants-d0Do9NSN.cjs} +3 -2
- package/dist/constants-d0Do9NSN.cjs.map +1 -0
- package/dist/{createFetchClient-DEkUH662.cjs → createFetchClient-CDKSkd7i.cjs} +19 -1
- package/dist/{createFetchClient-DlGCbltR.js.map → createFetchClient-CDKSkd7i.cjs.map} +1 -1
- package/dist/{createFetchClient-DlGCbltR.js → createFetchClient-Dc_ZMuq7.js} +8 -2
- package/dist/createFetchClient-Dc_ZMuq7.js.map +1 -0
- package/dist/{createGenericFetchClient-wGxemBwR.js → createGenericFetchClient-Ba4E4T-Y.js} +2 -2
- package/dist/{createGenericFetchClient-wGxemBwR.js.map → createGenericFetchClient-Ba4E4T-Y.js.map} +1 -1
- package/dist/{createGenericFetchClient-2oU-PXVo.cjs → createGenericFetchClient-BuYzzV_D.cjs} +2 -2
- package/dist/{createGenericFetchClient-2oU-PXVo.cjs.map → createGenericFetchClient-BuYzzV_D.cjs.map} +1 -1
- package/dist/{createOpenapiFetchClient-Bhz62MUE.js → createOpenapiFetchClient-DSk29o_s.js} +2 -2
- package/dist/{createOpenapiFetchClient-Bhz62MUE.js.map → createOpenapiFetchClient-DSk29o_s.js.map} +1 -1
- package/dist/{createOpenapiFetchClient-DL9w7vU-.cjs → createOpenapiFetchClient-dkssExkU.cjs} +2 -2
- package/dist/{createOpenapiFetchClient-DL9w7vU-.cjs.map → createOpenapiFetchClient-dkssExkU.cjs.map} +1 -1
- package/dist/dataScience/index.cjs +60 -4
- package/dist/dataScience/index.cjs.map +1 -0
- package/dist/dataScience/index.d.cts +105 -3
- package/dist/dataScience/index.d.ts +105 -3
- package/dist/dataScience/index.js +60 -3
- package/dist/dataScience/index.js.map +1 -0
- package/dist/dataScience/types.d.cts +2 -3
- package/dist/dataScience/types.d.ts +2 -3
- 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-BfRxYrWj.cjs → developerPortalClient-BcK9F-Fs.cjs} +3 -3
- package/dist/{developerPortalClient-BfRxYrWj.cjs.map → developerPortalClient-BcK9F-Fs.cjs.map} +1 -1
- package/dist/{developerPortalClient-D9XOYwWF.js → developerPortalClient-CzCJ5sE3.js} +3 -3
- package/dist/{developerPortalClient-D9XOYwWF.js.map → developerPortalClient-CzCJ5sE3.js.map} +1 -1
- package/dist/domain/permissions/index.d.cts +1 -1
- package/dist/domain/permissions/index.d.ts +1 -1
- package/dist/editor/index.cjs +2 -2
- package/dist/editor/index.d.cts +2 -2
- package/dist/editor/index.d.ts +2 -2
- package/dist/editor/index.js +2 -2
- package/dist/editor/types.d.cts +1 -1
- package/dist/editor/types.d.ts +1 -1
- package/dist/encryption/index.cjs +1 -1
- package/dist/encryption/index.d.cts +1 -1
- package/dist/encryption/index.d.ts +1 -1
- package/dist/encryption/index.js +1 -1
- package/dist/encryption/types.d.cts +1 -1
- package/dist/encryption/types.d.ts +1 -1
- package/dist/import/index.cjs +1 -1
- package/dist/import/index.d.cts +3 -3
- package/dist/import/index.d.ts +3 -3
- package/dist/import/index.js +1 -1
- package/dist/{import-CABlFMQX.cjs → import-DHq6q3Fm.cjs} +3 -3
- package/dist/{import-CABlFMQX.cjs.map → import-DHq6q3Fm.cjs.map} +1 -1
- package/dist/{import-CT1Ce5Rp.js → import-DxN6CJzJ.js} +3 -3
- package/dist/{import-CT1Ce5Rp.js.map → import-DxN6CJzJ.js.map} +1 -1
- package/dist/{index-Db266tLz.d.cts → index-81wn1jc3.d.cts} +4 -4
- package/dist/{index-xX8-Stoq.d.cts → index-8QhOqFLY.d.cts} +4 -4
- package/dist/{index-DjSthn8d.d.ts → index-B5rELADq.d.cts} +55 -2
- package/dist/{index-CTMnmISl.d.cts → index-B7el5pJU.d.cts} +86 -152
- package/dist/index-B8K-Bbdq.d.cts +220 -0
- package/dist/{index-DQagqTVa.d.cts → index-BGE3eZfd.d.cts} +3 -3
- package/dist/{index-DVBQgFg0.d.ts → index-BVe4S2CK.d.ts} +4 -4
- package/dist/{index-CbSh3KFw.d.cts → index-BXgjPlZN.d.cts} +4 -4
- package/dist/{index-C9iNazAc.d.ts → index-C7JcNvbd.d.ts} +86 -152
- package/dist/{index-lTrNMlj6.d.ts → index-CEDjFidH.d.ts} +3 -3
- package/dist/{index-DgGpQsAT.d.cts → index-CNJBmCHM.d.cts} +4 -4
- package/dist/index-CQNwp6wX.d.ts +220 -0
- package/dist/{index-CuI8OI9E.d.ts → index-CZvBjQvl.d.ts} +4 -4
- package/dist/{index-CN0--VsY.d.ts → index-CdeWTy8t.d.ts} +7 -4
- package/dist/{index-Xpu7qIZk.d.ts → index-CveF5RFQ.d.ts} +3 -3
- package/dist/{index-m9-mN8Gg.d.ts → index-DLWMm1-T.d.ts} +4 -4
- package/dist/{index-BDPxm9qu.d.ts → index-DTGOEke4.d.ts} +3 -3
- package/dist/{index-DXoN8VwV.d.cts → index-Df8lZNSH.d.cts} +3 -3
- package/dist/{index-AA3MRfRn.d.cts → index-Dhyrg5zd.d.ts} +55 -2
- package/dist/{index-D1mduJne.d.cts → index-FrsEkDvX.d.cts} +7 -2
- package/dist/{index-D1mduJne.d.ts → index-FrsEkDvX.d.ts} +7 -2
- package/dist/{index-DIPMzH--.d.ts → index-JoKfPQND.d.ts} +4 -4
- package/dist/{index-CCcdySOC.d.cts → index-d9zxFmNI.d.cts} +7 -4
- package/dist/{index-z-2okomN.d.cts → index-iFCann29.d.cts} +3 -3
- package/dist/index.cjs +50 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +43 -37
- package/dist/index.js.map +1 -1
- package/dist/{isLoginPageRedirect-CoUxJi2x.cjs → isLoginPageRedirect-DUmsOC2o.cjs} +2 -2
- package/dist/{isLoginPageRedirect-CoUxJi2x.cjs.map → isLoginPageRedirect-DUmsOC2o.cjs.map} +1 -1
- package/dist/{isLoginPageRedirect-D-lqF_kZ.js → isLoginPageRedirect-lbeVmeB2.js} +2 -2
- package/dist/{isLoginPageRedirect-D-lqF_kZ.js.map → isLoginPageRedirect-lbeVmeB2.js.map} +1 -1
- package/dist/kaiAgent/index.cjs +1 -1
- package/dist/kaiAgent/index.d.cts +2 -2
- package/dist/kaiAgent/index.d.ts +2 -2
- package/dist/kaiAgent/index.js +1 -1
- package/dist/kaiAgent/types.d.cts +1 -1
- package/dist/kaiAgent/types.d.ts +1 -1
- package/dist/{kaiAgent-D2TiMDjW.js → kaiAgent-D0MoKqXe.js} +15 -5
- package/dist/kaiAgent-D0MoKqXe.js.map +1 -0
- package/dist/{kaiAgent-gaA7dqki.cjs → kaiAgent-De2T6G4G.cjs} +15 -5
- package/dist/kaiAgent-De2T6G4G.cjs.map +1 -0
- package/dist/{kaiMemory-oir_qCo_.js → kaiMemory-B1wIwH8Y.js} +2 -2
- package/dist/{kaiMemory-oir_qCo_.js.map → kaiMemory-B1wIwH8Y.js.map} +1 -1
- package/dist/{kaiMemory-CkLQfJXD.cjs → kaiMemory-DZ6hXni_.cjs} +2 -2
- package/dist/{kaiMemory-CkLQfJXD.cjs.map → kaiMemory-DZ6hXni_.cjs.map} +1 -1
- 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-BEGOEQxM.cjs → management-CUXgB2rb.cjs} +6 -6
- package/dist/{management-BEGOEQxM.cjs.map → management-CUXgB2rb.cjs.map} +1 -1
- package/dist/{management-BcGHyxAP.js → management-Cz5ut18k.js} +6 -6
- package/dist/{management-BcGHyxAP.js.map → management-Cz5ut18k.js.map} +1 -1
- package/dist/metastore/index.cjs +1 -1
- package/dist/metastore/index.d.cts +1 -1
- package/dist/metastore/index.d.ts +1 -1
- package/dist/metastore/index.js +1 -1
- package/dist/metastore/types.d.cts +1 -1
- package/dist/metastore/types.d.ts +1 -1
- package/dist/{metastore-DeRQ2VIv.cjs → metastore-CV4DUDxP.cjs} +4 -4
- package/dist/{metastore-DeRQ2VIv.cjs.map → metastore-CV4DUDxP.cjs.map} +1 -1
- package/dist/{metastore-CGsgxjng.js → metastore-CkqFnEfu.js} +4 -4
- package/dist/{metastore-CGsgxjng.js.map → metastore-CkqFnEfu.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/{middleware-8zaJWcyU.js → middleware-DxGv7DG8.js} +2 -2
- package/dist/{middleware-8zaJWcyU.js.map → middleware-DxGv7DG8.js.map} +1 -1
- package/dist/{middleware-B9RNuLfD.cjs → middleware-vIaPDtQI.cjs} +2 -2
- package/dist/{middleware-B9RNuLfD.cjs.map → middleware-vIaPDtQI.cjs.map} +1 -1
- package/dist/notifications/index.cjs +3 -3
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/index.js +3 -3
- package/dist/notifications/types.d.cts +1 -1
- package/dist/notifications/types.d.ts +1 -1
- package/dist/oauth/index.cjs +1 -1
- package/dist/oauth/index.d.cts +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-B5Biqz21.cjs → oauth-CSBChWuf.cjs} +5 -5
- package/dist/{oauth-B5Biqz21.cjs.map → oauth-CSBChWuf.cjs.map} +1 -1
- package/dist/{oauth-ByCdISsV.js → oauth-DOveZKUv.js} +5 -5
- package/dist/{oauth-ByCdISsV.js.map → oauth-DOveZKUv.js.map} +1 -1
- package/dist/omnisearch/index.cjs +2 -2
- package/dist/omnisearch/index.d.cts +2 -2
- package/dist/omnisearch/index.d.ts +2 -2
- package/dist/omnisearch/index.js +2 -2
- package/dist/omnisearch/types.d.cts +1 -1
- package/dist/omnisearch/types.d.ts +1 -1
- package/dist/{project-UHZGFmmG.d.cts → project-BGk9CtOq.d.cts} +3 -3
- package/dist/{project-iBm4cIIR.d.ts → project-DS0HOV3M.d.ts} +3 -3
- package/dist/queryService/index.cjs +1 -1
- package/dist/queryService/index.d.cts +2 -2
- package/dist/queryService/index.d.ts +2 -2
- 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-C3BQ6GKW.cjs +214 -0
- package/dist/queryService-C3BQ6GKW.cjs.map +1 -0
- package/dist/queryService-DQHtHy2-.js +209 -0
- package/dist/queryService-DQHtHy2-.js.map +1 -0
- 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-BiIs9fX4.js → queue-6cywDnA-.js} +5 -5
- package/dist/{queue-BiIs9fX4.js.map → queue-6cywDnA-.js.map} +1 -1
- package/dist/{queue-CBi9Q8vp.cjs → queue-J2uXzXR9.cjs} +5 -5
- package/dist/{queue-CBi9Q8vp.cjs.map → queue-J2uXzXR9.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 +3 -3
- package/dist/sdk/configurations/index.cjs.map +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 +3 -3
- package/dist/sdk/configurations/index.js.map +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/kaiMemory/index.cjs +1 -1
- package/dist/sdk/kaiMemory/index.d.cts +1 -1
- package/dist/sdk/kaiMemory/index.d.ts +1 -1
- package/dist/sdk/kaiMemory/index.js +1 -1
- package/dist/sdk/kaiMemory/types.d.cts +1 -1
- package/dist/sdk/kaiMemory/types.d.ts +1 -1
- package/dist/sdk/queryService/index.d.cts +1 -1
- package/dist/sdk/queryService/index.d.ts +1 -1
- package/dist/sdk/semanticLayer/index.d.cts +1 -1
- package/dist/sdk/semanticLayer/index.d.ts +1 -1
- package/dist/sdk/semanticLayer/types.d.cts +1 -1
- package/dist/sdk/semanticLayer/types.d.ts +1 -1
- package/dist/sdk/tag/index.d.cts +2 -2
- package/dist/sdk/tag/index.d.ts +2 -2
- package/dist/sdk/tag/types.d.cts +1 -1
- package/dist/sdk/tag/types.d.ts +1 -1
- package/dist/sdk/vault/index.d.cts +1 -1
- package/dist/sdk/vault/index.d.ts +1 -1
- package/dist/status/index.cjs +1 -1
- package/dist/status/index.d.cts +1 -1
- package/dist/status/index.d.ts +1 -1
- package/dist/status/index.js +1 -1
- package/dist/storage/index.cjs +9 -7
- package/dist/storage/index.d.cts +4 -4
- package/dist/storage/index.d.ts +4 -4
- package/dist/storage/index.js +6 -6
- package/dist/storage/types.d.cts +5 -5
- package/dist/storage/types.d.ts +5 -5
- package/dist/{storage-BpOLWT6h.js → storage--2FvvLAw.js} +7 -7
- package/dist/{storage-BpOLWT6h.js.map → storage--2FvvLAw.js.map} +1 -1
- package/dist/{storage-KJ5Ki_ma.cjs → storage-BMrYlyLB.cjs} +7 -7
- package/dist/{storage-KJ5Ki_ma.cjs.map → storage-BMrYlyLB.cjs.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 +2 -2
- package/dist/syncActions/index.d.ts +2 -2
- package/dist/syncActions/index.js +1 -1
- package/dist/syncActions/types.d.cts +1 -1
- package/dist/syncActions/types.d.ts +1 -1
- package/dist/{syncActions-BcX3jm2E.cjs → syncActions-DToUhyP3.cjs} +6 -6
- package/dist/{syncActions-BcX3jm2E.cjs.map → syncActions-DToUhyP3.cjs.map} +1 -1
- package/dist/{syncActions-giPLTfje.js → syncActions-DV_aObTQ.js} +6 -6
- package/dist/{syncActions-giPLTfje.js.map → syncActions-DV_aObTQ.js.map} +1 -1
- package/dist/telemetry/index.cjs +3 -3
- package/dist/telemetry/index.d.cts +2 -2
- package/dist/telemetry/index.d.ts +2 -2
- package/dist/telemetry/index.js +3 -3
- package/dist/telemetry/types.d.cts +1 -1
- package/dist/telemetry/types.d.ts +1 -1
- package/dist/{transientRetries-BKqmb85B.js → transientRetries-BORv47mH.js} +2 -2
- package/dist/{transientRetries-BKqmb85B.js.map → transientRetries-BORv47mH.js.map} +1 -1
- package/dist/{transientRetries-CM7rAEXQ.cjs → transientRetries-CBorl4Ue.cjs} +2 -2
- package/dist/{transientRetries-CM7rAEXQ.cjs.map → transientRetries-CBorl4Ue.cjs.map} +1 -1
- package/dist/{types-BWMOK6eL.d.cts → types-B4Vwz45w.d.cts} +2 -2
- package/dist/{types-Dryq2GGE.d.cts → types-B4ezB18r.d.cts} +2 -2
- package/dist/{types-Bdl7EFMc.d.ts → types-B6JcEPEu.d.ts} +2 -2
- package/dist/{types-eFi8xJIM.d.cts → types-B6f6LpZ_.d.cts} +2 -2
- package/dist/{types-C9okze_R.d.ts → types-BD0B1KQ6.d.ts} +3 -26
- package/dist/{types-DeyXJzWz.d.cts → types-BEw98Dd2.d.cts} +2 -2
- package/dist/{types-1IBnjBVJ.d.cts → types-BVJmcoqA.d.cts} +2 -2
- package/dist/{types-B1qe1etN.d.cts → types-BljDxuWG.d.cts} +3 -3
- package/dist/{types-BiDdBXSm.d.ts → types-Bp8G9yta.d.ts} +2 -2
- package/dist/{types-BCGrKW1K.d.cts → types-Bv2Ds1hL.d.cts} +125 -2
- package/dist/{types-D-tJt0hQ.d.cts → types-BynQKst1.d.cts} +2 -2
- package/dist/{types-BuclMPeY.d.cts → types-C5B3Pfob.d.cts} +2 -2
- package/dist/{types-DNgazFnF.d.cts → types-CIlBSV99.d.cts} +2 -2
- package/dist/{types-DschSZHf.d.cts → types-CKdNf_2k.d.cts} +3 -3
- package/dist/{types-B0e-no6u.d.ts → types-CLtYOszN.d.cts} +20 -3
- package/dist/{types-Du5o-tud.d.ts → types-CQYyULrw.d.ts} +2 -2
- package/dist/{types-BB49alHP.d.cts → types-CRC4lbPw.d.cts} +18 -5
- package/dist/{types-CxEJ77m3.d.cts → types-CSE8bHiq.d.cts} +3 -3
- package/dist/{types-DRCttnIN.d.ts → types-CTYTMXXj.d.ts} +2 -2
- package/dist/{types-6T04_qUf.d.ts → types-CepTvkfm.d.ts} +2 -2
- package/dist/{types-DHMxPJZq.d.cts → types-Cf0WE6qK.d.cts} +2 -2
- package/dist/{types-DwbTiyhZ.d.cts → types-ChOJ-Az7.d.cts} +2 -2
- package/dist/{types-wYrC2boT.d.ts → types-Cr6WA6CN.d.ts} +2 -2
- package/dist/{types-D6lre27s.d.ts → types-CsVRsObb.d.ts} +2 -2
- package/dist/{types-CcGp6O3B.d.cts → types-D-ufoskb.d.cts} +2 -2
- package/dist/{types-LconaX98.d.cts → types-D2hhEGem.d.cts} +2 -2
- package/dist/{types-inG9y3dP.d.ts → types-D5bxXqEU.d.ts} +2 -2
- package/dist/{types-BE8abIig.d.cts → types-DKKHKj19.d.cts} +2 -2
- package/dist/{types-E8tzafsk.d.cts → types-DNwIMEuB.d.cts} +3 -26
- package/dist/{types-DtOfhDzz.d.ts → types-DSWIIMdv.d.ts} +3 -3
- package/dist/{types-Bat0SIZA.d.cts → types-DU8aPTFW.d.cts} +2 -2
- package/dist/{types-Dz9vyloX.d.ts → types-DX1Dz0xK.d.ts} +125 -2
- package/dist/{types-ZZwdKCBl.d.ts → types-DbthI3r-.d.ts} +2 -2
- package/dist/{types-B3ri-iiC.d.ts → types-DjSjUKUl.d.ts} +2 -2
- package/dist/{types-YpOm4yXE.d.cts → types-DjWubjvP.d.cts} +2 -2
- package/dist/{types-CRubbBcU.d.cts → types-Do3__S4Q.d.cts} +2 -2
- package/dist/{types-BfB-XXLF.d.ts → types-DoSZQ1Bi.d.ts} +18 -5
- package/dist/{types-CWcdaq-K.d.ts → types-Dsf7CYmm.d.ts} +2 -2
- package/dist/{types-CPWjRdnj.d.cts → types-Ey59ZILC.d.ts} +20 -3
- package/dist/{types--Rp5wvaz.d.ts → types-OHt0D_f2.d.ts} +2 -2
- package/dist/{types-Cr5lyI99.d.ts → types-Rrcx-8LM.d.ts} +2 -2
- package/dist/{types-DUpVIuk7.d.ts → types-Tg3euEN_.d.ts} +2 -2
- package/dist/{types-37vwxse4.d.cts → types-Y4e8GGa3.d.cts} +2 -2
- package/dist/{types-DJzTVMu1.d.ts → types-d5Bt8Mr3.d.ts} +2 -2
- package/dist/{types-jjOulnni.d.ts → types-dU3EA8gk.d.ts} +2 -2
- package/dist/{types-ir7T2a9a.d.ts → types-iU1Sc1IM.d.ts} +3 -3
- package/dist/{types-zPY-XGnM.d.ts → types-kGZQQcIK.d.ts} +2 -2
- package/dist/{types-xzt_2H63.d.ts → types-zlYUn0oi.d.ts} +3 -3
- package/dist/{validateConnectionStatus-DYwWeWVo.js → validateConnectionStatus-DV00sDmu.js} +3 -3
- package/dist/{validateConnectionStatus-DYwWeWVo.js.map → validateConnectionStatus-DV00sDmu.js.map} +1 -1
- package/dist/{validateConnectionStatus-BjemGI1e.cjs → validateConnectionStatus-ckaHcRx8.cjs} +3 -3
- package/dist/{validateConnectionStatus-BjemGI1e.cjs.map → validateConnectionStatus-ckaHcRx8.cjs.map} +1 -1
- package/dist/vault/index.cjs +4 -4
- package/dist/vault/index.d.cts +1 -1
- package/dist/vault/index.d.ts +1 -1
- package/dist/vault/index.js +4 -4
- package/dist/vault/types.d.cts +1 -1
- package/dist/vault/types.d.ts +1 -1
- package/package.json +2 -2
- package/surface/apps.md +10 -10
- package/surface/dataScience.md +2 -11
- package/surface/editor.md +5 -5
- package/surface/kaiAgent.md +1 -0
- package/surface/queue.md +1 -1
- package/dist/QueryJobError-Iq9O90Uh.js +0 -21
- package/dist/QueryJobError-Iq9O90Uh.js.map +0 -1
- package/dist/QueryJobError-Oy0fl4aw.cjs +0 -32
- package/dist/QueryJobError-Oy0fl4aw.cjs.map +0 -1
- package/dist/appLogs-CTvZAihm.d.ts +0 -8
- package/dist/appLogs-CnLNMH7M.d.cts +0 -8
- package/dist/appLogs-CoAWQGxs.cjs +0 -152
- package/dist/appLogs-CoAWQGxs.cjs.map +0 -1
- package/dist/appLogs-DFcPwVk8.js +0 -131
- package/dist/appLogs-DFcPwVk8.js.map +0 -1
- package/dist/apps/index.cjs.map +0 -1
- package/dist/apps/index.js.map +0 -1
- package/dist/componentId-C8ZTXXDo.cjs.map +0 -1
- package/dist/componentId-b_qBbJEM.js.map +0 -1
- package/dist/constants-BMSHGwOR.js.map +0 -1
- package/dist/constants-DhFQWQgy.cjs.map +0 -1
- package/dist/createFetchClient-DEkUH662.cjs.map +0 -1
- package/dist/dataScience-CXmkEOAi.js +0 -118
- package/dist/dataScience-CXmkEOAi.js.map +0 -1
- package/dist/dataScience-CufjHPSd.cjs +0 -123
- package/dist/dataScience-CufjHPSd.cjs.map +0 -1
- package/dist/index-BZDxWvZW.d.ts +0 -214
- package/dist/index-ClIV2Lch.d.cts +0 -214
- package/dist/kaiAgent-D2TiMDjW.js.map +0 -1
- package/dist/kaiAgent-gaA7dqki.cjs.map +0 -1
- package/dist/queryService-Cg-eMysa.cjs +0 -126
- package/dist/queryService-Cg-eMysa.cjs.map +0 -1
- package/dist/queryService-x8kq8Z2-.js +0 -121
- package/dist/queryService-x8kq8Z2-.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_QueueJobError = require("./QueueJobError-DruZK3tc.cjs");
|
|
2
|
-
const require_createGenericFetchClient = require("./createGenericFetchClient-
|
|
3
|
-
const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-
|
|
2
|
+
const require_createGenericFetchClient = require("./createGenericFetchClient-BuYzzV_D.cjs");
|
|
3
|
+
const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-dkssExkU.cjs");
|
|
4
4
|
const require_collectByOffset = require("./collectByOffset-DgxJ3zT9.cjs");
|
|
5
|
-
const require_transientRetries = require("./transientRetries-
|
|
6
|
-
const require_auth = require("./auth-
|
|
5
|
+
const require_transientRetries = require("./transientRetries-CBorl4Ue.cjs");
|
|
6
|
+
const require_auth = require("./auth-AehUDNRK.cjs");
|
|
7
7
|
// src/clients/queue/poller.ts
|
|
8
8
|
const DEFAULT_POLL_INTERVAL = 2e3;
|
|
9
9
|
/**
|
|
@@ -108,4 +108,4 @@ Object.defineProperty(exports, "createQueueClient", {
|
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
|
|
111
|
-
//# sourceMappingURL=queue-
|
|
111
|
+
//# sourceMappingURL=queue-J2uXzXR9.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue-
|
|
1
|
+
{"version":3,"file":"queue-J2uXzXR9.cjs","names":["transientRetries","poller","jobStatus","QueueJobError","createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient","collectByOffset"],"sources":["../src/clients/queue/poller.ts","../src/clients/queue/queueClient.ts"],"sourcesContent":["import { jobStatus } from '../../domain/jobStatus';\nimport { QueueJobError } from '../../errors';\nimport { poller } from '../../utils/async';\nimport { transientRetries } from '../transientRetries';\n\nimport type { GetQueueJobPath, QueueJob } from './types';\n\nconst DEFAULT_POLL_INTERVAL = 2000;\n\ntype QueueJobPollOptions = {\n interval?: number;\n maxAttempts?: number;\n timeout?: number;\n signal?: AbortSignal;\n};\n\ntype GetJob = (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => Promise<QueueJob>;\n\ntype JobRef = { id: GetQueueJobPath['jobId']; component: string };\n\n/**\n * Waits on a queue job.\n *\n * - `init` is the job, or the enqueue that yields it; the job names the poll in dev tools.\n * - `start()` resolves any terminal job; `wait()` throws `QueueJobError` for one that ended `error`.\n */\nexport const createJobPoller =\n ({ getJob }: { getJob: GetJob }) =>\n ({\n init,\n interval,\n maxAttempts,\n timeout,\n signal,\n }: QueueJobPollOptions & { init: JobRef | ((signal: AbortSignal) => Promise<JobRef>) }) => {\n const retries = transientRetries();\n\n return poller({\n pollKey: ({ id, component }) => ['queue.job', { id, component }] as const,\n init,\n pollFn: async ({ init: { id }, signal: pollSignal }) => {\n const job = await getJob(id, pollSignal);\n retries.reset();\n return job;\n },\n isRetryable: retries.isRetryable,\n until: ({ data }) => jobStatus.queue.isTerminal(data.status),\n failed: (job) => (job.status === 'error' ? new QueueJobError(job) : undefined),\n backoff: { type: 'constant', interval: interval ?? DEFAULT_POLL_INTERVAL },\n maxAttempts,\n timeout,\n signal,\n });\n };\n","import { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { collectByOffset } from '../../utils';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport { createJobPoller } from './poller';\nimport type {\n CreateJobBody,\n GetQueueJobPath,\n KillJobPath,\n OrchestrationRerunPlanPath,\n SearchAllJobsQuery,\n SearchGroupedJobsQuery,\n SearchJobsQuery,\n} from './types';\n\nexport const createQueueClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const getJob = async (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => {\n const { data } = await client.get(\n '/jobs/{jobId}',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const searchJobs = async (query?: SearchJobsQuery, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/search/jobs',\n {\n query,\n },\n { signal },\n );\n\n return data;\n };\n\n const searchAllJobs = (query: SearchAllJobsQuery, signal?: AbortSignal) => {\n return collectByOffset({\n pageSize: query.limit,\n signal,\n fetchFrom: (offset, pageSize, batchSignal) => {\n return searchJobs({ ...query, limit: pageSize, offset }, batchSignal);\n },\n });\n };\n\n const createJob = async (body: CreateJobBody, signal?: AbortSignal) => {\n const { data } = await client.post('/jobs', { body }, { signal });\n\n return data;\n };\n\n const killJob = async (jobId: KillJobPath['jobId'], signal?: AbortSignal) => {\n const { data } = await client.post(\n '/jobs/{jobId}/kill',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const searchGroupedJobs = async (query: SearchGroupedJobsQuery, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/search/grouped-jobs',\n {\n query,\n },\n { signal },\n );\n\n return data;\n };\n\n const getOrchestrationRerunPlan = async (\n jobId: OrchestrationRerunPlanPath['jobId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/orchestration-rerun-plan/{jobId}',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n // Every wait on a queue job is the same wait, so it is the client's rather than a caller's.\n const poller = createJobPoller({ getJob });\n\n return {\n healthCheck,\n poller,\n getJob,\n searchJobs,\n searchAllJobs,\n createJob,\n killJob,\n searchGroupedJobs,\n getOrchestrationRerunPlan,\n };\n};\n"],"mappings":";;;;;;;AAOA,MAAM,wBAAwB;;;;;;;AAmB9B,MAAa,mBACV,EAAE,cACF,EACC,MACA,UACA,aACA,SACA,aACyF;CACzF,MAAM,UAAUA,yBAAAA,iBAAiB;CAEjC,OAAOC,yBAAAA,OAAO;EACZ,UAAU,EAAE,IAAI,gBAAgB,CAAC,aAAa;GAAE;GAAI;EAAU,CAAC;EAC/D;EACA,QAAQ,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,iBAAiB;GACtD,MAAM,MAAM,MAAM,OAAO,IAAI,UAAU;GACvC,QAAQ,MAAM;GACd,OAAO;EACT;EACA,aAAa,QAAQ;EACrB,QAAQ,EAAE,WAAWC,yBAAAA,UAAU,MAAM,WAAW,KAAK,MAAM;EAC3D,SAAS,QAAS,IAAI,WAAW,UAAU,IAAIC,sBAAAA,cAAc,GAAG,IAAI,KAAA;EACpE,SAAS;GAAE,MAAM;GAAY,UAAU,YAAY;EAAsB;EACzE;EACA;EACA;CACF,CAAC;AACH;;ACpCF,MAAa,qBAAqB,EAAE,SAAS,aAAa,WAA8B;CACtF,MAAM,SAASC,iCAAAA,yBAAgC;EAC7C;EACA;EAC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,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAKA,OAAO;EACL;EACA,QAJa,gBAAgB,EAAE,OAAO,CAIjC;EACL;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
package/dist/scheduler/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_createGenericFetchClient = require("../createGenericFetchClient-
|
|
3
|
-
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-
|
|
2
|
+
const require_createGenericFetchClient = require("../createGenericFetchClient-BuYzzV_D.cjs");
|
|
3
|
+
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-dkssExkU.cjs");
|
|
4
4
|
const require_concurrent = require("../concurrent-DnTV_ppY.cjs");
|
|
5
|
-
const require_auth = require("../auth-
|
|
5
|
+
const require_auth = require("../auth-AehUDNRK.cjs");
|
|
6
6
|
// src/clients/scheduler/schedulerClient.ts
|
|
7
7
|
const createSchedulerClient = ({ baseUrl, middlewares, auth }) => {
|
|
8
8
|
const client = require_createOpenapiFetchClient.createOpenapiFetchClient({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
2
|
-
import { a as SchedulePath, n as ConfigurationPath, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-B4ezB18r.cjs";
|
|
2
|
+
import { a as SchedulePath, n as ConfigurationPath, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-Do3__S4Q.cjs";
|
|
3
3
|
declare const createSchedulerClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
4
4
|
healthCheck: (signal?: AbortSignal) => Promise<unknown>;
|
|
5
5
|
getSchedules: (query?: GetSchedulesQuery, signal?: AbortSignal) => Promise<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
2
|
-
import { a as SchedulePath, n as ConfigurationPath, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-Tg3euEN_.js";
|
|
2
|
+
import { a as SchedulePath, n as ConfigurationPath, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-Rrcx-8LM.js";
|
|
3
3
|
declare const createSchedulerClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
4
4
|
healthCheck: (signal?: AbortSignal) => Promise<unknown>;
|
|
5
5
|
getSchedules: (query?: GetSchedulesQuery, signal?: AbortSignal) => Promise<{
|
package/dist/scheduler/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createGenericFetchClient } from "../createGenericFetchClient-
|
|
2
|
-
import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-
|
|
1
|
+
import { t as createGenericFetchClient } from "../createGenericFetchClient-Ba4E4T-Y.js";
|
|
2
|
+
import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-DSk29o_s.js";
|
|
3
3
|
import { t as concurrent } from "../concurrent-BtsT10Xe.js";
|
|
4
|
-
import { t as createAuthHeaders } from "../auth-
|
|
4
|
+
import { t as createAuthHeaders } from "../auth-ZBQWCJPM.js";
|
|
5
5
|
// src/clients/scheduler/schedulerClient.ts
|
|
6
6
|
const createSchedulerClient = ({ baseUrl, middlewares, auth }) => {
|
|
7
7
|
const client = createOpenapiFetchClient({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SchedulePath, i as Schedule, n as ConfigurationPath, o as Schedules, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-
|
|
1
|
+
import { a as SchedulePath, i as Schedule, n as ConfigurationPath, o as Schedules, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-Do3__S4Q.cjs";
|
|
2
2
|
export { ActivateScheduleBody, ConfigurationPath, GetSchedulesQuery, Schedule, SchedulePath, Schedules };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SchedulePath, i as Schedule, n as ConfigurationPath, o as Schedules, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-
|
|
1
|
+
import { a as SchedulePath, i as Schedule, n as ConfigurationPath, o as Schedules, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-Rrcx-8LM.js";
|
|
2
2
|
export { ActivateScheduleBody, ConfigurationPath, GetSchedulesQuery, Schedule, SchedulePath, Schedules };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_schemaGuidedMerge = require("../../schemaGuidedMerge-C8CqrNGe.cjs");
|
|
3
|
-
const require_componentId = require("../../componentId-
|
|
3
|
+
const require_componentId = require("../../componentId-olp0tltf.cjs");
|
|
4
4
|
const require_configurations = require("../../configurations-WI8H4zLk.cjs");
|
|
5
5
|
let zod = require("zod");
|
|
6
6
|
// src/sdks/configurations/schemas/appDataGatewaySchema.ts
|
|
@@ -588,7 +588,7 @@ const createConfigurationSdk = ({ storageClient, encryptionClient, context }) =>
|
|
|
588
588
|
};
|
|
589
589
|
const createConfiguration = async (input) => {
|
|
590
590
|
const { componentId, branchId, configuration, ...rest } = input;
|
|
591
|
-
require_configurations.assertCanCreateConfiguration(context.project.sapiToken, { isDevModeActive: context.
|
|
591
|
+
require_configurations.assertCanCreateConfiguration(context.project.sapiToken, { isDevModeActive: context.branchRefs.isDev(branchId) });
|
|
592
592
|
const def = registry.get(componentId);
|
|
593
593
|
const validated = def.inputSchema.parse(configuration);
|
|
594
594
|
const encrypted = await _encrypt(componentId, validated);
|
|
@@ -602,7 +602,7 @@ const createConfigurationSdk = ({ storageClient, encryptionClient, context }) =>
|
|
|
602
602
|
};
|
|
603
603
|
const updateConfiguration = async (input) => {
|
|
604
604
|
const { componentId, branchId, configId, configuration, mode = "merge", ...rest } = input;
|
|
605
|
-
require_configurations.assertCanUpdateConfiguration(context.project.sapiToken, { isDevModeActive: context.
|
|
605
|
+
require_configurations.assertCanUpdateConfiguration(context.project.sapiToken, { isDevModeActive: context.branchRefs.isDev(branchId) });
|
|
606
606
|
const def = registry.get(componentId);
|
|
607
607
|
const validated = def.inputSchema.parse(configuration);
|
|
608
608
|
const encrypted = await _encrypt(componentId, validated);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["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","isEmptyDeep","schemaGuidedMerge"],"sources":["../../../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 { 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 with an optional SSH tunnel, for the generic SSH-only drivers.\n *\n * - Keep in sync with kbc-ui's `hasSshTunnel` / `hasSsl` (`ex-db-generic/helpers.ts`).\n * - SSL-capable, tunnel-less and extra-field drivers get their own schema.\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 continueOnFailure: 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) — reads the config, deep-merges by schema; credential unions and arrays are\n * replaced wholesale (dropping an abandoned secret), out-of-schema keys kept.\n * - `'replace'` — stores exactly what is sent (validated + encrypted); anything omitted,\n * e.g. `storage`, 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":";;;;;;;;;;;AAOA,MAAa,uBAAuBA,IAAAA,EAAE,OAAO,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names":["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","isEmptyDeep","schemaGuidedMerge"],"sources":["../../../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 { 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 with an optional SSH tunnel, for the generic SSH-only drivers.\n *\n * - Keep in sync with kbc-ui's `hasSshTunnel` / `hasSsl` (`ex-db-generic/helpers.ts`).\n * - SSL-capable, tunnel-less and extra-field drivers get their own schema.\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 continueOnFailure: 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 { BranchRefs } from '../../domain/branchRefs';\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 branchRefs: BranchRefs;\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) — reads the config, deep-merges by schema; credential unions and arrays are\n * replaced wholesale (dropping an abandoned secret), out-of-schema keys kept.\n * - `'replace'` — stores exactly what is sent (validated + encrypted); anything omitted,\n * e.g. `storage`, 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.branchRefs.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.branchRefs.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":";;;;;;;;;;;AAOA,MAAa,uBAAuBA,IAAAA,EAAE,OAAO,EAC3C,YAAYA,IAAAA,EAAE,OAAO,EACnB,IAAIA,IAAAA,EAAE,OAAO,EACX,aAAaA,IAAAA,EAAE,OAAO,EACxB,CAAC,EACH,CAAC,EACH,CAAC;;;ACVD,MAAa,YAAkC,OAC7CC,IAAAA,EAAE,OAAO,EAAE,YAAYA,IAAAA,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC;;;;;;;;ACI3C,MAAa,qBAAqBC,IAAAA,EAAE,OAAO;CACzC,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AY,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,WAAW,MAAM,QAAQ,EACpD,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,mBAAmBC,0BAAAA,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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as Project } from "../../project-
|
|
3
|
-
import "../../index-
|
|
1
|
+
import { Eo as CreateConfigurationInput, O as BranchRefs, Xo as UpdateConfigurationInput, ho as BaseComponentConfig, t as createEncryptionClient, wo as ConfigurationPath, y as createStorageClient } from "../../index-B7el5pJU.cjs";
|
|
2
|
+
import { t as Project } from "../../project-BGk9CtOq.cjs";
|
|
3
|
+
import "../../index-Df8lZNSH.cjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
type Registry<M extends Record<string, z.ZodObject>> = {
|
|
6
6
|
add: <const Id extends string, Schema extends z.ZodObject>(componentId: Id, schema: Schema) => Registry<M & Record<Id, Schema>>;
|
|
@@ -1031,7 +1031,7 @@ declare const registry: Registry<Record<never, never> & Record<"keboola.wr-db-my
|
|
|
1031
1031
|
type RegisteredComponentId = InferComponentId<typeof registry>;
|
|
1032
1032
|
type ConfigurationSdkContext = {
|
|
1033
1033
|
project: Project;
|
|
1034
|
-
|
|
1034
|
+
branchRefs: BranchRefs;
|
|
1035
1035
|
};
|
|
1036
1036
|
type Options = {
|
|
1037
1037
|
storageClient: ReturnType<typeof createStorageClient>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as Project } from "../../project-
|
|
3
|
-
import "../../index-
|
|
1
|
+
import { Eo as CreateConfigurationInput, O as BranchRefs, Xo as UpdateConfigurationInput, ho as BaseComponentConfig, t as createEncryptionClient, wo as ConfigurationPath, y as createStorageClient } from "../../index-C7JcNvbd.js";
|
|
2
|
+
import { t as Project } from "../../project-DS0HOV3M.js";
|
|
3
|
+
import "../../index-CveF5RFQ.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
type Registry<M extends Record<string, z.ZodObject>> = {
|
|
6
6
|
add: <const Id extends string, Schema extends z.ZodObject>(componentId: Id, schema: Schema) => Registry<M & Record<Id, Schema>>;
|
|
@@ -1031,7 +1031,7 @@ declare const registry: Registry<Record<never, never> & Record<"keboola.wr-db-my
|
|
|
1031
1031
|
type RegisteredComponentId = InferComponentId<typeof registry>;
|
|
1032
1032
|
type ConfigurationSdkContext = {
|
|
1033
1033
|
project: Project;
|
|
1034
|
-
|
|
1034
|
+
branchRefs: BranchRefs;
|
|
1035
1035
|
};
|
|
1036
1036
|
type Options = {
|
|
1037
1037
|
storageClient: ReturnType<typeof createStorageClient>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as isEmptyDeep, t as schemaGuidedMerge } from "../../schemaGuidedMerge-DFNqj9Nz.js";
|
|
2
|
-
import { t as ComponentId } from "../../componentId-
|
|
2
|
+
import { t as ComponentId } from "../../componentId-DZP1rBix.js";
|
|
3
3
|
import { o as assertCanUpdateConfiguration, r as assertCanCreateConfiguration } from "../../configurations-Cd6Nsox-.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
// src/sdks/configurations/schemas/appDataGatewaySchema.ts
|
|
@@ -587,7 +587,7 @@ const createConfigurationSdk = ({ storageClient, encryptionClient, context }) =>
|
|
|
587
587
|
};
|
|
588
588
|
const createConfiguration = async (input) => {
|
|
589
589
|
const { componentId, branchId, configuration, ...rest } = input;
|
|
590
|
-
assertCanCreateConfiguration(context.project.sapiToken, { isDevModeActive: context.
|
|
590
|
+
assertCanCreateConfiguration(context.project.sapiToken, { isDevModeActive: context.branchRefs.isDev(branchId) });
|
|
591
591
|
const def = registry.get(componentId);
|
|
592
592
|
const validated = def.inputSchema.parse(configuration);
|
|
593
593
|
const encrypted = await _encrypt(componentId, validated);
|
|
@@ -601,7 +601,7 @@ const createConfigurationSdk = ({ storageClient, encryptionClient, context }) =>
|
|
|
601
601
|
};
|
|
602
602
|
const updateConfiguration = async (input) => {
|
|
603
603
|
const { componentId, branchId, configId, configuration, mode = "merge", ...rest } = input;
|
|
604
|
-
assertCanUpdateConfiguration(context.project.sapiToken, { isDevModeActive: context.
|
|
604
|
+
assertCanUpdateConfiguration(context.project.sapiToken, { isDevModeActive: context.branchRefs.isDev(branchId) });
|
|
605
605
|
const def = registry.get(componentId);
|
|
606
606
|
const validated = def.inputSchema.parse(configuration);
|
|
607
607
|
const encrypted = await _encrypt(componentId, validated);
|