@akinon/next 1.13.0 → 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.
Files changed (133) hide show
  1. package/.editorconfig +7 -0
  2. package/.eslintrc.js +40 -40
  3. package/.prettierrc +13 -13
  4. package/CHANGELOG.md +19 -0
  5. package/api/auth.ts +231 -231
  6. package/api/cache.ts +44 -44
  7. package/api/client.ts +174 -174
  8. package/api/logout.ts +42 -42
  9. package/assets/styles/index.scss +28 -28
  10. package/bin/pz-check-dependencies.js +98 -98
  11. package/bin/pz-install-plugins.js +33 -33
  12. package/bin/pz-install-theme.js +58 -58
  13. package/bin/pz-postbuild.js +1 -1
  14. package/bin/pz-postdev.js +1 -1
  15. package/bin/pz-postinstall.js +6 -6
  16. package/bin/pz-poststart.js +1 -1
  17. package/bin/pz-prebuild.js +4 -4
  18. package/bin/pz-predev.js +4 -4
  19. package/bin/pz-prestart.js +1 -1
  20. package/bin/run-script.js +44 -44
  21. package/components/accordion.tsx +52 -0
  22. package/components/button.tsx +46 -0
  23. package/components/client-root.tsx +19 -19
  24. package/components/icon.tsx +18 -18
  25. package/components/image.tsx +133 -133
  26. package/components/index.ts +17 -1
  27. package/components/input.tsx +110 -0
  28. package/components/lazy-component.tsx +33 -33
  29. package/components/loader-spinner.tsx +23 -23
  30. package/components/mobile-app-toggler.tsx +26 -26
  31. package/components/oauth-login.tsx +24 -24
  32. package/components/plugin-module.tsx +11 -8
  33. package/components/price.tsx +55 -0
  34. package/components/pz-providers.tsx +24 -24
  35. package/components/pz-root.tsx +21 -21
  36. package/components/radio.tsx +18 -18
  37. package/components/react-portal.tsx +45 -45
  38. package/components/redirect-three-d/content/index.tsx +74 -74
  39. package/components/redirect-three-d/index.tsx +17 -17
  40. package/components/selected-payment-option-view.tsx +7 -0
  41. package/components/trans.tsx +39 -39
  42. package/data/client/account.ts +208 -208
  43. package/data/client/address.ts +107 -107
  44. package/data/client/api.ts +85 -84
  45. package/data/client/b2b.ts +106 -106
  46. package/data/client/basket.ts +82 -82
  47. package/data/client/checkout.ts +516 -479
  48. package/data/client/misc.ts +101 -101
  49. package/data/client/product.ts +89 -89
  50. package/data/client/user.ts +99 -99
  51. package/data/client/wishlist.ts +118 -88
  52. package/data/server/category.ts +132 -128
  53. package/data/server/flatpage.ts +21 -21
  54. package/data/server/form.ts +22 -22
  55. package/data/server/index.ts +10 -10
  56. package/data/server/landingpage.ts +24 -24
  57. package/data/server/list.ts +67 -62
  58. package/data/server/menu.ts +35 -35
  59. package/data/server/product.ts +86 -86
  60. package/data/server/seo.ts +48 -48
  61. package/data/server/special-page.ts +47 -47
  62. package/data/server/widget.ts +27 -27
  63. package/data/urls.ts +221 -210
  64. package/hocs/client/index.ts +1 -1
  65. package/hocs/client/with-segment-defaults.tsx +25 -25
  66. package/hocs/server/index.ts +1 -1
  67. package/hocs/server/with-segment-defaults.tsx +85 -85
  68. package/hooks/index.ts +10 -10
  69. package/hooks/use-captcha.tsx +76 -76
  70. package/hooks/use-common-product-attributes.ts +36 -36
  71. package/hooks/use-debounce.ts +20 -20
  72. package/hooks/use-localization.ts +78 -78
  73. package/hooks/use-media-query.ts +36 -36
  74. package/hooks/use-mobile-iframe-handler.ts +23 -23
  75. package/hooks/use-on-click-outside.tsx +28 -28
  76. package/hooks/use-payment-options.ts +12 -16
  77. package/hooks/use-router.ts +45 -45
  78. package/hooks/use-translation.ts +14 -14
  79. package/lib/cache.ts +215 -215
  80. package/localization/index.ts +5 -5
  81. package/localization/provider.tsx +58 -58
  82. package/middlewares/currency.ts +100 -100
  83. package/middlewares/default.ts +256 -256
  84. package/middlewares/index.ts +29 -29
  85. package/middlewares/locale.ts +68 -68
  86. package/middlewares/oauth-login.ts +79 -79
  87. package/middlewares/pretty-url.ts +104 -104
  88. package/middlewares/redirection-payment.ts +160 -160
  89. package/middlewares/three-d-redirection.ts +159 -159
  90. package/middlewares/url-redirection.ts +65 -65
  91. package/package.json +2 -2
  92. package/plugins.js +2 -1
  93. package/redux/hooks.ts +7 -7
  94. package/redux/middlewares/checkout.ts +265 -260
  95. package/redux/middlewares/index.ts +50 -50
  96. package/redux/reducers/checkout.ts +184 -171
  97. package/redux/reducers/config.ts +28 -28
  98. package/redux/reducers/header.ts +59 -59
  99. package/redux/reducers/index.ts +14 -14
  100. package/redux/reducers/root.ts +61 -61
  101. package/sentry/index.ts +27 -27
  102. package/tailwind/rtl.js +137 -137
  103. package/types/commerce/account.ts +64 -64
  104. package/types/commerce/address.ts +94 -94
  105. package/types/commerce/b2b.ts +117 -117
  106. package/types/commerce/basket.ts +43 -43
  107. package/types/commerce/category.ts +114 -114
  108. package/types/commerce/checkout.ts +143 -136
  109. package/types/commerce/flatpage.ts +7 -7
  110. package/types/commerce/form.ts +66 -66
  111. package/types/commerce/index.ts +12 -12
  112. package/types/commerce/landingpage.ts +7 -7
  113. package/types/commerce/misc.ts +127 -127
  114. package/types/commerce/order.ts +119 -119
  115. package/types/commerce/product.ts +109 -109
  116. package/types/commerce/widget.ts +28 -28
  117. package/types/gtm.ts +16 -16
  118. package/types/index.ts +274 -237
  119. package/types/metadata.ts +7 -7
  120. package/types/next-auth.d.ts +24 -24
  121. package/utils/app-fetch.ts +69 -69
  122. package/utils/deep-merge.js +24 -24
  123. package/utils/generate-commerce-search-params.ts +22 -22
  124. package/utils/get-currency.ts +29 -29
  125. package/utils/image-loader.ts +31 -31
  126. package/utils/index.ts +150 -150
  127. package/utils/localization.ts +29 -29
  128. package/utils/log.ts +138 -138
  129. package/utils/menu-generator.ts +27 -27
  130. package/utils/mobile-3d-iframe.ts +77 -77
  131. package/utils/server-translation.ts +57 -57
  132. package/utils/server-variables.ts +9 -9
  133. package/with-pz-config.js +94 -94
