files.com 1.2.168 → 1.2.169

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.168
1
+ 1.2.169
@@ -19,10 +19,7 @@
19
19
  ## List Inbox Uploads
20
20
 
21
21
  ```
22
- await InboxUpload.list({
23
- 'inbox_registration_id': 1,
24
- 'inbox_id': 1,
25
- })
22
+ await InboxUpload.list
26
23
  ```
27
24
 
28
25
 
@@ -31,10 +28,8 @@ await InboxUpload.list({
31
28
  * `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.
32
29
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
33
30
  * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`.
34
- * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`.
31
+ * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `folder_behavior_id` or `inbox_registration_id`. Valid field combinations are `[ created_at, folder_behavior_id ]` and `[ created_at, inbox_registration_id ]`.
35
32
  * `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
36
33
  * `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
37
34
  * `filter_lt` (object): If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
38
35
  * `filter_lteq` (object): If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
39
- * `inbox_registration_id` (int64): InboxRegistration ID
40
- * `inbox_id` (int64): Inbox ID
package/lib/Files.js CHANGED
@@ -11,7 +11,7 @@ var endpointPrefix = '/api/rest/v1';
11
11
  var apiKey;
12
12
  var baseUrl = 'https://app.files.com';
13
13
  var sessionId = null;
14
- var version = '1.2.168';
14
+ var version = '1.2.169';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -63,13 +63,11 @@ _InboxUpload = InboxUpload;
63
63
  // 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.
64
64
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
65
65
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`.
66
- // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`.
66
+ // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `folder_behavior_id` or `inbox_registration_id`. Valid field combinations are `[ created_at, folder_behavior_id ]` and `[ created_at, inbox_registration_id ]`.
67
67
  // filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
68
68
  // filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
69
69
  // filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
70
70
  // filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
71
- // inbox_registration_id - int64 - InboxRegistration ID
72
- // inbox_id - int64 - Inbox ID
73
71
  (0, _defineProperty2.default)(InboxUpload, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
74
72
  var _response$data;
75
73
  var params,
@@ -93,26 +91,14 @@ _InboxUpload = InboxUpload;
93
91
  }
94
92
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
95
93
  case 6:
96
- if (!(params.inbox_registration_id && !(0, _utils.isInt)(params.inbox_registration_id))) {
97
- _context.next = 8;
98
- break;
99
- }
100
- throw new errors.InvalidParameterError("Bad parameter: inbox_registration_id must be of type Int, received ".concat((0, _utils.getType)(params.inbox_registration_id)));
101
- case 8:
102
- if (!(params.inbox_id && !(0, _utils.isInt)(params.inbox_id))) {
103
- _context.next = 10;
104
- break;
105
- }
106
- throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params.inbox_id)));
107
- case 10:
108
- _context.next = 12;
94
+ _context.next = 8;
109
95
  return _Api.default.sendRequest('/inbox_uploads', 'GET', params, options);
110
- case 12:
96
+ case 8:
111
97
  response = _context.sent;
112
98
  return _context.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
113
99
  return new _InboxUpload(obj, options);
114
100
  })) || []);
115
- case 14:
101
+ case 10:
116
102
  case "end":
117
103
  return _context.stop();
118
104
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.168",
3
+ "version": "1.2.169",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
package/src/Files.js CHANGED
@@ -5,7 +5,7 @@ const endpointPrefix = '/api/rest/v1'
5
5
  let apiKey
6
6
  let baseUrl = 'https://app.files.com'
7
7
  let sessionId = null
8
- const version = '1.2.168'
8
+ const version = '1.2.169'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -41,13 +41,11 @@ class InboxUpload {
41
41
  // 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.
42
42
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
43
43
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`.
44
- // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`.
44
+ // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `folder_behavior_id` or `inbox_registration_id`. Valid field combinations are `[ created_at, folder_behavior_id ]` and `[ created_at, inbox_registration_id ]`.
45
45
  // filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
46
46
  // filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
47
47
  // filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
48
48
  // filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
49
- // inbox_registration_id - int64 - InboxRegistration ID
50
- // inbox_id - int64 - Inbox ID
51
49
  static list = async (params = {}, options = {}) => {
52
50
  if (params.cursor && !isString(params.cursor)) {
53
51
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params.cursor)}`)
@@ -57,14 +55,6 @@ class InboxUpload {
57
55
  throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(params.per_page)}`)
58
56
  }
59
57
 
60
- if (params.inbox_registration_id && !isInt(params.inbox_registration_id)) {
61
- throw new errors.InvalidParameterError(`Bad parameter: inbox_registration_id must be of type Int, received ${getType(params.inbox_registration_id)}`)
62
- }
63
-
64
- if (params.inbox_id && !isInt(params.inbox_id)) {
65
- throw new errors.InvalidParameterError(`Bad parameter: inbox_id must be of type Int, received ${getType(params.inbox_id)}`)
66
- }
67
-
68
58
  const response = await Api.sendRequest('/inbox_uploads', 'GET', params, options)
69
59
 
70
60
  return response?.data?.map(obj => new InboxUpload(obj, options)) || []