(
environmentId: string,
workId: string,
force: boolean,
)
| 271 | }, |
| 272 | |
| 273 | async stopWork( |
| 274 | environmentId: string, |
| 275 | workId: string, |
| 276 | force: boolean, |
| 277 | ): Promise<void> { |
| 278 | validateBridgeId(environmentId, 'environmentId') |
| 279 | validateBridgeId(workId, 'workId') |
| 280 | |
| 281 | debug(`[bridge:api] POST .../work/${workId}/stop force=${force}`) |
| 282 | |
| 283 | const response = await withOAuthRetry( |
| 284 | (token: string) => |
| 285 | axios.post( |
| 286 | `${deps.baseUrl}/v1/environments/${environmentId}/work/${workId}/stop`, |
| 287 | { force }, |
| 288 | { |
| 289 | headers: getHeaders(token), |
| 290 | timeout: 10_000, |
| 291 | validateStatus: s => s < 500, |
| 292 | }, |
| 293 | ), |
| 294 | 'StopWork', |
| 295 | ) |
| 296 | |
| 297 | handleErrorStatus(response.status, response.data, 'StopWork') |
| 298 | debug(`[bridge:api] POST .../work/${workId}/stop -> ${response.status}`) |
| 299 | }, |
| 300 | |
| 301 | async deregisterEnvironment(environmentId: string): Promise<void> { |
| 302 | validateBridgeId(environmentId, 'environmentId') |
nothing calls this directly
no test coverage detected