@final-commerce/command-frame 0.1.5 → 0.1.6

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.
Files changed (57) hide show
  1. package/dist/index.d.ts +10 -0
  2. package/dist/index.js +5 -0
  3. package/dist/pubsub/topics/cart/cart-created/types.d.ts +12 -0
  4. package/dist/pubsub/topics/cart/cart-created/types.js +1 -0
  5. package/dist/pubsub/topics/cart/cart-discount-added/types.d.ts +12 -0
  6. package/dist/pubsub/topics/cart/cart-discount-added/types.js +1 -0
  7. package/dist/pubsub/topics/cart/cart-discount-removed/types.d.ts +10 -0
  8. package/dist/pubsub/topics/cart/cart-discount-removed/types.js +1 -0
  9. package/dist/pubsub/topics/cart/cart-fee-added/types.d.ts +12 -0
  10. package/dist/pubsub/topics/cart/cart-fee-added/types.js +1 -0
  11. package/dist/pubsub/topics/cart/cart-fee-removed/types.d.ts +11 -0
  12. package/dist/pubsub/topics/cart/cart-fee-removed/types.js +1 -0
  13. package/dist/pubsub/topics/cart/customer-assigned/types.d.ts +12 -0
  14. package/dist/pubsub/topics/cart/customer-assigned/types.js +1 -0
  15. package/dist/pubsub/topics/cart/index.d.ts +7 -0
  16. package/dist/pubsub/topics/cart/index.js +53 -0
  17. package/dist/pubsub/topics/cart/product-added/types.d.ts +12 -0
  18. package/dist/pubsub/topics/cart/product-added/types.js +1 -0
  19. package/dist/pubsub/topics/cart/product-deleted/types.d.ts +13 -0
  20. package/dist/pubsub/topics/cart/product-deleted/types.js +1 -0
  21. package/dist/pubsub/topics/cart/types.d.ts +22 -0
  22. package/dist/pubsub/topics/cart/types.js +13 -0
  23. package/dist/pubsub/topics/index.d.ts +5 -0
  24. package/dist/pubsub/topics/index.js +5 -0
  25. package/dist/pubsub/topics/orders/index.d.ts +7 -0
  26. package/dist/pubsub/topics/orders/index.js +23 -0
  27. package/dist/pubsub/topics/orders/order-created/types.d.ts +12 -0
  28. package/dist/pubsub/topics/orders/order-created/types.js +1 -0
  29. package/dist/pubsub/topics/orders/order-updated/types.d.ts +12 -0
  30. package/dist/pubsub/topics/orders/order-updated/types.js +1 -0
  31. package/dist/pubsub/topics/orders/types.d.ts +10 -0
  32. package/dist/pubsub/topics/orders/types.js +7 -0
  33. package/dist/pubsub/topics/payments/index.d.ts +7 -0
  34. package/dist/pubsub/topics/payments/index.js +23 -0
  35. package/dist/pubsub/topics/payments/payment-done/types.d.ts +14 -0
  36. package/dist/pubsub/topics/payments/payment-done/types.js +1 -0
  37. package/dist/pubsub/topics/payments/payment-err/types.d.ts +14 -0
  38. package/dist/pubsub/topics/payments/payment-err/types.js +1 -0
  39. package/dist/pubsub/topics/payments/types.d.ts +10 -0
  40. package/dist/pubsub/topics/payments/types.js +7 -0
  41. package/dist/pubsub/topics/products/index.d.ts +7 -0
  42. package/dist/pubsub/topics/products/index.js +23 -0
  43. package/dist/pubsub/topics/products/product-created/types.d.ts +12 -0
  44. package/dist/pubsub/topics/products/product-created/types.js +1 -0
  45. package/dist/pubsub/topics/products/product-updated/types.d.ts +12 -0
  46. package/dist/pubsub/topics/products/product-updated/types.js +1 -0
  47. package/dist/pubsub/topics/products/types.d.ts +10 -0
  48. package/dist/pubsub/topics/products/types.js +7 -0
  49. package/dist/pubsub/topics/refunds/index.d.ts +7 -0
  50. package/dist/pubsub/topics/refunds/index.js +23 -0
  51. package/dist/pubsub/topics/refunds/refund-created/types.d.ts +13 -0
  52. package/dist/pubsub/topics/refunds/refund-created/types.js +1 -0
  53. package/dist/pubsub/topics/refunds/refund-updated/types.d.ts +13 -0
  54. package/dist/pubsub/topics/refunds/refund-updated/types.js +1 -0
  55. package/dist/pubsub/topics/refunds/types.d.ts +10 -0
  56. package/dist/pubsub/topics/refunds/types.js +7 -0
  57. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -111,4 +111,14 @@ export type { PostMessageRequest, PostMessageResponse } from "./client";
