files.com 1.0.181 → 1.0.184

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.181
1
+ 1.0.184
@@ -65,6 +65,9 @@ var As2IncomingMessage = /*#__PURE__*/(0, _createClass2.default)(function As2Inc
65
65
  (0, _defineProperty2.default)(this, "getProcessingResult", function () {
66
66
  return _this.attributes.processing_result;
67
67
  });
68
+ (0, _defineProperty2.default)(this, "getProcessingResultDescription", function () {
69
+ return _this.attributes.processing_result_description;
70
+ });
68
71
  (0, _defineProperty2.default)(this, "getMic", function () {
69
72
  return _this.attributes.mic;
70
73
  });
@@ -62,6 +62,9 @@ var As2OutgoingMessage = /*#__PURE__*/(0, _createClass2.default)(function As2Out
62
62
  (0, _defineProperty2.default)(this, "getProcessingResult", function () {
63
63
  return _this.attributes.processing_result;
64
64
  });
65
+ (0, _defineProperty2.default)(this, "getProcessingResultDescription", function () {
66
+ return _this.attributes.processing_result_description;
67
+ });
65
68
  (0, _defineProperty2.default)(this, "getMic", function () {
66
69
  return _this.attributes.mic;
67
70
  });
@@ -95,6 +98,9 @@ var As2OutgoingMessage = /*#__PURE__*/(0, _createClass2.default)(function As2Out
95
98
  (0, _defineProperty2.default)(this, "getHttpResponseHeaders", function () {
96
99
  return _this.attributes.http_response_headers;
97
100
  });
101
+ (0, _defineProperty2.default)(this, "getHttpTransmissionDuration", function () {
102
+ return _this.attributes.http_transmission_duration;
103
+ });
98
104
  (0, _defineProperty2.default)(this, "getMdnReceived", function () {
99
105
  return _this.attributes.mdn_received;
100
106
  });
@@ -89,6 +89,12 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
89
89
  (0, _defineProperty2.default)(this, "setSendInterval", function (value) {
90
90
  _this.attributes.send_interval = value;
91
91
  });
92
+ (0, _defineProperty2.default)(this, "getMessage", function () {
93
+ return _this.attributes.message;
94
+ });
95
+ (0, _defineProperty2.default)(this, "setMessage", function (value) {
96
+ _this.attributes.message = value;
97
+ });
92
98
  (0, _defineProperty2.default)(this, "getUnsubscribed", function () {
93
99
  return _this.attributes.unsubscribed;
94
100
  });
@@ -163,32 +169,40 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
163
169
  throw new Error("Bad parameter: send_interval must be of type String, received ".concat((0, _utils.getType)(send_interval)));
164
170
 
165
171
  case 10:
172
+ if (!(params['message'] && !(0, _utils.isString)(params['message']))) {
173
+ _context.next = 12;
174
+ break;
175
+ }
176
+
177
+ throw new Error("Bad parameter: message must be of type String, received ".concat((0, _utils.getType)(message)));
178
+
179
+ case 12:
166
180
  if (params['id']) {
167
- _context.next = 16;
181
+ _context.next = 18;
168
182
  break;
169
183
  }
170
184
 
171
185
  if (!_this.attributes.id) {
172
- _context.next = 15;
186
+ _context.next = 17;
173
187
  break;
174
188
  }
175
189
 
176
190
  params['id'] = _this.id;
177
- _context.next = 16;
191
+ _context.next = 18;
178
192
  break;
179
193
 
180
- case 15:
194
+ case 17:
181
195
  throw new Error('Parameter missing: id');
182
196
 
183
- case 16:
184
- _context.next = 18;
197
+ case 18:
198
+ _context.next = 20;
185
199
  return _Api.default.sendRequest("/notifications/".concat(params['id']), 'PATCH', params, _this.options);
186
200
 
187
- case 18:
201
+ case 20:
188
202
  response = _context.sent;
189
203
  return _context.abrupt("return", new Notification(response === null || response === void 0 ? void 0 : response.data, _this.options));
190
204
 
191
- case 20:
205
+ case 22:
192
206
  case "end":
193
207
  return _context.stop();
194
208
  }
@@ -456,38 +470,46 @@ var Notification = /*#__PURE__*/(0, _createClass2.default)(function Notification
456
470
  throw new Error("Bad parameter: send_interval must be of type String, received ".concat((0, _utils.getType)(send_interval)));
457
471
 
458
472
  case 6:
459
- if (!(params['group_id'] && !(0, _utils.isInt)(params['group_id']))) {
473
+ if (!(params['message'] && !(0, _utils.isString)(params['message']))) {
460
474
  _context5.next = 8;
461
475
  break;
462
476
  }
463
477
 
464
- throw new Error("Bad parameter: group_id must be of type Int, received ".concat((0, _utils.getType)(group_id)));
478
+ throw new Error("Bad parameter: message must be of type String, received ".concat((0, _utils.getType)(message)));
465
479
 
466
480
  case 8:
467
- if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
481
+ if (!(params['group_id'] && !(0, _utils.isInt)(params['group_id']))) {
468
482
  _context5.next = 10;
469
483
  break;
470
484
  }
471
485
 
472
- throw new Error("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(path)));
486
+ throw new Error("Bad parameter: group_id must be of type Int, received ".concat((0, _utils.getType)(group_id)));
473
487
 
474
488
  case 10:
475
- if (!(params['username'] && !(0, _utils.isString)(params['username']))) {
489
+ if (!(params['path'] && !(0, _utils.isString)(params['path']))) {
476
490
  _context5.next = 12;
477
491
  break;
478
492
  }
479
493
 
480
- throw new Error("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(username)));
494
+ throw new Error("Bad parameter: path must be of type String, received ".concat((0, _utils.getType)(path)));
481
495
 
482
496
  case 12:
483
- _context5.next = 14;
484
- return _Api.default.sendRequest("/notifications", 'POST', params, options);
497
+ if (!(params['username'] && !(0, _utils.isString)(params['username']))) {
498
+ _context5.next = 14;
499
+ break;
500
+ }
501
+
502
+ throw new Error("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(username)));
485
503
 
486
504
  case 14:
505
+ _context5.next = 16;
506
+ return _Api.default.sendRequest("/notifications", 'POST', params, options);
507
+
508
+ case 16:
487
509
  response = _context5.sent;
488
510
  return _context5.abrupt("return", new Notification(response === null || response === void 0 ? void 0 : response.data, options));
489
511
 
490
- case 16:
512
+ case 18:
491
513
  case "end":
492
514
  return _context5.stop();
493
515
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "files.com",
3
- "version": "1.0.181",
3
+ "version": "1.0.184",
4
4
  "description": "Files.com SDK for JavaScript",
5
5
  "keywords": [
6
6
  "files.com",
@@ -46,6 +46,9 @@ class As2IncomingMessage {
46
46
  // string # Result of processing.
47
47
  getProcessingResult = () => this.attributes.processing_result
48
48
 
49
+ // string # Result of processing description.
50
+ getProcessingResultDescription = () => this.attributes.processing_result_description
51
+
49
52
  // string # AS2 Message Integrity Check
50
53
  getMic = () => this.attributes.mic
51
54
 
@@ -43,6 +43,9 @@ class As2OutgoingMessage {
43
43
  // string # Result of processing.
44
44
  getProcessingResult = () => this.attributes.processing_result
45
45
 
46
+ // string # Result of processing description.
47
+ getProcessingResultDescription = () => this.attributes.processing_result_description
48
+
46
49
  // string # AS2 Message Integrity Check SHA1
47
50
  getMic = () => this.attributes.mic
48
51
 
@@ -76,6 +79,9 @@ class As2OutgoingMessage {
76
79
  // object # HTTP Headers received for this message.
77
80
  getHttpResponseHeaders = () => this.attributes.http_response_headers
78
81
 
82
+ // double # HTTP transmission duration in seceonds
83
+ getHttpTransmissionDuration = () => this.attributes.http_transmission_duration
84
+
79
85
  // boolean # Did the partner give a response body?
80
86
  getMdnReceived = () => this.attributes.mdn_received
81
87
 
@@ -78,6 +78,13 @@ class Notification {
78
78
  this.attributes.send_interval = value
79
79
  }
80
80
 
81
+ // string # Custom message to include in notification emails.
82
+ getMessage = () => this.attributes.message
83
+
84
+ setMessage = value => {
85
+ this.attributes.message = value
86
+ }
87
+
81
88
  // boolean # Is the user unsubscribed from this notification?
82
89
  getUnsubscribed = () => this.attributes.unsubscribed
83
90
 
@@ -119,6 +126,7 @@ class Notification {
119
126
  // notify_user_actions - boolean - If `true` actions initiated by the user will still result in a notification
120
127
  // recursive - boolean - If `true`, enable notifications for each subfolder in this path
121
128
  // send_interval - string - The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
129
+ // message - string - Custom message to include in notification emails.
122
130
  update = async (params = {}) => {
123
131
  if (!this.attributes.id) {
124
132
  throw new Error('Current object has no id')
@@ -135,6 +143,9 @@ class Notification {
135
143
  if (params['send_interval'] && !isString(params['send_interval'])) {
136
144
  throw new Error(`Bad parameter: send_interval must be of type String, received ${getType(send_interval)}`)
137
145
  }
146
+ if (params['message'] && !isString(params['message'])) {
147
+ throw new Error(`Bad parameter: message must be of type String, received ${getType(message)}`)
148
+ }
138
149
 
139
150
  if (!params['id']) {
140
151
  if (this.attributes.id) {
@@ -263,6 +274,7 @@ class Notification {
263
274
  // notify_user_actions - boolean - If `true` actions initiated by the user will still result in a notification
264
275
  // recursive - boolean - If `true`, enable notifications for each subfolder in this path
265
276
  // send_interval - string - The time interval that notifications are aggregated by. Can be `five_minutes`, `fifteen_minutes`, `hourly`, or `daily`.
277
+ // message - string - Custom message to include in notification emails.
266
278
  // group_id - int64 - The ID of the group to notify. Provide `user_id`, `username` or `group_id`.
267
279
  // path - string - Path
268
280
  // username - string - The username of the user to notify. Provide `user_id`, `username` or `group_id`.
@@ -275,6 +287,10 @@ class Notification {
275
287
  throw new Error(`Bad parameter: send_interval must be of type String, received ${getType(send_interval)}`)
276
288
  }
277
289
 
290
+ if (params['message'] && !isString(params['message'])) {
291
+ throw new Error(`Bad parameter: message must be of type String, received ${getType(message)}`)
292
+ }
293
+
278
294
  if (params['group_id'] && !isInt(params['group_id'])) {
279
295
  throw new Error(`Bad parameter: group_id must be of type Int, received ${getType(group_id)}`)
280
296
  }