@unofficialbox/box-open-sdk 0.1.2 → 0.3.1

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 (109) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +47 -11
  3. package/dist/cjs/chunked_upload.js +108 -0
  4. package/dist/cjs/index.js +4 -1
  5. package/dist/cjs/managers/chunked_uploads.js +4 -4
  6. package/dist/cjs/managers/search.js +1 -1
  7. package/dist/cjs/managers/transfer.js +1 -1
  8. package/dist/cjs/managers/uploads.js +2 -2
  9. package/dist/esm/chunked_upload.js +104 -0
  10. package/dist/esm/index.js +2 -0
  11. package/dist/esm/managers/chunked_uploads.js +4 -4
  12. package/dist/esm/managers/search.js +1 -1
  13. package/dist/esm/managers/transfer.js +1 -1
  14. package/dist/esm/managers/uploads.js +2 -2
  15. package/dist/types/chunked_upload.d.ts +21 -0
  16. package/dist/types/index.d.ts +2 -0
  17. package/dist/types/managers/chunked_uploads.d.ts +2 -2
  18. package/dist/types/managers/search.d.ts +1 -1
  19. package/dist/types/managers/transfer.d.ts +3 -3
  20. package/dist/types/managers/uploads.d.ts +6 -6
  21. package/dist/types/models/schemas.d.ts +2 -2
  22. package/docs/auth.md +10 -10
  23. package/docs/errors.md +2 -2
  24. package/docs/managers/ai.md +30 -0
  25. package/docs/managers/ai_studio.md +32 -0
  26. package/docs/managers/app_item_associations.md +16 -0
  27. package/docs/managers/archives.md +26 -0
  28. package/docs/managers/authorization.md +24 -0
  29. package/docs/managers/automate_workflows.md +14 -0
  30. package/docs/managers/avatars.md +18 -0
  31. package/docs/managers/chunked_uploads.md +48 -4
  32. package/docs/managers/classifications.md +24 -0
  33. package/docs/managers/collaboration_allowlist_entries.md +26 -0
  34. package/docs/managers/collaboration_allowlist_exempt_targets.md +26 -0
  35. package/docs/managers/collections.md +22 -0
  36. package/docs/managers/comments.md +32 -0
  37. package/docs/managers/device_pinners.md +20 -0
  38. package/docs/managers/docgen.md +28 -0
  39. package/docs/managers/docgen_template.md +42 -0
  40. package/docs/managers/downloads.md +6 -0
  41. package/docs/managers/email_aliases.md +18 -0
  42. package/docs/managers/enterprise_configurations.md +6 -0
  43. package/docs/managers/events.md +12 -0
  44. package/docs/managers/external_users.md +6 -0
  45. package/docs/managers/file_classifications.md +24 -0
  46. package/docs/managers/file_metadata.md +30 -0
  47. package/docs/managers/file_requests.md +24 -0
  48. package/docs/managers/file_version_legal_holds.md +14 -0
  49. package/docs/managers/file_version_retentions.md +14 -0
  50. package/docs/managers/file_versions.md +32 -0
  51. package/docs/managers/file_watermarks.md +18 -0
  52. package/docs/managers/files.md +30 -0
  53. package/docs/managers/folder_classifications.md +24 -0
  54. package/docs/managers/folder_locks.md +18 -0
  55. package/docs/managers/folder_metadata.md +30 -0
  56. package/docs/managers/folder_watermarks.md +18 -0
  57. package/docs/managers/folders.md +38 -0
  58. package/docs/managers/groups.md +32 -0
  59. package/docs/managers/hub_collaborations.md +32 -0
  60. package/docs/managers/hub_document.md +16 -0
  61. package/docs/managers/hub_items.md +14 -0
  62. package/docs/managers/hubs.md +46 -0
  63. package/docs/managers/integration_mappings.md +50 -0
  64. package/docs/managers/invites.md +12 -0
  65. package/docs/managers/legal_hold_policies.md +32 -0
  66. package/docs/managers/legal_hold_policy_assignments.md +42 -0
  67. package/docs/managers/list_collaborations.md +32 -0
  68. package/docs/managers/memberships.md +40 -0
  69. package/docs/managers/metadata_cascade_policies.md +32 -0
  70. package/docs/managers/metadata_taxonomies.md +96 -0
  71. package/docs/managers/metadata_templates.md +54 -0
  72. package/docs/managers/notes.md +6 -0
  73. package/docs/managers/recent_items.md +8 -0
  74. package/docs/managers/retention_policies.md +32 -0
  75. package/docs/managers/retention_policy_assignments.md +42 -0
  76. package/docs/managers/search.md +13 -1
  77. package/docs/managers/session_termination.md +12 -0
  78. package/docs/managers/shared_links_app_items.md +6 -0
  79. package/docs/managers/shared_links_files.md +30 -0
  80. package/docs/managers/shared_links_folders.md +30 -0
  81. package/docs/managers/shared_links_web_links.md +30 -0
  82. package/docs/managers/shield_information_barrier_reports.md +20 -0
  83. package/docs/managers/shield_information_barrier_segment_members.md +26 -0
  84. package/docs/managers/shield_information_barrier_segment_restrictions.md +26 -0
  85. package/docs/managers/shield_information_barrier_segments.md +32 -0
  86. package/docs/managers/shield_information_barriers.md +26 -0
  87. package/docs/managers/shield_lists.md +30 -0
  88. package/docs/managers/sign_requests.md +32 -0
  89. package/docs/managers/sign_templates.md +14 -0
  90. package/docs/managers/skills.md +30 -0
  91. package/docs/managers/storage_policies.md +14 -0
  92. package/docs/managers/storage_policy_assignments.md +32 -0
  93. package/docs/managers/task_assignments.md +30 -0
  94. package/docs/managers/tasks.md +30 -0
  95. package/docs/managers/terms_of_service_user_statuses.md +18 -0
  96. package/docs/managers/terms_of_services.md +24 -0
  97. package/docs/managers/transfer.md +7 -1
  98. package/docs/managers/trashed_files.md +18 -0
  99. package/docs/managers/trashed_folders.md +18 -0
  100. package/docs/managers/trashed_items.md +8 -0
  101. package/docs/managers/trashed_web_links.md +18 -0
  102. package/docs/managers/uploads.md +20 -2
  103. package/docs/managers/user_collaborations.md +24 -0
  104. package/docs/managers/users.md +38 -0
  105. package/docs/managers/web_links.md +24 -0
  106. package/docs/managers/webhooks.md +32 -0
  107. package/docs/managers/workflows.md +14 -0
  108. package/docs/managers/zip_downloads.md +18 -0
  109. package/package.json +3 -3
