@akinon/next 1.92.0-rc.36 → 1.92.0-rc.38

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,7 +1,23 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.92.0-rc.38
4
+
5
+ ### Minor Changes
6
+
7
+ - c480272: ZERO-3531: Refactor checkoutApi: Remove unnecessary invalidatesTags property from POST request from sample products
8
+
9
+ ## 1.92.0-rc.37
10
+
11
+ ### Minor Changes
12
+
13
+ - 0e823010: ZERO-3531: Add saveSampleProducts endpoint
14
+
3
15
  ## 1.92.0-rc.36
4
16
 
17
+ ### Minor Changes
18
+
19
+ - 86642cfa: ZERO-3531: Add saveSampleProducts endpoint and update URLs in checkout
20
+
5
21
  ## 1.92.0-rc.35
6
22
 
7
23
  ### Minor Changes
@@ -867,6 +867,21 @@ export const checkoutApi = api.injectEndpoints({
867
867
  method: 'POST',
868
868
  body
869
869
  })
870
+ }),
871
+ saveSampleProducts: build.mutation<CheckoutResponse, number[] | undefined>({
872
+ query: (products = []) => {
873
+ const formData = new FormData();
874
+
875
+ products.forEach((product) => {
876
+ formData.append('sample_products', String(product));
877
+ });
878
+
879
+ return {
880
+ url: buildClientRequestUrl(checkout.saveSampleProducts),
881
+ method: 'POST',
882
+ body: formData
883
+ };
884
+ }
870
885
  })
871
886
  }),
872
887
  overrideExisting: false
@@ -914,5 +929,6 @@ export const {
914
929
  useSetWalletCompletePageMutation,
915
930
  useSendSmsMutation,
916
931
  useVerifySmsMutation,
917
- useResetCheckoutStateQuery
932
+ useResetCheckoutStateQuery,
933
+ useSaveSampleProductsMutation
918
934
  } = checkoutApi;
package/data/urls.ts CHANGED
@@ -142,7 +142,8 @@ export const checkout = {
142
142
  setOrderSelectionPage: '/orders/checkout/?page=OrderSelectionPage',
143
143
  loyaltyCardPage: '/orders/checkout/?page=LoyaltyCardPage',
144
144
  sendSmsPage: '/orders/checkout/?page=SendSmsPage',
145
- verifySmsPage: '/orders/checkout/?page=VerifySmsPage'
145
+ verifySmsPage: '/orders/checkout/?page=VerifySmsPage',
146
+ saveSampleProducts: '/orders/checkout/?page=SampleProductPage'
146
147
  };
147
148
 
148
149
  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.92.0-rc.36",
4
+ "version": "1.92.0-rc.38",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -34,7 +34,7 @@
34
34
  "set-cookie-parser": "2.6.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@akinon/eslint-plugin-projectzero": "1.92.0-rc.36",
37
+ "@akinon/eslint-plugin-projectzero": "1.92.0-rc.38",
38
38
  "@babel/core": "7.26.10",
39
39
  "@babel/preset-env": "7.26.9",
40
40
  "@babel/preset-typescript": "7.27.0",