@zeniai/client-epic-state 5.0.37 → 5.0.38

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 (144) hide show
  1. package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.d.ts +1 -0
  2. package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.js +2 -1
  3. package/lib/entity/file/fileState.d.ts +4 -4
  4. package/lib/entity/file/fileState.js +4 -0
  5. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  6. package/lib/entity/snackbar/snackbarTypes.js +4 -0
  7. package/lib/entity/task/taskPayload.d.ts +3 -0
  8. package/lib/entity/task/taskPayload.js +5 -0
  9. package/lib/entity/task/taskState.d.ts +3 -0
  10. package/lib/entity/tenant/clearAllEpic.d.ts +5 -2
  11. package/lib/entity/tenant/clearAllEpic.js +6 -0
  12. package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +19 -0
  13. package/lib/entity/tenant/epic/deleteConnectionEpic.js +29 -0
  14. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +19 -0
  15. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.js +31 -0
  16. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +19 -0
  17. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.js +33 -0
  18. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  19. package/lib/entity/tenant/tenantReducer.d.ts +59 -1
  20. package/lib/entity/tenant/tenantReducer.js +139 -4
  21. package/lib/entity/tenant/tenantState.d.ts +7 -0
  22. package/lib/entity/transaction/stateTypes/attachment.d.ts +2 -2
  23. package/lib/epic.d.ts +9 -1
  24. package/lib/epic.js +12 -1
  25. package/lib/esm/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.js +1 -0
  26. package/lib/esm/entity/file/fileState.js +4 -0
  27. package/lib/esm/entity/snackbar/snackbarTypes.js +4 -0
  28. package/lib/esm/entity/task/taskPayload.js +5 -0
  29. package/lib/esm/entity/tenant/clearAllEpic.js +6 -0
  30. package/lib/esm/entity/tenant/epic/deleteConnectionEpic.js +25 -0
  31. package/lib/esm/entity/tenant/epic/saveAPIKeyConnectionEpic.js +27 -0
  32. package/lib/esm/entity/tenant/epic/saveOAuthConnectionEpic.js +29 -0
  33. package/lib/esm/entity/tenant/tenantReducer.js +135 -2
  34. package/lib/esm/epic.js +12 -1
  35. package/lib/esm/index.js +15 -6
  36. package/lib/esm/init.js +71 -16
  37. package/lib/esm/reducer.js +9 -0
  38. package/lib/esm/view/featureNotificationView/epics/fetchRegisteredInterestsEpic.js +23 -0
  39. package/lib/esm/view/featureNotificationView/epics/notifyMeForFeatureEpic.js +25 -0
  40. package/lib/esm/view/featureNotificationView/featureNotificationViewPayload.js +11 -0
  41. package/lib/esm/view/featureNotificationView/featureNotificationViewReducer.js +106 -0
  42. package/lib/esm/view/featureNotificationView/featureNotificationViewSelector.js +4 -0
  43. package/lib/esm/view/featureNotificationView/featureNotificationViewState.js +1 -0
  44. package/lib/esm/view/taskManager/cannedResponsesView/cannedResponses.js +1 -0
  45. package/lib/esm/view/taskManager/cannedResponsesView/cannedResponsesPayload.js +12 -0
  46. package/lib/esm/view/taskManager/cannedResponsesView/cannedResponsesReducer.js +64 -0
  47. package/lib/esm/view/taskManager/cannedResponsesView/cannedResponsesSelector.js +3 -0
  48. package/lib/esm/view/taskManager/cannedResponsesView/epics/deleteCannedResponseEpic.js +17 -0
  49. package/lib/esm/view/taskManager/cannedResponsesView/epics/fetchCannedResponsesEpic.js +21 -0
  50. package/lib/esm/view/taskManager/cannedResponsesView/epics/saveCannedResponseEpic.js +29 -0
  51. package/lib/esm/view/taskManager/taskDetailView/epics/archiveTaskEpic.js +3 -0
  52. package/lib/esm/view/taskManager/taskDetailView/epics/deleteTaskEpic.js +5 -0
  53. package/lib/esm/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +1 -0
  54. package/lib/esm/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +1 -0
  55. package/lib/esm/view/taskManager/taskDetailView/epics/snoozeTaskEpic.js +66 -0
  56. package/lib/esm/view/taskManager/taskDetailView/epics/unsnoozeTaskEpic.js +57 -0
  57. package/lib/esm/view/taskManager/taskDetailView/taskDetail.js +4 -0
  58. package/lib/esm/view/taskManager/taskDetailView/taskDetailReducer.js +60 -7
  59. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +12 -0
  60. package/lib/esm/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +56 -21
  61. package/lib/esm/view/taskManager/taskListView/epics/dragNDropTasksEpic.js +1 -0
  62. package/lib/esm/view/taskManager/taskListView/epics/fetchTaskListEpic.js +13 -4
  63. package/lib/esm/view/taskManager/taskListView/epics/updateTaskFromListViewEpic.js +3 -2
  64. package/lib/esm/view/taskManager/taskListView/taskList.js +7 -0
  65. package/lib/esm/view/taskManager/taskListView/taskListReducer.js +106 -12
  66. package/lib/esm/view/taskManager/taskListView/taskListSelector.js +48 -39
  67. package/lib/esm/view/zeniOAuthView/epics/approveOAuthConsentEpic.js +65 -0
  68. package/lib/esm/view/zeniOAuthView/zeniOAuthParamsParser.js +41 -0
  69. package/lib/esm/view/zeniOAuthView/zeniOAuthReducer.js +49 -0
  70. package/lib/esm/view/zeniOAuthView/zeniOAuthSelector.js +3 -0
  71. package/lib/esm/view/zeniOAuthView/zeniOAuthState.js +1 -0
  72. package/lib/index.d.ts +18 -6
  73. package/lib/index.js +67 -30
  74. package/lib/init.d.ts +5 -3
  75. package/lib/init.js +71 -16
  76. package/lib/reducer.d.ts +9 -0
  77. package/lib/reducer.js +9 -0
  78. package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
  79. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  80. package/lib/view/featureNotificationView/epics/fetchRegisteredInterestsEpic.d.ts +16 -0
  81. package/lib/view/featureNotificationView/epics/fetchRegisteredInterestsEpic.js +27 -0
  82. package/lib/view/featureNotificationView/epics/notifyMeForFeatureEpic.d.ts +14 -0
  83. package/lib/view/featureNotificationView/epics/notifyMeForFeatureEpic.js +29 -0
  84. package/lib/view/featureNotificationView/featureNotificationViewPayload.d.ts +23 -0
  85. package/lib/view/featureNotificationView/featureNotificationViewPayload.js +15 -0
  86. package/lib/view/featureNotificationView/featureNotificationViewReducer.d.ts +19 -0
  87. package/lib/view/featureNotificationView/featureNotificationViewReducer.js +110 -0
  88. package/lib/view/featureNotificationView/featureNotificationViewSelector.d.ts +6 -0
  89. package/lib/view/featureNotificationView/featureNotificationViewSelector.js +11 -0
  90. package/lib/view/featureNotificationView/featureNotificationViewState.d.ts +26 -0
  91. package/lib/view/featureNotificationView/featureNotificationViewState.js +2 -0
  92. package/lib/view/taskManager/cannedResponsesView/cannedResponses.d.ts +19 -0
  93. package/lib/view/taskManager/cannedResponsesView/cannedResponses.js +2 -0
  94. package/lib/view/taskManager/cannedResponsesView/cannedResponsesPayload.d.ts +21 -0
  95. package/lib/view/taskManager/cannedResponsesView/cannedResponsesPayload.js +15 -0
  96. package/lib/view/taskManager/cannedResponsesView/cannedResponsesReducer.d.ts +30 -0
  97. package/lib/view/taskManager/cannedResponsesView/cannedResponsesReducer.js +68 -0
  98. package/lib/view/taskManager/cannedResponsesView/cannedResponsesSelector.d.ts +3 -0
  99. package/lib/view/taskManager/cannedResponsesView/cannedResponsesSelector.js +6 -0
  100. package/lib/view/taskManager/cannedResponsesView/epics/deleteCannedResponseEpic.d.ts +7 -0
  101. package/lib/view/taskManager/cannedResponsesView/epics/deleteCannedResponseEpic.js +21 -0
  102. package/lib/view/taskManager/cannedResponsesView/epics/fetchCannedResponsesEpic.d.ts +7 -0
  103. package/lib/view/taskManager/cannedResponsesView/epics/fetchCannedResponsesEpic.js +25 -0
  104. package/lib/view/taskManager/cannedResponsesView/epics/saveCannedResponseEpic.d.ts +7 -0
  105. package/lib/view/taskManager/cannedResponsesView/epics/saveCannedResponseEpic.js +33 -0
  106. package/lib/view/taskManager/taskDetailView/epics/archiveTaskEpic.d.ts +2 -1
  107. package/lib/view/taskManager/taskDetailView/epics/archiveTaskEpic.js +3 -0
  108. package/lib/view/taskManager/taskDetailView/epics/deleteTaskEpic.d.ts +2 -1
  109. package/lib/view/taskManager/taskDetailView/epics/deleteTaskEpic.js +5 -0
  110. package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +1 -0
  111. package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +1 -0
  112. package/lib/view/taskManager/taskDetailView/epics/snoozeTaskEpic.d.ts +9 -0
  113. package/lib/view/taskManager/taskDetailView/epics/snoozeTaskEpic.js +70 -0
  114. package/lib/view/taskManager/taskDetailView/epics/unsnoozeTaskEpic.d.ts +9 -0
  115. package/lib/view/taskManager/taskDetailView/epics/unsnoozeTaskEpic.js +61 -0
  116. package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +2 -0
  117. package/lib/view/taskManager/taskDetailView/taskDetail.js +4 -0
  118. package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +10 -1
  119. package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +61 -8
  120. package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +5 -0
  121. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +12 -0
  122. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.d.ts +6 -7
  123. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +56 -22
  124. package/lib/view/taskManager/taskListView/epics/dragNDropTasksEpic.js +1 -0
  125. package/lib/view/taskManager/taskListView/epics/fetchTaskListEpic.js +13 -4
  126. package/lib/view/taskManager/taskListView/epics/updateTaskFromListViewEpic.js +3 -2
  127. package/lib/view/taskManager/taskListView/taskList.d.ts +14 -1
  128. package/lib/view/taskManager/taskListView/taskList.js +8 -1
  129. package/lib/view/taskManager/taskListView/taskListPayload.d.ts +3 -0
  130. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +9 -6
  131. package/lib/view/taskManager/taskListView/taskListReducer.js +107 -13
  132. package/lib/view/taskManager/taskListView/taskListSelector.d.ts +9 -3
  133. package/lib/view/taskManager/taskListView/taskListSelector.js +48 -39
  134. package/lib/view/zeniOAuthView/epics/approveOAuthConsentEpic.d.ts +27 -0
  135. package/lib/view/zeniOAuthView/epics/approveOAuthConsentEpic.js +69 -0
  136. package/lib/view/zeniOAuthView/zeniOAuthParamsParser.d.ts +16 -0
  137. package/lib/view/zeniOAuthView/zeniOAuthParamsParser.js +44 -0
  138. package/lib/view/zeniOAuthView/zeniOAuthReducer.d.ts +29 -0
  139. package/lib/view/zeniOAuthView/zeniOAuthReducer.js +53 -0
  140. package/lib/view/zeniOAuthView/zeniOAuthSelector.d.ts +5 -0
  141. package/lib/view/zeniOAuthView/zeniOAuthSelector.js +9 -0
  142. package/lib/view/zeniOAuthView/zeniOAuthState.d.ts +4 -0
  143. package/lib/view/zeniOAuthView/zeniOAuthState.js +2 -0
  144. package/package.json +1 -1
