@zeniai/client-epic-state 5.0.1 → 5.0.2-betaRD2

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 (185) hide show
  1. package/lib/commonPayloadTypes/subAccountView/reportBySubAccountPayload.d.ts +2 -0
  2. package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.d.ts +13 -0
  3. package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +9 -0
  4. package/lib/commonStateTypes/common.d.ts +1 -1
  5. package/lib/commonStateTypes/projectView/projectViewParentID.d.ts +5 -0
  6. package/lib/commonStateTypes/projectView/projectViewParentID.js +2 -0
  7. package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
  8. package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +3 -1
  9. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  10. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  11. package/lib/entity/account/accountReducer.js +6 -3
  12. package/lib/entity/account/accountSelector.d.ts +7 -0
  13. package/lib/entity/account/accountSelector.js +4 -2
  14. package/lib/entity/account/accountState.d.ts +3 -1
  15. package/lib/entity/account/accountState.js +4 -1
  16. package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -0
  17. package/lib/entity/account/subAccountSelector.d.ts +2 -0
  18. package/lib/entity/account/subAccountSelector.js +2 -0
  19. package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -0
  20. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  21. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +44 -0
  22. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +55 -0
  23. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.d.ts +10 -0
  24. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +51 -0
  25. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +48 -0
  26. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +66 -0
  27. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.d.ts +52 -0
  28. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.js +37 -0
  29. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
  30. package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
  31. package/lib/entity/class/classReducer.d.ts +4 -4
  32. package/lib/entity/class/classState.d.ts +1 -1
  33. package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
  34. package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
  35. package/lib/entity/forecast/forecastState.d.ts +1 -1
  36. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  37. package/lib/entity/project/projectPayload.d.ts +13 -0
  38. package/lib/entity/project/projectPayload.js +30 -0
  39. package/lib/entity/project/projectReducer.d.ts +10 -0
  40. package/lib/entity/project/projectReducer.js +31 -0
  41. package/lib/entity/project/projectSelector.d.ts +5 -0
  42. package/lib/entity/project/projectSelector.js +12 -0
  43. package/lib/entity/project/projectState.d.ts +13 -0
  44. package/lib/entity/project/projectState.js +2 -0
  45. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  46. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  47. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  48. package/lib/entity/sectionProjectView/sectionProjectView.d.ts +11 -0
  49. package/lib/entity/sectionProjectView/sectionProjectView.js +6 -0
  50. package/lib/entity/sectionProjectView/sectionProjectViewEpic.d.ts +6 -0
  51. package/lib/entity/sectionProjectView/sectionProjectViewEpic.js +56 -0
  52. package/lib/entity/sectionProjectView/sectionProjectViewHelper.d.ts +10 -0
  53. package/lib/entity/sectionProjectView/sectionProjectViewHelper.js +14 -0
  54. package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +15 -0
  55. package/lib/entity/sectionProjectView/sectionProjectViewReducer.js +56 -0
  56. package/lib/entity/sectionProjectView/sectionProjectViewSelector.d.ts +11 -0
  57. package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +94 -0
  58. package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.d.ts +16 -0
  59. package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +2 -0
  60. package/lib/entity/sectionProjectView/sectionProjectViewState.d.ts +4 -0
  61. package/lib/entity/sectionProjectView/sectionProjectViewState.js +2 -0
  62. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  63. package/lib/entity/tenant/clearAllEpic.d.ts +7 -2
  64. package/lib/entity/tenant/clearAllEpic.js +10 -0
  65. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  66. package/lib/entity/tenant/tenantReducer.js +1 -0
  67. package/lib/entity/tenant/tenantSelector.d.ts +1 -0
  68. package/lib/entity/tenant/tenantSelector.js +9 -1
  69. package/lib/entity/tenant/tenantState.d.ts +1 -0
  70. package/lib/entity/transaction/payloadTypes/transactionPayload.js +0 -21
  71. package/lib/entity/userRole/userRoleType.d.ts +2 -2
  72. package/lib/epic.d.ts +8 -1
  73. package/lib/epic.js +8 -1
  74. package/lib/esm/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +5 -0
  75. package/lib/esm/commonStateTypes/projectView/projectViewParentID.js +1 -0
  76. package/lib/esm/commonStateTypes/viewAndReport/reportIDHelper.js +1 -0
  77. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  78. package/lib/esm/entity/account/accountReducer.js +6 -3
  79. package/lib/esm/entity/account/accountSelector.js +4 -2
  80. package/lib/esm/entity/account/accountState.js +4 -1
  81. package/lib/esm/entity/account/subAccountSelector.js +2 -0
  82. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +49 -0
  83. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +47 -0
  84. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +62 -0
  85. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerState.js +31 -0
  86. package/lib/esm/entity/project/projectPayload.js +26 -0
  87. package/lib/esm/entity/project/projectReducer.js +27 -0
  88. package/lib/esm/entity/project/projectSelector.js +8 -0
  89. package/lib/esm/entity/project/projectState.js +1 -0
  90. package/lib/esm/entity/sectionProjectView/sectionProjectView.js +3 -0
  91. package/lib/esm/entity/sectionProjectView/sectionProjectViewEpic.js +52 -0
  92. package/lib/esm/entity/sectionProjectView/sectionProjectViewHelper.js +10 -0
  93. package/lib/esm/entity/sectionProjectView/sectionProjectViewReducer.js +52 -0
  94. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +87 -0
  95. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +1 -0
  96. package/lib/esm/entity/sectionProjectView/sectionProjectViewState.js +1 -0
  97. package/lib/esm/entity/tenant/clearAllEpic.js +10 -0
  98. package/lib/esm/entity/tenant/tenantReducer.js +1 -0
  99. package/lib/esm/entity/tenant/tenantSelector.js +7 -0
  100. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +0 -21
  101. package/lib/esm/epic.js +8 -1
  102. package/lib/esm/index.js +14 -4
  103. package/lib/esm/reducer.js +15 -0
  104. package/lib/esm/view/aiAccountantView/aiAccountantViewPayload.js +2 -0
  105. package/lib/esm/view/aiAccountantView/aiAccountantViewReducer.js +149 -0
  106. package/lib/esm/view/aiAccountantView/aiAccountantViewSelector.js +72 -0
  107. package/lib/esm/view/aiAccountantView/aiAccountantViewState.js +11 -0
  108. package/lib/esm/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +46 -0
  109. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +27 -0
  110. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +47 -0
  111. package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +52 -0
  112. package/lib/esm/view/financeStatement/financeStatementSelector.js +12 -1
  113. package/lib/esm/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +47 -0
  114. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +30 -0
  115. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +1 -0
  116. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +113 -0
  117. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +65 -0
  118. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +1 -0
  119. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewState.js +1 -0
  120. package/lib/esm/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
  121. package/lib/index.d.ts +20 -4
  122. package/lib/index.js +73 -34
  123. package/lib/reducer.d.ts +15 -0
  124. package/lib/reducer.js +15 -0
  125. package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
  126. package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +31 -0
  127. package/lib/view/aiAccountantView/aiAccountantViewPayload.js +8 -0
  128. package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +29 -0
  129. package/lib/view/aiAccountantView/aiAccountantViewReducer.js +153 -0
  130. package/lib/view/aiAccountantView/aiAccountantViewSelector.d.ts +14 -0
  131. package/lib/view/aiAccountantView/aiAccountantViewSelector.js +78 -0
  132. package/lib/view/aiAccountantView/aiAccountantViewState.d.ts +26 -0
  133. package/lib/view/aiAccountantView/aiAccountantViewState.js +13 -0
  134. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +33 -0
  135. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +50 -0
  136. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +23 -0
  137. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +31 -0
  138. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +33 -0
  139. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +51 -0
  140. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +28 -0
  141. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +56 -0
  142. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  143. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  144. package/lib/view/cardBalance/cardBalanceSelector.d.ts +2 -1
  145. package/lib/view/cashBalance/cashBalanceSelector.d.ts +2 -1
  146. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  147. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  148. package/lib/view/companyView/types/cockpitTypes.d.ts +6 -5
  149. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  150. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  151. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -1
  152. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  153. package/lib/view/financeStatement/financeStatementSelector.d.ts +2 -0
  154. package/lib/view/financeStatement/financeStatementSelector.js +12 -1
  155. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  156. package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
  157. package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.d.ts +9 -0
  158. package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +51 -0
  159. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.d.ts +6 -0
  160. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +34 -0
  161. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.d.ts +33 -0
  162. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +2 -0
  163. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.d.ts +33 -0
  164. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +117 -0
  165. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.d.ts +9 -0
  166. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +69 -0
  167. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.d.ts +19 -0
  168. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +2 -0
  169. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.d.ts +22 -0
  170. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.js +2 -0
  171. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  172. package/lib/view/reportsResync/reportsClassViewRefetchingEpic.d.ts +2 -1
  173. package/lib/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
  174. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  175. package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
  176. package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
  177. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  178. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
  179. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -4
  180. package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
  181. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +3 -3
  182. package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
  183. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  184. package/lib/view/topEx/topExSelector.d.ts +1 -1
  185. package/package.json +1 -1
