@zksecurity/zkao-sdk 0.17.0-next.12 → 0.18.0-next.13
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/dist/index.d.ts +14 -10
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -146,12 +146,12 @@ interface paths {
|
|
|
146
146
|
};
|
|
147
147
|
/**
|
|
148
148
|
* Get a repository's Continuous Testing schedule
|
|
149
|
-
* @description Requires scope: `read`. Continuous Testing scans one branch on a schedule paid from a monthly budget. With no schedule on the branch, `enabled` is false and the schedule fields are null. The recommended monthly budget funds a run every
|
|
149
|
+
* @description Requires scope: `read`. Continuous Testing scans one branch on a schedule paid from a monthly budget. With no schedule on the branch, `enabled` is false and the schedule fields are null. The recommended monthly budget funds a run about every three days at the repository's recommended per-run budget; the minimum funds a run every week at it.
|
|
150
150
|
*/
|
|
151
151
|
get: operations["getContinuousTesting"];
|
|
152
152
|
/**
|
|
153
153
|
* Turn Continuous Testing on, change it, or pause it
|
|
154
|
-
* @description Requires scope: `automations:write`. Every field is optional. With no schedule on the branch, the request creates one at the recommended monthly budget unless `monthlyBudgetCredits` is given; `enabled: false` then changes nothing.
|
|
154
|
+
* @description Requires scope: `automations:write`. Every field is optional. With no schedule on the branch, the request creates one at the recommended monthly budget unless `monthlyBudgetCredits` is given; `enabled: false` then changes nothing. The budget sets the interval smoothly from once a week to twice a day. The recommended budget funds a run about every three days. A budget outside the returned minimum and maximum is refused with `400`. Administrators can raise the maximum monthly budget. `areaKeys` replaces the audit areas runs rotate through, one per run. `enabled: false` pauses the schedule and keeps it. A change re-arms a schedule that had stopped. Each run still needs spendable credits when it launches.
|
|
155
155
|
*/
|
|
156
156
|
put: operations["setContinuousTesting"];
|
|
157
157
|
post?: never;
|
|
@@ -1116,18 +1116,20 @@ interface components {
|
|
|
1116
1116
|
/** @description False when there is no schedule or it is paused. */
|
|
1117
1117
|
enabled: boolean;
|
|
1118
1118
|
/**
|
|
1119
|
-
* @description Why an enabled schedule is not running: `budget_reached` when the project's monthly automation cap is
|
|
1119
|
+
* @description Why an enabled schedule is not running: `budget_reached` when the schedule's or project's monthly automation cap is reached, `error` after repeated failures. Null with no schedule.
|
|
1120
1120
|
* @enum {string|null}
|
|
1121
1121
|
*/
|
|
1122
1122
|
state: "active" | "converged" | "budget_reached" | "error" | null;
|
|
1123
1123
|
branch: string;
|
|
1124
|
-
/** @description The
|
|
1124
|
+
/** @description The configured monthly spending cap. Legacy schedules derive the budget from their cadence and per-run budget. */
|
|
1125
1125
|
monthlyBudgetCredits: number | null;
|
|
1126
1126
|
/**
|
|
1127
|
-
* @description
|
|
1127
|
+
* @description Legacy fixed cadence. Null for a custom interval or no schedule. Use intervalHours for the actual interval.
|
|
1128
1128
|
* @enum {string|null}
|
|
1129
1129
|
*/
|
|
1130
1130
|
cadence: "daily" | "weekly" | "biweekly" | "monthly" | null;
|
|
1131
|
+
/** @description Hours between scheduled runs. Null when no schedule exists. */
|
|
1132
|
+
intervalHours: number | null;
|
|
1131
1133
|
perRunBudgetCredits: number | null;
|
|
1132
1134
|
/** @description Audit areas the runs rotate through, one per run, least recently scanned first. Empty means every run scans the whole repository. */
|
|
1133
1135
|
areaKeys: string[];
|
|
@@ -1142,15 +1144,17 @@ interface components {
|
|
|
1142
1144
|
* @description When the next run becomes due. A past time means within the hour. Null when paused or stopped.
|
|
1143
1145
|
*/
|
|
1144
1146
|
nextRunAt: string | null;
|
|
1145
|
-
/** @description A month that funds a
|
|
1147
|
+
/** @description A month that funds a run about every three days at the recommended per-run budget. */
|
|
1146
1148
|
recommendedMonthlyCredits: number | null;
|
|
1147
1149
|
/** @description A month that funds a weekly run at that budget. Less is refused. */
|
|
1148
1150
|
minimumMonthlyCredits: number | null;
|
|
1151
|
+
/** @description The largest monthly budget currently allowed for the repository. Administrators can raise it. */
|
|
1152
|
+
maximumMonthlyCredits: number | null;
|
|
1149
1153
|
};
|
|
1150
1154
|
SetContinuousTestingRequest: {
|
|
1151
1155
|
/** @description False pauses the schedule; true turns it on or resumes it. */
|
|
1152
1156
|
enabled?: boolean;
|
|
1153
|
-
/** @description Re-plans the
|
|
1157
|
+
/** @description Re-plans the interval and the per-run budget within the returned minimum and maximum. */
|
|
1154
1158
|
monthlyBudgetCredits?: number;
|
|
1155
1159
|
/** @description Replaces the rotation set. An empty array scans the whole repository every run. */
|
|
1156
1160
|
areaKeys?: string[];
|
|
@@ -2633,9 +2637,9 @@ declare class ZkaoClient {
|
|
|
2633
2637
|
* Turn Continuous Testing on or off, set its monthly budget, or choose the
|
|
2634
2638
|
* audit areas it rotates through (requires the `automations:write` scope).
|
|
2635
2639
|
* Every field is optional. Turning it on with no schedule creates one at
|
|
2636
|
-
* the recommended monthly budget
|
|
2637
|
-
*
|
|
2638
|
-
* minimum is refused with a `400`.
|
|
2640
|
+
* the recommended monthly budget, funding a run about every three days. The
|
|
2641
|
+
* budget sets the interval from weekly to twice daily. A budget outside the
|
|
2642
|
+
* returned minimum and maximum is refused with a `400`.
|
|
2639
2643
|
*/
|
|
2640
2644
|
setContinuousTesting(repositoryId: string, body: SetContinuousTestingRequest): Promise<ContinuousTesting>;
|
|
2641
2645
|
/**
|
package/dist/index.js
CHANGED
|
@@ -310,9 +310,9 @@ var ZkaoClient = class {
|
|
|
310
310
|
* Turn Continuous Testing on or off, set its monthly budget, or choose the
|
|
311
311
|
* audit areas it rotates through (requires the `automations:write` scope).
|
|
312
312
|
* Every field is optional. Turning it on with no schedule creates one at
|
|
313
|
-
* the recommended monthly budget
|
|
314
|
-
*
|
|
315
|
-
* minimum is refused with a `400`.
|
|
313
|
+
* the recommended monthly budget, funding a run about every three days. The
|
|
314
|
+
* budget sets the interval from weekly to twice daily. A budget outside the
|
|
315
|
+
* returned minimum and maximum is refused with a `400`.
|
|
316
316
|
*/
|
|
317
317
|
async setContinuousTesting(repositoryId, body) {
|
|
318
318
|
const res = await this.http.PUT(
|