@assembly-js/node-sdk 3.19.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.
Files changed (42) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +152 -0
  3. package/dist/api/init.d.ts +25 -0
  4. package/dist/api/init.js +116 -0
  5. package/dist/api/init.js.map +1 -0
  6. package/dist/bin/decode-token.d.ts +2 -0
  7. package/dist/bin/decode-token.js +238 -0
  8. package/dist/bin/decode-token.js.map +1 -0
  9. package/dist/bin/run-with-http-monitor.d.ts +2 -0
  10. package/dist/bin/run-with-http-monitor.js +7 -0
  11. package/dist/bin/run-with-http-monitor.js.map +1 -0
  12. package/dist/codegen/api/core/ApiError.d.ts +10 -0
  13. package/dist/codegen/api/core/ApiError.js +12 -0
  14. package/dist/codegen/api/core/ApiError.js.map +1 -0
  15. package/dist/codegen/api/core/ApiRequestOptions.d.ts +20 -0
  16. package/dist/codegen/api/core/ApiRequestOptions.js +2 -0
  17. package/dist/codegen/api/core/ApiRequestOptions.js.map +1 -0
  18. package/dist/codegen/api/core/ApiResult.d.ts +7 -0
  19. package/dist/codegen/api/core/ApiResult.js +2 -0
  20. package/dist/codegen/api/core/ApiResult.js.map +1 -0
  21. package/dist/codegen/api/core/CancelablePromise.d.ts +31 -0
  22. package/dist/codegen/api/core/CancelablePromise.js +230 -0
  23. package/dist/codegen/api/core/CancelablePromise.js.map +1 -0
  24. package/dist/codegen/api/core/OpenAPI.d.ts +16 -0
  25. package/dist/codegen/api/core/OpenAPI.js +15 -0
  26. package/dist/codegen/api/core/OpenAPI.js.map +1 -0
  27. package/dist/codegen/api/core/request.d.ts +57 -0
  28. package/dist/codegen/api/core/request.js +351 -0
  29. package/dist/codegen/api/core/request.js.map +1 -0
  30. package/dist/codegen/api/index.d.ts +5 -0
  31. package/dist/codegen/api/index.js +9 -0
  32. package/dist/codegen/api/index.js.map +1 -0
  33. package/dist/codegen/api/services/DefaultService.d.ts +3267 -0
  34. package/dist/codegen/api/services/DefaultService.js +1459 -0
  35. package/dist/codegen/api/services/DefaultService.js.map +1 -0
  36. package/dist/package.json +46 -0
  37. package/dist/tsconfig.build.tsbuildinfo +1 -0
  38. package/dist/tsconfig.tsbuildinfo +1 -0
  39. package/dist/utils/crypto.d.ts +19 -0
  40. package/dist/utils/crypto.js +42 -0
  41. package/dist/utils/crypto.js.map +1 -0
  42. package/package.json +49 -0
