@hastehaul/common 2.0.23 → 2.0.25
Sign up to get free protection for your applications and to get access to all the features.
- package/build/events/common/enums/durable-names/customer-system-dname.d.ts +7 -0
- package/build/events/common/enums/durable-names/customer-system-dname.js +11 -0
- package/build/events/common/enums/durable-names/index.d.ts +2 -1
- package/build/events/common/enums/streams/customer-system-stream.d.ts +9 -0
- package/build/events/common/enums/streams/customer-system-stream.js +13 -0
- package/build/events/common/enums/streams/index.d.ts +2 -1
- package/build/events/common/enums/subjects/customer-system-subjects.d.ts +9 -0
- package/build/events/common/enums/subjects/customer-system-subjects.js +13 -0
- package/build/events/common/enums/subjects/index.d.ts +2 -1
- package/build/events/common/enums/subjects/main-subjects.d.ts +2 -1
- package/build/events/common/enums/subjects/main-subjects.js +1 -0
- package/build/events/common/interfaces/customer-system-events-interfaces/customer-system-updated-customer-service-event.d.ts +34 -0
- package/build/events/common/interfaces/customer-system-events-interfaces/customer-system-updated-customer-service-event.js +2 -0
- package/build/events/common/interfaces/customer-system-events-interfaces/customer-system-updated-payment-service-event.d.ts +34 -0
- package/build/events/common/interfaces/customer-system-events-interfaces/customer-system-updated-payment-service-event.js +2 -0
- package/build/events/common/interfaces/stream-interfaces/customer-system-stream-interface.d.ts +23 -0
- package/build/events/common/interfaces/stream-interfaces/customer-system-stream-interface.js +2 -0
- package/build/index.d.ts +6 -0
- package/build/index.js +8 -0
- package/package.json +1 -1
@@ -0,0 +1,7 @@
|
|
1
|
+
/**
|
2
|
+
* Enum representing durable names for consumers associated with different customer events.
|
3
|
+
*/
|
4
|
+
export declare enum CustomerSystemDurableName {
|
5
|
+
CustomerSystemUpdateCustomerServiceDurablename = "customer-system-update_customer-service-consumer",
|
6
|
+
CustomerSystemUpdatePaymentServiceDurablename = "customer-system-update_payment-service-consumer"
|
7
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CustomerSystemDurableName = void 0;
|
4
|
+
/**
|
5
|
+
* Enum representing durable names for consumers associated with different customer events.
|
6
|
+
*/
|
7
|
+
var CustomerSystemDurableName;
|
8
|
+
(function (CustomerSystemDurableName) {
|
9
|
+
CustomerSystemDurableName["CustomerSystemUpdateCustomerServiceDurablename"] = "customer-system-update_customer-service-consumer";
|
10
|
+
CustomerSystemDurableName["CustomerSystemUpdatePaymentServiceDurablename"] = "customer-system-update_payment-service-consumer";
|
11
|
+
})(CustomerSystemDurableName || (exports.CustomerSystemDurableName = CustomerSystemDurableName = {}));
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { PaymentDurableName } from "./payment-dname";
|
2
2
|
import { OrderDurableName } from "./order-dname";
|
3
3
|
import { CustomerDurableName } from './customer-dname';
|
4
|
+
import { CustomerSystemDurableName } from "./customer-system-dname";
|
4
5
|
/**
|
5
6
|
* Type alias representing a durable name that can be associated with different event consumers.
|
6
7
|
*
|
7
8
|
* The `DurableName` type can be one of the durable names defined in `OrderDurableName` or `PaymentDurableName`.
|
8
9
|
*/
|
9
|
-
export type DurableName = OrderDurableName | PaymentDurableName | CustomerDurableName;
|
10
|
+
export type DurableName = OrderDurableName | PaymentDurableName | CustomerDurableName | CustomerSystemDurableName;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CustomerSystemStream = void 0;
|
4
|
+
/**
|
5
|
+
* Enum representing the name of the JetStream stream used for handling customer events.
|
6
|
+
*/
|
7
|
+
var CustomerSystemStream;
|
8
|
+
(function (CustomerSystemStream) {
|
9
|
+
/**
|
10
|
+
* The name of the JetStream stream for customer events.
|
11
|
+
*/
|
12
|
+
CustomerSystemStream["CustomerSystem"] = "CUSTOMER-SYSTEM";
|
13
|
+
})(CustomerSystemStream || (exports.CustomerSystemStream = CustomerSystemStream = {}));
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { PaymentStream } from './payment-stream';
|
2
2
|
import { OrderStream } from './order-stream';
|
3
3
|
import { CustomerStream } from './customer-stream';
|
4
|
+
import { CustomerSystemStream } from './customer-system-stream';
|
4
5
|
/**
|
5
6
|
* Type alias representing a JetStream stream that can handle different event types.
|
6
7
|
*
|
7
8
|
* The `Streams` type can be one of the streams defined in `OrderStream` or `PaymentStream`.
|
8
9
|
*/
|
9
|
-
export type Streams = OrderStream | PaymentStream | CustomerStream;
|
10
|
+
export type Streams = OrderStream | PaymentStream | CustomerStream | CustomerSystemStream;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* Enum representing the subjects for different customer system events.
|
3
|
+
*/
|
4
|
+
export declare enum CustomerSystemSubjects {
|
5
|
+
CustomerSystemUpdateCustomerService = "customer-system.update-customer-service",
|
6
|
+
CustomerSystemUpdatePaymentService = "customer-system.updadte-notification-service",
|
7
|
+
CustomerSystemUpdateDriverService = "customer-system.updadte-driver-service",
|
8
|
+
CustomerSystemUpdateDiscountService = "customer-system.updadte-discount-service"
|
9
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CustomerSystemSubjects = void 0;
|
4
|
+
/**
|
5
|
+
* Enum representing the subjects for different customer system events.
|
6
|
+
*/
|
7
|
+
var CustomerSystemSubjects;
|
8
|
+
(function (CustomerSystemSubjects) {
|
9
|
+
CustomerSystemSubjects["CustomerSystemUpdateCustomerService"] = "customer-system.update-customer-service";
|
10
|
+
CustomerSystemSubjects["CustomerSystemUpdatePaymentService"] = "customer-system.updadte-notification-service";
|
11
|
+
CustomerSystemSubjects["CustomerSystemUpdateDriverService"] = "customer-system.updadte-driver-service";
|
12
|
+
CustomerSystemSubjects["CustomerSystemUpdateDiscountService"] = "customer-system.updadte-discount-service";
|
13
|
+
})(CustomerSystemSubjects || (exports.CustomerSystemSubjects = CustomerSystemSubjects = {}));
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { PaymentSubjects } from './payment-subjects';
|
2
2
|
import { OrderSubjects } from './order-subjects';
|
3
3
|
import { CustomerSubjects } from './customer-subjects';
|
4
|
+
import { CustomerSystemSubjects } from "./customer-system-subjects";
|
4
5
|
/**
|
5
6
|
* Type alias representing the subjects for different event types.
|
6
7
|
*
|
7
8
|
* The `Subjects` type can be one of the subjects defined in `OrderSubjects` or `PaymentSubjects`.
|
8
9
|
*/
|
9
|
-
export type Subjects = OrderSubjects | PaymentSubjects | CustomerSubjects;
|
10
|
+
export type Subjects = OrderSubjects | PaymentSubjects | CustomerSubjects | CustomerSystemSubjects;
|
@@ -5,7 +5,8 @@ export declare enum MainSubjects {
|
|
5
5
|
ORDER = "order.*",
|
6
6
|
PAYMENT = "payment.*",
|
7
7
|
ETA = "eta.*",
|
8
|
-
CUSTOMER = "customer.*"
|
8
|
+
CUSTOMER = "customer.*",
|
9
|
+
CUSTOMER_SYSYTEM = "customer-system.*"
|
9
10
|
}
|
10
11
|
/**
|
11
12
|
* Type utility to concatenate two strings into a valid subject format.
|
@@ -10,6 +10,7 @@ var MainSubjects;
|
|
10
10
|
MainSubjects["PAYMENT"] = "payment.*";
|
11
11
|
MainSubjects["ETA"] = "eta.*";
|
12
12
|
MainSubjects["CUSTOMER"] = "customer.*";
|
13
|
+
MainSubjects["CUSTOMER_SYSYTEM"] = "customer-system.*";
|
13
14
|
})(MainSubjects || (exports.MainSubjects = MainSubjects = {}));
|
14
15
|
/**
|
15
16
|
* Utility function to spread enum values into an array of strings.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { CustomerSystemDurableName } from '../../enums/durable-names/customer-system-dname';
|
2
|
+
import { CustomerSystemStream } from '../../enums/streams/customer-system-stream';
|
3
|
+
import { CustomerSystemSubjects } from '../../enums/subjects/customer-system-subjects';
|
4
|
+
/**
|
5
|
+
* Interface representing the "Customer Updated Customer Service" event.
|
6
|
+
*
|
7
|
+
* The "CustomerUpdated Customer ServiceEvent" 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 CustomerSystemUpdatedCustomerServiceEvent {
|
11
|
+
/**
|
12
|
+
* The subject of the event, specifying that it represents an "Customer Updated Customer Service" event.
|
13
|
+
*/
|
14
|
+
subject: CustomerSystemSubjects.CustomerSystemUpdateCustomerService;
|
15
|
+
/**
|
16
|
+
* The durable name associated with the consumer handling the "Customer Updated Customer Service" event.
|
17
|
+
* This property is optional and may be used to identify the consumer processing the event in a durable manner.
|
18
|
+
*/
|
19
|
+
durableName?: CustomerSystemDurableName.CustomerSystemUpdateCustomerServiceDurablename;
|
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: CustomerSystemStream.CustomerSystem;
|
25
|
+
/**
|
26
|
+
* The data payload of the "Customer Updated Customer Service" event.
|
27
|
+
* The data payload contains specific details related to the customer cancellation, such as key, value and version
|
28
|
+
*/
|
29
|
+
data: {
|
30
|
+
key: string;
|
31
|
+
value: string;
|
32
|
+
version: number;
|
33
|
+
};
|
34
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { CustomerSystemDurableName } from '../../enums/durable-names/customer-system-dname';
|
2
|
+
import { CustomerSystemStream } from '../../enums/streams/customer-system-stream';
|
3
|
+
import { CustomerSystemSubjects } from '../../enums/subjects/customer-system-subjects';
|
4
|
+
/**
|
5
|
+
* Interface representing the "Customer Updated Payment Service" event.
|
6
|
+
*
|
7
|
+
* The "CustomerUpdated Payment ServiceEvent" 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 CustomerSystemUpdatedPaymentServiceEvent {
|
11
|
+
/**
|
12
|
+
* The subject of the event, specifying that it represents an "Customer Updated Payment Service" event.
|
13
|
+
*/
|
14
|
+
subject: CustomerSystemSubjects.CustomerSystemUpdatePaymentService;
|
15
|
+
/**
|
16
|
+
* The durable name associated with the consumer handling the "Customer Updated Payment Service" event.
|
17
|
+
* This property is optional and may be used to identify the consumer processing the event in a durable manner.
|
18
|
+
*/
|
19
|
+
durableName?: CustomerSystemDurableName.CustomerSystemUpdatePaymentServiceDurablename;
|
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: CustomerSystemStream.CustomerSystem;
|
25
|
+
/**
|
26
|
+
* The data payload of the "Customer Updated Payment Service" event.
|
27
|
+
* The data payload contains specific details related to the customer cancellation, such as key, value and version
|
28
|
+
*/
|
29
|
+
data: {
|
30
|
+
key: string;
|
31
|
+
value: string;
|
32
|
+
version: number;
|
33
|
+
};
|
34
|
+
}
|
package/build/events/common/interfaces/stream-interfaces/customer-system-stream-interface.d.ts
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
import { CustomerSystemStream } from "../../enums/streams/customer-system-stream";
|
2
|
+
import { MainSubjects } from "../../enums/subjects/main-subjects";
|
3
|
+
/**
|
4
|
+
* Interface representing an event associated with the "Customer System" stream.
|
5
|
+
*
|
6
|
+
* The "CustomerSystemStreamEvent" interface defines the structure of an event related to the "Customer System" stream.
|
7
|
+
* Events of this type are used to communicate specific details related to the "Customer System" stream.
|
8
|
+
*/
|
9
|
+
export interface CustomerSystemStreamEvent {
|
10
|
+
/**
|
11
|
+
* The subject of the event, specifying that it is associated with the "Customer System" stream.
|
12
|
+
*
|
13
|
+
* In this case, the subject is derived from the "MainSubjects.CUSTOMER_SYSYTEM" enum value, indicating that this event is related to customers system.
|
14
|
+
*/
|
15
|
+
subject: MainSubjects.CUSTOMER_SYSYTEM;
|
16
|
+
/**
|
17
|
+
* The stream to which the event belongs, specifying that it is an "Customer System" stream.
|
18
|
+
*
|
19
|
+
* Events of different types may be grouped into different streams based on their common characteristics.
|
20
|
+
* In this case, the stream is of type "CustomerSystemStream.CustomerSystem", indicating that it is an event related to the "Customer System" stream.
|
21
|
+
*/
|
22
|
+
stream: CustomerSystemStream.CustomerSystem;
|
23
|
+
}
|
package/build/index.d.ts
CHANGED
@@ -140,6 +140,8 @@ export * from "./events/common/interfaces/customer-events-interfaces/customer-ne
|
|
140
140
|
export * from "./events/common/interfaces/customer-events-interfaces/customer-otp-request-event";
|
141
141
|
export * from "./events/common/interfaces/customer-events-interfaces/customer-paymentmethod-request";
|
142
142
|
export * from "./events/common/interfaces/customer-events-interfaces/customer-paymentmethod";
|
143
|
+
export * from "./events/common/interfaces/customer-system-events-interfaces/customer-system-updated-customer-service-event";
|
144
|
+
export * from "./events/common/interfaces/customer-system-events-interfaces/customer-system-updated-payment-service-event";
|
143
145
|
/**
|
144
146
|
* Re-exports all the interfaces related to streams from the "stream-interfaces" file.
|
145
147
|
*
|
@@ -148,6 +150,7 @@ export * from "./events/common/interfaces/customer-events-interfaces/customer-pa
|
|
148
150
|
*/
|
149
151
|
export * from "./events/common/interfaces/stream-interfaces/order-stream-interface";
|
150
152
|
export * from "./events/common/interfaces/stream-interfaces/customer-stream-interface";
|
153
|
+
export * from "./events/common/interfaces/stream-interfaces/customer-system-stream-interface";
|
151
154
|
/**
|
152
155
|
* Re-exports all the types related to durable names from the "durable-names" file.
|
153
156
|
*
|
@@ -157,6 +160,7 @@ export * from "./events/common/enums/durable-names";
|
|
157
160
|
export * from "./events/common/enums/durable-names/customer-dname";
|
158
161
|
export * from "./events/common/enums/durable-names/order-dname";
|
159
162
|
export * from "./events/common/enums/durable-names/payment-dname";
|
163
|
+
export * from "./events/common/enums/durable-names/customer-system-dname";
|
160
164
|
/**
|
161
165
|
* Re-exports the type related to streams from the "streams" file.
|
162
166
|
*
|
@@ -166,6 +170,7 @@ export * from "./events/common/enums/streams";
|
|
166
170
|
export * from "./events/common/enums/streams/order-stream";
|
167
171
|
export * from "./events/common/enums/streams/payment-stream";
|
168
172
|
export * from "./events/common/enums/streams/customer-stream";
|
173
|
+
export * from "./events/common/enums/streams/customer-system-stream";
|
169
174
|
/**
|
170
175
|
* Re-exports the type related to subjects from the "subjects" file.
|
171
176
|
*
|
@@ -176,3 +181,4 @@ export * from "./events/common/enums/subjects/order-subjects";
|
|
176
181
|
export * from "./events/common/enums/subjects/payment-subjects";
|
177
182
|
export * from "./events/common/enums/subjects/main-subjects";
|
178
183
|
export * from "./events/common/enums/subjects/customer-subjects";
|
184
|
+
export * from "./events/common/enums/subjects/customer-system-subjects";
|
package/build/index.js
CHANGED
@@ -172,6 +172,10 @@ __exportStar(require("./events/common/interfaces/customer-events-interfaces/cust
|
|
172
172
|
__exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-otp-request-event"), exports);
|
173
173
|
__exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-paymentmethod-request"), exports);
|
174
174
|
__exportStar(require("./events/common/interfaces/customer-events-interfaces/customer-paymentmethod"), exports);
|
175
|
+
// CUSTOMER SYSTEM EVENTS
|
176
|
+
__exportStar(require("./events/common/interfaces/customer-system-events-interfaces/customer-system-updated-customer-service-event"), exports);
|
177
|
+
__exportStar(require("./events/common/interfaces/customer-system-events-interfaces/customer-system-updated-payment-service-event"), exports);
|
178
|
+
// PAYMENT EVENTS
|
175
179
|
//! Interfaces related to payment events are currently commented out using '//'.
|
176
180
|
// export * from "./payment-event-interfaces";
|
177
181
|
/**
|
@@ -182,6 +186,7 @@ __exportStar(require("./events/common/interfaces/customer-events-interfaces/cust
|
|
182
186
|
*/
|
183
187
|
__exportStar(require("./events/common/interfaces/stream-interfaces/order-stream-interface"), exports);
|
184
188
|
__exportStar(require("./events/common/interfaces/stream-interfaces/customer-stream-interface"), exports);
|
189
|
+
__exportStar(require("./events/common/interfaces/stream-interfaces/customer-system-stream-interface"), exports);
|
185
190
|
//* Import and re-export types from other files in events enums for easier access.
|
186
191
|
/**
|
187
192
|
* Re-exports all the types related to durable names from the "durable-names" file.
|
@@ -192,6 +197,7 @@ __exportStar(require("./events/common/enums/durable-names"), exports);
|
|
192
197
|
__exportStar(require("./events/common/enums/durable-names/customer-dname"), exports);
|
193
198
|
__exportStar(require("./events/common/enums/durable-names/order-dname"), exports);
|
194
199
|
__exportStar(require("./events/common/enums/durable-names/payment-dname"), exports);
|
200
|
+
__exportStar(require("./events/common/enums/durable-names/customer-system-dname"), exports);
|
195
201
|
/**
|
196
202
|
* Re-exports the type related to streams from the "streams" file.
|
197
203
|
*
|
@@ -201,6 +207,7 @@ __exportStar(require("./events/common/enums/streams"), exports);
|
|
201
207
|
__exportStar(require("./events/common/enums/streams/order-stream"), exports);
|
202
208
|
__exportStar(require("./events/common/enums/streams/payment-stream"), exports);
|
203
209
|
__exportStar(require("./events/common/enums/streams/customer-stream"), exports);
|
210
|
+
__exportStar(require("./events/common/enums/streams/customer-system-stream"), exports);
|
204
211
|
/**
|
205
212
|
* Re-exports the type related to subjects from the "subjects" file.
|
206
213
|
*
|
@@ -211,3 +218,4 @@ __exportStar(require("./events/common/enums/subjects/order-subjects"), exports);
|
|
211
218
|
__exportStar(require("./events/common/enums/subjects/payment-subjects"), exports);
|
212
219
|
__exportStar(require("./events/common/enums/subjects/main-subjects"), exports);
|
213
220
|
__exportStar(require("./events/common/enums/subjects/customer-subjects"), exports);
|
221
|
+
__exportStar(require("./events/common/enums/subjects/customer-system-subjects"), exports);
|