@@ -0,0 +1,48 @@
1
+ import { ID } from '../../commonStateTypes/common';
2
+ import { User } from '../user/userState';
3
+ import { UserState } from '../user/userState';
4
+ import { ZeniDate } from '../../zeniDayJS';
5
+ import { AiAccountantCustomerState, AiAccountantEnrollmentStatus, AiAccountantJobStatus, AiAccountantOperationType } from './aiAccountantCustomerState';
6
+ export interface AiAccountantEnrollmentView {
7
+ status: AiAccountantEnrollmentStatus;
8
+ accuracy?: Record<string, number>;
9
+ latestTraining?: ZeniDate;
10
+ latestTransactionSync?: ZeniDate;
11
+ offboardedAt?: ZeniDate;
12
+ offboardedBy?: User;
13
+ onboardedAt?: ZeniDate;
14
+ onboardedBy?: User;
15
+ validationResults?: Array<{
16
+ accuracy: number;
17
+ modelType: string;
18
+ passed: boolean;
19
+ threshold: number;
20
+ }>;
21
+ }
22
+ export interface AiAccountantCustomerView {
23
+ averageAccuracy: number;
24
+ companyId: ID;
25
+ companyName: string;
26
+ tenantId: ID;
27
+ bookcloseDate?: ZeniDate;
28
+ enrollment?: AiAccountantEnrollmentView;
29
+ }
30
+ export interface AiAccountantJobView {
31
+ companyId: ID;
32
+ createdAt: ZeniDate;
33
+ jobId: ID;
34
+ operationType: AiAccountantOperationType;
35
+ status: AiAccountantJobStatus;
36
+ tenantId: ID;
37
+ companyNamespace?: string;
38
+ completedAt?: ZeniDate;
39
+ errorMessage?: string;
40
+ parameters?: Record<string, unknown>;
41
+ retryCount?: number;
42
+ startedAt?: ZeniDate;
43
+ steps?: Array<Record<string, unknown>>;
44
+ triggeredBy?: User;
45
+ validationResults?: Array<Record<string, unknown>>;
46
+ }
47
+ export declare function getAiAccountantCustomers(customerState: AiAccountantCustomerState, userState: UserState): AiAccountantCustomerView[];
48
+ export declare function getAiAccountantJobsByTenantId(customerState: AiAccountantCustomerState, userState: UserState, tenantId: string): AiAccountantJobView[];
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAiAccountantCustomers = getAiAccountantCustomers;
4
+ exports.getAiAccountantJobsByTenantId = getAiAccountantJobsByTenantId;
5
+ const userSelector_1 = require("../user/userSelector");
6
+ // ── Selectors ──
7
+ function getAiAccountantCustomers(customerState, userState) {
8
+ return Object.values(customerState.customerByTenantId).map((customer) => toCustomerView(customer, userState));
9
+ }
10
+ function getAiAccountantJobsByTenantId(customerState, userState, tenantId) {
11
+ const jobs = customerState.jobsByTenantId[tenantId] ?? [];
12
+ return jobs.map((job) => toJobView(job, userState));
13
+ }
14
+ // ── Helpers ──
15
+ function toCustomerView(customer, userState) {
16
+ return {
17
+ averageAccuracy: calcAverageAccuracy(customer),
18
+ companyId: customer.companyId,
19
+ companyName: customer.companyName,
20
+ tenantId: customer.tenantId,
21
+ bookcloseDate: customer.bookcloseDate,
22
+ enrollment: customer.enrollment != null
23
+ ? {
24
+ ...customer.enrollment,
25
+ offboardedBy: customer.enrollment.offboardedBy != null
26
+ ? (0, userSelector_1.getUserByUserId)(userState, customer.enrollment.offboardedBy)
27
+ : undefined,
28
+ onboardedBy: customer.enrollment.onboardedBy != null
29
+ ? (0, userSelector_1.getUserByUserId)(userState, customer.enrollment.onboardedBy)
30
+ : undefined,
31
+ }
32
+ : undefined,
33
+ };
34
+ }
35
+ function toJobView(job, userState) {
36
+ return {
37
+ companyId: job.companyId,
38
+ createdAt: job.createdAt,
39
+ jobId: job.jobId,
40
+ operationType: job.operationType,
41
+ status: job.status,
42
+ tenantId: job.tenantId,
43
+ triggeredBy: job.triggeredBy != null
44
+ ? (0, userSelector_1.getUserByUserId)(userState, job.triggeredBy)
45
+ : undefined,
46
+ companyNamespace: job.companyNamespace,
47
+ completedAt: job.completedAt,
48
+ errorMessage: job.errorMessage,
49
+ parameters: job.parameters,
50
+ retryCount: job.retryCount,
51
+ startedAt: job.startedAt,
52
+ steps: job.steps,
53
+ validationResults: job.validationResults,
54
+ };
55
+ }
56
+ function calcAverageAccuracy(customer) {
57
+ const accuracy = customer.enrollment?.accuracy;
58
+ if (accuracy == null) {
59
+ return 0;
60
+ }
61
+ const values = Object.values(accuracy);
62
+ if (values.length === 0) {
63
+ return 0;
64
+ }
65
+ return values.reduce((sum, value) => sum + value, 0) / values.length;
66
+ }
@@ -0,0 +1,52 @@
1
+ import { ID } from '../../commonStateTypes/common';
2
+ import { ZeniDate } from '../../zeniDayJS';
3
+ export declare const toAiAccountantOperationType: (v: string) => "onboard" | "offboard" | "retrain" | "full_pipeline" | "cancel_onboarding";
4
+ export type AiAccountantOperationType = ReturnType<typeof toAiAccountantOperationType>;
5
+ export declare const toAiAccountantEnrollmentStatus: (v: string) => "onboarding" | "error" | "active" | "pending" | "offboarding" | "offboarded" | "failed";
6
+ export type AiAccountantEnrollmentStatus = ReturnType<typeof toAiAccountantEnrollmentStatus>;
7
+ export declare const toAiAccountantJobStatus: (v: string) => "failed" | "queued" | "running" | "completed" | "cancelled" | "retried";
8
+ export type AiAccountantJobStatus = ReturnType<typeof toAiAccountantJobStatus>;
9
+ export interface AiAccountantEnrollment {
10
+ status: AiAccountantEnrollmentStatus;
11
+ accuracy?: Record<string, number>;
12
+ latestTraining?: ZeniDate;
13
+ latestTransactionSync?: ZeniDate;
14
+ offboardedAt?: ZeniDate;
15
+ offboardedBy?: ID;
16
+ onboardedAt?: ZeniDate;
17
+ onboardedBy?: ID;
18
+ validationResults?: Array<{
19
+ accuracy: number;
20
+ modelType: string;
21
+ passed: boolean;
22
+ threshold: number;
23
+ }>;
24
+ }
25
+ export interface AiAccountantJob {
26
+ companyId: ID;
27
+ createdAt: ZeniDate;
28
+ jobId: ID;
29
+ operationType: AiAccountantOperationType;
30
+ status: AiAccountantJobStatus;
31
+ tenantId: ID;
32
+ triggeredBy: ID;
33
+ companyNamespace?: string;
34
+ completedAt?: ZeniDate;
35
+ errorMessage?: string;
36
+ parameters?: Record<string, unknown>;
37
+ retryCount?: number;
38
+ startedAt?: ZeniDate;
39
+ steps?: Array<Record<string, unknown>>;
40
+ validationResults?: Array<Record<string, unknown>>;
41
+ }
42
+ export interface AiAccountantCustomer {
43
+ companyId: ID;
44
+ companyName: string;
45
+ tenantId: ID;
46
+ bookcloseDate?: ZeniDate;
47
+ enrollment?: AiAccountantEnrollment;
48
+ }
49
+ export interface AiAccountantCustomerState {
50
+ customerByTenantId: Record<ID, AiAccountantCustomer>;
51
+ jobsByTenantId: Record<ID, AiAccountantJob[]>;
52
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toAiAccountantJobStatus = exports.toAiAccountantEnrollmentStatus = exports.toAiAccountantOperationType = void 0;
4
+ const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
5
+ // ── Operation Type ──
6
+ const ALL_OPERATION_TYPES = [
7
+ 'onboard',
8
+ 'offboard',
9
+ 'retrain',
10
+ 'full_pipeline',
11
+ 'cancel_onboarding',
12
+ ];
13
+ const toAiAccountantOperationType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_OPERATION_TYPES);
14
+ exports.toAiAccountantOperationType = toAiAccountantOperationType;
15
+ // ── Enrollment Status ──
16
+ const ALL_ENROLLMENT_STATUSES = [
17
+ 'active',
18
+ 'pending',
19
+ 'onboarding',
20
+ 'offboarding',
21
+ 'offboarded',
22
+ 'failed',
23
+ 'error',
24
+ ];
25
+ const toAiAccountantEnrollmentStatus = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_ENROLLMENT_STATUSES);
26
+ exports.toAiAccountantEnrollmentStatus = toAiAccountantEnrollmentStatus;
27
+ // ── Job Status ──
28
+ const ALL_JOB_STATUSES = [
29
+ 'queued',
30
+ 'running',
31
+ 'completed',
32
+ 'failed',
33
+ 'cancelled',
34
+ 'retried',
35
+ ];
36
+ const toAiAccountantJobStatus = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_JOB_STATUSES);
37
+ exports.toAiAccountantJobStatus = toAiAccountantJobStatus;
@@ -111,9 +111,9 @@ export interface BulkProcessingDetail {
111
111
  }
