import { http } from '../http/http';
import { Repository } from '../../infrastructure/repositories/repository'
import { ProfileSummaryResponse } from '../../domain/models/profiles/ProfileSummaryResponse.interface'
import { JobResponse } from '../../domain/models/profiles/JobResponse.interface'
import { Response } from '../../domain/models/Response.interface'
export class ProfileRepository extends Repository{
    constructor() {
        super();
    }
    async getProfileSummary(): Promise<ProfileSummaryResponse> {
        const profileSummary = await http.get<ProfileSummaryResponse>(process.env.VUE_APP_ROOT_API + '/tasks/profile/summary/');
        return profileSummary;
    }

    async deleteProfile(idTaskSelected : String): Promise<Response> {
        const response = await http.delete<Response>(process.env.VUE_APP_ROOT_API + '/tasks/profile/' + idTaskSelected);
        return response;
    }

    async submitJob(idTaskSelected : String): Promise<JobResponse>{
        const response = await http.get<JobResponse>(process.env.VUE_APP_ROOT_API + '/jobs/submit/' + idTaskSelected);
        return response;
    }
}