@metarisc/metarisc-js 0.0.1-alpha.15 → 0.0.1-alpha.16
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 +7 -2
- package/lib/api/DossiersAPI.d.ts +28 -45
- package/lib/api/DossiersAPI.js +61 -135
- package/lib/api/EvenementsAPI.d.ts +18 -19
- package/lib/api/EvenementsAPI.js +35 -78
- package/lib/api/NotificationsAPI.d.ts +16 -9
- package/lib/api/NotificationsAPI.js +28 -36
- package/lib/api/OrganisationAPI.d.ts +8 -9
- package/lib/api/OrganisationAPI.js +15 -26
- package/lib/api/POIAPI.d.ts +17 -34
- package/lib/api/POIAPI.js +40 -94
- package/lib/api/PingAPI.d.ts +7 -3
- package/lib/api/PingAPI.js +5 -2
- package/lib/api/SupportAPI.d.ts +12 -9
- package/lib/api/SupportAPI.js +20 -30
- package/lib/api/UtilisateursAPI.d.ts +11 -15
- package/lib/api/UtilisateursAPI.js +24 -48
- package/lib/auth/oauth2.d.ts +19 -0
- package/lib/auth/oauth2.js +25 -0
- package/lib/client.d.ts +29 -0
- package/lib/client.js +74 -0
- package/lib/collection.d.ts +41 -0
- package/lib/collection.js +52 -0
- package/lib/core.d.ts +29 -6
- package/lib/core.js +15 -32
- package/lib/index.d.ts +14 -8
- package/lib/index.js +12 -2
- package/lib/metarisc.d.ts +12 -9
- package/lib/metarisc.js +25 -21
- package/lib/model/Dossier.d.ts +5 -1
- package/lib/model/Dossier.js +6 -0
- package/lib/tus.d.ts +7 -0
- package/lib/tus.js +43 -0
- package/package.json +8 -4
- package/src/api/DossiersAPI.ts +169 -305
- package/src/api/EvenementsAPI.ts +96 -163
- package/src/api/NotificationsAPI.ts +73 -96
- package/src/api/OrganisationAPI.ts +40 -53
- package/src/api/POIAPI.ts +116 -198
- package/src/api/PingAPI.ts +8 -4
- package/src/api/SupportAPI.ts +57 -70
- package/src/api/UtilisateursAPI.ts +73 -101
- package/src/auth/oauth2.ts +28 -0
- package/src/client.ts +104 -0
- package/src/collection.ts +83 -0
- package/src/core.ts +52 -58
- package/src/index.ts +15 -8
- package/src/metarisc.ts +81 -55
- package/src/model/DescriptifTechnique.ts +4 -4
- package/src/model/DescriptifTechniquePENA.ts +3 -1
- package/src/model/DescriptifTechniquePIBI.ts +2 -1
- package/src/model/Dossier.ts +6 -1
- package/src/tus.ts +44 -0
- package/lib/model/PaginateContacts200Response.d.ts +0 -6
- package/lib/model/PaginateContacts200Response.js +0 -2
- package/lib/model/PaginateDossiers200Response.d.ts +0 -6
- package/lib/model/PaginateDossiers200Response.js +0 -2
- package/lib/model/PaginateDossiers200ResponseMeta.d.ts +0 -4
- package/lib/model/PaginateDossiers200ResponseMeta.js +0 -2
- package/lib/model/PaginateEvenementUtilisateurs200Response.d.ts +0 -6
- package/lib/model/PaginateEvenementUtilisateurs200Response.js +0 -2
- package/lib/model/PaginateEvenements200Response.d.ts +0 -6
- package/lib/model/PaginateEvenements200Response.js +0 -2
- package/lib/model/PaginateEvenements200ResponseMeta.d.ts +0 -4
- package/lib/model/PaginateEvenements200ResponseMeta.js +0 -2
- package/lib/model/PaginateHistorique200Response.d.ts +0 -6
- package/lib/model/PaginateHistorique200Response.js +0 -2
- package/lib/model/PaginateMoiEmails200Response.d.ts +0 -6
- package/lib/model/PaginateMoiEmails200Response.js +0 -2
- package/lib/model/PaginateMoiEmails200ResponseMeta.d.ts +0 -4
- package/lib/model/PaginateMoiEmails200ResponseMeta.js +0 -2
- package/lib/model/PaginateMoiEmails200ResponseMetaPagination.d.ts +0 -7
- package/lib/model/PaginateMoiEmails200ResponseMetaPagination.js +0 -2
- package/lib/model/PaginateNotifications200Response.d.ts +0 -6
- package/lib/model/PaginateNotifications200Response.js +0 -2
- package/lib/model/PaginateOrganisations200Response.d.ts +0 -6
- package/lib/model/PaginateOrganisations200Response.js +0 -2
- package/lib/model/PaginateOrganisations200ResponseMeta.d.ts +0 -4
- package/lib/model/PaginateOrganisations200ResponseMeta.js +0 -2
- package/lib/model/PaginatePiecesJointes200Response.d.ts +0 -6
- package/lib/model/PaginatePiecesJointes200Response.js +0 -2
- package/lib/model/PaginatePoi200Response.d.ts +0 -6
- package/lib/model/PaginatePoi200Response.js +0 -2
- package/lib/model/PaginatePoi200ResponseMeta.d.ts +0 -4
- package/lib/model/PaginatePoi200ResponseMeta.js +0 -2
- package/lib/model/PaginateSuiviAdministratif200Response.d.ts +0 -6
- package/lib/model/PaginateSuiviAdministratif200Response.js +0 -2
- package/lib/model/PaginateTags200Response.d.ts +0 -6
- package/lib/model/PaginateTags200Response.js +0 -2
- package/lib/model/PaginateTickets200Response.d.ts +0 -6
- package/lib/model/PaginateTickets200Response.js +0 -2
- package/lib/model/PaginateTickets200ResponseMeta.d.ts +0 -4
- package/lib/model/PaginateTickets200ResponseMeta.js +0 -2
- package/lib/model/PaginateWorkflowDocuments200Response.d.ts +0 -6
- package/lib/model/PaginateWorkflowDocuments200Response.js +0 -2
- package/lib/model/PaginateWorkflows200Response.d.ts +0 -6
- package/lib/model/PaginateWorkflows200Response.js +0 -2
- package/lib/model/PaginationMetadata1.d.ts +0 -7
- package/lib/model/PaginationMetadata1.js +0 -2
- package/lib/model/PaginationMetadata2.d.ts +0 -7
- package/lib/model/PaginationMetadata2.js +0 -2
- package/lib/model/PaginationMetadata3.d.ts +0 -7
- package/lib/model/PaginationMetadata3.js +0 -2
- package/lib/model/PaginationMetadata4.d.ts +0 -7
- package/lib/model/PaginationMetadata4.js +0 -2
- package/lib/oauth2.d.ts +0 -13
- package/lib/oauth2.js +0 -14
- package/src/model/PaginateContacts200Response.ts +0 -7
- package/src/model/PaginateDossiers200Response.ts +0 -7
- package/src/model/PaginateDossiers200ResponseMeta.ts +0 -5
- package/src/model/PaginateEvenementUtilisateurs200Response.ts +0 -7
- package/src/model/PaginateEvenements200Response.ts +0 -7
- package/src/model/PaginateEvenements200ResponseMeta.ts +0 -5
- package/src/model/PaginateHistorique200Response.ts +0 -7
- package/src/model/PaginateMoiEmails200Response.ts +0 -7
- package/src/model/PaginateMoiEmails200ResponseMeta.ts +0 -5
- package/src/model/PaginateMoiEmails200ResponseMetaPagination.ts +0 -7
- package/src/model/PaginateNotifications200Response.ts +0 -7
- package/src/model/PaginateOrganisations200Response.ts +0 -7
- package/src/model/PaginateOrganisations200ResponseMeta.ts +0 -5
- package/src/model/PaginatePiecesJointes200Response.ts +0 -7
- package/src/model/PaginatePoi200Response.ts +0 -7
- package/src/model/PaginatePoi200ResponseMeta.ts +0 -5
- package/src/model/PaginateSuiviAdministratif200Response.ts +0 -7
- package/src/model/PaginateTags200Response.ts +0 -7
- package/src/model/PaginateTickets200Response.ts +0 -7
- package/src/model/PaginateTickets200ResponseMeta.ts +0 -5
- package/src/model/PaginateWorkflowDocuments200Response.ts +0 -7
- package/src/model/PaginateWorkflows200Response.ts +0 -7
- package/src/model/PaginationMetadata1.ts +0 -7
- package/src/model/PaginationMetadata2.ts +0 -7
- package/src/model/PaginationMetadata3.ts +0 -7
- package/src/model/PaginationMetadata4.ts +0 -7
- package/src/oauth2.ts +0 -20
- package/tests/index.mjs +0 -7
package/.eslintrc
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
"root": true,
|
|
3
3
|
"parser": "@typescript-eslint/parser",
|
|
4
4
|
"plugins": [
|
|
5
|
-
"@typescript-eslint"
|
|
5
|
+
"@typescript-eslint",
|
|
6
|
+
"unused-imports",
|
|
7
|
+
"import"
|
|
6
8
|
],
|
|
7
9
|
"extends": [
|
|
8
10
|
"eslint:recommended",
|
|
@@ -10,6 +12,9 @@
|
|
|
10
12
|
"plugin:@typescript-eslint/recommended"
|
|
11
13
|
],
|
|
12
14
|
"rules": {
|
|
13
|
-
"no-
|
|
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}]
|
|
14
19
|
}
|
|
15
20
|
}
|
package/lib/api/DossiersAPI.d.ts
CHANGED
|
@@ -1,57 +1,46 @@
|
|
|
1
1
|
import { Core, MetariscConfig } from "../core";
|
|
2
2
|
import type { AxiosResponse } from "axios";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { Client } from "../client";
|
|
4
|
+
import { Collection } from "../collection";
|
|
5
|
+
import { Dossier } from '../model/Dossier';
|
|
6
|
+
import { PostDossierRequest } from '../model/PostDossierRequest';
|
|
7
|
+
import { Workflow } from '../model/Workflow';
|
|
8
|
+
import { SuiviAdministratif } from '../model/SuiviAdministratif';
|
|
9
|
+
import { Tag } from '../model/Tag';
|
|
10
|
+
import { Document } from '../model/Document';
|
|
11
11
|
export declare class DossiersAPI extends Core {
|
|
12
|
-
constructor(config: MetariscConfig);
|
|
13
|
-
getDossier(dossierId: string): Promise<AxiosResponse<Dossier>>;
|
|
14
|
-
getDossierWorkflowsWorkflow(dossierId: string, workflowId: string): Promise<AxiosResponse<Workflow>>;
|
|
12
|
+
constructor(config: MetariscConfig, client?: Client);
|
|
15
13
|
/**
|
|
16
|
-
* Récupération de
|
|
17
|
-
* @param
|
|
18
|
-
* @param perPage Nombre de résultats demandé
|
|
14
|
+
* Récupération de l'ensemble des données d'un dossier.
|
|
15
|
+
* @param dossierId ID du dossier
|
|
19
16
|
*/
|
|
20
|
-
|
|
17
|
+
getDossier(dossierId: string): Promise<AxiosResponse<Dossier>>;
|
|
21
18
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
24
|
-
* @param
|
|
19
|
+
* Rédupération des détails d'un workflow.
|
|
20
|
+
* @param dossierId
|
|
21
|
+
* @param workflowId
|
|
25
22
|
*/
|
|
26
|
-
|
|
23
|
+
getDossierWorkflowsWorkflow(dossierId: string, workflowId: string): Promise<AxiosResponse<Workflow>>;
|
|
27
24
|
/**
|
|
28
|
-
* Récupération de la liste
|
|
29
|
-
* @param dossierId ID du dossier
|
|
25
|
+
* Récupération de la liste des dossiers selon des critères de recherche.
|
|
30
26
|
* @param page Numéro de page
|
|
31
27
|
* @param perPage Nombre de résultats demandé
|
|
32
28
|
*/
|
|
33
|
-
|
|
29
|
+
paginateDossiers(page?: number, perPage?: number): Collection<Dossier>;
|
|
34
30
|
/**
|
|
35
31
|
* Récupération de la liste du suivi administratif d'un dossier.
|
|
36
32
|
* @param dossierId ID du dossier
|
|
37
33
|
* @param page Numéro de page
|
|
38
34
|
* @param perPage Nombre de résultats demandé
|
|
39
35
|
*/
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Récupération de la liste des tags d'un dossier.
|
|
43
|
-
* @param dossierId ID du dossier
|
|
44
|
-
* @param page Numéro de page
|
|
45
|
-
* @param perPage Nombre de résultats demandé
|
|
46
|
-
*/
|
|
47
|
-
paginateTags(dossierId: string, page?: number, perPage?: number): Promise<AxiosResponse<PaginateTags200Response>>;
|
|
36
|
+
paginateSuiviAdministratif(dossierId: string, page?: number, perPage?: number): Collection<SuiviAdministratif>;
|
|
48
37
|
/**
|
|
49
38
|
* Récupération de la liste des tags d'un dossier.
|
|
50
39
|
* @param dossierId ID du dossier
|
|
51
40
|
* @param page Numéro de page
|
|
52
41
|
* @param perPage Nombre de résultats demandé
|
|
53
42
|
*/
|
|
54
|
-
|
|
43
|
+
paginateTags(dossierId: string, page?: number, perPage?: number): Collection<Tag>;
|
|
55
44
|
/**
|
|
56
45
|
* Liste des documents liés à un workflow.
|
|
57
46
|
* @param dossierId
|
|
@@ -59,29 +48,23 @@ export declare class DossiersAPI extends Core {
|
|
|
59
48
|
* @param page Numéro de page
|
|
60
49
|
* @param perPage Nombre de résultats demandé
|
|
61
50
|
*/
|
|
62
|
-
paginateWorkflowDocuments(dossierId: string, workflowId: string, page?: number, perPage?: number):
|
|
63
|
-
/**
|
|
64
|
-
* Liste des documents liés à un workflow.
|
|
65
|
-
* @param dossierId
|
|
66
|
-
* @param workflowId
|
|
67
|
-
* @param page Numéro de page
|
|
68
|
-
* @param perPage Nombre de résultats demandé
|
|
69
|
-
*/
|
|
70
|
-
paginateWorkflowDocumentsIterator(dossierId: string, workflowId: string, page?: number, perPage?: number): AsyncGenerator<PaginateWorkflowDocuments200Response>;
|
|
51
|
+
paginateWorkflowDocuments(dossierId: string, workflowId: string, page?: number, perPage?: number): Collection<Document>;
|
|
71
52
|
/**
|
|
72
53
|
* Récupération de la liste des workflows d'un dossier.
|
|
73
54
|
* @param dossierId ID du dossier
|
|
74
55
|
* @param page Numéro de page
|
|
75
56
|
* @param perPage Nombre de résultats demandé
|
|
76
57
|
*/
|
|
77
|
-
paginateWorkflows(dossierId: string, page?: number, perPage?: number):
|
|
58
|
+
paginateWorkflows(dossierId: string, page?: number, perPage?: number): Collection<Workflow>;
|
|
78
59
|
/**
|
|
79
|
-
*
|
|
60
|
+
* Modification d'un dossier existant.
|
|
80
61
|
* @param dossierId ID du dossier
|
|
81
|
-
* @param
|
|
82
|
-
* @param perPage Nombre de résultats demandé
|
|
62
|
+
* @param dossier
|
|
83
63
|
*/
|
|
84
|
-
paginateWorkflowsIterator(dossierId: string, page?: number, perPage?: number): AsyncGenerator<PaginateWorkflows200Response>;
|
|
85
64
|
patchDossier(dossierId: string, dossier?: Dossier): Promise<AxiosResponse<Dossier>>;
|
|
65
|
+
/**
|
|
66
|
+
* Création d'un nouveau dossier.
|
|
67
|
+
* @param postDossierRequest
|
|
68
|
+
*/
|
|
86
69
|
postDossier(postDossierRequest?: PostDossierRequest): Promise<AxiosResponse<Dossier>>;
|
|
87
70
|
}
|
package/lib/api/DossiersAPI.js
CHANGED
|
@@ -7,27 +7,36 @@ exports.DossiersAPI = void 0;
|
|
|
7
7
|
const core_1 = require("../core");
|
|
8
8
|
const utils_1 = __importDefault(require("../utils"));
|
|
9
9
|
class DossiersAPI extends core_1.Core {
|
|
10
|
-
constructor(config) {
|
|
11
|
-
super(config);
|
|
10
|
+
constructor(config, client) {
|
|
11
|
+
super(config, client);
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Récupération de l'ensemble des données d'un dossier.
|
|
15
|
+
* @param dossierId ID du dossier
|
|
16
|
+
*/
|
|
13
17
|
async getDossier(dossierId) {
|
|
14
|
-
const pathVariable = { dossier_id: dossierId };
|
|
18
|
+
const pathVariable = { 'dossier_id': dossierId };
|
|
15
19
|
return this.request({
|
|
16
|
-
method:
|
|
17
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
20
|
+
method: 'GET',
|
|
21
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/dossiers/{dossier_id}'),
|
|
18
22
|
headers: {},
|
|
19
23
|
params: {},
|
|
20
|
-
body: {}
|
|
24
|
+
body: {}
|
|
21
25
|
});
|
|
22
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Rédupération des détails d'un workflow.
|
|
29
|
+
* @param dossierId
|
|
30
|
+
* @param workflowId
|
|
31
|
+
*/
|
|
23
32
|
async getDossierWorkflowsWorkflow(dossierId, workflowId) {
|
|
24
|
-
const pathVariable = { dossier_id: dossierId, workflow_id: workflowId };
|
|
33
|
+
const pathVariable = { 'dossier_id': dossierId, 'workflow_id': workflowId };
|
|
25
34
|
return this.request({
|
|
26
|
-
method:
|
|
27
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
35
|
+
method: 'GET',
|
|
36
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/dossiers/{dossier_id}/workflows/{workflow_id}'),
|
|
28
37
|
headers: {},
|
|
29
38
|
params: {},
|
|
30
|
-
body: {}
|
|
39
|
+
body: {}
|
|
31
40
|
});
|
|
32
41
|
}
|
|
33
42
|
/**
|
|
@@ -37,27 +46,12 @@ class DossiersAPI extends core_1.Core {
|
|
|
37
46
|
*/
|
|
38
47
|
paginateDossiers(page, perPage) {
|
|
39
48
|
const pathVariable = {};
|
|
40
|
-
return this.
|
|
41
|
-
method:
|
|
42
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
49
|
+
return this.collect({
|
|
50
|
+
method: 'GET',
|
|
51
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/dossiers/'),
|
|
43
52
|
headers: {},
|
|
44
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
45
|
-
body: {}
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Récupération de la liste des dossiers selon des critères de recherche.
|
|
50
|
-
* @param page Numéro de page
|
|
51
|
-
* @param perPage Nombre de résultats demandé
|
|
52
|
-
*/
|
|
53
|
-
paginateDossiersIterator(page, perPage) {
|
|
54
|
-
const pathVariable = {};
|
|
55
|
-
return this.autoPagingIterator({
|
|
56
|
-
method: "GET",
|
|
57
|
-
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/"),
|
|
58
|
-
headers: {},
|
|
59
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
60
|
-
body: {},
|
|
53
|
+
params: { 'page': page.toString(), 'per_page': perPage.toString() },
|
|
54
|
+
body: {}
|
|
61
55
|
});
|
|
62
56
|
}
|
|
63
57
|
/**
|
|
@@ -67,29 +61,13 @@ class DossiersAPI extends core_1.Core {
|
|
|
67
61
|
* @param perPage Nombre de résultats demandé
|
|
68
62
|
*/
|
|
69
63
|
paginateSuiviAdministratif(dossierId, page, perPage) {
|
|
70
|
-
const pathVariable = { dossier_id: dossierId };
|
|
71
|
-
return this.
|
|
72
|
-
method:
|
|
73
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
74
|
-
headers: {},
|
|
75
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
76
|
-
body: {},
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Récupération de la liste du suivi administratif d'un dossier.
|
|
81
|
-
* @param dossierId ID du dossier
|
|
82
|
-
* @param page Numéro de page
|
|
83
|
-
* @param perPage Nombre de résultats demandé
|
|
84
|
-
*/
|
|
85
|
-
paginateSuiviAdministratifIterator(dossierId, page, perPage) {
|
|
86
|
-
const pathVariable = { dossier_id: dossierId };
|
|
87
|
-
return this.autoPagingIterator({
|
|
88
|
-
method: "GET",
|
|
89
|
-
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/suivi_administratif"),
|
|
64
|
+
const pathVariable = { 'dossier_id': dossierId };
|
|
65
|
+
return this.collect({
|
|
66
|
+
method: 'GET',
|
|
67
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/dossiers/{dossier_id}/suivi_administratif'),
|
|
90
68
|
headers: {},
|
|
91
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
92
|
-
body: {}
|
|
69
|
+
params: { 'page': page.toString(), 'per_page': perPage.toString() },
|
|
70
|
+
body: {}
|
|
93
71
|
});
|
|
94
72
|
}
|
|
95
73
|
/**
|
|
@@ -99,29 +77,13 @@ class DossiersAPI extends core_1.Core {
|
|
|
99
77
|
* @param perPage Nombre de résultats demandé
|
|
100
78
|
*/
|
|
101
79
|
paginateTags(dossierId, page, perPage) {
|
|
102
|
-
const pathVariable = { dossier_id: dossierId };
|
|
103
|
-
return this.
|
|
104
|
-
method:
|
|
105
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
80
|
+
const pathVariable = { 'dossier_id': dossierId };
|
|
81
|
+
return this.collect({
|
|
82
|
+
method: 'GET',
|
|
83
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/dossiers/{dossier_id}/tags'),
|
|
106
84
|
headers: {},
|
|
107
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
108
|
-
body: {}
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Récupération de la liste des tags d'un dossier.
|
|
113
|
-
* @param dossierId ID du dossier
|
|
114
|
-
* @param page Numéro de page
|
|
115
|
-
* @param perPage Nombre de résultats demandé
|
|
116
|
-
*/
|
|
117
|
-
paginateTagsIterator(dossierId, page, perPage) {
|
|
118
|
-
const pathVariable = { dossier_id: dossierId };
|
|
119
|
-
return this.autoPagingIterator({
|
|
120
|
-
method: "GET",
|
|
121
|
-
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/tags"),
|
|
122
|
-
headers: {},
|
|
123
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
124
|
-
body: {},
|
|
85
|
+
params: { 'page': page.toString(), 'per_page': perPage.toString() },
|
|
86
|
+
body: {}
|
|
125
87
|
});
|
|
126
88
|
}
|
|
127
89
|
/**
|
|
@@ -132,30 +94,13 @@ class DossiersAPI extends core_1.Core {
|
|
|
132
94
|
* @param perPage Nombre de résultats demandé
|
|
133
95
|
*/
|
|
134
96
|
paginateWorkflowDocuments(dossierId, workflowId, page, perPage) {
|
|
135
|
-
const pathVariable = { dossier_id: dossierId, workflow_id: workflowId };
|
|
136
|
-
return this.
|
|
137
|
-
method:
|
|
138
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
139
|
-
headers: {},
|
|
140
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
141
|
-
body: {},
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Liste des documents liés à un workflow.
|
|
146
|
-
* @param dossierId
|
|
147
|
-
* @param workflowId
|
|
148
|
-
* @param page Numéro de page
|
|
149
|
-
* @param perPage Nombre de résultats demandé
|
|
150
|
-
*/
|
|
151
|
-
paginateWorkflowDocumentsIterator(dossierId, workflowId, page, perPage) {
|
|
152
|
-
const pathVariable = { dossier_id: dossierId, workflow_id: workflowId };
|
|
153
|
-
return this.autoPagingIterator({
|
|
154
|
-
method: "GET",
|
|
155
|
-
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/workflows/{workflow_id}/documents"),
|
|
97
|
+
const pathVariable = { 'dossier_id': dossierId, 'workflow_id': workflowId };
|
|
98
|
+
return this.collect({
|
|
99
|
+
method: 'GET',
|
|
100
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/dossiers/{dossier_id}/workflows/{workflow_id}/documents'),
|
|
156
101
|
headers: {},
|
|
157
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
158
|
-
body: {}
|
|
102
|
+
params: { 'page': page.toString(), 'per_page': perPage.toString() },
|
|
103
|
+
body: {}
|
|
159
104
|
});
|
|
160
105
|
}
|
|
161
106
|
/**
|
|
@@ -165,61 +110,42 @@ class DossiersAPI extends core_1.Core {
|
|
|
165
110
|
* @param perPage Nombre de résultats demandé
|
|
166
111
|
*/
|
|
167
112
|
paginateWorkflows(dossierId, page, perPage) {
|
|
168
|
-
const pathVariable = { dossier_id: dossierId };
|
|
169
|
-
return this.
|
|
170
|
-
method:
|
|
171
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
113
|
+
const pathVariable = { 'dossier_id': dossierId };
|
|
114
|
+
return this.collect({
|
|
115
|
+
method: 'GET',
|
|
116
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/dossiers/{dossier_id}/workflows'),
|
|
172
117
|
headers: {},
|
|
173
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
174
|
-
body: {}
|
|
118
|
+
params: { 'page': page.toString(), 'per_page': perPage.toString() },
|
|
119
|
+
body: {}
|
|
175
120
|
});
|
|
176
121
|
}
|
|
177
122
|
/**
|
|
178
|
-
*
|
|
123
|
+
* Modification d'un dossier existant.
|
|
179
124
|
* @param dossierId ID du dossier
|
|
180
|
-
* @param
|
|
181
|
-
* @param perPage Nombre de résultats demandé
|
|
125
|
+
* @param dossier
|
|
182
126
|
*/
|
|
183
|
-
paginateWorkflowsIterator(dossierId, page, perPage) {
|
|
184
|
-
const pathVariable = { dossier_id: dossierId };
|
|
185
|
-
return this.autoPagingIterator({
|
|
186
|
-
method: "GET",
|
|
187
|
-
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/workflows"),
|
|
188
|
-
headers: {},
|
|
189
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
190
|
-
body: {},
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
127
|
async patchDossier(dossierId, dossier) {
|
|
194
|
-
const pathVariable = { dossier_id: dossierId };
|
|
128
|
+
const pathVariable = { 'dossier_id': dossierId };
|
|
195
129
|
return this.request({
|
|
196
|
-
method:
|
|
197
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
130
|
+
method: 'PATCH',
|
|
131
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/dossiers/{dossier_id}'),
|
|
198
132
|
headers: {},
|
|
199
133
|
params: {},
|
|
200
|
-
body: {
|
|
201
|
-
id: dossier?.id,
|
|
202
|
-
type: dossier?.type,
|
|
203
|
-
description: dossier?.description,
|
|
204
|
-
date_de_creation: dossier?.date_de_creation,
|
|
205
|
-
createur: dossier?.createur,
|
|
206
|
-
application_utilisee: dossier?.application_utilisee,
|
|
207
|
-
statut: dossier?.statut,
|
|
208
|
-
},
|
|
134
|
+
body: { 'id': dossier?.id, 'type': dossier?.type, 'description': dossier?.description, 'date_de_creation': dossier?.date_de_creation, 'createur': dossier?.createur, 'application_utilisee': dossier?.application_utilisee, 'statut': dossier?.statut }
|
|
209
135
|
});
|
|
210
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Création d'un nouveau dossier.
|
|
139
|
+
* @param postDossierRequest
|
|
140
|
+
*/
|
|
211
141
|
async postDossier(postDossierRequest) {
|
|
212
142
|
const pathVariable = {};
|
|
213
143
|
return this.request({
|
|
214
|
-
method:
|
|
215
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
144
|
+
method: 'POST',
|
|
145
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/dossiers/'),
|
|
216
146
|
headers: {},
|
|
217
147
|
params: {},
|
|
218
|
-
body: {
|
|
219
|
-
titre: postDossierRequest?.titre,
|
|
220
|
-
description: postDossierRequest?.description,
|
|
221
|
-
workflows: postDossierRequest?.workflows,
|
|
222
|
-
},
|
|
148
|
+
body: { 'titre': postDossierRequest?.titre, 'description': postDossierRequest?.description, 'workflows': postDossierRequest?.workflows }
|
|
223
149
|
});
|
|
224
150
|
}
|
|
225
151
|
}
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import { Core, MetariscConfig } from "../core";
|
|
2
2
|
import type { AxiosResponse } from "axios";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { PostEvenementRequest } from
|
|
3
|
+
import { Client } from "../client";
|
|
4
|
+
import { Collection } from "../collection";
|
|
5
|
+
import { Evenement } from '../model/Evenement';
|
|
6
|
+
import { PostEvenementRequest } from '../model/PostEvenementRequest';
|
|
7
|
+
import { Utilisateur1 } from '../model/Utilisateur1';
|
|
7
8
|
export declare class EvenementsAPI extends Core {
|
|
8
|
-
constructor(config: MetariscConfig);
|
|
9
|
+
constructor(config: MetariscConfig, client?: Client);
|
|
10
|
+
/**
|
|
11
|
+
* Suppression d'un événement correspondant à l'id donné.
|
|
12
|
+
* @param evenementId ID de l'événement
|
|
13
|
+
*/
|
|
9
14
|
deleteEvenement(evenementId: string): Promise<AxiosResponse<void>>;
|
|
10
|
-
getEvenement(evenementId: string, evenement?: Evenement): Promise<AxiosResponse<Evenement>>;
|
|
11
15
|
/**
|
|
12
|
-
* Récupération
|
|
13
|
-
* @param evenementId
|
|
14
|
-
* @param
|
|
15
|
-
* @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.
|
|
16
|
+
* Récupération des détails d'un événement correspondant à l'id donné.
|
|
17
|
+
* @param evenementId ID de l'événement
|
|
18
|
+
* @param evenement
|
|
16
19
|
*/
|
|
17
|
-
|
|
20
|
+
getEvenement(evenementId: string, evenement?: Evenement): Promise<AxiosResponse<Evenement>>;
|
|
18
21
|
/**
|
|
19
22
|
* Récupération d'une liste paginée d'utilisateurs liés à un événement calendaire.
|
|
20
23
|
* @param evenementId
|
|
21
24
|
* @param page Le numéro de la page.
|
|
22
25
|
* @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.
|
|
23
26
|
*/
|
|
24
|
-
|
|
27
|
+
paginateEvenementUtilisateurs(evenementId: string, page?: number, perPage?: number): Collection<Utilisateur1>;
|
|
25
28
|
/**
|
|
26
29
|
* Récupération des détails de tous les événements calendaires existants.
|
|
27
30
|
* @param page Le numéro de la page.
|
|
@@ -29,14 +32,10 @@ export declare class EvenementsAPI extends Core {
|
|
|
29
32
|
* @param type Le type d'événement
|
|
30
33
|
* @param period la période (ISO 8601) séparée par un slash (/) pendant laquelle l'événement se déroule. Exemple 2004-12-02T23:00/2005-01-01T12:30
|
|
31
34
|
*/
|
|
32
|
-
paginateEvenements(page?: number, perPage?: number, type?: string, period?: string):
|
|
35
|
+
paginateEvenements(page?: number, perPage?: number, type?: string, period?: string): Collection<Evenement>;
|
|
33
36
|
/**
|
|
34
|
-
*
|
|
35
|
-
* @param
|
|
36
|
-
* @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.
|
|
37
|
-
* @param type Le type d'événement
|
|
38
|
-
* @param period la période (ISO 8601) séparée par un slash (/) pendant laquelle l'événement se déroule. Exemple 2004-12-02T23:00/2005-01-01T12:30
|
|
37
|
+
* Création d'un événement.
|
|
38
|
+
* @param postEvenementRequest
|
|
39
39
|
*/
|
|
40
|
-
paginateEvenementsIterator(page?: number, perPage?: number, type?: string, period?: string): AsyncGenerator<PaginateEvenements200Response>;
|
|
41
40
|
postEvenement(postEvenementRequest?: PostEvenementRequest): Promise<AxiosResponse<Evenement>>;
|
|
42
41
|
}
|
package/lib/api/EvenementsAPI.js
CHANGED
|
@@ -7,34 +7,36 @@ exports.EvenementsAPI = void 0;
|
|
|
7
7
|
const core_1 = require("../core");
|
|
8
8
|
const utils_1 = __importDefault(require("../utils"));
|
|
9
9
|
class EvenementsAPI extends core_1.Core {
|
|
10
|
-
constructor(config) {
|
|
11
|
-
super(config);
|
|
10
|
+
constructor(config, client) {
|
|
11
|
+
super(config, client);
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Suppression d'un événement correspondant à l'id donné.
|
|
15
|
+
* @param evenementId ID de l'événement
|
|
16
|
+
*/
|
|
13
17
|
async deleteEvenement(evenementId) {
|
|
14
|
-
const pathVariable = { evenement_id: evenementId };
|
|
18
|
+
const pathVariable = { 'evenement_id': evenementId };
|
|
15
19
|
return this.request({
|
|
16
|
-
method:
|
|
17
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
20
|
+
method: 'DELETE',
|
|
21
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/evenements/{evenement_id}'),
|
|
18
22
|
headers: {},
|
|
19
23
|
params: {},
|
|
20
|
-
body: {}
|
|
24
|
+
body: {}
|
|
21
25
|
});
|
|
22
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Récupération des détails d'un événement correspondant à l'id donné.
|
|
29
|
+
* @param evenementId ID de l'événement
|
|
30
|
+
* @param evenement
|
|
31
|
+
*/
|
|
23
32
|
async getEvenement(evenementId, evenement) {
|
|
24
|
-
const pathVariable = { evenement_id: evenementId };
|
|
33
|
+
const pathVariable = { 'evenement_id': evenementId };
|
|
25
34
|
return this.request({
|
|
26
|
-
method:
|
|
27
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
35
|
+
method: 'GET',
|
|
36
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/evenements/{evenement_id}'),
|
|
28
37
|
headers: {},
|
|
29
38
|
params: {},
|
|
30
|
-
body: {
|
|
31
|
-
id: evenement?.id,
|
|
32
|
-
title: evenement?.title,
|
|
33
|
-
type: evenement?.type,
|
|
34
|
-
description: evenement?.description,
|
|
35
|
-
date_debut: evenement?.date_debut,
|
|
36
|
-
date_fin: evenement?.date_fin,
|
|
37
|
-
},
|
|
39
|
+
body: { 'id': evenement?.id, 'title': evenement?.title, 'type': evenement?.type, 'description': evenement?.description, 'date_debut': evenement?.date_debut, 'date_fin': evenement?.date_fin }
|
|
38
40
|
});
|
|
39
41
|
}
|
|
40
42
|
/**
|
|
@@ -44,29 +46,13 @@ class EvenementsAPI extends core_1.Core {
|
|
|
44
46
|
* @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.
|
|
45
47
|
*/
|
|
46
48
|
paginateEvenementUtilisateurs(evenementId, page, perPage) {
|
|
47
|
-
const pathVariable = { evenement_id: evenementId };
|
|
48
|
-
return this.
|
|
49
|
-
method:
|
|
50
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
51
|
-
headers: {},
|
|
52
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
53
|
-
body: {},
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Récupération d'une liste paginée d'utilisateurs liés à un événement calendaire.
|
|
58
|
-
* @param evenementId
|
|
59
|
-
* @param page Le numéro de la page.
|
|
60
|
-
* @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.
|
|
61
|
-
*/
|
|
62
|
-
paginateEvenementUtilisateursIterator(evenementId, page, perPage) {
|
|
63
|
-
const pathVariable = { evenement_id: evenementId };
|
|
64
|
-
return this.autoPagingIterator({
|
|
65
|
-
method: "GET",
|
|
66
|
-
endpoint: utils_1.default.constructPath(pathVariable, "/evenements/{evenement_id}/utilisateurs"),
|
|
49
|
+
const pathVariable = { 'evenement_id': evenementId };
|
|
50
|
+
return this.collect({
|
|
51
|
+
method: 'GET',
|
|
52
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/evenements/{evenement_id}/utilisateurs'),
|
|
67
53
|
headers: {},
|
|
68
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
69
|
-
body: {}
|
|
54
|
+
params: { 'page': page.toString(), 'per_page': perPage.toString() },
|
|
55
|
+
body: {}
|
|
70
56
|
});
|
|
71
57
|
}
|
|
72
58
|
/**
|
|
@@ -78,55 +64,26 @@ class EvenementsAPI extends core_1.Core {
|
|
|
78
64
|
*/
|
|
79
65
|
paginateEvenements(page, perPage, type, period) {
|
|
80
66
|
const pathVariable = {};
|
|
81
|
-
return this.
|
|
82
|
-
method:
|
|
83
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
67
|
+
return this.collect({
|
|
68
|
+
method: 'GET',
|
|
69
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/evenements/'),
|
|
84
70
|
headers: {},
|
|
85
|
-
params: {
|
|
86
|
-
|
|
87
|
-
per_page: perPage.toString(),
|
|
88
|
-
type: type,
|
|
89
|
-
period: period,
|
|
90
|
-
},
|
|
91
|
-
body: {},
|
|
71
|
+
params: { 'page': page.toString(), 'per_page': perPage.toString(), 'type': type, 'period': period },
|
|
72
|
+
body: {}
|
|
92
73
|
});
|
|
93
74
|
}
|
|
94
75
|
/**
|
|
95
|
-
*
|
|
96
|
-
* @param
|
|
97
|
-
* @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.
|
|
98
|
-
* @param type Le type d'événement
|
|
99
|
-
* @param period la période (ISO 8601) séparée par un slash (/) pendant laquelle l'événement se déroule. Exemple 2004-12-02T23:00/2005-01-01T12:30
|
|
76
|
+
* Création d'un événement.
|
|
77
|
+
* @param postEvenementRequest
|
|
100
78
|
*/
|
|
101
|
-
paginateEvenementsIterator(page, perPage, type, period) {
|
|
102
|
-
const pathVariable = {};
|
|
103
|
-
return this.autoPagingIterator({
|
|
104
|
-
method: "GET",
|
|
105
|
-
endpoint: utils_1.default.constructPath(pathVariable, "/evenements/"),
|
|
106
|
-
headers: {},
|
|
107
|
-
params: {
|
|
108
|
-
page: page.toString(),
|
|
109
|
-
per_page: perPage.toString(),
|
|
110
|
-
type: type,
|
|
111
|
-
period: period,
|
|
112
|
-
},
|
|
113
|
-
body: {},
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
79
|
async postEvenement(postEvenementRequest) {
|
|
117
80
|
const pathVariable = {};
|
|
118
81
|
return this.request({
|
|
119
|
-
method:
|
|
120
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
82
|
+
method: 'POST',
|
|
83
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/evenements/'),
|
|
121
84
|
headers: {},
|
|
122
85
|
params: {},
|
|
123
|
-
body: {
|
|
124
|
-
title: postEvenementRequest?.title,
|
|
125
|
-
type: postEvenementRequest?.type,
|
|
126
|
-
description: postEvenementRequest?.description,
|
|
127
|
-
date_debut: postEvenementRequest?.date_debut,
|
|
128
|
-
date_fin: postEvenementRequest?.date_fin,
|
|
129
|
-
},
|
|
86
|
+
body: { 'title': postEvenementRequest?.title, 'type': postEvenementRequest?.type, 'description': postEvenementRequest?.description, 'date_debut': postEvenementRequest?.date_debut, 'date_fin': postEvenementRequest?.date_fin }
|
|
130
87
|
});
|
|
131
88
|
}
|
|
132
89
|
}
|