112
112
  declare const toBillStageCodeType: (v: string) => "paid" | "pending_approval" | "scheduled" | "draft";
113
113
  export type BillStageCodeType = ReturnType<typeof toBillStageCodeType>;
114
- declare const toBillPaymentStatusCodeType: (v: string) => "failed" | "paid" | "returned" | "processing" | "posted" | "cancelled" | "pending_vendor_action" | "awaiting_to_be_marked_as_paid" | "mark_as_paid";
114
+ declare const toBillPaymentStatusCodeType: (v: string) => "failed" | "cancelled" | "paid" | "returned" | "processing" | "posted" | "pending_vendor_action" | "awaiting_to_be_marked_as_paid" | "mark_as_paid";
115
115
  export type BillPaymentStatusCodeType = ReturnType<typeof toBillPaymentStatusCodeType>;
116
- declare const toBillPaymentRefundStatusCodeType: (v: string) => "failed" | "returned" | "processing" | "cancelled" | "completed";
116
+ declare const toBillPaymentRefundStatusCodeType: (v: string) => "failed" | "completed" | "cancelled" | "returned" | "processing";
117
117
  export type BillPaymentRefundStatusCodeType = ReturnType<typeof toBillPaymentRefundStatusCodeType>;
118
118
  declare const toBillStatusCodeType: (v: string) => "approved" | "rejected" | "pending_approval" | "initiated";
