@metarisc/metarisc-js 0.0.1-alpha.5 → 0.0.1-alpha.7

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 (221) hide show
  1. package/.eslintrc +4 -1
  2. package/.github/workflows/main.yml +1 -1
  3. package/README.md +29 -0
  4. package/lib/api/DossiersAPI.d.ts +63 -0
  5. package/lib/api/DossiersAPI.js +149 -0
  6. package/lib/api/NotificationsAPI.d.ts +30 -0
  7. package/lib/api/NotificationsAPI.js +85 -0
  8. package/lib/api/OrganisationAPI.d.ts +11 -0
  9. package/lib/api/OrganisationAPI.js +28 -0
  10. package/lib/api/POIAPI.d.ts +49 -0
  11. package/lib/api/POIAPI.js +106 -0
  12. package/lib/api/PingAPI.d.ts +10 -0
  13. package/lib/api/PingAPI.js +27 -0
  14. package/lib/api/SupportAPI.d.ts +24 -0
  15. package/lib/api/SupportAPI.js +60 -0
  16. package/lib/api/UtilisateursAPI.d.ts +27 -0
  17. package/lib/api/UtilisateursAPI.js +70 -0
  18. package/lib/core.js +5 -2
  19. package/lib/index.d.ts +10 -3
  20. package/lib/index.js +15 -1
  21. package/lib/metarisc.d.ts +14 -0
  22. package/lib/metarisc.js +22 -1
  23. package/lib/model/AdressePostale.d.ts +10 -0
  24. package/lib/model/AdressePostale.js +2 -0
  25. package/lib/model/AnomalieDECI.d.ts +10 -0
  26. package/lib/model/AnomalieDECI.js +9 -0
  27. package/lib/model/Contact.d.ts +9 -0
  28. package/lib/model/Contact.js +2 -0
  29. package/lib/model/DescriptifTechnique.d.ts +40 -0
  30. package/lib/model/DescriptifTechnique.js +45 -0
  31. package/lib/model/DescriptifTechniqueBase.d.ts +5 -0
  32. package/lib/model/DescriptifTechniqueBase.js +2 -0
  33. package/lib/model/DescriptifTechniqueDECIBase.d.ts +16 -0
  34. package/lib/model/DescriptifTechniqueDECIBase.js +9 -0
  35. package/lib/model/DescriptifTechniquePENA.d.ts +43 -0
  36. package/lib/model/DescriptifTechniquePENA.js +40 -0
  37. package/lib/model/DescriptifTechniquePENAAllOfRealimentation.d.ts +10 -0
  38. package/lib/model/DescriptifTechniquePENAAllOfRealimentation.js +9 -0
  39. package/lib/model/DescriptifTechniquePENAAllOfVolumes.d.ts +4 -0
  40. package/lib/model/DescriptifTechniquePENAAllOfVolumes.js +2 -0
  41. package/lib/model/DescriptifTechniquePIBI.d.ts +31 -0
  42. package/lib/model/DescriptifTechniquePIBI.js +25 -0
  43. package/lib/model/DescriptifTechniquePIBIAllOfPesees.d.ts +6 -0
  44. package/lib/model/DescriptifTechniquePIBIAllOfPesees.js +2 -0
  45. package/lib/model/Document.d.ts +3 -0
  46. package/lib/model/Document.js +2 -0
  47. package/lib/model/Dossier.d.ts +13 -0
  48. package/lib/model/Dossier.js +2 -0
  49. package/lib/model/Email.d.ts +6 -0
  50. package/lib/model/Email.js +2 -0
  51. package/lib/model/Feature.d.ts +6 -0
  52. package/lib/model/Feature.js +2 -0
  53. package/lib/model/FeatureGeometry.d.ts +5 -0
  54. package/lib/model/FeatureGeometry.js +2 -0
  55. package/lib/model/GetFeature200Response.d.ts +7 -0
  56. package/lib/model/GetFeature200Response.js +2 -0
  57. package/lib/model/GetFeature200ResponseCrs.d.ts +5 -0
  58. package/lib/model/GetFeature200ResponseCrs.js +2 -0
  59. package/lib/model/GetFeature200ResponseCrsProperties.d.ts +3 -0
  60. package/lib/model/GetFeature200ResponseCrsProperties.js +2 -0
  61. package/lib/model/GetNotification404Response.d.ts +6 -0
  62. package/lib/model/GetNotification404Response.js +2 -0
  63. package/lib/model/Notification.d.ts +12 -0
  64. package/lib/model/Notification.js +2 -0
  65. package/lib/model/Organisation.d.ts +9 -0
  66. package/lib/model/Organisation.js +7 -0
  67. package/lib/model/POI.d.ts +13 -0
  68. package/lib/model/POI.js +2 -0
  69. package/lib/model/POIReferencesExterieuresInner.d.ts +4 -0
  70. package/lib/model/POIReferencesExterieuresInner.js +2 -0
  71. package/lib/model/PaginateContacts200Response.d.ts +6 -0
  72. package/lib/model/PaginateContacts200Response.js +2 -0
  73. package/lib/model/PaginateDossiers200Response.d.ts +6 -0
  74. package/lib/model/PaginateDossiers200Response.js +2 -0
  75. package/lib/model/PaginateDossiers200ResponseMeta.d.ts +4 -0
  76. package/lib/model/PaginateDossiers200ResponseMeta.js +2 -0
  77. package/lib/model/PaginateHistorique200Response.d.ts +6 -0
  78. package/lib/model/PaginateHistorique200Response.js +2 -0
  79. package/lib/model/PaginateMoiEmails200Response.d.ts +6 -0
  80. package/lib/model/PaginateMoiEmails200Response.js +2 -0
  81. package/lib/model/PaginateMoiEmails200ResponseMeta.d.ts +4 -0
  82. package/lib/model/PaginateMoiEmails200ResponseMeta.js +2 -0
  83. package/lib/model/PaginateMoiEmails200ResponseMetaPagination.d.ts +7 -0
  84. package/lib/model/PaginateMoiEmails200ResponseMetaPagination.js +2 -0
  85. package/lib/model/PaginateNotifications200Response.d.ts +6 -0
  86. package/lib/model/PaginateNotifications200Response.js +2 -0
  87. package/lib/model/PaginatePiecesJointes200Response.d.ts +6 -0
  88. package/lib/model/PaginatePiecesJointes200Response.js +2 -0
  89. package/lib/model/PaginatePoi200Response.d.ts +6 -0
  90. package/lib/model/PaginatePoi200Response.js +2 -0
  91. package/lib/model/PaginatePoi200ResponseMeta.d.ts +4 -0
  92. package/lib/model/PaginatePoi200ResponseMeta.js +2 -0
  93. package/lib/model/PaginateSuiviAdministratif200Response.d.ts +6 -0
  94. package/lib/model/PaginateSuiviAdministratif200Response.js +2 -0
  95. package/lib/model/PaginateTags200Response.d.ts +6 -0
  96. package/lib/model/PaginateTags200Response.js +2 -0
  97. package/lib/model/PaginateTickets200Response.d.ts +6 -0
  98. package/lib/model/PaginateTickets200Response.js +2 -0
  99. package/lib/model/PaginateTickets200ResponseMeta.d.ts +4 -0
  100. package/lib/model/PaginateTickets200ResponseMeta.js +2 -0
  101. package/lib/model/PaginateWorkflowDocuments200Response.d.ts +6 -0
  102. package/lib/model/PaginateWorkflowDocuments200Response.js +2 -0
  103. package/lib/model/PaginateWorkflows200Response.d.ts +6 -0
  104. package/lib/model/PaginateWorkflows200Response.js +2 -0
  105. package/lib/model/PaginationMetadata1.d.ts +7 -0
  106. package/lib/model/PaginationMetadata1.js +2 -0
  107. package/lib/model/PaginationMetadata2.d.ts +7 -0
  108. package/lib/model/PaginationMetadata2.js +2 -0
  109. package/lib/model/PatchPoiRequest.d.ts +3 -0
  110. package/lib/model/PatchPoiRequest.js +2 -0
  111. package/lib/model/PieceJointe.d.ts +7 -0
  112. package/lib/model/PieceJointe.js +2 -0
  113. package/lib/model/Ping200Response.d.ts +3 -0
  114. package/lib/model/Ping200Response.js +2 -0
  115. package/lib/model/PostDossierRequest.d.ts +5 -0
  116. package/lib/model/PostDossierRequest.js +2 -0
  117. package/lib/model/PostNotification400Response.d.ts +6 -0
  118. package/lib/model/PostNotification400Response.js +2 -0
  119. package/lib/model/PostNotification500Response.d.ts +6 -0
  120. package/lib/model/PostNotification500Response.js +2 -0
  121. package/lib/model/PostNotificationRequest.d.ts +9 -0
  122. package/lib/model/PostNotificationRequest.js +2 -0
  123. package/lib/model/PostTicketRequest.d.ts +10 -0
  124. package/lib/model/PostTicketRequest.js +2 -0
  125. package/lib/model/SuiviAdministratif.d.ts +6 -0
  126. package/lib/model/SuiviAdministratif.js +2 -0
  127. package/lib/model/Tag.d.ts +3 -0
  128. package/lib/model/Tag.js +2 -0
  129. package/lib/model/Ticket.d.ts +17 -0
  130. package/lib/model/Ticket.js +12 -0
  131. package/lib/model/Type.d.ts +5 -0
  132. package/lib/model/Type.js +2 -0
  133. package/lib/model/Utilisateur.d.ts +10 -0
  134. package/lib/model/Utilisateur.js +2 -0
  135. package/lib/model/Workflow.d.ts +4 -0
  136. package/lib/model/Workflow.js +2 -0
  137. package/lib/model/WorkflowBase.d.ts +13 -0
  138. package/lib/model/WorkflowBase.js +2 -0
  139. package/lib/model/WorkflowDossiersLies.d.ts +4 -0
  140. package/lib/model/WorkflowDossiersLies.js +2 -0
  141. package/lib/model/WorkflowPassageCommissionSecurite.d.ts +4 -0
  142. package/lib/model/WorkflowPassageCommissionSecurite.js +2 -0
  143. package/lib/model/WorkflowRemiseEnServicePEI.d.ts +5 -0
  144. package/lib/model/WorkflowRemiseEnServicePEI.js +2 -0
  145. package/lib/utils.d.ts +8 -0
  146. package/lib/utils.js +21 -0
  147. package/package.json +4 -3
  148. package/src/api/DossiersAPI.ts +196 -0
  149. package/src/api/NotificationsAPI.ts +106 -0
  150. package/src/api/OrganisationAPI.ts +27 -0
  151. package/src/api/POIAPI.ts +134 -0
  152. package/src/api/PingAPI.ts +26 -0
  153. package/src/api/SupportAPI.ts +66 -0
  154. package/src/api/UtilisateursAPI.ts +77 -0
  155. package/src/core.ts +7 -7
  156. package/src/index.ts +17 -3
  157. package/src/metarisc.ts +51 -16
  158. package/src/model/AdressePostale.ts +10 -0
  159. package/src/model/AnomalieDECI.ts +11 -0
  160. package/src/model/Contact.ts +9 -0
  161. package/src/model/DescriptifTechnique.ts +46 -0
  162. package/src/model/DescriptifTechniqueBase.ts +5 -0
  163. package/src/model/DescriptifTechniqueDECIBase.ts +19 -0
  164. package/src/model/DescriptifTechniquePENA.ts +47 -0
  165. package/src/model/DescriptifTechniquePENAAllOfRealimentation.ts +11 -0
  166. package/src/model/DescriptifTechniquePENAAllOfVolumes.ts +4 -0
  167. package/src/model/DescriptifTechniquePIBI.ts +35 -0
  168. package/src/model/DescriptifTechniquePIBIAllOfPesees.ts +6 -0
  169. package/src/model/Document.ts +3 -0
  170. package/src/model/Dossier.ts +14 -0
  171. package/src/model/Email.ts +6 -0
  172. package/src/model/Feature.ts +7 -0
  173. package/src/model/FeatureGeometry.ts +5 -0
  174. package/src/model/GetFeature200Response.ts +8 -0
  175. package/src/model/GetFeature200ResponseCrs.ts +6 -0
  176. package/src/model/GetFeature200ResponseCrsProperties.ts +3 -0
  177. package/src/model/GetNotification404Response.ts +6 -0
  178. package/src/model/Notification.ts +12 -0
  179. package/src/model/Organisation.ts +10 -0
  180. package/src/model/POI.ts +14 -0
  181. package/src/model/POIReferencesExterieuresInner.ts +4 -0
  182. package/src/model/PaginateContacts200Response.ts +7 -0
  183. package/src/model/PaginateDossiers200Response.ts +7 -0
  184. package/src/model/PaginateDossiers200ResponseMeta.ts +5 -0
  185. package/src/model/PaginateHistorique200Response.ts +7 -0
  186. package/src/model/PaginateMoiEmails200Response.ts +7 -0
  187. package/src/model/PaginateMoiEmails200ResponseMeta.ts +5 -0
  188. package/src/model/PaginateMoiEmails200ResponseMetaPagination.ts +7 -0
  189. package/src/model/PaginateNotifications200Response.ts +7 -0
  190. package/src/model/PaginatePiecesJointes200Response.ts +7 -0
  191. package/src/model/PaginatePoi200Response.ts +7 -0
  192. package/src/model/PaginatePoi200ResponseMeta.ts +5 -0
  193. package/src/model/PaginateSuiviAdministratif200Response.ts +7 -0
  194. package/src/model/PaginateTags200Response.ts +7 -0
  195. package/src/model/PaginateTickets200Response.ts +7 -0
  196. package/src/model/PaginateTickets200ResponseMeta.ts +5 -0
  197. package/src/model/PaginateWorkflowDocuments200Response.ts +7 -0
  198. package/src/model/PaginateWorkflows200Response.ts +7 -0
  199. package/src/model/PaginationMetadata1.ts +7 -0
  200. package/src/model/PaginationMetadata2.ts +7 -0
  201. package/src/model/PatchPoiRequest.ts +3 -0
  202. package/src/model/PieceJointe.ts +7 -0
  203. package/src/model/Ping200Response.ts +3 -0
  204. package/src/model/PostDossierRequest.ts +5 -0
  205. package/src/model/PostNotification400Response.ts +6 -0
  206. package/src/model/PostNotification500Response.ts +6 -0
  207. package/src/model/PostNotificationRequest.ts +9 -0
  208. package/src/model/PostTicketRequest.ts +10 -0
  209. package/src/model/SuiviAdministratif.ts +6 -0
  210. package/src/model/Tag.ts +3 -0
  211. package/src/model/Ticket.ts +18 -0
  212. package/src/model/Type.ts +5 -0
  213. package/src/model/Utilisateur.ts +10 -0
  214. package/src/model/Workflow.ts +5 -0
  215. package/src/model/WorkflowBase.ts +13 -0
  216. package/src/model/WorkflowDossiersLies.ts +5 -0
  217. package/src/model/WorkflowPassageCommissionSecurite.ts +5 -0
  218. package/src/model/WorkflowRemiseEnServicePEI.ts +6 -0
  219. package/src/utils.ts +23 -0
  220. package/tests/index.mjs +7 -0
  221. package/tsconfig.json +11 -10
