files.com 1.2.158 → 1.2.160

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.160
@@ -10,6 +10,10 @@
10
10
  "uri": "example",
11
11
  "server_certificate": "require_match",
12
12
  "http_auth_username": "username",
13
+ "additional_http_headers": {
14
+ "key": "example value"
15
+ },
16
+ "default_mime_type": "application/octet-stream",
13
17
  "mdn_validation_level": "none",
14
18
  "enable_dedicated_ips": true,
15
19
  "hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
@@ -28,8 +32,10 @@
28
32
  * `uri` (string): Public URI where we will send the AS2 messages (via HTTP/HTTPS).
29
33
  * `server_certificate` (string): Should we require that the remote HTTP server have a valid SSL Certificate for HTTPS?
30
34
  * `http_auth_username` (string): Username to send to server for HTTP Authentication.
35
+ * `additional_http_headers` (object): Additional HTTP Headers for outgoing message sent to this partner.
36
+ * `default_mime_type` (string): Default mime type of the file attached to the encrypted message
31
37
  * `mdn_validation_level` (string): How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates.
32
- * `enable_dedicated_ips` (boolean): If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 PArtner.
38
+ * `enable_dedicated_ips` (boolean): If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.
33
39
  * `hex_public_certificate_serial` (string): Serial of public certificate used for message security in hex format.
34
40
  * `public_certificate_md5` (string): MD5 hash of public certificate used for message security.
35
41
  * `public_certificate_subject` (string): Subject of public certificate used for message security.
