box-node-sdk 1.38.0 → 2.1.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.
Files changed (115) hide show
  1. package/CHANGELOG.md +228 -196
  2. package/README.md +42 -18
  3. package/lib/api-request.js +5 -5
  4. package/lib/api-request.js.map +1 -1
  5. package/lib/box-client.d.ts +3 -1
  6. package/lib/box-client.js +55 -26
  7. package/lib/box-client.js.map +1 -1
  8. package/lib/box-node-sdk.d.ts +23 -10
  9. package/lib/box-node-sdk.js +40 -11
  10. package/lib/box-node-sdk.js.map +1 -1
  11. package/lib/managers/collaboration-allowlist.js +8 -8
  12. package/lib/managers/collaboration-allowlist.js.map +1 -1
  13. package/lib/managers/collaborations.js +3 -3
  14. package/lib/managers/collaborations.js.map +1 -1
  15. package/lib/managers/collections.js +1 -1
  16. package/lib/managers/collections.js.map +1 -1
  17. package/lib/managers/comments.js +3 -3
  18. package/lib/managers/comments.js.map +1 -1
  19. package/lib/managers/device-pins.js +3 -3
  20. package/lib/managers/device-pins.js.map +1 -1
  21. package/lib/managers/enterprise.d.ts +2 -0
  22. package/lib/managers/enterprise.js +6 -5
  23. package/lib/managers/enterprise.js.map +1 -1
  24. package/lib/managers/events.js +3 -3
  25. package/lib/managers/events.js.map +1 -1
  26. package/lib/managers/files.js +39 -39
  27. package/lib/managers/files.js.map +1 -1
  28. package/lib/managers/folders.js +19 -19
  29. package/lib/managers/folders.js.map +1 -1
  30. package/lib/managers/groups.js +11 -11
  31. package/lib/managers/groups.js.map +1 -1
  32. package/lib/managers/legal-hold-policies.js +11 -11
  33. package/lib/managers/legal-hold-policies.js.map +1 -1
  34. package/lib/managers/metadata.d.ts +4 -2
  35. package/lib/managers/metadata.js +28 -14
  36. package/lib/managers/metadata.js.map +1 -1
  37. package/lib/managers/recent-items.js +1 -1
  38. package/lib/managers/recent-items.js.map +1 -1
  39. package/lib/managers/retention-policies.js +11 -11
  40. package/lib/managers/retention-policies.js.map +1 -1
  41. package/lib/managers/search.js +1 -1
  42. package/lib/managers/search.js.map +1 -1
  43. package/lib/managers/sign-requests.generated.d.ts +92 -0
  44. package/lib/managers/sign-requests.generated.js +108 -0
  45. package/lib/managers/sign-requests.generated.js.map +1 -0
  46. package/lib/managers/storage-policies.js +7 -7
  47. package/lib/managers/storage-policies.js.map +1 -1
  48. package/lib/managers/tasks.js +10 -10
  49. package/lib/managers/tasks.js.map +1 -1
  50. package/lib/managers/terms-of-service.js +8 -8
  51. package/lib/managers/terms-of-service.js.map +1 -1
  52. package/lib/managers/trash.js +1 -1
  53. package/lib/managers/trash.js.map +1 -1
  54. package/lib/managers/users.js +8 -8
  55. package/lib/managers/users.js.map +1 -1
  56. package/lib/managers/web-links.js +6 -6
  57. package/lib/managers/web-links.js.map +1 -1
  58. package/lib/managers/webhooks.js +5 -5
  59. package/lib/managers/webhooks.js.map +1 -1
  60. package/lib/schemas/file-base.generated.d.ts +32 -0
  61. package/lib/schemas/file-base.generated.js +3 -0
  62. package/lib/schemas/file-base.generated.js.map +1 -0
  63. package/lib/schemas/file-mini.generated.d.ts +41 -0
  64. package/lib/schemas/file-mini.generated.js +3 -0
  65. package/lib/schemas/file-mini.generated.js.map +1 -0
  66. package/lib/schemas/file-version-base.generated.d.ts +19 -0
  67. package/lib/schemas/file-version-base.generated.js +3 -0
  68. package/lib/schemas/file-version-base.generated.js.map +1 -0
  69. package/lib/schemas/file-version-mini.generated.d.ts +14 -0
  70. package/lib/schemas/file-version-mini.generated.js +3 -0
  71. package/lib/schemas/file-version-mini.generated.js.map +1 -0
  72. package/lib/schemas/folder-base.generated.d.ts +32 -0
  73. package/lib/schemas/folder-base.generated.js +3 -0
  74. package/lib/schemas/folder-base.generated.js.map +1 -0
  75. package/lib/schemas/folder-mini.generated.d.ts +31 -0
  76. package/lib/schemas/folder-mini.generated.js +3 -0
  77. package/lib/schemas/folder-mini.generated.js.map +1 -0
  78. package/lib/schemas/index.d.ts +13 -0
  79. package/lib/schemas/index.js +26 -0
  80. package/lib/schemas/index.js.map +1 -0
  81. package/lib/schemas/sign-request-create-request.generated.d.ts +62 -0
  82. package/lib/schemas/sign-request-create-request.generated.js +3 -0
  83. package/lib/schemas/sign-request-create-request.generated.js.map +1 -0
  84. package/lib/schemas/sign-request-create-signer.generated.d.ts +38 -0
  85. package/lib/schemas/sign-request-create-signer.generated.js +3 -0
  86. package/lib/schemas/sign-request-create-signer.generated.js.map +1 -0
  87. package/lib/schemas/sign-request-prefill-tag.generated.d.ts +28 -0
  88. package/lib/schemas/sign-request-prefill-tag.generated.js +3 -0
  89. package/lib/schemas/sign-request-prefill-tag.generated.js.map +1 -0
  90. package/lib/schemas/sign-request-signer-input.generated.d.ts +18 -0
  91. package/lib/schemas/sign-request-signer-input.generated.js +3 -0
  92. package/lib/schemas/sign-request-signer-input.generated.js.map +1 -0
  93. package/lib/schemas/sign-request-signer.generated.d.ts +23 -0
  94. package/lib/schemas/sign-request-signer.generated.js +3 -0
  95. package/lib/schemas/sign-request-signer.generated.js.map +1 -0
  96. package/lib/schemas/sign-request.generated.d.ts +50 -0
  97. package/lib/schemas/sign-request.generated.js +3 -0
  98. package/lib/schemas/sign-request.generated.js.map +1 -0
  99. package/lib/schemas/sign-requests.generated.d.ts +27 -0
  100. package/lib/schemas/sign-requests.generated.js +3 -0
  101. package/lib/schemas/sign-requests.generated.js.map +1 -0
  102. package/lib/sessions/app-auth-session.js +1 -1
  103. package/lib/sessions/app-auth-session.js.map +1 -1
  104. package/lib/sessions/{anonymous-session.d.ts → ccg-session.d.ts} +18 -15
  105. package/lib/sessions/{anonymous-session.js → ccg-session.js} +23 -23
  106. package/lib/sessions/ccg-session.js.map +1 -0
  107. package/lib/sessions/persistent-session.js +2 -2
  108. package/lib/sessions/persistent-session.js.map +1 -1
  109. package/lib/token-manager.js +11 -10
  110. package/lib/token-manager.js.map +1 -1
  111. package/lib/util/serializable.d.ts +10 -0
  112. package/lib/util/serializable.js +18 -0
  113. package/lib/util/serializable.js.map +1 -0
  114. package/package.json +19 -9
  115. package/lib/sessions/anonymous-session.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,356 +1,388 @@
