@lookiero/checkout 0.2.27-beta.4 → 0.2.27-beta.5

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.
@@ -1,10 +1,20 @@
1
- import { toCheckoutProjection } from "./checkout";
2
- const httpFirstAvailableCheckoutByCustomerIdView = ({ httpPost }) => async ({ customerId, signal }) => {
3
- const response = await httpPost({
4
- endpoint: "/view-first-available-checkout-by-customer-id",
5
- body: { customer_id: customerId },
6
- signal,
1
+ import { CheckoutItemStatus } from "../../../domain/checkoutItem/model/checkoutItem";
2
+ import { startedCheckoutWithStatusProjection } from "./checkout.mock";
3
+ const httpFirstAvailableCheckoutByCustomerIdView = ({}) => async ({}) => {
4
+ return startedCheckoutWithStatusProjection({
5
+ status: [
6
+ CheckoutItemStatus.INITIAL,
7
+ CheckoutItemStatus.INITIAL,
8
+ CheckoutItemStatus.INITIAL,
9
+ CheckoutItemStatus.INITIAL,
10
+ CheckoutItemStatus.INITIAL,
11
+ ],
7
12
  });
8
- return !response.ok || response.status === 404 ? undefined : toCheckoutProjection((await response.json()).result);
13
+ // const response = await httpPost({
14
+ // endpoint: "/view-first-available-checkout-by-customer-id",
15
+ // body: { customer_id: customerId },
16
+ // signal,
17
+ // });
18
+ // return !response.ok || response.status === 404 ? undefined : toCheckoutProjection((await response.json()).result);
9
19
  };
10
20
  export { httpFirstAvailableCheckoutByCustomerIdView };
@@ -1,8 +1,9 @@
1
- const httpIsCheckoutEnabledByCustomerIdView = ({ httpGet }) => async ({ customerId, signal }) => {
2
- const response = await httpGet({
3
- endpoint: `/is-new-checkout-enabled/${customerId}`,
4
- signal,
5
- });
6
- return !response.ok ? false : await response.json();
1
+ const httpIsCheckoutEnabledByCustomerIdView = ({}) => async ({}) => {
2
+ // const response = await httpGet({
3
+ // endpoint: `/is-new-checkout-enabled/${customerId}`,
4
+ // signal,
5
+ // });
6
+ // return !response.ok ? false : await response.json();
7
+ return true;
7
8
  };
8
9
  export { httpIsCheckoutEnabledByCustomerIdView };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "0.2.27-beta.4",
3
+ "version": "0.2.27-beta.5",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [