@lookiero/checkout 7.0.1 → 7.1.0

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 (41) hide show
  1. package/dist/src/infrastructure/delivery/bootstrap.js +5 -2
  2. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +2 -0
  3. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +4 -0
  4. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +2 -0
  5. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +2 -0
  6. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +2 -0
  7. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +2 -0
  8. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +2 -0
  9. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +2 -0
  10. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +2 -0
  11. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +6 -0
  12. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +2 -0
  13. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +2 -0
  14. package/dist/src/version.d.ts +1 -1
  15. package/dist/src/version.js +1 -1
  16. package/package.json +2 -2
  17. package/src/infrastructure/delivery/bootstrap.ts +8 -2
  18. package/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.ts +2 -0
  19. package/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.test.ts +1 -1
  20. package/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.ts +4 -0
  21. package/src/infrastructure/projection/checkout/httpCheckoutByIdView.test.ts +1 -1
  22. package/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.ts +2 -0
  23. package/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.test.ts +1 -1
  24. package/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.ts +2 -0
  25. package/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.test.ts +1 -1
  26. package/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.ts +2 -0
  27. package/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.test.ts +1 -1
  28. package/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.ts +2 -0
  29. package/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.test.ts +1 -1
  30. package/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.ts +2 -0
  31. package/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.test.ts +1 -1
  32. package/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.ts +2 -0
  33. package/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.test.ts +1 -1
  34. package/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.ts +2 -0
  35. package/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.test.ts +1 -1
  36. package/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.ts +6 -0
  37. package/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.test.ts +1 -1
  38. package/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.ts +2 -0
  39. package/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.test.ts +1 -1
  40. package/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.ts +2 -0
  41. package/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.test.ts +1 -1
@@ -1,4 +1,6 @@
1
+ import { Platform } from "react-native";
1
2
  import { fetchHttpGet, fetchHttpPost } from "@lookiero/sty-psp-http";
3
+ import { VERSION } from "../../version";
2
4
  import { getCheckout, saveCheckout } from "../domain/checkout/model/httpCheckouts";
3
5
  import { getCheckoutBooking, saveCheckoutBooking } from "../domain/checkoutBooking/model/httpCheckoutBookings";
4
6
  import { getCheckoutFeedback, saveCheckoutFeedback } from "../domain/checkoutFeedback/model/httpCheckoutFeedbacks";
@@ -19,9 +21,10 @@ import { httpPricingByCheckoutIdView } from "../projection/pricing/httpPricingBy
19
21
  import { httpReturnQuestionsByCheckoutItemIdView } from "../projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView";
20
22
  import { storageUiSettingByKeyView } from "../projection/uiSetting/storageUiSettingByKeyView";
21
23
  import { baseBootstrap } from "./baseBootstrap";
