1 | |
2 | |
3 | * Review, approve, or request changes to EOR offboarding documents |
4 | * Use this endpoint to review, approve, or request changes to EOR employee offboarding documents for a specific contract during the client sign‑off step. |
5 | **Token scopes**: `contracts:write` |
6 | */ |
7 | export async function main(auth: RT.Deel, contract_id: string, body: Body) { |
8 | const url = new URL( |
9 | `https://api.letsdeel.com/rest/v2/eor/contracts/${contract_id}/offboarding/review-client-sign-offs` |
10 | ) |
11 |
|
12 | const response = await fetch(url, { |
13 | method: 'POST', |
14 | headers: { |
15 | 'Content-Type': 'application/json', |
16 | Authorization: 'Bearer ' + auth.apiKey |
17 | }, |
18 | body: JSON.stringify(body) |
19 | }) |
20 | if (!response.ok) { |
21 | const text = await response.text() |
22 | throw new Error(`${response.status} ${text}`) |
23 | } |
24 | return await response.json() |
25 | } |
26 |
|
27 | |
28 | |
29 | * This file was automatically generated by json-schema-to-typescript. |
30 | * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, |
31 | * and run json-schema-to-typescript to regenerate this file. |
32 | */ |
33 |
|
34 | export interface Body { |
35 | data: { |
36 | |
37 | * Feedback from the reviewer when the termination is not approved. Required if has_client_approved is false, otherwise optional. |
38 | */ |
39 | reviewer_feedback?: string |
40 | |
41 | * Indicates if the client has approved the termination request |
42 | */ |
43 | has_client_approved: boolean |
44 | |
45 | * Indicates if the employee has been notified about the termiantion |
46 | */ |
47 | has_employee_been_notified?: boolean |
48 | [k: string]: unknown |
49 | } |
50 | [k: string]: unknown |
51 | } |
52 |
|