@metarisc/metarisc-js 0.0.1-alpha.63 → 0.0.1-alpha.65

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.
Files changed (193) hide show
  1. package/.eslintrc +73 -19
  2. package/lib/api/AnomaliesAPI.d.ts +10 -12
  3. package/lib/api/AnomaliesAPI.js +8 -18
  4. package/lib/api/CommissionsAPI.d.ts +10 -41
  5. package/lib/api/CommissionsAPI.js +4 -83
  6. package/lib/api/ContactsAPI.d.ts +14 -7
  7. package/lib/api/ContactsAPI.js +2 -12
  8. package/lib/api/ControlesPeiAPI.d.ts +27 -0
  9. package/lib/api/ControlesPeiAPI.js +47 -0
  10. package/lib/api/DatesPassageCommissionAPI.d.ts +23 -0
  11. package/lib/api/DatesPassageCommissionAPI.js +47 -0
  12. package/lib/api/DocumentsAPI.d.ts +5 -7
  13. package/lib/api/DocumentsAPI.js +2 -12
  14. package/lib/api/DossiersAPI.d.ts +24 -59
  15. package/lib/api/DossiersAPI.js +6 -115
  16. package/lib/api/ERPAPI.d.ts +42 -26
  17. package/lib/api/ERPAPI.js +8 -40
  18. package/lib/api/EvenementsAPI.d.ts +8 -13
  19. package/lib/api/EvenementsAPI.js +4 -20
  20. package/lib/api/FeedAPI.d.ts +5 -4
  21. package/lib/api/FeedAPI.js +2 -7
  22. package/lib/api/MoiAPI.d.ts +3 -3
  23. package/lib/api/MoiAPI.js +1 -2
  24. package/lib/api/NotificationsAPI.d.ts +9 -6
  25. package/lib/api/NotificationsAPI.js +2 -11
  26. package/lib/api/OrdresDuJourAPI.d.ts +15 -0
  27. package/lib/api/OrdresDuJourAPI.js +23 -0
  28. package/lib/api/OrganisationsAPI.d.ts +29 -17
  29. package/lib/api/OrganisationsAPI.js +26 -22
  30. package/lib/api/PEIAPI.d.ts +45 -27
  31. package/lib/api/PEIAPI.js +8 -41
  32. package/lib/api/PingAPI.d.ts +0 -6
  33. package/lib/api/PingAPI.js +0 -14
  34. package/lib/api/PrescriptionsAPI.d.ts +13 -12
  35. package/lib/api/PrescriptionsAPI.js +4 -22
  36. package/lib/api/TournesDECIAPI.d.ts +28 -40
  37. package/lib/api/TournesDECIAPI.js +6 -85
  38. package/lib/api/UtilisateursAPI.d.ts +0 -9
  39. package/lib/api/UtilisateursAPI.js +0 -14
  40. package/lib/api/WorkflowsAPI.d.ts +76 -0
  41. package/lib/api/WorkflowsAPI.js +71 -0
  42. package/lib/client.d.ts +5 -0
  43. package/lib/client.js +19 -5
  44. package/lib/collection.js +1 -1
  45. package/lib/core.d.ts +1 -0
  46. package/lib/core.js +4 -1
  47. package/lib/index.d.ts +4 -1
  48. package/lib/index.js +9 -3
  49. package/lib/metarisc.d.ts +8 -2
  50. package/lib/metarisc.js +12 -3
  51. package/lib/model/ActiviteErp.d.ts +2 -10
  52. package/lib/model/ActiviteErp.js +2 -10
  53. package/lib/model/AdressePostale.d.ts +2 -4
  54. package/lib/model/AnomalieDECI.d.ts +0 -3
  55. package/lib/model/AnomaliePEI.d.ts +1 -1
  56. package/lib/model/Avis.d.ts +4 -4
  57. package/lib/model/Avis.js +6 -6
  58. package/lib/model/Contact.d.ts +6 -1
  59. package/lib/model/Contact.js +7 -0
  60. package/lib/model/DescriptifTechniqueDECI.d.ts +2 -2
  61. package/lib/model/DescriptifTechniqueDECIBase.d.ts +0 -8
  62. package/lib/model/DescriptifTechniqueERP.d.ts +2 -7
  63. package/lib/model/DescriptifTechniqueERP.js +8 -14
  64. package/lib/model/DescriptifTechniqueERPBase.d.ts +3 -11
  65. package/lib/model/DescriptifTechniqueERPBase.js +8 -14
  66. package/lib/model/DescriptifTechniquePENA.d.ts +2 -1
  67. package/lib/model/DescriptifTechniquePIBI.d.ts +1 -4
  68. package/lib/model/Dossier.d.ts +4 -5
  69. package/lib/model/ERP.d.ts +6 -9
  70. package/lib/model/FeedMessage.d.ts +1 -1
  71. package/lib/model/FeedMessageTexte.d.ts +1 -1
  72. package/lib/model/ModelError.d.ts +0 -15
  73. package/lib/model/Notification.d.ts +8 -6
  74. package/lib/model/Notification.js +5 -0
  75. package/lib/model/OrganisationGeoservice.d.ts +1 -1
  76. package/lib/model/OrganisationMembre.d.ts +2 -3
  77. package/lib/model/PEI.d.ts +4 -9
  78. package/lib/model/PEI.js +0 -6
  79. package/lib/model/PassageCommissionDossier.d.ts +2 -3
  80. package/lib/model/Prescription.d.ts +1 -2
  81. package/lib/model/PrescriptionSupportReglementaire.d.ts +0 -3
  82. package/lib/model/{PEIReferencesExterieuresInner.d.ts → ReferenceExterieure.d.ts} +1 -1
  83. package/{src/model/GetReglesDeciOrgOrganisations200Response.ts → lib/model/ReglesDeci.d.ts} +4 -2
  84. package/lib/model/TourneeDeci.d.ts +3 -4
  85. package/lib/model/TourneeDeciModele.d.ts +3 -3
  86. package/lib/model/TourneeDeciPei.d.ts +2 -3
  87. package/lib/model/TourneeDeciPeiListeAnomaliesInner.d.ts +1 -2
  88. package/lib/model/TourneeDeciSimple.d.ts +2 -3
  89. package/lib/model/Workflow.d.ts +9 -9
  90. package/lib/model/WorkflowAnalyseDeRisque.d.ts +3 -3
  91. package/lib/model/WorkflowArriveeSecretariat.d.ts +2 -2
  92. package/lib/model/WorkflowConsultationSis.d.ts +2 -2
  93. package/lib/model/WorkflowDossiersLies.d.ts +2 -2
  94. package/lib/model/WorkflowPassageCommissionSecurite.d.ts +3 -3
  95. package/lib/model/WorkflowRelectureSecretariat.d.ts +1 -1
  96. package/lib/model/WorkflowRemiseEnServicePEI.d.ts +1 -1
  97. package/lib/model/WorkflowStep.d.ts +1 -1
  98. package/lib/model/WorkflowType.d.ts +1 -1
  99. package/lib/model/WorkflowValidation.d.ts +1 -1
  100. package/lib/model/WorkflowVisite.d.ts +2 -2
  101. package/lib/tus.js +2 -2
  102. package/package.json +1 -1
  103. package/src/api/AnomaliesAPI.ts +13 -23
  104. package/src/api/CommissionsAPI.ts +9 -97
  105. package/src/api/ContactsAPI.ts +6 -16
  106. package/src/api/ControlesPeiAPI.ts +54 -0
  107. package/src/api/DatesPassageCommissionAPI.ts +56 -0
  108. package/src/api/DocumentsAPI.ts +6 -16
  109. package/src/api/DossiersAPI.ts +12 -131
  110. package/src/api/ERPAPI.ts +15 -47
  111. package/src/api/EvenementsAPI.ts +9 -25
  112. package/src/api/FeedAPI.ts +5 -10
  113. package/src/api/MoiAPI.ts +5 -6
  114. package/src/api/NotificationsAPI.ts +7 -16
  115. package/src/api/OrdresDuJourAPI.ts +26 -0
  116. package/src/api/OrganisationsAPI.ts +38 -30
  117. package/src/api/PEIAPI.ts +15 -48
  118. package/src/api/PingAPI.ts +0 -19
  119. package/src/api/PrescriptionsAPI.ts +14 -32
  120. package/src/api/TournesDECIAPI.ts +12 -99
  121. package/src/api/UtilisateursAPI.ts +4 -18
  122. package/src/api/WorkflowsAPI.ts +84 -0
  123. package/src/auth/oauth2.ts +4 -4
  124. package/src/client.ts +24 -6
  125. package/src/collection.ts +3 -3
  126. package/src/core.ts +5 -1
  127. package/src/index.ts +8 -2
  128. package/src/metarisc.ts +28 -7
  129. package/src/model/ActiviteErp.ts +2 -10
  130. package/src/model/AdressePostale.ts +2 -4
  131. package/src/model/AnomalieDECI.ts +0 -3
  132. package/src/model/AnomaliePEI.ts +1 -1
  133. package/src/model/Avis.ts +4 -4
  134. package/src/model/Contact.ts +7 -1
  135. package/src/model/DescriptifTechniqueDECI.ts +2 -2
  136. package/src/model/DescriptifTechniqueDECIBase.ts +0 -9
  137. package/src/model/DescriptifTechniqueERP.ts +2 -8
  138. package/src/model/DescriptifTechniqueERPBase.ts +3 -12
  139. package/src/model/DescriptifTechniquePENA.ts +5 -1
  140. package/src/model/DescriptifTechniquePIBI.ts +7 -4
  141. package/src/model/Dossier.ts +4 -5
  142. package/src/model/ERP.ts +6 -9
  143. package/src/model/FeedMessage.ts +1 -1
  144. package/src/model/FeedMessageTexte.ts +2 -1
  145. package/src/model/ModelError.ts +0 -15
  146. package/src/model/Notification.ts +7 -6
  147. package/src/model/OrganisationGeoservice.ts +1 -1
  148. package/src/model/OrganisationMembre.ts +2 -3
  149. package/src/model/PEI.ts +4 -10
  150. package/src/model/PassageCommissionDossier.ts +2 -3
  151. package/src/model/Prescription.ts +1 -2
  152. package/src/model/PrescriptionSupportReglementaire.ts +0 -3
  153. package/src/model/{PEIReferencesExterieuresInner.ts → ReferenceExterieure.ts} +1 -1
  154. package/{lib/model/GetReglesDeciOrgOrganisations200Response.d.ts → src/model/ReglesDeci.ts} +2 -2
  155. package/src/model/TourneeDeci.ts +3 -4
  156. package/src/model/TourneeDeciModele.ts +5 -3
  157. package/src/model/TourneeDeciPei.ts +2 -3
  158. package/src/model/TourneeDeciPeiListeAnomaliesInner.ts +1 -2
  159. package/src/model/TourneeDeciSimple.ts +7 -3
  160. package/src/model/Workflow.ts +9 -9
  161. package/src/model/WorkflowAnalyseDeRisque.ts +11 -3
  162. package/src/model/WorkflowArriveeSecretariat.ts +4 -2
  163. package/src/model/WorkflowConsultationSis.ts +3 -2
  164. package/src/model/WorkflowDossiersLies.ts +3 -2
  165. package/src/model/WorkflowPassageCommissionSecurite.ts +5 -3
  166. package/src/model/WorkflowRelectureSecretariat.ts +2 -1
  167. package/src/model/WorkflowRemiseEnServicePEI.ts +3 -1
  168. package/src/model/WorkflowStep.ts +1 -1
  169. package/src/model/WorkflowType.ts +1 -1
  170. package/src/model/WorkflowValidation.ts +2 -1
  171. package/src/model/WorkflowVisite.ts +3 -2
  172. package/src/tus.ts +2 -2
  173. package/src/utils.ts +1 -1
  174. package/lib/api/SupportAPI.d.ts +0 -25
  175. package/lib/api/SupportAPI.js +0 -54
  176. package/lib/model/ERPReferencesExterieuresInner.d.ts +0 -4
  177. package/lib/model/Moi200Response.d.ts +0 -12
  178. package/lib/model/Moi200Response.js +0 -2
  179. package/lib/model/PEIReferencesExterieuresInner.js +0 -2
  180. package/lib/model/Ping200Response.d.ts +0 -3
  181. package/lib/model/Ping200Response.js +0 -2
  182. package/lib/model/PostTicketRequest.d.ts +0 -10
  183. package/lib/model/PostTicketRequest.js +0 -2
  184. package/lib/model/Ticket.d.ts +0 -17
  185. package/lib/model/Ticket.js +0 -12
  186. package/src/api/SupportAPI.ts +0 -63
  187. package/src/model/ERPReferencesExterieuresInner.ts +0 -4
  188. package/src/model/Moi200Response.ts +0 -12
  189. package/src/model/Ping200Response.ts +0 -3
  190. package/src/model/PostTicketRequest.ts +0 -10
  191. package/src/model/Ticket.ts +0 -18
  192. /package/lib/model/{ERPReferencesExterieuresInner.js → ReferenceExterieure.js} +0 -0
  193. /package/lib/model/{GetReglesDeciOrgOrganisations200Response.js → ReglesDeci.js} +0 -0