1
1
  # Changelog
2
2
 
3
- ## Next Release
3
+ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ## 1.38.0 (2021-08-05)
5
+ ## [2.1.0](https://github.com/box/box-node-sdk/compare/v2.0.0...v2.1.0) (2022-03-28)
6
6
 
7
- **New Features and Enhancements:**
8
7
 
9
- - Add sensitive-language event types for admin invites ([#648](https://github.com/box/box-node-sdk/pull/648))
10
- - Use BetterDocs to adapt JSDocs to TypeScript ([#646](https://github.com/box/box-node-sdk/pull/646))
11
- - Change ProxyAgent import to be dynamic ([#641](https://github.com/box/box-node-sdk/pull/641))
12
- - New API for get files and file versions under retention ([#585](https://github.com/box/box-node-sdk/pull/585))
8
+ ### New Features and Enhancements
13
9
 
14
- **Bug Fixes:**
10
+ * Client Credentials Grant authentication method ([#709](https://github.com/box/box-node-sdk/issues/709)) ([fbf4e80](https://github.com/box/box-node-sdk/commit/fbf4e80648821e38479b24bf489e7d222ae6c18f))
11
+ * Deprecating `index_name` when executing metadata query ([#686](https://github.com/box/box-node-sdk/issues/686)) ([e01cc65](https://github.com/box/box-node-sdk/commit/e01cc650e4e793955be543e93928ad82a3254492))
12
+ * **test:** add support for testing with Jest ([#676](https://github.com/box/box-node-sdk/issues/676)) ([1a11759](https://github.com/box/box-node-sdk/commit/1a11759db999510c69d6a27f7becd565620bb000))
15
13
 
16
- - Deeply freeze Config except Buffers and Readable streams ([#651](https://github.com/box/box-node-sdk/pull/651))
17
- - Fix a typo in docs of src/managers/search.ts ([#649](https://github.com/box/box-node-sdk/pull/649))
18
- - Update broken documentation link ([#647](https://github.com/box/box-node-sdk/pull/647))
19
- - fix type annotations for exchangeToken functions ([#645](https://github.com/box/box-node-sdk/pull/645))
20
- - Deprecate files getThumbnail API in favor of getRepresentationContent ([#627](https://github.com/box/box-node-sdk/pull/627))
14
+ ### Bug Fixes
21
15
 
22
- ## 1.37.2 (2021-05-20)
16
+ * Client Credentials Grant authentication method supports token down-scoping ([#710](https://github.com/box/box-node-sdk/issues/710)) ([730368f](https://github.com/box/box-node-sdk/commit/730368f410ff56e9a8c90feea2192b29c08df198))
17
+ * Fix JWT expiration field being float instead of integer ([#715](https://github.com/box/box-node-sdk/issues/715)) ([7e950f1](https://github.com/box/box-node-sdk/commit/7e950f1265a52ce251c42a186c8196089a9ed858)), closes [#713](https://github.com/box/box-node-sdk/issues/713)
23
18
 
24
- **Bug Fixes:**
19
+ ## [2.0.0](https://github.com/box/box-node-sdk/compare/v1.39.0...v2.0.0) (2021-09-29)
25
20
 
26
- - Fix backwards compatibility issue by moving some TypeScript @types as direct dependencies ([#630](https://github.com/box/box-node-sdk/pull/630))
21
+ ### BREAKING CHANGES
27
22
 
28
- ## 1.37.1 (2021-05-19)
23
+ * Drop support for Node 6,7 ([#670](https://github.com/box/box-node-sdk/pull/670))
29
24
 
30
- **Bug Fixes:**
25
+ ### New Features and Enhancements:
31
26
 
32
- - Insensitive language: replace whitelist with allowlist ([#625](https://github.com/box/box-node-sdk/pull/625))
27
+ * Add support for is_external_collab_restricted User property ([#668](https://github.com/box/box-node-sdk/pull/668))
28
+ * Bump proxy-agent from 4.0.0 to 5.0.0 ([#664](https://github.com/box/box-node-sdk/pull/664))
33
29
 
34
- ## 1.37.0 (2021-04-16)
30
+ ## [1.39.0](https://github.com/box/box-node-sdk/compare/v1.38.0...v1.39.0) (2021-08-30)
35
31
 
36
- **New Features and Enhancements:**
32
+ ### New Features and Enhancements:
37
33
 
38
- - Add support for copyInstanceOnItemCopy field for metadata templates ([#572](https://github.com/box/box-node-sdk/pull/572))
34
+ * Add support for Box Sign API ([#658](https://github.com/box/box-node-sdk/pull/658))
35
+ * Enhance TS Imports ([#656](https://github.com/box/box-node-sdk/pull/656))
39
36
 
40
- **Bug Fixes:**
37
+ ## [1.38.0](https://github.com/box/box-node-sdk/compare/v1.37.2...v1.38.0) (2021-08-05)
41
38
 
42
- - Fix webhook signature validation ([#568](https://github.com/box/box-node-sdk/pull/568))
43
- - Update dependencies to patch security vulnerabilities ([#578](https://github.com/box/box-node-sdk/pull/578))
39
+ ### New Features and Enhancements:
44
40
 
45
- ## 1.36.0 (2021-01-27)
41
+ * Add sensitive-language event types for admin invites ([#648](https://github.com/box/box-node-sdk/pull/648))
42
+ * Use BetterDocs to adapt JSDocs to TypeScript ([#646](https://github.com/box/box-node-sdk/pull/646))
43
+ * Change ProxyAgent import to be dynamic ([#641](https://github.com/box/box-node-sdk/pull/641))
44
+ * New API for get files and file versions under retention ([#585](https://github.com/box/box-node-sdk/pull/585))
46
45
 
47
- **New Features and Enhancements:**
46
+ ### Bug Fixes:
48
47
 
49
- - Add folder lock functionality ([#560](https://github.com/box/box-node-sdk/pull/560))
50
- - Add support for filtering groups by name ([#561](https://github.com/box/box-node-sdk/pull/561))
48
+ * Deeply freeze Config except Buffers and Readable streams ([#651](https://github.com/box/box-node-sdk/pull/651))
49
+ * Fix a typo in docs of src/managers/search.ts ([#649](https://github.com/box/box-node-sdk/pull/649))
50
+ * Update broken documentation link ([#647](https://github.com/box/box-node-sdk/pull/647))
51
+ * fix type annotations for exchangeToken functions ([#645](https://github.com/box/box-node-sdk/pull/645))
52
+ * Deprecate files getThumbnail API in favor of getRepresentationContent ([#627](https://github.com/box/box-node-sdk/pull/627))
51
53
 
52
- **Bug Fixes:**
54
+ ## [1.37.2](https://github.com/box/box-node-sdk/compare/v1.37.1...v1.37.2) (2021-05-20)
53
55
 
54
- - Update proxy-agent to patch proxy support issue ([#563](https://github.com/box/box-node-sdk/pull/563))
55
- - Update dependencies to patch security vulnerabilities ([#566](https://github.com/box/box-node-sdk/pull/566))
56
+ ### Bug Fixes:
56
57
 
57
- ## 1.35.0 (2020-11-02)
58
+ * Fix backwards compatibility issue by moving some TypeScript @types as direct dependencies ([#630](https://github.com/box/box-node-sdk/pull/630))
58
59
 
59
- **New Features and Enhancements:**
60
+ ## [1.37.1](https://github.com/box/box-node-sdk/compare/v1.37.0..v1.37.1) (2021-05-19)
60
61
 
61
- - Add support for search param to get shared link items ([#547](https://github.com/box/box-node-sdk/pull/547))
62
+ ### Bug Fixes:
62
63
 
63
- ## 1.34.3 (2020-10-02)
64
+ * Insensitive language: replace whitelist with allowlist ([#625](https://github.com/box/box-node-sdk/pull/625))
64
65
 
65
- **Bug Fixes:**
66
+ ## [1.37.0](https://github.com/box/box-node-sdk/compare/v1.36.0...v1.37.0) (2021-04-16)
66
67
 
67
- - Upgrade ajv dependency ([#545](https://github.com/box/box-node-sdk/pull/545))
68
+ ### New Features and Enhancements:
68
69
 
69
- ## 1.34.2 [2020-08-20]
70
+ * Add support for copyInstanceOnItemCopy field for metadata templates ([#572](https://github.com/box/box-node-sdk/pull/572))
70
71
 
71
- - Make iterator bug fix for uploading files non breaking ([#534](https://github.com/box/box-node-sdk/pull/534))
72
+ ### Bug Fixes:
72
73
 
73
- ## 1.34.1 [2020-08-17]
74
+ * Fix webhook signature validation ([#568](https://github.com/box/box-node-sdk/pull/568))
75
+ * Update dependencies to patch security vulnerabilities ([#578](https://github.com/box/box-node-sdk/pull/578))
74
76
 
75
- - Fix iterator bug for uploading new file versions ([#531](https://github.com/box/box-node-sdk/pull/531))
77
+ ## [1.36.0](https://github.com/box/box-node-sdk/compare/v1.35.0...v1.36.0) (2021-01-27)
76
78
 
77
- ## 1.34.0 [2020-08-04]
79
+ ### New Features and Enhancements:
78
80
 
79
- - Add zip functionality ([#525](https://github.com/box/box-node-sdk/pull/525))
80
- - Add proxy support for `http`, `https`, `socks` and `pac` protocols ([#529](https://github.com/box/box-node-sdk/pull/529))
81
+ * Add folder lock functionality ([#560](https://github.com/box/box-node-sdk/pull/560))
82
+ * Add support for filtering groups by name ([#561](https://github.com/box/box-node-sdk/pull/561))
81
83
 
82
- ## 1.33.0 [2020-06-25]
84
+ ### Bug Fixes:
83
85
 
84
- - Add path parameter sanitization ([#505](https://github.com/box/box-node-sdk/pull/505))
85
- - Add support for all streams for uploading files ([#519](https://github.com/box/box-node-sdk/pull/519))
86
+ * Update proxy-agent to patch proxy support issue ([#563](https://github.com/box/box-node-sdk/pull/563))
87
+ * Update dependencies to patch security vulnerabilities ([#566](https://github.com/box/box-node-sdk/pull/566))
86
88
 
87
- ## 1.32.0 [2020-04-01]
89
+ ## [1.35.0](https://github.com/box/box-node-sdk/compare/v1.34.3...v1.35.0) (2020-11-02)
88
90
 
89
- - Temporarily removed Node 4 and Node 5 builds from Travis, due to tests not passing. Will investigate, going forward ([#495](https://github.com/box/box-node-sdk/pull/495)).
90
- - Fixed an issue where an error is thrown during a retry when a response is not returned by the previous call ([#477](https://github.com/box/box-node-sdk/pull/477)).
91
- - Added the ability to [query](./docs/metadata.md#query) Box items based on their metadata ([#487](https://github.com/box/box-node-sdk/pull/487)).
91
+ ### New Features and Enhancements:
92
92
 
93
- ## 1.31.0 [2020-02-13]
93
+ * Add support for search param to get shared link items ([#547](https://github.com/box/box-node-sdk/pull/547))
94
94
 
95
- - Fixed Authentication Request Retries
96
- - Added marker-based paging for users endpoints
97
- - Added `getNextMarker()` to PagingIterator to get the next marker
95
+ ## [1.34.3](https://github.com/box/box-node-sdk/compare/v1.34.2...v1.34.3) (2020-10-02)
98
96
 
99
- ## 1.30.0 [2019-11-21]
97
+ ### Bug Fixes:
100
98
 
101
- - Deprecated Batch API methods
102
- - Added support for [token exchange](./lib/box-client.js#L495) using shared links
99
+ * Upgrade ajv dependency ([#545](https://github.com/box/box-node-sdk/pull/545))
103
100
 
104
- ## 1.29.1 [2019-08-22]
101
+ ## [1.34.2](https://github.com/box/box-node-sdk/compare/v1.34.1...v1.34.2) (2020-08-20)
105
102
 
106
- - Fixed an issue where JWT authentication requests could fail after being rate limited
103
+ * Make iterator bug fix for uploading files non breaking ([#534](https://github.com/box/box-node-sdk/pull/534))
107
104
 
108
- ## 1.29.0 [2019-04-25]
105
+ ## [1.34.1](https://github.com/box/box-node-sdk/compare/v1.34.0...v1.34.1) (2020-08-17)
109
106
 
110
- - Added convenience methods for setting metadata on [files](./docs/metadata.md#set-metadata-on-a-file)
107
+ * Fix iterator bug for uploading new file versions ([#531](https://github.com/box/box-node-sdk/pull/531))
108
+
109
+ ## [1.34.0](https://github.com/box/box-node-sdk/compare/v1.33.0...v1.34.0) (2020-08-04)
110
+
111
+ * Add zip functionality ([#525](https://github.com/box/box-node-sdk/pull/525))
112
+ * Add proxy support for `http`, `https`, `socks` and `pac` protocols ([#529](https://github.com/box/box-node-sdk/pull/529))
113
+
114
+ ## [1.33.0](https://github.com/box/box-node-sdk/compare/v1.32.0...v1.33.0) (2020-06-25)
115
+
116
+ * Add path parameter sanitization ([#505](https://github.com/box/box-node-sdk/pull/505))
117
+ * Add support for all streams for uploading files ([#519](https://github.com/box/box-node-sdk/pull/519))
118
+
119
+ ## [1.32.0](https://github.com/box/box-node-sdk/compare/v1.31.0...v1.32.0) (2020-04-01)
120
+
121
+ * Temporarily removed Node 4 and Node 5 builds from Travis, due to tests not passing. Will investigate, going forward ([#495](https://github.com/box/box-node-sdk/pull/495)).
122
+ * Fixed an issue where an error is thrown during a retry when a response is not returned by the previous call ([#477](https://github.com/box/box-node-sdk/pull/477)).
123
+ * Added the ability to [query](./docs/metadata.md#query) Box items based on their metadata ([#487](https://github.com/box/box-node-sdk/pull/487)).
124
+
125
+ ## [1.31.0](https://github.com/box/box-node-sdk/compare/v1.30.0...v1.31.0) (2020-02-13)
126
+
127
+ * Fixed Authentication Request Retries
128
+ * Added marker-based paging for users endpoints
129
+ * Added `getNextMarker()` to PagingIterator to get the next marker
130
+
131
+ ## [1.30.0](https://github.com/box/box-node-sdk/compare/v1.29.1...v1.30.0) (2019-11-21)
132
+
133
+ * Deprecated Batch API methods
134
+ * Added support for [token exchange](./lib/box-client.js#L495) using shared links
135
+
136
+ ## [1.29.1](https://github.com/box/box-node-sdk/compare/v1.29.0...v1.29.1) (2019-08-22)
137
+
138
+ * Fixed an issue where JWT authentication requests could fail after being rate limited
139
+
140
+ ## [1.29.0](https://github.com/box/box-node-sdk/compare/v1.28.0...v1.29.0) (2019-04-25)
141
+
142
+ * Added convenience methods for setting metadata on [files](./docs/metadata.md#set-metadata-on-a-file)
111
143
  and [folders](./docs/metadata.md#set-metadata-on-a-folder) ([#376](https://github.com/box/box-node-sdk/pull/376))
112
144
 
113
- ## 1.28.0 [2019-03-28]
145
+ ## [1.28.0](https://github.com/box/box-node-sdk/compare/v1.27.0...v1.28.0) (2019-03-28)
114
146
 
115
- - Added methods for [moving](./docs/web-links.md#move-a-web-link) and [copying](./docs/web-links.md#move-a-web-link)
147
+ * Added methods for [moving](./docs/web-links.md#move-a-web-link) and [copying](./docs/web-links.md#move-a-web-link)
116
148
  weblinks, as well as [adding or removing from a collection](./docs/web-links.md#add-web-link-to-a-collection)
117
149
 
118
- ## 1.27.0 [2019-02-28]
150
+ ## [1.27.0](https://github.com/box/box-node-sdk/compare/v1.26.2...v1.27.0) (2019-02-28)
119
151
 
120
- - Added the trace ID from API response headers to error messages for easier debugging
121
- - Added more safety checks in the error flow to protect against throwing when handling a malformed request
122
- - Added support for [retrieving a user's avatar image](./docs/users.md#get-user-avatar)
152
+ * Added the trace ID from API response headers to error messages for easier debugging
153
+ * Added more safety checks in the error flow to protect against throwing when handling a malformed request
154
+ * Added support for [retrieving a user's avatar image](./docs/users.md#get-user-avatar)
123
155
 
124
- ## 1.26.2 [2019-02-22]
156
+ ## [1.26.2](https://github.com/box/box-node-sdk/compare/v1.26.1...v1.26.2) (2019-02-22)
125
157
 
126
- - Fixed an error where under high request rates, code in the error handling logic could throw when handling a
158
+ * Fixed an error where under high request rates, code in the error handling logic could throw when handling a
127
159
  malformed request
128
160
 
129
- ## 1.26.1 [2019-02-12]
161
+ ## [1.26.1](https://github.com/box/box-node-sdk/compare/v1.26.0...v1.26.1) (2019-02-12)
130
162
 
131
- - Fixed an error where some methods could throw an error when constructing an iterator
163
+ * Fixed an error where some methods could throw an error when constructing an iterator
132
164
 
133
- ## 1.26.0 [2019-02-12]
165
+ ## [1.26.0](https://github.com/box/box-node-sdk/compare/v1.25.0...v1.26.0) (2019-02-12)
134
166
 
135
- - Added support for [replying to a comment](./docs/comments.md#reply-to-a-comment) (thanks @jpan-box!)
136
- - Fixed an issue where calling `client.events.get()` could return an iterator that would only iterate over
167
+ * Added support for [replying to a comment](./docs/comments.md#reply-to-a-comment) (thanks @jpan-box!)
168
+ * Fixed an issue where calling `client.events.get()` could return an iterator that would only iterate over
137
169
  the first chunk of events. This method will now always return the raw JSON data in order to enable manual
138
170
  paging. For automatic paging through events, `client.events.getEventStream()` or
139
171
  `client.events.getEnterpriseEventStream()` should be used instead.
140
172
 
141
- ## 1.25.0 [2019-01-24]
173
+ ## [1.25.0](https://github.com/box/box-node-sdk/compare/v1.24.1...v1.25.0) (2019-01-24)
142
174
 
143
- - Added the `retryStrategy` config parameter to allow customizing how the SDK retries failing requests
175
+ * Added the `retryStrategy` config parameter to allow customizing how the SDK retries failing requests
144
176
 
145
- ## 1.24.1 [2019-01-11]
177
+ ## [1.24.1](https://github.com/box/box-node-sdk/compare/v1.24.0...v1.24.1) (2019-01-11)
146
178
 
147
- - Fixed an issue where token expiration was not being correctly handled
179
+ * Fixed an issue where token expiration was not being correctly handled
148
180
 
149
- ## 1.24.0 [2018-12-10]
181
+ ## [1.24.0](https://github.com/box/box-node-sdk/compare/v1.23.0...v1.24.0) (2018-12-10)
150
182
 
151
- - Added a configuration option for populating the first-party client analytics header information
183
+ * Added a configuration option for populating the first-party client analytics header information
152
184
 
153
- ## 1.23.0 [2018-11-21]
185
+ ## [1.23.0](https://github.com/box/box-node-sdk/compare/vA...v1.23.0) (2018-11-21)
154
186
 
155
- - Added an `etag` option to common file and folder methods to allow handling race conditions
156
- - [`client.files.update()`](./docs/files.md#update-a-files-information)
157
- - [`client.files.delete()`](./docs/files.md#delete-a-file)
158
- - [`client.files.deletePermanently()`](./docs/trash.md#delete-a-file-from-the-trash)
159
- - [`client.files.deleteVersion()`](./docs/files.md#delete-a-previous-file-version)
160
- - [`client.folders.update()`](./docs/folders.md#update-a-folders-information)
161
- - [`client.folders.delete()`](./docs/folders.md#delete-a-folder)
162
- - [`client.folders.deletePermanently()`](./docs/trash.md#delete-a-folder-from-the-trash)
187
+ * Added an `etag` option to common file and folder methods to allow handling race conditions
188
+ * [`client.files.update()`](./docs/files.md#update-a-files-information)
189
+ * [`client.files.delete()`](./docs/files.md#delete-a-file)
190
+ * [`client.files.deletePermanently()`](./docs/trash.md#delete-a-file-from-the-trash)
191
+ * [`client.files.deleteVersion()`](./docs/files.md#delete-a-previous-file-version)
192
+ * [`client.folders.update()`](./docs/folders.md#update-a-folders-information)
193
+ * [`client.folders.delete()`](./docs/folders.md#delete-a-folder)
194
+ * [`client.folders.deletePermanently()`](./docs/trash.md#delete-a-folder-from-the-trash)
163
195
 
164
- ## 1.22.1 [2018-11-15]
196
+ ## [1.22.1](https://github.com/box/box-node-sdk/compare/v1.22.0...v1.22.1) (2018-11-15)
165
197
 
166
- - Fixed an issue where retrying JWT auth token requests would sometimes fail due to a non-unique `jti` claim
198
+ * Fixed an issue where retrying JWT auth token requests would sometimes fail due to a non-unique `jti` claim
167
199
 
168
- ## 1.22.0 [2018-09-17]
200
+ ## [1.22.0](https://github.com/box/box-node-sdk/compare/v1.21.0...v1.22.0) (2018-09-17)
169
201
 
170
- - Chunked Uploader methods now return promises for [simpler handling of chunked uploads](./docs/files.md#automatic-uploader)
171
- - File attributes to set on the newly-uploaded file can now be
202
+ * Chunked Uploader methods now return promises for [simpler handling of chunked uploads](./docs/files.md#automatic-uploader)
203
+ * File attributes to set on the newly-uploaded file can now be
172
204
  [passed via `options.fileAttributes`](./docs/files.md#automatic-uploader) when creating a Chunked Uploader
173
205
 
174
- ## 1.21.0 [2018-09-13]
206
+ ## [1.21.0](https://github.com/box/box-node-sdk/compare/v1.20.0...v1.21.0) (2018-09-13)
175
207
 
176
- - Added the ability to close an Event Stream by calling `eventStream.destroy()` (thanks @boneskull!)
177
- - Improved error messages related to certain authentication failure cases
208
+ * Added the ability to close an Event Stream by calling `eventStream.destroy()` (thanks @boneskull!)
209
+ * Improved error messages related to certain authentication failure cases
178
210
 
179
- ## 1.20.0 [2018-08-09]
211
+ ## [1.20.0](https://github.com/box/box-node-sdk/compare/v1.19.0...v1.20.0) (2018-08-09)
180
212
 
181
- - Added missing values to the `client.webhooks.triggerTypes` enum (thanks @MathersMax!)
182
- - Added support for [Metadata Cascade Policies](./docs/metadata.md#create-cascade-policy)
213
+ * Added missing values to the `client.webhooks.triggerTypes` enum (thanks @MathersMax!)
214
+ * Added support for [Metadata Cascade Policies](./docs/metadata.md#create-cascade-policy)
183
215
 
184
- ## 1.19.0 [2018-06-14]
216
+ ## [1.19.0](https://github.com/box/box-node-sdk/compare/v1.18.0...v1.19.0) (2018-06-14)
185
217
 
186
- - Added `generateRepresentations` option to [`files.getRepresentationContent()`](./docs/files.md#get-representation-content)
218
+ * Added `generateRepresentations` option to [`files.getRepresentationContent()`](./docs/files.md#get-representation-content)
187
219
 
188
- ## 1.18.0 [2018-05-24]
220
+ ## [1.18.0](https://github.com/box/box-node-sdk/compare/v1.17.0...v1.18.0) (2018-05-24)
189
221
 
190
- - Updated dependencies to resolve potential security issues:
191
- - `request@2.87.0`
192
- - Transitive dependencies of `jsonwebtoken@8.2.1`
193
- - Added a static `BoxSDK.getBasicClient()` method to enable creating a client without needing
222
+ * Updated dependencies to resolve potential security issues:
223
+ * `request@2.87.0`
224
+ * Transitive dependencies of `jsonwebtoken@8.2.1`
225
+ * Added a static `BoxSDK.getBasicClient()` method to enable creating a client without needing
194
226
  to specify a client ID and secret (thanks to @cbetta)
195
227
 
196
- ## 1.17.0 [2018-05-10]
228
+ ## [1.17.0](https://github.com/box/box-node-sdk/compare/v1.16.1...v1.17.0) (2018-05-10)
197
229
 
198
- - Updated dependencies: `request@2.85.0`, `jsonwebtoken@8.2.1`
199
- - Added support for [Storage Policies](./docs/storage-policies.md)
200
- - Added the option to use a Token Store for caching tokens with App Auth using JWT
230
+ * Updated dependencies: `request@2.85.0`, `jsonwebtoken@8.2.1`
231
+ * Added support for [Storage Policies](./docs/storage-policies.md)
232
+ * Added the option to use a Token Store for caching tokens with App Auth using JWT
201
233
 
202
- ## 1.16.1 [2018-04-26]
234
+ ## [1.16.1](https://github.com/box/box-node-sdk/compare/v1.16.0...v1.16.1) (2018-04-26)
203
235
 
204
- - Fixed a bug where metadata template deletion would not properly return results via callback
236
+ * Fixed a bug where metadata template deletion would not properly return results via callback
205
237
 
206
- ## 1.16.0 [2018-04-10]
238
+ ## [1.16.0](https://github.com/box/box-node-sdk/compare/v1.15.0...v1.16.0) (2018-04-10)
207
239
 
208
- - Added support for [assigning Retention Policies to Metadata Templates](https://github.com/box/box-node-sdk/blob/main/docs/retention-policies.md#assign-retention-policy)
240
+ * Added support for [assigning Retention Policies to Metadata Templates](https://github.com/box/box-node-sdk/blob/main/docs/retention-policies.md#assign-retention-policy)
209
241
 
210
- ## 1.15.0 [2018-03-29]
242
+ ## [1.15.0](https://github.com/box/box-node-sdk/compare/v1.14.1...v1.15.0) (2018-03-29)
211
243
 
212
- - Fixed [`client.webhooks.validateMessage() and `sdk.validateWebhookMessage()`](https://github.com/box/box-node-sdk/blob/main/docs/webhooks.md#validate-a-webhook-message)
244
+ * Fixed [`client.webhooks.validateMessage() and `sdk.validateWebhookMessage()`](https://github.com/box/box-node-sdk/blob/main/docs/webhooks.md#validate-a-webhook-message)
213
245
  to accept the request body as an `Object`
214
- - Fixed `sdk.configure()` to correct reconfigure all options
215
- - Improved error messages for API errors and added the request object as `error.request` for easier debugging
246
+ * Fixed `sdk.configure()` to correct reconfigure all options
247
+ * Improved error messages for API errors and added the request object as `error.request` for easier debugging
216
248
 
217
- ## 1.14.1 [2018-03-13]
249
+ ## [1.14.1](https://github.com/box/box-node-sdk/compare/v1.14.0...v1.14.1) (2018-03-13)
218
250
 
219
- - Fixed a bug when `files.getReadStream()` was called with null options
251
+ * Fixed a bug when `files.getReadStream()` was called with null options
220
252
 
221
- ## 1.14.0 [2018-03-12]
253
+ ## [1.14.0](https://github.com/box/box-node-sdk/compare/v1.13.0...v1.14.0) (2018-03-12)
222
254
 
223
- - Added support for [getting a metadata template by ID](./docs/metadata.md#get-by-id)
224
- - Added a `byteRange` option to [file download](./docs/files.md#download-a-file) to support partial file download
225
- - Improved error messages when using promises and in authentication flows
255
+ * Added support for [getting a metadata template by ID](./docs/metadata.md#get-by-id)
256
+ * Added a `byteRange` option to [file download](./docs/files.md#download-a-file) to support partial file download
257
+ * Improved error messages when using promises and in authentication flows
226
258
 
227
- ## 1.13.0 [2018-03-01]
259
+ ## [1.13.0](https://github.com/box/box-node-sdk/compare/v1.12.1...v1.13.0) (2018-03-01)
228
260
 
229
- - Added support for getting a [stream of file representation contents](./docs/files.md#get-representation-content)
230
- - Switched to using exponential backoff for request retries
261
+ * Added support for getting a [stream of file representation contents](./docs/files.md#get-representation-content)
262
+ * Switched to using exponential backoff for request retries
231
263
 
232
- ## 1.12.1 [2018-01-25]
264
+ ## [1.12.1](https://github.com/box/box-node-sdk/compare/v1.12.0...v1.12.1) (2018-01-25)
233
265
 
234
- - Fixed an issue where chunked uploader would not work with response streams from the request library
266
+ * Fixed an issue where chunked uploader would not work with response streams from the request library
235
267
  (0e7014561f9cd0f7f38f98536b3f0c3946231d2e)
236
268
 
237
- ## 1.12.0 [2018-01-11]
269
+ ## [1.12.0](https://github.com/box/box-node-sdk/compare/v1.11.0...v1.12.0) (2018-01-11)
238
270
 
239
- - Added support for [metadata template deletion](./docs/metadata.md#delete-metadata-template)
271
+ * Added support for [metadata template deletion](./docs/metadata.md#delete-metadata-template)
240
272
 
241
- ## 1.11.0 [2017-12-12]
273
+ ## [1.11.0](https://github.com/box/box-node-sdk/compare/v1.10.1...v1.11.0) (2017-12-12)
242
274
 
243
- - Added options to preserve file timestamps on [file upload](./docs/files.md#upload-a-file)
275
+ * Added options to preserve file timestamps on [file upload](./docs/files.md#upload-a-file)
244
276
  and to rename a file or preserve modification timestamp on [new version upload](./docs/files.md#upload-a-new-version-of-a-file)
245
- - Added [Collaboration Whitelist](./docs/collaboration-whitelist.md) functionality to allow enterprise admins
277
+ * Added [Collaboration Whitelist](./docs/collaboration-whitelist.md) functionality to allow enterprise admins
246
278
  to control which external users can collaborate on their content
247
- - Added an option to Token Exchange to generate [annotator tokens](./docs/authentication.md#annotator-tokens) for use with Box View
279
+ * Added an option to Token Exchange to generate [annotator tokens](./docs/authentication.md#annotator-tokens) for use with Box View
248
280
 
249
- ## 1.10.1 [2017-11-28]
281
+ ## [1.10.1](https://github.com/box/box-node-sdk/compare/v1.10.0...v1.10.1) (2017-11-28)
250
282
 
251
- - Updated to jsonwebtoken@8.1.0 to fix an issue where some users were getting
283
+ * Updated to jsonwebtoken@8.1.0 to fix an issue where some users were getting
252
284
  an error when using App Auth
253
285
 
254
- ## 1.10.0 [2017-01-14]
286
+ ## [1.10.0](https://github.com/box/box-node-sdk/compare/v1.9.0...v1.10.0) (2017-01-14)
255
287
 
256
- - Added support for [Terms of Service](./docs/terms-of-service.md) endpoints
257
- - Fixed a bug where receiving a collection without paging parameters from the API
288
+ * Added support for [Terms of Service](./docs/terms-of-service.md) endpoints
289
+ * Fixed a bug where receiving a collection without paging parameters from the API
258
290
  would cause the SDK to throw an exception when using the `iterators` SDK option.
259
291
  Now, this will return an iterator over the items returned by the API.
260
- - Fixed a bug in Token Exchange where passing multiple scopes would result in an error
261
- - Added support for [getting Representations info on a file](./docs/files.md#get-representation-info)
292
+ * Fixed a bug in Token Exchange where passing multiple scopes would result in an error
293
+ * Added support for [getting Representations info on a file](./docs/files.md#get-representation-info)
262
294
 
263
- ## 1.9.0 [2017-09-12]
295
+ ## [1.9.0](https://github.com/box/box-node-sdk/compare/v1.8.0...v1.9.0) (2017-09-12)
264
296
 
265
- - Fixed token methods to return bluebird Promises instead of native Promises
266
- - Added support for the `notify` and `can_view_path` options on Collaborations
297
+ * Fixed token methods to return bluebird Promises instead of native Promises
298
+ * Added support for the `notify` and `can_view_path` options on Collaborations
267
299
 
268
- ## 1.8.0 [2017-08-21]
300
+ ## [1.8.0](https://github.com/box/box-node-sdk/compare/v1.7.0...v1.8.0) (2017-08-21)
269
301
 
270
- - Added support for [Batch API](./docs/client.md#batch-api)
271
- - Fixed a bug where the Event Stream would make more API calls than necessary,
302
+ * Added support for [Batch API](./docs/client.md#batch-api)
303
+ * Fixed a bug where the Event Stream would make more API calls than necessary,
272
304
  potentially hitting Box API rate limits
273
- - Added Promise support to methods on the SDK object
274
- - Added Node.js version to the User-Agent header that the SDK sends
275
- - Fixed a bug where using multiple Persistent Clients instances could cause some
305
+ * Added Promise support to methods on the SDK object
306
+ * Added Node.js version to the User-Agent header that the SDK sends
307
+ * Fixed a bug where using multiple Persistent Clients instances could cause some
276
308
  clients to end up with expired tokens
277
309
 
278
- ## 1.7.0 [2017-07-19]
310
+ ## [1.7.0](https://github.com/box/box-node-sdk/compare/v1.6.0...v1.7.0) (2017-07-19)
279
311
 
280
- - Add support for passing IP to all token methods, and fixed a bug where a client's IP was not being correctly reported on token refreshes
312
+ * Add support for passing IP to all token methods, and fixed a bug where a client's IP was not being correctly reported on token refreshes
281
313
 
282
- ## 1.6.0 [2017-06-23]
314
+ ## [1.6.0](https://github.com/box/box-node-sdk/compare/v1.5.1...v1.6.0) (2017-06-23)
283
315
 
284
- - Added [Recent Items](./docs/recent-items.md) support
285
- - Updated app auth expiration time default value and validation
316
+ * Added [Recent Items](./docs/recent-items.md) support
317
+ * Updated app auth expiration time default value and validation
286
318
 
287
- ## 1.5.1 [2017-06-15]
319
+ ## [1.5.1](https://github.com/box/box-node-sdk/compare/v1.5.0...v1.5.1) (2017-06-15)
288
320
 
289
- - Revert deep-freezing Config properties, since it was causing errors
321
+ * Revert deep-freezing Config properties, since it was causing errors
290
322
 
291
- ## 1.5.0 [2017-06-15]
323
+ ## [1.5.0](https://github.com/box/box-node-sdk/compare/v1.4.2...v1.5.0) (2017-06-15)
292
324
 
293
- - Added support for [Token Exchange](./docs/authentication.md#token-exchange),
325
+ * Added support for [Token Exchange](./docs/authentication.md#token-exchange),
294
326
  which allows a client to get downscoped tokens suitable for passing to a browser
295
327
  app or worker process.
296
- - Ensured deeply-nested Config properties are immutable
328
+ * Ensured deeply-nested Config properties are immutable
297
329
 
298
- ## 1.4.2 [2017-05-22]
330
+ ## [1.4.2](https://github.com/box/box-node-sdk/compare/v1.4.1...v1.4.2) (2017-05-22)
299
331
 
300
- - Fixed `BoxSDK.getPreconfiguredInstance()` to configure webhook keys
332
+ * Fixed `BoxSDK.getPreconfiguredInstance()` to configure webhook keys
301
333
 
302
- ## 1.4.1 [2017-05-22]
334
+ ## [1.4.1](https://github.com/box/box-node-sdk/compare/v1.4.0...v1.4.1) (2017-05-22)
303
335
 
304
- - Fixed `BoxSDK.getPreconfiguredInstance()` when app auth setttings are not populated
336
+ * Fixed `BoxSDK.getPreconfiguredInstance()` when app auth setttings are not populated
305
337
 
306
- ## 1.4.0 [2017-05-19]
338
+ ## [1.4.0](https://github.com/box/box-node-sdk/compare/v1.3.0...v1.4.0) (2017-05-19)
307
339
 
308
- - Added support for [file collaborations](./docs/collaborations.md#add-a-collaboration).
340
+ * Added support for [file collaborations](./docs/collaborations.md#add-a-collaboration).
309
341
  Users can now invite others to collaborate on single files.
310
342
  See [the blog post](https://blog.box.com/blog/file-collaboration-api/) for more information.
311
- - Fixed an issue where users were unable to use JWT Server Auth when their computers' clocks
343
+ * Fixed an issue where users were unable to use JWT Server Auth when their computers' clocks
312
344
  were not synchronized with the Box API servers.
313
- - All asynchronous client methods now return Promises in addition to taking a
345
+ * All asynchronous client methods now return Promises in addition to taking a
314
346
  (now-optional) callback parameter, so you can write more modern JS with the SDK.
315
- - The SDK can now be preconfigured using a JSON blob that can be downloaded in the
347
+ * The SDK can now be preconfigured using a JSON blob that can be downloaded in the
316
348
  Box Dev Console for JWT Server Authentication apps, making it easier to get started
317
349
  developing!
318
- - Added support for [chunked upload](./docs/files.md#chunked-upload), where a large
350
+ * Added support for [chunked upload](./docs/files.md#chunked-upload), where a large
319
351
  file can be uploaded one piece at a time. This makes large file uploads much faster
320
352
  and more reliable, since parts can be uploaded in parallel and failed parts can be
321
353
  retried in isolation.
322
- - Added an `is_confirmed` option to [email alias creation](./docs/users.md#add-email-alias) for
354
+ * Added an `is_confirmed` option to [email alias creation](./docs/users.md#add-email-alias) for
323
355
  admins to auto-confirm the alias.
324
- - Added support for the [Enterprise Events stream](./docs/events.md#enterprise-events).
325
- - Added an option to have collections methods (e.g. `folders.getItems()`,
356
+ * Added support for the [Enterprise Events stream](./docs/events.md#enterprise-events).
357
+ * Added an option to have collections methods (e.g. `folders.getItems()`,
326
358
  `enterprise.getUsers()`, etc) return [async iterators](./README.md#iterators) that will automatically
327
359
  page through the collection. This conforms to the [proposed async iteration spec](https://github.com/tc39/proposal-async-iteration),
328
360
  which will eventually allow them to be used in ergonomic for-await-of loop syntax.
329
361
 
330
- ## 1.3.0 [2017-01-24]
362
+ ## [1.3.0](https://github.com/box/box-node-sdk/compare/v1.2.0...v1.3.0) (2017-01-24)
331
363
 
332
- - Added `BoxSDK.validateWebhookMessage()` and `client.webhooks.validateMessage()` for validating webhook messages from Box
364
+ * Added `BoxSDK.validateWebhookMessage()` and `client.webhooks.validateMessage()` for validating webhook messages from Box
333
365
 
334
- ## 1.2.0 [2016-12-12]
366
+ ## [1.2.0](https://github.com/box/box-node-sdk/compare/v1.1.0...v1.2.0) (2016-12-12)
335
367
 
336
- - Added methods for all API endpoints; we now have full API coverage :tada:
337
- - Added support for renaming a file or folder on copy
338
- - Added `client.asUser(userID)` and `client.asSelf()` to support making calls on behalf of managed users
339
- - Fixed event streams so they don't go into an infinite error loop when auth expires
340
- - Fixed an error where App Auth clients would not be able to authorize due to clock skew
341
- - Fixed the `mdfilters` parameter in `client.search.query()` to support metadata search
342
- - Cloned options objects to prevent modification of passed-in objects by the SDK
343
- - Added better error messaging to the sample app
368
+ * Added methods for all API endpoints; we now have full API coverage :tada:
369
+ * Added support for renaming a file or folder on copy
370
+ * Added `client.asUser(userID)` and `client.asSelf()` to support making calls on behalf of managed users
371
+ * Fixed event streams so they don't go into an infinite error loop when auth expires
372
+ * Fixed an error where App Auth clients would not be able to authorize due to clock skew
373
+ * Fixed the `mdfilters` parameter in `client.search.query()` to support metadata search
374
+ * Cloned options objects to prevent modification of passed-in objects by the SDK
375
+ * Added better error messaging to the sample app
344
376
 
345
- ## 1.1.0 [2016-09-27]
377
+ ## [1.1.0](https://github.com/box/box-node-sdk/compare/v1.0.0...v1.1.0) (2016-09-27)
346
378
 
347
- - Added endpoint to get a file's tasks
348
- - Fixed issues with stream uploads
349
- - Improved performance of file uploads
350
- - Added endpoints to delete files and folders from trash
351
- - Added endpoint to get a trashed folder
352
- - Upgraded request dependency to fix ReDoS vulnerability
379
+ * Added endpoint to get a file's tasks
380
+ * Fixed issues with stream uploads
381
+ * Improved performance of file uploads
382
+ * Added endpoints to delete files and folders from trash
383
+ * Added endpoint to get a trashed folder
384
+ * Upgraded request dependency to fix ReDoS vulnerability
353
385
 
354
- ## 1.0.0 [2016-07-13]
386
+ ## [1.0.0] (2016-07-13)
355
387
 
356
388
  Initial release.