@@ -14,6 +14,14 @@ Reach these methods through the `signTemplates` field on `Client`.
14
14
 
15
15
  **Returns:** `SignTemplates`
16
16
 
17
+ **Example**
18
+
19
+ ```ts
20
+ for await (const item of client.signTemplates.list()) {
21
+ // use item
22
+ }
23
+ ```
24
+
17
25
  Paginated — `list(...)` is an async iterable that yields each entry across pages (`for await (const item of ...)`), threading the cursor for you. See the [pagination guide](../pagination.md).
18
26
 
19
27
  ## get
@@ -26,3 +34,9 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
26
34
 
27
35
  **Returns:** `SignTemplate`
28
36
 
37
+ **Example**
38
+
39
+ ```ts
40
+ const result = await client.signTemplates.get("TEMPLATE_ID");
41
+ ```
42
+
@@ -13,6 +13,12 @@ Reach these methods through the `skills` field on `Client`.
13
13
 
14
14
  **Returns:** `SkillCardsMetadata`
15
15
 
16
+ **Example**
17
+
18
+ ```ts
19
+ const result = await client.skills.get("FILE_ID");
20
+ ```
21
+
16
22
  ## update
17
23
 
18
24
  `PUT /files/{file_id}/metadata/global/boxSkillsCards`
@@ -25,6 +31,12 @@ Reach these methods through the `skills` field on `Client`.
25
31
 
26
32
  **Returns:** `SkillCardsMetadata`
27
33
 
34
+ **Example**
35
+
36
+ ```ts
37
+ const result = await client.skills.update("FILE_ID", []);
38
+ ```
39
+
28
40
  ## create
29
41
 
30
42
  `POST /files/{file_id}/metadata/global/boxSkillsCards`
@@ -37,6 +49,12 @@ Reach these methods through the `skills` field on `Client`.
37
49
 
38
50
  **Returns:** `SkillCardsMetadata`
39
51
 
52
+ **Example**
53
+
54
+ ```ts
55
+ const result = await client.skills.create("FILE_ID", { /* … */ });
56
+ ```
57
+
40
58
  ## delete_
41
59
 
42
60
  `DELETE /files/{file_id}/metadata/global/boxSkillsCards`
@@ -47,6 +65,12 @@ Reach these methods through the `skills` field on `Client`.
47
65
 
48
66
  **Returns:** `void`
49
67
 
68
+ **Example**
69
+
70
+ ```ts
71
+ await client.skills.delete_("FILE_ID");
72
+ ```
73
+
50
74
  ## updateSkillInvocation
51
75
 
52
76
  `PUT /skill_invocations/{skill_id}`
@@ -59,3 +83,9 @@ Reach these methods through the `skills` field on `Client`.
59
83
 
60
84
  **Returns:** `void`
61
85
 
86
+ **Example**
87
+
88
+ ```ts
89
+ await client.skills.updateSkillInvocation("SKILL_ID", { /* … */ });
90
+ ```
91
+
@@ -15,6 +15,14 @@ Reach these methods through the `storagePolicies` field on `Client`.
15
15
 
16
16
  **Returns:** `StoragePolicies`
17
17
 
18
+ **Example**
19
+
20
+ ```ts
21
+ for await (const item of client.storagePolicies.list()) {
22
+ // use item
23
+ }
24
+ ```
25
+
18
26
  Paginated — `list(...)` is an async iterable that yields each entry across pages (`for await (const item of ...)`), threading the cursor for you. See the [pagination guide](../pagination.md).
19
27
 
20
28
  ## get
@@ -27,3 +35,9 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
27
35
 
28
36
  **Returns:** `StoragePolicy`
29
37
 
38
+ **Example**
39
+
40
+ ```ts
41
+ const result = await client.storagePolicies.get("STORAGE_POLICY_ID");
42
+ ```
43
+
@@ -15,6 +15,14 @@ Reach these methods through the `storagePolicyAssignments` field on `Client`.
15
15
 
16
16
  **Returns:** `StoragePolicyAssignments`
17
17
 
18
+ **Example**
19
+
20
+ ```ts
21
+ for await (const item of client.storagePolicyAssignments.list("...", "RESOLVED_FOR_ID")) {
22
+ // use item
23
+ }
24
+ ```
25
+
18
26
  Paginated — `list(...)` is an async iterable that yields each entry across pages (`for await (const item of ...)`), threading the cursor for you. See the [pagination guide](../pagination.md).
19
27
 
20
28
  ## create
@@ -25,6 +33,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
25
33
 
26
34
  **Returns:** `StoragePolicyAssignment`
27
35
 
36
+ **Example**
37
+
38
+ ```ts
39
+ const result = await client.storagePolicyAssignments.create({ /* … */ });
40
+ ```
41
+
28
42
  ## get
29
43
 
30
44
  `GET /storage_policy_assignments/{storage_policy_assignment_id}`
@@ -35,6 +49,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
35
49
 
36
50
  **Returns:** `StoragePolicyAssignment`
37
51
 
52
+ **Example**
53
+
54
+ ```ts
55
+ const result = await client.storagePolicyAssignments.get("STORAGE_POLICY_ASSIGNMENT_ID");
56
+ ```
57
+
38
58
  ## update
39
59
 
40
60
  `PUT /storage_policy_assignments/{storage_policy_assignment_id}`
@@ -47,6 +67,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
47
67
 
48
68
  **Returns:** `StoragePolicyAssignment`
49
69
 
70
+ **Example**
71
+
72
+ ```ts
73
+ const result = await client.storagePolicyAssignments.update("STORAGE_POLICY_ASSIGNMENT_ID", { /* … */ });
74
+ ```
75
+
50
76
  ## delete_
51
77
 
52
78
  `DELETE /storage_policy_assignments/{storage_policy_assignment_id}`
@@ -57,3 +83,9 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
57
83
 
58
84
  **Returns:** `void`
59
85
 
86
+ **Example**
87
+
88
+ ```ts
89
+ await client.storagePolicyAssignments.delete_("STORAGE_POLICY_ASSIGNMENT_ID");
90
+ ```
91
+
@@ -13,6 +13,12 @@ Reach these methods through the `taskAssignments` field on `Client`.
13
13
 
14
14
  **Returns:** `TaskAssignments`
15
15
 