package/.eslintrc CHANGED
@@ -1,20 +1,74 @@
1
1
  {
2
- "root": true,
3
- "parser": "@typescript-eslint/parser",
4
- "plugins": [
5
- "@typescript-eslint",
6
- "unused-imports",
7
- "import"
8
- ],
9
- "extends": [
10
- "eslint:recommended",
11
- "plugin:@typescript-eslint/eslint-recommended",
12
- "plugin:@typescript-eslint/recommended"
13
- ],
14
- "rules": {
15
- "@typescript-eslint/no-explicit-any": ["off"],
16
- "no-multiple-empty-lines": [1, { "max": 1, "maxEOF": 0, "maxBOF": 0 }],
17
- "unused-imports/no-unused-imports": "error",
18
- "import/no-duplicates": ["error", {"considerQueryString": true, "prefer-inline": true}]
19
- }
20
- }
2
+ "root": true,
3
+ "parser": "@typescript-eslint/parser",
4
+ "plugins": [
5
+ "@typescript-eslint",
6
+ "unused-imports",
7
+ "import"
8
+ ],
9
+ "extends": [
10
+ "eslint:recommended",
11
+ "plugin:@typescript-eslint/eslint-recommended",
12
+ "plugin:@typescript-eslint/recommended"
13
+ ],
14
+ "rules": {
15
+ "@typescript-eslint/no-explicit-any": [
16
+ "off"
17
+ ],
18
+ "@typescript-eslint/ban-types": [
19
+ "error", {
20
+ "extendDefaults": true,
21
+ "types": {
22
+ "{}": false
23
+ }
24
+ }
25
+ ],
26
+ "no-multiple-empty-lines": [
27
+ "warn", {
28
+ "max": 1,
29
+ "maxEOF": 0,
30
+ "maxBOF": 0
31
+ }
32
+ ],
33
+ "unused-imports/no-unused-imports": [
34
+ "error"
35
+ ],
36
+ "import/no-duplicates": [
37
+ "error", {
38
+ "considerQueryString": true,
39
+ "prefer-inline": true
40
+ }
41
+ ],
42
+ "comma-dangle": [
43
+ "error", {
44
+ "arrays": "never",
45
+ "objects": "never",
46
+ "imports": "never",
47
+ "exports": "never",
48
+ "functions": "never"
49
+ }
50
+ ],
51
+ "space-in-parens": [
52
+ "error", "never"
53
+ ],
54
+ "no-multi-spaces": [
55
+ "error"
56
+ ],
57
+ "space-before-function-paren": [
58
+ "error", {
59
+ "anonymous": "never",
60
+ "named": "never",
61
+ "asyncArrow": "always"
62
+ }
63
+ ],
64
+ "space-before-blocks": [
65
+ "error", "always"
66
+ ],
67
+ "object-curly-spacing": [
68
+ "error", "always"
69
+ ],
70
+ "array-bracket-spacing": [
71
+ "error", "never"
72
+ ]
73
+ }
74
+ }
@@ -6,25 +6,23 @@ import { AnomalieDECI } from '../model/AnomalieDECI';
6
6
  export declare class AnomaliesAPI extends Core {
7
7
  constructor(config: MetariscConfig, client?: Client);
8
8
  /**
9
- * Suppression d'une anomalie DECI type.
10
- * @param anomalieId
9
+ * Suppression d'une anomalie DECI type dans la bibliothèque DECI.
11
10
  */
12
11
  deleteAnomalie(anomalieId: string): Promise<AxiosResponse<void>>;
13
12
  /**
14
- * Détails d'une anomalie type DECI.
15
- * @param anomalieId
13
+ * Détails d'une anomalie type DECI présente dans la bibliothèque DECI.
16
14
  */
17
15
  getAnomalie(anomalieId: string): Promise<AxiosResponse<AnomalieDECI>>;
18
16
  /**
19
- * Liste des anomalies.
20
- * @param page Numéro de page
21
- * @param perPage Limite le nombre d'objets retournés. La limite est comprise entre 1 et 100, la valeur par défaut étant de 10.
22
- * @param texte Filtre sur le texte de l'anomalie
17
+ * Retourne une liste des anomalies types dans la bibliothèque DECI.
23
18
  */
24
- paginateAnomalies(page?: number, perPage?: number, texte?: string): Collection<AnomalieDECI>;
19
+ paginateAnomalies(page?: number, perPage?: number, sort?: string, texte?: string, code?: string): Collection<AnomalieDECI>;
25
20
  /**
26
- * Ajout d'une nouvelle anomalie DECI type pour une organisation.
27
- * @param anomalieDECI
21
+ * Ajout d'une nouvelle anomalie DECI type dans la bibliothèque DECI.
28
22
  */
29
- postAnomalie(anomalieDECI?: AnomalieDECI): Promise<AxiosResponse<AnomalieDECI>>;
23
+ postAnomalie(params: {
24
+ code: number;
25
+ texte: string;
26
+ indiceDeGravite: number;
27
+ }): Promise<AxiosResponse<AnomalieDECI>>;
30
28
  }
