files.com 1.2.310 → 1.2.311
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 +3 -3
- package/docs/models/ChildSiteManagementPolicy.md +53 -27
- package/docs/models/HistoryExport.md +2 -2
- package/docs/models/HistoryExportResult.md +1 -1
- package/docs/models/Site.md +3 -5
- package/lib/Files.js +1 -1
- package/lib/models/Automation.js +3 -3
- package/lib/models/ChildSiteManagementPolicy.js +88 -72
- package/lib/models/HistoryExport.js +2 -2
- package/lib/models/HistoryExportResult.js +1 -1
- package/lib/models/Site.js +4 -4
- package/package.json +1 -1
- package/src/Files.js +1 -1
- package/src/models/Automation.js +3 -3
- package/src/models/ChildSiteManagementPolicy.js +72 -52
- package/src/models/HistoryExport.js +2 -2
- package/src/models/HistoryExportResult.js +1 -1
- package/src/models/Site.js +3 -3
package/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.311
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
* `source` (string): Source path/glob. See Automation docs for exact description, but this is used to filter for files in the `path` to find files to operate on. Supports globs, except on remote mounts.
|
|
129
129
|
* `legacy_sync_ids` (array(int64)): IDs of remote sync folder behaviors to run by this Automation
|
|
130
130
|
* `sync_ids` (array(int64)): IDs of syncs to run by this Automation. This is the new way to specify syncs, and it is recommended to use this instead of `legacy_sync_ids`.
|
|
131
|
-
* `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
|
|
131
|
+
* `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, archived_delete, copy
|
|
132
132
|
* `trigger` (string): How this automation is triggered to run.
|
|
133
133
|
* `user_id` (int64): User ID of the Automation's creator.
|
|
134
134
|
* `user_ids` (array(int64)): IDs of Users for the Automation (i.e. who to Request File from)
|
|
@@ -243,7 +243,7 @@ await Automation.create({
|
|
|
243
243
|
* `retry_on_failure_interval_in_minutes` (int64): If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
|
|
244
244
|
* `retry_on_failure_number_of_attempts` (int64): If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
|
|
245
245
|
* `trigger` (string): How this automation is triggered to run.
|
|
246
|
-
* `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
|
|
246
|
+
* `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, archived_delete, copy
|
|
247
247
|
* `value` (object): A Hash of attributes specific to the automation type.
|
|
248
248
|
* `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`.
|
|
249
249
|
* `automation` (string): Required - Automation type
|
|
@@ -339,7 +339,7 @@ await automation.update({
|
|
|
339
339
|
* `retry_on_failure_interval_in_minutes` (int64): If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
|
|
340
340
|
* `retry_on_failure_number_of_attempts` (int64): If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
|
|
341
341
|
* `trigger` (string): How this automation is triggered to run.
|
|
342
|
-
* `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
|
|
342
|
+
* `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, archived_delete, copy
|
|
343
343
|
* `value` (object): A Hash of attributes specific to the automation type.
|
|
344
344
|
* `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`.
|
|
345
345
|
* `automation` (string): Automation type
|
|
@@ -5,21 +5,32 @@
|
|
|
5
5
|
```
|
|
6
6
|
{
|
|
7
7
|
"id": 1,
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
8
|
+
"policy_type": "settings",
|
|
9
|
+
"name": "example",
|
|
10
|
+
"description": "example",
|
|
11
|
+
"value": "{ \"color2_left\": \"#000000\" }",
|
|
12
|
+
"applied_child_site_ids": [
|
|
13
|
+
1,
|
|
14
|
+
2
|
|
15
|
+
],
|
|
11
16
|
"skip_child_site_ids": [
|
|
12
17
|
1,
|
|
13
|
-
|
|
14
|
-
]
|
|
18
|
+
2
|
|
19
|
+
],
|
|
20
|
+
"created_at": "2000-01-01T01:00:00Z",
|
|
21
|
+
"updated_at": "2000-01-01T01:00:00Z"
|
|
15
22
|
}
|
|
16
23
|
```
|
|
17
24
|
|
|
18
|
-
* `id` (int64):
|
|
19
|
-
* `
|
|
20
|
-
* `
|
|
21
|
-
* `
|
|
22
|
-
* `
|
|
25
|
+
* `id` (int64): Policy ID.
|
|
26
|
+
* `policy_type` (string): Type of policy. Valid values: `settings`.
|
|
27
|
+
* `name` (string): Name for this policy.
|
|
28
|
+
* `description` (string): Description for this policy.
|
|
29
|
+
* `value` (object): Policy configuration data. Attributes differ by policy type. For more information, refer to the Value Hash section of the developer documentation.
|
|
30
|
+
* `applied_child_site_ids` (array(int64)): IDs of child sites that this policy has been applied to. This field is read-only.
|
|
31
|
+
* `skip_child_site_ids` (array(int64)): IDs of child sites that this policy has been exempted from. If `skip_child_site_ids` is empty, the policy will be applied to all child sites. To apply a policy to a child site that has been exempted, remove it from `skip_child_site_ids` or set it to an empty array (`[]`).
|
|
32
|
+
* `created_at` (date-time): When this policy was created.
|
|
33
|
+
* `updated_at` (date-time): When this policy was last updated.
|
|
23
34
|
|
|
24
35
|
---
|
|
25
36
|
|
|
@@ -54,18 +65,22 @@ await ChildSiteManagementPolicy.find(id)
|
|
|
54
65
|
|
|
55
66
|
```
|
|
56
67
|
await ChildSiteManagementPolicy.create({
|
|
57
|
-
'
|
|
58
|
-
'
|
|
59
|
-
'
|
|
68
|
+
'value': "{ \"color2_left\": \"#000000\" }",
|
|
69
|
+
'skip_child_site_ids': [1,2],
|
|
70
|
+
'policy_type': "settings",
|
|
71
|
+
'name': "example",
|
|
72
|
+
'description': "example",
|
|
60
73
|
})
|
|
61
74
|
```
|
|
62
75
|
|
|
63
76
|
|
|
64
77
|
### Parameters
|
|
65
78
|
|
|
66
|
-
* `
|
|
67
|
-
* `
|
|
68
|
-
* `
|
|
79
|
+
* `value` (string):
|
|
80
|
+
* `skip_child_site_ids` (array(int64)): IDs of child sites that this policy has been exempted from. If `skip_child_site_ids` is empty, the policy will be applied to all child sites. To apply a policy to a child site that has been exempted, remove it from `skip_child_site_ids` or set it to an empty array (`[]`).
|
|
81
|
+
* `policy_type` (string): Required - Type of policy. Valid values: `settings`.
|
|
82
|
+
* `name` (string): Name for this policy.
|
|
83
|
+
* `description` (string): Description for this policy.
|
|
69
84
|
|
|
70
85
|
---
|
|
71
86
|
|
|
@@ -75,31 +90,42 @@ await ChildSiteManagementPolicy.create({
|
|
|
75
90
|
const child_site_management_policy = await ChildSiteManagementPolicy.find(id)
|
|
76
91
|
|
|
77
92
|
await child_site_management_policy.update({
|
|
78
|
-
'
|
|
79
|
-
'
|
|
80
|
-
'
|
|
93
|
+
'value': "{ \"color2_left\": \"#000000\" }",
|
|
94
|
+
'skip_child_site_ids': [1,2],
|
|
95
|
+
'policy_type': "settings",
|
|
96
|
+
'name': "example",
|
|
97
|
+
'description': "example",
|
|
81
98
|
})
|
|
82
99
|
```
|
|
83
100
|
|
|
84
101
|
### Parameters
|
|
85
102
|
|
|
86
103
|
* `id` (int64): Required - Child Site Management Policy ID.
|
|
87
|
-
* `
|
|
88
|
-
* `
|
|
89
|
-
* `
|
|
104
|
+
* `value` (string):
|
|
105
|
+
* `skip_child_site_ids` (array(int64)): IDs of child sites that this policy has been exempted from. If `skip_child_site_ids` is empty, the policy will be applied to all child sites. To apply a policy to a child site that has been exempted, remove it from `skip_child_site_ids` or set it to an empty array (`[]`).
|
|
106
|
+
* `policy_type` (string): Type of policy. Valid values: `settings`.
|
|
107
|
+
* `name` (string): Name for this policy.
|
|
108
|
+
* `description` (string): Description for this policy.
|
|
90
109
|
|
|
91
110
|
### Example Response
|
|
92
111
|
|
|
93
112
|
```json
|
|
94
113
|
{
|
|
95
114
|
"id": 1,
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
115
|
+
"policy_type": "settings",
|
|
116
|
+
"name": "example",
|
|
117
|
+
"description": "example",
|
|
118
|
+
"value": "{ \"color2_left\": \"#000000\" }",
|
|
119
|
+
"applied_child_site_ids": [
|
|
120
|
+
1,
|
|
121
|
+
2
|
|
122
|
+
],
|
|
99
123
|
"skip_child_site_ids": [
|
|
100
124
|
1,
|
|
101
|
-
|
|
102
|
-
]
|
|
125
|
+
2
|
|
126
|
+
],
|
|
127
|
+
"created_at": "2000-01-01T01:00:00Z",
|
|
128
|
+
"updated_at": "2000-01-01T01:00:00Z"
|
|
103
129
|
}
|
|
104
130
|
```
|
|
105
131
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* `start_at` (date-time): Start date/time of export range.
|
|
38
38
|
* `end_at` (date-time): End date/time of export range.
|
|
39
39
|
* `status` (string): Status of export. Will be: `building`, `ready`, or `failed`
|
|
40
|
-
* `query_action` (string): Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
|
|
40
|
+
* `query_action` (string): Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`, `archived_delete`
|
|
41
41
|
* `query_interface` (string): Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`, `as2`, `inbound_email`, `remote`
|
|
42
42
|
* `query_user_id` (string): Return results that are actions performed by the user indicated by this User ID
|
|
43
43
|
* `query_file_id` (string): Return results that are file actions related to the file indicated by this File ID
|
|
@@ -109,7 +109,7 @@ await HistoryExport.create({
|
|
|
109
109
|
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
|
110
110
|
* `start_at` (string): Start date/time of export range.
|
|
111
111
|
* `end_at` (string): End date/time of export range.
|
|
112
|
-
* `query_action` (string): Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
|
|
112
|
+
* `query_action` (string): Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`, `archived_delete`
|
|
113
113
|
* `query_interface` (string): Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`, `as2`, `inbound_email`, `remote`
|
|
114
114
|
* `query_user_id` (string): Return results that are actions performed by the user indicated by this User ID
|
|
115
115
|
* `query_file_id` (string): Return results that are file actions related to the file indicated by this File ID
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* `ip` (string): Client IP that performed the action
|
|
47
47
|
* `username` (string): Username of the user that performed the action
|
|
48
48
|
* `user_is_from_parent_site` (boolean): true if this change was performed by a user on a parent site.
|
|
49
|
-
* `action` (string): What action was taken. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
|
|
49
|
+
* `action` (string): What action was taken. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`, `archived_delete`
|
|
50
50
|
* `failure_type` (string): The type of login failure, if applicable. Valid values: `expired_trial`, `account_overdue`, `locked_out`, `ip_mismatch`, `password_mismatch`, `site_mismatch`, `username_not_found`, `none`, `no_ftp_permission`, `no_web_permission`, `no_directory`, `errno_enoent`, `no_sftp_permission`, `no_dav_permission`, `no_restapi_permission`, `key_mismatch`, `region_mismatch`, `expired_access`, `desktop_ip_mismatch`, `desktop_api_key_not_used_quickly_enough`, `disabled`, `country_mismatch`, `insecure_ftp`, `insecure_cipher`, `rate_limited`
|
|
51
51
|
* `interface` (string): Interface through which the action was taken. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`, `as2`, `inbound_email`, `remote`
|
|
52
52
|
* `target_id` (int64): ID of the object (such as Users, or API Keys) on which the action was taken
|
package/docs/models/Site.md
CHANGED
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
"uri": "https://mysite.files.com/.../my_image.png"
|
|
131
131
|
},
|
|
132
132
|
"max_prior_passwords": 1,
|
|
133
|
+
"managed_site_settings": "example",
|
|
133
134
|
"motd_text": "example",
|
|
134
135
|
"motd_use_for_ftp": true,
|
|
135
136
|
"motd_use_for_sftp": true,
|
|
@@ -300,10 +301,7 @@
|
|
|
300
301
|
"welcome_email_enabled": true,
|
|
301
302
|
"welcome_screen": "user_controlled",
|
|
302
303
|
"windows_mode_ftp": true,
|
|
303
|
-
"group_admins_can_set_user_password": true
|
|
304
|
-
"managed_site_settings": [
|
|
305
|
-
"example"
|
|
306
|
-
]
|
|
304
|
+
"group_admins_can_set_user_password": true
|
|
307
305
|
}
|
|
308
306
|
```
|
|
309
307
|
|
|
@@ -406,6 +404,7 @@
|
|
|
406
404
|
* `logo` (Image): Branded logo
|
|
407
405
|
* `login_page_background_image` (Image): Branded login page background
|
|
408
406
|
* `max_prior_passwords` (int64): Number of prior passwords to disallow
|
|
407
|
+
* `managed_site_settings` (object): List of site settings managed by the parent site
|
|
409
408
|
* `motd_text` (string): A message to show users when they connect via FTP or SFTP.
|
|
410
409
|
* `motd_use_for_ftp` (boolean): Show message to users connecting via FTP
|
|
411
410
|
* `motd_use_for_sftp` (boolean): Show message to users connecting via SFTP
|
|
@@ -478,7 +477,6 @@
|
|
|
478
477
|
* `welcome_screen` (string): Does the welcome screen appear?
|
|
479
478
|
* `windows_mode_ftp` (boolean): Does FTP user Windows emulation mode?
|
|
480
479
|
* `group_admins_can_set_user_password` (boolean): Allow group admins set password authentication method
|
|
481
|
-
* `managed_site_settings` (array(string)): List of site settings managed by the parent site
|
|
482
480
|
|
|
483
481
|
---
|
|
484
482
|
|
package/lib/Files.js
CHANGED
|
@@ -12,7 +12,7 @@ var apiKey;
|
|
|
12
12
|
var baseUrl = 'https://app.files.com';
|
|
13
13
|
var sessionId = null;
|
|
14
14
|
var language = null;
|
|
15
|
-
var version = '1.2.
|
|
15
|
+
var version = '1.2.311';
|
|
16
16
|
var userAgent = "Files.com JavaScript SDK v".concat(version);
|
|
17
17
|
var logLevel = _Logger.LogLevel.INFO;
|
|
18
18
|
var debugRequest = false;
|
package/lib/models/Automation.js
CHANGED
|
@@ -263,7 +263,7 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
|
263
263
|
(0, _defineProperty2.default)(this, "setSyncIds", function (value) {
|
|
264
264
|
_this.attributes.sync_ids = value;
|
|
265
265
|
});
|
|
266
|
-
// 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
|
|
266
|
+
// 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, archived_delete, copy
|
|
267
267
|
(0, _defineProperty2.default)(this, "getTriggerActions", function () {
|
|
268
268
|
return _this.attributes.trigger_actions;
|
|
269
269
|
});
|
|
@@ -391,7 +391,7 @@ var Automation = /*#__PURE__*/(0, _createClass2.default)(function Automation() {
|
|
|
391
391
|
// retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
|
|
392
392
|
// retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
|
|
393
393
|
// trigger - string - How this automation is triggered to run.
|
|
394
|
-
// 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
|
|
394
|
+
// 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, archived_delete, copy
|
|
395
395
|
// value - object - A Hash of attributes specific to the automation type.
|
|
396
396
|
// 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`.
|
|
397
397
|
// automation - string - Automation type
|
|
@@ -823,7 +823,7 @@ _Automation = Automation;
|
|
|
823
823
|
// retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
|
|
824
824
|
// retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
|
|
825
825
|
// trigger - string - How this automation is triggered to run.
|
|
826
|
-
// 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
|
|
826
|
+
// 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, archived_delete, copy
|
|
827
827
|
// value - object - A Hash of attributes specific to the automation type.
|
|
828
828
|
// 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`.
|
|
829
829
|
// automation (required) - string - Automation type
|
|
@@ -32,45 +32,69 @@ var ChildSiteManagementPolicy = /*#__PURE__*/(0, _createClass2.default)(function
|
|
|
32
32
|
(0, _defineProperty2.default)(this, "isLoaded", function () {
|
|
33
33
|
return !!_this.attributes.id;
|
|
34
34
|
});
|
|
35
|
-
// int64 #
|
|
35
|
+
// int64 # Policy ID.
|
|
36
36
|
(0, _defineProperty2.default)(this, "getId", function () {
|
|
37
37
|
return _this.attributes.id;
|
|
38
38
|
});
|
|
39
39
|
(0, _defineProperty2.default)(this, "setId", function (value) {
|
|
40
40
|
_this.attributes.id = value;
|
|
41
41
|
});
|
|
42
|
-
//
|
|
43
|
-
(0, _defineProperty2.default)(this, "
|
|
44
|
-
return _this.attributes.
|
|
42
|
+
// string # Type of policy. Valid values: `settings`.
|
|
43
|
+
(0, _defineProperty2.default)(this, "getPolicyType", function () {
|
|
44
|
+
return _this.attributes.policy_type;
|
|
45
45
|
});
|
|
46
|
-
(0, _defineProperty2.default)(this, "
|
|
47
|
-
_this.attributes.
|
|
46
|
+
(0, _defineProperty2.default)(this, "setPolicyType", function (value) {
|
|
47
|
+
_this.attributes.policy_type = value;
|
|
48
48
|
});
|
|
49
|
-
// string #
|
|
50
|
-
(0, _defineProperty2.default)(this, "
|
|
51
|
-
return _this.attributes.
|
|
49
|
+
// string # Name for this policy.
|
|
50
|
+
(0, _defineProperty2.default)(this, "getName", function () {
|
|
51
|
+
return _this.attributes.name;
|
|
52
52
|
});
|
|
53
|
-
(0, _defineProperty2.default)(this, "
|
|
54
|
-
_this.attributes.
|
|
53
|
+
(0, _defineProperty2.default)(this, "setName", function (value) {
|
|
54
|
+
_this.attributes.name = value;
|
|
55
55
|
});
|
|
56
|
-
// string #
|
|
57
|
-
(0, _defineProperty2.default)(this, "
|
|
58
|
-
return _this.attributes.
|
|
56
|
+
// string # Description for this policy.
|
|
57
|
+
(0, _defineProperty2.default)(this, "getDescription", function () {
|
|
58
|
+
return _this.attributes.description;
|
|
59
59
|
});
|
|
60
|
-
(0, _defineProperty2.default)(this, "
|
|
61
|
-
_this.attributes.
|
|
60
|
+
(0, _defineProperty2.default)(this, "setDescription", function (value) {
|
|
61
|
+
_this.attributes.description = value;
|
|
62
62
|
});
|
|
63
|
-
//
|
|
63
|
+
// object # Policy configuration data. Attributes differ by policy type. For more information, refer to the Value Hash section of the developer documentation.
|
|
64
|
+
(0, _defineProperty2.default)(this, "getValue", function () {
|
|
65
|
+
return _this.attributes.value;
|
|
66
|
+
});
|
|
67
|
+
(0, _defineProperty2.default)(this, "setValue", function (value) {
|
|
68
|
+
_this.attributes.value = value;
|
|
69
|
+
});
|
|
70
|
+
// array(int64) # IDs of child sites that this policy has been applied to. This field is read-only.
|
|
71
|
+
(0, _defineProperty2.default)(this, "getAppliedChildSiteIds", function () {
|
|
72
|
+
return _this.attributes.applied_child_site_ids;
|
|
73
|
+
});
|
|
74
|
+
(0, _defineProperty2.default)(this, "setAppliedChildSiteIds", function (value) {
|
|
75
|
+
_this.attributes.applied_child_site_ids = value;
|
|
76
|
+
});
|
|
77
|
+
// array(int64) # IDs of child sites that this policy has been exempted from. If `skip_child_site_ids` is empty, the policy will be applied to all child sites. To apply a policy to a child site that has been exempted, remove it from `skip_child_site_ids` or set it to an empty array (`[]`).
|
|
64
78
|
(0, _defineProperty2.default)(this, "getSkipChildSiteIds", function () {
|
|
65
79
|
return _this.attributes.skip_child_site_ids;
|
|
66
80
|
});
|
|
67
81
|
(0, _defineProperty2.default)(this, "setSkipChildSiteIds", function (value) {
|
|
68
82
|
_this.attributes.skip_child_site_ids = value;
|
|
69
83
|
});
|
|
84
|
+
// date-time # When this policy was created.
|
|
85
|
+
(0, _defineProperty2.default)(this, "getCreatedAt", function () {
|
|
86
|
+
return _this.attributes.created_at;
|
|
87
|
+
});
|
|
88
|
+
// date-time # When this policy was last updated.
|
|
89
|
+
(0, _defineProperty2.default)(this, "getUpdatedAt", function () {
|
|
90
|
+
return _this.attributes.updated_at;
|
|
91
|
+
});
|
|
70
92
|
// Parameters:
|
|
71
|
-
//
|
|
72
|
-
//
|
|
73
|
-
//
|
|
93
|
+
// value - string
|
|
94
|
+
// skip_child_site_ids - array(int64) - IDs of child sites that this policy has been exempted from. If `skip_child_site_ids` is empty, the policy will be applied to all child sites. To apply a policy to a child site that has been exempted, remove it from `skip_child_site_ids` or set it to an empty array (`[]`).
|
|
95
|
+
// policy_type - string - Type of policy. Valid values: `settings`.
|
|
96
|
+
// name - string - Name for this policy.
|
|
97
|
+
// description - string - Description for this policy.
|
|
74
98
|
(0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
75
99
|
var params,
|
|
76
100
|
response,
|
|
@@ -98,72 +122,56 @@ var ChildSiteManagementPolicy = /*#__PURE__*/(0, _createClass2.default)(function
|
|
|
98
122
|
}
|
|
99
123
|
throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
|
|
100
124
|
case 3:
|
|
101
|
-
if (!(params.
|
|
125
|
+
if (!(params.value && !(0, _utils.isString)(params.value))) {
|
|
102
126
|
_context.next = 4;
|
|
103
127
|
break;
|
|
104
128
|
}
|
|
105
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
129
|
+
throw new errors.InvalidParameterError("Bad parameter: value must be of type String, received ".concat((0, _utils.getType)(params.value)));
|
|
106
130
|
case 4:
|
|
107
|
-
if (!(params.
|
|
131
|
+
if (!(params.skip_child_site_ids && !(0, _utils.isArray)(params.skip_child_site_ids))) {
|
|
108
132
|
_context.next = 5;
|
|
109
133
|
break;
|
|
110
134
|
}
|
|
111
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
135
|
+
throw new errors.InvalidParameterError("Bad parameter: skip_child_site_ids must be of type Array, received ".concat((0, _utils.getType)(params.skip_child_site_ids)));
|
|
112
136
|
case 5:
|
|
113
|
-
if (!(params.
|
|
137
|
+
if (!(params.policy_type && !(0, _utils.isString)(params.policy_type))) {
|
|
114
138
|
_context.next = 6;
|
|
115
139
|
break;
|
|
116
140
|
}
|
|
117
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
141
|
+
throw new errors.InvalidParameterError("Bad parameter: policy_type must be of type String, received ".concat((0, _utils.getType)(params.policy_type)));
|
|
118
142
|
case 6:
|
|
119
|
-
if (params.
|
|
120
|
-
_context.next = 8;
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
123
|
-
if (!_this.attributes.id) {
|
|
143
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
|
124
144
|
_context.next = 7;
|
|
125
145
|
break;
|
|
126
146
|
}
|
|
127
|
-
|
|
128
|
-
_context.next = 8;
|
|
129
|
-
break;
|
|
147
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
|
130
148
|
case 7:
|
|
131
|
-
|
|
149
|
+
if (!(params.description && !(0, _utils.isString)(params.description))) {
|
|
150
|
+
_context.next = 8;
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
|
|
132
154
|
case 8:
|
|
133
|
-
if (params.
|
|
155
|
+
if (params.id) {
|
|
134
156
|
_context.next = 10;
|
|
135
157
|
break;
|
|
136
158
|
}
|
|
137
|
-
if (!_this.attributes.
|
|
159
|
+
if (!_this.attributes.id) {
|
|
138
160
|
_context.next = 9;
|
|
139
161
|
break;
|
|
140
162
|
}
|
|
141
|
-
params.
|
|
163
|
+
params.id = _this.id;
|
|
142
164
|
_context.next = 10;
|
|
143
165
|
break;
|
|
144
166
|
case 9:
|
|
145
|
-
throw new errors.MissingParameterError('Parameter missing:
|
|
167
|
+
throw new errors.MissingParameterError('Parameter missing: id');
|
|
146
168
|
case 10:
|
|
147
|
-
|
|
148
|
-
_context.next = 12;
|
|
149
|
-
break;
|
|
150
|
-
}
|
|
151
|
-
if (!_this.attributes.managed_value) {
|
|
152
|
-
_context.next = 11;
|
|
153
|
-
break;
|
|
154
|
-
}
|
|
155
|
-
params.managed_value = _this.managed_value;
|
|
156
|
-
_context.next = 12;
|
|
157
|
-
break;
|
|
158
|
-
case 11:
|
|
159
|
-
throw new errors.MissingParameterError('Parameter missing: managed_value');
|
|
160
|
-
case 12:
|
|
161
|
-
_context.next = 13;
|
|
169
|
+
_context.next = 11;
|
|
162
170
|
return _Api.default.sendRequest("/child_site_management_policies/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
|
|
163
|
-
case
|
|
171
|
+
case 11:
|
|
164
172
|
response = _context.sent;
|
|
165
173
|
return _context.abrupt("return", new ChildSiteManagementPolicy(response === null || response === void 0 ? void 0 : response.data, _this.options));
|
|
166
|
-
case
|
|
174
|
+
case 12:
|
|
167
175
|
case "end":
|
|
168
176
|
return _context.stop();
|
|
169
177
|
}
|
|
@@ -360,9 +368,11 @@ _ChildSiteManagementPolicy = ChildSiteManagementPolicy;
|
|
|
360
368
|
return _ChildSiteManagementPolicy.find(id, params, options);
|
|
361
369
|
});
|
|
362
370
|
// Parameters:
|
|
363
|
-
//
|
|
364
|
-
//
|
|
365
|
-
//
|
|
371
|
+
// value - string
|
|
372
|
+
// skip_child_site_ids - array(int64) - IDs of child sites that this policy has been exempted from. If `skip_child_site_ids` is empty, the policy will be applied to all child sites. To apply a policy to a child site that has been exempted, remove it from `skip_child_site_ids` or set it to an empty array (`[]`).
|
|
373
|
+
// policy_type (required) - string - Type of policy. Valid values: `settings`.
|
|
374
|
+
// name - string - Name for this policy.
|
|
375
|
+
// description - string - Description for this policy.
|
|
366
376
|
(0, _defineProperty2.default)(ChildSiteManagementPolicy, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
367
377
|
var params,
|
|
368
378
|
options,
|
|
@@ -373,42 +383,48 @@ _ChildSiteManagementPolicy = ChildSiteManagementPolicy;
|
|
|
373
383
|
case 0:
|
|
374
384
|
params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
375
385
|
options = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
|
|
376
|
-
if (params.
|
|
386
|
+
if (params.policy_type) {
|
|
377
387
|
_context6.next = 1;
|
|
378
388
|
break;
|
|
379
389
|
}
|
|
380
|
-
throw new errors.MissingParameterError('Parameter missing:
|
|
390
|
+
throw new errors.MissingParameterError('Parameter missing: policy_type');
|
|
381
391
|
case 1:
|
|
382
|
-
if (params.
|
|
392
|
+
if (!(params.value && !(0, _utils.isString)(params.value))) {
|
|
383
393
|
_context6.next = 2;
|
|
384
394
|
break;
|
|
385
395
|
}
|
|
386
|
-
throw new errors.
|
|
396
|
+
throw new errors.InvalidParameterError("Bad parameter: value must be of type String, received ".concat((0, _utils.getType)(params.value)));
|
|
387
397
|
case 2:
|
|
388
|
-
if (!(params.
|
|
398
|
+
if (!(params.skip_child_site_ids && !(0, _utils.isArray)(params.skip_child_site_ids))) {
|
|
389
399
|
_context6.next = 3;
|
|
390
400
|
break;
|
|
391
401
|
}
|
|
392
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
402
|
+
throw new errors.InvalidParameterError("Bad parameter: skip_child_site_ids must be of type Array, received ".concat((0, _utils.getType)(params.skip_child_site_ids)));
|
|
393
403
|
case 3:
|
|
394
|
-
if (!(params.
|
|
404
|
+
if (!(params.policy_type && !(0, _utils.isString)(params.policy_type))) {
|
|
395
405
|
_context6.next = 4;
|
|
396
406
|
break;
|
|
397
407
|
}
|
|
398
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
408
|
+
throw new errors.InvalidParameterError("Bad parameter: policy_type must be of type String, received ".concat((0, _utils.getType)(params.policy_type)));
|
|
399
409
|
case 4:
|
|
400
|
-
if (!(params.
|
|
410
|
+
if (!(params.name && !(0, _utils.isString)(params.name))) {
|
|
401
411
|
_context6.next = 5;
|
|
402
412
|
break;
|
|
403
413
|
}
|
|
404
|
-
throw new errors.InvalidParameterError("Bad parameter:
|
|
414
|
+
throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
|
|
405
415
|
case 5:
|
|
406
|
-
|
|
407
|
-
|
|
416
|
+
if (!(params.description && !(0, _utils.isString)(params.description))) {
|
|
417
|
+
_context6.next = 6;
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
|
|
408
421
|
case 6:
|
|
422
|
+
_context6.next = 7;
|
|
423
|
+
return _Api.default.sendRequest('/child_site_management_policies', 'POST', params, options);
|
|
424
|
+
case 7:
|
|
409
425
|
response = _context6.sent;
|
|
410
426
|
return _context6.abrupt("return", new _ChildSiteManagementPolicy(response === null || response === void 0 ? void 0 : response.data, options));
|
|
411
|
-
case
|
|
427
|
+
case 8:
|
|
412
428
|
case "end":
|
|
413
429
|
return _context6.stop();
|
|
414
430
|
}
|
|
@@ -67,7 +67,7 @@ var HistoryExport = /*#__PURE__*/(0, _createClass2.default)(function HistoryExpo
|
|
|
67
67
|
(0, _defineProperty2.default)(this, "setStatus", function (value) {
|
|
68
68
|
_this.attributes.status = value;
|
|
69
69
|
});
|
|
70
|
-
// string # Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
|
|
70
|
+
// string # Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`, `archived_delete`
|
|
71
71
|
(0, _defineProperty2.default)(this, "getQueryAction", function () {
|
|
72
72
|
return _this.attributes.query_action;
|
|
73
73
|
});
|
|
@@ -307,7 +307,7 @@ _HistoryExport = HistoryExport;
|
|
|
307
307
|
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
308
308
|
// start_at - string - Start date/time of export range.
|
|
309
309
|
// end_at - string - End date/time of export range.
|
|
310
|
-
// query_action - string - Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
|
|
310
|
+
// query_action - string - Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`, `archived_delete`
|
|
311
311
|
// query_interface - string - Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`, `as2`, `inbound_email`, `remote`
|
|
312
312
|
// query_user_id - string - Return results that are actions performed by the user indicated by this User ID
|
|
313
313
|
// query_file_id - string - Return results that are file actions related to the file indicated by this File ID
|
|
@@ -84,7 +84,7 @@ var HistoryExportResult = /*#__PURE__*/(0, _createClass2.default)(function Histo
|
|
|
84
84
|
(0, _defineProperty2.default)(this, "getUserIsFromParentSite", function () {
|
|
85
85
|
return _this.attributes.user_is_from_parent_site;
|
|
86
86
|
});
|
|
87
|
-
// string # What action was taken. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
|
|
87
|
+
// string # What action was taken. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`, `archived_delete`
|
|
88
88
|
(0, _defineProperty2.default)(this, "getAction", function () {
|
|
89
89
|
return _this.attributes.action;
|
|
90
90
|
});
|
package/lib/models/Site.js
CHANGED
|
@@ -428,6 +428,10 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
|
|
|
428
428
|
(0, _defineProperty2.default)(this, "getMaxPriorPasswords", function () {
|
|
429
429
|
return _this.attributes.max_prior_passwords;
|
|
430
430
|
});
|
|
431
|
+
// object # List of site settings managed by the parent site
|
|
432
|
+
(0, _defineProperty2.default)(this, "getManagedSiteSettings", function () {
|
|
433
|
+
return _this.attributes.managed_site_settings;
|
|
434
|
+
});
|
|
431
435
|
// string # A message to show users when they connect via FTP or SFTP.
|
|
432
436
|
(0, _defineProperty2.default)(this, "getMotdText", function () {
|
|
433
437
|
return _this.attributes.motd_text;
|
|
@@ -716,10 +720,6 @@ var Site = /*#__PURE__*/(0, _createClass2.default)(function Site() {
|
|
|
716
720
|
(0, _defineProperty2.default)(this, "getGroupAdminsCanSetUserPassword", function () {
|
|
717
721
|
return _this.attributes.group_admins_can_set_user_password;
|
|
718
722
|
});
|
|
719
|
-
// array(string) # List of site settings managed by the parent site
|
|
720
|
-
(0, _defineProperty2.default)(this, "getManagedSiteSettings", function () {
|
|
721
|
-
return _this.attributes.managed_site_settings;
|
|
722
|
-
});
|
|
723
723
|
Object.entries(attributes).forEach(function (_ref) {
|
|
724
724
|
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
725
725
|
key = _ref2[0],
|
package/package.json
CHANGED
package/src/Files.js
CHANGED
package/src/models/Automation.js
CHANGED
|
@@ -259,7 +259,7 @@ class Automation {
|
|
|
259
259
|
this.attributes.sync_ids = value
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
// 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
|
|
262
|
+
// 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, archived_delete, copy
|
|
263
263
|
getTriggerActions = () => this.attributes.trigger_actions
|
|
264
264
|
|
|
265
265
|
setTriggerActions = value => {
|
|
@@ -364,7 +364,7 @@ class Automation {
|
|
|
364
364
|
// retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
|
|
365
365
|
// retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
|
|
366
366
|
// trigger - string - How this automation is triggered to run.
|
|
367
|
-
// 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
|
|
367
|
+
// 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, archived_delete, copy
|
|
368
368
|
// value - object - A Hash of attributes specific to the automation type.
|
|
369
369
|
// 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`.
|
|
370
370
|
// automation - string - Automation type
|
|
@@ -616,7 +616,7 @@ class Automation {
|
|
|
616
616
|
// retry_on_failure_interval_in_minutes - int64 - If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
|
|
617
617
|
// retry_on_failure_number_of_attempts - int64 - If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
|
|
618
618
|
// trigger - string - How this automation is triggered to run.
|
|
619
|
-
// 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
|
|
619
|
+
// 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, archived_delete, copy
|
|
620
620
|
// value - object - A Hash of attributes specific to the automation type.
|
|
621
621
|
// 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`.
|
|
622
622
|
// automation (required) - string - Automation type
|
|
@@ -28,45 +28,67 @@ class ChildSiteManagementPolicy {
|
|
|
28
28
|
|
|
29
29
|
isLoaded = () => !!this.attributes.id
|
|
30
30
|
|
|
31
|
-
// int64 #
|
|
31
|
+
// int64 # Policy ID.
|
|
32
32
|
getId = () => this.attributes.id
|
|
33
33
|
|
|
34
34
|
setId = value => {
|
|
35
35
|
this.attributes.id = value
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
//
|
|
39
|
-
|
|
38
|
+
// string # Type of policy. Valid values: `settings`.
|
|
39
|
+
getPolicyType = () => this.attributes.policy_type
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
this.attributes.
|
|
41
|
+
setPolicyType = value => {
|
|
42
|
+
this.attributes.policy_type = value
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
// string #
|
|
46
|
-
|
|
45
|
+
// string # Name for this policy.
|
|
46
|
+
getName = () => this.attributes.name
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
this.attributes.
|
|
48
|
+
setName = value => {
|
|
49
|
+
this.attributes.name = value
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
// string #
|
|
53
|
-
|
|
52
|
+
// string # Description for this policy.
|
|
53
|
+
getDescription = () => this.attributes.description
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
this.attributes.
|
|
55
|
+
setDescription = value => {
|
|
56
|
+
this.attributes.description = value
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
//
|
|
59
|
+
// object # Policy configuration data. Attributes differ by policy type. For more information, refer to the Value Hash section of the developer documentation.
|
|
60
|
+
getValue = () => this.attributes.value
|
|
61
|
+
|
|
62
|
+
setValue = value => {
|
|
63
|
+
this.attributes.value = value
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// array(int64) # IDs of child sites that this policy has been applied to. This field is read-only.
|
|
67
|
+
getAppliedChildSiteIds = () => this.attributes.applied_child_site_ids
|
|
68
|
+
|
|
69
|
+
setAppliedChildSiteIds = value => {
|
|
70
|
+
this.attributes.applied_child_site_ids = value
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// array(int64) # IDs of child sites that this policy has been exempted from. If `skip_child_site_ids` is empty, the policy will be applied to all child sites. To apply a policy to a child site that has been exempted, remove it from `skip_child_site_ids` or set it to an empty array (`[]`).
|
|
60
74
|
getSkipChildSiteIds = () => this.attributes.skip_child_site_ids
|
|
61
75
|
|
|
62
76
|
setSkipChildSiteIds = value => {
|
|
63
77
|
this.attributes.skip_child_site_ids = value
|
|
64
78
|
}
|
|
65
79
|
|
|
80
|
+
// date-time # When this policy was created.
|
|
81
|
+
getCreatedAt = () => this.attributes.created_at
|
|
82
|
+
|
|
83
|
+
// date-time # When this policy was last updated.
|
|
84
|
+
getUpdatedAt = () => this.attributes.updated_at
|
|
85
|
+
|
|
66
86
|
// Parameters:
|
|
67
|
-
//
|
|
68
|
-
//
|
|
69
|
-
//
|
|
87
|
+
// value - string
|
|
88
|
+
// skip_child_site_ids - array(int64) - IDs of child sites that this policy has been exempted from. If `skip_child_site_ids` is empty, the policy will be applied to all child sites. To apply a policy to a child site that has been exempted, remove it from `skip_child_site_ids` or set it to an empty array (`[]`).
|
|
89
|
+
// policy_type - string - Type of policy. Valid values: `settings`.
|
|
90
|
+
// name - string - Name for this policy.
|
|
91
|
+
// description - string - Description for this policy.
|
|
70
92
|
update = async (params = {}) => {
|
|
71
93
|
if (!this.attributes.id) {
|
|
72
94
|
throw new errors.EmptyPropertyError('Current object has no id')
|
|
@@ -81,39 +103,31 @@ class ChildSiteManagementPolicy {
|
|
|
81
103
|
throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params.id)}`)
|
|
82
104
|
}
|
|
83
105
|
|
|
84
|
-
if (params.
|
|
85
|
-
throw new errors.InvalidParameterError(`Bad parameter:
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (params.managed_value && !isString(params.managed_value)) {
|
|
89
|
-
throw new errors.InvalidParameterError(`Bad parameter: managed_value must be of type String, received ${getType(params.managed_value)}`)
|
|
106
|
+
if (params.value && !isString(params.value)) {
|
|
107
|
+
throw new errors.InvalidParameterError(`Bad parameter: value must be of type String, received ${getType(params.value)}`)
|
|
90
108
|
}
|
|
91
109
|
|
|
92
110
|
if (params.skip_child_site_ids && !isArray(params.skip_child_site_ids)) {
|
|
93
111
|
throw new errors.InvalidParameterError(`Bad parameter: skip_child_site_ids must be of type Array, received ${getType(params.skip_child_site_ids)}`)
|
|
94
112
|
}
|
|
95
113
|
|
|
96
|
-
if (!params.
|
|
97
|
-
|
|
98
|
-
params.id = this.id
|
|
99
|
-
} else {
|
|
100
|
-
throw new errors.MissingParameterError('Parameter missing: id')
|
|
101
|
-
}
|
|
114
|
+
if (params.policy_type && !isString(params.policy_type)) {
|
|
115
|
+
throw new errors.InvalidParameterError(`Bad parameter: policy_type must be of type String, received ${getType(params.policy_type)}`)
|
|
102
116
|
}
|
|
103
117
|
|
|
104
|
-
if (!params.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
118
|
+
if (params.name && !isString(params.name)) {
|
|
119
|
+
throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params.name)}`)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (params.description && !isString(params.description)) {
|
|
123
|
+
throw new errors.InvalidParameterError(`Bad parameter: description must be of type String, received ${getType(params.description)}`)
|
|
110
124
|
}
|
|
111
125
|
|
|
112
|
-
if (!params.
|
|
113
|
-
if (this.attributes.
|
|
114
|
-
params.
|
|
126
|
+
if (!params.id) {
|
|
127
|
+
if (this.attributes.id) {
|
|
128
|
+
params.id = this.id
|
|
115
129
|
} else {
|
|
116
|
-
throw new errors.MissingParameterError('Parameter missing:
|
|
130
|
+
throw new errors.MissingParameterError('Parameter missing: id')
|
|
117
131
|
}
|
|
118
132
|
}
|
|
119
133
|
|
|
@@ -208,28 +222,34 @@ class ChildSiteManagementPolicy {
|
|
|
208
222
|
ChildSiteManagementPolicy.find(id, params, options)
|
|
209
223
|
|
|
210
224
|
// Parameters:
|
|
211
|
-
//
|
|
212
|
-
//
|
|
213
|
-
//
|
|
225
|
+
// value - string
|
|
226
|
+
// skip_child_site_ids - array(int64) - IDs of child sites that this policy has been exempted from. If `skip_child_site_ids` is empty, the policy will be applied to all child sites. To apply a policy to a child site that has been exempted, remove it from `skip_child_site_ids` or set it to an empty array (`[]`).
|
|
227
|
+
// policy_type (required) - string - Type of policy. Valid values: `settings`.
|
|
228
|
+
// name - string - Name for this policy.
|
|
229
|
+
// description - string - Description for this policy.
|
|
214
230
|
static create = async (params = {}, options = {}) => {
|
|
215
|
-
if (!params.
|
|
216
|
-
throw new errors.MissingParameterError('Parameter missing:
|
|
231
|
+
if (!params.policy_type) {
|
|
232
|
+
throw new errors.MissingParameterError('Parameter missing: policy_type')
|
|
217
233
|
}
|
|
218
234
|
|
|
219
|
-
if (!params.
|
|
220
|
-
throw new errors.
|
|
235
|
+
if (params.value && !isString(params.value)) {
|
|
236
|
+
throw new errors.InvalidParameterError(`Bad parameter: value must be of type String, received ${getType(params.value)}`)
|
|
221
237
|
}
|
|
222
238
|
|
|
223
|
-
if (params.
|
|
224
|
-
throw new errors.InvalidParameterError(`Bad parameter:
|
|
239
|
+
if (params.skip_child_site_ids && !isArray(params.skip_child_site_ids)) {
|
|
240
|
+
throw new errors.InvalidParameterError(`Bad parameter: skip_child_site_ids must be of type Array, received ${getType(params.skip_child_site_ids)}`)
|
|
225
241
|
}
|
|
226
242
|
|
|
227
|
-
if (params.
|
|
228
|
-
throw new errors.InvalidParameterError(`Bad parameter:
|
|
243
|
+
if (params.policy_type && !isString(params.policy_type)) {
|
|
244
|
+
throw new errors.InvalidParameterError(`Bad parameter: policy_type must be of type String, received ${getType(params.policy_type)}`)
|
|
229
245
|
}
|
|
230
246
|
|
|
231
|
-
if (params.
|
|
232
|
-
throw new errors.InvalidParameterError(`Bad parameter:
|
|
247
|
+
if (params.name && !isString(params.name)) {
|
|
248
|
+
throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params.name)}`)
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (params.description && !isString(params.description)) {
|
|
252
|
+
throw new errors.InvalidParameterError(`Bad parameter: description must be of type String, received ${getType(params.description)}`)
|
|
233
253
|
}
|
|
234
254
|
|
|
235
255
|
const response = await Api.sendRequest('/child_site_management_policies', 'POST', params, options)
|
|
@@ -63,7 +63,7 @@ class HistoryExport {
|
|
|
63
63
|
this.attributes.status = value
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
// string # Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
|
|
66
|
+
// string # Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`, `archived_delete`
|
|
67
67
|
getQueryAction = () => this.attributes.query_action
|
|
68
68
|
|
|
69
69
|
setQueryAction = value => {
|
|
@@ -249,7 +249,7 @@ class HistoryExport {
|
|
|
249
249
|
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
250
250
|
// start_at - string - Start date/time of export range.
|
|
251
251
|
// end_at - string - End date/time of export range.
|
|
252
|
-
// query_action - string - Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
|
|
252
|
+
// query_action - string - Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`, `archived_delete`
|
|
253
253
|
// query_interface - string - Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`, `as2`, `inbound_email`, `remote`
|
|
254
254
|
// query_user_id - string - Return results that are actions performed by the user indicated by this User ID
|
|
255
255
|
// query_file_id - string - Return results that are file actions related to the file indicated by this File ID
|
|
@@ -67,7 +67,7 @@ class HistoryExportResult {
|
|
|
67
67
|
// boolean # true if this change was performed by a user on a parent site.
|
|
68
68
|
getUserIsFromParentSite = () => this.attributes.user_is_from_parent_site
|
|
69
69
|
|
|
70
|
-
// string # What action was taken. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
|
|
70
|
+
// string # What action was taken. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`, `archived_delete`
|
|
71
71
|
getAction = () => this.attributes.action
|
|
72
72
|
|
|
73
73
|
// string # The type of login failure, if applicable. Valid values: `expired_trial`, `account_overdue`, `locked_out`, `ip_mismatch`, `password_mismatch`, `site_mismatch`, `username_not_found`, `none`, `no_ftp_permission`, `no_web_permission`, `no_directory`, `errno_enoent`, `no_sftp_permission`, `no_dav_permission`, `no_restapi_permission`, `key_mismatch`, `region_mismatch`, `expired_access`, `desktop_ip_mismatch`, `desktop_api_key_not_used_quickly_enough`, `disabled`, `country_mismatch`, `insecure_ftp`, `insecure_cipher`, `rate_limited`
|
package/src/models/Site.js
CHANGED
|
@@ -325,6 +325,9 @@ class Site {
|
|
|
325
325
|
// int64 # Number of prior passwords to disallow
|
|
326
326
|
getMaxPriorPasswords = () => this.attributes.max_prior_passwords
|
|
327
327
|
|
|
328
|
+
// object # List of site settings managed by the parent site
|
|
329
|
+
getManagedSiteSettings = () => this.attributes.managed_site_settings
|
|
330
|
+
|
|
328
331
|
// string # A message to show users when they connect via FTP or SFTP.
|
|
329
332
|
getMotdText = () => this.attributes.motd_text
|
|
330
333
|
|
|
@@ -541,9 +544,6 @@ class Site {
|
|
|
541
544
|
// boolean # Allow group admins set password authentication method
|
|
542
545
|
getGroupAdminsCanSetUserPassword = () => this.attributes.group_admins_can_set_user_password
|
|
543
546
|
|
|
544
|
-
// array(string) # List of site settings managed by the parent site
|
|
545
|
-
getManagedSiteSettings = () => this.attributes.managed_site_settings
|
|
546
|
-
|
|
547
547
|
static get = async (options = {}) => {
|
|
548
548
|
const response = await Api.sendRequest('/site', 'GET', {}, options)
|
|
549
549
|
|