@@ -77,6 +83,8 @@ await As2Partner.create({
77
83
  'http_auth_username': "username",
78
84
  'mdn_validation_level': "none",
79
85
  'server_certificate': "require_match",
86
+ 'default_mime_type': "application/octet-stream",
87
+ 'additional_http_headers': {"key":"example value"},
80
88
  'as2_station_id': 1,
81
89
  'name': "AS2 Partner Name",
82
90
  'uri': "example",
@@ -87,11 +95,13 @@ await As2Partner.create({
87
95
 
88
96
  ### Parameters
89
97
 
90
- * `enable_dedicated_ips` (boolean): If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 PArtner.
98
+ * `enable_dedicated_ips` (boolean): If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.
91
99
  * `http_auth_username` (string): Username to send to server for HTTP Authentication.
92
100
  * `http_auth_password` (string): Password to send to server for HTTP Authentication.
93
101
  * `mdn_validation_level` (string): How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates.
94
102
  * `server_certificate` (string): Should we require that the remote HTTP server have a valid SSL Certificate for HTTPS?
103
+ * `default_mime_type` (string): Default mime type of the file attached to the encrypted message
104
+ * `additional_http_headers` (object): Additional HTTP Headers for outgoing message sent to this partner.
95
105
  * `as2_station_id` (int64): Required - ID of the AS2 Station associated with this partner.
96
106
  * `name` (string): Required - The partner's formal AS2 name.
97
107
  * `uri` (string): Required - Public URI where we will send the AS2 messages (via HTTP/HTTPS).
@@ -109,6 +119,8 @@ await as2_partner.update({
109
119
  'http_auth_username': "username",
110
120
  'mdn_validation_level': "none",
111
121
  'server_certificate': "require_match",
122
+ 'default_mime_type': "application/octet-stream",
123
+ 'additional_http_headers': {"key":"example value"},
112
124
  'name': "AS2 Partner Name",
113
125
  'uri': "example",
114
126
  })
@@ -117,11 +129,13 @@ await as2_partner.update({
117
129
  ### Parameters
118
130
 
119
131
  * `id` (int64): Required - As2 Partner ID.
120
- * `enable_dedicated_ips` (boolean): If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 PArtner.
132
+ * `enable_dedicated_ips` (boolean): If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.
121
133
  * `http_auth_username` (string): Username to send to server for HTTP Authentication.
122
134
  * `http_auth_password` (string): Password to send to server for HTTP Authentication.
123
135
  * `mdn_validation_level` (string): How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates.
124
136
  * `server_certificate` (string): Should we require that the remote HTTP server have a valid SSL Certificate for HTTPS?
137
+ * `default_mime_type` (string): Default mime type of the file attached to the encrypted message
138
+ * `additional_http_headers` (object): Additional HTTP Headers for outgoing message sent to this partner.
125
139
  * `name` (string): The partner's formal AS2 name.
126
140
  * `uri` (string): Public URI where we will send the AS2 messages (via HTTP/HTTPS).
127
141
  * `public_certificate` (string): Public certificate for AS2 Partner. Note: This is the certificate for AS2 message security, not a certificate used for HTTPS authentication.
@@ -136,6 +150,10 @@ await as2_partner.update({
136
150
  "uri": "example",
137
151
  "server_certificate": "require_match",
138
152
  "http_auth_username": "username",
153
+ "additional_http_headers": {
154
+ "key": "example value"
155
+ },
156
+ "default_mime_type": "application/octet-stream",
139
157
  "mdn_validation_level": "none",
140
158
  "enable_dedicated_ips": true,
141
159
  "hex_public_certificate_serial": "A5:EB:C1:95:DC:D8:2B:E7",
@@ -22,6 +22,7 @@
22
22
  "bundle_recipient_id": 1,
23
23
  "created_at": "2000-01-01T01:00:00Z"
24
24
  },
25
+ "created_at": "2000-01-01T01:00:00Z",
25
26
  "when": "2000-01-01T01:00:00Z",
26
27
  "destination": "/to_path",
27
28
  "path": "",
@@ -31,6 +32,7 @@
31
32
 
32
33
  * `action` (string): Type of action
33
34
  * `bundle_registration` (BundleRegistration): Object that contains bundle registration information
35
+ * `created_at` (date-time): Action occurrence date/time
34
36
  * `when` (date-time): Action occurrence date/time
35
37
  * `destination` (string): The destination path for this bundle action, if applicable
36
38
  * `path` (string): Path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
@@ -41,10 +43,7 @@
41
43
  ## List Bundle Actions
42
44
 
43
45
  ```
44
- await BundleAction.list({
45
- 'bundle_id': 1,
46
- 'bundle_registration_id': 1,
47
- })
46
+ await BundleAction.list
48
47
  ```
49
48
 
50
49
 
@@ -52,11 +51,9 @@ await BundleAction.list({
52
51
 
53
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.
54
53
  * `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`.
54
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
55
+ * `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
56
  * `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
58
57
  * `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
58
  * `filter_lt` (object): If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
60
59
  * `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.160';
15
15
  var userAgent = "Files.com JavaScript SDK v".concat(version);
16
16
  var logLevel = _Logger.LogLevel.INFO;
17
17
  var debugRequest = false;
@@ -75,6 +75,20 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
75
75
  (0, _defineProperty2.default)(this, "setHttpAuthUsername", function (value) {
76
76
  _this.attributes.http_auth_username = value;
77
77
  });
78
+ // object # Additional HTTP Headers for outgoing message sent to this partner.
79
+ (0, _defineProperty2.default)(this, "getAdditionalHttpHeaders", function () {
80
+ return _this.attributes.additional_http_headers;
81
+ });
82
+ (0, _defineProperty2.default)(this, "setAdditionalHttpHeaders", function (value) {
83
+ _this.attributes.additional_http_headers = value;
84
+ });
85
+ // string # Default mime type of the file attached to the encrypted message
86
+ (0, _defineProperty2.default)(this, "getDefaultMimeType", function () {
87
+ return _this.attributes.default_mime_type;
88
+ });
89
+ (0, _defineProperty2.default)(this, "setDefaultMimeType", function (value) {
90
+ _this.attributes.default_mime_type = value;
91
+ });
78
92
  // string # How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates.
79
93
  (0, _defineProperty2.default)(this, "getMdnValidationLevel", function () {
80
94
  return _this.attributes.mdn_validation_level;
@@ -82,7 +96,7 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
82
96
  (0, _defineProperty2.default)(this, "setMdnValidationLevel", function (value) {
83
97
  _this.attributes.mdn_validation_level = value;
84
98
  });
85
- // boolean # If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 PArtner.
99
+ // boolean # If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.
86
100
  (0, _defineProperty2.default)(this, "getEnableDedicatedIps", function () {
87
101
  return _this.attributes.enable_dedicated_ips;
88
102
  });
@@ -153,11 +167,13 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
153
167
  _this.attributes.public_certificate = value;
154
168
  });
155
169
  // Parameters:
156
- // enable_dedicated_ips - boolean - If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 PArtner.
170
+ // enable_dedicated_ips - boolean - If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.
157
171
  // http_auth_username - string - Username to send to server for HTTP Authentication.
158
172
  // http_auth_password - string - Password to send to server for HTTP Authentication.
159
173
  // mdn_validation_level - string - How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates.
160
174
  // server_certificate - string - Should we require that the remote HTTP server have a valid SSL Certificate for HTTPS?
175
+ // default_mime_type - string - Default mime type of the file attached to the encrypted message
176
+ // additional_http_headers - object - Additional HTTP Headers for outgoing message sent to this partner.
161
177
  // name - string - The partner's formal AS2 name.
162
178
  // uri - string - Public URI where we will send the AS2 messages (via HTTP/HTTPS).
163
179
  // public_certificate - string - Public certificate for AS2 Partner. Note: This is the certificate for AS2 message security, not a certificate used for HTTPS authentication.
@@ -212,44 +228,50 @@ var As2Partner = /*#__PURE__*/(0, _createClass2.default)(function As2Partner() {
212
228
  }
213
229
  throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params.server_certificate)));
214
230
  case 16:
215
- if (!(params.name && !(0, _utils.isString)(params.name))) {
231
+ if (!(params.default_mime_type && !(0, _utils.isString)(params.default_mime_type))) {
216
232
  _context.next = 18;
217
233
  break;
218
234
  }
219
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
235
+ throw new errors.InvalidParameterError("Bad parameter: default_mime_type must be of type String, received ".concat((0, _utils.getType)(params.default_mime_type)));
220
236
  case 18:
221
- if (!(params.uri && !(0, _utils.isString)(params.uri))) {
237
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
222
238
  _context.next = 20;
223
239
  break;
224
240
  }
225
- throw new errors.InvalidParameterError("Bad parameter: uri must be of type String, received ".concat((0, _utils.getType)(params.uri)));
241
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
226
242
  case 20:
227
- if (!(params.public_certificate && !(0, _utils.isString)(params.public_certificate))) {
243
+ if (!(params.uri && !(0, _utils.isString)(params.uri))) {
228
244
  _context.next = 22;
229
245
  break;
230
246
  }
231
- throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params.public_certificate)));
247
+ throw new errors.InvalidParameterError("Bad parameter: uri must be of type String, received ".concat((0, _utils.getType)(params.uri)));
232
248
  case 22:
249
+ if (!(params.public_certificate && !(0, _utils.isString)(params.public_certificate))) {
250
+ _context.next = 24;
251
+ break;
252
+ }
253
+ throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params.public_certificate)));
254
+ case 24:
233
255
  if (params.id) {
234
- _context.next = 28;
256
+ _context.next = 30;
235
257
  break;
236
258
  }
237
259
  if (!_this.attributes.id) {
238
- _context.next = 27;
260
+ _context.next = 29;
239
261
  break;
240
262
  }
241
263
  params.id = _this.id;
242
- _context.next = 28;
264
+ _context.next = 30;
243
265
  break;
244
- case 27:
266
+ case 29:
245
267
  throw new errors.MissingParameterError('Parameter missing: id');
246
- case 28:
247
- _context.next = 30;
248
- return _Api.default.sendRequest("/as2_partners/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
249
268
  case 30:
269
+ _context.next = 32;
270
+ return _Api.default.sendRequest("/as2_partners/".concat(encodeURIComponent(params.id)), 'PATCH', params, _this.options);
271
+ case 32:
250
272
  response = _context.sent;
251
273
  return _context.abrupt("return", new As2Partner(response === null || response === void 0 ? void 0 : response.data, _this.options));
252
- case 32:
274
+ case 34:
253
275
  case "end":
254
276
  return _context.stop();
255
277
  }
@@ -446,11 +468,13 @@ _As2Partner = As2Partner;
446
468
  return _As2Partner.find(id, params, options);
447
469
  });
448
470
  // Parameters:
449
- // enable_dedicated_ips - boolean - If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 PArtner.
471
+ // enable_dedicated_ips - boolean - If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.
450
472
  // http_auth_username - string - Username to send to server for HTTP Authentication.
451
473
  // http_auth_password - string - Password to send to server for HTTP Authentication.
452
474
  // mdn_validation_level - string - How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates.
453
475
  // server_certificate - string - Should we require that the remote HTTP server have a valid SSL Certificate for HTTPS?
476
+ // default_mime_type - string - Default mime type of the file attached to the encrypted message
477
+ // additional_http_headers - object - Additional HTTP Headers for outgoing message sent to this partner.
454
478
  // as2_station_id (required) - int64 - ID of the AS2 Station associated with this partner.
455
479
  // name (required) - string - The partner's formal AS2 name.
456
480
  // uri (required) - string - Public URI where we will send the AS2 messages (via HTTP/HTTPS).
@@ -513,36 +537,42 @@ _As2Partner = As2Partner;
513
537
  }
