@zeniai/client-epic-state 4.7.97 → 4.7.99

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.
@@ -1,3 +1,4 @@
1
+ import { ZeniDate } from '../zeniDayJS';
1
2
  export declare const startDate = "2000-01-01";
2
3
  export declare const endDate = "2070-12-31";
3
4
  export declare const PAYMENT_BUSINESS_DAYS = 4;
@@ -8,4 +9,4 @@ export declare const getPreviousNthWorkingDay: (date: Date, filterDaysIndex: num
8
9
  export declare const isHolidayToday: (filterDaysIndex: number[]) => boolean;
9
10
  export declare const filterDays: (date: Date, filterDaysIndex: number[]) => boolean;
10
11
  export declare const getYearsList: (startYear?: number, endYear?: number) => number[];
11
- export declare const isHoliday: (date: Date) => boolean;
12
+ export declare const isHoliday: (date: ZeniDate) => boolean;
@@ -72,17 +72,25 @@ const getYearsList = (startYear = 2000, endYear = new Date().getFullYear()) => {
72
72
  return years;
73
73
  };
74
74
  exports.getYearsList = getYearsList;
75
+ const getHolidaysListPerYear = (year) => {
76
+ return dateHolidays
77
+ .getHolidays(year)
78
+ .filter((holiday) => holiday.type === 'public' || holiday.type === 'bank')
79
+ .map((holiday) => (0, zeniDayJS_1.date)(holiday.date).toString());
80
+ };
81
+ const holidaysPerYear = {
82
+ [(0, zeniDayJS_1.dateNow)().year()]: getHolidaysListPerYear((0, zeniDayJS_1.dateNow)().year()),
83
+ };
75
84
  const isHoliday = (date) => {
76
- const holidayDetails = dateHolidays.isHoliday((0, zeniDayJS_1.dateInLocal)(date.toDateString()).toDate());
77
- if (holidayDetails === false) {
78
- return false;
79
- }
80
- else if (holidayDetails[0].type === 'bank' ||
81
- holidayDetails[0].type === 'public') {
82
- return true;
85
+ const currentYear = date.year();
86
+ let holidays = [];
87
+ if (holidaysPerYear[currentYear] != null) {
88
+ holidays = holidaysPerYear[currentYear];
83
89
  }
84
90
  else {
85
- return false;
91
+ holidays = getHolidaysListPerYear(currentYear);
92
+ holidaysPerYear[currentYear] = holidays;
86
93
  }
94
+ return holidays.indexOf(date.toString()) >= 0;
87
95
  };
88
96
  exports.isHoliday = isHoliday;
package/lib/index.d.ts CHANGED
@@ -610,7 +610,7 @@ import { fetchArAgingDetail, updateArAgingDetailUIState } from './view/arAgingVi
610
610
  import { ArAgingDetail, getArAgingDetailForCustomer } from './view/arAgingView/arAgingDetail/arAgingDetailSelector';
611
611
  export { fetchArAging, updateArAgingUIState, fetchArAgingDetail, updateArAgingDetailUIState, ArAgingReport, ArAgingDetail, AgingBalancesByCustomer, getArAgingReport, getArAgingDetailForCustomer, };
612
612
  import { toRecurringBillFrequency, toRecurringBillFrequencyStrict, RecurringBillFrequency, RecurringBillDetail, RecurringBillConfig, RecurringBillStatus, RecurringBillPaymentStatus } from './entity/billPay/recurringBills/recurringBillsState';
613
- export { toRecurringBillFrequency, toRecurringBillFrequencyStrict, RecurringBillFrequency, RecurringBillDetail, RecurringBillConfig, RecurringBillStatus, RecurringBillPaymentStatus };
613
+ export { toRecurringBillFrequency, toRecurringBillFrequencyStrict, RecurringBillFrequency, RecurringBillDetail, RecurringBillConfig, RecurringBillStatus, RecurringBillPaymentStatus, };
614
614
  import { Task, TaskStatusCodeType, PriorityCodeType, TaskTagCodeType, TaskTag, TaskStatus, TaskPriority } from './entity/task/task';
615
615
  import { TaskListSelectorView, TaskWithUserDetails, getAllTasks } from './view/taskManager/taskListView/taskListSelector';
616
616
  import { TaskListViewSortKey, TaskListUIState, TaskListFilters, TASK_LIST_FILTER_CATEGORIES, TaskListFilterCategoryField, TaskFilterCategory } from './view/taskManager/taskListView/taskList';
@@ -3,7 +3,7 @@ import { Currency } from '../../../../commonStateTypes/amount';
3
3
  import { AccountBasePayload } from '../../../../entity/account/accountPayload';
4
4
  import { ClassBasePayload } from '../../../../entity/class/classPayload';
5
5
  import { ZeniAPIResponse } from '../../../../responsePayload';
6
- import { BillPaymentConfigCodeType, BillPaymentSubConfigCodeType, InternationalFee, VendorCurrency, PaymentAchSubConfigCodeType, InternationalSubConfigCodeType, BillPayConfig, InternationalWireMethodCodeType, InternationalWireMethodCodeKeyType, InternationalSubConfigCodeKeyType, BillPaymentSubConfigCodeKeyType, PaymentAchSubConfigCodeKeyType, BillPaymentWireSubConfigCodeType, BillPaymentWireSubConfigCodeKeyType, ConfigPeriod } from './billPayConfigState';
6
+ import { BillPaymentConfigCodeType, BillPaymentSubConfigCodeType, InternationalFee, VendorCurrency, PaymentAchSubConfigCodeType, InternationalSubConfigCodeType, BillPayConfig, InternationalWireMethodCodeType, InternationalWireMethodCodeKeyType, InternationalSubConfigCodeKeyType, BillPaymentSubConfigCodeKeyType, PaymentAchSubConfigCodeKeyType, BillPaymentWireSubConfigCodeType, BillPaymentWireSubConfigCodeKeyType, ConfigPeriod, AccountTypeSubConfigCodeKeyType, AccType } from './billPayConfigState';
7
7
  export interface BillPayConfigPayload {
8
8
  bill_pay_bot_email: string;
9
9
  is_us_domestic_wire_enabled: boolean;
@@ -94,6 +94,7 @@ export declare const getPaymentAchSubConfigCodeKey: (subCode: PaymentAchSubConfi
94
94
  export declare const getBillPaymentWireSubConfigCodeKey: (subCode: BillPaymentWireSubConfigCodeType) => BillPaymentWireSubConfigCodeKeyType;
95
95
  export declare const getInternationalSubConfigCodeKey: (subCode: InternationalSubConfigCodeType) => InternationalSubConfigCodeKeyType;
96
96
  export declare const getInternationalWireMethodCodeKey: (subCode: InternationalWireMethodCodeType) => InternationalWireMethodCodeKeyType;
97
+ export declare const getAccountTypeSubConfigCodeKey: (subCode: AccType) => AccountTypeSubConfigCodeKeyType;
97
98
  export interface FeeAmount {
98
99
  amount: number;
99
100
  currencyCode: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toVendorCurrency = exports.mapBillPayVendorConfigPayloadToBillPayVendorConfig = exports.getCurrencies = exports.mapFeePayloadToInternationalLocalAmountFeeAmount = exports.mapBillPayConfigPayloadToBillPayConfig = exports.getClassDetail = exports.getAccountDetail = exports.getTimelineDetail = exports.getFeeDetail = exports.getInternationalWireMethodCodeKey = exports.getInternationalSubConfigCodeKey = exports.getBillPaymentWireSubConfigCodeKey = exports.getPaymentAchSubConfigCodeKey = exports.getBillPaymentSubConfigCodeKey = exports.getSubCodePayload = void 0;
3
+ exports.toVendorCurrency = exports.mapBillPayVendorConfigPayloadToBillPayVendorConfig = exports.getCurrencies = exports.mapFeePayloadToInternationalLocalAmountFeeAmount = exports.mapBillPayConfigPayloadToBillPayConfig = exports.getClassDetail = exports.getAccountDetail = exports.getTimelineDetail = exports.getFeeDetail = exports.getAccountTypeSubConfigCodeKey = exports.getInternationalWireMethodCodeKey = exports.getInternationalSubConfigCodeKey = exports.getBillPaymentWireSubConfigCodeKey = exports.getPaymentAchSubConfigCodeKey = exports.getBillPaymentSubConfigCodeKey = exports.getSubCodePayload = void 0;
4
4
  const amount_1 = require("../../../../commonStateTypes/amount");
5
5
  const accountPayload_1 = require("../../../../entity/account/accountPayload");
6
6
  const classPayload_1 = require("../../../../entity/class/classPayload");
@@ -63,6 +63,15 @@ const getInternationalWireMethodCodeKey = (subCode) => {
63
63
  }
64
64
  };
65
65
  exports.getInternationalWireMethodCodeKey = getInternationalWireMethodCodeKey;
66
+ const getAccountTypeSubConfigCodeKey = (subCode) => {
67
+ switch (subCode) {
68
+ case 'deposit_account':
69
+ return 'depositAccount';
70
+ case 'payment_account':
71
+ return 'paymentAccount';
72
+ }
73
+ };
74
+ exports.getAccountTypeSubConfigCodeKey = getAccountTypeSubConfigCodeKey;
66
75
  const getFeeDetail = (fees, code, subCode, internationalMethod, internationalSubMethod) => {
67
76
  let feeAmount = {
68
77
  amount: 0,
@@ -80,6 +80,12 @@ export declare type BillPaymentSubConfigCodeType = PaymentAchSubConfigCodeType |
80
80
  export declare type BillPaymentSubConfigCodeKeyType = PaymentAchSubConfigCodeKeyType | BillPaymentWireSubConfigCodeKeyType;
81
81
  export declare const toBillPaymentSubConfigCodeKeyType: (v: string) => BillPaymentSubConfigCodeKeyType;
82
82
  export declare const toBillPaymentSubConfigCodeType: (v: string) => BillPaymentSubConfigCodeType;
83
+ export declare const ACCOUNT_TYPE_CODES: readonly ["deposit_account", "payment_account"];
84
+ export declare const toAccType: (v: string) => "deposit_account" | "payment_account";
85
+ export declare type AccType = ReturnType<typeof toAccType>;
86
+ export declare const ACCOUNT_TYPE_SUB_CODES_KEYS: readonly ["depositAccount", "paymentAccount"];
87
+ export declare const toAccountTypeSubConfigCodeKeyType: (v: string) => "depositAccount" | "paymentAccount";
88
+ export declare type AccountTypeSubConfigCodeKeyType = ReturnType<typeof toAccountTypeSubConfigCodeKeyType>;
83
89
  export declare const BILL_NEW_PAYMENT_METHODS: string[];
84
90
  export declare const NEW_INTERNATIONAL_METHOD_SUBTEXT = "billPay_wire_international";
85
91
  export declare const SWIFT_OUR_INTERNATIONAL_METHOD_SUBTEXT = "swiftOur";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LOCAL_CURRENCY_INTERNATIONAL_METHOD_SUBTEXT = exports.SWIFT_OUR_INTERNATIONAL_METHOD_SUBTEXT = exports.NEW_INTERNATIONAL_METHOD_SUBTEXT = exports.BILL_NEW_PAYMENT_METHODS = exports.toBillPaymentSubConfigCodeType = exports.toBillPaymentSubConfigCodeKeyType = exports.toInternationalSubMethodCodeKeyType = exports.INTERNATIONAL_SUB_CODES_KEYS = exports.toInternationalSubMethodCodeType = exports.INTERNATIONAL_SUB_CODES = exports.toInternationalWireMethodCodeKeyType = exports.INTERNATIONAL_CODES_KEYS = exports.toInternationalWireMethodCodeType = exports.INTERNATIONAL_CODES = exports.toBillPaymentWireSubMethodCodeKeyType = exports.BILL_PAYMENT_WIRE_SUB_CODES_KEYS = exports.toBillPaymentWireSubMethodCodeType = exports.BILL_PAYMENT_WIRE_SUB_CODES = exports.toPaymentAchSubMethodCodeKeyType = exports.PAYMENT_ACH_SUB_CODES_KEYS = exports.toPaymentAchSubMethodCodeType = exports.PAYMENT_ACH_SUB_CODES = exports.toBillPaymentMethodCodeType = exports.BILL_PAYMENT_METHOD_CODE = exports.toDynamicFeeType = exports.DYNAMIC_FEE_TYPE = exports.getBillPayConfigMethodKey = exports.getBillPayConfigKey = void 0;
3
+ exports.LOCAL_CURRENCY_INTERNATIONAL_METHOD_SUBTEXT = exports.SWIFT_OUR_INTERNATIONAL_METHOD_SUBTEXT = exports.NEW_INTERNATIONAL_METHOD_SUBTEXT = exports.BILL_NEW_PAYMENT_METHODS = exports.toAccountTypeSubConfigCodeKeyType = exports.ACCOUNT_TYPE_SUB_CODES_KEYS = exports.toAccType = exports.ACCOUNT_TYPE_CODES = exports.toBillPaymentSubConfigCodeType = exports.toBillPaymentSubConfigCodeKeyType = exports.toInternationalSubMethodCodeKeyType = exports.INTERNATIONAL_SUB_CODES_KEYS = exports.toInternationalSubMethodCodeType = exports.INTERNATIONAL_SUB_CODES = exports.toInternationalWireMethodCodeKeyType = exports.INTERNATIONAL_CODES_KEYS = exports.toInternationalWireMethodCodeType = exports.INTERNATIONAL_CODES = exports.toBillPaymentWireSubMethodCodeKeyType = exports.BILL_PAYMENT_WIRE_SUB_CODES_KEYS = exports.toBillPaymentWireSubMethodCodeType = exports.BILL_PAYMENT_WIRE_SUB_CODES = exports.toPaymentAchSubMethodCodeKeyType = exports.PAYMENT_ACH_SUB_CODES_KEYS = exports.toPaymentAchSubMethodCodeType = exports.PAYMENT_ACH_SUB_CODES = exports.toBillPaymentMethodCodeType = exports.BILL_PAYMENT_METHOD_CODE = exports.toDynamicFeeType = exports.DYNAMIC_FEE_TYPE = exports.getBillPayConfigMethodKey = exports.getBillPayConfigKey = void 0;
4
4
  const common_1 = require("../../../../commonStateTypes/common");
5
5
  const stringToUnion_1 = require("../../../../commonStateTypes/stringToUnion");
6
6
  const getBillPayConfigKey = (method, subMethod) => {
@@ -68,6 +68,18 @@ const toBillPaymentSubConfigCodeKeyType = (v) => (0, stringToUnion_1.stringToUni
68
68
  exports.toBillPaymentSubConfigCodeKeyType = toBillPaymentSubConfigCodeKeyType;
69
69
  const toBillPaymentSubConfigCodeType = (v) => (0, stringToUnion_1.stringToUnion)(v, [...exports.PAYMENT_ACH_SUB_CODES, ...exports.BILL_PAYMENT_WIRE_SUB_CODES]);
70
70
  exports.toBillPaymentSubConfigCodeType = toBillPaymentSubConfigCodeType;
71
+ exports.ACCOUNT_TYPE_CODES = [
72
+ 'deposit_account',
73
+ 'payment_account',
74
+ ];
75
+ const toAccType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ACCOUNT_TYPE_CODES);
76
+ exports.toAccType = toAccType;
77
+ exports.ACCOUNT_TYPE_SUB_CODES_KEYS = [
78
+ 'depositAccount',
79
+ 'paymentAccount',
80
+ ];
81
+ const toAccountTypeSubConfigCodeKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ACCOUNT_TYPE_SUB_CODES_KEYS);
82
+ exports.toAccountTypeSubConfigCodeKeyType = toAccountTypeSubConfigCodeKeyType;
71
83
  //These const are used in web-components
72
84
  exports.BILL_NEW_PAYMENT_METHODS = [
73
85
  'billPay_ach_sameDay',
@@ -4,6 +4,7 @@ import { RemiActivity } from './reimbursement/remiDetailView/remiDetailViewSelec
4
4
  import { BusinessVerificationDetails, CompanyOfficersDetails } from './commonSetup/setupViewSelector';
5
5
  import { RecurringBillConfigLocalData, RecurringBillInstance } from './billPay/editBillView/editBillViewState';
6
6
  import { RecurringBillConfig, RecurringBillFrequency } from '../../entity/billPay/recurringBills/recurringBillsState';
7
+ import { AccType } from './billPay/billPayConfig/billPayConfigState';
7
8
  export declare const getLatestApprovalDate: (allActivities: BillActivity[] | RemiActivity[]) => ZeniDate | undefined;
8
9
  export declare function getSpendManagementEffectiveListPeriod(): import("../..").TimePeriod;
9
10
  export declare const getSelectedCompanyOfficer: (verificationDetails: BusinessVerificationDetails) => CompanyOfficersDetails | undefined;
@@ -15,3 +16,4 @@ export declare const updateRecurringBillDetails: (currentRecurringConfig: Recurr
15
16
  export declare const isRecurringConfigChanged: (recurringBillNewConfig: RecurringBillConfigLocalData, originalRecurringBillConfig: Partial<RecurringBillConfig>, checkApprovalChange: boolean) => boolean;
16
17
  export declare const getTotalPayments: (startDate: ZeniDate, endDate: ZeniDate, frequency: RecurringBillFrequency, currentInstance?: RecurringBillInstance | undefined) => number;
17
18
  export declare const getEndDate: (startDate: ZeniDate, frequency: RecurringBillFrequency, totalPayments: number, currentInstance?: RecurringBillInstance | undefined) => ZeniDate;
19
+ export declare const accountTypeSubConfigCodeToAccType: (code?: "depositAccount" | "paymentAccount" | undefined) => AccType | undefined;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getEndDate = exports.getTotalPayments = exports.isRecurringConfigChanged = exports.updateRecurringBillDetails = exports.getPaymentDateFromVendorReceiveDate = exports.getSelectedCompanyOfficer = exports.getSpendManagementEffectiveListPeriod = exports.getLatestApprovalDate = void 0;
3
+ exports.accountTypeSubConfigCodeToAccType = exports.getEndDate = exports.getTotalPayments = exports.isRecurringConfigChanged = exports.updateRecurringBillDetails = exports.getPaymentDateFromVendorReceiveDate = exports.getSelectedCompanyOfficer = exports.getSpendManagementEffectiveListPeriod = exports.getLatestApprovalDate = void 0;
4
4
  const timeframeTick_1 = require("../../commonStateTypes/timeframeTick");
5
5
  const workingDayHelper_1 = require("../../commonStateTypes/workingDayHelper");
6
6
  const zeniDayJS_1 = require("../../zeniDayJS");
@@ -47,7 +47,7 @@ const getSelectedCompanyOfficer = (verificationDetails) => {
47
47
  exports.getSelectedCompanyOfficer = getSelectedCompanyOfficer;
48
48
  const getPaymentDateFromVendorReceiveDate = (vendorReceiveDate, maxPaymentProcessingDays) => {
49
49
  let paymentDate = vendorReceiveDate.subtract(maxPaymentProcessingDays, 'day');
50
- while ((0, workingDayHelper_1.isHoliday)(paymentDate.toDate()) === true) {
50
+ while ((0, workingDayHelper_1.isHoliday)(paymentDate) === true) {
51
51
  paymentDate = paymentDate.subtract(1, 'day');
52
52
  }
53
53
  return paymentDate;
@@ -71,20 +71,18 @@ const updateRecurringBillDetails = (currentRecurringConfig, prevRecurringConfig,
71
71
  let currentEndDate = endDate;
72
72
  let currentTotalPayments = totalPaymentCycles;
73
73
  const currentInstance = currentInstances === null || currentInstances === void 0 ? void 0 : currentInstances.find((instance) => Boolean(instance.readonly) === false);
74
- //TBR check if endDate or totalPayments to be preserved for change in frequency/startDate
75
- if (prevRecurringConfig != null &&
76
- endDateSelectorOptionType == null &&
77
- (0, exports.isRecurringConfigChanged)(currentRecurringConfig, prevRecurringConfig, false) &&
78
- endDate != null &&
79
- totalPaymentCycles !== 0) {
74
+ if (endDate != null &&
75
+ ((prevRecurringConfig != null &&
76
+ endDateSelectorOptionType == null &&
77
+ (0, exports.isRecurringConfigChanged)(currentRecurringConfig, prevRecurringConfig, false) &&
78
+ totalPaymentCycles !== 0) ||
79
+ totalPaymentCycles === 0 ||
80
+ endDateSelectorOptionType === 'date')) {
80
81
  currentTotalPayments = (0, exports.getTotalPayments)(startDate, endDate, frequency, currentInstance);
81
82
  }
82
83
  else if (endDate == null || endDateSelectorOptionType === 'payments') {
83
84
  currentEndDate = (0, exports.getEndDate)(startDate, frequency, totalPaymentCycles, currentInstance);
84
85
  }
85
- else if (totalPaymentCycles === 0 || endDateSelectorOptionType === 'date') {
86
- currentTotalPayments = (0, exports.getTotalPayments)(startDate, endDate, frequency, currentInstance);
87
- }
88
86
  //editRecurringBill
89
87
  if (currentRecurringConfig.isActive &&
90
88
  currentInstances != null &&
@@ -167,7 +165,7 @@ function getRecurringFrequencyInDays(frequency) {
167
165
  function checkIfHolidayAndGetNextDate(date) {
168
166
  const isHolidayMessage = 'is a holiday';
169
167
  let newDate = date;
170
- while ((0, workingDayHelper_1.isHoliday)(newDate.toDate()) === true) {
168
+ while ((0, workingDayHelper_1.isHoliday)(newDate) === true) {
171
169
  newDate = newDate.subtract(1, 'day');
172
170
  }
173
171
  if (newDate !== date) {
@@ -178,3 +176,14 @@ function checkIfHolidayAndGetNextDate(date) {
178
176
  }
179
177
  return { vendorReceiveDate: date, vendorReceiveDateNotes: '' };
180
178
  }
179
+ const accountTypeSubConfigCodeToAccType = (code) => {
180
+ switch (code) {
181
+ case 'depositAccount':
182
+ return 'deposit_account';
183
+ case 'paymentAccount':
184
+ return 'payment_account';
185
+ default:
186
+ return undefined;
187
+ }
188
+ };
189
+ exports.accountTypeSubConfigCodeToAccType = accountTypeSubConfigCodeToAccType;
@@ -38,7 +38,7 @@ const transferDetail = (0, toolkit_1.createSlice)({
38
38
  updateTransferToLocalData(draft, action) {
39
39
  const transferMoneyParty = {
40
40
  id: action.payload.id,
41
- accType: 'deposit_account',
41
+ accType: 'depositAccount',
42
42
  label: action.payload.accountName,
43
43
  maskedAccountNumber: action.payload.maskedAccountNumber,
44
44
  accountBalance: action.payload.accountBalance,
@@ -20,7 +20,7 @@ const getTransferDetail = (state) => {
20
20
  transferParties = [
21
21
  ...depositAccountsView.depositAccounts.map((depositAcc) => ({
22
22
  id: depositAcc.id,
23
- accType: 'deposit_account',
23
+ accType: 'depositAccount',
24
24
  label: depositAcc.accountName,
25
25
  maskedAccountNumber: depositAcc.maskedAccountNumber,
26
26
  accountBalance: depositAcc.accountBalance,
@@ -37,7 +37,7 @@ const getTransferDetail = (state) => {
37
37
  var _a;
38
38
  return ({
39
39
  id: paymentAcc.paymentAccountId,
40
- accType: 'payment_account',
40
+ accType: 'paymentAccount',
41
41
  maskedAccountNumber: paymentAcc.maskedAccountNumber,
42
42
  label: Boolean(paymentAcc.institutionDetails.institutionName) === true
43
43
  ? paymentAcc.institutionDetails.institutionName
@@ -2,6 +2,7 @@ import { Amount } from '../../../../commonStateTypes/amount';
2
2
  import { Balance } from '../../../../commonStateTypes/balance';
3
3
  import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
4
4
  import { Logo } from '../../../../entity/paymentAccount/paymentAccountState';
5
+ import { AccountTypeSubConfigCodeKeyType } from '../../billPay/billPayConfig/billPayConfigState';
5
6
  export interface TransferDetailState extends FetchStateAndError {
6
7
  localData: TransferDetailLocalData;
7
8
  }
@@ -12,10 +13,9 @@ export interface TransferDetailLocalData {
12
13
  }
13
14
  export interface TransferMoneyParty {
14
15
  id: ID;
15
- accType: AccType;
16
+ accType: AccountTypeSubConfigCodeKeyType;
16
17
  label: string;
17
18
  maskedAccountNumber: string;
18
19
  accountBalance?: Balance;
19
20
  logo?: Logo;
20
21
  }
21
- export declare type AccType = 'deposit_account' | 'payment_account';
@@ -7,6 +7,7 @@ const responsePayload_1 = require("../../../../responsePayload");
7
7
  const transferDetailReducer_1 = require("./transferDetailReducer");
8
8
  const depositAccountListReducer_1 = require("../depositAccountList/depositAccountListReducer");
9
9
  const depositAccountTransactionListReducer_1 = require("../depositAccountTransactionList/depositAccountTransactionListReducer");
10
+ const helpers_1 = require("../../helpers");
10
11
  const transferMoneyEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(transferDetailReducer_1.transferMoney.match), (0, operators_1.switchMap)((action) => {
11
12
  var _a, _b, _c, _d;
12
13
  const state = state$.value;
@@ -15,11 +16,11 @@ const transferMoneyEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, opera
15
16
  const payload = {
16
17
  from_account: {
17
18
  account_id: (_a = localData.transferFrom) === null || _a === void 0 ? void 0 : _a.id,
18
- account_type: (_b = localData.transferFrom) === null || _b === void 0 ? void 0 : _b.accType,
19
+ account_type: (0, helpers_1.accountTypeSubConfigCodeToAccType)((_b = localData.transferFrom) === null || _b === void 0 ? void 0 : _b.accType),
19
20
  },
20
21
  to_account: {
21
22
  account_id: (_c = localData.transferTo) === null || _c === void 0 ? void 0 : _c.id,
22
- account_type: (_d = localData.transferTo) === null || _d === void 0 ? void 0 : _d.accType,
23
+ account_type: (0, helpers_1.accountTypeSubConfigCodeToAccType)((_d = localData.transferTo) === null || _d === void 0 ? void 0 : _d.accType),
23
24
  },
24
25
  amount: localData.amount.amount,
25
26
  currency_code: localData.amount.currencyCode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.7.97",
3
+ "version": "4.7.99",
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",