files.com 1.0.255 → 1.0.256

Sign up to get free protection for your applications and to get access to all the features.
package/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.255
1
+ 1.0.256
@@ -322,6 +322,7 @@ await file.begin_upload({
322
322
  "http_method": "PUT",
323
323
  "next_partsize": 1,
324
324
  "parallel_parts": true,
325
+ "retry_parts": true,
325
326
  "parameters": {
326
327
  "key": "example value"
327
328
  },
@@ -17,6 +17,7 @@
17
17
  "http_method": "PUT",
18
18
  "next_partsize": 1,
19
19
  "parallel_parts": true,
20
+ "retry_parts": true,
20
21
  "parameters": {
21
22
  "key": "example value"
22
23
  },
@@ -37,6 +38,7 @@
37
38
  * `http_method` (string): HTTP Method to use for uploading the part, usually `PUT`
38
39
  * `next_partsize` (int64): Size in bytes for this part
39
40
  * `parallel_parts` (boolean): If `true`, multiple parts may be uploaded in parallel. If `false`, be sure to only upload one part at a time, in order.
41
+ * `retry_parts` (boolean): If `true`, parts may be retried. If `false`, a part cannot be retried and the upload should be restarted.
40
42
  * `parameters` (object): Additional HTTP parameters to send with the upload
41
43
  * `part_number` (int64): Number of this upload part
42
44
  * `partsize` (int64): Size in bytes for the next upload part
@@ -17,7 +17,6 @@
17
17
  * `note` (string): A note sent to the recipient with the inbox.
18
18
  * `recipient` (string): The recipient's email address.
19
19
  * `sent_at` (date-time): When the Inbox 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
  * `inbox_id` (int64): Inbox 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 InboxRecipient.list({
30
- 'user_id': 1,
31
29
  'per_page': 1,
32
30
  'inbox_id': 1,
33
31
  })
@@ -36,7 +34,6 @@ await InboxRecipient.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 InboxRecipient.list({
49
46
 
50
47
  ```
51
48
  await InboxRecipient.create({
52
- 'user_id': 1,
53
49
  'inbox_id': 1,
54
50
  'recipient': "johndoe@gmail.com",
55
51
  'name': "John Smith",
@@ -62,7 +58,6 @@ await InboxRecipient.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
  * `inbox_id` (int64): Required - Inbox to share.
67
62
  * `recipient` (string): Required - Email address to share this inbox with.
68
63
  * `name` (string): Name of recipient.
@@ -65,6 +65,10 @@ var FileUploadPart = /*#__PURE__*/(0, _createClass2.default)(function FileUpload
65
65
  (0, _defineProperty2.default)(this, "getParallelParts", function () {
66
66
  return _this.attributes.parallel_parts;
67
67
  });
68
+ // boolean # If `true`, parts may be retried. If `false`, a part cannot be retried and the upload should be restarted.
69
+ (0, _defineProperty2.default)(this, "getRetryParts", function () {
70
+ return _this.attributes.retry_parts;
71
+ });
68
72
  // object # Additional HTTP parameters to send with the upload
69
73
  (0, _defineProperty2.default)(this, "getParameters", function () {
70
74
  return _this.attributes.parameters;
@@ -66,13 +66,6 @@ var InboxRecipient = /*#__PURE__*/(0, _createClass2.default)(function InboxRecip
66
66
  (0, _defineProperty2.default)(this, "setSentAt", function (value) {
67
67
  _this.attributes.sent_at = value;
68
68
  });
69
- // int64 # User ID. Provide a value of `0` to operate the current session's user.
70
- (0, _defineProperty2.default)(this, "getUserId", function () {
71
- return _this.attributes.user_id;
72
- });
73
- (0, _defineProperty2.default)(this, "setUserId", function (value) {
74
- _this.attributes.user_id = value;
75
- });
76
69
  // int64 # Inbox to share.
77
70
  (0, _defineProperty2.default)(this, "getInboxId", function () {
78
71
  return _this.attributes.inbox_id;
@@ -110,7 +103,6 @@ var InboxRecipient = /*#__PURE__*/(0, _createClass2.default)(function InboxRecip
110
103
  this.options = _objectSpread({}, options);
111
104
  });
112
105
  // Parameters:
113
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
114
106
  // 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.
115
107
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
116
108
  // 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`.
@@ -133,38 +125,32 @@ var InboxRecipient = /*#__PURE__*/(0, _createClass2.default)(function InboxRecip
133
125
  }
134
126
  throw new errors.MissingParameterError('Parameter missing: inbox_id');
135
127
  case 4:
136
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
137
- _context.next = 6;
138
- break;
139
- }
140
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
141
- case 6:
142
128
  if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
143
- _context.next = 8;
129
+ _context.next = 6;
144
130
  break;
145
131
  }
146
132
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
147
- case 8:
133
+ case 6:
148
134
  if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
149
- _context.next = 10;
135
+ _context.next = 8;
150
136
  break;
151
137
  }
152
138
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
153
- case 10:
139
+ case 8:
154
140
  if (!(params['inbox_id'] && !(0, _utils.isInt)(params['inbox_id']))) {
155
- _context.next = 12;
141
+ _context.next = 10;
156
142
  break;
157
143
  }
158
144
  throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params['inbox_id'])));
