files.com 1.2.331 → 1.2.333

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.331
1
+ 1.2.333
@@ -65,7 +65,7 @@ await ChildSiteManagementPolicy.find(id)
65
65
 
66
66
  ```
67
67
  await ChildSiteManagementPolicy.create({
68
- 'value': "{ \"color2_left\": \"#000000\" }",
68
+ 'value': {"color2_left":"#000000"},
69
69
  'skip_child_site_ids': [1,2],
70
70
  'policy_type': "settings",
71
71
  'name': "example",
@@ -76,7 +76,7 @@ await ChildSiteManagementPolicy.create({
76
76
 
77
77
  ### Parameters
78
78
 
79
- * `value` (string):
79
+ * `value` (object): Policy configuration data. Attributes differ by policy type. For more information, refer to the Value Hash section of the developer documentation.
80
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
81
  * `policy_type` (string): Required - Type of policy. Valid values: `settings`.
82
82
  * `name` (string): Name for this policy.
@@ -90,7 +90,7 @@ await ChildSiteManagementPolicy.create({
90
90
  const child_site_management_policy = await ChildSiteManagementPolicy.find(id)
91
91
 
92
92
  await child_site_management_policy.update({
93
- 'value': "{ \"color2_left\": \"#000000\" }",
93
+ 'value': {"color2_left":"#000000"},
94
94
  'skip_child_site_ids': [1,2],
95
95
  'policy_type': "settings",
96
96
  'name': "example",
@@ -101,7 +101,7 @@ await child_site_management_policy.update({
101
101
  ### Parameters
102
102
 
103
103
  * `id` (int64): Required - Child Site Management Policy ID.
104
- * `value` (string):
104
+ * `value` (object): Policy configuration data. Attributes differ by policy type. For more information, refer to the Value Hash section of the developer documentation.
105
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
106
  * `policy_type` (string): Type of policy. Valid values: `settings`.
107
107
  * `name` (string): Name for this policy.
@@ -180,10 +180,10 @@ await User.list({
180
180
  * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
181
181
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
182
182
  * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `name`, `company`, `password_validity_days`, `ssl_required`, `username`, `site_admin` or `disabled`.
183
- * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until`, `not_site_admin`, `disabled` or `partner_id`. Valid field combinations are `[ site_admin, username ]`, `[ not_site_admin, username ]` or `[ company, name ]`.
183
+ * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until`, `not_site_admin`, `disabled` or `partner_id`. Valid field combinations are `[ site_admin, username ]` and `[ not_site_admin, username ]`.
184
184
  * `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
