files.com 1.2.240 → 1.2.241

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.240
1
+ 1.2.241
@@ -40,6 +40,7 @@
40
40
 
41
41
  ```
42
42
  await AutomationRun.list({
43
+ 'user_id': 1,
43
44
  'automation_id': 1,
44
45
  })
45
46
  ```
@@ -47,6 +48,7 @@ await AutomationRun.list({
47
48
 
48
49
  ### Parameters
49
50
 
51
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
50
52
  * `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
53
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
52
54
  * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`.
@@ -41,12 +41,15 @@
41
41
  ## List Bundle Actions
42
42
 
43
43
  ```
44
- await BundleAction.list
44
+ await BundleAction.list({
45
+ 'user_id': 1,
46
+ })
45
47
  ```
46
48
 
47
49
 
48
50
  ### Parameters
49
51
 
52
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
50
53
  * `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
54
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
52
55
  * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`.
@@ -42,6 +42,7 @@
42
42
 
43
43
  ```
44
44
  await BundleRegistration.list({
45
+ 'user_id': 1,
45
46
  'bundle_id': 1,
46
47
  })
47
48
  ```
@@ -49,6 +50,7 @@ await BundleRegistration.list({
49
50
 
50
51
  ### Parameters
51
52
 
53
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
52
54
  * `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.
53
55
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
54
56
  * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `bundle_id`.
@@ -35,6 +35,6 @@ await UserCipherUse.list({
35
35
 
36
36
  ### Parameters
37
37
 
38
- * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
38
+ * `user_id` (int64): User ID. If provided, will return uses for this user.
39
39
  * `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.
40
40
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
@@ -31,6 +31,6 @@ await UserSftpClientUse.list({
31
31
 
32
32
  ### Parameters
33
33
 
34
- * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
34
+ * `user_id` (int64): User ID. If provided, will return uses for this user.
35
35
  * `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.
36
36
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
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.240';
15
+ var version = '1.2.241';
16
16
  var userAgent = "Files.com JavaScript SDK v".concat(version);
17
17
  var logLevel = _Logger.LogLevel.INFO;
18
18
  var debugRequest = false;
@@ -99,6 +99,7 @@ var AutomationRun = /*#__PURE__*/(0, _createClass2.default)(function AutomationR
99
99
  });
100
100
  _AutomationRun = AutomationRun;
101
101
  // Parameters:
102
+ // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
102
103
  // 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.
103
104
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
104
105
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`.
@@ -121,32 +122,38 @@ _AutomationRun = AutomationRun;
121
122
  }
122
123
  throw new errors.MissingParameterError('Parameter missing: automation_id');
123
124
  case 4:
124
- if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
125
+ if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
125
126
  _context.next = 6;
126
127
  break;
127
128
  }
128
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
129
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
129
130
  case 6:
130
- if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
131
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
131
132
  _context.next = 8;
132
133
  break;
133
134
  }
134
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
135
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
135
136
  case 8:
136
- if (!(params.automation_id && !(0, _utils.isInt)(params.automation_id))) {
137
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
137
138
  _context.next = 10;
138
139
  break;
139
140
  }
140
- throw new errors.InvalidParameterError("Bad parameter: automation_id must be of type Int, received ".concat((0, _utils.getType)(params.automation_id)));
141
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
141
142
  case 10:
142
- _context.next = 12;
143
- return _Api.default.sendRequest('/automation_runs', 'GET', params, options);
143
+ if (!(params.automation_id && !(0, _utils.isInt)(params.automation_id))) {
144
+ _context.next = 12;
145
+ break;
146
+ }
147
+ throw new errors.InvalidParameterError("Bad parameter: automation_id must be of type Int, received ".concat((0, _utils.getType)(params.automation_id)));
144
148
  case 12:
149
+ _context.next = 14;
150
+ return _Api.default.sendRequest('/automation_runs', 'GET', params, options);
151
+ case 14:
145
152
  response = _context.sent;
146
153
  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) {
147
154
  return new _AutomationRun(obj, options);
148
155
  })) || []);
149
- case 14:
156
+ case 16:
150
157
  case "end":
151
158
  return _context.stop();
152
159
  }
@@ -71,6 +71,7 @@ var BundleAction = /*#__PURE__*/(0, _createClass2.default)(function BundleAction
71
71
  });
72
72
  _BundleAction = BundleAction;
73
73
  // Parameters:
