legend-transactional 2.3.0 → 2.3.1

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/dist/index.d.mts CHANGED
@@ -477,19 +477,19 @@ interface EventPayload {
477
477
  /**
478
478
  * The event that was received
479
479
  */
480
- receivedEvent: string;
480
+ received_event: string;
481
481
  /**
482
482
  * Timestamp when the event was received (UNIX timestamp in seconds)
483
483
  */
484
- receivedAt: number;
484
+ received_at: number;
485
485
  /**
486
486
  * The queue name from which the event was consumed
487
487
  */
488
- queueName: string;
488
+ queue_name: string;
489
489
  /**
490
490
  * Optional event identifier for tracking
491
491
  */
492
- eventId?: string;
492
+ event_id?: string;
493
493
  };
494
494
  /**
495
495
  * Emitted when an event is successfully processed by a microservice for audit tracking
@@ -502,19 +502,19 @@ interface EventPayload {
502
502
  /**
503
503
  * The original event that was processed
504
504
  */
505
- processedEvent: string;
505
+ processed_event: string;
506
506
  /**
507
507
  * Timestamp when the event was processed (UNIX timestamp in seconds)
508
508
  */
509
- processedAt: number;
509
+ processed_at: number;
510
510
  /**
511
511
  * The queue name where the event was consumed
512
512
  */
513
- queueName: string;
513
+ queue_name: string;
514
514
  /**
515
515
  * Optional event identifier for tracking
516
516
  */
517
- eventId?: string;
517
+ event_id?: string;
518
518
  };
519
519
  /**
520
520
  * Emitted when a message is rejected/nacked and sent to dead letter queue
@@ -527,27 +527,27 @@ interface EventPayload {
527
527
  /**
528
528
  * The original event that was rejected
529
529
  */
530
- rejectedEvent: string;
530
+ rejected_event: string;
531
531
  /**
532
532
  * Timestamp when the event was rejected (UNIX timestamp in seconds)
533
533
  */
534
- rejectedAt: number;
534
+ rejected_at: number;
535
535
  /**
536
536
  * The queue name where the event was rejected from
537
537
  */
538
- queueName: string;
538
+ queue_name: string;
539
539
  /**
540
540
  * Reason for rejection (delay, fibonacci_strategy, etc.)
541
541
  */
542
- rejectionReason: 'delay' | 'fibonacci_strategy';
542
+ rejection_reason: 'delay' | 'fibonacci_strategy';
543
543
  /**
544
544
  * Optional retry count
545
545
  */
546
- retryCount?: number;
546
+ retry_count?: number;
547
547
  /**
548
548
  * Optional event identifier for tracking
549
549
  */
550
- eventId?: string;
550
+ event_id?: string;
551
551
  };
552
552
  }
553
553
  /**
package/dist/index.d.ts CHANGED
@@ -477,19 +477,19 @@ interface EventPayload {
477
477
  /**
478
478
  * The event that was received
479
479
  */
480
- receivedEvent: string;
480
+ received_event: string;
481
481
  /**
482
482
  * Timestamp when the event was received (UNIX timestamp in seconds)
483
483
  */
484
- receivedAt: number;
484
+ received_at: number;
485
485
  /**
486
486
  * The queue name from which the event was consumed
487
487
  */
488
- queueName: string;
488
+ queue_name: string;
489
489
  /**
490
490
  * Optional event identifier for tracking
491
491
  */
492
- eventId?: string;
492
+ event_id?: string;
493
493
  };
494
494
  /**
495
495
  * Emitted when an event is successfully processed by a microservice for audit tracking
@@ -502,19 +502,19 @@ interface EventPayload {
502
502
  /**
503
503
  * The original event that was processed
504
504
  */
505
- processedEvent: string;
505
+ processed_event: string;
506
506
  /**
507
507
  * Timestamp when the event was processed (UNIX timestamp in seconds)
508
508
  */
509
- processedAt: number;
509
+ processed_at: number;
510
510
  /**
511
511
  * The queue name where the event was consumed
512
512
  */
