@akinon/next 2.0.0-beta.14 → 2.0.0-beta.15
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/CHANGELOG.md +8 -0
- package/data/client/account.ts +12 -1
- package/middlewares/default.ts +6 -1
- package/package.json +2 -2
- package/with-pz-config.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @akinon/next
|
|
2
2
|
|
|
3
|
+
## 2.0.0-beta.15
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 49c82e1a: ZERO-4047: Remove Sentry configuration from default Next.js config
|
|
8
|
+
- d7e5178b: ZERO-3985: Add query string handling for orders redirection in middleware
|
|
9
|
+
- b59fdd1c: ZERO-4009: Add password reset token validation
|
|
10
|
+
|
|
3
11
|
## 2.0.0-beta.14
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/data/client/account.ts
CHANGED
|
@@ -77,6 +77,10 @@ interface LoyaltyTransactions {
|
|
|
77
77
|
}[];
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
interface PasswordResetValidateResponse {
|
|
81
|
+
validlink: boolean;
|
|
82
|
+
}
|
|
83
|
+
|
|
80
84
|
const accountApi = api.injectEndpoints({
|
|
81
85
|
endpoints: (builder) => ({
|
|
82
86
|
updatePassword: builder.mutation<void, AccountChangePasswordFormType>({
|
|
@@ -221,6 +225,12 @@ const accountApi = api.injectEndpoints({
|
|
|
221
225
|
}),
|
|
222
226
|
getLoyaltyTransactions: builder.query<LoyaltyTransactions, void>({
|
|
223
227
|
query: () => buildClientRequestUrl(account.loyaltyTransactions)
|
|
228
|
+
}),
|
|
229
|
+
getValidatePasswordResetToken: builder.query<
|
|
230
|
+
PasswordResetValidateResponse,
|
|
231
|
+
string
|
|
232
|
+
>({
|
|
233
|
+
query: (slug) => buildClientRequestUrl(account.passwordReset(slug))
|
|
224
234
|
})
|
|
225
235
|
}),
|
|
226
236
|
overrideExisting: true
|
|
@@ -247,5 +257,6 @@ export const {
|
|
|
247
257
|
usePasswordResetMutation,
|
|
248
258
|
useAnonymizeMutation,
|
|
249
259
|
useGetLoyaltyBalanceQuery,
|
|
250
|
-
useGetLoyaltyTransactionsQuery
|
|
260
|
+
useGetLoyaltyTransactionsQuery,
|
|
261
|
+
useGetValidatePasswordResetTokenQuery
|
|
251
262
|
} = accountApi;
|
package/middlewares/default.ts
CHANGED
|
@@ -132,8 +132,13 @@ const withPzDefault =
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
if (req.nextUrl.pathname.startsWith('/orders/redirection/')) {
|
|
135
|
+
const queryString = searchParams.toString();
|
|
135
136
|
return NextResponse.rewrite(
|
|
136
|
-
new URL(
|
|
137
|
+
new URL(
|
|
138
|
+
`${encodeURI(Settings.commerceUrl)}/orders/redirection/${
|
|
139
|
+
queryString ? `?${queryString}` : ''
|
|
140
|
+
}`
|
|
141
|
+
)
|
|
137
142
|
);
|
|
138
143
|
}
|
|
139
144
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/next",
|
|
3
3
|
"description": "Core package for Project Zero Next",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.15",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"set-cookie-parser": "2.6.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@akinon/eslint-plugin-projectzero": "2.0.0-beta.
|
|
38
|
+
"@akinon/eslint-plugin-projectzero": "2.0.0-beta.15",
|
|
39
39
|
"@babel/core": "7.26.10",
|
|
40
40
|
"@babel/preset-env": "7.26.9",
|
|
41
41
|
"@babel/preset-typescript": "7.27.0",
|