@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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ZERO-2330: Fix logout endpoint
8
+ - ZERO-2327: Add service for bulk cancellation
9
+
3
10
  ## 1.9.0
4
11
 
5
12
  ### Minor Changes
@@ -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/',
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": "1.9.0",
4
+ "version": "1.10.0",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {