@zeniai/client-epic-state 4.17.60 → 4.17.61

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.
@@ -0,0 +1 @@
1
+ export declare const ZENI_ENTITY_PAYLOAD_KEY = "qbo_id";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZENI_ENTITY_PAYLOAD_KEY = void 0;
4
+ exports.ZENI_ENTITY_PAYLOAD_KEY = 'qbo_id';
@@ -0,0 +1 @@
1
+ export declare const ZENI_ENTITY_STATE_KEY = "qboId";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZENI_ENTITY_STATE_KEY = void 0;
4
+ exports.ZENI_ENTITY_STATE_KEY = 'qboId';
@@ -55,27 +55,30 @@ const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(
55
55
  ((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.transaction) === null || _b === void 0 ? void 0 : _b.transaction_id) != null) {
56
56
  const updateActions = [];
57
57
  const transcationId = (0, transactionIDPayload_1.toTransactionID)(response.data.transaction);
58
- if (response.data.vendors != null) {
59
- updateActions.push((0, vendorReducer_1.updateVendors)(response.data.vendors, 'merge'));
58
+ const responseData = Object.assign(Object.assign({}, response.data), { vendors: (_d = (_c = response.data.vendors) === null || _c === void 0 ? void 0 : _c.map((vendor) => {
59
+ var _a;
60
+ return (Object.assign(Object.assign({}, vendor), { vendor_id: (_a = vendor.qbo_id) !== null && _a !== void 0 ? _a : vendor.vendor_id }));
61
+ })) !== null && _d !== void 0 ? _d : [] });
62
+ if (responseData.vendors.length > 0) {
63
+ updateActions.push((0, vendorReducer_1.updateVendors)(responseData.vendors, 'merge'));
60
64
  }
61
65
  const transactionDetailKeyForResponse = (0, transactionDetailState_1.getTransactionDetailKey)(transcationId);
62
- updateActions.push((0, transactionReducer_1.updateTransaction)(transactionDetailKeyForResponse, response.data.transaction));
66
+ updateActions.push((0, transactionReducer_1.updateTransaction)(transactionDetailKeyForResponse, responseData.transaction));
63
67
  updateActions.push((0, transactionDetailReducer_1.initializeTransactionDetailLocalData)({
64
68
  transactionId: transcationId,
65
- vendorId: (_d = (_c = response.data.vendors) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.vendor_id,
69
+ vendorId: (_e = responseData.vendors[0]) === null || _e === void 0 ? void 0 : _e.vendor_id,
66
70
  }));
67
71
  updateActions.push((0, transactionDetailReducer_1.updateTransactionDetailFetchState)(transcationId, 'Completed'));
68
72
  // IMPORTANT: Fetch linked transactions..
69
- updateActions.push(...getAllFetchLinkedTransactionDetailActions(response.data.transaction, state$.value));
70
- if (response.data.vendors != null &&
71
- response.data.vendors.length > 0) {
73
+ updateActions.push(...getAllFetchLinkedTransactionDetailActions(responseData.transaction, state$.value));
74
+ if (responseData.vendors.length > 0) {
72
75
  updateActions.push((0, transactionVendorViewReducer_1.updateTransactionVendorLocalData)({
73
- vendorId: response.data.vendors[0].vendor_id,
74
- localData: (0, transactionVendorLocalDataHelper_1.getInitializedTransactionVendorLocalData)((0, vendorPayload_1.mapVendorPayloadToVendor)(response.data.vendors[0])),
76
+ vendorId: responseData.vendors[0].vendor_id,
77
+ localData: (0, transactionVendorLocalDataHelper_1.getInitializedTransactionVendorLocalData)((0, vendorPayload_1.mapVendorPayloadToVendor)(responseData.vendors[0])),
75
78
  }));
76
79
  }
77
80
  // If vendor transaction, fetch owners list
78
- if ((0, transactionType_1.toVendorTransactionTypeStrict)((_e = response.data) === null || _e === void 0 ? void 0 : _e.transaction.transaction_type) != null) {
81
+ if ((0, transactionType_1.toVendorTransactionTypeStrict)(responseData.transaction.transaction_type) != null) {
79
82
  updateActions.push((0, ownerListReducer_1.fetchOwnerList)());
80
83
  }
81
84
  return (0, rxjs_1.from)(updateActions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.17.60",
3
+ "version": "4.17.61",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",