74
+ // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
74
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.
75
76
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
76
77
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`.
@@ -90,26 +91,32 @@ _BundleAction = BundleAction;
90
91
  case 0:
91
92
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
92
93
  options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
93
- if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
94
+ if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
94
95
  _context.next = 4;
95
96
  break;
96
97
  }
97
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
98
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
98
99
  case 4:
99
- if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
100
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
100
101
  _context.next = 6;
101
102
  break;
102
103
  }
103
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
104
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
104
105
  case 6:
105
- _context.next = 8;
106
- return _Api.default.sendRequest('/bundle_actions', 'GET', params, options);
106
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
107
+ _context.next = 8;
108
+ break;
109
+ }
110
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
107
111
  case 8:
112
+ _context.next = 10;
113
+ return _Api.default.sendRequest('/bundle_actions', 'GET', params, options);
114
+ case 10:
108
115
  response = _context.sent;
109
116
  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) {
110
117
  return new _BundleAction(obj, options);
111
118
  })) || []);
112
- case 10:
119
+ case 12:
113
120
  case "end":
114
121
  return _context.stop();
115
122
  }
@@ -99,6 +99,7 @@ var BundleRegistration = /*#__PURE__*/(0, _createClass2.default)(function Bundle
99
99
  });
100
100
  _BundleRegistration = BundleRegistration;
101
101
  // Parameters:
102
+ // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
102
103
  // 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.
103
104
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
104
105
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `bundle_id`.
@@ -114,32 +115,38 @@ _BundleRegistration = BundleRegistration;
114
115
  case 0:
115
116
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
116
117
  options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
117
- if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
118
+ if (!(params.user_id && !(0, _utils.isInt)(params.user_id))) {
118
119
  _context.next = 4;
119
120
  break;
120
121
  }
121
- throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
122
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params.user_id)));
122
123
  case 4:
123
- if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
124
+ if (!(params.cursor && !(0, _utils.isString)(params.cursor))) {
124
125
  _context.next = 6;
125
126
  break;
126
127
  }
127
- throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
128
+ throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params.cursor)));
128
129
  case 6:
129
- if (!(params.bundle_id && !(0, _utils.isInt)(params.bundle_id))) {
130
+ if (!(params.per_page && !(0, _utils.isInt)(params.per_page))) {
130
131
  _context.next = 8;
131
132
  break;
132
133
  }
133
- throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params.bundle_id)));
134
+ throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
134
135
  case 8:
135
- _context.next = 10;
136
- return _Api.default.sendRequest('/bundle_registrations', 'GET', params, options);
136
+ if (!(params.bundle_id && !(0, _utils.isInt)(params.bundle_id))) {
137
+ _context.next = 10;
138
+ break;
139
+ }
140
+ throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params.bundle_id)));
137
141
  case 10:
142
+ _context.next = 12;
143
+ return _Api.default.sendRequest('/bundle_registrations', 'GET', params, options);
144
+ case 12:
138
145
  response = _context.sent;
139
146
  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) {
140
147
  return new _BundleRegistration(obj, options);
141
148
  })) || []);
142
- case 12:
149
+ case 14:
143
150
  case "end":
144
151
  return _context.stop();
145
152
  }
@@ -75,7 +75,7 @@ var UserCipherUse = /*#__PURE__*/(0, _createClass2.default)(function UserCipherU
75
75
  });
76
76
  _UserCipherUse = UserCipherUse;
77
77
  // Parameters:
78
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
78
+ // user_id - int64 - User ID. If provided, will return uses for this user.
79
79
  // 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.
80
80
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
81
81
  (0, _defineProperty2.default)(UserCipherUse, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
@@ -67,7 +67,7 @@ var UserSftpClientUse = /*#__PURE__*/(0, _createClass2.default)(function UserSft
67
67
  });
68
68
  _UserSftpClientUse = UserSftpClientUse;
69
69
  // Parameters:
70
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
70
+ // user_id - int64 - User ID. If provided, will return uses for this user.
71
71
  // 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.
72
72
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
73
73
  (0, _defineProperty2.default)(UserSftpClientUse, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.240",
3
+ "version": "1.2.241",
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.240'
9
+ const version = '1.2.241'
10
10
  let userAgent = `Files.com JavaScript SDK v${version}`
11
11
 
12
12
  let logLevel = LogLevel.INFO
@@ -68,6 +68,7 @@ class AutomationRun {
68
68
  getStatusMessagesUrl = () => this.attributes.status_messages_url
69
69
 
70
70
  // Parameters:
71
+ // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
71
72
  // 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.
72
73
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
73
74
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`.
@@ -78,6 +79,10 @@ class AutomationRun {
78
79
  throw new errors.MissingParameterError('Parameter missing: automation_id')
79
80
  }
80
81
 
82
+ if (params.user_id && !isInt(params.user_id)) {
83
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params.user_id)}`)
84
+ }
85
+
81
86
  if (params.cursor && !isString(params.cursor)) {
82
87
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params.cursor)}`)
83
88
  }
@@ -47,6 +47,7 @@ class BundleAction {
47
47
  getSource = () => this.attributes.source
48
48
 
49
49
  // Parameters:
50
+ // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
50
51
  // 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
52
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
52
53
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`.
@@ -56,6 +57,10 @@ class BundleAction {
56
57
  // filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
57
58
  // 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
59
  static list = async (params = {}, options = {}) => {
60
+ if (params.user_id && !isInt(params.user_id)) {
61
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params.user_id)}`)
62
+ }
63
+
59
64
  if (params.cursor && !isString(params.cursor)) {
60
65
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params.cursor)}`)
61
66
  }
@@ -68,11 +68,16 @@ class BundleRegistration {
68
68
  getCreatedAt = () => this.attributes.created_at
69
69
 
70
70
  // Parameters:
71
+ // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
71
72
  // 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.
72
73
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
73
74
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `bundle_id`.
74
75
  // bundle_id - int64 - ID of the associated Bundle
75
76
  static list = async (params = {}, options = {}) => {
77
+ if (params.user_id && !isInt(params.user_id)) {
78
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params.user_id)}`)
79
+ }
80
+
76
81
  if (params.cursor && !isString(params.cursor)) {
77
82
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params.cursor)}`)
78
83
  }
@@ -50,7 +50,7 @@ class UserCipherUse {
50
50
  getUserId = () => this.attributes.user_id
51
51
 
52
52
  // Parameters:
53
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
53
+ // user_id - int64 - User ID. If provided, will return uses for this user.
54
54
  // 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.
55
55
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
56
56
  static list = async (params = {}, options = {}) => {
@@ -44,7 +44,7 @@ class UserSftpClientUse {
44
44
  getUserId = () => this.attributes.user_id
45
45
 
46
46
  // Parameters:
47
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
47
+ // user_id - int64 - User ID. If provided, will return uses for this user.
48
48
  // 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.
49
49
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
50
50
  static list = async (params = {}, options = {}) => {