@katerai/sdk 0.6.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.
- package/CHANGELOG.md +23 -0
- package/README.md +23 -16
- package/client.d.mts +10 -13
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -13
- package/client.d.ts.map +1 -1
- package/client.js +37 -15
- package/client.js.map +1 -1
- package/client.mjs +37 -15
- package/client.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -1
- package/internal/utils/log.mjs.map +1 -1
- package/package.json +2 -2
- package/resources/index.d.mts +0 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +0 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -2
- package/resources/index.mjs.map +1 -1
- package/resources/v1/connections.d.mts +216 -1
- package/resources/v1/connections.d.mts.map +1 -1
- package/resources/v1/connections.d.ts +216 -1
- package/resources/v1/connections.d.ts.map +1 -1
- package/resources/v1/connections.js +22 -2
- package/resources/v1/connections.js.map +1 -1
- package/resources/v1/connections.mjs +20 -1
- package/resources/v1/connections.mjs.map +1 -1
- package/resources/v1/index.d.mts +2 -6
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +2 -6
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +5 -13
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +2 -6
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/tenants.d.mts +125 -1
- package/resources/v1/tenants.d.mts.map +1 -1
- package/resources/v1/tenants.d.ts +125 -1
- package/resources/v1/tenants.d.ts.map +1 -1
- package/resources/v1/tenants.js +46 -2
- package/resources/v1/tenants.js.map +1 -1
- package/resources/v1/tenants.mjs +44 -1
- package/resources/v1/tenants.mjs.map +1 -1
- package/resources/v1/v1.d.mts +6 -22
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +6 -22
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +4 -20
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +4 -20
- package/resources/v1/v1.mjs.map +1 -1
- package/src/client.ts +48 -23
- package/src/internal/utils/log.ts +1 -0
- package/src/resources/index.ts +0 -2
- package/src/resources/v1/connections.ts +277 -1
- package/src/resources/v1/index.ts +7 -44
- package/src/resources/v1/tenants.ts +162 -1
- package/src/resources/v1/v1.ts +14 -104
- 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
- package/resources/healthz.d.mts +0 -16
- package/resources/healthz.d.mts.map +0 -1
- package/resources/healthz.d.ts +0 -16
- package/resources/healthz.d.ts.map +0 -1
- package/resources/healthz.js +0 -15
- package/resources/healthz.js.map +0 -1
- package/resources/healthz.mjs +0 -11
- package/resources/healthz.mjs.map +0 -1
- package/resources/readyz.d.mts +0 -16
- package/resources/readyz.d.mts.map +0 -1
- package/resources/readyz.d.ts +0 -16
- package/resources/readyz.d.ts.map +0 -1
- package/resources/readyz.js +0 -15
- package/resources/readyz.js.map +0 -1
- package/resources/readyz.mjs +0 -11
- package/resources/readyz.mjs.map +0 -1
- package/resources/v1/connections/connections.d.mts +0 -1470
- package/resources/v1/connections/connections.d.mts.map +0 -1
- package/resources/v1/connections/connections.d.ts +0 -1470
- package/resources/v1/connections/connections.d.ts.map +0 -1
- package/resources/v1/connections/connections.js +0 -163
- package/resources/v1/connections/connections.js.map +0 -1
- package/resources/v1/connections/connections.mjs +0 -158
- package/resources/v1/connections/connections.mjs.map +0 -1
- package/resources/v1/connections/databases.d.mts +0 -25
- package/resources/v1/connections/databases.d.mts.map +0 -1
- package/resources/v1/connections/databases.d.ts +0 -25
- package/resources/v1/connections/databases.d.ts.map +0 -1
- package/resources/v1/connections/databases.js +0 -26
- package/resources/v1/connections/databases.js.map +0 -1
- package/resources/v1/connections/databases.mjs +0 -22
- package/resources/v1/connections/databases.mjs.map +0 -1
- package/resources/v1/connections/index.d.mts +0 -5
- package/resources/v1/connections/index.d.mts.map +0 -1
- package/resources/v1/connections/index.d.ts +0 -5
- package/resources/v1/connections/index.d.ts.map +0 -1
- package/resources/v1/connections/index.js +0 -13
- package/resources/v1/connections/index.js.map +0 -1
- package/resources/v1/connections/index.mjs +0 -6
- package/resources/v1/connections/index.mjs.map +0 -1
- package/resources/v1/connections/views.d.mts +0 -77
- package/resources/v1/connections/views.d.mts.map +0 -1
- package/resources/v1/connections/views.d.ts +0 -77
- package/resources/v1/connections/views.d.ts.map +0 -1
- package/resources/v1/connections/views.js +0 -24
- package/resources/v1/connections/views.js.map +0 -1
- package/resources/v1/connections/views.mjs +0 -20
- package/resources/v1/connections/views.mjs.map +0 -1
- package/resources/v1/connections/yaml.d.mts +0 -57
- package/resources/v1/connections/yaml.d.mts.map +0 -1
- package/resources/v1/connections/yaml.d.ts +0 -57
- package/resources/v1/connections/yaml.d.ts.map +0 -1
- package/resources/v1/connections/yaml.js +0 -22
- package/resources/v1/connections/yaml.js.map +0 -1
- package/resources/v1/connections/yaml.mjs +0 -18
- package/resources/v1/connections/yaml.mjs.map +0 -1
- package/resources/v1/github/github.d.mts +0 -99
- package/resources/v1/github/github.d.mts.map +0 -1
- package/resources/v1/github/github.d.ts +0 -99
- package/resources/v1/github/github.d.ts.map +0 -1
- package/resources/v1/github/github.js +0 -49
- package/resources/v1/github/github.js.map +0 -1
- package/resources/v1/github/github.mjs +0 -44
- package/resources/v1/github/github.mjs.map +0 -1
- package/resources/v1/github/index.d.mts +0 -5
- package/resources/v1/github/index.d.mts.map +0 -1
- package/resources/v1/github/index.d.ts +0 -5
- package/resources/v1/github/index.d.ts.map +0 -1
- package/resources/v1/github/index.js +0 -13
- package/resources/v1/github/index.js.map +0 -1
- package/resources/v1/github/index.mjs +0 -6
- package/resources/v1/github/index.mjs.map +0 -1
- package/resources/v1/github/repos.d.mts +0 -54
- package/resources/v1/github/repos.d.mts.map +0 -1
- package/resources/v1/github/repos.d.ts +0 -54
- package/resources/v1/github/repos.d.ts.map +0 -1
- package/resources/v1/github/repos.js +0 -22
- package/resources/v1/github/repos.js.map +0 -1
- package/resources/v1/github/repos.mjs +0 -18
- package/resources/v1/github/repos.mjs.map +0 -1
- package/resources/v1/github/scaffold.d.mts +0 -29
- package/resources/v1/github/scaffold.d.mts.map +0 -1
- package/resources/v1/github/scaffold.d.ts +0 -29
- package/resources/v1/github/scaffold.d.ts.map +0 -1
- package/resources/v1/github/scaffold.js +0 -21
- package/resources/v1/github/scaffold.js.map +0 -1
- package/resources/v1/github/scaffold.mjs +0 -17
- package/resources/v1/github/scaffold.mjs.map +0 -1
- package/resources/v1/github/webhooks.d.mts +0 -28
- package/resources/v1/github/webhooks.d.mts.map +0 -1
- package/resources/v1/github/webhooks.d.ts +0 -28
- package/resources/v1/github/webhooks.d.ts.map +0 -1
- package/resources/v1/github/webhooks.js +0 -27
- package/resources/v1/github/webhooks.js.map +0 -1
- package/resources/v1/github/webhooks.mjs +0 -23
- package/resources/v1/github/webhooks.mjs.map +0 -1
- package/resources/v1/github.d.mts +0 -2
- package/resources/v1/github.d.mts.map +0 -1
- package/resources/v1/github.d.ts +0 -2
- package/resources/v1/github.d.ts.map +0 -1
- package/resources/v1/github.js +0 -6
- package/resources/v1/github.js.map +0 -1
- package/resources/v1/github.mjs +0 -3
- package/resources/v1/github.mjs.map +0 -1
- package/resources/v1/groups/groups.d.mts +0 -162
- package/resources/v1/groups/groups.d.mts.map +0 -1
- package/resources/v1/groups/groups.d.ts +0 -162
- package/resources/v1/groups/groups.d.ts.map +0 -1
- package/resources/v1/groups/groups.js +0 -81
- package/resources/v1/groups/groups.js.map +0 -1
- package/resources/v1/groups/groups.mjs +0 -76
- package/resources/v1/groups/groups.mjs.map +0 -1
- package/resources/v1/groups/index.d.mts +0 -3
- package/resources/v1/groups/index.d.mts.map +0 -1
- package/resources/v1/groups/index.d.ts +0 -3
- package/resources/v1/groups/index.d.ts.map +0 -1
- package/resources/v1/groups/index.js +0 -9
- package/resources/v1/groups/index.js.map +0 -1
- package/resources/v1/groups/index.mjs +0 -4
- package/resources/v1/groups/index.mjs.map +0 -1
- package/resources/v1/groups/tenants.d.mts +0 -55
- package/resources/v1/groups/tenants.d.mts.map +0 -1
- package/resources/v1/groups/tenants.d.ts +0 -55
- package/resources/v1/groups/tenants.d.ts.map +0 -1
- package/resources/v1/groups/tenants.js +0 -39
- package/resources/v1/groups/tenants.js.map +0 -1
- package/resources/v1/groups/tenants.mjs +0 -35
- package/resources/v1/groups/tenants.mjs.map +0 -1
- package/resources/v1/groups.d.mts +0 -2
- package/resources/v1/groups.d.mts.map +0 -1
- package/resources/v1/groups.d.ts +0 -2
- package/resources/v1/groups.d.ts.map +0 -1
- package/resources/v1/groups.js +0 -6
- package/resources/v1/groups.js.map +0 -1
- package/resources/v1/groups.mjs +0 -3
- package/resources/v1/groups.mjs.map +0 -1
- package/resources/v1/me.d.mts +0 -43
- package/resources/v1/me.d.mts.map +0 -1
- package/resources/v1/me.d.ts +0 -43
- package/resources/v1/me.d.ts.map +0 -1
- package/resources/v1/me.js +0 -20
- package/resources/v1/me.js.map +0 -1
- package/resources/v1/me.mjs +0 -16
- package/resources/v1/me.mjs.map +0 -1
- package/resources/v1/org/client.d.mts +0 -53
- package/resources/v1/org/client.d.mts.map +0 -1
- package/resources/v1/org/client.d.ts +0 -53
- package/resources/v1/org/client.d.ts.map +0 -1
- package/resources/v1/org/client.js +0 -25
- package/resources/v1/org/client.js.map +0 -1
- package/resources/v1/org/client.mjs +0 -21
- package/resources/v1/org/client.mjs.map +0 -1
- package/resources/v1/org/index.d.mts +0 -4
- package/resources/v1/org/index.d.mts.map +0 -1
- package/resources/v1/org/index.d.ts +0 -4
- package/resources/v1/org/index.d.ts.map +0 -1
- package/resources/v1/org/index.js +0 -11
- package/resources/v1/org/index.js.map +0 -1
- package/resources/v1/org/index.mjs +0 -5
- package/resources/v1/org/index.mjs.map +0 -1
- package/resources/v1/org/org.d.mts +0 -14
- package/resources/v1/org/org.d.mts.map +0 -1
- package/resources/v1/org/org.d.ts +0 -14
- package/resources/v1/org/org.d.ts.map +0 -1
- package/resources/v1/org/org.js +0 -21
- package/resources/v1/org/org.js.map +0 -1
- package/resources/v1/org/org.mjs +0 -16
- package/resources/v1/org/org.mjs.map +0 -1
- package/resources/v1/org/users.d.mts +0 -87
- package/resources/v1/org/users.d.mts.map +0 -1
- package/resources/v1/org/users.d.ts +0 -87
- package/resources/v1/org/users.d.ts.map +0 -1
- package/resources/v1/org/users.js +0 -60
- package/resources/v1/org/users.js.map +0 -1
- package/resources/v1/org/users.mjs +0 -56
- package/resources/v1/org/users.mjs.map +0 -1
- package/resources/v1/org.d.mts +0 -2
- package/resources/v1/org.d.mts.map +0 -1
- package/resources/v1/org.d.ts +0 -2
- package/resources/v1/org.d.ts.map +0 -1
- package/resources/v1/org.js +0 -6
- package/resources/v1/org.js.map +0 -1
- package/resources/v1/org.mjs +0 -3
- package/resources/v1/org.mjs.map +0 -1
- package/resources/v1/tenants/batch.d.mts +0 -159
- package/resources/v1/tenants/batch.d.mts.map +0 -1
- package/resources/v1/tenants/batch.d.ts +0 -159
- package/resources/v1/tenants/batch.d.ts.map +0 -1
- package/resources/v1/tenants/batch.js +0 -42
- package/resources/v1/tenants/batch.js.map +0 -1
- package/resources/v1/tenants/batch.mjs +0 -38
- package/resources/v1/tenants/batch.mjs.map +0 -1
- package/resources/v1/tenants/groups.d.mts +0 -43
- package/resources/v1/tenants/groups.d.mts.map +0 -1
- package/resources/v1/tenants/groups.d.ts +0 -43
- package/resources/v1/tenants/groups.d.ts.map +0 -1
- package/resources/v1/tenants/groups.js +0 -20
- package/resources/v1/tenants/groups.js.map +0 -1
- package/resources/v1/tenants/groups.mjs +0 -16
- package/resources/v1/tenants/groups.mjs.map +0 -1
- package/resources/v1/tenants/import.d.mts +0 -126
- package/resources/v1/tenants/import.d.mts.map +0 -1
- package/resources/v1/tenants/import.d.ts +0 -126
- package/resources/v1/tenants/import.d.ts.map +0 -1
- package/resources/v1/tenants/import.js +0 -50
- package/resources/v1/tenants/import.js.map +0 -1
- package/resources/v1/tenants/import.mjs +0 -46
- package/resources/v1/tenants/import.mjs.map +0 -1
- package/resources/v1/tenants/index.d.mts +0 -5
- package/resources/v1/tenants/index.d.mts.map +0 -1
- package/resources/v1/tenants/index.d.ts +0 -5
- package/resources/v1/tenants/index.d.ts.map +0 -1
- package/resources/v1/tenants/index.js +0 -13
- package/resources/v1/tenants/index.js.map +0 -1
- package/resources/v1/tenants/index.mjs +0 -6
- package/resources/v1/tenants/index.mjs.map +0 -1
- package/resources/v1/tenants/tenants.d.mts +0 -248
- package/resources/v1/tenants/tenants.d.mts.map +0 -1
- package/resources/v1/tenants/tenants.d.ts +0 -248
- package/resources/v1/tenants/tenants.d.ts.map +0 -1
- package/resources/v1/tenants/tenants.js +0 -113
- package/resources/v1/tenants/tenants.js.map +0 -1
- package/resources/v1/tenants/tenants.mjs +0 -108
- package/resources/v1/tenants/tenants.mjs.map +0 -1
- package/src/resources/healthz.ts +0 -20
- package/src/resources/readyz.ts +0 -20
- package/src/resources/v1/connections/connections.ts +0 -1905
- package/src/resources/v1/connections/databases.ts +0 -42
- package/src/resources/v1/connections/index.ts +0 -33
- package/src/resources/v1/connections/views.ts +0 -112
- package/src/resources/v1/connections/yaml.ts +0 -81
- package/src/resources/v1/github/github.ts +0 -165
- package/src/resources/v1/github/index.ts +0 -20
- package/src/resources/v1/github/repos.ts +0 -85
- package/src/resources/v1/github/scaffold.ts +0 -44
- package/src/resources/v1/github/webhooks.ts +0 -60
- package/src/resources/v1/github.ts +0 -3
- package/src/resources/v1/groups/groups.ts +0 -218
- package/src/resources/v1/groups/index.ts +0 -10
- package/src/resources/v1/groups/tenants.ts +0 -78
- package/src/resources/v1/groups.ts +0 -3
- package/src/resources/v1/me.ts +0 -62
- package/src/resources/v1/org/client.ts +0 -81
- package/src/resources/v1/org/index.ts +0 -11
- package/src/resources/v1/org/org.ts +0 -32
- package/src/resources/v1/org/users.ts +0 -127
- package/src/resources/v1/org.ts +0 -3
- package/src/resources/v1/tenants/batch.ts +0 -200
- package/src/resources/v1/tenants/groups.ts +0 -52
- package/src/resources/v1/tenants/import.ts +0 -158
- package/src/resources/v1/tenants/index.ts +0 -29
- package/src/resources/v1/tenants/tenants.ts +0 -344
|
@@ -1,200 +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 TenantsAPI from './tenants';
|
|
5
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
6
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
-
|
|
8
|
-
export class Batch extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Create multiple tenants in a single request.
|
|
11
|
-
*
|
|
12
|
-
* Each tenant is processed independently. If one fails, others may succeed.
|
|
13
|
-
* Returns lists of succeeded and failed operations.
|
|
14
|
-
*
|
|
15
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
16
|
-
*/
|
|
17
|
-
create(body: BatchCreateParams, options?: RequestOptions): APIPromise<BatchCreateResponse> {
|
|
18
|
-
return this._client.post('/api/v1/tenants/batch', { body, ...options });
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Update multiple tenants in a single request.
|
|
23
|
-
*
|
|
24
|
-
* Each tenant is processed independently. If one fails, others may succeed.
|
|
25
|
-
* Returns lists of succeeded and failed operations.
|
|
26
|
-
*
|
|
27
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
28
|
-
*/
|
|
29
|
-
update(body: BatchUpdateParams, options?: RequestOptions): APIPromise<BatchUpdateResponse> {
|
|
30
|
-
return this._client.patch('/api/v1/tenants/batch', { body, ...options });
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Delete multiple tenants in a single request.
|
|
35
|
-
*
|
|
36
|
-
* Each tenant is processed independently. If one fails, others may succeed.
|
|
37
|
-
* Returns lists of succeeded and failed operations.
|
|
38
|
-
*
|
|
39
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
40
|
-
*/
|
|
41
|
-
delete(body: BatchDeleteParams, options?: RequestOptions): APIPromise<BatchDeleteResponse> {
|
|
42
|
-
return this._client.delete('/api/v1/tenants/batch', { body, ...options });
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Failed tenant operation in batch response.
|
|
48
|
-
*/
|
|
49
|
-
export interface BatchTenantError {
|
|
50
|
-
/**
|
|
51
|
-
* Error code
|
|
52
|
-
*/
|
|
53
|
-
code: string;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Error message
|
|
57
|
-
*/
|
|
58
|
-
message: string;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Index in request array (for create operations)
|
|
62
|
-
*/
|
|
63
|
-
index?: number | null;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Tenant ID (for update/delete operations)
|
|
67
|
-
*/
|
|
68
|
-
tenant_id?: string | null;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Tenant key (for create operations)
|
|
72
|
-
*/
|
|
73
|
-
tenant_key?: string | null;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Successful tenant operation in batch response.
|
|
78
|
-
*/
|
|
79
|
-
export interface BatchTenantSuccess {
|
|
80
|
-
/**
|
|
81
|
-
* Tenant ID
|
|
82
|
-
*/
|
|
83
|
-
tenant_id: string;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Response model for a single tenant.
|
|
87
|
-
*/
|
|
88
|
-
tenant?: TenantsAPI.Tenant | null;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Response model for batch tenant creation.
|
|
93
|
-
*/
|
|
94
|
-
export interface BatchCreateResponse {
|
|
95
|
-
/**
|
|
96
|
-
* Failed tenant creations
|
|
97
|
-
*/
|
|
98
|
-
failed: Array<BatchTenantError>;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Successfully created tenants
|
|
102
|
-
*/
|
|
103
|
-
succeeded: Array<BatchTenantSuccess>;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Response model for batch tenant updates.
|
|
108
|
-
*/
|
|
109
|
-
export interface BatchUpdateResponse {
|
|
110
|
-
/**
|
|
111
|
-
* Failed tenant updates
|
|
112
|
-
*/
|
|
113
|
-
failed: Array<BatchTenantError>;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Successfully updated tenants
|
|
117
|
-
*/
|
|
118
|
-
succeeded: Array<BatchTenantSuccess>;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Response model for batch tenant deletions.
|
|
123
|
-
*/
|
|
124
|
-
export interface BatchDeleteResponse {
|
|
125
|
-
/**
|
|
126
|
-
* Failed tenant deletions
|
|
127
|
-
*/
|
|
128
|
-
failed: Array<BatchTenantError>;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Successfully deleted tenants
|
|
132
|
-
*/
|
|
133
|
-
succeeded: Array<BatchTenantSuccess>;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export interface BatchCreateParams {
|
|
137
|
-
/**
|
|
138
|
-
* List of tenants to create
|
|
139
|
-
*/
|
|
140
|
-
tenants: Array<TenantsAPI.CreateTenant>;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export interface BatchUpdateParams {
|
|
144
|
-
/**
|
|
145
|
-
* List of tenant updates
|
|
146
|
-
*/
|
|
147
|
-
tenants: Array<BatchUpdateParams.Tenant>;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export namespace BatchUpdateParams {
|
|
151
|
-
/**
|
|
152
|
-
* Single tenant update in a batch operation.
|
|
153
|
-
*/
|
|
154
|
-
export interface Tenant {
|
|
155
|
-
/**
|
|
156
|
-
* Tenant ID to update
|
|
157
|
-
*/
|
|
158
|
-
tenant_id: string;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Connection ID for database association (required with database_name)
|
|
162
|
-
*/
|
|
163
|
-
connection_id?: string | null;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Database name for association (required with connection_id)
|
|
167
|
-
*/
|
|
168
|
-
database_name?: string | null;
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* New list of group names (replaces all existing associations)
|
|
172
|
-
*/
|
|
173
|
-
group_names?: Array<string> | null;
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* New human-readable tenant name
|
|
177
|
-
*/
|
|
178
|
-
tenant_name?: string | null;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export interface BatchDeleteParams {
|
|
183
|
-
/**
|
|
184
|
-
* List of tenant IDs to delete
|
|
185
|
-
*/
|
|
186
|
-
tenant_ids: Array<string>;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export declare namespace Batch {
|
|
190
|
-
export {
|
|
191
|
-
type BatchTenantError as BatchTenantError,
|
|
192
|
-
type BatchTenantSuccess as BatchTenantSuccess,
|
|
193
|
-
type BatchCreateResponse as BatchCreateResponse,
|
|
194
|
-
type BatchUpdateResponse as BatchUpdateResponse,
|
|
195
|
-
type BatchDeleteResponse as BatchDeleteResponse,
|
|
196
|
-
type BatchCreateParams as BatchCreateParams,
|
|
197
|
-
type BatchUpdateParams as BatchUpdateParams,
|
|
198
|
-
type BatchDeleteParams as BatchDeleteParams,
|
|
199
|
-
};
|
|
200
|
-
}
|
|
@@ -1,52 +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 { APIPromise } from '../../../core/api-promise';
|
|
5
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
-
|
|
7
|
-
export class Groups extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Get all tenant groups as a TenantGroupSchema object.
|
|
10
|
-
*
|
|
11
|
-
* Returns tenant groups in the YAML-compatible schema format. Supports content
|
|
12
|
-
* negotiation: JSON by default, YAML with Accept: application/yaml.
|
|
13
|
-
*
|
|
14
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
15
|
-
*/
|
|
16
|
-
retrieveSchema(options?: RequestOptions): APIPromise<GroupRetrieveSchemaResponse> {
|
|
17
|
-
return this._client.get('/api/v1/tenants/groups/schema', options);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Schema for tenant group configuration files
|
|
23
|
-
*/
|
|
24
|
-
export interface GroupRetrieveSchemaResponse {
|
|
25
|
-
/**
|
|
26
|
-
* Array of tenant group configurations
|
|
27
|
-
*/
|
|
28
|
-
tenant_groups: Array<GroupRetrieveSchemaResponse.TenantGroup>;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export namespace GroupRetrieveSchemaResponse {
|
|
32
|
-
export interface TenantGroup {
|
|
33
|
-
/**
|
|
34
|
-
* Unique Kater identifier
|
|
35
|
-
*/
|
|
36
|
-
kater_id: string;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Name identifier
|
|
40
|
-
*/
|
|
41
|
-
name: string;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Description text
|
|
45
|
-
*/
|
|
46
|
-
description?: string | null;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export declare namespace Groups {
|
|
51
|
-
export { type GroupRetrieveSchemaResponse as GroupRetrieveSchemaResponse };
|
|
52
|
-
}
|
|
@@ -1,158 +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 { APIPromise } from '../../../core/api-promise';
|
|
5
|
-
import { type Uploadable } from '../../../core/uploads';
|
|
6
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
-
import { multipartFormRequestOptions } from '../../../internal/uploads';
|
|
8
|
-
|
|
9
|
-
export class Import extends APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* Import tenants from a CSV file using upsert semantics.
|
|
12
|
-
*
|
|
13
|
-
* Expected CSV format:
|
|
14
|
-
*
|
|
15
|
-
* - tenant_key (required): Unique tenant identifier
|
|
16
|
-
* - tenant_name (optional): Human-readable name
|
|
17
|
-
* - group_names (optional): Comma-separated list of group names
|
|
18
|
-
*
|
|
19
|
-
* Creates new tenants and updates existing ones with new name/groups. Groups are
|
|
20
|
-
* added additively (not replaced) and auto-created if needed.
|
|
21
|
-
*
|
|
22
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
23
|
-
*
|
|
24
|
-
* Raises: ValidationError: If CSV format is invalid (400)
|
|
25
|
-
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
26
|
-
*/
|
|
27
|
-
fromCsv(body: ImportFromCsvParams, options?: RequestOptions): APIPromise<ImportTenants> {
|
|
28
|
-
return this._client.post(
|
|
29
|
-
'/api/v1/tenants/import/csv',
|
|
30
|
-
multipartFormRequestOptions({ body, ...options }, this._client),
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Import tenants from a warehouse table using upsert semantics.
|
|
36
|
-
*
|
|
37
|
-
* Creates new tenants and updates existing ones with new name/groups. Groups are
|
|
38
|
-
* added additively (not replaced).
|
|
39
|
-
*
|
|
40
|
-
* Streams data from the warehouse in batches to handle large datasets without
|
|
41
|
-
* loading everything into memory.
|
|
42
|
-
*
|
|
43
|
-
* For tenants with groups, groups are aggregated per tenant key and auto-created
|
|
44
|
-
* if they don't exist.
|
|
45
|
-
*
|
|
46
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
47
|
-
*
|
|
48
|
-
* Raises: ConnectionNotFoundError: If the connection doesn't exist (404)
|
|
49
|
-
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
50
|
-
*/
|
|
51
|
-
fromWarehouse(body: ImportFromWarehouseParams, options?: RequestOptions): APIPromise<ImportTenants> {
|
|
52
|
-
return this._client.post('/api/v1/tenants/import/warehouse', { body, ...options });
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Response model for tenant import operation.
|
|
58
|
-
*/
|
|
59
|
-
export interface ImportTenants {
|
|
60
|
-
/**
|
|
61
|
-
* Unique tenant keys found in source
|
|
62
|
-
*/
|
|
63
|
-
total_found: number;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* New tenants created
|
|
67
|
-
*/
|
|
68
|
-
total_imported: number;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Existing tenants updated
|
|
72
|
-
*/
|
|
73
|
-
total_updated: number;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Tenant-specific errors
|
|
77
|
-
*/
|
|
78
|
-
errors?: Array<ImportTenants.Error>;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Groups that were auto-created
|
|
82
|
-
*/
|
|
83
|
-
groups_created?: Array<string>;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export namespace ImportTenants {
|
|
87
|
-
/**
|
|
88
|
-
* Error for a single tenant during import.
|
|
89
|
-
*/
|
|
90
|
-
export interface Error {
|
|
91
|
-
/**
|
|
92
|
-
* Error code
|
|
93
|
-
*/
|
|
94
|
-
code: string;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Error message
|
|
98
|
-
*/
|
|
99
|
-
message: string;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Tenant key that failed
|
|
103
|
-
*/
|
|
104
|
-
tenant_key: string;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export interface ImportFromCsvParams {
|
|
109
|
-
/**
|
|
110
|
-
* CSV file with tenant data
|
|
111
|
-
*/
|
|
112
|
-
file: Uploadable;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export interface ImportFromWarehouseParams {
|
|
116
|
-
/**
|
|
117
|
-
* Warehouse connection ID to query
|
|
118
|
-
*/
|
|
119
|
-
connection_id: string;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Database name containing the tenant table
|
|
123
|
-
*/
|
|
124
|
-
database: string;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Schema name containing the tenant table
|
|
128
|
-
*/
|
|
129
|
-
schema: string;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Table name containing tenant data
|
|
133
|
-
*/
|
|
134
|
-
table: string;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Column name for tenant key
|
|
138
|
-
*/
|
|
139
|
-
tenant_key_column: string;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Column name for tenant group (optional)
|
|
143
|
-
*/
|
|
144
|
-
tenant_group_column?: string | null;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Column name for tenant display name (optional)
|
|
148
|
-
*/
|
|
149
|
-
tenant_name_column?: string | null;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export declare namespace Import {
|
|
153
|
-
export {
|
|
154
|
-
type ImportTenants as ImportTenants,
|
|
155
|
-
type ImportFromCsvParams as ImportFromCsvParams,
|
|
156
|
-
type ImportFromWarehouseParams as ImportFromWarehouseParams,
|
|
157
|
-
};
|
|
158
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
Batch,
|
|
5
|
-
type BatchTenantError,
|
|
6
|
-
type BatchTenantSuccess,
|
|
7
|
-
type BatchCreateResponse,
|
|
8
|
-
type BatchUpdateResponse,
|
|
9
|
-
type BatchDeleteResponse,
|
|
10
|
-
type BatchCreateParams,
|
|
11
|
-
type BatchUpdateParams,
|
|
12
|
-
type BatchDeleteParams,
|
|
13
|
-
} from './batch';
|
|
14
|
-
export { Groups, type GroupRetrieveSchemaResponse } from './groups';
|
|
15
|
-
export {
|
|
16
|
-
Import,
|
|
17
|
-
type ImportTenants,
|
|
18
|
-
type ImportFromCsvParams,
|
|
19
|
-
type ImportFromWarehouseParams,
|
|
20
|
-
} from './import';
|
|
21
|
-
export {
|
|
22
|
-
Tenants,
|
|
23
|
-
type CreateTenant,
|
|
24
|
-
type Tenant,
|
|
25
|
-
type TenantListResponse,
|
|
26
|
-
type TenantRetrieveSchemaResponse,
|
|
27
|
-
type TenantCreateParams,
|
|
28
|
-
type TenantUpdateParams,
|
|
29
|
-
} from './tenants';
|