@@ -0,0 +1,1459 @@
1
+ import { OpenAPI } from '../core/OpenAPI';
2
+ import { request as __request } from '../core/request';
3
+ export class DefaultService {
4
+ /**
5
+ * List App Installs
6
+ * This endpoint lists all app installs within the workspace associated with this API Key. <br/><br/>Returns the apps in sorted order as displayed in the left navbar.
7
+ * @returns any 200
8
+ * @throws ApiError
9
+ */
10
+ static listAppInstalls() {
11
+ return __request(OpenAPI, {
12
+ method: 'GET',
13
+ url: '/v1/installs',
14
+ });
15
+ }
16
+ /**
17
+ * Retrieve App Install
18
+ * This API endpoint retrieves a specific App Install.
19
+ * @returns any 200
20
+ * @throws ApiError
21
+ */
22
+ static retrieveAppInstall({ installId }) {
23
+ return __request(OpenAPI, {
24
+ method: 'GET',
25
+ url: '/v1/installs/{installId}',
26
+ path: {
27
+ installId: installId,
28
+ },
29
+ });
30
+ }
31
+ /**
32
+ * List App Connections
33
+ * This endpoint lists all app connections for the specified manual app install within the workspace.
34
+ * @returns any 200
35
+ * @throws ApiError
36
+ */
37
+ static listAppConnections({ installId, clientId, companyId = '' }) {
38
+ return __request(OpenAPI, {
39
+ method: 'GET',
40
+ url: '/v1/installs/{installId}/connections',
41
+ path: {
42
+ installId: installId,
43
+ },
44
+ query: {
45
+ clientId: clientId,
46
+ companyId: companyId,
47
+ },
48
+ });
49
+ }
50
+ /**
51
+ * Create App Connection
52
+ * This endpoint creates an app connection for a manual app install. One of <b>companyId</b> or <b>clientIds</b> must be non-null, specifying the client(s)/company who will receive the specified content.
53
+ * @returns any 200
54
+ * @throws ApiError
55
+ */
56
+ static createAppConnection({ installId, requestBody }) {
57
+ return __request(OpenAPI, {
58
+ method: 'POST',
59
+ url: '/v1/installs/{installId}/connections',
60
+ path: {
61
+ installId: installId,
62
+ },
63
+ body: requestBody,
64
+ mediaType: 'application/json',
65
+ });
66
+ }
67
+ /**
68
+ * Create Client
69
+ * This API endpoint creates a client.
70
+ * @returns any 200
71
+ * @throws ApiError
72
+ */
73
+ static createClient({ sendInvite = false, requestBody }) {
74
+ return __request(OpenAPI, {
75
+ method: 'POST',
76
+ url: '/v1/clients',
77
+ query: {
78
+ sendInvite: sendInvite,
79
+ },
80
+ body: requestBody,
81
+ mediaType: 'application/json',
82
+ errors: {
83
+ 400: `400`,
84
+ },
85
+ });
86
+ }
87
+ /**
88
+ * List Clients
89
+ * This API endpoint retrieves a list of clients. <br><br>You can use the query params to filter a subset of clients who match specific field values.
90
+ * @returns any 200
91
+ * @throws ApiError
92
+ */
93
+ static listClients({
94
+ companyId = '',
95
+ email,
96
+ givenName,
97
+ familyName,
98
+ nextToken,
99
+ limit = 100,
100
+ }) {
101
+ return __request(OpenAPI, {
102
+ method: 'GET',
103
+ url: '/v1/clients',
104
+ query: {
105
+ companyId: companyId,
106
+ email: email,
107
+ givenName: givenName,
108
+ familyName: familyName,
109
+ nextToken: nextToken,
110
+ limit: limit,
111
+ },
112
+ errors: {
113
+ 403: `403`,
114
+ },
115
+ });
116
+ }
117
+ /**
118
+ * Retrieve Client
119
+ * This API endpoint retrieves a specific client.
120
+ * @returns any 200
121
+ * @throws ApiError
122
+ */
123
+ static retrieveClient({ id }) {
124
+ return __request(OpenAPI, {
125
+ method: 'GET',
126
+ url: '/v1/clients/{id}',
127
+ path: {
128
+ id: id,
129
+ },
130
+ errors: {
131
+ 404: `404`,
132
+ },
133
+ });
134
+ }
135
+ /**
136
+ * Update Client
137
+ * This API endpoint updates a specific client. <br><br> This PATCH request will only update the fields you specify (including custom fields), leaving the rest as they were. <br><br>Please note that for multi-select (tag) custom fields, all custom field options (tag values) must be included, the PATCH request will not preserve existing custom field options (tags).
138
+ * @returns any 200
139
+ * @throws ApiError
140
+ */
141
+ static updateClient({ id, sendInvite = false, requestBody }) {
142
+ return __request(OpenAPI, {
143
+ method: 'PATCH',
144
+ url: '/v1/clients/{id}',
145
+ path: {
146
+ id: id,
147
+ },
148
+ query: {
149
+ sendInvite: sendInvite,
150
+ },
151
+ body: requestBody,
152
+ mediaType: 'application/json',
153
+ });
154
+ }
155
+ /**
156
+ * Update a Client (destructive)
157
+ * This API endpoint updates a specific client.<br> <br>This PUT request will perform a destructive update and clear all unspecified field values, including custom fields.
158
+ * @returns any 200
159
+ * @throws ApiError
160
+ */
161
+ static updateAClientDestructive({ id, requestBody }) {
162
+ return __request(OpenAPI, {
163
+ method: 'PUT',
164
+ url: '/v1/clients/{id}',
165
+ path: {
166
+ id: id,
167
+ },
168
+ body: requestBody,
169
+ mediaType: 'application/json',
170
+ });
171
+ }
172
+ /**
173
+ * Delete Client
174
+ * This API endpoint permanently removes a specific client. When a client is deleted, the associated individual file and message channels are also deleted.
175
+ * @returns any 200
176
+ * @throws ApiError
177
+ */
178
+ static deleteClient({ id }) {
179
+ return __request(OpenAPI, {
180
+ method: 'DELETE',
181
+ url: '/v1/clients/{id}',
182
+ path: {
183
+ id: id,
184
+ },
185
+ errors: {
186
+ 404: `404`,
187
+ },
188
+ });
189
+ }
190
+ /**
191
+ * Create Company
192
+ * This API endpoint creates a company.
193
+ * @returns any 200
194
+ * @throws ApiError
195
+ */
196
+ static createCompany({ requestBody }) {
197
+ return __request(OpenAPI, {
198
+ method: 'POST',
199
+ url: '/v1/companies',
200
+ body: requestBody,
201
+ mediaType: 'application/json',
202
+ errors: {
203
+ 400: `400`,
204
+ },
205
+ });
206
+ }
207
+ /**
208
+ * List Companies
209
+ * This API endpoint retrieves the list of companies.<br><br>You can use the query params to filter a subset of companies who match specific field values.
210
+ * @returns any 200
211
+ * @throws ApiError
212
+ */
213
+ static listCompanies({ name, isPlaceholder, nextToken, limit = 100 }) {
214
+ return __request(OpenAPI, {
215
+ method: 'GET',
216
+ url: '/v1/companies',
217
+ query: {
218
+ name: name,
219
+ isPlaceholder: isPlaceholder,
220
+ nextToken: nextToken,
221
+ limit: limit,
222
+ },
223
+ errors: {
224
+ 403: `403`,
225
+ },
226
+ });
227
+ }
228
+ /**
229
+ * Retrieve Company
230
+ * This API endpoint retrieves a specific company.
231
+ * @returns any 200
232
+ * @throws ApiError
233
+ */
234
+ static retrieveCompany({ id }) {
235
+ return __request(OpenAPI, {
236
+ method: 'GET',
237
+ url: '/v1/companies/{id}',
238
+ path: {
239
+ id: id,
240
+ },
241
+ errors: {
242
+ 404: `404`,
243
+ },
244
+ });
245
+ }
246
+ /**
247
+ * Update Company
248
+ * This API endpoint updates a specific company.
249
+ * @returns any 200
250
+ * @throws ApiError
251
+ */
252
+ static updateCompany({ id, requestBody }) {
253
+ return __request(OpenAPI, {
254
+ method: 'PATCH',
255
+ url: '/v1/companies/{id}',
256
+ path: {
257
+ id: id,
258
+ },
259
+ body: requestBody,
260
+ mediaType: 'application/json',
261
+ errors: {
262
+ 400: `400`,
263
+ },
264
+ });
265
+ }
266
+ /**
267
+ * Delete Company
268
+ * This API endpoint permanently removes a specific company. All clients that are part of this company will no longer be associated with any company (and each will instead be associated with a new placeholder company). When a company is deleted, the associated company file and message channels are also deleted.
269
+ * @returns any 200
270
+ * @throws ApiError
271
+ */
272
+ static deleteCompany({ id }) {
273
+ return __request(OpenAPI, {
274
+ method: 'DELETE',
275
+ url: '/v1/companies/{id}',
276
+ path: {
277
+ id: id,
278
+ },
279
+ errors: {
280
+ 404: `404`,
281
+ },
282
+ });
283
+ }
284
+ /**
285
+ * Send Contract
286
+ * This API endpoint sends a contract to the specified recipient.
287
+ * @returns any 200
288
+ * @throws ApiError
289
+ */
290
+ static sendContract({ requestBody }) {
291
+ return __request(OpenAPI, {
292
+ method: 'POST',
293
+ url: '/v1/contracts',
294
+ body: requestBody,
295
+ mediaType: 'application/json',
296
+ errors: {
297
+ 400: `400`,
298
+ },
299
+ });
300
+ }
301
+ /**
302
+ * List Contracts
303
+ * This API endpoint retrieves contracts.
304
+ * @returns any 200
305
+ * @throws ApiError
306
+ */
307
+ static listContracts({
308
+ contractTemplateId,
309
+ recipientId = '',
310
+ status,
311
+ clientId = '',
312
+ }) {
313
+ return __request(OpenAPI, {
314
+ method: 'GET',
315
+ url: '/v1/contracts',
316
+ query: {
317
+ contractTemplateId: contractTemplateId,
318
+ recipientId: recipientId,
319
+ status: status,
320
+ clientId: clientId,
321
+ },
322
+ errors: {
323
+ 400: `400`,
324
+ },
325
+ });
326
+ }
327
+ /**
328
+ * Retrieve Contract
329
+ * This API endpoint retrieves a specific contract.
330
+ * @returns any 200
331
+ * @throws ApiError
332
+ */
333
+ static retrieveContract({ id }) {
334
+ return __request(OpenAPI, {
335
+ method: 'GET',
336
+ url: '/v1/contracts/{id}',
337
+ path: {
338
+ id: id,
339
+ },
340
+ errors: {
341
+ 400: `400`,
342
+ },
343
+ });
344
+ }
345
+ /**
346
+ * Retrieve Contract Template
347
+ * This API endpoint retrieves a specific contract template.
348
+ * @returns any 200
349
+ * @throws ApiError
350
+ */
351
+ static retrieveContractTemplate({ id }) {
352
+ return __request(OpenAPI, {
353
+ method: 'GET',
354
+ url: '/v1/contract-templates/{id}',
355
+ path: {
356
+ id: id,
357
+ },
358
+ errors: {
359
+ 400: `400`,
360
+ },
361
+ });
362
+ }
363
+ /**
364
+ * List Contract Templates
365
+ * This API endpoint retrieves the list of contract templates. You can use the query params to filter a subset of companies who match specific field values.
366
+ * @returns any 200
367
+ * @throws ApiError
368
+ */
369
+ static listContractTemplates({ name, nextToken, limit = 100 }) {
370
+ return __request(OpenAPI, {
371
+ method: 'GET',
372
+ url: '/v1/contract-templates',
373
+ query: {
374
+ name: name,
375
+ nextToken: nextToken,
376
+ limit: limit,
377
+ },
378
+ errors: {
379
+ 400: `400`,
380
+ },
381
+ });
382
+ }
383
+ /**
384
+ * List Custom Fields
385
+ * This API endpoint retrieves a list of all the custom fields that have been created in your workspace.
386
+ * @returns any 200
387
+ * @throws ApiError
388
+ */
389
+ static listCustomFields({ entityType }) {
390
+ return __request(OpenAPI, {
391
+ method: 'GET',
392
+ url: '/v1/custom-fields',
393
+ query: {
394
+ entityType: entityType,
395
+ },
396
+ errors: {
397
+ 404: `404`,
398
+ },
399
+ });
400
+ }
401
+ /**
402
+ * List Custom Field Options
403
+ * Get a list of options for a multi-select custom field.<br><br>You can use the query params to filter for a single matching custom field option.
404
+ * @returns any 200
405
+ * @throws ApiError
406
+ */
407
+ static listCustomFieldOptions({ id, label }) {
408
+ return __request(OpenAPI, {
409
+ method: 'GET',
410
+ url: '/v1/custom-fields/{id}/options',
411
+ path: {
412
+ id: id,
413
+ },
414
+ query: {
415
+ label: label,
416
+ },
417
+ errors: {
418
+ 404: `404`,
419
+ },
420
+ });
421
+ }
422
+ /**
423
+ * Create File
424
+ * These are 3 API endpoints which create a file object in a File Channel, of type `file`, `folder` or `link`, based on the `fileType` path parameter that you specify.
425
+ * @returns any 200
426
+ * @throws ApiError
427
+ */
428
+ static createFile({ fileType, requestBody }) {
429
+ return __request(OpenAPI, {
430
+ method: 'POST',
431
+ url: '/v1/files/{fileType}',
432
+ path: {
433
+ fileType: fileType,
434
+ },
435
+ body: requestBody,
436
+ mediaType: 'application/json',
437
+ errors: {
438
+ 400: `400`,
439
+ 403: `403`,
440
+ },
441
+ });
442
+ }
443
+ /**
444
+ * Retrieve File
445
+ * This endpoint returns the metadata for a specific file object.
446
+ * @returns any 200
447
+ * @throws ApiError
448
+ */
449
+ static retrieveFile({ id }) {
450
+ return __request(OpenAPI, {
451
+ method: 'GET',
452
+ url: '/v1/files/{id}',
453
+ path: {
454
+ id: id,
455
+ },
456
+ errors: {
457
+ 403: `403`,
458
+ 404: `404`,
459
+ },
460
+ });
461
+ }
462
+ /**
463
+ * Delete File
464
+ * This API endpoint permanently removes a specific file, folder, or link. <br><br> If the deleted object is a folder, this operation is not recursive and files within the folder will not be deleted. You will receive a ‘Folder is not empty’ error message and the folder will not be deleted.
465
+ * @returns any 200
466
+ * @throws ApiError
467
+ */
468
+ static deleteFile({ id }) {
469
+ return __request(OpenAPI, {
470
+ method: 'DELETE',
471
+ url: '/v1/files/{id}',
472
+ path: {
473
+ id: id,
474
+ },
475
+ errors: {
476
+ 400: `400`,
477
+ },
478
+ });
479
+ }
480
+ /**
481
+ * Deprecated: Retrieve Download URL of a File
482
+ * This endpoint returns a URL to download the contents of a file (of all sizes).
483
+ * @returns any 200
484
+ * @throws ApiError
485
+ */
486
+ static retrieveDownloadUrlOfAFile({ id }) {
487
+ return __request(OpenAPI, {
488
+ method: 'GET',
489
+ url: '/v1/files/{id}/download-url',
490
+ path: {
491
+ id: id,
492
+ },
493
+ errors: {
494
+ 400: `400`,
495
+ 404: `404`,
496
+ },
497
+ });
498
+ }
499
+ /**
500
+ * Deprecated: Download a File
501
+ * This endpoint directly downloads the contents of a file (under 4 MB).
502
+ * @returns any 200
503
+ * @throws ApiError
504
+ */
505
+ static downloadAFile({ id }) {
506
+ return __request(OpenAPI, {
507
+ method: 'GET',
508
+ url: '/v1/files/{id}/download',
509
+ path: {
510
+ id: id,
511
+ },
512
+ errors: {
513
+ 400: `400`,
514
+ 500: `500`,
515
+ },
516
+ });
517
+ }
518
+ /**
519
+ * List Files
520
+ * This API endpoint retrieves the list of files in a file channel.
521
+ * @returns any 200
522
+ * @throws ApiError
523
+ */
524
+ static listFiles({ channelId, path, nextToken, limit = 100 }) {
525
+ return __request(OpenAPI, {
526
+ method: 'GET',
527
+ url: '/v1/files',
528
+ query: {
529
+ channelId: channelId,
530
+ path: path,
531
+ nextToken: nextToken,
532
+ limit: limit,
533
+ },
534
+ errors: {
535
+ 400: `400`,
536
+ },
537
+ });
538
+ }
539
+ /**
540
+ * Deprecated: Create a File
541
+ * This was the initial API endpoint to create a file resource, specifically folders.
542
+ * @returns any 200
543
+ * @throws ApiError
544
+ */
545
+ static createAFileDeprecated({ requestBody }) {
546
+ return __request(OpenAPI, {
547
+ method: 'POST',
548
+ url: '/v1/file',
549
+ body: requestBody,
550
+ mediaType: 'application/json',
551
+ errors: {
552
+ 400: `400`,
553
+ 403: `403`,
554
+ 404: `404`,
555
+ },
556
+ });
557
+ }
558
+ /**
559
+ * Create File Channel
560
+ * This API endpoint creates a new file channel. See the File Channel resource for detailed descriptions of the properties.
561
+ * @returns any 200
562
+ * @throws ApiError
563
+ */
564
+ static createFileChannel({ requestBody }) {
565
+ return __request(OpenAPI, {
566
+ method: 'POST',
567
+ url: '/v1/channels/files',
568
+ body: requestBody,
569
+ mediaType: 'application/json',
570
+ errors: {
571
+ 400: `400`,
572
+ },
573
+ });
574
+ }
575
+ /**
576
+ * List File Channels
577
+ * This API endpoint retrieves a list of file channels.<br><br>You can use the query params to filter a subset of the file channels that match the specified field values.
578
+ * @returns any 200
579
+ * @throws ApiError
580
+ */
581
+ static listFileChannels({
582
+ membershipType,
583
+ membershipEntityId = '',
584
+ memberId,
585
+ nextToken,
586
+ limit = 100,
587
+ clientId = '',
588
+ companyId = '',
589
+ }) {
590
+ return __request(OpenAPI, {
591
+ method: 'GET',
592
+ url: '/v1/channels/files',
593
+ query: {
594
+ membershipType: membershipType,
595
+ membershipEntityId: membershipEntityId,
596
+ memberId: memberId,
597
+ nextToken: nextToken,
598
+ limit: limit,
599
+ clientId: clientId,
600
+ companyId: companyId,
601
+ },
602
+ });
603
+ }
604
+ /**
605
+ * Retrieve File Channel
606
+ * This API endpoint retrieves a specific file channel.
607
+ * @returns any 200
608
+ * @throws ApiError
609
+ */
610
+ static retrieveFileChannel({ id }) {
611
+ return __request(OpenAPI, {
612
+ method: 'GET',
613
+ url: '/v1/channels/files/{id}',
614
+ path: {
615
+ id: id,
616
+ },
617
+ errors: {
618
+ 400: `400`,
619
+ },
620
+ });
621
+ }
622
+ /**
623
+ * Retrieve Form
624
+ * This API endpoint retrieves a specific form.
625
+ * @returns any 200
626
+ * @throws ApiError
627
+ */
628
+ static retrieveForm({ id }) {
629
+ return __request(OpenAPI, {
630
+ method: 'GET',
631
+ url: '/v1/forms/{id}',
632
+ path: {
633
+ id: id,
634
+ },
635
+ errors: {
636
+ 404: `404`,
637
+ },
638
+ });
639
+ }
640
+ /**
641
+ * List Forms
642
+ * This API endpoint retrieves a list of forms.
643
+ * @returns any 200
644
+ * @throws ApiError
645
+ */
646
+ static listForms({ nextToken, limit = 100 }) {
647
+ return __request(OpenAPI, {
648
+ method: 'GET',
649
+ url: '/v1/forms',
650
+ query: {
651
+ nextToken: nextToken,
652
+ limit: limit,
653
+ },
654
+ errors: {
655
+ 403: `403`,
656
+ },
657
+ });
658
+ }
659
+ /**
660
+ * Request Form Response
661
+ * This API endpoint sends a form to client(s) for them to complete.
662
+ * @returns any 200
663
+ * @throws ApiError
664
+ */
665
+ static requestFormResponse({ requestBody }) {
666
+ return __request(OpenAPI, {
667
+ method: 'POST',
668
+ url: '/v1/form-responses',
669
+ body: requestBody,
670
+ mediaType: 'application/json',
671
+ errors: {
672
+ 403: `403`,
673
+ 404: `404`,
674
+ },
675
+ });
676
+ }
677
+ /**
678
+ * List Form Responses
679
+ * This API endpoint retrieves all the responses (Pending & Completed) to a given form.
680
+ * @returns any 200
681
+ * @throws ApiError
682
+ */
683
+ static listFormResponses({ id }) {
684
+ return __request(OpenAPI, {
685
+ method: 'GET',
686
+ url: '/v1/forms/{id}/form-responses',
687
+ path: {
688
+ id: id,
689
+ },
690
+ errors: {
691
+ 400: `400`,
692
+ },
693
+ });
694
+ }
695
+ /**
696
+ * Retrieve Internal User
697
+ * This API endpoint retrieves a specific internal user.
698
+ * @returns any 200
699
+ * @throws ApiError
700
+ */
701
+ static retrieveInternalUser({ id }) {
702
+ return __request(OpenAPI, {
703
+ method: 'GET',
704
+ url: '/v1/internal-users/{id}',
705
+ path: {
706
+ id: id,
707
+ },
708
+ errors: {
709
+ 400: `400`,
710
+ },
711
+ });
712
+ }
713
+ /**
714
+ * List Internal Users
715
+ * This API endpoint retrieves a list of internal users.
716
+ * @returns any 200
717
+ * @throws ApiError
718
+ */
719
+ static listInternalUsers({ nextToken, limit }) {
720
+ return __request(OpenAPI, {
721
+ method: 'GET',
722
+ url: '/v1/internal-users',
723
+ query: {
724
+ nextToken: nextToken,
725
+ limit: limit,
726
+ },
727
+ errors: {
728
+ 400: `400`,
729
+ },
730
+ });
731
+ }
732
+ /**
733
+ * Retrieve Invoice
734
+ * @returns any 200
735
+ * @throws ApiError
736
+ */
737
+ static retrieveInvoice({ id = '' }) {
738
+ return __request(OpenAPI, {
739
+ method: 'GET',
740
+ url: '/v1/invoices/{id}',
741
+ path: {
742
+ id: id,
743
+ },
744
+ errors: {
745
+ 400: `400`,
746
+ },
747
+ });
748
+ }
749
+ /**
750
+ * List Invoices
751
+ * @returns any 200
752
+ * @throws ApiError
753
+ */
754
+ static listInvoices({ nextToken, limit }) {
755
+ return __request(OpenAPI, {
756
+ method: 'GET',
757
+ url: '/v1/invoices',
758
+ query: {
759
+ nextToken: nextToken,
760
+ limit: limit,
761
+ },
762
+ errors: {
763
+ 400: `400`,
764
+ },
765
+ });
766
+ }
767
+ /**
768
+ * Create Invoice
769
+ * This API endpoint create an invoice and automatically assigns it to given recipient to pay
770
+ * @returns any 200
771
+ * @throws ApiError
772
+ */
773
+ static createInvoice({ requestBody }) {
774
+ return __request(OpenAPI, {
775
+ method: 'POST',
776
+ url: '/v1/invoices',
777
+ body: requestBody,
778
+ mediaType: 'application/json',
779
+ errors: {
780
+ 400: `400`,
781
+ },
782
+ });
783
+ }
784
+ /**
785
+ * List Invoice Templates
786
+ * This API endpoint lists all the invoice templates for the workspace.
787
+ * @returns any 200
788
+ * @throws ApiError
789
+ */
790
+ static listInvoiceTemplates({ limit, nextToken }) {
791
+ return __request(OpenAPI, {
792
+ method: 'GET',
793
+ url: '/v1/invoice-templates',
794
+ query: {
795
+ limit: limit,
796
+ nextToken: nextToken,
797
+ },
798
+ errors: {
799
+ 400: `400`,
800
+ },
801
+ });
802
+ }
803
+ /**
804
+ * Send Message
805
+ * This API endpoint sends a message within a Message Channel.
806
+ * @returns any 200
807
+ * @throws ApiError
808
+ */
809
+ static sendMessage({ requestBody }) {
810
+ return __request(OpenAPI, {
811
+ method: 'POST',
812
+ url: '/v1/messages',
813
+ body: requestBody,
814
+ mediaType: 'application/json',
815
+ errors: {
816
+ 400: `400`,
817
+ },
818
+ });
819
+ }
820
+ /**
821
+ * List Messages
822
+ * This API endpoint retrieves a list of messages in a given Message Channel. Messages are paginated and returned in descending chronological order.
823
+ * @returns any 200
824
+ * @throws ApiError
825
+ */
826
+ static listMessages({ channelId, nextToken, limit = 100 }) {
827
+ return __request(OpenAPI, {
828
+ method: 'GET',
829
+ url: '/v1/messages',
830
+ query: {
831
+ channelId: channelId,
832
+ nextToken: nextToken,
833
+ limit: limit,
834
+ },
835
+ });
836
+ }
837
+ /**
838
+ * Create Message Channel
839
+ * This API endpoint creates a new message channel. See the [Message Channel](ref:message-channels) resource for detailed descriptions of the properties.
840
+ * @returns any 200
841
+ * @throws ApiError
842
+ */
843
+ static createMessageChannel({ requestBody }) {
844
+ return __request(OpenAPI, {
845
+ method: 'POST',
846
+ url: '/v1/message-channels',
847
+ body: requestBody,
848
+ mediaType: 'application/json',
849
+ errors: {
850
+ 400: `400`,
851
+ },
852
+ });
853
+ }
854
+ /**
855
+ * List Message Channels
856
+ * This API endpoint retrieves a list of message channels in your portal.<br><br>You can use the query params to filter a subset of the message channels that match the specified field values.
857
+ * @returns any 200
858
+ * @throws ApiError
859
+ */
860
+ static listMessageChannels({
861
+ membershipType,
862
+ membershipEntityId,
863
+ memberId,
864
+ nextToken,
865
+ limit = 100,
866
+ clientId = '',
867
+ }) {
868
+ return __request(OpenAPI, {
869
+ method: 'GET',
870
+ url: '/v1/message-channels',
871
+ query: {
872
+ membershipType: membershipType,
873
+ membershipEntityId: membershipEntityId,
874
+ memberId: memberId,
875
+ nextToken: nextToken,
876
+ limit: limit,
877
+ clientId: clientId,
878
+ },
879
+ errors: {
880
+ 400: `400`,
881
+ },
882
+ });
883
+ }
884
+ /**
885
+ * Retrieve Message Channel
886
+ * This API endpoint retrieves a specific message channel in your portal.
887
+ * @returns any 200
888
+ * @throws ApiError
889
+ */
890
+ static retrieveMessageChannel({ id }) {
891
+ return __request(OpenAPI, {
892
+ method: 'GET',
893
+ url: '/v1/message-channels/{id}',
894
+ path: {
895
+ id: id,
896
+ },
897
+ errors: {
898
+ 400: `400`,
899
+ },
900
+ });
901
+ }
902
+ /**
903
+ * Create Note
904
+ * This API endpoint creates a note on a specified client or company in your workspace.
905
+ * @returns any 200
906
+ * @throws ApiError
907
+ */
908
+ static createNote({ requestBody }) {
909
+ return __request(OpenAPI, {
910
+ method: 'POST',
911
+ url: '/v1/notes',
912
+ body: requestBody,
913
+ mediaType: 'application/json',
914
+ errors: {
915
+ 400: `400`,
916
+ },
917
+ });
918
+ }
919
+ /**
920
+ * List Notes
921
+ * This API endpoint retrieves a list of notes on clients or companies in your workspace. <br> You can use the query params to filter a subset of clients or companies that match the specified field values.
922
+ * @returns any 200
923
+ * @throws ApiError
924
+ */
925
+ static listNotes({ entityType, entityId, limit = 20, nextToken }) {
926
+ return __request(OpenAPI, {
927
+ method: 'GET',
928
+ url: '/v1/notes',
929
+ query: {
930
+ entityType: entityType,
931
+ entityId: entityId,
932
+ limit: limit,
933
+ nextToken: nextToken,
934
+ },
935
+ errors: {
936
+ 400: `400`,
937
+ },
938
+ });
939
+ }
940
+ /**
941
+ * Update Note
942
+ * This API endpoint updates a specific note. <br> This PATCH request will only update the fields you specify, leaving the rest as they were.
943
+ * @returns any 200
944
+ * @throws ApiError
945
+ */
946
+ static updateNote({ id, requestBody }) {
947
+ return __request(OpenAPI, {
948
+ method: 'PATCH',
949
+ url: '/v1/notes/{id}',
950
+ path: {
951
+ id: id,
952
+ },
953
+ body: requestBody,
954
+ mediaType: 'application/json',
955
+ errors: {
956
+ 400: `400`,
957
+ },
958
+ });
959
+ }
960
+ /**
961
+ * Retrieve Note
962
+ * This API endpoint retrieves a specific note.
963
+ * @returns any 200
964
+ * @throws ApiError
965
+ */
966
+ static retrieveNote({ id }) {
967
+ return __request(OpenAPI, {
968
+ method: 'GET',
969
+ url: '/v1/notes/{id}',
970
+ path: {
971
+ id: id,
972
+ },
973
+ errors: {
974
+ 400: `400`,
975
+ },
976
+ });
977
+ }
978
+ /**
979
+ * Delete Note
980
+ * This API endpoint permanently removes a specific note.
981
+ * @returns any 200
982
+ * @throws ApiError
983
+ */
984
+ static deleteNote({ id }) {
985
+ return __request(OpenAPI, {
986
+ method: 'DELETE',
987
+ url: '/v1/notes/{id}',
988
+ path: {
989
+ id: id,
990
+ },
991
+ errors: {
992
+ 400: `400`,
993
+ },
994
+ });
995
+ }
996
+ /**
997
+ * List Notifications
998
+ * Lists notifications for a workspace.
999
+ * @returns any 200
1000
+ * @throws ApiError
1001
+ */
1002
+ static listNotifications({
1003
+ recipientId,
1004
+ includeRead = false,
1005
+ recipientClientId,
1006
+ recipientInternalUserId,
1007
+ }) {
1008
+ return __request(OpenAPI, {
1009
+ method: 'GET',
1010
+ url: '/v1/notifications',
1011
+ query: {
1012
+ recipientId: recipientId,
1013
+ includeRead: includeRead,
1014
+ recipientClientId: recipientClientId,
1015
+ recipientInternalUserId: recipientInternalUserId,
1016
+ },
1017
+ errors: {
1018
+ 400: `400`,
1019
+ },
1020
+ });
1021
+ }
1022
+ /**
1023
+ * Create Notification
1024
+ * Creates a notification in a workspace.
1025
+ * @returns any 200
1026
+ * @throws ApiError
1027
+ */
1028
+ static createNotification({ requestBody }) {
1029
+ return __request(OpenAPI, {
1030
+ method: 'POST',
1031
+ url: '/v1/notifications',
1032
+ body: requestBody,
1033
+ mediaType: 'application/json',
1034
+ errors: {
1035
+ 400: `400`,
1036
+ },
1037
+ });
1038
+ }
1039
+ /**
1040
+ * Delete Notification
1041
+ * This API endpoint deletes a notification.
1042
+ * @returns any 200
1043
+ * @throws ApiError
1044
+ */
1045
+ static deleteNotification({ id }) {
1046
+ return __request(OpenAPI, {
1047
+ method: 'DELETE',
1048
+ url: '/v1/notifications/{id}',
1049
+ path: {
1050
+ id: id,
1051
+ },
1052
+ errors: {
1053
+ 400: `400`,
1054
+ },
1055
+ });
1056
+ }
1057
+ /**
1058
+ * Mark Notification Read
1059
+ * This API endpoint marks a notification as read.
1060
+ * @returns any 200
1061
+ * @throws ApiError
1062
+ */
1063
+ static markNotificationRead({ id }) {
1064
+ return __request(OpenAPI, {
1065
+ method: 'POST',
1066
+ url: '/v1/notifications/{id}/read',
1067
+ path: {
1068
+ id: id,
1069
+ },
1070
+ errors: {
1071
+ 400: `400`,
1072
+ },
1073
+ });
1074
+ }
1075
+ /**
1076
+ * Mark Notification Unread
1077
+ * This API endpoint marks a notification as unread.
1078
+ * @returns any 200
1079
+ * @throws ApiError
1080
+ */
1081
+ static markNotificationUnread({ id }) {
1082
+ return __request(OpenAPI, {
1083
+ method: 'POST',
1084
+ url: '/v1/notifications/{id}/unread',
1085
+ path: {
1086
+ id: id,
1087
+ },
1088
+ errors: {
1089
+ 400: `400`,
1090
+ },
1091
+ });
1092
+ }
1093
+ /**
1094
+ * List Payments
1095
+ * This API endpoint lists the payments in a workspace.<br> Filter can be applied on invoice ID to list a payment for a specific invoice.
1096
+ * @returns any 200
1097
+ * @throws ApiError
1098
+ */
1099
+ static listPayments({ invoiceId, limit, nextToken }) {
1100
+ return __request(OpenAPI, {
1101
+ method: 'GET',
1102
+ url: '/v1/payments',
1103
+ query: {
1104
+ invoiceId: invoiceId,
1105
+ limit: limit,
1106
+ nextToken: nextToken,
1107
+ },
1108
+ errors: {
1109
+ 400: `400`,
1110
+ },
1111
+ });
1112
+ }
1113
+ /**
1114
+ * List Prices
1115
+ * This API endpoint lists the prices for products in a workspace.
1116
+ * @returns any 200
1117
+ * @throws ApiError
1118
+ */
1119
+ static listPrices({ productId, nextToken, limit }) {
1120
+ return __request(OpenAPI, {
1121
+ method: 'GET',
1122
+ url: '/v1/prices',
1123
+ query: {
1124
+ productId: productId,
1125
+ nextToken: nextToken,
1126
+ limit: limit,
1127
+ },
1128
+ errors: {
1129
+ 400: `400`,
1130
+ },
1131
+ });
1132
+ }
1133
+ /**
1134
+ * Retrieve Price
1135
+ * This API endpoint retrieves a specific price.
1136
+ * @returns any 200
1137
+ * @throws ApiError
1138
+ */
1139
+ static retrievePrice({ id }) {
1140
+ return __request(OpenAPI, {
1141
+ method: 'GET',
1142
+ url: '/v1/prices/{id}',
1143
+ path: {
1144
+ id: id,
1145
+ },
1146
+ errors: {
1147
+ 400: `400`,
1148
+ },
1149
+ });
1150
+ }
1151
+ /**
1152
+ * List Products
1153
+ * This API endpoint lists the contracts in a workspace.
1154
+ * @returns any 200
1155
+ * @throws ApiError
1156
+ */
1157
+ static listProducts({ name, nextToken, limit }) {
1158
+ return __request(OpenAPI, {
1159
+ method: 'GET',
1160
+ url: '/v1/products',
1161
+ query: {
1162
+ name: name,
1163
+ nextToken: nextToken,
1164
+ limit: limit,
1165
+ },
1166
+ errors: {
1167
+ 400: `400`,
1168
+ },
1169
+ });
1170
+ }
1171
+ /**
1172
+ * Retrieve Product
1173
+ * This API endpoint retrieves a specific product.
1174
+ * @returns any 200
1175
+ * @throws ApiError
1176
+ */
1177
+ static retrieveProduct({ id }) {
1178
+ return __request(OpenAPI, {
1179
+ method: 'GET',
1180
+ url: '/v1/products/{id}',
1181
+ path: {
1182
+ id: id,
1183
+ },
1184
+ errors: {
1185
+ 400: `400`,
1186
+ },
1187
+ });
1188
+ }
1189
+ /**
1190
+ * Create Subscription
1191
+ * This API endpoint creates a subscription. A subscription is used to bill clients on a recurring basis.
1192
+ * @returns any 200
1193
+ * @throws ApiError
1194
+ */
1195
+ static createSubscription({ requestBody }) {
1196
+ return __request(OpenAPI, {
1197
+ method: 'POST',
1198
+ url: '/v1/subscriptions',
1199
+ body: requestBody,
1200
+ mediaType: 'application/json',
1201
+ errors: {
1202
+ 400: `400`,
1203
+ },
1204
+ });
1205
+ }
1206
+ /**
1207
+ * List Subscriptions
1208
+ * @returns any 200
1209
+ * @throws ApiError
1210
+ */
1211
+ static listSubscriptions({ limit, nextToken }) {
1212
+ return __request(OpenAPI, {
1213
+ method: 'GET',
1214
+ url: '/v1/subscriptions',
1215
+ query: {
1216
+ limit: limit,
1217
+ nextToken: nextToken,
1218
+ },
1219
+ errors: {
1220
+ 400: `400`,
1221
+ },
1222
+ });
1223
+ }
1224
+ /**
1225
+ * Retrieve Subscription
1226
+ * This API endpoint retrieves a specific subscription.
1227
+ * @returns any 200
1228
+ * @throws ApiError
1229
+ */
1230
+ static retrieveSubscription({ id }) {
1231
+ return __request(OpenAPI, {
1232
+ method: 'GET',
1233
+ url: '/v1/subscriptions/{id}',
1234
+ path: {
1235
+ id: id,
1236
+ },
1237
+ errors: {
1238
+ 400: `400`,
1239
+ },
1240
+ });
1241
+ }
1242
+ /**
1243
+ * Cancel Subscription
1244
+ * This API endpoint cancels a subscription with status `active` or `notStarted`
1245
+ * @returns any 200
1246
+ * @throws ApiError
1247
+ */
1248
+ static cancelSubscription({ id }) {
1249
+ return __request(OpenAPI, {
1250
+ method: 'POST',
1251
+ url: '/v1/subscriptions/{id}/cancel',
1252
+ path: {
1253
+ id: id,
1254
+ },
1255
+ errors: {
1256
+ 400: `400`,
1257
+ },
1258
+ });
1259
+ }
1260
+ /**
1261
+ * List Subscription Templates
1262
+ * @returns any 200
1263
+ * @throws ApiError
1264
+ */
1265
+ static listSubscriptionTemplates({ limit, nextToken }) {
1266
+ return __request(OpenAPI, {
1267
+ method: 'GET',
1268
+ url: '/v1/subscription-templates',
1269
+ query: {
1270
+ limit: limit,
1271
+ nextToken: nextToken,
1272
+ },
1273
+ errors: {
1274
+ 400: `400`,
1275
+ },
1276
+ });
1277
+ }
1278
+ /**
1279
+ * Retrieve Workspace
1280
+ * This API endpoint retrieves information about a workspace.
1281
+ * @returns any 200
1282
+ * @throws ApiError
1283
+ */
1284
+ static retrieveWorkspace() {
1285
+ return __request(OpenAPI, {
1286
+ method: 'GET',
1287
+ url: '/v1/workspaces',
1288
+ errors: {
1289
+ 400: `400`,
1290
+ },
1291
+ });
1292
+ }
1293
+ /**
1294
+ * List Tasks
1295
+ * This API endpoint retrieves tasks in a workspace.
1296
+ * @returns any 200
1297
+ * @throws ApiError
1298
+ */
1299
+ static retrieveTasks({
1300
+ limit = 100,
1301
+ nextToken,
1302
+ createdBy,
1303
+ parentTaskId,
1304
+ status,
1305
+ clientId,
1306
+ internalUserId,
1307
+ companyId,
1308
+ }) {
1309
+ return __request(OpenAPI, {
1310
+ method: 'GET',
1311
+ url: '/v1/tasks',
1312
+ query: {
1313
+ limit: limit,
1314
+ nextToken: nextToken,
1315
+ createdBy: createdBy,
1316
+ parentTaskId: parentTaskId,
1317
+ status: status,
1318
+ clientId: clientId,
1319
+ internalUserId: internalUserId,
1320
+ companyId: companyId,
1321
+ },
1322
+ errors: {
1323
+ 400: `400`,
1324
+ },
1325
+ });
1326
+ }
1327
+ /**
1328
+ * Create Task
1329
+ * This API endpoint creates a task.
1330
+ * @returns any 200
1331
+ * @throws ApiError
1332
+ */
1333
+ static createTask({ requestBody }) {
1334
+ return __request(OpenAPI, {
1335
+ method: 'POST',
1336
+ url: '/v1/tasks',
1337
+ body: requestBody,
1338
+ mediaType: 'application/json',
1339
+ errors: {
1340
+ 400: `400`,
1341
+ },
1342
+ });
1343
+ }
1344
+ /**
1345
+ * Retrieve Task
1346
+ * This API endpoint retrieves a specific task by its id.
1347
+ * @returns any 200
1348
+ * @throws ApiError
1349
+ */
1350
+ static retrieveTask({ id }) {
1351
+ return __request(OpenAPI, {
1352
+ method: 'GET',
1353
+ url: '/v1/tasks/{id}',
1354
+ path: {
1355
+ id: id,
1356
+ },
1357
+ errors: {
1358
+ 400: `400`,
1359
+ },
1360
+ });
1361
+ }
1362
+ /**
1363
+ * Update Task
1364
+ * This API endpoint updates a task.
1365
+ * @returns any 200
1366
+ * @throws ApiError
1367
+ */
1368
+ static updateTask({ id, requestBody }) {
1369
+ return __request(OpenAPI, {
1370
+ method: 'PATCH',
1371
+ url: '/v1/tasks/{id}',
1372
+ path: {
1373
+ id: id,
1374
+ },
1375
+ body: requestBody,
1376
+ mediaType: 'application/json',
1377
+ errors: {
1378
+ 400: `400`,
1379
+ },
1380
+ });
1381
+ }
1382
+ /**
1383
+ * Delete Task
1384
+ * This API endpoint deletes a specific task.
1385
+ * @returns any 200
1386
+ * @throws ApiError
1387
+ */
1388
+ static deleteTask({ id }) {
1389
+ return __request(OpenAPI, {
1390
+ method: 'DELETE',
1391
+ url: '/v1/tasks/{id}',
1392
+ path: {
1393
+ id: id,
1394
+ },
1395
+ errors: {
1396
+ 400: `400`,
1397
+ },
1398
+ });
1399
+ }
1400
+ /**
1401
+ * List Task Templates
1402
+ * This API endpoint retrieves a list of task templates created in the workspace.
1403
+ * @returns any 200
1404
+ * @throws ApiError
1405
+ */
1406
+ static listTaskTemplates({ limit = 100, nextToken }) {
1407
+ return __request(OpenAPI, {
1408
+ method: 'GET',
1409
+ url: '/v1/task-templates',
1410
+ query: {
1411
+ limit: limit,
1412
+ nextToken: nextToken,
1413
+ },
1414
+ errors: {
1415
+ 400: `400`,
1416
+ },
1417
+ });
1418
+ }
1419
+ /**
1420
+ * Retrieve Task Template
1421
+ * This API endpoint retrieves a specific task template by its id.
1422
+ * @returns any 200
1423
+ * @throws ApiError
1424
+ */
1425
+ static retrieveTaskTemplate({ id }) {
1426
+ return __request(OpenAPI, {
1427
+ method: 'GET',
1428
+ url: '/v1/task-templates/{id}',
1429
+ path: {
1430
+ id: id,
1431
+ },
1432
+ errors: {
1433
+ 400: `400`,
1434
+ },
1435
+ });
1436
+ }
1437
+ /**
1438
+ * @returns any Success
1439
+ * @throws ApiError
1440
+ */
1441
+ static putV1FilesIdPermissions({ id, requestBody }) {
1442
+ return __request(OpenAPI, {
1443
+ method: 'PUT',
1444
+ url: '/v1/files/{id}/permissions/',
1445
+ path: {
1446
+ id: id,
1447
+ },
1448
+ body: requestBody,
1449
+ mediaType: 'application/json',
1450
+ errors: {
1451
+ 400: `Bad Request`,
1452
+ 401: `Unauthorized`,
1453
+ 403: `Forbidden`,
1454
+ 404: `Not Found`,
1455
+ },
1456
+ });
1457
+ }
1458
+ }
1459
+ //# sourceMappingURL=DefaultService.js.map