@@ -8,61 +8,51 @@ class AnomaliesAPI extends core_1.Core {
8
8
  super(config, client);
9
9
  }
10
10
  /**
11
- * Suppression d'une anomalie DECI type.
12
- * @param anomalieId
11
+ * Suppression d'une anomalie DECI type dans la bibliothèque DECI.
13
12
  */
14
13
  async deleteAnomalie(anomalieId) {
15
14
  const pathVariable = { 'anomalie_id': (new String(anomalieId)).toString() };
16
15
  return this.request({
17
16
  method: 'DELETE',
18
17
  endpoint: utils_1.Utils.constructPath(pathVariable, '/anomalies/{anomalie_id}'),
19
- headers: {},
20
18
  params: {},
21
19
  body: utils_1.Utils.payloadFilter({})
22
20
  });
23
21
  }
24
22
  /**
25
- * Détails d'une anomalie type DECI.
26
- * @param anomalieId
23
+ * Détails d'une anomalie type DECI présente dans la bibliothèque DECI.
27
24
  */
28
25
  async getAnomalie(anomalieId) {
29
26
  const pathVariable = { 'anomalie_id': (new String(anomalieId)).toString() };
30
27
  return this.request({
31
28
  method: 'GET',
32
29
  endpoint: utils_1.Utils.constructPath(pathVariable, '/anomalies/{anomalie_id}'),
33
- headers: {},
34
30
  params: {},
35
31
  body: utils_1.Utils.payloadFilter({})
36
32
  });
37
33
  }
