@zeniai/client-epic-state 5.0.92-beta0ND → 5.0.92-betaNB2

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 (107) hide show
  1. package/lib/commonStateTypes/animations.d.ts +1 -1
  2. package/lib/commonStateTypes/animations.js +0 -1
  3. package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +1 -1
  4. package/lib/entity/accountRecon/accountReconPayload.d.ts +20 -1
  5. package/lib/entity/accountRecon/accountReconPayload.js +23 -1
  6. package/lib/entity/accountRecon/accountReconSelector.d.ts +6 -1
  7. package/lib/entity/accountRecon/accountReconSelector.js +5 -0
  8. package/lib/entity/accountRecon/accountReconState.d.ts +19 -0
  9. package/lib/entity/company/companyPayload.d.ts +0 -4
  10. package/lib/entity/company/companyPayload.js +0 -4
  11. package/lib/entity/company/companyStateTypes.d.ts +0 -4
  12. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +7 -0
  13. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +9 -0
  14. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +7 -0
  15. package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +0 -1
  16. package/lib/entity/paymentAccount/paymentAccountSelector.js +0 -4
  17. package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
  18. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
  19. package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
  20. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
  21. package/lib/entity/tenant/tenantPayload.d.ts +0 -1
  22. package/lib/entity/tenant/tenantReducer.d.ts +25 -38
  23. package/lib/entity/tenant/tenantReducer.js +5 -65
  24. package/lib/entity/tenant/tenantState.d.ts +0 -1
  25. package/lib/epic.d.ts +3 -6
  26. package/lib/epic.js +3 -7
  27. package/lib/esm/commonStateTypes/animations.js +0 -1
  28. package/lib/esm/entity/accountRecon/accountReconPayload.js +23 -1
  29. package/lib/esm/entity/accountRecon/accountReconSelector.js +5 -0
  30. package/lib/esm/entity/company/companyPayload.js +0 -4
  31. package/lib/esm/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +9 -0
  32. package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +0 -3
  33. package/lib/esm/entity/tenant/tenantReducer.js +3 -63
  34. package/lib/esm/epic.js +3 -7
  35. package/lib/esm/index.js +8 -11
  36. package/lib/esm/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.js +34 -0
  37. package/lib/esm/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.js +42 -0
  38. package/lib/esm/view/expenseAutomationView/payload/reconciliationPayload.js +73 -0
  39. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +98 -4
  40. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +20 -0
  41. package/lib/esm/view/expenseAutomationView/types/reconciliationViewState.js +20 -0
  42. package/lib/esm/view/fileView/epic/deleteFileEpic.js +2 -2
  43. package/lib/esm/view/fileView/epic/deleteFileListEpic.js +2 -2
  44. package/lib/esm/view/fileView/epic/updateFileNameEpic.js +2 -2
  45. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +50 -217
  46. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +1 -7
  47. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +0 -12
  48. package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +52 -105
  49. package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +1 -6
  50. package/lib/index.d.ts +12 -16
  51. package/lib/index.js +37 -49
  52. package/lib/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.d.ts +6 -0
  53. package/lib/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.js +38 -0
  54. package/lib/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.d.ts +19 -0
  55. package/lib/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.js +46 -0
  56. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +83 -1
  57. package/lib/view/expenseAutomationView/payload/reconciliationPayload.js +75 -0
  58. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +35 -3
  59. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +99 -5
  60. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +5 -1
  61. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +20 -0
  62. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +128 -0
  63. package/lib/view/expenseAutomationView/types/reconciliationViewState.js +21 -0
  64. package/lib/view/fileView/epic/deleteFileEpic.js +1 -1
  65. package/lib/view/fileView/epic/deleteFileListEpic.js +1 -1
  66. package/lib/view/fileView/epic/updateFileNameEpic.js +1 -1
  67. package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +0 -3
  68. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +4 -41
  69. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +51 -219
  70. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +1 -5
  71. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +2 -11
  72. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +0 -40
  73. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +1 -13
  74. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +2 -28
  75. package/lib/view/spendManagement/commonSetup/setupViewReducer.js +53 -106
  76. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +2 -7
  77. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +1 -6
  78. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +0 -19
  79. package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.d.ts +1 -1
  80. package/package.json +1 -1
  81. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +0 -21
  82. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +0 -54
  83. package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +0 -50
  84. package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +0 -42
  85. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +0 -29
  86. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +0 -40
  87. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +0 -52
  88. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +0 -59
  89. package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +0 -14
  90. package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +0 -205
  91. package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +0 -28
  92. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +0 -7
  93. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +0 -46
  94. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.d.ts +0 -8
  95. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +0 -33
  96. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +0 -9
  97. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +0 -44
  98. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +0 -28
  99. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +0 -56
  100. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +0 -30
  101. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +0 -63
  102. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +0 -33
  103. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +0 -17
  104. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +0 -24
  105. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +0 -213
  106. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +0 -125
  107. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +0 -32