119
119
  export type BillStatusCodeType = ReturnType<typeof toBillStatusCodeType>;
@@ -54,7 +54,7 @@ export interface CardActivationOrPinChangeAttemptHistory {
54
54
  timestamp: ZeniDate;
55
55
  userId: ID;
56
56
  }
57
- export declare const toCardActivationOrPinUpdateEventCodeType: (v: string) => "success" | "failed";
57
+ export declare const toCardActivationOrPinUpdateEventCodeType: (v: string) => "failed" | "success";
58
58
  export type CardActivationOrPinUpdateEventCodeType = ReturnType<typeof toCardActivationOrPinUpdateEventCodeType>;
59
59
  export interface ChargeCardState {
60
60
  chargeCardByID: Record<ID, ChargeCard>;
@@ -5,15 +5,15 @@ import { UpdateType } from '../../commonStateTypes/common';
5
5
  import { ClassBasePayload } from './classPayload';
6
6
  import { ClassBase, ClassState } from './classState';
7
7
  export declare const initialState: ClassState;
8
- export declare const updateClasses: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation", payload: ClassBasePayload[], classesViewParentId?: ClassesViewParentID | undefined, updateType?: UpdateType | undefined], ClassBasePayload[], "class/updateClasses", never, {
9
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
8
+ export declare const updateClasses: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation", payload: ClassBasePayload[], classesViewParentId?: ClassesViewParentID | undefined, updateType?: UpdateType | undefined], ClassBasePayload[], "class/updateClasses", never, {
9
+ reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
10
10
  classesViewParentId: ClassesViewParentID | undefined;
11
11
  updateType: UpdateType;
12
- }>, updateClassesWithBalancesV2: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation", timeframe: "month" | "year" | "quarter", sectionId: string, classMetadataWithBalancesPayloads: ClassMetadataWithBalancesPayloadV2[], currencyPayload: CurrencyPayload], {
12
+ }>, updateClassesWithBalancesV2: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation", timeframe: "month" | "year" | "quarter", sectionId: string, classMetadataWithBalancesPayloads: ClassMetadataWithBalancesPayloadV2[], currencyPayload: CurrencyPayload], {
13
13
  classMetadataWithBalancesPayloads: ClassMetadataWithBalancesPayloadV2[];
14
14
  currencyPayload: CurrencyPayload;
15
15
  }, "class/updateClassesWithBalancesV2", never, {
16
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
16
+ reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
17
17
  sectionId: string;
18
18
  timeframe: "month" | "year" | "quarter";
19
19
  }>, clearAllClasses: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"class/clearAllClasses">;
