@lookiero/checkout 9.8.5 → 9.9.0-beta.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 (144) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/pact.config.d.ts +21 -0
  3. package/dist/pact.config.js +16 -0
  4. package/dist/public/public/assets/adaptive-icon.png +0 -0
  5. package/dist/public/public/assets/favicon.png +0 -0
  6. package/dist/public/public/assets/icon.png +0 -0
  7. package/dist/public/public/assets/splash.png +0 -0
  8. package/dist/public/public/images/not-found.png +0 -0
  9. package/dist/src/ExpoRoot.js +6 -4
  10. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.d.ts +1 -0
  11. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +55 -0
  12. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.d.ts +1 -0
  13. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +116 -0
  14. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.d.ts +1 -0
  15. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +56 -0
  16. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.d.ts +1 -0
  17. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +51 -0
  18. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.d.ts +1 -0
  19. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +51 -0
  20. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.d.ts +1 -0
  21. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +51 -0
  22. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +13 -0
  23. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +19 -0
  24. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.d.ts +1 -0
  25. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +56 -0
  26. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.d.ts +1 -0
  27. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +57 -0
  28. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.d.ts +1 -0
  29. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +55 -0
  30. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.d.ts +1 -0
  31. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +120 -0
  32. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.d.ts +1 -0
  33. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +55 -0
  34. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.d.ts +1 -0
  35. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +55 -0
  36. package/dist/src/infrastructure/ui/Root.d.ts +0 -2
  37. package/dist/src/infrastructure/ui/Root.js +2 -4
  38. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +22 -0
  39. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +1 -0
  40. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +7 -0
  41. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +5 -0
  42. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +7 -0
  43. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +6 -0
  44. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +4 -0
  45. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +20 -0
  46. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +4 -0
  47. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +43 -0
  48. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +12 -0
  49. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +14 -0
  50. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.js +1 -1
  51. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.d.ts +1 -0
  52. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.js +1 -0
  53. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +1 -1
  54. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.d.ts +1 -0
  55. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.js +1 -0
  56. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +7 -0
  57. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +21 -0
  58. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +8 -0
  59. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +12 -0
  60. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +12 -0
  61. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +64 -0
  62. package/dist/src/infrastructure/ui/hooks/usePaymentInstrumentEvents.d.ts +3 -2
  63. package/dist/src/infrastructure/ui/hooks/usePaymentInstrumentEvents.js +17 -26
  64. package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.d.ts +1 -1
  65. package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.js +22 -55
  66. package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +10 -0
  67. package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +17 -0
  68. package/dist/src/infrastructure/ui/i18n/i18n.d.ts +1 -0
  69. package/dist/src/infrastructure/ui/i18n/i18n.js +1 -0
  70. package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +20 -0
  71. package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +27 -0
  72. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +10 -0
  73. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +27 -0
  74. package/dist/src/infrastructure/ui/views/App.style.d.ts +6 -0
  75. package/dist/src/infrastructure/ui/views/App.style.js +8 -0
  76. package/dist/src/infrastructure/ui/views/checkout/Checkout.js +5 -2
  77. package/dist/src/infrastructure/ui/views/checkout/Checkout.style.d.ts +3 -0
  78. package/dist/src/infrastructure/ui/views/checkout/Checkout.style.js +3 -0
  79. package/dist/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.js +2 -2
  80. package/dist/src/infrastructure/ui/views/checkout/components/paymentInstrument/PaymentInstrument.js +7 -7
  81. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +7 -0
  82. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +11 -0
  83. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +12 -0
  84. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +64 -0
  85. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +12 -0
  86. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +16 -0
  87. package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +40 -0
  88. package/dist/src/infrastructure/ui/views/return/Return.style.js +44 -0
  89. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +14 -0
  90. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +28 -0
  91. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +7 -0
  92. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +11 -0
  93. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +26 -0
  94. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +21 -0
  95. package/dist/src/projection/customer/customer.d.ts +2 -0
  96. package/dist/src/projection/shared/country.d.ts +14 -0
  97. package/dist/src/projection/shared/country.js +15 -0
  98. package/dist/src/projection/shared/customer.d.ts +9 -0
  99. package/dist/src/projection/shared/customer.js +1 -0
  100. package/dist/src/projection/shared/locale.d.ts +12 -0
  101. package/dist/src/projection/shared/locale.js +13 -0
  102. package/dist/src/projection/shared/order.d.ts +6 -0
  103. package/dist/src/projection/shared/order.js +1 -0
  104. package/dist/src/projection/shared/price.d.ts +11 -0
  105. package/dist/src/projection/shared/price.js +1 -0
  106. package/dist/src/projection/shared/size.d.ts +21 -0
  107. package/dist/src/projection/shared/size.js +4 -0
  108. package/dist/src/projection/shared/subscription.d.ts +2 -0
  109. package/dist/src/projection/shared/subscription.js +1 -0
  110. package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.d.ts +15 -0
  111. package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.js +16 -0
  112. package/dist/src/shared/ui/components/atoms/error/Error.d.ts +11 -0
  113. package/dist/src/shared/ui/components/atoms/error/Error.js +6 -0
  114. package/dist/src/shared/ui/components/atoms/field/Field.d.ts +14 -0
  115. package/dist/src/shared/ui/components/atoms/field/Field.js +29 -0
  116. package/dist/src/shared/ui/components/atoms/field/Field.style.d.ts +16 -0
  117. package/dist/src/shared/ui/components/atoms/field/Field.style.js +19 -0
  118. package/dist/src/shared/ui/components/molecules/inputField/InputField.d.ts +24 -0
  119. package/dist/src/shared/ui/components/molecules/inputField/InputField.js +28 -0
  120. package/dist/src/shared/ui/components/molecules/inputField/InputField.style.d.ts +29 -0
  121. package/dist/src/shared/ui/components/molecules/inputField/InputField.style.js +37 -0
  122. package/dist/src/version.d.ts +1 -1
  123. package/dist/src/version.js +1 -1
  124. package/index.ts +1 -1
  125. package/package.json +3 -3
  126. package/src/ExpoRoot.tsx +6 -4
  127. package/src/infrastructure/ui/Root.tsx +17 -30
  128. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.ts +1 -0
  129. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.tsx +0 -1
  130. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.ts +1 -0
  131. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.tsx +0 -1
  132. package/src/infrastructure/ui/hooks/usePaymentInstrumentEvents.ts +18 -60
  133. package/src/infrastructure/ui/hooks/useSubmitCheckout.test.ts +0 -58
  134. package/src/infrastructure/ui/hooks/useSubmitCheckout.ts +33 -77
  135. package/src/infrastructure/ui/i18n/i18n.ts +1 -0
  136. package/src/infrastructure/ui/views/checkout/Checkout.style.ts +3 -0
  137. package/src/infrastructure/ui/views/checkout/Checkout.tsx +12 -3
  138. package/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.tsx +2 -2
  139. package/src/infrastructure/ui/views/checkout/components/paymentInstrument/PaymentInstrument.tsx +8 -8
  140. package/src/projection/customer/customer.ts +2 -0
  141. package/dist/src/infrastructure/ui/hooks/useQueryBus.d.ts +0 -9
  142. package/dist/src/infrastructure/ui/hooks/useQueryBus.js +0 -10
  143. package/src/infrastructure/ui/hooks/useQueryBus.test.tsx +0 -23
  144. package/src/infrastructure/ui/hooks/useQueryBus.tsx +0 -27
