@wearejh/m2-pwa-checkout 0.31.2 → 0.31.3

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
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.31.3](https://github.com/WeareJH/mage-mono/compare/v0.31.2...v0.31.3) (2025-05-29)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **WOOD-1420:** Returning the entity id from the checkout epic ([df55a5b](https://github.com/WeareJH/mage-mono/commit/df55a5ba4d9ef184751c764111d93f181474fa56))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [0.31.2](https://github.com/WeareJH/mage-mono/compare/v0.31.1...v0.31.2) (2025-03-07)
7
18
 
8
19
  **Note:** Version bump only for package @wearejh/m2-pwa-checkout
@@ -85,7 +85,7 @@ type Messages = {
85
85
  * The final action dispatched to show the
86
86
  * checkout has completed.
87
87
  */
88
- ['Checkout.Complete']: { orderId: string };
88
+ ['Checkout.Complete']: { orderId: string; entityId?: string };
89
89
 
90
90
  ['Checkout.SetPendingPayment']: PaymentPendingParams;
91
91
  ['Checkout.AttemptPaymentProcess']: { [index: string]: any };
@@ -44,6 +44,7 @@ export type CheckoutState = {
44
44
  tempShippingAddress: CustomerDataAddressInterface | null;
45
45
  messages: Message[];
46
46
  orderId?: string | number | null;
47
+ entityId?: string | number | null;
47
48
  pendingPayment: PaymentPendingParams | null;
48
49
  totals: QuoteDataTotalsInterface | null;
49
50
  };
@@ -216,6 +217,7 @@ export function checkoutReducer(state = initialState, action: Handler): Checkout
216
217
  return {
217
218
  ...state,
218
219
  orderId: action.payload.orderId,
220
+ entityId: action.payload.entityId,
219
221
  };
220
222
  }
221
223
 
@@ -39,7 +39,7 @@ export function getOrderIncrementId(action$: Observable<any>, state$: any, deps:
39
39
  /**
40
40
  * Payload OrderID as a number.
41
41
  */
42
- const orderId = parseInt(payload.orderId);
42
+ const entityId = parseInt(payload.orderId);
43
43
 
44
44
  /**
45
45
  * The Order increment ID for
@@ -54,17 +54,17 @@ export function getOrderIncrementId(action$: Observable<any>, state$: any, deps:
54
54
  * - the same order id that the user receives in
55
55
  * the order confirmation email.
56
56
  */
57
- return getJHOrderIDQuery({ orderId }, deps).pipe(
57
+ return getJHOrderIDQuery({ orderId: entityId }, deps).pipe(
58
58
  /**
59
59
  * Handle the success response from the
60
60
  * API query.
61
61
  */
62
62
  mergeMap((response: any) => {
63
- const orderId = response.increment_id ?? null;
63
+ const incrementId = response.increment_id ?? null;
64
64
 
65
65
  return of(
66
66
  CheckoutMsg('Checkout.Complete', {
67
- orderId,
67
+ orderId: incrementId,
68
68
  }),
69
69
  );
70
70
  }),
@@ -85,7 +85,7 @@ export function getOrderIncrementId(action$: Observable<any>, state$: any, deps:
85
85
  * The Order increment ID for
86
86
  * Guest users.
87
87
  */
88
- return getGuestJHOrderIDQuery({ entityId: orderId }, deps).pipe(
88
+ return getGuestJHOrderIDQuery({ entityId }, deps).pipe(
89
89
  /**
90
90
  * Handle the success response from the
91
91
  * API query.
@@ -100,6 +100,7 @@ export function getOrderIncrementId(action$: Observable<any>, state$: any, deps:
100
100
  return of(
101
101
  CheckoutMsg('Checkout.Complete', {
102
102
  orderId: orderId ?? payload.orderId,
103
+ entityId: String(entityId),
103
104
  }),
104
105
  );
105
106
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wearejh/m2-pwa-checkout",
3
- "version": "0.31.2",
3
+ "version": "0.31.3",
4
4
  "description": "> TODO: description",
5
5
  "author": "Shane Osbourne <shane.osbourne8@gmail.com>",
6
6
  "homepage": "",
@@ -18,15 +18,15 @@
18
18
  ],
19
19
  "scripts": {},
20
20
  "dependencies": {
21
- "@wearejh/m2-pwa-addresses": "^0.31.2",
22
- "@wearejh/m2-pwa-cart": "^0.31.2",
23
- "@wearejh/m2-pwa-engine": "^0.31.2",
24
- "@wearejh/m2-pwa-user": "^0.31.2",
25
- "@wearejh/rx-form": "^0.31.2",
26
- "@wearejh/swagger-rxjs": "^0.31.2"
21
+ "@wearejh/m2-pwa-addresses": "^0.31.3",
22
+ "@wearejh/m2-pwa-cart": "^0.31.3",
23
+ "@wearejh/m2-pwa-engine": "^0.31.3",
24
+ "@wearejh/m2-pwa-user": "^0.31.3",
25
+ "@wearejh/rx-form": "^0.31.3",
26
+ "@wearejh/swagger-rxjs": "^0.31.3"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@reach/dialog": "0.8.2"
30
30
  },
31
- "gitHead": "28bab0e1d16e2dcb63fc54b80a6c96836c660e8b"
31
+ "gitHead": "0f56ce50fec7bd382cba1517b15c5baeb00fe301"
32
32
  }