@metarisc/metarisc-js 0.0.1-alpha.68 → 0.0.1-alpha.69

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.
@@ -19,5 +19,6 @@ export declare class DatesPassageCommissionAPI extends Core {
19
19
  */
20
20
  postCommissionDateDossier(dateId: string, params: {
21
21
  dossierId: string;
22
+ dateDePassage?: Date;
22
23
  }): Promise<AxiosResponse<PassageCommissionDossier>>;
23
24
  }
@@ -55,6 +55,7 @@ export declare class DossiersAPI extends Core {
55
55
  */
56
56
  postDocumentsDossier(dossierId: string, params: {
57
57
  url: string;
58
+ estSensible: boolean;
58
59
  nom?: string;
59
60
  description?: string;
60
61
  type?: string;
@@ -55,6 +55,7 @@ export declare class ERPAPI extends Core {
55
55
  */
56
56
  postDocumentsErp(erpId: string, params: {
57
57
  url: string;
58
+ estSensible: boolean;
58
59
  nom?: string;
59
60
  description?: string;
60
61
  type?: string;
@@ -17,6 +17,10 @@ export declare class NotificationsAPI extends Core {
17
17
  * Récupération des détails de toutes les notifications existantes pour l'utilisateur connecté.
18
18
  */
19
19
  paginateNotifications(page?: number, perPage?: number): Collection<Notification>;
20
+ /**
21
+ * Permet de marquer la notification donnée comme lue par l'utilisateur.
22
+ */
23
+ notificationMarquerCommeLue(notificationId: string): Promise<AxiosResponse<Notification>>;
20
24
  /**
21
25
  * Création d'une notification.
22
26
  */
@@ -43,6 +43,18 @@ class NotificationsAPI extends core_1.Core {
43
43
  body: utils_1.Utils.payloadFilter({})
44
44
  });
45
45
  }
46
+ /**
47
+ * Permet de marquer la notification donnée comme lue par l'utilisateur.
48
+ */
49
+ async notificationMarquerCommeLue(notificationId) {
50
+ const pathVariable = { 'notification_id': (new String(notificationId)).toString() };
51
+ return this.request({
52
+ method: 'POST',
53
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/notifications/{notification_id}/marquer_comme_lue'),
54
+ params: {},
55
+ body: utils_1.Utils.payloadFilter({})
56
+ });
57
+ }
46
58
  /**
47
59
  * Création d'une notification.
48
60
  */
@@ -11,5 +11,6 @@ export declare class OrdresDuJourAPI extends Core {
11
11
  avis?: {
12
12
  type?: string;
13
13
  };
14
+ dateDePassage?: Date;
14
15
  }): Promise<AxiosResponse<PassageCommissionDossier>>;
15
16
  }
@@ -5,6 +5,7 @@ import { Collection } from "../collection";
5
5
  import { Organisation } from '../model/Organisation';
6
6
  import { OrganisationGeoservice } from '../model/OrganisationGeoservice';
7
7
  import { OrganisationMembre } from '../model/OrganisationMembre';
8
+ import { OrganisationPreferences } from '../model/OrganisationPreferences';
8
9
  import { ReglesDeci } from '../model/ReglesDeci';
9
10
  import { WorkflowType } from '../model/WorkflowType';
10
11
  export declare class OrganisationsAPI extends Core {
@@ -13,6 +14,10 @@ export declare class OrganisationsAPI extends Core {
13
14
  * Récupération des détails d'une organisation.
14
15
  */
15
16
  getOrganisation(orgId: string): Promise<AxiosResponse<Organisation>>;
17
+ /**
18
+ * Ensemble des paramétrages et des configurations liés aux règles métiers de l'organisation.
19
+ */
20
+ getOrganisationPreferences(orgId: string): Promise<AxiosResponse<OrganisationPreferences>>;
16
21
  /**
17
22
  * Ensemble de règles utilisées pour le calcul de la conformité et de la performance DECI.
18
23
  */
@@ -19,6 +19,18 @@ class OrganisationsAPI extends core_1.Core {
19
19
  body: utils_1.Utils.payloadFilter({})
20
20
  });
21
21
  }
22
+ /**
23
+ * Ensemble des paramétrages et des configurations liés aux règles métiers de l'organisation.
24
+ */
25
+ async getOrganisationPreferences(orgId) {
26
+ const pathVariable = { 'org_id': (new String(orgId)).toString() };
27
+ return this.request({
28
+ method: 'GET',
29
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/organisations/{org_id}/preferences'),
30
+ params: {},
31
+ body: utils_1.Utils.payloadFilter({})
32
+ });
33
+ }
22
34
  /**
23
35
  * Ensemble de règles utilisées pour le calcul de la conformité et de la performance DECI.
24
36
  */
@@ -6,6 +6,7 @@ import { Contact } from '../model/Contact';
6
6
  import { Dossier } from '../model/Dossier';
7
7
  import { PEI } from '../model/PEI';
8
8
  import { PieceJointe } from '../model/PieceJointe';
9
+ import { AnomaliePEI } from '../model/AnomaliePEI';
9
10
  import { DescriptifTechniqueDECI } from '../model/DescriptifTechniqueDECI';
10
11
  export declare class PEIAPI extends Core {
11
12
  constructor(config: MetariscConfig, client?: Client);
@@ -13,6 +14,10 @@ export declare class PEIAPI extends Core {
13
14
  * Récupération de l'ensemble des données d'un PEI.
14
15
  */
15
16
  getPei(peiId: string): Promise<AxiosResponse<PEI>>;
17
+ /**
18
+ * Récupération de la liste des anomalies DECI détectées sur le PEI.
19
+ */
20
+ paginatePeiAnomalies(peiId: string, page?: number, perPage?: number): Collection<AnomaliePEI>;
16
21
  /**
17
22
  * Récupération de la liste des contacts.
18
23
  */
@@ -55,6 +60,7 @@ export declare class PEIAPI extends Core {
55
60
  */
56
61
  postDocumentsPei(peiId: string, params: {
57
62
  url: string;
63
+ estSensible: boolean;
58
64
  nom?: string;
59
65
  description?: string;
60
66
  type?: string;
@@ -70,6 +76,19 @@ export declare class PEIAPI extends Core {
70
76
  * Ajout d'un PEI.
71
77
  */
72
78
  postPei(params: {
79
+ descriptifTechnique: {
80
+ type: string;
81
+ domanialite?: string;
82
+ observations_generales?: string;
83
+ statut: string;
84
+ surpression?: number;
85
+ nature: string;
86
+ debit_1bar?: number;
87
+ pression?: number;
88
+ pression_statique?: number;
89
+ debit_gueule_bee?: number;
90
+ volume?: number;
91
+ };
73
92
  implantation: {
74
93
  code_postal?: string;
75
94
  commune?: string;
package/lib/api/PEIAPI.js CHANGED
@@ -19,6 +19,18 @@ class PEIAPI extends core_1.Core {
19
19
  body: utils_1.Utils.payloadFilter({})
20
20
  });
21
21
  }
22
+ /**
23
+ * Récupération de la liste des anomalies DECI détectées sur le PEI.
24
+ */
25
+ paginatePeiAnomalies(peiId, page, perPage) {
26
+ const pathVariable = { 'pei_id': (new String(peiId)).toString() };
27
+ return this.collect({
28
+ method: 'GET',
29
+ endpoint: utils_1.Utils.constructPath(pathVariable, '/pei/{pei_id}/anomalies'),
30
+ params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
31
+ body: utils_1.Utils.payloadFilter({})
32
+ });
33
+ }
22
34
  /**
23
35
  * Récupération de la liste des contacts.
24
36
  */
@@ -19,6 +19,7 @@ export declare class WorkflowsAPI extends Core {
19
19
  */
20
20
  postDocumentsWorkflow(workflowId: string, params: {
21
21
  url: string;
22
+ estSensible: boolean;
22
23
  nom?: string;
23
24
  description?: string;
24
25
  type?: string;
@@ -4,6 +4,7 @@ export type DescriptifTechniqueERPBase = {
4
4
  'date'?: Date;
5
5
  'statut'?: StatutEnum;
6
6
  'categorie'?: CategorieEnum;
7
+ 'r143_20'?: boolean;
7
8
  'type_activite'?: ActiviteErp;
8
9
  'types_activites_secondaires'?: Array<ActiviteErp>;
9
10
  'periodicite'?: number;
@@ -0,0 +1,5 @@
1
+ export type OrganisationPreferences = {
2
+ 'platau_id_acteur'?: string;
3
+ 'platau_active'?: boolean;
4
+ 's3_global_endpoint'?: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,6 +4,7 @@ export type PassageCommissionDossier = {
4
4
  'id'?: string;
5
5
  'dossier'?: Dossier;
6
6
  'avis'?: Avis;
7
+ 'date_de_passage'?: Date;
7
8
  'statut'?: StatutEnum;
8
9
  };
9
10
  export declare enum StatutEnum {
@@ -4,6 +4,7 @@ export type PieceJointe = {
4
4
  'nom'?: string;
5
5
  'description'?: string;
6
6
  'type'?: TypeEnum;
7
+ 'est_sensible'?: boolean;
7
8
  };
8
9
  export declare enum TypeEnum {
9
10
  Photo = "photo",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@metarisc/metarisc-js",
3
3
  "main": "lib/index.js",
4
4
  "types": "lib/index.d.ts",
5
- "version": "0.0.1-alpha.68",
5
+ "version": "0.0.1-alpha.69",
6
6
  "scripts": {
7
7
  "lint": "eslint . --ext .ts --fix",
8
8
  "compile": "tsc",
@@ -42,7 +42,7 @@ export class DatesPassageCommissionAPI extends Core {
42
42
  /**
43
43
  * Ajout d'un dossier à l'ordre du jour d'un passage en commission.
44
44
  */
45
- async postCommissionDateDossier(dateId: string, params : { dossierId : string, }): Promise<AxiosResponse<PassageCommissionDossier>>
45
+ async postCommissionDateDossier(dateId: string, params : { dossierId : string, dateDePassage ? : Date }): Promise<AxiosResponse<PassageCommissionDossier>>
46
46
  {
47
47
  const pathVariable = { 'date_id': (new String(dateId)).toString() };
48
48
  return this.request({
@@ -115,7 +115,7 @@ export class DossiersAPI extends Core {
115
115
  /**
116
116
  * Ajout d'un document.
117
117
  */
118
- async postDocumentsDossier(dossierId: string, params : { url : string, nom ? : string, description ? : string, type ? : string }): Promise<AxiosResponse<PieceJointe>>
118
+ async postDocumentsDossier(dossierId: string, params : { url : string, estSensible : boolean, nom ? : string, description ? : string, type ? : string, }): Promise<AxiosResponse<PieceJointe>>
119
119
  {
120
120
  const pathVariable = { 'dossier_id': (new String(dossierId)).toString() };
121
121
  return this.request({
package/src/api/ERPAPI.ts CHANGED
@@ -115,7 +115,7 @@ export class ERPAPI extends Core {
115
115
  /**
116
116
  * Ajout d'un document.
117
117
  */
118
- async postDocumentsErp(erpId: string, params : { url : string, nom ? : string, description ? : string, type ? : string }): Promise<AxiosResponse<PieceJointe>>
118
+ async postDocumentsErp(erpId: string, params : { url : string, estSensible : boolean, nom ? : string, description ? : string, type ? : string, }): Promise<AxiosResponse<PieceJointe>>
119
119
  {
120
120
  const pathVariable = { 'erp_id': (new String(erpId)).toString() };
121
121
  return this.request({
@@ -52,6 +52,20 @@ export class NotificationsAPI extends Core {
52
52
  });
53
53
  }
54
54
 
55
+ /**
56
+ * Permet de marquer la notification donnée comme lue par l'utilisateur.
57
+ */
58
+ async notificationMarquerCommeLue(notificationId: string): Promise<AxiosResponse<Notification>>
59
+ {
60
+ const pathVariable = { 'notification_id': (new String(notificationId)).toString() };
61
+ return this.request({
62
+ method: 'POST',
63
+ endpoint: Utils.constructPath(pathVariable, '/notifications/{notification_id}/marquer_comme_lue'),
64
+ params: { },
65
+ body: Utils.payloadFilter({})
66
+ });
67
+ }
68
+
55
69
  /**
56
70
  * Création d'une notification.
57
71
  */
@@ -12,7 +12,7 @@ export class OrdresDuJourAPI extends Core {
12
12
  /**
13
13
  * Mise à jour des détails d'un dossier lié à une date de passage en commission
14
14
  */
15
- async updateCommissionDateDossier(dossierId: string, params : { avis ? : { type? : string } }): Promise<AxiosResponse<PassageCommissionDossier>>
15
+ async updateCommissionDateDossier(dossierId: string, params : { avis ? : { type? : string } , dateDePassage ? : Date }): Promise<AxiosResponse<PassageCommissionDossier>>
16
16
  {
17
17
  const pathVariable = { 'dossier_id': (new String(dossierId)).toString() };
18
18
  return this.request({
@@ -6,6 +6,7 @@ import { Collection } from "../collection";
6
6
  import { Organisation } from '../model/Organisation';
7
7
  import { OrganisationGeoservice } from '../model/OrganisationGeoservice';
8
8
  import { OrganisationMembre } from '../model/OrganisationMembre';
9
+ import { OrganisationPreferences } from '../model/OrganisationPreferences';
9
10
  import { ReglesDeci } from '../model/ReglesDeci';
10
11
  import { WorkflowType } from '../model/WorkflowType';
11
12
 
@@ -28,6 +29,20 @@ export class OrganisationsAPI extends Core {
28
29
  });
29
30
  }
30
31
 
32
+ /**
33
+ * Ensemble des paramétrages et des configurations liés aux règles métiers de l'organisation.
34
+ */
35
+ async getOrganisationPreferences(orgId: string): Promise<AxiosResponse<OrganisationPreferences>>
36
+ {
37
+ const pathVariable = { 'org_id': (new String(orgId)).toString() };
38
+ return this.request({
39
+ method: 'GET',
40
+ endpoint: Utils.constructPath(pathVariable, '/organisations/{org_id}/preferences'),
41
+ params: { },
42
+ body: Utils.payloadFilter({})
43
+ });
44
+ }
45
+
31
46
  /**
32
47
  * Ensemble de règles utilisées pour le calcul de la conformité et de la performance DECI.
33
48
  */
package/src/api/PEIAPI.ts CHANGED
@@ -7,6 +7,7 @@ import { Contact } from '../model/Contact';
7
7
  import { Dossier } from '../model/Dossier';
8
8
  import { PEI } from '../model/PEI';
9
9
  import { PieceJointe } from '../model/PieceJointe';
10
+ import { AnomaliePEI } from '../model/AnomaliePEI';
10
11
  import { DescriptifTechniqueDECI } from '../model/DescriptifTechniqueDECI';
11
12
 
12
13
  export class PEIAPI extends Core {
@@ -28,6 +29,20 @@ export class PEIAPI extends Core {
28
29
  });
29
30
  }
30
31
 
32
+ /**
33
+ * Récupération de la liste des anomalies DECI détectées sur le PEI.
34
+ */
35
+ paginatePeiAnomalies(peiId: string, page?: number, perPage?: number): Collection<AnomaliePEI>
36
+ {
37
+ const pathVariable = { 'pei_id': (new String(peiId)).toString() };
38
+ return this.collect<AnomaliePEI>({
39
+ method: 'GET',
40
+ endpoint: Utils.constructPath(pathVariable, '/pei/{pei_id}/anomalies'),
41
+ params: { 'page': page?.toString(), 'per_page': perPage?.toString() },
42
+ body: Utils.payloadFilter({})
43
+ });
44
+ }
45
+
31
46
  /**
32
47
  * Récupération de la liste des contacts.
33
48
  */
@@ -115,7 +130,7 @@ export class PEIAPI extends Core {
115
130
  /**
116
131
  * Ajout d'un document.
117
132
  */
118
- async postDocumentsPei(peiId: string, params : { url : string, nom ? : string, description ? : string, type ? : string }): Promise<AxiosResponse<PieceJointe>>
133
+ async postDocumentsPei(peiId: string, params : { url : string, estSensible : boolean, nom ? : string, description ? : string, type ? : string, }): Promise<AxiosResponse<PieceJointe>>
119
134
  {
120
135
  const pathVariable = { 'pei_id': (new String(peiId)).toString() };
121
136
  return this.request({
@@ -143,7 +158,7 @@ export class PEIAPI extends Core {
143
158
  /**
144
159
  * Ajout d'un PEI.
145
160
  */
146
- async postPei(params : { implantation : { code_postal? : string, commune? : string, voie? : string, code_insee? : string, arrondissement? : number, arrondissement_municipal? : string, latitude? : number, longitude? : number, localisation_operationnelle? : string, complement? : string }, referencesExterieures ? : { titre? : string, valeur? : string }[], numero ? : string, numeroCompteur ? : string, numeroSerieAppareil ? : string }): Promise<AxiosResponse<PEI>>
161
+ async postPei(params : { descriptifTechnique : { type : string, domanialite? : string, observations_generales? : string, statut : string, surpression? : number, nature : string, debit_1bar? : number, pression? : number, pression_statique? : number, debit_gueule_bee? : number, volume? : number }, implantation : { code_postal? : string, commune? : string, voie? : string, code_insee? : string, arrondissement? : number, arrondissement_municipal? : string, latitude? : number, longitude? : number, localisation_operationnelle? : string, complement? : string }, referencesExterieures ? : { titre? : string, valeur? : string }[], numero ? : string, numeroCompteur ? : string, numeroSerieAppareil ? : string }): Promise<AxiosResponse<PEI>>
147
162
  {
148
163
  const pathVariable = { };
149
164
  return this.request({
@@ -42,7 +42,7 @@ export class WorkflowsAPI extends Core {
42
42
  /**
43
43
  * Ajout d'un document.
44
44
  */
45
- async postDocumentsWorkflow(workflowId: string, params : { url : string, nom ? : string, description ? : string, type ? : string }): Promise<AxiosResponse<PieceJointe>>
45
+ async postDocumentsWorkflow(workflowId: string, params : { url : string, estSensible : boolean, nom ? : string, description ? : string, type ? : string, }): Promise<AxiosResponse<PieceJointe>>
46
46
  {
47
47
  const pathVariable = { 'workflow_id': (new String(workflowId)).toString() };
48
48
  return this.request({
@@ -5,6 +5,7 @@ export type DescriptifTechniqueERPBase = {
5
5
  'date'?: Date;
6
6
  'statut'?: StatutEnum;
7
7
  'categorie'?: CategorieEnum;
8
+ 'r143_20'?: boolean;
8
9
  'type_activite'?: ActiviteErp;
9
10
  'types_activites_secondaires'?: Array<ActiviteErp>;
10
11
  'periodicite'?: number;
@@ -0,0 +1,5 @@
1
+ export type OrganisationPreferences = {
2
+ 'platau_id_acteur'?: string;
3
+ 'platau_active'?: boolean;
4
+ 's3_global_endpoint'?: string;
5
+ };
@@ -5,6 +5,7 @@ export type PassageCommissionDossier = {
5
5
  'id'?: string;
6
6
  'dossier'?: Dossier;
7
7
  'avis'?: Avis;
8
+ 'date_de_passage'?: Date;
8
9
  'statut'?: StatutEnum;
9
10
  };
10
11
 
@@ -4,6 +4,7 @@ export type PieceJointe = {
4
4
  'nom'?: string;
5
5
  'description'?: string;
6
6
  'type'?: TypeEnum;
7
+ 'est_sensible'?: boolean;
7
8
  };
8
9
 
9
10
  export enum TypeEnum {