513
- queueName: string;
513
+ queue_name: string;
514
514
  /**
515
515
  * Optional event identifier for tracking
516
516
  */
517
- eventId?: string;
517
+ event_id?: string;
518
518
  };
519
519
  /**
520
520
  * Emitted when a message is rejected/nacked and sent to dead letter queue
@@ -527,27 +527,27 @@ interface EventPayload {
527
527
  /**
528
528
  * The original event that was rejected
529
529
  */
530
- rejectedEvent: string;
530
+ rejected_event: string;
531
531
  /**
532
532
  * Timestamp when the event was rejected (UNIX timestamp in seconds)
533
533
  */
534
- rejectedAt: number;
534
+ rejected_at: number;
535
535
  /**
536
536
  * The queue name where the event was rejected from
537
537
  */
538
- queueName: string;
538
+ queue_name: string;
539
539
  /**
540
540
  * Reason for rejection (delay, fibonacci_strategy, etc.)
541
541
  */
542
- rejectionReason: 'delay' | 'fibonacci_strategy';
542
+ rejection_reason: 'delay' | 'fibonacci_strategy';
543
543
  /**
544
544
  * Optional retry count
545
545
  */
546
- retryCount?: number;
546
+ retry_count?: number;
547
547
  /**
548
548
  * Optional event identifier for tracking
549
549
  */
550
- eventId?: string;
550
+ event_id?: string;
551
551
  };
552
552
  }
