@zeniai/client-epic-state 4.17.46 → 4.17.47
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/lib/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +0 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/company/companyPayload.d.ts +2 -27
- package/lib/entity/company/companyPayload.js +2 -38
- package/lib/entity/company/companyStateTypes.d.ts +0 -22
- package/lib/entity/company/companyStateTypes.js +1 -13
- package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
- package/lib/entity/entityApprovalStatus/entityApprovalStatusState.js +0 -1
- package/lib/entity/file/fileState.d.ts +2 -2
- package/lib/entity/file/fileState.js +0 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -4
- package/lib/entity/tenant/clearAllEpic.d.ts +1 -5
- package/lib/entity/tenant/clearAllEpic.js +0 -8
- package/lib/entity/tenant/tenantPayload.d.ts +0 -3
- package/lib/entity/tenant/tenantReducer.js +0 -1
- package/lib/entity/tenant/tenantSelector.d.ts +1 -5
- package/lib/entity/tenant/tenantSelector.js +0 -6
- package/lib/entity/tenant/tenantState.d.ts +0 -1
- package/lib/entity/userRole/userRolePayload.d.ts +0 -6
- package/lib/entity/userRole/userRolePayload.js +0 -6
- package/lib/entity/userRole/userRoleReducer.js +0 -3
- package/lib/entity/userRole/userRoleState.d.ts +0 -1
- package/lib/entity/userRole/userRoleType.d.ts +2 -5
- package/lib/entity/userRole/userRoleType.js +5 -44
- package/lib/epic.d.ts +1 -11
- package/lib/epic.js +1 -11
- package/lib/index.d.ts +9 -23
- package/lib/index.js +33 -64
- package/lib/reducer.d.ts +0 -12
- package/lib/reducer.js +0 -12
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +0 -21
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +0 -43
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewPayload.d.ts +0 -1
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewPayload.js +0 -7
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewSelector.js +0 -5
- package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +2 -2
- package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.js +0 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +0 -1
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/settingsView/settingsViewSelector.d.ts +1 -1
- package/lib/view/settingsView/settingsViewSelector.js +2 -9
- package/lib/view/spendManagement/commonHistoryView/commonHistoryReducer.d.ts +2 -2
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +1 -6
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +1 -3
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +6 -6
- package/lib/view/spendManagement/commonSetup/setupViewReducer.js +2 -15
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +0 -1
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +2 -10
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +1 -3
- package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +0 -1
- package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePrimaryFundingAccountEpic.js +0 -6
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +10 -10
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.js +0 -1
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.d.ts +1 -1
- package/lib/view/spendManagement/realTimeApprovalView/realTimeApprovalReducer.d.ts +2 -2
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/package.json +1 -1
- package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.d.ts +0 -9
- package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +0 -69
- package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryHistoryEpic.d.ts +0 -7
- package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryHistoryEpic.js +0 -31
- package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryTransactionListEpic.d.ts +0 -7
- package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryTransactionListEpic.js +0 -40
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailPayload.d.ts +0 -60
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailPayload.js +0 -18
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.d.ts +0 -31
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +0 -152
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailSelector.d.ts +0 -14
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailSelector.js +0 -46
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailState.d.ts +0 -42
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailState.js +0 -31
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/acceptTreasuryTermsEpic.d.ts +0 -11
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/acceptTreasuryTermsEpic.js +0 -44
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/fetchPortfolioAllocationEpic.d.ts +0 -7
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/fetchPortfolioAllocationEpic.js +0 -21
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/fetchTreasuryFundsEpic.d.ts +0 -7
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/fetchTreasuryFundsEpic.js +0 -28
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/fetchTreasurySetupViewEpic.d.ts +0 -20
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/fetchTreasurySetupViewEpic.js +0 -83
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updatePortfolioAllocationEpic.d.ts +0 -7
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updatePortfolioAllocationEpic.js +0 -30
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewPayload.d.ts +0 -53
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewPayload.js +0 -2
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.d.ts +0 -19
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.js +0 -264
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewSelector.d.ts +0 -24
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewSelector.js +0 -35
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewState.d.ts +0 -47
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewState.js +0 -2
- package/lib/view/spendManagement/treasury/treasuryStatementList/fetchTreasuryStatementListEpic.d.ts +0 -7
- package/lib/view/spendManagement/treasury/treasuryStatementList/fetchTreasuryStatementListEpic.js +0 -42
- package/lib/view/spendManagement/treasury/treasuryStatementList/treasuryStatementList.d.ts +0 -10
- package/lib/view/spendManagement/treasury/treasuryStatementList/treasuryStatementList.js +0 -11
- package/lib/view/spendManagement/treasury/treasuryStatementList/treasuryStatementListPayload.d.ts +0 -10
- package/lib/view/spendManagement/treasury/treasuryStatementList/treasuryStatementListPayload.js +0 -2
- package/lib/view/spendManagement/treasury/treasuryStatementList/treasuryStatementListReducer.d.ts +0 -15
- package/lib/view/spendManagement/treasury/treasuryStatementList/treasuryStatementListReducer.js +0 -57
- package/lib/view/spendManagement/treasury/treasuryStatementList/treasuryStatementListSelector.d.ts +0 -7
- package/lib/view/spendManagement/treasury/treasuryStatementList/treasuryStatementListSelector.js +0 -18
- package/lib/view/spendManagement/treasury/treasuryTransferMoney/treasuryTransferMoneyEpic.d.ts +0 -9
- package/lib/view/spendManagement/treasury/treasuryTransferMoney/treasuryTransferMoneyEpic.js +0 -92
- package/lib/view/spendManagement/treasury/treasuryTransferMoney/treasuryTransferMoneyPayload.d.ts +0 -36
- package/lib/view/spendManagement/treasury/treasuryTransferMoney/treasuryTransferMoneyPayload.js +0 -15
- package/lib/view/spendManagement/treasury/treasuryTransferMoney/treasuryTransferMoneyReducer.d.ts +0 -10
- package/lib/view/spendManagement/treasury/treasuryTransferMoney/treasuryTransferMoneyReducer.js +0 -45
- package/lib/view/spendManagement/treasury/treasuryTransferMoney/treasuryTransferMoneySelector.d.ts +0 -17
- package/lib/view/spendManagement/treasury/treasuryTransferMoney/treasuryTransferMoneySelector.js +0 -55
- package/lib/view/spendManagement/treasury/treasuryTransferMoney/treasuryTransferMoneyState.d.ts +0 -17
- package/lib/view/spendManagement/treasury/treasuryTransferMoney/treasuryTransferMoneyState.js +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
2
2
|
import { PlaidAccountKeyType, PlaidAccountViewState, PlaidLinkTokenType } from './plaidAccountViewState';
|
|
3
3
|
export declare const initialState: PlaidAccountViewState;
|
|
4
|
-
export declare const getPaymentAccounts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "
|
|
5
|
-
setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "
|
|
4
|
+
export declare const getPaymentAccounts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards", plaidAccountKeyType: PlaidAccountKeyType, includeBalances?: boolean | undefined], {
|
|
5
|
+
setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
|
|
6
6
|
includeBalances: boolean;
|
|
7
7
|
plaidAccountKeyType: PlaidAccountKeyType;
|
|
8
8
|
}, "plaidAccountView/getPaymentAccounts", never, never>, getPaymentAccountsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[paymentAccountIds: string[], plaidAccountKeyType: PlaidAccountKeyType], {
|
|
@@ -11,20 +11,20 @@ export declare const getPaymentAccounts: import("@reduxjs/toolkit").ActionCreato
|
|
|
11
11
|
}, "plaidAccountView/getPaymentAccountsSuccess", never, never>, getPaymentAccountsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>, plaidAccountKeyType: PlaidAccountKeyType], {
|
|
12
12
|
error: ZeniAPIStatus<Record<string, unknown>>;
|
|
13
13
|
plaidAccountKeyType: PlaidAccountKeyType;
|
|
14
|
-
}, "plaidAccountView/getPaymentAccountsFailure", never, never>, updatePaymentAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[accountId: string, paymentAccountId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "
|
|
14
|
+
}, "plaidAccountView/getPaymentAccountsFailure", never, never>, updatePaymentAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[accountId: string, paymentAccountId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards", plaidAccountKeyType: PlaidAccountKeyType], {
|
|
15
15
|
accountId: string;
|
|
16
16
|
paymentAccountId: string;
|
|
17
|
-
setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "
|
|
17
|
+
setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
|
|
18
18
|
plaidAccountKeyType: PlaidAccountKeyType;
|
|
19
19
|
}, "plaidAccountView/updatePaymentAccount", never, never>, updatePaymentAccountSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[plaidAccountKeyType: PlaidAccountKeyType], {
|
|
20
20
|
plaidAccountKeyType: PlaidAccountKeyType;
|
|
21
21
|
}, "plaidAccountView/updatePaymentAccountSuccess", never, never>, updatePaymentAccountFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>, plaidAccountKeyType: PlaidAccountKeyType], {
|
|
22
22
|
error: ZeniAPIStatus<Record<string, unknown>>;
|
|
23
23
|
plaidAccountKeyType: PlaidAccountKeyType;
|
|
24
|
-
}, "plaidAccountView/updatePaymentAccountFailure", never, never>, updatePaymentAccountStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[verificationStatusCode: string, paymentAccountId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "
|
|
24
|
+
}, "plaidAccountView/updatePaymentAccountFailure", never, never>, updatePaymentAccountStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[verificationStatusCode: string, paymentAccountId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards", plaidAccountKeyType: PlaidAccountKeyType, linkTokenType?: PlaidLinkTokenType | undefined], {
|
|
25
25
|
verificationStatusCode: string;
|
|
26
26
|
paymentAccountId: string;
|
|
27
|
-
setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "
|
|
27
|
+
setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
|
|
28
28
|
plaidAccountKeyType: PlaidAccountKeyType;
|
|
29
29
|
linkTokenType: PlaidLinkTokenType;
|
|
30
30
|
}, "plaidAccountView/updatePaymentAccountStatus", never, never>, updatePaymentAccountStatusSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[linkTokenType: PlaidLinkTokenType, plaidAccountKeyType: PlaidAccountKeyType], {
|
|
@@ -34,10 +34,10 @@ export declare const getPaymentAccounts: import("@reduxjs/toolkit").ActionCreato
|
|
|
34
34
|
error: ZeniAPIStatus<Record<string, unknown>>;
|
|
35
35
|
linkTokenType: PlaidLinkTokenType;
|
|
36
36
|
plaidAccountKeyType: PlaidAccountKeyType;
|
|
37
|
-
}, "plaidAccountView/updatePaymentAccountStatusFailure", never, never>, updatePaymentAccountLoginStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[isLoginRequired: boolean, paymentAccountId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "
|
|
37
|
+
}, "plaidAccountView/updatePaymentAccountStatusFailure", never, never>, updatePaymentAccountLoginStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[isLoginRequired: boolean, paymentAccountId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards", plaidAccountKeyType: PlaidAccountKeyType, linkTokenType?: PlaidLinkTokenType | undefined], {
|
|
38
38
|
isLoginRequired: boolean;
|
|
39
39
|
paymentAccountId: string;
|
|
40
|
-
setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "
|
|
40
|
+
setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
|
|
41
41
|
plaidAccountKeyType: PlaidAccountKeyType;
|
|
42
42
|
linkTokenType: PlaidLinkTokenType;
|
|
43
43
|
}, "plaidAccountView/updatePaymentAccountLoginStatus", never, never>, updatePaymentAccountLoginStatusSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[paymentAccountIds: string[], linkTokenType: PlaidLinkTokenType, plaidAccountKeyType: PlaidAccountKeyType], {
|
|
@@ -61,10 +61,10 @@ export declare const getPaymentAccounts: import("@reduxjs/toolkit").ActionCreato
|
|
|
61
61
|
error: ZeniAPIStatus<Record<string, unknown>>;
|
|
62
62
|
linkTokenType: PlaidLinkTokenType;
|
|
63
63
|
plaidAccountKeyType: PlaidAccountKeyType;
|
|
64
|
-
}, "plaidAccountView/getPlaidLinkTokenFailure", never, never>, establishPlaidConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[publicToken: string, companyId: string, plaidAccountKeyType: PlaidAccountKeyType, setupViewType?: "bill_pay" | "reimbursement" | "zeni_accounts" | "
|
|
64
|
+
}, "plaidAccountView/getPlaidLinkTokenFailure", never, never>, establishPlaidConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[publicToken: string, companyId: string, plaidAccountKeyType: PlaidAccountKeyType, setupViewType?: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards" | undefined, linkTokenType?: PlaidLinkTokenType | undefined, zeniMappedAccountId?: string | undefined], {
|
|
65
65
|
publicToken: string;
|
|
66
66
|
companyId: string;
|
|
67
|
-
setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "
|
|
67
|
+
setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards" | undefined;
|
|
68
68
|
linkTokenType: PlaidLinkTokenType;
|
|
69
69
|
plaidAccountKeyType: PlaidAccountKeyType;
|
|
70
70
|
zeniMappedAccountId: string | undefined;
|
|
@@ -16,7 +16,6 @@ exports.initialState = {
|
|
|
16
16
|
external_account: plaidAccountViewState_1.initialPlaidAccountState,
|
|
17
17
|
billing_setup: plaidAccountViewState_1.initialPlaidAccountState,
|
|
18
18
|
expense_automation_reconcile: plaidAccountViewState_1.initialPlaidAccountState,
|
|
19
|
-
treasury_setup: plaidAccountViewState_1.initialPlaidAccountState,
|
|
20
19
|
};
|
|
21
20
|
const plaidAccountView = (0, toolkit_1.createSlice)({
|
|
22
21
|
name: 'plaidAccountView',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { ZeniDate } from '../../../zeniDayJS';
|
|
3
3
|
export type PlaidLinkTokenType = 'link_account' | 'update_account' | 'link_account_no_microdeposit' | 'link_external_account';
|
|
4
|
-
export type PlaidAccountKeyType = 'spend_management_setup' | 'bill_pay_setup' | 'bill_pay_detail' | 'reimbursement_setup' | 'account_setup' | 'charge_card_setup' | 'user_reimbursement_account' | 'external_account' | 'billing_setup' | 'expense_automation_reconcile'
|
|
4
|
+
export type PlaidAccountKeyType = 'spend_management_setup' | 'bill_pay_setup' | 'bill_pay_detail' | 'reimbursement_setup' | 'account_setup' | 'charge_card_setup' | 'user_reimbursement_account' | 'external_account' | 'billing_setup' | 'expense_automation_reconcile';
|
|
5
5
|
export type PlaidConnectionDetails = Record<PlaidLinkTokenType, {
|
|
6
6
|
linkToken?: string;
|
|
7
7
|
expiration?: ZeniDate;
|
|
@@ -3,9 +3,9 @@ import { EntityType as SpendManagementEntityType } from '../../../entity/entityA
|
|
|
3
3
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
4
4
|
import { RealTimeApprovalDetailLocalData, RealTimeApprovalState } from './realTimeApprovalState';
|
|
5
5
|
export declare const initialState: RealTimeApprovalState;
|
|
6
|
-
export declare const saveRealTimeApproval: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[entityId: string, entityType: "bill_pay" | "reimbursement" | "zeni_accounts" | "
|
|
6
|
+
export declare const saveRealTimeApproval: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[entityId: string, entityType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards", realTimeApprovalLocalData: RealTimeApprovalDetailLocalData], {
|
|
7
7
|
entityId: string;
|
|
8
|
-
entityType: "bill_pay" | "reimbursement" | "zeni_accounts" | "
|
|
8
|
+
entityType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards";
|
|
9
9
|
realTimeApprovalLocalData: RealTimeApprovalDetailLocalData;
|
|
10
10
|
}, "realTimeApproval/saveRealTimeApproval", never, never>, saveRealTimeApprovalSuccessorFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
11
11
|
entityId: ID;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getTasksCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
status: import("../..").Status | undefined;
|
|
@@ -4,7 +4,7 @@ import { RootState } from '../../reducer';
|
|
|
4
4
|
import { TopExReport, TopExTimePeriodWithMetaData } from './topExSelectorTypes';
|
|
5
5
|
import { TopExState } from './topExState';
|
|
6
6
|
export declare const getTopExpenses: (accountState: AccountState, topExState: TopExState, numberOfExpenses?: number) => {
|
|
7
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "
|
|
7
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation";
|
|
8
8
|
reportTitle: string;
|
|
9
9
|
version: string | number | undefined;
|
|
10
10
|
status: import("../..").Status | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.47",
|
|
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",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
5
|
-
import { fetchPortfolioAllocation, fetchTreasuryFunds } from '../../treasurySetUp/treasurySetupViewReducer';
|
|
6
|
-
import { fetchTreasuryStatementList } from '../../treasuryStatementList/treasuryStatementListReducer';
|
|
7
|
-
import { fetchTreasuryHistory, fetchTreasuryOverviewDetail, fetchTreasurySummaryFailure, fetchTreasurySummarySuccess, fetchTreasuryTransactionList } from '../treasuryDetailReducer';
|
|
8
|
-
export type ActionType = ReturnType<typeof fetchTreasuryOverviewDetail> | ReturnType<typeof fetchTreasuryHistory> | ReturnType<typeof fetchTreasuryFunds> | ReturnType<typeof fetchPortfolioAllocation> | ReturnType<typeof fetchTreasuryTransactionList> | ReturnType<typeof fetchTreasuryStatementList> | ReturnType<typeof fetchTreasurySummarySuccess> | ReturnType<typeof fetchTreasurySummaryFailure>;
|
|
9
|
-
export declare const fetchTreasuryDetailEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchTreasuryDetailEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../../../responsePayload");
|
|
7
|
-
const treasurySetupViewReducer_1 = require("../../treasurySetUp/treasurySetupViewReducer");
|
|
8
|
-
const treasuryStatementListReducer_1 = require("../../treasuryStatementList/treasuryStatementListReducer");
|
|
9
|
-
const treasuryDetailReducer_1 = require("../treasuryDetailReducer");
|
|
10
|
-
const fetchTreasuryDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(treasuryDetailReducer_1.fetchTreasuryOverviewDetail.match), (0, operators_1.switchMap)((action) => {
|
|
11
|
-
const { cacheOverride } = action.payload;
|
|
12
|
-
const state = state$.value;
|
|
13
|
-
const treasuryActions = [];
|
|
14
|
-
if (cacheOverride === true) {
|
|
15
|
-
treasuryActions.push((0, treasurySetupViewReducer_1.fetchTreasuryFunds)());
|
|
16
|
-
treasuryActions.push((0, treasurySetupViewReducer_1.fetchPortfolioAllocation)());
|
|
17
|
-
treasuryActions.push((0, treasuryStatementListReducer_1.fetchTreasuryStatementList)(true));
|
|
18
|
-
treasuryActions.push((0, treasuryDetailReducer_1.fetchTreasuryHistory)());
|
|
19
|
-
treasuryActions.push((0, treasuryDetailReducer_1.fetchTreasuryTransactionList)(true));
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
// Check treasury statement list state
|
|
23
|
-
const treasuryStatementListState = state.treasuryStatementListState;
|
|
24
|
-
if (treasuryStatementListState.hasValidState() === false &&
|
|
25
|
-
treasuryStatementListState.fetchState !== 'In-Progress') {
|
|
26
|
-
treasuryActions.push((0, treasuryStatementListReducer_1.fetchTreasuryStatementList)(false));
|
|
27
|
-
}
|
|
28
|
-
// Check treasury detail state for history
|
|
29
|
-
const treasuryDetailState = state.treasuryDetailState;
|
|
30
|
-
if (treasuryDetailState.hasValidState() === false &&
|
|
31
|
-
treasuryDetailState.fetchState !== 'In-Progress') {
|
|
32
|
-
treasuryActions.push((0, treasuryDetailReducer_1.fetchTreasuryHistory)());
|
|
33
|
-
}
|
|
34
|
-
// Check treasury transaction list state
|
|
35
|
-
const treasuryTransactionState = treasuryDetailState.transactionsState;
|
|
36
|
-
if (treasuryTransactionState.fetchState !== 'Completed' &&
|
|
37
|
-
treasuryTransactionState.fetchState !== 'In-Progress') {
|
|
38
|
-
treasuryActions.push((0, treasuryDetailReducer_1.fetchTreasuryTransactionList)(false, 5));
|
|
39
|
-
}
|
|
40
|
-
// Check treasury funds state
|
|
41
|
-
const treasurySetupViewState = state.treasurySetupViewState;
|
|
42
|
-
if (treasurySetupViewState.treasuryFundsDetails.fetchStatus.fetchState !==
|
|
43
|
-
'In-Progress') {
|
|
44
|
-
treasuryActions.push((0, treasurySetupViewReducer_1.fetchTreasuryFunds)());
|
|
45
|
-
}
|
|
46
|
-
// Check portfolio allocation state
|
|
47
|
-
const portfolioAllocationState = treasurySetupViewState.currentAllocation.fetchStatus;
|
|
48
|
-
if (portfolioAllocationState.fetchState !== 'In-Progress') {
|
|
49
|
-
treasuryActions.push((0, treasurySetupViewReducer_1.fetchPortfolioAllocation)());
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
// Return the treasury summary call followed by other actions
|
|
53
|
-
return zeniAPI
|
|
54
|
-
.getJSON(`${zeniAPI.apiEndPoints.bankingMicroServiceBaseUrl}/1.0/treasury-account?query=${encodeURIComponent(`{"is_summary":true}`)}`)
|
|
55
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
56
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
57
|
-
return (0, rxjs_1.concat)((0, rxjs_1.of)((0, treasuryDetailReducer_1.fetchTreasurySummarySuccess)({ data: response })), (0, rxjs_1.from)(treasuryActions));
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
return (0, rxjs_1.concat)((0, rxjs_1.of)((0, treasuryDetailReducer_1.fetchTreasurySummaryFailure)({ error: response.status })), (0, rxjs_1.from)(treasuryActions));
|
|
61
|
-
}
|
|
62
|
-
}), (0, operators_1.catchError)((error) => {
|
|
63
|
-
return (0, rxjs_1.concat)((0, rxjs_1.of)((0, treasuryDetailReducer_1.fetchTreasurySummaryFailure)({
|
|
64
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch treasury summary REST API call errored out ' +
|
|
65
|
-
JSON.stringify(error)),
|
|
66
|
-
})), (0, rxjs_1.from)(treasuryActions));
|
|
67
|
-
}));
|
|
68
|
-
}));
|
|
69
|
-
exports.fetchTreasuryDetailEpic = fetchTreasuryDetailEpic;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
5
|
-
import { fetchTreasuryHistory, fetchTreasuryHistoryFailure, fetchTreasuryHistorySuccess } from '../treasuryDetailReducer';
|
|
6
|
-
export type ActionType = ReturnType<typeof fetchTreasuryHistory> | ReturnType<typeof fetchTreasuryHistorySuccess> | ReturnType<typeof fetchTreasuryHistoryFailure>;
|
|
7
|
-
export declare const fetchTreasuryHistoryEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchTreasuryHistoryEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../../../responsePayload");
|
|
7
|
-
const treasuryDetailReducer_1 = require("../treasuryDetailReducer");
|
|
8
|
-
const fetchTreasuryHistoryEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(treasuryDetailReducer_1.fetchTreasuryHistory.match), (0, operators_1.switchMap)(() => {
|
|
9
|
-
return zeniAPI
|
|
10
|
-
.getJSON(`${zeniAPI.apiEndPoints.bankingMicroServiceBaseUrl}/1.0/treasury-account/balance/time-series`)
|
|
11
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
12
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
13
|
-
return (0, rxjs_1.of)((0, treasuryDetailReducer_1.fetchTreasuryHistorySuccess)({
|
|
14
|
-
data: response,
|
|
15
|
-
}));
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
return (0, rxjs_1.of)((0, treasuryDetailReducer_1.fetchTreasuryHistoryFailure)({
|
|
19
|
-
fetchState: 'Error',
|
|
20
|
-
error: response.status,
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
}), (0, operators_1.catchError)((error) => {
|
|
24
|
-
return (0, rxjs_1.of)((0, treasuryDetailReducer_1.fetchTreasuryHistoryFailure)({
|
|
25
|
-
fetchState: 'Error',
|
|
26
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch treasury account history REST API call errored out ' +
|
|
27
|
-
JSON.stringify(error)),
|
|
28
|
-
}));
|
|
29
|
-
}));
|
|
30
|
-
}));
|
|
31
|
-
exports.fetchTreasuryHistoryEpic = fetchTreasuryHistoryEpic;
|
package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryTransactionListEpic.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
5
|
-
import { fetchTreasuryTransactionList, fetchTreasuryTransactionListFailure, fetchTreasuryTransactionListSuccess } from '../treasuryDetailReducer';
|
|
6
|
-
export type ActionType = ReturnType<typeof fetchTreasuryTransactionList> | ReturnType<typeof fetchTreasuryTransactionListSuccess> | ReturnType<typeof fetchTreasuryTransactionListFailure>;
|
|
7
|
-
export declare const fetchTreasuryTransactionListEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryTransactionListEpic.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchTreasuryTransactionListEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../../../responsePayload");
|
|
7
|
-
const treasuryDetailReducer_1 = require("../treasuryDetailReducer");
|
|
8
|
-
const fetchTreasuryTransactionListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(treasuryDetailReducer_1.fetchTreasuryTransactionList.match), (0, operators_1.switchMap)((action) => {
|
|
9
|
-
const { cacheOverride } = action.payload;
|
|
10
|
-
const queryParam = {
|
|
11
|
-
start_date: '2022-01-01',
|
|
12
|
-
end_date: '2030-12-31',
|
|
13
|
-
};
|
|
14
|
-
if (cacheOverride === true) {
|
|
15
|
-
return zeniAPI
|
|
16
|
-
.getJSON(`${zeniAPI.apiEndPoints.bankingMicroServiceBaseUrl}/1.0/treasury-account/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
17
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
18
|
-
var _a, _b;
|
|
19
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
20
|
-
return (0, rxjs_1.of)((0, treasuryDetailReducer_1.fetchTreasuryTransactionListSuccess)({
|
|
21
|
-
transactionList: (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.transactions) !== null && _b !== void 0 ? _b : [],
|
|
22
|
-
}));
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
return (0, rxjs_1.of)((0, treasuryDetailReducer_1.fetchTreasuryTransactionListFailure)({
|
|
26
|
-
error: response.status,
|
|
27
|
-
}));
|
|
28
|
-
}
|
|
29
|
-
}), (0, operators_1.catchError)((error) => {
|
|
30
|
-
return (0, rxjs_1.of)((0, treasuryDetailReducer_1.fetchTreasuryTransactionListFailure)({
|
|
31
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch treasury transactions REST API call errored out' +
|
|
32
|
-
JSON.stringify(error)),
|
|
33
|
-
}));
|
|
34
|
-
}));
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
return (0, rxjs_1.from)([]);
|
|
38
|
-
}
|
|
39
|
-
}));
|
|
40
|
-
exports.fetchTreasuryTransactionListEpic = fetchTreasuryTransactionListEpic;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { ZeniAPIResponse } from '../../../../responsePayload';
|
|
2
|
-
import { AccountHistoryWithBalance } from './treasuryDetailState';
|
|
3
|
-
interface TreasuryDetailPayload {
|
|
4
|
-
treasury_account: {
|
|
5
|
-
total_balance: {
|
|
6
|
-
amount: number;
|
|
7
|
-
currency_code: string;
|
|
8
|
-
currency_symbol: string;
|
|
9
|
-
};
|
|
10
|
-
insured_funds: {
|
|
11
|
-
amount: number;
|
|
12
|
-
currency_code: string;
|
|
13
|
-
currency_symbol: string;
|
|
14
|
-
};
|
|
15
|
-
total_yield: {
|
|
16
|
-
amount: number;
|
|
17
|
-
currency_code: string;
|
|
18
|
-
currency_symbol: string;
|
|
19
|
-
};
|
|
20
|
-
thirty_day_percentage_yield: string;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export type FetchTreasuryDetailResponse = ZeniAPIResponse<TreasuryDetailPayload>;
|
|
24
|
-
export interface TreasuryTransactionStatus {
|
|
25
|
-
code: string;
|
|
26
|
-
name: string;
|
|
27
|
-
}
|
|
28
|
-
export interface TreasuryTransactionPayload {
|
|
29
|
-
transaction_id: string;
|
|
30
|
-
date: string;
|
|
31
|
-
amount: number;
|
|
32
|
-
currency_code: string;
|
|
33
|
-
currency_symbol: string;
|
|
34
|
-
description: string;
|
|
35
|
-
status: TreasuryTransactionStatus;
|
|
36
|
-
}
|
|
37
|
-
export interface TreasuryTransactionListQueryparam {
|
|
38
|
-
start_date: string;
|
|
39
|
-
end_date: string;
|
|
40
|
-
}
|
|
41
|
-
interface TreasuryTransactionListPayload {
|
|
42
|
-
query: TreasuryTransactionListQueryparam;
|
|
43
|
-
transactions: TreasuryTransactionPayload[];
|
|
44
|
-
}
|
|
45
|
-
export type FetchTreasuryTransactionListResponse = ZeniAPIResponse<TreasuryTransactionListPayload>;
|
|
46
|
-
interface AccountHistoryPayload {
|
|
47
|
-
date: string;
|
|
48
|
-
balances: BalancePayload;
|
|
49
|
-
}
|
|
50
|
-
interface BalancePayload {
|
|
51
|
-
current: number;
|
|
52
|
-
currency_code: string;
|
|
53
|
-
currency_symbol: string;
|
|
54
|
-
}
|
|
55
|
-
interface FetchTreasuryAccountHistoryPayload {
|
|
56
|
-
account_end_of_day_balances: AccountHistoryPayload[];
|
|
57
|
-
}
|
|
58
|
-
export type FetchTreasuryAccountHistoryResponse = ZeniAPIResponse<FetchTreasuryAccountHistoryPayload>;
|
|
59
|
-
export declare const mapAccountHistoryPayloadToAccountHistory: (payload: AccountHistoryPayload) => AccountHistoryWithBalance;
|
|
60
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapAccountHistoryPayloadToAccountHistory = void 0;
|
|
4
|
-
const zeniDayJS_1 = require("../../../../zeniDayJS");
|
|
5
|
-
const mapAccountHistoryPayloadToAccountHistory = (payload) => {
|
|
6
|
-
var _a, _b, _c, _d;
|
|
7
|
-
return ({
|
|
8
|
-
date: (0, zeniDayJS_1.date)(payload.date),
|
|
9
|
-
balance: {
|
|
10
|
-
available: {
|
|
11
|
-
amount: (_b = (_a = payload.balances) === null || _a === void 0 ? void 0 : _a.current) !== null && _b !== void 0 ? _b : 0,
|
|
12
|
-
currencyCode: (_c = payload.balances) === null || _c === void 0 ? void 0 : _c.currency_code,
|
|
13
|
-
currencySymbol: (_d = payload.balances) === null || _d === void 0 ? void 0 : _d.currency_symbol,
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
exports.mapAccountHistoryPayloadToAccountHistory = mapAccountHistoryPayloadToAccountHistory;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { FetchState } from '../../../../commonStateTypes/common';
|
|
2
|
-
import { ZeniAPIStatus } from '../../../../responsePayload';
|
|
3
|
-
import { TreasuryTransferMoneyResponsePayload } from '../treasuryTransferMoney/treasuryTransferMoneyPayload';
|
|
4
|
-
import { FetchTreasuryAccountHistoryResponse, FetchTreasuryDetailResponse, TreasuryTransactionPayload } from './treasuryDetailPayload';
|
|
5
|
-
import { TreasuryDetailState, TreasuryListUIState } from './treasuryDetailState';
|
|
6
|
-
export declare const initialState: TreasuryDetailState;
|
|
7
|
-
export declare const fetchTreasuryOverviewDetail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride: boolean], {
|
|
8
|
-
cacheOverride: boolean;
|
|
9
|
-
}, "treasuryDetail/fetchTreasuryOverviewDetail", never, never>, fetchTreasuryHistory: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"treasuryDetail/fetchTreasuryHistory">, fetchTreasuryHistorySuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
10
|
-
data: FetchTreasuryAccountHistoryResponse;
|
|
11
|
-
}, "treasuryDetail/fetchTreasuryHistorySuccess">, fetchTreasuryHistoryFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
12
|
-
fetchState: FetchState;
|
|
13
|
-
error: ZeniAPIStatus;
|
|
14
|
-
}, "treasuryDetail/fetchTreasuryHistoryFailure">, clearTreasuryOverviewDetail: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"treasuryDetail/clearTreasuryOverviewDetail">, fetchTreasuryTransactionList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride: boolean, count?: number | undefined], {
|
|
15
|
-
cacheOverride: boolean;
|
|
16
|
-
count: number | undefined;
|
|
17
|
-
}, "treasuryDetail/fetchTreasuryTransactionList", never, never>, fetchTreasuryTransactionListSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
18
|
-
transactionList: TreasuryTransactionPayload[];
|
|
19
|
-
}, "treasuryDetail/fetchTreasuryTransactionListSuccess">, fetchTreasuryTransactionListFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
20
|
-
error?: ZeniAPIStatus;
|
|
21
|
-
}, "treasuryDetail/fetchTreasuryTransactionListFailure">, updateTreasuryTransactionList: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
22
|
-
transferTransaction: TreasuryTransferMoneyResponsePayload;
|
|
23
|
-
}, "treasuryDetail/updateTreasuryTransactionList">, fetchTreasurySummarySuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
24
|
-
data: FetchTreasuryDetailResponse;
|
|
25
|
-
}, "treasuryDetail/fetchTreasurySummarySuccess">, fetchTreasurySummaryFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
26
|
-
error: ZeniAPIStatus;
|
|
27
|
-
}, "treasuryDetail/fetchTreasurySummaryFailure">, updateTreasuryTransactionListUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
28
|
-
uiState: Partial<TreasuryListUIState>;
|
|
29
|
-
}, "treasuryDetail/updateTreasuryTransactionListUIState">;
|
|
30
|
-
declare const _default: import("redux").Reducer<TreasuryDetailState>;
|
|
31
|
-
export default _default;
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateTreasuryTransactionListUIState = exports.fetchTreasurySummaryFailure = exports.fetchTreasurySummarySuccess = exports.updateTreasuryTransactionList = exports.fetchTreasuryTransactionListFailure = exports.fetchTreasuryTransactionListSuccess = exports.fetchTreasuryTransactionList = exports.clearTreasuryOverviewDetail = exports.fetchTreasuryHistoryFailure = exports.fetchTreasuryHistorySuccess = exports.fetchTreasuryHistory = exports.fetchTreasuryOverviewDetail = exports.initialState = void 0;
|
|
5
|
-
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
-
const amount_1 = require("../../../../commonStateTypes/amount");
|
|
7
|
-
const zeniDayJS_1 = require("../../../../zeniDayJS");
|
|
8
|
-
const treasuryDetailPayload_1 = require("./treasuryDetailPayload");
|
|
9
|
-
const treasuryDetailState_1 = require("./treasuryDetailState");
|
|
10
|
-
exports.initialState = {
|
|
11
|
-
accountHistory: treasuryDetailState_1.initialAccountHistoryWithBalances,
|
|
12
|
-
accountSummary: undefined,
|
|
13
|
-
transactionsState: {
|
|
14
|
-
fetchState: 'Not-Started',
|
|
15
|
-
error: undefined,
|
|
16
|
-
transactions: [],
|
|
17
|
-
uiState: {
|
|
18
|
-
sortKey: 'description',
|
|
19
|
-
sortOrder: 'ascending',
|
|
20
|
-
scrollYOffset: 0,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
fetchState: 'Not-Started',
|
|
24
|
-
error: undefined,
|
|
25
|
-
hasValidState() {
|
|
26
|
-
return this.fetchState == 'Completed';
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
const treasuryDetail = (0, toolkit_1.createSlice)({
|
|
30
|
-
name: 'treasuryDetail',
|
|
31
|
-
initialState: exports.initialState,
|
|
32
|
-
reducers: {
|
|
33
|
-
fetchTreasuryOverviewDetail: {
|
|
34
|
-
reducer(draft) {
|
|
35
|
-
draft.fetchState = 'In-Progress';
|
|
36
|
-
},
|
|
37
|
-
prepare(cacheOverride) {
|
|
38
|
-
return {
|
|
39
|
-
payload: {
|
|
40
|
-
cacheOverride,
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
fetchTreasuryHistory(draft) {
|
|
46
|
-
draft.accountHistory = Object.assign(Object.assign({}, treasuryDetailState_1.initialAccountHistoryWithBalances), { fetchState: 'In-Progress', error: undefined });
|
|
47
|
-
},
|
|
48
|
-
fetchTreasuryHistorySuccess(draft, action) {
|
|
49
|
-
var _a;
|
|
50
|
-
const { data } = action.payload;
|
|
51
|
-
const accountEndOfDayBalances = (_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.account_end_of_day_balances;
|
|
52
|
-
if (accountEndOfDayBalances != null) {
|
|
53
|
-
const accountHistoryBalances = accountEndOfDayBalances.map((account) => (0, treasuryDetailPayload_1.mapAccountHistoryPayloadToAccountHistory)(account));
|
|
54
|
-
draft.accountHistory = {
|
|
55
|
-
fetchState: 'Completed',
|
|
56
|
-
error: undefined,
|
|
57
|
-
accountHistoryWithBalance: accountHistoryBalances,
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
fetchTreasuryHistoryFailure(draft, action) {
|
|
62
|
-
const { error, fetchState } = action.payload;
|
|
63
|
-
draft.accountHistory = Object.assign(Object.assign({}, treasuryDetailState_1.initialAccountHistoryWithBalances), { fetchState: fetchState, error: error });
|
|
64
|
-
},
|
|
65
|
-
fetchTreasuryTransactionList: {
|
|
66
|
-
reducer(draft) {
|
|
67
|
-
draft.transactionsState = Object.assign(Object.assign({}, draft.transactionsState), { fetchState: 'In-Progress' });
|
|
68
|
-
},
|
|
69
|
-
prepare(cacheOverride, count) {
|
|
70
|
-
return {
|
|
71
|
-
payload: {
|
|
72
|
-
cacheOverride,
|
|
73
|
-
count,
|
|
74
|
-
},
|
|
75
|
-
};
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
fetchTreasuryTransactionListSuccess(draft, action) {
|
|
79
|
-
const { transactionList } = action.payload;
|
|
80
|
-
draft.transactionsState = Object.assign(Object.assign({}, draft.transactionsState), { transactions: transactionList.map((tran) => {
|
|
81
|
-
var _a;
|
|
82
|
-
return ({
|
|
83
|
-
id: tran.transaction_id,
|
|
84
|
-
date: (0, zeniDayJS_1.date)(tran.date),
|
|
85
|
-
amount: {
|
|
86
|
-
amount: tran.amount,
|
|
87
|
-
currencyCode: tran.currency_code,
|
|
88
|
-
currencySymbol: tran.currency_symbol,
|
|
89
|
-
},
|
|
90
|
-
description: (_a = tran.description) !== null && _a !== void 0 ? _a : '', //temp until fixed from BE
|
|
91
|
-
status: tran.status,
|
|
92
|
-
});
|
|
93
|
-
}), fetchState: 'Completed', error: undefined });
|
|
94
|
-
},
|
|
95
|
-
fetchTreasuryTransactionListFailure(draft, action) {
|
|
96
|
-
const { error } = action.payload;
|
|
97
|
-
draft.transactionsState = Object.assign(Object.assign({}, draft.transactionsState), { fetchState: 'Error', error });
|
|
98
|
-
},
|
|
99
|
-
updateTreasuryTransactionList(draft, action) {
|
|
100
|
-
var _a;
|
|
101
|
-
const { transferTransaction } = action.payload;
|
|
102
|
-
const newTransaction = {
|
|
103
|
-
id: transferTransaction.transaction_id,
|
|
104
|
-
date: (0, zeniDayJS_1.date)(transferTransaction.date),
|
|
105
|
-
amount: (0, amount_1.toAmount)(transferTransaction.amount, transferTransaction.currency_code, transferTransaction.currency_symbol),
|
|
106
|
-
description: (_a = transferTransaction.description) !== null && _a !== void 0 ? _a : '',
|
|
107
|
-
status: transferTransaction.status,
|
|
108
|
-
};
|
|
109
|
-
// Add the new transaction to the top of the list
|
|
110
|
-
draft.transactionsState.transactions = [
|
|
111
|
-
newTransaction,
|
|
112
|
-
...draft.transactionsState.transactions,
|
|
113
|
-
];
|
|
114
|
-
},
|
|
115
|
-
fetchTreasurySummarySuccess(draft, action) {
|
|
116
|
-
const { data } = action.payload;
|
|
117
|
-
if (data === null || data === void 0 ? void 0 : data.data) {
|
|
118
|
-
const summary = {
|
|
119
|
-
totalBalance: (0, amount_1.toAmount)(data.data.treasury_account.total_balance.amount, data.data.treasury_account.total_balance.currency_code, data.data.treasury_account.total_balance.currency_symbol),
|
|
120
|
-
insuredFunds: (0, amount_1.toAmount)(data.data.treasury_account.insured_funds.amount, data.data.treasury_account.insured_funds.currency_code, data.data.treasury_account.insured_funds.currency_symbol),
|
|
121
|
-
totalYield: (0, amount_1.toAmount)(data.data.treasury_account.total_yield.amount, data.data.treasury_account.total_yield.currency_code, data.data.treasury_account.total_yield.currency_symbol),
|
|
122
|
-
thirtyDayPercentageYield: parseFloat(data.data.treasury_account.thirty_day_percentage_yield),
|
|
123
|
-
};
|
|
124
|
-
draft.accountSummary = summary;
|
|
125
|
-
draft.fetchState = 'Completed';
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
fetchTreasurySummaryFailure(draft, action) {
|
|
129
|
-
const { error } = action.payload;
|
|
130
|
-
draft.error = error;
|
|
131
|
-
},
|
|
132
|
-
updateTreasuryTransactionListUIState(draft, action) {
|
|
133
|
-
if (action.payload.uiState.sortKey != null) {
|
|
134
|
-
draft.transactionsState.uiState.sortKey =
|
|
135
|
-
action.payload.uiState.sortKey;
|
|
136
|
-
}
|
|
137
|
-
if (action.payload.uiState.sortOrder != null) {
|
|
138
|
-
draft.transactionsState.uiState.sortOrder =
|
|
139
|
-
action.payload.uiState.sortOrder;
|
|
140
|
-
}
|
|
141
|
-
if (action.payload.uiState.scrollYOffset != null) {
|
|
142
|
-
draft.transactionsState.uiState.scrollYOffset =
|
|
143
|
-
action.payload.uiState.scrollYOffset;
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
clearTreasuryOverviewDetail(draft) {
|
|
147
|
-
Object.assign(draft, exports.initialState);
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
});
|
|
151
|
-
_a = treasuryDetail.actions, exports.fetchTreasuryOverviewDetail = _a.fetchTreasuryOverviewDetail, exports.fetchTreasuryHistory = _a.fetchTreasuryHistory, exports.fetchTreasuryHistorySuccess = _a.fetchTreasuryHistorySuccess, exports.fetchTreasuryHistoryFailure = _a.fetchTreasuryHistoryFailure, exports.clearTreasuryOverviewDetail = _a.clearTreasuryOverviewDetail, exports.fetchTreasuryTransactionList = _a.fetchTreasuryTransactionList, exports.fetchTreasuryTransactionListSuccess = _a.fetchTreasuryTransactionListSuccess, exports.fetchTreasuryTransactionListFailure = _a.fetchTreasuryTransactionListFailure, exports.updateTreasuryTransactionList = _a.updateTreasuryTransactionList, exports.fetchTreasurySummarySuccess = _a.fetchTreasurySummarySuccess, exports.fetchTreasurySummaryFailure = _a.fetchTreasurySummaryFailure, exports.updateTreasuryTransactionListUIState = _a.updateTreasuryTransactionListUIState;
|
|
152
|
-
exports.default = treasuryDetail.reducer;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FetchStateAndError } from '../../../../commonStateTypes/common';
|
|
2
|
-
import { SelectorView } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
-
import { RootState } from '../../../../reducer';
|
|
4
|
-
import { AccountHistoryWithBalances, TreasuryListUIState, TreasurySummaryWithBalance, TreasuryTransaction } from './treasuryDetailState';
|
|
5
|
-
export interface TreasuryDetailSelectorView extends SelectorView {
|
|
6
|
-
accountHistory: AccountHistoryWithBalances;
|
|
7
|
-
transactions: TreasuryTransaction[];
|
|
8
|
-
transactionsFetchState: FetchStateAndError;
|
|
9
|
-
uiState: TreasuryListUIState;
|
|
10
|
-
accountSummaryFetchState: FetchStateAndError;
|
|
11
|
-
allocationPercentage: Record<string, number>;
|
|
12
|
-
accountSummary?: TreasurySummaryWithBalance;
|
|
13
|
-
}
|
|
14
|
-
export declare const getTreasuryDetail: (state: RootState) => TreasuryDetailSelectorView;
|