38
34
  /**
39
- * Liste des anomalies.
40
- * @param page Numéro de page
41
- * @param perPage Limite le nombre d'objets retournés. La limite est comprise entre 1 et 100, la valeur par défaut étant de 10.
42
- * @param texte Filtre sur le texte de l'anomalie
35
+ * Retourne une liste des anomalies types dans la bibliothèque DECI.
43
36
  */
44
- paginateAnomalies(page, perPage, texte) {
37
+ paginateAnomalies(page, perPage, sort, texte, code) {
45
38
  const pathVariable = {};
46
39
  return this.collect({
47
40
  method: 'GET',
48
41
  endpoint: utils_1.Utils.constructPath(pathVariable, '/anomalies'),
49
- headers: {},
50
- params: { 'page': page?.toString(), 'per_page': perPage?.toString(), 'texte': texte },
42
+ params: { 'page': page?.toString(), 'per_page': perPage?.toString(), 'sort': sort, 'texte': texte, 'code': code },
51
43
  body: utils_1.Utils.payloadFilter({})
52
44
  });
53
45
  }
54
46
  /**
55
- * Ajout d'une nouvelle anomalie DECI type pour une organisation.
56
- * @param anomalieDECI
47
+ * Ajout d'une nouvelle anomalie DECI type dans la bibliothèque DECI.
57
48
  */
58
- async postAnomalie(anomalieDECI) {
49
+ async postAnomalie(params) {
59
50
  const pathVariable = {};
60
51
  return this.request({
61
52
  method: 'POST',
62
53
  endpoint: utils_1.Utils.constructPath(pathVariable, '/anomalies'),
63
- headers: {},
64
54
  params: {},
65
- body: utils_1.Utils.payloadFilter({ 'code': anomalieDECI?.code, 'texte': anomalieDECI?.texte, 'indice_de_gravite': anomalieDECI?.indice_de_gravite })
55
+ body: utils_1.Utils.payloadFilter(params)
66
56
  });
67
57
  }
68
58
  }
@@ -4,65 +4,34 @@ import { Client } from "../client";
4
4
  import { Collection } from "../collection";
5
5
  import { Commission } from '../model/Commission';
6
6
  import { PassageCommission } from '../model/PassageCommission';
7
- import { PassageCommissionDossier } from '../model/PassageCommissionDossier';
8
7
  export declare class CommissionsAPI extends Core {
9
8
  constructor(config: MetariscConfig, client?: Client);
10
9
  /**
11
10
  * Récupération des détails de la commission.
12
- * @param commissionId
13
11
  */
14
12
  getCommission(commissionId: string): Promise<AxiosResponse<Commission>>;
15
- /**
16
- * Récupération d'une date de passage en commission.
17
- * @param commissionId
18
- * @param dateId
19
- */
20
- getCommissionDate(commissionId: string, dateId: string): Promise<AxiosResponse<PassageCommission>>;
21
13
  /**
22
14
  * Liste des commissions.
23
- * @param page Numéro de page
24
- * @param perPage Limite le nombre d'objets retournés. La limite est comprise entre 1 et 100, la valeur par défaut étant de 10.
25
15
  */
26
16
  paginateCommissions(page?: number, perPage?: number): Collection<Commission>;
27
17
  /**
28
18
  * Récupération de la liste des dates de passage de la commission.
29
- * @param commissionId
30
- * @param page Numéro de page
31
- * @param perPage Limite le nombre d'objets retournés. La limite est comprise entre 1 et 100, la valeur par défaut étant de 10.
32
19
  */
33
20
  paginateCommissionDates(commissionId: string, page?: number, perPage?: number): Collection<PassageCommission>;
34
- /**
35
- * Récupération d'une liste de dossiers à l'ordre du jour liés à une date de passage en commission.
36
- * @param commissionId
37
- * @param dateId
38
- * @param page Numéro de page
39
- * @param perPage Limite le nombre d'objets retournés. La limite est comprise entre 1 et 100, la valeur par défaut étant de 10.
40
- */
41
- paginateCommissionDateDossiers(commissionId: string, dateId: string, page?: number, perPage?: number): Collection<PassageCommissionDossier>;
42
21
  /**
43
22
  * Ajoute une commission.
44
- * @param commission
45
23
  */
46
- postCommission(commission?: Commission): Promise<AxiosResponse<Commission>>;
24
+ postCommission(params: {
25
+ type: string;
26
+ libelle: string;
27
+ }): Promise<AxiosResponse<Commission>>;
47
28
  /**
48
29
  * Ajout d'une date de passage en commission.
49
- * @param commissionId
50
- * @param passageCommission
51
- */
52
- postCommissionDate(commissionId: string, passageCommission?: PassageCommission): Promise<AxiosResponse<PassageCommission>>;
53
- /**
54
- * Mise à jour des détails d'un dossier lié à une date de passage en commission
55
- * @param commissionId
56
- * @param dateId
57
- * @param dossierId
58
- * @param passageCommissionDossier
59
- */
60
- updateCommissionDateDossier(commissionId: string, dateId: string, dossierId: string, passageCommissionDossier?: PassageCommissionDossier): Promise<AxiosResponse<PassageCommissionDossier>>;
61
- /**
62
- * Ajout d'un dossier à l'ordre du jour d'un passage en commission.
63
- * @param commissionId
64
- * @param dateId
65
- * @param passageCommissionDossier
66
30
  */
67
- postCommissionDateDossier(commissionId: string, dateId: string, passageCommissionDossier?: PassageCommissionDossier): Promise<AxiosResponse<PassageCommissionDossier>>;
31
+ postCommissionDate(commissionId: string, params: {
32
+ dateDebut: Date;
33
+ dateFin: Date;
34
+ type: string;
35
+ libelle: string;
36
+ }): Promise<AxiosResponse<PassageCommission>>;
68
37
  }
@@ -9,141 +9,62 @@ class CommissionsAPI extends core_1.Core {
9
9
  }
10
10
  /**
11
11
  * Récupération des détails de la commission.
12
- * @param commissionId
13
12
  */
14
13
  async getCommission(commissionId) {
15
14
  const pathVariable = { 'commission_id': (new String(commissionId)).toString() };
16
15
  return this.request({
17
16
  method: 'GET',
18
17
  endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}'),
19
- headers: {},
20
- params: {},
21
- body: utils_1.Utils.payloadFilter({})
22
- });
23
- }
24
- /**
25
- * Récupération d'une date de passage en commission.
26
- * @param commissionId
27
- * @param dateId
28
- */
29
- async getCommissionDate(commissionId, dateId) {
30
- const pathVariable = { 'commission_id': (new String(commissionId)).toString(), 'date_id': (new String(dateId)).toString() };
31
- return this.request({
32
- method: 'GET',
33
- endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}/dates/{date_id}'),
34
- headers: {},
35
18
  params: {},
36
19
  body: utils_1.Utils.payloadFilter({})
37
20
  });