185
185
  * `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
186
- * `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `username`, `name`, `email` or `company`. Valid field combinations are `[ company, name ]`.
186
+ * `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `username`, `name`, `email` or `company`.
187
187
  * `filter_lt` (object): If set, return records where the specified field is less than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
188
188
  * `filter_lteq` (object): If set, return records where the specified field is less than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
189
189
  * `ids` (string): comma-separated list of User IDs
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.331';
15
+ var version = '1.2.333';
16
16
  var userAgent = "Files.com JavaScript SDK v".concat(version);
17
17
  var logLevel = _Logger.LogLevel.INFO;
18
18
  var debugRequest = false;
@@ -90,7 +90,7 @@ var ChildSiteManagementPolicy = /*#__PURE__*/(0, _createClass2.default)(function
90
90
  return _this.attributes.updated_at;
91
91
  });
92
92
  // Parameters:
93
- // value - string
93
+ // value - object - Policy configuration data. Attributes differ by policy type. For more information, refer to the Value Hash section of the developer documentation.
94
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
95
  // policy_type - string - Type of policy. Valid values: `settings`.
96
96
  // name - string - Name for this policy.
@@ -122,56 +122,50 @@ var ChildSiteManagementPolicy = /*#__PURE__*/(0, _createClass2.default)(function
122
122
  }
123
123
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params.id)));
124
124
  case 3:
125
- if (!(params.value && !(0, _utils.isString)(params.value))) {
126
- _context.next = 4;
127
- break;
128
- }
129
- throw new errors.InvalidParameterError("Bad parameter: value must be of type String, received ".concat((0, _utils.getType)(params.value)));
130
- case 4:
131
125
  if (!(params.skip_child_site_ids && !(0, _utils.isArray)(params.skip_child_site_ids))) {
132
- _context.next = 5;
126
+ _context.next = 4;
133
127
  break;
134
128
  }
135
129
  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)));
136
- case 5:
130
+ case 4:
137
131
  if (!(params.policy_type && !(0, _utils.isString)(params.policy_type))) {
138
- _context.next = 6;
132
+ _context.next = 5;
139
133
  break;
140
134
  }
141
135
  throw new errors.InvalidParameterError("Bad parameter: policy_type must be of type String, received ".concat((0, _utils.getType)(params.policy_type)));
142
- case 6:
136
+ case 5:
143
137
  if (!(params.name && !(0, _utils.isString)(params.name))) {
144
- _context.next = 7;
138
+ _context.next = 6;
145
139
  break;
146
140
  }
147
141
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
148
- case 7:
142
+ case 6:
149
143
  if (!(params.description && !(0, _utils.isString)(params.description))) {
150
- _context.next = 8;
144
+ _context.next = 7;
151
145
  break;
152
146
  }
153
147
  throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
154
- case 8:
148
+ case 7:
155
149
  if (params.id) {
156
- _context.next = 10;
150
+ _context.next = 9;
157
151
  break;
158
152
  }
159
153
  if (!_this.attributes.id) {
160
- _context.next = 9;
154
+ _context.next = 8;
161
155
  break;
162
156
  }
163
157
  params.id = _this.id;
164
- _context.next = 10;
158
+ _context.next = 9;
165
159
  break;
166
- case 9:
160
+ case 8:
167
161
  throw new errors.MissingParameterError('Parameter missing: id');
168
- case 10:
169
- _context.next = 11;
162
+ case 9:
163
+ _context.next = 10;
170
164
  return _Api.default.sendRequest("/child_site_management_policies/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
171
- case 11:
165
+ case 10:
172
166
  response = _context.sent;
173
167
  return _context.abrupt("return", new ChildSiteManagementPolicy(response === null || response === void 0 ? void 0 : response.data, _this.options));
174
- case 12:
168
+ case 11:
175
169
  case "end":
176
170
  return _context.stop();
177
171
  }
@@ -368,7 +362,7 @@ _ChildSiteManagementPolicy = ChildSiteManagementPolicy;
368
362
  return _ChildSiteManagementPolicy.find(id, params, options);
369
363
  });
370
364
  // Parameters:
371
- // value - string
365
+ // value - object - Policy configuration data. Attributes differ by policy type. For more information, refer to the Value Hash section of the developer documentation.
372
366
  // 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
367
  // policy_type (required) - string - Type of policy. Valid values: `settings`.
374
368
  // name - string - Name for this policy.
@@ -389,42 +383,36 @@ _ChildSiteManagementPolicy = ChildSiteManagementPolicy;
389
383
  }
390
384
  throw new errors.MissingParameterError('Parameter missing: policy_type');
391
385
  case 1:
392
- if (!(params.value && !(0, _utils.isString)(params.value))) {
393
- _context6.next = 2;
394
- break;
395
- }
396
- throw new errors.InvalidParameterError("Bad parameter: value must be of type String, received ".concat((0, _utils.getType)(params.value)));
397
- case 2:
398
386
  if (!(params.skip_child_site_ids && !(0, _utils.isArray)(params.skip_child_site_ids))) {
399
- _context6.next = 3;
387
+ _context6.next = 2;
400
388
  break;
401
389
  }
402
390
  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)));
403
- case 3:
391
+ case 2:
404
392
  if (!(params.policy_type && !(0, _utils.isString)(params.policy_type))) {
405
- _context6.next = 4;
393
+ _context6.next = 3;
406
394
  break;
407
395
  }
408
396
  throw new errors.InvalidParameterError("Bad parameter: policy_type must be of type String, received ".concat((0, _utils.getType)(params.policy_type)));
409
- case 4:
397
+ case 3:
410
398
  if (!(params.name && !(0, _utils.isString)(params.name))) {
411
- _context6.next = 5;
399
+ _context6.next = 4;
412
400
  break;
413
401
  }
414
402
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
415
- case 5:
403
+ case 4:
416
404
  if (!(params.description && !(0, _utils.isString)(params.description))) {
417
- _context6.next = 6;
405
+ _context6.next = 5;
418
406
  break;
419
407
  }
420
408
  throw new errors.InvalidParameterError("Bad parameter: description must be of type String, received ".concat((0, _utils.getType)(params.description)));
421
- case 6:
422
- _context6.next = 7;
409
+ case 5:
410
+ _context6.next = 6;
423
411
  return _Api.default.sendRequest('/child_site_management_policies', 'POST', params, options);
424
- case 7:
412
+ case 6:
425
413
  response = _context6.sent;
426
414
  return _context6.abrupt("return", new _ChildSiteManagementPolicy(response === null || response === void 0 ? void 0 : response.data, options));
427
- case 8:
415
+ case 7:
428
416
  case "end":
429
417
  return _context6.stop();
430
418
  }
@@ -1149,10 +1149,10 @@ _User = User;
1149
1149
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
1150
1150
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
1151
1151
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `name`, `company`, `password_validity_days`, `ssl_required`, `username`, `site_admin` or `disabled`.
1152
- // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until`, `not_site_admin`, `disabled` or `partner_id`. Valid field combinations are `[ site_admin, username ]`, `[ not_site_admin, username ]` or `[ company, name ]`.
1152
+ // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until`, `not_site_admin`, `disabled` or `partner_id`. Valid field combinations are `[ site_admin, username ]` and `[ not_site_admin, username ]`.
1153
1153
  // filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
