(id: string, decision: "APPROVED" | "REJECTED")
| 68 | } |
| 69 | |
| 70 | async resolveApproval(id: string, decision: "APPROVED" | "REJECTED"): Promise<void> { |
| 71 | await this.requestJson(`/v1/approvals/${id}/decision`, { |
| 72 | method: "POST", |
| 73 | body: JSON.stringify({ decision }), |
| 74 | }); |
| 75 | } |
| 76 | |
| 77 | private async requestJson(path: string, init: RequestInit): Promise<Record<string, unknown>> { |
| 78 | const response = await fetch(`${this.baseUrl}${path}`, { |
no test coverage detected