24
+ const device = Platform.OS;
22
25
  const bootstrap = ({ apiUrl, getAuthToken }) => {
23
- const httpGet = fetchHttpGet({ apiUrl, getAuthToken });
24
- const httpPost = fetchHttpPost({ apiUrl, getAuthToken });
26
+ const httpGet = fetchHttpGet({ apiUrl, getAuthToken, device, version: VERSION });
27
+ const httpPost = fetchHttpPost({ apiUrl, getAuthToken, device, version: VERSION });
25
28
  return baseBootstrap({
26
29
  checkoutByIdView: httpCheckoutByIdView({ httpPost }),
27
30
  firstAvailableCheckoutByCustomerIdView: httpFirstAvailableCheckoutByCustomerIdView({ httpPost }),
@@ -35,6 +35,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewBookedProductVariantsForCheckoutItem API", (
35
35
  const httpPost = fetchHttpPost({
36
36
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
37
37
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
38
+ device: "web",
39
+ version: "1.0.0",
38
40
  });
39
41
  const response = await httpBookedProductsVariantsForCheckoutItemView({ httpPost })({
40
42
  checkoutItemId,
@@ -73,6 +73,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewCheckoutById API", () => {
73
73
  const httpPost = fetchHttpPost({
74
74
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
75
75
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
76
+ device: "web",
77
+ version: "1.0.0",
76
78
  });
77
79
  const response = await httpCheckoutByIdView({ httpPost })({ checkoutId, signal: undefined });
78
80
  expect(response).toStrictEqual(checkoutResponseWithReplacedFor.result);
@@ -97,6 +99,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewCheckoutById API", () => {
97
99
  const httpPost = fetchHttpPost({
98
100
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
99
101
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
102
+ device: "web",
103
+ version: "1.0.0",
100
104
  });
101
105
  const response = await httpCheckoutByIdView({ httpPost })({ checkoutId, signal: undefined });
102
106
  expect(response).toStrictEqual(checkoutResponseWithoutReplacedFor.result);
@@ -36,6 +36,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewFirstAvailableCheckoutByCustomerId API", ()
36
36
  const httpPost = fetchHttpPost({
37
37
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
38
38
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
39
+ device: "web",
40
+ version: "1.0.0",
39
41
  });
40
42
  const response = await httpFirstAvailableCheckoutByCustomerIdView({ httpPost })({
41
43
  customerId,
@@ -31,6 +31,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewFiveItemsDiscountByCustomerId API", () => {
31
31
  const httpGet = fetchHttpGet({
32
32
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
33
33
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
34
+ device: "web",
35
+ version: "1.0.0",
34
36
  });
35
37
  const response = await httpFiveItemsDiscountByCustomerIdView({ httpGet })({
36
38
  customerId,
@@ -31,6 +31,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewIsCheckoutEnabledByCustomerId API", () => {
31
31
  const httpGet = fetchHttpGet({
32
32
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
33
33
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
34
+ device: "web",
35
+ version: "1.0.0",
34
36
  });
35
37
  const response = await httpIsCheckoutEnabledByCustomerIdView({ httpGet })({
36
38
  customerId,
@@ -31,6 +31,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewIsSizeChangeEnabledByCheckoutId API", () =>
31
31
  const httpGet = fetchHttpGet({
32
32
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
33
33
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
34
+ device: "web",
35
+ version: "1.0.0",
34
36
  });
35
37
  const response = await httpIsSizeChangeEnabledByCheckoutIdView({ httpGet })({
36
38
  checkoutId,
@@ -36,6 +36,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewCheckoutBookingById API", () => {
36
36
  const httpPost = fetchHttpPost({
37
37
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
38
38
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
39
+ device: "web",
40
+ version: "1.0.0",
39
41
  });
40
42
  const response = await httpCheckoutBookingByIdView({ httpPost })({
41
43
  checkoutBookingId,
@@ -37,6 +37,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewCheckoutItemById API", () => {
37
37
  const httpPost = fetchHttpPost({
38
38
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
39
39
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
40
+ device: "web",
41
+ version: "1.0.0",
40
42
  });
41
43
  const response = await httpCheckoutItemByIdView({ httpPost })({
42
44
  checkoutItemId,
@@ -35,6 +35,8 @@ describe("STY-BOX_CHECKOUT-BACK_ListCheckoutQuestionsByCheckoutId API", () => {
35
35
  const httpPost = fetchHttpPost({
36
36
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
37
37
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
38
+ device: "web",
39
+ version: "1.0.0",
38
40
  });
39
41
  const response = await httpCheckoutQuestionsByCheckoutIdView({ httpPost })({
40
42
  checkoutId,
@@ -47,6 +47,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewPaymentFlowPayloadByCheckoutId API", () => {
47
47
  const httpPost = fetchHttpPost({
48
48
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
49
49
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
50
+ device: "web",
51
+ version: "1.0.0",
50
52
  });
51
53
  const response = await httpPaymentFlowPayloadByCheckoutIdView({ httpPost })({ checkoutId, signal: undefined });
52
54
  expect(response).toStrictEqual(paymentFlowPayloadForKeptItemsResponse.result);
@@ -71,6 +73,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewPaymentFlowPayloadByCheckoutId API", () => {
71
73
  const httpPost = fetchHttpPost({
72
74
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
73
75
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
76
+ device: "web",
77
+ version: "1.0.0",
74
78
  });
75
79
  const response = await httpPaymentFlowPayloadByCheckoutIdView({ httpPost })({ checkoutId, signal: undefined });
76
80
  expect(response).toStrictEqual(paymentFlowPayloadForReturnedItemsResponse.result);
@@ -95,6 +99,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewPaymentFlowPayloadByCheckoutId API", () => {
95
99
  const httpPost = fetchHttpPost({
96
100
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
97
101
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
102
+ device: "web",
103
+ version: "1.0.0",
98
104
  });
99
105
  const response = await httpPaymentFlowPayloadByCheckoutIdView({ httpPost })({ checkoutId, signal: undefined });
100
106
  expect(response).toStrictEqual(paymentFlowPayloadForReplacedItemsResponse.result);
@@ -35,6 +35,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewPricingByCheckoutId API", () => {
35
35
  const httpPost = fetchHttpPost({
36
36
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
37
37
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
38
+ device: "web",
39
+ version: "1.0.0",
38
40
  });
39
41
  const response = await httpPricingByCheckoutIdView({ httpPost })({
40
42
  checkoutId,
@@ -35,6 +35,8 @@ describe("STY-BOX_CHECKOUT-BACK_ListReturnQuestionsByCheckoutItemId API", () =>
35
35
  const httpPost = fetchHttpPost({
36
36
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
37
37
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
38
+ device: "web",
39
+ version: "1.0.0",
38
40
  });
39
41
  const response = await httpReturnQuestionsByCheckoutItemIdView({ httpPost })({
40
42
  checkoutItemId,
@@ -1 +1 @@
1
- export declare const VERSION = "7.0.1";
1
+ export declare const VERSION = "7.1.0";
@@ -1 +1 @@
1
- export const VERSION = "7.0.1";
1
+ export const VERSION = "7.1.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "7.0.1",
3
+ "version": "7.1.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": "false",
@@ -17,7 +17,7 @@
17
17
  "@lookiero/messaging-react": "^8.1.1",
18
18
  "@lookiero/sty-psp-ab-testing": "^0.2.2",
19
19
  "@lookiero/sty-psp-expo-config": "^0.1.0",
20
- "@lookiero/sty-psp-http": "^0.1.4",
20
+ "@lookiero/sty-psp-http": "^2.0.0",
21
21
  "@lookiero/sty-psp-i18n": "^0.1.7",
22
22
  "@lookiero/sty-psp-locale": "^0.2.1",
23
23
  "@lookiero/sty-psp-logging": "^0.2.2",
@@ -1,5 +1,7 @@
1
+ import { Platform } from "react-native";
1
2
  import { BuildBootstrapFunctionReturn } from "@lookiero/messaging-react";
2
3
  import { fetchHttpGet, fetchHttpPost } from "@lookiero/sty-psp-http";
4
+ import { VERSION } from "../../version";
3
5
  import { getCheckout, saveCheckout } from "../domain/checkout/model/httpCheckouts";
4
6
  import { getCheckoutBooking, saveCheckoutBooking } from "../domain/checkoutBooking/model/httpCheckoutBookings";
5
7
  import { getCheckoutFeedback, saveCheckoutFeedback } from "../domain/checkoutFeedback/model/httpCheckoutFeedbacks";
@@ -21,6 +23,10 @@ import { httpReturnQuestionsByCheckoutItemIdView } from "../projection/returnQue
21
23
  import { storageUiSettingByKeyView } from "../projection/uiSetting/storageUiSettingByKeyView";
22
24
  import { baseBootstrap } from "./baseBootstrap";
23
25
 
26
+ type OS = typeof Platform.OS;
27
+ type Device = Exclude<OS, "macos" | "windows">;
28
+ const device = Platform.OS as Device;
29
+
24
30
  interface BootstrapFunctionArgs {
25
31
  readonly getAuthToken: () => Promise<string>;
26
32
  readonly apiUrl: () => string;
@@ -31,8 +37,8 @@ interface BootstrapFunction {
31
37
  }
32
38
 
33
39
  const bootstrap: BootstrapFunction = ({ apiUrl, getAuthToken }) => {
34
- const httpGet = fetchHttpGet({ apiUrl, getAuthToken });
35
- const httpPost = fetchHttpPost({ apiUrl, getAuthToken });
40
+ const httpGet = fetchHttpGet({ apiUrl, getAuthToken, device, version: VERSION });
41
+ const httpPost = fetchHttpPost({ apiUrl, getAuthToken, device, version: VERSION });
36
42
 
37
43
  return baseBootstrap({
38
44
  checkoutByIdView: httpCheckoutByIdView({ httpPost }),
@@ -47,6 +47,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewBookedProductVariantsForCheckoutItem API", (
47
47
  const httpPost = fetchHttpPost({
48
48
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
49
49
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
50
+ device: "web",
51
+ version: "1.0.0",
50
52
  });
51
53
 
52
54
  const response = await httpBookedProductsVariantsForCheckoutItemView({ httpPost })({
@@ -8,7 +8,7 @@ const fetchMock = jest.fn();
8
8
  global.fetch = fetchMock;
9
9
  const apiUrl = "/api";
10
10
  const getAuthToken = () => Promise.resolve("token");
11
- const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken }) });
11
+ const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken, device: "web", version: "1.0.0" }) });
12
12
  const signal = mock<AbortSignal>();
13
13
 
14
14
  const checkoutItemId = "6f720954-8039-4bed-9596-34fc5a02131b";
@@ -86,6 +86,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewCheckoutById API", () => {
86
86
  const httpPost = fetchHttpPost({
87
87
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
88
88
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
89
+ device: "web",
90
+ version: "1.0.0",
89
91
  });
90
92
 
91
93
  const response = await httpCheckoutByIdView({ httpPost })({ checkoutId, signal: undefined });
@@ -114,6 +116,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewCheckoutById API", () => {
114
116
  const httpPost = fetchHttpPost({
115
117
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
116
118
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
119
+ device: "web",
120
+ version: "1.0.0",
117
121
  });
118
122
 
119
123
  const response = await httpCheckoutByIdView({ httpPost })({ checkoutId, signal: undefined });
@@ -9,7 +9,7 @@ const fetchMock = jest.fn();
9
9
  global.fetch = fetchMock;
10
10
  const apiUrl = "/api";
11
11
  const getAuthToken = () => Promise.resolve("token");
12
- const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken }) });
12
+ const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken, device: "web", version: "1.0.0" }) });
13
13
  const signal = mock<AbortSignal>();
14
14
 
15
15
  const checkoutId = "29790d24-b139-4ab8-b618-d796d101e974";
@@ -48,6 +48,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewFirstAvailableCheckoutByCustomerId API", ()
48
48
  const httpPost = fetchHttpPost({
49
49
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
50
50
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
51
+ device: "web",
52
+ version: "1.0.0",
51
53
  });
52
54
 
53
55
  const response = await httpFirstAvailableCheckoutByCustomerIdView({ httpPost })({
@@ -9,7 +9,7 @@ const fetchMock = jest.fn();
9
9
  global.fetch = fetchMock;
10
10
  const apiUrl = "/api";
11
11
  const getAuthToken = () => Promise.resolve("token");
12
- const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken }) });
12
+ const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken, device: "web", version: "1.0.0" }) });
13
13
  const signal = mock<AbortSignal>();
14
14
 
15
15
  const customerId = "29790d24-b139-4ab8-b618-d796d101e974";
@@ -42,6 +42,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewFiveItemsDiscountByCustomerId API", () => {
42
42
  const httpGet = fetchHttpGet({
43
43
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
44
44
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
45
+ device: "web",
46
+ version: "1.0.0",
45
47
  });
46
48
 
47
49
  const response = await httpFiveItemsDiscountByCustomerIdView({ httpGet })({
@@ -6,7 +6,7 @@ const fetchMock = jest.fn();
6
6
  global.fetch = fetchMock;
7
7
  const apiUrl = "/api";
8
8
  const getAuthToken = () => Promise.resolve("token");
9
- const view = sut({ httpGet: fetchHttpGet({ apiUrl: () => apiUrl, getAuthToken }) });
9
+ const view = sut({ httpGet: fetchHttpGet({ apiUrl: () => apiUrl, getAuthToken, device: "web", version: "1.0.0" }) });
10
10
  const signal = mock<AbortSignal>();
11
11
 
12
12
  const customerId = "29790d24-b139-4ab8-b618-d796d101e974";
@@ -42,6 +42,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewIsCheckoutEnabledByCustomerId API", () => {
42
42
  const httpGet = fetchHttpGet({
43
43
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
44
44
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
45
+ device: "web",
46
+ version: "1.0.0",
45
47
  });
46
48
 
47
49
  const response = await httpIsCheckoutEnabledByCustomerIdView({ httpGet })({
@@ -6,7 +6,7 @@ const fetchMock = jest.fn();
6
6
  global.fetch = fetchMock;
7
7
  const apiUrl = "/api";
8
8
  const getAuthToken = () => Promise.resolve("token");
9
- const view = sut({ httpGet: fetchHttpGet({ apiUrl: () => apiUrl, getAuthToken }) });
9
+ const view = sut({ httpGet: fetchHttpGet({ apiUrl: () => apiUrl, getAuthToken, device: "web", version: "1.0.0" }) });
10
10
  const signal = mock<AbortSignal>();
11
11
 
12
12
  const customerId = "29790d24-b139-4ab8-b618-d796d101e974";
@@ -42,6 +42,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewIsSizeChangeEnabledByCheckoutId API", () =>
42
42
  const httpGet = fetchHttpGet({
43
43
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
44
44
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
45
+ device: "web",
46
+ version: "1.0.0",
45
47
  });
46
48
 
47
49
  const response = await httpIsSizeChangeEnabledByCheckoutIdView({ httpGet })({
@@ -6,7 +6,7 @@ const fetchMock = jest.fn();
6
6
  global.fetch = fetchMock;
7
7
  const apiUrl = "/api";
8
8
  const getAuthToken = () => Promise.resolve("token");
9
- const view = sut({ httpGet: fetchHttpGet({ apiUrl: () => apiUrl, getAuthToken }) });
9
+ const view = sut({ httpGet: fetchHttpGet({ apiUrl: () => apiUrl, getAuthToken, device: "web", version: "1.0.0" }) });
10
10
  const signal = mock<AbortSignal>();
11
11
 
12
12
  const checkoutId = "29790d24-b139-4ab8-b618-d796d101e974";
@@ -48,6 +48,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewCheckoutBookingById API", () => {
48
48
  const httpPost = fetchHttpPost({
49
49
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
50
50
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
51
+ device: "web",
52
+ version: "1.0.0",
51
53
  });
52
54
 
53
55
  const response = await httpCheckoutBookingByIdView({ httpPost })({
@@ -8,7 +8,7 @@ const fetchMock = jest.fn();
8
8
  global.fetch = fetchMock;
9
9
  const apiUrl = "/api";
10
10
  const getAuthToken = () => Promise.resolve("token");
11
- const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken }) });
11
+ const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken, device: "web", version: "1.0.0" }) });
12
12
  const signal = mock<AbortSignal>();
13
13
 
14
14
  const checkoutBookingProjection = checkoutBookingMock;
@@ -49,6 +49,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewCheckoutItemById API", () => {
49
49
  const httpPost = fetchHttpPost({
50
50
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
51
51
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
52
+ device: "web",
53
+ version: "1.0.0",
52
54
  });
53
55
 
54
56
  const response = await httpCheckoutItemByIdView({ httpPost })({
@@ -9,7 +9,7 @@ const fetchMock = jest.fn();
9
9
  global.fetch = fetchMock;
10
10
  const apiUrl = "/api";
11
11
  const getAuthToken = () => Promise.resolve("token");
12
- const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken }) });
12
+ const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken, device: "web", version: "1.0.0" }) });
13
13
  const signal = mock<AbortSignal>();
14
14
 
15
15
  const checkoutItemId = "29790d24-b139-4ab8-b618-d796d101e974";
@@ -47,6 +47,8 @@ describe("STY-BOX_CHECKOUT-BACK_ListCheckoutQuestionsByCheckoutId API", () => {
47
47
  const httpPost = fetchHttpPost({
48
48
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
49
49
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
50
+ device: "web",
51
+ version: "1.0.0",
50
52
  });
51
53
 
52
54
  const response = await httpCheckoutQuestionsByCheckoutIdView({ httpPost })({
@@ -8,7 +8,7 @@ const fetchMock = jest.fn();
8
8
  global.fetch = fetchMock;
9
9
  const apiUrl = "/api";
10
10
  const getAuthToken = () => Promise.resolve("token");
11
- const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken }) });
11
+ const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken, device: "web", version: "1.0.0" }) });
12
12
  const signal = mock<AbortSignal>();
