@hastehaul/common 2.0.2 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,5 +13,6 @@ export declare enum CustomerDurableName {
13
13
  /**
14
14
  * The durable name for the consumer handling customer created events.
15
15
  */
16
- CustomerCreatedDurablename = "customer-created-consumer"
16
+ CustomerCreatedDurablename = "customer-created-consumer",
17
+ CustomerOtpRequestDurablename = "customer-otp-request"
17
18
  }
@@ -18,4 +18,5 @@ 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["CustomerOtpRequestDurablename"] = "customer-otp-request";
21
22
  })(CustomerDurableName || (exports.CustomerDurableName = CustomerDurableName = {}));
@@ -13,5 +13,9 @@ export declare enum CustomerSubjects {
13
13
  /**
14
14
  * The subject for customer unblocked events.
15
15
  */
16
- CustomerUnblocked = "customer.unblocked"
16
+ CustomerUnblocked = "customer.unblocked",
17
+ /**
18
+ * The subject for customer OTP request events.
19
+ */
20
+ CustomerOtpRequest = "customer.otpRequest"
17
21
  }
@@ -18,4 +18,8 @@ var CustomerSubjects;
18
18
  * The subject for customer unblocked events.
19
19
  */
20
20
  CustomerSubjects["CustomerUnblocked"] = "customer.unblocked";
21
+ /**
22
+ * The subject for customer OTP request events.
23
+ */
24
+ CustomerSubjects["CustomerOtpRequest"] = "customer.otpRequest";
21
25
  })(CustomerSubjects || (exports.CustomerSubjects = CustomerSubjects = {}));
@@ -0,0 +1,35 @@
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 OTP Request" event.
6
+ *
7
+ * The "CustomerOtpRequestEvent" interface defines the structure of an event related to the request for an customer.
8
+ * Events of this type are used to communicate customer request details across the application.
9
+ */
10
+ export interface CustomerOtpRequestEvent {
11
+ /**
12
+ * The subject of the event, specifying that it represents an "Customer OTP Request" event.
13
+ */
14
+ subject: CustomerSubjects.CustomerOtpRequest;
15
+ /**
16
+ * The durable name associated with the consumer handling the "Customer OTP Request" 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.CustomerOtpRequestDurablename;
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 OTP Request" event.
27
+ * The data payload contains specific details related to the customer request, such as customer ID, version, status, user ID, and trip ID.
28
+ */
29
+ data: {
30
+ userId: string;
31
+ phoneNumber: string;
32
+ phoneUniqueId: string;
33
+ hashedOtp: string;
34
+ };
35
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/build/index.d.ts CHANGED
@@ -136,6 +136,7 @@ export * from "./events/common/interfaces/order-events-interfaces/order-requeste
136
136
  export * from "./events/common/interfaces/customer-events-interfaces/customer-created-event";
137
137
  export * from "./events/common/interfaces/customer-events-interfaces/customer-unblocked-event";
138
138
  export * from "./events/common/interfaces/customer-events-interfaces/customer-new-event";
139
+ export * from "./events/common/interfaces/customer-events-interfaces/customer-otp-request-event";
139
140
  /**
140
141
  * Re-exports all the interfaces related to streams from the "stream-interfaces" file.
141
142
  *
package/build/index.js CHANGED
@@ -168,6 +168,7 @@ __exportStar(require("./events/common/interfaces/order-events-interfaces/order-r
168
168
  __exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-created-event"), exports);
169
169
  __exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-unblocked-event"), exports);
170
170
  __exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-new-event"), exports);
171
+ __exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-otp-request-event"), exports);
171
172
  //! Interfaces related to payment events are currently commented out using '//'.
172
173
  // export * from "./payment-event-interfaces";
173
174
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hastehaul/common",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",