@distilled.cloud/turso 1.0.0-rc.15 → 1.0.0-rc.17
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/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +1 -1
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +1 -27
- package/lib/errors.d.ts +14 -14
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -32
- package/lib/index.d.ts +1 -1
- package/lib/index.js +0 -13
- package/lib/index.lazy.js +6 -0
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +1 -43
- package/lib/retry.d.ts +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +1 -33
- package/lib/services/index.js +0 -2
- package/lib/services/turso.d.ts +15 -209
- package/lib/services/turso.d.ts.map +1 -1
- package/lib/services/turso.js +81 -1384
- package/lib/services/turso.js.map +1 -1
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/turso.js +4 -0
- package/lib/traits.d.ts +2 -2
- package/lib/traits.js +1 -13
- package/package.json +10 -7
- package/src/credentials.ts +10 -11
- package/src/errors.ts +13 -14
- package/src/index.ts +1 -1
- package/src/protocol.ts +6 -9
- package/src/retry.ts +6 -4
- package/src/services/turso.ts +1639 -1663
- package/src/traits.ts +2 -2
- package/lib/credentials.js.map +0 -1
- package/lib/errors.js.map +0 -1
- package/lib/protocol.js.map +0 -1
- package/lib/retry.js.map +0 -1
- package/lib/services/index.js.map +0 -1
- package/lib/traits.js.map +0 -1
- /package/lib/{index.js.map → index.lazy.js.map} +0 -0
package/lib/services/turso.d.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import * as API from "@distilled.cloud/core/api";
|
|
2
|
-
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
-
import * as Redacted from "effect/Redacted";
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
3
|
+
import type * as Redacted from "effect/Redacted";
|
|
4
4
|
import { type TursoOpError, type TursoOpContext } from "../protocol.ts";
|
|
5
5
|
export type { TursoOpError, TursoOpContext };
|
|
6
|
-
declare const BadRequest_base: S.
|
|
6
|
+
declare const BadRequest_base: S.TaggedErrorClass<"BadRequest", {
|
|
7
7
|
readonly code: any;
|
|
8
8
|
readonly message: any;
|
|
9
|
-
}
|
|
9
|
+
}> & (new (...args: any[]) => {
|
|
10
10
|
"@distilled.cloud/error/categories": {
|
|
11
11
|
BadRequestError: true;
|
|
12
12
|
};
|
|
13
13
|
});
|
|
14
14
|
export declare class BadRequest extends /*@__PURE__*/ BadRequest_base {
|
|
15
15
|
}
|
|
16
|
-
declare const Conflict_base: S.
|
|
16
|
+
declare const Conflict_base: S.TaggedErrorClass<"Conflict", {
|
|
17
17
|
readonly code: any;
|
|
18
18
|
readonly message: any;
|
|
19
|
-
}
|
|
19
|
+
}> & (new (...args: any[]) => {
|
|
20
20
|
"@distilled.cloud/error/categories": {
|
|
21
21
|
ConflictError: true;
|
|
22
22
|
};
|
|
23
23
|
});
|
|
24
24
|
export declare class Conflict extends /*@__PURE__*/ Conflict_base {
|
|
25
25
|
}
|
|
26
|
-
declare const Forbidden_base: S.
|
|
26
|
+
declare const Forbidden_base: S.TaggedErrorClass<"Forbidden", {
|
|
27
27
|
readonly code: any;
|
|
28
28
|
readonly message: any;
|
|
29
|
-
}
|
|
29
|
+
}> & (new (...args: any[]) => {
|
|
30
30
|
"@distilled.cloud/error/categories": {
|
|
31
31
|
AuthError: true;
|
|
32
32
|
};
|
|
33
33
|
});
|
|
34
34
|
export declare class Forbidden extends /*@__PURE__*/ Forbidden_base {
|
|
35
35
|
}
|
|
36
|
-
declare const NotFound_base: S.
|
|
36
|
+
declare const NotFound_base: S.TaggedErrorClass<"NotFound", {
|
|
37
37
|
readonly code: any;
|
|
38
38
|
readonly message: any;
|
|
39
|
-
}
|
|
39
|
+
}> & (new (...args: any[]) => {
|
|
40
40
|
"@distilled.cloud/error/categories": {
|
|
41
41
|
BadRequestError: true;
|
|
42
42
|
};
|
|
@@ -51,10 +51,8 @@ export interface AddLocationToGroupRequest {
|
|
|
51
51
|
/** The location code to add to the group. */
|
|
52
52
|
location: string;
|
|
53
53
|
}
|
|
54
|
-
export declare const AddLocationToGroupRequest: S.Schema<AddLocationToGroupRequest>;
|
|
55
54
|
/** An array of location keys the group is located. */
|
|
56
55
|
export type GroupLocationsList = Array<string>;
|
|
57
|
-
export declare const GroupLocationsList: S.Schema<GroupLocationsList>;
|
|
58
56
|
export interface Group {
|
|
59
57
|
/** The group name, unique across your organization. */
|
|
60
58
|
name?: string;
|
|
@@ -69,15 +67,12 @@ export interface Group {
|
|
|
69
67
|
/** The current status for delete protection. If enabled, the group and all its databases cannot be deleted. */
|
|
70
68
|
delete_protection?: boolean;
|
|
71
69
|
}
|
|
72
|
-
export declare const Group: S.Schema<Group>;
|
|
73
70
|
export interface AddLocationToGroupResponse {
|
|
74
71
|
/** The group with the added location */
|
|
75
72
|
group?: Group;
|
|
76
73
|
}
|
|
77
|
-
export declare const AddLocationToGroupResponse: S.Schema<AddLocationToGroupResponse>;
|
|
78
74
|
/** The role given to the user. */
|
|
79
75
|
export type AddOrganizationMemberRequestRole = "admin" | "member" | "viewer";
|
|
80
|
-
export declare const AddOrganizationMemberRequestRole: any;
|
|
81
76
|
export interface AddOrganizationMemberRequest {
|
|
82
77
|
/** The slug of the organization or user account. */
|
|
83
78
|
organizationSlug: string;
|
|
@@ -86,20 +81,15 @@ export interface AddOrganizationMemberRequest {
|
|
|
86
81
|
/** The role given to the user. */
|
|
87
82
|
role?: AddOrganizationMemberRequestRole | (string & {});
|
|
88
83
|
}
|
|
89
|
-
export declare const AddOrganizationMemberRequest: S.Schema<AddOrganizationMemberRequest>;
|
|
90
84
|
/** The role assigned to the member. */
|
|
91
85
|
export type Role = "owner" | "admin" | "member" | "viewer";
|
|
92
|
-
export declare const Role: any;
|
|
93
86
|
export interface AddOrganizationMemberResponse {
|
|
94
87
|
member?: string;
|
|
95
88
|
role?: Role;
|
|
96
89
|
}
|
|
97
|
-
export declare const AddOrganizationMemberResponse: S.Schema<AddOrganizationMemberResponse>;
|
|
98
90
|
export type CreateAPITokenRequestScopesItem = "read" | "db:create" | "db:delete" | "db:configure" | "db:mint-token" | "db:rotate-creds" | "group:configure" | "group:mint-token" | "group:rotate-creds" | "read-only" | "full-access";
|
|
99
|
-
|
|
100
|
-
/** Permissions to grant a group-scoped token. Each entry is either an individual scope or one of the presets `read-only` (expands to `read`) and `full-access` (expands to every scope). Required and must be non-empty when `group` is set. `db:mint-token` lets the token issue new SQL credentials; `db:rotate-creds` invalidates every existing SQL token for the database — they are deliberately separate because rotation is destructive. */
|
|
91
|
+
/** Permissions to grant a group-scoped token. Each entry is either an individual scope or one of the presets `read-only` (expands to `read`) and `full-access` (expands to every scope). Required and must be non-empty when `group` is set. `db:mint-token` lets the token issue new SQL credentials; `db:rotate-creds` invalidates every existing SQL token for the database -- they are deliberately separate because rotation is destructive. */
|
|
101
92
|
export type CreateAPITokenRequestScopesList = Array<CreateAPITokenRequestScopesItem | (string & {})>;
|
|
102
|
-
export declare const CreateAPITokenRequestScopesList: S.Schema<CreateAPITokenRequestScopesList>;
|
|
103
93
|
export interface CreateAPITokenRequest {
|
|
104
94
|
/** The name of the api token. */
|
|
105
95
|
tokenName: string;
|
|
@@ -107,20 +97,17 @@ export interface CreateAPITokenRequest {
|
|
|
107
97
|
organization?: string;
|
|
108
98
|
/** The group name (inside `organization`) to restrict this token to. Requires `organization` and a non-empty `scopes` list. */
|
|
109
99
|
group?: string;
|
|
110
|
-
/** Permissions to grant a group-scoped token. Each entry is either an individual scope or one of the presets `read-only` (expands to `read`) and `full-access` (expands to every scope). Required and must be non-empty when `group` is set. `db:mint-token` lets the token issue new SQL credentials; `db:rotate-creds` invalidates every existing SQL token for the database
|
|
100
|
+
/** Permissions to grant a group-scoped token. Each entry is either an individual scope or one of the presets `read-only` (expands to `read`) and `full-access` (expands to every scope). Required and must be non-empty when `group` is set. `db:mint-token` lets the token issue new SQL credentials; `db:rotate-creds` invalidates every existing SQL token for the database -- they are deliberately separate because rotation is destructive. */
|
|
111
101
|
scopes?: CreateAPITokenRequestScopesList;
|
|
112
102
|
}
|
|
113
|
-
export declare const CreateAPITokenRequest: S.Schema<CreateAPITokenRequest>;
|
|
114
103
|
export interface CreateAPITokenResponse {
|
|
115
104
|
name?: string;
|
|
116
105
|
id?: string;
|
|
117
106
|
/** The actual token contents as a JWT. This is used with the `Bearer` header, see [Authentication](/authentication) for more details. **This token is never revealed again.** */
|
|
118
107
|
token?: Redacted.Redacted<string>;
|
|
119
108
|
}
|
|
120
|
-
export declare const CreateAPITokenResponse: S.Schema<CreateAPITokenResponse>;
|
|
121
109
|
/** The type of seed to be used to create a new database. Use `database` to copy from an existing database, or `database_upload` to [upload a SQLite database file](/api-reference/databases/upload). */
|
|
122
110
|
export type CreateDatabaseRequestSeedType = "database" | "database_upload";
|
|
123
|
-
export declare const CreateDatabaseRequestSeedType: any;
|
|
124
111
|
export interface CreateDatabaseRequestSeed {
|
|
125
112
|
/** The type of seed to be used to create a new database. Use `database` to copy from an existing database, or `database_upload` to [upload a SQLite database file](/api-reference/databases/upload). */
|
|
126
113
|
type?: CreateDatabaseRequestSeedType | (string & {});
|
|
@@ -129,10 +116,8 @@ export interface CreateDatabaseRequestSeed {
|
|
|
129
116
|
/** A formatted [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) recovery point to create a database from. This must be within the last 24 hours, or 30 days on the scaler plan. */
|
|
130
117
|
timestamp?: string;
|
|
131
118
|
}
|
|
132
|
-
export declare const CreateDatabaseRequestSeed: S.Schema<CreateDatabaseRequestSeed>;
|
|
133
119
|
/** The encryption cipher to use. */
|
|
134
120
|
export type CreateDatabaseRequestRemoteEncryptionEncryptionCipher = "aes256gcm" | "aes128gcm" | "chacha20poly1305" | "aegis128l" | "aegis128x2" | "aegis128x4" | "aegis256" | "aegis256x2" | "aegis256x4";
|
|
135
|
-
export declare const CreateDatabaseRequestRemoteEncryptionEncryptionCipher: any;
|
|
136
121
|
/** Encryption configuration for the database. Can be used when creating a new encrypted database, creating a encrypted database from upload (`seed.type = "database_upload"`), or forking from an encrypted database (required when the source database is encrypted). */
|
|
137
122
|
export interface CreateDatabaseRequestRemoteEncryption {
|
|
138
123
|
/** Base64-encoded encryption key. Key size depends on cipher: 32 bytes for aes256gcm, chacha20poly1305, aegis256 variants; 16 bytes for aes128gcm, aegis128l variants. */
|
|
@@ -140,7 +125,6 @@ export interface CreateDatabaseRequestRemoteEncryption {
|
|
|
140
125
|
/** The encryption cipher to use. */
|
|
141
126
|
encryption_cipher?: CreateDatabaseRequestRemoteEncryptionEncryptionCipher | (string & {});
|
|
142
127
|
}
|
|
143
|
-
export declare const CreateDatabaseRequestRemoteEncryption: S.Schema<CreateDatabaseRequestRemoteEncryption>;
|
|
144
128
|
export interface CreateDatabaseRequest {
|
|
145
129
|
/** The slug of the organization or user account. */
|
|
146
130
|
organizationSlug: string;
|
|
@@ -154,33 +138,26 @@ export interface CreateDatabaseRequest {
|
|
|
154
138
|
/** Encryption configuration for the database. Can be used when creating a new encrypted database, creating a encrypted database from upload (`seed.type = "database_upload"`), or forking from an encrypted database (required when the source database is encrypted). */
|
|
155
139
|
remote_encryption?: CreateDatabaseRequestRemoteEncryption;
|
|
156
140
|
}
|
|
157
|
-
export declare const CreateDatabaseRequest: S.Schema<CreateDatabaseRequest>;
|
|
158
141
|
export interface CreateDatabaseOutput {
|
|
159
142
|
DbId?: string;
|
|
160
143
|
Hostname?: string;
|
|
161
144
|
Name?: string;
|
|
162
145
|
}
|
|
163
|
-
export declare const CreateDatabaseOutput: S.Schema<CreateDatabaseOutput>;
|
|
164
146
|
export interface CreateDatabaseResponse {
|
|
165
147
|
/** The newly created database */
|
|
166
148
|
database?: CreateDatabaseOutput;
|
|
167
149
|
}
|
|
168
|
-
export declare const CreateDatabaseResponse: S.Schema<CreateDatabaseResponse>;
|
|
169
150
|
export type CreateDatabaseTokenRequestAuthorization = "full-access" | "read-only";
|
|
170
|
-
export declare const CreateDatabaseTokenRequestAuthorization: any;
|
|
171
151
|
export type CreateDatabaseTokenRequestPermissionsReadAttachDatabasesList = Array<string>;
|
|
172
|
-
export declare const CreateDatabaseTokenRequestPermissionsReadAttachDatabasesList: S.Schema<CreateDatabaseTokenRequestPermissionsReadAttachDatabasesList>;
|
|
173
152
|
/** Read `ATTACH` permission for the token. */
|
|
174
153
|
export interface CreateDatabaseTokenRequestPermissionsReadAttach {
|
|
175
154
|
databases?: CreateDatabaseTokenRequestPermissionsReadAttachDatabasesList;
|
|
176
155
|
}
|
|
177
|
-
export declare const CreateDatabaseTokenRequestPermissionsReadAttach: S.Schema<CreateDatabaseTokenRequestPermissionsReadAttach>;
|
|
178
156
|
/** The permissions for the token. */
|
|
179
157
|
export interface CreateDatabaseTokenRequestPermissions {
|
|
180
158
|
/** Read `ATTACH` permission for the token. */
|
|
181
159
|
read_attach?: CreateDatabaseTokenRequestPermissionsReadAttach;
|
|
182
160
|
}
|
|
183
|
-
export declare const CreateDatabaseTokenRequestPermissions: S.Schema<CreateDatabaseTokenRequestPermissions>;
|
|
184
161
|
export interface CreateDatabaseTokenRequest {
|
|
185
162
|
/** The slug of the organization or user account. */
|
|
186
163
|
organizationSlug: string;
|
|
@@ -193,23 +170,17 @@ export interface CreateDatabaseTokenRequest {
|
|
|
193
170
|
/** The permissions for the token. */
|
|
194
171
|
permissions?: CreateDatabaseTokenRequestPermissions;
|
|
195
172
|
}
|
|
196
|
-
export declare const CreateDatabaseTokenRequest: S.Schema<CreateDatabaseTokenRequest>;
|
|
197
173
|
export interface CreateDatabaseTokenResponse {
|
|
198
174
|
/** The generated authorization token (JWT). */
|
|
199
175
|
jwt?: Redacted.Redacted<string>;
|
|
200
176
|
}
|
|
201
|
-
export declare const CreateDatabaseTokenResponse: S.Schema<CreateDatabaseTokenResponse>;
|
|
202
177
|
/** Set to `all` to enable all extensions. */
|
|
203
178
|
export type ExtensionsCase0 = "all";
|
|
204
|
-
export declare const ExtensionsCase0: any;
|
|
205
179
|
export type ExtensionsCase1Item = "vector" | "crypto" | "fuzzy" | "math" | "stats" | "text" | "unicode" | "uuid" | "regexp" | "vec";
|
|
206
|
-
export declare const ExtensionsCase1Item: any;
|
|
207
180
|
/** Array of extensions to enable. */
|
|
208
181
|
export type ExtensionsCase1List = Array<ExtensionsCase1Item | (string & {})>;
|
|
209
|
-
export declare const ExtensionsCase1List: S.Schema<ExtensionsCase1List>;
|
|
210
182
|
/** The extensions to enable for new databases created in this group. Users looking to enable vector extensions should instead use the native [libSQL vector datatype](/features/ai-and-embeddings). */
|
|
211
183
|
export type Extensions = ExtensionsCase0 | ExtensionsCase1List;
|
|
212
|
-
export declare const Extensions: S.Schema<Extensions>;
|
|
213
184
|
export interface CreateGroupRequest {
|
|
214
185
|
/** The slug of the organization or user account. */
|
|
215
186
|
organizationSlug: string;
|
|
@@ -219,27 +190,21 @@ export interface CreateGroupRequest {
|
|
|
219
190
|
location: string;
|
|
220
191
|
extensions?: Extensions;
|
|
221
192
|
}
|
|
222
|
-
export declare const CreateGroupRequest: S.Schema<CreateGroupRequest>;
|
|
223
193
|
export interface CreateGroupResponse {
|
|
224
194
|
/** The newly created group */
|
|
225
195
|
group?: Group;
|
|
226
196
|
}
|
|
227
|
-
export declare const CreateGroupResponse: S.Schema<CreateGroupResponse>;
|
|
228
197
|
export type CreateGroupTokenRequestAuthorization = "full-access" | "read-only";
|
|
229
|
-
export declare const CreateGroupTokenRequestAuthorization: any;
|
|
230
198
|
export type CreateGroupTokenRequestPermissionsReadAttachDatabasesList = Array<string>;
|
|
231
|
-
export declare const CreateGroupTokenRequestPermissionsReadAttachDatabasesList: S.Schema<CreateGroupTokenRequestPermissionsReadAttachDatabasesList>;
|
|
232
199
|
/** Read `ATTACH` permission for the token. */
|
|
233
200
|
export interface CreateGroupTokenRequestPermissionsReadAttach {
|
|
234
201
|
databases?: CreateGroupTokenRequestPermissionsReadAttachDatabasesList;
|
|
235
202
|
}
|
|
236
|
-
export declare const CreateGroupTokenRequestPermissionsReadAttach: S.Schema<CreateGroupTokenRequestPermissionsReadAttach>;
|
|
237
203
|
/** The permissions for the token. */
|
|
238
204
|
export interface CreateGroupTokenRequestPermissions {
|
|
239
205
|
/** Read `ATTACH` permission for the token. */
|
|
240
206
|
read_attach?: CreateGroupTokenRequestPermissionsReadAttach;
|
|
241
207
|
}
|
|
242
|
-
export declare const CreateGroupTokenRequestPermissions: S.Schema<CreateGroupTokenRequestPermissions>;
|
|
243
208
|
export interface CreateGroupTokenRequest {
|
|
244
209
|
/** The slug of the organization or user account. */
|
|
245
210
|
organizationSlug: string;
|
|
@@ -252,47 +217,38 @@ export interface CreateGroupTokenRequest {
|
|
|
252
217
|
/** The permissions for the token. */
|
|
253
218
|
permissions?: CreateGroupTokenRequestPermissions;
|
|
254
219
|
}
|
|
255
|
-
export declare const CreateGroupTokenRequest: S.Schema<CreateGroupTokenRequest>;
|
|
256
220
|
export interface CreateGroupTokenResponse {
|
|
257
221
|
/** The generated authorization token (JWT). */
|
|
258
222
|
jwt?: Redacted.Redacted<string>;
|
|
259
223
|
}
|
|
260
|
-
export declare const CreateGroupTokenResponse: S.Schema<CreateGroupTokenResponse>;
|
|
261
224
|
export interface DeleteDatabaseRequest {
|
|
262
225
|
/** The slug of the organization or user account. */
|
|
263
226
|
organizationSlug: string;
|
|
264
227
|
/** The name of the database. */
|
|
265
228
|
databaseName: string;
|
|
266
229
|
}
|
|
267
|
-
export declare const DeleteDatabaseRequest: S.Schema<DeleteDatabaseRequest>;
|
|
268
230
|
export interface DeleteDatabaseResponse {
|
|
269
231
|
/** The name of the database that was deleted. */
|
|
270
232
|
database?: string;
|
|
271
233
|
}
|
|
272
|
-
export declare const DeleteDatabaseResponse: S.Schema<DeleteDatabaseResponse>;
|
|
273
234
|
export interface DeleteGroupRequest {
|
|
274
235
|
/** The slug of the organization or user account. */
|
|
275
236
|
organizationSlug: string;
|
|
276
237
|
/** The name of the group. */
|
|
277
238
|
groupName: string;
|
|
278
239
|
}
|
|
279
|
-
export declare const DeleteGroupRequest: S.Schema<DeleteGroupRequest>;
|
|
280
240
|
export interface DeleteGroupResponse {
|
|
281
241
|
group?: Group;
|
|
282
242
|
}
|
|
283
|
-
export declare const DeleteGroupResponse: S.Schema<DeleteGroupResponse>;
|
|
284
243
|
export interface DeleteOrganizationInviteByEmailV2Request {
|
|
285
244
|
/** The slug of the organization or user account. */
|
|
286
245
|
organizationSlug: string;
|
|
287
246
|
email: string;
|
|
288
247
|
}
|
|
289
|
-
export declare const DeleteOrganizationInviteByEmailV2Request: S.Schema<DeleteOrganizationInviteByEmailV2Request>;
|
|
290
248
|
export interface DeleteOrganizationInviteByEmailV2Response {
|
|
291
249
|
}
|
|
292
|
-
export declare const DeleteOrganizationInviteByEmailV2Response: S.Schema<DeleteOrganizationInviteByEmailV2Response>;
|
|
293
250
|
export interface GetCurrentUserRequest {
|
|
294
251
|
}
|
|
295
|
-
export declare const GetCurrentUserRequest: S.Schema<GetCurrentUserRequest>;
|
|
296
252
|
export interface GetCurrentUserResponseUser {
|
|
297
253
|
/** The username of the user. */
|
|
298
254
|
username?: string;
|
|
@@ -309,21 +265,17 @@ export interface GetCurrentUserResponseUser {
|
|
|
309
265
|
/** Whether the user has pending organization invites waiting to be accepted or declined. */
|
|
310
266
|
has_pending_invites?: boolean;
|
|
311
267
|
}
|
|
312
|
-
export declare const GetCurrentUserResponseUser: S.Schema<GetCurrentUserResponseUser>;
|
|
313
268
|
export interface GetCurrentUserResponse {
|
|
314
269
|
user?: GetCurrentUserResponseUser;
|
|
315
270
|
}
|
|
316
|
-
export declare const GetCurrentUserResponse: S.Schema<GetCurrentUserResponse>;
|
|
317
271
|
export interface GetDatabaseRequest {
|
|
318
272
|
/** The slug of the organization or user account. */
|
|
319
273
|
organizationSlug: string;
|
|
320
274
|
/** The name of the database. */
|
|
321
275
|
databaseName: string;
|
|
322
276
|
}
|
|
323
|
-
export declare const GetDatabaseRequest: S.Schema<GetDatabaseRequest>;
|
|
324
277
|
/** A list of regions for the group the database belongs to. */
|
|
325
278
|
export type DatabaseRegionsList = Array<string>;
|
|
326
|
-
export declare const DatabaseRegionsList: S.Schema<DatabaseRegionsList>;
|
|
327
279
|
export interface DatabaseParent {
|
|
328
280
|
/** The parent database identifier. */
|
|
329
281
|
id?: string;
|
|
@@ -332,7 +284,6 @@ export interface DatabaseParent {
|
|
|
332
284
|
/** The timestamp when the database was branched from the parent. */
|
|
333
285
|
branched_at?: string;
|
|
334
286
|
}
|
|
335
|
-
export declare const DatabaseParent: S.Schema<DatabaseParent>;
|
|
336
287
|
export interface Database {
|
|
337
288
|
/** The database name, **unique** across your organization. */
|
|
338
289
|
Name?: string;
|
|
@@ -356,24 +307,19 @@ export interface Database {
|
|
|
356
307
|
/** Whether other databases may be attached to this database with `ATTACH`. */
|
|
357
308
|
allow_attach?: boolean;
|
|
358
309
|
}
|
|
359
|
-
export declare const Database: S.Schema<Database>;
|
|
360
310
|
export interface GetDatabaseResponse {
|
|
361
311
|
database?: Database;
|
|
362
312
|
}
|
|
363
|
-
export declare const GetDatabaseResponse: S.Schema<GetDatabaseResponse>;
|
|
364
313
|
export interface GetDatabaseConfigurationRequest {
|
|
365
314
|
/** The slug of the organization or user account. */
|
|
366
315
|
organizationSlug: string;
|
|
367
316
|
/** The name of the database. */
|
|
368
317
|
databaseName: string;
|
|
369
318
|
}
|
|
370
|
-
export declare const GetDatabaseConfigurationRequest: S.Schema<GetDatabaseConfigurationRequest>;
|
|
371
319
|
/** List of allowed IP addresses and CIDR blocks. Empty means no IP restriction. */
|
|
372
320
|
export type DatabaseConfigurationResponseAllowedIpsList = Array<string>;
|
|
373
|
-
export declare const DatabaseConfigurationResponseAllowedIpsList: S.Schema<DatabaseConfigurationResponseAllowedIpsList>;
|
|
374
321
|
/** List of allowed AWS VPC endpoint IDs. Empty means no VPC endpoint restriction. */
|
|
375
322
|
export type DatabaseConfigurationResponseAllowedAwsVpcIdsList = Array<string>;
|
|
376
|
-
export declare const DatabaseConfigurationResponseAllowedAwsVpcIdsList: S.Schema<DatabaseConfigurationResponseAllowedAwsVpcIdsList>;
|
|
377
323
|
export interface DatabaseConfigurationResponse {
|
|
378
324
|
/** The maximum size of the database in bytes. Values with units are also accepted, e.g. 1mb, 256mb, 1gb. */
|
|
379
325
|
size_limit?: string;
|
|
@@ -390,7 +336,6 @@ export interface DatabaseConfigurationResponse {
|
|
|
390
336
|
/** List of allowed AWS VPC endpoint IDs. Empty means no VPC endpoint restriction. */
|
|
391
337
|
allowed_aws_vpc_ids?: DatabaseConfigurationResponseAllowedAwsVpcIdsList;
|
|
392
338
|
}
|
|
393
|
-
export declare const DatabaseConfigurationResponse: S.Schema<DatabaseConfigurationResponse>;
|
|
394
339
|
export interface GetDatabaseInstanceRequest {
|
|
395
340
|
/** The slug of the organization or user account. */
|
|
396
341
|
organizationSlug: string;
|
|
@@ -399,10 +344,8 @@ export interface GetDatabaseInstanceRequest {
|
|
|
399
344
|
/** The name of the instance (location code). */
|
|
400
345
|
instanceName: string;
|
|
401
346
|
}
|
|
402
|
-
export declare const GetDatabaseInstanceRequest: S.Schema<GetDatabaseInstanceRequest>;
|
|
403
347
|
/** The type of database instance this, will be `primary` or `replica`. */
|
|
404
348
|
export type InstanceType = "primary" | "replica";
|
|
405
|
-
export declare const InstanceType: any;
|
|
406
349
|
export interface Instance {
|
|
407
350
|
/** The instance universal unique identifier (UUID). */
|
|
408
351
|
uuid?: string;
|
|
@@ -415,18 +358,15 @@ export interface Instance {
|
|
|
415
358
|
/** The DNS hostname used for client libSQL and HTTP connections (specific to this instance only). */
|
|
416
359
|
hostname?: string;
|
|
417
360
|
}
|
|
418
|
-
export declare const Instance: S.Schema<Instance>;
|
|
419
361
|
export interface GetDatabaseInstanceResponse {
|
|
420
362
|
instance?: Instance;
|
|
421
363
|
}
|
|
422
|
-
export declare const GetDatabaseInstanceResponse: S.Schema<GetDatabaseInstanceResponse>;
|
|
423
364
|
export interface GetDatabaseStatsRequest {
|
|
424
365
|
/** The slug of the organization or user account. */
|
|
425
366
|
organizationSlug: string;
|
|
426
367
|
/** The name of the database. */
|
|
427
368
|
databaseName: string;
|
|
428
369
|
}
|
|
429
|
-
export declare const GetDatabaseStatsRequest: S.Schema<GetDatabaseStatsRequest>;
|
|
430
370
|
export interface DatabaseStatsOutput {
|
|
431
371
|
/** A string representing the SQL query executed. */
|
|
432
372
|
query?: string;
|
|
@@ -435,15 +375,12 @@ export interface DatabaseStatsOutput {
|
|
|
435
375
|
/** An integer indicating the number of rows written (inserted, updated, or deleted) by the query, which reflects the impact of the query on the database data. */
|
|
436
376
|
rows_written?: number;
|
|
437
377
|
}
|
|
438
|
-
export declare const DatabaseStatsOutput: S.Schema<DatabaseStatsOutput>;
|
|
439
378
|
/** The top queries performed on the given database as well as the total rows read and written. */
|
|
440
379
|
export type GetDatabaseStatsResponseTopQueriesList = Array<DatabaseStatsOutput>;
|
|
441
|
-
export declare const GetDatabaseStatsResponseTopQueriesList: S.Schema<GetDatabaseStatsResponseTopQueriesList>;
|
|
442
380
|
export interface GetDatabaseStatsResponse {
|
|
443
381
|
/** The top queries performed on the given database as well as the total rows read and written. */
|
|
444
382
|
top_queries?: GetDatabaseStatsResponseTopQueriesList | null;
|
|
445
383
|
}
|
|
446
|
-
export declare const GetDatabaseStatsResponse: S.Schema<GetDatabaseStatsResponse>;
|
|
447
384
|
export interface GetDatabaseUsageRequest {
|
|
448
385
|
/** The slug of the organization or user account. */
|
|
449
386
|
organizationSlug: string;
|
|
@@ -454,7 +391,6 @@ export interface GetDatabaseUsageRequest {
|
|
|
454
391
|
/** The datetime to retrieve usage **to** in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Defaults to the current calendar month if not provided. Example: `2023-02-01T00:00:00Z` */
|
|
455
392
|
to?: string;
|
|
456
393
|
}
|
|
457
|
-
export declare const GetDatabaseUsageRequest: S.Schema<GetDatabaseUsageRequest>;
|
|
458
394
|
export interface DatabaseUsageObject {
|
|
459
395
|
/** The total rows read in the time period. */
|
|
460
396
|
rows_read?: number;
|
|
@@ -465,17 +401,14 @@ export interface DatabaseUsageObject {
|
|
|
465
401
|
/** The total bytes synced. */
|
|
466
402
|
bytes_synced?: number;
|
|
467
403
|
}
|
|
468
|
-
export declare const DatabaseUsageObject: S.Schema<DatabaseUsageObject>;
|
|
469
404
|
export interface DatabaseUsageOutputInstancesItem {
|
|
470
405
|
/** The instance universal unique identifier (UUID). */
|
|
471
406
|
uuid?: string;
|
|
472
407
|
/** The usage for the current database instance. */
|
|
473
408
|
usage?: DatabaseUsageObject;
|
|
474
409
|
}
|
|
475
|
-
export declare const DatabaseUsageOutputInstancesItem: S.Schema<DatabaseUsageOutputInstancesItem>;
|
|
476
410
|
/** The usage objects for instances of the current database. */
|
|
477
411
|
export type DatabaseUsageOutputInstancesList = Array<DatabaseUsageOutputInstancesItem>;
|
|
478
|
-
export declare const DatabaseUsageOutputInstancesList: S.Schema<DatabaseUsageOutputInstancesList>;
|
|
479
412
|
export interface DatabaseUsageOutput {
|
|
480
413
|
uuid?: string;
|
|
481
414
|
/** The usage objects for instances of the current database. */
|
|
@@ -483,43 +416,35 @@ export interface DatabaseUsageOutput {
|
|
|
483
416
|
/** The total usage for the database. */
|
|
484
417
|
total?: DatabaseUsageObject;
|
|
485
418
|
}
|
|
486
|
-
export declare const DatabaseUsageOutput: S.Schema<DatabaseUsageOutput>;
|
|
487
419
|
export interface GetDatabaseUsageResponse {
|
|
488
420
|
/** The database usage object, containg the total and individual instance usage for rows read and written, as well as the total storage size (in bytes). */
|
|
489
421
|
database?: DatabaseUsageOutput;
|
|
490
422
|
}
|
|
491
|
-
export declare const GetDatabaseUsageResponse: S.Schema<GetDatabaseUsageResponse>;
|
|
492
423
|
export interface GetGroupRequest {
|
|
493
424
|
/** The slug of the organization or user account. */
|
|
494
425
|
organizationSlug: string;
|
|
495
426
|
/** The name of the group. */
|
|
496
427
|
groupName: string;
|
|
497
428
|
}
|
|
498
|
-
export declare const GetGroupRequest: S.Schema<GetGroupRequest>;
|
|
499
429
|
export interface GetGroupResponse {
|
|
500
430
|
group?: Group;
|
|
501
431
|
}
|
|
502
|
-
export declare const GetGroupResponse: S.Schema<GetGroupResponse>;
|
|
503
432
|
export interface GetGroupConfigurationRequest {
|
|
504
433
|
/** The slug of the organization or user account. */
|
|
505
434
|
organizationSlug: string;
|
|
506
435
|
/** The name of the group. */
|
|
507
436
|
groupName: string;
|
|
508
437
|
}
|
|
509
|
-
export declare const GetGroupConfigurationRequest: S.Schema<GetGroupConfigurationRequest>;
|
|
510
438
|
export interface GroupConfigurationResponse {
|
|
511
439
|
/** Prevent the group from being deleted. */
|
|
512
440
|
delete_protection?: boolean;
|
|
513
441
|
}
|
|
514
|
-
export declare const GroupConfigurationResponse: S.Schema<GroupConfigurationResponse>;
|
|
515
442
|
export interface GetOrganizationRequest {
|
|
516
443
|
/** The slug of the organization or user account. */
|
|
517
444
|
organizationSlug: string;
|
|
518
445
|
}
|
|
519
|
-
export declare const GetOrganizationRequest: S.Schema<GetOrganizationRequest>;
|
|
520
446
|
/** The type of account this organization is. Will always be `personal` or `team`. */
|
|
521
447
|
export type OrganizationType = "personal" | "team";
|
|
522
|
-
export declare const OrganizationType: any;
|
|
523
448
|
export interface Organization {
|
|
524
449
|
/** The organization name. Every user has a `personal` organization for their own account. */
|
|
525
450
|
name?: string;
|
|
@@ -544,21 +469,17 @@ export interface Organization {
|
|
|
544
469
|
/** Whether deleted database and group recovery is enabled for the organization. Returned when retrieving a single organization. */
|
|
545
470
|
restore_enabled?: boolean;
|
|
546
471
|
}
|
|
547
|
-
export declare const Organization: S.Schema<Organization>;
|
|
548
472
|
export interface GetOrganizationResponse {
|
|
549
473
|
organization?: Organization;
|
|
550
474
|
}
|
|
551
|
-
export declare const GetOrganizationResponse: S.Schema<GetOrganizationResponse>;
|
|
552
475
|
export interface GetOrganizationMemberRequest {
|
|
553
476
|
/** The slug of the organization or user account. */
|
|
554
477
|
organizationSlug: string;
|
|
555
478
|
/** The username of a Turso user or organization member. */
|
|
556
479
|
username: string;
|
|
557
480
|
}
|
|
558
|
-
export declare const GetOrganizationMemberRequest: S.Schema<GetOrganizationMemberRequest>;
|
|
559
481
|
/** The role assigned to the member. */
|
|
560
482
|
export type MemberRole = "owner" | "admin" | "member" | "viewer";
|
|
561
|
-
export declare const MemberRole: any;
|
|
562
483
|
export interface Member {
|
|
563
484
|
/** The username for the member. */
|
|
564
485
|
username?: string;
|
|
@@ -567,16 +488,13 @@ export interface Member {
|
|
|
567
488
|
/** The email for the member. */
|
|
568
489
|
email?: string;
|
|
569
490
|
}
|
|
570
|
-
export declare const Member: S.Schema<Member>;
|
|
571
491
|
export interface GetOrganizationMemberResponse {
|
|
572
492
|
member?: Member;
|
|
573
493
|
}
|
|
574
|
-
export declare const GetOrganizationMemberResponse: S.Schema<GetOrganizationMemberResponse>;
|
|
575
494
|
export interface GetOrganizationSubscriptionRequest {
|
|
576
495
|
/** The slug of the organization or user account. */
|
|
577
496
|
organizationSlug: string;
|
|
578
497
|
}
|
|
579
|
-
export declare const GetOrganizationSubscriptionRequest: S.Schema<GetOrganizationSubscriptionRequest>;
|
|
580
498
|
export interface GetOrganizationSubscriptionResponseSubscription {
|
|
581
499
|
/** The name of the plan for the current subscription. */
|
|
582
500
|
name?: string;
|
|
@@ -587,16 +505,13 @@ export interface GetOrganizationSubscriptionResponseSubscription {
|
|
|
587
505
|
/** Whether the plan is billed monthly or yearly. */
|
|
588
506
|
timeline?: string;
|
|
589
507
|
}
|
|
590
|
-
export declare const GetOrganizationSubscriptionResponseSubscription: S.Schema<GetOrganizationSubscriptionResponseSubscription>;
|
|
591
508
|
export interface GetOrganizationSubscriptionResponse {
|
|
592
509
|
subscription?: GetOrganizationSubscriptionResponseSubscription;
|
|
593
510
|
}
|
|
594
|
-
export declare const GetOrganizationSubscriptionResponse: S.Schema<GetOrganizationSubscriptionResponse>;
|
|
595
511
|
export interface GetOrganizationUsageRequest {
|
|
596
512
|
/** The slug of the organization or user account. */
|
|
597
513
|
organizationSlug: string;
|
|
598
514
|
}
|
|
599
|
-
export declare const GetOrganizationUsageRequest: S.Schema<GetOrganizationUsageRequest>;
|
|
600
515
|
/** The usage object for the organization. */
|
|
601
516
|
export interface GetOrganizationUsageResponseOrganizationUsage {
|
|
602
517
|
/** The number of rows read allowed for the specific plan. */
|
|
@@ -614,10 +529,8 @@ export interface GetOrganizationUsageResponseOrganizationUsage {
|
|
|
614
529
|
/** The number of bytes synced allowed for the specific plan, in bytes. */
|
|
615
530
|
bytes_synced?: number;
|
|
616
531
|
}
|
|
617
|
-
export declare const GetOrganizationUsageResponseOrganizationUsage: S.Schema<GetOrganizationUsageResponseOrganizationUsage>;
|
|
618
532
|
/** The databases for the organization and their usage. */
|
|
619
533
|
export type GetOrganizationUsageResponseOrganizationDatabasesList = Array<DatabaseUsageOutput>;
|
|
620
|
-
export declare const GetOrganizationUsageResponseOrganizationDatabasesList: S.Schema<GetOrganizationUsageResponseOrganizationDatabasesList>;
|
|
621
534
|
/** The organization usage object, containing the total usage for rows read and written, as well as the total storage size (in bytes). */
|
|
622
535
|
export interface GetOrganizationUsageResponseOrganization {
|
|
623
536
|
/** The UUID of the organization. */
|
|
@@ -627,35 +540,28 @@ export interface GetOrganizationUsageResponseOrganization {
|
|
|
627
540
|
/** The databases for the organization and their usage. */
|
|
628
541
|
databases?: GetOrganizationUsageResponseOrganizationDatabasesList;
|
|
629
542
|
}
|
|
630
|
-
export declare const GetOrganizationUsageResponseOrganization: S.Schema<GetOrganizationUsageResponseOrganization>;
|
|
631
543
|
export interface GetOrganizationUsageResponse {
|
|
632
544
|
/** The organization usage object, containing the total usage for rows read and written, as well as the total storage size (in bytes). */
|
|
633
545
|
organization?: GetOrganizationUsageResponseOrganization;
|
|
634
546
|
}
|
|
635
|
-
export declare const GetOrganizationUsageResponse: S.Schema<GetOrganizationUsageResponse>;
|
|
636
547
|
export interface InvalidateDatabaseTokensRequest {
|
|
637
548
|
/** The slug of the organization or user account. */
|
|
638
549
|
organizationSlug: string;
|
|
639
550
|
/** The name of the database. */
|
|
640
551
|
databaseName: string;
|
|
641
552
|
}
|
|
642
|
-
export declare const InvalidateDatabaseTokensRequest: S.Schema<InvalidateDatabaseTokensRequest>;
|
|
643
553
|
export interface InvalidateDatabaseTokensResponse {
|
|
644
554
|
}
|
|
645
|
-
export declare const InvalidateDatabaseTokensResponse: S.Schema<InvalidateDatabaseTokensResponse>;
|
|
646
555
|
export interface InvalidateGroupTokensRequest {
|
|
647
556
|
/** The slug of the organization or user account. */
|
|
648
557
|
organizationSlug: string;
|
|
649
558
|
/** The name of the group. */
|
|
650
559
|
groupName: string;
|
|
651
560
|
}
|
|
652
|
-
export declare const InvalidateGroupTokensRequest: S.Schema<InvalidateGroupTokensRequest>;
|
|
653
561
|
export interface InvalidateGroupTokensResponse {
|
|
654
562
|
}
|
|
655
|
-
export declare const InvalidateGroupTokensResponse: S.Schema<InvalidateGroupTokensResponse>;
|
|
656
563
|
/** The role given to the user. */
|
|
657
564
|
export type InviteOrganizationMemberV2RequestRole = "admin" | "member" | "viewer";
|
|
658
|
-
export declare const InviteOrganizationMemberV2RequestRole: any;
|
|
659
565
|
export interface InviteOrganizationMemberV2Request {
|
|
660
566
|
/** The slug of the organization or user account. */
|
|
661
567
|
organizationSlug: string;
|
|
@@ -666,10 +572,8 @@ export interface InviteOrganizationMemberV2Request {
|
|
|
666
572
|
/** The role given to the user. */
|
|
667
573
|
role?: InviteOrganizationMemberV2RequestRole | (string & {});
|
|
668
574
|
}
|
|
669
|
-
export declare const InviteOrganizationMemberV2Request: S.Schema<InviteOrganizationMemberV2Request>;
|
|
670
575
|
/** The assigned role for the invited user. */
|
|
671
576
|
export type InviteCreatedV2Role = "admin" | "member" | "viewer";
|
|
672
|
-
export declare const InviteCreatedV2Role: any;
|
|
673
577
|
export interface InviteCreatedV2 {
|
|
674
578
|
/** The email of the person invited. */
|
|
675
579
|
email?: string;
|
|
@@ -678,17 +582,13 @@ export interface InviteCreatedV2 {
|
|
|
678
582
|
/** The name of the organization the user was invited to. */
|
|
679
583
|
organization?: string;
|
|
680
584
|
}
|
|
681
|
-
export declare const InviteCreatedV2: S.Schema<InviteCreatedV2>;
|
|
682
585
|
export interface InviteOrganizationMemberV2Response {
|
|
683
586
|
invited?: InviteCreatedV2;
|
|
684
587
|
}
|
|
685
|
-
export declare const InviteOrganizationMemberV2Response: S.Schema<InviteOrganizationMemberV2Response>;
|
|
686
588
|
export interface ListAPITokensRequest {
|
|
687
589
|
}
|
|
688
|
-
export declare const ListAPITokensRequest: S.Schema<ListAPITokensRequest>;
|
|
689
590
|
/** The expanded list of scopes granted to this token. Present only for group-scoped tokens. Presets passed at creation time (`read-only`, `full-access`) are stored as the underlying individual scopes and are returned in that form. */
|
|
690
591
|
export type APITokenScopesList = Array<string>;
|
|
691
|
-
export declare const APITokenScopesList: S.Schema<APITokenScopesList>;
|
|
692
592
|
export interface APIToken {
|
|
693
593
|
/** The name given to the API Token. */
|
|
694
594
|
name?: string;
|
|
@@ -703,26 +603,20 @@ export interface APIToken {
|
|
|
703
603
|
/** The date the token was created, in `YYYY-MM-DD` format. */
|
|
704
604
|
created_at?: string;
|
|
705
605
|
}
|
|
706
|
-
export declare const APIToken: S.Schema<APIToken>;
|
|
707
606
|
export type ListAPITokensResponseTokensList = Array<APIToken>;
|
|
708
|
-
export declare const ListAPITokensResponseTokensList: S.Schema<ListAPITokensResponseTokensList>;
|
|
709
607
|
export interface ListAPITokensResponse {
|
|
710
608
|
tokens?: ListAPITokensResponseTokensList;
|
|
711
609
|
}
|
|
712
|
-
export declare const ListAPITokensResponse: S.Schema<ListAPITokensResponse>;
|
|
713
610
|
export interface ListDatabaseInstancesRequest {
|
|
714
611
|
/** The slug of the organization or user account. */
|
|
715
612
|
organizationSlug: string;
|
|
716
613
|
/** The name of the database. */
|
|
717
614
|
databaseName: string;
|
|
718
615
|
}
|
|
719
|
-
export declare const ListDatabaseInstancesRequest: S.Schema<ListDatabaseInstancesRequest>;
|
|
720
616
|
export type ListDatabaseInstancesResponseInstancesList = Array<Instance>;
|
|
721
|
-
export declare const ListDatabaseInstancesResponseInstancesList: S.Schema<ListDatabaseInstancesResponseInstancesList>;
|
|
722
617
|
export interface ListDatabaseInstancesResponse {
|
|
723
618
|
instances?: ListDatabaseInstancesResponseInstancesList;
|
|
724
619
|
}
|
|
725
|
-
export declare const ListDatabaseInstancesResponse: S.Schema<ListDatabaseInstancesResponse>;
|
|
726
620
|
export interface ListDatabasesRequest {
|
|
727
621
|
/** The slug of the organization or user account. */
|
|
728
622
|
organizationSlug: string;
|
|
@@ -733,13 +627,10 @@ export interface ListDatabasesRequest {
|
|
|
733
627
|
/** Filter database branches by using their parent database ID. */
|
|
734
628
|
parent?: string;
|
|
735
629
|
}
|
|
736
|
-
export declare const ListDatabasesRequest: S.Schema<ListDatabasesRequest>;
|
|
737
630
|
export type ListDatabasesResponseDatabasesList = Array<Database>;
|
|
738
|
-
export declare const ListDatabasesResponseDatabasesList: S.Schema<ListDatabasesResponseDatabasesList>;
|
|
739
631
|
export interface ListDatabasesResponse {
|
|
740
632
|
databases?: ListDatabasesResponseDatabasesList;
|
|
741
633
|
}
|
|
742
|
-
export declare const ListDatabasesResponse: S.Schema<ListDatabasesResponse>;
|
|
743
634
|
export interface ListDeletedDatabasesRequest {
|
|
744
635
|
/** The UUID of the organization. Retrieve it with the Retrieve Organization endpoint (the `id` field). */
|
|
745
636
|
organizationId: string;
|
|
@@ -752,10 +643,8 @@ export interface ListDeletedDatabasesRequest {
|
|
|
752
643
|
/** Opaque pagination cursor from the previous page's `pagination.next`. */
|
|
753
644
|
cursor?: string;
|
|
754
645
|
}
|
|
755
|
-
export declare const ListDeletedDatabasesRequest: S.Schema<ListDeletedDatabasesRequest>;
|
|
756
646
|
/** The regions the database was located in. */
|
|
757
647
|
export type DeletedDatabaseRegionsList = Array<string>;
|
|
758
|
-
export declare const DeletedDatabaseRegionsList: S.Schema<DeletedDatabaseRegionsList>;
|
|
759
648
|
export interface DeletedDatabase {
|
|
760
649
|
/** The database name. */
|
|
761
650
|
Name?: string;
|
|
@@ -780,19 +669,15 @@ export interface DeletedDatabase {
|
|
|
780
669
|
/** Set when the database's group was deleted with it. Restoring the database also restores the group. */
|
|
781
670
|
group_deleted_at?: string;
|
|
782
671
|
}
|
|
783
|
-
export declare const DeletedDatabase: S.Schema<DeletedDatabase>;
|
|
784
672
|
export type ListDeletedDatabasesResponseDatabasesList = Array<DeletedDatabase>;
|
|
785
|
-
export declare const ListDeletedDatabasesResponseDatabasesList: S.Schema<ListDeletedDatabasesResponseDatabasesList>;
|
|
786
673
|
export interface Pagination {
|
|
787
674
|
/** Opaque cursor for the next page. Pass it back as the `cursor` query parameter. Absent on the last page. */
|
|
788
675
|
next?: string;
|
|
789
676
|
}
|
|
790
|
-
export declare const Pagination: S.Schema<Pagination>;
|
|
791
677
|
export interface ListDeletedDatabasesResponse {
|
|
792
678
|
databases?: ListDeletedDatabasesResponseDatabasesList;
|
|
793
679
|
pagination?: Pagination;
|
|
794
680
|
}
|
|
795
|
-
export declare const ListDeletedDatabasesResponse: S.Schema<ListDeletedDatabasesResponse>;
|
|
796
681
|
export interface ListDeletedGroupsRequest {
|
|
797
682
|
/** The UUID of the organization. Retrieve it with the Retrieve Organization endpoint (the `id` field). */
|
|
798
683
|
organizationId: string;
|
|
@@ -801,7 +686,6 @@ export interface ListDeletedGroupsRequest {
|
|
|
801
686
|
/** Opaque pagination cursor from the previous page's `pagination.next`. */
|
|
802
687
|
cursor?: string;
|
|
803
688
|
}
|
|
804
|
-
export declare const ListDeletedGroupsRequest: S.Schema<ListDeletedGroupsRequest>;
|
|
805
689
|
export interface DeletedGroup {
|
|
806
690
|
/** The group UUID. Use it to restore the group. */
|
|
807
691
|
uuid?: string;
|
|
@@ -812,52 +696,40 @@ export interface DeletedGroup {
|
|
|
812
696
|
/** The number of member databases that restoring the group would bring back with it. */
|
|
813
697
|
cascade_databases?: number;
|
|
814
698
|
}
|
|
815
|
-
export declare const DeletedGroup: S.Schema<DeletedGroup>;
|
|
816
699
|
export type ListDeletedGroupsResponseGroupsList = Array<DeletedGroup>;
|
|
817
|
-
export declare const ListDeletedGroupsResponseGroupsList: S.Schema<ListDeletedGroupsResponseGroupsList>;
|
|
818
700
|
export interface ListDeletedGroupsResponse {
|
|
819
701
|
groups?: ListDeletedGroupsResponseGroupsList;
|
|
820
702
|
pagination?: Pagination;
|
|
821
703
|
}
|
|
822
|
-
export declare const ListDeletedGroupsResponse: S.Schema<ListDeletedGroupsResponse>;
|
|
823
704
|
export interface ListGroupsRequest {
|
|
824
705
|
/** The slug of the organization or user account. */
|
|
825
706
|
organizationSlug: string;
|
|
826
707
|
}
|
|
827
|
-
export declare const ListGroupsRequest: S.Schema<ListGroupsRequest>;
|
|
828
708
|
export type ListGroupsResponseGroupsList = Array<Group>;
|
|
829
|
-
export declare const ListGroupsResponseGroupsList: S.Schema<ListGroupsResponseGroupsList>;
|
|
830
709
|
export interface ListGroupsResponse {
|
|
831
710
|
groups?: ListGroupsResponseGroupsList;
|
|
832
711
|
}
|
|
833
|
-
export declare const ListGroupsResponse: S.Schema<ListGroupsResponse>;
|
|
834
712
|
export interface ListLocationsRequest {
|
|
835
713
|
}
|
|
836
|
-
export declare const ListLocationsRequest: S.Schema<ListLocationsRequest>;
|
|
837
714
|
/** A mapping of location codes to location names. */
|
|
838
715
|
export type ListLocationsResponseLocationsMap = {
|
|
839
716
|
[key: string]: string | undefined;
|
|
840
717
|
};
|
|
841
|
-
export declare const ListLocationsResponseLocationsMap: S.Schema<ListLocationsResponseLocationsMap>;
|
|
842
718
|
export interface ListLocationsResponse {
|
|
843
719
|
/** A mapping of location codes to location names. */
|
|
844
720
|
locations?: ListLocationsResponseLocationsMap;
|
|
845
721
|
}
|
|
846
|
-
export declare const ListLocationsResponse: S.Schema<ListLocationsResponse>;
|
|
847
722
|
export interface ListOrganizationAPITokensRequest {
|
|
848
723
|
/** The slug of the organization or user account. */
|
|
849
724
|
organizationSlug: string;
|
|
850
725
|
}
|
|
851
|
-
export declare const ListOrganizationAPITokensRequest: S.Schema<ListOrganizationAPITokensRequest>;
|
|
852
726
|
/** The expanded scope list. Present only for group-scoped tokens. */
|
|
853
727
|
export type ListOrganizationAPITokensResponseTokensItemScopesList = Array<string>;
|
|
854
|
-
export declare const ListOrganizationAPITokensResponseTokensItemScopesList: S.Schema<ListOrganizationAPITokensResponseTokensItemScopesList>;
|
|
855
728
|
/** The user who minted the token. Returned to admins and owners so they can see who provisioned each token. */
|
|
856
729
|
export interface ListOrganizationAPITokensResponseTokensItemOwner {
|
|
857
730
|
username?: string;
|
|
858
731
|
email?: string;
|
|
859
732
|
}
|
|
860
|
-
export declare const ListOrganizationAPITokensResponseTokensItemOwner: S.Schema<ListOrganizationAPITokensResponseTokensItemOwner>;
|
|
861
733
|
export interface ListOrganizationAPITokensResponseTokensItem {
|
|
862
734
|
/** The token name. */
|
|
863
735
|
name?: string;
|
|
@@ -874,13 +746,10 @@ export interface ListOrganizationAPITokensResponseTokensItem {
|
|
|
874
746
|
/** The date the token was created. */
|
|
875
747
|
created_at?: string;
|
|
876
748
|
}
|
|
877
|
-
export declare const ListOrganizationAPITokensResponseTokensItem: S.Schema<ListOrganizationAPITokensResponseTokensItem>;
|
|
878
749
|
export type ListOrganizationAPITokensResponseTokensList = Array<ListOrganizationAPITokensResponseTokensItem>;
|
|
879
|
-
export declare const ListOrganizationAPITokensResponseTokensList: S.Schema<ListOrganizationAPITokensResponseTokensList>;
|
|
880
750
|
export interface ListOrganizationAPITokensResponse {
|
|
881
751
|
tokens?: ListOrganizationAPITokensResponseTokensList;
|
|
882
752
|
}
|
|
883
|
-
export declare const ListOrganizationAPITokensResponse: S.Schema<ListOrganizationAPITokensResponse>;
|
|
884
753
|
export interface ListOrganizationAuditLogsRequest {
|
|
885
754
|
/** The slug of the organization or user account. */
|
|
886
755
|
organizationSlug: string;
|
|
@@ -889,10 +758,8 @@ export interface ListOrganizationAuditLogsRequest {
|
|
|
889
758
|
/** The page number to return. Defaults to 1. */
|
|
890
759
|
page?: number;
|
|
891
760
|
}
|
|
892
|
-
export declare const ListOrganizationAuditLogsRequest: S.Schema<ListOrganizationAuditLogsRequest>;
|
|
893
761
|
/** The code associated to the action taken. */
|
|
894
762
|
export type AuditLogCode = "user-signup" | "db-create" | "db-delete" | "db-protect" | "db-unprotect" | "db-token-create" | "group-token-create" | "user-token-create" | "instance-create" | "instance-delete" | "org-create" | "org-delete" | "org-member-add" | "org-member-rm" | "org-member-leave" | "org-plan-update" | "org-set-overages" | "group-create" | "group-delete" | "group-unarchive" | "group-protect" | "group-unprotect" | "db-aunrchive" | "user-delete";
|
|
895
|
-
export declare const AuditLogCode: any;
|
|
896
763
|
export interface AuditLog {
|
|
897
764
|
/** The code associated to the action taken. */
|
|
898
765
|
code?: AuditLogCode;
|
|
@@ -907,9 +774,7 @@ export interface AuditLog {
|
|
|
907
774
|
/** The payload of the action performed. */
|
|
908
775
|
data?: unknown;
|
|
909
776
|
}
|
|
910
|
-
export declare const AuditLog: S.Schema<AuditLog>;
|
|
911
777
|
export type ListOrganizationAuditLogsResponseAuditLogsList = Array<AuditLog>;
|
|
912
|
-
export declare const ListOrganizationAuditLogsResponseAuditLogsList: S.Schema<ListOrganizationAuditLogsResponseAuditLogsList>;
|
|
913
778
|
export interface ListOrganizationAuditLogsResponsePagination {
|
|
914
779
|
/** The current page number. */
|
|
915
780
|
page?: number;
|
|
@@ -920,20 +785,16 @@ export interface ListOrganizationAuditLogsResponsePagination {
|
|
|
920
785
|
/** The total number of items. */
|
|
921
786
|
total_rows?: number;
|
|
922
787
|
}
|
|
923
|
-
export declare const ListOrganizationAuditLogsResponsePagination: S.Schema<ListOrganizationAuditLogsResponsePagination>;
|
|
924
788
|
export interface ListOrganizationAuditLogsResponse {
|
|
925
789
|
audit_logs?: ListOrganizationAuditLogsResponseAuditLogsList;
|
|
926
790
|
pagination?: ListOrganizationAuditLogsResponsePagination;
|
|
927
791
|
}
|
|
928
|
-
export declare const ListOrganizationAuditLogsResponse: S.Schema<ListOrganizationAuditLogsResponse>;
|
|
929
792
|
export interface ListOrganizationInvitesV2Request {
|
|
930
793
|
/** The slug of the organization or user account. */
|
|
931
794
|
organizationSlug: string;
|
|
932
795
|
}
|
|
933
|
-
export declare const ListOrganizationInvitesV2Request: S.Schema<ListOrganizationInvitesV2Request>;
|
|
934
796
|
/** The assigned role for the invited user. */
|
|
935
797
|
export type InviteV2Role = "admin" | "member" | "viewer";
|
|
936
|
-
export declare const InviteV2Role: any;
|
|
937
798
|
export interface InviteV2 {
|
|
938
799
|
/** The unique ID for the invite. */
|
|
939
800
|
id?: number;
|
|
@@ -944,22 +805,17 @@ export interface InviteV2 {
|
|
|
944
805
|
/** The datetime the invite was created in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */
|
|
945
806
|
created_at?: string;
|
|
946
807
|
}
|
|
947
|
-
export declare const InviteV2: S.Schema<InviteV2>;
|
|
948
808
|
export type ListOrganizationInvitesV2ResponseInvitesList = Array<InviteV2>;
|
|
949
|
-
export declare const ListOrganizationInvitesV2ResponseInvitesList: S.Schema<ListOrganizationInvitesV2ResponseInvitesList>;
|
|
950
809
|
export interface ListOrganizationInvitesV2Response {
|
|
951
810
|
invites?: ListOrganizationInvitesV2ResponseInvitesList;
|
|
952
811
|
}
|
|
953
|
-
export declare const ListOrganizationInvitesV2Response: S.Schema<ListOrganizationInvitesV2Response>;
|
|
954
812
|
export type ListOrganizationInvoicesRequestType = "all" | "upcoming" | "issued";
|
|
955
|
-
export declare const ListOrganizationInvoicesRequestType: any;
|
|
956
813
|
export interface ListOrganizationInvoicesRequest {
|
|
957
814
|
/** The slug of the organization or user account. */
|
|
958
815
|
organizationSlug: string;
|
|
959
816
|
/** The type of invoice to retrieve. */
|
|
960
817
|
type?: ListOrganizationInvoicesRequestType | (string & {});
|
|
961
818
|
}
|
|
962
|
-
export declare const ListOrganizationInvoicesRequest: S.Schema<ListOrganizationInvoicesRequest>;
|
|
963
819
|
export interface ListOrganizationInvoicesResponseInvoicesItem {
|
|
964
820
|
/** The unique ID for the invoice. */
|
|
965
821
|
invoice_number?: string;
|
|
@@ -974,40 +830,31 @@ export interface ListOrganizationInvoicesResponseInvoicesItem {
|
|
|
974
830
|
/** The link to the invoice PDF you can download. */
|
|
975
831
|
invoice_pdf?: string;
|
|
976
832
|
}
|
|
977
|
-
export declare const ListOrganizationInvoicesResponseInvoicesItem: S.Schema<ListOrganizationInvoicesResponseInvoicesItem>;
|
|
978
833
|
/** The list of invoices for the organization. */
|
|
979
834
|
export type ListOrganizationInvoicesResponseInvoicesList = Array<ListOrganizationInvoicesResponseInvoicesItem>;
|
|
980
|
-
export declare const ListOrganizationInvoicesResponseInvoicesList: S.Schema<ListOrganizationInvoicesResponseInvoicesList>;
|
|
981
835
|
export interface ListOrganizationInvoicesResponse {
|
|
982
836
|
/** The list of invoices for the organization. */
|
|
983
837
|
invoices?: ListOrganizationInvoicesResponseInvoicesList;
|
|
984
838
|
}
|
|
985
|
-
export declare const ListOrganizationInvoicesResponse: S.Schema<ListOrganizationInvoicesResponse>;
|
|
986
839
|
export interface ListOrganizationMembersRequest {
|
|
987
840
|
/** The slug of the organization or user account. */
|
|
988
841
|
organizationSlug: string;
|
|
989
842
|
}
|
|
990
|
-
export declare const ListOrganizationMembersRequest: S.Schema<ListOrganizationMembersRequest>;
|
|
991
843
|
export type ListOrganizationMembersResponseMembersList = Array<Member>;
|
|
992
|
-
export declare const ListOrganizationMembersResponseMembersList: S.Schema<ListOrganizationMembersResponseMembersList>;
|
|
993
844
|
export interface ListOrganizationMembersResponse {
|
|
994
845
|
members?: ListOrganizationMembersResponseMembersList;
|
|
995
846
|
}
|
|
996
|
-
export declare const ListOrganizationMembersResponse: S.Schema<ListOrganizationMembersResponse>;
|
|
997
847
|
export interface ListOrganizationPlansRequest {
|
|
998
848
|
/** The slug of the organization or user account. */
|
|
999
849
|
organizationSlug: string;
|
|
1000
850
|
}
|
|
1001
|
-
export declare const ListOrganizationPlansRequest: S.Schema<ListOrganizationPlansRequest>;
|
|
1002
851
|
export interface PlanPrice {
|
|
1003
852
|
/** Price of the available plan. */
|
|
1004
853
|
value?: string;
|
|
1005
854
|
/** Payment regularity. */
|
|
1006
855
|
timeline?: string;
|
|
1007
856
|
}
|
|
1008
|
-
export declare const PlanPrice: S.Schema<PlanPrice>;
|
|
1009
857
|
export type OrganizationPlanPricesList = Array<PlanPrice>;
|
|
1010
|
-
export declare const OrganizationPlanPricesList: S.Schema<OrganizationPlanPricesList>;
|
|
1011
858
|
export interface PlanQuotas {
|
|
1012
859
|
/** The number of rows read allowed for the specific plan. */
|
|
1013
860
|
rowsRead?: number;
|
|
@@ -1024,7 +871,6 @@ export interface PlanQuotas {
|
|
|
1024
871
|
/** The number of bytes synced allowed for the specific plan, in bytes. */
|
|
1025
872
|
bytesSynced?: number;
|
|
1026
873
|
}
|
|
1027
|
-
export declare const PlanQuotas: S.Schema<PlanQuotas>;
|
|
1028
874
|
export interface OrganizationPlan {
|
|
1029
875
|
/** The name of the plan. */
|
|
1030
876
|
name?: string;
|
|
@@ -1033,22 +879,16 @@ export interface OrganizationPlan {
|
|
|
1033
879
|
prices?: OrganizationPlanPricesList;
|
|
1034
880
|
quotas?: PlanQuotas;
|
|
1035
881
|
}
|
|
1036
|
-
export declare const OrganizationPlan: S.Schema<OrganizationPlan>;
|
|
1037
882
|
/** List of available plans. */
|
|
1038
883
|
export type ListOrganizationPlansResponsePlansList = Array<OrganizationPlan>;
|
|
1039
|
-
export declare const ListOrganizationPlansResponsePlansList: S.Schema<ListOrganizationPlansResponsePlansList>;
|
|
1040
884
|
export interface ListOrganizationPlansResponse {
|
|
1041
885
|
/** List of available plans. */
|
|
1042
886
|
plans?: ListOrganizationPlansResponsePlansList;
|
|
1043
887
|
}
|
|
1044
|
-
export declare const ListOrganizationPlansResponse: S.Schema<ListOrganizationPlansResponse>;
|
|
1045
888
|
export interface ListOrganizationsRequest {
|
|
1046
889
|
}
|
|
1047
|
-
export declare const ListOrganizationsRequest: S.Schema<ListOrganizationsRequest>;
|
|
1048
890
|
export type ListOrganizationsResponseBodyList = Array<Organization>;
|
|
1049
|
-
export declare const ListOrganizationsResponseBodyList: S.Schema<ListOrganizationsResponseBodyList>;
|
|
1050
891
|
export type ListOrganizationsResponse = ListOrganizationsResponseBodyList;
|
|
1051
|
-
export declare const ListOrganizationsResponse: S.Schema<ListOrganizationsResponse>;
|
|
1052
892
|
export interface RemoveLocationFromGroupRequest {
|
|
1053
893
|
/** The slug of the organization or user account. */
|
|
1054
894
|
organizationSlug: string;
|
|
@@ -1057,23 +897,19 @@ export interface RemoveLocationFromGroupRequest {
|
|
|
1057
897
|
/** The location code to remove from the group. */
|
|
1058
898
|
location: string;
|
|
1059
899
|
}
|
|
1060
|
-
export declare const RemoveLocationFromGroupRequest: S.Schema<RemoveLocationFromGroupRequest>;
|
|
1061
900
|
export interface RemoveLocationFromGroupResponse {
|
|
1062
901
|
/** The group with the removed location */
|
|
1063
902
|
group?: Group;
|
|
1064
903
|
}
|
|
1065
|
-
export declare const RemoveLocationFromGroupResponse: S.Schema<RemoveLocationFromGroupResponse>;
|
|
1066
904
|
export interface RemoveOrganizationMemberRequest {
|
|
1067
905
|
/** The slug of the organization or user account. */
|
|
1068
906
|
organizationSlug: string;
|
|
1069
907
|
/** The username of a Turso user or organization member. */
|
|
1070
908
|
username: string;
|
|
1071
909
|
}
|
|
1072
|
-
export declare const RemoveOrganizationMemberRequest: S.Schema<RemoveOrganizationMemberRequest>;
|
|
1073
910
|
export interface RemoveOrganizationMemberResponse {
|
|
1074
911
|
member?: string;
|
|
1075
912
|
}
|
|
1076
|
-
export declare const RemoveOrganizationMemberResponse: S.Schema<RemoveOrganizationMemberResponse>;
|
|
1077
913
|
export interface RestoreDatabaseRequest {
|
|
1078
914
|
/** The UUID of the organization. Retrieve it with the Retrieve Organization endpoint (the `id` field). */
|
|
1079
915
|
organizationId: string;
|
|
@@ -1082,27 +918,22 @@ export interface RestoreDatabaseRequest {
|
|
|
1082
918
|
/** Optional new name for the restored database. If omitted, the original name is reused. The hostname is re-derived from the name. */
|
|
1083
919
|
name?: string;
|
|
1084
920
|
}
|
|
1085
|
-
export declare const RestoreDatabaseRequest: S.Schema<RestoreDatabaseRequest>;
|
|
1086
921
|
export interface RestoreDatabaseResponse {
|
|
1087
922
|
/** The restored database. */
|
|
1088
923
|
database?: DeletedDatabase;
|
|
1089
924
|
}
|
|
1090
|
-
export declare const RestoreDatabaseResponse: S.Schema<RestoreDatabaseResponse>;
|
|
1091
925
|
export interface RestoreGroupRequest {
|
|
1092
926
|
/** The UUID of the organization. Retrieve it with the Retrieve Organization endpoint (the `id` field). */
|
|
1093
927
|
organizationId: string;
|
|
1094
928
|
/** The UUID of the group, as returned when listing deleted groups (the `uuid` field). */
|
|
1095
929
|
groupId: string;
|
|
1096
930
|
}
|
|
1097
|
-
export declare const RestoreGroupRequest: S.Schema<RestoreGroupRequest>;
|
|
1098
931
|
/** The member databases restored with the group, in restore order. */
|
|
1099
932
|
export type RestoreGroupResponseDatabasesList = Array<DeletedDatabase>;
|
|
1100
|
-
export declare const RestoreGroupResponseDatabasesList: S.Schema<RestoreGroupResponseDatabasesList>;
|
|
1101
933
|
/** Maps database UUID to error message for members whose restore failed. Retry them individually with Restore Database. */
|
|
1102
934
|
export type RestoreGroupResponseFailuresMap = {
|
|
1103
935
|
[key: string]: string | undefined;
|
|
1104
936
|
};
|
|
1105
|
-
export declare const RestoreGroupResponseFailuresMap: S.Schema<RestoreGroupResponseFailuresMap>;
|
|
1106
937
|
export interface RestoreGroupResponse {
|
|
1107
938
|
/** The restored group. */
|
|
1108
939
|
group?: Group;
|
|
@@ -1111,29 +942,24 @@ export interface RestoreGroupResponse {
|
|
|
1111
942
|
/** Maps database UUID to error message for members whose restore failed. Retry them individually with Restore Database. */
|
|
1112
943
|
failures?: RestoreGroupResponseFailuresMap;
|
|
1113
944
|
}
|
|
1114
|
-
export declare const RestoreGroupResponse: S.Schema<RestoreGroupResponse>;
|
|
1115
945
|
export interface RevokeAPITokenRequest {
|
|
1116
946
|
/** The name of the api token. */
|
|
1117
947
|
tokenName: string;
|
|
1118
948
|
}
|
|
1119
|
-
export declare const RevokeAPITokenRequest: S.Schema<RevokeAPITokenRequest>;
|
|
1120
949
|
export interface RevokeAPITokenResponse {
|
|
1121
950
|
/** The revoked token name. */
|
|
1122
951
|
token?: string;
|
|
1123
952
|
}
|
|
1124
|
-
export declare const RevokeAPITokenResponse: S.Schema<RevokeAPITokenResponse>;
|
|
1125
953
|
export interface RevokeOrganizationAPITokenRequest {
|
|
1126
954
|
/** The slug of the organization or user account. */
|
|
1127
955
|
organizationSlug: string;
|
|
1128
956
|
/** The ID of the token to revoke (from the list endpoint). */
|
|
1129
957
|
tokenId: string;
|
|
1130
958
|
}
|
|
1131
|
-
export declare const RevokeOrganizationAPITokenRequest: S.Schema<RevokeOrganizationAPITokenRequest>;
|
|
1132
959
|
export interface RevokeOrganizationAPITokenResponse {
|
|
1133
960
|
/** The ID of the revoked token. */
|
|
1134
961
|
token?: string;
|
|
1135
962
|
}
|
|
1136
|
-
export declare const RevokeOrganizationAPITokenResponse: S.Schema<RevokeOrganizationAPITokenResponse>;
|
|
1137
963
|
export interface TransferGroupRequest {
|
|
1138
964
|
/** The slug of the organization or user account. */
|
|
1139
965
|
organizationSlug: string;
|
|
@@ -1142,10 +968,8 @@ export interface TransferGroupRequest {
|
|
|
1142
968
|
/** The slug of the organization to transfer the group to. */
|
|
1143
969
|
organization?: string;
|
|
1144
970
|
}
|
|
1145
|
-
export declare const TransferGroupRequest: S.Schema<TransferGroupRequest>;
|
|
1146
971
|
/** An array of location keys the group is located. */
|
|
1147
972
|
export type TransferGroupResponseLocationsList = Array<string>;
|
|
1148
|
-
export declare const TransferGroupResponseLocationsList: S.Schema<TransferGroupResponseLocationsList>;
|
|
1149
973
|
export interface TransferGroupResponse {
|
|
1150
974
|
/** The group name, unique across your organization. */
|
|
1151
975
|
name?: string;
|
|
@@ -1160,25 +984,20 @@ export interface TransferGroupResponse {
|
|
|
1160
984
|
/** The current status for delete protection. If enabled, the group and all its databases cannot be deleted. */
|
|
1161
985
|
delete_protection?: boolean;
|
|
1162
986
|
}
|
|
1163
|
-
export declare const TransferGroupResponse: S.Schema<TransferGroupResponse>;
|
|
1164
987
|
export interface UnarchiveGroupRequest {
|
|
1165
988
|
/** The slug of the organization or user account. */
|
|
1166
989
|
organizationSlug: string;
|
|
1167
990
|
/** The name of the group. */
|
|
1168
991
|
groupName: string;
|
|
1169
992
|
}
|
|
1170
|
-
export declare const UnarchiveGroupRequest: S.Schema<UnarchiveGroupRequest>;
|
|
1171
993
|
export interface UnarchiveGroupResponse {
|
|
1172
994
|
/** The group that was unarchived */
|
|
1173
995
|
group?: Group;
|
|
1174
996
|
}
|
|
1175
|
-
export declare const UnarchiveGroupResponse: S.Schema<UnarchiveGroupResponse>;
|
|
1176
997
|
/** List of allowed IP addresses and CIDR blocks. Only connections from these sources are accepted. Pass an empty array to clear the list. Omit to leave unchanged. */
|
|
1177
998
|
export type UpdateDatabaseConfigurationRequestAllowedIpsList = Array<string>;
|
|
1178
|
-
export declare const UpdateDatabaseConfigurationRequestAllowedIpsList: S.Schema<UpdateDatabaseConfigurationRequestAllowedIpsList>;
|
|
1179
999
|
/** List of allowed AWS VPC endpoint IDs (vpce-...). Only connections arriving through these endpoints are accepted. Pass an empty array to clear the list. Omit to leave unchanged. */
|
|
1180
1000
|
export type UpdateDatabaseConfigurationRequestAllowedAwsVpcIdsList = Array<string>;
|
|
1181
|
-
export declare const UpdateDatabaseConfigurationRequestAllowedAwsVpcIdsList: S.Schema<UpdateDatabaseConfigurationRequestAllowedAwsVpcIdsList>;
|
|
1182
1001
|
export interface UpdateDatabaseConfigurationRequest {
|
|
1183
1002
|
/** The slug of the organization or user account. */
|
|
1184
1003
|
organizationSlug: string;
|
|
@@ -1199,7 +1018,6 @@ export interface UpdateDatabaseConfigurationRequest {
|
|
|
1199
1018
|
/** List of allowed AWS VPC endpoint IDs (vpce-...). Only connections arriving through these endpoints are accepted. Pass an empty array to clear the list. Omit to leave unchanged. */
|
|
1200
1019
|
allowed_aws_vpc_ids?: UpdateDatabaseConfigurationRequestAllowedAwsVpcIdsList;
|
|
1201
1020
|
}
|
|
1202
|
-
export declare const UpdateDatabaseConfigurationRequest: S.Schema<UpdateDatabaseConfigurationRequest>;
|
|
1203
1021
|
export interface UpdateGroupConfigurationRequest {
|
|
1204
1022
|
/** The slug of the organization or user account. */
|
|
1205
1023
|
organizationSlug: string;
|
|
@@ -1208,20 +1026,16 @@ export interface UpdateGroupConfigurationRequest {
|
|
|
1208
1026
|
/** Prevent the group from being deleted. */
|
|
1209
1027
|
delete_protection?: boolean;
|
|
1210
1028
|
}
|
|
1211
|
-
export declare const UpdateGroupConfigurationRequest: S.Schema<UpdateGroupConfigurationRequest>;
|
|
1212
1029
|
export interface UpdateGroupDatabasesRequest {
|
|
1213
1030
|
/** The slug of the organization or user account. */
|
|
1214
1031
|
organizationSlug: string;
|
|
1215
1032
|
/** The name of the group. */
|
|
1216
1033
|
groupName: string;
|
|
1217
1034
|
}
|
|
1218
|
-
export declare const UpdateGroupDatabasesRequest: S.Schema<UpdateGroupDatabasesRequest>;
|
|
1219
1035
|
export interface UpdateGroupDatabasesResponse {
|
|
1220
1036
|
}
|
|
1221
|
-
export declare const UpdateGroupDatabasesResponse: S.Schema<UpdateGroupDatabasesResponse>;
|
|
1222
1037
|
/** The new role to assign to the member. */
|
|
1223
1038
|
export type UpdateMemberRoleRequestRole = "admin" | "member" | "viewer";
|
|
1224
|
-
export declare const UpdateMemberRoleRequestRole: any;
|
|
1225
1039
|
export interface UpdateMemberRoleRequest {
|
|
1226
1040
|
/** The slug of the organization or user account. */
|
|
1227
1041
|
organizationSlug: string;
|
|
@@ -1230,10 +1044,8 @@ export interface UpdateMemberRoleRequest {
|
|
|
1230
1044
|
/** The new role to assign to the member. */
|
|
1231
1045
|
role: UpdateMemberRoleRequestRole | (string & {});
|
|
1232
1046
|
}
|
|
1233
|
-
export declare const UpdateMemberRoleRequest: S.Schema<UpdateMemberRoleRequest>;
|
|
1234
1047
|
/** The new role of the updated member. */
|
|
1235
1048
|
export type UpdateMemberRoleResponseMemberRole = "admin" | "member" | "viewer";
|
|
1236
|
-
export declare const UpdateMemberRoleResponseMemberRole: any;
|
|
1237
1049
|
export interface UpdateMemberRoleResponseMember {
|
|
1238
1050
|
/** The username of the updated member. */
|
|
1239
1051
|
username?: string;
|
|
@@ -1242,11 +1054,9 @@ export interface UpdateMemberRoleResponseMember {
|
|
|
1242
1054
|
/** The new role of the updated member. */
|
|
1243
1055
|
role?: UpdateMemberRoleResponseMemberRole;
|
|
1244
1056
|
}
|
|
1245
|
-
export declare const UpdateMemberRoleResponseMember: S.Schema<UpdateMemberRoleResponseMember>;
|
|
1246
1057
|
export interface UpdateMemberRoleResponse {
|
|
1247
1058
|
member?: UpdateMemberRoleResponseMember;
|
|
1248
1059
|
}
|
|
1249
|
-
export declare const UpdateMemberRoleResponse: S.Schema<UpdateMemberRoleResponse>;
|
|
1250
1060
|
export interface UpdateOrganizationRequest {
|
|
1251
1061
|
/** The slug of the organization or user account. */
|
|
1252
1062
|
organizationSlug: string;
|
|
@@ -1257,20 +1067,16 @@ export interface UpdateOrganizationRequest {
|
|
|
1257
1067
|
/** Enable or disable deleted database and group recovery for the organization. Must be updated separately from other organization settings. Requires an admin or owner. */
|
|
1258
1068
|
restore_enabled?: boolean;
|
|
1259
1069
|
}
|
|
1260
|
-
export declare const UpdateOrganizationRequest: S.Schema<UpdateOrganizationRequest>;
|
|
1261
1070
|
export interface UpdateOrganizationResponse {
|
|
1262
1071
|
/** The updated organization. */
|
|
1263
1072
|
organization?: Organization;
|
|
1264
1073
|
}
|
|
1265
|
-
export declare const UpdateOrganizationResponse: S.Schema<UpdateOrganizationResponse>;
|
|
1266
1074
|
export interface ValidateAPITokenRequest {
|
|
1267
1075
|
}
|
|
1268
|
-
export declare const ValidateAPITokenRequest: S.Schema<ValidateAPITokenRequest>;
|
|
1269
1076
|
export interface ValidateAPITokenResponse {
|
|
1270
1077
|
/** The time of expiration for the provided token in unix epoch seconds, or `-1` if there is no expiration. */
|
|
1271
1078
|
exp?: number;
|
|
1272
1079
|
}
|
|
1273
|
-
export declare const ValidateAPITokenResponse: S.Schema<ValidateAPITokenResponse>;
|
|
1274
1080
|
export type AddLocationToGroupError = BadRequest | NotFound | TursoOpError;
|
|
1275
1081
|
/** Add Location to Group Adds a location to the specified group. */
|
|
1276
1082
|
export declare const addLocationToGroup: API.OperationMethod<AddLocationToGroupRequest, AddLocationToGroupResponse, AddLocationToGroupError, TursoOpContext>;
|
|
@@ -1278,7 +1084,7 @@ export type AddOrganizationMemberError = BadRequest | NotFound | Conflict | Turs
|
|
|
1278
1084
|
/** Add Member Add an existing Turso user to an organization. */
|
|
1279
1085
|
export declare const addOrganizationMember: API.OperationMethod<AddOrganizationMemberRequest, AddOrganizationMemberResponse, AddOrganizationMemberError, TursoOpContext>;
|
|
1280
1086
|
export type CreateAPITokenError = BadRequest | NotFound | Conflict | TursoOpError;
|
|
1281
|
-
/** Create API Token Returns a new API token belonging to a user. The token can be minted at three levels of restriction, in increasing order of narrowness: - **Organization-scoped**
|
|
1087
|
+
/** Create API Token Returns a new API token belonging to a user. The token can be minted at three levels of restriction, in increasing order of narrowness: - **Organization-scoped** -- pass `organization`. The token can only act on resources inside that organization. - **Group-scoped** -- pass `organization`, `group`, and `scopes`. The token is pinned to a single group inside the organization and only the operations listed in `scopes` are allowed. The caller must be an admin or owner of the organization. - **Unrestricted** *(deprecated)* -- no request body. The token can act on every organization the caller belongs to. **Unrestricted tokens are deprecated and will be removed in a future release.** Always pass `organization` for new tokens and rotate existing unrestricted tokens to scoped tokens. Group-scoped tokens are designed for automations that should be able to provision and manage databases inside a single group without being able to touch the rest of the organization. */
|
|
1282
1088
|
export declare const createAPIToken: API.OperationMethod<CreateAPITokenRequest, CreateAPITokenResponse, CreateAPITokenError, TursoOpContext>;
|
|
1283
1089
|
export type CreateDatabaseError = BadRequest | Conflict | TursoOpError;
|
|
1284
1090
|
/** Create Database Creates a new database in a group for the organization or user. */
|
|
@@ -1368,7 +1174,7 @@ export type ListLocationsError = TursoOpError;
|
|
|
1368
1174
|
/** List Locations Returns a list of locations where you can create or replicate databases. */
|
|
1369
1175
|
export declare const listLocations: API.OperationMethod<ListLocationsRequest, ListLocationsResponse, ListLocationsError, TursoOpContext>;
|
|
1370
1176
|
export type ListOrganizationAPITokensError = TursoOpError;
|
|
1371
|
-
/** List Organization API Tokens Returns the API tokens scoped to this organization (both organization-scoped and group-scoped). Unrestricted tokens are not returned here
|
|
1177
|
+
/** List Organization API Tokens Returns the API tokens scoped to this organization (both organization-scoped and group-scoped). Unrestricted tokens are not returned here -- manage those via [`GET /v1/auth/api-tokens`](/api-reference/tokens/list). Authorization is symmetric with the revoke endpoint: - **Admins and owners** see every token scoped to the organization, with the minting user attached in the `owner` field. - **Members and viewers** see only tokens they minted themselves. This mirrors the personal-access-token model used in GitHub organization settings: admins get the full attribution list; everyone else sees their own access. */
|
|
1372
1178
|
export declare const listOrganizationAPITokens: API.OperationMethod<ListOrganizationAPITokensRequest, ListOrganizationAPITokensResponse, ListOrganizationAPITokensError, TursoOpContext>;
|
|
1373
1179
|
export type ListOrganizationAuditLogsError = TursoOpError;
|
|
1374
1180
|
/** List Audit Logs Return the audit logs for the given organization, ordered by the `created_at` field in descending order. */
|
|
@@ -1404,7 +1210,7 @@ export type RevokeAPITokenError = NotFound | TursoOpError;
|
|
|
1404
1210
|
/** Revoke API Token Revokes the provided API token belonging to a user. */
|
|
1405
1211
|
export declare const revokeAPIToken: API.OperationMethod<RevokeAPITokenRequest, RevokeAPITokenResponse, RevokeAPITokenError, TursoOpContext>;
|
|
1406
1212
|
export type RevokeOrganizationAPITokenError = NotFound | TursoOpError;
|
|
1407
|
-
/** Revoke Organization API Token Revokes a token scoped to this organization. The path takes a token **ID**, not a name, because names are unique per user but not across users
|
|
1213
|
+
/** Revoke Organization API Token Revokes a token scoped to this organization. The path takes a token **ID**, not a name, because names are unique per user but not across users -- an admin revoking a member's token can't disambiguate by name alone. Authorization is symmetric with the list endpoint: - **Admins and owners** can revoke any token scoped to the organization (org-scoped or group-scoped, regardless of who minted it). - **Members and viewers** can revoke only tokens they minted themselves. A token scoped to a different organization returns `404`, not `403`, so the endpoint does not leak the existence of cross-org token IDs. Unrestricted tokens are also unreachable here and must be revoked via [`DELETE /v1/auth/api-tokens/{tokenName}`](/api-reference/tokens/revoke). */
|
|
1408
1214
|
export declare const revokeOrganizationAPIToken: API.OperationMethod<RevokeOrganizationAPITokenRequest, RevokeOrganizationAPITokenResponse, RevokeOrganizationAPITokenError, TursoOpContext>;
|
|
1409
1215
|
export type TransferGroupError = NotFound | TursoOpError;
|
|
1410
1216
|
/** Transfer Group Transfer a group to another organization that you own or a member of. */
|