13
13
 
14
14
  const checkoutId = "29790d24-b139-4ab8-b618-d796d101e974";
@@ -64,6 +64,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewPaymentFlowPayloadByCheckoutId API", () => {
64
64
  const httpPost = fetchHttpPost({
65
65
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
66
66
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
67
+ device: "web",
68
+ version: "1.0.0",
67
69
  });
68
70
 
69
71
  const response = await httpPaymentFlowPayloadByCheckoutIdView({ httpPost })({ checkoutId, signal: undefined });
@@ -92,6 +94,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewPaymentFlowPayloadByCheckoutId API", () => {
92
94
  const httpPost = fetchHttpPost({
93
95
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
94
96
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
97
+ device: "web",
98
+ version: "1.0.0",
95
99
  });
96
100
 
97
101
  const response = await httpPaymentFlowPayloadByCheckoutIdView({ httpPost })({ checkoutId, signal: undefined });
@@ -120,6 +124,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewPaymentFlowPayloadByCheckoutId API", () => {
120
124
  const httpPost = fetchHttpPost({
121
125
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
122
126
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
127
+ device: "web",
128
+ version: "1.0.0",
123
129
  });
124
130
 
125
131
  const response = await httpPaymentFlowPayloadByCheckoutIdView({ httpPost })({ checkoutId, signal: undefined });
