@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.
- package/CHANGELOG.md +51 -0
- package/README.md +23 -16
- package/client.d.mts +11 -13
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -13
- package/client.d.ts.map +1 -1
- package/client.js +45 -17
- package/client.js.map +1 -1
- package/client.mjs +45 -17
- 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/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 +57 -25
- package/src/internal/parse.ts +6 -0
- 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 -31
- package/src/resources/v1/tenants.ts +162 -1
- package/src/resources/v1/v1.ts +14 -78
- 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 -847
- package/resources/v1/connections/connections.d.mts.map +0 -1
- package/resources/v1/connections/connections.d.ts +0 -847
- package/resources/v1/connections/connections.d.ts.map +0 -1
- package/resources/v1/connections/connections.js +0 -100
- package/resources/v1/connections/connections.js.map +0 -1
- package/resources/v1/connections/connections.mjs +0 -95
- 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 -3
- package/resources/v1/connections/index.d.mts.map +0 -1
- package/resources/v1/connections/index.d.ts +0 -3
- package/resources/v1/connections/index.d.ts.map +0 -1
- package/resources/v1/connections/index.js +0 -9
- package/resources/v1/connections/index.js.map +0 -1
- package/resources/v1/connections/index.mjs +0 -4
- package/resources/v1/connections/index.mjs.map +0 -1
- package/resources/v1/github/github.d.mts +0 -95
- package/resources/v1/github/github.d.mts.map +0 -1
- package/resources/v1/github/github.d.ts +0 -95
- 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/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 -4
- package/resources/v1/tenants/index.d.mts.map +0 -1
- package/resources/v1/tenants/index.d.ts +0 -4
- package/resources/v1/tenants/index.d.ts.map +0 -1
- package/resources/v1/tenants/index.js +0 -11
- package/resources/v1/tenants/index.js.map +0 -1
- package/resources/v1/tenants/index.mjs +0 -5
- package/resources/v1/tenants/index.mjs.map +0 -1
- package/resources/v1/tenants/tenants.d.mts +0 -205
- package/resources/v1/tenants/tenants.d.mts.map +0 -1
- package/resources/v1/tenants/tenants.d.ts +0 -205
- package/resources/v1/tenants/tenants.d.ts.map +0 -1
- package/resources/v1/tenants/tenants.js +0 -97
- package/resources/v1/tenants/tenants.js.map +0 -1
- package/resources/v1/tenants/tenants.mjs +0 -92
- 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 -1072
- package/src/resources/v1/connections/databases.ts +0 -42
- package/src/resources/v1/connections/index.ts +0 -13
- package/src/resources/v1/github/github.ts +0 -157
- 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/import.ts +0 -158
- package/src/resources/v1/tenants/index.ts +0 -27
- package/src/resources/v1/tenants/tenants.ts +0 -290
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/tenants/batch.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Batch = void 0;
|
|
5
|
-
const resource_1 = require("../../../core/resource.js");
|
|
6
|
-
class Batch extends resource_1.APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Create multiple tenants in a single request.
|
|
9
|
-
*
|
|
10
|
-
* Each tenant is processed independently. If one fails, others may succeed.
|
|
11
|
-
* Returns lists of succeeded and failed operations.
|
|
12
|
-
*
|
|
13
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
14
|
-
*/
|
|
15
|
-
create(body, options) {
|
|
16
|
-
return this._client.post('/api/v1/tenants/batch', { body, ...options });
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Update multiple tenants in a single request.
|
|
20
|
-
*
|
|
21
|
-
* Each tenant is processed independently. If one fails, others may succeed.
|
|
22
|
-
* Returns lists of succeeded and failed operations.
|
|
23
|
-
*
|
|
24
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
25
|
-
*/
|
|
26
|
-
update(body, options) {
|
|
27
|
-
return this._client.patch('/api/v1/tenants/batch', { body, ...options });
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Delete multiple tenants in a single request.
|
|
31
|
-
*
|
|
32
|
-
* Each tenant is processed independently. If one fails, others may succeed.
|
|
33
|
-
* Returns lists of succeeded and failed operations.
|
|
34
|
-
*
|
|
35
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
36
|
-
*/
|
|
37
|
-
delete(body, options) {
|
|
38
|
-
return this._client.delete('/api/v1/tenants/batch', { body, ...options });
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.Batch = Batch;
|
|
42
|
-
//# sourceMappingURL=batch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"batch.js","sourceRoot":"","sources":["../../../src/resources/v1/tenants/batch.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAKrD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;OAOG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF;AApCD,sBAoCC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
-
export class Batch extends APIResource {
|
|
4
|
-
/**
|
|
5
|
-
* Create multiple tenants in a single request.
|
|
6
|
-
*
|
|
7
|
-
* Each tenant is processed independently. If one fails, others may succeed.
|
|
8
|
-
* Returns lists of succeeded and failed operations.
|
|
9
|
-
*
|
|
10
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
11
|
-
*/
|
|
12
|
-
create(body, options) {
|
|
13
|
-
return this._client.post('/api/v1/tenants/batch', { body, ...options });
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Update multiple tenants in a single request.
|
|
17
|
-
*
|
|
18
|
-
* Each tenant is processed independently. If one fails, others may succeed.
|
|
19
|
-
* Returns lists of succeeded and failed operations.
|
|
20
|
-
*
|
|
21
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
22
|
-
*/
|
|
23
|
-
update(body, options) {
|
|
24
|
-
return this._client.patch('/api/v1/tenants/batch', { body, ...options });
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Delete multiple tenants in a single request.
|
|
28
|
-
*
|
|
29
|
-
* Each tenant is processed independently. If one fails, others may succeed.
|
|
30
|
-
* Returns lists of succeeded and failed operations.
|
|
31
|
-
*
|
|
32
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
33
|
-
*/
|
|
34
|
-
delete(body, options) {
|
|
35
|
-
return this._client.delete('/api/v1/tenants/batch', { body, ...options });
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=batch.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"batch.mjs","sourceRoot":"","sources":["../../../src/resources/v1/tenants/batch.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAKtB,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;OAOG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF"}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
-
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
-
import { type Uploadable } from "../../../core/uploads.mjs";
|
|
4
|
-
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
5
|
-
export declare class Import extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* Import tenants from a CSV file using upsert semantics.
|
|
8
|
-
*
|
|
9
|
-
* Expected CSV format:
|
|
10
|
-
*
|
|
11
|
-
* - tenant_key (required): Unique tenant identifier
|
|
12
|
-
* - tenant_name (optional): Human-readable name
|
|
13
|
-
* - group_names (optional): Comma-separated list of group names
|
|
14
|
-
*
|
|
15
|
-
* Creates new tenants and updates existing ones with new name/groups. Groups are
|
|
16
|
-
* added additively (not replaced) and auto-created if needed.
|
|
17
|
-
*
|
|
18
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
19
|
-
*
|
|
20
|
-
* Raises: ValidationError: If CSV format is invalid (400)
|
|
21
|
-
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
22
|
-
*/
|
|
23
|
-
fromCsv(body: ImportFromCsvParams, options?: RequestOptions): APIPromise<ImportTenants>;
|
|
24
|
-
/**
|
|
25
|
-
* Import tenants from a warehouse table using upsert semantics.
|
|
26
|
-
*
|
|
27
|
-
* Creates new tenants and updates existing ones with new name/groups. Groups are
|
|
28
|
-
* added additively (not replaced).
|
|
29
|
-
*
|
|
30
|
-
* Streams data from the warehouse in batches to handle large datasets without
|
|
31
|
-
* loading everything into memory.
|
|
32
|
-
*
|
|
33
|
-
* For tenants with groups, groups are aggregated per tenant key and auto-created
|
|
34
|
-
* if they don't exist.
|
|
35
|
-
*
|
|
36
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
37
|
-
*
|
|
38
|
-
* Raises: ConnectionNotFoundError: If the connection doesn't exist (404)
|
|
39
|
-
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
40
|
-
*/
|
|
41
|
-
fromWarehouse(body: ImportFromWarehouseParams, options?: RequestOptions): APIPromise<ImportTenants>;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Response model for tenant import operation.
|
|
45
|
-
*/
|
|
46
|
-
export interface ImportTenants {
|
|
47
|
-
/**
|
|
48
|
-
* Unique tenant keys found in source
|
|
49
|
-
*/
|
|
50
|
-
total_found: number;
|
|
51
|
-
/**
|
|
52
|
-
* New tenants created
|
|
53
|
-
*/
|
|
54
|
-
total_imported: number;
|
|
55
|
-
/**
|
|
56
|
-
* Existing tenants updated
|
|
57
|
-
*/
|
|
58
|
-
total_updated: number;
|
|
59
|
-
/**
|
|
60
|
-
* Tenant-specific errors
|
|
61
|
-
*/
|
|
62
|
-
errors?: Array<ImportTenants.Error>;
|
|
63
|
-
/**
|
|
64
|
-
* Groups that were auto-created
|
|
65
|
-
*/
|
|
66
|
-
groups_created?: Array<string>;
|
|
67
|
-
}
|
|
68
|
-
export declare namespace ImportTenants {
|
|
69
|
-
/**
|
|
70
|
-
* Error for a single tenant during import.
|
|
71
|
-
*/
|
|
72
|
-
interface Error {
|
|
73
|
-
/**
|
|
74
|
-
* Error code
|
|
75
|
-
*/
|
|
76
|
-
code: string;
|
|
77
|
-
/**
|
|
78
|
-
* Error message
|
|
79
|
-
*/
|
|
80
|
-
message: string;
|
|
81
|
-
/**
|
|
82
|
-
* Tenant key that failed
|
|
83
|
-
*/
|
|
84
|
-
tenant_key: string;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
export interface ImportFromCsvParams {
|
|
88
|
-
/**
|
|
89
|
-
* CSV file with tenant data
|
|
90
|
-
*/
|
|
91
|
-
file: Uploadable;
|
|
92
|
-
}
|
|
93
|
-
export interface ImportFromWarehouseParams {
|
|
94
|
-
/**
|
|
95
|
-
* Warehouse connection ID to query
|
|
96
|
-
*/
|
|
97
|
-
connection_id: string;
|
|
98
|
-
/**
|
|
99
|
-
* Database name containing the tenant table
|
|
100
|
-
*/
|
|
101
|
-
database: string;
|
|
102
|
-
/**
|
|
103
|
-
* Schema name containing the tenant table
|
|
104
|
-
*/
|
|
105
|
-
schema: string;
|
|
106
|
-
/**
|
|
107
|
-
* Table name containing tenant data
|
|
108
|
-
*/
|
|
109
|
-
table: string;
|
|
110
|
-
/**
|
|
111
|
-
* Column name for tenant key
|
|
112
|
-
*/
|
|
113
|
-
tenant_key_column: string;
|
|
114
|
-
/**
|
|
115
|
-
* Column name for tenant group (optional)
|
|
116
|
-
*/
|
|
117
|
-
tenant_group_column?: string | null;
|
|
118
|
-
/**
|
|
119
|
-
* Column name for tenant display name (optional)
|
|
120
|
-
*/
|
|
121
|
-
tenant_name_column?: string | null;
|
|
122
|
-
}
|
|
123
|
-
export declare namespace Import {
|
|
124
|
-
export { type ImportTenants as ImportTenants, type ImportFromCsvParams as ImportFromCsvParams, type ImportFromWarehouseParams as ImportFromWarehouseParams, };
|
|
125
|
-
}
|
|
126
|
-
//# sourceMappingURL=import.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"import.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/tenants/import.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC;IAOvF;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CAAC,IAAI,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC;CAGpG;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAEpC;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAChC;AAED,yBAAiB,aAAa,CAAC;IAC7B;;OAEG;IACH,UAAiB,KAAK;QACpB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;KACpB;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../../core/resource.js";
|
|
2
|
-
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
-
import { type Uploadable } from "../../../core/uploads.js";
|
|
4
|
-
import { RequestOptions } from "../../../internal/request-options.js";
|
|
5
|
-
export declare class Import extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* Import tenants from a CSV file using upsert semantics.
|
|
8
|
-
*
|
|
9
|
-
* Expected CSV format:
|
|
10
|
-
*
|
|
11
|
-
* - tenant_key (required): Unique tenant identifier
|
|
12
|
-
* - tenant_name (optional): Human-readable name
|
|
13
|
-
* - group_names (optional): Comma-separated list of group names
|
|
14
|
-
*
|
|
15
|
-
* Creates new tenants and updates existing ones with new name/groups. Groups are
|
|
16
|
-
* added additively (not replaced) and auto-created if needed.
|
|
17
|
-
*
|
|
18
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
19
|
-
*
|
|
20
|
-
* Raises: ValidationError: If CSV format is invalid (400)
|
|
21
|
-
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
22
|
-
*/
|
|
23
|
-
fromCsv(body: ImportFromCsvParams, options?: RequestOptions): APIPromise<ImportTenants>;
|
|
24
|
-
/**
|
|
25
|
-
* Import tenants from a warehouse table using upsert semantics.
|
|
26
|
-
*
|
|
27
|
-
* Creates new tenants and updates existing ones with new name/groups. Groups are
|
|
28
|
-
* added additively (not replaced).
|
|
29
|
-
*
|
|
30
|
-
* Streams data from the warehouse in batches to handle large datasets without
|
|
31
|
-
* loading everything into memory.
|
|
32
|
-
*
|
|
33
|
-
* For tenants with groups, groups are aggregated per tenant key and auto-created
|
|
34
|
-
* if they don't exist.
|
|
35
|
-
*
|
|
36
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
37
|
-
*
|
|
38
|
-
* Raises: ConnectionNotFoundError: If the connection doesn't exist (404)
|
|
39
|
-
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
40
|
-
*/
|
|
41
|
-
fromWarehouse(body: ImportFromWarehouseParams, options?: RequestOptions): APIPromise<ImportTenants>;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Response model for tenant import operation.
|
|
45
|
-
*/
|
|
46
|
-
export interface ImportTenants {
|
|
47
|
-
/**
|
|
48
|
-
* Unique tenant keys found in source
|
|
49
|
-
*/
|
|
50
|
-
total_found: number;
|
|
51
|
-
/**
|
|
52
|
-
* New tenants created
|
|
53
|
-
*/
|
|
54
|
-
total_imported: number;
|
|
55
|
-
/**
|
|
56
|
-
* Existing tenants updated
|
|
57
|
-
*/
|
|
58
|
-
total_updated: number;
|
|
59
|
-
/**
|
|
60
|
-
* Tenant-specific errors
|
|
61
|
-
*/
|
|
62
|
-
errors?: Array<ImportTenants.Error>;
|
|
63
|
-
/**
|
|
64
|
-
* Groups that were auto-created
|
|
65
|
-
*/
|
|
66
|
-
groups_created?: Array<string>;
|
|
67
|
-
}
|
|
68
|
-
export declare namespace ImportTenants {
|
|
69
|
-
/**
|
|
70
|
-
* Error for a single tenant during import.
|
|
71
|
-
*/
|
|
72
|
-
interface Error {
|
|
73
|
-
/**
|
|
74
|
-
* Error code
|
|
75
|
-
*/
|
|
76
|
-
code: string;
|
|
77
|
-
/**
|
|
78
|
-
* Error message
|
|
79
|
-
*/
|
|
80
|
-
message: string;
|
|
81
|
-
/**
|
|
82
|
-
* Tenant key that failed
|
|
83
|
-
*/
|
|
84
|
-
tenant_key: string;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
export interface ImportFromCsvParams {
|
|
88
|
-
/**
|
|
89
|
-
* CSV file with tenant data
|
|
90
|
-
*/
|
|
91
|
-
file: Uploadable;
|
|
92
|
-
}
|
|
93
|
-
export interface ImportFromWarehouseParams {
|
|
94
|
-
/**
|
|
95
|
-
* Warehouse connection ID to query
|
|
96
|
-
*/
|
|
97
|
-
connection_id: string;
|
|
98
|
-
/**
|
|
99
|
-
* Database name containing the tenant table
|
|
100
|
-
*/
|
|
101
|
-
database: string;
|
|
102
|
-
/**
|
|
103
|
-
* Schema name containing the tenant table
|
|
104
|
-
*/
|
|
105
|
-
schema: string;
|
|
106
|
-
/**
|
|
107
|
-
* Table name containing tenant data
|
|
108
|
-
*/
|
|
109
|
-
table: string;
|
|
110
|
-
/**
|
|
111
|
-
* Column name for tenant key
|
|
112
|
-
*/
|
|
113
|
-
tenant_key_column: string;
|
|
114
|
-
/**
|
|
115
|
-
* Column name for tenant group (optional)
|
|
116
|
-
*/
|
|
117
|
-
tenant_group_column?: string | null;
|
|
118
|
-
/**
|
|
119
|
-
* Column name for tenant display name (optional)
|
|
120
|
-
*/
|
|
121
|
-
tenant_name_column?: string | null;
|
|
122
|
-
}
|
|
123
|
-
export declare namespace Import {
|
|
124
|
-
export { type ImportTenants as ImportTenants, type ImportFromCsvParams as ImportFromCsvParams, type ImportFromWarehouseParams as ImportFromWarehouseParams, };
|
|
125
|
-
}
|
|
126
|
-
//# sourceMappingURL=import.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/tenants/import.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC;IAOvF;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CAAC,IAAI,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC;CAGpG;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAEpC;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAChC;AAED,yBAAiB,aAAa,CAAC;IAC7B;;OAEG;IACH,UAAiB,KAAK;QACpB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;KACpB;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Import = void 0;
|
|
5
|
-
const resource_1 = require("../../../core/resource.js");
|
|
6
|
-
const uploads_1 = require("../../../internal/uploads.js");
|
|
7
|
-
class Import extends resource_1.APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Import tenants from a CSV file using upsert semantics.
|
|
10
|
-
*
|
|
11
|
-
* Expected CSV format:
|
|
12
|
-
*
|
|
13
|
-
* - tenant_key (required): Unique tenant identifier
|
|
14
|
-
* - tenant_name (optional): Human-readable name
|
|
15
|
-
* - group_names (optional): Comma-separated list of group names
|
|
16
|
-
*
|
|
17
|
-
* Creates new tenants and updates existing ones with new name/groups. Groups are
|
|
18
|
-
* added additively (not replaced) and auto-created if needed.
|
|
19
|
-
*
|
|
20
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
21
|
-
*
|
|
22
|
-
* Raises: ValidationError: If CSV format is invalid (400)
|
|
23
|
-
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
24
|
-
*/
|
|
25
|
-
fromCsv(body, options) {
|
|
26
|
-
return this._client.post('/api/v1/tenants/import/csv', (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Import tenants from a warehouse table using upsert semantics.
|
|
30
|
-
*
|
|
31
|
-
* Creates new tenants and updates existing ones with new name/groups. Groups are
|
|
32
|
-
* added additively (not replaced).
|
|
33
|
-
*
|
|
34
|
-
* Streams data from the warehouse in batches to handle large datasets without
|
|
35
|
-
* loading everything into memory.
|
|
36
|
-
*
|
|
37
|
-
* For tenants with groups, groups are aggregated per tenant key and auto-created
|
|
38
|
-
* if they don't exist.
|
|
39
|
-
*
|
|
40
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
41
|
-
*
|
|
42
|
-
* Raises: ConnectionNotFoundError: If the connection doesn't exist (404)
|
|
43
|
-
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
44
|
-
*/
|
|
45
|
-
fromWarehouse(body, options) {
|
|
46
|
-
return this._client.post('/api/v1/tenants/import/warehouse', { body, ...options });
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
exports.Import = Import;
|
|
50
|
-
//# sourceMappingURL=import.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../../src/resources/v1/tenants/import.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,0DAAwE;AAExE,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,IAAyB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,4BAA4B,EAC5B,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CAAC,IAA+B,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AA7CD,wBA6CC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
-
import { multipartFormRequestOptions } from "../../../internal/uploads.mjs";
|
|
4
|
-
export class Import extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Import tenants from a CSV file using upsert semantics.
|
|
7
|
-
*
|
|
8
|
-
* Expected CSV format:
|
|
9
|
-
*
|
|
10
|
-
* - tenant_key (required): Unique tenant identifier
|
|
11
|
-
* - tenant_name (optional): Human-readable name
|
|
12
|
-
* - group_names (optional): Comma-separated list of group names
|
|
13
|
-
*
|
|
14
|
-
* Creates new tenants and updates existing ones with new name/groups. Groups are
|
|
15
|
-
* added additively (not replaced) and auto-created if needed.
|
|
16
|
-
*
|
|
17
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
18
|
-
*
|
|
19
|
-
* Raises: ValidationError: If CSV format is invalid (400)
|
|
20
|
-
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
21
|
-
*/
|
|
22
|
-
fromCsv(body, options) {
|
|
23
|
-
return this._client.post('/api/v1/tenants/import/csv', multipartFormRequestOptions({ body, ...options }, this._client));
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Import tenants from a warehouse table using upsert semantics.
|
|
27
|
-
*
|
|
28
|
-
* Creates new tenants and updates existing ones with new name/groups. Groups are
|
|
29
|
-
* added additively (not replaced).
|
|
30
|
-
*
|
|
31
|
-
* Streams data from the warehouse in batches to handle large datasets without
|
|
32
|
-
* loading everything into memory.
|
|
33
|
-
*
|
|
34
|
-
* For tenants with groups, groups are aggregated per tenant key and auto-created
|
|
35
|
-
* if they don't exist.
|
|
36
|
-
*
|
|
37
|
-
* RLS: Filtered to current client (ClientRLSDB).
|
|
38
|
-
*
|
|
39
|
-
* Raises: ConnectionNotFoundError: If the connection doesn't exist (404)
|
|
40
|
-
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
41
|
-
*/
|
|
42
|
-
fromWarehouse(body, options) {
|
|
43
|
-
return this._client.post('/api/v1/tenants/import/warehouse', { body, ...options });
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=import.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"import.mjs","sourceRoot":"","sources":["../../../src/resources/v1/tenants/import.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,2BAA2B,EAAE;AAEtC,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,IAAyB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,4BAA4B,EAC5B,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CAAC,IAA+B,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { Batch, type BatchTenantError, type BatchTenantSuccess, type BatchCreateResponse, type BatchUpdateResponse, type BatchDeleteResponse, type BatchCreateParams, type BatchUpdateParams, type BatchDeleteParams, } from "./batch.mjs";
|
|
2
|
-
export { Import, type ImportTenants, type ImportFromCsvParams, type ImportFromWarehouseParams, } from "./import.mjs";
|
|
3
|
-
export { Tenants, type CreateTenant, type Tenant, type TenantListResponse, type TenantCreateParams, type TenantUpdateParams, } from "./tenants.mjs";
|
|
4
|
-
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/tenants/index.ts"],"names":[],"mappings":"OAEO,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB;OACM,EACL,MAAM,EACN,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,GAC/B;OACM,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { Batch, type BatchTenantError, type BatchTenantSuccess, type BatchCreateResponse, type BatchUpdateResponse, type BatchDeleteResponse, type BatchCreateParams, type BatchUpdateParams, type BatchDeleteParams, } from "./batch.js";
|
|
2
|
-
export { Import, type ImportTenants, type ImportFromCsvParams, type ImportFromWarehouseParams, } from "./import.js";
|
|
3
|
-
export { Tenants, type CreateTenant, type Tenant, type TenantListResponse, type TenantCreateParams, type TenantUpdateParams, } from "./tenants.js";
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/tenants/index.ts"],"names":[],"mappings":"OAEO,EACL,KAAK,EACL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB;OACM,EACL,MAAM,EACN,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,GAC/B;OACM,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Tenants = exports.Import = exports.Batch = void 0;
|
|
5
|
-
var batch_1 = require("./batch.js");
|
|
6
|
-
Object.defineProperty(exports, "Batch", { enumerable: true, get: function () { return batch_1.Batch; } });
|
|
7
|
-
var import_1 = require("./import.js");
|
|
8
|
-
Object.defineProperty(exports, "Import", { enumerable: true, get: function () { return import_1.Import; } });
|
|
9
|
-
var tenants_1 = require("./tenants.js");
|
|
10
|
-
Object.defineProperty(exports, "Tenants", { enumerable: true, get: function () { return tenants_1.Tenants; } });
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/v1/tenants/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oCAUiB;AATf,8FAAA,KAAK,OAAA;AAUP,sCAKkB;AAJhB,gGAAA,MAAM,OAAA;AAKR,wCAOmB;AANjB,kGAAA,OAAO,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/v1/tenants/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,KAAK,GASN;OACM,EACL,MAAM,GAIP;OACM,EACL,OAAO,GAMR"}
|