files.com 1.2.310 → 1.2.312

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 CHANGED
@@ -1 +1 @@
1
- 1.2.310
1
+ 1.2.312
@@ -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
- "site_id": 1,
9
- "site_setting_name": "color2_left",
10
- "managed_value": "#FF0000",
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
- 5
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): ChildSiteManagementPolicy ID
19
- * `site_id` (int64): ID of the Site managing the policy
20
- * `site_setting_name` (string): The name of the setting that is managed by the policy
21
- * `managed_value` (string): The value for the setting that will be enforced for all child sites that are not exempt
22
- * `skip_child_site_ids` (array(int64)): The list of child site IDs that are exempt from this policy
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
- 'site_setting_name': "color2_left",
58
- 'managed_value': "#FF0000",
59
- 'skip_child_site_ids': [1,5],
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
- * `site_setting_name` (string): Required - The name of the setting that is managed by the policy
67
- * `managed_value` (string): Required - The value for the setting that will be enforced for all child sites that are not exempt
68
- * `skip_child_site_ids` (array(int64)): The list of child site IDs that are exempt from this policy
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
- 'site_setting_name': "color2_left",
79
- 'managed_value': "#FF0000",
80
- 'skip_child_site_ids': [1,5],
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
- * `site_setting_name` (string): Required - The name of the setting that is managed by the policy
88
- * `managed_value` (string): Required - The value for the setting that will be enforced for all child sites that are not exempt
89
- * `skip_child_site_ids` (array(int64)): The list of child site IDs that are exempt from this policy
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
- "site_id": 1,
97
- "site_setting_name": "color2_left",
98
- "managed_value": "#FF0000",
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
- 5
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
@@ -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
 
@@ -59,7 +59,6 @@
59
59
  "runtime": 1.0,
60
60
  "log_url": "https://www.example.com/log_file.txt",
61
61
  "completed_at": "2000-01-01T01:00:00Z",
62
- "notified": true,
63
62
  "dry_run": true,
64
63
  "bytes_synced": 1,
65
64
  "estimated_bytes_count": 1,
