@distilled.cloud/turso 0.4.0 → 0.5.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/README.md +1 -0
- package/lib/operations/addLocationToGroup.d.ts +29 -0
- package/lib/operations/addLocationToGroup.d.ts.map +1 -0
- package/lib/operations/addLocationToGroup.js +40 -0
- package/lib/operations/addLocationToGroup.js.map +1 -0
- package/lib/operations/addOrganizationMember.d.ts +21 -0
- package/lib/operations/addOrganizationMember.d.ts.map +1 -0
- package/lib/operations/addOrganizationMember.js +32 -0
- package/lib/operations/addOrganizationMember.js.map +1 -0
- package/lib/operations/createAPIToken.d.ts +20 -0
- package/lib/operations/createAPIToken.d.ts.map +1 -0
- package/lib/operations/createAPIToken.js +26 -0
- package/lib/operations/createAPIToken.js.map +1 -0
- package/lib/operations/createDatabase.d.ts +34 -0
- package/lib/operations/createDatabase.d.ts.map +1 -0
- package/lib/operations/createDatabase.js +53 -0
- package/lib/operations/createDatabase.js.map +1 -0
- package/lib/operations/createDatabaseToken.d.ts +29 -0
- package/lib/operations/createDatabaseToken.d.ts.map +1 -0
- package/lib/operations/createDatabaseToken.js +40 -0
- package/lib/operations/createDatabaseToken.js.map +1 -0
- package/lib/operations/createGroup.d.ts +28 -0
- package/lib/operations/createGroup.d.ts.map +1 -0
- package/lib/operations/createGroup.js +37 -0
- package/lib/operations/createGroup.js.map +1 -0
- package/lib/operations/createGroupToken.d.ts +29 -0
- package/lib/operations/createGroupToken.d.ts.map +1 -0
- package/lib/operations/createGroupToken.js +38 -0
- package/lib/operations/createGroupToken.js.map +1 -0
- package/lib/operations/deleteDatabase.d.ts +20 -0
- package/lib/operations/deleteDatabase.d.ts.map +1 -0
- package/lib/operations/deleteDatabase.js +29 -0
- package/lib/operations/deleteDatabase.js.map +1 -0
- package/lib/operations/deleteGroup.d.ts +27 -0
- package/lib/operations/deleteGroup.d.ts.map +1 -0
- package/lib/operations/deleteGroup.js +36 -0
- package/lib/operations/deleteGroup.js.map +1 -0
- package/lib/operations/deleteOrganizationInviteByEmail.d.ts +17 -0
- package/lib/operations/deleteOrganizationInviteByEmail.d.ts.map +1 -0
- package/lib/operations/deleteOrganizationInviteByEmail.js +29 -0
- package/lib/operations/deleteOrganizationInviteByEmail.js.map +1 -0
- package/lib/operations/getDatabase.d.ts +35 -0
- package/lib/operations/getDatabase.d.ts.map +1 -0
- package/lib/operations/getDatabase.js +44 -0
- package/lib/operations/getDatabase.js.map +1 -0
- package/lib/operations/getDatabaseConfiguration.d.ts +24 -0
- package/lib/operations/getDatabaseConfiguration.d.ts.map +1 -0
- package/lib/operations/getDatabaseConfiguration.js +35 -0
- package/lib/operations/getDatabaseConfiguration.js.map +1 -0
- package/lib/operations/getDatabaseInstance.d.ts +28 -0
- package/lib/operations/getDatabaseInstance.d.ts.map +1 -0
- package/lib/operations/getDatabaseInstance.js +39 -0
- package/lib/operations/getDatabaseInstance.js.map +1 -0
- package/lib/operations/getDatabaseStats.d.ts +24 -0
- package/lib/operations/getDatabaseStats.d.ts.map +1 -0
- package/lib/operations/getDatabaseStats.js +33 -0
- package/lib/operations/getDatabaseStats.js.map +1 -0
- package/lib/operations/getDatabaseUsage.d.ts +41 -0
- package/lib/operations/getDatabaseUsage.d.ts.map +1 -0
- package/lib/operations/getDatabaseUsage.js +50 -0
- package/lib/operations/getDatabaseUsage.js.map +1 -0
- package/lib/operations/getGroup.d.ts +27 -0
- package/lib/operations/getGroup.d.ts.map +1 -0
- package/lib/operations/getGroup.js +36 -0
- package/lib/operations/getGroup.js.map +1 -0
- package/lib/operations/getGroupConfiguration.d.ts +20 -0
- package/lib/operations/getGroupConfiguration.d.ts.map +1 -0
- package/lib/operations/getGroupConfiguration.js +31 -0
- package/lib/operations/getGroupConfiguration.js.map +1 -0
- package/lib/operations/getOrganization.d.ts +28 -0
- package/lib/operations/getOrganization.d.ts.map +1 -0
- package/lib/operations/getOrganization.js +34 -0
- package/lib/operations/getOrganization.js.map +1 -0
- package/lib/operations/getOrganizationMember.d.ts +24 -0
- package/lib/operations/getOrganizationMember.d.ts.map +1 -0
- package/lib/operations/getOrganizationMember.js +35 -0
- package/lib/operations/getOrganizationMember.js.map +1 -0
- package/lib/operations/getOrganizationSubscription.d.ts +23 -0
- package/lib/operations/getOrganizationSubscription.d.ts.map +1 -0
- package/lib/operations/getOrganizationSubscription.js +34 -0
- package/lib/operations/getOrganizationSubscription.js.map +1 -0
- package/lib/operations/getOrganizationUsage.d.ts +47 -0
- package/lib/operations/getOrganizationUsage.d.ts.map +1 -0
- package/lib/operations/getOrganizationUsage.js +58 -0
- package/lib/operations/getOrganizationUsage.js.map +1 -0
- package/lib/operations/index.d.ts +46 -1
- package/lib/operations/index.d.ts.map +1 -1
- package/lib/operations/index.js +46 -2
- package/lib/operations/index.js.map +1 -1
- package/lib/operations/invalidateDatabaseTokens.d.ts +18 -0
- package/lib/operations/invalidateDatabaseTokens.d.ts.map +1 -0
- package/lib/operations/invalidateDatabaseTokens.js +29 -0
- package/lib/operations/invalidateDatabaseTokens.js.map +1 -0
- package/lib/operations/invalidateGroupTokens.d.ts +18 -0
- package/lib/operations/invalidateGroupTokens.d.ts.map +1 -0
- package/lib/operations/invalidateGroupTokens.js +29 -0
- package/lib/operations/invalidateGroupTokens.js.map +1 -0
- package/lib/operations/inviteOrganizationMember.d.ts +41 -0
- package/lib/operations/inviteOrganizationMember.d.ts.map +1 -0
- package/lib/operations/inviteOrganizationMember.js +52 -0
- package/lib/operations/inviteOrganizationMember.js.map +1 -0
- package/lib/operations/listAPITokens.d.ts +17 -0
- package/lib/operations/listAPITokens.d.ts.map +1 -0
- package/lib/operations/listAPITokens.js +23 -0
- package/lib/operations/listAPITokens.js.map +1 -0
- package/lib/operations/listDatabaseInstances.d.ts +26 -0
- package/lib/operations/listDatabaseInstances.d.ts.map +1 -0
- package/lib/operations/listDatabaseInstances.js +37 -0
- package/lib/operations/listDatabaseInstances.js.map +1 -0
- package/lib/operations/listDatabases.d.ts +39 -0
- package/lib/operations/listDatabases.d.ts.map +1 -0
- package/lib/operations/listDatabases.js +48 -0
- package/lib/operations/listDatabases.js.map +1 -0
- package/lib/operations/listGroups.d.ts +25 -0
- package/lib/operations/listGroups.d.ts.map +1 -0
- package/lib/operations/listGroups.js +34 -0
- package/lib/operations/listGroups.js.map +1 -0
- package/lib/operations/listLocations.d.ts +14 -0
- package/lib/operations/listLocations.d.ts.map +1 -0
- package/lib/operations/listLocations.js +20 -0
- package/lib/operations/listLocations.js.map +1 -0
- package/lib/operations/listOrganizationAuditLogs.d.ts +35 -0
- package/lib/operations/listOrganizationAuditLogs.d.ts.map +1 -0
- package/lib/operations/listOrganizationAuditLogs.js +71 -0
- package/lib/operations/listOrganizationAuditLogs.js.map +1 -0
- package/lib/operations/listOrganizationInvites.d.ts +39 -0
- package/lib/operations/listOrganizationInvites.d.ts.map +1 -0
- package/lib/operations/listOrganizationInvites.js +50 -0
- package/lib/operations/listOrganizationInvites.js.map +1 -0
- package/lib/operations/listOrganizationInvoices.d.ts +27 -0
- package/lib/operations/listOrganizationInvoices.d.ts.map +1 -0
- package/lib/operations/listOrganizationInvoices.js +38 -0
- package/lib/operations/listOrganizationInvoices.js.map +1 -0
- package/lib/operations/listOrganizationMembers.d.ts +22 -0
- package/lib/operations/listOrganizationMembers.d.ts.map +1 -0
- package/lib/operations/listOrganizationMembers.js +33 -0
- package/lib/operations/listOrganizationMembers.js.map +1 -0
- package/lib/operations/listOrganizationPlans.d.ts +34 -0
- package/lib/operations/listOrganizationPlans.d.ts.map +1 -0
- package/lib/operations/listOrganizationPlans.js +45 -0
- package/lib/operations/listOrganizationPlans.js.map +1 -0
- package/lib/operations/listOrganizations.d.ts +22 -0
- package/lib/operations/listOrganizations.d.ts.map +1 -0
- package/lib/operations/listOrganizations.js +28 -0
- package/lib/operations/listOrganizations.js.map +1 -0
- package/lib/operations/removeLocationFromGroup.d.ts +29 -0
- package/lib/operations/removeLocationFromGroup.d.ts.map +1 -0
- package/lib/operations/removeLocationFromGroup.js +40 -0
- package/lib/operations/removeLocationFromGroup.js.map +1 -0
- package/lib/operations/removeOrganizationMember.d.ts +20 -0
- package/lib/operations/removeOrganizationMember.d.ts.map +1 -0
- package/lib/operations/removeOrganizationMember.js +31 -0
- package/lib/operations/removeOrganizationMember.js.map +1 -0
- package/lib/operations/revokeAPIToken.d.ts +18 -0
- package/lib/operations/revokeAPIToken.d.ts.map +1 -0
- package/lib/operations/revokeAPIToken.js +24 -0
- package/lib/operations/revokeAPIToken.js.map +1 -0
- package/lib/operations/transferGroup.d.ts +26 -0
- package/lib/operations/transferGroup.d.ts.map +1 -0
- package/lib/operations/transferGroup.js +35 -0
- package/lib/operations/transferGroup.js.map +1 -0
- package/lib/operations/unarchiveGroup.d.ts +27 -0
- package/lib/operations/unarchiveGroup.d.ts.map +1 -0
- package/lib/operations/unarchiveGroup.js +36 -0
- package/lib/operations/unarchiveGroup.js.map +1 -0
- package/lib/operations/updateDatabaseConfiguration.d.ts +29 -0
- package/lib/operations/updateDatabaseConfiguration.d.ts.map +1 -0
- package/lib/operations/updateDatabaseConfiguration.js +40 -0
- package/lib/operations/updateDatabaseConfiguration.js.map +1 -0
- package/lib/operations/updateGroupConfiguration.d.ts +21 -0
- package/lib/operations/updateGroupConfiguration.d.ts.map +1 -0
- package/lib/operations/updateGroupConfiguration.js +32 -0
- package/lib/operations/updateGroupConfiguration.js.map +1 -0
- package/lib/operations/updateGroupDatabases.d.ts +18 -0
- package/lib/operations/updateGroupDatabases.d.ts.map +1 -0
- package/lib/operations/updateGroupDatabases.js +29 -0
- package/lib/operations/updateGroupDatabases.js.map +1 -0
- package/lib/operations/updateMemberRole.d.ts +25 -0
- package/lib/operations/updateMemberRole.d.ts.map +1 -0
- package/lib/operations/updateMemberRole.js +34 -0
- package/lib/operations/updateMemberRole.js.map +1 -0
- package/lib/operations/updateOrganization.d.ts +29 -0
- package/lib/operations/updateOrganization.d.ts.map +1 -0
- package/lib/operations/updateOrganization.js +37 -0
- package/lib/operations/updateOrganization.js.map +1 -0
- package/lib/operations/validateAPIToken.d.ts +14 -0
- package/lib/operations/validateAPIToken.d.ts.map +1 -0
- package/lib/operations/validateAPIToken.js +20 -0
- package/lib/operations/validateAPIToken.js.map +1 -0
- package/package.json +4 -4
- package/src/operations/addLocationToGroup.ts +48 -0
- package/src/operations/addOrganizationMember.ts +43 -0
- package/src/operations/createAPIToken.ts +30 -0
- package/src/operations/createDatabase.ts +67 -0
- package/src/operations/createDatabaseToken.ts +52 -0
- package/src/operations/createGroup.ts +45 -0
- package/src/operations/createGroupToken.ts +50 -0
- package/src/operations/deleteDatabase.ts +35 -0
- package/src/operations/deleteGroup.ts +44 -0
- package/src/operations/deleteOrganizationInviteByEmail.ts +37 -0
- package/src/operations/getDatabase.ts +56 -0
- package/src/operations/getDatabaseConfiguration.ts +45 -0
- package/src/operations/getDatabaseInstance.ts +47 -0
- package/src/operations/getDatabaseStats.ts +47 -0
- package/src/operations/getDatabaseUsage.ts +68 -0
- package/src/operations/getGroup.ts +44 -0
- package/src/operations/getGroupConfiguration.ts +40 -0
- package/src/operations/getOrganization.ts +42 -0
- package/src/operations/getOrganizationMember.ts +48 -0
- package/src/operations/getOrganizationSubscription.ts +46 -0
- package/src/operations/getOrganizationUsage.ts +82 -0
- package/src/operations/index.ts +46 -2
- package/src/operations/invalidateDatabaseTokens.ts +39 -0
- package/src/operations/invalidateGroupTokens.ts +38 -0
- package/src/operations/inviteOrganizationMember.ts +66 -0
- package/src/operations/listAPITokens.ts +33 -0
- package/src/operations/listDatabaseInstances.ts +50 -0
- package/src/operations/listDatabases.ts +62 -0
- package/src/operations/listGroups.ts +44 -0
- package/src/operations/listLocations.ts +26 -0
- package/src/operations/listOrganizationAuditLogs.ts +89 -0
- package/src/operations/listOrganizationInvites.ts +66 -0
- package/src/operations/listOrganizationInvoices.ts +52 -0
- package/src/operations/listOrganizationMembers.ts +49 -0
- package/src/operations/listOrganizationPlans.ts +64 -0
- package/src/operations/listOrganizations.ts +36 -0
- package/src/operations/removeLocationFromGroup.ts +52 -0
- package/src/operations/removeOrganizationMember.ts +41 -0
- package/src/operations/revokeAPIToken.ts +28 -0
- package/src/operations/transferGroup.ts +41 -0
- package/src/operations/unarchiveGroup.ts +44 -0
- package/src/operations/updateDatabaseConfiguration.ts +50 -0
- package/src/operations/updateGroupConfiguration.ts +42 -0
- package/src/operations/updateGroupDatabases.ts +37 -0
- package/src/operations/updateMemberRole.ts +44 -0
- package/src/operations/updateOrganization.ts +45 -0
- package/src/operations/validateAPIToken.ts +28 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const CreateDatabaseInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
8
|
+
name: Schema.String,
|
|
9
|
+
group: Schema.String,
|
|
10
|
+
seed: Schema.optional(
|
|
11
|
+
Schema.Struct({
|
|
12
|
+
type: Schema.optional(Schema.Literals(["database", "database_upload"])),
|
|
13
|
+
name: Schema.optional(Schema.String),
|
|
14
|
+
timestamp: Schema.optional(Schema.String),
|
|
15
|
+
}),
|
|
16
|
+
),
|
|
17
|
+
size_limit: Schema.optional(Schema.String),
|
|
18
|
+
remote_encryption: Schema.optional(
|
|
19
|
+
Schema.Struct({
|
|
20
|
+
encryption_key: Schema.optional(Schema.String),
|
|
21
|
+
encryption_cipher: Schema.optional(
|
|
22
|
+
Schema.Literals([
|
|
23
|
+
"aes256gcm",
|
|
24
|
+
"aes128gcm",
|
|
25
|
+
"chacha20poly1305",
|
|
26
|
+
"aegis128l",
|
|
27
|
+
"aegis128x2",
|
|
28
|
+
"aegis128x4",
|
|
29
|
+
"aegis256",
|
|
30
|
+
"aegis256x2",
|
|
31
|
+
"aegis256x4",
|
|
32
|
+
]),
|
|
33
|
+
),
|
|
34
|
+
}),
|
|
35
|
+
),
|
|
36
|
+
}).pipe(
|
|
37
|
+
T.Http({
|
|
38
|
+
method: "POST",
|
|
39
|
+
path: "/v1/organizations/{organizationSlug}/databases",
|
|
40
|
+
}),
|
|
41
|
+
);
|
|
42
|
+
export type CreateDatabaseInput = typeof CreateDatabaseInput.Type;
|
|
43
|
+
|
|
44
|
+
// Output Schema
|
|
45
|
+
export const CreateDatabaseOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
46
|
+
database: Schema.optional(
|
|
47
|
+
Schema.Struct({
|
|
48
|
+
DbId: Schema.optional(Schema.String),
|
|
49
|
+
Hostname: Schema.optional(Schema.String),
|
|
50
|
+
Name: Schema.optional(Schema.String),
|
|
51
|
+
}),
|
|
52
|
+
),
|
|
53
|
+
});
|
|
54
|
+
export type CreateDatabaseOutput = typeof CreateDatabaseOutput.Type;
|
|
55
|
+
|
|
56
|
+
// The operation
|
|
57
|
+
/**
|
|
58
|
+
* Create Database
|
|
59
|
+
*
|
|
60
|
+
* Creates a new database in a group for the organization or user.
|
|
61
|
+
*
|
|
62
|
+
* @param organizationSlug - The slug of the organization or user account.
|
|
63
|
+
*/
|
|
64
|
+
export const createDatabase = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
65
|
+
inputSchema: CreateDatabaseInput,
|
|
66
|
+
outputSchema: CreateDatabaseOutput,
|
|
67
|
+
}));
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const CreateDatabaseTokenInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
databaseName: Schema.String.pipe(T.PathParam()),
|
|
10
|
+
expiration: Schema.optional(Schema.String),
|
|
11
|
+
authorization: Schema.optional(
|
|
12
|
+
Schema.Literals(["full-access", "read-only"]),
|
|
13
|
+
),
|
|
14
|
+
permissions: Schema.optional(
|
|
15
|
+
Schema.Struct({
|
|
16
|
+
read_attach: Schema.optional(
|
|
17
|
+
Schema.Struct({
|
|
18
|
+
databases: Schema.optional(Schema.Array(Schema.String)),
|
|
19
|
+
}),
|
|
20
|
+
),
|
|
21
|
+
}),
|
|
22
|
+
),
|
|
23
|
+
}).pipe(
|
|
24
|
+
T.Http({
|
|
25
|
+
method: "POST",
|
|
26
|
+
path: "/v1/organizations/{organizationSlug}/databases/{databaseName}/auth/tokens",
|
|
27
|
+
}),
|
|
28
|
+
);
|
|
29
|
+
export type CreateDatabaseTokenInput = typeof CreateDatabaseTokenInput.Type;
|
|
30
|
+
|
|
31
|
+
// Output Schema
|
|
32
|
+
export const CreateDatabaseTokenOutput =
|
|
33
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
34
|
+
jwt: Schema.optional(Schema.String),
|
|
35
|
+
});
|
|
36
|
+
export type CreateDatabaseTokenOutput = typeof CreateDatabaseTokenOutput.Type;
|
|
37
|
+
|
|
38
|
+
// The operation
|
|
39
|
+
/**
|
|
40
|
+
* Generate Database Auth Token
|
|
41
|
+
*
|
|
42
|
+
* Generates an authorization token for the specified database.
|
|
43
|
+
*
|
|
44
|
+
* @param organizationSlug - The slug of the organization or user account.
|
|
45
|
+
* @param databaseName - The name of the database.
|
|
46
|
+
* @param expiration - Expiration time for the token (e.g., 2w1d30m).
|
|
47
|
+
* @param authorization - Authorization level for the token (full-access or read-only).
|
|
48
|
+
*/
|
|
49
|
+
export const createDatabaseToken = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
50
|
+
inputSchema: CreateDatabaseTokenInput,
|
|
51
|
+
outputSchema: CreateDatabaseTokenOutput,
|
|
52
|
+
}));
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const CreateGroupInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
8
|
+
name: Schema.String,
|
|
9
|
+
location: Schema.String,
|
|
10
|
+
extensions: Schema.optional(Schema.Unknown),
|
|
11
|
+
}).pipe(
|
|
12
|
+
T.Http({
|
|
13
|
+
method: "POST",
|
|
14
|
+
path: "/v1/organizations/{organizationSlug}/groups",
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
17
|
+
export type CreateGroupInput = typeof CreateGroupInput.Type;
|
|
18
|
+
|
|
19
|
+
// Output Schema
|
|
20
|
+
export const CreateGroupOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
21
|
+
group: Schema.optional(
|
|
22
|
+
Schema.Struct({
|
|
23
|
+
name: Schema.optional(Schema.String),
|
|
24
|
+
version: Schema.optional(Schema.String),
|
|
25
|
+
uuid: Schema.optional(Schema.String),
|
|
26
|
+
locations: Schema.optional(Schema.Array(Schema.String)),
|
|
27
|
+
primary: Schema.optional(Schema.String),
|
|
28
|
+
delete_protection: Schema.optional(Schema.Boolean),
|
|
29
|
+
}),
|
|
30
|
+
),
|
|
31
|
+
});
|
|
32
|
+
export type CreateGroupOutput = typeof CreateGroupOutput.Type;
|
|
33
|
+
|
|
34
|
+
// The operation
|
|
35
|
+
/**
|
|
36
|
+
* Create Group
|
|
37
|
+
*
|
|
38
|
+
* Creates a new group for the organization or user.
|
|
39
|
+
*
|
|
40
|
+
* @param organizationSlug - The slug of the organization or user account.
|
|
41
|
+
*/
|
|
42
|
+
export const createGroup = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
43
|
+
inputSchema: CreateGroupInput,
|
|
44
|
+
outputSchema: CreateGroupOutput,
|
|
45
|
+
}));
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const CreateGroupTokenInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
8
|
+
groupName: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
expiration: Schema.optional(Schema.String),
|
|
10
|
+
authorization: Schema.optional(Schema.Literals(["full-access", "read-only"])),
|
|
11
|
+
permissions: Schema.optional(
|
|
12
|
+
Schema.Struct({
|
|
13
|
+
read_attach: Schema.optional(
|
|
14
|
+
Schema.Struct({
|
|
15
|
+
databases: Schema.optional(Schema.Array(Schema.String)),
|
|
16
|
+
}),
|
|
17
|
+
),
|
|
18
|
+
}),
|
|
19
|
+
),
|
|
20
|
+
}).pipe(
|
|
21
|
+
T.Http({
|
|
22
|
+
method: "POST",
|
|
23
|
+
path: "/v1/organizations/{organizationSlug}/groups/{groupName}/auth/tokens",
|
|
24
|
+
}),
|
|
25
|
+
);
|
|
26
|
+
export type CreateGroupTokenInput = typeof CreateGroupTokenInput.Type;
|
|
27
|
+
|
|
28
|
+
// Output Schema
|
|
29
|
+
export const CreateGroupTokenOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
30
|
+
{
|
|
31
|
+
jwt: Schema.optional(Schema.String),
|
|
32
|
+
},
|
|
33
|
+
);
|
|
34
|
+
export type CreateGroupTokenOutput = typeof CreateGroupTokenOutput.Type;
|
|
35
|
+
|
|
36
|
+
// The operation
|
|
37
|
+
/**
|
|
38
|
+
* Create Group Auth Token
|
|
39
|
+
*
|
|
40
|
+
* Generates an authorization token for the specified group.
|
|
41
|
+
*
|
|
42
|
+
* @param organizationSlug - The slug of the organization or user account.
|
|
43
|
+
* @param groupName - The name of the group.
|
|
44
|
+
* @param expiration - Expiration time for the token (e.g., 2w1d30m).
|
|
45
|
+
* @param authorization - Authorization level for the token (full-access or read-only).
|
|
46
|
+
*/
|
|
47
|
+
export const createGroupToken = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
48
|
+
inputSchema: CreateGroupTokenInput,
|
|
49
|
+
outputSchema: CreateGroupTokenOutput,
|
|
50
|
+
}));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const DeleteDatabaseInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
8
|
+
databaseName: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
}).pipe(
|
|
10
|
+
T.Http({
|
|
11
|
+
method: "DELETE",
|
|
12
|
+
path: "/v1/organizations/{organizationSlug}/databases/{databaseName}",
|
|
13
|
+
}),
|
|
14
|
+
);
|
|
15
|
+
export type DeleteDatabaseInput = typeof DeleteDatabaseInput.Type;
|
|
16
|
+
|
|
17
|
+
// Output Schema
|
|
18
|
+
export const DeleteDatabaseOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
19
|
+
database: Schema.optional(Schema.String),
|
|
20
|
+
});
|
|
21
|
+
export type DeleteDatabaseOutput = typeof DeleteDatabaseOutput.Type;
|
|
22
|
+
|
|
23
|
+
// The operation
|
|
24
|
+
/**
|
|
25
|
+
* Delete Database
|
|
26
|
+
*
|
|
27
|
+
* Delete a database belonging to the organization or user.
|
|
28
|
+
*
|
|
29
|
+
* @param organizationSlug - The slug of the organization or user account.
|
|
30
|
+
* @param databaseName - The name of the database.
|
|
31
|
+
*/
|
|
32
|
+
export const deleteDatabase = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
33
|
+
inputSchema: DeleteDatabaseInput,
|
|
34
|
+
outputSchema: DeleteDatabaseOutput,
|
|
35
|
+
}));
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const DeleteGroupInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
8
|
+
groupName: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
}).pipe(
|
|
10
|
+
T.Http({
|
|
11
|
+
method: "DELETE",
|
|
12
|
+
path: "/v1/organizations/{organizationSlug}/groups/{groupName}",
|
|
13
|
+
}),
|
|
14
|
+
);
|
|
15
|
+
export type DeleteGroupInput = typeof DeleteGroupInput.Type;
|
|
16
|
+
|
|
17
|
+
// Output Schema
|
|
18
|
+
export const DeleteGroupOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
19
|
+
group: Schema.optional(
|
|
20
|
+
Schema.Struct({
|
|
21
|
+
name: Schema.optional(Schema.String),
|
|
22
|
+
version: Schema.optional(Schema.String),
|
|
23
|
+
uuid: Schema.optional(Schema.String),
|
|
24
|
+
locations: Schema.optional(Schema.Array(Schema.String)),
|
|
25
|
+
primary: Schema.optional(Schema.String),
|
|
26
|
+
delete_protection: Schema.optional(Schema.Boolean),
|
|
27
|
+
}),
|
|
28
|
+
),
|
|
29
|
+
});
|
|
30
|
+
export type DeleteGroupOutput = typeof DeleteGroupOutput.Type;
|
|
31
|
+
|
|
32
|
+
// The operation
|
|
33
|
+
/**
|
|
34
|
+
* Delete Group
|
|
35
|
+
*
|
|
36
|
+
* Delete a group belonging to the organization or user.
|
|
37
|
+
*
|
|
38
|
+
* @param organizationSlug - The slug of the organization or user account.
|
|
39
|
+
* @param groupName - The name of the group.
|
|
40
|
+
*/
|
|
41
|
+
export const deleteGroup = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
42
|
+
inputSchema: DeleteGroupInput,
|
|
43
|
+
outputSchema: DeleteGroupOutput,
|
|
44
|
+
}));
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const DeleteOrganizationInviteByEmailInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
email: Schema.String.pipe(T.PathParam()),
|
|
10
|
+
}).pipe(
|
|
11
|
+
T.Http({
|
|
12
|
+
method: "DELETE",
|
|
13
|
+
path: "/v1/organizations/{organizationSlug}/invites/{email}",
|
|
14
|
+
}),
|
|
15
|
+
);
|
|
16
|
+
export type DeleteOrganizationInviteByEmailInput =
|
|
17
|
+
typeof DeleteOrganizationInviteByEmailInput.Type;
|
|
18
|
+
|
|
19
|
+
// Output Schema
|
|
20
|
+
export const DeleteOrganizationInviteByEmailOutput =
|
|
21
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Void;
|
|
22
|
+
export type DeleteOrganizationInviteByEmailOutput =
|
|
23
|
+
typeof DeleteOrganizationInviteByEmailOutput.Type;
|
|
24
|
+
|
|
25
|
+
// The operation
|
|
26
|
+
/**
|
|
27
|
+
* Delete Invite
|
|
28
|
+
*
|
|
29
|
+
* Delete an invite for the organization by email.
|
|
30
|
+
*
|
|
31
|
+
* @param organizationSlug - The slug of the organization or user account.
|
|
32
|
+
*/
|
|
33
|
+
export const deleteOrganizationInviteByEmail =
|
|
34
|
+
/*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
35
|
+
inputSchema: DeleteOrganizationInviteByEmailInput,
|
|
36
|
+
outputSchema: DeleteOrganizationInviteByEmailOutput,
|
|
37
|
+
}));
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const GetDatabaseInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
8
|
+
databaseName: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
}).pipe(
|
|
10
|
+
T.Http({
|
|
11
|
+
method: "GET",
|
|
12
|
+
path: "/v1/organizations/{organizationSlug}/databases/{databaseName}",
|
|
13
|
+
}),
|
|
14
|
+
);
|
|
15
|
+
export type GetDatabaseInput = typeof GetDatabaseInput.Type;
|
|
16
|
+
|
|
17
|
+
// Output Schema
|
|
18
|
+
export const GetDatabaseOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
19
|
+
database: Schema.optional(
|
|
20
|
+
Schema.Struct({
|
|
21
|
+
Name: Schema.optional(Schema.String),
|
|
22
|
+
DbId: Schema.optional(Schema.String),
|
|
23
|
+
Hostname: Schema.optional(Schema.String),
|
|
24
|
+
block_reads: Schema.optional(Schema.Boolean),
|
|
25
|
+
block_writes: Schema.optional(Schema.Boolean),
|
|
26
|
+
regions: Schema.optional(Schema.Array(Schema.String)),
|
|
27
|
+
primaryRegion: Schema.optional(Schema.String),
|
|
28
|
+
group: Schema.optional(Schema.String),
|
|
29
|
+
delete_protection: Schema.optional(Schema.Boolean),
|
|
30
|
+
parent: Schema.optional(
|
|
31
|
+
Schema.NullOr(
|
|
32
|
+
Schema.Struct({
|
|
33
|
+
id: Schema.optional(Schema.String),
|
|
34
|
+
name: Schema.optional(Schema.String),
|
|
35
|
+
branched_at: Schema.optional(Schema.String),
|
|
36
|
+
}),
|
|
37
|
+
),
|
|
38
|
+
),
|
|
39
|
+
}),
|
|
40
|
+
),
|
|
41
|
+
});
|
|
42
|
+
export type GetDatabaseOutput = typeof GetDatabaseOutput.Type;
|
|
43
|
+
|
|
44
|
+
// The operation
|
|
45
|
+
/**
|
|
46
|
+
* Retrieve Database
|
|
47
|
+
*
|
|
48
|
+
* Returns a database belonging to the organization or user.
|
|
49
|
+
*
|
|
50
|
+
* @param organizationSlug - The slug of the organization or user account.
|
|
51
|
+
* @param databaseName - The name of the database.
|
|
52
|
+
*/
|
|
53
|
+
export const getDatabase = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
54
|
+
inputSchema: GetDatabaseInput,
|
|
55
|
+
outputSchema: GetDatabaseOutput,
|
|
56
|
+
}));
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const GetDatabaseConfigurationInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
databaseName: Schema.String.pipe(T.PathParam()),
|
|
10
|
+
}).pipe(
|
|
11
|
+
T.Http({
|
|
12
|
+
method: "GET",
|
|
13
|
+
path: "/v1/organizations/{organizationSlug}/databases/{databaseName}/configuration",
|
|
14
|
+
}),
|
|
15
|
+
);
|
|
16
|
+
export type GetDatabaseConfigurationInput =
|
|
17
|
+
typeof GetDatabaseConfigurationInput.Type;
|
|
18
|
+
|
|
19
|
+
// Output Schema
|
|
20
|
+
export const GetDatabaseConfigurationOutput =
|
|
21
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
22
|
+
size_limit: Schema.optional(Schema.String),
|
|
23
|
+
allow_attach: Schema.optional(Schema.Boolean),
|
|
24
|
+
block_reads: Schema.optional(Schema.Boolean),
|
|
25
|
+
block_writes: Schema.optional(Schema.Boolean),
|
|
26
|
+
delete_protection: Schema.optional(Schema.Boolean),
|
|
27
|
+
});
|
|
28
|
+
export type GetDatabaseConfigurationOutput =
|
|
29
|
+
typeof GetDatabaseConfigurationOutput.Type;
|
|
30
|
+
|
|
31
|
+
// The operation
|
|
32
|
+
/**
|
|
33
|
+
* Retrieve Database Configuration
|
|
34
|
+
*
|
|
35
|
+
* Retrieve an individual database configuration belonging to the organization or user.
|
|
36
|
+
*
|
|
37
|
+
* @param organizationSlug - The slug of the organization or user account.
|
|
38
|
+
* @param databaseName - The name of the database.
|
|
39
|
+
*/
|
|
40
|
+
export const getDatabaseConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
41
|
+
() => ({
|
|
42
|
+
inputSchema: GetDatabaseConfigurationInput,
|
|
43
|
+
outputSchema: GetDatabaseConfigurationOutput,
|
|
44
|
+
}),
|
|
45
|
+
);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const GetDatabaseInstanceInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
databaseName: Schema.String.pipe(T.PathParam()),
|
|
10
|
+
instanceName: Schema.String.pipe(T.PathParam()),
|
|
11
|
+
}).pipe(
|
|
12
|
+
T.Http({
|
|
13
|
+
method: "GET",
|
|
14
|
+
path: "/v1/organizations/{organizationSlug}/databases/{databaseName}/instances/{instanceName}",
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
17
|
+
export type GetDatabaseInstanceInput = typeof GetDatabaseInstanceInput.Type;
|
|
18
|
+
|
|
19
|
+
// Output Schema
|
|
20
|
+
export const GetDatabaseInstanceOutput =
|
|
21
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
22
|
+
instance: Schema.optional(
|
|
23
|
+
Schema.Struct({
|
|
24
|
+
uuid: Schema.optional(Schema.String),
|
|
25
|
+
name: Schema.optional(Schema.String),
|
|
26
|
+
type: Schema.optional(Schema.Literals(["primary", "replica"])),
|
|
27
|
+
region: Schema.optional(Schema.String),
|
|
28
|
+
hostname: Schema.optional(Schema.String),
|
|
29
|
+
}),
|
|
30
|
+
),
|
|
31
|
+
});
|
|
32
|
+
export type GetDatabaseInstanceOutput = typeof GetDatabaseInstanceOutput.Type;
|
|
33
|
+
|
|
34
|
+
// The operation
|
|
35
|
+
/**
|
|
36
|
+
* Retrieve Database Instance
|
|
37
|
+
*
|
|
38
|
+
* Return the individual database instance by name.
|
|
39
|
+
*
|
|
40
|
+
* @param organizationSlug - The slug of the organization or user account.
|
|
41
|
+
* @param databaseName - The name of the database.
|
|
42
|
+
* @param instanceName - The name of the instance (location code).
|
|
43
|
+
*/
|
|
44
|
+
export const getDatabaseInstance = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
45
|
+
inputSchema: GetDatabaseInstanceInput,
|
|
46
|
+
outputSchema: GetDatabaseInstanceOutput,
|
|
47
|
+
}));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const GetDatabaseStatsInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
8
|
+
databaseName: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
}).pipe(
|
|
10
|
+
T.Http({
|
|
11
|
+
method: "GET",
|
|
12
|
+
path: "/v1/organizations/{organizationSlug}/databases/{databaseName}/stats",
|
|
13
|
+
}),
|
|
14
|
+
);
|
|
15
|
+
export type GetDatabaseStatsInput = typeof GetDatabaseStatsInput.Type;
|
|
16
|
+
|
|
17
|
+
// Output Schema
|
|
18
|
+
export const GetDatabaseStatsOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
19
|
+
{
|
|
20
|
+
top_queries: Schema.optional(
|
|
21
|
+
Schema.NullOr(
|
|
22
|
+
Schema.Array(
|
|
23
|
+
Schema.Struct({
|
|
24
|
+
query: Schema.optional(Schema.String),
|
|
25
|
+
rows_read: Schema.optional(Schema.Number),
|
|
26
|
+
rows_written: Schema.optional(Schema.Number),
|
|
27
|
+
}),
|
|
28
|
+
),
|
|
29
|
+
),
|
|
30
|
+
),
|
|
31
|
+
},
|
|
32
|
+
);
|
|
33
|
+
export type GetDatabaseStatsOutput = typeof GetDatabaseStatsOutput.Type;
|
|
34
|
+
|
|
35
|
+
// The operation
|
|
36
|
+
/**
|
|
37
|
+
* Retrieve Database Stats
|
|
38
|
+
*
|
|
39
|
+
* Fetch the top queries of a database, including the count of rows read and written.
|
|
40
|
+
*
|
|
41
|
+
* @param organizationSlug - The slug of the organization or user account.
|
|
42
|
+
* @param databaseName - The name of the database.
|
|
43
|
+
*/
|
|
44
|
+
export const getDatabaseStats = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
45
|
+
inputSchema: GetDatabaseStatsInput,
|
|
46
|
+
outputSchema: GetDatabaseStatsOutput,
|
|
47
|
+
}));
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const GetDatabaseUsageInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
8
|
+
databaseName: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
from: Schema.optional(Schema.String),
|
|
10
|
+
to: Schema.optional(Schema.String),
|
|
11
|
+
}).pipe(
|
|
12
|
+
T.Http({
|
|
13
|
+
method: "GET",
|
|
14
|
+
path: "/v1/organizations/{organizationSlug}/databases/{databaseName}/usage",
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
17
|
+
export type GetDatabaseUsageInput = typeof GetDatabaseUsageInput.Type;
|
|
18
|
+
|
|
19
|
+
// Output Schema
|
|
20
|
+
export const GetDatabaseUsageOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
21
|
+
{
|
|
22
|
+
database: Schema.optional(
|
|
23
|
+
Schema.Struct({
|
|
24
|
+
uuid: Schema.optional(Schema.String),
|
|
25
|
+
instances: Schema.optional(
|
|
26
|
+
Schema.Array(
|
|
27
|
+
Schema.Struct({
|
|
28
|
+
uuid: Schema.optional(Schema.String),
|
|
29
|
+
usage: Schema.optional(
|
|
30
|
+
Schema.Struct({
|
|
31
|
+
rows_read: Schema.optional(Schema.Number),
|
|
32
|
+
rows_written: Schema.optional(Schema.Number),
|
|
33
|
+
storage_bytes: Schema.optional(Schema.Number),
|
|
34
|
+
bytes_synced: Schema.optional(Schema.Number),
|
|
35
|
+
}),
|
|
36
|
+
),
|
|
37
|
+
}),
|
|
38
|
+
),
|
|
39
|
+
),
|
|
40
|
+
total: Schema.optional(
|
|
41
|
+
Schema.Struct({
|
|
42
|
+
rows_read: Schema.optional(Schema.Number),
|
|
43
|
+
rows_written: Schema.optional(Schema.Number),
|
|
44
|
+
storage_bytes: Schema.optional(Schema.Number),
|
|
45
|
+
bytes_synced: Schema.optional(Schema.Number),
|
|
46
|
+
}),
|
|
47
|
+
),
|
|
48
|
+
}),
|
|
49
|
+
),
|
|
50
|
+
},
|
|
51
|
+
);
|
|
52
|
+
export type GetDatabaseUsageOutput = typeof GetDatabaseUsageOutput.Type;
|
|
53
|
+
|
|
54
|
+
// The operation
|
|
55
|
+
/**
|
|
56
|
+
* Retrieve Database Usage
|
|
57
|
+
*
|
|
58
|
+
* Fetch activity usage for a database in a given time period.
|
|
59
|
+
*
|
|
60
|
+
* @param organizationSlug - The slug of the organization or user account.
|
|
61
|
+
* @param databaseName - The name of the database.
|
|
62
|
+
* @param from - The datetime to retrieve usage **from** in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Defaults to the current calendar month if not provided. Example: `2023-01-01T00:00:00Z`
|
|
63
|
+
* @param to - The datetime to retrieve usage **to** in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Defaults to the current calendar month if not provided. Example: `2023-02-01T00:00:00Z`
|
|
64
|
+
*/
|
|
65
|
+
export const getDatabaseUsage = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
66
|
+
inputSchema: GetDatabaseUsageInput,
|
|
67
|
+
outputSchema: GetDatabaseUsageOutput,
|
|
68
|
+
}));
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const GetGroupInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
7
|
+
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
8
|
+
groupName: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
}).pipe(
|
|
10
|
+
T.Http({
|
|
11
|
+
method: "GET",
|
|
12
|
+
path: "/v1/organizations/{organizationSlug}/groups/{groupName}",
|
|
13
|
+
}),
|
|
14
|
+
);
|
|
15
|
+
export type GetGroupInput = typeof GetGroupInput.Type;
|
|
16
|
+
|
|
17
|
+
// Output Schema
|
|
18
|
+
export const GetGroupOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
19
|
+
group: Schema.optional(
|
|
20
|
+
Schema.Struct({
|
|
21
|
+
name: Schema.optional(Schema.String),
|
|
22
|
+
version: Schema.optional(Schema.String),
|
|
23
|
+
uuid: Schema.optional(Schema.String),
|
|
24
|
+
locations: Schema.optional(Schema.Array(Schema.String)),
|
|
25
|
+
primary: Schema.optional(Schema.String),
|
|
26
|
+
delete_protection: Schema.optional(Schema.Boolean),
|
|
27
|
+
}),
|
|
28
|
+
),
|
|
29
|
+
});
|
|
30
|
+
export type GetGroupOutput = typeof GetGroupOutput.Type;
|
|
31
|
+
|
|
32
|
+
// The operation
|
|
33
|
+
/**
|
|
34
|
+
* Retrieve Group
|
|
35
|
+
*
|
|
36
|
+
* Returns a group belonging to the organization or user.
|
|
37
|
+
*
|
|
38
|
+
* @param organizationSlug - The slug of the organization or user account.
|
|
39
|
+
* @param groupName - The name of the group.
|
|
40
|
+
*/
|
|
41
|
+
export const getGroup = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
42
|
+
inputSchema: GetGroupInput,
|
|
43
|
+
outputSchema: GetGroupOutput,
|
|
44
|
+
}));
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const GetGroupConfigurationInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
groupName: Schema.String.pipe(T.PathParam()),
|
|
10
|
+
}).pipe(
|
|
11
|
+
T.Http({
|
|
12
|
+
method: "GET",
|
|
13
|
+
path: "/v1/organizations/{organizationSlug}/groups/{groupName}/configuration",
|
|
14
|
+
}),
|
|
15
|
+
);
|
|
16
|
+
export type GetGroupConfigurationInput = typeof GetGroupConfigurationInput.Type;
|
|
17
|
+
|
|
18
|
+
// Output Schema
|
|
19
|
+
export const GetGroupConfigurationOutput =
|
|
20
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
21
|
+
delete_protection: Schema.optional(Schema.Boolean),
|
|
22
|
+
});
|
|
23
|
+
export type GetGroupConfigurationOutput =
|
|
24
|
+
typeof GetGroupConfigurationOutput.Type;
|
|
25
|
+
|
|
26
|
+
// The operation
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve Group Configuration
|
|
29
|
+
*
|
|
30
|
+
* Retrieve an individual group configuration belonging to the organization or user.
|
|
31
|
+
*
|
|
32
|
+
* @param organizationSlug - The slug of the organization or user account.
|
|
33
|
+
* @param groupName - The name of the group.
|
|
34
|
+
*/
|
|
35
|
+
export const getGroupConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
36
|
+
() => ({
|
|
37
|
+
inputSchema: GetGroupConfigurationInput,
|
|
38
|
+
outputSchema: GetGroupConfigurationOutput,
|
|
39
|
+
}),
|
|
40
|
+
);
|