@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.
Files changed (53) hide show
  1. package/dist/CommonTypes.d.ts +14 -0
  2. package/dist/actions/attach-checkout-contact/action.d.ts +6 -0
  3. package/dist/actions/attach-checkout-contact/action.js +8 -0
  4. package/dist/actions/attach-checkout-contact/mock.d.ts +15 -0
  5. package/dist/actions/attach-checkout-contact/mock.js +22 -0
  6. package/dist/actions/attach-checkout-contact/types.d.ts +35 -0
  7. package/dist/actions/attach-checkout-contact/types.js +16 -0
  8. package/dist/actions/get-outlets/action.js +2 -2
  9. package/dist/actions/get-outlets/mock.d.ts +12 -0
  10. package/dist/actions/get-outlets/mock.js +28 -4
  11. package/dist/actions/get-outlets/types.d.ts +19 -1
  12. package/dist/actions/get-refund-plan/mock.d.ts +4 -0
  13. package/dist/actions/get-refund-plan/mock.js +8 -0
  14. package/dist/actions/get-refund-plan/mockRows.d.ts +6 -0
  15. package/dist/actions/get-refund-plan/mockRows.js +114 -0
  16. package/dist/actions/get-refund-plan/types.d.ts +89 -0
  17. package/dist/actions/resume-checkout/action.d.ts +6 -0
  18. package/dist/actions/resume-checkout/action.js +8 -0
  19. package/dist/actions/resume-checkout/mock.d.ts +16 -0
  20. package/dist/actions/resume-checkout/mock.js +51 -0
  21. package/dist/actions/resume-checkout/types.d.ts +59 -0
  22. package/dist/actions/resume-checkout/types.js +13 -0
  23. package/dist/actions/set-outlet/action.d.ts +6 -0
  24. package/dist/actions/set-outlet/action.js +8 -0
  25. package/dist/actions/set-outlet/mock.d.ts +13 -0
  26. package/dist/actions/set-outlet/mock.js +24 -0
  27. package/dist/actions/set-outlet/types.d.ts +31 -0
  28. package/dist/actions/set-outlet/types.js +21 -0
  29. package/dist/actions/start-checkout/action.d.ts +6 -0
  30. package/dist/actions/start-checkout/action.js +8 -0
  31. package/dist/actions/start-checkout/mock.d.ts +16 -0
  32. package/dist/actions/start-checkout/mock.js +80 -0
  33. package/dist/actions/start-checkout/types.d.ts +90 -0
  34. package/dist/actions/start-checkout/types.js +10 -0
  35. package/dist/demo/database.js +4 -2
  36. package/dist/index.d.ts +12 -2
  37. package/dist/index.js +9 -0
  38. package/dist/projects/render/mocks.js +10 -0
  39. package/dist/projects/render/types.d.ts +16 -1
  40. package/dist/pubsub/topics/checkout/checkout-started/types.d.ts +26 -0
  41. package/dist/pubsub/topics/checkout/checkout-started/types.js +1 -0
  42. package/dist/pubsub/topics/checkout/index.d.ts +7 -0
  43. package/dist/pubsub/topics/checkout/index.js +28 -0
  44. package/dist/pubsub/topics/checkout/payment-completed/types.d.ts +31 -0
  45. package/dist/pubsub/topics/checkout/payment-completed/types.js +1 -0
  46. package/dist/pubsub/topics/checkout/payment-failed/types.d.ts +20 -0
  47. package/dist/pubsub/topics/checkout/payment-failed/types.js +1 -0
  48. package/dist/pubsub/topics/checkout/types.d.ts +12 -0
  49. package/dist/pubsub/topics/checkout/types.js +8 -0
  50. package/dist/pubsub/topics/index.d.ts +18 -17
  51. package/dist/pubsub/topics/index.js +18 -17
  52. package/dist/pubsub/topics/types.d.ts +8 -0
  53. 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";
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Checkout Topic Types
3
+ * Aggregated types for all online-checkout events
4
+ */
5
+ // Re-export all event types
6
+ export * from "./checkout-started/types";
7
+ export * from "./payment-completed/types";
8
+ export * from "./payment-failed/types";
@@ -2,20 +2,21 @@
2
2
  * Pub/Sub Topics
3
3
  * Export all available topics and their types
4
4
  */
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 './custom-tables';
13
- export * from './print';
14
- export * from './outlet';
15
- export * from './station';
16
- export * from './session';
17
- export * from './users';
18
- export * from './variants';
19
- export * from './transactions';
20
- export * from './categories';
21
- export * from './attributes';
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 './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 './custom-tables';
13
- export * from './print';
14
- export * from './outlet';
15
- export * from './station';
16
- export * from './session';
17
- export * from './users';
18
- export * from './variants';
19
- export * from './transactions';
20
- export * from './categories';
21
- export * from './attributes';
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.0-staging.2",
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.0-staging.2"
60
+ "@final-commerce/common": "2.4.1-online.1"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@commitlint/cli": "^19.0.0",