@distilled.cloud/turso 0.30.2 → 1.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +8 -0
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts +24 -3
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +13 -4
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +8 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -6
- package/lib/index.js.map +1 -1
- package/lib/protocol.d.ts +18 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +46 -0
- package/lib/protocol.js.map +1 -0
- package/lib/retry.d.ts +4 -4
- package/lib/retry.js +4 -4
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +3 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/turso.d.ts +1280 -0
- package/lib/services/turso.d.ts.map +1 -0
- package/lib/services/turso.js +1463 -0
- package/lib/services/turso.js.map +1 -0
- package/lib/traits.d.ts +10 -2
- package/lib/traits.d.ts.map +1 -1
- package/lib/traits.js +10 -2
- package/lib/traits.js.map +1 -1
- package/package.json +31 -37
- package/src/credentials.ts +8 -0
- package/src/errors.ts +42 -5
- package/src/index.ts +12 -6
- package/src/protocol.ts +68 -0
- package/src/retry.ts +4 -4
- package/src/services/index.ts +2 -0
- package/src/services/turso.ts +3426 -0
- package/src/traits.ts +44 -2
- package/README.md +0 -36
- package/lib/category.d.ts +0 -5
- package/lib/category.d.ts.map +0 -1
- package/lib/category.js +0 -5
- package/lib/category.js.map +0 -1
- package/lib/client.d.ts +0 -11
- package/lib/client.d.ts.map +0 -1
- package/lib/client.js +0 -59
- package/lib/client.js.map +0 -1
- package/lib/operations/addLocationToGroup.d.ts +0 -30
- package/lib/operations/addLocationToGroup.d.ts.map +0 -1
- package/lib/operations/addLocationToGroup.js +0 -40
- package/lib/operations/addLocationToGroup.js.map +0 -1
- package/lib/operations/addOrganizationMember.d.ts +0 -22
- package/lib/operations/addOrganizationMember.d.ts.map +0 -1
- package/lib/operations/addOrganizationMember.js +0 -32
- package/lib/operations/addOrganizationMember.js.map +0 -1
- package/lib/operations/createAPIToken.d.ts +0 -28
- package/lib/operations/createAPIToken.d.ts.map +0 -1
- package/lib/operations/createAPIToken.js +0 -44
- package/lib/operations/createAPIToken.js.map +0 -1
- package/lib/operations/createDatabase.d.ts +0 -35
- package/lib/operations/createDatabase.d.ts.map +0 -1
- package/lib/operations/createDatabase.js +0 -53
- package/lib/operations/createDatabase.js.map +0 -1
- package/lib/operations/createDatabaseToken.d.ts +0 -30
- package/lib/operations/createDatabaseToken.d.ts.map +0 -1
- package/lib/operations/createDatabaseToken.js +0 -40
- package/lib/operations/createDatabaseToken.js.map +0 -1
- package/lib/operations/createGroup.d.ts +0 -29
- package/lib/operations/createGroup.d.ts.map +0 -1
- package/lib/operations/createGroup.js +0 -51
- package/lib/operations/createGroup.js.map +0 -1
- package/lib/operations/createGroupToken.d.ts +0 -30
- package/lib/operations/createGroupToken.d.ts.map +0 -1
- package/lib/operations/createGroupToken.js +0 -38
- package/lib/operations/createGroupToken.js.map +0 -1
- package/lib/operations/deleteDatabase.d.ts +0 -21
- package/lib/operations/deleteDatabase.d.ts.map +0 -1
- package/lib/operations/deleteDatabase.js +0 -29
- package/lib/operations/deleteDatabase.js.map +0 -1
- package/lib/operations/deleteGroup.d.ts +0 -28
- package/lib/operations/deleteGroup.d.ts.map +0 -1
- package/lib/operations/deleteGroup.js +0 -36
- package/lib/operations/deleteGroup.js.map +0 -1
- package/lib/operations/deleteOrganizationInviteByEmail.d.ts +0 -21
- package/lib/operations/deleteOrganizationInviteByEmail.d.ts.map +0 -1
- package/lib/operations/deleteOrganizationInviteByEmail.js +0 -30
- package/lib/operations/deleteOrganizationInviteByEmail.js.map +0 -1
- package/lib/operations/deleteOrganizationInviteByEmailV2.d.ts +0 -18
- package/lib/operations/deleteOrganizationInviteByEmailV2.d.ts.map +0 -1
- package/lib/operations/deleteOrganizationInviteByEmailV2.js +0 -29
- package/lib/operations/deleteOrganizationInviteByEmailV2.js.map +0 -1
- package/lib/operations/getCurrentUser.d.ts +0 -23
- package/lib/operations/getCurrentUser.d.ts.map +0 -1
- package/lib/operations/getCurrentUser.js +0 -26
- package/lib/operations/getCurrentUser.js.map +0 -1
- package/lib/operations/getDatabase.d.ts +0 -36
- package/lib/operations/getDatabase.d.ts.map +0 -1
- package/lib/operations/getDatabase.js +0 -44
- package/lib/operations/getDatabase.js.map +0 -1
- package/lib/operations/getDatabaseConfiguration.d.ts +0 -27
- package/lib/operations/getDatabaseConfiguration.d.ts.map +0 -1
- package/lib/operations/getDatabaseConfiguration.js +0 -37
- package/lib/operations/getDatabaseConfiguration.js.map +0 -1
- package/lib/operations/getDatabaseInstance.d.ts +0 -29
- package/lib/operations/getDatabaseInstance.d.ts.map +0 -1
- package/lib/operations/getDatabaseInstance.js +0 -39
- package/lib/operations/getDatabaseInstance.js.map +0 -1
- package/lib/operations/getDatabaseStats.d.ts +0 -25
- package/lib/operations/getDatabaseStats.d.ts.map +0 -1
- package/lib/operations/getDatabaseStats.js +0 -33
- package/lib/operations/getDatabaseStats.js.map +0 -1
- package/lib/operations/getDatabaseUsage.d.ts +0 -42
- package/lib/operations/getDatabaseUsage.d.ts.map +0 -1
- package/lib/operations/getDatabaseUsage.js +0 -50
- package/lib/operations/getDatabaseUsage.js.map +0 -1
- package/lib/operations/getGroup.d.ts +0 -28
- package/lib/operations/getGroup.d.ts.map +0 -1
- package/lib/operations/getGroup.js +0 -36
- package/lib/operations/getGroup.js.map +0 -1
- package/lib/operations/getGroupConfiguration.d.ts +0 -21
- package/lib/operations/getGroupConfiguration.d.ts.map +0 -1
- package/lib/operations/getGroupConfiguration.js +0 -31
- package/lib/operations/getGroupConfiguration.js.map +0 -1
- package/lib/operations/getOrganization.d.ts +0 -30
- package/lib/operations/getOrganization.d.ts.map +0 -1
- package/lib/operations/getOrganization.js +0 -35
- package/lib/operations/getOrganization.js.map +0 -1
- package/lib/operations/getOrganizationMember.d.ts +0 -25
- package/lib/operations/getOrganizationMember.d.ts.map +0 -1
- package/lib/operations/getOrganizationMember.js +0 -35
- package/lib/operations/getOrganizationMember.js.map +0 -1
- package/lib/operations/getOrganizationSubscription.d.ts +0 -23
- package/lib/operations/getOrganizationSubscription.d.ts.map +0 -1
- package/lib/operations/getOrganizationSubscription.js +0 -32
- package/lib/operations/getOrganizationSubscription.js.map +0 -1
- package/lib/operations/getOrganizationUsage.d.ts +0 -47
- package/lib/operations/getOrganizationUsage.d.ts.map +0 -1
- package/lib/operations/getOrganizationUsage.js +0 -56
- package/lib/operations/getOrganizationUsage.js.map +0 -1
- package/lib/operations/index.d.ts +0 -50
- package/lib/operations/index.d.ts.map +0 -1
- package/lib/operations/index.js +0 -50
- package/lib/operations/index.js.map +0 -1
- package/lib/operations/invalidateDatabaseTokens.d.ts +0 -19
- package/lib/operations/invalidateDatabaseTokens.d.ts.map +0 -1
- package/lib/operations/invalidateDatabaseTokens.js +0 -29
- package/lib/operations/invalidateDatabaseTokens.js.map +0 -1
- package/lib/operations/invalidateGroupTokens.d.ts +0 -19
- package/lib/operations/invalidateGroupTokens.d.ts.map +0 -1
- package/lib/operations/invalidateGroupTokens.js +0 -29
- package/lib/operations/invalidateGroupTokens.js.map +0 -1
- package/lib/operations/inviteOrganizationMember.d.ts +0 -69
- package/lib/operations/inviteOrganizationMember.d.ts.map +0 -1
- package/lib/operations/inviteOrganizationMember.js +0 -54
- package/lib/operations/inviteOrganizationMember.js.map +0 -1
- package/lib/operations/inviteOrganizationMemberV2.d.ts +0 -25
- package/lib/operations/inviteOrganizationMemberV2.d.ts.map +0 -1
- package/lib/operations/inviteOrganizationMemberV2.js +0 -34
- package/lib/operations/inviteOrganizationMemberV2.js.map +0 -1
- package/lib/operations/listAPITokens.d.ts +0 -22
- package/lib/operations/listAPITokens.d.ts.map +0 -1
- package/lib/operations/listAPITokens.js +0 -25
- package/lib/operations/listAPITokens.js.map +0 -1
- package/lib/operations/listDatabaseInstances.d.ts +0 -27
- package/lib/operations/listDatabaseInstances.d.ts.map +0 -1
- package/lib/operations/listDatabaseInstances.js +0 -37
- package/lib/operations/listDatabaseInstances.js.map +0 -1
- package/lib/operations/listDatabases.d.ts +0 -39
- package/lib/operations/listDatabases.d.ts.map +0 -1
- package/lib/operations/listDatabases.js +0 -46
- package/lib/operations/listDatabases.js.map +0 -1
- package/lib/operations/listGroups.d.ts +0 -25
- package/lib/operations/listGroups.d.ts.map +0 -1
- package/lib/operations/listGroups.js +0 -32
- package/lib/operations/listGroups.js.map +0 -1
- package/lib/operations/listLocations.d.ts +0 -15
- package/lib/operations/listLocations.d.ts.map +0 -1
- package/lib/operations/listLocations.js +0 -18
- package/lib/operations/listLocations.js.map +0 -1
- package/lib/operations/listOrganizationAPITokens.d.ts +0 -33
- package/lib/operations/listOrganizationAPITokens.d.ts.map +0 -1
- package/lib/operations/listOrganizationAPITokens.js +0 -42
- package/lib/operations/listOrganizationAPITokens.js.map +0 -1
- package/lib/operations/listOrganizationAuditLogs.d.ts +0 -35
- package/lib/operations/listOrganizationAuditLogs.d.ts.map +0 -1
- package/lib/operations/listOrganizationAuditLogs.js +0 -69
- package/lib/operations/listOrganizationAuditLogs.js.map +0 -1
- package/lib/operations/listOrganizationInvites.d.ts +0 -64
- package/lib/operations/listOrganizationInvites.d.ts.map +0 -1
- package/lib/operations/listOrganizationInvites.js +0 -50
- package/lib/operations/listOrganizationInvites.js.map +0 -1
- package/lib/operations/listOrganizationInvitesV2.d.ts +0 -23
- package/lib/operations/listOrganizationInvitesV2.d.ts.map +0 -1
- package/lib/operations/listOrganizationInvitesV2.js +0 -32
- package/lib/operations/listOrganizationInvitesV2.js.map +0 -1
- package/lib/operations/listOrganizationInvoices.d.ts +0 -27
- package/lib/operations/listOrganizationInvoices.d.ts.map +0 -1
- package/lib/operations/listOrganizationInvoices.js +0 -36
- package/lib/operations/listOrganizationInvoices.js.map +0 -1
- package/lib/operations/listOrganizationMembers.d.ts +0 -22
- package/lib/operations/listOrganizationMembers.d.ts.map +0 -1
- package/lib/operations/listOrganizationMembers.js +0 -31
- package/lib/operations/listOrganizationMembers.js.map +0 -1
- package/lib/operations/listOrganizationPlans.d.ts +0 -34
- package/lib/operations/listOrganizationPlans.d.ts.map +0 -1
- package/lib/operations/listOrganizationPlans.js +0 -43
- package/lib/operations/listOrganizationPlans.js.map +0 -1
- package/lib/operations/listOrganizations.d.ts +0 -24
- package/lib/operations/listOrganizations.d.ts.map +0 -1
- package/lib/operations/listOrganizations.js +0 -27
- package/lib/operations/listOrganizations.js.map +0 -1
- package/lib/operations/removeLocationFromGroup.d.ts +0 -30
- package/lib/operations/removeLocationFromGroup.d.ts.map +0 -1
- package/lib/operations/removeLocationFromGroup.js +0 -40
- package/lib/operations/removeLocationFromGroup.js.map +0 -1
- package/lib/operations/removeOrganizationMember.d.ts +0 -21
- package/lib/operations/removeOrganizationMember.d.ts.map +0 -1
- package/lib/operations/removeOrganizationMember.js +0 -31
- package/lib/operations/removeOrganizationMember.js.map +0 -1
- package/lib/operations/revokeAPIToken.d.ts +0 -19
- package/lib/operations/revokeAPIToken.d.ts.map +0 -1
- package/lib/operations/revokeAPIToken.js +0 -24
- package/lib/operations/revokeAPIToken.js.map +0 -1
- package/lib/operations/revokeOrganizationAPIToken.d.ts +0 -25
- package/lib/operations/revokeOrganizationAPIToken.d.ts.map +0 -1
- package/lib/operations/revokeOrganizationAPIToken.js +0 -34
- package/lib/operations/revokeOrganizationAPIToken.js.map +0 -1
- package/lib/operations/transferGroup.d.ts +0 -27
- package/lib/operations/transferGroup.d.ts.map +0 -1
- package/lib/operations/transferGroup.js +0 -35
- package/lib/operations/transferGroup.js.map +0 -1
- package/lib/operations/unarchiveGroup.d.ts +0 -28
- package/lib/operations/unarchiveGroup.d.ts.map +0 -1
- package/lib/operations/unarchiveGroup.js +0 -36
- package/lib/operations/unarchiveGroup.js.map +0 -1
- package/lib/operations/updateDatabaseConfiguration.d.ts +0 -34
- package/lib/operations/updateDatabaseConfiguration.d.ts.map +0 -1
- package/lib/operations/updateDatabaseConfiguration.js +0 -44
- package/lib/operations/updateDatabaseConfiguration.js.map +0 -1
- package/lib/operations/updateGroupConfiguration.d.ts +0 -22
- package/lib/operations/updateGroupConfiguration.d.ts.map +0 -1
- package/lib/operations/updateGroupConfiguration.js +0 -32
- package/lib/operations/updateGroupConfiguration.js.map +0 -1
- package/lib/operations/updateGroupDatabases.d.ts +0 -19
- package/lib/operations/updateGroupDatabases.d.ts.map +0 -1
- package/lib/operations/updateGroupDatabases.js +0 -29
- package/lib/operations/updateGroupDatabases.js.map +0 -1
- package/lib/operations/updateMemberRole.d.ts +0 -26
- package/lib/operations/updateMemberRole.d.ts.map +0 -1
- package/lib/operations/updateMemberRole.js +0 -34
- package/lib/operations/updateMemberRole.js.map +0 -1
- package/lib/operations/updateOrganization.d.ts +0 -31
- package/lib/operations/updateOrganization.d.ts.map +0 -1
- package/lib/operations/updateOrganization.js +0 -37
- package/lib/operations/updateOrganization.js.map +0 -1
- package/lib/operations/validateAPIToken.d.ts +0 -15
- package/lib/operations/validateAPIToken.d.ts.map +0 -1
- package/lib/operations/validateAPIToken.js +0 -18
- package/lib/operations/validateAPIToken.js.map +0 -1
- package/lib/sensitive.d.ts +0 -5
- package/lib/sensitive.d.ts.map +0 -1
- package/lib/sensitive.js +0 -5
- package/lib/sensitive.js.map +0 -1
- package/src/category.ts +0 -4
- package/src/client.ts +0 -74
- package/src/operations/addLocationToGroup.ts +0 -63
- package/src/operations/addOrganizationMember.ts +0 -49
- package/src/operations/createAPIToken.ts +0 -77
- package/src/operations/createDatabase.ts +0 -94
- package/src/operations/createDatabaseToken.ts +0 -62
- package/src/operations/createGroup.ts +0 -92
- package/src/operations/createGroupToken.ts +0 -58
- package/src/operations/deleteDatabase.ts +0 -42
- package/src/operations/deleteGroup.ts +0 -58
- package/src/operations/deleteOrganizationInviteByEmail.ts +0 -38
- package/src/operations/deleteOrganizationInviteByEmailV2.ts +0 -40
- package/src/operations/getCurrentUser.ts +0 -46
- package/src/operations/getDatabase.ts +0 -74
- package/src/operations/getDatabaseConfiguration.ts +0 -56
- package/src/operations/getDatabaseInstance.ts +0 -61
- package/src/operations/getDatabaseStats.ts +0 -54
- package/src/operations/getDatabaseUsage.ts +0 -92
- package/src/operations/getGroup.ts +0 -58
- package/src/operations/getGroupConfiguration.ts +0 -44
- package/src/operations/getOrganization.ts +0 -60
- package/src/operations/getOrganizationMember.ts +0 -56
- package/src/operations/getOrganizationSubscription.ts +0 -51
- package/src/operations/getOrganizationUsage.ts +0 -113
- package/src/operations/index.ts +0 -49
- package/src/operations/invalidateDatabaseTokens.ts +0 -40
- package/src/operations/invalidateGroupTokens.ts +0 -40
- package/src/operations/inviteOrganizationMember.ts +0 -66
- package/src/operations/inviteOrganizationMemberV2.ts +0 -55
- package/src/operations/listAPITokens.ts +0 -46
- package/src/operations/listDatabaseInstances.ts +0 -60
- package/src/operations/listDatabases.ts +0 -80
- package/src/operations/listGroups.ts +0 -55
- package/src/operations/listLocations.ts +0 -28
- package/src/operations/listOrganizationAPITokens.ts +0 -68
- package/src/operations/listOrganizationAuditLogs.ts +0 -128
- package/src/operations/listOrganizationInvites.ts +0 -64
- package/src/operations/listOrganizationInvitesV2.ts +0 -53
- package/src/operations/listOrganizationInvoices.ts +0 -60
- package/src/operations/listOrganizationMembers.ts +0 -53
- package/src/operations/listOrganizationPlans.ts +0 -78
- package/src/operations/listOrganizations.ts +0 -48
- package/src/operations/removeLocationFromGroup.ts +0 -63
- package/src/operations/removeOrganizationMember.ts +0 -44
- package/src/operations/revokeAPIToken.ts +0 -36
- package/src/operations/revokeOrganizationAPIToken.ts +0 -47
- package/src/operations/transferGroup.ts +0 -54
- package/src/operations/unarchiveGroup.ts +0 -58
- package/src/operations/updateDatabaseConfiguration.ts +0 -70
- package/src/operations/updateGroupConfiguration.ts +0 -46
- package/src/operations/updateGroupDatabases.ts +0 -40
- package/src/operations/updateMemberRole.ts +0 -54
- package/src/operations/updateOrganization.ts +0 -64
- package/src/operations/validateAPIToken.ts +0 -28
- package/src/sensitive.ts +0 -4
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
|
|
5
|
-
// Input Schema
|
|
6
|
-
export interface ListOrganizationAPITokensInput {
|
|
7
|
-
organizationSlug: string;
|
|
8
|
-
}
|
|
9
|
-
export const ListOrganizationAPITokensInput =
|
|
10
|
-
/*@__PURE__*/ Schema.Struct({
|
|
11
|
-
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
12
|
-
}).pipe(
|
|
13
|
-
T.Http({
|
|
14
|
-
method: "GET",
|
|
15
|
-
path: "/v1/organizations/{organizationSlug}/api-tokens",
|
|
16
|
-
}),
|
|
17
|
-
) as unknown as Schema.Codec<ListOrganizationAPITokensInput>;
|
|
18
|
-
|
|
19
|
-
// Output Schema
|
|
20
|
-
export interface ListOrganizationAPITokensOutput {
|
|
21
|
-
tokens?: {
|
|
22
|
-
name?: string;
|
|
23
|
-
id?: string;
|
|
24
|
-
organization?: string;
|
|
25
|
-
group?: string;
|
|
26
|
-
scopes?: string[];
|
|
27
|
-
owner?: { username?: string; email?: string };
|
|
28
|
-
created_at?: string;
|
|
29
|
-
}[];
|
|
30
|
-
}
|
|
31
|
-
export const ListOrganizationAPITokensOutput =
|
|
32
|
-
/*@__PURE__*/ Schema.Struct({
|
|
33
|
-
tokens: Schema.optional(
|
|
34
|
-
Schema.Array(
|
|
35
|
-
Schema.Struct({
|
|
36
|
-
name: Schema.optional(Schema.String),
|
|
37
|
-
id: Schema.optional(Schema.String),
|
|
38
|
-
organization: Schema.optional(Schema.String),
|
|
39
|
-
group: Schema.optional(Schema.String),
|
|
40
|
-
scopes: Schema.optional(Schema.Array(Schema.String)),
|
|
41
|
-
owner: Schema.optional(
|
|
42
|
-
Schema.Struct({
|
|
43
|
-
username: Schema.optional(Schema.String),
|
|
44
|
-
email: Schema.optional(Schema.String),
|
|
45
|
-
}),
|
|
46
|
-
),
|
|
47
|
-
created_at: Schema.optional(Schema.String),
|
|
48
|
-
}),
|
|
49
|
-
),
|
|
50
|
-
),
|
|
51
|
-
}) as unknown as Schema.Codec<ListOrganizationAPITokensOutput>;
|
|
52
|
-
|
|
53
|
-
// The operation
|
|
54
|
-
/**
|
|
55
|
-
* List Organization API Tokens
|
|
56
|
-
*
|
|
57
|
-
* 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).
|
|
58
|
-
* Authorization is symmetric with the revoke endpoint:
|
|
59
|
-
* - **Admins and owners** see every token scoped to the organization, with the minting user attached in the `owner` field.
|
|
60
|
-
* - **Members and viewers** see only tokens they minted themselves.
|
|
61
|
-
* This mirrors the personal-access-token model used in GitHub organization settings: admins get the full attribution list; everyone else sees their own access.
|
|
62
|
-
*
|
|
63
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
64
|
-
*/
|
|
65
|
-
export const listOrganizationAPITokens = /*@__PURE__*/ API.make(() => ({
|
|
66
|
-
inputSchema: ListOrganizationAPITokensInput,
|
|
67
|
-
outputSchema: ListOrganizationAPITokensOutput,
|
|
68
|
-
}));
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
|
|
5
|
-
// Input Schema
|
|
6
|
-
export interface ListOrganizationAuditLogsInput {
|
|
7
|
-
organizationSlug: string;
|
|
8
|
-
page_size?: number;
|
|
9
|
-
page?: number;
|
|
10
|
-
}
|
|
11
|
-
export const ListOrganizationAuditLogsInput =
|
|
12
|
-
/*@__PURE__*/ Schema.Struct({
|
|
13
|
-
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
14
|
-
page_size: Schema.optional(Schema.Number),
|
|
15
|
-
page: Schema.optional(Schema.Number),
|
|
16
|
-
}).pipe(
|
|
17
|
-
T.Http({
|
|
18
|
-
method: "GET",
|
|
19
|
-
path: "/v1/organizations/{organizationSlug}/audit-logs",
|
|
20
|
-
}),
|
|
21
|
-
) as unknown as Schema.Codec<ListOrganizationAuditLogsInput>;
|
|
22
|
-
|
|
23
|
-
// Output Schema
|
|
24
|
-
export interface ListOrganizationAuditLogsOutput {
|
|
25
|
-
audit_logs?: {
|
|
26
|
-
code?:
|
|
27
|
-
| "user-signup"
|
|
28
|
-
| "db-create"
|
|
29
|
-
| "db-delete"
|
|
30
|
-
| "db-protect"
|
|
31
|
-
| "db-unprotect"
|
|
32
|
-
| "db-token-create"
|
|
33
|
-
| "group-token-create"
|
|
34
|
-
| "user-token-create"
|
|
35
|
-
| "instance-create"
|
|
36
|
-
| "instance-delete"
|
|
37
|
-
| "org-create"
|
|
38
|
-
| "org-delete"
|
|
39
|
-
| "org-member-add"
|
|
40
|
-
| "org-member-rm"
|
|
41
|
-
| "org-member-leave"
|
|
42
|
-
| "org-plan-update"
|
|
43
|
-
| "org-set-overages"
|
|
44
|
-
| "group-create"
|
|
45
|
-
| "group-delete"
|
|
46
|
-
| "group-unarchive"
|
|
47
|
-
| "group-protect"
|
|
48
|
-
| "group-unprotect"
|
|
49
|
-
| "db-aunrchive"
|
|
50
|
-
| "user-delete";
|
|
51
|
-
message?: string;
|
|
52
|
-
origin?: string;
|
|
53
|
-
author?: string;
|
|
54
|
-
created_at?: string;
|
|
55
|
-
data?: unknown;
|
|
56
|
-
}[];
|
|
57
|
-
pagination?: {
|
|
58
|
-
page?: number;
|
|
59
|
-
page_size?: number;
|
|
60
|
-
total_pages?: number;
|
|
61
|
-
total_rows?: number;
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
export const ListOrganizationAuditLogsOutput =
|
|
65
|
-
/*@__PURE__*/ Schema.Struct({
|
|
66
|
-
audit_logs: Schema.optional(
|
|
67
|
-
Schema.Array(
|
|
68
|
-
Schema.Struct({
|
|
69
|
-
code: Schema.optional(
|
|
70
|
-
Schema.Literals([
|
|
71
|
-
"user-signup",
|
|
72
|
-
"db-create",
|
|
73
|
-
"db-delete",
|
|
74
|
-
"db-protect",
|
|
75
|
-
"db-unprotect",
|
|
76
|
-
"db-token-create",
|
|
77
|
-
"group-token-create",
|
|
78
|
-
"user-token-create",
|
|
79
|
-
"instance-create",
|
|
80
|
-
"instance-delete",
|
|
81
|
-
"org-create",
|
|
82
|
-
"org-delete",
|
|
83
|
-
"org-member-add",
|
|
84
|
-
"org-member-rm",
|
|
85
|
-
"org-member-leave",
|
|
86
|
-
"org-plan-update",
|
|
87
|
-
"org-set-overages",
|
|
88
|
-
"group-create",
|
|
89
|
-
"group-delete",
|
|
90
|
-
"group-unarchive",
|
|
91
|
-
"group-protect",
|
|
92
|
-
"group-unprotect",
|
|
93
|
-
"db-aunrchive",
|
|
94
|
-
"user-delete",
|
|
95
|
-
]),
|
|
96
|
-
),
|
|
97
|
-
message: Schema.optional(Schema.String),
|
|
98
|
-
origin: Schema.optional(Schema.String),
|
|
99
|
-
author: Schema.optional(Schema.String),
|
|
100
|
-
created_at: Schema.optional(Schema.String),
|
|
101
|
-
data: Schema.optional(Schema.Unknown),
|
|
102
|
-
}),
|
|
103
|
-
),
|
|
104
|
-
),
|
|
105
|
-
pagination: Schema.optional(
|
|
106
|
-
Schema.Struct({
|
|
107
|
-
page: Schema.optional(Schema.Number),
|
|
108
|
-
page_size: Schema.optional(Schema.Number),
|
|
109
|
-
total_pages: Schema.optional(Schema.Number),
|
|
110
|
-
total_rows: Schema.optional(Schema.Number),
|
|
111
|
-
}),
|
|
112
|
-
),
|
|
113
|
-
}) as unknown as Schema.Codec<ListOrganizationAuditLogsOutput>;
|
|
114
|
-
|
|
115
|
-
// The operation
|
|
116
|
-
/**
|
|
117
|
-
* List Audit Logs
|
|
118
|
-
*
|
|
119
|
-
* Return the audit logs for the given organization, ordered by the `created_at` field in descending order.
|
|
120
|
-
*
|
|
121
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
122
|
-
* @param page_size - The limit of items to return per page. Defaults to 100.
|
|
123
|
-
* @param page - The page number to return. Defaults to 1.
|
|
124
|
-
*/
|
|
125
|
-
export const listOrganizationAuditLogs = /*@__PURE__*/ API.make(() => ({
|
|
126
|
-
inputSchema: ListOrganizationAuditLogsInput,
|
|
127
|
-
outputSchema: ListOrganizationAuditLogsOutput,
|
|
128
|
-
}));
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
|
|
5
|
-
// Input Schema
|
|
6
|
-
export const ListOrganizationInvitesInput =
|
|
7
|
-
/*@__PURE__*/ Schema.Struct({
|
|
8
|
-
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
9
|
-
}).pipe(
|
|
10
|
-
T.Http({
|
|
11
|
-
method: "GET",
|
|
12
|
-
path: "/v1/organizations/{organizationSlug}/invites",
|
|
13
|
-
}),
|
|
14
|
-
);
|
|
15
|
-
export type ListOrganizationInvitesInput =
|
|
16
|
-
typeof ListOrganizationInvitesInput.Type;
|
|
17
|
-
|
|
18
|
-
// Output Schema
|
|
19
|
-
export const ListOrganizationInvitesOutput =
|
|
20
|
-
/*@__PURE__*/ Schema.Struct({
|
|
21
|
-
invites: Schema.optional(
|
|
22
|
-
Schema.Array(
|
|
23
|
-
Schema.Struct({
|
|
24
|
-
ID: Schema.optional(Schema.Number),
|
|
25
|
-
CreatedAt: Schema.optional(Schema.String),
|
|
26
|
-
UpdatedAt: Schema.optional(Schema.String),
|
|
27
|
-
DeletedAt: Schema.optional(Schema.String),
|
|
28
|
-
Role: Schema.optional(Schema.Literals(["admin", "member", "viewer"])),
|
|
29
|
-
Email: Schema.optional(Schema.String),
|
|
30
|
-
OrganizationID: Schema.optional(Schema.Number),
|
|
31
|
-
Token: Schema.optional(Schema.String),
|
|
32
|
-
Organization: Schema.optional(
|
|
33
|
-
Schema.Struct({
|
|
34
|
-
name: Schema.optional(Schema.String),
|
|
35
|
-
slug: Schema.optional(Schema.String),
|
|
36
|
-
type: Schema.optional(Schema.Literals(["personal", "team"])),
|
|
37
|
-
overages: Schema.optional(Schema.Boolean),
|
|
38
|
-
blocked_reads: Schema.optional(Schema.Boolean),
|
|
39
|
-
blocked_writes: Schema.optional(Schema.Boolean),
|
|
40
|
-
plan_id: Schema.optional(Schema.String),
|
|
41
|
-
plan_timeline: Schema.optional(Schema.String),
|
|
42
|
-
platform: Schema.optional(Schema.String),
|
|
43
|
-
}),
|
|
44
|
-
),
|
|
45
|
-
Accepted: Schema.optional(Schema.Boolean),
|
|
46
|
-
}),
|
|
47
|
-
),
|
|
48
|
-
),
|
|
49
|
-
});
|
|
50
|
-
export type ListOrganizationInvitesOutput =
|
|
51
|
-
typeof ListOrganizationInvitesOutput.Type;
|
|
52
|
-
|
|
53
|
-
// The operation
|
|
54
|
-
/**
|
|
55
|
-
* List Invites
|
|
56
|
-
*
|
|
57
|
-
* Returns a list of invites for the organization.
|
|
58
|
-
*
|
|
59
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
60
|
-
*/
|
|
61
|
-
export const listOrganizationInvites = /*@__PURE__*/ API.make(() => ({
|
|
62
|
-
inputSchema: ListOrganizationInvitesInput,
|
|
63
|
-
outputSchema: ListOrganizationInvitesOutput,
|
|
64
|
-
}));
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
|
|
5
|
-
// Input Schema
|
|
6
|
-
export interface ListOrganizationInvitesV2Input {
|
|
7
|
-
organizationSlug: string;
|
|
8
|
-
}
|
|
9
|
-
export const ListOrganizationInvitesV2Input =
|
|
10
|
-
/*@__PURE__*/ Schema.Struct({
|
|
11
|
-
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
12
|
-
}).pipe(
|
|
13
|
-
T.Http({
|
|
14
|
-
method: "GET",
|
|
15
|
-
path: "/v2/organizations/{organizationSlug}/invites",
|
|
16
|
-
}),
|
|
17
|
-
) as unknown as Schema.Codec<ListOrganizationInvitesV2Input>;
|
|
18
|
-
|
|
19
|
-
// Output Schema
|
|
20
|
-
export interface ListOrganizationInvitesV2Output {
|
|
21
|
-
invites?: {
|
|
22
|
-
id?: number;
|
|
23
|
-
email?: string;
|
|
24
|
-
role?: "admin" | "member" | "viewer";
|
|
25
|
-
created_at?: string;
|
|
26
|
-
}[];
|
|
27
|
-
}
|
|
28
|
-
export const ListOrganizationInvitesV2Output =
|
|
29
|
-
/*@__PURE__*/ Schema.Struct({
|
|
30
|
-
invites: Schema.optional(
|
|
31
|
-
Schema.Array(
|
|
32
|
-
Schema.Struct({
|
|
33
|
-
id: Schema.optional(Schema.Number),
|
|
34
|
-
email: Schema.optional(Schema.String),
|
|
35
|
-
role: Schema.optional(Schema.Literals(["admin", "member", "viewer"])),
|
|
36
|
-
created_at: Schema.optional(Schema.String),
|
|
37
|
-
}),
|
|
38
|
-
),
|
|
39
|
-
),
|
|
40
|
-
}) as unknown as Schema.Codec<ListOrganizationInvitesV2Output>;
|
|
41
|
-
|
|
42
|
-
// The operation
|
|
43
|
-
/**
|
|
44
|
-
* List Invites
|
|
45
|
-
*
|
|
46
|
-
* Returns a list of pending invites for the organization.
|
|
47
|
-
*
|
|
48
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
49
|
-
*/
|
|
50
|
-
export const listOrganizationInvitesV2 = /*@__PURE__*/ API.make(() => ({
|
|
51
|
-
inputSchema: ListOrganizationInvitesV2Input,
|
|
52
|
-
outputSchema: ListOrganizationInvitesV2Output,
|
|
53
|
-
}));
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
|
|
5
|
-
// Input Schema
|
|
6
|
-
export interface ListOrganizationInvoicesInput {
|
|
7
|
-
organizationSlug: string;
|
|
8
|
-
type?: "all" | "upcoming" | "issued";
|
|
9
|
-
}
|
|
10
|
-
export const ListOrganizationInvoicesInput =
|
|
11
|
-
/*@__PURE__*/ Schema.Struct({
|
|
12
|
-
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
13
|
-
type: Schema.optional(Schema.Literals(["all", "upcoming", "issued"])),
|
|
14
|
-
}).pipe(
|
|
15
|
-
T.Http({
|
|
16
|
-
method: "GET",
|
|
17
|
-
path: "/v1/organizations/{organizationSlug}/invoices",
|
|
18
|
-
}),
|
|
19
|
-
) as unknown as Schema.Codec<ListOrganizationInvoicesInput>;
|
|
20
|
-
|
|
21
|
-
// Output Schema
|
|
22
|
-
export interface ListOrganizationInvoicesOutput {
|
|
23
|
-
invoices?: {
|
|
24
|
-
invoice_number?: string;
|
|
25
|
-
amount_due?: string;
|
|
26
|
-
due_date?: string;
|
|
27
|
-
paid_at?: string;
|
|
28
|
-
payment_failed_at?: string;
|
|
29
|
-
invoice_pdf?: string;
|
|
30
|
-
}[];
|
|
31
|
-
}
|
|
32
|
-
export const ListOrganizationInvoicesOutput =
|
|
33
|
-
/*@__PURE__*/ Schema.Struct({
|
|
34
|
-
invoices: Schema.optional(
|
|
35
|
-
Schema.Array(
|
|
36
|
-
Schema.Struct({
|
|
37
|
-
invoice_number: Schema.optional(Schema.String),
|
|
38
|
-
amount_due: Schema.optional(Schema.String),
|
|
39
|
-
due_date: Schema.optional(Schema.String),
|
|
40
|
-
paid_at: Schema.optional(Schema.String),
|
|
41
|
-
payment_failed_at: Schema.optional(Schema.String),
|
|
42
|
-
invoice_pdf: Schema.optional(Schema.String),
|
|
43
|
-
}),
|
|
44
|
-
),
|
|
45
|
-
),
|
|
46
|
-
}) as unknown as Schema.Codec<ListOrganizationInvoicesOutput>;
|
|
47
|
-
|
|
48
|
-
// The operation
|
|
49
|
-
/**
|
|
50
|
-
* List Invoices
|
|
51
|
-
*
|
|
52
|
-
* Returns a list of invoices for the organization.
|
|
53
|
-
*
|
|
54
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
55
|
-
* @param type - The type of invoice to retrieve.
|
|
56
|
-
*/
|
|
57
|
-
export const listOrganizationInvoices = /*@__PURE__*/ API.make(() => ({
|
|
58
|
-
inputSchema: ListOrganizationInvoicesInput,
|
|
59
|
-
outputSchema: ListOrganizationInvoicesOutput,
|
|
60
|
-
}));
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
|
|
5
|
-
// Input Schema
|
|
6
|
-
export interface ListOrganizationMembersInput {
|
|
7
|
-
organizationSlug: string;
|
|
8
|
-
}
|
|
9
|
-
export const ListOrganizationMembersInput =
|
|
10
|
-
/*@__PURE__*/ Schema.Struct({
|
|
11
|
-
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
12
|
-
}).pipe(
|
|
13
|
-
T.Http({
|
|
14
|
-
method: "GET",
|
|
15
|
-
path: "/v1/organizations/{organizationSlug}/members",
|
|
16
|
-
}),
|
|
17
|
-
) as unknown as Schema.Codec<ListOrganizationMembersInput>;
|
|
18
|
-
|
|
19
|
-
// Output Schema
|
|
20
|
-
export interface ListOrganizationMembersOutput {
|
|
21
|
-
members?: {
|
|
22
|
-
username?: string;
|
|
23
|
-
role?: "owner" | "admin" | "member" | "viewer";
|
|
24
|
-
email?: string;
|
|
25
|
-
}[];
|
|
26
|
-
}
|
|
27
|
-
export const ListOrganizationMembersOutput =
|
|
28
|
-
/*@__PURE__*/ Schema.Struct({
|
|
29
|
-
members: Schema.optional(
|
|
30
|
-
Schema.Array(
|
|
31
|
-
Schema.Struct({
|
|
32
|
-
username: Schema.optional(Schema.String),
|
|
33
|
-
role: Schema.optional(
|
|
34
|
-
Schema.Literals(["owner", "admin", "member", "viewer"]),
|
|
35
|
-
),
|
|
36
|
-
email: Schema.optional(Schema.String),
|
|
37
|
-
}),
|
|
38
|
-
),
|
|
39
|
-
),
|
|
40
|
-
}) as unknown as Schema.Codec<ListOrganizationMembersOutput>;
|
|
41
|
-
|
|
42
|
-
// The operation
|
|
43
|
-
/**
|
|
44
|
-
* List Members
|
|
45
|
-
*
|
|
46
|
-
* Returns a list of members part of the organization.
|
|
47
|
-
*
|
|
48
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
49
|
-
*/
|
|
50
|
-
export const listOrganizationMembers = /*@__PURE__*/ API.make(() => ({
|
|
51
|
-
inputSchema: ListOrganizationMembersInput,
|
|
52
|
-
outputSchema: ListOrganizationMembersOutput,
|
|
53
|
-
}));
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
|
|
5
|
-
// Input Schema
|
|
6
|
-
export interface ListOrganizationPlansInput {
|
|
7
|
-
organizationSlug: string;
|
|
8
|
-
}
|
|
9
|
-
export const ListOrganizationPlansInput =
|
|
10
|
-
/*@__PURE__*/ Schema.Struct({
|
|
11
|
-
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
12
|
-
}).pipe(
|
|
13
|
-
T.Http({
|
|
14
|
-
method: "GET",
|
|
15
|
-
path: "/v1/organizations/{organizationSlug}/plans",
|
|
16
|
-
}),
|
|
17
|
-
) as unknown as Schema.Codec<ListOrganizationPlansInput>;
|
|
18
|
-
|
|
19
|
-
// Output Schema
|
|
20
|
-
export interface ListOrganizationPlansOutput {
|
|
21
|
-
plans?: {
|
|
22
|
-
name?: string;
|
|
23
|
-
price?: string;
|
|
24
|
-
prices?: { value?: string; timeline?: string }[];
|
|
25
|
-
quotas?: {
|
|
26
|
-
rowsRead?: number;
|
|
27
|
-
rowsWritten?: number;
|
|
28
|
-
databases?: number | null;
|
|
29
|
-
locations?: number;
|
|
30
|
-
storage?: number;
|
|
31
|
-
groups?: number;
|
|
32
|
-
bytesSynced?: number;
|
|
33
|
-
};
|
|
34
|
-
}[];
|
|
35
|
-
}
|
|
36
|
-
export const ListOrganizationPlansOutput =
|
|
37
|
-
/*@__PURE__*/ Schema.Struct({
|
|
38
|
-
plans: Schema.optional(
|
|
39
|
-
Schema.Array(
|
|
40
|
-
Schema.Struct({
|
|
41
|
-
name: Schema.optional(Schema.String),
|
|
42
|
-
price: Schema.optional(Schema.String),
|
|
43
|
-
prices: Schema.optional(
|
|
44
|
-
Schema.Array(
|
|
45
|
-
Schema.Struct({
|
|
46
|
-
value: Schema.optional(Schema.String),
|
|
47
|
-
timeline: Schema.optional(Schema.String),
|
|
48
|
-
}),
|
|
49
|
-
),
|
|
50
|
-
),
|
|
51
|
-
quotas: Schema.optional(
|
|
52
|
-
Schema.Struct({
|
|
53
|
-
rowsRead: Schema.optional(Schema.Number),
|
|
54
|
-
rowsWritten: Schema.optional(Schema.Number),
|
|
55
|
-
databases: Schema.optional(Schema.NullOr(Schema.Number)),
|
|
56
|
-
locations: Schema.optional(Schema.Number),
|
|
57
|
-
storage: Schema.optional(Schema.Number),
|
|
58
|
-
groups: Schema.optional(Schema.Number),
|
|
59
|
-
bytesSynced: Schema.optional(Schema.Number),
|
|
60
|
-
}),
|
|
61
|
-
),
|
|
62
|
-
}),
|
|
63
|
-
),
|
|
64
|
-
),
|
|
65
|
-
}) as unknown as Schema.Codec<ListOrganizationPlansOutput>;
|
|
66
|
-
|
|
67
|
-
// The operation
|
|
68
|
-
/**
|
|
69
|
-
* List Plans
|
|
70
|
-
*
|
|
71
|
-
* Returns a list of available plans and their quotas.
|
|
72
|
-
*
|
|
73
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
74
|
-
*/
|
|
75
|
-
export const listOrganizationPlans = /*@__PURE__*/ API.make(() => ({
|
|
76
|
-
inputSchema: ListOrganizationPlansInput,
|
|
77
|
-
outputSchema: ListOrganizationPlansOutput,
|
|
78
|
-
}));
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
|
|
5
|
-
// Input Schema
|
|
6
|
-
export interface ListOrganizationsInput {}
|
|
7
|
-
export const ListOrganizationsInput = /*@__PURE__*/ Schema.Struct({}).pipe(
|
|
8
|
-
T.Http({ method: "GET", path: "/v1/organizations" }),
|
|
9
|
-
) as unknown as Schema.Codec<ListOrganizationsInput>;
|
|
10
|
-
|
|
11
|
-
// Output Schema
|
|
12
|
-
export type ListOrganizationsOutput = {
|
|
13
|
-
name?: string;
|
|
14
|
-
slug?: string;
|
|
15
|
-
type?: "personal" | "team";
|
|
16
|
-
overages?: boolean;
|
|
17
|
-
require_mfa?: boolean;
|
|
18
|
-
blocked_reads?: boolean;
|
|
19
|
-
blocked_writes?: boolean;
|
|
20
|
-
plan_id?: string;
|
|
21
|
-
plan_timeline?: string;
|
|
22
|
-
platform?: string;
|
|
23
|
-
}[];
|
|
24
|
-
export const ListOrganizationsOutput = /*@__PURE__*/ Schema.Array(
|
|
25
|
-
Schema.Struct({
|
|
26
|
-
name: Schema.optional(Schema.String),
|
|
27
|
-
slug: Schema.optional(Schema.String),
|
|
28
|
-
type: Schema.optional(Schema.Literals(["personal", "team"])),
|
|
29
|
-
overages: Schema.optional(Schema.Boolean),
|
|
30
|
-
require_mfa: Schema.optional(Schema.Boolean),
|
|
31
|
-
blocked_reads: Schema.optional(Schema.Boolean),
|
|
32
|
-
blocked_writes: Schema.optional(Schema.Boolean),
|
|
33
|
-
plan_id: Schema.optional(Schema.String),
|
|
34
|
-
plan_timeline: Schema.optional(Schema.String),
|
|
35
|
-
platform: Schema.optional(Schema.String),
|
|
36
|
-
}),
|
|
37
|
-
) as unknown as Schema.Codec<ListOrganizationsOutput>;
|
|
38
|
-
|
|
39
|
-
// The operation
|
|
40
|
-
/**
|
|
41
|
-
* List Organizations
|
|
42
|
-
*
|
|
43
|
-
* Returns a list of organizations the authenticated user owns or is a member of.
|
|
44
|
-
*/
|
|
45
|
-
export const listOrganizations = /*@__PURE__*/ API.make(() => ({
|
|
46
|
-
inputSchema: ListOrganizationsInput,
|
|
47
|
-
outputSchema: ListOrganizationsOutput,
|
|
48
|
-
}));
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
import { BadRequest, NotFound } from "../errors.ts";
|
|
5
|
-
|
|
6
|
-
// Input Schema
|
|
7
|
-
export interface RemoveLocationFromGroupInput {
|
|
8
|
-
organizationSlug: string;
|
|
9
|
-
groupName: string;
|
|
10
|
-
location: string;
|
|
11
|
-
}
|
|
12
|
-
export const RemoveLocationFromGroupInput =
|
|
13
|
-
/*@__PURE__*/ Schema.Struct({
|
|
14
|
-
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
15
|
-
groupName: Schema.String.pipe(T.PathParam()),
|
|
16
|
-
location: Schema.String.pipe(T.PathParam()),
|
|
17
|
-
}).pipe(
|
|
18
|
-
T.Http({
|
|
19
|
-
method: "DELETE",
|
|
20
|
-
path: "/v1/organizations/{organizationSlug}/groups/{groupName}/locations/{location}",
|
|
21
|
-
}),
|
|
22
|
-
) as unknown as Schema.Codec<RemoveLocationFromGroupInput>;
|
|
23
|
-
|
|
24
|
-
// Output Schema
|
|
25
|
-
export interface RemoveLocationFromGroupOutput {
|
|
26
|
-
group?: {
|
|
27
|
-
name?: string;
|
|
28
|
-
version?: string;
|
|
29
|
-
uuid?: string;
|
|
30
|
-
locations?: string[];
|
|
31
|
-
primary?: string;
|
|
32
|
-
delete_protection?: boolean;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export const RemoveLocationFromGroupOutput =
|
|
36
|
-
/*@__PURE__*/ Schema.Struct({
|
|
37
|
-
group: Schema.optional(
|
|
38
|
-
Schema.Struct({
|
|
39
|
-
name: Schema.optional(Schema.String),
|
|
40
|
-
version: Schema.optional(Schema.String),
|
|
41
|
-
uuid: Schema.optional(Schema.String),
|
|
42
|
-
locations: Schema.optional(Schema.Array(Schema.String)),
|
|
43
|
-
primary: Schema.optional(Schema.String),
|
|
44
|
-
delete_protection: Schema.optional(Schema.Boolean),
|
|
45
|
-
}),
|
|
46
|
-
),
|
|
47
|
-
}) as unknown as Schema.Codec<RemoveLocationFromGroupOutput>;
|
|
48
|
-
|
|
49
|
-
// The operation
|
|
50
|
-
/**
|
|
51
|
-
* Remove Location from Group
|
|
52
|
-
*
|
|
53
|
-
* Removes a location from the specified group.
|
|
54
|
-
*
|
|
55
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
56
|
-
* @param groupName - The name of the group.
|
|
57
|
-
* @param location - The location code to remove from the group.
|
|
58
|
-
*/
|
|
59
|
-
export const removeLocationFromGroup = /*@__PURE__*/ API.make(() => ({
|
|
60
|
-
inputSchema: RemoveLocationFromGroupInput,
|
|
61
|
-
outputSchema: RemoveLocationFromGroupOutput,
|
|
62
|
-
errors: [BadRequest, NotFound] as const,
|
|
63
|
-
}));
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.ts";
|
|
3
|
-
import * as T from "../traits.ts";
|
|
4
|
-
import { NotFound } from "../errors.ts";
|
|
5
|
-
|
|
6
|
-
// Input Schema
|
|
7
|
-
export interface RemoveOrganizationMemberInput {
|
|
8
|
-
organizationSlug: string;
|
|
9
|
-
username: string;
|
|
10
|
-
}
|
|
11
|
-
export const RemoveOrganizationMemberInput =
|
|
12
|
-
/*@__PURE__*/ Schema.Struct({
|
|
13
|
-
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
14
|
-
username: Schema.String.pipe(T.PathParam()),
|
|
15
|
-
}).pipe(
|
|
16
|
-
T.Http({
|
|
17
|
-
method: "DELETE",
|
|
18
|
-
path: "/v1/organizations/{organizationSlug}/members/{username}",
|
|
19
|
-
}),
|
|
20
|
-
) as unknown as Schema.Codec<RemoveOrganizationMemberInput>;
|
|
21
|
-
|
|
22
|
-
// Output Schema
|
|
23
|
-
export interface RemoveOrganizationMemberOutput {
|
|
24
|
-
member?: string;
|
|
25
|
-
}
|
|
26
|
-
export const RemoveOrganizationMemberOutput =
|
|
27
|
-
/*@__PURE__*/ Schema.Struct({
|
|
28
|
-
member: Schema.optional(Schema.String),
|
|
29
|
-
}) as unknown as Schema.Codec<RemoveOrganizationMemberOutput>;
|
|
30
|
-
|
|
31
|
-
// The operation
|
|
32
|
-
/**
|
|
33
|
-
* Remove Member
|
|
34
|
-
*
|
|
35
|
-
* Remove a user from the organization by username.
|
|
36
|
-
*
|
|
37
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
38
|
-
* @param username - The username of a Turso user or organization member.
|
|
39
|
-
*/
|
|
40
|
-
export const removeOrganizationMember = /*@__PURE__*/ API.make(() => ({
|
|
41
|
-
inputSchema: RemoveOrganizationMemberInput,
|
|
42
|
-
outputSchema: RemoveOrganizationMemberOutput,
|
|
43
|
-
errors: [NotFound] as const,
|
|
44
|
-
}));
|