16
+ **Example**
17
+
18
+ ```ts
19
+ const result = await client.taskAssignments.listTaskAssignments("TASK_ID");
20
+ ```
21
+
16
22
  ## create
17
23
 
18
24
  `POST /task_assignments`
@@ -21,6 +27,12 @@ Reach these methods through the `taskAssignments` field on `Client`.
21
27
 
22
28
  **Returns:** `TaskAssignment`
23
29
 
30
+ **Example**
31
+
32
+ ```ts
33
+ const result = await client.taskAssignments.create({ /* … */ });
34
+ ```
35
+
24
36
  ## get
25
37
 
26
38
  `GET /task_assignments/{task_assignment_id}`
@@ -31,6 +43,12 @@ Reach these methods through the `taskAssignments` field on `Client`.
31
43
 
32
44
  **Returns:** `TaskAssignment`
33
45
 
46
+ **Example**
47
+
48
+ ```ts
49
+ const result = await client.taskAssignments.get("TASK_ASSIGNMENT_ID");
50
+ ```
51
+
34
52
  ## update
35
53
 
36
54
  `PUT /task_assignments/{task_assignment_id}`
@@ -43,6 +61,12 @@ Reach these methods through the `taskAssignments` field on `Client`.
43
61
 
44
62
  **Returns:** `TaskAssignment`
45
63
 
64
+ **Example**
65
+
66
+ ```ts
67
+ const result = await client.taskAssignments.update("TASK_ASSIGNMENT_ID", { /* … */ });
68
+ ```
69
+
46
70
  ## delete_
47
71
 
48
72
  `DELETE /task_assignments/{task_assignment_id}`
@@ -53,3 +77,9 @@ Reach these methods through the `taskAssignments` field on `Client`.
53
77
 
54
78
  **Returns:** `void`
55
79
 
80
+ **Example**
81
+
82
+ ```ts
83
+ await client.taskAssignments.delete_("TASK_ASSIGNMENT_ID");
84
+ ```
85
+
@@ -13,6 +13,12 @@ Reach these methods through the `tasks` field on `Client`.
13
13
 
14
14
  **Returns:** `Tasks`
15
15
 
16
+ **Example**
17
+
18
+ ```ts
19
+ const result = await client.tasks.listFile("FILE_ID");
20
+ ```
21
+
16
22
  ## create
17
23
 
18
24
  `POST /tasks`
@@ -21,6 +27,12 @@ Reach these methods through the `tasks` field on `Client`.
21
27
 
22
28
  **Returns:** `Task`
23
29
 
30
+ **Example**
31
+
32
+ ```ts
33
+ const result = await client.tasks.create({ /* … */ });
34
+ ```
35
+
24
36
  ## get
25
37
 
26
38
  `GET /tasks/{task_id}`
@@ -31,6 +43,12 @@ Reach these methods through the `tasks` field on `Client`.
31
43
 
32
44
  **Returns:** `Task`
33
45
 
46
+ **Example**
47
+
48
+ ```ts
49
+ const result = await client.tasks.get("TASK_ID");
50
+ ```
51
+
34
52
  ## update
35
53
 
36
54
  `PUT /tasks/{task_id}`
@@ -43,6 +61,12 @@ Reach these methods through the `tasks` field on `Client`.
43
61
 
44
62
  **Returns:** `Task`
45
63
 
64
+ **Example**
65
+
66
+ ```ts
67
+ const result = await client.tasks.update("TASK_ID", { /* … */ });
68
+ ```
69
+
46
70
  ## delete_
47
71
 
48
72
  `DELETE /tasks/{task_id}`
@@ -53,3 +77,9 @@ Reach these methods through the `tasks` field on `Client`.
53
77
 
54
78
  **Returns:** `void`
55
79
 
80
+ **Example**
81
+
82
+ ```ts
83
+ await client.tasks.delete_("TASK_ID");
84
+ ```
85
+
@@ -14,6 +14,12 @@ Reach these methods through the `termsOfServiceUserStatuses` field on `Client`.
14
14
 
15
15
  **Returns:** `TermsOfServiceUserStatuses`
16
16
 
17
+ **Example**
18
+
19
+ ```ts
20
+ const result = await client.termsOfServiceUserStatuses.list("TOS_ID");
21
+ ```
22
+
17
23
  ## create
18
24
 
19
25
  `POST /terms_of_service_user_statuses`
