@zeniai/client-epic-state 4.9.99 → 4.10.0

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 (78) hide show
  1. package/lib/commonPayloadTypes/commonPayload.d.ts +8 -0
  2. package/lib/commonPayloadTypes/commonPayload.js +18 -0
  3. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  4. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  5. package/lib/entity/account/accountState.d.ts +1 -1
  6. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  7. package/lib/entity/class/classReducer.d.ts +4 -4
  8. package/lib/entity/class/classState.d.ts +1 -1
  9. package/lib/entity/forecast/forecastState.d.ts +1 -1
  10. package/lib/entity/notification/notificationPayload.d.ts +46 -0
  11. package/lib/entity/notification/notificationPayload.js +124 -0
  12. package/lib/entity/notification/notificationReducer.d.ts +20 -0
  13. package/lib/entity/notification/notificationReducer.js +118 -0
  14. package/lib/entity/notification/notificationSelector.d.ts +9 -0
  15. package/lib/entity/notification/notificationSelector.js +36 -0
  16. package/lib/entity/notification/notificationState.d.ts +7 -0
  17. package/lib/entity/notification/notificationState.js +2 -0
  18. package/lib/entity/notification/types/notificationSelectorTypes.d.ts +8 -0
  19. package/lib/entity/notification/types/notificationSelectorTypes.js +2 -0
  20. package/lib/entity/notification/types/notificationStateTypes.d.ts +50 -0
  21. package/lib/entity/notification/types/notificationStateTypes.js +2 -0
  22. package/lib/entity/notification/types/notificationTypes.d.ts +24 -0
  23. package/lib/entity/notification/types/notificationTypes.js +58 -0
  24. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  25. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  26. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  27. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  28. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  29. package/lib/entity/tenant/clearAllEpic.d.ts +4 -2
  30. package/lib/entity/tenant/clearAllEpic.js +5 -1
  31. package/lib/epic.d.ts +7 -3
  32. package/lib/epic.js +5 -1
  33. package/lib/index.d.ts +10 -2
  34. package/lib/index.js +29 -8
  35. package/lib/reducer.d.ts +6 -0
  36. package/lib/reducer.js +6 -0
  37. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  38. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  39. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  40. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  41. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  42. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  43. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  44. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  45. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  46. package/lib/view/notificationView/epics/fetchNotificationUnreadCountEpic.d.ts +10 -0
  47. package/lib/view/notificationView/epics/fetchNotificationUnreadCountEpic.js +39 -0
  48. package/lib/view/notificationView/epics/fetchNotificationViewEpic.d.ts +9 -0
  49. package/lib/view/notificationView/epics/fetchNotificationViewEpic.js +56 -0
  50. package/lib/view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic.d.ts +9 -0
  51. package/lib/view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic.js +50 -0
  52. package/lib/view/notificationView/epics/updateNotificationViewNotificationStatusEpic.d.ts +9 -0
  53. package/lib/view/notificationView/epics/updateNotificationViewNotificationStatusEpic.js +86 -0
  54. package/lib/view/notificationView/notificationView.helpers.d.ts +2 -0
  55. package/lib/view/notificationView/notificationView.helpers.js +11 -0
  56. package/lib/view/notificationView/notificationViewPayload.d.ts +48 -0
  57. package/lib/view/notificationView/notificationViewPayload.js +2 -0
  58. package/lib/view/notificationView/notificationViewReducer.d.ts +64 -0
  59. package/lib/view/notificationView/notificationViewReducer.js +372 -0
  60. package/lib/view/notificationView/notificationViewSelector.d.ts +29 -0
  61. package/lib/view/notificationView/notificationViewSelector.js +89 -0
  62. package/lib/view/notificationView/notificationViewState.d.ts +31 -0
  63. package/lib/view/notificationView/notificationViewState.js +19 -0
  64. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  65. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  66. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  67. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  68. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  69. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  70. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
  71. package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.d.ts +2 -1
  72. package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +37 -5
  73. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  74. package/lib/view/topEx/topExSelector.d.ts +1 -1
  75. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.d.ts +1 -1
  76. package/lib/zeniAPI.d.ts +2 -0
  77. package/lib/zeniAPI.js +8 -0
  78. 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;
@@ -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,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
- export declare type ActionType = ReturnType<typeof fetchTaskDetail> | ReturnType<typeof updateEditTaskFetchStatus> | ReturnType<typeof removeTaskDetail> | ReturnType<typeof updateTasks> | ReturnType<typeof initializeTaskToLocalStore> | ReturnType<typeof fetchFileList>;
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
- return (0, rxjs_1.of)((0, taskDetailReducer_1.updateEditTaskFetchStatus)({
46
- taskId,
47
- fetchState: 'Error',
48
- error: response.status,
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.9.99",
3
+ "version": "4.10.0",
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",