@distilled.cloud/turso 1.0.0-rc.17 → 1.0.0-rc.19

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.
@@ -55,21 +55,21 @@ export interface AddLocationToGroupRequest {
55
55
  export type GroupLocationsList = Array<string>;
56
56
  export interface Group {
57
57
  /** The group name, unique across your organization. */
58
- name?: string;
58
+ name?: string | undefined;
59
59
  /** The current libSQL server version the databases in that group are running. */
60
- version?: string;
60
+ version?: string | undefined;
61
61
  /** The group universal unique identifier (UUID). */
62
- uuid?: string;
62
+ uuid?: string | undefined;
63
63
  /** An array of location keys the group is located. */
64
- locations?: GroupLocationsList;
64
+ locations?: GroupLocationsList | undefined;
65
65
  /** The primary location key. */
66
- primary?: string;
66
+ primary?: string | undefined;
67
67
  /** The current status for delete protection. If enabled, the group and all its databases cannot be deleted. */
68
- delete_protection?: boolean;
68
+ delete_protection?: boolean | undefined;
69
69
  }
70
70
  export interface AddLocationToGroupResponse {
71
71
  /** The group with the added location */
72
- group?: Group;
72
+ group?: Group | undefined;
73
73
  }
74
74
  /** The role given to the user. */
75
75
  export type AddOrganizationMemberRequestRole = "admin" | "member" | "viewer";
@@ -77,53 +77,53 @@ export interface AddOrganizationMemberRequest {
77
77
  /** The slug of the organization or user account. */
78
78
  organizationSlug: string;
79
79
  /** The username of an existing Turso user. */
80
- username?: string;
80
+ username?: string | undefined;
81
81
  /** The role given to the user. */
82
- role?: AddOrganizationMemberRequestRole | (string & {});
82
+ role?: AddOrganizationMemberRequestRole | (string & {}) | undefined;
83
83
  }
84
84
  /** The role assigned to the member. */
85
85
  export type Role = "owner" | "admin" | "member" | "viewer";
86
86
  export interface AddOrganizationMemberResponse {
87
- member?: string;
88
- role?: Role;
87
+ member?: string | undefined;
88
+ role?: Role | undefined;
89
89
  }
90
- export type CreateAPITokenRequestScopesItem = "read" | "db:create" | "db:delete" | "db:configure" | "db:mint-token" | "db:rotate-creds" | "group:configure" | "group:mint-token" | "group:rotate-creds" | "read-only" | "full-access";
91
- /** Permissions to grant a group-scoped token. Each entry is either an individual scope or one of the presets `read-only` (expands to `read`) and `full-access` (expands to every scope). Required and must be non-empty when `group` is set. `db:mint-token` lets the token issue new SQL credentials; `db:rotate-creds` invalidates every existing SQL token for the database -- they are deliberately separate because rotation is destructive. */
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. */
92
92
  export type CreateAPITokenRequestScopesList = Array<CreateAPITokenRequestScopesItem | (string & {})>;
93
93
  export interface CreateAPITokenRequest {
94
94
  /** The name of the api token. */
95
95
  tokenName: string;
96
96
  /** The organization slug to restrict this token to. Required when `group` is set. */
97
- organization?: string;
97
+ organization?: string | undefined;
98
98
  /** The group name (inside `organization`) to restrict this token to. Requires `organization` and a non-empty `scopes` list. */
99
- group?: string;
100
- /** Permissions to grant a group-scoped token. Each entry is either an individual scope or one of the presets `read-only` (expands to `read`) and `full-access` (expands to every scope). Required and must be non-empty when `group` is set. `db:mint-token` lets the token issue new SQL credentials; `db:rotate-creds` invalidates every existing SQL token for the database -- they are deliberately separate because rotation is destructive. */
101
- 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;
102
102
  }
103
103
  export interface CreateAPITokenResponse {
104
- name?: string;
105
- id?: string;
104
+ name?: string | undefined;
105
+ id?: string | undefined;
106
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.** */
107
- token?: Redacted.Redacted<string>;
107
+ token?: Redacted.Redacted<string> | undefined;
108
108
  }
109
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). */
110
110
  export type CreateDatabaseRequestSeedType = "database" | "database_upload";
111
111
  export interface CreateDatabaseRequestSeed {
112
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). */
113
- type?: CreateDatabaseRequestSeedType | (string & {});
113
+ type?: CreateDatabaseRequestSeedType | (string & {}) | undefined;
114
114
  /** The name of the existing database when `database` is used as a seed type. */
115
- name?: string;
115
+ name?: string | undefined;
116
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. */
117
- timestamp?: string;
117
+ timestamp?: string | undefined;
118
118
  }
119
119
  /** The encryption cipher to use. */
120
120
  export type CreateDatabaseRequestRemoteEncryptionEncryptionCipher = "aes256gcm" | "aes128gcm" | "chacha20poly1305" | "aegis128l" | "aegis128x2" | "aegis128x4" | "aegis256" | "aegis256x2" | "aegis256x4";
121
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). */
122
122
  export interface CreateDatabaseRequestRemoteEncryption {
123
123
  /** Base64-encoded encryption key. Key size depends on cipher: 32 bytes for aes256gcm, chacha20poly1305, aegis256 variants; 16 bytes for aes128gcm, aegis128l variants. */
124
- encryption_key?: string;
124
+ encryption_key?: string | undefined;
125
125
  /** The encryption cipher to use. */
126
- encryption_cipher?: CreateDatabaseRequestRemoteEncryptionEncryptionCipher | (string & {});
126
+ encryption_cipher?: CreateDatabaseRequestRemoteEncryptionEncryptionCipher | (string & {}) | undefined;
127
127
  }
128
128
  export interface CreateDatabaseRequest {
129
129
  /** The slug of the organization or user account. */
@@ -132,31 +132,31 @@ export interface CreateDatabaseRequest {
132
132
  name: string;
133
133
  /** The name of the group where the database should be created. **The group must already exist.** */
134
134
  group: string;
135
- seed?: CreateDatabaseRequestSeed;
135
+ seed?: CreateDatabaseRequestSeed | undefined;
136
136
  /** The maximum size of the database in bytes. Values with units are also accepted, e.g. 1mb, 256mb, 1gb. */
137
- size_limit?: string;
137
+ size_limit?: string | undefined;
138
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). */
139
- remote_encryption?: CreateDatabaseRequestRemoteEncryption;
139
+ remote_encryption?: CreateDatabaseRequestRemoteEncryption | undefined;
140
140
  }
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
146
  export interface CreateDatabaseResponse {
147
147
  /** The newly created database */
148
- database?: CreateDatabaseOutput;
148
+ database?: CreateDatabaseOutput | undefined;
149
149
  }
150
150
  export type CreateDatabaseTokenRequestAuthorization = "full-access" | "read-only";
151
151
  export type CreateDatabaseTokenRequestPermissionsReadAttachDatabasesList = Array<string>;
152
152
  /** Read `ATTACH` permission for the token. */
153
153
  export interface CreateDatabaseTokenRequestPermissionsReadAttach {
154
- databases?: CreateDatabaseTokenRequestPermissionsReadAttachDatabasesList;
154
+ databases?: CreateDatabaseTokenRequestPermissionsReadAttachDatabasesList | undefined;
155
155
  }
156
156
  /** The permissions for the token. */
