@zeniai/client-epic-state 5.0.2 → 5.0.3-betaND1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +44 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +55 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.d.ts +10 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +51 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +48 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +66 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.d.ts +52 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.js +37 -0
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
- package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
- package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/tenant/clearAllEpic.d.ts +3 -1
- package/lib/entity/tenant/clearAllEpic.js +4 -0
- package/lib/entity/userRole/userRoleType.d.ts +2 -2
- package/lib/epic.d.ts +5 -1
- package/lib/epic.js +5 -1
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +49 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +47 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +62 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerState.js +31 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +4 -0
- package/lib/esm/epic.js +5 -1
- package/lib/esm/index.js +7 -0
- package/lib/esm/reducer.js +6 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewPayload.js +2 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewReducer.js +149 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewSelector.js +72 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewState.js +11 -0
- package/lib/esm/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +46 -0
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +27 -0
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +47 -0
- package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +52 -0
- package/lib/esm/view/taskManager/taskListView/epics/fetchTaskListEpic.js +6 -3
- package/lib/esm/view/taskManager/taskListView/taskListPayload.js +5 -1
- package/lib/esm/view/taskManager/taskListView/taskListReducer.js +11 -0
- package/lib/esm/view/taskManager/taskListView/taskListSelector.js +27 -4
- package/lib/index.d.ts +9 -0
- package/lib/index.js +30 -3
- package/lib/reducer.d.ts +6 -0
- package/lib/reducer.js +6 -0
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +31 -0
- package/lib/view/aiAccountantView/aiAccountantViewPayload.js +8 -0
- package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +29 -0
- package/lib/view/aiAccountantView/aiAccountantViewReducer.js +153 -0
- package/lib/view/aiAccountantView/aiAccountantViewSelector.d.ts +14 -0
- package/lib/view/aiAccountantView/aiAccountantViewSelector.js +78 -0
- package/lib/view/aiAccountantView/aiAccountantViewState.d.ts +26 -0
- package/lib/view/aiAccountantView/aiAccountantViewState.js +13 -0
- package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +33 -0
- package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +50 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +23 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +31 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +33 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +51 -0
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +28 -0
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +56 -0
- package/lib/view/companyView/types/cockpitTypes.d.ts +6 -5
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -1
- package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
- package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -4
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +3 -3
- package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
- package/lib/view/taskManager/taskListView/epics/fetchTaskListEpic.js +6 -3
- package/lib/view/taskManager/taskListView/taskList.d.ts +2 -0
- package/lib/view/taskManager/taskListView/taskListPayload.d.ts +10 -1
- package/lib/view/taskManager/taskListView/taskListPayload.js +7 -0
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +2 -1
- package/lib/view/taskManager/taskListView/taskListReducer.js +11 -0
- package/lib/view/taskManager/taskListView/taskListSelector.d.ts +4 -1
- package/lib/view/taskManager/taskListView/taskListSelector.js +27 -4
- package/package.json +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AiAccountantCustomer, AiAccountantEnrollment, AiAccountantJob } from './aiAccountantCustomerState';
|
|
2
|
+
export interface AiAccountantEnrollmentPayload {
|
|
3
|
+
status: string;
|
|
4
|
+
accuracy?: Record<string, number>;
|
|
5
|
+
latest_training?: string;
|
|
6
|
+
latest_transaction_sync?: string;
|
|
7
|
+
offboarded_at?: string;
|
|
8
|
+
offboarded_by?: string;
|
|
9
|
+
onboarded_at?: string;
|
|
10
|
+
onboarded_by?: string;
|
|
11
|
+
validation_results?: Array<{
|
|
12
|
+
accuracy: number;
|
|
13
|
+
model_type: string;
|
|
14
|
+
passed: boolean;
|
|
15
|
+
threshold: number;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
export interface AiAccountantCustomerPayload {
|
|
19
|
+
company_id: string;
|
|
20
|
+
company_name: string;
|
|
21
|
+
tenant_id: string;
|
|
22
|
+
bookclose_date?: string;
|
|
23
|
+
enrollment?: AiAccountantEnrollmentPayload | null;
|
|
24
|
+
}
|
|
25
|
+
export interface AiAccountantJobPayload {
|
|
26
|
+
company_id: string;
|
|
27
|
+
created_at: string;
|
|
28
|
+
job_id: string;
|
|
29
|
+
operation_type: string;
|
|
30
|
+
status: string;
|
|
31
|
+
tenant_id: string;
|
|
32
|
+
triggered_by: string;
|
|
33
|
+
company_namespace?: string;
|
|
34
|
+
completed_at?: string;
|
|
35
|
+
error_message?: string;
|
|
36
|
+
parameters?: Record<string, unknown>;
|
|
37
|
+
retry_count?: number;
|
|
38
|
+
started_at?: string;
|
|
39
|
+
steps?: Array<Record<string, unknown>>;
|
|
40
|
+
validation_results?: Array<Record<string, unknown>>;
|
|
41
|
+
}
|
|
42
|
+
export declare const toAiAccountantEnrollment: (payload: AiAccountantEnrollmentPayload) => AiAccountantEnrollment;
|
|
43
|
+
export declare const toAiAccountantCustomer: (payload: AiAccountantCustomerPayload) => AiAccountantCustomer;
|
|
44
|
+
export declare const toAiAccountantJob: (payload: AiAccountantJobPayload) => AiAccountantJob;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toAiAccountantJob = exports.toAiAccountantCustomer = exports.toAiAccountantEnrollment = void 0;
|
|
4
|
+
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
5
|
+
const aiAccountantCustomerState_1 = require("./aiAccountantCustomerState");
|
|
6
|
+
// ── Mapping functions (payload → state) ──
|
|
7
|
+
const toAiAccountantEnrollment = (payload) => ({
|
|
8
|
+
status: (0, aiAccountantCustomerState_1.toAiAccountantEnrollmentStatus)(payload.status),
|
|
9
|
+
accuracy: payload.accuracy,
|
|
10
|
+
latestTraining: payload.latest_training != null
|
|
11
|
+
? (0, zeniDayJS_1.date)(payload.latest_training)
|
|
12
|
+
: undefined,
|
|
13
|
+
latestTransactionSync: payload.latest_transaction_sync != null
|
|
14
|
+
? (0, zeniDayJS_1.date)(payload.latest_transaction_sync)
|
|
15
|
+
: undefined,
|
|
16
|
+
offboardedAt: payload.offboarded_at != null ? (0, zeniDayJS_1.date)(payload.offboarded_at) : undefined,
|
|
17
|
+
offboardedBy: payload.offboarded_by,
|
|
18
|
+
onboardedAt: payload.onboarded_at != null ? (0, zeniDayJS_1.date)(payload.onboarded_at) : undefined,
|
|
19
|
+
onboardedBy: payload.onboarded_by,
|
|
20
|
+
validationResults: payload.validation_results?.map((vr) => ({
|
|
21
|
+
accuracy: vr.accuracy,
|
|
22
|
+
modelType: vr.model_type,
|
|
23
|
+
passed: vr.passed,
|
|
24
|
+
threshold: vr.threshold,
|
|
25
|
+
})),
|
|
26
|
+
});
|
|
27
|
+
exports.toAiAccountantEnrollment = toAiAccountantEnrollment;
|
|
28
|
+
const toAiAccountantCustomer = (payload) => ({
|
|
29
|
+
companyId: payload.company_id,
|
|
30
|
+
companyName: payload.company_name,
|
|
31
|
+
tenantId: payload.tenant_id,
|
|
32
|
+
bookcloseDate: payload.bookclose_date != null ? (0, zeniDayJS_1.date)(payload.bookclose_date) : undefined,
|
|
33
|
+
enrollment: payload.enrollment != null
|
|
34
|
+
? (0, exports.toAiAccountantEnrollment)(payload.enrollment)
|
|
35
|
+
: undefined,
|
|
36
|
+
});
|
|
37
|
+
exports.toAiAccountantCustomer = toAiAccountantCustomer;
|
|
38
|
+
const toAiAccountantJob = (payload) => ({
|
|
39
|
+
companyId: payload.company_id,
|
|
40
|
+
createdAt: (0, zeniDayJS_1.date)(payload.created_at),
|
|
41
|
+
jobId: payload.job_id,
|
|
42
|
+
operationType: (0, aiAccountantCustomerState_1.toAiAccountantOperationType)(payload.operation_type),
|
|
43
|
+
status: (0, aiAccountantCustomerState_1.toAiAccountantJobStatus)(payload.status),
|
|
44
|
+
tenantId: payload.tenant_id,
|
|
45
|
+
triggeredBy: payload.triggered_by,
|
|
46
|
+
companyNamespace: payload.company_namespace,
|
|
47
|
+
completedAt: payload.completed_at != null ? (0, zeniDayJS_1.date)(payload.completed_at) : undefined,
|
|
48
|
+
errorMessage: payload.error_message,
|
|
49
|
+
parameters: payload.parameters,
|
|
50
|
+
retryCount: payload.retry_count,
|
|
51
|
+
startedAt: payload.started_at != null ? (0, zeniDayJS_1.date)(payload.started_at) : undefined,
|
|
52
|
+
steps: payload.steps,
|
|
53
|
+
validationResults: payload.validation_results,
|
|
54
|
+
});
|
|
55
|
+
exports.toAiAccountantJob = toAiAccountantJob;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AiAccountantCustomerPayload, AiAccountantJobPayload } from './aiAccountantCustomerPayload';
|
|
2
|
+
import { AiAccountantCustomerState } from './aiAccountantCustomerState';
|
|
3
|
+
export declare const initialAiAccountantCustomerState: AiAccountantCustomerState;
|
|
4
|
+
export declare const clearAllAiAccountantCustomers: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiAccountantCustomer/clearAllAiAccountantCustomers">, updateAiAccountantCustomers: import("@reduxjs/toolkit").ActionCreatorWithPayload<AiAccountantCustomerPayload[], "aiAccountantCustomer/updateAiAccountantCustomers">, updateAiAccountantCustomer: import("@reduxjs/toolkit").ActionCreatorWithPayload<AiAccountantCustomerPayload, "aiAccountantCustomer/updateAiAccountantCustomer">, updateAiAccountantJobs: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, jobs: AiAccountantJobPayload[], append?: boolean | undefined], {
|
|
5
|
+
tenantId: string;
|
|
6
|
+
jobs: AiAccountantJobPayload[];
|
|
7
|
+
append: boolean;
|
|
8
|
+
}, "aiAccountantCustomer/updateAiAccountantJobs", never, never>;
|
|
9
|
+
declare const _default: import("redux").Reducer<AiAccountantCustomerState>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.updateAiAccountantJobs = exports.updateAiAccountantCustomer = exports.updateAiAccountantCustomers = exports.clearAllAiAccountantCustomers = exports.initialAiAccountantCustomerState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const aiAccountantCustomerPayload_1 = require("./aiAccountantCustomerPayload");
|
|
7
|
+
exports.initialAiAccountantCustomerState = {
|
|
8
|
+
customerByTenantId: {},
|
|
9
|
+
jobsByTenantId: {},
|
|
10
|
+
};
|
|
11
|
+
const aiAccountantCustomer = (0, toolkit_1.createSlice)({
|
|
12
|
+
name: 'aiAccountantCustomer',
|
|
13
|
+
initialState: exports.initialAiAccountantCustomerState,
|
|
14
|
+
reducers: {
|
|
15
|
+
updateAiAccountantCustomers(draft, action) {
|
|
16
|
+
const newCustomerByTenantId = {};
|
|
17
|
+
action.payload.forEach((payload) => {
|
|
18
|
+
const customer = (0, aiAccountantCustomerPayload_1.toAiAccountantCustomer)(payload);
|
|
19
|
+
newCustomerByTenantId[customer.tenantId] = customer;
|
|
20
|
+
});
|
|
21
|
+
draft.customerByTenantId = newCustomerByTenantId;
|
|
22
|
+
},
|
|
23
|
+
updateAiAccountantCustomer(draft, action) {
|
|
24
|
+
const customer = (0, aiAccountantCustomerPayload_1.toAiAccountantCustomer)(action.payload);
|
|
25
|
+
draft.customerByTenantId[customer.tenantId] = customer;
|
|
26
|
+
},
|
|
27
|
+
updateAiAccountantJobs: {
|
|
28
|
+
reducer(draft, action) {
|
|
29
|
+
const mappedJobs = action.payload.jobs.map(aiAccountantCustomerPayload_1.toAiAccountantJob);
|
|
30
|
+
if (action.payload.append) {
|
|
31
|
+
const existing = draft.jobsByTenantId[action.payload.tenantId] ?? [];
|
|
32
|
+
const jobMap = new Map(existing.map((job) => [job.jobId, job]));
|
|
33
|
+
mappedJobs.forEach((job) => jobMap.set(job.jobId, job));
|
|
34
|
+
draft.jobsByTenantId[action.payload.tenantId] =
|
|
35
|
+
Array.from(jobMap.values());
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
draft.jobsByTenantId[action.payload.tenantId] = mappedJobs;
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
prepare(tenantId, jobs, append = false) {
|
|
42
|
+
return { payload: { tenantId, jobs, append } };
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
clearAllAiAccountantCustomers(draft) {
|
|
46
|
+
Object.assign(draft, exports.initialAiAccountantCustomerState);
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
_a = aiAccountantCustomer.actions, exports.clearAllAiAccountantCustomers = _a.clearAllAiAccountantCustomers, exports.updateAiAccountantCustomers = _a.updateAiAccountantCustomers, exports.updateAiAccountantCustomer = _a.updateAiAccountantCustomer, exports.updateAiAccountantJobs = _a.updateAiAccountantJobs;
|
|
51
|
+
exports.default = aiAccountantCustomer.reducer;
|
|
@@ -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" | "
|
|
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" | "
|
|
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) => "
|
|
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>;
|
|
@@ -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) => "
|
|
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) => "
|
|
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) => "
|
|
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;
|
|
@@ -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) => "
|
|
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>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const toSnackbarMessageSection: (v: string) => "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update";
|
|
2
2
|
export type SnackbarMessageSections = ReturnType<typeof toSnackbarMessageSection>;
|
|
3
|
-
export declare const toSnackbarMessageSectionTexts: (v: string) => "notification" | "
|
|
3
|
+
export declare const toSnackbarMessageSectionTexts: (v: string) => "notification" | "failed" | "success";
|
|
4
4
|
export type SnackbarMessageSectionTexts = ReturnType<typeof toSnackbarMessageSectionTexts>;
|
|
5
5
|
export type SnackbarMessageType = 'info' | 'warning' | 'error' | 'none' | 'success' | 'notification';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ActionsObservable } from 'redux-observable';
|
|
2
|
+
import { clearAllAiAccountantCustomers } from '../../entity/aiAccountantCustomer/aiAccountantCustomerReducer';
|
|
2
3
|
import { clearAiCfo } from '../../entity/aiCfo/aiCfoReducer';
|
|
3
4
|
import { clearAllApprovalRules } from '../../entity/approvalRule/approvalRuleReducer';
|
|
4
5
|
import { clearAllEntityApprovalStatus } from '../../entity/entityApprovalStatus/entityApprovalStatusReducer';
|
|
@@ -12,6 +13,7 @@ import { clearAccountList } from '../../view/accountList/accountListReducer';
|
|
|
12
13
|
import { clearAccountMappingView } from '../../view/accountMappingView/accountMappingReducer';
|
|
13
14
|
import { clearAddressView } from '../../view/addressView/addressViewReducer';
|
|
14
15
|
import { clearAggregatedReport } from '../../view/aiAgentPerformance/aggregatedReportViewReducer';
|
|
16
|
+
import { clearAiAccountantView } from '../../view/aiAccountantView/aiAccountantViewReducer';
|
|
15
17
|
import { clearAiCfoView } from '../../view/aiCfoView/aiCfoViewReducer';
|
|
16
18
|
import { clearApAgingDetail } from '../../view/apAgingView/apAgingDetail/apAgingDetailReducer';
|
|
17
19
|
import { clearApAging } from '../../view/apAgingView/apAgingReport/apAgingReducer';
|
|
@@ -200,7 +202,7 @@ import { clearAllUserRoles } from '../userRole/userRoleReducer';
|
|
|
200
202
|
import { clearAllVendors } from '../vendor/vendorReducer';
|
|
201
203
|
import { clearAllVendorExpenseTrends } from '../vendorExpense/vendorExpenseReducer';
|
|
202
204
|
import { clearAll } from './tenantReducer';
|
|
203
|
-
type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllProjects> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardRepaymentDetail> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearAggregatedReport> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearProfitAndLossProjectView> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTreasuryOverviewDetail> | ReturnType<typeof clearTreasurySetupView> | ReturnType<typeof clearTreasuryStatementList> | ReturnType<typeof clearTreasuryTaxLetterList> | ReturnType<typeof clearTreasuryTransferMoney> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard>;
|
|
205
|
+
type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiAccountantView> | ReturnType<typeof clearAllAiAccountantCustomers> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllProjects> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardRepaymentDetail> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearAggregatedReport> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearProfitAndLossProjectView> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTreasuryOverviewDetail> | ReturnType<typeof clearTreasurySetupView> | ReturnType<typeof clearTreasuryStatementList> | ReturnType<typeof clearTreasuryTaxLetterList> | ReturnType<typeof clearTreasuryTransferMoney> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard>;
|
|
204
206
|
type clearActionTypeForEntities = ReturnType<typeof clearAiCfo> | ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountRecon> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllCardPayments> | ReturnType<typeof clearAllChargeCardRepayments> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllConnectedAccounts> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllAccruedJESchedules> | ReturnType<typeof clearAllJEScheduleTransactions> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllMonthEndCloseChecks> | ReturnType<typeof clearAllNotifications> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSectionsProjectView> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTags> | ReturnType<typeof clearAllTaskGroups> | ReturnType<typeof clearAllTaskGroupTemplates> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllToastNotifications> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearCountryList> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar>;
|
|
205
207
|
export type ActionType = clearActionTypeForViews | clearActionTypeForEntities | ReturnType<typeof clearAll>;
|
|
206
208
|
export declare const clearAllEpic: (actions$: ActionsObservable<ActionType>) => import("rxjs").Observable<ActionType>;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.clearAllEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const aiAccountantCustomerReducer_1 = require("../../entity/aiAccountantCustomer/aiAccountantCustomerReducer");
|
|
6
7
|
const aiCfoReducer_1 = require("../../entity/aiCfo/aiCfoReducer");
|
|
7
8
|
const approvalRuleReducer_1 = require("../../entity/approvalRule/approvalRuleReducer");
|
|
8
9
|
const entityApprovalStatusReducer_1 = require("../../entity/entityApprovalStatus/entityApprovalStatusReducer");
|
|
@@ -16,6 +17,7 @@ const accountListReducer_1 = require("../../view/accountList/accountListReducer"
|
|
|
16
17
|
const accountMappingReducer_1 = require("../../view/accountMappingView/accountMappingReducer");
|
|
17
18
|
const addressViewReducer_1 = require("../../view/addressView/addressViewReducer");
|
|
18
19
|
const aggregatedReportViewReducer_1 = require("../../view/aiAgentPerformance/aggregatedReportViewReducer");
|
|
20
|
+
const aiAccountantViewReducer_1 = require("../../view/aiAccountantView/aiAccountantViewReducer");
|
|
19
21
|
const aiCfoViewReducer_1 = require("../../view/aiCfoView/aiCfoViewReducer");
|
|
20
22
|
const apAgingDetailReducer_1 = require("../../view/apAgingView/apAgingDetail/apAgingDetailReducer");
|
|
21
23
|
const apAgingReducer_1 = require("../../view/apAgingView/apAgingReport/apAgingReducer");
|
|
@@ -213,6 +215,8 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
|
|
|
213
215
|
(0, commonHistoryReducer_1.clearActivityHistory)(),
|
|
214
216
|
(0, realTimeApprovalReducer_1.clearActivityRealTimeApproval)(),
|
|
215
217
|
(0, addressViewReducer_1.clearAddressView)(),
|
|
218
|
+
(0, aiAccountantViewReducer_1.clearAiAccountantView)(),
|
|
219
|
+
(0, aiAccountantCustomerReducer_1.clearAllAiAccountantCustomers)(),
|
|
216
220
|
(0, aiCfoViewReducer_1.clearAiCfoView)(),
|
|
217
221
|
(0, classReducer_1.clearAllClasses)(),
|
|
218
222
|
(0, projectReducer_1.clearAllProjects)(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CurrentTenant, TenantView } from '../tenant/tenantSelector';
|
|
2
2
|
import { LoggedInUser } from '../tenant/tenantState';
|
|
3
|
-
export declare const toUserRoleTypeStrict: (v?: string) => "admin" | "bookkeeping_admin" | "bookkeeping_user" | "investor_or_banker" | "company_officer" | "reimbursements_user" | "bill_pay_admin" | "bill_pay_user" | "reimbursements_admin" | "deposit_accounts_admin" | "deposit_accounts_user" | "charge_card_admin" | "charge_card_user" | "treasury_admin" | "treasury_user" | "
|
|
4
|
-
export declare const toUserRoleType: (v: string) => "admin" | "bookkeeping_admin" | "bookkeeping_user" | "investor_or_banker" | "company_officer" | "reimbursements_user" | "bill_pay_admin" | "bill_pay_user" | "reimbursements_admin" | "deposit_accounts_admin" | "deposit_accounts_user" | "charge_card_admin" | "charge_card_user" | "treasury_admin" | "treasury_user" | "
|
|
3
|
+
export declare const toUserRoleTypeStrict: (v?: string) => "admin" | "controller" | "bookkeeping_admin" | "bookkeeping_user" | "investor_or_banker" | "company_officer" | "reimbursements_user" | "bill_pay_admin" | "bill_pay_user" | "reimbursements_admin" | "deposit_accounts_admin" | "deposit_accounts_user" | "charge_card_admin" | "charge_card_user" | "treasury_admin" | "treasury_user" | "tax_lead" | "ap_analyst" | "preparer" | "reviewer" | "customer_success_manager" | "zeni_support_user" | undefined;
|
|
4
|
+
export declare const toUserRoleType: (v: string) => "admin" | "controller" | "bookkeeping_admin" | "bookkeeping_user" | "investor_or_banker" | "company_officer" | "reimbursements_user" | "bill_pay_admin" | "bill_pay_user" | "reimbursements_admin" | "deposit_accounts_admin" | "deposit_accounts_user" | "charge_card_admin" | "charge_card_user" | "treasury_admin" | "treasury_user" | "tax_lead" | "ap_analyst" | "preparer" | "reviewer" | "customer_success_manager" | "zeni_support_user";
|
|
5
5
|
export type UserRoleType = ReturnType<typeof toUserRoleType>;
|
|
6
6
|
export type RoleMap = Record<string, boolean>;
|
|
7
7
|
export declare const isFinOpsUserRoleType: (userRole: UserRoleType) => boolean;
|