38
21
  }
39
22
  /**
40
23
  * Liste des commissions.
41
- * @param page Numéro de page
42
- * @param perPage Limite le nombre d'objets retournés. La limite est comprise entre 1 et 100, la valeur par défaut étant de 10.
43
24
  */
44
25
  paginateCommissions(page, perPage) {
45
26
  const pathVariable = {};
46
27
  return this.collect({
47
28
  method: 'GET',
48
29
  endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions'),
49
- headers: {},
50
30
  params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
51
31
  body: utils_1.Utils.payloadFilter({})
52
32
  });
53
33
  }
54
34
  /**
55
35
  * Récupération de la liste des dates de passage de la commission.
56
- * @param commissionId
57
- * @param page Numéro de page
58
- * @param perPage Limite le nombre d'objets retournés. La limite est comprise entre 1 et 100, la valeur par défaut étant de 10.
59
36
  */
60
37
  paginateCommissionDates(commissionId, page, perPage) {
61
38
  const pathVariable = { 'commission_id': (new String(commissionId)).toString() };
62
39
  return this.collect({
63
40
  method: 'GET',
64
41
  endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}/dates'),
65
- headers: {},
66
- params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
67
- body: utils_1.Utils.payloadFilter({})
68
- });
69
- }
70
- /**
71
- * Récupération d'une liste de dossiers à l'ordre du jour liés à une date de passage en commission.
72
- * @param commissionId
73
- * @param dateId
74
- * @param page Numéro de page
75
- * @param perPage Limite le nombre d'objets retournés. La limite est comprise entre 1 et 100, la valeur par défaut étant de 10.
76
- */
77
- paginateCommissionDateDossiers(commissionId, dateId, page, perPage) {
78
- const pathVariable = { 'commission_id': (new String(commissionId)).toString(), 'date_id': (new String(dateId)).toString() };
79
- return this.collect({
80
- method: 'GET',
81
- endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}/dates/{date_id}/ordre_du_jour'),
82
- headers: {},
83
42
  params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
84
43
  body: utils_1.Utils.payloadFilter({})
85
44
  });