package/src/ExpoRoot.tsx CHANGED
@@ -32,9 +32,11 @@ const order: Order = {
32
32
  };
33
33
 
34
34
  const customer: Customer = {
35
- customerId: "d3c2354b-9811-46d4-b2ba-5fba012ed94d",
35
+ customerId: "9413fe3a-09fc-4264-905e-040bb7b4ca75",
36
36
  country: Country.ES,
37
37
  segment: Segment.WOMEN,
38
+ email: "email@example.com",
39
+ name: "Adèle Léonce Émilie",
38
40
  };
39
41
 
40
42
  const sentryConfig: SentryEnvironment = {
@@ -51,7 +53,7 @@ const apiUrl =
51
53
  ? "/local-to-dev"
52
54
  : "/checkout/api";
53
55
  const authToken =
54
- "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjU2NDg3OTAsImV4cCI6MTc0MjM2OTcyNywiZGlzcGxheU5hbWUiOiJUZXN0aW5nIiwiY291bnRyeV9jb2RlIjoiRVMiLCJhY2Nlc3NWaWEiOiJlbWFpbCIsInN1YnNjcmlwdGlvblN0YXJ0aW5nRGF0ZSI6IjIwMjQtMTEtMDgiLCJpbXBlcnNvbmF0ZWQiOmZhbHNlLCJ1dWlkIjoiNzRjYjRmNzYtM2YxNC00OTgzLTgxYTYtMmVlMmE5YTI3NWQ0IiwiaWF0IjoxNzM5OTUwNTI3fQ.ajNczGc6YhM23--PsqlAoDrp_GN87TnHEBOYyg2hoWM";
56
+ "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjU2NTIwMjgsImV4cCI6MTczOTQ0MTYwMSwiZGlzcGxheU5hbWUiOiJNaWtlbCIsImNvdW50cnlfY29kZSI6IkVTIiwiYWNjZXNzVmlhIjoiZW1haWwiLCJzdWJzY3JpcHRpb25TdGFydGluZ0RhdGUiOiIyMDI0LTExLTE4IiwiaW1wZXJzb25hdGVkIjpmYWxzZSwidXVpZCI6Ijk0MTNmZTNhLTA5ZmMtNDI2NC05MDVlLTA0MGJiN2I0Y2E3NSIsImlhdCI6MTczNjc2MzIwMn0.ZaFu4743f9XR0aK3LgMMhbmRHNloHtC1Sm0FDUtj8B8";
55
57
  const getAuthToken = () => Promise.resolve(authToken);
56
58
 
57
59
  const externalTranslationsUrl =
@@ -92,6 +94,7 @@ setPaymentsBridge({
92
94
  useFeatureFlags: () => ({}),
93
95
  locale: () => Promise.resolve("es-ES"),
94
96
  scrollView: ScrollView,
97
+ hostUrl: "",
95
98
  });
96
99
 
97
100
  const kameleoonConfig: KameleoonEnvironment = {
@@ -99,7 +102,7 @@ const kameleoonConfig: KameleoonEnvironment = {
99
102
  experiments: {},
100
103
  };
101
104
 
102
- const { Component: Messaging, queryBus } =
105
+ const { Component: Messaging } =
103
106
  process.env.EXPO_PUBLIC_APP_VARIANT === "test"
104
107
  ? checkoutMockBootstrap()
105
108
  : checkoutBootstrap({ apiUrl: () => apiUrl, getAuthToken });
@@ -110,7 +113,6 @@ const I18n = i18n({
110
113
  const Root = root({
111
114
  Messaging,
112
115
  I18n,
113
- queryBus,
114
116
  getAuthToken,
115
117
  development: false,
116
118
  sentry: () => (process.env.EXPO_PUBLIC_APP_VARIANT === "test" ? ({} as SentryEnvironment) : sentryConfig),
@@ -3,7 +3,6 @@ import React, { ComponentType, useCallback } from "react";
3
3
  import { Platform } from "react-native";
4
4
  import { useRoutes as reactRouterUseRoutes } from "react-router-native";
5
5
  import { I18n } from "@lookiero/i18n-react";
6
- import { QueryBus } from "@lookiero/messaging";
7
6
  import { MessagingRoot } from "@lookiero/messaging-react/bootstrap";
8
7
  import { Locale } from "@lookiero/sty-psp-locale";
9
8
  import { SentryEnvironment, SentryLoggerFunctionArgs, sentryLogger, sentryLoggerHOC } from "@lookiero/sty-psp-logging";
@@ -12,13 +11,11 @@ import { Customer } from "../../projection/customer/customer";
12
11
  import { Order } from "../../projection/order/order";
13
12
  import { Subscription } from "../../projection/subscription/subscription";
14
13
  import { KameleoonEnvironment } from "../ab-testing/kameleoonEnvironment";
15
- import { QueryBusProvider } from "./hooks/useQueryBus";
16
14
  import { Routing } from "./routing/Routing";
17
15
 
18
16
  interface RootFunctionArgs {
19
17
  readonly Messaging: MessagingRoot;
20
18
  readonly I18n: I18n;
21
- readonly queryBus: QueryBus;
22
19
  readonly development?: boolean;
23
20
  readonly sentry: () => SentryEnvironment;
24
21
  readonly getAuthToken: () => Promise<string>;
@@ -42,15 +39,7 @@ interface RootProps {
42
39
  readonly useRoutes?: typeof reactRouterUseRoutes;
43
40
  }
44
41
 
45
- const root: RootFunction = ({
46
- Messaging,
47
- I18n,
48
- queryBus,
49
- getAuthToken,
50
- development,
51
- sentry,
52
- kameleoon: kameleoonConfig,
53
- }) => {
42
+ const root: RootFunction = ({ Messaging, I18n, getAuthToken, development, sentry, kameleoon: kameleoonConfig }) => {
54
43
  const logger = sentryLogger(sentry);
55
44
  const kameleoon = kameleoonConfig();
56
45
 
@@ -71,24 +60,22 @@ const root: RootFunction = ({
71
60
 
72
61
  return (
73
62
  <Messaging includeReactQueryDevTools={Platform.OS === "web"}>
74
- <QueryBusProvider queryBus={queryBus}>
75
- <Routing
76
- I18n={I18n}
77
- basePath={basePath}
78
- customer={customer}
79
- getAuthToken={getAuthToken}
80
- kameleoon={kameleoon}
81
- layout={layout}
82
- locale={locale}
83
- order={order}
84
- subscription={subscription}
85
- useRedirect={useRedirect}
86
- useRoutes={useRoutes}
87
- onCheckoutSubmitted={onCheckoutSubmitted}
88
- onI18nError={development ? undefined : handleOnI18nError}
89
- onNotAccessible={onNotAccessible}
90
- />
91
- </QueryBusProvider>
63
+ <Routing
64
+ I18n={I18n}
65
+ basePath={basePath}
66
+ customer={customer}
67
+ getAuthToken={getAuthToken}
68
+ kameleoon={kameleoon}
69
+ layout={layout}
70
+ locale={locale}
71
+ order={order}
72
+ subscription={subscription}
73
+ useRedirect={useRedirect}
74
+ useRoutes={useRoutes}
75
+ onCheckoutSubmitted={onCheckoutSubmitted}
76
+ onI18nError={development ? undefined : handleOnI18nError}
77
+ onNotAccessible={onNotAccessible}
78
+ />
92
79
  </Messaging>
93
80
  );
94
81
  };
@@ -11,6 +11,7 @@ const style = StyleSheet.create({
11
11
  ...Platform.select({
12
12
  android: {
13
13
  paddingTop: space2,
14
+ height: "auto",
14
15
  },
15
16
  }),
16
17
  },
@@ -32,7 +32,6 @@ const TextareaCheckoutQuestionItem: CheckoutQuestionItem = ({
32
32
  placeholder={placeholderText}
33
33
  style={style}
34
34
  testID={testID}
35
- textAlignVertical="top"
36
35
  value={feedback}
37
36
  multiline
38
37
  onBlur={onBlur}
@@ -11,6 +11,7 @@ const style = StyleSheet.create({
11
11
  ...Platform.select({
12
12
  android: {
13
13
  paddingTop: space2,
14
+ height: "auto",
14
15
  },
15
16
  }),
16
17
  },
@@ -37,7 +37,6 @@ const TextareaReturnQuestionItem: ReturnQuestionItem<ReturnQuestionType.TEXTAREA
37
37
  placeholder={placeholderText}
38
38
  style={style}
39
39
  testID={testID}
40
- textAlignVertical="top"
41
40
  value={feedback}
42
41
  multiline
43
42
  onBlur={onBlur}
@@ -1,75 +1,33 @@
1
- import { useCallback, useEffect } from "react";
2
- import { useEvent } from "@lookiero/event";
3
- import { Logger } from "@lookiero/sty-psp-logging";
4
- import { NotificationLevel, useCreateToastNotification } from "@lookiero/sty-psp-notifications";
5
- import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
6
- import { I18nMessages } from "../i18n/i18n";
7
-
8
- const PAYMENT_ERROR = "ERROR";
9
- const PAYMENT_SUCCESS = "PAYMENT_INSTRUMENT_UPDATED";
10
-
11
- interface Message {
12
- readonly id: string;
13
- }
14
- interface OnSuccessFunctionArgs {
15
- readonly message: Message;
16
- }
17
- interface OnSuccessFunction {
18
- (args: OnSuccessFunctionArgs): void;
19
- }
20
-
21
- interface Toaster {
22
- readonly id: string;
23
- }
24
- interface Error {
25
- readonly toaster?: Toaster;
26
- }
27
- interface OnErrorFunctionArgs {
28
- readonly error: Error;
29
- }
30
- interface OnErrorFunction {
31
- (args: OnErrorFunctionArgs): void;
32
- }
1
+ import { useEffect } from "react";
2
+ import { PaymentPayload, Section, usePaymentStatusManager } from "@lookiero/payments-front";
33
3
 
34
4
  interface UsePaymentInstrumentEventsFunctionArgs {
35
- readonly logger: Logger;
5
+ readonly onSuccess: (payload: PaymentPayload) => void;
6
+ readonly onError: (payload: PaymentPayload) => void;
36
7
  }
37
8
 
38
9
  interface UsePaymentInstrumentEventsFunction {
39
10
  (args: UsePaymentInstrumentEventsFunctionArgs): void;
40
11
  }
41
12
 
42
- const usePaymentInstrumentEvents: UsePaymentInstrumentEventsFunction = ({ logger }) => {
43
- const { subscribe, unsubscribe } = useEvent();
13
+ const usePaymentInstrumentEvents: UsePaymentInstrumentEventsFunction = ({ onSuccess, onError }) => {
14
+ const refreshStatus = usePaymentStatusManager(Section.BOX_CHECKOUT);
44
15
 
45
- const [createNotification] = useCreateToastNotification({ contextId: MESSAGING_CONTEXT_ID, logger });
16
+ useEffect(() => {
17
+ const { isLoading, consumePayload } = refreshStatus;
46
18
 
47
- const onSuccess: OnSuccessFunction = useCallback(
48
- ({ message }) => createNotification({ bodyI18nKey: message.id, level: NotificationLevel.SUCCESS }),
49
- [createNotification],
50
- );
19
+ if (isLoading) {
20
+ return;
21
+ }
51
22
 
52
- const onError: OnErrorFunction = useCallback(
53
- ({ error }) => {
54
- if (error.toaster) {
55
- createNotification({
56
- bodyI18nKey: error.toaster.id || I18nMessages.CHECKOUT_TOAST_PAYMENT_ERROR,
57
- level: NotificationLevel.ERROR,
58
- });
23
+ consumePayload((payload) => {
24
+ if (payload.success) {
25
+ onSuccess(payload);
26
+ } else {
27
+ onError(payload);
59
28
  }
60
- },
61
- [createNotification],
62
- );
63
-
64
- useEffect(() => {
65
- subscribe({ event: PAYMENT_ERROR }, onError);
66
- subscribe({ event: PAYMENT_SUCCESS }, onSuccess);
67
-
68
- return () => {
69
- unsubscribe({ event: PAYMENT_ERROR }, onError);
70
- unsubscribe({ event: PAYMENT_SUCCESS }, onSuccess);
71
- };
72
- }, [subscribe, unsubscribe, createNotification, onError, onSuccess]);
29
+ });
30
+ }, [onError, onSuccess, refreshStatus]);
73
31
  };
74
32
 
75
33
  export { usePaymentInstrumentEvents };
@@ -6,11 +6,9 @@ import { PaymentFlowRef } from "@lookiero/payments-front";
6
6
  import { ChargeStatus } from "@lookiero/payments-front/build/infrastructure/CheckoutAPI";
7
7
  import { Logger } from "@lookiero/sty-psp-logging";
8
8
  import { NotificationLevel, useCreateToastNotification } from "@lookiero/sty-psp-notifications";
9
- import { CheckoutBookingProjection } from "../../../projection/checkoutBooking/checkoutBooking";
10
9
  import { useSubmitCheckout } from "../../domain/checkout/react/useSubmitCheckout";
11
10
  import { useBlockCheckoutBooking } from "../../domain/checkoutBooking/react/useBlockCheckoutBooking";
12
11
  import { paymentFlowPayload as mockPaymentFlowPayload } from "../../projection/payment/paymentFlowPayload.mock";
13
- import { useQueryBus } from "./useQueryBus";
14
12
  import { useSubmitCheckout as sut } from "./useSubmitCheckout";
15
13
 
16
14
  const checkoutId = "9c450400-0cd7-44a4-b0e3-e0002a9bf8df";
@@ -20,7 +18,6 @@ const errorChargeStatuses = Object.values(ChargeStatus).filter((status) => statu
20
18
  const logger = mock<Logger>();
21
19
 
22
20
  jest.mock("@lookiero/sty-psp-notifications");
23
- jest.mock("./useQueryBus");
24
21
  jest.mock("../../domain/checkout/react/useSubmitCheckout");
25
22
  jest.mock("../../domain/checkoutBooking/react/useBlockCheckoutBooking");
26
23
 
@@ -41,7 +38,6 @@ describe("useSubmitCheckout custom hook", () => {
41
38
  },
42
39
  };
43
40
 
44
- (useQueryBus as jest.Mock).mockReturnValue(() => ({ isExpired: false }) as CheckoutBookingProjection);
45
41
  (useBlockCheckoutBooking as jest.Mock).mockReturnValue([mockBlockCheckoutBooking, CommandStatus.SUCCESS]);
46
42
  (useCreateToastNotification as jest.Mock).mockReturnValue([mockCreateToastNotification, CommandStatus.SUCCESS]);
47
43
  (useSubmitCheckout as jest.Mock).mockReturnValue([mockSubmitCheckout, CommandStatus.SUCCESS]);
@@ -90,7 +86,6 @@ describe("useSubmitCheckout custom hook", () => {
90
86
  },
91
87
  };
92
88
 
93
- (useQueryBus as jest.Mock).mockReturnValue(() => ({ isExpired: false }) as CheckoutBookingProjection);
94
89
  (useBlockCheckoutBooking as jest.Mock).mockReturnValue([mockBlockCheckoutBooking, CommandStatus.SUCCESS]);
95
90
  (useCreateToastNotification as jest.Mock).mockReturnValue([mockCreateToastNotification, CommandStatus.SUCCESS]);
96
91
  (useSubmitCheckout as jest.Mock).mockReturnValue([mockSubmitCheckout, CommandStatus.SUCCESS]);
@@ -131,7 +126,6 @@ describe("useSubmitCheckout custom hook", () => {
131
126
  },
132
127
  };
133
128
 
134
- (useQueryBus as jest.Mock).mockReturnValue(() => ({ isExpired: false }) as CheckoutBookingProjection);
135
129
  (useBlockCheckoutBooking as jest.Mock).mockReturnValue([mockBlockCheckoutBooking, CommandStatus.ERROR]);
136
130
  (useCreateToastNotification as jest.Mock).mockReturnValue([mockCreateToastNotification, CommandStatus.IDLE]);
137
131
  (useSubmitCheckout as jest.Mock).mockReturnValue([mockSubmitCheckout, CommandStatus.IDLE]);
@@ -172,7 +166,6 @@ describe("useSubmitCheckout custom hook", () => {
172
166
  },
173
167
  };
174
168
 
175
- (useQueryBus as jest.Mock).mockReturnValue(() => ({ isExpired: false }) as CheckoutBookingProjection);
176
169
  (useBlockCheckoutBooking as jest.Mock).mockReturnValue([mockBlockCheckoutBooking, CommandStatus.SUCCESS]);
177
170
  (useCreateToastNotification as jest.Mock).mockReturnValue([mockCreateToastNotification, CommandStatus.SUCCESS]);
178
171
  (useSubmitCheckout as jest.Mock).mockReturnValue([mockSubmitCheckout, CommandStatus.IDLE]);
@@ -219,7 +212,6 @@ describe("useSubmitCheckout custom hook", () => {
219
212
  },
220
213
  };
221
214
 
222
- (useQueryBus as jest.Mock).mockReturnValue(() => ({ isExpired: false }) as CheckoutBookingProjection);
223
215
  (useBlockCheckoutBooking as jest.Mock).mockReturnValue([mockBlockCheckoutBooking, CommandStatus.SUCCESS]);
224
216
  (useSubmitCheckout as jest.Mock).mockReturnValue([mockSubmitCheckout, CommandStatus.ERROR]);
225
217
  (useCreateToastNotification as jest.Mock).mockReturnValue([mockCreateToastNotification, CommandStatus.SUCCESS]);
@@ -244,54 +236,4 @@ describe("useSubmitCheckout custom hook", () => {
244
236
  expect(mockOnError).toHaveBeenCalled();
245
237
  });
246
238
  });
247
-
248
- test("returns submitCheckout error as the status right after calling 'submitCheckout' if CheckoutBooking isExpired", async () => {
249
- const mockBlockCheckoutBooking = jest.fn();
250
- const mockSubmitCheckout = jest.fn();
251
- const mockCreateToastNotification = jest.fn();
252
- const mockOnError = jest.fn();
253
- const mockOnSuccess = jest.fn();
254
- const mockPaymentFlowRef: RefObject<PaymentFlowRef> = {
255
- current: {
256
- // eslint-disable-next-line @typescript-eslint/naming-convention
257
- startLegacyBoxCheckout: jest.fn().mockImplementation((_payload, callback) => {
258
- callback({ status: ChargeStatus.EXECUTED, final: true });
259
- }),
260
- startCheckout: jest.fn(),
261
- },
262
- };
263
-
264
- (useQueryBus as jest.Mock).mockReturnValue(() => ({ isExpired: true }) as CheckoutBookingProjection);
265
- (useBlockCheckoutBooking as jest.Mock).mockReturnValue([mockBlockCheckoutBooking, CommandStatus.SUCCESS]);
266
- (useCreateToastNotification as jest.Mock).mockReturnValue([mockCreateToastNotification, CommandStatus.SUCCESS]);
267
- (useSubmitCheckout as jest.Mock).mockReturnValue([mockSubmitCheckout, CommandStatus.SUCCESS]);
268
-
269
- const { result } = renderHook(() =>
270
- sut({
271
- checkoutId,
272
- checkoutBookingId,
273
- paymentFlowRef: mockPaymentFlowRef,
274
- onError: mockOnError,
275
- onSuccess: mockOnSuccess,
276
- logger,
277
- }),
278
- );
279
-
280
- await act(async () => {
281
- const [submitCheckout] = result.current;
282
- await submitCheckout({ paymentFlowPayload: mockPaymentFlowPayload, sizeChangeEnabled: true });
283
- });
284
-
285
- await waitFor(() => {
286
- const [, status] = result.current;
287
-
288
- expect(mockBlockCheckoutBooking).toHaveBeenCalled();
289
- expect(mockCreateToastNotification).not.toHaveBeenCalled();
290
- expect(mockSubmitCheckout).not.toHaveBeenCalled();
291
-
292
- expect(status).toBe("error");
293
- expect(mockOnSuccess).not.toHaveBeenCalled();
294
- expect(mockOnError).toHaveBeenCalled();
295
- });
296
- });
297
239
  });
@@ -1,39 +1,14 @@
1
1
  import { RefObject, useCallback, useMemo, useState } from "react";
2
2
  import { CommandStatus } from "@lookiero/messaging-react";
3
- import { PaymentFlowRef } from "@lookiero/payments-front";
3
+ import { PaymentFlowRef, PaymentPayload } from "@lookiero/payments-front";
4
4
  import { Logger } from "@lookiero/sty-psp-logging";
5
5
  import { NotificationLevel, useCreateToastNotification } from "@lookiero/sty-psp-notifications";
6
- import {
7
- ViewCheckoutBookingById,
8
- viewCheckoutBookingById,
9
- ViewCheckoutBookingByIdResult,
10
- } from "../../../projection/checkoutBooking/viewCheckoutBookingById";
11
6
  import { PaymentFlowPayloadProjection } from "../../../projection/payment/paymentFlowPayload";
12
7
  import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
13
8
  import { useSubmitCheckout as useSubmitCheckoutCommand } from "../../domain/checkout/react/useSubmitCheckout";
14
9
  import { useBlockCheckoutBooking } from "../../domain/checkoutBooking/react/useBlockCheckoutBooking";
15
10
  import { I18nMessages } from "../i18n/i18n";
16
- import { useQueryBus } from "./useQueryBus";
17
-
18
- enum ChargeStatus {
19
- EXECUTED = "EXECUTED",
20
- REQUIRES_ACTION = "REQUIRES_ACTION",
21
- REQUIRED_ACTION_CANCELLED = "REQUIRED_ACTION_CANCELLED",
22
- REJECTED = "REJECTED",
23
- CANCELLED = "CANCELLED",
24
- TO_CONFIRM = "TO_CONFIRM",
25
- ERROR = "ERROR",
26
- UNKNOWN = "UNKNOWN",
27
- }
28
- interface LegacyBoxCheckout {
29
- readonly status: ChargeStatus;
30
- readonly toaster: {
31
- id: string;
32
- } | null;
33
- readonly final: boolean;
34
- readonly id?: string;
35
- readonly translation?: string;
36
- }
11
+ import { usePaymentInstrumentEvents } from "./usePaymentInstrumentEvents";
37
12
 
38
13
  type Status = "idle" | "loading" | "success" | "error";
39
14
 
@@ -53,7 +28,7 @@ interface UseSubmitCheckoutFunctionArgs {
53
28
  readonly checkoutBookingId: string;
54
29
  readonly paymentFlowRef: RefObject<PaymentFlowRef>;
55
30
  readonly onError: () => void;
56
- readonly onSuccess?: () => void;
31
+ readonly onSuccess: () => void;
57
32
  readonly logger: Logger;
58
33
  }
59
34
 
@@ -69,11 +44,9 @@ const useSubmitCheckout: UseSubmitCheckoutFunction = ({
69
44
  onSuccess,
70
45
  logger,
71
46
  }) => {
72
- const queryBus = useQueryBus();
73
47
  const [submitCheckoutCommand, submitCheckoutCommandStatus] = useSubmitCheckoutCommand({ checkoutId, logger });
74
48
  const [blockCheckoutBooking, blockCheckoutBookingStatus] = useBlockCheckoutBooking({ checkoutBookingId, logger });
75
49
  const [createNotification] = useCreateToastNotification({ contextId: MESSAGING_CONTEXT_ID, logger });
76
- const [checkoutBookingExpired, setCheckoutBookingExpired] = useState(false);
77
50
 
78
51
  const [startLegacyBoxCheckoutStatus, setStartLegacyBoxCheckoutStatus] = useState<Status>("idle");
79
52
 
@@ -85,48 +58,37 @@ const useSubmitCheckout: UseSubmitCheckoutFunction = ({
85
58
  return;
86
59
  }
87
60
 
88
- const checkoutBooking = await queryBus<ViewCheckoutBookingById, ViewCheckoutBookingByIdResult>(
89
- viewCheckoutBookingById({ checkoutBookingId }),
90
- );
61
+ setStartLegacyBoxCheckoutStatus("loading");
91
62
 
92
- if (checkoutBooking?.isExpired) {
93
- setCheckoutBookingExpired(true);
94
- return;
95
- }
63
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
64
+ // @ts-ignore
65
+ paymentFlowRef.current?.startLegacyBoxCheckout(paymentFlowPayload);
66
+ },
67
+ [paymentFlowRef, blockCheckoutBooking],
68
+ );
69
+
70
+ const onPaymentSuccess = useCallback(async () => {
71
+ setStartLegacyBoxCheckoutStatus("success");
72
+
73
+ await submitCheckoutCommand();
74
+
75
+ createNotification({
76
+ bodyI18nKey: I18nMessages.CHECKOUT_TOAST_PAYMENT_SUCCESS,
77
+ level: NotificationLevel.SUCCESS,
78
+ });
79
+ }, [createNotification, submitCheckoutCommand]);
80
+ const onPaymentError = useCallback(
81
+ (payload: PaymentPayload) => {
82
+ setStartLegacyBoxCheckoutStatus("error");
96
83
 
97
- paymentFlowRef.current?.startLegacyBoxCheckout(
98
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
99
- // @ts-ignore
100
- paymentFlowPayload,
101
- async ({ status, toaster, final }: LegacyBoxCheckout) => {
102
- setStartLegacyBoxCheckoutStatus("loading");
103
-
104
- if (final) {
105
- if (status === ChargeStatus.EXECUTED) {
106
- setStartLegacyBoxCheckoutStatus("success");
107
- await submitCheckoutCommand();
108
- onSuccess?.();
109
- } else {
110
- createNotification({
111
- level: NotificationLevel.ERROR,
112
- bodyI18nKey: toaster?.id || I18nMessages.CHECKOUT_TOAST_PAYMENT_ERROR,
113
- });
114
- setStartLegacyBoxCheckoutStatus("error");
115
- }
116
- }
117
- },
118
- );
84
+ createNotification({
85
+ bodyI18nKey: payload.metadata?.toaster?.id || I18nMessages.CHECKOUT_TOAST_PAYMENT_ERROR,
86
+ level: NotificationLevel.ERROR,
87
+ });
119
88
  },
120
- [
121
- queryBus,
122
- checkoutBookingId,
123
- paymentFlowRef,
124
- blockCheckoutBooking,
125
- submitCheckoutCommand,
126
- onSuccess,
127
- createNotification,
128
- ],
89
+ [createNotification],
129
90
  );
91
+ usePaymentInstrumentEvents({ onSuccess: onPaymentSuccess, onError: onPaymentError });
130
92
 
131
93
  const status: Status = useMemo(() => {
132
94
  if (
@@ -141,26 +103,20 @@ const useSubmitCheckout: UseSubmitCheckoutFunction = ({
141
103
  startLegacyBoxCheckoutStatus === "success" &&
142
104
  submitCheckoutCommandStatus === CommandStatus.SUCCESS
143
105
  ) {
106
+ onSuccess();
144
107
  return "success";
145
108
  }
146
109
  if (
147
110
  blockCheckoutBookingStatus === CommandStatus.ERROR ||
148
111
  startLegacyBoxCheckoutStatus === "error" ||
149
- submitCheckoutCommandStatus === CommandStatus.ERROR ||
150
- checkoutBookingExpired
112
+ submitCheckoutCommandStatus === CommandStatus.ERROR
151
113
  ) {
152
114
  onError();
153
115
  return "error";
154
116
  }
155
117
 
156
118
  return "idle";
157
- }, [
158
- blockCheckoutBookingStatus,
159
- startLegacyBoxCheckoutStatus,
160
- submitCheckoutCommandStatus,
161
- checkoutBookingExpired,
162
- onError,
163
- ]);
119
+ }, [blockCheckoutBookingStatus, startLegacyBoxCheckoutStatus, submitCheckoutCommandStatus, onSuccess, onError]);
164
120
 
165
121
  return [submitCheckout, status];
166
122
  };
@@ -48,6 +48,7 @@ enum I18nMessages {
48
48
  CHECKOUT_TITLE = "checkout.title",
49
49
  CHECKOUT_PAY_BUTTON = "checkout.pay_button",
50
50
  CHECKOUT_TOAST_PAYMENT_ERROR = "checkout.toast_payment_error",
51
+ CHECKOUT_TOAST_PAYMENT_SUCCESS = "checkout.toast_payment_success",
51
52
  CHECKOUT_SUCCESS_MODAL_TITLE = "checkout.success_modal_title",
52
53
  CHECKOUT_SUCCESS_MODAL_DESCRIPTION = "checkout.success_modal_description",
53
54
  CHECKOUT_SUCCESS_MODAL_BUTTON = "checkout.success_modal_button",
@@ -30,6 +30,9 @@ const style = StyleSheet.create({
30
30
  paymentSelector: {
31
31
  marginTop: space6,
32
32
  },
33
+ paymentSelectorNL: {
34
+ marginBottom: space6,
35
+ },
33
36
  princingWrapper: {
34
37
  padding: space6,
35
38
  },
@@ -4,6 +4,7 @@ import { useNavigate } from "react-router-native";
4
4
  import { Box, Button, Layout as AuroraLayout, Spinner, Text, useDevice } from "@lookiero/aurora";
5
5
  import { useI18nMessage } from "@lookiero/i18n-react";
6
6
  import { QueryStatus } from "@lookiero/messaging-react";
7
+ import { Country } from "@lookiero/sty-psp-locale";
7
8
  import { Layout as UiLayout, Sticky } from "@lookiero/sty-psp-ui";
8
9
  import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
9
10
  import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
@@ -116,6 +117,12 @@ const Checkout: FC<CheckoutProps> = ({ children, layout: Layout, useRedirect })
116
117
  >
117
118
  <Box size={{ L: "2/3" }} style={screen.L && style.desktopListSpacing}>
118
119
  <View style={[style.contentWrapper, screen.L && style.desktopContentWrapper]}>
120
+ {country === Country.NL && (
121
+ <View style={style.paymentSelectorNL}>
122
+ <PaymentInstrument useRedirect={useRedirect} />
123
+ </View>
124
+ )}
125
+
119
126
  <Text level={3} style={style.title} heading>
120
127
  {titleText}
121
128
  </Text>
@@ -139,9 +146,11 @@ const Checkout: FC<CheckoutProps> = ({ children, layout: Layout, useRedirect })
139
146
  </View>
140
147
  ))}
141
148
 
142
- <View style={style.paymentSelector}>
143
- <PaymentInstrument useRedirect={useRedirect} />
144
- </View>
149
+ {country !== Country.NL && (
150
+ <View style={style.paymentSelector}>
151
+ <PaymentInstrument useRedirect={useRedirect} />
152
+ </View>
153
+ )}
145
154
  </View>
146
155
  </Box>
147
156
 
@@ -1,7 +1,7 @@
1
1
  import React, { FC, useCallback, useEffect, useRef, useState } from "react";
2
2
  import { useNavigate } from "react-router-native";
3
3
  import { QueryStatus } from "@lookiero/messaging-react";
4
- import { PaymentFlow, PaymentFlowRef } from "@lookiero/payments-front";
4
+ import { PaymentFlow, PaymentFlowRef, Section } from "@lookiero/payments-front";
5
5
  import { useLogger } from "@lookiero/sty-psp-logging";
6
6
  import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
7
7
  import { Currency } from "../../../../../../domain/checkoutItem/model/currency";
@@ -119,7 +119,7 @@ const CheckoutPaymentModal: FC<CheckoutPaymentModalProps> = ({
119
119
 
120
120
  if (!dependenciesLoaded) return null;
121
121
 
122
- return <PaymentFlow ref={paymentFlowRef} token={authToken} />;
122
+ return <PaymentFlow ref={paymentFlowRef} section={Section.BOX_CHECKOUT} token={authToken} />;
123
123
  };
124
124
 
125
125
  export { CheckoutPaymentModal };
@@ -1,24 +1,24 @@
1
- import React, { FC, useRef } from "react";
1
+ import React, { FC } from "react";
2
2
  import { PaymentInstrumentSelect, Section } from "@lookiero/payments-front";
3
- import { useLogger } from "@lookiero/sty-psp-logging";
4
- import { usePaymentInstrumentEvents } from "../../../../hooks/usePaymentInstrumentEvents";
3
+ import { useStaticInfo } from "../../../../hooks/useStaticInfo";
5
4
 
6
5
  interface PaymentInstrumentProps {
7
6
  readonly useRedirect: () => Record<string, string>;
8
7
  }
9
8
  const PaymentInstrument: FC<PaymentInstrumentProps> = ({ useRedirect }) => {
10
- const paymentInstrumentSelectRef = useRef(null);
11
9
  const { returnUrl } = useRedirect();
12
- const logger = useLogger();
13
-
14
- usePaymentInstrumentEvents({ logger });
10
+ const { customer } = useStaticInfo();
15
11
 
16
12
  return (
17
13
  <PaymentInstrumentSelect
18
- ref={paymentInstrumentSelectRef}
19
14
  beforeRedirect={returnUrl ? () => Promise.resolve(returnUrl) : undefined}
20
15
  hasError={false}
21
16
  section={Section.BOX_CHECKOUT}
17
+ userInformation={{
18
+ email: customer.email,
19
+ name: customer.name,
20
+ }}
21
+ showSingleUsePaymentMethods
22
22
  />
23
23
  );
24
24
  };
@@ -5,6 +5,8 @@ interface Customer {
5
5
  readonly customerId: string;
6
6
  readonly country: Country;
7
7
  readonly segment: Segment;
8
+ readonly name: string;
9
+ readonly email: string;
8
10
  }
9
11
 
10
12
  export type { Customer };
@@ -1,9 +0,0 @@
1
- import { FC, ReactNode } from "react";
2
- import { QueryBus } from "@lookiero/messaging";
3
- interface QueryBusProviderProps {
4
- readonly children: ReactNode;
5
- readonly queryBus: QueryBus;
6
- }
7
- declare const QueryBusProvider: FC<QueryBusProviderProps>;
8
- declare const useQueryBus: () => QueryBus;
9
- export { useQueryBus, QueryBusProvider };