@@ -7,6 +7,7 @@ export declare const DEFAULT_DATE_FORMAT = "YYYY-MM-DD";
7
7
  export declare const DAY_MONTH_YEAR_FORMAT = "DDMMYYYY";
8
8
  export declare const MONTH_FORMAT = "MMMM";
9
9
  export declare const MM_YYYY_FORMAT = "MM-YYYY";
10
+ export declare const SNOOZED_DISPLAY_FORMAT = "MMM D, h:mm A";
10
11
  /**
11
12
  * Format date according to the `format` and `firstMonthOfFY`
12
13
  * see: https://sharing.clickup.com/10555925/t/h/1xju71j/ZJWTNROIRRKCB41
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MM_YYYY_FORMAT = exports.MONTH_FORMAT = exports.DAY_MONTH_YEAR_FORMAT = exports.DEFAULT_DATE_FORMAT = exports.YEAR_MONTH_FORMAT = exports.MONTH_YEAR_FORMAT = exports.FULL_MONTH_FULL_YEAR_FORMAT = void 0;
3
+ exports.SNOOZED_DISPLAY_FORMAT = exports.MM_YYYY_FORMAT = exports.MONTH_FORMAT = exports.DAY_MONTH_YEAR_FORMAT = exports.DEFAULT_DATE_FORMAT = exports.YEAR_MONTH_FORMAT = exports.MONTH_YEAR_FORMAT = exports.FULL_MONTH_FULL_YEAR_FORMAT = void 0;
4
4
  exports.formatZeniDateFY = formatZeniDateFY;
5
5
  const stringToUnion_1 = require("../stringToUnion");
6
6
  const getFYQuarterAndYear_1 = require("./getFYQuarterAndYear");
@@ -11,6 +11,7 @@ exports.DEFAULT_DATE_FORMAT = 'YYYY-MM-DD';
11
11
  exports.DAY_MONTH_YEAR_FORMAT = 'DDMMYYYY';
12
12
  exports.MONTH_FORMAT = 'MMMM';
13
13
  exports.MM_YYYY_FORMAT = 'MM-YYYY';
14
+ exports.SNOOZED_DISPLAY_FORMAT = 'MMM D, h:mm A';
14
15
  const ALL_FISCAL_YEAR_SUPPORTED_DATE_FORMATS = [
15
16
  'YY',
16
17
  'YYYY',
@@ -43,16 +43,16 @@ export interface AttachmentFile {
43
43
  fileName: string;
44
44
  }
45
45
  export type FileSizeUnit = 'bytes';
46
- declare const toSupportedFileType: (v: string) => "application/pdf" | "image/jpeg" | "image/jpg" | "image/png" | "image/bmp" | "image/heic" | "text/html" | "text/csv" | "text/plain";
47
- export declare const toSupportedFileTypeStrict: (v: string) => "application/pdf" | "image/jpeg" | "image/jpg" | "image/png" | "image/bmp" | "image/heic" | "text/html" | "text/csv" | "text/plain" | undefined;
46
+ declare const toSupportedFileType: (v: string) => "application/pdf" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "image/jpeg" | "image/jpg" | "image/png" | "image/bmp" | "image/heic" | "text/html" | "text/csv" | "text/plain";
47
+ export declare const toSupportedFileTypeStrict: (v: string) => "application/pdf" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "image/jpeg" | "image/jpg" | "image/png" | "image/bmp" | "image/heic" | "text/html" | "text/csv" | "text/plain" | undefined;
48
48
  export type SupportedFileType = ReturnType<typeof toSupportedFileType>;
49
49
  declare const toSupportedFileFormatType: (v: string) => ".pdf" | ".jpeg" | ".jpg" | ".bmp" | ".heic" | ".png" | ".csv" | ".txt";
50
50
  export type SupportedFileFormatType = ReturnType<typeof toSupportedFileFormatType>;
51
51
  export declare const SUPPORTED_ATTACHMENT_FILE_TYPES: readonly ["application/pdf", "image/jpeg", "image/jpg", "image/png", "text/plain", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"];
52
- export declare const toSupportedAttachmentFileType: (v: string) => "application/pdf" | "image/jpeg" | "image/jpg" | "image/png" | "text/plain" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
52
+ export declare const toSupportedAttachmentFileType: (v: string) => "application/pdf" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "image/jpeg" | "image/jpg" | "image/png" | "text/plain";
53
53
  export type SupportedAttachmentFileType = ReturnType<typeof toSupportedAttachmentFileType>;
54
54
  export declare const SUPPORTED_TRANSACTION_LINE_ATTACHMENT_FILE_TYPES: readonly ["application/x-excel", "application/pdf", "image/jpeg", "image/jpg", "image/png", "text/csv", "image/tiff", "image/tif", "image/gif", "text/xml", "application/xml", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/msword"];
55
- export declare const toSupportedTransactionLineAttachmentFileType: (v: string) => "application/pdf" | "image/jpeg" | "image/jpg" | "image/png" | "text/csv" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/x-excel" | "image/tiff" | "image/tif" | "image/gif" | "text/xml" | "application/xml" | "application/msword";
55
+ export declare const toSupportedTransactionLineAttachmentFileType: (v: string) => "application/pdf" | "application/msword" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "image/jpeg" | "image/jpg" | "image/png" | "text/csv" | "application/x-excel" | "image/tiff" | "image/tif" | "image/gif" | "text/xml" | "application/xml";
56
56
  export type SupportedTransactionLineAttachmentFileType = ReturnType<typeof toSupportedTransactionLineAttachmentFileType>;
57
57
  export declare const toSupportedAttachmentFileFormatType: (v: string) => ".pdf" | ".jpeg" | ".jpg" | ".png" | ".txt" | ".xls" | ".xlsx";
58
58
  type SupportedAttachmentFileFormatType = ReturnType<typeof toSupportedAttachmentFileFormatType>;
@@ -4,6 +4,10 @@ exports.toAllowedDocumentTypeStrict = exports.toAllowedDocumentType = exports.to
4
4
  const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
5
5
  const SUPPORTED_FILE_TYPES = [
6
6
  'application/pdf',
7
+ 'application/msword',
8
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
9
+ 'application/vnd.ms-excel',
10
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
7
11
  'image/jpeg',
8
12
  'image/jpg',
9
13
  'image/png',
@@ -1,4 +1,4 @@
1
- export declare const toSnackbarMessageSection: (v: string) => "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" | "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_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_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" | "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" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_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" | "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" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job";
1
+ export declare const toSnackbarMessageSection: (v: string) => "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" | "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_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_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" | "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" | "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" | "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" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request";
2
2
  export type SnackbarMessageSections = ReturnType<typeof toSnackbarMessageSection>;
3
3
  export declare const toSnackbarMessageSectionTexts: (v: string) => "notification" | "failed" | "success";
4
4
  export type SnackbarMessageSectionTexts = ReturnType<typeof toSnackbarMessageSectionTexts>;
@@ -118,6 +118,8 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
118
118
  'fetch_task_detail',
119
119
  'delete_task',
120
120
  'archive_task',
121
+ 'snooze_task',
122
+ 'unsnooze_task',
121
123
  'create_tag',
122
124
  'delete_tag',
123
125
  'update_charge_card',
@@ -208,6 +210,8 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
208
210
  'account_excluded_from_reconciliation',
209
211
  'account_included_in_reconciliation',
210
212
  'ai_accountant_trigger_job',
213
+ 'oauth_consent_approve',
214
+ 'oauth_consent_invalid_request',
211
215
  ];
212
216
  const toSnackbarMessageSection = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_SNACKBAR_MESSAGE_SECTIONS);
213
217
  exports.toSnackbarMessageSection = toSnackbarMessageSection;
@@ -9,6 +9,7 @@ export interface TaskPayload {
9
9
  file_ids: string[];
10
10
  is_archived: boolean;
11
11
  is_deleted: boolean;
12
+ is_private: boolean;
12
13
  name: string;
13
14
  priority: AllowedValueWithCodePayload;
14
15
  recurring_end_date: string | null;
@@ -22,6 +23,8 @@ export interface TaskPayload {
22
23
  update_time: string | null;
23
24
  company_id?: string;
24
25
  group_assignees?: string[];
26
+ recurring_source_task_id?: string | null;
27
+ snoozed_until?: string | null;
25
28
  sync_token?: string | null;
26
29
  task_group_ids?: string[] | null;
27
30
  }
@@ -13,6 +13,7 @@ const mapTaskPayloadToTask = (payload) => ({
13
13
  fileIds: payload.file_ids,
14
14
  isArchived: payload.is_archived,
15
15
  isDeleted: payload.is_deleted,
16
+ isPrivate: payload.is_private,
16
17
  name: payload.name,
17
18
  syncToken: payload.sync_token ?? '',
18
19
  priority: {
@@ -38,6 +39,10 @@ const mapTaskPayloadToTask = (payload) => ({
38
39
  dueDate: payload.due_date != null ? (0, zeniDayJS_1.date)(payload.due_date) : undefined,
39
40
  updateTime: payload.update_time != null ? (0, zeniDayJS_1.date)(payload.update_time) : undefined,
40
41
  companyId: payload.company_id,
42
+ recurringSourceTaskId: payload.recurring_source_task_id != null
43
+ ? payload.recurring_source_task_id
44
+ : undefined,
45
+ snoozedUntil: payload.snoozed_until != null ? (0, zeniDayJS_1.date)(payload.snoozed_until) : undefined,
41
46
  taskGroupIds: payload.task_group_ids != null ? payload.task_group_ids : [],
42
47
  timeSpent: payload.time_spent != null
43
48
  ? (0, formatMinutesToFromHHMM_1.convertMinutesToHHMM)(payload.time_spent)
@@ -11,6 +11,7 @@ export interface Task {
11
11
  id: ID;
12
12
  isArchived: boolean;
13
13
  isDeleted: boolean;
14
+ isPrivate: boolean;
14
15
  name: string;
15
16
  priority: TaskPriority;
16
17
  status: TaskStatus;
@@ -23,7 +24,9 @@ export interface Task {
23
24
  dueDate?: ZeniDate;
24
25
  recurringEndDate?: ZeniDate;
25
26
  recurringFrequency?: RecurringFrequencyType;
27
+ recurringSourceTaskId?: ID;
26
28
  recurringStartDate?: ZeniDate;
29
+ snoozedUntil?: ZeniDate | null;
27
30
  updateTime?: ZeniDate;
28
31
  }
29
32
  export interface TaskState {
@@ -8,6 +8,7 @@ import { clearAllNotifications } from '../../entity/notification/notificationRed
8
8
  import { clearAllSectionsClassesViewV2 } from '../../entity/sectionClassesViewV2/sectionClassesViewReducer';
9
9
  import { clearAllSectionsProjectView } from '../../entity/sectionProjectView/sectionProjectViewReducer';
10
10
  import { clearAllTaskGroups } from '../../entity/taskGroup/taskGroupReducer';
11
+ import { clearCannedResponses } from '../../view/taskManager/cannedResponsesView/cannedResponsesReducer';
11
12
  import { clearAllToastNotifications } from '../../entity/toastNotification/toastNotificationReducer';
12
13
  import { clearAccountList } from '../../view/accountList/accountListReducer';
13
14
  import { clearAccountMappingView } from '../../view/accountMappingView/accountMappingReducer';
@@ -46,6 +47,7 @@ import { clearExpenseAutomationJESchedulesView } from '../../view/expenseAutomat
46
47
  import { clearExpenseAutomationMissingReceiptsView } from '../../view/expenseAutomationView/reducers/missingReceiptsViewReducer';
47
48
  import { clearExpenseAutomationReconciliationView } from '../../view/expenseAutomationView/reducers/reconciliationViewReducer';
48
49
  import { clearExpenseAutomationTransactionsView } from '../../view/expenseAutomationView/reducers/transactionsViewReducer';
50
+ import { clearFeatureNotificationView } from '../../view/featureNotificationView/featureNotificationViewReducer';
49
51
  import { clearFileViewList } from '../../view/fileView/fileViewReducer';
50
52
  import { clearFinanceStatement } from '../../view/financeStatement/financeStatementReducer';
51
53
  import { clearForecastList } from '../../view/forecastList/forecastListReducer';
@@ -151,6 +153,7 @@ import { clearVendorGlobalReviewView } from '../../view/vendorReviewView/vendorG
151
153
  import { clearVendorTypeList } from '../../view/vendorTypeList/vendorTypeListReducer';
152
154
  import { clearZeniAccStatementList } from '../../view/zeniAccStatementList/zeniAccStatementListReducer';
153
155
  import { clearZeniAccountsPromoCard } from '../../view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer';
156
+ import { clearZeniOAuthView } from '../../view/zeniOAuthView/zeniOAuthReducer';
154
157
  import { clearAllAccounts } from '../account/accountReducer';
155
158
  import { clearAllAccountGroups } from '../accountGroup/accountGroupReducer';
156
159
  import { clearAllAccountRecon } from '../accountRecon/accountReconReducer';
@@ -203,8 +206,8 @@ import { clearAllUserRoles } from '../userRole/userRoleReducer';
203
206
  import { clearAllVendors } from '../vendor/vendorReducer';
204
207
  import { clearAllVendorExpenseTrends } from '../vendorExpense/vendorExpenseReducer';
205
208
  import { clearAll } from './tenantReducer';
206
- type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiAccountantView> | ReturnType<typeof clearAllAiAccountantCustomers> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllProjects> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearAutoTransferRules> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardRepaymentDetail> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearAggregatedReport> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearProfitAndLossProjectView> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTreasuryOverviewDetail> | ReturnType<typeof clearTreasurySetupView> | ReturnType<typeof clearTreasuryStatementList> | ReturnType<typeof clearTreasuryTaxLetterList> | ReturnType<typeof clearTreasuryTransferMoney> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard>;
207
- type clearActionTypeForEntities = ReturnType<typeof clearAiCfo> | ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountRecon> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllCardPayments> | ReturnType<typeof clearAllChargeCardRepayments> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllConnectedAccounts> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllAccruedJESchedules> | ReturnType<typeof clearAllJEScheduleTransactions> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllMonthEndCloseChecks> | ReturnType<typeof clearAllNotifications> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSectionsProjectView> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTags> | ReturnType<typeof clearAllTaskGroups> | ReturnType<typeof clearAllTaskGroupTemplates> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllToastNotifications> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearCountryList> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar>;
209
+ type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiAccountantView> | ReturnType<typeof clearAllAiAccountantCustomers> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllProjects> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearAutoTransferRules> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardRepaymentDetail> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFeatureNotificationView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearAggregatedReport> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearProfitAndLossProjectView> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTreasuryOverviewDetail> | ReturnType<typeof clearTreasurySetupView> | ReturnType<typeof clearTreasuryStatementList> | ReturnType<typeof clearTreasuryTaxLetterList> | ReturnType<typeof clearTreasuryTransferMoney> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard> | ReturnType<typeof clearZeniOAuthView>;
210
+ type clearActionTypeForEntities = ReturnType<typeof clearAiCfo> | ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountRecon> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllCardPayments> | ReturnType<typeof clearAllChargeCardRepayments> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllConnectedAccounts> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllAccruedJESchedules> | ReturnType<typeof clearAllJEScheduleTransactions> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllMonthEndCloseChecks> | ReturnType<typeof clearAllNotifications> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSectionsProjectView> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTags> | ReturnType<typeof clearAllTaskGroups> | ReturnType<typeof clearAllTaskGroupTemplates> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllToastNotifications> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearCannedResponses> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearCountryList> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar>;
208
211
  export type ActionType = clearActionTypeForViews | clearActionTypeForEntities | ReturnType<typeof clearAll>;
209
212
  export declare const clearAllEpic: (actions$: ActionsObservable<ActionType>) => import("rxjs").Observable<ActionType>;
210
213
  export {};
@@ -12,6 +12,7 @@ const notificationReducer_1 = require("../../entity/notification/notificationRed
12
12
  const sectionClassesViewReducer_1 = require("../../entity/sectionClassesViewV2/sectionClassesViewReducer");
13
13
  const sectionProjectViewReducer_1 = require("../../entity/sectionProjectView/sectionProjectViewReducer");
14
14
  const taskGroupReducer_1 = require("../../entity/taskGroup/taskGroupReducer");
15
+ const cannedResponsesReducer_1 = require("../../view/taskManager/cannedResponsesView/cannedResponsesReducer");
15
16
  const toastNotificationReducer_1 = require("../../entity/toastNotification/toastNotificationReducer");
16
17
  const accountListReducer_1 = require("../../view/accountList/accountListReducer");
17
18
  const accountMappingReducer_1 = require("../../view/accountMappingView/accountMappingReducer");
@@ -50,6 +51,7 @@ const jeSchedulesViewReducer_1 = require("../../view/expenseAutomationView/reduc
50
51
  const missingReceiptsViewReducer_1 = require("../../view/expenseAutomationView/reducers/missingReceiptsViewReducer");
51
52
  const reconciliationViewReducer_1 = require("../../view/expenseAutomationView/reducers/reconciliationViewReducer");
52
53
  const transactionsViewReducer_1 = require("../../view/expenseAutomationView/reducers/transactionsViewReducer");
54
+ const featureNotificationViewReducer_1 = require("../../view/featureNotificationView/featureNotificationViewReducer");
53
55
  const fileViewReducer_1 = require("../../view/fileView/fileViewReducer");
54
56
  const financeStatementReducer_1 = require("../../view/financeStatement/financeStatementReducer");
55
57
  const forecastListReducer_1 = require("../../view/forecastList/forecastListReducer");
@@ -155,6 +157,7 @@ const vendorGlobalReviewViewReducer_1 = require("../../view/vendorReviewView/ven
155
157
  const vendorTypeListReducer_1 = require("../../view/vendorTypeList/vendorTypeListReducer");
156
158
  const zeniAccStatementListReducer_1 = require("../../view/zeniAccStatementList/zeniAccStatementListReducer");
157
159
  const zeniAccountsPromoCardReducer_1 = require("../../view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer");
160
+ const zeniOAuthReducer_1 = require("../../view/zeniOAuthView/zeniOAuthReducer");
158
161
  const accountReducer_1 = require("../account/accountReducer");
159
162
  const accountGroupReducer_1 = require("../accountGroup/accountGroupReducer");
160
163
  const accountReconReducer_1 = require("../accountRecon/accountReconReducer");
@@ -274,6 +277,7 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
274
277
  (0, transactionsViewReducer_1.clearExpenseAutomationTransactionsView)(),
275
278
  (0, expenseAutomationViewReducer_1.clearExpenseAutomationView)(),
276
279
  (0, expressPayReducer_1.clearExpressPayView)(),
280
+ (0, featureNotificationViewReducer_1.clearFeatureNotificationView)(),
277
281
  (0, fileViewReducer_1.clearFileViewList)(),
278
282
  (0, financeStatementReducer_1.clearFinanceStatement)(),
279
283
  (0, forecastListReducer_1.clearForecastList)(),
@@ -356,6 +360,7 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
356
360
  (0, zeniAccountSetupViewReducer_1.clearZeniAccountSetupView)(),
357
361
  (0, zeniAccountsConfigReducer_1.clearZeniAccountsConfig)(),
358
362
  (0, zeniAccountsPromoCardReducer_1.clearZeniAccountsPromoCard)(),
363
+ (0, zeniOAuthReducer_1.clearZeniOAuthView)(),
359
364
  ];
360
365
  // Note: Please maintain strict alphabetical order
361
366
  const clearEntityActions = [
@@ -413,6 +418,7 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
413
418
  (0, userReducer_1.clearAllUsers)(),
414
419
  (0, vendorExpenseReducer_1.clearAllVendorExpenseTrends)(),
415
420
  (0, vendorReducer_1.clearAllVendors)(),
421
+ (0, cannedResponsesReducer_1.clearCannedResponses)(),
416
422
  (0, classListReducer_1.clearClassList)(),
417
423
  (0, contactReducer_1.clearContacts)(),
418
424
  (0, countryListReducer_1.clearCountryList)(),
@@ -0,0 +1,19 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { RootState } from '../../../reducer';
3
+ import { ZeniAPI } from '../../../zeniAPI';
4
+ import { deleteConnection, deleteConnectionFailure, deleteConnectionSuccess } from '../tenantReducer';
5
+ export type ActionType = ReturnType<typeof deleteConnection> | ReturnType<typeof deleteConnectionSuccess> | ReturnType<typeof deleteConnectionFailure>;
6
+ export declare const deleteConnectionEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
7
+ payload: {
8
+ tenantId: string;
9
+ connectionId: string;
10
+ connectionType: "revenue";
11
+ };
12
+ type: "tenant/deleteConnectionSuccess";
13
+ } | {
14
+ payload: {
15
+ tenantId: string;
16
+ status: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
17
+ };
18
+ type: "tenant/deleteConnectionFailure";
19
+ }>;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteConnectionEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const responsePayload_1 = require("../../../responsePayload");
7
+ const tenantReducer_1 = require("../tenantReducer");
8
+ const deleteConnectionEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(tenantReducer_1.deleteConnection.match), (0, operators_1.switchMap)((action) => zeniAPI
9
+ .deleteAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/connections/${action.payload.connectionId}`, undefined, Object.assign({ 'zeni-tenant-id': action.payload.tenantId }))
10
+ .pipe((0, operators_1.mergeMap)((response) => {
11
+ if ((0, responsePayload_1.isSuccessStatus)(response)) {
12
+ return (0, rxjs_1.from)([
13
+ (0, tenantReducer_1.deleteConnectionSuccess)(action.payload.tenantId, action.payload.connectionId, action.payload.connectionType),
14
+ ]);
15
+ }
16
+ const status = response.status ??
17
+ (0, responsePayload_1.createZeniAPIStatus)('Failed to delete connection. Please try again.');
18
+ return (0, rxjs_1.from)([
19
+ (0, tenantReducer_1.deleteConnectionFailure)(action.payload.tenantId, status),
20
+ ]);
21
+ }), (0, operators_1.catchError)((error) => {
22
+ const message = error instanceof Error
23
+ ? error.message
24
+ : 'Unexpected error deleting connection.';
25
+ return (0, rxjs_1.from)([
26
+ (0, tenantReducer_1.deleteConnectionFailure)(action.payload.tenantId, (0, responsePayload_1.createZeniAPIStatus)(message)),
27
+ ]);
28
+ }))));
29
+ exports.deleteConnectionEpic = deleteConnectionEpic;
@@ -0,0 +1,19 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { RootState } from '../../../reducer';
3
+ import { ZeniAPI } from '../../../zeniAPI';
4
+ import { saveAPIKeyConnection, saveAPIKeyConnectionFailure, saveAPIKeyConnectionSuccess } from '../tenantReducer';
5
+ export type ActionType = ReturnType<typeof saveAPIKeyConnection> | ReturnType<typeof saveAPIKeyConnectionSuccess> | ReturnType<typeof saveAPIKeyConnectionFailure>;
6
+ export declare const saveAPIKeyConnectionEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
7
+ payload: {
8
+ tenantId: string;
9
+ connectionType: "revenue";
10
+ connectionPayload: import("../tenantPayload").ConnectionDataPayload;
11
+ };
12
+ type: "tenant/saveAPIKeyConnectionSuccess";
13
+ } | {
14
+ payload: {
15
+ tenantId: string;
16
+ status: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
17
+ };
18
+ type: "tenant/saveAPIKeyConnectionFailure";
19
+ }>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.saveAPIKeyConnectionEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const responsePayload_1 = require("../../../responsePayload");
7
+ const tenantReducer_1 = require("../tenantReducer");
8
+ const saveAPIKeyConnectionEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(tenantReducer_1.saveAPIKeyConnection.match), (0, operators_1.switchMap)((action) => zeniAPI
9
+ .putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/connections/${action.payload.connectionId}`, {
10
+ api_key: action.payload.credentials.api_key,
11
+ connection_name: action.payload.connectionName,
12
+ connection_type: action.payload.connectionType,
13
+ site: action.payload.credentials.site,
14
+ }, Object.assign({ 'zeni-tenant-id': action.payload.tenantId }))
15
+ .pipe((0, operators_1.mergeMap)((response) => {
16
+ if ((0, responsePayload_1.isSuccessResponse)(response)) {
17
+ return (0, rxjs_1.from)([
18
+ (0, tenantReducer_1.saveAPIKeyConnectionSuccess)(action.payload.tenantId, action.payload.connectionType, response.data // eslint-disable-line @typescript-eslint/no-non-null-assertion
19
+ ),
20
+ ]);
21
+ }
22
+ const status = response.status ??
23
+ (0, responsePayload_1.createZeniAPIStatus)('Failed to save connection. Please try again.');
24
+ return (0, rxjs_1.from)([(0, tenantReducer_1.saveAPIKeyConnectionFailure)(action.payload.tenantId, status)]);
25
+ }), (0, operators_1.catchError)((error) => {
26
+ const message = error instanceof Error ? error.message : 'Unexpected error saving connection.';
27
+ return (0, rxjs_1.from)([
28
+ (0, tenantReducer_1.saveAPIKeyConnectionFailure)(action.payload.tenantId, (0, responsePayload_1.createZeniAPIStatus)(message)),
29
+ ]);
30
+ }))));
31
+ exports.saveAPIKeyConnectionEpic = saveAPIKeyConnectionEpic;
@@ -0,0 +1,19 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { RootState } from '../../../reducer';
3
+ import { ZeniAPI } from '../../../zeniAPI';
4
+ import { saveOAuthConnection, saveOAuthConnectionFailure, saveOAuthConnectionSuccess } from '../tenantReducer';
5
+ export type ActionType = ReturnType<typeof saveOAuthConnection> | ReturnType<typeof saveOAuthConnectionSuccess> | ReturnType<typeof saveOAuthConnectionFailure>;
6
+ export declare const saveOAuthConnectionEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
7
+ payload: {
8
+ tenantId: string;
9
+ connectionType: "revenue";
10
+ connectionPayload: import("../tenantPayload").ConnectionDataPayload;
11
+ };
12
+ type: "tenant/saveOAuthConnectionSuccess";
13
+ } | {
14
+ payload: {
15
+ tenantId: string;
16
+ status: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
17
+ };
18
+ type: "tenant/saveOAuthConnectionFailure";
19
+ }>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.saveOAuthConnectionEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const responsePayload_1 = require("../../../responsePayload");
7
+ const tenantReducer_1 = require("../tenantReducer");
8
+ const saveOAuthConnectionEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(tenantReducer_1.saveOAuthConnection.match), (0, operators_1.switchMap)((action) => zeniAPI
9
+ .putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/connections/${action.payload.connectionId}`, {
10
+ authorization_code: action.payload.credentials.authorization_code,
11
+ client_id: action.payload.credentials.client_id,
12
+ client_secret: action.payload.credentials.client_secret,
13
+ connection_name: action.payload.connectionName,
14
+ connection_type: action.payload.connectionType,
15
+ redirect_uri: action.payload.credentials.redirect_uri,
16
+ }, Object.assign({ 'zeni-tenant-id': action.payload.tenantId }))
17
+ .pipe((0, operators_1.mergeMap)((response) => {
18
+ if ((0, responsePayload_1.isSuccessResponse)(response)) {
19
+ return (0, rxjs_1.from)([
20
+ (0, tenantReducer_1.saveOAuthConnectionSuccess)(action.payload.tenantId, action.payload.connectionType, response.data // eslint-disable-line @typescript-eslint/no-non-null-assertion
21
+ ),
22
+ ]);
23
+ }
24
+ const status = response.status ??
25
+ (0, responsePayload_1.createZeniAPIStatus)('Failed to save connection. Please try again.');
26
+ return (0, rxjs_1.from)([(0, tenantReducer_1.saveOAuthConnectionFailure)(action.payload.tenantId, status)]);
27
+ }), (0, operators_1.catchError)((error) => {
28
+ const message = error instanceof Error ? error.message : 'Unexpected error saving connection.';
29
+ return (0, rxjs_1.from)([
30
+ (0, tenantReducer_1.saveOAuthConnectionFailure)(action.payload.tenantId, (0, responsePayload_1.createZeniAPIStatus)(message)),
31
+ ]);
32
+ }))));
33
+ exports.saveOAuthConnectionEpic = saveOAuthConnectionEpic;
@@ -140,6 +140,7 @@ interface ConnectionsPayload {
140
140
  connections: {
141
141
  accounting: ConnectionDataPayload[];
142
142
  payments: ConnectionDataPayload[];
143
+ revenue?: ConnectionDataPayload[];
143
144
  };
144
145
  }
145
146
  interface ConnectionWithMetaPayload {
@@ -13,6 +13,10 @@ export interface DoSignInPayload {
13
13
  redirectUri: ZeniUrl;
14
14
  sourceUri: ZeniUrl;
15
15
  }
16
+ export declare const toExternalIntegrationType: (v: string) => "revenue";
17
+ export type ExternalIntegrationType = ReturnType<typeof toExternalIntegrationType>;
18
+ export declare const toExternalSupportedTool: (v: string) => "chargebee" | "hubspot";
19
+ export type ExternalSupportedTool = ReturnType<typeof toExternalSupportedTool>;
16
20
  export declare const initialState: TenantState;
17
21
  export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenants: TenantPayload[], userTenantPayload?: TenantUserPayload | undefined, tenantUpdated?: any], {
18
22
  tenants: TenantPayload[];
@@ -80,7 +84,60 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
80
84
  }, "tenant/fetchExternalConnectionsFailure", never, never>, fetchExternalConnectionsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, externalConnections: ConnectionsPayload], {
81
85
  tenantId: string;
82
86
  externalConnections: ConnectionsPayload;
83
- }, "tenant/fetchExternalConnectionsSuccess", never, never>, clearAll: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[keepTenantCompanyState?: boolean | undefined], {
87
+ }, "tenant/fetchExternalConnectionsSuccess", never, never>, saveAPIKeyConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue", connectionName: "chargebee" | "hubspot", credentials: {
88
+ api_key: string;
89
+ site: string;
90
+ }], {
91
+ tenantId: string;
92
+ connectionId: string;
93
+ connectionType: "revenue";
94
+ connectionName: "chargebee" | "hubspot";
95
+ credentials: {
96
+ api_key: string;
97
+ site: string;
98
+ };
99
+ }, "tenant/saveAPIKeyConnection", never, never>, saveAPIKeyConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue", connectionPayload: ConnectionDataPayload], {
100
+ tenantId: string;
101
+ connectionType: "revenue";
102
+ connectionPayload: ConnectionDataPayload;
103
+ }, "tenant/saveAPIKeyConnectionSuccess", never, never>, saveAPIKeyConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
104
+ tenantId: string;
105
+ status: ZeniAPIStatus<Record<string, unknown>>;
106
+ }, "tenant/saveAPIKeyConnectionFailure", never, never>, saveOAuthConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue", connectionName: "chargebee" | "hubspot", credentials: {
107
+ authorization_code: string;
108
+ client_id: string;
109
+ client_secret: string;
110
+ redirect_uri: string;
111
+ }], {
112
+ tenantId: string;
113
+ connectionId: string;
114
+ connectionType: "revenue";
115
+ connectionName: "chargebee" | "hubspot";
116
+ credentials: {
117
+ authorization_code: string;
118
+ client_id: string;
119
+ client_secret: string;
120
+ redirect_uri: string;
121
+ };
122
+ }, "tenant/saveOAuthConnection", never, never>, saveOAuthConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue", connectionPayload: ConnectionDataPayload], {
123
+ tenantId: string;
124
+ connectionType: "revenue";
125
+ connectionPayload: ConnectionDataPayload;
126
+ }, "tenant/saveOAuthConnectionSuccess", never, never>, saveOAuthConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
127
+ tenantId: string;
128
+ status: ZeniAPIStatus<Record<string, unknown>>;
129
+ }, "tenant/saveOAuthConnectionFailure", never, never>, deleteConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue"], {
130
+ tenantId: string;
131
+ connectionId: string;
132
+ connectionType: "revenue";
133
+ }, "tenant/deleteConnection", never, never>, deleteConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue"], {
134
+ tenantId: string;
135
+ connectionId: string;
136
+ connectionType: "revenue";
137
+ }, "tenant/deleteConnectionSuccess", never, never>, deleteConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
138
+ tenantId: string;
139
+ status: ZeniAPIStatus<Record<string, unknown>>;
140
+ }, "tenant/deleteConnectionFailure", never, never>, clearAll: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[keepTenantCompanyState?: boolean | undefined], {
84
141
  keepTenantCompanyState: boolean;
85
142
  }, "tenant/clearAll", never, never>, fetchSubscriptionSummaryForTenant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string], {
86
143
  tenantId: string;
@@ -128,5 +185,6 @@ export declare const toRoleResource: (payload: RoleResourcePayload) => RoleResou
128
185
  export declare function mapConnectionsPayloadToState(connectionsPayload: ConnectionsPayload): {
129
186
  accounting: Connection[];
130
187
  payments: Connection[];
188
+ revenue: Connection[];
131
189
  };
132
190
  export declare const toConnection: (payload: ConnectionDataPayload) => Connection;