@metarisc/metarisc-js 0.0.1-alpha.20 → 0.0.1-alpha.21
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/lib/api/DossiersAPI.d.ts +20 -28
- package/lib/api/DossiersAPI.js +32 -48
- package/lib/api/EvenementsAPI.d.ts +7 -7
- package/lib/api/EvenementsAPI.js +9 -9
- package/lib/api/NotificationsAPI.d.ts +3 -3
- package/lib/api/NotificationsAPI.js +6 -6
- package/lib/api/OrganisationsAPI.d.ts +19 -0
- package/lib/api/OrganisationsAPI.js +43 -0
- package/lib/api/PEIAPI.d.ts +43 -0
- package/lib/api/PEIAPI.js +91 -0
- package/lib/api/UtilisateursAPI.d.ts +0 -10
- package/lib/api/UtilisateursAPI.js +1 -29
- package/lib/index.d.ts +3 -4
- package/lib/index.js +5 -7
- package/lib/metarisc.d.ts +6 -8
- package/lib/metarisc.js +10 -13
- package/lib/model/GetEvenementDetails404Response.d.ts +6 -0
- package/lib/model/GetEvenementDetails404Response.js +2 -0
- package/lib/model/PEI.d.ts +13 -0
- package/lib/model/PEI.js +2 -0
- package/lib/model/PEIReferencesExterieuresInner.d.ts +4 -0
- package/lib/model/PEIReferencesExterieuresInner.js +2 -0
- package/package.json +1 -1
- package/src/api/DossiersAPI.ts +36 -58
- package/src/api/EvenementsAPI.ts +12 -13
- package/src/api/NotificationsAPI.ts +6 -6
- package/src/api/OrganisationsAPI.ts +46 -0
- package/src/api/PEIAPI.ts +103 -0
- package/src/api/UtilisateursAPI.ts +1 -34
- package/src/index.ts +3 -5
- package/src/metarisc.ts +18 -25
- package/src/model/GetEvenementDetails404Response.ts +6 -0
- package/src/model/PEI.ts +14 -0
- package/src/model/PEIReferencesExterieuresInner.ts +4 -0
|
@@ -14,19 +14,6 @@ class UtilisateursAPI extends core_1.Core {
|
|
|
14
14
|
* L'utilisateur connecté retourné par ce point de terminaison utilise le token d'accès généré par le service OpenID Connect afin de le lier à une identité connue de Metarisc. Si l'utilisateur est inconnu une erreur est retournée.
|
|
15
15
|
*/
|
|
16
16
|
async getUtilisateursMoi() {
|
|
17
|
-
const pathVariable = {};
|
|
18
|
-
return this.request({
|
|
19
|
-
method: 'GET',
|
|
20
|
-
endpoint: utils_1.default.constructPath(pathVariable, '/@moi'),
|
|
21
|
-
headers: {},
|
|
22
|
-
params: {},
|
|
23
|
-
body: {}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* L'utilisateur connecté retourné par ce point de terminaison utilise le token d'accès généré par le service OpenID Connect afin de le lier à une identité connue de Metarisc. Si l'utilisateur est inconnu une erreur est retournée.
|
|
28
|
-
*/
|
|
29
|
-
async getUtilisateursMoi1() {
|
|
30
17
|
const pathVariable = {};
|
|
31
18
|
return this.request({
|
|
32
19
|
method: 'GET',
|
|
@@ -42,27 +29,12 @@ class UtilisateursAPI extends core_1.Core {
|
|
|
42
29
|
* @param perPage Nombre de résultats demandé
|
|
43
30
|
*/
|
|
44
31
|
paginateMoiEmails(page, perPage) {
|
|
45
|
-
const pathVariable = {};
|
|
46
|
-
return this.collect({
|
|
47
|
-
method: 'GET',
|
|
48
|
-
endpoint: utils_1.default.constructPath(pathVariable, '/@moi/emails'),
|
|
49
|
-
headers: {},
|
|
50
|
-
params: { 'page': page.toString(), 'per_page': perPage.toString() },
|
|
51
|
-
body: {}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Liste toutes les adresses mail de l'utilisateur connecté, y compris les adresses non publiquement accessibles.
|
|
56
|
-
* @param page Numéro de page
|
|
57
|
-
* @param perPage Nombre de résultats demandé
|
|
58
|
-
*/
|
|
59
|
-
paginateMoiEmails1(page, perPage) {
|
|
60
32
|
const pathVariable = {};
|
|
61
33
|
return this.collect({
|
|
62
34
|
method: 'GET',
|
|
63
35
|
endpoint: utils_1.default.constructPath(pathVariable, '/utilisateurs/@moi/emails'),
|
|
64
36
|
headers: {},
|
|
65
|
-
params: { 'page': page
|
|
37
|
+
params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
|
|
66
38
|
body: {}
|
|
67
39
|
});
|
|
68
40
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -2,15 +2,14 @@ export { Metarisc } from "./metarisc";
|
|
|
2
2
|
export { OAuth2 } from "./auth/oauth2";
|
|
3
3
|
export { Core } from "./core";
|
|
4
4
|
export { Collection } from "./collection";
|
|
5
|
-
export { PaginationResults
|
|
5
|
+
export { PaginationResults } from "./collection";
|
|
6
6
|
export { AuthMethod } from "./client";
|
|
7
7
|
export { Client } from "./client";
|
|
8
8
|
export { Tus } from "./tus";
|
|
9
9
|
export { DossiersAPI } from './api/DossiersAPI';
|
|
10
10
|
export { EvenementsAPI } from './api/EvenementsAPI';
|
|
11
11
|
export { NotificationsAPI } from './api/NotificationsAPI';
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
12
|
+
export { OrganisationsAPI } from './api/OrganisationsAPI';
|
|
13
|
+
export { PEIAPI } from './api/PEIAPI';
|
|
14
14
|
export { PingAPI } from './api/PingAPI';
|
|
15
|
-
export { SupportAPI } from './api/SupportAPI';
|
|
16
15
|
export { UtilisateursAPI } from './api/UtilisateursAPI';
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UtilisateursAPI = exports.
|
|
3
|
+
exports.UtilisateursAPI = exports.PingAPI = exports.PEIAPI = exports.OrganisationsAPI = exports.NotificationsAPI = exports.EvenementsAPI = exports.DossiersAPI = exports.Tus = exports.Client = exports.AuthMethod = exports.Collection = exports.Core = exports.OAuth2 = exports.Metarisc = void 0;
|
|
4
4
|
var metarisc_1 = require("./metarisc");
|
|
5
5
|
Object.defineProperty(exports, "Metarisc", { enumerable: true, get: function () { return metarisc_1.Metarisc; } });
|
|
6
6
|
var oauth2_1 = require("./auth/oauth2");
|
|
@@ -21,13 +21,11 @@ var EvenementsAPI_1 = require("./api/EvenementsAPI");
|
|
|
21
21
|
Object.defineProperty(exports, "EvenementsAPI", { enumerable: true, get: function () { return EvenementsAPI_1.EvenementsAPI; } });
|
|
22
22
|
var NotificationsAPI_1 = require("./api/NotificationsAPI");
|
|
23
23
|
Object.defineProperty(exports, "NotificationsAPI", { enumerable: true, get: function () { return NotificationsAPI_1.NotificationsAPI; } });
|
|
24
|
-
var
|
|
25
|
-
Object.defineProperty(exports, "
|
|
26
|
-
var
|
|
27
|
-
Object.defineProperty(exports, "
|
|
24
|
+
var OrganisationsAPI_1 = require("./api/OrganisationsAPI");
|
|
25
|
+
Object.defineProperty(exports, "OrganisationsAPI", { enumerable: true, get: function () { return OrganisationsAPI_1.OrganisationsAPI; } });
|
|
26
|
+
var PEIAPI_1 = require("./api/PEIAPI");
|
|
27
|
+
Object.defineProperty(exports, "PEIAPI", { enumerable: true, get: function () { return PEIAPI_1.PEIAPI; } });
|
|
28
28
|
var PingAPI_1 = require("./api/PingAPI");
|
|
29
29
|
Object.defineProperty(exports, "PingAPI", { enumerable: true, get: function () { return PingAPI_1.PingAPI; } });
|
|
30
|
-
var SupportAPI_1 = require("./api/SupportAPI");
|
|
31
|
-
Object.defineProperty(exports, "SupportAPI", { enumerable: true, get: function () { return SupportAPI_1.SupportAPI; } });
|
|
32
30
|
var UtilisateursAPI_1 = require("./api/UtilisateursAPI");
|
|
33
31
|
Object.defineProperty(exports, "UtilisateursAPI", { enumerable: true, get: function () { return UtilisateursAPI_1.UtilisateursAPI; } });
|
package/lib/metarisc.d.ts
CHANGED
|
@@ -4,20 +4,18 @@ import { Client } from "./client";
|
|
|
4
4
|
import { DossiersAPI } from './api/DossiersAPI';
|
|
5
5
|
import { EvenementsAPI } from './api/EvenementsAPI';
|
|
6
6
|
import { NotificationsAPI } from './api/NotificationsAPI';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { OrganisationsAPI } from './api/OrganisationsAPI';
|
|
8
|
+
import { PEIAPI } from './api/PEIAPI';
|
|
9
9
|
import { PingAPI } from './api/PingAPI';
|
|
10
|
-
import { SupportAPI } from './api/SupportAPI';
|
|
11
10
|
import { UtilisateursAPI } from './api/UtilisateursAPI';
|
|
12
11
|
export declare class Metarisc extends Core {
|
|
12
|
+
utilisateurs?: UtilisateursAPI;
|
|
13
13
|
dossiers?: DossiersAPI;
|
|
14
|
+
organisations?: OrganisationsAPI;
|
|
15
|
+
pei?: PEIAPI;
|
|
16
|
+
ping?: PingAPI;
|
|
14
17
|
evenements?: EvenementsAPI;
|
|
15
18
|
notifications?: NotificationsAPI;
|
|
16
|
-
organisations?: OrganisationAPI;
|
|
17
|
-
poi?: POIAPI;
|
|
18
|
-
ping?: PingAPI;
|
|
19
|
-
support?: SupportAPI;
|
|
20
|
-
utilisateurs?: UtilisateursAPI;
|
|
21
19
|
tus?: Tus;
|
|
22
20
|
constructor(config: MetariscConfig, client?: Client);
|
|
23
21
|
}
|
package/lib/metarisc.js
CHANGED
|
@@ -6,10 +6,9 @@ const tus_1 = require("./tus");
|
|
|
6
6
|
const DossiersAPI_1 = require("./api/DossiersAPI");
|
|
7
7
|
const EvenementsAPI_1 = require("./api/EvenementsAPI");
|
|
8
8
|
const NotificationsAPI_1 = require("./api/NotificationsAPI");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const OrganisationsAPI_1 = require("./api/OrganisationsAPI");
|
|
10
|
+
const PEIAPI_1 = require("./api/PEIAPI");
|
|
11
11
|
const PingAPI_1 = require("./api/PingAPI");
|
|
12
|
-
const SupportAPI_1 = require("./api/SupportAPI");
|
|
13
12
|
const UtilisateursAPI_1 = require("./api/UtilisateursAPI");
|
|
14
13
|
class Metarisc extends core_1.Core {
|
|
15
14
|
constructor(config, client) {
|
|
@@ -18,22 +17,20 @@ class Metarisc extends core_1.Core {
|
|
|
18
17
|
return new Proxy(this, {
|
|
19
18
|
get: function (metarisc, name, receiver) {
|
|
20
19
|
switch (name) {
|
|
20
|
+
case 'utilisateurs':
|
|
21
|
+
return new UtilisateursAPI_1.UtilisateursAPI(config, tmpClient);
|
|
21
22
|
case 'dossiers':
|
|
22
23
|
return new DossiersAPI_1.DossiersAPI(config, tmpClient);
|
|
24
|
+
case 'organisations':
|
|
25
|
+
return new OrganisationsAPI_1.OrganisationsAPI(config, tmpClient);
|
|
26
|
+
case 'pei':
|
|
27
|
+
return new PEIAPI_1.PEIAPI(config, tmpClient);
|
|
28
|
+
case 'ping':
|
|
29
|
+
return new PingAPI_1.PingAPI(config, tmpClient);
|
|
23
30
|
case 'evenements':
|
|
24
31
|
return new EvenementsAPI_1.EvenementsAPI(config, tmpClient);
|
|
25
32
|
case 'notifications':
|
|
26
33
|
return new NotificationsAPI_1.NotificationsAPI(config, tmpClient);
|
|
27
|
-
case 'organisations':
|
|
28
|
-
return new OrganisationAPI_1.OrganisationAPI(config, tmpClient);
|
|
29
|
-
case 'poi':
|
|
30
|
-
return new POIAPI_1.POIAPI(config, tmpClient);
|
|
31
|
-
case 'ping':
|
|
32
|
-
return new PingAPI_1.PingAPI(config, tmpClient);
|
|
33
|
-
case 'support':
|
|
34
|
-
return new SupportAPI_1.SupportAPI(config, tmpClient);
|
|
35
|
-
case 'utilisateurs':
|
|
36
|
-
return new UtilisateursAPI_1.UtilisateursAPI(config, tmpClient);
|
|
37
34
|
case 'tus':
|
|
38
35
|
return new tus_1.Tus(config, tmpClient);
|
|
39
36
|
default:
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AdressePostale } from '../../src/model/AdressePostale';
|
|
2
|
+
import { DescriptifTechnique } from '../../src/model/DescriptifTechnique';
|
|
3
|
+
import { PEIReferencesExterieuresInner } from '../../src/model/PEIReferencesExterieuresInner';
|
|
4
|
+
export type PEI = {
|
|
5
|
+
'id'?: string;
|
|
6
|
+
'date_de_realisation'?: Date;
|
|
7
|
+
'date_de_derniere_mise_a_jour'?: Date;
|
|
8
|
+
'statut'?: string;
|
|
9
|
+
'references_exterieures'?: Array<PEIReferencesExterieuresInner>;
|
|
10
|
+
'descriptif_technique'?: DescriptifTechnique;
|
|
11
|
+
'geometrie'?: string;
|
|
12
|
+
'adresse_postale'?: AdressePostale;
|
|
13
|
+
};
|
package/lib/model/PEI.js
ADDED
package/package.json
CHANGED
package/src/api/DossiersAPI.ts
CHANGED
|
@@ -6,11 +6,7 @@ import { Collection } from "../collection";
|
|
|
6
6
|
import { Dossier } from '../model/Dossier';
|
|
7
7
|
import { PostDossierRequest } from '../model/PostDossierRequest';
|
|
8
8
|
import { Workflow } from '../model/Workflow';
|
|
9
|
-
|
|
10
|
-
import { SuiviAdministratif } from '../model/SuiviAdministratif';
|
|
11
|
-
|
|
12
9
|
import { Tag } from '../model/Tag';
|
|
13
|
-
|
|
14
10
|
import { Document } from '../model/Document';
|
|
15
11
|
|
|
16
12
|
export class DossiersAPI extends Core {
|
|
@@ -20,7 +16,7 @@ export class DossiersAPI extends Core {
|
|
|
20
16
|
|
|
21
17
|
/**
|
|
22
18
|
* Récupération de l'ensemble des données d'un dossier.
|
|
23
|
-
* @param dossierId
|
|
19
|
+
* @param dossierId Identifiant unique du Dossier
|
|
24
20
|
*/
|
|
25
21
|
async getDossier(dossierId: string): Promise<AxiosResponse<Dossier>>
|
|
26
22
|
{
|
|
@@ -35,11 +31,11 @@ export class DossiersAPI extends Core {
|
|
|
35
31
|
}
|
|
36
32
|
|
|
37
33
|
/**
|
|
38
|
-
*
|
|
39
|
-
* @param dossierId
|
|
40
|
-
* @param workflowId
|
|
34
|
+
* Récupération des détails d'un workflow.
|
|
35
|
+
* @param dossierId Identifiant unique du Dossier
|
|
36
|
+
* @param workflowId Identifiant unique du Workflow
|
|
41
37
|
*/
|
|
42
|
-
async
|
|
38
|
+
async getDossierWorkflowsDetails(dossierId: string, workflowId: string): Promise<AxiosResponse<Workflow>>
|
|
43
39
|
{
|
|
44
40
|
const pathVariable = { 'dossier_id': dossierId, 'workflow_id': workflowId };
|
|
45
41
|
return this.request({
|
|
@@ -51,99 +47,81 @@ export class DossiersAPI extends Core {
|
|
|
51
47
|
});
|
|
52
48
|
}
|
|
53
49
|
|
|
54
|
-
/**
|
|
55
|
-
* Récupération de la liste des dossiers selon des critères de recherche.
|
|
56
|
-
* @param page Numéro de page
|
|
57
|
-
* @param perPage Nombre de résultats demandé
|
|
58
|
-
*/
|
|
59
|
-
paginateDossiers(page?: number, perPage?: number): Collection<Dossier>
|
|
60
|
-
{
|
|
61
|
-
const pathVariable = { };
|
|
62
|
-
return this.collect<Dossier>({
|
|
63
|
-
method: 'GET',
|
|
64
|
-
endpoint: Utils.constructPath(pathVariable, '/dossiers/'),
|
|
65
|
-
headers: { },
|
|
66
|
-
params: { 'page': page.toString(), 'per_page': perPage.toString() },
|
|
67
|
-
body: {}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Récupération de la liste du suivi administratif d'un dossier.
|
|
73
|
-
* @param dossierId ID du dossier
|
|
74
|
-
* @param page Numéro de page
|
|
75
|
-
* @param perPage Nombre de résultats demandé
|
|
76
|
-
*/
|
|
77
|
-
paginateSuiviAdministratif(dossierId: string, page?: number, perPage?: number): Collection<SuiviAdministratif>
|
|
78
|
-
{
|
|
79
|
-
const pathVariable = { 'dossier_id': dossierId };
|
|
80
|
-
return this.collect<SuiviAdministratif>({
|
|
81
|
-
method: 'GET',
|
|
82
|
-
endpoint: Utils.constructPath(pathVariable, '/dossiers/{dossier_id}/suivi_administratif'),
|
|
83
|
-
headers: { },
|
|
84
|
-
params: { 'page': page.toString(), 'per_page': perPage.toString() },
|
|
85
|
-
body: {}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
|
|
89
50
|
/**
|
|
90
51
|
* Récupération de la liste des tags d'un dossier.
|
|
91
|
-
* @param dossierId
|
|
52
|
+
* @param dossierId Identifiant unique du Dossier
|
|
92
53
|
* @param page Numéro de page
|
|
93
54
|
* @param perPage Nombre de résultats demandé
|
|
94
55
|
*/
|
|
95
|
-
|
|
56
|
+
paginateDossierTags(dossierId: string, page?: number, perPage?: number): Collection<Tag>
|
|
96
57
|
{
|
|
97
58
|
const pathVariable = { 'dossier_id': dossierId };
|
|
98
59
|
return this.collect<Tag>({
|
|
99
60
|
method: 'GET',
|
|
100
61
|
endpoint: Utils.constructPath(pathVariable, '/dossiers/{dossier_id}/tags'),
|
|
101
62
|
headers: { },
|
|
102
|
-
params: { 'page': page
|
|
63
|
+
params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
|
|
103
64
|
body: {}
|
|
104
65
|
});
|
|
105
66
|
}
|
|
106
67
|
|
|
107
68
|
/**
|
|
108
69
|
* Liste des documents liés à un workflow.
|
|
109
|
-
* @param dossierId
|
|
110
|
-
* @param workflowId
|
|
70
|
+
* @param dossierId Identifiant unique du Dossier
|
|
71
|
+
* @param workflowId Identifiant unique du Workflow
|
|
111
72
|
* @param page Numéro de page
|
|
112
73
|
* @param perPage Nombre de résultats demandé
|
|
113
74
|
*/
|
|
114
|
-
|
|
75
|
+
paginateDossierWorkflowDocuments(dossierId: string, workflowId: string, page?: number, perPage?: number): Collection<Document>
|
|
115
76
|
{
|
|
116
77
|
const pathVariable = { 'dossier_id': dossierId, 'workflow_id': workflowId };
|
|
117
78
|
return this.collect<Document>({
|
|
118
79
|
method: 'GET',
|
|
119
80
|
endpoint: Utils.constructPath(pathVariable, '/dossiers/{dossier_id}/workflows/{workflow_id}/documents'),
|
|
120
81
|
headers: { },
|
|
121
|
-
params: { 'page': page
|
|
82
|
+
params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
|
|
122
83
|
body: {}
|
|
123
84
|
});
|
|
124
85
|
}
|
|
125
86
|
|
|
126
87
|
/**
|
|
127
88
|
* Récupération de la liste des workflows d'un dossier.
|
|
128
|
-
* @param dossierId
|
|
89
|
+
* @param dossierId Identifiant unique du Dossier
|
|
129
90
|
* @param page Numéro de page
|
|
130
91
|
* @param perPage Nombre de résultats demandé
|
|
131
92
|
*/
|
|
132
|
-
|
|
93
|
+
paginateDossierWorkflows(dossierId: string, page?: number, perPage?: number): Collection<Workflow>
|
|
133
94
|
{
|
|
134
95
|
const pathVariable = { 'dossier_id': dossierId };
|
|
135
96
|
return this.collect<Workflow>({
|
|
136
97
|
method: 'GET',
|
|
137
98
|
endpoint: Utils.constructPath(pathVariable, '/dossiers/{dossier_id}/workflows'),
|
|
138
99
|
headers: { },
|
|
139
|
-
params: { 'page': page
|
|
100
|
+
params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
|
|
101
|
+
body: {}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Récupération de la liste des dossiers selon des critères de recherche.
|
|
107
|
+
* @param page Numéro de page
|
|
108
|
+
* @param perPage Nombre de résultats demandé
|
|
109
|
+
*/
|
|
110
|
+
paginateDossiers(page?: number, perPage?: number): Collection<Dossier>
|
|
111
|
+
{
|
|
112
|
+
const pathVariable = { };
|
|
113
|
+
return this.collect<Dossier>({
|
|
114
|
+
method: 'GET',
|
|
115
|
+
endpoint: Utils.constructPath(pathVariable, '/dossiers'),
|
|
116
|
+
headers: { },
|
|
117
|
+
params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
|
|
140
118
|
body: {}
|
|
141
119
|
});
|
|
142
120
|
}
|
|
143
121
|
|
|
144
122
|
/**
|
|
145
|
-
* Modification d'un dossier existant.
|
|
146
|
-
* @param dossierId
|
|
123
|
+
* TODO : Modification d'un dossier existant.
|
|
124
|
+
* @param dossierId Identifiant unique du Dossier
|
|
147
125
|
* @param dossier
|
|
148
126
|
*/
|
|
149
127
|
async patchDossier(dossierId: string, dossier?: Dossier): Promise<AxiosResponse<Dossier>>
|
|
@@ -159,7 +137,7 @@ export class DossiersAPI extends Core {
|
|
|
159
137
|
}
|
|
160
138
|
|
|
161
139
|
/**
|
|
162
|
-
* Création d'un nouveau dossier.
|
|
140
|
+
* TODO : Création d'un nouveau dossier.
|
|
163
141
|
* @param postDossierRequest
|
|
164
142
|
*/
|
|
165
143
|
async postDossier(postDossierRequest?: PostDossierRequest): Promise<AxiosResponse<Dossier>>
|
|
@@ -167,7 +145,7 @@ export class DossiersAPI extends Core {
|
|
|
167
145
|
const pathVariable = { };
|
|
168
146
|
return this.request({
|
|
169
147
|
method: 'POST',
|
|
170
|
-
endpoint: Utils.constructPath(pathVariable, '/dossiers
|
|
148
|
+
endpoint: Utils.constructPath(pathVariable, '/dossiers'),
|
|
171
149
|
headers: { },
|
|
172
150
|
params: { },
|
|
173
151
|
body: { 'titre': postDossierRequest?.titre, 'description': postDossierRequest?.description, 'workflows': postDossierRequest?.workflows }
|
package/src/api/EvenementsAPI.ts
CHANGED
|
@@ -5,8 +5,7 @@ import { Client } from "../client";
|
|
|
5
5
|
import { Collection } from "../collection";
|
|
6
6
|
import { Evenement } from '../model/Evenement';
|
|
7
7
|
import { PostEvenementRequest } from '../model/PostEvenementRequest';
|
|
8
|
-
|
|
9
|
-
import { Utilisateur1 } from '../model/Utilisateur1';
|
|
8
|
+
import { Utilisateur } from '../model/Utilisateur';
|
|
10
9
|
|
|
11
10
|
export class EvenementsAPI extends Core {
|
|
12
11
|
constructor(config: MetariscConfig, client?: Client) {
|
|
@@ -15,7 +14,7 @@ export class EvenementsAPI extends Core {
|
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
16
|
* Suppression d'un événement correspondant à l'id donné.
|
|
18
|
-
* @param evenementId
|
|
17
|
+
* @param evenementId Identifiant unique de l'Événement
|
|
19
18
|
*/
|
|
20
19
|
async deleteEvenement(evenementId: string): Promise<AxiosResponse<void>>
|
|
21
20
|
{
|
|
@@ -31,10 +30,10 @@ export class EvenementsAPI extends Core {
|
|
|
31
30
|
|
|
32
31
|
/**
|
|
33
32
|
* Récupération des détails d'un événement correspondant à l'id donné.
|
|
34
|
-
* @param evenementId
|
|
33
|
+
* @param evenementId Identifiant unique de l'Événement
|
|
35
34
|
* @param evenement
|
|
36
35
|
*/
|
|
37
|
-
async
|
|
36
|
+
async getEvenementDetails(evenementId: string, evenement?: Evenement): Promise<AxiosResponse<Evenement>>
|
|
38
37
|
{
|
|
39
38
|
const pathVariable = { 'evenement_id': evenementId };
|
|
40
39
|
return this.request({
|
|
@@ -48,18 +47,18 @@ export class EvenementsAPI extends Core {
|
|
|
48
47
|
|
|
49
48
|
/**
|
|
50
49
|
* Récupération d'une liste paginée d'utilisateurs liés à un événement calendaire.
|
|
51
|
-
* @param evenementId
|
|
50
|
+
* @param evenementId Identifiant unique de l'Événement
|
|
52
51
|
* @param page Le numéro de la page.
|
|
53
52
|
* @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.
|
|
54
53
|
*/
|
|
55
|
-
paginateEvenementUtilisateurs(evenementId: string, page?: number, perPage?: number): Collection<
|
|
54
|
+
paginateEvenementUtilisateurs(evenementId: string, page?: number, perPage?: number): Collection<Utilisateur>
|
|
56
55
|
{
|
|
57
56
|
const pathVariable = { 'evenement_id': evenementId };
|
|
58
|
-
return this.collect<
|
|
57
|
+
return this.collect<Utilisateur>({
|
|
59
58
|
method: 'GET',
|
|
60
59
|
endpoint: Utils.constructPath(pathVariable, '/evenements/{evenement_id}/utilisateurs'),
|
|
61
60
|
headers: { },
|
|
62
|
-
params: { 'page': page
|
|
61
|
+
params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
|
|
63
62
|
body: {}
|
|
64
63
|
});
|
|
65
64
|
}
|
|
@@ -76,15 +75,15 @@ export class EvenementsAPI extends Core {
|
|
|
76
75
|
const pathVariable = { };
|
|
77
76
|
return this.collect<Evenement>({
|
|
78
77
|
method: 'GET',
|
|
79
|
-
endpoint: Utils.constructPath(pathVariable, '/evenements
|
|
78
|
+
endpoint: Utils.constructPath(pathVariable, '/evenements'),
|
|
80
79
|
headers: { },
|
|
81
|
-
params: { 'page': page
|
|
80
|
+
params: { 'page': page?.toString(), 'per_page': perPage?.toString(), 'type': type, 'period': period },
|
|
82
81
|
body: {}
|
|
83
82
|
});
|
|
84
83
|
}
|
|
85
84
|
|
|
86
85
|
/**
|
|
87
|
-
* Création d'un événement.
|
|
86
|
+
* TODO : Création d'un événement.
|
|
88
87
|
* @param postEvenementRequest
|
|
89
88
|
*/
|
|
90
89
|
async postEvenement(postEvenementRequest?: PostEvenementRequest): Promise<AxiosResponse<Evenement>>
|
|
@@ -92,7 +91,7 @@ export class EvenementsAPI extends Core {
|
|
|
92
91
|
const pathVariable = { };
|
|
93
92
|
return this.request({
|
|
94
93
|
method: 'POST',
|
|
95
|
-
endpoint: Utils.constructPath(pathVariable, '/evenements
|
|
94
|
+
endpoint: Utils.constructPath(pathVariable, '/evenements'),
|
|
96
95
|
headers: { },
|
|
97
96
|
params: { },
|
|
98
97
|
body: { 'title': postEvenementRequest?.title, 'type': postEvenementRequest?.type, 'description': postEvenementRequest?.description, 'date_debut': postEvenementRequest?.date_debut, 'date_fin': postEvenementRequest?.date_fin }
|
|
@@ -13,7 +13,7 @@ export class NotificationsAPI extends Core {
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Suppression d'une notification correspondante à l'id donné.
|
|
16
|
-
* @param notificationId
|
|
16
|
+
* @param notificationId Identifiant unique de la Notification
|
|
17
17
|
*/
|
|
18
18
|
async deleteNotification(notificationId: string): Promise<AxiosResponse<void>>
|
|
19
19
|
{
|
|
@@ -29,7 +29,7 @@ export class NotificationsAPI extends Core {
|
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Récupération des détails d'une notification correspondante à l'id donné.
|
|
32
|
-
* @param notificationId
|
|
32
|
+
* @param notificationId Identifiant unique de la Notification
|
|
33
33
|
*/
|
|
34
34
|
async getNotification(notificationId: string): Promise<AxiosResponse<Notification>>
|
|
35
35
|
{
|
|
@@ -44,7 +44,7 @@ export class NotificationsAPI extends Core {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* Récupération des détails de toutes les notifications existantes
|
|
47
|
+
* Récupération des détails de toutes les notifications existantes pour l'utilisateur connecté.
|
|
48
48
|
* @param page Numéro de page
|
|
49
49
|
* @param perPage Nombre de résultats demandé
|
|
50
50
|
*/
|
|
@@ -53,9 +53,9 @@ export class NotificationsAPI extends Core {
|
|
|
53
53
|
const pathVariable = { };
|
|
54
54
|
return this.collect<Notification>({
|
|
55
55
|
method: 'GET',
|
|
56
|
-
endpoint: Utils.constructPath(pathVariable, '/notifications
|
|
56
|
+
endpoint: Utils.constructPath(pathVariable, '/notifications'),
|
|
57
57
|
headers: { },
|
|
58
|
-
params: { 'page': page
|
|
58
|
+
params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
|
|
59
59
|
body: {}
|
|
60
60
|
});
|
|
61
61
|
}
|
|
@@ -69,7 +69,7 @@ export class NotificationsAPI extends Core {
|
|
|
69
69
|
const pathVariable = { };
|
|
70
70
|
return this.request({
|
|
71
71
|
method: 'POST',
|
|
72
|
-
endpoint: Utils.constructPath(pathVariable, '/notifications
|
|
72
|
+
endpoint: Utils.constructPath(pathVariable, '/notifications'),
|
|
73
73
|
headers: { },
|
|
74
74
|
params: { },
|
|
75
75
|
body: { 'title': postNotificationRequest?.title, 'message': postNotificationRequest?.message, 'contexte': postNotificationRequest?.contexte, 'utilisateur_id': postNotificationRequest?.utilisateur_id }
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Core, MetariscConfig } from "../core";
|
|
2
|
+
import Utils from "../utils";
|
|
3
|
+
import type { AxiosResponse } from "axios";
|
|
4
|
+
import { Client } from "../client";
|
|
5
|
+
import { Collection } from "../collection";
|
|
6
|
+
import { Organisation } from '../model/Organisation';
|
|
7
|
+
|
|
8
|
+
export class OrganisationsAPI extends Core {
|
|
9
|
+
constructor(config: MetariscConfig, client?: Client) {
|
|
10
|
+
super(config, client);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Récupération des détails d'une organisation.
|
|
15
|
+
* @param orgId Identifiant unique de l'Organisation
|
|
16
|
+
*/
|
|
17
|
+
async getOrganisation(orgId: string): Promise<AxiosResponse<Organisation>>
|
|
18
|
+
{
|
|
19
|
+
const pathVariable = { 'org_id': orgId };
|
|
20
|
+
return this.request({
|
|
21
|
+
method: 'GET',
|
|
22
|
+
endpoint: Utils.constructPath(pathVariable, '/organisations/{org_id}'),
|
|
23
|
+
headers: { },
|
|
24
|
+
params: { },
|
|
25
|
+
body: {}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Liste paginée des organisations.
|
|
31
|
+
* @param page Numéro de page
|
|
32
|
+
* @param perPage Nombre de résultats demandé
|
|
33
|
+
*/
|
|
34
|
+
paginateOrganisations(page?: number, perPage?: number): Collection<Organisation>
|
|
35
|
+
{
|
|
36
|
+
const pathVariable = { };
|
|
37
|
+
return this.collect<Organisation>({
|
|
38
|
+
method: 'GET',
|
|
39
|
+
endpoint: Utils.constructPath(pathVariable, '/organisations'),
|
|
40
|
+
headers: { },
|
|
41
|
+
params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
|
|
42
|
+
body: {}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
}
|