@@ -1,2 +1,2 @@
1
- export declare const toAnimationsFileName: (v: string) => "Success" | "AiAgent" | "AiIconEntry" | "AiIconExit" | "AiIconLoop" | "AiStar" | "AiStarIcon" | "AiStarPlain" | "AIPoweredInvoiceDark" | "AIPoweredInvoiceLight" | "Angry" | "AutoTransfer" | "CloseCard" | "Confetti" | "ConfettiSuccess" | "DashboardChristmasSnow" | "DashboardNewYearShow" | "DashboardSidebarBottomChristmas" | "DashboardSidebarBottomHalloween" | "DashboardSidebarBottomNewYear" | "DashboardSidebarBottomThanksgiving" | "DashboardSidebarTopChristmas" | "DashboardSidebarTopHalloween" | "DashboardSidebarTopNewYear" | "DashboardSidebarTopThanksgiving" | "Distribution" | "DistributionDark" | "EarnYield" | "FastestWayDark" | "FastestWayLight" | "FinanceTeamDark" | "FinanceTeamLight" | "Happy" | "Liquidity" | "LockCard" | "MoneyTransferSuccess" | "MultiLevelApprovalDark" | "MultiLevelApprovalLight" | "NotHappy" | "Protection" | "ReceiptDark" | "ReceiptLight" | "Recurring" | "RecurringDark" | "ReimburseDark" | "ReimburseLight" | "RewardsDark" | "RewardsDarkHover" | "RewardsLight" | "RewardsLightHover" | "Ripple" | "Secure" | "Target" | "TargetDark" | "UnlockCard" | "VeryHappy" | "Welcome" | "ZeniAssist";
1
+ export declare const toAnimationsFileName: (v: string) => "Success" | "AiAgent" | "AiIconEntry" | "AiIconExit" | "AiIconLoop" | "AiStar" | "AiStarIcon" | "AiStarPlain" | "AIPoweredInvoiceDark" | "AIPoweredInvoiceLight" | "Angry" | "AutoTransfer" | "CloseCard" | "Confetti" | "ConfettiSuccess" | "DashboardChristmasSnow" | "DashboardNewYearShow" | "DashboardSidebarBottomChristmas" | "DashboardSidebarBottomHalloween" | "DashboardSidebarBottomNewYear" | "DashboardSidebarBottomThanksgiving" | "DashboardSidebarTopChristmas" | "DashboardSidebarTopHalloween" | "DashboardSidebarTopNewYear" | "DashboardSidebarTopThanksgiving" | "Distribution" | "DistributionDark" | "EarnYield" | "FastestWayDark" | "FastestWayLight" | "FinanceTeamDark" | "FinanceTeamLight" | "Happy" | "Liquidity" | "LockCard" | "MoneyTransferSuccess" | "MultiLevelApprovalDark" | "MultiLevelApprovalLight" | "NotHappy" | "Protection" | "ReceiptDark" | "ReceiptLight" | "Recurring" | "RecurringDark" | "ReimburseDark" | "ReimburseLight" | "RewardsDark" | "RewardsDarkHover" | "RewardsLight" | "RewardsLightHover" | "Ripple" | "Secure" | "Target" | "TargetDark" | "UnlockCard" | "VeryHappy" | "ZeniAssist";
2
2
  export type AnimationFileName = ReturnType<typeof toAnimationsFileName>;
@@ -59,7 +59,6 @@ const ALL_ANIMATIONS_FILE_NAMES = [
59
59
  'TargetDark',
60
60
  'UnlockCard',
61
61
  'VeryHappy',
62
- 'Welcome',
63
62
  'ZeniAssist',
64
63
  ];
65
64
  const toAnimationsFileName = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_ANIMATIONS_FILE_NAMES);
@@ -8,7 +8,7 @@ import { SortOrder } from '../selectorTypes/sortOrderTypes';
8
8
  import { ReportID } from './viewAndReport';
9
9
  export type AgingDateSelectionType = 'last_month' | 'last_quarter' | 'custom_date';
10
10
  export type AgingReportId = Extract<ReportID, 'accounts_payable_aging' | 'accounts_receivable_aging'>;
11
- declare const toAgingReportSortKey: (v: string) => "vendor" | "customer" | "current_due" | "due_1-30_days" | "due_31-60_days" | "due_61-90_days" | "due_over_90_days" | "total";
11
+ declare const toAgingReportSortKey: (v: string) => "vendor" | "customer" | "total" | "current_due" | "due_1-30_days" | "due_31-60_days" | "due_61-90_days" | "due_over_90_days";
12
12
  export type AgingReportSortKey = ReturnType<typeof toAgingReportSortKey>;
