@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
@@ -13,6 +13,12 @@ Reach these methods through the `folderLocks` field on `Client`.
13
13
 
14
14
  **Returns:** `FolderLocks`
15
15
 
16
+ **Example**
17
+
18
+ ```ts
19
+ const result = await client.folderLocks.list("FOLDER_ID");
20
+ ```
21
+
16
22
  ## create
17
23
 
18
24
  `POST /folder_locks`
@@ -21,6 +27,12 @@ Reach these methods through the `folderLocks` field on `Client`.
21
27
 
22
28
  **Returns:** `FolderLock`
23
29
 
30
+ **Example**
31
+
32
+ ```ts
33
+ const result = await client.folderLocks.create({ /* … */ });
34
+ ```
35
+
24
36
  ## delete_
25
37
 
26
38
  `DELETE /folder_locks/{folder_lock_id}`
@@ -31,3 +43,9 @@ Reach these methods through the `folderLocks` field on `Client`.
31
43
 
32
44
  **Returns:** `void`
33
45
 
46
+ **Example**
47
+
48
+ ```ts
49
+ await client.folderLocks.delete_("FOLDER_LOCK_ID");
50
+ ```
51
+
@@ -14,6 +14,12 @@ Reach these methods through the `folderMetadata` field on `Client`.
14
14
 
15
15
  **Returns:** `Metadatas`
16
16
 
17
+ **Example**
18
+
19
+ ```ts
20
+ const result = await client.folderMetadata.listFolderMetadata("FOLDER_ID");
21
+ ```
22
+
17
23
  ## getFolderMetadata
18
24
 
19
25
  `GET /folders/{folder_id}/metadata/{scope}/{template_key}`
@@ -26,6 +32,12 @@ Reach these methods through the `folderMetadata` field on `Client`.
26
32
 
27
33
  **Returns:** `MetadataFull`
28
34
 
35
+ **Example**
36
+
37
+ ```ts
38
+ const result = await client.folderMetadata.getFolderMetadata("FOLDER_ID", "...", "TEMPLATE_KEY");
39
+ ```
40
+
29
41
  ## updateFolderMetadata
30
42
 
31
43
  `PUT /folders/{folder_id}/metadata/{scope}/{template_key}`
@@ -40,6 +52,12 @@ Reach these methods through the `folderMetadata` field on `Client`.
40
52
 
41
53
  **Returns:** `MetadataFull`
42
54
 
55
+ **Example**
56
+
57
+ ```ts
58
+ const result = await client.folderMetadata.updateFolderMetadata("FOLDER_ID", "...", "TEMPLATE_KEY", []);
59
+ ```
60
+
43
61
  ## createFolderMetadata
44
62
 
45
63
  `POST /folders/{folder_id}/metadata/{scope}/{template_key}`
@@ -54,6 +72,12 @@ Reach these methods through the `folderMetadata` field on `Client`.
54
72
 
55
73
  **Returns:** `MetadataFull`
56
74
 
75
+ **Example**
76
+
77
+ ```ts
78
+ const result = await client.folderMetadata.createFolderMetadata("FOLDER_ID", "...", "TEMPLATE_KEY", { /* … */ });
79
+ ```
80
+
57
81
  ## deleteFolderMetadata
58
82
 
59
83
  `DELETE /folders/{folder_id}/metadata/{scope}/{template_key}`
@@ -66,3 +90,9 @@ Reach these methods through the `folderMetadata` field on `Client`.
66
90
 
67
91
  **Returns:** `void`
68
92
 
93
+ **Example**
94
+
95
+ ```ts
96
+ await client.folderMetadata.deleteFolderMetadata("FOLDER_ID", "...", "TEMPLATE_KEY");
97
+ ```
98
+
@@ -13,6 +13,12 @@ Reach these methods through the `folderWatermarks` field on `Client`.
13
13
 
14
14
  **Returns:** `Watermark`
15
15
 
16
+ **Example**
17
+
18
+ ```ts
19
+ const result = await client.folderWatermarks.getFolderWatermark("FOLDER_ID");
20
+ ```
21
+
16
22
  ## updateFolderWatermark
17
23
 
18
24
  `PUT /folders/{folder_id}/watermark`
@@ -25,6 +31,12 @@ Reach these methods through the `folderWatermarks` field on `Client`.
25
31
 
26
32
  **Returns:** `Watermark`
