diff --git a/src/app/api-swagger/.npmignore b/src/app/api-swagger/.npmignore new file mode 100644 index 0000000..7e981c4 --- /dev/null +++ b/src/app/api-swagger/.npmignore @@ -0,0 +1,5 @@ +wwwroot/*.js +node +node_modules +typings +dist diff --git a/src/app/api-swagger/.swagger-codegen-ignore b/src/app/api-swagger/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/src/app/api-swagger/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/app/api-swagger/.swagger-codegen/VERSION b/src/app/api-swagger/.swagger-codegen/VERSION new file mode 100644 index 0000000..87e5fea --- /dev/null +++ b/src/app/api-swagger/.swagger-codegen/VERSION @@ -0,0 +1 @@ +3.0.20 \ No newline at end of file diff --git a/src/app/api-swagger/api.module.ts b/src/app/api-swagger/api.module.ts new file mode 100644 index 0000000..48da2df --- /dev/null +++ b/src/app/api-swagger/api.module.ts @@ -0,0 +1,33 @@ +import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; +import { Configuration } from './configuration'; +import { HttpClient } from '@angular/common/http'; + + +import { DefaultService } from './api/default.service'; + +@NgModule({ + imports: [], + declarations: [], + exports: [], + providers: [ + DefaultService ] +}) +export class ApiModule { + public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { + return { + ngModule: ApiModule, + providers: [ { provide: Configuration, useFactory: configurationFactory } ] + }; + } + + constructor( @Optional() @SkipSelf() parentModule: ApiModule, + @Optional() http: HttpClient) { + if (parentModule) { + throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); + } + if (!http) { + throw new Error('You need to import the HttpClientModule in your AppModule! \n' + + 'See also https://github.com/angular/angular/issues/20575'); + } + } +} diff --git a/src/app/api-swagger/api/api.ts b/src/app/api-swagger/api/api.ts new file mode 100644 index 0000000..8e76619 --- /dev/null +++ b/src/app/api-swagger/api/api.ts @@ -0,0 +1,3 @@ +export * from './default.service'; +import { DefaultService } from './default.service'; +export const APIS = [DefaultService]; diff --git a/src/app/api-swagger/api/default.service.ts b/src/app/api-swagger/api/default.service.ts new file mode 100644 index 0000000..67b4014 --- /dev/null +++ b/src/app/api-swagger/api/default.service.ts @@ -0,0 +1,1280 @@ +/** + * 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. + *//* 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 { DemandeFormationModel } from '../model/demandeFormationModel'; +import { EpModel } from '../model/epModel'; +import { ErreurModel } from '../model/erreurModel'; +import { FormationModel } from '../model/formationModel'; + +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + +@Injectable() +export class DefaultService { + + 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 la liste des collaborateurs + * @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 collaborateursGet(observe?: 'body', reportProgress?: boolean): Observable>; + public collaborateursGet(observe?: 'response', reportProgress?: boolean): Observable>>; + public collaborateursGet(observe?: 'events', reportProgress?: boolean): Observable>>; + public collaborateursGet(observe: any = 'body', reportProgress: boolean = false ): Observable { + + 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>('get',`${this.basePath}/collaborateurs`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * 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 collaborateursIdCollaborateurGet(idCollaborateur: number, observe?: 'body', reportProgress?: boolean): Observable; + public collaborateursIdCollaborateurGet(idCollaborateur: number, observe?: 'response', reportProgress?: boolean): Observable>; + public collaborateursIdCollaborateurGet(idCollaborateur: number, observe?: 'events', reportProgress?: boolean): Observable>; + public collaborateursIdCollaborateurGet(idCollaborateur: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling collaborateursIdCollaborateurGet.'); + } + + 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('get',`${this.basePath}/collaborateurs/${encodeURIComponent(String(idCollaborateur))}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * recevoir la liste des demandes de formations + * @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 demandeformationCollaborateurIdCollaborateurGet(idCollaborateur: number, observe?: 'body', reportProgress?: boolean): Observable>; + public demandeformationCollaborateurIdCollaborateurGet(idCollaborateur: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public demandeformationCollaborateurIdCollaborateurGet(idCollaborateur: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public demandeformationCollaborateurIdCollaborateurGet(idCollaborateur: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling demandeformationCollaborateurIdCollaborateurGet.'); + } + + 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>('get',`${this.basePath}/demandeformation/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * recevoir la liste des demandes de formations + * @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 demandeformationGet(observe?: 'body', reportProgress?: boolean): Observable>; + public demandeformationGet(observe?: 'response', reportProgress?: boolean): Observable>>; + public demandeformationGet(observe?: 'events', reportProgress?: boolean): Observable>>; + public demandeformationGet(observe: any = 'body', reportProgress: boolean = false ): Observable { + + 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>('get',`${this.basePath}/demandeformation`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * creer une demande de formation pour un collaborateur + * @param body + * @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 demandeformationPost(body: DemandeFormationModel, idCollaborateur: number, observe?: 'body', reportProgress?: boolean): Observable; + public demandeformationPost(body: DemandeFormationModel, idCollaborateur: number, observe?: 'response', reportProgress?: boolean): Observable>; + public demandeformationPost(body: DemandeFormationModel, idCollaborateur: number, observe?: 'events', reportProgress?: boolean): Observable>; + public demandeformationPost(body: DemandeFormationModel, idCollaborateur: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling demandeformationPost.'); + } + + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling demandeformationPost.'); + } + + 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('post',`${this.basePath}/demandeformation`, + { + body: body, + 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 demandeformationPut(body: DemandeFormationModel, observe?: 'body', reportProgress?: boolean): Observable; + public demandeformationPut(body: DemandeFormationModel, observe?: 'response', reportProgress?: boolean): Observable>; + public demandeformationPut(body: DemandeFormationModel, observe?: 'events', reportProgress?: boolean): Observable>; + public demandeformationPut(body: DemandeFormationModel, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling demandeformationPut.'); + } + + 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('put',`${this.basePath}/demandeformation`, + { + body: body, + 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 epCollaborateurIdCollaborateurGet(idCollaborateur: number, observe?: 'body', reportProgress?: boolean): Observable>; + public epCollaborateurIdCollaborateurGet(idCollaborateur: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public epCollaborateurIdCollaborateurGet(idCollaborateur: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public epCollaborateurIdCollaborateurGet(idCollaborateur: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling epCollaborateurIdCollaborateurGet.'); + } + + 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>('get',`${this.basePath}/ep/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, + { + 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 epCollaborateurIdCollaborateurProchainsGet(idCollaborateur: number, observe?: 'body', reportProgress?: boolean): Observable; + public epCollaborateurIdCollaborateurProchainsGet(idCollaborateur: number, observe?: 'response', reportProgress?: boolean): Observable>; + public epCollaborateurIdCollaborateurProchainsGet(idCollaborateur: number, observe?: 'events', reportProgress?: boolean): Observable>; + public epCollaborateurIdCollaborateurProchainsGet(idCollaborateur: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling epCollaborateurIdCollaborateurProchainsGet.'); + } + + 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('get',`${this.basePath}/ep/collaborateur/${encodeURIComponent(String(idCollaborateur))}/prochain`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * 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 epEpiIdCollaborateurGet(idCollaborateur: number, idReferent: string, observe?: 'body', reportProgress?: boolean): Observable; + public epEpiIdCollaborateurGet(idCollaborateur: number, idReferent: string, observe?: 'response', reportProgress?: boolean): Observable>; + public epEpiIdCollaborateurGet(idCollaborateur: number, idReferent: string, observe?: 'events', reportProgress?: boolean): Observable>; + public epEpiIdCollaborateurGet(idCollaborateur: number, idReferent: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling epEpiIdCollaborateurGet.'); + } + + if (idReferent === null || idReferent === undefined) { + throw new Error('Required parameter idReferent was null or undefined when calling epEpiIdCollaborateurGet.'); + } + + 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('get',`${this.basePath}/ep/epi/${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 epIdEPGet(idEP: string, observe?: 'body', reportProgress?: boolean): Observable; + public epIdEPGet(idEP: string, observe?: 'response', reportProgress?: boolean): Observable>; + public epIdEPGet(idEP: string, observe?: 'events', reportProgress?: boolean): Observable>; + public epIdEPGet(idEP: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idEP === null || idEP === undefined) { + throw new Error('Required parameter idEP was null or undefined when calling epIdEPGet.'); + } + + 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('get',`${this.basePath}/ep/${encodeURIComponent(String(idEP))}`, + { + 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 epIdEPRappelSignatureGet(idEP: string, observe?: 'body', reportProgress?: boolean): Observable; + public epIdEPRappelSignatureGet(idEP: string, observe?: 'response', reportProgress?: boolean): Observable>; + public epIdEPRappelSignatureGet(idEP: string, observe?: 'events', reportProgress?: boolean): Observable>; + public epIdEPRappelSignatureGet(idEP: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idEP === null || idEP === undefined) { + throw new Error('Required parameter idEP was null or undefined when calling epIdEPRappelSignatureGet.'); + } + + 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('get',`${this.basePath}/ep/${encodeURIComponent(String(idEP))}/rappelSignature`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * recevoir la liste de tous les prochaines EP collaborateurs + * @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 epProchainsGet(observe?: 'body', reportProgress?: boolean): Observable>; + public epProchainsGet(observe?: 'response', reportProgress?: boolean): Observable>>; + public epProchainsGet(observe?: 'events', reportProgress?: boolean): Observable>>; + public epProchainsGet(observe: any = 'body', reportProgress: boolean = false ): Observable { + + 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>('get',`${this.basePath}/ep/prochains`, + { + 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 epReferentIdReferentGet(idReferent: string, observe?: 'body', reportProgress?: boolean): Observable>; + public epReferentIdReferentGet(idReferent: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public epReferentIdReferentGet(idReferent: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public epReferentIdReferentGet(idReferent: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idReferent === null || idReferent === undefined) { + throw new Error('Required parameter idReferent was null or undefined when calling epReferentIdReferentGet.'); + } + + 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>('get',`${this.basePath}/ep/referent/${encodeURIComponent(String(idReferent))}`, + { + 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 epReferentIdReferentProchainGet(idReferent: string, observe?: 'body', reportProgress?: boolean): Observable>; + public epReferentIdReferentProchainGet(idReferent: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public epReferentIdReferentProchainGet(idReferent: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public epReferentIdReferentProchainGet(idReferent: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idReferent === null || idReferent === undefined) { + throw new Error('Required parameter idReferent was null or undefined when calling epReferentIdReferentProchainGet.'); + } + + 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>('get',`${this.basePath}/ep/referent/${encodeURIComponent(String(idReferent))}/prochains`, + { + 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 epUpdatePut(body: EpModel, observe?: 'body', reportProgress?: boolean): Observable; + public epUpdatePut(body: EpModel, observe?: 'response', reportProgress?: boolean): Observable>; + public epUpdatePut(body: EpModel, observe?: 'events', reportProgress?: boolean): Observable>; + public epUpdatePut(body: EpModel, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling epUpdatePut.'); + } + + 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('put',`${this.basePath}/ep/update`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * Récupérer les formations d'un 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 formationsCollaborateurIdCollaborateurGet(idCollaborateur: number, observe?: 'body', reportProgress?: boolean): Observable>; + public formationsCollaborateurIdCollaborateurGet(idCollaborateur: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public formationsCollaborateurIdCollaborateurGet(idCollaborateur: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public formationsCollaborateurIdCollaborateurGet(idCollaborateur: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling formationsCollaborateurIdCollaborateurGet.'); + } + + 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>('get',`${this.basePath}/formations/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * recevoir la liste des formations + * @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 formationsGet(observe?: 'body', reportProgress?: boolean): Observable>; + public formationsGet(observe?: 'response', reportProgress?: boolean): Observable>>; + public formationsGet(observe?: 'events', reportProgress?: boolean): Observable>>; + public formationsGet(observe: any = 'body', reportProgress: boolean = false ): Observable { + + 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>('get',`${this.basePath}/formations`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * 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 formationsIdFormationDelete(idFormation: string, observe?: 'body', reportProgress?: boolean): Observable; + public formationsIdFormationDelete(idFormation: string, observe?: 'response', reportProgress?: boolean): Observable>; + public formationsIdFormationDelete(idFormation: string, observe?: 'events', reportProgress?: boolean): Observable>; + public formationsIdFormationDelete(idFormation: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idFormation === null || idFormation === undefined) { + throw new Error('Required parameter idFormation was null or undefined when calling formationsIdFormationDelete.'); + } + + 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('delete',`${this.basePath}/formations/${encodeURIComponent(String(idFormation))}`, + { + 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 formationsIdFormationGet(idFormation: string, observe?: 'body', reportProgress?: boolean): Observable; + public formationsIdFormationGet(idFormation: string, observe?: 'response', reportProgress?: boolean): Observable>; + public formationsIdFormationGet(idFormation: string, observe?: 'events', reportProgress?: boolean): Observable>; + public formationsIdFormationGet(idFormation: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idFormation === null || idFormation === undefined) { + throw new Error('Required parameter idFormation was null or undefined when calling formationsIdFormationGet.'); + } + + 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('get',`${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; + public formationsPost(body: FormationModel, observe?: 'response', reportProgress?: boolean): Observable>; + public formationsPost(body: FormationModel, observe?: 'events', reportProgress?: boolean): Observable>; + public formationsPost(body: FormationModel, observe: any = 'body', reportProgress: boolean = false ): Observable { + + 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('post',`${this.basePath}/formations`, + { + body: body, + 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 formationsPut(body: FormationModel, observe?: 'body', reportProgress?: boolean): Observable; + public formationsPut(body: FormationModel, observe?: 'response', reportProgress?: boolean): Observable>; + public formationsPut(body: FormationModel, observe?: 'events', reportProgress?: boolean): Observable>; + public formationsPut(body: FormationModel, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling formationsPut.'); + } + + 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('put',`${this.basePath}/formations`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * 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 referentsCollaborateurIdCollaborateurGet(idCollaborateur: number, observe?: 'body', reportProgress?: boolean): Observable>; + public referentsCollaborateurIdCollaborateurGet(idCollaborateur: number, observe?: 'response', reportProgress?: boolean): Observable>>; + public referentsCollaborateurIdCollaborateurGet(idCollaborateur: number, observe?: 'events', reportProgress?: boolean): Observable>>; + public referentsCollaborateurIdCollaborateurGet(idCollaborateur: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling referentsCollaborateurIdCollaborateurGet.'); + } + + 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>('get',`${this.basePath}/referents/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * recevoir la liste de tous les referents + * @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 referentsGet(observe?: 'body', reportProgress?: boolean): Observable>; + public referentsGet(observe?: 'response', reportProgress?: boolean): Observable>>; + public referentsGet(observe?: 'events', reportProgress?: boolean): Observable>>; + public referentsGet(observe: any = 'body', reportProgress: boolean = false ): Observable { + + 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>('get',`${this.basePath}/referents`, + { + 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 referentsIdReferentGet(idReferent: string, observe?: 'body', reportProgress?: boolean): Observable; + public referentsIdReferentGet(idReferent: string, observe?: 'response', reportProgress?: boolean): Observable>; + public referentsIdReferentGet(idReferent: string, observe?: 'events', reportProgress?: boolean): Observable>; + public referentsIdReferentGet(idReferent: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idReferent === null || idReferent === undefined) { + throw new Error('Required parameter idReferent was null or undefined when calling referentsIdReferentGet.'); + } + + 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('get',`${this.basePath}/referents/${encodeURIComponent(String(idReferent))}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * recevoir un collaborateur par son mail + * @param mail mail utilisateur + * @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 userinfoGet(mail?: string, observe?: 'body', reportProgress?: boolean): Observable; + public userinfoGet(mail?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public userinfoGet(mail?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public userinfoGet(mail?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + + let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (mail !== undefined && mail !== null) { + queryParameters = queryParameters.set('mail', mail); + } + + 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('get',`${this.basePath}/userinfo`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/api-swagger/configuration.ts b/src/app/api-swagger/configuration.ts new file mode 100644 index 0000000..82e8458 --- /dev/null +++ b/src/app/api-swagger/configuration.ts @@ -0,0 +1,79 @@ +export interface ConfigurationParameters { + apiKeys?: {[ key: string ]: string}; + username?: string; + password?: string; + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; +} + +export class Configuration { + apiKeys?: {[ key: string ]: string}; + username?: string; + password?: string; + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; + + constructor(configurationParameters: ConfigurationParameters = {}) { + this.apiKeys = configurationParameters.apiKeys; + this.username = configurationParameters.username; + this.password = configurationParameters.password; + this.accessToken = configurationParameters.accessToken; + this.basePath = configurationParameters.basePath; + this.withCredentials = configurationParameters.withCredentials; + } + + /** + * Select the correct content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param contentTypes - the array of content types that are available for selection + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderContentType (contentTypes: string[]): string | undefined { + if (contentTypes.length == 0) { + return undefined; + } + + let type = contentTypes.find(x => this.isJsonMime(x)); + if (type === undefined) { + return contentTypes[0]; + } + return type; + } + + /** + * Select the correct accept content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param accepts - the array of content types that are available for selection. + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderAccept(accepts: string[]): string | undefined { + if (accepts.length == 0) { + return undefined; + } + + let type = accepts.find(x => this.isJsonMime(x)); + if (type === undefined) { + return accepts[0]; + } + return type; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/src/app/api-swagger/encoder.ts b/src/app/api-swagger/encoder.ts new file mode 100644 index 0000000..f1c6b78 --- /dev/null +++ b/src/app/api-swagger/encoder.ts @@ -0,0 +1,18 @@ + import { HttpUrlEncodingCodec } from '@angular/common/http'; + +/** +* CustomHttpUrlEncodingCodec +* Fix plus sign (+) not encoding, so sent as blank space +* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318 +*/ +export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec { + encodeKey(k: string): string { + k = super.encodeKey(k); + return k.replace(/\+/gi, '%2B'); + } + encodeValue(v: string): string { + v = super.encodeValue(v); + return v.replace(/\+/gi, '%2B'); + } +} + diff --git a/src/app/api-swagger/index.ts b/src/app/api-swagger/index.ts new file mode 100644 index 0000000..c312b70 --- /dev/null +++ b/src/app/api-swagger/index.ts @@ -0,0 +1,5 @@ +export * from './api/api'; +export * from './model/models'; +export * from './variables'; +export * from './configuration'; +export * from './api.module'; \ No newline at end of file diff --git a/src/app/api-swagger/model/augmentationSalaireModel.ts b/src/app/api-swagger/model/augmentationSalaireModel.ts new file mode 100644 index 0000000..98d9a6c --- /dev/null +++ b/src/app/api-swagger/model/augmentationSalaireModel.ts @@ -0,0 +1,19 @@ +/** + * 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 { EpModel } from './epModel'; + +export interface AugmentationSalaireModel { + idAugmentation: number; + nouveauSalaire: number; + dateDemande: string; + ep: EpModel; +} \ No newline at end of file diff --git a/src/app/api-swagger/model/collaborateurModel.ts b/src/app/api-swagger/model/collaborateurModel.ts new file mode 100644 index 0000000..8e3a30d --- /dev/null +++ b/src/app/api-swagger/model/collaborateurModel.ts @@ -0,0 +1,22 @@ +/** + * 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 CollaborateurModel { + idCollaborateur: string; + nom: string; + prenom: string; + mail?: string; + agence: string; + fonction: string; + dateEmbauche: string; + dateDepart?: string; +} \ No newline at end of file diff --git a/src/app/api-swagger/model/critereModel.ts b/src/app/api-swagger/model/critereModel.ts new file mode 100644 index 0000000..0bef2dd --- /dev/null +++ b/src/app/api-swagger/model/critereModel.ts @@ -0,0 +1,19 @@ +/** + * 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 CritereModel { + idCritere: number; + texte: string; + type: string; + ordre: string; + section: string; +} \ No newline at end of file diff --git a/src/app/api-swagger/model/demandeDelegationModel.ts b/src/app/api-swagger/model/demandeDelegationModel.ts new file mode 100644 index 0000000..6679283 --- /dev/null +++ b/src/app/api-swagger/model/demandeDelegationModel.ts @@ -0,0 +1,23 @@ +/** + * 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 DemandeDelegationModel { + idDemande: number; + ep: EpModel; + nouveauRef: CollaborateurModel; + reponse?: boolean; + dateDemande: Date; + dateReponse?: Date; + raisonRefus?: string; +} \ No newline at end of file diff --git a/src/app/api-swagger/model/demandeFormationModel.ts b/src/app/api-swagger/model/demandeFormationModel.ts new file mode 100644 index 0000000..9ad4948 --- /dev/null +++ b/src/app/api-swagger/model/demandeFormationModel.ts @@ -0,0 +1,22 @@ +/** + * 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 { EpModel } from './epModel'; +import { ThemeModel } from './themeModel'; + +export interface DemandeFormationModel { + idDemandeformation: number; + ep: EpModel; + status: string; + libelle: string; + description: string; + theme: ThemeModel; +} \ No newline at end of file diff --git a/src/app/api-swagger/model/engagementModel.ts b/src/app/api-swagger/model/engagementModel.ts new file mode 100644 index 0000000..39493cb --- /dev/null +++ b/src/app/api-swagger/model/engagementModel.ts @@ -0,0 +1,20 @@ +/** + * 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 { EpModel } from './epModel'; + +export interface EngagementModel { + idEngagement: number; + engagement: string; + dateLimite: string; + accomplie?: boolean; + ep: EpModel; +} \ No newline at end of file diff --git a/src/app/api-swagger/model/epModel.ts b/src/app/api-swagger/model/epModel.ts new file mode 100644 index 0000000..332037b --- /dev/null +++ b/src/app/api-swagger/model/epModel.ts @@ -0,0 +1,40 @@ +/** + * 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 { AugmentationSalaireModel } from './augmentationSalaireModel'; +import { CollaborateurModel } from './collaborateurModel'; +import { DemandeDelegationModel } from './demandeDelegationModel'; +import { EngagementModel } from './engagementModel'; +import { NotificationModel } from './notificationModel'; +import { ParticpantModel } from './particpantModel'; +import { RDVEntretienModel } from './rDVEntretienModel'; + +export interface EpModel { + idEp: number; + typeEP: string; + dateCreation: string; + dateDisponibilite: string; + dateSaisie?: string; + etat: number; + cv?: string; + dateEntretien?: Date; + typeEntretien?: string; + commentaireCommercial?: string; + rdvEntretien?: Array; + augmentationSalaire?: AugmentationSalaireModel; + participants: Array; + collaborateur: CollaborateurModel; + referent: CollaborateurModel; + nbRappelSignature?: number; + notifications?: Array; + engagements?: Array; + delegation?: DemandeDelegationModel; +} \ No newline at end of file diff --git a/src/app/api-swagger/model/erreurModel.ts b/src/app/api-swagger/model/erreurModel.ts new file mode 100644 index 0000000..0052f10 --- /dev/null +++ b/src/app/api-swagger/model/erreurModel.ts @@ -0,0 +1,16 @@ +/** + * 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 ErreurModel { + code: string; + message: string; +} \ No newline at end of file diff --git a/src/app/api-swagger/model/evaluationFormationModel.ts b/src/app/api-swagger/model/evaluationFormationModel.ts new file mode 100644 index 0000000..1e84c4f --- /dev/null +++ b/src/app/api-swagger/model/evaluationFormationModel.ts @@ -0,0 +1,19 @@ +/** + * 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 { CritereModel } from './critereModel'; + +export interface EvaluationFormationModel { + idEvaluation: number; + note?: number; + commentaire?: string; + critere: CritereModel; +} \ No newline at end of file diff --git a/src/app/api-swagger/model/formationModel.ts b/src/app/api-swagger/model/formationModel.ts new file mode 100644 index 0000000..dd74457 --- /dev/null +++ b/src/app/api-swagger/model/formationModel.ts @@ -0,0 +1,34 @@ +/** + * 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 { ParticipationFormationModel } from './participationFormationModel'; + +export interface FormationModel { + idFormation: number; + intitule: string; + dateDebut: Date; + dateFin: Date; + status: FormationModel.StatusEnum; + lieu: string; + duree: number; + organisme: string; + nomFormateur: string; + participantsFormation?: Array; +} +export namespace FormationModel { + export type StatusEnum = 'Planifiée' | 'Replanifiée' | 'Annulée' | 'Réalisée'; + export const StatusEnum = { + Planifie: 'Planifiée' as StatusEnum, + Replanifie: 'Replanifiée' as StatusEnum, + Annule: 'Annulée' as StatusEnum, + Ralise: 'Réalisée' as StatusEnum + }; +} \ No newline at end of file diff --git a/src/app/api-swagger/model/models.ts b/src/app/api-swagger/model/models.ts new file mode 100644 index 0000000..6891462 --- /dev/null +++ b/src/app/api-swagger/model/models.ts @@ -0,0 +1,15 @@ +export * from './augmentationSalaireModel'; +export * from './collaborateurModel'; +export * from './critereModel'; +export * from './demandeDelegationModel'; +export * from './demandeFormationModel'; +export * from './engagementModel'; +export * from './epModel'; +export * from './erreurModel'; +export * from './evaluationFormationModel'; +export * from './formationModel'; +export * from './notificationModel'; +export * from './participationFormationModel'; +export * from './particpantModel'; +export * from './rDVEntretienModel'; +export * from './themeModel'; diff --git a/src/app/api-swagger/model/notificationModel.ts b/src/app/api-swagger/model/notificationModel.ts new file mode 100644 index 0000000..b27db3d --- /dev/null +++ b/src/app/api-swagger/model/notificationModel.ts @@ -0,0 +1,19 @@ +/** + * 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; +} \ No newline at end of file diff --git a/src/app/api-swagger/model/participationFormationModel.ts b/src/app/api-swagger/model/participationFormationModel.ts new file mode 100644 index 0000000..de7a88b --- /dev/null +++ b/src/app/api-swagger/model/participationFormationModel.ts @@ -0,0 +1,21 @@ +/** + * 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 { EvaluationFormationModel } from './evaluationFormationModel'; +import { FormationModel } from './formationModel'; + +export interface ParticipationFormationModel { + idParticipation: number; + formation: FormationModel; + collaborateur: CollaborateurModel; + evaluation?: Array; +} \ No newline at end of file diff --git a/src/app/api-swagger/model/particpantModel.ts b/src/app/api-swagger/model/particpantModel.ts new file mode 100644 index 0000000..ccf8e9d --- /dev/null +++ b/src/app/api-swagger/model/particpantModel.ts @@ -0,0 +1,28 @@ +/** + * 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 + }; +} \ No newline at end of file diff --git a/src/app/api-swagger/model/rDVEntretienModel.ts b/src/app/api-swagger/model/rDVEntretienModel.ts new file mode 100644 index 0000000..9b8221b --- /dev/null +++ b/src/app/api-swagger/model/rDVEntretienModel.ts @@ -0,0 +1,17 @@ +/** + * 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 RDVEntretienModel { + idTypeEntretien: number; + typeEntretien: string; + dateEntretien: Date; +} \ No newline at end of file diff --git a/src/app/api-swagger/model/themeModel.ts b/src/app/api-swagger/model/themeModel.ts new file mode 100644 index 0000000..d331538 --- /dev/null +++ b/src/app/api-swagger/model/themeModel.ts @@ -0,0 +1,16 @@ +/** + * 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 ThemeModel { + idTheme: number; + nom: string; +} \ No newline at end of file diff --git a/src/app/api-swagger/ng-package.json b/src/app/api-swagger/ng-package.json new file mode 100644 index 0000000..3b17900 --- /dev/null +++ b/src/app/api-swagger/ng-package.json @@ -0,0 +1,6 @@ +{ + "$schema": "./node_modules/ng-packagr/ng-package.schema.json", + "lib": { + "entryFile": "index.ts" + } +} diff --git a/src/app/api-swagger/variables.ts b/src/app/api-swagger/variables.ts new file mode 100644 index 0000000..6fe5854 --- /dev/null +++ b/src/app/api-swagger/variables.ts @@ -0,0 +1,9 @@ +import { InjectionToken } from '@angular/core'; + +export const BASE_PATH = new InjectionToken('basePath'); +export const COLLECTION_FORMATS = { + 'csv': ',', + 'tsv': ' ', + 'ssv': ' ', + 'pipes': '|' +} diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 62abeb4..f71becb 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -8,6 +8,7 @@ import { KeycloakAngularModule, KeycloakService } from 'keycloak-angular'; import { AppComponent } from './app.component'; import { AppRoutingModule } from './app-routing.module'; import { MaterialModule } from "./angular-material/angular-material.module"; +import { ApiModule } from './api-swagger' import { HomeComponent, HomeAssistanteComponent, HomeCollaborateurComponent, HomeCommercialComponent, HomeRHComponent } from './home'; @@ -41,7 +42,8 @@ let keycloakService: KeycloakService = new KeycloakService(); BrowserAnimationsModule, MaterialModule, HttpClientModule, - FormsModule + FormsModule, + ApiModule ], providers: [ { diff --git a/src/app/home/home-assistante/home-assistante.component.ts b/src/app/home/home-assistante/home-assistante.component.ts index ad96afe..3fda334 100644 --- a/src/app/home/home-assistante/home-assistante.component.ts +++ b/src/app/home/home-assistante/home-assistante.component.ts @@ -11,7 +11,7 @@ import { ServiceCollaborateur, ServiceEP } from "../../service"; import { CollaborateurModel } from "../../modeles/modele-collaborateur"; import { EpModel } from "../../modeles/modele-ep"; import { DisplayEP } from "../../utils/displayEP"; - +import { DefaultService } from "../../api-swagger/api/api"; /** * Le composant home qui sera affiché uniquement pour les assistantes. @@ -73,7 +73,7 @@ export class HomeAssistanteComponent implements OnInit, AfterViewInit { chargement = true; constructor(public keycloakService : KeycloakService, private serviceCollaborateur : ServiceCollaborateur, - private serviceEP : ServiceEP) { + private serviceEP : ServiceEP, private service:DefaultService) { } ngAfterViewInit() { @@ -121,7 +121,8 @@ export class HomeAssistanteComponent implements OnInit, AfterViewInit { */ ngOnInit() { console.log("INIT"); - this.epDisponiblesSubscription = this.serviceEP.listeEPDisponibles(). + //this.epDisponiblesSubscription = this.serviceEP.listeEPDisponibles(). + this.epDisponiblesSubscription = this.service.epProchainsGet(). subscribe(eps => { this.initDisplay(eps); this.refreshDataSource();