@dropins/storefront-order 0.1.0-alpha3 → 0.1.0-alpha30
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/getAttributesForm/getAttributesForm.d.ts +4 -0
- package/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts +3 -0
- package/api/getAttributesForm/index.d.ts +2 -0
- 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/getCustomer.d.ts +4 -0
- package/api/getCustomer/graphql/getCustomer.graphql.d.ts +2 -0
- package/api/getCustomer/index.d.ts +2 -0
- 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 +3 -3
- package/api/getGuestOrder/graphql/index.d.ts +2 -0
- package/api/getOrderDetailsById/getOrderDetailsById.d.ts +2 -2
- package/api/getOrderDetailsById/graphql/index.d.ts +1 -0
- package/api/getOrderDetailsById/graphql/orderItemsFragment.graphql.d.ts +5 -1
- package/api/getOrderDetailsById/graphql/orderSummaryFragment.graphql.d.ts +1 -1
- package/api/getOrderDetailsById/graphql/returnsFragment.graphql.d.ts +2 -0
- 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/guestOrderByToken/graphql/guestOrderByToken.graphql.d.ts +2 -0
- package/api/guestOrderByToken/guestOrderByToken.d.ts +4 -0
- package/api/guestOrderByToken/index.d.ts +2 -0
- package/api/helpers/initializeOrderDetails.d.ts +3 -1
- package/api/index.d.ts +13 -2
- 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/requestReturn/graphql/fragments.d.ts +2 -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 +9 -0
- package/api.js +281 -13
- package/chunks/CartSummaryItem.js +3 -0
- package/chunks/OrderCancelForm.js +3 -0
- package/chunks/OrderLoaders.js +3 -0
- package/chunks/ReturnsListContent.js +3 -0
- package/chunks/ShippingStatusCard.js +3 -0
- package/chunks/convertCase.js +3 -0
- package/chunks/fetch-graphql.js +3 -0
- package/chunks/formatDateToLocale.js +3 -0
- package/chunks/getAttributesForm.js +49 -0
- package/chunks/getCustomerOrdersReturn.js +21 -0
- package/chunks/getFormValues.js +3 -0
- package/chunks/getGuestOrder.graphql.js +160 -0
- package/chunks/getGuestOrder.js +9 -131
- package/chunks/getStoreConfig.js +19 -0
- package/chunks/network-error.js +3 -0
- package/chunks/redirectTo.js +3 -0
- package/chunks/reorderItems.js +20 -0
- package/chunks/requestGuestOrderCancel.js +99 -0
- package/chunks/requestReturn.js +52 -0
- package/chunks/returnOrdersHelper.js +3 -0
- package/chunks/setTaxStatus.js +3 -0
- package/chunks/transform-attributes-form.js +3 -0
- package/chunks/transform-customer-orders-returns.js +142 -0
- package/chunks/useGetStoreConfig.js +3 -0
- package/chunks/useIsMobile.js +3 -0
- package/components/CustomerDetailsContent/CustomerDetailsContent.d.ts +5 -0
- package/components/CustomerDetailsContent/index.d.ts +3 -0
- package/components/EmptyList/EmptyList.d.ts +5 -0
- package/components/EmptyList/index.d.ts +3 -0
- package/components/OrderActions/OrderActions.d.ts +5 -0
- package/components/OrderActions/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 +38 -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 +10 -0
- package/components/OrderLoaders/index.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/OrderStatusContent/OrderStatusContent.d.ts +5 -0
- package/components/OrderStatusContent/index.d.ts +3 -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 +5 -0
- package/components/ShippingStatusCard/ShippingStatusReturnCard.d.ts +5 -0
- package/components/ShippingStatusCard/index.d.ts +4 -0
- package/components/index.d.ts +16 -1
- package/configs/defaultAttributePreset.config.d.ts +2 -0
- package/configs/mock.config.d.ts +3567 -0
- 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/CustomerDetails.d.ts +5 -0
- package/containers/CustomerDetails/index.d.ts +3 -0
- package/containers/CustomerDetails.d.ts +3 -0
- package/containers/CustomerDetails.js +3 -0
- 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/OrderStatus.d.ts +5 -0
- package/containers/OrderStatus/index.d.ts +3 -0
- package/containers/OrderStatus.d.ts +3 -0
- package/containers/OrderStatus.js +22 -0
- 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/ShippingStatus.d.ts +5 -0
- package/containers/ShippingStatus/index.d.ts +3 -0
- package/containers/ShippingStatus.d.ts +3 -0
- package/containers/ShippingStatus.js +3 -0
- package/containers/index.d.ts +10 -0
- package/data/models/acdl.d.ts +99 -0
- package/data/models/attributes-form.d.ts +27 -0
- package/data/models/customer-orders-return.d.ts +38 -0
- package/data/models/customer.d.ts +6 -0
- package/data/models/index.d.ts +5 -1
- package/data/models/order-details.d.ts +162 -31
- package/data/models/store-config.d.ts +15 -0
- package/data/transforms/index.d.ts +8 -1
- package/data/transforms/transform-acdl.d.ts +5 -0
- package/data/transforms/transform-attributes-form.d.ts +7 -0
- 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-customer.d.ts +5 -0
- package/data/transforms/transform-guest-order.d.ts +4 -3
- package/data/transforms/transform-order-details.d.ts +15 -3
- package/data/transforms/transform-place-order.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/useConfirmCancelOrder.d.ts +9 -0
- package/hooks/containers/useCreateReturn.d.ts +64 -0
- package/hooks/containers/useCustomerDetails.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/useOrderSearch.d.ts +3 -3
- package/hooks/containers/useOrderStatus.d.ts +8 -0
- package/hooks/containers/useReturnsList.d.ts +15 -0
- package/hooks/containers/useShippingStatus.d.ts +9 -0
- package/hooks/index.d.ts +11 -0
- package/hooks/useInLineAlert.d.ts +7 -0
- package/hooks/useIsMobile.d.ts +2 -0
- package/i18n/en_US.json.d.ts +322 -3
- package/lib/acdl.d.ts +18 -0
- package/lib/capitalizeFirst.d.ts +2 -0
- package/lib/categorizeProducts.d.ts +66 -0
- package/lib/convertCase.d.ts +4 -0
- package/lib/formatDateToLocale.d.ts +31 -0
- package/lib/getQueryParam.d.ts +2 -0
- package/lib/redirectTo.d.ts +3 -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/getAttributesForm.types.d.ts +31 -0
- package/types/api/getAttributesList.types.d.ts +28 -0
- package/types/api/getCustomer.types.d.ts +13 -0
- package/types/api/getCustomerOrdersReturn.types.d.ts +21 -0
- package/types/api/getOrderDetails.types.d.ts +123 -39
- package/types/api/guestOrderByToken.types.d.ts +13 -0
- 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 +33 -0
- package/types/createReturn.types.d.ts +71 -0
- package/types/customerDetails.types.d.ts +59 -0
- package/types/emptyList.types.d.ts +7 -0
- package/types/form.types.d.ts +6 -6
- package/types/index.d.ts +22 -2
- 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/orderHeader.types.d.ts +19 -0
- package/types/orderProductList.types.d.ts +36 -0
- package/types/orderSearch.types.d.ts +21 -3
- package/types/orderStatus.types.d.ts +49 -0
- package/types/reorder.types.d.ts +9 -0
- package/types/returnsList.types.d.ts +82 -0
- package/types/shippingStatus.types.d.ts +49 -0
- package/data/models/guest-order.d.ts +0 -21
- package/lib/convertToInputDateFormat.d.ts +0 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface ResponseAttributesFormItemsProps {
|
|
2
|
+
code: string;
|
|
3
|
+
sort_order: string;
|
|
4
|
+
default_value: null | string;
|
|
5
|
+
entity_type: string;
|
|
6
|
+
frontend_class: null | string;
|
|
7
|
+
multiline_count: number;
|
|
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 GetAttributesFormResponse {
|
|
19
|
+
data: {
|
|
20
|
+
attributesForm: {
|
|
21
|
+
errors?: {
|
|
22
|
+
message: string;
|
|
23
|
+
}[];
|
|
24
|
+
items?: ResponseAttributesFormItemsProps[];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
errors?: {
|
|
28
|
+
message: string;
|
|
29
|
+
}[];
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=getAttributesForm.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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type QueryType = 'orderData'
|
|
1
|
+
export type QueryType = 'orderData';
|
|
2
2
|
export interface UserAddressesProps {
|
|
3
3
|
city?: string;
|
|
4
4
|
company?: string;
|
|
@@ -16,21 +16,29 @@ export interface UserAddressesProps {
|
|
|
16
16
|
telephone?: string;
|
|
17
17
|
vat_id?: string;
|
|
18
18
|
}
|
|
19
|
-
interface
|
|
19
|
+
interface ThumbnailImageProps {
|
|
20
20
|
url?: string;
|
|
21
|
+
label?: string;
|
|
21
22
|
}
|
|
22
|
-
interface ProductProps {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
export interface ProductProps {
|
|
24
|
+
thumbnail?: ThumbnailImageProps;
|
|
25
|
+
image: ThumbnailImageProps;
|
|
26
|
+
canonical_url: string;
|
|
27
|
+
url_key: string;
|
|
28
|
+
id: string;
|
|
29
|
+
uid: string;
|
|
30
|
+
name: string;
|
|
31
|
+
__typename: string;
|
|
32
|
+
sku: string;
|
|
33
|
+
price_range: {
|
|
34
|
+
maximum_price: {
|
|
35
|
+
regular_price: MoneyProps;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
30
38
|
}
|
|
31
39
|
export interface MoneyProps {
|
|
32
|
-
value
|
|
33
|
-
currency
|
|
40
|
+
value: number;
|
|
41
|
+
currency: string;
|
|
34
42
|
}
|
|
35
43
|
interface GrandTotalProps extends MoneyProps {
|
|
36
44
|
}
|
|
@@ -48,10 +56,11 @@ interface TaxDetailProps {
|
|
|
48
56
|
title?: string;
|
|
49
57
|
}
|
|
50
58
|
export interface DiscountProps {
|
|
51
|
-
amount
|
|
52
|
-
label
|
|
59
|
+
amount: MoneyProps;
|
|
60
|
+
label: string;
|
|
53
61
|
}
|
|
54
62
|
export interface TotalProps {
|
|
63
|
+
total_giftcard?: MoneyProps;
|
|
55
64
|
grand_total?: GrandTotalProps;
|
|
56
65
|
subtotal?: SubtotalProps;
|
|
57
66
|
taxes?: TaxDetailProps[];
|
|
@@ -72,11 +81,9 @@ interface InvoiceProps {
|
|
|
72
81
|
}[];
|
|
73
82
|
}
|
|
74
83
|
export interface GiftMessageProps {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
to: string;
|
|
79
|
-
};
|
|
84
|
+
form: string;
|
|
85
|
+
message: string;
|
|
86
|
+
to: string;
|
|
80
87
|
}
|
|
81
88
|
export interface GiftWrappingProps {
|
|
82
89
|
gift_wrapping: {
|
|
@@ -89,7 +96,15 @@ export interface GiftWrappingProps {
|
|
|
89
96
|
};
|
|
90
97
|
};
|
|
91
98
|
}
|
|
92
|
-
interface
|
|
99
|
+
export interface giftCardProps {
|
|
100
|
+
sender_name: string;
|
|
101
|
+
sender_email: string;
|
|
102
|
+
recipient_email: string;
|
|
103
|
+
recipient_name: string;
|
|
104
|
+
message: string;
|
|
105
|
+
}
|
|
106
|
+
export interface OrderItemProps {
|
|
107
|
+
__typename: string;
|
|
93
108
|
discounts: DiscountProps[];
|
|
94
109
|
eligible_for_return: boolean;
|
|
95
110
|
entered_options: {
|
|
@@ -111,13 +126,33 @@ interface OrderItemInterface {
|
|
|
111
126
|
quantity_refunded: number;
|
|
112
127
|
quantity_returned: number;
|
|
113
128
|
quantity_shipped: number;
|
|
129
|
+
quantity_return_requested: number;
|
|
114
130
|
selected_options: {
|
|
115
131
|
label: string;
|
|
116
132
|
value: string;
|
|
117
133
|
}[];
|
|
134
|
+
bundle_options: any;
|
|
118
135
|
status: string;
|
|
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
|
+
};
|
|
119
154
|
}
|
|
120
|
-
export interface
|
|
155
|
+
export interface PaymentMethodsProps {
|
|
121
156
|
name: string;
|
|
122
157
|
type: string;
|
|
123
158
|
additional_data: {
|
|
@@ -125,7 +160,60 @@ export interface paymentMethodsProps {
|
|
|
125
160
|
value: string;
|
|
126
161
|
}[];
|
|
127
162
|
}
|
|
163
|
+
export interface ShipmentsProps {
|
|
164
|
+
id: string;
|
|
165
|
+
number: string;
|
|
166
|
+
tracking: {
|
|
167
|
+
carrier: string;
|
|
168
|
+
number: string;
|
|
169
|
+
title: string;
|
|
170
|
+
}[];
|
|
171
|
+
comments: {
|
|
172
|
+
message: string;
|
|
173
|
+
timestamp: string;
|
|
174
|
+
}[];
|
|
175
|
+
items: {
|
|
176
|
+
id: string;
|
|
177
|
+
product_sku: string;
|
|
178
|
+
product_name: string;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
export declare enum AvailableActionsProps {
|
|
182
|
+
CANCEL = "CANCEL",
|
|
183
|
+
RETURN = "RETURN",
|
|
184
|
+
REORDER = "REORDER"
|
|
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
|
+
}
|
|
128
215
|
export interface OrderProps {
|
|
216
|
+
available_actions: AvailableActionsProps[];
|
|
129
217
|
shipping_method: string;
|
|
130
218
|
status: string;
|
|
131
219
|
token: string;
|
|
@@ -139,29 +227,17 @@ export interface OrderProps {
|
|
|
139
227
|
applied_coupons: {
|
|
140
228
|
code: string;
|
|
141
229
|
}[];
|
|
142
|
-
shipments: {
|
|
143
|
-
id: string;
|
|
144
|
-
number: string;
|
|
145
|
-
tracking: {
|
|
146
|
-
carrier: string;
|
|
147
|
-
number: string;
|
|
148
|
-
title: string;
|
|
149
|
-
}[];
|
|
150
|
-
comments: {
|
|
151
|
-
message: string;
|
|
152
|
-
timestamp: string;
|
|
153
|
-
}[];
|
|
154
|
-
}[];
|
|
155
230
|
returns: {
|
|
156
|
-
|
|
157
|
-
|
|
231
|
+
__typename: string;
|
|
232
|
+
items: ReturnsItemsProps[];
|
|
158
233
|
};
|
|
159
|
-
|
|
234
|
+
shipments: ShipmentsProps[];
|
|
235
|
+
items_eligible_for_return: OrderItemProps[];
|
|
236
|
+
items: OrderItemProps[];
|
|
160
237
|
gift_wrapping: GiftWrappingProps;
|
|
161
238
|
gift_message: GiftMessageProps;
|
|
162
|
-
payment_methods:
|
|
239
|
+
payment_methods: PaymentMethodsProps[];
|
|
163
240
|
invoices: InvoiceProps[];
|
|
164
|
-
items: OrderItemProps[];
|
|
165
241
|
shipping_address: UserAddressesProps;
|
|
166
242
|
billing_address: UserAddressesProps;
|
|
167
243
|
total?: TotalProps;
|
|
@@ -171,6 +247,14 @@ export interface ErrorProps {
|
|
|
171
247
|
message?: string;
|
|
172
248
|
}[];
|
|
173
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
|
+
}
|
|
174
258
|
export interface OrdersResponse extends ErrorProps {
|
|
175
259
|
data?: {
|
|
176
260
|
customer?: {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OrderProps } from '..';
|
|
2
|
+
|
|
3
|
+
export interface GuestOrderByTokenProps extends OrderProps {
|
|
4
|
+
}
|
|
5
|
+
export interface GuestOrderByTokenResponse {
|
|
6
|
+
data: {
|
|
7
|
+
guestOrderByToken?: GuestOrderByTokenProps;
|
|
8
|
+
};
|
|
9
|
+
errors?: {
|
|
10
|
+
message: string;
|
|
11
|
+
}[];
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=guestOrderByToken.types.d.ts.map
|
|
@@ -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,33 @@
|
|
|
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 ReturnProps {
|
|
18
|
+
uid: string;
|
|
19
|
+
number: string;
|
|
20
|
+
status: string;
|
|
21
|
+
created_at: string;
|
|
22
|
+
}
|
|
23
|
+
export interface RequestReturnResponse {
|
|
24
|
+
data: {
|
|
25
|
+
requestReturn: {
|
|
26
|
+
return: ReturnProps;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
errors?: {
|
|
30
|
+
message: string;
|
|
31
|
+
}[];
|
|
32
|
+
}
|
|
33
|
+
//# 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
|
|
@@ -0,0 +1,59 @@
|
|
|
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';
|
|
4
|
+
|
|
5
|
+
export interface KeysSortOrderProps {
|
|
6
|
+
name: string;
|
|
7
|
+
orderNumber?: number;
|
|
8
|
+
label?: string | null;
|
|
9
|
+
}
|
|
10
|
+
export interface NormalizeAddressProps extends KeysSortOrderProps {
|
|
11
|
+
name: string;
|
|
12
|
+
orderNumber: number;
|
|
13
|
+
value?: string | string[];
|
|
14
|
+
label?: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface CustomerDetailsProps {
|
|
17
|
+
className?: string;
|
|
18
|
+
paymentIconsMap?: Record<string, IconType | IconNode>;
|
|
19
|
+
orderData?: OrderDataModel;
|
|
20
|
+
withHeader?: boolean;
|
|
21
|
+
title?: string;
|
|
22
|
+
slots?: {
|
|
23
|
+
OrderReturnInformation: SlotProps<OrdersReturnPropsModel | undefined>;
|
|
24
|
+
PaymentMethodIcon: SlotProps<Record<string, string>>;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface UseCustomerDetails {
|
|
28
|
+
orderData?: OrderDataModel;
|
|
29
|
+
}
|
|
30
|
+
export interface CustomerDetailsContentProps extends Omit<CustomerDetailsProps, 'orderData' | 'className'> {
|
|
31
|
+
translations: Record<string, string>;
|
|
32
|
+
loading: boolean;
|
|
33
|
+
order?: OrderDataModel;
|
|
34
|
+
normalizeAddress: {
|
|
35
|
+
billingAddress: NormalizeAddressProps[][];
|
|
36
|
+
shippingAddress: NormalizeAddressProps[][];
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface CustomerAddressesModel {
|
|
40
|
+
firstname?: string;
|
|
41
|
+
lastname?: string;
|
|
42
|
+
city?: string;
|
|
43
|
+
company?: string;
|
|
44
|
+
countryCode?: string;
|
|
45
|
+
region?: {
|
|
46
|
+
region: string;
|
|
47
|
+
regionCode: string;
|
|
48
|
+
regionId: string | number;
|
|
49
|
+
};
|
|
50
|
+
telephone?: string;
|
|
51
|
+
id?: string;
|
|
52
|
+
vatId?: string;
|
|
53
|
+
postcode?: string;
|
|
54
|
+
street?: string;
|
|
55
|
+
street_2?: string;
|
|
56
|
+
defaultShipping?: boolean;
|
|
57
|
+
defaultBilling?: boolean;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=customerDetails.types.d.ts.map
|
package/types/form.types.d.ts
CHANGED
|
@@ -26,15 +26,15 @@ export interface FieldsProps {
|
|
|
26
26
|
code: string;
|
|
27
27
|
name: string;
|
|
28
28
|
defaultValue: string | boolean | number;
|
|
29
|
-
|
|
29
|
+
entityType: string;
|
|
30
30
|
required: boolean;
|
|
31
|
-
|
|
31
|
+
isUnique: boolean;
|
|
32
32
|
label: string;
|
|
33
33
|
orderNumber: number;
|
|
34
|
-
options
|
|
35
|
-
is_default
|
|
36
|
-
label
|
|
37
|
-
value
|
|
34
|
+
options?: {
|
|
35
|
+
is_default?: boolean;
|
|
36
|
+
label?: string;
|
|
37
|
+
value?: string;
|
|
38
38
|
}[];
|
|
39
39
|
}
|
|
40
40
|
export interface FormProps {
|
package/types/index.d.ts
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
export * from './api/
|
|
1
|
+
export * from './api/getAttributesForm.types';
|
|
2
|
+
export * from './api/getAttributesList.types';
|
|
3
|
+
export * from './api/getCustomer.types';
|
|
4
|
+
export * from './api/getCustomerOrdersReturn.types';
|
|
2
5
|
export * from './api/getGuestOrder.types';
|
|
3
|
-
export * from './
|
|
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 './createReturn.types';
|
|
12
|
+
export * from './customerDetails.types';
|
|
13
|
+
export * from './emptyList.types';
|
|
4
14
|
export * from './form.types';
|
|
15
|
+
export * from './notification.types';
|
|
16
|
+
export * from './orderCancel.types';
|
|
17
|
+
export * from './orderCostSummary.types';
|
|
18
|
+
export * from './orderHeader.types';
|
|
19
|
+
export * from './orderProductList.types';
|
|
20
|
+
export * from './orderSearch.types';
|
|
21
|
+
export * from './orderStatus.types';
|
|
22
|
+
export * from './reorder.types';
|
|
23
|
+
export * from './returnsList.types';
|
|
24
|
+
export * from './shippingStatus.types';
|
|
5
25
|
//# 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 ConfirmCancelOrderProps {
|
|
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
|