@akinon/next 1.48.0 → 1.50.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 +15 -0
- package/data/client/checkout.ts +21 -1
- package/data/client/wishlist.ts +8 -1
- package/data/urls.ts +4 -1
- package/package.json +2 -2
- package/types/commerce/checkout.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @akinon/next
|
|
2
2
|
|
|
3
|
+
## 1.50.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- eaf97d6: ZERO-2909: Add deleteCollectionItem query to wishlistApi
|
|
8
|
+
|
|
9
|
+
## 1.49.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 26b809f: ZERO-2898: Add bags_fee property to PreOrder interface
|
|
14
|
+
- 20da358: ZERO-2898: Add setDeliveryBags mutation to checkout api
|
|
15
|
+
- 04115e5: ZERO-2898: Update PreOrder type
|
|
16
|
+
- fa88889: ZERO-2898: Make bags_fee property optional in PreOrder interface
|
|
17
|
+
|
|
3
18
|
## 1.48.0
|
|
4
19
|
|
|
5
20
|
## 1.47.0
|
package/data/client/checkout.ts
CHANGED
|
@@ -654,6 +654,25 @@ export const checkoutApi = api.injectEndpoints({
|
|
|
654
654
|
notes
|
|
655
655
|
}
|
|
656
656
|
})
|
|
657
|
+
}),
|
|
658
|
+
setDeliveryBags: build.mutation<
|
|
659
|
+
CheckoutResponse,
|
|
660
|
+
{ sku: string; quantity?: number }
|
|
661
|
+
>({
|
|
662
|
+
query: ({ sku, quantity }) => {
|
|
663
|
+
const body = {
|
|
664
|
+
product: sku,
|
|
665
|
+
...(quantity !== undefined && { quantity })
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
return {
|
|
669
|
+
url: buildClientRequestUrl(checkout.deliveryBagsPage, {
|
|
670
|
+
useFormData: true
|
|
671
|
+
}),
|
|
672
|
+
method: 'POST',
|
|
673
|
+
body
|
|
674
|
+
};
|
|
675
|
+
}
|
|
657
676
|
})
|
|
658
677
|
}),
|
|
659
678
|
overrideExisting: false
|
|
@@ -688,5 +707,6 @@ export const {
|
|
|
688
707
|
useCompleteLoyaltyPaymentMutation,
|
|
689
708
|
useGetCheckoutLoyaltyBalanceQuery,
|
|
690
709
|
usePayWithLoyaltyBalanceMutation,
|
|
691
|
-
useSetOrderNoteMutation
|
|
710
|
+
useSetOrderNoteMutation,
|
|
711
|
+
useSetDeliveryBagsMutation
|
|
692
712
|
} = checkoutApi;
|
package/data/client/wishlist.ts
CHANGED
|
@@ -170,6 +170,12 @@ export const wishlistApi = api.injectEndpoints({
|
|
|
170
170
|
method: 'DELETE'
|
|
171
171
|
})
|
|
172
172
|
}),
|
|
173
|
+
deleteCollectionItem: build.query<void, number>({
|
|
174
|
+
query: (pk: number) => ({
|
|
175
|
+
url: buildClientRequestUrl(wishlist.deleteCollectionItem(pk)),
|
|
176
|
+
method: 'DELETE'
|
|
177
|
+
})
|
|
178
|
+
}),
|
|
173
179
|
editCollection: build.mutation<
|
|
174
180
|
CollectionItem,
|
|
175
181
|
{ name: string; pk: number }
|
|
@@ -200,5 +206,6 @@ export const {
|
|
|
200
206
|
useGetCollectionsOOSQuery,
|
|
201
207
|
useLazyGetCollectionsOOSQuery,
|
|
202
208
|
useLazyDeleteCollectionQuery,
|
|
203
|
-
useEditCollectionMutation
|
|
209
|
+
useEditCollectionMutation,
|
|
210
|
+
useDeleteCollectionItemQuery
|
|
204
211
|
} = wishlistApi;
|
package/data/urls.ts
CHANGED
|
@@ -108,7 +108,8 @@ export const checkout = {
|
|
|
108
108
|
completeLoyaltyPayment: '/orders/checkout/?page=LoyaltyPaymentSelectedPage',
|
|
109
109
|
loyaltyMoneyUsage: '/orders/checkout/?page=LoyaltyMoneyUsagePage',
|
|
110
110
|
setOrderNote: '/orders/checkout/?page=OrderNotePage',
|
|
111
|
-
couponSelectionPage: '/orders/checkout/?page=CouponSelectionPage'
|
|
111
|
+
couponSelectionPage: '/orders/checkout/?page=CouponSelectionPage',
|
|
112
|
+
deliveryBagsPage: '/orders/checkout/?page=DeliveryBagsPage'
|
|
112
113
|
};
|
|
113
114
|
|
|
114
115
|
export const flatpage = {
|
|
@@ -169,6 +170,8 @@ export const wishlist = {
|
|
|
169
170
|
product_id ? product_id : ''
|
|
170
171
|
}`,
|
|
171
172
|
deleteCollection: (pk: number) => `/wishlists/user-collections/${pk}/`,
|
|
173
|
+
deleteCollectionItem: (pk: number) =>
|
|
174
|
+
`/wishlists/user-collection-items/${pk}/`,
|
|
172
175
|
editCollection: (pk: number) => `/wishlists/user-collections/${pk}/`
|
|
173
176
|
};
|
|
174
177
|
|
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.
|
|
4
|
+
"version": "1.50.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@typescript-eslint/eslint-plugin": "6.7.4",
|
|
35
35
|
"@typescript-eslint/parser": "6.7.4",
|
|
36
36
|
"eslint": "^8.14.0",
|
|
37
|
-
"@akinon/eslint-plugin-projectzero": "1.
|
|
37
|
+
"@akinon/eslint-plugin-projectzero": "1.50.0",
|
|
38
38
|
"eslint-config-prettier": "8.5.0"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -2,6 +2,7 @@ import { Address } from './address';
|
|
|
2
2
|
import { Basket } from './basket';
|
|
3
3
|
import { RetailStore } from './misc';
|
|
4
4
|
import { PaymentOption } from './order';
|
|
5
|
+
import { Product } from './product';
|
|
5
6
|
|
|
6
7
|
export enum CheckoutStep {
|
|
7
8
|
Shipping = 'shipping',
|
|
@@ -78,6 +79,8 @@ export interface PreOrder {
|
|
|
78
79
|
retail_store?: RetailStore;
|
|
79
80
|
gift_box?: GiftBox;
|
|
80
81
|
credit_payment_option?: CheckoutCreditPaymentOption;
|
|
82
|
+
bags?: Product[];
|
|
83
|
+
bags_fee?: string;
|
|
81
84
|
}
|
|
82
85
|
|
|
83
86
|
export interface GuestLoginFormParams {
|