@akinon/next 1.47.0-rc.1 → 1.47.0-rc.2
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 +6 -0
- package/data/client/wishlist.ts +17 -1
- package/data/urls.ts +2 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/data/client/wishlist.ts
CHANGED
|
@@ -68,6 +68,7 @@ export interface CollectionItem {
|
|
|
68
68
|
name: string;
|
|
69
69
|
slug: string;
|
|
70
70
|
items: Product[];
|
|
71
|
+
public_url: string;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
export interface CollectionItemsResponse {
|
|
@@ -168,6 +169,20 @@ export const wishlistApi = api.injectEndpoints({
|
|
|
168
169
|
url: buildClientRequestUrl(wishlist.deleteCollection(pk)),
|
|
169
170
|
method: 'DELETE'
|
|
170
171
|
})
|
|
172
|
+
}),
|
|
173
|
+
editCollection: build.mutation<
|
|
174
|
+
CollectionItem,
|
|
175
|
+
{ name: string; pk: number }
|
|
176
|
+
>({
|
|
177
|
+
query: ({ name, pk }) => ({
|
|
178
|
+
url: buildClientRequestUrl(wishlist.editCollection(pk), {
|
|
179
|
+
contentType: 'application/json'
|
|
180
|
+
}),
|
|
181
|
+
method: 'PATCH',
|
|
182
|
+
body: {
|
|
183
|
+
name
|
|
184
|
+
}
|
|
185
|
+
})
|
|
171
186
|
})
|
|
172
187
|
}),
|
|
173
188
|
overrideExisting: true
|
|
@@ -184,5 +199,6 @@ export const {
|
|
|
184
199
|
useSetCollectionItemsMutation,
|
|
185
200
|
useGetCollectionsOOSQuery,
|
|
186
201
|
useLazyGetCollectionsOOSQuery,
|
|
187
|
-
useLazyDeleteCollectionQuery
|
|
202
|
+
useLazyDeleteCollectionQuery,
|
|
203
|
+
useEditCollectionMutation
|
|
188
204
|
} = wishlistApi;
|
package/data/urls.ts
CHANGED
|
@@ -172,7 +172,8 @@ export const wishlist = {
|
|
|
172
172
|
`/wishlists/user-collections/?search=${search ? search : ''}&product_id=${
|
|
173
173
|
product_id ? product_id : ''
|
|
174
174
|
}`,
|
|
175
|
-
deleteCollection: (pk: number) => `/wishlists/user-collections/${pk}
|
|
175
|
+
deleteCollection: (pk: number) => `/wishlists/user-collections/${pk}/`,
|
|
176
|
+
editCollection: (pk: number) => `/wishlists/user-collections/${pk}/`
|
|
176
177
|
};
|
|
177
178
|
|
|
178
179
|
export const user = {
|
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.47.0-rc.
|
|
4
|
+
"version": "1.47.0-rc.2",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"set-cookie-parser": "2.6.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@akinon/eslint-plugin-projectzero": "1.47.0-rc.
|
|
33
|
+
"@akinon/eslint-plugin-projectzero": "1.47.0-rc.2",
|
|
34
34
|
"@types/react-redux": "7.1.30",
|
|
35
35
|
"@types/set-cookie-parser": "2.4.7",
|
|
36
36
|
"@typescript-eslint/eslint-plugin": "6.7.4",
|