86
45
  }
87
46
  /**
88
47
  * Ajoute une commission.
89
- * @param commission
90
48
  */
91
- async postCommission(commission) {
49
+ async postCommission(params) {
92
50
  const pathVariable = {};
93
51
  return this.request({
94
52
  method: 'POST',
95
53
  endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions'),
96
- headers: {},
97
54
  params: {},
98
- body: utils_1.Utils.payloadFilter({ 'id': commission?.id, 'type': commission?.type, 'libelle': commission?.libelle })
55
+ body: utils_1.Utils.payloadFilter(params)
99
56
  });
100
57
  }
101
58
  /**
102
59
  * Ajout d'une date de passage en commission.
103
- * @param commissionId
104
- * @param passageCommission
105
60
  */
106
- async postCommissionDate(commissionId, passageCommission) {
61
+ async postCommissionDate(commissionId, params) {
107
62
  const pathVariable = { 'commission_id': (new String(commissionId)).toString() };
108
63
  return this.request({
109
64
  method: 'POST',
110
65
  endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}/dates'),
111
- headers: {},
112
- params: {},
113
- body: utils_1.Utils.payloadFilter({ 'id': passageCommission?.id, 'date_debut': passageCommission?.date_debut ? utils_1.Utils.formatDate(passageCommission?.date_debut) : undefined, 'date_fin': passageCommission?.date_fin ? utils_1.Utils.formatDate(passageCommission?.date_fin) : undefined, 'type': passageCommission?.type, 'libelle': passageCommission?.libelle })
114
- });
115
- }
116
- /**
117
- * Mise à jour des détails d'un dossier lié à une date de passage en commission
118
- * @param commissionId
119
- * @param dateId
120
- * @param dossierId
121
- * @param passageCommissionDossier
122
- */
123
- async updateCommissionDateDossier(commissionId, dateId, dossierId, passageCommissionDossier) {
124
- const pathVariable = { 'commission_id': (new String(commissionId)).toString(), 'date_id': (new String(dateId)).toString(), 'dossier_id': (new String(dossierId)).toString() };
125
- return this.request({
126
- method: 'POST',
127
- endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}/dates/{date_id}/ordre_du_jour/{dossier_id}'),
128
- headers: {},
129
- params: {},
130
- body: utils_1.Utils.payloadFilter({ 'id': passageCommissionDossier?.id, 'dossier': passageCommissionDossier?.dossier, 'dossier_id': passageCommissionDossier?.dossier_id, 'avis': passageCommissionDossier?.avis, 'statut': passageCommissionDossier?.statut })
131
- });
132
- }
133
- /**
134
- * Ajout d'un dossier à l'ordre du jour d'un passage en commission.
135
- * @param commissionId
136
- * @param dateId
137
- * @param passageCommissionDossier
138
- */
139
- async postCommissionDateDossier(commissionId, dateId, passageCommissionDossier) {
140
- const pathVariable = { 'commission_id': (new String(commissionId)).toString(), 'date_id': (new String(dateId)).toString() };
141
- return this.request({
142
- method: 'POST',
143
- endpoint: utils_1.Utils.constructPath(pathVariable, '/commissions/{commission_id}/dates/{date_id}/ordre_du_jour'),
144
- headers: {},
145
66
  params: {},
146
- body: utils_1.Utils.payloadFilter({ 'id': passageCommissionDossier?.id, 'dossier': passageCommissionDossier?.dossier, 'dossier_id': passageCommissionDossier?.dossier_id, 'avis': passageCommissionDossier?.avis, 'statut': passageCommissionDossier?.statut })
67
+ body: utils_1.Utils.payloadFilter(params)
147
68
  });
148
69
  }
