@metarisc/metarisc-js 0.0.1-alpha.13 → 0.0.1-alpha.15
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 +2 -0
- package/lib/api/DossiersAPI.js +10 -0
- package/lib/api/OrganisationAPI.d.ts +15 -2
- package/lib/api/OrganisationAPI.js +34 -4
- package/lib/metarisc.d.ts +2 -0
- package/lib/model/PaginateEvenements200ResponseMeta.d.ts +2 -2
- package/lib/model/PaginateOrganisations200Response.d.ts +6 -0
- package/lib/model/PaginateOrganisations200Response.js +2 -0
- package/lib/model/PaginateOrganisations200ResponseMeta.d.ts +4 -0
- package/lib/model/PaginateOrganisations200ResponseMeta.js +2 -0
- package/lib/model/PaginateTickets200ResponseMeta.d.ts +2 -2
- package/lib/model/PaginationMetadata4.d.ts +7 -0
- package/lib/model/PaginationMetadata4.js +2 -0
- package/lib/model/WorkflowBase.d.ts +1 -0
- package/package.json +1 -1
- package/src/api/DossiersAPI.ts +18 -0
- package/src/api/OrganisationAPI.ts +54 -18
- package/src/metarisc.ts +1 -0
- package/src/model/PaginateEvenements200ResponseMeta.ts +2 -2
- package/src/model/PaginateOrganisations200Response.ts +7 -0
- package/src/model/PaginateOrganisations200ResponseMeta.ts +5 -0
- package/src/model/PaginateTickets200ResponseMeta.ts +2 -2
- package/src/model/PaginationMetadata4.ts +7 -0
- package/src/model/WorkflowBase.ts +1 -0
package/lib/api/DossiersAPI.d.ts
CHANGED
|
@@ -7,9 +7,11 @@ import { PaginateTags200Response } from "../../src/model/PaginateTags200Response
|
|
|
7
7
|
import { PaginateWorkflowDocuments200Response } from "../../src/model/PaginateWorkflowDocuments200Response";
|
|
8
8
|
import { PaginateWorkflows200Response } from "../../src/model/PaginateWorkflows200Response";
|
|
9
9
|
import { PostDossierRequest } from "../../src/model/PostDossierRequest";
|
|
10
|
+
import { Workflow } from "../../src/model/Workflow";
|
|
10
11
|
export declare class DossiersAPI extends Core {
|
|
11
12
|
constructor(config: MetariscConfig);
|
|
12
13
|
getDossier(dossierId: string): Promise<AxiosResponse<Dossier>>;
|
|
14
|
+
getDossierWorkflowsWorkflow(dossierId: string, workflowId: string): Promise<AxiosResponse<Workflow>>;
|
|
13
15
|
/**
|
|
14
16
|
* Récupération de la liste des dossiers selon des critères de recherche.
|
|
15
17
|
* @param page Numéro de page
|
package/lib/api/DossiersAPI.js
CHANGED
|
@@ -20,6 +20,16 @@ class DossiersAPI extends core_1.Core {
|
|
|
20
20
|
body: {},
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
+
async getDossierWorkflowsWorkflow(dossierId, workflowId) {
|
|
24
|
+
const pathVariable = { dossier_id: dossierId, workflow_id: workflowId };
|
|
25
|
+
return this.request({
|
|
26
|
+
method: "GET",
|
|
27
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/dossiers/{dossier_id}/workflows/{workflow_id}"),
|
|
28
|
+
headers: {},
|
|
29
|
+
params: {},
|
|
30
|
+
body: {},
|
|
31
|
+
});
|
|
32
|
+
}
|
|
23
33
|
/**
|
|
24
34
|
* Récupération de la liste des dossiers selon des critères de recherche.
|
|
25
35
|
* @param page Numéro de page
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import { Core, MetariscConfig } from "../core";
|
|
2
|
-
import type { AxiosResponse } from
|
|
3
|
-
import { Organisation } from
|
|
2
|
+
import type { AxiosResponse } from "axios";
|
|
3
|
+
import { Organisation } from "../../src/model/Organisation";
|
|
4
|
+
import { PaginateOrganisations200Response } from "../../src/model/PaginateOrganisations200Response";
|
|
4
5
|
export declare class OrganisationAPI extends Core {
|
|
5
6
|
constructor(config: MetariscConfig);
|
|
6
7
|
getOrganisation(orgId: string): Promise<AxiosResponse<Organisation>>;
|
|
8
|
+
/**
|
|
9
|
+
* Liste paginée des organisations.
|
|
10
|
+
* @param page Numéro de page
|
|
11
|
+
* @param perPage Nombre de résultats demandé
|
|
12
|
+
*/
|
|
13
|
+
paginateOrganisations(page?: number, perPage?: number): Promise<AxiosResponse<PaginateOrganisations200Response>>;
|
|
14
|
+
/**
|
|
15
|
+
* Liste paginée des organisations.
|
|
16
|
+
* @param page Numéro de page
|
|
17
|
+
* @param perPage Nombre de résultats demandé
|
|
18
|
+
*/
|
|
19
|
+
paginateOrganisationsIterator(page?: number, perPage?: number): AsyncGenerator<PaginateOrganisations200Response>;
|
|
7
20
|
}
|
|
@@ -11,13 +11,43 @@ class OrganisationAPI extends core_1.Core {
|
|
|
11
11
|
super(config);
|
|
12
12
|
}
|
|
13
13
|
async getOrganisation(orgId) {
|
|
14
|
-
const pathVariable = {
|
|
14
|
+
const pathVariable = { org_id: orgId };
|
|
15
15
|
return this.request({
|
|
16
|
-
method:
|
|
17
|
-
endpoint: utils_1.default.constructPath(pathVariable,
|
|
16
|
+
method: "GET",
|
|
17
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/organisations/{org_id}"),
|
|
18
18
|
headers: {},
|
|
19
19
|
params: {},
|
|
20
|
-
body: {}
|
|
20
|
+
body: {},
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Liste paginée des organisations.
|
|
25
|
+
* @param page Numéro de page
|
|
26
|
+
* @param perPage Nombre de résultats demandé
|
|
27
|
+
*/
|
|
28
|
+
paginateOrganisations(page, perPage) {
|
|
29
|
+
const pathVariable = {};
|
|
30
|
+
return this.request({
|
|
31
|
+
method: "GET",
|
|
32
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/organisations/"),
|
|
33
|
+
headers: {},
|
|
34
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
35
|
+
body: {},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Liste paginée des organisations.
|
|
40
|
+
* @param page Numéro de page
|
|
41
|
+
* @param perPage Nombre de résultats demandé
|
|
42
|
+
*/
|
|
43
|
+
paginateOrganisationsIterator(page, perPage) {
|
|
44
|
+
const pathVariable = {};
|
|
45
|
+
return this.autoPagingIterator({
|
|
46
|
+
method: "GET",
|
|
47
|
+
endpoint: utils_1.default.constructPath(pathVariable, "/organisations/"),
|
|
48
|
+
headers: {},
|
|
49
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
50
|
+
body: {},
|
|
21
51
|
});
|
|
22
52
|
}
|
|
23
53
|
}
|
package/lib/metarisc.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Core, MetariscConfig } from "./core";
|
|
2
2
|
import { DossiersAPI } from "./api/DossiersAPI";
|
|
3
|
+
import { EvenementsAPI } from "./api/EvenementsAPI";
|
|
3
4
|
import { NotificationsAPI } from "./api/NotificationsAPI";
|
|
4
5
|
import { OrganisationAPI } from "./api/OrganisationAPI";
|
|
5
6
|
import { POIAPI } from "./api/POIAPI";
|
|
@@ -8,6 +9,7 @@ import { SupportAPI } from "./api/SupportAPI";
|
|
|
8
9
|
import { UtilisateursAPI } from "./api/UtilisateursAPI";
|
|
9
10
|
export declare class Metarisc extends Core {
|
|
10
11
|
dossiers?: DossiersAPI;
|
|
12
|
+
evenements?: EvenementsAPI;
|
|
11
13
|
notifications?: NotificationsAPI;
|
|
12
14
|
organisations?: OrganisationAPI;
|
|
13
15
|
poi?: POIAPI;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PaginationMetadata3 } from '../../src/model/PaginationMetadata3';
|
|
2
2
|
export type PaginateEvenements200ResponseMeta = {
|
|
3
|
-
'pagination'?:
|
|
3
|
+
'pagination'?: PaginationMetadata3;
|
|
4
4
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Organisation } from '../../src/model/Organisation';
|
|
2
|
+
import { PaginateOrganisations200ResponseMeta } from '../../src/model/PaginateOrganisations200ResponseMeta';
|
|
3
|
+
export type PaginateOrganisations200Response = {
|
|
4
|
+
'data'?: Array<Organisation>;
|
|
5
|
+
'meta'?: PaginateOrganisations200ResponseMeta;
|
|
6
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PaginationMetadata4 } from '../../src/model/PaginationMetadata4';
|
|
2
2
|
export type PaginateTickets200ResponseMeta = {
|
|
3
|
-
'pagination'?:
|
|
3
|
+
'pagination'?: PaginationMetadata4;
|
|
4
4
|
};
|
package/package.json
CHANGED
package/src/api/DossiersAPI.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { PaginateTags200Response } from "../../src/model/PaginateTags200Response
|
|
|
8
8
|
import { PaginateWorkflowDocuments200Response } from "../../src/model/PaginateWorkflowDocuments200Response";
|
|
9
9
|
import { PaginateWorkflows200Response } from "../../src/model/PaginateWorkflows200Response";
|
|
10
10
|
import { PostDossierRequest } from "../../src/model/PostDossierRequest";
|
|
11
|
+
import { Workflow } from "../../src/model/Workflow";
|
|
11
12
|
|
|
12
13
|
export class DossiersAPI extends Core {
|
|
13
14
|
constructor(config: MetariscConfig) {
|
|
@@ -25,6 +26,23 @@ export class DossiersAPI extends Core {
|
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
28
|
|
|
29
|
+
async getDossierWorkflowsWorkflow(
|
|
30
|
+
dossierId: string,
|
|
31
|
+
workflowId: string
|
|
32
|
+
): Promise<AxiosResponse<Workflow>> {
|
|
33
|
+
const pathVariable = { dossier_id: dossierId, workflow_id: workflowId };
|
|
34
|
+
return this.request({
|
|
35
|
+
method: "GET",
|
|
36
|
+
endpoint: Utils.constructPath(
|
|
37
|
+
pathVariable,
|
|
38
|
+
"/dossiers/{dossier_id}/workflows/{workflow_id}"
|
|
39
|
+
),
|
|
40
|
+
headers: {},
|
|
41
|
+
params: {},
|
|
42
|
+
body: {},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
28
46
|
/**
|
|
29
47
|
* Récupération de la liste des dossiers selon des critères de recherche.
|
|
30
48
|
* @param page Numéro de page
|
|
@@ -1,23 +1,59 @@
|
|
|
1
1
|
import { Core, MetariscConfig } from "../core";
|
|
2
2
|
import Utils from "../utils";
|
|
3
|
-
import type { AxiosResponse } from
|
|
4
|
-
import { Organisation } from
|
|
3
|
+
import type { AxiosResponse } from "axios";
|
|
4
|
+
import { Organisation } from "../../src/model/Organisation";
|
|
5
|
+
import { PaginateOrganisations200Response } from "../../src/model/PaginateOrganisations200Response";
|
|
5
6
|
|
|
6
7
|
export class OrganisationAPI extends Core {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
constructor(config: MetariscConfig) {
|
|
9
|
+
super(config);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async getOrganisation(orgId: string): Promise<AxiosResponse<Organisation>> {
|
|
13
|
+
const pathVariable = { org_id: orgId };
|
|
14
|
+
return this.request({
|
|
15
|
+
method: "GET",
|
|
16
|
+
endpoint: Utils.constructPath(pathVariable, "/organisations/{org_id}"),
|
|
17
|
+
headers: {},
|
|
18
|
+
params: {},
|
|
19
|
+
body: {},
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Liste paginée des organisations.
|
|
25
|
+
* @param page Numéro de page
|
|
26
|
+
* @param perPage Nombre de résultats demandé
|
|
27
|
+
*/
|
|
28
|
+
paginateOrganisations(
|
|
29
|
+
page?: number,
|
|
30
|
+
perPage?: number
|
|
31
|
+
): Promise<AxiosResponse<PaginateOrganisations200Response>> {
|
|
32
|
+
const pathVariable = {};
|
|
33
|
+
return this.request({
|
|
34
|
+
method: "GET",
|
|
35
|
+
endpoint: Utils.constructPath(pathVariable, "/organisations/"),
|
|
36
|
+
headers: {},
|
|
37
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
38
|
+
body: {},
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Liste paginée des organisations.
|
|
43
|
+
* @param page Numéro de page
|
|
44
|
+
* @param perPage Nombre de résultats demandé
|
|
45
|
+
*/
|
|
46
|
+
paginateOrganisationsIterator(
|
|
47
|
+
page?: number,
|
|
48
|
+
perPage?: number
|
|
49
|
+
): AsyncGenerator<PaginateOrganisations200Response> {
|
|
50
|
+
const pathVariable = {};
|
|
51
|
+
return this.autoPagingIterator({
|
|
52
|
+
method: "GET",
|
|
53
|
+
endpoint: Utils.constructPath(pathVariable, "/organisations/"),
|
|
54
|
+
headers: {},
|
|
55
|
+
params: { page: page.toString(), per_page: perPage.toString() },
|
|
56
|
+
body: {},
|
|
57
|
+
});
|
|
58
|
+
}
|
|
23
59
|
}
|
package/src/metarisc.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { UtilisateursAPI } from "./api/UtilisateursAPI";
|
|
|
18
18
|
|
|
19
19
|
export class Metarisc extends Core {
|
|
20
20
|
public dossiers?: DossiersAPI;
|
|
21
|
+
public evenements?: EvenementsAPI;
|
|
21
22
|
public notifications?: NotificationsAPI;
|
|
22
23
|
public organisations?: OrganisationAPI;
|
|
23
24
|
public poi?: POIAPI;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PaginationMetadata3 } from '../../src/model/PaginationMetadata3';
|
|
2
2
|
|
|
3
3
|
export type PaginateEvenements200ResponseMeta = {
|
|
4
|
-
'pagination'?:
|
|
4
|
+
'pagination'?: PaginationMetadata3;
|
|
5
5
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Organisation } from '../../src/model/Organisation';
|
|
2
|
+
import { PaginateOrganisations200ResponseMeta } from '../../src/model/PaginateOrganisations200ResponseMeta';
|
|
3
|
+
|
|
4
|
+
export type PaginateOrganisations200Response = {
|
|
5
|
+
'data'?: Array<Organisation>;
|
|
6
|
+
'meta'?: PaginateOrganisations200ResponseMeta;
|
|
7
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PaginationMetadata4 } from '../../src/model/PaginationMetadata4';
|
|
2
2
|
|
|
3
3
|
export type PaginateTickets200ResponseMeta = {
|
|
4
|
-
'pagination'?:
|
|
4
|
+
'pagination'?: PaginationMetadata4;
|
|
5
5
|
};
|