@metarisc/metarisc-js 0.0.1-alpha.94 → 0.0.1-alpha.96
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/DatesPassageCommissionAPI.js +15 -0
- package/lib/api/DossiersAPI.js +36 -0
- package/lib/api/ERPAPI.js +36 -0
- package/lib/api/OrdresDuJourAPI.js +15 -0
- package/lib/api/PEIAPI.js +9 -0
- package/lib/api/PrescriptionsAPI.d.ts +0 -17
- package/lib/api/PrescriptionsAPI.js +0 -61
- package/lib/api/SearchAPI.d.ts +13 -0
- package/lib/api/SearchAPI.js +29 -0
- package/lib/api/SupportsReglementairesAPI.d.ts +28 -0
- package/lib/api/SupportsReglementairesAPI.js +88 -0
- package/lib/collection.js +3 -3
- package/lib/metarisc.d.ts +2 -1
- package/lib/metarisc.js +2 -1
- package/lib/resources.d.ts +2 -0
- package/lib/resources.js +5 -1
- package/package.json +1 -1
- package/src/api/CommissionsAPI.ts +1 -1
- package/src/api/DatesPassageCommissionAPI.ts +15 -1
- package/src/api/DossiersAPI.ts +36 -0
- package/src/api/ERPAPI.ts +36 -0
- package/src/api/OrdresDuJourAPI.ts +15 -0
- package/src/api/PEIAPI.ts +9 -0
- package/src/api/PrescriptionsAPI.ts +0 -79
- package/src/api/SearchAPI.ts +34 -0
- package/src/api/SupportsReglementairesAPI.ts +112 -0
- package/src/collection.ts +3 -3
- package/src/metarisc.ts +4 -2
- package/src/resources.ts +4 -0
|
@@ -63,7 +63,7 @@ class CommissionsAPI extends core_1.Core {
|
|
|
63
63
|
method: 'GET',
|
|
64
64
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}/dates'),
|
|
65
65
|
params: utils_1.Utils.payloadFilter({
|
|
66
|
-
'from_date': fromDate === undefined ? undefined : (
|
|
66
|
+
'from_date': fromDate === undefined ? undefined : utils_1.Utils.formatDate(fromDate),
|
|
67
67
|
'type': type === undefined ? undefined : (new String(type)).toString()
|
|
68
68
|
}),
|
|
69
69
|
transformResponse: [(data) => {
|
|
@@ -68,6 +68,21 @@ class DatesPassageCommissionAPI extends core_1.Core {
|
|
|
68
68
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/dates_passage_commission/{date_id}/ordre_du_jour'),
|
|
69
69
|
transformResponse: [(data) => {
|
|
70
70
|
const parsedData = JSON.parse(data);
|
|
71
|
+
if (parsedData && parsedData.dossier.modules) {
|
|
72
|
+
parsedData.dossier.modules = new Set(parsedData.dossier.modules);
|
|
73
|
+
}
|
|
74
|
+
if (parsedData && parsedData.dossier.workflows_actifs) {
|
|
75
|
+
parsedData.dossier.workflows_actifs = new Set(parsedData.dossier.workflows_actifs);
|
|
76
|
+
}
|
|
77
|
+
if (parsedData && parsedData.dossier.erp.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
78
|
+
parsedData.dossier.erp.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.dossier.erp.descriptif_technique.analyse_risque.activites_secondaire);
|
|
79
|
+
}
|
|
80
|
+
if (parsedData && parsedData.dossier.erp.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
81
|
+
parsedData.dossier.erp.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.dossier.erp.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
82
|
+
}
|
|
83
|
+
if (parsedData && parsedData.dossier.erp.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
84
|
+
parsedData.dossier.erp.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.dossier.erp.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
85
|
+
}
|
|
71
86
|
return parsedData;
|
|
72
87
|
}],
|
|
73
88
|
body: utils_1.Utils.payloadFilter(params)
|
package/lib/api/DossiersAPI.js
CHANGED
|
@@ -52,6 +52,15 @@ class DossiersAPI extends core_1.Core {
|
|
|
52
52
|
if (parsedData && parsedData.workflows_actifs) {
|
|
53
53
|
parsedData.workflows_actifs = new Set(parsedData.workflows_actifs);
|
|
54
54
|
}
|
|
55
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
56
|
+
parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire);
|
|
57
|
+
}
|
|
58
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
59
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
60
|
+
}
|
|
61
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
62
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
63
|
+
}
|
|
55
64
|
return parsedData;
|
|
56
65
|
}]
|
|
57
66
|
});
|
|
@@ -119,6 +128,15 @@ class DossiersAPI extends core_1.Core {
|
|
|
119
128
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/dossiers/{dossier_id}/rapport_etude'),
|
|
120
129
|
transformResponse: [(data) => {
|
|
121
130
|
const parsedData = JSON.parse(data);
|
|
131
|
+
if (parsedData && parsedData.analyse_risque?.activites_secondaire) {
|
|
132
|
+
parsedData.analyse_risque.activites_secondaire = new Set(parsedData.analyse_risque.activites_secondaire);
|
|
133
|
+
}
|
|
134
|
+
if (parsedData && parsedData.analyse_risque?.type_cloisonnement) {
|
|
135
|
+
parsedData.analyse_risque.type_cloisonnement = new Set(parsedData.analyse_risque.type_cloisonnement);
|
|
136
|
+
}
|
|
137
|
+
if (parsedData && parsedData.analyse_risque?.type_de_chauffage) {
|
|
138
|
+
parsedData.analyse_risque.type_de_chauffage = new Set(parsedData.analyse_risque.type_de_chauffage);
|
|
139
|
+
}
|
|
122
140
|
return parsedData;
|
|
123
141
|
}]
|
|
124
142
|
});
|
|
@@ -293,6 +311,15 @@ class DossiersAPI extends core_1.Core {
|
|
|
293
311
|
if (parsedData && parsedData.workflows_actifs) {
|
|
294
312
|
parsedData.workflows_actifs = new Set(parsedData.workflows_actifs);
|
|
295
313
|
}
|
|
314
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
315
|
+
parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire);
|
|
316
|
+
}
|
|
317
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
318
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
319
|
+
}
|
|
320
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
321
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
322
|
+
}
|
|
296
323
|
return parsedData;
|
|
297
324
|
}],
|
|
298
325
|
body: utils_1.Utils.payloadFilter(params)
|
|
@@ -338,6 +365,15 @@ class DossiersAPI extends core_1.Core {
|
|
|
338
365
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/dossiers/{dossier_id}/rapport_etude'),
|
|
339
366
|
transformResponse: [(data) => {
|
|
340
367
|
const parsedData = JSON.parse(data);
|
|
368
|
+
if (parsedData && parsedData.analyse_risque?.activites_secondaire) {
|
|
369
|
+
parsedData.analyse_risque.activites_secondaire = new Set(parsedData.analyse_risque.activites_secondaire);
|
|
370
|
+
}
|
|
371
|
+
if (parsedData && parsedData.analyse_risque?.type_cloisonnement) {
|
|
372
|
+
parsedData.analyse_risque.type_cloisonnement = new Set(parsedData.analyse_risque.type_cloisonnement);
|
|
373
|
+
}
|
|
374
|
+
if (parsedData && parsedData.analyse_risque?.type_de_chauffage) {
|
|
375
|
+
parsedData.analyse_risque.type_de_chauffage = new Set(parsedData.analyse_risque.type_de_chauffage);
|
|
376
|
+
}
|
|
341
377
|
return parsedData;
|
|
342
378
|
}],
|
|
343
379
|
body: utils_1.Utils.payloadFilter(params)
|
package/lib/api/ERPAPI.js
CHANGED
|
@@ -18,6 +18,15 @@ class ERPAPI extends core_1.Core {
|
|
|
18
18
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/erp/{erp_id}'),
|
|
19
19
|
transformResponse: [(data) => {
|
|
20
20
|
const parsedData = JSON.parse(data);
|
|
21
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
22
|
+
parsedData.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.descriptif_technique.analyse_risque.activites_secondaire);
|
|
23
|
+
}
|
|
24
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
25
|
+
parsedData.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
26
|
+
}
|
|
27
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
28
|
+
parsedData.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
29
|
+
}
|
|
21
30
|
return parsedData;
|
|
22
31
|
}]
|
|
23
32
|
});
|
|
@@ -249,6 +258,15 @@ class ERPAPI extends core_1.Core {
|
|
|
249
258
|
if (parsedData && parsedData.workflows_actifs) {
|
|
250
259
|
parsedData.workflows_actifs = new Set(parsedData.workflows_actifs);
|
|
251
260
|
}
|
|
261
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
262
|
+
parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire);
|
|
263
|
+
}
|
|
264
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
265
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
266
|
+
}
|
|
267
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
268
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
269
|
+
}
|
|
252
270
|
return parsedData;
|
|
253
271
|
}],
|
|
254
272
|
body: utils_1.Utils.payloadFilter(params)
|
|
@@ -264,6 +282,15 @@ class ERPAPI extends core_1.Core {
|
|
|
264
282
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/erp'),
|
|
265
283
|
transformResponse: [(data) => {
|
|
266
284
|
const parsedData = JSON.parse(data);
|
|
285
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
286
|
+
parsedData.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.descriptif_technique.analyse_risque.activites_secondaire);
|
|
287
|
+
}
|
|
288
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
289
|
+
parsedData.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
290
|
+
}
|
|
291
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
292
|
+
parsedData.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
293
|
+
}
|
|
267
294
|
return parsedData;
|
|
268
295
|
}],
|
|
269
296
|
body: utils_1.Utils.payloadFilter(params)
|
|
@@ -279,6 +306,15 @@ class ERPAPI extends core_1.Core {
|
|
|
279
306
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/erp/{erp_id}'),
|
|
280
307
|
transformResponse: [(data) => {
|
|
281
308
|
const parsedData = JSON.parse(data);
|
|
309
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
310
|
+
parsedData.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.descriptif_technique.analyse_risque.activites_secondaire);
|
|
311
|
+
}
|
|
312
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
313
|
+
parsedData.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
314
|
+
}
|
|
315
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
316
|
+
parsedData.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
317
|
+
}
|
|
282
318
|
return parsedData;
|
|
283
319
|
}],
|
|
284
320
|
body: utils_1.Utils.payloadFilter(params)
|
|
@@ -68,6 +68,21 @@ class OrdresDuJourAPI extends core_1.Core {
|
|
|
68
68
|
endpoint: utils_1.Utils.constructPath(pathVariable, '/ordres_du_jour/{dossier_id}'),
|
|
69
69
|
transformResponse: [(data) => {
|
|
70
70
|
const parsedData = JSON.parse(data);
|
|
71
|
+
if (parsedData && parsedData.dossier.modules) {
|
|
72
|
+
parsedData.dossier.modules = new Set(parsedData.dossier.modules);
|
|
73
|
+
}
|
|
74
|
+
if (parsedData && parsedData.dossier.workflows_actifs) {
|
|
75
|
+
parsedData.dossier.workflows_actifs = new Set(parsedData.dossier.workflows_actifs);
|
|
76
|
+
}
|
|
77
|
+
if (parsedData && parsedData.dossier.erp.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
78
|
+
parsedData.dossier.erp.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.dossier.erp.descriptif_technique.analyse_risque.activites_secondaire);
|
|
79
|
+
}
|
|
80
|
+
if (parsedData && parsedData.dossier.erp.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
81
|
+
parsedData.dossier.erp.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.dossier.erp.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
82
|
+
}
|
|
83
|
+
if (parsedData && parsedData.dossier.erp.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
84
|
+
parsedData.dossier.erp.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.dossier.erp.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
85
|
+
}
|
|
71
86
|
return parsedData;
|
|
72
87
|
}],
|
|
73
88
|
body: utils_1.Utils.payloadFilter(params)
|
package/lib/api/PEIAPI.js
CHANGED
|
@@ -206,6 +206,15 @@ class PEIAPI extends core_1.Core {
|
|
|
206
206
|
if (parsedData && parsedData.workflows_actifs) {
|
|
207
207
|
parsedData.workflows_actifs = new Set(parsedData.workflows_actifs);
|
|
208
208
|
}
|
|
209
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
210
|
+
parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire);
|
|
211
|
+
}
|
|
212
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
213
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
214
|
+
}
|
|
215
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
216
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
217
|
+
}
|
|
209
218
|
return parsedData;
|
|
210
219
|
}],
|
|
211
220
|
body: utils_1.Utils.payloadFilter(params)
|
|
@@ -3,33 +3,20 @@ import type { AxiosResponse } from "axios";
|
|
|
3
3
|
import { Client } from "../client";
|
|
4
4
|
import { Collection } from "../collection";
|
|
5
5
|
import { Prescription } from '../model/Prescription';
|
|
6
|
-
import { PrescriptionSupportReglementaire } from '../model/PrescriptionSupportReglementaire';
|
|
7
6
|
export declare class PrescriptionsAPI extends Core {
|
|
8
7
|
constructor(config: MetariscConfig, client?: Client);
|
|
9
8
|
/**
|
|
10
9
|
* Suppression d'une prescription type de la bibliothèque.
|
|
11
10
|
*/
|
|
12
11
|
deletePrescription(prescriptionId: string): Promise<AxiosResponse<void>>;
|
|
13
|
-
/**
|
|
14
|
-
* Suppression d'un support réglementaire.
|
|
15
|
-
*/
|
|
16
|
-
deleteSupportReglementaire(supportReglementaireId: string): Promise<AxiosResponse<void>>;
|
|
17
12
|
/**
|
|
18
13
|
* Récupération des détails d'une prescription dans la bibliothèque.
|
|
19
14
|
*/
|
|
20
15
|
getPrescription(prescriptionId: string): Promise<AxiosResponse<Prescription>>;
|
|
21
|
-
/**
|
|
22
|
-
* Récupération des détails d'un support réglementaire.
|
|
23
|
-
*/
|
|
24
|
-
getSupportReglementaire(supportReglementaireId: string): Promise<AxiosResponse<PrescriptionSupportReglementaire>>;
|
|
25
16
|
/**
|
|
26
17
|
* Liste des prescriptions.
|
|
27
18
|
*/
|
|
28
19
|
paginatePrescriptions(contenu?: string, supportReglementaireReference?: string): Collection<Prescription>;
|
|
29
|
-
/**
|
|
30
|
-
* Liste des supports réglementaires.
|
|
31
|
-
*/
|
|
32
|
-
paginateSupportsReglementaires(contenu?: string, reference?: string): Collection<PrescriptionSupportReglementaire>;
|
|
33
20
|
/**
|
|
34
21
|
* Modification d'une prescription existante en définissant les valeurs des paramètres transmis. Tous les paramètres non fournis resteront inchangés.
|
|
35
22
|
*/
|
|
@@ -38,8 +25,4 @@ export declare class PrescriptionsAPI extends Core {
|
|
|
38
25
|
* Ajout d'une nouvelle prescription type dans la bibliothèque.
|
|
39
26
|
*/
|
|
40
27
|
postPrescription(params: any): Promise<AxiosResponse<Prescription>>;
|
|
41
|
-
/**
|
|
42
|
-
* Ajouter un support réglementaire.
|
|
43
|
-
*/
|
|
44
|
-
postSupportReglementaire(params: any): Promise<AxiosResponse<PrescriptionSupportReglementaire>>;
|
|
45
28
|
}
|
|
@@ -22,20 +22,6 @@ class PrescriptionsAPI extends core_1.Core {
|
|
|
22
22
|
}]
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Suppression d'un support réglementaire.
|
|
27
|
-
*/
|
|
28
|
-
deleteSupportReglementaire(supportReglementaireId) {
|
|
29
|
-
const pathVariable = { 'support_reglementaire_id': (new String(supportReglementaireId)).toString() };
|
|
30
|
-
return this.request({
|
|
31
|
-
method: 'DELETE',
|
|
32
|
-
endpoint: utils_1.Utils.constructPath(pathVariable, '/supports_reglementaires/{support_reglementaire_id}'),
|
|
33
|
-
transformResponse: [(data) => {
|
|
34
|
-
const parsedData = JSON.parse(data);
|
|
35
|
-
return parsedData;
|
|
36
|
-
}]
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
25
|
/**
|
|
40
26
|
* Récupération des détails d'une prescription dans la bibliothèque.
|
|
41
27
|
*/
|
|
@@ -50,20 +36,6 @@ class PrescriptionsAPI extends core_1.Core {
|
|
|
50
36
|
}]
|
|
51
37
|
});
|
|
52
38
|
}
|
|
53
|
-
/**
|
|
54
|
-
* Récupération des détails d'un support réglementaire.
|
|
55
|
-
*/
|
|
56
|
-
getSupportReglementaire(supportReglementaireId) {
|
|
57
|
-
const pathVariable = { 'support_reglementaire_id': (new String(supportReglementaireId)).toString() };
|
|
58
|
-
return this.request({
|
|
59
|
-
method: 'GET',
|
|
60
|
-
endpoint: utils_1.Utils.constructPath(pathVariable, '/supports_reglementaires/{support_reglementaire_id}'),
|
|
61
|
-
transformResponse: [(data) => {
|
|
62
|
-
const parsedData = JSON.parse(data);
|
|
63
|
-
return parsedData;
|
|
64
|
-
}]
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
39
|
/**
|
|
68
40
|
* Liste des prescriptions.
|
|
69
41
|
*/
|
|
@@ -82,24 +54,6 @@ class PrescriptionsAPI extends core_1.Core {
|
|
|
82
54
|
}]
|
|
83
55
|
});
|
|
84
56
|
}
|
|
85
|
-
/**
|
|
86
|
-
* Liste des supports réglementaires.
|
|
87
|
-
*/
|
|
88
|
-
paginateSupportsReglementaires(contenu, reference) {
|
|
89
|
-
const pathVariable = {};
|
|
90
|
-
return this.collect({
|
|
91
|
-
method: 'GET',
|
|
92
|
-
endpoint: utils_1.Utils.constructPath(pathVariable, '/supports_reglementaires'),
|
|
93
|
-
params: utils_1.Utils.payloadFilter({
|
|
94
|
-
'contenu': contenu === undefined ? undefined : (new String(contenu)).toString(),
|
|
95
|
-
'reference': reference === undefined ? undefined : (new String(reference)).toString()
|
|
96
|
-
}),
|
|
97
|
-
transformResponse: [(data) => {
|
|
98
|
-
const parsedData = JSON.parse(data);
|
|
99
|
-
return parsedData;
|
|
100
|
-
}]
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
57
|
/**
|
|
104
58
|
* Modification d'une prescription existante en définissant les valeurs des paramètres transmis. Tous les paramètres non fournis resteront inchangés.
|
|
105
59
|
*/
|
|
@@ -130,20 +84,5 @@ class PrescriptionsAPI extends core_1.Core {
|
|
|
130
84
|
body: utils_1.Utils.payloadFilter(params)
|
|
131
85
|
});
|
|
132
86
|
}
|
|
133
|
-
/**
|
|
134
|
-
* Ajouter un support réglementaire.
|
|
135
|
-
*/
|
|
136
|
-
postSupportReglementaire(params) {
|
|
137
|
-
const pathVariable = {};
|
|
138
|
-
return this.request({
|
|
139
|
-
method: 'POST',
|
|
140
|
-
endpoint: utils_1.Utils.constructPath(pathVariable, '/supports_reglementaires'),
|
|
141
|
-
transformResponse: [(data) => {
|
|
142
|
-
const parsedData = JSON.parse(data);
|
|
143
|
-
return parsedData;
|
|
144
|
-
}],
|
|
145
|
-
body: utils_1.Utils.payloadFilter(params)
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
87
|
}
|
|
149
88
|
exports.PrescriptionsAPI = PrescriptionsAPI;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Core, MetariscConfig } from "../core";
|
|
2
|
+
import { Client } from "../client";
|
|
3
|
+
import { Collection } from "../collection";
|
|
4
|
+
import { ERP } from '../model/ERP';
|
|
5
|
+
export declare class SearchAPI extends Core {
|
|
6
|
+
constructor(config: MetariscConfig, client?: Client);
|
|
7
|
+
/**
|
|
8
|
+
* Recherche d'ERP selon des critères simples.
|
|
9
|
+
Cet endpoint de recherche permet de saffranchir des limitations de la recherche par query parameters (notamment le nombre de critères).
|
|
10
|
+
|
|
11
|
+
*/
|
|
12
|
+
paginateErp(params: any): Collection<ERP>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SearchAPI = void 0;
|
|
4
|
+
// File generated from our OpenAPI spec
|
|
5
|
+
const core_1 = require("../core");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
class SearchAPI extends core_1.Core {
|
|
8
|
+
constructor(config, client) {
|
|
9
|
+
super(config, client);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Recherche d'ERP selon des critères simples.
|
|
13
|
+
Cet endpoint de recherche permet de saffranchir des limitations de la recherche par query parameters (notamment le nombre de critères).
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
paginateErp(params) {
|
|
17
|
+
const pathVariable = {};
|
|
18
|
+
return this.collect({
|
|
19
|
+
method: 'POST',
|
|
20
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/search/erp'),
|
|
21
|
+
transformResponse: [(data) => {
|
|
22
|
+
const parsedData = JSON.parse(data);
|
|
23
|
+
return parsedData;
|
|
24
|
+
}],
|
|
25
|
+
body: utils_1.Utils.payloadFilter(params)
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.SearchAPI = SearchAPI;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Core, MetariscConfig } from "../core";
|
|
2
|
+
import type { AxiosResponse } from "axios";
|
|
3
|
+
import { Client } from "../client";
|
|
4
|
+
import { Collection } from "../collection";
|
|
5
|
+
import { PrescriptionSupportReglementaire } from '../model/PrescriptionSupportReglementaire';
|
|
6
|
+
export declare class SupportsReglementairesAPI extends Core {
|
|
7
|
+
constructor(config: MetariscConfig, client?: Client);
|
|
8
|
+
/**
|
|
9
|
+
* Suppression d'un support réglementaire.
|
|
10
|
+
*/
|
|
11
|
+
deleteSupportReglementaire(supportReglementaireId: string): Promise<AxiosResponse<void>>;
|
|
12
|
+
/**
|
|
13
|
+
* Récupération des détails d'un support réglementaire.
|
|
14
|
+
*/
|
|
15
|
+
getSupportReglementaire(supportReglementaireId: string): Promise<AxiosResponse<PrescriptionSupportReglementaire>>;
|
|
16
|
+
/**
|
|
17
|
+
* Liste des supports réglementaires.
|
|
18
|
+
*/
|
|
19
|
+
paginateSupportsReglementaires(contenu?: string, reference?: string): Collection<PrescriptionSupportReglementaire>;
|
|
20
|
+
/**
|
|
21
|
+
* Modification d'un support réglementaire existant en définissant les valeurs des paramètres transmis. Tous les paramètres non fournis resteront inchangés.
|
|
22
|
+
*/
|
|
23
|
+
patchSupportReglementaire(supportReglementaireId: string, params: any): Promise<AxiosResponse<PrescriptionSupportReglementaire>>;
|
|
24
|
+
/**
|
|
25
|
+
* Ajouter un support réglementaire.
|
|
26
|
+
*/
|
|
27
|
+
postSupportReglementaire(params: any): Promise<AxiosResponse<PrescriptionSupportReglementaire>>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SupportsReglementairesAPI = void 0;
|
|
4
|
+
// File generated from our OpenAPI spec
|
|
5
|
+
const core_1 = require("../core");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
class SupportsReglementairesAPI extends core_1.Core {
|
|
8
|
+
constructor(config, client) {
|
|
9
|
+
super(config, client);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Suppression d'un support réglementaire.
|
|
13
|
+
*/
|
|
14
|
+
deleteSupportReglementaire(supportReglementaireId) {
|
|
15
|
+
const pathVariable = { 'support_reglementaire_id': (new String(supportReglementaireId)).toString() };
|
|
16
|
+
return this.request({
|
|
17
|
+
method: 'DELETE',
|
|
18
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/supports_reglementaires/{support_reglementaire_id}'),
|
|
19
|
+
transformResponse: [(data) => {
|
|
20
|
+
const parsedData = JSON.parse(data);
|
|
21
|
+
return parsedData;
|
|
22
|
+
}]
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Récupération des détails d'un support réglementaire.
|
|
27
|
+
*/
|
|
28
|
+
getSupportReglementaire(supportReglementaireId) {
|
|
29
|
+
const pathVariable = { 'support_reglementaire_id': (new String(supportReglementaireId)).toString() };
|
|
30
|
+
return this.request({
|
|
31
|
+
method: 'GET',
|
|
32
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/supports_reglementaires/{support_reglementaire_id}'),
|
|
33
|
+
transformResponse: [(data) => {
|
|
34
|
+
const parsedData = JSON.parse(data);
|
|
35
|
+
return parsedData;
|
|
36
|
+
}]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Liste des supports réglementaires.
|
|
41
|
+
*/
|
|
42
|
+
paginateSupportsReglementaires(contenu, reference) {
|
|
43
|
+
const pathVariable = {};
|
|
44
|
+
return this.collect({
|
|
45
|
+
method: 'GET',
|
|
46
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/supports_reglementaires'),
|
|
47
|
+
params: utils_1.Utils.payloadFilter({
|
|
48
|
+
'contenu': contenu === undefined ? undefined : (new String(contenu)).toString(),
|
|
49
|
+
'reference': reference === undefined ? undefined : (new String(reference)).toString()
|
|
50
|
+
}),
|
|
51
|
+
transformResponse: [(data) => {
|
|
52
|
+
const parsedData = JSON.parse(data);
|
|
53
|
+
return parsedData;
|
|
54
|
+
}]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Modification d'un support réglementaire existant en définissant les valeurs des paramètres transmis. Tous les paramètres non fournis resteront inchangés.
|
|
59
|
+
*/
|
|
60
|
+
patchSupportReglementaire(supportReglementaireId, params) {
|
|
61
|
+
const pathVariable = { 'support_reglementaire_id': (new String(supportReglementaireId)).toString() };
|
|
62
|
+
return this.request({
|
|
63
|
+
method: 'PATCH',
|
|
64
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/supports_reglementaires/{support_reglementaire_id}'),
|
|
65
|
+
transformResponse: [(data) => {
|
|
66
|
+
const parsedData = JSON.parse(data);
|
|
67
|
+
return parsedData;
|
|
68
|
+
}],
|
|
69
|
+
body: utils_1.Utils.payloadFilter(params)
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Ajouter un support réglementaire.
|
|
74
|
+
*/
|
|
75
|
+
postSupportReglementaire(params) {
|
|
76
|
+
const pathVariable = {};
|
|
77
|
+
return this.request({
|
|
78
|
+
method: 'POST',
|
|
79
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/supports_reglementaires'),
|
|
80
|
+
transformResponse: [(data) => {
|
|
81
|
+
const parsedData = JSON.parse(data);
|
|
82
|
+
return parsedData;
|
|
83
|
+
}],
|
|
84
|
+
body: utils_1.Utils.payloadFilter(params)
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
exports.SupportsReglementairesAPI = SupportsReglementairesAPI;
|
package/lib/collection.js
CHANGED
|
@@ -43,9 +43,9 @@ class Collection {
|
|
|
43
43
|
async autoPagingIteratorToArray(limit) {
|
|
44
44
|
const generator = this.autoPagingIterator();
|
|
45
45
|
const results = [];
|
|
46
|
-
limit = limit ??
|
|
47
|
-
if (limit >
|
|
48
|
-
throw Error('You cannot specify a limit of more than
|
|
46
|
+
limit = limit ?? 1000;
|
|
47
|
+
if (limit > 1000) {
|
|
48
|
+
throw Error('You cannot specify a limit of more than 1,000 items to fetch in `autoPagingIteratorToArray`; use `autoPagingIterator` to iterate through longer lists.');
|
|
49
49
|
}
|
|
50
50
|
for await (const item of generator) {
|
|
51
51
|
results.push(item);
|
package/lib/metarisc.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare class Metarisc extends Core {
|
|
|
12
12
|
sites_geographiques: resources.SitesGeographiquesAPI;
|
|
13
13
|
workflows: resources.WorkflowsAPI;
|
|
14
14
|
healthcheck: resources.HealthcheckAPI;
|
|
15
|
+
search: resources.SearchAPI;
|
|
15
16
|
enveloppes: resources.EnveloppesAPI;
|
|
16
17
|
organisations: resources.OrganisationsAPI;
|
|
17
18
|
pei: resources.PEIAPI;
|
|
@@ -24,7 +25,7 @@ export declare class Metarisc extends Core {
|
|
|
24
25
|
dossiers_affectations: resources.DossiersAffectationsAPI;
|
|
25
26
|
mains_courantes: resources.MainsCourantesAPI;
|
|
26
27
|
anomalies: resources.AnomaliesAPI;
|
|
27
|
-
supports_reglementaires: resources.
|
|
28
|
+
supports_reglementaires: resources.SupportsReglementairesAPI;
|
|
28
29
|
feed: resources.FeedAPI;
|
|
29
30
|
tournees_deci: resources.TourneesDECIAPI;
|
|
30
31
|
controles_pei: resources.ControlesPEIAPI;
|
package/lib/metarisc.js
CHANGED
|
@@ -44,6 +44,7 @@ class Metarisc extends core_1.Core {
|
|
|
44
44
|
case 'sites_geographiques': return new resources.SitesGeographiquesAPI(config, tmpClient);
|
|
45
45
|
case 'workflows': return new resources.WorkflowsAPI(config, tmpClient);
|
|
46
46
|
case 'healthcheck': return new resources.HealthcheckAPI(config, tmpClient);
|
|
47
|
+
case 'search': return new resources.SearchAPI(config, tmpClient);
|
|
47
48
|
case 'enveloppes': return new resources.EnveloppesAPI(config, tmpClient);
|
|
48
49
|
case 'organisations': return new resources.OrganisationsAPI(config, tmpClient);
|
|
49
50
|
case 'pei': return new resources.PEIAPI(config, tmpClient);
|
|
@@ -56,7 +57,7 @@ class Metarisc extends core_1.Core {
|
|
|
56
57
|
case 'dossiers_affectations': return new resources.DossiersAffectationsAPI(config, tmpClient);
|
|
57
58
|
case 'mains_courantes': return new resources.MainsCourantesAPI(config, tmpClient);
|
|
58
59
|
case 'anomalies': return new resources.AnomaliesAPI(config, tmpClient);
|
|
59
|
-
case 'supports_reglementaires': return new resources.
|
|
60
|
+
case 'supports_reglementaires': return new resources.SupportsReglementairesAPI(config, tmpClient);
|
|
60
61
|
case 'feed': return new resources.FeedAPI(config, tmpClient);
|
|
61
62
|
case 'tournees_deci': return new resources.TourneesDECIAPI(config, tmpClient);
|
|
62
63
|
case 'controles_pei': return new resources.ControlesPEIAPI(config, tmpClient);
|
package/lib/resources.d.ts
CHANGED
|
@@ -22,7 +22,9 @@ export { PEIAPI } from './api/PEIAPI';
|
|
|
22
22
|
export { PermissionsAPI } from './api/PermissionsAPI';
|
|
23
23
|
export { PingAPI } from './api/PingAPI';
|
|
24
24
|
export { PrescriptionsAPI } from './api/PrescriptionsAPI';
|
|
25
|
+
export { SearchAPI } from './api/SearchAPI';
|
|
25
26
|
export { SitesGeographiquesAPI } from './api/SitesGeographiquesAPI';
|
|
27
|
+
export { SupportsReglementairesAPI } from './api/SupportsReglementairesAPI';
|
|
26
28
|
export { TourneesDECIAPI } from './api/TourneesDECIAPI';
|
|
27
29
|
export { UtilisateursAPI } from './api/UtilisateursAPI';
|
|
28
30
|
export { WorkflowsAPI } from './api/WorkflowsAPI';
|
package/lib/resources.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.WorkflowsAPI = exports.UtilisateursAPI = exports.TourneesDECIAPI = exports.SitesGeographiquesAPI = exports.PrescriptionsAPI = exports.PingAPI = exports.PermissionsAPI = exports.PEIAPI = exports.OrganisationsAPI = exports.OrdresDuJourAPI = exports.NotificationsAPI = exports.MoiAPI = exports.MainsCourantesParticipantsAPI = exports.MainsCourantesAPI = exports.HealthcheckAPI = exports.FeedAPI = exports.EvenementsAPI = exports.EnveloppesAPI = exports.ERPAPI = exports.DossiersAffectationsAPI = exports.DossiersAPI = exports.DocumentsAPI = exports.DatesPassageCommissionAPI = exports.ControlesPEIAPI = exports.ContactsAPI = exports.CommissionsMembresAPI = exports.CommissionsAPI = exports.AnomaliesAPI = void 0;
|
|
4
|
+
exports.WorkflowsAPI = exports.UtilisateursAPI = exports.TourneesDECIAPI = exports.SupportsReglementairesAPI = exports.SitesGeographiquesAPI = exports.SearchAPI = exports.PrescriptionsAPI = exports.PingAPI = exports.PermissionsAPI = exports.PEIAPI = exports.OrganisationsAPI = exports.OrdresDuJourAPI = exports.NotificationsAPI = exports.MoiAPI = exports.MainsCourantesParticipantsAPI = exports.MainsCourantesAPI = exports.HealthcheckAPI = exports.FeedAPI = exports.EvenementsAPI = exports.EnveloppesAPI = exports.ERPAPI = exports.DossiersAffectationsAPI = exports.DossiersAPI = exports.DocumentsAPI = exports.DatesPassageCommissionAPI = exports.ControlesPEIAPI = exports.ContactsAPI = exports.CommissionsMembresAPI = exports.CommissionsAPI = exports.AnomaliesAPI = void 0;
|
|
5
5
|
var AnomaliesAPI_1 = require("./api/AnomaliesAPI");
|
|
6
6
|
Object.defineProperty(exports, "AnomaliesAPI", { enumerable: true, get: function () { return AnomaliesAPI_1.AnomaliesAPI; } });
|
|
7
7
|
var CommissionsAPI_1 = require("./api/CommissionsAPI");
|
|
@@ -50,8 +50,12 @@ var PingAPI_1 = require("./api/PingAPI");
|
|
|
50
50
|
Object.defineProperty(exports, "PingAPI", { enumerable: true, get: function () { return PingAPI_1.PingAPI; } });
|
|
51
51
|
var PrescriptionsAPI_1 = require("./api/PrescriptionsAPI");
|
|
52
52
|
Object.defineProperty(exports, "PrescriptionsAPI", { enumerable: true, get: function () { return PrescriptionsAPI_1.PrescriptionsAPI; } });
|
|
53
|
+
var SearchAPI_1 = require("./api/SearchAPI");
|
|
54
|
+
Object.defineProperty(exports, "SearchAPI", { enumerable: true, get: function () { return SearchAPI_1.SearchAPI; } });
|
|
53
55
|
var SitesGeographiquesAPI_1 = require("./api/SitesGeographiquesAPI");
|
|
54
56
|
Object.defineProperty(exports, "SitesGeographiquesAPI", { enumerable: true, get: function () { return SitesGeographiquesAPI_1.SitesGeographiquesAPI; } });
|
|
57
|
+
var SupportsReglementairesAPI_1 = require("./api/SupportsReglementairesAPI");
|
|
58
|
+
Object.defineProperty(exports, "SupportsReglementairesAPI", { enumerable: true, get: function () { return SupportsReglementairesAPI_1.SupportsReglementairesAPI; } });
|
|
55
59
|
var TourneesDECIAPI_1 = require("./api/TourneesDECIAPI");
|
|
56
60
|
Object.defineProperty(exports, "TourneesDECIAPI", { enumerable: true, get: function () { return TourneesDECIAPI_1.TourneesDECIAPI; } });
|
|
57
61
|
var UtilisateursAPI_1 = require("./api/UtilisateursAPI");
|
package/package.json
CHANGED
|
@@ -87,7 +87,7 @@ export class CommissionsAPI extends Core {
|
|
|
87
87
|
method: 'GET',
|
|
88
88
|
endpoint: Utils.constructPath(pathVariable, '/commissions/{commission_id}/dates'),
|
|
89
89
|
params: Utils.payloadFilter({
|
|
90
|
-
'from_date': fromDate === undefined ? undefined : (
|
|
90
|
+
'from_date': fromDate === undefined ? undefined : Utils.formatDate(fromDate),
|
|
91
91
|
'type': type === undefined ? undefined : (new String(type)).toString()
|
|
92
92
|
}),
|
|
93
93
|
transformResponse: [(data) => {
|
|
@@ -24,7 +24,6 @@ export class DatesPassageCommissionAPI extends Core {
|
|
|
24
24
|
method: 'GET',
|
|
25
25
|
responseType: 'blob',
|
|
26
26
|
endpoint: Utils.constructPath(pathVariable, '/dates_passage_commission/{date_id}/compte_rendu_global_pdf')
|
|
27
|
-
|
|
28
27
|
});
|
|
29
28
|
}
|
|
30
29
|
|
|
@@ -93,6 +92,21 @@ export class DatesPassageCommissionAPI extends Core {
|
|
|
93
92
|
endpoint: Utils.constructPath(pathVariable, '/dates_passage_commission/{date_id}/ordre_du_jour'),
|
|
94
93
|
transformResponse: [(data) => {
|
|
95
94
|
const parsedData = JSON.parse(data);
|
|
95
|
+
if (parsedData && parsedData.dossier.modules) {
|
|
96
|
+
parsedData.dossier.modules = new Set(parsedData.dossier.modules);
|
|
97
|
+
}
|
|
98
|
+
if (parsedData && parsedData.dossier.workflows_actifs) {
|
|
99
|
+
parsedData.dossier.workflows_actifs = new Set(parsedData.dossier.workflows_actifs);
|
|
100
|
+
}
|
|
101
|
+
if (parsedData && parsedData.dossier.erp.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
102
|
+
parsedData.dossier.erp.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.dossier.erp.descriptif_technique.analyse_risque.activites_secondaire);
|
|
103
|
+
}
|
|
104
|
+
if (parsedData && parsedData.dossier.erp.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
105
|
+
parsedData.dossier.erp.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.dossier.erp.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
106
|
+
}
|
|
107
|
+
if (parsedData && parsedData.dossier.erp.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
108
|
+
parsedData.dossier.erp.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.dossier.erp.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
109
|
+
}
|
|
96
110
|
return parsedData;
|
|
97
111
|
}],
|
|
98
112
|
body: Utils.payloadFilter(params)
|
package/src/api/DossiersAPI.ts
CHANGED
|
@@ -77,6 +77,15 @@ export class DossiersAPI extends Core {
|
|
|
77
77
|
if (parsedData && parsedData.workflows_actifs) {
|
|
78
78
|
parsedData.workflows_actifs = new Set(parsedData.workflows_actifs);
|
|
79
79
|
}
|
|
80
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
81
|
+
parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire);
|
|
82
|
+
}
|
|
83
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
84
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
85
|
+
}
|
|
86
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
87
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
88
|
+
}
|
|
80
89
|
return parsedData;
|
|
81
90
|
}]
|
|
82
91
|
});
|
|
@@ -164,6 +173,15 @@ export class DossiersAPI extends Core {
|
|
|
164
173
|
endpoint: Utils.constructPath(pathVariable, '/dossiers/{dossier_id}/rapport_etude'),
|
|
165
174
|
transformResponse: [(data) => {
|
|
166
175
|
const parsedData = JSON.parse(data);
|
|
176
|
+
if (parsedData && parsedData.analyse_risque?.activites_secondaire) {
|
|
177
|
+
parsedData.analyse_risque.activites_secondaire = new Set(parsedData.analyse_risque.activites_secondaire);
|
|
178
|
+
}
|
|
179
|
+
if (parsedData && parsedData.analyse_risque?.type_cloisonnement) {
|
|
180
|
+
parsedData.analyse_risque.type_cloisonnement = new Set(parsedData.analyse_risque.type_cloisonnement);
|
|
181
|
+
}
|
|
182
|
+
if (parsedData && parsedData.analyse_risque?.type_de_chauffage) {
|
|
183
|
+
parsedData.analyse_risque.type_de_chauffage = new Set(parsedData.analyse_risque.type_de_chauffage);
|
|
184
|
+
}
|
|
167
185
|
return parsedData;
|
|
168
186
|
}]
|
|
169
187
|
});
|
|
@@ -394,6 +412,15 @@ export class DossiersAPI extends Core {
|
|
|
394
412
|
if (parsedData && parsedData.workflows_actifs) {
|
|
395
413
|
parsedData.workflows_actifs = new Set(parsedData.workflows_actifs);
|
|
396
414
|
}
|
|
415
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
416
|
+
parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire);
|
|
417
|
+
}
|
|
418
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
419
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
420
|
+
}
|
|
421
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
422
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
423
|
+
}
|
|
397
424
|
return parsedData;
|
|
398
425
|
}],
|
|
399
426
|
body: Utils.payloadFilter(params)
|
|
@@ -454,6 +481,15 @@ export class DossiersAPI extends Core {
|
|
|
454
481
|
endpoint: Utils.constructPath(pathVariable, '/dossiers/{dossier_id}/rapport_etude'),
|
|
455
482
|
transformResponse: [(data) => {
|
|
456
483
|
const parsedData = JSON.parse(data);
|
|
484
|
+
if (parsedData && parsedData.analyse_risque?.activites_secondaire) {
|
|
485
|
+
parsedData.analyse_risque.activites_secondaire = new Set(parsedData.analyse_risque.activites_secondaire);
|
|
486
|
+
}
|
|
487
|
+
if (parsedData && parsedData.analyse_risque?.type_cloisonnement) {
|
|
488
|
+
parsedData.analyse_risque.type_cloisonnement = new Set(parsedData.analyse_risque.type_cloisonnement);
|
|
489
|
+
}
|
|
490
|
+
if (parsedData && parsedData.analyse_risque?.type_de_chauffage) {
|
|
491
|
+
parsedData.analyse_risque.type_de_chauffage = new Set(parsedData.analyse_risque.type_de_chauffage);
|
|
492
|
+
}
|
|
457
493
|
return parsedData;
|
|
458
494
|
}],
|
|
459
495
|
body: Utils.payloadFilter(params)
|
package/src/api/ERPAPI.ts
CHANGED
|
@@ -33,6 +33,15 @@ export class ERPAPI extends Core {
|
|
|
33
33
|
endpoint: Utils.constructPath(pathVariable, '/erp/{erp_id}'),
|
|
34
34
|
transformResponse: [(data) => {
|
|
35
35
|
const parsedData = JSON.parse(data);
|
|
36
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
37
|
+
parsedData.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.descriptif_technique.analyse_risque.activites_secondaire);
|
|
38
|
+
}
|
|
39
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
40
|
+
parsedData.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
41
|
+
}
|
|
42
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
43
|
+
parsedData.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
44
|
+
}
|
|
36
45
|
return parsedData;
|
|
37
46
|
}]
|
|
38
47
|
});
|
|
@@ -343,6 +352,15 @@ export class ERPAPI extends Core {
|
|
|
343
352
|
if (parsedData && parsedData.workflows_actifs) {
|
|
344
353
|
parsedData.workflows_actifs = new Set(parsedData.workflows_actifs);
|
|
345
354
|
}
|
|
355
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
356
|
+
parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire);
|
|
357
|
+
}
|
|
358
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
359
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
360
|
+
}
|
|
361
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
362
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
363
|
+
}
|
|
346
364
|
return parsedData;
|
|
347
365
|
}],
|
|
348
366
|
body: Utils.payloadFilter(params)
|
|
@@ -362,6 +380,15 @@ export class ERPAPI extends Core {
|
|
|
362
380
|
endpoint: Utils.constructPath(pathVariable, '/erp'),
|
|
363
381
|
transformResponse: [(data) => {
|
|
364
382
|
const parsedData = JSON.parse(data);
|
|
383
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
384
|
+
parsedData.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.descriptif_technique.analyse_risque.activites_secondaire);
|
|
385
|
+
}
|
|
386
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
387
|
+
parsedData.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
388
|
+
}
|
|
389
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
390
|
+
parsedData.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
391
|
+
}
|
|
365
392
|
return parsedData;
|
|
366
393
|
}],
|
|
367
394
|
body: Utils.payloadFilter(params)
|
|
@@ -382,6 +409,15 @@ export class ERPAPI extends Core {
|
|
|
382
409
|
endpoint: Utils.constructPath(pathVariable, '/erp/{erp_id}'),
|
|
383
410
|
transformResponse: [(data) => {
|
|
384
411
|
const parsedData = JSON.parse(data);
|
|
412
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
413
|
+
parsedData.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.descriptif_technique.analyse_risque.activites_secondaire);
|
|
414
|
+
}
|
|
415
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
416
|
+
parsedData.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
417
|
+
}
|
|
418
|
+
if (parsedData && parsedData.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
419
|
+
parsedData.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
420
|
+
}
|
|
385
421
|
return parsedData;
|
|
386
422
|
}],
|
|
387
423
|
body: Utils.payloadFilter(params)
|
|
@@ -91,6 +91,21 @@ export class OrdresDuJourAPI extends Core {
|
|
|
91
91
|
endpoint: Utils.constructPath(pathVariable, '/ordres_du_jour/{dossier_id}'),
|
|
92
92
|
transformResponse: [(data) => {
|
|
93
93
|
const parsedData = JSON.parse(data);
|
|
94
|
+
if (parsedData && parsedData.dossier.modules) {
|
|
95
|
+
parsedData.dossier.modules = new Set(parsedData.dossier.modules);
|
|
96
|
+
}
|
|
97
|
+
if (parsedData && parsedData.dossier.workflows_actifs) {
|
|
98
|
+
parsedData.dossier.workflows_actifs = new Set(parsedData.dossier.workflows_actifs);
|
|
99
|
+
}
|
|
100
|
+
if (parsedData && parsedData.dossier.erp.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
101
|
+
parsedData.dossier.erp.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.dossier.erp.descriptif_technique.analyse_risque.activites_secondaire);
|
|
102
|
+
}
|
|
103
|
+
if (parsedData && parsedData.dossier.erp.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
104
|
+
parsedData.dossier.erp.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.dossier.erp.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
105
|
+
}
|
|
106
|
+
if (parsedData && parsedData.dossier.erp.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
107
|
+
parsedData.dossier.erp.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.dossier.erp.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
108
|
+
}
|
|
94
109
|
return parsedData;
|
|
95
110
|
}],
|
|
96
111
|
body: Utils.payloadFilter(params)
|
package/src/api/PEIAPI.ts
CHANGED
|
@@ -278,6 +278,15 @@ export class PEIAPI extends Core {
|
|
|
278
278
|
if (parsedData && parsedData.workflows_actifs) {
|
|
279
279
|
parsedData.workflows_actifs = new Set(parsedData.workflows_actifs);
|
|
280
280
|
}
|
|
281
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.activites_secondaire) {
|
|
282
|
+
parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire = new Set(parsedData.erp.descriptif_technique.analyse_risque.activites_secondaire);
|
|
283
|
+
}
|
|
284
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_cloisonnement) {
|
|
285
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_cloisonnement);
|
|
286
|
+
}
|
|
287
|
+
if (parsedData && parsedData.erp.descriptif_technique.analyse_risque?.type_de_chauffage) {
|
|
288
|
+
parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage = new Set(parsedData.erp.descriptif_technique.analyse_risque.type_de_chauffage);
|
|
289
|
+
}
|
|
281
290
|
return parsedData;
|
|
282
291
|
}],
|
|
283
292
|
body: Utils.payloadFilter(params)
|
|
@@ -5,7 +5,6 @@ import type { AxiosResponse } from "axios";
|
|
|
5
5
|
import { Client } from "../client";
|
|
6
6
|
import { Collection } from "../collection";
|
|
7
7
|
import { Prescription } from '../model/Prescription';
|
|
8
|
-
import { PrescriptionSupportReglementaire } from '../model/PrescriptionSupportReglementaire';
|
|
9
8
|
|
|
10
9
|
export class PrescriptionsAPI extends Core {
|
|
11
10
|
constructor(config: MetariscConfig, client?: Client) {
|
|
@@ -30,24 +29,6 @@ export class PrescriptionsAPI extends Core {
|
|
|
30
29
|
});
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
/**
|
|
34
|
-
* Suppression d'un support réglementaire.
|
|
35
|
-
*/
|
|
36
|
-
deleteSupportReglementaire(
|
|
37
|
-
supportReglementaireId: string
|
|
38
|
-
) : Promise<AxiosResponse<void>>
|
|
39
|
-
{
|
|
40
|
-
const pathVariable = { 'support_reglementaire_id': (new String(supportReglementaireId)).toString() };
|
|
41
|
-
return this.request({
|
|
42
|
-
method: 'DELETE',
|
|
43
|
-
endpoint: Utils.constructPath(pathVariable, '/supports_reglementaires/{support_reglementaire_id}'),
|
|
44
|
-
transformResponse: [(data) => {
|
|
45
|
-
const parsedData = JSON.parse(data);
|
|
46
|
-
return parsedData;
|
|
47
|
-
}]
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
32
|
/**
|
|
52
33
|
* Récupération des détails d'une prescription dans la bibliothèque.
|
|
53
34
|
*/
|
|
@@ -66,24 +47,6 @@ export class PrescriptionsAPI extends Core {
|
|
|
66
47
|
});
|
|
67
48
|
}
|
|
68
49
|
|
|
69
|
-
/**
|
|
70
|
-
* Récupération des détails d'un support réglementaire.
|
|
71
|
-
*/
|
|
72
|
-
getSupportReglementaire(
|
|
73
|
-
supportReglementaireId: string
|
|
74
|
-
) : Promise<AxiosResponse<PrescriptionSupportReglementaire>>
|
|
75
|
-
{
|
|
76
|
-
const pathVariable = { 'support_reglementaire_id': (new String(supportReglementaireId)).toString() };
|
|
77
|
-
return this.request({
|
|
78
|
-
method: 'GET',
|
|
79
|
-
endpoint: Utils.constructPath(pathVariable, '/supports_reglementaires/{support_reglementaire_id}'),
|
|
80
|
-
transformResponse: [(data) => {
|
|
81
|
-
const parsedData = JSON.parse(data);
|
|
82
|
-
return parsedData;
|
|
83
|
-
}]
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
|
|
87
50
|
/**
|
|
88
51
|
* Liste des prescriptions.
|
|
89
52
|
*/
|
|
@@ -107,29 +70,6 @@ export class PrescriptionsAPI extends Core {
|
|
|
107
70
|
});
|
|
108
71
|
}
|
|
109
72
|
|
|
110
|
-
/**
|
|
111
|
-
* Liste des supports réglementaires.
|
|
112
|
-
*/
|
|
113
|
-
paginateSupportsReglementaires(
|
|
114
|
-
contenu? : string,
|
|
115
|
-
reference? : string
|
|
116
|
-
) : Collection<PrescriptionSupportReglementaire>
|
|
117
|
-
{
|
|
118
|
-
const pathVariable = { };
|
|
119
|
-
return this.collect({
|
|
120
|
-
method: 'GET',
|
|
121
|
-
endpoint: Utils.constructPath(pathVariable, '/supports_reglementaires'),
|
|
122
|
-
params: Utils.payloadFilter({
|
|
123
|
-
'contenu': contenu === undefined ? undefined : (new String(contenu)).toString(),
|
|
124
|
-
'reference': reference === undefined ? undefined : (new String(reference)).toString()
|
|
125
|
-
}),
|
|
126
|
-
transformResponse: [(data) => {
|
|
127
|
-
const parsedData = JSON.parse(data);
|
|
128
|
-
return parsedData;
|
|
129
|
-
}]
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
|
|
133
73
|
/**
|
|
134
74
|
* Modification d'une prescription existante en définissant les valeurs des paramètres transmis. Tous les paramètres non fournis resteront inchangés.
|
|
135
75
|
*/
|
|
@@ -169,23 +109,4 @@ export class PrescriptionsAPI extends Core {
|
|
|
169
109
|
});
|
|
170
110
|
}
|
|
171
111
|
|
|
172
|
-
/**
|
|
173
|
-
* Ajouter un support réglementaire.
|
|
174
|
-
*/
|
|
175
|
-
postSupportReglementaire(
|
|
176
|
-
params : any
|
|
177
|
-
) : Promise<AxiosResponse<PrescriptionSupportReglementaire>>
|
|
178
|
-
{
|
|
179
|
-
const pathVariable = { };
|
|
180
|
-
return this.request({
|
|
181
|
-
method: 'POST',
|
|
182
|
-
endpoint: Utils.constructPath(pathVariable, '/supports_reglementaires'),
|
|
183
|
-
transformResponse: [(data) => {
|
|
184
|
-
const parsedData = JSON.parse(data);
|
|
185
|
-
return parsedData;
|
|
186
|
-
}],
|
|
187
|
-
body: Utils.payloadFilter(params)
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
|
|
191
112
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
import { Core, MetariscConfig } from "../core";
|
|
3
|
+
import { Utils } from "../utils";
|
|
4
|
+
import { Client } from "../client";
|
|
5
|
+
import { Collection } from "../collection";
|
|
6
|
+
import { ERP } from '../model/ERP';
|
|
7
|
+
|
|
8
|
+
export class SearchAPI extends Core {
|
|
9
|
+
constructor(config: MetariscConfig, client?: Client) {
|
|
10
|
+
super(config, client);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Recherche d'ERP selon des critères simples.
|
|
15
|
+
Cet endpoint de recherche permet de saffranchir des limitations de la recherche par query parameters (notamment le nombre de critères).
|
|
16
|
+
|
|
17
|
+
*/
|
|
18
|
+
paginateErp(
|
|
19
|
+
params : any
|
|
20
|
+
) : Collection<ERP>
|
|
21
|
+
{
|
|
22
|
+
const pathVariable = { };
|
|
23
|
+
return this.collect({
|
|
24
|
+
method: 'POST',
|
|
25
|
+
endpoint: Utils.constructPath(pathVariable, '/search/erp'),
|
|
26
|
+
transformResponse: [(data) => {
|
|
27
|
+
const parsedData = JSON.parse(data);
|
|
28
|
+
return parsedData;
|
|
29
|
+
}],
|
|
30
|
+
body: Utils.payloadFilter(params)
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
import { Core, MetariscConfig } from "../core";
|
|
3
|
+
import { Utils } from "../utils";
|
|
4
|
+
import type { AxiosResponse } from "axios";
|
|
5
|
+
import { Client } from "../client";
|
|
6
|
+
import { Collection } from "../collection";
|
|
7
|
+
import { PrescriptionSupportReglementaire } from '../model/PrescriptionSupportReglementaire';
|
|
8
|
+
|
|
9
|
+
export class SupportsReglementairesAPI extends Core {
|
|
10
|
+
constructor(config: MetariscConfig, client?: Client) {
|
|
11
|
+
super(config, client);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Suppression d'un support réglementaire.
|
|
16
|
+
*/
|
|
17
|
+
deleteSupportReglementaire(
|
|
18
|
+
supportReglementaireId: string
|
|
19
|
+
) : Promise<AxiosResponse<void>>
|
|
20
|
+
{
|
|
21
|
+
const pathVariable = { 'support_reglementaire_id': (new String(supportReglementaireId)).toString() };
|
|
22
|
+
return this.request({
|
|
23
|
+
method: 'DELETE',
|
|
24
|
+
endpoint: Utils.constructPath(pathVariable, '/supports_reglementaires/{support_reglementaire_id}'),
|
|
25
|
+
transformResponse: [(data) => {
|
|
26
|
+
const parsedData = JSON.parse(data);
|
|
27
|
+
return parsedData;
|
|
28
|
+
}]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Récupération des détails d'un support réglementaire.
|
|
34
|
+
*/
|
|
35
|
+
getSupportReglementaire(
|
|
36
|
+
supportReglementaireId: string
|
|
37
|
+
) : Promise<AxiosResponse<PrescriptionSupportReglementaire>>
|
|
38
|
+
{
|
|
39
|
+
const pathVariable = { 'support_reglementaire_id': (new String(supportReglementaireId)).toString() };
|
|
40
|
+
return this.request({
|
|
41
|
+
method: 'GET',
|
|
42
|
+
endpoint: Utils.constructPath(pathVariable, '/supports_reglementaires/{support_reglementaire_id}'),
|
|
43
|
+
transformResponse: [(data) => {
|
|
44
|
+
const parsedData = JSON.parse(data);
|
|
45
|
+
return parsedData;
|
|
46
|
+
}]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Liste des supports réglementaires.
|
|
52
|
+
*/
|
|
53
|
+
paginateSupportsReglementaires(
|
|
54
|
+
contenu? : string,
|
|
55
|
+
reference? : string
|
|
56
|
+
) : Collection<PrescriptionSupportReglementaire>
|
|
57
|
+
{
|
|
58
|
+
const pathVariable = { };
|
|
59
|
+
return this.collect({
|
|
60
|
+
method: 'GET',
|
|
61
|
+
endpoint: Utils.constructPath(pathVariable, '/supports_reglementaires'),
|
|
62
|
+
params: Utils.payloadFilter({
|
|
63
|
+
'contenu': contenu === undefined ? undefined : (new String(contenu)).toString(),
|
|
64
|
+
'reference': reference === undefined ? undefined : (new String(reference)).toString()
|
|
65
|
+
}),
|
|
66
|
+
transformResponse: [(data) => {
|
|
67
|
+
const parsedData = JSON.parse(data);
|
|
68
|
+
return parsedData;
|
|
69
|
+
}]
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Modification d'un support réglementaire existant en définissant les valeurs des paramètres transmis. Tous les paramètres non fournis resteront inchangés.
|
|
75
|
+
*/
|
|
76
|
+
patchSupportReglementaire(
|
|
77
|
+
supportReglementaireId: string,
|
|
78
|
+
params : any
|
|
79
|
+
) : Promise<AxiosResponse<PrescriptionSupportReglementaire>>
|
|
80
|
+
{
|
|
81
|
+
const pathVariable = { 'support_reglementaire_id': (new String(supportReglementaireId)).toString() };
|
|
82
|
+
return this.request({
|
|
83
|
+
method: 'PATCH',
|
|
84
|
+
endpoint: Utils.constructPath(pathVariable, '/supports_reglementaires/{support_reglementaire_id}'),
|
|
85
|
+
transformResponse: [(data) => {
|
|
86
|
+
const parsedData = JSON.parse(data);
|
|
87
|
+
return parsedData;
|
|
88
|
+
}],
|
|
89
|
+
body: Utils.payloadFilter(params)
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Ajouter un support réglementaire.
|
|
95
|
+
*/
|
|
96
|
+
postSupportReglementaire(
|
|
97
|
+
params : any
|
|
98
|
+
) : Promise<AxiosResponse<PrescriptionSupportReglementaire>>
|
|
99
|
+
{
|
|
100
|
+
const pathVariable = { };
|
|
101
|
+
return this.request({
|
|
102
|
+
method: 'POST',
|
|
103
|
+
endpoint: Utils.constructPath(pathVariable, '/supports_reglementaires'),
|
|
104
|
+
transformResponse: [(data) => {
|
|
105
|
+
const parsedData = JSON.parse(data);
|
|
106
|
+
return parsedData;
|
|
107
|
+
}],
|
|
108
|
+
body: Utils.payloadFilter(params)
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
}
|
package/src/collection.ts
CHANGED
|
@@ -76,11 +76,11 @@ export class Collection<T>
|
|
|
76
76
|
const generator = this.autoPagingIterator();
|
|
77
77
|
const results = [];
|
|
78
78
|
|
|
79
|
-
limit = limit ??
|
|
79
|
+
limit = limit ?? 1000;
|
|
80
80
|
|
|
81
|
-
if (limit >
|
|
81
|
+
if (limit > 1000) {
|
|
82
82
|
throw Error(
|
|
83
|
-
'You cannot specify a limit of more than
|
|
83
|
+
'You cannot specify a limit of more than 1,000 items to fetch in `autoPagingIteratorToArray`; use `autoPagingIterator` to iterate through longer lists.'
|
|
84
84
|
);
|
|
85
85
|
}
|
|
86
86
|
|
package/src/metarisc.ts
CHANGED
|
@@ -15,6 +15,7 @@ export class Metarisc extends Core
|
|
|
15
15
|
public sites_geographiques: resources.SitesGeographiquesAPI;
|
|
16
16
|
public workflows: resources.WorkflowsAPI;
|
|
17
17
|
public healthcheck: resources.HealthcheckAPI;
|
|
18
|
+
public search: resources.SearchAPI;
|
|
18
19
|
public enveloppes: resources.EnveloppesAPI;
|
|
19
20
|
public organisations: resources.OrganisationsAPI;
|
|
20
21
|
public pei: resources.PEIAPI;
|
|
@@ -27,7 +28,7 @@ export class Metarisc extends Core
|
|
|
27
28
|
public dossiers_affectations: resources.DossiersAffectationsAPI;
|
|
28
29
|
public mains_courantes: resources.MainsCourantesAPI;
|
|
29
30
|
public anomalies: resources.AnomaliesAPI;
|
|
30
|
-
public supports_reglementaires: resources.
|
|
31
|
+
public supports_reglementaires: resources.SupportsReglementairesAPI;
|
|
31
32
|
public feed: resources.FeedAPI;
|
|
32
33
|
public tournees_deci: resources.TourneesDECIAPI;
|
|
33
34
|
public controles_pei: resources.ControlesPEIAPI;
|
|
@@ -55,6 +56,7 @@ export class Metarisc extends Core
|
|
|
55
56
|
case 'sites_geographiques': return new resources.SitesGeographiquesAPI(config, tmpClient);
|
|
56
57
|
case 'workflows': return new resources.WorkflowsAPI(config, tmpClient);
|
|
57
58
|
case 'healthcheck': return new resources.HealthcheckAPI(config, tmpClient);
|
|
59
|
+
case 'search': return new resources.SearchAPI(config, tmpClient);
|
|
58
60
|
case 'enveloppes': return new resources.EnveloppesAPI(config, tmpClient);
|
|
59
61
|
case 'organisations': return new resources.OrganisationsAPI(config, tmpClient);
|
|
60
62
|
case 'pei': return new resources.PEIAPI(config, tmpClient);
|
|
@@ -67,7 +69,7 @@ export class Metarisc extends Core
|
|
|
67
69
|
case 'dossiers_affectations': return new resources.DossiersAffectationsAPI(config, tmpClient);
|
|
68
70
|
case 'mains_courantes': return new resources.MainsCourantesAPI(config, tmpClient);
|
|
69
71
|
case 'anomalies': return new resources.AnomaliesAPI(config, tmpClient);
|
|
70
|
-
case 'supports_reglementaires': return new resources.
|
|
72
|
+
case 'supports_reglementaires': return new resources.SupportsReglementairesAPI(config, tmpClient);
|
|
71
73
|
case 'feed': return new resources.FeedAPI(config, tmpClient);
|
|
72
74
|
case 'tournees_deci': return new resources.TourneesDECIAPI(config, tmpClient);
|
|
73
75
|
case 'controles_pei': return new resources.ControlesPEIAPI(config, tmpClient);
|
package/src/resources.ts
CHANGED
|
@@ -48,8 +48,12 @@ export { PingAPI } from './api/PingAPI';
|
|
|
48
48
|
|
|
49
49
|
export { PrescriptionsAPI } from './api/PrescriptionsAPI';
|
|
50
50
|
|
|
51
|
+
export { SearchAPI } from './api/SearchAPI';
|
|
52
|
+
|
|
51
53
|
export { SitesGeographiquesAPI } from './api/SitesGeographiquesAPI';
|
|
52
54
|
|
|
55
|
+
export { SupportsReglementairesAPI } from './api/SupportsReglementairesAPI';
|
|
56
|
+
|
|
53
57
|
export { TourneesDECIAPI } from './api/TourneesDECIAPI';
|
|
54
58
|
|
|
55
59
|
export { UtilisateursAPI } from './api/UtilisateursAPI';
|