514
538
  throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params.server_certificate)));
515
539
  case 18:
516
- if (!(params.as2_station_id && !(0, _utils.isInt)(params.as2_station_id))) {
540
+ if (!(params.default_mime_type && !(0, _utils.isString)(params.default_mime_type))) {
517
541
  _context6.next = 20;
518
542
  break;
519
543
  }
520
- throw new errors.InvalidParameterError("Bad parameter: as2_station_id must be of type Int, received ".concat((0, _utils.getType)(params.as2_station_id)));
544
+ throw new errors.InvalidParameterError("Bad parameter: default_mime_type must be of type String, received ".concat((0, _utils.getType)(params.default_mime_type)));
521
545
  case 20:
522
- if (!(params.name && !(0, _utils.isString)(params.name))) {
546
+ if (!(params.as2_station_id && !(0, _utils.isInt)(params.as2_station_id))) {
523
547
  _context6.next = 22;
524
548
  break;
525
549
  }
526
- throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
550
+ throw new errors.InvalidParameterError("Bad parameter: as2_station_id must be of type Int, received ".concat((0, _utils.getType)(params.as2_station_id)));
527
551
  case 22:
528
- if (!(params.uri && !(0, _utils.isString)(params.uri))) {
552
+ if (!(params.name && !(0, _utils.isString)(params.name))) {
529
553
  _context6.next = 24;
530
554
  break;
531
555
  }
532
- throw new errors.InvalidParameterError("Bad parameter: uri must be of type String, received ".concat((0, _utils.getType)(params.uri)));
556
+ throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params.name)));
533
557
  case 24:
