@zeniai/client-epic-state 5.2.41-beta1MM → 5.2.41-beta3MM

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.
Files changed (28) hide show
  1. package/lib/entity/actualMatching/actualMatchingReducer.d.ts +3 -1
  2. package/lib/entity/actualMatching/actualMatchingReducer.js +11 -2
  3. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  4. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  5. package/lib/epic.d.ts +2 -1
  6. package/lib/epic.js +2 -0
  7. package/lib/esm/entity/actualMatching/actualMatchingReducer.js +9 -1
  8. package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
  9. package/lib/esm/epic.js +2 -0
  10. package/lib/esm/index.js +5 -5
  11. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/actualMatching/ignoreActualMatchingSuggestionEpic.js +49 -0
  12. package/lib/esm/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +40 -1
  13. package/lib/esm/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +19 -6
  14. package/lib/esm/view/expenseAutomationView/types/actualMatchingViewState.js +15 -0
  15. package/lib/index.d.ts +5 -5
  16. package/lib/index.js +54 -48
  17. package/lib/view/expenseAutomationView/epics/jeSchedule/actualMatching/ignoreActualMatchingSuggestionEpic.d.ts +10 -0
  18. package/lib/view/expenseAutomationView/epics/jeSchedule/actualMatching/ignoreActualMatchingSuggestionEpic.js +53 -0
  19. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  20. package/lib/view/expenseAutomationView/payload/actualMatchingPayload.d.ts +6 -0
  21. package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.d.ts +11 -2
  22. package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +41 -2
  23. package/lib/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.d.ts +2 -0
  24. package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.d.ts +2 -0
  25. package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +20 -6
  26. package/lib/view/expenseAutomationView/types/actualMatchingViewState.d.ts +17 -0
  27. package/lib/view/expenseAutomationView/types/actualMatchingViewState.js +18 -1
  28. package/package.json +1 -1
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ignoreActualMatchingSuggestionEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const actualMatchingReducer_1 = require("../../../../../entity/actualMatching/actualMatchingReducer");
7
+ const actualMatchingSelector_1 = require("../../../../../entity/actualMatching/actualMatchingSelector");
8
+ const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
9
+ const responsePayload_1 = require("../../../../../responsePayload");
10
+ const rootActions_1 = require("../../../../../rootActions");
11
+ const actualMatchingViewReducer_1 = require("../../../reducers/actualMatchingViewReducer");
12
+ const refreshActualMatchingList_1 = require("./refreshActualMatchingList");
13
+ function matchVendorName(state, matchId) {
14
+ return ((0, actualMatchingSelector_1.getActualMatchingMatchById)(state.actualMatchingState, matchId)?.vendorName ??
15
+ '');
16
+ }
17
+ function ignoreSuggestionSnackbar(vendorName, succeeded) {
18
+ return (0, snackbarReducer_1.openSnackbar)({
19
+ messageSection: 'actual_matching_ignore_suggestion',
20
+ messageText: succeeded ? 'success' : 'failed',
21
+ type: succeeded ? 'success' : 'error',
22
+ variables: [{ variableName: '_vendor_name_', variableValue: vendorName }],
23
+ });
24
+ }
25
+ const ignoreActualMatchingSuggestionEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(actualMatchingViewReducer_1.ignoreActualMatchingSuggestion.match), (0, operators_1.groupBy)((action) => action.payload.matchId), (0, operators_1.mergeMap)((perMatch$) => perMatch$.pipe((0, operators_1.exhaustMap)((action) => {
26
+ const { matchId, reason, note } = action.payload;
27
+ const body = {
28
+ reason,
29
+ ...(note != null && note !== '' ? { note } : {}),
30
+ };
31
+ const vendorName = matchVendorName(state$.value, matchId);
32
+ return zeniAPI
33
+ .putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/accruals/actual-matching/${encodeURIComponent(matchId)}/ignore`, body)
34
+ .pipe((0, operators_1.mergeMap)((response) => {
35
+ if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
36
+ return (0, rxjs_1.from)([
37
+ (0, actualMatchingReducer_1.removeActualMatchingMatch)(matchId),
38
+ (0, actualMatchingViewReducer_1.ignoreActualMatchingSuggestionSuccess)({ matchId }),
39
+ ...(0, refreshActualMatchingList_1.refreshActualMatchingList)(state$.value),
40
+ ignoreSuggestionSnackbar(vendorName, true),
41
+ ]);
42
+ }
43
+ return (0, rxjs_1.of)((0, actualMatchingViewReducer_1.ignoreActualMatchingSuggestionFailure)({
44
+ matchId,
45
+ status: response.status,
46
+ }), ignoreSuggestionSnackbar(vendorName, false));
47
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, actualMatchingViewReducer_1.ignoreActualMatchingSuggestionFailure)({
48
+ matchId,
49
+ status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Ignore actual matching suggestion REST API call errored out' +
50
+ JSON.stringify(error)),
51
+ }), ignoreSuggestionSnackbar(vendorName, false))), (0, operators_1.takeUntil)(actions$.pipe((0, operators_1.filter)(rootActions_1.clearAll.match))));
52
+ }))));
53
+ exports.ignoreActualMatchingSuggestionEpic = ignoreActualMatchingSuggestionEpic;
@@ -39,7 +39,7 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
39
39
  export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
40
40
  export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
41
41
  export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
42
- messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "actual_matching_match_and_reverse" | "actual_matching_undo_reversal" | "audit_score_updated" | "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_approval_reorder" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "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_approval_reorder" | "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" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "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" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "revert_schedule" | "ignore_accrual" | "revert_accrual" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "accounting_projects_enabled_update" | "accounting_projects_qbo_not_enabled" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "confirm_statement_mapping" | "statement_parsing_in_progress" | "statement_parsing_complete" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron" | "create_sub_task" | "qbo_connection_already_linked" | "qbo_connection_failed" | "accounting_projects_qbo_reconnect_failed" | "product_services_update" | "qbo_realm_id_update" | "invoicing_dunning_case_resolved" | "invoicing_dunning_retry" | "invoicing_dunning_cancel" | "invoicing_dunning_settings_save" | "invoicing_qbo_backfill" | "invoicing_qbo_sync_health_retry" | "invoicing_qbo_settings_save" | "invoicing_branding_save" | "invoicing_discount_archive" | "invoicing_discount_unarchive" | "invoicing_discount_delete" | "invoicing_invoice_reminder_sent" | "invoicing_invoice_regenerated" | "invoicing_invoice_voided" | "invoicing_catalog_item_saved" | "invoicing_customer_saved" | "invoicing_subscription_saved" | "invoicing_coupon_saved" | "invoicing_invoice_saved" | "invoicing_credit_note_saved" | "invoicing_payment_recorded" | "invoicing_subscription_activated" | "invoicing_subscription_cancellation_removed" | "invoicing_subscription_cancelled" | "invoicing_subscription_non_renewing" | "invoicing_subscription_paused" | "invoicing_subscription_reactivated" | "invoicing_subscription_resumed" | "invoicing_subscription_term_end_changed";
42
+ messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "actual_matching_match_and_reverse" | "actual_matching_undo_reversal" | "actual_matching_ignore_suggestion" | "audit_score_updated" | "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_approval_reorder" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "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_approval_reorder" | "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" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "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" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "revert_schedule" | "ignore_accrual" | "revert_accrual" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "accounting_projects_enabled_update" | "accounting_projects_qbo_not_enabled" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "confirm_statement_mapping" | "statement_parsing_in_progress" | "statement_parsing_complete" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron" | "create_sub_task" | "qbo_connection_already_linked" | "qbo_connection_failed" | "accounting_projects_qbo_reconnect_failed" | "product_services_update" | "qbo_realm_id_update" | "invoicing_dunning_case_resolved" | "invoicing_dunning_retry" | "invoicing_dunning_cancel" | "invoicing_dunning_settings_save" | "invoicing_qbo_backfill" | "invoicing_qbo_sync_health_retry" | "invoicing_qbo_settings_save" | "invoicing_branding_save" | "invoicing_discount_archive" | "invoicing_discount_unarchive" | "invoicing_discount_delete" | "invoicing_invoice_reminder_sent" | "invoicing_invoice_regenerated" | "invoicing_invoice_voided" | "invoicing_catalog_item_saved" | "invoicing_customer_saved" | "invoicing_subscription_saved" | "invoicing_coupon_saved" | "invoicing_invoice_saved" | "invoicing_credit_note_saved" | "invoicing_payment_recorded" | "invoicing_subscription_activated" | "invoicing_subscription_cancellation_removed" | "invoicing_subscription_cancelled" | "invoicing_subscription_non_renewing" | "invoicing_subscription_paused" | "invoicing_subscription_reactivated" | "invoicing_subscription_resumed" | "invoicing_subscription_term_end_changed";
43
43
  messageText: "notification" | "failed" | "success";
44
44
  type: "error" | "success" | "info";
45
45
  variables: {
@@ -72,6 +72,12 @@ export declare function toMatchAndReverseResult(payload: MatchAndReverseResultPa
72
72
  export interface UndoReversalRequestPayload {
73
73
  accrual_ids: ID[];
74
74
  }
75
+ export interface IgnoreActualMatchingSuggestionResponsePayload {
76
+ already_dismissed_accrual_ids?: string[];
77
+ dismissed_accrual_ids?: string[];
78
+ match_id?: string;
79
+ }
80
+ export type IgnoreActualMatchingSuggestionResponse = ZeniAPIResponse<IgnoreActualMatchingSuggestionResponsePayload>;
75
81
  export interface UndoReversalResultPayload {
76
82
  accrual_id: ID;
77
83
  status: string;
@@ -7,7 +7,7 @@ export declare const initialTransactionSearchState: ActualMatchingTransactionSea
7
7
  export declare const initialAccrualSearchState: ActualMatchingAccrualSearchState;
8
8
  export declare const initialMatchModalState: ActualMatchingMatchModalState;
9
9
  export declare const initialState: ActualMatchingViewState;
10
- export declare const ackCloseMatchAfterUndo: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/ackCloseMatchAfterUndo">, clearActualMatchingView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/clearActualMatchingView">, clearMatchNewModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/clearMatchNewModal">, closeMatchNewModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/closeMatchNewModal">, fetchActualMatching: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
10
+ export declare const ackCloseMatchAfterIgnore: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/ackCloseMatchAfterIgnore">, ackCloseMatchAfterUndo: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/ackCloseMatchAfterUndo">, clearActualMatchingView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/clearActualMatchingView">, clearMatchNewModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/clearMatchNewModal">, closeMatchNewModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/closeMatchNewModal">, fetchActualMatching: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
11
11
  period: TimePeriod;
12
12
  refreshViewInBackground: any;
13
13
  }, "expenseAutomationActualMatchingView/fetchActualMatching", never, never>, fetchActualMatchingFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -31,7 +31,16 @@ export declare const ackCloseMatchAfterUndo: import("@reduxjs/toolkit").ActionCr
31
31
  matchIds: ActualMatchingMatchId[];
32
32
  refreshViewInBackground: boolean;
33
33
  selectedPeriod: MonthYearPeriod;
34
- }, "expenseAutomationActualMatchingView/fetchActualMatchingSuccess">, matchAndReverseAccruals: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: string, transactionIntegrationId: string, transactionType: string, lineIds: string[], transactionSyncToken: string, accrualIds: string[]], {
34
+ }, "expenseAutomationActualMatchingView/fetchActualMatchingSuccess">, ignoreActualMatchingSuggestion: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[matchId: string, reason: "other_ignore" | "already_handled" | "amount_off" | "wrong_period" | "wrong_bill", note?: string | undefined], {
35
+ matchId: string;
36
+ reason: "other_ignore" | "already_handled" | "amount_off" | "wrong_period" | "wrong_bill";
37
+ note: string | undefined;
38
+ }, "expenseAutomationActualMatchingView/ignoreActualMatchingSuggestion", never, never>, ignoreActualMatchingSuggestionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
39
+ matchId: ActualMatchingMatchId;
40
+ status: ZeniAPIStatus;
41
+ }, "expenseAutomationActualMatchingView/ignoreActualMatchingSuggestionFailure">, ignoreActualMatchingSuggestionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
42
+ matchId: ActualMatchingMatchId;
43
+ }, "expenseAutomationActualMatchingView/ignoreActualMatchingSuggestionSuccess">, matchAndReverseAccruals: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: string, transactionIntegrationId: string, transactionType: string, lineIds: string[], transactionSyncToken: string, accrualIds: string[]], {
35
44
  transactionId: string;
36
45
  transactionIntegrationId: string;
37
46
  transactionType: string;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.updateActualMatchingUIState = exports.undoReversalAccrualsSuccess = exports.undoReversalAccrualsFailure = exports.undoReversalAccruals = exports.searchMatchTransactionsSuccess = exports.searchMatchTransactionsFailure = exports.searchMatchTransactions = exports.searchMatchAccrualsSuccess = exports.searchMatchAccrualsFailure = exports.searchMatchAccruals = exports.openMatchNewModal = exports.matchAndReverseAccrualsSuccess = exports.matchAndReverseAccrualsFailure = exports.matchAndReverseAccruals = exports.fetchActualMatchingSuccess = exports.fetchActualMatchingPage = exports.fetchActualMatchingMatchSuccess = exports.fetchActualMatchingMatchFailure = exports.fetchActualMatchingMatch = exports.fetchActualMatchingFailure = exports.fetchActualMatching = exports.closeMatchNewModal = exports.clearMatchNewModal = exports.clearActualMatchingView = exports.ackCloseMatchAfterUndo = exports.initialState = exports.initialMatchModalState = exports.initialAccrualSearchState = exports.initialTransactionSearchState = void 0;
4
+ exports.updateActualMatchingUIState = exports.undoReversalAccrualsSuccess = exports.undoReversalAccrualsFailure = exports.undoReversalAccruals = exports.searchMatchTransactionsSuccess = exports.searchMatchTransactionsFailure = exports.searchMatchTransactions = exports.searchMatchAccrualsSuccess = exports.searchMatchAccrualsFailure = exports.searchMatchAccruals = exports.openMatchNewModal = exports.matchAndReverseAccrualsSuccess = exports.matchAndReverseAccrualsFailure = exports.matchAndReverseAccruals = exports.ignoreActualMatchingSuggestionSuccess = exports.ignoreActualMatchingSuggestionFailure = exports.ignoreActualMatchingSuggestion = exports.fetchActualMatchingSuccess = exports.fetchActualMatchingPage = exports.fetchActualMatchingMatchSuccess = exports.fetchActualMatchingMatchFailure = exports.fetchActualMatchingMatch = exports.fetchActualMatchingFailure = exports.fetchActualMatching = exports.closeMatchNewModal = exports.clearMatchNewModal = exports.clearActualMatchingView = exports.ackCloseMatchAfterUndo = exports.ackCloseMatchAfterIgnore = exports.initialState = exports.initialMatchModalState = exports.initialAccrualSearchState = exports.initialTransactionSearchState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
7
7
  const jeScheduleHelper_1 = require("../../../entity/jeSchedules/jeScheduleHelper");
@@ -48,9 +48,11 @@ exports.initialState = {
48
48
  sortOrder: 'descending',
49
49
  searchString: '',
50
50
  scrollPosition: { scrollTop: 0, scrollLeft: undefined },
51
+ statusFilter: 'all',
51
52
  },
52
53
  matchModal: exports.initialMatchModalState,
53
54
  undoReversalStatusByMatchId: {},
55
+ ignoreStatusByMatchId: {},
54
56
  closeMatchAfterUndo: false,
55
57
  lastMatchResultsByMatchId: {},
56
58
  lastUndoResultsByMatchId: {},
@@ -243,6 +245,9 @@ const expenseAutomationActualMatchingView = (0, toolkit_1.createSlice)({
243
245
  if (action.payload.scrollPosition != null) {
244
246
  draft.uiState.scrollPosition = action.payload.scrollPosition;
245
247
  }
248
+ if (action.payload.statusFilter != null) {
249
+ draft.uiState.statusFilter = action.payload.statusFilter;
250
+ }
246
251
  },
247
252
  openMatchNewModal: {
248
253
  prepare(matchId) {
@@ -446,6 +451,40 @@ const expenseAutomationActualMatchingView = (0, toolkit_1.createSlice)({
446
451
  ackCloseMatchAfterUndo(draft) {
447
452
  draft.closeMatchAfterUndo = false;
448
453
  },
454
+ ignoreActualMatchingSuggestion: {
455
+ prepare(matchId, reason, note) {
456
+ return { payload: { matchId, reason, note } };
457
+ },
458
+ reducer(draft, action) {
459
+ draft.ignoreStatusByMatchId[action.payload.matchId] = {
460
+ fetchState: 'In-Progress',
461
+ error: undefined,
462
+ };
463
+ },
464
+ },
465
+ ignoreActualMatchingSuggestionSuccess(draft, action) {
466
+ const { matchId } = action.payload;
467
+ draft.ignoreStatusByMatchId[matchId] = {
468
+ fetchState: 'Completed',
469
+ error: undefined,
470
+ };
471
+ draft.closeMatchAfterIgnoreMatchId = matchId;
472
+ if (draft.matchModal.openedFromMatchId === matchId) {
473
+ draft.matchModal = exports.initialMatchModalState;
474
+ }
475
+ Object.keys(draft.matchIdsByPeriod).forEach((periodId) => {
476
+ draft.matchIdsByPeriod[periodId] = draft.matchIdsByPeriod[periodId].filter((id) => id !== matchId);
477
+ });
478
+ },
479
+ ignoreActualMatchingSuggestionFailure(draft, action) {
480
+ draft.ignoreStatusByMatchId[action.payload.matchId] = {
481
+ fetchState: 'Error',
482
+ error: action.payload.status,
483
+ };
484
+ },
485
+ ackCloseMatchAfterIgnore(draft) {
486
+ draft.closeMatchAfterIgnoreMatchId = undefined;
487
+ },
449
488
  undoReversalAccrualsFailure(draft, action) {
450
489
  draft.undoReversalStatusByMatchId[action.payload.matchId] = {
451
490
  fetchState: 'Error',
@@ -462,5 +501,5 @@ const expenseAutomationActualMatchingView = (0, toolkit_1.createSlice)({
462
501
  });
463
502
  },
464
503
  });
465
- _a = expenseAutomationActualMatchingView.actions, exports.ackCloseMatchAfterUndo = _a.ackCloseMatchAfterUndo, exports.clearActualMatchingView = _a.clearActualMatchingView, exports.clearMatchNewModal = _a.clearMatchNewModal, exports.closeMatchNewModal = _a.closeMatchNewModal, exports.fetchActualMatching = _a.fetchActualMatching, exports.fetchActualMatchingFailure = _a.fetchActualMatchingFailure, exports.fetchActualMatchingMatch = _a.fetchActualMatchingMatch, exports.fetchActualMatchingMatchFailure = _a.fetchActualMatchingMatchFailure, exports.fetchActualMatchingMatchSuccess = _a.fetchActualMatchingMatchSuccess, exports.fetchActualMatchingPage = _a.fetchActualMatchingPage, exports.fetchActualMatchingSuccess = _a.fetchActualMatchingSuccess, exports.matchAndReverseAccruals = _a.matchAndReverseAccruals, exports.matchAndReverseAccrualsFailure = _a.matchAndReverseAccrualsFailure, exports.matchAndReverseAccrualsSuccess = _a.matchAndReverseAccrualsSuccess, exports.openMatchNewModal = _a.openMatchNewModal, exports.searchMatchAccruals = _a.searchMatchAccruals, exports.searchMatchAccrualsFailure = _a.searchMatchAccrualsFailure, exports.searchMatchAccrualsSuccess = _a.searchMatchAccrualsSuccess, exports.searchMatchTransactions = _a.searchMatchTransactions, exports.searchMatchTransactionsFailure = _a.searchMatchTransactionsFailure, exports.searchMatchTransactionsSuccess = _a.searchMatchTransactionsSuccess, exports.undoReversalAccruals = _a.undoReversalAccruals, exports.undoReversalAccrualsFailure = _a.undoReversalAccrualsFailure, exports.undoReversalAccrualsSuccess = _a.undoReversalAccrualsSuccess, exports.updateActualMatchingUIState = _a.updateActualMatchingUIState;
504
+ _a = expenseAutomationActualMatchingView.actions, exports.ackCloseMatchAfterIgnore = _a.ackCloseMatchAfterIgnore, exports.ackCloseMatchAfterUndo = _a.ackCloseMatchAfterUndo, exports.clearActualMatchingView = _a.clearActualMatchingView, exports.clearMatchNewModal = _a.clearMatchNewModal, exports.closeMatchNewModal = _a.closeMatchNewModal, exports.fetchActualMatching = _a.fetchActualMatching, exports.fetchActualMatchingFailure = _a.fetchActualMatchingFailure, exports.fetchActualMatchingMatch = _a.fetchActualMatchingMatch, exports.fetchActualMatchingMatchFailure = _a.fetchActualMatchingMatchFailure, exports.fetchActualMatchingMatchSuccess = _a.fetchActualMatchingMatchSuccess, exports.fetchActualMatchingPage = _a.fetchActualMatchingPage, exports.fetchActualMatchingSuccess = _a.fetchActualMatchingSuccess, exports.ignoreActualMatchingSuggestion = _a.ignoreActualMatchingSuggestion, exports.ignoreActualMatchingSuggestionFailure = _a.ignoreActualMatchingSuggestionFailure, exports.ignoreActualMatchingSuggestionSuccess = _a.ignoreActualMatchingSuggestionSuccess, exports.matchAndReverseAccruals = _a.matchAndReverseAccruals, exports.matchAndReverseAccrualsFailure = _a.matchAndReverseAccrualsFailure, exports.matchAndReverseAccrualsSuccess = _a.matchAndReverseAccrualsSuccess, exports.openMatchNewModal = _a.openMatchNewModal, exports.searchMatchAccruals = _a.searchMatchAccruals, exports.searchMatchAccrualsFailure = _a.searchMatchAccrualsFailure, exports.searchMatchAccrualsSuccess = _a.searchMatchAccrualsSuccess, exports.searchMatchTransactions = _a.searchMatchTransactions, exports.searchMatchTransactionsFailure = _a.searchMatchTransactionsFailure, exports.searchMatchTransactionsSuccess = _a.searchMatchTransactionsSuccess, exports.undoReversalAccruals = _a.undoReversalAccruals, exports.undoReversalAccrualsFailure = _a.undoReversalAccrualsFailure, exports.undoReversalAccrualsSuccess = _a.undoReversalAccrualsSuccess, exports.updateActualMatchingUIState = _a.updateActualMatchingUIState;
466
505
  exports.default = expenseAutomationActualMatchingView.reducer;
@@ -78,10 +78,12 @@ export interface ActualMatchingMatchModalView {
78
78
  }
79
79
  export interface ExpenseAutomationActualMatchingViewSelector extends SelectorView {
80
80
  hasLoadedForSelectedPeriod: boolean;
81
+ ignoreStatusByMatchId: Record<string, FetchStateAndError>;
81
82
  kpiSummary: ActualMatchingKpiSummary;
82
83
  matchModal: ActualMatchingMatchModalView;
83
84
  pendingReview: ActualMatchingRow[];
84
85
  refreshStatus: FetchStateAndError;
85
86
  reversed: ActualMatchingRow[];
86
87
  uiState: ActualMatchingViewUIState;
88
+ undoReversalStatusByMatchId: Record<string, FetchStateAndError>;
87
89
  }
@@ -27,6 +27,7 @@ export declare function getActualMatchingReversalDate(accrual: JEOneTimeAccrual,
27
27
  export declare function buildActualMatchingKpiSummary(rows: ActualMatchingRow[], displayCurrencyCode?: string): ActualMatchingKpiSummary;
28
28
  export interface ExpenseAutomationActualMatchingMatchView {
29
29
  detailFetchState: FetchStateAndError;
30
+ ignoreStatus: FetchStateAndError;
30
31
  refreshStatus: FetchStateAndError;
31
32
  undoReversalStatus: FetchStateAndError;
32
33
  lastMatchResults?: MatchAndReverseResult[];
@@ -35,4 +36,5 @@ export interface ExpenseAutomationActualMatchingMatchView {
35
36
  }
36
37
  export declare function getExpenseAutomationActualMatchingMatchView(state: RootState, matchId: ActualMatchingMatchId): ExpenseAutomationActualMatchingMatchView;
37
38
  export declare function getCloseMatchAfterUndo(state: RootState): boolean;
39
+ export declare function getCloseMatchAfterIgnoreMatchId(state: RootState): ActualMatchingMatchId | undefined;
38
40
  export declare function getExpenseAutomationActualMatchingView(state: RootState): ExpenseAutomationActualMatchingViewSelector;
@@ -16,6 +16,7 @@ exports.getActualMatchingReversalDate = getActualMatchingReversalDate;
16
16
  exports.buildActualMatchingKpiSummary = buildActualMatchingKpiSummary;
17
17
  exports.getExpenseAutomationActualMatchingMatchView = getExpenseAutomationActualMatchingMatchView;
18
18
  exports.getCloseMatchAfterUndo = getCloseMatchAfterUndo;
19
+ exports.getCloseMatchAfterIgnoreMatchId = getCloseMatchAfterIgnoreMatchId;
19
20
  exports.getExpenseAutomationActualMatchingView = getExpenseAutomationActualMatchingView;
20
21
  const orderBy_1 = __importDefault(require("lodash/orderBy"));
21
22
  const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
@@ -341,20 +342,25 @@ function buildActualMatchingKpiSummary(rows, displayCurrencyCode) {
341
342
  function getExpenseAutomationActualMatchingMatchView(state, matchId) {
342
343
  const view = state.expenseAutomationActualMatchingViewState;
343
344
  return {
344
- match: (0, actualMatchingSelector_1.getActualMatchingMatchById)(state.actualMatchingState, matchId),
345
345
  detailFetchState: view.detailFetchStateByMatchId[matchId] ?? NOT_STARTED,
346
- refreshStatus: view.detailRefreshStatusByMatchId[matchId] ?? NOT_STARTED,
347
- undoReversalStatus: view.undoReversalStatusByMatchId[matchId] ?? NOT_STARTED,
346
+ ignoreStatus: view.ignoreStatusByMatchId[matchId] ?? NOT_STARTED,
348
347
  lastMatchResults: view.lastMatchResultsByMatchId?.[matchId],
349
348
  lastUndoResults: view.lastUndoResultsByMatchId?.[matchId],
349
+ match: (0, actualMatchingSelector_1.getActualMatchingMatchById)(state.actualMatchingState, matchId),
350
+ refreshStatus: view.detailRefreshStatusByMatchId[matchId] ?? NOT_STARTED,
351
+ undoReversalStatus: view.undoReversalStatusByMatchId[matchId] ?? NOT_STARTED,
350
352
  };
351
353
  }
352
354
  function getCloseMatchAfterUndo(state) {
353
355
  return state.expenseAutomationActualMatchingViewState.closeMatchAfterUndo;
354
356
  }
357
+ function getCloseMatchAfterIgnoreMatchId(state) {
358
+ return state.expenseAutomationActualMatchingViewState
359
+ .closeMatchAfterIgnoreMatchId;
360
+ }
355
361
  function getExpenseAutomationActualMatchingView(state) {
356
362
  const { expenseAutomationActualMatchingViewState } = state;
357
- const { matchIdsByPeriod, fetchState, error, refreshStatus, uiState, matchModal, } = expenseAutomationActualMatchingViewState;
363
+ const { matchIdsByPeriod, fetchState, error, refreshStatus, uiState, matchModal, ignoreStatusByMatchId, undoReversalStatusByMatchId, } = expenseAutomationActualMatchingViewState;
358
364
  const selectedPeriod = getSelectedMonthYearForCurrentTenant(state);
359
365
  const monthYearPeriodId = selectedPeriod != null ? (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod) : undefined;
360
366
  const matchIds = monthYearPeriodId != null ? matchIdsByPeriod[monthYearPeriodId] : undefined;
@@ -364,8 +370,14 @@ function getExpenseAutomationActualMatchingView(state) {
364
370
  .filter((match) => match.members.length > 0)
365
371
  .map(toActualMatchingRow);
366
372
  const rows = allRows.filter((row) => matchesSearch(row, uiState.searchString));
367
- const reversed = sortActualMatchingRows(rows.filter((row) => isReversedMatchKind(row.kind)), uiState);
368
- const pendingReview = sortActualMatchingRows(rows.filter((row) => row.kind === 'pending_review'), uiState);
373
+ const includePendingReview = uiState.statusFilter !== 'auto_reversed';
374
+ const includeReversed = uiState.statusFilter !== 'pending_review';
375
+ const reversed = includeReversed
376
+ ? sortActualMatchingRows(rows.filter((row) => isReversedMatchKind(row.kind)), uiState)
377
+ : [];
378
+ const pendingReview = includePendingReview
379
+ ? sortActualMatchingRows(rows.filter((row) => row.kind === 'pending_review'), uiState)
380
+ : [];
369
381
  const kpiSummary = buildActualMatchingKpiSummary(allRows, getTenantDisplayCurrency(state)?.currencyCode);
370
382
  const searchedAccruals = matchModal.accrualSearch.results
371
383
  .map((key) => (0, jeSchedulesSelector_1.getJEOneTimeAccrualByKey)(key, state.jeSchedulesState))
@@ -413,6 +425,8 @@ function getExpenseAutomationActualMatchingView(state) {
413
425
  kpiSummary,
414
426
  uiState,
415
427
  refreshStatus,
428
+ ignoreStatusByMatchId,
429
+ undoReversalStatusByMatchId,
416
430
  hasLoadedForSelectedPeriod: matchIds != null,
417
431
  matchModal: {
418
432
  isOpen: matchModal.isOpen,
@@ -5,6 +5,8 @@ import { ActualMatchingMatchId } from '../../../entity/actualMatching/actualMatc
5
5
  import { JEOneTimeAccrualKey } from '../../../entity/jeSchedules/jeSchedulesTypes';
6
6
  export declare const toActualMatchingSortKey: (v: string) => "type" | "date" | "vendor" | "category" | "class" | "amount" | "variance" | "lifecycle" | "service" | "accrued" | "actual";
7
7
  export type ActualMatchingSortKey = ReturnType<typeof toActualMatchingSortKey>;
8
+ export declare const toActualMatchingStatusFilter: (v: string) => "pending_review" | "auto_reversed" | "all";
9
+ export type ActualMatchingStatusFilter = ReturnType<typeof toActualMatchingStatusFilter>;
8
10
  export declare const MATCH_TRANSACTION_SEARCH_PAGE_SIZE = 50;
9
11
  export declare const MATCH_ACCRUAL_SEARCH_LIMIT = 50;
10
12
  export declare const MATCH_SEARCH_DEBOUNCE_MS = 300;
@@ -18,6 +20,11 @@ export interface ActualMatchingViewUIState {
18
20
  searchString: string;
19
21
  sortKey: ActualMatchingSortKey;
20
22
  sortOrder: SortOrder;
23
+ /**
24
+ * List-only filter. `all` shows both groups; `pending_review` / `auto_reversed`
25
+ * empty the other group. KPI summary stays on the unfiltered period.
26
+ */
27
+ statusFilter: ActualMatchingStatusFilter;
21
28
  }
22
29
  /**
23
30
  * Sibling of Missing Receipts `MatchCandidate`. Confirm needs `lineId` and
@@ -69,6 +76,14 @@ export interface UndoReversalAccrualsParams {
69
76
  accrualIds: ID[];
70
77
  matchId: ActualMatchingMatchId;
71
78
  }
79
+ export declare const toActualMatchingIgnoreReasonType: (v: string) => "other_ignore" | "already_handled" | "amount_off" | "wrong_period" | "wrong_bill";
80
+ export type ActualMatchingIgnoreReasonType = ReturnType<typeof toActualMatchingIgnoreReasonType>;
81
+ export declare const ALL_ACTUAL_MATCHING_IGNORE_REASONS: readonly ActualMatchingIgnoreReasonType[];
82
+ export interface IgnoreActualMatchingSuggestionParams {
83
+ matchId: ActualMatchingMatchId;
84
+ reason: ActualMatchingIgnoreReasonType;
85
+ note?: string;
86
+ }
72
87
  export interface ActualMatchingTransactionSearchState extends FetchStateAndError {
73
88
  isLoadingMore: boolean;
74
89
  nextPageToken: string | null;
@@ -96,6 +111,7 @@ export interface ActualMatchingViewState extends FetchedState {
96
111
  closeMatchAfterUndo: boolean;
97
112
  detailFetchStateByMatchId: Record<ActualMatchingMatchId, FetchStateAndError>;
98
113
  detailRefreshStatusByMatchId: Record<ActualMatchingMatchId, FetchStateAndError>;
114
+ ignoreStatusByMatchId: Record<ActualMatchingMatchId, FetchStateAndError>;
99
115
  lastMatchResultsByMatchId: Record<ActualMatchingMatchId, MatchAndReverseResult[]>;
100
116
  lastUndoResultsByMatchId: Record<ActualMatchingMatchId, UndoReversalResult[]>;
101
117
  matchIdsByPeriod: Record<MonthYearPeriodId, ActualMatchingMatchId[]>;
@@ -103,4 +119,5 @@ export interface ActualMatchingViewState extends FetchedState {
103
119
  refreshStatus: FetchStateAndError;
104
120
  uiState: ActualMatchingViewUIState;
105
121
  undoReversalStatusByMatchId: Record<ActualMatchingMatchId, FetchStateAndError>;
122
+ closeMatchAfterIgnoreMatchId?: ActualMatchingMatchId;
106
123
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toUndoReversalResultStatus = exports.toMatchAndReverseResultStatus = exports.MATCH_SEARCH_DEBOUNCE_MS = exports.MATCH_ACCRUAL_SEARCH_LIMIT = exports.MATCH_TRANSACTION_SEARCH_PAGE_SIZE = exports.toActualMatchingSortKey = void 0;
3
+ exports.ALL_ACTUAL_MATCHING_IGNORE_REASONS = exports.toActualMatchingIgnoreReasonType = exports.toUndoReversalResultStatus = exports.toMatchAndReverseResultStatus = exports.MATCH_SEARCH_DEBOUNCE_MS = exports.MATCH_ACCRUAL_SEARCH_LIMIT = exports.MATCH_TRANSACTION_SEARCH_PAGE_SIZE = exports.toActualMatchingStatusFilter = exports.toActualMatchingSortKey = void 0;
4
4
  exports.isMatchAndReverseCompleteStatus = isMatchAndReverseCompleteStatus;
5
5
  exports.actualMatchingTransactionLineKey = actualMatchingTransactionLineKey;
6
6
  const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
@@ -19,6 +19,13 @@ const ACTUAL_MATCHING_SORT_KEYS = [
19
19
  ];
20
20
  const toActualMatchingSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, ACTUAL_MATCHING_SORT_KEYS);
21
21
  exports.toActualMatchingSortKey = toActualMatchingSortKey;
22
+ const ACTUAL_MATCHING_STATUS_FILTERS = [
23
+ 'all',
24
+ 'pending_review',
25
+ 'auto_reversed',
26
+ ];
27
+ const toActualMatchingStatusFilter = (v) => (0, stringToUnion_1.stringToUnion)(v, ACTUAL_MATCHING_STATUS_FILTERS);
28
+ exports.toActualMatchingStatusFilter = toActualMatchingStatusFilter;
22
29
  exports.MATCH_TRANSACTION_SEARCH_PAGE_SIZE = 50;
23
30
  exports.MATCH_ACCRUAL_SEARCH_LIMIT = 50;
24
31
  exports.MATCH_SEARCH_DEBOUNCE_MS = 300;
@@ -41,6 +48,16 @@ const UNDO_REVERSAL_RESULT_STATUSES = [
41
48
  ];
42
49
  const toUndoReversalResultStatus = (v) => (0, stringToUnion_1.stringToUnion)(v, UNDO_REVERSAL_RESULT_STATUSES);
43
50
  exports.toUndoReversalResultStatus = toUndoReversalResultStatus;
51
+ const ACTUAL_MATCHING_IGNORE_REASONS = [
52
+ 'wrong_bill',
53
+ 'wrong_period',
54
+ 'amount_off',
55
+ 'already_handled',
56
+ 'other_ignore',
57
+ ];
58
+ const toActualMatchingIgnoreReasonType = (v) => (0, stringToUnion_1.stringToUnion)(v, ACTUAL_MATCHING_IGNORE_REASONS);
59
+ exports.toActualMatchingIgnoreReasonType = toActualMatchingIgnoreReasonType;
60
+ exports.ALL_ACTUAL_MATCHING_IGNORE_REASONS = ACTUAL_MATCHING_IGNORE_REASONS;
44
61
  function actualMatchingTransactionLineKey(transactionType, transactionIntegrationId, lineId) {
45
62
  return `${transactionType}:${transactionIntegrationId}:${lineId}`;
46
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.2.41-beta1MM",
3
+ "version": "5.2.41-beta3MM",
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
  "module": "lib/esm/index.js",