@final-commerce/command-frame 0.1.23 → 0.1.25
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.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -1
- package/dist/pubsub/topics/index.d.ts +1 -0
- package/dist/pubsub/topics/index.js +1 -0
- package/dist/pubsub/topics/print/index.d.ts +7 -0
- package/dist/pubsub/topics/print/index.js +28 -0
- package/dist/pubsub/topics/print/print-completed/types.d.ts +13 -0
- package/dist/pubsub/topics/print/print-completed/types.js +1 -0
- package/dist/pubsub/topics/print/print-error/types.d.ts +14 -0
- package/dist/pubsub/topics/print/print-error/types.js +1 -0
- package/dist/pubsub/topics/print/print-started/types.d.ts +23 -0
- package/dist/pubsub/topics/print/print-started/types.js +1 -0
- package/dist/pubsub/topics/print/types.d.ts +12 -0
- package/dist/pubsub/topics/print/types.js +8 -0
- package/dist/pubsub/topics/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -124,6 +124,7 @@ export { productsTopic } from "./pubsub/topics/products";
|
|
|
124
124
|
export { cartTopic } from "./pubsub/topics/cart";
|
|
125
125
|
export { paymentsTopic } from "./pubsub/topics/payments";
|
|
126
126
|
export { customTablesTopic } from "./pubsub/topics/custom-tables";
|
|
127
|
+
export { printTopic } from "./pubsub/topics/print";
|
|
127
128
|
export type { CustomerCreatedPayload, CustomerUpdatedPayload, CustomerNoteAddedPayload, CustomerNoteDeletedPayload, CustomerAssignedPayload, CustomerUnassignedPayload, CustomerCreatedEvent, CustomerUpdatedEvent, CustomerNoteAddedEvent, CustomerNoteDeletedEvent, CustomerAssignedEvent, CustomerUnassignedEvent, CustomersEventType, CustomersEventPayload } from "./pubsub/topics/customers/types";
|
|
128
129
|
export type { OrderCreatedPayload, OrderUpdatedPayload, OrderCreatedEvent, OrderUpdatedEvent, OrdersEventType, OrdersEventPayload } from "./pubsub/topics/orders/types";
|
|
129
130
|
export type { RefundCreatedPayload, RefundUpdatedPayload, RefundCreatedEvent, RefundUpdatedEvent, RefundsEventType, RefundsEventPayload } from "./pubsub/topics/refunds/types";
|
|
@@ -131,6 +132,7 @@ export type { ProductCreatedPayload, ProductUpdatedPayload, ProductCreatedEvent,
|
|
|
131
132
|
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";
|
|
132
133
|
export type { PaymentDonePayload, PaymentErrPayload, PaymentDoneEvent, PaymentErrEvent, PaymentsEventType, PaymentsEventPayload } from "./pubsub/topics/payments/types";
|
|
133
134
|
export type { RowCreatedPayload, RowUpdatedPayload, RowDeletedPayload, RowCreatedEvent, RowUpdatedEvent, RowDeletedEvent, CustomTablesEventType, CustomTablesEventPayload } from "./pubsub/topics/custom-tables/types";
|
|
135
|
+
export type { PrintStartedPayload, PrintCompletedPayload, PrintErrorPayload, PrintStartedEvent, PrintCompletedEvent, PrintErrorEvent, PrintEventType, PrintEventPayload } from "./pubsub/topics/print/types";
|
|
134
136
|
export type { GetCustomTables, GetCustomTablesResponse } from "./actions/get-custom-tables/types";
|
|
135
137
|
export type { GetCustomTableFields, GetCustomTableFieldsParams, GetCustomTableFieldsResponse } from "./actions/get-custom-table-fields/types";
|
|
136
138
|
export type { GetCustomTableData, GetCustomTableDataParams, GetCustomTableDataResponse } from "./actions/get-custom-table-data/types";
|
package/dist/index.js
CHANGED
|
@@ -132,7 +132,7 @@ export const command = {
|
|
|
132
132
|
// Custom Extensions Actions
|
|
133
133
|
getCustomExtensions,
|
|
134
134
|
getCurrentCompanyCustomExtensions,
|
|
135
|
-
getCustomExtensionCustomTables
|
|
135
|
+
getCustomExtensionCustomTables
|
|
136
136
|
};
|
|
137
137
|
// Export Common Types
|
|
138
138
|
export * from "./CommonTypes";
|
|
@@ -154,3 +154,4 @@ export { productsTopic } from "./pubsub/topics/products";
|
|
|
154
154
|
export { cartTopic } from "./pubsub/topics/cart";
|
|
155
155
|
export { paymentsTopic } from "./pubsub/topics/payments";
|
|
156
156
|
export { customTablesTopic } from "./pubsub/topics/custom-tables";
|
|
157
|
+
export { printTopic } from "./pubsub/topics/print";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Print Topic Definition
|
|
3
|
+
* Defines the print topic and its available event types
|
|
4
|
+
*/
|
|
5
|
+
export const printTopic = {
|
|
6
|
+
id: "print",
|
|
7
|
+
name: "Print",
|
|
8
|
+
description: "Topic for print-related events",
|
|
9
|
+
eventTypes: [
|
|
10
|
+
{
|
|
11
|
+
id: "print-started",
|
|
12
|
+
name: "Print Started",
|
|
13
|
+
description: "Published when a print action is initiated"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "print-completed",
|
|
17
|
+
name: "Print Completed",
|
|
18
|
+
description: "Published when a print action completes successfully"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "print-error",
|
|
22
|
+
name: "Print Error",
|
|
23
|
+
description: "Published when a print action encounters an error"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
};
|
|
27
|
+
// Re-export types
|
|
28
|
+
export * from "./types";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TopicEvent } from "../../../types";
|
|
2
|
+
/**
|
|
3
|
+
* Payload for print-completed event
|
|
4
|
+
*/
|
|
5
|
+
export interface PrintCompletedPayload {
|
|
6
|
+
type: "image" | "html" | "selector" | "receipt";
|
|
7
|
+
orderId?: string;
|
|
8
|
+
globalBlockId?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Typed event for print-completed
|
|
12
|
+
*/
|
|
13
|
+
export type PrintCompletedEvent = TopicEvent<PrintCompletedPayload>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TopicEvent } from "../../../types";
|
|
2
|
+
/**
|
|
3
|
+
* Payload for print-error event
|
|
4
|
+
*/
|
|
5
|
+
export interface PrintErrorPayload {
|
|
6
|
+
type: "image" | "html" | "selector" | "receipt";
|
|
7
|
+
error: string;
|
|
8
|
+
orderId?: string;
|
|
9
|
+
globalBlockId?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Typed event for print-error
|
|
13
|
+
*/
|
|
14
|
+
export type PrintErrorEvent = TopicEvent<PrintErrorPayload>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TopicEvent } from "../../../types";
|
|
2
|
+
/**
|
|
3
|
+
* Payload for print-started event
|
|
4
|
+
*/
|
|
5
|
+
export interface PrintStartedPayload {
|
|
6
|
+
type: "image" | "html" | "selector" | "receipt";
|
|
7
|
+
options?: {
|
|
8
|
+
margins?: {
|
|
9
|
+
top?: number;
|
|
10
|
+
right?: number;
|
|
11
|
+
bottom?: number;
|
|
12
|
+
left?: number;
|
|
13
|
+
};
|
|
14
|
+
paperSize?: string;
|
|
15
|
+
width?: string;
|
|
16
|
+
};
|
|
17
|
+
orderId?: string;
|
|
18
|
+
globalBlockId?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Typed event for print-started
|
|
22
|
+
*/
|
|
23
|
+
export type PrintStartedEvent = TopicEvent<PrintStartedPayload>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Print Topic Types
|
|
3
|
+
* Aggregated types for all print-related events
|
|
4
|
+
*/
|
|
5
|
+
export * from "./print-started/types";
|
|
6
|
+
export * from "./print-completed/types";
|
|
7
|
+
export * from "./print-error/types";
|
|
8
|
+
import type { PrintStartedPayload } from "./print-started/types";
|
|
9
|
+
import type { PrintCompletedPayload } from "./print-completed/types";
|
|
10
|
+
import type { PrintErrorPayload } from "./print-error/types";
|
|
11
|
+
export type PrintEventPayload = PrintStartedPayload | PrintCompletedPayload | PrintErrorPayload;
|
|
12
|
+
export type PrintEventType = "print-started" | "print-completed" | "print-error";
|
|
@@ -5,6 +5,7 @@ import { ProductsEventType, ProductsEventPayload } from "./products/types";
|
|
|
5
5
|
import { CartEventType, CartEventPayload } from "./cart/types";
|
|
6
6
|
import { PaymentsEventType, PaymentsEventPayload } from "./payments/types";
|
|
7
7
|
import { CustomTablesEventPayload, CustomTablesEventType } from "./custom-tables/types";
|
|
8
|
+
import { PrintEventType, PrintEventPayload } from "./print/types";
|
|
8
9
|
export interface TopicEventPayloadMap {
|
|
9
10
|
customers: Record<CustomersEventType, CustomersEventPayload>;
|
|
10
11
|
orders: Record<OrdersEventType, OrdersEventPayload>;
|
|
@@ -13,4 +14,5 @@ export interface TopicEventPayloadMap {
|
|
|
13
14
|
cart: Record<CartEventType, CartEventPayload>;
|
|
14
15
|
payments: Record<PaymentsEventType, PaymentsEventPayload>;
|
|
15
16
|
customTables: Record<CustomTablesEventType, CustomTablesEventPayload>;
|
|
17
|
+
print: Record<PrintEventType, PrintEventPayload>;
|
|
16
18
|
}
|