files.com 1.0.259 → 1.0.261

Sign up to get free protection for your applications and to get access to all the features.
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.259
1
+ 1.0.261
@@ -20,6 +20,7 @@
20
20
  "destination_replace_from": "example",
21
21
  "destination_replace_to": "example",
22
22
  "description": "example",
23
+ "recurring_day": 25,
23
24
  "path": "example",
24
25
  "user_id": 1,
25
26
  "sync_ids": [
@@ -58,6 +59,7 @@
58
59
  * `destination_replace_from` (string): If set, this string in the destination path will be replaced with the value in `destination_replace_to`.
59
60
  * `destination_replace_to` (string): If set, this string will replace the value `destination_replace_from` in the destination filename. You can use special patterns here.
60
61
  * `description` (string): Description for the this Automation.
62
+ * `recurring_day` (int64): If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
61
63
  * `path` (string): Path on which this Automation runs. Supports globs. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
62
64
  * `user_id` (int64): User ID of the Automation's creator.
63
65
  * `sync_ids` (array): IDs of remote sync folder behaviors to run by this Automation
@@ -129,6 +131,7 @@ await Automation.create({
129
131
  'trigger': "realtime",
130
132
  'trigger_actions': ["create"],
131
133
  'value': {"limit":"1"},
134
+ 'recurring_day': 25,
132
135
  'automation': "create_folder",
133
136
  })
134
137
  ```
@@ -153,6 +156,7 @@ await Automation.create({
153
156
  * `trigger` (string): How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
154
157
  * `trigger_actions` (array(string)): If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
155
158
  * `value` (object): A Hash of attributes specific to the automation type.
159
+ * `recurring_day` (int64): If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
156
160
  * `automation` (string): Required - Automation type
157
161
 
158
162
  ---
@@ -179,6 +183,7 @@ await automation.update({
179
183
  'trigger': "realtime",
180
184
  'trigger_actions': ["create"],
181
185
  'value': {"limit":"1"},
186
+ 'recurring_day': 25,
182
187
  'automation': "create_folder",
183
188
  })
184
189
  ```
@@ -203,6 +208,7 @@ await automation.update({
203
208
  * `trigger` (string): How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
204
209
  * `trigger_actions` (array(string)): If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
205
210
  * `value` (object): A Hash of attributes specific to the automation type.
211
+ * `recurring_day` (int64): If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
206
212
  * `automation` (string): Automation type
207
213
 
208
214
  ### Example Response
@@ -225,6 +231,7 @@ await automation.update({
225
231
  "destination_replace_from": "example",
226
232
  "destination_replace_to": "example",
227
233
  "description": "example",
234
+ "recurring_day": 25,
228
235
  "path": "example",
229
236
  "user_id": 1,
230
237
  "sync_ids": [
@@ -93,8 +93,6 @@
93
93
  "office_integration_type": "example",
94
94
  "oncehub_link": "https://go.oncehub.com/files",
95
95
  "opt_out_global": true,
96
- "overage_notified_at": "2000-01-01T01:00:00Z",
97
- "overage_notify": true,
98
96
  "overdue": true,
99
97
  "password_min_length": 1,
100
98
  "password_require_letter": true,
@@ -239,8 +237,6 @@
239
237
  * `office_integration_type` (string): Office integration application used to edit and view the MS Office documents
240
238
  * `oncehub_link` (string): Link to scheduling a meeting with our Sales team
241
239
  * `opt_out_global` (boolean): Use servers in the USA only?
242
- * `overage_notified_at` (date-time): Last time the site was notified about an overage
243
- * `overage_notify` (boolean): Notify site email of overages?
244
240
  * `overdue` (boolean): Is this site's billing overdue?
245
241
  * `password_min_length` (int64): Shortest password length for users
246
242
  * `password_require_letter` (boolean): Require a letter in passwords?
@@ -329,7 +325,6 @@ await Site.update({
329
325
  'reply_to_email': "example",
330
326
  'allow_bundle_names': true,
331
327
  'bundle_expiration': 1,
332
- 'overage_notify': true,
333
328
  'welcome_email_enabled': true,
334
329
  'ask_about_overwrites': true,
335
330
  'show_request_access_link': true,
@@ -460,7 +455,6 @@ await Site.update({
460
455
  * `reply_to_email` (string): Reply-to email for this site
461
456
  * `allow_bundle_names` (boolean): Are manual Bundle names allowed?
462
457
  * `bundle_expiration` (int64): Site-wide Bundle expiration in days
463
- * `overage_notify` (boolean): Notify site email of overages?
464
458
  * `welcome_email_enabled` (boolean): Will the welcome email be sent to new users?
465
459
  * `ask_about_overwrites` (boolean): If false, rename conflicting files instead of asking for overwrite confirmation. Only applies to web interface.
466
460
  * `show_request_access_link` (boolean): Show request access link for users without access? Currently unused.
@@ -129,6 +129,13 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
129
129
  (0, _defineProperty2.default)(this, "setDescription", function (value) {
130
130
  _this.attributes.description = value;
131
131
  });
132
+ // int64 # If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
133
+ (0, _defineProperty2.default)(this, "getRecurringDay", function () {
134
+ return _this.attributes.recurring_day;
135
+ });
136
+ (0, _defineProperty2.default)(this, "setRecurringDay", function (value) {
137
+ _this.attributes.recurring_day = value;
138
+ });
132
139
  // string # Path on which this Automation runs. Supports globs. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
133
140
  (0, _defineProperty2.default)(this, "getPath", function () {
134
141
  return _this.attributes.path;
@@ -210,6 +217,7 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
210
217
  // trigger - string - How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
211
218
  // trigger_actions - array(string) - If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
212
219
  // value - object - A Hash of attributes specific to the automation type.
220
+ // recurring_day - int64 - If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
213
221
  // automation - string - Automation type
214
222
  (0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
215
223
  var params,
@@ -322,32 +330,38 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
322
330
  }
323
331
  throw new errors.InvalidParameterError("Bad parameter: trigger_actions must be of type Array, received ".concat((0, _utils.getType)(trigger_actions)));
324
332
  case 36:
325
- if (!(params['automation'] && !(0, _utils.isString)(params['automation']))) {
333
+ if (!(params['recurring_day'] && !(0, _utils.isInt)(params['recurring_day']))) {
326
334
  _context.next = 38;
327
335
  break;
328
336
  }
329
- throw new errors.InvalidParameterError("Bad parameter: automation must be of type String, received ".concat((0, _utils.getType)(automation)));
337
+ throw new errors.InvalidParameterError("Bad parameter: recurring_day must be of type Int, received ".concat((0, _utils.getType)(recurring_day)));
330
338
  case 38:
339
+ if (!(params['automation'] && !(0, _utils.isString)(params['automation']))) {
340
+ _context.next = 40;
341
+ break;
342
+ }
343
+ throw new errors.InvalidParameterError("Bad parameter: automation must be of type String, received ".concat((0, _utils.getType)(automation)));
344
+ case 40:
331
345
  if (params['id']) {
332
- _context.next = 44;
346
+ _context.next = 46;
333
347
  break;
334
348
  }
335
349
  if (!_this.attributes.id) {
336
- _context.next = 43;
350
+ _context.next = 45;
337
351
  break;
338
352
  }
339
353
  params['id'] = _this.id;
340
- _context.next = 44;
354
+ _context.next = 46;
341
355
  break;
342
- case 43:
356
+ case 45:
343
357
  throw new errors.MissingParameterError('Parameter missing: id');
344
- case 44:
345
- _context.next = 46;
346
- return _Api.default.sendRequest("/automations/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
347
358
  case 46:
359
+ _context.next = 48;
360
+ return _Api.default.sendRequest("/automations/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
361
+ case 48:
348
362
  response = _context.sent;
349
363
  return _context.abrupt("return", new Automation(response === null || response === void 0 ? void 0 : response.data, _this.options));
350
- case 48:
364
+ case 50:
351
365
  case "end":
352
366
  return _context.stop();
353
367
  }
@@ -559,6 +573,7 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
559
573
  // trigger - string - How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
560
574
  // trigger_actions - array(string) - If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
561
575
  // value - object - A Hash of attributes specific to the automation type.
576
+ // recurring_day - int64 - If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
562
577
  // automation (required) - string - Automation type
563
578
  (0, _defineProperty2.default)(Automation, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
564
579
  var params,
@@ -660,18 +675,24 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
660
675
  }
661
676
  throw new errors.InvalidParameterError("Bad parameter: trigger_actions must be of type Array, received ".concat((0, _utils.getType)(params['trigger_actions'])));
662
677
  case 32:
663
- if (!(params['automation'] && !(0, _utils.isString)(params['automation']))) {
678
+ if (!(params['recurring_day'] && !(0, _utils.isInt)(params['recurring_day']))) {
664
679
  _context5.next = 34;
665
680
  break;
666
681
  }
667
- throw new errors.InvalidParameterError("Bad parameter: automation must be of type String, received ".concat((0, _utils.getType)(params['automation'])));
682
+ throw new errors.InvalidParameterError("Bad parameter: recurring_day must be of type Int, received ".concat((0, _utils.getType)(params['recurring_day'])));
668
683
  case 34:
669
- _context5.next = 36;
670
- return _Api.default.sendRequest("/automations", 'POST', params, options);
684
+ if (!(params['automation'] && !(0, _utils.isString)(params['automation']))) {
685
+ _context5.next = 36;
686
+ break;
687
+ }
688
+ throw new errors.InvalidParameterError("Bad parameter: automation must be of type String, received ".concat((0, _utils.getType)(params['automation'])));
671
689
  case 36:
690
+ _context5.next = 38;
691
+ return _Api.default.sendRequest("/automations", 'POST', params, options);
692
+ case 38:
672
693
  response = _context5.sent;
673
694
  return _context5.abrupt("return", new Automation(response === null || response === void 0 ? void 0 : response.data, options));
674
- case 38:
695
+ case 40:
675
696
  case "end":
676
697
  return _context5.stop();
677
698
  }
@@ -379,14 +379,6 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
379
379
  (0, _defineProperty2.default)(this, "getOptOutGlobal", function () {
380
380
  return _this.attributes.opt_out_global;
381
381
  });
382
- // date-time # Last time the site was notified about an overage
383
- (0, _defineProperty2.default)(this, "getOverageNotifiedAt", function () {
384
- return _this.attributes.overage_notified_at;
385
- });
386
- // boolean # Notify site email of overages?
387
- (0, _defineProperty2.default)(this, "getOverageNotify", function () {
388
- return _this.attributes.overage_notify;
389
- });
390
382
  // boolean # Is this site's billing overdue?
391
383
  (0, _defineProperty2.default)(this, "getOverdue", function () {
392
384
  return _this.attributes.overdue;
@@ -664,7 +656,6 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
664
656
  // reply_to_email - string - Reply-to email for this site
665
657
  // allow_bundle_names - boolean - Are manual Bundle names allowed?
666
658
  // bundle_expiration - int64 - Site-wide Bundle expiration in days
667
- // overage_notify - boolean - Notify site email of overages?
668
659
  // welcome_email_enabled - boolean - Will the welcome email be sent to new users?
669
660
  // ask_about_overwrites - boolean - If false, rename conflicting files instead of asking for overwrite confirmation. Only applies to web interface.
670
661
  // show_request_access_link - boolean - Show request access link for users without access? Currently unused.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.0.259",
3
+ "version": "1.0.261",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
@@ -121,6 +121,13 @@ class Automation {
121
121
  this.attributes.description = value
122
122
  }
123
123
 
124
+ // int64 # If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
125
+ getRecurringDay = () => this.attributes.recurring_day
126
+
127
+ setRecurringDay = value => {
128
+ this.attributes.recurring_day = value
129
+ }
130
+
124
131
  // string # Path on which this Automation runs. Supports globs. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
125
132
  getPath = () => this.attributes.path
126
133
 
@@ -203,6 +210,7 @@ class Automation {
203
210
  // trigger - string - How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
204
211
  // trigger_actions - array(string) - If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
205
212
  // value - object - A Hash of attributes specific to the automation type.
213
+ // recurring_day - int64 - If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
206
214
  // automation - string - Automation type
207
215
  update = async (params = {}) => {
208
216
  if (!this.attributes.id) {
@@ -259,6 +267,9 @@ class Automation {
259
267
  if (params['trigger_actions'] && !isArray(params['trigger_actions'])) {
260
268
  throw new errors.InvalidParameterError(`Bad parameter: trigger_actions must be of type Array, received ${getType(trigger_actions)}`)
261
269
  }
270
+ if (params['recurring_day'] && !isInt(params['recurring_day'])) {
271
+ throw new errors.InvalidParameterError(`Bad parameter: recurring_day must be of type Int, received ${getType(recurring_day)}`)
272
+ }
262
273
  if (params['automation'] && !isString(params['automation'])) {
263
274
  throw new errors.InvalidParameterError(`Bad parameter: automation must be of type String, received ${getType(automation)}`)
264
275
  }
@@ -391,6 +402,7 @@ class Automation {
391
402
  // trigger - string - How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
392
403
  // trigger_actions - array(string) - If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, read, update, destroy, move, copy
393
404
  // value - object - A Hash of attributes specific to the automation type.
405
+ // recurring_day - int64 - If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
394
406
  // automation (required) - string - Automation type
395
407
  static create = async (params = {}, options = {}) => {
396
408
  if (!params['automation']) {
@@ -453,6 +465,10 @@ class Automation {
453
465
  throw new errors.InvalidParameterError(`Bad parameter: trigger_actions must be of type Array, received ${getType(params['trigger_actions'])}`)
454
466
  }
455
467
 
468
+ if (params['recurring_day'] && !isInt(params['recurring_day'])) {
469
+ throw new errors.InvalidParameterError(`Bad parameter: recurring_day must be of type Int, received ${getType(params['recurring_day'])}`)
470
+ }
471
+
456
472
  if (params['automation'] && !isString(params['automation'])) {
457
473
  throw new errors.InvalidParameterError(`Bad parameter: automation must be of type String, received ${getType(params['automation'])}`)
458
474
  }
@@ -284,12 +284,6 @@ class Site {
284
284
  // boolean # Use servers in the USA only?
285
285
  getOptOutGlobal = () => this.attributes.opt_out_global
286
286
 
287
- // date-time # Last time the site was notified about an overage
288
- getOverageNotifiedAt = () => this.attributes.overage_notified_at
289
-
290
- // boolean # Notify site email of overages?
291
- getOverageNotify = () => this.attributes.overage_notify
292
-
293
287
  // boolean # Is this site's billing overdue?
294
288
  getOverdue = () => this.attributes.overdue
295
289
 
@@ -475,7 +469,6 @@ class Site {
475
469
  // reply_to_email - string - Reply-to email for this site
476
470
  // allow_bundle_names - boolean - Are manual Bundle names allowed?
477
471
  // bundle_expiration - int64 - Site-wide Bundle expiration in days
478
- // overage_notify - boolean - Notify site email of overages?
479
472
  // welcome_email_enabled - boolean - Will the welcome email be sent to new users?
480
473
  // ask_about_overwrites - boolean - If false, rename conflicting files instead of asking for overwrite confirmation. Only applies to web interface.
481
474
  // show_request_access_link - boolean - Show request access link for users without access? Currently unused.