feat(tests): types and API client for red/blue review workflow
This commit is contained in:
@@ -197,6 +197,31 @@ export async function startBlueWork(testId: string): Promise<Test> {
|
||||
return data;
|
||||
}
|
||||
|
||||
// ── Lead Review Gates (red_review / blue_review) ────────────────────
|
||||
|
||||
export interface RedReviewPayload {
|
||||
decision: "approve" | "reopen";
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
export interface BlueReviewPayload {
|
||||
decision: "approve" | "reopen" | "gap";
|
||||
notes?: string;
|
||||
system_gaps?: string;
|
||||
}
|
||||
|
||||
/** Assigned Red Lead approves or reopens a test sitting in red_review. */
|
||||
export async function reviewAsRedLead(testId: string, payload: RedReviewPayload): Promise<Test> {
|
||||
const { data } = await client.post<Test>(`/tests/${testId}/review-red`, payload);
|
||||
return data;
|
||||
}
|
||||
|
||||
/** Assigned Blue Lead approves, reopens, or flags a capability gap on a test in blue_review. */
|
||||
export async function reviewAsBlueLead(testId: string, payload: BlueReviewPayload): Promise<Test> {
|
||||
const { data } = await client.post<Test>(`/tests/${testId}/review-blue`, payload);
|
||||
return data;
|
||||
}
|
||||
|
||||
// ── Lead Validation ────────────────────────────────────────────────
|
||||
|
||||
/** Red Lead approves/rejects the red side. */
|
||||
|
||||
Reference in New Issue
Block a user