@zksecurity/zkao-sdk 0.16.0-next.11 → 0.17.0-next.12
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 +215 -7
- package/dist/index.js +50 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -137,6 +137,34 @@ interface paths {
|
|
|
137
137
|
patch?: never;
|
|
138
138
|
trace?: never;
|
|
139
139
|
};
|
|
140
|
+
"/projects/{projectId}/repositories/{repositoryId}/continuous-testing": {
|
|
141
|
+
parameters: {
|
|
142
|
+
query?: never;
|
|
143
|
+
header?: never;
|
|
144
|
+
path?: never;
|
|
145
|
+
cookie?: never;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
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.
|
|
150
|
+
*/
|
|
151
|
+
get: operations["getContinuousTesting"];
|
|
152
|
+
/**
|
|
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.
|
|
155
|
+
*/
|
|
156
|
+
put: operations["setContinuousTesting"];
|
|
157
|
+
post?: never;
|
|
158
|
+
/**
|
|
159
|
+
* Remove a repository's Continuous Testing schedule
|
|
160
|
+
* @description Requires scope: `automations:write`. Scans the schedule already ran stay. Responds `404` when the branch has no schedule.
|
|
161
|
+
*/
|
|
162
|
+
delete: operations["removeContinuousTesting"];
|
|
163
|
+
options?: never;
|
|
164
|
+
head?: never;
|
|
165
|
+
patch?: never;
|
|
166
|
+
trace?: never;
|
|
167
|
+
};
|
|
140
168
|
"/projects/{projectId}/scans": {
|
|
141
169
|
parameters: {
|
|
142
170
|
query?: never;
|
|
@@ -269,7 +297,7 @@ interface paths {
|
|
|
269
297
|
};
|
|
270
298
|
/**
|
|
271
299
|
* List advisories
|
|
272
|
-
* @description Requires scope: `read`. The project's coordinated-disclosure advisories, newest first. Optionally filter by `status`.
|
|
300
|
+
* @description Requires scope: `read`. The project's coordinated-disclosure advisories, newest first. Optionally filter by `status`. A repository-restricted token sees an advisory only when every associated repository is in its allowlist.
|
|
273
301
|
*/
|
|
274
302
|
get: operations["listAdvisories"];
|
|
275
303
|
put?: never;
|
|
@@ -289,7 +317,7 @@ interface paths {
|
|
|
289
317
|
};
|
|
290
318
|
/**
|
|
291
319
|
* Get an advisory
|
|
292
|
-
* @description Requires scope: `read`. The advisory, the software it concerns, the versions it affects, and the notices planned for it.
|
|
320
|
+
* @description Requires scope: `read`. The advisory, the software it concerns, the versions it affects, and the notices planned for it. Every associated repository must be in the token's allowlist.
|
|
293
321
|
*
|
|
294
322
|
* `software` is what decides the audience: a contact is notified about an advisory only when they run some of it. `affected` is a separate statement about versions, and is often empty.
|
|
295
323
|
*
|
|
@@ -314,7 +342,7 @@ interface paths {
|
|
|
314
342
|
get?: never;
|
|
315
343
|
/**
|
|
316
344
|
* Record which versions an advisory affects
|
|
317
|
-
* @description Requires scope: `advisories:write`. Replaces the whole set of affected ranges, so send what is affected now rather than a patch.
|
|
345
|
+
* @description Requires scope: `advisories:write`. Replaces the whole set of affected ranges, so send what is affected now rather than a patch. Every existing and requested repository must be in the token's allowlist. This check also applies to an empty replacement.
|
|
318
346
|
*
|
|
319
347
|
* `fixedIn` is the point of this endpoint. A patch notice stays blocked until some range names a fixed version, and only the people who shipped the release know it.
|
|
320
348
|
*
|
|
@@ -727,6 +755,11 @@ interface components {
|
|
|
727
755
|
Scan: {
|
|
728
756
|
id: string;
|
|
729
757
|
status: components["schemas"]["ScanStatus"];
|
|
758
|
+
/**
|
|
759
|
+
* @description An actionable setup failure for a failed scan. Null for other statuses and internal failures. Restore a project member's GitHub access or approve the App permissions before launching again.
|
|
760
|
+
* @enum {string|null}
|
|
761
|
+
*/
|
|
762
|
+
failureCode?: "NO_MEMBER_REPO_ACCESS" | "GITHUB_APP_PERMISSIONS_PENDING" | null;
|
|
730
763
|
repositoryId: string;
|
|
731
764
|
commitHash?: string | null;
|
|
732
765
|
/** @description A diff scan's base, as the merge base SHA its change is measured from. Null for other scans. */
|
|
@@ -807,6 +840,7 @@ interface components {
|
|
|
807
840
|
};
|
|
808
841
|
FindingNote: {
|
|
809
842
|
id: string;
|
|
843
|
+
/** @description Markdown. A page of the app the assistant names is an absolute link. */
|
|
810
844
|
body: string;
|
|
811
845
|
/** Format: date-time */
|
|
812
846
|
createdAt: string;
|
|
@@ -1075,6 +1109,59 @@ interface components {
|
|
|
1075
1109
|
key: string;
|
|
1076
1110
|
deleted: boolean;
|
|
1077
1111
|
};
|
|
1112
|
+
ContinuousTesting: {
|
|
1113
|
+
repositoryId: string;
|
|
1114
|
+
/** @description False when Continuous Testing is not offered. */
|
|
1115
|
+
available: boolean;
|
|
1116
|
+
/** @description False when there is no schedule or it is paused. */
|
|
1117
|
+
enabled: boolean;
|
|
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.
|
|
1120
|
+
* @enum {string|null}
|
|
1121
|
+
*/
|
|
1122
|
+
state: "active" | "converged" | "budget_reached" | "error" | null;
|
|
1123
|
+
branch: string;
|
|
1124
|
+
/** @description The per-run budget times the runs the cadence fits in a month. */
|
|
1125
|
+
monthlyBudgetCredits: number | null;
|
|
1126
|
+
/**
|
|
1127
|
+
* @description New and re-planned schedules are daily or weekly. Older schedules may be biweekly or monthly until their budget changes.
|
|
1128
|
+
* @enum {string|null}
|
|
1129
|
+
*/
|
|
1130
|
+
cadence: "daily" | "weekly" | "biweekly" | "monthly" | null;
|
|
1131
|
+
perRunBudgetCredits: number | null;
|
|
1132
|
+
/** @description Audit areas the runs rotate through, one per run, least recently scanned first. Empty means every run scans the whole repository. */
|
|
1133
|
+
areaKeys: string[];
|
|
1134
|
+
/** @description Net credits the schedule's runs spent since the UTC month began. */
|
|
1135
|
+
spentThisMonthCredits: number;
|
|
1136
|
+
/** @description Runs the schedule launched since the UTC month began. */
|
|
1137
|
+
runsThisMonth: number;
|
|
1138
|
+
/** Format: date-time */
|
|
1139
|
+
lastRunAt: string | null;
|
|
1140
|
+
/**
|
|
1141
|
+
* Format: date-time
|
|
1142
|
+
* @description When the next run becomes due. A past time means within the hour. Null when paused or stopped.
|
|
1143
|
+
*/
|
|
1144
|
+
nextRunAt: string | null;
|
|
1145
|
+
/** @description A month that funds a daily run at the recommended per-run budget. */
|
|
1146
|
+
recommendedMonthlyCredits: number | null;
|
|
1147
|
+
/** @description A month that funds a weekly run at that budget. Less is refused. */
|
|
1148
|
+
minimumMonthlyCredits: number | null;
|
|
1149
|
+
};
|
|
1150
|
+
SetContinuousTestingRequest: {
|
|
1151
|
+
/** @description False pauses the schedule; true turns it on or resumes it. */
|
|
1152
|
+
enabled?: boolean;
|
|
1153
|
+
/** @description Re-plans the cadence and the per-run budget. */
|
|
1154
|
+
monthlyBudgetCredits?: number;
|
|
1155
|
+
/** @description Replaces the rotation set. An empty array scans the whole repository every run. */
|
|
1156
|
+
areaKeys?: string[];
|
|
1157
|
+
/** @description The scheduled branch. Defaults to the repository's default branch. */
|
|
1158
|
+
branch?: string;
|
|
1159
|
+
};
|
|
1160
|
+
RemoveContinuousTestingResult: {
|
|
1161
|
+
repositoryId: string;
|
|
1162
|
+
branch: string;
|
|
1163
|
+
removed: boolean;
|
|
1164
|
+
};
|
|
1078
1165
|
CancelScanResult: {
|
|
1079
1166
|
scanId: string;
|
|
1080
1167
|
/** @description Terminal status after cancellation (always CANCELLED). */
|
|
@@ -1124,18 +1211,18 @@ interface components {
|
|
|
1124
1211
|
PublishFindingRequest: {
|
|
1125
1212
|
/** @description A note id on the finding to pin as the published note. */
|
|
1126
1213
|
noteId?: string;
|
|
1127
|
-
/** @description
|
|
1214
|
+
/** @description True generates a new access password. False removes password protection. Omission preserves an existing password. */
|
|
1128
1215
|
withPassword?: boolean;
|
|
1129
1216
|
};
|
|
1130
1217
|
PublishScanRequest: {
|
|
1131
|
-
/** @description
|
|
1218
|
+
/** @description True generates a new access password. False removes password protection. Omission preserves an existing password. */
|
|
1132
1219
|
withPassword?: boolean;
|
|
1133
1220
|
};
|
|
1134
1221
|
PublishArtifactResult: {
|
|
1135
1222
|
artifactId: string;
|
|
1136
1223
|
/** @description Slug in /public/{scans,findings}/<publicId>. */
|
|
1137
1224
|
publicId: string;
|
|
1138
|
-
/** @description The
|
|
1225
|
+
/** @description The artifact's current access password, or null when it has no password. */
|
|
1139
1226
|
accessPassword?: string | null;
|
|
1140
1227
|
};
|
|
1141
1228
|
};
|
|
@@ -1230,6 +1317,8 @@ interface components {
|
|
|
1230
1317
|
/** @description The finding id, or the `ZK-` label shown on the finding page (the id's last eight characters, prefix optional). A label that matches more than one finding in the project is refused with `409 conflict`; use the full id. */
|
|
1231
1318
|
FindingId: string;
|
|
1232
1319
|
RepositoryId: string;
|
|
1320
|
+
/** @description The scheduled branch. Defaults to the repository's default branch. */
|
|
1321
|
+
ContinuousTestingBranch: string;
|
|
1233
1322
|
Page: number;
|
|
1234
1323
|
Limit: number;
|
|
1235
1324
|
};
|
|
@@ -1435,6 +1524,97 @@ interface operations {
|
|
|
1435
1524
|
409: components["responses"]["Conflict"];
|
|
1436
1525
|
};
|
|
1437
1526
|
};
|
|
1527
|
+
getContinuousTesting: {
|
|
1528
|
+
parameters: {
|
|
1529
|
+
query?: {
|
|
1530
|
+
/** @description The scheduled branch. Defaults to the repository's default branch. */
|
|
1531
|
+
branch?: components["parameters"]["ContinuousTestingBranch"];
|
|
1532
|
+
};
|
|
1533
|
+
header?: never;
|
|
1534
|
+
path: {
|
|
1535
|
+
projectId: components["parameters"]["ProjectId"];
|
|
1536
|
+
repositoryId: components["parameters"]["RepositoryId"];
|
|
1537
|
+
};
|
|
1538
|
+
cookie?: never;
|
|
1539
|
+
};
|
|
1540
|
+
requestBody?: never;
|
|
1541
|
+
responses: {
|
|
1542
|
+
/** @description OK */
|
|
1543
|
+
200: {
|
|
1544
|
+
headers: {
|
|
1545
|
+
[name: string]: unknown;
|
|
1546
|
+
};
|
|
1547
|
+
content: {
|
|
1548
|
+
"application/json": components["schemas"]["ContinuousTesting"];
|
|
1549
|
+
};
|
|
1550
|
+
};
|
|
1551
|
+
400: components["responses"]["BadRequest"];
|
|
1552
|
+
401: components["responses"]["Unauthorized"];
|
|
1553
|
+
403: components["responses"]["Forbidden"];
|
|
1554
|
+
404: components["responses"]["NotFound"];
|
|
1555
|
+
};
|
|
1556
|
+
};
|
|
1557
|
+
setContinuousTesting: {
|
|
1558
|
+
parameters: {
|
|
1559
|
+
query?: never;
|
|
1560
|
+
header?: never;
|
|
1561
|
+
path: {
|
|
1562
|
+
projectId: components["parameters"]["ProjectId"];
|
|
1563
|
+
repositoryId: components["parameters"]["RepositoryId"];
|
|
1564
|
+
};
|
|
1565
|
+
cookie?: never;
|
|
1566
|
+
};
|
|
1567
|
+
requestBody: {
|
|
1568
|
+
content: {
|
|
1569
|
+
"application/json": components["schemas"]["SetContinuousTestingRequest"];
|
|
1570
|
+
};
|
|
1571
|
+
};
|
|
1572
|
+
responses: {
|
|
1573
|
+
/** @description OK */
|
|
1574
|
+
200: {
|
|
1575
|
+
headers: {
|
|
1576
|
+
[name: string]: unknown;
|
|
1577
|
+
};
|
|
1578
|
+
content: {
|
|
1579
|
+
"application/json": components["schemas"]["ContinuousTesting"];
|
|
1580
|
+
};
|
|
1581
|
+
};
|
|
1582
|
+
400: components["responses"]["BadRequest"];
|
|
1583
|
+
401: components["responses"]["Unauthorized"];
|
|
1584
|
+
403: components["responses"]["Forbidden"];
|
|
1585
|
+
404: components["responses"]["NotFound"];
|
|
1586
|
+
};
|
|
1587
|
+
};
|
|
1588
|
+
removeContinuousTesting: {
|
|
1589
|
+
parameters: {
|
|
1590
|
+
query?: {
|
|
1591
|
+
/** @description The scheduled branch. Defaults to the repository's default branch. */
|
|
1592
|
+
branch?: components["parameters"]["ContinuousTestingBranch"];
|
|
1593
|
+
};
|
|
1594
|
+
header?: never;
|
|
1595
|
+
path: {
|
|
1596
|
+
projectId: components["parameters"]["ProjectId"];
|
|
1597
|
+
repositoryId: components["parameters"]["RepositoryId"];
|
|
1598
|
+
};
|
|
1599
|
+
cookie?: never;
|
|
1600
|
+
};
|
|
1601
|
+
requestBody?: never;
|
|
1602
|
+
responses: {
|
|
1603
|
+
/** @description OK */
|
|
1604
|
+
200: {
|
|
1605
|
+
headers: {
|
|
1606
|
+
[name: string]: unknown;
|
|
1607
|
+
};
|
|
1608
|
+
content: {
|
|
1609
|
+
"application/json": components["schemas"]["RemoveContinuousTestingResult"];
|
|
1610
|
+
};
|
|
1611
|
+
};
|
|
1612
|
+
400: components["responses"]["BadRequest"];
|
|
1613
|
+
401: components["responses"]["Unauthorized"];
|
|
1614
|
+
403: components["responses"]["Forbidden"];
|
|
1615
|
+
404: components["responses"]["NotFound"];
|
|
1616
|
+
};
|
|
1617
|
+
};
|
|
1438
1618
|
listScans: {
|
|
1439
1619
|
parameters: {
|
|
1440
1620
|
query?: {
|
|
@@ -2249,6 +2429,9 @@ type RepositoryGuidance = Schemas["RepositoryGuidance"];
|
|
|
2249
2429
|
type AuditArea = Schemas["AuditArea"];
|
|
2250
2430
|
type AuditAreaList = Schemas["AuditAreaList"];
|
|
2251
2431
|
type DeleteAuditAreaResult = Schemas["DeleteAuditAreaResult"];
|
|
2432
|
+
type ContinuousTesting = Schemas["ContinuousTesting"];
|
|
2433
|
+
type SetContinuousTestingRequest = Schemas["SetContinuousTestingRequest"];
|
|
2434
|
+
type RemoveContinuousTestingResult = Schemas["RemoveContinuousTestingResult"];
|
|
2252
2435
|
type SetGuidanceResult = Schemas["SetGuidanceResult"];
|
|
2253
2436
|
type TokenInfo = Schemas["TokenInfo"];
|
|
2254
2437
|
type BillingBalance = Schemas["BillingBalance"];
|
|
@@ -2437,6 +2620,31 @@ declare class ZkaoClient {
|
|
|
2437
2620
|
* a scan's map named is refused with a `409`.
|
|
2438
2621
|
*/
|
|
2439
2622
|
deleteAuditArea(repositoryId: string, areaKey: string): Promise<DeleteAuditAreaResult>;
|
|
2623
|
+
/**
|
|
2624
|
+
* Read a repository's Continuous Testing schedule for one branch (requires
|
|
2625
|
+
* the `read` scope). Defaults to the repository's default branch. With no
|
|
2626
|
+
* schedule, `enabled` is false and the budget fields are null; the
|
|
2627
|
+
* recommended and minimum monthly budgets are still returned.
|
|
2628
|
+
*/
|
|
2629
|
+
getContinuousTesting(repositoryId: string, opts?: {
|
|
2630
|
+
branch?: string;
|
|
2631
|
+
}): Promise<ContinuousTesting>;
|
|
2632
|
+
/**
|
|
2633
|
+
* Turn Continuous Testing on or off, set its monthly budget, or choose the
|
|
2634
|
+
* audit areas it rotates through (requires the `automations:write` scope).
|
|
2635
|
+
* 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`.
|
|
2639
|
+
*/
|
|
2640
|
+
setContinuousTesting(repositoryId: string, body: SetContinuousTestingRequest): Promise<ContinuousTesting>;
|
|
2641
|
+
/**
|
|
2642
|
+
* Remove a repository's Continuous Testing schedule for one branch
|
|
2643
|
+
* (requires the `automations:write` scope). Scans it already ran are kept.
|
|
2644
|
+
*/
|
|
2645
|
+
removeContinuousTesting(repositoryId: string, opts?: {
|
|
2646
|
+
branch?: string;
|
|
2647
|
+
}): Promise<RemoveContinuousTestingResult>;
|
|
2440
2648
|
listScans(opts?: {
|
|
2441
2649
|
page?: number;
|
|
2442
2650
|
limit?: number;
|
|
@@ -2635,4 +2843,4 @@ declare class ZkaoClient {
|
|
|
2635
2843
|
}): Promise<UsageMonthSummary[]>;
|
|
2636
2844
|
}
|
|
2637
2845
|
|
|
2638
|
-
export { type Advisory, type AdvisoryAffected, type AdvisoryAffectedInput, type AdvisoryContact, type AdvisoryContactInput, type AdvisoryDetail, type AdvisoryNotice, type AdvisoryStatus, type BillingBalance, type BillingSummary, type BillingUsage, type CancelScanResult, type ChangeNote, type ContactStatus, type ContactTier, DEFAULT_BASE_URL, type Finding, type FindingDetail, type FindingNote, type LaunchScanRequest, type LaunchScanResult, type ManualAuditRequest, type ManualAuditResult, type Paginated, type PublishArtifactResult, type Report, type ReportStatus, type Repository, type RepositoryGuidance, type ResolutionReason, type ResolutionStatus, type Scan, type ScanDetail, type ScanPreset, type ScanStatus, type SetGuidanceResult, type Severity, TERMINAL_SCAN_STATUSES, type TokenInfo, type TriageStatus, type UsageEvent, type UsageEventType, type UsageMonthSummary, type WaitForRepositoryReadyOptions, type WaitForScanOptions, ZkaoApiError, ZkaoClient, type ZkaoClientOptions, type components, getTokenInfo, isTerminalScanStatus, normalizeBaseUrl, type paths, resolveBaseUrlFromEnv };
|
|
2846
|
+
export { type Advisory, type AdvisoryAffected, type AdvisoryAffectedInput, type AdvisoryContact, type AdvisoryContactInput, type AdvisoryDetail, type AdvisoryNotice, type AdvisoryStatus, type BillingBalance, type BillingSummary, type BillingUsage, type CancelScanResult, type ChangeNote, type ContactStatus, type ContactTier, type ContinuousTesting, DEFAULT_BASE_URL, type Finding, type FindingDetail, type FindingNote, type LaunchScanRequest, type LaunchScanResult, type ManualAuditRequest, type ManualAuditResult, type Paginated, type PublishArtifactResult, type RemoveContinuousTestingResult, type Report, type ReportStatus, type Repository, type RepositoryGuidance, type ResolutionReason, type ResolutionStatus, type Scan, type ScanDetail, type ScanPreset, type ScanStatus, type SetContinuousTestingRequest, type SetGuidanceResult, type Severity, TERMINAL_SCAN_STATUSES, type TokenInfo, type TriageStatus, type UsageEvent, type UsageEventType, type UsageMonthSummary, type WaitForRepositoryReadyOptions, type WaitForScanOptions, ZkaoApiError, ZkaoClient, type ZkaoClientOptions, type components, getTokenInfo, isTerminalScanStatus, normalizeBaseUrl, type paths, resolveBaseUrlFromEnv };
|
package/dist/index.js
CHANGED
|
@@ -287,6 +287,56 @@ var ZkaoClient = class {
|
|
|
287
287
|
);
|
|
288
288
|
return unwrap(res);
|
|
289
289
|
}
|
|
290
|
+
// --- Continuous Testing -------------------------------------------------
|
|
291
|
+
/**
|
|
292
|
+
* Read a repository's Continuous Testing schedule for one branch (requires
|
|
293
|
+
* the `read` scope). Defaults to the repository's default branch. With no
|
|
294
|
+
* schedule, `enabled` is false and the budget fields are null; the
|
|
295
|
+
* recommended and minimum monthly budgets are still returned.
|
|
296
|
+
*/
|
|
297
|
+
async getContinuousTesting(repositoryId, opts = {}) {
|
|
298
|
+
const res = await this.http.GET(
|
|
299
|
+
"/projects/{projectId}/repositories/{repositoryId}/continuous-testing",
|
|
300
|
+
{
|
|
301
|
+
params: {
|
|
302
|
+
path: { ...this.path, repositoryId },
|
|
303
|
+
query: opts.branch === void 0 ? {} : { branch: opts.branch }
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
return unwrap(res);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Turn Continuous Testing on or off, set its monthly budget, or choose the
|
|
311
|
+
* audit areas it rotates through (requires the `automations:write` scope).
|
|
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`.
|
|
316
|
+
*/
|
|
317
|
+
async setContinuousTesting(repositoryId, body) {
|
|
318
|
+
const res = await this.http.PUT(
|
|
319
|
+
"/projects/{projectId}/repositories/{repositoryId}/continuous-testing",
|
|
320
|
+
{ params: { path: { ...this.path, repositoryId } }, body }
|
|
321
|
+
);
|
|
322
|
+
return unwrap(res);
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Remove a repository's Continuous Testing schedule for one branch
|
|
326
|
+
* (requires the `automations:write` scope). Scans it already ran are kept.
|
|
327
|
+
*/
|
|
328
|
+
async removeContinuousTesting(repositoryId, opts = {}) {
|
|
329
|
+
const res = await this.http.DELETE(
|
|
330
|
+
"/projects/{projectId}/repositories/{repositoryId}/continuous-testing",
|
|
331
|
+
{
|
|
332
|
+
params: {
|
|
333
|
+
path: { ...this.path, repositoryId },
|
|
334
|
+
query: opts.branch === void 0 ? {} : { branch: opts.branch }
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
);
|
|
338
|
+
return unwrap(res);
|
|
339
|
+
}
|
|
290
340
|
// --- Scans --------------------------------------------------------------
|
|
291
341
|
async listScans(opts = {}) {
|
|
292
342
|
const res = await this.http.GET("/projects/{projectId}/scans", {
|