@unofficialbox/box-open-sdk 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/cjs/auth.js +3 -3
- package/dist/cjs/buildinfo.js +2 -2
- package/dist/cjs/client.js +3 -0
- package/dist/cjs/jwt.js +1 -1
- package/dist/cjs/managers/collaboration_allowlist_entries.js +6 -6
- package/dist/cjs/managers/collaboration_allowlist_exempt_targets.js +6 -6
- package/dist/cjs/managers/index.js +1 -0
- package/dist/cjs/managers/memberships.js +4 -4
- package/dist/cjs/managers/query.js +68 -0
- package/dist/cjs/models/schemas.js +1 -1
- package/dist/cjs/runtime.js +8 -3
- package/dist/cjs/tokens.js +5 -3
- package/dist/esm/auth.js +3 -3
- package/dist/esm/buildinfo.js +2 -2
- package/dist/esm/client.js +3 -0
- package/dist/esm/jwt.js +1 -1
- package/dist/esm/managers/collaboration_allowlist_entries.js +6 -6
- package/dist/esm/managers/collaboration_allowlist_exempt_targets.js +6 -6
- package/dist/esm/managers/index.js +1 -0
- package/dist/esm/managers/memberships.js +4 -4
- package/dist/esm/managers/query.js +31 -0
- package/dist/esm/models/schemas.js +1 -1
- package/dist/esm/runtime.js +8 -3
- package/dist/esm/tokens.js +5 -3
- package/dist/types/auth.d.ts +8 -0
- package/dist/types/buildinfo.d.ts +1 -1
- package/dist/types/client.d.ts +2 -0
- package/dist/types/jwt.d.ts +4 -0
- package/dist/types/managers/archives.d.ts +2 -2
- package/dist/types/managers/avatars.d.ts +1 -1
- package/dist/types/managers/chunked_uploads.d.ts +3 -3
- package/dist/types/managers/classifications.d.ts +3 -3
- package/dist/types/managers/collaboration_allowlist_entries.d.ts +7 -7
- package/dist/types/managers/collaboration_allowlist_exempt_targets.d.ts +7 -7
- package/dist/types/managers/comments.d.ts +2 -2
- package/dist/types/managers/email_aliases.d.ts +1 -1
- package/dist/types/managers/file_classifications.d.ts +2 -2
- package/dist/types/managers/file_metadata.d.ts +4 -4
- package/dist/types/managers/file_versions.d.ts +2 -2
- package/dist/types/managers/file_watermarks.d.ts +1 -1
- package/dist/types/managers/files.d.ts +2 -2
- package/dist/types/managers/folder_classifications.d.ts +2 -2
- package/dist/types/managers/folder_locks.d.ts +1 -1
- package/dist/types/managers/folder_metadata.d.ts +4 -4
- package/dist/types/managers/folder_watermarks.d.ts +1 -1
- package/dist/types/managers/folders.d.ts +3 -3
- package/dist/types/managers/groups.d.ts +2 -2
- package/dist/types/managers/index.d.ts +1 -0
- package/dist/types/managers/integration_mappings.d.ts +2 -2
- package/dist/types/managers/invites.d.ts +1 -1
- package/dist/types/managers/legal_hold_policies.d.ts +2 -2
- package/dist/types/managers/legal_hold_policy_assignments.d.ts +1 -1
- package/dist/types/managers/memberships.d.ts +10 -10
- package/dist/types/managers/metadata_cascade_policies.d.ts +2 -2
- package/dist/types/managers/metadata_taxonomies.d.ts +6 -6
- package/dist/types/managers/metadata_templates.d.ts +4 -4
- package/dist/types/managers/query.d.ts +9 -0
- package/dist/types/managers/retention_policies.d.ts +2 -2
- package/dist/types/managers/retention_policy_assignments.d.ts +1 -1
- package/dist/types/managers/session_termination.d.ts +2 -2
- package/dist/types/managers/shared_links_files.d.ts +3 -3
- package/dist/types/managers/shared_links_folders.d.ts +3 -3
- package/dist/types/managers/shared_links_web_links.d.ts +3 -3
- package/dist/types/managers/shield_information_barrier_segment_members.d.ts +1 -1
- package/dist/types/managers/shield_information_barrier_segment_restrictions.d.ts +1 -1
- package/dist/types/managers/shield_information_barrier_segments.d.ts +2 -2
- package/dist/types/managers/shield_information_barriers.d.ts +2 -2
- package/dist/types/managers/skills.d.ts +3 -3
- package/dist/types/managers/storage_policy_assignments.d.ts +2 -2
- package/dist/types/managers/task_assignments.d.ts +2 -2
- package/dist/types/managers/tasks.d.ts +2 -2
- package/dist/types/managers/terms_of_service_user_statuses.d.ts +2 -2
- package/dist/types/managers/terms_of_services.d.ts +2 -2
- package/dist/types/managers/transfer.d.ts +1 -1
- package/dist/types/managers/trashed_files.d.ts +1 -1
- package/dist/types/managers/trashed_folders.d.ts +1 -1
- package/dist/types/managers/trashed_web_links.d.ts +1 -1
- package/dist/types/managers/uploads.d.ts +2 -2
- package/dist/types/managers/user_collaborations.d.ts +2 -2
- package/dist/types/managers/users.d.ts +2 -2
- package/dist/types/managers/web_links.d.ts +2 -2
- package/dist/types/managers/webhooks.d.ts +2 -2
- package/dist/types/managers/workflows.d.ts +1 -1
- package/dist/types/models/schemas.d.ts +204 -141
- package/dist/types/runtime.d.ts +10 -0
- package/dist/types/tokens.d.ts +4 -2
- package/docs/README.md +1 -0
- package/docs/managers/archives.md +2 -2
- package/docs/managers/avatars.md +1 -1
- package/docs/managers/chunked_uploads.md +3 -3
- package/docs/managers/classifications.md +3 -3
- package/docs/managers/collaboration_allowlist_entries.md +10 -10
- package/docs/managers/collaboration_allowlist_exempt_targets.md +10 -10
- package/docs/managers/comments.md +2 -2
- package/docs/managers/email_aliases.md +1 -1
- package/docs/managers/file_classifications.md +2 -2
- package/docs/managers/file_metadata.md +5 -5
- package/docs/managers/file_versions.md +2 -2
- package/docs/managers/file_watermarks.md +1 -1
- package/docs/managers/files.md +2 -2
- package/docs/managers/folder_classifications.md +2 -2
- package/docs/managers/folder_locks.md +1 -1
- package/docs/managers/folder_metadata.md +5 -5
- package/docs/managers/folder_watermarks.md +1 -1
- package/docs/managers/folders.md +3 -3
- package/docs/managers/groups.md +2 -2
- package/docs/managers/integration_mappings.md +2 -2
- package/docs/managers/invites.md +1 -1
- package/docs/managers/legal_hold_policies.md +2 -2
- package/docs/managers/legal_hold_policy_assignments.md +1 -1
- package/docs/managers/memberships.md +10 -10
- package/docs/managers/metadata_cascade_policies.md +2 -2
- package/docs/managers/metadata_taxonomies.md +6 -6
- package/docs/managers/metadata_templates.md +5 -5
- package/docs/managers/query.md +33 -0
- package/docs/managers/retention_policies.md +2 -2
- package/docs/managers/retention_policy_assignments.md +1 -1
- package/docs/managers/session_termination.md +2 -2
- package/docs/managers/shared_links_files.md +3 -3
- package/docs/managers/shared_links_folders.md +3 -3
- package/docs/managers/shared_links_web_links.md +3 -3
- package/docs/managers/shield_information_barrier_segment_members.md +1 -1
- package/docs/managers/shield_information_barrier_segment_restrictions.md +1 -1
- package/docs/managers/shield_information_barrier_segments.md +2 -2
- package/docs/managers/shield_information_barriers.md +2 -2
- package/docs/managers/skills.md +3 -3
- package/docs/managers/storage_policy_assignments.md +2 -2
- package/docs/managers/task_assignments.md +2 -2
- package/docs/managers/tasks.md +2 -2
- package/docs/managers/terms_of_service_user_statuses.md +2 -2
- package/docs/managers/terms_of_services.md +2 -2
- package/docs/managers/transfer.md +1 -1
- package/docs/managers/trashed_files.md +1 -1
- package/docs/managers/trashed_folders.md +1 -1
- package/docs/managers/trashed_web_links.md +1 -1
- package/docs/managers/uploads.md +2 -2
- package/docs/managers/user_collaborations.md +2 -2
- package/docs/managers/users.md +2 -2
- package/docs/managers/web_links.md +2 -2
- package/docs/managers/webhooks.md +2 -2
- package/docs/managers/workflows.md +1 -1
- package/package.json +1 -1
package/dist/types/runtime.d.ts
CHANGED
|
@@ -34,6 +34,14 @@ export interface ClientOptions {
|
|
|
34
34
|
maxRetries?: number;
|
|
35
35
|
/** Override individual base-URL classes (custom deployments). */
|
|
36
36
|
baseUrls?: Record<string, string>;
|
|
37
|
+
/** Override the platform `fetch` (same signature) — e.g. to inject an
|
|
38
|
+
* instrumented or mocked transport. Defaults to the global `fetch`. */
|
|
39
|
+
fetch?: typeof fetch;
|
|
40
|
+
/** Headers sent with every request from this client — e.g. a tracing or
|
|
41
|
+
* `User-Agent` header the embedding application wants on every call. A
|
|
42
|
+
* header set on an individual `Request` (via `withHeader`) takes
|
|
43
|
+
* precedence over a same-named default. */
|
|
44
|
+
headers?: Record<string, string>;
|
|
37
45
|
}
|
|
38
46
|
/** The runtime session: it holds the auth flow, base-URL configuration, and
|
|
39
47
|
* retry policy shared by every manager. */
|
|
@@ -41,6 +49,8 @@ export declare class Client {
|
|
|
41
49
|
private readonly auth;
|
|
42
50
|
private readonly baseUrls;
|
|
43
51
|
private readonly maxRetries;
|
|
52
|
+
private readonly fetchImpl;
|
|
53
|
+
private readonly defaultHeaders;
|
|
44
54
|
constructor(auth: Auth, options?: ClientOptions);
|
|
45
55
|
/** The configured base URL for a D-106 class, without a trailing slash. */
|
|
46
56
|
baseUrl(name: string): string;
|
package/dist/types/tokens.d.ts
CHANGED
|
@@ -45,6 +45,8 @@ export declare class CachedToken implements Auth {
|
|
|
45
45
|
* token acquisition never escapes the runtime's error contract. The optional
|
|
46
46
|
* `signal` cancels an explicit caller-initiated exchange (`exchangeCode`); the
|
|
47
47
|
* cached flows do not thread one, so a shared refresh is never bound to a single
|
|
48
|
-
* request's cancellation.
|
|
48
|
+
* request's cancellation. `fetchImpl` defaults to the global `fetch`; a caller
|
|
49
|
+
* building an `Auth` with a custom transport (matching the runtime `Client`'s
|
|
50
|
+
* own `fetch` override) passes it through so auth traffic is observable too.
|
|
49
51
|
*/
|
|
50
|
-
export declare function postTokenForm(tokenUrl: string, form: Record<string, string>, signal?: AbortSignal): Promise<Token>;
|
|
52
|
+
export declare function postTokenForm(tokenUrl: string, form: Record<string, string>, signal?: AbortSignal, fetchImpl?: typeof fetch): Promise<Token>;
|
package/docs/README.md
CHANGED
|
@@ -63,6 +63,7 @@ One resource manager per Box API tag, reached through the single
|
|
|
63
63
|
| [MetadataTaxonomiesManager](managers/metadata_taxonomies.md) | 15 |
|
|
64
64
|
| [MetadataTemplatesManager](managers/metadata_templates.md) | 8 |
|
|
65
65
|
| [NotesManager](managers/notes.md) | 1 |
|
|
66
|
+
| [QueryManager](managers/query.md) | 2 |
|
|
66
67
|
| [RecentItemsManager](managers/recent_items.md) | 1 |
|
|
67
68
|
| [RetentionPoliciesManager](managers/retention_policies.md) | 5 |
|
|
68
69
|
| [RetentionPolicyAssignmentsManager](managers/retention_policy_assignments.md) | 6 |
|
|
@@ -28,7 +28,7 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
|
|
|
28
28
|
|
|
29
29
|
`POST /archives`
|
|
30
30
|
|
|
31
|
-
**Request body** (`application/json`): `
|
|
31
|
+
**Request body** (`application/json`): `CreateArchiveRequest`
|
|
32
32
|
|
|
33
33
|
**Returns:** `Archive`
|
|
34
34
|
|
|
@@ -46,7 +46,7 @@ const result = await client.archives.create({ /* … */ });
|
|
|
46
46
|
|---|---|---|---|
|
|
47
47
|
| `archive_id` | path | `string` | yes |
|
|
48
48
|
|
|
49
|
-
**Request body** (`application/json`): `
|
|
49
|
+
**Request body** (`application/json`): `UpdateArchiveRequest`
|
|
50
50
|
|
|
51
51
|
**Returns:** `Archive`
|
|
52
52
|
|
package/docs/managers/avatars.md
CHANGED
|
@@ -27,7 +27,7 @@ const result = await client.avatars.getUserAvatar("USER_ID");
|
|
|
27
27
|
|---|---|---|---|
|
|
28
28
|
| `user_id` | path | `string` | yes |
|
|
29
29
|
|
|
30
|
-
**Request body** (`multipart/form-data`): `
|
|
30
|
+
**Request body** (`multipart/form-data`): `CreateUserAvatarRequest`
|
|
31
31
|
|
|
32
32
|
**Returns:** `UserAvatar`
|
|
33
33
|
|
|
@@ -7,7 +7,7 @@ Reach these methods through the `chunkedUploads` field on `Client`.
|
|
|
7
7
|
|
|
8
8
|
`POST /files/upload_sessions`
|
|
9
9
|
|
|
10
|
-
**Request body** (`application/json`): `
|
|
10
|
+
**Request body** (`application/json`): `CreateFileUploadSessionRequest`
|
|
11
11
|
|
|
12
12
|
**Returns:** `UploadSession`
|
|
13
13
|
|
|
@@ -25,7 +25,7 @@ const result = await client.chunkedUploads.createFileUploadSession({ /* … */ }
|
|
|
25
25
|
|---|---|---|---|
|
|
26
26
|
| `file_id` | path | `string` | yes |
|
|
27
27
|
|
|
28
|
-
**Request body** (`application/json`): `
|
|
28
|
+
**Request body** (`application/json`): `CreateFileVersionUploadSessionRequest`
|
|
29
29
|
|
|
30
30
|
**Returns:** `UploadSession`
|
|
31
31
|
|
|
@@ -120,7 +120,7 @@ Paginated — `listFileUploadSessionParts(...)` is an async iterable that yields
|
|
|
120
120
|
| `if-match` | header | `string` | no |
|
|
121
121
|
| `if-none-match` | header | `string` | no |
|
|
122
122
|
|
|
123
|
-
**Request body** (`application/json`): `
|
|
123
|
+
**Request body** (`application/json`): `CommitFileUploadSessionRequest`
|
|
124
124
|
|
|
125
125
|
**Returns:** `Files`
|
|
126
126
|
|
|
@@ -19,7 +19,7 @@ const result = await client.classifications.get();
|
|
|
19
19
|
|
|
20
20
|
`PUT /metadata_templates/enterprise/securityClassification-6VMVochwUWo/schema`
|
|
21
21
|
|
|
22
|
-
**Request body** (`application/json`): `Array<
|
|
22
|
+
**Request body** (`application/json`): `Array<UpdateClassificationAddRequest>`
|
|
23
23
|
|
|
24
24
|
**Returns:** `ClassificationTemplate`
|
|
25
25
|
|
|
@@ -33,7 +33,7 @@ const result = await client.classifications.updateAdd([]);
|
|
|
33
33
|
|
|
34
34
|
`PUT /metadata_templates/enterprise/securityClassification-6VMVochwUWo/schema`
|
|
35
35
|
|
|
36
|
-
**Request body** (`application/json-patch+json`): `Array<
|
|
36
|
+
**Request body** (`application/json-patch+json`): `Array<UpdateClassificationUpdateRequest>`
|
|
37
37
|
|
|
38
38
|
**Returns:** `ClassificationTemplate`
|
|
39
39
|
|
|
@@ -47,7 +47,7 @@ const result = await client.classifications.updateUpdate([]);
|
|
|
47
47
|
|
|
48
48
|
`POST /metadata_templates/schema`
|
|
49
49
|
|
|
50
|
-
**Request body** (`application/json`): `
|
|
50
|
+
**Request body** (`application/json`): `CreateMetadataTemplateSchemaClassificationsRequest`
|
|
51
51
|
|
|
52
52
|
**Returns:** `ClassificationTemplate`
|
|
53
53
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
Reach these methods through the `collaborationAllowlistEntries` field on `Client`.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## list
|
|
7
7
|
|
|
8
8
|
`GET /collaboration_whitelist_entries`
|
|
9
9
|
|
|
@@ -17,28 +17,28 @@ Reach these methods through the `collaborationAllowlistEntries` field on `Client
|
|
|
17
17
|
**Example**
|
|
18
18
|
|
|
19
19
|
```ts
|
|
20
|
-
for await (const item of client.collaborationAllowlistEntries.
|
|
20
|
+
for await (const item of client.collaborationAllowlistEntries.list()) {
|
|
21
21
|
// use item
|
|
22
22
|
}
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Paginated — `
|
|
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).
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## create
|
|
28
28
|
|
|
29
29
|
`POST /collaboration_whitelist_entries`
|
|
30
30
|
|
|
31
|
-
**Request body** (`application/json`): `
|
|
31
|
+
**Request body** (`application/json`): `CreateCollaborationAllowlistEntryRequest`
|
|
32
32
|
|
|
33
33
|
**Returns:** `CollaborationAllowlistEntry`
|
|
34
34
|
|
|
35
35
|
**Example**
|
|
36
36
|
|
|
37
37
|
```ts
|
|
38
|
-
const result = await client.collaborationAllowlistEntries.
|
|
38
|
+
const result = await client.collaborationAllowlistEntries.create({ /* … */ });
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
##
|
|
41
|
+
## get
|
|
42
42
|
|
|
43
43
|
`GET /collaboration_whitelist_entries/{collaboration_whitelist_entry_id}`
|
|
44
44
|
|
|
@@ -51,10 +51,10 @@ const result = await client.collaborationAllowlistEntries.createCollaborationWhi
|
|
|
51
51
|
**Example**
|
|
52
52
|
|
|
53
53
|
```ts
|
|
54
|
-
const result = await client.collaborationAllowlistEntries.
|
|
54
|
+
const result = await client.collaborationAllowlistEntries.get("COLLABORATION_WHITELIST_ENTRY_ID");
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
##
|
|
57
|
+
## delete_
|
|
58
58
|
|
|
59
59
|
`DELETE /collaboration_whitelist_entries/{collaboration_whitelist_entry_id}`
|
|
60
60
|
|
|
@@ -67,6 +67,6 @@ const result = await client.collaborationAllowlistEntries.getCollaborationWhitel
|
|
|
67
67
|
**Example**
|
|
68
68
|
|
|
69
69
|
```ts
|
|
70
|
-
await client.collaborationAllowlistEntries.
|
|
70
|
+
await client.collaborationAllowlistEntries.delete_("COLLABORATION_WHITELIST_ENTRY_ID");
|
|
71
71
|
```
|
|
72
72
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
Reach these methods through the `collaborationAllowlistExemptTargets` field on `Client`.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## list
|
|
7
7
|
|
|
8
8
|
`GET /collaboration_whitelist_exempt_targets`
|
|
9
9
|
|
|
@@ -17,28 +17,28 @@ Reach these methods through the `collaborationAllowlistExemptTargets` field on `
|
|
|
17
17
|
**Example**
|
|
18
18
|
|
|
19
19
|
```ts
|
|
20
|
-
for await (const item of client.collaborationAllowlistExemptTargets.
|
|
20
|
+
for await (const item of client.collaborationAllowlistExemptTargets.list()) {
|
|
21
21
|
// use item
|
|
22
22
|
}
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Paginated — `
|
|
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).
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## create
|
|
28
28
|
|
|
29
29
|
`POST /collaboration_whitelist_exempt_targets`
|
|
30
30
|
|
|
31
|
-
**Request body** (`application/json`): `
|
|
31
|
+
**Request body** (`application/json`): `CreateCollaborationAllowlistExemptTargetRequest`
|
|
32
32
|
|
|
33
33
|
**Returns:** `CollaborationAllowlistExemptTarget`
|
|
34
34
|
|
|
35
35
|
**Example**
|
|
36
36
|
|
|
37
37
|
```ts
|
|
38
|
-
const result = await client.collaborationAllowlistExemptTargets.
|
|
38
|
+
const result = await client.collaborationAllowlistExemptTargets.create({ /* … */ });
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
##
|
|
41
|
+
## get
|
|
42
42
|
|
|
43
43
|
`GET /collaboration_whitelist_exempt_targets/{collaboration_whitelist_exempt_target_id}`
|
|
44
44
|
|
|
@@ -51,10 +51,10 @@ const result = await client.collaborationAllowlistExemptTargets.createCollaborat
|
|
|
51
51
|
**Example**
|
|
52
52
|
|
|
53
53
|
```ts
|
|
54
|
-
const result = await client.collaborationAllowlistExemptTargets.
|
|
54
|
+
const result = await client.collaborationAllowlistExemptTargets.get("COLLABORATION_WHITELIST_EXEMPT_TARGET_ID");
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
##
|
|
57
|
+
## delete_
|
|
58
58
|
|
|
59
59
|
`DELETE /collaboration_whitelist_exempt_targets/{collaboration_whitelist_exempt_target_id}`
|
|
60
60
|
|
|
@@ -67,6 +67,6 @@ const result = await client.collaborationAllowlistExemptTargets.getCollaboration
|
|
|
67
67
|
**Example**
|
|
68
68
|
|
|
69
69
|
```ts
|
|
70
|
-
await client.collaborationAllowlistExemptTargets.
|
|
70
|
+
await client.collaborationAllowlistExemptTargets.delete_("COLLABORATION_WHITELIST_EXEMPT_TARGET_ID");
|
|
71
71
|
```
|
|
72
72
|
|
|
@@ -52,7 +52,7 @@ const result = await client.comments.get("COMMENT_ID");
|
|
|
52
52
|
| `comment_id` | path | `string` | yes |
|
|
53
53
|
| `fields` | query | `Array<string>` | no |
|
|
54
54
|
|
|
55
|
-
**Request body** (`application/json`): `
|
|
55
|
+
**Request body** (`application/json`): `UpdateCommentRequest`
|
|
56
56
|
|
|
57
57
|
**Returns:** `CommentFull`
|
|
58
58
|
|
|
@@ -86,7 +86,7 @@ await client.comments.delete_("COMMENT_ID");
|
|
|
86
86
|
|---|---|---|---|
|
|
87
87
|
| `fields` | query | `Array<string>` | no |
|
|
88
88
|
|
|
89
|
-
**Request body** (`application/json`): `
|
|
89
|
+
**Request body** (`application/json`): `CreateCommentRequest`
|
|
90
90
|
|
|
91
91
|
**Returns:** `CommentFull`
|
|
92
92
|
|
|
@@ -27,7 +27,7 @@ const result = await client.emailAliases.listUser("USER_ID");
|
|
|
27
27
|
|---|---|---|---|
|
|
28
28
|
| `user_id` | path | `string` | yes |
|
|
29
29
|
|
|
30
|
-
**Request body** (`application/json`): `
|
|
30
|
+
**Request body** (`application/json`): `CreateUserIdRequest`
|
|
31
31
|
|
|
32
32
|
**Returns:** `EmailAlias`
|
|
33
33
|
|
|
@@ -27,7 +27,7 @@ const result = await client.fileClassifications.get("FILE_ID");
|
|
|
27
27
|
|---|---|---|---|
|
|
28
28
|
| `file_id` | path | `string` | yes |
|
|
29
29
|
|
|
30
|
-
**Request body** (`application/json-patch+json`): `Array<
|
|
30
|
+
**Request body** (`application/json-patch+json`): `Array<UpdateFileClassificationRequest>`
|
|
31
31
|
|
|
32
32
|
**Returns:** `Classification`
|
|
33
33
|
|
|
@@ -45,7 +45,7 @@ const result = await client.fileClassifications.update("FILE_ID", []);
|
|
|
45
45
|
|---|---|---|---|
|
|
46
46
|
| `file_id` | path | `string` | yes |
|
|
47
47
|
|
|
48
|
-
**Request body** (`application/json`): `
|
|
48
|
+
**Request body** (`application/json`): `CreateFileClassificationRequest`
|
|
49
49
|
|
|
50
50
|
**Returns:** `Classification`
|
|
51
51
|
|
|
@@ -27,7 +27,7 @@ const result = await client.fileMetadata.listFileMetadata("FILE_ID");
|
|
|
27
27
|
| Parameter | In | Type | Required |
|
|
28
28
|
|---|---|---|---|
|
|
29
29
|
| `file_id` | path | `string` | yes |
|
|
30
|
-
| `scope` | path | `
|
|
30
|
+
| `scope` | path | `GetFileIdMetadataIdScope` | yes |
|
|
31
31
|
| `template_key` | path | `string` | yes |
|
|
32
32
|
| `view` | query | `string` | no |
|
|
33
33
|
|
|
@@ -46,10 +46,10 @@ const result = await client.fileMetadata.getFileMetadata("FILE_ID", "...", "TEMP
|
|
|
46
46
|
| Parameter | In | Type | Required |
|
|
47
47
|
|---|---|---|---|
|
|
48
48
|
| `file_id` | path | `string` | yes |
|
|
49
|
-
| `scope` | path | `
|
|
49
|
+
| `scope` | path | `GetFileIdMetadataIdScope` | yes |
|
|
50
50
|
| `template_key` | path | `string` | yes |
|
|
51
51
|
|
|
52
|
-
**Request body** (`application/json-patch+json`): `Array<
|
|
52
|
+
**Request body** (`application/json-patch+json`): `Array<UpdateFileMetadataRequest>`
|
|
53
53
|
|
|
54
54
|
**Returns:** `MetadataFull`
|
|
55
55
|
|
|
@@ -66,7 +66,7 @@ const result = await client.fileMetadata.updateFileMetadata("FILE_ID", "...", "T
|
|
|
66
66
|
| Parameter | In | Type | Required |
|
|
67
67
|
|---|---|---|---|
|
|
68
68
|
| `file_id` | path | `string` | yes |
|
|
69
|
-
| `scope` | path | `
|
|
69
|
+
| `scope` | path | `GetFileIdMetadataIdScope` | yes |
|
|
70
70
|
| `template_key` | path | `string` | yes |
|
|
71
71
|
|
|
72
72
|
**Request body** (`application/json`): `Record<string, unknown>`
|
|
@@ -86,7 +86,7 @@ const result = await client.fileMetadata.createFileMetadata("FILE_ID", "...", "T
|
|
|
86
86
|
| Parameter | In | Type | Required |
|
|
87
87
|
|---|---|---|---|
|
|
88
88
|
| `file_id` | path | `string` | yes |
|
|
89
|
-
| `scope` | path | `
|
|
89
|
+
| `scope` | path | `GetFileIdMetadataIdScope` | yes |
|
|
90
90
|
| `template_key` | path | `string` | yes |
|
|
91
91
|
|
|
92
92
|
**Returns:** `void`
|
|
@@ -53,7 +53,7 @@ const result = await client.fileVersions.getFileVersion("FILE_ID", "FILE_VERSION
|
|
|
53
53
|
| `file_id` | path | `string` | yes |
|
|
54
54
|
| `file_version_id` | path | `string` | yes |
|
|
55
55
|
|
|
56
|
-
**Request body** (`application/json`): `
|
|
56
|
+
**Request body** (`application/json`): `UpdateFileVersionRequest`
|
|
57
57
|
|
|
58
58
|
**Returns:** `FileVersionFull`
|
|
59
59
|
|
|
@@ -90,7 +90,7 @@ await client.fileVersions.deleteFileVersion("FILE_ID", "FILE_VERSION_ID");
|
|
|
90
90
|
| `file_id` | path | `string` | yes |
|
|
91
91
|
| `fields` | query | `Array<string>` | no |
|
|
92
92
|
|
|
93
|
-
**Request body** (`application/json`): `
|
|
93
|
+
**Request body** (`application/json`): `CreateFileVersionCurrentRequest`
|
|
94
94
|
|
|
95
95
|
**Returns:** `FileVersionFull`
|
|
96
96
|
|
|
@@ -27,7 +27,7 @@ const result = await client.fileWatermarks.getFileWatermark("FILE_ID");
|
|
|
27
27
|
|---|---|---|---|
|
|
28
28
|
| `file_id` | path | `string` | yes |
|
|
29
29
|
|
|
30
|
-
**Request body** (`application/json`): `
|
|
30
|
+
**Request body** (`application/json`): `UpdateFileWatermarkRequest`
|
|
31
31
|
|
|
32
32
|
**Returns:** `Watermark`
|
|
33
33
|
|
package/docs/managers/files.md
CHANGED
|
@@ -33,7 +33,7 @@ const result = await client.files.get("FILE_ID");
|
|
|
33
33
|
| `fields` | query | `Array<string>` | no |
|
|
34
34
|
| `if-match` | header | `string` | no |
|
|
35
35
|
|
|
36
|
-
**Request body** (`application/json`): `
|
|
36
|
+
**Request body** (`application/json`): `UpdateFileRequest`
|
|
37
37
|
|
|
38
38
|
**Returns:** `FileFull`
|
|
39
39
|
|
|
@@ -69,7 +69,7 @@ await client.files.delete_("FILE_ID");
|
|
|
69
69
|
| `file_id` | path | `string` | yes |
|
|
70
70
|
| `fields` | query | `Array<string>` | no |
|
|
71
71
|
|
|
72
|
-
**Request body** (`application/json`): `
|
|
72
|
+
**Request body** (`application/json`): `CopyFileRequest`
|
|
73
73
|
|
|
74
74
|
**Returns:** `FileFull`
|
|
75
75
|
|
|
@@ -27,7 +27,7 @@ const result = await client.folderClassifications.get("FOLDER_ID");
|
|
|
27
27
|
|---|---|---|---|
|
|
28
28
|
| `folder_id` | path | `string` | yes |
|
|
29
29
|
|
|
30
|
-
**Request body** (`application/json-patch+json`): `Array<
|
|
30
|
+
**Request body** (`application/json-patch+json`): `Array<UpdateFileClassificationRequest>`
|
|
31
31
|
|
|
32
32
|
**Returns:** `Classification`
|
|
33
33
|
|
|
@@ -45,7 +45,7 @@ const result = await client.folderClassifications.update("FOLDER_ID", []);
|
|
|
45
45
|
|---|---|---|---|
|
|
46
46
|
| `folder_id` | path | `string` | yes |
|
|
47
47
|
|
|
48
|
-
**Request body** (`application/json`): `
|
|
48
|
+
**Request body** (`application/json`): `CreateFileClassificationRequest`
|
|
49
49
|
|
|
50
50
|
**Returns:** `Classification`
|
|
51
51
|
|
|
@@ -27,7 +27,7 @@ const result = await client.folderMetadata.listFolderMetadata("FOLDER_ID");
|
|
|
27
27
|
| Parameter | In | Type | Required |
|
|
28
28
|
|---|---|---|---|
|
|
29
29
|
| `folder_id` | path | `string` | yes |
|
|
30
|
-
| `scope` | path | `
|
|
30
|
+
| `scope` | path | `GetFileIdMetadataIdScope` | yes |
|
|
31
31
|
| `template_key` | path | `string` | yes |
|
|
32
32
|
|
|
33
33
|
**Returns:** `MetadataFull`
|
|
@@ -45,10 +45,10 @@ const result = await client.folderMetadata.getFolderMetadata("FOLDER_ID", "...",
|
|
|
45
45
|
| Parameter | In | Type | Required |
|
|
46
46
|
|---|---|---|---|
|
|
47
47
|
| `folder_id` | path | `string` | yes |
|
|
48
|
-
| `scope` | path | `
|
|
48
|
+
| `scope` | path | `GetFileIdMetadataIdScope` | yes |
|
|
49
49
|
| `template_key` | path | `string` | yes |
|
|
50
50
|
|
|
51
|
-
**Request body** (`application/json-patch+json`): `Array<
|
|
51
|
+
**Request body** (`application/json-patch+json`): `Array<UpdateFileMetadataRequest>`
|
|
52
52
|
|
|
53
53
|
**Returns:** `MetadataFull`
|
|
54
54
|
|
|
@@ -65,7 +65,7 @@ const result = await client.folderMetadata.updateFolderMetadata("FOLDER_ID", "..
|
|
|
65
65
|
| Parameter | In | Type | Required |
|
|
66
66
|
|---|---|---|---|
|
|
67
67
|
| `folder_id` | path | `string` | yes |
|
|
68
|
-
| `scope` | path | `
|
|
68
|
+
| `scope` | path | `GetFileIdMetadataIdScope` | yes |
|
|
69
69
|
| `template_key` | path | `string` | yes |
|
|
70
70
|
|
|
71
71
|
**Request body** (`application/json`): `Record<string, unknown>`
|
|
@@ -85,7 +85,7 @@ const result = await client.folderMetadata.createFolderMetadata("FOLDER_ID", "..
|
|
|
85
85
|
| Parameter | In | Type | Required |
|
|
86
86
|
|---|---|---|---|
|
|
87
87
|
| `folder_id` | path | `string` | yes |
|
|
88
|
-
| `scope` | path | `
|
|
88
|
+
| `scope` | path | `GetFileIdMetadataIdScope` | yes |
|
|
89
89
|
| `template_key` | path | `string` | yes |
|
|
90
90
|
|
|
91
91
|
**Returns:** `void`
|
|
@@ -27,7 +27,7 @@ const result = await client.folderWatermarks.getFolderWatermark("FOLDER_ID");
|
|
|
27
27
|
|---|---|---|---|
|
|
28
28
|
| `folder_id` | path | `string` | yes |
|
|
29
29
|
|
|
30
|
-
**Request body** (`application/json`): `
|
|
30
|
+
**Request body** (`application/json`): `UpdateFileWatermarkRequest`
|
|
31
31
|
|
|
32
32
|
**Returns:** `Watermark`
|
|
33
33
|
|
package/docs/managers/folders.md
CHANGED
|
@@ -36,7 +36,7 @@ const result = await client.folders.get("FOLDER_ID");
|
|
|
36
36
|
| `fields` | query | `Array<string>` | no |
|
|
37
37
|
| `if-match` | header | `string` | no |
|
|
38
38
|
|
|
39
|
-
**Request body** (`application/json`): `
|
|
39
|
+
**Request body** (`application/json`): `UpdateFolderRequest`
|
|
40
40
|
|
|
41
41
|
**Returns:** `FolderFull`
|
|
42
42
|
|
|
@@ -100,7 +100,7 @@ Paginated — `listItems(...)` is an async iterable that yields each entry acros
|
|
|
100
100
|
|---|---|---|---|
|
|
101
101
|
| `fields` | query | `Array<string>` | no |
|
|
102
102
|
|
|
103
|
-
**Request body** (`application/json`): `
|
|
103
|
+
**Request body** (`application/json`): `CreateFolderRequest`
|
|
104
104
|
|
|
105
105
|
**Returns:** `FolderFull`
|
|
106
106
|
|
|
@@ -119,7 +119,7 @@ const result = await client.folders.create({ /* … */ });
|
|
|
119
119
|
| `folder_id` | path | `string` | yes |
|
|
120
120
|
| `fields` | query | `Array<string>` | no |
|
|
121
121
|
|
|
122
|
-
**Request body** (`application/json`): `
|
|
122
|
+
**Request body** (`application/json`): `CopyFolderRequest`
|
|
123
123
|
|
|
124
124
|
**Returns:** `FolderFull`
|
|
125
125
|
|
package/docs/managers/groups.md
CHANGED
|
@@ -34,7 +34,7 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
|
|
|
34
34
|
|---|---|---|---|
|
|
35
35
|
| `fields` | query | `Array<string>` | no |
|
|
36
36
|
|
|
37
|
-
**Request body** (`application/json`): `
|
|
37
|
+
**Request body** (`application/json`): `CreateGroupRequest`
|
|
38
38
|
|
|
39
39
|
**Returns:** `GroupFull`
|
|
40
40
|
|
|
@@ -70,7 +70,7 @@ const result = await client.groups.get("GROUP_ID");
|
|
|
70
70
|
| `group_id` | path | `string` | yes |
|
|
71
71
|
| `fields` | query | `Array<string>` | no |
|
|
72
72
|
|
|
73
|
-
**Request body** (`application/json`): `
|
|
73
|
+
**Request body** (`application/json`): `UpdateGroupRequest`
|
|
74
74
|
|
|
75
75
|
**Returns:** `GroupFull`
|
|
76
76
|
|
|
@@ -51,7 +51,7 @@ const result = await client.integrationMappings.createSlack({ /* … */ });
|
|
|
51
51
|
|---|---|---|---|
|
|
52
52
|
| `integration_mapping_id` | path | `string` | yes |
|
|
53
53
|
|
|
54
|
-
**Request body** (`application/json`): `
|
|
54
|
+
**Request body** (`application/json`): `UpdateSlackRequest`
|
|
55
55
|
|
|
56
56
|
**Returns:** `IntegrationMapping`
|
|
57
57
|
|
|
@@ -118,7 +118,7 @@ const result = await client.integrationMappings.createTeams({ /* … */ });
|
|
|
118
118
|
|---|---|---|---|
|
|
119
119
|
| `integration_mapping_id` | path | `string` | yes |
|
|
120
120
|
|
|
121
|
-
**Request body** (`application/json`): `
|
|
121
|
+
**Request body** (`application/json`): `UpdateTeamRequest`
|
|
122
122
|
|
|
123
123
|
**Returns:** `IntegrationMappingTeams`
|
|
124
124
|
|
package/docs/managers/invites.md
CHANGED
|
@@ -11,7 +11,7 @@ Reach these methods through the `invites` field on `Client`.
|
|
|
11
11
|
|---|---|---|---|
|
|
12
12
|
| `fields` | query | `Array<string>` | no |
|
|
13
13
|
|
|
14
|
-
**Request body** (`application/json`): `
|
|
14
|
+
**Request body** (`application/json`): `CreateInviteRequest`
|
|
15
15
|
|
|
16
16
|
**Returns:** `Invite`
|
|
17
17
|
|
|
@@ -30,7 +30,7 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
|
|
|
30
30
|
|
|
31
31
|
`POST /legal_hold_policies`
|
|
32
32
|
|
|
33
|
-
**Request body** (`application/json`): `
|
|
33
|
+
**Request body** (`application/json`): `CreateLegalHoldPolicyRequest`
|
|
34
34
|
|
|
35
35
|
**Returns:** `LegalHoldPolicy`
|
|
36
36
|
|
|
@@ -64,7 +64,7 @@ const result = await client.legalHoldPolicies.get("LEGAL_HOLD_POLICY_ID");
|
|
|
64
64
|
|---|---|---|---|
|
|
65
65
|
| `legal_hold_policy_id` | path | `string` | yes |
|
|
66
66
|
|
|
67
|
-
**Request body** (`application/json`): `
|
|
67
|
+
**Request body** (`application/json`): `UpdateLegalHoldPolicyRequest`
|
|
68
68
|
|
|
69
69
|
**Returns:** `LegalHoldPolicy`
|
|
70
70
|
|
|
@@ -32,7 +32,7 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
|
|
|
32
32
|
|
|
33
33
|
`POST /legal_hold_policy_assignments`
|
|
34
34
|
|
|
35
|
-
**Request body** (`application/json`): `
|
|
35
|
+
**Request body** (`application/json`): `CreateLegalHoldPolicyAssignmentRequest`
|
|
36
36
|
|
|
37
37
|
**Returns:** `LegalHoldPolicyAssignment`
|
|
38
38
|
|
|
@@ -47,7 +47,7 @@ for await (const item of client.memberships.listGroup("GROUP_ID")) {
|
|
|
47
47
|
|
|
48
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).
|
|
49
49
|
|
|
50
|
-
##
|
|
50
|
+
## createGroupMembership
|
|
51
51
|
|
|
52
52
|
`POST /group_memberships`
|
|
53
53
|
|
|
@@ -55,17 +55,17 @@ Paginated — `listGroup(...)` is an async iterable that yields each entry acros
|
|
|
55
55
|
|---|---|---|---|
|
|
56
56
|
| `fields` | query | `Array<string>` | no |
|
|
57
57
|
|
|
58
|
-
**Request body** (`application/json`): `
|
|
58
|
+
**Request body** (`application/json`): `CreateGroupMembershipRequest`
|
|
59
59
|
|
|
60
60
|
**Returns:** `GroupMembership`
|
|
61
61
|
|
|
62
62
|
**Example**
|
|
63
63
|
|
|
64
64
|
```ts
|
|
65
|
-
const result = await client.memberships.
|
|
65
|
+
const result = await client.memberships.createGroupMembership({ /* … */ });
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
##
|
|
68
|
+
## getGroupMembership
|
|
69
69
|
|
|
70
70
|
`GET /group_memberships/{group_membership_id}`
|
|
71
71
|
|
|
@@ -79,10 +79,10 @@ const result = await client.memberships.createGroup({ /* … */ });
|
|
|
79
79
|
**Example**
|
|
80
80
|
|
|
81
81
|
```ts
|
|
82
|
-
const result = await client.memberships.
|
|
82
|
+
const result = await client.memberships.getGroupMembership("GROUP_MEMBERSHIP_ID");
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
##
|
|
85
|
+
## updateGroupMembership
|
|
86
86
|
|
|
87
87
|
`PUT /group_memberships/{group_membership_id}`
|
|
88
88
|
|
|
@@ -91,17 +91,17 @@ const result = await client.memberships.getGroup("GROUP_MEMBERSHIP_ID");
|
|
|
91
91
|
| `group_membership_id` | path | `string` | yes |
|
|
92
92
|
| `fields` | query | `Array<string>` | no |
|
|
93
93
|
|
|
94
|
-
**Request body** (`application/json`): `
|
|
94
|
+
**Request body** (`application/json`): `UpdateGroupMembershipRequest`
|
|
95
95
|
|
|
96
96
|
**Returns:** `GroupMembership`
|
|
97
97
|
|
|
98
98
|
**Example**
|
|
99
99
|
|
|
100
100
|
```ts
|
|
101
|
-
const result = await client.memberships.
|
|
101
|
+
const result = await client.memberships.updateGroupMembership("GROUP_MEMBERSHIP_ID", { /* … */ });
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
##
|
|
104
|
+
## deleteGroupMembership
|
|
105
105
|
|
|
106
106
|
`DELETE /group_memberships/{group_membership_id}`
|
|
107
107
|
|
|
@@ -114,6 +114,6 @@ const result = await client.memberships.updateGroup("GROUP_MEMBERSHIP_ID", { /*
|
|
|
114
114
|
**Example**
|
|
115
115
|
|
|
116
116
|
```ts
|
|
117
|
-
await client.memberships.
|
|
117
|
+
await client.memberships.deleteGroupMembership("GROUP_MEMBERSHIP_ID");
|
|
118
118
|
```
|
|
119
119
|
|