@hastehaul/common 2.0.22 → 2.0.23

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,6 +14,7 @@ export declare enum CustomerDurableName {
14
14
  * The durable name for the consumer handling customer created events.
15
15
  */
16
16
  CustomerCreatedDurablename = "customer-created-consumer",
17
+ CustomerCreatedNotificationDurablename = "customer-created-notification-consumer",
17
18
  CustomerOtpRequestDurablename = "customer-otp-request",
18
19
  CustomerPaymentMethodRequestDurablename = "customer-paymentmethod-request",
19
20
  CustomerPaymentMethodDurablename = "customer-paymentmethod"
@@ -18,6 +18,7 @@ var CustomerDurableName;
18
18
  * The durable name for the consumer handling customer created events.
19
19
  */
20
20
  CustomerDurableName["CustomerCreatedDurablename"] = "customer-created-consumer";
21
+ CustomerDurableName["CustomerCreatedNotificationDurablename"] = "customer-created-notification-consumer";
21
22
  CustomerDurableName["CustomerOtpRequestDurablename"] = "customer-otp-request";
22
23
  CustomerDurableName["CustomerPaymentMethodRequestDurablename"] = "customer-paymentmethod-request";
23
24
  CustomerDurableName["CustomerPaymentMethodDurablename"] = "customer-paymentmethod";
@@ -10,6 +10,10 @@ export declare enum CustomerSubjects {
10
10
  * The subject for customer created events.
11
11
  */
12
12
  CustomerCreated = "customer.created",
13
+ /**
14
+ * The subject for customer created events.
15
+ */
16
+ CustomerCreatedNotification = "customer.created-notification",
13
17
  /**
14
18
  * The subject for customer unblocked events.
15
19
  */
@@ -14,6 +14,10 @@ var CustomerSubjects;
14
14
  * The subject for customer created events.
15
15
  */
16
16
  CustomerSubjects["CustomerCreated"] = "customer.created";
17
+ /**
18
+ * The subject for customer created events.
19
+ */
20
+ CustomerSubjects["CustomerCreatedNotification"] = "customer.created-notification";
17
21
  /**
18
22
  * The subject for customer unblocked events.
19
23
  */
@@ -0,0 +1,34 @@
1
+ import { CustomerDurableName } from '../../enums/durable-names/customer-dname';
2
+ import { CustomerStream } from '../../enums/streams/customer-stream';
3
+ import { CustomerSubjects } from '../../enums/subjects/customer-subjects';
4
+ /**
5
+ * Interface representing the "Customer Created" event.
6
+ *
7
+ * The "CustomerCreatedNotificationEvent" interface defines the structure of an event related to the cancellation of an customer.
8
+ * Events of this type are used to communicate customer cancellation details across the application.
9
+ */
10
+ export interface CustomerCreatedNotificationEvent {
11
+ /**
12
+ * The subject of the event, specifying that it represents an "Customer Created" event.
13
+ */
14
+ subject: CustomerSubjects.CustomerCreatedNotification;
15
+ /**
16
+ * The durable name associated with the consumer handling the "Customer Created" event.
17
+ * This property is optional and may be used to identify the consumer processing the event in a durable manner.
18
+ */
19
+ durableName?: CustomerDurableName.CustomerCreatedNotificationDurablename;
20
+ /**
21
+ * The stream to which the event belongs, specifying that it is an "Customer" stream.
22
+ * Events of different types may be grouped into different streams based on their common characteristics.
23
+ */
24
+ stream: CustomerStream.Customer;
25
+ /**
26
+ * The data payload of the "Customer Created" event.
27
+ * The data payload contains specific details related to the customer cancellation, such as customer ID, version, status, user ID, and trip ID.
28
+ */
29
+ data: {
30
+ userId: null | string;
31
+ phoneNumber: string;
32
+ isNew: boolean;
33
+ };
34
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/build/index.d.ts CHANGED
@@ -134,6 +134,7 @@ export * from "./events/common/interfaces/order-events-interfaces/order-cancelle
134
134
  export * from "./events/common/interfaces/order-events-interfaces/order-completed-event";
135
135
  export * from "./events/common/interfaces/order-events-interfaces/order-requested-event";
136
136
  export * from "./events/common/interfaces/customer-events-interfaces/customer-created-event";
137
+ export * from "./events/common/interfaces/customer-events-interfaces/customer-created-notification-event";
137
138
  export * from "./events/common/interfaces/customer-events-interfaces/customer-unblocked-event";
138
139
  export * from "./events/common/interfaces/customer-events-interfaces/customer-new-event";
139
140
  export * from "./events/common/interfaces/customer-events-interfaces/customer-otp-request-event";
package/build/index.js CHANGED
@@ -166,6 +166,7 @@ __exportStar(require("./events/common/interfaces/order-events-interfaces/order-c
166
166
  __exportStar(require("./events/common/interfaces/order-events-interfaces/order-requested-event"), exports);
167
167
  // CUSTOMER EVENTS
168
168
  __exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-created-event"), exports);
169
+ __exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-created-notification-event"), exports);
169
170
  __exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-unblocked-event"), exports);
170
171
  __exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-new-event"), exports);
171
172
  __exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-otp-request-event"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hastehaul/common",
3
- "version": "2.0.22",
3
+ "version": "2.0.23",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",