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