157
157
  export interface CreateDatabaseTokenRequestPermissions {
158
158
  /** Read `ATTACH` permission for the token. */
159
- read_attach?: CreateDatabaseTokenRequestPermissionsReadAttach;
159
+ read_attach?: CreateDatabaseTokenRequestPermissionsReadAttach | undefined;
160
160
  }
161
161
  export interface CreateDatabaseTokenRequest {
162
162
  /** The slug of the organization or user account. */
@@ -164,15 +164,15 @@ export interface CreateDatabaseTokenRequest {
164
164
  /** The name of the database. */
165
165
  databaseName: string;
166
166
  /** Expiration time for the token (e.g., 2w1d30m). */
167
- expiration?: string;
167
+ expiration?: string | undefined;
168
168
  /** Authorization level for the token (full-access or read-only). */
169
- authorization?: CreateDatabaseTokenRequestAuthorization | (string & {});
169
+ authorization?: CreateDatabaseTokenRequestAuthorization | (string & {}) | undefined;
170
170
  /** The permissions for the token. */
171
- permissions?: CreateDatabaseTokenRequestPermissions;
171
+ permissions?: CreateDatabaseTokenRequestPermissions | undefined;
172
172
  }
173
173
  export interface CreateDatabaseTokenResponse {
174
174
  /** The generated authorization token (JWT). */
175
- jwt?: Redacted.Redacted<string>;
175
+ jwt?: Redacted.Redacted<string> | undefined;
176
176
  }
177
177
  /** Set to `all` to enable all extensions. */
178
178
  export type ExtensionsCase0 = "all";
@@ -188,22 +188,22 @@ export interface CreateGroupRequest {
188
188
  name: string;
189
189
  /** The location key for the new group. */
190
190
  location: string;
191
- extensions?: Extensions;
191
+ extensions?: Extensions | undefined;
192
192
  }
193
193
  export interface CreateGroupResponse {
194
194
  /** The newly created group */
195
- group?: Group;
195
+ group?: Group | undefined;
196
196
  }
197
197
  export type CreateGroupTokenRequestAuthorization = "full-access" | "read-only";
198
198
  export type CreateGroupTokenRequestPermissionsReadAttachDatabasesList = Array<string>;
199
199
  /** Read `ATTACH` permission for the token. */
200
200
  export interface CreateGroupTokenRequestPermissionsReadAttach {
201
- databases?: CreateGroupTokenRequestPermissionsReadAttachDatabasesList;
201
+ databases?: CreateGroupTokenRequestPermissionsReadAttachDatabasesList | undefined;
202
202
  }
203
203
  /** The permissions for the token. */
204
204
  export interface CreateGroupTokenRequestPermissions {
205
205
  /** Read `ATTACH` permission for the token. */
206
- read_attach?: CreateGroupTokenRequestPermissionsReadAttach;
206
+ read_attach?: CreateGroupTokenRequestPermissionsReadAttach | undefined;
207
207
  }
208
208
  export interface CreateGroupTokenRequest {
209
209
  /** The slug of the organization or user account. */
@@ -211,15 +211,15 @@ export interface CreateGroupTokenRequest {
211
211
  /** The name of the group. */
212
212
  groupName: string;
213
213
  /** Expiration time for the token (e.g., 2w1d30m). */
214
- expiration?: string;
214
+ expiration?: string | undefined;
215
215
  /** Authorization level for the token (full-access or read-only). */
216
- authorization?: CreateGroupTokenRequestAuthorization | (string & {});
216
+ authorization?: CreateGroupTokenRequestAuthorization | (string & {}) | undefined;
217
217
  /** The permissions for the token. */
218
- permissions?: CreateGroupTokenRequestPermissions;
218
+ permissions?: CreateGroupTokenRequestPermissions | undefined;
219
219
  }
220
220
  export interface CreateGroupTokenResponse {
221
221
  /** The generated authorization token (JWT). */
222
- jwt?: Redacted.Redacted<string>;
222
+ jwt?: Redacted.Redacted<string> | undefined;
223
223
  }
224
224
  export interface DeleteDatabaseRequest {
225
225
  /** The slug of the organization or user account. */
@@ -229,7 +229,7 @@ export interface DeleteDatabaseRequest {
229
229
  }
230
230
  export interface DeleteDatabaseResponse {
231
231
  /** The name of the database that was deleted. */
232
- database?: string;
232
+ database?: string | undefined;
233
233
  }
234
234
  export interface DeleteGroupRequest {
235
235
  /** The slug of the organization or user account. */
@@ -238,7 +238,7 @@ export interface DeleteGroupRequest {
238
238
  groupName: string;
239
239
  }
240
240
  export interface DeleteGroupResponse {
241
- group?: Group;
241
+ group?: Group | undefined;
242
242
  }
243
243
  export interface DeleteOrganizationInviteByEmailV2Request {
244
244
  /** The slug of the organization or user account. */
@@ -251,22 +251,22 @@ export interface GetCurrentUserRequest {
251
251
  }
252
252
  export interface GetCurrentUserResponseUser {
253
253
  /** The username of the user. */
254
- username?: string;
254
+ username?: string | undefined;
255
255
  /** The display name of the user. */
256
- name?: string;
256
+ name?: string | undefined;
257
257
  /** The primary email address of the user. */
258
- email?: string;
258
+ email?: string | undefined;
259
259
  /** URL to the user's avatar image. */
260
- avatarUrl?: string;
260
+ avatarUrl?: string | undefined;
261
261
  /** The user's current plan. */
262
- plan?: string;
262
+ plan?: string | undefined;
263
263
  /** Whether the user has multi-factor authentication enabled. */
264
- mfa?: boolean;
264
+ mfa?: boolean | undefined;
265
265
  /** Whether the user has pending organization invites waiting to be accepted or declined. */
266
- has_pending_invites?: boolean;
266
+ has_pending_invites?: boolean | undefined;
267
267
  }
268
268
  export interface GetCurrentUserResponse {
269
- user?: GetCurrentUserResponseUser;
269
+ user?: GetCurrentUserResponseUser | undefined;
270
270
  }
271
271
  export interface GetDatabaseRequest {
272
272
  /** The slug of the organization or user account. */
@@ -278,37 +278,37 @@ export interface GetDatabaseRequest {
278
278
  export type DatabaseRegionsList = Array<string>;
279
279
  export interface DatabaseParent {
280
280
  /** The parent database identifier. */
281
- id?: string;
281
+ id?: string | undefined;
282
282
  /** The name of the parent database. */
283
- name?: string;
283
+ name?: string | undefined;
284
284
  /** The timestamp when the database was branched from the parent. */
285
- branched_at?: string;
285
+ branched_at?: string | undefined;
286
286
  }
287
287
  export interface Database {
288
288
  /** The database name, **unique** across your organization. */
289
- Name?: string;
289
+ Name?: string | undefined;
290
290
  /** The database universal unique identifier (UUID). */
291
- DbId?: string;
291
+ DbId?: string | undefined;
292
292
  /** The DNS hostname used for client libSQL and HTTP connections. */
293
- Hostname?: string;
293
+ Hostname?: string | undefined;
294
294
  /** The current status for blocked reads. */
295
- block_reads?: boolean;
295
+ block_reads?: boolean | undefined;
296
296
  /** The current status for blocked writes. */
297
- block_writes?: boolean;
297
+ block_writes?: boolean | undefined;
298
298
  /** A list of regions for the group the database belongs to. */
299
- regions?: DatabaseRegionsList;
299
+ regions?: DatabaseRegionsList | undefined;
300
300
  /** The primary region location code the group the database belongs to. */
301
- primaryRegion?: string;
301
+ primaryRegion?: string | undefined;
302
302
  /** The name of the group the database belongs to. */
303
- group?: string;
303
+ group?: string | undefined;
304
304
  /** The current status for delete protection. If enabled, the database cannot be deleted. */
305
- delete_protection?: boolean;
306
- parent?: DatabaseParent | null;
305
+ delete_protection?: boolean | undefined;
306
+ parent?: DatabaseParent | null | undefined;
307
307
  /** Whether other databases may be attached to this database with `ATTACH`. */
308
- allow_attach?: boolean;
308
+ allow_attach?: boolean | undefined;
309
309
  }
310
310
  export interface GetDatabaseResponse {
311
- database?: Database;
311
+ database?: Database | undefined;
312
312
  }
313
313
  export interface GetDatabaseConfigurationRequest {
314
314
  /** The slug of the organization or user account. */
@@ -322,19 +322,19 @@ export type DatabaseConfigurationResponseAllowedIpsList = Array<string>;
322
322
  export type DatabaseConfigurationResponseAllowedAwsVpcIdsList = Array<string>;
323
323
  export interface DatabaseConfigurationResponse {
324
324
  /** The maximum size of the database in bytes. Values with units are also accepted, e.g. 1mb, 256mb, 1gb. */
325
- size_limit?: string;
325
+ size_limit?: string | undefined;
326
326
  /** Allow or disallow attaching databases to the current database. */
327
- allow_attach?: boolean;
327
+ allow_attach?: boolean | undefined;
328
328
  /** The current status for blocked reads. */
329
- block_reads?: boolean;
329
+ block_reads?: boolean | undefined;
330
330
  /** The current status for blocked writes. */
331
- block_writes?: boolean;
331
+ block_writes?: boolean | undefined;
332
332
  /** Prevent the database from being deleted. */
333
- delete_protection?: boolean;
333
+ delete_protection?: boolean | undefined;
334
334
  /** List of allowed IP addresses and CIDR blocks. Empty means no IP restriction. */
335
- allowed_ips?: DatabaseConfigurationResponseAllowedIpsList;
335
+ allowed_ips?: DatabaseConfigurationResponseAllowedIpsList | undefined;
336
336
  /** List of allowed AWS VPC endpoint IDs. Empty means no VPC endpoint restriction. */
337
- allowed_aws_vpc_ids?: DatabaseConfigurationResponseAllowedAwsVpcIdsList;
337
+ allowed_aws_vpc_ids?: DatabaseConfigurationResponseAllowedAwsVpcIdsList | undefined;
338
338
  }
339
339
  export interface GetDatabaseInstanceRequest {
340
340
  /** The slug of the organization or user account. */
@@ -348,18 +348,18 @@ export interface GetDatabaseInstanceRequest {
348
348
  export type InstanceType = "primary" | "replica";
349
349
  export interface Instance {
350
350
  /** The instance universal unique identifier (UUID). */
351
- uuid?: string;
351
+ uuid?: string | undefined;
352
352
  /** The name of the instance (location code). */
353
- name?: string;
353
+ name?: string | undefined;
354
354
  /** The type of database instance this, will be `primary` or `replica`. */
355
- type?: InstanceType;
355
+ type?: InstanceType | undefined;
356
356
  /** The location code for the region this instance is located. */
357
- region?: string;
357
+ region?: string | undefined;
358
358
  /** The DNS hostname used for client libSQL and HTTP connections (specific to this instance only). */
359
- hostname?: string;
359
+ hostname?: string | undefined;
360
360
  }
361
361
  export interface GetDatabaseInstanceResponse {
362
- instance?: Instance;
362
+ instance?: Instance | undefined;
363
363
  }
364
364
  export interface GetDatabaseStatsRequest {
365
365
  /** The slug of the organization or user account. */
@@ -369,17 +369,17 @@ export interface GetDatabaseStatsRequest {
369
369
  }
370
370
  export interface DatabaseStatsOutput {
371
371
  /** A string representing the SQL query executed. */
372
- query?: string;
372
+ query?: string | undefined;
373
373
  /** An integer indicating the number of rows read by the query, which reflects the volume of data the query processed from the database. */
374
- rows_read?: number;
374
+ rows_read?: number | undefined;
375
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. */
376
- rows_written?: number;
376
+ rows_written?: number | undefined;
377
377
  }
378
378
  /** The top queries performed on the given database as well as the total rows read and written. */
379
379
  export type GetDatabaseStatsResponseTopQueriesList = Array<DatabaseStatsOutput>;
380
380
  export interface GetDatabaseStatsResponse {
381
381
  /** The top queries performed on the given database as well as the total rows read and written. */
382
- top_queries?: GetDatabaseStatsResponseTopQueriesList | null;
382
+ top_queries?: GetDatabaseStatsResponseTopQueriesList | null | undefined;
383
383
  }
384
384
  export interface GetDatabaseUsageRequest {
385
385
  /** The slug of the organization or user account. */
@@ -387,38 +387,38 @@ export interface GetDatabaseUsageRequest {
387
387
  /** The name of the database. */
388
388
  databaseName: string;
389
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` */
390
- from?: string;
390
+ from?: string | undefined;
391
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` */
392
- to?: string;
392
+ to?: string | undefined;
393
393
  }
394
394
  export interface DatabaseUsageObject {
395
395
  /** The total rows read in the time period. */
396
- rows_read?: number;
396
+ rows_read?: number | undefined;
397
397
  /** The total rows written in the time period. */
398
- rows_written?: number;
398
+ rows_written?: number | undefined;
399
399
  /** The total storage used. */
400
- storage_bytes?: number;
400
+ storage_bytes?: number | undefined;
401
401
  /** The total bytes synced. */
402
- bytes_synced?: number;
402
+ bytes_synced?: number | undefined;
403
403
  }
404
404
  export interface DatabaseUsageOutputInstancesItem {
405
405
  /** The instance universal unique identifier (UUID). */
406
- uuid?: string;
406
+ uuid?: string | undefined;
407
407
  /** The usage for the current database instance. */
408
- usage?: DatabaseUsageObject;
408
+ usage?: DatabaseUsageObject | undefined;
409
409
  }
410
410
  /** The usage objects for instances of the current database. */
411
411
  export type DatabaseUsageOutputInstancesList = Array<DatabaseUsageOutputInstancesItem>;
412
412
  export interface DatabaseUsageOutput {
413
- uuid?: string;
413
+ uuid?: string | undefined;
414
414
  /** The usage objects for instances of the current database. */
415
- instances?: DatabaseUsageOutputInstancesList;
415
+ instances?: DatabaseUsageOutputInstancesList | undefined;
416
416
  /** The total usage for the database. */
417
- total?: DatabaseUsageObject;
417
+ total?: DatabaseUsageObject | undefined;
418
418
  }
419
419
  export interface GetDatabaseUsageResponse {
420
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). */
421
- database?: DatabaseUsageOutput;
421
+ database?: DatabaseUsageOutput | undefined;
422
422
  }
423
423
  export interface GetGroupRequest {
424
424
  /** The slug of the organization or user account. */
@@ -427,7 +427,7 @@ export interface GetGroupRequest {
427
427
  groupName: string;
428
428
  }
429
429
  export interface GetGroupResponse {
430
- group?: Group;
430
+ group?: Group | undefined;
431
431
  }
432
432
  export interface GetGroupConfigurationRequest {
433
433
  /** The slug of the organization or user account. */
@@ -437,7 +437,7 @@ export interface GetGroupConfigurationRequest {
437
437
  }
438
438
  export interface GroupConfigurationResponse {
439
439
  /** Prevent the group from being deleted. */
440
- delete_protection?: boolean;
440
+ delete_protection?: boolean | undefined;
441
441
  }
442
442
  export interface GetOrganizationRequest {
443
443
  /** The slug of the organization or user account. */
@@ -447,30 +447,30 @@ export interface GetOrganizationRequest {
447
447
  export type OrganizationType = "personal" | "team";
448
448
  export interface Organization {
449
449
  /** The organization name. Every user has a `personal` organization for their own account. */
450
- name?: string;
450
+ name?: string | undefined;
451
451
  /** The organization slug. This will be your username for `personal` accounts. */
452
- slug?: string;
452
+ slug?: string | undefined;
453
453
  /** The type of account this organization is. Will always be `personal` or `team`. */
454
- type?: OrganizationType;
454
+ type?: OrganizationType | undefined;
455
455
  /** The name of the organization. Every user has a `personal` organization for their own account. */
456
- overages?: boolean;
456
+ overages?: boolean | undefined;
457
457
  /** Whether all members of the organization are required to have multi-factor authentication enabled. */
458
- require_mfa?: boolean;
458
+ require_mfa?: boolean | undefined;
459
459
  /** Returns the current status for blocked reads. */
460
- blocked_reads?: boolean;
460
+ blocked_reads?: boolean | undefined;
461
461
  /** Returns the current status for blocked writes. */
462
- blocked_writes?: boolean;
462
+ blocked_writes?: boolean | undefined;
463
463
  /** The pricing plan identifier this organization is subscribed to. */
464
- plan_id?: string;
464
+ plan_id?: string | undefined;
465
465
  /** The billing cycle for the paid plan, if any. */
466
- plan_timeline?: string;
466
+ plan_timeline?: string | undefined;
467
467
  /** The external platform this organization is managed by. Will be empty for Turso managed organizations. */
468
- platform?: string;
468
+ platform?: string | undefined;
469
469
  /** Whether deleted database and group recovery is enabled for the organization. Returned when retrieving a single organization. */
470
- restore_enabled?: boolean;
470
+ restore_enabled?: boolean | undefined;
471
471
  }
472
472
  export interface GetOrganizationResponse {
473
- organization?: Organization;
473
+ organization?: Organization | undefined;
474
474
  }
475
475
  export interface GetOrganizationMemberRequest {
476
476
  /** The slug of the organization or user account. */
@@ -482,14 +482,14 @@ export interface GetOrganizationMemberRequest {
482
482
  export type MemberRole = "owner" | "admin" | "member" | "viewer";
483
483
  export interface Member {
484
484
  /** The username for the member. */
485
- username?: string;
485
+ username?: string | undefined;
486
486
  /** The role assigned to the member. */
487
- role?: MemberRole;
487
+ role?: MemberRole | undefined;
488
488
  /** The email for the member. */
489
- email?: string;
489
+ email?: string | undefined;
490
490
  }
491
491
  export interface GetOrganizationMemberResponse {
492
- member?: Member;
492
+ member?: Member | undefined;
493
493
  }
494
494
  export interface GetOrganizationSubscriptionRequest {
495
495
  /** The slug of the organization or user account. */
@@ -497,16 +497,16 @@ export interface GetOrganizationSubscriptionRequest {
497
497
  }
498
498
  export interface GetOrganizationSubscriptionResponseSubscription {
499
499
  /** The name of the plan for the current subscription. */
500
- name?: string;
500
+ name?: string | undefined;
501
501
  /** Whether overages are enabled for the organization. */
502
- overages?: boolean;
502
+ overages?: boolean | undefined;
503
503
  /** The name of the plan for the current subscription. */
504
- plan?: string;
504
+ plan?: string | undefined;
505
505
  /** Whether the plan is billed monthly or yearly. */
506
- timeline?: string;
506
+ timeline?: string | undefined;
507
507
  }
508
508
  export interface GetOrganizationSubscriptionResponse {
509
- subscription?: GetOrganizationSubscriptionResponseSubscription;
509
+ subscription?: GetOrganizationSubscriptionResponseSubscription | undefined;
510
510
  }
511
511
  export interface GetOrganizationUsageRequest {
512
512
  /** The slug of the organization or user account. */
@@ -515,34 +515,34 @@ export interface GetOrganizationUsageRequest {
515
515
  /** The usage object for the organization. */
516
516
  export interface GetOrganizationUsageResponseOrganizationUsage {
517
517
  /** The number of rows read allowed for the specific plan. */
518
- rows_read?: number;
518
+ rows_read?: number | undefined;
519
519
  /** The number of rows written allowed for the specific plan. */
520
- rows_written?: number;
520
+ rows_written?: number | undefined;
521
521
  /** The number of databases allowed for the specific plan. */
522
- databases?: number;
522
+ databases?: number | undefined;
523
523
  /** The number of locations allowed for the specific plan. */
524
- locations?: number;
524
+ locations?: number | undefined;
525
525
  /** The amount of storage allowed for the specific plan, in bytes. */
526
- storage_bytes?: number;
526
+ storage_bytes?: number | undefined;
527
527
  /** The number of groups allowed for the specific plan. */
528
- groups?: number;
528
+ groups?: number | undefined;
529
529
  /** The number of bytes synced allowed for the specific plan, in bytes. */
530
- bytes_synced?: number;
530
+ bytes_synced?: number | undefined;
531
531
  }
532
532
  /** The databases for the organization and their usage. */
533
533
  export type GetOrganizationUsageResponseOrganizationDatabasesList = Array<DatabaseUsageOutput>;
534
534
  /** The organization usage object, containing the total usage for rows read and written, as well as the total storage size (in bytes). */
535
535
  export interface GetOrganizationUsageResponseOrganization {
536
536
  /** The UUID of the organization. */
537
- uuid?: string;
537
+ uuid?: string | undefined;
538
538
  /** The usage object for the organization. */
539
- usage?: GetOrganizationUsageResponseOrganizationUsage;
539
+ usage?: GetOrganizationUsageResponseOrganizationUsage | undefined;
540
540
  /** The databases for the organization and their usage. */
541
- databases?: GetOrganizationUsageResponseOrganizationDatabasesList;
541
+ databases?: GetOrganizationUsageResponseOrganizationDatabasesList | undefined;
542
542
  }
543
543
  export interface GetOrganizationUsageResponse {
544
544
  /** The organization usage object, containing the total usage for rows read and written, as well as the total storage size (in bytes). */
545
- organization?: GetOrganizationUsageResponseOrganization;
545
+ organization?: GetOrganizationUsageResponseOrganization | undefined;
546
546
  }
547
547
  export interface InvalidateDatabaseTokensRequest {
548
548
  /** The slug of the organization or user account. */
@@ -566,46 +566,46 @@ export interface InviteOrganizationMemberV2Request {
566
566
  /** The slug of the organization or user account. */
567
567
  organizationSlug: string;
568
568
  /** The email of the user you want to invite. Exactly one of email or username must be provided. */
569
- email?: string;
569
+ email?: string | undefined;
570
570
  /** The username of an existing Turso user you want to invite. Exactly one of email or username must be provided. */
571
- username?: string;
571
+ username?: string | undefined;
572
572
  /** The role given to the user. */
573
- role?: InviteOrganizationMemberV2RequestRole | (string & {});
573
+ role?: InviteOrganizationMemberV2RequestRole | (string & {}) | undefined;
574
574
  }
575
575
  /** The assigned role for the invited user. */
576
576
  export type InviteCreatedV2Role = "admin" | "member" | "viewer";
577
577
  export interface InviteCreatedV2 {
578
578
  /** The email of the person invited. */
579
- email?: string;
579
+ email?: string | undefined;
580
580
  /** The assigned role for the invited user. */
581
- role?: InviteCreatedV2Role;
581
+ role?: InviteCreatedV2Role | undefined;
582
582
  /** The name of the organization the user was invited to. */
583
- organization?: string;
583
+ organization?: string | undefined;
584
584
  }
585
585
  export interface InviteOrganizationMemberV2Response {
586
- invited?: InviteCreatedV2;
586
+ invited?: InviteCreatedV2 | undefined;
587
587
  }
588
588
  export interface ListAPITokensRequest {
589
589
  }
590
- /** The expanded list of scopes granted to this token. Present only for group-scoped tokens. Presets passed at creation time (`read-only`, `full-access`) are stored as the underlying individual scopes and are returned in that form. */
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. */
591
591
  export type APITokenScopesList = Array<string>;
592
592
  export interface APIToken {
593
593
  /** The name given to the API Token. */
594
- name?: string;
594
+ name?: string | undefined;
595
595
  /** The ID generated by Turso for the API Token. */
596
- id?: string;
596
+ id?: string | undefined;
597
597
  /** The organization slug this token is restricted to. Omitted if the token has access to all organizations. */
598
- organization?: string;
598
+ organization?: string | undefined;
599
599
  /** The group name this token is pinned to. Present only for group-scoped tokens. */
600
- group?: string;
601
- /** 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. */
602
- 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;
603
603
  /** The date the token was created, in `YYYY-MM-DD` format. */
604
- created_at?: string;
604
+ created_at?: string | undefined;
605
605
  }
606
606
  export type ListAPITokensResponseTokensList = Array<APIToken>;
607
607
  export interface ListAPITokensResponse {
608
- tokens?: ListAPITokensResponseTokensList;
608
+ tokens?: ListAPITokensResponseTokensList | undefined;
609
609
  }
610
610
  export interface ListDatabaseInstancesRequest {
611
611
  /** The slug of the organization or user account. */
@@ -615,21 +615,21 @@ export interface ListDatabaseInstancesRequest {
615
615
  }
616
616
  export type ListDatabaseInstancesResponseInstancesList = Array<Instance>;
617
617
  export interface ListDatabaseInstancesResponse {
618
- instances?: ListDatabaseInstancesResponseInstancesList;
618
+ instances?: ListDatabaseInstancesResponseInstancesList | undefined;
619
619
  }
620
620
  export interface ListDatabasesRequest {
621
621
  /** The slug of the organization or user account. */
622
622
  organizationSlug: string;
623
623
  /** Filter databases by group name. */
624
- group?: string;
624
+ group?: string | undefined;
625
625
  /** The schema database name that can be used to get databases that belong to that parent schema. */
626
- schema?: string;
626
+ schema?: string | undefined;
627
627
  /** Filter database branches by using their parent database ID. */
628
- parent?: string;
628
+ parent?: string | undefined;
629
629
  }
630
630
  export type ListDatabasesResponseDatabasesList = Array<Database>;
631
631
  export interface ListDatabasesResponse {
632
- databases?: ListDatabasesResponseDatabasesList;
632
+ databases?: ListDatabasesResponseDatabasesList | undefined;
633
633
  }
634
634
  export interface ListDeletedDatabasesRequest {
635
635
  /** The UUID of the organization. Retrieve it with the Retrieve Organization endpoint (the `id` field). */
@@ -637,69 +637,69 @@ export interface ListDeletedDatabasesRequest {
637
637
  /** Must be `true` to list deleted databases. */
638
638
  deleted: boolean;
639
639
  /** Filter deleted databases by name. */
640
- search?: string;
640
+ search?: string | undefined;
641
641
  /** Page size, from 1 to 1000. */
642
- limit?: number;
642
+ limit?: number | undefined;
643
643
  /** Opaque pagination cursor from the previous page's `pagination.next`. */
644
- cursor?: string;
644
+ cursor?: string | undefined;
645
645
  }
646
646
  /** The regions the database was located in. */
647
647
  export type DeletedDatabaseRegionsList = Array<string>;
648
648
  export interface DeletedDatabase {
649
649
  /** The database name. */
650
- Name?: string;
650
+ Name?: string | undefined;
651
651
  /** The database UUID. Use it to restore the database. */
652
- DbId?: string;
652
+ DbId?: string | undefined;
653
653
  /** The DNS hostname the database had, used for client and HTTP connections. */
654
- Hostname?: string;
654
+ Hostname?: string | undefined;
655
655
  /** The name of the group the database belonged to. */
656
- group?: string;
656
+ group?: string | undefined;
657
657
  /** The UUID of the group the database belonged to. */
658
- group_id?: string;
658
+ group_id?: string | undefined;
659
659
  /** The UUID of the organization. */
660
- organization_id?: string;
660
+ organization_id?: string | undefined;
661
661
  /** The regions the database was located in. */
662
- regions?: DeletedDatabaseRegionsList;
662
+ regions?: DeletedDatabaseRegionsList | undefined;
663
663
  /** The primary region of the database. */
664
- primaryRegion?: string;
664
+ primaryRegion?: string | undefined;
665
665
  /** Whether delete protection was enabled for the database. */
666
- delete_protection?: boolean;
666
+ delete_protection?: boolean | undefined;
667
667
  /** When the database was deleted. */
668
- deleted_at?: string;
668
+ deleted_at?: string | undefined;
669
669
  /** Set when the database's group was deleted with it. Restoring the database also restores the group. */
670
- group_deleted_at?: string;
670
+ group_deleted_at?: string | undefined;
671
671
  }
672
672
  export type ListDeletedDatabasesResponseDatabasesList = Array<DeletedDatabase>;
673
673
  export interface Pagination {
674
674
  /** Opaque cursor for the next page. Pass it back as the `cursor` query parameter. Absent on the last page. */
675
- next?: string;
675
+ next?: string | undefined;
676
676
  }
677
677
  export interface ListDeletedDatabasesResponse {
678
- databases?: ListDeletedDatabasesResponseDatabasesList;
679
- pagination?: Pagination;
678
+ databases?: ListDeletedDatabasesResponseDatabasesList | undefined;
679
+ pagination?: Pagination | undefined;
680
680
  }
681
681
  export interface ListDeletedGroupsRequest {
682
682
  /** The UUID of the organization. Retrieve it with the Retrieve Organization endpoint (the `id` field). */
683
683
  organizationId: string;
684
684
  /** Page size, from 1 to 1000. */
685
- limit?: number;
685
+ limit?: number | undefined;
686
686
  /** Opaque pagination cursor from the previous page's `pagination.next`. */
687
- cursor?: string;
687
+ cursor?: string | undefined;
688
688
  }
689
689
  export interface DeletedGroup {
690
690
  /** The group UUID. Use it to restore the group. */
691
- uuid?: string;
691
+ uuid?: string | undefined;
692
692
  /** The group name. */
693
- name?: string;
693
+ name?: string | undefined;
694
694
  /** When the group was deleted. */
695
- deleted_at?: string;
695
+ deleted_at?: string | undefined;
696
696
  /** The number of member databases that restoring the group would bring back with it. */
697
- cascade_databases?: number;
697
+ cascade_databases?: number | undefined;
698
698
  }
699
699
  export type ListDeletedGroupsResponseGroupsList = Array<DeletedGroup>;
700
700
  export interface ListDeletedGroupsResponse {
701
- groups?: ListDeletedGroupsResponseGroupsList;
702
- pagination?: Pagination;
701
+ groups?: ListDeletedGroupsResponseGroupsList | undefined;
702
+ pagination?: Pagination | undefined;
703
703
  }
704
704
  export interface ListGroupsRequest {
705
705
  /** The slug of the organization or user account. */
@@ -707,7 +707,7 @@ export interface ListGroupsRequest {
707
707
  }
708
708
  export type ListGroupsResponseGroupsList = Array<Group>;
709
709
  export interface ListGroupsResponse {
710
- groups?: ListGroupsResponseGroupsList;
710
+ groups?: ListGroupsResponseGroupsList | undefined;
711
711
  }
712
712
  export interface ListLocationsRequest {
713
713
  }
@@ -717,77 +717,77 @@ export type ListLocationsResponseLocationsMap = {
717
717
  };
718
718
  export interface ListLocationsResponse {
719
719
  /** A mapping of location codes to location names. */
720
- locations?: ListLocationsResponseLocationsMap;
720
+ locations?: ListLocationsResponseLocationsMap | undefined;
721
721
  }
722
722
  export interface ListOrganizationAPITokensRequest {
723
723
  /** The slug of the organization or user account. */
724
724
  organizationSlug: string;
725
725
  }
726
- /** The expanded scope list. Present only for group-scoped tokens. */
726
+ /** The expanded scope list. Present only for tokens with scopes. */
727
727
  export type ListOrganizationAPITokensResponseTokensItemScopesList = Array<string>;
728
728
  /** The user who minted the token. Returned to admins and owners so they can see who provisioned each token. */
729
729
  export interface ListOrganizationAPITokensResponseTokensItemOwner {
730
- username?: string;
731
- email?: string;
730
+ username?: string | undefined;
731
+ email?: string | undefined;
732
732
  }
733
733
  export interface ListOrganizationAPITokensResponseTokensItem {
734
734
  /** The token name. */
735
- name?: string;
735
+ name?: string | undefined;
736
736
  /** The token ID. Pass this to the revoke endpoint. */
737
- id?: string;
737
+ id?: string | undefined;
738
738
  /** The organization slug. Always equal to the path parameter for tokens returned here. */
739
- organization?: string;
739
+ organization?: string | undefined;
740
740
  /** The group name. Present only for group-scoped tokens. */
741
- group?: string;
742
- /** The expanded scope list. Present only for group-scoped tokens. */
743
- scopes?: ListOrganizationAPITokensResponseTokensItemScopesList;
741
+ group?: string | undefined;
742
+ /** The expanded scope list. Present only for tokens with scopes. */
743
+ scopes?: ListOrganizationAPITokensResponseTokensItemScopesList | undefined;
744
744
  /** The user who minted the token. Returned to admins and owners so they can see who provisioned each token. */
745
- owner?: ListOrganizationAPITokensResponseTokensItemOwner;
745
+ owner?: ListOrganizationAPITokensResponseTokensItemOwner | undefined;
746
746
  /** The date the token was created. */
747
- created_at?: string;
747
+ created_at?: string | undefined;
748
748
  }
749
749
  export type ListOrganizationAPITokensResponseTokensList = Array<ListOrganizationAPITokensResponseTokensItem>;
750
750
  export interface ListOrganizationAPITokensResponse {
751
- tokens?: ListOrganizationAPITokensResponseTokensList;
751
+ tokens?: ListOrganizationAPITokensResponseTokensList | undefined;
752
752
  }
753
753
  export interface ListOrganizationAuditLogsRequest {
754
754
  /** The slug of the organization or user account. */
755
755
  organizationSlug: string;
756
756
  /** The limit of items to return per page. Defaults to 100. */
757
- page_size?: number;
757
+ page_size?: number | undefined;
758
758
  /** The page number to return. Defaults to 1. */
759
- page?: number;
759
+ page?: number | undefined;
760
760
  }
761
761
  /** The code associated to the action taken. */
762
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";
763
763
  export interface AuditLog {
764
764
  /** The code associated to the action taken. */
765
- code?: AuditLogCode;
765
+ code?: AuditLogCode | undefined;
766
766
  /** Additional context from the performed action. */
767
- message?: string;
767
+ message?: string | undefined;
768
768
  /** Where this action was performed. Will be either `cli` or `web` depending on the `User-Agent` sent to the API. */
769
- origin?: string;
769
+ origin?: string | undefined;
770
770
  /** The username of the user who performed the action. */
771
- author?: string;
771
+ author?: string | undefined;
772
772
  /** A formatted [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp this action was performed. */
773
- created_at?: string;
773
+ created_at?: string | undefined;
774
774
  /** The payload of the action performed. */
775
- data?: unknown;
775
+ data?: unknown | undefined;
776
776
  }
777
777
  export type ListOrganizationAuditLogsResponseAuditLogsList = Array<AuditLog>;
778
778
  export interface ListOrganizationAuditLogsResponsePagination {
779
779
  /** The current page number. */
780
- page?: number;
780
+ page?: number | undefined;
781
781
  /** The number of items per page. */
782
- page_size?: number;
782
+ page_size?: number | undefined;
783
783
  /** The total number of pages. */
784
- total_pages?: number;
784
+ total_pages?: number | undefined;
785
785
  /** The total number of items. */
786
- total_rows?: number;
786
+ total_rows?: number | undefined;
787
787
  }
788
788
  export interface ListOrganizationAuditLogsResponse {
789
- audit_logs?: ListOrganizationAuditLogsResponseAuditLogsList;
790
- pagination?: ListOrganizationAuditLogsResponsePagination;
789
+ audit_logs?: ListOrganizationAuditLogsResponseAuditLogsList | undefined;
790
+ pagination?: ListOrganizationAuditLogsResponsePagination | undefined;
791
791
  }
792
792
  export interface ListOrganizationInvitesV2Request {
793
793
  /** The slug of the organization or user account. */
@@ -797,44 +797,44 @@ export interface ListOrganizationInvitesV2Request {
797
797
  export type InviteV2Role = "admin" | "member" | "viewer";
798
798
  export interface InviteV2 {
799
799
  /** The unique ID for the invite. */
800
- id?: number;
800
+ id?: number | undefined;
801
801
  /** The email of the person invited. */
802
- email?: string;
802
+ email?: string | undefined;
803
803
  /** The assigned role for the invited user. */
804
- role?: InviteV2Role;
804
+ role?: InviteV2Role | undefined;
805
805
  /** The datetime the invite was created in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */
806
- created_at?: string;
806
+ created_at?: string | undefined;
807
807
  }
808
808
  export type ListOrganizationInvitesV2ResponseInvitesList = Array<InviteV2>;
809
809
  export interface ListOrganizationInvitesV2Response {
810
- invites?: ListOrganizationInvitesV2ResponseInvitesList;
810
+ invites?: ListOrganizationInvitesV2ResponseInvitesList | undefined;
811
811
  }
812
812
  export type ListOrganizationInvoicesRequestType = "all" | "upcoming" | "issued";
813
813
  export interface ListOrganizationInvoicesRequest {
814
814
  /** The slug of the organization or user account. */
815
815
  organizationSlug: string;
816
816
  /** The type of invoice to retrieve. */
817
- type?: ListOrganizationInvoicesRequestType | (string & {});
817
+ type?: ListOrganizationInvoicesRequestType | (string & {}) | undefined;
818
818
  }
819
819
  export interface ListOrganizationInvoicesResponseInvoicesItem {
820
820
  /** The unique ID for the invoice. */
821
- invoice_number?: string;
821
+ invoice_number?: string | undefined;
822
822
  /** The formatted price in USD for the invoice. */
823
- amount_due?: string;
823
+ amount_due?: string | undefined;
824
824
  /** The due date for the invoice. */
825
- due_date?: string;
825
+ due_date?: string | undefined;
826
826
  /** The date the invoice was paid. */
827
- paid_at?: string;
827
+ paid_at?: string | undefined;
828
828
  /** The date the invoice payment last failed. */
829
- payment_failed_at?: string;
829
+ payment_failed_at?: string | undefined;
830
830
  /** The link to the invoice PDF you can download. */
831
- invoice_pdf?: string;
831
+ invoice_pdf?: string | undefined;
832
832
  }
833
833
  /** The list of invoices for the organization. */
834
834
  export type ListOrganizationInvoicesResponseInvoicesList = Array<ListOrganizationInvoicesResponseInvoicesItem>;
835
835
  export interface ListOrganizationInvoicesResponse {
836
836
  /** The list of invoices for the organization. */
837
- invoices?: ListOrganizationInvoicesResponseInvoicesList;
837
+ invoices?: ListOrganizationInvoicesResponseInvoicesList | undefined;
838
838
  }
839
839
  export interface ListOrganizationMembersRequest {
840
840
  /** The slug of the organization or user account. */
@@ -842,7 +842,7 @@ export interface ListOrganizationMembersRequest {
842
842
  }
843
843
  export type ListOrganizationMembersResponseMembersList = Array<Member>;
844
844
  export interface ListOrganizationMembersResponse {
845
- members?: ListOrganizationMembersResponseMembersList;
845
+ members?: ListOrganizationMembersResponseMembersList | undefined;
846
846
  }
847
847
  export interface ListOrganizationPlansRequest {
848
848
  /** The slug of the organization or user account. */
@@ -850,40 +850,40 @@ export interface ListOrganizationPlansRequest {
850
850
  }
851
851
  export interface PlanPrice {
852
852
  /** Price of the available plan. */
853
- value?: string;
853
+ value?: string | undefined;
854
854
  /** Payment regularity. */
855
- timeline?: string;
855
+ timeline?: string | undefined;
856
856
  }
857
857
  export type OrganizationPlanPricesList = Array<PlanPrice>;
858
858
  export interface PlanQuotas {
859
859
  /** The number of rows read allowed for the specific plan. */
860
- rowsRead?: number;
860
+ rowsRead?: number | undefined;
861
861
  /** The number of rows written allowed for the specific plan. */
862
- rowsWritten?: number;
862
+ rowsWritten?: number | undefined;
863
863
  /** The number of databases allowed for the specific plan. */
864
- databases?: number | null;
864
+ databases?: number | null | undefined;
865
865
  /** The number of locations allowed for the specific plan. */
866
- locations?: number;
866
+ locations?: number | undefined;
867
867
  /** The amount of storage allowed for the specific plan, in bytes. */
868
- storage?: number;
868
+ storage?: number | undefined;
869
869
  /** The number of groups allowed for the specific plan. */
870
- groups?: number;
870
+ groups?: number | undefined;
871
871
  /** The number of bytes synced allowed for the specific plan, in bytes. */
872
- bytesSynced?: number;
872
+ bytesSynced?: number | undefined;
873
873
  }
874
874
  export interface OrganizationPlan {
875
875
  /** The name of the plan. */
876
- name?: string;
876
+ name?: string | undefined;
877
877
  /** The monthly price of the plan. */
878
- price?: string;
879
- prices?: OrganizationPlanPricesList;
880
- quotas?: PlanQuotas;
878
+ price?: string | undefined;
879
+ prices?: OrganizationPlanPricesList | undefined;
880
+ quotas?: PlanQuotas | undefined;
881
881
  }
882
882
  /** List of available plans. */
883
883
  export type ListOrganizationPlansResponsePlansList = Array<OrganizationPlan>;
884
884
  export interface ListOrganizationPlansResponse {
885
885
  /** List of available plans. */
886
- plans?: ListOrganizationPlansResponsePlansList;
886
+ plans?: ListOrganizationPlansResponsePlansList | undefined;
887
887
  }
888
888
  export interface ListOrganizationsRequest {
889
889
  }
@@ -899,7 +899,7 @@ export interface RemoveLocationFromGroupRequest {
899
899
  }
900
900
  export interface RemoveLocationFromGroupResponse {
901
901
  /** The group with the removed location */
902
- group?: Group;
902
+ group?: Group | undefined;
903
903
  }
904
904
  export interface RemoveOrganizationMemberRequest {
905
905
  /** The slug of the organization or user account. */
@@ -908,7 +908,7 @@ export interface RemoveOrganizationMemberRequest {
908
908
  username: string;
909
909
  }
910
910
  export interface RemoveOrganizationMemberResponse {
911
- member?: string;
911
+ member?: string | undefined;
912
912
  }
913
913
  export interface RestoreDatabaseRequest {
914
914
  /** The UUID of the organization. Retrieve it with the Retrieve Organization endpoint (the `id` field). */
@@ -916,11 +916,11 @@ export interface RestoreDatabaseRequest {
916
916
  /** The UUID of the database, as returned when listing deleted databases (the `DbId` field). */
917
917
  databaseId: string;
918
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;
919
+ name?: string | undefined;
920
920
  }
921
921
  export interface RestoreDatabaseResponse {
922
922
  /** The restored database. */
923
- database?: DeletedDatabase;
923
+ database?: DeletedDatabase | undefined;
924
924
  }
925
925
  export interface RestoreGroupRequest {
926
926
  /** The UUID of the organization. Retrieve it with the Retrieve Organization endpoint (the `id` field). */
@@ -936,11 +936,11 @@ export type RestoreGroupResponseFailuresMap = {
936
936
  };
937
937
  export interface RestoreGroupResponse {
938
938
  /** The restored group. */
939
- group?: Group;
939
+ group?: Group | undefined;
940
940
  /** The member databases restored with the group, in restore order. */
941
- databases?: RestoreGroupResponseDatabasesList;
941
+ databases?: RestoreGroupResponseDatabasesList | undefined;
942
942
  /** Maps database UUID to error message for members whose restore failed. Retry them individually with Restore Database. */
943
- failures?: RestoreGroupResponseFailuresMap;
943
+ failures?: RestoreGroupResponseFailuresMap | undefined;
944
944
  }
945
945
  export interface RevokeAPITokenRequest {
946
946
  /** The name of the api token. */
@@ -948,7 +948,7 @@ export interface RevokeAPITokenRequest {
948
948
  }
949
949
  export interface RevokeAPITokenResponse {
950
950
  /** The revoked token name. */
951
- token?: string;
951
+ token?: string | undefined;
952
952
  }
953
953
  export interface RevokeOrganizationAPITokenRequest {
954
954
  /** The slug of the organization or user account. */
@@ -958,7 +958,7 @@ export interface RevokeOrganizationAPITokenRequest {
958
958
  }
959
959
  export interface RevokeOrganizationAPITokenResponse {
960
960
  /** The ID of the revoked token. */
961
- token?: string;
961
+ token?: string | undefined;
962
962
  }
963
963
  export interface TransferGroupRequest {
964
964
  /** The slug of the organization or user account. */
@@ -966,23 +966,23 @@ export interface TransferGroupRequest {
966
966
  /** The name of the group. */
967
967
  groupName: string;
968
968
  /** The slug of the organization to transfer the group to. */
969
- organization?: string;
969
+ organization?: string | undefined;
970
970
  }
971
971
  /** An array of location keys the group is located. */
972
972
  export type TransferGroupResponseLocationsList = Array<string>;
973
973
  export interface TransferGroupResponse {
974
974
  /** The group name, unique across your organization. */
975
- name?: string;
975
+ name?: string | undefined;
976
976
  /** The current libSQL server version the databases in that group are running. */
977
- version?: string;
977
+ version?: string | undefined;
978
978
  /** The group universal unique identifier (UUID). */
979
- uuid?: string;
979
+ uuid?: string | undefined;
980
980
  /** An array of location keys the group is located. */
981
- locations?: TransferGroupResponseLocationsList;
981
+ locations?: TransferGroupResponseLocationsList | undefined;
982
982
  /** The primary location key. */
983
- primary?: string;
983
+ primary?: string | undefined;
984
984
  /** The current status for delete protection. If enabled, the group and all its databases cannot be deleted. */
985
- delete_protection?: boolean;
985
+ delete_protection?: boolean | undefined;
986
986
  }
987
987
  export interface UnarchiveGroupRequest {
988
988
  /** The slug of the organization or user account. */
@@ -992,7 +992,7 @@ export interface UnarchiveGroupRequest {
992
992
  }
993
993
  export interface UnarchiveGroupResponse {
994
994
  /** The group that was unarchived */
995
- group?: Group;
995
+ group?: Group | undefined;
996
996
  }
997
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. */
998
998
  export type UpdateDatabaseConfigurationRequestAllowedIpsList = Array<string>;
@@ -1004,19 +1004,19 @@ export interface UpdateDatabaseConfigurationRequest {
1004
1004
  /** The name of the database. */
1005
1005
  databaseName: string;
1006
1006
  /** The maximum size of the database in bytes. Values with units are also accepted, e.g. 1mb, 256mb, 1gb. */
1007
- size_limit?: string;
1007
+ size_limit?: string | undefined;
1008
1008
  /** Allow or disallow attaching databases to the current database. */
1009
- allow_attach?: boolean;
1009
+ allow_attach?: boolean | undefined;
1010
1010
  /** Block all database reads. */
1011
- block_reads?: boolean;
1011
+ block_reads?: boolean | undefined;
1012
1012
  /** Block all database writes. */
1013
- block_writes?: boolean;
1013
+ block_writes?: boolean | undefined;
1014
1014
  /** Prevent the database from being deleted. */
1015
- delete_protection?: boolean;
1015
+ delete_protection?: boolean | undefined;
1016
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. */
1017
- allowed_ips?: UpdateDatabaseConfigurationRequestAllowedIpsList;
1017
+ allowed_ips?: UpdateDatabaseConfigurationRequestAllowedIpsList | undefined;
1018
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. */
1019
- allowed_aws_vpc_ids?: UpdateDatabaseConfigurationRequestAllowedAwsVpcIdsList;
1019
+ allowed_aws_vpc_ids?: UpdateDatabaseConfigurationRequestAllowedAwsVpcIdsList | undefined;
1020
1020
  }
1021
1021
  export interface UpdateGroupConfigurationRequest {
1022
1022
  /** The slug of the organization or user account. */
@@ -1024,7 +1024,7 @@ export interface UpdateGroupConfigurationRequest {
1024
1024
  /** The name of the group. */
1025
1025
  groupName: string;
1026
1026
  /** Prevent the group from being deleted. */
1027
- delete_protection?: boolean;
1027
+ delete_protection?: boolean | undefined;
1028
1028
  }
1029
1029
  export interface UpdateGroupDatabasesRequest {
1030
1030
  /** The slug of the organization or user account. */
@@ -1048,34 +1048,34 @@ export interface UpdateMemberRoleRequest {
1048
1048
  export type UpdateMemberRoleResponseMemberRole = "admin" | "member" | "viewer";
1049
1049
  export interface UpdateMemberRoleResponseMember {
1050
1050
  /** The username of the updated member. */
1051
- username?: string;
1051
+ username?: string | undefined;
1052
1052
  /** The email of the updated member. */
1053
- email?: string;
1053
+ email?: string | undefined;
1054
1054
  /** The new role of the updated member. */
1055
- role?: UpdateMemberRoleResponseMemberRole;
1055
+ role?: UpdateMemberRoleResponseMemberRole | undefined;
1056
1056
  }
1057
1057
  export interface UpdateMemberRoleResponse {
1058
- member?: UpdateMemberRoleResponseMember;
1058
+ member?: UpdateMemberRoleResponseMember | undefined;
1059
1059
  }
1060
1060
  export interface UpdateOrganizationRequest {
1061
1061
  /** The slug of the organization or user account. */
1062
1062
  organizationSlug: string;
1063
1063
  /** Enable or disable overages for the organization. */
1064
- overages?: boolean;
1064
+ overages?: boolean | undefined;
1065
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. */
1066
- require_mfa?: boolean;
1066
+ require_mfa?: boolean | undefined;
1067
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;
1068
+ restore_enabled?: boolean | undefined;
1069
1069
  }
1070
1070
  export interface UpdateOrganizationResponse {
1071
1071
  /** The updated organization. */
1072
- organization?: Organization;
1072
+ organization?: Organization | undefined;
1073
1073
  }
1074
1074
  export interface ValidateAPITokenRequest {
1075
1075
  }
1076
1076
  export interface ValidateAPITokenResponse {
1077
1077
  /** The time of expiration for the provided token in unix epoch seconds, or `-1` if there is no expiration. */
1078
- exp?: number;
1078
+ exp?: number | undefined;
1079
1079
  }
1080
1080
  export type AddLocationToGroupError = BadRequest | NotFound | TursoOpError;
1081
1081
  /** Add Location to Group Adds a location to the specified group. */
@@ -1084,7 +1084,7 @@ export type AddOrganizationMemberError = BadRequest | NotFound | Conflict | Turs
1084
1084
  /** Add Member Add an existing Turso user to an organization. */
1085
1085
  export declare const addOrganizationMember: API.OperationMethod<AddOrganizationMemberRequest, AddOrganizationMemberResponse, AddOrganizationMemberError, TursoOpContext>;
1086
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`. The token can only act on resources inside that organization. - **Group-scoped** -- pass `organization`, `group`, and `scopes`. The token is pinned to a single group inside the organization and only the operations listed in `scopes` are allowed. The caller must be an admin or owner of the organization. - **Unrestricted** *(deprecated)* -- no request body. The token can act on every organization the caller belongs to. **Unrestricted tokens are deprecated and will be removed in a future release.** Always pass `organization` for new tokens and rotate existing unrestricted tokens to scoped tokens. Group-scoped tokens are designed for automations that should be able to provision and manage databases inside a single group without being able to touch the rest of the organization. */
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. */
1088
1088
  export declare const createAPIToken: API.OperationMethod<CreateAPITokenRequest, CreateAPITokenResponse, CreateAPITokenError, TursoOpContext>;
1089
1089
  export type CreateDatabaseError = BadRequest | Conflict | TursoOpError;
1090
1090
  /** Create Database Creates a new database in a group for the organization or user. */