@akinon/next 1.13.1 → 1.14.0
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/.editorconfig +7 -0
- package/.eslintrc.js +40 -40
- package/.prettierrc +13 -13
- package/CHANGELOG.md +13 -0
- package/api/auth.ts +231 -231
- package/api/cache.ts +44 -44
- package/api/client.ts +174 -174
- package/api/logout.ts +42 -42
- package/assets/styles/index.scss +28 -28
- package/bin/pz-check-dependencies.js +98 -98
- package/bin/pz-install-plugins.js +33 -33
- package/bin/pz-install-theme.js +58 -58
- package/bin/pz-postbuild.js +1 -1
- package/bin/pz-postdev.js +1 -1
- package/bin/pz-postinstall.js +6 -6
- package/bin/pz-poststart.js +1 -1
- package/bin/pz-prebuild.js +4 -4
- package/bin/pz-predev.js +4 -4
- package/bin/pz-prestart.js +1 -1
- package/bin/run-script.js +44 -44
- package/components/accordion.tsx +52 -0
- package/components/button.tsx +46 -0
- package/components/client-root.tsx +19 -19
- package/components/icon.tsx +18 -18
- package/components/image.tsx +133 -133
- package/components/index.ts +17 -1
- package/components/input.tsx +110 -0
- package/components/lazy-component.tsx +33 -33
- package/components/loader-spinner.tsx +23 -23
- package/components/mobile-app-toggler.tsx +26 -26
- package/components/oauth-login.tsx +24 -24
- package/components/plugin-module.tsx +11 -8
- package/components/price.tsx +55 -0
- package/components/pz-providers.tsx +24 -24
- package/components/pz-root.tsx +21 -21
- package/components/radio.tsx +18 -18
- package/components/react-portal.tsx +45 -45
- package/components/redirect-three-d/content/index.tsx +74 -74
- package/components/redirect-three-d/index.tsx +17 -17
- package/components/selected-payment-option-view.tsx +7 -0
- package/components/trans.tsx +39 -39
- package/data/client/account.ts +208 -208
- package/data/client/address.ts +107 -107
- package/data/client/api.ts +85 -84
- package/data/client/b2b.ts +106 -106
- package/data/client/basket.ts +82 -82
- package/data/client/checkout.ts +516 -479
- package/data/client/misc.ts +101 -101
- package/data/client/product.ts +89 -89
- package/data/client/user.ts +99 -99
- package/data/client/wishlist.ts +118 -88
- package/data/server/category.ts +132 -128
- package/data/server/flatpage.ts +21 -21
- package/data/server/form.ts +22 -22
- package/data/server/index.ts +10 -10
- package/data/server/landingpage.ts +24 -24
- package/data/server/list.ts +67 -62
- package/data/server/menu.ts +35 -35
- package/data/server/product.ts +86 -86
- package/data/server/seo.ts +48 -48
- package/data/server/special-page.ts +47 -47
- package/data/server/widget.ts +27 -27
- package/data/urls.ts +221 -210
- package/hocs/client/index.ts +1 -1
- package/hocs/client/with-segment-defaults.tsx +25 -25
- package/hocs/server/index.ts +1 -1
- package/hocs/server/with-segment-defaults.tsx +85 -85
- package/hooks/index.ts +10 -10
- package/hooks/use-captcha.tsx +76 -76
- package/hooks/use-common-product-attributes.ts +36 -36
- package/hooks/use-debounce.ts +20 -20
- package/hooks/use-localization.ts +78 -78
- package/hooks/use-media-query.ts +36 -36
- package/hooks/use-mobile-iframe-handler.ts +23 -23
- package/hooks/use-on-click-outside.tsx +28 -28
- package/hooks/use-payment-options.ts +2 -1
- package/hooks/use-router.ts +45 -45
- package/hooks/use-translation.ts +14 -14
- package/lib/cache.ts +215 -215
- package/localization/index.ts +5 -5
- package/localization/provider.tsx +58 -58
- package/middlewares/currency.ts +100 -100
- package/middlewares/default.ts +256 -256
- package/middlewares/index.ts +29 -29
- package/middlewares/locale.ts +68 -68
- package/middlewares/oauth-login.ts +79 -79
- package/middlewares/pretty-url.ts +104 -104
- package/middlewares/redirection-payment.ts +160 -160
- package/middlewares/three-d-redirection.ts +159 -159
- package/middlewares/url-redirection.ts +65 -65
- package/package.json +2 -2
- package/plugins.js +2 -1
- package/redux/hooks.ts +7 -7
- package/redux/middlewares/checkout.ts +265 -260
- package/redux/middlewares/index.ts +50 -50
- package/redux/reducers/checkout.ts +184 -171
- package/redux/reducers/config.ts +28 -28
- package/redux/reducers/header.ts +59 -59
- package/redux/reducers/index.ts +14 -14
- package/redux/reducers/root.ts +61 -61
- package/sentry/index.ts +27 -27
- package/tailwind/rtl.js +137 -137
- package/types/commerce/account.ts +64 -64
- package/types/commerce/address.ts +94 -94
- package/types/commerce/b2b.ts +117 -117
- package/types/commerce/basket.ts +43 -43
- package/types/commerce/category.ts +114 -114
- package/types/commerce/checkout.ts +143 -136
- package/types/commerce/flatpage.ts +7 -7
- package/types/commerce/form.ts +66 -66
- package/types/commerce/index.ts +12 -12
- package/types/commerce/landingpage.ts +7 -7
- package/types/commerce/misc.ts +127 -127
- package/types/commerce/order.ts +119 -119
- package/types/commerce/product.ts +109 -109
- package/types/commerce/widget.ts +28 -28
- package/types/gtm.ts +16 -16
- package/types/index.ts +274 -237
- package/types/metadata.ts +7 -7
- package/types/next-auth.d.ts +24 -24
- package/utils/app-fetch.ts +69 -69
- package/utils/deep-merge.js +24 -24
- package/utils/generate-commerce-search-params.ts +22 -22
- package/utils/get-currency.ts +29 -29
- package/utils/image-loader.ts +31 -31
- package/utils/index.ts +150 -150
- package/utils/localization.ts +29 -29
- package/utils/log.ts +138 -138
- package/utils/menu-generator.ts +27 -27
- package/utils/mobile-3d-iframe.ts +77 -77
- package/utils/server-translation.ts +57 -57
- package/utils/server-variables.ts +9 -9
- package/with-pz-config.js +94 -94
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
export enum AddressType {
|
|
2
|
-
individual = 'false',
|
|
3
|
-
company = 'true'
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export type AddressFormType = {
|
|
7
|
-
type: string;
|
|
8
|
-
is_corporate: AddressType;
|
|
9
|
-
title: string;
|
|
10
|
-
first_name: string;
|
|
11
|
-
last_name: string;
|
|
12
|
-
phone_number: string;
|
|
13
|
-
country: string;
|
|
14
|
-
city: string;
|
|
15
|
-
township: string;
|
|
16
|
-
district: string;
|
|
17
|
-
line: string;
|
|
18
|
-
postcode: string;
|
|
19
|
-
company_name?: string;
|
|
20
|
-
tax_no?: number;
|
|
21
|
-
tax_office?: string;
|
|
22
|
-
e_bill_taxpayer?: boolean;
|
|
23
|
-
country_code?: string;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export type Country = {
|
|
27
|
-
code: string;
|
|
28
|
-
is_active: boolean;
|
|
29
|
-
name: string;
|
|
30
|
-
pk: number;
|
|
31
|
-
translations: string | null;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export type City = {
|
|
35
|
-
country: Country;
|
|
36
|
-
is_active: boolean;
|
|
37
|
-
name: string;
|
|
38
|
-
pk: number;
|
|
39
|
-
postcode: number;
|
|
40
|
-
priority: null;
|
|
41
|
-
translations: string | null;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export type Township = {
|
|
45
|
-
city: City;
|
|
46
|
-
is_active: boolean;
|
|
47
|
-
name: string;
|
|
48
|
-
pk: number;
|
|
49
|
-
postcode: number;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export type District = {
|
|
53
|
-
city: number;
|
|
54
|
-
is_active: boolean;
|
|
55
|
-
name: string;
|
|
56
|
-
pk: number;
|
|
57
|
-
postcode: number;
|
|
58
|
-
township: number;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export interface Address {
|
|
62
|
-
address_type: string;
|
|
63
|
-
city: City;
|
|
64
|
-
company_name: string;
|
|
65
|
-
country: Country;
|
|
66
|
-
district: District;
|
|
67
|
-
e_bill_taxpayer: boolean;
|
|
68
|
-
email: string;
|
|
69
|
-
extra_field: null;
|
|
70
|
-
first_name: string;
|
|
71
|
-
hash_data: string;
|
|
72
|
-
identity_number: number | null;
|
|
73
|
-
is_corporate: 'true' | 'false';
|
|
74
|
-
last_name: string;
|
|
75
|
-
line: string;
|
|
76
|
-
notes: string | null;
|
|
77
|
-
phone_number: string;
|
|
78
|
-
pk: number;
|
|
79
|
-
postcode: string;
|
|
80
|
-
primary: boolean;
|
|
81
|
-
remote_id: null;
|
|
82
|
-
retail_store: null;
|
|
83
|
-
tax_no: string;
|
|
84
|
-
tax_office: string;
|
|
85
|
-
title: string;
|
|
86
|
-
township: Township;
|
|
87
|
-
user: { pk: number };
|
|
88
|
-
latitude: string;
|
|
89
|
-
longitude: string;
|
|
90
|
-
name: string;
|
|
91
|
-
address: string;
|
|
92
|
-
fax_phone_number: string;
|
|
93
|
-
image: string;
|
|
94
|
-
}
|
|
1
|
+
export enum AddressType {
|
|
2
|
+
individual = 'false',
|
|
3
|
+
company = 'true'
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export type AddressFormType = {
|
|
7
|
+
type: string;
|
|
8
|
+
is_corporate: AddressType;
|
|
9
|
+
title: string;
|
|
10
|
+
first_name: string;
|
|
11
|
+
last_name: string;
|
|
12
|
+
phone_number: string;
|
|
13
|
+
country: string;
|
|
14
|
+
city: string;
|
|
15
|
+
township: string;
|
|
16
|
+
district: string;
|
|
17
|
+
line: string;
|
|
18
|
+
postcode: string;
|
|
19
|
+
company_name?: string;
|
|
20
|
+
tax_no?: number;
|
|
21
|
+
tax_office?: string;
|
|
22
|
+
e_bill_taxpayer?: boolean;
|
|
23
|
+
country_code?: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type Country = {
|
|
27
|
+
code: string;
|
|
28
|
+
is_active: boolean;
|
|
29
|
+
name: string;
|
|
30
|
+
pk: number;
|
|
31
|
+
translations: string | null;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type City = {
|
|
35
|
+
country: Country;
|
|
36
|
+
is_active: boolean;
|
|
37
|
+
name: string;
|
|
38
|
+
pk: number;
|
|
39
|
+
postcode: number;
|
|
40
|
+
priority: null;
|
|
41
|
+
translations: string | null;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type Township = {
|
|
45
|
+
city: City;
|
|
46
|
+
is_active: boolean;
|
|
47
|
+
name: string;
|
|
48
|
+
pk: number;
|
|
49
|
+
postcode: number;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type District = {
|
|
53
|
+
city: number;
|
|
54
|
+
is_active: boolean;
|
|
55
|
+
name: string;
|
|
56
|
+
pk: number;
|
|
57
|
+
postcode: number;
|
|
58
|
+
township: number;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export interface Address {
|
|
62
|
+
address_type: string;
|
|
63
|
+
city: City;
|
|
64
|
+
company_name: string;
|
|
65
|
+
country: Country;
|
|
66
|
+
district: District;
|
|
67
|
+
e_bill_taxpayer: boolean;
|
|
68
|
+
email: string;
|
|
69
|
+
extra_field: null;
|
|
70
|
+
first_name: string;
|
|
71
|
+
hash_data: string;
|
|
72
|
+
identity_number: number | null;
|
|
73
|
+
is_corporate: 'true' | 'false';
|
|
74
|
+
last_name: string;
|
|
75
|
+
line: string;
|
|
76
|
+
notes: string | null;
|
|
77
|
+
phone_number: string;
|
|
78
|
+
pk: number;
|
|
79
|
+
postcode: string;
|
|
80
|
+
primary: boolean;
|
|
81
|
+
remote_id: null;
|
|
82
|
+
retail_store: null;
|
|
83
|
+
tax_no: string;
|
|
84
|
+
tax_office: string;
|
|
85
|
+
title: string;
|
|
86
|
+
township: Township;
|
|
87
|
+
user: { pk: number };
|
|
88
|
+
latitude: string;
|
|
89
|
+
longitude: string;
|
|
90
|
+
name: string;
|
|
91
|
+
address: string;
|
|
92
|
+
fax_phone_number: string;
|
|
93
|
+
image: string;
|
|
94
|
+
}
|
package/types/commerce/b2b.ts
CHANGED
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
import { Product } from './product';
|
|
2
|
-
|
|
3
|
-
export type Division = {
|
|
4
|
-
id: number;
|
|
5
|
-
name: string;
|
|
6
|
-
division_type: string;
|
|
7
|
-
parent: number;
|
|
8
|
-
erp_code: string;
|
|
9
|
-
country_id: number;
|
|
10
|
-
city_id: number;
|
|
11
|
-
township_id: number;
|
|
12
|
-
district_id: number;
|
|
13
|
-
address: string;
|
|
14
|
-
phone_number: string;
|
|
15
|
-
fax_number: string;
|
|
16
|
-
is_active: true;
|
|
17
|
-
latitude: null;
|
|
18
|
-
longitude: null;
|
|
19
|
-
monthly_order_limit: string;
|
|
20
|
-
current_balance: string;
|
|
21
|
-
current_balance_last_update: null | string;
|
|
22
|
-
extra_data: object;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export interface ProductB2b extends Product {
|
|
26
|
-
sku: string;
|
|
27
|
-
name: string;
|
|
28
|
-
price: string;
|
|
29
|
-
base_code: string;
|
|
30
|
-
asorti: string;
|
|
31
|
-
category: string;
|
|
32
|
-
currency: string;
|
|
33
|
-
variants: {
|
|
34
|
-
[key: string]: any;
|
|
35
|
-
};
|
|
36
|
-
product_image: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type BasketResponse = {
|
|
40
|
-
id: number;
|
|
41
|
-
total_amount: string;
|
|
42
|
-
total_quantity: number;
|
|
43
|
-
basket_items: [
|
|
44
|
-
{
|
|
45
|
-
total_amount: string;
|
|
46
|
-
price: string;
|
|
47
|
-
quantity: number;
|
|
48
|
-
divisions: BasketItemDivision[];
|
|
49
|
-
product: ProductB2b;
|
|
50
|
-
product_remote_id: number;
|
|
51
|
-
}
|
|
52
|
-
];
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export interface QuotationErrorType {
|
|
56
|
-
data: {
|
|
57
|
-
non_field_errors: string[];
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface BasketItemDivision {
|
|
62
|
-
id: number;
|
|
63
|
-
name: string;
|
|
64
|
-
erp_code: string;
|
|
65
|
-
quantity: number;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export type BasketItemType = {
|
|
69
|
-
total_amount: string;
|
|
70
|
-
price: string;
|
|
71
|
-
quantity: number;
|
|
72
|
-
divisions: BasketItemDivision[];
|
|
73
|
-
product: ProductB2b;
|
|
74
|
-
product_remote_id: number;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export type BasketParams = {
|
|
78
|
-
division: string;
|
|
79
|
-
product_remote_id: string;
|
|
80
|
-
quantity: string;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export type SaveBasketParams = {
|
|
84
|
-
name: string;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export type CreateQuotationParams = {
|
|
88
|
-
name: string;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
export type UpdateProductParams = {
|
|
92
|
-
product_remote_id: number;
|
|
93
|
-
division: number;
|
|
94
|
-
quantity: number
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export type DeleteProductParams = {
|
|
98
|
-
product_remote_id: number;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
export type LoadBasketParams = {
|
|
102
|
-
id: number;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export interface GetResponse<T> {
|
|
106
|
-
count: number;
|
|
107
|
-
next: null;
|
|
108
|
-
previous: null;
|
|
109
|
-
results: T[];
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export type DraftResponse = {
|
|
113
|
-
id: number;
|
|
114
|
-
name: string;
|
|
115
|
-
total_amount: number;
|
|
116
|
-
total_quantity: number;
|
|
117
|
-
};
|
|
1
|
+
import { Product } from './product';
|
|
2
|
+
|
|
3
|
+
export type Division = {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
division_type: string;
|
|
7
|
+
parent: number;
|
|
8
|
+
erp_code: string;
|
|
9
|
+
country_id: number;
|
|
10
|
+
city_id: number;
|
|
11
|
+
township_id: number;
|
|
12
|
+
district_id: number;
|
|
13
|
+
address: string;
|
|
14
|
+
phone_number: string;
|
|
15
|
+
fax_number: string;
|
|
16
|
+
is_active: true;
|
|
17
|
+
latitude: null;
|
|
18
|
+
longitude: null;
|
|
19
|
+
monthly_order_limit: string;
|
|
20
|
+
current_balance: string;
|
|
21
|
+
current_balance_last_update: null | string;
|
|
22
|
+
extra_data: object;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export interface ProductB2b extends Product {
|
|
26
|
+
sku: string;
|
|
27
|
+
name: string;
|
|
28
|
+
price: string;
|
|
29
|
+
base_code: string;
|
|
30
|
+
asorti: string;
|
|
31
|
+
category: string;
|
|
32
|
+
currency: string;
|
|
33
|
+
variants: {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
};
|
|
36
|
+
product_image: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type BasketResponse = {
|
|
40
|
+
id: number;
|
|
41
|
+
total_amount: string;
|
|
42
|
+
total_quantity: number;
|
|
43
|
+
basket_items: [
|
|
44
|
+
{
|
|
45
|
+
total_amount: string;
|
|
46
|
+
price: string;
|
|
47
|
+
quantity: number;
|
|
48
|
+
divisions: BasketItemDivision[];
|
|
49
|
+
product: ProductB2b;
|
|
50
|
+
product_remote_id: number;
|
|
51
|
+
}
|
|
52
|
+
];
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export interface QuotationErrorType {
|
|
56
|
+
data: {
|
|
57
|
+
non_field_errors: string[];
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface BasketItemDivision {
|
|
62
|
+
id: number;
|
|
63
|
+
name: string;
|
|
64
|
+
erp_code: string;
|
|
65
|
+
quantity: number;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type BasketItemType = {
|
|
69
|
+
total_amount: string;
|
|
70
|
+
price: string;
|
|
71
|
+
quantity: number;
|
|
72
|
+
divisions: BasketItemDivision[];
|
|
73
|
+
product: ProductB2b;
|
|
74
|
+
product_remote_id: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type BasketParams = {
|
|
78
|
+
division: string;
|
|
79
|
+
product_remote_id: string;
|
|
80
|
+
quantity: string;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export type SaveBasketParams = {
|
|
84
|
+
name: string;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export type CreateQuotationParams = {
|
|
88
|
+
name: string;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export type UpdateProductParams = {
|
|
92
|
+
product_remote_id: number;
|
|
93
|
+
division: number;
|
|
94
|
+
quantity: number
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export type DeleteProductParams = {
|
|
98
|
+
product_remote_id: number;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export type LoadBasketParams = {
|
|
102
|
+
id: number;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export interface GetResponse<T> {
|
|
106
|
+
count: number;
|
|
107
|
+
next: null;
|
|
108
|
+
previous: null;
|
|
109
|
+
results: T[];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type DraftResponse = {
|
|
113
|
+
id: number;
|
|
114
|
+
name: string;
|
|
115
|
+
total_amount: number;
|
|
116
|
+
total_quantity: number;
|
|
117
|
+
};
|
package/types/commerce/basket.ts
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { Discount, UpsellDetail } from './misc';
|
|
2
|
-
import { Product } from './product';
|
|
3
|
-
|
|
4
|
-
export interface Basket {
|
|
5
|
-
segment: { pk: number; price_list: number; stock_list: number };
|
|
6
|
-
unavailable_basket_products: any[];
|
|
7
|
-
upsell_details: UpsellDetail[];
|
|
8
|
-
voucher_code: string | null;
|
|
9
|
-
total_amount: string;
|
|
10
|
-
total_quantity: number;
|
|
11
|
-
basketitem_set: BasketItem[];
|
|
12
|
-
created_date: string;
|
|
13
|
-
discounts: Discount[];
|
|
14
|
-
modified_date: string;
|
|
15
|
-
pk: number;
|
|
16
|
-
total_discount_amount: string;
|
|
17
|
-
total_product_amount: string;
|
|
18
|
-
upsell_messages: any[];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface BasketItem {
|
|
22
|
-
attributes: object;
|
|
23
|
-
attributes_kwargs: object;
|
|
24
|
-
discount_amount: string;
|
|
25
|
-
offer_badges: {
|
|
26
|
-
description: string;
|
|
27
|
-
discount: string;
|
|
28
|
-
}[];
|
|
29
|
-
parent: any | null;
|
|
30
|
-
price: string;
|
|
31
|
-
retail_price: string;
|
|
32
|
-
stock: number;
|
|
33
|
-
id: number;
|
|
34
|
-
quantity: number;
|
|
35
|
-
product: Product;
|
|
36
|
-
currency_type: string;
|
|
37
|
-
currency_type_label: string;
|
|
38
|
-
image: string;
|
|
39
|
-
shipping_discount: string;
|
|
40
|
-
tax_rate: string;
|
|
41
|
-
total_amount: string;
|
|
42
|
-
unit_price: string;
|
|
43
|
-
}
|
|
1
|
+
import { Discount, UpsellDetail } from './misc';
|
|
2
|
+
import { Product } from './product';
|
|
3
|
+
|
|
4
|
+
export interface Basket {
|
|
5
|
+
segment: { pk: number; price_list: number; stock_list: number };
|
|
6
|
+
unavailable_basket_products: any[];
|
|
7
|
+
upsell_details: UpsellDetail[];
|
|
8
|
+
voucher_code: string | null;
|
|
9
|
+
total_amount: string;
|
|
10
|
+
total_quantity: number;
|
|
11
|
+
basketitem_set: BasketItem[];
|
|
12
|
+
created_date: string;
|
|
13
|
+
discounts: Discount[];
|
|
14
|
+
modified_date: string;
|
|
15
|
+
pk: number;
|
|
16
|
+
total_discount_amount: string;
|
|
17
|
+
total_product_amount: string;
|
|
18
|
+
upsell_messages: any[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface BasketItem {
|
|
22
|
+
attributes: object;
|
|
23
|
+
attributes_kwargs: object;
|
|
24
|
+
discount_amount: string;
|
|
25
|
+
offer_badges: {
|
|
26
|
+
description: string;
|
|
27
|
+
discount: string;
|
|
28
|
+
}[];
|
|
29
|
+
parent: any | null;
|
|
30
|
+
price: string;
|
|
31
|
+
retail_price: string;
|
|
32
|
+
stock: number;
|
|
33
|
+
id: number;
|
|
34
|
+
quantity: number;
|
|
35
|
+
product: Product;
|
|
36
|
+
currency_type: string;
|
|
37
|
+
currency_type_label: string;
|
|
38
|
+
image: string;
|
|
39
|
+
shipping_discount: string;
|
|
40
|
+
tax_rate: string;
|
|
41
|
+
total_amount: string;
|
|
42
|
+
unit_price: string;
|
|
43
|
+
}
|