@final-commerce/command-frame 0.1.63 → 0.1.73
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/CommonTypes.d.ts +147 -12
- package/dist/actions/add-customer-note/mock.js +27 -18
- package/dist/actions/add-customer-note/types.d.ts +3 -2
- package/dist/actions/add-product/mock.js +11 -5
- package/dist/actions/edit-product/mock.js +4 -2
- package/dist/actions/extension-payment/types.d.ts +4 -0
- package/dist/actions/get-context/mock.js +12 -6
- package/dist/actions/get-products/mock.js +6 -1
- package/dist/actions/get-products/types.d.ts +2 -0
- package/dist/actions/get-smart-grid-layout/action.d.ts +2 -0
- package/dist/actions/get-smart-grid-layout/action.js +4 -0
- package/dist/actions/get-smart-grid-layout/mock.d.ts +2 -0
- package/dist/actions/get-smart-grid-layout/mock.js +9 -0
- package/dist/actions/get-smart-grid-layout/types.d.ts +10 -0
- package/dist/actions/get-smart-grid-layout/types.js +1 -0
- package/dist/actions/integration-payment/action.d.ts +5 -0
- package/dist/actions/integration-payment/action.js +7 -0
- package/dist/actions/integration-payment/mock.d.ts +2 -0
- package/dist/actions/integration-payment/mock.js +4 -0
- package/dist/actions/integration-payment/types.d.ts +56 -0
- package/dist/actions/integration-payment/types.js +1 -0
- package/dist/actions/print/mock.js +3 -6
- package/dist/actions/print/types.d.ts +1 -7
- package/dist/actions/redeem-payment/types.d.ts +9 -5
- package/dist/actions/remove-customer-note/mock.js +16 -7
- package/dist/actions/save-smart-grid-layout/action.d.ts +2 -0
- package/dist/actions/save-smart-grid-layout/action.js +4 -0
- package/dist/actions/save-smart-grid-layout/mock.d.ts +2 -0
- package/dist/actions/save-smart-grid-layout/mock.js +10 -0
- package/dist/actions/save-smart-grid-layout/types.d.ts +10 -0
- package/dist/actions/save-smart-grid-layout/types.js +1 -0
- package/dist/demo/database.d.ts +2 -1
- package/dist/demo/database.js +13 -24
- package/dist/index.d.ts +17 -1
- package/dist/index.js +14 -1
- package/dist/projects/render/mocks.js +7 -1
- package/dist/projects/render/types.d.ts +4 -1
- package/dist/pubsub/topics/attributes/attribute-created/types.d.ts +6 -0
- package/dist/pubsub/topics/attributes/attribute-created/types.js +1 -0
- package/dist/pubsub/topics/attributes/attribute-updated/types.d.ts +6 -0
- package/dist/pubsub/topics/attributes/attribute-updated/types.js +1 -0
- package/dist/pubsub/topics/attributes/index.d.ts +3 -0
- package/dist/pubsub/topics/attributes/index.js +18 -0
- package/dist/pubsub/topics/attributes/types.d.ts +6 -0
- package/dist/pubsub/topics/attributes/types.js +2 -0
- package/dist/pubsub/topics/categories/category-created/types.d.ts +6 -0
- package/dist/pubsub/topics/categories/category-created/types.js +1 -0
- package/dist/pubsub/topics/categories/category-updated/types.d.ts +6 -0
- package/dist/pubsub/topics/categories/category-updated/types.js +1 -0
- package/dist/pubsub/topics/categories/index.d.ts +3 -0
- package/dist/pubsub/topics/categories/index.js +18 -0
- package/dist/pubsub/topics/categories/types.d.ts +6 -0
- package/dist/pubsub/topics/categories/types.js +2 -0
- package/dist/pubsub/topics/index.d.ts +4 -0
- package/dist/pubsub/topics/index.js +4 -0
- package/dist/pubsub/topics/print/print-completed/types.d.ts +1 -1
- package/dist/pubsub/topics/print/print-error/types.d.ts +1 -1
- package/dist/pubsub/topics/print/print-started/types.d.ts +1 -1
- package/dist/pubsub/topics/split-payments/index.d.ts +12 -0
- package/dist/pubsub/topics/split-payments/index.js +22 -0
- package/dist/pubsub/topics/split-payments/split-payment-updated/types.d.ts +16 -0
- package/dist/pubsub/topics/split-payments/split-payment-updated/types.js +1 -0
- package/dist/pubsub/topics/split-payments/types.d.ts +10 -0
- package/dist/pubsub/topics/split-payments/types.js +5 -0
- package/dist/pubsub/topics/transactions/index.d.ts +3 -0
- package/dist/pubsub/topics/transactions/index.js +18 -0
- package/dist/pubsub/topics/transactions/transaction-created/types.d.ts +6 -0
- package/dist/pubsub/topics/transactions/transaction-created/types.js +1 -0
- package/dist/pubsub/topics/transactions/transaction-updated/types.d.ts +6 -0
- package/dist/pubsub/topics/transactions/transaction-updated/types.js +1 -0
- package/dist/pubsub/topics/transactions/types.d.ts +6 -0
- package/dist/pubsub/topics/transactions/types.js +2 -0
- package/dist/pubsub/topics/types.d.ts +10 -0
- package/dist/pubsub/topics/users/index.js +10 -0
- package/dist/pubsub/topics/users/types.d.ts +6 -2
- package/dist/pubsub/topics/users/types.js +2 -0
- package/dist/pubsub/topics/users/user-created/types.d.ts +6 -0
- package/dist/pubsub/topics/users/user-created/types.js +1 -0
- package/dist/pubsub/topics/users/user-updated/types.d.ts +6 -0
- package/dist/pubsub/topics/users/user-updated/types.js +1 -0
- package/dist/pubsub/topics/variants/index.d.ts +3 -0
- package/dist/pubsub/topics/variants/index.js +18 -0
- package/dist/pubsub/topics/variants/types.d.ts +6 -0
- package/dist/pubsub/topics/variants/types.js +2 -0
- package/dist/pubsub/topics/variants/variant-created/types.d.ts +6 -0
- package/dist/pubsub/topics/variants/variant-created/types.js +1 -0
- package/dist/pubsub/topics/variants/variant-updated/types.d.ts +6 -0
- package/dist/pubsub/topics/variants/variant-updated/types.js +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Split Payments Topic Types
|
|
3
|
+
* Aggregated types for all split-payment-related events.
|
|
4
|
+
*/
|
|
5
|
+
export * from "./split-payment-updated/types";
|
|
6
|
+
import type { SplitPaymentUpdatedPayload } from "./split-payment-updated/types";
|
|
7
|
+
/** Union type for all split-payments event payloads. */
|
|
8
|
+
export type SplitPaymentsEventPayload = SplitPaymentUpdatedPayload;
|
|
9
|
+
/** Literal types for split-payments event IDs. */
|
|
10
|
+
export type SplitPaymentsEventType = "split-payment-updated";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const transactionsTopic = {
|
|
2
|
+
id: "transactions",
|
|
3
|
+
name: "Transactions",
|
|
4
|
+
description: "Topic for payment transaction events",
|
|
5
|
+
eventTypes: [
|
|
6
|
+
{
|
|
7
|
+
id: "transaction-created",
|
|
8
|
+
name: "Transaction Created",
|
|
9
|
+
description: "Published when a new transaction is created"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: "transaction-updated",
|
|
13
|
+
name: "Transaction Updated",
|
|
14
|
+
description: "Published when a transaction is updated"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
};
|
|
18
|
+
export * from "./types";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CFTransaction } from "../../../../CommonTypes";
|
|
2
|
+
import type { TopicEvent } from "../../../types";
|
|
3
|
+
export interface TransactionCreatedPayload {
|
|
4
|
+
transaction: CFTransaction;
|
|
5
|
+
}
|
|
6
|
+
export type TransactionCreatedEvent = TopicEvent<TransactionCreatedPayload>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CFTransaction } from "../../../../CommonTypes";
|
|
2
|
+
import type { TopicEvent } from "../../../types";
|
|
3
|
+
export interface TransactionUpdatedPayload {
|
|
4
|
+
transaction: CFTransaction;
|
|
5
|
+
}
|
|
6
|
+
export type TransactionUpdatedEvent = TopicEvent<TransactionUpdatedPayload>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./transaction-created/types";
|
|
2
|
+
export * from "./transaction-updated/types";
|
|
3
|
+
import type { TransactionCreatedPayload } from "./transaction-created/types";
|
|
4
|
+
import type { TransactionUpdatedPayload } from "./transaction-updated/types";
|
|
5
|
+
export type TransactionsEventPayload = TransactionCreatedPayload | TransactionUpdatedPayload;
|
|
6
|
+
export type TransactionsEventType = "transaction-created" | "transaction-updated";
|
|
@@ -4,12 +4,17 @@ import { RefundsEventType, RefundsEventPayload } from "./refunds/types";
|
|
|
4
4
|
import { ProductsEventType, ProductsEventPayload } from "./products/types";
|
|
5
5
|
import { CartEventType, CartEventPayload } from "./cart/types";
|
|
6
6
|
import { PaymentsEventType, PaymentsEventPayload } from "./payments/types";
|
|
7
|
+
import { SplitPaymentsEventType, SplitPaymentsEventPayload } from "./split-payments/types";
|
|
7
8
|
import { CustomTablesEventPayload, CustomTablesEventType } from "./custom-tables/types";
|
|
8
9
|
import { PrintEventType, PrintEventPayload } from "./print/types";
|
|
9
10
|
import { OutletEventType, OutletEventPayload } from "./outlet/types";
|
|
10
11
|
import { StationEventType, StationEventPayload } from "./station/types";
|
|
11
12
|
import { SessionEventType, SessionEventPayload } from "./session/types";
|
|
12
13
|
import { UsersEventType, UsersEventPayload } from "./users/types";
|
|
14
|
+
import { VariantsEventType, VariantsEventPayload } from "./variants/types";
|
|
15
|
+
import { TransactionsEventType, TransactionsEventPayload } from "./transactions/types";
|
|
16
|
+
import { CategoriesEventType, CategoriesEventPayload } from "./categories/types";
|
|
17
|
+
import { AttributesEventType, AttributesEventPayload } from "./attributes/types";
|
|
13
18
|
export interface TopicEventPayloadMap {
|
|
14
19
|
customers: Record<CustomersEventType, CustomersEventPayload>;
|
|
15
20
|
orders: Record<OrdersEventType, OrdersEventPayload>;
|
|
@@ -17,10 +22,15 @@ export interface TopicEventPayloadMap {
|
|
|
17
22
|
products: Record<ProductsEventType, ProductsEventPayload>;
|
|
18
23
|
cart: Record<CartEventType, CartEventPayload>;
|
|
19
24
|
payments: Record<PaymentsEventType, PaymentsEventPayload>;
|
|
25
|
+
"split-payments": Record<SplitPaymentsEventType, SplitPaymentsEventPayload>;
|
|
20
26
|
customTables: Record<CustomTablesEventType, CustomTablesEventPayload>;
|
|
21
27
|
print: Record<PrintEventType, PrintEventPayload>;
|
|
22
28
|
outlet: Record<OutletEventType, OutletEventPayload>;
|
|
23
29
|
station: Record<StationEventType, StationEventPayload>;
|
|
24
30
|
session: Record<SessionEventType, SessionEventPayload>;
|
|
25
31
|
users: Record<UsersEventType, UsersEventPayload>;
|
|
32
|
+
variants: Record<VariantsEventType, VariantsEventPayload>;
|
|
33
|
+
transactions: Record<TransactionsEventType, TransactionsEventPayload>;
|
|
34
|
+
categories: Record<CategoriesEventType, CategoriesEventPayload>;
|
|
35
|
+
attributes: Record<AttributesEventType, AttributesEventPayload>;
|
|
26
36
|
}
|
|
@@ -12,6 +12,16 @@ export const usersTopic = {
|
|
|
12
12
|
id: "get-active-user",
|
|
13
13
|
name: "Get Active User",
|
|
14
14
|
description: "Published when the active user is published to listeners"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: "user-created",
|
|
18
|
+
name: "User Created",
|
|
19
|
+
description: "Published when a new user record is synced/created in the database"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "user-updated",
|
|
23
|
+
name: "User Updated",
|
|
24
|
+
description: "Published when any user record is synced/updated in the database"
|
|
15
25
|
}
|
|
16
26
|
]
|
|
17
27
|
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export * from "./set-active-user/types";
|
|
2
2
|
export * from "./get-active-user/types";
|
|
3
|
+
export * from "./user-created/types";
|
|
4
|
+
export * from "./user-updated/types";
|
|
3
5
|
import type { UserActiveSetPayload } from "./set-active-user/types";
|
|
4
6
|
import type { UserActiveGetPayload } from "./get-active-user/types";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
import type { UserCreatedPayload } from "./user-created/types";
|
|
8
|
+
import type { UserUpdatedPayload } from "./user-updated/types";
|
|
9
|
+
export type UsersEventPayload = UserActiveSetPayload | UserActiveGetPayload | UserCreatedPayload | UserUpdatedPayload;
|
|
10
|
+
export type UsersEventType = "set-active-user" | "get-active-user" | "user-created" | "user-updated";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const variantsTopic = {
|
|
2
|
+
id: "variants",
|
|
3
|
+
name: "Variants",
|
|
4
|
+
description: "Topic for product variant changes synced from the database",
|
|
5
|
+
eventTypes: [
|
|
6
|
+
{
|
|
7
|
+
id: "variant-created",
|
|
8
|
+
name: "Variant Created",
|
|
9
|
+
description: "Published when a new product variant is synced/created"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: "variant-updated",
|
|
13
|
+
name: "Variant Updated",
|
|
14
|
+
description: "Published when a product variant is synced/updated"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
};
|
|
18
|
+
export * from "./types";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./variant-created/types";
|
|
2
|
+
export * from "./variant-updated/types";
|
|
3
|
+
import type { VariantCreatedPayload } from "./variant-created/types";
|
|
4
|
+
import type { VariantUpdatedPayload } from "./variant-updated/types";
|
|
5
|
+
export type VariantsEventPayload = VariantCreatedPayload | VariantUpdatedPayload;
|
|
6
|
+
export type VariantsEventType = "variant-created" | "variant-updated";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@final-commerce/command-frame",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.73",
|
|
4
4
|
"description": "Commands Frame library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"format": "prettier --write .",
|
|
23
23
|
"format:check": "prettier --check .",
|
|
24
24
|
"publish:npm": "npm publish --registry=https://registry.npmjs.org",
|
|
25
|
-
"publish:
|
|
26
|
-
"publish:all": "npm run publish:npm && npm run publish:
|
|
25
|
+
"publish:ar": "npm publish --registry=https://us-npm.pkg.dev/final-preproduction/npm/",
|
|
26
|
+
"publish:all": "npm run publish:npm && npm run publish:ar"
|
|
27
27
|
},
|
|
28
28
|
"keywords": [
|
|
29
29
|
"final commerce",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public",
|
|
39
|
-
"registry": "https://
|
|
39
|
+
"registry": "https://us-npm.pkg.dev/final-preproduction/npm/"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|