files.com 1.2.158 → 1.2.159

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.158
1
+ 1.2.159
@@ -41,10 +41,7 @@
41
41
  ## List Bundle Actions
42
42
 
43
43
  ```
44
- await BundleAction.list({
45
- 'bundle_id': 1,
46
- 'bundle_registration_id': 1,
47
- })
44
+ await BundleAction.list
48
45
  ```
49
46
 
50
47
 
@@ -52,11 +49,9 @@ await BundleAction.list({
52
49
 
53
50
  * `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.
54
51
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
55
- * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`.
56
- * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`.
52
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
53
+ * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `bundle_id` or `bundle_registration_id`. Valid field combinations are `[ created_at, bundle_id ]`, `[ created_at, bundle_registration_id ]`, `[ bundle_id, bundle_registration_id ]` or `[ created_at, bundle_id, bundle_registration_id ]`.
57
54
  * `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
58
55
  * `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
59
56
  * `filter_lt` (object): If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
60
57
  * `filter_lteq` (object): If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
61
- * `bundle_id` (int64): Bundle ID
62
- * `bundle_registration_id` (int64): BundleRegistration 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.158';
14
+ var version = '1.2.159';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -74,14 +74,12 @@ _BundleAction = BundleAction;
74
74
  // Parameters:
75
75
  // 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.
76
76
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
77
- // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`.
78
- // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`.
77
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
78
+ // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `bundle_id` or `bundle_registration_id`. Valid field combinations are `[ created_at, bundle_id ]`, `[ created_at, bundle_registration_id ]`, `[ bundle_id, bundle_registration_id ]` or `[ created_at, bundle_id, bundle_registration_id ]`.
79
79
  // filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
80
80
  // filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
81
81
  // filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
82
82
  // filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
83
- // bundle_id - int64 - Bundle ID
84
- // bundle_registration_id - int64 - BundleRegistration ID
85
83
  (0, _defineProperty2.default)(BundleAction, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
86
84
  var _response$data;
87
85
  var params,
@@ -105,26 +103,14 @@ _BundleAction = BundleAction;
105
103
  }
106
104
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
107
105
  case 6:
108
- if (!(params.bundle_id && !(0, _utils.isInt)(params.bundle_id))) {
109
- _context.next = 8;
110
- break;
111
- }
112
- throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params.bundle_id)));
113
- case 8:
114
- if (!(params.bundle_registration_id && !(0, _utils.isInt)(params.bundle_registration_id))) {
115
- _context.next = 10;
116
- break;
117
- }
118
- throw new errors.InvalidParameterError("Bad parameter: bundle_registration_id must be of type Int, received ".concat((0, _utils.getType)(params.bundle_registration_id)));
119
- case 10:
120
- _context.next = 12;
106
+ _context.next = 8;
121
107
  return _Api.default.sendRequest('/bundle_actions', 'GET', params, options);
122
- case 12:
108
+ case 8:
123
109
  response = _context.sent;
124
110
  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) {
125
111
  return new _BundleAction(obj, options);
126
112
  })) || []);
127
- case 14:
113
+ case 10:
128
114
  case "end":
129
115
  return _context.stop();
130
116
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.158",
3
+ "version": "1.2.159",
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.158'
8
+ const version = '1.2.159'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -49,14 +49,12 @@ class BundleAction {
49
49
  // Parameters:
50
50
  // 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.
51
51
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
52
- // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`.
53
- // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`.
52
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
53
+ // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `bundle_id` or `bundle_registration_id`. Valid field combinations are `[ created_at, bundle_id ]`, `[ created_at, bundle_registration_id ]`, `[ bundle_id, bundle_registration_id ]` or `[ created_at, bundle_id, bundle_registration_id ]`.
54
54
  // filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
55
55
  // filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
56
56
  // filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
57
57
  // filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
58
- // bundle_id - int64 - Bundle ID
59
- // bundle_registration_id - int64 - BundleRegistration ID
60
58
  static list = async (params = {}, options = {}) => {
61
59
  if (params.cursor && !isString(params.cursor)) {
62
60
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params.cursor)}`)
@@ -66,14 +64,6 @@ class BundleAction {
66
64
  throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(params.per_page)}`)
67
65
  }
68
66
 
69
- if (params.bundle_id && !isInt(params.bundle_id)) {
70
- throw new errors.InvalidParameterError(`Bad parameter: bundle_id must be of type Int, received ${getType(params.bundle_id)}`)
71
- }
72
-
73
- if (params.bundle_registration_id && !isInt(params.bundle_registration_id)) {
74
- throw new errors.InvalidParameterError(`Bad parameter: bundle_registration_id must be of type Int, received ${getType(params.bundle_registration_id)}`)
75
- }
76
-
77
67
  const response = await Api.sendRequest('/bundle_actions', 'GET', params, options)
78
68
 
79
69
  return response?.data?.map(obj => new BundleAction(obj, options)) || []