@dropins/storefront-order 0.1.0-alpha8 → 1.0.0-beta1
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/api/cancelOrder/cancelOrder.d.ts +2 -0
- package/api/cancelOrder/graphql/cancelOrderMutation.d.ts +2 -0
- package/api/cancelOrder/index.d.ts +2 -0
- package/api/confirmCancelOrder/confirmCancelOrder.d.ts +16 -0
- package/api/confirmCancelOrder/graphql/ConfirmCancelOrder.d.ts +16 -0
- package/api/confirmCancelOrder/index.d.ts +16 -0
- package/api/confirmGuestReturn/confirmGuestReturn.d.ts +2 -0
- package/api/confirmGuestReturn/graphql/confirmGuestReturn.graphql.d.ts +2 -0
- package/api/confirmGuestReturn/index.d.ts +2 -0
- package/api/fragment.d.ts +7 -0
- package/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts +1 -1
- package/api/getAttributesList/getAttributesList.d.ts +5 -0
- package/api/getAttributesList/graphql/getAttributesList.graphql.d.ts +2 -0
- package/api/getAttributesList/index.d.ts +2 -0
- package/api/getCustomer/graphql/getCustomer.graphql.d.ts +1 -1
- package/api/getCustomerOrdersReturn/getCustomerOrdersReturn.d.ts +4 -0
- package/api/getCustomerOrdersReturn/graphql/getCustomerOrdersReturn.graphql.d.ts +2 -0
- package/api/getCustomerOrdersReturn/index.d.ts +2 -0
- package/api/getGuestOrder/getGuestOrder.d.ts +1 -1
- package/api/getGuestOrder/graphql/getGuestOrder.graphql.d.ts +0 -1
- package/api/getGuestOrder/graphql/index.d.ts +2 -0
- package/api/getOrderDetailsById/getOrderDetailsById.d.ts +2 -1
- package/api/getStoreConfig/getStoreConfig.d.ts +4 -0
- package/api/getStoreConfig/graphql/StoreConfigQuery.d.ts +2 -0
- package/api/getStoreConfig/index.d.ts +2 -0
- package/api/graphql/CustomerAddressFragment.graphql.d.ts +2 -0
- package/api/graphql/GurestOrderFragment.graphql.d.ts +2 -0
- package/api/graphql/OrderItemsFragment.graphql.d.ts +6 -0
- package/api/graphql/OrderSummaryFragment.graphql.d.ts +2 -0
- package/api/graphql/RequestReturnOrderFragment.graphql.d.ts +2 -0
- package/api/graphql/ReturnsFragment.graphql.d.ts +2 -0
- package/api/guestOrderByToken/guestOrderByToken.d.ts +1 -1
- package/api/index.d.ts +15 -4
- package/api/initialize/initialize.d.ts +7 -1
- package/api/placeOrder/graphql/placeOrderMutation.d.ts +2 -0
- package/api/placeOrder/index.d.ts +2 -0
- package/api/placeOrder/placeOrder.d.ts +4 -0
- package/api/reorderItems/graphql/reorderItems.graphql.d.ts +2 -0
- package/api/reorderItems/index.d.ts +2 -0
- package/api/reorderItems/reorderItems.d.ts +4 -0
- package/api/requestGuestOrderCancel/graphql/requestGuestOrderCancelMutation.d.ts +2 -0
- package/api/requestGuestOrderCancel/index.d.ts +2 -0
- package/api/requestGuestOrderCancel/requestGuestOrderCancel.d.ts +2 -0
- package/api/requestGuestReturn/graphql/requestGuestReturn.graphql.d.ts +2 -0
- package/api/requestGuestReturn/index.d.ts +2 -0
- package/api/requestGuestReturn/requestGuestReturn.d.ts +9 -0
- package/api/requestReturn/graphql/requestReturn.graphql.d.ts +2 -0
- package/api/requestReturn/index.d.ts +2 -0
- package/api/requestReturn/requestReturn.d.ts +5 -0
- package/api.js +56 -129
- package/chunks/CartSummaryItem.js +3 -0
- package/chunks/GurestOrderFragment.graphql.js +99 -0
- package/chunks/OrderCancelForm.js +3 -0
- package/chunks/OrderLoaders.js +3 -1
- package/chunks/RequestReturnOrderFragment.graphql.js +11 -0
- package/chunks/ReturnsListContent.js +3 -0
- package/chunks/{CustomerDetailsContent.js → ShippingStatusCard.js} +3 -1
- package/chunks/capitalizeFirst.js +3 -0
- package/chunks/confirmCancelOrder.js +56 -0
- package/chunks/fetch-graphql.js +3 -1
- package/chunks/formatDateToLocale.js +3 -0
- package/chunks/getAttributesForm.js +6 -4
- package/chunks/getCustomerOrdersReturn.js +21 -0
- package/chunks/getFormValues.js +3 -0
- package/chunks/getGuestOrder.js +18 -0
- package/chunks/getQueryParam.js +3 -0
- package/chunks/getStoreConfig.js +19 -0
- package/chunks/initialize.js +411 -0
- package/chunks/network-error.js +3 -0
- package/chunks/redirectTo.js +3 -0
- package/chunks/requestGuestOrderCancel.js +102 -0
- package/chunks/requestGuestReturn.js +54 -0
- package/chunks/returnOrdersHelper.js +3 -0
- package/chunks/setTaxStatus.js +3 -0
- package/chunks/transform-attributes-form.js +3 -0
- package/chunks/useGetStoreConfig.js +3 -0
- package/chunks/useIsMobile.js +3 -0
- package/components/EmptyList/EmptyList.d.ts +5 -0
- package/components/EmptyList/index.d.ts +3 -0
- package/components/OrderCancel/OrderCancel.d.ts +5 -0
- package/components/OrderCancel/index.d.ts +3 -0
- package/components/OrderCostSummaryContent/Blocks.d.ts +39 -0
- package/components/OrderCostSummaryContent/OrderCostSummaryContent.d.ts +5 -0
- package/components/OrderCostSummaryContent/index.d.ts +3 -0
- package/components/OrderHeader/OrderHeader.d.ts +9 -0
- package/components/OrderHeader/index.d.ts +2 -0
- package/components/OrderLoaders/OrderLoaders.d.ts +3 -0
- package/components/OrderProductListContent/CartSummaryItem.d.ts +5 -0
- package/components/OrderProductListContent/OrderProductListContent.d.ts +5 -0
- package/components/OrderProductListContent/index.d.ts +4 -0
- package/components/Reorder/Reorder.d.ts +5 -0
- package/components/Reorder/index.d.ts +3 -0
- package/components/ReturnOrderMessage/ReturnOrderMessage.d.ts +5 -0
- package/components/ReturnOrderMessage/index.d.ts +3 -0
- package/components/ReturnOrderProductList/ReturnOrderProductList.d.ts +5 -0
- package/components/ReturnOrderProductList/index.d.ts +3 -0
- package/components/ReturnReasonForm/ReturnReasonForm.d.ts +5 -0
- package/components/ReturnReasonForm/index.d.ts +3 -0
- package/components/ReturnsListContent/ReturnsListContent.d.ts +5 -0
- package/components/ReturnsListContent/index.d.ts +3 -0
- package/components/ShippingStatusCard/ShippingStatusCard.d.ts +1 -1
- package/components/ShippingStatusCard/ShippingStatusReturnCard.d.ts +5 -0
- package/components/ShippingStatusCard/index.d.ts +1 -0
- package/components/index.d.ts +14 -4
- package/configs/mock.config.d.ts +2823 -19
- package/containers/CreateReturn/CreateReturn.d.ts +5 -0
- package/containers/CreateReturn/index.d.ts +3 -0
- package/containers/CreateReturn.d.ts +3 -0
- package/containers/CreateReturn.js +3 -0
- package/containers/CustomerDetails.js +3 -1
- package/containers/OrderCancelForm/OrderCancelForm.d.ts +5 -0
- package/containers/OrderCancelForm/index.d.ts +3 -0
- package/containers/OrderCancelForm.d.ts +3 -0
- package/containers/OrderCancelForm.js +3 -0
- package/containers/OrderCostSummary/OrderCostSummary.d.ts +5 -0
- package/containers/OrderCostSummary/index.d.ts +3 -0
- package/containers/OrderCostSummary.d.ts +3 -0
- package/containers/OrderCostSummary.js +3 -0
- package/containers/OrderHeader/OrderHeader.d.ts +5 -0
- package/containers/OrderHeader/index.d.ts +3 -0
- package/containers/OrderHeader.d.ts +3 -0
- package/containers/OrderHeader.js +3 -0
- package/containers/OrderProductList/OrderProductList.d.ts +5 -0
- package/containers/OrderProductList/index.d.ts +3 -0
- package/containers/OrderProductList.d.ts +3 -0
- package/containers/OrderProductList.js +3 -0
- package/containers/OrderReturns/OrderReturns.d.ts +5 -0
- package/containers/OrderReturns/index.d.ts +3 -0
- package/containers/OrderReturns.d.ts +3 -0
- package/containers/OrderReturns.js +3 -0
- package/containers/OrderSearch.js +3 -1
- package/containers/OrderStatus.js +3 -1
- package/containers/ReturnsList/ReturnsList.d.ts +5 -0
- package/containers/ReturnsList/index.d.ts +3 -0
- package/containers/ReturnsList.d.ts +3 -0
- package/containers/ReturnsList.js +3 -0
- package/containers/ShippingStatus.js +3 -1
- package/containers/index.d.ts +8 -1
- package/data/models/acdl.d.ts +99 -0
- package/data/models/attributes-form.d.ts +2 -21
- package/data/models/customer-orders-return.d.ts +38 -0
- package/data/models/index.d.ts +5 -1
- package/data/models/order-details.d.ts +64 -9
- package/data/models/request-return.d.ts +7 -0
- package/data/models/store-config.d.ts +15 -0
- package/data/transforms/index.d.ts +8 -2
- package/data/transforms/transform-acdl.d.ts +5 -0
- package/data/transforms/transform-attributes-form.d.ts +3 -2
- package/data/transforms/transform-customer-address-input.d.ts +22 -0
- package/data/transforms/transform-customer-orders-returns.d.ts +5 -0
- package/data/transforms/transform-guest-order.d.ts +2 -2
- package/data/transforms/transform-order-details.d.ts +13 -3
- package/data/transforms/transform-place-order.d.ts +5 -0
- package/data/transforms/transform-request-return.d.ts +5 -0
- package/data/transforms/transform-store-config.d.ts +4 -0
- package/hooks/api/useGetStoreConfig.d.ts +4 -0
- package/hooks/containers/useCreateReturn.d.ts +65 -0
- package/hooks/containers/useCustomerDetails.d.ts +2 -2
- package/hooks/containers/useOrderActions.d.ts +12 -0
- package/hooks/containers/useOrderCostSummary.d.ts +9 -0
- package/hooks/containers/useOrderHeader.d.ts +8 -0
- package/hooks/containers/useOrderProductList.d.ts +8 -0
- package/hooks/containers/useOrderReturns.d.ts +8 -0
- package/hooks/containers/useReturnsList.d.ts +15 -0
- package/hooks/containers/useShippingStatus.d.ts +2 -0
- package/hooks/index.d.ts +10 -1
- package/hooks/useInLineAlert.d.ts +7 -0
- package/hooks/useIsMobile.d.ts +2 -0
- package/i18n/en_US.json.d.ts +268 -13
- package/lib/acdl.d.ts +18 -0
- package/lib/capitalizeFirst.d.ts +2 -0
- package/lib/categorizeProducts.d.ts +66 -0
- package/lib/formatDateToLocale.d.ts +31 -0
- package/lib/getQueryParam.d.ts +1 -1
- package/lib/redirectTo.d.ts +1 -1
- package/lib/removeQueryParams.d.ts +2 -0
- package/lib/returnOrdersHelper.d.ts +36 -0
- package/lib/setTaxStatus.d.ts +4 -0
- package/package.json +1 -1
- package/render.js +5 -2
- package/types/api/confirmGuestReturn.types.d.ts +18 -0
- package/types/api/getAttributesList.types.d.ts +28 -0
- package/types/api/getCustomerOrdersReturn.types.d.ts +21 -0
- package/types/api/getOrderDetails.types.d.ts +69 -11
- package/types/api/placeOrder.types.d.ts +19 -0
- package/types/api/reorderItems.types.d.ts +27 -0
- package/types/api/requestReturn.types.d.ts +47 -0
- package/types/createReturn.types.d.ts +71 -0
- package/types/customerDetails.types.d.ts +10 -3
- package/types/emptyList.types.d.ts +7 -0
- package/types/form.types.d.ts +1 -1
- package/types/index.d.ts +21 -5
- package/types/notification.types.d.ts +14 -0
- package/types/orderCancel.types.d.ts +16 -0
- package/types/orderCostSummary.types.d.ts +29 -0
- package/types/orderEmailActionHandler.types.d.ts +4 -0
- package/types/orderHeader.types.d.ts +19 -0
- package/types/orderProductList.types.d.ts +36 -0
- package/types/orderStatus.types.d.ts +12 -4
- package/types/reorder.types.d.ts +9 -0
- package/types/returnsList.types.d.ts +82 -0
- package/types/shippingStatus.types.d.ts +33 -2
- package/api/getOrderDetailsById/graphql/customerAddressFragment.graphql.d.ts +0 -2
- package/api/getOrderDetailsById/graphql/index.d.ts +0 -5
- package/api/getOrderDetailsById/graphql/orderItemsFragment.graphql.d.ts +0 -2
- package/api/getOrderDetailsById/graphql/orderSummaryFragment.graphql.d.ts +0 -2
- package/chunks/getCustomer.js +0 -185
- package/lib/convertToInputDateFormat.d.ts +0 -3
- package/lib/formatAddressFields.d.ts +0 -6
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OrderDataModel } from '../../data/models';
|
|
2
|
+
import { ReturnProps } from './requestReturn.types';
|
|
3
|
+
|
|
4
|
+
interface ErrorsProps {
|
|
5
|
+
message: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GuestConfirmReturnResponse {
|
|
8
|
+
data: {
|
|
9
|
+
confirmReturn: {
|
|
10
|
+
return: ReturnProps & {
|
|
11
|
+
order: OrderDataModel;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
errors?: ErrorsProps[];
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=confirmGuestReturn.types.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type AttributesListItems = {
|
|
2
|
+
code: string;
|
|
3
|
+
sort_order: string;
|
|
4
|
+
default_value: null | string;
|
|
5
|
+
frontend_class: null | string;
|
|
6
|
+
multiline_count: number;
|
|
7
|
+
entity_type: string;
|
|
8
|
+
frontend_input: string;
|
|
9
|
+
is_required: boolean;
|
|
10
|
+
is_unique: boolean;
|
|
11
|
+
label: string;
|
|
12
|
+
options: {
|
|
13
|
+
is_default: boolean;
|
|
14
|
+
label: string;
|
|
15
|
+
value: string;
|
|
16
|
+
}[];
|
|
17
|
+
};
|
|
18
|
+
export interface GetAttributesListResponse {
|
|
19
|
+
data: {
|
|
20
|
+
attributesList: {
|
|
21
|
+
items: AttributesListItems[];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
errors?: {
|
|
25
|
+
message: string;
|
|
26
|
+
}[];
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=getAttributesList.types.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReturnsItemsProps } from './getOrderDetails.types';
|
|
2
|
+
|
|
3
|
+
export interface OrdersReturnResponseProps {
|
|
4
|
+
page_info?: {
|
|
5
|
+
page_size: number;
|
|
6
|
+
total_pages: number;
|
|
7
|
+
current_page: number;
|
|
8
|
+
};
|
|
9
|
+
items?: ReturnsItemsProps[];
|
|
10
|
+
}
|
|
11
|
+
export interface GetCustomerOrdersReturnResponse {
|
|
12
|
+
data: {
|
|
13
|
+
customer: {
|
|
14
|
+
returns: OrdersReturnResponseProps;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
errors?: {
|
|
18
|
+
message: string;
|
|
19
|
+
}[];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=getCustomerOrdersReturn.types.d.ts.map
|
|
@@ -24,6 +24,8 @@ export interface ProductProps {
|
|
|
24
24
|
thumbnail?: ThumbnailImageProps;
|
|
25
25
|
image: ThumbnailImageProps;
|
|
26
26
|
canonical_url: string;
|
|
27
|
+
url_key: string;
|
|
28
|
+
id: string;
|
|
27
29
|
uid: string;
|
|
28
30
|
name: string;
|
|
29
31
|
__typename: string;
|
|
@@ -35,8 +37,8 @@ export interface ProductProps {
|
|
|
35
37
|
};
|
|
36
38
|
}
|
|
37
39
|
export interface MoneyProps {
|
|
38
|
-
value
|
|
39
|
-
currency
|
|
40
|
+
value: number;
|
|
41
|
+
currency: string;
|
|
40
42
|
}
|
|
41
43
|
interface GrandTotalProps extends MoneyProps {
|
|
42
44
|
}
|
|
@@ -54,10 +56,11 @@ interface TaxDetailProps {
|
|
|
54
56
|
title?: string;
|
|
55
57
|
}
|
|
56
58
|
export interface DiscountProps {
|
|
57
|
-
amount
|
|
58
|
-
label
|
|
59
|
+
amount: MoneyProps;
|
|
60
|
+
label: string;
|
|
59
61
|
}
|
|
60
62
|
export interface TotalProps {
|
|
63
|
+
total_giftcard?: MoneyProps;
|
|
61
64
|
grand_total?: GrandTotalProps;
|
|
62
65
|
subtotal?: SubtotalProps;
|
|
63
66
|
taxes?: TaxDetailProps[];
|
|
@@ -78,11 +81,9 @@ interface InvoiceProps {
|
|
|
78
81
|
}[];
|
|
79
82
|
}
|
|
80
83
|
export interface GiftMessageProps {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
to: string;
|
|
85
|
-
};
|
|
84
|
+
form: string;
|
|
85
|
+
message: string;
|
|
86
|
+
to: string;
|
|
86
87
|
}
|
|
87
88
|
export interface GiftWrappingProps {
|
|
88
89
|
gift_wrapping: {
|
|
@@ -100,6 +101,7 @@ export interface giftCardProps {
|
|
|
100
101
|
sender_email: string;
|
|
101
102
|
recipient_email: string;
|
|
102
103
|
recipient_name: string;
|
|
104
|
+
message: string;
|
|
103
105
|
}
|
|
104
106
|
export interface OrderItemProps {
|
|
105
107
|
__typename: string;
|
|
@@ -124,12 +126,31 @@ export interface OrderItemProps {
|
|
|
124
126
|
quantity_refunded: number;
|
|
125
127
|
quantity_returned: number;
|
|
126
128
|
quantity_shipped: number;
|
|
129
|
+
quantity_return_requested: number;
|
|
127
130
|
selected_options: {
|
|
128
131
|
label: string;
|
|
129
132
|
value: string;
|
|
130
133
|
}[];
|
|
134
|
+
bundle_options: any;
|
|
131
135
|
status: string;
|
|
132
136
|
gift_card?: giftCardProps;
|
|
137
|
+
downloadable_links: {
|
|
138
|
+
title: string;
|
|
139
|
+
}[];
|
|
140
|
+
prices: {
|
|
141
|
+
price_including_tax: MoneyProps;
|
|
142
|
+
original_price: MoneyProps;
|
|
143
|
+
original_price_including_tax: MoneyProps;
|
|
144
|
+
price: MoneyProps;
|
|
145
|
+
discounts: [
|
|
146
|
+
{
|
|
147
|
+
label: string;
|
|
148
|
+
amount: {
|
|
149
|
+
value: number;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
];
|
|
153
|
+
};
|
|
133
154
|
}
|
|
134
155
|
export interface PaymentMethodsProps {
|
|
135
156
|
name: string;
|
|
@@ -162,6 +183,35 @@ export declare enum AvailableActionsProps {
|
|
|
162
183
|
RETURN = "RETURN",
|
|
163
184
|
REORDER = "REORDER"
|
|
164
185
|
}
|
|
186
|
+
export interface ReturnsItemsProps {
|
|
187
|
+
number: string;
|
|
188
|
+
status: string;
|
|
189
|
+
created_at: string;
|
|
190
|
+
order: {
|
|
191
|
+
number: string;
|
|
192
|
+
token: string;
|
|
193
|
+
};
|
|
194
|
+
shipping: {
|
|
195
|
+
tracking: {
|
|
196
|
+
status: {
|
|
197
|
+
text: string;
|
|
198
|
+
type: string;
|
|
199
|
+
};
|
|
200
|
+
carrier: {
|
|
201
|
+
uid: string;
|
|
202
|
+
label: string;
|
|
203
|
+
};
|
|
204
|
+
tracking_number: string;
|
|
205
|
+
}[];
|
|
206
|
+
};
|
|
207
|
+
items: {
|
|
208
|
+
quantity: number;
|
|
209
|
+
status: string;
|
|
210
|
+
uid: string;
|
|
211
|
+
request_quantity: number;
|
|
212
|
+
order_item: OrderItemProps;
|
|
213
|
+
}[];
|
|
214
|
+
}
|
|
165
215
|
export interface OrderProps {
|
|
166
216
|
available_actions: AvailableActionsProps[];
|
|
167
217
|
shipping_method: string;
|
|
@@ -178,8 +228,8 @@ export interface OrderProps {
|
|
|
178
228
|
code: string;
|
|
179
229
|
}[];
|
|
180
230
|
returns: {
|
|
181
|
-
|
|
182
|
-
|
|
231
|
+
__typename: string;
|
|
232
|
+
items: ReturnsItemsProps[];
|
|
183
233
|
};
|
|
184
234
|
shipments: ShipmentsProps[];
|
|
185
235
|
items_eligible_for_return: OrderItemProps[];
|
|
@@ -197,6 +247,14 @@ export interface ErrorProps {
|
|
|
197
247
|
message?: string;
|
|
198
248
|
}[];
|
|
199
249
|
}
|
|
250
|
+
type GetOrderDetailsByParams<T extends QueryType> = {
|
|
251
|
+
orderId?: string;
|
|
252
|
+
returnRef?: string;
|
|
253
|
+
queryType: T;
|
|
254
|
+
returnsPageSize?: number;
|
|
255
|
+
};
|
|
256
|
+
export interface GetOrderDetailsByIdProps extends GetOrderDetailsByParams<QueryType> {
|
|
257
|
+
}
|
|
200
258
|
export interface OrdersResponse extends ErrorProps {
|
|
201
259
|
data?: {
|
|
202
260
|
customer?: {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OrderProps } from '..';
|
|
2
|
+
|
|
3
|
+
export interface PlaceOrderProps extends OrderProps {
|
|
4
|
+
}
|
|
5
|
+
export interface PlaceOrderResponse {
|
|
6
|
+
data: {
|
|
7
|
+
placeOrder?: {
|
|
8
|
+
errors?: {
|
|
9
|
+
code: string;
|
|
10
|
+
message: string;
|
|
11
|
+
}[];
|
|
12
|
+
orderV2?: PlaceOrderProps;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
errors?: {
|
|
16
|
+
message: string;
|
|
17
|
+
}[];
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=placeOrder.types.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface UserInputErrorProps {
|
|
2
|
+
code: string;
|
|
3
|
+
message: string;
|
|
4
|
+
path: [string];
|
|
5
|
+
}
|
|
6
|
+
export interface ReorderItemsResponse {
|
|
7
|
+
data: {
|
|
8
|
+
reorderItems: {
|
|
9
|
+
cart: {
|
|
10
|
+
itemsV2: {
|
|
11
|
+
items: {
|
|
12
|
+
uid: string;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
userInputErrors: UserInputErrorProps[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
errors?: {
|
|
20
|
+
message: string;
|
|
21
|
+
}[];
|
|
22
|
+
}
|
|
23
|
+
export interface ReorderItemsProps {
|
|
24
|
+
success: boolean;
|
|
25
|
+
userInputErrors: UserInputErrorProps[];
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=reorderItems.types.d.ts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export interface RequestReturnProps {
|
|
2
|
+
orderUid?: string;
|
|
3
|
+
contactEmail: string;
|
|
4
|
+
items: {
|
|
5
|
+
orderItemUid: string;
|
|
6
|
+
quantityToReturn: number;
|
|
7
|
+
selectedCustomAttributes?: {
|
|
8
|
+
attribute_code: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}[];
|
|
11
|
+
enteredCustomAttributes?: {
|
|
12
|
+
attribute_code: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}[];
|
|
15
|
+
}[];
|
|
16
|
+
}
|
|
17
|
+
export interface RequestGuestReturnProps extends RequestReturnProps {
|
|
18
|
+
token: string;
|
|
19
|
+
commentText: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ReturnProps {
|
|
22
|
+
uid: string;
|
|
23
|
+
number: string;
|
|
24
|
+
status: string;
|
|
25
|
+
created_at: string;
|
|
26
|
+
}
|
|
27
|
+
interface ErrorsProps {
|
|
28
|
+
message: string;
|
|
29
|
+
}
|
|
30
|
+
export interface RequestReturnResponse {
|
|
31
|
+
data: {
|
|
32
|
+
requestReturn: {
|
|
33
|
+
return: ReturnProps;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
errors?: ErrorsProps[];
|
|
37
|
+
}
|
|
38
|
+
export interface RequestGuestReturnResponse {
|
|
39
|
+
data: {
|
|
40
|
+
requestGuestReturn: {
|
|
41
|
+
return: ReturnProps;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
errors?: ErrorsProps[];
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=requestReturn.types.d.ts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { AttributesFormModel, OrderDataModel, OrderItemModel } from '../data/models';
|
|
2
|
+
import { InLineAlertProps, TaxTypes } from '.';
|
|
3
|
+
import { SlotProps } from '@dropins/tools/types/elsie/src/lib';
|
|
4
|
+
import { RefObject } from 'preact';
|
|
5
|
+
import { MutableRefObject } from 'preact/compat';
|
|
6
|
+
|
|
7
|
+
type options = Record<string, string | number | boolean>;
|
|
8
|
+
export type StepsTypes = 'products' | 'attributes' | 'success' | 'error';
|
|
9
|
+
type onSuccessTypes = {
|
|
10
|
+
uid: string;
|
|
11
|
+
number: string;
|
|
12
|
+
status: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
};
|
|
15
|
+
export interface CreateReturnProps {
|
|
16
|
+
orderData?: OrderDataModel;
|
|
17
|
+
slots?: {
|
|
18
|
+
ReturnOrderItem: SlotProps;
|
|
19
|
+
ReturnFormActions: SlotProps<{
|
|
20
|
+
handleChangeStep: (value: StepsTypes) => void;
|
|
21
|
+
}>;
|
|
22
|
+
};
|
|
23
|
+
className: string;
|
|
24
|
+
onSuccess?: (response: onSuccessTypes) => void;
|
|
25
|
+
onError?: (message: string) => void;
|
|
26
|
+
routeReturnSuccess?: () => string;
|
|
27
|
+
showConfigurableOptions?: (options: options | {}) => options;
|
|
28
|
+
}
|
|
29
|
+
export interface ReturnOrderProductListProps {
|
|
30
|
+
placeholderImage: string;
|
|
31
|
+
slots?: {
|
|
32
|
+
ReturnOrderItem: SlotProps;
|
|
33
|
+
};
|
|
34
|
+
itemsEligibleForReturn: OrderItemModel[];
|
|
35
|
+
loading: boolean;
|
|
36
|
+
taxConfig: TaxTypes;
|
|
37
|
+
translations: Record<string, string>;
|
|
38
|
+
selectedProductList: OrderItemModel[] | [];
|
|
39
|
+
handleSelectedProductList: (product: any) => void;
|
|
40
|
+
showConfigurableOptions?: (options: options | {}) => options;
|
|
41
|
+
handleSetQuantity: (value: number, productSku: string) => void;
|
|
42
|
+
handleChangeStep: (value: StepsTypes) => void;
|
|
43
|
+
}
|
|
44
|
+
export interface ReturnReasonFormProps {
|
|
45
|
+
placeholderImage: string;
|
|
46
|
+
slots?: {
|
|
47
|
+
ReturnFormActions: SlotProps<{
|
|
48
|
+
handleChangeStep: (value: StepsTypes) => void;
|
|
49
|
+
}>;
|
|
50
|
+
};
|
|
51
|
+
formsRef: MutableRefObject<RefObject<HTMLFormElement>[]>;
|
|
52
|
+
loading: boolean;
|
|
53
|
+
translations: Record<string, string>;
|
|
54
|
+
fieldsConfig: AttributesFormModel[] | [];
|
|
55
|
+
selectedProductList: OrderItemModel[] | [];
|
|
56
|
+
handleChangeStep: (value: StepsTypes) => void;
|
|
57
|
+
onSubmit?: (event: SubmitEvent, isValid: boolean) => Promise<void | null | undefined>;
|
|
58
|
+
}
|
|
59
|
+
export interface ReturnOrderMessageProps {
|
|
60
|
+
translations: Record<string, string>;
|
|
61
|
+
routeReturnSuccess?: (orderData?: OrderDataModel) => string;
|
|
62
|
+
orderData?: OrderDataModel;
|
|
63
|
+
}
|
|
64
|
+
export interface UseCreateReturn {
|
|
65
|
+
orderData?: OrderDataModel;
|
|
66
|
+
onSuccess?: (response: onSuccessTypes) => void;
|
|
67
|
+
onError?: (message: string) => void;
|
|
68
|
+
handleSetInLineAlert: (value?: InLineAlertProps) => void;
|
|
69
|
+
}
|
|
70
|
+
export {};
|
|
71
|
+
//# sourceMappingURL=createReturn.types.d.ts.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SlotProps } from '@dropins/tools/types/elsie/src/lib';
|
|
2
|
+
import { OrderDataModel, OrdersReturnPropsModel } from '../data/models';
|
|
3
|
+
import { IconNode, IconType } from '@dropins/tools/types/elsie/src/components';
|
|
2
4
|
|
|
3
5
|
export interface KeysSortOrderProps {
|
|
4
6
|
name: string;
|
|
@@ -13,18 +15,23 @@ export interface NormalizeAddressProps extends KeysSortOrderProps {
|
|
|
13
15
|
}
|
|
14
16
|
export interface CustomerDetailsProps {
|
|
15
17
|
className?: string;
|
|
16
|
-
paymentIconsMap?: Record<string,
|
|
18
|
+
paymentIconsMap?: Record<string, IconType | IconNode>;
|
|
17
19
|
orderData?: OrderDataModel;
|
|
18
20
|
withHeader?: boolean;
|
|
19
21
|
title?: string;
|
|
22
|
+
slots?: {
|
|
23
|
+
OrderReturnInformation: SlotProps<OrdersReturnPropsModel | undefined>;
|
|
24
|
+
PaymentMethodIcon: SlotProps<Record<string, string>>;
|
|
25
|
+
};
|
|
20
26
|
}
|
|
21
27
|
export interface UseCustomerDetails {
|
|
22
28
|
orderData?: OrderDataModel;
|
|
23
29
|
}
|
|
24
30
|
export interface CustomerDetailsContentProps extends Omit<CustomerDetailsProps, 'orderData' | 'className'> {
|
|
31
|
+
translations: Record<string, string>;
|
|
25
32
|
loading: boolean;
|
|
26
33
|
order?: OrderDataModel;
|
|
27
|
-
normalizeAddress
|
|
34
|
+
normalizeAddress: {
|
|
28
35
|
billingAddress: NormalizeAddressProps[][];
|
|
29
36
|
shippingAddress: NormalizeAddressProps[][];
|
|
30
37
|
};
|
package/types/form.types.d.ts
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
|
-
export * from './api/guestOrderByToken.types';
|
|
2
|
-
export * from './api/getOrderDetails.types';
|
|
3
|
-
export * from './api/getGuestOrder.types';
|
|
4
1
|
export * from './api/getAttributesForm.types';
|
|
2
|
+
export * from './api/getAttributesList.types';
|
|
5
3
|
export * from './api/getCustomer.types';
|
|
6
|
-
export * from './
|
|
4
|
+
export * from './api/getCustomerOrdersReturn.types';
|
|
5
|
+
export * from './api/getGuestOrder.types';
|
|
6
|
+
export * from './api/getOrderDetails.types';
|
|
7
|
+
export * from './api/guestOrderByToken.types';
|
|
8
|
+
export * from './api/placeOrder.types';
|
|
9
|
+
export * from './api/reorderItems.types';
|
|
10
|
+
export * from './api/requestReturn.types';
|
|
11
|
+
export * from './api/confirmGuestReturn.types';
|
|
12
|
+
export * from './createReturn.types';
|
|
13
|
+
export * from './customerDetails.types';
|
|
14
|
+
export * from './emptyList.types';
|
|
7
15
|
export * from './form.types';
|
|
16
|
+
export * from './notification.types';
|
|
17
|
+
export * from './orderCancel.types';
|
|
18
|
+
export * from './orderCostSummary.types';
|
|
19
|
+
export * from './orderHeader.types';
|
|
20
|
+
export * from './orderProductList.types';
|
|
21
|
+
export * from './orderSearch.types';
|
|
8
22
|
export * from './orderStatus.types';
|
|
23
|
+
export * from './reorder.types';
|
|
24
|
+
export * from './returnsList.types';
|
|
9
25
|
export * from './shippingStatus.types';
|
|
10
|
-
export * from './
|
|
26
|
+
export * from './orderEmailActionHandler.types';
|
|
11
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VNode } from 'preact';
|
|
2
|
+
import { HTMLAttributes } from 'preact/compat';
|
|
3
|
+
|
|
4
|
+
export type AdditionalActionsAlertProps = Array<{
|
|
5
|
+
label: string;
|
|
6
|
+
onClick: (event: Event) => void;
|
|
7
|
+
}>;
|
|
8
|
+
export interface InLineAlertProps {
|
|
9
|
+
type: 'success' | 'warning' | 'error';
|
|
10
|
+
heading: string;
|
|
11
|
+
icon?: VNode<HTMLAttributes<SVGSVGElement>>;
|
|
12
|
+
}
|
|
13
|
+
export type statusTypes = '' | 'success' | 'error' | 'pending';
|
|
14
|
+
//# sourceMappingURL=notification.types.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ButtonProps, PickerProps } from '@dropins/tools/types/elsie/src/src/components';
|
|
2
|
+
import { PickerOption } from '@dropins/tools/types/elsie/src/components';
|
|
3
|
+
|
|
4
|
+
export interface OrderCancelProps {
|
|
5
|
+
orderRef: string;
|
|
6
|
+
}
|
|
7
|
+
export interface OrderCancelFormProps {
|
|
8
|
+
orderRef: string;
|
|
9
|
+
pickerProps?: PickerProps;
|
|
10
|
+
submitButtonProps?: ButtonProps;
|
|
11
|
+
cancelReasons: PickerOption[];
|
|
12
|
+
}
|
|
13
|
+
export interface UseOrderActionsProps {
|
|
14
|
+
enableOrderCancellation: boolean | undefined;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=orderCancel.types.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'preact/compat';
|
|
2
|
+
import { OrderDataModel, StoreConfigModel } from '../data/models';
|
|
3
|
+
|
|
4
|
+
type TaxTypes = {
|
|
5
|
+
taxIncluded: boolean;
|
|
6
|
+
taxExcluded: boolean;
|
|
7
|
+
};
|
|
8
|
+
export interface StoreConfigProps extends Omit<StoreConfigModel, 'orderCancellationEnabled' | 'orderCancellationReasons' | 'shoppingCartDisplayPrice' | 'shoppingOrdersDisplayShipping' | 'shoppingOrdersDisplaySubtotal'> {
|
|
9
|
+
shoppingCartDisplayPrice: TaxTypes;
|
|
10
|
+
shoppingOrdersDisplayShipping: TaxTypes;
|
|
11
|
+
shoppingOrdersDisplaySubtotal: TaxTypes;
|
|
12
|
+
}
|
|
13
|
+
export interface OrderCostSummaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
orderData?: OrderDataModel;
|
|
15
|
+
withHeader?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface OrderCostSummaryContentProps {
|
|
18
|
+
order?: OrderDataModel;
|
|
19
|
+
withHeader?: boolean;
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
storeConfig: StoreConfigProps | null;
|
|
22
|
+
translations: Record<string, string>;
|
|
23
|
+
}
|
|
24
|
+
export interface UseOrderCostSummaryProps {
|
|
25
|
+
orderData?: OrderDataModel;
|
|
26
|
+
config: StoreConfigModel | null;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=orderCostSummary.types.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OrderDataModel } from '../data/models';
|
|
2
|
+
|
|
3
|
+
export interface SignUpContext {
|
|
4
|
+
inputsDefaultValueSet: DefaultValues;
|
|
5
|
+
addressesData: any[];
|
|
6
|
+
}
|
|
7
|
+
type DefaultValues = {
|
|
8
|
+
code: string;
|
|
9
|
+
defaultValue: string;
|
|
10
|
+
}[];
|
|
11
|
+
export interface OrderHeaderProps {
|
|
12
|
+
handleEmailAvailability?: (email: string) => Promise<boolean>;
|
|
13
|
+
handleSignUpClick?: (ctx: SignUpContext) => void;
|
|
14
|
+
orderData?: OrderDataModel;
|
|
15
|
+
}
|
|
16
|
+
export interface UseOrderHeaderProps extends OrderHeaderProps {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=orderHeader.types.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { OrderDataModel, OrderItemModel } from '../data/models';
|
|
2
|
+
|
|
3
|
+
type options = Record<string, string | number | boolean>;
|
|
4
|
+
export type TaxTypes = {
|
|
5
|
+
taxIncluded: boolean;
|
|
6
|
+
taxExcluded: boolean;
|
|
7
|
+
};
|
|
8
|
+
export interface OrderProductListProps {
|
|
9
|
+
orderData?: OrderDataModel;
|
|
10
|
+
className?: string;
|
|
11
|
+
withHeader?: boolean;
|
|
12
|
+
showConfigurableOptions?: (options: options | {}) => options;
|
|
13
|
+
routeProductDetails?: (product: any) => string;
|
|
14
|
+
}
|
|
15
|
+
export interface OrderProductListContentProps extends Omit<OrderProductListProps, 'className'> {
|
|
16
|
+
placeholderImage: string;
|
|
17
|
+
order?: OrderDataModel;
|
|
18
|
+
taxConfig: TaxTypes;
|
|
19
|
+
loading: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface CartSummaryItemProps {
|
|
22
|
+
placeholderImage?: string;
|
|
23
|
+
disabledIncrementer?: boolean;
|
|
24
|
+
loading: boolean;
|
|
25
|
+
itemType: string;
|
|
26
|
+
translations: Record<string, string>;
|
|
27
|
+
product: OrderItemModel;
|
|
28
|
+
taxConfig: TaxTypes;
|
|
29
|
+
onQuantity?: (value: number) => void;
|
|
30
|
+
showConfigurableOptions?: (options: options | {}) => options;
|
|
31
|
+
routeProductDetails?: (product: any) => string;
|
|
32
|
+
}
|
|
33
|
+
export interface UseOrderProductListProps extends Omit<OrderProductListProps, 'className' | 'withHeader' | 'showConfigurableOptions'> {
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=orderProductList.types.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { OrderDataModel } from '../data/models';
|
|
1
|
+
import { OrderDataModel, OrdersReturnPropsModel } from '../data/models';
|
|
3
2
|
import { SlotProps } from '@dropins/tools/types/elsie/src/lib';
|
|
3
|
+
import { UserInputErrorProps } from '.';
|
|
4
4
|
|
|
5
5
|
export declare enum StatusEnumProps {
|
|
6
6
|
PENDING = "pending",
|
|
@@ -15,24 +15,32 @@ export declare enum StatusEnumProps {
|
|
|
15
15
|
type DefaultSlotContext = {
|
|
16
16
|
orderData?: OrderDataModel;
|
|
17
17
|
};
|
|
18
|
-
export interface OrderStatusProps
|
|
18
|
+
export interface OrderStatusProps {
|
|
19
|
+
className?: string;
|
|
19
20
|
orderData?: OrderDataModel;
|
|
20
21
|
statusTitle?: string;
|
|
21
22
|
status?: StatusEnumProps;
|
|
22
23
|
slots?: {
|
|
23
24
|
OrderActions: SlotProps<DefaultSlotContext>;
|
|
24
25
|
};
|
|
26
|
+
routeCreateReturn?: (orderReturn: OrdersReturnPropsModel) => string;
|
|
27
|
+
routeOnSuccess?: () => string;
|
|
28
|
+
onError?: (errorInformation: UserInputErrorProps[] | string) => void;
|
|
25
29
|
}
|
|
26
30
|
export interface OrderStatusContentProps extends Omit<OrderStatusProps, 'statusTitle' | 'orderData' | 'status'> {
|
|
27
31
|
title?: string;
|
|
28
32
|
status?: StatusEnumProps;
|
|
29
33
|
orderData?: OrderDataModel;
|
|
30
34
|
}
|
|
31
|
-
export interface OrderActionsProps
|
|
35
|
+
export interface OrderActionsProps {
|
|
36
|
+
className?: string;
|
|
32
37
|
orderData?: OrderDataModel;
|
|
33
38
|
slots?: {
|
|
34
39
|
OrderActions: SlotProps<DefaultSlotContext>;
|
|
35
40
|
};
|
|
41
|
+
routeCreateReturn?: (orderReturn: OrdersReturnPropsModel) => string;
|
|
42
|
+
routeOnSuccess?: () => string;
|
|
43
|
+
onError?: (errorInformation: UserInputErrorProps[] | string) => void;
|
|
36
44
|
}
|
|
37
45
|
export interface UseOrderStatusProps {
|
|
38
46
|
orderData?: OrderDataModel;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OrderDataModel } from '../data/models';
|
|
2
|
+
import { UserInputErrorProps } from '.';
|
|
3
|
+
|
|
4
|
+
export interface ReorderProps {
|
|
5
|
+
orderData?: OrderDataModel;
|
|
6
|
+
routeOnSuccess?: () => string;
|
|
7
|
+
onError?: (errorInformation: UserInputErrorProps[] | string) => void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=reorder.types.d.ts.map
|