files.com 1.1.12 → 1.1.14

Sign up to get free protection for your applications and to get access to all the features.
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.12
1
+ 1.1.14
@@ -12,7 +12,6 @@
12
12
  "key": "[key]",
13
13
  "last_use_at": "2000-01-01T01:00:00Z",
14
14
  "name": "My Main API Key",
15
- "path": "shared/docs",
16
15
  "permission_set": "full",
17
16
  "platform": "win32",
18
17
  "url": "example",
@@ -28,11 +27,11 @@
28
27
  * `key` (string): API Key actual key string
29
28
  * `last_use_at` (date-time): API Key last used - note this value is only updated once per 3 hour period, so the 'actual' time of last use may be up to 3 hours later than this timestamp.
30
29
  * `name` (string): Internal name for the API Key. For your use.
31
- * `path` (string): Folder path restriction for this api key. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
32
30
  * `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
33
31
  * `platform` (string): If this API key represents a Desktop app, what platform was it created on?
34
32
  * `url` (string): URL for API host.
35
33
  * `user_id` (int64): User ID for the owner of this API Key. May be blank for Site-wide API Keys.
34
+ * `path` (string): Folder path restriction for this api key.
36
35
 
37
36
  ---
38
37
 
@@ -168,7 +167,6 @@ await api_key.update({
168
167
  "key": "[key]",
169
168
  "last_use_at": "2000-01-01T01:00:00Z",
170
169
  "name": "My Main API Key",
171
- "path": "shared/docs",
172
170
  "permission_set": "full",
173
171
  "platform": "win32",
174
172
  "url": "example",
@@ -5,69 +5,71 @@
5
5
  ```
