files.com 1.2.201 → 1.2.202
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/Automation.md +14 -0
- package/docs/models/AutomationRun.md +6 -0
- package/lib/Files.js +1 -1
- package/lib/models/Automation.js +69 -27
- package/lib/models/AutomationRun.js +12 -0
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/Automation.js +34 -0
- package/src/models/AutomationRun.js +9 -0
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.202
|
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
"path": "example",
|
|
44
44
|
"path_time_zone": "Eastern Time (US & Canada)",
|
|
45
45
|
"recurring_day": 25,
|
|
46
|
+
"retry_on_failure_interval_in_minutes": 60,
|
|
47
|
+
"retry_on_failure_number_of_attempts": 10,
|
|
46
48
|
"schedule": "example",
|
|
47
49
|
"human_readable_schedule": "Triggered every Monday, Wednesday at 6:30 AM,\n 2:30 PM Eastern Time (US & Canada) TZ",
|
|
48
50
|
"schedule_days_of_week": [
|
|
@@ -98,6 +100,8 @@
|
|
|
98
100
|
* `path` (string): Path on which this Automation runs. Supports globs, except on remote mounts. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
|
99
101
|
* `path_time_zone` (string): Timezone to use when rendering timestamps in paths.
|
|
100
102
|
* `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`.
|
|
103
|
+
* `retry_on_failure_interval_in_minutes` (int64): If the Automation fails, retry at this interval (in minutes).
|
|
104
|
+
* `retry_on_failure_number_of_attempts` (int64): If the Automation fails, retry at most this many times.
|
|
101
105
|
* `schedule` (object): If trigger is `custom_schedule`, Custom schedule description for when the automation should be run in json format.
|
|
102
106
|
* `human_readable_schedule` (string): If trigger is `custom_schedule`, Human readable Custom schedule description for when the automation should be run.
|
|
103
107
|
* `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, Custom schedule description for when the automation should be run. 0-based days of the week. 0 is Sunday, 1 is Monday, etc.
|
|
@@ -174,6 +178,8 @@ await Automation.create({
|
|
|
174
178
|
'name': "example",
|
|
175
179
|
'overwrite_files': true,
|
|
176
180
|
'path_time_zone': "Eastern Time (US & Canada)",
|
|
181
|
+
'retry_on_failure_interval_in_minutes': 60,
|
|
182
|
+
'retry_on_failure_number_of_attempts': 10,
|
|
177
183
|
'trigger': "daily",
|
|
178
184
|
'trigger_actions': ["create"],
|
|
179
185
|
'value': {"limit":"1"},
|
|
@@ -208,6 +214,8 @@ await Automation.create({
|
|
|
208
214
|
* `name` (string): Name for this automation.
|
|
209
215
|
* `overwrite_files` (boolean): If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `:always_overwrite_size_matching_files` option to override this.
|
|
210
216
|
* `path_time_zone` (string): Timezone to use when rendering timestamps in paths.
|
|
217
|
+
* `retry_on_failure_interval_in_minutes` (int64): If the Automation fails, retry at this interval (in minutes).
|
|
218
|
+
* `retry_on_failure_number_of_attempts` (int64): If the Automation fails, retry at most this many times.
|
|
211
219
|
* `trigger` (string): How this automation is triggered to run.
|
|
212
220
|
* `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
|
|
213
221
|
* `value` (object): A Hash of attributes specific to the automation type.
|
|
@@ -260,6 +268,8 @@ await automation.update({
|
|
|
260
268
|
'name': "example",
|
|
261
269
|
'overwrite_files': true,
|
|
262
270
|
'path_time_zone': "Eastern Time (US & Canada)",
|
|
271
|
+
'retry_on_failure_interval_in_minutes': 60,
|
|
272
|
+
'retry_on_failure_number_of_attempts': 10,
|
|
263
273
|
'trigger': "daily",
|
|
264
274
|
'trigger_actions': ["create"],
|
|
265
275
|
'value': {"limit":"1"},
|
|
@@ -294,6 +304,8 @@ await automation.update({
|
|
|
294
304
|
* `name` (string): Name for this automation.
|
|
295
305
|
* `overwrite_files` (boolean): If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `:always_overwrite_size_matching_files` option to override this.
|
|
296
306
|
* `path_time_zone` (string): Timezone to use when rendering timestamps in paths.
|
|
307
|
+
* `retry_on_failure_interval_in_minutes` (int64): If the Automation fails, retry at this interval (in minutes).
|
|
308
|
+
* `retry_on_failure_number_of_attempts` (int64): If the Automation fails, retry at most this many times.
|
|
297
309
|
* `trigger` (string): How this automation is triggered to run.
|
|
298
310
|
* `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
|
|
299
311
|
* `value` (object): A Hash of attributes specific to the automation type.
|
|
@@ -343,6 +355,8 @@ await automation.update({
|
|
|
343
355
|
"path": "example",
|
|
344
356
|
"path_time_zone": "Eastern Time (US & Canada)",
|
|
345
357
|
"recurring_day": 25,
|
|
358
|
+
"retry_on_failure_interval_in_minutes": 60,
|
|
359
|
+
"retry_on_failure_number_of_attempts": 10,
|
|
346
360
|
"schedule": "example",
|
|
347
361
|
"human_readable_schedule": "Triggered every Monday, Wednesday at 6:30 AM,\n 2:30 PM Eastern Time (US & Canada) TZ",
|
|
348
362
|
"schedule_days_of_week": [
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
"automation_id": 1,
|
|
9
9
|
"completed_at": "2000-01-01T01:00:00Z",
|
|
10
10
|
"created_at": "2000-01-01T01:00:00Z",
|
|
11
|
+
"retried_at": "2000-01-01T01:00:00Z",
|
|
12
|
+
"retry_of_run_id": 1,
|
|
13
|
+
"retried_in_run_id": 1,
|
|
11
14
|
"runtime": 1.0,
|
|
12
15
|
"status": "success",
|
|
13
16
|
"successful_operations": 1,
|
|
@@ -20,6 +23,9 @@
|
|
|
20
23
|
* `automation_id` (int64): ID of the associated Automation.
|
|
21
24
|
* `completed_at` (date-time): Automation run completion/failure date/time.
|
|
22
25
|
* `created_at` (date-time): Automation run start date/time.
|
|
26
|
+
* `retried_at` (date-time): If set, this Automation run was retried due to `failure` or `partial_failure`.
|
|
27
|
+
* `retry_of_run_id` (int64): ID of the original run that this run is retrying.
|
|
28
|
+
* `retried_in_run_id` (int64): ID of the run that is or will be retrying this run.
|
|
23
29
|
* `runtime` (double): Automation run runtime.
|
|
24
30
|
* `status` (string): The success status of the AutomationRun. One of `running`, `success`, `partial_failure`, or `failure`.
|
|
25
31
|
* `successful_operations` (int64): Count of successful operations.
|
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.202';
|
|
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/Automation.js
CHANGED
|
@@ -187,6 +187,20 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
|
187
187
|
(0, _defineProperty2.default)(this, "setRecurringDay", function (value) {
|
|
188
188
|
_this.attributes.recurring_day = value;
|
|
189
189
|
});
|
|
190
|
+
// int64 # If the Automation fails, retry at this interval (in minutes).
|
|
191
|
+
(0, _defineProperty2.default)(this, "getRetryOnFailureIntervalInMinutes", function () {
|
|
192
|
+
return _this.attributes.retry_on_failure_interval_in_minutes;
|
|
193
|
+
});
|
|
194
|
+
(0, _defineProperty2.default)(this, "setRetryOnFailureIntervalInMinutes", function (value) {
|
|
195
|
+
_this.attributes.retry_on_failure_interval_in_minutes = value;
|
|
196
|
+
});
|
|
197
|
+
// int64 # If the Automation fails, retry at most this many times.
|
|
198
|
+
(0, _defineProperty2.default)(this, "getRetryOnFailureNumberOfAttempts", function () {
|
|
199
|
+
return _this.attributes.retry_on_failure_number_of_attempts;
|
|
200
|
+
});
|
|
201
|
+
(0, _defineProperty2.default)(this, "setRetryOnFailureNumberOfAttempts", function (value) {
|
|
202
|
+
_this.attributes.retry_on_failure_number_of_attempts = value;
|
|
203
|
+
});
|
|
190
204
|
// object # If trigger is `custom_schedule`, Custom schedule description for when the automation should be run in json format.
|
|
191
205
|
(0, _defineProperty2.default)(this, "getSchedule", function () {
|
|
192
206
|
return _this.attributes.schedule;
|
|
@@ -351,6 +365,8 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
|
351
365
|
// name - string - Name for this automation.
|
|
352
366
|
// overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `:always_overwrite_size_matching_files` option to override this.
|
|
353
367
|
// path_time_zone - string - Timezone to use when rendering timestamps in paths.
|
|
368
|
+
// retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes).
|
|
369
|
+
// retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times.
|
|
354
370
|
// trigger - string - How this automation is triggered to run.
|
|
355
371
|
// 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
|
|
356
372
|
// value - object - A Hash of attributes specific to the automation type.
|
|
@@ -485,50 +501,62 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
|
485
501
|
}
|
|
486
502
|
throw new errors.InvalidParameterError("Bad parameter: path_time_zone must be of type String, received ".concat((0, _utils.getType)(params.path_time_zone)));
|
|
487
503
|
case 42:
|
|
488
|
-
if (!(params.
|
|
504
|
+
if (!(params.retry_on_failure_interval_in_minutes && !(0, _utils.isInt)(params.retry_on_failure_interval_in_minutes))) {
|
|
489
505
|
_context2.next = 44;
|
|
490
506
|
break;
|
|
491
507
|
}
|
|
492
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
508
|
+
throw new errors.InvalidParameterError("Bad parameter: retry_on_failure_interval_in_minutes must be of type Int, received ".concat((0, _utils.getType)(params.retry_on_failure_interval_in_minutes)));
|
|
493
509
|
case 44:
|
|
494
|
-
if (!(params.
|
|
510
|
+
if (!(params.retry_on_failure_number_of_attempts && !(0, _utils.isInt)(params.retry_on_failure_number_of_attempts))) {
|
|
495
511
|
_context2.next = 46;
|
|
496
512
|
break;
|
|
497
513
|
}
|
|
498
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
514
|
+
throw new errors.InvalidParameterError("Bad parameter: retry_on_failure_number_of_attempts must be of type Int, received ".concat((0, _utils.getType)(params.retry_on_failure_number_of_attempts)));
|
|
499
515
|
case 46:
|
|
500
|
-
if (!(params.
|
|
516
|
+
if (!(params.trigger && !(0, _utils.isString)(params.trigger))) {
|
|
501
517
|
_context2.next = 48;
|
|
502
518
|
break;
|
|
503
519
|
}
|
|
504
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
520
|
+
throw new errors.InvalidParameterError("Bad parameter: trigger must be of type String, received ".concat((0, _utils.getType)(params.trigger)));
|
|
505
521
|
case 48:
|
|
506
|
-
if (!(params.
|
|
522
|
+
if (!(params.trigger_actions && !(0, _utils.isArray)(params.trigger_actions))) {
|
|
507
523
|
_context2.next = 50;
|
|
508
524
|
break;
|
|
509
525
|
}
|
|
510
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
526
|
+
throw new errors.InvalidParameterError("Bad parameter: trigger_actions must be of type Array, received ".concat((0, _utils.getType)(params.trigger_actions)));
|
|
511
527
|
case 50:
|
|
528
|
+
if (!(params.recurring_day && !(0, _utils.isInt)(params.recurring_day))) {
|
|
529
|
+
_context2.next = 52;
|
|
530
|
+
break;
|
|
531
|
+
}
|
|
532
|
+
throw new errors.InvalidParameterError("Bad parameter: recurring_day must be of type Int, received ".concat((0, _utils.getType)(params.recurring_day)));
|
|
533
|
+
case 52:
|
|
534
|
+
if (!(params.automation && !(0, _utils.isString)(params.automation))) {
|
|
535
|
+
_context2.next = 54;
|
|
536
|
+
break;
|
|
537
|
+
}
|
|
538
|
+
throw new errors.InvalidParameterError("Bad parameter: automation must be of type String, received ".concat((0, _utils.getType)(params.automation)));
|
|
539
|
+
case 54:
|
|
512
540
|
if (params.id) {
|
|
513
|
-
_context2.next =
|
|
541
|
+
_context2.next = 60;
|
|
514
542
|
break;
|
|
515
543
|
}
|
|
516
544
|
if (!_this.attributes.id) {
|
|
517
|
-
_context2.next =
|
|
545
|
+
_context2.next = 59;
|
|
518
546
|
break;
|
|
519
547
|
}
|
|
520
548
|
params.id = _this.id;
|
|
521
|
-
_context2.next =
|
|
549
|
+
_context2.next = 60;
|
|
522
550
|
break;
|
|
523
|
-
case
|
|
551
|
+
case 59:
|
|
524
552
|
throw new errors.MissingParameterError('Parameter missing: id');
|
|
525
|
-
case
|
|
526
|
-
_context2.next =
|
|
553
|
+
case 60:
|
|
554
|
+
_context2.next = 62;
|
|
527
555
|
return _Api.default.sendRequest("/automations/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
528
|
-
case
|
|
556
|
+
case 62:
|
|
529
557
|
response = _context2.sent;
|
|
530
558
|
return _context2.abrupt("return", new Automation(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
|
531
|
-
case
|
|
559
|
+
case 64:
|
|
532
560
|
case "end":
|
|
533
561
|
return _context2.stop();
|
|
534
562
|
}
|
|
@@ -754,6 +782,8 @@ _Automation = Automation;
|
|
|
754
782
|
// name - string - Name for this automation.
|
|
755
783
|
// overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `:always_overwrite_size_matching_files` option to override this.
|
|
756
784
|
// path_time_zone - string - Timezone to use when rendering timestamps in paths.
|
|
785
|
+
// retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes).
|
|
786
|
+
// retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times.
|
|
757
787
|
// trigger - string - How this automation is triggered to run.
|
|
758
788
|
// 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
|
|
759
789
|
// value - object - A Hash of attributes specific to the automation type.
|
|
@@ -877,36 +907,48 @@ _Automation = Automation;
|
|
|
877
907
|
}
|
|
878
908
|
throw new errors.InvalidParameterError("Bad parameter: path_time_zone must be of type String, received ".concat((0, _utils.getType)(params.path_time_zone)));
|
|
879
909
|
case 38:
|
|
880
|
-
if (!(params.
|
|
910
|
+
if (!(params.retry_on_failure_interval_in_minutes && !(0, _utils.isInt)(params.retry_on_failure_interval_in_minutes))) {
|
|
881
911
|
_context7.next = 40;
|
|
882
912
|
break;
|
|
883
913
|
}
|
|
884
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
914
|
+
throw new errors.InvalidParameterError("Bad parameter: retry_on_failure_interval_in_minutes must be of type Int, received ".concat((0, _utils.getType)(params.retry_on_failure_interval_in_minutes)));
|
|
885
915
|
case 40:
|
|
886
|
-
if (!(params.
|
|
916
|
+
if (!(params.retry_on_failure_number_of_attempts && !(0, _utils.isInt)(params.retry_on_failure_number_of_attempts))) {
|
|
887
917
|
_context7.next = 42;
|
|
888
918
|
break;
|
|
889
919
|
}
|
|
890
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
920
|
+
throw new errors.InvalidParameterError("Bad parameter: retry_on_failure_number_of_attempts must be of type Int, received ".concat((0, _utils.getType)(params.retry_on_failure_number_of_attempts)));
|
|
891
921
|
case 42:
|
|
892
|
-
if (!(params.
|
|
922
|
+
if (!(params.trigger && !(0, _utils.isString)(params.trigger))) {
|
|
893
923
|
_context7.next = 44;
|
|
894
924
|
break;
|
|
895
925
|
}
|
|
896
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
926
|
+
throw new errors.InvalidParameterError("Bad parameter: trigger must be of type String, received ".concat((0, _utils.getType)(params.trigger)));
|
|
897
927
|
case 44:
|
|
898
|
-
if (!(params.
|
|
928
|
+
if (!(params.trigger_actions && !(0, _utils.isArray)(params.trigger_actions))) {
|
|
899
929
|
_context7.next = 46;
|
|
900
930
|
break;
|
|
901
931
|
}
|
|
902
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
932
|
+
throw new errors.InvalidParameterError("Bad parameter: trigger_actions must be of type Array, received ".concat((0, _utils.getType)(params.trigger_actions)));
|
|
903
933
|
case 46:
|
|
904
|
-
|
|
905
|
-
|
|
934
|
+
if (!(params.recurring_day && !(0, _utils.isInt)(params.recurring_day))) {
|
|
935
|
+
_context7.next = 48;
|
|
936
|
+
break;
|
|
937
|
+
}
|
|
938
|
+
throw new errors.InvalidParameterError("Bad parameter: recurring_day must be of type Int, received ".concat((0, _utils.getType)(params.recurring_day)));
|
|
906
939
|
case 48:
|
|
940
|
+
if (!(params.automation && !(0, _utils.isString)(params.automation))) {
|
|
941
|
+
_context7.next = 50;
|
|
942
|
+
break;
|
|
943
|
+
}
|
|
944
|
+
throw new errors.InvalidParameterError("Bad parameter: automation must be of type String, received ".concat((0, _utils.getType)(params.automation)));
|
|
945
|
+
case 50:
|
|
946
|
+
_context7.next = 52;
|
|
947
|
+
return _Api.default.sendRequest('/automations', 'POST', params, options);
|
|
948
|
+
case 52:
|
|
907
949
|
response = _context7.sent;
|
|
908
950
|
return _context7.abrupt("return", new _Automation(response === null || response === void 0 ? void 0 : response.data, options));
|
|
909
|
-
case
|
|
951
|
+
case 54:
|
|
910
952
|
case "end":
|
|
911
953
|
return _context7.stop();
|
|
912
954
|
}
|
|
@@ -49,6 +49,18 @@ var AutomationRun = /*#__PURE__*/(0, _createClass2.default)(function AutomationR
|
|
|
49
49
|
(0, _defineProperty2.default)(this, "getCreatedAt", function () {
|
|
50
50
|
return _this.attributes.created_at;
|
|
51
51
|
});
|
|
52
|
+
// date-time # If set, this Automation run was retried due to `failure` or `partial_failure`.
|
|
53
|
+
(0, _defineProperty2.default)(this, "getRetriedAt", function () {
|
|
54
|
+
return _this.attributes.retried_at;
|
|
55
|
+
});
|
|
56
|
+
// int64 # ID of the original run that this run is retrying.
|
|
57
|
+
(0, _defineProperty2.default)(this, "getRetryOfRunId", function () {
|
|
58
|
+
return _this.attributes.retry_of_run_id;
|
|
59
|
+
});
|
|
60
|
+
// int64 # ID of the run that is or will be retrying this run.
|
|
61
|
+
(0, _defineProperty2.default)(this, "getRetriedInRunId", function () {
|
|
62
|
+
return _this.attributes.retried_in_run_id;
|
|
63
|
+
});
|
|
52
64
|
// double # Automation run runtime.
|
|
53
65
|
(0, _defineProperty2.default)(this, "getRuntime", function () {
|
|
54
66
|
return _this.attributes.runtime;
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
package/src/models/Automation.js
CHANGED
|
@@ -182,6 +182,20 @@ class Automation {
|
|
|
182
182
|
this.attributes.recurring_day = value
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
+
// int64 # If the Automation fails, retry at this interval (in minutes).
|
|
186
|
+
getRetryOnFailureIntervalInMinutes = () => this.attributes.retry_on_failure_interval_in_minutes
|
|
187
|
+
|
|
188
|
+
setRetryOnFailureIntervalInMinutes = value => {
|
|
189
|
+
this.attributes.retry_on_failure_interval_in_minutes = value
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// int64 # If the Automation fails, retry at most this many times.
|
|
193
|
+
getRetryOnFailureNumberOfAttempts = () => this.attributes.retry_on_failure_number_of_attempts
|
|
194
|
+
|
|
195
|
+
setRetryOnFailureNumberOfAttempts = value => {
|
|
196
|
+
this.attributes.retry_on_failure_number_of_attempts = value
|
|
197
|
+
}
|
|
198
|
+
|
|
185
199
|
// object # If trigger is `custom_schedule`, Custom schedule description for when the automation should be run in json format.
|
|
186
200
|
getSchedule = () => this.attributes.schedule
|
|
187
201
|
|
|
@@ -323,6 +337,8 @@ class Automation {
|
|
|
323
337
|
// name - string - Name for this automation.
|
|
324
338
|
// overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `:always_overwrite_size_matching_files` option to override this.
|
|
325
339
|
// path_time_zone - string - Timezone to use when rendering timestamps in paths.
|
|
340
|
+
// retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes).
|
|
341
|
+
// retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times.
|
|
326
342
|
// trigger - string - How this automation is triggered to run.
|
|
327
343
|
// 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
|
|
328
344
|
// value - object - A Hash of attributes specific to the automation type.
|
|
@@ -410,6 +426,14 @@ class Automation {
|
|
|
410
426
|
throw new errors.InvalidParameterError(`Bad parameter: path_time_zone must be of type String, received ${getType(params.path_time_zone)}`)
|
|
411
427
|
}
|
|
412
428
|
|
|
429
|
+
if (params.retry_on_failure_interval_in_minutes && !isInt(params.retry_on_failure_interval_in_minutes)) {
|
|
430
|
+
throw new errors.InvalidParameterError(`Bad parameter: retry_on_failure_interval_in_minutes must be of type Int, received ${getType(params.retry_on_failure_interval_in_minutes)}`)
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
if (params.retry_on_failure_number_of_attempts && !isInt(params.retry_on_failure_number_of_attempts)) {
|
|
434
|
+
throw new errors.InvalidParameterError(`Bad parameter: retry_on_failure_number_of_attempts must be of type Int, received ${getType(params.retry_on_failure_number_of_attempts)}`)
|
|
435
|
+
}
|
|
436
|
+
|
|
413
437
|
if (params.trigger && !isString(params.trigger)) {
|
|
414
438
|
throw new errors.InvalidParameterError(`Bad parameter: trigger must be of type String, received ${getType(params.trigger)}`)
|
|
415
439
|
}
|
|
@@ -554,6 +578,8 @@ class Automation {
|
|
|
554
578
|
// name - string - Name for this automation.
|
|
555
579
|
// overwrite_files - boolean - If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten if they appear to be the same file size as the newly incoming file. Use the `:always_overwrite_size_matching_files` option to override this.
|
|
556
580
|
// path_time_zone - string - Timezone to use when rendering timestamps in paths.
|
|
581
|
+
// retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes).
|
|
582
|
+
// retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times.
|
|
557
583
|
// trigger - string - How this automation is triggered to run.
|
|
558
584
|
// 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
|
|
559
585
|
// value - object - A Hash of attributes specific to the automation type.
|
|
@@ -632,6 +658,14 @@ class Automation {
|
|
|
632
658
|
throw new errors.InvalidParameterError(`Bad parameter: path_time_zone must be of type String, received ${getType(params.path_time_zone)}`)
|
|
633
659
|
}
|
|
634
660
|
|
|
661
|
+
if (params.retry_on_failure_interval_in_minutes && !isInt(params.retry_on_failure_interval_in_minutes)) {
|
|
662
|
+
throw new errors.InvalidParameterError(`Bad parameter: retry_on_failure_interval_in_minutes must be of type Int, received ${getType(params.retry_on_failure_interval_in_minutes)}`)
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
if (params.retry_on_failure_number_of_attempts && !isInt(params.retry_on_failure_number_of_attempts)) {
|
|
666
|
+
throw new errors.InvalidParameterError(`Bad parameter: retry_on_failure_number_of_attempts must be of type Int, received ${getType(params.retry_on_failure_number_of_attempts)}`)
|
|
667
|
+
}
|
|
668
|
+
|
|
635
669
|
if (params.trigger && !isString(params.trigger)) {
|
|
636
670
|
throw new errors.InvalidParameterError(`Bad parameter: trigger must be of type String, received ${getType(params.trigger)}`)
|
|
637
671
|
}
|
|
@@ -40,6 +40,15 @@ class AutomationRun {
|
|
|
40
40
|
// date-time # Automation run start date/time.
|
|
41
41
|
getCreatedAt = () => this.attributes.created_at
|
|
42
42
|
|
|
43
|
+
// date-time # If set, this Automation run was retried due to `failure` or `partial_failure`.
|
|
44
|
+
getRetriedAt = () => this.attributes.retried_at
|
|
45
|
+
|
|
46
|
+
// int64 # ID of the original run that this run is retrying.
|
|
47
|
+
getRetryOfRunId = () => this.attributes.retry_of_run_id
|
|
48
|
+
|
|
49
|
+
// int64 # ID of the run that is or will be retrying this run.
|
|
50
|
+
getRetriedInRunId = () => this.attributes.retried_in_run_id
|
|
51
|
+
|
|
43
52
|
// double # Automation run runtime.
|
|
44
53
|
getRuntime = () => this.attributes.runtime
|
|
45
54
|
|