149
70
  }
@@ -7,24 +7,31 @@ export declare class ContactsAPI extends Core {
7
7
  constructor(config: MetariscConfig, client?: Client);
8
8
  /**
9
9
  * Suppression d'une fiche contact existante.
10
- * @param contactId
11
10
  */
12
11
  deleteContact(contactId: string): Promise<AxiosResponse<void>>;
13
12
  /**
14
13
  * Récupération d'une fiche contact.
15
- * @param contactId
16
14
  */
17
15
  getContact(contactId: string): Promise<AxiosResponse<Contact>>;
18
16
  /**
19
17
  * Récupération de la liste des contacts.
20
- * @param page Numéro de page
21
- * @param perPage Limite le nombre d'objets retournés. La limite est comprise entre 1 et 100, la valeur par défaut étant de 10.
22
18
  */
23
19
  paginateContacts(page?: number, perPage?: number): Collection<Contact>;
24
20
  /**
25
21
  * Mise à jour d'une fiche contact existante.
26
- * @param contactId
27
- * @param contact
28
22
  */
29
- updateContact(contactId: string, contact?: Contact): Promise<AxiosResponse<Contact>>;
23
+ updateContact(contactId: string, params: {
24
+ nom?: string;
25
+ prenom?: string;
26
+ fonction?: string;
27
+ telephoneFixe?: string;
28
+ telephonePortable?: string;
29
+ telephoneFax?: string;
30
+ adresse?: string;
31
+ siteWebUrl?: string;
32
+ civilite?: string;
33
+ societe?: string;
34
+ email?: string;
35
+ observations?: string;
36
+ }): Promise<AxiosResponse<Contact>>;
30
37
  }
@@ -9,60 +9,50 @@ class ContactsAPI extends core_1.Core {
9
9
  }
10
10
  /**
11
11
  * Suppression d'une fiche contact existante.
12
- * @param contactId
13
12
  */
14
13
  async deleteContact(contactId) {
15
14
  const pathVariable = { 'contact_id': (new String(contactId)).toString() };
16
15
  return this.request({
17
16
  method: 'DELETE',
18
17
  endpoint: utils_1.Utils.constructPath(pathVariable, '/contacts/{contact_id}'),
19
- headers: {},
20
18
  params: {},
21
19
  body: utils_1.Utils.payloadFilter({})
22
20
  });
23
21
  }
24
22
  /**
25
23
  * Récupération d'une fiche contact.
26
- * @param contactId
27
24
  */
28
25
  async getContact(contactId) {
29
26
  const pathVariable = { 'contact_id': (new String(contactId)).toString() };
30
27
  return this.request({
31
28
  method: 'GET',
32
29
  endpoint: utils_1.Utils.constructPath(pathVariable, '/contacts/{contact_id}'),
33
- headers: {},
34
30
  params: {},
35
31
  body: utils_1.Utils.payloadFilter({})
36
32
  });
37
33
  }
38
34
  /**
39
35
  * Récupération de la liste des contacts.
40
- * @param page Numéro de page
41
- * @param perPage Limite le nombre d'objets retournés. La limite est comprise entre 1 et 100, la valeur par défaut étant de 10.
42
36
  */
43
37
  paginateContacts(page, perPage) {
44
38
  const pathVariable = {};
45
39
  return this.collect({
46
40
  method: 'GET',
47
41
  endpoint: utils_1.Utils.constructPath(pathVariable, '/contacts'),
48
- headers: {},
49
42
  params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
50
43
  body: utils_1.Utils.payloadFilter({})
51
44
  });
52
45
  }
53
46
  /**
54
47
  * Mise à jour d'une fiche contact existante.
55
- * @param contactId
56
- * @param contact
57
48
  */
