@keboola/api-client 0.1.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.
Files changed (265) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +456 -0
  3. package/dist/ai/index.cjs +203 -0
  4. package/dist/ai/index.cjs.map +1 -0
  5. package/dist/ai/index.d.cts +35 -0
  6. package/dist/ai/index.d.ts +35 -0
  7. package/dist/ai/index.js +197 -0
  8. package/dist/ai/index.js.map +1 -0
  9. package/dist/ai/types.cjs +4 -0
  10. package/dist/ai/types.cjs.map +1 -0
  11. package/dist/ai/types.d.cts +2 -0
  12. package/dist/ai/types.d.ts +2 -0
  13. package/dist/ai/types.js +3 -0
  14. package/dist/ai/types.js.map +1 -0
  15. package/dist/assets/index.cjs +182 -0
  16. package/dist/assets/index.cjs.map +1 -0
  17. package/dist/assets/index.d.cts +9 -0
  18. package/dist/assets/index.d.ts +9 -0
  19. package/dist/assets/index.js +176 -0
  20. package/dist/assets/index.js.map +1 -0
  21. package/dist/assets/types.cjs +4 -0
  22. package/dist/assets/types.cjs.map +1 -0
  23. package/dist/assets/types.d.cts +8 -0
  24. package/dist/assets/types.d.ts +8 -0
  25. package/dist/assets/types.js +3 -0
  26. package/dist/assets/types.js.map +1 -0
  27. package/dist/authMiddleware-BTFSCMTE.d.ts +11 -0
  28. package/dist/authMiddleware-BteBe1Bt.d.cts +11 -0
  29. package/dist/chat/index.cjs +428 -0
  30. package/dist/chat/index.cjs.map +1 -0
  31. package/dist/chat/index.d.cts +51 -0
  32. package/dist/chat/index.d.ts +51 -0
  33. package/dist/chat/index.js +422 -0
  34. package/dist/chat/index.js.map +1 -0
  35. package/dist/chat/suggestions.cjs +158 -0
  36. package/dist/chat/suggestions.cjs.map +1 -0
  37. package/dist/chat/suggestions.d.cts +437 -0
  38. package/dist/chat/suggestions.d.ts +437 -0
  39. package/dist/chat/suggestions.js +140 -0
  40. package/dist/chat/suggestions.js.map +1 -0
  41. package/dist/chat/types.cjs +10 -0
  42. package/dist/chat/types.cjs.map +1 -0
  43. package/dist/chat/types.d.cts +3 -0
  44. package/dist/chat/types.d.ts +3 -0
  45. package/dist/chat/types.js +8 -0
  46. package/dist/chat/types.js.map +1 -0
  47. package/dist/createGenericFetchClient-CLUzu-jY.d.cts +18 -0
  48. package/dist/createGenericFetchClient-DEakI3F1.d.ts +18 -0
  49. package/dist/createOpenapiFetchClient-CpXmAIFB.d.cts +24 -0
  50. package/dist/createOpenapiFetchClient-_sm4bchL.d.ts +24 -0
  51. package/dist/dataScience/index.cjs +416 -0
  52. package/dist/dataScience/index.cjs.map +1 -0
  53. package/dist/dataScience/index.d.cts +191 -0
  54. package/dist/dataScience/index.d.ts +191 -0
  55. package/dist/dataScience/index.js +388 -0
  56. package/dist/dataScience/index.js.map +1 -0
  57. package/dist/dataScience/types.cjs +4 -0
  58. package/dist/dataScience/types.cjs.map +1 -0
  59. package/dist/dataScience/types.d.cts +2 -0
  60. package/dist/dataScience/types.d.ts +2 -0
  61. package/dist/dataScience/types.js +3 -0
  62. package/dist/dataScience/types.js.map +1 -0
  63. package/dist/editor/index.cjs +275 -0
  64. package/dist/editor/index.cjs.map +1 -0
  65. package/dist/editor/index.d.cts +172 -0
  66. package/dist/editor/index.d.ts +172 -0
  67. package/dist/editor/index.js +269 -0
  68. package/dist/editor/index.js.map +1 -0
  69. package/dist/editor/types.cjs +4 -0
  70. package/dist/editor/types.cjs.map +1 -0
  71. package/dist/editor/types.d.cts +2 -0
  72. package/dist/editor/types.d.ts +2 -0
  73. package/dist/editor/types.js +3 -0
  74. package/dist/editor/types.js.map +1 -0
  75. package/dist/encryption/index.cjs +192 -0
  76. package/dist/encryption/index.cjs.map +1 -0
  77. package/dist/encryption/index.d.cts +14 -0
  78. package/dist/encryption/index.d.ts +14 -0
  79. package/dist/encryption/index.js +186 -0
  80. package/dist/encryption/index.js.map +1 -0
  81. package/dist/encryption/types.cjs +4 -0
  82. package/dist/encryption/types.cjs.map +1 -0
  83. package/dist/encryption/types.d.cts +8 -0
  84. package/dist/encryption/types.d.ts +8 -0
  85. package/dist/encryption/types.js +3 -0
  86. package/dist/encryption/types.js.map +1 -0
  87. package/dist/import/index.cjs +198 -0
  88. package/dist/import/index.cjs.map +1 -0
  89. package/dist/import/index.d.cts +9 -0
  90. package/dist/import/index.d.ts +9 -0
  91. package/dist/import/index.js +192 -0
  92. package/dist/import/index.js.map +1 -0
  93. package/dist/index.cjs +3910 -0
  94. package/dist/index.cjs.map +1 -0
  95. package/dist/index.d.cts +3108 -0
  96. package/dist/index.d.ts +3108 -0
  97. package/dist/index.js +3858 -0
  98. package/dist/index.js.map +1 -0
  99. package/dist/keboolaUID-D1DGSbge.d.cts +19 -0
  100. package/dist/keboolaUID-D1DGSbge.d.ts +19 -0
  101. package/dist/management/index.cjs +872 -0
  102. package/dist/management/index.cjs.map +1 -0
  103. package/dist/management/index.d.cts +440 -0
  104. package/dist/management/index.d.ts +440 -0
  105. package/dist/management/index.js +865 -0
  106. package/dist/management/index.js.map +1 -0
  107. package/dist/management/types.cjs +4 -0
  108. package/dist/management/types.cjs.map +1 -0
  109. package/dist/management/types.d.cts +9 -0
  110. package/dist/management/types.d.ts +9 -0
  111. package/dist/management/types.js +3 -0
  112. package/dist/management/types.js.map +1 -0
  113. package/dist/metastore/index.cjs +339 -0
  114. package/dist/metastore/index.cjs.map +1 -0
  115. package/dist/metastore/index.d.cts +52 -0
  116. package/dist/metastore/index.d.ts +52 -0
  117. package/dist/metastore/index.js +333 -0
  118. package/dist/metastore/index.js.map +1 -0
  119. package/dist/metastore/types.cjs +4 -0
  120. package/dist/metastore/types.cjs.map +1 -0
  121. package/dist/metastore/types.d.cts +2 -0
  122. package/dist/metastore/types.d.ts +2 -0
  123. package/dist/metastore/types.js +3 -0
  124. package/dist/metastore/types.js.map +1 -0
  125. package/dist/queryService/index.cjs +250 -0
  126. package/dist/queryService/index.cjs.map +1 -0
  127. package/dist/queryService/index.d.cts +39 -0
  128. package/dist/queryService/index.d.ts +39 -0
  129. package/dist/queryService/index.js +244 -0
  130. package/dist/queryService/index.js.map +1 -0
  131. package/dist/queryService/types.cjs +4 -0
  132. package/dist/queryService/types.cjs.map +1 -0
  133. package/dist/queryService/types.d.cts +2 -0
  134. package/dist/queryService/types.d.ts +2 -0
  135. package/dist/queryService/types.js +3 -0
  136. package/dist/queryService/types.js.map +1 -0
  137. package/dist/queue/index.cjs +192 -0
  138. package/dist/queue/index.cjs.map +1 -0
  139. package/dist/queue/index.d.cts +133 -0
  140. package/dist/queue/index.d.ts +133 -0
  141. package/dist/queue/index.js +186 -0
  142. package/dist/queue/index.js.map +1 -0
  143. package/dist/queue/types.cjs +4 -0
  144. package/dist/queue/types.cjs.map +1 -0
  145. package/dist/queue/types.d.cts +2 -0
  146. package/dist/queue/types.d.ts +2 -0
  147. package/dist/queue/types.js +3 -0
  148. package/dist/queue/types.js.map +1 -0
  149. package/dist/sdk/storage/index.cjs +96 -0
  150. package/dist/sdk/storage/index.cjs.map +1 -0
  151. package/dist/sdk/storage/index.d.cts +24 -0
  152. package/dist/sdk/storage/index.d.ts +24 -0
  153. package/dist/sdk/storage/index.js +94 -0
  154. package/dist/sdk/storage/index.js.map +1 -0
  155. package/dist/sdk/tag/index.cjs +210 -0
  156. package/dist/sdk/tag/index.cjs.map +1 -0
  157. package/dist/sdk/tag/index.d.cts +25 -0
  158. package/dist/sdk/tag/index.d.ts +25 -0
  159. package/dist/sdk/tag/index.js +208 -0
  160. package/dist/sdk/tag/index.js.map +1 -0
  161. package/dist/sdk/tag/types.cjs +4 -0
  162. package/dist/sdk/tag/types.cjs.map +1 -0
  163. package/dist/sdk/tag/types.d.cts +30 -0
  164. package/dist/sdk/tag/types.d.ts +30 -0
  165. package/dist/sdk/tag/types.js +3 -0
  166. package/dist/sdk/tag/types.js.map +1 -0
  167. package/dist/status/index.cjs +178 -0
  168. package/dist/status/index.cjs.map +1 -0
  169. package/dist/status/index.d.cts +10 -0
  170. package/dist/status/index.d.ts +10 -0
  171. package/dist/status/index.js +172 -0
  172. package/dist/status/index.js.map +1 -0
  173. package/dist/status/types.cjs +4 -0
  174. package/dist/status/types.cjs.map +1 -0
  175. package/dist/status/types.d.cts +19 -0
  176. package/dist/status/types.d.ts +19 -0
  177. package/dist/status/types.js +3 -0
  178. package/dist/status/types.js.map +1 -0
  179. package/dist/storage/index.cjs +1021 -0
  180. package/dist/storage/index.cjs.map +1 -0
  181. package/dist/storage/index.d.cts +12 -0
  182. package/dist/storage/index.d.ts +12 -0
  183. package/dist/storage/index.js +1014 -0
  184. package/dist/storage/index.js.map +1 -0
  185. package/dist/storage/types.cjs +4 -0
  186. package/dist/storage/types.cjs.map +1 -0
  187. package/dist/storage/types.d.cts +10976 -0
  188. package/dist/storage/types.d.ts +10976 -0
  189. package/dist/storage/types.js +3 -0
  190. package/dist/storage/types.js.map +1 -0
  191. package/dist/storageClient-DPLh_p0V.d.cts +608 -0
  192. package/dist/storageClient-YVWer22Y.d.ts +608 -0
  193. package/dist/syncActions/index.cjs +366 -0
  194. package/dist/syncActions/index.cjs.map +1 -0
  195. package/dist/syncActions/index.d.cts +94 -0
  196. package/dist/syncActions/index.d.ts +94 -0
  197. package/dist/syncActions/index.js +341 -0
  198. package/dist/syncActions/index.js.map +1 -0
  199. package/dist/syncActions/types.cjs +4 -0
  200. package/dist/syncActions/types.cjs.map +1 -0
  201. package/dist/syncActions/types.d.cts +261 -0
  202. package/dist/syncActions/types.d.ts +261 -0
  203. package/dist/syncActions/types.js +3 -0
  204. package/dist/syncActions/types.js.map +1 -0
  205. package/dist/telemetry/index.cjs +189 -0
  206. package/dist/telemetry/index.cjs.map +1 -0
  207. package/dist/telemetry/index.d.cts +13 -0
  208. package/dist/telemetry/index.d.ts +13 -0
  209. package/dist/telemetry/index.js +183 -0
  210. package/dist/telemetry/index.js.map +1 -0
  211. package/dist/telemetry/types.cjs +4 -0
  212. package/dist/telemetry/types.cjs.map +1 -0
  213. package/dist/telemetry/types.d.cts +12 -0
  214. package/dist/telemetry/types.d.ts +12 -0
  215. package/dist/telemetry/types.js +3 -0
  216. package/dist/telemetry/types.js.map +1 -0
  217. package/dist/types-B51cQMrX.d.ts +1408 -0
  218. package/dist/types-B7k8S4ki.d.ts +1520 -0
  219. package/dist/types-BNQK_jR_.d.cts +1520 -0
  220. package/dist/types-BY0tjg2Q.d.ts +1079 -0
  221. package/dist/types-BeShtGlc.d.cts +8591 -0
  222. package/dist/types-BeShtGlc.d.ts +8591 -0
  223. package/dist/types-BjrNNn5I.d.ts +1643 -0
  224. package/dist/types-C-bd4ArM.d.cts +1079 -0
  225. package/dist/types-C7mpAfq-.d.cts +64 -0
  226. package/dist/types-C7mpAfq-.d.ts +64 -0
  227. package/dist/types-CGMJT3JL.d.ts +943 -0
  228. package/dist/types-CRSKcua9.d.cts +1314 -0
  229. package/dist/types-DJ6nbNq5.d.cts +1643 -0
  230. package/dist/types-DJkU9gvB.d.cts +943 -0
  231. package/dist/types-DYMMsuU0.d.cts +78 -0
  232. package/dist/types-DYMMsuU0.d.ts +78 -0
  233. package/dist/types-Dg1tEsVR.d.cts +17 -0
  234. package/dist/types-Dg1tEsVR.d.ts +17 -0
  235. package/dist/types-DgaMV8FF.d.cts +60 -0
  236. package/dist/types-DgaMV8FF.d.ts +60 -0
  237. package/dist/types-Dws8mFNY.d.cts +1408 -0
  238. package/dist/types-cH0_hkCW.d.ts +1314 -0
  239. package/dist/utils-BNQZiNOu.d.ts +1657 -0
  240. package/dist/utils-DE09pDTi.d.cts +1657 -0
  241. package/dist/vault/index.cjs +225 -0
  242. package/dist/vault/index.cjs.map +1 -0
  243. package/dist/vault/index.d.cts +26 -0
  244. package/dist/vault/index.d.ts +26 -0
  245. package/dist/vault/index.js +219 -0
  246. package/dist/vault/index.js.map +1 -0
  247. package/dist/vault/types.cjs +4 -0
  248. package/dist/vault/types.cjs.map +1 -0
  249. package/dist/vault/types.d.cts +390 -0
  250. package/dist/vault/types.d.ts +390 -0
  251. package/dist/vault/types.js +3 -0
  252. package/dist/vault/types.js.map +1 -0
  253. package/dist/verify/index.cjs +190 -0
  254. package/dist/verify/index.cjs.map +1 -0
  255. package/dist/verify/index.d.cts +9 -0
  256. package/dist/verify/index.d.ts +9 -0
  257. package/dist/verify/index.js +184 -0
  258. package/dist/verify/index.js.map +1 -0
  259. package/dist/verify/types.cjs +4 -0
  260. package/dist/verify/types.cjs.map +1 -0
  261. package/dist/verify/types.d.cts +29 -0
  262. package/dist/verify/types.d.ts +29 -0
  263. package/dist/verify/types.js +3 -0
  264. package/dist/verify/types.js.map +1 -0
  265. package/package.json +570 -0