@@ -22,6 +28,12 @@ Reach these methods through the `termsOfServiceUserStatuses` field on `Client`.
22
28
 
23
29
  **Returns:** `TermsOfServiceUserStatus`
24
30
 
31
+ **Example**
32
+
33
+ ```ts
34
+ const result = await client.termsOfServiceUserStatuses.create({ /* … */ });
35
+ ```
36
+
25
37
  ## update
26
38
 
27
39
  `PUT /terms_of_service_user_statuses/{terms_of_service_user_status_id}`
@@ -34,3 +46,9 @@ Reach these methods through the `termsOfServiceUserStatuses` field on `Client`.
34
46
 
35
47
  **Returns:** `TermsOfServiceUserStatus`
36
48
 
49
+ **Example**
50
+
51
+ ```ts
52
+ const result = await client.termsOfServiceUserStatuses.update("TERMS_OF_SERVICE_USER_STATUS_ID", { /* … */ });
53
+ ```
54
+
@@ -13,6 +13,12 @@ Reach these methods through the `termsOfServices` field on `Client`.
13
13
 
14
14
  **Returns:** `TermsOfServices`
15
15
 
16
+ **Example**
17
+
18
+ ```ts
19
+ const result = await client.termsOfServices.list();
20
+ ```
21
+
16
22
  ## create
17
23
 
18
24
  `POST /terms_of_services`
@@ -21,6 +27,12 @@ Reach these methods through the `termsOfServices` field on `Client`.
21
27
 
22
28
  **Returns:** `TermsOfService`
23
29
 
30
+ **Example**
31
+
32
+ ```ts
33
+ const result = await client.termsOfServices.create({ /* … */ });
34
+ ```
35
+
24
36
  ## get
25
37
 
26
38
  `GET /terms_of_services/{terms_of_service_id}`
@@ -31,6 +43,12 @@ Reach these methods through the `termsOfServices` field on `Client`.
31
43
 
32
44
  **Returns:** `TermsOfService`
33
45
 
46
+ **Example**
47
+
48
+ ```ts
49
+ const result = await client.termsOfServices.get("TERMS_OF_SERVICE_ID");
50
+ ```
51
+
34
52
  ## update
35
53
 
36
54
  `PUT /terms_of_services/{terms_of_service_id}`
@@ -43,3 +61,9 @@ Reach these methods through the `termsOfServices` field on `Client`.
43
61
 
44
62
  **Returns:** `TermsOfService`
45
63
 
64
+ **Example**
65
+
66
+ ```ts
67
+ const result = await client.termsOfServices.update("TERMS_OF_SERVICE_ID", { /* … */ });
68
+ ```
69
+
@@ -3,7 +3,7 @@
3
3
 
4
4
  Reach these methods through the `transfer` field on `Client`.
5
5
 
6
- ## updateUserFolder0
6
+ ## transferFolders
7
7
 
8
8
  `PUT /users/{user_id}/folders/0`
9
9
 
@@ -17,3 +17,9 @@ Reach these methods through the `transfer` field on `Client`.
17
17
 
18
18
  **Returns:** `FolderFull`
19
19
 
20
+ **Example**
21
+
22
+ ```ts
23
+ const result = await client.transfer.transferFolders("USER_ID", { /* … */ });
24
+ ```
25
+
@@ -16,6 +16,12 @@ Reach these methods through the `trashedFiles` field on `Client`.
16
16
 
17
17
  **Returns:** `TrashFileRestored`
18
18
 
19
+ **Example**
20
+
21
+ ```ts
22
+ const result = await client.trashedFiles.createFile("FILE_ID", { /* … */ });
23
+ ```
24
+
19
25
  ## getFileTrash
20
26
 
21
27
  `GET /files/{file_id}/trash`
@@ -27,6 +33,12 @@ Reach these methods through the `trashedFiles` field on `Client`.
27
33
 
28
34
  **Returns:** `TrashFile`
29
35
 
36
+ **Example**
37
+
38
+ ```ts
39
+ const result = await client.trashedFiles.getFileTrash("FILE_ID");
40
+ ```
41
+
30
42
  ## deleteFileTrash
31
43
 
32
44
  `DELETE /files/{file_id}/trash`
@@ -37,3 +49,9 @@ Reach these methods through the `trashedFiles` field on `Client`.
37
49
 
38
50
  **Returns:** `void`
39
51
 
