@final-commerce/command-frame 0.12.0 → 0.13.1-preprod.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 (91) hide show
  1. package/dist/CommonTypes.d.ts +18 -1
  2. package/dist/actions/assign-order-user/mock.js +9 -9
  3. package/dist/actions/assign-order-user/types.d.ts +14 -3
  4. package/dist/actions/attach-checkout-contact/action.d.ts +6 -0
  5. package/dist/actions/attach-checkout-contact/action.js +8 -0
  6. package/dist/actions/attach-checkout-contact/mock.d.ts +15 -0
  7. package/dist/actions/attach-checkout-contact/mock.js +22 -0
  8. package/dist/actions/attach-checkout-contact/types.d.ts +35 -0
  9. package/dist/actions/attach-checkout-contact/types.js +16 -0
  10. package/dist/actions/get-address-options/action.d.ts +6 -0
  11. package/dist/actions/get-address-options/action.js +8 -0
  12. package/dist/actions/get-address-options/mock.d.ts +3 -0
  13. package/dist/actions/get-address-options/mock.js +15 -0
  14. package/dist/actions/get-address-options/types.d.ts +25 -0
  15. package/dist/actions/get-address-options/types.js +8 -0
  16. package/dist/actions/get-checkout-status/action.d.ts +6 -0
  17. package/dist/actions/get-checkout-status/action.js +8 -0
  18. package/dist/actions/get-checkout-status/mock.d.ts +3 -0
  19. package/dist/actions/get-checkout-status/mock.js +11 -0
  20. package/dist/actions/get-checkout-status/types.d.ts +27 -0
  21. package/dist/actions/get-checkout-status/types.js +12 -0
  22. package/dist/actions/get-orders/mock.js +9 -6
  23. package/dist/actions/get-orders/types.d.ts +8 -2
  24. package/dist/actions/get-outlets/action.js +2 -2
  25. package/dist/actions/get-outlets/mock.d.ts +12 -0
  26. package/dist/actions/get-outlets/mock.js +28 -4
  27. package/dist/actions/get-outlets/types.d.ts +19 -1
  28. package/dist/actions/get-product-modifier-selections/mock.js +7 -0
  29. package/dist/actions/get-product-modifier-selections/types.d.ts +4 -0
  30. package/dist/actions/get-products/types.d.ts +8 -8
  31. package/dist/actions/get-refund-plan/mockRows.js +1 -1
  32. package/dist/actions/get-refund-plan/types.d.ts +9 -6
  33. package/dist/actions/get-remaining-refundable-quantities/mock.js +1 -0
  34. package/dist/actions/get-remaining-refundable-quantities/types.d.ts +5 -0
  35. package/dist/actions/get-shipping-options/action.d.ts +6 -0
  36. package/dist/actions/get-shipping-options/action.js +8 -0
  37. package/dist/actions/get-shipping-options/mock.d.ts +3 -0
  38. package/dist/actions/get-shipping-options/mock.js +15 -0
  39. package/dist/actions/get-shipping-options/types.d.ts +43 -0
  40. package/dist/actions/get-shipping-options/types.js +1 -0
  41. package/dist/actions/process-partial-refund/types.d.ts +1 -1
  42. package/dist/actions/resume-checkout/action.d.ts +6 -0
  43. package/dist/actions/resume-checkout/action.js +8 -0
  44. package/dist/actions/resume-checkout/mock.d.ts +16 -0
  45. package/dist/actions/resume-checkout/mock.js +51 -0
  46. package/dist/actions/resume-checkout/types.d.ts +59 -0
  47. package/dist/actions/resume-checkout/types.js +13 -0
  48. package/dist/actions/select-shipping-option/action.d.ts +6 -0
  49. package/dist/actions/select-shipping-option/action.js +8 -0
  50. package/dist/actions/select-shipping-option/mock.d.ts +3 -0
  51. package/dist/actions/select-shipping-option/mock.js +31 -0
  52. package/dist/actions/select-shipping-option/types.d.ts +15 -0
  53. package/dist/actions/select-shipping-option/types.js +1 -0
  54. package/dist/actions/set-order-address/action.d.ts +6 -0
  55. package/dist/actions/set-order-address/action.js +8 -0
  56. package/dist/actions/set-order-address/mock.d.ts +7 -0
  57. package/dist/actions/set-order-address/mock.js +29 -0
  58. package/dist/actions/set-order-address/types.d.ts +19 -0
  59. package/dist/actions/set-order-address/types.js +1 -0
  60. package/dist/actions/set-outlet/action.d.ts +6 -0
  61. package/dist/actions/set-outlet/action.js +8 -0
  62. package/dist/actions/set-outlet/mock.d.ts +13 -0
  63. package/dist/actions/set-outlet/mock.js +24 -0
  64. package/dist/actions/set-outlet/types.d.ts +31 -0
  65. package/dist/actions/set-outlet/types.js +21 -0
  66. package/dist/actions/start-checkout/action.d.ts +6 -0
  67. package/dist/actions/start-checkout/action.js +8 -0
  68. package/dist/actions/start-checkout/mock.d.ts +16 -0
  69. package/dist/actions/start-checkout/mock.js +80 -0
  70. package/dist/actions/start-checkout/types.d.ts +90 -0
  71. package/dist/actions/start-checkout/types.js +10 -0
  72. package/dist/demo/shipping.d.ts +8 -0
  73. package/dist/demo/shipping.js +69 -0
  74. package/dist/index.d.ts +21 -1
  75. package/dist/index.js +19 -0
  76. package/dist/projects/render/mocks.js +20 -0
  77. package/dist/projects/render/types.d.ts +23 -1
  78. package/dist/pubsub/topics/checkout/checkout-started/types.d.ts +26 -0
  79. package/dist/pubsub/topics/checkout/checkout-started/types.js +1 -0
  80. package/dist/pubsub/topics/checkout/index.d.ts +7 -0
  81. package/dist/pubsub/topics/checkout/index.js +28 -0
  82. package/dist/pubsub/topics/checkout/payment-completed/types.d.ts +31 -0
  83. package/dist/pubsub/topics/checkout/payment-completed/types.js +1 -0
  84. package/dist/pubsub/topics/checkout/payment-failed/types.d.ts +23 -0
  85. package/dist/pubsub/topics/checkout/payment-failed/types.js +1 -0
  86. package/dist/pubsub/topics/checkout/types.d.ts +12 -0
  87. package/dist/pubsub/topics/checkout/types.js +8 -0
  88. package/dist/pubsub/topics/index.d.ts +18 -17
  89. package/dist/pubsub/topics/index.js +18 -17
  90. package/dist/pubsub/topics/types.d.ts +8 -0
  91. package/package.json +2 -2
@@ -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.12.0",
3
+ "version": "0.13.1-preprod.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.9.0"
60
+ "@final-commerce/common": "2.9.2-preprod.1"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@commitlint/cli": "^19.0.0",