files.com 1.2.33 → 1.2.35
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/docs/models/Behavior.md +4 -0
- package/docs/models/UserRequest.md +5 -1
- package/lib/Files.js +1 -1
- package/lib/models/Behavior.js +2 -0
- package/lib/models/UserRequest.js +17 -3
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/Behavior.js +2 -0
- package/src/models/UserRequest.js +12 -0
package/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.35
|
package/docs/models/Behavior.md
CHANGED
@@ -90,6 +90,7 @@ await Behavior.listFor(path, {
|
|
90
90
|
```
|
91
91
|
await Behavior.create({
|
92
92
|
'value': "{\"method\": \"GET\"}",
|
93
|
+
'disable_parent_folder_behavior': true,
|
93
94
|
'name': "example",
|
94
95
|
'description': "example",
|
95
96
|
'path': "path",
|
@@ -102,6 +103,7 @@ await Behavior.create({
|
|
102
103
|
|
103
104
|
* `value` (string): The value of the folder behavior. Can be an integer, array, or hash depending on the type of folder behavior. See The Behavior Types section for example values for each type of behavior.
|
104
105
|
* `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
|
106
|
+
* `disable_parent_folder_behavior` (boolean): If true, the parent folder's behavior will be disabled for this folder.
|
105
107
|
* `name` (string): Name for this behavior.
|
106
108
|
* `description` (string): Description for this behavior.
|
107
109
|
* `path` (string): Required - Folder behaviors path.
|
@@ -141,6 +143,7 @@ const [behavior] = await Behavior.list()
|
|
141
143
|
|
142
144
|
await behavior.update({
|
143
145
|
'value': "{\"method\": \"GET\"}",
|
146
|
+
'disable_parent_folder_behavior': true,
|
144
147
|
'name': "example",
|
145
148
|
'description': "example",
|
146
149
|
'behavior': "webhook",
|
@@ -154,6 +157,7 @@ await behavior.update({
|
|
154
157
|
* `id` (int64): Required - Behavior ID.
|
155
158
|
* `value` (string): The value of the folder behavior. Can be an integer, array, or hash depending on the type of folder behavior. See The Behavior Types section for example values for each type of behavior.
|
156
159
|
* `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
|
160
|
+
* `disable_parent_folder_behavior` (boolean): If true, the parent folder's behavior will be disabled for this folder.
|
157
161
|
* `name` (string): Name for this behavior.
|
158
162
|
* `description` (string): Description for this behavior.
|
159
163
|
* `behavior` (string): Behavior type.
|
@@ -7,7 +7,8 @@
|
|
7
7
|
"id": 1,
|
8
8
|
"name": "John Doe",
|
9
9
|
"email": "example",
|
10
|
-
"details": "Changed Departments"
|
10
|
+
"details": "Changed Departments",
|
11
|
+
"company": "Acme Inc."
|
11
12
|
}
|
12
13
|
```
|
13
14
|
|
@@ -15,6 +16,7 @@
|
|
15
16
|
* `name` (string): User's full name
|
16
17
|
* `email` (email): User email address
|
17
18
|
* `details` (string): Details of the user's request
|
19
|
+
* `company` (string): User's company name
|
18
20
|
|
19
21
|
---
|
20
22
|
|
@@ -54,6 +56,7 @@ await UserRequest.create({
|
|
54
56
|
'name': "name",
|
55
57
|
'email': "email",
|
56
58
|
'details': "details",
|
59
|
+
'company': "Acme Inc.",
|
57
60
|
})
|
58
61
|
```
|
59
62
|
|
@@ -63,6 +66,7 @@ await UserRequest.create({
|
|
63
66
|
* `name` (string): Required - Name of user requested
|
64
67
|
* `email` (string): Required - Email of user requested
|
65
68
|
* `details` (string): Required - Details of the user request
|
69
|
+
* `company` (string): Company of the user requested
|
66
70
|
|
67
71
|
---
|
68
72
|
|
package/lib/Files.js
CHANGED
@@ -11,7 +11,7 @@ var endpointPrefix = '/api/rest/v1';
|
|
11
11
|
var apiKey;
|
12
12
|
var baseUrl = 'https://app.files.com';
|
13
13
|
var sessionId = null;
|
14
|
-
var version = '1.2.
|
14
|
+
var version = '1.2.35';
|
15
15
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
16
16
|
var logLevel = _Logger.LogLevel.INFO;
|
17
17
|
var debugRequest = false;
|
package/lib/models/Behavior.js
CHANGED
@@ -106,6 +106,7 @@ var Behavior = /*#__PURE__*/(0, _createClass2.default)(function Behavior() {
|
|
106
106
|
// Parameters:
|
107
107
|
// value - string - The value of the folder behavior. Can be an integer, array, or hash depending on the type of folder behavior. See The Behavior Types section for example values for each type of behavior.
|
108
108
|
// attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
|
109
|
+
// disable_parent_folder_behavior - boolean - If true, the parent folder's behavior will be disabled for this folder.
|
109
110
|
// name - string - Name for this behavior.
|
110
111
|
// description - string - Description for this behavior.
|
111
112
|
// behavior - string - Behavior type.
|
@@ -470,6 +471,7 @@ _Behavior = Behavior;
|
|
470
471
|
// Parameters:
|
471
472
|
// value - string - The value of the folder behavior. Can be an integer, array, or hash depending on the type of folder behavior. See The Behavior Types section for example values for each type of behavior.
|
472
473
|
// attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
|
474
|
+
// disable_parent_folder_behavior - boolean - If true, the parent folder's behavior will be disabled for this folder.
|
473
475
|
// name - string - Name for this behavior.
|
474
476
|
// description - string - Description for this behavior.
|
475
477
|
// path (required) - string - Folder behaviors path.
|
@@ -61,6 +61,13 @@ var UserRequest = /*#__PURE__*/(0, _createClass2.default)(function UserRequest()
|
|
61
61
|
(0, _defineProperty2.default)(this, "setDetails", function (value) {
|
62
62
|
_this.attributes.details = value;
|
63
63
|
});
|
64
|
+
// string # User's company name
|
65
|
+
(0, _defineProperty2.default)(this, "getCompany", function () {
|
66
|
+
return _this.attributes.company;
|
67
|
+
});
|
68
|
+
(0, _defineProperty2.default)(this, "setCompany", function (value) {
|
69
|
+
_this.attributes.company = value;
|
70
|
+
});
|
64
71
|
(0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
65
72
|
var params,
|
66
73
|
_args = arguments;
|
@@ -250,6 +257,7 @@ _UserRequest = UserRequest;
|
|
250
257
|
// name (required) - string - Name of user requested
|
251
258
|
// email (required) - string - Email of user requested
|
252
259
|
// details (required) - string - Details of the user request
|
260
|
+
// company - string - Company of the user requested
|
253
261
|
(0, _defineProperty2.default)(UserRequest, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
254
262
|
var params,
|
255
263
|
options,
|
@@ -296,12 +304,18 @@ _UserRequest = UserRequest;
|
|
296
304
|
}
|
297
305
|
throw new errors.InvalidParameterError("Bad parameter: details must be of type String, received ".concat((0, _utils.getType)(params.details)));
|
298
306
|
case 14:
|
299
|
-
|
300
|
-
|
307
|
+
if (!(params.company && !(0, _utils.isString)(params.company))) {
|
308
|
+
_context5.next = 16;
|
309
|
+
break;
|
310
|
+
}
|
311
|
+
throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params.company)));
|
301
312
|
case 16:
|
313
|
+
_context5.next = 18;
|
314
|
+
return _Api.default.sendRequest('/user_requests', 'POST', params, options);
|
315
|
+
case 18:
|
302
316
|
response = _context5.sent;
|
303
317
|
return _context5.abrupt("return", new _UserRequest(response === null || response === void 0 ? void 0 : response.data, options));
|
304
|
-
case
|
318
|
+
case 20:
|
305
319
|
case "end":
|
306
320
|
return _context5.stop();
|
307
321
|
}
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
package/src/models/Behavior.js
CHANGED
@@ -101,6 +101,7 @@ class Behavior {
|
|
101
101
|
// Parameters:
|
102
102
|
// value - string - The value of the folder behavior. Can be an integer, array, or hash depending on the type of folder behavior. See The Behavior Types section for example values for each type of behavior.
|
103
103
|
// attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
|
104
|
+
// disable_parent_folder_behavior - boolean - If true, the parent folder's behavior will be disabled for this folder.
|
104
105
|
// name - string - Name for this behavior.
|
105
106
|
// description - string - Description for this behavior.
|
106
107
|
// behavior - string - Behavior type.
|
@@ -289,6 +290,7 @@ class Behavior {
|
|
289
290
|
// Parameters:
|
290
291
|
// value - string - The value of the folder behavior. Can be an integer, array, or hash depending on the type of folder behavior. See The Behavior Types section for example values for each type of behavior.
|
291
292
|
// attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
|
293
|
+
// disable_parent_folder_behavior - boolean - If true, the parent folder's behavior will be disabled for this folder.
|
292
294
|
// name - string - Name for this behavior.
|
293
295
|
// description - string - Description for this behavior.
|
294
296
|
// path (required) - string - Folder behaviors path.
|
@@ -56,6 +56,13 @@ class UserRequest {
|
|
56
56
|
this.attributes.details = value
|
57
57
|
}
|
58
58
|
|
59
|
+
// string # User's company name
|
60
|
+
getCompany = () => this.attributes.company
|
61
|
+
|
62
|
+
setCompany = value => {
|
63
|
+
this.attributes.company = value
|
64
|
+
}
|
65
|
+
|
59
66
|
delete = async (params = {}) => {
|
60
67
|
if (!this.attributes.id) {
|
61
68
|
throw new errors.EmptyPropertyError('Current object has no id')
|
@@ -143,6 +150,7 @@ class UserRequest {
|
|
143
150
|
// name (required) - string - Name of user requested
|
144
151
|
// email (required) - string - Email of user requested
|
145
152
|
// details (required) - string - Details of the user request
|
153
|
+
// company - string - Company of the user requested
|
146
154
|
static create = async (params = {}, options = {}) => {
|
147
155
|
if (!params.name) {
|
148
156
|
throw new errors.MissingParameterError('Parameter missing: name')
|
@@ -168,6 +176,10 @@ class UserRequest {
|
|
168
176
|
throw new errors.InvalidParameterError(`Bad parameter: details must be of type String, received ${getType(params.details)}`)
|
169
177
|
}
|
170
178
|
|
179
|
+
if (params.company && !isString(params.company)) {
|
180
|
+
throw new errors.InvalidParameterError(`Bad parameter: company must be of type String, received ${getType(params.company)}`)
|
181
|
+
}
|
182
|
+
|
171
183
|
const response = await Api.sendRequest('/user_requests', 'POST', params, options)
|
172
184
|
|
173
185
|
return new UserRequest(response?.data, options)
|