files.com 1.2.329 → 1.2.331
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/_VERSION +1 -1
- package/docs/models/Folder.md +1 -1
- package/docs/models/Partner.md +4 -4
- package/lib/Files.js +1 -1
- package/lib/models/Folder.js +1 -1
- package/lib/models/Partner.js +21 -15
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/Folder.js +1 -1
- package/src/models/Partner.js +12 -8
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.331
|
package/docs/models/Folder.md
CHANGED
|
@@ -112,7 +112,7 @@ await Folder.listFor(path, {
|
|
|
112
112
|
* `sort_by` (object): Search by field and direction. Valid fields are `path`, `size`, `modified_at_datetime`, `provided_modified_at`. Valid directions are `asc` and `desc`. Defaults to `{"path":"asc"}`.
|
|
113
113
|
* `search` (string): If specified, will search the folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. Results may be truncated if more than 1,000 possible matches exist. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
|
114
114
|
* `search_custom_metadata_key` (string): If provided, the search string in `search` will search for files where this custom metadata key matches the value sent in `search`. Set this to `*` to allow any metadata key to match the value sent in `search`.
|
|
115
|
-
* `search_all` (boolean): Search entire site? If
|
|
115
|
+
* `search_all` (boolean): Search entire site? If true, we will search the entire site. Do not provide a path when using this parameter. This is the same API used by the search bar in the web UI when running 'Search All Files'. Search results are a best effort, not real time, and not guaranteed to match every file. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
|
116
116
|
* `with_previews` (boolean): Include file previews?
|
|
117
117
|
* `with_priority_color` (boolean): Include file priority color information?
|
|
118
118
|
* `type` (string): Type of objects to return. Can be `folder` or `file`.
|
package/docs/models/Partner.md
CHANGED
|
@@ -72,7 +72,6 @@ await Partner.find(id)
|
|
|
72
72
|
|
|
73
73
|
```
|
|
74
74
|
await Partner.create({
|
|
75
|
-
'name': "Acme Corp",
|
|
76
75
|
'allow_bypassing_2fa_policies': false,
|
|
77
76
|
'allow_credential_changes': false,
|
|
78
77
|
'allow_providing_gpg_keys': false,
|
|
@@ -80,13 +79,13 @@ await Partner.create({
|
|
|
80
79
|
'notes': "This is a note about the partner.",
|
|
81
80
|
'root_folder': "/AcmeCorp",
|
|
82
81
|
'tags': "example",
|
|
82
|
+
'name': "Acme Corp",
|
|
83
83
|
})
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
### Parameters
|
|
88
88
|
|
|
89
|
-
* `name` (string): The name of the Partner.
|
|
90
89
|
* `allow_bypassing_2fa_policies` (boolean): Allow users created under this Partner to bypass Two-Factor Authentication policies.
|
|
91
90
|
* `allow_credential_changes` (boolean): Allow Partner Admins to change or reset credentials for users belonging to this Partner.
|
|
92
91
|
* `allow_providing_gpg_keys` (boolean): Allow Partner Admins to provide GPG keys.
|
|
@@ -94,6 +93,7 @@ await Partner.create({
|
|
|
94
93
|
* `notes` (string): Notes about this Partner.
|
|
95
94
|
* `root_folder` (string): The root folder path for this Partner.
|
|
96
95
|
* `tags` (string): Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
96
|
+
* `name` (string): Required - The name of the Partner.
|
|
97
97
|
|
|
98
98
|
---
|
|
99
99
|
|
|
@@ -103,7 +103,6 @@ await Partner.create({
|
|
|
103
103
|
const partner = await Partner.find(id)
|
|
104
104
|
|
|
105
105
|
await partner.update({
|
|
106
|
-
'name': "Acme Corp",
|
|
107
106
|
'allow_bypassing_2fa_policies': false,
|
|
108
107
|
'allow_credential_changes': false,
|
|
109
108
|
'allow_providing_gpg_keys': false,
|
|
@@ -111,13 +110,13 @@ await partner.update({
|
|
|
111
110
|
'notes': "This is a note about the partner.",
|
|
112
111
|
'root_folder': "/AcmeCorp",
|
|
113
112
|
'tags': "example",
|
|
113
|
+
'name': "Acme Corp",
|
|
114
114
|
})
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
### Parameters
|
|
118
118
|
|
|
119
119
|
* `id` (int64): Required - Partner ID.
|
|
120
|
-
* `name` (string): The name of the Partner.
|
|
121
120
|
* `allow_bypassing_2fa_policies` (boolean): Allow users created under this Partner to bypass Two-Factor Authentication policies.
|
|
122
121
|
* `allow_credential_changes` (boolean): Allow Partner Admins to change or reset credentials for users belonging to this Partner.
|
|
123
122
|
* `allow_providing_gpg_keys` (boolean): Allow Partner Admins to provide GPG keys.
|
|
@@ -125,6 +124,7 @@ await partner.update({
|
|
|
125
124
|
* `notes` (string): Notes about this Partner.
|
|
126
125
|
* `root_folder` (string): The root folder path for this Partner.
|
|
127
126
|
* `tags` (string): Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
127
|
+
* `name` (string): The name of the Partner.
|
|
128
128
|
|
|
129
129
|
### Example Response
|
|
130
130
|
|
package/lib/Files.js
CHANGED
|
@@ -12,7 +12,7 @@ var apiKey;
|
|
|
12
12
|
var baseUrl = 'https://app.files.com';
|
|
13
13
|
var sessionId = null;
|
|
14
14
|
var language = null;
|
|
15
|
-
var version = '1.2.
|
|
15
|
+
var version = '1.2.331';
|
|
16
16
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
|
17
17
|
var logLevel = _Logger.LogLevel.INFO;
|
|
18
18
|
var debugRequest = false;
|
package/lib/models/Folder.js
CHANGED
|
@@ -317,7 +317,7 @@ var Folder = /*#__PURE__*/(0, _createClass2.default)(function Folder() {
|
|
|
317
317
|
// sort_by - object - Search by field and direction. Valid fields are `path`, `size`, `modified_at_datetime`, `provided_modified_at`. Valid directions are `asc` and `desc`. Defaults to `{"path":"asc"}`.
|
|
318
318
|
// search - string - If specified, will search the folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. Results may be truncated if more than 1,000 possible matches exist. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
|
319
319
|
// search_custom_metadata_key - string - If provided, the search string in `search` will search for files where this custom metadata key matches the value sent in `search`. Set this to `*` to allow any metadata key to match the value sent in `search`.
|
|
320
|
-
// search_all - boolean - Search entire site? If
|
|
320
|
+
// search_all - boolean - Search entire site? If true, we will search the entire site. Do not provide a path when using this parameter. This is the same API used by the search bar in the web UI when running 'Search All Files'. Search results are a best effort, not real time, and not guaranteed to match every file. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
|
321
321
|
// with_previews - boolean - Include file previews?
|
|
322
322
|
// with_priority_color - boolean - Include file priority color information?
|
|
323
323
|
// type - string - Type of objects to return. Can be `folder` or `file`.
|
package/lib/models/Partner.js
CHANGED
|
@@ -110,7 +110,6 @@ var Partner = /*#__PURE__*/(0, _createClass2.default)(function Partner() {
|
|
|
110
110
|
_this.attributes.user_ids = value;
|
|
111
111
|
});
|
|
112
112
|
// Parameters:
|
|
113
|
-
// name - string - The name of the Partner.
|
|
114
113
|
// allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
|
|
115
114
|
// allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
|
|
116
115
|
// allow_providing_gpg_keys - boolean - Allow Partner Admins to provide GPG keys.
|
|
@@ -118,6 +117,7 @@ var Partner = /*#__PURE__*/(0, _createClass2.default)(function Partner() {
|
|
|
118
117
|
// notes - string - Notes about this Partner.
|
|
119
118
|
// root_folder - string - The root folder path for this Partner.
|
|
120
119
|
// tags - string - Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
120
|
+
// name - string - The name of the Partner.
|
|
121
121
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
122
122
|
var params,
|
|
123
123
|
response,
|
|
@@ -145,29 +145,29 @@ var Partner = /*#__PURE__*/(0, _createClass2.default)(function Partner() {
|
|
|
145
145
|
}
|
|
146
146
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
147
147
|
case 3:
|
|
148
|
-
if (!(params.
|
|
148
|
+
if (!(params.notes && !(0, _utils.isString)(params.notes))) {
|
|
149
149
|
_context.next = 4;
|
|
150
150
|
break;
|
|
151
151
|
}
|
|
152
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
152
|
+
throw new errors.InvalidParameterError("Bad parameter: notes must be of type String, received ".concat((0, _utils.getType)(params.notes)));
|
|
153
153
|
case 4:
|
|
154
|
-
if (!(params.
|
|
154
|
+
if (!(params.root_folder && !(0, _utils.isString)(params.root_folder))) {
|
|
155
155
|
_context.next = 5;
|
|
156
156
|
break;
|
|
157
157
|
}
|
|
158
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
158
|
+
throw new errors.InvalidParameterError("Bad parameter: root_folder must be of type String, received ".concat((0, _utils.getType)(params.root_folder)));
|
|
159
159
|
case 5:
|
|
160
|
-
if (!(params.
|
|
160
|
+
if (!(params.tags && !(0, _utils.isString)(params.tags))) {
|
|
161
161
|
_context.next = 6;
|
|
162
162
|
break;
|
|
163
163
|
}
|
|
164
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
164
|
+
throw new errors.InvalidParameterError("Bad parameter: tags must be of type String, received ".concat((0, _utils.getType)(params.tags)));
|
|
165
165
|
case 6:
|
|
166
|
-
if (!(params.
|
|
166
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
|
167
167
|
_context.next = 7;
|
|
168
168
|
break;
|
|
169
169
|
}
|
|
170
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
170
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
|
171
171
|
case 7:
|
|
172
172
|
if (params.id) {
|
|
173
173
|
_context.next = 9;
|
|
@@ -386,7 +386,6 @@ _Partner = Partner;
|
|
|
386
386
|
return _Partner.find(id, params, options);
|
|
387
387
|
});
|
|
388
388
|
// Parameters:
|
|
389
|
-
// name - string - The name of the Partner.
|
|
390
389
|
// allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
|
|
391
390
|
// allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
|
|
392
391
|
// allow_providing_gpg_keys - boolean - Allow Partner Admins to provide GPG keys.
|
|
@@ -394,6 +393,7 @@ _Partner = Partner;
|
|
|
394
393
|
// notes - string - Notes about this Partner.
|
|
395
394
|
// root_folder - string - The root folder path for this Partner.
|
|
396
395
|
// tags - string - Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
396
|
+
// name (required) - string - The name of the Partner.
|
|
397
397
|
(0, _defineProperty2.default)(Partner, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
398
398
|
var params,
|
|
399
399
|
options,
|
|
@@ -404,11 +404,11 @@ _Partner = Partner;
|
|
|
404
404
|
case 0:
|
|
405
405
|
params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
406
406
|
options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
|
|
407
|
-
if (
|
|
407
|
+
if (params.name) {
|
|
408
408
|
_context6.next = 1;
|
|
409
409
|
break;
|
|
410
410
|
}
|
|
411
|
-
throw new errors.
|
|
411
|
+
throw new errors.MissingParameterError('Parameter missing: name');
|
|
412
412
|
case 1:
|
|
413
413
|
if (!(params.notes && !(0, _utils.isString)(params.notes))) {
|
|
414
414
|
_context6.next = 2;
|
|
@@ -428,12 +428,18 @@ _Partner = Partner;
|
|
|
428
428
|
}
|
|
429
429
|
throw new errors.InvalidParameterError("Bad parameter: tags must be of type String, received ".concat((0, _utils.getType)(params.tags)));
|
|
430
430
|
case 4:
|
|
431
|
-
|
|
432
|
-
|
|
431
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
|
432
|
+
_context6.next = 5;
|
|
433
|
+
break;
|
|
434
|
+
}
|
|
435
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
|
433
436
|
case 5:
|
|
437
|
+
_context6.next = 6;
|
|
438
|
+
return _Api.default.sendRequest('/partners', 'POST', params, options);
|
|
439
|
+
case 6:
|
|
434
440
|
response = _context6.sent;
|
|
435
441
|
return _context6.abrupt("return", new _Partner(response === null || response === void 0 ? void 0 : response.data, options));
|
|
436
|
-
case
|
|
442
|
+
case 7:
|
|
437
443
|
case "end":
|
|
438
444
|
return _context6.stop();
|
|
439
445
|
}
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
package/src/models/Folder.js
CHANGED
|
@@ -290,7 +290,7 @@ class Folder {
|
|
|
290
290
|
// sort_by - object - Search by field and direction. Valid fields are `path`, `size`, `modified_at_datetime`, `provided_modified_at`. Valid directions are `asc` and `desc`. Defaults to `{"path":"asc"}`.
|
|
291
291
|
// search - string - If specified, will search the folders/files list by name. Ignores text before last `/`. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. Results may be truncated if more than 1,000 possible matches exist. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
|
292
292
|
// search_custom_metadata_key - string - If provided, the search string in `search` will search for files where this custom metadata key matches the value sent in `search`. Set this to `*` to allow any metadata key to match the value sent in `search`.
|
|
293
|
-
// search_all - boolean - Search entire site? If
|
|
293
|
+
// search_all - boolean - Search entire site? If true, we will search the entire site. Do not provide a path when using this parameter. This is the same API used by the search bar in the web UI when running 'Search All Files'. Search results are a best effort, not real time, and not guaranteed to match every file. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
|
294
294
|
// with_previews - boolean - Include file previews?
|
|
295
295
|
// with_priority_color - boolean - Include file priority color information?
|
|
296
296
|
// type - string - Type of objects to return. Can be `folder` or `file`.
|
package/src/models/Partner.js
CHANGED
|
@@ -106,7 +106,6 @@ class Partner {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
// Parameters:
|
|
109
|
-
// name - string - The name of the Partner.
|
|
110
109
|
// allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
|
|
111
110
|
// allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
|
|
112
111
|
// allow_providing_gpg_keys - boolean - Allow Partner Admins to provide GPG keys.
|
|
@@ -114,6 +113,7 @@ class Partner {
|
|
|
114
113
|
// notes - string - Notes about this Partner.
|
|
115
114
|
// root_folder - string - The root folder path for this Partner.
|
|
116
115
|
// tags - string - Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
116
|
+
// name - string - The name of the Partner.
|
|
117
117
|
update = async (params = {}) => {
|
|
118
118
|
if (!this.attributes.id) {
|
|
119
119
|
throw new errors.EmptyPropertyError('Current object has no id')
|
|
@@ -128,10 +128,6 @@ class Partner {
|
|
|
128
128
|
throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params.id)}`)
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
if (params.name && !isString(params.name)) {
|
|
132
|
-
throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params.name)}`)
|
|
133
|
-
}
|
|
134
|
-
|
|
135
131
|
if (params.notes && !isString(params.notes)) {
|
|
136
132
|
throw new errors.InvalidParameterError(`Bad parameter: notes must be of type String, received ${getType(params.notes)}`)
|
|
137
133
|
}
|
|
@@ -144,6 +140,10 @@ class Partner {
|
|
|
144
140
|
throw new errors.InvalidParameterError(`Bad parameter: tags must be of type String, received ${getType(params.tags)}`)
|
|
145
141
|
}
|
|
146
142
|
|
|
143
|
+
if (params.name && !isString(params.name)) {
|
|
144
|
+
throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params.name)}`)
|
|
145
|
+
}
|
|
146
|
+
|
|
147
147
|
if (!params.id) {
|
|
148
148
|
if (this.attributes.id) {
|
|
149
149
|
params.id = this.id
|
|
@@ -244,7 +244,6 @@ class Partner {
|
|
|
244
244
|
Partner.find(id, params, options)
|
|
245
245
|
|
|
246
246
|
// Parameters:
|
|
247
|
-
// name - string - The name of the Partner.
|
|
248
247
|
// allow_bypassing_2fa_policies - boolean - Allow users created under this Partner to bypass Two-Factor Authentication policies.
|
|
249
248
|
// allow_credential_changes - boolean - Allow Partner Admins to change or reset credentials for users belonging to this Partner.
|
|
250
249
|
// allow_providing_gpg_keys - boolean - Allow Partner Admins to provide GPG keys.
|
|
@@ -252,9 +251,10 @@ class Partner {
|
|
|
252
251
|
// notes - string - Notes about this Partner.
|
|
253
252
|
// root_folder - string - The root folder path for this Partner.
|
|
254
253
|
// tags - string - Comma-separated list of Tags for this Partner. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens.
|
|
254
|
+
// name (required) - string - The name of the Partner.
|
|
255
255
|
static create = async (params = {}, options = {}) => {
|
|
256
|
-
if (
|
|
257
|
-
throw new errors.
|
|
256
|
+
if (!params.name) {
|
|
257
|
+
throw new errors.MissingParameterError('Parameter missing: name')
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
if (params.notes && !isString(params.notes)) {
|
|
@@ -269,6 +269,10 @@ class Partner {
|
|
|
269
269
|
throw new errors.InvalidParameterError(`Bad parameter: tags must be of type String, received ${getType(params.tags)}`)
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
+
if (params.name && !isString(params.name)) {
|
|
273
|
+
throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params.name)}`)
|
|
274
|
+
}
|
|
275
|
+
|
|
272
276
|
const response = await Api.sendRequest('/partners', 'POST', params, options)
|
|
273
277
|
|
|
274
278
|
return new Partner(response?.data, options)
|