@keboola/api-client 33.0.0 → 35.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -2
- package/API-SURFACE.md +16 -2
- package/CHANGELOG.md +253 -0
- package/dist/{ManagementClientAuthError-DqeXL8nv.cjs → ManagementClientAuthError-DD4u0EU7.cjs} +2 -2
- package/dist/{ManagementClientAuthError-DqeXL8nv.cjs.map → ManagementClientAuthError-DD4u0EU7.cjs.map} +1 -1
- package/dist/{ManagementClientAuthError-iKbBugKC.js → ManagementClientAuthError-ey-f03vy.js} +2 -2
- package/dist/{ManagementClientAuthError-iKbBugKC.js.map → ManagementClientAuthError-ey-f03vy.js.map} +1 -1
- package/dist/{ValidationError-CzPWydEb.js → ValidationError-BekhphAq.js} +11 -7
- package/dist/ValidationError-BekhphAq.js.map +1 -0
- package/dist/{ValidationError-h5qvwahi.cjs → ValidationError-CLVJCCwH.cjs} +16 -6
- package/dist/ValidationError-CLVJCCwH.cjs.map +1 -0
- package/dist/ai/index.cjs +2 -2
- package/dist/ai/index.d.cts +2 -2
- package/dist/ai/index.d.ts +2 -2
- package/dist/ai/index.js +2 -2
- package/dist/ai/types.d.cts +1 -1
- package/dist/ai/types.d.ts +1 -1
- package/dist/{appLogs-D8K0VeNM.cjs → appLogs-BjfUoWzs.cjs} +2 -2
- package/dist/{appLogs-D8K0VeNM.cjs.map → appLogs-BjfUoWzs.cjs.map} +1 -1
- package/dist/{appLogs-u0XMZLjS.d.ts → appLogs-Ch7DYpzx.d.ts} +2 -2
- package/dist/{appLogs-Q4A7A_Fc.d.cts → appLogs-D5A13Y0y.d.cts} +2 -2
- package/dist/{appLogs-D72eD8vP.js → appLogs-xsVkTriU.js} +2 -2
- package/dist/{appLogs-D72eD8vP.js.map → appLogs-xsVkTriU.js.map} +1 -1
- package/dist/apps/index.cjs +3 -3
- package/dist/apps/index.d.cts +3 -3
- package/dist/apps/index.d.ts +3 -3
- package/dist/apps/index.js +3 -3
- package/dist/apps/types.d.cts +2 -2
- package/dist/apps/types.d.ts +2 -2
- package/dist/assets/index.cjs +1 -1
- package/dist/assets/index.d.cts +1 -1
- package/dist/assets/index.d.ts +1 -1
- package/dist/assets/index.js +1 -1
- package/dist/auth/index.cjs +1 -1
- package/dist/auth/index.d.cts +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/auth/types.d.cts +1 -1
- package/dist/auth/types.d.ts +1 -1
- package/dist/{auth-C2_JLisH.cjs → auth-JQ33o3nU.cjs} +2 -2
- package/dist/{auth-C2_JLisH.cjs.map → auth-JQ33o3nU.cjs.map} +1 -1
- package/dist/{auth-CE9rQV3-.js → auth-aItmDu45.js} +2 -2
- package/dist/{auth-CE9rQV3-.js.map → auth-aItmDu45.js.map} +1 -1
- package/dist/{authClient-DZ_8lvdJ.d.cts → authClient-CTHNs6Tq.d.cts} +4 -4
- package/dist/{authClient-DEyqR7GW.js → authClient-D7W9vWPR.js} +5 -5
- package/dist/{authClient-DEyqR7GW.js.map → authClient-D7W9vWPR.js.map} +1 -1
- package/dist/{authClient-DwT6xdg5.d.ts → authClient-D8i3JTM-.d.ts} +4 -4
- package/dist/{authClient-IwQ9Ti0J.cjs → authClient-_PpvGgZJ.cjs} +5 -5
- package/dist/{authClient-IwQ9Ti0J.cjs.map → authClient-_PpvGgZJ.cjs.map} +1 -1
- package/dist/billing/index.cjs +46 -0
- package/dist/billing/index.cjs.map +1 -0
- package/dist/billing/index.d.cts +48 -0
- package/dist/billing/index.d.ts +48 -0
- package/dist/billing/index.js +45 -0
- package/dist/billing/index.js.map +1 -0
- package/dist/billing/types.cjs +0 -0
- package/dist/billing/types.d.cts +635 -0
- package/dist/billing/types.d.ts +635 -0
- package/dist/billing/types.js +1 -0
- package/dist/chat/index.cjs +3 -3
- package/dist/chat/index.d.cts +2 -2
- package/dist/chat/index.d.ts +2 -2
- package/dist/chat/index.js +3 -3
- package/dist/chat/types.cjs +18 -0
- package/dist/chat/types.cjs.map +1 -1
- package/dist/chat/types.d.cts +2 -2
- package/dist/chat/types.d.ts +2 -2
- package/dist/chat/types.js +18 -1
- package/dist/chat/types.js.map +1 -1
- package/dist/{configurations-d7SZmw69.js → configurations-BVvcimzo.js} +17 -2
- package/dist/configurations-BVvcimzo.js.map +1 -0
- package/dist/{configurations-CqwAxiQL.cjs → configurations-CyFF9Dtu.cjs} +22 -1
- package/dist/configurations-CyFF9Dtu.cjs.map +1 -0
- package/dist/{configurations-ZwBXilW-.js → configurations-VtNE0nrT.js} +2 -2
- package/dist/{configurations-ZwBXilW-.js.map → configurations-VtNE0nrT.js.map} +1 -1
- package/dist/{configurations-Ck-mNB_E.cjs → configurations-zkNjr73Q.cjs} +2 -2
- package/dist/{configurations-Ck-mNB_E.cjs.map → configurations-zkNjr73Q.cjs.map} +1 -1
- package/dist/constants/index.cjs +1 -1
- package/dist/constants/index.d.cts +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/{constants-lIfSdTzS.cjs → constants-C4DlsF_M.cjs} +3 -2
- package/dist/constants-C4DlsF_M.cjs.map +1 -0
- package/dist/{constants-ByEwVtGf.js → constants-wfbFsqqN.js} +3 -2
- package/dist/constants-wfbFsqqN.js.map +1 -0
- package/dist/{createFetchClient-DvZvD31l.cjs → createFetchClient-DgMiqTJ8.cjs} +19 -4
- package/dist/createFetchClient-DgMiqTJ8.cjs.map +1 -0
- package/dist/{createFetchClient-DdyZMhxO.js → createFetchClient-U-ZrwPl2.js} +14 -5
- package/dist/{createFetchClient-DvZvD31l.cjs.map → createFetchClient-U-ZrwPl2.js.map} +1 -1
- package/dist/{createGenericFetchClient-qfCZlCTv.cjs → createGenericFetchClient-o3cPJeRn.cjs} +2 -2
- package/dist/{createGenericFetchClient-qfCZlCTv.cjs.map → createGenericFetchClient-o3cPJeRn.cjs.map} +1 -1
- package/dist/{createGenericFetchClient-MQeLRiNW.js → createGenericFetchClient-rxvUUbap.js} +2 -2
- package/dist/{createGenericFetchClient-MQeLRiNW.js.map → createGenericFetchClient-rxvUUbap.js.map} +1 -1
- package/dist/{createOpenapiFetchClient-E7OIVkYv.js → createOpenapiFetchClient-BVSc9ibR.js} +2 -2
- package/dist/{createOpenapiFetchClient-E7OIVkYv.js.map → createOpenapiFetchClient-BVSc9ibR.js.map} +1 -1
- package/dist/{createOpenapiFetchClient-C57Ljzi6.cjs → createOpenapiFetchClient-DhUU3M1W.cjs} +2 -2
- package/dist/{createOpenapiFetchClient-C57Ljzi6.cjs.map → createOpenapiFetchClient-DhUU3M1W.cjs.map} +1 -1
- package/dist/{credential-Bxv7yxOZ.js → credential-CihSf_xs.js} +2 -2
- package/dist/{credential-Bxv7yxOZ.js.map → credential-CihSf_xs.js.map} +1 -1
- package/dist/{credential-D-X5QQrM.cjs → credential-DVWvJFJs.cjs} +2 -2
- package/dist/{credential-D-X5QQrM.cjs.map → credential-DVWvJFJs.cjs.map} +1 -1
- package/dist/dataScience/index.cjs +2 -2
- package/dist/dataScience/index.d.cts +2 -2
- package/dist/dataScience/index.d.ts +2 -2
- package/dist/dataScience/index.js +2 -2
- package/dist/dataScience/types.d.cts +2 -2
- package/dist/dataScience/types.d.ts +2 -2
- package/dist/{dataScience-BPW993AG.cjs → dataScience-0Rl_EuV_.cjs} +5 -5
- package/dist/{dataScience-BPW993AG.cjs.map → dataScience-0Rl_EuV_.cjs.map} +1 -1
- package/dist/{dataScience-B_TA7wCB.js → dataScience-C1gO5zUn.js} +5 -5
- package/dist/{dataScience-B_TA7wCB.js.map → dataScience-C1gO5zUn.js.map} +1 -1
- package/dist/developerPortal/index.cjs +1 -1
- package/dist/developerPortal/index.d.cts +2 -2
- package/dist/developerPortal/index.d.ts +2 -2
- package/dist/developerPortal/index.js +1 -1
- package/dist/developerPortal/types.d.cts +1 -1
- package/dist/developerPortal/types.d.ts +1 -1
- package/dist/{developerPortalClient-jk46sjwP.js → developerPortalClient-C_48z8BN.js} +3 -3
- package/dist/{developerPortalClient-jk46sjwP.js.map → developerPortalClient-C_48z8BN.js.map} +1 -1
- package/dist/{developerPortalClient-Db2XVB_o.cjs → developerPortalClient-ki0XS_OD.cjs} +3 -3
- package/dist/{developerPortalClient-Db2XVB_o.cjs.map → developerPortalClient-ki0XS_OD.cjs.map} +1 -1
- package/dist/domain/permissions/index.cjs +2 -1
- package/dist/domain/permissions/index.d.cts +18 -3
- package/dist/domain/permissions/index.d.ts +18 -3
- package/dist/domain/permissions/index.js +2 -2
- package/dist/editor/index.cjs +2 -2
- package/dist/editor/index.d.cts +2 -2
- package/dist/editor/index.d.ts +2 -2
- package/dist/editor/index.js +2 -2
- package/dist/editor/types.d.cts +1 -1
- package/dist/editor/types.d.ts +1 -1
- package/dist/encryption/index.cjs +1 -1
- package/dist/encryption/index.d.cts +1 -1
- package/dist/encryption/index.d.ts +1 -1
- package/dist/encryption/index.js +1 -1
- package/dist/encryption/types.d.cts +1 -1
- package/dist/encryption/types.d.ts +1 -1
- package/dist/import/index.cjs +1 -1
- package/dist/import/index.d.cts +3 -3
- package/dist/import/index.d.ts +3 -3
- package/dist/import/index.js +1 -1
- package/dist/{import-DJilJ6tq.cjs → import-C83w7BKz.cjs} +3 -3
- package/dist/{import-DJilJ6tq.cjs.map → import-C83w7BKz.cjs.map} +1 -1
- package/dist/{import-2nqxQ9Rt.js → import-CROEK82b.js} +3 -3
- package/dist/{import-2nqxQ9Rt.js.map → import-CROEK82b.js.map} +1 -1
- package/dist/{index-DQef014j.d.ts → index-3LUk2rpD.d.ts} +4 -4
- package/dist/{index-BjKjp3Rf.d.ts → index-6Xe81qN3.d.ts} +5 -5
- package/dist/{index-DIVvL54G.d.cts → index-BLx14ZI4.d.cts} +104 -44
- package/dist/{index-CUXEFQ7i.d.cts → index-BgLnWTZU.d.cts} +6 -6
- package/dist/{index-C_cxKL1V.d.ts → index-BuegqrS1.d.ts} +3 -3
- package/dist/{index-bB6wvw1f.d.ts → index-C77vTm2K.d.ts} +4 -4
- package/dist/{index-qOK5FtAH.d.cts → index-CW3Pj7DY.d.cts} +4 -4
- package/dist/{index-B2OGaUap.d.ts → index-CqgtL2NU.d.ts} +6 -6
- package/dist/{index-C7gxKoDF.d.cts → index-D8rcUbnk.d.ts} +3 -3
- package/dist/{index-B0V1pJAa.d.ts → index-DFBFa3SS.d.ts} +104 -44
- package/dist/{index-CVqk63at.d.ts → index-DR4QqItd.d.cts} +3 -3
- package/dist/{index-DCN2lH0v.d.cts → index-DXSmFkol.d.cts} +4 -4
- package/dist/{index-CTd4YY8e.d.cts → index-Dodwl64k.d.cts} +69 -36
- package/dist/{index-t-a7kYnx.d.cts → index-DppA4k3b.d.cts} +5 -5
- package/dist/{index-DLYAvSWZ.d.cts → index-Dx52hNLP.d.cts} +3 -3
- package/dist/{index-exNi3I2Q.d.cts → index-GjcJTCbz.d.cts} +4 -4
- package/dist/{index-DhVFuQDv.d.cts → index-KuQ79Mnz.d.ts} +13 -3
- package/dist/{index-GNKwr7EQ.d.ts → index-P-iT5THa.d.ts} +69 -36
- package/dist/{index-DVhTNwvu.d.ts → index-V7XKUQm9.d.cts} +13 -3
- package/dist/{index-ChMtULt4.d.ts → index-pXN4LWUX.d.ts} +4 -4
- package/dist/index.cjs +77 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +74 -35
- package/dist/index.js.map +1 -1
- package/dist/isLoginPageRedirect-B0EmRsHr.cjs +25 -0
- package/dist/isLoginPageRedirect-B0EmRsHr.cjs.map +1 -0
- package/dist/isLoginPageRedirect-BTTAedW-.js +20 -0
- package/dist/isLoginPageRedirect-BTTAedW-.js.map +1 -0
- package/dist/kaiAgent/index.cjs +1 -1
- package/dist/kaiAgent/index.d.cts +1 -1
- package/dist/kaiAgent/index.d.ts +1 -1
- package/dist/kaiAgent/index.js +1 -1
- package/dist/kaiAgent/types.d.cts +1 -1
- package/dist/kaiAgent/types.d.ts +1 -1
- package/dist/{kaiAgent-CYYn0QJW.js → kaiAgent-8LNzGhZc.js} +4 -4
- package/dist/{kaiAgent-CYYn0QJW.js.map → kaiAgent-8LNzGhZc.js.map} +1 -1
- package/dist/{kaiAgent-CMVub6Sc.cjs → kaiAgent-B_TaUPRt.cjs} +4 -4
- package/dist/{kaiAgent-CMVub6Sc.cjs.map → kaiAgent-B_TaUPRt.cjs.map} +1 -1
- package/dist/{kaiAgentClient-B2O0DF4d.d.ts → kaiAgentClient-BJj_2aqt.d.ts} +4 -3
- package/dist/{kaiAgentClient-iCFR2tRU.d.cts → kaiAgentClient-DhTaM3GC.d.cts} +4 -3
- package/dist/management/index.cjs +1 -1
- package/dist/management/index.d.cts +1 -1
- package/dist/management/index.d.ts +1 -1
- package/dist/management/index.js +1 -1
- package/dist/management/types.d.cts +2 -2
- package/dist/management/types.d.ts +2 -2
- package/dist/{management-DGfgKsaA.cjs → management-BoxlRNg2.cjs} +53 -10
- package/dist/management-BoxlRNg2.cjs.map +1 -0
- package/dist/{management-DNEKhR6a.js → management-Bp440RsV.js} +53 -10
- package/dist/management-Bp440RsV.js.map +1 -0
- package/dist/metastore/index.cjs +1 -1
- package/dist/metastore/index.d.cts +1 -1
- package/dist/metastore/index.d.ts +1 -1
- package/dist/metastore/index.js +1 -1
- package/dist/metastore/types.d.cts +1 -1
- package/dist/metastore/types.d.ts +1 -1
- package/dist/{metastore-DksEte8P.cjs → metastore-BYYWTb3m.cjs} +4 -4
- package/dist/{metastore-DksEte8P.cjs.map → metastore-BYYWTb3m.cjs.map} +1 -1
- package/dist/{metastore-CjwktHvw.js → metastore-VCDRVhUT.js} +4 -4
- package/dist/{metastore-CjwktHvw.js.map → metastore-VCDRVhUT.js.map} +1 -1
- package/dist/microsoftGraph/index.cjs +2 -2
- package/dist/microsoftGraph/index.d.cts +2 -2
- package/dist/microsoftGraph/index.d.ts +2 -2
- package/dist/microsoftGraph/index.js +2 -2
- package/dist/microsoftGraph/types.d.cts +1 -1
- package/dist/microsoftGraph/types.d.ts +1 -1
- package/dist/notifications/index.cjs +3 -3
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/index.js +3 -3
- package/dist/notifications/types.d.cts +1 -1
- package/dist/notifications/types.d.ts +1 -1
- package/dist/oauth/index.cjs +1 -1
- package/dist/oauth/index.d.cts +2 -2
- package/dist/oauth/index.d.ts +2 -2
- package/dist/oauth/index.js +1 -1
- package/dist/oauth/types.d.cts +1 -1
- package/dist/oauth/types.d.ts +1 -1
- package/dist/{oauth-Bg5zro5S.js → oauth--asfePw-.js} +5 -5
- package/dist/{oauth-Bg5zro5S.js.map → oauth--asfePw-.js.map} +1 -1
- package/dist/{oauth-DFsI1TE5.cjs → oauth-B8yqG6Sy.cjs} +5 -5
- package/dist/{oauth-DFsI1TE5.cjs.map → oauth-B8yqG6Sy.cjs.map} +1 -1
- package/dist/omnisearch/index.cjs +2 -2
- package/dist/omnisearch/index.d.cts +2 -2
- package/dist/omnisearch/index.d.ts +2 -2
- package/dist/omnisearch/index.js +2 -2
- package/dist/omnisearch/types.d.cts +1 -1
- package/dist/omnisearch/types.d.ts +1 -1
- package/dist/{project-Bh954iOA.d.ts → project-C2wvX0xZ.d.ts} +2 -2
- package/dist/{project-D25GH8zK.d.cts → project-hePfzUY0.d.cts} +2 -2
- package/dist/queryService/index.cjs +1 -1
- package/dist/queryService/index.d.cts +1 -1
- package/dist/queryService/index.d.ts +1 -1
- package/dist/queryService/index.js +1 -1
- package/dist/queryService/types.d.cts +1 -1
- package/dist/queryService/types.d.ts +1 -1
- package/dist/{queryService--t_W9PSJ.cjs → queryService-BVtjkXy1.cjs} +5 -5
- package/dist/{queryService--t_W9PSJ.cjs.map → queryService-BVtjkXy1.cjs.map} +1 -1
- package/dist/{queryService-DX6zeAs_.js → queryService-Ca65E5KH.js} +5 -5
- package/dist/{queryService-DX6zeAs_.js.map → queryService-Ca65E5KH.js.map} +1 -1
- package/dist/queue/index.cjs +1 -1
- package/dist/queue/index.d.cts +3 -3
- package/dist/queue/index.d.ts +3 -3
- package/dist/queue/index.js +1 -1
- package/dist/queue/types.d.cts +1 -1
- package/dist/queue/types.d.ts +1 -1
- package/dist/{queue-DrLUbk98.js → queue-DyotLFJi.js} +4 -4
- package/dist/{queue-DrLUbk98.js.map → queue-DyotLFJi.js.map} +1 -1
- package/dist/{queue-D1_TCe0z.cjs → queue-OJJUUqc2.cjs} +4 -4
- package/dist/{queue-D1_TCe0z.cjs.map → queue-OJJUUqc2.cjs.map} +1 -1
- package/dist/scheduler/index.cjs +3 -3
- package/dist/scheduler/index.d.cts +2 -2
- package/dist/scheduler/index.d.ts +2 -2
- package/dist/scheduler/index.js +3 -3
- package/dist/scheduler/types.d.cts +1 -1
- package/dist/scheduler/types.d.ts +1 -1
- package/dist/sdk/configurations/index.cjs +1 -1
- package/dist/sdk/configurations/index.d.cts +4 -4
- package/dist/sdk/configurations/index.d.ts +4 -4
- package/dist/sdk/configurations/index.js +1 -1
- package/dist/sdk/developerPortal/index.cjs +3 -3
- package/dist/sdk/developerPortal/index.d.cts +3 -3
- package/dist/sdk/developerPortal/index.d.ts +3 -3
- package/dist/sdk/developerPortal/index.js +3 -3
- package/dist/sdk/queryService/index.cjs +1 -1
- package/dist/sdk/queryService/index.d.cts +1 -1
- package/dist/sdk/queryService/index.d.ts +1 -1
- package/dist/sdk/queryService/index.js +1 -1
- package/dist/sdk/semanticLayer/index.cjs +21 -448
- package/dist/sdk/semanticLayer/index.d.cts +21 -2
- package/dist/sdk/semanticLayer/index.d.ts +21 -2
- package/dist/sdk/semanticLayer/index.js +2 -430
- package/dist/sdk/semanticLayer/types.d.cts +2 -2
- package/dist/sdk/semanticLayer/types.d.ts +2 -2
- package/dist/sdk/storage/index.d.cts +1 -1
- package/dist/sdk/storage/index.d.ts +1 -1
- package/dist/sdk/tag/index.d.cts +2 -2
- package/dist/sdk/tag/index.d.ts +2 -2
- package/dist/sdk/tag/types.d.cts +1 -1
- package/dist/sdk/tag/types.d.ts +1 -1
- package/dist/sdk/vault/index.d.cts +1 -1
- package/dist/sdk/vault/index.d.ts +1 -1
- package/dist/semanticLayer-CSqmtHRo.js +692 -0
- package/dist/semanticLayer-CSqmtHRo.js.map +1 -0
- package/dist/semanticLayer-E0Vilu8u.cjs +811 -0
- package/dist/semanticLayer-E0Vilu8u.cjs.map +1 -0
- package/dist/{serviceIds-fHLDwOg9.d.ts → serviceIds-DRcoTnSd.d.cts} +2 -1
- package/dist/{serviceIds-fHLDwOg9.d.cts → serviceIds-DRcoTnSd.d.ts} +2 -1
- package/dist/status/index.cjs +1 -1
- package/dist/status/index.d.cts +1 -1
- package/dist/status/index.d.ts +1 -1
- package/dist/status/index.js +1 -1
- package/dist/storage/index.cjs +6 -5
- package/dist/storage/index.d.cts +3 -3
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +6 -6
- package/dist/storage/types.d.cts +3 -3
- package/dist/storage/types.d.ts +3 -3
- package/dist/{storage-DexWot8H.cjs → storage-BKm7cztt.cjs} +6 -6
- package/dist/{storage-DexWot8H.cjs.map → storage-BKm7cztt.cjs.map} +1 -1
- package/dist/{storage--cVaecFq.js → storage-LYwFQPNO.js} +6 -6
- package/dist/{storage--cVaecFq.js.map → storage-LYwFQPNO.js.map} +1 -1
- package/dist/stream/index.cjs +3 -3
- package/dist/stream/index.d.cts +2 -2
- package/dist/stream/index.d.ts +2 -2
- package/dist/stream/index.js +3 -3
- package/dist/stream/types.d.cts +1 -1
- package/dist/stream/types.d.ts +1 -1
- package/dist/syncActions/index.cjs +1 -1
- package/dist/syncActions/index.d.cts +1 -1
- package/dist/syncActions/index.d.ts +1 -1
- package/dist/syncActions/index.js +1 -1
- package/dist/syncActions/types.d.cts +1 -1
- package/dist/syncActions/types.d.ts +1 -1
- package/dist/{syncActions-DQq_A9v6.cjs → syncActions-OEZdVffK.cjs} +6 -6
- package/dist/{syncActions-DQq_A9v6.cjs.map → syncActions-OEZdVffK.cjs.map} +1 -1
- package/dist/{syncActions-CkMHM-jB.js → syncActions-QeBhIVhG.js} +6 -6
- package/dist/{syncActions-CkMHM-jB.js.map → syncActions-QeBhIVhG.js.map} +1 -1
- package/dist/telemetry/index.cjs +38 -2
- package/dist/telemetry/index.cjs.map +1 -0
- package/dist/telemetry/index.d.cts +15 -8
- package/dist/telemetry/index.d.ts +15 -8
- package/dist/telemetry/index.js +37 -1
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/types.d.cts +2 -2
- package/dist/telemetry/types.d.ts +2 -2
- package/dist/{types-Be3Wgn1U.d.cts → types-3eUgOA7I.d.cts} +2 -2
- package/dist/{types-bY6K3y0O.d.cts → types-52irAt99.d.cts} +2 -2
- package/dist/{types-C2gzqtjf.d.ts → types-B2U9cFcx.d.ts} +2 -2
- package/dist/{types-C35GWNmq.d.ts → types-B3GOGUJ7.d.cts} +753 -45
- package/dist/{types-B42HhyB0.d.cts → types-BEe50G2r.d.cts} +2 -2
- package/dist/{types-6ThDkaJw.d.ts → types-BH5LLeJy.d.ts} +2 -2
- package/dist/{types-CxmV36rp.d.cts → types-BMeDOB_D.d.ts} +753 -45
- package/dist/{types-CPaluTW7.d.cts → types-BOqD3Hqy.d.cts} +3 -3
- package/dist/{types-CHCM9oNk.d.ts → types-BQsOHNI0.d.ts} +3 -3
- package/dist/{types-Cu-0LT4f.d.cts → types-BQvv4RaI.d.cts} +2 -2
- package/dist/{types-ZGAWRIBW.d.ts → types-BTWIPEiU.d.ts} +2 -2
- package/dist/{types-B4_MM5Wf.d.cts → types-BW2BXUB4.d.cts} +2 -2
- package/dist/{types-CSc8NQCY.d.ts → types-BrYkBQo4.d.ts} +2 -2
- package/dist/{types-D7Wgcp0u.d.ts → types-BsxLGDoC.d.cts} +2 -2
- package/dist/{types-CNQdtffE.d.ts → types-BupPADSm.d.ts} +10 -3
- package/dist/{types-B7O5koJb.d.cts → types-Bxhh2SJr.d.ts} +2 -2
- package/dist/{types-DAzmGzlb.d.ts → types-BztF4HeB.d.ts} +2 -2
- package/dist/{types-6ku2LeX6.d.ts → types-C0_2KZ-A.d.ts} +2 -2
- package/dist/{types-BUYqdN7B.d.ts → types-C2vefB4D.d.ts} +17 -4
- package/dist/{types-6hh_3SZs.d.ts → types-CBgLCkYe.d.ts} +3 -3
- package/dist/{types-C_ilZZkQ.d.ts → types-CKiW3n6v.d.ts} +2 -2
- package/dist/{types-sO52qIAA.d.cts → types-COL1kVEB.d.cts} +2 -2
- package/dist/types-CPB-eF82.d.ts +289 -0
- package/dist/{types-Ccgbipp4.d.cts → types-CW6lCqrC.d.cts} +2 -2
- package/dist/{types-BS5M67xm.d.cts → types-CaYtinmA.d.cts} +3 -3
- package/dist/{types-BHI8Lin9.d.ts → types-CcrvrAJX.d.ts} +2 -2
- package/dist/{types-D-98DirB.d.ts → types-Ct0YPy2w.d.ts} +2 -2
- package/dist/{types-Jt0ipbSm.d.cts → types-Cz83RiVu.d.cts} +2 -2
- package/dist/{types-B6JJCta-.d.cts → types-D8Rrz51O.d.cts} +2 -2
- package/dist/{types-3p0adMdd.d.cts → types-DARv_P6O.d.cts} +3 -3
- package/dist/{types-Cpjk0-ta.d.ts → types-DBOSvWtD.d.ts} +2 -2
- package/dist/{types-C4mr0lop.d.ts → types-DEc55spK.d.ts} +13 -4
- package/dist/{types-DqniGeDJ.d.cts → types-DNxOHnZI.d.cts} +2 -2
- package/dist/{types-CrH4H8M4.d.cts → types-DPS8nwkV.d.cts} +2 -2
- package/dist/{types-DTTC70Ac.d.ts → types-DYzJ6K2e.d.ts} +2 -2
- package/dist/{types-CCr1-9Q6.d.cts → types-DZk3XHiN.d.cts} +3 -3
- package/dist/{types-DHqIJKwx.d.ts → types-DajzGOKB.d.ts} +2 -2
- package/dist/{types-DlvZeert.d.ts → types-DfvdbRPL.d.ts} +2 -2
- package/dist/{types-k4R8gQ4U.d.ts → types-DhDNS-5B.d.ts} +21 -3
- package/dist/{types-D6ocCyGh.d.cts → types-DjrRmQUe.d.cts} +13 -4
- package/dist/{types-B6lOyHY_.d.ts → types-Dmu-8g4O.d.ts} +3 -3
- package/dist/{types-BT46XIgn.d.cts → types-DqxIx9Pi.d.cts} +2 -2
- package/dist/{types-BO3sCD0a.d.cts → types-Jw10xuOW.d.cts} +2 -2
- package/dist/{types-sp1rJY9E.d.cts → types-M46WuBSm.d.cts} +2 -2
- package/dist/{types-BOnf68s5.d.cts → types-N3EChotg.d.cts} +2 -2
- package/dist/{types-Ur37iOqb.d.ts → types-OaD-cbbl.d.ts} +3 -3
- package/dist/{types-DHI0g51U.d.cts → types-_RhBCj4_.d.cts} +2 -2
- package/dist/{types-0xa_7cgo.d.cts → types-bGQb4Jtl.d.cts} +21 -3
- package/dist/{types-E3VT-zYz.d.cts → types-f8W_j6qD.d.cts} +10 -3
- package/dist/{types-DONxb2-c.d.cts → types-fX4gbxfV.d.cts} +17 -4
- package/dist/types-g3vU7hcg.d.cts +289 -0
- package/dist/{types-BYKHr5bR.d.ts → types-l9o4gFsI.d.ts} +2 -2
- package/dist/{types-CaMfshWX.d.ts → types-nrviNdzZ.d.ts} +2 -2
- package/dist/{types-BgVKG4vg.d.ts → types-zZBxJ0P-.d.ts} +2 -2
- package/dist/{validateConnectionStatus-24zqIQ0p.cjs → validateConnectionStatus-CsvYmCOI.cjs} +5 -4
- package/dist/validateConnectionStatus-CsvYmCOI.cjs.map +1 -0
- package/dist/{validateConnectionStatus-DhkWg6Eq.js → validateConnectionStatus-olE2sQ3U.js} +5 -4
- package/dist/{validateConnectionStatus-DhkWg6Eq.js.map → validateConnectionStatus-olE2sQ3U.js.map} +1 -1
- package/dist/vault/index.cjs +4 -4
- package/dist/vault/index.d.cts +1 -1
- package/dist/vault/index.d.ts +1 -1
- package/dist/vault/index.js +4 -4
- package/dist/vault/types.d.cts +1 -1
- package/dist/vault/types.d.ts +1 -1
- package/package.json +31 -5
- package/surface/billing.md +9 -0
- package/surface/kaiAgent.md +2 -2
- package/surface/management.md +13 -3
- package/surface/telemetry.md +2 -4
- package/dist/ValidationError-CzPWydEb.js.map +0 -1
- package/dist/ValidationError-h5qvwahi.cjs.map +0 -1
- package/dist/configurations-CqwAxiQL.cjs.map +0 -1
- package/dist/configurations-d7SZmw69.js.map +0 -1
- package/dist/constants-ByEwVtGf.js.map +0 -1
- package/dist/constants-lIfSdTzS.cjs.map +0 -1
- package/dist/createFetchClient-DdyZMhxO.js.map +0 -1
- package/dist/management-DGfgKsaA.cjs.map +0 -1
- package/dist/management-DNEKhR6a.js.map +0 -1
- package/dist/sdk/semanticLayer/index.cjs.map +0 -1
- package/dist/sdk/semanticLayer/index.js.map +0 -1
- package/dist/telemetry-CAu1Qt7B.cjs +0 -29
- package/dist/telemetry-CAu1Qt7B.cjs.map +0 -1
- package/dist/telemetry-Ca6j0i9w.js +0 -24
- package/dist/telemetry-Ca6j0i9w.js.map +0 -1
- package/dist/types-lFsTSkhe.d.cts +0 -14
- package/dist/types-lFsTSkhe.d.ts +0 -14
- package/dist/validateConnectionStatus-24zqIQ0p.cjs.map +0 -1
package/AGENTS.md
CHANGED
|
@@ -461,9 +461,9 @@ api.sdk.tag.* api.sdk.storage.*
|
|
|
461
461
|
|
|
462
462
|
Clients backing optional stack services (vault, queue, …) throw `ServiceUnavailableError` if absent from the current stack — check `api.context.stack.hasService(...)` before assuming a namespace exists.
|
|
463
463
|
|
|
464
|
-
**Liveness: every service client exposes a root-level `healthCheck()
|
|
464
|
+
**Liveness: every service client exposes a root-level `healthCheck()`.** It resolves with the service's payload when up and throws like any other call when not, and it needs no session — every one of these endpoints answers unauthenticated, so a probe works before login and is indifferent to whether a token rides along. Probe a service that way rather than by calling a real endpoint and interpreting the failure. **A 200 means up and a throw means down — that is the whole contract.** The payload is incidental, so **never hand-roll a response type** to make it look useful. Adding a client means adding its `healthCheck` too, and which client you probe through follows from the spec:
|
|
465
465
|
|
|
466
|
-
- the service's spec declares the probe path → **probe through the client's own OpenAPI client** (`client.get('/health-check', {}, { signal })`). The return type comes from the spec for free — no type argument, no alias in `types.ts`, and no generic client to construct.
|
|
466
|
+
- the service's spec declares the probe path → **probe through the client's own OpenAPI client** (`client.get('/health-check', {}, { signal })`). The return type comes from the spec for free — no type argument, no alias in `types.ts`, and no generic client to construct. Six do today: `ai`, `editor`, `import`, `telemetry`, `chat` (which probes `/ping`) and `apps` (which probes `/`, the only unauthenticated root the `/v2` surface declares).
|
|
467
467
|
- it doesn't → fall back to a generic fetch client over the service `baseUrl` and **pass no type argument.** The payload resolves as `unknown`, which is honest: callers only need the 200.
|
|
468
468
|
|
|
469
469
|
Both clients run the same middleware chain; the OpenAPI one additionally sends auth headers, which is fine — these endpoints answer the same with a valid token, a bogus one, or none.
|
package/API-SURFACE.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Every namespace and method reachable from a ready `KeboolaApi` — the `api` half of a keboola client (`createKeboola(...).api` / `createLegacyKeboola(...).api`, or `useApiClient()`). Generated from the TypeScript type checker — see `scripts/gen-surface.mjs`.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
25 top-level namespaces, 635 methods. This index lists method **names** only — full signatures live per namespace under [`surface/`](./surface). Open `surface/<namespace>.md` for the one you need.
|
|
8
8
|
|
|
9
9
|
## [`api.ai`](./surface/ai.md)
|
|
10
10
|
|
|
@@ -85,6 +85,12 @@ Every namespace and method reachable from a ready `KeboolaApi` — the `api` hal
|
|
|
85
85
|
- `webauthn.registerOptions`
|
|
86
86
|
- `webauthn.remove`
|
|
87
87
|
|
|
88
|
+
## [`api.billing`](./surface/billing.md)
|
|
89
|
+
|
|
90
|
+
- `getCredits`
|
|
91
|
+
- `getCreditsAndTopUp`
|
|
92
|
+
- `healthCheck`
|
|
93
|
+
|
|
88
94
|
## [`api.chat`](./surface/chat.md)
|
|
89
95
|
|
|
90
96
|
- `createChat`
|
|
@@ -282,6 +288,13 @@ Every namespace and method reachable from a ready `KeboolaApi` — the `api` hal
|
|
|
282
288
|
- `organizations.removeOrganizationUser`
|
|
283
289
|
- `organizations.setOrganizationMetadata`
|
|
284
290
|
- `organizations.updateOrganization`
|
|
291
|
+
- `payAsYouGo.createPaymentRequest`
|
|
292
|
+
- `payAsYouGo.getBillingConfiguration`
|
|
293
|
+
- `payAsYouGo.getCreditPurchases`
|
|
294
|
+
- `payAsYouGo.getStripeCustomer`
|
|
295
|
+
- `payAsYouGo.getTopUpSetting`
|
|
296
|
+
- `payAsYouGo.updateStripeCustomer`
|
|
297
|
+
- `payAsYouGo.updateTopUpSetting`
|
|
285
298
|
- `projects.addProjectFeature`
|
|
286
299
|
- `projects.addProjectTemplateFeature`
|
|
287
300
|
- `projects.addProjectUser`
|
|
@@ -691,7 +704,8 @@ Every namespace and method reachable from a ready `KeboolaApi` — the `api` hal
|
|
|
691
704
|
|
|
692
705
|
## [`api.telemetry`](./surface/telemetry.md)
|
|
693
706
|
|
|
694
|
-
- `
|
|
707
|
+
- `getProvisioningToken`
|
|
708
|
+
- `healthCheck`
|
|
695
709
|
|
|
696
710
|
## [`api.vault`](./surface/vault.md)
|
|
697
711
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,258 @@
|
|
|
1
1
|
# @keboola/api-client
|
|
2
2
|
|
|
3
|
+
## 35.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- **Breaking:** `Workspace` carries a required `state: 'active' | 'deactivated'`, the retention lifecycle state Storage already serves on the workspace list and detail. Reading a workspace is unaffected; code that _constructs_ a `Workspace` object literal — a test fixture, a mock — has to add the field.
|
|
8
|
+
|
|
9
|
+
Required rather than optional because the spec marks `state` required and the server always sends it, and because `Workspace` exists to model the response more accurately than the generated schema does — the neighbouring overrides already tighten `name`, `component`, `configurationId` and `platformUsageType` the same way.
|
|
10
|
+
|
|
11
|
+
`deactivated` means the backend login is disabled — no credentials, no load or unload — while the workspace stays listed so its owner can delete it. Storage collapses its internal `deactivation_notified` stage to `active`, so a workspace only scheduled for deactivation still reads as active (DMD-2101).
|
|
12
|
+
|
|
13
|
+
## 34.0.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- New `approvalGoneReasonSchema` / `ApprovalGoneReason` in `chat/types` — the shared wire contract for why a Kai approval slot is gone.
|
|
18
|
+
|
|
19
|
+
kai-agent now tombstones every removed approval slot and answers a POST to a gone slot with 409 carrying the reason as the error envelope's `subtype`, so the client can tell "already processed" and "the chat was stopped" apart from a genuine expiry instead of reading every 404 as one.
|
|
20
|
+
|
|
21
|
+
- `session.getAuthHeaders()` takes an optional project, so a host holding several projects can
|
|
22
|
+
authorize an off-client request against one the session is not scoped to. Until now this surface
|
|
23
|
+
read `X-KBC-ProjectId` off the session's own scope and nothing else, which left the chat SSE stream
|
|
24
|
+
— its only caller, and the one transport with no service client behind it — able to _read_ another
|
|
25
|
+
project through `session.forProject(id)` but never to send to it.
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
// The session's own scope, exactly as before.
|
|
29
|
+
await session.getAuthHeaders();
|
|
30
|
+
|
|
31
|
+
// The project the caller names, whatever the session is scoped to.
|
|
32
|
+
await session.getAuthHeaders(projectId);
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- Omitting it is unchanged, including the rule that the scope is re-read _after_ the token
|
|
36
|
+
rotation: a `setProject` mid-flight lands, and a `clearProject` refuses the call.
|
|
37
|
+
- Naming one requires the session to be authenticated, not scoped. The credential is user-level and
|
|
38
|
+
the project is a header on top of it, so a caller that names a project has said everything the
|
|
39
|
+
request needs.
|
|
40
|
+
- A named project survives the rotation as given — it is the caller's, not the session's to move —
|
|
41
|
+
and the session pin is unchanged: a call whose rotation outlived its sign-in is still refused.
|
|
42
|
+
- The project is **not** checked against an access set, because the session cannot acquire one:
|
|
43
|
+
connection collapses every bearer failure into a single `invalid_token` response, so "no access to
|
|
44
|
+
this project" and "revoked token" are indistinguishable. That is the same reason
|
|
45
|
+
`session.forProject` does not probe scope either. Whether a project is reachable is the caller's
|
|
46
|
+
knowledge, from `token.introspect`; what this guarantees is that the header names what was asked
|
|
47
|
+
for and never something else.
|
|
48
|
+
|
|
49
|
+
- New `api.billing` namespace over the Billing API — the pay-as-you-go credit balance of the project
|
|
50
|
+
the token identifies.
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
if (api.context.stack.hasService("billing")) {
|
|
54
|
+
const { remaining, stats } = await api.billing.getCredits();
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The service is a separate stack deployment (service id `billing`), not part of the Manage API that
|
|
59
|
+
`api.management.payAsYouGo` covers, and `/credits` authenticates with a Storage API token rather
|
|
60
|
+
than a Manage token — so it gets its own client rather than another method there. Types generate
|
|
61
|
+
from the service's published spec, newly registered in `redocly.yaml`.
|
|
62
|
+
- `getCredits` answers only for a project carrying the `pay-as-you-go` feature.
|
|
63
|
+
- `getCreditsAndTopUp` is the same read with an automatic top-up attempted first, which the service
|
|
64
|
+
runs only when the balance is at or below zero and the project has a top-up configuration
|
|
65
|
+
(`management.payAsYouGo.getTopUpSetting`). A charge that fails does not fail the call.
|
|
66
|
+
- `stats` is absent unless the project has consumption to report.
|
|
67
|
+
|
|
68
|
+
Three groups of endpoints stay unwrapped: `/duration/*` and `/marketplaces/{resolve-token,
|
|
69
|
+
confirm-subscription}` are service-to-service calls needing a Manage _application_ token with a
|
|
70
|
+
`billing:manage` or `marketplace-subscriptions:manage` scope, `/marketplaces/azure-webhook` is
|
|
71
|
+
called by Azure Marketplace against an Azure-issued JWT, and `/` only restates what `healthCheck`
|
|
72
|
+
already reports.
|
|
73
|
+
|
|
74
|
+
The spec's `servers` block names the queue host rather than the billing one; it is ignored, since
|
|
75
|
+
every stack client resolves its base URL from the stack's service index.
|
|
76
|
+
|
|
77
|
+
- `kaiAgent.getHistory` can ask for the conversations one app opened, and every history row says which
|
|
78
|
+
app opened it.
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
// Only what this app started — a business user never sees the data team's Kai threads.
|
|
82
|
+
const { chats } = await api.kaiAgent.getHistory({ client: "business-chat" });
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
kai-agent lists a project's conversations without regard to which host started them, so a second
|
|
86
|
+
host on the same agent shows its readers somebody else's chats. The service now records the host on
|
|
87
|
+
the chat and filters on it; this is the SDK half.
|
|
88
|
+
- `client` is `'kbc-ui' | 'business-chat'`, and omitting it keeps the current behaviour — every
|
|
89
|
+
conversation, whatever opened it.
|
|
90
|
+
- The row's own `client` is nullable: a chat opened before the service recorded it is unattributable,
|
|
91
|
+
and the service gives those to `kbc-ui`. So a filtered list starts from the deploy, not from the
|
|
92
|
+
project's first conversation.
|
|
93
|
+
- `POST /api/chat` accepts the same `client` on its body, which is what a host sets so its
|
|
94
|
+
conversations are attributed at all.
|
|
95
|
+
|
|
96
|
+
Regenerated from the deployed spec, so `getSpendCaps` / `updateSpendCaps` now carry
|
|
97
|
+
`defaultProjectCapPpu` in the generated schema too. Nothing changes for a caller — the method
|
|
98
|
+
already returned that field through a hand-written zod schema while the service rolled out, and the
|
|
99
|
+
fallback stays until every stack has the deploy.
|
|
100
|
+
|
|
101
|
+
- Type the maintainer SAML SSO read responses (ST-4306).
|
|
102
|
+
|
|
103
|
+
`management/maintainers/types` exports `SamlConfigSummary` and `SamlConfigDetail`, derived from the
|
|
104
|
+
regenerated management schema. The two `GET /manage/maintainers/{maintainerId}/saml*` responses were
|
|
105
|
+
previously typed with every field optional and without `membershipRestriction`; the schema now marks
|
|
106
|
+
all of them required and the detail response also carries `permittedEmailDomains`, so callers no
|
|
107
|
+
longer have to guard fields the backend always sends. The list endpoint documents its 403.
|
|
108
|
+
|
|
109
|
+
The six client methods are unchanged — the two getters pick up the tightened return types on their
|
|
110
|
+
own.
|
|
111
|
+
|
|
112
|
+
- `api.management.payAsYouGo` covers the pay-as-you-go billing endpoints — the credit price and tax
|
|
113
|
+
rates the checkout quotes, a project's credit purchases, its Stripe customer and saved cards, and
|
|
114
|
+
its automatic top-up configuration.
|
|
115
|
+
|
|
116
|
+
```ts
|
|
117
|
+
const { "credit-price": creditPrice } =
|
|
118
|
+
await api.management.payAsYouGo.getBillingConfiguration();
|
|
119
|
+
const purchases =
|
|
120
|
+
await api.management.payAsYouGo.getCreditPurchases(idProject);
|
|
121
|
+
const { clientSecret } = await api.management.payAsYouGo.createPaymentRequest(
|
|
122
|
+
{
|
|
123
|
+
idProject,
|
|
124
|
+
amount: 100,
|
|
125
|
+
saveCard: true,
|
|
126
|
+
},
|
|
127
|
+
);
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Connection serves these off the same host as the Manage API but outside its `/manage` prefix, and
|
|
131
|
+
they accept a Manage token of type `admin` or `session`, so they run through the management client's
|
|
132
|
+
auth middleware like every other management method.
|
|
133
|
+
- Parameters carry the endpoint's own names: the project is `idProject` everywhere except
|
|
134
|
+
`getTopUpSetting`, whose path names it `projectId`.
|
|
135
|
+
- `getStripeCustomer` resolves `null` when the project has no Stripe customer yet — the endpoint
|
|
136
|
+
answers 204.
|
|
137
|
+
- `updateTopUpSetting` resolves `void`; the endpoint answers 202 with no body, so read the stored
|
|
138
|
+
configuration back with `getTopUpSetting`.
|
|
139
|
+
- `getTopUpSetting` throws a 404 `ApiError` when top-up was never configured for the project, which
|
|
140
|
+
is a product state rather than a failure.
|
|
141
|
+
|
|
142
|
+
Four response types are tightened past the manage OpenAPI document, which is looser than the
|
|
143
|
+
endpoints: `credit-price` and the three top-up fields and `clientSecret` are required rather than
|
|
144
|
+
optional, `stripeInvoiceStatus` and `invoiceTopUpType` are unions rather than bare strings, and
|
|
145
|
+
`moneyAmount` is nullable. They revert to plain generated types once connection's spec is corrected.
|
|
146
|
+
|
|
147
|
+
The maintainer SAML responses gained `membershipRestriction`, `getMaintainerSamlConfig` gained
|
|
148
|
+
`permittedEmailDomains`, and both configs' fields are no longer optional — the manage OpenAPI
|
|
149
|
+
document now marks them required.
|
|
150
|
+
|
|
151
|
+
- New `canWriteSemanticLayer(token)` permission predicate — whether a project role may create, update
|
|
152
|
+
or delete semantic-layer objects in the metastore.
|
|
153
|
+
|
|
154
|
+
```ts
|
|
155
|
+
if (canWriteSemanticLayer(api.context.project.sapiToken)) {
|
|
156
|
+
// offer the add / edit / delete affordances
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
A denylist, unlike `canWriteKaiSettings`: the metastore's project-level ACL admits ordinary project
|
|
161
|
+
work, so only `readOnly` is refused. Organization-scope promotion stays a separate, narrower right
|
|
162
|
+
the metastore answers with a 403.
|
|
163
|
+
|
|
164
|
+
- `api.telemetry` moves onto its own OpenAPI document, loses its one-method sub-namespace, and gains
|
|
165
|
+
the endpoint the embed dashboards need.
|
|
166
|
+
|
|
167
|
+
```ts
|
|
168
|
+
const { token } = await api.telemetry.getProvisioningToken({
|
|
169
|
+
project_type: projectType,
|
|
170
|
+
});
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
- **`getProvisioningToken`** returns the short-lived ES256 JWT a telemetry embed authenticates with.
|
|
174
|
+
Both response fields are optional in the spec, so check `token` before use.
|
|
175
|
+
- **`healthCheck`** joins the other service clients. The endpoint was only ever thought missing
|
|
176
|
+
because its path sits behind the ingress prefix described below.
|
|
177
|
+
- **`provisioning.createCredentials` is gone**, and with it the `provisioning` namespace, so the two
|
|
178
|
+
remaining methods sit directly on `api.telemetry`. It posted to an endpoint the service does not
|
|
179
|
+
route, document, or implement — the word `workspace` appears nowhere in
|
|
180
|
+
`keboola/gooddata-cn-provisioning`, and one ingress rule sends all of `/provisioning/*` to that
|
|
181
|
+
one backend, so there was nowhere else it could have landed. It answered 404 on every stack
|
|
182
|
+
probed and had no caller. `CreateCredentialsBody` and `WorkspaceData` go with it.
|
|
183
|
+
|
|
184
|
+
Types generate from the service's own `swagger.yaml`, newly registered in `redocly.yaml`. Its repo
|
|
185
|
+
is private and it does not serve the document over HTTP, so the spec is vendored beside the
|
|
186
|
+
generated schema — the same local-root arrangement `microsoftGraph` uses.
|
|
187
|
+
|
|
188
|
+
The client owns the `/provisioning` prefix rather than its callers: the service listens on its root,
|
|
189
|
+
and one ingress rule on the telemetry host routes that prefix to it. `baseUrl` stays the plain
|
|
190
|
+
telemetry service URL, and request paths stay the spec's own (`/token`, `/health`).
|
|
191
|
+
|
|
192
|
+
`project_type` is a free-form string passed straight into the JWT claim, not an enum — the service
|
|
193
|
+
validates it nowhere.
|
|
194
|
+
|
|
195
|
+
- Expose organization membership on project users. The shared User type keeps the field optional for older stacks and endpoints that do not return project membership.
|
|
196
|
+
|
|
197
|
+
### Patch Changes
|
|
198
|
+
|
|
199
|
+
- A successful `text/html` response is only read as Connection's login screen when it actually carries
|
|
200
|
+
a body. Symfony's `Response::prepare()` stamps `Content-Type: text/html` on every bodyless response
|
|
201
|
+
but `204`/`304`, so a framework default was being reported to the user as an expired session.
|
|
202
|
+
|
|
203
|
+
`PUT /pay-as-you-go/billing/top-up` answers `202` with an empty body, and it is the middle call of
|
|
204
|
+
the kbc-ui Pay flow — so buying pay-as-you-go credits failed with "You will be logged out
|
|
205
|
+
automatically." for every user, on every auth strategy, and never reached Stripe. The same trap was
|
|
206
|
+
live on the invitation, join-request, password-reset and token-revoke endpoints.
|
|
207
|
+
|
|
208
|
+
Both validators are fixed, `validateManagementStatus` (`ManagementClientAuthError`) and
|
|
209
|
+
`validateConnectionStatus` (`HtmlResponseError`, used by the storage and auth clients), through a
|
|
210
|
+
new shared `isLoginPageRedirect` — `isHtmlResponse && !isContentEmpty`. `isHtmlResponse` keeps its
|
|
211
|
+
header-only meaning and `isContentEmpty` is new; calling the header check on its own is what read an
|
|
212
|
+
empty `202` as a login page. All three are workspace-internal, not part of the package's public
|
|
213
|
+
export surface.
|
|
214
|
+
|
|
215
|
+
Connection declares JSON on those responses in connection#8414; this is the client-side half
|
|
216
|
+
and holds regardless of what a service labels an empty body.
|
|
217
|
+
|
|
218
|
+
- The semantic-layer SDK parses what it reads instead of asserting it, so an object that does not
|
|
219
|
+
match its declared shape is dropped rather than handed to a caller half-formed.
|
|
220
|
+
|
|
221
|
+
`listModels` and `listObjects` cast the metastore's response to the types in
|
|
222
|
+
`sdk/semanticLayer/types`. Those types declare `SemanticMetricData.name`, `.sql` and
|
|
223
|
+
`SemanticGlossaryData.term`, `.definition` as required strings, and every consumer is entitled to
|
|
224
|
+
call a method on them — the first one to do so (`.trim()`, in business-chat's openers) turns a
|
|
225
|
+
missing field into a `TypeError` thrown inside a render.
|
|
226
|
+
- Each element is validated against its object type's shape. One that fails is left out and the
|
|
227
|
+
reason logged — object type, UUID, and which field is wrong, never the payload, because a model's
|
|
228
|
+
vocabulary and its SQL are the customer's.
|
|
229
|
+
- A drop never takes its container with it, at either level: a model holding one malformed metric
|
|
230
|
+
still lists the other nine, and a dataset carrying one nameless field still lists its other
|
|
231
|
+
columns rather than disappearing from the model.
|
|
232
|
+
- A response that is not a collection still throws a `ValidationError` — reading it as an empty
|
|
233
|
+
list would say "this project has no metrics".
|
|
234
|
+
- Undeclared fields still reach callers untouched, exactly as they did under the cast.
|
|
235
|
+
- `SemanticObject.meta` stops lying: an envelope that omits it — or sends it as `null` — now
|
|
236
|
+
normalizes to `{}` rather than being typed as present and arriving `undefined`.
|
|
237
|
+
- An **optional** enum carrying a value outside the list (`role`, `severity`, `scope`, a
|
|
238
|
+
relationship's `type`) reads as absent instead of dropping its object — a new value the metastore
|
|
239
|
+
starts issuing must not delete the dataset carrying it. A required one (`constraintType`) has no
|
|
240
|
+
such reading.
|
|
241
|
+
|
|
242
|
+
**`listModelChildren` now throws `SemanticLayerUnreadableChildrenError` instead of degrading**, and
|
|
243
|
+
`deleteModel` inherits it. A list read degrades because a shorter list is still useful; this one
|
|
244
|
+
cannot, because it answers what a delete would destroy. A dropped child would otherwise be missing
|
|
245
|
+
from the cascade, leave `failedChildren` empty, and let the model be deleted — orphaning an object
|
|
246
|
+
whose `modelUUID` points at a model that no longer exists and that no list returns, so it can never
|
|
247
|
+
be found, fixed or deleted again. The throw happens before the first child delete, so a refusal
|
|
248
|
+
destroys nothing. An unreadable object is counted against the model its raw envelope names, and
|
|
249
|
+
against every model when the envelope cannot name one.
|
|
250
|
+
|
|
251
|
+
Writes are untouched: the metastore echoes back the object it has just validated and stored.
|
|
252
|
+
|
|
253
|
+
`formatValidationIssues` is now exported alongside `ValidationError`, for boundaries that degrade
|
|
254
|
+
instead of throwing and still owe a one-line reason.
|
|
255
|
+
|
|
3
256
|
## 33.0.0
|
|
4
257
|
|
|
5
258
|
### Minor Changes
|
package/dist/{ManagementClientAuthError-DqeXL8nv.cjs → ManagementClientAuthError-DD4u0EU7.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_createFetchClient = require("./createFetchClient-
|
|
1
|
+
const require_createFetchClient = require("./createFetchClient-DgMiqTJ8.cjs");
|
|
2
2
|
//#region src/errors/ManagementClientAuthError.ts
|
|
3
3
|
var ManagementClientAuthError = class extends require_createFetchClient.ApiError {
|
|
4
4
|
title;
|
|
@@ -17,4 +17,4 @@ Object.defineProperty(exports, "ManagementClientAuthError", {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
//# sourceMappingURL=ManagementClientAuthError-
|
|
20
|
+
//# sourceMappingURL=ManagementClientAuthError-DD4u0EU7.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManagementClientAuthError-
|
|
1
|
+
{"version":3,"file":"ManagementClientAuthError-DD4u0EU7.cjs","names":["ApiError"],"sources":["../src/errors/ManagementClientAuthError.ts"],"sourcesContent":["import type { ApiResponse } from '../fetchClient/createFetchClient/types';\n\nimport { ApiError } from './ApiError';\n\nexport class ManagementClientAuthError extends ApiError {\n title: string;\n message: string;\n constructor(title: string, message: string, res: ApiResponse) {\n super(res);\n this.title = title;\n this.message = message;\n }\n}\n"],"mappings":";;AAIA,IAAa,4BAAb,cAA+CA,0BAAAA,SAAS;CACtD;CACA;CACA,YAAY,OAAe,SAAiB,KAAkB;EAC5D,MAAM,GAAG;EACT,KAAK,QAAQ;EACb,KAAK,UAAU;CACjB;AACF"}
|
package/dist/{ManagementClientAuthError-iKbBugKC.js → ManagementClientAuthError-ey-f03vy.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as ApiError } from "./createFetchClient-U-ZrwPl2.js";
|
|
2
2
|
//#region src/errors/ManagementClientAuthError.ts
|
|
3
3
|
var ManagementClientAuthError = class extends ApiError {
|
|
4
4
|
title;
|
|
@@ -12,4 +12,4 @@ var ManagementClientAuthError = class extends ApiError {
|
|
|
12
12
|
//#endregion
|
|
13
13
|
export { ManagementClientAuthError as t };
|
|
14
14
|
|
|
15
|
-
//# sourceMappingURL=ManagementClientAuthError-
|
|
15
|
+
//# sourceMappingURL=ManagementClientAuthError-ey-f03vy.js.map
|
package/dist/{ManagementClientAuthError-iKbBugKC.js.map → ManagementClientAuthError-ey-f03vy.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManagementClientAuthError-
|
|
1
|
+
{"version":3,"file":"ManagementClientAuthError-ey-f03vy.js","names":[],"sources":["../src/errors/ManagementClientAuthError.ts"],"sourcesContent":["import type { ApiResponse } from '../fetchClient/createFetchClient/types';\n\nimport { ApiError } from './ApiError';\n\nexport class ManagementClientAuthError extends ApiError {\n title: string;\n message: string;\n constructor(title: string, message: string, res: ApiResponse) {\n super(res);\n this.title = title;\n this.message = message;\n }\n}\n"],"mappings":";;AAIA,IAAa,4BAAb,cAA+C,SAAS;CACtD;CACA;CACA,YAAY,OAAe,SAAiB,KAAkB;EAC5D,MAAM,GAAG;EACT,KAAK,QAAQ;EACb,KAAK,UAAU;CACjB;AACF"}
|
|
@@ -20,11 +20,15 @@ var ValidationError = class ValidationError extends Error {
|
|
|
20
20
|
};
|
|
21
21
|
const isValidationError = (error) => error instanceof ValidationError;
|
|
22
22
|
/**
|
|
23
|
-
* One line per issue, prefixed by the field it belongs to.
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* One line per issue, prefixed by the field it belongs to.
|
|
24
|
+
*
|
|
25
|
+
* - Not `z.prettifyError`, which formats for a terminal — its `✖`/`→` glyphs and newlines survive a
|
|
26
|
+
* log but collapse into one run-on line in HTML, where most of these end up.
|
|
27
|
+
* - Exported for the boundaries that degrade instead of throwing: a read that drops one malformed
|
|
28
|
+
* element still owes a reason, and it needs the same one line without a `ValidationError`.
|
|
29
|
+
* - Says which field and what is wrong with it, never the value — so it is safe to log.
|
|
26
30
|
*/
|
|
27
|
-
const
|
|
31
|
+
const formatValidationIssues = (issues) => issues.map((issue) => {
|
|
28
32
|
const path = issue.path.join(".");
|
|
29
33
|
return path ? `${path}: ${issue.message}` : issue.message;
|
|
30
34
|
}).join("; ");
|
|
@@ -36,9 +40,9 @@ const formatIssues = (issues) => issues.map((issue) => {
|
|
|
36
40
|
const parseOrThrow = (schema, value) => {
|
|
37
41
|
const result = schema.safeParse(value);
|
|
38
42
|
if (result.success) return result.data;
|
|
39
|
-
throw new ValidationError(
|
|
43
|
+
throw new ValidationError(formatValidationIssues(result.error.issues), result.error.issues);
|
|
40
44
|
};
|
|
41
45
|
//#endregion
|
|
42
|
-
export {
|
|
46
|
+
export { parseOrThrow as i, formatValidationIssues as n, isValidationError as r, ValidationError as t };
|
|
43
47
|
|
|
44
|
-
//# sourceMappingURL=ValidationError-
|
|
48
|
+
//# sourceMappingURL=ValidationError-BekhphAq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValidationError-BekhphAq.js","names":[],"sources":["../src/errors/ValidationError.ts"],"sourcesContent":["import type * as z from 'zod';\n\n/**\n * A payload the SDK refused to accept — an input a caller assembled wrongly, or a response that did\n * not match the shape the endpoint is documented to return.\n *\n * It exists so a `ZodError` never leaves the package. `ZodError.message` is `JSON.stringify` of its\n * issue list — over a kilobyte for two problems — and a consumer that renders a caught error's\n * message puts that blob in front of a user. `message` here is a single line built for exactly that\n * rendering, while `issues` keeps the structured detail for anyone inspecting the failure rather\n * than displaying it.\n */\nexport class ValidationError extends Error {\n issues: z.core.$ZodIssue[];\n\n constructor(message: string, issues: z.core.$ZodIssue[] = []) {\n super(message);\n this.name = 'ValidationError';\n this.issues = issues;\n Object.setPrototypeOf(this, ValidationError.prototype);\n }\n}\n\nexport const isValidationError = (error: unknown): error is ValidationError =>\n error instanceof ValidationError;\n\n/**\n * One line per issue, prefixed by the field it belongs to.\n *\n * - Not `z.prettifyError`, which formats for a terminal — its `✖`/`→` glyphs and newlines survive a\n * log but collapse into one run-on line in HTML, where most of these end up.\n * - Exported for the boundaries that degrade instead of throwing: a read that drops one malformed\n * element still owes a reason, and it needs the same one line without a `ValidationError`.\n * - Says which field and what is wrong with it, never the value — so it is safe to log.\n */\nexport const formatValidationIssues = (issues: readonly z.core.$ZodIssue[]) =>\n issues\n .map((issue) => {\n const path = issue.path.join('.');\n\n // A root-level issue is about the payload as a whole, and its message already says so —\n // prefixing it with a name for \"the whole thing\" only adds noise.\n return path ? `${path}: ${issue.message}` : issue.message;\n })\n .join('; ');\n\n/**\n * Parses with `schema`, converting a `ZodError` into a {@link ValidationError}. Use it instead of a\n * bare `schema.parse()` anywhere the value crosses the package boundary — every client input and\n * every response body.\n */\nexport const parseOrThrow = <T extends z.ZodType>(schema: T, value: unknown): z.output<T> => {\n const result = schema.safeParse(value);\n\n if (result.success) return result.data;\n\n throw new ValidationError(formatValidationIssues(result.error.issues), result.error.issues);\n};\n"],"mappings":";;;;;;;;;;;AAYA,IAAa,kBAAb,MAAa,wBAAwB,MAAM;CACzC;CAEA,YAAY,SAAiB,SAA6B,CAAC,GAAG;EAC5D,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,KAAK,SAAS;EACd,OAAO,eAAe,MAAM,gBAAgB,SAAS;CACvD;AACF;AAEA,MAAa,qBAAqB,UAChC,iBAAiB;;;;;;;;;;AAWnB,MAAa,0BAA0B,WACrC,OACG,KAAK,UAAU;CACd,MAAM,OAAO,MAAM,KAAK,KAAK,GAAG;CAIhC,OAAO,OAAO,GAAG,KAAK,IAAI,MAAM,YAAY,MAAM;AACpD,CAAC,CAAC,CACD,KAAK,IAAI;;;;;;AAOd,MAAa,gBAAqC,QAAW,UAAgC;CAC3F,MAAM,SAAS,OAAO,UAAU,KAAK;CAErC,IAAI,OAAO,SAAS,OAAO,OAAO;CAElC,MAAM,IAAI,gBAAgB,uBAAuB,OAAO,MAAM,MAAM,GAAG,OAAO,MAAM,MAAM;AAC5F"}
|
|
@@ -20,11 +20,15 @@ var ValidationError = class ValidationError extends Error {
|
|
|
20
20
|
};
|
|
21
21
|
const isValidationError = (error) => error instanceof ValidationError;
|
|
22
22
|
/**
|
|
23
|
-
* One line per issue, prefixed by the field it belongs to.
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* One line per issue, prefixed by the field it belongs to.
|
|
24
|
+
*
|
|
25
|
+
* - Not `z.prettifyError`, which formats for a terminal — its `✖`/`→` glyphs and newlines survive a
|
|
26
|
+
* log but collapse into one run-on line in HTML, where most of these end up.
|
|
27
|
+
* - Exported for the boundaries that degrade instead of throwing: a read that drops one malformed
|
|
28
|
+
* element still owes a reason, and it needs the same one line without a `ValidationError`.
|
|
29
|
+
* - Says which field and what is wrong with it, never the value — so it is safe to log.
|
|
26
30
|
*/
|
|
27
|
-
const
|
|
31
|
+
const formatValidationIssues = (issues) => issues.map((issue) => {
|
|
28
32
|
const path = issue.path.join(".");
|
|
29
33
|
return path ? `${path}: ${issue.message}` : issue.message;
|
|
30
34
|
}).join("; ");
|
|
@@ -36,7 +40,7 @@ const formatIssues = (issues) => issues.map((issue) => {
|
|
|
36
40
|
const parseOrThrow = (schema, value) => {
|
|
37
41
|
const result = schema.safeParse(value);
|
|
38
42
|
if (result.success) return result.data;
|
|
39
|
-
throw new ValidationError(
|
|
43
|
+
throw new ValidationError(formatValidationIssues(result.error.issues), result.error.issues);
|
|
40
44
|
};
|
|
41
45
|
//#endregion
|
|
42
46
|
Object.defineProperty(exports, "ValidationError", {
|
|
@@ -45,6 +49,12 @@ Object.defineProperty(exports, "ValidationError", {
|
|
|
45
49
|
return ValidationError;
|
|
46
50
|
}
|
|
47
51
|
});
|
|
52
|
+
Object.defineProperty(exports, "formatValidationIssues", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function() {
|
|
55
|
+
return formatValidationIssues;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
48
58
|
Object.defineProperty(exports, "isValidationError", {
|
|
49
59
|
enumerable: true,
|
|
50
60
|
get: function() {
|
|
@@ -58,4 +68,4 @@ Object.defineProperty(exports, "parseOrThrow", {
|
|
|
58
68
|
}
|
|
59
69
|
});
|
|
60
70
|
|
|
61
|
-
//# sourceMappingURL=ValidationError-
|
|
71
|
+
//# sourceMappingURL=ValidationError-CLVJCCwH.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValidationError-CLVJCCwH.cjs","names":[],"sources":["../src/errors/ValidationError.ts"],"sourcesContent":["import type * as z from 'zod';\n\n/**\n * A payload the SDK refused to accept — an input a caller assembled wrongly, or a response that did\n * not match the shape the endpoint is documented to return.\n *\n * It exists so a `ZodError` never leaves the package. `ZodError.message` is `JSON.stringify` of its\n * issue list — over a kilobyte for two problems — and a consumer that renders a caught error's\n * message puts that blob in front of a user. `message` here is a single line built for exactly that\n * rendering, while `issues` keeps the structured detail for anyone inspecting the failure rather\n * than displaying it.\n */\nexport class ValidationError extends Error {\n issues: z.core.$ZodIssue[];\n\n constructor(message: string, issues: z.core.$ZodIssue[] = []) {\n super(message);\n this.name = 'ValidationError';\n this.issues = issues;\n Object.setPrototypeOf(this, ValidationError.prototype);\n }\n}\n\nexport const isValidationError = (error: unknown): error is ValidationError =>\n error instanceof ValidationError;\n\n/**\n * One line per issue, prefixed by the field it belongs to.\n *\n * - Not `z.prettifyError`, which formats for a terminal — its `✖`/`→` glyphs and newlines survive a\n * log but collapse into one run-on line in HTML, where most of these end up.\n * - Exported for the boundaries that degrade instead of throwing: a read that drops one malformed\n * element still owes a reason, and it needs the same one line without a `ValidationError`.\n * - Says which field and what is wrong with it, never the value — so it is safe to log.\n */\nexport const formatValidationIssues = (issues: readonly z.core.$ZodIssue[]) =>\n issues\n .map((issue) => {\n const path = issue.path.join('.');\n\n // A root-level issue is about the payload as a whole, and its message already says so —\n // prefixing it with a name for \"the whole thing\" only adds noise.\n return path ? `${path}: ${issue.message}` : issue.message;\n })\n .join('; ');\n\n/**\n * Parses with `schema`, converting a `ZodError` into a {@link ValidationError}. Use it instead of a\n * bare `schema.parse()` anywhere the value crosses the package boundary — every client input and\n * every response body.\n */\nexport const parseOrThrow = <T extends z.ZodType>(schema: T, value: unknown): z.output<T> => {\n const result = schema.safeParse(value);\n\n if (result.success) return result.data;\n\n throw new ValidationError(formatValidationIssues(result.error.issues), result.error.issues);\n};\n"],"mappings":";;;;;;;;;;;AAYA,IAAa,kBAAb,MAAa,wBAAwB,MAAM;CACzC;CAEA,YAAY,SAAiB,SAA6B,CAAC,GAAG;EAC5D,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,KAAK,SAAS;EACd,OAAO,eAAe,MAAM,gBAAgB,SAAS;CACvD;AACF;AAEA,MAAa,qBAAqB,UAChC,iBAAiB;;;;;;;;;;AAWnB,MAAa,0BAA0B,WACrC,OACG,KAAK,UAAU;CACd,MAAM,OAAO,MAAM,KAAK,KAAK,GAAG;CAIhC,OAAO,OAAO,GAAG,KAAK,IAAI,MAAM,YAAY,MAAM;AACpD,CAAC,CAAC,CACD,KAAK,IAAI;;;;;;AAOd,MAAa,gBAAqC,QAAW,UAAgC;CAC3F,MAAM,SAAS,OAAO,UAAU,KAAK;CAErC,IAAI,OAAO,SAAS,OAAO,OAAO;CAElC,MAAM,IAAI,gBAAgB,uBAAuB,OAAO,MAAM,MAAM,GAAG,OAAO,MAAM,MAAM;AAC5F"}
|
package/dist/ai/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-
|
|
3
|
-
const require_auth = require("../auth-
|
|
2
|
+
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-DhUU3M1W.cjs");
|
|
3
|
+
const require_auth = require("../auth-JQ33o3nU.cjs");
|
|
4
4
|
//#region src/clients/ai/aiClient.ts
|
|
5
5
|
const createAiClient = ({ baseUrl, middlewares, auth }) => {
|
|
6
6
|
const client = require_createOpenapiFetchClient.createOpenapiFetchClient({
|
package/dist/ai/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as DescribeConfigurationVersionBody, f as SuggestComponentBody, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, p as components, r as DescribeConfigurationBody, s as DocsQuestionBody, u as FeedbackBody } from "../types-
|
|
2
|
-
import { n as ClientInitOptions } from "../types-
|
|
1
|
+
import { a as DescribeConfigurationVersionBody, f as SuggestComponentBody, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, p as components, r as DescribeConfigurationBody, s as DocsQuestionBody, u as FeedbackBody } from "../types-52irAt99.cjs";
|
|
2
|
+
import { n as ClientInitOptions } from "../types-_RhBCj4_.cjs";
|
|
3
3
|
//#region src/clients/ai/aiClient.d.ts
|
|
4
4
|
declare const createAiClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
5
5
|
healthCheck: (signal?: AbortSignal) => Promise<{
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as DescribeConfigurationVersionBody, f as SuggestComponentBody, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, p as components, r as DescribeConfigurationBody, s as DocsQuestionBody, u as FeedbackBody } from "../types-
|
|
2
|
-
import { n as ClientInitOptions } from "../types-
|
|
1
|
+
import { a as DescribeConfigurationVersionBody, f as SuggestComponentBody, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, p as components, r as DescribeConfigurationBody, s as DocsQuestionBody, u as FeedbackBody } from "../types-BTWIPEiU.js";
|
|
2
|
+
import { n as ClientInitOptions } from "../types-Ct0YPy2w.js";
|
|
3
3
|
//#region src/clients/ai/aiClient.d.ts
|
|
4
4
|
declare const createAiClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
5
5
|
healthCheck: (signal?: AbortSignal) => Promise<{
|
package/dist/ai/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-
|
|
2
|
-
import { t as createAuthHeaders } from "../auth-
|
|
1
|
+
import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-BVSc9ibR.js";
|
|
2
|
+
import { t as createAuthHeaders } from "../auth-aItmDu45.js";
|
|
3
3
|
//#region src/clients/ai/aiClient.ts
|
|
4
4
|
const createAiClient = ({ baseUrl, middlewares, auth }) => {
|
|
5
5
|
const client = createOpenapiFetchClient({
|
package/dist/ai/types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DescribeConfigurationVersionBody, c as ErrorExplanation, d as ObjectDescription, f as SuggestComponentBody, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, n as ComponentSuggestion, o as DocsAnswer, r as DescribeConfigurationBody, s as DocsQuestionBody, t as ComponentDocsDetail, u as FeedbackBody } from "../types-
|
|
1
|
+
import { a as DescribeConfigurationVersionBody, c as ErrorExplanation, d as ObjectDescription, f as SuggestComponentBody, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, n as ComponentSuggestion, o as DocsAnswer, r as DescribeConfigurationBody, s as DocsQuestionBody, t as ComponentDocsDetail, u as FeedbackBody } from "../types-52irAt99.cjs";
|
|
2
2
|
export { ComponentDocsDetail, ComponentSuggestion, DescribeConfigurationBody, DescribeConfigurationMergeBody, DescribeConfigurationVersionBody, DocsAnswer, DocsQuestionBody, ErrorExplanation, ExplainErrorBody, FeedbackBody, ObjectDescription, SuggestComponentBody };
|
package/dist/ai/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DescribeConfigurationVersionBody, c as ErrorExplanation, d as ObjectDescription, f as SuggestComponentBody, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, n as ComponentSuggestion, o as DocsAnswer, r as DescribeConfigurationBody, s as DocsQuestionBody, t as ComponentDocsDetail, u as FeedbackBody } from "../types-
|
|
1
|
+
import { a as DescribeConfigurationVersionBody, c as ErrorExplanation, d as ObjectDescription, f as SuggestComponentBody, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, n as ComponentSuggestion, o as DocsAnswer, r as DescribeConfigurationBody, s as DocsQuestionBody, t as ComponentDocsDetail, u as FeedbackBody } from "../types-BTWIPEiU.js";
|
|
2
2
|
export { ComponentDocsDetail, ComponentSuggestion, DescribeConfigurationBody, DescribeConfigurationMergeBody, DescribeConfigurationVersionBody, DocsAnswer, DocsQuestionBody, ErrorExplanation, ExplainErrorBody, FeedbackBody, ObjectDescription, SuggestComponentBody };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
|
|
2
2
|
const require_isPlainObject = require("./isPlainObject-BB3iy87C.cjs");
|
|
3
|
-
const require_createFetchClient = require("./createFetchClient-
|
|
3
|
+
const require_createFetchClient = require("./createFetchClient-DgMiqTJ8.cjs");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
zod = require_rolldown_runtime.__toESM(zod, 1);
|
|
6
6
|
let dayjs = require("dayjs");
|
|
@@ -150,4 +150,4 @@ Object.defineProperty(exports, "readAppLogsTail", {
|
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
152
|
|
|
153
|
-
//# sourceMappingURL=appLogs-
|
|
153
|
+
//# sourceMappingURL=appLogs-BjfUoWzs.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appLogs-
|
|
1
|
+
{"version":3,"file":"appLogs-BjfUoWzs.cjs","names":["utc","z","record","isPlainObject","isApiError","HttpStatus","parseContentDispositionHeader","HttpHeader"],"sources":["../src/domain/appLogs.ts"],"sourcesContent":["import dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc.js';\nimport * as z from 'zod';\n\nimport {\n type ApiResponse,\n HttpHeader,\n isApiError,\n parseContentDispositionHeader,\n} from '../fetchClient';\nimport { HttpStatus } from '../internal';\nimport { isPlainObject } from '../utils/isPlainObject';\n\n/**\n * Reading a data app's container output. Shared by the two clients wrapping sandboxes-service —\n * `dataScience` (`/v1`) and `apps` (`/v2`) — which serve the same logs under different paths, so the\n * tail contract (how a line is parsed, where the next poll resumes, and that an idle app is not an\n * error) is defined once here rather than per surface.\n */\n\ndayjs.extend(utc);\n\nexport type LogEntry = {\n timestamp: string | null;\n message: string;\n};\n\nconst DEFAULT_LOGS_FILE_NAME = 'logs.txt';\n\nconst ISO_TIMESTAMP_REGEX = /\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z/;\nconst LEADING_ISO_TIMESTAMP_REGEX = /^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z)\\s?/;\n\n/** The error envelope sandboxes-service returns; the tail branches on its `code`. */\nconst TailError = z.object({\n context: z.object({\n code: z.string(),\n }),\n});\n\n/**\n * There is nothing to read right now, reported per scope: an app whose serving member is asleep\n * answers `apps.appNotRunning`, a deployment that isn't running answers `apps.deploymentNotRunning` —\n * the normal state of a staged or retired one, since a deployment only runs while it is production.\n */\nconst NOTHING_RUNNING_CODES = new Set(['apps.appNotRunning', 'apps.deploymentNotRunning']);\n\nconst tryParseJsonl = (line: string): LogEntry | null => {\n if (!line.startsWith('{')) return null;\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(line);\n } catch {\n return null;\n }\n\n if (typeof parsed !== 'object' || parsed === null) return null;\n\n const record = parsed as Record<string, unknown>;\n const { timestamp, message } = record;\n\n if (typeof timestamp !== 'string' || typeof message !== 'string') return null;\n\n return {\n timestamp,\n message,\n };\n};\n\nconst parsePlainTextLine = (line: string): LogEntry => {\n const match = line.match(LEADING_ISO_TIMESTAMP_REGEX);\n if (match) {\n return { timestamp: match[1]!, message: line.slice(match[0].length) };\n }\n return { timestamp: null, message: line };\n};\n\nexport const parseLogLine = (line: string): LogEntry =>\n tryParseJsonl(line) ?? parsePlainTextLine(line);\n\nconst toLogEntryFromObject = (raw: Record<string, unknown>): LogEntry | null => {\n if (typeof raw.message !== 'string') return null;\n return {\n timestamp: typeof raw.timestamp === 'string' ? raw.timestamp : null,\n message: raw.message,\n };\n};\n\nexport const parseLogLines = (raw: unknown): LogEntry[] => {\n if (raw === null || raw === undefined || raw === '') return [];\n\n if (Array.isArray(raw)) {\n return raw.flatMap((item) => {\n if (typeof item === 'string') return item === '' ? [] : [parseLogLine(item)];\n if (isPlainObject(item)) {\n const entry = toLogEntryFromObject(item);\n return entry ? [entry] : [];\n }\n return [];\n });\n }\n\n if (isPlainObject(raw)) {\n const entry = toLogEntryFromObject(raw);\n return entry ? [entry] : [];\n }\n\n if (typeof raw !== 'string') return [];\n\n const lines = raw.split('\\n');\n const entries: LogEntry[] = [];\n for (const line of lines) {\n if (line === '') continue;\n entries.push(parseLogLine(line));\n }\n return entries;\n};\n\nexport const lastLogTimestamp = (entries: LogEntry[]) => {\n for (let i = entries.length - 1; i >= 0; i--) {\n const entry = entries[i];\n if (!entry) continue;\n if (entry.timestamp) return entry.timestamp;\n\n // A plain-text line may carry a timestamp embedded mid-line (legacy format).\n const match = entry.message.match(ISO_TIMESTAMP_REGEX);\n if (match) return match[0];\n }\n return null;\n};\n\nconst calculateNextLogTimestamp = (timestamp: string | null) => {\n if (timestamp === null) return null;\n return dayjs(timestamp).utc().add(1, 'second').utc().format();\n};\n\n/**\n * The tail plus the timestamp a follow-up poll resumes from. A {@link NOTHING_RUNNING_CODES} `400`\n * reads as an empty tail rather than an error — an idle app between visits, or a deployment that is\n * not the one currently serving, has no logs to stream and that is its normal condition.\n */\nexport const readAppLogsTail = async (fetchTail: () => Promise<ApiResponse<string>>) => {\n try {\n const { data } = await fetchTail();\n const entries = parseLogLines(data);\n\n return {\n entries,\n nextLogTimestamp: calculateNextLogTimestamp(lastLogTimestamp(entries)),\n };\n } catch (error) {\n if (isApiError(error) && error.response.status === HttpStatus.BAD_REQUEST) {\n const code = TailError.safeParse(error.data).data?.context?.code;\n if (code !== undefined && NOTHING_RUNNING_CODES.has(code)) {\n return { entries: [], nextLogTimestamp: null };\n }\n }\n throw error;\n }\n};\n\n/** The whole log as a file download, named by the service's `Content-Disposition` where it sets one. */\nexport const readAppLogsDownload = async (fetchLogs: () => Promise<ApiResponse<string>>) => {\n const { data, response } = await fetchLogs();\n const contentDisposition = parseContentDispositionHeader(\n response.headers.get(HttpHeader.CONTENT_DISPOSITION),\n );\n\n return {\n logs: data,\n fileName: contentDisposition.filename ?? DEFAULT_LOGS_FILE_NAME,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAoBA,MAAA,QAAM,OAAOA,oBAAAA,OAAG;AAOhB,MAAM,yBAAyB;AAE/B,MAAM,sBAAsB;AAC5B,MAAM,8BAA8B;;AAGpC,MAAM,YAAYC,IAAE,OAAO,EACzB,SAASA,IAAE,OAAO,EAChB,MAAMA,IAAE,OAAO,EACjB,CAAC,EACH,CAAC;;;;;;AAOD,MAAM,wCAAwB,IAAI,IAAI,CAAC,sBAAsB,2BAA2B,CAAC;AAEzF,MAAM,iBAAiB,SAAkC;CACvD,IAAI,CAAC,KAAK,WAAW,GAAG,GAAG,OAAO;CAElC,IAAI;CACJ,IAAI;EACF,SAAS,KAAK,MAAM,IAAI;CAC1B,QAAQ;EACN,OAAO;CACT;CAEA,IAAI,OAAO,WAAW,YAAY,WAAW,MAAM,OAAO;CAG1D,MAAM,EAAE,WAAW,YAAYC;CAE/B,IAAI,OAAO,cAAc,YAAY,OAAO,YAAY,UAAU,OAAO;CAEzE,OAAO;EACL;EACA;CACF;AACF;AAEA,MAAM,sBAAsB,SAA2B;CACrD,MAAM,QAAQ,KAAK,MAAM,2BAA2B;CACpD,IAAI,OACF,OAAO;EAAE,WAAW,MAAM;EAAK,SAAS,KAAK,MAAM,MAAM,EAAE,CAAC,MAAM;CAAE;CAEtE,OAAO;EAAE,WAAW;EAAM,SAAS;CAAK;AAC1C;AAEA,MAAa,gBAAgB,SAC3B,cAAc,IAAI,KAAK,mBAAmB,IAAI;AAEhD,MAAM,wBAAwB,QAAkD;CAC9E,IAAI,OAAO,IAAI,YAAY,UAAU,OAAO;CAC5C,OAAO;EACL,WAAW,OAAO,IAAI,cAAc,WAAW,IAAI,YAAY;EAC/D,SAAS,IAAI;CACf;AACF;AAEA,MAAa,iBAAiB,QAA6B;CACzD,IAAI,QAAQ,QAAQ,QAAQ,KAAA,KAAa,QAAQ,IAAI,OAAO,CAAC;CAE7D,IAAI,MAAM,QAAQ,GAAG,GACnB,OAAO,IAAI,SAAS,SAAS;EAC3B,IAAI,OAAO,SAAS,UAAU,OAAO,SAAS,KAAK,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC;EAC3E,IAAIC,sBAAAA,cAAc,IAAI,GAAG;GACvB,MAAM,QAAQ,qBAAqB,IAAI;GACvC,OAAO,QAAQ,CAAC,KAAK,IAAI,CAAC;EAC5B;EACA,OAAO,CAAC;CACV,CAAC;CAGH,IAAIA,sBAAAA,cAAc,GAAG,GAAG;EACtB,MAAM,QAAQ,qBAAqB,GAAG;EACtC,OAAO,QAAQ,CAAC,KAAK,IAAI,CAAC;CAC5B;CAEA,IAAI,OAAO,QAAQ,UAAU,OAAO,CAAC;CAErC,MAAM,QAAQ,IAAI,MAAM,IAAI;CAC5B,MAAM,UAAsB,CAAC;CAC7B,KAAK,MAAM,QAAQ,OAAO;EACxB,IAAI,SAAS,IAAI;EACjB,QAAQ,KAAK,aAAa,IAAI,CAAC;CACjC;CACA,OAAO;AACT;AAEA,MAAa,oBAAoB,YAAwB;CACvD,KAAK,IAAI,IAAI,QAAQ,SAAS,GAAG,KAAK,GAAG,KAAK;EAC5C,MAAM,QAAQ,QAAQ;EACtB,IAAI,CAAC,OAAO;EACZ,IAAI,MAAM,WAAW,OAAO,MAAM;EAGlC,MAAM,QAAQ,MAAM,QAAQ,MAAM,mBAAmB;EACrD,IAAI,OAAO,OAAO,MAAM;CAC1B;CACA,OAAO;AACT;AAEA,MAAM,6BAA6B,cAA6B;CAC9D,IAAI,cAAc,MAAM,OAAO;CAC/B,QAAA,GAAO,MAAA,QAAA,CAAM,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO;AAC9D;;;;;;AAOA,MAAa,kBAAkB,OAAO,cAAkD;CACtF,IAAI;EACF,MAAM,EAAE,SAAS,MAAM,UAAU;EACjC,MAAM,UAAU,cAAc,IAAI;EAElC,OAAO;GACL;GACA,kBAAkB,0BAA0B,iBAAiB,OAAO,CAAC;EACvE;CACF,SAAS,OAAO;EACd,IAAIC,0BAAAA,WAAW,KAAK,KAAK,MAAM,SAAS,WAAWC,0BAAAA,WAAW,aAAa;GACzE,MAAM,OAAO,UAAU,UAAU,MAAM,IAAI,CAAC,CAAC,MAAM,SAAS;GAC5D,IAAI,SAAS,KAAA,KAAa,sBAAsB,IAAI,IAAI,GACtD,OAAO;IAAE,SAAS,CAAC;IAAG,kBAAkB;GAAK;EAEjD;EACA,MAAM;CACR;AACF;;AAGA,MAAa,sBAAsB,OAAO,cAAkD;CAC1F,MAAM,EAAE,MAAM,aAAa,MAAM,UAAU;CAK3C,OAAO;EACL,MAAM;EACN,UANyBC,0BAAAA,8BACzB,SAAS,QAAQ,IAAIC,0BAAAA,WAAW,mBAAmB,CAKxB,CAAC,CAAC,YAAY;CAC3C;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./index-
|
|
1
|
+
import "./index-KuQ79Mnz.js";
|
|
2
2
|
//#region src/domain/appLogs.d.ts
|
|
3
3
|
type LogEntry = {
|
|
4
4
|
timestamp: string | null;
|
|
@@ -7,4 +7,4 @@ type LogEntry = {
|
|
|
7
7
|
declare const parseLogLines: (raw: unknown) => LogEntry[];
|
|
8
8
|
//#endregion
|
|
9
9
|
export { parseLogLines as n, LogEntry as t };
|
|
10
|
-
//# sourceMappingURL=appLogs-
|
|
10
|
+
//# sourceMappingURL=appLogs-Ch7DYpzx.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./index-
|
|
1
|
+
import "./index-V7XKUQm9.cjs";
|
|
2
2
|
//#region src/domain/appLogs.d.ts
|
|
3
3
|
type LogEntry = {
|
|
4
4
|
timestamp: string | null;
|
|
@@ -7,4 +7,4 @@ type LogEntry = {
|
|
|
7
7
|
declare const parseLogLines: (raw: unknown) => LogEntry[];
|
|
8
8
|
//#endregion
|
|
9
9
|
export { parseLogLines as n, LogEntry as t };
|
|
10
|
-
//# sourceMappingURL=appLogs-
|
|
10
|
+
//# sourceMappingURL=appLogs-D5A13Y0y.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as isPlainObject } from "./isPlainObject-LYW-03uB.js";
|
|
2
|
-
import {
|
|
2
|
+
import { f as parseContentDispositionHeader, m as HttpStatus, r as isApiError, s as HttpHeader } from "./createFetchClient-U-ZrwPl2.js";
|
|
3
3
|
import * as z$1 from "zod";
|
|
4
4
|
import dayjs from "dayjs";
|
|
5
5
|
import utc from "dayjs/plugin/utc.js";
|
|
@@ -129,4 +129,4 @@ const readAppLogsDownload = async (fetchLogs) => {
|
|
|
129
129
|
//#endregion
|
|
130
130
|
export { readAppLogsDownload as n, readAppLogsTail as r, parseLogLines as t };
|
|
131
131
|
|
|
132
|
-
//# sourceMappingURL=appLogs-
|
|
132
|
+
//# sourceMappingURL=appLogs-xsVkTriU.js.map
|