111
111
  export { topics } from "./pubsub/topic";
112
112
  export type { TopicDefinition, TopicEvent, TopicEventType, TopicSubscriptionCallback, TopicSubscription } from "./pubsub/types";
113
113
  export { customersTopic } from "./pubsub/topics/customers";
114
+ export { ordersTopic } from "./pubsub/topics/orders";
115
+ export { refundsTopic } from "./pubsub/topics/refunds";
116
+ export { productsTopic } from "./pubsub/topics/products";
117
+ export { cartTopic } from "./pubsub/topics/cart";
118
+ export { paymentsTopic } from "./pubsub/topics/payments";
114
119
  export type { CustomerCreatedPayload, CustomerUpdatedPayload, CustomerNoteAddedPayload, CustomerNoteDeletedPayload, CustomerAssignedPayload, CustomerUnassignedPayload, CustomerCreatedEvent, CustomerUpdatedEvent, CustomerNoteAddedEvent, CustomerNoteDeletedEvent, CustomerAssignedEvent, CustomerUnassignedEvent, CustomersEventType, CustomersEventPayload } from "./pubsub/topics/customers/types";
120
+ export type { OrderCreatedPayload, OrderUpdatedPayload, OrderCreatedEvent, OrderUpdatedEvent, OrdersEventType, OrdersEventPayload } from "./pubsub/topics/orders/types";
121
+ export type { RefundCreatedPayload, RefundUpdatedPayload, RefundCreatedEvent, RefundUpdatedEvent, RefundsEventType, RefundsEventPayload } from "./pubsub/topics/refunds/types";
122
+ export type { ProductCreatedPayload, ProductUpdatedPayload, ProductCreatedEvent, ProductUpdatedEvent, ProductsEventType, ProductsEventPayload } from "./pubsub/topics/products/types";
123
+ export type { CartCreatedPayload, CartCustomerAssignedPayload, ProductAddedPayload, ProductDeletedPayload, CartDiscountAddedPayload, CartDiscountRemovedPayload, CartFeeAddedPayload, CartFeeRemovedPayload, CartCreatedEvent, CartCustomerAssignedEvent, ProductAddedEvent, ProductDeletedEvent, CartDiscountAddedEvent, CartDiscountRemovedEvent, CartFeeAddedEvent, CartFeeRemovedEvent, CartEventType, CartEventPayload } from "./pubsub/topics/cart/types";
124
+ export type { PaymentDonePayload, PaymentErrPayload, PaymentDoneEvent, PaymentErrEvent, PaymentsEventType, PaymentsEventPayload } from "./pubsub/topics/payments/types";
package/dist/index.js CHANGED
@@ -125,3 +125,8 @@ export { commandFrameClient, CommandFrameClient } from "./client";
125
125
  export { topics } from "./pubsub/topic";
126
126
  // Export Pub/Sub Topics
127
127
  export { customersTopic } from "./pubsub/topics/customers";
