@metarisc/metarisc-js 0.0.1-alpha.50 → 0.0.1-alpha.51

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.
@@ -57,6 +57,12 @@ export declare class TournesDECIAPI extends Core {
57
57
  * @param postTourneeDeciPeiRequest
58
58
  */
59
59
  postTourneeDeciPei(tourneeDeciId: string, postTourneeDeciPeiRequest?: PostTourneeDeciPeiRequest): Promise<AxiosResponse<TourneeDeciPei>>;
60
+ /**
61
+ * Mise à jour de la tournée DECI.
62
+ * @param tourneeDeciId Identifiant de la tournée DECI
63
+ * @param postTourneeDeciRequest
64
+ */
65
+ updateTourneeDeci(tourneeDeciId: string, postTourneeDeciRequest?: PostTourneeDeciRequest): Promise<AxiosResponse<TourneeDeci>>;
60
66
  /**
61
67
  * Mise à jour du PEI contrôlé dans une tournée DECI.
62
68
  * @param tourneeDeciId Identifiant de la tournée DECI
@@ -127,6 +127,21 @@ class TournesDECIAPI extends core_1.Core {
127
127
  body: { 'pei_id': postTourneeDeciPeiRequest?.pei_id, 'ordre': postTourneeDeciPeiRequest?.ordre }
128
128
  });
129
129
  }
130
+ /**
131
+ * Mise à jour de la tournée DECI.
132
+ * @param tourneeDeciId Identifiant de la tournée DECI
133
+ * @param postTourneeDeciRequest
134
+ */
135
+ async updateTourneeDeci(tourneeDeciId, postTourneeDeciRequest) {
136
+ const pathVariable = { 'tournee_deci_id': tourneeDeciId };
137
+ return this.request({
138
+ method: 'POST',
139
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/tournees_deci/{tournee_deci_id}'),
140
+ headers: {},
141
+ params: {},
142
+ body: { 'libelle': postTourneeDeciRequest?.libelle, 'description': postTourneeDeciRequest?.description, 'date_de_debut': postTourneeDeciRequest?.date_de_debut, 'date_de_fin': postTourneeDeciRequest?.date_de_fin }
143
+ });
144
+ }
130
145
  /**
131
146
  * Mise à jour du PEI contrôlé dans une tournée DECI.
132
147
  * @param tourneeDeciId Identifiant de la tournée DECI
package/lib/client.js CHANGED
@@ -35,7 +35,9 @@ class Client {
35
35
  // Axios interceptor : Enable HTTP Caching
36
36
  // When combining axios-cache-interceptors with other interceptors, you may encounter some inconsistences.
37
37
  // See : https://github.com/arthurfiorette/axios-cache-interceptor/issues/449#issuecomment-1370327566
38
- this.axios = (0, axios_cache_interceptor_1.setupCache)(this.axios);
38
+ this.axios = (0, axios_cache_interceptor_1.setupCache)(this.axios, {
39
+ override: true
40
+ });
39
41
  // Axios interceptor : Ajoute l'access token à la requête
40
42
  // L'access token peut venir d'un premier authenticate, ou d'un refresh token obtenu au cours des interceptors
41
43
  this.axios.interceptors.request.use((config) => {
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.50",
5
+ "version": "0.0.1-alpha.51",
6
6
  "scripts": {
7
7
  "lint": "eslint . --ext .ts --fix",
8
8
  "compile": "tsc",
@@ -150,6 +150,23 @@ export class TournesDECIAPI extends Core {
150
150
  });
151
151
  }
152
152
 
153
+ /**
154
+ * Mise à jour de la tournée DECI.
155
+ * @param tourneeDeciId Identifiant de la tournée DECI
156
+ * @param postTourneeDeciRequest
157
+ */
158
+ async updateTourneeDeci(tourneeDeciId: string, postTourneeDeciRequest?: PostTourneeDeciRequest): Promise<AxiosResponse<TourneeDeci>>
159
+ {
160
+ const pathVariable = { 'tournee_deci_id': tourneeDeciId };
161
+ return this.request({
162
+ method: 'POST',
163
+ endpoint: Utils.constructPath(pathVariable, '/tournees_deci/{tournee_deci_id}'),
164
+ headers: { },
165
+ params: { },
166
+ body: { 'libelle': postTourneeDeciRequest?.libelle, 'description': postTourneeDeciRequest?.description, 'date_de_debut': postTourneeDeciRequest?.date_de_debut, 'date_de_fin': postTourneeDeciRequest?.date_de_fin }
167
+ });
168
+ }
169
+
153
170
  /**
154
171
  * Mise à jour du PEI contrôlé dans une tournée DECI.
155
172
  * @param tourneeDeciId Identifiant de la tournée DECI
package/src/client.ts CHANGED
@@ -52,7 +52,9 @@ export class Client {
52
52
  // Axios interceptor : Enable HTTP Caching
53
53
  // When combining axios-cache-interceptors with other interceptors, you may encounter some inconsistences.
54
54
  // See : https://github.com/arthurfiorette/axios-cache-interceptor/issues/449#issuecomment-1370327566
55
- this.axios = setupCache(this.axios);
55
+ this.axios = setupCache(this.axios, {
56
+ override: true
57
+ });
56
58
 
57
59
  // Axios interceptor : Ajoute l'access token à la requête
58
60
  // L'access token peut venir d'un premier authenticate, ou d'un refresh token obtenu au cours des interceptors