files.com 1.0.453 → 1.0.455

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.0.453
1
+ 1.0.455
@@ -26,7 +26,6 @@
26
26
 
27
27
  ```
28
28
  await AutomationRun.list({
29
- 'user_id': 1,
30
29
  'per_page': 1,
31
30
  'automation_id': 1,
32
31
  })
@@ -35,7 +34,6 @@ await AutomationRun.list({
35
34
 
36
35
  ### Parameters
37
36
 
38
- * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
39
37
  * `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
38
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
41
39
  * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction (e.g. `sort_by[automation_id]=desc`). Valid fields are `automation_id`, `created_at` or `status`.
@@ -24,7 +24,6 @@
24
24
 
25
25
  ```
26
26
  await BundleNotification.list({
27
- 'user_id': 1,
28
27
  'per_page': 1,
29
28
  })
30
29
  ```
@@ -32,7 +31,6 @@ await BundleNotification.list({
32
31
 
33
32
  ### Parameters
34
33
 
35
- * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
36
34
  * `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.
37
35
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
38
36
  * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction (e.g. `sort_by[bundle_id]=desc`). Valid fields are `bundle_id`.
@@ -57,20 +55,20 @@ await BundleNotification.find(id)
57
55
 
58
56
  ```
59
57
  await BundleNotification.create({
60
- 'user_id': 1,
61
58
  'notify_on_registration': true,
62
59
  'notify_on_upload': true,
63
60
  'bundle_id': 1,
61
+ 'user_id': 1,
64
62
  })
65
63
  ```
66
64
 
67
65
 
68
66
  ### Parameters
69
67
 
70
- * `user_id` (int64): The id of the user to notify.
71
68
  * `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
72
69
  * `notify_on_upload` (boolean): Triggers bundle notification when a upload action occurs for it.
73
70
  * `bundle_id` (int64): Required - Bundle ID to notify on
71
+ * `user_id` (int64): The id of the user to notify.
74
72
 
75
73
  ---
76
74
 
@@ -17,7 +17,6 @@
17
17
  * `note` (string): A note sent to the recipient with the bundle.
18
18
  * `recipient` (string): The recipient's email address.
19
19
  * `sent_at` (date-time): When the Bundle was shared with this recipient.
20
- * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
21
20
  * `bundle_id` (int64): Bundle to share.
22
21
  * `share_after_create` (boolean): Set to true to share the link with the recipient upon creation.
23
22
 
@@ -27,7 +26,6 @@
27
26
 
28
27
  ```
29
28
  await BundleRecipient.list({
30
- 'user_id': 1,
31
29
  'per_page': 1,
32
30
  'bundle_id': 1,
33
31
  })
@@ -36,7 +34,6 @@ await BundleRecipient.list({
36
34
 
37
35
  ### Parameters
38
36
 
39
- * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
40
37
  * `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.
41
38
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
42
39
  * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction (e.g. `sort_by[has_registrations]=desc`). Valid fields are `has_registrations`.
@@ -49,7 +46,6 @@ await BundleRecipient.list({
49
46
 
50
47
  ```
51
48
  await BundleRecipient.create({
52
- 'user_id': 1,
53
49
  'bundle_id': 1,
54
50
  'recipient': "johndoe@gmail.com",
55
51
  'name': "John Smith",
@@ -62,7 +58,6 @@ await BundleRecipient.create({
62
58
 
63
59
  ### Parameters
64
60
 
65
- * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
66
61
  * `bundle_id` (int64): Required - Bundle to share.
67
62
  * `recipient` (string): Required - Email addresses to share this bundle with.
68
63
  * `name` (string): Name of recipient.
@@ -42,7 +42,6 @@
42
42
 
43
43
  ```
44
44
  await BundleRegistration.list({
45
- 'user_id': 1,
46
45
  'per_page': 1,
47
46
  'bundle_id': 1,
48
47
  })
@@ -51,7 +50,6 @@ await BundleRegistration.list({
51
50
 
52
51
  ### Parameters
53
52
 
54
- * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
55
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.
56
54
  * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
57
55
  * `bundle_id` (int64): ID of the associated Bundle
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.0.453';
14
+ var version = '1.0.455';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -72,7 +72,6 @@ var AutomationRun = /*#__PURE__*/(0, _createClass2.default)(function AutomationR
72
72
  });
73
73
  _class = AutomationRun;
74
74
  // Parameters:
75
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
76
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.
77
76
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
78
77
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction (e.g. `sort_by[automation_id]=desc`). Valid fields are `automation_id`, `created_at` or `status`.
@@ -95,38 +94,32 @@ _class = AutomationRun;
95
94
  }
96
95
  throw new errors.MissingParameterError('Parameter missing: automation_id');
97
96
  case 4:
98
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
99
- _context.next = 6;
100
- break;
101
- }
102
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
103
- case 6:
104
97
  if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
105
- _context.next = 8;
98
+ _context.next = 6;
106
99
  break;
107
100
  }
108
101
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
109
- case 8:
102
+ case 6:
110
103
  if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
111
- _context.next = 10;
104
+ _context.next = 8;
112
105
  break;
113
106
  }
114
107
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
115
- case 10:
108
+ case 8:
116
109
  if (!(params['automation_id'] && !(0, _utils.isInt)(params['automation_id']))) {
117
- _context.next = 12;
110
+ _context.next = 10;
118
111
  break;
119
112
  }
120
113
  throw new errors.InvalidParameterError("Bad parameter: automation_id must be of type Int, received ".concat((0, _utils.getType)(params['automation_id'])));
121
- case 12:
122
- _context.next = 14;
114
+ case 10:
115
+ _context.next = 12;
123
116
  return _Api.default.sendRequest("/automation_runs", 'GET', params, options);
124
- case 14:
117
+ case 12:
125
118
  response = _context.sent;
126
119
  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) {
127
120
  return new _class(obj, options);
128
121
  })) || []);
