@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
@@ -11,6 +11,12 @@ Reach these methods through the `webLinks` field on `Client`.
11
11
 
12
12
  **Returns:** `WebLink`
13
13
 
14
+ **Example**
15
+
16
+ ```ts
17
+ const result = await client.webLinks.create({ /* … */ });
18
+ ```
19
+
14
20
  ## get
15
21
 
16
22
  `GET /web_links/{web_link_id}`
@@ -22,6 +28,12 @@ Reach these methods through the `webLinks` field on `Client`.
22
28
 
23
29
  **Returns:** `WebLink`
24
30
 
31
+ **Example**
32
+
33
+ ```ts
34
+ const result = await client.webLinks.get("WEB_LINK_ID");
35
+ ```
36
+
25
37
  ## update
26
38
 
27
39
  `PUT /web_links/{web_link_id}`
@@ -34,6 +46,12 @@ Reach these methods through the `webLinks` field on `Client`.
34
46
 
35
47
  **Returns:** `WebLink`
36
48
 
49
+ **Example**
50
+
51
+ ```ts
52
+ const result = await client.webLinks.update("WEB_LINK_ID", { /* … */ });
53
+ ```
54
+
37
55
  ## delete_
38
56
 
39
57
  `DELETE /web_links/{web_link_id}`
@@ -44,3 +62,9 @@ Reach these methods through the `webLinks` field on `Client`.
44
62
 
45
63
  **Returns:** `void`
46
64
 
65
+ **Example**
66
+
67
+ ```ts
68
+ await client.webLinks.delete_("WEB_LINK_ID");
69
+ ```
70
+
@@ -14,6 +14,14 @@ Reach these methods through the `webhooks` field on `Client`.
14
14
 
15
15
  **Returns:** `Webhooks`
16
16
 
17
+ **Example**
18
+
19
+ ```ts
20
+ for await (const item of client.webhooks.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:** `Webhook`
26
34
 
35
+ **Example**
36
+
37
+ ```ts
38
+ const result = await client.webhooks.create({ /* … */ });
39
+ ```
40
+
27
41
  ## get
28
42
 
29
43
  `GET /webhooks/{webhook_id}`
@@ -34,6 +48,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
34
48
 
35
49
  **Returns:** `Webhook`
36
50
 
51
+ **Example**
52
+
53
+ ```ts
54
+ const result = await client.webhooks.get("WEBHOOK_ID");
55
+ ```
56
+
37
57
  ## update
38
58
 
39
59
  `PUT /webhooks/{webhook_id}`
@@ -46,6 +66,12 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
46
66
 
47
67
  **Returns:** `Webhook`
48
68
 
69
+ **Example**
70
+
71
+ ```ts
72
+ const result = await client.webhooks.update("WEBHOOK_ID", { /* … */ });
73
+ ```
74
+
49
75
  ## delete_
50
76
 
51
77
  `DELETE /webhooks/{webhook_id}`
@@ -56,3 +82,9 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
56
82
 
57
83
  **Returns:** `void`
58
84
 
85
+ **Example**
86
+
87
+ ```ts
88
+ await client.webhooks.delete_("WEBHOOK_ID");
89
+ ```
90
+
@@ -16,6 +16,14 @@ Reach these methods through the `workflows` field on `Client`.
16
16
 
17
17
  **Returns:** `Workflows`
18
18
 
19
+ **Example**
20
+
21
+ ```ts
22
+ for await (const item of client.workflows.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
  ## start
@@ -30,3 +38,9 @@ Paginated — `list(...)` is an async iterable that yields each entry across pag
30
38
 
31
39
  **Returns:** `void`
32
40
 
41
+ **Example**
42
+
43
+ ```ts
44
+ await client.workflows.start("WORKFLOW_ID", { /* … */ });
45
+ ```
46
+
@@ -11,6 +11,12 @@ Reach these methods through the `zipDownloads` field on `Client`.
11
11
 
12
12
  **Returns:** `ZipDownload`
13
13
 
14
+ **Example**
15
+
16
+ ```ts
17
+ const result = await client.zipDownloads.create({ /* … */ });
18
+ ```
19
+
14
20
  ## getContent
15
21
 
16
22
  `GET /zip_downloads/{zip_download_id}/content`
@@ -21,6 +27,12 @@ Reach these methods through the `zipDownloads` field on `Client`.
21
27
 
22
28
  **Returns:** a binary stream (`runtime.Stream`)
23
29
 
30
+ **Example**
31
+
32
+ ```ts
33
+ const result = await client.zipDownloads.getContent("ZIP_DOWNLOAD_ID");
34
+ ```
35
+
24
36
  ## getStatus
25
37
 
26
38
  `GET /zip_downloads/{zip_download_id}/status`
@@ -31,3 +43,9 @@ Reach these methods through the `zipDownloads` field on `Client`.
31
43
 
32
44
  **Returns:** `ZipDownloadStatus`
33
45
 
46
+ **Example**
47
+
48
+ ```ts
49
+ const result = await client.zipDownloads.getStatus("ZIP_DOWNLOAD_ID");
50
+ ```
51
+
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@unofficialbox/box-open-sdk",
3
- "version": "0.1.2",
4
- "description": "Community, unofficial Box API client for TypeScript — typed models, async managers, and a fetch runtime with retry, backoff, and token refresh.",
3
+ "version": "0.3.1",
4
+ "description": "Box API client for TypeScript (open source, community, punk rock) — typed models, async managers, and a fetch runtime with retry, backoff, and token refresh.",
5
5
  "keywords": ["box", "box-api", "sdk", "api-client", "typescript", "unofficial"],
6
6
  "license": "MIT",
7
- "repository": { "type": "git", "url": "git+https://github.com/unofficialbox/box-open-ts-sdk.git" },
7
+ "repository": { "type": "git", "url": "git+https://github.com/unofficialbox/box-gantry.git" },
8
8
  "homepage": "https://github.com/unofficialbox/box-open-ts-sdk",
9
9
  "type": "module",
10
10
  "sideEffects": false,