@conflict-hq/ezacto-client 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated.d.ts +3421 -0
- package/dist/generated.js +1754 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +54 -0
- package/src/generated.ts +4465 -0
- package/src/index.ts +1 -0
package/src/generated.ts
ADDED
|
@@ -0,0 +1,4465 @@
|
|
|
1
|
+
// Generated by scripts/generate-api-contract.mjs. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
export type AttachmentUploadInput = {
|
|
4
|
+
"file": string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type Attachment = {
|
|
8
|
+
"id": number;
|
|
9
|
+
"name": string;
|
|
10
|
+
"content_hash": string;
|
|
11
|
+
"byte_size": number;
|
|
12
|
+
"content_type": string;
|
|
13
|
+
"uploaded_by_user_id": number | null;
|
|
14
|
+
"created_at": string;
|
|
15
|
+
"updated_at": string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type AttachmentEnvelope = {
|
|
19
|
+
"data": Attachment;
|
|
20
|
+
"links": Links;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type AttachmentListEnvelope = {
|
|
24
|
+
"data": Array<Attachment>;
|
|
25
|
+
"links": Links;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type InvoiceReminderPolicy = {
|
|
29
|
+
"first_after_days": number;
|
|
30
|
+
"every_days": number;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type FieldError = {
|
|
34
|
+
"field": string;
|
|
35
|
+
"code": string;
|
|
36
|
+
"message": string;
|
|
37
|
+
"minimum_length"?: number;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type ErrorDetail = {
|
|
41
|
+
"code": string;
|
|
42
|
+
"message": string;
|
|
43
|
+
"fields": Array<FieldError>;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export type ErrorEnvelope = {
|
|
47
|
+
"error": ErrorDetail;
|
|
48
|
+
"request_id": string;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type SignupInput = {
|
|
52
|
+
"organization_name": string;
|
|
53
|
+
"first_name": string;
|
|
54
|
+
"last_name": string;
|
|
55
|
+
"email": string;
|
|
56
|
+
"password": string;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export type AuthTokenInput = {
|
|
60
|
+
"token": string;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export type PasswordSignInInput = {
|
|
64
|
+
"email": string;
|
|
65
|
+
"password": string;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export type EmailInput = {
|
|
69
|
+
"email": string;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export type PasswordResetInput = {
|
|
73
|
+
"token": string;
|
|
74
|
+
"password": string;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export type AuthAccepted = {
|
|
78
|
+
"status": "verification_sent" | "reset_requested";
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export type AuthAcceptedEnvelope = {
|
|
82
|
+
"data": AuthAccepted;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export type AuthPrincipal = {
|
|
86
|
+
"status": "verified" | "authenticated" | "password_reset";
|
|
87
|
+
"user_id": number;
|
|
88
|
+
"profile": "member" | "project_manager" | "people_admin" | "accounting" | "executive_manager" | "administrator";
|
|
89
|
+
"manager_grants": Array<string>;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export type AuthPrincipalEnvelope = {
|
|
93
|
+
"data": AuthPrincipal;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export type Session = {
|
|
97
|
+
"id": number;
|
|
98
|
+
"created_at": string;
|
|
99
|
+
"last_seen_at": string;
|
|
100
|
+
"idle_expires_at": string;
|
|
101
|
+
"absolute_expires_at": string;
|
|
102
|
+
"revoked_at": string | null;
|
|
103
|
+
"revocation_reason": "user_revoked" | "privilege_change" | "password_reset" | "user_disabled" | null;
|
|
104
|
+
"current": boolean;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export type SessionEnvelope = {
|
|
108
|
+
"data": Session;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export type SessionPage = {
|
|
112
|
+
"data": Array<Session>;
|
|
113
|
+
"links": Links;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export type EmailRecipient = {
|
|
117
|
+
"email": string;
|
|
118
|
+
"name"?: string;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export type EmailLog = {
|
|
122
|
+
"id": number;
|
|
123
|
+
"from": EmailRecipient | null;
|
|
124
|
+
"reply_to": Array<EmailRecipient>;
|
|
125
|
+
"to": Array<EmailRecipient>;
|
|
126
|
+
"template": string;
|
|
127
|
+
"subject": string;
|
|
128
|
+
"provider": string | null;
|
|
129
|
+
"provider_message_id": string | null;
|
|
130
|
+
"provider_request_id": string | null;
|
|
131
|
+
"provider_latency_ms": number | null;
|
|
132
|
+
"status": "queued" | "sent" | "bounced" | "complained" | "failed";
|
|
133
|
+
"related_type": string | null;
|
|
134
|
+
"related_id": number | null;
|
|
135
|
+
"attempt_count": number;
|
|
136
|
+
"failure_code": "queue_unavailable" | "provider_timeout" | "provider_rejected" | null;
|
|
137
|
+
"failure_reason": string | null;
|
|
138
|
+
"created_at": string;
|
|
139
|
+
"updated_at": string;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export type EmailLogPage = {
|
|
143
|
+
"data": Array<EmailLog>;
|
|
144
|
+
"links": Links;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
export type EmailReputationSnapshot = {
|
|
148
|
+
"sent": number;
|
|
149
|
+
"bounced": number;
|
|
150
|
+
"complained": number;
|
|
151
|
+
"failed": number;
|
|
152
|
+
"bounce_rate_ppm": number;
|
|
153
|
+
"complaint_rate_ppm": number;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export type EmailHealth = {
|
|
157
|
+
"reputation": EmailReputationSnapshot;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export type EmailHealthEnvelope = {
|
|
161
|
+
"data": EmailHealth;
|
|
162
|
+
"links": Links;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export type EmailTemplateVariable = {
|
|
166
|
+
"name": string;
|
|
167
|
+
"token": string;
|
|
168
|
+
"description": string;
|
|
169
|
+
"compatibility": "harvest" | "native";
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export type EmailTemplateVariableGroup = {
|
|
173
|
+
"kind": "invoice" | "reminder" | "thank_you" | "auth_email_verification" | "auth_password_reset";
|
|
174
|
+
"variables": Array<EmailTemplateVariable>;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
export type EmailTemplateVariableCatalog = {
|
|
178
|
+
"data": Array<EmailTemplateVariableGroup>;
|
|
179
|
+
"links": Links;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export type EmailTemplate = {
|
|
183
|
+
"kind": "invoice" | "reminder" | "thank_you" | "auth_email_verification" | "auth_password_reset";
|
|
184
|
+
"version": number;
|
|
185
|
+
"subject_template": string;
|
|
186
|
+
"text_template": string;
|
|
187
|
+
"html_template": string | null;
|
|
188
|
+
"unknown_variable_policy": "error" | "literal";
|
|
189
|
+
"created_by_user_id": number | null;
|
|
190
|
+
"created_at": string;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
export type EmailTemplatePage = {
|
|
194
|
+
"data": Array<EmailTemplate>;
|
|
195
|
+
"links": Links;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export type EmailTemplateEnvelope = {
|
|
199
|
+
"data": EmailTemplate;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export type EmailTemplateVersionInput = {
|
|
203
|
+
"expected_version": number;
|
|
204
|
+
"subject_template": string;
|
|
205
|
+
"text_template": string;
|
|
206
|
+
"html_template"?: string | null;
|
|
207
|
+
"unknown_variable_policy"?: "error" | "literal";
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
export type SenderIdentityEvidence = {
|
|
211
|
+
"version": number;
|
|
212
|
+
"source": "provider_api" | "deployment_config";
|
|
213
|
+
"identity_kind": "email_address" | "domain";
|
|
214
|
+
"verification_status": "pending" | "verified" | "failed" | "temporary_failure" | "operator_configured";
|
|
215
|
+
"dkim_status": "pending" | "verified" | "failed" | "not_applicable";
|
|
216
|
+
"mail_from_domain": string | null;
|
|
217
|
+
"mail_from_status": "pending" | "verified" | "failed" | "not_configured";
|
|
218
|
+
"observed_at": string;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
export type SenderIdentity = {
|
|
222
|
+
"id": number;
|
|
223
|
+
"email": string;
|
|
224
|
+
"display_name": string;
|
|
225
|
+
"reply_to_email": string | null;
|
|
226
|
+
"provider": string;
|
|
227
|
+
"provider_identity": string;
|
|
228
|
+
"is_default": boolean;
|
|
229
|
+
"version": number;
|
|
230
|
+
"archived_at": string | null;
|
|
231
|
+
"evidence": SenderIdentityEvidence | null;
|
|
232
|
+
"created_by_user_id": number;
|
|
233
|
+
"created_at": string;
|
|
234
|
+
"updated_at": string;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
export type SenderIdentityPage = {
|
|
238
|
+
"data": Array<SenderIdentity>;
|
|
239
|
+
"links": Links;
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
export type SenderIdentityEnvelope = {
|
|
243
|
+
"data": SenderIdentity;
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
export type SenderIdentityInput = {
|
|
247
|
+
"email": string;
|
|
248
|
+
"display_name": string;
|
|
249
|
+
"reply_to_email"?: string | null;
|
|
250
|
+
"provider": string;
|
|
251
|
+
"provider_identity": string;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
export type SenderIdentityPatch = {
|
|
255
|
+
"expected_version": number;
|
|
256
|
+
"display_name"?: string;
|
|
257
|
+
"reply_to_email"?: string | null;
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
export type SenderIdentityVersionInput = {
|
|
261
|
+
"expected_version": number;
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
export type BackupRun = {
|
|
265
|
+
"id": number;
|
|
266
|
+
"status": "running" | "completed" | "failed";
|
|
267
|
+
"trigger": "nightly" | "manual";
|
|
268
|
+
"started_at": string;
|
|
269
|
+
"completed_at": string | null;
|
|
270
|
+
"r2_prefix": string | null;
|
|
271
|
+
"table_count": number | null;
|
|
272
|
+
"total_rows": number | null;
|
|
273
|
+
"error_message": string | null;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
export type BackupStatusEnvelope = {
|
|
277
|
+
"data": {
|
|
278
|
+
"last_completed": BackupRun | null;
|
|
279
|
+
"last_failed": BackupRun | null;
|
|
280
|
+
"recent_runs": Array<BackupRun>;
|
|
281
|
+
"has_failure": boolean;
|
|
282
|
+
};
|
|
283
|
+
"links": Links;
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
export type QuickBooksConnection = {
|
|
287
|
+
"realm_id": string;
|
|
288
|
+
"company_name": string | null;
|
|
289
|
+
"scope": string;
|
|
290
|
+
"allow_online_payment": boolean;
|
|
291
|
+
"connected_at": string;
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
export type QuickBooksStatusEnvelope = {
|
|
295
|
+
"data": {
|
|
296
|
+
"configured": boolean;
|
|
297
|
+
"connection": QuickBooksConnection | null;
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
export type QuickBooksAuthorizeEnvelope = {
|
|
302
|
+
"data": {
|
|
303
|
+
"authorize_url": string;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
export type QuickBooksConnectionEnvelope = {
|
|
308
|
+
"data": QuickBooksConnection | null;
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
export type QuickBooksSettingsInput = {
|
|
312
|
+
"allow_online_payment": boolean;
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
export type SenderEvidenceRefreshInput = {
|
|
316
|
+
"expected_evidence_version": number;
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
export type EmailTestSendInput = {
|
|
320
|
+
"template_kind": "invoice" | "reminder" | "thank_you";
|
|
321
|
+
"template_version": number;
|
|
322
|
+
"variables": {
|
|
323
|
+
[key: string]: string;
|
|
324
|
+
};
|
|
325
|
+
"confirmed": true;
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
export type EmailTestSend = {
|
|
329
|
+
"status": "queued";
|
|
330
|
+
"delivery_id": number;
|
|
331
|
+
"sender_identity_id": number;
|
|
332
|
+
"template_kind": "invoice" | "reminder" | "thank_you";
|
|
333
|
+
"template_version": number;
|
|
334
|
+
"recipient_email": string;
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
export type EmailTestSendEnvelope = {
|
|
338
|
+
"data": EmailTestSend;
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
export type OutboxAggregate = {
|
|
342
|
+
"type": string;
|
|
343
|
+
"id": number;
|
|
344
|
+
"sequence": number;
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
export type ActivityLog = {
|
|
348
|
+
"event_id": string;
|
|
349
|
+
"event_type": string;
|
|
350
|
+
"aggregate": OutboxAggregate;
|
|
351
|
+
"payload": {
|
|
352
|
+
[key: string]: unknown;
|
|
353
|
+
};
|
|
354
|
+
"occurred_at": string;
|
|
355
|
+
"available_at": string;
|
|
356
|
+
"recorded_at": string;
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
export type ActivityLogPage = {
|
|
360
|
+
"data": Array<ActivityLog>;
|
|
361
|
+
"links": Links;
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
export type OutboxDelivery = {
|
|
365
|
+
"subscriber_id": string;
|
|
366
|
+
"event_id": string;
|
|
367
|
+
"event_type": string;
|
|
368
|
+
"aggregate": OutboxAggregate;
|
|
369
|
+
"status": "pending" | "processing" | "delivered" | "failed";
|
|
370
|
+
"attempt_count": number;
|
|
371
|
+
"next_attempt_at": string | null;
|
|
372
|
+
"last_error_code": "subscriber_timeout" | "subscriber_rejected" | null;
|
|
373
|
+
"delivered_at": string | null;
|
|
374
|
+
"failed_at": string | null;
|
|
375
|
+
"occurred_at": string;
|
|
376
|
+
"created_at": string;
|
|
377
|
+
"updated_at": string;
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
export type OutboxDeliveryPage = {
|
|
381
|
+
"data": Array<OutboxDelivery>;
|
|
382
|
+
"links": Links;
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
export type OutboxDeliveryEnvelope = {
|
|
386
|
+
"data": OutboxDelivery;
|
|
387
|
+
"links": Links;
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
export type Links = {
|
|
391
|
+
"self": string;
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
export type PageLinks = {
|
|
395
|
+
"self": string;
|
|
396
|
+
"next": string | null;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
export type PageMetadata = {
|
|
400
|
+
"per_page": number;
|
|
401
|
+
"next_cursor": string | null;
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
export type Service = {
|
|
405
|
+
"service": "ezacto";
|
|
406
|
+
"version": "v1";
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
export type ServiceEnvelope = {
|
|
410
|
+
"data": Service;
|
|
411
|
+
"links": Links;
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
export type TokenAuthentication = {
|
|
415
|
+
"kind": "token";
|
|
416
|
+
"token_id": number;
|
|
417
|
+
"scopes": Array<"time_entries:read" | "time_entries:write" | "projects:read" | "projects:write" | "clients:read" | "clients:write" | "invoices:read" | "invoices:write" | "expenses:read" | "expenses:write" | "team:read" | "schedule:read" | "schedule:write" | "reports:read">;
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
export type SessionAuthentication = {
|
|
421
|
+
"kind": "session";
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
export type Whoami = {
|
|
425
|
+
"user_id": number;
|
|
426
|
+
"profile": "member" | "project_manager" | "people_admin" | "accounting" | "executive_manager" | "administrator";
|
|
427
|
+
"manager_grants": Array<string>;
|
|
428
|
+
"authentication": TokenAuthentication | SessionAuthentication;
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
export type WhoamiEnvelope = {
|
|
432
|
+
"data": Whoami;
|
|
433
|
+
"links": Links;
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
export type GeneralResource = {
|
|
437
|
+
"id": number;
|
|
438
|
+
"created_at": string;
|
|
439
|
+
"updated_at": string;
|
|
440
|
+
[key: string]: unknown;
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
export type GeneralMutationInput = {
|
|
444
|
+
[key: string]: unknown;
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
export type GeneralResourceEnvelope = {
|
|
448
|
+
"data": GeneralResource;
|
|
449
|
+
"links": Links;
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
export type GeneralResourcePage = {
|
|
453
|
+
"data": Array<GeneralResource>;
|
|
454
|
+
"links": PageLinks;
|
|
455
|
+
"page": PageMetadata;
|
|
456
|
+
};
|
|
457
|
+
|
|
458
|
+
export type ExpenseCategory = {
|
|
459
|
+
"id": number;
|
|
460
|
+
"name": string;
|
|
461
|
+
"unit_name": string | null;
|
|
462
|
+
"unit_price_cents": number | null;
|
|
463
|
+
"is_active": boolean;
|
|
464
|
+
"created_at": string;
|
|
465
|
+
"updated_at": string;
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
export type ExpenseCategoryInput = {
|
|
469
|
+
"name": string;
|
|
470
|
+
"unit_name"?: string | null;
|
|
471
|
+
"unit_price_cents"?: number | null;
|
|
472
|
+
"is_active"?: boolean;
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
export type ExpenseCategoryPatch = {
|
|
476
|
+
"name"?: string;
|
|
477
|
+
"unit_name"?: string | null;
|
|
478
|
+
"unit_price_cents"?: number | null;
|
|
479
|
+
"is_active"?: boolean;
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
export type ExpenseCategoryEnvelope = {
|
|
483
|
+
"data": ExpenseCategory;
|
|
484
|
+
"links": Links;
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
export type ExpenseCategoryPage = {
|
|
488
|
+
"data": Array<ExpenseCategory>;
|
|
489
|
+
"links": PageLinks;
|
|
490
|
+
"page": PageMetadata;
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
export type UserRate = {
|
|
494
|
+
"id": number;
|
|
495
|
+
"user_id": number;
|
|
496
|
+
"amount_cents": number;
|
|
497
|
+
"start_date": string | null;
|
|
498
|
+
"end_date": string | null;
|
|
499
|
+
"created_at": string;
|
|
500
|
+
"updated_at": string;
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
export type UserRateInput = {
|
|
504
|
+
"expected_version": number;
|
|
505
|
+
"amount_cents": number;
|
|
506
|
+
"start_date"?: string | null;
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
export type UserRateEnvelope = {
|
|
510
|
+
"data": UserRate;
|
|
511
|
+
"links": Links;
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
export type UserRatePage = {
|
|
515
|
+
"data": Array<UserRate>;
|
|
516
|
+
"links": PageLinks;
|
|
517
|
+
"page": PageMetadata;
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
export type TeamStatus = {
|
|
521
|
+
"enabled": boolean;
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
export type TeamStatusEnvelope = {
|
|
525
|
+
"data": TeamStatus;
|
|
526
|
+
"links": Links;
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
export type TeamNamedRelation = {
|
|
530
|
+
"id": number;
|
|
531
|
+
"name": string;
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
export type TeamPersonSummary = {
|
|
535
|
+
"id": number;
|
|
536
|
+
"first_name": string;
|
|
537
|
+
"last_name": string;
|
|
538
|
+
"email": string | null;
|
|
539
|
+
"avatar_url": string | null;
|
|
540
|
+
"profile": "member" | "project_manager" | "people_admin" | "accounting" | "executive_manager" | "administrator";
|
|
541
|
+
"is_owner": boolean;
|
|
542
|
+
"is_contractor": boolean;
|
|
543
|
+
"is_active": boolean;
|
|
544
|
+
"weekly_capacity": number;
|
|
545
|
+
"total_seconds": number;
|
|
546
|
+
"billable_seconds": number;
|
|
547
|
+
"nonbillable_seconds": number;
|
|
548
|
+
"utilization_ppm": number | null;
|
|
549
|
+
"running": boolean;
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
export type TeamPersonSummaryPage = {
|
|
553
|
+
"data": Array<TeamPersonSummary>;
|
|
554
|
+
"links": PageLinks;
|
|
555
|
+
"page": PageMetadata;
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
export type TeamProjectAssignment = {
|
|
559
|
+
"id": number;
|
|
560
|
+
"project_id": number;
|
|
561
|
+
"project_name": string;
|
|
562
|
+
"project_code": string;
|
|
563
|
+
"client_id": number;
|
|
564
|
+
"client_name": string;
|
|
565
|
+
"is_active": boolean;
|
|
566
|
+
"is_project_manager": boolean;
|
|
567
|
+
"use_default_rates": boolean;
|
|
568
|
+
"hourly_rate_cents"?: number | null;
|
|
569
|
+
"budget_seconds": number | null;
|
|
570
|
+
"updated_at": string;
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
export type TeamNotificationChannels = {
|
|
574
|
+
"email": boolean;
|
|
575
|
+
"desktop": boolean;
|
|
576
|
+
"slack": boolean;
|
|
577
|
+
};
|
|
578
|
+
|
|
579
|
+
export type TeamInactiveNotificationChannels = {
|
|
580
|
+
"email": false;
|
|
581
|
+
"desktop": false;
|
|
582
|
+
"slack": false;
|
|
583
|
+
};
|
|
584
|
+
|
|
585
|
+
export type TeamNotificationPreference = {
|
|
586
|
+
"delivery_active": false;
|
|
587
|
+
"daily_reminder_enabled": boolean;
|
|
588
|
+
"reminder_time": string | null;
|
|
589
|
+
"reminder_days": Array<"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday">;
|
|
590
|
+
"channels": TeamNotificationChannels;
|
|
591
|
+
"include_in_team_reminders": boolean;
|
|
592
|
+
"weekly_digest": boolean;
|
|
593
|
+
"notify_project_deleted": boolean;
|
|
594
|
+
"updated_at": string;
|
|
595
|
+
};
|
|
596
|
+
|
|
597
|
+
export type TeamPerson = {
|
|
598
|
+
"id": number;
|
|
599
|
+
"first_name": string;
|
|
600
|
+
"last_name": string;
|
|
601
|
+
"email": string | null;
|
|
602
|
+
"telephone": string | null;
|
|
603
|
+
"employee_id": string | null;
|
|
604
|
+
"timezone": string;
|
|
605
|
+
"is_contractor": boolean;
|
|
606
|
+
"is_active": boolean;
|
|
607
|
+
"has_access_to_all_future_projects": boolean;
|
|
608
|
+
"weekly_capacity": number;
|
|
609
|
+
"profile": "member" | "project_manager" | "people_admin" | "accounting" | "executive_manager" | "administrator";
|
|
610
|
+
"is_owner": boolean;
|
|
611
|
+
"avatar_url": string | null;
|
|
612
|
+
"version": number;
|
|
613
|
+
"created_at": string;
|
|
614
|
+
"updated_at": string;
|
|
615
|
+
"roles": Array<TeamNamedRelation>;
|
|
616
|
+
"departments": Array<TeamNamedRelation>;
|
|
617
|
+
"project_assignments": Array<TeamProjectAssignment>;
|
|
618
|
+
"billable_rates"?: Array<UserRate>;
|
|
619
|
+
"cost_rates"?: Array<UserRate>;
|
|
620
|
+
"notifications": TeamNotificationPreference;
|
|
621
|
+
};
|
|
622
|
+
|
|
623
|
+
export type TeamPersonEnvelope = {
|
|
624
|
+
"data": TeamPerson;
|
|
625
|
+
"links": Links;
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
export type TeamCatalogProject = {
|
|
629
|
+
"id": number;
|
|
630
|
+
"name": string;
|
|
631
|
+
"code": string;
|
|
632
|
+
"client_id": number;
|
|
633
|
+
"client_name": string;
|
|
634
|
+
"is_active": boolean;
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
export type TeamCatalog = {
|
|
638
|
+
"roles": Array<TeamNamedRelation>;
|
|
639
|
+
"departments": Array<TeamNamedRelation>;
|
|
640
|
+
"projects": Array<TeamCatalogProject>;
|
|
641
|
+
};
|
|
642
|
+
|
|
643
|
+
export type TeamCatalogEnvelope = {
|
|
644
|
+
"data": TeamCatalog;
|
|
645
|
+
"links": Links;
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
export type TeamPersonPatch = {
|
|
649
|
+
"expected_version": number;
|
|
650
|
+
"first_name"?: string;
|
|
651
|
+
"last_name"?: string;
|
|
652
|
+
"telephone"?: string | null;
|
|
653
|
+
"employee_id"?: string | null;
|
|
654
|
+
"timezone"?: string;
|
|
655
|
+
"is_contractor"?: boolean;
|
|
656
|
+
"is_active"?: boolean;
|
|
657
|
+
"has_access_to_all_future_projects"?: boolean;
|
|
658
|
+
"weekly_capacity"?: number;
|
|
659
|
+
"profile"?: "member" | "project_manager" | "people_admin" | "accounting" | "executive_manager" | "administrator";
|
|
660
|
+
"role_ids"?: Array<number>;
|
|
661
|
+
"department_ids"?: Array<number>;
|
|
662
|
+
};
|
|
663
|
+
|
|
664
|
+
export type TeamAssignmentInput = {
|
|
665
|
+
"project_id": number;
|
|
666
|
+
"is_project_manager": boolean;
|
|
667
|
+
};
|
|
668
|
+
|
|
669
|
+
export type TeamAssignmentReplaceInput = {
|
|
670
|
+
"expected_version": number;
|
|
671
|
+
"assignments": Array<TeamAssignmentInput>;
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
export type TeamNotificationInput = {
|
|
675
|
+
"expected_version": number;
|
|
676
|
+
"daily_reminder_enabled": false;
|
|
677
|
+
"reminder_time": string | null;
|
|
678
|
+
"reminder_days": Array<"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday">;
|
|
679
|
+
"channels": TeamInactiveNotificationChannels;
|
|
680
|
+
"include_in_team_reminders": false;
|
|
681
|
+
"weekly_digest": false;
|
|
682
|
+
"notify_project_deleted": false;
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
export type TeamRateInput = {
|
|
686
|
+
"expected_version": number;
|
|
687
|
+
"kind": "billable" | "cost";
|
|
688
|
+
"amount_cents": number;
|
|
689
|
+
"start_date": string | null;
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
export type TeamCommandReceipt = {
|
|
693
|
+
"target_user_id": number;
|
|
694
|
+
"version": number;
|
|
695
|
+
"resource_id": number | null;
|
|
696
|
+
"occurred_at": string;
|
|
697
|
+
};
|
|
698
|
+
|
|
699
|
+
export type TeamCommandReceiptEnvelope = {
|
|
700
|
+
"data": TeamCommandReceipt;
|
|
701
|
+
"links": Links;
|
|
702
|
+
};
|
|
703
|
+
|
|
704
|
+
export type ApiToken = {
|
|
705
|
+
"id": number;
|
|
706
|
+
"name": string;
|
|
707
|
+
"scopes": Array<"time_entries:read" | "time_entries:write" | "projects:read" | "projects:write" | "clients:read" | "clients:write" | "invoices:read" | "invoices:write" | "expenses:read" | "expenses:write" | "team:read" | "schedule:read" | "schedule:write" | "reports:read">;
|
|
708
|
+
"token_hint": string;
|
|
709
|
+
"created_at": string;
|
|
710
|
+
"last_used_at": string | null;
|
|
711
|
+
"expires_at": string | null;
|
|
712
|
+
"revoked_at": string | null;
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
export type IssuedApiToken = (ApiToken) & ({
|
|
716
|
+
"token": string;
|
|
717
|
+
});
|
|
718
|
+
|
|
719
|
+
export type CreateApiTokenInput = {
|
|
720
|
+
"name": string;
|
|
721
|
+
"scopes": Array<"time_entries:read" | "time_entries:write" | "projects:read" | "projects:write" | "clients:read" | "clients:write" | "invoices:read" | "invoices:write" | "expenses:read" | "expenses:write" | "team:read" | "schedule:read" | "schedule:write" | "reports:read">;
|
|
722
|
+
"expires_at"?: string | null;
|
|
723
|
+
};
|
|
724
|
+
|
|
725
|
+
export type ApiTokenEnvelope = {
|
|
726
|
+
"data": ApiToken;
|
|
727
|
+
"links": Links;
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
export type IssuedApiTokenEnvelope = {
|
|
731
|
+
"data": IssuedApiToken;
|
|
732
|
+
"links": Links;
|
|
733
|
+
};
|
|
734
|
+
|
|
735
|
+
export type ApiTokenListEnvelope = {
|
|
736
|
+
"data": Array<ApiToken>;
|
|
737
|
+
"links": Links;
|
|
738
|
+
};
|
|
739
|
+
|
|
740
|
+
export type TimeEntry = {
|
|
741
|
+
"id": number;
|
|
742
|
+
"user_id": number;
|
|
743
|
+
"project_id": number;
|
|
744
|
+
"task_id": number;
|
|
745
|
+
"user_assignment_id"?: number;
|
|
746
|
+
"task_assignment_id"?: number;
|
|
747
|
+
"spent_date": string;
|
|
748
|
+
"seconds": number;
|
|
749
|
+
"seconds_without_timer"?: number;
|
|
750
|
+
"rounded_seconds"?: number;
|
|
751
|
+
"is_running": boolean;
|
|
752
|
+
"timer_started_at"?: string | null;
|
|
753
|
+
"started_time"?: string | null;
|
|
754
|
+
"ended_time"?: string | null;
|
|
755
|
+
"notes"?: string | null;
|
|
756
|
+
"billable": boolean;
|
|
757
|
+
"budgeted": boolean;
|
|
758
|
+
"approval_status": "unsubmitted" | "submitted" | "approved";
|
|
759
|
+
"source_approval_status"?: "unsubmitted" | "submitted" | "approved" | null;
|
|
760
|
+
"invoice_id"?: number | null;
|
|
761
|
+
"is_billed"?: boolean;
|
|
762
|
+
"is_locked": boolean;
|
|
763
|
+
"locked_reason_code"?: string | null;
|
|
764
|
+
"locked_reason"?: string | null;
|
|
765
|
+
"external_ref"?: {
|
|
766
|
+
[key: string]: unknown;
|
|
767
|
+
} | null;
|
|
768
|
+
"calendar_event_ref"?: {
|
|
769
|
+
[key: string]: unknown;
|
|
770
|
+
} | null;
|
|
771
|
+
"minimum_note_length": number;
|
|
772
|
+
"billable_rate_cents"?: number | null;
|
|
773
|
+
"cost_rate_cents"?: number | null;
|
|
774
|
+
"created_at": string;
|
|
775
|
+
"updated_at": string;
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
export type TimeEntryInput = {
|
|
779
|
+
"project_id": number;
|
|
780
|
+
"task_id": number;
|
|
781
|
+
"spent_date"?: string;
|
|
782
|
+
"seconds"?: number;
|
|
783
|
+
"started_time"?: string;
|
|
784
|
+
"ended_time"?: string;
|
|
785
|
+
"notes"?: string | null;
|
|
786
|
+
"budgeted"?: boolean;
|
|
787
|
+
"external_ref"?: {
|
|
788
|
+
[key: string]: unknown;
|
|
789
|
+
} | null;
|
|
790
|
+
"calendar_event_ref"?: {
|
|
791
|
+
[key: string]: unknown;
|
|
792
|
+
} | null;
|
|
793
|
+
};
|
|
794
|
+
|
|
795
|
+
export type TimeEntryPatch = {
|
|
796
|
+
"project_id"?: number;
|
|
797
|
+
"task_id"?: number;
|
|
798
|
+
"spent_date"?: string;
|
|
799
|
+
"seconds"?: number;
|
|
800
|
+
"started_time"?: string;
|
|
801
|
+
"ended_time"?: string;
|
|
802
|
+
"notes"?: string | null;
|
|
803
|
+
"budgeted"?: boolean;
|
|
804
|
+
"external_ref"?: {
|
|
805
|
+
[key: string]: unknown;
|
|
806
|
+
} | null;
|
|
807
|
+
"calendar_event_ref"?: {
|
|
808
|
+
[key: string]: unknown;
|
|
809
|
+
} | null;
|
|
810
|
+
};
|
|
811
|
+
|
|
812
|
+
export type TimeEntryEnvelope = {
|
|
813
|
+
"data": TimeEntry;
|
|
814
|
+
"links": Links;
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
export type TimeEntryPage = {
|
|
818
|
+
"data": Array<TimeEntry>;
|
|
819
|
+
"links": PageLinks;
|
|
820
|
+
"page": PageMetadata;
|
|
821
|
+
};
|
|
822
|
+
|
|
823
|
+
export type TimeEntrySettings = {
|
|
824
|
+
"time_entry_mode": "duration" | "start_end";
|
|
825
|
+
"time_format": "decimal" | "hours_minutes";
|
|
826
|
+
"clock": "12h" | "24h";
|
|
827
|
+
"week_start_day": "saturday" | "sunday" | "monday";
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
export type TimeEntrySettingsEnvelope = {
|
|
831
|
+
"data": TimeEntrySettings;
|
|
832
|
+
"links": Links;
|
|
833
|
+
};
|
|
834
|
+
|
|
835
|
+
export type TimeEntryNoteSettings = {
|
|
836
|
+
"required": boolean;
|
|
837
|
+
"minimum_length": number;
|
|
838
|
+
};
|
|
839
|
+
|
|
840
|
+
export type TimeEntryNoteSettingsPatch = {
|
|
841
|
+
"required"?: boolean;
|
|
842
|
+
"minimum_length"?: number;
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
export type TimeEntryNoteSettingsEnvelope = {
|
|
846
|
+
"data": TimeEntryNoteSettings;
|
|
847
|
+
"links": Links;
|
|
848
|
+
};
|
|
849
|
+
|
|
850
|
+
export type TimeEntryOption = {
|
|
851
|
+
"project_id": number;
|
|
852
|
+
"task_id": number;
|
|
853
|
+
"minimum_note_length": number;
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
export type TimeEntryOptionListEnvelope = {
|
|
857
|
+
"data": Array<TimeEntryOption>;
|
|
858
|
+
"links": Links;
|
|
859
|
+
};
|
|
860
|
+
|
|
861
|
+
export type TimesheetSubmission = {
|
|
862
|
+
"id": number;
|
|
863
|
+
"user_id": number;
|
|
864
|
+
"user_name": string;
|
|
865
|
+
"period_start": string;
|
|
866
|
+
"period_end": string;
|
|
867
|
+
"status": "unsubmitted" | "submitted" | "approved";
|
|
868
|
+
"origin": "native" | "harvest_import" | "legacy_backfill";
|
|
869
|
+
"source_status": "submitted" | "approved" | null;
|
|
870
|
+
"source_observed_at": string | null;
|
|
871
|
+
"submitted_by_user_id": number | null;
|
|
872
|
+
"submitted_at": string | null;
|
|
873
|
+
"reviewed_by_user_id": number | null;
|
|
874
|
+
"reviewed_at": string | null;
|
|
875
|
+
"rejection_reason": string | null;
|
|
876
|
+
"version": number;
|
|
877
|
+
"entry_count": number;
|
|
878
|
+
"expense_count": number;
|
|
879
|
+
"total_seconds": number;
|
|
880
|
+
"billable_seconds": number;
|
|
881
|
+
"nonbillable_seconds": number;
|
|
882
|
+
"created_at": string;
|
|
883
|
+
"updated_at": string;
|
|
884
|
+
};
|
|
885
|
+
|
|
886
|
+
export type TimesheetSubmissionInput = {
|
|
887
|
+
"period_start": string;
|
|
888
|
+
"period_end": string;
|
|
889
|
+
};
|
|
890
|
+
|
|
891
|
+
export type TimesheetSubmissionEntry = {
|
|
892
|
+
"id": number;
|
|
893
|
+
"spent_date": string;
|
|
894
|
+
"project_id": number;
|
|
895
|
+
"project_name": string;
|
|
896
|
+
"task_id": number;
|
|
897
|
+
"task_name": string;
|
|
898
|
+
"seconds": number;
|
|
899
|
+
"notes": string | null;
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
export type TimesheetSubmissionExpense = {
|
|
903
|
+
"id": number;
|
|
904
|
+
"spent_date": string;
|
|
905
|
+
"project_id": number;
|
|
906
|
+
"project_name": string;
|
|
907
|
+
"expense_category_id": number;
|
|
908
|
+
"expense_category_name": string;
|
|
909
|
+
"total_cost_cents": number;
|
|
910
|
+
"currency": string;
|
|
911
|
+
"notes": string | null;
|
|
912
|
+
};
|
|
913
|
+
|
|
914
|
+
export type TimesheetSubmissionDetail = {
|
|
915
|
+
"id": number;
|
|
916
|
+
"user_id": number;
|
|
917
|
+
"user_name": string;
|
|
918
|
+
"period_start": string;
|
|
919
|
+
"period_end": string;
|
|
920
|
+
"status": "unsubmitted" | "submitted" | "approved";
|
|
921
|
+
"origin": "native" | "harvest_import" | "legacy_backfill";
|
|
922
|
+
"source_status": "submitted" | "approved" | null;
|
|
923
|
+
"source_observed_at": string | null;
|
|
924
|
+
"submitted_by_user_id": number | null;
|
|
925
|
+
"submitted_at": string | null;
|
|
926
|
+
"reviewed_by_user_id": number | null;
|
|
927
|
+
"reviewed_at": string | null;
|
|
928
|
+
"rejection_reason": string | null;
|
|
929
|
+
"version": number;
|
|
930
|
+
"entry_count": number;
|
|
931
|
+
"expense_count": number;
|
|
932
|
+
"total_seconds": number;
|
|
933
|
+
"billable_seconds": number;
|
|
934
|
+
"nonbillable_seconds": number;
|
|
935
|
+
"created_at": string;
|
|
936
|
+
"updated_at": string;
|
|
937
|
+
"entries": Array<TimesheetSubmissionEntry>;
|
|
938
|
+
"expenses": Array<TimesheetSubmissionExpense>;
|
|
939
|
+
};
|
|
940
|
+
|
|
941
|
+
export type TimesheetRejectionInput = {
|
|
942
|
+
"reason": string;
|
|
943
|
+
};
|
|
944
|
+
|
|
945
|
+
export type TimesheetWithdrawalInput = {
|
|
946
|
+
"reason": string;
|
|
947
|
+
};
|
|
948
|
+
|
|
949
|
+
export type TimesheetBulkApprovalInput = {
|
|
950
|
+
"submissions": Array<{
|
|
951
|
+
"id": number;
|
|
952
|
+
"expected_version": number;
|
|
953
|
+
}>;
|
|
954
|
+
};
|
|
955
|
+
|
|
956
|
+
export type TimesheetBulkApprovalResult = {
|
|
957
|
+
"data": Array<TimesheetSubmission>;
|
|
958
|
+
"links": Links;
|
|
959
|
+
};
|
|
960
|
+
|
|
961
|
+
export type TimesheetSubmissionEnvelope = {
|
|
962
|
+
"data": TimesheetSubmission;
|
|
963
|
+
"links": Links;
|
|
964
|
+
};
|
|
965
|
+
|
|
966
|
+
export type TimesheetSubmissionDetailEnvelope = {
|
|
967
|
+
"data": TimesheetSubmissionDetail;
|
|
968
|
+
"links": Links;
|
|
969
|
+
};
|
|
970
|
+
|
|
971
|
+
export type TimesheetSubmissionPage = {
|
|
972
|
+
"data": Array<TimesheetSubmission>;
|
|
973
|
+
"links": PageLinks;
|
|
974
|
+
"page": PageMetadata;
|
|
975
|
+
};
|
|
976
|
+
|
|
977
|
+
export type TimesheetDeadline = {
|
|
978
|
+
"day": "sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday";
|
|
979
|
+
"time": string;
|
|
980
|
+
};
|
|
981
|
+
|
|
982
|
+
export type TimesheetLockPolicy = {
|
|
983
|
+
"auto_lock": boolean;
|
|
984
|
+
"timesheet_deadline": TimesheetDeadline | null;
|
|
985
|
+
"timezone": string;
|
|
986
|
+
"week_start_day": "saturday" | "sunday" | "monday";
|
|
987
|
+
"updated_at": string;
|
|
988
|
+
};
|
|
989
|
+
|
|
990
|
+
export type TimesheetLockPolicyPatch = {
|
|
991
|
+
"auto_lock"?: boolean;
|
|
992
|
+
"timesheet_deadline"?: TimesheetDeadline | null;
|
|
993
|
+
"timezone"?: string;
|
|
994
|
+
};
|
|
995
|
+
|
|
996
|
+
export type TimesheetLockPolicyEnvelope = {
|
|
997
|
+
"data": TimesheetLockPolicy;
|
|
998
|
+
"links": Links;
|
|
999
|
+
};
|
|
1000
|
+
|
|
1001
|
+
export type TimesheetLockWindow = {
|
|
1002
|
+
"id": number;
|
|
1003
|
+
"kind": "manual" | "auto";
|
|
1004
|
+
"period_start": string | null;
|
|
1005
|
+
"period_end": string;
|
|
1006
|
+
"reason": string;
|
|
1007
|
+
"locked_by_user_id": number | null;
|
|
1008
|
+
"locked_at": string;
|
|
1009
|
+
"unlocked_by_user_id": number | null;
|
|
1010
|
+
"unlocked_at": string | null;
|
|
1011
|
+
"unlock_reason": string | null;
|
|
1012
|
+
"active": boolean;
|
|
1013
|
+
};
|
|
1014
|
+
|
|
1015
|
+
export type TimesheetManualLockInput = {
|
|
1016
|
+
"locked_through": string;
|
|
1017
|
+
"reason": string;
|
|
1018
|
+
};
|
|
1019
|
+
|
|
1020
|
+
export type TimesheetUnlockInput = {
|
|
1021
|
+
"reason": string;
|
|
1022
|
+
};
|
|
1023
|
+
|
|
1024
|
+
export type TimesheetLockWindowEnvelope = {
|
|
1025
|
+
"data": TimesheetLockWindow;
|
|
1026
|
+
"links": Links;
|
|
1027
|
+
};
|
|
1028
|
+
|
|
1029
|
+
export type TimesheetLockWindowPage = {
|
|
1030
|
+
"data": Array<TimesheetLockWindow>;
|
|
1031
|
+
"links": PageLinks;
|
|
1032
|
+
"page": PageMetadata;
|
|
1033
|
+
};
|
|
1034
|
+
|
|
1035
|
+
export type Expense = {
|
|
1036
|
+
"id": number;
|
|
1037
|
+
"user_id": number;
|
|
1038
|
+
"project_id": number;
|
|
1039
|
+
"expense_category_id": number;
|
|
1040
|
+
"spent_date": string;
|
|
1041
|
+
"notes"?: string | null;
|
|
1042
|
+
"units"?: number | null;
|
|
1043
|
+
"total_cost_cents": number;
|
|
1044
|
+
"billable": boolean;
|
|
1045
|
+
"approval_status": "unsubmitted" | "submitted" | "approved";
|
|
1046
|
+
"source_approval_status"?: "unsubmitted" | "submitted" | "approved" | null;
|
|
1047
|
+
"invoice_id"?: number | null;
|
|
1048
|
+
"is_billed"?: boolean;
|
|
1049
|
+
"is_locked": boolean;
|
|
1050
|
+
"locked_reason_code"?: string | null;
|
|
1051
|
+
"locked_reason"?: string | null;
|
|
1052
|
+
"reimbursable": boolean;
|
|
1053
|
+
"reimbursement_status": "none" | "pending" | "approved" | "paid";
|
|
1054
|
+
"payout_ref"?: string | null;
|
|
1055
|
+
"created_at": string;
|
|
1056
|
+
"updated_at": string;
|
|
1057
|
+
};
|
|
1058
|
+
|
|
1059
|
+
export type ExpenseInput = {
|
|
1060
|
+
"project_id": number;
|
|
1061
|
+
"expense_category_id": number;
|
|
1062
|
+
"spent_date": string;
|
|
1063
|
+
"notes"?: string | null;
|
|
1064
|
+
"units"?: number;
|
|
1065
|
+
"total_cost_cents"?: number;
|
|
1066
|
+
"billable"?: boolean;
|
|
1067
|
+
"reimbursable"?: boolean;
|
|
1068
|
+
};
|
|
1069
|
+
|
|
1070
|
+
export type ExpensePatch = {
|
|
1071
|
+
"project_id"?: number;
|
|
1072
|
+
"expense_category_id"?: number;
|
|
1073
|
+
"spent_date"?: string;
|
|
1074
|
+
"notes"?: string | null;
|
|
1075
|
+
"units"?: number;
|
|
1076
|
+
"total_cost_cents"?: number;
|
|
1077
|
+
"billable"?: boolean;
|
|
1078
|
+
"reimbursable"?: boolean;
|
|
1079
|
+
};
|
|
1080
|
+
|
|
1081
|
+
export type ExpenseEnvelope = {
|
|
1082
|
+
"data": Expense;
|
|
1083
|
+
"links": Links;
|
|
1084
|
+
};
|
|
1085
|
+
|
|
1086
|
+
export type ExpensePage = {
|
|
1087
|
+
"data": Array<Expense>;
|
|
1088
|
+
"links": PageLinks;
|
|
1089
|
+
"page": PageMetadata;
|
|
1090
|
+
};
|
|
1091
|
+
|
|
1092
|
+
export type InvoiceLine = {
|
|
1093
|
+
"id": number;
|
|
1094
|
+
"invoice_id": number;
|
|
1095
|
+
"position": number;
|
|
1096
|
+
"kind": string;
|
|
1097
|
+
"description": string | null;
|
|
1098
|
+
"quantity": number;
|
|
1099
|
+
"unit_price_cents": number;
|
|
1100
|
+
"amount_cents": number;
|
|
1101
|
+
"taxed": boolean;
|
|
1102
|
+
"taxed2": boolean;
|
|
1103
|
+
"project_id": number | null;
|
|
1104
|
+
"created_at": string;
|
|
1105
|
+
"updated_at": string;
|
|
1106
|
+
};
|
|
1107
|
+
|
|
1108
|
+
export type Invoice = {
|
|
1109
|
+
"id": number;
|
|
1110
|
+
"client_id": number;
|
|
1111
|
+
"created_by_user_id": number | null;
|
|
1112
|
+
"number": string;
|
|
1113
|
+
"subject": string | null;
|
|
1114
|
+
"purchase_order": string | null;
|
|
1115
|
+
"notes": string | null;
|
|
1116
|
+
"currency": string;
|
|
1117
|
+
"issue_date": string;
|
|
1118
|
+
"due_date": string;
|
|
1119
|
+
"payment_terms": "upon_receipt" | "net_15" | "net_30" | "net_45" | "net_60" | "custom";
|
|
1120
|
+
"state": "draft" | "open" | "paid" | "closed";
|
|
1121
|
+
"version": number;
|
|
1122
|
+
"close_reason": "cancelled" | "written_off" | "source_closed" | null;
|
|
1123
|
+
"close_write_off_cents": number;
|
|
1124
|
+
"sent_at": string | null;
|
|
1125
|
+
"paid_at": string | null;
|
|
1126
|
+
"paid_date": string | null;
|
|
1127
|
+
"closed_at": string | null;
|
|
1128
|
+
"period_start": string | null;
|
|
1129
|
+
"period_end": string | null;
|
|
1130
|
+
"project_id": number | null;
|
|
1131
|
+
"retainer_id": number | null;
|
|
1132
|
+
"recurring_invoice_id": number | null;
|
|
1133
|
+
"estimate_id": number | null;
|
|
1134
|
+
"reminder_policy": InvoiceReminderPolicy | null;
|
|
1135
|
+
"tax_rate_ppm": number | null;
|
|
1136
|
+
"tax2_rate_ppm": number | null;
|
|
1137
|
+
"discount_rate_ppm": number | null;
|
|
1138
|
+
"amount_cents": number;
|
|
1139
|
+
"due_amount_cents": number;
|
|
1140
|
+
"tax_amount_cents": number;
|
|
1141
|
+
"tax2_amount_cents": number;
|
|
1142
|
+
"discount_amount_cents": number;
|
|
1143
|
+
"written_off_cents": number;
|
|
1144
|
+
"payment_options": Array<"stripe_checkout" | "paypal_checkout" | "quickbooks_checkout" | "mercury_transfer" | "wise_transfer">;
|
|
1145
|
+
"reference_token": string | null;
|
|
1146
|
+
"created_at": string;
|
|
1147
|
+
"updated_at": string;
|
|
1148
|
+
"line_items": Array<InvoiceLine>;
|
|
1149
|
+
};
|
|
1150
|
+
|
|
1151
|
+
export type InvoiceEnvelope = {
|
|
1152
|
+
"data": Invoice;
|
|
1153
|
+
"links": Links;
|
|
1154
|
+
};
|
|
1155
|
+
|
|
1156
|
+
export type InvoicePage = {
|
|
1157
|
+
"data": Array<Invoice>;
|
|
1158
|
+
"links": PageLinks;
|
|
1159
|
+
"page": PageMetadata;
|
|
1160
|
+
};
|
|
1161
|
+
|
|
1162
|
+
export type EstimateLine = {
|
|
1163
|
+
"id": number;
|
|
1164
|
+
"estimate_id": number;
|
|
1165
|
+
"position": number;
|
|
1166
|
+
"kind": string;
|
|
1167
|
+
"description": string | null;
|
|
1168
|
+
"quantity": number;
|
|
1169
|
+
"unit_price_cents": number;
|
|
1170
|
+
"amount_cents": number;
|
|
1171
|
+
"taxed": boolean;
|
|
1172
|
+
"taxed2": boolean;
|
|
1173
|
+
"created_at": string;
|
|
1174
|
+
"updated_at": string;
|
|
1175
|
+
};
|
|
1176
|
+
|
|
1177
|
+
export type Estimate = {
|
|
1178
|
+
"id": number;
|
|
1179
|
+
"client_id": number;
|
|
1180
|
+
"created_by_user_id": number | null;
|
|
1181
|
+
"number": string;
|
|
1182
|
+
"purchase_order": string | null;
|
|
1183
|
+
"subject": string | null;
|
|
1184
|
+
"notes": string | null;
|
|
1185
|
+
"currency": string;
|
|
1186
|
+
"state": "draft" | "sent" | "accepted" | "declined";
|
|
1187
|
+
"version": number;
|
|
1188
|
+
"issue_date": string;
|
|
1189
|
+
"sent_at": string | null;
|
|
1190
|
+
"accepted_at": string | null;
|
|
1191
|
+
"declined_at": string | null;
|
|
1192
|
+
"tax_rate_ppm": number | null;
|
|
1193
|
+
"tax2_rate_ppm": number | null;
|
|
1194
|
+
"discount_rate_ppm": number | null;
|
|
1195
|
+
"amount_cents": number;
|
|
1196
|
+
"tax_amount_cents": number;
|
|
1197
|
+
"tax2_amount_cents": number;
|
|
1198
|
+
"discount_amount_cents": number;
|
|
1199
|
+
"created_at": string;
|
|
1200
|
+
"updated_at": string;
|
|
1201
|
+
"line_items": Array<EstimateLine>;
|
|
1202
|
+
};
|
|
1203
|
+
|
|
1204
|
+
export type EstimateEnvelope = {
|
|
1205
|
+
"data": Estimate;
|
|
1206
|
+
"links": Links;
|
|
1207
|
+
};
|
|
1208
|
+
|
|
1209
|
+
export type EstimatePage = {
|
|
1210
|
+
"data": Array<Estimate>;
|
|
1211
|
+
"links": PageLinks;
|
|
1212
|
+
"page": PageMetadata;
|
|
1213
|
+
};
|
|
1214
|
+
|
|
1215
|
+
export type EstimateMessage = {
|
|
1216
|
+
"id": number;
|
|
1217
|
+
"estimate_id": number;
|
|
1218
|
+
"sent_by": string | null;
|
|
1219
|
+
"sent_by_email": string | null;
|
|
1220
|
+
"sent_from": string | null;
|
|
1221
|
+
"sent_from_email": string | null;
|
|
1222
|
+
"recipients": Array<InvoiceRecipient>;
|
|
1223
|
+
"subject": string | null;
|
|
1224
|
+
"body": string | null;
|
|
1225
|
+
"send_me_a_copy": boolean;
|
|
1226
|
+
"event_type": "send" | "accept" | "decline" | "re-open" | "view" | "invoice" | null;
|
|
1227
|
+
"delivery_status": "queued" | "sent" | "bounced" | "complained" | "failed" | null;
|
|
1228
|
+
"provider_message_id": string | null;
|
|
1229
|
+
"created_at": string;
|
|
1230
|
+
"updated_at": string;
|
|
1231
|
+
};
|
|
1232
|
+
|
|
1233
|
+
export type EstimateMessageListEnvelope = {
|
|
1234
|
+
"data": Array<EstimateMessage>;
|
|
1235
|
+
"links": Links;
|
|
1236
|
+
};
|
|
1237
|
+
|
|
1238
|
+
export type EstimateMessageInput = {
|
|
1239
|
+
"expected_version": number;
|
|
1240
|
+
"event_type": "send";
|
|
1241
|
+
"recipients": Array<InvoiceRecipient>;
|
|
1242
|
+
"subject"?: string | null;
|
|
1243
|
+
"body"?: string | null;
|
|
1244
|
+
"send_me_a_copy"?: boolean;
|
|
1245
|
+
} | {
|
|
1246
|
+
"expected_version": number;
|
|
1247
|
+
"event_type": "accept" | "decline" | "re-open";
|
|
1248
|
+
"recipients"?: Array<InvoiceRecipient>;
|
|
1249
|
+
"subject"?: string | null;
|
|
1250
|
+
"body"?: string | null;
|
|
1251
|
+
"send_me_a_copy"?: boolean;
|
|
1252
|
+
};
|
|
1253
|
+
|
|
1254
|
+
export type EstimateMessageCommandResponse = {
|
|
1255
|
+
"estimate": Estimate;
|
|
1256
|
+
"message": EstimateMessage;
|
|
1257
|
+
};
|
|
1258
|
+
|
|
1259
|
+
export type EstimateMessageCommandEnvelope = {
|
|
1260
|
+
"data": EstimateMessageCommandResponse;
|
|
1261
|
+
"links": Links;
|
|
1262
|
+
};
|
|
1263
|
+
|
|
1264
|
+
export type EstimateConversionInput = {
|
|
1265
|
+
"expected_version": number;
|
|
1266
|
+
"number": string;
|
|
1267
|
+
"issue_date": string;
|
|
1268
|
+
"due_date": string;
|
|
1269
|
+
"payment_terms": "upon_receipt" | "net_15" | "net_30" | "net_45" | "net_60" | "custom";
|
|
1270
|
+
};
|
|
1271
|
+
|
|
1272
|
+
export type EstimateConversion = {
|
|
1273
|
+
"invoice": Invoice;
|
|
1274
|
+
"event": EstimateMessage;
|
|
1275
|
+
};
|
|
1276
|
+
|
|
1277
|
+
export type EstimateConversionEnvelope = {
|
|
1278
|
+
"data": EstimateConversion;
|
|
1279
|
+
"links": Links;
|
|
1280
|
+
};
|
|
1281
|
+
|
|
1282
|
+
export type InvoiceGenerationInput = {
|
|
1283
|
+
"client_id": number;
|
|
1284
|
+
"from": string;
|
|
1285
|
+
"to": string;
|
|
1286
|
+
"project_ids": Array<number>;
|
|
1287
|
+
"time_summary_type": "project" | "task" | "people" | "detailed" | null;
|
|
1288
|
+
"expense_summary_type": "project" | "category" | "people" | "detailed" | null;
|
|
1289
|
+
};
|
|
1290
|
+
|
|
1291
|
+
export type InvoiceCommandSnapshot = {
|
|
1292
|
+
"id": number;
|
|
1293
|
+
"version": number;
|
|
1294
|
+
"updated_at": string;
|
|
1295
|
+
"state": "draft" | "open" | "paid" | "closed";
|
|
1296
|
+
"close_reason": "cancelled" | "written_off" | "source_closed" | null;
|
|
1297
|
+
"close_write_off_cents": number;
|
|
1298
|
+
"sent_at": string | null;
|
|
1299
|
+
"paid_at": string | null;
|
|
1300
|
+
"paid_date": string | null;
|
|
1301
|
+
"closed_at": string | null;
|
|
1302
|
+
"amount_cents": number;
|
|
1303
|
+
"due_amount_cents": number;
|
|
1304
|
+
"written_off_cents": number;
|
|
1305
|
+
"payment_count": number;
|
|
1306
|
+
"payment_status": "unpaid" | "partial" | "paid";
|
|
1307
|
+
};
|
|
1308
|
+
|
|
1309
|
+
export type InvoiceCommandResult = {
|
|
1310
|
+
"schema_version": 1;
|
|
1311
|
+
"event_ids": Array<string>;
|
|
1312
|
+
"first_aggregate_sequence": number;
|
|
1313
|
+
"event_count": number;
|
|
1314
|
+
"invoice": InvoiceCommandSnapshot;
|
|
1315
|
+
};
|
|
1316
|
+
|
|
1317
|
+
export type InvoiceCommandResponse = {
|
|
1318
|
+
"invoice": Invoice;
|
|
1319
|
+
"command": InvoiceCommandResult;
|
|
1320
|
+
};
|
|
1321
|
+
|
|
1322
|
+
export type InvoiceCommandEnvelope = {
|
|
1323
|
+
"data": InvoiceCommandResponse;
|
|
1324
|
+
"links": Links;
|
|
1325
|
+
};
|
|
1326
|
+
|
|
1327
|
+
export type InvoiceEditInput = {
|
|
1328
|
+
"expected_version": number;
|
|
1329
|
+
"client_id"?: number;
|
|
1330
|
+
"number"?: string;
|
|
1331
|
+
"subject"?: string | null;
|
|
1332
|
+
"purchase_order"?: string | null;
|
|
1333
|
+
"notes"?: string | null;
|
|
1334
|
+
"currency"?: string;
|
|
1335
|
+
"issue_date"?: string;
|
|
1336
|
+
"due_date"?: string;
|
|
1337
|
+
"payment_terms"?: "upon_receipt" | "net_15" | "net_30" | "net_45" | "net_60" | "custom";
|
|
1338
|
+
"project_id"?: number | null;
|
|
1339
|
+
"retainer_id"?: number | null;
|
|
1340
|
+
"reminder_policy"?: InvoiceReminderPolicy | null;
|
|
1341
|
+
"payment_options"?: Array<"stripe_checkout" | "paypal_checkout" | "quickbooks_checkout" | "mercury_transfer" | "wise_transfer">;
|
|
1342
|
+
"tax_rate_ppm"?: number | null;
|
|
1343
|
+
"tax2_rate_ppm"?: number | null;
|
|
1344
|
+
"discount_rate_ppm"?: number | null;
|
|
1345
|
+
};
|
|
1346
|
+
|
|
1347
|
+
export type InvoiceLineInput = {
|
|
1348
|
+
"expected_version": number;
|
|
1349
|
+
"position": number;
|
|
1350
|
+
"kind": string;
|
|
1351
|
+
"description"?: string | null;
|
|
1352
|
+
"quantity": number;
|
|
1353
|
+
"unit_price_cents": number;
|
|
1354
|
+
"taxed"?: boolean;
|
|
1355
|
+
"taxed2"?: boolean;
|
|
1356
|
+
"project_id"?: number | null;
|
|
1357
|
+
};
|
|
1358
|
+
|
|
1359
|
+
export type InvoiceLineUpdateInput = {
|
|
1360
|
+
"expected_version": number;
|
|
1361
|
+
"expected_updated_at": string;
|
|
1362
|
+
"position": number;
|
|
1363
|
+
"kind": string;
|
|
1364
|
+
"description"?: string | null;
|
|
1365
|
+
"quantity": number;
|
|
1366
|
+
"unit_price_cents": number;
|
|
1367
|
+
"taxed"?: boolean;
|
|
1368
|
+
"taxed2"?: boolean;
|
|
1369
|
+
"project_id"?: number | null;
|
|
1370
|
+
};
|
|
1371
|
+
|
|
1372
|
+
export type VersionedRowDeleteInput = {
|
|
1373
|
+
"expected_version": number;
|
|
1374
|
+
"expected_updated_at": string;
|
|
1375
|
+
};
|
|
1376
|
+
|
|
1377
|
+
export type InvoiceRecipient = {
|
|
1378
|
+
"name": string;
|
|
1379
|
+
"email": string;
|
|
1380
|
+
};
|
|
1381
|
+
|
|
1382
|
+
export type InvoiceMessage = {
|
|
1383
|
+
"id": number;
|
|
1384
|
+
"invoice_id": number;
|
|
1385
|
+
"sent_by": string | null;
|
|
1386
|
+
"sent_by_email": string | null;
|
|
1387
|
+
"sent_from": string | null;
|
|
1388
|
+
"sent_from_email": string | null;
|
|
1389
|
+
"recipients": Array<InvoiceRecipient>;
|
|
1390
|
+
"subject": string | null;
|
|
1391
|
+
"body": string | null;
|
|
1392
|
+
"attach_pdf": boolean;
|
|
1393
|
+
"send_me_a_copy": boolean;
|
|
1394
|
+
"thank_you": boolean;
|
|
1395
|
+
"reminder": boolean;
|
|
1396
|
+
"send_reminder_on": string | null;
|
|
1397
|
+
"event_type": string | null;
|
|
1398
|
+
"delivery_status": string | null;
|
|
1399
|
+
"provider_message_id": string | null;
|
|
1400
|
+
"created_at": string;
|
|
1401
|
+
"updated_at": string;
|
|
1402
|
+
};
|
|
1403
|
+
|
|
1404
|
+
export type InvoiceMessageListEnvelope = {
|
|
1405
|
+
"data": Array<InvoiceMessage>;
|
|
1406
|
+
"links": Links;
|
|
1407
|
+
};
|
|
1408
|
+
|
|
1409
|
+
export type InvoiceMessageInput = {
|
|
1410
|
+
"event_type": "send" | "draft" | "cancel" | "write_off" | "reopen" | "re-open";
|
|
1411
|
+
"expected_version": number;
|
|
1412
|
+
"recipients"?: Array<InvoiceRecipient>;
|
|
1413
|
+
"subject"?: string | null;
|
|
1414
|
+
"body"?: string | null;
|
|
1415
|
+
"attach_pdf"?: boolean;
|
|
1416
|
+
"send_me_a_copy"?: boolean;
|
|
1417
|
+
"thank_you"?: boolean;
|
|
1418
|
+
"reminder"?: boolean;
|
|
1419
|
+
"send_reminder_on"?: string | null;
|
|
1420
|
+
};
|
|
1421
|
+
|
|
1422
|
+
export type InvoiceTransitionInput = {
|
|
1423
|
+
"command": "send" | "draft" | "cancel" | "write_off" | "reopen" | "re-open";
|
|
1424
|
+
"expected_version": number;
|
|
1425
|
+
"recipients"?: Array<InvoiceRecipient>;
|
|
1426
|
+
"subject"?: string | null;
|
|
1427
|
+
"body"?: string | null;
|
|
1428
|
+
"attach_pdf"?: boolean;
|
|
1429
|
+
"send_me_a_copy"?: boolean;
|
|
1430
|
+
"thank_you"?: boolean;
|
|
1431
|
+
"reminder"?: boolean;
|
|
1432
|
+
"send_reminder_on"?: string | null;
|
|
1433
|
+
};
|
|
1434
|
+
|
|
1435
|
+
export type InvoiceEmailDeliveryInput = {
|
|
1436
|
+
"expected_version": number;
|
|
1437
|
+
"recipients": Array<InvoiceRecipient>;
|
|
1438
|
+
"sender_identity_id"?: number;
|
|
1439
|
+
"template_version"?: number;
|
|
1440
|
+
"confirmed": true;
|
|
1441
|
+
};
|
|
1442
|
+
|
|
1443
|
+
export type InvoicePayment = {
|
|
1444
|
+
"id": number;
|
|
1445
|
+
"invoice_id": number;
|
|
1446
|
+
"currency": string;
|
|
1447
|
+
"amount_cents": number;
|
|
1448
|
+
"paid_at": string | null;
|
|
1449
|
+
"paid_date": string | null;
|
|
1450
|
+
"notes": string | null;
|
|
1451
|
+
"recorded_by_user_id": number | null;
|
|
1452
|
+
"provider": string;
|
|
1453
|
+
"provider_shape": string;
|
|
1454
|
+
"provider_account_id": number | null;
|
|
1455
|
+
"provider_transaction_id": string | null;
|
|
1456
|
+
"bank_deposit_id": number | null;
|
|
1457
|
+
"created_at": string;
|
|
1458
|
+
"updated_at": string;
|
|
1459
|
+
};
|
|
1460
|
+
|
|
1461
|
+
export type InvoicePaymentListEnvelope = {
|
|
1462
|
+
"data": Array<InvoicePayment>;
|
|
1463
|
+
"links": Links;
|
|
1464
|
+
};
|
|
1465
|
+
|
|
1466
|
+
export type InvoicePaymentInput = {
|
|
1467
|
+
"expected_version": number;
|
|
1468
|
+
"amount_cents": number;
|
|
1469
|
+
"currency": string;
|
|
1470
|
+
"paid_at": string;
|
|
1471
|
+
"notes"?: string | null;
|
|
1472
|
+
} | {
|
|
1473
|
+
"expected_version": number;
|
|
1474
|
+
"amount_cents": number;
|
|
1475
|
+
"currency": string;
|
|
1476
|
+
"paid_date": string;
|
|
1477
|
+
"notes"?: string | null;
|
|
1478
|
+
};
|
|
1479
|
+
|
|
1480
|
+
export type InvoicePaymentUpdateInput = {
|
|
1481
|
+
"expected_version": number;
|
|
1482
|
+
"expected_updated_at": string;
|
|
1483
|
+
"amount_cents": number;
|
|
1484
|
+
"paid_at": string;
|
|
1485
|
+
"notes"?: string | null;
|
|
1486
|
+
} | {
|
|
1487
|
+
"expected_version": number;
|
|
1488
|
+
"expected_updated_at": string;
|
|
1489
|
+
"amount_cents": number;
|
|
1490
|
+
"paid_date": string;
|
|
1491
|
+
"notes"?: string | null;
|
|
1492
|
+
};
|
|
1493
|
+
|
|
1494
|
+
export type Retainer = {
|
|
1495
|
+
"id": number;
|
|
1496
|
+
"client_id": number | null;
|
|
1497
|
+
"project_id": number | null;
|
|
1498
|
+
"state": "ongoing" | "closed";
|
|
1499
|
+
"denomination": "money" | "hours";
|
|
1500
|
+
"amount_cents": number | null;
|
|
1501
|
+
"seconds": number | null;
|
|
1502
|
+
"locked_rate_cents": number | null;
|
|
1503
|
+
"rate_locked_at": string | null;
|
|
1504
|
+
"period": string | null;
|
|
1505
|
+
"rollover": "carry" | "expire" | "cap" | null;
|
|
1506
|
+
"expires_at": string | null;
|
|
1507
|
+
"on_exhaustion": "block" | "warn" | "overflow";
|
|
1508
|
+
"balance": number;
|
|
1509
|
+
"created_at": string;
|
|
1510
|
+
"updated_at": string;
|
|
1511
|
+
};
|
|
1512
|
+
|
|
1513
|
+
export type RetainerEnvelope = {
|
|
1514
|
+
"data": Retainer;
|
|
1515
|
+
"links": Links;
|
|
1516
|
+
};
|
|
1517
|
+
|
|
1518
|
+
export type RetainerPage = {
|
|
1519
|
+
"data": Array<Retainer>;
|
|
1520
|
+
"links": PageLinks;
|
|
1521
|
+
"page": PageMetadata;
|
|
1522
|
+
};
|
|
1523
|
+
|
|
1524
|
+
export type RetainerInput = {
|
|
1525
|
+
"client_id"?: number | null;
|
|
1526
|
+
"project_id"?: number | null;
|
|
1527
|
+
"denomination": "money";
|
|
1528
|
+
"amount_cents": number;
|
|
1529
|
+
"period"?: string | null;
|
|
1530
|
+
"rollover"?: "carry" | "expire" | "cap" | null;
|
|
1531
|
+
"expires_at"?: string | null;
|
|
1532
|
+
"on_exhaustion"?: "block" | "warn" | "overflow";
|
|
1533
|
+
} | {
|
|
1534
|
+
"client_id"?: number | null;
|
|
1535
|
+
"project_id"?: number | null;
|
|
1536
|
+
"denomination": "hours";
|
|
1537
|
+
"seconds": number;
|
|
1538
|
+
"period"?: string | null;
|
|
1539
|
+
"rollover"?: "carry" | "expire" | "cap" | null;
|
|
1540
|
+
"expires_at"?: string | null;
|
|
1541
|
+
"on_exhaustion"?: "block" | "warn" | "overflow";
|
|
1542
|
+
} | {
|
|
1543
|
+
"client_id"?: number | null;
|
|
1544
|
+
"project_id"?: number | null;
|
|
1545
|
+
"denomination": "hours";
|
|
1546
|
+
"seconds": number;
|
|
1547
|
+
"locked_rate_cents": number;
|
|
1548
|
+
"rate_locked_at": string;
|
|
1549
|
+
"period"?: string | null;
|
|
1550
|
+
"rollover"?: "carry" | "expire" | "cap" | null;
|
|
1551
|
+
"expires_at"?: string | null;
|
|
1552
|
+
"on_exhaustion"?: "block" | "warn" | "overflow";
|
|
1553
|
+
};
|
|
1554
|
+
|
|
1555
|
+
export type RetainerPatch = {
|
|
1556
|
+
"state"?: "ongoing" | "closed";
|
|
1557
|
+
"period"?: string | null;
|
|
1558
|
+
"rollover"?: "carry" | "expire" | "cap" | null;
|
|
1559
|
+
"expires_at"?: string | null;
|
|
1560
|
+
"on_exhaustion"?: "block" | "warn" | "overflow";
|
|
1561
|
+
};
|
|
1562
|
+
|
|
1563
|
+
export type RetainerLedgerEntry = {
|
|
1564
|
+
"id": string;
|
|
1565
|
+
"retainer_id": number;
|
|
1566
|
+
"kind": "deposit" | "drawdown" | "expiry" | "reset" | "adjustment";
|
|
1567
|
+
"unit": "cents" | "seconds";
|
|
1568
|
+
"amount": number;
|
|
1569
|
+
"invoice_id": number | null;
|
|
1570
|
+
"occurred_on": string;
|
|
1571
|
+
"notes": string | null;
|
|
1572
|
+
"created_at": string;
|
|
1573
|
+
};
|
|
1574
|
+
|
|
1575
|
+
export type RetainerLedgerListEnvelope = {
|
|
1576
|
+
"data": Array<RetainerLedgerEntry>;
|
|
1577
|
+
"links": Links;
|
|
1578
|
+
};
|
|
1579
|
+
|
|
1580
|
+
export type RetainerLedgerMutation = {
|
|
1581
|
+
"entry": RetainerLedgerEntry;
|
|
1582
|
+
"balance": number;
|
|
1583
|
+
"denomination": "money" | "hours";
|
|
1584
|
+
};
|
|
1585
|
+
|
|
1586
|
+
export type RetainerLedgerMutationEnvelope = {
|
|
1587
|
+
"data": RetainerLedgerMutation;
|
|
1588
|
+
"links": Links;
|
|
1589
|
+
};
|
|
1590
|
+
|
|
1591
|
+
export type RetainerLedgerInput = {
|
|
1592
|
+
"kind": "deposit";
|
|
1593
|
+
"invoice_id": number;
|
|
1594
|
+
"amount_cents": number;
|
|
1595
|
+
"occurred_on": string;
|
|
1596
|
+
"notes"?: string | null;
|
|
1597
|
+
} | {
|
|
1598
|
+
"kind": "deposit";
|
|
1599
|
+
"invoice_id": number;
|
|
1600
|
+
"seconds": number;
|
|
1601
|
+
"occurred_on": string;
|
|
1602
|
+
"notes"?: string | null;
|
|
1603
|
+
} | {
|
|
1604
|
+
"kind": "drawdown";
|
|
1605
|
+
"invoice_id": number;
|
|
1606
|
+
"amount_cents": number;
|
|
1607
|
+
"occurred_on": string;
|
|
1608
|
+
"notes"?: string | null;
|
|
1609
|
+
} | {
|
|
1610
|
+
"kind": "drawdown";
|
|
1611
|
+
"invoice_id": number;
|
|
1612
|
+
"seconds": number;
|
|
1613
|
+
"occurred_on": string;
|
|
1614
|
+
"notes"?: string | null;
|
|
1615
|
+
} | {
|
|
1616
|
+
"kind": "expiry";
|
|
1617
|
+
"amount_cents": number;
|
|
1618
|
+
"occurred_on": string;
|
|
1619
|
+
"notes"?: string | null;
|
|
1620
|
+
} | {
|
|
1621
|
+
"kind": "expiry";
|
|
1622
|
+
"seconds": number;
|
|
1623
|
+
"occurred_on": string;
|
|
1624
|
+
"notes"?: string | null;
|
|
1625
|
+
} | {
|
|
1626
|
+
"kind": "reset";
|
|
1627
|
+
"amount_cents": number;
|
|
1628
|
+
"occurred_on": string;
|
|
1629
|
+
"notes"?: string | null;
|
|
1630
|
+
} | {
|
|
1631
|
+
"kind": "reset";
|
|
1632
|
+
"seconds": number;
|
|
1633
|
+
"occurred_on": string;
|
|
1634
|
+
"notes"?: string | null;
|
|
1635
|
+
} | {
|
|
1636
|
+
"kind": "adjustment";
|
|
1637
|
+
"amount_cents": number;
|
|
1638
|
+
"occurred_on": string;
|
|
1639
|
+
"notes": string;
|
|
1640
|
+
} | {
|
|
1641
|
+
"kind": "adjustment";
|
|
1642
|
+
"seconds": number;
|
|
1643
|
+
"occurred_on": string;
|
|
1644
|
+
"notes": string;
|
|
1645
|
+
};
|
|
1646
|
+
|
|
1647
|
+
export type RetainerDrawdownInput = {
|
|
1648
|
+
"invoice_id": number;
|
|
1649
|
+
"amount_cents": number;
|
|
1650
|
+
"occurred_on": string;
|
|
1651
|
+
"notes"?: string | null;
|
|
1652
|
+
} | {
|
|
1653
|
+
"invoice_id": number;
|
|
1654
|
+
"seconds": number;
|
|
1655
|
+
"occurred_on": string;
|
|
1656
|
+
"notes"?: string | null;
|
|
1657
|
+
};
|
|
1658
|
+
|
|
1659
|
+
export type RecurringFixedLine = {
|
|
1660
|
+
"kind": string;
|
|
1661
|
+
"description": string | null;
|
|
1662
|
+
"quantity": number;
|
|
1663
|
+
"unit_price_cents": number;
|
|
1664
|
+
"taxed": boolean;
|
|
1665
|
+
"taxed2": boolean;
|
|
1666
|
+
"project_id": number | null;
|
|
1667
|
+
"through"?: string | null;
|
|
1668
|
+
"installments"?: number | null;
|
|
1669
|
+
};
|
|
1670
|
+
|
|
1671
|
+
export type RecurringAmountConfig = {
|
|
1672
|
+
"schema_version": 1;
|
|
1673
|
+
"type": "fixed_lines";
|
|
1674
|
+
"line_items": Array<RecurringFixedLine>;
|
|
1675
|
+
} | {
|
|
1676
|
+
"schema_version": 1;
|
|
1677
|
+
"type": "line_items_import";
|
|
1678
|
+
"project_ids": Array<number>;
|
|
1679
|
+
"time": {
|
|
1680
|
+
"summary_type": "project" | "task" | "people" | "detailed";
|
|
1681
|
+
};
|
|
1682
|
+
} | {
|
|
1683
|
+
"schema_version": 1;
|
|
1684
|
+
"type": "line_items_import";
|
|
1685
|
+
"project_ids": Array<number>;
|
|
1686
|
+
"expenses": {
|
|
1687
|
+
"summary_type": "project" | "category" | "people" | "detailed";
|
|
1688
|
+
};
|
|
1689
|
+
} | {
|
|
1690
|
+
"schema_version": 1;
|
|
1691
|
+
"type": "line_items_import";
|
|
1692
|
+
"project_ids": Array<number>;
|
|
1693
|
+
"time": {
|
|
1694
|
+
"summary_type": "project" | "task" | "people" | "detailed";
|
|
1695
|
+
};
|
|
1696
|
+
"expenses": {
|
|
1697
|
+
"summary_type": "project" | "category" | "people" | "detailed";
|
|
1698
|
+
};
|
|
1699
|
+
};
|
|
1700
|
+
|
|
1701
|
+
export type RecurringInvoice = {
|
|
1702
|
+
"id": number;
|
|
1703
|
+
"client_id": number;
|
|
1704
|
+
"subject_template": string;
|
|
1705
|
+
"notes_template": string;
|
|
1706
|
+
"every_n_months": number;
|
|
1707
|
+
"day_of_month": number;
|
|
1708
|
+
"next_issue_on": string;
|
|
1709
|
+
"amount_config": RecurringAmountConfig;
|
|
1710
|
+
"can_draw_from_retainer_id": number | null;
|
|
1711
|
+
"created_at": string;
|
|
1712
|
+
"updated_at": string;
|
|
1713
|
+
};
|
|
1714
|
+
|
|
1715
|
+
export type RecurringInvoiceEnvelope = {
|
|
1716
|
+
"data": RecurringInvoice;
|
|
1717
|
+
"links": Links;
|
|
1718
|
+
};
|
|
1719
|
+
|
|
1720
|
+
export type RecurringGeneration = {
|
|
1721
|
+
"definition_id": number;
|
|
1722
|
+
"period": string;
|
|
1723
|
+
"next_issue_on": string;
|
|
1724
|
+
"retainer_drawdown_cents": number | null;
|
|
1725
|
+
};
|
|
1726
|
+
|
|
1727
|
+
export type RecurringGenerationEnvelope = {
|
|
1728
|
+
"data": {
|
|
1729
|
+
"invoice": Invoice;
|
|
1730
|
+
"generation": RecurringGeneration;
|
|
1731
|
+
};
|
|
1732
|
+
"links": Links;
|
|
1733
|
+
};
|
|
1734
|
+
|
|
1735
|
+
export type RecurringInvoicePage = {
|
|
1736
|
+
"data": Array<RecurringInvoice>;
|
|
1737
|
+
"links": PageLinks;
|
|
1738
|
+
"page": PageMetadata;
|
|
1739
|
+
};
|
|
1740
|
+
|
|
1741
|
+
export type RecurringInvoiceInput = {
|
|
1742
|
+
"client_id": number;
|
|
1743
|
+
"subject_template": string;
|
|
1744
|
+
"notes_template": string;
|
|
1745
|
+
"every_n_months": number;
|
|
1746
|
+
"day_of_month": number;
|
|
1747
|
+
"next_issue_on": string;
|
|
1748
|
+
"amount_config": RecurringAmountConfig;
|
|
1749
|
+
"can_draw_from_retainer_id"?: number | null;
|
|
1750
|
+
};
|
|
1751
|
+
|
|
1752
|
+
export type MyHoursProject = {
|
|
1753
|
+
"project_id": number;
|
|
1754
|
+
"project_name": string;
|
|
1755
|
+
"project_code": string;
|
|
1756
|
+
"client_id": number;
|
|
1757
|
+
"client_name": string;
|
|
1758
|
+
"seconds": number;
|
|
1759
|
+
"rounded_seconds": number;
|
|
1760
|
+
"billable_seconds": number;
|
|
1761
|
+
"time_entry_count": number;
|
|
1762
|
+
};
|
|
1763
|
+
|
|
1764
|
+
export type MyHoursReport = {
|
|
1765
|
+
"from": string;
|
|
1766
|
+
"to": string;
|
|
1767
|
+
"user_id": number;
|
|
1768
|
+
"project_id": number | null;
|
|
1769
|
+
"seconds": number;
|
|
1770
|
+
"rounded_seconds": number;
|
|
1771
|
+
"billable_seconds": number;
|
|
1772
|
+
"time_entry_count": number;
|
|
1773
|
+
"projects": Array<MyHoursProject>;
|
|
1774
|
+
};
|
|
1775
|
+
|
|
1776
|
+
export type MyHoursReportEnvelope = {
|
|
1777
|
+
"data": MyHoursReport;
|
|
1778
|
+
"links": Links;
|
|
1779
|
+
};
|
|
1780
|
+
|
|
1781
|
+
export type DetailedTimeRow = {
|
|
1782
|
+
"spent_date": string;
|
|
1783
|
+
"client_id": number;
|
|
1784
|
+
"client_name": string;
|
|
1785
|
+
"project_id": number;
|
|
1786
|
+
"project_name": string;
|
|
1787
|
+
"project_code": string;
|
|
1788
|
+
"task_id": number;
|
|
1789
|
+
"task_name": string;
|
|
1790
|
+
"user_id": number;
|
|
1791
|
+
"user_name": string;
|
|
1792
|
+
"roles": Array<string>;
|
|
1793
|
+
"currency": string;
|
|
1794
|
+
"seconds": number;
|
|
1795
|
+
"rounded_seconds": number;
|
|
1796
|
+
"billable_seconds": number;
|
|
1797
|
+
"uninvoiced_billable_seconds": number;
|
|
1798
|
+
"time_entry_count": number;
|
|
1799
|
+
"billable_amount_cents"?: number | null;
|
|
1800
|
+
"entries_without_billable_rate": number;
|
|
1801
|
+
"time_entry_id"?: number;
|
|
1802
|
+
"notes"?: string | null;
|
|
1803
|
+
};
|
|
1804
|
+
|
|
1805
|
+
export type DetailedTimeCurrencyTotal = {
|
|
1806
|
+
"currency": string;
|
|
1807
|
+
"billable_amount_cents"?: number | null;
|
|
1808
|
+
"entries_without_billable_rate": number;
|
|
1809
|
+
};
|
|
1810
|
+
|
|
1811
|
+
export type DetailedTimeReport = {
|
|
1812
|
+
"from": string;
|
|
1813
|
+
"to": string;
|
|
1814
|
+
"client_id": number | null;
|
|
1815
|
+
"project_id": number | null;
|
|
1816
|
+
"hours": "all" | "billable" | "non_billable" | "uninvoiced";
|
|
1817
|
+
"grain": "day" | "entry";
|
|
1818
|
+
"active_projects_only": boolean;
|
|
1819
|
+
"seconds": number;
|
|
1820
|
+
"rounded_seconds": number;
|
|
1821
|
+
"billable_seconds": number;
|
|
1822
|
+
"uninvoiced_billable_seconds": number;
|
|
1823
|
+
"time_entry_count": number;
|
|
1824
|
+
"currencies": Array<DetailedTimeCurrencyTotal>;
|
|
1825
|
+
"rows": Array<DetailedTimeRow>;
|
|
1826
|
+
};
|
|
1827
|
+
|
|
1828
|
+
export type DetailedTimeReportEnvelope = {
|
|
1829
|
+
"data": DetailedTimeReport;
|
|
1830
|
+
"links": Links;
|
|
1831
|
+
};
|
|
1832
|
+
|
|
1833
|
+
export type TimeReportAmount = {
|
|
1834
|
+
"currency": string;
|
|
1835
|
+
"billable_cents": number;
|
|
1836
|
+
"uninvoiced_cents": number;
|
|
1837
|
+
};
|
|
1838
|
+
|
|
1839
|
+
export type TimeReportTotals = {
|
|
1840
|
+
"seconds": number;
|
|
1841
|
+
"rounded_seconds": number;
|
|
1842
|
+
"billable_seconds": number;
|
|
1843
|
+
"time_entry_count": number;
|
|
1844
|
+
"unpriced_billable_entry_count": number;
|
|
1845
|
+
"amounts"?: Array<TimeReportAmount>;
|
|
1846
|
+
};
|
|
1847
|
+
|
|
1848
|
+
export type TimeReportClientRow = {
|
|
1849
|
+
"seconds": number;
|
|
1850
|
+
"rounded_seconds": number;
|
|
1851
|
+
"billable_seconds": number;
|
|
1852
|
+
"time_entry_count": number;
|
|
1853
|
+
"unpriced_billable_entry_count": number;
|
|
1854
|
+
"amounts"?: Array<TimeReportAmount>;
|
|
1855
|
+
"client_id": number;
|
|
1856
|
+
"client_name": string;
|
|
1857
|
+
};
|
|
1858
|
+
|
|
1859
|
+
export type TimeReportProjectRow = {
|
|
1860
|
+
"seconds": number;
|
|
1861
|
+
"rounded_seconds": number;
|
|
1862
|
+
"billable_seconds": number;
|
|
1863
|
+
"time_entry_count": number;
|
|
1864
|
+
"unpriced_billable_entry_count": number;
|
|
1865
|
+
"amounts"?: Array<TimeReportAmount>;
|
|
1866
|
+
"project_id": number;
|
|
1867
|
+
"project_name": string;
|
|
1868
|
+
"project_code": string;
|
|
1869
|
+
"client_id": number;
|
|
1870
|
+
"client_name": string;
|
|
1871
|
+
};
|
|
1872
|
+
|
|
1873
|
+
export type TimeReportTaskRow = {
|
|
1874
|
+
"seconds": number;
|
|
1875
|
+
"rounded_seconds": number;
|
|
1876
|
+
"billable_seconds": number;
|
|
1877
|
+
"time_entry_count": number;
|
|
1878
|
+
"unpriced_billable_entry_count": number;
|
|
1879
|
+
"amounts"?: Array<TimeReportAmount>;
|
|
1880
|
+
"task_id": number;
|
|
1881
|
+
"task_name": string;
|
|
1882
|
+
};
|
|
1883
|
+
|
|
1884
|
+
export type TimeReportTeammateRow = {
|
|
1885
|
+
"seconds": number;
|
|
1886
|
+
"rounded_seconds": number;
|
|
1887
|
+
"billable_seconds": number;
|
|
1888
|
+
"time_entry_count": number;
|
|
1889
|
+
"unpriced_billable_entry_count": number;
|
|
1890
|
+
"amounts"?: Array<TimeReportAmount>;
|
|
1891
|
+
"user_id": number;
|
|
1892
|
+
"user_name": string;
|
|
1893
|
+
"is_contractor": boolean;
|
|
1894
|
+
"capacity_seconds": number;
|
|
1895
|
+
"utilization_ppm": number | null;
|
|
1896
|
+
};
|
|
1897
|
+
|
|
1898
|
+
export type TimeReport = {
|
|
1899
|
+
"from": string;
|
|
1900
|
+
"to": string;
|
|
1901
|
+
"totals": TimeReportTotals;
|
|
1902
|
+
"clients": Array<TimeReportClientRow>;
|
|
1903
|
+
"projects": Array<TimeReportProjectRow>;
|
|
1904
|
+
"tasks": Array<TimeReportTaskRow>;
|
|
1905
|
+
"teammates": Array<TimeReportTeammateRow>;
|
|
1906
|
+
};
|
|
1907
|
+
|
|
1908
|
+
export type TimeReportEnvelope = {
|
|
1909
|
+
"data": TimeReport;
|
|
1910
|
+
"links": Links;
|
|
1911
|
+
};
|
|
1912
|
+
|
|
1913
|
+
export type UninvoicedCurrencyTotal = {
|
|
1914
|
+
"currency": string;
|
|
1915
|
+
"rounded_seconds": number;
|
|
1916
|
+
"time_entry_count": number;
|
|
1917
|
+
"unpriced_time_entry_count": number;
|
|
1918
|
+
"expense_count": number;
|
|
1919
|
+
"time_cents"?: number;
|
|
1920
|
+
"expense_cents"?: number;
|
|
1921
|
+
"total_cents"?: number;
|
|
1922
|
+
};
|
|
1923
|
+
|
|
1924
|
+
export type UninvoicedProjectRow = {
|
|
1925
|
+
"client_id": number;
|
|
1926
|
+
"client_name": string;
|
|
1927
|
+
"project_id": number;
|
|
1928
|
+
"project_name": string;
|
|
1929
|
+
"project_code": string;
|
|
1930
|
+
"totals": Array<UninvoicedCurrencyTotal>;
|
|
1931
|
+
};
|
|
1932
|
+
|
|
1933
|
+
export type UninvoicedReport = {
|
|
1934
|
+
"from": string;
|
|
1935
|
+
"to": string;
|
|
1936
|
+
"client_id": number | null;
|
|
1937
|
+
"project_id": number | null;
|
|
1938
|
+
"totals": Array<UninvoicedCurrencyTotal>;
|
|
1939
|
+
"projects": Array<UninvoicedProjectRow>;
|
|
1940
|
+
};
|
|
1941
|
+
|
|
1942
|
+
export type UninvoicedReportEnvelope = {
|
|
1943
|
+
"data": UninvoicedReport;
|
|
1944
|
+
"links": Links;
|
|
1945
|
+
};
|
|
1946
|
+
|
|
1947
|
+
export type ContractorCostRow = {
|
|
1948
|
+
"user_id": number;
|
|
1949
|
+
"name": string;
|
|
1950
|
+
"payroll_email": string | null;
|
|
1951
|
+
"is_contractor": boolean;
|
|
1952
|
+
"currency": string;
|
|
1953
|
+
"rounded_seconds": number;
|
|
1954
|
+
"cost_cents": number | null;
|
|
1955
|
+
"entries_without_rate": number;
|
|
1956
|
+
};
|
|
1957
|
+
|
|
1958
|
+
export type ContractorCostReport = {
|
|
1959
|
+
"from": string;
|
|
1960
|
+
"to": string;
|
|
1961
|
+
"rows": Array<ContractorCostRow>;
|
|
1962
|
+
};
|
|
1963
|
+
|
|
1964
|
+
export type ContractorCostReportEnvelope = {
|
|
1965
|
+
"data": ContractorCostReport;
|
|
1966
|
+
"links": Links;
|
|
1967
|
+
};
|
|
1968
|
+
|
|
1969
|
+
export type DetailedExpenseRow = {
|
|
1970
|
+
"expense_id": number;
|
|
1971
|
+
"spent_date": string;
|
|
1972
|
+
"client_id": number;
|
|
1973
|
+
"client_name": string;
|
|
1974
|
+
"project_id": number;
|
|
1975
|
+
"project_name": string;
|
|
1976
|
+
"project_code": string;
|
|
1977
|
+
"category_id": number;
|
|
1978
|
+
"category_name": string;
|
|
1979
|
+
"user_id": number;
|
|
1980
|
+
"user_name": string;
|
|
1981
|
+
"notes": string | null;
|
|
1982
|
+
"units": number | null;
|
|
1983
|
+
"billable": boolean;
|
|
1984
|
+
"reimbursable": boolean;
|
|
1985
|
+
"invoice_id": number | null;
|
|
1986
|
+
"currency": string;
|
|
1987
|
+
"total_cost_cents"?: number;
|
|
1988
|
+
};
|
|
1989
|
+
|
|
1990
|
+
export type DetailedExpenseTotal = {
|
|
1991
|
+
"currency": string;
|
|
1992
|
+
"expense_count": number;
|
|
1993
|
+
"total_cost_cents"?: number;
|
|
1994
|
+
};
|
|
1995
|
+
|
|
1996
|
+
export type DetailedExpenseReport = {
|
|
1997
|
+
"from": string;
|
|
1998
|
+
"to": string;
|
|
1999
|
+
"client_id": number | null;
|
|
2000
|
+
"project_id": number | null;
|
|
2001
|
+
"billable_only": boolean;
|
|
2002
|
+
"totals": Array<DetailedExpenseTotal>;
|
|
2003
|
+
"rows": Array<DetailedExpenseRow>;
|
|
2004
|
+
};
|
|
2005
|
+
|
|
2006
|
+
export type DetailedExpenseReportEnvelope = {
|
|
2007
|
+
"data": DetailedExpenseReport;
|
|
2008
|
+
"links": Links;
|
|
2009
|
+
};
|
|
2010
|
+
|
|
2011
|
+
export type ProfitabilityRow = {
|
|
2012
|
+
"project_id": number;
|
|
2013
|
+
"project_name": string;
|
|
2014
|
+
"project_code": string;
|
|
2015
|
+
"client_id": number;
|
|
2016
|
+
"client_name": string;
|
|
2017
|
+
"currency": string;
|
|
2018
|
+
"rounded_seconds": number;
|
|
2019
|
+
"revenue_cents": number | null;
|
|
2020
|
+
"cost_cents": number | null;
|
|
2021
|
+
"profit_cents": number | null;
|
|
2022
|
+
"entries_without_billable_rate": number;
|
|
2023
|
+
"entries_without_cost_rate": number;
|
|
2024
|
+
};
|
|
2025
|
+
|
|
2026
|
+
export type ProfitabilityTotals = {
|
|
2027
|
+
"rounded_seconds": number;
|
|
2028
|
+
"revenue_cents": number | null;
|
|
2029
|
+
"cost_cents": number | null;
|
|
2030
|
+
"profit_cents": number | null;
|
|
2031
|
+
"entries_without_billable_rate": number;
|
|
2032
|
+
"entries_without_cost_rate": number;
|
|
2033
|
+
"projects_not_converted": number;
|
|
2034
|
+
};
|
|
2035
|
+
|
|
2036
|
+
export type ProfitabilityReport = {
|
|
2037
|
+
"from": string;
|
|
2038
|
+
"to": string;
|
|
2039
|
+
"organization_currency": string;
|
|
2040
|
+
"rows": Array<ProfitabilityRow>;
|
|
2041
|
+
"totals": ProfitabilityTotals;
|
|
2042
|
+
"previous_from": string;
|
|
2043
|
+
"previous_to": string;
|
|
2044
|
+
"previous_totals": ProfitabilityTotals;
|
|
2045
|
+
};
|
|
2046
|
+
|
|
2047
|
+
export type ProfitabilityReportEnvelope = {
|
|
2048
|
+
"data": ProfitabilityReport;
|
|
2049
|
+
"links": Links;
|
|
2050
|
+
};
|
|
2051
|
+
|
|
2052
|
+
export type ClientRollupCurrency = {
|
|
2053
|
+
"currency": string;
|
|
2054
|
+
"expense_cents": number;
|
|
2055
|
+
"uninvoiced_time_cents"?: number;
|
|
2056
|
+
"uninvoiced_expense_cents"?: number;
|
|
2057
|
+
"uninvoiced_total_cents"?: number;
|
|
2058
|
+
"money_budget_cents"?: number;
|
|
2059
|
+
"cost_cents"?: number;
|
|
2060
|
+
};
|
|
2061
|
+
|
|
2062
|
+
export type ClientRollupMetrics = {
|
|
2063
|
+
"time_entry_count": number;
|
|
2064
|
+
"expense_count": number;
|
|
2065
|
+
"rounded_seconds": number;
|
|
2066
|
+
"billable_seconds": number;
|
|
2067
|
+
"budgeted_seconds": number;
|
|
2068
|
+
"time_budget_seconds": number;
|
|
2069
|
+
"unpriced_billable_entry_count": number;
|
|
2070
|
+
"unpriced_cost_entry_count": number;
|
|
2071
|
+
"currencies": Array<ClientRollupCurrency>;
|
|
2072
|
+
};
|
|
2073
|
+
|
|
2074
|
+
export type ClientRollupNode = {
|
|
2075
|
+
"client_id": number;
|
|
2076
|
+
"name": string;
|
|
2077
|
+
"parent_client_id": number | null;
|
|
2078
|
+
"depth": number;
|
|
2079
|
+
"direct": ClientRollupMetrics;
|
|
2080
|
+
"rollup": ClientRollupMetrics;
|
|
2081
|
+
};
|
|
2082
|
+
|
|
2083
|
+
export type ClientRollupReport = {
|
|
2084
|
+
"root_client_id": number;
|
|
2085
|
+
"from": string;
|
|
2086
|
+
"to": string;
|
|
2087
|
+
"nodes": Array<ClientRollupNode>;
|
|
2088
|
+
};
|
|
2089
|
+
|
|
2090
|
+
export type ClientRollupReportEnvelope = {
|
|
2091
|
+
"data": ClientRollupReport;
|
|
2092
|
+
"links": Links;
|
|
2093
|
+
};
|
|
2094
|
+
|
|
2095
|
+
export type ProjectBudgetGrain = {
|
|
2096
|
+
"source": "project" | "task_assignment" | "user_assignment";
|
|
2097
|
+
"source_id": number;
|
|
2098
|
+
"unit": "seconds" | "cents";
|
|
2099
|
+
"calculation": "time" | "billable" | "cost";
|
|
2100
|
+
"unpriced_entry_count": number;
|
|
2101
|
+
"budget_seconds"?: number | null;
|
|
2102
|
+
"spent_seconds"?: number;
|
|
2103
|
+
"remaining_seconds"?: number | null;
|
|
2104
|
+
"budget_cents"?: number | null;
|
|
2105
|
+
"spent_cents"?: number;
|
|
2106
|
+
"remaining_cents"?: number | null;
|
|
2107
|
+
};
|
|
2108
|
+
|
|
2109
|
+
export type ProjectBudgetReport = {
|
|
2110
|
+
"project_id": number;
|
|
2111
|
+
"budget_by": "project" | "project_cost" | "task" | "task_fees" | "person" | "none";
|
|
2112
|
+
"expenses_included": boolean;
|
|
2113
|
+
"from": string;
|
|
2114
|
+
"to": string;
|
|
2115
|
+
"grains": Array<ProjectBudgetGrain>;
|
|
2116
|
+
};
|
|
2117
|
+
|
|
2118
|
+
export type ProjectBudgetReportEnvelope = {
|
|
2119
|
+
"data": ProjectBudgetReport;
|
|
2120
|
+
"links": Links;
|
|
2121
|
+
};
|
|
2122
|
+
|
|
2123
|
+
export type ProjectBudgetSummary = {
|
|
2124
|
+
"project_id": number;
|
|
2125
|
+
"currency": string;
|
|
2126
|
+
"budget_by": "project" | "project_cost" | "task" | "task_fees" | "person" | "none";
|
|
2127
|
+
"unit": "seconds" | "cents" | null;
|
|
2128
|
+
"unpriced_entry_count": number;
|
|
2129
|
+
"budget_seconds"?: number | null;
|
|
2130
|
+
"spent_seconds"?: number;
|
|
2131
|
+
"remaining_seconds"?: number | null;
|
|
2132
|
+
"budget_cents"?: number | null;
|
|
2133
|
+
"spent_cents"?: number;
|
|
2134
|
+
"remaining_cents"?: number | null;
|
|
2135
|
+
"cost_cents"?: number;
|
|
2136
|
+
};
|
|
2137
|
+
|
|
2138
|
+
export type ProjectBudgetSummaryListEnvelope = {
|
|
2139
|
+
"data": Array<ProjectBudgetSummary>;
|
|
2140
|
+
"links": Links;
|
|
2141
|
+
};
|
|
2142
|
+
|
|
2143
|
+
export type ClientHierarchyNode = {
|
|
2144
|
+
"ancestor_id": number;
|
|
2145
|
+
"descendant_id": number;
|
|
2146
|
+
"depth": number;
|
|
2147
|
+
};
|
|
2148
|
+
|
|
2149
|
+
export type ClientHierarchyListEnvelope = {
|
|
2150
|
+
"data": Array<ClientHierarchyNode>;
|
|
2151
|
+
"links": Links;
|
|
2152
|
+
};
|
|
2153
|
+
|
|
2154
|
+
export type ModuleState = {
|
|
2155
|
+
"module": "approval" | "expenses" | "own_money";
|
|
2156
|
+
"enabled": boolean;
|
|
2157
|
+
};
|
|
2158
|
+
|
|
2159
|
+
export type ModuleListEnvelope = {
|
|
2160
|
+
"data": Array<ModuleState>;
|
|
2161
|
+
"links": Links;
|
|
2162
|
+
};
|
|
2163
|
+
|
|
2164
|
+
export type SsoDomain = {
|
|
2165
|
+
"id": number;
|
|
2166
|
+
"domain": string;
|
|
2167
|
+
"verified": boolean;
|
|
2168
|
+
"verified_at": string | null;
|
|
2169
|
+
"last_checked_at": string | null;
|
|
2170
|
+
"record_name": string;
|
|
2171
|
+
"record_type": "TXT";
|
|
2172
|
+
"record_value": string;
|
|
2173
|
+
"created_at": string;
|
|
2174
|
+
"updated_at": string;
|
|
2175
|
+
};
|
|
2176
|
+
|
|
2177
|
+
export type SsoDomainCheck = (SsoDomain) & ({
|
|
2178
|
+
"dnssec_validated": boolean;
|
|
2179
|
+
});
|
|
2180
|
+
|
|
2181
|
+
export type SsoDomainListEnvelope = {
|
|
2182
|
+
"data": Array<SsoDomain>;
|
|
2183
|
+
"links": Links;
|
|
2184
|
+
};
|
|
2185
|
+
|
|
2186
|
+
export type SsoDomainEnvelope = {
|
|
2187
|
+
"data": SsoDomain;
|
|
2188
|
+
};
|
|
2189
|
+
|
|
2190
|
+
export type SsoDomainCheckEnvelope = {
|
|
2191
|
+
"data": SsoDomainCheck;
|
|
2192
|
+
};
|
|
2193
|
+
|
|
2194
|
+
export type BrandAsset = {
|
|
2195
|
+
"slot": "wordmark_light" | "wordmark_dark" | "favicon";
|
|
2196
|
+
"content_hash": string;
|
|
2197
|
+
"content_type": "image/png" | "image/jpeg" | "image/webp";
|
|
2198
|
+
"byte_size": number;
|
|
2199
|
+
"url": string;
|
|
2200
|
+
"updated_at": string;
|
|
2201
|
+
};
|
|
2202
|
+
|
|
2203
|
+
export type BrandAssetListEnvelope = {
|
|
2204
|
+
"data": Array<BrandAsset>;
|
|
2205
|
+
"links": Links;
|
|
2206
|
+
};
|
|
2207
|
+
|
|
2208
|
+
export type BrandMark = {
|
|
2209
|
+
"slot": "wordmark_light" | "wordmark_dark" | "favicon";
|
|
2210
|
+
"url": string;
|
|
2211
|
+
"content_type": "image/png" | "image/jpeg" | "image/webp";
|
|
2212
|
+
"updated_at": string;
|
|
2213
|
+
};
|
|
2214
|
+
|
|
2215
|
+
export type Brand = {
|
|
2216
|
+
"organization_name": string;
|
|
2217
|
+
"assets": Array<BrandMark>;
|
|
2218
|
+
"palette"?: InstancePalette;
|
|
2219
|
+
};
|
|
2220
|
+
|
|
2221
|
+
export type BrandEnvelope = {
|
|
2222
|
+
"data": Brand;
|
|
2223
|
+
"links": Links;
|
|
2224
|
+
};
|
|
2225
|
+
|
|
2226
|
+
export type BrandAssetEnvelope = {
|
|
2227
|
+
"data": BrandAsset;
|
|
2228
|
+
};
|
|
2229
|
+
|
|
2230
|
+
export type BrandAssetUploadInput = {
|
|
2231
|
+
"file": string;
|
|
2232
|
+
};
|
|
2233
|
+
|
|
2234
|
+
export type InstancePalette = {
|
|
2235
|
+
[key: string]: string;
|
|
2236
|
+
};
|
|
2237
|
+
|
|
2238
|
+
export type InstanceTheme = {
|
|
2239
|
+
"palette": InstancePalette;
|
|
2240
|
+
"updated_at": string;
|
|
2241
|
+
};
|
|
2242
|
+
|
|
2243
|
+
export type InstanceThemeEnvelope = {
|
|
2244
|
+
"data": InstanceTheme | null;
|
|
2245
|
+
};
|
|
2246
|
+
|
|
2247
|
+
export type InstanceThemeInput = {
|
|
2248
|
+
"palette": InstancePalette;
|
|
2249
|
+
};
|
|
2250
|
+
|
|
2251
|
+
export type BillStatus = {
|
|
2252
|
+
"configured": boolean;
|
|
2253
|
+
"company_id": string | null;
|
|
2254
|
+
"environment": "sandbox" | "production";
|
|
2255
|
+
"can_send_from_bill": boolean;
|
|
2256
|
+
};
|
|
2257
|
+
|
|
2258
|
+
export type BillStatusEnvelope = {
|
|
2259
|
+
"data": BillStatus;
|
|
2260
|
+
};
|
|
2261
|
+
|
|
2262
|
+
export type BillClientDelivery = {
|
|
2263
|
+
"client_id": number;
|
|
2264
|
+
"deliver_via_bill": boolean;
|
|
2265
|
+
};
|
|
2266
|
+
|
|
2267
|
+
export type BillClientDeliveryEnvelope = {
|
|
2268
|
+
"data": BillClientDelivery;
|
|
2269
|
+
};
|
|
2270
|
+
|
|
2271
|
+
export type PayoutAccount = {
|
|
2272
|
+
"id": number;
|
|
2273
|
+
"user_id": number;
|
|
2274
|
+
"provider": "deel" | "wise";
|
|
2275
|
+
"external_id": string;
|
|
2276
|
+
"linked_by_user_id": number;
|
|
2277
|
+
"linked_at": string;
|
|
2278
|
+
"verified_at": string | null;
|
|
2279
|
+
};
|
|
2280
|
+
|
|
2281
|
+
export type PayoutAccountListEnvelope = {
|
|
2282
|
+
"data": Array<PayoutAccount>;
|
|
2283
|
+
};
|
|
2284
|
+
|
|
2285
|
+
export type PayoutAccountEnvelope = {
|
|
2286
|
+
"data": PayoutAccount;
|
|
2287
|
+
};
|
|
2288
|
+
|
|
2289
|
+
export type PayoutAccountInput = {
|
|
2290
|
+
"provider": "deel" | "wise";
|
|
2291
|
+
"external_id": string;
|
|
2292
|
+
};
|
|
2293
|
+
|
|
2294
|
+
export type BillClientDeliveryInput = {
|
|
2295
|
+
"deliver_via_bill": boolean;
|
|
2296
|
+
};
|
|
2297
|
+
|
|
2298
|
+
export type SsoDomainInput = {
|
|
2299
|
+
"domain": string;
|
|
2300
|
+
};
|
|
2301
|
+
|
|
2302
|
+
export type TwoFactorStatus = {
|
|
2303
|
+
"enrolled": boolean;
|
|
2304
|
+
"pending_confirmation": boolean;
|
|
2305
|
+
"recovery_codes_remaining": number;
|
|
2306
|
+
};
|
|
2307
|
+
|
|
2308
|
+
export type TwoFactorStatusEnvelope = {
|
|
2309
|
+
"data": TwoFactorStatus;
|
|
2310
|
+
"links": Links;
|
|
2311
|
+
};
|
|
2312
|
+
|
|
2313
|
+
export type TwoFactorEnrolment = {
|
|
2314
|
+
"secret": string;
|
|
2315
|
+
"otpauth_uri": string;
|
|
2316
|
+
"recovery_codes": Array<string>;
|
|
2317
|
+
};
|
|
2318
|
+
|
|
2319
|
+
export type TwoFactorEnrolmentEnvelope = {
|
|
2320
|
+
"data": TwoFactorEnrolment;
|
|
2321
|
+
"links": Links;
|
|
2322
|
+
};
|
|
2323
|
+
|
|
2324
|
+
export type TwoFactorCodeInput = {
|
|
2325
|
+
"code": string;
|
|
2326
|
+
};
|
|
2327
|
+
|
|
2328
|
+
export type UserEmailInput = {
|
|
2329
|
+
"email": string;
|
|
2330
|
+
};
|
|
2331
|
+
|
|
2332
|
+
export type UserEmailAcceptedEnvelope = {
|
|
2333
|
+
"data": {
|
|
2334
|
+
"status": "verification_sent";
|
|
2335
|
+
"email": string;
|
|
2336
|
+
};
|
|
2337
|
+
};
|
|
2338
|
+
|
|
2339
|
+
export type ModulePatch = {
|
|
2340
|
+
"enabled": boolean;
|
|
2341
|
+
};
|
|
2342
|
+
|
|
2343
|
+
export interface EzactoClientOptions {
|
|
2344
|
+
baseUrl: string;
|
|
2345
|
+
token?: string;
|
|
2346
|
+
fetch?: typeof globalThis.fetch;
|
|
2347
|
+
headers?: HeadersInit;
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
export class EzactoApiError extends Error {
|
|
2351
|
+
readonly status: number;
|
|
2352
|
+
readonly body: unknown;
|
|
2353
|
+
readonly requestId: string | null;
|
|
2354
|
+
|
|
2355
|
+
constructor(status: number, body: unknown, requestId: string | null) {
|
|
2356
|
+
super(`ezacto API request failed with status ${status}`);
|
|
2357
|
+
this.name = "EzactoApiError";
|
|
2358
|
+
this.status = status;
|
|
2359
|
+
this.body = body;
|
|
2360
|
+
this.requestId = requestId;
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
interface RequestOptions {
|
|
2365
|
+
query?: Readonly<Record<string, string | number | boolean | undefined>> | undefined;
|
|
2366
|
+
body?: unknown;
|
|
2367
|
+
multipart?: boolean | undefined;
|
|
2368
|
+
binary?: boolean | undefined;
|
|
2369
|
+
signal?: AbortSignal | undefined;
|
|
2370
|
+
headers?: HeadersInit | undefined;
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
export class EzactoClient {
|
|
2374
|
+
private readonly baseUrl: string;
|
|
2375
|
+
private readonly token: string | undefined;
|
|
2376
|
+
private readonly fetchImplementation: typeof globalThis.fetch;
|
|
2377
|
+
private readonly defaultHeaders: Headers;
|
|
2378
|
+
|
|
2379
|
+
constructor(options: EzactoClientOptions) {
|
|
2380
|
+
this.baseUrl = options.baseUrl.endsWith("/")
|
|
2381
|
+
? options.baseUrl
|
|
2382
|
+
: `${options.baseUrl}/`;
|
|
2383
|
+
this.token = options.token;
|
|
2384
|
+
this.fetchImplementation = options.fetch ?? globalThis.fetch;
|
|
2385
|
+
this.defaultHeaders = new Headers(options.headers);
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
private async request<T>(
|
|
2389
|
+
method: string,
|
|
2390
|
+
path: string,
|
|
2391
|
+
options: RequestOptions,
|
|
2392
|
+
): Promise<T> {
|
|
2393
|
+
const url = new URL(path.replace(/^\//, ""), this.baseUrl);
|
|
2394
|
+
for (const [name, value] of Object.entries(options.query ?? {})) {
|
|
2395
|
+
if (value !== undefined) url.searchParams.set(name, String(value));
|
|
2396
|
+
}
|
|
2397
|
+
const headers = new Headers(this.defaultHeaders);
|
|
2398
|
+
const requestHeaders = new Headers(options.headers);
|
|
2399
|
+
requestHeaders.forEach((value, name) => headers.set(name, value));
|
|
2400
|
+
if (this.token !== undefined) headers.set("authorization", `Bearer ${this.token}`);
|
|
2401
|
+
if (options.multipart === true) headers.delete("content-type");
|
|
2402
|
+
else if (options.body !== undefined) headers.set("content-type", "application/json");
|
|
2403
|
+
const response = await this.fetchImplementation(url, {
|
|
2404
|
+
method,
|
|
2405
|
+
headers,
|
|
2406
|
+
...(options.signal === undefined ? {} : { signal: options.signal }),
|
|
2407
|
+
...(options.body === undefined
|
|
2408
|
+
? {}
|
|
2409
|
+
: { body: options.multipart === true ? options.body as BodyInit : JSON.stringify(options.body) }),
|
|
2410
|
+
});
|
|
2411
|
+
if (response.ok && options.binary === true) return await response.arrayBuffer() as T;
|
|
2412
|
+
const text = await response.text();
|
|
2413
|
+
let body: unknown = undefined;
|
|
2414
|
+
if (text.length > 0) {
|
|
2415
|
+
try {
|
|
2416
|
+
body = JSON.parse(text);
|
|
2417
|
+
} catch {
|
|
2418
|
+
body = text;
|
|
2419
|
+
}
|
|
2420
|
+
}
|
|
2421
|
+
if (!response.ok) {
|
|
2422
|
+
throw new EzactoApiError(
|
|
2423
|
+
response.status,
|
|
2424
|
+
body,
|
|
2425
|
+
response.headers.get("x-request-id"),
|
|
2426
|
+
);
|
|
2427
|
+
}
|
|
2428
|
+
return body as T;
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2431
|
+
async signup(args: { body: SignupInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<AuthAcceptedEnvelope> {
|
|
2432
|
+
const headers = new Headers(args.headers);
|
|
2433
|
+
|
|
2434
|
+
return this.request<AuthAcceptedEnvelope>("POST", "/auth/signup", {
|
|
2435
|
+
body: args.body,
|
|
2436
|
+
signal: args.signal,
|
|
2437
|
+
headers,
|
|
2438
|
+
});
|
|
2439
|
+
}
|
|
2440
|
+
|
|
2441
|
+
async verifyEmail(args: { body: AuthTokenInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<AuthPrincipalEnvelope> {
|
|
2442
|
+
const headers = new Headers(args.headers);
|
|
2443
|
+
|
|
2444
|
+
return this.request<AuthPrincipalEnvelope>("POST", "/auth/verify-email", {
|
|
2445
|
+
body: args.body,
|
|
2446
|
+
signal: args.signal,
|
|
2447
|
+
headers,
|
|
2448
|
+
});
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
async signIn(args: { body: PasswordSignInInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<AuthPrincipalEnvelope> {
|
|
2452
|
+
const headers = new Headers(args.headers);
|
|
2453
|
+
|
|
2454
|
+
return this.request<AuthPrincipalEnvelope>("POST", "/auth/sign-in", {
|
|
2455
|
+
body: args.body,
|
|
2456
|
+
signal: args.signal,
|
|
2457
|
+
headers,
|
|
2458
|
+
});
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2461
|
+
async requestPasswordReset(args: { body: EmailInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<AuthAcceptedEnvelope> {
|
|
2462
|
+
const headers = new Headers(args.headers);
|
|
2463
|
+
|
|
2464
|
+
return this.request<AuthAcceptedEnvelope>("POST", "/auth/password/forgot", {
|
|
2465
|
+
body: args.body,
|
|
2466
|
+
signal: args.signal,
|
|
2467
|
+
headers,
|
|
2468
|
+
});
|
|
2469
|
+
}
|
|
2470
|
+
|
|
2471
|
+
async resetPassword(args: { body: PasswordResetInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<AuthPrincipalEnvelope> {
|
|
2472
|
+
const headers = new Headers(args.headers);
|
|
2473
|
+
|
|
2474
|
+
return this.request<AuthPrincipalEnvelope>("POST", "/auth/password/reset", {
|
|
2475
|
+
body: args.body,
|
|
2476
|
+
signal: args.signal,
|
|
2477
|
+
headers,
|
|
2478
|
+
});
|
|
2479
|
+
}
|
|
2480
|
+
|
|
2481
|
+
async listSessions(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<SessionPage> {
|
|
2482
|
+
const headers = new Headers(args.headers);
|
|
2483
|
+
|
|
2484
|
+
return this.request<SessionPage>("GET", "/api/v1/sessions", {
|
|
2485
|
+
signal: args.signal,
|
|
2486
|
+
headers,
|
|
2487
|
+
});
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
async listEmailLog(args: { query?: { "status"?: "queued" | "sent" | "bounced" | "complained" | "failed"; "per_page"?: number }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<EmailLogPage> {
|
|
2491
|
+
const headers = new Headers(args.headers);
|
|
2492
|
+
|
|
2493
|
+
return this.request<EmailLogPage>("GET", "/api/v1/email-log", {
|
|
2494
|
+
query: args.query,
|
|
2495
|
+
signal: args.signal,
|
|
2496
|
+
headers,
|
|
2497
|
+
});
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
async getEmailHealth(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<EmailHealthEnvelope> {
|
|
2501
|
+
const headers = new Headers(args.headers);
|
|
2502
|
+
|
|
2503
|
+
return this.request<EmailHealthEnvelope>("GET", "/api/v1/email-health", {
|
|
2504
|
+
signal: args.signal,
|
|
2505
|
+
headers,
|
|
2506
|
+
});
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
async listEmailTemplateVariables(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<EmailTemplateVariableCatalog> {
|
|
2510
|
+
const headers = new Headers(args.headers);
|
|
2511
|
+
|
|
2512
|
+
return this.request<EmailTemplateVariableCatalog>("GET", "/api/v1/email-template-variables", {
|
|
2513
|
+
signal: args.signal,
|
|
2514
|
+
headers,
|
|
2515
|
+
});
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
async listEmailTemplates(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<EmailTemplatePage> {
|
|
2519
|
+
const headers = new Headers(args.headers);
|
|
2520
|
+
|
|
2521
|
+
return this.request<EmailTemplatePage>("GET", "/api/v1/email-templates", {
|
|
2522
|
+
signal: args.signal,
|
|
2523
|
+
headers,
|
|
2524
|
+
});
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
async listEmailTemplateVersions(args: { "kind": string; signal?: AbortSignal; headers?: HeadersInit }): Promise<EmailTemplatePage> {
|
|
2528
|
+
const headers = new Headers(args.headers);
|
|
2529
|
+
|
|
2530
|
+
return this.request<EmailTemplatePage>("GET", "/api/v1/email-templates/:kind/versions".replace(":kind", encodeURIComponent(String(args["kind"]))), {
|
|
2531
|
+
signal: args.signal,
|
|
2532
|
+
headers,
|
|
2533
|
+
});
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
async createEmailTemplateVersion(args: { "kind": string; "Idempotency-Key": string; body: EmailTemplateVersionInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<EmailTemplateEnvelope> {
|
|
2537
|
+
const headers = new Headers(args.headers);
|
|
2538
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
2539
|
+
return this.request<EmailTemplateEnvelope>("POST", "/api/v1/email-templates/:kind/versions".replace(":kind", encodeURIComponent(String(args["kind"]))), {
|
|
2540
|
+
body: args.body,
|
|
2541
|
+
signal: args.signal,
|
|
2542
|
+
headers,
|
|
2543
|
+
});
|
|
2544
|
+
}
|
|
2545
|
+
|
|
2546
|
+
async listSenderIdentities(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<SenderIdentityPage> {
|
|
2547
|
+
const headers = new Headers(args.headers);
|
|
2548
|
+
|
|
2549
|
+
return this.request<SenderIdentityPage>("GET", "/api/v1/sender-identities", {
|
|
2550
|
+
signal: args.signal,
|
|
2551
|
+
headers,
|
|
2552
|
+
});
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
async createSenderIdentity(args: { "Idempotency-Key": string; body: SenderIdentityInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<SenderIdentityEnvelope> {
|
|
2556
|
+
const headers = new Headers(args.headers);
|
|
2557
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
2558
|
+
return this.request<SenderIdentityEnvelope>("POST", "/api/v1/sender-identities", {
|
|
2559
|
+
body: args.body,
|
|
2560
|
+
signal: args.signal,
|
|
2561
|
+
headers,
|
|
2562
|
+
});
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
async updateSenderIdentity(args: { "id": number; "Idempotency-Key": string; body: SenderIdentityPatch; signal?: AbortSignal; headers?: HeadersInit }): Promise<SenderIdentityEnvelope> {
|
|
2566
|
+
const headers = new Headers(args.headers);
|
|
2567
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
2568
|
+
return this.request<SenderIdentityEnvelope>("PATCH", "/api/v1/sender-identities/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2569
|
+
body: args.body,
|
|
2570
|
+
signal: args.signal,
|
|
2571
|
+
headers,
|
|
2572
|
+
});
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
async setDefaultSenderIdentity(args: { "id": number; "Idempotency-Key": string; body: SenderIdentityVersionInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<SenderIdentityEnvelope> {
|
|
2576
|
+
const headers = new Headers(args.headers);
|
|
2577
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
2578
|
+
return this.request<SenderIdentityEnvelope>("POST", "/api/v1/sender-identities/:id/default".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2579
|
+
body: args.body,
|
|
2580
|
+
signal: args.signal,
|
|
2581
|
+
headers,
|
|
2582
|
+
});
|
|
2583
|
+
}
|
|
2584
|
+
|
|
2585
|
+
async archiveSenderIdentity(args: { "id": number; "Idempotency-Key": string; body: SenderIdentityVersionInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<SenderIdentityEnvelope> {
|
|
2586
|
+
const headers = new Headers(args.headers);
|
|
2587
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
2588
|
+
return this.request<SenderIdentityEnvelope>("POST", "/api/v1/sender-identities/:id/archive".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2589
|
+
body: args.body,
|
|
2590
|
+
signal: args.signal,
|
|
2591
|
+
headers,
|
|
2592
|
+
});
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
async refreshSenderIdentityEvidence(args: { "id": number; "Idempotency-Key": string; body: SenderEvidenceRefreshInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<SenderIdentityEnvelope> {
|
|
2596
|
+
const headers = new Headers(args.headers);
|
|
2597
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
2598
|
+
return this.request<SenderIdentityEnvelope>("POST", "/api/v1/sender-identities/:id/refresh".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2599
|
+
body: args.body,
|
|
2600
|
+
signal: args.signal,
|
|
2601
|
+
headers,
|
|
2602
|
+
});
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2605
|
+
async testSendEmailTemplate(args: { "id": number; "Idempotency-Key": string; body: EmailTestSendInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<EmailTestSendEnvelope> {
|
|
2606
|
+
const headers = new Headers(args.headers);
|
|
2607
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
2608
|
+
return this.request<EmailTestSendEnvelope>("POST", "/api/v1/sender-identities/:id/test-send".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2609
|
+
body: args.body,
|
|
2610
|
+
signal: args.signal,
|
|
2611
|
+
headers,
|
|
2612
|
+
});
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
async listActivityLog(args: { query?: { "per_page"?: number; "from"?: string; "to"?: string; "event_type"?: string; "actor_id"?: number }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<ActivityLogPage> {
|
|
2616
|
+
const headers = new Headers(args.headers);
|
|
2617
|
+
|
|
2618
|
+
return this.request<ActivityLogPage>("GET", "/api/v1/activity-log", {
|
|
2619
|
+
query: args.query,
|
|
2620
|
+
signal: args.signal,
|
|
2621
|
+
headers,
|
|
2622
|
+
});
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2625
|
+
async listOutboxDeliveries(args: { query?: { "status"?: "pending" | "processing" | "delivered" | "failed"; "per_page"?: number }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<OutboxDeliveryPage> {
|
|
2626
|
+
const headers = new Headers(args.headers);
|
|
2627
|
+
|
|
2628
|
+
return this.request<OutboxDeliveryPage>("GET", "/api/v1/outbox-deliveries", {
|
|
2629
|
+
query: args.query,
|
|
2630
|
+
signal: args.signal,
|
|
2631
|
+
headers,
|
|
2632
|
+
});
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2635
|
+
async retryOutboxDelivery(args: { "subscriberId": string; "eventId": string; signal?: AbortSignal; headers?: HeadersInit }): Promise<OutboxDeliveryEnvelope> {
|
|
2636
|
+
const headers = new Headers(args.headers);
|
|
2637
|
+
|
|
2638
|
+
return this.request<OutboxDeliveryEnvelope>("POST", "/api/v1/outbox-deliveries/:subscriberId/:eventId/retry".replace(":subscriberId", encodeURIComponent(String(args["subscriberId"]))).replace(":eventId", encodeURIComponent(String(args["eventId"]))), {
|
|
2639
|
+
signal: args.signal,
|
|
2640
|
+
headers,
|
|
2641
|
+
});
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
async revokeSession(args: { "sessionId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<SessionEnvelope> {
|
|
2645
|
+
const headers = new Headers(args.headers);
|
|
2646
|
+
|
|
2647
|
+
return this.request<SessionEnvelope>("DELETE", "/api/v1/sessions/:sessionId".replace(":sessionId", encodeURIComponent(String(args["sessionId"]))), {
|
|
2648
|
+
signal: args.signal,
|
|
2649
|
+
headers,
|
|
2650
|
+
});
|
|
2651
|
+
}
|
|
2652
|
+
|
|
2653
|
+
async getApiRoot(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<ServiceEnvelope> {
|
|
2654
|
+
const headers = new Headers(args.headers);
|
|
2655
|
+
|
|
2656
|
+
return this.request<ServiceEnvelope>("GET", "/api/v1", {
|
|
2657
|
+
signal: args.signal,
|
|
2658
|
+
headers,
|
|
2659
|
+
});
|
|
2660
|
+
}
|
|
2661
|
+
|
|
2662
|
+
async getWhoami(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<WhoamiEnvelope> {
|
|
2663
|
+
const headers = new Headers(args.headers);
|
|
2664
|
+
|
|
2665
|
+
return this.request<WhoamiEnvelope>("GET", "/api/v1/whoami", {
|
|
2666
|
+
signal: args.signal,
|
|
2667
|
+
headers,
|
|
2668
|
+
});
|
|
2669
|
+
}
|
|
2670
|
+
|
|
2671
|
+
async listApiTokens(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<ApiTokenListEnvelope> {
|
|
2672
|
+
const headers = new Headers(args.headers);
|
|
2673
|
+
|
|
2674
|
+
return this.request<ApiTokenListEnvelope>("GET", "/api/v1/api-tokens", {
|
|
2675
|
+
signal: args.signal,
|
|
2676
|
+
headers,
|
|
2677
|
+
});
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
async createApiToken(args: { body: CreateApiTokenInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<IssuedApiTokenEnvelope> {
|
|
2681
|
+
const headers = new Headers(args.headers);
|
|
2682
|
+
|
|
2683
|
+
return this.request<IssuedApiTokenEnvelope>("POST", "/api/v1/api-tokens", {
|
|
2684
|
+
body: args.body,
|
|
2685
|
+
signal: args.signal,
|
|
2686
|
+
headers,
|
|
2687
|
+
});
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
async revokeApiToken(args: { "tokenId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<ApiTokenEnvelope> {
|
|
2691
|
+
const headers = new Headers(args.headers);
|
|
2692
|
+
|
|
2693
|
+
return this.request<ApiTokenEnvelope>("DELETE", "/api/v1/api-tokens/:tokenId".replace(":tokenId", encodeURIComponent(String(args["tokenId"]))), {
|
|
2694
|
+
signal: args.signal,
|
|
2695
|
+
headers,
|
|
2696
|
+
});
|
|
2697
|
+
}
|
|
2698
|
+
|
|
2699
|
+
async listClients(args: { query?: { "cursor"?: string; "per_page"?: number; "is_active"?: boolean; "updated_since"?: string; "parent_client_id"?: number; "bill_to_client_id"?: number; "q"?: string }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<GeneralResourcePage> {
|
|
2700
|
+
const headers = new Headers(args.headers);
|
|
2701
|
+
|
|
2702
|
+
return this.request<GeneralResourcePage>("GET", "/api/v1/clients", {
|
|
2703
|
+
query: args.query,
|
|
2704
|
+
signal: args.signal,
|
|
2705
|
+
headers,
|
|
2706
|
+
});
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
async createClient(args: { body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2710
|
+
const headers = new Headers(args.headers);
|
|
2711
|
+
|
|
2712
|
+
return this.request<GeneralResourceEnvelope>("POST", "/api/v1/clients", {
|
|
2713
|
+
body: args.body,
|
|
2714
|
+
signal: args.signal,
|
|
2715
|
+
headers,
|
|
2716
|
+
});
|
|
2717
|
+
}
|
|
2718
|
+
|
|
2719
|
+
async getClient(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2720
|
+
const headers = new Headers(args.headers);
|
|
2721
|
+
|
|
2722
|
+
return this.request<GeneralResourceEnvelope>("GET", "/api/v1/clients/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2723
|
+
signal: args.signal,
|
|
2724
|
+
headers,
|
|
2725
|
+
});
|
|
2726
|
+
}
|
|
2727
|
+
|
|
2728
|
+
async updateClient(args: { "id": number; body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2729
|
+
const headers = new Headers(args.headers);
|
|
2730
|
+
|
|
2731
|
+
return this.request<GeneralResourceEnvelope>("PATCH", "/api/v1/clients/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2732
|
+
body: args.body,
|
|
2733
|
+
signal: args.signal,
|
|
2734
|
+
headers,
|
|
2735
|
+
});
|
|
2736
|
+
}
|
|
2737
|
+
|
|
2738
|
+
async deleteClient(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<void> {
|
|
2739
|
+
const headers = new Headers(args.headers);
|
|
2740
|
+
|
|
2741
|
+
return this.request<void>("DELETE", "/api/v1/clients/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2742
|
+
signal: args.signal,
|
|
2743
|
+
headers,
|
|
2744
|
+
});
|
|
2745
|
+
}
|
|
2746
|
+
|
|
2747
|
+
async listContacts(args: { query?: { "cursor"?: string; "per_page"?: number; "client_id"?: number; "updated_since"?: string }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<GeneralResourcePage> {
|
|
2748
|
+
const headers = new Headers(args.headers);
|
|
2749
|
+
|
|
2750
|
+
return this.request<GeneralResourcePage>("GET", "/api/v1/contacts", {
|
|
2751
|
+
query: args.query,
|
|
2752
|
+
signal: args.signal,
|
|
2753
|
+
headers,
|
|
2754
|
+
});
|
|
2755
|
+
}
|
|
2756
|
+
|
|
2757
|
+
async createContact(args: { body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2758
|
+
const headers = new Headers(args.headers);
|
|
2759
|
+
|
|
2760
|
+
return this.request<GeneralResourceEnvelope>("POST", "/api/v1/contacts", {
|
|
2761
|
+
body: args.body,
|
|
2762
|
+
signal: args.signal,
|
|
2763
|
+
headers,
|
|
2764
|
+
});
|
|
2765
|
+
}
|
|
2766
|
+
|
|
2767
|
+
async getContact(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2768
|
+
const headers = new Headers(args.headers);
|
|
2769
|
+
|
|
2770
|
+
return this.request<GeneralResourceEnvelope>("GET", "/api/v1/contacts/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2771
|
+
signal: args.signal,
|
|
2772
|
+
headers,
|
|
2773
|
+
});
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2776
|
+
async updateContact(args: { "id": number; body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2777
|
+
const headers = new Headers(args.headers);
|
|
2778
|
+
|
|
2779
|
+
return this.request<GeneralResourceEnvelope>("PATCH", "/api/v1/contacts/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2780
|
+
body: args.body,
|
|
2781
|
+
signal: args.signal,
|
|
2782
|
+
headers,
|
|
2783
|
+
});
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
async deleteContact(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<void> {
|
|
2787
|
+
const headers = new Headers(args.headers);
|
|
2788
|
+
|
|
2789
|
+
return this.request<void>("DELETE", "/api/v1/contacts/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2790
|
+
signal: args.signal,
|
|
2791
|
+
headers,
|
|
2792
|
+
});
|
|
2793
|
+
}
|
|
2794
|
+
|
|
2795
|
+
async listExpenseCategories(args: { query?: { "cursor"?: string; "per_page"?: number; "is_active"?: boolean; "updated_since"?: string }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<ExpenseCategoryPage> {
|
|
2796
|
+
const headers = new Headers(args.headers);
|
|
2797
|
+
|
|
2798
|
+
return this.request<ExpenseCategoryPage>("GET", "/api/v1/expense-categories", {
|
|
2799
|
+
query: args.query,
|
|
2800
|
+
signal: args.signal,
|
|
2801
|
+
headers,
|
|
2802
|
+
});
|
|
2803
|
+
}
|
|
2804
|
+
|
|
2805
|
+
async createExpenseCategory(args: { body: ExpenseCategoryInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<ExpenseCategoryEnvelope> {
|
|
2806
|
+
const headers = new Headers(args.headers);
|
|
2807
|
+
|
|
2808
|
+
return this.request<ExpenseCategoryEnvelope>("POST", "/api/v1/expense-categories", {
|
|
2809
|
+
body: args.body,
|
|
2810
|
+
signal: args.signal,
|
|
2811
|
+
headers,
|
|
2812
|
+
});
|
|
2813
|
+
}
|
|
2814
|
+
|
|
2815
|
+
async getExpenseCategory(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<ExpenseCategoryEnvelope> {
|
|
2816
|
+
const headers = new Headers(args.headers);
|
|
2817
|
+
|
|
2818
|
+
return this.request<ExpenseCategoryEnvelope>("GET", "/api/v1/expense-categories/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2819
|
+
signal: args.signal,
|
|
2820
|
+
headers,
|
|
2821
|
+
});
|
|
2822
|
+
}
|
|
2823
|
+
|
|
2824
|
+
async updateExpenseCategory(args: { "id": number; body: ExpenseCategoryPatch; signal?: AbortSignal; headers?: HeadersInit }): Promise<ExpenseCategoryEnvelope> {
|
|
2825
|
+
const headers = new Headers(args.headers);
|
|
2826
|
+
|
|
2827
|
+
return this.request<ExpenseCategoryEnvelope>("PATCH", "/api/v1/expense-categories/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2828
|
+
body: args.body,
|
|
2829
|
+
signal: args.signal,
|
|
2830
|
+
headers,
|
|
2831
|
+
});
|
|
2832
|
+
}
|
|
2833
|
+
|
|
2834
|
+
async deleteExpenseCategory(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<void> {
|
|
2835
|
+
const headers = new Headers(args.headers);
|
|
2836
|
+
|
|
2837
|
+
return this.request<void>("DELETE", "/api/v1/expense-categories/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2838
|
+
signal: args.signal,
|
|
2839
|
+
headers,
|
|
2840
|
+
});
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
async listProjects(args: { query?: { "cursor"?: string; "per_page"?: number; "client_id"?: number; "is_active"?: boolean; "updated_since"?: string; "q"?: string }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<GeneralResourcePage> {
|
|
2844
|
+
const headers = new Headers(args.headers);
|
|
2845
|
+
|
|
2846
|
+
return this.request<GeneralResourcePage>("GET", "/api/v1/projects", {
|
|
2847
|
+
query: args.query,
|
|
2848
|
+
signal: args.signal,
|
|
2849
|
+
headers,
|
|
2850
|
+
});
|
|
2851
|
+
}
|
|
2852
|
+
|
|
2853
|
+
async createProject(args: { body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2854
|
+
const headers = new Headers(args.headers);
|
|
2855
|
+
|
|
2856
|
+
return this.request<GeneralResourceEnvelope>("POST", "/api/v1/projects", {
|
|
2857
|
+
body: args.body,
|
|
2858
|
+
signal: args.signal,
|
|
2859
|
+
headers,
|
|
2860
|
+
});
|
|
2861
|
+
}
|
|
2862
|
+
|
|
2863
|
+
async getProject(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2864
|
+
const headers = new Headers(args.headers);
|
|
2865
|
+
|
|
2866
|
+
return this.request<GeneralResourceEnvelope>("GET", "/api/v1/projects/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2867
|
+
signal: args.signal,
|
|
2868
|
+
headers,
|
|
2869
|
+
});
|
|
2870
|
+
}
|
|
2871
|
+
|
|
2872
|
+
async updateProject(args: { "id": number; body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2873
|
+
const headers = new Headers(args.headers);
|
|
2874
|
+
|
|
2875
|
+
return this.request<GeneralResourceEnvelope>("PATCH", "/api/v1/projects/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2876
|
+
body: args.body,
|
|
2877
|
+
signal: args.signal,
|
|
2878
|
+
headers,
|
|
2879
|
+
});
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2882
|
+
async deleteProject(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<void> {
|
|
2883
|
+
const headers = new Headers(args.headers);
|
|
2884
|
+
|
|
2885
|
+
return this.request<void>("DELETE", "/api/v1/projects/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2886
|
+
signal: args.signal,
|
|
2887
|
+
headers,
|
|
2888
|
+
});
|
|
2889
|
+
}
|
|
2890
|
+
|
|
2891
|
+
async listTasks(args: { query?: { "cursor"?: string; "per_page"?: number; "is_active"?: boolean; "updated_since"?: string; "q"?: string }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<GeneralResourcePage> {
|
|
2892
|
+
const headers = new Headers(args.headers);
|
|
2893
|
+
|
|
2894
|
+
return this.request<GeneralResourcePage>("GET", "/api/v1/tasks", {
|
|
2895
|
+
query: args.query,
|
|
2896
|
+
signal: args.signal,
|
|
2897
|
+
headers,
|
|
2898
|
+
});
|
|
2899
|
+
}
|
|
2900
|
+
|
|
2901
|
+
async createTask(args: { body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2902
|
+
const headers = new Headers(args.headers);
|
|
2903
|
+
|
|
2904
|
+
return this.request<GeneralResourceEnvelope>("POST", "/api/v1/tasks", {
|
|
2905
|
+
body: args.body,
|
|
2906
|
+
signal: args.signal,
|
|
2907
|
+
headers,
|
|
2908
|
+
});
|
|
2909
|
+
}
|
|
2910
|
+
|
|
2911
|
+
async getTask(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2912
|
+
const headers = new Headers(args.headers);
|
|
2913
|
+
|
|
2914
|
+
return this.request<GeneralResourceEnvelope>("GET", "/api/v1/tasks/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2915
|
+
signal: args.signal,
|
|
2916
|
+
headers,
|
|
2917
|
+
});
|
|
2918
|
+
}
|
|
2919
|
+
|
|
2920
|
+
async updateTask(args: { "id": number; body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2921
|
+
const headers = new Headers(args.headers);
|
|
2922
|
+
|
|
2923
|
+
return this.request<GeneralResourceEnvelope>("PATCH", "/api/v1/tasks/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2924
|
+
body: args.body,
|
|
2925
|
+
signal: args.signal,
|
|
2926
|
+
headers,
|
|
2927
|
+
});
|
|
2928
|
+
}
|
|
2929
|
+
|
|
2930
|
+
async deleteTask(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<void> {
|
|
2931
|
+
const headers = new Headers(args.headers);
|
|
2932
|
+
|
|
2933
|
+
return this.request<void>("DELETE", "/api/v1/tasks/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2934
|
+
signal: args.signal,
|
|
2935
|
+
headers,
|
|
2936
|
+
});
|
|
2937
|
+
}
|
|
2938
|
+
|
|
2939
|
+
async listTaskAssignments(args: { query?: { "cursor"?: string; "per_page"?: number; "project_id"?: number; "task_id"?: number; "is_active"?: boolean; "updated_since"?: string }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<GeneralResourcePage> {
|
|
2940
|
+
const headers = new Headers(args.headers);
|
|
2941
|
+
|
|
2942
|
+
return this.request<GeneralResourcePage>("GET", "/api/v1/task-assignments", {
|
|
2943
|
+
query: args.query,
|
|
2944
|
+
signal: args.signal,
|
|
2945
|
+
headers,
|
|
2946
|
+
});
|
|
2947
|
+
}
|
|
2948
|
+
|
|
2949
|
+
async createTaskAssignment(args: { body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2950
|
+
const headers = new Headers(args.headers);
|
|
2951
|
+
|
|
2952
|
+
return this.request<GeneralResourceEnvelope>("POST", "/api/v1/task-assignments", {
|
|
2953
|
+
body: args.body,
|
|
2954
|
+
signal: args.signal,
|
|
2955
|
+
headers,
|
|
2956
|
+
});
|
|
2957
|
+
}
|
|
2958
|
+
|
|
2959
|
+
async getTaskAssignment(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2960
|
+
const headers = new Headers(args.headers);
|
|
2961
|
+
|
|
2962
|
+
return this.request<GeneralResourceEnvelope>("GET", "/api/v1/task-assignments/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2963
|
+
signal: args.signal,
|
|
2964
|
+
headers,
|
|
2965
|
+
});
|
|
2966
|
+
}
|
|
2967
|
+
|
|
2968
|
+
async updateTaskAssignment(args: { "id": number; body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2969
|
+
const headers = new Headers(args.headers);
|
|
2970
|
+
|
|
2971
|
+
return this.request<GeneralResourceEnvelope>("PATCH", "/api/v1/task-assignments/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2972
|
+
body: args.body,
|
|
2973
|
+
signal: args.signal,
|
|
2974
|
+
headers,
|
|
2975
|
+
});
|
|
2976
|
+
}
|
|
2977
|
+
|
|
2978
|
+
async deleteTaskAssignment(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<void> {
|
|
2979
|
+
const headers = new Headers(args.headers);
|
|
2980
|
+
|
|
2981
|
+
return this.request<void>("DELETE", "/api/v1/task-assignments/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
2982
|
+
signal: args.signal,
|
|
2983
|
+
headers,
|
|
2984
|
+
});
|
|
2985
|
+
}
|
|
2986
|
+
|
|
2987
|
+
async listUserAssignments(args: { query?: { "cursor"?: string; "per_page"?: number; "project_id"?: number; "user_id"?: number; "is_active"?: boolean; "updated_since"?: string }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<GeneralResourcePage> {
|
|
2988
|
+
const headers = new Headers(args.headers);
|
|
2989
|
+
|
|
2990
|
+
return this.request<GeneralResourcePage>("GET", "/api/v1/user-assignments", {
|
|
2991
|
+
query: args.query,
|
|
2992
|
+
signal: args.signal,
|
|
2993
|
+
headers,
|
|
2994
|
+
});
|
|
2995
|
+
}
|
|
2996
|
+
|
|
2997
|
+
async createUserAssignment(args: { body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
2998
|
+
const headers = new Headers(args.headers);
|
|
2999
|
+
|
|
3000
|
+
return this.request<GeneralResourceEnvelope>("POST", "/api/v1/user-assignments", {
|
|
3001
|
+
body: args.body,
|
|
3002
|
+
signal: args.signal,
|
|
3003
|
+
headers,
|
|
3004
|
+
});
|
|
3005
|
+
}
|
|
3006
|
+
|
|
3007
|
+
async getUserAssignment(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
3008
|
+
const headers = new Headers(args.headers);
|
|
3009
|
+
|
|
3010
|
+
return this.request<GeneralResourceEnvelope>("GET", "/api/v1/user-assignments/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3011
|
+
signal: args.signal,
|
|
3012
|
+
headers,
|
|
3013
|
+
});
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
async updateUserAssignment(args: { "id": number; body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
3017
|
+
const headers = new Headers(args.headers);
|
|
3018
|
+
|
|
3019
|
+
return this.request<GeneralResourceEnvelope>("PATCH", "/api/v1/user-assignments/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3020
|
+
body: args.body,
|
|
3021
|
+
signal: args.signal,
|
|
3022
|
+
headers,
|
|
3023
|
+
});
|
|
3024
|
+
}
|
|
3025
|
+
|
|
3026
|
+
async deleteUserAssignment(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<void> {
|
|
3027
|
+
const headers = new Headers(args.headers);
|
|
3028
|
+
|
|
3029
|
+
return this.request<void>("DELETE", "/api/v1/user-assignments/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3030
|
+
signal: args.signal,
|
|
3031
|
+
headers,
|
|
3032
|
+
});
|
|
3033
|
+
}
|
|
3034
|
+
|
|
3035
|
+
async listUsers(args: { query?: { "cursor"?: string; "per_page"?: number; "is_active"?: boolean; "updated_since"?: string; "profile"?: "member" | "project_manager" | "people_admin" | "accounting" | "executive_manager" | "administrator"; "is_contractor"?: boolean }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<GeneralResourcePage> {
|
|
3036
|
+
const headers = new Headers(args.headers);
|
|
3037
|
+
|
|
3038
|
+
return this.request<GeneralResourcePage>("GET", "/api/v1/users", {
|
|
3039
|
+
query: args.query,
|
|
3040
|
+
signal: args.signal,
|
|
3041
|
+
headers,
|
|
3042
|
+
});
|
|
3043
|
+
}
|
|
3044
|
+
|
|
3045
|
+
async createUser(args: { body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
3046
|
+
const headers = new Headers(args.headers);
|
|
3047
|
+
|
|
3048
|
+
return this.request<GeneralResourceEnvelope>("POST", "/api/v1/users", {
|
|
3049
|
+
body: args.body,
|
|
3050
|
+
signal: args.signal,
|
|
3051
|
+
headers,
|
|
3052
|
+
});
|
|
3053
|
+
}
|
|
3054
|
+
|
|
3055
|
+
async getUser(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
3056
|
+
const headers = new Headers(args.headers);
|
|
3057
|
+
|
|
3058
|
+
return this.request<GeneralResourceEnvelope>("GET", "/api/v1/users/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3059
|
+
signal: args.signal,
|
|
3060
|
+
headers,
|
|
3061
|
+
});
|
|
3062
|
+
}
|
|
3063
|
+
|
|
3064
|
+
async updateUser(args: { "id": number; body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
3065
|
+
const headers = new Headers(args.headers);
|
|
3066
|
+
|
|
3067
|
+
return this.request<GeneralResourceEnvelope>("PATCH", "/api/v1/users/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3068
|
+
body: args.body,
|
|
3069
|
+
signal: args.signal,
|
|
3070
|
+
headers,
|
|
3071
|
+
});
|
|
3072
|
+
}
|
|
3073
|
+
|
|
3074
|
+
async deleteUser(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<void> {
|
|
3075
|
+
const headers = new Headers(args.headers);
|
|
3076
|
+
|
|
3077
|
+
return this.request<void>("DELETE", "/api/v1/users/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3078
|
+
signal: args.signal,
|
|
3079
|
+
headers,
|
|
3080
|
+
});
|
|
3081
|
+
}
|
|
3082
|
+
|
|
3083
|
+
async listRoles(args: { query?: { "cursor"?: string; "per_page"?: number }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<GeneralResourcePage> {
|
|
3084
|
+
const headers = new Headers(args.headers);
|
|
3085
|
+
|
|
3086
|
+
return this.request<GeneralResourcePage>("GET", "/api/v1/roles", {
|
|
3087
|
+
query: args.query,
|
|
3088
|
+
signal: args.signal,
|
|
3089
|
+
headers,
|
|
3090
|
+
});
|
|
3091
|
+
}
|
|
3092
|
+
|
|
3093
|
+
async createRole(args: { body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
3094
|
+
const headers = new Headers(args.headers);
|
|
3095
|
+
|
|
3096
|
+
return this.request<GeneralResourceEnvelope>("POST", "/api/v1/roles", {
|
|
3097
|
+
body: args.body,
|
|
3098
|
+
signal: args.signal,
|
|
3099
|
+
headers,
|
|
3100
|
+
});
|
|
3101
|
+
}
|
|
3102
|
+
|
|
3103
|
+
async getRole(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
3104
|
+
const headers = new Headers(args.headers);
|
|
3105
|
+
|
|
3106
|
+
return this.request<GeneralResourceEnvelope>("GET", "/api/v1/roles/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3107
|
+
signal: args.signal,
|
|
3108
|
+
headers,
|
|
3109
|
+
});
|
|
3110
|
+
}
|
|
3111
|
+
|
|
3112
|
+
async updateRole(args: { "id": number; body: GeneralMutationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<GeneralResourceEnvelope> {
|
|
3113
|
+
const headers = new Headers(args.headers);
|
|
3114
|
+
|
|
3115
|
+
return this.request<GeneralResourceEnvelope>("PATCH", "/api/v1/roles/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3116
|
+
body: args.body,
|
|
3117
|
+
signal: args.signal,
|
|
3118
|
+
headers,
|
|
3119
|
+
});
|
|
3120
|
+
}
|
|
3121
|
+
|
|
3122
|
+
async deleteRole(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<void> {
|
|
3123
|
+
const headers = new Headers(args.headers);
|
|
3124
|
+
|
|
3125
|
+
return this.request<void>("DELETE", "/api/v1/roles/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3126
|
+
signal: args.signal,
|
|
3127
|
+
headers,
|
|
3128
|
+
});
|
|
3129
|
+
}
|
|
3130
|
+
|
|
3131
|
+
async listBillableRates(args: { "userId": number; query?: { "cursor"?: string; "per_page"?: number }; signal?: AbortSignal; headers?: HeadersInit }): Promise<UserRatePage> {
|
|
3132
|
+
const headers = new Headers(args.headers);
|
|
3133
|
+
|
|
3134
|
+
return this.request<UserRatePage>("GET", "/api/v1/users/:userId/billable-rates".replace(":userId", encodeURIComponent(String(args["userId"]))), {
|
|
3135
|
+
query: args.query,
|
|
3136
|
+
signal: args.signal,
|
|
3137
|
+
headers,
|
|
3138
|
+
});
|
|
3139
|
+
}
|
|
3140
|
+
|
|
3141
|
+
async appendBillableRate(args: { "userId": number; "Idempotency-Key": string; body: UserRateInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<UserRateEnvelope> {
|
|
3142
|
+
const headers = new Headers(args.headers);
|
|
3143
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3144
|
+
return this.request<UserRateEnvelope>("POST", "/api/v1/users/:userId/billable-rates".replace(":userId", encodeURIComponent(String(args["userId"]))), {
|
|
3145
|
+
body: args.body,
|
|
3146
|
+
signal: args.signal,
|
|
3147
|
+
headers,
|
|
3148
|
+
});
|
|
3149
|
+
}
|
|
3150
|
+
|
|
3151
|
+
async getBillableRate(args: { "userId": number; "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<UserRateEnvelope> {
|
|
3152
|
+
const headers = new Headers(args.headers);
|
|
3153
|
+
|
|
3154
|
+
return this.request<UserRateEnvelope>("GET", "/api/v1/users/:userId/billable-rates/:id".replace(":userId", encodeURIComponent(String(args["userId"]))).replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3155
|
+
signal: args.signal,
|
|
3156
|
+
headers,
|
|
3157
|
+
});
|
|
3158
|
+
}
|
|
3159
|
+
|
|
3160
|
+
async listCostRates(args: { "userId": number; query?: { "cursor"?: string; "per_page"?: number }; signal?: AbortSignal; headers?: HeadersInit }): Promise<UserRatePage> {
|
|
3161
|
+
const headers = new Headers(args.headers);
|
|
3162
|
+
|
|
3163
|
+
return this.request<UserRatePage>("GET", "/api/v1/users/:userId/cost-rates".replace(":userId", encodeURIComponent(String(args["userId"]))), {
|
|
3164
|
+
query: args.query,
|
|
3165
|
+
signal: args.signal,
|
|
3166
|
+
headers,
|
|
3167
|
+
});
|
|
3168
|
+
}
|
|
3169
|
+
|
|
3170
|
+
async appendCostRate(args: { "userId": number; "Idempotency-Key": string; body: UserRateInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<UserRateEnvelope> {
|
|
3171
|
+
const headers = new Headers(args.headers);
|
|
3172
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3173
|
+
return this.request<UserRateEnvelope>("POST", "/api/v1/users/:userId/cost-rates".replace(":userId", encodeURIComponent(String(args["userId"]))), {
|
|
3174
|
+
body: args.body,
|
|
3175
|
+
signal: args.signal,
|
|
3176
|
+
headers,
|
|
3177
|
+
});
|
|
3178
|
+
}
|
|
3179
|
+
|
|
3180
|
+
async getCostRate(args: { "userId": number; "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<UserRateEnvelope> {
|
|
3181
|
+
const headers = new Headers(args.headers);
|
|
3182
|
+
|
|
3183
|
+
return this.request<UserRateEnvelope>("GET", "/api/v1/users/:userId/cost-rates/:id".replace(":userId", encodeURIComponent(String(args["userId"]))).replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3184
|
+
signal: args.signal,
|
|
3185
|
+
headers,
|
|
3186
|
+
});
|
|
3187
|
+
}
|
|
3188
|
+
|
|
3189
|
+
async getTimeEntrySettings(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<TimeEntrySettingsEnvelope> {
|
|
3190
|
+
const headers = new Headers(args.headers);
|
|
3191
|
+
|
|
3192
|
+
return this.request<TimeEntrySettingsEnvelope>("GET", "/api/v1/time-entry-settings", {
|
|
3193
|
+
signal: args.signal,
|
|
3194
|
+
headers,
|
|
3195
|
+
});
|
|
3196
|
+
}
|
|
3197
|
+
|
|
3198
|
+
async getTimeEntryNoteSettings(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<TimeEntryNoteSettingsEnvelope> {
|
|
3199
|
+
const headers = new Headers(args.headers);
|
|
3200
|
+
|
|
3201
|
+
return this.request<TimeEntryNoteSettingsEnvelope>("GET", "/api/v1/time-entry-note-settings", {
|
|
3202
|
+
signal: args.signal,
|
|
3203
|
+
headers,
|
|
3204
|
+
});
|
|
3205
|
+
}
|
|
3206
|
+
|
|
3207
|
+
async updateTimeEntryNoteSettings(args: { body: TimeEntryNoteSettingsPatch; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimeEntryNoteSettingsEnvelope> {
|
|
3208
|
+
const headers = new Headers(args.headers);
|
|
3209
|
+
|
|
3210
|
+
return this.request<TimeEntryNoteSettingsEnvelope>("PATCH", "/api/v1/time-entry-note-settings", {
|
|
3211
|
+
body: args.body,
|
|
3212
|
+
signal: args.signal,
|
|
3213
|
+
headers,
|
|
3214
|
+
});
|
|
3215
|
+
}
|
|
3216
|
+
|
|
3217
|
+
async listTimeEntryOptions(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<TimeEntryOptionListEnvelope> {
|
|
3218
|
+
const headers = new Headers(args.headers);
|
|
3219
|
+
|
|
3220
|
+
return this.request<TimeEntryOptionListEnvelope>("GET", "/api/v1/time-entry-options", {
|
|
3221
|
+
signal: args.signal,
|
|
3222
|
+
headers,
|
|
3223
|
+
});
|
|
3224
|
+
}
|
|
3225
|
+
|
|
3226
|
+
async listTimeEntries(args: { query?: { "cursor"?: string; "per_page"?: number; "user_id"?: number; "client_id"?: number; "project_id"?: number; "spent_date"?: string; "from"?: string; "to"?: string; "approval_status"?: "unsubmitted" | "submitted" | "approved"; "invoice_id"?: number; "is_billed"?: boolean; "billable"?: boolean; "updated_since"?: string; "task_id"?: number; "is_running"?: boolean; "budgeted"?: boolean; "external_reference_id"?: string }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<TimeEntryPage> {
|
|
3227
|
+
const headers = new Headers(args.headers);
|
|
3228
|
+
|
|
3229
|
+
return this.request<TimeEntryPage>("GET", "/api/v1/time-entries", {
|
|
3230
|
+
query: args.query,
|
|
3231
|
+
signal: args.signal,
|
|
3232
|
+
headers,
|
|
3233
|
+
});
|
|
3234
|
+
}
|
|
3235
|
+
|
|
3236
|
+
async createTimeEntry(args: { body: TimeEntryInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimeEntryEnvelope> {
|
|
3237
|
+
const headers = new Headers(args.headers);
|
|
3238
|
+
|
|
3239
|
+
return this.request<TimeEntryEnvelope>("POST", "/api/v1/time-entries", {
|
|
3240
|
+
body: args.body,
|
|
3241
|
+
signal: args.signal,
|
|
3242
|
+
headers,
|
|
3243
|
+
});
|
|
3244
|
+
}
|
|
3245
|
+
|
|
3246
|
+
async getTimeEntry(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimeEntryEnvelope> {
|
|
3247
|
+
const headers = new Headers(args.headers);
|
|
3248
|
+
|
|
3249
|
+
return this.request<TimeEntryEnvelope>("GET", "/api/v1/time-entries/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3250
|
+
signal: args.signal,
|
|
3251
|
+
headers,
|
|
3252
|
+
});
|
|
3253
|
+
}
|
|
3254
|
+
|
|
3255
|
+
async updateTimeEntry(args: { "id": number; body: TimeEntryPatch; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimeEntryEnvelope> {
|
|
3256
|
+
const headers = new Headers(args.headers);
|
|
3257
|
+
|
|
3258
|
+
return this.request<TimeEntryEnvelope>("PATCH", "/api/v1/time-entries/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3259
|
+
body: args.body,
|
|
3260
|
+
signal: args.signal,
|
|
3261
|
+
headers,
|
|
3262
|
+
});
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
async deleteTimeEntry(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimeEntryEnvelope> {
|
|
3266
|
+
const headers = new Headers(args.headers);
|
|
3267
|
+
|
|
3268
|
+
return this.request<TimeEntryEnvelope>("DELETE", "/api/v1/time-entries/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3269
|
+
signal: args.signal,
|
|
3270
|
+
headers,
|
|
3271
|
+
});
|
|
3272
|
+
}
|
|
3273
|
+
|
|
3274
|
+
async stopTimeEntry(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimeEntryEnvelope> {
|
|
3275
|
+
const headers = new Headers(args.headers);
|
|
3276
|
+
|
|
3277
|
+
return this.request<TimeEntryEnvelope>("POST", "/api/v1/time-entries/:id/stop".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3278
|
+
signal: args.signal,
|
|
3279
|
+
headers,
|
|
3280
|
+
});
|
|
3281
|
+
}
|
|
3282
|
+
|
|
3283
|
+
async restartTimeEntry(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimeEntryEnvelope> {
|
|
3284
|
+
const headers = new Headers(args.headers);
|
|
3285
|
+
|
|
3286
|
+
return this.request<TimeEntryEnvelope>("POST", "/api/v1/time-entries/:id/restart".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3287
|
+
signal: args.signal,
|
|
3288
|
+
headers,
|
|
3289
|
+
});
|
|
3290
|
+
}
|
|
3291
|
+
|
|
3292
|
+
async listTimesheetSubmissions(args: { query?: { "cursor"?: string; "per_page"?: number; "period_start"?: string; "period_end"?: string }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<TimesheetSubmissionPage> {
|
|
3293
|
+
const headers = new Headers(args.headers);
|
|
3294
|
+
|
|
3295
|
+
return this.request<TimesheetSubmissionPage>("GET", "/api/v1/timesheet-submissions", {
|
|
3296
|
+
query: args.query,
|
|
3297
|
+
signal: args.signal,
|
|
3298
|
+
headers,
|
|
3299
|
+
});
|
|
3300
|
+
}
|
|
3301
|
+
|
|
3302
|
+
async submitTimesheet(args: { body: TimesheetSubmissionInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimesheetSubmissionEnvelope> {
|
|
3303
|
+
const headers = new Headers(args.headers);
|
|
3304
|
+
|
|
3305
|
+
return this.request<TimesheetSubmissionEnvelope>("POST", "/api/v1/timesheet-submissions", {
|
|
3306
|
+
body: args.body,
|
|
3307
|
+
signal: args.signal,
|
|
3308
|
+
headers,
|
|
3309
|
+
});
|
|
3310
|
+
}
|
|
3311
|
+
|
|
3312
|
+
async listPendingTimesheetSubmissions(args: { query?: { "cursor"?: string; "per_page"?: number; "period_start"?: string; "period_end"?: string; "user_id"?: number; "client_id"?: number; "project_id"?: number }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<TimesheetSubmissionPage> {
|
|
3313
|
+
const headers = new Headers(args.headers);
|
|
3314
|
+
|
|
3315
|
+
return this.request<TimesheetSubmissionPage>("GET", "/api/v1/timesheet-submissions/pending", {
|
|
3316
|
+
query: args.query,
|
|
3317
|
+
signal: args.signal,
|
|
3318
|
+
headers,
|
|
3319
|
+
});
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3322
|
+
async listApprovedTimesheetSubmissions(args: { query?: { "cursor"?: string; "per_page"?: number; "period_start"?: string; "period_end"?: string; "user_id"?: number; "client_id"?: number; "project_id"?: number }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<TimesheetSubmissionPage> {
|
|
3323
|
+
const headers = new Headers(args.headers);
|
|
3324
|
+
|
|
3325
|
+
return this.request<TimesheetSubmissionPage>("GET", "/api/v1/timesheet-submissions/approved", {
|
|
3326
|
+
query: args.query,
|
|
3327
|
+
signal: args.signal,
|
|
3328
|
+
headers,
|
|
3329
|
+
});
|
|
3330
|
+
}
|
|
3331
|
+
|
|
3332
|
+
async getTimesheetSubmission(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimesheetSubmissionDetailEnvelope> {
|
|
3333
|
+
const headers = new Headers(args.headers);
|
|
3334
|
+
|
|
3335
|
+
return this.request<TimesheetSubmissionDetailEnvelope>("GET", "/api/v1/timesheet-submissions/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3336
|
+
signal: args.signal,
|
|
3337
|
+
headers,
|
|
3338
|
+
});
|
|
3339
|
+
}
|
|
3340
|
+
|
|
3341
|
+
async bulkApproveTimesheetSubmissions(args: { "Idempotency-Key": string; body: TimesheetBulkApprovalInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimesheetBulkApprovalResult> {
|
|
3342
|
+
const headers = new Headers(args.headers);
|
|
3343
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3344
|
+
return this.request<TimesheetBulkApprovalResult>("POST", "/api/v1/timesheet-submissions/bulk-approve", {
|
|
3345
|
+
body: args.body,
|
|
3346
|
+
signal: args.signal,
|
|
3347
|
+
headers,
|
|
3348
|
+
});
|
|
3349
|
+
}
|
|
3350
|
+
|
|
3351
|
+
async approveTimesheetSubmission(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimesheetSubmissionEnvelope> {
|
|
3352
|
+
const headers = new Headers(args.headers);
|
|
3353
|
+
|
|
3354
|
+
return this.request<TimesheetSubmissionEnvelope>("POST", "/api/v1/timesheet-submissions/:id/approve".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3355
|
+
signal: args.signal,
|
|
3356
|
+
headers,
|
|
3357
|
+
});
|
|
3358
|
+
}
|
|
3359
|
+
|
|
3360
|
+
async rejectTimesheetSubmission(args: { "id": number; body: TimesheetRejectionInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimesheetSubmissionEnvelope> {
|
|
3361
|
+
const headers = new Headers(args.headers);
|
|
3362
|
+
|
|
3363
|
+
return this.request<TimesheetSubmissionEnvelope>("POST", "/api/v1/timesheet-submissions/:id/reject".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3364
|
+
body: args.body,
|
|
3365
|
+
signal: args.signal,
|
|
3366
|
+
headers,
|
|
3367
|
+
});
|
|
3368
|
+
}
|
|
3369
|
+
|
|
3370
|
+
async unsubmitTimesheetSubmission(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimesheetSubmissionEnvelope> {
|
|
3371
|
+
const headers = new Headers(args.headers);
|
|
3372
|
+
|
|
3373
|
+
return this.request<TimesheetSubmissionEnvelope>("POST", "/api/v1/timesheet-submissions/:id/unsubmit".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3374
|
+
signal: args.signal,
|
|
3375
|
+
headers,
|
|
3376
|
+
});
|
|
3377
|
+
}
|
|
3378
|
+
|
|
3379
|
+
async withdrawTimesheetSubmission(args: { "id": number; body: TimesheetWithdrawalInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimesheetSubmissionEnvelope> {
|
|
3380
|
+
const headers = new Headers(args.headers);
|
|
3381
|
+
|
|
3382
|
+
return this.request<TimesheetSubmissionEnvelope>("POST", "/api/v1/timesheet-submissions/:id/withdraw".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3383
|
+
body: args.body,
|
|
3384
|
+
signal: args.signal,
|
|
3385
|
+
headers,
|
|
3386
|
+
});
|
|
3387
|
+
}
|
|
3388
|
+
|
|
3389
|
+
async getTimesheetLockPolicy(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<TimesheetLockPolicyEnvelope> {
|
|
3390
|
+
const headers = new Headers(args.headers);
|
|
3391
|
+
|
|
3392
|
+
return this.request<TimesheetLockPolicyEnvelope>("GET", "/api/v1/timesheet-lock-policy", {
|
|
3393
|
+
signal: args.signal,
|
|
3394
|
+
headers,
|
|
3395
|
+
});
|
|
3396
|
+
}
|
|
3397
|
+
|
|
3398
|
+
async updateTimesheetLockPolicy(args: { body: TimesheetLockPolicyPatch; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimesheetLockPolicyEnvelope> {
|
|
3399
|
+
const headers = new Headers(args.headers);
|
|
3400
|
+
|
|
3401
|
+
return this.request<TimesheetLockPolicyEnvelope>("PATCH", "/api/v1/timesheet-lock-policy", {
|
|
3402
|
+
body: args.body,
|
|
3403
|
+
signal: args.signal,
|
|
3404
|
+
headers,
|
|
3405
|
+
});
|
|
3406
|
+
}
|
|
3407
|
+
|
|
3408
|
+
async listTimesheetLocks(args: { query?: { "cursor"?: string; "per_page"?: number; "active"?: boolean; "kind"?: "manual" | "auto" }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<TimesheetLockWindowPage> {
|
|
3409
|
+
const headers = new Headers(args.headers);
|
|
3410
|
+
|
|
3411
|
+
return this.request<TimesheetLockWindowPage>("GET", "/api/v1/timesheet-locks", {
|
|
3412
|
+
query: args.query,
|
|
3413
|
+
signal: args.signal,
|
|
3414
|
+
headers,
|
|
3415
|
+
});
|
|
3416
|
+
}
|
|
3417
|
+
|
|
3418
|
+
async getTimesheetLock(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimesheetLockWindowEnvelope> {
|
|
3419
|
+
const headers = new Headers(args.headers);
|
|
3420
|
+
|
|
3421
|
+
return this.request<TimesheetLockWindowEnvelope>("GET", "/api/v1/timesheet-locks/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3422
|
+
signal: args.signal,
|
|
3423
|
+
headers,
|
|
3424
|
+
});
|
|
3425
|
+
}
|
|
3426
|
+
|
|
3427
|
+
async createTimesheetManualLock(args: { "Idempotency-Key": string; body: TimesheetManualLockInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimesheetLockWindowEnvelope> {
|
|
3428
|
+
const headers = new Headers(args.headers);
|
|
3429
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3430
|
+
return this.request<TimesheetLockWindowEnvelope>("POST", "/api/v1/timesheet-locks", {
|
|
3431
|
+
body: args.body,
|
|
3432
|
+
signal: args.signal,
|
|
3433
|
+
headers,
|
|
3434
|
+
});
|
|
3435
|
+
}
|
|
3436
|
+
|
|
3437
|
+
async unlockTimesheetLock(args: { "id": number; body: TimesheetUnlockInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimesheetLockWindowEnvelope> {
|
|
3438
|
+
const headers = new Headers(args.headers);
|
|
3439
|
+
|
|
3440
|
+
return this.request<TimesheetLockWindowEnvelope>("POST", "/api/v1/timesheet-locks/:id/unlock".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3441
|
+
body: args.body,
|
|
3442
|
+
signal: args.signal,
|
|
3443
|
+
headers,
|
|
3444
|
+
});
|
|
3445
|
+
}
|
|
3446
|
+
|
|
3447
|
+
async listExpenses(args: { query?: { "cursor"?: string; "per_page"?: number; "user_id"?: number; "client_id"?: number; "project_id"?: number; "spent_date"?: string; "from"?: string; "to"?: string; "approval_status"?: "unsubmitted" | "submitted" | "approved"; "invoice_id"?: number; "is_billed"?: boolean; "billable"?: boolean; "updated_since"?: string; "expense_category_id"?: number; "reimbursable"?: boolean; "reimbursement_status"?: "none" | "pending" | "approved" | "paid" }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<ExpensePage> {
|
|
3448
|
+
const headers = new Headers(args.headers);
|
|
3449
|
+
|
|
3450
|
+
return this.request<ExpensePage>("GET", "/api/v1/expenses", {
|
|
3451
|
+
query: args.query,
|
|
3452
|
+
signal: args.signal,
|
|
3453
|
+
headers,
|
|
3454
|
+
});
|
|
3455
|
+
}
|
|
3456
|
+
|
|
3457
|
+
async createExpense(args: { body: ExpenseInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<ExpenseEnvelope> {
|
|
3458
|
+
const headers = new Headers(args.headers);
|
|
3459
|
+
|
|
3460
|
+
return this.request<ExpenseEnvelope>("POST", "/api/v1/expenses", {
|
|
3461
|
+
body: args.body,
|
|
3462
|
+
signal: args.signal,
|
|
3463
|
+
headers,
|
|
3464
|
+
});
|
|
3465
|
+
}
|
|
3466
|
+
|
|
3467
|
+
async getExpense(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<ExpenseEnvelope> {
|
|
3468
|
+
const headers = new Headers(args.headers);
|
|
3469
|
+
|
|
3470
|
+
return this.request<ExpenseEnvelope>("GET", "/api/v1/expenses/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3471
|
+
signal: args.signal,
|
|
3472
|
+
headers,
|
|
3473
|
+
});
|
|
3474
|
+
}
|
|
3475
|
+
|
|
3476
|
+
async updateExpense(args: { "id": number; body: ExpensePatch; signal?: AbortSignal; headers?: HeadersInit }): Promise<ExpenseEnvelope> {
|
|
3477
|
+
const headers = new Headers(args.headers);
|
|
3478
|
+
|
|
3479
|
+
return this.request<ExpenseEnvelope>("PATCH", "/api/v1/expenses/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3480
|
+
body: args.body,
|
|
3481
|
+
signal: args.signal,
|
|
3482
|
+
headers,
|
|
3483
|
+
});
|
|
3484
|
+
}
|
|
3485
|
+
|
|
3486
|
+
async deleteExpense(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<ExpenseEnvelope> {
|
|
3487
|
+
const headers = new Headers(args.headers);
|
|
3488
|
+
|
|
3489
|
+
return this.request<ExpenseEnvelope>("DELETE", "/api/v1/expenses/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3490
|
+
signal: args.signal,
|
|
3491
|
+
headers,
|
|
3492
|
+
});
|
|
3493
|
+
}
|
|
3494
|
+
|
|
3495
|
+
async listInvoices(args: { query?: { "cursor"?: string; "per_page"?: number; "state"?: string }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<InvoicePage> {
|
|
3496
|
+
const headers = new Headers(args.headers);
|
|
3497
|
+
|
|
3498
|
+
return this.request<InvoicePage>("GET", "/api/v1/invoices", {
|
|
3499
|
+
query: args.query,
|
|
3500
|
+
signal: args.signal,
|
|
3501
|
+
headers,
|
|
3502
|
+
});
|
|
3503
|
+
}
|
|
3504
|
+
|
|
3505
|
+
async getInvoice(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<InvoiceEnvelope> {
|
|
3506
|
+
const headers = new Headers(args.headers);
|
|
3507
|
+
|
|
3508
|
+
return this.request<InvoiceEnvelope>("GET", "/api/v1/invoices/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3509
|
+
signal: args.signal,
|
|
3510
|
+
headers,
|
|
3511
|
+
});
|
|
3512
|
+
}
|
|
3513
|
+
|
|
3514
|
+
async listEstimates(args: { query?: { "cursor"?: string; "per_page"?: number }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<EstimatePage> {
|
|
3515
|
+
const headers = new Headers(args.headers);
|
|
3516
|
+
|
|
3517
|
+
return this.request<EstimatePage>("GET", "/api/v1/estimates", {
|
|
3518
|
+
query: args.query,
|
|
3519
|
+
signal: args.signal,
|
|
3520
|
+
headers,
|
|
3521
|
+
});
|
|
3522
|
+
}
|
|
3523
|
+
|
|
3524
|
+
async getEstimate(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<EstimateEnvelope> {
|
|
3525
|
+
const headers = new Headers(args.headers);
|
|
3526
|
+
|
|
3527
|
+
return this.request<EstimateEnvelope>("GET", "/api/v1/estimates/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3528
|
+
signal: args.signal,
|
|
3529
|
+
headers,
|
|
3530
|
+
});
|
|
3531
|
+
}
|
|
3532
|
+
|
|
3533
|
+
async listEstimateMessages(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<EstimateMessageListEnvelope> {
|
|
3534
|
+
const headers = new Headers(args.headers);
|
|
3535
|
+
|
|
3536
|
+
return this.request<EstimateMessageListEnvelope>("GET", "/api/v1/estimates/:id/messages".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3537
|
+
signal: args.signal,
|
|
3538
|
+
headers,
|
|
3539
|
+
});
|
|
3540
|
+
}
|
|
3541
|
+
|
|
3542
|
+
async createEstimateMessage(args: { "id": number; "Idempotency-Key": string; body: EstimateMessageInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<EstimateMessageCommandEnvelope> {
|
|
3543
|
+
const headers = new Headers(args.headers);
|
|
3544
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3545
|
+
return this.request<EstimateMessageCommandEnvelope>("POST", "/api/v1/estimates/:id/messages".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3546
|
+
body: args.body,
|
|
3547
|
+
signal: args.signal,
|
|
3548
|
+
headers,
|
|
3549
|
+
});
|
|
3550
|
+
}
|
|
3551
|
+
|
|
3552
|
+
async convertEstimate(args: { "id": number; "Idempotency-Key": string; body: EstimateConversionInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<EstimateConversionEnvelope> {
|
|
3553
|
+
const headers = new Headers(args.headers);
|
|
3554
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3555
|
+
return this.request<EstimateConversionEnvelope>("POST", "/api/v1/estimates/:id/convert".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3556
|
+
body: args.body,
|
|
3557
|
+
signal: args.signal,
|
|
3558
|
+
headers,
|
|
3559
|
+
});
|
|
3560
|
+
}
|
|
3561
|
+
|
|
3562
|
+
async generateInvoice(args: { "Idempotency-Key": string; body: InvoiceGenerationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<InvoiceEnvelope> {
|
|
3563
|
+
const headers = new Headers(args.headers);
|
|
3564
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3565
|
+
return this.request<InvoiceEnvelope>("POST", "/api/v1/invoice-generations", {
|
|
3566
|
+
body: args.body,
|
|
3567
|
+
signal: args.signal,
|
|
3568
|
+
headers,
|
|
3569
|
+
});
|
|
3570
|
+
}
|
|
3571
|
+
|
|
3572
|
+
async updateInvoice(args: { "id": number; "Idempotency-Key": string; body: InvoiceEditInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<InvoiceCommandEnvelope> {
|
|
3573
|
+
const headers = new Headers(args.headers);
|
|
3574
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3575
|
+
return this.request<InvoiceCommandEnvelope>("PATCH", "/api/v1/invoices/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3576
|
+
body: args.body,
|
|
3577
|
+
signal: args.signal,
|
|
3578
|
+
headers,
|
|
3579
|
+
});
|
|
3580
|
+
}
|
|
3581
|
+
|
|
3582
|
+
async createInvoiceLine(args: { "id": number; "Idempotency-Key": string; body: InvoiceLineInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<InvoiceCommandEnvelope> {
|
|
3583
|
+
const headers = new Headers(args.headers);
|
|
3584
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3585
|
+
return this.request<InvoiceCommandEnvelope>("POST", "/api/v1/invoices/:id/line-items".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3586
|
+
body: args.body,
|
|
3587
|
+
signal: args.signal,
|
|
3588
|
+
headers,
|
|
3589
|
+
});
|
|
3590
|
+
}
|
|
3591
|
+
|
|
3592
|
+
async updateInvoiceLine(args: { "id": number; "lineId": number; "Idempotency-Key": string; body: InvoiceLineUpdateInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<InvoiceCommandEnvelope> {
|
|
3593
|
+
const headers = new Headers(args.headers);
|
|
3594
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3595
|
+
return this.request<InvoiceCommandEnvelope>("PATCH", "/api/v1/invoices/:id/line-items/:lineId".replace(":id", encodeURIComponent(String(args["id"]))).replace(":lineId", encodeURIComponent(String(args["lineId"]))), {
|
|
3596
|
+
body: args.body,
|
|
3597
|
+
signal: args.signal,
|
|
3598
|
+
headers,
|
|
3599
|
+
});
|
|
3600
|
+
}
|
|
3601
|
+
|
|
3602
|
+
async deleteInvoiceLine(args: { "id": number; "lineId": number; "Idempotency-Key": string; body: VersionedRowDeleteInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<InvoiceCommandEnvelope> {
|
|
3603
|
+
const headers = new Headers(args.headers);
|
|
3604
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3605
|
+
return this.request<InvoiceCommandEnvelope>("DELETE", "/api/v1/invoices/:id/line-items/:lineId".replace(":id", encodeURIComponent(String(args["id"]))).replace(":lineId", encodeURIComponent(String(args["lineId"]))), {
|
|
3606
|
+
body: args.body,
|
|
3607
|
+
signal: args.signal,
|
|
3608
|
+
headers,
|
|
3609
|
+
});
|
|
3610
|
+
}
|
|
3611
|
+
|
|
3612
|
+
async listInvoiceMessages(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<InvoiceMessageListEnvelope> {
|
|
3613
|
+
const headers = new Headers(args.headers);
|
|
3614
|
+
|
|
3615
|
+
return this.request<InvoiceMessageListEnvelope>("GET", "/api/v1/invoices/:id/messages".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3616
|
+
signal: args.signal,
|
|
3617
|
+
headers,
|
|
3618
|
+
});
|
|
3619
|
+
}
|
|
3620
|
+
|
|
3621
|
+
async createInvoiceMessage(args: { "id": number; "Idempotency-Key": string; body: InvoiceMessageInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<InvoiceCommandEnvelope> {
|
|
3622
|
+
const headers = new Headers(args.headers);
|
|
3623
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3624
|
+
return this.request<InvoiceCommandEnvelope>("POST", "/api/v1/invoices/:id/messages".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3625
|
+
body: args.body,
|
|
3626
|
+
signal: args.signal,
|
|
3627
|
+
headers,
|
|
3628
|
+
});
|
|
3629
|
+
}
|
|
3630
|
+
|
|
3631
|
+
async transitionInvoice(args: { "id": number; "Idempotency-Key": string; body: InvoiceTransitionInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<InvoiceCommandEnvelope> {
|
|
3632
|
+
const headers = new Headers(args.headers);
|
|
3633
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3634
|
+
return this.request<InvoiceCommandEnvelope>("POST", "/api/v1/invoices/:id/transitions".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3635
|
+
body: args.body,
|
|
3636
|
+
signal: args.signal,
|
|
3637
|
+
headers,
|
|
3638
|
+
});
|
|
3639
|
+
}
|
|
3640
|
+
|
|
3641
|
+
async deliverInvoiceEmail(args: { "id": number; "Idempotency-Key": string; body: InvoiceEmailDeliveryInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<InvoiceCommandEnvelope> {
|
|
3642
|
+
const headers = new Headers(args.headers);
|
|
3643
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3644
|
+
return this.request<InvoiceCommandEnvelope>("POST", "/api/v1/invoices/:id/deliveries".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3645
|
+
body: args.body,
|
|
3646
|
+
signal: args.signal,
|
|
3647
|
+
headers,
|
|
3648
|
+
});
|
|
3649
|
+
}
|
|
3650
|
+
|
|
3651
|
+
async listInvoicePayments(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<InvoicePaymentListEnvelope> {
|
|
3652
|
+
const headers = new Headers(args.headers);
|
|
3653
|
+
|
|
3654
|
+
return this.request<InvoicePaymentListEnvelope>("GET", "/api/v1/invoices/:id/payments".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3655
|
+
signal: args.signal,
|
|
3656
|
+
headers,
|
|
3657
|
+
});
|
|
3658
|
+
}
|
|
3659
|
+
|
|
3660
|
+
async recordInvoicePayment(args: { "id": number; "Idempotency-Key": string; body: InvoicePaymentInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<InvoiceCommandEnvelope> {
|
|
3661
|
+
const headers = new Headers(args.headers);
|
|
3662
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3663
|
+
return this.request<InvoiceCommandEnvelope>("POST", "/api/v1/invoices/:id/payments".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3664
|
+
body: args.body,
|
|
3665
|
+
signal: args.signal,
|
|
3666
|
+
headers,
|
|
3667
|
+
});
|
|
3668
|
+
}
|
|
3669
|
+
|
|
3670
|
+
async updateInvoicePayment(args: { "id": number; "paymentId": number; "Idempotency-Key": string; body: InvoicePaymentUpdateInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<InvoiceCommandEnvelope> {
|
|
3671
|
+
const headers = new Headers(args.headers);
|
|
3672
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3673
|
+
return this.request<InvoiceCommandEnvelope>("PATCH", "/api/v1/invoices/:id/payments/:paymentId".replace(":id", encodeURIComponent(String(args["id"]))).replace(":paymentId", encodeURIComponent(String(args["paymentId"]))), {
|
|
3674
|
+
body: args.body,
|
|
3675
|
+
signal: args.signal,
|
|
3676
|
+
headers,
|
|
3677
|
+
});
|
|
3678
|
+
}
|
|
3679
|
+
|
|
3680
|
+
async deleteInvoicePayment(args: { "id": number; "paymentId": number; "Idempotency-Key": string; body: VersionedRowDeleteInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<InvoiceCommandEnvelope> {
|
|
3681
|
+
const headers = new Headers(args.headers);
|
|
3682
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3683
|
+
return this.request<InvoiceCommandEnvelope>("DELETE", "/api/v1/invoices/:id/payments/:paymentId".replace(":id", encodeURIComponent(String(args["id"]))).replace(":paymentId", encodeURIComponent(String(args["paymentId"]))), {
|
|
3684
|
+
body: args.body,
|
|
3685
|
+
signal: args.signal,
|
|
3686
|
+
headers,
|
|
3687
|
+
});
|
|
3688
|
+
}
|
|
3689
|
+
|
|
3690
|
+
async listRetainers(args: { query?: { "cursor"?: string; "per_page"?: number }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<RetainerPage> {
|
|
3691
|
+
const headers = new Headers(args.headers);
|
|
3692
|
+
|
|
3693
|
+
return this.request<RetainerPage>("GET", "/api/v1/retainers", {
|
|
3694
|
+
query: args.query,
|
|
3695
|
+
signal: args.signal,
|
|
3696
|
+
headers,
|
|
3697
|
+
});
|
|
3698
|
+
}
|
|
3699
|
+
|
|
3700
|
+
async createRetainer(args: { "Idempotency-Key": string; body: RetainerInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<RetainerEnvelope> {
|
|
3701
|
+
const headers = new Headers(args.headers);
|
|
3702
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3703
|
+
return this.request<RetainerEnvelope>("POST", "/api/v1/retainers", {
|
|
3704
|
+
body: args.body,
|
|
3705
|
+
signal: args.signal,
|
|
3706
|
+
headers,
|
|
3707
|
+
});
|
|
3708
|
+
}
|
|
3709
|
+
|
|
3710
|
+
async getRetainer(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<RetainerEnvelope> {
|
|
3711
|
+
const headers = new Headers(args.headers);
|
|
3712
|
+
|
|
3713
|
+
return this.request<RetainerEnvelope>("GET", "/api/v1/retainers/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3714
|
+
signal: args.signal,
|
|
3715
|
+
headers,
|
|
3716
|
+
});
|
|
3717
|
+
}
|
|
3718
|
+
|
|
3719
|
+
async updateRetainer(args: { "id": number; body: RetainerPatch; signal?: AbortSignal; headers?: HeadersInit }): Promise<RetainerEnvelope> {
|
|
3720
|
+
const headers = new Headers(args.headers);
|
|
3721
|
+
|
|
3722
|
+
return this.request<RetainerEnvelope>("PATCH", "/api/v1/retainers/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3723
|
+
body: args.body,
|
|
3724
|
+
signal: args.signal,
|
|
3725
|
+
headers,
|
|
3726
|
+
});
|
|
3727
|
+
}
|
|
3728
|
+
|
|
3729
|
+
async listRetainerLedger(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<RetainerLedgerListEnvelope> {
|
|
3730
|
+
const headers = new Headers(args.headers);
|
|
3731
|
+
|
|
3732
|
+
return this.request<RetainerLedgerListEnvelope>("GET", "/api/v1/retainers/:id/ledger".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3733
|
+
signal: args.signal,
|
|
3734
|
+
headers,
|
|
3735
|
+
});
|
|
3736
|
+
}
|
|
3737
|
+
|
|
3738
|
+
async appendRetainerLedger(args: { "id": number; "Idempotency-Key": string; body: RetainerLedgerInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<RetainerLedgerMutationEnvelope> {
|
|
3739
|
+
const headers = new Headers(args.headers);
|
|
3740
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3741
|
+
return this.request<RetainerLedgerMutationEnvelope>("POST", "/api/v1/retainers/:id/ledger".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3742
|
+
body: args.body,
|
|
3743
|
+
signal: args.signal,
|
|
3744
|
+
headers,
|
|
3745
|
+
});
|
|
3746
|
+
}
|
|
3747
|
+
|
|
3748
|
+
async drawDownRetainer(args: { "id": number; "Idempotency-Key": string; body: RetainerDrawdownInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<RetainerLedgerMutationEnvelope> {
|
|
3749
|
+
const headers = new Headers(args.headers);
|
|
3750
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3751
|
+
return this.request<RetainerLedgerMutationEnvelope>("POST", "/api/v1/retainers/:id/drawdowns".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3752
|
+
body: args.body,
|
|
3753
|
+
signal: args.signal,
|
|
3754
|
+
headers,
|
|
3755
|
+
});
|
|
3756
|
+
}
|
|
3757
|
+
|
|
3758
|
+
async listRecurringInvoices(args: { query?: { "cursor"?: string; "per_page"?: number }; signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<RecurringInvoicePage> {
|
|
3759
|
+
const headers = new Headers(args.headers);
|
|
3760
|
+
|
|
3761
|
+
return this.request<RecurringInvoicePage>("GET", "/api/v1/recurring-invoices", {
|
|
3762
|
+
query: args.query,
|
|
3763
|
+
signal: args.signal,
|
|
3764
|
+
headers,
|
|
3765
|
+
});
|
|
3766
|
+
}
|
|
3767
|
+
|
|
3768
|
+
async createRecurringInvoice(args: { "Idempotency-Key": string; body: RecurringInvoiceInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<RecurringInvoiceEnvelope> {
|
|
3769
|
+
const headers = new Headers(args.headers);
|
|
3770
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3771
|
+
return this.request<RecurringInvoiceEnvelope>("POST", "/api/v1/recurring-invoices", {
|
|
3772
|
+
body: args.body,
|
|
3773
|
+
signal: args.signal,
|
|
3774
|
+
headers,
|
|
3775
|
+
});
|
|
3776
|
+
}
|
|
3777
|
+
|
|
3778
|
+
async getRecurringInvoice(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<RecurringInvoiceEnvelope> {
|
|
3779
|
+
const headers = new Headers(args.headers);
|
|
3780
|
+
|
|
3781
|
+
return this.request<RecurringInvoiceEnvelope>("GET", "/api/v1/recurring-invoices/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3782
|
+
signal: args.signal,
|
|
3783
|
+
headers,
|
|
3784
|
+
});
|
|
3785
|
+
}
|
|
3786
|
+
|
|
3787
|
+
async updateRecurringInvoice(args: { "id": number; body: RecurringInvoiceInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<RecurringInvoiceEnvelope> {
|
|
3788
|
+
const headers = new Headers(args.headers);
|
|
3789
|
+
|
|
3790
|
+
return this.request<RecurringInvoiceEnvelope>("PATCH", "/api/v1/recurring-invoices/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3791
|
+
body: args.body,
|
|
3792
|
+
signal: args.signal,
|
|
3793
|
+
headers,
|
|
3794
|
+
});
|
|
3795
|
+
}
|
|
3796
|
+
|
|
3797
|
+
async deleteRecurringInvoice(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<void> {
|
|
3798
|
+
const headers = new Headers(args.headers);
|
|
3799
|
+
|
|
3800
|
+
return this.request<void>("DELETE", "/api/v1/recurring-invoices/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3801
|
+
signal: args.signal,
|
|
3802
|
+
headers,
|
|
3803
|
+
});
|
|
3804
|
+
}
|
|
3805
|
+
|
|
3806
|
+
async generateRecurringInvoice(args: { "id": number; "Idempotency-Key": string; signal?: AbortSignal; headers?: HeadersInit }): Promise<RecurringGenerationEnvelope> {
|
|
3807
|
+
const headers = new Headers(args.headers);
|
|
3808
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3809
|
+
return this.request<RecurringGenerationEnvelope>("POST", "/api/v1/recurring-invoices/:id/generations".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
3810
|
+
signal: args.signal,
|
|
3811
|
+
headers,
|
|
3812
|
+
});
|
|
3813
|
+
}
|
|
3814
|
+
|
|
3815
|
+
async listInvoiceAttachments(args: { "invoiceId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<AttachmentListEnvelope> {
|
|
3816
|
+
const headers = new Headers(args.headers);
|
|
3817
|
+
|
|
3818
|
+
return this.request<AttachmentListEnvelope>("GET", "/api/v1/invoices/:invoiceId/attachments".replace(":invoiceId", encodeURIComponent(String(args["invoiceId"]))), {
|
|
3819
|
+
signal: args.signal,
|
|
3820
|
+
headers,
|
|
3821
|
+
});
|
|
3822
|
+
}
|
|
3823
|
+
|
|
3824
|
+
async createInvoiceAttachment(args: { "invoiceId": number; "Idempotency-Key": string; body: FormData; signal?: AbortSignal; headers?: HeadersInit }): Promise<AttachmentEnvelope> {
|
|
3825
|
+
const headers = new Headers(args.headers);
|
|
3826
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3827
|
+
return this.request<AttachmentEnvelope>("POST", "/api/v1/invoices/:invoiceId/attachments".replace(":invoiceId", encodeURIComponent(String(args["invoiceId"]))), {
|
|
3828
|
+
body: args.body,
|
|
3829
|
+
multipart: true,
|
|
3830
|
+
signal: args.signal,
|
|
3831
|
+
headers,
|
|
3832
|
+
});
|
|
3833
|
+
}
|
|
3834
|
+
|
|
3835
|
+
async getInvoiceAttachment(args: { "invoiceId": number; "attachmentId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<AttachmentEnvelope> {
|
|
3836
|
+
const headers = new Headers(args.headers);
|
|
3837
|
+
|
|
3838
|
+
return this.request<AttachmentEnvelope>("GET", "/api/v1/invoices/:invoiceId/attachments/:attachmentId".replace(":invoiceId", encodeURIComponent(String(args["invoiceId"]))).replace(":attachmentId", encodeURIComponent(String(args["attachmentId"]))), {
|
|
3839
|
+
signal: args.signal,
|
|
3840
|
+
headers,
|
|
3841
|
+
});
|
|
3842
|
+
}
|
|
3843
|
+
|
|
3844
|
+
async downloadInvoiceAttachment(args: { "invoiceId": number; "attachmentId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<ArrayBuffer> {
|
|
3845
|
+
const headers = new Headers(args.headers);
|
|
3846
|
+
|
|
3847
|
+
return this.request<ArrayBuffer>("GET", "/api/v1/invoices/:invoiceId/attachments/:attachmentId/content".replace(":invoiceId", encodeURIComponent(String(args["invoiceId"]))).replace(":attachmentId", encodeURIComponent(String(args["attachmentId"]))), {
|
|
3848
|
+
signal: args.signal,
|
|
3849
|
+
binary: true,
|
|
3850
|
+
headers,
|
|
3851
|
+
});
|
|
3852
|
+
}
|
|
3853
|
+
|
|
3854
|
+
async listRecurringInvoiceAttachments(args: { "recurringInvoiceId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<AttachmentListEnvelope> {
|
|
3855
|
+
const headers = new Headers(args.headers);
|
|
3856
|
+
|
|
3857
|
+
return this.request<AttachmentListEnvelope>("GET", "/api/v1/recurring-invoices/:recurringInvoiceId/attachments".replace(":recurringInvoiceId", encodeURIComponent(String(args["recurringInvoiceId"]))), {
|
|
3858
|
+
signal: args.signal,
|
|
3859
|
+
headers,
|
|
3860
|
+
});
|
|
3861
|
+
}
|
|
3862
|
+
|
|
3863
|
+
async createRecurringInvoiceAttachment(args: { "recurringInvoiceId": number; "Idempotency-Key": string; body: FormData; signal?: AbortSignal; headers?: HeadersInit }): Promise<AttachmentEnvelope> {
|
|
3864
|
+
const headers = new Headers(args.headers);
|
|
3865
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3866
|
+
return this.request<AttachmentEnvelope>("POST", "/api/v1/recurring-invoices/:recurringInvoiceId/attachments".replace(":recurringInvoiceId", encodeURIComponent(String(args["recurringInvoiceId"]))), {
|
|
3867
|
+
body: args.body,
|
|
3868
|
+
multipart: true,
|
|
3869
|
+
signal: args.signal,
|
|
3870
|
+
headers,
|
|
3871
|
+
});
|
|
3872
|
+
}
|
|
3873
|
+
|
|
3874
|
+
async getRecurringInvoiceAttachment(args: { "recurringInvoiceId": number; "attachmentId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<AttachmentEnvelope> {
|
|
3875
|
+
const headers = new Headers(args.headers);
|
|
3876
|
+
|
|
3877
|
+
return this.request<AttachmentEnvelope>("GET", "/api/v1/recurring-invoices/:recurringInvoiceId/attachments/:attachmentId".replace(":recurringInvoiceId", encodeURIComponent(String(args["recurringInvoiceId"]))).replace(":attachmentId", encodeURIComponent(String(args["attachmentId"]))), {
|
|
3878
|
+
signal: args.signal,
|
|
3879
|
+
headers,
|
|
3880
|
+
});
|
|
3881
|
+
}
|
|
3882
|
+
|
|
3883
|
+
async downloadRecurringInvoiceAttachment(args: { "recurringInvoiceId": number; "attachmentId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<ArrayBuffer> {
|
|
3884
|
+
const headers = new Headers(args.headers);
|
|
3885
|
+
|
|
3886
|
+
return this.request<ArrayBuffer>("GET", "/api/v1/recurring-invoices/:recurringInvoiceId/attachments/:attachmentId/content".replace(":recurringInvoiceId", encodeURIComponent(String(args["recurringInvoiceId"]))).replace(":attachmentId", encodeURIComponent(String(args["attachmentId"]))), {
|
|
3887
|
+
signal: args.signal,
|
|
3888
|
+
binary: true,
|
|
3889
|
+
headers,
|
|
3890
|
+
});
|
|
3891
|
+
}
|
|
3892
|
+
|
|
3893
|
+
async listEstimateAttachments(args: { "estimateId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<AttachmentListEnvelope> {
|
|
3894
|
+
const headers = new Headers(args.headers);
|
|
3895
|
+
|
|
3896
|
+
return this.request<AttachmentListEnvelope>("GET", "/api/v1/estimates/:estimateId/attachments".replace(":estimateId", encodeURIComponent(String(args["estimateId"]))), {
|
|
3897
|
+
signal: args.signal,
|
|
3898
|
+
headers,
|
|
3899
|
+
});
|
|
3900
|
+
}
|
|
3901
|
+
|
|
3902
|
+
async createEstimateAttachment(args: { "estimateId": number; "Idempotency-Key": string; body: FormData; signal?: AbortSignal; headers?: HeadersInit }): Promise<AttachmentEnvelope> {
|
|
3903
|
+
const headers = new Headers(args.headers);
|
|
3904
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3905
|
+
return this.request<AttachmentEnvelope>("POST", "/api/v1/estimates/:estimateId/attachments".replace(":estimateId", encodeURIComponent(String(args["estimateId"]))), {
|
|
3906
|
+
body: args.body,
|
|
3907
|
+
multipart: true,
|
|
3908
|
+
signal: args.signal,
|
|
3909
|
+
headers,
|
|
3910
|
+
});
|
|
3911
|
+
}
|
|
3912
|
+
|
|
3913
|
+
async getEstimateAttachment(args: { "estimateId": number; "attachmentId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<AttachmentEnvelope> {
|
|
3914
|
+
const headers = new Headers(args.headers);
|
|
3915
|
+
|
|
3916
|
+
return this.request<AttachmentEnvelope>("GET", "/api/v1/estimates/:estimateId/attachments/:attachmentId".replace(":estimateId", encodeURIComponent(String(args["estimateId"]))).replace(":attachmentId", encodeURIComponent(String(args["attachmentId"]))), {
|
|
3917
|
+
signal: args.signal,
|
|
3918
|
+
headers,
|
|
3919
|
+
});
|
|
3920
|
+
}
|
|
3921
|
+
|
|
3922
|
+
async downloadEstimateAttachment(args: { "estimateId": number; "attachmentId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<ArrayBuffer> {
|
|
3923
|
+
const headers = new Headers(args.headers);
|
|
3924
|
+
|
|
3925
|
+
return this.request<ArrayBuffer>("GET", "/api/v1/estimates/:estimateId/attachments/:attachmentId/content".replace(":estimateId", encodeURIComponent(String(args["estimateId"]))).replace(":attachmentId", encodeURIComponent(String(args["attachmentId"]))), {
|
|
3926
|
+
signal: args.signal,
|
|
3927
|
+
binary: true,
|
|
3928
|
+
headers,
|
|
3929
|
+
});
|
|
3930
|
+
}
|
|
3931
|
+
|
|
3932
|
+
async listExpenseAttachments(args: { "expenseId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<AttachmentListEnvelope> {
|
|
3933
|
+
const headers = new Headers(args.headers);
|
|
3934
|
+
|
|
3935
|
+
return this.request<AttachmentListEnvelope>("GET", "/api/v1/expenses/:expenseId/attachments".replace(":expenseId", encodeURIComponent(String(args["expenseId"]))), {
|
|
3936
|
+
signal: args.signal,
|
|
3937
|
+
headers,
|
|
3938
|
+
});
|
|
3939
|
+
}
|
|
3940
|
+
|
|
3941
|
+
async createExpenseAttachment(args: { "expenseId": number; "Idempotency-Key": string; body: FormData; signal?: AbortSignal; headers?: HeadersInit }): Promise<AttachmentEnvelope> {
|
|
3942
|
+
const headers = new Headers(args.headers);
|
|
3943
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3944
|
+
return this.request<AttachmentEnvelope>("POST", "/api/v1/expenses/:expenseId/attachments".replace(":expenseId", encodeURIComponent(String(args["expenseId"]))), {
|
|
3945
|
+
body: args.body,
|
|
3946
|
+
multipart: true,
|
|
3947
|
+
signal: args.signal,
|
|
3948
|
+
headers,
|
|
3949
|
+
});
|
|
3950
|
+
}
|
|
3951
|
+
|
|
3952
|
+
async getExpenseAttachment(args: { "expenseId": number; "attachmentId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<AttachmentEnvelope> {
|
|
3953
|
+
const headers = new Headers(args.headers);
|
|
3954
|
+
|
|
3955
|
+
return this.request<AttachmentEnvelope>("GET", "/api/v1/expenses/:expenseId/attachments/:attachmentId".replace(":expenseId", encodeURIComponent(String(args["expenseId"]))).replace(":attachmentId", encodeURIComponent(String(args["attachmentId"]))), {
|
|
3956
|
+
signal: args.signal,
|
|
3957
|
+
headers,
|
|
3958
|
+
});
|
|
3959
|
+
}
|
|
3960
|
+
|
|
3961
|
+
async downloadExpenseAttachment(args: { "expenseId": number; "attachmentId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<ArrayBuffer> {
|
|
3962
|
+
const headers = new Headers(args.headers);
|
|
3963
|
+
|
|
3964
|
+
return this.request<ArrayBuffer>("GET", "/api/v1/expenses/:expenseId/attachments/:attachmentId/content".replace(":expenseId", encodeURIComponent(String(args["expenseId"]))).replace(":attachmentId", encodeURIComponent(String(args["attachmentId"]))), {
|
|
3965
|
+
signal: args.signal,
|
|
3966
|
+
binary: true,
|
|
3967
|
+
headers,
|
|
3968
|
+
});
|
|
3969
|
+
}
|
|
3970
|
+
|
|
3971
|
+
async listProjectAttachments(args: { "projectId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<AttachmentListEnvelope> {
|
|
3972
|
+
const headers = new Headers(args.headers);
|
|
3973
|
+
|
|
3974
|
+
return this.request<AttachmentListEnvelope>("GET", "/api/v1/projects/:projectId/attachments".replace(":projectId", encodeURIComponent(String(args["projectId"]))), {
|
|
3975
|
+
signal: args.signal,
|
|
3976
|
+
headers,
|
|
3977
|
+
});
|
|
3978
|
+
}
|
|
3979
|
+
|
|
3980
|
+
async createProjectAttachment(args: { "projectId": number; "Idempotency-Key": string; body: FormData; signal?: AbortSignal; headers?: HeadersInit }): Promise<AttachmentEnvelope> {
|
|
3981
|
+
const headers = new Headers(args.headers);
|
|
3982
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
3983
|
+
return this.request<AttachmentEnvelope>("POST", "/api/v1/projects/:projectId/attachments".replace(":projectId", encodeURIComponent(String(args["projectId"]))), {
|
|
3984
|
+
body: args.body,
|
|
3985
|
+
multipart: true,
|
|
3986
|
+
signal: args.signal,
|
|
3987
|
+
headers,
|
|
3988
|
+
});
|
|
3989
|
+
}
|
|
3990
|
+
|
|
3991
|
+
async getProjectAttachment(args: { "projectId": number; "attachmentId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<AttachmentEnvelope> {
|
|
3992
|
+
const headers = new Headers(args.headers);
|
|
3993
|
+
|
|
3994
|
+
return this.request<AttachmentEnvelope>("GET", "/api/v1/projects/:projectId/attachments/:attachmentId".replace(":projectId", encodeURIComponent(String(args["projectId"]))).replace(":attachmentId", encodeURIComponent(String(args["attachmentId"]))), {
|
|
3995
|
+
signal: args.signal,
|
|
3996
|
+
headers,
|
|
3997
|
+
});
|
|
3998
|
+
}
|
|
3999
|
+
|
|
4000
|
+
async downloadProjectAttachment(args: { "projectId": number; "attachmentId": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<ArrayBuffer> {
|
|
4001
|
+
const headers = new Headers(args.headers);
|
|
4002
|
+
|
|
4003
|
+
return this.request<ArrayBuffer>("GET", "/api/v1/projects/:projectId/attachments/:attachmentId/content".replace(":projectId", encodeURIComponent(String(args["projectId"]))).replace(":attachmentId", encodeURIComponent(String(args["attachmentId"]))), {
|
|
4004
|
+
signal: args.signal,
|
|
4005
|
+
binary: true,
|
|
4006
|
+
headers,
|
|
4007
|
+
});
|
|
4008
|
+
}
|
|
4009
|
+
|
|
4010
|
+
async getMyHoursReport(args: { query: { "from": string; "to": string; "project_id"?: number }; signal?: AbortSignal; headers?: HeadersInit }): Promise<MyHoursReportEnvelope> {
|
|
4011
|
+
const headers = new Headers(args.headers);
|
|
4012
|
+
|
|
4013
|
+
return this.request<MyHoursReportEnvelope>("GET", "/api/v1/reports/my-hours", {
|
|
4014
|
+
query: args.query,
|
|
4015
|
+
signal: args.signal,
|
|
4016
|
+
headers,
|
|
4017
|
+
});
|
|
4018
|
+
}
|
|
4019
|
+
|
|
4020
|
+
async getTimeReport(args: { query: { "from": string; "to": string }; signal?: AbortSignal; headers?: HeadersInit }): Promise<TimeReportEnvelope> {
|
|
4021
|
+
const headers = new Headers(args.headers);
|
|
4022
|
+
|
|
4023
|
+
return this.request<TimeReportEnvelope>("GET", "/api/v1/reports/time", {
|
|
4024
|
+
query: args.query,
|
|
4025
|
+
signal: args.signal,
|
|
4026
|
+
headers,
|
|
4027
|
+
});
|
|
4028
|
+
}
|
|
4029
|
+
|
|
4030
|
+
async getContractorCostReport(args: { query: { "from": string; "to": string }; signal?: AbortSignal; headers?: HeadersInit }): Promise<ContractorCostReportEnvelope> {
|
|
4031
|
+
const headers = new Headers(args.headers);
|
|
4032
|
+
|
|
4033
|
+
return this.request<ContractorCostReportEnvelope>("GET", "/api/v1/reports/contractor", {
|
|
4034
|
+
query: args.query,
|
|
4035
|
+
signal: args.signal,
|
|
4036
|
+
headers,
|
|
4037
|
+
});
|
|
4038
|
+
}
|
|
4039
|
+
|
|
4040
|
+
async getProfitabilityReport(args: { query: { "from": string; "to": string }; signal?: AbortSignal; headers?: HeadersInit }): Promise<ProfitabilityReportEnvelope> {
|
|
4041
|
+
const headers = new Headers(args.headers);
|
|
4042
|
+
|
|
4043
|
+
return this.request<ProfitabilityReportEnvelope>("GET", "/api/v1/reports/profitability", {
|
|
4044
|
+
query: args.query,
|
|
4045
|
+
signal: args.signal,
|
|
4046
|
+
headers,
|
|
4047
|
+
});
|
|
4048
|
+
}
|
|
4049
|
+
|
|
4050
|
+
async getDetailedExpenseReport(args: { query: { "from": string; "to": string; "client_id"?: number; "project_id"?: number; "billable_only"?: boolean }; signal?: AbortSignal; headers?: HeadersInit }): Promise<DetailedExpenseReportEnvelope> {
|
|
4051
|
+
const headers = new Headers(args.headers);
|
|
4052
|
+
|
|
4053
|
+
return this.request<DetailedExpenseReportEnvelope>("GET", "/api/v1/reports/detailed-expense", {
|
|
4054
|
+
query: args.query,
|
|
4055
|
+
signal: args.signal,
|
|
4056
|
+
headers,
|
|
4057
|
+
});
|
|
4058
|
+
}
|
|
4059
|
+
|
|
4060
|
+
async getUninvoicedReport(args: { query: { "from": string; "to": string; "client_id"?: number; "project_id"?: number }; signal?: AbortSignal; headers?: HeadersInit }): Promise<UninvoicedReportEnvelope> {
|
|
4061
|
+
const headers = new Headers(args.headers);
|
|
4062
|
+
|
|
4063
|
+
return this.request<UninvoicedReportEnvelope>("GET", "/api/v1/reports/uninvoiced", {
|
|
4064
|
+
query: args.query,
|
|
4065
|
+
signal: args.signal,
|
|
4066
|
+
headers,
|
|
4067
|
+
});
|
|
4068
|
+
}
|
|
4069
|
+
|
|
4070
|
+
async getDetailedTimeReport(args: { query: { "from": string; "to": string; "client_id"?: number; "project_id"?: number; "hours"?: "all" | "billable" | "non_billable" | "uninvoiced"; "grain"?: "day" | "entry"; "active_projects_only"?: boolean }; signal?: AbortSignal; headers?: HeadersInit }): Promise<DetailedTimeReportEnvelope> {
|
|
4071
|
+
const headers = new Headers(args.headers);
|
|
4072
|
+
|
|
4073
|
+
return this.request<DetailedTimeReportEnvelope>("GET", "/api/v1/reports/detailed-time", {
|
|
4074
|
+
query: args.query,
|
|
4075
|
+
signal: args.signal,
|
|
4076
|
+
headers,
|
|
4077
|
+
});
|
|
4078
|
+
}
|
|
4079
|
+
|
|
4080
|
+
async getClientRollupReport(args: { "clientId": number; query: { "from": string; "to": string }; signal?: AbortSignal; headers?: HeadersInit }): Promise<ClientRollupReportEnvelope> {
|
|
4081
|
+
const headers = new Headers(args.headers);
|
|
4082
|
+
|
|
4083
|
+
return this.request<ClientRollupReportEnvelope>("GET", "/api/v1/reports/client-rollups/:clientId".replace(":clientId", encodeURIComponent(String(args["clientId"]))), {
|
|
4084
|
+
query: args.query,
|
|
4085
|
+
signal: args.signal,
|
|
4086
|
+
headers,
|
|
4087
|
+
});
|
|
4088
|
+
}
|
|
4089
|
+
|
|
4090
|
+
async listProjectBudgetSummaries(args: { query: { "from": string; "to": string }; signal?: AbortSignal; headers?: HeadersInit }): Promise<ProjectBudgetSummaryListEnvelope> {
|
|
4091
|
+
const headers = new Headers(args.headers);
|
|
4092
|
+
|
|
4093
|
+
return this.request<ProjectBudgetSummaryListEnvelope>("GET", "/api/v1/reports/project-budgets", {
|
|
4094
|
+
query: args.query,
|
|
4095
|
+
signal: args.signal,
|
|
4096
|
+
headers,
|
|
4097
|
+
});
|
|
4098
|
+
}
|
|
4099
|
+
|
|
4100
|
+
async getProjectBudgetReport(args: { "projectId": number; query: { "from": string; "to": string }; signal?: AbortSignal; headers?: HeadersInit }): Promise<ProjectBudgetReportEnvelope> {
|
|
4101
|
+
const headers = new Headers(args.headers);
|
|
4102
|
+
|
|
4103
|
+
return this.request<ProjectBudgetReportEnvelope>("GET", "/api/v1/reports/project-budget/:projectId".replace(":projectId", encodeURIComponent(String(args["projectId"]))), {
|
|
4104
|
+
query: args.query,
|
|
4105
|
+
signal: args.signal,
|
|
4106
|
+
headers,
|
|
4107
|
+
});
|
|
4108
|
+
}
|
|
4109
|
+
|
|
4110
|
+
async listModules(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<ModuleListEnvelope> {
|
|
4111
|
+
const headers = new Headers(args.headers);
|
|
4112
|
+
|
|
4113
|
+
return this.request<ModuleListEnvelope>("GET", "/api/v1/admin/modules", {
|
|
4114
|
+
signal: args.signal,
|
|
4115
|
+
headers,
|
|
4116
|
+
});
|
|
4117
|
+
}
|
|
4118
|
+
|
|
4119
|
+
async updateModule(args: { "module": string; body: ModulePatch; signal?: AbortSignal; headers?: HeadersInit }): Promise<ModuleListEnvelope> {
|
|
4120
|
+
const headers = new Headers(args.headers);
|
|
4121
|
+
|
|
4122
|
+
return this.request<ModuleListEnvelope>("PATCH", "/api/v1/admin/modules/:module".replace(":module", encodeURIComponent(String(args["module"]))), {
|
|
4123
|
+
body: args.body,
|
|
4124
|
+
signal: args.signal,
|
|
4125
|
+
headers,
|
|
4126
|
+
});
|
|
4127
|
+
}
|
|
4128
|
+
|
|
4129
|
+
async getBackupStatus(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<BackupStatusEnvelope> {
|
|
4130
|
+
const headers = new Headers(args.headers);
|
|
4131
|
+
|
|
4132
|
+
return this.request<BackupStatusEnvelope>("GET", "/api/v1/backup/status", {
|
|
4133
|
+
signal: args.signal,
|
|
4134
|
+
headers,
|
|
4135
|
+
});
|
|
4136
|
+
}
|
|
4137
|
+
|
|
4138
|
+
async getQuickBooksConnection(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<QuickBooksStatusEnvelope> {
|
|
4139
|
+
const headers = new Headers(args.headers);
|
|
4140
|
+
|
|
4141
|
+
return this.request<QuickBooksStatusEnvelope>("GET", "/api/v1/integrations/quickbooks", {
|
|
4142
|
+
signal: args.signal,
|
|
4143
|
+
headers,
|
|
4144
|
+
});
|
|
4145
|
+
}
|
|
4146
|
+
|
|
4147
|
+
async startQuickBooksAuthorization(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<QuickBooksAuthorizeEnvelope> {
|
|
4148
|
+
const headers = new Headers(args.headers);
|
|
4149
|
+
|
|
4150
|
+
return this.request<QuickBooksAuthorizeEnvelope>("POST", "/api/v1/integrations/quickbooks/authorize", {
|
|
4151
|
+
signal: args.signal,
|
|
4152
|
+
headers,
|
|
4153
|
+
});
|
|
4154
|
+
}
|
|
4155
|
+
|
|
4156
|
+
async updateQuickBooksSettings(args: { body: QuickBooksSettingsInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<QuickBooksConnectionEnvelope> {
|
|
4157
|
+
const headers = new Headers(args.headers);
|
|
4158
|
+
|
|
4159
|
+
return this.request<QuickBooksConnectionEnvelope>("POST", "/api/v1/integrations/quickbooks/settings", {
|
|
4160
|
+
body: args.body,
|
|
4161
|
+
signal: args.signal,
|
|
4162
|
+
headers,
|
|
4163
|
+
});
|
|
4164
|
+
}
|
|
4165
|
+
|
|
4166
|
+
async disconnectQuickBooks(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<void> {
|
|
4167
|
+
const headers = new Headers(args.headers);
|
|
4168
|
+
|
|
4169
|
+
return this.request<void>("DELETE", "/api/v1/integrations/quickbooks", {
|
|
4170
|
+
signal: args.signal,
|
|
4171
|
+
headers,
|
|
4172
|
+
});
|
|
4173
|
+
}
|
|
4174
|
+
|
|
4175
|
+
async listSsoProvisioningDomains(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<SsoDomainListEnvelope> {
|
|
4176
|
+
const headers = new Headers(args.headers);
|
|
4177
|
+
|
|
4178
|
+
return this.request<SsoDomainListEnvelope>("GET", "/api/v1/settings/sso-domains", {
|
|
4179
|
+
signal: args.signal,
|
|
4180
|
+
headers,
|
|
4181
|
+
});
|
|
4182
|
+
}
|
|
4183
|
+
|
|
4184
|
+
async addSsoProvisioningDomain(args: { body: SsoDomainInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<SsoDomainEnvelope> {
|
|
4185
|
+
const headers = new Headers(args.headers);
|
|
4186
|
+
|
|
4187
|
+
return this.request<SsoDomainEnvelope>("POST", "/api/v1/settings/sso-domains", {
|
|
4188
|
+
body: args.body,
|
|
4189
|
+
signal: args.signal,
|
|
4190
|
+
headers,
|
|
4191
|
+
});
|
|
4192
|
+
}
|
|
4193
|
+
|
|
4194
|
+
async removeSsoProvisioningDomain(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<void> {
|
|
4195
|
+
const headers = new Headers(args.headers);
|
|
4196
|
+
|
|
4197
|
+
return this.request<void>("DELETE", "/api/v1/settings/sso-domains/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
4198
|
+
signal: args.signal,
|
|
4199
|
+
headers,
|
|
4200
|
+
});
|
|
4201
|
+
}
|
|
4202
|
+
|
|
4203
|
+
async verifySsoProvisioningDomain(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<SsoDomainCheckEnvelope> {
|
|
4204
|
+
const headers = new Headers(args.headers);
|
|
4205
|
+
|
|
4206
|
+
return this.request<SsoDomainCheckEnvelope>("POST", "/api/v1/settings/sso-domains/:id/verify".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
4207
|
+
signal: args.signal,
|
|
4208
|
+
headers,
|
|
4209
|
+
});
|
|
4210
|
+
}
|
|
4211
|
+
|
|
4212
|
+
async getBrand(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<BrandEnvelope> {
|
|
4213
|
+
const headers = new Headers(args.headers);
|
|
4214
|
+
|
|
4215
|
+
return this.request<BrandEnvelope>("GET", "/api/v1/brand", {
|
|
4216
|
+
signal: args.signal,
|
|
4217
|
+
headers,
|
|
4218
|
+
});
|
|
4219
|
+
}
|
|
4220
|
+
|
|
4221
|
+
async listBrandAssets(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<BrandAssetListEnvelope> {
|
|
4222
|
+
const headers = new Headers(args.headers);
|
|
4223
|
+
|
|
4224
|
+
return this.request<BrandAssetListEnvelope>("GET", "/api/v1/settings/brand-assets", {
|
|
4225
|
+
signal: args.signal,
|
|
4226
|
+
headers,
|
|
4227
|
+
});
|
|
4228
|
+
}
|
|
4229
|
+
|
|
4230
|
+
async removeBrandAsset(args: { "slot": string; signal?: AbortSignal; headers?: HeadersInit }): Promise<void> {
|
|
4231
|
+
const headers = new Headers(args.headers);
|
|
4232
|
+
|
|
4233
|
+
return this.request<void>("DELETE", "/api/v1/settings/brand-assets/:slot".replace(":slot", encodeURIComponent(String(args["slot"]))), {
|
|
4234
|
+
signal: args.signal,
|
|
4235
|
+
headers,
|
|
4236
|
+
});
|
|
4237
|
+
}
|
|
4238
|
+
|
|
4239
|
+
async getInstanceTheme(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<InstanceThemeEnvelope> {
|
|
4240
|
+
const headers = new Headers(args.headers);
|
|
4241
|
+
|
|
4242
|
+
return this.request<InstanceThemeEnvelope>("GET", "/api/v1/settings/theme", {
|
|
4243
|
+
signal: args.signal,
|
|
4244
|
+
headers,
|
|
4245
|
+
});
|
|
4246
|
+
}
|
|
4247
|
+
|
|
4248
|
+
async setInstanceTheme(args: { body: InstanceThemeInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<InstanceThemeEnvelope> {
|
|
4249
|
+
const headers = new Headers(args.headers);
|
|
4250
|
+
|
|
4251
|
+
return this.request<InstanceThemeEnvelope>("POST", "/api/v1/settings/theme", {
|
|
4252
|
+
body: args.body,
|
|
4253
|
+
signal: args.signal,
|
|
4254
|
+
headers,
|
|
4255
|
+
});
|
|
4256
|
+
}
|
|
4257
|
+
|
|
4258
|
+
async clearInstanceTheme(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<void> {
|
|
4259
|
+
const headers = new Headers(args.headers);
|
|
4260
|
+
|
|
4261
|
+
return this.request<void>("DELETE", "/api/v1/settings/theme", {
|
|
4262
|
+
signal: args.signal,
|
|
4263
|
+
headers,
|
|
4264
|
+
});
|
|
4265
|
+
}
|
|
4266
|
+
|
|
4267
|
+
async listPayoutAccounts(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<PayoutAccountListEnvelope> {
|
|
4268
|
+
const headers = new Headers(args.headers);
|
|
4269
|
+
|
|
4270
|
+
return this.request<PayoutAccountListEnvelope>("GET", "/api/v1/users/:id/payout-accounts".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
4271
|
+
signal: args.signal,
|
|
4272
|
+
headers,
|
|
4273
|
+
});
|
|
4274
|
+
}
|
|
4275
|
+
|
|
4276
|
+
async linkPayoutAccount(args: { "id": number; body: PayoutAccountInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<PayoutAccountEnvelope> {
|
|
4277
|
+
const headers = new Headers(args.headers);
|
|
4278
|
+
|
|
4279
|
+
return this.request<PayoutAccountEnvelope>("POST", "/api/v1/users/:id/payout-accounts".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
4280
|
+
body: args.body,
|
|
4281
|
+
signal: args.signal,
|
|
4282
|
+
headers,
|
|
4283
|
+
});
|
|
4284
|
+
}
|
|
4285
|
+
|
|
4286
|
+
async detachPayoutAccount(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<void> {
|
|
4287
|
+
const headers = new Headers(args.headers);
|
|
4288
|
+
|
|
4289
|
+
return this.request<void>("DELETE", "/api/v1/payout-accounts/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
4290
|
+
signal: args.signal,
|
|
4291
|
+
headers,
|
|
4292
|
+
});
|
|
4293
|
+
}
|
|
4294
|
+
|
|
4295
|
+
async getBillStatus(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<BillStatusEnvelope> {
|
|
4296
|
+
const headers = new Headers(args.headers);
|
|
4297
|
+
|
|
4298
|
+
return this.request<BillStatusEnvelope>("GET", "/api/v1/integrations/bill", {
|
|
4299
|
+
signal: args.signal,
|
|
4300
|
+
headers,
|
|
4301
|
+
});
|
|
4302
|
+
}
|
|
4303
|
+
|
|
4304
|
+
async getBillClientDelivery(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<BillClientDeliveryEnvelope> {
|
|
4305
|
+
const headers = new Headers(args.headers);
|
|
4306
|
+
|
|
4307
|
+
return this.request<BillClientDeliveryEnvelope>("GET", "/api/v1/integrations/bill/clients/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
4308
|
+
signal: args.signal,
|
|
4309
|
+
headers,
|
|
4310
|
+
});
|
|
4311
|
+
}
|
|
4312
|
+
|
|
4313
|
+
async setBillClientDelivery(args: { "id": number; body: BillClientDeliveryInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<BillClientDeliveryEnvelope> {
|
|
4314
|
+
const headers = new Headers(args.headers);
|
|
4315
|
+
|
|
4316
|
+
return this.request<BillClientDeliveryEnvelope>("POST", "/api/v1/integrations/bill/clients/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
4317
|
+
body: args.body,
|
|
4318
|
+
signal: args.signal,
|
|
4319
|
+
headers,
|
|
4320
|
+
});
|
|
4321
|
+
}
|
|
4322
|
+
|
|
4323
|
+
async getTwoFactorStatus(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<TwoFactorStatusEnvelope> {
|
|
4324
|
+
const headers = new Headers(args.headers);
|
|
4325
|
+
|
|
4326
|
+
return this.request<TwoFactorStatusEnvelope>("GET", "/api/v1/two-factor", {
|
|
4327
|
+
signal: args.signal,
|
|
4328
|
+
headers,
|
|
4329
|
+
});
|
|
4330
|
+
}
|
|
4331
|
+
|
|
4332
|
+
async beginTwoFactorEnrolment(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<TwoFactorEnrolmentEnvelope> {
|
|
4333
|
+
const headers = new Headers(args.headers);
|
|
4334
|
+
|
|
4335
|
+
return this.request<TwoFactorEnrolmentEnvelope>("POST", "/api/v1/two-factor", {
|
|
4336
|
+
signal: args.signal,
|
|
4337
|
+
headers,
|
|
4338
|
+
});
|
|
4339
|
+
}
|
|
4340
|
+
|
|
4341
|
+
async confirmTwoFactorEnrolment(args: { body: TwoFactorCodeInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<TwoFactorStatusEnvelope> {
|
|
4342
|
+
const headers = new Headers(args.headers);
|
|
4343
|
+
|
|
4344
|
+
return this.request<TwoFactorStatusEnvelope>("POST", "/api/v1/two-factor/confirm", {
|
|
4345
|
+
body: args.body,
|
|
4346
|
+
signal: args.signal,
|
|
4347
|
+
headers,
|
|
4348
|
+
});
|
|
4349
|
+
}
|
|
4350
|
+
|
|
4351
|
+
async disableTwoFactor(args: { body: TwoFactorCodeInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<TwoFactorStatusEnvelope> {
|
|
4352
|
+
const headers = new Headers(args.headers);
|
|
4353
|
+
|
|
4354
|
+
return this.request<TwoFactorStatusEnvelope>("DELETE", "/api/v1/two-factor", {
|
|
4355
|
+
body: args.body,
|
|
4356
|
+
signal: args.signal,
|
|
4357
|
+
headers,
|
|
4358
|
+
});
|
|
4359
|
+
}
|
|
4360
|
+
|
|
4361
|
+
async addUserEmail(args: { "id": number; body: UserEmailInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<UserEmailAcceptedEnvelope> {
|
|
4362
|
+
const headers = new Headers(args.headers);
|
|
4363
|
+
|
|
4364
|
+
return this.request<UserEmailAcceptedEnvelope>("POST", "/api/v1/users/:id/emails".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
4365
|
+
body: args.body,
|
|
4366
|
+
signal: args.signal,
|
|
4367
|
+
headers,
|
|
4368
|
+
});
|
|
4369
|
+
}
|
|
4370
|
+
|
|
4371
|
+
async getTeamStatus(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<TeamStatusEnvelope> {
|
|
4372
|
+
const headers = new Headers(args.headers);
|
|
4373
|
+
|
|
4374
|
+
return this.request<TeamStatusEnvelope>("GET", "/api/v1/team/status", {
|
|
4375
|
+
signal: args.signal,
|
|
4376
|
+
headers,
|
|
4377
|
+
});
|
|
4378
|
+
}
|
|
4379
|
+
|
|
4380
|
+
async listTeamPeople(args: { query: { "cursor"?: string; "per_page"?: number; "from": string; "to": string; "is_active"?: boolean }; signal?: AbortSignal; headers?: HeadersInit }): Promise<TeamPersonSummaryPage> {
|
|
4381
|
+
const headers = new Headers(args.headers);
|
|
4382
|
+
|
|
4383
|
+
return this.request<TeamPersonSummaryPage>("GET", "/api/v1/team/people", {
|
|
4384
|
+
query: args.query,
|
|
4385
|
+
signal: args.signal,
|
|
4386
|
+
headers,
|
|
4387
|
+
});
|
|
4388
|
+
}
|
|
4389
|
+
|
|
4390
|
+
async getTeamPerson(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<TeamPersonEnvelope> {
|
|
4391
|
+
const headers = new Headers(args.headers);
|
|
4392
|
+
|
|
4393
|
+
return this.request<TeamPersonEnvelope>("GET", "/api/v1/team/people/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
4394
|
+
signal: args.signal,
|
|
4395
|
+
headers,
|
|
4396
|
+
});
|
|
4397
|
+
}
|
|
4398
|
+
|
|
4399
|
+
async getTeamCatalog(args: { signal?: AbortSignal; headers?: HeadersInit } = {}): Promise<TeamCatalogEnvelope> {
|
|
4400
|
+
const headers = new Headers(args.headers);
|
|
4401
|
+
|
|
4402
|
+
return this.request<TeamCatalogEnvelope>("GET", "/api/v1/team/catalog", {
|
|
4403
|
+
signal: args.signal,
|
|
4404
|
+
headers,
|
|
4405
|
+
});
|
|
4406
|
+
}
|
|
4407
|
+
|
|
4408
|
+
async updateTeamPerson(args: { "id": number; "Idempotency-Key": string; body: TeamPersonPatch; signal?: AbortSignal; headers?: HeadersInit }): Promise<TeamCommandReceiptEnvelope> {
|
|
4409
|
+
const headers = new Headers(args.headers);
|
|
4410
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
4411
|
+
return this.request<TeamCommandReceiptEnvelope>("PATCH", "/api/v1/team/people/:id".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
4412
|
+
body: args.body,
|
|
4413
|
+
signal: args.signal,
|
|
4414
|
+
headers,
|
|
4415
|
+
});
|
|
4416
|
+
}
|
|
4417
|
+
|
|
4418
|
+
async replaceTeamPersonProjectAssignments(args: { "id": number; "Idempotency-Key": string; body: TeamAssignmentReplaceInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<TeamCommandReceiptEnvelope> {
|
|
4419
|
+
const headers = new Headers(args.headers);
|
|
4420
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
4421
|
+
return this.request<TeamCommandReceiptEnvelope>("POST", "/api/v1/team/people/:id/project-assignments/replace".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
4422
|
+
body: args.body,
|
|
4423
|
+
signal: args.signal,
|
|
4424
|
+
headers,
|
|
4425
|
+
});
|
|
4426
|
+
}
|
|
4427
|
+
|
|
4428
|
+
async updateTeamPersonNotifications(args: { "id": number; "Idempotency-Key": string; body: TeamNotificationInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<TeamCommandReceiptEnvelope> {
|
|
4429
|
+
const headers = new Headers(args.headers);
|
|
4430
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
4431
|
+
return this.request<TeamCommandReceiptEnvelope>("POST", "/api/v1/team/people/:id/notifications".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
4432
|
+
body: args.body,
|
|
4433
|
+
signal: args.signal,
|
|
4434
|
+
headers,
|
|
4435
|
+
});
|
|
4436
|
+
}
|
|
4437
|
+
|
|
4438
|
+
async appendTeamPersonRate(args: { "id": number; "Idempotency-Key": string; body: TeamRateInput; signal?: AbortSignal; headers?: HeadersInit }): Promise<TeamCommandReceiptEnvelope> {
|
|
4439
|
+
const headers = new Headers(args.headers);
|
|
4440
|
+
if (args["Idempotency-Key"] !== undefined) headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
|
|
4441
|
+
return this.request<TeamCommandReceiptEnvelope>("POST", "/api/v1/team/people/:id/rates".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
4442
|
+
body: args.body,
|
|
4443
|
+
signal: args.signal,
|
|
4444
|
+
headers,
|
|
4445
|
+
});
|
|
4446
|
+
}
|
|
4447
|
+
|
|
4448
|
+
async listClientAncestors(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<ClientHierarchyListEnvelope> {
|
|
4449
|
+
const headers = new Headers(args.headers);
|
|
4450
|
+
|
|
4451
|
+
return this.request<ClientHierarchyListEnvelope>("GET", "/api/v1/clients/:id/ancestors".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
4452
|
+
signal: args.signal,
|
|
4453
|
+
headers,
|
|
4454
|
+
});
|
|
4455
|
+
}
|
|
4456
|
+
|
|
4457
|
+
async listClientDescendants(args: { "id": number; signal?: AbortSignal; headers?: HeadersInit }): Promise<ClientHierarchyListEnvelope> {
|
|
4458
|
+
const headers = new Headers(args.headers);
|
|
4459
|
+
|
|
4460
|
+
return this.request<ClientHierarchyListEnvelope>("GET", "/api/v1/clients/:id/descendants".replace(":id", encodeURIComponent(String(args["id"]))), {
|
|
4461
|
+
signal: args.signal,
|
|
4462
|
+
headers,
|
|
4463
|
+
});
|
|
4464
|
+
}
|
|
4465
|
+
}
|