()
| 76 | } |
| 77 | |
| 78 | async getProjects() { |
| 79 | if (!this.accessToken) { |
| 80 | throw new Error("getProjects: No access token"); |
| 81 | } |
| 82 | |
| 83 | return wrapZodFetch(GetProjectsResponseBody, `${this.apiURL}/api/v1/projects`, { |
| 84 | headers: { |
| 85 | Authorization: `Bearer ${this.accessToken}`, |
| 86 | "Content-Type": "application/json", |
| 87 | }, |
| 88 | }); |
| 89 | } |
| 90 | |
| 91 | async createBackgroundWorker(projectRef: string, body: CreateBackgroundWorkerRequestBody) { |
| 92 | if (!this.accessToken) { |
no test coverage detected