@lookiero/checkout 0.2.48-beta.0 → 0.2.48
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/ui/Root.js +3 -1
- package/package.json +1 -1
- package/dist/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.d.ts +0 -15
- package/dist/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.js +0 -7
- package/dist/infrastructure/domain/checkoutBooking/react/useBookSizeReplaceableProductVariantsForCheckoutItem.d.ts +0 -15
- package/dist/infrastructure/domain/checkoutBooking/react/useBookSizeReplaceableProductVariantsForCheckoutItem.js +0 -14
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/bookedSizeReplaceableProductVariants.mock.d.ts +0 -3
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/bookedSizeReplaceableProductVariants.mock.js +0 -17
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/httpBookedSizeReplaceableProductVariantsForCheckoutItemView.d.ts +0 -34
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/httpBookedSizeReplaceableProductVariantsForCheckoutItemView.js +0 -26
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/react/useViewBookedSizeReplaceableProductVariantsForCheckoutItem.d.ts +0 -10
- package/dist/infrastructure/projection/bookedSizeReplaceableProductVariants/react/useViewBookedSizeReplaceableProductVariantsForCheckoutItem.js +0 -9
- package/dist/infrastructure/projection/checkoutItem/checkoutItem.d.ts +0 -45
- package/dist/infrastructure/projection/checkoutItem/checkoutItem.js +0 -40
- package/dist/infrastructure/projection/feedback/feedback.mock.d.ts +0 -3
- package/dist/infrastructure/projection/feedback/feedback.mock.js +0 -6
- package/dist/infrastructure/projection/returnQuestion/returnQuestion.d.ts +0 -14
- package/dist/infrastructure/projection/returnQuestion/returnQuestion.js +0 -9
- package/dist/projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem.d.ts +0 -33
- package/dist/projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem.js +0 -8
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React, { useCallback } from "react";
|
|
2
2
|
import { Platform } from "react-native";
|
|
3
3
|
import { Routing } from "./routing/Routing";
|
|
4
|
+
import { Router } from "./routing/router/Router";
|
|
4
5
|
const root = ({ Messaging, I18n, development }) =>
|
|
5
6
|
// eslint-disable-next-line react/display-name, react/prop-types
|
|
6
7
|
({ locale = "en", customerId, onNotAccessible }) => {
|
|
7
8
|
const handleOnI18nError = useCallback(() => void 0, []);
|
|
8
9
|
return (React.createElement(Messaging, { includeReactQueryDevTools: Platform.OS === "web" },
|
|
9
|
-
React.createElement(
|
|
10
|
+
React.createElement(Router, null,
|
|
11
|
+
React.createElement(Routing, { I18n: I18n, customerId: customerId, locale: locale, onI18nError: development ? undefined : handleOnI18nError, onNotAccessible: onNotAccessible }))));
|
|
10
12
|
};
|
|
11
13
|
export { root };
|
package/package.json
CHANGED
package/dist/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Command } from "@lookiero/messaging";
|
|
2
|
-
declare const BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM = "book_size_replaceable_product_variants_for_checkout_item";
|
|
3
|
-
interface BookSizeReplaceableProductVariantsForCheckoutItemPayload {
|
|
4
|
-
readonly aggregateId: string;
|
|
5
|
-
readonly checkoutId: string;
|
|
6
|
-
readonly checkoutItemId: string;
|
|
7
|
-
}
|
|
8
|
-
interface BookSizeReplaceableProductVariantsForCheckoutItem extends Command<typeof BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM>, BookSizeReplaceableProductVariantsForCheckoutItemPayload {
|
|
9
|
-
}
|
|
10
|
-
interface BookSizeReplaceableProductVariantsForCheckoutItemFunction {
|
|
11
|
-
(payload: BookSizeReplaceableProductVariantsForCheckoutItemPayload): BookSizeReplaceableProductVariantsForCheckoutItem;
|
|
12
|
-
}
|
|
13
|
-
declare const bookSizeReplaceableProductVariantsForCheckoutItem: BookSizeReplaceableProductVariantsForCheckoutItemFunction;
|
|
14
|
-
export type { BookSizeReplaceableProductVariantsForCheckoutItem };
|
|
15
|
-
export { BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM, bookSizeReplaceableProductVariantsForCheckoutItem };
|
package/dist/domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { command } from "@lookiero/messaging";
|
|
2
|
-
const BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM = "book_size_replaceable_product_variants_for_checkout_item";
|
|
3
|
-
const bookSizeReplaceableProductVariantsForCheckoutItem = ({ aggregateId, ...payload }) => ({
|
|
4
|
-
...command({ aggregateId, name: BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM }),
|
|
5
|
-
...payload,
|
|
6
|
-
});
|
|
7
|
-
export { BOOK_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM, bookSizeReplaceableProductVariantsForCheckoutItem };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CommandStatus } from "@lookiero/messaging-react";
|
|
2
|
-
interface BookFunction {
|
|
3
|
-
(): Promise<void>;
|
|
4
|
-
}
|
|
5
|
-
declare type UseBookSizeReplaceableProductVariantsForCheckoutItem = [book: BookFunction, status: CommandStatus];
|
|
6
|
-
interface UseBookSizeReplaceableProductVariantsForCheckoutItemFunctionArgs {
|
|
7
|
-
readonly checkoutId: string;
|
|
8
|
-
readonly checkoutItemId: string;
|
|
9
|
-
readonly checkoutBookingId: string;
|
|
10
|
-
}
|
|
11
|
-
interface UseBookSizeReplaceableProductVariantsForCheckoutItemFunction {
|
|
12
|
-
(args: UseBookSizeReplaceableProductVariantsForCheckoutItemFunctionArgs): UseBookSizeReplaceableProductVariantsForCheckoutItem;
|
|
13
|
-
}
|
|
14
|
-
declare const useBookSizeReplaceableProductVariantsForCheckoutItem: UseBookSizeReplaceableProductVariantsForCheckoutItemFunction;
|
|
15
|
-
export { useBookSizeReplaceableProductVariantsForCheckoutItem };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { useCommand } from "@lookiero/messaging-react";
|
|
2
|
-
import { useCallback } from "react";
|
|
3
|
-
import { v4 as uuid } from "uuid";
|
|
4
|
-
import { bookSizeReplaceableProductVariantsForCheckoutItem } from "../../../../domain/checkoutBooking/command/bookSizeReplaceableProductVariantsForCheckoutItem";
|
|
5
|
-
const useBookSizeReplaceableProductVariantsForCheckoutItem = ({ checkoutId, checkoutItemId, checkoutBookingId }) => {
|
|
6
|
-
const [commandBus, status] = useCommand();
|
|
7
|
-
const book = useCallback(async () => await commandBus(bookSizeReplaceableProductVariantsForCheckoutItem({
|
|
8
|
-
aggregateId: checkoutBookingId || uuid(),
|
|
9
|
-
checkoutId,
|
|
10
|
-
checkoutItemId,
|
|
11
|
-
})), [checkoutBookingId, checkoutId, checkoutItemId, commandBus]);
|
|
12
|
-
return [book, status];
|
|
13
|
-
};
|
|
14
|
-
export { useBookSizeReplaceableProductVariantsForCheckoutItem };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { BookedSizeReplaceableProductVariantsProjection } from "../../../projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem";
|
|
2
|
-
declare const bookedSizeReplaceableProductVariants: BookedSizeReplaceableProductVariantsProjection;
|
|
3
|
-
export { bookedSizeReplaceableProductVariants };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
const bookedSizeReplaceableProductVariants = {
|
|
2
|
-
booking: "b00e2c2d-7d9c-4808-88a4-e1c845ae6889",
|
|
3
|
-
productVariants: [
|
|
4
|
-
{
|
|
5
|
-
id: "383fab95-56eb-4639-bb18-530ab792b4d3",
|
|
6
|
-
size: {
|
|
7
|
-
id: "4f8a26b8-8d2d-4012-b49a-7d2820095598",
|
|
8
|
-
europe: "S",
|
|
9
|
-
lookiero: "S",
|
|
10
|
-
uk: "S",
|
|
11
|
-
it: "S",
|
|
12
|
-
unique: false,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
};
|
|
17
|
-
export { bookedSizeReplaceableProductVariants };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { BookedSizeReplaceableProductVariantsForCheckoutItemView, BookedSizeReplaceableProductVariantsProjection } from "../../../projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem";
|
|
2
|
-
import { HttpPostFunction } from "../../delivery/http/httpClient";
|
|
3
|
-
interface SizeDto {
|
|
4
|
-
readonly id: string;
|
|
5
|
-
readonly lookiero: string;
|
|
6
|
-
readonly uk: string;
|
|
7
|
-
readonly it: string;
|
|
8
|
-
readonly europe: string;
|
|
9
|
-
readonly unique: boolean;
|
|
10
|
-
readonly visual_order?: number;
|
|
11
|
-
}
|
|
12
|
-
interface ProductVariantDto {
|
|
13
|
-
readonly id: string;
|
|
14
|
-
readonly size: SizeDto;
|
|
15
|
-
}
|
|
16
|
-
interface BookedSizeReplaceableProductVariantsDto {
|
|
17
|
-
readonly booking: string | null;
|
|
18
|
-
readonly product_variants: ProductVariantDto[];
|
|
19
|
-
}
|
|
20
|
-
interface ToBookedSizeReplaceableProductVariantsFunction {
|
|
21
|
-
(bookedSizeReplaceableProductVariants: BookedSizeReplaceableProductVariantsDto): BookedSizeReplaceableProductVariantsProjection;
|
|
22
|
-
}
|
|
23
|
-
declare const toBookedSizeReplaceableProductVariants: ToBookedSizeReplaceableProductVariantsFunction;
|
|
24
|
-
interface HttpBookedSizeReplaceableProductVariantsForCheckoutItemView extends BookedSizeReplaceableProductVariantsForCheckoutItemView {
|
|
25
|
-
}
|
|
26
|
-
interface HttpBookedSizeReplaceableProductVariantsForCheckoutItemViewFunctionArgs {
|
|
27
|
-
readonly httpPost: HttpPostFunction;
|
|
28
|
-
}
|
|
29
|
-
interface HttpBookedSizeReplaceableProductVariantsForCheckoutItemViewFunction {
|
|
30
|
-
(args: HttpBookedSizeReplaceableProductVariantsForCheckoutItemViewFunctionArgs): HttpBookedSizeReplaceableProductVariantsForCheckoutItemView;
|
|
31
|
-
}
|
|
32
|
-
declare const httpBookedSizeReplaceableProductVariantsForCheckoutItemView: HttpBookedSizeReplaceableProductVariantsForCheckoutItemViewFunction;
|
|
33
|
-
export type { BookedSizeReplaceableProductVariantsDto };
|
|
34
|
-
export { toBookedSizeReplaceableProductVariants, httpBookedSizeReplaceableProductVariantsForCheckoutItemView };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const toSize = (size) => ({
|
|
2
|
-
id: size.id,
|
|
3
|
-
lookiero: size.lookiero,
|
|
4
|
-
uk: size.uk,
|
|
5
|
-
it: size.it,
|
|
6
|
-
europe: size.europe,
|
|
7
|
-
unique: size.unique,
|
|
8
|
-
visualOrder: size.visual_order,
|
|
9
|
-
});
|
|
10
|
-
const toProductVariant = (productVariant) => ({
|
|
11
|
-
id: productVariant.id,
|
|
12
|
-
size: toSize(productVariant.size),
|
|
13
|
-
});
|
|
14
|
-
const toBookedSizeReplaceableProductVariants = (bookedSizeReplaceableProductVariants) => ({
|
|
15
|
-
booking: bookedSizeReplaceableProductVariants.booking,
|
|
16
|
-
productVariants: bookedSizeReplaceableProductVariants.product_variants.map(toProductVariant),
|
|
17
|
-
});
|
|
18
|
-
const httpBookedSizeReplaceableProductVariantsForCheckoutItemView = ({ httpPost }) => async ({ checkoutItemId, signal }) => {
|
|
19
|
-
const response = await httpPost({
|
|
20
|
-
endpoint: "/view-booked-size-replaceable-product-variants-for-checkout-item",
|
|
21
|
-
body: { checkout_item_id: checkoutItemId },
|
|
22
|
-
signal,
|
|
23
|
-
});
|
|
24
|
-
return response.status === 404 ? null : toBookedSizeReplaceableProductVariants((await response.json()).result);
|
|
25
|
-
};
|
|
26
|
-
export { toBookedSizeReplaceableProductVariants, httpBookedSizeReplaceableProductVariantsForCheckoutItemView };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { UseQueryFunctionResult } from "@lookiero/messaging-react";
|
|
2
|
-
import { BookedSizeReplaceableProductVariantsProjection } from "../../../../projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem";
|
|
3
|
-
interface UseViewBookedSizeReplaceableProductVariantsForCheckoutItemFunctionArgs {
|
|
4
|
-
readonly checkoutItemId: string;
|
|
5
|
-
}
|
|
6
|
-
interface UseViewBookedSizeReplaceableProductVariantsForCheckoutItemFunction {
|
|
7
|
-
(args: UseViewBookedSizeReplaceableProductVariantsForCheckoutItemFunctionArgs): UseQueryFunctionResult<BookedSizeReplaceableProductVariantsProjection>;
|
|
8
|
-
}
|
|
9
|
-
declare const useViewBookedSizeReplaceableProductVariantsForCheckoutItem: UseViewBookedSizeReplaceableProductVariantsForCheckoutItemFunction;
|
|
10
|
-
export { useViewBookedSizeReplaceableProductVariantsForCheckoutItem };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { useQuery } from "@lookiero/messaging-react";
|
|
2
|
-
import { viewBookedSizeReplaceableProductVariantsForCheckoutItem, } from "../../../../projection/bookedSizeReplaceableProductVariants/viewBookedSizeReplaceableProductVariantsForCheckoutItem";
|
|
3
|
-
import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
4
|
-
const useViewBookedSizeReplaceableProductVariantsForCheckoutItem = ({ checkoutItemId }) => useQuery({
|
|
5
|
-
query: viewBookedSizeReplaceableProductVariantsForCheckoutItem({ checkoutItemId }),
|
|
6
|
-
contextId: MESSAGING_CONTEXT_ID,
|
|
7
|
-
options: { staleTime: Infinity },
|
|
8
|
-
});
|
|
9
|
-
export { useViewBookedSizeReplaceableProductVariantsForCheckoutItem };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { CheckoutItemStatus } from "../../../domain/checkoutItem/model/checkoutItem";
|
|
2
|
-
import { CheckoutItemProjection, Currency, MediaPerspective } from "../../../projection/checkoutItem/checkoutItem";
|
|
3
|
-
interface CheckoutItemDto {
|
|
4
|
-
readonly id: string;
|
|
5
|
-
readonly status: CheckoutItemStatus;
|
|
6
|
-
readonly price: {
|
|
7
|
-
readonly amount: number;
|
|
8
|
-
readonly currency: Currency;
|
|
9
|
-
readonly discounted_price?: {
|
|
10
|
-
readonly amount: number;
|
|
11
|
-
readonly percentage: number;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
readonly replaced_for?: string;
|
|
15
|
-
readonly feedback: Record<string, string>;
|
|
16
|
-
readonly product_variant: {
|
|
17
|
-
readonly id: string;
|
|
18
|
-
readonly media: {
|
|
19
|
-
readonly id: string;
|
|
20
|
-
readonly url: string;
|
|
21
|
-
readonly perspective: MediaPerspective;
|
|
22
|
-
}[];
|
|
23
|
-
readonly brand: string;
|
|
24
|
-
readonly name: string;
|
|
25
|
-
readonly size: {
|
|
26
|
-
readonly id: string;
|
|
27
|
-
readonly lookiero: string;
|
|
28
|
-
readonly uk: string;
|
|
29
|
-
readonly it: string;
|
|
30
|
-
readonly europe: string;
|
|
31
|
-
readonly unique: boolean;
|
|
32
|
-
readonly visual_order?: number;
|
|
33
|
-
};
|
|
34
|
-
readonly color: {
|
|
35
|
-
readonly id: string;
|
|
36
|
-
readonly label: string;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
interface ToCheckoutItemProjectionFunction {
|
|
41
|
-
(checkoutItemDto: CheckoutItemDto): CheckoutItemProjection;
|
|
42
|
-
}
|
|
43
|
-
declare const toCheckoutItemProjection: ToCheckoutItemProjectionFunction;
|
|
44
|
-
export type { CheckoutItemDto };
|
|
45
|
-
export { toCheckoutItemProjection };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
const toCheckoutItemProjection = (checkoutItemDto) => ({
|
|
2
|
-
id: checkoutItemDto.id,
|
|
3
|
-
status: checkoutItemDto.status,
|
|
4
|
-
price: {
|
|
5
|
-
amount: checkoutItemDto.price.amount,
|
|
6
|
-
currency: checkoutItemDto.price.currency,
|
|
7
|
-
discountedPrice: checkoutItemDto.price.discounted_price
|
|
8
|
-
? {
|
|
9
|
-
amount: checkoutItemDto.price.discounted_price.amount,
|
|
10
|
-
percentage: checkoutItemDto.price.discounted_price.percentage,
|
|
11
|
-
}
|
|
12
|
-
: undefined,
|
|
13
|
-
},
|
|
14
|
-
replacedFor: checkoutItemDto.replaced_for,
|
|
15
|
-
feedback: checkoutItemDto.feedback,
|
|
16
|
-
productVariant: {
|
|
17
|
-
id: checkoutItemDto.product_variant.id,
|
|
18
|
-
media: checkoutItemDto.product_variant.media.map((media) => ({
|
|
19
|
-
id: media.id,
|
|
20
|
-
url: media.url,
|
|
21
|
-
perspective: media.perspective,
|
|
22
|
-
})),
|
|
23
|
-
brand: checkoutItemDto.product_variant.brand,
|
|
24
|
-
name: checkoutItemDto.product_variant.name,
|
|
25
|
-
size: {
|
|
26
|
-
id: checkoutItemDto.product_variant.size.id,
|
|
27
|
-
lookiero: checkoutItemDto.product_variant.size.lookiero,
|
|
28
|
-
uk: checkoutItemDto.product_variant.size.uk,
|
|
29
|
-
it: checkoutItemDto.product_variant.size.it,
|
|
30
|
-
europe: checkoutItemDto.product_variant.size.europe,
|
|
31
|
-
unique: checkoutItemDto.product_variant.size.unique,
|
|
32
|
-
visualOrder: checkoutItemDto.product_variant.size.visual_order,
|
|
33
|
-
},
|
|
34
|
-
color: {
|
|
35
|
-
id: checkoutItemDto.product_variant.color.id,
|
|
36
|
-
label: checkoutItemDto.product_variant.color.label,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
export { toCheckoutItemProjection };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
const feedback = {
|
|
2
|
-
["0ad1dba8-b02c-4121-a1e3-981f1c30800d"]: "9251dc2c-d76a-484d-9299-346929af932f",
|
|
3
|
-
["542c4d24-e1da-484f-8c3a-7d89ee135adc"]: "68c0bb98-b00a-4b86-af43-528fe903cb69",
|
|
4
|
-
["1123a37d-bc00-43a4-9d28-cee1dfaf356c"]: "Free text comment",
|
|
5
|
-
};
|
|
6
|
-
export { feedback };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ReturnQuestionProjection, ReturnQuestionType } from "../../../projection/returnQuestion/returnQuestion";
|
|
2
|
-
interface ReturnQuestionDto {
|
|
3
|
-
readonly id: string;
|
|
4
|
-
readonly name: string;
|
|
5
|
-
readonly placeholder?: string;
|
|
6
|
-
readonly type: ReturnQuestionType;
|
|
7
|
-
readonly children?: ReturnQuestionDto[];
|
|
8
|
-
}
|
|
9
|
-
interface ToReturnQuestionsProjectionFunction {
|
|
10
|
-
(returnQuestionsDto: ReturnQuestionDto[]): ReturnQuestionProjection[];
|
|
11
|
-
}
|
|
12
|
-
declare const toReturnQuestionsProjection: ToReturnQuestionsProjectionFunction;
|
|
13
|
-
export type { ReturnQuestionDto };
|
|
14
|
-
export { toReturnQuestionsProjection };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const toReturnQuestionProjection = (returnQuestionDto) => ({
|
|
2
|
-
id: returnQuestionDto.id,
|
|
3
|
-
name: returnQuestionDto.name,
|
|
4
|
-
placeholder: returnQuestionDto.placeholder,
|
|
5
|
-
type: returnQuestionDto.type,
|
|
6
|
-
children: returnQuestionDto.children ? toReturnQuestionsProjection(returnQuestionDto.children) : undefined,
|
|
7
|
-
});
|
|
8
|
-
const toReturnQuestionsProjection = (returnQuestionsDto) => returnQuestionsDto.map(toReturnQuestionProjection);
|
|
9
|
-
export { toReturnQuestionsProjection };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { CancelableQueryViewArgs, Query, QueryHandlerFunction, QueryHandlerFunctionArgs } from "@lookiero/messaging";
|
|
2
|
-
import { SizeProjection } from "../shared/size";
|
|
3
|
-
interface ProductVariant {
|
|
4
|
-
readonly id: string;
|
|
5
|
-
readonly size: SizeProjection;
|
|
6
|
-
}
|
|
7
|
-
interface BookedSizeReplaceableProductVariantsProjection {
|
|
8
|
-
readonly booking: string | null;
|
|
9
|
-
readonly productVariants: ProductVariant[];
|
|
10
|
-
}
|
|
11
|
-
declare const VIEW_BOOKED_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM = "view_booked_size_replaceable_product_variants_for_checkout_item";
|
|
12
|
-
interface ViewBookedSizeReplaceableProductVariantsForCheckoutItemPayload {
|
|
13
|
-
readonly checkoutItemId: string;
|
|
14
|
-
}
|
|
15
|
-
interface ViewBookedSizeReplaceableProductVariantsForCheckoutItem extends Query<typeof VIEW_BOOKED_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM>, ViewBookedSizeReplaceableProductVariantsForCheckoutItemPayload {
|
|
16
|
-
}
|
|
17
|
-
interface ViewBookedSizeReplaceableProductVariantsForCheckoutItemFunction {
|
|
18
|
-
(payload: ViewBookedSizeReplaceableProductVariantsForCheckoutItemPayload): ViewBookedSizeReplaceableProductVariantsForCheckoutItem;
|
|
19
|
-
}
|
|
20
|
-
declare const viewBookedSizeReplaceableProductVariantsForCheckoutItem: ViewBookedSizeReplaceableProductVariantsForCheckoutItemFunction;
|
|
21
|
-
declare type ViewBookedSizeReplaceableProductVariantsForCheckoutItemResult = BookedSizeReplaceableProductVariantsProjection | null;
|
|
22
|
-
interface BookedSizeReplaceableProductVariantsForCheckoutItemViewArgs extends CancelableQueryViewArgs {
|
|
23
|
-
readonly checkoutItemId: string;
|
|
24
|
-
}
|
|
25
|
-
interface BookedSizeReplaceableProductVariantsForCheckoutItemView {
|
|
26
|
-
(args: BookedSizeReplaceableProductVariantsForCheckoutItemViewArgs): Promise<ViewBookedSizeReplaceableProductVariantsForCheckoutItemResult>;
|
|
27
|
-
}
|
|
28
|
-
interface ViewBookedSizeReplaceableProductVariantsForCheckoutItemHandlerFunctionArgs extends QueryHandlerFunctionArgs {
|
|
29
|
-
readonly view: BookedSizeReplaceableProductVariantsForCheckoutItemView;
|
|
30
|
-
}
|
|
31
|
-
declare const viewBookedSizeReplaceableProductVariantsForCheckoutItemHandler: QueryHandlerFunction<ViewBookedSizeReplaceableProductVariantsForCheckoutItem, ViewBookedSizeReplaceableProductVariantsForCheckoutItemResult, ViewBookedSizeReplaceableProductVariantsForCheckoutItemHandlerFunctionArgs>;
|
|
32
|
-
export type { ProductVariant, BookedSizeReplaceableProductVariantsProjection, BookedSizeReplaceableProductVariantsForCheckoutItemView, };
|
|
33
|
-
export { VIEW_BOOKED_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM, viewBookedSizeReplaceableProductVariantsForCheckoutItem, viewBookedSizeReplaceableProductVariantsForCheckoutItemHandler, };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { query, } from "@lookiero/messaging";
|
|
2
|
-
const VIEW_BOOKED_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM = "view_booked_size_replaceable_product_variants_for_checkout_item";
|
|
3
|
-
const viewBookedSizeReplaceableProductVariantsForCheckoutItem = (payload) => ({
|
|
4
|
-
...query({ name: VIEW_BOOKED_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM }),
|
|
5
|
-
...payload,
|
|
6
|
-
});
|
|
7
|
-
const viewBookedSizeReplaceableProductVariantsForCheckoutItemHandler = ({ view, signal }) => async ({ checkoutItemId }) => view({ checkoutItemId, signal });
|
|
8
|
-
export { VIEW_BOOKED_SIZE_REPLACEABLE_PRODUCT_VARIANTS_FOR_CHECKOUT_ITEM, viewBookedSizeReplaceableProductVariantsForCheckoutItem, viewBookedSizeReplaceableProductVariantsForCheckoutItemHandler, };
|