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