@katerai/sdk 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/client.d.mts +1 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -0
- package/client.d.ts.map +1 -1
- package/client.js +8 -2
- package/client.js.map +1 -1
- package/client.mjs +8 -2
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/v1/connections/connections.d.mts +725 -102
- package/resources/v1/connections/connections.d.mts.map +1 -1
- package/resources/v1/connections/connections.d.ts +725 -102
- package/resources/v1/connections/connections.d.ts.map +1 -1
- package/resources/v1/connections/connections.js +77 -14
- package/resources/v1/connections/connections.js.map +1 -1
- package/resources/v1/connections/connections.mjs +77 -14
- package/resources/v1/connections/connections.mjs.map +1 -1
- package/resources/v1/connections/index.d.mts +3 -1
- package/resources/v1/connections/index.d.mts.map +1 -1
- package/resources/v1/connections/index.d.ts +3 -1
- package/resources/v1/connections/index.d.ts.map +1 -1
- package/resources/v1/connections/index.js +5 -1
- package/resources/v1/connections/index.js.map +1 -1
- package/resources/v1/connections/index.mjs +2 -0
- package/resources/v1/connections/index.mjs.map +1 -1
- package/resources/v1/connections/views.d.mts +77 -0
- package/resources/v1/connections/views.d.mts.map +1 -0
- package/resources/v1/connections/views.d.ts +77 -0
- package/resources/v1/connections/views.d.ts.map +1 -0
- package/resources/v1/connections/views.js +24 -0
- package/resources/v1/connections/views.js.map +1 -0
- package/resources/v1/connections/views.mjs +20 -0
- package/resources/v1/connections/views.mjs.map +1 -0
- package/resources/v1/connections/yaml.d.mts +57 -0
- package/resources/v1/connections/yaml.d.mts.map +1 -0
- package/resources/v1/connections/yaml.d.ts +57 -0
- package/resources/v1/connections/yaml.d.ts.map +1 -0
- package/resources/v1/connections/yaml.js +22 -0
- package/resources/v1/connections/yaml.js.map +1 -0
- package/resources/v1/connections/yaml.mjs +18 -0
- package/resources/v1/connections/yaml.mjs.map +1 -0
- package/resources/v1/github/github.d.mts +4 -0
- package/resources/v1/github/github.d.mts.map +1 -1
- package/resources/v1/github/github.d.ts +4 -0
- package/resources/v1/github/github.d.ts.map +1 -1
- package/resources/v1/github/github.js.map +1 -1
- package/resources/v1/github/github.mjs.map +1 -1
- package/resources/v1/index.d.mts +2 -2
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +2 -2
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/tenants/groups.d.mts +43 -0
- package/resources/v1/tenants/groups.d.mts.map +1 -0
- package/resources/v1/tenants/groups.d.ts +43 -0
- package/resources/v1/tenants/groups.d.ts.map +1 -0
- package/resources/v1/tenants/groups.js +20 -0
- package/resources/v1/tenants/groups.js.map +1 -0
- package/resources/v1/tenants/groups.mjs +16 -0
- package/resources/v1/tenants/groups.mjs.map +1 -0
- package/resources/v1/tenants/index.d.mts +2 -1
- package/resources/v1/tenants/index.d.mts.map +1 -1
- package/resources/v1/tenants/index.d.ts +2 -1
- package/resources/v1/tenants/index.d.ts.map +1 -1
- package/resources/v1/tenants/index.js +3 -1
- package/resources/v1/tenants/index.js.map +1 -1
- package/resources/v1/tenants/index.mjs +1 -0
- package/resources/v1/tenants/index.mjs.map +1 -1
- package/resources/v1/tenants/tenants.d.mts +44 -1
- package/resources/v1/tenants/tenants.d.mts.map +1 -1
- package/resources/v1/tenants/tenants.d.ts +44 -1
- package/resources/v1/tenants/tenants.d.ts.map +1 -1
- package/resources/v1/tenants/tenants.js +16 -0
- package/resources/v1/tenants/tenants.js.map +1 -1
- package/resources/v1/tenants/tenants.mjs +16 -0
- package/resources/v1/tenants/tenants.mjs.map +1 -1
- package/resources/v1/v1.d.mts +4 -4
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +4 -4
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/src/client.ts +9 -2
- package/src/internal/parse.ts +6 -0
- package/src/resources/v1/connections/connections.ts +948 -115
- package/src/resources/v1/connections/index.ts +20 -0
- package/src/resources/v1/connections/views.ts +112 -0
- package/src/resources/v1/connections/yaml.ts +81 -0
- package/src/resources/v1/github/github.ts +8 -0
- package/src/resources/v1/index.ts +13 -0
- package/src/resources/v1/tenants/groups.ts +52 -0
- package/src/resources/v1/tenants/index.ts +2 -0
- package/src/resources/v1/tenants/tenants.ts +54 -0
- package/src/resources/v1/v1.ts +26 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as DatabasesAPI from './databases';
|
|
5
5
|
import { DatabaseDeleteSchemaParams, Databases } from './databases';
|
|
6
|
+
import * as ViewsAPI from './views';
|
|
7
|
+
import { ViewListParams, ViewListResponse, ViewRetrieveParams, ViewRetrieveResponse, Views } from './views';
|
|
8
|
+
import * as YamlAPI from './yaml';
|
|
9
|
+
import { Yaml, YamlCommitParams, YamlCommitResponse, YamlRetrieveResponse } from './yaml';
|
|
6
10
|
import { APIPromise } from '../../../core/api-promise';
|
|
7
11
|
import { buildHeaders } from '../../../internal/headers';
|
|
8
12
|
import { RequestOptions } from '../../../internal/request-options';
|
|
@@ -10,22 +14,22 @@ import { path } from '../../../internal/utils/path';
|
|
|
10
14
|
|
|
11
15
|
export class Connections extends APIResource {
|
|
12
16
|
databases: DatabasesAPI.Databases = new DatabasesAPI.Databases(this._client);
|
|
17
|
+
views: ViewsAPI.Views = new ViewsAPI.Views(this._client);
|
|
18
|
+
yaml: YamlAPI.Yaml = new YamlAPI.Yaml(this._client);
|
|
13
19
|
|
|
14
20
|
/**
|
|
15
|
-
* Create a new warehouse connection.
|
|
21
|
+
* Create a new warehouse connection with PR approval flow.
|
|
16
22
|
*/
|
|
17
23
|
create(body: ConnectionCreateParams, options?: RequestOptions): APIPromise<Connection> {
|
|
18
24
|
return this._client.post('/api/v1/connections', { body, ...options });
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
/**
|
|
22
|
-
* Get a single warehouse connection by
|
|
28
|
+
* Get a single warehouse connection by ID.
|
|
23
29
|
*
|
|
24
|
-
* Returns connection from the database (source of truth) with full hierarchy.
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* - application/json (default): Returns JSON response
|
|
28
|
-
* - application/yaml: Returns YAML representation
|
|
30
|
+
* Returns connection from the database (source of truth) with full hierarchy. For
|
|
31
|
+
* YAML output compatible with repository files (using kater_id), use the GET
|
|
32
|
+
* /connections/{id}/schema endpoint instead.
|
|
29
33
|
*
|
|
30
34
|
* RLS: Filtered to current client (DualClientRLSDB).
|
|
31
35
|
*
|
|
@@ -53,16 +57,24 @@ export class Connections extends APIResource {
|
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
/**
|
|
56
|
-
* List
|
|
60
|
+
* List warehouse connections for the client.
|
|
61
|
+
*
|
|
62
|
+
* Filter connections by approval status using the `status` query parameter:
|
|
57
63
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
64
|
+
* - `approved` (default): Only approved connections (is_pending_approval=false)
|
|
65
|
+
* - `pending`: Only connections awaiting PR approval (is_pending_approval=true)
|
|
66
|
+
* - `all`: All connections regardless of approval status
|
|
67
|
+
*
|
|
68
|
+
* Pending connections include their approval PR URLs when available. Returns empty
|
|
69
|
+
* list if GitHub is not configured.
|
|
61
70
|
*
|
|
62
71
|
* RLS: Filtered to current client (DualClientRLSDB).
|
|
63
72
|
*/
|
|
64
|
-
list(
|
|
65
|
-
|
|
73
|
+
list(
|
|
74
|
+
query: ConnectionListParams | null | undefined = {},
|
|
75
|
+
options?: RequestOptions,
|
|
76
|
+
): APIPromise<ConnectionListResponse> {
|
|
77
|
+
return this._client.get('/api/v1/connections', { query, ...options });
|
|
66
78
|
}
|
|
67
79
|
|
|
68
80
|
/**
|
|
@@ -82,6 +94,36 @@ export class Connections extends APIResource {
|
|
|
82
94
|
});
|
|
83
95
|
}
|
|
84
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Merge the PR for a pending connection to finalize it.
|
|
99
|
+
*/
|
|
100
|
+
approve(connectionID: string, options?: RequestOptions): APIPromise<Connection> {
|
|
101
|
+
return this._client.post(path`/api/v1/connections/${connectionID}/approve`, options);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Merge the PR for a completed schema sync.
|
|
106
|
+
*/
|
|
107
|
+
approveSync(
|
|
108
|
+
syncID: string,
|
|
109
|
+
params: ConnectionApproveSyncParams,
|
|
110
|
+
options?: RequestOptions,
|
|
111
|
+
): APIPromise<ConnectionApproveSyncResponse> {
|
|
112
|
+
const { connection_id } = params;
|
|
113
|
+
return this._client.post(path`/api/v1/connections/${connection_id}/sync/${syncID}/approve`, options);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* List all schema sync records for a connection.
|
|
118
|
+
*/
|
|
119
|
+
listSyncs(
|
|
120
|
+
connectionID: string,
|
|
121
|
+
query: ConnectionListSyncsParams | null | undefined = {},
|
|
122
|
+
options?: RequestOptions,
|
|
123
|
+
): APIPromise<ConnectionListSyncsResponse> {
|
|
124
|
+
return this._client.get(path`/api/v1/connections/${connectionID}/sync`, { query, ...options });
|
|
125
|
+
}
|
|
126
|
+
|
|
85
127
|
/**
|
|
86
128
|
* Get decrypted warehouse credentials for a connection.
|
|
87
129
|
*
|
|
@@ -100,18 +142,70 @@ export class Connections extends APIResource {
|
|
|
100
142
|
}
|
|
101
143
|
|
|
102
144
|
/**
|
|
103
|
-
*
|
|
145
|
+
* Get connection as a ConnectionSchema object.
|
|
146
|
+
*
|
|
147
|
+
* Returns the connection in the YAML-compatible schema format with full
|
|
148
|
+
* database/schema hierarchy.
|
|
149
|
+
*
|
|
150
|
+
* RLS: Automatically filtered by client_id from auth context.
|
|
151
|
+
*
|
|
152
|
+
* Raises: ConnectionNotFoundError: If connection not found or deleted.
|
|
153
|
+
*/
|
|
154
|
+
retrieveSchema(
|
|
155
|
+
connectionID: string,
|
|
156
|
+
options?: RequestOptions,
|
|
157
|
+
): APIPromise<ConnectionRetrieveSchemaResponse> {
|
|
158
|
+
return this._client.get(path`/api/v1/connections/${connectionID}/schema`, options);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Get the current status of a schema sync workflow.
|
|
163
|
+
*/
|
|
164
|
+
retrieveSyncStatus(
|
|
165
|
+
syncID: string,
|
|
166
|
+
params: ConnectionRetrieveSyncStatusParams,
|
|
167
|
+
options?: RequestOptions,
|
|
168
|
+
): APIPromise<ConnectionRetrieveSyncStatusResponse> {
|
|
169
|
+
const { connection_id } = params;
|
|
170
|
+
return this._client.get(path`/api/v1/connections/${connection_id}/sync/${syncID}`, options);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Server-Sent Events stream for real-time sync progress updates.
|
|
175
|
+
*/
|
|
176
|
+
streamSyncProgress(
|
|
177
|
+
syncID: string,
|
|
178
|
+
params: ConnectionStreamSyncProgressParams,
|
|
179
|
+
options?: RequestOptions,
|
|
180
|
+
): APIPromise<unknown> {
|
|
181
|
+
const { connection_id } = params;
|
|
182
|
+
return this._client.get(path`/api/v1/connections/${connection_id}/sync/${syncID}/stream`, options);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Start a schema sync workflow. Returns 202 Accepted with sync_id.
|
|
104
187
|
*/
|
|
105
188
|
sync(connectionID: string, options?: RequestOptions): APIPromise<ConnectionSyncResponse> {
|
|
106
189
|
return this._client.post(path`/api/v1/connections/${connectionID}/sync`, options);
|
|
107
190
|
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Test and update warehouse credentials without modifying connection config.
|
|
194
|
+
*/
|
|
195
|
+
updateCredentials(
|
|
196
|
+
connectionID: string,
|
|
197
|
+
body: ConnectionUpdateCredentialsParams,
|
|
198
|
+
options?: RequestOptions,
|
|
199
|
+
): APIPromise<ConnectionUpdateCredentialsResponse> {
|
|
200
|
+
return this._client.patch(path`/api/v1/connections/${connectionID}/credentials`, { body, ...options });
|
|
201
|
+
}
|
|
108
202
|
}
|
|
109
203
|
|
|
110
204
|
/**
|
|
111
205
|
* Response model for a single connection.
|
|
112
206
|
*
|
|
113
|
-
* All data comes from the database (source of truth).
|
|
114
|
-
*
|
|
207
|
+
* All data comes from the database (source of truth). For YAML-compatible output
|
|
208
|
+
* with 'kater_id', use the /schema endpoint instead.
|
|
115
209
|
*/
|
|
116
210
|
export interface Connection {
|
|
117
211
|
/**
|
|
@@ -149,9 +243,9 @@ export interface Connection {
|
|
|
149
243
|
*/
|
|
150
244
|
warehouse_metadata:
|
|
151
245
|
| Connection.SnowflakeMetadata
|
|
152
|
-
| Connection.
|
|
246
|
+
| Connection.PostgresqlMetadata
|
|
153
247
|
| Connection.DatabricksMetadata
|
|
154
|
-
| Connection.
|
|
248
|
+
| Connection.ClickhouseMetadata
|
|
155
249
|
| Connection.MssqlMetadata;
|
|
156
250
|
|
|
157
251
|
/**
|
|
@@ -160,15 +254,20 @@ export interface Connection {
|
|
|
160
254
|
warehouse_type: string;
|
|
161
255
|
|
|
162
256
|
/**
|
|
163
|
-
*
|
|
257
|
+
* GitHub PR URL for approving the connection (None if already approved)
|
|
164
258
|
*/
|
|
165
|
-
|
|
259
|
+
approval_pr_url?: string | null;
|
|
166
260
|
|
|
167
261
|
/**
|
|
168
262
|
* Connection description
|
|
169
263
|
*/
|
|
170
264
|
description?: string | null;
|
|
171
265
|
|
|
266
|
+
/**
|
|
267
|
+
* True if this connection is awaiting PR approval
|
|
268
|
+
*/
|
|
269
|
+
is_pending_approval?: boolean;
|
|
270
|
+
|
|
172
271
|
/**
|
|
173
272
|
* Human-readable label
|
|
174
273
|
*/
|
|
@@ -183,11 +282,6 @@ export interface Connection {
|
|
|
183
282
|
* Timezone conversion mode (do_not_convert, convert_to_utc)
|
|
184
283
|
*/
|
|
185
284
|
query_timezone_conversion?: string | null;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Sync identifier for schema sync
|
|
189
|
-
*/
|
|
190
|
-
sync_id?: string | null;
|
|
191
285
|
}
|
|
192
286
|
|
|
193
287
|
export namespace Connection {
|
|
@@ -263,9 +357,6 @@ export namespace Connection {
|
|
|
263
357
|
}
|
|
264
358
|
}
|
|
265
359
|
|
|
266
|
-
/**
|
|
267
|
-
* Snowflake-specific warehouse metadata.
|
|
268
|
-
*/
|
|
269
360
|
export interface SnowflakeMetadata {
|
|
270
361
|
/**
|
|
271
362
|
* Authentication method
|
|
@@ -283,42 +374,30 @@ export namespace Connection {
|
|
|
283
374
|
snowflake_account_id: string;
|
|
284
375
|
|
|
285
376
|
/**
|
|
286
|
-
*
|
|
377
|
+
* Snowflake compute warehouse name
|
|
287
378
|
*/
|
|
288
379
|
warehouse: string;
|
|
289
380
|
|
|
290
|
-
/**
|
|
291
|
-
* Warehouse type discriminator
|
|
292
|
-
*/
|
|
293
381
|
warehouse_type: 'snowflake';
|
|
294
382
|
}
|
|
295
383
|
|
|
296
|
-
|
|
297
|
-
* PostgreSQL-specific warehouse metadata.
|
|
298
|
-
*/
|
|
299
|
-
export interface PostgresMetadata {
|
|
384
|
+
export interface PostgresqlMetadata {
|
|
300
385
|
/**
|
|
301
|
-
* Database host
|
|
386
|
+
* Database host address
|
|
302
387
|
*/
|
|
303
388
|
host: string;
|
|
304
389
|
|
|
305
390
|
/**
|
|
306
|
-
* Database port
|
|
391
|
+
* Database port (default: 5432)
|
|
307
392
|
*/
|
|
308
393
|
port: number;
|
|
309
394
|
|
|
310
|
-
/**
|
|
311
|
-
* Warehouse type discriminator
|
|
312
|
-
*/
|
|
313
395
|
warehouse_type: 'postgresql';
|
|
314
396
|
}
|
|
315
397
|
|
|
316
|
-
/**
|
|
317
|
-
* Databricks-specific warehouse metadata.
|
|
318
|
-
*/
|
|
319
398
|
export interface DatabricksMetadata {
|
|
320
399
|
/**
|
|
321
|
-
* SQL warehouse HTTP path
|
|
400
|
+
* Databricks SQL warehouse HTTP path
|
|
322
401
|
*/
|
|
323
402
|
http_path: string;
|
|
324
403
|
|
|
@@ -327,49 +406,34 @@ export namespace Connection {
|
|
|
327
406
|
*/
|
|
328
407
|
server_hostname: string;
|
|
329
408
|
|
|
330
|
-
/**
|
|
331
|
-
* Warehouse type discriminator
|
|
332
|
-
*/
|
|
333
409
|
warehouse_type: 'databricks';
|
|
334
410
|
}
|
|
335
411
|
|
|
336
|
-
|
|
337
|
-
* ClickHouse-specific warehouse metadata.
|
|
338
|
-
*/
|
|
339
|
-
export interface ClickHouseMetadata {
|
|
412
|
+
export interface ClickhouseMetadata {
|
|
340
413
|
/**
|
|
341
|
-
* ClickHouse host
|
|
414
|
+
* ClickHouse host address
|
|
342
415
|
*/
|
|
343
416
|
host: string;
|
|
344
417
|
|
|
345
418
|
/**
|
|
346
|
-
* ClickHouse port
|
|
419
|
+
* ClickHouse port (default: 8443)
|
|
347
420
|
*/
|
|
348
421
|
port: number;
|
|
349
422
|
|
|
350
|
-
/**
|
|
351
|
-
* Warehouse type discriminator
|
|
352
|
-
*/
|
|
353
423
|
warehouse_type: 'clickhouse';
|
|
354
424
|
}
|
|
355
425
|
|
|
356
|
-
/**
|
|
357
|
-
* Microsoft SQL Server-specific warehouse metadata.
|
|
358
|
-
*/
|
|
359
426
|
export interface MssqlMetadata {
|
|
360
427
|
/**
|
|
361
|
-
* SQL Server host
|
|
428
|
+
* SQL Server host address
|
|
362
429
|
*/
|
|
363
430
|
host: string;
|
|
364
431
|
|
|
365
432
|
/**
|
|
366
|
-
* SQL Server port
|
|
433
|
+
* SQL Server port (default: 1433)
|
|
367
434
|
*/
|
|
368
435
|
port: number;
|
|
369
436
|
|
|
370
|
-
/**
|
|
371
|
-
* Warehouse type discriminator
|
|
372
|
-
*/
|
|
373
437
|
warehouse_type: 'mssql';
|
|
374
438
|
}
|
|
375
439
|
}
|
|
@@ -379,9 +443,9 @@ export namespace Connection {
|
|
|
379
443
|
*/
|
|
380
444
|
export interface DatabaseConfig {
|
|
381
445
|
/**
|
|
382
|
-
*
|
|
446
|
+
* Database name (also used as the warehouse object name)
|
|
383
447
|
*/
|
|
384
|
-
|
|
448
|
+
name: string;
|
|
385
449
|
|
|
386
450
|
/**
|
|
387
451
|
* Description of the database
|
|
@@ -393,11 +457,6 @@ export interface DatabaseConfig {
|
|
|
393
457
|
*/
|
|
394
458
|
label?: string | null;
|
|
395
459
|
|
|
396
|
-
/**
|
|
397
|
-
* Database name (defaults to database_object_name if not set)
|
|
398
|
-
*/
|
|
399
|
-
name?: string | null;
|
|
400
|
-
|
|
401
460
|
/**
|
|
402
461
|
* Schema configurations to include (empty = discover all schemas)
|
|
403
462
|
*/
|
|
@@ -415,9 +474,9 @@ export namespace DatabaseConfig {
|
|
|
415
474
|
*/
|
|
416
475
|
export interface Schema {
|
|
417
476
|
/**
|
|
418
|
-
*
|
|
477
|
+
* Schema name (also used as the warehouse object name)
|
|
419
478
|
*/
|
|
420
|
-
|
|
479
|
+
name: string;
|
|
421
480
|
|
|
422
481
|
/**
|
|
423
482
|
* Description of the schema
|
|
@@ -428,15 +487,272 @@ export namespace DatabaseConfig {
|
|
|
428
487
|
* Human-readable label for the schema (defaults to name if not set)
|
|
429
488
|
*/
|
|
430
489
|
label?: string | null;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export type ConnectionListResponse = Array<Connection>;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Response for sync status endpoint.
|
|
497
|
+
*
|
|
498
|
+
* Contains full sync state including progress and results.
|
|
499
|
+
*/
|
|
500
|
+
export interface ConnectionApproveSyncResponse {
|
|
501
|
+
/**
|
|
502
|
+
* Connection ID
|
|
503
|
+
*/
|
|
504
|
+
connection_id: string;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Sync creation timestamp
|
|
508
|
+
*/
|
|
509
|
+
created_at: string;
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Workflow status: queued, running, succeeded, failed, canceled
|
|
513
|
+
*/
|
|
514
|
+
run_status: string;
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* Schema sync record ID
|
|
518
|
+
*/
|
|
519
|
+
sync_id: string;
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Workflow completion timestamp
|
|
523
|
+
*/
|
|
524
|
+
completed_at?: string | null;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Current workflow step
|
|
528
|
+
*/
|
|
529
|
+
current_step?: string | null;
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* Error message if failed
|
|
533
|
+
*/
|
|
534
|
+
error_message?: string | null;
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Sync event history
|
|
538
|
+
*/
|
|
539
|
+
events?: Array<ConnectionApproveSyncResponse.Event>;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Hatchet workflow run ID
|
|
543
|
+
*/
|
|
544
|
+
hatchet_run_id?: string | null;
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* GitHub PR number
|
|
548
|
+
*/
|
|
549
|
+
pr_number?: number | null;
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* PR status: open, merged, closed
|
|
553
|
+
*/
|
|
554
|
+
pr_status?: string | null;
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* GitHub PR URL
|
|
558
|
+
*/
|
|
559
|
+
pr_url?: string | null;
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Workflow start timestamp
|
|
563
|
+
*/
|
|
564
|
+
started_at?: string | null;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Number of views deleted
|
|
568
|
+
*/
|
|
569
|
+
views_deleted?: number | null;
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* Number of new views added
|
|
573
|
+
*/
|
|
574
|
+
views_inserted?: number | null;
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Number of views renamed (subset of updated)
|
|
578
|
+
*/
|
|
579
|
+
views_renamed?: number | null;
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Number of views updated (dimension changes or renames)
|
|
583
|
+
*/
|
|
584
|
+
views_updated?: number | null;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
export namespace ConnectionApproveSyncResponse {
|
|
588
|
+
/**
|
|
589
|
+
* Response model for a single sync event.
|
|
590
|
+
*/
|
|
591
|
+
export interface Event {
|
|
592
|
+
/**
|
|
593
|
+
* Event ID
|
|
594
|
+
*/
|
|
595
|
+
id: string;
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* Event timestamp
|
|
599
|
+
*/
|
|
600
|
+
created_at: string;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Event type: step_started, step_completed, progress, warning, error
|
|
604
|
+
*/
|
|
605
|
+
event_type: string;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Human-readable event message
|
|
609
|
+
*/
|
|
610
|
+
message: string;
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* Additional event data
|
|
614
|
+
*/
|
|
615
|
+
metadata?: { [key: string]: unknown };
|
|
431
616
|
|
|
432
617
|
/**
|
|
433
|
-
*
|
|
618
|
+
* Step name if applicable
|
|
434
619
|
*/
|
|
435
|
-
|
|
620
|
+
step_name?: string | null;
|
|
436
621
|
}
|
|
437
622
|
}
|
|
438
623
|
|
|
439
|
-
export type
|
|
624
|
+
export type ConnectionListSyncsResponse = Array<ConnectionListSyncsResponse.ConnectionListSyncsResponseItem>;
|
|
625
|
+
|
|
626
|
+
export namespace ConnectionListSyncsResponse {
|
|
627
|
+
/**
|
|
628
|
+
* Response for sync status endpoint.
|
|
629
|
+
*
|
|
630
|
+
* Contains full sync state including progress and results.
|
|
631
|
+
*/
|
|
632
|
+
export interface ConnectionListSyncsResponseItem {
|
|
633
|
+
/**
|
|
634
|
+
* Connection ID
|
|
635
|
+
*/
|
|
636
|
+
connection_id: string;
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Sync creation timestamp
|
|
640
|
+
*/
|
|
641
|
+
created_at: string;
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Workflow status: queued, running, succeeded, failed, canceled
|
|
645
|
+
*/
|
|
646
|
+
run_status: string;
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Schema sync record ID
|
|
650
|
+
*/
|
|
651
|
+
sync_id: string;
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* Workflow completion timestamp
|
|
655
|
+
*/
|
|
656
|
+
completed_at?: string | null;
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* Current workflow step
|
|
660
|
+
*/
|
|
661
|
+
current_step?: string | null;
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* Error message if failed
|
|
665
|
+
*/
|
|
666
|
+
error_message?: string | null;
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* Sync event history
|
|
670
|
+
*/
|
|
671
|
+
events?: Array<ConnectionListSyncsResponseItem.Event>;
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* Hatchet workflow run ID
|
|
675
|
+
*/
|
|
676
|
+
hatchet_run_id?: string | null;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* GitHub PR number
|
|
680
|
+
*/
|
|
681
|
+
pr_number?: number | null;
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* PR status: open, merged, closed
|
|
685
|
+
*/
|
|
686
|
+
pr_status?: string | null;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* GitHub PR URL
|
|
690
|
+
*/
|
|
691
|
+
pr_url?: string | null;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Workflow start timestamp
|
|
695
|
+
*/
|
|
696
|
+
started_at?: string | null;
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Number of views deleted
|
|
700
|
+
*/
|
|
701
|
+
views_deleted?: number | null;
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Number of new views added
|
|
705
|
+
*/
|
|
706
|
+
views_inserted?: number | null;
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Number of views renamed (subset of updated)
|
|
710
|
+
*/
|
|
711
|
+
views_renamed?: number | null;
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* Number of views updated (dimension changes or renames)
|
|
715
|
+
*/
|
|
716
|
+
views_updated?: number | null;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
export namespace ConnectionListSyncsResponseItem {
|
|
720
|
+
/**
|
|
721
|
+
* Response model for a single sync event.
|
|
722
|
+
*/
|
|
723
|
+
export interface Event {
|
|
724
|
+
/**
|
|
725
|
+
* Event ID
|
|
726
|
+
*/
|
|
727
|
+
id: string;
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Event timestamp
|
|
731
|
+
*/
|
|
732
|
+
created_at: string;
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Event type: step_started, step_completed, progress, warning, error
|
|
736
|
+
*/
|
|
737
|
+
event_type: string;
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* Human-readable event message
|
|
741
|
+
*/
|
|
742
|
+
message: string;
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Additional event data
|
|
746
|
+
*/
|
|
747
|
+
metadata?: { [key: string]: unknown };
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Step name if applicable
|
|
751
|
+
*/
|
|
752
|
+
step_name?: string | null;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
}
|
|
440
756
|
|
|
441
757
|
/**
|
|
442
758
|
* PostgreSQL credential response.
|
|
@@ -655,31 +971,399 @@ export namespace ConnectionRetrieveCredentialResponse {
|
|
|
655
971
|
}
|
|
656
972
|
|
|
657
973
|
/**
|
|
658
|
-
*
|
|
659
|
-
*
|
|
660
|
-
* Returned after successfully creating a PR with merged ViewSchema files, or
|
|
661
|
-
* indicating that all views are already up to date.
|
|
974
|
+
* Schema for Kater connection configuration files
|
|
662
975
|
*/
|
|
663
|
-
export interface
|
|
976
|
+
export interface ConnectionRetrieveSchemaResponse {
|
|
664
977
|
/**
|
|
665
|
-
*
|
|
978
|
+
* Unique identifier for the connection
|
|
666
979
|
*/
|
|
667
|
-
|
|
980
|
+
kater_id: string;
|
|
668
981
|
|
|
669
982
|
/**
|
|
670
|
-
*
|
|
983
|
+
* Name of the connection
|
|
671
984
|
*/
|
|
672
|
-
|
|
985
|
+
name: string;
|
|
673
986
|
|
|
674
987
|
/**
|
|
675
|
-
*
|
|
988
|
+
* Warehouse-specific configuration (non-sensitive)
|
|
676
989
|
*/
|
|
677
|
-
|
|
990
|
+
warehouse_metadata:
|
|
991
|
+
| ConnectionRetrieveSchemaResponse.SnowflakeMetadata
|
|
992
|
+
| ConnectionRetrieveSchemaResponse.PostgresqlMetadata
|
|
993
|
+
| ConnectionRetrieveSchemaResponse.DatabricksMetadata
|
|
994
|
+
| ConnectionRetrieveSchemaResponse.ClickhouseMetadata
|
|
995
|
+
| ConnectionRetrieveSchemaResponse.MssqlMetadata;
|
|
678
996
|
|
|
679
997
|
/**
|
|
680
|
-
*
|
|
998
|
+
* Additional context for AI processing
|
|
681
999
|
*/
|
|
682
|
-
|
|
1000
|
+
ai_context?: string | null;
|
|
1001
|
+
|
|
1002
|
+
/**
|
|
1003
|
+
* Custom properties
|
|
1004
|
+
*/
|
|
1005
|
+
custom_properties?: { [key: string]: unknown } | null;
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* List of databases in this connection
|
|
1009
|
+
*/
|
|
1010
|
+
databases?: Array<ConnectionRetrieveSchemaResponse.Database> | null;
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* Description of the connection
|
|
1014
|
+
*/
|
|
1015
|
+
description?: string | null;
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* Human-readable label for the connection
|
|
1019
|
+
*/
|
|
1020
|
+
label?: string | null;
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Query timeout in seconds
|
|
1024
|
+
*/
|
|
1025
|
+
query_timeout?: number;
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* Timezone conversion mode for queries
|
|
1029
|
+
*/
|
|
1030
|
+
query_timezone_conversion?: 'do_not_convert' | 'convert_to_utc';
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
export namespace ConnectionRetrieveSchemaResponse {
|
|
1034
|
+
export interface SnowflakeMetadata {
|
|
1035
|
+
/**
|
|
1036
|
+
* Authentication method
|
|
1037
|
+
*/
|
|
1038
|
+
auth_method: 'username_password' | 'key_pair';
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* Snowflake role
|
|
1042
|
+
*/
|
|
1043
|
+
role: string;
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* Snowflake account identifier
|
|
1047
|
+
*/
|
|
1048
|
+
snowflake_account_id: string;
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* Snowflake compute warehouse name
|
|
1052
|
+
*/
|
|
1053
|
+
warehouse: string;
|
|
1054
|
+
|
|
1055
|
+
warehouse_type: 'snowflake';
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
export interface PostgresqlMetadata {
|
|
1059
|
+
/**
|
|
1060
|
+
* Database host address
|
|
1061
|
+
*/
|
|
1062
|
+
host: string;
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* Database port (default: 5432)
|
|
1066
|
+
*/
|
|
1067
|
+
port: number;
|
|
1068
|
+
|
|
1069
|
+
warehouse_type: 'postgresql';
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
export interface DatabricksMetadata {
|
|
1073
|
+
/**
|
|
1074
|
+
* Databricks SQL warehouse HTTP path
|
|
1075
|
+
*/
|
|
1076
|
+
http_path: string;
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* Databricks server hostname
|
|
1080
|
+
*/
|
|
1081
|
+
server_hostname: string;
|
|
1082
|
+
|
|
1083
|
+
warehouse_type: 'databricks';
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
export interface ClickhouseMetadata {
|
|
1087
|
+
/**
|
|
1088
|
+
* ClickHouse host address
|
|
1089
|
+
*/
|
|
1090
|
+
host: string;
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* ClickHouse port (default: 8443)
|
|
1094
|
+
*/
|
|
1095
|
+
port: number;
|
|
1096
|
+
|
|
1097
|
+
warehouse_type: 'clickhouse';
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
export interface MssqlMetadata {
|
|
1101
|
+
/**
|
|
1102
|
+
* SQL Server host address
|
|
1103
|
+
*/
|
|
1104
|
+
host: string;
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* SQL Server port (default: 1433)
|
|
1108
|
+
*/
|
|
1109
|
+
port: number;
|
|
1110
|
+
|
|
1111
|
+
warehouse_type: 'mssql';
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
export interface Database {
|
|
1115
|
+
/**
|
|
1116
|
+
* The actual name of the database object in the warehouse
|
|
1117
|
+
*/
|
|
1118
|
+
database_object_name: string;
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* Unique identifier for the database
|
|
1122
|
+
*/
|
|
1123
|
+
kater_id: string;
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* Name of the database
|
|
1127
|
+
*/
|
|
1128
|
+
name: string;
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
1131
|
+
* Additional context for AI processing
|
|
1132
|
+
*/
|
|
1133
|
+
ai_context?: string | null;
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* Custom properties
|
|
1137
|
+
*/
|
|
1138
|
+
custom_properties?: { [key: string]: unknown } | null;
|
|
1139
|
+
|
|
1140
|
+
/**
|
|
1141
|
+
* Description of the database
|
|
1142
|
+
*/
|
|
1143
|
+
description?: string | null;
|
|
1144
|
+
|
|
1145
|
+
/**
|
|
1146
|
+
* Human-readable label for the database
|
|
1147
|
+
*/
|
|
1148
|
+
label?: string | null;
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* List of schemas in this database
|
|
1152
|
+
*/
|
|
1153
|
+
schemas?: Array<Database.Schema> | null;
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* Timezone for the database
|
|
1157
|
+
*/
|
|
1158
|
+
timezone?: string | null;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
export namespace Database {
|
|
1162
|
+
export interface Schema {
|
|
1163
|
+
/**
|
|
1164
|
+
* The actual name of the schema object in the warehouse
|
|
1165
|
+
*/
|
|
1166
|
+
database_object_name: string;
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* Unique identifier for the schema
|
|
1170
|
+
*/
|
|
1171
|
+
kater_id: string;
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* Name of the schema
|
|
1175
|
+
*/
|
|
1176
|
+
name: string;
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* Additional context for AI processing
|
|
1180
|
+
*/
|
|
1181
|
+
ai_context?: string | null;
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* Custom properties
|
|
1185
|
+
*/
|
|
1186
|
+
custom_properties?: { [key: string]: unknown } | null;
|
|
1187
|
+
|
|
1188
|
+
/**
|
|
1189
|
+
* Description of the schema
|
|
1190
|
+
*/
|
|
1191
|
+
description?: string | null;
|
|
1192
|
+
|
|
1193
|
+
/**
|
|
1194
|
+
* Human-readable label for the schema
|
|
1195
|
+
*/
|
|
1196
|
+
label?: string | null;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
/**
|
|
1202
|
+
* Response for sync status endpoint.
|
|
1203
|
+
*
|
|
1204
|
+
* Contains full sync state including progress and results.
|
|
1205
|
+
*/
|
|
1206
|
+
export interface ConnectionRetrieveSyncStatusResponse {
|
|
1207
|
+
/**
|
|
1208
|
+
* Connection ID
|
|
1209
|
+
*/
|
|
1210
|
+
connection_id: string;
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* Sync creation timestamp
|
|
1214
|
+
*/
|
|
1215
|
+
created_at: string;
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* Workflow status: queued, running, succeeded, failed, canceled
|
|
1219
|
+
*/
|
|
1220
|
+
run_status: string;
|
|
1221
|
+
|
|
1222
|
+
/**
|
|
1223
|
+
* Schema sync record ID
|
|
1224
|
+
*/
|
|
1225
|
+
sync_id: string;
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* Workflow completion timestamp
|
|
1229
|
+
*/
|
|
1230
|
+
completed_at?: string | null;
|
|
1231
|
+
|
|
1232
|
+
/**
|
|
1233
|
+
* Current workflow step
|
|
1234
|
+
*/
|
|
1235
|
+
current_step?: string | null;
|
|
1236
|
+
|
|
1237
|
+
/**
|
|
1238
|
+
* Error message if failed
|
|
1239
|
+
*/
|
|
1240
|
+
error_message?: string | null;
|
|
1241
|
+
|
|
1242
|
+
/**
|
|
1243
|
+
* Sync event history
|
|
1244
|
+
*/
|
|
1245
|
+
events?: Array<ConnectionRetrieveSyncStatusResponse.Event>;
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* Hatchet workflow run ID
|
|
1249
|
+
*/
|
|
1250
|
+
hatchet_run_id?: string | null;
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
* GitHub PR number
|
|
1254
|
+
*/
|
|
1255
|
+
pr_number?: number | null;
|
|
1256
|
+
|
|
1257
|
+
/**
|
|
1258
|
+
* PR status: open, merged, closed
|
|
1259
|
+
*/
|
|
1260
|
+
pr_status?: string | null;
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
* GitHub PR URL
|
|
1264
|
+
*/
|
|
1265
|
+
pr_url?: string | null;
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* Workflow start timestamp
|
|
1269
|
+
*/
|
|
1270
|
+
started_at?: string | null;
|
|
1271
|
+
|
|
1272
|
+
/**
|
|
1273
|
+
* Number of views deleted
|
|
1274
|
+
*/
|
|
1275
|
+
views_deleted?: number | null;
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* Number of new views added
|
|
1279
|
+
*/
|
|
1280
|
+
views_inserted?: number | null;
|
|
1281
|
+
|
|
1282
|
+
/**
|
|
1283
|
+
* Number of views renamed (subset of updated)
|
|
1284
|
+
*/
|
|
1285
|
+
views_renamed?: number | null;
|
|
1286
|
+
|
|
1287
|
+
/**
|
|
1288
|
+
* Number of views updated (dimension changes or renames)
|
|
1289
|
+
*/
|
|
1290
|
+
views_updated?: number | null;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
export namespace ConnectionRetrieveSyncStatusResponse {
|
|
1294
|
+
/**
|
|
1295
|
+
* Response model for a single sync event.
|
|
1296
|
+
*/
|
|
1297
|
+
export interface Event {
|
|
1298
|
+
/**
|
|
1299
|
+
* Event ID
|
|
1300
|
+
*/
|
|
1301
|
+
id: string;
|
|
1302
|
+
|
|
1303
|
+
/**
|
|
1304
|
+
* Event timestamp
|
|
1305
|
+
*/
|
|
1306
|
+
created_at: string;
|
|
1307
|
+
|
|
1308
|
+
/**
|
|
1309
|
+
* Event type: step_started, step_completed, progress, warning, error
|
|
1310
|
+
*/
|
|
1311
|
+
event_type: string;
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* Human-readable event message
|
|
1315
|
+
*/
|
|
1316
|
+
message: string;
|
|
1317
|
+
|
|
1318
|
+
/**
|
|
1319
|
+
* Additional event data
|
|
1320
|
+
*/
|
|
1321
|
+
metadata?: { [key: string]: unknown };
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
* Step name if applicable
|
|
1325
|
+
*/
|
|
1326
|
+
step_name?: string | null;
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
export type ConnectionStreamSyncProgressResponse = unknown;
|
|
1331
|
+
|
|
1332
|
+
/**
|
|
1333
|
+
* Response for starting a schema sync.
|
|
1334
|
+
*
|
|
1335
|
+
* Returned with 202 Accepted when sync workflow is successfully queued.
|
|
1336
|
+
*/
|
|
1337
|
+
export interface ConnectionSyncResponse {
|
|
1338
|
+
/**
|
|
1339
|
+
* Schema sync record ID
|
|
1340
|
+
*/
|
|
1341
|
+
sync_id: string;
|
|
1342
|
+
|
|
1343
|
+
/**
|
|
1344
|
+
* Hatchet workflow run ID
|
|
1345
|
+
*/
|
|
1346
|
+
hatchet_run_id?: string | null;
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* Current sync status
|
|
1350
|
+
*/
|
|
1351
|
+
status?: string;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* Response for credential update.
|
|
1356
|
+
*/
|
|
1357
|
+
export interface ConnectionUpdateCredentialsResponse {
|
|
1358
|
+
/**
|
|
1359
|
+
* Connection ID
|
|
1360
|
+
*/
|
|
1361
|
+
connection_id: string;
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* Whether the credential update was successful
|
|
1365
|
+
*/
|
|
1366
|
+
success: boolean;
|
|
683
1367
|
}
|
|
684
1368
|
|
|
685
1369
|
export type ConnectionCreateParams =
|
|
@@ -721,11 +1405,6 @@ export declare namespace ConnectionCreateParams {
|
|
|
721
1405
|
*/
|
|
722
1406
|
warehouse_type: 'postgresql';
|
|
723
1407
|
|
|
724
|
-
/**
|
|
725
|
-
* Default timezone for the connection (e.g., 'UTC', 'America/New_York')
|
|
726
|
-
*/
|
|
727
|
-
database_timezone?: string | null;
|
|
728
|
-
|
|
729
1408
|
/**
|
|
730
1409
|
* Description of the connection
|
|
731
1410
|
*/
|
|
@@ -793,11 +1472,6 @@ export declare namespace ConnectionCreateParams {
|
|
|
793
1472
|
*/
|
|
794
1473
|
warehouse_type: 'snowflake';
|
|
795
1474
|
|
|
796
|
-
/**
|
|
797
|
-
* Default timezone for the connection (e.g., 'UTC', 'America/New_York')
|
|
798
|
-
*/
|
|
799
|
-
database_timezone?: string | null;
|
|
800
|
-
|
|
801
1475
|
/**
|
|
802
1476
|
* Description of the connection
|
|
803
1477
|
*/
|
|
@@ -887,11 +1561,6 @@ export declare namespace ConnectionCreateParams {
|
|
|
887
1561
|
*/
|
|
888
1562
|
warehouse_type: 'databricks';
|
|
889
1563
|
|
|
890
|
-
/**
|
|
891
|
-
* Default timezone for the connection (e.g., 'UTC', 'America/New_York')
|
|
892
|
-
*/
|
|
893
|
-
database_timezone?: string | null;
|
|
894
|
-
|
|
895
1564
|
/**
|
|
896
1565
|
* Description of the connection
|
|
897
1566
|
*/
|
|
@@ -944,11 +1613,6 @@ export declare namespace ConnectionCreateParams {
|
|
|
944
1613
|
*/
|
|
945
1614
|
warehouse_type: 'clickhouse';
|
|
946
1615
|
|
|
947
|
-
/**
|
|
948
|
-
* Default timezone for the connection (e.g., 'UTC', 'America/New_York')
|
|
949
|
-
*/
|
|
950
|
-
database_timezone?: string | null;
|
|
951
|
-
|
|
952
1616
|
/**
|
|
953
1617
|
* Description of the connection
|
|
954
1618
|
*/
|
|
@@ -1006,11 +1670,6 @@ export declare namespace ConnectionCreateParams {
|
|
|
1006
1670
|
*/
|
|
1007
1671
|
warehouse_type: 'mssql';
|
|
1008
1672
|
|
|
1009
|
-
/**
|
|
1010
|
-
* Default timezone for the connection (e.g., 'UTC', 'America/New_York')
|
|
1011
|
-
*/
|
|
1012
|
-
database_timezone?: string | null;
|
|
1013
|
-
|
|
1014
1673
|
/**
|
|
1015
1674
|
* Description of the connection
|
|
1016
1675
|
*/
|
|
@@ -1055,18 +1714,192 @@ export interface ConnectionUpdateParams {
|
|
|
1055
1714
|
name?: string | null;
|
|
1056
1715
|
}
|
|
1057
1716
|
|
|
1717
|
+
export interface ConnectionListParams {
|
|
1718
|
+
status?: 'approved' | 'pending' | 'all';
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
export interface ConnectionApproveSyncParams {
|
|
1722
|
+
connection_id: string;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
export interface ConnectionListSyncsParams {
|
|
1726
|
+
limit?: number;
|
|
1727
|
+
|
|
1728
|
+
offset?: number;
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
export interface ConnectionRetrieveSyncStatusParams {
|
|
1732
|
+
connection_id: string;
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
export interface ConnectionStreamSyncProgressParams {
|
|
1736
|
+
connection_id: string;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
export type ConnectionUpdateCredentialsParams =
|
|
1740
|
+
| ConnectionUpdateCredentialsParams.PostgreSqlCredentialUpdate
|
|
1741
|
+
| ConnectionUpdateCredentialsParams.SnowflakeCredentialUpdate
|
|
1742
|
+
| ConnectionUpdateCredentialsParams.DatabricksCredentialUpdate
|
|
1743
|
+
| ConnectionUpdateCredentialsParams.ClickHouseCredentialUpdate
|
|
1744
|
+
| ConnectionUpdateCredentialsParams.MssqlCredentialUpdate;
|
|
1745
|
+
|
|
1746
|
+
export declare namespace ConnectionUpdateCredentialsParams {
|
|
1747
|
+
export interface PostgreSqlCredentialUpdate {
|
|
1748
|
+
/**
|
|
1749
|
+
* Database password
|
|
1750
|
+
*/
|
|
1751
|
+
password: string;
|
|
1752
|
+
|
|
1753
|
+
/**
|
|
1754
|
+
* Database username
|
|
1755
|
+
*/
|
|
1756
|
+
username: string;
|
|
1757
|
+
|
|
1758
|
+
/**
|
|
1759
|
+
* Warehouse type
|
|
1760
|
+
*/
|
|
1761
|
+
warehouse_type: 'postgresql';
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
export interface SnowflakeCredentialUpdate {
|
|
1765
|
+
/**
|
|
1766
|
+
* Authentication credentials
|
|
1767
|
+
*/
|
|
1768
|
+
auth:
|
|
1769
|
+
| SnowflakeCredentialUpdate.SnowflakePasswordCredentialAuth
|
|
1770
|
+
| SnowflakeCredentialUpdate.SnowflakePrivateKeyCredentialAuth;
|
|
1771
|
+
|
|
1772
|
+
/**
|
|
1773
|
+
* Snowflake username
|
|
1774
|
+
*/
|
|
1775
|
+
username: string;
|
|
1776
|
+
|
|
1777
|
+
/**
|
|
1778
|
+
* Warehouse type
|
|
1779
|
+
*/
|
|
1780
|
+
warehouse_type: 'snowflake';
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
export namespace SnowflakeCredentialUpdate {
|
|
1784
|
+
/**
|
|
1785
|
+
* Snowflake password auth for credential update.
|
|
1786
|
+
*/
|
|
1787
|
+
export interface SnowflakePasswordCredentialAuth {
|
|
1788
|
+
/**
|
|
1789
|
+
* Authentication type
|
|
1790
|
+
*/
|
|
1791
|
+
auth_type: 'password';
|
|
1792
|
+
|
|
1793
|
+
/**
|
|
1794
|
+
* Snowflake password
|
|
1795
|
+
*/
|
|
1796
|
+
password: string;
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
/**
|
|
1800
|
+
* Snowflake private key auth for credential update.
|
|
1801
|
+
*/
|
|
1802
|
+
export interface SnowflakePrivateKeyCredentialAuth {
|
|
1803
|
+
/**
|
|
1804
|
+
* Authentication type
|
|
1805
|
+
*/
|
|
1806
|
+
auth_type: 'private_key';
|
|
1807
|
+
|
|
1808
|
+
/**
|
|
1809
|
+
* PEM-encoded private key
|
|
1810
|
+
*/
|
|
1811
|
+
private_key: string;
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
export interface DatabricksCredentialUpdate {
|
|
1816
|
+
/**
|
|
1817
|
+
* Databricks personal access token
|
|
1818
|
+
*/
|
|
1819
|
+
access_token: string;
|
|
1820
|
+
|
|
1821
|
+
/**
|
|
1822
|
+
* Warehouse type
|
|
1823
|
+
*/
|
|
1824
|
+
warehouse_type: 'databricks';
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
export interface ClickHouseCredentialUpdate {
|
|
1828
|
+
/**
|
|
1829
|
+
* ClickHouse password
|
|
1830
|
+
*/
|
|
1831
|
+
password: string;
|
|
1832
|
+
|
|
1833
|
+
/**
|
|
1834
|
+
* ClickHouse username
|
|
1835
|
+
*/
|
|
1836
|
+
username: string;
|
|
1837
|
+
|
|
1838
|
+
/**
|
|
1839
|
+
* Warehouse type
|
|
1840
|
+
*/
|
|
1841
|
+
warehouse_type: 'clickhouse';
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
export interface MssqlCredentialUpdate {
|
|
1845
|
+
/**
|
|
1846
|
+
* SQL Server password
|
|
1847
|
+
*/
|
|
1848
|
+
password: string;
|
|
1849
|
+
|
|
1850
|
+
/**
|
|
1851
|
+
* SQL Server username
|
|
1852
|
+
*/
|
|
1853
|
+
username: string;
|
|
1854
|
+
|
|
1855
|
+
/**
|
|
1856
|
+
* Warehouse type
|
|
1857
|
+
*/
|
|
1858
|
+
warehouse_type: 'mssql';
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1058
1862
|
Connections.Databases = Databases;
|
|
1863
|
+
Connections.Views = Views;
|
|
1864
|
+
Connections.Yaml = Yaml;
|
|
1059
1865
|
|
|
1060
1866
|
export declare namespace Connections {
|
|
1061
1867
|
export {
|
|
1062
1868
|
type Connection as Connection,
|
|
1063
1869
|
type DatabaseConfig as DatabaseConfig,
|
|
1064
1870
|
type ConnectionListResponse as ConnectionListResponse,
|
|
1871
|
+
type ConnectionApproveSyncResponse as ConnectionApproveSyncResponse,
|
|
1872
|
+
type ConnectionListSyncsResponse as ConnectionListSyncsResponse,
|
|
1065
1873
|
type ConnectionRetrieveCredentialResponse as ConnectionRetrieveCredentialResponse,
|
|
1874
|
+
type ConnectionRetrieveSchemaResponse as ConnectionRetrieveSchemaResponse,
|
|
1875
|
+
type ConnectionRetrieveSyncStatusResponse as ConnectionRetrieveSyncStatusResponse,
|
|
1876
|
+
type ConnectionStreamSyncProgressResponse as ConnectionStreamSyncProgressResponse,
|
|
1066
1877
|
type ConnectionSyncResponse as ConnectionSyncResponse,
|
|
1878
|
+
type ConnectionUpdateCredentialsResponse as ConnectionUpdateCredentialsResponse,
|
|
1067
1879
|
type ConnectionCreateParams as ConnectionCreateParams,
|
|
1068
1880
|
type ConnectionUpdateParams as ConnectionUpdateParams,
|
|
1881
|
+
type ConnectionListParams as ConnectionListParams,
|
|
1882
|
+
type ConnectionApproveSyncParams as ConnectionApproveSyncParams,
|
|
1883
|
+
type ConnectionListSyncsParams as ConnectionListSyncsParams,
|
|
1884
|
+
type ConnectionRetrieveSyncStatusParams as ConnectionRetrieveSyncStatusParams,
|
|
1885
|
+
type ConnectionStreamSyncProgressParams as ConnectionStreamSyncProgressParams,
|
|
1886
|
+
type ConnectionUpdateCredentialsParams as ConnectionUpdateCredentialsParams,
|
|
1069
1887
|
};
|
|
1070
1888
|
|
|
1071
1889
|
export { Databases as Databases, type DatabaseDeleteSchemaParams as DatabaseDeleteSchemaParams };
|
|
1890
|
+
|
|
1891
|
+
export {
|
|
1892
|
+
Views as Views,
|
|
1893
|
+
type ViewRetrieveResponse as ViewRetrieveResponse,
|
|
1894
|
+
type ViewListResponse as ViewListResponse,
|
|
1895
|
+
type ViewRetrieveParams as ViewRetrieveParams,
|
|
1896
|
+
type ViewListParams as ViewListParams,
|
|
1897
|
+
};
|
|
1898
|
+
|
|
1899
|
+
export {
|
|
1900
|
+
Yaml as Yaml,
|
|
1901
|
+
type YamlRetrieveResponse as YamlRetrieveResponse,
|
|
1902
|
+
type YamlCommitResponse as YamlCommitResponse,
|
|
1903
|
+
type YamlCommitParams as YamlCommitParams,
|
|
1904
|
+
};
|
|
1072
1905
|
}
|