52
+ **Example**
53
+
54
+ ```ts
55
+ await client.trashedFiles.deleteFileTrash("FILE_ID");
56
+ ```
57
+
@@ -16,6 +16,12 @@ Reach these methods through the `trashedFolders` field on `Client`.
16
16
 
17
17
  **Returns:** `TrashFolderRestored`
18
18
 
19
+ **Example**
20
+
21
+ ```ts
22
+ const result = await client.trashedFolders.createFolder("FOLDER_ID", { /* … */ });
23
+ ```
24
+
19
25
  ## getFolderTrash
20
26
 
21
27
  `GET /folders/{folder_id}/trash`
@@ -27,6 +33,12 @@ Reach these methods through the `trashedFolders` field on `Client`.
27
33
 
28
34
  **Returns:** `TrashFolder`
29
35
 
36
+ **Example**
37
+
38
+ ```ts
39
+ const result = await client.trashedFolders.getFolderTrash("FOLDER_ID");
40
+ ```
41
+
30
42
  ## deleteFolderTrash
31
43
 
32
44
  `DELETE /folders/{folder_id}/trash`
@@ -37,3 +49,9 @@ Reach these methods through the `trashedFolders` field on `Client`.
37
49
 
38
50
  **Returns:** `void`
39
51
 
52
+ **Example**
53
+
54
+ ```ts
55
+ await client.trashedFolders.deleteFolderTrash("FOLDER_ID");
56
+ ```
57
+
@@ -19,5 +19,13 @@ Reach these methods through the `trashedItems` field on `Client`.
19
19
 
20
20
  **Returns:** `Items`
21
21
 
22
+ **Example**
23
+
24
+ ```ts
25
+ for await (const item of client.trashedItems.listFolderTrashItems()) {
26
+ // use item
27
+ }
28
+ ```
29
+
22
30
  Paginated — `listFolderTrashItems(...)` is an async iterable that yields each entry across pages (`for await (const item of ...)`), threading the cursor for you. See the [pagination guide](../pagination.md).
23
31
 
@@ -16,6 +16,12 @@ Reach these methods through the `trashedWebLinks` field on `Client`.
16
16
 
17
17
  **Returns:** `TrashWebLinkRestored`
18
18
 
19
+ **Example**
20
+
21
+ ```ts
22
+ const result = await client.trashedWebLinks.createWebLink("WEB_LINK_ID", { /* … */ });
23
+ ```
24
+
19
25
  ## getWebLinkTrash
20
26
 
21
27
  `GET /web_links/{web_link_id}/trash`
@@ -27,6 +33,12 @@ Reach these methods through the `trashedWebLinks` field on `Client`.
27
33
 
28
34
  **Returns:** `TrashWebLink`
29
35
 
36
+ **Example**
37
+
38
+ ```ts
39
+ const result = await client.trashedWebLinks.getWebLinkTrash("WEB_LINK_ID");
40
+ ```
41
+
30
42
  ## deleteWebLinkTrash
31
43
 
32
44
  `DELETE /web_links/{web_link_id}/trash`
@@ -37,3 +49,9 @@ Reach these methods through the `trashedWebLinks` field on `Client`.
37
49
 
38
50
  **Returns:** `void`
39
51
 
52
+ **Example**
53
+
54
+ ```ts
55
+ await client.trashedWebLinks.deleteWebLinkTrash("WEB_LINK_ID");
56
+ ```
57
+
@@ -3,7 +3,7 @@
3
3
 
4
4
  Reach these methods through the `uploads` field on `Client`.
5
5
 
6
- ## createFileContent
6
+ ## uploadFileVersion
7
7
 
8
8
  `POST /files/{file_id}/content`
9
9
 
@@ -18,7 +18,13 @@ Reach these methods through the `uploads` field on `Client`.
18
18
 
19
19
  **Returns:** `Files`
20
20
 
21
- ## createFileContent2
21
+ **Example**
22
+
23
+ ```ts
24
+ const result = await client.uploads.uploadFileVersion("FILE_ID", { /* … */ });
25
+ ```
26
+
27
+ ## uploadFile
22
28
 
23
29
  `POST /files/content`
24
30
 
@@ -31,6 +37,12 @@ Reach these methods through the `uploads` field on `Client`.
31
37
 
32
38
  **Returns:** `Files`
33
39
 
