files.com 1.2.51 → 1.2.52

Sign up to get free protection for your applications and to get access to all the features.
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.51
1
+ 1.2.52
@@ -13,7 +13,8 @@
13
13
  "value": {
14
14
  "key": "example value"
15
15
  },
16
- "disable_parent_folder_behavior": true
16
+ "disable_parent_folder_behavior": true,
17
+ "recursive": true
17
18
  }
18
19
  ```
19
20
 
@@ -25,6 +26,7 @@
25
26
  * `description` (string): Description for this behavior.
26
27
  * `value` (object): Settings for this behavior. See the section above for an example value to provide here. Formatting is different for each Behavior type. May be sent as nested JSON or a single JSON-encoded string. If using XML encoding for the API call, this data must be sent as a JSON-encoded string.
27
28
  * `disable_parent_folder_behavior` (boolean): If true, the parent folder's behavior will be disabled for this folder.
29
+ * `recursive` (boolean): Is behavior recursive?
28
30
  * `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
29
31
  * `attachment_delete` (boolean): If true, will delete the file stored in attachment
30
32
 
@@ -80,7 +82,7 @@ await Behavior.listFor(path, {
80
82
  * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `behavior`.
81
83
  * `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `behavior`.
82
84
  * `path` (string): Required - Path to operate on.
83
- * `recursive` (string): Show behaviors above this path?
85
+ * `ancestor_behaviors` (string): Show behaviors above this path?
84
86
  * `behavior` (string): DEPRECATED: If set only shows folder behaviors matching this behavior type. Use `filter[behavior]` instead.
85
87
 
86
88
  ---
@@ -91,6 +93,7 @@ await Behavior.listFor(path, {
91
93
  await Behavior.create({
92
94
  'value': "{\"method\": \"GET\"}",
93
95
  'disable_parent_folder_behavior': true,
96
+ 'recursive': true,
94
97
  'name': "example",
95
98
  'description': "example",
96
99
  'path': "path",
@@ -104,6 +107,7 @@ await Behavior.create({
104
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.
105
108
  * `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
106
109
  * `disable_parent_folder_behavior` (boolean): If true, the parent folder's behavior will be disabled for this folder.
110
+ * `recursive` (boolean): Is behavior recursive?
107
111
  * `name` (string): Name for this behavior.
108
112
  * `description` (string): Description for this behavior.
109
113
  * `path` (string): Required - Folder behaviors path.
@@ -144,6 +148,7 @@ const [behavior] = await Behavior.list()
144
148
  await behavior.update({
145
149
  'value': "{\"method\": \"GET\"}",
146
150
  'disable_parent_folder_behavior': true,
151
+ 'recursive': true,
147
152
  'name': "example",
148
153
  'description': "example",
149
154
  'behavior': "webhook",
@@ -158,6 +163,7 @@ await behavior.update({
158
163
  * `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.
159
164
  * `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
160
165
  * `disable_parent_folder_behavior` (boolean): If true, the parent folder's behavior will be disabled for this folder.
166
+ * `recursive` (boolean): Is behavior recursive?
161
167
  * `name` (string): Name for this behavior.
162
168
  * `description` (string): Description for this behavior.
163
169
  * `behavior` (string): Behavior type.
@@ -177,7 +183,8 @@ await behavior.update({
177
183
  "value": {
178
184
  "key": "example value"
179
185
  },
180
- "disable_parent_folder_behavior": true
186
+ "disable_parent_folder_behavior": true,
187
+ "recursive": true
181
188
  }
182
189
  ```
183
190
 
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.51';
14
+ var version = '1.2.52';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -89,6 +89,13 @@ var Behavior = /*#__PURE__*/(0, _createClass2.default)(function Behavior() {
89
89
  (0, _defineProperty2.default)(this, "setDisableParentFolderBehavior", function (value) {
90
90
  _this.attributes.disable_parent_folder_behavior = value;
91
91
  });
92
+ // boolean # Is behavior recursive?
93
+ (0, _defineProperty2.default)(this, "getRecursive", function () {
94
+ return _this.attributes.recursive;
95
+ });
96
+ (0, _defineProperty2.default)(this, "setRecursive", function (value) {
97
+ _this.attributes.recursive = value;
98
+ });
92
99
  // file # Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
93
100
  (0, _defineProperty2.default)(this, "getAttachmentFile", function () {
94
101
  return _this.attributes.attachment_file;
@@ -107,6 +114,7 @@ var Behavior = /*#__PURE__*/(0, _createClass2.default)(function Behavior() {
107
114
  // 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
115
  // attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
109
116
  // disable_parent_folder_behavior - boolean - If true, the parent folder's behavior will be disabled for this folder.
117
+ // recursive - boolean - Is behavior recursive?
110
118
  // name - string - Name for this behavior.
111
119
  // description - string - Description for this behavior.
112
120
  // behavior - string - Behavior type.
@@ -394,7 +402,7 @@ _Behavior = Behavior;
394
402
  // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `behavior`.
395
403
  // filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `behavior`.
396
404
  // path (required) - string - Path to operate on.
397
- // recursive - string - Show behaviors above this path?
405
+ // ancestor_behaviors - string - Show behaviors above this path?
398
406
  // behavior - string - DEPRECATED: If set only shows folder behaviors matching this behavior type. Use `filter[behavior]` instead.
399
407
  (0, _defineProperty2.default)(Behavior, "listFor", /*#__PURE__*/function () {
400
408
  var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(path) {
@@ -439,11 +447,11 @@ _Behavior = Behavior;
439
447
  }
440
448
  throw new errors.InvalidParameterError("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(params.path)));
441
449
  case 13:
442
- if (!(params.recursive && !(0, _utils.isString)(params.recursive))) {
450
+ if (!(params.ancestor_behaviors && !(0, _utils.isString)(params.ancestor_behaviors))) {
443
451
  _context6.next = 15;
444
452
  break;
445
453
  }
446
- throw new errors.InvalidParameterError("Bad parameter: recursive must be of type String, received ".concat((0, _utils.getType)(params.recursive)));
454
+ throw new errors.InvalidParameterError("Bad parameter: ancestor_behaviors must be of type String, received ".concat((0, _utils.getType)(params.ancestor_behaviors)));
447
455
  case 15:
448
456
  if (!(params.behavior && !(0, _utils.isString)(params.behavior))) {
449
457
  _context6.next = 17;
@@ -472,6 +480,7 @@ _Behavior = Behavior;
472
480
  // 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.
473
481
  // attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
474
482
  // disable_parent_folder_behavior - boolean - If true, the parent folder's behavior will be disabled for this folder.
483
+ // recursive - boolean - Is behavior recursive?
475
484
  // name - string - Name for this behavior.
476
485
  // description - string - Description for this behavior.
477
486
  // path (required) - string - Folder behaviors path.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.51",
3
+ "version": "1.2.52",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
package/src/Files.js CHANGED
@@ -5,7 +5,7 @@ const endpointPrefix = '/api/rest/v1'
5
5
  let apiKey
6
6
  let baseUrl = 'https://app.files.com'
7
7
  let sessionId = null
8
- const version = '1.2.51'
8
+ const version = '1.2.52'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -84,6 +84,13 @@ class Behavior {
84
84
  this.attributes.disable_parent_folder_behavior = value
85
85
  }
86
86
 
87
+ // boolean # Is behavior recursive?
88
+ getRecursive = () => this.attributes.recursive
89
+
90
+ setRecursive = value => {
91
+ this.attributes.recursive = value
92
+ }
93
+
87
94
  // file # Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
88
95
  getAttachmentFile = () => this.attributes.attachment_file
89
96
 
@@ -102,6 +109,7 @@ class Behavior {
102
109
  // 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
110
  // attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
104
111
  // disable_parent_folder_behavior - boolean - If true, the parent folder's behavior will be disabled for this folder.
112
+ // recursive - boolean - Is behavior recursive?
105
113
  // name - string - Name for this behavior.
106
114
  // description - string - Description for this behavior.
107
115
  // behavior - string - Behavior type.
@@ -249,7 +257,7 @@ class Behavior {
249
257
  // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `behavior`.
250
258
  // filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `behavior`.
251
259
  // path (required) - string - Path to operate on.
252
- // recursive - string - Show behaviors above this path?
260
+ // ancestor_behaviors - string - Show behaviors above this path?
253
261
  // behavior - string - DEPRECATED: If set only shows folder behaviors matching this behavior type. Use `filter[behavior]` instead.
254
262
  static listFor = async (path, params = {}, options = {}) => {
255
263
  if (!isObject(params)) {
@@ -274,8 +282,8 @@ class Behavior {
274
282
  throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(params.path)}`)
275
283
  }
276
284
 
277
- if (params.recursive && !isString(params.recursive)) {
278
- throw new errors.InvalidParameterError(`Bad parameter: recursive must be of type String, received ${getType(params.recursive)}`)
285
+ if (params.ancestor_behaviors && !isString(params.ancestor_behaviors)) {
286
+ throw new errors.InvalidParameterError(`Bad parameter: ancestor_behaviors must be of type String, received ${getType(params.ancestor_behaviors)}`)
279
287
  }
280
288
 
281
289
  if (params.behavior && !isString(params.behavior)) {
@@ -291,6 +299,7 @@ class Behavior {
291
299
  // 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.
292
300
  // attachment_file - file - Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
293
301
  // disable_parent_folder_behavior - boolean - If true, the parent folder's behavior will be disabled for this folder.
302
+ // recursive - boolean - Is behavior recursive?
294
303
  // name - string - Name for this behavior.
295
304
  // description - string - Description for this behavior.
296
305
  // path (required) - string - Folder behaviors path.