129
- case 16:
122
+ case 14:
130
123
  case "end":
131
124
  return _context.stop();
132
125
  }
@@ -203,7 +203,6 @@ var BundleNotification = /*#__PURE__*/(0, _createClass2.default)(function Bundle
203
203
  });
204
204
  _class = BundleNotification;
205
205
  // Parameters:
206
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
207
206
  // 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.
208
207
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
209
208
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction (e.g. `sort_by[bundle_id]=desc`). Valid fields are `bundle_id`.
@@ -219,32 +218,26 @@ _class = BundleNotification;
219
218
  case 0:
220
219
  params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
221
220
  options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
222
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
223
- _context3.next = 4;
224
- break;
225
- }
226
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
227
- case 4:
228
221
  if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
229
- _context3.next = 6;
222
+ _context3.next = 4;
230
223
  break;
231
224
  }
232
225
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
233
- case 6:
226
+ case 4:
234
227
  if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
235
- _context3.next = 8;
228
+ _context3.next = 6;
236
229
  break;
237
230
  }
238
231
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
239
- case 8:
240
- _context3.next = 10;
232
+ case 6:
233
+ _context3.next = 8;
241
234
  return _Api.default.sendRequest("/bundle_notifications", 'GET', params, options);
242
- case 10:
235
+ case 8:
243
236
  response = _context3.sent;
244
237
  return _context3.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
245
238
  return new _class(obj, options);
246
239
  })) || []);
247
- case 12:
240
+ case 10:
248
241
  case "end":
249
242
  return _context3.stop();
250
243
  }
@@ -308,10 +301,10 @@ _class = BundleNotification;
308
301
  return _class.find(id, params, options);
309
302
  });
310
303
  // Parameters:
311
- // user_id - int64 - The id of the user to notify.
312
304
  // notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
313
305
  // notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
314
306
  // bundle_id (required) - int64 - Bundle ID to notify on
307
+ // user_id - int64 - The id of the user to notify.
315
308
  (0, _defineProperty2.default)(BundleNotification, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
316
309
  var params,
317
310
  options,
@@ -328,17 +321,17 @@ _class = BundleNotification;
328
321
  }
329
322
  throw new errors.MissingParameterError('Parameter missing: bundle_id');
330
323
  case 4:
331
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
324
+ if (!(params['bundle_id'] && !(0, _utils.isInt)(params['bundle_id']))) {
332
325
  _context5.next = 6;
333
326
  break;
334
327
  }
335
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
328
+ throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params['bundle_id'])));
336
329
  case 6:
337
- if (!(params['bundle_id'] && !(0, _utils.isInt)(params['bundle_id']))) {
330
+ if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
338
331
  _context5.next = 8;
339
332
  break;
340
333
  }
341
- throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params['bundle_id'])));
334
+ throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
342
335
  case 8:
343
336
  _context5.next = 10;
344
337
  return _Api.default.sendRequest("/bundle_notifications", 'POST', params, options);
@@ -68,13 +68,6 @@ var BundleRecipient = /*#__PURE__*/(0, _createClass2.default)(function BundleRec
68
68
  (0, _defineProperty2.default)(this, "setSentAt", function (value) {
69
69
  _this.attributes.sent_at = value;
70
70
  });
71
- // int64 # User ID. Provide a value of `0` to operate the current session's user.
72
- (0, _defineProperty2.default)(this, "getUserId", function () {
73
- return _this.attributes.user_id;
74
- });
75
- (0, _defineProperty2.default)(this, "setUserId", function (value) {
76
- _this.attributes.user_id = value;
77
- });
78
71
  // int64 # Bundle to share.
79
72
  (0, _defineProperty2.default)(this, "getBundleId", function () {
80
73
  return _this.attributes.bundle_id;
@@ -113,7 +106,6 @@ var BundleRecipient = /*#__PURE__*/(0, _createClass2.default)(function BundleRec
113
106
  });
114
107
  _class = BundleRecipient;
115
108
  // Parameters:
116
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
117
109
  // 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.
118
110
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
119
111
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction (e.g. `sort_by[has_registrations]=desc`). Valid fields are `has_registrations`.
@@ -136,38 +128,32 @@ _class = BundleRecipient;
136
128
  }
137
129
  throw new errors.MissingParameterError('Parameter missing: bundle_id');
138
130
  case 4:
139
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
140
- _context.next = 6;
141
- break;
142
- }
143
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
144
- case 6:
145
131
  if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
146
- _context.next = 8;
132
+ _context.next = 6;
147
133
  break;
148
134
  }
149
135
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
150
- case 8:
136
+ case 6:
151
137
  if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
152
- _context.next = 10;
138
+ _context.next = 8;
153
139
  break;
154
140
  }
155
141
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
156
- case 10:
142
+ case 8:
157
143
  if (!(params['bundle_id'] && !(0, _utils.isInt)(params['bundle_id']))) {
158
- _context.next = 12;
144
+ _context.next = 10;
159
145
  break;
160
146
  }
161
147
  throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params['bundle_id'])));
162
- case 12:
163
- _context.next = 14;
148
+ case 10:
149
+ _context.next = 12;
164
150
  return _Api.default.sendRequest("/bundle_recipients", 'GET', params, options);
165
- case 14:
151
+ case 12:
166
152
  response = _context.sent;
167
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) {
168
154
  return new _class(obj, options);
169
155
  })) || []);
170
- case 16:
156
+ case 14:
171
157
  case "end":
172
158
  return _context.stop();
173
159
  }
@@ -179,7 +165,6 @@ _class = BundleRecipient;
179
165
  return _class.list(params, options);
180
166
  });
181
167
  // Parameters:
182
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
183
168
  // bundle_id (required) - int64 - Bundle to share.
184
169
  // recipient (required) - string - Email addresses to share this bundle with.
185
170
  // name - string - Name of recipient.
@@ -208,48 +193,42 @@ _class = BundleRecipient;
208
193
  }
209
194
  throw new errors.MissingParameterError('Parameter missing: recipient');
210
195
  case 6:
211
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
212
- _context2.next = 8;
213
- break;
214
- }
215
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
216
- case 8:
217
196
  if (!(params['bundle_id'] && !(0, _utils.isInt)(params['bundle_id']))) {
218
- _context2.next = 10;
197
+ _context2.next = 8;
219
198
  break;
220
199
  }
221
200
  throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params['bundle_id'])));
222
- case 10:
201
+ case 8:
223
202
  if (!(params['recipient'] && !(0, _utils.isString)(params['recipient']))) {
224
- _context2.next = 12;
203
+ _context2.next = 10;
225
204
  break;
226
205
  }
227
206
  throw new errors.InvalidParameterError("Bad parameter: recipient must be of type String, received ".concat((0, _utils.getType)(params['recipient'])));