13
13
  export interface AgingReportInvoice {
14
14
  amount: Amount;
@@ -7,6 +7,20 @@ export interface StatementMetaDataPayload {
7
7
  file_id: string;
8
8
  statement_upload_id: string;
9
9
  }
10
+ export interface LastReconciledByPayload {
11
+ user_email: string;
12
+ user_id: ID;
13
+ }
14
+ export interface LastReconciledPayload {
15
+ at: string;
16
+ by: LastReconciledByPayload;
17
+ for_period_end_date: string;
18
+ }
19
+ export interface MatchProgressPayload {
20
+ matched: number;
21
+ percentage: number | null;
22
+ total: number;
23
+ }
10
24
  export interface ReconciliationDataPayload {
11
25
  account_id: ID;
12
26
  balance_data_status: StatusCodeWithLabelPayload | null;
@@ -21,6 +35,10 @@ export interface ReconciliationDataPayload {
21
35
  error_message: string;
22
36
  } | null;
23
37
  initial_cleared_balance: number | null;
38
+ last_reconciled: LastReconciledPayload | null;
39
+ match_progress: MatchProgressPayload | null;
40
+ needs_review_count: number;
41
+ opening_balance: number | null;
24
42
  payment_account_updated_at: string | null;
25
43
  reconciliation_id: string | null;
26
44
  retry_count: number | null;
@@ -29,11 +47,12 @@ export interface ReconciliationDataPayload {
29
47
  statement_data_status: StatusCodeWithLabelPayload | null;
30
48
  statement_meta_data: StatementMetaDataPayload | null;
31
49
  statement_status: StatusCodeWithLabelPayload | null;
32
- status: StatusCodeWithLabelPayload | null;
50
+ status: StatusCodeWithLabelPayload;
33
51
  transactions: ReconcileReviewTransactionsPayload;
34
52
  update_time: string | null;
35
53
  user_id: ID | null;
36
54
  variance: number | null;
55
+ auto_matched_count?: number;
37
56
  }
38
57
  export interface RecommendedReviewTransactionPayload {
39
58
  amount: number;
@@ -65,7 +65,7 @@ const toAccountReconciliationData = (payload) => {
65
65
  return {
66
66
  reconciliationId: payload.reconciliation_id ?? undefined,
67
67
  accountId: payload.account_id,
68
- reconciliationStatus: payload.status
68
+ reconciliationStatus: payload.status != null
69
69
  ? {
70
70
  code: (0, accountReconState_1.toReconciliationStatusCodeType)(payload.status.code),
71
71
  label: payload.status.label,
@@ -111,6 +111,28 @@ const toAccountReconciliationData = (payload) => {
111
111
  initialClearedBalance: payload.initial_cleared_balance != null
112
112
  ? (0, amount_1.toAmount)(payload.initial_cleared_balance, payload.currency.currency_code, payload.currency.currency_symbol)
113
113
  : undefined,
114
+ lastReconciled: payload.last_reconciled != null
115
+ ? {
116
+ at: (0, zeniDayJS_1.date)(payload.last_reconciled.at),
117
+ by: {
118
+ userEmail: payload.last_reconciled.by.user_email,
119
+ userId: payload.last_reconciled.by.user_id,
120
+ },
121
+ forPeriodEndDate: (0, zeniDayJS_1.date)(payload.last_reconciled.for_period_end_date),
122
+ }
123
+ : undefined,
124
+ matchProgress: payload.match_progress != null
125
+ ? {
126
+ matched: payload.match_progress.matched,
127
+ percentage: payload.match_progress.percentage,
128
+ total: payload.match_progress.total,
129
+ }
130
+ : undefined,
131
+ autoMatchedCount: payload.auto_matched_count,
132
+ needsReview: payload.needs_review_count,
133
+ openingBalance: payload.opening_balance != null
134
+ ? (0, amount_1.toAmount)(payload.opening_balance, payload.currency.currency_code, payload.currency.currency_symbol)
135
+ : undefined,
114
136
  startDate: (0, zeniDayJS_1.date)(payload.start_date),
115
137
  endDate: (0, zeniDayJS_1.date)(payload.end_date),
116
138
  accountUpdatedAt: payload.payment_account_updated_at != null
@@ -7,7 +7,7 @@ import { AccountBase } from '../account/accountState';
7
7
  import { File } from '../file/fileState';
8
8
  import { MatchedTransaction } from '../transaction/stateTypes/reconciliationTransaction';
9
9
  import { User } from '../user/userState';
10
- import { BalanceDataStatusCodeType, ReconciliationStatusCodeType, StatementDataStatusCodeType, StatementStatusCodeType, TransactionsToReview } from './accountReconState';
10
+ import { BalanceDataStatusCodeType, LastReconciled, MatchProgress, ReconciliationStatusCodeType, StatementDataStatusCodeType, StatementStatusCodeType, TransactionsToReview } from './accountReconState';
11
11
  export interface AccountReconciliationEntity {
12
12
  account: AccountBase;
13
13
  currency: Currency;
@@ -20,6 +20,7 @@ export interface AccountReconciliationEntity {
20
20
  transactionsToReconcile: MatchedTransaction[];
21
21
  transactionsToReview: TransactionsToReview[];
22
22
  accountUpdatedAt?: ZeniDate;
23
+ autoMatchedCount?: number;
23
24
  balance?: Amount;
24
25
  balanceDataStatus?: {
25
26
  code: BalanceDataStatusCodeType;
@@ -31,6 +32,10 @@ export interface AccountReconciliationEntity {
31
32
  errorShort: string;
32
33
  };
33
34
  initialClearedBalance?: Amount;
35
+ lastReconciled?: LastReconciled;
36
+ matchProgress?: MatchProgress;
37
+ needsReview?: number;
38
+ openingBalance?: Amount;
34
39
  reconciliationId?: ID;
35
40
  reconciliationStatus?: {
36
41
  code: ReconciliationStatusCodeType;
@@ -36,6 +36,11 @@ exports.getAccountReconByAccountIdAndSelectedPeriod = (0, toolkit_1.createSelect
36
36
  variance: accountRecon.variance,
37
37
  clearedBalance: accountRecon.clearedBalance,
38
38
  initialClearedBalance: accountRecon.initialClearedBalance,
39
+ lastReconciled: accountRecon.lastReconciled,
40
+ autoMatchedCount: accountRecon.autoMatchedCount,
41
+ matchProgress: accountRecon.matchProgress,
42
+ needsReview: accountRecon.needsReview,
43
+ openingBalance: accountRecon.openingBalance,
39
44
  reconciliationId: accountRecon.reconciliationId,
40
45
  user,
41
46
  statementStatus: accountRecon.statementStatus,
@@ -18,6 +18,20 @@ export declare const toStatementStatusCodeType: (v: string) => "not_found" | "up
18
18
  export type StatementStatusCodeType = ReturnType<typeof toStatementStatusCodeType>;
19
19
  export declare const toAccountReconKey: (accountId: ID, selectedPeriod: MonthYearPeriod) => string;
20
20
  export type AccountReconKey = ReturnType<typeof toAccountReconKey>;
21
+ export interface LastReconciledByUser {
22
+ userEmail: string;
23
+ userId: ID;
24
+ }
25
+ export interface LastReconciled {
26
+ at: ZeniDate;
27
+ by: LastReconciledByUser;
28
+ forPeriodEndDate: ZeniDate;
29
+ }
30
+ export interface MatchProgress {
31
+ matched: number;
32
+ percentage: number | null;
33
+ total: number;
34
+ }
21
35
  export interface AccountReconState {
22
36
  accountReconByAccountReconKey: Record<AccountReconKey, AccountReconciliationData>;
23
37
  }
@@ -33,6 +47,7 @@ export interface AccountReconciliationData {
33
47
  transactionsToReconcile: ID[];
34
48
  transactionsToReview: TransactionsToReview[];
35
49
  accountUpdatedAt?: ZeniDate;
50
+ autoMatchedCount?: number;
36
51
  balanceDataStatus?: {
37
52
  code: BalanceDataStatusCodeType;
38
53
  label: string;
@@ -44,6 +59,10 @@ export interface AccountReconciliationData {
44
59
  errorShort: string;
45
60
  };
46
61
  initialClearedBalance?: Amount;
62
+ lastReconciled?: LastReconciled;
63
+ matchProgress?: MatchProgress;
64
+ needsReview?: number;
65
+ openingBalance?: Amount;
47
66
  reconciliationId?: ID;
48
67
  reconciliationStatus?: {
49
68
  code: ReconciliationStatusCodeType;
@@ -320,10 +320,6 @@ interface CompanyOnboardingInfoPayload {
320
320
  is_subsidiary: boolean;
321
321
  onboarding_user_ids: ID[];
322
322
  parent_company_id: ID | null;
323
- is_onboarding_ai_activation_viewed?: boolean;
324
- is_onboarding_ai_finance_team_acknowledged?: boolean;
325
- onboarding_ai_activation_viewed_by?: ID[];
326
- onboarding_ai_finance_team_acknowledged_by?: ID[];
327
323
  onboarding_info?: OnboardingInfoPayload;
328
324
  subscription_billing_address_id?: ID;
329
325
  }
@@ -333,11 +333,7 @@ const toCompanyOnboardingInfo = (payload) => ({
333
333
  onboardingUserIds: payload.onboarding_user_ids,
334
334
  isSubsidiary: payload.is_subsidiary,
335
335
  parentCompanyId: payload.parent_company_id != null ? payload.parent_company_id : undefined,
336
- isOnboardingAiFinanceTeamAcknowledged: payload.is_onboarding_ai_finance_team_acknowledged ?? false,
337
- isOnboardingAiActivationViewed: payload.is_onboarding_ai_activation_viewed ?? false,
338
336
  isOnboardingCompanyDetailsCompleted: payload.is_onboarding_company_details_step_completed,
339
- onboardingAiFinanceTeamAcknowledgedBy: payload.onboarding_ai_finance_team_acknowledged_by ?? [],
340
- onboardingAiActivationViewedBy: payload.onboarding_ai_activation_viewed_by ?? [],
341
337
  onboardingInfo: (0, exports.toOnboardingInfo)(payload.onboarding_info),
342
338
  isOnboardingCompleted: payload.is_onboarding_completed,
343
339
  subscriptionBillingAddressId: payload.subscription_billing_address_id,
@@ -323,13 +323,9 @@ export interface OnboardingInfo extends OnboardingStepsInfo {
323
323
  onboardingToQuoteSignMinutes?: number;
324
324
  }
325
325
  export interface CompanyOnboardingInfo {
326
- isOnboardingAiActivationViewed: boolean;
327
- isOnboardingAiFinanceTeamAcknowledged: boolean;
328
326
  isOnboardingCompanyDetailsCompleted: boolean;
329
327
  isOnboardingCompleted: boolean;
330
328
  isSubsidiary: boolean;
331
- onboardingAiActivationViewedBy: ID[];
332
- onboardingAiFinanceTeamAcknowledgedBy: ID[];
333
329
  onboardingUserIds: ID[];
334
330
  onboardingInfo?: OnboardingInfo;
335
331
  parentCompanyId?: ID;
@@ -6,6 +6,12 @@ interface MonthCloseCheckMetricsPayload {
6
6
  label: string;
7
7
  value: number;
8
8
  }
9
+ interface MonthCloseChecksProgressJsonPayload {
10
+ successfully_connected_bank_accounts: number;
11
+ successfully_reconciled_bank_accounts: number;
12
+ time_saved_percentage: number;
13
+ total_bank_accounts: number;
14
+ }
9
15
  interface MonthCloseChecksPayload {
10
16
  action_frequency: string;
11
17
  month_close_check_description: string;
@@ -14,6 +20,7 @@ interface MonthCloseChecksPayload {
14
20
  progress_percentage: number;
15
21
  sequence: number;
16
22
  metrics?: MonthCloseCheckMetricsPayload[];
23
+ progress_json?: MonthCloseChecksProgressJsonPayload;
17
24
  progress_percentage_ai?: number;
18
25
  }
19
26
  interface MonthEndInsightsPayload {
@@ -14,6 +14,12 @@ const toMonthCloseCheckMetrics = (metrics) => {
14
14
  value: metric.value,
15
15
  }));
16
16
  };
17
+ const toProgressJson = (json) => ({
18
+ successfullyConnectedBankAccounts: json.successfully_connected_bank_accounts,
19
+ successfullyReconciledBankAccounts: json.successfully_reconciled_bank_accounts,
20
+ timeSavedPercentage: json.time_saved_percentage,
21
+ totalBankAccounts: json.total_bank_accounts,
22
+ });
17
23
  const toMonthEndCloseCheck = (monthCloseCheck) => {
18
24
  return {
19
25
  id: (0, expenseAutomationViewState_1.toExpenseAutomationViewType)(monthCloseCheck.month_close_check_type),
@@ -22,6 +28,9 @@ const toMonthEndCloseCheck = (monthCloseCheck) => {
22
28
  frequency: (0, monthEndCloseChecksState_1.toMonthEndCloseCheckFrequency)(monthCloseCheck.action_frequency),
23
29
  progress: monthCloseCheck.progress_percentage,
24
30
  progressAI: monthCloseCheck.progress_percentage_ai ?? 0,
31
+ progressJson: monthCloseCheck.progress_json
32
+ ? toProgressJson(monthCloseCheck.progress_json)
33
+ : undefined,
25
34
  sequence: monthCloseCheck.sequence,
26
35
  isDisabled: (0, expenseAutomationViewState_1.toExpenseAutomationViewType)(monthCloseCheck.month_close_check_type) ===
27
36
  'month_end_insights',
@@ -11,6 +11,12 @@ export interface MonthCloseCheckMetrics {
11
11
  label: string;
12
12
  value: number;
13
13
  }
14
+ export interface MonthCloseCheckProgressJson {
15
+ successfullyConnectedBankAccounts: number;
16
+ successfullyReconciledBankAccounts: number;
17
+ timeSavedPercentage: number;
18
+ totalBankAccounts: number;
19
+ }
14
20
  export interface MonthEndCloseCheck {
15
21
  description: string;
16
22
  frequency: MonthEndCloseCheckFrequency;
@@ -21,6 +27,7 @@ export interface MonthEndCloseCheck {
21
27
  progressAI: number;
22
28
  sequence: number;
23
29
  title: string;
30
+ progressJson?: MonthCloseCheckProgressJson;
24
31
  }
25
32
  export interface MonthEndInsights {
26
33
  efficiency: number;
@@ -4,4 +4,3 @@ export declare function getPaymentAccountsByPaymentAccountIds(paymentAccountStat
4
4
  export declare function getPaymentAccountByPaymentAccountId(paymentAccountState: PaymentAccountState, PaymentAccountId: ID): PaymentAccount | undefined;
5
5
  export declare function getPaymentAccountByBankAccountId(paymentAccountState: PaymentAccountState, bankAccountId: ID): PaymentAccount | undefined;
6
6
  export declare function getPaymentAccountsByBankAccountIds(paymentAccountState: PaymentAccountState, bankAccountIds: ID[]): PaymentAccount[];
7
- export declare function getPlaidPaymentAccounts(paymentAccountState: PaymentAccountState): PaymentAccount[];
@@ -7,7 +7,6 @@ exports.getPaymentAccountsByPaymentAccountIds = getPaymentAccountsByPaymentAccou
7
7
  exports.getPaymentAccountByPaymentAccountId = getPaymentAccountByPaymentAccountId;
8
8
  exports.getPaymentAccountByBankAccountId = getPaymentAccountByBankAccountId;
9
9
  exports.getPaymentAccountsByBankAccountIds = getPaymentAccountsByBankAccountIds;
10
- exports.getPlaidPaymentAccounts = getPlaidPaymentAccounts;
11
10
  const get_1 = __importDefault(require("lodash/get"));
12
11
  const values_1 = __importDefault(require("lodash/values"));
13
12
  function getPaymentAccountsByPaymentAccountIds(paymentAccountState, paymentAccountIds) {
@@ -29,6 +28,3 @@ function getPaymentAccountsByBankAccountIds(paymentAccountState, bankAccountIds)
29
28
  .filter((value) => value != null);
30
29
  return paymentAccounts;
31
30
  }
32
- function getPlaidPaymentAccounts(paymentAccountState) {
33
- return (0, values_1.default)(paymentAccountState.paymentAccountByID).filter((account) => account.provider === 'plaid');
34
- }
@@ -7,7 +7,7 @@ export declare const deleteConnectionEpic: (actions$: ActionsObservable<ActionTy
7
7
  payload: {
8
8
  tenantId: string;
9
9
  connectionId: string;
10
- connectionType: "revenue" | "email" | "payments";
10
+ connectionType: "revenue" | "payments";
11
11
  };
12
12
  type: "tenant/deleteConnectionSuccess";
13
13
  } | {
@@ -6,7 +6,7 @@ export type ActionType = ReturnType<typeof saveAPIKeyConnection> | ReturnType<ty
6
6
  export declare const saveAPIKeyConnectionEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
7
7
  payload: {
8
8
  tenantId: string;
9
- connectionType: "revenue" | "email" | "payments";
9
+ connectionType: "revenue" | "payments";
10
10
  connectionPayload: import("../tenantPayload").ConnectionDataPayload;
11
11
  };
12
12
  type: "tenant/saveAPIKeyConnectionSuccess";
@@ -6,15 +6,15 @@ export type ActionType = ReturnType<typeof saveConnectorCredentials> | ReturnTyp
6
6
  export declare const saveConnectorCredentialsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
7
7
  payload: {
8
8
  tenantId: string;
9
- connectionType: "revenue" | "email" | "payments";
10
- connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
9
+ connectionType: "revenue" | "payments";
10
+ connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
11
11
  connectionPayload: import("../tenantPayload").ConnectionDataPayload;
12
12
  };
13
13
  type: "tenant/saveConnectorCredentialsSuccess";
14
14
  } | {
15
15
  payload: {
16
16
  tenantId: string;
17
- connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
17
+ connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
18
18
  status: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
19
19
  };
20
20
  type: "tenant/saveConnectorCredentialsFailure";
@@ -6,7 +6,7 @@ export type ActionType = ReturnType<typeof saveOAuthConnection> | ReturnType<typ
6
6
  export declare const saveOAuthConnectionEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
7
7
  payload: {
8
8
  tenantId: string;
9
- connectionType: "revenue" | "email" | "payments";
9
+ connectionType: "revenue" | "payments";
10
10
  connectionPayload: import("../tenantPayload").ConnectionDataPayload;
11
11
  };
12
12
  type: "tenant/saveOAuthConnectionSuccess";
@@ -161,7 +161,6 @@ interface ConnectionsPayload {
161
161
  connections: {
162
162
  accounting: ConnectionDataPayload[];
163
163
  payments: ConnectionDataPayload[];
164
- email?: ConnectionDataPayload[];
165
164
  revenue?: ConnectionDataPayload[];
166
165
  };
167
166
  }
@@ -13,9 +13,9 @@ export interface DoSignInPayload {
13
13
  redirectUri: ZeniUrl;
14
14
  sourceUri: ZeniUrl;
15
15
  }
16
- export declare const toExternalIntegrationType: (v: string) => "revenue" | "email" | "payments";
16
+ export declare const toExternalIntegrationType: (v: string) => "revenue" | "payments";
17
17
  export type ExternalIntegrationType = ReturnType<typeof toExternalIntegrationType>;
18
- export declare const toExternalSupportedTool: (v: string) => "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
18
+ export declare const toExternalSupportedTool: (v: string) => "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
19
19
  export type ExternalSupportedTool = ReturnType<typeof toExternalSupportedTool>;
20
20
  export type ConnectorCredentialsBySlug = {
21
21
  connectionName: 'stripe';
@@ -101,26 +101,26 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
101
101
  }, "tenant/fetchExternalConnectionsFailure", never, never>, fetchExternalConnectionsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, externalConnections: ConnectionsPayload], {
102
102
  tenantId: string;
103
103
  externalConnections: ConnectionsPayload;
104
- }, "tenant/fetchExternalConnectionsSuccess", never, never>, saveAPIKeyConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "email" | "payments", connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook", credentials: {
104
+ }, "tenant/fetchExternalConnectionsSuccess", never, never>, saveAPIKeyConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "payments", connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal", credentials: {
105
105
  api_key: string;
106
106
  site: string;
107
107
  }], {
108
108
  tenantId: string;
109
109
  connectionId: string;
110
- connectionType: "revenue" | "email" | "payments";
111
- connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
110
+ connectionType: "revenue" | "payments";
111
+ connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
112
112
  credentials: {
113
113
  api_key: string;
114
114
  site: string;
115
115
  };
116
- }, "tenant/saveAPIKeyConnection", never, never>, saveAPIKeyConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "payments", connectionPayload: ConnectionDataPayload], {
116
+ }, "tenant/saveAPIKeyConnection", never, never>, saveAPIKeyConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "payments", connectionPayload: ConnectionDataPayload], {
117
117
  tenantId: string;
118
- connectionType: "revenue" | "email" | "payments";
118
+ connectionType: "revenue" | "payments";
119
119
  connectionPayload: ConnectionDataPayload;
120
120
  }, "tenant/saveAPIKeyConnectionSuccess", never, never>, saveAPIKeyConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
121
121
  tenantId: string;
122
122
  status: ZeniAPIStatus<Record<string, unknown>>;
123
- }, "tenant/saveAPIKeyConnectionFailure", never, never>, saveOAuthConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "email" | "payments", connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook", credentials: {
123
+ }, "tenant/saveAPIKeyConnectionFailure", never, never>, saveOAuthConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "payments", connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal", credentials: {
124
124
  authorization_code: string;
125
125
  client_id: string;
126
126
  client_secret: string;
@@ -128,35 +128,35 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
128
128
  }], {
129
129
  tenantId: string;
130
130
  connectionId: string;
131
- connectionType: "revenue" | "email" | "payments";
132
- connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
131
+ connectionType: "revenue" | "payments";
132
+ connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
133
133
  credentials: {
134
134
  authorization_code: string;
135
135
  client_id: string;
136
136
  client_secret: string;
137
137
  redirect_uri: string;
138
138
  };
139
- }, "tenant/saveOAuthConnection", never, never>, saveOAuthConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "payments", connectionPayload: ConnectionDataPayload], {
139
+ }, "tenant/saveOAuthConnection", never, never>, saveOAuthConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "payments", connectionPayload: ConnectionDataPayload], {
140
140
  tenantId: string;
141
- connectionType: "revenue" | "email" | "payments";
141
+ connectionType: "revenue" | "payments";
142
142
  connectionPayload: ConnectionDataPayload;
143
143
  }, "tenant/saveOAuthConnectionSuccess", never, never>, saveOAuthConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
144
144
  tenantId: string;
145
145
  status: ZeniAPIStatus<Record<string, unknown>>;
146
- }, "tenant/saveOAuthConnectionFailure", never, never>, saveConnectorCredentials: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "payments", args: ConnectorCredentialsBySlug], {
146
+ }, "tenant/saveOAuthConnectionFailure", never, never>, saveConnectorCredentials: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "payments", args: ConnectorCredentialsBySlug], {
147
147
  connectionName: "stripe";
148
148
  credentials: {
149
149
  api_key: string;
150
150
  };
151
151
  tenantId: string;
152
- connectionType: "revenue" | "email" | "payments";
152
+ connectionType: "revenue" | "payments";
153
153
  } | {
154
154
  connectionName: "mercury";
155
155
  credentials: {
156
156
  api_key: string;
157
157
  };
158
158
  tenantId: string;
159
- connectionType: "revenue" | "email" | "payments";
159
+ connectionType: "revenue" | "payments";
160
160
  } | {
161
161
  connectionName: "paypal";
162
162
  credentials: {
@@ -164,36 +164,24 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
164
164
  client_secret: string;
165
165
  };
166
166
  tenantId: string;
167
- connectionType: "revenue" | "email" | "payments";
168
- }, "tenant/saveConnectorCredentials", never, never>, saveConnectorCredentialsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "email" | "payments", connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook", connectionPayload: ConnectionDataPayload], {
167
+ connectionType: "revenue" | "payments";
168
+ }, "tenant/saveConnectorCredentials", never, never>, saveConnectorCredentialsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "revenue" | "payments", connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal", connectionPayload: ConnectionDataPayload], {
169
169
  tenantId: string;
170
- connectionType: "revenue" | "email" | "payments";
171
- connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
170
+ connectionType: "revenue" | "payments";
171
+ connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
172
172
  connectionPayload: ConnectionDataPayload;
173
- }, "tenant/saveConnectorCredentialsSuccess", never, never>, saveConnectorCredentialsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook", status: ZeniAPIStatus<Record<string, unknown>>], {
173
+ }, "tenant/saveConnectorCredentialsSuccess", never, never>, saveConnectorCredentialsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal", status: ZeniAPIStatus<Record<string, unknown>>], {
174
174
  tenantId: string;
175
- connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal" | "gmail" | "outlook";
175
+ connectionName: "chargebee" | "hubspot" | "stripe" | "mercury" | "paypal";
176
176
  status: ZeniAPIStatus<Record<string, unknown>>;
177
- }, "tenant/saveConnectorCredentialsFailure", never, never>, initEmailConnectOAuth: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider: "gmail" | "outlook", redirectAfterUrl: string], {
178
- tenantId: string;
179
- provider: "gmail" | "outlook";
180
- redirectAfterUrl: string;
181
- }, "tenant/initEmailConnectOAuth", never, never>, initEmailConnectOAuthSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider: "gmail" | "outlook", authorizationUrl: string], {
182
- tenantId: string;
183
- provider: "gmail" | "outlook";
184
- authorizationUrl: string;
185
- }, "tenant/initEmailConnectOAuthSuccess", never, never>, initEmailConnectOAuthFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, provider: "gmail" | "outlook", status: ZeniAPIStatus<Record<string, unknown>>], {
186
- tenantId: string;
187
- provider: "gmail" | "outlook";
188
- status: ZeniAPIStatus<Record<string, unknown>>;
189
- }, "tenant/initEmailConnectOAuthFailure", never, never>, deleteConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "email" | "payments"], {
177
+ }, "tenant/saveConnectorCredentialsFailure", never, never>, deleteConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "payments"], {
190
178
  tenantId: string;
191
179
  connectionId: string;
192
- connectionType: "revenue" | "email" | "payments";
193
- }, "tenant/deleteConnection", never, never>, deleteConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "email" | "payments"], {
180
+ connectionType: "revenue" | "payments";
181
+ }, "tenant/deleteConnection", never, never>, deleteConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue" | "payments"], {
194
182
  tenantId: string;
195
183
  connectionId: string;
196
- connectionType: "revenue" | "email" | "payments";
184
+ connectionType: "revenue" | "payments";
197
185
  }, "tenant/deleteConnectionSuccess", never, never>, deleteConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
198
186
  tenantId: string;
199
187
  status: ZeniAPIStatus<Record<string, unknown>>;
@@ -252,7 +240,6 @@ export declare const toRoleResource: (payload: RoleResourcePayload) => RoleResou
252
240
  */
253
241
  export declare function mapConnectionsPayloadToState(connectionsPayload: ConnectionsPayload): {
254
242
  accounting: Connection[];
255
- email: Connection[];
256
243
  payments: Connection[];
257
244
  revenue: Connection[];
258
245
  };