534
- if (!(params.public_certificate && !(0, _utils.isString)(params.public_certificate))) {
558
+ if (!(params.uri && !(0, _utils.isString)(params.uri))) {
535
559
  _context6.next = 26;
536
560
  break;
537
561
  }
538
- throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params.public_certificate)));
562
+ throw new errors.InvalidParameterError("Bad parameter: uri must be of type String, received ".concat((0, _utils.getType)(params.uri)));
539
563
  case 26:
540
- _context6.next = 28;
541
- return _Api.default.sendRequest('/as2_partners', 'POST', params, options);
564
+ if (!(params.public_certificate && !(0, _utils.isString)(params.public_certificate))) {
565
+ _context6.next = 28;
566
+ break;
567
+ }
568
+ throw new errors.InvalidParameterError("Bad parameter: public_certificate must be of type String, received ".concat((0, _utils.getType)(params.public_certificate)));
542
569
  case 28:
570
+ _context6.next = 30;
571
+ return _Api.default.sendRequest('/as2_partners', 'POST', params, options);
572
+ case 30:
543
573
  response = _context6.sent;
544
574
  return _context6.abrupt("return", new _As2Partner(response === null || response === void 0 ? void 0 : response.data, options));
545
- case 30:
575
+ case 32:
546
576
  case "end":
