@akinon/next 1.9.0 → 1.10.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/CHANGELOG.md +7 -0
- package/data/client/account.ts +10 -0
- package/data/urls.ts +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/data/client/account.ts
CHANGED
|
@@ -130,6 +130,15 @@ const accountApi = api.injectEndpoints({
|
|
|
130
130
|
body
|
|
131
131
|
})
|
|
132
132
|
}),
|
|
133
|
+
bulkCancellation: builder.mutation<void, AccountOrderCancellation>({
|
|
134
|
+
query: (body) => ({
|
|
135
|
+
url: buildClientRequestUrl(account.bulkCancellationRequest, {
|
|
136
|
+
contentType: 'application/json'
|
|
137
|
+
}),
|
|
138
|
+
method: 'POST',
|
|
139
|
+
body
|
|
140
|
+
})
|
|
141
|
+
}),
|
|
133
142
|
getCancellationReasons: builder.query<AccountOrderCancellationReason, void>(
|
|
134
143
|
{
|
|
135
144
|
query: () => buildClientRequestUrl(account.cancellationReasons)
|
|
@@ -186,6 +195,7 @@ export const {
|
|
|
186
195
|
useUpdateProfileMutation,
|
|
187
196
|
useGetProfileInfoQuery,
|
|
188
197
|
useCancelOrderMutation,
|
|
198
|
+
useBulkCancellationMutation,
|
|
189
199
|
useGetCancellationReasonsQuery,
|
|
190
200
|
useGetBasketOffersQuery,
|
|
191
201
|
useGetFutureBasketOffersQuery,
|
package/data/urls.ts
CHANGED
|
@@ -7,6 +7,7 @@ export const account = {
|
|
|
7
7
|
order: '/users/orders/',
|
|
8
8
|
orderId: (id: string | string[]) => `/users/orders/${id}/`,
|
|
9
9
|
cancelOrder: (id: string) => `/orders/${id}/cancel/`,
|
|
10
|
+
bulkCancellationRequest: '/users/orders/bulk_cancellation_requests/',
|
|
10
11
|
cancellationReasons: '/users/orders/cancellation_reasons/',
|
|
11
12
|
updatePassword: '/users/password/change/',
|
|
12
13
|
updateEmail: '/users/email-change/',
|
|
@@ -144,7 +145,7 @@ export const user = {
|
|
|
144
145
|
currentUser: '/current_user/',
|
|
145
146
|
login: '/users/login/',
|
|
146
147
|
register: '/users/registration/',
|
|
147
|
-
logout: '/users/logout
|
|
148
|
+
logout: '/users/logout',
|
|
148
149
|
captcha: '/users/pz-captcha/',
|
|
149
150
|
profiles: '/users/profile/',
|
|
150
151
|
forgotPassword: '/users/password/reset/',
|