228
- case 12:
207
+ case 10:
229
208
  if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
230
- _context2.next = 14;
209
+ _context2.next = 12;
231
210
  break;
232
211
  }
233
212
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
234
- case 14:
213
+ case 12:
235
214
  if (!(params['company'] && !(0, _utils.isString)(params['company']))) {
236
- _context2.next = 16;
215
+ _context2.next = 14;
237
216
  break;
238
217
  }
239
218
  throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params['company'])));
240
- case 16:
219
+ case 14:
241
220
  if (!(params['note'] && !(0, _utils.isString)(params['note']))) {
242
- _context2.next = 18;
221
+ _context2.next = 16;
243
222
  break;
244
223
  }
245
224
  throw new errors.InvalidParameterError("Bad parameter: note must be of type String, received ".concat((0, _utils.getType)(params['note'])));
246
- case 18:
247
- _context2.next = 20;
225
+ case 16:
226
+ _context2.next = 18;
248
227
  return _Api.default.sendRequest("/bundle_recipients", 'POST', params, options);
249
- case 20:
228
+ case 18:
250
229
  response = _context2.sent;
251
230
  return _context2.abrupt("return", new _class(response === null || response === void 0 ? void 0 : response.data, options));
252
- case 22:
231
+ case 20:
253
232
  case "end":
254
233
  return _context2.stop();
255
234
  }
@@ -100,7 +100,6 @@ var BundleRegistration = /*#__PURE__*/(0, _createClass2.default)(function Bundle
100
100
  });
101
101
  _class = BundleRegistration;
102
102
  // Parameters:
103
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
104
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.
105
104
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
106
105
  // bundle_id - int64 - ID of the associated Bundle
@@ -115,38 +114,32 @@ _class = BundleRegistration;
115
114
  case 0:
116
115
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
117
116
  options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
118
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
119
- _context.next = 4;
120
- break;
121
- }
122
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
123
- case 4:
124
117
  if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
125
- _context.next = 6;
118
+ _context.next = 4;
126
119
  break;
127
120
  }
128
121
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
129
- case 6:
122
+ case 4:
130
123
  if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
131
- _context.next = 8;
124
+ _context.next = 6;
132
125
  break;
133
126
  }
134
127
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
135
- case 8:
128
+ case 6:
136
129
  if (!(params['bundle_id'] && !(0, _utils.isInt)(params['bundle_id']))) {
137
- _context.next = 10;
130
+ _context.next = 8;
138
131
  break;
139
132
  }
140
133
  throw new errors.InvalidParameterError("Bad parameter: bundle_id must be of type Int, received ".concat((0, _utils.getType)(params['bundle_id'])));
141
- case 10:
142
- _context.next = 12;
134
+ case 8:
135
+ _context.next = 10;
143
136
  return _Api.default.sendRequest("/bundle_registrations", 'GET', params, options);
144
- case 12:
137
+ case 10:
145
138
  response = _context.sent;
146
139
  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
140
  return new _class(obj, options);
148
141
  })) || []);
149
- case 14:
142
+ case 12:
150
143
  case "end":
151
144
  return _context.stop();
152
145
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.0.453",
3
+ "version": "1.0.455",
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.0.453'
8
+ const version = '1.0.455'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -44,7 +44,6 @@ class AutomationRun {
44
44
 
45
45
 
46
46
  // Parameters:
47
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
48
47
  // 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
48
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
50
49
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction (e.g. `sort_by[automation_id]=desc`). Valid fields are `automation_id`, `created_at` or `status`.
@@ -55,10 +54,6 @@ class AutomationRun {
55
54
  throw new errors.MissingParameterError('Parameter missing: automation_id')
56
55
  }
57
56
 
58
- if (params['user_id'] && !isInt(params['user_id'])) {
59
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
60
- }
61
-
62
57
  if (params['cursor'] && !isString(params['cursor'])) {
63
58
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params['cursor'])}`)
64
59
  }
@@ -132,16 +132,11 @@ class BundleNotification {
132
132
  }
133
133
 
134
134
  // Parameters:
135
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
136
135
  // 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.
137
136
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
138
137
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction (e.g. `sort_by[bundle_id]=desc`). Valid fields are `bundle_id`.
139
138
  // filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `bundle_id`.
140
139
  static list = async (params = {}, options = {}) => {
141
- if (params['user_id'] && !isInt(params['user_id'])) {
142
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
143
- }
144
-
145
140
  if (params['cursor'] && !isString(params['cursor'])) {
146
141
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params['cursor'])}`)
147
142
  }
