@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 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 day at the repository's recommended per-run budget; the minimum funds a run every week at it.
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. A monthly budget at or above the recommended one runs every day, one at or above the minimum runs once a week with larger runs, and one below the minimum is refused with `400`. `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.
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 spent, `error` after repeated failures. Null with no schedule.
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 per-run budget times the runs the cadence fits in a month. */
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 New and re-planned schedules are daily or weekly. Older schedules may be biweekly or monthly until their budget changes.
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 daily run at the recommended per-run budget. */
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 cadence and the per-run budget. */
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. zkao picks the cadence from the budget: a
2637
- * daily run when it covers one, otherwise weekly. A budget below the weekly
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. zkao picks the cadence from the budget: a
314
- * daily run when it covers one, otherwise weekly. A budget below the weekly
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(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zksecurity/zkao-sdk",
3
- "version": "0.17.0-next.12",
3
+ "version": "0.18.0-next.13",
4
4
  "description": "TypeScript SDK for the zkao Project API",
5
5
  "license": "MIT",
6
6
  "author": "zkSecurity",