@@ -313,7 +312,6 @@ await sync.update({
313
312
  "runtime": 1.0,
314
313
  "log_url": "https://www.example.com/log_file.txt",
315
314
  "completed_at": "2000-01-01T01:00:00Z",
316
- "notified": true,
317
315
  "dry_run": true,
318
316
  "bytes_synced": 1,
319
317
  "estimated_bytes_count": 1,
@@ -21,7 +21,6 @@
21
21
  "runtime": 1.0,
22
22
  "log_url": "https://www.example.com/log_file.txt",
23
23
  "completed_at": "2000-01-01T01:00:00Z",
24
- "notified": true,
25
24
  "dry_run": true,
26
25
  "bytes_synced": 1,
27
26
  "estimated_bytes_count": 1,
@@ -45,7 +44,6 @@
45
44
  * `runtime` (double): Total runtime in seconds
46
45
  * `log_url` (string): Link to external log file.
47
46
  * `completed_at` (date-time): When this run was completed
48
- * `notified` (boolean): Whether notifications were sent for this run
49
47
  * `dry_run` (boolean): Whether this run was a dry run (no actual changes made)
50
48
  * `bytes_synced` (int64): Total bytes synced in this run
51
49
  * `estimated_bytes_count` (int64): Estimated bytes count for this run
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.310';
15
+ var version = '1.2.312';
16
16
  var userAgent = "Files.com JavaScript SDK v".concat(version);
17
17
  var logLevel = _Logger.LogLevel.INFO;
18
18
  var debugRequest = false;
@@ -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 # ChildSiteManagementPolicy ID
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
- // int64 # ID of the Site managing the policy
43
- (0, _defineProperty2.default)(this, "getSiteId", function () {
44
- return _this.attributes.site_id;
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, "setSiteId", function (value) {
47
- _this.attributes.site_id = value;
46
+ (0, _defineProperty2.default)(this, "setPolicyType", function (value) {
47
+ _this.attributes.policy_type = value;
48
48
  });
49
- // string # The name of the setting that is managed by the policy
50
- (0, _defineProperty2.default)(this, "getSiteSettingName", function () {
51
- return _this.attributes.site_setting_name;
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, "setSiteSettingName", function (value) {
54
- _this.attributes.site_setting_name = value;
53
+ (0, _defineProperty2.default)(this, "setName", function (value) {
54
+ _this.attributes.name = value;
55
55
  });
56
- // string # The value for the setting that will be enforced for all child sites that are not exempt
57
- (0, _defineProperty2.default)(this, "getManagedValue", function () {
58
- return _this.attributes.managed_value;
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, "setManagedValue", function (value) {
61
- _this.attributes.managed_value = value;
60
+ (0, _defineProperty2.default)(this, "setDescription", function (value) {
61
+ _this.attributes.description = value;
62
62
  });
63
- // array(int64) # The list of child site IDs that are exempt from this policy
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
- // site_setting_name (required) - string - The name of the setting that is managed by the policy
72
- // managed_value (required) - string - The value for the setting that will be enforced for all child sites that are not exempt
73
- // skip_child_site_ids - array(int64) - The list of child site IDs that are exempt from this policy
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.site_setting_name && !(0, _utils.isString)(params.site_setting_name))) {
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: site_setting_name must be of type String, received ".concat((0, _utils.getType)(params.site_setting_name)));
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.managed_value && !(0, _utils.isString)(params.managed_value))) {
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: managed_value must be of type String, received ".concat((0, _utils.getType)(params.managed_value)));
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.skip_child_site_ids && !(0, _utils.isArray)(params.skip_child_site_ids))) {
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: skip_child_site_ids must be of type Array, received ".concat((0, _utils.getType)(params.skip_child_site_ids)));
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.id) {
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
- params.id = _this.id;
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
- throw new errors.MissingParameterError('Parameter missing: id');
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.site_setting_name) {
155
+ if (params.id) {
134
156
  _context.next = 10;
135
157
  break;
136
158
  }
137
- if (!_this.attributes.site_setting_name) {
159
+ if (!_this.attributes.id) {
138
160
  _context.next = 9;
139
161
  break;
140
162
  }
141
- params.site_setting_name = _this.site_setting_name;
163
+ params.id = _this.id;
142
164
  _context.next = 10;
143
165
  break;
144
166
  case 9:
145
- throw new errors.MissingParameterError('Parameter missing: site_setting_name');
167
+ throw new errors.MissingParameterError('Parameter missing: id');
146
168
  case 10:
147
- if (params.managed_value) {
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 13:
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 14:
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
- // site_setting_name (required) - string - The name of the setting that is managed by the policy
364
- // managed_value (required) - string - The value for the setting that will be enforced for all child sites that are not exempt
365
- // skip_child_site_ids - array(int64) - The list of child site IDs that are exempt from this policy
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.site_setting_name) {
386
+ if (params.policy_type) {
377
387
  _context6.next = 1;
378
388
  break;
379
389
  }
380
- throw new errors.MissingParameterError('Parameter missing: site_setting_name');
390
+ throw new errors.MissingParameterError('Parameter missing: policy_type');
381
391
  case 1:
382
- if (params.managed_value) {
392
+ if (!(params.value && !(0, _utils.isString)(params.value))) {
383
393
  _context6.next = 2;
384
394
  break;
385
395
  }
386
- throw new errors.MissingParameterError('Parameter missing: managed_value');
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.site_setting_name && !(0, _utils.isString)(params.site_setting_name))) {
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: site_setting_name must be of type String, received ".concat((0, _utils.getType)(params.site_setting_name)));
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.managed_value && !(0, _utils.isString)(params.managed_value))) {
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: managed_value must be of type String, received ".concat((0, _utils.getType)(params.managed_value)));
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.skip_child_site_ids && !(0, _utils.isArray)(params.skip_child_site_ids))) {
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: skip_child_site_ids must be of type Array, received ".concat((0, _utils.getType)(params.skip_child_site_ids)));
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
- _context6.next = 6;
407
- return _Api.default.sendRequest('/child_site_management_policies', 'POST', params, options);
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 7:
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
  });
@@ -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],
@@ -92,10 +92,6 @@ var SyncRun = /*#__PURE__*/(0, _createClass2.default)(function SyncRun() {
92
92
  (0, _defineProperty2.default)(this, "getCompletedAt", function () {
93
93
  return _this.attributes.completed_at;
94
94
  });
95
- // boolean # Whether notifications were sent for this run
96
- (0, _defineProperty2.default)(this, "getNotified", function () {
97
- return _this.attributes.notified;
98
- });
99
95
  // boolean # Whether this run was a dry run (no actual changes made)
100
96
  (0, _defineProperty2.default)(this, "getDryRun", function () {
101
97
  return _this.attributes.dry_run;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.310",
3
+ "version": "1.2.312",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
package/src/Files.js CHANGED
@@ -6,7 +6,7 @@ let apiKey
6
6
  let baseUrl = 'https://app.files.com'
7
7
  let sessionId = null
8
8
  let language = null
9
- const version = '1.2.310'
9
+ const version = '1.2.312'
10
10
  let userAgent = `Files.com JavaScript SDK v${version}`
11
11
 
12
12
  let logLevel = LogLevel.INFO
@@ -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 # ChildSiteManagementPolicy ID
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
- // int64 # ID of the Site managing the policy
39
- getSiteId = () => this.attributes.site_id
38
+ // string # Type of policy. Valid values: `settings`.
39
+ getPolicyType = () => this.attributes.policy_type
40
40
 
41
- setSiteId = value => {
42
- this.attributes.site_id = value
41
+ setPolicyType = value => {
42
+ this.attributes.policy_type = value
43
43
  }
44
44
 
45
- // string # The name of the setting that is managed by the policy
46
- getSiteSettingName = () => this.attributes.site_setting_name
45
+ // string # Name for this policy.
46
+ getName = () => this.attributes.name
47
47
 
48
- setSiteSettingName = value => {
49
- this.attributes.site_setting_name = value
48
+ setName = value => {
49
+ this.attributes.name = value
50
50
  }
51
51
 
52
- // string # The value for the setting that will be enforced for all child sites that are not exempt
53
- getManagedValue = () => this.attributes.managed_value
52
+ // string # Description for this policy.
53
+ getDescription = () => this.attributes.description
54
54
 
55
- setManagedValue = value => {
56
- this.attributes.managed_value = value
55
+ setDescription = value => {
56
+ this.attributes.description = value
57
57
  }
58
58
 
59
- // array(int64) # The list of child site IDs that are exempt from this policy
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
- // site_setting_name (required) - string - The name of the setting that is managed by the policy
68
- // managed_value (required) - string - The value for the setting that will be enforced for all child sites that are not exempt
69
- // skip_child_site_ids - array(int64) - The list of child site IDs that are exempt from this policy
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.site_setting_name && !isString(params.site_setting_name)) {
85
- throw new errors.InvalidParameterError(`Bad parameter: site_setting_name must be of type String, received ${getType(params.site_setting_name)}`)
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.id) {
97
- if (this.attributes.id) {
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.site_setting_name) {
105
- if (this.attributes.site_setting_name) {
106
- params.site_setting_name = this.site_setting_name
107
- } else {
108
- throw new errors.MissingParameterError('Parameter missing: site_setting_name')
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.managed_value) {
113
- if (this.attributes.managed_value) {
114
- params.managed_value = this.managed_value
126
+ if (!params.id) {
127
+ if (this.attributes.id) {
128
+ params.id = this.id
115
129
  } else {
116
- throw new errors.MissingParameterError('Parameter missing: managed_value')
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
- // site_setting_name (required) - string - The name of the setting that is managed by the policy
212
- // managed_value (required) - string - The value for the setting that will be enforced for all child sites that are not exempt
213
- // skip_child_site_ids - array(int64) - The list of child site IDs that are exempt from this policy
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.site_setting_name) {
216
- throw new errors.MissingParameterError('Parameter missing: site_setting_name')
231
+ if (!params.policy_type) {
232
+ throw new errors.MissingParameterError('Parameter missing: policy_type')
217
233
  }
218
234
 
219
- if (!params.managed_value) {
220
- throw new errors.MissingParameterError('Parameter missing: managed_value')
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.site_setting_name && !isString(params.site_setting_name)) {
224
- throw new errors.InvalidParameterError(`Bad parameter: site_setting_name must be of type String, received ${getType(params.site_setting_name)}`)
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.managed_value && !isString(params.managed_value)) {
228
- throw new errors.InvalidParameterError(`Bad parameter: managed_value must be of type String, received ${getType(params.managed_value)}`)
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.skip_child_site_ids && !isArray(params.skip_child_site_ids)) {
232
- throw new errors.InvalidParameterError(`Bad parameter: skip_child_site_ids must be of type Array, received ${getType(params.skip_child_site_ids)}`)
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`
@@ -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
 
@@ -73,9 +73,6 @@ class SyncRun {
73
73
  // date-time # When this run was completed
74
74
  getCompletedAt = () => this.attributes.completed_at
75
75
 
76
- // boolean # Whether notifications were sent for this run
77
- getNotified = () => this.attributes.notified
78
-
79
76
  // boolean # Whether this run was a dry run (no actual changes made)
80
77
  getDryRun = () => this.attributes.dry_run
81
78