547
577
  return _context6.stop();
548
578
  }
@@ -42,6 +42,10 @@ var BundleAction = /*#__PURE__*/(0, _createClass2.default)(function BundleAction
42
42
  return _this.attributes.bundle_registration;
43
43
  });
44
44
  // date-time # Action occurrence date/time
45
+ (0, _defineProperty2.default)(this, "getCreatedAt", function () {
46
+ return _this.attributes.created_at;
47
+ });
48
+ // date-time # Action occurrence date/time
45
49
  (0, _defineProperty2.default)(this, "getWhen", function () {
46
50
  return _this.attributes.when;
47
51
  });
@@ -74,14 +78,12 @@ _BundleAction = BundleAction;
74
78
  // Parameters:
75
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.
76
80
  // 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`.
81
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
82
+ // 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
83
  // filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
80
84
  // 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
85
  // filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
82
86
  // 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
87
  (0, _defineProperty2.default)(BundleAction, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
86
88
  var _response$data;
87
89
  var params,
@@ -105,26 +107,14 @@ _BundleAction = BundleAction;
105
107
  }
106
108
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params.per_page)));
107
109
  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;
110
+ _context.next = 8;
121
111
  return _Api.default.sendRequest('/bundle_actions', 'GET', params, options);
122
- case 12:
112
+ case 8:
123
113
  response = _context.sent;
124
114
  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
115
  return new _BundleAction(obj, options);
126
116
  })) || []);
127
- case 14:
117
+ case 10:
128
118
  case "end":
129
119
  return _context.stop();
130
120
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.2.158",
3
+ "version": "1.2.160",
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.160'
9
9
  let userAgent = `Files.com JavaScript SDK v${version}`
10
10
 
11
11
  let logLevel = LogLevel.INFO
@@ -70,6 +70,20 @@ class As2Partner {
70
70
  this.attributes.http_auth_username = value
71
71
  }
72
72
 
73
+ // object # Additional HTTP Headers for outgoing message sent to this partner.
74
+ getAdditionalHttpHeaders = () => this.attributes.additional_http_headers
75
+
76
+ setAdditionalHttpHeaders = value => {
77
+ this.attributes.additional_http_headers = value
78
+ }
79
+
80
+ // string # Default mime type of the file attached to the encrypted message
81
+ getDefaultMimeType = () => this.attributes.default_mime_type
82
+
83
+ setDefaultMimeType = value => {
84
+ this.attributes.default_mime_type = value
85
+ }
86
+
73
87
  // string # How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates.
74
88
  getMdnValidationLevel = () => this.attributes.mdn_validation_level
75
89
 
@@ -77,7 +91,7 @@ class As2Partner {
77
91
  this.attributes.mdn_validation_level = value
78
92
  }
79
93
 
80
- // boolean # If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 PArtner.
94
+ // boolean # If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.
81
95
  getEnableDedicatedIps = () => this.attributes.enable_dedicated_ips
82
96
 
