31 lines
681 B
TypeScript
31 lines
681 B
TypeScript
import { axiosClient } from './axiosClient';
|
|
|
|
export interface AuditSummaryParams {
|
|
dbName: string;
|
|
site_id: string;
|
|
isRectificationEnabled?: boolean;
|
|
fromDate?: string;
|
|
toDate?: string;
|
|
}
|
|
|
|
export interface AuditSummaryResponse {
|
|
db_name: string;
|
|
site_id: number[];
|
|
table: string;
|
|
from_date: string;
|
|
to_date: string;
|
|
counts: {
|
|
pending: number;
|
|
deleted: number;
|
|
audited: number;
|
|
total: number;
|
|
};
|
|
}
|
|
|
|
export const auditSummaryService = {
|
|
getSummary: async (params: AuditSummaryParams): Promise<AuditSummaryResponse> => {
|
|
const response = await axiosClient.get('/api/audit/audit-summary', { params });
|
|
return response as any;
|
|
},
|
|
};
|