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