This commit is contained in:
pradeepkumar
2026-03-31 22:39:02 +05:30
parent 7787f4b60f
commit 7d17b1946f
3 changed files with 96 additions and 0 deletions

View File

@@ -156,6 +156,20 @@ class UsersService {
const response = await api.get<ApiResponse<VerificationHistoryEntry[]>>(`${this.basePath}/${userId}/verification-history`);
return response.data.data;
}
async getAgentFieldValues(agentProfileId: string): Promise<AgentFieldValue[]> {
const response = await api.get<ApiResponse<{ agentProfileId: string; fieldValues: AgentFieldValue[] }>>(`/agents/${agentProfileId}/field-values`);
return response.data.data.fieldValues;
}
}
export interface AgentFieldValue {
fieldSlug: string;
fieldName: string;
fieldType: string;
sectionSlug: string;
sectionName: string;
value: unknown;
}
export interface VerificationHistoryEntry {
@@ -166,6 +180,7 @@ export interface VerificationHistoryEntry {
adminId: string | null;
createdAt: string;
admin: { id: string; email: string } | null;
submittedData: Record<string, any> | null;
}
export const usersService = new UsersService();