128
+ export { ordersTopic } from "./pubsub/topics/orders";
129
+ export { refundsTopic } from "./pubsub/topics/refunds";
130
+ export { productsTopic } from "./pubsub/topics/products";
131
+ export { cartTopic } from "./pubsub/topics/cart";
132
+ export { paymentsTopic } from "./pubsub/topics/payments";
@@ -0,0 +1,12 @@
1
+ import type { CFActiveCart } from "../../../../CommonTypes";
2
+ import type { TopicEvent } from "../../../types";
3
+ /**
4
+ * Payload for cart-created event
5
+ */
6
+ export interface CartCreatedPayload {
7
+ cart: CFActiveCart;
8
+ }
9
+ /**
10
+ * Typed event for cart-created
11
+ */
12
+ export type CartCreatedEvent = TopicEvent<CartCreatedPayload>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { CFDiscount } from "../../../../CommonTypes";
2
+ import type { TopicEvent } from "../../../types";
3
+ /**
4
+ * Payload for cart-discount-added event
5
+ */
6
+ export interface CartDiscountAddedPayload {
7
+ discount: CFDiscount;
8
+ }
9
+ /**
10
+ * Typed event for cart-discount-added
11
+ */
12
+ export type CartDiscountAddedEvent = TopicEvent<CartDiscountAddedPayload>;
@@ -0,0 +1,10 @@
1
+ import type { TopicEvent } from "../../../types";
2
+ /**
3
+ * Payload for cart-discount-removed event
4
+ */
5
+ export interface CartDiscountRemovedPayload {
6
+ }
7
+ /**
8
+ * Typed event for cart-discount-removed
9
+ */
10
+ export type CartDiscountRemovedEvent = TopicEvent<CartDiscountRemovedPayload>;
@@ -0,0 +1,12 @@
1
+ import type { CFCustomFee } from "../../../../CommonTypes";
2
+ import type { TopicEvent } from "../../../types";
3
+ /**
4
+ * Payload for cart-fee-added event
5
+ */
6
+ export interface CartFeeAddedPayload {
7
+ fee: CFCustomFee;
8
+ }
9
+ /**
10
+ * Typed event for cart-fee-added
11
+ */
12
+ export type CartFeeAddedEvent = TopicEvent<CartFeeAddedPayload>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { TopicEvent } from "../../../types";
2
+ /**
3
+ * Payload for cart-fee-removed event
4
+ */
5
+ export interface CartFeeRemovedPayload {
6
+ feeIndex: number;
7
+ }
8
+ /**
9
+ * Typed event for cart-fee-removed
10
+ */
11
+ export type CartFeeRemovedEvent = TopicEvent<CartFeeRemovedPayload>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { CFCustomer } from "../../../../CommonTypes";
2
+ import type { TopicEvent } from "../../../types";
3
+ /**
4
+ * Payload for customer-assigned event (in cart context)
5
+ */
6
+ export interface CartCustomerAssignedPayload {
7
+ customer: CFCustomer;
8
+ }
9
+ /**
10
+ * Typed event for customer-assigned (in cart context)
11
+ */
12
+ export type CartCustomerAssignedEvent = TopicEvent<CartCustomerAssignedPayload>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Cart Topic Definition
3
+ * Defines the cart topic and its available event types
4
+ */
5
+ import type { TopicDefinition } from "../../types";
6
+ export declare const cartTopic: TopicDefinition;
7
+ export * from "./types";
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Cart Topic Definition
3
+ * Defines the cart topic and its available event types
4
+ */
5
+ export const cartTopic = {
6
+ id: "cart",
7
+ name: "Cart",
8
+ description: "Topic for cart-related events",
9
+ eventTypes: [
10
+ {
11
+ id: "cart-created",
12
+ name: "Cart Created",
13
+ description: "Fired when a new cart is created"
14
+ },
15
+ {
16
+ id: "customer-assigned",
17
+ name: "Customer Assigned",
18
+ description: "Fired when a customer is assigned to the cart"
19
+ },
20
+ {
21
+ id: "product-added",
22
+ name: "Product Added",
23
+ description: "Fired when a product is added to the cart"
24
+ },
25
+ {
26
+ id: "product-deleted",
27
+ name: "Product Deleted",
28
+ description: "Fired when a product is removed from the cart"
29
+ },
30
+ {
31
+ id: "cart-discount-added",
32
+ name: "Cart Discount Added",
33
+ description: "Fired when a discount is added to the cart"
34
+ },
35
+ {
36
+ id: "cart-discount-removed",
37
+ name: "Cart Discount Removed",
38
+ description: "Fired when a discount is removed from the cart"
39
+ },
40
+ {
41
+ id: "cart-fee-added",
42
+ name: "Cart Fee Added",
43
+ description: "Fired when a fee is added to the cart"
44
+ },
45
+ {
46
+ id: "cart-fee-removed",
47
+ name: "Cart Fee Removed",
48
+ description: "Fired when a fee is removed from the cart"
49
+ }
50
+ ]
51
+ };
52
+ // Re-export types
53
+ export * from "./types";
@@ -0,0 +1,12 @@
1
+ import type { CFActiveProduct } from "../../../../CommonTypes";
2
+ import type { TopicEvent } from "../../../types";
3
+ /**
4
+ * Payload for product-added event
5
+ */
6
+ export interface ProductAddedPayload {
7
+ product: CFActiveProduct;
8
+ }
9
+ /**
10
+ * Typed event for product-added
11
+ */
12
+ export type ProductAddedEvent = TopicEvent<ProductAddedPayload>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { CFActiveProduct } from "../../../../CommonTypes";
2
+ import type { TopicEvent } from "../../../types";
3
+ /**
4
+ * Payload for product-deleted event
5
+ */
6
+ export interface ProductDeletedPayload {
7
+ product: CFActiveProduct;
8
+ internalId: string;
9
+ }
10
+ /**
11
+ * Typed event for product-deleted
12
+ */
13
+ export type ProductDeletedEvent = TopicEvent<ProductDeletedPayload>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Cart Topic Types
3
+ * Aggregated types for all cart-related events
4
+ */
5
+ export * from "./cart-created/types";
6
+ export * from "./customer-assigned/types";
7
+ export * from "./product-added/types";
8
+ export * from "./product-deleted/types";
9
+ export * from "./cart-discount-added/types";
10
+ export * from "./cart-discount-removed/types";
11
+ export * from "./cart-fee-added/types";
12
+ export * from "./cart-fee-removed/types";
13
+ import type { CartCreatedPayload } from "./cart-created/types";
14
+ import type { CartCustomerAssignedPayload } from "./customer-assigned/types";
15
+ import type { ProductAddedPayload } from "./product-added/types";
16
+ import type { ProductDeletedPayload } from "./product-deleted/types";
17
+ import type { CartDiscountAddedPayload } from "./cart-discount-added/types";
18
+ import type { CartDiscountRemovedPayload } from "./cart-discount-removed/types";
19
+ import type { CartFeeAddedPayload } from "./cart-fee-added/types";
20
+ import type { CartFeeRemovedPayload } from "./cart-fee-removed/types";
21
+ export type CartEventPayload = CartCreatedPayload | CartCustomerAssignedPayload | ProductAddedPayload | ProductDeletedPayload | CartDiscountAddedPayload | CartDiscountRemovedPayload | CartFeeAddedPayload | CartFeeRemovedPayload;
22
+ export type CartEventType = "cart-created" | "customer-assigned" | "product-added" | "product-deleted" | "cart-discount-added" | "cart-discount-removed" | "cart-fee-added" | "cart-fee-removed";
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Cart Topic Types
3
+ * Aggregated types for all cart-related events
4
+ */
5
+ // Re-export all event types
6
+ export * from "./cart-created/types";
7
+ export * from "./customer-assigned/types";
8
+ export * from "./product-added/types";
9
+ export * from "./product-deleted/types";
10
+ export * from "./cart-discount-added/types";
11
+ export * from "./cart-discount-removed/types";
12
+ export * from "./cart-fee-added/types";
13
+ export * from "./cart-fee-removed/types";
@@ -3,3 +3,8 @@
3
3
  * Export all available topics and their types
4
4
  */
5
5
  export * from "./customers";
6
+ export * from "./orders";
7
+ export * from "./refunds";
8
+ export * from "./products";
9
+ export * from "./cart";
10
+ export * from "./payments";
@@ -3,3 +3,8 @@
3
3
  * Export all available topics and their types
4
4
  */
5
5
  export * from "./customers";
6
+ export * from "./orders";
7
+ export * from "./refunds";
8
+ export * from "./products";
9
+ export * from "./cart";
10
+ export * from "./payments";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Orders Topic Definition
3
+ * Defines the orders topic and its available event types
4
+ */
5
+ import type { TopicDefinition } from "../../types";
6
+ export declare const ordersTopic: TopicDefinition;
7
+ export * from "./types";
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Orders Topic Definition
3
+ * Defines the orders topic and its available event types
4
+ */
5
+ export const ordersTopic = {
6
+ id: "orders",
7
+ name: "Orders",
8
+ description: "Topic for order-related events",
9
+ eventTypes: [
10
+ {
11
+ id: "order-created",
12
+ name: "Order Created",
13
+ description: "Fired when a new order is created"
14
+ },
15
+ {
16
+ id: "order-updated",
17
+ name: "Order Updated",
18
+ description: "Fired when an order is updated"
19
+ }
20
+ ]
21
+ };
22
+ // Re-export types
23
+ export * from "./types";
@@ -0,0 +1,12 @@
1
+ import type { CFOrder } from "../../../../CommonTypes";
2
+ import type { TopicEvent } from "../../../types";
3
+ /**
4
+ * Payload for order-created event
5
+ */
6
+ export interface OrderCreatedPayload {
7
+ order: CFOrder;
8
+ }
9
+ /**
10
+ * Typed event for order-created
11
+ */
12
+ export type OrderCreatedEvent = TopicEvent<OrderCreatedPayload>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { CFOrder } from "../../../../CommonTypes";
2
+ import type { TopicEvent } from "../../../types";
3
+ /**
4
+ * Payload for order-updated event
5
+ */
6
+ export interface OrderUpdatedPayload {
7
+ order: CFOrder;
8
+ }
9
+ /**
10
+ * Typed event for order-updated
11
+ */
12
+ export type OrderUpdatedEvent = TopicEvent<OrderUpdatedPayload>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Orders Topic Types
3
+ * Aggregated types for all order-related events
4
+ */
5
+ export * from "./order-created/types";
6
+ export * from "./order-updated/types";
7
+ import type { OrderCreatedPayload } from "./order-created/types";
8
+ import type { OrderUpdatedPayload } from "./order-updated/types";
9
+ export type OrdersEventPayload = OrderCreatedPayload | OrderUpdatedPayload;
10
+ export type OrdersEventType = "order-created" | "order-updated";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Orders Topic Types
3
+ * Aggregated types for all order-related events
4
+ */
5
+ // Re-export all event types
6
+ export * from "./order-created/types";
7
+ export * from "./order-updated/types";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Payments Topic Definition
3
+ * Defines the payments topic and its available event types
4
+ */
5
+ import type { TopicDefinition } from "../../types";
6
+ export declare const paymentsTopic: TopicDefinition;
7
+ export * from "./types";
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Payments Topic Definition
3
+ * Defines the payments topic and its available event types
4
+ */
5
+ export const paymentsTopic = {
6
+ id: "payments",
7
+ name: "Payments",
8
+ description: "Topic for payment-related events",
9
+ eventTypes: [
10
+ {
11
+ id: "payment-done",
12
+ name: "Payment Done",
13
+ description: "Fired when a payment is successfully completed"
14
+ },
15
+ {
16
+ id: "payment-err",
17
+ name: "Payment Error",
18
+ description: "Fired when a payment error occurs"
19
+ }
20
+ ]
21
+ };
22
+ // Re-export types
23
+ export * from "./types";
@@ -0,0 +1,14 @@
1
+ import type { CFPaymentMethod, CFOrder } from "../../../../CommonTypes";
2
+ import type { TopicEvent } from "../../../types";
3
+ /**
4
+ * Payload for payment-done event
5
+ */
6
+ export interface PaymentDonePayload {
7
+ payment: CFPaymentMethod;
8
+ order: CFOrder;
9
+ amount: string;
10
+ }
11
+ /**
12
+ * Typed event for payment-done
13
+ */
14
+ export type PaymentDoneEvent = TopicEvent<PaymentDonePayload>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { TopicEvent } from "../../../types";
2
+ /**
3
+ * Payload for payment-err event
4
+ */
5
+ export interface PaymentErrPayload {
6
+ error: string;
7
+ errorCode?: string;
8
+ paymentType?: string;
9
+ amount?: string;
10
+ }
11
+ /**
12
+ * Typed event for payment-err
13
+ */
14
+ export type PaymentErrEvent = TopicEvent<PaymentErrPayload>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Payments Topic Types
3
+ * Aggregated types for all payment-related events
4
+ */
5
+ export * from "./payment-done/types";
6
+ export * from "./payment-err/types";
7
+ import type { PaymentDonePayload } from "./payment-done/types";
8
+ import type { PaymentErrPayload } from "./payment-err/types";
9
+ export type PaymentsEventPayload = PaymentDonePayload | PaymentErrPayload;
10
+ export type PaymentsEventType = "payment-done" | "payment-err";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Payments Topic Types
3
+ * Aggregated types for all payment-related events
4
+ */
5
+ // Re-export all event types
6
+ export * from "./payment-done/types";
7
+ export * from "./payment-err/types";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Products Topic Definition
3
+ * Defines the products topic and its available event types
4
+ */
5
+ import type { TopicDefinition } from "../../types";
6
+ export declare const productsTopic: TopicDefinition;
7
+ export * from "./types";
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Products Topic Definition
3
+ * Defines the products topic and its available event types
4
+ */
5
+ export const productsTopic = {
6
+ id: "products",
7
+ name: "Products",
8
+ description: "Topic for product-related events",
9
+ eventTypes: [
10
+ {
11
+ id: "product-created",
12
+ name: "Product Created",
13
+ description: "Fired when a new product is synced/created"
14
+ },
15
+ {
16
+ id: "product-updated",
17
+ name: "Product Updated",
18
+ description: "Fired when a product is synced/updated"
19
+ }
20
+ ]
21
+ };
22
+ // Re-export types
23
+ export * from "./types";
@@ -0,0 +1,12 @@
1
+ import type { CFProduct } from "../../../../CommonTypes";
2
+ import type { TopicEvent } from "../../../types";
3
+ /**
4
+ * Payload for product-created event
5
+ */
6
+ export interface ProductCreatedPayload {
7
+ product: CFProduct;
8
+ }
9
+ /**
10
+ * Typed event for product-created
11
+ */
12
+ export type ProductCreatedEvent = TopicEvent<ProductCreatedPayload>;
@@ -0,0 +1,12 @@
1
+ import type { CFProduct } from "../../../../CommonTypes";
2
+ import type { TopicEvent } from "../../../types";
3
+ /**
4
+ * Payload for product-updated event
5
+ */
6
+ export interface ProductUpdatedPayload {
7
+ product: CFProduct;
8
+ }
9
+ /**
10
+ * Typed event for product-updated
11
+ */
12
+ export type ProductUpdatedEvent = TopicEvent<ProductUpdatedPayload>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Products Topic Types
3
+ * Aggregated types for all product-related events
4
+ */
5
+ export * from "./product-created/types";
6
+ export * from "./product-updated/types";
7
+ import type { ProductCreatedPayload } from "./product-created/types";
8
+ import type { ProductUpdatedPayload } from "./product-updated/types";
9
+ export type ProductsEventPayload = ProductCreatedPayload | ProductUpdatedPayload;
10
+ export type ProductsEventType = "product-created" | "product-updated";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Products Topic Types
3
+ * Aggregated types for all product-related events
4
+ */
5
+ // Re-export all event types
6
+ export * from "./product-created/types";
7
+ export * from "./product-updated/types";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Refunds Topic Definition
3
+ * Defines the refunds topic and its available event types
4
+ */
5
+ import type { TopicDefinition } from "../../types";
6
+ export declare const refundsTopic: TopicDefinition;
7
+ export * from "./types";
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Refunds Topic Definition
3
+ * Defines the refunds topic and its available event types
4
+ */
5
+ export const refundsTopic = {
6
+ id: "refunds",
7
+ name: "Refunds",
8
+ description: "Topic for refund-related events",
9
+ eventTypes: [
10
+ {
11
+ id: "refund-created",
12
+ name: "Refund Created",
13
+ description: "Fired when a new refund is created"
14
+ },
15
+ {
16
+ id: "refund-updated",
17
+ name: "Refund Updated",
18
+ description: "Fired when a refund is updated"
19
+ }
20
+ ]
21
+ };
22
+ // Re-export types
23
+ export * from "./types";
@@ -0,0 +1,13 @@
1
+ import type { CFRefundItem } from "../../../../CommonTypes";
2
+ import type { TopicEvent } from "../../../types";
3
+ /**
4
+ * Payload for refund-created event
5
+ */
6
+ export interface RefundCreatedPayload {
7
+ refund: CFRefundItem;
8
+ orderId: string;
9
+ }
10
+ /**
11
+ * Typed event for refund-created
12
+ */
13
+ export type RefundCreatedEvent = TopicEvent<RefundCreatedPayload>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { CFRefundItem } from "../../../../CommonTypes";
2
+ import type { TopicEvent } from "../../../types";
3
+ /**
4
+ * Payload for refund-updated event
5
+ */
6
+ export interface RefundUpdatedPayload {
7
+ refund: CFRefundItem;
8
+ orderId: string;
9
+ }
10
+ /**
11
+ * Typed event for refund-updated
12
+ */
13
+ export type RefundUpdatedEvent = TopicEvent<RefundUpdatedPayload>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Refunds Topic Types
3
+ * Aggregated types for all refund-related events
4
+ */
5
+ export * from "./refund-created/types";
6
+ export * from "./refund-updated/types";
7
+ import type { RefundCreatedPayload } from "./refund-created/types";
8
+ import type { RefundUpdatedPayload } from "./refund-updated/types";
9
+ export type RefundsEventPayload = RefundCreatedPayload | RefundUpdatedPayload;
10
+ export type RefundsEventType = "refund-created" | "refund-updated";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Refunds Topic Types
3
+ * Aggregated types for all refund-related events
4
+ */
5
+ // Re-export all event types
6
+ export * from "./refund-created/types";
7
+ export * from "./refund-updated/types";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@final-commerce/command-frame",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Commands Frame library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",