58
- async updateContact(contactId, contact) {
49
+ async updateContact(contactId, params) {
59
50
  const pathVariable = { 'contact_id': (new String(contactId)).toString() };
60
51
  return this.request({
61
52
  method: 'POST',
62
53
  endpoint: utils_1.Utils.constructPath(pathVariable, '/contacts/{contact_id}'),
63
- headers: {},
64
54
  params: {},
65
- body: utils_1.Utils.payloadFilter({ 'id': contact?.id, 'nom': contact?.nom, 'prenom': contact?.prenom, 'fonction': contact?.fonction, 'telephone_fixe': contact?.telephone_fixe, 'telephone_portable': contact?.telephone_portable, 'telephone_fax': contact?.telephone_fax, 'adresse': contact?.adresse, 'site_web_url': contact?.site_web_url, 'civilite': contact?.civilite, 'societe': contact?.societe, 'email': contact?.email, 'observations': contact?.observations })
55
+ body: utils_1.Utils.payloadFilter(params)
66
56
  });
67
57
  }
68
58
  }
@@ -0,0 +1,27 @@
1
+ import { Core, MetariscConfig } from "../core";
2
+ import type { AxiosResponse } from "axios";
3
+ import { Client } from "../client";
4
+ import { TourneeDeciPei } from '../model/TourneeDeciPei';
5
+ export declare class ControlesPeiAPI extends Core {
6
+ constructor(config: MetariscConfig, client?: Client);
7
+ /**
8
+ * Suppression du contrôle PEI de la tournée DECI.
9
+ */
10
+ deleteControle(peiId: string): Promise<AxiosResponse<void>>;
11
+ /**
12
+ * Récupération des détails liés au contrôle d'un PEI d'une tournée.
13
+ */
14
+ getControle(peiId: string): Promise<AxiosResponse<TourneeDeciPei>>;
15
+ /**
16
+ * Mise à jour du PEI contrôlé.
17
+ */
18
+ updateControle(peiId: string, params: {
19
+ dateDuControle?: Date;
20
+ listeAnomalies?: {
21
+ code?: number;
22
+ a_lever?: boolean;
23
+ };
24
+ essaisEnginUtilise?: string;
25
+ ordre?: number;
26
+ }): Promise<AxiosResponse<TourneeDeciPei>>;
27
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ControlesPeiAPI = void 0;
4
+ const core_1 = require("../core");
5
+ const utils_1 = require("../utils");
6
+ class ControlesPeiAPI extends core_1.Core {
7
+ constructor(config, client) {
8
+ super(config, client);
9
+ }
10
+ /**
11
+ * Suppression du contrôle PEI de la tournée DECI.
12
+ */
13
+ async deleteControle(peiId) {
14
+ const pathVariable = { 'pei_id': (new String(peiId)).toString() };
15
+ return this.request({
16
+ method: 'DELETE',
17
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/controles_pei/{pei_id}'),
18
+ params: {},
19
+ body: utils_1.Utils.payloadFilter({})
20
+ });
21
+ }
22
+ /**
23
+ * Récupération des détails liés au contrôle d'un PEI d'une tournée.
24
+ */
25
+ async getControle(peiId) {
26
+ const pathVariable = { 'pei_id': (new String(peiId)).toString() };
27
+ return this.request({
28
+ method: 'GET',
29
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/controles_pei/{pei_id}'),
30
+ params: {},
31
+ body: utils_1.Utils.payloadFilter({})
32
+ });
33
+ }
34
+ /**
35
+ * Mise à jour du PEI contrôlé.
36
+ */
37
+ async updateControle(peiId, params) {
38
+ const pathVariable = { 'pei_id': (new String(peiId)).toString() };
39
+ return this.request({
40
+ method: 'POST',
41
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/controles_pei/{pei_id}'),
42
+ params: {},
43
+ body: utils_1.Utils.payloadFilter(params)
44
+ });
45
+ }
46
+ }
47
+ exports.ControlesPeiAPI = ControlesPeiAPI;
@@ -0,0 +1,23 @@
1
+ import { Core, MetariscConfig } from "../core";
2
+ import type { AxiosResponse } from "axios";
3
+ import { Client } from "../client";
4
+ import { Collection } from "../collection";
5
+ import { PassageCommission } from '../model/PassageCommission';
6
+ import { PassageCommissionDossier } from '../model/PassageCommissionDossier';
7
+ export declare class DatesPassageCommissionAPI extends Core {
8
+ constructor(config: MetariscConfig, client?: Client);
9
+ /**
10
+ * Récupération d'une date de passage en commission.
11
+ */
12
+ getCommissionDate(dateId: string): Promise<AxiosResponse<PassageCommission>>;
13
+ /**
14
+ * Récupération d'une liste de dossiers à l'ordre du jour liés à une date de passage en commission.
15
+ */
16
+ paginateCommissionDateDossiers(dateId: string, page?: number, perPage?: number): Collection<PassageCommissionDossier>;
17
+ /**
18
+ * Ajout d'un dossier à l'ordre du jour d'un passage en commission.
19
+ */
20
+ postCommissionDateDossier(dateId: string, params: {
21
+ dossierId: string;
22
+ }): Promise<AxiosResponse<PassageCommissionDossier>>;
23
+ }