@thantickets/common 1.0.20 → 1.0.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ export declare abstract class Listener<T extends Event> {
8
8
  abstract subject: T['subject'];
9
9
  abstract queueGroupName: string;
10
10
  abstract onMessage(data: T['data'], msg: Message): void;
11
- private client;
11
+ protected client: Stan;
12
12
  protected actWait: number;
13
13
  constructor(client: Stan);
14
14
  subscriptionOptions(): import("node-nats-streaming").SubscriptionOptions;
@@ -6,7 +6,7 @@ interface Event {
6
6
  }
7
7
  export declare abstract class Publisher<T extends Event> {
8
8
  abstract subject: T['subject'];
9
- private client;
9
+ protected client: Stan;
10
10
  constructor(client: Stan);
11
11
  publish(data: T['data']): Promise<void>;
12
12
  }
@@ -3,6 +3,7 @@ export interface OrderCancelledEvent {
3
3
  subject: Subjects.OrderCancelled;
4
4
  data: {
5
5
  id: string;
6
+ version: number;
6
7
  ticket: {
7
8
  id: string;
8
9
  };
@@ -4,6 +4,7 @@ export interface OrderCreatedEvent {
4
4
  subject: Subjects.OrderCreated;
5
5
  data: {
6
6
  id: string;
7
+ version: number;
7
8
  status: OrderStatus;
8
9
  userId: string;
9
10
  expiresAt: string;
@@ -3,6 +3,7 @@ export interface TicketCreatedEvent {
3
3
  subject: Subjects.TicketCreated;
4
4
  data: {
5
5
  id: string;
6
+ version: number;
6
7
  title: string;
7
8
  price: number;
8
9
  userId: string;
@@ -3,8 +3,10 @@ export interface TicketUpdatedEvent {
3
3
  subject: Subjects.TicketUpdated;
4
4
  data: {
5
5
  id: string;
6
+ version: number;
6
7
  title: string;
7
8
  price: number;
8
9
  userId: string;
10
+ orderId?: string;
9
11
  };
10
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thantickets/common",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",