@epztickets/common 1.46.0 → 1.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Subjects } from "./subjects";
|
|
2
|
+
export interface OrderAwaitingPaymentEvent {
|
|
3
|
+
subject: Subjects.OrderAwaitingPayment;
|
|
4
|
+
data: {
|
|
5
|
+
id: string;
|
|
6
|
+
version: number;
|
|
7
|
+
userId: string;
|
|
8
|
+
price: number;
|
|
9
|
+
sellableUnit: {
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -15,6 +15,7 @@ export declare enum Subjects {
|
|
|
15
15
|
OrderCancelled = "events.order.cancelled",
|
|
16
16
|
OrderCompleted = "events.order.completed",
|
|
17
17
|
OrderRejected = "events.order.rejected",
|
|
18
|
+
OrderAwaitingPayment = "events.order.awaiting-payment",
|
|
18
19
|
ExpirationComplete = "events.expiration.complete",
|
|
19
20
|
PaymentCreated = "events.payment.created",
|
|
20
21
|
OwnerApproved = "events.owner.approved",
|
package/build/events/subjects.js
CHANGED
|
@@ -19,6 +19,13 @@ var Subjects;
|
|
|
19
19
|
Subjects["OrderCancelled"] = "events.order.cancelled";
|
|
20
20
|
Subjects["OrderCompleted"] = "events.order.completed";
|
|
21
21
|
Subjects["OrderRejected"] = "events.order.rejected";
|
|
22
|
+
// Fired by orders when an order moves Created → AwaitingPayment after the
|
|
23
|
+
// inventory layer durably reserves the slot. Payments mirrors this onto
|
|
24
|
+
// its local Order replica so the payment route can guard on the new
|
|
25
|
+
// status. Without a dedicated event, payments would only see
|
|
26
|
+
// OrderCancelled/Completed transitions and the Stripe charge route would
|
|
27
|
+
// have no way to refuse pre-confirmation payments.
|
|
28
|
+
Subjects["OrderAwaitingPayment"] = "events.order.awaiting-payment";
|
|
22
29
|
Subjects["ExpirationComplete"] = "events.expiration.complete";
|
|
23
30
|
Subjects["PaymentCreated"] = "events.payment.created";
|
|
24
31
|
Subjects["OwnerApproved"] = "events.owner.approved";
|
package/build/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export * from "./events/room-updated-event";
|
|
|
27
27
|
export * from "./events/order-cancelled-event";
|
|
28
28
|
export * from "./events/order-completed-event";
|
|
29
29
|
export * from "./events/order-created-event";
|
|
30
|
+
export * from "./events/order-awaiting-payment-event";
|
|
30
31
|
export * from "./events/timelock-confirmed.event";
|
|
31
32
|
export * from "./events/timelock-released-event";
|
|
32
33
|
export * from "./events/timelock-created-event";
|
package/build/index.js
CHANGED
|
@@ -46,6 +46,7 @@ __exportStar(require("./events/room-updated-event"), exports);
|
|
|
46
46
|
__exportStar(require("./events/order-cancelled-event"), exports);
|
|
47
47
|
__exportStar(require("./events/order-completed-event"), exports);
|
|
48
48
|
__exportStar(require("./events/order-created-event"), exports);
|
|
49
|
+
__exportStar(require("./events/order-awaiting-payment-event"), exports);
|
|
49
50
|
__exportStar(require("./events/timelock-confirmed.event"), exports);
|
|
50
51
|
__exportStar(require("./events/timelock-released-event"), exports);
|
|
51
52
|
__exportStar(require("./events/timelock-created-event"), exports);
|