@@ -8,7 +8,7 @@ const fetchMock = jest.fn();
8
8
  global.fetch = fetchMock;
9
9
  const apiUrl = "/api";
10
10
  const getAuthToken = () => Promise.resolve("token");
11
- const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken }) });
11
+ const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken, device: "web", version: "1.0.0" }) });
12
12
  const signal = mock<AbortSignal>();
13
13
 
14
14
  const checkoutId = "29790d24-b139-4ab8-b618-d796d101e974";
@@ -47,6 +47,8 @@ describe("STY-BOX_CHECKOUT-BACK_ViewPricingByCheckoutId API", () => {
47
47
  const httpPost = fetchHttpPost({
48
48
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
49
49
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
50
+ device: "web",
51
+ version: "1.0.0",
50
52
  });
51
53
 
52
54
  const response = await httpPricingByCheckoutIdView({ httpPost })({
@@ -8,7 +8,7 @@ const fetchMock = jest.fn();
8
8
  global.fetch = fetchMock;
9
9
  const apiUrl = "/api";
10
10
  const getAuthToken = () => Promise.resolve("token");
11
- const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken }) });
11
+ const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken, device: "web", version: "1.0.0" }) });
12
12
  const signal = mock<AbortSignal>();
13
13
 
14
14
  const checkoutId = "29790d24-b139-4ab8-b618-d796d101e974";
@@ -47,6 +47,8 @@ describe("STY-BOX_CHECKOUT-BACK_ListReturnQuestionsByCheckoutItemId API", () =>
47
47
  const httpPost = fetchHttpPost({
48
48
  apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
49
49
  getAuthToken: () => Promise.resolve(AUTH_TOKEN),
50
+ device: "web",
51
+ version: "1.0.0",
50
52
  });
51
53
 
52
54
  const response = await httpReturnQuestionsByCheckoutItemIdView({ httpPost })({
@@ -8,7 +8,7 @@ const fetchMock = jest.fn();
8
8
  global.fetch = fetchMock;
9
9
  const apiUrl = "/api";
10
10
  const getAuthToken = () => Promise.resolve("token");
11
- const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken }) });
11
+ const view = sut({ httpPost: fetchHttpPost({ apiUrl: () => apiUrl, getAuthToken, device: "web", version: "1.0.0" }) });
12
12
  const signal = mock<AbortSignal>();
13
13
 
14
14
  const checkoutItemId = "29790d24-b139-4ab8-b618-d796d101e974";