553
553
  /**
package/dist/index.js CHANGED
@@ -702,10 +702,10 @@ var EventsConsumeChannel = class extends Consume_default {
702
702
  const timestamp = Math.floor(Date.now() / 1e3);
703
703
  publishAuditProcessed(this.channel, {
704
704
  microservice: this.microservice,
705
- processedEvent: this.processedEvent,
706
- processedAt: timestamp,
707
- queueName: this.queueName,
708
- eventId: void 0
705
+ processed_event: this.processedEvent,
706
+ processed_at: timestamp,
707
+ queue_name: this.queueName,
708
+ event_id: void 0
709
709
  // Optional: can be enhanced later
710
710
  }).catch((error) => {
711
711
  console.error("Failed to emit audit.processed event:", error);
@@ -719,12 +719,12 @@ var EventsConsumeChannel = class extends Consume_default {
719
719
  const timestamp = Math.floor(Date.now() / 1e3);
720
720
  publishAuditDeadLetter(this.channel, {
721
721
  microservice: this.microservice,
722
- rejectedEvent: this.processedEvent,
723
- rejectedAt: timestamp,
724
- queueName: this.queueName,
725
- rejectionReason: "delay",
726
- retryCount: parentNack.count,
727
- eventId: void 0
722
+ rejected_event: this.processedEvent,
723
+ rejected_at: timestamp,
724
+ queue_name: this.queueName,
725
+ rejection_reason: "delay",
726
+ retry_count: parentNack.count,
727
+ event_id: void 0
728
728
  }).catch((error) => {
729
729
  console.error("Failed to emit audit.dead_letter event:", error);
730
730
  });
@@ -738,12 +738,12 @@ var EventsConsumeChannel = class extends Consume_default {
738
738
  const timestamp = Math.floor(Date.now() / 1e3);
739
739
  publishAuditDeadLetter(this.channel, {
740
740
  microservice: this.microservice,
741
- rejectedEvent: this.processedEvent,
742
- rejectedAt: timestamp,
743
- queueName: this.queueName,
744
- rejectionReason: "fibonacci_strategy",
745
- retryCount: parentNack.count,
746
- eventId: void 0
741
+ rejected_event: this.processedEvent,
742
+ rejected_at: timestamp,
743
+ queue_name: this.queueName,
744
+ rejection_reason: "fibonacci_strategy",
745
+ retry_count: parentNack.count,
746
+ event_id: void 0
747
747
  }).catch((error) => {
748
748
  console.error("Failed to emit audit.dead_letter event:", error);
749
749
  });
@@ -795,10 +795,10 @@ var eventCallback = (msg, channel, e, queueName) => {
795
795
  const timestamp = Math.floor(Date.now() / 1e3);
796
796
  publishAuditReceived(channel, {
797
797
  microservice,
798
- receivedEvent,
799
- receivedAt: timestamp,
800
- queueName,
801
- eventId: void 0
798
+ received_event: receivedEvent,
799
+ received_at: timestamp,
800
+ queue_name: queueName,
801
+ event_id: void 0
802
802
  // Optional: can be enhanced later with message ID tracking
803
803
  }).catch((error) => {
804
804
  console.error("Failed to emit audit.received event:", error);
package/dist/index.mjs CHANGED
@@ -695,10 +695,10 @@ var EventsConsumeChannel = class extends Consume_default {
695
695
  const timestamp = Math.floor(Date.now() / 1e3);
696
696
  publishAuditProcessed(this.channel, {
697
697
  microservice: this.microservice,
698
- processedEvent: this.processedEvent,
699
- processedAt: timestamp,
700
- queueName: this.queueName,
701
- eventId: void 0
698
+ processed_event: this.processedEvent,
699
+ processed_at: timestamp,
700
+ queue_name: this.queueName,
701
+ event_id: void 0
702
702
  // Optional: can be enhanced later
703
703
  }).catch((error) => {
704
704
  console.error("Failed to emit audit.processed event:", error);
@@ -712,12 +712,12 @@ var EventsConsumeChannel = class extends Consume_default {
712
712
  const timestamp = Math.floor(Date.now() / 1e3);
713
713
  publishAuditDeadLetter(this.channel, {
714
714
  microservice: this.microservice,
715
- rejectedEvent: this.processedEvent,
716
- rejectedAt: timestamp,
717
- queueName: this.queueName,
718
- rejectionReason: "delay",
719
- retryCount: parentNack.count,
720
- eventId: void 0
715
+ rejected_event: this.processedEvent,
716
+ rejected_at: timestamp,
717
+ queue_name: this.queueName,
718
+ rejection_reason: "delay",
719
+ retry_count: parentNack.count,
720
+ event_id: void 0
721
721
  }).catch((error) => {
722
722
  console.error("Failed to emit audit.dead_letter event:", error);
723
723
  });
@@ -731,12 +731,12 @@ var EventsConsumeChannel = class extends Consume_default {
731
731
  const timestamp = Math.floor(Date.now() / 1e3);
732
732
  publishAuditDeadLetter(this.channel, {
733
733
  microservice: this.microservice,
734
- rejectedEvent: this.processedEvent,
735
- rejectedAt: timestamp,
736
- queueName: this.queueName,
737
- rejectionReason: "fibonacci_strategy",
738
- retryCount: parentNack.count,
739
- eventId: void 0
734
+ rejected_event: this.processedEvent,
735
+ rejected_at: timestamp,
736
+ queue_name: this.queueName,
737
+ rejection_reason: "fibonacci_strategy",
738
+ retry_count: parentNack.count,
739
+ event_id: void 0
740
740
  }).catch((error) => {
741
741
  console.error("Failed to emit audit.dead_letter event:", error);
742
742
  });
@@ -788,10 +788,10 @@ var eventCallback = (msg, channel, e, queueName) => {
788
788
  const timestamp = Math.floor(Date.now() / 1e3);
789
789
  publishAuditReceived(channel, {
790
790
  microservice,
791
- receivedEvent,
792
- receivedAt: timestamp,
793
- queueName,
794
- eventId: void 0
791
+ received_event: receivedEvent,
792
+ received_at: timestamp,
793
+ queue_name: queueName,
794
+ event_id: void 0
795
795
  // Optional: can be enhanced later with message ID tracking
796
796
  }).catch((error) => {
797
797
  console.error("Failed to emit audit.received event:", error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "legend-transactional",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "A simple transactional, event-driven communication framework for microservices using RabbitMQ",
5
5
  "author": "Jorge Clavijo <jym272@gmail.com> (https://github.com/jym272)",
6
6
  "license": "MIT",