@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.
- package/LICENSE +21 -0
- package/README.md +47 -11
- package/dist/cjs/chunked_upload.js +108 -0
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/managers/chunked_uploads.js +4 -4
- package/dist/cjs/managers/search.js +1 -1
- package/dist/cjs/managers/transfer.js +1 -1
- package/dist/cjs/managers/uploads.js +2 -2
- package/dist/esm/chunked_upload.js +104 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/managers/chunked_uploads.js +4 -4
- package/dist/esm/managers/search.js +1 -1
- package/dist/esm/managers/transfer.js +1 -1
- package/dist/esm/managers/uploads.js +2 -2
- package/dist/types/chunked_upload.d.ts +21 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/managers/chunked_uploads.d.ts +2 -2
- package/dist/types/managers/search.d.ts +1 -1
- package/dist/types/managers/transfer.d.ts +3 -3
- package/dist/types/managers/uploads.d.ts +6 -6
- package/dist/types/models/schemas.d.ts +2 -2
- package/docs/auth.md +10 -10
- package/docs/errors.md +2 -2
- package/docs/managers/ai.md +30 -0
- package/docs/managers/ai_studio.md +32 -0
- package/docs/managers/app_item_associations.md +16 -0
- package/docs/managers/archives.md +26 -0
- package/docs/managers/authorization.md +24 -0
- package/docs/managers/automate_workflows.md +14 -0
- package/docs/managers/avatars.md +18 -0
- package/docs/managers/chunked_uploads.md +48 -4
- package/docs/managers/classifications.md +24 -0
- package/docs/managers/collaboration_allowlist_entries.md +26 -0
- package/docs/managers/collaboration_allowlist_exempt_targets.md +26 -0
- package/docs/managers/collections.md +22 -0
- package/docs/managers/comments.md +32 -0
- package/docs/managers/device_pinners.md +20 -0
- package/docs/managers/docgen.md +28 -0
- package/docs/managers/docgen_template.md +42 -0
- package/docs/managers/downloads.md +6 -0
- package/docs/managers/email_aliases.md +18 -0
- package/docs/managers/enterprise_configurations.md +6 -0
- package/docs/managers/events.md +12 -0
- package/docs/managers/external_users.md +6 -0
- package/docs/managers/file_classifications.md +24 -0
- package/docs/managers/file_metadata.md +30 -0
- package/docs/managers/file_requests.md +24 -0
- package/docs/managers/file_version_legal_holds.md +14 -0
- package/docs/managers/file_version_retentions.md +14 -0
- package/docs/managers/file_versions.md +32 -0
- package/docs/managers/file_watermarks.md +18 -0
- package/docs/managers/files.md +30 -0
- package/docs/managers/folder_classifications.md +24 -0
- package/docs/managers/folder_locks.md +18 -0
- package/docs/managers/folder_metadata.md +30 -0
- package/docs/managers/folder_watermarks.md +18 -0
- package/docs/managers/folders.md +38 -0
- package/docs/managers/groups.md +32 -0
- package/docs/managers/hub_collaborations.md +32 -0
- package/docs/managers/hub_document.md +16 -0
- package/docs/managers/hub_items.md +14 -0
- package/docs/managers/hubs.md +46 -0
- package/docs/managers/integration_mappings.md +50 -0
- package/docs/managers/invites.md +12 -0
- package/docs/managers/legal_hold_policies.md +32 -0
- package/docs/managers/legal_hold_policy_assignments.md +42 -0
- package/docs/managers/list_collaborations.md +32 -0
- package/docs/managers/memberships.md +40 -0
- package/docs/managers/metadata_cascade_policies.md +32 -0
- package/docs/managers/metadata_taxonomies.md +96 -0
- package/docs/managers/metadata_templates.md +54 -0
- package/docs/managers/notes.md +6 -0
- package/docs/managers/recent_items.md +8 -0
- package/docs/managers/retention_policies.md +32 -0
- package/docs/managers/retention_policy_assignments.md +42 -0
- package/docs/managers/search.md +13 -1
- package/docs/managers/session_termination.md +12 -0
- package/docs/managers/shared_links_app_items.md +6 -0
- package/docs/managers/shared_links_files.md +30 -0
- package/docs/managers/shared_links_folders.md +30 -0
- package/docs/managers/shared_links_web_links.md +30 -0
- package/docs/managers/shield_information_barrier_reports.md +20 -0
- package/docs/managers/shield_information_barrier_segment_members.md +26 -0
- package/docs/managers/shield_information_barrier_segment_restrictions.md +26 -0
- package/docs/managers/shield_information_barrier_segments.md +32 -0
- package/docs/managers/shield_information_barriers.md +26 -0
- package/docs/managers/shield_lists.md +30 -0
- package/docs/managers/sign_requests.md +32 -0
- package/docs/managers/sign_templates.md +14 -0
- package/docs/managers/skills.md +30 -0
- package/docs/managers/storage_policies.md +14 -0
- package/docs/managers/storage_policy_assignments.md +32 -0
- package/docs/managers/task_assignments.md +30 -0
- package/docs/managers/tasks.md +30 -0
- package/docs/managers/terms_of_service_user_statuses.md +18 -0
- package/docs/managers/terms_of_services.md +24 -0
- package/docs/managers/transfer.md +7 -1
- package/docs/managers/trashed_files.md +18 -0
- package/docs/managers/trashed_folders.md +18 -0
- package/docs/managers/trashed_items.md +8 -0
- package/docs/managers/trashed_web_links.md +18 -0
- package/docs/managers/uploads.md +20 -2
- package/docs/managers/user_collaborations.md +24 -0
- package/docs/managers/users.md +38 -0
- package/docs/managers/web_links.md +24 -0
- package/docs/managers/webhooks.md +32 -0
- package/docs/managers/workflows.md +14 -0
- package/docs/managers/zip_downloads.md +18 -0
- package/package.json +3 -3
package/docs/errors.md
CHANGED
|
@@ -9,11 +9,11 @@ when the failure came with a response, and the underlying `cause` for
|
|
|
9
9
|
transport or decode failures:
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
|
-
import {
|
|
12
|
+
import { runtime } from '@unofficialbox/box-open-sdk';
|
|
13
13
|
try {
|
|
14
14
|
await client.files.getFileById(fileId);
|
|
15
15
|
} catch (err) {
|
|
16
|
-
if (err instanceof BoxApiError) {
|
|
16
|
+
if (err instanceof runtime.BoxApiError) {
|
|
17
17
|
// err.status (number | undefined), err.cause
|
|
18
18
|
}
|
|
19
19
|
}
|
package/docs/managers/ai.md
CHANGED
|
@@ -11,6 +11,12 @@ Reach these methods through the `ai` field on `Client`.
|
|
|
11
11
|
|
|
12
12
|
**Returns:** `AiResponseFull`
|
|
13
13
|
|
|
14
|
+
**Example**
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
const result = await client.ai.ask({ /* … */ });
|
|
18
|
+
```
|
|
19
|
+
|
|
14
20
|
## createTextGen
|
|
15
21
|
|
|
16
22
|
`POST /ai/text_gen`
|
|
@@ -19,6 +25,12 @@ Reach these methods through the `ai` field on `Client`.
|
|
|
19
25
|
|
|
20
26
|
**Returns:** `AiResponse`
|
|
21
27
|
|
|
28
|
+
**Example**
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
const result = await client.ai.createTextGen({ /* … */ });
|
|
32
|
+
```
|
|
33
|
+
|
|
22
34
|
## getAgentDefault
|
|
23
35
|
|
|
24
36
|
`GET /ai_agent_default`
|
|
@@ -31,6 +43,12 @@ Reach these methods through the `ai` field on `Client`.
|
|
|
31
43
|
|
|
32
44
|
**Returns:** `AiAgent`
|
|
33
45
|
|
|
46
|
+
**Example**
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
const result = await client.ai.getAgentDefault("...");
|
|
50
|
+
```
|
|
51
|
+
|
|
34
52
|
## extract
|
|
35
53
|
|
|
36
54
|
`POST /ai/extract`
|
|
@@ -39,6 +57,12 @@ Reach these methods through the `ai` field on `Client`.
|
|
|
39
57
|
|
|
40
58
|
**Returns:** `AiResponse`
|
|
41
59
|
|
|
60
|
+
**Example**
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
const result = await client.ai.extract({ /* … */ });
|
|
64
|
+
```
|
|
65
|
+
|
|
42
66
|
## createExtractStructured
|
|
43
67
|
|
|
44
68
|
`POST /ai/extract_structured`
|
|
@@ -47,3 +71,9 @@ Reach these methods through the `ai` field on `Client`.
|
|
|
47
71
|
|
|
48
72
|
**Returns:** `AiExtractStructuredResponse`
|
|
49
73
|
|
|
74
|
+
**Example**
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
const result = await client.ai.createExtractStructured({ /* … */ });
|
|
78
|
+
```
|
|
79
|
+
|
|
@@ -18,6 +18,14 @@ Reach these methods through the `aiStudio` field on `Client`.
|
|
|
18
18
|
|
|
19
19
|
**Returns:** `AiMultipleAgentResponse`
|
|
20
20
|
|
|
21
|
+
**Example**
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
for await (const item of client.aiStudio.listAiAgents()) {
|
|
25
|
+
// use item
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
21
29
|
Paginated — `listAiAgents(...)` 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
|
## createAiAgents
|
|
@@ -28,6 +36,12 @@ Paginated — `listAiAgents(...)` is an async iterable that yields each entry ac
|
|
|
28
36
|
|
|
29
37
|
**Returns:** `AiSingleAgentResponseFull`
|
|
30
38
|
|
|
39
|
+
**Example**
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
const result = await client.aiStudio.createAiAgents({ /* … */ });
|
|
43
|
+
```
|
|
44
|
+
|
|
31
45
|
## getAiAgent
|
|
32
46
|
|
|
33
47
|
`GET /ai_agents/{agent_id}`
|
|
@@ -39,6 +53,12 @@ Paginated — `listAiAgents(...)` is an async iterable that yields each entry ac
|
|
|
39
53
|
|
|
40
54
|
**Returns:** `AiSingleAgentResponseFull`
|
|
41
55
|
|
|
56
|
+
**Example**
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
const result = await client.aiStudio.getAiAgent("AGENT_ID");
|
|
60
|
+
```
|
|
61
|
+
|
|
42
62
|
## updateAiAgent
|
|
43
63
|
|
|
44
64
|
`PUT /ai_agents/{agent_id}`
|
|
@@ -51,6 +71,12 @@ Paginated — `listAiAgents(...)` is an async iterable that yields each entry ac
|
|
|
51
71
|
|
|
52
72
|
**Returns:** `AiSingleAgentResponseFull`
|
|
53
73
|
|
|
74
|
+
**Example**
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
const result = await client.aiStudio.updateAiAgent("AGENT_ID", { /* … */ });
|
|
78
|
+
```
|
|
79
|
+
|
|
54
80
|
## deleteAiAgent
|
|
55
81
|
|
|
56
82
|
`DELETE /ai_agents/{agent_id}`
|
|
@@ -61,3 +87,9 @@ Paginated — `listAiAgents(...)` is an async iterable that yields each entry ac
|
|
|
61
87
|
|
|
62
88
|
**Returns:** `void`
|
|
63
89
|
|
|
90
|
+
**Example**
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
await client.aiStudio.deleteAiAgent("AGENT_ID");
|
|
94
|
+
```
|
|
95
|
+
|
|
@@ -16,6 +16,14 @@ Reach these methods through the `appItemAssociations` field on `Client`.
|
|
|
16
16
|
|
|
17
17
|
**Returns:** `AppItemAssociations`
|
|
18
18
|
|
|
19
|
+
**Example**
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
for await (const item of client.appItemAssociations.listFile("FILE_ID")) {
|
|
23
|
+
// use item
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
19
27
|
Paginated — `listFile(...)` 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
|
## listFolder
|
|
@@ -31,5 +39,13 @@ Paginated — `listFile(...)` is an async iterable that yields each entry across
|
|
|
31
39
|
|
|
32
40
|
**Returns:** `AppItemAssociations`
|
|
33
41
|
|
|
42
|
+
**Example**
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
for await (const item of client.appItemAssociations.listFolder("FOLDER_ID")) {
|
|
46
|
+
// use item
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
34
50
|
Paginated — `listFolder(...)` 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
|
|
|
@@ -14,6 +14,14 @@ Reach these methods through the `archives` field on `Client`.
|
|
|
14
14
|
|
|
15
15
|
**Returns:** `Archives`
|
|
16
16
|
|
|
17
|
+
**Example**
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
for await (const item of client.archives.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
|
## create
|
|
@@ -24,6 +32,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
|
|
|
24
32
|
|
|
25
33
|
**Returns:** `Archive`
|
|
26
34
|
|
|
35
|
+
**Example**
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
const result = await client.archives.create({ /* … */ });
|
|
39
|
+
```
|
|
40
|
+
|
|
27
41
|
## update
|
|
28
42
|
|
|
29
43
|
`PUT /archives/{archive_id}`
|
|
@@ -36,6 +50,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
|
|
|
36
50
|
|
|
37
51
|
**Returns:** `Archive`
|
|
38
52
|
|
|
53
|
+
**Example**
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
const result = await client.archives.update("ARCHIVE_ID", { /* … */ });
|
|
57
|
+
```
|
|
58
|
+
|
|
39
59
|
## delete_
|
|
40
60
|
|
|
41
61
|
`DELETE /archives/{archive_id}`
|
|
@@ -46,3 +66,9 @@ 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.archives.delete_("ARCHIVE_ID");
|
|
73
|
+
```
|
|
74
|
+
|
|
@@ -17,6 +17,12 @@ Reach these methods through the `authorization` field on `Client`.
|
|
|
17
17
|
|
|
18
18
|
**Returns:** text (`string`)
|
|
19
19
|
|
|
20
|
+
**Example**
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
const result = await client.authorization.authorize("...", "CLIENT_ID");
|
|
24
|
+
```
|
|
25
|
+
|
|
20
26
|
## createOauth2Token
|
|
21
27
|
|
|
22
28
|
`POST /oauth2/token`
|
|
@@ -25,6 +31,12 @@ Reach these methods through the `authorization` field on `Client`.
|
|
|
25
31
|
|
|
26
32
|
**Returns:** `AccessToken`
|
|
27
33
|
|
|
34
|
+
**Example**
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
const result = await client.authorization.createOauth2Token({ /* … */ });
|
|
38
|
+
```
|
|
39
|
+
|
|
28
40
|
## createOauth2TokenRefresh
|
|
29
41
|
|
|
30
42
|
`POST /oauth2/token`
|
|
@@ -33,6 +45,12 @@ Reach these methods through the `authorization` field on `Client`.
|
|
|
33
45
|
|
|
34
46
|
**Returns:** `AccessToken`
|
|
35
47
|
|
|
48
|
+
**Example**
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
const result = await client.authorization.createOauth2TokenRefresh({ /* … */ });
|
|
52
|
+
```
|
|
53
|
+
|
|
36
54
|
## revokeOauth2
|
|
37
55
|
|
|
38
56
|
`POST /oauth2/revoke`
|
|
@@ -41,3 +59,9 @@ Reach these methods through the `authorization` field on `Client`.
|
|
|
41
59
|
|
|
42
60
|
**Returns:** `void`
|
|
43
61
|
|
|
62
|
+
**Example**
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
await client.authorization.revokeOauth2({ /* … */ });
|
|
66
|
+
```
|
|
67
|
+
|
|
@@ -15,6 +15,14 @@ Reach these methods through the `automateWorkflows` field on `Client`.
|
|
|
15
15
|
|
|
16
16
|
**Returns:** `AutomateWorkflows`
|
|
17
17
|
|
|
18
|
+
**Example**
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
for await (const item of client.automateWorkflows.list("FOLDER_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
|
## start
|
|
@@ -29,3 +37,9 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
|
|
|
29
37
|
|
|
30
38
|
**Returns:** `void`
|
|
31
39
|
|
|
40
|
+
**Example**
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
await client.automateWorkflows.start("WORKFLOW_ID", { /* … */ });
|
|
44
|
+
```
|
|
45
|
+
|
package/docs/managers/avatars.md
CHANGED
|
@@ -13,6 +13,12 @@ Reach these methods through the `avatars` field on `Client`.
|
|
|
13
13
|
|
|
14
14
|
**Returns:** a binary stream (`runtime.Stream`)
|
|
15
15
|
|
|
16
|
+
**Example**
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
const result = await client.avatars.getUserAvatar("USER_ID");
|
|
20
|
+
```
|
|
21
|
+
|
|
16
22
|
## createUserAvatar
|
|
17
23
|
|
|
18
24
|
`POST /users/{user_id}/avatar`
|
|
@@ -25,6 +31,12 @@ Reach these methods through the `avatars` field on `Client`.
|
|
|
25
31
|
|
|
26
32
|
**Returns:** `UserAvatar`
|
|
27
33
|
|
|
34
|
+
**Example**
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
const result = await client.avatars.createUserAvatar("USER_ID", { /* … */ });
|
|
38
|
+
```
|
|
39
|
+
|
|
28
40
|
## deleteUserAvatar
|
|
29
41
|
|
|
30
42
|
`DELETE /users/{user_id}/avatar`
|
|
@@ -35,3 +47,9 @@ Reach these methods through the `avatars` field on `Client`.
|
|
|
35
47
|
|
|
36
48
|
**Returns:** `void`
|
|
37
49
|
|
|
50
|
+
**Example**
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
await client.avatars.deleteUserAvatar("USER_ID");
|
|
54
|
+
```
|
|
55
|
+
|
|
@@ -3,15 +3,21 @@
|
|
|
3
3
|
|
|
4
4
|
Reach these methods through the `chunkedUploads` field on `Client`.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## createFileUploadSession
|
|
7
7
|
|
|
8
8
|
`POST /files/upload_sessions`
|
|
9
9
|
|
|
10
|
-
**Request body** (`application/json`): `
|
|
10
|
+
**Request body** (`application/json`): `FileUploadSessionCreateRequest`
|
|
11
11
|
|
|
12
12
|
**Returns:** `UploadSession`
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
**Example**
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
const result = await client.chunkedUploads.createFileUploadSession({ /* … */ });
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## createFileVersionUploadSession
|
|
15
21
|
|
|
16
22
|
`POST /files/{file_id}/upload_sessions`
|
|
17
23
|
|
|
@@ -19,10 +25,16 @@ Reach these methods through the `chunkedUploads` field on `Client`.
|
|
|
19
25
|
|---|---|---|---|
|
|
20
26
|
| `file_id` | path | `string` | yes |
|
|
21
27
|
|
|
22
|
-
**Request body** (`application/json`): `
|
|
28
|
+
**Request body** (`application/json`): `FileVersionUploadSessionCreateRequest`
|
|
23
29
|
|
|
24
30
|
**Returns:** `UploadSession`
|
|
25
31
|
|
|
32
|
+
**Example**
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
const result = await client.chunkedUploads.createFileVersionUploadSession("FILE_ID", { /* … */ });
|
|
36
|
+
```
|
|
37
|
+
|
|
26
38
|
## getFileUploadSession
|
|
27
39
|
|
|
28
40
|
`GET /files/upload_sessions/{upload_session_id}`
|
|
@@ -33,6 +45,12 @@ Reach these methods through the `chunkedUploads` field on `Client`.
|
|
|
33
45
|
|
|
34
46
|
**Returns:** `UploadSession`
|
|
35
47
|
|
|
48
|
+
**Example**
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
const result = await client.chunkedUploads.getFileUploadSession("UPLOAD_SESSION_ID");
|
|
52
|
+
```
|
|
53
|
+
|
|
36
54
|
## updateFileUploadSession
|
|
37
55
|
|
|
38
56
|
`PUT /files/upload_sessions/{upload_session_id}`
|
|
@@ -47,6 +65,12 @@ Reach these methods through the `chunkedUploads` field on `Client`.
|
|
|
47
65
|
|
|
48
66
|
**Returns:** `UploadedPart`
|
|
49
67
|
|
|
68
|
+
**Example**
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
const result = await client.chunkedUploads.updateFileUploadSession("UPLOAD_SESSION_ID", "DIGEST", "CONTENT-RANGE", { /* … */ });
|
|
72
|
+
```
|
|
73
|
+
|
|
50
74
|
## deleteFileUploadSession
|
|
51
75
|
|
|
52
76
|
`DELETE /files/upload_sessions/{upload_session_id}`
|
|
@@ -57,6 +81,12 @@ Reach these methods through the `chunkedUploads` field on `Client`.
|
|
|
57
81
|
|
|
58
82
|
**Returns:** `void`
|
|
59
83
|
|
|
84
|
+
**Example**
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
await client.chunkedUploads.deleteFileUploadSession("UPLOAD_SESSION_ID");
|
|
88
|
+
```
|
|
89
|
+
|
|
60
90
|
## listFileUploadSessionParts
|
|
61
91
|
|
|
62
92
|
`GET /files/upload_sessions/{upload_session_id}/parts`
|
|
@@ -69,6 +99,14 @@ Reach these methods through the `chunkedUploads` field on `Client`.
|
|
|
69
99
|
|
|
70
100
|
**Returns:** `UploadParts`
|
|
71
101
|
|
|
102
|
+
**Example**
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
for await (const item of client.chunkedUploads.listFileUploadSessionParts("UPLOAD_SESSION_ID")) {
|
|
106
|
+
// use item
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
72
110
|
Paginated — `listFileUploadSessionParts(...)` 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).
|
|
73
111
|
|
|
74
112
|
## commitFileUploadSession
|
|
@@ -86,3 +124,9 @@ Paginated — `listFileUploadSessionParts(...)` is an async iterable that yields
|
|
|
86
124
|
|
|
87
125
|
**Returns:** `Files`
|
|
88
126
|
|
|
127
|
+
**Example**
|
|
128
|
+
|
|
129
|
+
```ts
|
|
130
|
+
const result = await client.chunkedUploads.commitFileUploadSession("UPLOAD_SESSION_ID", "DIGEST", { /* … */ });
|
|
131
|
+
```
|
|
132
|
+
|
|
@@ -9,6 +9,12 @@ Reach these methods through the `classifications` field on `Client`.
|
|
|
9
9
|
|
|
10
10
|
**Returns:** `ClassificationTemplate`
|
|
11
11
|
|
|
12
|
+
**Example**
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
const result = await client.classifications.get();
|
|
16
|
+
```
|
|
17
|
+
|
|
12
18
|
## updateAdd
|
|
13
19
|
|
|
14
20
|
`PUT /metadata_templates/enterprise/securityClassification-6VMVochwUWo/schema`
|
|
@@ -17,6 +23,12 @@ Reach these methods through the `classifications` field on `Client`.
|
|
|
17
23
|
|
|
18
24
|
**Returns:** `ClassificationTemplate`
|
|
19
25
|
|
|
26
|
+
**Example**
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
const result = await client.classifications.updateAdd([]);
|
|
30
|
+
```
|
|
31
|
+
|
|
20
32
|
## updateUpdate
|
|
21
33
|
|
|
22
34
|
`PUT /metadata_templates/enterprise/securityClassification-6VMVochwUWo/schema`
|
|
@@ -25,6 +37,12 @@ Reach these methods through the `classifications` field on `Client`.
|
|
|
25
37
|
|
|
26
38
|
**Returns:** `ClassificationTemplate`
|
|
27
39
|
|
|
40
|
+
**Example**
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
const result = await client.classifications.updateUpdate([]);
|
|
44
|
+
```
|
|
45
|
+
|
|
28
46
|
## createMetadataTemplateSchemaClassifications
|
|
29
47
|
|
|
30
48
|
`POST /metadata_templates/schema`
|
|
@@ -33,3 +51,9 @@ Reach these methods through the `classifications` field on `Client`.
|
|
|
33
51
|
|
|
34
52
|
**Returns:** `ClassificationTemplate`
|
|
35
53
|
|
|
54
|
+
**Example**
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
const result = await client.classifications.createMetadataTemplateSchemaClassifications({ /* … */ });
|
|
58
|
+
```
|
|
59
|
+
|
|
@@ -14,6 +14,14 @@ Reach these methods through the `collaborationAllowlistEntries` field on `Client
|
|
|
14
14
|
|
|
15
15
|
**Returns:** `CollaborationAllowlistEntries`
|
|
16
16
|
|
|
17
|
+
**Example**
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
for await (const item of client.collaborationAllowlistEntries.listCollaborationWhitelistEntries()) {
|
|
21
|
+
// use item
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
17
25
|
Paginated — `listCollaborationWhitelistEntries(...)` 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
|
## createCollaborationWhitelistEntries
|
|
@@ -24,6 +32,12 @@ Paginated — `listCollaborationWhitelistEntries(...)` is an async iterable that
|
|
|
24
32
|
|
|
25
33
|
**Returns:** `CollaborationAllowlistEntry`
|
|
26
34
|
|
|
35
|
+
**Example**
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
const result = await client.collaborationAllowlistEntries.createCollaborationWhitelistEntries({ /* … */ });
|
|
39
|
+
```
|
|
40
|
+
|
|
27
41
|
## getCollaborationWhitelistEntry
|
|
28
42
|
|
|
29
43
|
`GET /collaboration_whitelist_entries/{collaboration_whitelist_entry_id}`
|
|
@@ -34,6 +48,12 @@ Paginated — `listCollaborationWhitelistEntries(...)` is an async iterable that
|
|
|
34
48
|
|
|
35
49
|
**Returns:** `CollaborationAllowlistEntry`
|
|
36
50
|
|
|
51
|
+
**Example**
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
const result = await client.collaborationAllowlistEntries.getCollaborationWhitelistEntry("COLLABORATION_WHITELIST_ENTRY_ID");
|
|
55
|
+
```
|
|
56
|
+
|
|
37
57
|
## deleteCollaborationWhitelistEntry
|
|
38
58
|
|
|
39
59
|
`DELETE /collaboration_whitelist_entries/{collaboration_whitelist_entry_id}`
|
|
@@ -44,3 +64,9 @@ Paginated — `listCollaborationWhitelistEntries(...)` is an async iterable that
|
|
|
44
64
|
|
|
45
65
|
**Returns:** `void`
|
|
46
66
|
|
|
67
|
+
**Example**
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
await client.collaborationAllowlistEntries.deleteCollaborationWhitelistEntry("COLLABORATION_WHITELIST_ENTRY_ID");
|
|
71
|
+
```
|
|
72
|
+
|
|
@@ -14,6 +14,14 @@ Reach these methods through the `collaborationAllowlistExemptTargets` field on `
|
|
|
14
14
|
|
|
15
15
|
**Returns:** `CollaborationAllowlistExemptTargets`
|
|
16
16
|
|
|
17
|
+
**Example**
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
for await (const item of client.collaborationAllowlistExemptTargets.listCollaborationWhitelistExemptTargets()) {
|
|
21
|
+
// use item
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
17
25
|
Paginated — `listCollaborationWhitelistExemptTargets(...)` 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
|
## createCollaborationWhitelistExemptTargets
|
|
@@ -24,6 +32,12 @@ Paginated — `listCollaborationWhitelistExemptTargets(...)` is an async iterabl
|
|
|
24
32
|
|
|
25
33
|
**Returns:** `CollaborationAllowlistExemptTarget`
|
|
26
34
|
|
|
35
|
+
**Example**
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
const result = await client.collaborationAllowlistExemptTargets.createCollaborationWhitelistExemptTargets({ /* … */ });
|
|
39
|
+
```
|
|
40
|
+
|
|
27
41
|
## getCollaborationWhitelistExemptTarget
|
|
28
42
|
|
|
29
43
|
`GET /collaboration_whitelist_exempt_targets/{collaboration_whitelist_exempt_target_id}`
|
|
@@ -34,6 +48,12 @@ Paginated — `listCollaborationWhitelistExemptTargets(...)` is an async iterabl
|
|
|
34
48
|
|
|
35
49
|
**Returns:** `CollaborationAllowlistExemptTarget`
|
|
36
50
|
|
|
51
|
+
**Example**
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
const result = await client.collaborationAllowlistExemptTargets.getCollaborationWhitelistExemptTarget("COLLABORATION_WHITELIST_EXEMPT_TARGET_ID");
|
|
55
|
+
```
|
|
56
|
+
|
|
37
57
|
## deleteCollaborationWhitelistExemptTarget
|
|
38
58
|
|
|
39
59
|
`DELETE /collaboration_whitelist_exempt_targets/{collaboration_whitelist_exempt_target_id}`
|
|
@@ -44,3 +64,9 @@ Paginated — `listCollaborationWhitelistExemptTargets(...)` is an async iterabl
|
|
|
44
64
|
|
|
45
65
|
**Returns:** `void`
|
|
46
66
|
|
|
67
|
+
**Example**
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
await client.collaborationAllowlistExemptTargets.deleteCollaborationWhitelistExemptTarget("COLLABORATION_WHITELIST_EXEMPT_TARGET_ID");
|
|
71
|
+
```
|
|
72
|
+
|
|
@@ -15,6 +15,14 @@ Reach these methods through the `collections` field on `Client`.
|
|
|
15
15
|
|
|
16
16
|
**Returns:** `Collections`
|
|
17
17
|
|
|
18
|
+
**Example**
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
for await (const item of client.collections.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
|
## listItems
|
|
@@ -30,6 +38,14 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
|
|
|
30
38
|
|
|
31
39
|
**Returns:** `ItemsOffsetPaginated`
|
|
32
40
|
|
|
41
|
+
**Example**
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
for await (const item of client.collections.listItems("COLLECTION_ID")) {
|
|
45
|
+
// use item
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
33
49
|
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).
|
|
34
50
|
|
|
35
51
|
## get
|
|
@@ -42,3 +58,9 @@ Paginated — `listItems(...)` is an async iterable that yields each entry acros
|
|
|
42
58
|
|
|
43
59
|
**Returns:** `Collection`
|
|
44
60
|
|
|
61
|
+
**Example**
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
const result = await client.collections.get("COLLECTION_ID");
|
|
65
|
+
```
|
|
66
|
+
|
|
@@ -16,6 +16,14 @@ Reach these methods through the `comments` field on `Client`.
|
|
|
16
16
|
|
|
17
17
|
**Returns:** `Comments`
|
|
18
18
|
|
|
19
|
+
**Example**
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
for await (const item of client.comments.listFile("FILE_ID")) {
|
|
23
|
+
// use item
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
19
27
|
Paginated — `listFile(...)` 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
|
## get
|
|
@@ -29,6 +37,12 @@ Paginated — `listFile(...)` is an async iterable that yields each entry across
|
|
|
29
37
|
|
|
30
38
|
**Returns:** `CommentFull`
|
|
31
39
|
|
|
40
|
+
**Example**
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
const result = await client.comments.get("COMMENT_ID");
|
|
44
|
+
```
|
|
45
|
+
|
|
32
46
|
## update
|
|
33
47
|
|
|
34
48
|
`PUT /comments/{comment_id}`
|
|
@@ -42,6 +56,12 @@ Paginated — `listFile(...)` is an async iterable that yields each entry across
|
|
|
42
56
|
|
|
43
57
|
**Returns:** `CommentFull`
|
|
44
58
|
|
|
59
|
+
**Example**
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
const result = await client.comments.update("COMMENT_ID", { /* … */ });
|
|
63
|
+
```
|
|
64
|
+
|
|
45
65
|
## delete_
|
|
46
66
|
|
|
47
67
|
`DELETE /comments/{comment_id}`
|
|
@@ -52,6 +72,12 @@ Paginated — `listFile(...)` is an async iterable that yields each entry across
|
|
|
52
72
|
|
|
53
73
|
**Returns:** `void`
|
|
54
74
|
|
|
75
|
+
**Example**
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
await client.comments.delete_("COMMENT_ID");
|
|
79
|
+
```
|
|
80
|
+
|
|
55
81
|
## create
|
|
56
82
|
|
|
57
83
|
`POST /comments`
|
|
@@ -64,3 +90,9 @@ Paginated — `listFile(...)` is an async iterable that yields each entry across
|
|
|
64
90
|
|
|
65
91
|
**Returns:** `CommentFull`
|
|
66
92
|
|
|
93
|
+
**Example**
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
const result = await client.comments.create({ /* … */ });
|
|
97
|
+
```
|
|
98
|
+
|