1154
1154
  // filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
1155
- // filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `username`, `name`, `email` or `company`. Valid field combinations are `[ company, name ]`.
1155
+ // filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `username`, `name`, `email` or `company`.
1156
1156
  // filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
1157
1157
  // filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
1158
1158
  // ids - string - comma-separated list of User IDs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.331",
3
+ "version": "1.2.333",
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.331'
9
+ const version = '1.2.333'
10
10
  let userAgent = `Files.com JavaScript SDK v${version}`
11
11
 
12
12
  let logLevel = LogLevel.INFO
@@ -84,7 +84,7 @@ class ChildSiteManagementPolicy {
84
84
  getUpdatedAt = () => this.attributes.updated_at
85
85
 
86
86
  // Parameters:
87
- // value - string
87
+ // value - object - Policy configuration data. Attributes differ by policy type. For more information, refer to the Value Hash section of the developer documentation.
88
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
89
  // policy_type - string - Type of policy. Valid values: `settings`.
90
90
  // name - string - Name for this policy.
@@ -103,10 +103,6 @@ class ChildSiteManagementPolicy {
103
103
  throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params.id)}`)
104
104
  }
105
105
 
106
- if (params.value && !isString(params.value)) {
107
- throw new errors.InvalidParameterError(`Bad parameter: value must be of type String, received ${getType(params.value)}`)
108
- }
109
-
110
106
  if (params.skip_child_site_ids && !isArray(params.skip_child_site_ids)) {
111
107
  throw new errors.InvalidParameterError(`Bad parameter: skip_child_site_ids must be of type Array, received ${getType(params.skip_child_site_ids)}`)
112
108
  }
@@ -222,7 +218,7 @@ class ChildSiteManagementPolicy {
222
218
  ChildSiteManagementPolicy.find(id, params, options)
223
219
 
224
220
  // Parameters:
225
- // value - string
221
+ // value - object - Policy configuration data. Attributes differ by policy type. For more information, refer to the Value Hash section of the developer documentation.
226
222
  // 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
223
  // policy_type (required) - string - Type of policy. Valid values: `settings`.
228
224
  // name - string - Name for this policy.
@@ -232,10 +228,6 @@ class ChildSiteManagementPolicy {
232
228
  throw new errors.MissingParameterError('Parameter missing: policy_type')
233
229
  }
234
230
 
235
- if (params.value && !isString(params.value)) {
236
- throw new errors.InvalidParameterError(`Bad parameter: value must be of type String, received ${getType(params.value)}`)
237
- }
238
-
239
231
  if (params.skip_child_site_ids && !isArray(params.skip_child_site_ids)) {
240
232
  throw new errors.InvalidParameterError(`Bad parameter: skip_child_site_ids must be of type Array, received ${getType(params.skip_child_site_ids)}`)
241
233
  }
@@ -934,10 +934,10 @@ class User {
934
934
  // cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
935
935
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
936
936
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `name`, `company`, `password_validity_days`, `ssl_required`, `username`, `site_admin` or `disabled`.
937
- // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until`, `not_site_admin`, `disabled` or `partner_id`. Valid field combinations are `[ site_admin, username ]`, `[ not_site_admin, username ]` or `[ company, name ]`.
937
+ // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until`, `not_site_admin`, `disabled` or `partner_id`. Valid field combinations are `[ site_admin, username ]` and `[ not_site_admin, username ]`.
938
938
  // filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
939
939
  // filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
940
- // filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `username`, `name`, `email` or `company`. Valid field combinations are `[ company, name ]`.
940
+ // filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `username`, `name`, `email` or `company`.
941
941
  // filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
942
942
  // filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
943
943
  // ids - string - comma-separated list of User IDs