@metarisc/metarisc-js 0.0.1-alpha.46 → 0.0.1-alpha.48

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.
@@ -18,8 +18,9 @@ export declare class PEIAPI extends Core {
18
18
  * Récupération de la liste des Points d'Eau Incendie (PEI) selon des critères de recherche.
19
19
  * @param page Numéro de page
20
20
  * @param perPage Nombre de résultats demandé
21
+ * @param geojson Filtre sur la position des PEI
21
22
  */
22
- paginatePei(page?: number, perPage?: number): Collection<PEI>;
23
+ paginatePei(page?: number, perPage?: number, geojson?: string): Collection<PEI>;
23
24
  /**
24
25
  * Récupération de la liste des contacts d'un Point d'Eau Incendie.
25
26
  * @param peiId Identifiant unique du PEI
package/lib/api/PEIAPI.js CHANGED
@@ -25,14 +25,15 @@ class PEIAPI extends core_1.Core {
25
25
  * Récupération de la liste des Points d'Eau Incendie (PEI) selon des critères de recherche.
26
26
  * @param page Numéro de page
27
27
  * @param perPage Nombre de résultats demandé
28
+ * @param geojson Filtre sur la position des PEI
28
29
  */
29
- paginatePei(page, perPage) {
30
+ paginatePei(page, perPage, geojson) {
30
31
  const pathVariable = {};
31
32
  return this.collect({
32
33
  method: 'GET',
33
34
  endpoint: utils_1.Utils.constructPath(pathVariable, '/pei'),
34
35
  headers: {},
35
- params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
36
+ params: { 'page': page?.toString(), 'per_page': perPage?.toString(), 'geojson': geojson },
36
37
  body: {}
37
38
  });
38
39
  }
@@ -20,6 +20,11 @@ export declare class TournesDECIAPI extends Core {
20
20
  * @param tourneeDeciId Identifiant de la tournée DECI
21
21
  */
22
22
  getTourneeDeci(tourneeDeciId: string): Promise<AxiosResponse<TourneeDeci>>;
23
+ /**
24
+ * Génération d'un livret de tournée pour une tournée DECI.
25
+ * @param tourneeDeciId Identifiant de la tournée DECI
26
+ */
27
+ getTourneeDeciLivretDeTournee(tourneeDeciId: string): Promise<AxiosResponse<any>>;
23
28
  /**
24
29
  * Récupération des détails liés au contrôle d'un PEI d'une tournée.
25
30
  * @param tourneeDeciId Identifiant de la tournée DECI
@@ -36,6 +36,20 @@ class TournesDECIAPI extends core_1.Core {
36
36
  body: {}
37
37
  });
38
38
  }
39
+ /**
40
+ * Génération d'un livret de tournée pour une tournée DECI.
41
+ * @param tourneeDeciId Identifiant de la tournée DECI
42
+ */
43
+ async getTourneeDeciLivretDeTournee(tourneeDeciId) {
44
+ const pathVariable = { 'tournee_deci_id': tourneeDeciId };
45
+ return this.request({
46
+ method: 'GET',
47
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/tournees_deci/{tournee_deci_id}/livret_de_tournee'),
48
+ headers: {},
49
+ params: {},
50
+ body: {}
51
+ });
52
+ }
39
53
  /**
40
54
  * Récupération des détails liés au contrôle d'un PEI d'une tournée.
41
55
  * @param tourneeDeciId Identifiant de la tournée DECI
@@ -95,7 +109,7 @@ class TournesDECIAPI extends core_1.Core {
95
109
  endpoint: utils_1.Utils.constructPath(pathVariable, '/tournees_deci'),
96
110
  headers: {},
97
111
  params: {},
98
- body: { 'libelle': postTourneeDeciRequest?.libelle, 'description': postTourneeDeciRequest?.description }
112
+ body: { 'libelle': postTourneeDeciRequest?.libelle, 'description': postTourneeDeciRequest?.description, 'date_de_debut': postTourneeDeciRequest?.date_de_debut, 'date_de_fin': postTourneeDeciRequest?.date_de_fin }
99
113
  });
100
114
  }
101
115
  /**
@@ -110,7 +124,7 @@ class TournesDECIAPI extends core_1.Core {
110
124
  endpoint: utils_1.Utils.constructPath(pathVariable, '/tournees_deci/{tournee_deci_id}/pei'),
111
125
  headers: {},
112
126
  params: {},
113
- body: { 'pei_id': postTourneeDeciPeiRequest?.pei_id }
127
+ body: { 'pei_id': postTourneeDeciPeiRequest?.pei_id, 'ordre': postTourneeDeciPeiRequest?.ordre }
114
128
  });
115
129
  }
116
130
  /**
@@ -126,7 +140,7 @@ class TournesDECIAPI extends core_1.Core {
126
140
  endpoint: utils_1.Utils.constructPath(pathVariable, '/tournees_deci/{tournee_deci_id}/pei/{pei_id}'),
127
141
  headers: {},
128
142
  params: {},
129
- body: { 'liste_anomalies': updateTourneeDeciPeiRequest?.liste_anomalies, 'engin_utilisé': updateTourneeDeciPeiRequest?.engin_utilisé }
143
+ body: { 'liste_anomalies': updateTourneeDeciPeiRequest?.liste_anomalies, 'engin_utilisé': updateTourneeDeciPeiRequest?.engin_utilisé, 'ordre': updateTourneeDeciPeiRequest?.ordre, 'date_du_controle': updateTourneeDeciPeiRequest?.date_du_controle }
130
144
  });
131
145
  }
132
146
  }
@@ -1,3 +1,4 @@
1
1
  export type PostTourneeDeciPeiRequest = {
2
2
  'pei_id'?: string;
3
+ 'ordre'?: number;
3
4
  };
@@ -1,4 +1,6 @@
1
1
  export type PostTourneeDeciRequest = {
2
2
  'libelle'?: string;
3
3
  'description'?: string;
4
+ 'date_de_debut'?: Date;
5
+ 'date_de_fin'?: Date;
4
6
  };
@@ -5,4 +5,6 @@ export type TourneeDeci = {
5
5
  'date_creation'?: Date;
6
6
  'pourcentage'?: number;
7
7
  'est_terminee'?: boolean;
8
+ 'date_de_debut'?: Date;
9
+ 'date_de_fin'?: Date;
8
10
  };
@@ -2,4 +2,6 @@ import { AnomaliePEI } from '../../src/model/AnomaliePEI';
2
2
  export type UpdateTourneeDeciPeiRequest = {
3
3
  'liste_anomalies'?: Array<AnomaliePEI>;
4
4
  'engin_utilisé'?: string;
5
+ 'ordre'?: string;
6
+ 'date_du_controle'?: Date;
5
7
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@metarisc/metarisc-js",
3
3
  "main": "lib/index.js",
4
4
  "types": "lib/index.d.ts",
5
- "version": "0.0.1-alpha.46",
5
+ "version": "0.0.1-alpha.48",
6
6
  "scripts": {
7
7
  "lint": "eslint . --ext .ts --fix",
8
8
  "compile": "tsc",
package/src/api/PEIAPI.ts CHANGED
@@ -34,15 +34,16 @@ export class PEIAPI extends Core {
34
34
  * Récupération de la liste des Points d'Eau Incendie (PEI) selon des critères de recherche.
35
35
  * @param page Numéro de page
36
36
  * @param perPage Nombre de résultats demandé
37
+ * @param geojson Filtre sur la position des PEI
37
38
  */
38
- paginatePei(page?: number, perPage?: number): Collection<PEI>
39
+ paginatePei(page?: number, perPage?: number, geojson?: string): Collection<PEI>
39
40
  {
40
41
  const pathVariable = { };
41
42
  return this.collect<PEI>({
42
43
  method: 'GET',
43
44
  endpoint: Utils.constructPath(pathVariable, '/pei'),
44
45
  headers: { },
45
- params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
46
+ params: { 'page': page?.toString(), 'per_page': perPage?.toString(), 'geojson': geojson },
46
47
  body: {}
47
48
  });
48
49
  }
@@ -47,6 +47,22 @@ export class TournesDECIAPI extends Core {
47
47
  });
48
48
  }
49
49
 
50
+ /**
51
+ * Génération d'un livret de tournée pour une tournée DECI.
52
+ * @param tourneeDeciId Identifiant de la tournée DECI
53
+ */
54
+ async getTourneeDeciLivretDeTournee(tourneeDeciId: string): Promise<AxiosResponse<any>>
55
+ {
56
+ const pathVariable = { 'tournee_deci_id': tourneeDeciId };
57
+ return this.request({
58
+ method: 'GET',
59
+ endpoint: Utils.constructPath(pathVariable, '/tournees_deci/{tournee_deci_id}/livret_de_tournee'),
60
+ headers: { },
61
+ params: { },
62
+ body: {}
63
+ });
64
+ }
65
+
50
66
  /**
51
67
  * Récupération des détails liés au contrôle d'un PEI d'une tournée.
52
68
  * @param tourneeDeciId Identifiant de la tournée DECI
@@ -113,7 +129,7 @@ export class TournesDECIAPI extends Core {
113
129
  endpoint: Utils.constructPath(pathVariable, '/tournees_deci'),
114
130
  headers: { },
115
131
  params: { },
116
- body: { 'libelle': postTourneeDeciRequest?.libelle, 'description': postTourneeDeciRequest?.description }
132
+ body: { 'libelle': postTourneeDeciRequest?.libelle, 'description': postTourneeDeciRequest?.description, 'date_de_debut': postTourneeDeciRequest?.date_de_debut, 'date_de_fin': postTourneeDeciRequest?.date_de_fin }
117
133
  });
118
134
  }
119
135
 
@@ -130,7 +146,7 @@ export class TournesDECIAPI extends Core {
130
146
  endpoint: Utils.constructPath(pathVariable, '/tournees_deci/{tournee_deci_id}/pei'),
131
147
  headers: { },
132
148
  params: { },
133
- body: { 'pei_id': postTourneeDeciPeiRequest?.pei_id }
149
+ body: { 'pei_id': postTourneeDeciPeiRequest?.pei_id, 'ordre': postTourneeDeciPeiRequest?.ordre }
134
150
  });
135
151
  }
136
152
 
@@ -148,7 +164,7 @@ export class TournesDECIAPI extends Core {
148
164
  endpoint: Utils.constructPath(pathVariable, '/tournees_deci/{tournee_deci_id}/pei/{pei_id}'),
149
165
  headers: { },
150
166
  params: { },
151
- body: { 'liste_anomalies': updateTourneeDeciPeiRequest?.liste_anomalies, 'engin_utilisé': updateTourneeDeciPeiRequest?.engin_utilisé }
167
+ body: { 'liste_anomalies': updateTourneeDeciPeiRequest?.liste_anomalies, 'engin_utilisé': updateTourneeDeciPeiRequest?.engin_utilisé, 'ordre': updateTourneeDeciPeiRequest?.ordre, 'date_du_controle': updateTourneeDeciPeiRequest?.date_du_controle }
152
168
  });
153
169
  }
154
170
 
@@ -1,3 +1,4 @@
1
1
  export type PostTourneeDeciPeiRequest = {
2
2
  'pei_id'?: string;
3
+ 'ordre'?: number;
3
4
  };
@@ -1,4 +1,6 @@
1
1
  export type PostTourneeDeciRequest = {
2
2
  'libelle'?: string;
3
3
  'description'?: string;
4
+ 'date_de_debut'?: Date;
5
+ 'date_de_fin'?: Date;
4
6
  };
@@ -5,4 +5,6 @@ export type TourneeDeci = {
5
5
  'date_creation'?: Date;
6
6
  'pourcentage'?: number;
7
7
  'est_terminee'?: boolean;
8
+ 'date_de_debut'?: Date;
9
+ 'date_de_fin'?: Date;
8
10
  };
@@ -3,4 +3,6 @@ import { AnomaliePEI } from '../../src/model/AnomaliePEI';
3
3
  export type UpdateTourneeDeciPeiRequest = {
4
4
  'liste_anomalies'?: Array<AnomaliePEI>;
5
5
  'engin_utilisé'?: string;
6
+ 'ordre'?: string;
7
+ 'date_du_controle'?: Date;
6
8
  };