@katerai/sdk 0.5.0 → 0.7.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 (301) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +23 -16
  3. package/client.d.mts +11 -13
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +11 -13
  6. package/client.d.ts.map +1 -1
  7. package/client.js +45 -17
  8. package/client.js.map +1 -1
  9. package/client.mjs +45 -17
  10. package/client.mjs.map +1 -1
  11. package/internal/parse.d.mts.map +1 -1
  12. package/internal/parse.d.ts.map +1 -1
  13. package/internal/parse.js +5 -0
  14. package/internal/parse.js.map +1 -1
  15. package/internal/parse.mjs +5 -0
  16. package/internal/parse.mjs.map +1 -1
  17. package/internal/utils/log.d.mts.map +1 -1
  18. package/internal/utils/log.d.ts.map +1 -1
  19. package/internal/utils/log.js +2 -1
  20. package/internal/utils/log.js.map +1 -1
  21. package/internal/utils/log.mjs +2 -1
  22. package/internal/utils/log.mjs.map +1 -1
  23. package/package.json +2 -2
  24. package/resources/index.d.mts +0 -2
  25. package/resources/index.d.mts.map +1 -1
  26. package/resources/index.d.ts +0 -2
  27. package/resources/index.d.ts.map +1 -1
  28. package/resources/index.js +1 -5
  29. package/resources/index.js.map +1 -1
  30. package/resources/index.mjs +0 -2
  31. package/resources/index.mjs.map +1 -1
  32. package/resources/v1/connections.d.mts +216 -1
  33. package/resources/v1/connections.d.mts.map +1 -1
  34. package/resources/v1/connections.d.ts +216 -1
  35. package/resources/v1/connections.d.ts.map +1 -1
  36. package/resources/v1/connections.js +22 -2
  37. package/resources/v1/connections.js.map +1 -1
  38. package/resources/v1/connections.mjs +20 -1
  39. package/resources/v1/connections.mjs.map +1 -1
  40. package/resources/v1/index.d.mts +2 -6
  41. package/resources/v1/index.d.mts.map +1 -1
  42. package/resources/v1/index.d.ts +2 -6
  43. package/resources/v1/index.d.ts.map +1 -1
  44. package/resources/v1/index.js +5 -13
  45. package/resources/v1/index.js.map +1 -1
  46. package/resources/v1/index.mjs +2 -6
  47. package/resources/v1/index.mjs.map +1 -1
  48. package/resources/v1/tenants.d.mts +125 -1
  49. package/resources/v1/tenants.d.mts.map +1 -1
  50. package/resources/v1/tenants.d.ts +125 -1
  51. package/resources/v1/tenants.d.ts.map +1 -1
  52. package/resources/v1/tenants.js +46 -2
  53. package/resources/v1/tenants.js.map +1 -1
  54. package/resources/v1/tenants.mjs +44 -1
  55. package/resources/v1/tenants.mjs.map +1 -1
  56. package/resources/v1/v1.d.mts +6 -22
  57. package/resources/v1/v1.d.mts.map +1 -1
  58. package/resources/v1/v1.d.ts +6 -22
  59. package/resources/v1/v1.d.ts.map +1 -1
  60. package/resources/v1/v1.js +4 -20
  61. package/resources/v1/v1.js.map +1 -1
  62. package/resources/v1/v1.mjs +4 -20
  63. package/resources/v1/v1.mjs.map +1 -1
  64. package/src/client.ts +57 -25
  65. package/src/internal/parse.ts +6 -0
  66. package/src/internal/utils/log.ts +1 -0
  67. package/src/resources/index.ts +0 -2
  68. package/src/resources/v1/connections.ts +277 -1
  69. package/src/resources/v1/index.ts +7 -31
  70. package/src/resources/v1/tenants.ts +162 -1
  71. package/src/resources/v1/v1.ts +14 -78
  72. package/src/version.ts +1 -1
  73. package/version.d.mts +1 -1
  74. package/version.d.ts +1 -1
  75. package/version.js +1 -1
  76. package/version.mjs +1 -1
  77. package/resources/healthz.d.mts +0 -16
  78. package/resources/healthz.d.mts.map +0 -1
  79. package/resources/healthz.d.ts +0 -16
  80. package/resources/healthz.d.ts.map +0 -1
  81. package/resources/healthz.js +0 -15
  82. package/resources/healthz.js.map +0 -1
  83. package/resources/healthz.mjs +0 -11
  84. package/resources/healthz.mjs.map +0 -1
  85. package/resources/readyz.d.mts +0 -16
  86. package/resources/readyz.d.mts.map +0 -1
  87. package/resources/readyz.d.ts +0 -16
  88. package/resources/readyz.d.ts.map +0 -1
  89. package/resources/readyz.js +0 -15
  90. package/resources/readyz.js.map +0 -1
  91. package/resources/readyz.mjs +0 -11
  92. package/resources/readyz.mjs.map +0 -1
  93. package/resources/v1/connections/connections.d.mts +0 -847
  94. package/resources/v1/connections/connections.d.mts.map +0 -1
  95. package/resources/v1/connections/connections.d.ts +0 -847
  96. package/resources/v1/connections/connections.d.ts.map +0 -1
  97. package/resources/v1/connections/connections.js +0 -100
  98. package/resources/v1/connections/connections.js.map +0 -1
  99. package/resources/v1/connections/connections.mjs +0 -95
  100. package/resources/v1/connections/connections.mjs.map +0 -1
  101. package/resources/v1/connections/databases.d.mts +0 -25
  102. package/resources/v1/connections/databases.d.mts.map +0 -1
  103. package/resources/v1/connections/databases.d.ts +0 -25
  104. package/resources/v1/connections/databases.d.ts.map +0 -1
  105. package/resources/v1/connections/databases.js +0 -26
  106. package/resources/v1/connections/databases.js.map +0 -1
  107. package/resources/v1/connections/databases.mjs +0 -22
  108. package/resources/v1/connections/databases.mjs.map +0 -1
  109. package/resources/v1/connections/index.d.mts +0 -3
  110. package/resources/v1/connections/index.d.mts.map +0 -1
  111. package/resources/v1/connections/index.d.ts +0 -3
  112. package/resources/v1/connections/index.d.ts.map +0 -1
  113. package/resources/v1/connections/index.js +0 -9
  114. package/resources/v1/connections/index.js.map +0 -1
  115. package/resources/v1/connections/index.mjs +0 -4
  116. package/resources/v1/connections/index.mjs.map +0 -1
  117. package/resources/v1/github/github.d.mts +0 -95
  118. package/resources/v1/github/github.d.mts.map +0 -1
  119. package/resources/v1/github/github.d.ts +0 -95
  120. package/resources/v1/github/github.d.ts.map +0 -1
  121. package/resources/v1/github/github.js +0 -49
  122. package/resources/v1/github/github.js.map +0 -1
  123. package/resources/v1/github/github.mjs +0 -44
  124. package/resources/v1/github/github.mjs.map +0 -1
  125. package/resources/v1/github/index.d.mts +0 -5
  126. package/resources/v1/github/index.d.mts.map +0 -1
  127. package/resources/v1/github/index.d.ts +0 -5
  128. package/resources/v1/github/index.d.ts.map +0 -1
  129. package/resources/v1/github/index.js +0 -13
  130. package/resources/v1/github/index.js.map +0 -1
  131. package/resources/v1/github/index.mjs +0 -6
  132. package/resources/v1/github/index.mjs.map +0 -1
  133. package/resources/v1/github/repos.d.mts +0 -54
  134. package/resources/v1/github/repos.d.mts.map +0 -1
  135. package/resources/v1/github/repos.d.ts +0 -54
  136. package/resources/v1/github/repos.d.ts.map +0 -1
  137. package/resources/v1/github/repos.js +0 -22
  138. package/resources/v1/github/repos.js.map +0 -1
  139. package/resources/v1/github/repos.mjs +0 -18
  140. package/resources/v1/github/repos.mjs.map +0 -1
  141. package/resources/v1/github/scaffold.d.mts +0 -29
  142. package/resources/v1/github/scaffold.d.mts.map +0 -1
  143. package/resources/v1/github/scaffold.d.ts +0 -29
  144. package/resources/v1/github/scaffold.d.ts.map +0 -1
  145. package/resources/v1/github/scaffold.js +0 -21
  146. package/resources/v1/github/scaffold.js.map +0 -1
  147. package/resources/v1/github/scaffold.mjs +0 -17
  148. package/resources/v1/github/scaffold.mjs.map +0 -1
  149. package/resources/v1/github/webhooks.d.mts +0 -28
  150. package/resources/v1/github/webhooks.d.mts.map +0 -1
  151. package/resources/v1/github/webhooks.d.ts +0 -28
  152. package/resources/v1/github/webhooks.d.ts.map +0 -1
  153. package/resources/v1/github/webhooks.js +0 -27
  154. package/resources/v1/github/webhooks.js.map +0 -1
  155. package/resources/v1/github/webhooks.mjs +0 -23
  156. package/resources/v1/github/webhooks.mjs.map +0 -1
  157. package/resources/v1/github.d.mts +0 -2
  158. package/resources/v1/github.d.mts.map +0 -1
  159. package/resources/v1/github.d.ts +0 -2
  160. package/resources/v1/github.d.ts.map +0 -1
  161. package/resources/v1/github.js +0 -6
  162. package/resources/v1/github.js.map +0 -1
  163. package/resources/v1/github.mjs +0 -3
  164. package/resources/v1/github.mjs.map +0 -1
  165. package/resources/v1/groups/groups.d.mts +0 -162
  166. package/resources/v1/groups/groups.d.mts.map +0 -1
  167. package/resources/v1/groups/groups.d.ts +0 -162
  168. package/resources/v1/groups/groups.d.ts.map +0 -1
  169. package/resources/v1/groups/groups.js +0 -81
  170. package/resources/v1/groups/groups.js.map +0 -1
  171. package/resources/v1/groups/groups.mjs +0 -76
  172. package/resources/v1/groups/groups.mjs.map +0 -1
  173. package/resources/v1/groups/index.d.mts +0 -3
  174. package/resources/v1/groups/index.d.mts.map +0 -1
  175. package/resources/v1/groups/index.d.ts +0 -3
  176. package/resources/v1/groups/index.d.ts.map +0 -1
  177. package/resources/v1/groups/index.js +0 -9
  178. package/resources/v1/groups/index.js.map +0 -1
  179. package/resources/v1/groups/index.mjs +0 -4
  180. package/resources/v1/groups/index.mjs.map +0 -1
  181. package/resources/v1/groups/tenants.d.mts +0 -55
  182. package/resources/v1/groups/tenants.d.mts.map +0 -1
  183. package/resources/v1/groups/tenants.d.ts +0 -55
  184. package/resources/v1/groups/tenants.d.ts.map +0 -1
  185. package/resources/v1/groups/tenants.js +0 -39
  186. package/resources/v1/groups/tenants.js.map +0 -1
  187. package/resources/v1/groups/tenants.mjs +0 -35
  188. package/resources/v1/groups/tenants.mjs.map +0 -1
  189. package/resources/v1/groups.d.mts +0 -2
  190. package/resources/v1/groups.d.mts.map +0 -1
  191. package/resources/v1/groups.d.ts +0 -2
  192. package/resources/v1/groups.d.ts.map +0 -1
  193. package/resources/v1/groups.js +0 -6
  194. package/resources/v1/groups.js.map +0 -1
  195. package/resources/v1/groups.mjs +0 -3
  196. package/resources/v1/groups.mjs.map +0 -1
  197. package/resources/v1/me.d.mts +0 -43
  198. package/resources/v1/me.d.mts.map +0 -1
  199. package/resources/v1/me.d.ts +0 -43
  200. package/resources/v1/me.d.ts.map +0 -1
  201. package/resources/v1/me.js +0 -20
  202. package/resources/v1/me.js.map +0 -1
  203. package/resources/v1/me.mjs +0 -16
  204. package/resources/v1/me.mjs.map +0 -1
  205. package/resources/v1/org/client.d.mts +0 -53
  206. package/resources/v1/org/client.d.mts.map +0 -1
  207. package/resources/v1/org/client.d.ts +0 -53
  208. package/resources/v1/org/client.d.ts.map +0 -1
  209. package/resources/v1/org/client.js +0 -25
  210. package/resources/v1/org/client.js.map +0 -1
  211. package/resources/v1/org/client.mjs +0 -21
  212. package/resources/v1/org/client.mjs.map +0 -1
  213. package/resources/v1/org/index.d.mts +0 -4
  214. package/resources/v1/org/index.d.mts.map +0 -1
  215. package/resources/v1/org/index.d.ts +0 -4
  216. package/resources/v1/org/index.d.ts.map +0 -1
  217. package/resources/v1/org/index.js +0 -11
  218. package/resources/v1/org/index.js.map +0 -1
  219. package/resources/v1/org/index.mjs +0 -5
  220. package/resources/v1/org/index.mjs.map +0 -1
  221. package/resources/v1/org/org.d.mts +0 -14
  222. package/resources/v1/org/org.d.mts.map +0 -1
  223. package/resources/v1/org/org.d.ts +0 -14
  224. package/resources/v1/org/org.d.ts.map +0 -1
  225. package/resources/v1/org/org.js +0 -21
  226. package/resources/v1/org/org.js.map +0 -1
  227. package/resources/v1/org/org.mjs +0 -16
  228. package/resources/v1/org/org.mjs.map +0 -1
  229. package/resources/v1/org/users.d.mts +0 -87
  230. package/resources/v1/org/users.d.mts.map +0 -1
  231. package/resources/v1/org/users.d.ts +0 -87
  232. package/resources/v1/org/users.d.ts.map +0 -1
  233. package/resources/v1/org/users.js +0 -60
  234. package/resources/v1/org/users.js.map +0 -1
  235. package/resources/v1/org/users.mjs +0 -56
  236. package/resources/v1/org/users.mjs.map +0 -1
  237. package/resources/v1/org.d.mts +0 -2
  238. package/resources/v1/org.d.mts.map +0 -1
  239. package/resources/v1/org.d.ts +0 -2
  240. package/resources/v1/org.d.ts.map +0 -1
  241. package/resources/v1/org.js +0 -6
  242. package/resources/v1/org.js.map +0 -1
  243. package/resources/v1/org.mjs +0 -3
  244. package/resources/v1/org.mjs.map +0 -1
  245. package/resources/v1/tenants/batch.d.mts +0 -159
  246. package/resources/v1/tenants/batch.d.mts.map +0 -1
  247. package/resources/v1/tenants/batch.d.ts +0 -159
  248. package/resources/v1/tenants/batch.d.ts.map +0 -1
  249. package/resources/v1/tenants/batch.js +0 -42
  250. package/resources/v1/tenants/batch.js.map +0 -1
  251. package/resources/v1/tenants/batch.mjs +0 -38
  252. package/resources/v1/tenants/batch.mjs.map +0 -1
  253. package/resources/v1/tenants/import.d.mts +0 -126
  254. package/resources/v1/tenants/import.d.mts.map +0 -1
  255. package/resources/v1/tenants/import.d.ts +0 -126
  256. package/resources/v1/tenants/import.d.ts.map +0 -1
  257. package/resources/v1/tenants/import.js +0 -50
  258. package/resources/v1/tenants/import.js.map +0 -1
  259. package/resources/v1/tenants/import.mjs +0 -46
  260. package/resources/v1/tenants/import.mjs.map +0 -1
  261. package/resources/v1/tenants/index.d.mts +0 -4
  262. package/resources/v1/tenants/index.d.mts.map +0 -1
  263. package/resources/v1/tenants/index.d.ts +0 -4
  264. package/resources/v1/tenants/index.d.ts.map +0 -1
  265. package/resources/v1/tenants/index.js +0 -11
  266. package/resources/v1/tenants/index.js.map +0 -1
  267. package/resources/v1/tenants/index.mjs +0 -5
  268. package/resources/v1/tenants/index.mjs.map +0 -1
  269. package/resources/v1/tenants/tenants.d.mts +0 -205
  270. package/resources/v1/tenants/tenants.d.mts.map +0 -1
  271. package/resources/v1/tenants/tenants.d.ts +0 -205
  272. package/resources/v1/tenants/tenants.d.ts.map +0 -1
  273. package/resources/v1/tenants/tenants.js +0 -97
  274. package/resources/v1/tenants/tenants.js.map +0 -1
  275. package/resources/v1/tenants/tenants.mjs +0 -92
  276. package/resources/v1/tenants/tenants.mjs.map +0 -1
  277. package/src/resources/healthz.ts +0 -20
  278. package/src/resources/readyz.ts +0 -20
  279. package/src/resources/v1/connections/connections.ts +0 -1072
  280. package/src/resources/v1/connections/databases.ts +0 -42
  281. package/src/resources/v1/connections/index.ts +0 -13
  282. package/src/resources/v1/github/github.ts +0 -157
  283. package/src/resources/v1/github/index.ts +0 -20
  284. package/src/resources/v1/github/repos.ts +0 -85
  285. package/src/resources/v1/github/scaffold.ts +0 -44
  286. package/src/resources/v1/github/webhooks.ts +0 -60
  287. package/src/resources/v1/github.ts +0 -3
  288. package/src/resources/v1/groups/groups.ts +0 -218
  289. package/src/resources/v1/groups/index.ts +0 -10
  290. package/src/resources/v1/groups/tenants.ts +0 -78
  291. package/src/resources/v1/groups.ts +0 -3
  292. package/src/resources/v1/me.ts +0 -62
  293. package/src/resources/v1/org/client.ts +0 -81
  294. package/src/resources/v1/org/index.ts +0 -11
  295. package/src/resources/v1/org/org.ts +0 -32
  296. package/src/resources/v1/org/users.ts +0 -127
  297. package/src/resources/v1/org.ts +0 -3
  298. package/src/resources/v1/tenants/batch.ts +0 -200
  299. package/src/resources/v1/tenants/import.ts +0 -158
  300. package/src/resources/v1/tenants/index.ts +0 -27
  301. package/src/resources/v1/tenants/tenants.ts +0 -290