27
33
 
34
+ **Example**
35
+
36
+ ```ts
37
+ const result = await client.folderWatermarks.updateFolderWatermark("FOLDER_ID", { /* … */ });
38
+ ```
39
+
28
40
  ## deleteFolderWatermark
29
41
 
30
42
  `DELETE /folders/{folder_id}/watermark`
@@ -35,3 +47,9 @@ Reach these methods through the `folderWatermarks` field on `Client`.
35
47
 
36
48
  **Returns:** `void`
37
49
 
50
+ **Example**
51
+
52
+ ```ts
53
+ await client.folderWatermarks.deleteFolderWatermark("FOLDER_ID");
54
+ ```
55
+
@@ -20,6 +20,12 @@ Reach these methods through the `folders` field on `Client`.
20
20
 
21
21
  **Returns:** `FolderFull`
22
22
 
23
+ **Example**
24
+
25
+ ```ts
26
+ const result = await client.folders.get("FOLDER_ID");
27
+ ```
28
+
23
29
  ## update
24
30
 
25
31
  `PUT /folders/{folder_id}`
@@ -34,6 +40,12 @@ Reach these methods through the `folders` field on `Client`.
34
40
 
35
41
  **Returns:** `FolderFull`
36
42
 
43
+ **Example**
44
+
45
+ ```ts
46
+ const result = await client.folders.update("FOLDER_ID", { /* … */ });
47
+ ```
48
+
37
49
  ## delete_
38
50
 
39
51
  `DELETE /folders/{folder_id}`
@@ -46,6 +58,12 @@ Reach these methods through the `folders` field on `Client`.
46
58
 
47
59
  **Returns:** `void`
48
60
 
61
+ **Example**
62
+
63
+ ```ts
64
+ await client.folders.delete_("FOLDER_ID");
65
+ ```
66
+
49
67
  ## listItems
50
68
 
51
69
  `GET /folders/{folder_id}/items`
@@ -64,6 +82,14 @@ Reach these methods through the `folders` field on `Client`.
64
82
 
65
83
  **Returns:** `Items`
66
84
 
85
+ **Example**
86
+
87
+ ```ts
88
+ for await (const item of client.folders.listItems("FOLDER_ID")) {
89
+ // use item
90
+ }
91
+ ```
92
+
67
93
  Paginated — `listItems(...)` 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).
68
94
 
69
95
  ## create
@@ -78,6 +104,12 @@ Paginated — `listItems(...)` is an async iterable that yields each entry acros
78
104
 
79
105
  **Returns:** `FolderFull`
80
106
 
107
+ **Example**
108
+
109
+ ```ts
110
+ const result = await client.folders.create({ /* … */ });
111
+ ```
112
+
81
113
  ## copy
82
114
 
83
115
  `POST /folders/{folder_id}/copy`
@@ -91,3 +123,9 @@ Paginated — `listItems(...)` is an async iterable that yields each entry acros
91
123
 
92
124
  **Returns:** `FolderFull`
93
125
 
126
+ **Example**
127
+
128
+ ```ts
129
+ const result = await client.folders.copy("FOLDER_ID", { /* … */ });
130
+ ```
131
+
@@ -16,6 +16,14 @@ Reach these methods through the `groups` field on `Client`.
16
16
 
17
17
  **Returns:** `Groups`
18
18
 
19
+ **Example**
20
+
21
+ ```ts
22
+ for await (const item of client.groups.list()) {
23
+ // use item
24
+ }
25
+ ```
26
+
19
27
  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).
20
28
 
21
29
  ## create
@@ -30,6 +38,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
30
38
 
31
39
  **Returns:** `GroupFull`
32
40
 
41
+ **Example**
42
+
43
+ ```ts
44
+ const result = await client.groups.create({ /* … */ });
45
+ ```
46
+
33
47
  ## get
34
48
 
35
49
  `GET /groups/{group_id}`
@@ -41,6 +55,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
41
55
 
42
56
  **Returns:** `GroupFull`
43
57
 
58
+ **Example**
59
+
60
+ ```ts
61
+ const result = await client.groups.get("GROUP_ID");
62
+ ```
63
+
44
64
  ## update
45
65
 
46
66
  `PUT /groups/{group_id}`
@@ -54,6 +74,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
54
74
 
55
75
  **Returns:** `GroupFull`
56
76
 
