@distilled.cloud/turso 1.0.0-rc.14 → 1.0.0-rc.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/credentials.d.ts +1 -1
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +17 -14
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts +14 -14
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +22 -22
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +12 -12
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +20 -23
- package/lib/protocol.js.map +1 -1
- package/lib/retry.d.ts +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +26 -25
- package/lib/retry.js.map +1 -1
- package/lib/services/turso.d.ts +15 -209
- package/lib/services/turso.d.ts.map +1 -1
- package/lib/services/turso.js +193 -1375
- package/lib/traits.d.ts +2 -2
- package/lib/traits.js +10 -10
- package/package.json +13 -9
- package/src/credentials.ts +10 -11
- package/src/errors.ts +13 -14
- package/src/index.ts +1 -1
- package/src/protocol.ts +6 -9
- package/src/retry.ts +6 -4
- package/src/services/turso.ts +1639 -1663
- package/src/traits.ts +2 -2
- package/lib/services/turso.js.map +0 -1
package/src/services/turso.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import * as API from "@distilled.cloud/core/api";
|
|
2
2
|
import * as C from "@distilled.cloud/core/category";
|
|
3
3
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs. Do not edit.
|
|
4
|
-
import * as S from "@distilled.cloud/core/schema";
|
|
5
|
-
import * as
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
|
+
import type * as Redacted from "effect/Redacted";
|
|
6
7
|
import { TursoProtocol, type TursoOpError, type TursoOpContext } from "../protocol.ts";
|
|
7
8
|
import * as Retry from "../retry.ts";
|
|
8
9
|
import * as T from "../traits.ts";
|
|
10
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
11
|
+
const __s: any[] = [];
|
|
9
12
|
|
|
10
13
|
export type { TursoOpError, TursoOpContext };
|
|
11
14
|
|
|
@@ -53,28 +56,8 @@ export interface AddLocationToGroupRequest {
|
|
|
53
56
|
/** The location code to add to the group. */
|
|
54
57
|
location: string;
|
|
55
58
|
}
|
|
56
|
-
export const AddLocationToGroupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
57
|
-
S.Struct({
|
|
58
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
59
|
-
groupName: S.String.pipe(T.Label()),
|
|
60
|
-
location: S.String.pipe(T.Label()),
|
|
61
|
-
}).pipe(
|
|
62
|
-
T.Http({
|
|
63
|
-
method: "POST",
|
|
64
|
-
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/locations/{location}",
|
|
65
|
-
code: 200,
|
|
66
|
-
}),
|
|
67
|
-
),
|
|
68
|
-
).annotate({
|
|
69
|
-
identifier: "AddLocationToGroupRequest",
|
|
70
|
-
}) as any as S.Schema<AddLocationToGroupRequest>;
|
|
71
|
-
|
|
72
59
|
/** An array of location keys the group is located. */
|
|
73
60
|
export type GroupLocationsList = Array<string>;
|
|
74
|
-
export const GroupLocationsList = /*@__PURE__*/ S.Array(
|
|
75
|
-
S.String,
|
|
76
|
-
) as any as S.Schema<GroupLocationsList>;
|
|
77
|
-
|
|
78
61
|
export interface Group {
|
|
79
62
|
/** The group name, unique across your organization. */
|
|
80
63
|
name?: string;
|
|
@@ -89,33 +72,12 @@ export interface Group {
|
|
|
89
72
|
/** The current status for delete protection. If enabled, the group and all its databases cannot be deleted. */
|
|
90
73
|
delete_protection?: boolean;
|
|
91
74
|
}
|
|
92
|
-
export const Group = /*@__PURE__*/ S.suspend(() =>
|
|
93
|
-
S.Struct({
|
|
94
|
-
name: S.optional(S.String),
|
|
95
|
-
version: S.optional(S.String),
|
|
96
|
-
uuid: S.optional(S.String),
|
|
97
|
-
locations: S.optional(GroupLocationsList),
|
|
98
|
-
primary: S.optional(S.String),
|
|
99
|
-
delete_protection: S.optional(S.Boolean),
|
|
100
|
-
}),
|
|
101
|
-
).annotate({ identifier: "Group" }) as any as S.Schema<Group>;
|
|
102
|
-
|
|
103
75
|
export interface AddLocationToGroupResponse {
|
|
104
76
|
/** The group with the added location */
|
|
105
77
|
group?: Group;
|
|
106
78
|
}
|
|
107
|
-
export const AddLocationToGroupResponse = /*@__PURE__*/ S.suspend(() =>
|
|
108
|
-
S.Struct({
|
|
109
|
-
group: S.optional(Group),
|
|
110
|
-
}),
|
|
111
|
-
).annotate({
|
|
112
|
-
identifier: "AddLocationToGroupResponse",
|
|
113
|
-
}) as any as S.Schema<AddLocationToGroupResponse>;
|
|
114
|
-
|
|
115
79
|
/** The role given to the user. */
|
|
116
80
|
export type AddOrganizationMemberRequestRole = "admin" | "member" | "viewer";
|
|
117
|
-
export const AddOrganizationMemberRequestRole = S.String;
|
|
118
|
-
|
|
119
81
|
export interface AddOrganizationMemberRequest {
|
|
120
82
|
/** The slug of the organization or user account. */
|
|
121
83
|
organizationSlug: string;
|
|
@@ -124,35 +86,12 @@ export interface AddOrganizationMemberRequest {
|
|
|
124
86
|
/** The role given to the user. */
|
|
125
87
|
role?: AddOrganizationMemberRequestRole | (string & {});
|
|
126
88
|
}
|
|
127
|
-
export const AddOrganizationMemberRequest = /*@__PURE__*/ S.suspend(() =>
|
|
128
|
-
S.Struct({
|
|
129
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
130
|
-
username: S.optional(S.String),
|
|
131
|
-
role: S.optional(AddOrganizationMemberRequestRole),
|
|
132
|
-
}).pipe(
|
|
133
|
-
T.Http({ method: "POST", uri: "/v1/organizations/{organizationSlug}/members", code: 200 }),
|
|
134
|
-
),
|
|
135
|
-
).annotate({
|
|
136
|
-
identifier: "AddOrganizationMemberRequest",
|
|
137
|
-
}) as any as S.Schema<AddOrganizationMemberRequest>;
|
|
138
|
-
|
|
139
89
|
/** The role assigned to the member. */
|
|
140
90
|
export type Role = "owner" | "admin" | "member" | "viewer";
|
|
141
|
-
export const Role = S.String;
|
|
142
|
-
|
|
143
91
|
export interface AddOrganizationMemberResponse {
|
|
144
92
|
member?: string;
|
|
145
93
|
role?: Role;
|
|
146
94
|
}
|
|
147
|
-
export const AddOrganizationMemberResponse = /*@__PURE__*/ S.suspend(() =>
|
|
148
|
-
S.Struct({
|
|
149
|
-
member: S.optional(S.String),
|
|
150
|
-
role: S.optional(Role),
|
|
151
|
-
}),
|
|
152
|
-
).annotate({
|
|
153
|
-
identifier: "AddOrganizationMemberResponse",
|
|
154
|
-
}) as any as S.Schema<AddOrganizationMemberResponse>;
|
|
155
|
-
|
|
156
95
|
export type CreateAPITokenRequestScopesItem =
|
|
157
96
|
| "read"
|
|
158
97
|
| "db:create"
|
|
@@ -165,16 +104,10 @@ export type CreateAPITokenRequestScopesItem =
|
|
|
165
104
|
| "group:rotate-creds"
|
|
166
105
|
| "read-only"
|
|
167
106
|
| "full-access";
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
/** 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. */
|
|
107
|
+
/** 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. */
|
|
171
108
|
export type CreateAPITokenRequestScopesList = Array<
|
|
172
109
|
CreateAPITokenRequestScopesItem | (string & {})
|
|
173
110
|
>;
|
|
174
|
-
export const CreateAPITokenRequestScopesList = /*@__PURE__*/ S.Array(
|
|
175
|
-
CreateAPITokenRequestScopesItem,
|
|
176
|
-
) as any as S.Schema<CreateAPITokenRequestScopesList>;
|
|
177
|
-
|
|
178
111
|
export interface CreateAPITokenRequest {
|
|
179
112
|
/** The name of the api token. */
|
|
180
113
|
tokenName: string;
|
|
@@ -182,36 +115,17 @@ export interface CreateAPITokenRequest {
|
|
|
182
115
|
organization?: string;
|
|
183
116
|
/** The group name (inside `organization`) to restrict this token to. Requires `organization` and a non-empty `scopes` list. */
|
|
184
117
|
group?: string;
|
|
185
|
-
/** 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
|
|
118
|
+
/** 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. */
|
|
186
119
|
scopes?: CreateAPITokenRequestScopesList;
|
|
187
120
|
}
|
|
188
|
-
export const CreateAPITokenRequest = /*@__PURE__*/ S.suspend(() =>
|
|
189
|
-
S.Struct({
|
|
190
|
-
tokenName: S.String.pipe(T.Label()),
|
|
191
|
-
organization: S.optional(S.String),
|
|
192
|
-
group: S.optional(S.String),
|
|
193
|
-
scopes: S.optional(CreateAPITokenRequestScopesList),
|
|
194
|
-
}).pipe(T.Http({ method: "POST", uri: "/v1/auth/api-tokens/{tokenName}", code: 200 })),
|
|
195
|
-
).annotate({ identifier: "CreateAPITokenRequest" }) as any as S.Schema<CreateAPITokenRequest>;
|
|
196
|
-
|
|
197
121
|
export interface CreateAPITokenResponse {
|
|
198
122
|
name?: string;
|
|
199
123
|
id?: string;
|
|
200
124
|
/** 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.** */
|
|
201
125
|
token?: Redacted.Redacted<string>;
|
|
202
126
|
}
|
|
203
|
-
export const CreateAPITokenResponse = /*@__PURE__*/ S.suspend(() =>
|
|
204
|
-
S.Struct({
|
|
205
|
-
name: S.optional(S.String),
|
|
206
|
-
id: S.optional(S.String),
|
|
207
|
-
token: S.optional(S.String.pipe(T.SensitiveValue({}))),
|
|
208
|
-
}),
|
|
209
|
-
).annotate({ identifier: "CreateAPITokenResponse" }) as any as S.Schema<CreateAPITokenResponse>;
|
|
210
|
-
|
|
211
127
|
/** 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). */
|
|
212
128
|
export type CreateDatabaseRequestSeedType = "database" | "database_upload";
|
|
213
|
-
export const CreateDatabaseRequestSeedType = S.String;
|
|
214
|
-
|
|
215
129
|
export interface CreateDatabaseRequestSeed {
|
|
216
130
|
/** 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). */
|
|
217
131
|
type?: CreateDatabaseRequestSeedType | (string & {});
|
|
@@ -220,16 +134,6 @@ export interface CreateDatabaseRequestSeed {
|
|
|
220
134
|
/** 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. */
|
|
221
135
|
timestamp?: string;
|
|
222
136
|
}
|
|
223
|
-
export const CreateDatabaseRequestSeed = /*@__PURE__*/ S.suspend(() =>
|
|
224
|
-
S.Struct({
|
|
225
|
-
type: S.optional(CreateDatabaseRequestSeedType),
|
|
226
|
-
name: S.optional(S.String),
|
|
227
|
-
timestamp: S.optional(S.String),
|
|
228
|
-
}),
|
|
229
|
-
).annotate({
|
|
230
|
-
identifier: "CreateDatabaseRequestSeed",
|
|
231
|
-
}) as any as S.Schema<CreateDatabaseRequestSeed>;
|
|
232
|
-
|
|
233
137
|
/** The encryption cipher to use. */
|
|
234
138
|
export type CreateDatabaseRequestRemoteEncryptionEncryptionCipher =
|
|
235
139
|
| "aes256gcm"
|
|
@@ -241,8 +145,6 @@ export type CreateDatabaseRequestRemoteEncryptionEncryptionCipher =
|
|
|
241
145
|
| "aegis256"
|
|
242
146
|
| "aegis256x2"
|
|
243
147
|
| "aegis256x4";
|
|
244
|
-
export const CreateDatabaseRequestRemoteEncryptionEncryptionCipher = S.String;
|
|
245
|
-
|
|
246
148
|
/** 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). */
|
|
247
149
|
export interface CreateDatabaseRequestRemoteEncryption {
|
|
248
150
|
/** Base64-encoded encryption key. Key size depends on cipher: 32 bytes for aes256gcm, chacha20poly1305, aegis256 variants; 16 bytes for aes128gcm, aegis128l variants. */
|
|
@@ -250,15 +152,6 @@ export interface CreateDatabaseRequestRemoteEncryption {
|
|
|
250
152
|
/** The encryption cipher to use. */
|
|
251
153
|
encryption_cipher?: CreateDatabaseRequestRemoteEncryptionEncryptionCipher | (string & {});
|
|
252
154
|
}
|
|
253
|
-
export const CreateDatabaseRequestRemoteEncryption = /*@__PURE__*/ S.suspend(() =>
|
|
254
|
-
S.Struct({
|
|
255
|
-
encryption_key: S.optional(S.String),
|
|
256
|
-
encryption_cipher: S.optional(CreateDatabaseRequestRemoteEncryptionEncryptionCipher),
|
|
257
|
-
}),
|
|
258
|
-
).annotate({
|
|
259
|
-
identifier: "CreateDatabaseRequestRemoteEncryption",
|
|
260
|
-
}) as any as S.Schema<CreateDatabaseRequestRemoteEncryption>;
|
|
261
|
-
|
|
262
155
|
export interface CreateDatabaseRequest {
|
|
263
156
|
/** The slug of the organization or user account. */
|
|
264
157
|
organizationSlug: string;
|
|
@@ -272,75 +165,26 @@ export interface CreateDatabaseRequest {
|
|
|
272
165
|
/** 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). */
|
|
273
166
|
remote_encryption?: CreateDatabaseRequestRemoteEncryption;
|
|
274
167
|
}
|
|
275
|
-
export const CreateDatabaseRequest = /*@__PURE__*/ S.suspend(() =>
|
|
276
|
-
S.Struct({
|
|
277
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
278
|
-
name: S.String,
|
|
279
|
-
group: S.String,
|
|
280
|
-
seed: S.optional(CreateDatabaseRequestSeed),
|
|
281
|
-
size_limit: S.optional(S.String),
|
|
282
|
-
remote_encryption: S.optional(CreateDatabaseRequestRemoteEncryption),
|
|
283
|
-
}).pipe(
|
|
284
|
-
T.Http({ method: "POST", uri: "/v1/organizations/{organizationSlug}/databases", code: 200 }),
|
|
285
|
-
),
|
|
286
|
-
).annotate({ identifier: "CreateDatabaseRequest" }) as any as S.Schema<CreateDatabaseRequest>;
|
|
287
|
-
|
|
288
168
|
export interface CreateDatabaseOutput {
|
|
289
169
|
DbId?: string;
|
|
290
170
|
Hostname?: string;
|
|
291
171
|
Name?: string;
|
|
292
172
|
}
|
|
293
|
-
export const CreateDatabaseOutput = /*@__PURE__*/ S.suspend(() =>
|
|
294
|
-
S.Struct({
|
|
295
|
-
DbId: S.optional(S.String),
|
|
296
|
-
Hostname: S.optional(S.String),
|
|
297
|
-
Name: S.optional(S.String),
|
|
298
|
-
}),
|
|
299
|
-
).annotate({ identifier: "CreateDatabaseOutput" }) as any as S.Schema<CreateDatabaseOutput>;
|
|
300
|
-
|
|
301
173
|
export interface CreateDatabaseResponse {
|
|
302
174
|
/** The newly created database */
|
|
303
175
|
database?: CreateDatabaseOutput;
|
|
304
176
|
}
|
|
305
|
-
export const CreateDatabaseResponse = /*@__PURE__*/ S.suspend(() =>
|
|
306
|
-
S.Struct({
|
|
307
|
-
database: S.optional(CreateDatabaseOutput),
|
|
308
|
-
}),
|
|
309
|
-
).annotate({ identifier: "CreateDatabaseResponse" }) as any as S.Schema<CreateDatabaseResponse>;
|
|
310
|
-
|
|
311
177
|
export type CreateDatabaseTokenRequestAuthorization = "full-access" | "read-only";
|
|
312
|
-
export const CreateDatabaseTokenRequestAuthorization = S.String;
|
|
313
|
-
|
|
314
178
|
export type CreateDatabaseTokenRequestPermissionsReadAttachDatabasesList = Array<string>;
|
|
315
|
-
export const CreateDatabaseTokenRequestPermissionsReadAttachDatabasesList = /*@__PURE__*/ S.Array(
|
|
316
|
-
S.String,
|
|
317
|
-
) as any as S.Schema<CreateDatabaseTokenRequestPermissionsReadAttachDatabasesList>;
|
|
318
|
-
|
|
319
179
|
/** Read `ATTACH` permission for the token. */
|
|
320
180
|
export interface CreateDatabaseTokenRequestPermissionsReadAttach {
|
|
321
181
|
databases?: CreateDatabaseTokenRequestPermissionsReadAttachDatabasesList;
|
|
322
182
|
}
|
|
323
|
-
export const CreateDatabaseTokenRequestPermissionsReadAttach = /*@__PURE__*/ S.suspend(() =>
|
|
324
|
-
S.Struct({
|
|
325
|
-
databases: S.optional(CreateDatabaseTokenRequestPermissionsReadAttachDatabasesList),
|
|
326
|
-
}),
|
|
327
|
-
).annotate({
|
|
328
|
-
identifier: "CreateDatabaseTokenRequestPermissionsReadAttach",
|
|
329
|
-
}) as any as S.Schema<CreateDatabaseTokenRequestPermissionsReadAttach>;
|
|
330
|
-
|
|
331
183
|
/** The permissions for the token. */
|
|
332
184
|
export interface CreateDatabaseTokenRequestPermissions {
|
|
333
185
|
/** Read `ATTACH` permission for the token. */
|
|
334
186
|
read_attach?: CreateDatabaseTokenRequestPermissionsReadAttach;
|
|
335
187
|
}
|
|
336
|
-
export const CreateDatabaseTokenRequestPermissions = /*@__PURE__*/ S.suspend(() =>
|
|
337
|
-
S.Struct({
|
|
338
|
-
read_attach: S.optional(CreateDatabaseTokenRequestPermissionsReadAttach),
|
|
339
|
-
}),
|
|
340
|
-
).annotate({
|
|
341
|
-
identifier: "CreateDatabaseTokenRequestPermissions",
|
|
342
|
-
}) as any as S.Schema<CreateDatabaseTokenRequestPermissions>;
|
|
343
|
-
|
|
344
188
|
export interface CreateDatabaseTokenRequest {
|
|
345
189
|
/** The slug of the organization or user account. */
|
|
346
190
|
organizationSlug: string;
|
|
@@ -353,40 +197,12 @@ export interface CreateDatabaseTokenRequest {
|
|
|
353
197
|
/** The permissions for the token. */
|
|
354
198
|
permissions?: CreateDatabaseTokenRequestPermissions;
|
|
355
199
|
}
|
|
356
|
-
export const CreateDatabaseTokenRequest = /*@__PURE__*/ S.suspend(() =>
|
|
357
|
-
S.Struct({
|
|
358
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
359
|
-
databaseName: S.String.pipe(T.Label()),
|
|
360
|
-
expiration: S.optional(S.String.pipe(T.Query())),
|
|
361
|
-
authorization: S.optional(CreateDatabaseTokenRequestAuthorization.pipe(T.Query())),
|
|
362
|
-
permissions: S.optional(CreateDatabaseTokenRequestPermissions),
|
|
363
|
-
}).pipe(
|
|
364
|
-
T.Http({
|
|
365
|
-
method: "POST",
|
|
366
|
-
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/auth/tokens",
|
|
367
|
-
code: 200,
|
|
368
|
-
}),
|
|
369
|
-
),
|
|
370
|
-
).annotate({
|
|
371
|
-
identifier: "CreateDatabaseTokenRequest",
|
|
372
|
-
}) as any as S.Schema<CreateDatabaseTokenRequest>;
|
|
373
|
-
|
|
374
200
|
export interface CreateDatabaseTokenResponse {
|
|
375
201
|
/** The generated authorization token (JWT). */
|
|
376
202
|
jwt?: Redacted.Redacted<string>;
|
|
377
203
|
}
|
|
378
|
-
export const CreateDatabaseTokenResponse = /*@__PURE__*/ S.suspend(() =>
|
|
379
|
-
S.Struct({
|
|
380
|
-
jwt: S.optional(S.String.pipe(T.SensitiveValue({}))),
|
|
381
|
-
}),
|
|
382
|
-
).annotate({
|
|
383
|
-
identifier: "CreateDatabaseTokenResponse",
|
|
384
|
-
}) as any as S.Schema<CreateDatabaseTokenResponse>;
|
|
385
|
-
|
|
386
204
|
/** Set to `all` to enable all extensions. */
|
|
387
205
|
export type ExtensionsCase0 = "all";
|
|
388
|
-
export const ExtensionsCase0 = S.String;
|
|
389
|
-
|
|
390
206
|
export type ExtensionsCase1Item =
|
|
391
207
|
| "vector"
|
|
392
208
|
| "crypto"
|
|
@@ -398,18 +214,10 @@ export type ExtensionsCase1Item =
|
|
|
398
214
|
| "uuid"
|
|
399
215
|
| "regexp"
|
|
400
216
|
| "vec";
|
|
401
|
-
export const ExtensionsCase1Item = S.String;
|
|
402
|
-
|
|
403
217
|
/** Array of extensions to enable. */
|
|
404
218
|
export type ExtensionsCase1List = Array<ExtensionsCase1Item | (string & {})>;
|
|
405
|
-
export const ExtensionsCase1List = /*@__PURE__*/ S.Array(
|
|
406
|
-
ExtensionsCase1Item,
|
|
407
|
-
) as any as S.Schema<ExtensionsCase1List>;
|
|
408
|
-
|
|
409
219
|
/** The extensions to enable for new databases created in this group. Users looking to enable vector extensions should instead use the native [libSQL vector datatype](/features/ai-and-embeddings). */
|
|
410
220
|
export type Extensions = ExtensionsCase0 | ExtensionsCase1List;
|
|
411
|
-
export const Extensions = S.Unknown as any as S.Schema<Extensions>;
|
|
412
|
-
|
|
413
221
|
export interface CreateGroupRequest {
|
|
414
222
|
/** The slug of the organization or user account. */
|
|
415
223
|
organizationSlug: string;
|
|
@@ -419,60 +227,21 @@ export interface CreateGroupRequest {
|
|
|
419
227
|
location: string;
|
|
420
228
|
extensions?: Extensions;
|
|
421
229
|
}
|
|
422
|
-
export const CreateGroupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
423
|
-
S.Struct({
|
|
424
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
425
|
-
name: S.String,
|
|
426
|
-
location: S.String,
|
|
427
|
-
extensions: S.optional(Extensions),
|
|
428
|
-
}).pipe(
|
|
429
|
-
T.Http({ method: "POST", uri: "/v1/organizations/{organizationSlug}/groups", code: 200 }),
|
|
430
|
-
),
|
|
431
|
-
).annotate({ identifier: "CreateGroupRequest" }) as any as S.Schema<CreateGroupRequest>;
|
|
432
|
-
|
|
433
230
|
export interface CreateGroupResponse {
|
|
434
231
|
/** The newly created group */
|
|
435
232
|
group?: Group;
|
|
436
233
|
}
|
|
437
|
-
export const CreateGroupResponse = /*@__PURE__*/ S.suspend(() =>
|
|
438
|
-
S.Struct({
|
|
439
|
-
group: S.optional(Group),
|
|
440
|
-
}),
|
|
441
|
-
).annotate({ identifier: "CreateGroupResponse" }) as any as S.Schema<CreateGroupResponse>;
|
|
442
|
-
|
|
443
234
|
export type CreateGroupTokenRequestAuthorization = "full-access" | "read-only";
|
|
444
|
-
export const CreateGroupTokenRequestAuthorization = S.String;
|
|
445
|
-
|
|
446
235
|
export type CreateGroupTokenRequestPermissionsReadAttachDatabasesList = Array<string>;
|
|
447
|
-
export const CreateGroupTokenRequestPermissionsReadAttachDatabasesList = /*@__PURE__*/ S.Array(
|
|
448
|
-
S.String,
|
|
449
|
-
) as any as S.Schema<CreateGroupTokenRequestPermissionsReadAttachDatabasesList>;
|
|
450
|
-
|
|
451
236
|
/** Read `ATTACH` permission for the token. */
|
|
452
237
|
export interface CreateGroupTokenRequestPermissionsReadAttach {
|
|
453
238
|
databases?: CreateGroupTokenRequestPermissionsReadAttachDatabasesList;
|
|
454
239
|
}
|
|
455
|
-
export const CreateGroupTokenRequestPermissionsReadAttach = /*@__PURE__*/ S.suspend(() =>
|
|
456
|
-
S.Struct({
|
|
457
|
-
databases: S.optional(CreateGroupTokenRequestPermissionsReadAttachDatabasesList),
|
|
458
|
-
}),
|
|
459
|
-
).annotate({
|
|
460
|
-
identifier: "CreateGroupTokenRequestPermissionsReadAttach",
|
|
461
|
-
}) as any as S.Schema<CreateGroupTokenRequestPermissionsReadAttach>;
|
|
462
|
-
|
|
463
240
|
/** The permissions for the token. */
|
|
464
241
|
export interface CreateGroupTokenRequestPermissions {
|
|
465
242
|
/** Read `ATTACH` permission for the token. */
|
|
466
243
|
read_attach?: CreateGroupTokenRequestPermissionsReadAttach;
|
|
467
244
|
}
|
|
468
|
-
export const CreateGroupTokenRequestPermissions = /*@__PURE__*/ S.suspend(() =>
|
|
469
|
-
S.Struct({
|
|
470
|
-
read_attach: S.optional(CreateGroupTokenRequestPermissionsReadAttach),
|
|
471
|
-
}),
|
|
472
|
-
).annotate({
|
|
473
|
-
identifier: "CreateGroupTokenRequestPermissions",
|
|
474
|
-
}) as any as S.Schema<CreateGroupTokenRequestPermissions>;
|
|
475
|
-
|
|
476
245
|
export interface CreateGroupTokenRequest {
|
|
477
246
|
/** The slug of the organization or user account. */
|
|
478
247
|
organizationSlug: string;
|
|
@@ -485,121 +254,36 @@ export interface CreateGroupTokenRequest {
|
|
|
485
254
|
/** The permissions for the token. */
|
|
486
255
|
permissions?: CreateGroupTokenRequestPermissions;
|
|
487
256
|
}
|
|
488
|
-
export const CreateGroupTokenRequest = /*@__PURE__*/ S.suspend(() =>
|
|
489
|
-
S.Struct({
|
|
490
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
491
|
-
groupName: S.String.pipe(T.Label()),
|
|
492
|
-
expiration: S.optional(S.String.pipe(T.Query())),
|
|
493
|
-
authorization: S.optional(CreateGroupTokenRequestAuthorization.pipe(T.Query())),
|
|
494
|
-
permissions: S.optional(CreateGroupTokenRequestPermissions),
|
|
495
|
-
}).pipe(
|
|
496
|
-
T.Http({
|
|
497
|
-
method: "POST",
|
|
498
|
-
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/auth/tokens",
|
|
499
|
-
code: 200,
|
|
500
|
-
}),
|
|
501
|
-
),
|
|
502
|
-
).annotate({ identifier: "CreateGroupTokenRequest" }) as any as S.Schema<CreateGroupTokenRequest>;
|
|
503
|
-
|
|
504
257
|
export interface CreateGroupTokenResponse {
|
|
505
258
|
/** The generated authorization token (JWT). */
|
|
506
259
|
jwt?: Redacted.Redacted<string>;
|
|
507
260
|
}
|
|
508
|
-
export const CreateGroupTokenResponse = /*@__PURE__*/ S.suspend(() =>
|
|
509
|
-
S.Struct({
|
|
510
|
-
jwt: S.optional(S.String.pipe(T.SensitiveValue({}))),
|
|
511
|
-
}),
|
|
512
|
-
).annotate({ identifier: "CreateGroupTokenResponse" }) as any as S.Schema<CreateGroupTokenResponse>;
|
|
513
|
-
|
|
514
261
|
export interface DeleteDatabaseRequest {
|
|
515
262
|
/** The slug of the organization or user account. */
|
|
516
263
|
organizationSlug: string;
|
|
517
264
|
/** The name of the database. */
|
|
518
265
|
databaseName: string;
|
|
519
266
|
}
|
|
520
|
-
export const DeleteDatabaseRequest = /*@__PURE__*/ S.suspend(() =>
|
|
521
|
-
S.Struct({
|
|
522
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
523
|
-
databaseName: S.String.pipe(T.Label()),
|
|
524
|
-
}).pipe(
|
|
525
|
-
T.Http({
|
|
526
|
-
method: "DELETE",
|
|
527
|
-
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}",
|
|
528
|
-
code: 200,
|
|
529
|
-
}),
|
|
530
|
-
),
|
|
531
|
-
).annotate({ identifier: "DeleteDatabaseRequest" }) as any as S.Schema<DeleteDatabaseRequest>;
|
|
532
|
-
|
|
533
267
|
export interface DeleteDatabaseResponse {
|
|
534
268
|
/** The name of the database that was deleted. */
|
|
535
269
|
database?: string;
|
|
536
270
|
}
|
|
537
|
-
export const DeleteDatabaseResponse = /*@__PURE__*/ S.suspend(() =>
|
|
538
|
-
S.Struct({
|
|
539
|
-
database: S.optional(S.String),
|
|
540
|
-
}),
|
|
541
|
-
).annotate({ identifier: "DeleteDatabaseResponse" }) as any as S.Schema<DeleteDatabaseResponse>;
|
|
542
|
-
|
|
543
271
|
export interface DeleteGroupRequest {
|
|
544
272
|
/** The slug of the organization or user account. */
|
|
545
273
|
organizationSlug: string;
|
|
546
274
|
/** The name of the group. */
|
|
547
275
|
groupName: string;
|
|
548
276
|
}
|
|
549
|
-
export const DeleteGroupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
550
|
-
S.Struct({
|
|
551
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
552
|
-
groupName: S.String.pipe(T.Label()),
|
|
553
|
-
}).pipe(
|
|
554
|
-
T.Http({
|
|
555
|
-
method: "DELETE",
|
|
556
|
-
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}",
|
|
557
|
-
code: 200,
|
|
558
|
-
}),
|
|
559
|
-
),
|
|
560
|
-
).annotate({ identifier: "DeleteGroupRequest" }) as any as S.Schema<DeleteGroupRequest>;
|
|
561
|
-
|
|
562
277
|
export interface DeleteGroupResponse {
|
|
563
278
|
group?: Group;
|
|
564
279
|
}
|
|
565
|
-
export const DeleteGroupResponse = /*@__PURE__*/ S.suspend(() =>
|
|
566
|
-
S.Struct({
|
|
567
|
-
group: S.optional(Group),
|
|
568
|
-
}),
|
|
569
|
-
).annotate({ identifier: "DeleteGroupResponse" }) as any as S.Schema<DeleteGroupResponse>;
|
|
570
|
-
|
|
571
280
|
export interface DeleteOrganizationInviteByEmailV2Request {
|
|
572
281
|
/** The slug of the organization or user account. */
|
|
573
282
|
organizationSlug: string;
|
|
574
283
|
email: string;
|
|
575
284
|
}
|
|
576
|
-
export const DeleteOrganizationInviteByEmailV2Request = /*@__PURE__*/ S.suspend(() =>
|
|
577
|
-
S.Struct({
|
|
578
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
579
|
-
email: S.String.pipe(T.Label()),
|
|
580
|
-
}).pipe(
|
|
581
|
-
T.Http({
|
|
582
|
-
method: "DELETE",
|
|
583
|
-
uri: "/v2/organizations/{organizationSlug}/invites/{email}",
|
|
584
|
-
code: 200,
|
|
585
|
-
}),
|
|
586
|
-
),
|
|
587
|
-
).annotate({
|
|
588
|
-
identifier: "DeleteOrganizationInviteByEmailV2Request",
|
|
589
|
-
}) as any as S.Schema<DeleteOrganizationInviteByEmailV2Request>;
|
|
590
|
-
|
|
591
285
|
export interface DeleteOrganizationInviteByEmailV2Response {}
|
|
592
|
-
export const DeleteOrganizationInviteByEmailV2Response = /*@__PURE__*/ S.suspend(() =>
|
|
593
|
-
S.Struct({}),
|
|
594
|
-
).annotate({
|
|
595
|
-
identifier: "DeleteOrganizationInviteByEmailV2Response",
|
|
596
|
-
}) as any as S.Schema<DeleteOrganizationInviteByEmailV2Response>;
|
|
597
|
-
|
|
598
286
|
export interface GetCurrentUserRequest {}
|
|
599
|
-
export const GetCurrentUserRequest = /*@__PURE__*/ S.suspend(() =>
|
|
600
|
-
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/user", code: 200 })),
|
|
601
|
-
).annotate({ identifier: "GetCurrentUserRequest" }) as any as S.Schema<GetCurrentUserRequest>;
|
|
602
|
-
|
|
603
287
|
export interface GetCurrentUserResponseUser {
|
|
604
288
|
/** The username of the user. */
|
|
605
289
|
username?: string;
|
|
@@ -616,54 +300,17 @@ export interface GetCurrentUserResponseUser {
|
|
|
616
300
|
/** Whether the user has pending organization invites waiting to be accepted or declined. */
|
|
617
301
|
has_pending_invites?: boolean;
|
|
618
302
|
}
|
|
619
|
-
export const GetCurrentUserResponseUser = /*@__PURE__*/ S.suspend(() =>
|
|
620
|
-
S.Struct({
|
|
621
|
-
username: S.optional(S.String),
|
|
622
|
-
name: S.optional(S.String),
|
|
623
|
-
email: S.optional(S.String),
|
|
624
|
-
avatarUrl: S.optional(S.String),
|
|
625
|
-
plan: S.optional(S.String),
|
|
626
|
-
mfa: S.optional(S.Boolean),
|
|
627
|
-
has_pending_invites: S.optional(S.Boolean),
|
|
628
|
-
}),
|
|
629
|
-
).annotate({
|
|
630
|
-
identifier: "GetCurrentUserResponseUser",
|
|
631
|
-
}) as any as S.Schema<GetCurrentUserResponseUser>;
|
|
632
|
-
|
|
633
303
|
export interface GetCurrentUserResponse {
|
|
634
304
|
user?: GetCurrentUserResponseUser;
|
|
635
305
|
}
|
|
636
|
-
export const GetCurrentUserResponse = /*@__PURE__*/ S.suspend(() =>
|
|
637
|
-
S.Struct({
|
|
638
|
-
user: S.optional(GetCurrentUserResponseUser),
|
|
639
|
-
}),
|
|
640
|
-
).annotate({ identifier: "GetCurrentUserResponse" }) as any as S.Schema<GetCurrentUserResponse>;
|
|
641
|
-
|
|
642
306
|
export interface GetDatabaseRequest {
|
|
643
307
|
/** The slug of the organization or user account. */
|
|
644
308
|
organizationSlug: string;
|
|
645
309
|
/** The name of the database. */
|
|
646
310
|
databaseName: string;
|
|
647
311
|
}
|
|
648
|
-
export const GetDatabaseRequest = /*@__PURE__*/ S.suspend(() =>
|
|
649
|
-
S.Struct({
|
|
650
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
651
|
-
databaseName: S.String.pipe(T.Label()),
|
|
652
|
-
}).pipe(
|
|
653
|
-
T.Http({
|
|
654
|
-
method: "GET",
|
|
655
|
-
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}",
|
|
656
|
-
code: 200,
|
|
657
|
-
}),
|
|
658
|
-
),
|
|
659
|
-
).annotate({ identifier: "GetDatabaseRequest" }) as any as S.Schema<GetDatabaseRequest>;
|
|
660
|
-
|
|
661
312
|
/** A list of regions for the group the database belongs to. */
|
|
662
313
|
export type DatabaseRegionsList = Array<string>;
|
|
663
|
-
export const DatabaseRegionsList = /*@__PURE__*/ S.Array(
|
|
664
|
-
S.String,
|
|
665
|
-
) as any as S.Schema<DatabaseRegionsList>;
|
|
666
|
-
|
|
667
314
|
export interface DatabaseParent {
|
|
668
315
|
/** The parent database identifier. */
|
|
669
316
|
id?: string;
|
|
@@ -672,14 +319,6 @@ export interface DatabaseParent {
|
|
|
672
319
|
/** The timestamp when the database was branched from the parent. */
|
|
673
320
|
branched_at?: string;
|
|
674
321
|
}
|
|
675
|
-
export const DatabaseParent = /*@__PURE__*/ S.suspend(() =>
|
|
676
|
-
S.Struct({
|
|
677
|
-
id: S.optional(S.String),
|
|
678
|
-
name: S.optional(S.String),
|
|
679
|
-
branched_at: S.optional(S.String),
|
|
680
|
-
}),
|
|
681
|
-
).annotate({ identifier: "DatabaseParent" }) as any as S.Schema<DatabaseParent>;
|
|
682
|
-
|
|
683
322
|
export interface Database {
|
|
684
323
|
/** The database name, **unique** across your organization. */
|
|
685
324
|
Name?: string;
|
|
@@ -703,64 +342,19 @@ export interface Database {
|
|
|
703
342
|
/** Whether other databases may be attached to this database with `ATTACH`. */
|
|
704
343
|
allow_attach?: boolean;
|
|
705
344
|
}
|
|
706
|
-
export const Database = /*@__PURE__*/ S.suspend(() =>
|
|
707
|
-
S.Struct({
|
|
708
|
-
Name: S.optional(S.String),
|
|
709
|
-
DbId: S.optional(S.String),
|
|
710
|
-
Hostname: S.optional(S.String),
|
|
711
|
-
block_reads: S.optional(S.Boolean),
|
|
712
|
-
block_writes: S.optional(S.Boolean),
|
|
713
|
-
regions: S.optional(DatabaseRegionsList),
|
|
714
|
-
primaryRegion: S.optional(S.String),
|
|
715
|
-
group: S.optional(S.String),
|
|
716
|
-
delete_protection: S.optional(S.Boolean),
|
|
717
|
-
parent: S.optional(S.NullOr(DatabaseParent)),
|
|
718
|
-
allow_attach: S.optional(S.Boolean),
|
|
719
|
-
}),
|
|
720
|
-
).annotate({ identifier: "Database" }) as any as S.Schema<Database>;
|
|
721
|
-
|
|
722
345
|
export interface GetDatabaseResponse {
|
|
723
346
|
database?: Database;
|
|
724
347
|
}
|
|
725
|
-
export const GetDatabaseResponse = /*@__PURE__*/ S.suspend(() =>
|
|
726
|
-
S.Struct({
|
|
727
|
-
database: S.optional(Database),
|
|
728
|
-
}),
|
|
729
|
-
).annotate({ identifier: "GetDatabaseResponse" }) as any as S.Schema<GetDatabaseResponse>;
|
|
730
|
-
|
|
731
348
|
export interface GetDatabaseConfigurationRequest {
|
|
732
349
|
/** The slug of the organization or user account. */
|
|
733
350
|
organizationSlug: string;
|
|
734
351
|
/** The name of the database. */
|
|
735
352
|
databaseName: string;
|
|
736
353
|
}
|
|
737
|
-
export const GetDatabaseConfigurationRequest = /*@__PURE__*/ S.suspend(() =>
|
|
738
|
-
S.Struct({
|
|
739
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
740
|
-
databaseName: S.String.pipe(T.Label()),
|
|
741
|
-
}).pipe(
|
|
742
|
-
T.Http({
|
|
743
|
-
method: "GET",
|
|
744
|
-
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/configuration",
|
|
745
|
-
code: 200,
|
|
746
|
-
}),
|
|
747
|
-
),
|
|
748
|
-
).annotate({
|
|
749
|
-
identifier: "GetDatabaseConfigurationRequest",
|
|
750
|
-
}) as any as S.Schema<GetDatabaseConfigurationRequest>;
|
|
751
|
-
|
|
752
354
|
/** List of allowed IP addresses and CIDR blocks. Empty means no IP restriction. */
|
|
753
355
|
export type DatabaseConfigurationResponseAllowedIpsList = Array<string>;
|
|
754
|
-
export const DatabaseConfigurationResponseAllowedIpsList = /*@__PURE__*/ S.Array(
|
|
755
|
-
S.String,
|
|
756
|
-
) as any as S.Schema<DatabaseConfigurationResponseAllowedIpsList>;
|
|
757
|
-
|
|
758
356
|
/** List of allowed AWS VPC endpoint IDs. Empty means no VPC endpoint restriction. */
|
|
759
357
|
export type DatabaseConfigurationResponseAllowedAwsVpcIdsList = Array<string>;
|
|
760
|
-
export const DatabaseConfigurationResponseAllowedAwsVpcIdsList = /*@__PURE__*/ S.Array(
|
|
761
|
-
S.String,
|
|
762
|
-
) as any as S.Schema<DatabaseConfigurationResponseAllowedAwsVpcIdsList>;
|
|
763
|
-
|
|
764
358
|
export interface DatabaseConfigurationResponse {
|
|
765
359
|
/** The maximum size of the database in bytes. Values with units are also accepted, e.g. 1mb, 256mb, 1gb. */
|
|
766
360
|
size_limit?: string;
|
|
@@ -777,20 +371,6 @@ export interface DatabaseConfigurationResponse {
|
|
|
777
371
|
/** List of allowed AWS VPC endpoint IDs. Empty means no VPC endpoint restriction. */
|
|
778
372
|
allowed_aws_vpc_ids?: DatabaseConfigurationResponseAllowedAwsVpcIdsList;
|
|
779
373
|
}
|
|
780
|
-
export const DatabaseConfigurationResponse = /*@__PURE__*/ S.suspend(() =>
|
|
781
|
-
S.Struct({
|
|
782
|
-
size_limit: S.optional(S.String),
|
|
783
|
-
allow_attach: S.optional(S.Boolean),
|
|
784
|
-
block_reads: S.optional(S.Boolean),
|
|
785
|
-
block_writes: S.optional(S.Boolean),
|
|
786
|
-
delete_protection: S.optional(S.Boolean),
|
|
787
|
-
allowed_ips: S.optional(DatabaseConfigurationResponseAllowedIpsList),
|
|
788
|
-
allowed_aws_vpc_ids: S.optional(DatabaseConfigurationResponseAllowedAwsVpcIdsList),
|
|
789
|
-
}),
|
|
790
|
-
).annotate({
|
|
791
|
-
identifier: "DatabaseConfigurationResponse",
|
|
792
|
-
}) as any as S.Schema<DatabaseConfigurationResponse>;
|
|
793
|
-
|
|
794
374
|
export interface GetDatabaseInstanceRequest {
|
|
795
375
|
/** The slug of the organization or user account. */
|
|
796
376
|
organizationSlug: string;
|
|
@@ -799,26 +379,8 @@ export interface GetDatabaseInstanceRequest {
|
|
|
799
379
|
/** The name of the instance (location code). */
|
|
800
380
|
instanceName: string;
|
|
801
381
|
}
|
|
802
|
-
export const GetDatabaseInstanceRequest = /*@__PURE__*/ S.suspend(() =>
|
|
803
|
-
S.Struct({
|
|
804
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
805
|
-
databaseName: S.String.pipe(T.Label()),
|
|
806
|
-
instanceName: S.String.pipe(T.Label()),
|
|
807
|
-
}).pipe(
|
|
808
|
-
T.Http({
|
|
809
|
-
method: "GET",
|
|
810
|
-
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/instances/{instanceName}",
|
|
811
|
-
code: 200,
|
|
812
|
-
}),
|
|
813
|
-
),
|
|
814
|
-
).annotate({
|
|
815
|
-
identifier: "GetDatabaseInstanceRequest",
|
|
816
|
-
}) as any as S.Schema<GetDatabaseInstanceRequest>;
|
|
817
|
-
|
|
818
382
|
/** The type of database instance this, will be `primary` or `replica`. */
|
|
819
383
|
export type InstanceType = "primary" | "replica";
|
|
820
|
-
export const InstanceType = S.String;
|
|
821
|
-
|
|
822
384
|
export interface Instance {
|
|
823
385
|
/** The instance universal unique identifier (UUID). */
|
|
824
386
|
uuid?: string;
|
|
@@ -831,46 +393,15 @@ export interface Instance {
|
|
|
831
393
|
/** The DNS hostname used for client libSQL and HTTP connections (specific to this instance only). */
|
|
832
394
|
hostname?: string;
|
|
833
395
|
}
|
|
834
|
-
export const Instance = /*@__PURE__*/ S.suspend(() =>
|
|
835
|
-
S.Struct({
|
|
836
|
-
uuid: S.optional(S.String),
|
|
837
|
-
name: S.optional(S.String),
|
|
838
|
-
type: S.optional(InstanceType),
|
|
839
|
-
region: S.optional(S.String),
|
|
840
|
-
hostname: S.optional(S.String),
|
|
841
|
-
}),
|
|
842
|
-
).annotate({ identifier: "Instance" }) as any as S.Schema<Instance>;
|
|
843
|
-
|
|
844
396
|
export interface GetDatabaseInstanceResponse {
|
|
845
397
|
instance?: Instance;
|
|
846
398
|
}
|
|
847
|
-
export const GetDatabaseInstanceResponse = /*@__PURE__*/ S.suspend(() =>
|
|
848
|
-
S.Struct({
|
|
849
|
-
instance: S.optional(Instance),
|
|
850
|
-
}),
|
|
851
|
-
).annotate({
|
|
852
|
-
identifier: "GetDatabaseInstanceResponse",
|
|
853
|
-
}) as any as S.Schema<GetDatabaseInstanceResponse>;
|
|
854
|
-
|
|
855
399
|
export interface GetDatabaseStatsRequest {
|
|
856
400
|
/** The slug of the organization or user account. */
|
|
857
401
|
organizationSlug: string;
|
|
858
402
|
/** The name of the database. */
|
|
859
403
|
databaseName: string;
|
|
860
404
|
}
|
|
861
|
-
export const GetDatabaseStatsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
862
|
-
S.Struct({
|
|
863
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
864
|
-
databaseName: S.String.pipe(T.Label()),
|
|
865
|
-
}).pipe(
|
|
866
|
-
T.Http({
|
|
867
|
-
method: "GET",
|
|
868
|
-
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/stats",
|
|
869
|
-
code: 200,
|
|
870
|
-
}),
|
|
871
|
-
),
|
|
872
|
-
).annotate({ identifier: "GetDatabaseStatsRequest" }) as any as S.Schema<GetDatabaseStatsRequest>;
|
|
873
|
-
|
|
874
405
|
export interface DatabaseStatsOutput {
|
|
875
406
|
/** A string representing the SQL query executed. */
|
|
876
407
|
query?: string;
|
|
@@ -879,30 +410,12 @@ export interface DatabaseStatsOutput {
|
|
|
879
410
|
/** 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. */
|
|
880
411
|
rows_written?: number;
|
|
881
412
|
}
|
|
882
|
-
export const DatabaseStatsOutput = /*@__PURE__*/ S.suspend(() =>
|
|
883
|
-
S.Struct({
|
|
884
|
-
query: S.optional(S.String),
|
|
885
|
-
rows_read: S.optional(S.Number),
|
|
886
|
-
rows_written: S.optional(S.Number),
|
|
887
|
-
}),
|
|
888
|
-
).annotate({ identifier: "DatabaseStatsOutput" }) as any as S.Schema<DatabaseStatsOutput>;
|
|
889
|
-
|
|
890
413
|
/** The top queries performed on the given database as well as the total rows read and written. */
|
|
891
414
|
export type GetDatabaseStatsResponseTopQueriesList = Array<DatabaseStatsOutput>;
|
|
892
|
-
export const GetDatabaseStatsResponseTopQueriesList = /*@__PURE__*/ S.Array(
|
|
893
|
-
DatabaseStatsOutput,
|
|
894
|
-
) as any as S.Schema<GetDatabaseStatsResponseTopQueriesList>;
|
|
895
|
-
|
|
896
415
|
export interface GetDatabaseStatsResponse {
|
|
897
416
|
/** The top queries performed on the given database as well as the total rows read and written. */
|
|
898
417
|
top_queries?: GetDatabaseStatsResponseTopQueriesList | null;
|
|
899
418
|
}
|
|
900
|
-
export const GetDatabaseStatsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
901
|
-
S.Struct({
|
|
902
|
-
top_queries: S.optional(S.NullOr(GetDatabaseStatsResponseTopQueriesList)),
|
|
903
|
-
}),
|
|
904
|
-
).annotate({ identifier: "GetDatabaseStatsResponse" }) as any as S.Schema<GetDatabaseStatsResponse>;
|
|
905
|
-
|
|
906
419
|
export interface GetDatabaseUsageRequest {
|
|
907
420
|
/** The slug of the organization or user account. */
|
|
908
421
|
organizationSlug: string;
|
|
@@ -913,21 +426,6 @@ export interface GetDatabaseUsageRequest {
|
|
|
913
426
|
/** 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` */
|
|
914
427
|
to?: string;
|
|
915
428
|
}
|
|
916
|
-
export const GetDatabaseUsageRequest = /*@__PURE__*/ S.suspend(() =>
|
|
917
|
-
S.Struct({
|
|
918
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
919
|
-
databaseName: S.String.pipe(T.Label()),
|
|
920
|
-
from: S.optional(S.String.pipe(T.Query())),
|
|
921
|
-
to: S.optional(S.String.pipe(T.Query())),
|
|
922
|
-
}).pipe(
|
|
923
|
-
T.Http({
|
|
924
|
-
method: "GET",
|
|
925
|
-
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/usage",
|
|
926
|
-
code: 200,
|
|
927
|
-
}),
|
|
928
|
-
),
|
|
929
|
-
).annotate({ identifier: "GetDatabaseUsageRequest" }) as any as S.Schema<GetDatabaseUsageRequest>;
|
|
930
|
-
|
|
931
429
|
export interface DatabaseUsageObject {
|
|
932
430
|
/** The total rows read in the time period. */
|
|
933
431
|
rows_read?: number;
|
|
@@ -938,36 +436,14 @@ export interface DatabaseUsageObject {
|
|
|
938
436
|
/** The total bytes synced. */
|
|
939
437
|
bytes_synced?: number;
|
|
940
438
|
}
|
|
941
|
-
export const DatabaseUsageObject = /*@__PURE__*/ S.suspend(() =>
|
|
942
|
-
S.Struct({
|
|
943
|
-
rows_read: S.optional(S.Number),
|
|
944
|
-
rows_written: S.optional(S.Number),
|
|
945
|
-
storage_bytes: S.optional(S.Number),
|
|
946
|
-
bytes_synced: S.optional(S.Number),
|
|
947
|
-
}),
|
|
948
|
-
).annotate({ identifier: "DatabaseUsageObject" }) as any as S.Schema<DatabaseUsageObject>;
|
|
949
|
-
|
|
950
439
|
export interface DatabaseUsageOutputInstancesItem {
|
|
951
440
|
/** The instance universal unique identifier (UUID). */
|
|
952
441
|
uuid?: string;
|
|
953
442
|
/** The usage for the current database instance. */
|
|
954
443
|
usage?: DatabaseUsageObject;
|
|
955
444
|
}
|
|
956
|
-
export const DatabaseUsageOutputInstancesItem = /*@__PURE__*/ S.suspend(() =>
|
|
957
|
-
S.Struct({
|
|
958
|
-
uuid: S.optional(S.String),
|
|
959
|
-
usage: S.optional(DatabaseUsageObject),
|
|
960
|
-
}),
|
|
961
|
-
).annotate({
|
|
962
|
-
identifier: "DatabaseUsageOutputInstancesItem",
|
|
963
|
-
}) as any as S.Schema<DatabaseUsageOutputInstancesItem>;
|
|
964
|
-
|
|
965
445
|
/** The usage objects for instances of the current database. */
|
|
966
446
|
export type DatabaseUsageOutputInstancesList = Array<DatabaseUsageOutputInstancesItem>;
|
|
967
|
-
export const DatabaseUsageOutputInstancesList = /*@__PURE__*/ S.Array(
|
|
968
|
-
DatabaseUsageOutputInstancesItem,
|
|
969
|
-
) as any as S.Schema<DatabaseUsageOutputInstancesList>;
|
|
970
|
-
|
|
971
447
|
export interface DatabaseUsageOutput {
|
|
972
448
|
uuid?: string;
|
|
973
449
|
/** The usage objects for instances of the current database. */
|
|
@@ -975,99 +451,35 @@ export interface DatabaseUsageOutput {
|
|
|
975
451
|
/** The total usage for the database. */
|
|
976
452
|
total?: DatabaseUsageObject;
|
|
977
453
|
}
|
|
978
|
-
export const DatabaseUsageOutput = /*@__PURE__*/ S.suspend(() =>
|
|
979
|
-
S.Struct({
|
|
980
|
-
uuid: S.optional(S.String),
|
|
981
|
-
instances: S.optional(DatabaseUsageOutputInstancesList),
|
|
982
|
-
total: S.optional(DatabaseUsageObject),
|
|
983
|
-
}),
|
|
984
|
-
).annotate({ identifier: "DatabaseUsageOutput" }) as any as S.Schema<DatabaseUsageOutput>;
|
|
985
|
-
|
|
986
454
|
export interface GetDatabaseUsageResponse {
|
|
987
455
|
/** 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). */
|
|
988
456
|
database?: DatabaseUsageOutput;
|
|
989
457
|
}
|
|
990
|
-
export const GetDatabaseUsageResponse = /*@__PURE__*/ S.suspend(() =>
|
|
991
|
-
S.Struct({
|
|
992
|
-
database: S.optional(DatabaseUsageOutput),
|
|
993
|
-
}),
|
|
994
|
-
).annotate({ identifier: "GetDatabaseUsageResponse" }) as any as S.Schema<GetDatabaseUsageResponse>;
|
|
995
|
-
|
|
996
458
|
export interface GetGroupRequest {
|
|
997
459
|
/** The slug of the organization or user account. */
|
|
998
460
|
organizationSlug: string;
|
|
999
461
|
/** The name of the group. */
|
|
1000
462
|
groupName: string;
|
|
1001
463
|
}
|
|
1002
|
-
export const GetGroupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1003
|
-
S.Struct({
|
|
1004
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1005
|
-
groupName: S.String.pipe(T.Label()),
|
|
1006
|
-
}).pipe(
|
|
1007
|
-
T.Http({
|
|
1008
|
-
method: "GET",
|
|
1009
|
-
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}",
|
|
1010
|
-
code: 200,
|
|
1011
|
-
}),
|
|
1012
|
-
),
|
|
1013
|
-
).annotate({ identifier: "GetGroupRequest" }) as any as S.Schema<GetGroupRequest>;
|
|
1014
|
-
|
|
1015
464
|
export interface GetGroupResponse {
|
|
1016
465
|
group?: Group;
|
|
1017
466
|
}
|
|
1018
|
-
export const GetGroupResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1019
|
-
S.Struct({
|
|
1020
|
-
group: S.optional(Group),
|
|
1021
|
-
}),
|
|
1022
|
-
).annotate({ identifier: "GetGroupResponse" }) as any as S.Schema<GetGroupResponse>;
|
|
1023
|
-
|
|
1024
467
|
export interface GetGroupConfigurationRequest {
|
|
1025
468
|
/** The slug of the organization or user account. */
|
|
1026
469
|
organizationSlug: string;
|
|
1027
470
|
/** The name of the group. */
|
|
1028
471
|
groupName: string;
|
|
1029
472
|
}
|
|
1030
|
-
export const GetGroupConfigurationRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1031
|
-
S.Struct({
|
|
1032
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1033
|
-
groupName: S.String.pipe(T.Label()),
|
|
1034
|
-
}).pipe(
|
|
1035
|
-
T.Http({
|
|
1036
|
-
method: "GET",
|
|
1037
|
-
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/configuration",
|
|
1038
|
-
code: 200,
|
|
1039
|
-
}),
|
|
1040
|
-
),
|
|
1041
|
-
).annotate({
|
|
1042
|
-
identifier: "GetGroupConfigurationRequest",
|
|
1043
|
-
}) as any as S.Schema<GetGroupConfigurationRequest>;
|
|
1044
|
-
|
|
1045
473
|
export interface GroupConfigurationResponse {
|
|
1046
474
|
/** Prevent the group from being deleted. */
|
|
1047
475
|
delete_protection?: boolean;
|
|
1048
476
|
}
|
|
1049
|
-
export const GroupConfigurationResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1050
|
-
S.Struct({
|
|
1051
|
-
delete_protection: S.optional(S.Boolean),
|
|
1052
|
-
}),
|
|
1053
|
-
).annotate({
|
|
1054
|
-
identifier: "GroupConfigurationResponse",
|
|
1055
|
-
}) as any as S.Schema<GroupConfigurationResponse>;
|
|
1056
|
-
|
|
1057
477
|
export interface GetOrganizationRequest {
|
|
1058
478
|
/** The slug of the organization or user account. */
|
|
1059
479
|
organizationSlug: string;
|
|
1060
480
|
}
|
|
1061
|
-
export const GetOrganizationRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1062
|
-
S.Struct({
|
|
1063
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1064
|
-
}).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}", code: 200 })),
|
|
1065
|
-
).annotate({ identifier: "GetOrganizationRequest" }) as any as S.Schema<GetOrganizationRequest>;
|
|
1066
|
-
|
|
1067
481
|
/** The type of account this organization is. Will always be `personal` or `team`. */
|
|
1068
482
|
export type OrganizationType = "personal" | "team";
|
|
1069
|
-
export const OrganizationType = S.String;
|
|
1070
|
-
|
|
1071
483
|
export interface Organization {
|
|
1072
484
|
/** The organization name. Every user has a `personal` organization for their own account. */
|
|
1073
485
|
name?: string;
|
|
@@ -1092,56 +504,17 @@ export interface Organization {
|
|
|
1092
504
|
/** Whether deleted database and group recovery is enabled for the organization. Returned when retrieving a single organization. */
|
|
1093
505
|
restore_enabled?: boolean;
|
|
1094
506
|
}
|
|
1095
|
-
export const Organization = /*@__PURE__*/ S.suspend(() =>
|
|
1096
|
-
S.Struct({
|
|
1097
|
-
name: S.optional(S.String),
|
|
1098
|
-
slug: S.optional(S.String),
|
|
1099
|
-
type: S.optional(OrganizationType),
|
|
1100
|
-
overages: S.optional(S.Boolean),
|
|
1101
|
-
require_mfa: S.optional(S.Boolean),
|
|
1102
|
-
blocked_reads: S.optional(S.Boolean),
|
|
1103
|
-
blocked_writes: S.optional(S.Boolean),
|
|
1104
|
-
plan_id: S.optional(S.String),
|
|
1105
|
-
plan_timeline: S.optional(S.String),
|
|
1106
|
-
platform: S.optional(S.String),
|
|
1107
|
-
restore_enabled: S.optional(S.Boolean),
|
|
1108
|
-
}),
|
|
1109
|
-
).annotate({ identifier: "Organization" }) as any as S.Schema<Organization>;
|
|
1110
|
-
|
|
1111
507
|
export interface GetOrganizationResponse {
|
|
1112
508
|
organization?: Organization;
|
|
1113
509
|
}
|
|
1114
|
-
export const GetOrganizationResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1115
|
-
S.Struct({
|
|
1116
|
-
organization: S.optional(Organization),
|
|
1117
|
-
}),
|
|
1118
|
-
).annotate({ identifier: "GetOrganizationResponse" }) as any as S.Schema<GetOrganizationResponse>;
|
|
1119
|
-
|
|
1120
510
|
export interface GetOrganizationMemberRequest {
|
|
1121
511
|
/** The slug of the organization or user account. */
|
|
1122
512
|
organizationSlug: string;
|
|
1123
513
|
/** The username of a Turso user or organization member. */
|
|
1124
514
|
username: string;
|
|
1125
515
|
}
|
|
1126
|
-
export const GetOrganizationMemberRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1127
|
-
S.Struct({
|
|
1128
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1129
|
-
username: S.String.pipe(T.Label()),
|
|
1130
|
-
}).pipe(
|
|
1131
|
-
T.Http({
|
|
1132
|
-
method: "GET",
|
|
1133
|
-
uri: "/v1/organizations/{organizationSlug}/members/{username}",
|
|
1134
|
-
code: 200,
|
|
1135
|
-
}),
|
|
1136
|
-
),
|
|
1137
|
-
).annotate({
|
|
1138
|
-
identifier: "GetOrganizationMemberRequest",
|
|
1139
|
-
}) as any as S.Schema<GetOrganizationMemberRequest>;
|
|
1140
|
-
|
|
1141
516
|
/** The role assigned to the member. */
|
|
1142
517
|
export type MemberRole = "owner" | "admin" | "member" | "viewer";
|
|
1143
|
-
export const MemberRole = S.String;
|
|
1144
|
-
|
|
1145
518
|
export interface Member {
|
|
1146
519
|
/** The username for the member. */
|
|
1147
520
|
username?: string;
|
|
@@ -1150,39 +523,13 @@ export interface Member {
|
|
|
1150
523
|
/** The email for the member. */
|
|
1151
524
|
email?: string;
|
|
1152
525
|
}
|
|
1153
|
-
export const Member = /*@__PURE__*/ S.suspend(() =>
|
|
1154
|
-
S.Struct({
|
|
1155
|
-
username: S.optional(S.String),
|
|
1156
|
-
role: S.optional(MemberRole),
|
|
1157
|
-
email: S.optional(S.String),
|
|
1158
|
-
}),
|
|
1159
|
-
).annotate({ identifier: "Member" }) as any as S.Schema<Member>;
|
|
1160
|
-
|
|
1161
526
|
export interface GetOrganizationMemberResponse {
|
|
1162
527
|
member?: Member;
|
|
1163
528
|
}
|
|
1164
|
-
export const GetOrganizationMemberResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1165
|
-
S.Struct({
|
|
1166
|
-
member: S.optional(Member),
|
|
1167
|
-
}),
|
|
1168
|
-
).annotate({
|
|
1169
|
-
identifier: "GetOrganizationMemberResponse",
|
|
1170
|
-
}) as any as S.Schema<GetOrganizationMemberResponse>;
|
|
1171
|
-
|
|
1172
529
|
export interface GetOrganizationSubscriptionRequest {
|
|
1173
530
|
/** The slug of the organization or user account. */
|
|
1174
531
|
organizationSlug: string;
|
|
1175
532
|
}
|
|
1176
|
-
export const GetOrganizationSubscriptionRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1177
|
-
S.Struct({
|
|
1178
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1179
|
-
}).pipe(
|
|
1180
|
-
T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/subscription", code: 200 }),
|
|
1181
|
-
),
|
|
1182
|
-
).annotate({
|
|
1183
|
-
identifier: "GetOrganizationSubscriptionRequest",
|
|
1184
|
-
}) as any as S.Schema<GetOrganizationSubscriptionRequest>;
|
|
1185
|
-
|
|
1186
533
|
export interface GetOrganizationSubscriptionResponseSubscription {
|
|
1187
534
|
/** The name of the plan for the current subscription. */
|
|
1188
535
|
name?: string;
|
|
@@ -1193,40 +540,13 @@ export interface GetOrganizationSubscriptionResponseSubscription {
|
|
|
1193
540
|
/** Whether the plan is billed monthly or yearly. */
|
|
1194
541
|
timeline?: string;
|
|
1195
542
|
}
|
|
1196
|
-
export const GetOrganizationSubscriptionResponseSubscription = /*@__PURE__*/ S.suspend(() =>
|
|
1197
|
-
S.Struct({
|
|
1198
|
-
name: S.optional(S.String),
|
|
1199
|
-
overages: S.optional(S.Boolean),
|
|
1200
|
-
plan: S.optional(S.String),
|
|
1201
|
-
timeline: S.optional(S.String),
|
|
1202
|
-
}),
|
|
1203
|
-
).annotate({
|
|
1204
|
-
identifier: "GetOrganizationSubscriptionResponseSubscription",
|
|
1205
|
-
}) as any as S.Schema<GetOrganizationSubscriptionResponseSubscription>;
|
|
1206
|
-
|
|
1207
543
|
export interface GetOrganizationSubscriptionResponse {
|
|
1208
544
|
subscription?: GetOrganizationSubscriptionResponseSubscription;
|
|
1209
545
|
}
|
|
1210
|
-
export const GetOrganizationSubscriptionResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1211
|
-
S.Struct({
|
|
1212
|
-
subscription: S.optional(GetOrganizationSubscriptionResponseSubscription),
|
|
1213
|
-
}),
|
|
1214
|
-
).annotate({
|
|
1215
|
-
identifier: "GetOrganizationSubscriptionResponse",
|
|
1216
|
-
}) as any as S.Schema<GetOrganizationSubscriptionResponse>;
|
|
1217
|
-
|
|
1218
546
|
export interface GetOrganizationUsageRequest {
|
|
1219
547
|
/** The slug of the organization or user account. */
|
|
1220
548
|
organizationSlug: string;
|
|
1221
549
|
}
|
|
1222
|
-
export const GetOrganizationUsageRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1223
|
-
S.Struct({
|
|
1224
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1225
|
-
}).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/usage", code: 200 })),
|
|
1226
|
-
).annotate({
|
|
1227
|
-
identifier: "GetOrganizationUsageRequest",
|
|
1228
|
-
}) as any as S.Schema<GetOrganizationUsageRequest>;
|
|
1229
|
-
|
|
1230
550
|
/** The usage object for the organization. */
|
|
1231
551
|
export interface GetOrganizationUsageResponseOrganizationUsage {
|
|
1232
552
|
/** The number of rows read allowed for the specific plan. */
|
|
@@ -1244,26 +564,8 @@ export interface GetOrganizationUsageResponseOrganizationUsage {
|
|
|
1244
564
|
/** The number of bytes synced allowed for the specific plan, in bytes. */
|
|
1245
565
|
bytes_synced?: number;
|
|
1246
566
|
}
|
|
1247
|
-
export const GetOrganizationUsageResponseOrganizationUsage = /*@__PURE__*/ S.suspend(() =>
|
|
1248
|
-
S.Struct({
|
|
1249
|
-
rows_read: S.optional(S.Number),
|
|
1250
|
-
rows_written: S.optional(S.Number),
|
|
1251
|
-
databases: S.optional(S.Number),
|
|
1252
|
-
locations: S.optional(S.Number),
|
|
1253
|
-
storage_bytes: S.optional(S.Number),
|
|
1254
|
-
groups: S.optional(S.Number),
|
|
1255
|
-
bytes_synced: S.optional(S.Number),
|
|
1256
|
-
}),
|
|
1257
|
-
).annotate({
|
|
1258
|
-
identifier: "GetOrganizationUsageResponseOrganizationUsage",
|
|
1259
|
-
}) as any as S.Schema<GetOrganizationUsageResponseOrganizationUsage>;
|
|
1260
|
-
|
|
1261
567
|
/** The databases for the organization and their usage. */
|
|
1262
568
|
export type GetOrganizationUsageResponseOrganizationDatabasesList = Array<DatabaseUsageOutput>;
|
|
1263
|
-
export const GetOrganizationUsageResponseOrganizationDatabasesList = /*@__PURE__*/ S.Array(
|
|
1264
|
-
DatabaseUsageOutput,
|
|
1265
|
-
) as any as S.Schema<GetOrganizationUsageResponseOrganizationDatabasesList>;
|
|
1266
|
-
|
|
1267
569
|
/** The organization usage object, containing the total usage for rows read and written, as well as the total storage size (in bytes). */
|
|
1268
570
|
export interface GetOrganizationUsageResponseOrganization {
|
|
1269
571
|
/** The UUID of the organization. */
|
|
@@ -1273,86 +575,26 @@ export interface GetOrganizationUsageResponseOrganization {
|
|
|
1273
575
|
/** The databases for the organization and their usage. */
|
|
1274
576
|
databases?: GetOrganizationUsageResponseOrganizationDatabasesList;
|
|
1275
577
|
}
|
|
1276
|
-
export const GetOrganizationUsageResponseOrganization = /*@__PURE__*/ S.suspend(() =>
|
|
1277
|
-
S.Struct({
|
|
1278
|
-
uuid: S.optional(S.String),
|
|
1279
|
-
usage: S.optional(GetOrganizationUsageResponseOrganizationUsage),
|
|
1280
|
-
databases: S.optional(GetOrganizationUsageResponseOrganizationDatabasesList),
|
|
1281
|
-
}),
|
|
1282
|
-
).annotate({
|
|
1283
|
-
identifier: "GetOrganizationUsageResponseOrganization",
|
|
1284
|
-
}) as any as S.Schema<GetOrganizationUsageResponseOrganization>;
|
|
1285
|
-
|
|
1286
578
|
export interface GetOrganizationUsageResponse {
|
|
1287
579
|
/** The organization usage object, containing the total usage for rows read and written, as well as the total storage size (in bytes). */
|
|
1288
580
|
organization?: GetOrganizationUsageResponseOrganization;
|
|
1289
581
|
}
|
|
1290
|
-
export const GetOrganizationUsageResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1291
|
-
S.Struct({
|
|
1292
|
-
organization: S.optional(GetOrganizationUsageResponseOrganization),
|
|
1293
|
-
}),
|
|
1294
|
-
).annotate({
|
|
1295
|
-
identifier: "GetOrganizationUsageResponse",
|
|
1296
|
-
}) as any as S.Schema<GetOrganizationUsageResponse>;
|
|
1297
|
-
|
|
1298
582
|
export interface InvalidateDatabaseTokensRequest {
|
|
1299
583
|
/** The slug of the organization or user account. */
|
|
1300
584
|
organizationSlug: string;
|
|
1301
585
|
/** The name of the database. */
|
|
1302
586
|
databaseName: string;
|
|
1303
587
|
}
|
|
1304
|
-
export const InvalidateDatabaseTokensRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1305
|
-
S.Struct({
|
|
1306
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1307
|
-
databaseName: S.String.pipe(T.Label()),
|
|
1308
|
-
}).pipe(
|
|
1309
|
-
T.Http({
|
|
1310
|
-
method: "POST",
|
|
1311
|
-
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/auth/rotate",
|
|
1312
|
-
code: 200,
|
|
1313
|
-
}),
|
|
1314
|
-
),
|
|
1315
|
-
).annotate({
|
|
1316
|
-
identifier: "InvalidateDatabaseTokensRequest",
|
|
1317
|
-
}) as any as S.Schema<InvalidateDatabaseTokensRequest>;
|
|
1318
|
-
|
|
1319
588
|
export interface InvalidateDatabaseTokensResponse {}
|
|
1320
|
-
export const InvalidateDatabaseTokensResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1321
|
-
S.Struct({}),
|
|
1322
|
-
).annotate({
|
|
1323
|
-
identifier: "InvalidateDatabaseTokensResponse",
|
|
1324
|
-
}) as any as S.Schema<InvalidateDatabaseTokensResponse>;
|
|
1325
|
-
|
|
1326
589
|
export interface InvalidateGroupTokensRequest {
|
|
1327
590
|
/** The slug of the organization or user account. */
|
|
1328
591
|
organizationSlug: string;
|
|
1329
592
|
/** The name of the group. */
|
|
1330
593
|
groupName: string;
|
|
1331
594
|
}
|
|
1332
|
-
export const InvalidateGroupTokensRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1333
|
-
S.Struct({
|
|
1334
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1335
|
-
groupName: S.String.pipe(T.Label()),
|
|
1336
|
-
}).pipe(
|
|
1337
|
-
T.Http({
|
|
1338
|
-
method: "POST",
|
|
1339
|
-
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/auth/rotate",
|
|
1340
|
-
code: 200,
|
|
1341
|
-
}),
|
|
1342
|
-
),
|
|
1343
|
-
).annotate({
|
|
1344
|
-
identifier: "InvalidateGroupTokensRequest",
|
|
1345
|
-
}) as any as S.Schema<InvalidateGroupTokensRequest>;
|
|
1346
|
-
|
|
1347
595
|
export interface InvalidateGroupTokensResponse {}
|
|
1348
|
-
export const InvalidateGroupTokensResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
1349
|
-
identifier: "InvalidateGroupTokensResponse",
|
|
1350
|
-
}) as any as S.Schema<InvalidateGroupTokensResponse>;
|
|
1351
|
-
|
|
1352
596
|
/** The role given to the user. */
|
|
1353
597
|
export type InviteOrganizationMemberV2RequestRole = "admin" | "member" | "viewer";
|
|
1354
|
-
export const InviteOrganizationMemberV2RequestRole = S.String;
|
|
1355
|
-
|
|
1356
598
|
export interface InviteOrganizationMemberV2Request {
|
|
1357
599
|
/** The slug of the organization or user account. */
|
|
1358
600
|
organizationSlug: string;
|
|
@@ -1363,23 +605,8 @@ export interface InviteOrganizationMemberV2Request {
|
|
|
1363
605
|
/** The role given to the user. */
|
|
1364
606
|
role?: InviteOrganizationMemberV2RequestRole | (string & {});
|
|
1365
607
|
}
|
|
1366
|
-
export const InviteOrganizationMemberV2Request = /*@__PURE__*/ S.suspend(() =>
|
|
1367
|
-
S.Struct({
|
|
1368
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1369
|
-
email: S.optional(S.String),
|
|
1370
|
-
username: S.optional(S.String),
|
|
1371
|
-
role: S.optional(InviteOrganizationMemberV2RequestRole),
|
|
1372
|
-
}).pipe(
|
|
1373
|
-
T.Http({ method: "POST", uri: "/v2/organizations/{organizationSlug}/invites", code: 200 }),
|
|
1374
|
-
),
|
|
1375
|
-
).annotate({
|
|
1376
|
-
identifier: "InviteOrganizationMemberV2Request",
|
|
1377
|
-
}) as any as S.Schema<InviteOrganizationMemberV2Request>;
|
|
1378
|
-
|
|
1379
608
|
/** The assigned role for the invited user. */
|
|
1380
609
|
export type InviteCreatedV2Role = "admin" | "member" | "viewer";
|
|
1381
|
-
export const InviteCreatedV2Role = S.String;
|
|
1382
|
-
|
|
1383
610
|
export interface InviteCreatedV2 {
|
|
1384
611
|
/** The email of the person invited. */
|
|
1385
612
|
email?: string;
|
|
@@ -1388,36 +615,12 @@ export interface InviteCreatedV2 {
|
|
|
1388
615
|
/** The name of the organization the user was invited to. */
|
|
1389
616
|
organization?: string;
|
|
1390
617
|
}
|
|
1391
|
-
export const InviteCreatedV2 = /*@__PURE__*/ S.suspend(() =>
|
|
1392
|
-
S.Struct({
|
|
1393
|
-
email: S.optional(S.String),
|
|
1394
|
-
role: S.optional(InviteCreatedV2Role),
|
|
1395
|
-
organization: S.optional(S.String),
|
|
1396
|
-
}),
|
|
1397
|
-
).annotate({ identifier: "InviteCreatedV2" }) as any as S.Schema<InviteCreatedV2>;
|
|
1398
|
-
|
|
1399
618
|
export interface InviteOrganizationMemberV2Response {
|
|
1400
619
|
invited?: InviteCreatedV2;
|
|
1401
620
|
}
|
|
1402
|
-
export const InviteOrganizationMemberV2Response = /*@__PURE__*/ S.suspend(() =>
|
|
1403
|
-
S.Struct({
|
|
1404
|
-
invited: S.optional(InviteCreatedV2),
|
|
1405
|
-
}),
|
|
1406
|
-
).annotate({
|
|
1407
|
-
identifier: "InviteOrganizationMemberV2Response",
|
|
1408
|
-
}) as any as S.Schema<InviteOrganizationMemberV2Response>;
|
|
1409
|
-
|
|
1410
621
|
export interface ListAPITokensRequest {}
|
|
1411
|
-
export const ListAPITokensRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1412
|
-
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/auth/api-tokens", code: 200 })),
|
|
1413
|
-
).annotate({ identifier: "ListAPITokensRequest" }) as any as S.Schema<ListAPITokensRequest>;
|
|
1414
|
-
|
|
1415
622
|
/** 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. */
|
|
1416
623
|
export type APITokenScopesList = Array<string>;
|
|
1417
|
-
export const APITokenScopesList = /*@__PURE__*/ S.Array(
|
|
1418
|
-
S.String,
|
|
1419
|
-
) as any as S.Schema<APITokenScopesList>;
|
|
1420
|
-
|
|
1421
624
|
export interface APIToken {
|
|
1422
625
|
/** The name given to the API Token. */
|
|
1423
626
|
name?: string;
|
|
@@ -1432,68 +635,20 @@ export interface APIToken {
|
|
|
1432
635
|
/** The date the token was created, in `YYYY-MM-DD` format. */
|
|
1433
636
|
created_at?: string;
|
|
1434
637
|
}
|
|
1435
|
-
export const APIToken = /*@__PURE__*/ S.suspend(() =>
|
|
1436
|
-
S.Struct({
|
|
1437
|
-
name: S.optional(S.String),
|
|
1438
|
-
id: S.optional(S.String),
|
|
1439
|
-
organization: S.optional(S.String),
|
|
1440
|
-
group: S.optional(S.String),
|
|
1441
|
-
scopes: S.optional(APITokenScopesList),
|
|
1442
|
-
created_at: S.optional(S.String),
|
|
1443
|
-
}),
|
|
1444
|
-
).annotate({ identifier: "APIToken" }) as any as S.Schema<APIToken>;
|
|
1445
|
-
|
|
1446
638
|
export type ListAPITokensResponseTokensList = Array<APIToken>;
|
|
1447
|
-
export const ListAPITokensResponseTokensList = /*@__PURE__*/ S.Array(
|
|
1448
|
-
APIToken,
|
|
1449
|
-
) as any as S.Schema<ListAPITokensResponseTokensList>;
|
|
1450
|
-
|
|
1451
639
|
export interface ListAPITokensResponse {
|
|
1452
640
|
tokens?: ListAPITokensResponseTokensList;
|
|
1453
641
|
}
|
|
1454
|
-
export const ListAPITokensResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1455
|
-
S.Struct({
|
|
1456
|
-
tokens: S.optional(ListAPITokensResponseTokensList),
|
|
1457
|
-
}),
|
|
1458
|
-
).annotate({ identifier: "ListAPITokensResponse" }) as any as S.Schema<ListAPITokensResponse>;
|
|
1459
|
-
|
|
1460
642
|
export interface ListDatabaseInstancesRequest {
|
|
1461
643
|
/** The slug of the organization or user account. */
|
|
1462
644
|
organizationSlug: string;
|
|
1463
645
|
/** The name of the database. */
|
|
1464
646
|
databaseName: string;
|
|
1465
647
|
}
|
|
1466
|
-
export const ListDatabaseInstancesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1467
|
-
S.Struct({
|
|
1468
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1469
|
-
databaseName: S.String.pipe(T.Label()),
|
|
1470
|
-
}).pipe(
|
|
1471
|
-
T.Http({
|
|
1472
|
-
method: "GET",
|
|
1473
|
-
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/instances",
|
|
1474
|
-
code: 200,
|
|
1475
|
-
}),
|
|
1476
|
-
),
|
|
1477
|
-
).annotate({
|
|
1478
|
-
identifier: "ListDatabaseInstancesRequest",
|
|
1479
|
-
}) as any as S.Schema<ListDatabaseInstancesRequest>;
|
|
1480
|
-
|
|
1481
648
|
export type ListDatabaseInstancesResponseInstancesList = Array<Instance>;
|
|
1482
|
-
export const ListDatabaseInstancesResponseInstancesList = /*@__PURE__*/ S.Array(
|
|
1483
|
-
Instance,
|
|
1484
|
-
) as any as S.Schema<ListDatabaseInstancesResponseInstancesList>;
|
|
1485
|
-
|
|
1486
649
|
export interface ListDatabaseInstancesResponse {
|
|
1487
650
|
instances?: ListDatabaseInstancesResponseInstancesList;
|
|
1488
651
|
}
|
|
1489
|
-
export const ListDatabaseInstancesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1490
|
-
S.Struct({
|
|
1491
|
-
instances: S.optional(ListDatabaseInstancesResponseInstancesList),
|
|
1492
|
-
}),
|
|
1493
|
-
).annotate({
|
|
1494
|
-
identifier: "ListDatabaseInstancesResponse",
|
|
1495
|
-
}) as any as S.Schema<ListDatabaseInstancesResponse>;
|
|
1496
|
-
|
|
1497
652
|
export interface ListDatabasesRequest {
|
|
1498
653
|
/** The slug of the organization or user account. */
|
|
1499
654
|
organizationSlug: string;
|
|
@@ -1504,31 +659,10 @@ export interface ListDatabasesRequest {
|
|
|
1504
659
|
/** Filter database branches by using their parent database ID. */
|
|
1505
660
|
parent?: string;
|
|
1506
661
|
}
|
|
1507
|
-
export const ListDatabasesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1508
|
-
S.Struct({
|
|
1509
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1510
|
-
group: S.optional(S.String.pipe(T.Query())),
|
|
1511
|
-
schema: S.optional(S.String.pipe(T.Query())),
|
|
1512
|
-
parent: S.optional(S.String.pipe(T.Query())),
|
|
1513
|
-
}).pipe(
|
|
1514
|
-
T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/databases", code: 200 }),
|
|
1515
|
-
),
|
|
1516
|
-
).annotate({ identifier: "ListDatabasesRequest" }) as any as S.Schema<ListDatabasesRequest>;
|
|
1517
|
-
|
|
1518
662
|
export type ListDatabasesResponseDatabasesList = Array<Database>;
|
|
1519
|
-
export const ListDatabasesResponseDatabasesList = /*@__PURE__*/ S.Array(
|
|
1520
|
-
Database,
|
|
1521
|
-
) as any as S.Schema<ListDatabasesResponseDatabasesList>;
|
|
1522
|
-
|
|
1523
663
|
export interface ListDatabasesResponse {
|
|
1524
664
|
databases?: ListDatabasesResponseDatabasesList;
|
|
1525
665
|
}
|
|
1526
|
-
export const ListDatabasesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1527
|
-
S.Struct({
|
|
1528
|
-
databases: S.optional(ListDatabasesResponseDatabasesList),
|
|
1529
|
-
}),
|
|
1530
|
-
).annotate({ identifier: "ListDatabasesResponse" }) as any as S.Schema<ListDatabasesResponse>;
|
|
1531
|
-
|
|
1532
666
|
export interface ListDeletedDatabasesRequest {
|
|
1533
667
|
/** The UUID of the organization. Retrieve it with the Retrieve Organization endpoint (the `id` field). */
|
|
1534
668
|
organizationId: string;
|
|
@@ -1541,26 +675,8 @@ export interface ListDeletedDatabasesRequest {
|
|
|
1541
675
|
/** Opaque pagination cursor from the previous page's `pagination.next`. */
|
|
1542
676
|
cursor?: string;
|
|
1543
677
|
}
|
|
1544
|
-
export const ListDeletedDatabasesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1545
|
-
S.Struct({
|
|
1546
|
-
organizationId: S.String.pipe(T.Label()),
|
|
1547
|
-
deleted: S.Boolean.pipe(T.Query()),
|
|
1548
|
-
search: S.optional(S.String.pipe(T.Query())),
|
|
1549
|
-
limit: S.optional(S.Number.pipe(T.Query())),
|
|
1550
|
-
cursor: S.optional(S.String.pipe(T.Query())),
|
|
1551
|
-
}).pipe(
|
|
1552
|
-
T.Http({ method: "GET", uri: "/v3/organizations/{organizationId}/databases", code: 200 }),
|
|
1553
|
-
),
|
|
1554
|
-
).annotate({
|
|
1555
|
-
identifier: "ListDeletedDatabasesRequest",
|
|
1556
|
-
}) as any as S.Schema<ListDeletedDatabasesRequest>;
|
|
1557
|
-
|
|
1558
678
|
/** The regions the database was located in. */
|
|
1559
679
|
export type DeletedDatabaseRegionsList = Array<string>;
|
|
1560
|
-
export const DeletedDatabaseRegionsList = /*@__PURE__*/ S.Array(
|
|
1561
|
-
S.String,
|
|
1562
|
-
) as any as S.Schema<DeletedDatabaseRegionsList>;
|
|
1563
|
-
|
|
1564
680
|
export interface DeletedDatabase {
|
|
1565
681
|
/** The database name. */
|
|
1566
682
|
Name?: string;
|
|
@@ -1585,50 +701,15 @@ export interface DeletedDatabase {
|
|
|
1585
701
|
/** Set when the database's group was deleted with it. Restoring the database also restores the group. */
|
|
1586
702
|
group_deleted_at?: string;
|
|
1587
703
|
}
|
|
1588
|
-
export const DeletedDatabase = /*@__PURE__*/ S.suspend(() =>
|
|
1589
|
-
S.Struct({
|
|
1590
|
-
Name: S.optional(S.String),
|
|
1591
|
-
DbId: S.optional(S.String),
|
|
1592
|
-
Hostname: S.optional(S.String),
|
|
1593
|
-
group: S.optional(S.String),
|
|
1594
|
-
group_id: S.optional(S.String),
|
|
1595
|
-
organization_id: S.optional(S.String),
|
|
1596
|
-
regions: S.optional(DeletedDatabaseRegionsList),
|
|
1597
|
-
primaryRegion: S.optional(S.String),
|
|
1598
|
-
delete_protection: S.optional(S.Boolean),
|
|
1599
|
-
deleted_at: S.optional(S.String),
|
|
1600
|
-
group_deleted_at: S.optional(S.String),
|
|
1601
|
-
}),
|
|
1602
|
-
).annotate({ identifier: "DeletedDatabase" }) as any as S.Schema<DeletedDatabase>;
|
|
1603
|
-
|
|
1604
704
|
export type ListDeletedDatabasesResponseDatabasesList = Array<DeletedDatabase>;
|
|
1605
|
-
export const ListDeletedDatabasesResponseDatabasesList = /*@__PURE__*/ S.Array(
|
|
1606
|
-
DeletedDatabase,
|
|
1607
|
-
) as any as S.Schema<ListDeletedDatabasesResponseDatabasesList>;
|
|
1608
|
-
|
|
1609
705
|
export interface Pagination {
|
|
1610
706
|
/** Opaque cursor for the next page. Pass it back as the `cursor` query parameter. Absent on the last page. */
|
|
1611
707
|
next?: string;
|
|
1612
708
|
}
|
|
1613
|
-
export const Pagination = /*@__PURE__*/ S.suspend(() =>
|
|
1614
|
-
S.Struct({
|
|
1615
|
-
next: S.optional(S.String),
|
|
1616
|
-
}),
|
|
1617
|
-
).annotate({ identifier: "Pagination" }) as any as S.Schema<Pagination>;
|
|
1618
|
-
|
|
1619
709
|
export interface ListDeletedDatabasesResponse {
|
|
1620
710
|
databases?: ListDeletedDatabasesResponseDatabasesList;
|
|
1621
711
|
pagination?: Pagination;
|
|
1622
712
|
}
|
|
1623
|
-
export const ListDeletedDatabasesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1624
|
-
S.Struct({
|
|
1625
|
-
databases: S.optional(ListDeletedDatabasesResponseDatabasesList),
|
|
1626
|
-
pagination: S.optional(Pagination),
|
|
1627
|
-
}),
|
|
1628
|
-
).annotate({
|
|
1629
|
-
identifier: "ListDeletedDatabasesResponse",
|
|
1630
|
-
}) as any as S.Schema<ListDeletedDatabasesResponse>;
|
|
1631
|
-
|
|
1632
713
|
export interface ListDeletedGroupsRequest {
|
|
1633
714
|
/** The UUID of the organization. Retrieve it with the Retrieve Organization endpoint (the `id` field). */
|
|
1634
715
|
organizationId: string;
|
|
@@ -1637,16 +718,6 @@ export interface ListDeletedGroupsRequest {
|
|
|
1637
718
|
/** Opaque pagination cursor from the previous page's `pagination.next`. */
|
|
1638
719
|
cursor?: string;
|
|
1639
720
|
}
|
|
1640
|
-
export const ListDeletedGroupsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1641
|
-
S.Struct({
|
|
1642
|
-
organizationId: S.String.pipe(T.Label()),
|
|
1643
|
-
limit: S.optional(S.Number.pipe(T.Query())),
|
|
1644
|
-
cursor: S.optional(S.String.pipe(T.Query())),
|
|
1645
|
-
}).pipe(
|
|
1646
|
-
T.Http({ method: "GET", uri: "/v3/organizations/{organizationId}/deleted-groups", code: 200 }),
|
|
1647
|
-
),
|
|
1648
|
-
).annotate({ identifier: "ListDeletedGroupsRequest" }) as any as S.Schema<ListDeletedGroupsRequest>;
|
|
1649
|
-
|
|
1650
721
|
export interface DeletedGroup {
|
|
1651
722
|
/** The group UUID. Use it to restore the group. */
|
|
1652
723
|
uuid?: string;
|
|
@@ -1657,113 +728,37 @@ export interface DeletedGroup {
|
|
|
1657
728
|
/** The number of member databases that restoring the group would bring back with it. */
|
|
1658
729
|
cascade_databases?: number;
|
|
1659
730
|
}
|
|
1660
|
-
export const DeletedGroup = /*@__PURE__*/ S.suspend(() =>
|
|
1661
|
-
S.Struct({
|
|
1662
|
-
uuid: S.optional(S.String),
|
|
1663
|
-
name: S.optional(S.String),
|
|
1664
|
-
deleted_at: S.optional(S.String),
|
|
1665
|
-
cascade_databases: S.optional(S.Number),
|
|
1666
|
-
}),
|
|
1667
|
-
).annotate({ identifier: "DeletedGroup" }) as any as S.Schema<DeletedGroup>;
|
|
1668
|
-
|
|
1669
731
|
export type ListDeletedGroupsResponseGroupsList = Array<DeletedGroup>;
|
|
1670
|
-
export const ListDeletedGroupsResponseGroupsList = /*@__PURE__*/ S.Array(
|
|
1671
|
-
DeletedGroup,
|
|
1672
|
-
) as any as S.Schema<ListDeletedGroupsResponseGroupsList>;
|
|
1673
|
-
|
|
1674
732
|
export interface ListDeletedGroupsResponse {
|
|
1675
733
|
groups?: ListDeletedGroupsResponseGroupsList;
|
|
1676
734
|
pagination?: Pagination;
|
|
1677
735
|
}
|
|
1678
|
-
export const ListDeletedGroupsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1679
|
-
S.Struct({
|
|
1680
|
-
groups: S.optional(ListDeletedGroupsResponseGroupsList),
|
|
1681
|
-
pagination: S.optional(Pagination),
|
|
1682
|
-
}),
|
|
1683
|
-
).annotate({
|
|
1684
|
-
identifier: "ListDeletedGroupsResponse",
|
|
1685
|
-
}) as any as S.Schema<ListDeletedGroupsResponse>;
|
|
1686
|
-
|
|
1687
736
|
export interface ListGroupsRequest {
|
|
1688
737
|
/** The slug of the organization or user account. */
|
|
1689
738
|
organizationSlug: string;
|
|
1690
739
|
}
|
|
1691
|
-
export const ListGroupsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1692
|
-
S.Struct({
|
|
1693
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1694
|
-
}).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/groups", code: 200 })),
|
|
1695
|
-
).annotate({ identifier: "ListGroupsRequest" }) as any as S.Schema<ListGroupsRequest>;
|
|
1696
|
-
|
|
1697
740
|
export type ListGroupsResponseGroupsList = Array<Group>;
|
|
1698
|
-
export const ListGroupsResponseGroupsList = /*@__PURE__*/ S.Array(
|
|
1699
|
-
Group,
|
|
1700
|
-
) as any as S.Schema<ListGroupsResponseGroupsList>;
|
|
1701
|
-
|
|
1702
741
|
export interface ListGroupsResponse {
|
|
1703
742
|
groups?: ListGroupsResponseGroupsList;
|
|
1704
743
|
}
|
|
1705
|
-
export const ListGroupsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1706
|
-
S.Struct({
|
|
1707
|
-
groups: S.optional(ListGroupsResponseGroupsList),
|
|
1708
|
-
}),
|
|
1709
|
-
).annotate({ identifier: "ListGroupsResponse" }) as any as S.Schema<ListGroupsResponse>;
|
|
1710
|
-
|
|
1711
744
|
export interface ListLocationsRequest {}
|
|
1712
|
-
export const ListLocationsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1713
|
-
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/locations", code: 200 })),
|
|
1714
|
-
).annotate({ identifier: "ListLocationsRequest" }) as any as S.Schema<ListLocationsRequest>;
|
|
1715
|
-
|
|
1716
745
|
/** A mapping of location codes to location names. */
|
|
1717
746
|
export type ListLocationsResponseLocationsMap = { [key: string]: string | undefined };
|
|
1718
|
-
export const ListLocationsResponseLocationsMap = /*@__PURE__*/ S.Record(
|
|
1719
|
-
S.String,
|
|
1720
|
-
S.String,
|
|
1721
|
-
) as any as S.Schema<ListLocationsResponseLocationsMap>;
|
|
1722
|
-
|
|
1723
747
|
export interface ListLocationsResponse {
|
|
1724
748
|
/** A mapping of location codes to location names. */
|
|
1725
749
|
locations?: ListLocationsResponseLocationsMap;
|
|
1726
750
|
}
|
|
1727
|
-
export const ListLocationsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1728
|
-
S.Struct({
|
|
1729
|
-
locations: S.optional(ListLocationsResponseLocationsMap),
|
|
1730
|
-
}),
|
|
1731
|
-
).annotate({ identifier: "ListLocationsResponse" }) as any as S.Schema<ListLocationsResponse>;
|
|
1732
|
-
|
|
1733
751
|
export interface ListOrganizationAPITokensRequest {
|
|
1734
752
|
/** The slug of the organization or user account. */
|
|
1735
753
|
organizationSlug: string;
|
|
1736
754
|
}
|
|
1737
|
-
export const ListOrganizationAPITokensRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1738
|
-
S.Struct({
|
|
1739
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1740
|
-
}).pipe(
|
|
1741
|
-
T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/api-tokens", code: 200 }),
|
|
1742
|
-
),
|
|
1743
|
-
).annotate({
|
|
1744
|
-
identifier: "ListOrganizationAPITokensRequest",
|
|
1745
|
-
}) as any as S.Schema<ListOrganizationAPITokensRequest>;
|
|
1746
|
-
|
|
1747
755
|
/** The expanded scope list. Present only for group-scoped tokens. */
|
|
1748
756
|
export type ListOrganizationAPITokensResponseTokensItemScopesList = Array<string>;
|
|
1749
|
-
export const ListOrganizationAPITokensResponseTokensItemScopesList = /*@__PURE__*/ S.Array(
|
|
1750
|
-
S.String,
|
|
1751
|
-
) as any as S.Schema<ListOrganizationAPITokensResponseTokensItemScopesList>;
|
|
1752
|
-
|
|
1753
757
|
/** The user who minted the token. Returned to admins and owners so they can see who provisioned each token. */
|
|
1754
758
|
export interface ListOrganizationAPITokensResponseTokensItemOwner {
|
|
1755
759
|
username?: string;
|
|
1756
760
|
email?: string;
|
|
1757
761
|
}
|
|
1758
|
-
export const ListOrganizationAPITokensResponseTokensItemOwner = /*@__PURE__*/ S.suspend(() =>
|
|
1759
|
-
S.Struct({
|
|
1760
|
-
username: S.optional(S.String),
|
|
1761
|
-
email: S.optional(S.String),
|
|
1762
|
-
}),
|
|
1763
|
-
).annotate({
|
|
1764
|
-
identifier: "ListOrganizationAPITokensResponseTokensItemOwner",
|
|
1765
|
-
}) as any as S.Schema<ListOrganizationAPITokensResponseTokensItemOwner>;
|
|
1766
|
-
|
|
1767
762
|
export interface ListOrganizationAPITokensResponseTokensItem {
|
|
1768
763
|
/** The token name. */
|
|
1769
764
|
name?: string;
|
|
@@ -1780,37 +775,11 @@ export interface ListOrganizationAPITokensResponseTokensItem {
|
|
|
1780
775
|
/** The date the token was created. */
|
|
1781
776
|
created_at?: string;
|
|
1782
777
|
}
|
|
1783
|
-
export const ListOrganizationAPITokensResponseTokensItem = /*@__PURE__*/ S.suspend(() =>
|
|
1784
|
-
S.Struct({
|
|
1785
|
-
name: S.optional(S.String),
|
|
1786
|
-
id: S.optional(S.String),
|
|
1787
|
-
organization: S.optional(S.String),
|
|
1788
|
-
group: S.optional(S.String),
|
|
1789
|
-
scopes: S.optional(ListOrganizationAPITokensResponseTokensItemScopesList),
|
|
1790
|
-
owner: S.optional(ListOrganizationAPITokensResponseTokensItemOwner),
|
|
1791
|
-
created_at: S.optional(S.String),
|
|
1792
|
-
}),
|
|
1793
|
-
).annotate({
|
|
1794
|
-
identifier: "ListOrganizationAPITokensResponseTokensItem",
|
|
1795
|
-
}) as any as S.Schema<ListOrganizationAPITokensResponseTokensItem>;
|
|
1796
|
-
|
|
1797
778
|
export type ListOrganizationAPITokensResponseTokensList =
|
|
1798
779
|
Array<ListOrganizationAPITokensResponseTokensItem>;
|
|
1799
|
-
export const ListOrganizationAPITokensResponseTokensList = /*@__PURE__*/ S.Array(
|
|
1800
|
-
ListOrganizationAPITokensResponseTokensItem,
|
|
1801
|
-
) as any as S.Schema<ListOrganizationAPITokensResponseTokensList>;
|
|
1802
|
-
|
|
1803
780
|
export interface ListOrganizationAPITokensResponse {
|
|
1804
781
|
tokens?: ListOrganizationAPITokensResponseTokensList;
|
|
1805
782
|
}
|
|
1806
|
-
export const ListOrganizationAPITokensResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1807
|
-
S.Struct({
|
|
1808
|
-
tokens: S.optional(ListOrganizationAPITokensResponseTokensList),
|
|
1809
|
-
}),
|
|
1810
|
-
).annotate({
|
|
1811
|
-
identifier: "ListOrganizationAPITokensResponse",
|
|
1812
|
-
}) as any as S.Schema<ListOrganizationAPITokensResponse>;
|
|
1813
|
-
|
|
1814
783
|
export interface ListOrganizationAuditLogsRequest {
|
|
1815
784
|
/** The slug of the organization or user account. */
|
|
1816
785
|
organizationSlug: string;
|
|
@@ -1819,18 +788,6 @@ export interface ListOrganizationAuditLogsRequest {
|
|
|
1819
788
|
/** The page number to return. Defaults to 1. */
|
|
1820
789
|
page?: number;
|
|
1821
790
|
}
|
|
1822
|
-
export const ListOrganizationAuditLogsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1823
|
-
S.Struct({
|
|
1824
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1825
|
-
page_size: S.optional(S.Number.pipe(T.Query())),
|
|
1826
|
-
page: S.optional(S.Number.pipe(T.Query())),
|
|
1827
|
-
}).pipe(
|
|
1828
|
-
T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/audit-logs", code: 200 }),
|
|
1829
|
-
),
|
|
1830
|
-
).annotate({
|
|
1831
|
-
identifier: "ListOrganizationAuditLogsRequest",
|
|
1832
|
-
}) as any as S.Schema<ListOrganizationAuditLogsRequest>;
|
|
1833
|
-
|
|
1834
791
|
/** The code associated to the action taken. */
|
|
1835
792
|
export type AuditLogCode =
|
|
1836
793
|
| "user-signup"
|
|
@@ -1857,8 +814,6 @@ export type AuditLogCode =
|
|
|
1857
814
|
| "group-unprotect"
|
|
1858
815
|
| "db-aunrchive"
|
|
1859
816
|
| "user-delete";
|
|
1860
|
-
export const AuditLogCode = S.String;
|
|
1861
|
-
|
|
1862
817
|
export interface AuditLog {
|
|
1863
818
|
/** The code associated to the action taken. */
|
|
1864
819
|
code?: AuditLogCode;
|
|
@@ -1873,22 +828,7 @@ export interface AuditLog {
|
|
|
1873
828
|
/** The payload of the action performed. */
|
|
1874
829
|
data?: unknown;
|
|
1875
830
|
}
|
|
1876
|
-
export const AuditLog = /*@__PURE__*/ S.suspend(() =>
|
|
1877
|
-
S.Struct({
|
|
1878
|
-
code: S.optional(AuditLogCode),
|
|
1879
|
-
message: S.optional(S.String),
|
|
1880
|
-
origin: S.optional(S.String),
|
|
1881
|
-
author: S.optional(S.String),
|
|
1882
|
-
created_at: S.optional(S.String),
|
|
1883
|
-
data: S.optional(S.Unknown),
|
|
1884
|
-
}),
|
|
1885
|
-
).annotate({ identifier: "AuditLog" }) as any as S.Schema<AuditLog>;
|
|
1886
|
-
|
|
1887
831
|
export type ListOrganizationAuditLogsResponseAuditLogsList = Array<AuditLog>;
|
|
1888
|
-
export const ListOrganizationAuditLogsResponseAuditLogsList = /*@__PURE__*/ S.Array(
|
|
1889
|
-
AuditLog,
|
|
1890
|
-
) as any as S.Schema<ListOrganizationAuditLogsResponseAuditLogsList>;
|
|
1891
|
-
|
|
1892
832
|
export interface ListOrganizationAuditLogsResponsePagination {
|
|
1893
833
|
/** The current page number. */
|
|
1894
834
|
page?: number;
|
|
@@ -1899,48 +839,16 @@ export interface ListOrganizationAuditLogsResponsePagination {
|
|
|
1899
839
|
/** The total number of items. */
|
|
1900
840
|
total_rows?: number;
|
|
1901
841
|
}
|
|
1902
|
-
export const ListOrganizationAuditLogsResponsePagination = /*@__PURE__*/ S.suspend(() =>
|
|
1903
|
-
S.Struct({
|
|
1904
|
-
page: S.optional(S.Number),
|
|
1905
|
-
page_size: S.optional(S.Number),
|
|
1906
|
-
total_pages: S.optional(S.Number),
|
|
1907
|
-
total_rows: S.optional(S.Number),
|
|
1908
|
-
}),
|
|
1909
|
-
).annotate({
|
|
1910
|
-
identifier: "ListOrganizationAuditLogsResponsePagination",
|
|
1911
|
-
}) as any as S.Schema<ListOrganizationAuditLogsResponsePagination>;
|
|
1912
|
-
|
|
1913
842
|
export interface ListOrganizationAuditLogsResponse {
|
|
1914
843
|
audit_logs?: ListOrganizationAuditLogsResponseAuditLogsList;
|
|
1915
844
|
pagination?: ListOrganizationAuditLogsResponsePagination;
|
|
1916
845
|
}
|
|
1917
|
-
export const ListOrganizationAuditLogsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
1918
|
-
S.Struct({
|
|
1919
|
-
audit_logs: S.optional(ListOrganizationAuditLogsResponseAuditLogsList),
|
|
1920
|
-
pagination: S.optional(ListOrganizationAuditLogsResponsePagination),
|
|
1921
|
-
}),
|
|
1922
|
-
).annotate({
|
|
1923
|
-
identifier: "ListOrganizationAuditLogsResponse",
|
|
1924
|
-
}) as any as S.Schema<ListOrganizationAuditLogsResponse>;
|
|
1925
|
-
|
|
1926
846
|
export interface ListOrganizationInvitesV2Request {
|
|
1927
847
|
/** The slug of the organization or user account. */
|
|
1928
848
|
organizationSlug: string;
|
|
1929
849
|
}
|
|
1930
|
-
export const ListOrganizationInvitesV2Request = /*@__PURE__*/ S.suspend(() =>
|
|
1931
|
-
S.Struct({
|
|
1932
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1933
|
-
}).pipe(
|
|
1934
|
-
T.Http({ method: "GET", uri: "/v2/organizations/{organizationSlug}/invites", code: 200 }),
|
|
1935
|
-
),
|
|
1936
|
-
).annotate({
|
|
1937
|
-
identifier: "ListOrganizationInvitesV2Request",
|
|
1938
|
-
}) as any as S.Schema<ListOrganizationInvitesV2Request>;
|
|
1939
|
-
|
|
1940
850
|
/** The assigned role for the invited user. */
|
|
1941
851
|
export type InviteV2Role = "admin" | "member" | "viewer";
|
|
1942
|
-
export const InviteV2Role = S.String;
|
|
1943
|
-
|
|
1944
852
|
export interface InviteV2 {
|
|
1945
853
|
/** The unique ID for the invite. */
|
|
1946
854
|
id?: number;
|
|
@@ -1951,51 +859,17 @@ export interface InviteV2 {
|
|
|
1951
859
|
/** The datetime the invite was created in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */
|
|
1952
860
|
created_at?: string;
|
|
1953
861
|
}
|
|
1954
|
-
export const InviteV2 = /*@__PURE__*/ S.suspend(() =>
|
|
1955
|
-
S.Struct({
|
|
1956
|
-
id: S.optional(S.Number),
|
|
1957
|
-
email: S.optional(S.String),
|
|
1958
|
-
role: S.optional(InviteV2Role),
|
|
1959
|
-
created_at: S.optional(S.String),
|
|
1960
|
-
}),
|
|
1961
|
-
).annotate({ identifier: "InviteV2" }) as any as S.Schema<InviteV2>;
|
|
1962
|
-
|
|
1963
862
|
export type ListOrganizationInvitesV2ResponseInvitesList = Array<InviteV2>;
|
|
1964
|
-
export const ListOrganizationInvitesV2ResponseInvitesList = /*@__PURE__*/ S.Array(
|
|
1965
|
-
InviteV2,
|
|
1966
|
-
) as any as S.Schema<ListOrganizationInvitesV2ResponseInvitesList>;
|
|
1967
|
-
|
|
1968
863
|
export interface ListOrganizationInvitesV2Response {
|
|
1969
864
|
invites?: ListOrganizationInvitesV2ResponseInvitesList;
|
|
1970
865
|
}
|
|
1971
|
-
export const ListOrganizationInvitesV2Response = /*@__PURE__*/ S.suspend(() =>
|
|
1972
|
-
S.Struct({
|
|
1973
|
-
invites: S.optional(ListOrganizationInvitesV2ResponseInvitesList),
|
|
1974
|
-
}),
|
|
1975
|
-
).annotate({
|
|
1976
|
-
identifier: "ListOrganizationInvitesV2Response",
|
|
1977
|
-
}) as any as S.Schema<ListOrganizationInvitesV2Response>;
|
|
1978
|
-
|
|
1979
866
|
export type ListOrganizationInvoicesRequestType = "all" | "upcoming" | "issued";
|
|
1980
|
-
export const ListOrganizationInvoicesRequestType = S.String;
|
|
1981
|
-
|
|
1982
867
|
export interface ListOrganizationInvoicesRequest {
|
|
1983
868
|
/** The slug of the organization or user account. */
|
|
1984
869
|
organizationSlug: string;
|
|
1985
870
|
/** The type of invoice to retrieve. */
|
|
1986
871
|
type?: ListOrganizationInvoicesRequestType | (string & {});
|
|
1987
872
|
}
|
|
1988
|
-
export const ListOrganizationInvoicesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
1989
|
-
S.Struct({
|
|
1990
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
1991
|
-
type: S.optional(ListOrganizationInvoicesRequestType.pipe(T.Query())),
|
|
1992
|
-
}).pipe(
|
|
1993
|
-
T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/invoices", code: 200 }),
|
|
1994
|
-
),
|
|
1995
|
-
).annotate({
|
|
1996
|
-
identifier: "ListOrganizationInvoicesRequest",
|
|
1997
|
-
}) as any as S.Schema<ListOrganizationInvoicesRequest>;
|
|
1998
|
-
|
|
1999
873
|
export interface ListOrganizationInvoicesResponseInvoicesItem {
|
|
2000
874
|
/** The unique ID for the invoice. */
|
|
2001
875
|
invoice_number?: string;
|
|
@@ -2010,98 +884,32 @@ export interface ListOrganizationInvoicesResponseInvoicesItem {
|
|
|
2010
884
|
/** The link to the invoice PDF you can download. */
|
|
2011
885
|
invoice_pdf?: string;
|
|
2012
886
|
}
|
|
2013
|
-
export const ListOrganizationInvoicesResponseInvoicesItem = /*@__PURE__*/ S.suspend(() =>
|
|
2014
|
-
S.Struct({
|
|
2015
|
-
invoice_number: S.optional(S.String),
|
|
2016
|
-
amount_due: S.optional(S.String),
|
|
2017
|
-
due_date: S.optional(S.String),
|
|
2018
|
-
paid_at: S.optional(S.String),
|
|
2019
|
-
payment_failed_at: S.optional(S.String),
|
|
2020
|
-
invoice_pdf: S.optional(S.String),
|
|
2021
|
-
}),
|
|
2022
|
-
).annotate({
|
|
2023
|
-
identifier: "ListOrganizationInvoicesResponseInvoicesItem",
|
|
2024
|
-
}) as any as S.Schema<ListOrganizationInvoicesResponseInvoicesItem>;
|
|
2025
|
-
|
|
2026
887
|
/** The list of invoices for the organization. */
|
|
2027
888
|
export type ListOrganizationInvoicesResponseInvoicesList =
|
|
2028
889
|
Array<ListOrganizationInvoicesResponseInvoicesItem>;
|
|
2029
|
-
export const ListOrganizationInvoicesResponseInvoicesList = /*@__PURE__*/ S.Array(
|
|
2030
|
-
ListOrganizationInvoicesResponseInvoicesItem,
|
|
2031
|
-
) as any as S.Schema<ListOrganizationInvoicesResponseInvoicesList>;
|
|
2032
|
-
|
|
2033
890
|
export interface ListOrganizationInvoicesResponse {
|
|
2034
891
|
/** The list of invoices for the organization. */
|
|
2035
892
|
invoices?: ListOrganizationInvoicesResponseInvoicesList;
|
|
2036
893
|
}
|
|
2037
|
-
export const ListOrganizationInvoicesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2038
|
-
S.Struct({
|
|
2039
|
-
invoices: S.optional(ListOrganizationInvoicesResponseInvoicesList),
|
|
2040
|
-
}),
|
|
2041
|
-
).annotate({
|
|
2042
|
-
identifier: "ListOrganizationInvoicesResponse",
|
|
2043
|
-
}) as any as S.Schema<ListOrganizationInvoicesResponse>;
|
|
2044
|
-
|
|
2045
894
|
export interface ListOrganizationMembersRequest {
|
|
2046
895
|
/** The slug of the organization or user account. */
|
|
2047
896
|
organizationSlug: string;
|
|
2048
897
|
}
|
|
2049
|
-
export const ListOrganizationMembersRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2050
|
-
S.Struct({
|
|
2051
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
2052
|
-
}).pipe(
|
|
2053
|
-
T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/members", code: 200 }),
|
|
2054
|
-
),
|
|
2055
|
-
).annotate({
|
|
2056
|
-
identifier: "ListOrganizationMembersRequest",
|
|
2057
|
-
}) as any as S.Schema<ListOrganizationMembersRequest>;
|
|
2058
|
-
|
|
2059
898
|
export type ListOrganizationMembersResponseMembersList = Array<Member>;
|
|
2060
|
-
export const ListOrganizationMembersResponseMembersList = /*@__PURE__*/ S.Array(
|
|
2061
|
-
Member,
|
|
2062
|
-
) as any as S.Schema<ListOrganizationMembersResponseMembersList>;
|
|
2063
|
-
|
|
2064
899
|
export interface ListOrganizationMembersResponse {
|
|
2065
900
|
members?: ListOrganizationMembersResponseMembersList;
|
|
2066
901
|
}
|
|
2067
|
-
export const ListOrganizationMembersResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2068
|
-
S.Struct({
|
|
2069
|
-
members: S.optional(ListOrganizationMembersResponseMembersList),
|
|
2070
|
-
}),
|
|
2071
|
-
).annotate({
|
|
2072
|
-
identifier: "ListOrganizationMembersResponse",
|
|
2073
|
-
}) as any as S.Schema<ListOrganizationMembersResponse>;
|
|
2074
|
-
|
|
2075
902
|
export interface ListOrganizationPlansRequest {
|
|
2076
903
|
/** The slug of the organization or user account. */
|
|
2077
904
|
organizationSlug: string;
|
|
2078
905
|
}
|
|
2079
|
-
export const ListOrganizationPlansRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2080
|
-
S.Struct({
|
|
2081
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
2082
|
-
}).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/plans", code: 200 })),
|
|
2083
|
-
).annotate({
|
|
2084
|
-
identifier: "ListOrganizationPlansRequest",
|
|
2085
|
-
}) as any as S.Schema<ListOrganizationPlansRequest>;
|
|
2086
|
-
|
|
2087
906
|
export interface PlanPrice {
|
|
2088
907
|
/** Price of the available plan. */
|
|
2089
908
|
value?: string;
|
|
2090
909
|
/** Payment regularity. */
|
|
2091
910
|
timeline?: string;
|
|
2092
911
|
}
|
|
2093
|
-
export const PlanPrice = /*@__PURE__*/ S.suspend(() =>
|
|
2094
|
-
S.Struct({
|
|
2095
|
-
value: S.optional(S.String),
|
|
2096
|
-
timeline: S.optional(S.String),
|
|
2097
|
-
}),
|
|
2098
|
-
).annotate({ identifier: "PlanPrice" }) as any as S.Schema<PlanPrice>;
|
|
2099
|
-
|
|
2100
912
|
export type OrganizationPlanPricesList = Array<PlanPrice>;
|
|
2101
|
-
export const OrganizationPlanPricesList = /*@__PURE__*/ S.Array(
|
|
2102
|
-
PlanPrice,
|
|
2103
|
-
) as any as S.Schema<OrganizationPlanPricesList>;
|
|
2104
|
-
|
|
2105
913
|
export interface PlanQuotas {
|
|
2106
914
|
/** The number of rows read allowed for the specific plan. */
|
|
2107
915
|
rowsRead?: number;
|
|
@@ -2118,18 +926,6 @@ export interface PlanQuotas {
|
|
|
2118
926
|
/** The number of bytes synced allowed for the specific plan, in bytes. */
|
|
2119
927
|
bytesSynced?: number;
|
|
2120
928
|
}
|
|
2121
|
-
export const PlanQuotas = /*@__PURE__*/ S.suspend(() =>
|
|
2122
|
-
S.Struct({
|
|
2123
|
-
rowsRead: S.optional(S.Number),
|
|
2124
|
-
rowsWritten: S.optional(S.Number),
|
|
2125
|
-
databases: S.optional(S.NullOr(S.Number)),
|
|
2126
|
-
locations: S.optional(S.Number),
|
|
2127
|
-
storage: S.optional(S.Number),
|
|
2128
|
-
groups: S.optional(S.Number),
|
|
2129
|
-
bytesSynced: S.optional(S.Number),
|
|
2130
|
-
}),
|
|
2131
|
-
).annotate({ identifier: "PlanQuotas" }) as any as S.Schema<PlanQuotas>;
|
|
2132
|
-
|
|
2133
929
|
export interface OrganizationPlan {
|
|
2134
930
|
/** The name of the plan. */
|
|
2135
931
|
name?: string;
|
|
@@ -2138,50 +934,15 @@ export interface OrganizationPlan {
|
|
|
2138
934
|
prices?: OrganizationPlanPricesList;
|
|
2139
935
|
quotas?: PlanQuotas;
|
|
2140
936
|
}
|
|
2141
|
-
export const OrganizationPlan = /*@__PURE__*/ S.suspend(() =>
|
|
2142
|
-
S.Struct({
|
|
2143
|
-
name: S.optional(S.String),
|
|
2144
|
-
price: S.optional(S.String),
|
|
2145
|
-
prices: S.optional(OrganizationPlanPricesList),
|
|
2146
|
-
quotas: S.optional(PlanQuotas),
|
|
2147
|
-
}),
|
|
2148
|
-
).annotate({ identifier: "OrganizationPlan" }) as any as S.Schema<OrganizationPlan>;
|
|
2149
|
-
|
|
2150
937
|
/** List of available plans. */
|
|
2151
938
|
export type ListOrganizationPlansResponsePlansList = Array<OrganizationPlan>;
|
|
2152
|
-
export const ListOrganizationPlansResponsePlansList = /*@__PURE__*/ S.Array(
|
|
2153
|
-
OrganizationPlan,
|
|
2154
|
-
) as any as S.Schema<ListOrganizationPlansResponsePlansList>;
|
|
2155
|
-
|
|
2156
939
|
export interface ListOrganizationPlansResponse {
|
|
2157
940
|
/** List of available plans. */
|
|
2158
941
|
plans?: ListOrganizationPlansResponsePlansList;
|
|
2159
942
|
}
|
|
2160
|
-
export const ListOrganizationPlansResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2161
|
-
S.Struct({
|
|
2162
|
-
plans: S.optional(ListOrganizationPlansResponsePlansList),
|
|
2163
|
-
}),
|
|
2164
|
-
).annotate({
|
|
2165
|
-
identifier: "ListOrganizationPlansResponse",
|
|
2166
|
-
}) as any as S.Schema<ListOrganizationPlansResponse>;
|
|
2167
|
-
|
|
2168
943
|
export interface ListOrganizationsRequest {}
|
|
2169
|
-
export const ListOrganizationsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2170
|
-
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/organizations", code: 200 })),
|
|
2171
|
-
).annotate({ identifier: "ListOrganizationsRequest" }) as any as S.Schema<ListOrganizationsRequest>;
|
|
2172
|
-
|
|
2173
944
|
export type ListOrganizationsResponseBodyList = Array<Organization>;
|
|
2174
|
-
export const ListOrganizationsResponseBodyList = /*@__PURE__*/ S.Array(
|
|
2175
|
-
Organization,
|
|
2176
|
-
) as any as S.Schema<ListOrganizationsResponseBodyList>;
|
|
2177
|
-
|
|
2178
945
|
export type ListOrganizationsResponse = ListOrganizationsResponseBodyList;
|
|
2179
|
-
export const ListOrganizationsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2180
|
-
ListOrganizationsResponseBodyList.pipe(T.RawResponseRoot()),
|
|
2181
|
-
).annotate({
|
|
2182
|
-
identifier: "ListOrganizationsResponse",
|
|
2183
|
-
}) as any as S.Schema<ListOrganizationsResponse>;
|
|
2184
|
-
|
|
2185
946
|
export interface RemoveLocationFromGroupRequest {
|
|
2186
947
|
/** The slug of the organization or user account. */
|
|
2187
948
|
organizationSlug: string;
|
|
@@ -2190,66 +951,19 @@ export interface RemoveLocationFromGroupRequest {
|
|
|
2190
951
|
/** The location code to remove from the group. */
|
|
2191
952
|
location: string;
|
|
2192
953
|
}
|
|
2193
|
-
export const RemoveLocationFromGroupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2194
|
-
S.Struct({
|
|
2195
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
2196
|
-
groupName: S.String.pipe(T.Label()),
|
|
2197
|
-
location: S.String.pipe(T.Label()),
|
|
2198
|
-
}).pipe(
|
|
2199
|
-
T.Http({
|
|
2200
|
-
method: "DELETE",
|
|
2201
|
-
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/locations/{location}",
|
|
2202
|
-
code: 200,
|
|
2203
|
-
}),
|
|
2204
|
-
),
|
|
2205
|
-
).annotate({
|
|
2206
|
-
identifier: "RemoveLocationFromGroupRequest",
|
|
2207
|
-
}) as any as S.Schema<RemoveLocationFromGroupRequest>;
|
|
2208
|
-
|
|
2209
954
|
export interface RemoveLocationFromGroupResponse {
|
|
2210
955
|
/** The group with the removed location */
|
|
2211
956
|
group?: Group;
|
|
2212
957
|
}
|
|
2213
|
-
export const RemoveLocationFromGroupResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2214
|
-
S.Struct({
|
|
2215
|
-
group: S.optional(Group),
|
|
2216
|
-
}),
|
|
2217
|
-
).annotate({
|
|
2218
|
-
identifier: "RemoveLocationFromGroupResponse",
|
|
2219
|
-
}) as any as S.Schema<RemoveLocationFromGroupResponse>;
|
|
2220
|
-
|
|
2221
958
|
export interface RemoveOrganizationMemberRequest {
|
|
2222
959
|
/** The slug of the organization or user account. */
|
|
2223
960
|
organizationSlug: string;
|
|
2224
961
|
/** The username of a Turso user or organization member. */
|
|
2225
962
|
username: string;
|
|
2226
963
|
}
|
|
2227
|
-
export const RemoveOrganizationMemberRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2228
|
-
S.Struct({
|
|
2229
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
2230
|
-
username: S.String.pipe(T.Label()),
|
|
2231
|
-
}).pipe(
|
|
2232
|
-
T.Http({
|
|
2233
|
-
method: "DELETE",
|
|
2234
|
-
uri: "/v1/organizations/{organizationSlug}/members/{username}",
|
|
2235
|
-
code: 200,
|
|
2236
|
-
}),
|
|
2237
|
-
),
|
|
2238
|
-
).annotate({
|
|
2239
|
-
identifier: "RemoveOrganizationMemberRequest",
|
|
2240
|
-
}) as any as S.Schema<RemoveOrganizationMemberRequest>;
|
|
2241
|
-
|
|
2242
964
|
export interface RemoveOrganizationMemberResponse {
|
|
2243
965
|
member?: string;
|
|
2244
966
|
}
|
|
2245
|
-
export const RemoveOrganizationMemberResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2246
|
-
S.Struct({
|
|
2247
|
-
member: S.optional(S.String),
|
|
2248
|
-
}),
|
|
2249
|
-
).annotate({
|
|
2250
|
-
identifier: "RemoveOrganizationMemberResponse",
|
|
2251
|
-
}) as any as S.Schema<RemoveOrganizationMemberResponse>;
|
|
2252
|
-
|
|
2253
967
|
export interface RestoreDatabaseRequest {
|
|
2254
968
|
/** The UUID of the organization. Retrieve it with the Retrieve Organization endpoint (the `id` field). */
|
|
2255
969
|
organizationId: string;
|
|
@@ -2258,62 +972,20 @@ export interface RestoreDatabaseRequest {
|
|
|
2258
972
|
/** Optional new name for the restored database. If omitted, the original name is reused. The hostname is re-derived from the name. */
|
|
2259
973
|
name?: string;
|
|
2260
974
|
}
|
|
2261
|
-
export const RestoreDatabaseRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2262
|
-
S.Struct({
|
|
2263
|
-
organizationId: S.String.pipe(T.Label()),
|
|
2264
|
-
databaseId: S.String.pipe(T.Label()),
|
|
2265
|
-
name: S.optional(S.String),
|
|
2266
|
-
}).pipe(
|
|
2267
|
-
T.Http({
|
|
2268
|
-
method: "POST",
|
|
2269
|
-
uri: "/v3/organizations/{organizationId}/databases/{databaseId}/restore",
|
|
2270
|
-
code: 200,
|
|
2271
|
-
}),
|
|
2272
|
-
),
|
|
2273
|
-
).annotate({ identifier: "RestoreDatabaseRequest" }) as any as S.Schema<RestoreDatabaseRequest>;
|
|
2274
|
-
|
|
2275
975
|
export interface RestoreDatabaseResponse {
|
|
2276
976
|
/** The restored database. */
|
|
2277
977
|
database?: DeletedDatabase;
|
|
2278
978
|
}
|
|
2279
|
-
export const RestoreDatabaseResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2280
|
-
S.Struct({
|
|
2281
|
-
database: S.optional(DeletedDatabase),
|
|
2282
|
-
}),
|
|
2283
|
-
).annotate({ identifier: "RestoreDatabaseResponse" }) as any as S.Schema<RestoreDatabaseResponse>;
|
|
2284
|
-
|
|
2285
979
|
export interface RestoreGroupRequest {
|
|
2286
980
|
/** The UUID of the organization. Retrieve it with the Retrieve Organization endpoint (the `id` field). */
|
|
2287
981
|
organizationId: string;
|
|
2288
982
|
/** The UUID of the group, as returned when listing deleted groups (the `uuid` field). */
|
|
2289
983
|
groupId: string;
|
|
2290
984
|
}
|
|
2291
|
-
export const RestoreGroupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2292
|
-
S.Struct({
|
|
2293
|
-
organizationId: S.String.pipe(T.Label()),
|
|
2294
|
-
groupId: S.String.pipe(T.Label()),
|
|
2295
|
-
}).pipe(
|
|
2296
|
-
T.Http({
|
|
2297
|
-
method: "POST",
|
|
2298
|
-
uri: "/v3/organizations/{organizationId}/groups/{groupId}/restore",
|
|
2299
|
-
code: 200,
|
|
2300
|
-
}),
|
|
2301
|
-
),
|
|
2302
|
-
).annotate({ identifier: "RestoreGroupRequest" }) as any as S.Schema<RestoreGroupRequest>;
|
|
2303
|
-
|
|
2304
985
|
/** The member databases restored with the group, in restore order. */
|
|
2305
986
|
export type RestoreGroupResponseDatabasesList = Array<DeletedDatabase>;
|
|
2306
|
-
export const RestoreGroupResponseDatabasesList = /*@__PURE__*/ S.Array(
|
|
2307
|
-
DeletedDatabase,
|
|
2308
|
-
) as any as S.Schema<RestoreGroupResponseDatabasesList>;
|
|
2309
|
-
|
|
2310
987
|
/** Maps database UUID to error message for members whose restore failed. Retry them individually with Restore Database. */
|
|
2311
988
|
export type RestoreGroupResponseFailuresMap = { [key: string]: string | undefined };
|
|
2312
|
-
export const RestoreGroupResponseFailuresMap = /*@__PURE__*/ S.Record(
|
|
2313
|
-
S.String,
|
|
2314
|
-
S.String,
|
|
2315
|
-
) as any as S.Schema<RestoreGroupResponseFailuresMap>;
|
|
2316
|
-
|
|
2317
989
|
export interface RestoreGroupResponse {
|
|
2318
990
|
/** The restored group. */
|
|
2319
991
|
group?: Group;
|
|
@@ -2322,67 +994,24 @@ export interface RestoreGroupResponse {
|
|
|
2322
994
|
/** Maps database UUID to error message for members whose restore failed. Retry them individually with Restore Database. */
|
|
2323
995
|
failures?: RestoreGroupResponseFailuresMap;
|
|
2324
996
|
}
|
|
2325
|
-
export const RestoreGroupResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2326
|
-
S.Struct({
|
|
2327
|
-
group: S.optional(Group),
|
|
2328
|
-
databases: S.optional(RestoreGroupResponseDatabasesList),
|
|
2329
|
-
failures: S.optional(RestoreGroupResponseFailuresMap),
|
|
2330
|
-
}),
|
|
2331
|
-
).annotate({ identifier: "RestoreGroupResponse" }) as any as S.Schema<RestoreGroupResponse>;
|
|
2332
|
-
|
|
2333
997
|
export interface RevokeAPITokenRequest {
|
|
2334
998
|
/** The name of the api token. */
|
|
2335
999
|
tokenName: string;
|
|
2336
1000
|
}
|
|
2337
|
-
export const RevokeAPITokenRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2338
|
-
S.Struct({
|
|
2339
|
-
tokenName: S.String.pipe(T.Label()),
|
|
2340
|
-
}).pipe(T.Http({ method: "DELETE", uri: "/v1/auth/api-tokens/{tokenName}", code: 200 })),
|
|
2341
|
-
).annotate({ identifier: "RevokeAPITokenRequest" }) as any as S.Schema<RevokeAPITokenRequest>;
|
|
2342
|
-
|
|
2343
1001
|
export interface RevokeAPITokenResponse {
|
|
2344
1002
|
/** The revoked token name. */
|
|
2345
1003
|
token?: string;
|
|
2346
1004
|
}
|
|
2347
|
-
export const RevokeAPITokenResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2348
|
-
S.Struct({
|
|
2349
|
-
token: S.optional(S.String),
|
|
2350
|
-
}),
|
|
2351
|
-
).annotate({ identifier: "RevokeAPITokenResponse" }) as any as S.Schema<RevokeAPITokenResponse>;
|
|
2352
|
-
|
|
2353
1005
|
export interface RevokeOrganizationAPITokenRequest {
|
|
2354
1006
|
/** The slug of the organization or user account. */
|
|
2355
1007
|
organizationSlug: string;
|
|
2356
1008
|
/** The ID of the token to revoke (from the list endpoint). */
|
|
2357
1009
|
tokenId: string;
|
|
2358
1010
|
}
|
|
2359
|
-
export const RevokeOrganizationAPITokenRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2360
|
-
S.Struct({
|
|
2361
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
2362
|
-
tokenId: S.String.pipe(T.Label()),
|
|
2363
|
-
}).pipe(
|
|
2364
|
-
T.Http({
|
|
2365
|
-
method: "DELETE",
|
|
2366
|
-
uri: "/v1/organizations/{organizationSlug}/api-tokens/{tokenId}",
|
|
2367
|
-
code: 200,
|
|
2368
|
-
}),
|
|
2369
|
-
),
|
|
2370
|
-
).annotate({
|
|
2371
|
-
identifier: "RevokeOrganizationAPITokenRequest",
|
|
2372
|
-
}) as any as S.Schema<RevokeOrganizationAPITokenRequest>;
|
|
2373
|
-
|
|
2374
1011
|
export interface RevokeOrganizationAPITokenResponse {
|
|
2375
1012
|
/** The ID of the revoked token. */
|
|
2376
1013
|
token?: string;
|
|
2377
1014
|
}
|
|
2378
|
-
export const RevokeOrganizationAPITokenResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2379
|
-
S.Struct({
|
|
2380
|
-
token: S.optional(S.String),
|
|
2381
|
-
}),
|
|
2382
|
-
).annotate({
|
|
2383
|
-
identifier: "RevokeOrganizationAPITokenResponse",
|
|
2384
|
-
}) as any as S.Schema<RevokeOrganizationAPITokenResponse>;
|
|
2385
|
-
|
|
2386
1015
|
export interface TransferGroupRequest {
|
|
2387
1016
|
/** The slug of the organization or user account. */
|
|
2388
1017
|
organizationSlug: string;
|
|
@@ -2391,26 +1020,8 @@ export interface TransferGroupRequest {
|
|
|
2391
1020
|
/** The slug of the organization to transfer the group to. */
|
|
2392
1021
|
organization?: string;
|
|
2393
1022
|
}
|
|
2394
|
-
export const TransferGroupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2395
|
-
S.Struct({
|
|
2396
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
2397
|
-
groupName: S.String.pipe(T.Label()),
|
|
2398
|
-
organization: S.optional(S.String),
|
|
2399
|
-
}).pipe(
|
|
2400
|
-
T.Http({
|
|
2401
|
-
method: "POST",
|
|
2402
|
-
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/transfer",
|
|
2403
|
-
code: 200,
|
|
2404
|
-
}),
|
|
2405
|
-
),
|
|
2406
|
-
).annotate({ identifier: "TransferGroupRequest" }) as any as S.Schema<TransferGroupRequest>;
|
|
2407
|
-
|
|
2408
1023
|
/** An array of location keys the group is located. */
|
|
2409
1024
|
export type TransferGroupResponseLocationsList = Array<string>;
|
|
2410
|
-
export const TransferGroupResponseLocationsList = /*@__PURE__*/ S.Array(
|
|
2411
|
-
S.String,
|
|
2412
|
-
) as any as S.Schema<TransferGroupResponseLocationsList>;
|
|
2413
|
-
|
|
2414
1025
|
export interface TransferGroupResponse {
|
|
2415
1026
|
/** The group name, unique across your organization. */
|
|
2416
1027
|
name?: string;
|
|
@@ -2425,58 +1036,20 @@ export interface TransferGroupResponse {
|
|
|
2425
1036
|
/** The current status for delete protection. If enabled, the group and all its databases cannot be deleted. */
|
|
2426
1037
|
delete_protection?: boolean;
|
|
2427
1038
|
}
|
|
2428
|
-
export const TransferGroupResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2429
|
-
S.Struct({
|
|
2430
|
-
name: S.optional(S.String),
|
|
2431
|
-
version: S.optional(S.String),
|
|
2432
|
-
uuid: S.optional(S.String),
|
|
2433
|
-
locations: S.optional(TransferGroupResponseLocationsList),
|
|
2434
|
-
primary: S.optional(S.String),
|
|
2435
|
-
delete_protection: S.optional(S.Boolean),
|
|
2436
|
-
}),
|
|
2437
|
-
).annotate({ identifier: "TransferGroupResponse" }) as any as S.Schema<TransferGroupResponse>;
|
|
2438
|
-
|
|
2439
1039
|
export interface UnarchiveGroupRequest {
|
|
2440
1040
|
/** The slug of the organization or user account. */
|
|
2441
1041
|
organizationSlug: string;
|
|
2442
1042
|
/** The name of the group. */
|
|
2443
1043
|
groupName: string;
|
|
2444
1044
|
}
|
|
2445
|
-
export const UnarchiveGroupRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2446
|
-
S.Struct({
|
|
2447
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
2448
|
-
groupName: S.String.pipe(T.Label()),
|
|
2449
|
-
}).pipe(
|
|
2450
|
-
T.Http({
|
|
2451
|
-
method: "POST",
|
|
2452
|
-
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/unarchive",
|
|
2453
|
-
code: 200,
|
|
2454
|
-
}),
|
|
2455
|
-
),
|
|
2456
|
-
).annotate({ identifier: "UnarchiveGroupRequest" }) as any as S.Schema<UnarchiveGroupRequest>;
|
|
2457
|
-
|
|
2458
1045
|
export interface UnarchiveGroupResponse {
|
|
2459
1046
|
/** The group that was unarchived */
|
|
2460
1047
|
group?: Group;
|
|
2461
1048
|
}
|
|
2462
|
-
export const UnarchiveGroupResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2463
|
-
S.Struct({
|
|
2464
|
-
group: S.optional(Group),
|
|
2465
|
-
}),
|
|
2466
|
-
).annotate({ identifier: "UnarchiveGroupResponse" }) as any as S.Schema<UnarchiveGroupResponse>;
|
|
2467
|
-
|
|
2468
1049
|
/** 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. */
|
|
2469
1050
|
export type UpdateDatabaseConfigurationRequestAllowedIpsList = Array<string>;
|
|
2470
|
-
export const UpdateDatabaseConfigurationRequestAllowedIpsList = /*@__PURE__*/ S.Array(
|
|
2471
|
-
S.String,
|
|
2472
|
-
) as any as S.Schema<UpdateDatabaseConfigurationRequestAllowedIpsList>;
|
|
2473
|
-
|
|
2474
1051
|
/** 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. */
|
|
2475
1052
|
export type UpdateDatabaseConfigurationRequestAllowedAwsVpcIdsList = Array<string>;
|
|
2476
|
-
export const UpdateDatabaseConfigurationRequestAllowedAwsVpcIdsList = /*@__PURE__*/ S.Array(
|
|
2477
|
-
S.String,
|
|
2478
|
-
) as any as S.Schema<UpdateDatabaseConfigurationRequestAllowedAwsVpcIdsList>;
|
|
2479
|
-
|
|
2480
1053
|
export interface UpdateDatabaseConfigurationRequest {
|
|
2481
1054
|
/** The slug of the organization or user account. */
|
|
2482
1055
|
organizationSlug: string;
|
|
@@ -2497,28 +1070,6 @@ export interface UpdateDatabaseConfigurationRequest {
|
|
|
2497
1070
|
/** 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. */
|
|
2498
1071
|
allowed_aws_vpc_ids?: UpdateDatabaseConfigurationRequestAllowedAwsVpcIdsList;
|
|
2499
1072
|
}
|
|
2500
|
-
export const UpdateDatabaseConfigurationRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2501
|
-
S.Struct({
|
|
2502
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
2503
|
-
databaseName: S.String.pipe(T.Label()),
|
|
2504
|
-
size_limit: S.optional(S.String),
|
|
2505
|
-
allow_attach: S.optional(S.Boolean),
|
|
2506
|
-
block_reads: S.optional(S.Boolean),
|
|
2507
|
-
block_writes: S.optional(S.Boolean),
|
|
2508
|
-
delete_protection: S.optional(S.Boolean),
|
|
2509
|
-
allowed_ips: S.optional(UpdateDatabaseConfigurationRequestAllowedIpsList),
|
|
2510
|
-
allowed_aws_vpc_ids: S.optional(UpdateDatabaseConfigurationRequestAllowedAwsVpcIdsList),
|
|
2511
|
-
}).pipe(
|
|
2512
|
-
T.Http({
|
|
2513
|
-
method: "PATCH",
|
|
2514
|
-
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/configuration",
|
|
2515
|
-
code: 200,
|
|
2516
|
-
}),
|
|
2517
|
-
),
|
|
2518
|
-
).annotate({
|
|
2519
|
-
identifier: "UpdateDatabaseConfigurationRequest",
|
|
2520
|
-
}) as any as S.Schema<UpdateDatabaseConfigurationRequest>;
|
|
2521
|
-
|
|
2522
1073
|
export interface UpdateGroupConfigurationRequest {
|
|
2523
1074
|
/** The slug of the organization or user account. */
|
|
2524
1075
|
organizationSlug: string;
|
|
@@ -2527,52 +1078,15 @@ export interface UpdateGroupConfigurationRequest {
|
|
|
2527
1078
|
/** Prevent the group from being deleted. */
|
|
2528
1079
|
delete_protection?: boolean;
|
|
2529
1080
|
}
|
|
2530
|
-
export const UpdateGroupConfigurationRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2531
|
-
S.Struct({
|
|
2532
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
2533
|
-
groupName: S.String.pipe(T.Label()),
|
|
2534
|
-
delete_protection: S.optional(S.Boolean),
|
|
2535
|
-
}).pipe(
|
|
2536
|
-
T.Http({
|
|
2537
|
-
method: "PATCH",
|
|
2538
|
-
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/configuration",
|
|
2539
|
-
code: 200,
|
|
2540
|
-
}),
|
|
2541
|
-
),
|
|
2542
|
-
).annotate({
|
|
2543
|
-
identifier: "UpdateGroupConfigurationRequest",
|
|
2544
|
-
}) as any as S.Schema<UpdateGroupConfigurationRequest>;
|
|
2545
|
-
|
|
2546
1081
|
export interface UpdateGroupDatabasesRequest {
|
|
2547
1082
|
/** The slug of the organization or user account. */
|
|
2548
1083
|
organizationSlug: string;
|
|
2549
1084
|
/** The name of the group. */
|
|
2550
1085
|
groupName: string;
|
|
2551
1086
|
}
|
|
2552
|
-
export const UpdateGroupDatabasesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2553
|
-
S.Struct({
|
|
2554
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
2555
|
-
groupName: S.String.pipe(T.Label()),
|
|
2556
|
-
}).pipe(
|
|
2557
|
-
T.Http({
|
|
2558
|
-
method: "POST",
|
|
2559
|
-
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/update",
|
|
2560
|
-
code: 200,
|
|
2561
|
-
}),
|
|
2562
|
-
),
|
|
2563
|
-
).annotate({
|
|
2564
|
-
identifier: "UpdateGroupDatabasesRequest",
|
|
2565
|
-
}) as any as S.Schema<UpdateGroupDatabasesRequest>;
|
|
2566
|
-
|
|
2567
1087
|
export interface UpdateGroupDatabasesResponse {}
|
|
2568
|
-
export const UpdateGroupDatabasesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
|
|
2569
|
-
identifier: "UpdateGroupDatabasesResponse",
|
|
2570
|
-
}) as any as S.Schema<UpdateGroupDatabasesResponse>;
|
|
2571
|
-
|
|
2572
1088
|
/** The new role to assign to the member. */
|
|
2573
1089
|
export type UpdateMemberRoleRequestRole = "admin" | "member" | "viewer";
|
|
2574
|
-
export const UpdateMemberRoleRequestRole = S.String;
|
|
2575
|
-
|
|
2576
1090
|
export interface UpdateMemberRoleRequest {
|
|
2577
1091
|
/** The slug of the organization or user account. */
|
|
2578
1092
|
organizationSlug: string;
|
|
@@ -2581,24 +1095,8 @@ export interface UpdateMemberRoleRequest {
|
|
|
2581
1095
|
/** The new role to assign to the member. */
|
|
2582
1096
|
role: UpdateMemberRoleRequestRole | (string & {});
|
|
2583
1097
|
}
|
|
2584
|
-
export const UpdateMemberRoleRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2585
|
-
S.Struct({
|
|
2586
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
2587
|
-
username: S.String.pipe(T.Label()),
|
|
2588
|
-
role: UpdateMemberRoleRequestRole,
|
|
2589
|
-
}).pipe(
|
|
2590
|
-
T.Http({
|
|
2591
|
-
method: "PATCH",
|
|
2592
|
-
uri: "/v1/organizations/{organizationSlug}/members/{username}",
|
|
2593
|
-
code: 200,
|
|
2594
|
-
}),
|
|
2595
|
-
),
|
|
2596
|
-
).annotate({ identifier: "UpdateMemberRoleRequest" }) as any as S.Schema<UpdateMemberRoleRequest>;
|
|
2597
|
-
|
|
2598
1098
|
/** The new role of the updated member. */
|
|
2599
1099
|
export type UpdateMemberRoleResponseMemberRole = "admin" | "member" | "viewer";
|
|
2600
|
-
export const UpdateMemberRoleResponseMemberRole = S.String;
|
|
2601
|
-
|
|
2602
1100
|
export interface UpdateMemberRoleResponseMember {
|
|
2603
1101
|
/** The username of the updated member. */
|
|
2604
1102
|
username?: string;
|
|
@@ -2607,25 +1105,9 @@ export interface UpdateMemberRoleResponseMember {
|
|
|
2607
1105
|
/** The new role of the updated member. */
|
|
2608
1106
|
role?: UpdateMemberRoleResponseMemberRole;
|
|
2609
1107
|
}
|
|
2610
|
-
export const UpdateMemberRoleResponseMember = /*@__PURE__*/ S.suspend(() =>
|
|
2611
|
-
S.Struct({
|
|
2612
|
-
username: S.optional(S.String),
|
|
2613
|
-
email: S.optional(S.String),
|
|
2614
|
-
role: S.optional(UpdateMemberRoleResponseMemberRole),
|
|
2615
|
-
}),
|
|
2616
|
-
).annotate({
|
|
2617
|
-
identifier: "UpdateMemberRoleResponseMember",
|
|
2618
|
-
}) as any as S.Schema<UpdateMemberRoleResponseMember>;
|
|
2619
|
-
|
|
2620
1108
|
export interface UpdateMemberRoleResponse {
|
|
2621
1109
|
member?: UpdateMemberRoleResponseMember;
|
|
2622
1110
|
}
|
|
2623
|
-
export const UpdateMemberRoleResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2624
|
-
S.Struct({
|
|
2625
|
-
member: S.optional(UpdateMemberRoleResponseMember),
|
|
2626
|
-
}),
|
|
2627
|
-
).annotate({ identifier: "UpdateMemberRoleResponse" }) as any as S.Schema<UpdateMemberRoleResponse>;
|
|
2628
|
-
|
|
2629
1111
|
export interface UpdateOrganizationRequest {
|
|
2630
1112
|
/** The slug of the organization or user account. */
|
|
2631
1113
|
organizationSlug: string;
|
|
@@ -2636,44 +1118,15 @@ export interface UpdateOrganizationRequest {
|
|
|
2636
1118
|
/** Enable or disable deleted database and group recovery for the organization. Must be updated separately from other organization settings. Requires an admin or owner. */
|
|
2637
1119
|
restore_enabled?: boolean;
|
|
2638
1120
|
}
|
|
2639
|
-
export const UpdateOrganizationRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2640
|
-
S.Struct({
|
|
2641
|
-
organizationSlug: S.String.pipe(T.Label()),
|
|
2642
|
-
overages: S.optional(S.Boolean),
|
|
2643
|
-
require_mfa: S.optional(S.Boolean),
|
|
2644
|
-
restore_enabled: S.optional(S.Boolean),
|
|
2645
|
-
}).pipe(T.Http({ method: "PATCH", uri: "/v1/organizations/{organizationSlug}", code: 200 })),
|
|
2646
|
-
).annotate({
|
|
2647
|
-
identifier: "UpdateOrganizationRequest",
|
|
2648
|
-
}) as any as S.Schema<UpdateOrganizationRequest>;
|
|
2649
|
-
|
|
2650
1121
|
export interface UpdateOrganizationResponse {
|
|
2651
1122
|
/** The updated organization. */
|
|
2652
1123
|
organization?: Organization;
|
|
2653
1124
|
}
|
|
2654
|
-
export const UpdateOrganizationResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2655
|
-
S.Struct({
|
|
2656
|
-
organization: S.optional(Organization),
|
|
2657
|
-
}),
|
|
2658
|
-
).annotate({
|
|
2659
|
-
identifier: "UpdateOrganizationResponse",
|
|
2660
|
-
}) as any as S.Schema<UpdateOrganizationResponse>;
|
|
2661
|
-
|
|
2662
1125
|
export interface ValidateAPITokenRequest {}
|
|
2663
|
-
export const ValidateAPITokenRequest = /*@__PURE__*/ S.suspend(() =>
|
|
2664
|
-
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/auth/validate", code: 200 })),
|
|
2665
|
-
).annotate({ identifier: "ValidateAPITokenRequest" }) as any as S.Schema<ValidateAPITokenRequest>;
|
|
2666
|
-
|
|
2667
1126
|
export interface ValidateAPITokenResponse {
|
|
2668
1127
|
/** The time of expiration for the provided token in unix epoch seconds, or `-1` if there is no expiration. */
|
|
2669
1128
|
exp?: number;
|
|
2670
1129
|
}
|
|
2671
|
-
export const ValidateAPITokenResponse = /*@__PURE__*/ S.suspend(() =>
|
|
2672
|
-
S.Struct({
|
|
2673
|
-
exp: S.optional(S.Number),
|
|
2674
|
-
}),
|
|
2675
|
-
).annotate({ identifier: "ValidateAPITokenResponse" }) as any as S.Schema<ValidateAPITokenResponse>;
|
|
2676
|
-
|
|
2677
1130
|
export type AddLocationToGroupError = BadRequest | NotFound | TursoOpError;
|
|
2678
1131
|
/** Add Location to Group Adds a location to the specified group. */
|
|
2679
1132
|
export const addLocationToGroup: API.OperationMethod<
|
|
@@ -2682,8 +1135,8 @@ export const addLocationToGroup: API.OperationMethod<
|
|
|
2682
1135
|
AddLocationToGroupError,
|
|
2683
1136
|
TursoOpContext
|
|
2684
1137
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2685
|
-
input: AddLocationToGroupRequest
|
|
2686
|
-
output: AddLocationToGroupResponse
|
|
1138
|
+
input: __S(344, __c43, 0) as any as S.Schema<AddLocationToGroupRequest>,
|
|
1139
|
+
output: __S(368, __c46, 0) as any as S.Schema<AddLocationToGroupResponse>,
|
|
2687
1140
|
errors: [BadRequest, NotFound],
|
|
2688
1141
|
protocol: TursoProtocol,
|
|
2689
1142
|
retry: Retry.Retry,
|
|
@@ -2697,23 +1150,23 @@ export const addOrganizationMember: API.OperationMethod<
|
|
|
2697
1150
|
AddOrganizationMemberError,
|
|
2698
1151
|
TursoOpContext
|
|
2699
1152
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2700
|
-
input: AddOrganizationMemberRequest
|
|
2701
|
-
output: AddOrganizationMemberResponse
|
|
1153
|
+
input: __S(464, __c58, 0) as any as S.Schema<AddOrganizationMemberRequest>,
|
|
1154
|
+
output: __S(465, __c58, 1) as any as S.Schema<AddOrganizationMemberResponse>,
|
|
2702
1155
|
errors: [BadRequest, NotFound, Conflict],
|
|
2703
1156
|
protocol: TursoProtocol,
|
|
2704
1157
|
retry: Retry.Retry,
|
|
2705
1158
|
}));
|
|
2706
1159
|
|
|
2707
1160
|
export type CreateAPITokenError = BadRequest | NotFound | Conflict | TursoOpError;
|
|
2708
|
-
/** 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**
|
|
1161
|
+
/** 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. */
|
|
2709
1162
|
export const createAPIToken: API.OperationMethod<
|
|
2710
1163
|
CreateAPITokenRequest,
|
|
2711
1164
|
CreateAPITokenResponse,
|
|
2712
1165
|
CreateAPITokenError,
|
|
2713
1166
|
TursoOpContext
|
|
2714
1167
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2715
|
-
input: CreateAPITokenRequest
|
|
2716
|
-
output: CreateAPITokenResponse
|
|
1168
|
+
input: __S(529, __c66, 1) as any as S.Schema<CreateAPITokenRequest>,
|
|
1169
|
+
output: __S(530, __c66, 2) as any as S.Schema<CreateAPITokenResponse>,
|
|
2717
1170
|
errors: [BadRequest, NotFound, Conflict],
|
|
2718
1171
|
protocol: TursoProtocol,
|
|
2719
1172
|
retry: Retry.Retry,
|
|
@@ -2727,8 +1180,8 @@ export const createDatabase: API.OperationMethod<
|
|
|
2727
1180
|
CreateDatabaseError,
|
|
2728
1181
|
TursoOpContext
|
|
2729
1182
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2730
|
-
input: CreateDatabaseRequest
|
|
2731
|
-
output: CreateDatabaseResponse
|
|
1183
|
+
input: __S(538, __c67, 2) as any as S.Schema<CreateDatabaseRequest>,
|
|
1184
|
+
output: __S(540, __c67, 4) as any as S.Schema<CreateDatabaseResponse>,
|
|
2732
1185
|
errors: [BadRequest, Conflict],
|
|
2733
1186
|
protocol: TursoProtocol,
|
|
2734
1187
|
retry: Retry.Retry,
|
|
@@ -2742,8 +1195,8 @@ export const createDatabaseToken: API.OperationMethod<
|
|
|
2742
1195
|
CreateDatabaseTokenError,
|
|
2743
1196
|
TursoOpContext
|
|
2744
1197
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2745
|
-
input: CreateDatabaseTokenRequest
|
|
2746
|
-
output: CreateDatabaseTokenResponse
|
|
1198
|
+
input: __S(544, __c68, 0) as any as S.Schema<CreateDatabaseTokenRequest>,
|
|
1199
|
+
output: __S(554, __c69, 2) as any as S.Schema<CreateDatabaseTokenResponse>,
|
|
2747
1200
|
errors: [BadRequest, NotFound],
|
|
2748
1201
|
protocol: TursoProtocol,
|
|
2749
1202
|
retry: Retry.Retry,
|
|
@@ -2757,8 +1210,8 @@ export const createGroup: API.OperationMethod<
|
|
|
2757
1210
|
CreateGroupError,
|
|
2758
1211
|
TursoOpContext
|
|
2759
1212
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2760
|
-
input: CreateGroupRequest
|
|
2761
|
-
output: CreateGroupResponse
|
|
1213
|
+
input: __S(560, __c70, 0) as any as S.Schema<CreateGroupRequest>,
|
|
1214
|
+
output: __S(368, __c46, 0) as any as S.Schema<CreateGroupResponse>,
|
|
2762
1215
|
errors: [BadRequest, Conflict],
|
|
2763
1216
|
protocol: TursoProtocol,
|
|
2764
1217
|
retry: Retry.Retry,
|
|
@@ -2772,8 +1225,8 @@ export const createGroupToken: API.OperationMethod<
|
|
|
2772
1225
|
CreateGroupTokenError,
|
|
2773
1226
|
TursoOpContext
|
|
2774
1227
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2775
|
-
input: CreateGroupTokenRequest
|
|
2776
|
-
output: CreateGroupTokenResponse
|
|
1228
|
+
input: __S(0, __c0, 0) as any as S.Schema<CreateGroupTokenRequest>,
|
|
1229
|
+
output: __S(554, __c69, 2) as any as S.Schema<CreateGroupTokenResponse>,
|
|
2777
1230
|
errors: [BadRequest, NotFound],
|
|
2778
1231
|
protocol: TursoProtocol,
|
|
2779
1232
|
retry: Retry.Retry,
|
|
@@ -2787,8 +1240,8 @@ export const deleteDatabase: API.OperationMethod<
|
|
|
2787
1240
|
DeleteDatabaseError,
|
|
2788
1241
|
TursoOpContext
|
|
2789
1242
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2790
|
-
input: DeleteDatabaseRequest
|
|
2791
|
-
output: DeleteDatabaseResponse
|
|
1243
|
+
input: __S(8, __c1, 0) as any as S.Schema<DeleteDatabaseRequest>,
|
|
1244
|
+
output: __S(9, __c1, 1) as any as S.Schema<DeleteDatabaseResponse>,
|
|
2792
1245
|
errors: [NotFound],
|
|
2793
1246
|
protocol: TursoProtocol,
|
|
2794
1247
|
retry: Retry.Retry,
|
|
@@ -2802,8 +1255,8 @@ export const deleteGroup: API.OperationMethod<
|
|
|
2802
1255
|
DeleteGroupError,
|
|
2803
1256
|
TursoOpContext
|
|
2804
1257
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2805
|
-
input: DeleteGroupRequest
|
|
2806
|
-
output: DeleteGroupResponse
|
|
1258
|
+
input: __S(16, __c2, 0) as any as S.Schema<DeleteGroupRequest>,
|
|
1259
|
+
output: __S(368, __c46, 0) as any as S.Schema<DeleteGroupResponse>,
|
|
2807
1260
|
errors: [NotFound],
|
|
2808
1261
|
protocol: TursoProtocol,
|
|
2809
1262
|
retry: Retry.Retry,
|
|
@@ -2817,8 +1270,8 @@ export const deleteOrganizationInviteByEmailV2: API.OperationMethod<
|
|
|
2817
1270
|
DeleteOrganizationInviteByEmailV2Error,
|
|
2818
1271
|
TursoOpContext
|
|
2819
1272
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2820
|
-
input: DeleteOrganizationInviteByEmailV2Request
|
|
2821
|
-
output: DeleteOrganizationInviteByEmailV2Response
|
|
1273
|
+
input: __S(24, __c3, 0) as any as S.Schema<DeleteOrganizationInviteByEmailV2Request>,
|
|
1274
|
+
output: __S(32, __c4, 0) as any as S.Schema<DeleteOrganizationInviteByEmailV2Response>,
|
|
2822
1275
|
errors: [NotFound],
|
|
2823
1276
|
protocol: TursoProtocol,
|
|
2824
1277
|
retry: Retry.Retry,
|
|
@@ -2832,8 +1285,8 @@ export const getCurrentUser: API.OperationMethod<
|
|
|
2832
1285
|
GetCurrentUserError,
|
|
2833
1286
|
TursoOpContext
|
|
2834
1287
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2835
|
-
input: GetCurrentUserRequest
|
|
2836
|
-
output: GetCurrentUserResponse
|
|
1288
|
+
input: __S(40, __c5, 0) as any as S.Schema<GetCurrentUserRequest>,
|
|
1289
|
+
output: __S(42, __c5, 2) as any as S.Schema<GetCurrentUserResponse>,
|
|
2837
1290
|
errors: [],
|
|
2838
1291
|
protocol: TursoProtocol,
|
|
2839
1292
|
retry: Retry.Retry,
|
|
@@ -2847,8 +1300,8 @@ export const getDatabase: API.OperationMethod<
|
|
|
2847
1300
|
GetDatabaseError,
|
|
2848
1301
|
TursoOpContext
|
|
2849
1302
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2850
|
-
input: GetDatabaseRequest
|
|
2851
|
-
output: GetDatabaseResponse
|
|
1303
|
+
input: __S(48, __c6, 0) as any as S.Schema<GetDatabaseRequest>,
|
|
1304
|
+
output: __S(49, __c6, 1) as any as S.Schema<GetDatabaseResponse>,
|
|
2852
1305
|
errors: [NotFound],
|
|
2853
1306
|
protocol: TursoProtocol,
|
|
2854
1307
|
retry: Retry.Retry,
|
|
@@ -2862,8 +1315,8 @@ export const getDatabaseConfiguration: API.OperationMethod<
|
|
|
2862
1315
|
GetDatabaseConfigurationError,
|
|
2863
1316
|
TursoOpContext
|
|
2864
1317
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2865
|
-
input: GetDatabaseConfigurationRequest
|
|
2866
|
-
output: DatabaseConfigurationResponse
|
|
1318
|
+
input: __S(64, __c8, 0) as any as S.Schema<GetDatabaseConfigurationRequest>,
|
|
1319
|
+
output: __S(72, __c9, 0) as any as S.Schema<DatabaseConfigurationResponse>,
|
|
2867
1320
|
errors: [NotFound],
|
|
2868
1321
|
protocol: TursoProtocol,
|
|
2869
1322
|
retry: Retry.Retry,
|
|
@@ -2877,8 +1330,8 @@ export const getDatabaseInstance: API.OperationMethod<
|
|
|
2877
1330
|
GetDatabaseInstanceError,
|
|
2878
1331
|
TursoOpContext
|
|
2879
1332
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2880
|
-
input: GetDatabaseInstanceRequest
|
|
2881
|
-
output: GetDatabaseInstanceResponse
|
|
1333
|
+
input: __S(80, __c10, 0) as any as S.Schema<GetDatabaseInstanceRequest>,
|
|
1334
|
+
output: __S(81, __c10, 1) as any as S.Schema<GetDatabaseInstanceResponse>,
|
|
2882
1335
|
errors: [NotFound],
|
|
2883
1336
|
protocol: TursoProtocol,
|
|
2884
1337
|
retry: Retry.Retry,
|
|
@@ -2892,8 +1345,8 @@ export const getDatabaseStats: API.OperationMethod<
|
|
|
2892
1345
|
GetDatabaseStatsError,
|
|
2893
1346
|
TursoOpContext
|
|
2894
1347
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2895
|
-
input: GetDatabaseStatsRequest
|
|
2896
|
-
output: GetDatabaseStatsResponse
|
|
1348
|
+
input: __S(96, __c12, 0) as any as S.Schema<GetDatabaseStatsRequest>,
|
|
1349
|
+
output: __S(99, __c12, 3) as any as S.Schema<GetDatabaseStatsResponse>,
|
|
2897
1350
|
errors: [NotFound],
|
|
2898
1351
|
protocol: TursoProtocol,
|
|
2899
1352
|
retry: Retry.Retry,
|
|
@@ -2907,8 +1360,8 @@ export const getDatabaseUsage: API.OperationMethod<
|
|
|
2907
1360
|
GetDatabaseUsageError,
|
|
2908
1361
|
TursoOpContext
|
|
2909
1362
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2910
|
-
input: GetDatabaseUsageRequest
|
|
2911
|
-
output: GetDatabaseUsageResponse
|
|
1363
|
+
input: __S(104, __c13, 0) as any as S.Schema<GetDatabaseUsageRequest>,
|
|
1364
|
+
output: __S(105, __c13, 1) as any as S.Schema<GetDatabaseUsageResponse>,
|
|
2912
1365
|
errors: [BadRequest, NotFound],
|
|
2913
1366
|
protocol: TursoProtocol,
|
|
2914
1367
|
retry: Retry.Retry,
|
|
@@ -2922,8 +1375,8 @@ export const getGroup: API.OperationMethod<
|
|
|
2922
1375
|
GetGroupError,
|
|
2923
1376
|
TursoOpContext
|
|
2924
1377
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2925
|
-
input: GetGroupRequest
|
|
2926
|
-
output: GetGroupResponse
|
|
1378
|
+
input: __S(120, __c15, 0) as any as S.Schema<GetGroupRequest>,
|
|
1379
|
+
output: __S(368, __c46, 0) as any as S.Schema<GetGroupResponse>,
|
|
2927
1380
|
errors: [NotFound],
|
|
2928
1381
|
protocol: TursoProtocol,
|
|
2929
1382
|
retry: Retry.Retry,
|
|
@@ -2937,8 +1390,8 @@ export const getGroupConfiguration: API.OperationMethod<
|
|
|
2937
1390
|
GetGroupConfigurationError,
|
|
2938
1391
|
TursoOpContext
|
|
2939
1392
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2940
|
-
input: GetGroupConfigurationRequest
|
|
2941
|
-
output: GroupConfigurationResponse
|
|
1393
|
+
input: __S(128, __c16, 0) as any as S.Schema<GetGroupConfigurationRequest>,
|
|
1394
|
+
output: __S(136, __c17, 0) as any as S.Schema<GroupConfigurationResponse>,
|
|
2942
1395
|
errors: [NotFound],
|
|
2943
1396
|
protocol: TursoProtocol,
|
|
2944
1397
|
retry: Retry.Retry,
|
|
@@ -2952,8 +1405,8 @@ export const getOrganization: API.OperationMethod<
|
|
|
2952
1405
|
GetOrganizationError,
|
|
2953
1406
|
TursoOpContext
|
|
2954
1407
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2955
|
-
input: GetOrganizationRequest
|
|
2956
|
-
output: GetOrganizationResponse
|
|
1408
|
+
input: __S(144, __c18, 0) as any as S.Schema<GetOrganizationRequest>,
|
|
1409
|
+
output: __S(160, __c20, 0) as any as S.Schema<GetOrganizationResponse>,
|
|
2957
1410
|
errors: [NotFound],
|
|
2958
1411
|
protocol: TursoProtocol,
|
|
2959
1412
|
retry: Retry.Retry,
|
|
@@ -2967,8 +1420,8 @@ export const getOrganizationMember: API.OperationMethod<
|
|
|
2967
1420
|
GetOrganizationMemberError,
|
|
2968
1421
|
TursoOpContext
|
|
2969
1422
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2970
|
-
input: GetOrganizationMemberRequest
|
|
2971
|
-
output: GetOrganizationMemberResponse
|
|
1423
|
+
input: __S(168, __c21, 0) as any as S.Schema<GetOrganizationMemberRequest>,
|
|
1424
|
+
output: __S(169, __c21, 1) as any as S.Schema<GetOrganizationMemberResponse>,
|
|
2972
1425
|
errors: [NotFound],
|
|
2973
1426
|
protocol: TursoProtocol,
|
|
2974
1427
|
retry: Retry.Retry,
|
|
@@ -2982,8 +1435,8 @@ export const getOrganizationSubscription: API.OperationMethod<
|
|
|
2982
1435
|
GetOrganizationSubscriptionError,
|
|
2983
1436
|
TursoOpContext
|
|
2984
1437
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2985
|
-
input: GetOrganizationSubscriptionRequest
|
|
2986
|
-
output: GetOrganizationSubscriptionResponse
|
|
1438
|
+
input: __S(184, __c23, 0) as any as S.Schema<GetOrganizationSubscriptionRequest>,
|
|
1439
|
+
output: __S(186, __c23, 2) as any as S.Schema<GetOrganizationSubscriptionResponse>,
|
|
2987
1440
|
errors: [],
|
|
2988
1441
|
protocol: TursoProtocol,
|
|
2989
1442
|
retry: Retry.Retry,
|
|
@@ -2997,8 +1450,8 @@ export const getOrganizationUsage: API.OperationMethod<
|
|
|
2997
1450
|
GetOrganizationUsageError,
|
|
2998
1451
|
TursoOpContext
|
|
2999
1452
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3000
|
-
input: GetOrganizationUsageRequest
|
|
3001
|
-
output: GetOrganizationUsageResponse
|
|
1453
|
+
input: __S(192, __c24, 0) as any as S.Schema<GetOrganizationUsageRequest>,
|
|
1454
|
+
output: __S(196, __c24, 4) as any as S.Schema<GetOrganizationUsageResponse>,
|
|
3002
1455
|
errors: [],
|
|
3003
1456
|
protocol: TursoProtocol,
|
|
3004
1457
|
retry: Retry.Retry,
|
|
@@ -3012,8 +1465,8 @@ export const invalidateDatabaseTokens: API.OperationMethod<
|
|
|
3012
1465
|
InvalidateDatabaseTokensError,
|
|
3013
1466
|
TursoOpContext
|
|
3014
1467
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3015
|
-
input: InvalidateDatabaseTokensRequest
|
|
3016
|
-
output: InvalidateDatabaseTokensResponse
|
|
1468
|
+
input: __S(200, __c25, 0) as any as S.Schema<InvalidateDatabaseTokensRequest>,
|
|
1469
|
+
output: __S(32, __c4, 0) as any as S.Schema<InvalidateDatabaseTokensResponse>,
|
|
3017
1470
|
errors: [NotFound],
|
|
3018
1471
|
protocol: TursoProtocol,
|
|
3019
1472
|
retry: Retry.Retry,
|
|
@@ -3027,8 +1480,8 @@ export const invalidateGroupTokens: API.OperationMethod<
|
|
|
3027
1480
|
InvalidateGroupTokensError,
|
|
3028
1481
|
TursoOpContext
|
|
3029
1482
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3030
|
-
input: InvalidateGroupTokensRequest
|
|
3031
|
-
output: InvalidateGroupTokensResponse
|
|
1483
|
+
input: __S(208, __c26, 0) as any as S.Schema<InvalidateGroupTokensRequest>,
|
|
1484
|
+
output: __S(32, __c4, 0) as any as S.Schema<InvalidateGroupTokensResponse>,
|
|
3032
1485
|
errors: [NotFound],
|
|
3033
1486
|
protocol: TursoProtocol,
|
|
3034
1487
|
retry: Retry.Retry,
|
|
@@ -3042,8 +1495,8 @@ export const inviteOrganizationMemberV2: API.OperationMethod<
|
|
|
3042
1495
|
InviteOrganizationMemberV2Error,
|
|
3043
1496
|
TursoOpContext
|
|
3044
1497
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3045
|
-
input: InviteOrganizationMemberV2Request
|
|
3046
|
-
output: InviteOrganizationMemberV2Response
|
|
1498
|
+
input: __S(216, __c27, 0) as any as S.Schema<InviteOrganizationMemberV2Request>,
|
|
1499
|
+
output: __S(218, __c27, 2) as any as S.Schema<InviteOrganizationMemberV2Response>,
|
|
3047
1500
|
errors: [BadRequest],
|
|
3048
1501
|
protocol: TursoProtocol,
|
|
3049
1502
|
retry: Retry.Retry,
|
|
@@ -3057,8 +1510,8 @@ export const listAPITokens: API.OperationMethod<
|
|
|
3057
1510
|
ListAPITokensError,
|
|
3058
1511
|
TursoOpContext
|
|
3059
1512
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3060
|
-
input: ListAPITokensRequest
|
|
3061
|
-
output: ListAPITokensResponse
|
|
1513
|
+
input: __S(224, __c28, 0) as any as S.Schema<ListAPITokensRequest>,
|
|
1514
|
+
output: __S(227, __c28, 3) as any as S.Schema<ListAPITokensResponse>,
|
|
3062
1515
|
errors: [],
|
|
3063
1516
|
protocol: TursoProtocol,
|
|
3064
1517
|
retry: Retry.Retry,
|
|
@@ -3072,8 +1525,8 @@ export const listDatabaseInstances: API.OperationMethod<
|
|
|
3072
1525
|
ListDatabaseInstancesError,
|
|
3073
1526
|
TursoOpContext
|
|
3074
1527
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3075
|
-
input: ListDatabaseInstancesRequest
|
|
3076
|
-
output: ListDatabaseInstancesResponse
|
|
1528
|
+
input: __S(232, __c29, 0) as any as S.Schema<ListDatabaseInstancesRequest>,
|
|
1529
|
+
output: __S(234, __c29, 2) as any as S.Schema<ListDatabaseInstancesResponse>,
|
|
3077
1530
|
errors: [NotFound],
|
|
3078
1531
|
protocol: TursoProtocol,
|
|
3079
1532
|
retry: Retry.Retry,
|
|
@@ -3087,8 +1540,8 @@ export const listDatabases: API.OperationMethod<
|
|
|
3087
1540
|
ListDatabasesError,
|
|
3088
1541
|
TursoOpContext
|
|
3089
1542
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3090
|
-
input: ListDatabasesRequest
|
|
3091
|
-
output: ListDatabasesResponse
|
|
1543
|
+
input: __S(240, __c30, 0) as any as S.Schema<ListDatabasesRequest>,
|
|
1544
|
+
output: __S(242, __c30, 2) as any as S.Schema<ListDatabasesResponse>,
|
|
3092
1545
|
errors: [],
|
|
3093
1546
|
protocol: TursoProtocol,
|
|
3094
1547
|
retry: Retry.Retry,
|
|
@@ -3102,8 +1555,8 @@ export const listDeletedDatabases: API.OperationMethod<
|
|
|
3102
1555
|
ListDeletedDatabasesError,
|
|
3103
1556
|
TursoOpContext
|
|
3104
1557
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3105
|
-
input: ListDeletedDatabasesRequest
|
|
3106
|
-
output: ListDeletedDatabasesResponse
|
|
1558
|
+
input: __S(248, __c31, 0) as any as S.Schema<ListDeletedDatabasesRequest>,
|
|
1559
|
+
output: __S(249, __c31, 1) as any as S.Schema<ListDeletedDatabasesResponse>,
|
|
3107
1560
|
errors: [Forbidden],
|
|
3108
1561
|
protocol: TursoProtocol,
|
|
3109
1562
|
retry: Retry.Retry,
|
|
@@ -3117,8 +1570,8 @@ export const listDeletedGroups: API.OperationMethod<
|
|
|
3117
1570
|
ListDeletedGroupsError,
|
|
3118
1571
|
TursoOpContext
|
|
3119
1572
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3120
|
-
input: ListDeletedGroupsRequest
|
|
3121
|
-
output: ListDeletedGroupsResponse
|
|
1573
|
+
input: __S(280, __c35, 0) as any as S.Schema<ListDeletedGroupsRequest>,
|
|
1574
|
+
output: __S(283, __c35, 3) as any as S.Schema<ListDeletedGroupsResponse>,
|
|
3122
1575
|
errors: [Forbidden],
|
|
3123
1576
|
protocol: TursoProtocol,
|
|
3124
1577
|
retry: Retry.Retry,
|
|
@@ -3132,8 +1585,8 @@ export const listGroups: API.OperationMethod<
|
|
|
3132
1585
|
ListGroupsError,
|
|
3133
1586
|
TursoOpContext
|
|
3134
1587
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3135
|
-
input: ListGroupsRequest
|
|
3136
|
-
output: ListGroupsResponse
|
|
1588
|
+
input: __S(288, __c36, 0) as any as S.Schema<ListGroupsRequest>,
|
|
1589
|
+
output: __S(290, __c36, 2) as any as S.Schema<ListGroupsResponse>,
|
|
3137
1590
|
errors: [],
|
|
3138
1591
|
protocol: TursoProtocol,
|
|
3139
1592
|
retry: Retry.Retry,
|
|
@@ -3147,23 +1600,23 @@ export const listLocations: API.OperationMethod<
|
|
|
3147
1600
|
ListLocationsError,
|
|
3148
1601
|
TursoOpContext
|
|
3149
1602
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3150
|
-
input: ListLocationsRequest
|
|
3151
|
-
output: ListLocationsResponse
|
|
1603
|
+
input: __S(296, __c37, 0) as any as S.Schema<ListLocationsRequest>,
|
|
1604
|
+
output: __S(297, __c37, 1) as any as S.Schema<ListLocationsResponse>,
|
|
3152
1605
|
errors: [],
|
|
3153
1606
|
protocol: TursoProtocol,
|
|
3154
1607
|
retry: Retry.Retry,
|
|
3155
1608
|
}));
|
|
3156
1609
|
|
|
3157
1610
|
export type ListOrganizationAPITokensError = TursoOpError;
|
|
3158
|
-
/** List Organization API Tokens Returns the API tokens scoped to this organization (both organization-scoped and group-scoped). Unrestricted tokens are not returned here
|
|
1611
|
+
/** List Organization API Tokens Returns the API tokens scoped to this organization (both organization-scoped and group-scoped). Unrestricted tokens are not returned here -- manage those via [`GET /v1/auth/api-tokens`](/api-reference/tokens/list). Authorization is symmetric with the revoke endpoint: - **Admins and owners** see every token scoped to the organization, with the minting user attached in the `owner` field. - **Members and viewers** see only tokens they minted themselves. This mirrors the personal-access-token model used in GitHub organization settings: admins get the full attribution list; everyone else sees their own access. */
|
|
3159
1612
|
export const listOrganizationAPITokens: API.OperationMethod<
|
|
3160
1613
|
ListOrganizationAPITokensRequest,
|
|
3161
1614
|
ListOrganizationAPITokensResponse,
|
|
3162
1615
|
ListOrganizationAPITokensError,
|
|
3163
1616
|
TursoOpContext
|
|
3164
1617
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3165
|
-
input: ListOrganizationAPITokensRequest
|
|
3166
|
-
output: ListOrganizationAPITokensResponse
|
|
1618
|
+
input: __S(312, __c39, 0) as any as S.Schema<ListOrganizationAPITokensRequest>,
|
|
1619
|
+
output: __S(316, __c39, 4) as any as S.Schema<ListOrganizationAPITokensResponse>,
|
|
3167
1620
|
errors: [],
|
|
3168
1621
|
protocol: TursoProtocol,
|
|
3169
1622
|
retry: Retry.Retry,
|
|
@@ -3177,8 +1630,8 @@ export const listOrganizationAuditLogs: API.OperationMethod<
|
|
|
3177
1630
|
ListOrganizationAuditLogsError,
|
|
3178
1631
|
TursoOpContext
|
|
3179
1632
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3180
|
-
input: ListOrganizationAuditLogsRequest
|
|
3181
|
-
output: ListOrganizationAuditLogsResponse
|
|
1633
|
+
input: __S(320, __c40, 0) as any as S.Schema<ListOrganizationAuditLogsRequest>,
|
|
1634
|
+
output: __S(324, __c40, 4) as any as S.Schema<ListOrganizationAuditLogsResponse>,
|
|
3182
1635
|
errors: [],
|
|
3183
1636
|
protocol: TursoProtocol,
|
|
3184
1637
|
retry: Retry.Retry,
|
|
@@ -3192,8 +1645,8 @@ export const listOrganizationInvitesV2: API.OperationMethod<
|
|
|
3192
1645
|
ListOrganizationInvitesV2Error,
|
|
3193
1646
|
TursoOpContext
|
|
3194
1647
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3195
|
-
input: ListOrganizationInvitesV2Request
|
|
3196
|
-
output: ListOrganizationInvitesV2Response
|
|
1648
|
+
input: __S(328, __c41, 0) as any as S.Schema<ListOrganizationInvitesV2Request>,
|
|
1649
|
+
output: __S(331, __c41, 3) as any as S.Schema<ListOrganizationInvitesV2Response>,
|
|
3197
1650
|
errors: [],
|
|
3198
1651
|
protocol: TursoProtocol,
|
|
3199
1652
|
retry: Retry.Retry,
|
|
@@ -3207,8 +1660,8 @@ export const listOrganizationInvoices: API.OperationMethod<
|
|
|
3207
1660
|
ListOrganizationInvoicesError,
|
|
3208
1661
|
TursoOpContext
|
|
3209
1662
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3210
|
-
input: ListOrganizationInvoicesRequest
|
|
3211
|
-
output: ListOrganizationInvoicesResponse
|
|
1663
|
+
input: __S(336, __c42, 0) as any as S.Schema<ListOrganizationInvoicesRequest>,
|
|
1664
|
+
output: __S(339, __c42, 3) as any as S.Schema<ListOrganizationInvoicesResponse>,
|
|
3212
1665
|
errors: [],
|
|
3213
1666
|
protocol: TursoProtocol,
|
|
3214
1667
|
retry: Retry.Retry,
|
|
@@ -3222,8 +1675,8 @@ export const listOrganizationMembers: API.OperationMethod<
|
|
|
3222
1675
|
ListOrganizationMembersError,
|
|
3223
1676
|
TursoOpContext
|
|
3224
1677
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3225
|
-
input: ListOrganizationMembersRequest
|
|
3226
|
-
output: ListOrganizationMembersResponse
|
|
1678
|
+
input: __S(376, __c47, 0) as any as S.Schema<ListOrganizationMembersRequest>,
|
|
1679
|
+
output: __S(378, __c47, 2) as any as S.Schema<ListOrganizationMembersResponse>,
|
|
3227
1680
|
errors: [],
|
|
3228
1681
|
protocol: TursoProtocol,
|
|
3229
1682
|
retry: Retry.Retry,
|
|
@@ -3237,8 +1690,8 @@ export const listOrganizationPlans: API.OperationMethod<
|
|
|
3237
1690
|
ListOrganizationPlansError,
|
|
3238
1691
|
TursoOpContext
|
|
3239
1692
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3240
|
-
input: ListOrganizationPlansRequest
|
|
3241
|
-
output: ListOrganizationPlansResponse
|
|
1693
|
+
input: __S(384, __c48, 0) as any as S.Schema<ListOrganizationPlansRequest>,
|
|
1694
|
+
output: __S(390, __c48, 6) as any as S.Schema<ListOrganizationPlansResponse>,
|
|
3242
1695
|
errors: [],
|
|
3243
1696
|
protocol: TursoProtocol,
|
|
3244
1697
|
retry: Retry.Retry,
|
|
@@ -3252,8 +1705,8 @@ export const listOrganizations: API.OperationMethod<
|
|
|
3252
1705
|
ListOrganizationsError,
|
|
3253
1706
|
TursoOpContext
|
|
3254
1707
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3255
|
-
input: ListOrganizationsRequest
|
|
3256
|
-
output: ListOrganizationsResponse
|
|
1708
|
+
input: __S(392, __c49, 0) as any as S.Schema<ListOrganizationsRequest>,
|
|
1709
|
+
output: __S(394, __c49, 2) as any as S.Schema<ListOrganizationsResponse>,
|
|
3257
1710
|
errors: [],
|
|
3258
1711
|
protocol: TursoProtocol,
|
|
3259
1712
|
retry: Retry.Retry,
|
|
@@ -3267,8 +1720,8 @@ export const removeLocationFromGroup: API.OperationMethod<
|
|
|
3267
1720
|
RemoveLocationFromGroupError,
|
|
3268
1721
|
TursoOpContext
|
|
3269
1722
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3270
|
-
input: RemoveLocationFromGroupRequest
|
|
3271
|
-
output: RemoveLocationFromGroupResponse
|
|
1723
|
+
input: __S(400, __c50, 0) as any as S.Schema<RemoveLocationFromGroupRequest>,
|
|
1724
|
+
output: __S(368, __c46, 0) as any as S.Schema<RemoveLocationFromGroupResponse>,
|
|
3272
1725
|
errors: [BadRequest, NotFound],
|
|
3273
1726
|
protocol: TursoProtocol,
|
|
3274
1727
|
retry: Retry.Retry,
|
|
@@ -3282,8 +1735,8 @@ export const removeOrganizationMember: API.OperationMethod<
|
|
|
3282
1735
|
RemoveOrganizationMemberError,
|
|
3283
1736
|
TursoOpContext
|
|
3284
1737
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3285
|
-
input: RemoveOrganizationMemberRequest
|
|
3286
|
-
output: RemoveOrganizationMemberResponse
|
|
1738
|
+
input: __S(408, __c51, 0) as any as S.Schema<RemoveOrganizationMemberRequest>,
|
|
1739
|
+
output: __S(409, __c51, 1) as any as S.Schema<RemoveOrganizationMemberResponse>,
|
|
3287
1740
|
errors: [NotFound],
|
|
3288
1741
|
protocol: TursoProtocol,
|
|
3289
1742
|
retry: Retry.Retry,
|
|
@@ -3297,8 +1750,8 @@ export const restoreDatabase: API.OperationMethod<
|
|
|
3297
1750
|
RestoreDatabaseError,
|
|
3298
1751
|
TursoOpContext
|
|
3299
1752
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3300
|
-
input: RestoreDatabaseRequest
|
|
3301
|
-
output: RestoreDatabaseResponse
|
|
1753
|
+
input: __S(416, __c52, 0) as any as S.Schema<RestoreDatabaseRequest>,
|
|
1754
|
+
output: __S(417, __c52, 1) as any as S.Schema<RestoreDatabaseResponse>,
|
|
3302
1755
|
errors: [BadRequest, Forbidden, NotFound],
|
|
3303
1756
|
protocol: TursoProtocol,
|
|
3304
1757
|
retry: Retry.Retry,
|
|
@@ -3312,8 +1765,8 @@ export const restoreGroup: API.OperationMethod<
|
|
|
3312
1765
|
RestoreGroupError,
|
|
3313
1766
|
TursoOpContext
|
|
3314
1767
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3315
|
-
input: RestoreGroupRequest
|
|
3316
|
-
output: RestoreGroupResponse
|
|
1768
|
+
input: __S(424, __c53, 0) as any as S.Schema<RestoreGroupRequest>,
|
|
1769
|
+
output: __S(425, __c53, 1) as any as S.Schema<RestoreGroupResponse>,
|
|
3317
1770
|
errors: [BadRequest, Forbidden, NotFound],
|
|
3318
1771
|
protocol: TursoProtocol,
|
|
3319
1772
|
retry: Retry.Retry,
|
|
@@ -3327,23 +1780,23 @@ export const revokeAPIToken: API.OperationMethod<
|
|
|
3327
1780
|
RevokeAPITokenError,
|
|
3328
1781
|
TursoOpContext
|
|
3329
1782
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3330
|
-
input: RevokeAPITokenRequest
|
|
3331
|
-
output: RevokeAPITokenResponse
|
|
1783
|
+
input: __S(432, __c54, 0) as any as S.Schema<RevokeAPITokenRequest>,
|
|
1784
|
+
output: __S(440, __c55, 0) as any as S.Schema<RevokeAPITokenResponse>,
|
|
3332
1785
|
errors: [NotFound],
|
|
3333
1786
|
protocol: TursoProtocol,
|
|
3334
1787
|
retry: Retry.Retry,
|
|
3335
1788
|
}));
|
|
3336
1789
|
|
|
3337
1790
|
export type RevokeOrganizationAPITokenError = NotFound | TursoOpError;
|
|
3338
|
-
/** Revoke Organization API Token Revokes a token scoped to this organization. The path takes a token **ID**, not a name, because names are unique per user but not across users
|
|
1791
|
+
/** Revoke Organization API Token Revokes a token scoped to this organization. The path takes a token **ID**, not a name, because names are unique per user but not across users -- an admin revoking a member's token can't disambiguate by name alone. Authorization is symmetric with the list endpoint: - **Admins and owners** can revoke any token scoped to the organization (org-scoped or group-scoped, regardless of who minted it). - **Members and viewers** can revoke only tokens they minted themselves. A token scoped to a different organization returns `404`, not `403`, so the endpoint does not leak the existence of cross-org token IDs. Unrestricted tokens are also unreachable here and must be revoked via [`DELETE /v1/auth/api-tokens/{tokenName}`](/api-reference/tokens/revoke). */
|
|
3339
1792
|
export const revokeOrganizationAPIToken: API.OperationMethod<
|
|
3340
1793
|
RevokeOrganizationAPITokenRequest,
|
|
3341
1794
|
RevokeOrganizationAPITokenResponse,
|
|
3342
1795
|
RevokeOrganizationAPITokenError,
|
|
3343
1796
|
TursoOpContext
|
|
3344
1797
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3345
|
-
input: RevokeOrganizationAPITokenRequest
|
|
3346
|
-
output: RevokeOrganizationAPITokenResponse
|
|
1798
|
+
input: __S(448, __c56, 0) as any as S.Schema<RevokeOrganizationAPITokenRequest>,
|
|
1799
|
+
output: __S(440, __c55, 0) as any as S.Schema<RevokeOrganizationAPITokenResponse>,
|
|
3347
1800
|
errors: [NotFound],
|
|
3348
1801
|
protocol: TursoProtocol,
|
|
3349
1802
|
retry: Retry.Retry,
|
|
@@ -3357,8 +1810,8 @@ export const transferGroup: API.OperationMethod<
|
|
|
3357
1810
|
TransferGroupError,
|
|
3358
1811
|
TursoOpContext
|
|
3359
1812
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3360
|
-
input: TransferGroupRequest
|
|
3361
|
-
output: TransferGroupResponse
|
|
1813
|
+
input: __S(456, __c57, 0) as any as S.Schema<TransferGroupRequest>,
|
|
1814
|
+
output: __S(360, __c45, 0) as any as S.Schema<TransferGroupResponse>,
|
|
3362
1815
|
errors: [NotFound],
|
|
3363
1816
|
protocol: TursoProtocol,
|
|
3364
1817
|
retry: Retry.Retry,
|
|
@@ -3372,8 +1825,8 @@ export const unarchiveGroup: API.OperationMethod<
|
|
|
3372
1825
|
UnarchiveGroupError,
|
|
3373
1826
|
TursoOpContext
|
|
3374
1827
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3375
|
-
input: UnarchiveGroupRequest
|
|
3376
|
-
output: UnarchiveGroupResponse
|
|
1828
|
+
input: __S(472, __c59, 0) as any as S.Schema<UnarchiveGroupRequest>,
|
|
1829
|
+
output: __S(368, __c46, 0) as any as S.Schema<UnarchiveGroupResponse>,
|
|
3377
1830
|
errors: [NotFound],
|
|
3378
1831
|
protocol: TursoProtocol,
|
|
3379
1832
|
retry: Retry.Retry,
|
|
@@ -3387,8 +1840,8 @@ export const updateDatabaseConfiguration: API.OperationMethod<
|
|
|
3387
1840
|
UpdateDatabaseConfigurationError,
|
|
3388
1841
|
TursoOpContext
|
|
3389
1842
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3390
|
-
input: UpdateDatabaseConfigurationRequest
|
|
3391
|
-
output: DatabaseConfigurationResponse
|
|
1843
|
+
input: __S(480, __c60, 0) as any as S.Schema<UpdateDatabaseConfigurationRequest>,
|
|
1844
|
+
output: __S(72, __c9, 0) as any as S.Schema<DatabaseConfigurationResponse>,
|
|
3392
1845
|
errors: [NotFound],
|
|
3393
1846
|
protocol: TursoProtocol,
|
|
3394
1847
|
retry: Retry.Retry,
|
|
@@ -3402,8 +1855,8 @@ export const updateGroupConfiguration: API.OperationMethod<
|
|
|
3402
1855
|
UpdateGroupConfigurationError,
|
|
3403
1856
|
TursoOpContext
|
|
3404
1857
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3405
|
-
input: UpdateGroupConfigurationRequest
|
|
3406
|
-
output: GroupConfigurationResponse
|
|
1858
|
+
input: __S(488, __c61, 0) as any as S.Schema<UpdateGroupConfigurationRequest>,
|
|
1859
|
+
output: __S(136, __c17, 0) as any as S.Schema<GroupConfigurationResponse>,
|
|
3407
1860
|
errors: [NotFound],
|
|
3408
1861
|
protocol: TursoProtocol,
|
|
3409
1862
|
retry: Retry.Retry,
|
|
@@ -3417,8 +1870,8 @@ export const updateGroupDatabases: API.OperationMethod<
|
|
|
3417
1870
|
UpdateGroupDatabasesError,
|
|
3418
1871
|
TursoOpContext
|
|
3419
1872
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3420
|
-
input: UpdateGroupDatabasesRequest
|
|
3421
|
-
output: UpdateGroupDatabasesResponse
|
|
1873
|
+
input: __S(496, __c62, 0) as any as S.Schema<UpdateGroupDatabasesRequest>,
|
|
1874
|
+
output: __S(32, __c4, 0) as any as S.Schema<UpdateGroupDatabasesResponse>,
|
|
3422
1875
|
errors: [NotFound],
|
|
3423
1876
|
protocol: TursoProtocol,
|
|
3424
1877
|
retry: Retry.Retry,
|
|
@@ -3432,8 +1885,8 @@ export const updateMemberRole: API.OperationMethod<
|
|
|
3432
1885
|
UpdateMemberRoleError,
|
|
3433
1886
|
TursoOpContext
|
|
3434
1887
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3435
|
-
input: UpdateMemberRoleRequest
|
|
3436
|
-
output: UpdateMemberRoleResponse
|
|
1888
|
+
input: __S(504, __c63, 0) as any as S.Schema<UpdateMemberRoleRequest>,
|
|
1889
|
+
output: __S(506, __c63, 2) as any as S.Schema<UpdateMemberRoleResponse>,
|
|
3437
1890
|
errors: [BadRequest, Forbidden, NotFound],
|
|
3438
1891
|
protocol: TursoProtocol,
|
|
3439
1892
|
retry: Retry.Retry,
|
|
@@ -3447,8 +1900,8 @@ export const updateOrganization: API.OperationMethod<
|
|
|
3447
1900
|
UpdateOrganizationError,
|
|
3448
1901
|
TursoOpContext
|
|
3449
1902
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3450
|
-
input: UpdateOrganizationRequest
|
|
3451
|
-
output: UpdateOrganizationResponse
|
|
1903
|
+
input: __S(512, __c64, 0) as any as S.Schema<UpdateOrganizationRequest>,
|
|
1904
|
+
output: __S(160, __c20, 0) as any as S.Schema<UpdateOrganizationResponse>,
|
|
3452
1905
|
errors: [],
|
|
3453
1906
|
protocol: TursoProtocol,
|
|
3454
1907
|
retry: Retry.Retry,
|
|
@@ -3462,9 +1915,1532 @@ export const validateAPIToken: API.OperationMethod<
|
|
|
3462
1915
|
ValidateAPITokenError,
|
|
3463
1916
|
TursoOpContext
|
|
3464
1917
|
> = /*@__PURE__*/ API.make(() => ({
|
|
3465
|
-
input: ValidateAPITokenRequest
|
|
3466
|
-
output: ValidateAPITokenResponse
|
|
1918
|
+
input: __S(520, __c65, 0) as any as S.Schema<ValidateAPITokenRequest>,
|
|
1919
|
+
output: __S(521, __c65, 1) as any as S.Schema<ValidateAPITokenResponse>,
|
|
3467
1920
|
errors: [],
|
|
3468
1921
|
protocol: TursoProtocol,
|
|
3469
1922
|
retry: Retry.Retry,
|
|
3470
1923
|
}));
|
|
1924
|
+
|
|
1925
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
1926
|
+
function __c0(j: number): any {
|
|
1927
|
+
switch (j) {
|
|
1928
|
+
case 0:
|
|
1929
|
+
return S.suspend(() =>
|
|
1930
|
+
S.Struct({
|
|
1931
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
1932
|
+
groupName: S.String.pipe(T.Label()),
|
|
1933
|
+
expiration: S.optional(S.String.pipe(T.Query())),
|
|
1934
|
+
authorization: S.optional(S.String.pipe(T.Query())),
|
|
1935
|
+
permissions: S.optional(__S(553, __c69, 1)),
|
|
1936
|
+
}).pipe(
|
|
1937
|
+
T.Http({
|
|
1938
|
+
method: "POST",
|
|
1939
|
+
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/auth/tokens",
|
|
1940
|
+
code: 200,
|
|
1941
|
+
}),
|
|
1942
|
+
),
|
|
1943
|
+
).annotate({ identifier: "CreateGroupTokenRequest" });
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
function __c1(j: number): any {
|
|
1947
|
+
switch (j) {
|
|
1948
|
+
case 0:
|
|
1949
|
+
return S.suspend(() =>
|
|
1950
|
+
S.Struct({
|
|
1951
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
1952
|
+
databaseName: S.String.pipe(T.Label()),
|
|
1953
|
+
}).pipe(
|
|
1954
|
+
T.Http({
|
|
1955
|
+
method: "DELETE",
|
|
1956
|
+
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}",
|
|
1957
|
+
code: 200,
|
|
1958
|
+
}),
|
|
1959
|
+
),
|
|
1960
|
+
).annotate({ identifier: "DeleteDatabaseRequest" });
|
|
1961
|
+
case 1:
|
|
1962
|
+
return S.suspend(() =>
|
|
1963
|
+
S.Struct({
|
|
1964
|
+
database: S.optional(S.String),
|
|
1965
|
+
}),
|
|
1966
|
+
).annotate({ identifier: "DeleteDatabaseResponse" });
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
function __c2(j: number): any {
|
|
1970
|
+
switch (j) {
|
|
1971
|
+
case 0:
|
|
1972
|
+
return S.suspend(() =>
|
|
1973
|
+
S.Struct({
|
|
1974
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
1975
|
+
groupName: S.String.pipe(T.Label()),
|
|
1976
|
+
}).pipe(
|
|
1977
|
+
T.Http({
|
|
1978
|
+
method: "DELETE",
|
|
1979
|
+
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}",
|
|
1980
|
+
code: 200,
|
|
1981
|
+
}),
|
|
1982
|
+
),
|
|
1983
|
+
).annotate({ identifier: "DeleteGroupRequest" });
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
function __c3(j: number): any {
|
|
1987
|
+
switch (j) {
|
|
1988
|
+
case 0:
|
|
1989
|
+
return S.suspend(() =>
|
|
1990
|
+
S.Struct({
|
|
1991
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
1992
|
+
email: S.String.pipe(T.Label()),
|
|
1993
|
+
}).pipe(
|
|
1994
|
+
T.Http({
|
|
1995
|
+
method: "DELETE",
|
|
1996
|
+
uri: "/v2/organizations/{organizationSlug}/invites/{email}",
|
|
1997
|
+
code: 200,
|
|
1998
|
+
}),
|
|
1999
|
+
),
|
|
2000
|
+
).annotate({ identifier: "DeleteOrganizationInviteByEmailV2Request" });
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
function __c4(j: number): any {
|
|
2004
|
+
switch (j) {
|
|
2005
|
+
case 0:
|
|
2006
|
+
return S.suspend(() => S.Struct({})).annotate({
|
|
2007
|
+
identifier: "DeleteOrganizationInviteByEmailV2Response",
|
|
2008
|
+
});
|
|
2009
|
+
}
|
|
2010
|
+
}
|
|
2011
|
+
function __c5(j: number): any {
|
|
2012
|
+
switch (j) {
|
|
2013
|
+
case 0:
|
|
2014
|
+
return S.suspend(() =>
|
|
2015
|
+
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/user", code: 200 })),
|
|
2016
|
+
).annotate({ identifier: "GetCurrentUserRequest" });
|
|
2017
|
+
case 1:
|
|
2018
|
+
return S.suspend(() =>
|
|
2019
|
+
S.Struct({
|
|
2020
|
+
username: S.optional(S.String),
|
|
2021
|
+
name: S.optional(S.String),
|
|
2022
|
+
email: S.optional(S.String),
|
|
2023
|
+
avatarUrl: S.optional(S.String),
|
|
2024
|
+
plan: S.optional(S.String),
|
|
2025
|
+
mfa: S.optional(S.Boolean),
|
|
2026
|
+
has_pending_invites: S.optional(S.Boolean),
|
|
2027
|
+
}),
|
|
2028
|
+
).annotate({ identifier: "GetCurrentUserResponseUser" });
|
|
2029
|
+
case 2:
|
|
2030
|
+
return S.suspend(() =>
|
|
2031
|
+
S.Struct({
|
|
2032
|
+
user: S.optional(__S(41, __c5, 1)),
|
|
2033
|
+
}),
|
|
2034
|
+
).annotate({ identifier: "GetCurrentUserResponse" });
|
|
2035
|
+
}
|
|
2036
|
+
}
|
|
2037
|
+
function __c6(j: number): any {
|
|
2038
|
+
switch (j) {
|
|
2039
|
+
case 0:
|
|
2040
|
+
return S.suspend(() =>
|
|
2041
|
+
S.Struct({
|
|
2042
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2043
|
+
databaseName: S.String.pipe(T.Label()),
|
|
2044
|
+
}).pipe(
|
|
2045
|
+
T.Http({
|
|
2046
|
+
method: "GET",
|
|
2047
|
+
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}",
|
|
2048
|
+
code: 200,
|
|
2049
|
+
}),
|
|
2050
|
+
),
|
|
2051
|
+
).annotate({ identifier: "GetDatabaseRequest" });
|
|
2052
|
+
case 1:
|
|
2053
|
+
return S.suspend(() =>
|
|
2054
|
+
S.Struct({
|
|
2055
|
+
database: S.optional(__S(57, __c7, 1)),
|
|
2056
|
+
}),
|
|
2057
|
+
).annotate({ identifier: "GetDatabaseResponse" });
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
2060
|
+
function __c7(j: number): any {
|
|
2061
|
+
switch (j) {
|
|
2062
|
+
case 0:
|
|
2063
|
+
return S.suspend(() =>
|
|
2064
|
+
S.Struct({
|
|
2065
|
+
id: S.optional(S.String),
|
|
2066
|
+
name: S.optional(S.String),
|
|
2067
|
+
branched_at: S.optional(S.String),
|
|
2068
|
+
}),
|
|
2069
|
+
).annotate({ identifier: "DatabaseParent" });
|
|
2070
|
+
case 1:
|
|
2071
|
+
return S.suspend(() =>
|
|
2072
|
+
S.Struct({
|
|
2073
|
+
Name: S.optional(S.String),
|
|
2074
|
+
DbId: S.optional(S.String),
|
|
2075
|
+
Hostname: S.optional(S.String),
|
|
2076
|
+
block_reads: S.optional(S.Boolean),
|
|
2077
|
+
block_writes: S.optional(S.Boolean),
|
|
2078
|
+
regions: S.optional(__S(352, __c44, 0)),
|
|
2079
|
+
primaryRegion: S.optional(S.String),
|
|
2080
|
+
group: S.optional(S.String),
|
|
2081
|
+
delete_protection: S.optional(S.Boolean),
|
|
2082
|
+
parent: S.optional(S.NullOr(__S(56, __c7, 0))),
|
|
2083
|
+
allow_attach: S.optional(S.Boolean),
|
|
2084
|
+
}),
|
|
2085
|
+
).annotate({ identifier: "Database" });
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
function __c8(j: number): any {
|
|
2089
|
+
switch (j) {
|
|
2090
|
+
case 0:
|
|
2091
|
+
return S.suspend(() =>
|
|
2092
|
+
S.Struct({
|
|
2093
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2094
|
+
databaseName: S.String.pipe(T.Label()),
|
|
2095
|
+
}).pipe(
|
|
2096
|
+
T.Http({
|
|
2097
|
+
method: "GET",
|
|
2098
|
+
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/configuration",
|
|
2099
|
+
code: 200,
|
|
2100
|
+
}),
|
|
2101
|
+
),
|
|
2102
|
+
).annotate({ identifier: "GetDatabaseConfigurationRequest" });
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
function __c9(j: number): any {
|
|
2106
|
+
switch (j) {
|
|
2107
|
+
case 0:
|
|
2108
|
+
return S.suspend(() =>
|
|
2109
|
+
S.Struct({
|
|
2110
|
+
size_limit: S.optional(S.String),
|
|
2111
|
+
allow_attach: S.optional(S.Boolean),
|
|
2112
|
+
block_reads: S.optional(S.Boolean),
|
|
2113
|
+
block_writes: S.optional(S.Boolean),
|
|
2114
|
+
delete_protection: S.optional(S.Boolean),
|
|
2115
|
+
allowed_ips: S.optional(__S(352, __c44, 0)),
|
|
2116
|
+
allowed_aws_vpc_ids: S.optional(__S(352, __c44, 0)),
|
|
2117
|
+
}),
|
|
2118
|
+
).annotate({ identifier: "DatabaseConfigurationResponse" });
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
function __c10(j: number): any {
|
|
2122
|
+
switch (j) {
|
|
2123
|
+
case 0:
|
|
2124
|
+
return S.suspend(() =>
|
|
2125
|
+
S.Struct({
|
|
2126
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2127
|
+
databaseName: S.String.pipe(T.Label()),
|
|
2128
|
+
instanceName: S.String.pipe(T.Label()),
|
|
2129
|
+
}).pipe(
|
|
2130
|
+
T.Http({
|
|
2131
|
+
method: "GET",
|
|
2132
|
+
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/instances/{instanceName}",
|
|
2133
|
+
code: 200,
|
|
2134
|
+
}),
|
|
2135
|
+
),
|
|
2136
|
+
).annotate({ identifier: "GetDatabaseInstanceRequest" });
|
|
2137
|
+
case 1:
|
|
2138
|
+
return S.suspend(() =>
|
|
2139
|
+
S.Struct({
|
|
2140
|
+
instance: S.optional(__S(88, __c11, 0)),
|
|
2141
|
+
}),
|
|
2142
|
+
).annotate({ identifier: "GetDatabaseInstanceResponse" });
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
function __c11(j: number): any {
|
|
2146
|
+
switch (j) {
|
|
2147
|
+
case 0:
|
|
2148
|
+
return S.suspend(() =>
|
|
2149
|
+
S.Struct({
|
|
2150
|
+
uuid: S.optional(S.String),
|
|
2151
|
+
name: S.optional(S.String),
|
|
2152
|
+
type: S.optional(S.String),
|
|
2153
|
+
region: S.optional(S.String),
|
|
2154
|
+
hostname: S.optional(S.String),
|
|
2155
|
+
}),
|
|
2156
|
+
).annotate({ identifier: "Instance" });
|
|
2157
|
+
}
|
|
2158
|
+
}
|
|
2159
|
+
function __c12(j: number): any {
|
|
2160
|
+
switch (j) {
|
|
2161
|
+
case 0:
|
|
2162
|
+
return S.suspend(() =>
|
|
2163
|
+
S.Struct({
|
|
2164
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2165
|
+
databaseName: S.String.pipe(T.Label()),
|
|
2166
|
+
}).pipe(
|
|
2167
|
+
T.Http({
|
|
2168
|
+
method: "GET",
|
|
2169
|
+
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/stats",
|
|
2170
|
+
code: 200,
|
|
2171
|
+
}),
|
|
2172
|
+
),
|
|
2173
|
+
).annotate({ identifier: "GetDatabaseStatsRequest" });
|
|
2174
|
+
case 1:
|
|
2175
|
+
return S.suspend(() =>
|
|
2176
|
+
S.Struct({
|
|
2177
|
+
query: S.optional(S.String),
|
|
2178
|
+
rows_read: S.optional(S.Number),
|
|
2179
|
+
rows_written: S.optional(S.Number),
|
|
2180
|
+
}),
|
|
2181
|
+
).annotate({ identifier: "DatabaseStatsOutput" });
|
|
2182
|
+
case 2:
|
|
2183
|
+
return S.Array(__S(97, __c12, 1));
|
|
2184
|
+
case 3:
|
|
2185
|
+
return S.suspend(() =>
|
|
2186
|
+
S.Struct({
|
|
2187
|
+
top_queries: S.optional(S.NullOr(__S(98, __c12, 2))),
|
|
2188
|
+
}),
|
|
2189
|
+
).annotate({ identifier: "GetDatabaseStatsResponse" });
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
function __c13(j: number): any {
|
|
2193
|
+
switch (j) {
|
|
2194
|
+
case 0:
|
|
2195
|
+
return S.suspend(() =>
|
|
2196
|
+
S.Struct({
|
|
2197
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2198
|
+
databaseName: S.String.pipe(T.Label()),
|
|
2199
|
+
from: S.optional(S.String.pipe(T.Query())),
|
|
2200
|
+
to: S.optional(S.String.pipe(T.Query())),
|
|
2201
|
+
}).pipe(
|
|
2202
|
+
T.Http({
|
|
2203
|
+
method: "GET",
|
|
2204
|
+
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/usage",
|
|
2205
|
+
code: 200,
|
|
2206
|
+
}),
|
|
2207
|
+
),
|
|
2208
|
+
).annotate({ identifier: "GetDatabaseUsageRequest" });
|
|
2209
|
+
case 1:
|
|
2210
|
+
return S.suspend(() =>
|
|
2211
|
+
S.Struct({
|
|
2212
|
+
database: S.optional(__S(115, __c14, 3)),
|
|
2213
|
+
}),
|
|
2214
|
+
).annotate({ identifier: "GetDatabaseUsageResponse" });
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
function __c14(j: number): any {
|
|
2218
|
+
switch (j) {
|
|
2219
|
+
case 0:
|
|
2220
|
+
return S.suspend(() =>
|
|
2221
|
+
S.Struct({
|
|
2222
|
+
rows_read: S.optional(S.Number),
|
|
2223
|
+
rows_written: S.optional(S.Number),
|
|
2224
|
+
storage_bytes: S.optional(S.Number),
|
|
2225
|
+
bytes_synced: S.optional(S.Number),
|
|
2226
|
+
}),
|
|
2227
|
+
).annotate({ identifier: "DatabaseUsageObject" });
|
|
2228
|
+
case 1:
|
|
2229
|
+
return S.suspend(() =>
|
|
2230
|
+
S.Struct({
|
|
2231
|
+
uuid: S.optional(S.String),
|
|
2232
|
+
usage: S.optional(__S(112, __c14, 0)),
|
|
2233
|
+
}),
|
|
2234
|
+
).annotate({ identifier: "DatabaseUsageOutputInstancesItem" });
|
|
2235
|
+
case 2:
|
|
2236
|
+
return S.Array(__S(113, __c14, 1));
|
|
2237
|
+
case 3:
|
|
2238
|
+
return S.suspend(() =>
|
|
2239
|
+
S.Struct({
|
|
2240
|
+
uuid: S.optional(S.String),
|
|
2241
|
+
instances: S.optional(__S(114, __c14, 2)),
|
|
2242
|
+
total: S.optional(__S(112, __c14, 0)),
|
|
2243
|
+
}),
|
|
2244
|
+
).annotate({ identifier: "DatabaseUsageOutput" });
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2247
|
+
function __c15(j: number): any {
|
|
2248
|
+
switch (j) {
|
|
2249
|
+
case 0:
|
|
2250
|
+
return S.suspend(() =>
|
|
2251
|
+
S.Struct({
|
|
2252
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2253
|
+
groupName: S.String.pipe(T.Label()),
|
|
2254
|
+
}).pipe(
|
|
2255
|
+
T.Http({
|
|
2256
|
+
method: "GET",
|
|
2257
|
+
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}",
|
|
2258
|
+
code: 200,
|
|
2259
|
+
}),
|
|
2260
|
+
),
|
|
2261
|
+
).annotate({ identifier: "GetGroupRequest" });
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
function __c16(j: number): any {
|
|
2265
|
+
switch (j) {
|
|
2266
|
+
case 0:
|
|
2267
|
+
return S.suspend(() =>
|
|
2268
|
+
S.Struct({
|
|
2269
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2270
|
+
groupName: S.String.pipe(T.Label()),
|
|
2271
|
+
}).pipe(
|
|
2272
|
+
T.Http({
|
|
2273
|
+
method: "GET",
|
|
2274
|
+
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/configuration",
|
|
2275
|
+
code: 200,
|
|
2276
|
+
}),
|
|
2277
|
+
),
|
|
2278
|
+
).annotate({ identifier: "GetGroupConfigurationRequest" });
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
function __c17(j: number): any {
|
|
2282
|
+
switch (j) {
|
|
2283
|
+
case 0:
|
|
2284
|
+
return S.suspend(() =>
|
|
2285
|
+
S.Struct({
|
|
2286
|
+
delete_protection: S.optional(S.Boolean),
|
|
2287
|
+
}),
|
|
2288
|
+
).annotate({ identifier: "GroupConfigurationResponse" });
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
function __c18(j: number): any {
|
|
2292
|
+
switch (j) {
|
|
2293
|
+
case 0:
|
|
2294
|
+
return S.suspend(() =>
|
|
2295
|
+
S.Struct({
|
|
2296
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2297
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}", code: 200 })),
|
|
2298
|
+
).annotate({ identifier: "GetOrganizationRequest" });
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
function __c19(j: number): any {
|
|
2302
|
+
switch (j) {
|
|
2303
|
+
case 0:
|
|
2304
|
+
return S.suspend(() =>
|
|
2305
|
+
S.Struct({
|
|
2306
|
+
name: S.optional(S.String),
|
|
2307
|
+
slug: S.optional(S.String),
|
|
2308
|
+
type: S.optional(S.String),
|
|
2309
|
+
overages: S.optional(S.Boolean),
|
|
2310
|
+
require_mfa: S.optional(S.Boolean),
|
|
2311
|
+
blocked_reads: S.optional(S.Boolean),
|
|
2312
|
+
blocked_writes: S.optional(S.Boolean),
|
|
2313
|
+
plan_id: S.optional(S.String),
|
|
2314
|
+
plan_timeline: S.optional(S.String),
|
|
2315
|
+
platform: S.optional(S.String),
|
|
2316
|
+
restore_enabled: S.optional(S.Boolean),
|
|
2317
|
+
}),
|
|
2318
|
+
).annotate({ identifier: "Organization" });
|
|
2319
|
+
}
|
|
2320
|
+
}
|
|
2321
|
+
function __c20(j: number): any {
|
|
2322
|
+
switch (j) {
|
|
2323
|
+
case 0:
|
|
2324
|
+
return S.suspend(() =>
|
|
2325
|
+
S.Struct({
|
|
2326
|
+
organization: S.optional(__S(152, __c19, 0)),
|
|
2327
|
+
}),
|
|
2328
|
+
).annotate({ identifier: "GetOrganizationResponse" });
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
function __c21(j: number): any {
|
|
2332
|
+
switch (j) {
|
|
2333
|
+
case 0:
|
|
2334
|
+
return S.suspend(() =>
|
|
2335
|
+
S.Struct({
|
|
2336
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2337
|
+
username: S.String.pipe(T.Label()),
|
|
2338
|
+
}).pipe(
|
|
2339
|
+
T.Http({
|
|
2340
|
+
method: "GET",
|
|
2341
|
+
uri: "/v1/organizations/{organizationSlug}/members/{username}",
|
|
2342
|
+
code: 200,
|
|
2343
|
+
}),
|
|
2344
|
+
),
|
|
2345
|
+
).annotate({ identifier: "GetOrganizationMemberRequest" });
|
|
2346
|
+
case 1:
|
|
2347
|
+
return S.suspend(() =>
|
|
2348
|
+
S.Struct({
|
|
2349
|
+
member: S.optional(__S(176, __c22, 0)),
|
|
2350
|
+
}),
|
|
2351
|
+
).annotate({ identifier: "GetOrganizationMemberResponse" });
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
2354
|
+
function __c22(j: number): any {
|
|
2355
|
+
switch (j) {
|
|
2356
|
+
case 0:
|
|
2357
|
+
return S.suspend(() =>
|
|
2358
|
+
S.Struct({
|
|
2359
|
+
username: S.optional(S.String),
|
|
2360
|
+
role: S.optional(S.String),
|
|
2361
|
+
email: S.optional(S.String),
|
|
2362
|
+
}),
|
|
2363
|
+
).annotate({ identifier: "Member" });
|
|
2364
|
+
}
|
|
2365
|
+
}
|
|
2366
|
+
function __c23(j: number): any {
|
|
2367
|
+
switch (j) {
|
|
2368
|
+
case 0:
|
|
2369
|
+
return S.suspend(() =>
|
|
2370
|
+
S.Struct({
|
|
2371
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2372
|
+
}).pipe(
|
|
2373
|
+
T.Http({
|
|
2374
|
+
method: "GET",
|
|
2375
|
+
uri: "/v1/organizations/{organizationSlug}/subscription",
|
|
2376
|
+
code: 200,
|
|
2377
|
+
}),
|
|
2378
|
+
),
|
|
2379
|
+
).annotate({ identifier: "GetOrganizationSubscriptionRequest" });
|
|
2380
|
+
case 1:
|
|
2381
|
+
return S.suspend(() =>
|
|
2382
|
+
S.Struct({
|
|
2383
|
+
name: S.optional(S.String),
|
|
2384
|
+
overages: S.optional(S.Boolean),
|
|
2385
|
+
plan: S.optional(S.String),
|
|
2386
|
+
timeline: S.optional(S.String),
|
|
2387
|
+
}),
|
|
2388
|
+
).annotate({ identifier: "GetOrganizationSubscriptionResponseSubscription" });
|
|
2389
|
+
case 2:
|
|
2390
|
+
return S.suspend(() =>
|
|
2391
|
+
S.Struct({
|
|
2392
|
+
subscription: S.optional(__S(185, __c23, 1)),
|
|
2393
|
+
}),
|
|
2394
|
+
).annotate({ identifier: "GetOrganizationSubscriptionResponse" });
|
|
2395
|
+
}
|
|
2396
|
+
}
|
|
2397
|
+
function __c24(j: number): any {
|
|
2398
|
+
switch (j) {
|
|
2399
|
+
case 0:
|
|
2400
|
+
return S.suspend(() =>
|
|
2401
|
+
S.Struct({
|
|
2402
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2403
|
+
}).pipe(
|
|
2404
|
+
T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/usage", code: 200 }),
|
|
2405
|
+
),
|
|
2406
|
+
).annotate({ identifier: "GetOrganizationUsageRequest" });
|
|
2407
|
+
case 1:
|
|
2408
|
+
return S.suspend(() =>
|
|
2409
|
+
S.Struct({
|
|
2410
|
+
rows_read: S.optional(S.Number),
|
|
2411
|
+
rows_written: S.optional(S.Number),
|
|
2412
|
+
databases: S.optional(S.Number),
|
|
2413
|
+
locations: S.optional(S.Number),
|
|
2414
|
+
storage_bytes: S.optional(S.Number),
|
|
2415
|
+
groups: S.optional(S.Number),
|
|
2416
|
+
bytes_synced: S.optional(S.Number),
|
|
2417
|
+
}),
|
|
2418
|
+
).annotate({ identifier: "GetOrganizationUsageResponseOrganizationUsage" });
|
|
2419
|
+
case 2:
|
|
2420
|
+
return S.Array(__S(115, __c14, 3));
|
|
2421
|
+
case 3:
|
|
2422
|
+
return S.suspend(() =>
|
|
2423
|
+
S.Struct({
|
|
2424
|
+
uuid: S.optional(S.String),
|
|
2425
|
+
usage: S.optional(__S(193, __c24, 1)),
|
|
2426
|
+
databases: S.optional(__S(194, __c24, 2)),
|
|
2427
|
+
}),
|
|
2428
|
+
).annotate({ identifier: "GetOrganizationUsageResponseOrganization" });
|
|
2429
|
+
case 4:
|
|
2430
|
+
return S.suspend(() =>
|
|
2431
|
+
S.Struct({
|
|
2432
|
+
organization: S.optional(__S(195, __c24, 3)),
|
|
2433
|
+
}),
|
|
2434
|
+
).annotate({ identifier: "GetOrganizationUsageResponse" });
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
function __c25(j: number): any {
|
|
2438
|
+
switch (j) {
|
|
2439
|
+
case 0:
|
|
2440
|
+
return S.suspend(() =>
|
|
2441
|
+
S.Struct({
|
|
2442
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2443
|
+
databaseName: S.String.pipe(T.Label()),
|
|
2444
|
+
}).pipe(
|
|
2445
|
+
T.Http({
|
|
2446
|
+
method: "POST",
|
|
2447
|
+
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/auth/rotate",
|
|
2448
|
+
code: 200,
|
|
2449
|
+
}),
|
|
2450
|
+
),
|
|
2451
|
+
).annotate({ identifier: "InvalidateDatabaseTokensRequest" });
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
function __c26(j: number): any {
|
|
2455
|
+
switch (j) {
|
|
2456
|
+
case 0:
|
|
2457
|
+
return S.suspend(() =>
|
|
2458
|
+
S.Struct({
|
|
2459
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2460
|
+
groupName: S.String.pipe(T.Label()),
|
|
2461
|
+
}).pipe(
|
|
2462
|
+
T.Http({
|
|
2463
|
+
method: "POST",
|
|
2464
|
+
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/auth/rotate",
|
|
2465
|
+
code: 200,
|
|
2466
|
+
}),
|
|
2467
|
+
),
|
|
2468
|
+
).annotate({ identifier: "InvalidateGroupTokensRequest" });
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
2471
|
+
function __c27(j: number): any {
|
|
2472
|
+
switch (j) {
|
|
2473
|
+
case 0:
|
|
2474
|
+
return S.suspend(() =>
|
|
2475
|
+
S.Struct({
|
|
2476
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2477
|
+
email: S.optional(S.String),
|
|
2478
|
+
username: S.optional(S.String),
|
|
2479
|
+
role: S.optional(S.String),
|
|
2480
|
+
}).pipe(
|
|
2481
|
+
T.Http({
|
|
2482
|
+
method: "POST",
|
|
2483
|
+
uri: "/v2/organizations/{organizationSlug}/invites",
|
|
2484
|
+
code: 200,
|
|
2485
|
+
}),
|
|
2486
|
+
),
|
|
2487
|
+
).annotate({ identifier: "InviteOrganizationMemberV2Request" });
|
|
2488
|
+
case 1:
|
|
2489
|
+
return S.suspend(() =>
|
|
2490
|
+
S.Struct({
|
|
2491
|
+
email: S.optional(S.String),
|
|
2492
|
+
role: S.optional(S.String),
|
|
2493
|
+
organization: S.optional(S.String),
|
|
2494
|
+
}),
|
|
2495
|
+
).annotate({ identifier: "InviteCreatedV2" });
|
|
2496
|
+
case 2:
|
|
2497
|
+
return S.suspend(() =>
|
|
2498
|
+
S.Struct({
|
|
2499
|
+
invited: S.optional(__S(217, __c27, 1)),
|
|
2500
|
+
}),
|
|
2501
|
+
).annotate({ identifier: "InviteOrganizationMemberV2Response" });
|
|
2502
|
+
}
|
|
2503
|
+
}
|
|
2504
|
+
function __c28(j: number): any {
|
|
2505
|
+
switch (j) {
|
|
2506
|
+
case 0:
|
|
2507
|
+
return S.suspend(() =>
|
|
2508
|
+
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/auth/api-tokens", code: 200 })),
|
|
2509
|
+
).annotate({ identifier: "ListAPITokensRequest" });
|
|
2510
|
+
case 1:
|
|
2511
|
+
return S.suspend(() =>
|
|
2512
|
+
S.Struct({
|
|
2513
|
+
name: S.optional(S.String),
|
|
2514
|
+
id: S.optional(S.String),
|
|
2515
|
+
organization: S.optional(S.String),
|
|
2516
|
+
group: S.optional(S.String),
|
|
2517
|
+
scopes: S.optional(__S(352, __c44, 0)),
|
|
2518
|
+
created_at: S.optional(S.String),
|
|
2519
|
+
}),
|
|
2520
|
+
).annotate({ identifier: "APIToken" });
|
|
2521
|
+
case 2:
|
|
2522
|
+
return S.Array(__S(225, __c28, 1));
|
|
2523
|
+
case 3:
|
|
2524
|
+
return S.suspend(() =>
|
|
2525
|
+
S.Struct({
|
|
2526
|
+
tokens: S.optional(__S(226, __c28, 2)),
|
|
2527
|
+
}),
|
|
2528
|
+
).annotate({ identifier: "ListAPITokensResponse" });
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
function __c29(j: number): any {
|
|
2532
|
+
switch (j) {
|
|
2533
|
+
case 0:
|
|
2534
|
+
return S.suspend(() =>
|
|
2535
|
+
S.Struct({
|
|
2536
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2537
|
+
databaseName: S.String.pipe(T.Label()),
|
|
2538
|
+
}).pipe(
|
|
2539
|
+
T.Http({
|
|
2540
|
+
method: "GET",
|
|
2541
|
+
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/instances",
|
|
2542
|
+
code: 200,
|
|
2543
|
+
}),
|
|
2544
|
+
),
|
|
2545
|
+
).annotate({ identifier: "ListDatabaseInstancesRequest" });
|
|
2546
|
+
case 1:
|
|
2547
|
+
return S.Array(__S(88, __c11, 0));
|
|
2548
|
+
case 2:
|
|
2549
|
+
return S.suspend(() =>
|
|
2550
|
+
S.Struct({
|
|
2551
|
+
instances: S.optional(__S(233, __c29, 1)),
|
|
2552
|
+
}),
|
|
2553
|
+
).annotate({ identifier: "ListDatabaseInstancesResponse" });
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
function __c30(j: number): any {
|
|
2557
|
+
switch (j) {
|
|
2558
|
+
case 0:
|
|
2559
|
+
return S.suspend(() =>
|
|
2560
|
+
S.Struct({
|
|
2561
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2562
|
+
group: S.optional(S.String.pipe(T.Query())),
|
|
2563
|
+
schema: S.optional(S.String.pipe(T.Query())),
|
|
2564
|
+
parent: S.optional(S.String.pipe(T.Query())),
|
|
2565
|
+
}).pipe(
|
|
2566
|
+
T.Http({
|
|
2567
|
+
method: "GET",
|
|
2568
|
+
uri: "/v1/organizations/{organizationSlug}/databases",
|
|
2569
|
+
code: 200,
|
|
2570
|
+
}),
|
|
2571
|
+
),
|
|
2572
|
+
).annotate({ identifier: "ListDatabasesRequest" });
|
|
2573
|
+
case 1:
|
|
2574
|
+
return S.Array(__S(57, __c7, 1));
|
|
2575
|
+
case 2:
|
|
2576
|
+
return S.suspend(() =>
|
|
2577
|
+
S.Struct({
|
|
2578
|
+
databases: S.optional(__S(241, __c30, 1)),
|
|
2579
|
+
}),
|
|
2580
|
+
).annotate({ identifier: "ListDatabasesResponse" });
|
|
2581
|
+
}
|
|
2582
|
+
}
|
|
2583
|
+
function __c31(j: number): any {
|
|
2584
|
+
switch (j) {
|
|
2585
|
+
case 0:
|
|
2586
|
+
return S.suspend(() =>
|
|
2587
|
+
S.Struct({
|
|
2588
|
+
organizationId: S.String.pipe(T.Label()),
|
|
2589
|
+
deleted: S.Boolean.pipe(T.Query()),
|
|
2590
|
+
search: S.optional(S.String.pipe(T.Query())),
|
|
2591
|
+
limit: S.optional(S.Number.pipe(T.Query())),
|
|
2592
|
+
cursor: S.optional(S.String.pipe(T.Query())),
|
|
2593
|
+
}).pipe(
|
|
2594
|
+
T.Http({ method: "GET", uri: "/v3/organizations/{organizationId}/databases", code: 200 }),
|
|
2595
|
+
),
|
|
2596
|
+
).annotate({ identifier: "ListDeletedDatabasesRequest" });
|
|
2597
|
+
case 1:
|
|
2598
|
+
return S.suspend(() =>
|
|
2599
|
+
S.Struct({
|
|
2600
|
+
databases: S.optional(__S(272, __c34, 0)),
|
|
2601
|
+
pagination: S.optional(__S(256, __c32, 0)),
|
|
2602
|
+
}),
|
|
2603
|
+
).annotate({ identifier: "ListDeletedDatabasesResponse" });
|
|
2604
|
+
}
|
|
2605
|
+
}
|
|
2606
|
+
function __c32(j: number): any {
|
|
2607
|
+
switch (j) {
|
|
2608
|
+
case 0:
|
|
2609
|
+
return S.suspend(() =>
|
|
2610
|
+
S.Struct({
|
|
2611
|
+
next: S.optional(S.String),
|
|
2612
|
+
}),
|
|
2613
|
+
).annotate({ identifier: "Pagination" });
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2616
|
+
function __c33(j: number): any {
|
|
2617
|
+
switch (j) {
|
|
2618
|
+
case 0:
|
|
2619
|
+
return S.suspend(() =>
|
|
2620
|
+
S.Struct({
|
|
2621
|
+
Name: S.optional(S.String),
|
|
2622
|
+
DbId: S.optional(S.String),
|
|
2623
|
+
Hostname: S.optional(S.String),
|
|
2624
|
+
group: S.optional(S.String),
|
|
2625
|
+
group_id: S.optional(S.String),
|
|
2626
|
+
organization_id: S.optional(S.String),
|
|
2627
|
+
regions: S.optional(__S(352, __c44, 0)),
|
|
2628
|
+
primaryRegion: S.optional(S.String),
|
|
2629
|
+
delete_protection: S.optional(S.Boolean),
|
|
2630
|
+
deleted_at: S.optional(S.String),
|
|
2631
|
+
group_deleted_at: S.optional(S.String),
|
|
2632
|
+
}),
|
|
2633
|
+
).annotate({ identifier: "DeletedDatabase" });
|
|
2634
|
+
}
|
|
2635
|
+
}
|
|
2636
|
+
function __c34(j: number): any {
|
|
2637
|
+
switch (j) {
|
|
2638
|
+
case 0:
|
|
2639
|
+
return S.Array(__S(264, __c33, 0));
|
|
2640
|
+
}
|
|
2641
|
+
}
|
|
2642
|
+
function __c35(j: number): any {
|
|
2643
|
+
switch (j) {
|
|
2644
|
+
case 0:
|
|
2645
|
+
return S.suspend(() =>
|
|
2646
|
+
S.Struct({
|
|
2647
|
+
organizationId: S.String.pipe(T.Label()),
|
|
2648
|
+
limit: S.optional(S.Number.pipe(T.Query())),
|
|
2649
|
+
cursor: S.optional(S.String.pipe(T.Query())),
|
|
2650
|
+
}).pipe(
|
|
2651
|
+
T.Http({
|
|
2652
|
+
method: "GET",
|
|
2653
|
+
uri: "/v3/organizations/{organizationId}/deleted-groups",
|
|
2654
|
+
code: 200,
|
|
2655
|
+
}),
|
|
2656
|
+
),
|
|
2657
|
+
).annotate({ identifier: "ListDeletedGroupsRequest" });
|
|
2658
|
+
case 1:
|
|
2659
|
+
return S.suspend(() =>
|
|
2660
|
+
S.Struct({
|
|
2661
|
+
uuid: S.optional(S.String),
|
|
2662
|
+
name: S.optional(S.String),
|
|
2663
|
+
deleted_at: S.optional(S.String),
|
|
2664
|
+
cascade_databases: S.optional(S.Number),
|
|
2665
|
+
}),
|
|
2666
|
+
).annotate({ identifier: "DeletedGroup" });
|
|
2667
|
+
case 2:
|
|
2668
|
+
return S.Array(__S(281, __c35, 1));
|
|
2669
|
+
case 3:
|
|
2670
|
+
return S.suspend(() =>
|
|
2671
|
+
S.Struct({
|
|
2672
|
+
groups: S.optional(__S(282, __c35, 2)),
|
|
2673
|
+
pagination: S.optional(__S(256, __c32, 0)),
|
|
2674
|
+
}),
|
|
2675
|
+
).annotate({ identifier: "ListDeletedGroupsResponse" });
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
function __c36(j: number): any {
|
|
2679
|
+
switch (j) {
|
|
2680
|
+
case 0:
|
|
2681
|
+
return S.suspend(() =>
|
|
2682
|
+
S.Struct({
|
|
2683
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2684
|
+
}).pipe(
|
|
2685
|
+
T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/groups", code: 200 }),
|
|
2686
|
+
),
|
|
2687
|
+
).annotate({ identifier: "ListGroupsRequest" });
|
|
2688
|
+
case 1:
|
|
2689
|
+
return S.Array(__S(360, __c45, 0));
|
|
2690
|
+
case 2:
|
|
2691
|
+
return S.suspend(() =>
|
|
2692
|
+
S.Struct({
|
|
2693
|
+
groups: S.optional(__S(289, __c36, 1)),
|
|
2694
|
+
}),
|
|
2695
|
+
).annotate({ identifier: "ListGroupsResponse" });
|
|
2696
|
+
}
|
|
2697
|
+
}
|
|
2698
|
+
function __c37(j: number): any {
|
|
2699
|
+
switch (j) {
|
|
2700
|
+
case 0:
|
|
2701
|
+
return S.suspend(() =>
|
|
2702
|
+
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/locations", code: 200 })),
|
|
2703
|
+
).annotate({ identifier: "ListLocationsRequest" });
|
|
2704
|
+
case 1:
|
|
2705
|
+
return S.suspend(() =>
|
|
2706
|
+
S.Struct({
|
|
2707
|
+
locations: S.optional(__S(304, __c38, 0)),
|
|
2708
|
+
}),
|
|
2709
|
+
).annotate({ identifier: "ListLocationsResponse" });
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
function __c38(j: number): any {
|
|
2713
|
+
switch (j) {
|
|
2714
|
+
case 0:
|
|
2715
|
+
return S.Record(S.String, S.String);
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
function __c39(j: number): any {
|
|
2719
|
+
switch (j) {
|
|
2720
|
+
case 0:
|
|
2721
|
+
return S.suspend(() =>
|
|
2722
|
+
S.Struct({
|
|
2723
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2724
|
+
}).pipe(
|
|
2725
|
+
T.Http({
|
|
2726
|
+
method: "GET",
|
|
2727
|
+
uri: "/v1/organizations/{organizationSlug}/api-tokens",
|
|
2728
|
+
code: 200,
|
|
2729
|
+
}),
|
|
2730
|
+
),
|
|
2731
|
+
).annotate({ identifier: "ListOrganizationAPITokensRequest" });
|
|
2732
|
+
case 1:
|
|
2733
|
+
return S.suspend(() =>
|
|
2734
|
+
S.Struct({
|
|
2735
|
+
username: S.optional(S.String),
|
|
2736
|
+
email: S.optional(S.String),
|
|
2737
|
+
}),
|
|
2738
|
+
).annotate({ identifier: "ListOrganizationAPITokensResponseTokensItemOwner" });
|
|
2739
|
+
case 2:
|
|
2740
|
+
return S.suspend(() =>
|
|
2741
|
+
S.Struct({
|
|
2742
|
+
name: S.optional(S.String),
|
|
2743
|
+
id: S.optional(S.String),
|
|
2744
|
+
organization: S.optional(S.String),
|
|
2745
|
+
group: S.optional(S.String),
|
|
2746
|
+
scopes: S.optional(__S(352, __c44, 0)),
|
|
2747
|
+
owner: S.optional(__S(313, __c39, 1)),
|
|
2748
|
+
created_at: S.optional(S.String),
|
|
2749
|
+
}),
|
|
2750
|
+
).annotate({ identifier: "ListOrganizationAPITokensResponseTokensItem" });
|
|
2751
|
+
case 3:
|
|
2752
|
+
return S.Array(__S(314, __c39, 2));
|
|
2753
|
+
case 4:
|
|
2754
|
+
return S.suspend(() =>
|
|
2755
|
+
S.Struct({
|
|
2756
|
+
tokens: S.optional(__S(315, __c39, 3)),
|
|
2757
|
+
}),
|
|
2758
|
+
).annotate({ identifier: "ListOrganizationAPITokensResponse" });
|
|
2759
|
+
}
|
|
2760
|
+
}
|
|
2761
|
+
function __c40(j: number): any {
|
|
2762
|
+
switch (j) {
|
|
2763
|
+
case 0:
|
|
2764
|
+
return S.suspend(() =>
|
|
2765
|
+
S.Struct({
|
|
2766
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2767
|
+
page_size: S.optional(S.Number.pipe(T.Query())),
|
|
2768
|
+
page: S.optional(S.Number.pipe(T.Query())),
|
|
2769
|
+
}).pipe(
|
|
2770
|
+
T.Http({
|
|
2771
|
+
method: "GET",
|
|
2772
|
+
uri: "/v1/organizations/{organizationSlug}/audit-logs",
|
|
2773
|
+
code: 200,
|
|
2774
|
+
}),
|
|
2775
|
+
),
|
|
2776
|
+
).annotate({ identifier: "ListOrganizationAuditLogsRequest" });
|
|
2777
|
+
case 1:
|
|
2778
|
+
return S.suspend(() =>
|
|
2779
|
+
S.Struct({
|
|
2780
|
+
code: S.optional(S.String),
|
|
2781
|
+
message: S.optional(S.String),
|
|
2782
|
+
origin: S.optional(S.String),
|
|
2783
|
+
author: S.optional(S.String),
|
|
2784
|
+
created_at: S.optional(S.String),
|
|
2785
|
+
data: S.optional(S.Unknown),
|
|
2786
|
+
}),
|
|
2787
|
+
).annotate({ identifier: "AuditLog" });
|
|
2788
|
+
case 2:
|
|
2789
|
+
return S.Array(__S(321, __c40, 1));
|
|
2790
|
+
case 3:
|
|
2791
|
+
return S.suspend(() =>
|
|
2792
|
+
S.Struct({
|
|
2793
|
+
page: S.optional(S.Number),
|
|
2794
|
+
page_size: S.optional(S.Number),
|
|
2795
|
+
total_pages: S.optional(S.Number),
|
|
2796
|
+
total_rows: S.optional(S.Number),
|
|
2797
|
+
}),
|
|
2798
|
+
).annotate({ identifier: "ListOrganizationAuditLogsResponsePagination" });
|
|
2799
|
+
case 4:
|
|
2800
|
+
return S.suspend(() =>
|
|
2801
|
+
S.Struct({
|
|
2802
|
+
audit_logs: S.optional(__S(322, __c40, 2)),
|
|
2803
|
+
pagination: S.optional(__S(323, __c40, 3)),
|
|
2804
|
+
}),
|
|
2805
|
+
).annotate({ identifier: "ListOrganizationAuditLogsResponse" });
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
2808
|
+
function __c41(j: number): any {
|
|
2809
|
+
switch (j) {
|
|
2810
|
+
case 0:
|
|
2811
|
+
return S.suspend(() =>
|
|
2812
|
+
S.Struct({
|
|
2813
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2814
|
+
}).pipe(
|
|
2815
|
+
T.Http({ method: "GET", uri: "/v2/organizations/{organizationSlug}/invites", code: 200 }),
|
|
2816
|
+
),
|
|
2817
|
+
).annotate({ identifier: "ListOrganizationInvitesV2Request" });
|
|
2818
|
+
case 1:
|
|
2819
|
+
return S.suspend(() =>
|
|
2820
|
+
S.Struct({
|
|
2821
|
+
id: S.optional(S.Number),
|
|
2822
|
+
email: S.optional(S.String),
|
|
2823
|
+
role: S.optional(S.String),
|
|
2824
|
+
created_at: S.optional(S.String),
|
|
2825
|
+
}),
|
|
2826
|
+
).annotate({ identifier: "InviteV2" });
|
|
2827
|
+
case 2:
|
|
2828
|
+
return S.Array(__S(329, __c41, 1));
|
|
2829
|
+
case 3:
|
|
2830
|
+
return S.suspend(() =>
|
|
2831
|
+
S.Struct({
|
|
2832
|
+
invites: S.optional(__S(330, __c41, 2)),
|
|
2833
|
+
}),
|
|
2834
|
+
).annotate({ identifier: "ListOrganizationInvitesV2Response" });
|
|
2835
|
+
}
|
|
2836
|
+
}
|
|
2837
|
+
function __c42(j: number): any {
|
|
2838
|
+
switch (j) {
|
|
2839
|
+
case 0:
|
|
2840
|
+
return S.suspend(() =>
|
|
2841
|
+
S.Struct({
|
|
2842
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2843
|
+
type: S.optional(S.String.pipe(T.Query())),
|
|
2844
|
+
}).pipe(
|
|
2845
|
+
T.Http({
|
|
2846
|
+
method: "GET",
|
|
2847
|
+
uri: "/v1/organizations/{organizationSlug}/invoices",
|
|
2848
|
+
code: 200,
|
|
2849
|
+
}),
|
|
2850
|
+
),
|
|
2851
|
+
).annotate({ identifier: "ListOrganizationInvoicesRequest" });
|
|
2852
|
+
case 1:
|
|
2853
|
+
return S.suspend(() =>
|
|
2854
|
+
S.Struct({
|
|
2855
|
+
invoice_number: S.optional(S.String),
|
|
2856
|
+
amount_due: S.optional(S.String),
|
|
2857
|
+
due_date: S.optional(S.String),
|
|
2858
|
+
paid_at: S.optional(S.String),
|
|
2859
|
+
payment_failed_at: S.optional(S.String),
|
|
2860
|
+
invoice_pdf: S.optional(S.String),
|
|
2861
|
+
}),
|
|
2862
|
+
).annotate({ identifier: "ListOrganizationInvoicesResponseInvoicesItem" });
|
|
2863
|
+
case 2:
|
|
2864
|
+
return S.Array(__S(337, __c42, 1));
|
|
2865
|
+
case 3:
|
|
2866
|
+
return S.suspend(() =>
|
|
2867
|
+
S.Struct({
|
|
2868
|
+
invoices: S.optional(__S(338, __c42, 2)),
|
|
2869
|
+
}),
|
|
2870
|
+
).annotate({ identifier: "ListOrganizationInvoicesResponse" });
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
function __c43(j: number): any {
|
|
2874
|
+
switch (j) {
|
|
2875
|
+
case 0:
|
|
2876
|
+
return S.suspend(() =>
|
|
2877
|
+
S.Struct({
|
|
2878
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2879
|
+
groupName: S.String.pipe(T.Label()),
|
|
2880
|
+
location: S.String.pipe(T.Label()),
|
|
2881
|
+
}).pipe(
|
|
2882
|
+
T.Http({
|
|
2883
|
+
method: "POST",
|
|
2884
|
+
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/locations/{location}",
|
|
2885
|
+
code: 200,
|
|
2886
|
+
}),
|
|
2887
|
+
),
|
|
2888
|
+
).annotate({ identifier: "AddLocationToGroupRequest" });
|
|
2889
|
+
}
|
|
2890
|
+
}
|
|
2891
|
+
function __c44(j: number): any {
|
|
2892
|
+
switch (j) {
|
|
2893
|
+
case 0:
|
|
2894
|
+
return S.Array(S.String);
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
function __c45(j: number): any {
|
|
2898
|
+
switch (j) {
|
|
2899
|
+
case 0:
|
|
2900
|
+
return S.suspend(() =>
|
|
2901
|
+
S.Struct({
|
|
2902
|
+
name: S.optional(S.String),
|
|
2903
|
+
version: S.optional(S.String),
|
|
2904
|
+
uuid: S.optional(S.String),
|
|
2905
|
+
locations: S.optional(__S(352, __c44, 0)),
|
|
2906
|
+
primary: S.optional(S.String),
|
|
2907
|
+
delete_protection: S.optional(S.Boolean),
|
|
2908
|
+
}),
|
|
2909
|
+
).annotate({ identifier: "Group" });
|
|
2910
|
+
}
|
|
2911
|
+
}
|
|
2912
|
+
function __c46(j: number): any {
|
|
2913
|
+
switch (j) {
|
|
2914
|
+
case 0:
|
|
2915
|
+
return S.suspend(() =>
|
|
2916
|
+
S.Struct({
|
|
2917
|
+
group: S.optional(__S(360, __c45, 0)),
|
|
2918
|
+
}),
|
|
2919
|
+
).annotate({ identifier: "AddLocationToGroupResponse" });
|
|
2920
|
+
}
|
|
2921
|
+
}
|
|
2922
|
+
function __c47(j: number): any {
|
|
2923
|
+
switch (j) {
|
|
2924
|
+
case 0:
|
|
2925
|
+
return S.suspend(() =>
|
|
2926
|
+
S.Struct({
|
|
2927
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2928
|
+
}).pipe(
|
|
2929
|
+
T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/members", code: 200 }),
|
|
2930
|
+
),
|
|
2931
|
+
).annotate({ identifier: "ListOrganizationMembersRequest" });
|
|
2932
|
+
case 1:
|
|
2933
|
+
return S.Array(__S(176, __c22, 0));
|
|
2934
|
+
case 2:
|
|
2935
|
+
return S.suspend(() =>
|
|
2936
|
+
S.Struct({
|
|
2937
|
+
members: S.optional(__S(377, __c47, 1)),
|
|
2938
|
+
}),
|
|
2939
|
+
).annotate({ identifier: "ListOrganizationMembersResponse" });
|
|
2940
|
+
}
|
|
2941
|
+
}
|
|
2942
|
+
function __c48(j: number): any {
|
|
2943
|
+
switch (j) {
|
|
2944
|
+
case 0:
|
|
2945
|
+
return S.suspend(() =>
|
|
2946
|
+
S.Struct({
|
|
2947
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
2948
|
+
}).pipe(
|
|
2949
|
+
T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/plans", code: 200 }),
|
|
2950
|
+
),
|
|
2951
|
+
).annotate({ identifier: "ListOrganizationPlansRequest" });
|
|
2952
|
+
case 1:
|
|
2953
|
+
return S.suspend(() =>
|
|
2954
|
+
S.Struct({
|
|
2955
|
+
value: S.optional(S.String),
|
|
2956
|
+
timeline: S.optional(S.String),
|
|
2957
|
+
}),
|
|
2958
|
+
).annotate({ identifier: "PlanPrice" });
|
|
2959
|
+
case 2:
|
|
2960
|
+
return S.Array(__S(385, __c48, 1));
|
|
2961
|
+
case 3:
|
|
2962
|
+
return S.suspend(() =>
|
|
2963
|
+
S.Struct({
|
|
2964
|
+
rowsRead: S.optional(S.Number),
|
|
2965
|
+
rowsWritten: S.optional(S.Number),
|
|
2966
|
+
databases: S.optional(S.NullOr(S.Number)),
|
|
2967
|
+
locations: S.optional(S.Number),
|
|
2968
|
+
storage: S.optional(S.Number),
|
|
2969
|
+
groups: S.optional(S.Number),
|
|
2970
|
+
bytesSynced: S.optional(S.Number),
|
|
2971
|
+
}),
|
|
2972
|
+
).annotate({ identifier: "PlanQuotas" });
|
|
2973
|
+
case 4:
|
|
2974
|
+
return S.suspend(() =>
|
|
2975
|
+
S.Struct({
|
|
2976
|
+
name: S.optional(S.String),
|
|
2977
|
+
price: S.optional(S.String),
|
|
2978
|
+
prices: S.optional(__S(386, __c48, 2)),
|
|
2979
|
+
quotas: S.optional(__S(387, __c48, 3)),
|
|
2980
|
+
}),
|
|
2981
|
+
).annotate({ identifier: "OrganizationPlan" });
|
|
2982
|
+
case 5:
|
|
2983
|
+
return S.Array(__S(388, __c48, 4));
|
|
2984
|
+
case 6:
|
|
2985
|
+
return S.suspend(() =>
|
|
2986
|
+
S.Struct({
|
|
2987
|
+
plans: S.optional(__S(389, __c48, 5)),
|
|
2988
|
+
}),
|
|
2989
|
+
).annotate({ identifier: "ListOrganizationPlansResponse" });
|
|
2990
|
+
}
|
|
2991
|
+
}
|
|
2992
|
+
function __c49(j: number): any {
|
|
2993
|
+
switch (j) {
|
|
2994
|
+
case 0:
|
|
2995
|
+
return S.suspend(() =>
|
|
2996
|
+
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/organizations", code: 200 })),
|
|
2997
|
+
).annotate({ identifier: "ListOrganizationsRequest" });
|
|
2998
|
+
case 1:
|
|
2999
|
+
return S.Array(__S(152, __c19, 0));
|
|
3000
|
+
case 2:
|
|
3001
|
+
return S.suspend(() => __S(393, __c49, 1).pipe(T.RawResponseRoot())).annotate({
|
|
3002
|
+
identifier: "ListOrganizationsResponse",
|
|
3003
|
+
});
|
|
3004
|
+
}
|
|
3005
|
+
}
|
|
3006
|
+
function __c50(j: number): any {
|
|
3007
|
+
switch (j) {
|
|
3008
|
+
case 0:
|
|
3009
|
+
return S.suspend(() =>
|
|
3010
|
+
S.Struct({
|
|
3011
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
3012
|
+
groupName: S.String.pipe(T.Label()),
|
|
3013
|
+
location: S.String.pipe(T.Label()),
|
|
3014
|
+
}).pipe(
|
|
3015
|
+
T.Http({
|
|
3016
|
+
method: "DELETE",
|
|
3017
|
+
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/locations/{location}",
|
|
3018
|
+
code: 200,
|
|
3019
|
+
}),
|
|
3020
|
+
),
|
|
3021
|
+
).annotate({ identifier: "RemoveLocationFromGroupRequest" });
|
|
3022
|
+
}
|
|
3023
|
+
}
|
|
3024
|
+
function __c51(j: number): any {
|
|
3025
|
+
switch (j) {
|
|
3026
|
+
case 0:
|
|
3027
|
+
return S.suspend(() =>
|
|
3028
|
+
S.Struct({
|
|
3029
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
3030
|
+
username: S.String.pipe(T.Label()),
|
|
3031
|
+
}).pipe(
|
|
3032
|
+
T.Http({
|
|
3033
|
+
method: "DELETE",
|
|
3034
|
+
uri: "/v1/organizations/{organizationSlug}/members/{username}",
|
|
3035
|
+
code: 200,
|
|
3036
|
+
}),
|
|
3037
|
+
),
|
|
3038
|
+
).annotate({ identifier: "RemoveOrganizationMemberRequest" });
|
|
3039
|
+
case 1:
|
|
3040
|
+
return S.suspend(() =>
|
|
3041
|
+
S.Struct({
|
|
3042
|
+
member: S.optional(S.String),
|
|
3043
|
+
}),
|
|
3044
|
+
).annotate({ identifier: "RemoveOrganizationMemberResponse" });
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
function __c52(j: number): any {
|
|
3048
|
+
switch (j) {
|
|
3049
|
+
case 0:
|
|
3050
|
+
return S.suspend(() =>
|
|
3051
|
+
S.Struct({
|
|
3052
|
+
organizationId: S.String.pipe(T.Label()),
|
|
3053
|
+
databaseId: S.String.pipe(T.Label()),
|
|
3054
|
+
name: S.optional(S.String),
|
|
3055
|
+
}).pipe(
|
|
3056
|
+
T.Http({
|
|
3057
|
+
method: "POST",
|
|
3058
|
+
uri: "/v3/organizations/{organizationId}/databases/{databaseId}/restore",
|
|
3059
|
+
code: 200,
|
|
3060
|
+
}),
|
|
3061
|
+
),
|
|
3062
|
+
).annotate({ identifier: "RestoreDatabaseRequest" });
|
|
3063
|
+
case 1:
|
|
3064
|
+
return S.suspend(() =>
|
|
3065
|
+
S.Struct({
|
|
3066
|
+
database: S.optional(__S(264, __c33, 0)),
|
|
3067
|
+
}),
|
|
3068
|
+
).annotate({ identifier: "RestoreDatabaseResponse" });
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
3071
|
+
function __c53(j: number): any {
|
|
3072
|
+
switch (j) {
|
|
3073
|
+
case 0:
|
|
3074
|
+
return S.suspend(() =>
|
|
3075
|
+
S.Struct({
|
|
3076
|
+
organizationId: S.String.pipe(T.Label()),
|
|
3077
|
+
groupId: S.String.pipe(T.Label()),
|
|
3078
|
+
}).pipe(
|
|
3079
|
+
T.Http({
|
|
3080
|
+
method: "POST",
|
|
3081
|
+
uri: "/v3/organizations/{organizationId}/groups/{groupId}/restore",
|
|
3082
|
+
code: 200,
|
|
3083
|
+
}),
|
|
3084
|
+
),
|
|
3085
|
+
).annotate({ identifier: "RestoreGroupRequest" });
|
|
3086
|
+
case 1:
|
|
3087
|
+
return S.suspend(() =>
|
|
3088
|
+
S.Struct({
|
|
3089
|
+
group: S.optional(__S(360, __c45, 0)),
|
|
3090
|
+
databases: S.optional(__S(272, __c34, 0)),
|
|
3091
|
+
failures: S.optional(__S(304, __c38, 0)),
|
|
3092
|
+
}),
|
|
3093
|
+
).annotate({ identifier: "RestoreGroupResponse" });
|
|
3094
|
+
}
|
|
3095
|
+
}
|
|
3096
|
+
function __c54(j: number): any {
|
|
3097
|
+
switch (j) {
|
|
3098
|
+
case 0:
|
|
3099
|
+
return S.suspend(() =>
|
|
3100
|
+
S.Struct({
|
|
3101
|
+
tokenName: S.String.pipe(T.Label()),
|
|
3102
|
+
}).pipe(T.Http({ method: "DELETE", uri: "/v1/auth/api-tokens/{tokenName}", code: 200 })),
|
|
3103
|
+
).annotate({ identifier: "RevokeAPITokenRequest" });
|
|
3104
|
+
}
|
|
3105
|
+
}
|
|
3106
|
+
function __c55(j: number): any {
|
|
3107
|
+
switch (j) {
|
|
3108
|
+
case 0:
|
|
3109
|
+
return S.suspend(() =>
|
|
3110
|
+
S.Struct({
|
|
3111
|
+
token: S.optional(S.String),
|
|
3112
|
+
}),
|
|
3113
|
+
).annotate({ identifier: "RevokeAPITokenResponse" });
|
|
3114
|
+
}
|
|
3115
|
+
}
|
|
3116
|
+
function __c56(j: number): any {
|
|
3117
|
+
switch (j) {
|
|
3118
|
+
case 0:
|
|
3119
|
+
return S.suspend(() =>
|
|
3120
|
+
S.Struct({
|
|
3121
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
3122
|
+
tokenId: S.String.pipe(T.Label()),
|
|
3123
|
+
}).pipe(
|
|
3124
|
+
T.Http({
|
|
3125
|
+
method: "DELETE",
|
|
3126
|
+
uri: "/v1/organizations/{organizationSlug}/api-tokens/{tokenId}",
|
|
3127
|
+
code: 200,
|
|
3128
|
+
}),
|
|
3129
|
+
),
|
|
3130
|
+
).annotate({ identifier: "RevokeOrganizationAPITokenRequest" });
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3133
|
+
function __c57(j: number): any {
|
|
3134
|
+
switch (j) {
|
|
3135
|
+
case 0:
|
|
3136
|
+
return S.suspend(() =>
|
|
3137
|
+
S.Struct({
|
|
3138
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
3139
|
+
groupName: S.String.pipe(T.Label()),
|
|
3140
|
+
organization: S.optional(S.String),
|
|
3141
|
+
}).pipe(
|
|
3142
|
+
T.Http({
|
|
3143
|
+
method: "POST",
|
|
3144
|
+
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/transfer",
|
|
3145
|
+
code: 200,
|
|
3146
|
+
}),
|
|
3147
|
+
),
|
|
3148
|
+
).annotate({ identifier: "TransferGroupRequest" });
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3151
|
+
function __c58(j: number): any {
|
|
3152
|
+
switch (j) {
|
|
3153
|
+
case 0:
|
|
3154
|
+
return S.suspend(() =>
|
|
3155
|
+
S.Struct({
|
|
3156
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
3157
|
+
username: S.optional(S.String),
|
|
3158
|
+
role: S.optional(S.String),
|
|
3159
|
+
}).pipe(
|
|
3160
|
+
T.Http({
|
|
3161
|
+
method: "POST",
|
|
3162
|
+
uri: "/v1/organizations/{organizationSlug}/members",
|
|
3163
|
+
code: 200,
|
|
3164
|
+
}),
|
|
3165
|
+
),
|
|
3166
|
+
).annotate({ identifier: "AddOrganizationMemberRequest" });
|
|
3167
|
+
case 1:
|
|
3168
|
+
return S.suspend(() =>
|
|
3169
|
+
S.Struct({
|
|
3170
|
+
member: S.optional(S.String),
|
|
3171
|
+
role: S.optional(S.String),
|
|
3172
|
+
}),
|
|
3173
|
+
).annotate({ identifier: "AddOrganizationMemberResponse" });
|
|
3174
|
+
}
|
|
3175
|
+
}
|
|
3176
|
+
function __c59(j: number): any {
|
|
3177
|
+
switch (j) {
|
|
3178
|
+
case 0:
|
|
3179
|
+
return S.suspend(() =>
|
|
3180
|
+
S.Struct({
|
|
3181
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
3182
|
+
groupName: S.String.pipe(T.Label()),
|
|
3183
|
+
}).pipe(
|
|
3184
|
+
T.Http({
|
|
3185
|
+
method: "POST",
|
|
3186
|
+
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/unarchive",
|
|
3187
|
+
code: 200,
|
|
3188
|
+
}),
|
|
3189
|
+
),
|
|
3190
|
+
).annotate({ identifier: "UnarchiveGroupRequest" });
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3193
|
+
function __c60(j: number): any {
|
|
3194
|
+
switch (j) {
|
|
3195
|
+
case 0:
|
|
3196
|
+
return S.suspend(() =>
|
|
3197
|
+
S.Struct({
|
|
3198
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
3199
|
+
databaseName: S.String.pipe(T.Label()),
|
|
3200
|
+
size_limit: S.optional(S.String),
|
|
3201
|
+
allow_attach: S.optional(S.Boolean),
|
|
3202
|
+
block_reads: S.optional(S.Boolean),
|
|
3203
|
+
block_writes: S.optional(S.Boolean),
|
|
3204
|
+
delete_protection: S.optional(S.Boolean),
|
|
3205
|
+
allowed_ips: S.optional(__S(352, __c44, 0)),
|
|
3206
|
+
allowed_aws_vpc_ids: S.optional(__S(352, __c44, 0)),
|
|
3207
|
+
}).pipe(
|
|
3208
|
+
T.Http({
|
|
3209
|
+
method: "PATCH",
|
|
3210
|
+
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/configuration",
|
|
3211
|
+
code: 200,
|
|
3212
|
+
}),
|
|
3213
|
+
),
|
|
3214
|
+
).annotate({ identifier: "UpdateDatabaseConfigurationRequest" });
|
|
3215
|
+
}
|
|
3216
|
+
}
|
|
3217
|
+
function __c61(j: number): any {
|
|
3218
|
+
switch (j) {
|
|
3219
|
+
case 0:
|
|
3220
|
+
return S.suspend(() =>
|
|
3221
|
+
S.Struct({
|
|
3222
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
3223
|
+
groupName: S.String.pipe(T.Label()),
|
|
3224
|
+
delete_protection: S.optional(S.Boolean),
|
|
3225
|
+
}).pipe(
|
|
3226
|
+
T.Http({
|
|
3227
|
+
method: "PATCH",
|
|
3228
|
+
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/configuration",
|
|
3229
|
+
code: 200,
|
|
3230
|
+
}),
|
|
3231
|
+
),
|
|
3232
|
+
).annotate({ identifier: "UpdateGroupConfigurationRequest" });
|
|
3233
|
+
}
|
|
3234
|
+
}
|
|
3235
|
+
function __c62(j: number): any {
|
|
3236
|
+
switch (j) {
|
|
3237
|
+
case 0:
|
|
3238
|
+
return S.suspend(() =>
|
|
3239
|
+
S.Struct({
|
|
3240
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
3241
|
+
groupName: S.String.pipe(T.Label()),
|
|
3242
|
+
}).pipe(
|
|
3243
|
+
T.Http({
|
|
3244
|
+
method: "POST",
|
|
3245
|
+
uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/update",
|
|
3246
|
+
code: 200,
|
|
3247
|
+
}),
|
|
3248
|
+
),
|
|
3249
|
+
).annotate({ identifier: "UpdateGroupDatabasesRequest" });
|
|
3250
|
+
}
|
|
3251
|
+
}
|
|
3252
|
+
function __c63(j: number): any {
|
|
3253
|
+
switch (j) {
|
|
3254
|
+
case 0:
|
|
3255
|
+
return S.suspend(() =>
|
|
3256
|
+
S.Struct({
|
|
3257
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
3258
|
+
username: S.String.pipe(T.Label()),
|
|
3259
|
+
role: S.String,
|
|
3260
|
+
}).pipe(
|
|
3261
|
+
T.Http({
|
|
3262
|
+
method: "PATCH",
|
|
3263
|
+
uri: "/v1/organizations/{organizationSlug}/members/{username}",
|
|
3264
|
+
code: 200,
|
|
3265
|
+
}),
|
|
3266
|
+
),
|
|
3267
|
+
).annotate({ identifier: "UpdateMemberRoleRequest" });
|
|
3268
|
+
case 1:
|
|
3269
|
+
return S.suspend(() =>
|
|
3270
|
+
S.Struct({
|
|
3271
|
+
username: S.optional(S.String),
|
|
3272
|
+
email: S.optional(S.String),
|
|
3273
|
+
role: S.optional(S.String),
|
|
3274
|
+
}),
|
|
3275
|
+
).annotate({ identifier: "UpdateMemberRoleResponseMember" });
|
|
3276
|
+
case 2:
|
|
3277
|
+
return S.suspend(() =>
|
|
3278
|
+
S.Struct({
|
|
3279
|
+
member: S.optional(__S(505, __c63, 1)),
|
|
3280
|
+
}),
|
|
3281
|
+
).annotate({ identifier: "UpdateMemberRoleResponse" });
|
|
3282
|
+
}
|
|
3283
|
+
}
|
|
3284
|
+
function __c64(j: number): any {
|
|
3285
|
+
switch (j) {
|
|
3286
|
+
case 0:
|
|
3287
|
+
return S.suspend(() =>
|
|
3288
|
+
S.Struct({
|
|
3289
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
3290
|
+
overages: S.optional(S.Boolean),
|
|
3291
|
+
require_mfa: S.optional(S.Boolean),
|
|
3292
|
+
restore_enabled: S.optional(S.Boolean),
|
|
3293
|
+
}).pipe(
|
|
3294
|
+
T.Http({ method: "PATCH", uri: "/v1/organizations/{organizationSlug}", code: 200 }),
|
|
3295
|
+
),
|
|
3296
|
+
).annotate({ identifier: "UpdateOrganizationRequest" });
|
|
3297
|
+
}
|
|
3298
|
+
}
|
|
3299
|
+
function __c65(j: number): any {
|
|
3300
|
+
switch (j) {
|
|
3301
|
+
case 0:
|
|
3302
|
+
return S.suspend(() =>
|
|
3303
|
+
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/auth/validate", code: 200 })),
|
|
3304
|
+
).annotate({ identifier: "ValidateAPITokenRequest" });
|
|
3305
|
+
case 1:
|
|
3306
|
+
return S.suspend(() =>
|
|
3307
|
+
S.Struct({
|
|
3308
|
+
exp: S.optional(S.Number),
|
|
3309
|
+
}),
|
|
3310
|
+
).annotate({ identifier: "ValidateAPITokenResponse" });
|
|
3311
|
+
}
|
|
3312
|
+
}
|
|
3313
|
+
function __c66(j: number): any {
|
|
3314
|
+
switch (j) {
|
|
3315
|
+
case 0:
|
|
3316
|
+
return S.Array(S.String);
|
|
3317
|
+
case 1:
|
|
3318
|
+
return S.suspend(() =>
|
|
3319
|
+
S.Struct({
|
|
3320
|
+
tokenName: S.String.pipe(T.Label()),
|
|
3321
|
+
organization: S.optional(S.String),
|
|
3322
|
+
group: S.optional(S.String),
|
|
3323
|
+
scopes: S.optional(__S(528, __c66, 0)),
|
|
3324
|
+
}).pipe(T.Http({ method: "POST", uri: "/v1/auth/api-tokens/{tokenName}", code: 200 })),
|
|
3325
|
+
).annotate({ identifier: "CreateAPITokenRequest" });
|
|
3326
|
+
case 2:
|
|
3327
|
+
return S.suspend(() =>
|
|
3328
|
+
S.Struct({
|
|
3329
|
+
name: S.optional(S.String),
|
|
3330
|
+
id: S.optional(S.String),
|
|
3331
|
+
token: S.optional(S.String.pipe(T.SensitiveValue({}))),
|
|
3332
|
+
}),
|
|
3333
|
+
).annotate({ identifier: "CreateAPITokenResponse" });
|
|
3334
|
+
}
|
|
3335
|
+
}
|
|
3336
|
+
function __c67(j: number): any {
|
|
3337
|
+
switch (j) {
|
|
3338
|
+
case 0:
|
|
3339
|
+
return S.suspend(() =>
|
|
3340
|
+
S.Struct({
|
|
3341
|
+
type: S.optional(S.String),
|
|
3342
|
+
name: S.optional(S.String),
|
|
3343
|
+
timestamp: S.optional(S.String),
|
|
3344
|
+
}),
|
|
3345
|
+
).annotate({ identifier: "CreateDatabaseRequestSeed" });
|
|
3346
|
+
case 1:
|
|
3347
|
+
return S.suspend(() =>
|
|
3348
|
+
S.Struct({
|
|
3349
|
+
encryption_key: S.optional(S.String),
|
|
3350
|
+
encryption_cipher: S.optional(S.String),
|
|
3351
|
+
}),
|
|
3352
|
+
).annotate({ identifier: "CreateDatabaseRequestRemoteEncryption" });
|
|
3353
|
+
case 2:
|
|
3354
|
+
return S.suspend(() =>
|
|
3355
|
+
S.Struct({
|
|
3356
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
3357
|
+
name: S.String,
|
|
3358
|
+
group: S.String,
|
|
3359
|
+
seed: S.optional(__S(536, __c67, 0)),
|
|
3360
|
+
size_limit: S.optional(S.String),
|
|
3361
|
+
remote_encryption: S.optional(__S(537, __c67, 1)),
|
|
3362
|
+
}).pipe(
|
|
3363
|
+
T.Http({
|
|
3364
|
+
method: "POST",
|
|
3365
|
+
uri: "/v1/organizations/{organizationSlug}/databases",
|
|
3366
|
+
code: 200,
|
|
3367
|
+
}),
|
|
3368
|
+
),
|
|
3369
|
+
).annotate({ identifier: "CreateDatabaseRequest" });
|
|
3370
|
+
case 3:
|
|
3371
|
+
return S.suspend(() =>
|
|
3372
|
+
S.Struct({
|
|
3373
|
+
DbId: S.optional(S.String),
|
|
3374
|
+
Hostname: S.optional(S.String),
|
|
3375
|
+
Name: S.optional(S.String),
|
|
3376
|
+
}),
|
|
3377
|
+
).annotate({ identifier: "CreateDatabaseOutput" });
|
|
3378
|
+
case 4:
|
|
3379
|
+
return S.suspend(() =>
|
|
3380
|
+
S.Struct({
|
|
3381
|
+
database: S.optional(__S(539, __c67, 3)),
|
|
3382
|
+
}),
|
|
3383
|
+
).annotate({ identifier: "CreateDatabaseResponse" });
|
|
3384
|
+
}
|
|
3385
|
+
}
|
|
3386
|
+
function __c68(j: number): any {
|
|
3387
|
+
switch (j) {
|
|
3388
|
+
case 0:
|
|
3389
|
+
return S.suspend(() =>
|
|
3390
|
+
S.Struct({
|
|
3391
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
3392
|
+
databaseName: S.String.pipe(T.Label()),
|
|
3393
|
+
expiration: S.optional(S.String.pipe(T.Query())),
|
|
3394
|
+
authorization: S.optional(S.String.pipe(T.Query())),
|
|
3395
|
+
permissions: S.optional(__S(553, __c69, 1)),
|
|
3396
|
+
}).pipe(
|
|
3397
|
+
T.Http({
|
|
3398
|
+
method: "POST",
|
|
3399
|
+
uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/auth/tokens",
|
|
3400
|
+
code: 200,
|
|
3401
|
+
}),
|
|
3402
|
+
),
|
|
3403
|
+
).annotate({ identifier: "CreateDatabaseTokenRequest" });
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
function __c69(j: number): any {
|
|
3407
|
+
switch (j) {
|
|
3408
|
+
case 0:
|
|
3409
|
+
return S.suspend(() =>
|
|
3410
|
+
S.Struct({
|
|
3411
|
+
databases: S.optional(__S(352, __c44, 0)),
|
|
3412
|
+
}),
|
|
3413
|
+
).annotate({ identifier: "CreateDatabaseTokenRequestPermissionsReadAttach" });
|
|
3414
|
+
case 1:
|
|
3415
|
+
return S.suspend(() =>
|
|
3416
|
+
S.Struct({
|
|
3417
|
+
read_attach: S.optional(__S(552, __c69, 0)),
|
|
3418
|
+
}),
|
|
3419
|
+
).annotate({ identifier: "CreateDatabaseTokenRequestPermissions" });
|
|
3420
|
+
case 2:
|
|
3421
|
+
return S.suspend(() =>
|
|
3422
|
+
S.Struct({
|
|
3423
|
+
jwt: S.optional(S.String.pipe(T.SensitiveValue({}))),
|
|
3424
|
+
}),
|
|
3425
|
+
).annotate({ identifier: "CreateDatabaseTokenResponse" });
|
|
3426
|
+
}
|
|
3427
|
+
}
|
|
3428
|
+
function __c70(j: number): any {
|
|
3429
|
+
switch (j) {
|
|
3430
|
+
case 0:
|
|
3431
|
+
return S.suspend(() =>
|
|
3432
|
+
S.Struct({
|
|
3433
|
+
organizationSlug: S.String.pipe(T.Label()),
|
|
3434
|
+
name: S.String,
|
|
3435
|
+
location: S.String,
|
|
3436
|
+
extensions: S.optional(S.Unknown),
|
|
3437
|
+
}).pipe(
|
|
3438
|
+
T.Http({ method: "POST", uri: "/v1/organizations/{organizationSlug}/groups", code: 200 }),
|
|
3439
|
+
),
|
|
3440
|
+
).annotate({ identifier: "CreateGroupRequest" });
|
|
3441
|
+
}
|
|
3442
|
+
}
|
|
3443
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
3444
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
3445
|
+
return (__s[i] ??= __L.at(f, j));
|
|
3446
|
+
}
|