@zeniai/client-epic-state 4.9.99 → 4.10.1
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/commonPayloadTypes/commonPayload.d.ts +8 -0
- package/lib/commonPayloadTypes/commonPayload.js +18 -0
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
- 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/forecast/forecastState.d.ts +1 -1
- package/lib/entity/notification/notificationPayload.d.ts +46 -0
- package/lib/entity/notification/notificationPayload.js +124 -0
- package/lib/entity/notification/notificationReducer.d.ts +20 -0
- package/lib/entity/notification/notificationReducer.js +118 -0
- package/lib/entity/notification/notificationSelector.d.ts +9 -0
- package/lib/entity/notification/notificationSelector.js +36 -0
- package/lib/entity/notification/notificationState.d.ts +7 -0
- package/lib/entity/notification/notificationState.js +2 -0
- package/lib/entity/notification/types/notificationSelectorTypes.d.ts +8 -0
- package/lib/entity/notification/types/notificationSelectorTypes.js +2 -0
- package/lib/entity/notification/types/notificationStateTypes.d.ts +50 -0
- package/lib/entity/notification/types/notificationStateTypes.js +2 -0
- package/lib/entity/notification/types/notificationTypes.d.ts +24 -0
- package/lib/entity/notification/types/notificationTypes.js +58 -0
- 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 +1 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +4 -2
- package/lib/entity/tenant/clearAllEpic.js +5 -1
- package/lib/epic.d.ts +7 -3
- package/lib/epic.js +5 -1
- package/lib/index.d.ts +10 -2
- package/lib/index.js +29 -8
- package/lib/reducer.d.ts +6 -0
- package/lib/reducer.js +6 -0
- package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
- 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/notificationView/epics/fetchNotificationUnreadCountEpic.d.ts +10 -0
- package/lib/view/notificationView/epics/fetchNotificationUnreadCountEpic.js +39 -0
- package/lib/view/notificationView/epics/fetchNotificationViewEpic.d.ts +9 -0
- package/lib/view/notificationView/epics/fetchNotificationViewEpic.js +56 -0
- package/lib/view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic.d.ts +9 -0
- package/lib/view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic.js +50 -0
- package/lib/view/notificationView/epics/updateNotificationViewNotificationStatusEpic.d.ts +9 -0
- package/lib/view/notificationView/epics/updateNotificationViewNotificationStatusEpic.js +86 -0
- package/lib/view/notificationView/notificationView.helpers.d.ts +2 -0
- package/lib/view/notificationView/notificationView.helpers.js +11 -0
- package/lib/view/notificationView/notificationViewPayload.d.ts +48 -0
- package/lib/view/notificationView/notificationViewPayload.js +2 -0
- package/lib/view/notificationView/notificationViewReducer.d.ts +64 -0
- package/lib/view/notificationView/notificationViewReducer.js +372 -0
- package/lib/view/notificationView/notificationViewSelector.d.ts +29 -0
- package/lib/view/notificationView/notificationViewSelector.js +89 -0
- package/lib/view/notificationView/notificationViewState.d.ts +31 -0
- package/lib/view/notificationView/notificationViewState.js +19 -0
- package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
- package/lib/view/people/deletePersonEpic.d.ts +1 -1
- package/lib/view/people/invitePeopleEpic.d.ts +1 -1
- package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
- package/lib/view/people/resendInviteEpic.d.ts +1 -1
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/settingsView/epic/fetchNotificationSettingsViewEpic.d.ts +2 -1
- package/lib/view/settingsView/epic/fetchNotificationSettingsViewEpic.js +8 -6
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
- package/lib/view/settingsView/settingsViewReducer.d.ts +4 -1
- package/lib/view/settingsView/settingsViewReducer.js +11 -2
- package/lib/view/settingsView/settingsViewSelector.js +18 -7
- package/lib/view/settingsView/types/settingsViewSelectorTypes.d.ts +1 -0
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.d.ts +2 -1
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +37 -5
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.d.ts +1 -1
- package/lib/zeniAPI.d.ts +2 -0
- package/lib/zeniAPI.js +8 -0
- package/package.json +2 -1
|
@@ -13,7 +13,7 @@ export declare const resendInviteEpic: (actions$: ActionsObservable<ActionType>,
|
|
|
13
13
|
type: string;
|
|
14
14
|
} | {
|
|
15
15
|
payload: {
|
|
16
|
-
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read";
|
|
16
|
+
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read";
|
|
17
17
|
messageText: "failed" | "success";
|
|
18
18
|
type: import("../..").SnackbarMessageType;
|
|
19
19
|
showStatusIcon?: boolean | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getReimbursementCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "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";
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "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";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
fetchState: import("../..").FetchState;
|
|
@@ -2,5 +2,6 @@ import { ActionsObservable } from 'redux-observable';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { fetchClassList } from '../../classList/classListReducer';
|
|
4
4
|
import { fetchUserListByType } from '../../userListView/userListViewReducer';
|
|
5
|
-
|
|
5
|
+
import { fetchCompanyPassportView } from '../../companyView/companyViewReducer';
|
|
6
|
+
export declare type ActionType = ReturnType<typeof fetchUserListByType> | ReturnType<typeof fetchCompanyPassportView> | ReturnType<typeof fetchClassList>;
|
|
6
7
|
export declare const fetchNotificationSettingsViewEpic: (actions$: ActionsObservable<ActionType>) => Observable<ActionType>;
|
|
@@ -6,11 +6,13 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const settingsViewReducer_1 = require("../settingsViewReducer");
|
|
7
7
|
const classListReducer_1 = require("../../classList/classListReducer");
|
|
8
8
|
const userListViewReducer_1 = require("../../userListView/userListViewReducer");
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
const companyViewReducer_1 = require("../../companyView/companyViewReducer");
|
|
10
|
+
const fetchNotificationSettingsViewEpic = (actions$) => actions$.pipe((0, operators_1.filter)(settingsViewReducer_1.fetchNotificationSettingsView.match), (0, operators_1.switchMap)((action) => {
|
|
11
|
+
const { hasMonthEndAccess, companyId } = action.payload;
|
|
12
|
+
// if the user has access to month end, then we have to fetch users list and class list to show the dropdown. If not we need to fetch passport view to show the controller
|
|
13
|
+
if (hasMonthEndAccess) {
|
|
14
|
+
return (0, rxjs_1.from)([(0, userListViewReducer_1.fetchUserListByType)('manager', true), (0, classListReducer_1.fetchClassList)()]);
|
|
15
|
+
}
|
|
16
|
+
return (0, rxjs_1.from)([(0, companyViewReducer_1.fetchCompanyPassportView)(companyId)]);
|
|
15
17
|
}));
|
|
16
18
|
exports.fetchNotificationSettingsViewEpic = fetchNotificationSettingsViewEpic;
|
|
@@ -18,7 +18,7 @@ export declare const saveNotificationSettingsEpic: (actions$: ActionsObservable<
|
|
|
18
18
|
type: string;
|
|
19
19
|
} | {
|
|
20
20
|
payload: {
|
|
21
|
-
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read";
|
|
21
|
+
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read";
|
|
22
22
|
messageText: "failed" | "success";
|
|
23
23
|
type: import("../../..").SnackbarMessageType;
|
|
24
24
|
showStatusIcon?: boolean | undefined;
|
|
@@ -5,7 +5,10 @@ import { ID } from '../../commonStateTypes/common';
|
|
|
5
5
|
export declare const initialState: SettingsViewState;
|
|
6
6
|
export declare const fetchMyProfileView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
|
|
7
7
|
companyId: string;
|
|
8
|
-
}, string, never, never>, fetchMyProfile: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, fetchNotificationSettingsView: import("@reduxjs/toolkit").
|
|
8
|
+
}, string, never, never>, fetchMyProfile: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, fetchNotificationSettingsView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[hasMonthEndAccess: boolean, companyId: string], {
|
|
9
|
+
hasMonthEndAccess: boolean;
|
|
10
|
+
companyId: string;
|
|
11
|
+
}, string, never, never>, updateMyProfileOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string], {
|
|
9
12
|
userId: string;
|
|
10
13
|
}, string, never, never>, updateMyProfileOnFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, fetchBankConnectionsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateBankConnectionOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
11
14
|
bankAccountIds: ID[];
|
|
@@ -101,8 +101,17 @@ const settings = (0, toolkit_1.createSlice)({
|
|
|
101
101
|
draft.bankConnection.fetchState = 'Error';
|
|
102
102
|
draft.bankConnection.error = action.payload;
|
|
103
103
|
},
|
|
104
|
-
fetchNotificationSettingsView
|
|
105
|
-
|
|
104
|
+
fetchNotificationSettingsView: {
|
|
105
|
+
prepare(hasMonthEndAccess, companyId) {
|
|
106
|
+
return { payload: { hasMonthEndAccess, companyId } };
|
|
107
|
+
},
|
|
108
|
+
reducer(
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
110
|
+
_draft,
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
112
|
+
_action) {
|
|
113
|
+
//do nothing
|
|
114
|
+
},
|
|
106
115
|
},
|
|
107
116
|
fetchNotificationSettings(draft) {
|
|
108
117
|
draft.notification.fetchState = 'In-Progress';
|
|
@@ -124,15 +124,26 @@ exports.getMyProfileView = (0, toolkit_1.createSelector)((state) => state.tenant
|
|
|
124
124
|
exports.getNotificationSettings = (0, toolkit_1.createSelector)((state) => state.settingsViewState, (settingsViewState) => {
|
|
125
125
|
return settingsViewState.notification;
|
|
126
126
|
});
|
|
127
|
-
exports.getNotificationSettingsView = (0, toolkit_1.createSelector)((state) => state.settingsViewState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => (0, userListViewSelector_1.getUserList)(state, 'manager'), (settingsViewState, userState, classState, classListState, managersListView) => {
|
|
127
|
+
exports.getNotificationSettingsView = (0, toolkit_1.createSelector)((state) => state.settingsViewState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => (0, userListViewSelector_1.getUserList)(state, 'manager'), (state) => (0, companyPassportViewSelector_1.getCompanyPassportView)(state), (settingsViewState, userState, classState, classListState, managersListView, companyPassportView) => {
|
|
128
|
+
var _a;
|
|
128
129
|
const classList = (0, classSelectorV2_1.getClassesByIds)(classState, {
|
|
129
130
|
classIds: classListState.classIds,
|
|
130
131
|
reportId: 'class_list',
|
|
131
132
|
});
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
133
|
+
const controllersList = ((_a = companyPassportView.companyView) === null || _a === void 0 ? void 0 : _a.controllers) != null
|
|
134
|
+
? companyPassportView.companyView.controllers.map((controller) => controller.user)
|
|
135
|
+
: [];
|
|
136
|
+
const fetchState = settingsViewState.notification.notificationSettings
|
|
137
|
+
.monthEndInsightsNotificationSettings.enabled != null
|
|
138
|
+
? (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
139
|
+
settingsViewState.notification,
|
|
140
|
+
classListState,
|
|
141
|
+
managersListView,
|
|
142
|
+
])
|
|
143
|
+
: (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
144
|
+
settingsViewState.notification,
|
|
145
|
+
companyPassportView,
|
|
146
|
+
]);
|
|
147
|
+
return Object.assign(Object.assign({}, settingsViewState.notification), { allUsers: (0, values_1.default)(userState.userByUserId), classList,
|
|
148
|
+
controllersList, managersList: managersListView.users, fetchState: fetchState.fetchState, error: fetchState.error });
|
|
138
149
|
});
|
|
@@ -34,6 +34,7 @@ export interface NotificationSettingsSelectorView extends NotificationSettings {
|
|
|
34
34
|
allUsers: User[];
|
|
35
35
|
classList: Class[];
|
|
36
36
|
managersList: Person[];
|
|
37
|
+
controllersList: User[];
|
|
37
38
|
}
|
|
38
39
|
export interface IntegrationsView {
|
|
39
40
|
externalConnections: TenantExternalConnections | undefined;
|
|
@@ -5,5 +5,6 @@ import { ZeniAPI } from '../../../../zeniAPI';
|
|
|
5
5
|
import { RootState } from '../../../../reducer';
|
|
6
6
|
import { updateTasks } from '../../../../entity/task/taskReducer';
|
|
7
7
|
import { fetchFileList } from '../../../fileView/fileViewReducer';
|
|
8
|
-
|
|
8
|
+
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
9
|
+
export declare type ActionType = ReturnType<typeof fetchTaskDetail> | ReturnType<typeof updateEditTaskFetchStatus> | ReturnType<typeof removeTaskDetail> | ReturnType<typeof updateTasks> | ReturnType<typeof initializeTaskToLocalStore> | ReturnType<typeof fetchFileList> | ReturnType<typeof openSnackbar>;
|
|
9
10
|
export declare const fetchTaskDetailEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -11,6 +11,7 @@ const taskDetailReducer_1 = require("../taskDetailReducer");
|
|
|
11
11
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
12
12
|
const taskReducer_1 = require("../../../../entity/task/taskReducer");
|
|
13
13
|
const fileViewReducer_1 = require("../../../fileView/fileViewReducer");
|
|
14
|
+
const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
|
|
14
15
|
const fetchTaskDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(taskDetailReducer_1.fetchTaskDetail.match), (0, operators_1.mergeMap)((action) => {
|
|
15
16
|
const { taskId, cacheOverride } = action.payload;
|
|
16
17
|
const taskActions = [];
|
|
@@ -42,11 +43,42 @@ const fetchTaskDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
|
|
|
42
43
|
return (0, rxjs_1.from)(fetchActions);
|
|
43
44
|
}
|
|
44
45
|
else {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
const fetchActions = [
|
|
47
|
+
(0, taskDetailReducer_1.updateEditTaskFetchStatus)({
|
|
48
|
+
taskId,
|
|
49
|
+
fetchState: 'Error',
|
|
50
|
+
error: response.status,
|
|
51
|
+
}),
|
|
52
|
+
];
|
|
53
|
+
if (response.status.message.includes('delete')) {
|
|
54
|
+
fetchActions.push((0, snackbarReducer_1.openSnackbar)({
|
|
55
|
+
messageSection: 'fetch_task_detail',
|
|
56
|
+
messageText: 'failed',
|
|
57
|
+
type: 'error',
|
|
58
|
+
showStatusIcon: true,
|
|
59
|
+
variables: [
|
|
60
|
+
{
|
|
61
|
+
variableName: '_api-error_',
|
|
62
|
+
variableValue: 'Cannot retrieve deleted task.',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
fetchActions.push((0, snackbarReducer_1.openSnackbar)({
|
|
69
|
+
messageSection: 'fetch_task_detail',
|
|
70
|
+
messageText: 'failed',
|
|
71
|
+
type: 'error',
|
|
72
|
+
showStatusIcon: true,
|
|
73
|
+
variables: [
|
|
74
|
+
{
|
|
75
|
+
variableName: '_api-error_',
|
|
76
|
+
variableValue: response.status.message,
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
return (0, rxjs_1.from)(fetchActions);
|
|
50
82
|
}
|
|
51
83
|
}), (0, operators_1.catchError)((error) => {
|
|
52
84
|
console.error(`REST API call errored out ${error}`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getTasksCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "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";
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "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";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
status: import("../..").Status | undefined;
|
|
@@ -5,7 +5,7 @@ import { AccountState } from '../../entity/account/accountState';
|
|
|
5
5
|
import { EntityOrder } from '../../commonStateTypes/selectorTypes/selectorTypes';
|
|
6
6
|
import { TopExReport, TopExTimePeriodWithMetaData } from './topExSelectorTypes';
|
|
7
7
|
export declare const getTopExpenses: (accountState: AccountState, topExState: TopExState, numberOfExpenses?: number | undefined) => {
|
|
8
|
-
reportId: "cash_balance" | "card_balance" | "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";
|
|
8
|
+
reportId: "cash_balance" | "card_balance" | "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";
|
|
9
9
|
reportTitle: string;
|
|
10
10
|
version: string | number | undefined;
|
|
11
11
|
status: import("../..").Status | undefined;
|
|
@@ -6,7 +6,7 @@ export declare const getZeniAccountsPromoCard: (state: RootState) => {
|
|
|
6
6
|
maxCashBalanceAvailable: number | undefined;
|
|
7
7
|
maxInsuredAmount: number;
|
|
8
8
|
depositAccountId: string | undefined;
|
|
9
|
-
reportId: "cash_balance" | "card_balance" | "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";
|
|
9
|
+
reportId: "cash_balance" | "card_balance" | "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";
|
|
10
10
|
reportTitle: string;
|
|
11
11
|
firstMonthOfFY: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
12
12
|
fetchState: import("../..").FetchState;
|
package/lib/zeniAPI.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export interface ZeniAPI<ResponseType = FetchResponse> {
|
|
|
28
28
|
postAndGetJSON<T>(restEndPoint: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
|
|
29
29
|
deleteAndGetJSON<T>(path: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
|
|
30
30
|
putAndGetJSON<T>(restEndPoint: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
|
|
31
|
+
patchAndGetJSON<T>(restEndPoint: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
|
|
31
32
|
}
|
|
32
33
|
export declare class ZeniAPIClient implements ZeniAPI {
|
|
33
34
|
readonly apiEndPoints: RESTAPIEndpoints;
|
|
@@ -41,6 +42,7 @@ export declare class ZeniAPIClient implements ZeniAPI {
|
|
|
41
42
|
postAndGetJSON<T>(restEndPoint: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
|
|
42
43
|
deleteAndGetJSON<T>(restEndPoint: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
|
|
43
44
|
putAndGetJSON<T>(restEndPoint: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
|
|
45
|
+
patchAndGetJSON<T>(restEndPoint: string, body?: Record<string, unknown>, headers?: Record<string, unknown>): Observable<T>;
|
|
44
46
|
private apiHeaders;
|
|
45
47
|
}
|
|
46
48
|
export {};
|
package/lib/zeniAPI.js
CHANGED
|
@@ -59,5 +59,13 @@ class ZeniAPIClient {
|
|
|
59
59
|
}).then((response) => response.json());
|
|
60
60
|
return (0, rxjs_1.from)(promise);
|
|
61
61
|
}
|
|
62
|
+
patchAndGetJSON(restEndPoint, body, headers) {
|
|
63
|
+
const promise = (0, cross_fetch_1.fetch)(restEndPoint, {
|
|
64
|
+
method: 'PATCH',
|
|
65
|
+
body: body != null ? JSON.stringify(body) : undefined,
|
|
66
|
+
headers: Object.assign({ 'Content-Type': 'application/json' }, this.apiHeaders(headers)),
|
|
67
|
+
}).then((response) => response.json());
|
|
68
|
+
return (0, rxjs_1.from)(promise);
|
|
69
|
+
}
|
|
62
70
|
}
|
|
63
71
|
exports.ZeniAPIClient = ZeniAPIClient;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.10.1",
|
|
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",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/zeni-ai/client-epic-state#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
+
"@cord-sdk/types": "^1.45.1",
|
|
28
29
|
"@types/chai": "^4.2.11",
|
|
29
30
|
"@types/jest": "^29.4.0",
|
|
30
31
|
"@types/lodash": "^4.14.178",
|