@zeniai/client-epic-state 5.3.0 → 5.3.2-beta0KB
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/entity/invoicing/invoice/invoicePayload.d.ts +1 -0
- package/lib/entity/invoicing/invoice/invoicePayload.js +3 -0
- package/lib/entity/invoicing/invoice/invoiceState.d.ts +2 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/entity/tenant/tenantPayload.d.ts +5 -0
- package/lib/entity/tenant/tenantReducer.d.ts +4 -1
- package/lib/entity/tenant/tenantReducer.js +11 -2
- package/lib/entity/tenant/tenantSelector.d.ts +1 -0
- package/lib/entity/tenant/tenantSelector.js +10 -1
- package/lib/entity/tenant/tenantState.d.ts +1 -0
- package/lib/epic.d.ts +2 -1
- package/lib/epic.js +2 -0
- package/lib/esm/entity/invoicing/invoice/invoicePayload.js +3 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/esm/entity/tenant/tenantReducer.js +10 -1
- package/lib/esm/entity/tenant/tenantSelector.js +8 -0
- package/lib/esm/epic.js +2 -0
- package/lib/esm/index.js +4 -4
- package/lib/esm/view/companyView/companyViewReducer.js +26 -1
- package/lib/esm/view/companyView/epic/companyPassport/updateAutoReviewIncomeWithoutCustomerEpic.js +66 -0
- package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +2 -1
- package/lib/esm/view/transactionDetail/createTransaction/createTransactionPayload.js +0 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.js +47 -45
- package/lib/view/companyView/companyViewReducer.d.ts +6 -1
- package/lib/view/companyView/companyViewReducer.js +28 -3
- package/lib/view/companyView/epic/companyPassport/updateAutoReviewIncomeWithoutCustomerEpic.d.ts +10 -0
- package/lib/view/companyView/epic/companyPassport/updateAutoReviewIncomeWithoutCustomerEpic.js +70 -0
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +2 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/transactionDetail/createTransaction/createTransactionPayload.d.ts +2 -4
- package/lib/view/transactionDetail/createTransaction/createTransactionPayload.js +0 -1
- package/lib/view/transactionDetail/createTransaction/createTransactionState.d.ts +0 -2
- package/package.json +1 -1
package/lib/view/companyView/epic/companyPassport/updateAutoReviewIncomeWithoutCustomerEpic.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { updateCompanies } from '../../../../entity/company/companyReducer';
|
|
4
|
+
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
5
|
+
import { updateTenantAutoReviewIncomeWithoutCustomer } from '../../../../entity/tenant/tenantReducer';
|
|
6
|
+
import { RootState } from '../../../../rootStateTypes';
|
|
7
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
8
|
+
import { updateAutoReviewIncomeWithoutCustomer, updateAutoReviewIncomeWithoutCustomerFailure, updateAutoReviewIncomeWithoutCustomerSuccess } from '../../companyViewReducer';
|
|
9
|
+
export type ActionType = ReturnType<typeof updateCompanies> | ReturnType<typeof updateTenantAutoReviewIncomeWithoutCustomer> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateAutoReviewIncomeWithoutCustomer> | ReturnType<typeof updateAutoReviewIncomeWithoutCustomerSuccess> | ReturnType<typeof updateAutoReviewIncomeWithoutCustomerFailure>;
|
|
10
|
+
export declare const updateAutoReviewIncomeWithoutCustomerEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/companyView/epic/companyPassport/updateAutoReviewIncomeWithoutCustomerEpic.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateAutoReviewIncomeWithoutCustomerEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const companyReducer_1 = require("../../../../entity/company/companyReducer");
|
|
7
|
+
const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
|
|
8
|
+
const tenantReducer_1 = require("../../../../entity/tenant/tenantReducer");
|
|
9
|
+
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
10
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
11
|
+
const companyViewReducer_1 = require("../../companyViewReducer");
|
|
12
|
+
const updateAutoReviewIncomeWithoutCustomerEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyViewReducer_1.updateAutoReviewIncomeWithoutCustomer.match), (0, operators_1.switchMap)((action) => {
|
|
13
|
+
const { companyId, enabled } = action.payload;
|
|
14
|
+
const tenantId = (0, tenantSelector_1.getTenantIdByCompanyId)(state$.value.tenantState, companyId);
|
|
15
|
+
return zeniAPI
|
|
16
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, {
|
|
17
|
+
accounting_config: {
|
|
18
|
+
customers: { auto_review_income_without_customer: enabled },
|
|
19
|
+
},
|
|
20
|
+
})
|
|
21
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
22
|
+
const companies = response.data?.companies ?? [];
|
|
23
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && companies.length > 0) {
|
|
24
|
+
const actions = [
|
|
25
|
+
(0, companyReducer_1.updateCompanies)({
|
|
26
|
+
payload: companies,
|
|
27
|
+
schema: {},
|
|
28
|
+
}),
|
|
29
|
+
];
|
|
30
|
+
if (tenantId != null) {
|
|
31
|
+
actions.push((0, tenantReducer_1.updateTenantAutoReviewIncomeWithoutCustomer)({
|
|
32
|
+
enabled,
|
|
33
|
+
tenantId,
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
actions.push((0, companyViewReducer_1.updateAutoReviewIncomeWithoutCustomerSuccess)());
|
|
37
|
+
actions.push((0, snackbarReducer_1.openSnackbar)({
|
|
38
|
+
messageSection: 'auto_review_income_without_customer_update',
|
|
39
|
+
messageText: 'success',
|
|
40
|
+
type: 'success',
|
|
41
|
+
}));
|
|
42
|
+
return (0, rxjs_1.from)(actions);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
return (0, rxjs_1.from)([
|
|
46
|
+
(0, companyViewReducer_1.updateAutoReviewIncomeWithoutCustomerFailure)({
|
|
47
|
+
status: response.status,
|
|
48
|
+
}),
|
|
49
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
50
|
+
messageSection: 'auto_review_income_without_customer_update',
|
|
51
|
+
messageText: 'failed',
|
|
52
|
+
type: 'error',
|
|
53
|
+
}),
|
|
54
|
+
]);
|
|
55
|
+
}
|
|
56
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.from)([
|
|
57
|
+
(0, companyViewReducer_1.updateAutoReviewIncomeWithoutCustomerFailure)({
|
|
58
|
+
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Update Auto Review Income Without Customer errored out' +
|
|
59
|
+
(error instanceof Error
|
|
60
|
+
? error.message
|
|
61
|
+
: JSON.stringify(error))),
|
|
62
|
+
}),
|
|
63
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
64
|
+
messageSection: 'auto_review_income_without_customer_update',
|
|
65
|
+
messageText: 'failed',
|
|
66
|
+
type: 'error',
|
|
67
|
+
}),
|
|
68
|
+
])));
|
|
69
|
+
}));
|
|
70
|
+
exports.updateAutoReviewIncomeWithoutCustomerEpic = updateAutoReviewIncomeWithoutCustomerEpic;
|
|
@@ -6,6 +6,7 @@ export type UpdateActionType = 'company_update' | 'user_create' | 'user_update';
|
|
|
6
6
|
export interface CompanyPassportViewState extends CommonState, FetchedState {
|
|
7
7
|
accountingClassesUpdateStatus: FetchStateAndError;
|
|
8
8
|
accountingProjectsUpdateStatus: FetchStateAndError;
|
|
9
|
+
autoReviewIncomeWithoutCustomerUpdateStatus: FetchStateAndError;
|
|
9
10
|
capitalizationThresholdUpdateStatus: FetchStateAndError;
|
|
10
11
|
companyDetails: {
|
|
11
12
|
updateStatus: FetchStateAndError;
|
|
@@ -12,6 +12,10 @@ exports.initialCompanyPassportView = {
|
|
|
12
12
|
fetchState: 'Not-Started',
|
|
13
13
|
error: undefined,
|
|
14
14
|
},
|
|
15
|
+
autoReviewIncomeWithoutCustomerUpdateStatus: {
|
|
16
|
+
fetchState: 'Not-Started',
|
|
17
|
+
error: undefined,
|
|
18
|
+
},
|
|
15
19
|
capitalizationThresholdUpdateStatus: {
|
|
16
20
|
fetchState: 'Not-Started',
|
|
17
21
|
error: undefined,
|
|
@@ -29,9 +29,10 @@ const fetchReconciliationViewEpic = (actions$, state$, zeniAPI) => actions$.pipe
|
|
|
29
29
|
}
|
|
30
30
|
let fetchState;
|
|
31
31
|
if (accountId != null) {
|
|
32
|
+
// Period bucket can be unhydrated during app-shell load.
|
|
32
33
|
fetchState =
|
|
33
34
|
accountReconciliationRecords[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)]
|
|
34
|
-
|
|
35
|
+
?.reconciliationByAccountID[accountId]?.transactionFetchState
|
|
35
36
|
.fetchState;
|
|
36
37
|
}
|
|
37
38
|
else {
|
package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts
CHANGED
|
@@ -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" | "recommendation_feedback" | "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" | "create_transaction" | "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" | "kyc_kyb_reset" | "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" | "invoicing_data_import_download";
|
|
42
|
+
messageSection: "common" | "recommendation_feedback" | "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" | "create_transaction" | "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" | "auto_review_income_without_customer_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" | "kyc_kyb_reset" | "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" | "invoicing_data_import_download";
|
|
43
43
|
messageText: "notification" | "failed" | "success";
|
|
44
44
|
type: "error" | "success" | "info";
|
|
45
45
|
variables: {
|
|
@@ -12,8 +12,8 @@ import { CreateTransactionLocalData } from './createTransactionState';
|
|
|
12
12
|
* 1. `line_detail_type` is snake_case. The PascalCase strings in the backend are Python
|
|
13
13
|
* constant NAMES; ZENI_LINE_DETAIL_TYPE_TO_QBO_LINE_DETAIL_TYPE_MAP converts them for the
|
|
14
14
|
* body the backend sends on to QuickBooks, never for ours.
|
|
15
|
-
* 2.
|
|
16
|
-
*
|
|
15
|
+
* 2. Only the QBO Purchases (check, credit_card_credit) send a reference number, as
|
|
16
|
+
* `document_number`. A journal entry sends none.
|
|
17
17
|
*/
|
|
18
18
|
export interface CreateTransactionAccountPayload {
|
|
19
19
|
qbo_id: ID;
|
|
@@ -51,8 +51,6 @@ export interface CreateTransactionRemitToAddressPayload {
|
|
|
51
51
|
export interface CreateTransactionRequest extends Record<string, unknown> {
|
|
52
52
|
transaction_date: string;
|
|
53
53
|
transaction_type: string;
|
|
54
|
-
/** journal_entry reference number. */
|
|
55
|
-
document_id?: string;
|
|
56
54
|
/** check / credit_card_credit reference number (QBO Purchase). */
|
|
57
55
|
document_number?: string;
|
|
58
56
|
from_account_id?: ID;
|
|
@@ -54,8 +54,6 @@ export interface CreateTransactionLocalData {
|
|
|
54
54
|
/** Empty for transfer, which has no lines at all. */
|
|
55
55
|
lines: CreateTransactionLineLocalData[];
|
|
56
56
|
transactionType: CreatableTransactionType;
|
|
57
|
-
/** journal_entry reference number. */
|
|
58
|
-
documentId?: string;
|
|
59
57
|
/** check / credit_card_credit reference number. */
|
|
60
58
|
documentNumber?: string;
|
|
61
59
|
/** transfer */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.2-beta0KB",
|
|
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",
|