159
- case 12:
160
- _context.next = 14;
145
+ case 10:
146
+ _context.next = 12;
161
147
  return _Api.default.sendRequest("/inbox_recipients", 'GET', params, options);
162
- case 14:
148
+ case 12:
163
149
  response = _context.sent;
164
150
  return _context.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
165
151
  return new InboxRecipient(obj, options);
166
152
  })) || []);
167
- case 16:
153
+ case 14:
168
154
  case "end":
169
155
  return _context.stop();
170
156
  }
@@ -176,7 +162,6 @@ var InboxRecipient = /*#__PURE__*/(0, _createClass2.default)(function InboxRecip
176
162
  return InboxRecipient.list(params, options);
177
163
  });
178
164
  // Parameters:
179
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
180
165
  // inbox_id (required) - int64 - Inbox to share.
181
166
  // recipient (required) - string - Email address to share this inbox with.
182
167
  // name - string - Name of recipient.
@@ -205,48 +190,42 @@ var InboxRecipient = /*#__PURE__*/(0, _createClass2.default)(function InboxRecip
205
190
  }
206
191
  throw new errors.MissingParameterError('Parameter missing: recipient');
207
192
  case 6:
208
- if (!(params['user_id'] && !(0, _utils.isInt)(params['user_id']))) {
209
- _context2.next = 8;
210
- break;
211
- }
212
- throw new errors.InvalidParameterError("Bad parameter: user_id must be of type Int, received ".concat((0, _utils.getType)(params['user_id'])));
213
- case 8:
214
193
  if (!(params['inbox_id'] && !(0, _utils.isInt)(params['inbox_id']))) {
215
- _context2.next = 10;
194
+ _context2.next = 8;
216
195
  break;
217
196
  }
218
197
  throw new errors.InvalidParameterError("Bad parameter: inbox_id must be of type Int, received ".concat((0, _utils.getType)(params['inbox_id'])));
219
- case 10:
198
+ case 8:
220
199
  if (!(params['recipient'] && !(0, _utils.isString)(params['recipient']))) {
221
- _context2.next = 12;
200
+ _context2.next = 10;
222
201
  break;
223
202
  }
224
203
  throw new errors.InvalidParameterError("Bad parameter: recipient must be of type String, received ".concat((0, _utils.getType)(params['recipient'])));
225
- case 12:
204
+ case 10:
226
205
  if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
227
- _context2.next = 14;
206
+ _context2.next = 12;
228
207
  break;
229
208
  }
230
209
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
231
- case 14:
210
+ case 12:
232
211
  if (!(params['company'] && !(0, _utils.isString)(params['company']))) {
233
- _context2.next = 16;
212
+ _context2.next = 14;
234
213
  break;
235
214
  }
236
215
  throw new errors.InvalidParameterError("Bad parameter: company must be of type String, received ".concat((0, _utils.getType)(params['company'])));
237
- case 16:
216
+ case 14:
238
217
  if (!(params['note'] && !(0, _utils.isString)(params['note']))) {
239
- _context2.next = 18;
218
+ _context2.next = 16;
240
219
  break;
241
220
  }
242
221
  throw new errors.InvalidParameterError("Bad parameter: note must be of type String, received ".concat((0, _utils.getType)(params['note'])));
243
- case 18:
244
- _context2.next = 20;
222
+ case 16:
223
+ _context2.next = 18;
245
224
  return _Api.default.sendRequest("/inbox_recipients", 'POST', params, options);
246
- case 20:
225
+ case 18:
247
226
  response = _context2.sent;
248
227
  return _context2.abrupt("return", new InboxRecipient(response === null || response === void 0 ? void 0 : response.data, options));
249
- case 22:
228
+ case 20:
250
229
  case "end":
251
230
  return _context2.stop();
252
231
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.0.255",
3
+ "version": "1.0.256",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
@@ -50,6 +50,9 @@ class FileUploadPart {
50
50
  // boolean # If `true`, multiple parts may be uploaded in parallel. If `false`, be sure to only upload one part at a time, in order.
51
51
  getParallelParts = () => this.attributes.parallel_parts
52
52
 
53
+ // boolean # If `true`, parts may be retried. If `false`, a part cannot be retried and the upload should be restarted.
54
+ getRetryParts = () => this.attributes.retry_parts
55
+
53
56
  // object # Additional HTTP parameters to send with the upload
54
57
  getParameters = () => this.attributes.parameters
55
58
 
@@ -58,13 +58,6 @@ class InboxRecipient {
58
58
  this.attributes.sent_at = value
59
59
  }
60
60
 
61
- // int64 # User ID. Provide a value of `0` to operate the current session's user.
62
- getUserId = () => this.attributes.user_id
63
-
64
- setUserId = value => {
65
- this.attributes.user_id = value
66
- }
67
-
68
61
  // int64 # Inbox to share.
69
62
  getInboxId = () => this.attributes.inbox_id
70
63
 
@@ -91,7 +84,6 @@ class InboxRecipient {
91
84
  }
92
85
 
93
86
  // Parameters:
94
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
95
87
  // 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.
96
88
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
97
89
  // 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`.
@@ -102,10 +94,6 @@ class InboxRecipient {
102
94
  throw new errors.MissingParameterError('Parameter missing: inbox_id')
103
95
  }
104
96
 
105
- if (params['user_id'] && !isInt(params['user_id'])) {
106
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
107
- }
108
-
109
97
  if (params['cursor'] && !isString(params['cursor'])) {
110
98
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params['cursor'])}`)
111
99
  }
@@ -127,7 +115,6 @@ class InboxRecipient {
127
115
  InboxRecipient.list(params, options)
128
116
 
129
117
  // Parameters:
130
- // user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
131
118
  // inbox_id (required) - int64 - Inbox to share.
132
119
  // recipient (required) - string - Email address to share this inbox with.
133
120
  // name - string - Name of recipient.
@@ -143,10 +130,6 @@ class InboxRecipient {
143
130
  throw new errors.MissingParameterError('Parameter missing: recipient')
144
131
  }
145
132
 
146
- if (params['user_id'] && !isInt(params['user_id'])) {
147
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
148
- }
149
-
150
133
  if (params['inbox_id'] && !isInt(params['inbox_id'])) {
151
134
  throw new errors.InvalidParameterError(`Bad parameter: inbox_id must be of type Int, received ${getType(params['inbox_id'])}`)
152
135
  }