@hastehaul/common 2.0.17 → 2.0.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,5 +15,6 @@ export declare enum CustomerDurableName {
15
15
  */
16
16
  CustomerCreatedDurablename = "customer-created-consumer",
17
17
  CustomerOtpRequestDurablename = "customer-otp-request",
18
- CustomerPaymentMethodRequestDurablename = "customer-paymentmethod-request"
18
+ CustomerPaymentMethodRequestDurablename = "customer-paymentmethod-request",
19
+ CustomerPaymentMethodDurablename = "customer-paymentmethod"
19
20
  }
@@ -20,4 +20,5 @@ var CustomerDurableName;
20
20
  CustomerDurableName["CustomerCreatedDurablename"] = "customer-created-consumer";
21
21
  CustomerDurableName["CustomerOtpRequestDurablename"] = "customer-otp-request";
22
22
  CustomerDurableName["CustomerPaymentMethodRequestDurablename"] = "customer-paymentmethod-request";
23
+ CustomerDurableName["CustomerPaymentMethodDurablename"] = "customer-paymentmethod";
23
24
  })(CustomerDurableName || (exports.CustomerDurableName = CustomerDurableName = {}));
@@ -21,5 +21,9 @@ export declare enum CustomerSubjects {
21
21
  /**
22
22
  * The subject for a customer to reuest default payment methods
23
23
  */
24
- CustomerPaymentMethodRequest = "customer.paymentmethod-request"
24
+ CustomerPaymentMethodRequest = "customer.paymentmethod-request",
25
+ /**
26
+ * The subject for a customer default payment methods listener
27
+ */
28
+ CustomerPaymentMethod = "customer.paymentmethod"
25
29
  }
@@ -26,4 +26,8 @@ var CustomerSubjects;
26
26
  * The subject for a customer to reuest default payment methods
27
27
  */
28
28
  CustomerSubjects["CustomerPaymentMethodRequest"] = "customer.paymentmethod-request";
29
+ /**
30
+ * The subject for a customer default payment methods listener
31
+ */
32
+ CustomerSubjects["CustomerPaymentMethod"] = "customer.paymentmethod";
29
33
  })(CustomerSubjects || (exports.CustomerSubjects = CustomerSubjects = {}));
@@ -22,4 +22,8 @@ export interface CustomerPaymentMethodRequestEvent {
22
22
  * Events of different types may be grouped into different streams based on their common characteristics.
23
23
  */
24
24
  stream: CustomerStream.Customer;
25
+ data: {
26
+ customerId: string;
27
+ customerAccountId: string;
28
+ };
25
29
  }
@@ -0,0 +1,30 @@
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 PaymentMethod" event.
6
+ *
7
+ * The "CustomerPaymentMethodEvent" 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 CustomerPaymentMethodEvent {
11
+ /**
12
+ * The subject of the event, specifying that it represents an "Customer PaymentMethod" event.
13
+ */
14
+ subject: CustomerSubjects.CustomerPaymentMethod;
15
+ /**
16
+ * The durable name associated with the consumer handling the "Customer PaymentMethod" 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.CustomerPaymentMethodDurablename;
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
+ data: {
26
+ customerId: string;
27
+ customerAccountId: string;
28
+ paymentMethods: {}[];
29
+ };
30
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/build/index.d.ts CHANGED
@@ -138,6 +138,7 @@ export * from "./events/common/interfaces/customer-events-interfaces/customer-un
138
138
  export * from "./events/common/interfaces/customer-events-interfaces/customer-new-event";
139
139
  export * from "./events/common/interfaces/customer-events-interfaces/customer-otp-request-event";
140
140
  export * from "./events/common/interfaces/customer-events-interfaces/customer-paymentmethod-request";
141
+ export * from "./events/common/interfaces/customer-events-interfaces/customer-paymentmethod";
141
142
  /**
142
143
  * Re-exports all the interfaces related to streams from the "stream-interfaces" file.
143
144
  *
package/build/index.js CHANGED
@@ -170,6 +170,7 @@ __exportStar(require("./events/common/interfaces/customer-events-interfaces/cust
170
170
  __exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-new-event"), exports);
171
171
  __exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-otp-request-event"), exports);
172
172
  __exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-paymentmethod-request"), exports);
173
+ __exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-paymentmethod"), exports);
173
174
  //! Interfaces related to payment events are currently commented out using '//'.
174
175
  // export * from "./payment-event-interfaces";
175
176
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hastehaul/common",
3
- "version": "2.0.17",
3
+ "version": "2.0.19",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",