@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
@@ -18,6 +18,14 @@ Reach these methods through the `legalHoldPolicyAssignments` field on `Client`.
18
18
 
19
19
  **Returns:** `LegalHoldPolicyAssignments`
20
20
 
21
+ **Example**
22
+
23
+ ```ts
24
+ for await (const item of client.legalHoldPolicyAssignments.list("POLICY_ID")) {
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:** `LegalHoldPolicyAssignment`
30
38
 
39
+ **Example**
40
+
41
+ ```ts
42
+ const result = await client.legalHoldPolicyAssignments.create({ /* … */ });
43
+ ```
44
+
31
45
  ## get
32
46
 
33
47
  `GET /legal_hold_policy_assignments/{legal_hold_policy_assignment_id}`
@@ -38,6 +52,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
38
52
 
39
53
  **Returns:** `LegalHoldPolicyAssignment`
40
54
 
55
+ **Example**
56
+
57
+ ```ts
58
+ const result = await client.legalHoldPolicyAssignments.get("LEGAL_HOLD_POLICY_ASSIGNMENT_ID");
59
+ ```
60
+
41
61
  ## delete_
42
62
 
43
63
  `DELETE /legal_hold_policy_assignments/{legal_hold_policy_assignment_id}`
@@ -48,6 +68,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
48
68
 
49
69
  **Returns:** `void`
50
70
 
71
+ **Example**
72
+
73
+ ```ts
74
+ await client.legalHoldPolicyAssignments.delete_("LEGAL_HOLD_POLICY_ASSIGNMENT_ID");
75
+ ```
76
+
51
77
  ## listFileOnHold
52
78
 
53
79
  `GET /legal_hold_policy_assignments/{legal_hold_policy_assignment_id}/files_on_hold`
@@ -61,6 +87,14 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
61
87
 
62
88
  **Returns:** `FilesOnHold`
63
89
 
90
+ **Example**
91
+
92
+ ```ts
93
+ for await (const item of client.legalHoldPolicyAssignments.listFileOnHold("LEGAL_HOLD_POLICY_ASSIGNMENT_ID")) {
94
+ // use item
95
+ }
96
+ ```
97
+
64
98
  Paginated — `listFileOnHold(...)` 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).
65
99
 
66
100
  ## listFileVersionOnHold
@@ -76,5 +110,13 @@ Paginated — `listFileOnHold(...)` is an async iterable that yields each entry
76
110
 
77
111
  **Returns:** `FileVersionsOnHold`
78
112
 
113
+ **Example**
114
+
115
+ ```ts
116
+ for await (const item of client.legalHoldPolicyAssignments.listFileVersionOnHold("LEGAL_HOLD_POLICY_ASSIGNMENT_ID")) {
117
+ // use item
118
+ }
119
+ ```
120
+
79
121
  Paginated — `listFileVersionOnHold(...)` 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).
80
122
 
@@ -16,6 +16,14 @@ Reach these methods through the `listCollaborations` field on `Client`.
16
16
 
17
17
  **Returns:** `Collaborations`
18
18
 
19
+ **Example**
20
+
21
+ ```ts
22
+ for await (const item of client.listCollaborations.listFileCollaborations("FILE_ID")) {
23
+ // use item
24
+ }
25
+ ```
26
+
19
27
  Paginated — `listFileCollaborations(...)` 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
  ## listFolderCollaborations
@@ -31,6 +39,14 @@ Paginated — `listFileCollaborations(...)` is an async iterable that yields eac
31
39
 
32
40
  **Returns:** `Collaborations`
33
41
 
42
+ **Example**
43
+
44
+ ```ts
45
+ for await (const item of client.listCollaborations.listFolderCollaborations("FOLDER_ID")) {
46
+ // use item
47
+ }
48
+ ```
49
+
34
50
  Paginated — `listFolderCollaborations(...)` 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).
35
51
 
36
52
  ## listCollaborations
@@ -46,6 +62,14 @@ Paginated — `listFolderCollaborations(...)` is an async iterable that yields e
46
62
 
47
63
  **Returns:** `CollaborationsOffsetPaginated`
48
64
 
65
+ **Example**
66
+
67
+ ```ts
68
+ for await (const item of client.listCollaborations.listCollaborations("...")) {
69
+ // use item
70
+ }
71
+ ```
72
+
49
73
  Paginated — `listCollaborations(...)` 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).
50
74
 
51
75
  ## listGroupCollaborations
@@ -60,5 +84,13 @@ Paginated — `listCollaborations(...)` is an async iterable that yields each en
60
84
 
61
85
  **Returns:** `CollaborationsOffsetPaginated`
62
86
 
87
+ **Example**
88
+
89
+ ```ts
90
+ for await (const item of client.listCollaborations.listGroupCollaborations("GROUP_ID")) {
91
+ // use item
92
+ }
93
+ ```
94
+
63
95
  Paginated — `listGroupCollaborations(...)` 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).
64
96
 
@@ -15,6 +15,14 @@ Reach these methods through the `memberships` field on `Client`.
15
15
 
16
16
  **Returns:** `GroupMemberships`
17
17
 
18
+ **Example**
19
+
20
+ ```ts
21
+ for await (const item of client.memberships.listUser("USER_ID")) {
22
+ // use item
23
+ }
24
+ ```
25
+
18
26
  Paginated — `listUser(...)` 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
  ## listGroup
@@ -29,6 +37,14 @@ Paginated — `listUser(...)` is an async iterable that yields each entry across
29
37
 
30
38
  **Returns:** `GroupMemberships`
31
39
 
40
+ **Example**
41
+
42
+ ```ts
43
+ for await (const item of client.memberships.listGroup("GROUP_ID")) {
44
+ // use item
45
+ }
46
+ ```
47
+
32
48
  Paginated — `listGroup(...)` 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).
33
49
 
34
50
  ## createGroup
@@ -43,6 +59,12 @@ Paginated — `listGroup(...)` is an async iterable that yields each entry acros
43
59
 
44
60
  **Returns:** `GroupMembership`
45
61
 
62
+ **Example**
63
+
64
+ ```ts
65
+ const result = await client.memberships.createGroup({ /* … */ });
66
+ ```
67
+
46
68
  ## getGroup
47
69
 
48
70
  `GET /group_memberships/{group_membership_id}`
@@ -54,6 +76,12 @@ Paginated — `listGroup(...)` is an async iterable that yields each entry acros
54
76
 
55
77
  **Returns:** `GroupMembership`
56
78
 
79
+ **Example**
80
+
81
+ ```ts
82
+ const result = await client.memberships.getGroup("GROUP_MEMBERSHIP_ID");
83
+ ```
84
+
57
85
  ## updateGroup
58
86
 
59
87
  `PUT /group_memberships/{group_membership_id}`
@@ -67,6 +95,12 @@ Paginated — `listGroup(...)` is an async iterable that yields each entry acros
67
95
 
68
96
  **Returns:** `GroupMembership`
69
97
 
98
+ **Example**
99
+
100
+ ```ts
101
+ const result = await client.memberships.updateGroup("GROUP_MEMBERSHIP_ID", { /* … */ });
102
+ ```
103
+
70
104
  ## deleteGroup
71
105
 
72
106
  `DELETE /group_memberships/{group_membership_id}`
@@ -77,3 +111,9 @@ Paginated — `listGroup(...)` is an async iterable that yields each entry acros
77
111
 
78
112
  **Returns:** `void`
79
113
 
114
+ **Example**
115
+
116
+ ```ts
117
+ await client.memberships.deleteGroup("GROUP_MEMBERSHIP_ID");
118
+ ```
119
+
@@ -16,6 +16,14 @@ Reach these methods through the `metadataCascadePolicies` field on `Client`.
16
16
 
17
17
  **Returns:** `MetadataCascadePolicies`
18
18
 
19
+ **Example**
20
+
21
+ ```ts
22
+ for await (const item of client.metadataCascadePolicies.list("FOLDER_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
  ## create
@@ -26,6 +34,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
26
34
 
27
35
  **Returns:** `MetadataCascadePolicy`
28
36
 
37
+ **Example**
38
+
39
+ ```ts
40
+ const result = await client.metadataCascadePolicies.create({ /* … */ });
41
+ ```
42
+
29
43
  ## get
30
44
 
31
45
  `GET /metadata_cascade_policies/{metadata_cascade_policy_id}`
@@ -36,6 +50,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
36
50
 
37
51
  **Returns:** `MetadataCascadePolicy`
38
52
 
53
+ **Example**
54
+
55
+ ```ts
56
+ const result = await client.metadataCascadePolicies.get("METADATA_CASCADE_POLICY_ID");
57
+ ```
58
+
39
59
  ## delete_
40
60
 
41
61
  `DELETE /metadata_cascade_policies/{metadata_cascade_policy_id}`
@@ -46,6 +66,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
46
66
 
47
67
  **Returns:** `void`
48
68
 
69
+ **Example**
70
+
71
+ ```ts
72
+ await client.metadataCascadePolicies.delete_("METADATA_CASCADE_POLICY_ID");
73
+ ```
74
+
49
75
  ## apply
50
76
 
51
77
  `POST /metadata_cascade_policies/{metadata_cascade_policy_id}/apply`
@@ -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.metadataCascadePolicies.apply("METADATA_CASCADE_POLICY_ID", { /* … */ });
91
+ ```
92
+
@@ -11,6 +11,12 @@ Reach these methods through the `metadataTaxonomies` field on `Client`.
11
11
 
12
12
  **Returns:** `MetadataTaxonomy`
13
13
 
14
+ **Example**
15
+
16
+ ```ts
17
+ const result = await client.metadataTaxonomies.create({ /* … */ });
18
+ ```
19
+
14
20
  ## list
15
21
 
16
22
  `GET /metadata_taxonomies/{namespace}`
@@ -23,6 +29,14 @@ Reach these methods through the `metadataTaxonomies` field on `Client`.
23
29
 
24
30
  **Returns:** `MetadataTaxonomies`
25
31
 
32
+ **Example**
33
+
34
+ ```ts
35
+ for await (const item of client.metadataTaxonomies.list("NAMESPACE")) {
36
+ // use item
37
+ }
38
+ ```
39
+
26
40
  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).
27
41
 
28
42
  ## get
@@ -36,6 +50,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
36
50
 
37
51
  **Returns:** `MetadataTaxonomy`
38
52
 
53
+ **Example**
54
+
55
+ ```ts
56
+ const result = await client.metadataTaxonomies.get("NAMESPACE", "TAXONOMY_KEY");
57
+ ```
58
+
39
59
  ## delete_
40
60
 
41
61
  `DELETE /metadata_taxonomies/{namespace}/{taxonomy_key}`
@@ -47,6 +67,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
47
67
 
48
68
  **Returns:** `void`
49
69
 
70
+ **Example**
71
+
72
+ ```ts
73
+ await client.metadataTaxonomies.delete_("NAMESPACE", "TAXONOMY_KEY");
74
+ ```
75
+
50
76
  ## update
51
77
 
52
78
  `PATCH /metadata_taxonomies/{namespace}/{taxonomy_key}`
@@ -60,6 +86,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
60
86
 
61
87
  **Returns:** `MetadataTaxonomy`
62
88
 
89
+ **Example**
90
+
91
+ ```ts
92
+ const result = await client.metadataTaxonomies.update("NAMESPACE", "TAXONOMY_KEY", { /* … */ });
93
+ ```
94
+
63
95
  ## createLevels
64
96
 
65
97
  `POST /metadata_taxonomies/{namespace}/{taxonomy_key}/levels`
@@ -73,6 +105,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
73
105
 
74
106
  **Returns:** `MetadataTaxonomyLevels`
75
107
 
108
+ **Example**
109
+
110
+ ```ts
111
+ const result = await client.metadataTaxonomies.createLevels("NAMESPACE", "TAXONOMY_KEY", []);
112
+ ```
113
+
76
114
  ## updateLevel
77
115
 
78
116
  `PATCH /metadata_taxonomies/{namespace}/{taxonomy_key}/levels/{level_index}`
@@ -87,6 +125,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
87
125
 
88
126
  **Returns:** `MetadataTaxonomyLevel`
89
127
 
128
+ **Example**
129
+
130
+ ```ts
131
+ const result = await client.metadataTaxonomies.updateLevel("NAMESPACE", "TAXONOMY_KEY", 0, { /* … */ });
132
+ ```
133
+
90
134
  ## appendLevels
91
135
 
92
136
  `POST /metadata_taxonomies/{namespace}/{taxonomy_key}/levels:append`
@@ -100,6 +144,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
100
144
 
101
145
  **Returns:** `MetadataTaxonomyLevels`
102
146
 
147
+ **Example**
148
+
149
+ ```ts
150
+ const result = await client.metadataTaxonomies.appendLevels("NAMESPACE", "TAXONOMY_KEY", { /* … */ });
151
+ ```
152
+
103
153
  ## trimLevels
104
154
 
105
155
  `POST /metadata_taxonomies/{namespace}/{taxonomy_key}/levels:trim`
@@ -111,6 +161,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
111
161
 
112
162
  **Returns:** `MetadataTaxonomyLevels`
113
163
 
164
+ **Example**
165
+
166
+ ```ts
167
+ const result = await client.metadataTaxonomies.trimLevels("NAMESPACE", "TAXONOMY_KEY");
168
+ ```
169
+
114
170
  ## listNodes
115
171
 
116
172
  `GET /metadata_taxonomies/{namespace}/{taxonomy_key}/nodes`
@@ -129,6 +185,14 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
129
185
 
130
186
  **Returns:** `MetadataTaxonomyNodes`
131
187
 
188
+ **Example**
189
+
190
+ ```ts
191
+ for await (const item of client.metadataTaxonomies.listNodes("NAMESPACE", "TAXONOMY_KEY")) {
192
+ // use item
193
+ }
194
+ ```
195
+
132
196
  Paginated — `listNodes(...)` 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).
133
197
 
134
198
  ## createNodes
@@ -144,6 +208,12 @@ Paginated — `listNodes(...)` is an async iterable that yields each entry acros
144
208
 
145
209
  **Returns:** `MetadataTaxonomyNode`
146
210
 
211
+ **Example**
212
+
213
+ ```ts
214
+ const result = await client.metadataTaxonomies.createNodes("NAMESPACE", "TAXONOMY_KEY", { /* … */ });
215
+ ```
216
+
147
217
  ## getNode
148
218
 
149
219
  `GET /metadata_taxonomies/{namespace}/{taxonomy_key}/nodes/{node_id}`
@@ -156,6 +226,12 @@ Paginated — `listNodes(...)` is an async iterable that yields each entry acros
156
226
 
157
227
  **Returns:** `MetadataTaxonomyNode`
158
228
 
229
+ **Example**
230
+
231
+ ```ts
232
+ const result = await client.metadataTaxonomies.getNode("NAMESPACE", "TAXONOMY_KEY", "NODE_ID");
233
+ ```
234
+
159
235
  ## deleteNode
160
236
 
161
237
  `DELETE /metadata_taxonomies/{namespace}/{taxonomy_key}/nodes/{node_id}`
@@ -168,6 +244,12 @@ Paginated — `listNodes(...)` is an async iterable that yields each entry acros
168
244
 
169
245
  **Returns:** `void`
170
246
 
247
+ **Example**
248
+
249
+ ```ts
250
+ await client.metadataTaxonomies.deleteNode("NAMESPACE", "TAXONOMY_KEY", "NODE_ID");
251
+ ```
252
+
171
253
  ## updateNode
172
254
 
173
255
  `PATCH /metadata_taxonomies/{namespace}/{taxonomy_key}/nodes/{node_id}`
@@ -182,6 +264,12 @@ Paginated — `listNodes(...)` is an async iterable that yields each entry acros
182
264
 
183
265
  **Returns:** `MetadataTaxonomyNode`
184
266
 
267
+ **Example**
268
+
269
+ ```ts
270
+ const result = await client.metadataTaxonomies.updateNode("NAMESPACE", "TAXONOMY_KEY", "NODE_ID", { /* … */ });
271
+ ```
272
+
185
273
  ## listMetadataTemplateFieldOptions
186
274
 
187
275
  `GET /metadata_templates/{namespace}/{template_key}/fields/{field_key}/options`
@@ -202,5 +290,13 @@ Paginated — `listNodes(...)` is an async iterable that yields each entry acros
202
290
 
203
291
  **Returns:** `MetadataTaxonomyNodes`
204
292
 
293
+ **Example**
294
+
295
+ ```ts
296
+ for await (const item of client.metadataTaxonomies.listMetadataTemplateFieldOptions("NAMESPACE", "TEMPLATE_KEY", "FIELD_KEY")) {
297
+ // use item
298
+ }
299
+ ```
300
+
205
301
  Paginated — `listMetadataTemplateFieldOptions(...)` 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).
206
302
 
@@ -15,6 +15,14 @@ Reach these methods through the `metadataTemplates` field on `Client`.
15
15
 
16
16
  **Returns:** `MetadataTemplates`
17
17
 
18
+ **Example**
19
+
20
+ ```ts
21
+ for await (const item of client.metadataTemplates.list("METADATA_INSTANCE_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
  ## getSchema
@@ -28,6 +36,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
28
36
 
29
37
  **Returns:** `MetadataTemplate`
30
38
 
39
+ **Example**
40
+
41
+ ```ts
42
+ const result = await client.metadataTemplates.getSchema("...", "TEMPLATE_KEY");
43
+ ```
44
+
31
45
  ## updateSchema
32
46
 
33
47
  `PUT /metadata_templates/{scope}/{template_key}/schema`
@@ -41,6 +55,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
41
55
 
42
56
  **Returns:** `MetadataTemplate`
43
57
 
58
+ **Example**
59
+
60
+ ```ts
61
+ const result = await client.metadataTemplates.updateSchema("...", "TEMPLATE_KEY", []);
62
+ ```
63
+
44
64
  ## deleteSchema
45
65
 
46
66
  `DELETE /metadata_templates/{scope}/{template_key}/schema`
@@ -52,6 +72,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
52
72
 
53
73
  **Returns:** `void`
54
74
 
75
+ **Example**
76
+
77
+ ```ts
78
+ await client.metadataTemplates.deleteSchema("...", "TEMPLATE_KEY");
79
+ ```
80
+
55
81
  ## get
56
82
 
57
83
  `GET /metadata_templates/{template_id}`
@@ -62,6 +88,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
62
88
 
63
89
  **Returns:** `MetadataTemplate`
64
90
 
91
+ **Example**
92
+
93
+ ```ts
94
+ const result = await client.metadataTemplates.get("TEMPLATE_ID");
95
+ ```
96
+
65
97
  ## listGlobal
66
98
 
67
99
  `GET /metadata_templates/global`
@@ -73,6 +105,14 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
73
105
 
74
106
  **Returns:** `MetadataTemplates`
75
107
 
108
+ **Example**
109
+
110
+ ```ts
111
+ for await (const item of client.metadataTemplates.listGlobal()) {
112
+ // use item
113
+ }
114
+ ```
115
+
76
116
  Paginated — `listGlobal(...)` 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).
77
117
 
78
118
  ## listEnterprise
@@ -86,6 +126,14 @@ Paginated — `listGlobal(...)` is an async iterable that yields each entry acro
86
126
 
87
127
  **Returns:** `MetadataTemplates`
88
128
 
129
+ **Example**
130
+
131
+ ```ts
132
+ for await (const item of client.metadataTemplates.listEnterprise()) {
133
+ // use item
134
+ }
135
+ ```
136
+
89
137
  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).
90
138
 
91
139
  ## createSchema
@@ -96,3 +144,9 @@ Paginated — `listEnterprise(...)` is an async iterable that yields each entry
96
144
 
97
145
  **Returns:** `MetadataTemplate`
98
146
 
147
+ **Example**
148
+
149
+ ```ts
150
+ const result = await client.metadataTemplates.createSchema({ /* … */ });
151
+ ```
152
+
@@ -11,3 +11,9 @@ Reach these methods through the `notes` field on `Client`.
11
11
 
12
12
  **Returns:** `NotesConvertResponse`
13
13
 
14
+ **Example**
15
+
16
+ ```ts
17
+ const result = await client.notes.convert({ /* … */ });
18
+ ```
19
+
@@ -15,5 +15,13 @@ Reach these methods through the `recentItems` field on `Client`.
15
15
 
16
16
  **Returns:** `RecentItems`
17
17
 
18
+ **Example**
19
+
20
+ ```ts
21
+ for await (const item of client.recentItems.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
 
@@ -18,6 +18,14 @@ Reach these methods through the `retentionPolicies` field on `Client`.
18
18
 
19
19
  **Returns:** `RetentionPolicies`
20
20
 
21
+ **Example**
22
+
23
+ ```ts
24
+ for await (const item of client.retentionPolicies.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:** `RetentionPolicy`
30
38
 
39
+ **Example**
40
+
41
+ ```ts
42
+ const result = await client.retentionPolicies.create({ /* … */ });
43
+ ```
44
+
31
45
  ## get
32
46
 
33
47
  `GET /retention_policies/{retention_policy_id}`
@@ -39,6 +53,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
39
53
 
40
54
  **Returns:** `RetentionPolicy`
41
55
 
56
+ **Example**
57
+
58
+ ```ts
59
+ const result = await client.retentionPolicies.get("RETENTION_POLICY_ID");
60
+ ```
61
+
42
62
  ## update
43
63
 
44
64
  `PUT /retention_policies/{retention_policy_id}`
@@ -51,6 +71,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
51
71
 
52
72
  **Returns:** `RetentionPolicy`
53
73
 
74
+ **Example**
75
+
76
+ ```ts
77
+ const result = await client.retentionPolicies.update("RETENTION_POLICY_ID", { /* … */ });
78
+ ```
79
+
54
80
  ## delete_
55
81
 
56
82
  `DELETE /retention_policies/{retention_policy_id}`
@@ -61,3 +87,9 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
61
87
 
62
88
  **Returns:** `void`
63
89
 
90
+ **Example**
91
+
92
+ ```ts
93
+ await client.retentionPolicies.delete_("RETENTION_POLICY_ID");
94
+ ```
95
+