import { Injectable } from '@angular/core'; import { HttpRestService } from '@core/services/http-rest.service'; import { CustomerInsights } from './customer-insights.typing'; @Injectable({ providedIn: 'root' }) export class CustomerInsightsResources { constructor ( private http: HttpRestService ) { } getApplicationSubmittedInfo ( payload: CustomerInsights.CustomerInsightsPayload ): Promise { const endpoint = 'api/admin/clients/GetApplicationSubmittedInfo'; return this.http.post(endpoint, payload); } getUserLoginInfo ( payload: CustomerInsights.CustomerInsightsPayload ): Promise { const endpoint = 'api/admin/clients/GetUserLoginInfo'; return this.http.post(endpoint, payload); } async getAdminInsightsFile (payload: CustomerInsights.CustomerInsightsFilePayload) { const endpoint = 'api/admin/clients/getAdminInsightsFile'; const response = await this.http.post<{ file: string }>(endpoint, payload); return response.file; } }