6
6
  {
7
7
  "id": 1,
8
+ "always_overwrite_size_matching_files": true,
8
9
  "automation": "create_folder",
9
10
  "deleted": true,
11
+ "description": "example",
12
+ "destination_replace_from": "example",
13
+ "destination_replace_to": "example",
14
+ "destinations": [
15
+ "destination"
16
+ ],
10
17
  "disabled": true,
11
- "trigger": "daily",
18
+ "group_ids": [
19
+ 1,
20
+ 2
21
+ ],
12
22
  "interval": "week",
13
23
  "last_modified_at": "2000-01-01T01:00:00Z",
14
24
  "name": "example",
25
+ "path": "example",
26
+ "recurring_day": 25,
15
27
  "schedule": "example",
16
28
  "source": "example",
17
- "destinations": [
18
- "destination"
19
- ],
20
- "destination_replace_from": "example",
21
- "destination_replace_to": "example",
22
- "description": "example",
23
- "recurring_day": 25,
24
- "path": "example",
25
- "user_id": 1,
26
29
  "sync_ids": [
27
30
  1,
28
31
  2
29
32
  ],
30
- "user_ids": [
31
- 1,
32
- 2
33
+ "trigger_actions": [
34
+ "create"
33
35
  ],
34
- "group_ids": [
36
+ "trigger": "daily",
37
+ "user_id": 1,
38
+ "user_ids": [
35
39
  1,
36
40
  2
37
41
  ],
38
- "webhook_url": "https://app.files.com/api/webhooks/abc123",
39
- "trigger_actions": [
40
- "create"
41
- ],
42
42
  "value": {
43
43
  "limit": "1"
44
- }
44
+ },
45
+ "webhook_url": "https://app.files.com/api/webhooks/abc123"
45
46
  }
46
47
  ```
47
48
 
48
49
  * `id` (int64): Automation ID
50
+ * `always_overwrite_size_matching_files` (boolean): Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
49
51
  * `automation` (string): Automation type
50
52
  * `deleted` (boolean): Indicates if the automation has been deleted.
53
+ * `description` (string): Description for the this Automation.
54
+ * `destination_replace_from` (string): If set, this string in the destination path will be replaced with the value in `destination_replace_to`.
55
+ * `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.
56
+ * `destinations` (array): Destination Paths
51
57
  * `disabled` (boolean): If true, this automation will not run.
52
- * `trigger` (string): How this automation is triggered to run.
58
+ * `group_ids` (array): IDs of Groups for the Automation (i.e. who to Request File from)
53
59
  * `interval` (string): If trigger is `daily`, this specifies how often to run this automation. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
54
60
  * `last_modified_at` (date-time): Time when automation was last modified. Does not change for name or description updates.
55
61
  * `name` (string): Name for this automation.
62
+ * `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.
63
+ * `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`.
56
64
  * `schedule` (object): If trigger is `custom_schedule`, Custom schedule description for when the automation should be run.
57
65
  * `source` (string): Source Path
58
- * `destinations` (array): Destination Paths
59
- * `destination_replace_from` (string): If set, this string in the destination path will be replaced with the value in `destination_replace_to`.
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.
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`.
63
- * `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.
64
- * `user_id` (int64): User ID of the Automation's creator.
65
66
  * `sync_ids` (array): IDs of remote sync folder behaviors to run by this Automation
66
- * `user_ids` (array): IDs of Users for the Automation (i.e. who to Request File from)
67
- * `group_ids` (array): IDs of Groups for the Automation (i.e. who to Request File from)
68
- * `webhook_url` (string): If trigger is `webhook`, this is the URL of the webhook to trigger the Automation.
69
67
  * `trigger_actions` (array): 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
68
+ * `trigger` (string): How this automation is triggered to run.
69
+ * `user_id` (int64): User ID of the Automation's creator.
70
+ * `user_ids` (array): IDs of Users for the Automation (i.e. who to Request File from)
70
71
  * `value` (object): A Hash of attributes specific to the automation type.
72
+ * `webhook_url` (string): If trigger is `webhook`, this is the URL of the webhook to trigger the Automation.
71
73
  * `destination` (string): DEPRECATED: Destination Path. Use `destinations` instead.
72
74
 
73
75
  ---
@@ -123,6 +125,7 @@ await Automation.create({
123
125
  'user_ids': [1,2],
124
126
  'group_ids': [1,2],
125
127
  'schedule': {"days_of_week":[0,1,3],"times_of_day":["7:30","11:30"],"time_zone":"Eastern Time (US & Canada)"},
128
+ 'always_overwrite_size_matching_files': true,
126
129
  'description': "example",
127
130
  'disabled': true,
128
131
  'name': "example",
@@ -148,6 +151,7 @@ await Automation.create({
148
151
  * `user_ids` (string): A list of user IDs the automation is associated with. If sent as a string, it should be comma-delimited.
149
152
  * `group_ids` (string): A list of group IDs the automation is associated with. If sent as a string, it should be comma-delimited.
150
153
  * `schedule` (object): Custom schedule for running this automation.
154
+ * `always_overwrite_size_matching_files` (boolean): Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
151
155
  * `description` (string): Description for the this Automation.
152
156
  * `disabled` (boolean): If true, this automation will not run.
153
157
  * `name` (string): Name for this automation.
@@ -190,6 +194,7 @@ await automation.update({
190
194
  'user_ids': [1,2],
191
195
  'group_ids': [1,2],
192
196
  'schedule': {"days_of_week":[0,1,3],"times_of_day":["7:30","11:30"],"time_zone":"Eastern Time (US & Canada)"},
197
+ 'always_overwrite_size_matching_files': true,
193
198
  'description': "example",
194
199
  'disabled': true,
195
200
  'name': "example",
@@ -215,6 +220,7 @@ await automation.update({
215
220
  * `user_ids` (string): A list of user IDs the automation is associated with. If sent as a string, it should be comma-delimited.
216
221
  * `group_ids` (string): A list of group IDs the automation is associated with. If sent as a string, it should be comma-delimited.
217
222
  * `schedule` (object): Custom schedule for running this automation.
223
+ * `always_overwrite_size_matching_files` (boolean): Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
218
224
  * `description` (string): Description for the this Automation.
219
225
  * `disabled` (boolean): If true, this automation will not run.
220
226
  * `name` (string): Name for this automation.
@@ -229,43 +235,44 @@ await automation.update({
229
235
  ```json
230
236
  {
231
237
  "id": 1,
238
+ "always_overwrite_size_matching_files": true,
232
239
  "automation": "create_folder",
233
240
  "deleted": true,
241
+ "description": "example",
242
+ "destination_replace_from": "example",
243
+ "destination_replace_to": "example",
244
+ "destinations": [
245
+ "destination"
246
+ ],
234
247
  "disabled": true,
235
- "trigger": "daily",
248
+ "group_ids": [
249
+ 1,
250
+ 2
251
+ ],
236
252
  "interval": "week",
237
253
  "last_modified_at": "2000-01-01T01:00:00Z",
238
254
  "name": "example",
255
+ "path": "example",
256
+ "recurring_day": 25,
239
257
  "schedule": "example",
240
258
  "source": "example",
241
- "destinations": [
242
- "destination"
243
- ],
244
- "destination_replace_from": "example",
245
- "destination_replace_to": "example",
246
- "description": "example",
247
- "recurring_day": 25,
248
- "path": "example",
249
- "user_id": 1,
250
259
  "sync_ids": [
251
260
  1,
252
261
  2
253
262
  ],
254
- "user_ids": [
255
- 1,
256
- 2
263
+ "trigger_actions": [
264
+ "create"
257
265
  ],
258
- "group_ids": [
266
+ "trigger": "daily",
267
+ "user_id": 1,
268
+ "user_ids": [
259
269
  1,
260
270
  2
261
271
  ],
262
- "webhook_url": "https://app.files.com/api/webhooks/abc123",
263
- "trigger_actions": [
264
- "create"
265
- ],
266
272
  "value": {
267
273
  "limit": "1"
268
- }
274
+ },
275
+ "webhook_url": "https://app.files.com/api/webhooks/abc123"
269
276
  }
270
277
  ```
271
278
 
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.1.12';
14
+ var version = '1.1.14';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -86,13 +86,6 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
86
86
  (0, _defineProperty2.default)(this, "setName", function (value) {
87
87
  _this.attributes.name = value;
88
88
  });
89
- // string # Folder path restriction for this api key. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
90
- (0, _defineProperty2.default)(this, "getPath", function () {
91
- return _this.attributes.path;
92
- });
93
- (0, _defineProperty2.default)(this, "setPath", function (value) {
94
- _this.attributes.path = value;
95
- });
96
89
  // string # Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
97
90
  (0, _defineProperty2.default)(this, "getPermissionSet", function () {
98
91
  return _this.attributes.permission_set;
@@ -121,6 +114,13 @@ var ApiKey = /*#__PURE__*/(0, _createClass2.default)(function ApiKey() {
121
114
  (0, _defineProperty2.default)(this, "setUserId", function (value) {
122
115
  _this.attributes.user_id = value;
123
116
  });
117
+ // string # Folder path restriction for this api key.
118
+ (0, _defineProperty2.default)(this, "getPath", function () {
119
+ return _this.attributes.path;
120
+ });
121
+ (0, _defineProperty2.default)(this, "setPath", function (value) {
122
+ _this.attributes.path = value;
123
+ });
124
124
  // Parameters:
125
125
  // name - string - Internal name for the API Key. For your use.
126
126
  // description - string - User-supplied description of API key.
@@ -40,6 +40,13 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
40
40
  (0, _defineProperty2.default)(this, "setId", function (value) {
41
41
  _this.attributes.id = value;
42
42
  });
43
+ // boolean # Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
44
+ (0, _defineProperty2.default)(this, "getAlwaysOverwriteSizeMatchingFiles", function () {
45
+ return _this.attributes.always_overwrite_size_matching_files;
46
+ });
47
+ (0, _defineProperty2.default)(this, "setAlwaysOverwriteSizeMatchingFiles", function (value) {
48
+ _this.attributes.always_overwrite_size_matching_files = value;
49
+ });
43
50
  // string # Automation type
44
51
  (0, _defineProperty2.default)(this, "getAutomation", function () {
45
52
  return _this.attributes.automation;
@@ -54,6 +61,34 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
54
61
  (0, _defineProperty2.default)(this, "setDeleted", function (value) {
55
62
  _this.attributes.deleted = value;
56
63
  });
64
+ // string # Description for the this Automation.
65
+ (0, _defineProperty2.default)(this, "getDescription", function () {
66
+ return _this.attributes.description;
67
+ });
68
+ (0, _defineProperty2.default)(this, "setDescription", function (value) {
69
+ _this.attributes.description = value;
70
+ });
71
+ // string # If set, this string in the destination path will be replaced with the value in `destination_replace_to`.
72
+ (0, _defineProperty2.default)(this, "getDestinationReplaceFrom", function () {
73
+ return _this.attributes.destination_replace_from;
74
+ });
75
+ (0, _defineProperty2.default)(this, "setDestinationReplaceFrom", function (value) {
76
+ _this.attributes.destination_replace_from = value;
77
+ });
78
+ // string # If set, this string will replace the value `destination_replace_from` in the destination filename. You can use special patterns here.
79
+ (0, _defineProperty2.default)(this, "getDestinationReplaceTo", function () {
80
+ return _this.attributes.destination_replace_to;
81
+ });
82
+ (0, _defineProperty2.default)(this, "setDestinationReplaceTo", function (value) {
83
+ _this.attributes.destination_replace_to = value;
84
+ });
85
+ // array # Destination Paths
86
+ (0, _defineProperty2.default)(this, "getDestinations", function () {
87
+ return _this.attributes.destinations;
88
+ });
89
+ (0, _defineProperty2.default)(this, "setDestinations", function (value) {
90
+ _this.attributes.destinations = value;
91
+ });
57
92
  // boolean # If true, this automation will not run.
58
93
  (0, _defineProperty2.default)(this, "getDisabled", function () {
59
94
  return _this.attributes.disabled;
@@ -61,12 +96,12 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
61
96
  (0, _defineProperty2.default)(this, "setDisabled", function (value) {
62
97
  _this.attributes.disabled = value;
63
98
  });
64
- // string # How this automation is triggered to run.
65
- (0, _defineProperty2.default)(this, "getTrigger", function () {
66
- return _this.attributes.trigger;
99
+ // array # IDs of Groups for the Automation (i.e. who to Request File from)
100
+ (0, _defineProperty2.default)(this, "getGroupIds", function () {
101
+ return _this.attributes.group_ids;
67
102
  });
68
- (0, _defineProperty2.default)(this, "setTrigger", function (value) {
69
- _this.attributes.trigger = value;
103
+ (0, _defineProperty2.default)(this, "setGroupIds", function (value) {
104
+ _this.attributes.group_ids = value;
70
105
  });
71
106
  // string # If trigger is `daily`, this specifies how often to run this automation. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
72
107
  (0, _defineProperty2.default)(this, "getInterval", function () {
@@ -89,6 +124,20 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
89
124
  (0, _defineProperty2.default)(this, "setName", function (value) {
90
125
  _this.attributes.name = value;
91
126
  });
127
+ // 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.
128
+ (0, _defineProperty2.default)(this, "getPath", function () {
129
+ return _this.attributes.path;
130
+ });
131
+ (0, _defineProperty2.default)(this, "setPath", function (value) {
132
+ _this.attributes.path = value;
133
+ });
134
+ // int64 # If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
135
+ (0, _defineProperty2.default)(this, "getRecurringDay", function () {
136
+ return _this.attributes.recurring_day;
137
+ });
138
+ (0, _defineProperty2.default)(this, "setRecurringDay", function (value) {
139
+ _this.attributes.recurring_day = value;
140
+ });
92
141
  // object # If trigger is `custom_schedule`, Custom schedule description for when the automation should be run.
93
142
  (0, _defineProperty2.default)(this, "getSchedule", function () {
94
143
  return _this.attributes.schedule;
@@ -103,47 +152,26 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
103
152
  (0, _defineProperty2.default)(this, "setSource", function (value) {
104
153
  _this.attributes.source = value;
105
154
  });
106
- // array # Destination Paths
107
- (0, _defineProperty2.default)(this, "getDestinations", function () {
108
- return _this.attributes.destinations;
109
- });
110
- (0, _defineProperty2.default)(this, "setDestinations", function (value) {
111
- _this.attributes.destinations = value;
112
- });
113
- // string # If set, this string in the destination path will be replaced with the value in `destination_replace_to`.
114
- (0, _defineProperty2.default)(this, "getDestinationReplaceFrom", function () {
115
- return _this.attributes.destination_replace_from;
116
- });
117
- (0, _defineProperty2.default)(this, "setDestinationReplaceFrom", function (value) {
118
- _this.attributes.destination_replace_from = value;
119
- });
120
- // string # If set, this string will replace the value `destination_replace_from` in the destination filename. You can use special patterns here.
121
- (0, _defineProperty2.default)(this, "getDestinationReplaceTo", function () {
122
- return _this.attributes.destination_replace_to;
123
- });
124
- (0, _defineProperty2.default)(this, "setDestinationReplaceTo", function (value) {
125
- _this.attributes.destination_replace_to = value;
126
- });
127
- // string # Description for the this Automation.
128
- (0, _defineProperty2.default)(this, "getDescription", function () {
129
- return _this.attributes.description;
155
+ // array # IDs of remote sync folder behaviors to run by this Automation
156
+ (0, _defineProperty2.default)(this, "getSyncIds", function () {
157
+ return _this.attributes.sync_ids;
130
158
  });
131
- (0, _defineProperty2.default)(this, "setDescription", function (value) {
132
- _this.attributes.description = value;
159
+ (0, _defineProperty2.default)(this, "setSyncIds", function (value) {
160
+ _this.attributes.sync_ids = value;
133
161
  });
134
- // int64 # If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
135
- (0, _defineProperty2.default)(this, "getRecurringDay", function () {
136
- return _this.attributes.recurring_day;
162
+ // array # 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
163
+ (0, _defineProperty2.default)(this, "getTriggerActions", function () {
164
+ return _this.attributes.trigger_actions;
137
165
  });
138
- (0, _defineProperty2.default)(this, "setRecurringDay", function (value) {
139
- _this.attributes.recurring_day = value;
166
+ (0, _defineProperty2.default)(this, "setTriggerActions", function (value) {
167
+ _this.attributes.trigger_actions = value;
140
168
  });
141
- // 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.
142
- (0, _defineProperty2.default)(this, "getPath", function () {
143
- return _this.attributes.path;
169
+ // string # How this automation is triggered to run.
170
+ (0, _defineProperty2.default)(this, "getTrigger", function () {
171
+ return _this.attributes.trigger;
144
172
  });
145
- (0, _defineProperty2.default)(this, "setPath", function (value) {
146
- _this.attributes.path = value;
173
+ (0, _defineProperty2.default)(this, "setTrigger", function (value) {
174
+ _this.attributes.trigger = value;
147
175
  });
148
176
  // int64 # User ID of the Automation's creator.
149
177
  (0, _defineProperty2.default)(this, "getUserId", function () {
@@ -152,13 +180,6 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
152
180
  (0, _defineProperty2.default)(this, "setUserId", function (value) {
153
181
  _this.attributes.user_id = value;
154
182
  });
155
- // array # IDs of remote sync folder behaviors to run by this Automation
156
- (0, _defineProperty2.default)(this, "getSyncIds", function () {
157
- return _this.attributes.sync_ids;
158
- });
159
- (0, _defineProperty2.default)(this, "setSyncIds", function (value) {
160
- _this.attributes.sync_ids = value;
161
- });
162
183
  // array # IDs of Users for the Automation (i.e. who to Request File from)
163
184
  (0, _defineProperty2.default)(this, "getUserIds", function () {
164
185
  return _this.attributes.user_ids;
@@ -166,12 +187,12 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
166
187
  (0, _defineProperty2.default)(this, "setUserIds", function (value) {
167
188
  _this.attributes.user_ids = value;
168
189
  });
169
- // array # IDs of Groups for the Automation (i.e. who to Request File from)
170
- (0, _defineProperty2.default)(this, "getGroupIds", function () {
171
- return _this.attributes.group_ids;
190
+ // object # A Hash of attributes specific to the automation type.
191
+ (0, _defineProperty2.default)(this, "getValue", function () {
192
+ return _this.attributes.value;
172
193
  });
173
- (0, _defineProperty2.default)(this, "setGroupIds", function (value) {
174
- _this.attributes.group_ids = value;
194
+ (0, _defineProperty2.default)(this, "setValue", function (value) {
195
+ _this.attributes.value = value;
175
196
  });
176
197
  // string # If trigger is `webhook`, this is the URL of the webhook to trigger the Automation.
177
198
  (0, _defineProperty2.default)(this, "getWebhookUrl", function () {
@@ -180,20 +201,6 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
180
201
  (0, _defineProperty2.default)(this, "setWebhookUrl", function (value) {
181
202
  _this.attributes.webhook_url = value;
182
203
  });
183
- // array # 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
184
- (0, _defineProperty2.default)(this, "getTriggerActions", function () {
185
- return _this.attributes.trigger_actions;
186
- });
187
- (0, _defineProperty2.default)(this, "setTriggerActions", function (value) {
188
- _this.attributes.trigger_actions = value;
189
- });
190
- // object # A Hash of attributes specific to the automation type.
191
- (0, _defineProperty2.default)(this, "getValue", function () {
192
- return _this.attributes.value;
193
- });
194
- (0, _defineProperty2.default)(this, "setValue", function (value) {
195
- _this.attributes.value = value;
196
- });
197
204
  // string # DEPRECATED: Destination Path. Use `destinations` instead.
198
205
  (0, _defineProperty2.default)(this, "getDestination", function () {
199
206
  return _this.attributes.destination;
@@ -266,6 +273,7 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
266
273
  // user_ids - string - A list of user IDs the automation is associated with. If sent as a string, it should be comma-delimited.
267
274
  // group_ids - string - A list of group IDs the automation is associated with. If sent as a string, it should be comma-delimited.
268
275
  // schedule - object - Custom schedule for running this automation.
276
+ // always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
269
277
  // description - string - Description for the this Automation.
270
278
  // disabled - boolean - If true, this automation will not run.
271
279
  // name - string - Name for this automation.
@@ -635,6 +643,7 @@ _class = Automation;
635
643
  // user_ids - string - A list of user IDs the automation is associated with. If sent as a string, it should be comma-delimited.
636
644
  // group_ids - string - A list of group IDs the automation is associated with. If sent as a string, it should be comma-delimited.
637
645
  // schedule - object - Custom schedule for running this automation.
646
+ // always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
638
647
  // description - string - Description for the this Automation.
639
648
  // disabled - boolean - If true, this automation will not run.
640
649
  // name - string - Name for this automation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.1.12",
3
+ "version": "1.1.14",
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.1.12'
8
+ const version = '1.1.14'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -76,13 +76,6 @@ class ApiKey {
76
76
  this.attributes.name = value
77
77
  }
78
78
 
79
- // string # Folder path restriction for this api key. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
80
- getPath = () => this.attributes.path
81
-
82
- setPath = value => {
83
- this.attributes.path = value
84
- }
85
-
86
79
  // string # Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
87
80
  getPermissionSet = () => this.attributes.permission_set
88
81
 
@@ -111,6 +104,13 @@ class ApiKey {
111
104
  this.attributes.user_id = value
112
105
  }
113
106
 
107
+ // string # Folder path restriction for this api key.
108
+ getPath = () => this.attributes.path
109
+
110
+ setPath = value => {
111
+ this.attributes.path = value
112
+ }
113
+
114
114
 
115
115
  // Parameters:
116
116
  // name - string - Internal name for the API Key. For your use.
@@ -31,6 +31,13 @@ class Automation {
31
31
  this.attributes.id = value
32
32
  }
33
33
 
34
+ // boolean # Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
35
+ getAlwaysOverwriteSizeMatchingFiles = () => this.attributes.always_overwrite_size_matching_files
36
+
37
+ setAlwaysOverwriteSizeMatchingFiles = value => {
38
+ this.attributes.always_overwrite_size_matching_files = value
39
+ }
40
+
34
41
  // string # Automation type
35
42
  getAutomation = () => this.attributes.automation
36
43
 
@@ -45,6 +52,34 @@ class Automation {
45
52
  this.attributes.deleted = value
46
53
  }
47
54
 
55
+ // string # Description for the this Automation.
56
+ getDescription = () => this.attributes.description
57
+
58
+ setDescription = value => {
59
+ this.attributes.description = value
60
+ }
61
+
62
+ // string # If set, this string in the destination path will be replaced with the value in `destination_replace_to`.
63
+ getDestinationReplaceFrom = () => this.attributes.destination_replace_from
64
+
65
+ setDestinationReplaceFrom = value => {
66
+ this.attributes.destination_replace_from = value
67
+ }
68
+
69
+ // string # If set, this string will replace the value `destination_replace_from` in the destination filename. You can use special patterns here.
70
+ getDestinationReplaceTo = () => this.attributes.destination_replace_to
71
+
72
+ setDestinationReplaceTo = value => {
73
+ this.attributes.destination_replace_to = value
74
+ }
75
+
76
+ // array # Destination Paths
77
+ getDestinations = () => this.attributes.destinations
78
+
79
+ setDestinations = value => {
80
+ this.attributes.destinations = value
81
+ }
82
+
48
83
  // boolean # If true, this automation will not run.
49
84
  getDisabled = () => this.attributes.disabled
50
85
 
@@ -52,11 +87,11 @@ class Automation {
52
87
  this.attributes.disabled = value
53
88
  }
54
89
 
55
- // string # How this automation is triggered to run.
56
- getTrigger = () => this.attributes.trigger
90
+ // array # IDs of Groups for the Automation (i.e. who to Request File from)
91
+ getGroupIds = () => this.attributes.group_ids
57
92
 
58
- setTrigger = value => {
59
- this.attributes.trigger = value
93
+ setGroupIds = value => {
94
+ this.attributes.group_ids = value
60
95
  }
61
96
 
62
97
  // string # If trigger is `daily`, this specifies how often to run this automation. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
@@ -80,6 +115,20 @@ class Automation {
80
115
  this.attributes.name = value
81
116
  }
82
117
 
118
+ // 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.
119
+ getPath = () => this.attributes.path
120
+
121
+ setPath = value => {
122
+ this.attributes.path = value
123
+ }
124
+
125
+ // int64 # If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
126
+ getRecurringDay = () => this.attributes.recurring_day
127
+
128
+ setRecurringDay = value => {
129
+ this.attributes.recurring_day = value
130
+ }
131
+
83
132
  // object # If trigger is `custom_schedule`, Custom schedule description for when the automation should be run.
84
133
  getSchedule = () => this.attributes.schedule
85
134
 
@@ -94,46 +143,25 @@ class Automation {
94
143
  this.attributes.source = value
95
144
  }
96
145
 
97
- // array # Destination Paths
98
- getDestinations = () => this.attributes.destinations
99
-
100
- setDestinations = value => {
101
- this.attributes.destinations = value
102
- }
103
-
104
- // string # If set, this string in the destination path will be replaced with the value in `destination_replace_to`.
105
- getDestinationReplaceFrom = () => this.attributes.destination_replace_from
106
-
107
- setDestinationReplaceFrom = value => {
108
- this.attributes.destination_replace_from = value
109
- }
110
-
111
- // string # If set, this string will replace the value `destination_replace_from` in the destination filename. You can use special patterns here.
112
- getDestinationReplaceTo = () => this.attributes.destination_replace_to
113
-
114
- setDestinationReplaceTo = value => {
115
- this.attributes.destination_replace_to = value
116
- }
117
-
118
- // string # Description for the this Automation.
119
- getDescription = () => this.attributes.description
146
+ // array # IDs of remote sync folder behaviors to run by this Automation
147
+ getSyncIds = () => this.attributes.sync_ids
120
148
 
121
- setDescription = value => {
122
- this.attributes.description = value
149
+ setSyncIds = value => {
150
+ this.attributes.sync_ids = value
123
151
  }
124
152
 
125
- // int64 # If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
126
- getRecurringDay = () => this.attributes.recurring_day
153
+ // array # 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
154
+ getTriggerActions = () => this.attributes.trigger_actions
127
155
 
128
- setRecurringDay = value => {
129
- this.attributes.recurring_day = value
156
+ setTriggerActions = value => {
157
+ this.attributes.trigger_actions = value
130
158
  }
131
159
 
132
- // 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.
133
- getPath = () => this.attributes.path
160
+ // string # How this automation is triggered to run.
161
+ getTrigger = () => this.attributes.trigger
134
162
 
135
- setPath = value => {
136
- this.attributes.path = value
163
+ setTrigger = value => {
164
+ this.attributes.trigger = value
137
165
  }
138
166
 
139
167
  // int64 # User ID of the Automation's creator.
@@ -143,13 +171,6 @@ class Automation {
143
171
  this.attributes.user_id = value
144
172
  }
145
173
 
146
- // array # IDs of remote sync folder behaviors to run by this Automation
147
- getSyncIds = () => this.attributes.sync_ids
148
-
149
- setSyncIds = value => {
150
- this.attributes.sync_ids = value
151
- }
152
-
153
174
  // array # IDs of Users for the Automation (i.e. who to Request File from)
154
175
  getUserIds = () => this.attributes.user_ids
155
176
 
@@ -157,11 +178,11 @@ class Automation {
157
178
  this.attributes.user_ids = value
158
179
  }
159
180
 
160
- // array # IDs of Groups for the Automation (i.e. who to Request File from)
161
- getGroupIds = () => this.attributes.group_ids
181
+ // object # A Hash of attributes specific to the automation type.
182
+ getValue = () => this.attributes.value
162
183
 
163
- setGroupIds = value => {
164
- this.attributes.group_ids = value
184
+ setValue = value => {
185
+ this.attributes.value = value
165
186
  }
166
187
 
167
188
  // string # If trigger is `webhook`, this is the URL of the webhook to trigger the Automation.
@@ -171,20 +192,6 @@ class Automation {
171
192
  this.attributes.webhook_url = value
172
193
  }
173
194
 
174
- // array # 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
175
- getTriggerActions = () => this.attributes.trigger_actions
176
-
177
- setTriggerActions = value => {
178
- this.attributes.trigger_actions = value
179
- }
180
-
181
- // object # A Hash of attributes specific to the automation type.
182
- getValue = () => this.attributes.value
183
-
184
- setValue = value => {
185
- this.attributes.value = value
186
- }
187
-
188
195
  // string # DEPRECATED: Destination Path. Use `destinations` instead.
189
196
  getDestination = () => this.attributes.destination
190
197
 
@@ -233,6 +240,7 @@ class Automation {
233
240
  // user_ids - string - A list of user IDs the automation is associated with. If sent as a string, it should be comma-delimited.
234
241
  // group_ids - string - A list of group IDs the automation is associated with. If sent as a string, it should be comma-delimited.
235
242
  // schedule - object - Custom schedule for running this automation.
243
+ // always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
236
244
  // description - string - Description for the this Automation.
237
245
  // disabled - boolean - If true, this automation will not run.
238
246
  // name - string - Name for this automation.
@@ -425,6 +433,7 @@ class Automation {
425
433
  // user_ids - string - A list of user IDs the automation is associated with. If sent as a string, it should be comma-delimited.
426
434
  // group_ids - string - A list of group IDs the automation is associated with. If sent as a string, it should be comma-delimited.
427
435
  // schedule - object - Custom schedule for running this automation.
436
+ // always_overwrite_size_matching_files - boolean - Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage.
428
437
  // description - string - Description for the this Automation.
429
438
  // disabled - boolean - If true, this automation will not run.
430
439
  // name - string - Name for this automation.