@akinon/next 1.92.0-rc.35 → 1.92.0-rc.37

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,17 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.92.0-rc.37
4
+
5
+ ### Minor Changes
6
+
7
+ - 0e823010: ZERO-3531: Add saveSampleProducts endpoint
8
+
9
+ ## 1.92.0-rc.36
10
+
11
+ ### Minor Changes
12
+
13
+ - 86642cfa: ZERO-3531: Add saveSampleProducts endpoint and update URLs in checkout
14
+
3
15
  ## 1.92.0-rc.35
4
16
 
5
17
  ### Minor Changes
@@ -867,6 +867,22 @@ 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
+ },
885
+ invalidatesTags: ['Checkout']
870
886
  })
871
887
  }),
872
888
  overrideExisting: false
@@ -914,5 +930,6 @@ export const {
914
930
  useSetWalletCompletePageMutation,
915
931
  useSendSmsMutation,
916
932
  useVerifySmsMutation,
917
- useResetCheckoutStateQuery
933
+ useResetCheckoutStateQuery,
934
+ useSaveSampleProductsMutation
918
935
  } = 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.35",
4
+ "version": "1.92.0-rc.37",
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.35",
37
+ "@akinon/eslint-plugin-projectzero": "1.92.0-rc.37",
38
38
  "@babel/core": "7.26.10",
39
39
  "@babel/preset-env": "7.26.9",
40
40
  "@babel/preset-typescript": "7.27.0",