box-node-sdk 2.8.0 → 2.9.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/CHANGELOG.md +18 -0
- package/README.md +4 -0
- package/lib/api-request-manager.js +12 -1
- package/lib/api-request-manager.js.map +1 -1
- package/lib/managers/metadata.d.ts +2 -0
- package/lib/managers/metadata.js.map +1 -1
- package/lib/managers/retention-policies.d.ts +19 -0
- package/lib/managers/retention-policies.js +9 -0
- package/lib/managers/retention-policies.js.map +1 -1
- package/lib/managers/terms-of-service.js +7 -3
- package/lib/managers/terms-of-service.js.map +1 -1
- package/package.json +10 -15
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
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
|
+
## [2.9.0](https://github.com/box/box-node-sdk/compare/v2.8.1...v2.9.0) (2023-04-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### New Features and Enhancements
|
|
9
|
+
|
|
10
|
+
* New fields in `retention-policy` and `retention-policy-assignment` ([#803](https://github.com/box/box-node-sdk/issues/803)) ([f14ba84](https://github.com/box/box-node-sdk/commit/f14ba84013985513854ad396581d085d1d4f0255))
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* return empty object when `tos` status is not present ([#797](https://github.com/box/box-node-sdk/issues/797)) ([12fd9b0](https://github.com/box/box-node-sdk/commit/12fd9b053707471722f53cd1760c8cf59451fe8d))
|
|
15
|
+
|
|
16
|
+
### [2.8.1](https://github.com/box/box-node-sdk/compare/v2.8.0...v2.8.1) (2023-01-05)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* Fix `getReadStream` delay reading ([#790](https://github.com/box/box-node-sdk/issues/790)) ([6bfc1ee](https://github.com/box/box-node-sdk/commit/6bfc1eebeb9a31606ff96127eeb1ad03d2f13d9c))
|
|
22
|
+
|
|
5
23
|
## [2.8.0](https://github.com/box/box-node-sdk/compare/v2.7.2...v2.8.0) (2022-12-21)
|
|
6
24
|
|
|
7
25
|
|
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
// ------------------------------------------------------------------------------
|
|
11
11
|
var bluebird_1 = require("bluebird");
|
|
12
12
|
var errors_1 = __importDefault(require("./util/errors"));
|
|
13
|
+
var stream_1 = require("stream");
|
|
13
14
|
var APIRequest = require('./api-request');
|
|
14
15
|
// ------------------------------------------------------------------------------
|
|
15
16
|
// Private
|
|
@@ -60,7 +61,17 @@ var APIRequestManager = /** @class */ (function () {
|
|
|
60
61
|
// Make the request
|
|
61
62
|
var apiRequest = new APIRequest(requestConfig, this.eventBus);
|
|
62
63
|
apiRequest.execute();
|
|
63
|
-
|
|
64
|
+
var stream = apiRequest.getResponseStream();
|
|
65
|
+
// The request is asynchronous, so we need to wait for the stream to be
|
|
66
|
+
// available before we can pipe it to the pass-through stream.
|
|
67
|
+
// If the stream is undefined, then the request failed and we should
|
|
68
|
+
// propagate the error.
|
|
69
|
+
if (stream) {
|
|
70
|
+
var passThrough = new stream_1.PassThrough();
|
|
71
|
+
stream.pipe(passThrough);
|
|
72
|
+
return passThrough;
|
|
73
|
+
}
|
|
74
|
+
return stream;
|
|
64
75
|
};
|
|
65
76
|
return APIRequestManager;
|
|
66
77
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-request-manager.js","sourceRoot":"","sources":["../src/api-request-manager.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH,iFAAiF;AACjF,eAAe;AACf,iFAAiF;AAEjF,qCAAmC;AAEnC,yDAAmC;
|
|
1
|
+
{"version":3,"file":"api-request-manager.js","sourceRoot":"","sources":["../src/api-request-manager.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH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AAU,CAAC,iBAAiB,EAAE,CAAC;QAE5C,uEAAuE;QACvE,8DAA8D;QAC9D,oEAAoE;QACpE,uBAAuB;QACvB,IAAI,MAAM,EAAE;YACX,IAAI,WAAW,GAAG,IAAI,oBAAW,EAAE,CAAC;YACpC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACzB,OAAO,WAAW,CAAC;SACnB;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IACF,wBAAC;AAAD,CAAC,AAxDD,IAwDC;AAMD,iBAAS,iBAAiB,CAAC"}
|
|
@@ -28,12 +28,14 @@ declare type MetadataEnumOption = {
|
|
|
28
28
|
* @property {MetadataFieldType} type The type of the field
|
|
29
29
|
* @property {string} key The programmatic name of the field
|
|
30
30
|
* @property {string} displayName The display name of the field
|
|
31
|
+
* @property {boolean} hidden Whether this field is hidden in the UI for the user and can only be set through the API instead
|
|
31
32
|
* @property {MetadataEnumOption[]} [options] For enum fields, the options
|
|
32
33
|
*/
|
|
33
34
|
declare type MetadataTemplateField = {
|
|
34
35
|
type: MetadataFieldType;
|
|
35
36
|
key: string;
|
|
36
37
|
displayName: string;
|
|
38
|
+
hidden: boolean;
|
|
37
39
|
options?: MetadataEnumOption[];
|
|
38
40
|
};
|
|
39
41
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/managers/metadata.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;AAOH,8DAAuC;AACvC,IAAM,KAAK,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAEvC,gFAAgF;AAChF,WAAW;AACX,gFAAgF;AAEhF;;;;GAIG;AACH,IAAK,iBAMJ;AAND,WAAK,iBAAiB;IACrB,sCAAiB,CAAA;IACjB,kCAAa,CAAA;IACb,qCAAgB,CAAA;IAChB,kCAAa,CAAA;IACb,iDAA4B,CAAA;AAC7B,CAAC,EANI,iBAAiB,KAAjB,iBAAiB,QAMrB;
|
|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AO,GAAI,EAAE,EAA1C,SAAS,gBAAA,EAAK,UAAU,cAAtC,cAAwC,CAAgB,CAAC;QAE/D,IAAI,MAAM,GAAG;YACZ,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC;SAC7B,CAAC;QAEF,OAAO,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAC1D,UAAU,EACV,MAAM,EACN,QAAQ,CACR,CAAC;IACH,CAAC;IACF,eAAC;AAAD,CAAC,AAlWD,IAkWC;AAED,QAAQ,CAAC,SAAS,CAAC,SAAS,GAAG;IAC9B,UAAU,EAAE,mBAAmB;CAC/B,CAAC;AAEF,QAAQ,CAAC,SAAS,CAAC,MAAM,GAAG;IAC3B,UAAU,EAAE,gBAAgB;IAC5B,MAAM,EAAE,YAAY;CACpB,CAAC;AAEF,QAAQ,CAAC,SAAS,CAAC,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IACpD,iBAAiB,EAAE,MAAM;IACzB,SAAS,EAAE,WAAW;CACtB,CAAC,CAAC;AAEH;;;;GAIG;AACH,QAAQ,CAAC,SAAS,CAAC,UAAU,GAAG,iBAAiB,CAAC;AAElD,iBAAS,QAAQ,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @fileoverview Manager for the Retention Policies Resource
|
|
3
3
|
*/
|
|
4
4
|
import BoxClient from '../box-client';
|
|
5
|
+
import { UserMini } from "../schemas";
|
|
5
6
|
/**
|
|
6
7
|
* Enum of valid retention policy types, which specify how long the policy should
|
|
7
8
|
* remain in effect.
|
|
@@ -86,12 +87,20 @@ declare class RetentionPolicies {
|
|
|
86
87
|
* @param {RetentionPolicyType} type - The type of policy to create
|
|
87
88
|
* @param {RetentionPolicyDispositionAction} action - The disposition action for the new policy
|
|
88
89
|
* @param {Object} [options] - Additional parameters
|
|
90
|
+
* @param {boolean} [options.are_owners_notified] - Whether or not owner and co-owners of a file are notified when the policy nears expiration
|
|
91
|
+
* @param {boolean} [options.can_owner_extend_retention] - Whether or not the owner of a file will be allowed to extend the retention
|
|
92
|
+
* @param {UserMini[]} [options.custom_notification_recipients] - A list of users notified when the retention policy duration is about to end
|
|
93
|
+
* @param {string} [options.description] - The additional text description of the retention policy
|
|
89
94
|
* @param {int} [options.retention_length] - For finite policies, the number of days to retain the content
|
|
90
95
|
* @param {RetentionType} [options.retention_type] - The type of retention for the new policy
|
|
91
96
|
* @param {Function} [callback] - Passed the new policy information if it was acquired successfully, error otherwise
|
|
92
97
|
* @returns {Promise<Object>} A promise resolving to the new policy object
|
|
93
98
|
*/
|
|
94
99
|
create(name: string, type: RetentionPolicyType, action: RetentionPolicyDispositionAction, options?: {
|
|
100
|
+
are_owners_notified?: boolean;
|
|
101
|
+
can_owner_extend_retention?: boolean;
|
|
102
|
+
custom_notification_recipients?: UserMini[];
|
|
103
|
+
description?: string;
|
|
95
104
|
retention_length?: number;
|
|
96
105
|
retention_type?: RetentionType;
|
|
97
106
|
}, callback?: Function): any;
|
|
@@ -117,6 +126,10 @@ declare class RetentionPolicies {
|
|
|
117
126
|
* @param {Object} updates - The information to be updated
|
|
118
127
|
* @param {string} [updates.policy_name] - The name of the retention policy
|
|
119
128
|
* @param {RetentionPolicyDispositionAction} [updates.disposition_action] - The disposition action for the updated policy
|
|
129
|
+
* @param {boolean} [updates.are_owners_notified] - Whether or not owner and co-owners of a file are notified when the policy nears expiration
|
|
130
|
+
* @param {boolean} [updates.can_owner_extend_retention] - Whether or not the owner of a file will be allowed to extend the retention
|
|
131
|
+
* @param {UserMini[]} [updates.custom_notification_recipients] - A list of users notified when the retention policy duration is about to end
|
|
132
|
+
* @param {string} [updates.description] - The additional text description of the retention policy
|
|
120
133
|
* @param {int} [updates.retention_length] - For finite policies, the number of days to retain the content
|
|
121
134
|
* @param {RetentionType} [updates.retention_type] - The type of retention. The only possible value here is non_modifiable. You can convert a modifiable policy to non_modifiable, but not the other way around.
|
|
122
135
|
* @param {string} [updates.status] - Used to retire a retention policy if status is set to retired
|
|
@@ -126,6 +139,10 @@ declare class RetentionPolicies {
|
|
|
126
139
|
update(policyID: string, updates: {
|
|
127
140
|
policy_name?: string;
|
|
128
141
|
disposition_action?: RetentionPolicyDispositionAction;
|
|
142
|
+
are_owners_notified?: boolean;
|
|
143
|
+
can_owner_extend_retention?: boolean;
|
|
144
|
+
custom_notification_recipients?: UserMini[];
|
|
145
|
+
description?: string;
|
|
129
146
|
retention_length?: number;
|
|
130
147
|
retention_type?: RetentionType;
|
|
131
148
|
status?: string;
|
|
@@ -174,11 +191,13 @@ declare class RetentionPolicies {
|
|
|
174
191
|
* @param {string} assignID - The Box ID of the object to assign the retention policy to
|
|
175
192
|
* @param {Object} [options] - Optional parameters for the request
|
|
176
193
|
* @param {MetadataFilterField[]} [options.filter_fields] - Metadata fields to filter against, if assigning to a metadata template
|
|
194
|
+
* @param {string} [options.start_date_field] - Id of Metadata field which will be used to specify the start date for the retention policy, or set this to "upload_date" as value to use the date when the file was uploaded to Box
|
|
177
195
|
* @param {Function} [callback] - Passed the new assignment object if successful, error otherwise
|
|
178
196
|
* @returns {Promise<Object>} A promise resolving to the created assignment object
|
|
179
197
|
*/
|
|
180
198
|
assign(policyID: string, assignType: RetentionPolicyAssignmentType, assignID: string, options?: {
|
|
181
199
|
filter_fields?: MetadataFilterField[];
|
|
200
|
+
start_date_field?: string;
|
|
182
201
|
} | Function | null, callback?: Function): any;
|
|
183
202
|
/**
|
|
184
203
|
* Fetch a specific policy assignment
|
|
@@ -91,6 +91,10 @@ var RetentionPolicies = /** @class */ (function () {
|
|
|
91
91
|
* @param {RetentionPolicyType} type - The type of policy to create
|
|
92
92
|
* @param {RetentionPolicyDispositionAction} action - The disposition action for the new policy
|
|
93
93
|
* @param {Object} [options] - Additional parameters
|
|
94
|
+
* @param {boolean} [options.are_owners_notified] - Whether or not owner and co-owners of a file are notified when the policy nears expiration
|
|
95
|
+
* @param {boolean} [options.can_owner_extend_retention] - Whether or not the owner of a file will be allowed to extend the retention
|
|
96
|
+
* @param {UserMini[]} [options.custom_notification_recipients] - A list of users notified when the retention policy duration is about to end
|
|
97
|
+
* @param {string} [options.description] - The additional text description of the retention policy
|
|
94
98
|
* @param {int} [options.retention_length] - For finite policies, the number of days to retain the content
|
|
95
99
|
* @param {RetentionType} [options.retention_type] - The type of retention for the new policy
|
|
96
100
|
* @param {Function} [callback] - Passed the new policy information if it was acquired successfully, error otherwise
|
|
@@ -134,6 +138,10 @@ var RetentionPolicies = /** @class */ (function () {
|
|
|
134
138
|
* @param {Object} updates - The information to be updated
|
|
135
139
|
* @param {string} [updates.policy_name] - The name of the retention policy
|
|
136
140
|
* @param {RetentionPolicyDispositionAction} [updates.disposition_action] - The disposition action for the updated policy
|
|
141
|
+
* @param {boolean} [updates.are_owners_notified] - Whether or not owner and co-owners of a file are notified when the policy nears expiration
|
|
142
|
+
* @param {boolean} [updates.can_owner_extend_retention] - Whether or not the owner of a file will be allowed to extend the retention
|
|
143
|
+
* @param {UserMini[]} [updates.custom_notification_recipients] - A list of users notified when the retention policy duration is about to end
|
|
144
|
+
* @param {string} [updates.description] - The additional text description of the retention policy
|
|
137
145
|
* @param {int} [updates.retention_length] - For finite policies, the number of days to retain the content
|
|
138
146
|
* @param {RetentionType} [updates.retention_type] - The type of retention. The only possible value here is non_modifiable. You can convert a modifiable policy to non_modifiable, but not the other way around.
|
|
139
147
|
* @param {string} [updates.status] - Used to retire a retention policy if status is set to retired
|
|
@@ -194,6 +202,7 @@ var RetentionPolicies = /** @class */ (function () {
|
|
|
194
202
|
* @param {string} assignID - The Box ID of the object to assign the retention policy to
|
|
195
203
|
* @param {Object} [options] - Optional parameters for the request
|
|
196
204
|
* @param {MetadataFilterField[]} [options.filter_fields] - Metadata fields to filter against, if assigning to a metadata template
|
|
205
|
+
* @param {string} [options.start_date_field] - Id of Metadata field which will be used to specify the start date for the retention policy, or set this to "upload_date" as value to use the date when the file was uploaded to Box
|
|
197
206
|
* @param {Function} [callback] - Passed the new assignment object if successful, error otherwise
|
|
198
207
|
* @returns {Promise<Object>} A promise resolving to the created assignment object
|
|
199
208
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retention-policies.js","sourceRoot":"","sources":["../../src/managers/retention-policies.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAMH,8DAAuC;
|
|
1
|
+
{"version":3,"file":"retention-policies.js","sourceRoot":"","sources":["../../src/managers/retention-policies.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAMH,8DAAuC;AAGvC,gFAAgF;AAChF,WAAW;AACX,gFAAgF;AAEhF;;;;;GAKG;AACH,IAAK,mBAGJ;AAHD,WAAK,mBAAmB;IACvB,wCAAiB,CAAA;IACjB,gDAAyB,CAAA;AAC1B,CAAC,EAHI,mBAAmB,KAAnB,mBAAmB,QAGvB;AAED;;;;GAIG;AACH,IAAK,aAcJ;AAdD,WAAK,aAAa;IACjB;;;;OAIG;IACH,0CAAyB,CAAA;IACzB;;;;;OAKG;IACH,kDAAiC,CAAA;AAClC,CAAC,EAdI,aAAa,KAAb,aAAa,QAcjB;AAED;;;;;GAKG;AACH,IAAK,gCAGJ;AAHD,WAAK,gCAAgC;IACpC,6EAAyC,CAAA;IACzC,yEAAqC,CAAA;AACtC,CAAC,EAHI,gCAAgC,KAAhC,gCAAgC,QAGpC;AAED;;;;GAIG;AACH,IAAK,6BAIJ;AAJD,WAAK,6BAA6B;IACjC,kDAAiB,CAAA;IACjB,0DAAyB,CAAA;IACzB,+DAA8B,CAAA;AAC/B,CAAC,EAJI,6BAA6B,KAA7B,6BAA6B,QAIjC;AAaD,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF,IAAM,SAAS,GAAG,qBAAqB,EACtC,gBAAgB,GAAG,+BAA+B,EAClD,4BAA4B,GAAG,0BAA0B,EACzD,uBAAuB,GAAG,aAAa,EACvC,iCAAiC,GAAG,uBAAuB,EAC3D,0CAA0C,GAAG,+BAA+B,CAAC;AAE9E,gFA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AiB,CAAC,SAAS,CAAC,eAAe,GAAG,6BAA6B,CAAC;AAE5E;;;;GAIG;AACH,iBAAiB,CAAC,SAAS,CAAC,cAAc,GAAG,aAAa,CAAC;AAE3D,iBAAS,iBAAiB,CAAC"}
|
|
@@ -190,10 +190,11 @@ var TermsOfService = /** @class */ (function () {
|
|
|
190
190
|
return this.client
|
|
191
191
|
.get(apiPath, params)
|
|
192
192
|
.then(function (response /* FIXME */) {
|
|
193
|
+
var _a;
|
|
193
194
|
if (response.statusCode !== 200) {
|
|
194
195
|
throw errors_1.default.buildUnexpectedResponseError(response);
|
|
195
196
|
}
|
|
196
|
-
return response.body.entries[0];
|
|
197
|
+
return (_a = response.body.entries[0]) !== null && _a !== void 0 ? _a : {};
|
|
197
198
|
})
|
|
198
199
|
.asCallback(callback);
|
|
199
200
|
};
|
|
@@ -249,15 +250,18 @@ var TermsOfService = /** @class */ (function () {
|
|
|
249
250
|
.post(apiPath, params)
|
|
250
251
|
.then(function (response /* FIXME */) {
|
|
251
252
|
switch (response.statusCode) {
|
|
252
|
-
// 200 - A user status has been successfully created on terms of service
|
|
253
|
+
// 200/201 - A user status has been successfully updated/created on terms of service
|
|
253
254
|
// return the terms of service user status object
|
|
254
255
|
case http_status_1.default.OK:
|
|
256
|
+
case http_status_1.default.CREATED:
|
|
255
257
|
return response.body;
|
|
256
258
|
// 409 - Conflict
|
|
257
259
|
// Terms of Service already exists. Update the existing terms of service object
|
|
258
260
|
case http_status_1.default.CONFLICT:
|
|
259
261
|
var getOptions = Object.assign({ fields: 'id' }, options);
|
|
260
|
-
return _this.getUserStatus(termsOfServicesID, getOptions).then(function (userStatus /* FIXME */) {
|
|
262
|
+
return _this.getUserStatus(termsOfServicesID, getOptions).then(function (userStatus /* FIXME */) {
|
|
263
|
+
return _this.updateUserStatus(userStatus.id, isAccepted);
|
|
264
|
+
});
|
|
261
265
|
default:
|
|
262
266
|
throw errors_1.default.buildUnexpectedResponseError(response);
|
|
263
267
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terms-of-service.js","sourceRoot":"","sources":["../../src/managers/terms-of-service.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;AAEH,gFAAgF;AAChF,eAAe;AACf,gFAAgF;AAEhF,4DAA0C;AAE1C,0DAAoC;AACpC,8DAAuC;AAEvC,gFAAgF;AAChF,WAAW;AACX,gFAAgF;AAEhF;;;;;GAKG;AACH,IAAK,mBAGJ;AAHD,WAAK,mBAAmB;IACvB,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;AACtB,CAAC,EAHI,mBAAmB,KAAnB,mBAAmB,QAGvB;AAED;;;;;GAKG;AACH,IAAK,qBAGJ;AAHD,WAAK,qBAAqB;IACzB,4CAAmB,CAAA;IACnB,8CAAqB,CAAA;AACtB,CAAC,EAHI,qBAAqB,KAArB,qBAAqB,QAGzB;AAED,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF,+CAA+C;AAC/C,IAAM,SAAS,GAAG,oBAAoB,EACrC,kBAAkB,GAAG,iCAAiC,CAAC;AAExD,iFAAiF;AACjF,SAAS;AACT,iFAAiF;AAEjF;;;;;GAKG;AACH;IAMC,wBAAY,MAAiB;QAC5B,0CAA0C;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,+BAAM,GAAN,UACC,mBAAwC,EACxC,qBAA4C,EAC5C,mBAA2B,EAC3B,QAAmB;QAEnB,IAAI,MAAM,GAAG;YACZ,IAAI,EAAE;gBACL,MAAM,EAAE,qBAAqB;gBAC7B,QAAQ,EAAE,mBAAmB;gBAC7B,IAAI,EAAE,mBAAmB;aACzB;SACD,CAAC;QAEF,IAAI,OAAO,GAAG,IAAA,kBAAO,EAAC,SAAS,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAC1D,OAAO,EACP,MAAM,EACN,QA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gBAAM,CAAC,4BAA4B,CAAC,QAAQ,CAAC,CAAC;aACrD;QACF,CAAC,CAAC;aACD,UAAU,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;IACF,qBAAC;AAAD,CAAC,AA5TD,IA4TC;AAED;;;;;GAKG;AACH,cAAc,CAAC,SAAS,CAAC,IAAI,GAAG,mBAAmB,CAAC;AAEpD;;;;;GAKG;AACH,cAAc,CAAC,SAAS,CAAC,MAAM,GAAG,qBAAqB,CAAC;AAMxD,iBAAS,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "box-node-sdk",
|
|
3
3
|
"author": "Box <oss@box.com>",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.9.0",
|
|
5
5
|
"description": "Official SDK for Box Plaform APIs",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@types/bluebird": "^3.5.35",
|
|
38
38
|
"@types/node": "^15.3.1",
|
|
39
39
|
"ajv": "^6.12.3",
|
|
40
|
-
"bluebird": "^3.7.
|
|
40
|
+
"bluebird": "^3.7.2",
|
|
41
41
|
"http-status": "^1.4.1",
|
|
42
42
|
"jsonwebtoken": "^8.5.1",
|
|
43
43
|
"merge-options": "^1.0.1",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"uuid": "^3.3.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@types/jest": "^
|
|
51
|
+
"@types/jest": "^27.1.5",
|
|
52
52
|
"@types/jsonwebtoken": "^8.5.1",
|
|
53
53
|
"@types/lodash": "^4.14.172",
|
|
54
54
|
"@types/prettier": "^2.3.2",
|
|
@@ -59,14 +59,14 @@
|
|
|
59
59
|
"@types/uuid": "^8.3.0",
|
|
60
60
|
"better-docs": "^2.3.2",
|
|
61
61
|
"chai": "^4.2.0",
|
|
62
|
-
"doctoc": "^2.
|
|
63
|
-
"eslint": "^
|
|
62
|
+
"doctoc": "^2.2.1",
|
|
63
|
+
"eslint": "^6.8.0",
|
|
64
64
|
"eslint-plugin-jest": "^23.20.0",
|
|
65
|
-
"eslint-plugin-node": "^
|
|
66
|
-
"eslint-plugin-promise": "^3.
|
|
65
|
+
"eslint-plugin-node": "^11.1.0",
|
|
66
|
+
"eslint-plugin-promise": "^4.3.1",
|
|
67
67
|
"eslint-plugin-unicorn": "^4.0.3",
|
|
68
68
|
"istanbul": "^0.4.3",
|
|
69
|
-
"jest": "^27.
|
|
69
|
+
"jest": "^27.5.1",
|
|
70
70
|
"jsdoc": "^3.6.3",
|
|
71
71
|
"jsonlint": "^1.6.3",
|
|
72
72
|
"jsonlint2": "^1.7.1",
|
|
@@ -75,7 +75,6 @@
|
|
|
75
75
|
"mocha": "^6.0.0",
|
|
76
76
|
"mockery": "^2.1.0",
|
|
77
77
|
"nock": "^9.6.1",
|
|
78
|
-
"npm-force-resolutions": "0.0.3",
|
|
79
78
|
"npm-upgrade": "^3.0.0",
|
|
80
79
|
"nyc": "^14.0.0",
|
|
81
80
|
"prettier": "^2.3.2",
|
|
@@ -83,16 +82,12 @@
|
|
|
83
82
|
"shelljs-nodecli": "^0.1.1",
|
|
84
83
|
"sinon": "^7.5.0",
|
|
85
84
|
"standard-version": "^9.3.2",
|
|
86
|
-
"ts-jest": "^27.
|
|
85
|
+
"ts-jest": "^27.1.4",
|
|
87
86
|
"ts-node": "^10.2.0",
|
|
88
87
|
"typescript": "^4.2.4"
|
|
89
88
|
},
|
|
90
89
|
"files": [
|
|
91
90
|
"config",
|
|
92
91
|
"lib"
|
|
93
|
-
]
|
|
94
|
-
"resolutions": {
|
|
95
|
-
"handlebars": "4.5.3",
|
|
96
|
-
"minimist": "1.2.5"
|
|
97
|
-
}
|
|
92
|
+
]
|
|
98
93
|
}
|