@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.
package/dist/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.js
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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 = ({
|
|
2
|
-
const response = await httpGet({
|
|
3
|
-
|
|
4
|
-
|
|
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 };
|