83
97
  setEnableDedicatedIps = value => {
@@ -148,11 +162,13 @@ class As2Partner {
148
162
  }
149
163
 
150
164
  // Parameters:
151
- // enable_dedicated_ips - boolean - If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 PArtner.
165
+ // enable_dedicated_ips - boolean - If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.
152
166
  // http_auth_username - string - Username to send to server for HTTP Authentication.
153
167
  // http_auth_password - string - Password to send to server for HTTP Authentication.
154
168
  // mdn_validation_level - string - How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates.
155
169
  // server_certificate - string - Should we require that the remote HTTP server have a valid SSL Certificate for HTTPS?
170
+ // default_mime_type - string - Default mime type of the file attached to the encrypted message
171
+ // additional_http_headers - object - Additional HTTP Headers for outgoing message sent to this partner.
156
172
  // name - string - The partner's formal AS2 name.
157
173
  // uri - string - Public URI where we will send the AS2 messages (via HTTP/HTTPS).
158
174
  // public_certificate - string - Public certificate for AS2 Partner. Note: This is the certificate for AS2 message security, not a certificate used for HTTPS authentication.
@@ -186,6 +202,10 @@ class As2Partner {
186
202
  throw new errors.InvalidParameterError(`Bad parameter: server_certificate must be of type String, received ${getType(params.server_certificate)}`)
187
203
  }
188
204
 
205
+ if (params.default_mime_type && !isString(params.default_mime_type)) {
206
+ throw new errors.InvalidParameterError(`Bad parameter: default_mime_type must be of type String, received ${getType(params.default_mime_type)}`)
207
+ }
208
+
189
209
  if (params.name && !isString(params.name)) {
190
210
  throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params.name)}`)
191
211
  }
@@ -297,11 +317,13 @@ class As2Partner {
297
317
  As2Partner.find(id, params, options)
298
318
 
299
319
  // Parameters:
300
- // enable_dedicated_ips - boolean - If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 PArtner.
320
+ // enable_dedicated_ips - boolean - If `true`, we will use your site's dedicated IPs for all outbound connections to this AS2 Partner.
301
321
  // http_auth_username - string - Username to send to server for HTTP Authentication.
302
322
  // http_auth_password - string - Password to send to server for HTTP Authentication.
303
323
  // mdn_validation_level - string - How should Files.com evaluate message transfer success based on a partner's MDN response? This setting does not affect MDN storage; all MDNs received from a partner are always stored. `none`: MDN is stored for informational purposes only, a successful HTTPS transfer is a successful AS2 transfer. `weak`: Inspect the MDN for MIC and Disposition only. `normal`: `weak` plus validate MDN signature matches body, `strict`: `normal` but do not allow signatures from self-signed or incorrectly purposed certificates.
304
324
  // server_certificate - string - Should we require that the remote HTTP server have a valid SSL Certificate for HTTPS?
325
+ // default_mime_type - string - Default mime type of the file attached to the encrypted message
326
+ // additional_http_headers - object - Additional HTTP Headers for outgoing message sent to this partner.
305
327
  // as2_station_id (required) - int64 - ID of the AS2 Station associated with this partner.
306
328
  // name (required) - string - The partner's formal AS2 name.
307
329
  // uri (required) - string - Public URI where we will send the AS2 messages (via HTTP/HTTPS).
@@ -339,6 +361,10 @@ class As2Partner {
339
361
  throw new errors.InvalidParameterError(`Bad parameter: server_certificate must be of type String, received ${getType(params.server_certificate)}`)
340
362
  }
341
363
 
364
+ if (params.default_mime_type && !isString(params.default_mime_type)) {
365
+ throw new errors.InvalidParameterError(`Bad parameter: default_mime_type must be of type String, received ${getType(params.default_mime_type)}`)
366
+ }
367
+
342
368
  if (params.as2_station_id && !isInt(params.as2_station_id)) {
343
369
  throw new errors.InvalidParameterError(`Bad parameter: as2_station_id must be of type Int, received ${getType(params.as2_station_id)}`)
344
370
  }
@@ -34,6 +34,9 @@ class BundleAction {
34
34
  // BundleRegistration # Object that contains bundle registration information
35
35
  getBundleRegistration = () => this.attributes.bundle_registration
36
36
 
37
+ // date-time # Action occurrence date/time
38
+ getCreatedAt = () => this.attributes.created_at
39
+
37
40
  // date-time # Action occurrence date/time
38
41
  getWhen = () => this.attributes.when
39
42
 
@@ -49,14 +52,12 @@ class BundleAction {
49
52
  // Parameters:
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
- // 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`.
55
+ // sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are .
56
+ // 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
57
  // filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
55
58
  // 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
59
  // filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
57
60
  // 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
61
  static list = async (params = {}, options = {}) => {
61
62
  if (params.cursor && !isString(params.cursor)) {
62
63
  throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params.cursor)}`)
@@ -66,14 +67,6 @@ class BundleAction {
66
67
  throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(params.per_page)}`)
67
68
  }
68
69
 
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
70
  const response = await Api.sendRequest('/bundle_actions', 'GET', params, options)
78
71
 
79
72
  return response?.data?.map(obj => new BundleAction(obj, options)) || []