@metarisc/metarisc-js 0.0.1-alpha.1 → 0.0.1-alpha.10
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/.eslintrc +4 -1
- package/.github/workflows/main.yml +29 -0
- package/README.md +29 -0
- package/lib/api/DossiersAPI.d.ts +85 -0
- package/lib/api/DossiersAPI.js +216 -0
- package/lib/api/NotificationsAPI.d.ts +23 -0
- package/lib/api/NotificationsAPI.js +79 -0
- package/lib/api/OrganisationAPI.d.ts +7 -0
- package/lib/api/OrganisationAPI.js +24 -0
- package/lib/api/POIAPI.d.ts +67 -0
- package/lib/api/POIAPI.js +160 -0
- package/lib/api/PingAPI.d.ts +7 -0
- package/lib/api/PingAPI.js +24 -0
- package/lib/api/SupportAPI.d.ts +22 -0
- package/lib/api/SupportAPI.js +67 -0
- package/lib/api/UtilisateursAPI.d.ts +33 -0
- package/lib/api/UtilisateursAPI.js +94 -0
- package/lib/core.d.ts +25 -0
- package/lib/core.js +45 -0
- package/lib/index.d.ts +10 -1
- package/lib/index.js +19 -1
- package/lib/metarisc.d.ts +17 -18
- package/lib/metarisc.js +32 -27
- package/lib/model/AdressePostale.d.ts +10 -0
- package/lib/model/AdressePostale.js +2 -0
- package/lib/model/AnomalieDECI.d.ts +10 -0
- package/lib/model/AnomalieDECI.js +9 -0
- package/lib/model/Contact.d.ts +9 -0
- package/lib/model/Contact.js +2 -0
- package/lib/model/DescriptifTechnique.d.ts +40 -0
- package/lib/model/DescriptifTechnique.js +45 -0
- package/lib/model/DescriptifTechniqueBase.d.ts +5 -0
- package/lib/model/DescriptifTechniqueBase.js +2 -0
- package/lib/model/DescriptifTechniqueDECIBase.d.ts +16 -0
- package/lib/model/DescriptifTechniqueDECIBase.js +9 -0
- package/lib/model/DescriptifTechniquePENA.d.ts +43 -0
- package/lib/model/DescriptifTechniquePENA.js +40 -0
- package/lib/model/DescriptifTechniquePENAAllOfRealimentation.d.ts +10 -0
- package/lib/model/DescriptifTechniquePENAAllOfRealimentation.js +9 -0
- package/lib/model/DescriptifTechniquePENAAllOfVolumes.d.ts +4 -0
- package/lib/model/DescriptifTechniquePENAAllOfVolumes.js +2 -0
- package/lib/model/DescriptifTechniquePIBI.d.ts +31 -0
- package/lib/model/DescriptifTechniquePIBI.js +25 -0
- package/lib/model/DescriptifTechniquePIBIAllOfPesees.d.ts +6 -0
- package/lib/model/DescriptifTechniquePIBIAllOfPesees.js +2 -0
- package/lib/model/Document.d.ts +3 -0
- package/lib/model/Document.js +2 -0
- package/lib/model/Dossier.d.ts +13 -0
- package/lib/model/Dossier.js +2 -0
- package/lib/model/Email.d.ts +6 -0
- package/lib/model/Email.js +2 -0
- package/lib/model/Feature.d.ts +6 -0
- package/lib/model/Feature.js +2 -0
- package/lib/model/FeatureGeometry.d.ts +5 -0
- package/lib/model/FeatureGeometry.js +2 -0
- package/lib/model/GetFeature200Response.d.ts +7 -0
- package/lib/model/GetFeature200Response.js +2 -0
- package/lib/model/GetFeature200ResponseCrs.d.ts +5 -0
- package/lib/model/GetFeature200ResponseCrs.js +2 -0
- package/lib/model/GetFeature200ResponseCrsProperties.d.ts +3 -0
- package/lib/model/GetFeature200ResponseCrsProperties.js +2 -0
- package/lib/model/GetNotification404Response.d.ts +6 -0
- package/lib/model/GetNotification404Response.js +2 -0
- package/lib/model/Notification.d.ts +12 -0
- package/lib/model/Notification.js +2 -0
- package/lib/model/Organisation.d.ts +9 -0
- package/lib/model/Organisation.js +7 -0
- package/lib/model/POI.d.ts +13 -0
- package/lib/model/POI.js +2 -0
- package/lib/model/POIReferencesExterieuresInner.d.ts +4 -0
- package/lib/model/POIReferencesExterieuresInner.js +2 -0
- package/lib/model/PaginateContacts200Response.d.ts +6 -0
- package/lib/model/PaginateContacts200Response.js +2 -0
- package/lib/model/PaginateDossiers200Response.d.ts +6 -0
- package/lib/model/PaginateDossiers200Response.js +2 -0
- package/lib/model/PaginateDossiers200ResponseMeta.d.ts +4 -0
- package/lib/model/PaginateDossiers200ResponseMeta.js +2 -0
- package/lib/model/PaginateHistorique200Response.d.ts +6 -0
- package/lib/model/PaginateHistorique200Response.js +2 -0
- package/lib/model/PaginateMoiEmails200Response.d.ts +6 -0
- package/lib/model/PaginateMoiEmails200Response.js +2 -0
- package/lib/model/PaginateMoiEmails200ResponseMeta.d.ts +4 -0
- package/lib/model/PaginateMoiEmails200ResponseMeta.js +2 -0
- package/lib/model/PaginateMoiEmails200ResponseMetaPagination.d.ts +7 -0
- package/lib/model/PaginateMoiEmails200ResponseMetaPagination.js +2 -0
- package/lib/model/PaginateNotifications200Response.d.ts +6 -0
- package/lib/model/PaginateNotifications200Response.js +2 -0
- package/lib/model/PaginatePiecesJointes200Response.d.ts +6 -0
- package/lib/model/PaginatePiecesJointes200Response.js +2 -0
- package/lib/model/PaginatePoi200Response.d.ts +6 -0
- package/lib/model/PaginatePoi200Response.js +2 -0
- package/lib/model/PaginatePoi200ResponseMeta.d.ts +4 -0
- package/lib/model/PaginatePoi200ResponseMeta.js +2 -0
- package/lib/model/PaginateSuiviAdministratif200Response.d.ts +6 -0
- package/lib/model/PaginateSuiviAdministratif200Response.js +2 -0
- package/lib/model/PaginateTags200Response.d.ts +6 -0
- package/lib/model/PaginateTags200Response.js +2 -0
- package/lib/model/PaginateTickets200Response.d.ts +6 -0
- package/lib/model/PaginateTickets200Response.js +2 -0
- package/lib/model/PaginateTickets200ResponseMeta.d.ts +4 -0
- package/lib/model/PaginateTickets200ResponseMeta.js +2 -0
- package/lib/model/PaginateWorkflowDocuments200Response.d.ts +6 -0
- package/lib/model/PaginateWorkflowDocuments200Response.js +2 -0
- package/lib/model/PaginateWorkflows200Response.d.ts +6 -0
- package/lib/model/PaginateWorkflows200Response.js +2 -0
- package/lib/model/PaginationMetadata1.d.ts +7 -0
- package/lib/model/PaginationMetadata1.js +2 -0
- package/lib/model/PaginationMetadata2.d.ts +7 -0
- package/lib/model/PaginationMetadata2.js +2 -0
- package/lib/model/PatchPoiRequest.d.ts +3 -0
- package/lib/model/PatchPoiRequest.js +2 -0
- package/lib/model/PieceJointe.d.ts +7 -0
- package/lib/model/PieceJointe.js +2 -0
- package/lib/model/Ping200Response.d.ts +3 -0
- package/lib/model/Ping200Response.js +2 -0
- package/lib/model/PostDossierRequest.d.ts +5 -0
- package/lib/model/PostDossierRequest.js +2 -0
- package/lib/model/PostNotification400Response.d.ts +6 -0
- package/lib/model/PostNotification400Response.js +2 -0
- package/lib/model/PostNotification500Response.d.ts +6 -0
- package/lib/model/PostNotification500Response.js +2 -0
- package/lib/model/PostNotificationRequest.d.ts +9 -0
- package/lib/model/PostNotificationRequest.js +2 -0
- package/lib/model/PostTicketRequest.d.ts +10 -0
- package/lib/model/PostTicketRequest.js +2 -0
- package/lib/model/SuiviAdministratif.d.ts +6 -0
- package/lib/model/SuiviAdministratif.js +2 -0
- package/lib/model/Tag.d.ts +3 -0
- package/lib/model/Tag.js +2 -0
- package/lib/model/Ticket.d.ts +17 -0
- package/lib/model/Ticket.js +12 -0
- package/lib/model/Type.d.ts +5 -0
- package/lib/model/Type.js +2 -0
- package/lib/model/Utilisateur.d.ts +10 -0
- package/lib/model/Utilisateur.js +2 -0
- package/lib/model/Workflow.d.ts +4 -0
- package/lib/model/Workflow.js +2 -0
- package/lib/model/WorkflowBase.d.ts +13 -0
- package/lib/model/WorkflowBase.js +2 -0
- package/lib/model/WorkflowDossiersLies.d.ts +4 -0
- package/lib/model/WorkflowDossiersLies.js +2 -0
- package/lib/model/WorkflowPassageCommissionSecurite.d.ts +4 -0
- package/lib/model/WorkflowPassageCommissionSecurite.js +2 -0
- package/lib/model/WorkflowRemiseEnServicePEI.d.ts +5 -0
- package/lib/model/WorkflowRemiseEnServicePEI.js +2 -0
- package/lib/oauth2.d.ts +13 -0
- package/lib/oauth2.js +14 -0
- package/lib/utils.d.ts +8 -0
- package/lib/utils.js +21 -0
- package/package.json +20 -18
- package/src/api/DossiersAPI.ts +295 -0
- package/src/api/NotificationsAPI.ts +102 -0
- package/src/api/OrganisationAPI.ts +23 -0
- package/src/api/POIAPI.ts +206 -0
- package/src/api/PingAPI.ts +23 -0
- package/src/api/SupportAPI.ts +76 -0
- package/src/api/UtilisateursAPI.ts +107 -0
- package/src/core.ts +76 -0
- package/src/index.ts +17 -1
- package/src/metarisc.ts +52 -61
- package/src/model/AdressePostale.ts +10 -0
- package/src/model/AnomalieDECI.ts +11 -0
- package/src/model/Contact.ts +9 -0
- package/src/model/DescriptifTechnique.ts +46 -0
- package/src/model/DescriptifTechniqueBase.ts +5 -0
- package/src/model/DescriptifTechniqueDECIBase.ts +19 -0
- package/src/model/DescriptifTechniquePENA.ts +47 -0
- package/src/model/DescriptifTechniquePENAAllOfRealimentation.ts +11 -0
- package/src/model/DescriptifTechniquePENAAllOfVolumes.ts +4 -0
- package/src/model/DescriptifTechniquePIBI.ts +35 -0
- package/src/model/DescriptifTechniquePIBIAllOfPesees.ts +6 -0
- package/src/model/Document.ts +3 -0
- package/src/model/Dossier.ts +14 -0
- package/src/model/Email.ts +6 -0
- package/src/model/Feature.ts +7 -0
- package/src/model/FeatureGeometry.ts +5 -0
- package/src/model/GetFeature200Response.ts +8 -0
- package/src/model/GetFeature200ResponseCrs.ts +6 -0
- package/src/model/GetFeature200ResponseCrsProperties.ts +3 -0
- package/src/model/GetNotification404Response.ts +6 -0
- package/src/model/Notification.ts +12 -0
- package/src/model/Organisation.ts +10 -0
- package/src/model/POI.ts +14 -0
- package/src/model/POIReferencesExterieuresInner.ts +4 -0
- package/src/model/PaginateContacts200Response.ts +7 -0
- package/src/model/PaginateDossiers200Response.ts +7 -0
- package/src/model/PaginateDossiers200ResponseMeta.ts +5 -0
- package/src/model/PaginateHistorique200Response.ts +7 -0
- package/src/model/PaginateMoiEmails200Response.ts +7 -0
- package/src/model/PaginateMoiEmails200ResponseMeta.ts +5 -0
- package/src/model/PaginateMoiEmails200ResponseMetaPagination.ts +7 -0
- package/src/model/PaginateNotifications200Response.ts +7 -0
- package/src/model/PaginatePiecesJointes200Response.ts +7 -0
- package/src/model/PaginatePoi200Response.ts +7 -0
- package/src/model/PaginatePoi200ResponseMeta.ts +5 -0
- package/src/model/PaginateSuiviAdministratif200Response.ts +7 -0
- package/src/model/PaginateTags200Response.ts +7 -0
- package/src/model/PaginateTickets200Response.ts +7 -0
- package/src/model/PaginateTickets200ResponseMeta.ts +5 -0
- package/src/model/PaginateWorkflowDocuments200Response.ts +7 -0
- package/src/model/PaginateWorkflows200Response.ts +7 -0
- package/src/model/PaginationMetadata1.ts +7 -0
- package/src/model/PaginationMetadata2.ts +7 -0
- package/src/model/PatchPoiRequest.ts +3 -0
- package/src/model/PieceJointe.ts +7 -0
- package/src/model/Ping200Response.ts +3 -0
- package/src/model/PostDossierRequest.ts +5 -0
- package/src/model/PostNotification400Response.ts +6 -0
- package/src/model/PostNotification500Response.ts +6 -0
- package/src/model/PostNotificationRequest.ts +9 -0
- package/src/model/PostTicketRequest.ts +10 -0
- package/src/model/SuiviAdministratif.ts +6 -0
- package/src/model/Tag.ts +3 -0
- package/src/model/Ticket.ts +18 -0
- package/src/model/Type.ts +5 -0
- package/src/model/Utilisateur.ts +10 -0
- package/src/model/Workflow.ts +5 -0
- package/src/model/WorkflowBase.ts +13 -0
- package/src/model/WorkflowDossiersLies.ts +5 -0
- package/src/model/WorkflowPassageCommissionSecurite.ts +5 -0
- package/src/model/WorkflowRemiseEnServicePEI.ts +6 -0
- package/src/oauth2.ts +20 -0
- package/src/utils.ts +23 -0
- package/tests/index.mjs +7 -0
- package/tsconfig.json +11 -10
package/.eslintrc
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: "CI"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
|
|
9
|
+
build:
|
|
10
|
+
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
|
|
15
|
+
- uses: actions/checkout@v3
|
|
16
|
+
|
|
17
|
+
- uses: actions/setup-node@v3
|
|
18
|
+
with:
|
|
19
|
+
registry-url: 'https://registry.npmjs.org'
|
|
20
|
+
|
|
21
|
+
- run: npm install
|
|
22
|
+
|
|
23
|
+
- run: npm run compile
|
|
24
|
+
|
|
25
|
+
- run: npx eslint . --ext .ts
|
|
26
|
+
|
|
27
|
+
- run: npm publish --access=public
|
|
28
|
+
env:
|
|
29
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
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,85 @@
|
|
|
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
|
+
getDossier(dossierId: string): Promise<AxiosResponse<Dossier>>;
|
|
13
|
+
/**
|
|
14
|
+
* Récupération de la liste des dossiers selon des critères de recherche.
|
|
15
|
+
* @param page Numéro de page
|
|
16
|
+
* @param perPage Nombre de résultats demandé
|
|
17
|
+
*/
|
|
18
|
+
paginateDossiers(page?: number, perPage?: number): Promise<AxiosResponse<PaginateDossiers200Response>>;
|
|
19
|
+
/**
|
|
20
|
+
* Récupération de la liste des dossiers selon des critères de recherche.
|
|
21
|
+
* @param page Numéro de page
|
|
22
|
+
* @param perPage Nombre de résultats demandé
|
|
23
|
+
*/
|
|
24
|
+
paginateDossiersIterator(page?: number, perPage?: number): AsyncGenerator<PaginateDossiers200Response>;
|
|
25
|
+
/**
|
|
26
|
+
* Récupération de la liste du suivi administratif d'un dossier.
|
|
27
|
+
* @param dossierId ID du dossier
|
|
28
|
+
* @param page Numéro de page
|
|
29
|
+
* @param perPage Nombre de résultats demandé
|
|
30
|
+
*/
|
|
31
|
+
paginateSuiviAdministratif(dossierId: string, page?: number, perPage?: number): Promise<AxiosResponse<PaginateSuiviAdministratif200Response>>;
|
|
32
|
+
/**
|
|
33
|
+
* Récupération de la liste du suivi administratif d'un dossier.
|
|
34
|
+
* @param dossierId ID du dossier
|
|
35
|
+
* @param page Numéro de page
|
|
36
|
+
* @param perPage Nombre de résultats demandé
|
|
37
|
+
*/
|
|
38
|
+
paginateSuiviAdministratifIterator(dossierId: string, page?: number, perPage?: number): AsyncGenerator<PaginateSuiviAdministratif200Response>;
|
|
39
|
+
/**
|
|
40
|
+
* Récupération de la liste des tags d'un dossier.
|
|
41
|
+
* @param dossierId ID du dossier
|
|
42
|
+
* @param page Numéro de page
|
|
43
|
+
* @param perPage Nombre de résultats demandé
|
|
44
|
+
*/
|
|
45
|
+
paginateTags(dossierId: string, page?: number, perPage?: number): Promise<AxiosResponse<PaginateTags200Response>>;
|
|
46
|
+
/**
|
|
47
|
+
* Récupération de la liste des tags d'un dossier.
|
|
48
|
+
* @param dossierId ID du dossier
|
|
49
|
+
* @param page Numéro de page
|
|
50
|
+
* @param perPage Nombre de résultats demandé
|
|
51
|
+
*/
|
|
52
|
+
paginateTagsIterator(dossierId: string, page?: number, perPage?: number): AsyncGenerator<PaginateTags200Response>;
|
|
53
|
+
/**
|
|
54
|
+
* Liste des documents liés à un workflow.
|
|
55
|
+
* @param dossierId
|
|
56
|
+
* @param workflowId
|
|
57
|
+
* @param page Numéro de page
|
|
58
|
+
* @param perPage Nombre de résultats demandé
|
|
59
|
+
*/
|
|
60
|
+
paginateWorkflowDocuments(dossierId: string, workflowId: string, page?: number, perPage?: number): Promise<AxiosResponse<PaginateWorkflowDocuments200Response>>;
|
|
61
|
+
/**
|
|
62
|
+
* Liste des documents liés à un workflow.
|
|
63
|
+
* @param dossierId
|
|
64
|
+
* @param workflowId
|
|
65
|
+
* @param page Numéro de page
|
|
66
|
+
* @param perPage Nombre de résultats demandé
|
|
67
|
+
*/
|
|
68
|
+
paginateWorkflowDocumentsIterator(dossierId: string, workflowId: string, page?: number, perPage?: number): AsyncGenerator<PaginateWorkflowDocuments200Response>;
|
|
69
|
+
/**
|
|
70
|
+
* Récupération de la liste des workflows d'un dossier.
|
|
71
|
+
* @param dossierId ID du dossier
|
|
72
|
+
* @param page Numéro de page
|
|
73
|
+
* @param perPage Nombre de résultats demandé
|
|
74
|
+
*/
|
|
75
|
+
paginateWorkflows(dossierId: string, page?: number, perPage?: number): Promise<AxiosResponse<PaginateWorkflows200Response>>;
|
|
76
|
+
/**
|
|
77
|
+
* Récupération de la liste des workflows d'un dossier.
|
|
78
|
+
* @param dossierId ID du dossier
|
|
79
|
+
* @param page Numéro de page
|
|
80
|
+
* @param perPage Nombre de résultats demandé
|
|
81
|
+
*/
|
|
82
|
+
paginateWorkflowsIterator(dossierId: string, page?: number, perPage?: number): AsyncGenerator<PaginateWorkflows200Response>;
|
|
83
|
+
patchDossier(dossierId: string, dossier?: Dossier): Promise<AxiosResponse<Dossier>>;
|
|
84
|
+
postDossier(postDossierRequest?: PostDossierRequest): Promise<AxiosResponse<Dossier>>;
|
|
85
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
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
|
+
async getDossier(dossierId) {
|
|
14
|
+
const pathVariable = { dossier_id: dossierId };
|
|
15
|
+
return this.request({
|
|
16
|
+
method: "GET",
|
|
17
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}"),
|
|
18
|
+
headers: {},
|
|
19
|
+
params: {},
|
|
20
|
+
body: {},
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Récupération de la liste des dossiers selon des critères de recherche.
|
|
25
|
+
* @param page Numéro de page
|
|
26
|
+
* @param perPage Nombre de résultats demandé
|
|
27
|
+
*/
|
|
28
|
+
paginateDossiers(page, perPage) {
|
|
29
|
+
const pathVariable = {};
|
|
30
|
+
return this.request({
|
|
31
|
+
method: "GET",
|
|
32
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/"),
|
|
33
|
+
headers: {},
|
|
34
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
35
|
+
body: {},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Récupération de la liste des dossiers selon des critères de recherche.
|
|
40
|
+
* @param page Numéro de page
|
|
41
|
+
* @param perPage Nombre de résultats demandé
|
|
42
|
+
*/
|
|
43
|
+
paginateDossiersIterator(page, perPage) {
|
|
44
|
+
const pathVariable = {};
|
|
45
|
+
return this.autoPagingIterator({
|
|
46
|
+
method: "GET",
|
|
47
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/"),
|
|
48
|
+
headers: {},
|
|
49
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
50
|
+
body: {},
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Récupération de la liste du suivi administratif d'un dossier.
|
|
55
|
+
* @param dossierId ID du dossier
|
|
56
|
+
* @param page Numéro de page
|
|
57
|
+
* @param perPage Nombre de résultats demandé
|
|
58
|
+
*/
|
|
59
|
+
paginateSuiviAdministratif(dossierId, page, perPage) {
|
|
60
|
+
const pathVariable = { dossier_id: dossierId };
|
|
61
|
+
return this.request({
|
|
62
|
+
method: "GET",
|
|
63
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/suivi_administratif"),
|
|
64
|
+
headers: {},
|
|
65
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
66
|
+
body: {},
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Récupération de la liste du suivi administratif d'un dossier.
|
|
71
|
+
* @param dossierId ID du dossier
|
|
72
|
+
* @param page Numéro de page
|
|
73
|
+
* @param perPage Nombre de résultats demandé
|
|
74
|
+
*/
|
|
75
|
+
paginateSuiviAdministratifIterator(dossierId, page, perPage) {
|
|
76
|
+
const pathVariable = { dossier_id: dossierId };
|
|
77
|
+
return this.autoPagingIterator({
|
|
78
|
+
method: "GET",
|
|
79
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/suivi_administratif"),
|
|
80
|
+
headers: {},
|
|
81
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
82
|
+
body: {},
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Récupération de la liste des tags d'un dossier.
|
|
87
|
+
* @param dossierId ID du dossier
|
|
88
|
+
* @param page Numéro de page
|
|
89
|
+
* @param perPage Nombre de résultats demandé
|
|
90
|
+
*/
|
|
91
|
+
paginateTags(dossierId, page, perPage) {
|
|
92
|
+
const pathVariable = { dossier_id: dossierId };
|
|
93
|
+
return this.request({
|
|
94
|
+
method: "GET",
|
|
95
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/tags"),
|
|
96
|
+
headers: {},
|
|
97
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
98
|
+
body: {},
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Récupération de la liste des tags d'un dossier.
|
|
103
|
+
* @param dossierId ID du dossier
|
|
104
|
+
* @param page Numéro de page
|
|
105
|
+
* @param perPage Nombre de résultats demandé
|
|
106
|
+
*/
|
|
107
|
+
paginateTagsIterator(dossierId, page, perPage) {
|
|
108
|
+
const pathVariable = { dossier_id: dossierId };
|
|
109
|
+
return this.autoPagingIterator({
|
|
110
|
+
method: "GET",
|
|
111
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/tags"),
|
|
112
|
+
headers: {},
|
|
113
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
114
|
+
body: {},
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Liste des documents liés à un workflow.
|
|
119
|
+
* @param dossierId
|
|
120
|
+
* @param workflowId
|
|
121
|
+
* @param page Numéro de page
|
|
122
|
+
* @param perPage Nombre de résultats demandé
|
|
123
|
+
*/
|
|
124
|
+
paginateWorkflowDocuments(dossierId, workflowId, page, perPage) {
|
|
125
|
+
const pathVariable = { dossier_id: dossierId, workflow_id: workflowId };
|
|
126
|
+
return this.request({
|
|
127
|
+
method: "GET",
|
|
128
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/workflows/{workflow_id}/documents"),
|
|
129
|
+
headers: {},
|
|
130
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
131
|
+
body: {},
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Liste des documents liés à un workflow.
|
|
136
|
+
* @param dossierId
|
|
137
|
+
* @param workflowId
|
|
138
|
+
* @param page Numéro de page
|
|
139
|
+
* @param perPage Nombre de résultats demandé
|
|
140
|
+
*/
|
|
141
|
+
paginateWorkflowDocumentsIterator(dossierId, workflowId, page, perPage) {
|
|
142
|
+
const pathVariable = { dossier_id: dossierId, workflow_id: workflowId };
|
|
143
|
+
return this.autoPagingIterator({
|
|
144
|
+
method: "GET",
|
|
145
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/workflows/{workflow_id}/documents"),
|
|
146
|
+
headers: {},
|
|
147
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
148
|
+
body: {},
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Récupération de la liste des workflows d'un dossier.
|
|
153
|
+
* @param dossierId ID du dossier
|
|
154
|
+
* @param page Numéro de page
|
|
155
|
+
* @param perPage Nombre de résultats demandé
|
|
156
|
+
*/
|
|
157
|
+
paginateWorkflows(dossierId, page, perPage) {
|
|
158
|
+
const pathVariable = { dossier_id: dossierId };
|
|
159
|
+
return this.request({
|
|
160
|
+
method: "GET",
|
|
161
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/workflows"),
|
|
162
|
+
headers: {},
|
|
163
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
164
|
+
body: {},
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Récupération de la liste des workflows d'un dossier.
|
|
169
|
+
* @param dossierId ID du dossier
|
|
170
|
+
* @param page Numéro de page
|
|
171
|
+
* @param perPage Nombre de résultats demandé
|
|
172
|
+
*/
|
|
173
|
+
paginateWorkflowsIterator(dossierId, page, perPage) {
|
|
174
|
+
const pathVariable = { dossier_id: dossierId };
|
|
175
|
+
return this.autoPagingIterator({
|
|
176
|
+
method: "GET",
|
|
177
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/workflows"),
|
|
178
|
+
headers: {},
|
|
179
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
180
|
+
body: {},
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
async patchDossier(dossierId, dossier) {
|
|
184
|
+
const pathVariable = { dossier_id: dossierId };
|
|
185
|
+
return this.request({
|
|
186
|
+
method: "PATCH",
|
|
187
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}"),
|
|
188
|
+
headers: {},
|
|
189
|
+
params: {},
|
|
190
|
+
body: {
|
|
191
|
+
id: dossier?.id,
|
|
192
|
+
type: dossier?.type,
|
|
193
|
+
description: dossier?.description,
|
|
194
|
+
date_de_creation: dossier?.date_de_creation,
|
|
195
|
+
createur: dossier?.createur,
|
|
196
|
+
application_utilisee: dossier?.application_utilisee,
|
|
197
|
+
statut: dossier?.statut,
|
|
198
|
+
},
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
async postDossier(postDossierRequest) {
|
|
202
|
+
const pathVariable = {};
|
|
203
|
+
return this.request({
|
|
204
|
+
method: "POST",
|
|
205
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/"),
|
|
206
|
+
headers: {},
|
|
207
|
+
params: {},
|
|
208
|
+
body: {
|
|
209
|
+
titre: postDossierRequest?.titre,
|
|
210
|
+
description: postDossierRequest?.description,
|
|
211
|
+
workflows: postDossierRequest?.workflows,
|
|
212
|
+
},
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
exports.DossiersAPI = DossiersAPI;
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
deleteNotification(notificationId: string): Promise<AxiosResponse<void>>;
|
|
9
|
+
getNotification(notificationId: string): Promise<AxiosResponse<Notification>>;
|
|
10
|
+
/**
|
|
11
|
+
* Récupération des détails de toutes les notifications existantes.
|
|
12
|
+
* @param page Numéro de page
|
|
13
|
+
* @param perPage Nombre de résultats demandé
|
|
14
|
+
*/
|
|
15
|
+
paginateNotifications(page?: number, perPage?: number): Promise<AxiosResponse<PaginateNotifications200Response>>;
|
|
16
|
+
/**
|
|
17
|
+
* Récupération des détails de toutes les notifications existantes.
|
|
18
|
+
* @param page Numéro de page
|
|
19
|
+
* @param perPage Nombre de résultats demandé
|
|
20
|
+
*/
|
|
21
|
+
paginateNotificationsIterator(page?: number, perPage?: number): AsyncGenerator<PaginateNotifications200Response>;
|
|
22
|
+
postNotification(postNotificationRequest?: PostNotificationRequest): Promise<AxiosResponse<Notification>>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
async deleteNotification(notificationId) {
|
|
14
|
+
const pathVariable = { notification_id: notificationId };
|
|
15
|
+
return this.request({
|
|
16
|
+
method: "DELETE",
|
|
17
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/notifications/{notification_id}"),
|
|
18
|
+
headers: {},
|
|
19
|
+
params: {},
|
|
20
|
+
body: {},
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
async getNotification(notificationId) {
|
|
24
|
+
const pathVariable = { notification_id: notificationId };
|
|
25
|
+
return this.request({
|
|
26
|
+
method: "GET",
|
|
27
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/notifications/{notification_id}"),
|
|
28
|
+
headers: {},
|
|
29
|
+
params: {},
|
|
30
|
+
body: {},
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Récupération des détails de toutes les notifications existantes.
|
|
35
|
+
* @param page Numéro de page
|
|
36
|
+
* @param perPage Nombre de résultats demandé
|
|
37
|
+
*/
|
|
38
|
+
paginateNotifications(page, perPage) {
|
|
39
|
+
const pathVariable = {};
|
|
40
|
+
return this.request({
|
|
41
|
+
method: "GET",
|
|
42
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/notifications/"),
|
|
43
|
+
headers: {},
|
|
44
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
45
|
+
body: {},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Récupération des détails de toutes les notifications existantes.
|
|
50
|
+
* @param page Numéro de page
|
|
51
|
+
* @param perPage Nombre de résultats demandé
|
|
52
|
+
*/
|
|
53
|
+
paginateNotificationsIterator(page, perPage) {
|
|
54
|
+
const pathVariable = {};
|
|
55
|
+
return this.autoPagingIterator({
|
|
56
|
+
method: "GET",
|
|
57
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/notifications/"),
|
|
58
|
+
headers: {},
|
|
59
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
60
|
+
body: {},
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
async postNotification(postNotificationRequest) {
|
|
64
|
+
const pathVariable = {};
|
|
65
|
+
return this.request({
|
|
66
|
+
method: "POST",
|
|
67
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/notifications/"),
|
|
68
|
+
headers: {},
|
|
69
|
+
params: {},
|
|
70
|
+
body: {
|
|
71
|
+
title: postNotificationRequest?.title,
|
|
72
|
+
message: postNotificationRequest?.message,
|
|
73
|
+
contexte: postNotificationRequest?.contexte,
|
|
74
|
+
utilisateur_id: postNotificationRequest?.utilisateur_id,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.NotificationsAPI = NotificationsAPI;
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
getOrganisation(orgId: string): Promise<AxiosResponse<Organisation>>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
async getOrganisation(orgId) {
|
|
14
|
+
const pathVariable = { 'org_id': orgId };
|
|
15
|
+
return this.request({
|
|
16
|
+
method: 'GET',
|
|
17
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/organisations/{org_id}'),
|
|
18
|
+
headers: {},
|
|
19
|
+
params: {},
|
|
20
|
+
body: {}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.OrganisationAPI = OrganisationAPI;
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
getPoi(poiId: string): Promise<AxiosResponse<POI>>;
|
|
12
|
+
/**
|
|
13
|
+
* Récupération de la liste des contacts d'un POI.
|
|
14
|
+
* @param poiId ID du POI
|
|
15
|
+
* @param page Numéro de page
|
|
16
|
+
* @param perPage Nombre de résultats demandé
|
|
17
|
+
*/
|
|
18
|
+
paginateContacts(poiId: string, page?: number, perPage?: number): Promise<AxiosResponse<PaginateContacts200Response>>;
|
|
19
|
+
/**
|
|
20
|
+
* Récupération de la liste des contacts d'un POI.
|
|
21
|
+
* @param poiId ID du POI
|
|
22
|
+
* @param page Numéro de page
|
|
23
|
+
* @param perPage Nombre de résultats demandé
|
|
24
|
+
*/
|
|
25
|
+
paginateContactsIterator(poiId: string, page?: number, perPage?: number): AsyncGenerator<PaginateContacts200Response>;
|
|
26
|
+
/**
|
|
27
|
+
* Récupération de l'historique d'un POI.
|
|
28
|
+
* @param poiId ID du POI
|
|
29
|
+
* @param page Numéro de page
|
|
30
|
+
* @param perPage Nombre de résultats demandé
|
|
31
|
+
*/
|
|
32
|
+
paginateHistorique(poiId: string, page?: number, perPage?: number): Promise<AxiosResponse<PaginateHistorique200Response>>;
|
|
33
|
+
/**
|
|
34
|
+
* Récupération de l'historique d'un POI.
|
|
35
|
+
* @param poiId ID du POI
|
|
36
|
+
* @param page Numéro de page
|
|
37
|
+
* @param perPage Nombre de résultats demandé
|
|
38
|
+
*/
|
|
39
|
+
paginateHistoriqueIterator(poiId: string, page?: number, perPage?: number): AsyncGenerator<PaginateHistorique200Response>;
|
|
40
|
+
/**
|
|
41
|
+
* Récupération de la liste des pièces jointes d'un POI.
|
|
42
|
+
* @param poiId ID du POI
|
|
43
|
+
* @param page Numéro de page
|
|
44
|
+
* @param perPage Nombre de résultats demandé
|
|
45
|
+
*/
|
|
46
|
+
paginatePiecesJointes(poiId: string, page?: number, perPage?: number): Promise<AxiosResponse<PaginatePiecesJointes200Response>>;
|
|
47
|
+
/**
|
|
48
|
+
* Récupération de la liste des pièces jointes d'un POI.
|
|
49
|
+
* @param poiId ID du POI
|
|
50
|
+
* @param page Numéro de page
|
|
51
|
+
* @param perPage Nombre de résultats demandé
|
|
52
|
+
*/
|
|
53
|
+
paginatePiecesJointesIterator(poiId: string, page?: number, perPage?: number): AsyncGenerator<PaginatePiecesJointes200Response>;
|
|
54
|
+
/**
|
|
55
|
+
* Récupération de la liste des POI selon des critères de recherche.
|
|
56
|
+
* @param page Numéro de page
|
|
57
|
+
* @param perPage Nombre de résultats demandé
|
|
58
|
+
*/
|
|
59
|
+
paginatePoi(page?: number, perPage?: number): Promise<AxiosResponse<PaginatePoi200Response>>;
|
|
60
|
+
/**
|
|
61
|
+
* Récupération de la liste des POI selon des critères de recherche.
|
|
62
|
+
* @param page Numéro de page
|
|
63
|
+
* @param perPage Nombre de résultats demandé
|
|
64
|
+
*/
|
|
65
|
+
paginatePoiIterator(page?: number, perPage?: number): AsyncGenerator<PaginatePoi200Response>;
|
|
66
|
+
patchPoi(poiId: string, patchPoiRequest?: PatchPoiRequest): Promise<AxiosResponse<POI>>;
|
|
67
|
+
}
|