notification-processor 6.0.6 → 6.2.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ # [6.2.0](https://github.com/Parsimotion/notification-processor/compare/v6.1.0...v6.2.0) (2026-05-04)
2
+
3
+
4
+ ### Features
5
+
6
+ * dejo solo observable non retry, corrijo userId ([9b84bbc](https://github.com/Parsimotion/notification-processor/commit/9b84bbc792a639c2fa46007205f533dbe86fee4c))
7
+
8
+ # [6.1.0](https://github.com/Parsimotion/notification-processor/compare/v6.0.6...v6.1.0) (2026-04-16)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * vuelvo script para atras ([805d0ed](https://github.com/Parsimotion/notification-processor/commit/805d0edee15651511d88f85f86fec2bb2ed5ba4d))
14
+
15
+
16
+ ### Features
17
+
18
+ * agrego shouldretry antes del process, corrijo script ([3d983e3](https://github.com/Parsimotion/notification-processor/commit/3d983e3fed98d054c3da29a0cd29700a57bb7b66))
19
+
1
20
  ## [6.0.6](https://github.com/Parsimotion/notification-processor/compare/v6.0.5...v6.0.6) (2026-03-13)
2
21
 
3
22
 
package/copyToFunction CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/bin/bash
2
2
  FUNCTION=$1
3
3
 
4
- npm run build
4
+ npm run build
5
5
  echo "Removing old version from $FUNCTION"
6
6
  rm -rf "../$FUNCTION/node_modules/notification-processor/lib/"
7
7
  echo "Removed. Copying new version to $FUNCTION"
@@ -60,18 +60,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
60
60
  value: function listenTo(observable) {
61
61
  var _this = this;
62
62
 
63
- observable.on("unsuccessful_non_retryable", function (payload) {
63
+ return observable.on("unsuccessful_non_retryable", function (payload) {
64
64
  return _this.registerRecord(payload, "unsuccessful");
65
65
  });
66
- observable.on("unsuccessful", function (payload) {
67
- return _this.registerRecord(payload, "unsuccessful");
68
- });
69
- observable.on("started", function (payload) {
70
- return _this.registerRecord(payload, "pending");
71
- });
72
- return observable.on("successful", function (payload) {
73
- return _this.registerRecord(payload, "successful");
74
- });
75
66
  }
76
67
  }, {
77
68
  key: "registerRecord",
@@ -30,6 +30,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
30
30
  value: function process(notification, context, executionId) {
31
31
  var _this = this;
32
32
 
33
+ if (!this._shouldRetry_(notification)) {
34
+ this._onMaxRetryExceeded_(notification, new Error("max retries exceeded"));
35
+ }
33
36
  return this.processor(notification, context, executionId).tap(function (it) {
34
37
  return _this._onSuccess_(notification, it);
35
38
  }).catch(function (err) {
@@ -18,16 +18,16 @@
18
18
  return ResourceId;
19
19
  },
20
20
  monitoringCenterFields: function monitoringCenterFields(notification) {
21
- var ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7;
21
+ var ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7, ref8, ref9;
22
22
  return Promise.props({
23
23
  eventType: 'service-bus',
24
24
  resource: this.resource(notification),
25
25
  companyId: this.user(notification),
26
- userId: (notification != null ? (ref = notification.message) != null ? ref.UserId : void 0 : void 0) || (notification != null ? (ref1 = notification.message) != null ? ref1.User : void 0 : void 0),
26
+ userId: (notification != null ? (ref = notification.message) != null ? ref.UserId : void 0 : void 0) || (notification != null ? (ref1 = notification.message) != null ? ref1.User : void 0 : void 0) || (notification != null ? (ref2 = notification.meta) != null ? (ref3 = ref2.properties) != null ? ref3.user_id : void 0 : void 0 : void 0),
27
27
  externalReference: null,
28
- eventId: notification != null ? (ref2 = notification.message) != null ? ref2.EventId : void 0 : void 0,
29
- eventTimestamp: (notification != null ? (ref3 = notification.meta) != null ? ref3.insertionTime : void 0 : void 0) || (notification != null ? (ref4 = notification.message) != null ? ref4.Sent : void 0 : void 0) ? new Date((notification != null ? (ref5 = notification.meta) != null ? ref5.insertionTime : void 0 : void 0) || (notification != null ? (ref6 = notification.message) != null ? ref6.Sent : void 0 : void 0)).getTime() : void 0,
30
- parentEventId: notification != null ? (ref7 = notification.message) != null ? ref7.ParentEventId : void 0 : void 0
28
+ eventId: notification != null ? (ref4 = notification.message) != null ? ref4.EventId : void 0 : void 0,
29
+ eventTimestamp: (notification != null ? (ref5 = notification.meta) != null ? ref5.insertionTime : void 0 : void 0) || (notification != null ? (ref6 = notification.message) != null ? ref6.Sent : void 0 : void 0) ? new Date((notification != null ? (ref7 = notification.meta) != null ? ref7.insertionTime : void 0 : void 0) || (notification != null ? (ref8 = notification.message) != null ? ref8.Sent : void 0 : void 0)).getTime() : void 0,
30
+ parentEventId: notification != null ? (ref9 = notification.message) != null ? ref9.ParentEventId : void 0 : void 0
31
31
  });
32
32
  }
33
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notification-processor",
3
- "version": "6.0.6",
3
+ "version": "6.2.0",
4
4
  "description": "notification-processor",
5
5
  "main": "index.js",
6
6
  "scripts": {