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