@@ -1,61 +1,61 @@
1
- import { createSlice } from '@reduxjs/toolkit';
2
- import Settings from 'settings';
3
-
4
- const initialState = {
5
- commerceUrl: Settings.commerceUrl,
6
- isMobileApp:
7
- typeof window !== 'undefined' &&
8
- localStorage.getItem('isMobileApp') === 'true',
9
- miniBasket: {
10
- open: false,
11
- highlightedItem: null
12
- },
13
- rootModal: {
14
- open: false,
15
- title: null,
16
- content: null
17
- }
18
- };
19
-
20
- const rootSlice = createSlice({
21
- name: 'root',
22
- initialState,
23
- reducers: {
24
- openMiniBasket: (state) => {
25
- state.miniBasket.open = true;
26
- },
27
- closeMiniBasket: (state) => {
28
- state.miniBasket.open = false;
29
- },
30
- toggleMiniBasket: (state) => {
31
- state.miniBasket.open = !state.miniBasket.open;
32
- },
33
- setHighlightedItem: (state, action: { payload: number | null }) => {
34
- state.miniBasket.highlightedItem = action.payload;
35
- },
36
- openRootModal: (
37
- state,
38
- action: { payload: { title?: string; content?: string } }
39
- ) => {
40
- state.rootModal.open = true;
41
- state.rootModal.title = action.payload.title;
42
- state.rootModal.content = action.payload.content;
43
- },
44
- closeRootModal: (state) => {
45
- state.rootModal.open = false;
46
- state.rootModal.title = null;
47
- state.rootModal.content = null;
48
- }
49
- }
50
- });
51
-
52
- export const {
53
- openMiniBasket,
54
- closeMiniBasket,
55
- toggleMiniBasket,
56
- setHighlightedItem,
57
- openRootModal,
58
- closeRootModal
59
- } = rootSlice.actions;
60
-
61
- export default rootSlice.reducer;
1
+ import { createSlice } from '@reduxjs/toolkit';
2
+ import Settings from 'settings';
3
+
4
+ const initialState = {
5
+ commerceUrl: Settings.commerceUrl,
6
+ isMobileApp:
7
+ typeof window !== 'undefined' &&
8
+ localStorage.getItem('isMobileApp') === 'true',
9
+ miniBasket: {
10
+ open: false,
11
+ highlightedItem: null
12
+ },
13
+ rootModal: {
14
+ open: false,
15
+ title: null,
16
+ content: null
17
+ }
18
+ };
19
+
20
+ const rootSlice = createSlice({
21
+ name: 'root',
22
+ initialState,
23
+ reducers: {
24
+ openMiniBasket: (state) => {
25
+ state.miniBasket.open = true;
26
+ },
27
+ closeMiniBasket: (state) => {
28
+ state.miniBasket.open = false;
29
+ },
30
+ toggleMiniBasket: (state) => {
31
+ state.miniBasket.open = !state.miniBasket.open;
32
+ },
33
+ setHighlightedItem: (state, action: { payload: number | null }) => {
34
+ state.miniBasket.highlightedItem = action.payload;
35
+ },
36
+ openRootModal: (
37
+ state,
38
+ action: { payload: { title?: string; content?: string } }
39
+ ) => {
40
+ state.rootModal.open = true;
41
+ state.rootModal.title = action.payload.title;
42
+ state.rootModal.content = action.payload.content;
43
+ },
44
+ closeRootModal: (state) => {
45
+ state.rootModal.open = false;
46
+ state.rootModal.title = null;
47
+ state.rootModal.content = null;
48
+ }
49
+ }
50
+ });
51
+
52
+ export const {
53
+ openMiniBasket,
54
+ closeMiniBasket,
55
+ toggleMiniBasket,
56
+ setHighlightedItem,
57
+ openRootModal,
58
+ closeRootModal
59
+ } = rootSlice.actions;
60
+
61
+ export default rootSlice.reducer;
package/sentry/index.ts CHANGED
@@ -1,27 +1,27 @@
1
- import * as Sentry from '@sentry/nextjs';
2
-
3
- const SENTRY_DSN: string =
4
- process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;
5
-
6
- export const initSentry = (
7
- type: 'Server' | 'Client' | 'Edge',
8
- options: Sentry.BrowserOptions | Sentry.NodeOptions | Sentry.EdgeOptions = {}
9
- ) => {
10
- // TODO: Handle options with ESLint rules
11
-
12
- // TODO: Remove Zero Project DSN
13
-
14
- Sentry.init({
15
- dsn:
16
- SENTRY_DSN ||
17
- 'https://d8558ef8997543deacf376c7d8d7cf4b@o64293.ingest.sentry.io/4504338423742464',
18
- initialScope: {
19
- tags: {
20
- APP_TYPE: 'ProjectZeroNext',
21
- TYPE: type
22
- }
23
- },
24
- tracesSampleRate: 1.0,
25
- integrations: []
26
- });
27
- };
1
+ import * as Sentry from '@sentry/nextjs';
2
+
3
+ const SENTRY_DSN: string =
4
+ process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;
5
+
6
+ export const initSentry = (
7
+ type: 'Server' | 'Client' | 'Edge',
8
+ options: Sentry.BrowserOptions | Sentry.NodeOptions | Sentry.EdgeOptions = {}
9
+ ) => {
10
+ // TODO: Handle options with ESLint rules
11
+
12
+ // TODO: Remove Zero Project DSN
13
+
14
+ Sentry.init({
15
+ dsn:
16
+ SENTRY_DSN ||
17
+ 'https://d8558ef8997543deacf376c7d8d7cf4b@o64293.ingest.sentry.io/4504338423742464',
18
+ initialScope: {
19
+ tags: {
20
+ APP_TYPE: 'ProjectZeroNext',
21
+ TYPE: type
22
+ }
23
+ },
24
+ tracesSampleRate: 1.0,
25
+ integrations: []
26
+ });
27
+ };
package/tailwind/rtl.js CHANGED
@@ -1,137 +1,137 @@
1
- const plugin = require('tailwindcss/plugin');
2
-
3
- module.exports = plugin(({ addUtilities, matchUtilities, theme, e }) => {
4
- const spacingUtilities = Object.entries(theme('spacing')).map(
5
- ([key, value]) => {
6
- return {
7
- [`[dir="rtl"] .${e(`pl-${key}`)}`]: {
8
- 'padding-right': `${value}`
9
- },
10
- [`[dir="rtl"] .${e(`pr-${key}`)}`]: {
11
- 'padding-left': `${value}`
12
- },
13
- [`[dir="rtl"] .${e(`ml-${key}`)}`]: {
14
- 'margin-right': `${value}`
15
- },
16
- [`[dir="rtl"] .${e(`mr-${key}`)}`]: {
17
- 'margin-left': `${value}`
18
- },
19
- [`[dir="rtl"] .${e(`pl-${key}`)}:not([class*="px-"])`]: {
20
- 'padding-left': '0'
21
- },
22
- [`[dir="rtl"] .${e(`pr-${key}`)}:not([class*="px-"])`]: {
23
- 'padding-right': '0'
24
- },
25
- [`[dir="rtl"] .${e(`ml-${key}`)}:not([class*="mx-"])`]: {
26
- 'margin-left': '0'
27
- },
28
- [`[dir="rtl"] .${e(`mr-${key}`)}:not([class*="mx-"])`]: {
29
- 'margin-right': '0'
30
- },
31
- [`[dir="rtl"] .${e(
32
- `space-x-${key}`
33
- )} > :not([hidden]) ~ :not([hidden])`]: {
34
- '--tw-space-x-reverse': '0',
35
- 'margin-right':
36
- 'calc(' + `${value}` + ' * calc(1 - var(--tw-space-x-reverse)))',
37
- 'margin-left': 'calc(' + `${value}` + ' * var(--tw-space-x-reverse))'
38
- }
39
- };
40
- }
41
- );
42
-
43
- addUtilities(spacingUtilities);
44
-
45
- const borderUtilities = Object.entries(theme('borderWidth')).map(
46
- ([key, value]) => {
47
- return {
48
- [`[dir="rtl"] .${e(`border-l-${key}`)}`]: {
49
- 'border-right-width': `${value}`,
50
- 'border-left-width': '0'
51
- }
52
- };
53
- }
54
- );
55
-
56
- addUtilities({
57
- [`[dir="rtl"] .${e(`border`)}`]: {
58
- 'border-right-width': '1px',
59
- 'border-left-width': '1px'
60
- },
61
- [`[dir="rtl"] .${e(`border-l`)}`]: {
62
- 'border-right-width': '1px',
63
- 'border-left-width': '0'
64
- },
65
- [`[dir="rtl"] .${e(`border-r`)}`]: {
66
- 'border-left-width': '1px',
67
- 'border-right-width': '0'
68
- },
69
- ...borderUtilities
70
- });
71
-
72
- const insetUtilities = Object.entries(theme('inset')).map(([key, value]) => {
73
- return {
74
- [`[dir="rtl"] .${e(`left-${key}`)}`]: {
75
- right: `${value}`
76
- },
77
- [`[dir="rtl"] .${e(`right-${key}`)}`]: {
78
- left: `${value}`
79
- },
80
- [`[dir="rtl"] .${e(`left-${key}`)}:not([class*="right-"])`]: {
81
- left: 'initial'
82
- },
83
- [`[dir="rtl"] .${e(`right-${key}`)}:not([class*="left-"])`]: {
84
- right: 'initial'
85
- }
86
- };
87
- });
88
-
89
- addUtilities(insetUtilities);
90
-
91
- const transformUtilities = Object.entries(theme('translate')).map(
92
- ([key, value]) => {
93
- let val = value;
94
- let negativeVal = value;
95
-
96
- if (value.startsWith('-')) {
97
- val = value.slice(1);
98
- } else {
99
- negativeVal = '-'.concat('', value);
100
- }
101
-
102
- return {
103
- [`[dir="rtl"] .${e(`-translate-x-${key}`)}`]: {
104
- '--tw-translate-x': `${val}`
105
- },
106
- [`[dir="rtl"] .${e(`translate-x-${key}`)}`]: {
107
- '--tw-translate-x': `${negativeVal}`
108
- }
109
- };
110
- }
111
- );
112
-
113
- addUtilities(transformUtilities);
114
-
115
- const divideUtilities = Object.entries(theme('divideWidth')).map(
116
- ([key, value]) => {
117
- return {
118
- [`[dir="rtl"] .${e(
119
- `divide-x-${key}`
120
- )} > :not([hidden]) ~ :not([hidden])`]: {
121
- '--tw-divide-x-reverse': '0',
122
- 'border-right-width': `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))`,
123
- 'border-left-width': `calc(${value} * var(--tw-divide-x-reverse))`
124
- }
125
- };
126
- }
127
- );
128
-
129
- addUtilities({
130
- [`[dir="rtl"] .${e(`divide-x`)} > :not([hidden]) ~ :not([hidden])`]: {
131
- '--tw-divide-x-reverse': '0',
132
- 'border-right-width': 'calc(1px * calc(1 - var(--tw-divide-x-reverse)))',
133
- 'border-left-width': 'calc(1px * var(--tw-divide-x-reverse))'
134
- },
135
- ...divideUtilities
136
- });
137
- });
1
+ const plugin = require('tailwindcss/plugin');
2
+
3
+ module.exports = plugin(({ addUtilities, matchUtilities, theme, e }) => {
4
+ const spacingUtilities = Object.entries(theme('spacing')).map(
5
+ ([key, value]) => {
6
+ return {
7
+ [`[dir="rtl"] .${e(`pl-${key}`)}`]: {
8
+ 'padding-right': `${value}`
9
+ },
10
+ [`[dir="rtl"] .${e(`pr-${key}`)}`]: {
11
+ 'padding-left': `${value}`
12
+ },
13
+ [`[dir="rtl"] .${e(`ml-${key}`)}`]: {
14
+ 'margin-right': `${value}`
15
+ },
16
+ [`[dir="rtl"] .${e(`mr-${key}`)}`]: {
17
+ 'margin-left': `${value}`
18
+ },
19
+ [`[dir="rtl"] .${e(`pl-${key}`)}:not([class*="px-"])`]: {
20
+ 'padding-left': '0'
21
+ },
22
+ [`[dir="rtl"] .${e(`pr-${key}`)}:not([class*="px-"])`]: {
23
+ 'padding-right': '0'
24
+ },
25
+ [`[dir="rtl"] .${e(`ml-${key}`)}:not([class*="mx-"])`]: {
26
+ 'margin-left': '0'
27
+ },
28
+ [`[dir="rtl"] .${e(`mr-${key}`)}:not([class*="mx-"])`]: {
29
+ 'margin-right': '0'
30
+ },
31
+ [`[dir="rtl"] .${e(
32
+ `space-x-${key}`
33
+ )} > :not([hidden]) ~ :not([hidden])`]: {
34
+ '--tw-space-x-reverse': '0',
35
+ 'margin-right':
36
+ 'calc(' + `${value}` + ' * calc(1 - var(--tw-space-x-reverse)))',
37
+ 'margin-left': 'calc(' + `${value}` + ' * var(--tw-space-x-reverse))'
38
+ }
39
+ };
40
+ }
41
+ );
42
+
43
+ addUtilities(spacingUtilities);
44
+
45
+ const borderUtilities = Object.entries(theme('borderWidth')).map(
46
+ ([key, value]) => {
47
+ return {
48
+ [`[dir="rtl"] .${e(`border-l-${key}`)}`]: {
49
+ 'border-right-width': `${value}`,
50
+ 'border-left-width': '0'
51
+ }
52
+ };
53
+ }
54
+ );
55
+
56
+ addUtilities({
57
+ [`[dir="rtl"] .${e(`border`)}`]: {
58
+ 'border-right-width': '1px',
59
+ 'border-left-width': '1px'
60
+ },
61
+ [`[dir="rtl"] .${e(`border-l`)}`]: {
62
+ 'border-right-width': '1px',
63
+ 'border-left-width': '0'
64
+ },
65
+ [`[dir="rtl"] .${e(`border-r`)}`]: {
66
+ 'border-left-width': '1px',
67
+ 'border-right-width': '0'
68
+ },
69
+ ...borderUtilities
70
+ });
71
+
72
+ const insetUtilities = Object.entries(theme('inset')).map(([key, value]) => {
73
+ return {
74
+ [`[dir="rtl"] .${e(`left-${key}`)}`]: {
75
+ right: `${value}`
76
+ },
77
+ [`[dir="rtl"] .${e(`right-${key}`)}`]: {
78
+ left: `${value}`
79
+ },
80
+ [`[dir="rtl"] .${e(`left-${key}`)}:not([class*="right-"])`]: {
81
+ left: 'initial'
82
+ },
83
+ [`[dir="rtl"] .${e(`right-${key}`)}:not([class*="left-"])`]: {
84
+ right: 'initial'
85
+ }
86
+ };
87
+ });
88
+
89
+ addUtilities(insetUtilities);
90
+
91
+ const transformUtilities = Object.entries(theme('translate')).map(
92
+ ([key, value]) => {
93
+ let val = value;
94
+ let negativeVal = value;
95
+
96
+ if (value.startsWith('-')) {
97
+ val = value.slice(1);
98
+ } else {
99
+ negativeVal = '-'.concat('', value);
100
+ }
101
+
102
+ return {
103
+ [`[dir="rtl"] .${e(`-translate-x-${key}`)}`]: {
104
+ '--tw-translate-x': `${val}`
105
+ },
106
+ [`[dir="rtl"] .${e(`translate-x-${key}`)}`]: {
107
+ '--tw-translate-x': `${negativeVal}`
108
+ }
109
+ };
110
+ }
111
+ );
112
+
113
+ addUtilities(transformUtilities);
114
+
115
+ const divideUtilities = Object.entries(theme('divideWidth')).map(
116
+ ([key, value]) => {
117
+ return {
118
+ [`[dir="rtl"] .${e(
119
+ `divide-x-${key}`
120
+ )} > :not([hidden]) ~ :not([hidden])`]: {
121
+ '--tw-divide-x-reverse': '0',
122
+ 'border-right-width': `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))`,
123
+ 'border-left-width': `calc(${value} * var(--tw-divide-x-reverse))`
124
+ }
125
+ };
126
+ }
127
+ );
128
+
129
+ addUtilities({
130
+ [`[dir="rtl"] .${e(`divide-x`)} > :not([hidden]) ~ :not([hidden])`]: {
131
+ '--tw-divide-x-reverse': '0',
132
+ 'border-right-width': 'calc(1px * calc(1 - var(--tw-divide-x-reverse)))',
133
+ 'border-left-width': 'calc(1px * var(--tw-divide-x-reverse))'
134
+ },
135
+ ...divideUtilities
136
+ });
137
+ });
@@ -1,64 +1,64 @@
1
- export type AccountCancellationReason = {
2
- id: number;
3
- uuid: string;
4
- cancellation_type: string;
5
- created_date: string;
6
- extra_information_needed: boolean;
7
- is_active: boolean;
8
- modified_date: string;
9
- order: number;
10
- subject: string;
11
- translations: object;
12
- };
13
-
14
- export type AccountOrderCancellation = {
15
- return_policy: boolean;
16
- id: string;
17
- cancel_order_items: Array<{
18
- cancellation_type: string;
19
- description: string;
20
- order_item: string;
21
- reason: string;
22
- }>;
23
- };
24
-
25
- export type AccountOrderCancellationReason = {
26
- count: number;
27
- next: string;
28
- previous: null | string;
29
- results: AccountCancellationReason[];
30
- };
31
-
32
- export type AccountChangeEmailFormType = {
33
- email: string;
34
- emailConfirm: string;
35
- password: string;
36
- };
37
-
38
- export type AccountChangePasswordFormType = {
39
- old_password: string;
40
- new_password1: string;
41
- new_password2: string;
42
- };
43
-
44
- export type AccountProfileFormType = {
45
- date_of_birth: string;
46
- email_allowed: boolean;
47
- first_name: string;
48
- gender: string;
49
- last_name: string;
50
- phone: string;
51
- sms_allowed: boolean;
52
- [key: string]: any;
53
- };
54
-
55
- export type ContactFormType = {
56
- full_name: string;
57
- email: string;
58
- phone: string;
59
- subject: string;
60
- message: string;
61
- order?: string;
62
- country_code?: string;
63
- order_needed?: boolean;
64
- };
1
+ export type AccountCancellationReason = {
2
+ id: number;
3
+ uuid: string;
4
+ cancellation_type: string;
5
+ created_date: string;
6
+ extra_information_needed: boolean;
7
+ is_active: boolean;
8
+ modified_date: string;
9
+ order: number;
10
+ subject: string;
11
+ translations: object;
12
+ };
13
+
14
+ export type AccountOrderCancellation = {
15
+ return_policy: boolean;
16
+ id: string;
17
+ cancel_order_items: Array<{
18
+ cancellation_type: string;
19
+ description: string;
20
+ order_item: string;
21
+ reason: string;
22
+ }>;
23
+ };
24
+
25
+ export type AccountOrderCancellationReason = {
26
+ count: number;
27
+ next: string;
28
+ previous: null | string;
29
+ results: AccountCancellationReason[];
30
+ };
31
+
32
+ export type AccountChangeEmailFormType = {
33
+ email: string;
34
+ emailConfirm: string;
35
+ password: string;
36
+ };
37
+
38
+ export type AccountChangePasswordFormType = {
39
+ old_password: string;
40
+ new_password1: string;
41
+ new_password2: string;
42
+ };
43
+
44
+ export type AccountProfileFormType = {
45
+ date_of_birth: string;
46
+ email_allowed: boolean;
47
+ first_name: string;
48
+ gender: string;
49
+ last_name: string;
50
+ phone: string;
51
+ sms_allowed: boolean;
52
+ [key: string]: any;
53
+ };
54
+
55
+ export type ContactFormType = {
56
+ full_name: string;
57
+ email: string;
58
+ phone: string;
59
+ subject: string;
60
+ message: string;
61
+ order?: string;
62
+ country_code?: string;
63
+ order_needed?: boolean;
64
+ };