files.com 1.0.184 → 1.0.187
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/lib/models/Automation.js +88 -80
- package/lib/models/Notification.js +113 -17
- package/lib/models/RemoteServer.js +233 -123
- package/lib/models/Site.js +3 -0
- package/package.json +1 -1
- package/src/models/Automation.js +43 -24
- package/src/models/Folder.js +1 -1
- package/src/models/Notification.js +94 -1
- package/src/models/RemoteServer.js +80 -0
- package/src/models/Site.js +4 -0
package/lib/models/Site.js
CHANGED
@@ -59,6 +59,9 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
|
|
59
59
|
(0, _defineProperty2.default)(this, "getAllowed2faMethodYubi", function () {
|
60
60
|
return _this.attributes.allowed_2fa_method_yubi;
|
61
61
|
});
|
62
|
+
(0, _defineProperty2.default)(this, "getAllowed2faMethodBypassForFtpSftpDav", function () {
|
63
|
+
return _this.attributes.allowed_2fa_method_bypass_for_ftp_sftp_dav;
|
64
|
+
});
|
62
65
|
(0, _defineProperty2.default)(this, "getAdminUserId", function () {
|
63
66
|
return _this.attributes.admin_user_id;
|
64
67
|
});
|
package/package.json
CHANGED
package/src/models/Automation.js
CHANGED
@@ -36,6 +36,13 @@ class Automation {
|
|
36
36
|
this.attributes.automation = value
|
37
37
|
}
|
38
38
|
|
39
|
+
// boolean # Indicates if the automation has been deleted.
|
40
|
+
getDeleted = () => this.attributes.deleted
|
41
|
+
|
42
|
+
setDeleted = value => {
|
43
|
+
this.attributes.deleted = value
|
44
|
+
}
|
45
|
+
|
39
46
|
// boolean # If true, this automation will not run.
|
40
47
|
getDisabled = () => this.attributes.disabled
|
41
48
|
|
@@ -57,6 +64,13 @@ class Automation {
|
|
57
64
|
this.attributes.interval = value
|
58
65
|
}
|
59
66
|
|
67
|
+
// date-time # Time when automation was last modified. Does not change for name or description updates.
|
68
|
+
getLastModifiedAt = () => this.attributes.last_modified_at
|
69
|
+
|
70
|
+
setLastModifiedAt = value => {
|
71
|
+
this.attributes.last_modified_at = value
|
72
|
+
}
|
73
|
+
|
60
74
|
// string # Name for this automation.
|
61
75
|
getName = () => this.attributes.name
|
62
76
|
|
@@ -162,9 +176,15 @@ class Automation {
|
|
162
176
|
this.attributes.destination = value
|
163
177
|
}
|
164
178
|
|
179
|
+
// int64 # Set to the ID of automation used a clone template. For
|
180
|
+
getClonedFrom = () => this.attributes.cloned_from
|
181
|
+
|
182
|
+
setClonedFrom = value => {
|
183
|
+
this.attributes.cloned_from = value
|
184
|
+
}
|
185
|
+
|
165
186
|
|
166
187
|
// Parameters:
|
167
|
-
// automation (required) - string - Automation type
|
168
188
|
// source - string - Source Path
|
169
189
|
// destination - string - DEPRECATED: Destination Path. Use `destinations` instead.
|
170
190
|
// destinations - array(string) - A list of String destination paths or Hash of folder_path and optional file_path.
|
@@ -181,6 +201,7 @@ class Automation {
|
|
181
201
|
// trigger - string - How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
|
182
202
|
// 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
|
183
203
|
// value - object - A Hash of attributes specific to the automation type.
|
204
|
+
// automation - string - Automation type
|
184
205
|
update = async (params = {}) => {
|
185
206
|
if (!this.attributes.id) {
|
186
207
|
throw new Error('Current object has no id')
|
@@ -194,9 +215,6 @@ class Automation {
|
|
194
215
|
if (params['id'] && !isInt(params['id'])) {
|
195
216
|
throw new Error(`Bad parameter: id must be of type Int, received ${getType(id)}`)
|
196
217
|
}
|
197
|
-
if (params['automation'] && !isString(params['automation'])) {
|
198
|
-
throw new Error(`Bad parameter: automation must be of type String, received ${getType(automation)}`)
|
199
|
-
}
|
200
218
|
if (params['source'] && !isString(params['source'])) {
|
201
219
|
throw new Error(`Bad parameter: source must be of type String, received ${getType(source)}`)
|
202
220
|
}
|
@@ -236,6 +254,9 @@ class Automation {
|
|
236
254
|
if (params['trigger_actions'] && !isArray(params['trigger_actions'])) {
|
237
255
|
throw new Error(`Bad parameter: trigger_actions must be of type Array, received ${getType(trigger_actions)}`)
|
238
256
|
}
|
257
|
+
if (params['automation'] && !isString(params['automation'])) {
|
258
|
+
throw new Error(`Bad parameter: automation must be of type String, received ${getType(automation)}`)
|
259
|
+
}
|
239
260
|
|
240
261
|
if (!params['id']) {
|
241
262
|
if (this.attributes.id) {
|
@@ -245,14 +266,6 @@ class Automation {
|
|
245
266
|
}
|
246
267
|
}
|
247
268
|
|
248
|
-
if (!params['automation']) {
|
249
|
-
if (this.attributes.automation) {
|
250
|
-
params['automation'] = this.automation
|
251
|
-
} else {
|
252
|
-
throw new Error('Parameter missing: automation')
|
253
|
-
}
|
254
|
-
}
|
255
|
-
|
256
269
|
const response = await Api.sendRequest(`/automations/${params['id']}`, 'PATCH', params, this.options)
|
257
270
|
|
258
271
|
return new Automation(response?.data, this.options)
|
@@ -301,13 +314,14 @@ class Automation {
|
|
301
314
|
// Parameters:
|
302
315
|
// cursor - string - Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
303
316
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
304
|
-
// sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `automation`.
|
305
|
-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `automation`.
|
306
|
-
// filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `automation`.
|
307
|
-
// filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `automation`.
|
308
|
-
// filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `automation`.
|
309
|
-
// filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `automation`.
|
310
|
-
// filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `automation`.
|
317
|
+
// sort_by - object - If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `automation`, `last_modified_at` or `disabled`.
|
318
|
+
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `automation`, `last_modified_at` or `disabled`. Valid field combinations are `[ disabled, automation ]`.
|
319
|
+
// filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `automation`, `last_modified_at` or `disabled`. Valid field combinations are `[ disabled, automation ]`.
|
320
|
+
// filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `automation`, `last_modified_at` or `disabled`. Valid field combinations are `[ disabled, automation ]`.
|
321
|
+
// filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `automation`, `last_modified_at` or `disabled`. Valid field combinations are `[ disabled, automation ]`.
|
322
|
+
// filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `automation`, `last_modified_at` or `disabled`. Valid field combinations are `[ disabled, automation ]`.
|
323
|
+
// filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `automation`, `last_modified_at` or `disabled`. Valid field combinations are `[ disabled, automation ]`.
|
324
|
+
// with_deleted - boolean - Set to true to include deleted automations in the results.
|
311
325
|
// automation - string - DEPRECATED: Type of automation to filter by. Use `filter[automation]` instead.
|
312
326
|
static list = async (params = {}, options = {}) => {
|
313
327
|
if (params['cursor'] && !isString(params['cursor'])) {
|
@@ -356,7 +370,6 @@ class Automation {
|
|
356
370
|
Automation.find(id, params, options)
|
357
371
|
|
358
372
|
// Parameters:
|
359
|
-
// automation (required) - string - Automation type
|
360
373
|
// source - string - Source Path
|
361
374
|
// destination - string - DEPRECATED: Destination Path. Use `destinations` instead.
|
362
375
|
// destinations - array(string) - A list of String destination paths or Hash of folder_path and optional file_path.
|
@@ -373,15 +386,13 @@ class Automation {
|
|
373
386
|
// trigger - string - How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
|
374
387
|
// 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
|
375
388
|
// value - object - A Hash of attributes specific to the automation type.
|
389
|
+
// automation (required) - string - Automation type
|
390
|
+
// cloned_from - int64 - Set to the ID of automation used a clone template. For
|
376
391
|
static create = async (params = {}, options = {}) => {
|
377
392
|
if (!params['automation']) {
|
378
393
|
throw new Error('Parameter missing: automation')
|
379
394
|
}
|
380
395
|
|
381
|
-
if (params['automation'] && !isString(params['automation'])) {
|
382
|
-
throw new Error(`Bad parameter: automation must be of type String, received ${getType(automation)}`)
|
383
|
-
}
|
384
|
-
|
385
396
|
if (params['source'] && !isString(params['source'])) {
|
386
397
|
throw new Error(`Bad parameter: source must be of type String, received ${getType(source)}`)
|
387
398
|
}
|
@@ -434,6 +445,14 @@ class Automation {
|
|
434
445
|
throw new Error(`Bad parameter: trigger_actions must be of type Array, received ${getType(trigger_actions)}`)
|
435
446
|
}
|
436
447
|
|
448
|
+
if (params['automation'] && !isString(params['automation'])) {
|
449
|
+
throw new Error(`Bad parameter: automation must be of type String, received ${getType(automation)}`)
|
450
|
+
}
|
451
|
+
|
452
|
+
if (params['cloned_from'] && !isInt(params['cloned_from'])) {
|
453
|
+
throw new Error(`Bad parameter: cloned_from must be of type Int, received ${getType(cloned_from)}`)
|
454
|
+
}
|
455
|
+
|
437
456
|
const response = await Api.sendRequest(`/automations`, 'POST', params, options)
|
438
457
|
|
439
458
|
return new Automation(response?.data, options)
|
package/src/models/Folder.js
CHANGED
@@ -156,7 +156,7 @@ class Folder {
|
|
156
156
|
// filter - string - If specified, will filter folders/files list by this string. Wildcards of `*` and `?` are acceptable here.
|
157
157
|
// preview_size - string - Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
|
158
158
|
// search - string - If `search_all` is `true`, provide the search string here. Otherwise, this parameter acts like an alias of `filter`.
|
159
|
-
// search_all - boolean - Search entire site?
|
159
|
+
// search_all - boolean - Search entire site? If set, we will ignore the folder path provided and search the entire site. This is the same API used by the search bar in the UI. Search results are a best effort, not real time, and not guaranteed to match every file. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
|
160
160
|
// with_previews - boolean - Include file previews?
|
161
161
|
// with_priority_color - boolean - Include file priority color information?
|
162
162
|
static listFor = async (path, params = {}, options = {}) => {
|
@@ -50,6 +50,27 @@ class Notification {
|
|
50
50
|
this.attributes.group_name = value
|
51
51
|
}
|
52
52
|
|
53
|
+
// int64 # Only notify on actions made by a member of one of the specified groups
|
54
|
+
getTriggeringGroupIds = () => this.attributes.triggering_group_ids
|
55
|
+
|
56
|
+
setTriggeringGroupIds = value => {
|
57
|
+
this.attributes.triggering_group_ids = value
|
58
|
+
}
|
59
|
+
|
60
|
+
// int64 # Only notify on actions made one of the specified users
|
61
|
+
getTriggeringUserIds = () => this.attributes.triggering_user_ids
|
62
|
+
|
63
|
+
setTriggeringUserIds = value => {
|
64
|
+
this.attributes.triggering_user_ids = value
|
65
|
+
}
|
66
|
+
|
67
|
+
// boolean # Notify when actions are performed by a share recipient?
|
68
|
+
getTriggerByShareRecipients = () => this.attributes.trigger_by_share_recipients
|
69
|
+
|
70
|
+
setTriggerByShareRecipients = value => {
|
71
|
+
this.attributes.trigger_by_share_recipients = value
|
72
|
+
}
|
73
|
+
|
53
74
|
// boolean # Trigger notification on notification user actions?
|
54
75
|
getNotifyUserActions = () => this.attributes.notify_user_actions
|
55
76
|
|
@@ -57,13 +78,41 @@ class Notification {
|
|
57
78
|
this.attributes.notify_user_actions = value
|
58
79
|
}
|
59
80
|
|
60
|
-
// boolean # Triggers notification when
|
81
|
+
// boolean # Triggers notification when copying files to this path
|
61
82
|
getNotifyOnCopy = () => this.attributes.notify_on_copy
|
62
83
|
|
63
84
|
setNotifyOnCopy = value => {
|
64
85
|
this.attributes.notify_on_copy = value
|
65
86
|
}
|
66
87
|
|
88
|
+
// boolean # Triggers notification when deleting files from this path
|
89
|
+
getNotifyOnDelete = () => this.attributes.notify_on_delete
|
90
|
+
|
91
|
+
setNotifyOnDelete = value => {
|
92
|
+
this.attributes.notify_on_delete = value
|
93
|
+
}
|
94
|
+
|
95
|
+
// boolean # Triggers notification when downloading files from this path
|
96
|
+
getNotifyOnDownload = () => this.attributes.notify_on_download
|
97
|
+
|
98
|
+
setNotifyOnDownload = value => {
|
99
|
+
this.attributes.notify_on_download = value
|
100
|
+
}
|
101
|
+
|
102
|
+
// boolean # Triggers notification when moving files to this path
|
103
|
+
getNotifyOnMove = () => this.attributes.notify_on_move
|
104
|
+
|
105
|
+
setNotifyOnMove = value => {
|
106
|
+
this.attributes.notify_on_move = value
|
107
|
+
}
|
108
|
+
|
109
|
+
// boolean # Triggers notification when uploading new files to this path
|
110
|
+
getNotifyOnUpload = () => this.attributes.notify_on_upload
|
111
|
+
|
112
|
+
setNotifyOnUpload = value => {
|
113
|
+
this.attributes.notify_on_upload = value
|
114
|
+
}
|
115
|
+
|
67
116
|
// boolean # Enable notifications for each subfolder in this path
|
68
117
|
getRecursive = () => this.attributes.recursive
|
69
118
|
|
@@ -85,6 +134,13 @@ class Notification {
|
|
85
134
|
this.attributes.message = value
|
86
135
|
}
|
87
136
|
|
137
|
+
// array # Array of filenames (possibly with wildcards) to match for action path
|
138
|
+
getTriggeringFilenames = () => this.attributes.triggering_filenames
|
139
|
+
|
140
|
+
setTriggeringFilenames = value => {
|
141
|
+
this.attributes.triggering_filenames = value
|
142
|
+
}
|
143
|
+
|
88
144
|
// boolean # Is the user unsubscribed from this notification?
|
89
145
|
getUnsubscribed = () => this.attributes.unsubscribed
|
90
146
|
|
@@ -123,10 +179,18 @@ class Notification {
|
|
123
179
|
|
124
180
|
// Parameters:
|
125
181
|
// notify_on_copy - boolean - If `true`, copying or moving resources into this path will trigger a notification, in addition to just uploads.
|
182
|
+
// notify_on_delete - boolean - Triggers notification when deleting files from this path
|
183
|
+
// notify_on_download - boolean - Triggers notification when downloading files from this path
|
184
|
+
// notify_on_move - boolean - Triggers notification when moving files to this path
|
185
|
+
// notify_on_upload - boolean - Triggers notification when uploading new files to this path
|
126
186
|
// notify_user_actions - boolean - If `true` actions initiated by the user will still result in a notification
|
127
187
|
// recursive - boolean - If `true`, enable notifications for each subfolder in this path
|
128
188
|
// send_interval - string - The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
|
129
189
|
// message - string - Custom message to include in notification emails.
|
190
|
+
// triggering_filenames - array(string) - Array of filenames (possibly with wildcards) to match for action path
|
191
|
+
// triggering_group_ids - array(int64) - Only notify on actions made by a member of one of the specified groups
|
192
|
+
// triggering_user_ids - array(int64) - Only notify on actions made one of the specified users
|
193
|
+
// trigger_by_share_recipients - boolean - Notify when actions are performed by a share recipient?
|
130
194
|
update = async (params = {}) => {
|
131
195
|
if (!this.attributes.id) {
|
132
196
|
throw new Error('Current object has no id')
|
@@ -146,6 +210,15 @@ class Notification {
|
|
146
210
|
if (params['message'] && !isString(params['message'])) {
|
147
211
|
throw new Error(`Bad parameter: message must be of type String, received ${getType(message)}`)
|
148
212
|
}
|
213
|
+
if (params['triggering_filenames'] && !isArray(params['triggering_filenames'])) {
|
214
|
+
throw new Error(`Bad parameter: triggering_filenames must be of type Array, received ${getType(triggering_filenames)}`)
|
215
|
+
}
|
216
|
+
if (params['triggering_group_ids'] && !isArray(params['triggering_group_ids'])) {
|
217
|
+
throw new Error(`Bad parameter: triggering_group_ids must be of type Array, received ${getType(triggering_group_ids)}`)
|
218
|
+
}
|
219
|
+
if (params['triggering_user_ids'] && !isArray(params['triggering_user_ids'])) {
|
220
|
+
throw new Error(`Bad parameter: triggering_user_ids must be of type Array, received ${getType(triggering_user_ids)}`)
|
221
|
+
}
|
149
222
|
|
150
223
|
if (!params['id']) {
|
151
224
|
if (this.attributes.id) {
|
@@ -271,10 +344,18 @@ class Notification {
|
|
271
344
|
// Parameters:
|
272
345
|
// user_id - int64 - The id of the user to notify. Provide `user_id`, `username` or `group_id`.
|
273
346
|
// notify_on_copy - boolean - If `true`, copying or moving resources into this path will trigger a notification, in addition to just uploads.
|
347
|
+
// notify_on_delete - boolean - Triggers notification when deleting files from this path
|
348
|
+
// notify_on_download - boolean - Triggers notification when downloading files from this path
|
349
|
+
// notify_on_move - boolean - Triggers notification when moving files to this path
|
350
|
+
// notify_on_upload - boolean - Triggers notification when uploading new files to this path
|
274
351
|
// notify_user_actions - boolean - If `true` actions initiated by the user will still result in a notification
|
275
352
|
// recursive - boolean - If `true`, enable notifications for each subfolder in this path
|
276
353
|
// send_interval - string - The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
|
277
354
|
// message - string - Custom message to include in notification emails.
|
355
|
+
// triggering_filenames - array(string) - Array of filenames (possibly with wildcards) to match for action path
|
356
|
+
// triggering_group_ids - array(int64) - Only notify on actions made by a member of one of the specified groups
|
357
|
+
// triggering_user_ids - array(int64) - Only notify on actions made one of the specified users
|
358
|
+
// trigger_by_share_recipients - boolean - Notify when actions are performed by a share recipient?
|
278
359
|
// group_id - int64 - The ID of the group to notify. Provide `user_id`, `username` or `group_id`.
|
279
360
|
// path - string - Path
|
280
361
|
// username - string - The username of the user to notify. Provide `user_id`, `username` or `group_id`.
|
@@ -291,6 +372,18 @@ class Notification {
|
|
291
372
|
throw new Error(`Bad parameter: message must be of type String, received ${getType(message)}`)
|
292
373
|
}
|
293
374
|
|
375
|
+
if (params['triggering_filenames'] && !isArray(params['triggering_filenames'])) {
|
376
|
+
throw new Error(`Bad parameter: triggering_filenames must be of type Array, received ${getType(triggering_filenames)}`)
|
377
|
+
}
|
378
|
+
|
379
|
+
if (params['triggering_group_ids'] && !isArray(params['triggering_group_ids'])) {
|
380
|
+
throw new Error(`Bad parameter: triggering_group_ids must be of type Array, received ${getType(triggering_group_ids)}`)
|
381
|
+
}
|
382
|
+
|
383
|
+
if (params['triggering_user_ids'] && !isArray(params['triggering_user_ids'])) {
|
384
|
+
throw new Error(`Bad parameter: triggering_user_ids must be of type Array, received ${getType(triggering_user_ids)}`)
|
385
|
+
}
|
386
|
+
|
294
387
|
if (params['group_id'] && !isInt(params['group_id'])) {
|
295
388
|
throw new Error(`Bad parameter: group_id must be of type Int, received ${getType(group_id)}`)
|
296
389
|
}
|
@@ -239,6 +239,13 @@ class RemoteServer {
|
|
239
239
|
this.attributes.azure_blob_storage_account = value
|
240
240
|
}
|
241
241
|
|
242
|
+
// string # Shared Access Signature (SAS) token
|
243
|
+
getAzureBlobStorageSasToken = () => this.attributes.azure_blob_storage_sas_token
|
244
|
+
|
245
|
+
setAzureBlobStorageSasToken = value => {
|
246
|
+
this.attributes.azure_blob_storage_sas_token = value
|
247
|
+
}
|
248
|
+
|
242
249
|
// string # Azure Blob Storage Container name
|
243
250
|
getAzureBlobStorageContainer = () => this.attributes.azure_blob_storage_container
|
244
251
|
|
@@ -246,6 +253,27 @@ class RemoteServer {
|
|
246
253
|
this.attributes.azure_blob_storage_container = value
|
247
254
|
}
|
248
255
|
|
256
|
+
// string # Azure File Storage Account name
|
257
|
+
getAzureFilesStorageAccount = () => this.attributes.azure_files_storage_account
|
258
|
+
|
259
|
+
setAzureFilesStorageAccount = value => {
|
260
|
+
this.attributes.azure_files_storage_account = value
|
261
|
+
}
|
262
|
+
|
263
|
+
// string # Shared Access Signature (SAS) token
|
264
|
+
getAzureFilesSasToken = () => this.attributes.azure_files_sas_token
|
265
|
+
|
266
|
+
setAzureFilesSasToken = value => {
|
267
|
+
this.attributes.azure_files_sas_token = value
|
268
|
+
}
|
269
|
+
|
270
|
+
// string # Azure File Storage Share name
|
271
|
+
getAzureFilesShareName = () => this.attributes.azure_files_share_name
|
272
|
+
|
273
|
+
setAzureFilesShareName = value => {
|
274
|
+
this.attributes.azure_files_share_name = value
|
275
|
+
}
|
276
|
+
|
249
277
|
// string # S3-compatible Bucket name
|
250
278
|
getS3CompatibleBucket = () => this.attributes.s3_compatible_bucket
|
251
279
|
|
@@ -358,6 +386,13 @@ class RemoteServer {
|
|
358
386
|
this.attributes.azure_blob_storage_access_key = value
|
359
387
|
}
|
360
388
|
|
389
|
+
// string # Azure File Storage access key.
|
390
|
+
getAzureFilesStorageAccessKey = () => this.attributes.azure_files_storage_access_key
|
391
|
+
|
392
|
+
setAzureFilesStorageAccessKey = value => {
|
393
|
+
this.attributes.azure_files_storage_access_key = value
|
394
|
+
}
|
395
|
+
|
361
396
|
// string # S3-compatible secret key
|
362
397
|
getS3CompatibleSecretKey = () => this.attributes.s3_compatible_secret_key
|
363
398
|
|
@@ -380,6 +415,7 @@ class RemoteServer {
|
|
380
415
|
// rackspace_api_key - string - Rackspace API key from the Rackspace Cloud Control Panel.
|
381
416
|
// reset_authentication - boolean - Reset authenticated account
|
382
417
|
// azure_blob_storage_access_key - string - Azure Blob Storage secret key.
|
418
|
+
// azure_files_storage_access_key - string - Azure File Storage access key.
|
383
419
|
// hostname - string - Hostname or IP address
|
384
420
|
// name - string - Internal name for your reference
|
385
421
|
// max_connections - int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
|
@@ -403,6 +439,10 @@ class RemoteServer {
|
|
403
439
|
// one_drive_account_type - string - Either personal or business_other account types
|
404
440
|
// azure_blob_storage_account - string - Azure Blob Storage Account name
|
405
441
|
// azure_blob_storage_container - string - Azure Blob Storage Container name
|
442
|
+
// azure_blob_storage_sas_token - string - Shared Access Signature (SAS) token
|
443
|
+
// azure_files_storage_account - string - Azure File Storage Account name
|
444
|
+
// azure_files_share_name - string - Azure File Storage Share name
|
445
|
+
// azure_files_sas_token - string - Shared Access Signature (SAS) token
|
406
446
|
// s3_compatible_bucket - string - S3-compatible Bucket name
|
407
447
|
// s3_compatible_endpoint - string - S3-compatible endpoint
|
408
448
|
// s3_compatible_region - string - S3-compatible endpoint
|
@@ -458,6 +498,9 @@ class RemoteServer {
|
|
458
498
|
if (params['azure_blob_storage_access_key'] && !isString(params['azure_blob_storage_access_key'])) {
|
459
499
|
throw new Error(`Bad parameter: azure_blob_storage_access_key must be of type String, received ${getType(azure_blob_storage_access_key)}`)
|
460
500
|
}
|
501
|
+
if (params['azure_files_storage_access_key'] && !isString(params['azure_files_storage_access_key'])) {
|
502
|
+
throw new Error(`Bad parameter: azure_files_storage_access_key must be of type String, received ${getType(azure_files_storage_access_key)}`)
|
503
|
+
}
|
461
504
|
if (params['hostname'] && !isString(params['hostname'])) {
|
462
505
|
throw new Error(`Bad parameter: hostname must be of type String, received ${getType(hostname)}`)
|
463
506
|
}
|
@@ -527,6 +570,18 @@ class RemoteServer {
|
|
527
570
|
if (params['azure_blob_storage_container'] && !isString(params['azure_blob_storage_container'])) {
|
528
571
|
throw new Error(`Bad parameter: azure_blob_storage_container must be of type String, received ${getType(azure_blob_storage_container)}`)
|
529
572
|
}
|
573
|
+
if (params['azure_blob_storage_sas_token'] && !isString(params['azure_blob_storage_sas_token'])) {
|
574
|
+
throw new Error(`Bad parameter: azure_blob_storage_sas_token must be of type String, received ${getType(azure_blob_storage_sas_token)}`)
|
575
|
+
}
|
576
|
+
if (params['azure_files_storage_account'] && !isString(params['azure_files_storage_account'])) {
|
577
|
+
throw new Error(`Bad parameter: azure_files_storage_account must be of type String, received ${getType(azure_files_storage_account)}`)
|
578
|
+
}
|
579
|
+
if (params['azure_files_share_name'] && !isString(params['azure_files_share_name'])) {
|
580
|
+
throw new Error(`Bad parameter: azure_files_share_name must be of type String, received ${getType(azure_files_share_name)}`)
|
581
|
+
}
|
582
|
+
if (params['azure_files_sas_token'] && !isString(params['azure_files_sas_token'])) {
|
583
|
+
throw new Error(`Bad parameter: azure_files_sas_token must be of type String, received ${getType(azure_files_sas_token)}`)
|
584
|
+
}
|
530
585
|
if (params['s3_compatible_bucket'] && !isString(params['s3_compatible_bucket'])) {
|
531
586
|
throw new Error(`Bad parameter: s3_compatible_bucket must be of type String, received ${getType(s3_compatible_bucket)}`)
|
532
587
|
}
|
@@ -655,6 +710,7 @@ class RemoteServer {
|
|
655
710
|
// rackspace_api_key - string - Rackspace API key from the Rackspace Cloud Control Panel.
|
656
711
|
// reset_authentication - boolean - Reset authenticated account
|
657
712
|
// azure_blob_storage_access_key - string - Azure Blob Storage secret key.
|
713
|
+
// azure_files_storage_access_key - string - Azure File Storage access key.
|
658
714
|
// hostname - string - Hostname or IP address
|
659
715
|
// name - string - Internal name for your reference
|
660
716
|
// max_connections - int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
|
@@ -678,6 +734,10 @@ class RemoteServer {
|
|
678
734
|
// one_drive_account_type - string - Either personal or business_other account types
|
679
735
|
// azure_blob_storage_account - string - Azure Blob Storage Account name
|
680
736
|
// azure_blob_storage_container - string - Azure Blob Storage Container name
|
737
|
+
// azure_blob_storage_sas_token - string - Shared Access Signature (SAS) token
|
738
|
+
// azure_files_storage_account - string - Azure File Storage Account name
|
739
|
+
// azure_files_share_name - string - Azure File Storage Share name
|
740
|
+
// azure_files_sas_token - string - Shared Access Signature (SAS) token
|
681
741
|
// s3_compatible_bucket - string - S3-compatible Bucket name
|
682
742
|
// s3_compatible_endpoint - string - S3-compatible endpoint
|
683
743
|
// s3_compatible_region - string - S3-compatible endpoint
|
@@ -733,6 +793,10 @@ class RemoteServer {
|
|
733
793
|
throw new Error(`Bad parameter: azure_blob_storage_access_key must be of type String, received ${getType(azure_blob_storage_access_key)}`)
|
734
794
|
}
|
735
795
|
|
796
|
+
if (params['azure_files_storage_access_key'] && !isString(params['azure_files_storage_access_key'])) {
|
797
|
+
throw new Error(`Bad parameter: azure_files_storage_access_key must be of type String, received ${getType(azure_files_storage_access_key)}`)
|
798
|
+
}
|
799
|
+
|
736
800
|
if (params['hostname'] && !isString(params['hostname'])) {
|
737
801
|
throw new Error(`Bad parameter: hostname must be of type String, received ${getType(hostname)}`)
|
738
802
|
}
|
@@ -825,6 +889,22 @@ class RemoteServer {
|
|
825
889
|
throw new Error(`Bad parameter: azure_blob_storage_container must be of type String, received ${getType(azure_blob_storage_container)}`)
|
826
890
|
}
|
827
891
|
|
892
|
+
if (params['azure_blob_storage_sas_token'] && !isString(params['azure_blob_storage_sas_token'])) {
|
893
|
+
throw new Error(`Bad parameter: azure_blob_storage_sas_token must be of type String, received ${getType(azure_blob_storage_sas_token)}`)
|
894
|
+
}
|
895
|
+
|
896
|
+
if (params['azure_files_storage_account'] && !isString(params['azure_files_storage_account'])) {
|
897
|
+
throw new Error(`Bad parameter: azure_files_storage_account must be of type String, received ${getType(azure_files_storage_account)}`)
|
898
|
+
}
|
899
|
+
|
900
|
+
if (params['azure_files_share_name'] && !isString(params['azure_files_share_name'])) {
|
901
|
+
throw new Error(`Bad parameter: azure_files_share_name must be of type String, received ${getType(azure_files_share_name)}`)
|
902
|
+
}
|
903
|
+
|
904
|
+
if (params['azure_files_sas_token'] && !isString(params['azure_files_sas_token'])) {
|
905
|
+
throw new Error(`Bad parameter: azure_files_sas_token must be of type String, received ${getType(azure_files_sas_token)}`)
|
906
|
+
}
|
907
|
+
|
828
908
|
if (params['s3_compatible_bucket'] && !isString(params['s3_compatible_bucket'])) {
|
829
909
|
throw new Error(`Bad parameter: s3_compatible_bucket must be of type String, received ${getType(s3_compatible_bucket)}`)
|
830
910
|
}
|
package/src/models/Site.js
CHANGED
@@ -40,6 +40,9 @@ class Site {
|
|
40
40
|
// boolean # Is yubikey two factor authentication allowed?
|
41
41
|
getAllowed2faMethodYubi = () => this.attributes.allowed_2fa_method_yubi
|
42
42
|
|
43
|
+
// boolean # Are users allowed to configure their two factor authentication to be bypassed for FTP/SFTP/WebDAV?
|
44
|
+
getAllowed2faMethodBypassForFtpSftpDav = () => this.attributes.allowed_2fa_method_bypass_for_ftp_sftp_dav
|
45
|
+
|
43
46
|
// int64 # User ID for the main site administrator
|
44
47
|
getAdminUserId = () => this.attributes.admin_user_id
|
45
48
|
|
@@ -491,6 +494,7 @@ class Site {
|
|
491
494
|
// allowed_2fa_method_totp - boolean - Is TOTP two factor authentication allowed?
|
492
495
|
// allowed_2fa_method_webauthn - boolean - Is WebAuthn two factor authentication allowed?
|
493
496
|
// allowed_2fa_method_yubi - boolean - Is yubikey two factor authentication allowed?
|
497
|
+
// allowed_2fa_method_bypass_for_ftp_sftp_dav - boolean - Are users allowed to configure their two factor authentication to be bypassed for FTP/SFTP/WebDAV?
|
494
498
|
// require_2fa - boolean - Require two-factor authentication for all users?
|
495
499
|
// require_2fa_user_type - string - What type of user is required to use two-factor authentication (when require_2fa is set to `true` for this site)?
|
496
500
|
// color2_top - string - Top bar background color
|