parent
90f188b244
commit
c4a57bf458
@ -1,3 +1,11 @@ |
|||||||
export * from './default.service'; |
export * from './collaborateurs.service'; |
||||||
import { DefaultService } from './default.service'; |
import { CollaborateursService } from './collaborateurs.service'; |
||||||
export const APIS = [DefaultService]; |
export * from './demandesformation.service'; |
||||||
|
import { DemandesformationService } from './demandesformation.service'; |
||||||
|
export * from './ep.service'; |
||||||
|
import { EpService } from './ep.service'; |
||||||
|
export * from './formations.service'; |
||||||
|
import { FormationsService } from './formations.service'; |
||||||
|
export * from './referents.service'; |
||||||
|
import { ReferentsService } from './referents.service'; |
||||||
|
export const APIS = [CollaborateursService, DemandesformationService, EpService, FormationsService, ReferentsService]; |
||||||
|
@ -0,0 +1,279 @@ |
|||||||
|
/** |
||||||
|
* API du serveur de l'application de digitalisation des EP |
||||||
|
* API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. |
||||||
|
* |
||||||
|
* OpenAPI spec version: 1.1.0 |
||||||
|
*
|
||||||
|
* |
||||||
|
* NOTE: This class is auto generated by the swagger code generator program. |
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually. |
||||||
|
*//* tslint:disable:no-unused-variable member-ordering */
|
||||||
|
|
||||||
|
import { Inject, Injectable, Optional } from '@angular/core'; |
||||||
|
import { HttpClient, HttpHeaders, HttpParams, |
||||||
|
HttpResponse, HttpEvent } from '@angular/common/http'; |
||||||
|
import { CustomHttpUrlEncodingCodec } from '../encoder'; |
||||||
|
|
||||||
|
import { Observable } from 'rxjs'; |
||||||
|
|
||||||
|
import { CollaborateurModel } from '../model/collaborateurModel'; |
||||||
|
import { ErreurModel } from '../model/erreurModel'; |
||||||
|
|
||||||
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; |
||||||
|
import { Configuration } from '../configuration'; |
||||||
|
|
||||||
|
|
||||||
|
@Injectable() |
||||||
|
export class CollaborateursService { |
||||||
|
|
||||||
|
protected basePath = 'http://localhost:3000/api'; |
||||||
|
public defaultHeaders = new HttpHeaders(); |
||||||
|
public configuration = new Configuration(); |
||||||
|
|
||||||
|
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { |
||||||
|
if (basePath) { |
||||||
|
this.basePath = basePath; |
||||||
|
} |
||||||
|
if (configuration) { |
||||||
|
this.configuration = configuration; |
||||||
|
this.basePath = basePath || configuration.basePath || this.basePath; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @param consumes string[] mime-types |
||||||
|
* @return true: consumes contains 'multipart/form-data', false: otherwise |
||||||
|
*/ |
||||||
|
private canConsumeForm(consumes: string[]): boolean { |
||||||
|
const form = 'multipart/form-data'; |
||||||
|
for (const consume of consumes) { |
||||||
|
if (form === consume) { |
||||||
|
return true; |
||||||
|
} |
||||||
|
} |
||||||
|
return false; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* recevoir un collaboratuer par son id |
||||||
|
* @param idCollaborateur id collaborateur |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getCollaborateurById(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable<CollaborateurModel>; |
||||||
|
public getCollaborateurById(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<CollaborateurModel>>; |
||||||
|
public getCollaborateurById(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<CollaborateurModel>>; |
||||||
|
public getCollaborateurById(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (idCollaborateur === null || idCollaborateur === undefined) { |
||||||
|
throw new Error('Required parameter idCollaborateur was null or undefined when calling getCollaborateurById.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<CollaborateurModel>('get',`${this.basePath}/collaborateurs/${encodeURIComponent(String(idCollaborateur))}`, |
||||||
|
{ |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* recevoir un collaborateur par son mail |
||||||
|
* @param mail mail de l'utilisateur connecté (mail obetenu via Keycloak) |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getCollaborateurByMail(mail: string, observe?: 'body', reportProgress?: boolean): Observable<CollaborateurModel>; |
||||||
|
public getCollaborateurByMail(mail: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<CollaborateurModel>>; |
||||||
|
public getCollaborateurByMail(mail: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<CollaborateurModel>>; |
||||||
|
public getCollaborateurByMail(mail: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (mail === null || mail === undefined) { |
||||||
|
throw new Error('Required parameter mail was null or undefined when calling getCollaborateurByMail.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<CollaborateurModel>('get',`${this.basePath}/collaborateurs/${encodeURIComponent(String(mail))}`, |
||||||
|
{ |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* recevoir la liste des collaborateurs |
||||||
|
* @param assistants paramètre pour indiquer explicitement que l'on souhaite récupérer les assistants dans la requête |
||||||
|
* @param collaborateurs paramètre pour indiquer explicitement que l'on souhaite récupérer les collaborateurs dans la requête |
||||||
|
* @param idBu id de la business unit à laquelle sont rattachées les données à récupérer |
||||||
|
* @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer |
||||||
|
* @param referents paramètre pour indiquer explicitement que l'on souhaite récupérer les référents dans la requête |
||||||
|
* @param rh paramètre pour indiquer explicitement que l'on souhaite récupérer les RH dans la requête |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getCollaborateurs(assistants?: boolean, collaborateurs?: boolean, idBu?: number, idAgence?: number, referents?: boolean, rh?: boolean, observe?: 'body', reportProgress?: boolean): Observable<Array<CollaborateurModel>>; |
||||||
|
public getCollaborateurs(assistants?: boolean, collaborateurs?: boolean, idBu?: number, idAgence?: number, referents?: boolean, rh?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<CollaborateurModel>>>; |
||||||
|
public getCollaborateurs(assistants?: boolean, collaborateurs?: boolean, idBu?: number, idAgence?: number, referents?: boolean, rh?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<CollaborateurModel>>>; |
||||||
|
public getCollaborateurs(assistants?: boolean, collaborateurs?: boolean, idBu?: number, idAgence?: number, referents?: boolean, rh?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); |
||||||
|
if (assistants !== undefined && assistants !== null) { |
||||||
|
queryParameters = queryParameters.set('assistants', <any>assistants); |
||||||
|
} |
||||||
|
if (collaborateurs !== undefined && collaborateurs !== null) { |
||||||
|
queryParameters = queryParameters.set('collaborateurs', <any>collaborateurs); |
||||||
|
} |
||||||
|
if (idBu !== undefined && idBu !== null) { |
||||||
|
queryParameters = queryParameters.set('idBu', <any>idBu); |
||||||
|
} |
||||||
|
if (idAgence !== undefined && idAgence !== null) { |
||||||
|
queryParameters = queryParameters.set('idAgence', <any>idAgence); |
||||||
|
} |
||||||
|
if (referents !== undefined && referents !== null) { |
||||||
|
queryParameters = queryParameters.set('referents', <any>referents); |
||||||
|
} |
||||||
|
if (rh !== undefined && rh !== null) { |
||||||
|
queryParameters = queryParameters.set('rh', <any>rh); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<Array<CollaborateurModel>>('get',`${this.basePath}/collaborateurs`, |
||||||
|
{ |
||||||
|
params: queryParameters, |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* Recevoir la liste des collaborateurs de le référent à la charge |
||||||
|
* @param idReferent id referent |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getCollaborateursByReferent(idReferent: string, observe?: 'body', reportProgress?: boolean): Observable<CollaborateurModel>; |
||||||
|
public getCollaborateursByReferent(idReferent: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<CollaborateurModel>>; |
||||||
|
public getCollaborateursByReferent(idReferent: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<CollaborateurModel>>; |
||||||
|
public getCollaborateursByReferent(idReferent: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (idReferent === null || idReferent === undefined) { |
||||||
|
throw new Error('Required parameter idReferent was null or undefined when calling getCollaborateursByReferent.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<CollaborateurModel>('get',`${this.basePath}/collaborateurs/referent/${encodeURIComponent(String(idReferent))}`, |
||||||
|
{ |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,223 @@ |
|||||||
|
/** |
||||||
|
* API du serveur de l'application de digitalisation des EP |
||||||
|
* API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. |
||||||
|
* |
||||||
|
* OpenAPI spec version: 1.1.0 |
||||||
|
*
|
||||||
|
* |
||||||
|
* NOTE: This class is auto generated by the swagger code generator program. |
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually. |
||||||
|
*//* tslint:disable:no-unused-variable member-ordering */
|
||||||
|
|
||||||
|
import { Inject, Injectable, Optional } from '@angular/core'; |
||||||
|
import { HttpClient, HttpHeaders, HttpParams, |
||||||
|
HttpResponse, HttpEvent } from '@angular/common/http'; |
||||||
|
import { CustomHttpUrlEncodingCodec } from '../encoder'; |
||||||
|
|
||||||
|
import { Observable } from 'rxjs'; |
||||||
|
|
||||||
|
import { DemandeFormationModel } from '../model/demandeFormationModel'; |
||||||
|
import { ErreurModel } from '../model/erreurModel'; |
||||||
|
|
||||||
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; |
||||||
|
import { Configuration } from '../configuration'; |
||||||
|
|
||||||
|
|
||||||
|
@Injectable() |
||||||
|
export class DemandesformationService { |
||||||
|
|
||||||
|
protected basePath = 'http://localhost:3000/api'; |
||||||
|
public defaultHeaders = new HttpHeaders(); |
||||||
|
public configuration = new Configuration(); |
||||||
|
|
||||||
|
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { |
||||||
|
if (basePath) { |
||||||
|
this.basePath = basePath; |
||||||
|
} |
||||||
|
if (configuration) { |
||||||
|
this.configuration = configuration; |
||||||
|
this.basePath = basePath || configuration.basePath || this.basePath; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @param consumes string[] mime-types |
||||||
|
* @return true: consumes contains 'multipart/form-data', false: otherwise |
||||||
|
*/ |
||||||
|
private canConsumeForm(consumes: string[]): boolean { |
||||||
|
const form = 'multipart/form-data'; |
||||||
|
for (const consume of consumes) { |
||||||
|
if (form === consume) { |
||||||
|
return true; |
||||||
|
} |
||||||
|
} |
||||||
|
return false; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* créer une demande de formation pour un collaborateur |
||||||
|
* @param body
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public creerDemandeFormation(body: DemandeFormationModel, observe?: 'body', reportProgress?: boolean): Observable<any>; |
||||||
|
public creerDemandeFormation(body: DemandeFormationModel, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>; |
||||||
|
public creerDemandeFormation(body: DemandeFormationModel, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; |
||||||
|
public creerDemandeFormation(body: DemandeFormationModel, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (body === null || body === undefined) { |
||||||
|
throw new Error('Required parameter body was null or undefined when calling creerDemandeFormation.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); |
||||||
|
if (httpContentTypeSelected != undefined) { |
||||||
|
headers = headers.set('Content-Type', httpContentTypeSelected); |
||||||
|
} |
||||||
|
|
||||||
|
return this.httpClient.request<any>('post',`${this.basePath}/demandeformation`, |
||||||
|
{ |
||||||
|
body: body, |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* recevoir la liste des demandes de formations |
||||||
|
* @param idBu id de la business unit à laquelle sont rattachées les données à récupérer |
||||||
|
* @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getDemandesFormation(idBu?: number, idAgence?: number, observe?: 'body', reportProgress?: boolean): Observable<Array<DemandeFormationModel>>; |
||||||
|
public getDemandesFormation(idBu?: number, idAgence?: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<DemandeFormationModel>>>; |
||||||
|
public getDemandesFormation(idBu?: number, idAgence?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<DemandeFormationModel>>>; |
||||||
|
public getDemandesFormation(idBu?: number, idAgence?: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); |
||||||
|
if (idBu !== undefined && idBu !== null) { |
||||||
|
queryParameters = queryParameters.set('idBu', <any>idBu); |
||||||
|
} |
||||||
|
if (idAgence !== undefined && idAgence !== null) { |
||||||
|
queryParameters = queryParameters.set('idAgence', <any>idAgence); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<Array<DemandeFormationModel>>('get',`${this.basePath}/demandeformation`, |
||||||
|
{ |
||||||
|
params: queryParameters, |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* repondre a une demande de formation et la mettre a jour |
||||||
|
* @param body
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public updateDemandeFormation(body: DemandeFormationModel, observe?: 'body', reportProgress?: boolean): Observable<any>; |
||||||
|
public updateDemandeFormation(body: DemandeFormationModel, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>; |
||||||
|
public updateDemandeFormation(body: DemandeFormationModel, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; |
||||||
|
public updateDemandeFormation(body: DemandeFormationModel, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (body === null || body === undefined) { |
||||||
|
throw new Error('Required parameter body was null or undefined when calling updateDemandeFormation.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); |
||||||
|
if (httpContentTypeSelected != undefined) { |
||||||
|
headers = headers.set('Content-Type', httpContentTypeSelected); |
||||||
|
} |
||||||
|
|
||||||
|
return this.httpClient.request<any>('put',`${this.basePath}/demandeformation`, |
||||||
|
{ |
||||||
|
body: body, |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,566 @@ |
|||||||
|
/** |
||||||
|
* API du serveur de l'application de digitalisation des EP |
||||||
|
* API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. |
||||||
|
* |
||||||
|
* OpenAPI spec version: 1.1.0 |
||||||
|
*
|
||||||
|
* |
||||||
|
* NOTE: This class is auto generated by the swagger code generator program. |
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually. |
||||||
|
*//* tslint:disable:no-unused-variable member-ordering */
|
||||||
|
|
||||||
|
import { Inject, Injectable, Optional } from '@angular/core'; |
||||||
|
import { HttpClient, HttpHeaders, HttpParams, |
||||||
|
HttpResponse, HttpEvent } from '@angular/common/http'; |
||||||
|
import { CustomHttpUrlEncodingCodec } from '../encoder'; |
||||||
|
|
||||||
|
import { Observable } from 'rxjs'; |
||||||
|
|
||||||
|
import { EpModel } from '../model/epModel'; |
||||||
|
import { ErreurModel } from '../model/erreurModel'; |
||||||
|
|
||||||
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; |
||||||
|
import { Configuration } from '../configuration'; |
||||||
|
|
||||||
|
|
||||||
|
@Injectable() |
||||||
|
export class EpService { |
||||||
|
|
||||||
|
protected basePath = 'http://localhost:3000/api'; |
||||||
|
public defaultHeaders = new HttpHeaders(); |
||||||
|
public configuration = new Configuration(); |
||||||
|
|
||||||
|
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { |
||||||
|
if (basePath) { |
||||||
|
this.basePath = basePath; |
||||||
|
} |
||||||
|
if (configuration) { |
||||||
|
this.configuration = configuration; |
||||||
|
this.basePath = basePath || configuration.basePath || this.basePath; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @param consumes string[] mime-types |
||||||
|
* @return true: consumes contains 'multipart/form-data', false: otherwise |
||||||
|
*/ |
||||||
|
private canConsumeForm(consumes: string[]): boolean { |
||||||
|
const form = 'multipart/form-data'; |
||||||
|
for (const consume of consumes) { |
||||||
|
if (form === consume) { |
||||||
|
return true; |
||||||
|
} |
||||||
|
} |
||||||
|
return false; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* lancer la procedure entretien professionnel intermediaire |
||||||
|
* @param idCollaborateur id collaborateur |
||||||
|
* @param idReferent id referent |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public createEPI(idCollaborateur: string, idReferent: string, observe?: 'body', reportProgress?: boolean): Observable<any>; |
||||||
|
public createEPI(idCollaborateur: string, idReferent: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>; |
||||||
|
public createEPI(idCollaborateur: string, idReferent: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; |
||||||
|
public createEPI(idCollaborateur: string, idReferent: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (idCollaborateur === null || idCollaborateur === undefined) { |
||||||
|
throw new Error('Required parameter idCollaborateur was null or undefined when calling createEPI.'); |
||||||
|
} |
||||||
|
|
||||||
|
if (idReferent === null || idReferent === undefined) { |
||||||
|
throw new Error('Required parameter idReferent was null or undefined when calling createEPI.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<any>('get',`${this.basePath}/ep/epi`, |
||||||
|
{ |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* recevoir la liste de tous les EP collaborateurs |
||||||
|
* @param idBu id de la business unit à laquelle sont rattachées les données à récupérer |
||||||
|
* @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getEP(idBu?: number, idAgence?: number, observe?: 'body', reportProgress?: boolean): Observable<Array<EpModel>>; |
||||||
|
public getEP(idBu?: number, idAgence?: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<EpModel>>>; |
||||||
|
public getEP(idBu?: number, idAgence?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<EpModel>>>; |
||||||
|
public getEP(idBu?: number, idAgence?: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); |
||||||
|
if (idBu !== undefined && idBu !== null) { |
||||||
|
queryParameters = queryParameters.set('idBu', <any>idBu); |
||||||
|
} |
||||||
|
if (idAgence !== undefined && idAgence !== null) { |
||||||
|
queryParameters = queryParameters.set('idAgence', <any>idAgence); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<Array<EpModel>>('get',`${this.basePath}/ep`, |
||||||
|
{ |
||||||
|
params: queryParameters, |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* recevoir la liste des EP collaborateur |
||||||
|
* @param idCollaborateur id collaborateur |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getEPByCollaborateur(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable<Array<EpModel>>; |
||||||
|
public getEPByCollaborateur(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<EpModel>>>; |
||||||
|
public getEPByCollaborateur(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<EpModel>>>; |
||||||
|
public getEPByCollaborateur(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (idCollaborateur === null || idCollaborateur === undefined) { |
||||||
|
throw new Error('Required parameter idCollaborateur was null or undefined when calling getEPByCollaborateur.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<Array<EpModel>>('get',`${this.basePath}/ep/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, |
||||||
|
{ |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* recevoir un EP par via son id |
||||||
|
* @param idEP id EP |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getEPById(idEP: string, observe?: 'body', reportProgress?: boolean): Observable<EpModel>; |
||||||
|
public getEPById(idEP: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<EpModel>>; |
||||||
|
public getEPById(idEP: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<EpModel>>; |
||||||
|
public getEPById(idEP: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (idEP === null || idEP === undefined) { |
||||||
|
throw new Error('Required parameter idEP was null or undefined when calling getEPById.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<EpModel>('get',`${this.basePath}/ep/${encodeURIComponent(String(idEP))}`, |
||||||
|
{ |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* recevoir la liste de tous les EP fait passer par le référent |
||||||
|
* @param idReferent id referent |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getEPByReferent(idReferent: string, observe?: 'body', reportProgress?: boolean): Observable<Array<EpModel>>; |
||||||
|
public getEPByReferent(idReferent: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<EpModel>>>; |
||||||
|
public getEPByReferent(idReferent: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<EpModel>>>; |
||||||
|
public getEPByReferent(idReferent: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (idReferent === null || idReferent === undefined) { |
||||||
|
throw new Error('Required parameter idReferent was null or undefined when calling getEPByReferent.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<Array<EpModel>>('get',`${this.basePath}/ep/referent/${encodeURIComponent(String(idReferent))}`, |
||||||
|
{ |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* recevoir son prochain EP |
||||||
|
* @param idCollaborateur id collaborateur |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getProchainEPByCollaborateur(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable<EpModel>; |
||||||
|
public getProchainEPByCollaborateur(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<EpModel>>; |
||||||
|
public getProchainEPByCollaborateur(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<EpModel>>; |
||||||
|
public getProchainEPByCollaborateur(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (idCollaborateur === null || idCollaborateur === undefined) { |
||||||
|
throw new Error('Required parameter idCollaborateur was null or undefined when calling getProchainEPByCollaborateur.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<EpModel>('get',`${this.basePath}/ep/collaborateur/${encodeURIComponent(String(idCollaborateur))}/prochain`, |
||||||
|
{ |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* recevoir la liste de tous les prochaines EP collaborateurs |
||||||
|
* @param idBu id de la business unit à laquelle sont rattachées les données à récupérer |
||||||
|
* @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getProchainsEP(idBu?: number, idAgence?: number, observe?: 'body', reportProgress?: boolean): Observable<Array<EpModel>>; |
||||||
|
public getProchainsEP(idBu?: number, idAgence?: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<EpModel>>>; |
||||||
|
public getProchainsEP(idBu?: number, idAgence?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<EpModel>>>; |
||||||
|
public getProchainsEP(idBu?: number, idAgence?: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); |
||||||
|
if (idBu !== undefined && idBu !== null) { |
||||||
|
queryParameters = queryParameters.set('idBu', <any>idBu); |
||||||
|
} |
||||||
|
if (idAgence !== undefined && idAgence !== null) { |
||||||
|
queryParameters = queryParameters.set('idAgence', <any>idAgence); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<Array<EpModel>>('get',`${this.basePath}/ep/prochains`, |
||||||
|
{ |
||||||
|
params: queryParameters, |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* recevoir la liste de tous les prochaines EP que fera passer le référent |
||||||
|
* @param idReferent id referent |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getProchainsEPByReferent(idReferent: string, observe?: 'body', reportProgress?: boolean): Observable<Array<EpModel>>; |
||||||
|
public getProchainsEPByReferent(idReferent: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<EpModel>>>; |
||||||
|
public getProchainsEPByReferent(idReferent: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<EpModel>>>; |
||||||
|
public getProchainsEPByReferent(idReferent: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (idReferent === null || idReferent === undefined) { |
||||||
|
throw new Error('Required parameter idReferent was null or undefined when calling getProchainsEPByReferent.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<Array<EpModel>>('get',`${this.basePath}/ep/referent/${encodeURIComponent(String(idReferent))}/prochains`, |
||||||
|
{ |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* faire un rappel de signature EP |
||||||
|
* @param idEP id EP |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public rappelSignature(idEP: string, observe?: 'body', reportProgress?: boolean): Observable<any>; |
||||||
|
public rappelSignature(idEP: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>; |
||||||
|
public rappelSignature(idEP: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; |
||||||
|
public rappelSignature(idEP: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (idEP === null || idEP === undefined) { |
||||||
|
throw new Error('Required parameter idEP was null or undefined when calling rappelSignature.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<any>('get',`${this.basePath}/ep/${encodeURIComponent(String(idEP))}/rappelSignature`, |
||||||
|
{ |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* update ep |
||||||
|
* @param body
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public updateEP(body: EpModel, observe?: 'body', reportProgress?: boolean): Observable<any>; |
||||||
|
public updateEP(body: EpModel, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>; |
||||||
|
public updateEP(body: EpModel, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; |
||||||
|
public updateEP(body: EpModel, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (body === null || body === undefined) { |
||||||
|
throw new Error('Required parameter body was null or undefined when calling updateEP.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); |
||||||
|
if (httpContentTypeSelected != undefined) { |
||||||
|
headers = headers.set('Content-Type', httpContentTypeSelected); |
||||||
|
} |
||||||
|
|
||||||
|
return this.httpClient.request<any>('put',`${this.basePath}/ep/update`, |
||||||
|
{ |
||||||
|
body: body, |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,319 @@ |
|||||||
|
/** |
||||||
|
* API du serveur de l'application de digitalisation des EP |
||||||
|
* API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. |
||||||
|
* |
||||||
|
* OpenAPI spec version: 1.1.0 |
||||||
|
*
|
||||||
|
* |
||||||
|
* NOTE: This class is auto generated by the swagger code generator program. |
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually. |
||||||
|
*//* tslint:disable:no-unused-variable member-ordering */
|
||||||
|
|
||||||
|
import { Inject, Injectable, Optional } from '@angular/core'; |
||||||
|
import { HttpClient, HttpHeaders, HttpParams, |
||||||
|
HttpResponse, HttpEvent } from '@angular/common/http'; |
||||||
|
import { CustomHttpUrlEncodingCodec } from '../encoder'; |
||||||
|
|
||||||
|
import { Observable } from 'rxjs'; |
||||||
|
|
||||||
|
import { ErreurModel } from '../model/erreurModel'; |
||||||
|
import { FormationModel } from '../model/formationModel'; |
||||||
|
|
||||||
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; |
||||||
|
import { Configuration } from '../configuration'; |
||||||
|
|
||||||
|
|
||||||
|
@Injectable() |
||||||
|
export class FormationsService { |
||||||
|
|
||||||
|
protected basePath = 'http://localhost:3000/api'; |
||||||
|
public defaultHeaders = new HttpHeaders(); |
||||||
|
public configuration = new Configuration(); |
||||||
|
|
||||||
|
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { |
||||||
|
if (basePath) { |
||||||
|
this.basePath = basePath; |
||||||
|
} |
||||||
|
if (configuration) { |
||||||
|
this.configuration = configuration; |
||||||
|
this.basePath = basePath || configuration.basePath || this.basePath; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @param consumes string[] mime-types |
||||||
|
* @return true: consumes contains 'multipart/form-data', false: otherwise |
||||||
|
*/ |
||||||
|
private canConsumeForm(consumes: string[]): boolean { |
||||||
|
const form = 'multipart/form-data'; |
||||||
|
for (const consume of consumes) { |
||||||
|
if (form === consume) { |
||||||
|
return true; |
||||||
|
} |
||||||
|
} |
||||||
|
return false; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* Supprimer une formation |
||||||
|
* @param idFormation id formation |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public deleteFormation(idFormation: string, observe?: 'body', reportProgress?: boolean): Observable<any>; |
||||||
|
public deleteFormation(idFormation: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>; |
||||||
|
public deleteFormation(idFormation: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; |
||||||
|
public deleteFormation(idFormation: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (idFormation === null || idFormation === undefined) { |
||||||
|
throw new Error('Required parameter idFormation was null or undefined when calling deleteFormation.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<any>('delete',`${this.basePath}/formations/${encodeURIComponent(String(idFormation))}`, |
||||||
|
{ |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* ajouter une nouvelle formations |
||||||
|
* @param body
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public formationsPost(body: FormationModel, observe?: 'body', reportProgress?: boolean): Observable<any>; |
||||||
|
public formationsPost(body: FormationModel, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>; |
||||||
|
public formationsPost(body: FormationModel, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; |
||||||
|
public formationsPost(body: FormationModel, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (body === null || body === undefined) { |
||||||
|
throw new Error('Required parameter body was null or undefined when calling formationsPost.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); |
||||||
|
if (httpContentTypeSelected != undefined) { |
||||||
|
headers = headers.set('Content-Type', httpContentTypeSelected); |
||||||
|
} |
||||||
|
|
||||||
|
return this.httpClient.request<any>('post',`${this.basePath}/formations`, |
||||||
|
{ |
||||||
|
body: body, |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* Récupérer une formation par son id |
||||||
|
* @param idFormation id formation |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getFormationById(idFormation: string, observe?: 'body', reportProgress?: boolean): Observable<FormationModel>; |
||||||
|
public getFormationById(idFormation: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<FormationModel>>; |
||||||
|
public getFormationById(idFormation: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<FormationModel>>; |
||||||
|
public getFormationById(idFormation: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (idFormation === null || idFormation === undefined) { |
||||||
|
throw new Error('Required parameter idFormation was null or undefined when calling getFormationById.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<FormationModel>('get',`${this.basePath}/formations/${encodeURIComponent(String(idFormation))}`, |
||||||
|
{ |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* recevoir la liste des formations |
||||||
|
* @param idBu id de la business unit à laquelle sont rattachées les données à récupérer |
||||||
|
* @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getListeFormations(idBu?: number, idAgence?: number, observe?: 'body', reportProgress?: boolean): Observable<Array<FormationModel>>; |
||||||
|
public getListeFormations(idBu?: number, idAgence?: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<FormationModel>>>; |
||||||
|
public getListeFormations(idBu?: number, idAgence?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<FormationModel>>>; |
||||||
|
public getListeFormations(idBu?: number, idAgence?: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); |
||||||
|
if (idBu !== undefined && idBu !== null) { |
||||||
|
queryParameters = queryParameters.set('idBu', <any>idBu); |
||||||
|
} |
||||||
|
if (idAgence !== undefined && idAgence !== null) { |
||||||
|
queryParameters = queryParameters.set('idAgence', <any>idAgence); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<Array<FormationModel>>('get',`${this.basePath}/formations`, |
||||||
|
{ |
||||||
|
params: queryParameters, |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* update une formation |
||||||
|
* @param body
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public updateFormation(body: FormationModel, observe?: 'body', reportProgress?: boolean): Observable<any>; |
||||||
|
public updateFormation(body: FormationModel, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>; |
||||||
|
public updateFormation(body: FormationModel, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; |
||||||
|
public updateFormation(body: FormationModel, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (body === null || body === undefined) { |
||||||
|
throw new Error('Required parameter body was null or undefined when calling updateFormation.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); |
||||||
|
if (httpContentTypeSelected != undefined) { |
||||||
|
headers = headers.set('Content-Type', httpContentTypeSelected); |
||||||
|
} |
||||||
|
|
||||||
|
return this.httpClient.request<any>('put',`${this.basePath}/formations`, |
||||||
|
{ |
||||||
|
body: body, |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,221 @@ |
|||||||
|
/** |
||||||
|
* API du serveur de l'application de digitalisation des EP |
||||||
|
* API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. |
||||||
|
* |
||||||
|
* OpenAPI spec version: 1.1.0 |
||||||
|
*
|
||||||
|
* |
||||||
|
* NOTE: This class is auto generated by the swagger code generator program. |
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually. |
||||||
|
*//* tslint:disable:no-unused-variable member-ordering */
|
||||||
|
|
||||||
|
import { Inject, Injectable, Optional } from '@angular/core'; |
||||||
|
import { HttpClient, HttpHeaders, HttpParams, |
||||||
|
HttpResponse, HttpEvent } from '@angular/common/http'; |
||||||
|
import { CustomHttpUrlEncodingCodec } from '../encoder'; |
||||||
|
|
||||||
|
import { Observable } from 'rxjs'; |
||||||
|
|
||||||
|
import { CollaborateurModel } from '../model/collaborateurModel'; |
||||||
|
import { ErreurModel } from '../model/erreurModel'; |
||||||
|
|
||||||
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; |
||||||
|
import { Configuration } from '../configuration'; |
||||||
|
|
||||||
|
|
||||||
|
@Injectable() |
||||||
|
export class ReferentsService { |
||||||
|
|
||||||
|
protected basePath = 'http://localhost:3000/api'; |
||||||
|
public defaultHeaders = new HttpHeaders(); |
||||||
|
public configuration = new Configuration(); |
||||||
|
|
||||||
|
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { |
||||||
|
if (basePath) { |
||||||
|
this.basePath = basePath; |
||||||
|
} |
||||||
|
if (configuration) { |
||||||
|
this.configuration = configuration; |
||||||
|
this.basePath = basePath || configuration.basePath || this.basePath; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* @param consumes string[] mime-types |
||||||
|
* @return true: consumes contains 'multipart/form-data', false: otherwise |
||||||
|
*/ |
||||||
|
private canConsumeForm(consumes: string[]): boolean { |
||||||
|
const form = 'multipart/form-data'; |
||||||
|
for (const consume of consumes) { |
||||||
|
if (form === consume) { |
||||||
|
return true; |
||||||
|
} |
||||||
|
} |
||||||
|
return false; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* renvoie la liste des collaborateurs referents |
||||||
|
* @param idCollaborateur id collaborateur |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getReferentByCollaborateur(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable<Array<CollaborateurModel>>; |
||||||
|
public getReferentByCollaborateur(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<CollaborateurModel>>>; |
||||||
|
public getReferentByCollaborateur(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<CollaborateurModel>>>; |
||||||
|
public getReferentByCollaborateur(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (idCollaborateur === null || idCollaborateur === undefined) { |
||||||
|
throw new Error('Required parameter idCollaborateur was null or undefined when calling getReferentByCollaborateur.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<Array<CollaborateurModel>>('get',`${this.basePath}/referents/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, |
||||||
|
{ |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* recevoir un referent par son id |
||||||
|
* @param idReferent id referent |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getReferentById(idReferent: string, observe?: 'body', reportProgress?: boolean): Observable<CollaborateurModel>; |
||||||
|
public getReferentById(idReferent: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<CollaborateurModel>>; |
||||||
|
public getReferentById(idReferent: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<CollaborateurModel>>; |
||||||
|
public getReferentById(idReferent: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (idReferent === null || idReferent === undefined) { |
||||||
|
throw new Error('Required parameter idReferent was null or undefined when calling getReferentById.'); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<CollaborateurModel>('get',`${this.basePath}/referents/${encodeURIComponent(String(idReferent))}`, |
||||||
|
{ |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* recevoir la liste de tous les referents |
||||||
|
* @param cptechlead paramètre pour indiquer explicitement que l'on souhaite récupérer les CP et TeachLead dans la requête |
||||||
|
* @param idBu id de la business unit à laquelle sont rattachées les données à récupérer |
||||||
|
* @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer |
||||||
|
* @param referents paramètre pour indiquer explicitement que l'on souhaite récupérer les référents dans la requête |
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
||||||
|
* @param reportProgress flag to report request and response progress. |
||||||
|
*/ |
||||||
|
public getReferents(cptechlead?: boolean, idBu?: number, idAgence?: number, referents?: boolean, observe?: 'body', reportProgress?: boolean): Observable<Array<CollaborateurModel>>; |
||||||
|
public getReferents(cptechlead?: boolean, idBu?: number, idAgence?: number, referents?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<CollaborateurModel>>>; |
||||||
|
public getReferents(cptechlead?: boolean, idBu?: number, idAgence?: number, referents?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<CollaborateurModel>>>; |
||||||
|
public getReferents(cptechlead?: boolean, idBu?: number, idAgence?: number, referents?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); |
||||||
|
if (cptechlead !== undefined && cptechlead !== null) { |
||||||
|
queryParameters = queryParameters.set('cptechlead', <any>cptechlead); |
||||||
|
} |
||||||
|
if (idBu !== undefined && idBu !== null) { |
||||||
|
queryParameters = queryParameters.set('idBu', <any>idBu); |
||||||
|
} |
||||||
|
if (idAgence !== undefined && idAgence !== null) { |
||||||
|
queryParameters = queryParameters.set('idAgence', <any>idAgence); |
||||||
|
} |
||||||
|
if (referents !== undefined && referents !== null) { |
||||||
|
queryParameters = queryParameters.set('referents', <any>referents); |
||||||
|
} |
||||||
|
|
||||||
|
let headers = this.defaultHeaders; |
||||||
|
|
||||||
|
// authentication (bearerAuth) required
|
||||||
|
if (this.configuration.accessToken) { |
||||||
|
const accessToken = typeof this.configuration.accessToken === 'function' |
||||||
|
? this.configuration.accessToken() |
||||||
|
: this.configuration.accessToken; |
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken); |
||||||
|
} |
||||||
|
// to determine the Accept header
|
||||||
|
let httpHeaderAccepts: string[] = [ |
||||||
|
'application/json' |
||||||
|
]; |
||||||
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
||||||
|
if (httpHeaderAcceptSelected != undefined) { |
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected); |
||||||
|
} |
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [ |
||||||
|
]; |
||||||
|
|
||||||
|
return this.httpClient.request<Array<CollaborateurModel>>('get',`${this.basePath}/referents`, |
||||||
|
{ |
||||||
|
params: queryParameters, |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,18 @@ |
|||||||
|
/** |
||||||
|
* API du serveur de l'application de digitalisation des EP |
||||||
|
* API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. |
||||||
|
* |
||||||
|
* OpenAPI spec version: 1.1.0 |
||||||
|
*
|
||||||
|
* |
||||||
|
* NOTE: This class is auto generated by the swagger code generator program. |
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually. |
||||||
|
*/ |
||||||
|
import { BusinessUnitModel } from './businessUnitModel'; |
||||||
|
|
||||||
|
export interface AgenceModel {
|
||||||
|
id: number; |
||||||
|
nom: string; |
||||||
|
bus?: Array<BusinessUnitModel>; |
||||||
|
} |
@ -1,16 +1,18 @@ |
|||||||
/** |
/** |
||||||
* API du serveur de l'application de digitalisation des EP |
* API du serveur de l'application de digitalisation des EP |
||||||
* API qui seront utilisés afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. |
* API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. |
||||||
* |
* |
||||||
* OpenAPI spec version: 1.0.0 |
* OpenAPI spec version: 1.1.0 |
||||||
*
|
*
|
||||||
* |
* |
||||||
* NOTE: This class is auto generated by the swagger code generator program. |
* NOTE: This class is auto generated by the swagger code generator program. |
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
* Do not edit the class manually. |
* Do not edit the class manually. |
||||||
*/ |
*/ |
||||||
|
import { AgenceModel } from './agenceModel'; |
||||||
|
|
||||||
export interface BusinessUnitModel {
|
export interface BusinessUnitModel {
|
||||||
idBU: string; |
id: number; |
||||||
nom: string; |
nom: string; |
||||||
|
agence: AgenceModel; |
||||||
} |
} |
@ -1,19 +0,0 @@ |
|||||||
/** |
|
||||||
* API du serveur de l'application de digitalisation des EP |
|
||||||
* API qui seront utilisés afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. |
|
||||||
* |
|
||||||
* OpenAPI spec version: 1.0.0 |
|
||||||
*
|
|
||||||
* |
|
||||||
* NOTE: This class is auto generated by the swagger code generator program. |
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
|
||||||
* Do not edit the class manually. |
|
||||||
*/ |
|
||||||
|
|
||||||
export interface NotificationModel {
|
|
||||||
idNotification: number; |
|
||||||
typeNotification?: string; |
|
||||||
titre: string; |
|
||||||
description: string; |
|
||||||
lu: boolean; |
|
||||||
} |
|
@ -0,0 +1,19 @@ |
|||||||
|
/** |
||||||
|
* API du serveur de l'application de digitalisation des EP |
||||||
|
* API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. |
||||||
|
* |
||||||
|
* OpenAPI spec version: 1.1.0 |
||||||
|
*
|
||||||
|
* |
||||||
|
* NOTE: This class is auto generated by the swagger code generator program. |
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually. |
||||||
|
*/ |
||||||
|
import { CollaborateurModel } from './collaborateurModel'; |
||||||
|
import { EpModel } from './epModel'; |
||||||
|
|
||||||
|
export interface ParticipationEPModel {
|
||||||
|
id: number; |
||||||
|
collaborateur: CollaborateurModel; |
||||||
|
ep: EpModel; |
||||||
|
} |
@ -1,28 +0,0 @@ |
|||||||
/** |
|
||||||
* API du serveur de l'application de digitalisation des EP |
|
||||||
* API qui seront utilisés afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. |
|
||||||
* |
|
||||||
* OpenAPI spec version: 1.0.0 |
|
||||||
*
|
|
||||||
* |
|
||||||
* NOTE: This class is auto generated by the swagger code generator program. |
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
|
||||||
* Do not edit the class manually. |
|
||||||
*/ |
|
||||||
import { CollaborateurModel } from './collaborateurModel'; |
|
||||||
import { EpModel } from './epModel'; |
|
||||||
|
|
||||||
export interface ParticpantModel {
|
|
||||||
idParticipant: number; |
|
||||||
collaborateur: CollaborateurModel; |
|
||||||
role: ParticpantModel.RoleEnum; |
|
||||||
ep: EpModel; |
|
||||||
} |
|
||||||
export namespace ParticpantModel { |
|
||||||
export type RoleEnum = 'participant' | 'referent' | 'collaborateur'; |
|
||||||
export const RoleEnum = { |
|
||||||
Participant: 'participant' as RoleEnum, |
|
||||||
Referent: 'referent' as RoleEnum, |
|
||||||
Collaborateur: 'collaborateur' as RoleEnum |
|
||||||
}; |
|
||||||
} |
|
Loading…
Reference in new issue