import { Injectable } from '@angular/core' ; import { HttpClient } from '@angular/common/http' ; import { firstValueFrom } from 'rxjs' ; import { ICandidatePersonalQualities , ICandidateCriterionsRating , ICandidateTechnologies } from '@gauzy/contracts' ; import { API_PREFIX } from '../constants/app.constants' ; @ Injectable ( ) export class CandidateCriterionsRatingService { constructor ( private http ) { } createBulk ( feedbackId , technologies , qualities ) { return firstValueFrom ( this . http . post < ICandidateCriterionsRating [ ] > ( `${ API_PREFIX }/candidate-criterions-rating/bulk` , { feedbackId , technologies , qualities } ) ) ; } getAll ( ) { return firstValueFrom ( this . http . get < { items : ICandidateCriterionsRating [ ] ; total : number ; } > ( `${ API_PREFIX }/candidate-criterions-rating` ) ) ; } updateBulk ( criterionsRating , technologies , personalQualities ) { return firstValueFrom ( this . http . put ( `${ API_PREFIX }/candidate-criterions-rating/bulk` , { criterionsRating , technologies , personalQualities } ) ) ; } deleteBulkByFeedbackId ( id ) { return firstValueFrom ( this . http . delete ( `${ API_PREFIX }/candidate-criterions-rating/feedback/${ id }` ) ) ; } }