40
+ **Example**
41
+
42
+ ```ts
43
+ const result = await client.uploads.uploadFile({ /* … */ });
44
+ ```
45
+
34
46
  ## optionFileContent
35
47
 
36
48
  `OPTIONS /files/content`
@@ -39,3 +51,9 @@ Reach these methods through the `uploads` field on `Client`.
39
51
 
40
52
  **Returns:** `UploadUrl`
41
53
 
54
+ **Example**
55
+
56
+ ```ts
57
+ const result = await client.uploads.optionFileContent({ /* … */ });
58
+ ```
59
+
@@ -14,6 +14,12 @@ Reach these methods through the `userCollaborations` field on `Client`.
14
14
 
15
15
  **Returns:** `Collaboration`
16
16
 
17
+ **Example**
18
+
19
+ ```ts
20
+ const result = await client.userCollaborations.getCollaboration("COLLABORATION_ID");
21
+ ```
22
+
17
23
  ## updateCollaboration
18
24
 
19
25
  `PUT /collaborations/{collaboration_id}`
@@ -26,6 +32,12 @@ Reach these methods through the `userCollaborations` field on `Client`.
26
32
 
27
33
  **Returns:** `Collaboration`
28
34
 
35
+ **Example**
36
+
37
+ ```ts
38
+ const result = await client.userCollaborations.updateCollaboration("COLLABORATION_ID", { /* … */ });
39
+ ```
40
+
29
41
  ## deleteCollaboration
30
42
 
31
43
  `DELETE /collaborations/{collaboration_id}`
@@ -36,6 +48,12 @@ Reach these methods through the `userCollaborations` field on `Client`.
36
48
 
37
49
  **Returns:** `void`
38
50
 
51
+ **Example**
52
+
53
+ ```ts
54
+ await client.userCollaborations.deleteCollaboration("COLLABORATION_ID");
55
+ ```
56
+
39
57
  ## createCollaborations
40
58
 
41
59
  `POST /collaborations`
@@ -49,3 +67,9 @@ Reach these methods through the `userCollaborations` field on `Client`.
49
67
 
50
68
  **Returns:** `Collaboration`
51
69
 
70
+ **Example**
71
+
72
+ ```ts
73
+ const result = await client.userCollaborations.createCollaborations({ /* … */ });
74
+ ```
75
+
@@ -20,6 +20,14 @@ Reach these methods through the `users` field on `Client`.
20
20
 
21
21
  **Returns:** `Users`
22
22
 
23
+ **Example**
24
+
25
+ ```ts
26
+ for await (const item of client.users.list()) {
27
+ // use item
28
+ }
29
+ ```
30
+
23
31
  Paginated — `list(...)` is an async iterable that yields each entry across pages (`for await (const item of ...)`), threading the cursor for you. See the [pagination guide](../pagination.md).
24
32
 
25
33
  ## create
@@ -34,6 +42,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
34
42
 
35
43
  **Returns:** `UserFull`
36
44
 
45
+ **Example**
46
+
47
+ ```ts
48
+ const result = await client.users.create({ /* … */ });
49
+ ```
50
+
37
51
  ## getMe
38
52
 
39
53
  `GET /users/me`
@@ -44,6 +58,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
44
58
 
45
59
  **Returns:** `UserFull`
46
60
 
61
+ **Example**
62
+
63
+ ```ts
64
+ const result = await client.users.getMe();
65
+ ```
66
+
47
67
  ## get
48
68
 
49
69
  `GET /users/{user_id}`
@@ -55,6 +75,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
55
75
 
56
76
  **Returns:** `UserFull`
57
77
 
78
+ **Example**
79
+
80
+ ```ts
81
+ const result = await client.users.get("USER_ID");
82
+ ```
83
+
58
84
  ## update
59
85
 
60
86
  `PUT /users/{user_id}`
@@ -68,6 +94,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
68
94
 
69
95
  **Returns:** `UserFull`
70
96
 
97
+ **Example**
98
+
99
+ ```ts
100
+ const result = await client.users.update("USER_ID", { /* … */ });
101
+ ```
102
+
71
103
  ## delete_
72
104
 
73
105
  `DELETE /users/{user_id}`
@@ -80,3 +112,9 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
80
112
 
81
113
  **Returns:** `void`
82
114
 
115
+ **Example**
116
+
117
+ ```ts
118
+ await client.users.delete_("USER_ID");
119
+ ```
120
+