77
+ **Example**
78
+
79
+ ```ts
80
+ const result = await client.groups.update("GROUP_ID", { /* … */ });
81
+ ```
82
+
57
83
  ## delete_
58
84
 
59
85
  `DELETE /groups/{group_id}`
@@ -64,3 +90,9 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
64
90
 
65
91
  **Returns:** `void`
66
92
 
93
+ **Example**
94
+
95
+ ```ts
96
+ await client.groups.delete_("GROUP_ID");
97
+ ```
98
+
@@ -15,6 +15,14 @@ Reach these methods through the `hubCollaborations` field on `Client`.
15
15
 
16
16
  **Returns:** `HubCollaborations`
17
17
 
18
+ **Example**
19
+
20
+ ```ts
21
+ for await (const item of client.hubCollaborations.list("HUB_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:** `HubCollaboration`
27
35
 
36
+ **Example**
37
+
38
+ ```ts
39
+ const result = await client.hubCollaborations.create({ /* … */ });
40
+ ```
41
+
28
42
  ## get
29
43
 
30
44
  `GET /hub_collaborations/{hub_collaboration_id}`
@@ -35,6 +49,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
35
49
 
36
50
  **Returns:** `HubCollaboration`
37
51
 
52
+ **Example**
53
+
54
+ ```ts
55
+ const result = await client.hubCollaborations.get("HUB_COLLABORATION_ID");
56
+ ```
57
+
38
58
  ## update
39
59
 
40
60
  `PUT /hub_collaborations/{hub_collaboration_id}`
@@ -47,6 +67,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
47
67
 
48
68
  **Returns:** `HubCollaboration`
49
69
 
70
+ **Example**
71
+
72
+ ```ts
73
+ const result = await client.hubCollaborations.update("HUB_COLLABORATION_ID", { /* … */ });
74
+ ```
75
+
50
76
  ## delete_
51
77
 
52
78
  `DELETE /hub_collaborations/{hub_collaboration_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.hubCollaborations.delete_("HUB_COLLABORATION_ID");
90
+ ```
91
+
@@ -15,6 +15,14 @@ Reach these methods through the `hubDocument` field on `Client`.
15
15
 
16
16
  **Returns:** `HubDocumentPages`
17
17
 
18
+ **Example**
19
+
20
+ ```ts
21
+ for await (const item of client.hubDocument.listPages("HUB_ID")) {
22
+ // use item
23
+ }
24
+ ```
25
+
18
26
  Paginated — `listPages(...)` 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
  ## listBlocks
@@ -30,5 +38,13 @@ Paginated — `listPages(...)` is an async iterable that yields each entry acros
30
38
 
31
39
  **Returns:** `HubDocumentBlocks`
32
40
 
41
+ **Example**
42
+
43
+ ```ts
44
+ for await (const item of client.hubDocument.listBlocks("HUB_ID", "PAGE_ID")) {
45
+ // use item
46
+ }
47
+ ```
48
+
33
49
  Paginated — `listBlocks(...)` 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).
34
50
 
@@ -16,6 +16,14 @@ Reach these methods through the `hubItems` field on `Client`.
16
16
 
17
17
  **Returns:** `HubItems`
18
18
 
19
+ **Example**
20
+
21
+ ```ts
22
+ for await (const item of client.hubItems.list("HUB_ID")) {
23
+ // use item
24
+ }
25
+ ```
26
+
19
27
  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).
20
28
 
21
29
  ## createHubManageItems
@@ -30,3 +38,9 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
30
38
 
31
39
  **Returns:** `HubItemsManageResponse`
32
40
 
41
+ **Example**
42
+
43
+ ```ts
44
+ const result = await client.hubItems.createHubManageItems("HUB_ID", { /* … */ });
45
+ ```
46
+
@@ -18,6 +18,14 @@ Reach these methods through the `hubs` field on `Client`.
18
18
 
19
19
  **Returns:** `Hubs`
20
20
 
21
+ **Example**
22
+
23
+ ```ts
24
+ for await (const item of client.hubs.list()) {
25
+ // use item
26
+ }
27
+ ```
28
+
21
29
  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).
22
30
 
23
31
  ## create
@@ -28,6 +36,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
28
36
 
29
37
  **Returns:** `Hub`
30
38
 
39
+ **Example**
40
+
41
+ ```ts
42
+ const result = await client.hubs.create({ /* … */ });
43
+ ```
44
+
31
45
  ## listEnterprise
32
46
 
33
47
  `GET /enterprise_hubs`
@@ -42,6 +56,14 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
42
56
 
43
57
  **Returns:** `Hubs`
44
58
 
59
+ **Example**
60
+
61
+ ```ts
62
+ for await (const item of client.hubs.listEnterprise()) {
63
+ // use item
64
+ }
65
+ ```
66
+
45
67
  Paginated — `listEnterprise(...)` 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).
46
68
 
47
69
  ## get
@@ -54,6 +76,12 @@ Paginated — `listEnterprise(...)` is an async iterable that yields each entry
54
76
 
55
77
  **Returns:** `Hub`
56
78
 
79
+ **Example**
80
+
81
+ ```ts
82
+ const result = await client.hubs.get("HUB_ID");
83
+ ```
84
+
57
85
  ## update
58
86
 
59
87
  `PUT /hubs/{hub_id}`
@@ -66,6 +94,12 @@ Paginated — `listEnterprise(...)` is an async iterable that yields each entry
66
94
 
67
95
  **Returns:** `Hub`
68
96
 
97
+ **Example**
98
+
99
+ ```ts
100
+ const result = await client.hubs.update("HUB_ID", { /* … */ });
101
+ ```
102
+
69
103
  ## delete_
70
104
 
71
105
  `DELETE /hubs/{hub_id}`
@@ -76,6 +110,12 @@ Paginated — `listEnterprise(...)` is an async iterable that yields each entry
76
110
 
77
111
  **Returns:** `void`
78
112
 
113
+ **Example**
114
+
115
+ ```ts
116
+ await client.hubs.delete_("HUB_ID");
117
+ ```
118
+
79
119
  ## copy
80
120
 
81
121
  `POST /hubs/{hub_id}/copy`
@@ -88,3 +128,9 @@ Paginated — `listEnterprise(...)` is an async iterable that yields each entry
88
128
 
89
129
  **Returns:** `Hub`
90
130
 
131
+ **Example**
132
+
133
+ ```ts
134
+ const result = await client.hubs.copy("HUB_ID", { /* … */ });
135
+ ```
136
+
@@ -19,6 +19,14 @@ Reach these methods through the `integrationMappings` field on `Client`.
19
19
 
20
20
  **Returns:** `IntegrationMappings`
21
21
 
22
+ **Example**
23
+
24
+ ```ts
25
+ for await (const item of client.integrationMappings.listSlack()) {
26
+ // use item
27
+ }
28
+ ```
29
+
22
30
  Paginated — `listSlack(...)` 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
 
24
32
  ## createSlack
@@ -29,6 +37,12 @@ Paginated — `listSlack(...)` is an async iterable that yields each entry acros
29
37
 
30
38
  **Returns:** `IntegrationMapping`
31
39
 
40
+ **Example**
41
+
42
+ ```ts
43
+ const result = await client.integrationMappings.createSlack({ /* … */ });
44
+ ```
45
+
32
46
  ## updateSlack
33
47
 
34
48
  `PUT /integration_mappings/slack/{integration_mapping_id}`
@@ -41,6 +55,12 @@ Paginated — `listSlack(...)` is an async iterable that yields each entry acros
41
55
 
42
56
  **Returns:** `IntegrationMapping`
43
57
 
58
+ **Example**
59
+
60
+ ```ts
61
+ const result = await client.integrationMappings.updateSlack("INTEGRATION_MAPPING_ID", { /* … */ });
62
+ ```
63
+
44
64
  ## deleteSlack
45
65
 
46
66
  `DELETE /integration_mappings/slack/{integration_mapping_id}`
@@ -51,6 +71,12 @@ Paginated — `listSlack(...)` is an async iterable that yields each entry acros
51
71
 
52
72
  **Returns:** `void`
53
73
 
74
+ **Example**
75
+
76
+ ```ts
77
+ await client.integrationMappings.deleteSlack("INTEGRATION_MAPPING_ID");
78
+ ```
79
+
54
80
  ## listTeams
55
81
 
56
82
  `GET /integration_mappings/teams`
@@ -64,6 +90,12 @@ Paginated — `listSlack(...)` is an async iterable that yields each entry acros
64
90
 
65
91
  **Returns:** `IntegrationMappingsTeams`
66
92
 
93
+ **Example**
94
+
95
+ ```ts
96
+ const result = await client.integrationMappings.listTeams();
97
+ ```
98
+
67
99
  ## createTeams
68
100
 
69
101
  `POST /integration_mappings/teams`
@@ -72,6 +104,12 @@ Paginated — `listSlack(...)` is an async iterable that yields each entry acros
72
104
 
73
105
  **Returns:** `IntegrationMappingTeams`
74
106
 
107
+ **Example**
108
+
109
+ ```ts
110
+ const result = await client.integrationMappings.createTeams({ /* … */ });
111
+ ```
112
+
75
113
  ## updateTeam
76
114
 
77
115
  `PUT /integration_mappings/teams/{integration_mapping_id}`
@@ -84,6 +122,12 @@ Paginated — `listSlack(...)` is an async iterable that yields each entry acros
84
122
 
85
123
  **Returns:** `IntegrationMappingTeams`
86
124
 
125
+ **Example**
126
+
127
+ ```ts
128
+ const result = await client.integrationMappings.updateTeam("INTEGRATION_MAPPING_ID", { /* … */ });
129
+ ```
130
+
87
131
  ## deleteTeam
88
132
 
89
133
  `DELETE /integration_mappings/teams/{integration_mapping_id}`
@@ -94,3 +138,9 @@ Paginated — `listSlack(...)` is an async iterable that yields each entry acros
94
138
 
95
139
  **Returns:** `void`
96
140
 
141
+ **Example**
142
+
143
+ ```ts
144
+ await client.integrationMappings.deleteTeam("INTEGRATION_MAPPING_ID");
145
+ ```
146
+
@@ -15,6 +15,12 @@ Reach these methods through the `invites` field on `Client`.
15
15
 
16
16
  **Returns:** `Invite`
17
17
 
18
+ **Example**
19
+
20
+ ```ts
21
+ const result = await client.invites.create({ /* … */ });
22
+ ```
23
+
18
24
  ## get
19
25
 
20
26
  `GET /invites/{invite_id}`
@@ -26,3 +32,9 @@ Reach these methods through the `invites` field on `Client`.
26
32
 
27
33
  **Returns:** `Invite`
28
34
 
35
+ **Example**
36
+
37
+ ```ts
38
+ const result = await client.invites.get("INVITE_ID");
39
+ ```
40
+
@@ -16,6 +16,14 @@ Reach these methods through the `legalHoldPolicies` field on `Client`.
16
16
 
17
17
  **Returns:** `LegalHoldPolicies`
18
18
 
19
+ **Example**
20
+
21
+ ```ts
22
+ for await (const item of client.legalHoldPolicies.list()) {
23
+ // use item
24
+ }
25
+ ```
26
+
19
27
  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).
20
28
 
21
29
  ## create
@@ -26,6 +34,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
26
34
 
27
35
  **Returns:** `LegalHoldPolicy`
28
36
 
37
+ **Example**
38
+
39
+ ```ts
40
+ const result = await client.legalHoldPolicies.create({ /* … */ });
41
+ ```
42
+
29
43
  ## get
30
44
 
31
45
  `GET /legal_hold_policies/{legal_hold_policy_id}`
@@ -36,6 +50,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
36
50
 
37
51
  **Returns:** `LegalHoldPolicy`
38
52
 
53
+ **Example**
54
+
55
+ ```ts
56
+ const result = await client.legalHoldPolicies.get("LEGAL_HOLD_POLICY_ID");
57
+ ```
58
+
39
59
  ## update
40
60
 
41
61
  `PUT /legal_hold_policies/{legal_hold_policy_id}`
@@ -48,6 +68,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
48
68
 
49
69
  **Returns:** `LegalHoldPolicy`
50
70
 
71
+ **Example**
72
+
73
+ ```ts
74
+ const result = await client.legalHoldPolicies.update("LEGAL_HOLD_POLICY_ID", { /* … */ });
75
+ ```
76
+
51
77
  ## delete_
52
78
 
53
79
  `DELETE /legal_hold_policies/{legal_hold_policy_id}`
@@ -58,3 +84,9 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
58
84
 
59
85
  **Returns:** `void`
60
86
 
87
+ **Example**
88
+
89
+ ```ts
90
+ await client.legalHoldPolicies.delete_("LEGAL_HOLD_POLICY_ID");
91
+ ```
92
+