@metarisc/metarisc-js 0.0.1-alpha.56 → 0.0.1-alpha.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/CommissionsAPI.js +1 -1
- package/lib/api/DossiersAPI.js +2 -2
- package/lib/api/EvenementsAPI.js +2 -2
- package/lib/api/OrganisationsAPI.d.ts +8 -1
- package/lib/api/OrganisationsAPI.js +15 -0
- package/lib/api/TournesDECIAPI.d.ts +1 -1
- package/lib/api/TournesDECIAPI.js +3 -3
- package/lib/model/AddOrganisationMembresRequest.d.ts +3 -0
- package/lib/model/AddOrganisationMembresRequest.js +2 -0
- package/lib/model/TourneeDeciPei.d.ts +2 -2
- package/lib/model/TourneeDeciPeiListeAnomaliesInner.d.ts +5 -0
- package/lib/model/TourneeDeciPeiListeAnomaliesInner.js +2 -0
- package/lib/model/UpdateTourneeDeciPeiRequest.d.ts +9 -3
- package/lib/model/UpdateTourneeDeciPeiRequest.js +8 -0
- package/lib/model/UpdateTourneeDeciPeiRequestListeAnomaliesInner.d.ts +4 -0
- package/lib/model/UpdateTourneeDeciPeiRequestListeAnomaliesInner.js +2 -0
- package/lib/utils.d.ts +4 -0
- package/lib/utils.js +11 -0
- package/package.json +1 -1
- package/src/api/CommissionsAPI.ts +1 -1
- package/src/api/DossiersAPI.ts +2 -2
- package/src/api/EvenementsAPI.ts +2 -2
- package/src/api/OrganisationsAPI.ts +19 -1
- package/src/api/TournesDECIAPI.ts +4 -4
- package/src/model/AddOrganisationMembresRequest.ts +3 -0
- package/src/model/TourneeDeciPei.ts +2 -2
- package/src/model/TourneeDeciPeiListeAnomaliesInner.ts +6 -0
- package/src/model/UpdateTourneeDeciPeiRequest.ts +10 -3
- package/src/model/UpdateTourneeDeciPeiRequestListeAnomaliesInner.ts +4 -0
- package/src/utils.ts +14 -0
|
@@ -124,7 +124,7 @@ class CommissionsAPI extends core_1.Core {
|
|
|
124
124
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}/dates'),
|
|
125
125
|
headers: {},
|
|
126
126
|
params: {},
|
|
127
|
-
body: { 'libelle': postCommissionDateRequest?.libelle, 'type': postCommissionDateRequest?.type, 'date_de_debut': postCommissionDateRequest?.date_de_debut, 'date_de_fin': postCommissionDateRequest?.date_de_fin }
|
|
127
|
+
body: { 'libelle': postCommissionDateRequest?.libelle, 'type': postCommissionDateRequest?.type, 'date_de_debut': utils_1.Utils.formatDate(postCommissionDateRequest?.date_de_debut), 'date_de_fin': utils_1.Utils.formatDate(postCommissionDateRequest?.date_de_fin) }
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
130
|
/**
|
package/lib/api/DossiersAPI.js
CHANGED
|
@@ -144,7 +144,7 @@ class DossiersAPI extends core_1.Core {
|
|
|
144
144
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/dossiers/{dossier_id}'),
|
|
145
145
|
headers: {},
|
|
146
146
|
params: {},
|
|
147
|
-
body: { 'id': dossier?.id, 'type': dossier?.type, 'description': dossier?.description, 'date_de_creation': dossier?.date_de_creation, 'createur': dossier?.createur, 'application_utilisee_nom': dossier?.application_utilisee_nom, 'statut': dossier?.statut, 'objet': dossier?.objet, 'pei': dossier?.pei, 'erp': dossier?.erp, 'workflow_actif': dossier?.workflow_actif }
|
|
147
|
+
body: { 'id': dossier?.id, 'type': dossier?.type, 'description': dossier?.description, 'date_de_creation': utils_1.Utils.formatDate(dossier?.date_de_creation), 'createur': dossier?.createur, 'application_utilisee_nom': dossier?.application_utilisee_nom, 'statut': dossier?.statut, 'objet': dossier?.objet, 'pei': dossier?.pei, 'erp': dossier?.erp, 'workflow_actif': dossier?.workflow_actif }
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
150
|
/**
|
|
@@ -174,7 +174,7 @@ class DossiersAPI extends core_1.Core {
|
|
|
174
174
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/dossiers/{dossier_id}/workflows/{workflow_id}'),
|
|
175
175
|
headers: {},
|
|
176
176
|
params: {},
|
|
177
|
-
body: { 'est_valide': updateDossierWorkflowsDetailsRequest?.est_valide, 'passage_commission_id': updateDossierWorkflowsDetailsRequest?.passage_commission_id, 'avis_favorable': updateDossierWorkflowsDetailsRequest?.avis_favorable, 'commission_id': updateDossierWorkflowsDetailsRequest?.commission_id, 'date_arrivee_secretariat': updateDossierWorkflowsDetailsRequest?.date_arrivee_secretariat, 'analyse_de_risque': updateDossierWorkflowsDetailsRequest?.analyse_de_risque, 'avis_rapporteur': updateDossierWorkflowsDetailsRequest?.avis_rapporteur, 'descriptif_effectifs': updateDossierWorkflowsDetailsRequest?.descriptif_effectifs, 'facteur_dangerosite': updateDossierWorkflowsDetailsRequest?.facteur_dangerosite, 'derogations': updateDossierWorkflowsDetailsRequest?.derogations, 'prescriptions': updateDossierWorkflowsDetailsRequest?.prescriptions, 'mesures_compensatoires': updateDossierWorkflowsDetailsRequest?.mesures_compensatoires, 'mesures_complementaires': updateDossierWorkflowsDetailsRequest?.mesures_complementaires, 'observations': updateDossierWorkflowsDetailsRequest?.observations, 'termine': updateDossierWorkflowsDetailsRequest?.termine }
|
|
177
|
+
body: { 'est_valide': updateDossierWorkflowsDetailsRequest?.est_valide, 'passage_commission_id': updateDossierWorkflowsDetailsRequest?.passage_commission_id, 'avis_favorable': updateDossierWorkflowsDetailsRequest?.avis_favorable, 'commission_id': updateDossierWorkflowsDetailsRequest?.commission_id, 'date_arrivee_secretariat': utils_1.Utils.formatDate(updateDossierWorkflowsDetailsRequest?.date_arrivee_secretariat), 'analyse_de_risque': updateDossierWorkflowsDetailsRequest?.analyse_de_risque, 'avis_rapporteur': updateDossierWorkflowsDetailsRequest?.avis_rapporteur, 'descriptif_effectifs': updateDossierWorkflowsDetailsRequest?.descriptif_effectifs, 'facteur_dangerosite': updateDossierWorkflowsDetailsRequest?.facteur_dangerosite, 'derogations': updateDossierWorkflowsDetailsRequest?.derogations, 'prescriptions': updateDossierWorkflowsDetailsRequest?.prescriptions, 'mesures_compensatoires': updateDossierWorkflowsDetailsRequest?.mesures_compensatoires, 'mesures_complementaires': updateDossierWorkflowsDetailsRequest?.mesures_complementaires, 'observations': updateDossierWorkflowsDetailsRequest?.observations, 'termine': updateDossierWorkflowsDetailsRequest?.termine }
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
}
|
package/lib/api/EvenementsAPI.js
CHANGED
|
@@ -33,7 +33,7 @@ class EvenementsAPI extends core_1.Core {
|
|
|
33
33
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/evenements/{evenement_id}'),
|
|
34
34
|
headers: {},
|
|
35
35
|
params: {},
|
|
36
|
-
body: { 'id': evenement?.id, 'title': evenement?.title, 'type': evenement?.type, 'description': evenement?.description, 'date_debut': evenement?.date_debut, 'date_fin': evenement?.date_fin }
|
|
36
|
+
body: { 'id': evenement?.id, 'title': evenement?.title, 'type': evenement?.type, 'description': evenement?.description, 'date_debut': utils_1.Utils.formatDate(evenement?.date_debut), 'date_fin': utils_1.Utils.formatDate(evenement?.date_fin) }
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
@@ -80,7 +80,7 @@ class EvenementsAPI extends core_1.Core {
|
|
|
80
80
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/evenements'),
|
|
81
81
|
headers: {},
|
|
82
82
|
params: {},
|
|
83
|
-
body: { 'title': postEvenementRequest?.title, 'type': postEvenementRequest?.type, 'description': postEvenementRequest?.description, 'date_debut': postEvenementRequest?.date_debut, 'date_fin': postEvenementRequest?.date_fin }
|
|
83
|
+
body: { 'title': postEvenementRequest?.title, 'type': postEvenementRequest?.type, 'description': postEvenementRequest?.description, 'date_debut': utils_1.Utils.formatDate(postEvenementRequest?.date_debut), 'date_fin': utils_1.Utils.formatDate(postEvenementRequest?.date_fin) }
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -2,13 +2,20 @@ import { Core, MetariscConfig } from "../core";
|
|
|
2
2
|
import type { AxiosResponse } from "axios";
|
|
3
3
|
import { Client } from "../client";
|
|
4
4
|
import { Collection } from "../collection";
|
|
5
|
+
import { AddOrganisationMembresRequest } from '../model/AddOrganisationMembresRequest';
|
|
5
6
|
import { GetOrganisationReglesDeci200Response } from '../model/GetOrganisationReglesDeci200Response';
|
|
6
7
|
import { Organisation } from '../model/Organisation';
|
|
8
|
+
import { OrganisationMembre } from '../model/OrganisationMembre';
|
|
7
9
|
import { WorkflowType } from '../model/WorkflowType';
|
|
8
10
|
import { OrganisationGeoservice } from '../model/OrganisationGeoservice';
|
|
9
|
-
import { OrganisationMembre } from '../model/OrganisationMembre';
|
|
10
11
|
export declare class OrganisationsAPI extends Core {
|
|
11
12
|
constructor(config: MetariscConfig, client?: Client);
|
|
13
|
+
/**
|
|
14
|
+
* Ajout d'un utilisateur comme membre dans une organisation.
|
|
15
|
+
* @param orgId Identifiant unique de l'Organisation
|
|
16
|
+
* @param addOrganisationMembresRequest
|
|
17
|
+
*/
|
|
18
|
+
addOrganisationMembres(orgId: string, addOrganisationMembresRequest?: AddOrganisationMembresRequest): Promise<AxiosResponse<OrganisationMembre>>;
|
|
12
19
|
/**
|
|
13
20
|
* Récupération des détails d'une organisation.
|
|
14
21
|
* @param orgId Identifiant unique de l'Organisation
|
|
@@ -7,6 +7,21 @@ class OrganisationsAPI extends core_1.Core {
|
|
|
7
7
|
constructor(config, client) {
|
|
8
8
|
super(config, client);
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Ajout d'un utilisateur comme membre dans une organisation.
|
|
12
|
+
* @param orgId Identifiant unique de l'Organisation
|
|
13
|
+
* @param addOrganisationMembresRequest
|
|
14
|
+
*/
|
|
15
|
+
async addOrganisationMembres(orgId, addOrganisationMembresRequest) {
|
|
16
|
+
const pathVariable = { 'org_id': (new String(orgId)).toString() };
|
|
17
|
+
return this.request({
|
|
18
|
+
method: 'POST',
|
|
19
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/organisations/{org_id}/membres'),
|
|
20
|
+
headers: {},
|
|
21
|
+
params: {},
|
|
22
|
+
body: { 'utilisateur_id': addOrganisationMembresRequest?.utilisateur_id }
|
|
23
|
+
});
|
|
24
|
+
}
|
|
10
25
|
/**
|
|
11
26
|
* Récupération des détails d'une organisation.
|
|
12
27
|
* @param orgId Identifiant unique de l'Organisation
|
|
@@ -70,5 +70,5 @@ export declare class TournesDECIAPI extends Core {
|
|
|
70
70
|
* @param peiId Identifiant du PEI lié au contrôle
|
|
71
71
|
* @param updateTourneeDeciPeiRequest
|
|
72
72
|
*/
|
|
73
|
-
updateTourneeDeciPei(tourneeDeciId: string, peiId: string, updateTourneeDeciPeiRequest?: UpdateTourneeDeciPeiRequest): Promise<AxiosResponse<
|
|
73
|
+
updateTourneeDeciPei(tourneeDeciId: string, peiId: string, updateTourneeDeciPeiRequest?: UpdateTourneeDeciPeiRequest): Promise<AxiosResponse<TourneeDeciPei>>;
|
|
74
74
|
}
|
|
@@ -109,7 +109,7 @@ class TournesDECIAPI extends core_1.Core {
|
|
|
109
109
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/tournees_deci'),
|
|
110
110
|
headers: {},
|
|
111
111
|
params: {},
|
|
112
|
-
body: { 'libelle': postTourneeDeciRequest?.libelle, 'description': postTourneeDeciRequest?.description, 'date_de_debut': postTourneeDeciRequest?.date_de_debut, 'date_de_fin': postTourneeDeciRequest?.date_de_fin, 'mois_debut': postTourneeDeciRequest?.mois_debut, 'mois_fin': postTourneeDeciRequest?.mois_fin, 'modele_id': postTourneeDeciRequest?.modele_id, 'type': postTourneeDeciRequest?.type }
|
|
112
|
+
body: { 'libelle': postTourneeDeciRequest?.libelle, 'description': postTourneeDeciRequest?.description, 'date_de_debut': utils_1.Utils.formatDate(postTourneeDeciRequest?.date_de_debut), 'date_de_fin': utils_1.Utils.formatDate(postTourneeDeciRequest?.date_de_fin), 'mois_debut': postTourneeDeciRequest?.mois_debut, 'mois_fin': postTourneeDeciRequest?.mois_fin, 'modele_id': postTourneeDeciRequest?.modele_id, 'type': postTourneeDeciRequest?.type }
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
@@ -139,7 +139,7 @@ class TournesDECIAPI extends core_1.Core {
|
|
|
139
139
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/tournees_deci/{tournee_deci_id}'),
|
|
140
140
|
headers: {},
|
|
141
141
|
params: {},
|
|
142
|
-
body: { 'libelle': updateTourneeDeciRequest?.libelle, 'description': updateTourneeDeciRequest?.description, 'date_de_debut': updateTourneeDeciRequest?.date_de_debut, 'date_de_fin': updateTourneeDeciRequest?.date_de_fin, 'mois_debut': updateTourneeDeciRequest?.mois_debut, 'mois_fin': updateTourneeDeciRequest?.mois_fin }
|
|
142
|
+
body: { 'libelle': updateTourneeDeciRequest?.libelle, 'description': updateTourneeDeciRequest?.description, 'date_de_debut': utils_1.Utils.formatDate(updateTourneeDeciRequest?.date_de_debut), 'date_de_fin': utils_1.Utils.formatDate(updateTourneeDeciRequest?.date_de_fin), 'mois_debut': updateTourneeDeciRequest?.mois_debut, 'mois_fin': updateTourneeDeciRequest?.mois_fin }
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
/**
|
|
@@ -155,7 +155,7 @@ class TournesDECIAPI extends core_1.Core {
|
|
|
155
155
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/tournees_deci/{tournee_deci_id}/pei/{pei_id}'),
|
|
156
156
|
headers: {},
|
|
157
157
|
params: {},
|
|
158
|
-
body: { '
|
|
158
|
+
body: { 'engin_utilise': updateTourneeDeciPeiRequest?.engin_utilise, 'ordre': updateTourneeDeciPeiRequest?.ordre, 'date_du_controle': utils_1.Utils.formatDate(updateTourneeDeciPeiRequest?.date_du_controle), 'liste_anomalies': updateTourneeDeciPeiRequest?.liste_anomalies }
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AnomaliePEI } from '../../src/model/AnomaliePEI';
|
|
2
1
|
import { PEI } from '../../src/model/PEI';
|
|
2
|
+
import { TourneeDeciPeiListeAnomaliesInner } from '../../src/model/TourneeDeciPeiListeAnomaliesInner';
|
|
3
3
|
export type TourneeDeciPei = {
|
|
4
4
|
'id'?: string;
|
|
5
5
|
'date_du_controle'?: Date;
|
|
6
|
-
'liste_anomalies'?: Array<
|
|
6
|
+
'liste_anomalies'?: Array<TourneeDeciPeiListeAnomaliesInner>;
|
|
7
7
|
'essais_engin_utilise'?: EssaisEnginUtiliseEnum;
|
|
8
8
|
'pei'?: PEI;
|
|
9
9
|
'est_controle'?: boolean;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UpdateTourneeDeciPeiRequestListeAnomaliesInner } from '../../src/model/UpdateTourneeDeciPeiRequestListeAnomaliesInner';
|
|
2
2
|
export type UpdateTourneeDeciPeiRequest = {
|
|
3
|
-
'
|
|
4
|
-
'engin_utilisé'?: string;
|
|
3
|
+
'engin_utilise'?: EnginUtiliseEnum;
|
|
5
4
|
'ordre'?: number;
|
|
6
5
|
'date_du_controle'?: Date;
|
|
6
|
+
'liste_anomalies'?: Array<UpdateTourneeDeciPeiRequestListeAnomaliesInner>;
|
|
7
7
|
};
|
|
8
|
+
export declare enum EnginUtiliseEnum {
|
|
9
|
+
Aucun = "aucun",
|
|
10
|
+
Fpt = "fpt",
|
|
11
|
+
Mpr = "mpr",
|
|
12
|
+
Ccf = "ccf"
|
|
13
|
+
}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnginUtiliseEnum = void 0;
|
|
4
|
+
var EnginUtiliseEnum;
|
|
5
|
+
(function (EnginUtiliseEnum) {
|
|
6
|
+
EnginUtiliseEnum["Aucun"] = "aucun";
|
|
7
|
+
EnginUtiliseEnum["Fpt"] = "fpt";
|
|
8
|
+
EnginUtiliseEnum["Mpr"] = "mpr";
|
|
9
|
+
EnginUtiliseEnum["Ccf"] = "ccf";
|
|
10
|
+
})(EnginUtiliseEnum = exports.EnginUtiliseEnum || (exports.EnginUtiliseEnum = {}));
|
package/lib/utils.d.ts
CHANGED
package/lib/utils.js
CHANGED
|
@@ -31,5 +31,16 @@ class Utils {
|
|
|
31
31
|
}
|
|
32
32
|
return false;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Format date ISO 8601.
|
|
36
|
+
*/
|
|
37
|
+
static formatDate(date) {
|
|
38
|
+
return (date.getUTCFullYear() + '-' +
|
|
39
|
+
new String(date.getUTCMonth() + 1).padStart(2, '0') + '-' +
|
|
40
|
+
new String(date.getUTCDate()).padStart(2, '0') + 'T' +
|
|
41
|
+
new String(date.getUTCHours()).padStart(2, '0') + ':' +
|
|
42
|
+
new String(date.getUTCMinutes()).padStart(2, '0') + ':' +
|
|
43
|
+
new String(date.getUTCSeconds()).padStart(2, '0') + 'Z');
|
|
44
|
+
}
|
|
34
45
|
}
|
|
35
46
|
exports.Utils = Utils;
|
package/package.json
CHANGED
|
@@ -147,7 +147,7 @@ export class CommissionsAPI extends Core {
|
|
|
147
147
|
endpoint: Utils.constructPath(pathVariable, '/commissions/{commission_id}/dates'),
|
|
148
148
|
headers: { },
|
|
149
149
|
params: { },
|
|
150
|
-
body: { 'libelle': postCommissionDateRequest?.libelle, 'type': postCommissionDateRequest?.type, 'date_de_debut': postCommissionDateRequest?.date_de_debut, 'date_de_fin': postCommissionDateRequest?.date_de_fin }
|
|
150
|
+
body: { 'libelle': postCommissionDateRequest?.libelle, 'type': postCommissionDateRequest?.type, 'date_de_debut': Utils.formatDate(postCommissionDateRequest?.date_de_debut), 'date_de_fin': Utils.formatDate(postCommissionDateRequest?.date_de_fin) }
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
|
package/src/api/DossiersAPI.ts
CHANGED
|
@@ -169,7 +169,7 @@ export class DossiersAPI extends Core {
|
|
|
169
169
|
endpoint: Utils.constructPath(pathVariable, '/dossiers/{dossier_id}'),
|
|
170
170
|
headers: { },
|
|
171
171
|
params: { },
|
|
172
|
-
body: { 'id': dossier?.id, 'type': dossier?.type, 'description': dossier?.description, 'date_de_creation': dossier?.date_de_creation, 'createur': dossier?.createur, 'application_utilisee_nom': dossier?.application_utilisee_nom, 'statut': dossier?.statut, 'objet': dossier?.objet, 'pei': dossier?.pei, 'erp': dossier?.erp, 'workflow_actif': dossier?.workflow_actif }
|
|
172
|
+
body: { 'id': dossier?.id, 'type': dossier?.type, 'description': dossier?.description, 'date_de_creation': Utils.formatDate(dossier?.date_de_creation), 'createur': dossier?.createur, 'application_utilisee_nom': dossier?.application_utilisee_nom, 'statut': dossier?.statut, 'objet': dossier?.objet, 'pei': dossier?.pei, 'erp': dossier?.erp, 'workflow_actif': dossier?.workflow_actif }
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
175
|
|
|
@@ -203,7 +203,7 @@ export class DossiersAPI extends Core {
|
|
|
203
203
|
endpoint: Utils.constructPath(pathVariable, '/dossiers/{dossier_id}/workflows/{workflow_id}'),
|
|
204
204
|
headers: { },
|
|
205
205
|
params: { },
|
|
206
|
-
body: { 'est_valide': updateDossierWorkflowsDetailsRequest?.est_valide, 'passage_commission_id': updateDossierWorkflowsDetailsRequest?.passage_commission_id, 'avis_favorable': updateDossierWorkflowsDetailsRequest?.avis_favorable, 'commission_id': updateDossierWorkflowsDetailsRequest?.commission_id, 'date_arrivee_secretariat': updateDossierWorkflowsDetailsRequest?.date_arrivee_secretariat, 'analyse_de_risque': updateDossierWorkflowsDetailsRequest?.analyse_de_risque, 'avis_rapporteur': updateDossierWorkflowsDetailsRequest?.avis_rapporteur, 'descriptif_effectifs': updateDossierWorkflowsDetailsRequest?.descriptif_effectifs, 'facteur_dangerosite': updateDossierWorkflowsDetailsRequest?.facteur_dangerosite, 'derogations': updateDossierWorkflowsDetailsRequest?.derogations, 'prescriptions': updateDossierWorkflowsDetailsRequest?.prescriptions, 'mesures_compensatoires': updateDossierWorkflowsDetailsRequest?.mesures_compensatoires, 'mesures_complementaires': updateDossierWorkflowsDetailsRequest?.mesures_complementaires, 'observations': updateDossierWorkflowsDetailsRequest?.observations, 'termine': updateDossierWorkflowsDetailsRequest?.termine }
|
|
206
|
+
body: { 'est_valide': updateDossierWorkflowsDetailsRequest?.est_valide, 'passage_commission_id': updateDossierWorkflowsDetailsRequest?.passage_commission_id, 'avis_favorable': updateDossierWorkflowsDetailsRequest?.avis_favorable, 'commission_id': updateDossierWorkflowsDetailsRequest?.commission_id, 'date_arrivee_secretariat': Utils.formatDate(updateDossierWorkflowsDetailsRequest?.date_arrivee_secretariat), 'analyse_de_risque': updateDossierWorkflowsDetailsRequest?.analyse_de_risque, 'avis_rapporteur': updateDossierWorkflowsDetailsRequest?.avis_rapporteur, 'descriptif_effectifs': updateDossierWorkflowsDetailsRequest?.descriptif_effectifs, 'facteur_dangerosite': updateDossierWorkflowsDetailsRequest?.facteur_dangerosite, 'derogations': updateDossierWorkflowsDetailsRequest?.derogations, 'prescriptions': updateDossierWorkflowsDetailsRequest?.prescriptions, 'mesures_compensatoires': updateDossierWorkflowsDetailsRequest?.mesures_compensatoires, 'mesures_complementaires': updateDossierWorkflowsDetailsRequest?.mesures_complementaires, 'observations': updateDossierWorkflowsDetailsRequest?.observations, 'termine': updateDossierWorkflowsDetailsRequest?.termine }
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
209
|
|
package/src/api/EvenementsAPI.ts
CHANGED
|
@@ -41,7 +41,7 @@ export class EvenementsAPI extends Core {
|
|
|
41
41
|
endpoint: Utils.constructPath(pathVariable, '/evenements/{evenement_id}'),
|
|
42
42
|
headers: { },
|
|
43
43
|
params: { },
|
|
44
|
-
body: { 'id': evenement?.id, 'title': evenement?.title, 'type': evenement?.type, 'description': evenement?.description, 'date_debut': evenement?.date_debut, 'date_fin': evenement?.date_fin }
|
|
44
|
+
body: { 'id': evenement?.id, 'title': evenement?.title, 'type': evenement?.type, 'description': evenement?.description, 'date_debut': Utils.formatDate(evenement?.date_debut), 'date_fin': Utils.formatDate(evenement?.date_fin) }
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -94,7 +94,7 @@ export class EvenementsAPI extends Core {
|
|
|
94
94
|
endpoint: Utils.constructPath(pathVariable, '/evenements'),
|
|
95
95
|
headers: { },
|
|
96
96
|
params: { },
|
|
97
|
-
body: { 'title': postEvenementRequest?.title, 'type': postEvenementRequest?.type, 'description': postEvenementRequest?.description, 'date_debut': postEvenementRequest?.date_debut, 'date_fin': postEvenementRequest?.date_fin }
|
|
97
|
+
body: { 'title': postEvenementRequest?.title, 'type': postEvenementRequest?.type, 'description': postEvenementRequest?.description, 'date_debut': Utils.formatDate(postEvenementRequest?.date_debut), 'date_fin': Utils.formatDate(postEvenementRequest?.date_fin) }
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -3,17 +3,35 @@ import { Utils } from "../utils";
|
|
|
3
3
|
import type { AxiosResponse } from "axios";
|
|
4
4
|
import { Client } from "../client";
|
|
5
5
|
import { Collection } from "../collection";
|
|
6
|
+
import { AddOrganisationMembresRequest } from '../model/AddOrganisationMembresRequest';
|
|
6
7
|
import { GetOrganisationReglesDeci200Response } from '../model/GetOrganisationReglesDeci200Response';
|
|
7
8
|
import { Organisation } from '../model/Organisation';
|
|
9
|
+
import { OrganisationMembre } from '../model/OrganisationMembre';
|
|
8
10
|
import { WorkflowType } from '../model/WorkflowType';
|
|
9
11
|
import { OrganisationGeoservice } from '../model/OrganisationGeoservice';
|
|
10
|
-
import { OrganisationMembre } from '../model/OrganisationMembre';
|
|
11
12
|
|
|
12
13
|
export class OrganisationsAPI extends Core {
|
|
13
14
|
constructor(config: MetariscConfig, client?: Client) {
|
|
14
15
|
super(config, client);
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Ajout d'un utilisateur comme membre dans une organisation.
|
|
20
|
+
* @param orgId Identifiant unique de l'Organisation
|
|
21
|
+
* @param addOrganisationMembresRequest
|
|
22
|
+
*/
|
|
23
|
+
async addOrganisationMembres(orgId: string, addOrganisationMembresRequest?: AddOrganisationMembresRequest): Promise<AxiosResponse<OrganisationMembre>>
|
|
24
|
+
{
|
|
25
|
+
const pathVariable = { 'org_id': (new String(orgId)).toString() };
|
|
26
|
+
return this.request({
|
|
27
|
+
method: 'POST',
|
|
28
|
+
endpoint: Utils.constructPath(pathVariable, '/organisations/{org_id}/membres'),
|
|
29
|
+
headers: { },
|
|
30
|
+
params: { },
|
|
31
|
+
body: { 'utilisateur_id': addOrganisationMembresRequest?.utilisateur_id }
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
17
35
|
/**
|
|
18
36
|
* Récupération des détails d'une organisation.
|
|
19
37
|
* @param orgId Identifiant unique de l'Organisation
|
|
@@ -130,7 +130,7 @@ export class TournesDECIAPI extends Core {
|
|
|
130
130
|
endpoint: Utils.constructPath(pathVariable, '/tournees_deci'),
|
|
131
131
|
headers: { },
|
|
132
132
|
params: { },
|
|
133
|
-
body: { 'libelle': postTourneeDeciRequest?.libelle, 'description': postTourneeDeciRequest?.description, 'date_de_debut': postTourneeDeciRequest?.date_de_debut, 'date_de_fin': postTourneeDeciRequest?.date_de_fin, 'mois_debut': postTourneeDeciRequest?.mois_debut, 'mois_fin': postTourneeDeciRequest?.mois_fin, 'modele_id': postTourneeDeciRequest?.modele_id, 'type': postTourneeDeciRequest?.type }
|
|
133
|
+
body: { 'libelle': postTourneeDeciRequest?.libelle, 'description': postTourneeDeciRequest?.description, 'date_de_debut': Utils.formatDate(postTourneeDeciRequest?.date_de_debut), 'date_de_fin': Utils.formatDate(postTourneeDeciRequest?.date_de_fin), 'mois_debut': postTourneeDeciRequest?.mois_debut, 'mois_fin': postTourneeDeciRequest?.mois_fin, 'modele_id': postTourneeDeciRequest?.modele_id, 'type': postTourneeDeciRequest?.type }
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
|
|
@@ -164,7 +164,7 @@ export class TournesDECIAPI extends Core {
|
|
|
164
164
|
endpoint: Utils.constructPath(pathVariable, '/tournees_deci/{tournee_deci_id}'),
|
|
165
165
|
headers: { },
|
|
166
166
|
params: { },
|
|
167
|
-
body: { 'libelle': updateTourneeDeciRequest?.libelle, 'description': updateTourneeDeciRequest?.description, 'date_de_debut': updateTourneeDeciRequest?.date_de_debut, 'date_de_fin': updateTourneeDeciRequest?.date_de_fin, 'mois_debut': updateTourneeDeciRequest?.mois_debut, 'mois_fin': updateTourneeDeciRequest?.mois_fin }
|
|
167
|
+
body: { 'libelle': updateTourneeDeciRequest?.libelle, 'description': updateTourneeDeciRequest?.description, 'date_de_debut': Utils.formatDate(updateTourneeDeciRequest?.date_de_debut), 'date_de_fin': Utils.formatDate(updateTourneeDeciRequest?.date_de_fin), 'mois_debut': updateTourneeDeciRequest?.mois_debut, 'mois_fin': updateTourneeDeciRequest?.mois_fin }
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
|
|
@@ -174,7 +174,7 @@ export class TournesDECIAPI extends Core {
|
|
|
174
174
|
* @param peiId Identifiant du PEI lié au contrôle
|
|
175
175
|
* @param updateTourneeDeciPeiRequest
|
|
176
176
|
*/
|
|
177
|
-
async updateTourneeDeciPei(tourneeDeciId: string, peiId: string, updateTourneeDeciPeiRequest?: UpdateTourneeDeciPeiRequest): Promise<AxiosResponse<
|
|
177
|
+
async updateTourneeDeciPei(tourneeDeciId: string, peiId: string, updateTourneeDeciPeiRequest?: UpdateTourneeDeciPeiRequest): Promise<AxiosResponse<TourneeDeciPei>>
|
|
178
178
|
{
|
|
179
179
|
const pathVariable = { 'tournee_deci_id': (new String(tourneeDeciId)).toString(), 'pei_id': (new String(peiId)).toString() };
|
|
180
180
|
return this.request({
|
|
@@ -182,7 +182,7 @@ export class TournesDECIAPI extends Core {
|
|
|
182
182
|
endpoint: Utils.constructPath(pathVariable, '/tournees_deci/{tournee_deci_id}/pei/{pei_id}'),
|
|
183
183
|
headers: { },
|
|
184
184
|
params: { },
|
|
185
|
-
body: { '
|
|
185
|
+
body: { 'engin_utilise': updateTourneeDeciPeiRequest?.engin_utilise, 'ordre': updateTourneeDeciPeiRequest?.ordre, 'date_du_controle': Utils.formatDate(updateTourneeDeciPeiRequest?.date_du_controle), 'liste_anomalies': updateTourneeDeciPeiRequest?.liste_anomalies }
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
188
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AnomaliePEI } from '../../src/model/AnomaliePEI';
|
|
2
1
|
import { PEI } from '../../src/model/PEI';
|
|
2
|
+
import { TourneeDeciPeiListeAnomaliesInner } from '../../src/model/TourneeDeciPeiListeAnomaliesInner';
|
|
3
3
|
|
|
4
4
|
export type TourneeDeciPei = {
|
|
5
5
|
'id'?: string;
|
|
6
6
|
'date_du_controle'?: Date;
|
|
7
|
-
'liste_anomalies'?: Array<
|
|
7
|
+
'liste_anomalies'?: Array<TourneeDeciPeiListeAnomaliesInner>;
|
|
8
8
|
'essais_engin_utilise'?: EssaisEnginUtiliseEnum;
|
|
9
9
|
'pei'?: PEI;
|
|
10
10
|
'est_controle'?: boolean;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UpdateTourneeDeciPeiRequestListeAnomaliesInner } from '../../src/model/UpdateTourneeDeciPeiRequestListeAnomaliesInner';
|
|
2
2
|
|
|
3
3
|
export type UpdateTourneeDeciPeiRequest = {
|
|
4
|
-
'
|
|
5
|
-
'engin_utilisé'?: string;
|
|
4
|
+
'engin_utilise'?: EnginUtiliseEnum;
|
|
6
5
|
'ordre'?: number;
|
|
7
6
|
'date_du_controle'?: Date;
|
|
7
|
+
'liste_anomalies'?: Array<UpdateTourneeDeciPeiRequestListeAnomaliesInner>;
|
|
8
8
|
};
|
|
9
|
+
|
|
10
|
+
export enum EnginUtiliseEnum {
|
|
11
|
+
Aucun = 'aucun',
|
|
12
|
+
Fpt = 'fpt',
|
|
13
|
+
Mpr = 'mpr',
|
|
14
|
+
Ccf = 'ccf'
|
|
15
|
+
}
|
package/src/utils.ts
CHANGED
|
@@ -32,4 +32,18 @@ export class Utils {
|
|
|
32
32
|
}
|
|
33
33
|
return false;
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Format date ISO 8601.
|
|
38
|
+
*/
|
|
39
|
+
static formatDate(date: Date): string {
|
|
40
|
+
return (
|
|
41
|
+
date.getUTCFullYear() + '-' +
|
|
42
|
+
new String(date.getUTCMonth() + 1).padStart(2, '0') + '-' +
|
|
43
|
+
new String(date.getUTCDate()).padStart(2, '0') + 'T' +
|
|
44
|
+
new String(date.getUTCHours()).padStart(2, '0') + ':' +
|
|
45
|
+
new String(date.getUTCMinutes()).padStart(2, '0') + ':' +
|
|
46
|
+
new String(date.getUTCSeconds()).padStart(2, '0') + 'Z'
|
|
47
|
+
);
|
|
48
|
+
}
|
|
35
49
|
}
|