@metarisc/metarisc-js 0.0.1-alpha.14 → 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 -43
- package/lib/api/DossiersAPI.js +62 -126
- 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 +15 -3
- package/lib/api/OrganisationAPI.js +21 -2
- 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/model/WorkflowBase.d.ts +1 -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 -287
- package/src/api/EvenementsAPI.ts +96 -163
- package/src/api/NotificationsAPI.ts +73 -96
- package/src/api/OrganisationAPI.ts +27 -4
- 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/model/WorkflowBase.ts +1 -0
- 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/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/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/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/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,63 +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 {
|
|
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';
|
|
10
11
|
export declare class DossiersAPI extends Core {
|
|
11
|
-
constructor(config: MetariscConfig);
|
|
12
|
-
getDossier(dossierId: string): Promise<AxiosResponse<Dossier>>;
|
|
12
|
+
constructor(config: MetariscConfig, client?: Client);
|
|
13
13
|
/**
|
|
14
|
-
* Récupération de
|
|
15
|
-
* @param
|
|
16
|
-
* @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
|
|
17
16
|
*/
|
|
18
|
-
|
|
17
|
+
getDossier(dossierId: string): Promise<AxiosResponse<Dossier>>;
|
|
19
18
|
/**
|
|
20
|
-
*
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
19
|
+
* Rédupération des détails d'un workflow.
|
|
20
|
+
* @param dossierId
|
|
21
|
+
* @param workflowId
|
|
23
22
|
*/
|
|
24
|
-
|
|
23
|
+
getDossierWorkflowsWorkflow(dossierId: string, workflowId: string): Promise<AxiosResponse<Workflow>>;
|
|
25
24
|
/**
|
|
26
|
-
* Récupération de la liste
|
|
27
|
-
* @param dossierId ID du dossier
|
|
25
|
+
* Récupération de la liste des dossiers selon des critères de recherche.
|
|
28
26
|
* @param page Numéro de page
|
|
29
27
|
* @param perPage Nombre de résultats demandé
|
|
30
28
|
*/
|
|
31
|
-
|
|
29
|
+
paginateDossiers(page?: number, perPage?: number): Collection<Dossier>;
|
|
32
30
|
/**
|
|
33
31
|
* Récupération de la liste du suivi administratif d'un dossier.
|
|
34
32
|
* @param dossierId ID du dossier
|
|
35
33
|
* @param page Numéro de page
|
|
36
34
|
* @param perPage Nombre de résultats demandé
|
|
37
35
|
*/
|
|
38
|
-
|
|
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>>;
|
|
36
|
+
paginateSuiviAdministratif(dossierId: string, page?: number, perPage?: number): Collection<SuiviAdministratif>;
|
|
46
37
|
/**
|
|
47
38
|
* Récupération de la liste des tags d'un dossier.
|
|
48
39
|
* @param dossierId ID du dossier
|
|
49
40
|
* @param page Numéro de page
|
|
50
41
|
* @param perPage Nombre de résultats demandé
|
|
51
42
|
*/
|
|
52
|
-
|
|
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>>;
|
|
43
|
+
paginateTags(dossierId: string, page?: number, perPage?: number): Collection<Tag>;
|
|
61
44
|
/**
|
|
62
45
|
* Liste des documents liés à un workflow.
|
|
63
46
|
* @param dossierId
|
|
@@ -65,21 +48,23 @@ export declare class DossiersAPI extends Core {
|
|
|
65
48
|
* @param page Numéro de page
|
|
66
49
|
* @param perPage Nombre de résultats demandé
|
|
67
50
|
*/
|
|
68
|
-
|
|
51
|
+
paginateWorkflowDocuments(dossierId: string, workflowId: string, page?: number, perPage?: number): Collection<Document>;
|
|
69
52
|
/**
|
|
70
53
|
* Récupération de la liste des workflows d'un dossier.
|
|
71
54
|
* @param dossierId ID du dossier
|
|
72
55
|
* @param page Numéro de page
|
|
73
56
|
* @param perPage Nombre de résultats demandé
|
|
74
57
|
*/
|
|
75
|
-
paginateWorkflows(dossierId: string, page?: number, perPage?: number):
|
|
58
|
+
paginateWorkflows(dossierId: string, page?: number, perPage?: number): Collection<Workflow>;
|
|
76
59
|
/**
|
|
77
|
-
*
|
|
60
|
+
* Modification d'un dossier existant.
|
|
78
61
|
* @param dossierId ID du dossier
|
|
79
|
-
* @param
|
|
80
|
-
* @param perPage Nombre de résultats demandé
|
|
62
|
+
* @param dossier
|
|
81
63
|
*/
|
|
82
|
-
paginateWorkflowsIterator(dossierId: string, page?: number, perPage?: number): AsyncGenerator<PaginateWorkflows200Response>;
|
|
83
64
|
patchDossier(dossierId: string, dossier?: Dossier): Promise<AxiosResponse<Dossier>>;
|
|
65
|
+
/**
|
|
66
|
+
* Création d'un nouveau dossier.
|
|
67
|
+
* @param postDossierRequest
|
|
68
|
+
*/
|
|
84
69
|
postDossier(postDossierRequest?: PostDossierRequest): Promise<AxiosResponse<Dossier>>;
|
|
85
70
|
}
|
package/lib/api/DossiersAPI.js
CHANGED
|
@@ -7,32 +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
|
}
|
|
23
27
|
/**
|
|
24
|
-
*
|
|
25
|
-
* @param
|
|
26
|
-
* @param
|
|
28
|
+
* Rédupération des détails d'un workflow.
|
|
29
|
+
* @param dossierId
|
|
30
|
+
* @param workflowId
|
|
27
31
|
*/
|
|
28
|
-
|
|
29
|
-
const pathVariable = {};
|
|
32
|
+
async getDossierWorkflowsWorkflow(dossierId, workflowId) {
|
|
33
|
+
const pathVariable = { 'dossier_id': dossierId, 'workflow_id': workflowId };
|
|
30
34
|
return this.request({
|
|
31
|
-
method:
|
|
32
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
35
|
+
method: 'GET',
|
|
36
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/dossiers/{dossier_id}/workflows/{workflow_id}'),
|
|
33
37
|
headers: {},
|
|
34
|
-
params: {
|
|
35
|
-
body: {}
|
|
38
|
+
params: {},
|
|
39
|
+
body: {}
|
|
36
40
|
});
|
|
37
41
|
}
|
|
38
42
|
/**
|
|
@@ -40,14 +44,14 @@ class DossiersAPI extends core_1.Core {
|
|
|
40
44
|
* @param page Numéro de page
|
|
41
45
|
* @param perPage Nombre de résultats demandé
|
|
42
46
|
*/
|
|
43
|
-
|
|
47
|
+
paginateDossiers(page, perPage) {
|
|
44
48
|
const pathVariable = {};
|
|
45
|
-
return this.
|
|
46
|
-
method:
|
|
47
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
49
|
+
return this.collect({
|
|
50
|
+
method: 'GET',
|
|
51
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/dossiers/'),
|
|
48
52
|
headers: {},
|
|
49
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
50
|
-
body: {}
|
|
53
|
+
params: { 'page': page.toString(), 'per_page': perPage.toString() },
|
|
54
|
+
body: {}
|
|
51
55
|
});
|
|
52
56
|
}
|
|
53
57
|
/**
|
|
@@ -57,29 +61,13 @@ class DossiersAPI extends core_1.Core {
|
|
|
57
61
|
* @param perPage Nombre de résultats demandé
|
|
58
62
|
*/
|
|
59
63
|
paginateSuiviAdministratif(dossierId, page, perPage) {
|
|
60
|
-
const pathVariable = { dossier_id: dossierId };
|
|
61
|
-
return this.
|
|
62
|
-
method:
|
|
63
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
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'),
|
|
64
68
|
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: {},
|
|
69
|
+
params: { 'page': page.toString(), 'per_page': perPage.toString() },
|
|
70
|
+
body: {}
|
|
83
71
|
});
|
|
84
72
|
}
|
|
85
73
|
/**
|
|
@@ -89,29 +77,13 @@ class DossiersAPI extends core_1.Core {
|
|
|
89
77
|
* @param perPage Nombre de résultats demandé
|
|
90
78
|
*/
|
|
91
79
|
paginateTags(dossierId, page, perPage) {
|
|
92
|
-
const pathVariable = { dossier_id: dossierId };
|
|
93
|
-
return this.
|
|
94
|
-
method:
|
|
95
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
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"),
|
|
80
|
+
const pathVariable = { 'dossier_id': dossierId };
|
|
81
|
+
return this.collect({
|
|
82
|
+
method: 'GET',
|
|
83
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/dossiers/{dossier_id}/tags'),
|
|
112
84
|
headers: {},
|
|
113
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
114
|
-
body: {}
|
|
85
|
+
params: { 'page': page.toString(), 'per_page': perPage.toString() },
|
|
86
|
+
body: {}
|
|
115
87
|
});
|
|
116
88
|
}
|
|
117
89
|
/**
|
|
@@ -122,30 +94,13 @@ class DossiersAPI extends core_1.Core {
|
|
|
122
94
|
* @param perPage Nombre de résultats demandé
|
|
123
95
|
*/
|
|
124
96
|
paginateWorkflowDocuments(dossierId, workflowId, page, perPage) {
|
|
125
|
-
const pathVariable = { dossier_id: dossierId, workflow_id: workflowId };
|
|
126
|
-
return this.
|
|
127
|
-
method:
|
|
128
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
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"),
|
|
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'),
|
|
146
101
|
headers: {},
|
|
147
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
148
|
-
body: {}
|
|
102
|
+
params: { 'page': page.toString(), 'per_page': perPage.toString() },
|
|
103
|
+
body: {}
|
|
149
104
|
});
|
|
150
105
|
}
|
|
151
106
|
/**
|
|
@@ -155,61 +110,42 @@ class DossiersAPI extends core_1.Core {
|
|
|
155
110
|
* @param perPage Nombre de résultats demandé
|
|
156
111
|
*/
|
|
157
112
|
paginateWorkflows(dossierId, page, perPage) {
|
|
158
|
-
const pathVariable = { dossier_id: dossierId };
|
|
159
|
-
return this.
|
|
160
|
-
method:
|
|
161
|
-
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'),
|
|
162
117
|
headers: {},
|
|
163
|
-
params: { page: page.toString(), per_page: perPage.toString() },
|
|
164
|
-
body: {}
|
|
118
|
+
params: { 'page': page.toString(), 'per_page': perPage.toString() },
|
|
119
|
+
body: {}
|
|
165
120
|
});
|
|
166
121
|
}
|
|
167
122
|
/**
|
|
168
|
-
*
|
|
123
|
+
* Modification d'un dossier existant.
|
|
169
124
|
* @param dossierId ID du dossier
|
|
170
|
-
* @param
|
|
171
|
-
* @param perPage Nombre de résultats demandé
|
|
125
|
+
* @param dossier
|
|
172
126
|
*/
|
|
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
127
|
async patchDossier(dossierId, dossier) {
|
|
184
|
-
const pathVariable = { dossier_id: dossierId };
|
|
128
|
+
const pathVariable = { 'dossier_id': dossierId };
|
|
185
129
|
return this.request({
|
|
186
|
-
method:
|
|
187
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
130
|
+
method: 'PATCH',
|
|
131
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/dossiers/{dossier_id}'),
|
|
188
132
|
headers: {},
|
|
189
133
|
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
|
-
},
|
|
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 }
|
|
199
135
|
});
|
|
200
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Création d'un nouveau dossier.
|
|
139
|
+
* @param postDossierRequest
|
|
140
|
+
*/
|
|
201
141
|
async postDossier(postDossierRequest) {
|
|
202
142
|
const pathVariable = {};
|
|
203
143
|
return this.request({
|
|
204
|
-
method:
|
|
205
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
144
|
+
method: 'POST',
|
|
145
|
+
endpoint: utils_1.default.constructPath(pathVariable, '/dossiers/'),
|
|
206
146
|
headers: {},
|
|
207
147
|
params: {},
|
|
208
|
-
body: {
|
|
209
|
-
titre: postDossierRequest?.titre,
|
|
210
|
-
description: postDossierRequest?.description,
|
|
211
|
-
workflows: postDossierRequest?.workflows,
|
|
212
|
-
},
|
|
148
|
+
body: { 'titre': postDossierRequest?.titre, 'description': postDossierRequest?.description, 'workflows': postDossierRequest?.workflows }
|
|
213
149
|
});
|
|
214
150
|
}
|
|
215
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
|
}
|