@distilled.cloud/planetscale 0.8.0 → 0.10.0
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 +2 -2
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +2 -2
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts +2 -2
- package/lib/operations/checkDeployRequestStorage.d.ts +32 -0
- package/lib/operations/checkDeployRequestStorage.d.ts.map +1 -0
- package/lib/operations/checkDeployRequestStorage.js +45 -0
- package/lib/operations/checkDeployRequestStorage.js.map +1 -0
- package/lib/operations/createBackup.d.ts +1 -0
- package/lib/operations/createBackup.d.ts.map +1 -1
- package/lib/operations/createBackup.js +1 -0
- package/lib/operations/createBackup.js.map +1 -1
- package/lib/operations/createBackupPolicy.d.ts +51 -0
- package/lib/operations/createBackupPolicy.d.ts.map +1 -0
- package/lib/operations/createBackupPolicy.js +64 -0
- package/lib/operations/createBackupPolicy.js.map +1 -0
- package/lib/operations/createBranch.d.ts +4 -0
- package/lib/operations/createBranch.d.ts.map +1 -1
- package/lib/operations/createBranch.js +4 -0
- package/lib/operations/createBranch.js.map +1 -1
- package/lib/operations/createDatabase.d.ts +4 -0
- package/lib/operations/createDatabase.d.ts.map +1 -1
- package/lib/operations/createDatabase.js +4 -0
- package/lib/operations/createDatabase.js.map +1 -1
- package/lib/operations/createTrafficBudget.d.ts +70 -0
- package/lib/operations/createTrafficBudget.d.ts.map +1 -0
- package/lib/operations/createTrafficBudget.js +83 -0
- package/lib/operations/createTrafficBudget.js.map +1 -0
- package/lib/operations/createTrafficRule.d.ts +47 -0
- package/lib/operations/createTrafficRule.d.ts.map +1 -0
- package/lib/operations/createTrafficRule.js +59 -0
- package/lib/operations/createTrafficRule.js.map +1 -0
- package/lib/operations/deleteBackupPolicy.d.ts +18 -0
- package/lib/operations/deleteBackupPolicy.d.ts.map +1 -0
- package/lib/operations/deleteBackupPolicy.js +30 -0
- package/lib/operations/deleteBackupPolicy.js.map +1 -0
- package/lib/operations/deleteBranch.d.ts +2 -0
- package/lib/operations/deleteBranch.d.ts.map +1 -1
- package/lib/operations/deleteBranch.js +2 -0
- package/lib/operations/deleteBranch.js.map +1 -1
- package/lib/operations/deleteTrafficBudget.d.ts +20 -0
- package/lib/operations/deleteTrafficBudget.d.ts.map +1 -0
- package/lib/operations/deleteTrafficBudget.js +33 -0
- package/lib/operations/deleteTrafficBudget.js.map +1 -0
- package/lib/operations/deleteTrafficRule.d.ts +22 -0
- package/lib/operations/deleteTrafficRule.d.ts.map +1 -0
- package/lib/operations/deleteTrafficRule.js +33 -0
- package/lib/operations/deleteTrafficRule.js.map +1 -0
- package/lib/operations/getBackup.d.ts +1 -0
- package/lib/operations/getBackup.d.ts.map +1 -1
- package/lib/operations/getBackup.js +1 -0
- package/lib/operations/getBackup.js.map +1 -1
- package/lib/operations/getBackupPolicy.d.ts +35 -0
- package/lib/operations/getBackupPolicy.d.ts.map +1 -0
- package/lib/operations/getBackupPolicy.js +46 -0
- package/lib/operations/getBackupPolicy.js.map +1 -0
- package/lib/operations/getDeployQueue.d.ts +4 -0
- package/lib/operations/getDeployQueue.d.ts.map +1 -1
- package/lib/operations/getDeployQueue.js +4 -0
- package/lib/operations/getDeployQueue.js.map +1 -1
- package/lib/operations/getMaintenanceSchedule.d.ts +37 -0
- package/lib/operations/getMaintenanceSchedule.d.ts.map +1 -0
- package/lib/operations/getMaintenanceSchedule.js +50 -0
- package/lib/operations/getMaintenanceSchedule.js.map +1 -0
- package/lib/operations/getTrafficBudget.d.ts +56 -0
- package/lib/operations/getTrafficBudget.d.ts.map +1 -0
- package/lib/operations/getTrafficBudget.js +67 -0
- package/lib/operations/getTrafficBudget.js.map +1 -0
- package/lib/operations/index.d.ts +16 -0
- package/lib/operations/index.d.ts.map +1 -1
- package/lib/operations/index.js +16 -0
- package/lib/operations/index.js.map +1 -1
- package/lib/operations/listAuditLogs.d.ts +6 -0
- package/lib/operations/listAuditLogs.d.ts.map +1 -1
- package/lib/operations/listAuditLogs.js +6 -0
- package/lib/operations/listAuditLogs.js.map +1 -1
- package/lib/operations/listBackupPolicies.d.ts +44 -0
- package/lib/operations/listBackupPolicies.d.ts.map +1 -0
- package/lib/operations/listBackupPolicies.js +57 -0
- package/lib/operations/listBackupPolicies.js.map +1 -0
- package/lib/operations/listBackups.d.ts +1 -0
- package/lib/operations/listBackups.d.ts.map +1 -1
- package/lib/operations/listBackups.js +1 -0
- package/lib/operations/listBackups.js.map +1 -1
- package/lib/operations/listDeployRequestReviews.d.ts +4 -0
- package/lib/operations/listDeployRequestReviews.d.ts.map +1 -1
- package/lib/operations/listDeployRequestReviews.js +4 -0
- package/lib/operations/listDeployRequestReviews.js.map +1 -1
- package/lib/operations/listGeneratedQueryPatternsReports.d.ts +6 -0
- package/lib/operations/listGeneratedQueryPatternsReports.d.ts.map +1 -1
- package/lib/operations/listGeneratedQueryPatternsReports.js +6 -0
- package/lib/operations/listGeneratedQueryPatternsReports.js.map +1 -1
- package/lib/operations/listMaintenanceSchedules.d.ts +46 -0
- package/lib/operations/listMaintenanceSchedules.d.ts.map +1 -0
- package/lib/operations/listMaintenanceSchedules.js +59 -0
- package/lib/operations/listMaintenanceSchedules.js.map +1 -0
- package/lib/operations/listMaintenanceWindows.d.ts +35 -0
- package/lib/operations/listMaintenanceWindows.d.ts.map +1 -0
- package/lib/operations/listMaintenanceWindows.js +48 -0
- package/lib/operations/listMaintenanceWindows.js.map +1 -0
- package/lib/operations/listOrganizationTeamMembers.d.ts +4 -0
- package/lib/operations/listOrganizationTeamMembers.d.ts.map +1 -1
- package/lib/operations/listOrganizationTeamMembers.js +4 -0
- package/lib/operations/listOrganizationTeamMembers.js.map +1 -1
- package/lib/operations/listOrganizationTeams.d.ts +4 -0
- package/lib/operations/listOrganizationTeams.d.ts.map +1 -1
- package/lib/operations/listOrganizationTeams.js +4 -0
- package/lib/operations/listOrganizationTeams.js.map +1 -1
- package/lib/operations/listSchemaRecommendations.d.ts +4 -0
- package/lib/operations/listSchemaRecommendations.d.ts.map +1 -1
- package/lib/operations/listSchemaRecommendations.js +4 -0
- package/lib/operations/listSchemaRecommendations.js.map +1 -1
- package/lib/operations/listTrafficBudgets.d.ts +71 -0
- package/lib/operations/listTrafficBudgets.d.ts.map +1 -0
- package/lib/operations/listTrafficBudgets.js +84 -0
- package/lib/operations/listTrafficBudgets.js.map +1 -0
- package/lib/operations/updateBackup.d.ts +1 -0
- package/lib/operations/updateBackup.d.ts.map +1 -1
- package/lib/operations/updateBackup.js +1 -0
- package/lib/operations/updateBackup.js.map +1 -1
- package/lib/operations/updateBackupPolicy.d.ts +53 -0
- package/lib/operations/updateBackupPolicy.d.ts.map +1 -0
- package/lib/operations/updateBackupPolicy.js +66 -0
- package/lib/operations/updateBackupPolicy.js.map +1 -0
- package/lib/operations/updateTrafficBudget.d.ts +72 -0
- package/lib/operations/updateTrafficBudget.d.ts.map +1 -0
- package/lib/operations/updateTrafficBudget.js +85 -0
- package/lib/operations/updateTrafficBudget.js.map +1 -0
- package/lib/retry.d.ts +2 -2
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +2 -2
- package/lib/retry.js.map +1 -1
- package/package.json +4 -4
- package/src/credentials.ts +2 -2
- package/src/operations/checkDeployRequestStorage.ts +61 -0
- package/src/operations/createBackup.ts +1 -0
- package/src/operations/createBackupPolicy.ts +74 -0
- package/src/operations/createBranch.ts +6 -0
- package/src/operations/createDatabase.ts +6 -0
- package/src/operations/createTrafficBudget.ts +93 -0
- package/src/operations/createTrafficRule.ts +69 -0
- package/src/operations/deleteBackupPolicy.ts +36 -0
- package/src/operations/deleteBranch.ts +2 -0
- package/src/operations/deleteTrafficBudget.ts +39 -0
- package/src/operations/deleteTrafficRule.ts +41 -0
- package/src/operations/getBackup.ts +1 -0
- package/src/operations/getBackupPolicy.ts +52 -0
- package/src/operations/getDeployQueue.ts +4 -0
- package/src/operations/getMaintenanceSchedule.ts +60 -0
- package/src/operations/getTrafficBudget.ts +79 -0
- package/src/operations/index.ts +16 -0
- package/src/operations/listAuditLogs.ts +6 -0
- package/src/operations/listBackupPolicies.ts +65 -0
- package/src/operations/listBackups.ts +1 -0
- package/src/operations/listDeployRequestReviews.ts +4 -0
- package/src/operations/listGeneratedQueryPatternsReports.ts +6 -0
- package/src/operations/listMaintenanceSchedules.ts +71 -0
- package/src/operations/listMaintenanceWindows.ts +60 -0
- package/src/operations/listOrganizationTeamMembers.ts +4 -0
- package/src/operations/listOrganizationTeams.ts +4 -0
- package/src/operations/listSchemaRecommendations.ts +4 -0
- package/src/operations/listTrafficBudgets.ts +96 -0
- package/src/operations/updateBackup.ts +1 -0
- package/src/operations/updateBackupPolicy.ts +76 -0
- package/src/operations/updateTrafficBudget.ts +95 -0
- package/src/retry.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateBackup.js","sourceRoot":"","sources":["../../src/operations/updateBackup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,KAAK,CAAC,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEhD,eAAe;AACf,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;IACzE,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAC/C,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IACzC,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;QACjB,IAAI,EAAE,MAAM,CAAC,MAAM;QACnB,UAAU,EAAE,MAAM,CAAC,MAAM;QACzB,UAAU,EAAE,MAAM,CAAC,MAAM;QACzB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;QACvC,GAAG,EAAE,MAAM,CAAC,MAAM;KACnB,CAAC;IACF,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC;QAC7B,EAAE,EAAE,MAAM,CAAC,MAAM;QACjB,IAAI,EAAE,MAAM,CAAC,MAAM;QACnB,UAAU,EAAE,MAAM,CAAC,MAAM;QACzB,UAAU,EAAE,MAAM,CAAC,MAAM;QACzB,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;KACzC,CAAC;CACH,CAAC,CAAC;AAGH,gBAAgB;AAChB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACtE,WAAW,EAAE,iBAAiB;IAC9B,YAAY,EAAE,kBAAkB;IAChC,MAAM,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAU;CACvC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
export declare const UpdateBackupPolicyInput: Schema.Struct<{
|
|
3
|
+
readonly id: Schema.String;
|
|
4
|
+
readonly organization: Schema.String;
|
|
5
|
+
readonly database: Schema.String;
|
|
6
|
+
readonly name: Schema.optional<Schema.String>;
|
|
7
|
+
readonly target: Schema.optional<Schema.Literals<readonly ["production", "development"]>>;
|
|
8
|
+
readonly retention_value: Schema.optional<Schema.Number>;
|
|
9
|
+
readonly retention_unit: Schema.optional<Schema.Literals<readonly ["hour", "day", "week", "month", "year"]>>;
|
|
10
|
+
readonly frequency_value: Schema.optional<Schema.Number>;
|
|
11
|
+
readonly frequency_unit: Schema.optional<Schema.Literals<readonly ["hour", "day", "week", "month"]>>;
|
|
12
|
+
readonly schedule_time: Schema.optional<Schema.String>;
|
|
13
|
+
readonly schedule_day: Schema.optional<Schema.Number>;
|
|
14
|
+
readonly schedule_week: Schema.optional<Schema.Number>;
|
|
15
|
+
}>;
|
|
16
|
+
export type UpdateBackupPolicyInput = typeof UpdateBackupPolicyInput.Type;
|
|
17
|
+
export declare const UpdateBackupPolicyOutput: Schema.Struct<{
|
|
18
|
+
readonly id: Schema.String;
|
|
19
|
+
readonly display_name: Schema.String;
|
|
20
|
+
readonly name: Schema.String;
|
|
21
|
+
readonly target: Schema.Literals<readonly ["production", "development"]>;
|
|
22
|
+
readonly retention_value: Schema.Number;
|
|
23
|
+
readonly retention_unit: Schema.String;
|
|
24
|
+
readonly frequency_value: Schema.Number;
|
|
25
|
+
readonly frequency_unit: Schema.String;
|
|
26
|
+
readonly schedule_time: Schema.String;
|
|
27
|
+
readonly schedule_day: Schema.Number;
|
|
28
|
+
readonly schedule_week: Schema.Number;
|
|
29
|
+
readonly created_at: Schema.String;
|
|
30
|
+
readonly updated_at: Schema.String;
|
|
31
|
+
readonly last_ran_at: Schema.String;
|
|
32
|
+
readonly next_run_at: Schema.String;
|
|
33
|
+
readonly required: Schema.Boolean;
|
|
34
|
+
}>;
|
|
35
|
+
export type UpdateBackupPolicyOutput = typeof UpdateBackupPolicyOutput.Type;
|
|
36
|
+
/**
|
|
37
|
+
* Update a backup policy
|
|
38
|
+
*
|
|
39
|
+
* @param id - The ID of the backup policy
|
|
40
|
+
* @param organization - Organization name slug from `list_organizations`. Example: `acme`.
|
|
41
|
+
* @param database - Database name slug from `list_databases`. Example: `app-db`.
|
|
42
|
+
* @param name - The name of the backup policy
|
|
43
|
+
* @param target - Whether the policy is for production or development branches
|
|
44
|
+
* @param retention_value - A number value for the retention period of the backup policy
|
|
45
|
+
* @param retention_unit - The unit for the retention period of the backup policy
|
|
46
|
+
* @param frequency_value - A number value for the frequency of the backup policy
|
|
47
|
+
* @param frequency_unit - The unit for the frequency of the backup policy
|
|
48
|
+
* @param schedule_time - The time of day that the backup is scheduled, in HH:MM format
|
|
49
|
+
* @param schedule_day - Day of the week that the backup is scheduled. 0 is Sunday, 6 is Saturday
|
|
50
|
+
* @param schedule_week - Week of the month that the backup is scheduled. 0 is the first week, 3 is the fourth week
|
|
51
|
+
*/
|
|
52
|
+
export declare const updateBackupPolicy: any;
|
|
53
|
+
//# sourceMappingURL=updateBackupPolicy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateBackupPolicy.d.ts","sourceRoot":"","sources":["../../src/operations/updateBackupPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;EAuBjC,CAAC;AACJ,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAC,IAAI,CAAC;AAG1E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;EAkBjC,CAAC;AACL,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAC,IAAI,CAAC;AAG5E;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,kBAAkB,KAI5B,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
import { Forbidden, NotFound } from "../errors";
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const UpdateBackupPolicyInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
id: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
organization: Schema.String.pipe(T.PathParam()),
|
|
10
|
+
database: Schema.String.pipe(T.PathParam()),
|
|
11
|
+
name: Schema.optional(Schema.String),
|
|
12
|
+
target: Schema.optional(Schema.Literals(["production", "development"])),
|
|
13
|
+
retention_value: Schema.optional(Schema.Number),
|
|
14
|
+
retention_unit: Schema.optional(Schema.Literals(["hour", "day", "week", "month", "year"])),
|
|
15
|
+
frequency_value: Schema.optional(Schema.Number),
|
|
16
|
+
frequency_unit: Schema.optional(Schema.Literals(["hour", "day", "week", "month"])),
|
|
17
|
+
schedule_time: Schema.optional(Schema.String),
|
|
18
|
+
schedule_day: Schema.optional(Schema.Number),
|
|
19
|
+
schedule_week: Schema.optional(Schema.Number),
|
|
20
|
+
}).pipe(T.Http({
|
|
21
|
+
method: "PATCH",
|
|
22
|
+
path: "/organizations/{organization}/databases/{database}/backup-policies/{id}",
|
|
23
|
+
}));
|
|
24
|
+
// Output Schema
|
|
25
|
+
export const UpdateBackupPolicyOutput =
|
|
26
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
27
|
+
id: Schema.String,
|
|
28
|
+
display_name: Schema.String,
|
|
29
|
+
name: Schema.String,
|
|
30
|
+
target: Schema.Literals(["production", "development"]),
|
|
31
|
+
retention_value: Schema.Number,
|
|
32
|
+
retention_unit: Schema.String,
|
|
33
|
+
frequency_value: Schema.Number,
|
|
34
|
+
frequency_unit: Schema.String,
|
|
35
|
+
schedule_time: Schema.String,
|
|
36
|
+
schedule_day: Schema.Number,
|
|
37
|
+
schedule_week: Schema.Number,
|
|
38
|
+
created_at: Schema.String,
|
|
39
|
+
updated_at: Schema.String,
|
|
40
|
+
last_ran_at: Schema.String,
|
|
41
|
+
next_run_at: Schema.String,
|
|
42
|
+
required: Schema.Boolean,
|
|
43
|
+
});
|
|
44
|
+
// The operation
|
|
45
|
+
/**
|
|
46
|
+
* Update a backup policy
|
|
47
|
+
*
|
|
48
|
+
* @param id - The ID of the backup policy
|
|
49
|
+
* @param organization - Organization name slug from `list_organizations`. Example: `acme`.
|
|
50
|
+
* @param database - Database name slug from `list_databases`. Example: `app-db`.
|
|
51
|
+
* @param name - The name of the backup policy
|
|
52
|
+
* @param target - Whether the policy is for production or development branches
|
|
53
|
+
* @param retention_value - A number value for the retention period of the backup policy
|
|
54
|
+
* @param retention_unit - The unit for the retention period of the backup policy
|
|
55
|
+
* @param frequency_value - A number value for the frequency of the backup policy
|
|
56
|
+
* @param frequency_unit - The unit for the frequency of the backup policy
|
|
57
|
+
* @param schedule_time - The time of day that the backup is scheduled, in HH:MM format
|
|
58
|
+
* @param schedule_day - Day of the week that the backup is scheduled. 0 is Sunday, 6 is Saturday
|
|
59
|
+
* @param schedule_week - Week of the month that the backup is scheduled. 0 is the first week, 3 is the fourth week
|
|
60
|
+
*/
|
|
61
|
+
export const updateBackupPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
62
|
+
inputSchema: UpdateBackupPolicyInput,
|
|
63
|
+
outputSchema: UpdateBackupPolicyOutput,
|
|
64
|
+
errors: [Forbidden, NotFound],
|
|
65
|
+
}));
|
|
66
|
+
//# sourceMappingURL=updateBackupPolicy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateBackupPolicy.js","sourceRoot":"","sources":["../../src/operations/updateBackupPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,KAAK,CAAC,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEhD,eAAe;AACf,MAAM,CAAC,MAAM,uBAAuB;AAClC,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAC/C,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CA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Ae,EAAE,MAAM,CAAC,MAAM;IAC9B,cAAc,EAAE,MAAM,CAAC,MAAM;IAC7B,eAAe,EAAE,MAAM,CAAC,MAAM;IAC9B,cAAc,EAAE,MAAM,CAAC,MAAM;IAC7B,aAAa,EAAE,MAAM,CAAC,MAAM;IAC5B,YAAY,EAAE,MAAM,CAAC,MAAM;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM;IAC5B,UAAU,EAAE,MAAM,CAAC,MAAM;IACzB,UAAU,EAAE,MAAM,CAAC,MAAM;IACzB,WAAW,EAAE,MAAM,CAAC,MAAM;IAC1B,WAAW,EAAE,MAAM,CAAC,MAAM;IAC1B,QAAQ,EAAE,MAAM,CAAC,OAAO;CACzB,CAAC,CAAC;AAGL,gBAAgB;AAChB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC5E,WAAW,EAAE,uBAAuB;IACpC,YAAY,EAAE,wBAAwB;IACtC,MAAM,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAU;CACvC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
export declare const UpdateTrafficBudgetInput: Schema.Struct<{
|
|
3
|
+
readonly organization: Schema.String;
|
|
4
|
+
readonly database: Schema.String;
|
|
5
|
+
readonly branch: Schema.String;
|
|
6
|
+
readonly id: Schema.String;
|
|
7
|
+
readonly name: Schema.optional<Schema.String>;
|
|
8
|
+
readonly mode: Schema.optional<Schema.Literals<readonly ["enforce", "warn", "off"]>>;
|
|
9
|
+
readonly capacity: Schema.optional<Schema.Number>;
|
|
10
|
+
readonly rate: Schema.optional<Schema.Number>;
|
|
11
|
+
readonly burst: Schema.optional<Schema.Number>;
|
|
12
|
+
readonly concurrency: Schema.optional<Schema.Number>;
|
|
13
|
+
readonly warning_threshold: Schema.optional<Schema.Number>;
|
|
14
|
+
readonly rules: Schema.optional<Schema.$Array<Schema.String>>;
|
|
15
|
+
}>;
|
|
16
|
+
export type UpdateTrafficBudgetInput = typeof UpdateTrafficBudgetInput.Type;
|
|
17
|
+
export declare const UpdateTrafficBudgetOutput: Schema.Struct<{
|
|
18
|
+
readonly id: Schema.String;
|
|
19
|
+
readonly name: Schema.String;
|
|
20
|
+
readonly mode: Schema.Literals<readonly ["enforce", "warn", "off"]>;
|
|
21
|
+
readonly capacity: Schema.optional<Schema.Number>;
|
|
22
|
+
readonly rate: Schema.optional<Schema.Number>;
|
|
23
|
+
readonly burst: Schema.optional<Schema.Number>;
|
|
24
|
+
readonly concurrency: Schema.optional<Schema.Number>;
|
|
25
|
+
readonly warning_threshold: Schema.optional<Schema.Number>;
|
|
26
|
+
readonly actor: Schema.Struct<{
|
|
27
|
+
readonly id: Schema.String;
|
|
28
|
+
readonly display_name: Schema.String;
|
|
29
|
+
readonly avatar_url: Schema.String;
|
|
30
|
+
}>;
|
|
31
|
+
readonly rules: Schema.$Array<Schema.Struct<{
|
|
32
|
+
readonly id: Schema.String;
|
|
33
|
+
readonly kind: Schema.Literals<readonly ["match"]>;
|
|
34
|
+
readonly tags: Schema.$Array<Schema.Struct<{
|
|
35
|
+
readonly key_id: Schema.String;
|
|
36
|
+
readonly key: Schema.String;
|
|
37
|
+
readonly value: Schema.String;
|
|
38
|
+
readonly source: Schema.Literals<readonly ["sql", "system"]>;
|
|
39
|
+
}>>;
|
|
40
|
+
readonly fingerprint: Schema.optional<Schema.String>;
|
|
41
|
+
readonly keyspace: Schema.optional<Schema.String>;
|
|
42
|
+
readonly actor: Schema.Struct<{
|
|
43
|
+
readonly id: Schema.String;
|
|
44
|
+
readonly display_name: Schema.String;
|
|
45
|
+
readonly avatar_url: Schema.String;
|
|
46
|
+
}>;
|
|
47
|
+
readonly syntax_highlighted_sql: Schema.String;
|
|
48
|
+
readonly created_at: Schema.String;
|
|
49
|
+
readonly updated_at: Schema.String;
|
|
50
|
+
}>>;
|
|
51
|
+
readonly created_at: Schema.String;
|
|
52
|
+
readonly updated_at: Schema.String;
|
|
53
|
+
}>;
|
|
54
|
+
export type UpdateTrafficBudgetOutput = typeof UpdateTrafficBudgetOutput.Type;
|
|
55
|
+
/**
|
|
56
|
+
* Update a traffic budget
|
|
57
|
+
*
|
|
58
|
+
* @param organization - Organization name slug from `list_organizations`. Example: `acme`.
|
|
59
|
+
* @param database - Database name slug from `list_databases`. Example: `app-db`.
|
|
60
|
+
* @param branch - Branch name from `list_branches`. Example: `main`.
|
|
61
|
+
* @param id - The ID of the traffic budget
|
|
62
|
+
* @param name - Name of the traffic budget
|
|
63
|
+
* @param mode - The mode of the traffic budget
|
|
64
|
+
* @param capacity - The maximum capacity that can be banked, measured as a percentage of seconds of full server usage (0-6000). Unlimited when not set.
|
|
65
|
+
* @param rate - The rate at which capacity refills, as a percentage of server resources (0-100). Unlimited when not set.
|
|
66
|
+
* @param burst - The maximum capacity a single query can consume, measured as a percentage of seconds of full server usage (0-6000). Unlimited when not set.
|
|
67
|
+
* @param concurrency - The percentage of available worker processes this policy can use (0-100). Unlimited when not set.
|
|
68
|
+
* @param warning_threshold - A percentage of capacity, burst, or concurrency thresholds to emit warnings for enforced budgets (0-100).
|
|
69
|
+
* @param rules - Array of traffic rules to apply to the budget
|
|
70
|
+
*/
|
|
71
|
+
export declare const updateTrafficBudget: any;
|
|
72
|
+
//# sourceMappingURL=updateTrafficBudget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateTrafficBudget.d.ts","sourceRoot":"","sources":["../../src/operations/updateTrafficBudget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;EAmBlC,CAAC;AACJ,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAC,IAAI,CAAC;AAG5E,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyClC,CAAC;AACL,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAC,IAAI,CAAC;AAG9E;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,mBAAmB,KAI7B,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
import { Forbidden, NotFound } from "../errors";
|
|
5
|
+
// Input Schema
|
|
6
|
+
export const UpdateTrafficBudgetInput =
|
|
7
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
8
|
+
organization: Schema.String.pipe(T.PathParam()),
|
|
9
|
+
database: Schema.String.pipe(T.PathParam()),
|
|
10
|
+
branch: Schema.String.pipe(T.PathParam()),
|
|
11
|
+
id: Schema.String.pipe(T.PathParam()),
|
|
12
|
+
name: Schema.optional(Schema.String),
|
|
13
|
+
mode: Schema.optional(Schema.Literals(["enforce", "warn", "off"])),
|
|
14
|
+
capacity: Schema.optional(Schema.Number),
|
|
15
|
+
rate: Schema.optional(Schema.Number),
|
|
16
|
+
burst: Schema.optional(Schema.Number),
|
|
17
|
+
concurrency: Schema.optional(Schema.Number),
|
|
18
|
+
warning_threshold: Schema.optional(Schema.Number),
|
|
19
|
+
rules: Schema.optional(Schema.Array(Schema.String)),
|
|
20
|
+
}).pipe(T.Http({
|
|
21
|
+
method: "PATCH",
|
|
22
|
+
path: "/organizations/{organization}/databases/{database}/branches/{branch}/traffic/budgets/{id}",
|
|
23
|
+
}));
|
|
24
|
+
// Output Schema
|
|
25
|
+
export const UpdateTrafficBudgetOutput =
|
|
26
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
27
|
+
id: Schema.String,
|
|
28
|
+
name: Schema.String,
|
|
29
|
+
mode: Schema.Literals(["enforce", "warn", "off"]),
|
|
30
|
+
capacity: Schema.optional(Schema.Number),
|
|
31
|
+
rate: Schema.optional(Schema.Number),
|
|
32
|
+
burst: Schema.optional(Schema.Number),
|
|
33
|
+
concurrency: Schema.optional(Schema.Number),
|
|
34
|
+
warning_threshold: Schema.optional(Schema.Number),
|
|
35
|
+
actor: Schema.Struct({
|
|
36
|
+
id: Schema.String,
|
|
37
|
+
display_name: Schema.String,
|
|
38
|
+
avatar_url: Schema.String,
|
|
39
|
+
}),
|
|
40
|
+
rules: Schema.Array(Schema.Struct({
|
|
41
|
+
id: Schema.String,
|
|
42
|
+
kind: Schema.Literals(["match"]),
|
|
43
|
+
tags: Schema.Array(Schema.Struct({
|
|
44
|
+
key_id: Schema.String,
|
|
45
|
+
key: Schema.String,
|
|
46
|
+
value: Schema.String,
|
|
47
|
+
source: Schema.Literals(["sql", "system"]),
|
|
48
|
+
})),
|
|
49
|
+
fingerprint: Schema.optional(Schema.String),
|
|
50
|
+
keyspace: Schema.optional(Schema.String),
|
|
51
|
+
actor: Schema.Struct({
|
|
52
|
+
id: Schema.String,
|
|
53
|
+
display_name: Schema.String,
|
|
54
|
+
avatar_url: Schema.String,
|
|
55
|
+
}),
|
|
56
|
+
syntax_highlighted_sql: Schema.String,
|
|
57
|
+
created_at: Schema.String,
|
|
58
|
+
updated_at: Schema.String,
|
|
59
|
+
})),
|
|
60
|
+
created_at: Schema.String,
|
|
61
|
+
updated_at: Schema.String,
|
|
62
|
+
});
|
|
63
|
+
// The operation
|
|
64
|
+
/**
|
|
65
|
+
* Update a traffic budget
|
|
66
|
+
*
|
|
67
|
+
* @param organization - Organization name slug from `list_organizations`. Example: `acme`.
|
|
68
|
+
* @param database - Database name slug from `list_databases`. Example: `app-db`.
|
|
69
|
+
* @param branch - Branch name from `list_branches`. Example: `main`.
|
|
70
|
+
* @param id - The ID of the traffic budget
|
|
71
|
+
* @param name - Name of the traffic budget
|
|
72
|
+
* @param mode - The mode of the traffic budget
|
|
73
|
+
* @param capacity - The maximum capacity that can be banked, measured as a percentage of seconds of full server usage (0-6000). Unlimited when not set.
|
|
74
|
+
* @param rate - The rate at which capacity refills, as a percentage of server resources (0-100). Unlimited when not set.
|
|
75
|
+
* @param burst - The maximum capacity a single query can consume, measured as a percentage of seconds of full server usage (0-6000). Unlimited when not set.
|
|
76
|
+
* @param concurrency - The percentage of available worker processes this policy can use (0-100). Unlimited when not set.
|
|
77
|
+
* @param warning_threshold - A percentage of capacity, burst, or concurrency thresholds to emit warnings for enforced budgets (0-100).
|
|
78
|
+
* @param rules - Array of traffic rules to apply to the budget
|
|
79
|
+
*/
|
|
80
|
+
export const updateTrafficBudget = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
81
|
+
inputSchema: UpdateTrafficBudgetInput,
|
|
82
|
+
outputSchema: UpdateTrafficBudgetOutput,
|
|
83
|
+
errors: [Forbidden, NotFound],
|
|
84
|
+
}));
|
|
85
|
+
//# sourceMappingURL=updateTrafficBudget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateTrafficBudget.js","sourceRoot":"","sources":["../../src/operations/updateTrafficBudget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,KAAK,CAAC,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEhD,eAAe;AACf,MAAM,CAAC,MAAM,wBAAwB;AACnC,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;IACxC,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAC/C,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,E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C,MAAM;KAC1B,CAAC,CACH;IACD,UAAU,EAAE,MAAM,CAAC,MAAM;IACzB,UAAU,EAAE,MAAM,CAAC,MAAM;CAC1B,CAAC,CAAC;AAGL,gBAAgB;AAChB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7E,WAAW,EAAE,wBAAwB;IACrC,YAAY,EAAE,yBAAyB;IACvC,MAAM,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAU;CACvC,CAAC,CAAC,CAAC"}
|
package/lib/retry.d.ts
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Re-exports shared retry utilities and provides a PlanetScale-specific Retry service.
|
|
5
5
|
*/
|
|
6
6
|
import * as Effect from "effect/Effect";
|
|
7
|
-
import * as
|
|
7
|
+
import * as Context from "effect/Context";
|
|
8
8
|
export { type Options, type Factory, type Policy, makeDefault, jittered, capped, throttlingOptions, transientOptions, } from "@distilled.cloud/core/retry";
|
|
9
9
|
import type { Policy } from "@distilled.cloud/core/retry";
|
|
10
|
-
declare const Retry_base:
|
|
10
|
+
declare const Retry_base: Context.ServiceClass<Retry, "PlanetScaleRetry", Policy>;
|
|
11
11
|
/**
|
|
12
12
|
* Context tag for configuring retry behavior of PlanetScale API calls.
|
|
13
13
|
*/
|
package/lib/retry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;;AAE1D;;GAEG;AACH,qBAAa,KAAM,SAAQ,UAE1B;CAAG;AAEJ;;GAEG;AACH,eAAO,MAAM,MAAM,qBAAsB,MAAM,sFACS,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,IAAI,mFAEhB,CAAC"}
|
package/lib/retry.js
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as Effect from "effect/Effect";
|
|
7
7
|
import * as Layer from "effect/Layer";
|
|
8
|
-
import * as
|
|
8
|
+
import * as Context from "effect/Context";
|
|
9
9
|
export { makeDefault, jittered, capped, throttlingOptions, transientOptions, } from "@distilled.cloud/core/retry";
|
|
10
10
|
/**
|
|
11
11
|
* Context tag for configuring retry behavior of PlanetScale API calls.
|
|
12
12
|
*/
|
|
13
|
-
export class Retry extends
|
|
13
|
+
export class Retry extends Context.Service()("PlanetScaleRetry") {
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Provides a custom retry policy to all PlanetScale API calls.
|
package/lib/retry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAIL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAGrC;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,OAAO,CAAC,OAAO,EAAiB,CACzD,kBAAkB,CACnB;CAAG;AAEJ;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,gBAAwB,EAAE,EAAE,CACjD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEzD;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAChC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CAC7C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@distilled.cloud/planetscale",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/alchemy-run/distilled",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"specs:update": "git -C specs/distilled-spec-planetscale fetch && git -C specs/distilled-spec-planetscale checkout main && git -C specs/distilled-spec-planetscale pull"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@distilled.cloud/core": "0.
|
|
77
|
-
"effect": "4.0.0-beta.
|
|
76
|
+
"@distilled.cloud/core": "0.10.0",
|
|
77
|
+
"effect": "4.0.0-beta.48"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@types/bun": "^1.3.0",
|
|
@@ -83,6 +83,6 @@
|
|
|
83
83
|
"vitest": "^3.2.3"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"effect": "4.0.0-beta.
|
|
86
|
+
"effect": "4.0.0-beta.48"
|
|
87
87
|
}
|
|
88
88
|
}
|
package/src/credentials.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
2
|
import * as Layer from "effect/Layer";
|
|
3
3
|
import * as Redacted from "effect/Redacted";
|
|
4
|
-
import * as
|
|
4
|
+
import * as Context from "effect/Context";
|
|
5
5
|
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
6
6
|
|
|
7
7
|
export const DEFAULT_API_BASE_URL = "https://api.planetscale.com/v1";
|
|
@@ -13,7 +13,7 @@ export interface Config {
|
|
|
13
13
|
readonly apiBaseUrl: string;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export class Credentials extends
|
|
16
|
+
export class Credentials extends Context.Service<Credentials, Config>()(
|
|
17
17
|
"PlanetScaleCredentials",
|
|
18
18
|
) {}
|
|
19
19
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
import { Forbidden, NotFound } from "../errors";
|
|
5
|
+
|
|
6
|
+
// Input Schema
|
|
7
|
+
export const CheckDeployRequestStorageInput =
|
|
8
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
9
|
+
organization: Schema.String.pipe(T.PathParam()),
|
|
10
|
+
database: Schema.String.pipe(T.PathParam()),
|
|
11
|
+
number: Schema.Number.pipe(T.PathParam()),
|
|
12
|
+
}).pipe(
|
|
13
|
+
T.Http({
|
|
14
|
+
method: "GET",
|
|
15
|
+
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/storage-check",
|
|
16
|
+
}),
|
|
17
|
+
);
|
|
18
|
+
export type CheckDeployRequestStorageInput =
|
|
19
|
+
typeof CheckDeployRequestStorageInput.Type;
|
|
20
|
+
|
|
21
|
+
// Output Schema
|
|
22
|
+
export const CheckDeployRequestStorageOutput =
|
|
23
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
24
|
+
enough_storage: Schema.Boolean,
|
|
25
|
+
upgradeable: Schema.Boolean,
|
|
26
|
+
storage_bytes_needed: Schema.Number,
|
|
27
|
+
storage_report: Schema.Record(
|
|
28
|
+
Schema.String,
|
|
29
|
+
Schema.Record(
|
|
30
|
+
Schema.String,
|
|
31
|
+
Schema.Struct({
|
|
32
|
+
used: Schema.optional(Schema.Number),
|
|
33
|
+
capacity: Schema.optional(Schema.Number),
|
|
34
|
+
remaining: Schema.optional(Schema.Number),
|
|
35
|
+
percentage_used: Schema.optional(Schema.Number),
|
|
36
|
+
storage_needed: Schema.optional(Schema.Number),
|
|
37
|
+
has_enough: Schema.optional(Schema.Boolean),
|
|
38
|
+
}),
|
|
39
|
+
),
|
|
40
|
+
),
|
|
41
|
+
});
|
|
42
|
+
export type CheckDeployRequestStorageOutput =
|
|
43
|
+
typeof CheckDeployRequestStorageOutput.Type;
|
|
44
|
+
|
|
45
|
+
// The operation
|
|
46
|
+
/**
|
|
47
|
+
* Check deploy request storage
|
|
48
|
+
*
|
|
49
|
+
* Checks whether the deploy request's target branch cluster has enough storage to safely deploy the schema changes.
|
|
50
|
+
*
|
|
51
|
+
* @param organization - The name of the deploy request's organization
|
|
52
|
+
* @param database - The name of the deploy request's database
|
|
53
|
+
* @param number - The number of the deploy request
|
|
54
|
+
*/
|
|
55
|
+
export const checkDeployRequestStorage = /*@__PURE__*/ /*#__PURE__*/ API.make(
|
|
56
|
+
() => ({
|
|
57
|
+
inputSchema: CheckDeployRequestStorageInput,
|
|
58
|
+
outputSchema: CheckDeployRequestStorageOutput,
|
|
59
|
+
errors: [Forbidden, NotFound] as const,
|
|
60
|
+
}),
|
|
61
|
+
);
|
|
@@ -62,6 +62,7 @@ export const CreateBackupOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
62
62
|
backup_policy: Schema.NullOr(
|
|
63
63
|
Schema.Struct({
|
|
64
64
|
id: Schema.String,
|
|
65
|
+
display_name: Schema.String,
|
|
65
66
|
name: Schema.String,
|
|
66
67
|
target: Schema.Literals(["production", "development"]),
|
|
67
68
|
retention_value: Schema.Number,
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
import { API } from "../client";
|
|
3
|
+
import * as T from "../traits";
|
|
4
|
+
import { Forbidden, NotFound } from "../errors";
|
|
5
|
+
|
|
6
|
+
// Input Schema
|
|
7
|
+
export const CreateBackupPolicyInput =
|
|
8
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
9
|
+
organization: Schema.String.pipe(T.PathParam()),
|
|
10
|
+
database: Schema.String.pipe(T.PathParam()),
|
|
11
|
+
name: Schema.optional(Schema.String),
|
|
12
|
+
target: Schema.optional(Schema.Literals(["production", "development"])),
|
|
13
|
+
retention_value: Schema.optional(Schema.Number),
|
|
14
|
+
retention_unit: Schema.optional(
|
|
15
|
+
Schema.Literals(["hour", "day", "week", "month", "year"]),
|
|
16
|
+
),
|
|
17
|
+
frequency_value: Schema.optional(Schema.Number),
|
|
18
|
+
frequency_unit: Schema.optional(
|
|
19
|
+
Schema.Literals(["hour", "day", "week", "month"]),
|
|
20
|
+
),
|
|
21
|
+
schedule_time: Schema.optional(Schema.String),
|
|
22
|
+
schedule_day: Schema.optional(Schema.Number),
|
|
23
|
+
schedule_week: Schema.optional(Schema.Number),
|
|
24
|
+
}).pipe(
|
|
25
|
+
T.Http({
|
|
26
|
+
method: "POST",
|
|
27
|
+
path: "/organizations/{organization}/databases/{database}/backup-policies",
|
|
28
|
+
}),
|
|
29
|
+
);
|
|
30
|
+
export type CreateBackupPolicyInput = typeof CreateBackupPolicyInput.Type;
|
|
31
|
+
|
|
32
|
+
// Output Schema
|
|
33
|
+
export const CreateBackupPolicyOutput =
|
|
34
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
35
|
+
id: Schema.String,
|
|
36
|
+
display_name: Schema.String,
|
|
37
|
+
name: Schema.String,
|
|
38
|
+
target: Schema.Literals(["production", "development"]),
|
|
39
|
+
retention_value: Schema.Number,
|
|
40
|
+
retention_unit: Schema.String,
|
|
41
|
+
frequency_value: Schema.Number,
|
|
42
|
+
frequency_unit: Schema.String,
|
|
43
|
+
schedule_time: Schema.String,
|
|
44
|
+
schedule_day: Schema.Number,
|
|
45
|
+
schedule_week: Schema.Number,
|
|
46
|
+
created_at: Schema.String,
|
|
47
|
+
updated_at: Schema.String,
|
|
48
|
+
last_ran_at: Schema.String,
|
|
49
|
+
next_run_at: Schema.String,
|
|
50
|
+
required: Schema.Boolean,
|
|
51
|
+
});
|
|
52
|
+
export type CreateBackupPolicyOutput = typeof CreateBackupPolicyOutput.Type;
|
|
53
|
+
|
|
54
|
+
// The operation
|
|
55
|
+
/**
|
|
56
|
+
* Create a backup policy
|
|
57
|
+
*
|
|
58
|
+
* @param organization - Organization name slug from `list_organizations`. Example: `acme`.
|
|
59
|
+
* @param database - Database name slug from `list_databases`. Example: `app-db`.
|
|
60
|
+
* @param name - The name of the backup policy
|
|
61
|
+
* @param target - Whether the policy is for production or development branches
|
|
62
|
+
* @param retention_value - A number value for the retention period of the backup policy
|
|
63
|
+
* @param retention_unit - The unit for the retention period of the backup policy
|
|
64
|
+
* @param frequency_value - A number value for the frequency of the backup policy
|
|
65
|
+
* @param frequency_unit - The unit for the frequency of the backup policy
|
|
66
|
+
* @param schedule_time - The time of day that the backup is scheduled, in HH:MM format
|
|
67
|
+
* @param schedule_day - Day of the week that the backup is scheduled. 0 is Sunday, 6 is Saturday
|
|
68
|
+
* @param schedule_week - Week of the month that the backup is scheduled. 0 is the first week, 3 is the fourth week
|
|
69
|
+
*/
|
|
70
|
+
export const createBackupPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
71
|
+
inputSchema: CreateBackupPolicyInput,
|
|
72
|
+
outputSchema: CreateBackupPolicyOutput,
|
|
73
|
+
errors: [Forbidden, NotFound] as const,
|
|
74
|
+
}));
|
|
@@ -14,6 +14,12 @@ export const CreateBranchInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
14
14
|
restore_point: Schema.optional(Schema.String),
|
|
15
15
|
seed_data: Schema.optional(Schema.Literals(["last_successful_backup"])),
|
|
16
16
|
cluster_size: Schema.optional(Schema.String),
|
|
17
|
+
storage: Schema.optional(
|
|
18
|
+
Schema.Struct({
|
|
19
|
+
minimum_storage_bytes: Schema.optional(Schema.Number),
|
|
20
|
+
maximum_storage_bytes: Schema.optional(Schema.Number),
|
|
21
|
+
}),
|
|
22
|
+
),
|
|
17
23
|
major_version: Schema.optional(Schema.String),
|
|
18
24
|
}).pipe(
|
|
19
25
|
T.Http({
|
|
@@ -12,6 +12,12 @@ export const CreateDatabaseInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
12
12
|
replicas: Schema.optional(Schema.Number),
|
|
13
13
|
kind: Schema.optional(Schema.Literals(["mysql", "postgresql"])),
|
|
14
14
|
major_version: Schema.optional(Schema.String),
|
|
15
|
+
storage: Schema.optional(
|
|
16
|
+
Schema.Struct({
|
|
17
|
+
minimum_storage_bytes: Schema.optional(Schema.Number),
|
|
18
|
+
maximum_storage_bytes: Schema.optional(Schema.Number),
|
|
19
|
+
}),
|
|
20
|
+
),
|
|
15
21
|
}).pipe(
|
|
16
22
|
T.Http({ method: "POST", path: "/organizations/{organization}/databases" }),
|
|
17
23
|
);
|