@@ -1,1072 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../../core/resource';
4
- import * as DatabasesAPI from './databases';
5
- import { DatabaseDeleteSchemaParams, Databases } from './databases';
6
- import { APIPromise } from '../../../core/api-promise';
7
- import { buildHeaders } from '../../../internal/headers';
8
- import { RequestOptions } from '../../../internal/request-options';
9
- import { path } from '../../../internal/utils/path';
10
-
11
- export class Connections extends APIResource {
12
- databases: DatabasesAPI.Databases = new DatabasesAPI.Databases(this._client);
13
-
14
- /**
15
- * Create a new warehouse connection.
16
- */
17
- create(body: ConnectionCreateParams, options?: RequestOptions): APIPromise<Connection> {
18
- return this._client.post('/api/v1/connections', { body, ...options });
19
- }
20
-
21
- /**
22
- * Get a single warehouse connection by kater_id.
23
- *
24
- * Returns connection from the database (source of truth) with full hierarchy.
25
- * Supports content negotiation via Accept header (handled by MultiFormatRoute):
26
- *
27
- * - application/json (default): Returns JSON response
28
- * - application/yaml: Returns YAML representation
29
- *
30
- * RLS: Filtered to current client (DualClientRLSDB).
31
- *
32
- * Raises: NotFoundError: If connection doesn't exist (404)
33
- */
34
- retrieve(connectionID: string, options?: RequestOptions): APIPromise<Connection> {
35
- return this._client.get(path`/api/v1/connections/${connectionID}`, options);
36
- }
37
-
38
- /**
39
- * Update a warehouse connection's metadata.
40
- *
41
- * Updates name, label, and/or description fields.
42
- *
43
- * RLS: Filtered to current client (ClientRLSDB).
44
- *
45
- * Raises: ConnectionNotFoundError: If connection doesn't exist (404)
46
- */
47
- update(
48
- connectionID: string,
49
- body: ConnectionUpdateParams,
50
- options?: RequestOptions,
51
- ): APIPromise<Connection> {
52
- return this._client.patch(path`/api/v1/connections/${connectionID}`, { body, ...options });
53
- }
54
-
55
- /**
56
- * List all warehouse connections for the client.
57
- *
58
- * Returns connections from the database joined with schema information from
59
- * GitHub. Connections with pending PRs will have null GitHub fields until merged.
60
- * Returns empty list if GitHub is not configured.
61
- *
62
- * RLS: Filtered to current client (DualClientRLSDB).
63
- */
64
- list(options?: RequestOptions): APIPromise<ConnectionListResponse> {
65
- return this._client.get('/api/v1/connections', options);
66
- }
67
-
68
- /**
69
- * Delete a warehouse connection.
70
- *
71
- * Soft-deletes the connection record and cascades to all associated databases and
72
- * schemas, setting deleted_at and deleted_by fields.
73
- *
74
- * RLS: Filtered to current client (ClientRLSDB).
75
- *
76
- * Raises: ConnectionNotFoundError: If connection doesn't exist (404)
77
- */
78
- delete(connectionID: string, options?: RequestOptions): APIPromise<void> {
79
- return this._client.delete(path`/api/v1/connections/${connectionID}`, {
80
- ...options,
81
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
82
- });
83
- }
84
-
85
- /**
86
- * Get decrypted warehouse credentials for a connection.
87
- *
88
- * Returns the decrypted credentials for a connection. This is sensitive data and
89
- * should only be used when actually needed for warehouse operations.
90
- *
91
- * RLS: Filtered to current client (DualClientRLSDB).
92
- *
93
- * Raises: NotFoundError: If connection doesn't exist (404)
94
- */
95
- retrieveCredential(
96
- connectionID: string,
97
- options?: RequestOptions,
98
- ): APIPromise<ConnectionRetrieveCredentialResponse> {
99
- return this._client.get(path`/api/v1/connections/${connectionID}/credential`, options);
100
- }
101
-
102
- /**
103
- * Sync view schemas from warehouse and create a PR (or update existing).
104
- */
105
- sync(connectionID: string, options?: RequestOptions): APIPromise<ConnectionSyncResponse> {
106
- return this._client.post(path`/api/v1/connections/${connectionID}/sync`, options);
107
- }
108
- }
109
-
110
- /**
111
- * Response model for a single connection.
112
- *
113
- * All data comes from the database (source of truth). JSON responses use 'id'
114
- * field; YAML responses transform to 'kater_id' via MultiFormatRoute.
115
- */
116
- export interface Connection {
117
- /**
118
- * Connection ID
119
- */
120
- id: string;
121
-
122
- /**
123
- * Creation timestamp
124
- */
125
- created_at: string;
126
-
127
- /**
128
- * Credential ID
129
- */
130
- credential_id: string;
131
-
132
- /**
133
- * Databases in this connection
134
- */
135
- databases: Array<Connection.Database>;
136
-
137
- /**
138
- * Connection name
139
- */
140
- name: string;
141
-
142
- /**
143
- * Last update timestamp
144
- */
145
- updated_at: string;
146
-
147
- /**
148
- * Warehouse-specific configuration
149
- */
150
- warehouse_metadata:
151
- | Connection.SnowflakeMetadata
152
- | Connection.PostgresMetadata
153
- | Connection.DatabricksMetadata
154
- | Connection.ClickHouseMetadata
155
- | Connection.MssqlMetadata;
156
-
157
- /**
158
- * Warehouse type (snowflake, postgresql, etc.)
159
- */
160
- warehouse_type: string;
161
-
162
- /**
163
- * Default timezone for the connection
164
- */
165
- database_timezone?: string | null;
166
-
167
- /**
168
- * Connection description
169
- */
170
- description?: string | null;
171
-
172
- /**
173
- * Human-readable label
174
- */
175
- label?: string | null;
176
-
177
- /**
178
- * Query timeout in seconds
179
- */
180
- query_timeout?: number | null;
181
-
182
- /**
183
- * Timezone conversion mode (do_not_convert, convert_to_utc)
184
- */
185
- query_timezone_conversion?: string | null;
186
-
187
- /**
188
- * Sync identifier for schema sync
189
- */
190
- sync_id?: string | null;
191
- }
192
-
193
- export namespace Connection {
194
- /**
195
- * Database info from ConnectionSchema.
196
- */
197
- export interface Database {
198
- /**
199
- * Database ID
200
- */
201
- id: string;
202
-
203
- /**
204
- * Actual name of the database in the warehouse
205
- */
206
- database_object_name: string;
207
-
208
- /**
209
- * Database name
210
- */
211
- name: string;
212
-
213
- /**
214
- * Schemas in this database
215
- */
216
- schemas: Array<Database.Schema>;
217
-
218
- /**
219
- * Database description
220
- */
221
- description?: string | null;
222
-
223
- /**
224
- * Human-readable label
225
- */
226
- label?: string | null;
227
-
228
- /**
229
- * Timezone for the database
230
- */
231
- timezone?: string | null;
232
- }
233
-
234
- export namespace Database {
235
- /**
236
- * Schema info from ConnectionSchema.
237
- */
238
- export interface Schema {
239
- /**
240
- * Schema ID
241
- */
242
- id: string;
243
-
244
- /**
245
- * Actual name of the schema in the warehouse
246
- */
247
- database_object_name: string;
248
-
249
- /**
250
- * Schema name
251
- */
252
- name: string;
253
-
254
- /**
255
- * Schema description
256
- */
257
- description?: string | null;
258
-
259
- /**
260
- * Human-readable label
261
- */
262
- label?: string | null;
263
- }
264
- }
265
-
266
- /**
267
- * Snowflake-specific warehouse metadata.
268
- */
269
- export interface SnowflakeMetadata {
270
- /**
271
- * Authentication method
272
- */
273
- auth_method: 'username_password' | 'key_pair';
274
-
275
- /**
276
- * Snowflake role
277
- */
278
- role: string;
279
-
280
- /**
281
- * Snowflake account identifier
282
- */
283
- snowflake_account_id: string;
284
-
285
- /**
286
- * Compute warehouse name
287
- */
288
- warehouse: string;
289
-
290
- /**
291
- * Warehouse type discriminator
292
- */
293
- warehouse_type: 'snowflake';
294
- }
295
-
296
- /**
297
- * PostgreSQL-specific warehouse metadata.
298
- */
299
- export interface PostgresMetadata {
300
- /**
301
- * Database host
302
- */
303
- host: string;
304
-
305
- /**
306
- * Database port
307
- */
308
- port: number;
309
-
310
- /**
311
- * Warehouse type discriminator
312
- */
313
- warehouse_type: 'postgresql';
314
- }
315
-
316
- /**
317
- * Databricks-specific warehouse metadata.
318
- */
319
- export interface DatabricksMetadata {
320
- /**
321
- * SQL warehouse HTTP path
322
- */
323
- http_path: string;
324
-
325
- /**
326
- * Databricks server hostname
327
- */
328
- server_hostname: string;
329
-
330
- /**
331
- * Warehouse type discriminator
332
- */
333
- warehouse_type: 'databricks';
334
- }
335
-
336
- /**
337
- * ClickHouse-specific warehouse metadata.
338
- */
339
- export interface ClickHouseMetadata {
340
- /**
341
- * ClickHouse host
342
- */
343
- host: string;
344
-
345
- /**
346
- * ClickHouse port
347
- */
348
- port: number;
349
-
350
- /**
351
- * Warehouse type discriminator
352
- */
353
- warehouse_type: 'clickhouse';
354
- }
355
-
356
- /**
357
- * Microsoft SQL Server-specific warehouse metadata.
358
- */
359
- export interface MssqlMetadata {
360
- /**
361
- * SQL Server host
362
- */
363
- host: string;
364
-
365
- /**
366
- * SQL Server port
367
- */
368
- port: number;
369
-
370
- /**
371
- * Warehouse type discriminator
372
- */
373
- warehouse_type: 'mssql';
374
- }
375
- }
376
-
377
- /**
378
- * Database configuration for connection creation request.
379
- */
380
- export interface DatabaseConfig {
381
- /**
382
- * The actual name of the database object in the warehouse
383
- */
384
- database_object_name: string;
385
-
386
- /**
387
- * Description of the database
388
- */
389
- description?: string | null;
390
-
391
- /**
392
- * Human-readable label for the database (defaults to name if not set)
393
- */
394
- label?: string | null;
395
-
396
- /**
397
- * Database name (defaults to database_object_name if not set)
398
- */
399
- name?: string | null;
400
-
401
- /**
402
- * Schema configurations to include (empty = discover all schemas)
403
- */
404
- schemas?: Array<DatabaseConfig.Schema>;
405
-
406
- /**
407
- * Timezone for the database (e.g., 'UTC', 'America/New_York')
408
- */
409
- timezone?: string | null;
410
- }
411
-
412
- export namespace DatabaseConfig {
413
- /**
414
- * Schema configuration for connection creation request.
415
- */
416
- export interface Schema {
417
- /**
418
- * The actual name of the schema object in the warehouse
419
- */
420
- database_object_name: string;
421
-
422
- /**
423
- * Description of the schema
424
- */
425
- description?: string | null;
426
-
427
- /**
428
- * Human-readable label for the schema (defaults to name if not set)
429
- */
430
- label?: string | null;
431
-
432
- /**
433
- * Schema name (defaults to database_object_name if not set)
434
- */
435
- name?: string | null;
436
- }
437
- }
438
-
439
- export type ConnectionListResponse = Array<Connection>;
440
-
441
- /**
442
- * PostgreSQL credential response.
443
- */
444
- export type ConnectionRetrieveCredentialResponse =
445
- | ConnectionRetrieveCredentialResponse.PostgresCredentialResponse
446
- | ConnectionRetrieveCredentialResponse.SnowflakeCredentialResponse
447
- | ConnectionRetrieveCredentialResponse.DatabricksCredentialResponse
448
- | ConnectionRetrieveCredentialResponse.ClickHouseCredentialResponse
449
- | ConnectionRetrieveCredentialResponse.MssqlCredentialResponse;
450
-
451
- export namespace ConnectionRetrieveCredentialResponse {
452
- /**
453
- * PostgreSQL credential response.
454
- */
455
- export interface PostgresCredentialResponse {
456
- /**
457
- * Database name
458
- */
459
- database: string;
460
-
461
- /**
462
- * Database host
463
- */
464
- host: string;
465
-
466
- /**
467
- * Decrypted password
468
- */
469
- password: string;
470
-
471
- /**
472
- * Database port
473
- */
474
- port: number;
475
-
476
- /**
477
- * Database username
478
- */
479
- username: string;
480
-
481
- /**
482
- * Warehouse type
483
- */
484
- warehouse_type: 'postgresql';
485
- }
486
-
487
- /**
488
- * Snowflake credential response.
489
- */
490
- export interface SnowflakeCredentialResponse {
491
- /**
492
- * Snowflake account identifier
493
- */
494
- account: string;
495
-
496
- /**
497
- * Authentication credentials
498
- */
499
- auth:
500
- | SnowflakeCredentialResponse.SnowflakePasswordAuthResponse
501
- | SnowflakeCredentialResponse.SnowflakePrivateKeyAuthResponse;
502
-
503
- /**
504
- * Snowflake role
505
- */
506
- role: string;
507
-
508
- /**
509
- * Snowflake username
510
- */
511
- username: string;
512
-
513
- /**
514
- * Compute warehouse name
515
- */
516
- warehouse: string;
517
-
518
- /**
519
- * Warehouse type
520
- */
521
- warehouse_type: 'snowflake';
522
- }
523
-
524
- export namespace SnowflakeCredentialResponse {
525
- /**
526
- * Snowflake password authentication response.
527
- */
528
- export interface SnowflakePasswordAuthResponse {
529
- /**
530
- * Authentication type
531
- */
532
- auth_type: 'password';
533
-
534
- /**
535
- * Decrypted password
536
- */
537
- password: string;
538
- }
539
-
540
- /**
541
- * Snowflake private key authentication response.
542
- */
543
- export interface SnowflakePrivateKeyAuthResponse {
544
- /**
545
- * Authentication type
546
- */
547
- auth_type: 'private_key';
548
-
549
- /**
550
- * PEM-encoded private key
551
- */
552
- private_key: string;
553
-
554
- /**
555
- * Passphrase if key is encrypted
556
- */
557
- private_key_passphrase?: string | null;
558
- }
559
- }
560
-
561
- /**
562
- * Databricks credential response.
563
- */
564
- export interface DatabricksCredentialResponse {
565
- /**
566
- * Databricks personal access token
567
- */
568
- access_token: string;
569
-
570
- /**
571
- * SQL warehouse HTTP path
572
- */
573
- http_path: string;
574
-
575
- /**
576
- * Databricks server hostname
577
- */
578
- server_hostname: string;
579
-
580
- /**
581
- * Warehouse type
582
- */
583
- warehouse_type: 'databricks';
584
- }
585
-
586
- /**
587
- * ClickHouse credential response.
588
- */
589
- export interface ClickHouseCredentialResponse {
590
- /**
591
- * ClickHouse host
592
- */
593
- host: string;
594
-
595
- /**
596
- * Decrypted password
597
- */
598
- password: string;
599
-
600
- /**
601
- * ClickHouse port
602
- */
603
- port: number;
604
-
605
- /**
606
- * ClickHouse username
607
- */
608
- username: string;
609
-
610
- /**
611
- * Warehouse type
612
- */
613
- warehouse_type: 'clickhouse';
614
-
615
- /**
616
- * Database name
617
- */
618
- database?: string | null;
619
- }
620
-
621
- /**
622
- * Microsoft SQL Server credential response.
623
- */
624
- export interface MssqlCredentialResponse {
625
- /**
626
- * SQL Server host
627
- */
628
- host: string;
629
-
630
- /**
631
- * Decrypted password
632
- */
633
- password: string;
634
-
635
- /**
636
- * SQL Server port
637
- */
638
- port: number;
639
-
640
- /**
641
- * SQL Server username
642
- */
643
- username: string;
644
-
645
- /**
646
- * Warehouse type
647
- */
648
- warehouse_type: 'mssql';
649
-
650
- /**
651
- * Database name
652
- */
653
- database?: string | null;
654
- }
655
- }
656
-
657
- /**
658
- * Response for syncing views.
659
- *
660
- * Returned after successfully creating a PR with merged ViewSchema files, or
661
- * indicating that all views are already up to date.
662
- */
663
- export interface ConnectionSyncResponse {
664
- /**
665
- * Number of views in the PR
666
- */
667
- views_updated: number;
668
-
669
- /**
670
- * Status message
671
- */
672
- message?: string | null;
673
-
674
- /**
675
- * GitHub PR number
676
- */
677
- pr_number?: number | null;
678
-
679
- /**
680
- * GitHub PR URL
681
- */
682
- pr_url?: string | null;
683
- }
684
-
685
- export type ConnectionCreateParams =
686
- | ConnectionCreateParams.PostgresConnectionConfig
687
- | ConnectionCreateParams.SnowflakeConnectionConfig
688
- | ConnectionCreateParams.DatabricksConnectionConfig
689
- | ConnectionCreateParams.ClickHouseConnectionConfig
690
- | ConnectionCreateParams.MssqlConnectionConfig;
691
-
692
- export declare namespace ConnectionCreateParams {
693
- export interface PostgresConnectionConfig {
694
- /**
695
- * Databases to include in the connection (at least one required)
696
- */
697
- databases: Array<DatabaseConfig>;
698
-
699
- /**
700
- * Database host
701
- */
702
- host: string;
703
-
704
- /**
705
- * Name of the connection (snake_case: lowercase letters, numbers, underscores)
706
- */
707
- name: string;
708
-
709
- /**
710
- * Database password
711
- */
712
- password: string;
713
-
714
- /**
715
- * Database username
716
- */
717
- username: string;
718
-
719
- /**
720
- * Warehouse type
721
- */
722
- warehouse_type: 'postgresql';
723
-
724
- /**
725
- * Default timezone for the connection (e.g., 'UTC', 'America/New_York')
726
- */
727
- database_timezone?: string | null;
728
-
729
- /**
730
- * Description of the connection
731
- */
732
- description?: string | null;
733
-
734
- /**
735
- * Human-readable label for the connection (defaults to name if not set)
736
- */
737
- label?: string | null;
738
-
739
- /**
740
- * Database port
741
- */
742
- port?: number;
743
-
744
- /**
745
- * Query timeout in seconds (1-3600)
746
- */
747
- query_timeout?: number | null;
748
-
749
- /**
750
- * Timezone conversion mode: 'do_not_convert' or 'convert_to_utc'
751
- */
752
- query_timezone_conversion?: string | null;
753
- }
754
-
755
- export interface SnowflakeConnectionConfig {
756
- /**
757
- * Snowflake account identifier (e.g., 'xy12345.us-east-1')
758
- */
759
- account: string;
760
-
761
- /**
762
- * Authentication configuration
763
- */
764
- auth: SnowflakeConnectionConfig.SnowflakePasswordAuth | SnowflakeConnectionConfig.SnowflakePrivateKeyAuth;
765
-
766
- /**
767
- * Databases to include in the connection (at least one required)
768
- */
769
- databases: Array<DatabaseConfig>;
770
-
771
- /**
772
- * Name of the connection (snake_case: lowercase letters, numbers, underscores)
773
- */
774
- name: string;
775
-
776
- /**
777
- * Snowflake role
778
- */
779
- role: string;
780
-
781
- /**
782
- * Snowflake username
783
- */
784
- username: string;
785
-
786
- /**
787
- * Compute warehouse name
788
- */
789
- warehouse: string;
790
-
791
- /**
792
- * Warehouse type
793
- */
794
- warehouse_type: 'snowflake';
795
-
796
- /**
797
- * Default timezone for the connection (e.g., 'UTC', 'America/New_York')
798
- */
799
- database_timezone?: string | null;
800
-
801
- /**
802
- * Description of the connection
803
- */
804
- description?: string | null;
805
-
806
- /**
807
- * Human-readable label for the connection (defaults to name if not set)
808
- */
809
- label?: string | null;
810
-
811
- /**
812
- * Query timeout in seconds (1-3600)
813
- */
814
- query_timeout?: number | null;
815
-
816
- /**
817
- * Timezone conversion mode: 'do_not_convert' or 'convert_to_utc'
818
- */
819
- query_timezone_conversion?: string | null;
820
- }
821
-
822
- export namespace SnowflakeConnectionConfig {
823
- /**
824
- * Snowflake password authentication.
825
- */
826
- export interface SnowflakePasswordAuth {
827
- /**
828
- * Authentication type
829
- */
830
- auth_type: 'password';
831
-
832
- /**
833
- * Snowflake password
834
- */
835
- password: string;
836
- }
837
-
838
- /**
839
- * Snowflake private key authentication.
840
- */
841
- export interface SnowflakePrivateKeyAuth {
842
- /**
843
- * Authentication type
844
- */
845
- auth_type: 'private_key';
846
-
847
- /**
848
- * PEM-encoded private key
849
- */
850
- private_key: string;
851
-
852
- /**
853
- * Passphrase if key is encrypted
854
- */
855
- private_key_passphrase?: string | null;
856
- }
857
- }
858
-
859
- export interface DatabricksConnectionConfig {
860
- /**
861
- * Databricks personal access token
862
- */
863
- access_token: string;
864
-
865
- /**
866
- * Databases to include in the connection (at least one required)
867
- */
868
- databases: Array<DatabaseConfig>;
869
-
870
- /**
871
- * SQL warehouse HTTP path (e.g., '/sql/1.0/warehouses/xxx')
872
- */
873
- http_path: string;
874
-
875
- /**
876
- * Name of the connection (snake_case: lowercase letters, numbers, underscores)
877
- */
878
- name: string;
879
-
880
- /**
881
- * Databricks server hostname (e.g., 'dbc-xxx.cloud.databricks.com')
882
- */
883
- server_hostname: string;
884
-
885
- /**
886
- * Warehouse type
887
- */
888
- warehouse_type: 'databricks';
889
-
890
- /**
891
- * Default timezone for the connection (e.g., 'UTC', 'America/New_York')
892
- */
893
- database_timezone?: string | null;
894
-
895
- /**
896
- * Description of the connection
897
- */
898
- description?: string | null;
899
-
900
- /**
901
- * Human-readable label for the connection (defaults to name if not set)
902
- */
903
- label?: string | null;
904
-
905
- /**
906
- * Query timeout in seconds (1-3600)
907
- */
908
- query_timeout?: number | null;
909
-
910
- /**
911
- * Timezone conversion mode: 'do_not_convert' or 'convert_to_utc'
912
- */
913
- query_timezone_conversion?: string | null;
914
- }
915
-
916
- export interface ClickHouseConnectionConfig {
917
- /**
918
- * Databases to include in the connection (at least one required)
919
- */
920
- databases: Array<DatabaseConfig>;
921
-
922
- /**
923
- * ClickHouse host
924
- */
925
- host: string;
926
-
927
- /**
928
- * Name of the connection (snake_case: lowercase letters, numbers, underscores)
929
- */
930
- name: string;
931
-
932
- /**
933
- * ClickHouse password
934
- */
935
- password: string;
936
-
937
- /**
938
- * ClickHouse username
939
- */
940
- username: string;
941
-
942
- /**
943
- * Warehouse type
944
- */
945
- warehouse_type: 'clickhouse';
946
-
947
- /**
948
- * Default timezone for the connection (e.g., 'UTC', 'America/New_York')
949
- */
950
- database_timezone?: string | null;
951
-
952
- /**
953
- * Description of the connection
954
- */
955
- description?: string | null;
956
-
957
- /**
958
- * Human-readable label for the connection (defaults to name if not set)
959
- */
960
- label?: string | null;
961
-
962
- /**
963
- * ClickHouse port
964
- */
965
- port?: number;
966
-
967
- /**
968
- * Query timeout in seconds (1-3600)
969
- */
970
- query_timeout?: number | null;
971
-
972
- /**
973
- * Timezone conversion mode: 'do_not_convert' or 'convert_to_utc'
974
- */
975
- query_timezone_conversion?: string | null;
976
- }
977
-
978
- export interface MssqlConnectionConfig {
979
- /**
980
- * Databases to include in the connection (at least one required)
981
- */
982
- databases: Array<DatabaseConfig>;
983
-
984
- /**
985
- * SQL Server host
986
- */
987
- host: string;
988
-
989
- /**
990
- * Name of the connection (snake_case: lowercase letters, numbers, underscores)
991
- */
992
- name: string;
993
-
994
- /**
995
- * SQL Server password
996
- */
997
- password: string;
998
-
999
- /**
1000
- * SQL Server username
1001
- */
1002
- username: string;
1003
-
1004
- /**
1005
- * Warehouse type
1006
- */
1007
- warehouse_type: 'mssql';
1008
-
1009
- /**
1010
- * Default timezone for the connection (e.g., 'UTC', 'America/New_York')
1011
- */
1012
- database_timezone?: string | null;
1013
-
1014
- /**
1015
- * Description of the connection
1016
- */
1017
- description?: string | null;
1018
-
1019
- /**
1020
- * Human-readable label for the connection (defaults to name if not set)
1021
- */
1022
- label?: string | null;
1023
-
1024
- /**
1025
- * SQL Server port
1026
- */
1027
- port?: number;
1028
-
1029
- /**
1030
- * Query timeout in seconds (1-3600)
1031
- */
1032
- query_timeout?: number | null;
1033
-
1034
- /**
1035
- * Timezone conversion mode: 'do_not_convert' or 'convert_to_utc'
1036
- */
1037
- query_timezone_conversion?: string | null;
1038
- }
1039
- }
1040
-
1041
- export interface ConnectionUpdateParams {
1042
- /**
1043
- * Connection description
1044
- */
1045
- description?: string | null;
1046
-
1047
- /**
1048
- * Human-readable display label
1049
- */
1050
- label?: string | null;
1051
-
1052
- /**
1053
- * Connection name (snake_case identifier)
1054
- */
1055
- name?: string | null;
1056
- }
1057
-
1058
- Connections.Databases = Databases;
1059
-
1060
- export declare namespace Connections {
1061
- export {
1062
- type Connection as Connection,
1063
- type DatabaseConfig as DatabaseConfig,
1064
- type ConnectionListResponse as ConnectionListResponse,
1065
- type ConnectionRetrieveCredentialResponse as ConnectionRetrieveCredentialResponse,
1066
- type ConnectionSyncResponse as ConnectionSyncResponse,
1067
- type ConnectionCreateParams as ConnectionCreateParams,
1068
- type ConnectionUpdateParams as ConnectionUpdateParams,
1069
- };
1070
-
1071
- export { Databases as Databases, type DatabaseDeleteSchemaParams as DatabaseDeleteSchemaParams };
1072
- }