@metarisc/metarisc-js 0.0.1-alpha.35 → 0.0.1-alpha.37
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.d.ts +19 -0
- package/lib/api/CommissionsAPI.js +44 -0
- package/lib/api/PEIAPI.d.ts +6 -0
- package/lib/api/PEIAPI.js +14 -0
- package/lib/api/PrescriptionsAPI.d.ts +38 -0
- package/lib/api/PrescriptionsAPI.js +97 -0
- package/lib/api/TournesDECIAPI.d.ts +6 -0
- package/lib/api/TournesDECIAPI.js +14 -0
- package/lib/metarisc.d.ts +1 -0
- package/lib/metarisc.js +2 -0
- package/lib/model/PostCommissionDateDossierRequest.d.ts +3 -0
- package/lib/model/PostCommissionDateDossierRequest.js +2 -0
- package/lib/model/PostCommissionRequest.d.ts +7 -0
- package/lib/model/PostCommissionRequest.js +2 -0
- package/lib/model/PostPeiRequest.d.ts +7 -0
- package/lib/model/PostPeiRequest.js +2 -0
- package/lib/model/PostPrescriptionRequest.d.ts +6 -0
- package/lib/model/PostPrescriptionRequest.js +2 -0
- package/lib/model/PostPrescriptionRequestSupportsReglementairesInner.d.ts +3 -0
- package/lib/model/PostPrescriptionRequestSupportsReglementairesInner.js +2 -0
- package/lib/model/PostSupportReglementaireRequest.d.ts +8 -0
- package/lib/model/PostSupportReglementaireRequest.js +2 -0
- package/lib/model/PostTourneeDeciRequest.d.ts +4 -0
- package/lib/model/PostTourneeDeciRequest.js +2 -0
- package/package.json +1 -1
- package/src/api/CommissionsAPI.ts +52 -0
- package/src/api/PEIAPI.ts +17 -0
- package/src/api/PrescriptionsAPI.ts +115 -0
- package/src/api/TournesDECIAPI.ts +17 -0
- package/src/metarisc.ts +5 -0
- package/src/model/PostCommissionDateDossierRequest.ts +3 -0
- package/src/model/PostCommissionRequest.ts +7 -0
- package/src/model/PostPeiRequest.ts +8 -0
- package/src/model/PostPrescriptionRequest.ts +7 -0
- package/src/model/PostPrescriptionRequestSupportsReglementairesInner.ts +3 -0
- package/src/model/PostSupportReglementaireRequest.ts +8 -0
- package/src/model/PostTourneeDeciRequest.ts +4 -0
|
@@ -5,8 +5,15 @@ import { Collection } from "../collection";
|
|
|
5
5
|
import { Commission } from '../model/Commission';
|
|
6
6
|
import { PassageCommission } from '../model/PassageCommission';
|
|
7
7
|
import { PassageCommissionDossier } from '../model/PassageCommissionDossier';
|
|
8
|
+
import { PostCommissionDateDossierRequest } from '../model/PostCommissionDateDossierRequest';
|
|
9
|
+
import { PostCommissionRequest } from '../model/PostCommissionRequest';
|
|
8
10
|
export declare class CommissionsAPI extends Core {
|
|
9
11
|
constructor(config: MetariscConfig, client?: Client);
|
|
12
|
+
/**
|
|
13
|
+
* Suppression d'une commission.
|
|
14
|
+
* @param commissionId Identifiant unique de la commission
|
|
15
|
+
*/
|
|
16
|
+
deleteCommission(commissionId: string): Promise<AxiosResponse<void>>;
|
|
10
17
|
/**
|
|
11
18
|
* Récupération des détails de la commission.
|
|
12
19
|
* @param commissionId Identifiant unique de la commission
|
|
@@ -39,4 +46,16 @@ export declare class CommissionsAPI extends Core {
|
|
|
39
46
|
* @param perPage Nombre de résultats demandé
|
|
40
47
|
*/
|
|
41
48
|
paginateCommissions(page?: number, perPage?: number): Collection<Commission>;
|
|
49
|
+
/**
|
|
50
|
+
* Ajoute une commission.
|
|
51
|
+
* @param postCommissionRequest
|
|
52
|
+
*/
|
|
53
|
+
postCommission(postCommissionRequest?: PostCommissionRequest): Promise<AxiosResponse<Commission>>;
|
|
54
|
+
/**
|
|
55
|
+
* Ajout d'un dossier à l'ordre du jour d'un passage en commission.
|
|
56
|
+
* @param commissionId Identifiant unique de la commission
|
|
57
|
+
* @param dateId Identifiant unique du passage en commission
|
|
58
|
+
* @param postCommissionDateDossierRequest
|
|
59
|
+
*/
|
|
60
|
+
postCommissionDateDossier(commissionId: string, dateId: string, postCommissionDateDossierRequest?: PostCommissionDateDossierRequest): Promise<AxiosResponse<PassageCommissionDossier>>;
|
|
42
61
|
}
|
|
@@ -7,6 +7,20 @@ class CommissionsAPI extends core_1.Core {
|
|
|
7
7
|
constructor(config, client) {
|
|
8
8
|
super(config, client);
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Suppression d'une commission.
|
|
12
|
+
* @param commissionId Identifiant unique de la commission
|
|
13
|
+
*/
|
|
14
|
+
async deleteCommission(commissionId) {
|
|
15
|
+
const pathVariable = { 'commission_id': commissionId };
|
|
16
|
+
return this.request({
|
|
17
|
+
method: 'DELETE',
|
|
18
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}'),
|
|
19
|
+
headers: {},
|
|
20
|
+
params: {},
|
|
21
|
+
body: {}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
10
24
|
/**
|
|
11
25
|
* Récupération des détails de la commission.
|
|
12
26
|
* @param commissionId Identifiant unique de la commission
|
|
@@ -84,5 +98,35 @@ class CommissionsAPI extends core_1.Core {
|
|
|
84
98
|
body: {}
|
|
85
99
|
});
|
|
86
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Ajoute une commission.
|
|
103
|
+
* @param postCommissionRequest
|
|
104
|
+
*/
|
|
105
|
+
async postCommission(postCommissionRequest) {
|
|
106
|
+
const pathVariable = {};
|
|
107
|
+
return this.request({
|
|
108
|
+
method: 'POST',
|
|
109
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions'),
|
|
110
|
+
headers: {},
|
|
111
|
+
params: {},
|
|
112
|
+
body: { 'type': postCommissionRequest?.type, 'libelle': postCommissionRequest?.libelle }
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Ajout d'un dossier à l'ordre du jour d'un passage en commission.
|
|
117
|
+
* @param commissionId Identifiant unique de la commission
|
|
118
|
+
* @param dateId Identifiant unique du passage en commission
|
|
119
|
+
* @param postCommissionDateDossierRequest
|
|
120
|
+
*/
|
|
121
|
+
async postCommissionDateDossier(commissionId, dateId, postCommissionDateDossierRequest) {
|
|
122
|
+
const pathVariable = { 'commission_id': commissionId, 'date_id': dateId };
|
|
123
|
+
return this.request({
|
|
124
|
+
method: 'POST',
|
|
125
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}/dates/{date_id}/ordre_du_jour'),
|
|
126
|
+
headers: {},
|
|
127
|
+
params: {},
|
|
128
|
+
body: { 'dossier_id': postCommissionDateDossierRequest?.dossier_id }
|
|
129
|
+
});
|
|
130
|
+
}
|
|
87
131
|
}
|
|
88
132
|
exports.CommissionsAPI = CommissionsAPI;
|
package/lib/api/PEIAPI.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { AxiosResponse } from "axios";
|
|
|
3
3
|
import { Client } from "../client";
|
|
4
4
|
import { Collection } from "../collection";
|
|
5
5
|
import { PEI } from '../model/PEI';
|
|
6
|
+
import { PostPeiRequest } from '../model/PostPeiRequest';
|
|
6
7
|
import { Contact } from '../model/Contact';
|
|
7
8
|
import { DescriptifTechniqueDECI } from '../model/DescriptifTechniqueDECI';
|
|
8
9
|
import { PieceJointe } from '../model/PieceJointe';
|
|
@@ -40,4 +41,9 @@ export declare class PEIAPI extends Core {
|
|
|
40
41
|
* @param perPage Nombre de résultats demandé
|
|
41
42
|
*/
|
|
42
43
|
paginatePeiPiecesJointes(peiId: string, page?: number, perPage?: number): Collection<PieceJointe>;
|
|
44
|
+
/**
|
|
45
|
+
* Ajout d'un PEI.
|
|
46
|
+
* @param postPeiRequest
|
|
47
|
+
*/
|
|
48
|
+
postPei(postPeiRequest?: PostPeiRequest): Promise<AxiosResponse<PEI>>;
|
|
43
49
|
}
|
package/lib/api/PEIAPI.js
CHANGED
|
@@ -84,5 +84,19 @@ class PEIAPI extends core_1.Core {
|
|
|
84
84
|
body: {}
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Ajout d'un PEI.
|
|
89
|
+
* @param postPeiRequest
|
|
90
|
+
*/
|
|
91
|
+
async postPei(postPeiRequest) {
|
|
92
|
+
const pathVariable = {};
|
|
93
|
+
return this.request({
|
|
94
|
+
method: 'POST',
|
|
95
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/pei'),
|
|
96
|
+
headers: {},
|
|
97
|
+
params: {},
|
|
98
|
+
body: { 'implantation': postPeiRequest?.implantation, 'numero': postPeiRequest?.numero, 'numero_compteur': postPeiRequest?.numero_compteur, 'numero_serie_appareil': postPeiRequest?.numero_serie_appareil }
|
|
99
|
+
});
|
|
100
|
+
}
|
|
87
101
|
}
|
|
88
102
|
exports.PEIAPI = PEIAPI;
|
|
@@ -1,13 +1,51 @@
|
|
|
1
1
|
import { Core, MetariscConfig } from "../core";
|
|
2
|
+
import type { AxiosResponse } from "axios";
|
|
2
3
|
import { Client } from "../client";
|
|
3
4
|
import { Collection } from "../collection";
|
|
5
|
+
import { PostPrescriptionRequest } from '../model/PostPrescriptionRequest';
|
|
6
|
+
import { PostSupportReglementaireRequest } from '../model/PostSupportReglementaireRequest';
|
|
4
7
|
import { Prescription } from '../model/Prescription';
|
|
8
|
+
import { PrescriptionSupportReglementaire } from '../model/PrescriptionSupportReglementaire';
|
|
5
9
|
export declare class PrescriptionsAPI extends Core {
|
|
6
10
|
constructor(config: MetariscConfig, client?: Client);
|
|
11
|
+
/**
|
|
12
|
+
* Suppression d'une prescription type de la bibliothèque.
|
|
13
|
+
* @param prescriptionId Identifiant unique de la prescription
|
|
14
|
+
*/
|
|
15
|
+
deletePrescription(prescriptionId: string): Promise<AxiosResponse<void>>;
|
|
16
|
+
/**
|
|
17
|
+
* Suppression d'un support réglementaire.
|
|
18
|
+
* @param supportReglementaireId Identifiant unique du support réglementaire
|
|
19
|
+
*/
|
|
20
|
+
deleteSupportReglementaire(supportReglementaireId: string): Promise<AxiosResponse<void>>;
|
|
21
|
+
/**
|
|
22
|
+
* Récupération des détails d'une prescription dans la bibliothèque.
|
|
23
|
+
* @param prescriptionId Identifiant unique de la prescription
|
|
24
|
+
*/
|
|
25
|
+
getPrescription(prescriptionId: string): Promise<AxiosResponse<Prescription>>;
|
|
26
|
+
/**
|
|
27
|
+
* Récupération des détails d'un support réglementaire.
|
|
28
|
+
* @param supportReglementaireId Identifiant unique du support réglementaire
|
|
29
|
+
*/
|
|
30
|
+
getSupportReglementaire(supportReglementaireId: string): Promise<AxiosResponse<PrescriptionSupportReglementaire>>;
|
|
7
31
|
/**
|
|
8
32
|
* Liste des prescriptions.
|
|
9
33
|
* @param page Numéro de page
|
|
10
34
|
* @param perPage Nombre de résultats demandé
|
|
11
35
|
*/
|
|
12
36
|
paginatePrescriptions(page?: number, perPage?: number): Collection<Prescription>;
|
|
37
|
+
/**
|
|
38
|
+
* Liste des supports réglementaires.
|
|
39
|
+
*/
|
|
40
|
+
paginateSupportsReglementaires(): Collection<PrescriptionSupportReglementaire>;
|
|
41
|
+
/**
|
|
42
|
+
* Ajout d'une nouvelle prescription type dans la bibliothèque.
|
|
43
|
+
* @param postPrescriptionRequest
|
|
44
|
+
*/
|
|
45
|
+
postPrescription(postPrescriptionRequest?: PostPrescriptionRequest): Promise<AxiosResponse<Prescription>>;
|
|
46
|
+
/**
|
|
47
|
+
* Ajouter un support réglementaire.
|
|
48
|
+
* @param postSupportReglementaireRequest
|
|
49
|
+
*/
|
|
50
|
+
postSupportReglementaire(postSupportReglementaireRequest?: PostSupportReglementaireRequest): Promise<AxiosResponse<PrescriptionSupportReglementaire>>;
|
|
13
51
|
}
|
|
@@ -7,6 +7,62 @@ class PrescriptionsAPI extends core_1.Core {
|
|
|
7
7
|
constructor(config, client) {
|
|
8
8
|
super(config, client);
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Suppression d'une prescription type de la bibliothèque.
|
|
12
|
+
* @param prescriptionId Identifiant unique de la prescription
|
|
13
|
+
*/
|
|
14
|
+
async deletePrescription(prescriptionId) {
|
|
15
|
+
const pathVariable = { 'prescription_id': prescriptionId };
|
|
16
|
+
return this.request({
|
|
17
|
+
method: 'DELETE',
|
|
18
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/prescriptions/{prescription_id}'),
|
|
19
|
+
headers: {},
|
|
20
|
+
params: {},
|
|
21
|
+
body: {}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Suppression d'un support réglementaire.
|
|
26
|
+
* @param supportReglementaireId Identifiant unique du support réglementaire
|
|
27
|
+
*/
|
|
28
|
+
async deleteSupportReglementaire(supportReglementaireId) {
|
|
29
|
+
const pathVariable = { 'support_reglementaire_id': supportReglementaireId };
|
|
30
|
+
return this.request({
|
|
31
|
+
method: 'DELETE',
|
|
32
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/supports_reglementaires/{support_reglementaire_id}'),
|
|
33
|
+
headers: {},
|
|
34
|
+
params: {},
|
|
35
|
+
body: {}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Récupération des détails d'une prescription dans la bibliothèque.
|
|
40
|
+
* @param prescriptionId Identifiant unique de la prescription
|
|
41
|
+
*/
|
|
42
|
+
async getPrescription(prescriptionId) {
|
|
43
|
+
const pathVariable = { 'prescription_id': prescriptionId };
|
|
44
|
+
return this.request({
|
|
45
|
+
method: 'GET',
|
|
46
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/prescriptions/{prescription_id}'),
|
|
47
|
+
headers: {},
|
|
48
|
+
params: {},
|
|
49
|
+
body: {}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Récupération des détails d'un support réglementaire.
|
|
54
|
+
* @param supportReglementaireId Identifiant unique du support réglementaire
|
|
55
|
+
*/
|
|
56
|
+
async getSupportReglementaire(supportReglementaireId) {
|
|
57
|
+
const pathVariable = { 'support_reglementaire_id': supportReglementaireId };
|
|
58
|
+
return this.request({
|
|
59
|
+
method: 'GET',
|
|
60
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/supports_reglementaires/{support_reglementaire_id}'),
|
|
61
|
+
headers: {},
|
|
62
|
+
params: {},
|
|
63
|
+
body: {}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
10
66
|
/**
|
|
11
67
|
* Liste des prescriptions.
|
|
12
68
|
* @param page Numéro de page
|
|
@@ -22,5 +78,46 @@ class PrescriptionsAPI extends core_1.Core {
|
|
|
22
78
|
body: {}
|
|
23
79
|
});
|
|
24
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Liste des supports réglementaires.
|
|
83
|
+
*/
|
|
84
|
+
paginateSupportsReglementaires() {
|
|
85
|
+
const pathVariable = {};
|
|
86
|
+
return this.collect({
|
|
87
|
+
method: 'GET',
|
|
88
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/supports_reglementaires'),
|
|
89
|
+
headers: {},
|
|
90
|
+
params: {},
|
|
91
|
+
body: {}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Ajout d'une nouvelle prescription type dans la bibliothèque.
|
|
96
|
+
* @param postPrescriptionRequest
|
|
97
|
+
*/
|
|
98
|
+
async postPrescription(postPrescriptionRequest) {
|
|
99
|
+
const pathVariable = {};
|
|
100
|
+
return this.request({
|
|
101
|
+
method: 'POST',
|
|
102
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/prescriptions'),
|
|
103
|
+
headers: {},
|
|
104
|
+
params: {},
|
|
105
|
+
body: { 'contenu': postPrescriptionRequest?.contenu, 'type': postPrescriptionRequest?.type, 'supports_reglementaires': postPrescriptionRequest?.supports_reglementaires }
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Ajouter un support réglementaire.
|
|
110
|
+
* @param postSupportReglementaireRequest
|
|
111
|
+
*/
|
|
112
|
+
async postSupportReglementaire(postSupportReglementaireRequest) {
|
|
113
|
+
const pathVariable = {};
|
|
114
|
+
return this.request({
|
|
115
|
+
method: 'POST',
|
|
116
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/supports_reglementaires'),
|
|
117
|
+
headers: {},
|
|
118
|
+
params: {},
|
|
119
|
+
body: { 'nature': postSupportReglementaireRequest?.nature, 'legifrance_cid': postSupportReglementaireRequest?.legifrance_cid, 'contenu': postSupportReglementaireRequest?.contenu, 'titre': postSupportReglementaireRequest?.titre, 'etat': postSupportReglementaireRequest?.etat, 'reference': postSupportReglementaireRequest?.reference }
|
|
120
|
+
});
|
|
121
|
+
}
|
|
25
122
|
}
|
|
26
123
|
exports.PrescriptionsAPI = PrescriptionsAPI;
|
|
@@ -2,6 +2,7 @@ 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 { PostTourneeDeciRequest } from '../model/PostTourneeDeciRequest';
|
|
5
6
|
import { TourneeDeci } from '../model/TourneeDeci';
|
|
6
7
|
import { TourneeDeciPei } from '../model/TourneeDeciPei';
|
|
7
8
|
export declare class TournesDECIAPI extends Core {
|
|
@@ -30,4 +31,9 @@ export declare class TournesDECIAPI extends Core {
|
|
|
30
31
|
* @param perPage Nombre de résultats demandé
|
|
31
32
|
*/
|
|
32
33
|
paginateTourneesDeci(page?: number, perPage?: number): Collection<TourneeDeci>;
|
|
34
|
+
/**
|
|
35
|
+
* Ajout d'une nouvelle tournée DECI.
|
|
36
|
+
* @param postTourneeDeciRequest
|
|
37
|
+
*/
|
|
38
|
+
postTourneeDeci(postTourneeDeciRequest?: PostTourneeDeciRequest): Promise<AxiosResponse<TourneeDeci>>;
|
|
33
39
|
}
|
|
@@ -67,5 +67,19 @@ class TournesDECIAPI extends core_1.Core {
|
|
|
67
67
|
body: {}
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Ajout d'une nouvelle tournée DECI.
|
|
72
|
+
* @param postTourneeDeciRequest
|
|
73
|
+
*/
|
|
74
|
+
async postTourneeDeci(postTourneeDeciRequest) {
|
|
75
|
+
const pathVariable = {};
|
|
76
|
+
return this.request({
|
|
77
|
+
method: 'POST',
|
|
78
|
+
endpoint: utils_1.Utils.constructPath(pathVariable, '/tournees_deci'),
|
|
79
|
+
headers: {},
|
|
80
|
+
params: {},
|
|
81
|
+
body: { 'libelle': postTourneeDeciRequest?.libelle, 'description': postTourneeDeciRequest?.description }
|
|
82
|
+
});
|
|
83
|
+
}
|
|
70
84
|
}
|
|
71
85
|
exports.TournesDECIAPI = TournesDECIAPI;
|
package/lib/metarisc.d.ts
CHANGED
package/lib/metarisc.js
CHANGED
|
@@ -37,6 +37,8 @@ class Metarisc extends core_1.Core {
|
|
|
37
37
|
return new PingAPI_1.PingAPI(config, tmpClient);
|
|
38
38
|
case 'anomalies':
|
|
39
39
|
return new AnomaliesAPI_1.AnomaliesAPI(config, tmpClient);
|
|
40
|
+
case 'supports_reglementaires':
|
|
41
|
+
return new PrescriptionsAPI_1.PrescriptionsAPI(config, tmpClient);
|
|
40
42
|
case 'feed':
|
|
41
43
|
return new FeedAPI_1.FeedAPI(config, tmpClient);
|
|
42
44
|
case 'tournees_deci':
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PostPrescriptionRequestSupportsReglementairesInner } from '../../src/model/PostPrescriptionRequestSupportsReglementairesInner';
|
|
2
|
+
export type PostPrescriptionRequest = {
|
|
3
|
+
'contenu'?: string;
|
|
4
|
+
'type'?: string;
|
|
5
|
+
'supports_reglementaires'?: Array<PostPrescriptionRequestSupportsReglementairesInner>;
|
|
6
|
+
};
|
package/package.json
CHANGED
|
@@ -6,12 +6,30 @@ import { Collection } from "../collection";
|
|
|
6
6
|
import { Commission } from '../model/Commission';
|
|
7
7
|
import { PassageCommission } from '../model/PassageCommission';
|
|
8
8
|
import { PassageCommissionDossier } from '../model/PassageCommissionDossier';
|
|
9
|
+
import { PostCommissionDateDossierRequest } from '../model/PostCommissionDateDossierRequest';
|
|
10
|
+
import { PostCommissionRequest } from '../model/PostCommissionRequest';
|
|
9
11
|
|
|
10
12
|
export class CommissionsAPI extends Core {
|
|
11
13
|
constructor(config: MetariscConfig, client?: Client) {
|
|
12
14
|
super(config, client);
|
|
13
15
|
}
|
|
14
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Suppression d'une commission.
|
|
19
|
+
* @param commissionId Identifiant unique de la commission
|
|
20
|
+
*/
|
|
21
|
+
async deleteCommission(commissionId: string): Promise<AxiosResponse<void>>
|
|
22
|
+
{
|
|
23
|
+
const pathVariable = { 'commission_id': commissionId };
|
|
24
|
+
return this.request({
|
|
25
|
+
method: 'DELETE',
|
|
26
|
+
endpoint: Utils.constructPath(pathVariable, '/commissions/{commission_id}'),
|
|
27
|
+
headers: { },
|
|
28
|
+
params: { },
|
|
29
|
+
body: {}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
15
33
|
/**
|
|
16
34
|
* Récupération des détails de la commission.
|
|
17
35
|
* @param commissionId Identifiant unique de la commission
|
|
@@ -99,4 +117,38 @@ export class CommissionsAPI extends Core {
|
|
|
99
117
|
});
|
|
100
118
|
}
|
|
101
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Ajoute une commission.
|
|
122
|
+
* @param postCommissionRequest
|
|
123
|
+
*/
|
|
124
|
+
async postCommission(postCommissionRequest?: PostCommissionRequest): Promise<AxiosResponse<Commission>>
|
|
125
|
+
{
|
|
126
|
+
const pathVariable = { };
|
|
127
|
+
return this.request({
|
|
128
|
+
method: 'POST',
|
|
129
|
+
endpoint: Utils.constructPath(pathVariable, '/commissions'),
|
|
130
|
+
headers: { },
|
|
131
|
+
params: { },
|
|
132
|
+
body: { 'type': postCommissionRequest?.type, 'libelle': postCommissionRequest?.libelle }
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Ajout d'un dossier à l'ordre du jour d'un passage en commission.
|
|
138
|
+
* @param commissionId Identifiant unique de la commission
|
|
139
|
+
* @param dateId Identifiant unique du passage en commission
|
|
140
|
+
* @param postCommissionDateDossierRequest
|
|
141
|
+
*/
|
|
142
|
+
async postCommissionDateDossier(commissionId: string, dateId: string, postCommissionDateDossierRequest?: PostCommissionDateDossierRequest): Promise<AxiosResponse<PassageCommissionDossier>>
|
|
143
|
+
{
|
|
144
|
+
const pathVariable = { 'commission_id': commissionId, 'date_id': dateId };
|
|
145
|
+
return this.request({
|
|
146
|
+
method: 'POST',
|
|
147
|
+
endpoint: Utils.constructPath(pathVariable, '/commissions/{commission_id}/dates/{date_id}/ordre_du_jour'),
|
|
148
|
+
headers: { },
|
|
149
|
+
params: { },
|
|
150
|
+
body: { 'dossier_id': postCommissionDateDossierRequest?.dossier_id }
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
|
|
102
154
|
}
|
package/src/api/PEIAPI.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { AxiosResponse } from "axios";
|
|
|
4
4
|
import { Client } from "../client";
|
|
5
5
|
import { Collection } from "../collection";
|
|
6
6
|
import { PEI } from '../model/PEI';
|
|
7
|
+
import { PostPeiRequest } from '../model/PostPeiRequest';
|
|
7
8
|
import { Contact } from '../model/Contact';
|
|
8
9
|
import { DescriptifTechniqueDECI } from '../model/DescriptifTechniqueDECI';
|
|
9
10
|
import { PieceJointe } from '../model/PieceJointe';
|
|
@@ -100,4 +101,20 @@ export class PEIAPI extends Core {
|
|
|
100
101
|
});
|
|
101
102
|
}
|
|
102
103
|
|
|
104
|
+
/**
|
|
105
|
+
* Ajout d'un PEI.
|
|
106
|
+
* @param postPeiRequest
|
|
107
|
+
*/
|
|
108
|
+
async postPei(postPeiRequest?: PostPeiRequest): Promise<AxiosResponse<PEI>>
|
|
109
|
+
{
|
|
110
|
+
const pathVariable = { };
|
|
111
|
+
return this.request({
|
|
112
|
+
method: 'POST',
|
|
113
|
+
endpoint: Utils.constructPath(pathVariable, '/pei'),
|
|
114
|
+
headers: { },
|
|
115
|
+
params: { },
|
|
116
|
+
body: { 'implantation': postPeiRequest?.implantation, 'numero': postPeiRequest?.numero, 'numero_compteur': postPeiRequest?.numero_compteur, 'numero_serie_appareil': postPeiRequest?.numero_serie_appareil }
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
103
120
|
}
|
|
@@ -1,14 +1,82 @@
|
|
|
1
1
|
import { Core, MetariscConfig } from "../core";
|
|
2
2
|
import { Utils } from "../utils";
|
|
3
|
+
import type { AxiosResponse } from "axios";
|
|
3
4
|
import { Client } from "../client";
|
|
4
5
|
import { Collection } from "../collection";
|
|
6
|
+
import { PostPrescriptionRequest } from '../model/PostPrescriptionRequest';
|
|
7
|
+
import { PostSupportReglementaireRequest } from '../model/PostSupportReglementaireRequest';
|
|
5
8
|
import { Prescription } from '../model/Prescription';
|
|
9
|
+
import { PrescriptionSupportReglementaire } from '../model/PrescriptionSupportReglementaire';
|
|
6
10
|
|
|
7
11
|
export class PrescriptionsAPI extends Core {
|
|
8
12
|
constructor(config: MetariscConfig, client?: Client) {
|
|
9
13
|
super(config, client);
|
|
10
14
|
}
|
|
11
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Suppression d'une prescription type de la bibliothèque.
|
|
18
|
+
* @param prescriptionId Identifiant unique de la prescription
|
|
19
|
+
*/
|
|
20
|
+
async deletePrescription(prescriptionId: string): Promise<AxiosResponse<void>>
|
|
21
|
+
{
|
|
22
|
+
const pathVariable = { 'prescription_id': prescriptionId };
|
|
23
|
+
return this.request({
|
|
24
|
+
method: 'DELETE',
|
|
25
|
+
endpoint: Utils.constructPath(pathVariable, '/prescriptions/{prescription_id}'),
|
|
26
|
+
headers: { },
|
|
27
|
+
params: { },
|
|
28
|
+
body: {}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Suppression d'un support réglementaire.
|
|
34
|
+
* @param supportReglementaireId Identifiant unique du support réglementaire
|
|
35
|
+
*/
|
|
36
|
+
async deleteSupportReglementaire(supportReglementaireId: string): Promise<AxiosResponse<void>>
|
|
37
|
+
{
|
|
38
|
+
const pathVariable = { 'support_reglementaire_id': supportReglementaireId };
|
|
39
|
+
return this.request({
|
|
40
|
+
method: 'DELETE',
|
|
41
|
+
endpoint: Utils.constructPath(pathVariable, '/supports_reglementaires/{support_reglementaire_id}'),
|
|
42
|
+
headers: { },
|
|
43
|
+
params: { },
|
|
44
|
+
body: {}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Récupération des détails d'une prescription dans la bibliothèque.
|
|
50
|
+
* @param prescriptionId Identifiant unique de la prescription
|
|
51
|
+
*/
|
|
52
|
+
async getPrescription(prescriptionId: string): Promise<AxiosResponse<Prescription>>
|
|
53
|
+
{
|
|
54
|
+
const pathVariable = { 'prescription_id': prescriptionId };
|
|
55
|
+
return this.request({
|
|
56
|
+
method: 'GET',
|
|
57
|
+
endpoint: Utils.constructPath(pathVariable, '/prescriptions/{prescription_id}'),
|
|
58
|
+
headers: { },
|
|
59
|
+
params: { },
|
|
60
|
+
body: {}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Récupération des détails d'un support réglementaire.
|
|
66
|
+
* @param supportReglementaireId Identifiant unique du support réglementaire
|
|
67
|
+
*/
|
|
68
|
+
async getSupportReglementaire(supportReglementaireId: string): Promise<AxiosResponse<PrescriptionSupportReglementaire>>
|
|
69
|
+
{
|
|
70
|
+
const pathVariable = { 'support_reglementaire_id': supportReglementaireId };
|
|
71
|
+
return this.request({
|
|
72
|
+
method: 'GET',
|
|
73
|
+
endpoint: Utils.constructPath(pathVariable, '/supports_reglementaires/{support_reglementaire_id}'),
|
|
74
|
+
headers: { },
|
|
75
|
+
params: { },
|
|
76
|
+
body: {}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
12
80
|
/**
|
|
13
81
|
* Liste des prescriptions.
|
|
14
82
|
* @param page Numéro de page
|
|
@@ -26,4 +94,51 @@ export class PrescriptionsAPI extends Core {
|
|
|
26
94
|
});
|
|
27
95
|
}
|
|
28
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Liste des supports réglementaires.
|
|
99
|
+
*/
|
|
100
|
+
paginateSupportsReglementaires(): Collection<PrescriptionSupportReglementaire>
|
|
101
|
+
{
|
|
102
|
+
const pathVariable = { };
|
|
103
|
+
return this.collect<PrescriptionSupportReglementaire>({
|
|
104
|
+
method: 'GET',
|
|
105
|
+
endpoint: Utils.constructPath(pathVariable, '/supports_reglementaires'),
|
|
106
|
+
headers: { },
|
|
107
|
+
params: { },
|
|
108
|
+
body: {}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Ajout d'une nouvelle prescription type dans la bibliothèque.
|
|
114
|
+
* @param postPrescriptionRequest
|
|
115
|
+
*/
|
|
116
|
+
async postPrescription(postPrescriptionRequest?: PostPrescriptionRequest): Promise<AxiosResponse<Prescription>>
|
|
117
|
+
{
|
|
118
|
+
const pathVariable = { };
|
|
119
|
+
return this.request({
|
|
120
|
+
method: 'POST',
|
|
121
|
+
endpoint: Utils.constructPath(pathVariable, '/prescriptions'),
|
|
122
|
+
headers: { },
|
|
123
|
+
params: { },
|
|
124
|
+
body: { 'contenu': postPrescriptionRequest?.contenu, 'type': postPrescriptionRequest?.type, 'supports_reglementaires': postPrescriptionRequest?.supports_reglementaires }
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Ajouter un support réglementaire.
|
|
130
|
+
* @param postSupportReglementaireRequest
|
|
131
|
+
*/
|
|
132
|
+
async postSupportReglementaire(postSupportReglementaireRequest?: PostSupportReglementaireRequest): Promise<AxiosResponse<PrescriptionSupportReglementaire>>
|
|
133
|
+
{
|
|
134
|
+
const pathVariable = { };
|
|
135
|
+
return this.request({
|
|
136
|
+
method: 'POST',
|
|
137
|
+
endpoint: Utils.constructPath(pathVariable, '/supports_reglementaires'),
|
|
138
|
+
headers: { },
|
|
139
|
+
params: { },
|
|
140
|
+
body: { 'nature': postSupportReglementaireRequest?.nature, 'legifrance_cid': postSupportReglementaireRequest?.legifrance_cid, 'contenu': postSupportReglementaireRequest?.contenu, 'titre': postSupportReglementaireRequest?.titre, 'etat': postSupportReglementaireRequest?.etat, 'reference': postSupportReglementaireRequest?.reference }
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
29
144
|
}
|
|
@@ -3,6 +3,7 @@ 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 { PostTourneeDeciRequest } from '../model/PostTourneeDeciRequest';
|
|
6
7
|
import { TourneeDeci } from '../model/TourneeDeci';
|
|
7
8
|
import { TourneeDeciPei } from '../model/TourneeDeciPei';
|
|
8
9
|
|
|
@@ -79,4 +80,20 @@ export class TournesDECIAPI extends Core {
|
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Ajout d'une nouvelle tournée DECI.
|
|
85
|
+
* @param postTourneeDeciRequest
|
|
86
|
+
*/
|
|
87
|
+
async postTourneeDeci(postTourneeDeciRequest?: PostTourneeDeciRequest): Promise<AxiosResponse<TourneeDeci>>
|
|
88
|
+
{
|
|
89
|
+
const pathVariable = { };
|
|
90
|
+
return this.request({
|
|
91
|
+
method: 'POST',
|
|
92
|
+
endpoint: Utils.constructPath(pathVariable, '/tournees_deci'),
|
|
93
|
+
headers: { },
|
|
94
|
+
params: { },
|
|
95
|
+
body: { 'libelle': postTourneeDeciRequest?.libelle, 'description': postTourneeDeciRequest?.description }
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
82
99
|
}
|
package/src/metarisc.ts
CHANGED
|
@@ -47,6 +47,8 @@ export class Metarisc extends Core
|
|
|
47
47
|
|
|
48
48
|
public anomalies?: AnomaliesAPI;
|
|
49
49
|
|
|
50
|
+
public supports_reglementaires?: PrescriptionsAPI;
|
|
51
|
+
|
|
50
52
|
public feed?: FeedAPI;
|
|
51
53
|
|
|
52
54
|
public tournees_deci?: TournesDECIAPI;
|
|
@@ -94,6 +96,9 @@ export class Metarisc extends Core
|
|
|
94
96
|
case 'anomalies':
|
|
95
97
|
return new AnomaliesAPI(config, tmpClient);
|
|
96
98
|
|
|
99
|
+
case 'supports_reglementaires':
|
|
100
|
+
return new PrescriptionsAPI(config, tmpClient);
|
|
101
|
+
|
|
97
102
|
case 'feed':
|
|
98
103
|
return new FeedAPI(config, tmpClient);
|
|
99
104
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PostPrescriptionRequestSupportsReglementairesInner } from '../../src/model/PostPrescriptionRequestSupportsReglementairesInner';
|
|
2
|
+
|
|
3
|
+
export type PostPrescriptionRequest = {
|
|
4
|
+
'contenu'?: string;
|
|
5
|
+
'type'?: string;
|
|
6
|
+
'supports_reglementaires'?: Array<PostPrescriptionRequestSupportsReglementairesInner>;
|
|
7
|
+
};
|