package/.eslintrc CHANGED
@@ -8,5 +8,8 @@
8
8
  "eslint:recommended",
9
9
  "plugin:@typescript-eslint/eslint-recommended",
10
10
  "plugin:@typescript-eslint/recommended"
11
- ]
11
+ ],
12
+ "rules": {
13
+ "no-multiple-empty-lines": [1, { "max": 1, "maxEOF": 0, "maxBOF": 0 }]
14
+ }
12
15
  }
@@ -22,7 +22,7 @@ jobs:
22
22
 
23
23
  - run: npm run compile
24
24
 
25
- - run: npm run lint
25
+ - run: npx eslint . --ext .ts
26
26
 
27
27
  - run: npm publish --access=public
28
28
  env:
package/README.md CHANGED
@@ -1,3 +1,32 @@
1
+
1
2
  # Metarisc JS
2
3
 
3
4
  La librairie Metarisc JS offre un accès simple et pratique à l'API Metarisc à partir d'applications écrites en langage JS. Elle comprend un ensemble de classes et de fonctions pour l'ensemble des ressources de l'API.
5
+
6
+ ## NPM
7
+
8
+ Vous pouvez installer la librairie en utilisant [NPM](https://www.npmjs.com). Exécutez la commande suivante dans votre projet :
9
+
10
+ ```bash
11
+ npm i @metarisc/metarisc-js
12
+ ```
13
+
14
+ Pour utiliser la librairie, il suffit de l'importer comme ceci :
15
+
16
+ ```php
17
+ import { Metarisc } from '@metarisc/metarisc-js';';
18
+ ```
19
+
20
+ ## Utilisation
21
+
22
+ ### Requêtes
23
+
24
+ Pour effectuer une requête sur Metarisc, qu'elle soit simple ou paginés (voir la [documentation](http://metarisc.fr/docs/api/#/#pagination)), faites de cette manière :
25
+
26
+ Exemple :
27
+
28
+ ```ts
29
+ const m = new Metarisc(config);
30
+ m.NotificationsAPI.getNotification('123456');
31
+ m.NotificationsAPI.paginateNotifications();
32
+ ```
@@ -0,0 +1,63 @@
1
+ import { Core, MetariscConfig } from "../core";
2
+ import type { AxiosResponse } from "axios";
3
+ import { Dossier } from "../../src/model/Dossier";
4
+ import { PaginateDossiers200Response } from "../../src/model/PaginateDossiers200Response";
5
+ import { PaginateSuiviAdministratif200Response } from "../../src/model/PaginateSuiviAdministratif200Response";
6
+ import { PaginateTags200Response } from "../../src/model/PaginateTags200Response";
7
+ import { PaginateWorkflowDocuments200Response } from "../../src/model/PaginateWorkflowDocuments200Response";
8
+ import { PaginateWorkflows200Response } from "../../src/model/PaginateWorkflows200Response";
9
+ import { PostDossierRequest } from "../../src/model/PostDossierRequest";
10
+ export declare class DossiersAPI extends Core {
11
+ constructor(config: MetariscConfig);
12
+ /**
13
+ * Récupération de l'ensemble des données d'un dossier.
14
+ * @param dossierId ID du dossier
15
+ */
16
+ getDossier(dossierId: string): Promise<AxiosResponse<Dossier>>;
17
+ /**
18
+ * Récupération de la liste des dossiers selon des critères de recherche.
19
+ * @param page Numéro de page
20
+ * @param perPage Nombre de résultats demandé
21
+ */
22
+ paginateDossiers(page?: number, perPage?: number): AsyncGenerator<PaginateDossiers200Response>;
23
+ /**
24
+ * Récupération de la liste du suivi administratif d'un dossier.
25
+ * @param dossierId ID du dossier
26
+ * @param page Numéro de page
27
+ * @param perPage Nombre de résultats demandé
28
+ */
29
+ paginateSuiviAdministratif(dossierId: string, page?: number, perPage?: number): AsyncGenerator<PaginateSuiviAdministratif200Response>;
30
+ /**
31
+ * Récupération de la liste des tags d'un dossier.
32
+ * @param dossierId ID du dossier
33
+ * @param page Numéro de page
34
+ * @param perPage Nombre de résultats demandé
35
+ */
36
+ paginateTags(dossierId: string, page?: number, perPage?: number): AsyncGenerator<PaginateTags200Response>;
37
+ /**
38
+ * Liste des documents liés à un workflow.
39
+ * @param dossierId
40
+ * @param workflowId
41
+ * @param page Numéro de page
42
+ * @param perPage Nombre de résultats demandé
43
+ */
44
+ paginateWorkflowDocuments(dossierId: string, workflowId: string, page?: number, perPage?: number): AsyncGenerator<PaginateWorkflowDocuments200Response>;
45
+ /**
46
+ * Récupération de la liste des workflows d'un dossier.
47
+ * @param dossierId ID du dossier
48
+ * @param page Numéro de page
49
+ * @param perPage Nombre de résultats demandé
50
+ */
51
+ paginateWorkflows(dossierId: string, page?: number, perPage?: number): AsyncGenerator<PaginateWorkflows200Response>;
52
+ /**
53
+ * Modification d'un dossier existant.
54
+ * @param dossierId ID du dossier
55
+ * @param dossier
56
+ */
57
+ patchDossier(dossierId: string, dossier?: Dossier): Promise<AxiosResponse<Dossier>>;
58
+ /**
59
+ * Création d'un nouveau dossier.
60
+ * @param postDossierRequest
61
+ */
62
+ postDossier(postDossierRequest?: PostDossierRequest): Promise<AxiosResponse<Dossier>>;
63
+ }
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DossiersAPI = void 0;
7
+ const core_1 = require("../core");
8
+ const utils_1 = __importDefault(require("../utils"));
9
+ class DossiersAPI extends core_1.Core {
10
+ constructor(config) {
11
+ super(config);
12
+ }
13
+ /**
14
+ * Récupération de l'ensemble des données d'un dossier.
15
+ * @param dossierId ID du dossier
16
+ */
17
+ async getDossier(dossierId) {
18
+ const pathVariable = { dossier_id: dossierId };
19
+ return this.request({
20
+ method: "GET",
21
+ endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}"),
22
+ headers: {},
23
+ params: {},
24
+ body: {},
25
+ });
26
+ }
27
+ /**
28
+ * Récupération de la liste des dossiers selon des critères de recherche.
29
+ * @param page Numéro de page
30
+ * @param perPage Nombre de résultats demandé
31
+ */
32
+ paginateDossiers(page, perPage) {
33
+ const pathVariable = {};
34
+ return this.autoPagingIterator({
35
+ method: "GET",
36
+ endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/"),
37
+ headers: {},
38
+ params: { page: page.toString(), per_page: perPage.toString() },
39
+ body: {},
40
+ });
41
+ }
42
+ /**
43
+ * Récupération de la liste du suivi administratif d'un dossier.
44
+ * @param dossierId ID du dossier
45
+ * @param page Numéro de page
46
+ * @param perPage Nombre de résultats demandé
47
+ */
48
+ paginateSuiviAdministratif(dossierId, page, perPage) {
49
+ const pathVariable = { dossier_id: dossierId };
50
+ return this.autoPagingIterator({
51
+ method: "GET",
52
+ endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/suivi_administratif"),
53
+ headers: {},
54
+ params: { page: page.toString(), per_page: perPage.toString() },
55
+ body: {},
56
+ });
57
+ }
58
+ /**
59
+ * Récupération de la liste des tags d'un dossier.
60
+ * @param dossierId ID du dossier
61
+ * @param page Numéro de page
62
+ * @param perPage Nombre de résultats demandé
63
+ */
64
+ paginateTags(dossierId, page, perPage) {
65
+ const pathVariable = { dossier_id: dossierId };
66
+ return this.autoPagingIterator({
67
+ method: "GET",
68
+ endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/tags"),
69
+ headers: {},
70
+ params: { page: page.toString(), per_page: perPage.toString() },
71
+ body: {},
72
+ });
73
+ }
74
+ /**
75
+ * Liste des documents liés à un workflow.
76
+ * @param dossierId
77
+ * @param workflowId
78
+ * @param page Numéro de page
79
+ * @param perPage Nombre de résultats demandé
80
+ */
81
+ paginateWorkflowDocuments(dossierId, workflowId, page, perPage) {
82
+ const pathVariable = { dossier_id: dossierId, workflow_id: workflowId };
83
+ return this.autoPagingIterator({
84
+ method: "GET",
85
+ endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/workflows/{workflow_id}/documents"),
86
+ headers: {},
87
+ params: { page: page.toString(), per_page: perPage.toString() },
88
+ body: {},
89
+ });
90
+ }
91
+ /**
92
+ * Récupération de la liste des workflows d'un dossier.
93
+ * @param dossierId ID du dossier
94
+ * @param page Numéro de page
95
+ * @param perPage Nombre de résultats demandé
96
+ */
97
+ paginateWorkflows(dossierId, page, perPage) {
98
+ const pathVariable = { dossier_id: dossierId };
99
+ return this.autoPagingIterator({
100
+ method: "GET",
101
+ endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/workflows"),
102
+ headers: {},
103
+ params: { page: page.toString(), per_page: perPage.toString() },
104
+ body: {},
105
+ });
106
+ }
107
+ /**
108
+ * Modification d'un dossier existant.
109
+ * @param dossierId ID du dossier
110
+ * @param dossier
111
+ */
112
+ async patchDossier(dossierId, dossier) {
113
+ const pathVariable = { dossier_id: dossierId };
114
+ return this.request({
115
+ method: "PATCH",
116
+ endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}"),
117
+ headers: {},
118
+ params: {},
119
+ body: {
120
+ id: dossier?.id,
121
+ type: dossier?.type,
122
+ description: dossier?.description,
123
+ dateDeCreation: dossier?.dateDeCreation,
124
+ createur: dossier?.createur,
125
+ applicationUtilisee: dossier?.applicationUtilisee,
126
+ statut: dossier?.statut,
127
+ },
128
+ });
129
+ }
130
+ /**
131
+ * Création d'un nouveau dossier.
132
+ * @param postDossierRequest
133
+ */
134
+ async postDossier(postDossierRequest) {
135
+ const pathVariable = {};
136
+ return this.request({
137
+ method: "POST",
138
+ endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/"),
139
+ headers: {},
140
+ params: {},
141
+ body: {
142
+ titre: postDossierRequest?.titre,
143
+ description: postDossierRequest?.description,
144
+ workflows: postDossierRequest?.workflows,
145
+ },
146
+ });
147
+ }
148
+ }
149
+ exports.DossiersAPI = DossiersAPI;
@@ -0,0 +1,30 @@
1
+ import { Core, MetariscConfig } from "../core";
2
+ import type { AxiosResponse } from "axios";
3
+ import { Notification } from "../../src/model/Notification";
4
+ import { PaginateNotifications200Response } from "../../src/model/PaginateNotifications200Response";
5
+ import { PostNotificationRequest } from "../../src/model/PostNotificationRequest";
6
+ export declare class NotificationsAPI extends Core {
7
+ constructor(config: MetariscConfig);
8
+ /**
9
+ * Suppression d'une notification correspondante à l'id donné.
10
+ * @param notificationId L'id de la notification demandée
11
+ */
12
+ deleteNotification(notificationId: string): Promise<AxiosResponse<void>>;
13
+ /**
14
+ * Récupération des détails d'une notification correspondante à l'id donné.
15
+ * @param notificationId L'id de la notification demandée
16
+ * @param notification
17
+ */
18
+ getNotification(notificationId: string, notification?: Notification): Promise<AxiosResponse<Notification>>;
19
+ /**
20
+ * Récupération des détails de toutes les notifications existantes.
21
+ * @param page Numéro de page
22
+ * @param perPage Nombre de résultats demandé
23
+ */
24
+ paginateNotifications(page?: number, perPage?: number): AsyncGenerator<PaginateNotifications200Response>;
25
+ /**
26
+ * Création d'une notification.
27
+ * @param postNotificationRequest
28
+ */
29
+ postNotification(postNotificationRequest?: PostNotificationRequest): Promise<AxiosResponse<Notification>>;
30
+ }
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.NotificationsAPI = void 0;
7
+ const core_1 = require("../core");
8
+ const utils_1 = __importDefault(require("../utils"));
9
+ class NotificationsAPI extends core_1.Core {
10
+ constructor(config) {
11
+ super(config);
12
+ }
13
+ /**
14
+ * Suppression d'une notification correspondante à l'id donné.
15
+ * @param notificationId L'id de la notification demandée
16
+ */
17
+ async deleteNotification(notificationId) {
18
+ const pathVariable = { notification_id: notificationId };
19
+ return this.request({
20
+ method: "DELETE",
21
+ endpoint: utils_1.default.constructPath(pathVariable, "/notifications/{notification_id}"),
22
+ headers: {},
23
+ params: {},
24
+ body: {},
25
+ });
26
+ }
27
+ /**
28
+ * Récupération des détails d'une notification correspondante à l'id donné.
29
+ * @param notificationId L'id de la notification demandée
30
+ * @param notification
31
+ */
32
+ async getNotification(notificationId, notification) {
33
+ const pathVariable = { notification_id: notificationId };
34
+ return this.request({
35
+ method: "GET",
36
+ endpoint: utils_1.default.constructPath(pathVariable, "/notifications/{notification_id}"),
37
+ headers: {},
38
+ params: {},
39
+ body: {
40
+ id: notification?.id,
41
+ title: notification?.title,
42
+ message: notification?.message,
43
+ contexte: notification?.contexte,
44
+ dateCreation: notification?.dateCreation,
45
+ dateDeLecture: notification?.dateDeLecture,
46
+ utilisateurId: notification?.utilisateurId,
47
+ },
48
+ });
49
+ }
50
+ /**
51
+ * Récupération des détails de toutes les notifications existantes.
52
+ * @param page Numéro de page
53
+ * @param perPage Nombre de résultats demandé
54
+ */
55
+ paginateNotifications(page, perPage) {
56
+ const pathVariable = {};
57
+ return this.autoPagingIterator({
58
+ method: "GET",
59
+ endpoint: utils_1.default.constructPath(pathVariable, "/notifications/"),
60
+ headers: {},
61
+ params: { page: page.toString(), per_page: perPage.toString() },
62
+ body: {},
63
+ });
64
+ }
65
+ /**
66
+ * Création d'une notification.
67
+ * @param postNotificationRequest
68
+ */
69
+ async postNotification(postNotificationRequest) {
70
+ const pathVariable = {};
71
+ return this.request({
72
+ method: "POST",
73
+ endpoint: utils_1.default.constructPath(pathVariable, "/notifications/"),
74
+ headers: {},
75
+ params: {},
76
+ body: {
77
+ title: postNotificationRequest?.title,
78
+ message: postNotificationRequest?.message,
79
+ contexte: postNotificationRequest?.contexte,
80
+ utilisateurId: postNotificationRequest?.utilisateurId,
81
+ },
82
+ });
83
+ }
84
+ }
85
+ exports.NotificationsAPI = NotificationsAPI;
@@ -0,0 +1,11 @@
1
+ import { Core, MetariscConfig } from "../core";
2
+ import type { AxiosResponse } from 'axios';
3
+ import { Organisation } from '../../src/model/Organisation';
4
+ export declare class OrganisationAPI extends Core {
5
+ constructor(config: MetariscConfig);
6
+ /**
7
+ * Récupération des détails d'une organisation.
8
+ * @param orgId ID de l'organisation
9
+ */
10
+ getOrganisation(orgId: string): Promise<AxiosResponse<Organisation>>;
11
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.OrganisationAPI = void 0;
7
+ const core_1 = require("../core");
8
+ const utils_1 = __importDefault(require("../utils"));
9
+ class OrganisationAPI extends core_1.Core {
10
+ constructor(config) {
11
+ super(config);
12
+ }
13
+ /**
14
+ * Récupération des détails d'une organisation.
15
+ * @param orgId ID de l'organisation
16
+ */
17
+ async getOrganisation(orgId) {
18
+ const pathVariable = { 'org_id': orgId };
19
+ return this.request({
20
+ method: 'GET',
21
+ endpoint: utils_1.default.constructPath(pathVariable, '/organisations/{org_id}'),
22
+ headers: {},
23
+ params: {},
24
+ body: {}
25
+ });
26
+ }
27
+ }
28
+ exports.OrganisationAPI = OrganisationAPI;
@@ -0,0 +1,49 @@
1
+ import { Core, MetariscConfig } from "../core";
2
+ import type { AxiosResponse } from "axios";
3
+ import { POI } from "../../src/model/POI";
4
+ import { PaginateContacts200Response } from "../../src/model/PaginateContacts200Response";
5
+ import { PaginateHistorique200Response } from "../../src/model/PaginateHistorique200Response";
6
+ import { PaginatePiecesJointes200Response } from "../../src/model/PaginatePiecesJointes200Response";
7
+ import { PaginatePoi200Response } from "../../src/model/PaginatePoi200Response";
8
+ import { PatchPoiRequest } from "../../src/model/PatchPoiRequest";
9
+ export declare class POIAPI extends Core {
10
+ constructor(config: MetariscConfig);
11
+ /**
12
+ * Récupération de l'ensemble des données d'un POI.
13
+ * @param poiId ID du POI
14
+ */
15
+ getPoi(poiId: string): Promise<AxiosResponse<POI>>;
16
+ /**
17
+ * Récupération de la liste des contacts d'un POI.
18
+ * @param poiId ID du POI
19
+ * @param page Numéro de page
20
+ * @param perPage Nombre de résultats demandé
21
+ */
22
+ paginateContacts(poiId: string, page?: number, perPage?: number): AsyncGenerator<PaginateContacts200Response>;
23
+ /**
24
+ * Récupération de l'historique d'un POI.
25
+ * @param poiId ID du POI
26
+ * @param page Numéro de page
27
+ * @param perPage Nombre de résultats demandé
28
+ */
29
+ paginateHistorique(poiId: string, page?: number, perPage?: number): AsyncGenerator<PaginateHistorique200Response>;
30
+ /**
31
+ * Récupération de la liste des pièces jointes d'un POI.
32
+ * @param poiId ID du POI
33
+ * @param page Numéro de page
34
+ * @param perPage Nombre de résultats demandé
35
+ */
36
+ paginatePiecesJointes(poiId: string, page?: number, perPage?: number): AsyncGenerator<PaginatePiecesJointes200Response>;
37
+ /**
38
+ * Récupération de la liste des POI selon des critères de recherche.
39
+ * @param page Numéro de page
40
+ * @param perPage Nombre de résultats demandé
41
+ */
42
+ paginatePoi(page?: number, perPage?: number): AsyncGenerator<PaginatePoi200Response>;
43
+ /**
44
+ * Modifier un POI existant.
45
+ * @param poiId ID du POI
46
+ * @param patchPoiRequest
47
+ */
48
+ patchPoi(poiId: string, patchPoiRequest?: PatchPoiRequest): Promise<AxiosResponse<POI>>;
49
+ }
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.POIAPI = void 0;
7
+ const core_1 = require("../core");
8
+ const utils_1 = __importDefault(require("../utils"));
9
+ class POIAPI extends core_1.Core {
10
+ constructor(config) {
11
+ super(config);
12
+ }
13
+ /**
14
+ * Récupération de l'ensemble des données d'un POI.
15
+ * @param poiId ID du POI
16
+ */
17
+ async getPoi(poiId) {
18
+ const pathVariable = { poi_id: poiId };
19
+ return this.request({
20
+ method: "GET",
21
+ endpoint: utils_1.default.constructPath(pathVariable, "/poi/{poi_id}"),
22
+ headers: {},
23
+ params: {},
24
+ body: {},
25
+ });
26
+ }
27
+ /**
28
+ * Récupération de la liste des contacts d'un POI.
29
+ * @param poiId ID du POI
30
+ * @param page Numéro de page
31
+ * @param perPage Nombre de résultats demandé
32
+ */
33
+ paginateContacts(poiId, page, perPage) {
34
+ const pathVariable = { poi_id: poiId };
35
+ return this.autoPagingIterator({
36
+ method: "GET",
37
+ endpoint: utils_1.default.constructPath(pathVariable, "/poi/{poi_id}/contacts"),
38
+ headers: {},
39
+ params: { page: page.toString(), per_page: perPage.toString() },
40
+ body: {},
41
+ });
42
+ }
43
+ /**
44
+ * Récupération de l'historique d'un POI.
45
+ * @param poiId ID du POI
46
+ * @param page Numéro de page
47
+ * @param perPage Nombre de résultats demandé
48
+ */
49
+ paginateHistorique(poiId, page, perPage) {
50
+ const pathVariable = { poi_id: poiId };
51
+ return this.autoPagingIterator({
52
+ method: "GET",
53
+ endpoint: utils_1.default.constructPath(pathVariable, "/poi/{poi_id}/historique"),
54
+ headers: {},
55
+ params: { page: page.toString(), per_page: perPage.toString() },
56
+ body: {},
57
+ });
58
+ }
59
+ /**
60
+ * Récupération de la liste des pièces jointes d'un POI.
61
+ * @param poiId ID du POI
62
+ * @param page Numéro de page
63
+ * @param perPage Nombre de résultats demandé
64
+ */
65
+ paginatePiecesJointes(poiId, page, perPage) {
66
+ const pathVariable = { poi_id: poiId };
67
+ return this.autoPagingIterator({
68
+ method: "GET",
69
+ endpoint: utils_1.default.constructPath(pathVariable, "/poi/{poi_id}/pieces_jointes"),
70
+ headers: {},
71
+ params: { page: page.toString(), per_page: perPage.toString() },
72
+ body: {},
73
+ });
74
+ }
75
+ /**
76
+ * Récupération de la liste des POI selon des critères de recherche.
77
+ * @param page Numéro de page
78
+ * @param perPage Nombre de résultats demandé
79
+ */
80
+ paginatePoi(page, perPage) {
81
+ const pathVariable = {};
82
+ return this.autoPagingIterator({
83
+ method: "GET",
84
+ endpoint: utils_1.default.constructPath(pathVariable, "/poi/"),
85
+ headers: {},
86
+ params: { page: page.toString(), per_page: perPage.toString() },
87
+ body: {},
88
+ });
89
+ }
90
+ /**
91
+ * Modifier un POI existant.
92
+ * @param poiId ID du POI
93
+ * @param patchPoiRequest
94
+ */
95
+ async patchPoi(poiId, patchPoiRequest) {
96
+ const pathVariable = { poi_id: poiId };
97
+ return this.request({
98
+ method: "PATCH",
99
+ endpoint: utils_1.default.constructPath(pathVariable, "/poi/{poi_id}"),
100
+ headers: {},
101
+ params: {},
102
+ body: { test: patchPoiRequest?.test },
103
+ });
104
+ }
105
+ }
106
+ exports.POIAPI = POIAPI;
@@ -0,0 +1,10 @@
1
+ import { Core, MetariscConfig } from "../core";
2
+ import type { AxiosResponse } from 'axios';
3
+ import { Ping200Response } from '../../src/model/Ping200Response';
4
+ export declare class PingAPI extends Core {
5
+ constructor(config: MetariscConfig);
6
+ /**
7
+ * Permet de s'assurer que le service Metarisc est en ligne. Ping ... Pong !
8
+ */
9
+ ping(): Promise<AxiosResponse<Ping200Response>>;
10
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PingAPI = void 0;
7
+ const core_1 = require("../core");
8
+ const utils_1 = __importDefault(require("../utils"));
9
+ class PingAPI extends core_1.Core {
10
+ constructor(config) {
11
+ super(config);
12
+ }
13
+ /**
14
+ * Permet de s'assurer que le service Metarisc est en ligne. Ping ... Pong !
15
+ */
16
+ async ping() {
17
+ const pathVariable = {};
18
+ return this.request({
19
+ method: 'GET',
20
+ endpoint: utils_1.default.constructPath(pathVariable, '/ping'),
21
+ headers: {},
22
+ params: {},
23
+ body: {}
24
+ });
25
+ }
26
+ }
27
+ exports.PingAPI = PingAPI;
@@ -0,0 +1,24 @@
1
+ import { Core, MetariscConfig } from "../core";
2
+ import type { AxiosResponse } from "axios";
3
+ import { PaginateTickets200Response } from "../../src/model/PaginateTickets200Response";
4
+ import { PostTicketRequest } from "../../src/model/PostTicketRequest";
5
+ import { Ticket } from "../../src/model/Ticket";
6
+ export declare class SupportAPI extends Core {
7
+ constructor(config: MetariscConfig);
8
+ /**
9
+ * Récupération des détails du ticket
10
+ * @param ticketId ID du ticket
11
+ */
12
+ getTicket(ticketId: string): Promise<AxiosResponse<Ticket>>;
13
+ /**
14
+ * Récupération de la liste des tickets de support.
15
+ * @param page Numéro de page
16
+ * @param perPage Nombre de résultats demandé
17
+ */
18
+ paginateTickets(page?: number, perPage?: number): AsyncGenerator<PaginateTickets200Response>;
19
+ /**
20
+ * Création d'un nouveau ticket de support.
21
+ * @param postTicketRequest
22
+ */
23
+ postTicket(postTicketRequest?: PostTicketRequest): Promise<AxiosResponse<Ticket>>;
24
+ }