@akinon/next 1.48.0 → 1.49.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,14 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.49.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 26b809f: ZERO-2898: Add bags_fee property to PreOrder interface
8
+ - 20da358: ZERO-2898: Add setDeliveryBags mutation to checkout api
9
+ - 04115e5: ZERO-2898: Update PreOrder type
10
+ - fa88889: ZERO-2898: Make bags_fee property optional in PreOrder interface
11
+
3
12
  ## 1.48.0
4
13
 
5
14
  ## 1.47.0
@@ -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/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 = {
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.48.0",
4
+ "version": "1.49.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.48.0",
37
+ "@akinon/eslint-plugin-projectzero": "1.49.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 {