@final-commerce/command-frame 0.8.0-staging.2 → 0.8.1-online.1
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 +14 -0
- package/dist/actions/attach-checkout-contact/action.d.ts +6 -0
- package/dist/actions/attach-checkout-contact/action.js +8 -0
- package/dist/actions/attach-checkout-contact/mock.d.ts +15 -0
- package/dist/actions/attach-checkout-contact/mock.js +22 -0
- package/dist/actions/attach-checkout-contact/types.d.ts +35 -0
- package/dist/actions/attach-checkout-contact/types.js +16 -0
- package/dist/actions/get-outlets/action.js +2 -2
- package/dist/actions/get-outlets/mock.d.ts +12 -0
- package/dist/actions/get-outlets/mock.js +28 -4
- package/dist/actions/get-outlets/types.d.ts +19 -1
- package/dist/actions/get-refund-plan/mock.d.ts +4 -0
- package/dist/actions/get-refund-plan/mock.js +8 -0
- package/dist/actions/get-refund-plan/mockRows.d.ts +6 -0
- package/dist/actions/get-refund-plan/mockRows.js +114 -0
- package/dist/actions/get-refund-plan/types.d.ts +89 -0
- package/dist/actions/resume-checkout/action.d.ts +6 -0
- package/dist/actions/resume-checkout/action.js +8 -0
- package/dist/actions/resume-checkout/mock.d.ts +16 -0
- package/dist/actions/resume-checkout/mock.js +51 -0
- package/dist/actions/resume-checkout/types.d.ts +59 -0
- package/dist/actions/resume-checkout/types.js +13 -0
- package/dist/actions/set-outlet/action.d.ts +6 -0
- package/dist/actions/set-outlet/action.js +8 -0
- package/dist/actions/set-outlet/mock.d.ts +13 -0
- package/dist/actions/set-outlet/mock.js +24 -0
- package/dist/actions/set-outlet/types.d.ts +31 -0
- package/dist/actions/set-outlet/types.js +21 -0
- package/dist/actions/start-checkout/action.d.ts +6 -0
- package/dist/actions/start-checkout/action.js +8 -0
- package/dist/actions/start-checkout/mock.d.ts +16 -0
- package/dist/actions/start-checkout/mock.js +80 -0
- package/dist/actions/start-checkout/types.d.ts +90 -0
- package/dist/actions/start-checkout/types.js +10 -0
- package/dist/demo/database.js +4 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +9 -0
- package/dist/projects/render/mocks.js +10 -0
- package/dist/projects/render/types.d.ts +16 -1
- package/dist/pubsub/topics/checkout/checkout-started/types.d.ts +26 -0
- package/dist/pubsub/topics/checkout/checkout-started/types.js +1 -0
- package/dist/pubsub/topics/checkout/index.d.ts +7 -0
- package/dist/pubsub/topics/checkout/index.js +28 -0
- package/dist/pubsub/topics/checkout/payment-completed/types.d.ts +31 -0
- package/dist/pubsub/topics/checkout/payment-completed/types.js +1 -0
- package/dist/pubsub/topics/checkout/payment-failed/types.d.ts +20 -0
- package/dist/pubsub/topics/checkout/payment-failed/types.js +1 -0
- package/dist/pubsub/topics/checkout/types.d.ts +12 -0
- package/dist/pubsub/topics/checkout/types.js +8 -0
- package/dist/pubsub/topics/index.d.ts +18 -17
- package/dist/pubsub/topics/index.js +18 -17
- package/dist/pubsub/topics/types.d.ts +8 -0
- package/package.json +2 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkout Topic Types
|
|
3
|
+
* Aggregated types for all online-checkout events
|
|
4
|
+
*/
|
|
5
|
+
export * from "./checkout-started/types";
|
|
6
|
+
export * from "./payment-completed/types";
|
|
7
|
+
export * from "./payment-failed/types";
|
|
8
|
+
import type { CheckoutStartedPayload } from "./checkout-started/types";
|
|
9
|
+
import type { PaymentCompletedPayload } from "./payment-completed/types";
|
|
10
|
+
import type { PaymentFailedPayload } from "./payment-failed/types";
|
|
11
|
+
export type CheckoutEventPayload = CheckoutStartedPayload | PaymentCompletedPayload | PaymentFailedPayload;
|
|
12
|
+
export type CheckoutEventType = "checkout-started" | "payment-completed" | "payment-failed";
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
* Pub/Sub Topics
|
|
3
3
|
* Export all available topics and their types
|
|
4
4
|
*/
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
5
|
+
export * from "./customers";
|
|
6
|
+
export * from "./orders";
|
|
7
|
+
export * from "./bookings";
|
|
8
|
+
export * from "./refunds";
|
|
9
|
+
export * from "./products";
|
|
10
|
+
export * from "./cart";
|
|
11
|
+
export * from "./payments";
|
|
12
|
+
export * from "./checkout";
|
|
13
|
+
export * from "./custom-tables";
|
|
14
|
+
export * from "./print";
|
|
15
|
+
export * from "./outlet";
|
|
16
|
+
export * from "./station";
|
|
17
|
+
export * from "./session";
|
|
18
|
+
export * from "./users";
|
|
19
|
+
export * from "./variants";
|
|
20
|
+
export * from "./transactions";
|
|
21
|
+
export * from "./categories";
|
|
22
|
+
export * from "./attributes";
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
* Pub/Sub Topics
|
|
3
3
|
* Export all available topics and their types
|
|
4
4
|
*/
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
5
|
+
export * from "./customers";
|
|
6
|
+
export * from "./orders";
|
|
7
|
+
export * from "./bookings";
|
|
8
|
+
export * from "./refunds";
|
|
9
|
+
export * from "./products";
|
|
10
|
+
export * from "./cart";
|
|
11
|
+
export * from "./payments";
|
|
12
|
+
export * from "./checkout";
|
|
13
|
+
export * from "./custom-tables";
|
|
14
|
+
export * from "./print";
|
|
15
|
+
export * from "./outlet";
|
|
16
|
+
export * from "./station";
|
|
17
|
+
export * from "./session";
|
|
18
|
+
export * from "./users";
|
|
19
|
+
export * from "./variants";
|
|
20
|
+
export * from "./transactions";
|
|
21
|
+
export * from "./categories";
|
|
22
|
+
export * from "./attributes";
|
|
@@ -4,6 +4,7 @@ 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 { CheckoutEventType, CheckoutEventPayload } from "./checkout/types";
|
|
7
8
|
import { SplitPaymentsEventType, SplitPaymentsEventPayload } from "./split-payments/types";
|
|
8
9
|
import { CustomTablesEventPayload, CustomTablesEventType } from "./custom-tables/types";
|
|
9
10
|
import { PrintEventType, PrintEventPayload } from "./print/types";
|
|
@@ -23,6 +24,13 @@ export interface TopicEventPayloadMap {
|
|
|
23
24
|
products: Record<ProductsEventType, ProductsEventPayload>;
|
|
24
25
|
cart: Record<CartEventType, CartEventPayload>;
|
|
25
26
|
payments: Record<PaymentsEventType, PaymentsEventPayload>;
|
|
27
|
+
/**
|
|
28
|
+
* ONLINE checkout only (a published website), where the POS `payments`
|
|
29
|
+
* topic never fires: `payments` reports a till tender settling in front of
|
|
30
|
+
* a cashier, while a web shopper's outcome arrives asynchronously and can
|
|
31
|
+
* only ever be an authorisation until the provider's webhook lands.
|
|
32
|
+
*/
|
|
33
|
+
checkout: Record<CheckoutEventType, CheckoutEventPayload>;
|
|
26
34
|
"split-payments": Record<SplitPaymentsEventType, SplitPaymentsEventPayload>;
|
|
27
35
|
customTables: Record<CustomTablesEventType, CustomTablesEventPayload>;
|
|
28
36
|
print: Record<PrintEventType, PrintEventPayload>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@final-commerce/command-frame",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1-online.1",
|
|
4
4
|
"description": "Commands Frame library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"ignoreBranchesMissingTickets": true
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@final-commerce/common": "2.4.
|
|
60
|
+
"@final-commerce/common": "2.4.1-online.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@commitlint/cli": "^19.0.0",
|