@distilled.cloud/turso 1.0.0-rc.15 → 1.0.0-rc.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1385 +1,203 @@
1
1
  import * as API from "@distilled.cloud/core/api";
2
2
  import * as C from "@distilled.cloud/core/category";
3
3
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs. Do not edit.
4
- import * as S from "@distilled.cloud/core/schema";
5
- import * as Redacted from "effect/Redacted";
4
+ import * as S from "@distilled.cloud/core/schema-lite";
5
+ import * as __L from "@distilled.cloud/core/schema-lite";
6
6
  import { TursoProtocol } from "../protocol.js";
7
7
  import * as Retry from "../retry.js";
8
8
  import * as T from "../traits.js";
9
- export class BadRequest extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
10
- /*@__PURE__*/ S.TaggedError()("BadRequest", {
11
- code: S.Number,
12
- message: S.String,
13
- }).pipe(C.withBadRequestError), [{ status: 400 }]) {
9
+ const __0 = __L.at;
10
+ const __1 = T.Http;
11
+ const __2 = T.Label;
12
+ const __3 = S.String;
13
+ const __4 = T.Query;
14
+ const __5 = S.optional;
15
+ const __6 = S.Struct;
16
+ const __7 = S.suspend;
17
+ const __8 = S.Boolean;
18
+ const __9 = S.NullOr;
19
+ const __10 = S.Number;
20
+ const __11 = S.Array;
21
+ const __12 = S.Record;
22
+ const __13 = S.Unknown;
23
+ const __14 = T.RawResponseRoot;
24
+ const __15 = T.SensitiveValue;
25
+ const __16 = S.TaggedError;
26
+ const __17 = T.applyErrorMatchers;
27
+ export const BadRequest = /*@__PURE__*/ API.error(function BadRequest(i) {
28
+ return API.newError(i, new.target, ['$5($4()("BadRequest",{code:$2,message:$3}).pipe($1),[{status:400}])', [__0, C.withBadRequestError, __10, __3, __16, __17]]);
29
+ });
30
+ export const Conflict = /*@__PURE__*/ API.error(function Conflict(i) {
31
+ return API.newError(i, new.target, ['$5($4()("Conflict",{code:$2,message:$3}).pipe($1),[{status:409}])', [__0, C.withConflictError, __10, __3, __16, __17]]);
32
+ });
33
+ export const Forbidden = /*@__PURE__*/ API.error(function Forbidden(i) {
34
+ return API.newError(i, new.target, ['$5($4()("Forbidden",{code:$2,message:$3}).pipe($1),[{status:403}])', [__0, C.withAuthError, __10, __3, __16, __17]]);
35
+ });
36
+ export const NotFound = /*@__PURE__*/ API.error(function NotFound(i) {
37
+ return API.newError(i, new.target, ['$5($4()("NotFound",{code:$2,message:$3}).pipe($1),[{status:404}])', [__0, C.withBadRequestError, __10, __3, __16, __17]]);
38
+ });
39
+
40
+ export const addLocationToGroup = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7,$8],protocol:$9,retry:$10};$5(>2)@"AddLocationToGroupRequest";$4({organizationSlug:$3.pipe($2()),groupName:$3.pipe($2()),location:$3.pipe($2())}).pipe($1({method:"POST",uri:"/v1/organizations/{organizationSlug}/groups/{groupName}/locations/{location}",code:200}))', [__0, __1, __2, __3, __6, __7, __d15, BadRequest, NotFound, TursoProtocol, Retry.Retry]] : API.call(addLocationToGroup, i));
41
+
42
+ export const addOrganizationMember = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$7,$8,$9],protocol:$10,retry:$11};$6(>3)@"AddOrganizationMemberRequest";$6(>4)@"AddOrganizationMemberResponse";$5({organizationSlug:$3.pipe($2()),username:$4($3),role:$4($3)}).pipe($1({method:"POST",uri:"/v1/organizations/{organizationSlug}/members",code:200}));$5({member:$4($3),role:$4($3)})', [__0, __1, __2, __3, __5, __6, __7, BadRequest, NotFound, Conflict, TursoProtocol, Retry.Retry]] : API.call(addOrganizationMember, i));
43
+
44
+ export const createAPIToken = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#2,output:#3,errors:[$9,$10,$11],protocol:$12,retry:$13};$2($1);$7(>4)@"CreateAPITokenRequest";$7(>5)@"CreateAPITokenResponse";$6({tokenName:$1.pipe($4()),organization:$5($1),group:$5($1),scopes:$5(#1)}).pipe($3({method:"POST",uri:"/v1/auth/api-tokens/{tokenName}",code:200}));$6({name:$5($1),id:$5($1),token:$5($1.pipe($8({})))})', [__0, __3, __11, __1, __2, __5, __6, __7, __15, BadRequest, NotFound, Conflict, TursoProtocol, Retry.Retry]] : API.call(createAPIToken, i));
45
+
46
+ export const createDatabase = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("CreateDatabaseRequest", '{input:#3,output:#5,errors:[$7,$8],protocol:$9,retry:$10};$4(>6)@"%Seed";$4(>7)@"%RemoteEncryption";$4(>8)@"%";$4(>9)@"CreateDatabaseOutput";$4(>10)@"CreateDatabaseResponse";$3({type:$2($1),name:$2($1),timestamp:$2($1)});$3({encryption_key:$2($1),encryption_cipher:$2($1)});$3({organizationSlug:$1.pipe($6()),name:$1,group:$1,seed:$2(#1),size_limit:$2($1),remote_encryption:$2(#2)}).pipe($5({method:"POST",uri:"/v1/organizations/{organizationSlug}/databases",code:200}));$3({DbId:$2($1),Hostname:$2($1),Name:$2($1)});$3({database:$2(#4)})', [__0, __3, __5, __6, __7, __1, __2, BadRequest, Conflict, TursoProtocol, Retry.Retry]) : API.call(createDatabase, i));
47
+
48
+ export const createDatabaseToken = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:2,errors:[$9,$10],protocol:$11,retry:$12};$8(>2)@"CreateDatabaseTokenRequest";$7({organizationSlug:$3.pipe($2()),databaseName:$3.pipe($2()),expiration:$5($3.pipe($4())),authorization:$5($3.pipe($4())),permissions:$5(#6:1)}).pipe($1({method:"POST",uri:"/v1/organizations/{organizationSlug}/databases/{databaseName}/auth/tokens",code:200}))', [__0, __1, __2, __3, __4, __5, __d17, __6, __7, BadRequest, NotFound, TursoProtocol, Retry.Retry]] : API.call(createDatabaseToken, i));
49
+
50
+ export const createGroup = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#8:0,errors:[$9,$10],protocol:$11,retry:$12};$7(>2)@"CreateGroupRequest";$6({organizationSlug:$3.pipe($2()),name:$3,location:$3,extensions:$5($4)}).pipe($1({method:"POST",uri:"/v1/organizations/{organizationSlug}/groups",code:200}))', [__0, __1, __2, __3, __13, __5, __6, __7, __d15, BadRequest, Conflict, TursoProtocol, Retry.Retry]] : API.call(createGroup, i));
51
+
52
+ export const createGroupToken = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:2,errors:[$9,$10],protocol:$11,retry:$12};$8(>2)@"CreateGroupTokenRequest";$7({organizationSlug:$3.pipe($2()),groupName:$3.pipe($2()),expiration:$5($3.pipe($4())),authorization:$5($3.pipe($4())),permissions:$5(#6:1)}).pipe($1({method:"POST",uri:"/v1/organizations/{organizationSlug}/groups/{groupName}/auth/tokens",code:200}))', [__0, __1, __2, __3, __4, __5, __d17, __6, __7, BadRequest, NotFound, TursoProtocol, Retry.Retry]] : API.call(createGroupToken, i));
53
+
54
+ export const deleteDatabase = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$7],protocol:$8,retry:$9};$5(>3)@"DeleteDatabaseRequest";$5(>4)@"DeleteDatabaseResponse";$4({organizationSlug:$3.pipe($2()),databaseName:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/v1/organizations/{organizationSlug}/databases/{databaseName}",code:200}));$4({database:$6($3)})', [__0, __1, __2, __3, __6, __7, __5, NotFound, TursoProtocol, Retry.Retry]] : API.call(deleteDatabase, i));
55
+
56
+ export const deleteGroup = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7],protocol:$8,retry:$9};$5(>2)@"DeleteGroupRequest";$4({organizationSlug:$3.pipe($2()),groupName:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/v1/organizations/{organizationSlug}/groups/{groupName}",code:200}))', [__0, __1, __2, __3, __6, __7, __d15, NotFound, TursoProtocol, Retry.Retry]] : API.call(deleteGroup, i));
57
+
58
+ export const deleteOrganizationInviteByEmailV2 = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7],protocol:$8,retry:$9};$5(>2)@"DeleteOrganizationInviteByEmailV2Request";$4({organizationSlug:$3.pipe($2()),email:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/v2/organizations/{organizationSlug}/invites/{email}",code:200}))', [__0, __1, __2, __3, __6, __7, __d0, NotFound, TursoProtocol, Retry.Retry]] : API.call(deleteOrganizationInviteByEmailV2, i));
59
+
60
+ export const getCurrentUser = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("GetCurrentUserResponse", '{input:#1,output:#3,errors:[],protocol:$7,retry:$8};$3(>4)@"GetCurrentUserRequest";$3(>5)@"%User";$3(>6)@"%";$2({}).pipe($1({method:"GET",uri:"/v1/user",code:200}));$2({username:$5($4),name:$5($4),email:$5($4),avatarUrl:$5($4),plan:$5($4),mfa:$5($6),has_pending_invites:$5($6)});$2({user:$5(#2)})', [__0, __1, __6, __7, __3, __5, __8, TursoProtocol, Retry.Retry]) : API.call(getCurrentUser, i));
61
+
62
+ export const getDatabase = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$8],protocol:$9,retry:$10};$5(>3)@"GetDatabaseRequest";$5(>4)@"GetDatabaseResponse";$4({organizationSlug:$3.pipe($2()),databaseName:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/databases/{databaseName}",code:200}));$4({database:$7(#6:1)})', [__0, __1, __2, __3, __6, __7, __d1, __5, NotFound, TursoProtocol, Retry.Retry]] : API.call(getDatabase, i));
63
+
64
+ export const getDatabaseConfiguration = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7],protocol:$8,retry:$9};$5(>2)@"GetDatabaseConfigurationRequest";$4({organizationSlug:$3.pipe($2()),databaseName:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/databases/{databaseName}/configuration",code:200}))', [__0, __1, __2, __3, __6, __7, __d2, NotFound, TursoProtocol, Retry.Retry]] : API.call(getDatabaseConfiguration, i));
65
+
66
+ export const getDatabaseInstance = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$8],protocol:$9,retry:$10};$5(>3)@"GetDatabaseInstanceRequest";$5(>4)@"GetDatabaseInstanceResponse";$4({organizationSlug:$3.pipe($2()),databaseName:$3.pipe($2()),instanceName:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/databases/{databaseName}/instances/{instanceName}",code:200}));$4({instance:$7(#6:0)})', [__0, __1, __2, __3, __6, __7, __d3, __5, NotFound, TursoProtocol, Retry.Retry]] : API.call(getDatabaseInstance, i));
67
+
68
+ export const getDatabaseStats = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#4,errors:[$10],protocol:$11,retry:$12};$5(>5)@"GetDatabaseStatsRequest";$5(>6)@"DatabaseStatsOutput";$8(#2);$5(>7)@"GetDatabaseStatsResponse";$4({organizationSlug:$3.pipe($2()),databaseName:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/databases/{databaseName}/stats",code:200}));$4({query:$6($3),rows_read:$6($7),rows_written:$6($7)});$4({top_queries:$6($9(#3))})', [__0, __1, __2, __3, __6, __7, __5, __10, __11, __9, NotFound, TursoProtocol, Retry.Retry]] : API.call(getDatabaseStats, i));
69
+
70
+ export const getDatabaseUsage = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$9,$10],protocol:$11,retry:$12};$7(>3)@"GetDatabaseUsageRequest";$7(>4)@"GetDatabaseUsageResponse";$6({organizationSlug:$3.pipe($2()),databaseName:$3.pipe($2()),from:$5($3.pipe($4())),to:$5($3.pipe($4()))}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/databases/{databaseName}/usage",code:200}));$6({database:$5(#8:3)})', [__0, __1, __2, __3, __4, __5, __6, __7, __d4, BadRequest, NotFound, TursoProtocol, Retry.Retry]] : API.call(getDatabaseUsage, i));
71
+
72
+ export const getGroup = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7],protocol:$8,retry:$9};$5(>2)@"GetGroupRequest";$4({organizationSlug:$3.pipe($2()),groupName:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/groups/{groupName}",code:200}))', [__0, __1, __2, __3, __6, __7, __d15, NotFound, TursoProtocol, Retry.Retry]] : API.call(getGroup, i));
73
+
74
+ export const getGroupConfiguration = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7],protocol:$8,retry:$9};$5(>2)@"GetGroupConfigurationRequest";$4({organizationSlug:$3.pipe($2()),groupName:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/groups/{groupName}/configuration",code:200}))', [__0, __1, __2, __3, __6, __7, __d5, NotFound, TursoProtocol, Retry.Retry]] : API.call(getGroupConfiguration, i));
75
+
76
+ export const getOrganization = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7],protocol:$8,retry:$9};$5(>2)@"GetOrganizationRequest";$4({organizationSlug:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}",code:200}))', [__0, __1, __2, __3, __6, __7, __d7, NotFound, TursoProtocol, Retry.Retry]] : API.call(getOrganization, i));
77
+
78
+ export const getOrganizationMember = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$8],protocol:$9,retry:$10};$5(>3)@"GetOrganizationMemberRequest";$5(>4)@"GetOrganizationMemberResponse";$4({organizationSlug:$3.pipe($2()),username:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/members/{username}",code:200}));$4({member:$7(#6:0)})', [__0, __1, __2, __3, __6, __7, __d8, __5, NotFound, TursoProtocol, Retry.Retry]] : API.call(getOrganizationMember, i));
79
+
80
+ export const getOrganizationSubscription = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("GetOrganizationSubscriptionResponse", '{input:#1,output:#3,errors:[],protocol:$8,retry:$9};$5(>4)@"GetOrganizationSubscriptionRequest";$5(>5)@"%Subscription";$5(>6)@"%";$4({organizationSlug:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/subscription",code:200}));$4({name:$6($3),overages:$6($7),plan:$6($3),timeline:$6($3)});$4({subscription:$6(#2)})', [__0, __1, __2, __3, __6, __7, __5, __8, TursoProtocol, Retry.Retry]) : API.call(getOrganizationSubscription, i));
81
+
82
+ export const getOrganizationUsage = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("GetOrganizationUsageResponse", '{input:#1,output:#5,errors:[],protocol:$10,retry:$11};$5(>6)@"GetOrganizationUsageRequest";$5(>7)@"%OrganizationUsage";$9(#8:3);$5(>8)@"%Organization";$5(>9)@"%";$4({organizationSlug:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/usage",code:200}));$4({rows_read:$7($6),rows_written:$7($6),databases:$7($6),locations:$7($6),storage_bytes:$7($6),groups:$7($6),bytes_synced:$7($6)});$4({uuid:$7($3),usage:$7(#2),databases:$7(#3)});$4({organization:$7(#4)})', [__0, __1, __2, __3, __6, __7, __10, __5, __d4, __11, TursoProtocol, Retry.Retry]) : API.call(getOrganizationUsage, i));
83
+
84
+ export const invalidateDatabaseTokens = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7],protocol:$8,retry:$9};$5(>2)@"InvalidateDatabaseTokensRequest";$4({organizationSlug:$3.pipe($2()),databaseName:$3.pipe($2())}).pipe($1({method:"POST",uri:"/v1/organizations/{organizationSlug}/databases/{databaseName}/auth/rotate",code:200}))', [__0, __1, __2, __3, __6, __7, __d0, NotFound, TursoProtocol, Retry.Retry]] : API.call(invalidateDatabaseTokens, i));
85
+
86
+ export const invalidateGroupTokens = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7],protocol:$8,retry:$9};$5(>2)@"InvalidateGroupTokensRequest";$4({organizationSlug:$3.pipe($2()),groupName:$3.pipe($2())}).pipe($1({method:"POST",uri:"/v1/organizations/{organizationSlug}/groups/{groupName}/auth/rotate",code:200}))', [__0, __1, __2, __3, __6, __7, __d0, NotFound, TursoProtocol, Retry.Retry]] : API.call(invalidateGroupTokens, i));
87
+
88
+ export const inviteOrganizationMemberV2 = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#3,errors:[$7],protocol:$8,retry:$9};$6(>4)@"InviteOrganizationMemberV2Request";$6(>5)@"InviteCreatedV2";$6(>6)@"InviteOrganizationMemberV2Response";$5({organizationSlug:$3.pipe($2()),email:$4($3),username:$4($3),role:$4($3)}).pipe($1({method:"POST",uri:"/v2/organizations/{organizationSlug}/invites",code:200}));$5({email:$4($3),role:$4($3),organization:$4($3)});$5({invited:$4(#2)})', [__0, __1, __2, __3, __5, __6, __7, BadRequest, TursoProtocol, Retry.Retry]] : API.call(inviteOrganizationMemberV2, i));
89
+
90
+ export const listAPITokens = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("APIToken", '{input:#1,output:#4,errors:[],protocol:$8,retry:$9};$3(>5)@"List%sRequest";$3(>6)@"%";$7(#2);$3(>7)@"List%sResponse";$2({}).pipe($1({method:"GET",uri:"/v1/auth/api-tokens",code:200}));$2({name:$5($4),id:$5($4),organization:$5($4),group:$5($4),scopes:$5(#6:0),created_at:$5($4)});$2({tokens:$5(#3)})', [__0, __1, __6, __7, __3, __5, __d13, __11, TursoProtocol, Retry.Retry]) : API.call(listAPITokens, i));
91
+
92
+ export const listDatabaseInstances = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#3,errors:[$9],protocol:$10,retry:$11};$5(>4)@"ListDatabaseInstancesRequest";$7(#6:0);$5(>5)@"ListDatabaseInstancesResponse";$4({organizationSlug:$3.pipe($2()),databaseName:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/databases/{databaseName}/instances",code:200}));$4({instances:$8(#2)})', [__0, __1, __2, __3, __6, __7, __d3, __11, __5, NotFound, TursoProtocol, Retry.Retry]] : API.call(listDatabaseInstances, i));
93
+
94
+ export const listDatabases = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#3,errors:[],protocol:$10,retry:$11};$7(>4)@"ListDatabasesRequest";$9(#8:1);$7(>5)@"ListDatabasesResponse";$6({organizationSlug:$3.pipe($2()),group:$5($3.pipe($4())),schema:$5($3.pipe($4())),parent:$5($3.pipe($4()))}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/databases",code:200}));$6({databases:$5(#2)})', [__0, __1, __2, __3, __4, __5, __6, __7, __d1, __11, TursoProtocol, Retry.Retry]] : API.call(listDatabases, i));
95
+
96
+ export const listDeletedDatabases = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$12],protocol:$13,retry:$14};$9(>3)@"ListDeletedDatabasesRequest";$9(>4)@"ListDeletedDatabasesResponse";$8({organizationId:$3.pipe($2()),deleted:$5.pipe($4()),search:$6($3.pipe($4())),limit:$6($7.pipe($4())),cursor:$6($3.pipe($4()))}).pipe($1({method:"GET",uri:"/v3/organizations/{organizationId}/databases",code:200}));$8({databases:$6(#10:0),pagination:$6(#11:0)})', [__0, __1, __2, __3, __4, __8, __5, __10, __6, __7, __d11, __d9, Forbidden, TursoProtocol, Retry.Retry]] : API.call(listDeletedDatabases, i));
97
+
98
+ export const listDeletedGroups = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("DeletedGroup", '{input:#1,output:#4,errors:[$11],protocol:$12,retry:$13};$8(>5)@"List%sRequest";$8(>6)@"%";$9(#2);$8(>7)@"List%sResponse";$7({organizationId:$3.pipe($2()),limit:$6($5.pipe($4())),cursor:$6($3.pipe($4()))}).pipe($1({method:"GET",uri:"/v3/organizations/{organizationId}/deleted-groups",code:200}));$7({uuid:$6($3),name:$6($3),deleted_at:$6($3),cascade_databases:$6($5)});$7({groups:$6(#3),pagination:$6(#10:0)})', [__0, __1, __2, __3, __4, __10, __5, __6, __7, __11, __d9, Forbidden, TursoProtocol, Retry.Retry]) : API.call(listDeletedGroups, i));
99
+
100
+ export const listGroups = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#3,errors:[],protocol:$9,retry:$10};$5(>4)@"ListGroupsRequest";$7(#6:0);$5(>5)@"ListGroupsResponse";$4({organizationSlug:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/groups",code:200}));$4({groups:$8(#2)})', [__0, __1, __2, __3, __6, __7, __d14, __11, __5, TursoProtocol, Retry.Retry]] : API.call(listGroups, i));
101
+
102
+ export const listLocations = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[],protocol:$6,retry:$7};$3(>3)@"ListLocationsRequest";$3(>4)@"ListLocationsResponse";$2({}).pipe($1({method:"GET",uri:"/v1/locations",code:200}));$2({locations:$5(#4:0)})', [__0, __1, __6, __7, __d12, __5, TursoProtocol, Retry.Retry]] : API.call(listLocations, i));
103
+
104
+ export const listOrganizationAPITokens = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("ListOrganizationAPITokensResponse", '{input:#1,output:#5,errors:[],protocol:$9,retry:$10};$5(>6)@"ListOrganizationAPITokensRequest";$5(>7)@"%TokensItemOwner";$5(>8)@"%TokensItem";$8(#3);$5(>9)@"%";$4({organizationSlug:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/api-tokens",code:200}));$4({username:$6($3),email:$6($3)});$4({name:$6($3),id:$6($3),organization:$6($3),group:$6($3),scopes:$6(#7:0),owner:$6(#2),created_at:$6($3)});$4({tokens:$6(#4)})', [__0, __1, __2, __3, __6, __7, __5, __d13, __11, TursoProtocol, Retry.Retry]) : API.call(listOrganizationAPITokens, i));
105
+
106
+ export const listOrganizationAuditLogs = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("ListOrganizationAuditLogsResponse", '{input:#1,output:#5,errors:[],protocol:$11,retry:$12};$8(>6)@"ListOrganizationAuditLogsRequest";$8(>7)@"AuditLog";$10(#2);$8(>8)@"%Pagination";$8(>9)@"%";$7({organizationSlug:$3.pipe($2()),page_size:$6($5.pipe($4())),page:$6($5.pipe($4()))}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/audit-logs",code:200}));$7({code:$6($3),message:$6($3),origin:$6($3),author:$6($3),created_at:$6($3),data:$6($9)});$7({page:$6($5),page_size:$6($5),total_pages:$6($5),total_rows:$6($5)});$7({audit_logs:$6(#3),pagination:$6(#4)})', [__0, __1, __2, __3, __4, __10, __5, __6, __7, __13, __11, TursoProtocol, Retry.Retry]) : API.call(listOrganizationAuditLogs, i));
107
+
108
+ export const listOrganizationInvitesV2 = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#4,errors:[],protocol:$9,retry:$10};$5(>5)@"ListOrganizationInvitesV2Request";$5(>6)@"InviteV2";$8(#2);$5(>7)@"ListOrganizationInvitesV2Response";$4({organizationSlug:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v2/organizations/{organizationSlug}/invites",code:200}));$4({id:$7($6),email:$7($3),role:$7($3),created_at:$7($3)});$4({invites:$7(#3)})', [__0, __1, __2, __3, __6, __7, __10, __5, __11, TursoProtocol, Retry.Retry]] : API.call(listOrganizationInvitesV2, i));
109
+
110
+ export const listOrganizationInvoices = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("ListOrganizationInvoicesResponse", '{input:#1,output:#4,errors:[],protocol:$9,retry:$10};$7(>5)@"ListOrganizationInvoicesRequest";$7(>6)@"%InvoicesItem";$8(#2);$7(>7)@"%";$6({organizationSlug:$3.pipe($2()),type:$5($3.pipe($4()))}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/invoices",code:200}));$6({invoice_number:$5($3),amount_due:$5($3),due_date:$5($3),paid_at:$5($3),payment_failed_at:$5($3),invoice_pdf:$5($3)});$6({invoices:$5(#3)})', [__0, __1, __2, __3, __4, __5, __6, __7, __11, TursoProtocol, Retry.Retry]) : API.call(listOrganizationInvoices, i));
111
+
112
+ export const listOrganizationMembers = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#3,errors:[],protocol:$9,retry:$10};$5(>4)@"ListOrganizationMembersRequest";$7(#6:0);$5(>5)@"ListOrganizationMembersResponse";$4({organizationSlug:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/members",code:200}));$4({members:$8(#2)})', [__0, __1, __2, __3, __6, __7, __d8, __11, __5, TursoProtocol, Retry.Retry]] : API.call(listOrganizationMembers, i));
113
+
114
+ export const listOrganizationPlans = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("OrganizationPlan", '{input:#1,output:#7,errors:[],protocol:$10,retry:$11};$5(>8)@"List%sRequest";$5(>9)@"PlanPrice";$7(#2);$5(>10)@"PlanQuotas";$5(>11)@"%";$7(#5);$5(>12)@"List%sResponse";$4({organizationSlug:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/organizations/{organizationSlug}/plans",code:200}));$4({value:$6($3),timeline:$6($3)});$4({rowsRead:$6($8),rowsWritten:$6($8),databases:$6($9($8)),locations:$6($8),storage:$6($8),groups:$6($8),bytesSynced:$6($8)});$4({name:$6($3),price:$6($3),prices:$6(#3),quotas:$6(#4)});$4({plans:$6(#6)})', [__0, __1, __2, __3, __6, __7, __5, __11, __10, __9, TursoProtocol, Retry.Retry]) : API.call(listOrganizationPlans, i));
115
+
116
+ export const listOrganizations = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#3,errors:[],protocol:$7,retry:$8};$3(>4)@"ListOrganizationsRequest";$5(#4:0);$3(>5)@"ListOrganizationsResponse";$2({}).pipe($1({method:"GET",uri:"/v1/organizations",code:200}));#2.pipe($6())', [__0, __1, __6, __7, __d6, __11, __14, TursoProtocol, Retry.Retry]] : API.call(listOrganizations, i));
117
+
118
+ export const removeLocationFromGroup = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7,$8],protocol:$9,retry:$10};$5(>2)@"RemoveLocationFromGroupRequest";$4({organizationSlug:$3.pipe($2()),groupName:$3.pipe($2()),location:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/v1/organizations/{organizationSlug}/groups/{groupName}/locations/{location}",code:200}))', [__0, __1, __2, __3, __6, __7, __d15, BadRequest, NotFound, TursoProtocol, Retry.Retry]] : API.call(removeLocationFromGroup, i));
119
+
120
+ export const removeOrganizationMember = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$7],protocol:$8,retry:$9};$5(>3)@"RemoveOrganizationMemberRequest";$5(>4)@"RemoveOrganizationMemberResponse";$4({organizationSlug:$3.pipe($2()),username:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/v1/organizations/{organizationSlug}/members/{username}",code:200}));$4({member:$6($3)})', [__0, __1, __2, __3, __6, __7, __5, NotFound, TursoProtocol, Retry.Retry]] : API.call(removeOrganizationMember, i));
121
+
122
+ export const restoreDatabase = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$8,$9,$10],protocol:$11,retry:$12};$6(>3)@"RestoreDatabaseRequest";$6(>4)@"RestoreDatabaseResponse";$5({organizationId:$3.pipe($2()),databaseId:$3.pipe($2()),name:$4($3)}).pipe($1({method:"POST",uri:"/v3/organizations/{organizationId}/databases/{databaseId}/restore",code:200}));$5({database:$4(#7:0)})', [__0, __1, __2, __3, __5, __6, __7, __d10, BadRequest, Forbidden, NotFound, TursoProtocol, Retry.Retry]] : API.call(restoreDatabase, i));
123
+
124
+ export const restoreGroup = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[$10,$11,$12],protocol:$13,retry:$14};$5(>3)@"RestoreGroupRequest";$5(>4)@"RestoreGroupResponse";$4({organizationId:$3.pipe($2()),groupId:$3.pipe($2())}).pipe($1({method:"POST",uri:"/v3/organizations/{organizationId}/groups/{groupId}/restore",code:200}));$4({group:$7(#6:0),databases:$7(#8:0),failures:$7(#9:0)})', [__0, __1, __2, __3, __6, __7, __d14, __5, __d11, __d12, BadRequest, Forbidden, NotFound, TursoProtocol, Retry.Retry]] : API.call(restoreGroup, i));
125
+
126
+ export const revokeAPIToken = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7],protocol:$8,retry:$9};$5(>2)@"RevokeAPITokenRequest";$4({tokenName:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/v1/auth/api-tokens/{tokenName}",code:200}))', [__0, __1, __2, __3, __6, __7, __d16, NotFound, TursoProtocol, Retry.Retry]] : API.call(revokeAPIToken, i));
127
+
128
+ export const revokeOrganizationAPIToken = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7],protocol:$8,retry:$9};$5(>2)@"RevokeOrganizationAPITokenRequest";$4({organizationSlug:$3.pipe($2()),tokenId:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/v1/organizations/{organizationSlug}/api-tokens/{tokenId}",code:200}))', [__0, __1, __2, __3, __6, __7, __d16, NotFound, TursoProtocol, Retry.Retry]] : API.call(revokeOrganizationAPIToken, i));
129
+
130
+ export const transferGroup = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#7:0,errors:[$8],protocol:$9,retry:$10};$6(>2)@"TransferGroupRequest";$5({organizationSlug:$3.pipe($2()),groupName:$3.pipe($2()),organization:$4($3)}).pipe($1({method:"POST",uri:"/v1/organizations/{organizationSlug}/groups/{groupName}/transfer",code:200}))', [__0, __1, __2, __3, __5, __6, __7, __d14, NotFound, TursoProtocol, Retry.Retry]] : API.call(transferGroup, i));
131
+
132
+ export const unarchiveGroup = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7],protocol:$8,retry:$9};$5(>2)@"UnarchiveGroupRequest";$4({organizationSlug:$3.pipe($2()),groupName:$3.pipe($2())}).pipe($1({method:"POST",uri:"/v1/organizations/{organizationSlug}/groups/{groupName}/unarchive",code:200}))', [__0, __1, __2, __3, __6, __7, __d15, NotFound, TursoProtocol, Retry.Retry]] : API.call(unarchiveGroup, i));
133
+
134
+ export const updateDatabaseConfiguration = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#9:0,errors:[$10],protocol:$11,retry:$12};$8(>2)@"UpdateDatabaseConfigurationRequest";$7({organizationSlug:$3.pipe($2()),databaseName:$3.pipe($2()),size_limit:$4($3),allow_attach:$4($5),block_reads:$4($5),block_writes:$4($5),delete_protection:$4($5),allowed_ips:$4(#6:0),allowed_aws_vpc_ids:$4(#6:0)}).pipe($1({method:"PATCH",uri:"/v1/organizations/{organizationSlug}/databases/{databaseName}/configuration",code:200}))', [__0, __1, __2, __3, __5, __8, __d13, __6, __7, __d2, NotFound, TursoProtocol, Retry.Retry]] : API.call(updateDatabaseConfiguration, i));
135
+
136
+ export const updateGroupConfiguration = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#8:0,errors:[$9],protocol:$10,retry:$11};$7(>2)@"UpdateGroupConfigurationRequest";$6({organizationSlug:$3.pipe($2()),groupName:$3.pipe($2()),delete_protection:$5($4)}).pipe($1({method:"PATCH",uri:"/v1/organizations/{organizationSlug}/groups/{groupName}/configuration",code:200}))', [__0, __1, __2, __3, __8, __5, __6, __7, __d5, NotFound, TursoProtocol, Retry.Retry]] : API.call(updateGroupConfiguration, i));
137
+
138
+ export const updateGroupDatabases = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#6:0,errors:[$7],protocol:$8,retry:$9};$5(>2)@"UpdateGroupDatabasesRequest";$4({organizationSlug:$3.pipe($2()),groupName:$3.pipe($2())}).pipe($1({method:"POST",uri:"/v1/organizations/{organizationSlug}/groups/{groupName}/update",code:200}))', [__0, __1, __2, __3, __6, __7, __d0, NotFound, TursoProtocol, Retry.Retry]] : API.call(updateGroupDatabases, i));
139
+
140
+ export const updateMemberRole = /*@__PURE__*/ API.op((i) => i === API.D ? API.named("UpdateMemberRoleResponse", '{input:#1,output:#3,errors:[$7,$8,$9],protocol:$10,retry:$11};$5(>4)@"UpdateMemberRoleRequest";$5(>5)@"%Member";$5(>6)@"%";$4({organizationSlug:$3.pipe($2()),username:$3.pipe($2()),role:$3}).pipe($1({method:"PATCH",uri:"/v1/organizations/{organizationSlug}/members/{username}",code:200}));$4({username:$6($3),email:$6($3),role:$6($3)});$4({member:$6(#2)})', [__0, __1, __2, __3, __6, __7, __5, BadRequest, Forbidden, NotFound, TursoProtocol, Retry.Retry]) : API.call(updateMemberRole, i));
141
+
142
+ export const updateOrganization = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#8:0,errors:[],protocol:$9,retry:$10};$7(>2)@"UpdateOrganizationRequest";$6({organizationSlug:$3.pipe($2()),overages:$5($4),require_mfa:$5($4),restore_enabled:$5($4)}).pipe($1({method:"PATCH",uri:"/v1/organizations/{organizationSlug}",code:200}))', [__0, __1, __2, __3, __8, __5, __6, __7, __d7, TursoProtocol, Retry.Retry]] : API.call(updateOrganization, i));
143
+
144
+ export const validateAPIToken = /*@__PURE__*/ API.op((i) => i === API.D ? ['{input:#1,output:#2,errors:[],protocol:$6,retry:$7};$3(>3)@"ValidateAPITokenRequest";$3(>4)@"ValidateAPITokenResponse";$2({}).pipe($1({method:"GET",uri:"/v1/auth/validate",code:200}));$2({exp:$5($4)})', [__0, __1, __6, __7, __10, __5, TursoProtocol, Retry.Retry]] : API.call(validateAPIToken, i));
145
+ // Schema builders: each runs one schema initializer, on that schema's first use.
146
+ // Schema table: entry i is schema j of builder f, made on first reach.
147
+
148
+
149
+ // Shared schema data (see `op` in core/api).
150
+ function __d0() {
151
+ return ['$2(>1)@"DeleteOrganizationInviteByEmailV2Response";$1({})', [__0, __6, __7]];
14
152
  }
15
- export class Conflict extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
16
- /*@__PURE__*/ S.TaggedError()("Conflict", {
17
- code: S.Number,
18
- message: S.String,
19
- }).pipe(C.withConflictError), [{ status: 409 }]) {
153
+ function __d1() {
154
+ return ['$4(>2)@"DatabaseParent";$4(>3)@"Database";$3({id:$2($1),name:$2($1),branched_at:$2($1)});$3({Name:$2($1),DbId:$2($1),Hostname:$2($1),block_reads:$2($5),block_writes:$2($5),regions:$2(#6:0),primaryRegion:$2($1),group:$2($1),delete_protection:$2($5),parent:$2($7(#0)),allow_attach:$2($5)})', [__0, __3, __5, __6, __7, __8, __d13, __9]];
20
155
  }
21
- export class Forbidden extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
22
- /*@__PURE__*/ S.TaggedError()("Forbidden", {
23
- code: S.Number,
24
- message: S.String,
25
- }).pipe(C.withAuthError), [{ status: 403 }]) {
156
+ function __d2() {
157
+ return ['$6(>1)@"DatabaseConfigurationResponse";$5({size_limit:$2($1),allow_attach:$2($3),block_reads:$2($3),block_writes:$2($3),delete_protection:$2($3),allowed_ips:$2(#4:0),allowed_aws_vpc_ids:$2(#4:0)})', [__0, __3, __5, __8, __d13, __6, __7]];
26
158
  }
27
- export class NotFound extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
28
- /*@__PURE__*/ S.TaggedError()("NotFound", {
29
- code: S.Number,
30
- message: S.String,
31
- }).pipe(C.withBadRequestError), [{ status: 404 }]) {
159
+ function __d3() {
160
+ return ['$4(>1)@"Instance";$3({uuid:$2($1),name:$2($1),type:$2($1),region:$2($1),hostname:$2($1)})', [__0, __3, __5, __6, __7]];
161
+ }
162
+ function __d4() {
163
+ return ['$4(>4)@"DatabaseUsageObject";$4(>5)@"DatabaseUsageOutputInstancesItem";$6(#1);$4(>6)@"DatabaseUsageOutput";$3({rows_read:$2($1),rows_written:$2($1),storage_bytes:$2($1),bytes_synced:$2($1)});$3({uuid:$2($5),usage:$2(#0)});$3({uuid:$2($5),instances:$2(#2),total:$2(#0)})', [__0, __10, __5, __6, __7, __3, __11]];
164
+ }
165
+ function __d5() {
166
+ return ['$4(>1)@"GroupConfigurationResponse";$3({delete_protection:$2($1)})', [__0, __8, __5, __6, __7]];
167
+ }
168
+ function __d6() {
169
+ return ['$5(>1)@"Organization";$4({name:$2($1),slug:$2($1),type:$2($1),overages:$2($3),require_mfa:$2($3),blocked_reads:$2($3),blocked_writes:$2($3),plan_id:$2($1),plan_timeline:$2($1),platform:$2($1),restore_enabled:$2($3)})', [__0, __3, __5, __8, __6, __7]];
170
+ }
171
+ function __d7() {
172
+ return ['$4(>1)@"GetOrganizationResponse";$3({organization:$2(#1:0)})', [__0, __d6, __5, __6, __7]];
173
+ }
174
+ function __d8() {
175
+ return ['$4(>1)@"Member";$3({username:$2($1),role:$2($1),email:$2($1)})', [__0, __3, __5, __6, __7]];
176
+ }
177
+ function __d9() {
178
+ return ['$4(>1)@"Pagination";$3({next:$2($1)})', [__0, __3, __5, __6, __7]];
179
+ }
180
+ function __d10() {
181
+ return ['$6(>1)@"DeletedDatabase";$5({Name:$2($1),DbId:$2($1),Hostname:$2($1),group:$2($1),group_id:$2($1),organization_id:$2($1),regions:$2(#3:0),primaryRegion:$2($1),delete_protection:$2($4),deleted_at:$2($1),group_deleted_at:$2($1)})', [__0, __3, __5, __d13, __8, __6, __7]];
182
+ }
183
+ function __d11() {
184
+ return ['$2(#1:0)', [__0, __d10, __11]];
185
+ }
186
+ function __d12() {
187
+ return ['$2($1,$1)', [__0, __3, __12]];
188
+ }
189
+ function __d13() {
190
+ return ['$2($1)', [__0, __3, __11]];
191
+ }
192
+ function __d14() {
193
+ return ['$6(>1)@"Group";$5({name:$2($1),version:$2($1),uuid:$2($1),locations:$2(#3:0),primary:$2($1),delete_protection:$2($4)})', [__0, __3, __5, __d13, __8, __6, __7]];
194
+ }
195
+ function __d15() {
196
+ return ['$4(>1)@"AddLocationToGroupResponse";$3({group:$2(#1:0)})', [__0, __d14, __5, __6, __7]];
197
+ }
198
+ function __d16() {
199
+ return ['$4(>1)@"RevokeAPITokenResponse";$3({token:$2($1)})', [__0, __3, __5, __6, __7]];
200
+ }
201
+ function __d17() {
202
+ return ['$4(>3)@"CreateDatabaseTokenRequestPermissionsReadAttach";$4(>4)@"CreateDatabaseTokenRequestPermissions";$4(>5)@"CreateDatabaseTokenResponse";$3({databases:$2(#1:0)});$3({read_attach:$2(#0)});$3({jwt:$2($6.pipe($5({})))})', [__0, __d13, __5, __6, __7, __15, __3]];
32
203
  }
33
- export const AddLocationToGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
34
- organizationSlug: S.String.pipe(T.Label()),
35
- groupName: S.String.pipe(T.Label()),
36
- location: S.String.pipe(T.Label()),
37
- }).pipe(T.Http({
38
- method: "POST",
39
- uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/locations/{location}",
40
- code: 200,
41
- }))).annotate({
42
- identifier: "AddLocationToGroupRequest",
43
- });
44
- export const GroupLocationsList = /*@__PURE__*/ S.Array(S.String);
45
- export const Group = /*@__PURE__*/ S.suspend(() => S.Struct({
46
- name: S.optional(S.String),
47
- version: S.optional(S.String),
48
- uuid: S.optional(S.String),
49
- locations: S.optional(GroupLocationsList),
50
- primary: S.optional(S.String),
51
- delete_protection: S.optional(S.Boolean),
52
- })).annotate({ identifier: "Group" });
53
- export const AddLocationToGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
54
- group: S.optional(Group),
55
- })).annotate({
56
- identifier: "AddLocationToGroupResponse",
57
- });
58
- export const AddOrganizationMemberRequestRole = S.String;
59
- export const AddOrganizationMemberRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
60
- organizationSlug: S.String.pipe(T.Label()),
61
- username: S.optional(S.String),
62
- role: S.optional(AddOrganizationMemberRequestRole),
63
- }).pipe(T.Http({ method: "POST", uri: "/v1/organizations/{organizationSlug}/members", code: 200 }))).annotate({
64
- identifier: "AddOrganizationMemberRequest",
65
- });
66
- export const Role = S.String;
67
- export const AddOrganizationMemberResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
68
- member: S.optional(S.String),
69
- role: S.optional(Role),
70
- })).annotate({
71
- identifier: "AddOrganizationMemberResponse",
72
- });
73
- export const CreateAPITokenRequestScopesItem = S.String;
74
- export const CreateAPITokenRequestScopesList = /*@__PURE__*/ S.Array(CreateAPITokenRequestScopesItem);
75
- export const CreateAPITokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
76
- tokenName: S.String.pipe(T.Label()),
77
- organization: S.optional(S.String),
78
- group: S.optional(S.String),
79
- scopes: S.optional(CreateAPITokenRequestScopesList),
80
- }).pipe(T.Http({ method: "POST", uri: "/v1/auth/api-tokens/{tokenName}", code: 200 }))).annotate({ identifier: "CreateAPITokenRequest" });
81
- export const CreateAPITokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
82
- name: S.optional(S.String),
83
- id: S.optional(S.String),
84
- token: S.optional(S.String.pipe(T.SensitiveValue({}))),
85
- })).annotate({ identifier: "CreateAPITokenResponse" });
86
- export const CreateDatabaseRequestSeedType = S.String;
87
- export const CreateDatabaseRequestSeed = /*@__PURE__*/ S.suspend(() => S.Struct({
88
- type: S.optional(CreateDatabaseRequestSeedType),
89
- name: S.optional(S.String),
90
- timestamp: S.optional(S.String),
91
- })).annotate({
92
- identifier: "CreateDatabaseRequestSeed",
93
- });
94
- export const CreateDatabaseRequestRemoteEncryptionEncryptionCipher = S.String;
95
- export const CreateDatabaseRequestRemoteEncryption = /*@__PURE__*/ S.suspend(() => S.Struct({
96
- encryption_key: S.optional(S.String),
97
- encryption_cipher: S.optional(CreateDatabaseRequestRemoteEncryptionEncryptionCipher),
98
- })).annotate({
99
- identifier: "CreateDatabaseRequestRemoteEncryption",
100
- });
101
- export const CreateDatabaseRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
102
- organizationSlug: S.String.pipe(T.Label()),
103
- name: S.String,
104
- group: S.String,
105
- seed: S.optional(CreateDatabaseRequestSeed),
106
- size_limit: S.optional(S.String),
107
- remote_encryption: S.optional(CreateDatabaseRequestRemoteEncryption),
108
- }).pipe(T.Http({ method: "POST", uri: "/v1/organizations/{organizationSlug}/databases", code: 200 }))).annotate({ identifier: "CreateDatabaseRequest" });
109
- export const CreateDatabaseOutput = /*@__PURE__*/ S.suspend(() => S.Struct({
110
- DbId: S.optional(S.String),
111
- Hostname: S.optional(S.String),
112
- Name: S.optional(S.String),
113
- })).annotate({ identifier: "CreateDatabaseOutput" });
114
- export const CreateDatabaseResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
115
- database: S.optional(CreateDatabaseOutput),
116
- })).annotate({ identifier: "CreateDatabaseResponse" });
117
- export const CreateDatabaseTokenRequestAuthorization = S.String;
118
- export const CreateDatabaseTokenRequestPermissionsReadAttachDatabasesList = /*@__PURE__*/ S.Array(S.String);
119
- export const CreateDatabaseTokenRequestPermissionsReadAttach = /*@__PURE__*/ S.suspend(() => S.Struct({
120
- databases: S.optional(CreateDatabaseTokenRequestPermissionsReadAttachDatabasesList),
121
- })).annotate({
122
- identifier: "CreateDatabaseTokenRequestPermissionsReadAttach",
123
- });
124
- export const CreateDatabaseTokenRequestPermissions = /*@__PURE__*/ S.suspend(() => S.Struct({
125
- read_attach: S.optional(CreateDatabaseTokenRequestPermissionsReadAttach),
126
- })).annotate({
127
- identifier: "CreateDatabaseTokenRequestPermissions",
128
- });
129
- export const CreateDatabaseTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
130
- organizationSlug: S.String.pipe(T.Label()),
131
- databaseName: S.String.pipe(T.Label()),
132
- expiration: S.optional(S.String.pipe(T.Query())),
133
- authorization: S.optional(CreateDatabaseTokenRequestAuthorization.pipe(T.Query())),
134
- permissions: S.optional(CreateDatabaseTokenRequestPermissions),
135
- }).pipe(T.Http({
136
- method: "POST",
137
- uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/auth/tokens",
138
- code: 200,
139
- }))).annotate({
140
- identifier: "CreateDatabaseTokenRequest",
141
- });
142
- export const CreateDatabaseTokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
143
- jwt: S.optional(S.String.pipe(T.SensitiveValue({}))),
144
- })).annotate({
145
- identifier: "CreateDatabaseTokenResponse",
146
- });
147
- export const ExtensionsCase0 = S.String;
148
- export const ExtensionsCase1Item = S.String;
149
- export const ExtensionsCase1List = /*@__PURE__*/ S.Array(ExtensionsCase1Item);
150
- export const Extensions = S.Unknown;
151
- export const CreateGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
152
- organizationSlug: S.String.pipe(T.Label()),
153
- name: S.String,
154
- location: S.String,
155
- extensions: S.optional(Extensions),
156
- }).pipe(T.Http({ method: "POST", uri: "/v1/organizations/{organizationSlug}/groups", code: 200 }))).annotate({ identifier: "CreateGroupRequest" });
157
- export const CreateGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
158
- group: S.optional(Group),
159
- })).annotate({ identifier: "CreateGroupResponse" });
160
- export const CreateGroupTokenRequestAuthorization = S.String;
161
- export const CreateGroupTokenRequestPermissionsReadAttachDatabasesList = /*@__PURE__*/ S.Array(S.String);
162
- export const CreateGroupTokenRequestPermissionsReadAttach = /*@__PURE__*/ S.suspend(() => S.Struct({
163
- databases: S.optional(CreateGroupTokenRequestPermissionsReadAttachDatabasesList),
164
- })).annotate({
165
- identifier: "CreateGroupTokenRequestPermissionsReadAttach",
166
- });
167
- export const CreateGroupTokenRequestPermissions = /*@__PURE__*/ S.suspend(() => S.Struct({
168
- read_attach: S.optional(CreateGroupTokenRequestPermissionsReadAttach),
169
- })).annotate({
170
- identifier: "CreateGroupTokenRequestPermissions",
171
- });
172
- export const CreateGroupTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
173
- organizationSlug: S.String.pipe(T.Label()),
174
- groupName: S.String.pipe(T.Label()),
175
- expiration: S.optional(S.String.pipe(T.Query())),
176
- authorization: S.optional(CreateGroupTokenRequestAuthorization.pipe(T.Query())),
177
- permissions: S.optional(CreateGroupTokenRequestPermissions),
178
- }).pipe(T.Http({
179
- method: "POST",
180
- uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/auth/tokens",
181
- code: 200,
182
- }))).annotate({ identifier: "CreateGroupTokenRequest" });
183
- export const CreateGroupTokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
184
- jwt: S.optional(S.String.pipe(T.SensitiveValue({}))),
185
- })).annotate({ identifier: "CreateGroupTokenResponse" });
186
- export const DeleteDatabaseRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
187
- organizationSlug: S.String.pipe(T.Label()),
188
- databaseName: S.String.pipe(T.Label()),
189
- }).pipe(T.Http({
190
- method: "DELETE",
191
- uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}",
192
- code: 200,
193
- }))).annotate({ identifier: "DeleteDatabaseRequest" });
194
- export const DeleteDatabaseResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
195
- database: S.optional(S.String),
196
- })).annotate({ identifier: "DeleteDatabaseResponse" });
197
- export const DeleteGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
198
- organizationSlug: S.String.pipe(T.Label()),
199
- groupName: S.String.pipe(T.Label()),
200
- }).pipe(T.Http({
201
- method: "DELETE",
202
- uri: "/v1/organizations/{organizationSlug}/groups/{groupName}",
203
- code: 200,
204
- }))).annotate({ identifier: "DeleteGroupRequest" });
205
- export const DeleteGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
206
- group: S.optional(Group),
207
- })).annotate({ identifier: "DeleteGroupResponse" });
208
- export const DeleteOrganizationInviteByEmailV2Request = /*@__PURE__*/ S.suspend(() => S.Struct({
209
- organizationSlug: S.String.pipe(T.Label()),
210
- email: S.String.pipe(T.Label()),
211
- }).pipe(T.Http({
212
- method: "DELETE",
213
- uri: "/v2/organizations/{organizationSlug}/invites/{email}",
214
- code: 200,
215
- }))).annotate({
216
- identifier: "DeleteOrganizationInviteByEmailV2Request",
217
- });
218
- export const DeleteOrganizationInviteByEmailV2Response = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
219
- identifier: "DeleteOrganizationInviteByEmailV2Response",
220
- });
221
- export const GetCurrentUserRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/user", code: 200 }))).annotate({ identifier: "GetCurrentUserRequest" });
222
- export const GetCurrentUserResponseUser = /*@__PURE__*/ S.suspend(() => S.Struct({
223
- username: S.optional(S.String),
224
- name: S.optional(S.String),
225
- email: S.optional(S.String),
226
- avatarUrl: S.optional(S.String),
227
- plan: S.optional(S.String),
228
- mfa: S.optional(S.Boolean),
229
- has_pending_invites: S.optional(S.Boolean),
230
- })).annotate({
231
- identifier: "GetCurrentUserResponseUser",
232
- });
233
- export const GetCurrentUserResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
234
- user: S.optional(GetCurrentUserResponseUser),
235
- })).annotate({ identifier: "GetCurrentUserResponse" });
236
- export const GetDatabaseRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
237
- organizationSlug: S.String.pipe(T.Label()),
238
- databaseName: S.String.pipe(T.Label()),
239
- }).pipe(T.Http({
240
- method: "GET",
241
- uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}",
242
- code: 200,
243
- }))).annotate({ identifier: "GetDatabaseRequest" });
244
- export const DatabaseRegionsList = /*@__PURE__*/ S.Array(S.String);
245
- export const DatabaseParent = /*@__PURE__*/ S.suspend(() => S.Struct({
246
- id: S.optional(S.String),
247
- name: S.optional(S.String),
248
- branched_at: S.optional(S.String),
249
- })).annotate({ identifier: "DatabaseParent" });
250
- export const Database = /*@__PURE__*/ S.suspend(() => S.Struct({
251
- Name: S.optional(S.String),
252
- DbId: S.optional(S.String),
253
- Hostname: S.optional(S.String),
254
- block_reads: S.optional(S.Boolean),
255
- block_writes: S.optional(S.Boolean),
256
- regions: S.optional(DatabaseRegionsList),
257
- primaryRegion: S.optional(S.String),
258
- group: S.optional(S.String),
259
- delete_protection: S.optional(S.Boolean),
260
- parent: S.optional(S.NullOr(DatabaseParent)),
261
- allow_attach: S.optional(S.Boolean),
262
- })).annotate({ identifier: "Database" });
263
- export const GetDatabaseResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
264
- database: S.optional(Database),
265
- })).annotate({ identifier: "GetDatabaseResponse" });
266
- export const GetDatabaseConfigurationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
267
- organizationSlug: S.String.pipe(T.Label()),
268
- databaseName: S.String.pipe(T.Label()),
269
- }).pipe(T.Http({
270
- method: "GET",
271
- uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/configuration",
272
- code: 200,
273
- }))).annotate({
274
- identifier: "GetDatabaseConfigurationRequest",
275
- });
276
- export const DatabaseConfigurationResponseAllowedIpsList = /*@__PURE__*/ S.Array(S.String);
277
- export const DatabaseConfigurationResponseAllowedAwsVpcIdsList = /*@__PURE__*/ S.Array(S.String);
278
- export const DatabaseConfigurationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
279
- size_limit: S.optional(S.String),
280
- allow_attach: S.optional(S.Boolean),
281
- block_reads: S.optional(S.Boolean),
282
- block_writes: S.optional(S.Boolean),
283
- delete_protection: S.optional(S.Boolean),
284
- allowed_ips: S.optional(DatabaseConfigurationResponseAllowedIpsList),
285
- allowed_aws_vpc_ids: S.optional(DatabaseConfigurationResponseAllowedAwsVpcIdsList),
286
- })).annotate({
287
- identifier: "DatabaseConfigurationResponse",
288
- });
289
- export const GetDatabaseInstanceRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
290
- organizationSlug: S.String.pipe(T.Label()),
291
- databaseName: S.String.pipe(T.Label()),
292
- instanceName: S.String.pipe(T.Label()),
293
- }).pipe(T.Http({
294
- method: "GET",
295
- uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/instances/{instanceName}",
296
- code: 200,
297
- }))).annotate({
298
- identifier: "GetDatabaseInstanceRequest",
299
- });
300
- export const InstanceType = S.String;
301
- export const Instance = /*@__PURE__*/ S.suspend(() => S.Struct({
302
- uuid: S.optional(S.String),
303
- name: S.optional(S.String),
304
- type: S.optional(InstanceType),
305
- region: S.optional(S.String),
306
- hostname: S.optional(S.String),
307
- })).annotate({ identifier: "Instance" });
308
- export const GetDatabaseInstanceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
309
- instance: S.optional(Instance),
310
- })).annotate({
311
- identifier: "GetDatabaseInstanceResponse",
312
- });
313
- export const GetDatabaseStatsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
314
- organizationSlug: S.String.pipe(T.Label()),
315
- databaseName: S.String.pipe(T.Label()),
316
- }).pipe(T.Http({
317
- method: "GET",
318
- uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/stats",
319
- code: 200,
320
- }))).annotate({ identifier: "GetDatabaseStatsRequest" });
321
- export const DatabaseStatsOutput = /*@__PURE__*/ S.suspend(() => S.Struct({
322
- query: S.optional(S.String),
323
- rows_read: S.optional(S.Number),
324
- rows_written: S.optional(S.Number),
325
- })).annotate({ identifier: "DatabaseStatsOutput" });
326
- export const GetDatabaseStatsResponseTopQueriesList = /*@__PURE__*/ S.Array(DatabaseStatsOutput);
327
- export const GetDatabaseStatsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
328
- top_queries: S.optional(S.NullOr(GetDatabaseStatsResponseTopQueriesList)),
329
- })).annotate({ identifier: "GetDatabaseStatsResponse" });
330
- export const GetDatabaseUsageRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
331
- organizationSlug: S.String.pipe(T.Label()),
332
- databaseName: S.String.pipe(T.Label()),
333
- from: S.optional(S.String.pipe(T.Query())),
334
- to: S.optional(S.String.pipe(T.Query())),
335
- }).pipe(T.Http({
336
- method: "GET",
337
- uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/usage",
338
- code: 200,
339
- }))).annotate({ identifier: "GetDatabaseUsageRequest" });
340
- export const DatabaseUsageObject = /*@__PURE__*/ S.suspend(() => S.Struct({
341
- rows_read: S.optional(S.Number),
342
- rows_written: S.optional(S.Number),
343
- storage_bytes: S.optional(S.Number),
344
- bytes_synced: S.optional(S.Number),
345
- })).annotate({ identifier: "DatabaseUsageObject" });
346
- export const DatabaseUsageOutputInstancesItem = /*@__PURE__*/ S.suspend(() => S.Struct({
347
- uuid: S.optional(S.String),
348
- usage: S.optional(DatabaseUsageObject),
349
- })).annotate({
350
- identifier: "DatabaseUsageOutputInstancesItem",
351
- });
352
- export const DatabaseUsageOutputInstancesList = /*@__PURE__*/ S.Array(DatabaseUsageOutputInstancesItem);
353
- export const DatabaseUsageOutput = /*@__PURE__*/ S.suspend(() => S.Struct({
354
- uuid: S.optional(S.String),
355
- instances: S.optional(DatabaseUsageOutputInstancesList),
356
- total: S.optional(DatabaseUsageObject),
357
- })).annotate({ identifier: "DatabaseUsageOutput" });
358
- export const GetDatabaseUsageResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
359
- database: S.optional(DatabaseUsageOutput),
360
- })).annotate({ identifier: "GetDatabaseUsageResponse" });
361
- export const GetGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
362
- organizationSlug: S.String.pipe(T.Label()),
363
- groupName: S.String.pipe(T.Label()),
364
- }).pipe(T.Http({
365
- method: "GET",
366
- uri: "/v1/organizations/{organizationSlug}/groups/{groupName}",
367
- code: 200,
368
- }))).annotate({ identifier: "GetGroupRequest" });
369
- export const GetGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
370
- group: S.optional(Group),
371
- })).annotate({ identifier: "GetGroupResponse" });
372
- export const GetGroupConfigurationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
373
- organizationSlug: S.String.pipe(T.Label()),
374
- groupName: S.String.pipe(T.Label()),
375
- }).pipe(T.Http({
376
- method: "GET",
377
- uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/configuration",
378
- code: 200,
379
- }))).annotate({
380
- identifier: "GetGroupConfigurationRequest",
381
- });
382
- export const GroupConfigurationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
383
- delete_protection: S.optional(S.Boolean),
384
- })).annotate({
385
- identifier: "GroupConfigurationResponse",
386
- });
387
- export const GetOrganizationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
388
- organizationSlug: S.String.pipe(T.Label()),
389
- }).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}", code: 200 }))).annotate({ identifier: "GetOrganizationRequest" });
390
- export const OrganizationType = S.String;
391
- export const Organization = /*@__PURE__*/ S.suspend(() => S.Struct({
392
- name: S.optional(S.String),
393
- slug: S.optional(S.String),
394
- type: S.optional(OrganizationType),
395
- overages: S.optional(S.Boolean),
396
- require_mfa: S.optional(S.Boolean),
397
- blocked_reads: S.optional(S.Boolean),
398
- blocked_writes: S.optional(S.Boolean),
399
- plan_id: S.optional(S.String),
400
- plan_timeline: S.optional(S.String),
401
- platform: S.optional(S.String),
402
- restore_enabled: S.optional(S.Boolean),
403
- })).annotate({ identifier: "Organization" });
404
- export const GetOrganizationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
405
- organization: S.optional(Organization),
406
- })).annotate({ identifier: "GetOrganizationResponse" });
407
- export const GetOrganizationMemberRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
408
- organizationSlug: S.String.pipe(T.Label()),
409
- username: S.String.pipe(T.Label()),
410
- }).pipe(T.Http({
411
- method: "GET",
412
- uri: "/v1/organizations/{organizationSlug}/members/{username}",
413
- code: 200,
414
- }))).annotate({
415
- identifier: "GetOrganizationMemberRequest",
416
- });
417
- export const MemberRole = S.String;
418
- export const Member = /*@__PURE__*/ S.suspend(() => S.Struct({
419
- username: S.optional(S.String),
420
- role: S.optional(MemberRole),
421
- email: S.optional(S.String),
422
- })).annotate({ identifier: "Member" });
423
- export const GetOrganizationMemberResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
424
- member: S.optional(Member),
425
- })).annotate({
426
- identifier: "GetOrganizationMemberResponse",
427
- });
428
- export const GetOrganizationSubscriptionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
429
- organizationSlug: S.String.pipe(T.Label()),
430
- }).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/subscription", code: 200 }))).annotate({
431
- identifier: "GetOrganizationSubscriptionRequest",
432
- });
433
- export const GetOrganizationSubscriptionResponseSubscription = /*@__PURE__*/ S.suspend(() => S.Struct({
434
- name: S.optional(S.String),
435
- overages: S.optional(S.Boolean),
436
- plan: S.optional(S.String),
437
- timeline: S.optional(S.String),
438
- })).annotate({
439
- identifier: "GetOrganizationSubscriptionResponseSubscription",
440
- });
441
- export const GetOrganizationSubscriptionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
442
- subscription: S.optional(GetOrganizationSubscriptionResponseSubscription),
443
- })).annotate({
444
- identifier: "GetOrganizationSubscriptionResponse",
445
- });
446
- export const GetOrganizationUsageRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
447
- organizationSlug: S.String.pipe(T.Label()),
448
- }).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/usage", code: 200 }))).annotate({
449
- identifier: "GetOrganizationUsageRequest",
450
- });
451
- export const GetOrganizationUsageResponseOrganizationUsage = /*@__PURE__*/ S.suspend(() => S.Struct({
452
- rows_read: S.optional(S.Number),
453
- rows_written: S.optional(S.Number),
454
- databases: S.optional(S.Number),
455
- locations: S.optional(S.Number),
456
- storage_bytes: S.optional(S.Number),
457
- groups: S.optional(S.Number),
458
- bytes_synced: S.optional(S.Number),
459
- })).annotate({
460
- identifier: "GetOrganizationUsageResponseOrganizationUsage",
461
- });
462
- export const GetOrganizationUsageResponseOrganizationDatabasesList = /*@__PURE__*/ S.Array(DatabaseUsageOutput);
463
- export const GetOrganizationUsageResponseOrganization = /*@__PURE__*/ S.suspend(() => S.Struct({
464
- uuid: S.optional(S.String),
465
- usage: S.optional(GetOrganizationUsageResponseOrganizationUsage),
466
- databases: S.optional(GetOrganizationUsageResponseOrganizationDatabasesList),
467
- })).annotate({
468
- identifier: "GetOrganizationUsageResponseOrganization",
469
- });
470
- export const GetOrganizationUsageResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
471
- organization: S.optional(GetOrganizationUsageResponseOrganization),
472
- })).annotate({
473
- identifier: "GetOrganizationUsageResponse",
474
- });
475
- export const InvalidateDatabaseTokensRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
476
- organizationSlug: S.String.pipe(T.Label()),
477
- databaseName: S.String.pipe(T.Label()),
478
- }).pipe(T.Http({
479
- method: "POST",
480
- uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/auth/rotate",
481
- code: 200,
482
- }))).annotate({
483
- identifier: "InvalidateDatabaseTokensRequest",
484
- });
485
- export const InvalidateDatabaseTokensResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
486
- identifier: "InvalidateDatabaseTokensResponse",
487
- });
488
- export const InvalidateGroupTokensRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
489
- organizationSlug: S.String.pipe(T.Label()),
490
- groupName: S.String.pipe(T.Label()),
491
- }).pipe(T.Http({
492
- method: "POST",
493
- uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/auth/rotate",
494
- code: 200,
495
- }))).annotate({
496
- identifier: "InvalidateGroupTokensRequest",
497
- });
498
- export const InvalidateGroupTokensResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
499
- identifier: "InvalidateGroupTokensResponse",
500
- });
501
- export const InviteOrganizationMemberV2RequestRole = S.String;
502
- export const InviteOrganizationMemberV2Request = /*@__PURE__*/ S.suspend(() => S.Struct({
503
- organizationSlug: S.String.pipe(T.Label()),
504
- email: S.optional(S.String),
505
- username: S.optional(S.String),
506
- role: S.optional(InviteOrganizationMemberV2RequestRole),
507
- }).pipe(T.Http({ method: "POST", uri: "/v2/organizations/{organizationSlug}/invites", code: 200 }))).annotate({
508
- identifier: "InviteOrganizationMemberV2Request",
509
- });
510
- export const InviteCreatedV2Role = S.String;
511
- export const InviteCreatedV2 = /*@__PURE__*/ S.suspend(() => S.Struct({
512
- email: S.optional(S.String),
513
- role: S.optional(InviteCreatedV2Role),
514
- organization: S.optional(S.String),
515
- })).annotate({ identifier: "InviteCreatedV2" });
516
- export const InviteOrganizationMemberV2Response = /*@__PURE__*/ S.suspend(() => S.Struct({
517
- invited: S.optional(InviteCreatedV2),
518
- })).annotate({
519
- identifier: "InviteOrganizationMemberV2Response",
520
- });
521
- export const ListAPITokensRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/auth/api-tokens", code: 200 }))).annotate({ identifier: "ListAPITokensRequest" });
522
- export const APITokenScopesList = /*@__PURE__*/ S.Array(S.String);
523
- export const APIToken = /*@__PURE__*/ S.suspend(() => S.Struct({
524
- name: S.optional(S.String),
525
- id: S.optional(S.String),
526
- organization: S.optional(S.String),
527
- group: S.optional(S.String),
528
- scopes: S.optional(APITokenScopesList),
529
- created_at: S.optional(S.String),
530
- })).annotate({ identifier: "APIToken" });
531
- export const ListAPITokensResponseTokensList = /*@__PURE__*/ S.Array(APIToken);
532
- export const ListAPITokensResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
533
- tokens: S.optional(ListAPITokensResponseTokensList),
534
- })).annotate({ identifier: "ListAPITokensResponse" });
535
- export const ListDatabaseInstancesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
536
- organizationSlug: S.String.pipe(T.Label()),
537
- databaseName: S.String.pipe(T.Label()),
538
- }).pipe(T.Http({
539
- method: "GET",
540
- uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/instances",
541
- code: 200,
542
- }))).annotate({
543
- identifier: "ListDatabaseInstancesRequest",
544
- });
545
- export const ListDatabaseInstancesResponseInstancesList = /*@__PURE__*/ S.Array(Instance);
546
- export const ListDatabaseInstancesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
547
- instances: S.optional(ListDatabaseInstancesResponseInstancesList),
548
- })).annotate({
549
- identifier: "ListDatabaseInstancesResponse",
550
- });
551
- export const ListDatabasesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
552
- organizationSlug: S.String.pipe(T.Label()),
553
- group: S.optional(S.String.pipe(T.Query())),
554
- schema: S.optional(S.String.pipe(T.Query())),
555
- parent: S.optional(S.String.pipe(T.Query())),
556
- }).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/databases", code: 200 }))).annotate({ identifier: "ListDatabasesRequest" });
557
- export const ListDatabasesResponseDatabasesList = /*@__PURE__*/ S.Array(Database);
558
- export const ListDatabasesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
559
- databases: S.optional(ListDatabasesResponseDatabasesList),
560
- })).annotate({ identifier: "ListDatabasesResponse" });
561
- export const ListDeletedDatabasesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
562
- organizationId: S.String.pipe(T.Label()),
563
- deleted: S.Boolean.pipe(T.Query()),
564
- search: S.optional(S.String.pipe(T.Query())),
565
- limit: S.optional(S.Number.pipe(T.Query())),
566
- cursor: S.optional(S.String.pipe(T.Query())),
567
- }).pipe(T.Http({ method: "GET", uri: "/v3/organizations/{organizationId}/databases", code: 200 }))).annotate({
568
- identifier: "ListDeletedDatabasesRequest",
569
- });
570
- export const DeletedDatabaseRegionsList = /*@__PURE__*/ S.Array(S.String);
571
- export const DeletedDatabase = /*@__PURE__*/ S.suspend(() => S.Struct({
572
- Name: S.optional(S.String),
573
- DbId: S.optional(S.String),
574
- Hostname: S.optional(S.String),
575
- group: S.optional(S.String),
576
- group_id: S.optional(S.String),
577
- organization_id: S.optional(S.String),
578
- regions: S.optional(DeletedDatabaseRegionsList),
579
- primaryRegion: S.optional(S.String),
580
- delete_protection: S.optional(S.Boolean),
581
- deleted_at: S.optional(S.String),
582
- group_deleted_at: S.optional(S.String),
583
- })).annotate({ identifier: "DeletedDatabase" });
584
- export const ListDeletedDatabasesResponseDatabasesList = /*@__PURE__*/ S.Array(DeletedDatabase);
585
- export const Pagination = /*@__PURE__*/ S.suspend(() => S.Struct({
586
- next: S.optional(S.String),
587
- })).annotate({ identifier: "Pagination" });
588
- export const ListDeletedDatabasesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
589
- databases: S.optional(ListDeletedDatabasesResponseDatabasesList),
590
- pagination: S.optional(Pagination),
591
- })).annotate({
592
- identifier: "ListDeletedDatabasesResponse",
593
- });
594
- export const ListDeletedGroupsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
595
- organizationId: S.String.pipe(T.Label()),
596
- limit: S.optional(S.Number.pipe(T.Query())),
597
- cursor: S.optional(S.String.pipe(T.Query())),
598
- }).pipe(T.Http({ method: "GET", uri: "/v3/organizations/{organizationId}/deleted-groups", code: 200 }))).annotate({ identifier: "ListDeletedGroupsRequest" });
599
- export const DeletedGroup = /*@__PURE__*/ S.suspend(() => S.Struct({
600
- uuid: S.optional(S.String),
601
- name: S.optional(S.String),
602
- deleted_at: S.optional(S.String),
603
- cascade_databases: S.optional(S.Number),
604
- })).annotate({ identifier: "DeletedGroup" });
605
- export const ListDeletedGroupsResponseGroupsList = /*@__PURE__*/ S.Array(DeletedGroup);
606
- export const ListDeletedGroupsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
607
- groups: S.optional(ListDeletedGroupsResponseGroupsList),
608
- pagination: S.optional(Pagination),
609
- })).annotate({
610
- identifier: "ListDeletedGroupsResponse",
611
- });
612
- export const ListGroupsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
613
- organizationSlug: S.String.pipe(T.Label()),
614
- }).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/groups", code: 200 }))).annotate({ identifier: "ListGroupsRequest" });
615
- export const ListGroupsResponseGroupsList = /*@__PURE__*/ S.Array(Group);
616
- export const ListGroupsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
617
- groups: S.optional(ListGroupsResponseGroupsList),
618
- })).annotate({ identifier: "ListGroupsResponse" });
619
- export const ListLocationsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/locations", code: 200 }))).annotate({ identifier: "ListLocationsRequest" });
620
- export const ListLocationsResponseLocationsMap = /*@__PURE__*/ S.Record(S.String, S.String);
621
- export const ListLocationsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
622
- locations: S.optional(ListLocationsResponseLocationsMap),
623
- })).annotate({ identifier: "ListLocationsResponse" });
624
- export const ListOrganizationAPITokensRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
625
- organizationSlug: S.String.pipe(T.Label()),
626
- }).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/api-tokens", code: 200 }))).annotate({
627
- identifier: "ListOrganizationAPITokensRequest",
628
- });
629
- export const ListOrganizationAPITokensResponseTokensItemScopesList = /*@__PURE__*/ S.Array(S.String);
630
- export const ListOrganizationAPITokensResponseTokensItemOwner = /*@__PURE__*/ S.suspend(() => S.Struct({
631
- username: S.optional(S.String),
632
- email: S.optional(S.String),
633
- })).annotate({
634
- identifier: "ListOrganizationAPITokensResponseTokensItemOwner",
635
- });
636
- export const ListOrganizationAPITokensResponseTokensItem = /*@__PURE__*/ S.suspend(() => S.Struct({
637
- name: S.optional(S.String),
638
- id: S.optional(S.String),
639
- organization: S.optional(S.String),
640
- group: S.optional(S.String),
641
- scopes: S.optional(ListOrganizationAPITokensResponseTokensItemScopesList),
642
- owner: S.optional(ListOrganizationAPITokensResponseTokensItemOwner),
643
- created_at: S.optional(S.String),
644
- })).annotate({
645
- identifier: "ListOrganizationAPITokensResponseTokensItem",
646
- });
647
- export const ListOrganizationAPITokensResponseTokensList = /*@__PURE__*/ S.Array(ListOrganizationAPITokensResponseTokensItem);
648
- export const ListOrganizationAPITokensResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
649
- tokens: S.optional(ListOrganizationAPITokensResponseTokensList),
650
- })).annotate({
651
- identifier: "ListOrganizationAPITokensResponse",
652
- });
653
- export const ListOrganizationAuditLogsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
654
- organizationSlug: S.String.pipe(T.Label()),
655
- page_size: S.optional(S.Number.pipe(T.Query())),
656
- page: S.optional(S.Number.pipe(T.Query())),
657
- }).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/audit-logs", code: 200 }))).annotate({
658
- identifier: "ListOrganizationAuditLogsRequest",
659
- });
660
- export const AuditLogCode = S.String;
661
- export const AuditLog = /*@__PURE__*/ S.suspend(() => S.Struct({
662
- code: S.optional(AuditLogCode),
663
- message: S.optional(S.String),
664
- origin: S.optional(S.String),
665
- author: S.optional(S.String),
666
- created_at: S.optional(S.String),
667
- data: S.optional(S.Unknown),
668
- })).annotate({ identifier: "AuditLog" });
669
- export const ListOrganizationAuditLogsResponseAuditLogsList = /*@__PURE__*/ S.Array(AuditLog);
670
- export const ListOrganizationAuditLogsResponsePagination = /*@__PURE__*/ S.suspend(() => S.Struct({
671
- page: S.optional(S.Number),
672
- page_size: S.optional(S.Number),
673
- total_pages: S.optional(S.Number),
674
- total_rows: S.optional(S.Number),
675
- })).annotate({
676
- identifier: "ListOrganizationAuditLogsResponsePagination",
677
- });
678
- export const ListOrganizationAuditLogsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
679
- audit_logs: S.optional(ListOrganizationAuditLogsResponseAuditLogsList),
680
- pagination: S.optional(ListOrganizationAuditLogsResponsePagination),
681
- })).annotate({
682
- identifier: "ListOrganizationAuditLogsResponse",
683
- });
684
- export const ListOrganizationInvitesV2Request = /*@__PURE__*/ S.suspend(() => S.Struct({
685
- organizationSlug: S.String.pipe(T.Label()),
686
- }).pipe(T.Http({ method: "GET", uri: "/v2/organizations/{organizationSlug}/invites", code: 200 }))).annotate({
687
- identifier: "ListOrganizationInvitesV2Request",
688
- });
689
- export const InviteV2Role = S.String;
690
- export const InviteV2 = /*@__PURE__*/ S.suspend(() => S.Struct({
691
- id: S.optional(S.Number),
692
- email: S.optional(S.String),
693
- role: S.optional(InviteV2Role),
694
- created_at: S.optional(S.String),
695
- })).annotate({ identifier: "InviteV2" });
696
- export const ListOrganizationInvitesV2ResponseInvitesList = /*@__PURE__*/ S.Array(InviteV2);
697
- export const ListOrganizationInvitesV2Response = /*@__PURE__*/ S.suspend(() => S.Struct({
698
- invites: S.optional(ListOrganizationInvitesV2ResponseInvitesList),
699
- })).annotate({
700
- identifier: "ListOrganizationInvitesV2Response",
701
- });
702
- export const ListOrganizationInvoicesRequestType = S.String;
703
- export const ListOrganizationInvoicesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
704
- organizationSlug: S.String.pipe(T.Label()),
705
- type: S.optional(ListOrganizationInvoicesRequestType.pipe(T.Query())),
706
- }).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/invoices", code: 200 }))).annotate({
707
- identifier: "ListOrganizationInvoicesRequest",
708
- });
709
- export const ListOrganizationInvoicesResponseInvoicesItem = /*@__PURE__*/ S.suspend(() => S.Struct({
710
- invoice_number: S.optional(S.String),
711
- amount_due: S.optional(S.String),
712
- due_date: S.optional(S.String),
713
- paid_at: S.optional(S.String),
714
- payment_failed_at: S.optional(S.String),
715
- invoice_pdf: S.optional(S.String),
716
- })).annotate({
717
- identifier: "ListOrganizationInvoicesResponseInvoicesItem",
718
- });
719
- export const ListOrganizationInvoicesResponseInvoicesList = /*@__PURE__*/ S.Array(ListOrganizationInvoicesResponseInvoicesItem);
720
- export const ListOrganizationInvoicesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
721
- invoices: S.optional(ListOrganizationInvoicesResponseInvoicesList),
722
- })).annotate({
723
- identifier: "ListOrganizationInvoicesResponse",
724
- });
725
- export const ListOrganizationMembersRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
726
- organizationSlug: S.String.pipe(T.Label()),
727
- }).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/members", code: 200 }))).annotate({
728
- identifier: "ListOrganizationMembersRequest",
729
- });
730
- export const ListOrganizationMembersResponseMembersList = /*@__PURE__*/ S.Array(Member);
731
- export const ListOrganizationMembersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
732
- members: S.optional(ListOrganizationMembersResponseMembersList),
733
- })).annotate({
734
- identifier: "ListOrganizationMembersResponse",
735
- });
736
- export const ListOrganizationPlansRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
737
- organizationSlug: S.String.pipe(T.Label()),
738
- }).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationSlug}/plans", code: 200 }))).annotate({
739
- identifier: "ListOrganizationPlansRequest",
740
- });
741
- export const PlanPrice = /*@__PURE__*/ S.suspend(() => S.Struct({
742
- value: S.optional(S.String),
743
- timeline: S.optional(S.String),
744
- })).annotate({ identifier: "PlanPrice" });
745
- export const OrganizationPlanPricesList = /*@__PURE__*/ S.Array(PlanPrice);
746
- export const PlanQuotas = /*@__PURE__*/ S.suspend(() => S.Struct({
747
- rowsRead: S.optional(S.Number),
748
- rowsWritten: S.optional(S.Number),
749
- databases: S.optional(S.NullOr(S.Number)),
750
- locations: S.optional(S.Number),
751
- storage: S.optional(S.Number),
752
- groups: S.optional(S.Number),
753
- bytesSynced: S.optional(S.Number),
754
- })).annotate({ identifier: "PlanQuotas" });
755
- export const OrganizationPlan = /*@__PURE__*/ S.suspend(() => S.Struct({
756
- name: S.optional(S.String),
757
- price: S.optional(S.String),
758
- prices: S.optional(OrganizationPlanPricesList),
759
- quotas: S.optional(PlanQuotas),
760
- })).annotate({ identifier: "OrganizationPlan" });
761
- export const ListOrganizationPlansResponsePlansList = /*@__PURE__*/ S.Array(OrganizationPlan);
762
- export const ListOrganizationPlansResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
763
- plans: S.optional(ListOrganizationPlansResponsePlansList),
764
- })).annotate({
765
- identifier: "ListOrganizationPlansResponse",
766
- });
767
- export const ListOrganizationsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/organizations", code: 200 }))).annotate({ identifier: "ListOrganizationsRequest" });
768
- export const ListOrganizationsResponseBodyList = /*@__PURE__*/ S.Array(Organization);
769
- export const ListOrganizationsResponse = /*@__PURE__*/ S.suspend(() => ListOrganizationsResponseBodyList.pipe(T.RawResponseRoot())).annotate({
770
- identifier: "ListOrganizationsResponse",
771
- });
772
- export const RemoveLocationFromGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
773
- organizationSlug: S.String.pipe(T.Label()),
774
- groupName: S.String.pipe(T.Label()),
775
- location: S.String.pipe(T.Label()),
776
- }).pipe(T.Http({
777
- method: "DELETE",
778
- uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/locations/{location}",
779
- code: 200,
780
- }))).annotate({
781
- identifier: "RemoveLocationFromGroupRequest",
782
- });
783
- export const RemoveLocationFromGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
784
- group: S.optional(Group),
785
- })).annotate({
786
- identifier: "RemoveLocationFromGroupResponse",
787
- });
788
- export const RemoveOrganizationMemberRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
789
- organizationSlug: S.String.pipe(T.Label()),
790
- username: S.String.pipe(T.Label()),
791
- }).pipe(T.Http({
792
- method: "DELETE",
793
- uri: "/v1/organizations/{organizationSlug}/members/{username}",
794
- code: 200,
795
- }))).annotate({
796
- identifier: "RemoveOrganizationMemberRequest",
797
- });
798
- export const RemoveOrganizationMemberResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
799
- member: S.optional(S.String),
800
- })).annotate({
801
- identifier: "RemoveOrganizationMemberResponse",
802
- });
803
- export const RestoreDatabaseRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
804
- organizationId: S.String.pipe(T.Label()),
805
- databaseId: S.String.pipe(T.Label()),
806
- name: S.optional(S.String),
807
- }).pipe(T.Http({
808
- method: "POST",
809
- uri: "/v3/organizations/{organizationId}/databases/{databaseId}/restore",
810
- code: 200,
811
- }))).annotate({ identifier: "RestoreDatabaseRequest" });
812
- export const RestoreDatabaseResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
813
- database: S.optional(DeletedDatabase),
814
- })).annotate({ identifier: "RestoreDatabaseResponse" });
815
- export const RestoreGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
816
- organizationId: S.String.pipe(T.Label()),
817
- groupId: S.String.pipe(T.Label()),
818
- }).pipe(T.Http({
819
- method: "POST",
820
- uri: "/v3/organizations/{organizationId}/groups/{groupId}/restore",
821
- code: 200,
822
- }))).annotate({ identifier: "RestoreGroupRequest" });
823
- export const RestoreGroupResponseDatabasesList = /*@__PURE__*/ S.Array(DeletedDatabase);
824
- export const RestoreGroupResponseFailuresMap = /*@__PURE__*/ S.Record(S.String, S.String);
825
- export const RestoreGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
826
- group: S.optional(Group),
827
- databases: S.optional(RestoreGroupResponseDatabasesList),
828
- failures: S.optional(RestoreGroupResponseFailuresMap),
829
- })).annotate({ identifier: "RestoreGroupResponse" });
830
- export const RevokeAPITokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
831
- tokenName: S.String.pipe(T.Label()),
832
- }).pipe(T.Http({ method: "DELETE", uri: "/v1/auth/api-tokens/{tokenName}", code: 200 }))).annotate({ identifier: "RevokeAPITokenRequest" });
833
- export const RevokeAPITokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
834
- token: S.optional(S.String),
835
- })).annotate({ identifier: "RevokeAPITokenResponse" });
836
- export const RevokeOrganizationAPITokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
837
- organizationSlug: S.String.pipe(T.Label()),
838
- tokenId: S.String.pipe(T.Label()),
839
- }).pipe(T.Http({
840
- method: "DELETE",
841
- uri: "/v1/organizations/{organizationSlug}/api-tokens/{tokenId}",
842
- code: 200,
843
- }))).annotate({
844
- identifier: "RevokeOrganizationAPITokenRequest",
845
- });
846
- export const RevokeOrganizationAPITokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
847
- token: S.optional(S.String),
848
- })).annotate({
849
- identifier: "RevokeOrganizationAPITokenResponse",
850
- });
851
- export const TransferGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
852
- organizationSlug: S.String.pipe(T.Label()),
853
- groupName: S.String.pipe(T.Label()),
854
- organization: S.optional(S.String),
855
- }).pipe(T.Http({
856
- method: "POST",
857
- uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/transfer",
858
- code: 200,
859
- }))).annotate({ identifier: "TransferGroupRequest" });
860
- export const TransferGroupResponseLocationsList = /*@__PURE__*/ S.Array(S.String);
861
- export const TransferGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
862
- name: S.optional(S.String),
863
- version: S.optional(S.String),
864
- uuid: S.optional(S.String),
865
- locations: S.optional(TransferGroupResponseLocationsList),
866
- primary: S.optional(S.String),
867
- delete_protection: S.optional(S.Boolean),
868
- })).annotate({ identifier: "TransferGroupResponse" });
869
- export const UnarchiveGroupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
870
- organizationSlug: S.String.pipe(T.Label()),
871
- groupName: S.String.pipe(T.Label()),
872
- }).pipe(T.Http({
873
- method: "POST",
874
- uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/unarchive",
875
- code: 200,
876
- }))).annotate({ identifier: "UnarchiveGroupRequest" });
877
- export const UnarchiveGroupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
878
- group: S.optional(Group),
879
- })).annotate({ identifier: "UnarchiveGroupResponse" });
880
- export const UpdateDatabaseConfigurationRequestAllowedIpsList = /*@__PURE__*/ S.Array(S.String);
881
- export const UpdateDatabaseConfigurationRequestAllowedAwsVpcIdsList = /*@__PURE__*/ S.Array(S.String);
882
- export const UpdateDatabaseConfigurationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
883
- organizationSlug: S.String.pipe(T.Label()),
884
- databaseName: S.String.pipe(T.Label()),
885
- size_limit: S.optional(S.String),
886
- allow_attach: S.optional(S.Boolean),
887
- block_reads: S.optional(S.Boolean),
888
- block_writes: S.optional(S.Boolean),
889
- delete_protection: S.optional(S.Boolean),
890
- allowed_ips: S.optional(UpdateDatabaseConfigurationRequestAllowedIpsList),
891
- allowed_aws_vpc_ids: S.optional(UpdateDatabaseConfigurationRequestAllowedAwsVpcIdsList),
892
- }).pipe(T.Http({
893
- method: "PATCH",
894
- uri: "/v1/organizations/{organizationSlug}/databases/{databaseName}/configuration",
895
- code: 200,
896
- }))).annotate({
897
- identifier: "UpdateDatabaseConfigurationRequest",
898
- });
899
- export const UpdateGroupConfigurationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
900
- organizationSlug: S.String.pipe(T.Label()),
901
- groupName: S.String.pipe(T.Label()),
902
- delete_protection: S.optional(S.Boolean),
903
- }).pipe(T.Http({
904
- method: "PATCH",
905
- uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/configuration",
906
- code: 200,
907
- }))).annotate({
908
- identifier: "UpdateGroupConfigurationRequest",
909
- });
910
- export const UpdateGroupDatabasesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
911
- organizationSlug: S.String.pipe(T.Label()),
912
- groupName: S.String.pipe(T.Label()),
913
- }).pipe(T.Http({
914
- method: "POST",
915
- uri: "/v1/organizations/{organizationSlug}/groups/{groupName}/update",
916
- code: 200,
917
- }))).annotate({
918
- identifier: "UpdateGroupDatabasesRequest",
919
- });
920
- export const UpdateGroupDatabasesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
921
- identifier: "UpdateGroupDatabasesResponse",
922
- });
923
- export const UpdateMemberRoleRequestRole = S.String;
924
- export const UpdateMemberRoleRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
925
- organizationSlug: S.String.pipe(T.Label()),
926
- username: S.String.pipe(T.Label()),
927
- role: UpdateMemberRoleRequestRole,
928
- }).pipe(T.Http({
929
- method: "PATCH",
930
- uri: "/v1/organizations/{organizationSlug}/members/{username}",
931
- code: 200,
932
- }))).annotate({ identifier: "UpdateMemberRoleRequest" });
933
- export const UpdateMemberRoleResponseMemberRole = S.String;
934
- export const UpdateMemberRoleResponseMember = /*@__PURE__*/ S.suspend(() => S.Struct({
935
- username: S.optional(S.String),
936
- email: S.optional(S.String),
937
- role: S.optional(UpdateMemberRoleResponseMemberRole),
938
- })).annotate({
939
- identifier: "UpdateMemberRoleResponseMember",
940
- });
941
- export const UpdateMemberRoleResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
942
- member: S.optional(UpdateMemberRoleResponseMember),
943
- })).annotate({ identifier: "UpdateMemberRoleResponse" });
944
- export const UpdateOrganizationRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
945
- organizationSlug: S.String.pipe(T.Label()),
946
- overages: S.optional(S.Boolean),
947
- require_mfa: S.optional(S.Boolean),
948
- restore_enabled: S.optional(S.Boolean),
949
- }).pipe(T.Http({ method: "PATCH", uri: "/v1/organizations/{organizationSlug}", code: 200 }))).annotate({
950
- identifier: "UpdateOrganizationRequest",
951
- });
952
- export const UpdateOrganizationResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
953
- organization: S.optional(Organization),
954
- })).annotate({
955
- identifier: "UpdateOrganizationResponse",
956
- });
957
- export const ValidateAPITokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/auth/validate", code: 200 }))).annotate({ identifier: "ValidateAPITokenRequest" });
958
- export const ValidateAPITokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
959
- exp: S.optional(S.Number),
960
- })).annotate({ identifier: "ValidateAPITokenResponse" });
961
- /** Add Location to Group Adds a location to the specified group. */
962
- export const addLocationToGroup = /*@__PURE__*/ API.make(() => ({
963
- input: AddLocationToGroupRequest,
964
- output: AddLocationToGroupResponse,
965
- errors: [BadRequest, NotFound],
966
- protocol: TursoProtocol,
967
- retry: Retry.Retry,
968
- }));
969
- /** Add Member Add an existing Turso user to an organization. */
970
- export const addOrganizationMember = /*@__PURE__*/ API.make(() => ({
971
- input: AddOrganizationMemberRequest,
972
- output: AddOrganizationMemberResponse,
973
- errors: [BadRequest, NotFound, Conflict],
974
- protocol: TursoProtocol,
975
- retry: Retry.Retry,
976
- }));
977
- /** 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. */
978
- export const createAPIToken = /*@__PURE__*/ API.make(() => ({
979
- input: CreateAPITokenRequest,
980
- output: CreateAPITokenResponse,
981
- errors: [BadRequest, NotFound, Conflict],
982
- protocol: TursoProtocol,
983
- retry: Retry.Retry,
984
- }));
985
- /** Create Database Creates a new database in a group for the organization or user. */
986
- export const createDatabase = /*@__PURE__*/ API.make(() => ({
987
- input: CreateDatabaseRequest,
988
- output: CreateDatabaseResponse,
989
- errors: [BadRequest, Conflict],
990
- protocol: TursoProtocol,
991
- retry: Retry.Retry,
992
- }));
993
- /** Generate Database Auth Token Generates an authorization token for the specified database. */
994
- export const createDatabaseToken = /*@__PURE__*/ API.make(() => ({
995
- input: CreateDatabaseTokenRequest,
996
- output: CreateDatabaseTokenResponse,
997
- errors: [BadRequest, NotFound],
998
- protocol: TursoProtocol,
999
- retry: Retry.Retry,
1000
- }));
1001
- /** Create Group Creates a new group for the organization or user. */
1002
- export const createGroup = /*@__PURE__*/ API.make(() => ({
1003
- input: CreateGroupRequest,
1004
- output: CreateGroupResponse,
1005
- errors: [BadRequest, Conflict],
1006
- protocol: TursoProtocol,
1007
- retry: Retry.Retry,
1008
- }));
1009
- /** Create Group Auth Token Generates an authorization token for the specified group. */
1010
- export const createGroupToken = /*@__PURE__*/ API.make(() => ({
1011
- input: CreateGroupTokenRequest,
1012
- output: CreateGroupTokenResponse,
1013
- errors: [BadRequest, NotFound],
1014
- protocol: TursoProtocol,
1015
- retry: Retry.Retry,
1016
- }));
1017
- /** Delete Database Delete a database belonging to the organization or user. */
1018
- export const deleteDatabase = /*@__PURE__*/ API.make(() => ({
1019
- input: DeleteDatabaseRequest,
1020
- output: DeleteDatabaseResponse,
1021
- errors: [NotFound],
1022
- protocol: TursoProtocol,
1023
- retry: Retry.Retry,
1024
- }));
1025
- /** Delete Group Delete a group belonging to the organization or user. */
1026
- export const deleteGroup = /*@__PURE__*/ API.make(() => ({
1027
- input: DeleteGroupRequest,
1028
- output: DeleteGroupResponse,
1029
- errors: [NotFound],
1030
- protocol: TursoProtocol,
1031
- retry: Retry.Retry,
1032
- }));
1033
- /** Delete Invite Delete a pending invite for the organization by email. */
1034
- export const deleteOrganizationInviteByEmailV2 = /*@__PURE__*/ API.make(() => ({
1035
- input: DeleteOrganizationInviteByEmailV2Request,
1036
- output: DeleteOrganizationInviteByEmailV2Response,
1037
- errors: [NotFound],
1038
- protocol: TursoProtocol,
1039
- retry: Retry.Retry,
1040
- }));
1041
- /** Get Current User Returns information about the currently authenticated user. */
1042
- export const getCurrentUser = /*@__PURE__*/ API.make(() => ({
1043
- input: GetCurrentUserRequest,
1044
- output: GetCurrentUserResponse,
1045
- errors: [],
1046
- protocol: TursoProtocol,
1047
- retry: Retry.Retry,
1048
- }));
1049
- /** Retrieve Database Returns a database belonging to the organization or user. */
1050
- export const getDatabase = /*@__PURE__*/ API.make(() => ({
1051
- input: GetDatabaseRequest,
1052
- output: GetDatabaseResponse,
1053
- errors: [NotFound],
1054
- protocol: TursoProtocol,
1055
- retry: Retry.Retry,
1056
- }));
1057
- /** Retrieve Database Configuration Retrieve an individual database configuration belonging to the organization or user. */
1058
- export const getDatabaseConfiguration = /*@__PURE__*/ API.make(() => ({
1059
- input: GetDatabaseConfigurationRequest,
1060
- output: DatabaseConfigurationResponse,
1061
- errors: [NotFound],
1062
- protocol: TursoProtocol,
1063
- retry: Retry.Retry,
1064
- }));
1065
- /** Retrieve Database Instance Return the individual database instance by name. */
1066
- export const getDatabaseInstance = /*@__PURE__*/ API.make(() => ({
1067
- input: GetDatabaseInstanceRequest,
1068
- output: GetDatabaseInstanceResponse,
1069
- errors: [NotFound],
1070
- protocol: TursoProtocol,
1071
- retry: Retry.Retry,
1072
- }));
1073
- /** Retrieve Database Stats Fetch the top queries of a database, including the count of rows read and written. */
1074
- export const getDatabaseStats = /*@__PURE__*/ API.make(() => ({
1075
- input: GetDatabaseStatsRequest,
1076
- output: GetDatabaseStatsResponse,
1077
- errors: [NotFound],
1078
- protocol: TursoProtocol,
1079
- retry: Retry.Retry,
1080
- }));
1081
- /** Retrieve Database Usage Fetch activity usage for a database in a given time period. */
1082
- export const getDatabaseUsage = /*@__PURE__*/ API.make(() => ({
1083
- input: GetDatabaseUsageRequest,
1084
- output: GetDatabaseUsageResponse,
1085
- errors: [BadRequest, NotFound],
1086
- protocol: TursoProtocol,
1087
- retry: Retry.Retry,
1088
- }));
1089
- /** Retrieve Group Returns a group belonging to the organization or user. */
1090
- export const getGroup = /*@__PURE__*/ API.make(() => ({
1091
- input: GetGroupRequest,
1092
- output: GetGroupResponse,
1093
- errors: [NotFound],
1094
- protocol: TursoProtocol,
1095
- retry: Retry.Retry,
1096
- }));
1097
- /** Retrieve Group Configuration Retrieve an individual group configuration belonging to the organization or user. */
1098
- export const getGroupConfiguration = /*@__PURE__*/ API.make(() => ({
1099
- input: GetGroupConfigurationRequest,
1100
- output: GroupConfigurationResponse,
1101
- errors: [NotFound],
1102
- protocol: TursoProtocol,
1103
- retry: Retry.Retry,
1104
- }));
1105
- /** Retrieve Organization Retrieve details of a specific organization. */
1106
- export const getOrganization = /*@__PURE__*/ API.make(() => ({
1107
- input: GetOrganizationRequest,
1108
- output: GetOrganizationResponse,
1109
- errors: [NotFound],
1110
- protocol: TursoProtocol,
1111
- retry: Retry.Retry,
1112
- }));
1113
- /** Retrieve Member Retrieve details of a specific member in the organization. */
1114
- export const getOrganizationMember = /*@__PURE__*/ API.make(() => ({
1115
- input: GetOrganizationMemberRequest,
1116
- output: GetOrganizationMemberResponse,
1117
- errors: [NotFound],
1118
- protocol: TursoProtocol,
1119
- retry: Retry.Retry,
1120
- }));
1121
- /** Current Subscription Returns the current subscription details for the organization. */
1122
- export const getOrganizationSubscription = /*@__PURE__*/ API.make(() => ({
1123
- input: GetOrganizationSubscriptionRequest,
1124
- output: GetOrganizationSubscriptionResponse,
1125
- errors: [],
1126
- protocol: TursoProtocol,
1127
- retry: Retry.Retry,
1128
- }));
1129
- /** Organization Usage Fetch current billing cycle usage for an organization. */
1130
- export const getOrganizationUsage = /*@__PURE__*/ API.make(() => ({
1131
- input: GetOrganizationUsageRequest,
1132
- output: GetOrganizationUsageResponse,
1133
- errors: [],
1134
- protocol: TursoProtocol,
1135
- retry: Retry.Retry,
1136
- }));
1137
- /** Invalidate All Database Auth Tokens Invalidates all authorization tokens for the specified database. */
1138
- export const invalidateDatabaseTokens = /*@__PURE__*/ API.make(() => ({
1139
- input: InvalidateDatabaseTokensRequest,
1140
- output: InvalidateDatabaseTokensResponse,
1141
- errors: [NotFound],
1142
- protocol: TursoProtocol,
1143
- retry: Retry.Retry,
1144
- }));
1145
- /** Invalidate All Group Auth Tokens Invalidates all authorization tokens for the specified group. */
1146
- export const invalidateGroupTokens = /*@__PURE__*/ API.make(() => ({
1147
- input: InvalidateGroupTokensRequest,
1148
- output: InvalidateGroupTokensResponse,
1149
- errors: [NotFound],
1150
- protocol: TursoProtocol,
1151
- retry: Retry.Retry,
1152
- }));
1153
- /** Invite Organization Member Invite a user to an organization. If the user isn't already registered with Turso, they will receive a signup link. If an existing pending invite exists for the same email, it will be replaced. */
1154
- export const inviteOrganizationMemberV2 = /*@__PURE__*/ API.make(() => ({
1155
- input: InviteOrganizationMemberV2Request,
1156
- output: InviteOrganizationMemberV2Response,
1157
- errors: [BadRequest],
1158
- protocol: TursoProtocol,
1159
- retry: Retry.Retry,
1160
- }));
1161
- /** List API Tokens Returns a list of API tokens belonging to a user. */
1162
- export const listAPITokens = /*@__PURE__*/ API.make(() => ({
1163
- input: ListAPITokensRequest,
1164
- output: ListAPITokensResponse,
1165
- errors: [],
1166
- protocol: TursoProtocol,
1167
- retry: Retry.Retry,
1168
- }));
1169
- /** 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. */
1170
- export const listDatabaseInstances = /*@__PURE__*/ API.make(() => ({
1171
- input: ListDatabaseInstancesRequest,
1172
- output: ListDatabaseInstancesResponse,
1173
- errors: [NotFound],
1174
- protocol: TursoProtocol,
1175
- retry: Retry.Retry,
1176
- }));
1177
- /** List Databases Returns a list of databases belonging to the organization or user. */
1178
- export const listDatabases = /*@__PURE__*/ API.make(() => ({
1179
- input: ListDatabasesRequest,
1180
- output: ListDatabasesResponse,
1181
- errors: [],
1182
- protocol: TursoProtocol,
1183
- retry: Retry.Retry,
1184
- }));
1185
- /** List Deleted Databases Returns databases deleted within the last five days, which can still be restored. Requires a paid plan. Available even while recovery is disabled for the organization. */
1186
- export const listDeletedDatabases = /*@__PURE__*/ API.make(() => ({
1187
- input: ListDeletedDatabasesRequest,
1188
- output: ListDeletedDatabasesResponse,
1189
- errors: [Forbidden],
1190
- protocol: TursoProtocol,
1191
- retry: Retry.Retry,
1192
- }));
1193
- /** List Deleted Groups Returns groups deleted within the last five days, including empty groups, which can still be restored. Requires a paid plan and an organization-level token. Available even while recovery is disabled for the organization. */
1194
- export const listDeletedGroups = /*@__PURE__*/ API.make(() => ({
1195
- input: ListDeletedGroupsRequest,
1196
- output: ListDeletedGroupsResponse,
1197
- errors: [Forbidden],
1198
- protocol: TursoProtocol,
1199
- retry: Retry.Retry,
1200
- }));
1201
- /** List Groups Returns a list of groups belonging to the organization or user. */
1202
- export const listGroups = /*@__PURE__*/ API.make(() => ({
1203
- input: ListGroupsRequest,
1204
- output: ListGroupsResponse,
1205
- errors: [],
1206
- protocol: TursoProtocol,
1207
- retry: Retry.Retry,
1208
- }));
1209
- /** List Locations Returns a list of locations where you can create or replicate databases. */
1210
- export const listLocations = /*@__PURE__*/ API.make(() => ({
1211
- input: ListLocationsRequest,
1212
- output: ListLocationsResponse,
1213
- errors: [],
1214
- protocol: TursoProtocol,
1215
- retry: Retry.Retry,
1216
- }));
1217
- /** 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. */
1218
- export const listOrganizationAPITokens = /*@__PURE__*/ API.make(() => ({
1219
- input: ListOrganizationAPITokensRequest,
1220
- output: ListOrganizationAPITokensResponse,
1221
- errors: [],
1222
- protocol: TursoProtocol,
1223
- retry: Retry.Retry,
1224
- }));
1225
- /** List Audit Logs Return the audit logs for the given organization, ordered by the `created_at` field in descending order. */
1226
- export const listOrganizationAuditLogs = /*@__PURE__*/ API.make(() => ({
1227
- input: ListOrganizationAuditLogsRequest,
1228
- output: ListOrganizationAuditLogsResponse,
1229
- errors: [],
1230
- protocol: TursoProtocol,
1231
- retry: Retry.Retry,
1232
- }));
1233
- /** List Invites Returns a list of pending invites for the organization. */
1234
- export const listOrganizationInvitesV2 = /*@__PURE__*/ API.make(() => ({
1235
- input: ListOrganizationInvitesV2Request,
1236
- output: ListOrganizationInvitesV2Response,
1237
- errors: [],
1238
- protocol: TursoProtocol,
1239
- retry: Retry.Retry,
1240
- }));
1241
- /** List Invoices Returns a list of invoices for the organization. */
1242
- export const listOrganizationInvoices = /*@__PURE__*/ API.make(() => ({
1243
- input: ListOrganizationInvoicesRequest,
1244
- output: ListOrganizationInvoicesResponse,
1245
- errors: [],
1246
- protocol: TursoProtocol,
1247
- retry: Retry.Retry,
1248
- }));
1249
- /** List Members Returns a list of members part of the organization. */
1250
- export const listOrganizationMembers = /*@__PURE__*/ API.make(() => ({
1251
- input: ListOrganizationMembersRequest,
1252
- output: ListOrganizationMembersResponse,
1253
- errors: [],
1254
- protocol: TursoProtocol,
1255
- retry: Retry.Retry,
1256
- }));
1257
- /** List Plans Returns a list of available plans and their quotas. */
1258
- export const listOrganizationPlans = /*@__PURE__*/ API.make(() => ({
1259
- input: ListOrganizationPlansRequest,
1260
- output: ListOrganizationPlansResponse,
1261
- errors: [],
1262
- protocol: TursoProtocol,
1263
- retry: Retry.Retry,
1264
- }));
1265
- /** List Organizations Returns a list of organizations the authenticated user owns or is a member of. */
1266
- export const listOrganizations = /*@__PURE__*/ API.make(() => ({
1267
- input: ListOrganizationsRequest,
1268
- output: ListOrganizationsResponse,
1269
- errors: [],
1270
- protocol: TursoProtocol,
1271
- retry: Retry.Retry,
1272
- }));
1273
- /** Remove Location from Group Removes a location from the specified group. */
1274
- export const removeLocationFromGroup = /*@__PURE__*/ API.make(() => ({
1275
- input: RemoveLocationFromGroupRequest,
1276
- output: RemoveLocationFromGroupResponse,
1277
- errors: [BadRequest, NotFound],
1278
- protocol: TursoProtocol,
1279
- retry: Retry.Retry,
1280
- }));
1281
- /** Remove Member Remove a user from the organization by username. */
1282
- export const removeOrganizationMember = /*@__PURE__*/ API.make(() => ({
1283
- input: RemoveOrganizationMemberRequest,
1284
- output: RemoveOrganizationMemberResponse,
1285
- errors: [NotFound],
1286
- protocol: TursoProtocol,
1287
- retry: Retry.Retry,
1288
- }));
1289
- /** Restore Database Restore a database deleted within the last five days, exactly as it was at the moment it was deleted. Requires a paid plan, an admin or owner of the organization, and recovery enabled for the organization. */
1290
- export const restoreDatabase = /*@__PURE__*/ API.make(() => ({
1291
- input: RestoreDatabaseRequest,
1292
- output: RestoreDatabaseResponse,
1293
- errors: [BadRequest, Forbidden, NotFound],
1294
- protocol: TursoProtocol,
1295
- retry: Retry.Retry,
1296
- }));
1297
- /** Restore Group Restore a group deleted within the last five days, along with the member databases that were deleted with it. Requires a paid plan, an admin or owner of the organization, and recovery enabled for the organization. If some databases fail to restore, the group still becomes active: retry the failed database UUIDs individually with Restore Database. */
1298
- export const restoreGroup = /*@__PURE__*/ API.make(() => ({
1299
- input: RestoreGroupRequest,
1300
- output: RestoreGroupResponse,
1301
- errors: [BadRequest, Forbidden, NotFound],
1302
- protocol: TursoProtocol,
1303
- retry: Retry.Retry,
1304
- }));
1305
- /** Revoke API Token Revokes the provided API token belonging to a user. */
1306
- export const revokeAPIToken = /*@__PURE__*/ API.make(() => ({
1307
- input: RevokeAPITokenRequest,
1308
- output: RevokeAPITokenResponse,
1309
- errors: [NotFound],
1310
- protocol: TursoProtocol,
1311
- retry: Retry.Retry,
1312
- }));
1313
- /** 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). */
1314
- export const revokeOrganizationAPIToken = /*@__PURE__*/ API.make(() => ({
1315
- input: RevokeOrganizationAPITokenRequest,
1316
- output: RevokeOrganizationAPITokenResponse,
1317
- errors: [NotFound],
1318
- protocol: TursoProtocol,
1319
- retry: Retry.Retry,
1320
- }));
1321
- /** Transfer Group Transfer a group to another organization that you own or a member of. */
1322
- export const transferGroup = /*@__PURE__*/ API.make(() => ({
1323
- input: TransferGroupRequest,
1324
- output: TransferGroupResponse,
1325
- errors: [NotFound],
1326
- protocol: TursoProtocol,
1327
- retry: Retry.Retry,
1328
- }));
1329
- /** Unarchive Group Unarchive a group that has been archived due to inactivity. */
1330
- export const unarchiveGroup = /*@__PURE__*/ API.make(() => ({
1331
- input: UnarchiveGroupRequest,
1332
- output: UnarchiveGroupResponse,
1333
- errors: [NotFound],
1334
- protocol: TursoProtocol,
1335
- retry: Retry.Retry,
1336
- }));
1337
- /** Update Database Configuration Update a database configuration belonging to the organization or user. */
1338
- export const updateDatabaseConfiguration = /*@__PURE__*/ API.make(() => ({
1339
- input: UpdateDatabaseConfigurationRequest,
1340
- output: DatabaseConfigurationResponse,
1341
- errors: [NotFound],
1342
- protocol: TursoProtocol,
1343
- retry: Retry.Retry,
1344
- }));
1345
- /** Update Group Configuration Update a group configuration belonging to the organization or user. */
1346
- export const updateGroupConfiguration = /*@__PURE__*/ API.make(() => ({
1347
- input: UpdateGroupConfigurationRequest,
1348
- output: GroupConfigurationResponse,
1349
- errors: [NotFound],
1350
- protocol: TursoProtocol,
1351
- retry: Retry.Retry,
1352
- }));
1353
- /** Update Databases in a Group Updates all databases in the group to the latest libSQL version. */
1354
- export const updateGroupDatabases = /*@__PURE__*/ API.make(() => ({
1355
- input: UpdateGroupDatabasesRequest,
1356
- output: UpdateGroupDatabasesResponse,
1357
- errors: [NotFound],
1358
- protocol: TursoProtocol,
1359
- retry: Retry.Retry,
1360
- }));
1361
- /** Update Member Role Update the role of an organization member. Only organization admins or owners can perform this action. */
1362
- export const updateMemberRole = /*@__PURE__*/ API.make(() => ({
1363
- input: UpdateMemberRoleRequest,
1364
- output: UpdateMemberRoleResponse,
1365
- errors: [BadRequest, Forbidden, NotFound],
1366
- protocol: TursoProtocol,
1367
- retry: Retry.Retry,
1368
- }));
1369
- /** Update Organization Update an organization you own or are a member of. */
1370
- export const updateOrganization = /*@__PURE__*/ API.make(() => ({
1371
- input: UpdateOrganizationRequest,
1372
- output: UpdateOrganizationResponse,
1373
- errors: [],
1374
- protocol: TursoProtocol,
1375
- retry: Retry.Retry,
1376
- }));
1377
- /** Validate API Token Validates an API token belonging to a user. */
1378
- export const validateAPIToken = /*@__PURE__*/ API.make(() => ({
1379
- input: ValidateAPITokenRequest,
1380
- output: ValidateAPITokenResponse,
1381
- errors: [],
1382
- protocol: TursoProtocol,
1383
- retry: Retry.Retry,
1384
- }));
1385
- //# sourceMappingURL=turso.js.map