@@ -186,23 +181,23 @@ class BundleNotification {
186
181
  BundleNotification.find(id, params, options)
187
182
 
188
183
  // Parameters:
189
- // user_id - int64 - The id of the user to notify.
190
184
  // notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
191
185
  // notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
192
186
  // bundle_id (required) - int64 - Bundle ID to notify on
187
+ // user_id - int64 - The id of the user to notify.
193
188
  static create = async (params = {}, options = {}) => {
194
189
  if (!params['bundle_id']) {
195
190
  throw new errors.MissingParameterError('Parameter missing: bundle_id')
196
191
  }
197
192
 
198
- if (params['user_id'] && !isInt(params['user_id'])) {
199
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
200
- }
201
-
202
193
  if (params['bundle_id'] && !isInt(params['bundle_id'])) {
203
194
  throw new errors.InvalidParameterError(`Bad parameter: bundle_id must be of type Int, received ${getType(params['bundle_id'])}`)
204
195
  }
205
196
 
197
+ if (params['user_id'] && !isInt(params['user_id'])) {
198
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
199
+ }
200
+
206
201
  const response = await Api.sendRequest(`/bundle_notifications`, 'POST', params, options)
207
202
 
208
203
 
@@ -59,13 +59,6 @@ class BundleRecipient {
59
59
  this.attributes.sent_at = value
60
60
  }
61
61
 
62
- // int64 # User ID. Provide a value of `0` to operate the current session's user.
63
- getUserId = () => this.attributes.user_id
64
-
65
- setUserId = value => {
66
- this.attributes.user_id = value
67
- }
68
-
69
62
  // int64 # Bundle to share.
70
63
  getBundleId = () => this.attributes.bundle_id
71
64
 
@@ -92,7 +85,6 @@ class BundleRecipient {
92
85
  }
93
86
 
94
87
  // Parameters:
95
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
96
88
  // 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.
97
89
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
98
90
  // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction (e.g. `sort_by[has_registrations]=desc`). Valid fields are `has_registrations`.
@@ -103,10 +95,6 @@ class BundleRecipient {
103
95
  throw new errors.MissingParameterError('Parameter missing: bundle_id')
104
96
  }
105
97
 
106
- if (params['user_id'] && !isInt(params['user_id'])) {
107
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
108
- }
109
-
110
98
  if (params['cursor'] && !isString(params['cursor'])) {
111
99
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params['cursor'])}`)
112
100
  }
@@ -129,7 +117,6 @@ class BundleRecipient {
129
117
  BundleRecipient.list(params, options)
130
118
 
131
119
  // Parameters:
132
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
133
120
  // bundle_id (required) - int64 - Bundle to share.
134
121
  // recipient (required) - string - Email addresses to share this bundle with.
135
122
  // name - string - Name of recipient.
@@ -145,10 +132,6 @@ class BundleRecipient {
145
132
  throw new errors.MissingParameterError('Parameter missing: recipient')
146
133
  }
147
134
 
148
- if (params['user_id'] && !isInt(params['user_id'])) {
149
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
150
- }
151
-
152
135
  if (params['bundle_id'] && !isInt(params['bundle_id'])) {
153
136
  throw new errors.InvalidParameterError(`Bad parameter: bundle_id must be of type Int, received ${getType(params['bundle_id'])}`)
154
137
  }
@@ -65,15 +65,10 @@ class BundleRegistration {
65
65
 
66
66
 
67
67
  // Parameters:
68
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
69
68
  // 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.
70
69
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
71
70
  // bundle_id - int64 - ID of the associated Bundle
72
71
  static list = async (params = {}, options = {}) => {
73
- if (params['user_id'] && !isInt(params['user_id'])) {
74
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
75
- }
76
-
77
72
  if (params['cursor'] && !isString(params['cursor'])) {
78
73
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params['cursor'])}`)
79
74
  }