@@ -0,0 +1,3108 @@
1
+ import { G as GetAllFeaturesQuery, F as Feature, c as components$5, C as CreateMaintainerBody, U as UpdateMaintainerBody, M as MaintainerUser, A as AddMaintainerUserBody, a as CreateMaintainerInvitationBody, b as CreateMaintainerOrganizationBody, d as MetadataItem, S as SetMaintainerMetadataBody, e as UpdateOrganizationBody, f as AddOrganizationUserBody, g as CreateOrganizationInvitationBody, P as Project, h as CreateOrganizationProjectBody, i as SetOrganizationMetadataBody, j as GetProjectPath, k as CreateProjectFeaturePath, l as CreateProjectFeatureBody, R as RemoveProjectFeaturePath, m as User, L as ListProjectUsersPath, n as GetProjectMetadataPath, o as ProjectMetadataItem, p as SetProjectMetadataPath, q as SetProjectMetadataBody, r as GetProjectReviewersPath, s as Reviewer, t as SetProjectReviewersPath, u as SetProjectReviewersBody, v as AddUserFeatureBody, w as AddUserFeaturePath, x as RemoveUserFeaturePath } from './types-BeShtGlc.cjs';
2
+ import { M as MiddlewareFn, B as BaseClientOptions, A as ApiResponse, H as HttpMethod } from './types-DgaMV8FF.cjs';
3
+ export { c as ApiError, d as CreateCallbackMiddlewareOptions, e as FetchClientError, i as isAbortError, f as isApiError, g as isFetchClientError } from './types-DgaMV8FF.cjs';
4
+ import { StatusSummary } from './status/types.cjs';
5
+ import { Post } from './assets/types.cjs';
6
+ import * as zod from 'zod';
7
+ import { c as OpenapiQueryType, d as OpenapiPathType, b as OpenapiBodyType, a as OpenapiReturnType } from './types-C7mpAfq-.cjs';
8
+ import { U as UploadFileParams, a as UploadedFile } from './types-Dg1tEsVR.cjs';
9
+ import { D as DescribeConfigurationVersionBody, a as DescribeConfigurationMergeBody, E as ExplainErrorBody, b as DescribeConfigurationBody, S as SuggestComponentBody, c as components$4, F as FeedbackBody } from './types-Dws8mFNY.cjs';
10
+ import { SuggestionsRequestBody, SuggestionsApiResponse } from './chat/suggestions.cjs';
11
+ import { G as GetHistoryQuery$1, c as components$3, a as GetChatPath$1, C as ChatRequest$1, b as GetVotesQuery$1, V as VoteRequest$1, U as UsageResponse$1, A as AgentSettings, d as UpdateAgentSettingsRequest, e as UserAgentSettings, f as UpdateUserAgentSettingsRequest, T as ToolsListResponse } from './types-DJ6nbNq5.cjs';
12
+ import { G as GetQueueJobPath, c as components$2, S as SearchJobsQuery } from './types-CRSKcua9.cjs';
13
+ import { P as PostQueryPath, a as PostQueryBody, b as PostCancelQueryJobPath, G as GetQueryJobPath, c as components$1, d as GetQueryResultsPath, e as GetQueryResutsQuery, f as GetQueriesPath, g as GetQueriesHistoryQuery, h as GetExportResultsQuery, E as ExportResultsResponse } from './types-DJkU9gvB.cjs';
14
+ import { CreateCredentialsBody, WorkspaceData } from './telemetry/types.cjs';
15
+ import { EnrollMFAInput, GetDataAppPublicGitRepositoryInput, GetDataAppPasswordPrivateGitRepositoryInput, GetDataAppSSHKeyPrivateGitRepositoryInput, GetPublicGitRepositoryInput, GetGitPrivateRepositoryInput } from './syncActions/types.cjs';
16
+ import { C as CreateSqlSessionBody, G as GetSqlSessionPath, a as GetSqlSessionsQuery, b as GetSqlSessionSchemaPath, c as GetSqlSessionSchemaQuery, d as components, P as PostSqlRunQueryPath, e as PostSqlRunQueryBody, f as PostSqlTablePreviewPath, g as PostSqlTablePreviewBody, h as GetSqlSessionTableDdlPath, i as GetSqlSessionTableDdlQuery, j as PostSqlSessionLoadPath, k as PostSqlSessionLoadBody, l as PostSqlSessionUnloadPath, m as PostSqlSessionUnloadBody } from './types-BNQK_jR_.cjs';
17
+ import { EncryptQuery } from './encryption/types.cjs';
18
+ import { G as GetDataAppRunsPath, a as GetDataAppRunsQuery, b as GetDataAppRunPath, c as GetDataAppLogsDownloadPath, d as GetDataAppLogsTailPath, e as GetDataAppLogsTailQuery, L as LogEntry, f as GetAppsQuery, g as GetDataAppPath, C as CreateDataAppBody, P as PatchDataAppPath, h as PatchDataAppBody, D as DeleteDataAppPath, i as GetDataAppPasswordPath, R as ResetDataAppPasswordPath, j as GetSandboxPath } from './utils-DE09pDTi.cjs';
19
+ export { p as parseLogLines } from './utils-DE09pDTi.cjs';
20
+ import { CreateVariableBody, DeleteVariablePath, VariableWithHash, GetVariablesQuery, GetVariablesByBranchId } from './vault/types.cjs';
21
+ import { ServiceId, CreateTableAsyncBody, TableCreateJob, TableImportAsyncBody, TableImportJob, TableExportAsyncBody, TableExportJob, Service, StackComponent, GetBucketsQuery, Bucket, BucketDetail, CreateBucketBody, UpdateBucketBody, CreateScheduledRefreshPath, CreateScheduledRefreshBody, ScheduledTask, GetEventsQuery, StorageEvent, CreateEventBody, File as File$1, GetFilesQuery, DeleteFileTagPath, PrepareFileBody, PreparedFile, GetTablesQuery, Table, TableDetail, GetDataPreview, PrevieData, DeleteTableRows, JobUnion, DevBranch, CreateDevBranchJobBody, DevBranchPath, BranchMetadata, BranchMetadataEntry, WorkspacePath, Workspace, WorkspacesPath, ResetWorkspacePassword, SetWorkspacePublicInput, GetWorkspaceSaml2LoginPath, WorkspaceSaml2Login, WorkspaceObject, DeleteWorkspaceObjectInput, MergeRequestDetail, MergeRequestDetailWithActivityLog, CreateMergeRequestParams, UpdateMergeRequestParams, JobOperation, GetJobPath, Job, GetJobsQuery, GetComponentPath, Component, GetComponentsPath, GetComponentsQuery, GetSearchComponentConfigurationsPath, SearchComponentConfigurationsQuery, SearchComponentConfiguration, PartialKey, CreateConfigurationInput, BaseComponentConfig, ConfigType, ConfigurationPath, ComponentConfig, GetConfigurationsPath, CreateConfigurationRowInput, Row, CreateConfigurationRowsInput, CreateConfigurationRowBody, DeleteConfigurationRowInput, DeleteConfigurationRowsInput, CreateConfigurationWorkspaceBody, ConfigurationUseCaseType, ConfigurationVersionPath, ConfigurationVersion, ConfigurationVersionDetailPath, ConfigurationVersionDetail, GetStackInfoQuery, StackInfo } from './storage/types.cjs';
22
+ import { M as MetaObject } from './types-C-bd4ArM.cjs';
23
+ import { C as ConcurrentOptions, M as MiddlewareFn$1 } from './storageClient-DPLh_p0V.cjs';
24
+ export { a as concurrent } from './storageClient-DPLh_p0V.cjs';
25
+ import { K as KeboolaObjectId } from './keboolaUID-D1DGSbge.cjs';
26
+ export { k as keboolaUID } from './keboolaUID-D1DGSbge.cjs';
27
+ import { TagWithBindings, TagData, CreateMetaObjectMetaDataInput, UpdateMetaObjectMetaDataInput } from './sdk/tag/types.cjs';
28
+ import { B as Backend, S as StorageToken } from './types-DYMMsuU0.cjs';
29
+ export { c as createGenericFetchClient } from './createGenericFetchClient-CLUzu-jY.cjs';
30
+ export { M as ManagementClientAuthError, i as isManagementClientAuthError } from './authMiddleware-BteBe1Bt.cjs';
31
+ import { ManagementToken } from './verify/types.cjs';
32
+ export { createStorageSdk } from './sdk/storage/index.cjs';
33
+ import 'qs';
34
+ import './createOpenapiFetchClient-CpXmAIFB.cjs';
35
+ import './metastore/index.cjs';
36
+
37
+ declare class UserError extends Error {
38
+ constructor(message: string);
39
+ }
40
+
41
+ declare class ServiceUnavailableError extends Error {
42
+ constructor(serviceId: string, path: string[], clientName: string);
43
+ }
44
+
45
+ declare const HttpHeader: {
46
+ CONTENT_TYPE: string;
47
+ CONTENT_DISPOSITION: string;
48
+ };
49
+ declare const HttpContentType: {
50
+ JSON: string;
51
+ TEXT_PLAIN: string;
52
+ FORM_DATA: string;
53
+ TEXT_HTML: string;
54
+ };
55
+
56
+ /**
57
+ * This file was auto-generated by openapi-typescript.
58
+ * Do not make direct changes to the file.
59
+ */
60
+
61
+ type paths = {
62
+ '/ping': {
63
+ parameters: {
64
+ query?: never;
65
+ header?: never;
66
+ path?: never;
67
+ cookie?: never;
68
+ };
69
+ /** Readiness probe */
70
+ get: {
71
+ parameters: {
72
+ query?: never;
73
+ header?: never;
74
+ path?: never;
75
+ cookie?: never;
76
+ };
77
+ requestBody?: never;
78
+ responses: {
79
+ /** @description Server is ready */
80
+ 200: {
81
+ headers: {
82
+ [name: string]: unknown;
83
+ };
84
+ content: {
85
+ 'application/json': {
86
+ /** Format: date-time */
87
+ timestamp: string;
88
+ };
89
+ };
90
+ };
91
+ };
92
+ };
93
+ put?: never;
94
+ post?: never;
95
+ delete?: never;
96
+ options?: never;
97
+ head?: never;
98
+ patch?: never;
99
+ trace?: never;
100
+ };
101
+ '/api': {
102
+ parameters: {
103
+ query?: never;
104
+ header?: never;
105
+ path?: never;
106
+ cookie?: never;
107
+ };
108
+ /** Application info and health status */
109
+ get: {
110
+ parameters: {
111
+ query?: never;
112
+ header?: never;
113
+ path?: never;
114
+ cookie?: never;
115
+ };
116
+ requestBody?: never;
117
+ responses: {
118
+ /** @description Application info */
119
+ 200: {
120
+ headers: {
121
+ [name: string]: unknown;
122
+ };
123
+ content: {
124
+ 'application/json': {
125
+ /** Format: date-time */
126
+ timestamp: string;
127
+ uptime: number;
128
+ appName: string;
129
+ appVersion: string;
130
+ serverVersion: string;
131
+ connectedMcp: {
132
+ url: string;
133
+ /** @enum {string} */
134
+ status: 'ok' | 'error';
135
+ details?: unknown;
136
+ error?: string;
137
+ };
138
+ };
139
+ };
140
+ };
141
+ };
142
+ };
143
+ put?: never;
144
+ post?: never;
145
+ delete?: never;
146
+ options?: never;
147
+ head?: never;
148
+ patch?: never;
149
+ trace?: never;
150
+ };
151
+ '/api/history': {
152
+ parameters: {
153
+ query?: never;
154
+ header?: never;
155
+ path?: never;
156
+ cookie?: never;
157
+ };
158
+ /**
159
+ * Get chat history
160
+ * @description Retrieve paginated list of user's chats
161
+ */
162
+ get: {
163
+ parameters: {
164
+ query?: {
165
+ limit?: number;
166
+ starting_after?: string;
167
+ ending_before?: string;
168
+ };
169
+ header?: never;
170
+ path?: never;
171
+ cookie?: never;
172
+ };
173
+ requestBody?: never;
174
+ responses: {
175
+ /** @description List of chats with pagination info */
176
+ 200: {
177
+ headers: {
178
+ [name: string]: unknown;
179
+ };
180
+ content: {
181
+ 'application/json': {
182
+ chats: {
183
+ /** Format: uuid */
184
+ id: string;
185
+ title: string;
186
+ userId: string;
187
+ /** Format: date-time */
188
+ createdAt: string;
189
+ /**
190
+ * Format: date-time
191
+ * @description Timestamp of the last message in this chat
192
+ */
193
+ lastMessageAt: string;
194
+ /** @enum {string} */
195
+ visibility: 'public' | 'private';
196
+ branchId?: number | null;
197
+ }[];
198
+ hasMore: boolean;
199
+ };
200
+ };
201
+ };
202
+ /** @description Bad request */
203
+ 400: {
204
+ headers: {
205
+ [name: string]: unknown;
206
+ };
207
+ content: {
208
+ 'application/json': {
209
+ error: {
210
+ type: string;
211
+ surface: string;
212
+ message: string;
213
+ };
214
+ };
215
+ };
216
+ };
217
+ /** @description Unauthorized */
218
+ 401: {
219
+ headers: {
220
+ [name: string]: unknown;
221
+ };
222
+ content: {
223
+ 'application/json': {
224
+ error: {
225
+ type: string;
226
+ surface: string;
227
+ message: string;
228
+ };
229
+ };
230
+ };
231
+ };
232
+ };
233
+ };
234
+ put?: never;
235
+ post?: never;
236
+ delete?: never;
237
+ options?: never;
238
+ head?: never;
239
+ patch?: never;
240
+ trace?: never;
241
+ };
242
+ '/api/chat': {
243
+ parameters: {
244
+ query?: never;
245
+ header?: never;
246
+ path?: never;
247
+ cookie?: never;
248
+ };
249
+ get?: never;
250
+ put?: never;
251
+ /**
252
+ * Send a message and get streaming SSE response
253
+ * @description Send a user message to the chat and receive a streaming Server-Sent Events response
254
+ */
255
+ post: {
256
+ parameters: {
257
+ query?: never;
258
+ header?: never;
259
+ path?: never;
260
+ cookie?: never;
261
+ };
262
+ requestBody?: {
263
+ content: {
264
+ 'application/json': {
265
+ /** Format: uuid */
266
+ id: string;
267
+ message: {
268
+ /** Format: uuid */
269
+ id: string;
270
+ /** @enum {string} */
271
+ role: 'user' | 'assistant';
272
+ parts: {
273
+ [key: string]: unknown;
274
+ }[];
275
+ metadata?: {
276
+ hidden?: boolean;
277
+ requestContext?: {
278
+ path?: string;
279
+ };
280
+ };
281
+ };
282
+ selectedChatModel?: string;
283
+ /** @enum {string} */
284
+ selectedVisibilityType?: 'public' | 'private';
285
+ branchId?: number;
286
+ telemetryMetadata?: {
287
+ [key: string]: string | number | boolean;
288
+ };
289
+ };
290
+ };
291
+ };
292
+ responses: {
293
+ /** @description SSE stream of chat events */
294
+ 200: {
295
+ headers: {
296
+ [name: string]: unknown;
297
+ };
298
+ content: {
299
+ 'text/event-stream': unknown;
300
+ };
301
+ };
302
+ /** @description Bad request */
303
+ 400: {
304
+ headers: {
305
+ [name: string]: unknown;
306
+ };
307
+ content: {
308
+ 'application/json': {
309
+ error: {
310
+ type: string;
311
+ surface: string;
312
+ message: string;
313
+ };
314
+ };
315
+ };
316
+ };
317
+ /** @description Unauthorized */
318
+ 401: {
319
+ headers: {
320
+ [name: string]: unknown;
321
+ };
322
+ content: {
323
+ 'application/json': {
324
+ error: {
325
+ type: string;
326
+ surface: string;
327
+ message: string;
328
+ };
329
+ };
330
+ };
331
+ };
332
+ /** @description Rate limit exceeded */
333
+ 429: {
334
+ headers: {
335
+ [name: string]: unknown;
336
+ };
337
+ content: {
338
+ 'application/json': {
339
+ error: {
340
+ type: string;
341
+ surface: string;
342
+ message: string;
343
+ };
344
+ };
345
+ };
346
+ };
347
+ };
348
+ };
349
+ /**
350
+ * Delete a chat
351
+ * @description Delete a chat by ID
352
+ */
353
+ delete: {
354
+ parameters: {
355
+ query: {
356
+ id: string;
357
+ };
358
+ header?: never;
359
+ path?: never;
360
+ cookie?: never;
361
+ };
362
+ requestBody?: never;
363
+ responses: {
364
+ /** @description Chat deleted successfully */
365
+ 200: {
366
+ headers: {
367
+ [name: string]: unknown;
368
+ };
369
+ content: {
370
+ 'application/json': {
371
+ /** Format: uuid */
372
+ id: string;
373
+ title: string;
374
+ userId: string;
375
+ /** Format: date-time */
376
+ createdAt: string;
377
+ /**
378
+ * Format: date-time
379
+ * @description Timestamp of the last message in this chat
380
+ */
381
+ lastMessageAt: string;
382
+ /** @enum {string} */
383
+ visibility: 'public' | 'private';
384
+ branchId?: number | null;
385
+ };
386
+ };
387
+ };
388
+ /** @description Bad request */
389
+ 400: {
390
+ headers: {
391
+ [name: string]: unknown;
392
+ };
393
+ content: {
394
+ 'application/json': {
395
+ error: {
396
+ type: string;
397
+ surface: string;
398
+ message: string;
399
+ };
400
+ };
401
+ };
402
+ };
403
+ /** @description Unauthorized */
404
+ 401: {
405
+ headers: {
406
+ [name: string]: unknown;
407
+ };
408
+ content: {
409
+ 'application/json': {
410
+ error: {
411
+ type: string;
412
+ surface: string;
413
+ message: string;
414
+ };
415
+ };
416
+ };
417
+ };
418
+ /** @description Forbidden */
419
+ 403: {
420
+ headers: {
421
+ [name: string]: unknown;
422
+ };
423
+ content: {
424
+ 'application/json': {
425
+ error: {
426
+ type: string;
427
+ surface: string;
428
+ message: string;
429
+ };
430
+ };
431
+ };
432
+ };
433
+ };
434
+ };
435
+ options?: never;
436
+ head?: never;
437
+ patch?: never;
438
+ trace?: never;
439
+ };
440
+ '/api/chat/{id}': {
441
+ parameters: {
442
+ query?: never;
443
+ header?: never;
444
+ path?: never;
445
+ cookie?: never;
446
+ };
447
+ /**
448
+ * Get chat details and message history
449
+ * @description Retrieve complete chat details including all messages in the conversation
450
+ */
451
+ get: {
452
+ parameters: {
453
+ query?: never;
454
+ header?: never;
455
+ path: {
456
+ id: string;
457
+ };
458
+ cookie?: never;
459
+ };
460
+ requestBody?: never;
461
+ responses: {
462
+ /** @description Chat details with message history */
463
+ 200: {
464
+ headers: {
465
+ [name: string]: unknown;
466
+ };
467
+ content: {
468
+ 'application/json': {
469
+ /** Format: uuid */
470
+ id: string;
471
+ title: string;
472
+ userId: string;
473
+ /** Format: date-time */
474
+ createdAt: string;
475
+ /**
476
+ * Format: date-time
477
+ * @description Timestamp of the last message in this chat
478
+ */
479
+ lastMessageAt: string;
480
+ /** @enum {string} */
481
+ visibility: 'public' | 'private';
482
+ branchId?: number | null;
483
+ messages: {
484
+ /** Format: uuid */
485
+ id: string;
486
+ /** @enum {string} */
487
+ role: 'user' | 'assistant';
488
+ parts: (
489
+ | {
490
+ /** @enum {string} */
491
+ type: 'text';
492
+ text: string;
493
+ /** @enum {string} */
494
+ state?: 'done';
495
+ }
496
+ | {
497
+ /** @enum {string} */
498
+ type: 'tool-result';
499
+ toolCallId: string;
500
+ toolName: string;
501
+ result: string;
502
+ }
503
+ | {
504
+ /** @enum {string} */
505
+ type: 'step-start';
506
+ }
507
+ | {
508
+ type: string;
509
+ toolCallId: string;
510
+ /** @enum {string} */
511
+ state: 'output-available' | 'input-available' | 'input-streaming';
512
+ input?: {
513
+ [key: string]: unknown;
514
+ };
515
+ output?: unknown;
516
+ }
517
+ )[];
518
+ metadata?: {
519
+ /** Format: date-time */
520
+ createdAt?: string;
521
+ hidden?: boolean;
522
+ requestContext?: {
523
+ path?: string;
524
+ };
525
+ /** Format: uuid */
526
+ compactedTo?: string;
527
+ /** Format: uuid */
528
+ compactedFrom?: string;
529
+ };
530
+ /** @enum {string} */
531
+ status?: 'pending' | 'completed' | 'interrupted' | 'failed';
532
+ }[];
533
+ };
534
+ };
535
+ };
536
+ /** @description Bad request */
537
+ 400: {
538
+ headers: {
539
+ [name: string]: unknown;
540
+ };
541
+ content: {
542
+ 'application/json': {
543
+ error: {
544
+ type: string;
545
+ surface: string;
546
+ message: string;
547
+ };
548
+ };
549
+ };
550
+ };
551
+ /** @description Unauthorized */
552
+ 401: {
553
+ headers: {
554
+ [name: string]: unknown;
555
+ };
556
+ content: {
557
+ 'application/json': {
558
+ error: {
559
+ type: string;
560
+ surface: string;
561
+ message: string;
562
+ };
563
+ };
564
+ };
565
+ };
566
+ /** @description Forbidden */
567
+ 403: {
568
+ headers: {
569
+ [name: string]: unknown;
570
+ };
571
+ content: {
572
+ 'application/json': {
573
+ error: {
574
+ type: string;
575
+ surface: string;
576
+ message: string;
577
+ };
578
+ };
579
+ };
580
+ };
581
+ /** @description Chat not found */
582
+ 404: {
583
+ headers: {
584
+ [name: string]: unknown;
585
+ };
586
+ content: {
587
+ 'application/json': {
588
+ error: {
589
+ type: string;
590
+ surface: string;
591
+ message: string;
592
+ };
593
+ };
594
+ };
595
+ };
596
+ };
597
+ };
598
+ put?: never;
599
+ post?: never;
600
+ delete?: never;
601
+ options?: never;
602
+ head?: never;
603
+ patch?: never;
604
+ trace?: never;
605
+ };
606
+ '/api/vote': {
607
+ parameters: {
608
+ query?: never;
609
+ header?: never;
610
+ path?: never;
611
+ cookie?: never;
612
+ };
613
+ /**
614
+ * Get votes for a chat
615
+ * @description Retrieve all votes for messages in a specific chat
616
+ */
617
+ get: {
618
+ parameters: {
619
+ query: {
620
+ chatId: string;
621
+ };
622
+ header?: never;
623
+ path?: never;
624
+ cookie?: never;
625
+ };
626
+ requestBody?: never;
627
+ responses: {
628
+ /** @description List of votes */
629
+ 200: {
630
+ headers: {
631
+ [name: string]: unknown;
632
+ };
633
+ content: {
634
+ 'application/json': {
635
+ /** Format: uuid */
636
+ chatId: string;
637
+ /** Format: uuid */
638
+ messageId: string;
639
+ isUpvoted: boolean;
640
+ }[];
641
+ };
642
+ };
643
+ /** @description Bad request */
644
+ 400: {
645
+ headers: {
646
+ [name: string]: unknown;
647
+ };
648
+ content: {
649
+ 'application/json': {
650
+ error: {
651
+ type: string;
652
+ surface: string;
653
+ message: string;
654
+ };
655
+ };
656
+ };
657
+ };
658
+ /** @description Unauthorized */
659
+ 401: {
660
+ headers: {
661
+ [name: string]: unknown;
662
+ };
663
+ content: {
664
+ 'application/json': {
665
+ error: {
666
+ type: string;
667
+ surface: string;
668
+ message: string;
669
+ };
670
+ };
671
+ };
672
+ };
673
+ /** @description Forbidden */
674
+ 403: {
675
+ headers: {
676
+ [name: string]: unknown;
677
+ };
678
+ content: {
679
+ 'application/json': {
680
+ error: {
681
+ type: string;
682
+ surface: string;
683
+ message: string;
684
+ };
685
+ };
686
+ };
687
+ };
688
+ /** @description Chat not found */
689
+ 404: {
690
+ headers: {
691
+ [name: string]: unknown;
692
+ };
693
+ content: {
694
+ 'application/json': {
695
+ error: {
696
+ type: string;
697
+ surface: string;
698
+ message: string;
699
+ };
700
+ };
701
+ };
702
+ };
703
+ };
704
+ };
705
+ put?: never;
706
+ post?: never;
707
+ delete?: never;
708
+ options?: never;
709
+ head?: never;
710
+ /**
711
+ * Vote on a message
712
+ * @description Add or update a vote on a specific message
713
+ */
714
+ patch: {
715
+ parameters: {
716
+ query?: never;
717
+ header?: never;
718
+ path?: never;
719
+ cookie?: never;
720
+ };
721
+ requestBody?: {
722
+ content: {
723
+ 'application/json': {
724
+ /** Format: uuid */
725
+ chatId: string;
726
+ /** Format: uuid */
727
+ messageId: string;
728
+ /** @enum {string} */
729
+ type: 'up' | 'down';
730
+ };
731
+ };
732
+ };
733
+ responses: {
734
+ /** @description Vote recorded successfully */
735
+ 200: {
736
+ headers: {
737
+ [name: string]: unknown;
738
+ };
739
+ content?: never;
740
+ };
741
+ /** @description Bad request */
742
+ 400: {
743
+ headers: {
744
+ [name: string]: unknown;
745
+ };
746
+ content: {
747
+ 'application/json': {
748
+ error: {
749
+ type: string;
750
+ surface: string;
751
+ message: string;
752
+ };
753
+ };
754
+ };
755
+ };
756
+ /** @description Unauthorized */
757
+ 401: {
758
+ headers: {
759
+ [name: string]: unknown;
760
+ };
761
+ content: {
762
+ 'application/json': {
763
+ error: {
764
+ type: string;
765
+ surface: string;
766
+ message: string;
767
+ };
768
+ };
769
+ };
770
+ };
771
+ /** @description Forbidden */
772
+ 403: {
773
+ headers: {
774
+ [name: string]: unknown;
775
+ };
776
+ content: {
777
+ 'application/json': {
778
+ error: {
779
+ type: string;
780
+ surface: string;
781
+ message: string;
782
+ };
783
+ };
784
+ };
785
+ };
786
+ /** @description Chat not found */
787
+ 404: {
788
+ headers: {
789
+ [name: string]: unknown;
790
+ };
791
+ content: {
792
+ 'application/json': {
793
+ error: {
794
+ type: string;
795
+ surface: string;
796
+ message: string;
797
+ };
798
+ };
799
+ };
800
+ };
801
+ };
802
+ };
803
+ trace?: never;
804
+ };
805
+ '/api/chat/{id}/approval': {
806
+ parameters: {
807
+ query?: never;
808
+ header?: never;
809
+ path?: never;
810
+ cookie?: never;
811
+ };
812
+ get?: never;
813
+ put?: never;
814
+ /**
815
+ * Approve or deny a pending tool execution
816
+ * @description Submit approval decision for a tool that requires human-in-the-loop confirmation
817
+ */
818
+ post: {
819
+ parameters: {
820
+ query?: never;
821
+ header?: never;
822
+ path: {
823
+ id: string;
824
+ };
825
+ cookie?: never;
826
+ };
827
+ requestBody?: {
828
+ content: {
829
+ 'application/json': {
830
+ toolUseId: string;
831
+ approved: boolean;
832
+ reason?: string;
833
+ updatedInput?: {
834
+ [key: string]: unknown;
835
+ };
836
+ answers?: {
837
+ [key: string]: string | string[];
838
+ };
839
+ };
840
+ };
841
+ };
842
+ responses: {
843
+ /** @description Approval processed */
844
+ 200: {
845
+ headers: {
846
+ [name: string]: unknown;
847
+ };
848
+ content: {
849
+ 'application/json': {
850
+ success: boolean;
851
+ toolUseId: string;
852
+ approved: boolean;
853
+ };
854
+ };
855
+ };
856
+ /** @description Bad request */
857
+ 400: {
858
+ headers: {
859
+ [name: string]: unknown;
860
+ };
861
+ content: {
862
+ 'application/json': {
863
+ error: {
864
+ type: string;
865
+ surface: string;
866
+ message: string;
867
+ };
868
+ };
869
+ };
870
+ };
871
+ /** @description Unauthorized */
872
+ 401: {
873
+ headers: {
874
+ [name: string]: unknown;
875
+ };
876
+ content: {
877
+ 'application/json': {
878
+ error: {
879
+ type: string;
880
+ surface: string;
881
+ message: string;
882
+ };
883
+ };
884
+ };
885
+ };
886
+ /** @description Forbidden — approval belongs to different chat */
887
+ 403: {
888
+ headers: {
889
+ [name: string]: unknown;
890
+ };
891
+ content: {
892
+ 'application/json': {
893
+ error: {
894
+ type: string;
895
+ surface: string;
896
+ message: string;
897
+ };
898
+ };
899
+ };
900
+ };
901
+ /** @description No pending approval found */
902
+ 404: {
903
+ headers: {
904
+ [name: string]: unknown;
905
+ };
906
+ content: {
907
+ 'application/json': {
908
+ error: {
909
+ type: string;
910
+ surface: string;
911
+ message: string;
912
+ };
913
+ };
914
+ };
915
+ };
916
+ };
917
+ };
918
+ delete?: never;
919
+ options?: never;
920
+ head?: never;
921
+ patch?: never;
922
+ trace?: never;
923
+ };
924
+ '/api/chat/{id}/ui-tool-result': {
925
+ parameters: {
926
+ query?: never;
927
+ header?: never;
928
+ path?: never;
929
+ cookie?: never;
930
+ };
931
+ get?: never;
932
+ put?: never;
933
+ /**
934
+ * Submit the result of a UI tool (e.g. SQL editor) invocation
935
+ * @description The frontend executes ui_sql_editor_* tools in the browser and returns the result here. The backend writes the result into the sandbox so the sandbox MCP server unblocks and returns it to the agent.
936
+ */
937
+ post: {
938
+ parameters: {
939
+ query?: never;
940
+ header?: never;
941
+ path: {
942
+ id: string;
943
+ };
944
+ cookie?: never;
945
+ };
946
+ requestBody?: {
947
+ content: {
948
+ 'application/json': {
949
+ toolUseId: string;
950
+ output?: string;
951
+ errorText?: string;
952
+ };
953
+ };
954
+ };
955
+ responses: {
956
+ /** @description Result accepted */
957
+ 200: {
958
+ headers: {
959
+ [name: string]: unknown;
960
+ };
961
+ content: {
962
+ 'application/json': {
963
+ success: boolean;
964
+ toolUseId: string;
965
+ };
966
+ };
967
+ };
968
+ /** @description Bad request */
969
+ 400: {
970
+ headers: {
971
+ [name: string]: unknown;
972
+ };
973
+ content: {
974
+ 'application/json': {
975
+ error: {
976
+ type: string;
977
+ surface: string;
978
+ message: string;
979
+ };
980
+ };
981
+ };
982
+ };
983
+ /** @description Unauthorized */
984
+ 401: {
985
+ headers: {
986
+ [name: string]: unknown;
987
+ };
988
+ content: {
989
+ 'application/json': {
990
+ error: {
991
+ type: string;
992
+ surface: string;
993
+ message: string;
994
+ };
995
+ };
996
+ };
997
+ };
998
+ /** @description Forbidden — request belongs to a different chat */
999
+ 403: {
1000
+ headers: {
1001
+ [name: string]: unknown;
1002
+ };
1003
+ content: {
1004
+ 'application/json': {
1005
+ error: {
1006
+ type: string;
1007
+ surface: string;
1008
+ message: string;
1009
+ };
1010
+ };
1011
+ };
1012
+ };
1013
+ /** @description No pending UI tool request found */
1014
+ 404: {
1015
+ headers: {
1016
+ [name: string]: unknown;
1017
+ };
1018
+ content: {
1019
+ 'application/json': {
1020
+ error: {
1021
+ type: string;
1022
+ surface: string;
1023
+ message: string;
1024
+ };
1025
+ };
1026
+ };
1027
+ };
1028
+ };
1029
+ };
1030
+ delete?: never;
1031
+ options?: never;
1032
+ head?: never;
1033
+ patch?: never;
1034
+ trace?: never;
1035
+ };
1036
+ '/api/usage': {
1037
+ parameters: {
1038
+ query?: never;
1039
+ header?: never;
1040
+ path?: never;
1041
+ cookie?: never;
1042
+ };
1043
+ /**
1044
+ * Get rate limit usage information
1045
+ * @description Returns the current rate limit usage for the authenticated user in the current project.
1046
+ */
1047
+ get: {
1048
+ parameters: {
1049
+ query?: never;
1050
+ header?: never;
1051
+ path?: never;
1052
+ cookie?: never;
1053
+ };
1054
+ requestBody?: never;
1055
+ responses: {
1056
+ /** @description Rate limit usage information */
1057
+ 200: {
1058
+ headers: {
1059
+ [name: string]: unknown;
1060
+ };
1061
+ content: {
1062
+ 'application/json': {
1063
+ messagesUsed: number;
1064
+ messagesLimit: number;
1065
+ /** Format: date-time */
1066
+ resetDate: string;
1067
+ };
1068
+ };
1069
+ };
1070
+ /** @description Unauthorized */
1071
+ 401: {
1072
+ headers: {
1073
+ [name: string]: unknown;
1074
+ };
1075
+ content: {
1076
+ 'application/json': {
1077
+ error: {
1078
+ type: string;
1079
+ surface: string;
1080
+ message: string;
1081
+ };
1082
+ };
1083
+ };
1084
+ };
1085
+ /** @description Internal server error */
1086
+ 500: {
1087
+ headers: {
1088
+ [name: string]: unknown;
1089
+ };
1090
+ content: {
1091
+ 'application/json': {
1092
+ error: {
1093
+ type: string;
1094
+ surface: string;
1095
+ message: string;
1096
+ };
1097
+ };
1098
+ };
1099
+ };
1100
+ };
1101
+ };
1102
+ put?: never;
1103
+ post?: never;
1104
+ delete?: never;
1105
+ options?: never;
1106
+ head?: never;
1107
+ patch?: never;
1108
+ trace?: never;
1109
+ };
1110
+ };
1111
+
1112
+ type GetHistoryQuery = OpenapiQueryType<paths['/api/history']['get']>;
1113
+ type GetVotesQuery = OpenapiQueryType<paths['/api/vote']['get']>;
1114
+ type GetChatPath = OpenapiPathType<paths['/api/chat/{id}']['get']>;
1115
+ type ChatRequest = OpenapiBodyType<paths['/api/chat']['post']>;
1116
+ type VoteRequest = OpenapiBodyType<paths['/api/vote']['patch']>;
1117
+ type ApprovalBody = OpenapiBodyType<paths['/api/chat/{id}/approval']['post']>;
1118
+ type UsageResponse = OpenapiReturnType<paths['/api/usage']['get']>;
1119
+
1120
+ declare function assert<T>(value: T | undefined | null, message: string): asserts value is T;
1121
+
1122
+ declare const delay: (timeout: number, signal?: AbortSignal) => Promise<unknown>;
1123
+
1124
+ type PollResult<T> = {
1125
+ data: T;
1126
+ callCount: number;
1127
+ };
1128
+ type PollErrorType = 'PollPredicateError' | 'PollTimeoutError' | 'PollPollTimeoutError';
1129
+ declare class PollException<T> extends Error {
1130
+ result: PollResult<T>;
1131
+ constructor(type: PollErrorType, result: PollResult<T>);
1132
+ }
1133
+ type Options<T> = {
1134
+ pollFn: (abortSignal?: AbortSignal) => Promise<T>;
1135
+ isDone: (result: T) => boolean;
1136
+ isFailed?: (result: T) => boolean;
1137
+ interval: number;
1138
+ abortSignal?: AbortSignal;
1139
+ maxAttempts?: number;
1140
+ };
1141
+ declare const poll: <T>({ pollFn, interval, isDone, isFailed, abortSignal, maxAttempts, }: Options<T>) => Promise<PollResult<T>>;
1142
+
1143
+ declare const generateUUID: () => `${string}-${string}-${string}-${string}-${string}`;
1144
+
1145
+ /**
1146
+ * Executes an asynchronous callback function on an array of items in series (one at a time).
1147
+ * It behaves similarly to Promise.all(), failing on the first rejected promise.
1148
+ * The order of the results matches the order of the promises.
1149
+ */
1150
+ declare const series: <T, R>(options: Omit<ConcurrentOptions<T, R>, "concurrency">) => Promise<R[]>;
1151
+
1152
+ type ServiceUrls = Partial<Record<ServiceId, (url: string) => string | undefined | null>>;
1153
+
1154
+ type ApiClientOptions = {
1155
+ token: {
1156
+ storageApi: string;
1157
+ managementApi?: string;
1158
+ };
1159
+ assetsBaseUrl: string;
1160
+ statusBaseUrl: string;
1161
+ metastoreBaseUrl: string;
1162
+ storageMiddlewares?: MiddlewareFn[];
1163
+ clientServiceUrls?: ServiceUrls;
1164
+ } & BaseClientOptions;
1165
+ declare const createClients: ({ baseUrl, token, callbacks, assetsBaseUrl, statusBaseUrl, metastoreBaseUrl, clientServiceUrls, storageMiddlewares, }: ApiClientOptions) => Promise<{
1166
+ sdk: {
1167
+ tag: {
1168
+ getTags: (signal?: AbortSignal) => Promise<TagWithBindings[]>;
1169
+ getTagsByObjectId: (objectId: KeboolaObjectId, signal?: AbortSignal) => Promise<TagWithBindings[]>;
1170
+ createTag: (data: TagData, meta?: CreateMetaObjectMetaDataInput) => Promise<MetaObject<TagData, false>>;
1171
+ updateTag: (tagUUID: string, data: TagData, meta?: UpdateMetaObjectMetaDataInput) => Promise<MetaObject<TagData, false>>;
1172
+ deleteTag: (tagUUID: string) => Promise<void>;
1173
+ assignTags: (tagUUIDs: string[], objectId: KeboolaObjectId, meta?: CreateMetaObjectMetaDataInput) => Promise<void>;
1174
+ unassignTags: (tagUUIDs: string[], objectID: KeboolaObjectId) => Promise<void>;
1175
+ unassignAllTags: (objectID: KeboolaObjectId, signal?: AbortSignal) => Promise<void>;
1176
+ createAndAssignTag: (data: TagData, objectId: KeboolaObjectId, meta?: CreateMetaObjectMetaDataInput) => Promise<MetaObject<TagData, false>>;
1177
+ };
1178
+ storage: {
1179
+ createTable: (bucketId: string, body: CreateTableAsyncBody, options?: {
1180
+ interval?: number;
1181
+ maxAttempts?: number;
1182
+ abortSignal?: AbortSignal;
1183
+ }) => Promise<TableCreateJob>;
1184
+ importFromFile: (tableId: string, body: TableImportAsyncBody, options?: {
1185
+ interval?: number;
1186
+ maxAttempts?: number;
1187
+ abortSignal?: AbortSignal;
1188
+ }) => Promise<TableImportJob>;
1189
+ exportToFile: (tableId: string, body?: TableExportAsyncBody, options?: {
1190
+ interval?: number;
1191
+ maxAttempts?: number;
1192
+ abortSignal?: AbortSignal;
1193
+ }) => Promise<TableExportJob>;
1194
+ };
1195
+ };
1196
+ vault: {
1197
+ createVariable: (body: CreateVariableBody, signal?: AbortSignal) => Promise<{
1198
+ key: string;
1199
+ value: string;
1200
+ flags: ("encrypted" | "oauthCredentialsId")[];
1201
+ group?: string;
1202
+ attributes: {
1203
+ branchId?: string;
1204
+ } & {
1205
+ [key: string]: string;
1206
+ };
1207
+ } & {
1208
+ hash?: string;
1209
+ }>;
1210
+ deleteVariable: (hash: DeleteVariablePath["hash"], signal?: AbortSignal) => Promise<void>;
1211
+ getProjectWideVariables: (signal?: AbortSignal) => Promise<VariableWithHash[]>;
1212
+ getVariables: (query: GetVariablesQuery, signal?: AbortSignal) => Promise<VariableWithHash[]>;
1213
+ getVariablesByBranchId: (branchId: GetVariablesByBranchId["branchId"], signal?: AbortSignal) => Promise<VariableWithHash[]>;
1214
+ };
1215
+ dataScience: {
1216
+ getAppRuns: (appId: GetDataAppRunsPath["appId"], query?: GetDataAppRunsQuery, signal?: AbortSignal) => Promise<{
1217
+ state: "failed" | "starting" | "running" | "finished";
1218
+ id: string;
1219
+ appId: string;
1220
+ createdAt?: string | null;
1221
+ startedAt?: string | null;
1222
+ stoppedAt?: string | null;
1223
+ startupLogs?: string | null;
1224
+ runtimeSize?: string | null;
1225
+ configVersion?: string | null;
1226
+ }[]>;
1227
+ getAppRun: (appId: GetDataAppRunPath["appId"], runId: GetDataAppRunPath["runId"], signal?: AbortSignal) => Promise<{
1228
+ state: "failed" | "starting" | "running" | "finished";
1229
+ id: string;
1230
+ appId: string;
1231
+ createdAt?: string | null;
1232
+ startedAt?: string | null;
1233
+ stoppedAt?: string | null;
1234
+ startupLogs?: string | null;
1235
+ runtimeSize?: string | null;
1236
+ configVersion?: string | null;
1237
+ }>;
1238
+ getAppLogsDownload: (id: GetDataAppLogsDownloadPath["appId"], signal?: AbortSignal) => Promise<{
1239
+ logs: string;
1240
+ fileName: string;
1241
+ }>;
1242
+ getAppLogsTail: (id: GetDataAppLogsTailPath["appId"], { query, signal }?: {
1243
+ query?: GetDataAppLogsTailQuery;
1244
+ signal?: AbortSignal;
1245
+ }) => Promise<{
1246
+ entries: LogEntry[];
1247
+ nextLogTimestamp: string | null;
1248
+ }>;
1249
+ getApps: (query: GetAppsQuery, signal?: AbortSignal) => Promise<{
1250
+ id: string;
1251
+ type?: string | null;
1252
+ projectId: string;
1253
+ componentId: string;
1254
+ branchId: string | null;
1255
+ configId: string;
1256
+ configVersion: string;
1257
+ state: "created" | "starting" | "restarting" | "running" | "stopping" | "stopped" | "deleting" | "deleted";
1258
+ desiredState: "running" | "stopped" | "deleted";
1259
+ lastRequestTimestamp: string | null;
1260
+ lastStartTimestamp?: string | null;
1261
+ url?: string | null;
1262
+ autoSuspendAfterSeconds?: number;
1263
+ autoRestartEnabled?: boolean;
1264
+ size?: string | null;
1265
+ provisioningStrategy: "jobQueue" | "operator";
1266
+ }[]>;
1267
+ getApp: (appId: GetDataAppPath["appId"], signal?: AbortSignal) => Promise<{
1268
+ id: string;
1269
+ type?: string | null;
1270
+ projectId: string;
1271
+ componentId: string;
1272
+ branchId: string | null;
1273
+ configId: string;
1274
+ configVersion: string;
1275
+ state: "created" | "starting" | "restarting" | "running" | "stopping" | "stopped" | "deleting" | "deleted";
1276
+ desiredState: "running" | "stopped" | "deleted";
1277
+ lastRequestTimestamp: string | null;
1278
+ lastStartTimestamp?: string | null;
1279
+ url?: string | null;
1280
+ autoSuspendAfterSeconds?: number;
1281
+ autoRestartEnabled?: boolean;
1282
+ size?: string | null;
1283
+ provisioningStrategy: "jobQueue" | "operator";
1284
+ }>;
1285
+ createApp: (body: CreateDataAppBody, signal?: AbortSignal) => Promise<{
1286
+ id: string;
1287
+ type?: string | null;
1288
+ projectId: string;
1289
+ componentId: string;
1290
+ branchId: string | null;
1291
+ configId: string;
1292
+ configVersion: string;
1293
+ state: "created" | "starting" | "restarting" | "running" | "stopping" | "stopped" | "deleting" | "deleted";
1294
+ desiredState: "running" | "stopped" | "deleted";
1295
+ lastRequestTimestamp: string | null;
1296
+ lastStartTimestamp?: string | null;
1297
+ url?: string | null;
1298
+ autoSuspendAfterSeconds?: number;
1299
+ autoRestartEnabled?: boolean;
1300
+ size?: string | null;
1301
+ provisioningStrategy: "jobQueue" | "operator";
1302
+ }>;
1303
+ patchApp: (appId: PatchDataAppPath["appId"], body: PatchDataAppBody, signal?: AbortSignal) => Promise<{
1304
+ id: string;
1305
+ type?: string | null;
1306
+ projectId: string;
1307
+ componentId: string;
1308
+ branchId: string | null;
1309
+ configId: string;
1310
+ configVersion: string;
1311
+ state: "created" | "starting" | "restarting" | "running" | "stopping" | "stopped" | "deleting" | "deleted";
1312
+ desiredState: "running" | "stopped" | "deleted";
1313
+ lastRequestTimestamp: string | null;
1314
+ lastStartTimestamp?: string | null;
1315
+ url?: string | null;
1316
+ autoSuspendAfterSeconds?: number;
1317
+ autoRestartEnabled?: boolean;
1318
+ size?: string | null;
1319
+ provisioningStrategy: "jobQueue" | "operator";
1320
+ }>;
1321
+ deleteApp: (appId: DeleteDataAppPath["appId"], signal?: AbortSignal) => Promise<ApiResponse<unknown>>;
1322
+ getAppPassword: (appId: GetDataAppPasswordPath["appId"], signal?: AbortSignal) => Promise<{
1323
+ password?: string;
1324
+ }>;
1325
+ resetAppPassword: (appId: ResetDataAppPasswordPath["appId"], signal?: AbortSignal) => Promise<{
1326
+ id: string;
1327
+ type?: string | null;
1328
+ projectId: string;
1329
+ componentId: string;
1330
+ branchId: string | null;
1331
+ configId: string;
1332
+ configVersion: string;
1333
+ state: "created" | "starting" | "restarting" | "running" | "stopping" | "stopped" | "deleting" | "deleted";
1334
+ desiredState: "running" | "stopped" | "deleted";
1335
+ lastRequestTimestamp: string | null;
1336
+ lastStartTimestamp?: string | null;
1337
+ url?: string | null;
1338
+ autoSuspendAfterSeconds?: number;
1339
+ autoRestartEnabled?: boolean;
1340
+ size?: string | null;
1341
+ provisioningStrategy: "jobQueue" | "operator";
1342
+ }>;
1343
+ getRuntimes: (signal?: AbortSignal) => Promise<{
1344
+ description: string;
1345
+ type: string;
1346
+ isTypeDefault: boolean;
1347
+ releaseDate: string;
1348
+ endOfLifeDate?: string | null;
1349
+ imageName?: string | null;
1350
+ imageTag?: string | null;
1351
+ transformationComponentId?: string | null;
1352
+ transformationComponentTag?: string | null;
1353
+ sandboxImageName?: string | null;
1354
+ sandboxImageTag?: string | null;
1355
+ }[]>;
1356
+ getSandbox: (appId: GetSandboxPath["appId"], signal?: AbortSignal) => Promise<{
1357
+ id?: string;
1358
+ projectId?: string;
1359
+ tokenId?: string;
1360
+ branchId?: string | null;
1361
+ configurationId?: string;
1362
+ physicalId?: string;
1363
+ type?: string;
1364
+ active?: boolean;
1365
+ createdTimestamp?: string;
1366
+ startTimestamp?: string;
1367
+ updatedTimestamp?: string;
1368
+ persistentStorage?: {
1369
+ pvcName?: string | null;
1370
+ k8sManifest?: string | null;
1371
+ isEnabled?: boolean;
1372
+ ready?: boolean | null;
1373
+ k8sStorageClassName?: string | null;
1374
+ };
1375
+ shared?: boolean;
1376
+ componentId?: string;
1377
+ configurationVersion?: string;
1378
+ size?: string | null;
1379
+ lastAutosaveTimestamp?: string | null;
1380
+ expirationTimestamp?: string | null;
1381
+ autoSuspendAfterSeconds?: number;
1382
+ expirationAfterHours?: number;
1383
+ user?: string | null;
1384
+ url?: string | null;
1385
+ password?: string | null;
1386
+ autosaveTokenId?: string | null;
1387
+ host?: string | null;
1388
+ imageVersion?: string | null;
1389
+ packages?: string[] | null;
1390
+ sizeParameters?: unknown;
1391
+ stagingWorkspaceId?: unknown;
1392
+ stagingWorkspaceType?: unknown;
1393
+ workspaceDetails?: unknown;
1394
+ databricks?: unknown;
1395
+ credentials?: unknown;
1396
+ }>;
1397
+ };
1398
+ encryption: {
1399
+ encryptSecrets: <T extends Record<string, unknown>>(data: EncryptQuery & {
1400
+ data: T;
1401
+ }, signal?: AbortSignal) => Promise<T>;
1402
+ encrypt: (data: EncryptQuery & {
1403
+ data: string;
1404
+ }, signal?: AbortSignal) => Promise<string>;
1405
+ };
1406
+ editor: {
1407
+ createSession: (body: CreateSqlSessionBody) => Promise<{
1408
+ id: string;
1409
+ createdAt: string;
1410
+ updatedAt: string;
1411
+ status: string;
1412
+ userId: string;
1413
+ branchId: string;
1414
+ componentId: string;
1415
+ configurationId: string;
1416
+ workspaceSchema: string;
1417
+ workspaceDatabase: string;
1418
+ workspaceId: string;
1419
+ workspaceCreateJobId: string | null;
1420
+ workspaceLoadJobs: {
1421
+ id: string;
1422
+ type: string;
1423
+ }[];
1424
+ snowflakePrivateKey?: string;
1425
+ readOnlyStorageAccess?: boolean;
1426
+ backendType?: "snowflake" | "bigquery" | null;
1427
+ backendSize?: string | null;
1428
+ lastError?: string | null;
1429
+ shared: boolean;
1430
+ workspaceLoginType?: "snowflake-person-sso" | "snowflake-legacy-service" | "snowflake-person-keypair" | "snowflake-service-keypair" | "default" | null;
1431
+ lastLoadedAt?: string | null;
1432
+ }>;
1433
+ getSession: ({ id }: GetSqlSessionPath, signal?: AbortSignal) => Promise<{
1434
+ id: string;
1435
+ createdAt: string;
1436
+ updatedAt: string;
1437
+ status: string;
1438
+ userId: string;
1439
+ branchId: string;
1440
+ componentId: string;
1441
+ configurationId: string;
1442
+ workspaceSchema: string;
1443
+ workspaceDatabase: string;
1444
+ workspaceId: string;
1445
+ workspaceCreateJobId: string | null;
1446
+ workspaceLoadJobs: {
1447
+ id: string;
1448
+ type: string;
1449
+ }[];
1450
+ snowflakePrivateKey?: string;
1451
+ readOnlyStorageAccess?: boolean;
1452
+ backendType?: "snowflake" | "bigquery" | null;
1453
+ backendSize?: string | null;
1454
+ lastError?: string | null;
1455
+ shared: boolean;
1456
+ workspaceLoginType?: "snowflake-person-sso" | "snowflake-legacy-service" | "snowflake-person-keypair" | "snowflake-service-keypair" | "default" | null;
1457
+ lastLoadedAt?: string | null;
1458
+ }>;
1459
+ getSessions: (query: GetSqlSessionsQuery, signal?: AbortSignal) => Promise<{
1460
+ id: string;
1461
+ createdAt: string;
1462
+ updatedAt: string;
1463
+ status: string;
1464
+ userId: string;
1465
+ branchId: string;
1466
+ componentId: string;
1467
+ configurationId: string;
1468
+ workspaceSchema: string;
1469
+ workspaceDatabase: string;
1470
+ workspaceId: string;
1471
+ workspaceCreateJobId: string | null;
1472
+ workspaceLoadJobs: {
1473
+ id: string;
1474
+ type: string;
1475
+ }[];
1476
+ snowflakePrivateKey?: string;
1477
+ readOnlyStorageAccess?: boolean;
1478
+ backendType?: "snowflake" | "bigquery" | null;
1479
+ backendSize?: string | null;
1480
+ lastError?: string | null;
1481
+ shared: boolean;
1482
+ workspaceLoginType?: "snowflake-person-sso" | "snowflake-legacy-service" | "snowflake-person-keypair" | "snowflake-service-keypair" | "default" | null;
1483
+ lastLoadedAt?: string | null;
1484
+ }[]>;
1485
+ getSessionSchema: ({ id, onlyWorkspaceSchema, loadTables, }: GetSqlSessionSchemaPath & GetSqlSessionSchemaQuery, signal?: AbortSignal) => Promise<{
1486
+ databases: components["schemas"]["Catalog"][];
1487
+ }>;
1488
+ createQueryJob: ({ id }: PostSqlRunQueryPath, body: PostSqlRunQueryBody) => Promise<{
1489
+ queryJobId: string;
1490
+ url: string;
1491
+ }>;
1492
+ tablePreview: ({ id }: PostSqlTablePreviewPath, body: PostSqlTablePreviewBody) => Promise<{
1493
+ queryJobId: string;
1494
+ url: string;
1495
+ }>;
1496
+ tableDefinition: ({ id, ...query }: GetSqlSessionTableDdlPath & GetSqlSessionTableDdlQuery, signal?: AbortSignal) => Promise<{
1497
+ ddl: string;
1498
+ }>;
1499
+ load: ({ id }: PostSqlSessionLoadPath, body: PostSqlSessionLoadBody) => Promise<{
1500
+ id: string;
1501
+ createdAt: string;
1502
+ updatedAt: string;
1503
+ status: string;
1504
+ userId: string;
1505
+ branchId: string;
1506
+ componentId: string;
1507
+ configurationId: string;
1508
+ workspaceSchema: string;
1509
+ workspaceDatabase: string;
1510
+ workspaceId: string;
1511
+ workspaceCreateJobId: string | null;
1512
+ workspaceLoadJobs: {
1513
+ id: string;
1514
+ type: string;
1515
+ }[];
1516
+ snowflakePrivateKey?: string;
1517
+ readOnlyStorageAccess?: boolean;
1518
+ backendType?: "snowflake" | "bigquery" | null;
1519
+ backendSize?: string | null;
1520
+ lastError?: string | null;
1521
+ shared: boolean;
1522
+ workspaceLoginType?: "snowflake-person-sso" | "snowflake-legacy-service" | "snowflake-person-keypair" | "snowflake-service-keypair" | "default" | null;
1523
+ lastLoadedAt?: string | null;
1524
+ }>;
1525
+ unload: ({ id }: PostSqlSessionUnloadPath, body?: PostSqlSessionUnloadBody) => Promise<{
1526
+ id: string;
1527
+ createdAt: string;
1528
+ updatedAt: string;
1529
+ status: string;
1530
+ userId: string;
1531
+ branchId: string;
1532
+ componentId: string;
1533
+ configurationId: string;
1534
+ workspaceSchema: string;
1535
+ workspaceDatabase: string;
1536
+ workspaceId: string;
1537
+ workspaceCreateJobId: string | null;
1538
+ workspaceLoadJobs: {
1539
+ id: string;
1540
+ type: string;
1541
+ }[];
1542
+ snowflakePrivateKey?: string;
1543
+ readOnlyStorageAccess?: boolean;
1544
+ backendType?: "snowflake" | "bigquery" | null;
1545
+ backendSize?: string | null;
1546
+ lastError?: string | null;
1547
+ shared: boolean;
1548
+ workspaceLoginType?: "snowflake-person-sso" | "snowflake-legacy-service" | "snowflake-person-keypair" | "snowflake-service-keypair" | "default" | null;
1549
+ lastLoadedAt?: string | null;
1550
+ }>;
1551
+ getWorkspacePassword: (id: string, signal?: AbortSignal) => Promise<{
1552
+ username: string;
1553
+ password: string;
1554
+ host: string;
1555
+ database: string;
1556
+ schema: string;
1557
+ warehouse: string;
1558
+ }>;
1559
+ resetWorkspacePassword: (id: string) => Promise<{
1560
+ username: string;
1561
+ password: string;
1562
+ host: string;
1563
+ database: string;
1564
+ schema: string;
1565
+ warehouse: string;
1566
+ }>;
1567
+ getSessionCredentials: (id: string, signal?: AbortSignal) => Promise<{
1568
+ [key: string]: unknown;
1569
+ }>;
1570
+ };
1571
+ syncActions: {
1572
+ enrollMFA: ({ email, ...rest }: EnrollMFAInput, signal?: AbortSignal) => Promise<Record<string, never>>;
1573
+ gitRepository: {
1574
+ getDataAppPublicGitRepository: ({ repositoryUrl, ...other }: GetDataAppPublicGitRepositoryInput, signal?: AbortSignal) => Promise<{
1575
+ repository: {
1576
+ url: string;
1577
+ };
1578
+ branches: {
1579
+ sha: string;
1580
+ date: string;
1581
+ comment: string;
1582
+ branch: string;
1583
+ author: {
1584
+ name: string;
1585
+ email: string;
1586
+ };
1587
+ }[];
1588
+ }>;
1589
+ getDataAppPasswordPrivateGitRepository: ({ repositoryUrl, username, password, ...other }: GetDataAppPasswordPrivateGitRepositoryInput, signal?: AbortSignal) => Promise<{
1590
+ repository: {
1591
+ url: string;
1592
+ };
1593
+ branches: {
1594
+ sha: string;
1595
+ date: string;
1596
+ comment: string;
1597
+ branch: string;
1598
+ author: {
1599
+ name: string;
1600
+ email: string;
1601
+ };
1602
+ }[];
1603
+ }>;
1604
+ getDataAppSSHKeyPrivateGitRepository: ({ repositoryUrl, username, sshKey, ...other }: GetDataAppSSHKeyPrivateGitRepositoryInput, signal?: AbortSignal) => Promise<{
1605
+ repository: {
1606
+ url: string;
1607
+ };
1608
+ branches: {
1609
+ sha: string;
1610
+ date: string;
1611
+ comment: string;
1612
+ branch: string;
1613
+ author: {
1614
+ name: string;
1615
+ email: string;
1616
+ };
1617
+ }[];
1618
+ }>;
1619
+ getPublicGitRepository: ({ repositoryUrl, componentId, ...other }: GetPublicGitRepositoryInput, signal?: AbortSignal) => Promise<{
1620
+ repository: {
1621
+ url: string;
1622
+ };
1623
+ branches: {
1624
+ sha: string;
1625
+ date: string;
1626
+ comment: string;
1627
+ branch: string;
1628
+ author: {
1629
+ name: string;
1630
+ email: string;
1631
+ };
1632
+ }[];
1633
+ }>;
1634
+ getPrivateGitRepository: ({ repositoryUrl, username, password, componentId, ...other }: GetGitPrivateRepositoryInput, signal?: AbortSignal) => Promise<{
1635
+ repository: {
1636
+ url: string;
1637
+ };
1638
+ branches: {
1639
+ sha: string;
1640
+ date: string;
1641
+ comment: string;
1642
+ branch: string;
1643
+ author: {
1644
+ name: string;
1645
+ email: string;
1646
+ };
1647
+ }[];
1648
+ }>;
1649
+ };
1650
+ };
1651
+ telemetry: {
1652
+ provisioning: {
1653
+ createCredentials: (body: CreateCredentialsBody, signal?: AbortSignal) => Promise<WorkspaceData>;
1654
+ };
1655
+ };
1656
+ queryService: {
1657
+ createQueryJob: (branchId: PostQueryPath["branchId"], workspaceId: PostQueryPath["workspaceId"], body: PostQueryBody) => Promise<{
1658
+ queryJobId: string;
1659
+ sessionId?: string;
1660
+ }>;
1661
+ cancelQueryJob: (queryJobId: PostCancelQueryJobPath["queryJobId"]) => Promise<{
1662
+ queryJobId: string;
1663
+ }>;
1664
+ getQueryJob: (queryJobId: GetQueryJobPath["queryJobId"]) => Promise<{
1665
+ actorType: components$1["schemas"]["models.ActorType"];
1666
+ canceledAt?: string;
1667
+ cancellationReason?: string;
1668
+ changedAt: string;
1669
+ createdAt: string;
1670
+ expiration?: string;
1671
+ queryJobId: string;
1672
+ statements: components$1["schemas"]["handlers.Statement"][];
1673
+ status: components$1["schemas"]["models.JobState"];
1674
+ }>;
1675
+ getQueryResults: (queryJobId: GetQueryResultsPath["queryJobId"], statementId: GetQueryResultsPath["statementId"], query?: GetQueryResutsQuery) => Promise<{
1676
+ columns?: components$1["schemas"]["handlers.Column"][];
1677
+ data?: string[][];
1678
+ message?: string;
1679
+ numberOfRows?: number;
1680
+ rowsAffected?: number;
1681
+ status: components$1["schemas"]["models.StatementState"];
1682
+ }>;
1683
+ getQueryHistory: (branchId: GetQueriesPath["branchId"], workspaceId: GetQueriesPath["workspaceId"], query?: GetQueriesHistoryQuery) => Promise<{
1684
+ statements: components$1["schemas"]["handlers.StatementWithWorkspaceInfo"][];
1685
+ }>;
1686
+ exportResults: (queryJobId: GetQueryResultsPath["queryJobId"], statementId: GetQueryResultsPath["statementId"], query: GetExportResultsQuery, signal?: AbortSignal) => Promise<ExportResultsResponse>;
1687
+ };
1688
+ queue: {
1689
+ getJob: (jobId: GetQueueJobPath["jobId"], signal?: AbortSignal) => Promise<{
1690
+ id: string;
1691
+ runId: string;
1692
+ branchId?: string;
1693
+ project: {
1694
+ id: string;
1695
+ };
1696
+ token: {
1697
+ id?: string;
1698
+ description?: string;
1699
+ };
1700
+ status: components$2["schemas"]["JobStatus"];
1701
+ desiredStatus?: "processing" | "terminating" | null;
1702
+ component: string;
1703
+ mode: "run" | "debug";
1704
+ tag?: string | null;
1705
+ config?: string | null;
1706
+ configRow?: string | null;
1707
+ configData?: Record<string, never> | null;
1708
+ result?: {
1709
+ images?: {
1710
+ digests?: string[];
1711
+ id?: string;
1712
+ }[];
1713
+ configVersion?: number;
1714
+ message?: string;
1715
+ } | null;
1716
+ createdTime: string;
1717
+ startTime?: string | null;
1718
+ endTime?: string | null;
1719
+ delayedStartTime?: string | null;
1720
+ durationSeconds?: number | null;
1721
+ isFinished: boolean;
1722
+ url: string;
1723
+ variableValuesId?: string | null;
1724
+ variableValuesData?: {
1725
+ values?: {
1726
+ name?: string;
1727
+ value?: string;
1728
+ }[];
1729
+ } | null;
1730
+ backend?: {
1731
+ type?: string;
1732
+ containerType?: string;
1733
+ context?: string;
1734
+ } | null;
1735
+ metrics?: {
1736
+ storage?: {
1737
+ inputTablesBytesSum?: number;
1738
+ outputTablesBytesSum?: number;
1739
+ };
1740
+ backend?: {
1741
+ type?: string;
1742
+ containerType?: string;
1743
+ context?: string;
1744
+ };
1745
+ } | null;
1746
+ type?: components$2["schemas"]["JobType"];
1747
+ orchestrationTaskId?: string | null;
1748
+ previousJobId?: string | null;
1749
+ onlyOrchestrationTaskIds?: string[] | null;
1750
+ }>;
1751
+ searchJobs: (query?: SearchJobsQuery, signal?: AbortSignal) => Promise<{
1752
+ id: string;
1753
+ runId: string;
1754
+ branchId?: string;
1755
+ project: {
1756
+ id: string;
1757
+ };
1758
+ token: {
1759
+ id?: string;
1760
+ description?: string;
1761
+ };
1762
+ status: components$2["schemas"]["JobStatus"];
1763
+ desiredStatus?: "processing" | "terminating" | null;
1764
+ component: string;
1765
+ mode: "run" | "debug";
1766
+ tag?: string | null;
1767
+ config?: string | null;
1768
+ configRow?: string | null;
1769
+ configData?: Record<string, never> | null;
1770
+ result?: {
1771
+ images?: {
1772
+ digests?: string[];
1773
+ id?: string;
1774
+ }[];
1775
+ configVersion?: number;
1776
+ message?: string;
1777
+ } | null;
1778
+ createdTime: string;
1779
+ startTime?: string | null;
1780
+ endTime?: string | null;
1781
+ delayedStartTime?: string | null;
1782
+ durationSeconds?: number | null;
1783
+ isFinished: boolean;
1784
+ url: string;
1785
+ variableValuesId?: string | null;
1786
+ variableValuesData?: {
1787
+ values?: {
1788
+ name?: string;
1789
+ value?: string;
1790
+ }[];
1791
+ } | null;
1792
+ backend?: {
1793
+ type?: string;
1794
+ containerType?: string;
1795
+ context?: string;
1796
+ } | null;
1797
+ metrics?: {
1798
+ storage?: {
1799
+ inputTablesBytesSum?: number;
1800
+ outputTablesBytesSum?: number;
1801
+ };
1802
+ backend?: {
1803
+ type?: string;
1804
+ containerType?: string;
1805
+ context?: string;
1806
+ };
1807
+ } | null;
1808
+ type?: components$2["schemas"]["JobType"];
1809
+ orchestrationTaskId?: string | null;
1810
+ previousJobId?: string | null;
1811
+ onlyOrchestrationTaskIds?: string[] | null;
1812
+ }[]>;
1813
+ };
1814
+ chat: {
1815
+ getHistory: (params?: GetHistoryQuery$1) => Promise<{
1816
+ chats: components$3["schemas"]["Chat"][];
1817
+ hasMore: boolean;
1818
+ }>;
1819
+ getChat: (chatId: GetChatPath$1["id"], signal?: AbortSignal) => Promise<{
1820
+ id: string;
1821
+ title: string;
1822
+ userId: string;
1823
+ createdAt: string;
1824
+ lastMessageAt: string;
1825
+ visibility: "public" | "private";
1826
+ branchId?: number | null;
1827
+ messages: components$3["schemas"]["Message"][];
1828
+ }>;
1829
+ deleteChat: (chatId: string) => Promise<{
1830
+ id: string;
1831
+ title: string;
1832
+ userId: string;
1833
+ createdAt: string;
1834
+ lastMessageAt: string;
1835
+ visibility: "public" | "private";
1836
+ branchId?: number | null;
1837
+ }>;
1838
+ createChat: (request: ChatRequest$1) => Promise<Response>;
1839
+ getVotes: (chatId: GetVotesQuery$1["chatId"]) => Promise<{
1840
+ chatId: string;
1841
+ messageId: string;
1842
+ isUpvoted: boolean;
1843
+ }[]>;
1844
+ submitVote: (params: VoteRequest$1) => Promise<void>;
1845
+ getUsage: (signal?: AbortSignal) => Promise<UsageResponse$1>;
1846
+ getSuggestions: (request: SuggestionsRequestBody, signal?: AbortSignal) => Promise<SuggestionsApiResponse>;
1847
+ getAgentSettings: (signal?: AbortSignal) => Promise<AgentSettings>;
1848
+ updateAgentSettings: (request: UpdateAgentSettingsRequest, signal?: AbortSignal) => Promise<AgentSettings>;
1849
+ getUserAgentSettings: (signal?: AbortSignal) => Promise<UserAgentSettings>;
1850
+ updateUserAgentSettings: (request: UpdateUserAgentSettingsRequest, signal?: AbortSignal) => Promise<UserAgentSettings>;
1851
+ getToolsList: (signal?: AbortSignal) => Promise<ToolsListResponse>;
1852
+ };
1853
+ ai: {
1854
+ describeConfigurationVersion: (body: DescribeConfigurationVersionBody) => Promise<{
1855
+ description: string;
1856
+ correlationId: string;
1857
+ }>;
1858
+ describeConfigurationMerge: (body: DescribeConfigurationMergeBody) => Promise<{
1859
+ description: string;
1860
+ correlationId: string;
1861
+ }>;
1862
+ explainError: (body: ExplainErrorBody) => Promise<{
1863
+ answer: string;
1864
+ correlationId: string;
1865
+ }>;
1866
+ describeConfiguration: (body: DescribeConfigurationBody) => Promise<{
1867
+ description: string;
1868
+ correlationId: string;
1869
+ }>;
1870
+ suggestComponent: (body: SuggestComponentBody) => Promise<{
1871
+ components: components$4["schemas"]["SuggestedComponent"][];
1872
+ correlationId: string;
1873
+ }>;
1874
+ feedback: (body: FeedbackBody) => Promise<{
1875
+ error: string;
1876
+ code: number;
1877
+ status: "error";
1878
+ exceptionId?: string;
1879
+ }>;
1880
+ };
1881
+ import: {
1882
+ uploadFile: (file: File, params?: UploadFileParams, signal?: AbortSignal) => Promise<UploadedFile>;
1883
+ };
1884
+ kaiAgent: {
1885
+ getHistory: (params?: GetHistoryQuery) => Promise<{
1886
+ chats: {
1887
+ id: string;
1888
+ title: string;
1889
+ userId: string;
1890
+ createdAt: string;
1891
+ lastMessageAt: string;
1892
+ visibility: "public" | "private";
1893
+ branchId?: number | null;
1894
+ }[];
1895
+ hasMore: boolean;
1896
+ }>;
1897
+ getChat: (chatId: GetChatPath["id"], signal?: AbortSignal) => Promise<{
1898
+ id: string;
1899
+ title: string;
1900
+ userId: string;
1901
+ createdAt: string;
1902
+ lastMessageAt: string;
1903
+ visibility: "public" | "private";
1904
+ branchId?: number | null;
1905
+ messages: {
1906
+ id: string;
1907
+ role: "user" | "assistant";
1908
+ parts: ({
1909
+ type: "text";
1910
+ text: string;
1911
+ state?: "done";
1912
+ } | {
1913
+ type: "tool-result";
1914
+ toolCallId: string;
1915
+ toolName: string;
1916
+ result: string;
1917
+ } | {
1918
+ type: "step-start";
1919
+ } | {
1920
+ type: string;
1921
+ toolCallId: string;
1922
+ state: "output-available" | "input-available" | "input-streaming";
1923
+ input?: {
1924
+ [key: string]: unknown;
1925
+ };
1926
+ output?: unknown;
1927
+ })[];
1928
+ metadata?: {
1929
+ createdAt?: string;
1930
+ hidden?: boolean;
1931
+ requestContext?: {
1932
+ path?: string;
1933
+ };
1934
+ compactedTo?: string;
1935
+ compactedFrom?: string;
1936
+ };
1937
+ status?: "pending" | "completed" | "interrupted" | "failed";
1938
+ }[];
1939
+ }>;
1940
+ deleteChat: (chatId: string) => Promise<{
1941
+ id: string;
1942
+ title: string;
1943
+ userId: string;
1944
+ createdAt: string;
1945
+ lastMessageAt: string;
1946
+ visibility: "public" | "private";
1947
+ branchId?: number | null;
1948
+ }>;
1949
+ createChat: (request: ChatRequest) => Promise<Response>;
1950
+ getVotes: (chatId: GetVotesQuery["chatId"]) => Promise<{
1951
+ chatId: string;
1952
+ messageId: string;
1953
+ isUpvoted: boolean;
1954
+ }[]>;
1955
+ submitVote: (params: VoteRequest) => Promise<void>;
1956
+ getUsage: (signal?: AbortSignal) => Promise<UsageResponse>;
1957
+ approveToolCall: (chatId: string, body: ApprovalBody) => Promise<void>;
1958
+ submitToolOutput: (chatId: string, body: {
1959
+ toolUseId: string;
1960
+ output?: string;
1961
+ errorText?: string;
1962
+ }) => Promise<void>;
1963
+ getSuggestions: (request: SuggestionsRequestBody, signal?: AbortSignal) => Promise<SuggestionsApiResponse>;
1964
+ getAgentSettings: (signal?: AbortSignal) => Promise<{
1965
+ projectId: string;
1966
+ customInstructions: string | null;
1967
+ createdAt: string;
1968
+ updatedAt: string;
1969
+ }>;
1970
+ updateAgentSettings: (request: {
1971
+ customInstructions?: string | null;
1972
+ }, signal?: AbortSignal) => Promise<{
1973
+ projectId: string;
1974
+ customInstructions: string | null;
1975
+ createdAt: string;
1976
+ updatedAt: string;
1977
+ }>;
1978
+ getUserAgentSettings: (signal?: AbortSignal) => Promise<{
1979
+ projectId: string;
1980
+ userId: string;
1981
+ customInstructions: string | null;
1982
+ toolPermissions: Record<string, "always_allow" | "always_ask" | "blocked"> | null;
1983
+ createdAt: string;
1984
+ updatedAt: string;
1985
+ }>;
1986
+ updateUserAgentSettings: (request: {
1987
+ customInstructions?: string | null;
1988
+ toolPermissions?: Record<string, zod.infer<zod.ZodEnum<{
1989
+ always_allow: "always_allow";
1990
+ always_ask: "always_ask";
1991
+ blocked: "blocked";
1992
+ }>>> | null;
1993
+ }, signal?: AbortSignal) => Promise<{
1994
+ projectId: string;
1995
+ userId: string;
1996
+ customInstructions: string | null;
1997
+ toolPermissions: Record<string, "always_allow" | "always_ask" | "blocked"> | null;
1998
+ createdAt: string;
1999
+ updatedAt: string;
2000
+ }>;
2001
+ getToolsList: (signal?: AbortSignal) => Promise<{
2002
+ tools: {
2003
+ name: string;
2004
+ description: string;
2005
+ readOnly: boolean;
2006
+ }[];
2007
+ }>;
2008
+ chatStreamUrl: string;
2009
+ };
2010
+ stack: {
2011
+ services: Service[];
2012
+ features: string[];
2013
+ components: StackComponent[];
2014
+ hasFeature: (...feature: string[]) => boolean;
2015
+ getServiceUrl: (serviceId: ServiceId) => string | null;
2016
+ hasService: (serviceId: ServiceId) => boolean;
2017
+ getComponent: (componentId: string) => StackComponent | null;
2018
+ hasComponent: (...componentId: string[]) => boolean;
2019
+ api: string;
2020
+ documentation: string;
2021
+ host: string;
2022
+ revision: string;
2023
+ stack: string;
2024
+ urlTemplates: {
2025
+ orchestrationJob: string;
2026
+ };
2027
+ version: string;
2028
+ };
2029
+ project: {
2030
+ hasFeature: (...feature: string[]) => boolean;
2031
+ hasAdminFeature: (...feature: string[]) => boolean;
2032
+ hasBackend: (backend: Backend) => boolean;
2033
+ sapiToken: StorageToken;
2034
+ };
2035
+ serviceMeta: {
2036
+ clientName: string;
2037
+ serviceId: ServiceId;
2038
+ isAvailable: boolean;
2039
+ }[];
2040
+ storage: {
2041
+ buckets: {
2042
+ getBuckets: (query?: GetBucketsQuery, signal?: AbortSignal) => Promise<Bucket[]>;
2043
+ getBucket: (id: string, signal?: AbortSignal) => Promise<BucketDetail>;
2044
+ createBucket: (body: CreateBucketBody) => Promise<BucketDetail>;
2045
+ updateBucket: (id: string, body: UpdateBucketBody) => Promise<BucketDetail>;
2046
+ deleteBucket: (id: string) => Promise<void>;
2047
+ deleteBucketAsync: (id: string, options?: {
2048
+ force?: boolean;
2049
+ }) => Promise<{
2050
+ id: number;
2051
+ tableId: string | null;
2052
+ runId: string;
2053
+ url: string;
2054
+ createdTime: string;
2055
+ creatorToken: {
2056
+ id: string;
2057
+ description: string;
2058
+ };
2059
+ endTime: string | null;
2060
+ startTime: string | null;
2061
+ operationName: "bucketDelete";
2062
+ operationParams: {
2063
+ queue: string;
2064
+ } & {
2065
+ id: string;
2066
+ };
2067
+ metrics: {
2068
+ inCompressed: boolean;
2069
+ inBytes: number;
2070
+ inBytesUncompressed: number;
2071
+ outCompressed: boolean;
2072
+ outBytes: number;
2073
+ outBytesUncompressed: number;
2074
+ };
2075
+ } & ({
2076
+ status: Exclude<"error" | "success" | "warning" | "created" | "waiting" | "processing" | "terminating" | "terminated" | "cancelled", "success" | "error">;
2077
+ results: null;
2078
+ } | {
2079
+ status: "error";
2080
+ results: null;
2081
+ error: {
2082
+ code: string;
2083
+ message: string;
2084
+ exceptionId?: string;
2085
+ };
2086
+ } | {
2087
+ status: "success";
2088
+ results: null;
2089
+ })>;
2090
+ createScheduledRefresh: (input: CreateScheduledRefreshPath & CreateScheduledRefreshBody) => Promise<ScheduledTask>;
2091
+ deleteScheduledTask: (taskId: string) => Promise<void>;
2092
+ };
2093
+ events: {
2094
+ getEvents: (query?: GetEventsQuery, signal?: AbortSignal) => Promise<StorageEvent[]>;
2095
+ getEvent: (eventId: string | number, signal?: AbortSignal) => Promise<StorageEvent>;
2096
+ createEvent: (body: CreateEventBody, signal?: AbortSignal) => Promise<StorageEvent>;
2097
+ };
2098
+ files: {
2099
+ getFile: (fileId: number, signal?: AbortSignal) => Promise<File$1>;
2100
+ getFileContent: (fileId: number, signal?: AbortSignal) => Promise<string>;
2101
+ getFiles: (query?: GetFilesQuery, signal?: AbortSignal) => Promise<File$1[]>;
2102
+ deleteFile: (fileId: number) => Promise<void>;
2103
+ addFileTag: (fileId: number, tag: string) => Promise<void>;
2104
+ deleteFileTag: (fileId: DeleteFileTagPath["fileId"], tag: DeleteFileTagPath["tag"]) => Promise<void>;
2105
+ prepareFile: (body: PrepareFileBody, signal?: AbortSignal) => Promise<PreparedFile>;
2106
+ };
2107
+ tables: {
2108
+ getTables: (query?: GetTablesQuery, signal?: AbortSignal) => Promise<Table[]>;
2109
+ getTable: (id: string, signal?: AbortSignal) => Promise<TableDetail>;
2110
+ getDataPreview: (id: string, query?: GetDataPreview, signal?: AbortSignal) => Promise<PrevieData>;
2111
+ deleteTable: (id: string, signal?: AbortSignal) => Promise<void>;
2112
+ deleteTables: (ids: string[]) => Promise<void>;
2113
+ deleteTableRows: (id: string, query?: DeleteTableRows, signal?: AbortSignal) => Promise<JobUnion>;
2114
+ exportAsync: (tableId: string, body?: TableExportAsyncBody, signal?: AbortSignal) => Promise<TableExportJob>;
2115
+ createTableAsync: (bucketId: string, body: CreateTableAsyncBody, signal?: AbortSignal) => Promise<TableCreateJob>;
2116
+ importAsync: (tableId: string, body: TableImportAsyncBody, signal?: AbortSignal) => Promise<TableImportJob>;
2117
+ };
2118
+ branches: {
2119
+ getDevBranches: (signal?: AbortSignal) => Promise<DevBranch[]>;
2120
+ createDevBranchJob: (body: CreateDevBranchJobBody) => Promise<{
2121
+ id: number;
2122
+ tableId: string | null;
2123
+ runId: string;
2124
+ url: string;
2125
+ createdTime: string;
2126
+ creatorToken: {
2127
+ id: string;
2128
+ description: string;
2129
+ };
2130
+ endTime: string | null;
2131
+ startTime: string | null;
2132
+ operationName: "devBranchCreate";
2133
+ operationParams: {
2134
+ queue: string;
2135
+ } & {
2136
+ values: {
2137
+ name: string;
2138
+ description: string;
2139
+ };
2140
+ };
2141
+ metrics: {
2142
+ inCompressed: boolean;
2143
+ inBytes: number;
2144
+ inBytesUncompressed: number;
2145
+ outCompressed: boolean;
2146
+ outBytes: number;
2147
+ outBytesUncompressed: number;
2148
+ };
2149
+ } & ({
2150
+ status: Exclude<"error" | "success" | "warning" | "created" | "waiting" | "processing" | "terminating" | "terminated" | "cancelled", "success" | "error">;
2151
+ results: null;
2152
+ } | {
2153
+ status: "success";
2154
+ results: DevBranch;
2155
+ } | {
2156
+ status: "error";
2157
+ results: null;
2158
+ error: {
2159
+ code: string;
2160
+ message: string;
2161
+ exceptionId?: string;
2162
+ };
2163
+ })>;
2164
+ updateDevBranch: ({ id, name, description, }: CreateDevBranchJobBody & DevBranchPath) => Promise<DevBranch>;
2165
+ deleteDevBranchJob: (id: number) => Promise<{
2166
+ id: number;
2167
+ tableId: string | null;
2168
+ runId: string;
2169
+ url: string;
2170
+ createdTime: string;
2171
+ creatorToken: {
2172
+ id: string;
2173
+ description: string;
2174
+ };
2175
+ endTime: string | null;
2176
+ startTime: string | null;
2177
+ operationName: "devBranchDelete";
2178
+ operationParams: {
2179
+ queue: string;
2180
+ } & {
2181
+ values: {
2182
+ id: number;
2183
+ };
2184
+ };
2185
+ metrics: {
2186
+ inCompressed: boolean;
2187
+ inBytes: number;
2188
+ inBytesUncompressed: number;
2189
+ outCompressed: boolean;
2190
+ outBytes: number;
2191
+ outBytesUncompressed: number;
2192
+ };
2193
+ } & ({
2194
+ status: Exclude<"error" | "success" | "warning" | "created" | "waiting" | "processing" | "terminating" | "terminated" | "cancelled", "success" | "error">;
2195
+ results: null;
2196
+ } | {
2197
+ status: "error";
2198
+ results: null;
2199
+ error: {
2200
+ code: string;
2201
+ message: string;
2202
+ exceptionId?: string;
2203
+ };
2204
+ } | {
2205
+ status: "success";
2206
+ results: null;
2207
+ })>;
2208
+ getDevBranchMetadata: (id: string, signal?: AbortSignal) => Promise<BranchMetadata[]>;
2209
+ saveDevBranchMetadata: (id: string, metadata: BranchMetadataEntry[], signal?: AbortSignal) => Promise<BranchMetadata[]>;
2210
+ deleteDevBranchMetadata: (id: string, metadataId: string, signal?: AbortSignal) => Promise<void>;
2211
+ };
2212
+ workspaces: {
2213
+ getWorkspace: (path: WorkspacePath, signal?: AbortSignal) => Promise<Workspace>;
2214
+ getWorkspaces: (branchId: WorkspacesPath["branchId"], signal?: AbortSignal) => Promise<Workspace[]>;
2215
+ deleteWorkspace: (path: WorkspacePath) => Promise<void>;
2216
+ resetWorkspacePassword: ({ branchId, workspaceId }: WorkspacePath) => Promise<ResetWorkspacePassword>;
2217
+ deleteWorkspaces: ({ workspaceIds, branchId, }: Omit<WorkspacePath, "workspaceId"> & {
2218
+ workspaceIds: WorkspacePath["workspaceId"][];
2219
+ }) => Promise<void>;
2220
+ deleteWorkspaceJob: (path: WorkspacePath) => Promise<{
2221
+ id: number;
2222
+ tableId: string | null;
2223
+ runId: string;
2224
+ url: string;
2225
+ createdTime: string;
2226
+ creatorToken: {
2227
+ id: string;
2228
+ description: string;
2229
+ };
2230
+ endTime: string | null;
2231
+ startTime: string | null;
2232
+ operationName: "workspaceDrop";
2233
+ operationParams: {
2234
+ queue: string;
2235
+ } & {
2236
+ workspaceId: string;
2237
+ backendConfiguration: [];
2238
+ };
2239
+ metrics: {
2240
+ inCompressed: boolean;
2241
+ inBytes: number;
2242
+ inBytesUncompressed: number;
2243
+ outCompressed: boolean;
2244
+ outBytes: number;
2245
+ outBytesUncompressed: number;
2246
+ };
2247
+ } & ({
2248
+ status: Exclude<"error" | "success" | "warning" | "created" | "waiting" | "processing" | "terminating" | "terminated" | "cancelled", "success" | "error">;
2249
+ results: null;
2250
+ } | {
2251
+ status: "error";
2252
+ results: null;
2253
+ error: {
2254
+ code: string;
2255
+ message: string;
2256
+ exceptionId?: string;
2257
+ };
2258
+ } | {
2259
+ status: "success";
2260
+ results: null;
2261
+ })>;
2262
+ setWorkspacePublicKey: ({ branchId, workspaceId, publicKey, }: SetWorkspacePublicInput) => Promise<Workspace>;
2263
+ getWorkspaceSaml2Login: (path: GetWorkspaceSaml2LoginPath, signal?: AbortSignal) => Promise<WorkspaceSaml2Login>;
2264
+ getWorkspaceObjects: (path: WorkspacePath, signal?: AbortSignal) => Promise<WorkspaceObject[]>;
2265
+ deleteWorkspaceObjectsAsync: ({ branchId, workspaceId, ...body }: DeleteWorkspaceObjectInput) => Promise<{
2266
+ id: number;
2267
+ tableId: string | null;
2268
+ runId: string;
2269
+ url: string;
2270
+ createdTime: string;
2271
+ creatorToken: {
2272
+ id: string;
2273
+ description: string;
2274
+ };
2275
+ endTime: string | null;
2276
+ startTime: string | null;
2277
+ operationName: "workspaceBatchDeleteObject";
2278
+ operationParams: {
2279
+ queue: string;
2280
+ } & {
2281
+ workspaceId: string;
2282
+ objects: string[];
2283
+ };
2284
+ metrics: {
2285
+ inCompressed: boolean;
2286
+ inBytes: number;
2287
+ inBytesUncompressed: number;
2288
+ outCompressed: boolean;
2289
+ outBytes: number;
2290
+ outBytesUncompressed: number;
2291
+ };
2292
+ } & ({
2293
+ status: Exclude<"error" | "success" | "warning" | "created" | "waiting" | "processing" | "terminating" | "terminated" | "cancelled", "success" | "error">;
2294
+ results: null;
2295
+ } | {
2296
+ status: "success";
2297
+ results: {
2298
+ deleted: {
2299
+ objectName: string;
2300
+ }[];
2301
+ failed: {
2302
+ objectName: string;
2303
+ error: string;
2304
+ }[];
2305
+ };
2306
+ } | {
2307
+ status: "error";
2308
+ results: {
2309
+ deleted: {
2310
+ objectName: string;
2311
+ }[];
2312
+ failed: {
2313
+ objectName: string;
2314
+ error: string;
2315
+ }[];
2316
+ };
2317
+ error: {
2318
+ code: string;
2319
+ message: string;
2320
+ exceptionId?: string;
2321
+ };
2322
+ })>;
2323
+ };
2324
+ mergeRequests: {
2325
+ getMergeRequests: (signal?: AbortSignal) => Promise<{
2326
+ id: number;
2327
+ creator: {
2328
+ id?: number;
2329
+ name?: string;
2330
+ };
2331
+ title: string;
2332
+ description: string;
2333
+ state: "development" | "in_review" | "approved" | "in_merge" | "published" | "canceled";
2334
+ branches: {
2335
+ branchFromId?: number | null;
2336
+ branchIntoId?: number | null;
2337
+ };
2338
+ merge: {
2339
+ mergedAt?: string | null;
2340
+ mergerId?: number | null;
2341
+ mergerName?: string;
2342
+ };
2343
+ createdAt: string;
2344
+ externalId: string;
2345
+ autoMergeStrategy: "immediately" | "scheduled" | "none";
2346
+ autoMergeAt?: string | null;
2347
+ approvals: {
2348
+ approverId?: string;
2349
+ approverName?: string;
2350
+ createdAt?: string;
2351
+ }[];
2352
+ reviewers: {
2353
+ id?: number;
2354
+ name?: string;
2355
+ email?: string;
2356
+ }[];
2357
+ }[]>;
2358
+ getMergeRequest: (id: number, signal?: AbortSignal) => Promise<MergeRequestDetail>;
2359
+ getMergeRequestWithActivityLog: (id: number, signal?: AbortSignal) => Promise<MergeRequestDetailWithActivityLog>;
2360
+ createMergeRequest: (params: CreateMergeRequestParams) => Promise<{
2361
+ id: number;
2362
+ creator: {
2363
+ id?: number;
2364
+ name?: string;
2365
+ };
2366
+ title: string;
2367
+ description: string;
2368
+ state: "development" | "in_review" | "approved" | "in_merge" | "published" | "canceled";
2369
+ branches: {
2370
+ branchFromId?: number | null;
2371
+ branchIntoId?: number | null;
2372
+ };
2373
+ merge: {
2374
+ mergedAt?: string | null;
2375
+ mergerId?: number | null;
2376
+ mergerName?: string;
2377
+ };
2378
+ createdAt: string;
2379
+ externalId: string;
2380
+ autoMergeStrategy: "immediately" | "scheduled" | "none";
2381
+ autoMergeAt?: string | null;
2382
+ approvals: {
2383
+ approverId?: string;
2384
+ approverName?: string;
2385
+ createdAt?: string;
2386
+ }[];
2387
+ reviewers: {
2388
+ id?: number;
2389
+ name?: string;
2390
+ email?: string;
2391
+ }[];
2392
+ }>;
2393
+ updateMergeRequest: (id: number, params: UpdateMergeRequestParams) => Promise<{
2394
+ id: number;
2395
+ creator: {
2396
+ id?: number;
2397
+ name?: string;
2398
+ };
2399
+ title: string;
2400
+ description: string;
2401
+ state: "development" | "in_review" | "approved" | "in_merge" | "published" | "canceled";
2402
+ branches: {
2403
+ branchFromId?: number | null;
2404
+ branchIntoId?: number | null;
2405
+ };
2406
+ merge: {
2407
+ mergedAt?: string | null;
2408
+ mergerId?: number | null;
2409
+ mergerName?: string;
2410
+ };
2411
+ createdAt: string;
2412
+ externalId: string;
2413
+ autoMergeStrategy: "immediately" | "scheduled" | "none";
2414
+ autoMergeAt?: string | null;
2415
+ approvals: {
2416
+ approverId?: string;
2417
+ approverName?: string;
2418
+ createdAt?: string;
2419
+ }[];
2420
+ reviewers: {
2421
+ id?: number;
2422
+ name?: string;
2423
+ email?: string;
2424
+ }[];
2425
+ }>;
2426
+ requestReview: (id: number) => Promise<{
2427
+ id: number;
2428
+ creator: {
2429
+ id?: number;
2430
+ name?: string;
2431
+ };
2432
+ title: string;
2433
+ description: string;
2434
+ state: "development" | "in_review" | "approved" | "in_merge" | "published" | "canceled";
2435
+ branches: {
2436
+ branchFromId?: number | null;
2437
+ branchIntoId?: number | null;
2438
+ };
2439
+ merge: {
2440
+ mergedAt?: string | null;
2441
+ mergerId?: number | null;
2442
+ mergerName?: string;
2443
+ };
2444
+ createdAt: string;
2445
+ externalId: string;
2446
+ autoMergeStrategy: "immediately" | "scheduled" | "none";
2447
+ autoMergeAt?: string | null;
2448
+ approvals: {
2449
+ approverId?: string;
2450
+ approverName?: string;
2451
+ createdAt?: string;
2452
+ }[];
2453
+ reviewers: {
2454
+ id?: number;
2455
+ name?: string;
2456
+ email?: string;
2457
+ }[];
2458
+ } & {
2459
+ changeLog?: Record<string, never>;
2460
+ }>;
2461
+ approveMergeRequest: (id: number) => Promise<{
2462
+ id: number;
2463
+ creator: {
2464
+ id?: number;
2465
+ name?: string;
2466
+ };
2467
+ title: string;
2468
+ description: string;
2469
+ state: "development" | "in_review" | "approved" | "in_merge" | "published" | "canceled";
2470
+ branches: {
2471
+ branchFromId?: number | null;
2472
+ branchIntoId?: number | null;
2473
+ };
2474
+ merge: {
2475
+ mergedAt?: string | null;
2476
+ mergerId?: number | null;
2477
+ mergerName?: string;
2478
+ };
2479
+ createdAt: string;
2480
+ externalId: string;
2481
+ autoMergeStrategy: "immediately" | "scheduled" | "none";
2482
+ autoMergeAt?: string | null;
2483
+ approvals: {
2484
+ approverId?: string;
2485
+ approverName?: string;
2486
+ createdAt?: string;
2487
+ }[];
2488
+ reviewers: {
2489
+ id?: number;
2490
+ name?: string;
2491
+ email?: string;
2492
+ }[];
2493
+ } & {
2494
+ changeLog?: Record<string, never>;
2495
+ }>;
2496
+ requestChangesMergeRequest: (id: number, reason?: string) => Promise<{
2497
+ id: number;
2498
+ creator: {
2499
+ id?: number;
2500
+ name?: string;
2501
+ };
2502
+ title: string;
2503
+ description: string;
2504
+ state: "development" | "in_review" | "approved" | "in_merge" | "published" | "canceled";
2505
+ branches: {
2506
+ branchFromId?: number | null;
2507
+ branchIntoId?: number | null;
2508
+ };
2509
+ merge: {
2510
+ mergedAt?: string | null;
2511
+ mergerId?: number | null;
2512
+ mergerName?: string;
2513
+ };
2514
+ createdAt: string;
2515
+ externalId: string;
2516
+ autoMergeStrategy: "immediately" | "scheduled" | "none";
2517
+ autoMergeAt?: string | null;
2518
+ approvals: {
2519
+ approverId?: string;
2520
+ approverName?: string;
2521
+ createdAt?: string;
2522
+ }[];
2523
+ reviewers: {
2524
+ id?: number;
2525
+ name?: string;
2526
+ email?: string;
2527
+ }[];
2528
+ } & {
2529
+ changeLog?: Record<string, never>;
2530
+ }>;
2531
+ };
2532
+ jobs: {
2533
+ getJob: <T extends JobOperation | string = string>(id: GetJobPath["id"], signal?: AbortSignal) => Promise<Job<T>>;
2534
+ getJobs: <T extends JobOperation | string = string>(query?: GetJobsQuery, signal?: AbortSignal) => Promise<Job<T>[]>;
2535
+ };
2536
+ componentsAndConfigurations: {
2537
+ getComponent: ({ componentId, branchId }: GetComponentPath, signal?: AbortSignal) => Promise<Component>;
2538
+ getComponents: ({ branchId, ...query }?: GetComponentsPath & GetComponentsQuery, signal?: AbortSignal) => Promise<Component[]>;
2539
+ searchComponentConfigurations: ({ branchId }?: GetSearchComponentConfigurationsPath, query?: SearchComponentConfigurationsQuery, signal?: AbortSignal) => Promise<SearchComponentConfiguration[]>;
2540
+ createConfiguration: ({ branchId, componentId, ...body }: PartialKey<CreateConfigurationInput, "branchId">) => Promise<BaseComponentConfig>;
2541
+ getConfiguration: <T extends ConfigType = "unknown">({ componentId, configId, branchId }: ConfigurationPath, signal?: AbortSignal) => Promise<ComponentConfig<T>>;
2542
+ deleteConfiguration: (path: Required<ConfigurationPath>) => Promise<void>;
2543
+ deleteConfigurations: ({ configIds, ...rest }: Required<Omit<ConfigurationPath, "configId">> & {
2544
+ configIds: string[];
2545
+ }) => Promise<void>;
2546
+ getConfigurations: <T extends ConfigType = "unknown">({ componentId, branchId }: GetConfigurationsPath, signal?: AbortSignal) => Promise<ComponentConfig<T>[]>;
2547
+ createConfigurationRow: ({ branchId, componentId, configId, ...body }: PartialKey<CreateConfigurationRowInput, "branchId">) => Promise<Row>;
2548
+ createConfigurationRows: ({ branchId, componentId, configId, data, }: PartialKey<CreateConfigurationRowsInput, "branchId">, options?: {
2549
+ middlewares: MiddlewareFn$1<CreateConfigurationRowBody, Row>[];
2550
+ }) => Promise<Row[]>;
2551
+ deleteConfigurationRow: ({ changeDescription, ...path }: DeleteConfigurationRowInput) => Promise<void>;
2552
+ deleteConfigurationRows: ({ rowIds, changeDescription, ...input }: DeleteConfigurationRowsInput, options?: {
2553
+ middlewares: MiddlewareFn$1<string, void>[];
2554
+ }) => Promise<void>;
2555
+ createConfigurationWorkspace: ({ componentId, branchId, configId, ...body }: Required<ConfigurationPath> & CreateConfigurationWorkspaceBody) => Promise<Workspace>;
2556
+ createConfigurationWorkspaceJob: ({ componentId, branchId, configId, ...body }: Required<ConfigurationPath> & CreateConfigurationWorkspaceBody) => Promise<{
2557
+ id: number;
2558
+ tableId: string | null;
2559
+ runId: string;
2560
+ url: string;
2561
+ createdTime: string;
2562
+ creatorToken: {
2563
+ id: string;
2564
+ description: string;
2565
+ };
2566
+ endTime: string | null;
2567
+ startTime: string | null;
2568
+ operationName: "workspaceCreate";
2569
+ operationParams: {
2570
+ queue: string;
2571
+ } & {
2572
+ backend: string;
2573
+ backendConfiguration: [];
2574
+ backendSize: null;
2575
+ branchId: number;
2576
+ componentId: string;
2577
+ configurationId: string;
2578
+ loginType: number;
2579
+ networkPolicy: string;
2580
+ publicKey: string;
2581
+ readOnlyStorageAccess: boolean;
2582
+ useCase: ConfigurationUseCaseType;
2583
+ };
2584
+ metrics: {
2585
+ inCompressed: boolean;
2586
+ inBytes: number;
2587
+ inBytesUncompressed: number;
2588
+ outCompressed: boolean;
2589
+ outBytes: number;
2590
+ outBytesUncompressed: number;
2591
+ };
2592
+ } & ({
2593
+ status: Exclude<"error" | "success" | "warning" | "created" | "waiting" | "processing" | "terminating" | "terminated" | "cancelled", "success" | "error">;
2594
+ results: null;
2595
+ } | {
2596
+ status: "error";
2597
+ results: null;
2598
+ error: {
2599
+ code: string;
2600
+ message: string;
2601
+ exceptionId?: string;
2602
+ };
2603
+ } | {
2604
+ status: "success";
2605
+ results: Workspace;
2606
+ })>;
2607
+ getConfigurationWorkspaces: ({ componentId, branchId, configId, }: ConfigurationPath) => Promise<Workspace[]>;
2608
+ };
2609
+ configurationVersions: {
2610
+ listConfigurationVersions: ({ branchId, componentId, configId }: ConfigurationVersionPath, signal?: AbortSignal) => Promise<ConfigurationVersion[]>;
2611
+ getConfigurationVersion: ({ branchId, componentId, configId, versionId }: ConfigurationVersionDetailPath, signal?: AbortSignal) => Promise<ConfigurationVersionDetail>;
2612
+ };
2613
+ tokens: {
2614
+ verify: (signal?: AbortSignal) => Promise<StorageToken>;
2615
+ refresh: (id: string, signal?: AbortSignal) => Promise<StorageToken>;
2616
+ };
2617
+ getStackInfo: (query?: GetStackInfoQuery, signal?: AbortSignal) => Promise<StackInfo>;
2618
+ };
2619
+ assets: {
2620
+ getPublishedChangelogPosts: (signal?: AbortSignal) => Promise<Post[]>;
2621
+ };
2622
+ status: {
2623
+ getSummary: (signal?: AbortSignal) => Promise<StatusSummary>;
2624
+ };
2625
+ management: {
2626
+ currentUser: {
2627
+ getMaintainerInvitations: (signal?: AbortSignal) => Promise<{
2628
+ id: number;
2629
+ created: string;
2630
+ maintainer: {
2631
+ id?: number;
2632
+ name?: string;
2633
+ };
2634
+ creator: {
2635
+ id?: number;
2636
+ name?: string;
2637
+ email?: string;
2638
+ };
2639
+ }[]>;
2640
+ getMaintainerInvitation: (id: number, signal?: AbortSignal) => Promise<{
2641
+ id: number;
2642
+ created: string;
2643
+ maintainer: {
2644
+ id?: number;
2645
+ name?: string;
2646
+ };
2647
+ creator: {
2648
+ id?: number;
2649
+ name?: string;
2650
+ email?: string;
2651
+ };
2652
+ }>;
2653
+ acceptMaintainerInvitation: (id: number) => Promise<void>;
2654
+ rejectMaintainerInvitation: (id: number) => Promise<void>;
2655
+ getOrganizationInvitations: (signal?: AbortSignal) => Promise<{
2656
+ id: number;
2657
+ created: string;
2658
+ organization: {
2659
+ id?: number;
2660
+ name?: string;
2661
+ };
2662
+ creator: {
2663
+ id?: number;
2664
+ name?: string;
2665
+ email?: string;
2666
+ };
2667
+ }[]>;
2668
+ getOrganizationInvitation: (id: number, signal?: AbortSignal) => Promise<{
2669
+ id: number;
2670
+ created: string;
2671
+ organization: {
2672
+ id?: number;
2673
+ name?: string;
2674
+ };
2675
+ creator: {
2676
+ id?: number;
2677
+ name?: string;
2678
+ email?: string;
2679
+ };
2680
+ }>;
2681
+ acceptOrganizationInvitation: (id: number) => Promise<void>;
2682
+ rejectOrganizationInvitation: (id: number) => Promise<void>;
2683
+ getProjectInvitations: (signal?: AbortSignal) => Promise<Record<string, never>[]>;
2684
+ getProjectInvitation: (id: number, signal?: AbortSignal) => Promise<{
2685
+ id: number;
2686
+ created: string;
2687
+ expires?: string | null;
2688
+ reason?: string | null;
2689
+ role?: string | null;
2690
+ project: {
2691
+ id?: number;
2692
+ name?: string;
2693
+ };
2694
+ creator: {
2695
+ id?: number;
2696
+ name?: string;
2697
+ email?: string;
2698
+ };
2699
+ }>;
2700
+ acceptProjectInvitation: (id: number) => Promise<void>;
2701
+ rejectProjectInvitation: (id: number) => Promise<void>;
2702
+ getProjectJoinRequests: (signal?: AbortSignal) => Promise<Record<string, never>[]>;
2703
+ deleteProjectJoinRequest: (id: number) => Promise<void>;
2704
+ };
2705
+ features: {
2706
+ getAllFeatures: (query: GetAllFeaturesQuery, signal?: AbortSignal) => Promise<Feature[]>;
2707
+ };
2708
+ maintainers: {
2709
+ getMaintainers: (signal?: AbortSignal) => Promise<Record<string, never>[]>;
2710
+ getMaintainer: (maintainerId: number, signal?: AbortSignal) => Promise<{
2711
+ id: number;
2712
+ name: string;
2713
+ created: string;
2714
+ defaultConnectionMysqlId?: number | null;
2715
+ defaultConnectionSnowflakeId?: number | null;
2716
+ defaultConnectionSynapseId?: number | null;
2717
+ defaultConnectionExasolId?: number | null;
2718
+ defaultConnectionBigqueryId?: number | null;
2719
+ defaultConnectionTeradataId?: number | null;
2720
+ defaultFileStorageId?: number | null;
2721
+ zendeskUrl?: string | null;
2722
+ } & {
2723
+ organizations?: components$5["schemas"]["OrganizationResponse"][];
2724
+ }>;
2725
+ createMaintainer: (body: CreateMaintainerBody) => Promise<{
2726
+ id: number;
2727
+ name: string;
2728
+ created: string;
2729
+ defaultConnectionMysqlId?: number | null;
2730
+ defaultConnectionSnowflakeId?: number | null;
2731
+ defaultConnectionSynapseId?: number | null;
2732
+ defaultConnectionExasolId?: number | null;
2733
+ defaultConnectionBigqueryId?: number | null;
2734
+ defaultConnectionTeradataId?: number | null;
2735
+ defaultFileStorageId?: number | null;
2736
+ zendeskUrl?: string | null;
2737
+ }>;
2738
+ updateMaintainer: ({ maintainerId, ...body }: {
2739
+ maintainerId: number;
2740
+ } & UpdateMaintainerBody) => Promise<{
2741
+ id: number;
2742
+ name: string;
2743
+ created: string;
2744
+ defaultConnectionMysqlId?: number | null;
2745
+ defaultConnectionSnowflakeId?: number | null;
2746
+ defaultConnectionSynapseId?: number | null;
2747
+ defaultConnectionExasolId?: number | null;
2748
+ defaultConnectionBigqueryId?: number | null;
2749
+ defaultConnectionTeradataId?: number | null;
2750
+ defaultFileStorageId?: number | null;
2751
+ zendeskUrl?: string | null;
2752
+ }>;
2753
+ deleteMaintainer: (maintainerId: number) => Promise<void>;
2754
+ getMaintainerUsers: (maintainerId: number, signal?: AbortSignal) => Promise<MaintainerUser[]>;
2755
+ addMaintainerUser: ({ maintainerId, ...body }: {
2756
+ maintainerId: number;
2757
+ } & AddMaintainerUserBody) => Promise<{
2758
+ id: number;
2759
+ name: string;
2760
+ email: string;
2761
+ mfaEnabled: boolean;
2762
+ features: string[];
2763
+ canAccessLogs: boolean;
2764
+ isSuperAdmin: boolean;
2765
+ }>;
2766
+ removeMaintainerUser: ({ maintainerId, adminId, }: {
2767
+ maintainerId: number;
2768
+ adminId: number;
2769
+ }) => Promise<void>;
2770
+ getMaintainerInvitations: (maintainerId: number, signal?: AbortSignal) => Promise<Record<string, never>[]>;
2771
+ getMaintainerInvitation: ({ maintainerId, invitationId }: {
2772
+ maintainerId: number;
2773
+ invitationId: number;
2774
+ }, signal?: AbortSignal) => Promise<{
2775
+ id: number;
2776
+ created?: string | null;
2777
+ user: {
2778
+ id?: number;
2779
+ name?: string;
2780
+ email?: string;
2781
+ };
2782
+ creator: {
2783
+ id?: number;
2784
+ name?: string;
2785
+ email?: string;
2786
+ };
2787
+ }>;
2788
+ createMaintainerInvitation: ({ maintainerId, ...body }: {
2789
+ maintainerId: number;
2790
+ } & CreateMaintainerInvitationBody) => Promise<{
2791
+ id: number;
2792
+ created?: string | null;
2793
+ user: {
2794
+ id?: number;
2795
+ name?: string;
2796
+ email?: string;
2797
+ };
2798
+ creator: {
2799
+ id?: number;
2800
+ name?: string;
2801
+ email?: string;
2802
+ };
2803
+ }>;
2804
+ deleteMaintainerInvitation: ({ maintainerId, invitationId, }: {
2805
+ maintainerId: number;
2806
+ invitationId: number;
2807
+ }) => Promise<void>;
2808
+ getMaintainerOrganizations: (maintainerId: number, signal?: AbortSignal) => Promise<{
2809
+ id: number;
2810
+ name: string;
2811
+ created: string;
2812
+ allowAutoJoin: boolean;
2813
+ crmId?: string | null;
2814
+ activityCenterProjectId?: number | null;
2815
+ mfaRequired: boolean;
2816
+ }[]>;
2817
+ createMaintainerOrganization: ({ maintainerId, ...body }: {
2818
+ maintainerId: number;
2819
+ } & CreateMaintainerOrganizationBody) => Promise<{
2820
+ id: number;
2821
+ name: string;
2822
+ created: string;
2823
+ allowAutoJoin: boolean;
2824
+ crmId?: string | null;
2825
+ activityCenterProjectId?: number | null;
2826
+ mfaRequired: boolean;
2827
+ }>;
2828
+ getMaintainerMetadata: (maintainerId: number, signal?: AbortSignal) => Promise<MetadataItem[]>;
2829
+ setMaintainerMetadata: ({ maintainerId, ...body }: {
2830
+ maintainerId: number;
2831
+ } & SetMaintainerMetadataBody) => Promise<MetadataItem[]>;
2832
+ deleteMaintainerMetadata: ({ maintainerId, metadataId, }: {
2833
+ maintainerId: number;
2834
+ metadataId: number;
2835
+ }) => Promise<void>;
2836
+ };
2837
+ organizations: {
2838
+ getOrganizations: (signal?: AbortSignal) => Promise<{
2839
+ id: number;
2840
+ name: string;
2841
+ created: string;
2842
+ allowAutoJoin: boolean;
2843
+ crmId: string;
2844
+ activityCenterProjectId?: number | null;
2845
+ mfaRequired: boolean;
2846
+ maintainer: {
2847
+ id?: number;
2848
+ name?: string;
2849
+ created?: string;
2850
+ defaultConnectionMysqlId?: number | null;
2851
+ defaultConnectionSnowflakeId?: number | null;
2852
+ defaultConnectionSynapseId?: number | null;
2853
+ defaultConnectionExasolId?: number | null;
2854
+ defaultConnectionBigqueryId?: number | null;
2855
+ defaultConnectionTeradataId?: number | null;
2856
+ defaultFileStorageId?: number | null;
2857
+ zendeskUrl?: string | null;
2858
+ };
2859
+ }[]>;
2860
+ getOrganization: (organizationId: number, signal?: AbortSignal) => Promise<{
2861
+ id: number;
2862
+ name: string;
2863
+ created: string;
2864
+ allowAutoJoin: boolean;
2865
+ crmId?: string | null;
2866
+ activityCenterProjectId?: number | null;
2867
+ mfaRequired: boolean;
2868
+ } & {
2869
+ projects?: Record<string, never>[];
2870
+ maintainer?: Record<string, never>;
2871
+ }>;
2872
+ updateOrganization: ({ organizationId, ...body }: {
2873
+ organizationId: number;
2874
+ } & UpdateOrganizationBody) => Promise<{
2875
+ id: number;
2876
+ name: string;
2877
+ created: string;
2878
+ allowAutoJoin: boolean;
2879
+ crmId?: string | null;
2880
+ activityCenterProjectId?: number | null;
2881
+ mfaRequired: boolean;
2882
+ }>;
2883
+ deleteOrganization: (organizationId: number) => Promise<void>;
2884
+ forceMfa: (organizationId: number) => Promise<{
2885
+ id: number;
2886
+ name: string;
2887
+ created: string;
2888
+ allowAutoJoin: boolean;
2889
+ crmId?: string | null;
2890
+ activityCenterProjectId?: number | null;
2891
+ mfaRequired: boolean;
2892
+ }>;
2893
+ joinOrganization: (organizationId: number) => Promise<void>;
2894
+ getOrganizationUsers: (organizationId: number, signal?: AbortSignal) => Promise<{
2895
+ id: number;
2896
+ name: string;
2897
+ email: string;
2898
+ mfaEnabled: boolean;
2899
+ features: string[];
2900
+ canAccessLogs: boolean;
2901
+ isSuperAdmin: boolean;
2902
+ }[]>;
2903
+ addOrganizationUser: ({ organizationId, ...body }: {
2904
+ organizationId: number;
2905
+ } & AddOrganizationUserBody) => Promise<{
2906
+ id: number;
2907
+ name: string;
2908
+ email: string;
2909
+ mfaEnabled: boolean;
2910
+ features: string[];
2911
+ canAccessLogs: boolean;
2912
+ isSuperAdmin: boolean;
2913
+ }>;
2914
+ removeOrganizationUser: ({ organizationId, userId, }: {
2915
+ organizationId: number;
2916
+ userId: number;
2917
+ }) => Promise<void>;
2918
+ getOrganizationProjectsUsers: (organizationId: number, signal?: AbortSignal) => Promise<{
2919
+ id: number;
2920
+ name: string;
2921
+ email: string;
2922
+ mfaEnabled: boolean;
2923
+ features: string[];
2924
+ canAccessLogs: boolean;
2925
+ isSuperAdmin: boolean;
2926
+ }[]>;
2927
+ getOrganizationInvitations: (organizationId: number, signal?: AbortSignal) => Promise<{
2928
+ id: number;
2929
+ created?: string | null;
2930
+ user: {
2931
+ id?: number;
2932
+ name?: string;
2933
+ email?: string;
2934
+ };
2935
+ creator: {
2936
+ id?: number;
2937
+ name?: string;
2938
+ email?: string;
2939
+ };
2940
+ }[]>;
2941
+ getOrganizationInvitation: ({ organizationId, invitationId }: {
2942
+ organizationId: number;
2943
+ invitationId: number;
2944
+ }, signal?: AbortSignal) => Promise<{
2945
+ id: number;
2946
+ created?: string | null;
2947
+ user: {
2948
+ id?: number;
2949
+ name?: string;
2950
+ email?: string;
2951
+ };
2952
+ creator: {
2953
+ id?: number;
2954
+ name?: string;
2955
+ email?: string;
2956
+ };
2957
+ }>;
2958
+ createOrganizationInvitation: ({ organizationId, ...body }: {
2959
+ organizationId: number;
2960
+ } & CreateOrganizationInvitationBody) => Promise<{
2961
+ id: number;
2962
+ created?: string | null;
2963
+ user: {
2964
+ id?: number;
2965
+ name?: string;
2966
+ email?: string;
2967
+ };
2968
+ creator: {
2969
+ id?: number;
2970
+ name?: string;
2971
+ email?: string;
2972
+ };
2973
+ }>;
2974
+ deleteOrganizationInvitation: ({ organizationId, invitationId, }: {
2975
+ organizationId: number;
2976
+ invitationId: number;
2977
+ }) => Promise<void>;
2978
+ getOrganizationProjects: (organizationId: number, signal?: AbortSignal) => Promise<Project[]>;
2979
+ createOrganizationProject: ({ organizationId, ...body }: {
2980
+ organizationId: number;
2981
+ } & CreateOrganizationProjectBody) => Promise<{
2982
+ id: number;
2983
+ name: string;
2984
+ type: string;
2985
+ region: string;
2986
+ created?: string | null;
2987
+ expires?: string | null;
2988
+ features: string[];
2989
+ dataSizeBytes: number;
2990
+ rowsCount: number;
2991
+ hasMysql: boolean;
2992
+ hasSynapse: boolean;
2993
+ hasSnowflake: boolean;
2994
+ hasExasol: boolean;
2995
+ hasTeradata: boolean;
2996
+ hasBigquery: boolean;
2997
+ defaultBackend: string;
2998
+ hasTryModeOn: string;
2999
+ limits: {
3000
+ [key: string]: Record<string, never>;
3001
+ };
3002
+ metrics: {
3003
+ [key: string]: Record<string, never>;
3004
+ };
3005
+ isDisabled: boolean;
3006
+ billedMonthlyPrice?: number | null;
3007
+ dataRetentionTimeInDays: number;
3008
+ isBYODB: boolean;
3009
+ assignedBackends: string[];
3010
+ fileStorageProvider?: string | null;
3011
+ payAsYouGo?: {
3012
+ purchasedCredits?: number;
3013
+ } | null;
3014
+ disabled?: {
3015
+ reason?: string;
3016
+ estimatedEndTime?: string | null;
3017
+ } | null;
3018
+ } & {
3019
+ fileStorage?: Record<string, never>;
3020
+ backends?: Record<string, never>;
3021
+ }>;
3022
+ getOrganizationMetadata: (organizationId: number, signal?: AbortSignal) => Promise<MetadataItem[]>;
3023
+ setOrganizationMetadata: ({ organizationId, ...body }: {
3024
+ organizationId: number;
3025
+ } & SetOrganizationMetadataBody) => Promise<MetadataItem[]>;
3026
+ deleteOrganizationMetadata: ({ organizationId, metadataId, }: {
3027
+ organizationId: number;
3028
+ metadataId: number;
3029
+ }) => Promise<void>;
3030
+ };
3031
+ projects: {
3032
+ getProject: (projectId: GetProjectPath["projectId"], signal?: AbortSignal) => Promise<Project>;
3033
+ addProjectFeature: ({ projectId, feature, }: CreateProjectFeaturePath & CreateProjectFeatureBody) => Promise<Project>;
3034
+ removeProjectFeature: (path: RemoveProjectFeaturePath) => Promise<null>;
3035
+ changeProjectUserRole: ({ projectId, userId, role, }: {
3036
+ projectId: number;
3037
+ userId: number;
3038
+ role: User["role"];
3039
+ }) => Promise<User>;
3040
+ getProjectUsers: (projectId: ListProjectUsersPath["projectId"], signal?: AbortSignal) => Promise<User[]>;
3041
+ getProjectMetadata: (projectId: GetProjectMetadataPath["projectId"], signal?: AbortSignal) => Promise<ProjectMetadataItem[]>;
3042
+ setProjectMetadata: ({ projectId, provider, metadata, }: SetProjectMetadataPath & SetProjectMetadataBody) => Promise<ProjectMetadataItem[]>;
3043
+ getProjectReviewers: (projectId: GetProjectReviewersPath["projectId"], signal?: AbortSignal) => Promise<Reviewer[]>;
3044
+ setProjectReviewers: ({ projectId, adminIds, }: SetProjectReviewersPath & SetProjectReviewersBody) => Promise<void>;
3045
+ };
3046
+ users: {
3047
+ addUserAdminFeature: ({ feature, userIdOrMail }: AddUserFeatureBody & AddUserFeaturePath, signal?: AbortSignal) => Promise<User>;
3048
+ removeUserAdminFeature: ({ userIdOrMail, feature }: RemoveUserFeaturePath, signal?: AbortSignal) => Promise<User>;
3049
+ };
3050
+ };
3051
+ }>;
3052
+ type Clients = Awaited<ReturnType<typeof createClients>>;
3053
+ type ApiClient = {
3054
+ init: (options: ApiClientOptions) => Promise<void>;
3055
+ } & Clients;
3056
+ declare const createApiClient: () => ApiClient;
3057
+
3058
+ type RequestLog = {
3059
+ url: string;
3060
+ headers: Record<string, string>;
3061
+ };
3062
+ type ResponseLog = {
3063
+ status: number;
3064
+ statusText: string;
3065
+ headers: Record<string, string>;
3066
+ };
3067
+ type Log = {
3068
+ correlationId: string;
3069
+ method: HttpMethod;
3070
+ durationMs: number;
3071
+ request: RequestLog;
3072
+ response?: ResponseLog;
3073
+ error?: Error;
3074
+ };
3075
+ type Logger = {
3076
+ info: (log: Log) => void;
3077
+ error: (log: Log) => void;
3078
+ };
3079
+ type LogLevel = 'error-only' | 'all';
3080
+ type LoggingOptions = {
3081
+ logger?: Logger;
3082
+ level?: LogLevel;
3083
+ redactHeaders?: string[];
3084
+ };
3085
+ declare const consoleLogger: Logger;
3086
+ declare const createLoggingMiddleware: (options?: LoggingOptions) => MiddlewareFn;
3087
+
3088
+ type RetryOptions = {
3089
+ maxRetries?: number;
3090
+ backoffFactor?: number;
3091
+ shouldRetry?: (error: unknown, attempt: number) => boolean;
3092
+ };
3093
+ declare const createRetryMiddleware: (options?: RetryOptions) => MiddlewareFn;
3094
+
3095
+ declare const KeboolaHttpHeader: {
3096
+ STORAGE_API_TOKEN: string;
3097
+ MANAGEMENT_API_TOKEN: string;
3098
+ STORAGE_API_URL: string;
3099
+ };
3100
+
3101
+ declare const createDevApiClient: () => {
3102
+ verify: {
3103
+ storageApiToken: (host: string, token: string, signal?: AbortSignal) => Promise<StorageToken>;
3104
+ managementApiToken: (host: string, token: string, signal?: AbortSignal) => Promise<ManagementToken>;
3105
+ };
3106
+ };
3107
+
3108
+ export { type ApiClient, type ApiClientOptions, ConcurrentOptions, HttpContentType, HttpHeader, KeboolaHttpHeader, KeboolaObjectId, type Log, type LogLevel, type Logger, type LoggingOptions, MiddlewareFn, PollException, type RequestLog, type ResponseLog, type RetryOptions, ServiceUnavailableError, UserError, assert, consoleLogger, createApiClient, createDevApiClient, createLoggingMiddleware, createRetryMiddleware, delay, generateUUID, poll, series };