@@ -32,7 +32,7 @@ export interface Class extends ClassBase {
32
32
  classesViewParentId?: ClassesViewParentID;
33
33
  nestedAccountIds?: NestedAccountIDHierarchy[];
34
34
  }
35
- export declare function getClassKey(reportId: ReportID, classId: ID, parentId?: ClassesViewParentID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card` | `${string}-excluded_account_reconciliation`;
35
+ export declare function getClassKey(reportId: ReportID, classId: ID, parentId?: ClassesViewParentID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-profit_and_loss_by_projects` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card` | `${string}-excluded_account_reconciliation`;
36
36
  export type ClassKey = ReturnType<typeof getClassKey>;
37
37
  export interface ClassState {
38
38
  classesByKey: Record<ClassKey, Class>;
@@ -28,6 +28,6 @@ export interface DepositAccountTransactionState {
28
28
  }
29
29
  export declare const toDepositAccountTransactionType: (v: string) => "wire" | "purchase" | "originated_ach" | "ach_originating" | "received_ach" | "returned_ach" | "dishonored_ach" | "book" | "atm" | "fee" | "reversal" | "card_transaction" | "batch_release" | "dispute" | "adjustment" | "interest" | "check_deposit" | "returned_check_deposit" | "payment_canceled";
30
30
  type DepositAccountTransactionType = ReturnType<typeof toDepositAccountTransactionType>;
31
- export declare const toDepositTransactionStatusCode: (v: string) => "rejected" | "pending" | "failed" | "returned" | "pending_review" | "canceled" | "clearing" | "sent" | undefined;
31
+ export declare const toDepositTransactionStatusCode: (v: string) => "pending" | "failed" | "rejected" | "returned" | "pending_review" | "canceled" | "clearing" | "sent" | undefined;
32
32
  export type DepositTransactionStatusCode = ReturnType<typeof toDepositTransactionStatusCode>;
33
33
  export {};
@@ -7,10 +7,10 @@ export declare const toEntityType: (v: string) => "bill_pay" | "reimbursement" |
7
7
  export type EntityType = ReturnType<typeof toEntityType>;
8
8
  export declare const toEntityTypeWithOtherConnection: (v: string) => "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "other_connection";
9
9
  export type EntityTypeWithOtherConnection = ReturnType<typeof toEntityTypeWithOtherConnection>;
10
- declare const toEntityApprovalStatusCode: (v: string) => "approved" | "rejected" | "pending";
10
+ declare const toEntityApprovalStatusCode: (v: string) => "pending" | "approved" | "rejected";
11
11
  type EntityApprovalStatusCode = ReturnType<typeof toEntityApprovalStatusCode>;
12
12
  export declare const toEntityApprovalStatusCodeStrict: (v: string | null) => EntityApprovalStatusCode | undefined;
13
- export declare const toActivityStatus: (v: string) => "approved" | "rejected" | "pending" | "notified";
13
+ export declare const toActivityStatus: (v: string) => "pending" | "approved" | "rejected" | "notified";
14
14
  export type ActivityStatus = ReturnType<typeof toActivityStatus>;
15
15
  export interface Actor {
16
16
  isImplicitActor: boolean;
@@ -3,7 +3,7 @@ import { TimeframeTick } from '../../commonStateTypes/timeframeTick';
3
3
  import { ReportID } from '../../commonStateTypes/viewAndReport/viewAndReport';
4
4
  import { ZeniDate } from '../../zeniDayJS';
5
5
  export type ForecastType = ReportID;
6
- export declare const toForecastType: (v: string) => "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
6
+ export declare const toForecastType: (v: string) => "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
7
7
  export interface Forecast {
8
8
  createTime: ZeniDate;
9
9
  forecastPeriod: TimeframeTick;
@@ -12,7 +12,7 @@ export type ScheduleTypes = ReturnType<typeof toScheduleTypesType>;
12
12
  export declare const toScheduleTypesTypeStrict: (v?: string) => "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue" | undefined;
13
13
  export declare const toScheduleJournalEntryStatusCodeType: (v: string) => "pending" | "posted" | "unknown" | "canceled" | "recorded";
14
14
  export type ScheduleJournalEntryStatusCodeType = ReturnType<typeof toScheduleJournalEntryStatusCodeType>;
15
- export declare const toScheduleStatusCodeType: (v: string) => "draft" | "completed" | "new" | "ongoing" | "marked_as_completed";
15
+ export declare const toScheduleStatusCodeType: (v: string) => "completed" | "draft" | "new" | "ongoing" | "marked_as_completed";
16
16
  export type ScheduleStatusCodeType = ReturnType<typeof toScheduleStatusCodeType>;
17
17
  export declare const toJournalEntryErrorCodeType: (v: string) => "vendor_deleted" | "debit_category_deleted" | "credit_category_deleted" | "qbo_error" | "qbo_authorization_error" | "qbo_invalid_company_status_error" | "qbo_book_close_date_error";
18
18
  export type JournalEntryErrorCodeType = ReturnType<typeof toJournalEntryErrorCodeType>;
@@ -0,0 +1,13 @@
1
+ import { Project } from './projectState';
2
+ export interface ProjectMetadataPayload {
3
+ accounting_provider_project_customer_id: string | null;
4
+ accounting_provider_project_id: string | null;
5
+ parent_customer_accounting_provider_id: string | null;
6
+ project_name: string;
7
+ start_date: string | null;
8
+ status: string | null;
9
+ zeni_parent_customer_id: string | null;
10
+ zeni_project_customer_id: string | null;
11
+ zeni_project_id: string;
12
+ }
13
+ export declare const mapProjectMetadataPayloadToProject: (payload: ProjectMetadataPayload) => Project;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapProjectMetadataPayloadToProject = void 0;
4
+ const zeniDayJS_1 = require("../../zeniDayJS");
5
+ const mapProjectMetadataPayloadToProject = (payload) => ({
6
+ projectId: payload.zeni_project_id,
7
+ projectName: payload.project_name,
8
+ ...(payload.status != null ? { status: payload.status } : {}),
9
+ ...(payload.start_date != null ? { startDate: (0, zeniDayJS_1.date)(payload.start_date) } : {}),
10
+ ...(payload.parent_customer_accounting_provider_id != null
11
+ ? {
12
+ parentCustomerAccountingProviderId: payload.parent_customer_accounting_provider_id,
13
+ }
14
+ : {}),
15
+ ...(payload.accounting_provider_project_customer_id != null
16
+ ? {
17
+ accountingProviderProjectCustomerId: payload.accounting_provider_project_customer_id,
18
+ }
19
+ : {}),
20
+ ...(payload.accounting_provider_project_id != null
21
+ ? { accountingProviderProjectId: payload.accounting_provider_project_id }
22
+ : {}),
23
+ ...(payload.zeni_parent_customer_id != null
24
+ ? { zeniParentCustomerId: payload.zeni_parent_customer_id }
25
+ : {}),
26
+ ...(payload.zeni_project_customer_id != null
27
+ ? { zeniProjectCustomerId: payload.zeni_project_customer_id }
28
+ : {}),
29
+ });
30
+ exports.mapProjectMetadataPayloadToProject = mapProjectMetadataPayloadToProject;
@@ -0,0 +1,10 @@
1
+ import { ID } from '../../commonStateTypes/common';
2
+ import { ProjectMetadataPayload } from './projectPayload';
3
+ import { Project } from './projectState';
4
+ export interface ProjectState {
5
+ projects: Record<ID, Project>;
6
+ }
7
+ export declare const initialState: ProjectState;
8
+ export declare const updateProjects: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: ProjectMetadataPayload[]], ProjectMetadataPayload[], "project/updateProjects", never, never>, clearAllProjects: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"project/clearAllProjects">;
9
+ declare const _default: import("redux").Reducer<ProjectState>;
10
+ export default _default;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.clearAllProjects = exports.updateProjects = exports.initialState = void 0;
5
+ const toolkit_1 = require("@reduxjs/toolkit");
6
+ const projectPayload_1 = require("./projectPayload");
7
+ exports.initialState = {
8
+ projects: {},
9
+ };
10
+ const projectSlice = (0, toolkit_1.createSlice)({
11
+ name: 'project',
12
+ initialState: exports.initialState,
13
+ reducers: {
14
+ updateProjects: {
15
+ reducer(draft, action) {
16
+ action.payload.forEach((projectPayload) => {
17
+ const project = (0, projectPayload_1.mapProjectMetadataPayloadToProject)(projectPayload);
18
+ draft.projects[project.projectId] = project;
19
+ });
20
+ },
21
+ prepare(payload) {
22
+ return { payload };
23
+ },
24
+ },
25
+ clearAllProjects(draft) {
26
+ Object.assign(draft, exports.initialState);
27
+ },
28
+ },
29
+ });
30
+ _a = projectSlice.actions, exports.updateProjects = _a.updateProjects, exports.clearAllProjects = _a.clearAllProjects;
31
+ exports.default = projectSlice.reducer;
@@ -0,0 +1,5 @@
1
+ import { ID } from '../../commonStateTypes/common';
2
+ import { ProjectState } from './projectReducer';
3
+ import { Project } from './projectState';
4
+ export declare function getProjectById(projectState: ProjectState, projectId: ID): Project | undefined;
5
+ export declare function getProjectsByIds(projectState: ProjectState, projectIds: ID[]): Project[];
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getProjectById = getProjectById;
4
+ exports.getProjectsByIds = getProjectsByIds;
5
+ function getProjectById(projectState, projectId) {
6
+ return projectState.projects[projectId];
7
+ }
8
+ function getProjectsByIds(projectState, projectIds) {
9
+ return projectIds
10
+ .map((projectId) => getProjectById(projectState, projectId))
11
+ .filter((project) => project != null);
12
+ }
@@ -0,0 +1,13 @@
1
+ import { ID } from '../../commonStateTypes/common';
2
+ import { ZeniDate } from '../../zeniDayJS';
3
+ export interface Project {
4
+ projectId: ID;
5
+ projectName: string;
6
+ accountingProviderProjectCustomerId?: ID;
7
+ accountingProviderProjectId?: ID;
8
+ parentCustomerAccountingProviderId?: ID;
9
+ startDate?: ZeniDate;
10
+ status?: string;
11
+ zeniParentCustomerId?: ID;
12
+ zeniProjectCustomerId?: ID;
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -10,5 +10,5 @@ export interface SectionAccountsView {
10
10
  sectionId: ID;
11
11
  balancesByPeriod?: COABalanceGroupedByPeriod;
12
12
  }
13
- export declare function getSectionAccountViewKey(sectionId: ID, reportId: ReportIDPlusForecastID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card` | `${string}-excluded_account_reconciliation` | `${string}-cash_balance+${string}` | `${string}-card_balance+${string}` | `${string}-expense_automation_card+${string}` | `${string}-operating_expenses+${string}` | `${string}-operating_expenses_by_classes+${string}` | `${string}-revenue+${string}` | `${string}-revenue_by_classes+${string}` | `${string}-net_burn_or_income+${string}` | `${string}-net_burn_or_income_story_card+${string}` | `${string}-net_burn_or_income_by_classes+${string}` | `${string}-cash_position+${string}` | `${string}-top_expenses+${string}` | `${string}-profit_and_loss+${string}` | `${string}-profit_and_loss_by_classes+${string}` | `${string}-balance_sheet+${string}` | `${string}-cash_flow+${string}` | `${string}-dashboard+${string}` | `${string}-finance_statement+${string}` | `${string}-transaction_list_of_account+${string}` | `${string}-transaction_list_missing_receipt+${string}` | `${string}-transaction_list_of_account_by_class+${string}` | `${string}-transaction_detail+${string}` | `${string}-cash_in_cash_out+${string}` | `${string}-insights_dashboard+${string}` | `${string}-company_details+${string}` | `${string}-class_list+${string}` | `${string}-account_list+${string}` | `${string}-account_list_by_type+${string}` | `${string}-vendor+${string}` | `${string}-task_card+${string}` | `${string}-bill_pay+${string}` | `${string}-reimbursement+${string}` | `${string}-bill_pay_card+${string}` | `${string}-reimbursement_card+${string}` | `${string}-bill_pay_promo_card+${string}` | `${string}-zeni_accounts+${string}` | `${string}-zeni_accounts_promo_card+${string}` | `${string}-zeni_treasury+${string}` | `${string}-charge_cards+${string}` | `${string}-other_connection+${string}` | `${string}-reimbursement_promo_card+${string}` | `${string}-onboarding+${string}` | `${string}-operating_expenses_by_vendor+${string}` | `${string}-operating_expenses_by_vendor_summary+${string}` | `${string}-vendors_tab+${string}` | `${string}-accounts_payable_aging+${string}` | `${string}-accounts_receivable_aging+${string}` | `${string}-vendor_global_review+${string}` | `${string}-prepaid_expenses+${string}` | `${string}-fixed_assets+${string}` | `${string}-notification+${string}` | `${string}-rewards_card+${string}` | `${string}-billing+${string}` | `${string}-flux_analysis_operating_expense+${string}` | `${string}-account_reconciliation+${string}` | `${string}-zeni_credit_promo_card+${string}` | `${string}-treasury_promo_card+${string}` | `${string}-excluded_account_reconciliation+${string}`;
13
+ export declare function getSectionAccountViewKey(sectionId: ID, reportId: ReportIDPlusForecastID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-profit_and_loss_by_projects` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card` | `${string}-excluded_account_reconciliation` | `${string}-cash_balance+${string}` | `${string}-card_balance+${string}` | `${string}-expense_automation_card+${string}` | `${string}-operating_expenses+${string}` | `${string}-operating_expenses_by_classes+${string}` | `${string}-revenue+${string}` | `${string}-revenue_by_classes+${string}` | `${string}-net_burn_or_income+${string}` | `${string}-net_burn_or_income_story_card+${string}` | `${string}-net_burn_or_income_by_classes+${string}` | `${string}-cash_position+${string}` | `${string}-top_expenses+${string}` | `${string}-profit_and_loss+${string}` | `${string}-profit_and_loss_by_classes+${string}` | `${string}-profit_and_loss_by_projects+${string}` | `${string}-balance_sheet+${string}` | `${string}-cash_flow+${string}` | `${string}-dashboard+${string}` | `${string}-finance_statement+${string}` | `${string}-transaction_list_of_account+${string}` | `${string}-transaction_list_missing_receipt+${string}` | `${string}-transaction_list_of_account_by_class+${string}` | `${string}-transaction_detail+${string}` | `${string}-cash_in_cash_out+${string}` | `${string}-insights_dashboard+${string}` | `${string}-company_details+${string}` | `${string}-class_list+${string}` | `${string}-account_list+${string}` | `${string}-account_list_by_type+${string}` | `${string}-vendor+${string}` | `${string}-task_card+${string}` | `${string}-bill_pay+${string}` | `${string}-reimbursement+${string}` | `${string}-bill_pay_card+${string}` | `${string}-reimbursement_card+${string}` | `${string}-bill_pay_promo_card+${string}` | `${string}-zeni_accounts+${string}` | `${string}-zeni_accounts_promo_card+${string}` | `${string}-zeni_treasury+${string}` | `${string}-charge_cards+${string}` | `${string}-other_connection+${string}` | `${string}-reimbursement_promo_card+${string}` | `${string}-onboarding+${string}` | `${string}-operating_expenses_by_vendor+${string}` | `${string}-operating_expenses_by_vendor_summary+${string}` | `${string}-vendors_tab+${string}` | `${string}-accounts_payable_aging+${string}` | `${string}-accounts_receivable_aging+${string}` | `${string}-vendor_global_review+${string}` | `${string}-prepaid_expenses+${string}` | `${string}-fixed_assets+${string}` | `${string}-notification+${string}` | `${string}-rewards_card+${string}` | `${string}-billing+${string}` | `${string}-flux_analysis_operating_expense+${string}` | `${string}-account_reconciliation+${string}` | `${string}-zeni_credit_promo_card+${string}` | `${string}-treasury_promo_card+${string}` | `${string}-excluded_account_reconciliation+${string}`;
14
14
  export type SectionAccountKey = ReturnType<typeof getSectionAccountViewKey>;
@@ -8,5 +8,5 @@ export interface SectionClassesView {
8
8
  sectionId: ID;
9
9
  balancesByPeriod?: COABalanceGroupedByPeriod;
10
10
  }
11
- export declare function getSectionClassesViewKey(sectionId: ID, reportId: ReportID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card` | `${string}-excluded_account_reconciliation`;
11
+ export declare function getSectionClassesViewKey(sectionId: ID, reportId: ReportID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-expense_automation_card` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-profit_and_loss_by_projects` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-zeni_treasury` | `${string}-charge_cards` | `${string}-other_connection` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-flux_analysis_operating_expense` | `${string}-account_reconciliation` | `${string}-zeni_credit_promo_card` | `${string}-treasury_promo_card` | `${string}-excluded_account_reconciliation`;
12
12
  export type SectionClassesKey = ReturnType<typeof getSectionClassesViewKey>;
@@ -4,9 +4,9 @@ import { AccountMetadataPayload } from '../account/accountPayload';
4
4
  import { ClassMetadataPayload } from '../class/classPayload';
5
5
  import { SectionClassesViewStateV2 } from './sectionClassesViewState';
6
6
  export declare const initialState: SectionClassesViewStateV2;
7
- export declare const updateSectionClassesView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[timeframe: "month" | "year" | "quarter", sectionId: string, reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation", sectionPayload: SectionByClassCOABalanceGroupedPayloadV2, classesMetadataPayload: ClassMetadataPayload[], accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
7
+ export declare const updateSectionClassesView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[timeframe: "month" | "year" | "quarter", sectionId: string, reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation", sectionPayload: SectionByClassCOABalanceGroupedPayloadV2, classesMetadataPayload: ClassMetadataPayload[], accountsMetadataPayload: AccountMetadataPayload[], currencyPayload: CurrencyPayload], {
8
8
  timeframe: "month" | "year" | "quarter";
9
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
9
+ reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation";
10
10
  sectionId: string;
11
11
  sectionPayload: SectionByClassCOABalanceGroupedPayloadV2;
12
12
  classesMetadataPayload: ClassMetadataPayload[];
@@ -0,0 +1,11 @@
1
+ import { COABalanceGroupedByPeriod } from '../../commonStateTypes/coaBalance/coaBalance';
2
+ import { ID } from '../../commonStateTypes/common';
3
+ import { ReportID } from '../../commonStateTypes/viewAndReport/viewAndReport';
4
+ export interface SectionProjectView {
5
+ key: SectionProjectKey;
6
+ projectId: ID;
7
+ sectionId: ID;
8
+ balancesByPeriod?: COABalanceGroupedByPeriod;
9
+ }
10
+ export declare function getSectionProjectViewKey(sectionId: ID, projectId: ID, reportId: ReportID): `${string}-${string}-cash_balance` | `${string}-${string}-card_balance` | `${string}-${string}-expense_automation_card` | `${string}-${string}-operating_expenses` | `${string}-${string}-operating_expenses_by_classes` | `${string}-${string}-revenue` | `${string}-${string}-revenue_by_classes` | `${string}-${string}-net_burn_or_income` | `${string}-${string}-net_burn_or_income_story_card` | `${string}-${string}-net_burn_or_income_by_classes` | `${string}-${string}-cash_position` | `${string}-${string}-top_expenses` | `${string}-${string}-profit_and_loss` | `${string}-${string}-profit_and_loss_by_classes` | `${string}-${string}-profit_and_loss_by_projects` | `${string}-${string}-balance_sheet` | `${string}-${string}-cash_flow` | `${string}-${string}-dashboard` | `${string}-${string}-finance_statement` | `${string}-${string}-transaction_list_of_account` | `${string}-${string}-transaction_list_missing_receipt` | `${string}-${string}-transaction_list_of_account_by_class` | `${string}-${string}-transaction_detail` | `${string}-${string}-cash_in_cash_out` | `${string}-${string}-insights_dashboard` | `${string}-${string}-company_details` | `${string}-${string}-class_list` | `${string}-${string}-account_list` | `${string}-${string}-account_list_by_type` | `${string}-${string}-vendor` | `${string}-${string}-task_card` | `${string}-${string}-bill_pay` | `${string}-${string}-reimbursement` | `${string}-${string}-bill_pay_card` | `${string}-${string}-reimbursement_card` | `${string}-${string}-bill_pay_promo_card` | `${string}-${string}-zeni_accounts` | `${string}-${string}-zeni_accounts_promo_card` | `${string}-${string}-zeni_treasury` | `${string}-${string}-charge_cards` | `${string}-${string}-other_connection` | `${string}-${string}-reimbursement_promo_card` | `${string}-${string}-onboarding` | `${string}-${string}-operating_expenses_by_vendor` | `${string}-${string}-operating_expenses_by_vendor_summary` | `${string}-${string}-vendors_tab` | `${string}-${string}-accounts_payable_aging` | `${string}-${string}-accounts_receivable_aging` | `${string}-${string}-vendor_global_review` | `${string}-${string}-prepaid_expenses` | `${string}-${string}-fixed_assets` | `${string}-${string}-notification` | `${string}-${string}-rewards_card` | `${string}-${string}-billing` | `${string}-${string}-flux_analysis_operating_expense` | `${string}-${string}-account_reconciliation` | `${string}-${string}-zeni_credit_promo_card` | `${string}-${string}-treasury_promo_card` | `${string}-${string}-excluded_account_reconciliation`;
11
+ export type SectionProjectKey = ReturnType<typeof getSectionProjectViewKey>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSectionProjectViewKey = getSectionProjectViewKey;
4
+ function getSectionProjectViewKey(sectionId, projectId, reportId) {
5
+ return `${sectionId}-${projectId}-${reportId}`;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { ActionsObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { updateMultipleSubAccountsWithBalances } from '../account/accountReducer';
4
+ import { updateSectionProjectView } from './sectionProjectViewReducer';
5
+ export type ActionType = ReturnType<typeof updateSectionProjectView> | ReturnType<typeof updateMultipleSubAccountsWithBalances>;
6
+ export declare const updateSectionProjectViewEpic: (actions$: ActionsObservable<ActionType>) => Observable<ActionType>;