@metarisc/metarisc-js 0.0.1-alpha.25 → 0.0.1-alpha.27
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/PEIAPI.d.ts +2 -2
- package/lib/client.d.ts +2 -1
- package/lib/client.js +2 -0
- package/lib/core.d.ts +2 -1
- package/lib/core.js +1 -1
- package/lib/model/AnomaliePEI.d.ts +8 -0
- package/lib/model/{DescriptifTechnique.d.ts → DescriptifTechniqueDECI.d.ts} +13 -19
- package/lib/model/DescriptifTechniqueDECI.js +38 -0
- package/lib/model/DescriptifTechniqueDECIBase.d.ts +22 -6
- package/lib/model/DescriptifTechniqueDECIBase.js +15 -1
- package/lib/model/DescriptifTechniquePENA.d.ts +12 -19
- package/lib/model/DescriptifTechniquePENA.js +15 -17
- package/lib/model/DescriptifTechniquePIBI.d.ts +16 -7
- package/lib/model/DescriptifTechniquePIBI.js +15 -6
- package/lib/model/PEI.d.ts +28 -5
- package/lib/model/PEI.js +24 -0
- package/package.json +1 -1
- package/src/api/PEIAPI.ts +3 -3
- package/src/client.ts +4 -2
- package/src/core.ts +3 -2
- package/src/model/AnomaliePEI.ts +9 -0
- package/src/model/{DescriptifTechnique.ts → DescriptifTechniqueDECI.ts} +15 -22
- package/src/model/DescriptifTechniqueDECIBase.ts +24 -7
- package/src/model/DescriptifTechniquePENA.ts +13 -21
- package/src/model/DescriptifTechniquePIBI.ts +18 -9
- package/src/model/PEI.ts +29 -5
- package/lib/model/DescriptifTechnique.js +0 -45
- package/lib/model/DescriptifTechniqueBase.d.ts +0 -5
- package/lib/model/DescriptifTechniquePENAAllOfRealimentation.d.ts +0 -10
- package/lib/model/DescriptifTechniquePENAAllOfRealimentation.js +0 -9
- package/lib/model/DescriptifTechniquePENAAllOfVolumes.d.ts +0 -4
- package/lib/model/DescriptifTechniquePENAAllOfVolumes.js +0 -2
- package/lib/model/DescriptifTechniquePIBIAllOfPesees.d.ts +0 -6
- package/lib/model/DescriptifTechniquePIBIAllOfPesees.js +0 -2
- package/src/model/DescriptifTechniqueBase.ts +0 -5
- package/src/model/DescriptifTechniquePENAAllOfRealimentation.ts +0 -11
- package/src/model/DescriptifTechniquePENAAllOfVolumes.ts +0 -4
- package/src/model/DescriptifTechniquePIBIAllOfPesees.ts +0 -6
- /package/lib/model/{DescriptifTechniqueBase.js → AnomaliePEI.js} +0 -0
package/lib/api/PEIAPI.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Client } from "../client";
|
|
|
4
4
|
import { Collection } from "../collection";
|
|
5
5
|
import { PEI } from '../model/PEI';
|
|
6
6
|
import { Contact } from '../model/Contact';
|
|
7
|
-
import {
|
|
7
|
+
import { DescriptifTechniqueDECI } from '../model/DescriptifTechniqueDECI';
|
|
8
8
|
import { PieceJointe } from '../model/PieceJointe';
|
|
9
9
|
export declare class PEIAPI extends Core {
|
|
10
10
|
constructor(config: MetariscConfig, client?: Client);
|
|
@@ -32,7 +32,7 @@ export declare class PEIAPI extends Core {
|
|
|
32
32
|
* @param page Numéro de page
|
|
33
33
|
* @param perPage Nombre de résultats demandé
|
|
34
34
|
*/
|
|
35
|
-
paginatePeiHistorique(peiId: string, page?: number, perPage?: number): Collection<
|
|
35
|
+
paginatePeiHistorique(peiId: string, page?: number, perPage?: number): Collection<DescriptifTechniqueDECI>;
|
|
36
36
|
/**
|
|
37
37
|
* Récupération de la liste des pièces jointes d'un Point d'Eau Incendie.
|
|
38
38
|
* @param peiId Identifiant unique du PEI
|
package/lib/client.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AxiosResponse } from "axios";
|
|
2
2
|
import { MetariscConfig, OAuth2Options } from "./core";
|
|
3
|
+
import { GrantResponse } from "./auth/oauth2";
|
|
3
4
|
interface RequestConfig {
|
|
4
5
|
body?: any;
|
|
5
6
|
headers?: {
|
|
@@ -21,7 +22,7 @@ export declare class Client {
|
|
|
21
22
|
private access_token?;
|
|
22
23
|
private refresh_token?;
|
|
23
24
|
constructor(config: MetariscConfig);
|
|
24
|
-
authenticate(auth_method: AuthMethod, options: OAuth2Options): Promise<
|
|
25
|
+
authenticate(auth_method: AuthMethod, options: OAuth2Options): Promise<GrantResponse>;
|
|
25
26
|
/**
|
|
26
27
|
* Lance une requête (authentifiée si possible) sur l'API Metarisc.
|
|
27
28
|
*/
|
package/lib/client.js
CHANGED
|
@@ -68,10 +68,12 @@ class Client {
|
|
|
68
68
|
const response = await this.oauth2.getAuthorizationCode(options);
|
|
69
69
|
this.setAccessToken(response.token_type + " " + response.access_token);
|
|
70
70
|
this.setRefreshToken(response.refresh_token);
|
|
71
|
+
return response;
|
|
71
72
|
}
|
|
72
73
|
else if (auth_method === AuthMethod.CLIENT_CREDENTIALS) {
|
|
73
74
|
const response = await this.oauth2.getClientCredentials(options);
|
|
74
75
|
this.setAccessToken(response.token_type + " " + response.access_token);
|
|
76
|
+
return response;
|
|
75
77
|
}
|
|
76
78
|
else {
|
|
77
79
|
throw new Error("auth_method inconnue");
|
package/lib/core.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AxiosResponse } from "axios";
|
|
2
2
|
import { AuthMethod, Client } from "./client";
|
|
3
3
|
import { Collection } from "./collection";
|
|
4
|
+
import { GrantResponse } from "./auth/oauth2";
|
|
4
5
|
interface RequestConfig {
|
|
5
6
|
body?: any;
|
|
6
7
|
headers?: {
|
|
@@ -31,7 +32,7 @@ export declare class Core {
|
|
|
31
32
|
constructor(config: MetariscConfig, client?: Client);
|
|
32
33
|
request<T>(config: RequestConfig): Promise<AxiosResponse<T>>;
|
|
33
34
|
collect<T>(config: RequestConfig): Collection<T>;
|
|
34
|
-
authenticate(auth_method: AuthMethod, options: OAuth2Options): Promise<
|
|
35
|
+
authenticate(auth_method: AuthMethod, options: OAuth2Options): Promise<GrantResponse>;
|
|
35
36
|
setAccessToken(access_token: string): void;
|
|
36
37
|
setRefreshToken(refresh_token: string): void;
|
|
37
38
|
}
|
package/lib/core.js
CHANGED
|
@@ -19,7 +19,7 @@ class Core {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
async authenticate(auth_method, options) {
|
|
22
|
-
await this.client.authenticate(auth_method, options);
|
|
22
|
+
return await this.client.authenticate(auth_method, options);
|
|
23
23
|
}
|
|
24
24
|
setAccessToken(access_token) {
|
|
25
25
|
this.client.setAccessToken(access_token);
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import { DescriptifTechniquePENA } from '../../src/model/DescriptifTechniquePENA';
|
|
2
2
|
import { DescriptifTechniquePIBI } from '../../src/model/DescriptifTechniquePIBI';
|
|
3
|
-
export type
|
|
3
|
+
export type DescriptifTechniqueDECI = DescriptifTechniquePIBI | DescriptifTechniquePENA;
|
|
4
|
+
export declare enum TypeEnum {
|
|
5
|
+
Pibi = "PIBI",
|
|
6
|
+
Pena = "PENA"
|
|
7
|
+
}
|
|
4
8
|
export declare enum DomanialiteEnum {
|
|
5
9
|
Privee = "privee",
|
|
6
10
|
Publique = "publique",
|
|
7
11
|
PriveeConventionnee = "privee_conventionnee"
|
|
8
12
|
}
|
|
13
|
+
export declare enum StatutEnum {
|
|
14
|
+
RepriseDeDonnees = "reprise_de_donnees",
|
|
15
|
+
DeclarationEnCours = "declaration_en_cours",
|
|
16
|
+
ReconnaissanceOperationnelleInitiale = "reconnaissance_operationnelle_initiale",
|
|
17
|
+
Actif = "actif",
|
|
18
|
+
Projet = "projet",
|
|
19
|
+
Reforme = "reforme"
|
|
20
|
+
}
|
|
9
21
|
export declare enum NatureEnum {
|
|
10
22
|
PointAspiration = "POINT_ASPIRATION",
|
|
11
23
|
CiterneAerienne = "CITERNE_AERIENNE",
|
|
@@ -20,21 +32,3 @@ export declare enum NatureEnum {
|
|
|
20
32
|
PoteauAspiration2x100 = "POTEAU_ASPIRATION_2x100",
|
|
21
33
|
BoucheAspiration1x100 = "BOUCHE_ASPIRATION_1x100"
|
|
22
34
|
}
|
|
23
|
-
export declare enum CaracteristiquesParticulieresEnum {
|
|
24
|
-
Renversable = "RENVERSABLE",
|
|
25
|
-
PreMelange = "PRE_MELANGE"
|
|
26
|
-
}
|
|
27
|
-
export declare enum EssaisEnginUtiliseEnum {
|
|
28
|
-
Aucun = "AUCUN",
|
|
29
|
-
Fpt = "FPT",
|
|
30
|
-
Mpr = "MPR",
|
|
31
|
-
Ccf = "CCF"
|
|
32
|
-
}
|
|
33
|
-
export declare enum EquipementsEnum {
|
|
34
|
-
Guichet = "GUICHET",
|
|
35
|
-
CanneAspiration = "CANNE_ASPIRATION",
|
|
36
|
-
Puit = "PUIT",
|
|
37
|
-
TrouHomme = "TROU_HOMME",
|
|
38
|
-
RaccordTournant = "RACCORD_TOURNANT",
|
|
39
|
-
PriseDirecte = "PRISE_DIRECTE"
|
|
40
|
-
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NatureEnum = exports.StatutEnum = exports.DomanialiteEnum = exports.TypeEnum = void 0;
|
|
4
|
+
var TypeEnum;
|
|
5
|
+
(function (TypeEnum) {
|
|
6
|
+
TypeEnum["Pibi"] = "PIBI";
|
|
7
|
+
TypeEnum["Pena"] = "PENA";
|
|
8
|
+
})(TypeEnum = exports.TypeEnum || (exports.TypeEnum = {}));
|
|
9
|
+
var DomanialiteEnum;
|
|
10
|
+
(function (DomanialiteEnum) {
|
|
11
|
+
DomanialiteEnum["Privee"] = "privee";
|
|
12
|
+
DomanialiteEnum["Publique"] = "publique";
|
|
13
|
+
DomanialiteEnum["PriveeConventionnee"] = "privee_conventionnee";
|
|
14
|
+
})(DomanialiteEnum = exports.DomanialiteEnum || (exports.DomanialiteEnum = {}));
|
|
15
|
+
var StatutEnum;
|
|
16
|
+
(function (StatutEnum) {
|
|
17
|
+
StatutEnum["RepriseDeDonnees"] = "reprise_de_donnees";
|
|
18
|
+
StatutEnum["DeclarationEnCours"] = "declaration_en_cours";
|
|
19
|
+
StatutEnum["ReconnaissanceOperationnelleInitiale"] = "reconnaissance_operationnelle_initiale";
|
|
20
|
+
StatutEnum["Actif"] = "actif";
|
|
21
|
+
StatutEnum["Projet"] = "projet";
|
|
22
|
+
StatutEnum["Reforme"] = "reforme";
|
|
23
|
+
})(StatutEnum = exports.StatutEnum || (exports.StatutEnum = {}));
|
|
24
|
+
var NatureEnum;
|
|
25
|
+
(function (NatureEnum) {
|
|
26
|
+
NatureEnum["PointAspiration"] = "POINT_ASPIRATION";
|
|
27
|
+
NatureEnum["CiterneAerienne"] = "CITERNE_AERIENNE";
|
|
28
|
+
NatureEnum["CiterneEnterree"] = "CITERNE_ENTERREE";
|
|
29
|
+
NatureEnum["CiterneSemiEnterree"] = "CITERNE_SEMI_ENTERREE";
|
|
30
|
+
NatureEnum["CiterneSouple"] = "CITERNE_SOUPLE";
|
|
31
|
+
NatureEnum["ReserveAerienne"] = "RESERVE_AERIENNE";
|
|
32
|
+
NatureEnum["PoteauRelais"] = "POTEAU_RELAIS";
|
|
33
|
+
NatureEnum["PuisardAspiration"] = "PUISARD_ASPIRATION";
|
|
34
|
+
NatureEnum["PriseDeportee"] = "PRISE_DEPORTEE";
|
|
35
|
+
NatureEnum["PoteauAspiration1x100"] = "POTEAU_ASPIRATION_1x100";
|
|
36
|
+
NatureEnum["PoteauAspiration2x100"] = "POTEAU_ASPIRATION_2x100";
|
|
37
|
+
NatureEnum["BoucheAspiration1x100"] = "BOUCHE_ASPIRATION_1x100";
|
|
38
|
+
})(NatureEnum = exports.NatureEnum || (exports.NatureEnum = {}));
|
|
@@ -1,16 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
'
|
|
1
|
+
import { AnomaliePEI } from '../../src/model/AnomaliePEI';
|
|
2
|
+
export type DescriptifTechniqueDECIBase = {
|
|
3
|
+
'id'?: string;
|
|
4
|
+
'type'?: TypeEnum;
|
|
5
|
+
'anomalies'?: Array<AnomaliePEI>;
|
|
5
6
|
'est_reglementaire'?: boolean;
|
|
6
|
-
'est_reforme'?: boolean;
|
|
7
7
|
'domanialite'?: DomanialiteEnum;
|
|
8
|
-
'
|
|
8
|
+
'est_conforme_rddeci'?: boolean;
|
|
9
9
|
'performance_theorique'?: number;
|
|
10
10
|
'performance_reelle'?: number;
|
|
11
|
+
'observations_generales'?: string;
|
|
12
|
+
'date'?: Date;
|
|
13
|
+
'statut'?: StatutEnum;
|
|
14
|
+
'est_disponible'?: boolean;
|
|
11
15
|
};
|
|
16
|
+
export declare enum TypeEnum {
|
|
17
|
+
Pibi = "PIBI",
|
|
18
|
+
Pena = "PENA"
|
|
19
|
+
}
|
|
12
20
|
export declare enum DomanialiteEnum {
|
|
13
21
|
Privee = "privee",
|
|
14
22
|
Publique = "publique",
|
|
15
23
|
PriveeConventionnee = "privee_conventionnee"
|
|
16
24
|
}
|
|
25
|
+
export declare enum StatutEnum {
|
|
26
|
+
RepriseDeDonnees = "reprise_de_donnees",
|
|
27
|
+
DeclarationEnCours = "declaration_en_cours",
|
|
28
|
+
ReconnaissanceOperationnelleInitiale = "reconnaissance_operationnelle_initiale",
|
|
29
|
+
Actif = "actif",
|
|
30
|
+
Projet = "projet",
|
|
31
|
+
Reforme = "reforme"
|
|
32
|
+
}
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DomanialiteEnum = void 0;
|
|
3
|
+
exports.StatutEnum = exports.DomanialiteEnum = exports.TypeEnum = void 0;
|
|
4
|
+
var TypeEnum;
|
|
5
|
+
(function (TypeEnum) {
|
|
6
|
+
TypeEnum["Pibi"] = "PIBI";
|
|
7
|
+
TypeEnum["Pena"] = "PENA";
|
|
8
|
+
})(TypeEnum = exports.TypeEnum || (exports.TypeEnum = {}));
|
|
4
9
|
var DomanialiteEnum;
|
|
5
10
|
(function (DomanialiteEnum) {
|
|
6
11
|
DomanialiteEnum["Privee"] = "privee";
|
|
7
12
|
DomanialiteEnum["Publique"] = "publique";
|
|
8
13
|
DomanialiteEnum["PriveeConventionnee"] = "privee_conventionnee";
|
|
9
14
|
})(DomanialiteEnum = exports.DomanialiteEnum || (exports.DomanialiteEnum = {}));
|
|
15
|
+
var StatutEnum;
|
|
16
|
+
(function (StatutEnum) {
|
|
17
|
+
StatutEnum["RepriseDeDonnees"] = "reprise_de_donnees";
|
|
18
|
+
StatutEnum["DeclarationEnCours"] = "declaration_en_cours";
|
|
19
|
+
StatutEnum["ReconnaissanceOperationnelleInitiale"] = "reconnaissance_operationnelle_initiale";
|
|
20
|
+
StatutEnum["Actif"] = "actif";
|
|
21
|
+
StatutEnum["Projet"] = "projet";
|
|
22
|
+
StatutEnum["Reforme"] = "reforme";
|
|
23
|
+
})(StatutEnum = exports.StatutEnum || (exports.StatutEnum = {}));
|
|
@@ -1,31 +1,24 @@
|
|
|
1
|
-
import { DescriptifTechniquePENAAllOfRealimentation } from '../../src/model/DescriptifTechniquePENAAllOfRealimentation';
|
|
2
|
-
import { DescriptifTechniquePENAAllOfVolumes } from '../../src/model/DescriptifTechniquePENAAllOfVolumes';
|
|
3
1
|
import { DescriptifTechniqueDECIBase } from '../model/DescriptifTechniqueDECIBase';
|
|
4
2
|
export type DescriptifTechniquePENA = DescriptifTechniqueDECIBase & {
|
|
5
|
-
'essais_engin_utilise'?: EssaisEnginUtiliseEnum;
|
|
6
|
-
'equipements'?: EquipementsEnum;
|
|
7
3
|
'nature'?: NatureEnum;
|
|
8
|
-
'
|
|
9
|
-
'realimentation'?: Array<DescriptifTechniquePENAAllOfRealimentation>;
|
|
4
|
+
'volume'?: number;
|
|
10
5
|
};
|
|
6
|
+
export declare enum TypeEnum {
|
|
7
|
+
Pibi = "PIBI",
|
|
8
|
+
Pena = "PENA"
|
|
9
|
+
}
|
|
11
10
|
export declare enum DomanialiteEnum {
|
|
12
11
|
Privee = "privee",
|
|
13
12
|
Publique = "publique",
|
|
14
13
|
PriveeConventionnee = "privee_conventionnee"
|
|
15
14
|
}
|
|
16
|
-
export declare enum
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Guichet = "GUICHET",
|
|
24
|
-
CanneAspiration = "CANNE_ASPIRATION",
|
|
25
|
-
Puit = "PUIT",
|
|
26
|
-
TrouHomme = "TROU_HOMME",
|
|
27
|
-
RaccordTournant = "RACCORD_TOURNANT",
|
|
28
|
-
PriseDirecte = "PRISE_DIRECTE"
|
|
15
|
+
export declare enum StatutEnum {
|
|
16
|
+
RepriseDeDonnees = "reprise_de_donnees",
|
|
17
|
+
DeclarationEnCours = "declaration_en_cours",
|
|
18
|
+
ReconnaissanceOperationnelleInitiale = "reconnaissance_operationnelle_initiale",
|
|
19
|
+
Actif = "actif",
|
|
20
|
+
Projet = "projet",
|
|
21
|
+
Reforme = "reforme"
|
|
29
22
|
}
|
|
30
23
|
export declare enum NatureEnum {
|
|
31
24
|
PointAspiration = "POINT_ASPIRATION",
|
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NatureEnum = exports.
|
|
3
|
+
exports.NatureEnum = exports.StatutEnum = exports.DomanialiteEnum = exports.TypeEnum = void 0;
|
|
4
|
+
var TypeEnum;
|
|
5
|
+
(function (TypeEnum) {
|
|
6
|
+
TypeEnum["Pibi"] = "PIBI";
|
|
7
|
+
TypeEnum["Pena"] = "PENA";
|
|
8
|
+
})(TypeEnum = exports.TypeEnum || (exports.TypeEnum = {}));
|
|
4
9
|
var DomanialiteEnum;
|
|
5
10
|
(function (DomanialiteEnum) {
|
|
6
11
|
DomanialiteEnum["Privee"] = "privee";
|
|
7
12
|
DomanialiteEnum["Publique"] = "publique";
|
|
8
13
|
DomanialiteEnum["PriveeConventionnee"] = "privee_conventionnee";
|
|
9
14
|
})(DomanialiteEnum = exports.DomanialiteEnum || (exports.DomanialiteEnum = {}));
|
|
10
|
-
var
|
|
11
|
-
(function (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
(
|
|
19
|
-
EquipementsEnum["Guichet"] = "GUICHET";
|
|
20
|
-
EquipementsEnum["CanneAspiration"] = "CANNE_ASPIRATION";
|
|
21
|
-
EquipementsEnum["Puit"] = "PUIT";
|
|
22
|
-
EquipementsEnum["TrouHomme"] = "TROU_HOMME";
|
|
23
|
-
EquipementsEnum["RaccordTournant"] = "RACCORD_TOURNANT";
|
|
24
|
-
EquipementsEnum["PriseDirecte"] = "PRISE_DIRECTE";
|
|
25
|
-
})(EquipementsEnum = exports.EquipementsEnum || (exports.EquipementsEnum = {}));
|
|
15
|
+
var StatutEnum;
|
|
16
|
+
(function (StatutEnum) {
|
|
17
|
+
StatutEnum["RepriseDeDonnees"] = "reprise_de_donnees";
|
|
18
|
+
StatutEnum["DeclarationEnCours"] = "declaration_en_cours";
|
|
19
|
+
StatutEnum["ReconnaissanceOperationnelleInitiale"] = "reconnaissance_operationnelle_initiale";
|
|
20
|
+
StatutEnum["Actif"] = "actif";
|
|
21
|
+
StatutEnum["Projet"] = "projet";
|
|
22
|
+
StatutEnum["Reforme"] = "reforme";
|
|
23
|
+
})(StatutEnum = exports.StatutEnum || (exports.StatutEnum = {}));
|
|
26
24
|
var NatureEnum;
|
|
27
25
|
(function (NatureEnum) {
|
|
28
26
|
NatureEnum["PointAspiration"] = "POINT_ASPIRATION";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DescriptifTechniquePIBIAllOfPesees } from '../../src/model/DescriptifTechniquePIBIAllOfPesees';
|
|
2
1
|
import { DescriptifTechniqueDECIBase } from '../model/DescriptifTechniqueDECIBase';
|
|
3
2
|
export type DescriptifTechniquePIBI = DescriptifTechniqueDECIBase & {
|
|
4
3
|
'numero_serie_appareil'?: string;
|
|
@@ -7,14 +6,28 @@ export type DescriptifTechniquePIBI = DescriptifTechniqueDECIBase & {
|
|
|
7
6
|
*/
|
|
8
7
|
'surpression'?: number;
|
|
9
8
|
'nature'?: NatureEnum;
|
|
10
|
-
'
|
|
11
|
-
'
|
|
9
|
+
'debit_1bar'?: number;
|
|
10
|
+
'pression'?: number;
|
|
11
|
+
'pression_statique'?: number;
|
|
12
|
+
'debit_gueule_bee'?: number;
|
|
12
13
|
};
|
|
14
|
+
export declare enum TypeEnum {
|
|
15
|
+
Pibi = "PIBI",
|
|
16
|
+
Pena = "PENA"
|
|
17
|
+
}
|
|
13
18
|
export declare enum DomanialiteEnum {
|
|
14
19
|
Privee = "privee",
|
|
15
20
|
Publique = "publique",
|
|
16
21
|
PriveeConventionnee = "privee_conventionnee"
|
|
17
22
|
}
|
|
23
|
+
export declare enum StatutEnum {
|
|
24
|
+
RepriseDeDonnees = "reprise_de_donnees",
|
|
25
|
+
DeclarationEnCours = "declaration_en_cours",
|
|
26
|
+
ReconnaissanceOperationnelleInitiale = "reconnaissance_operationnelle_initiale",
|
|
27
|
+
Actif = "actif",
|
|
28
|
+
Projet = "projet",
|
|
29
|
+
Reforme = "reforme"
|
|
30
|
+
}
|
|
18
31
|
export declare enum NatureEnum {
|
|
19
32
|
Pi1x65 = "PI1x65",
|
|
20
33
|
Pi1x65Pi2x45 = "PI1x65+PI2x45",
|
|
@@ -25,7 +38,3 @@ export declare enum NatureEnum {
|
|
|
25
38
|
Bi1x100 = "BI1x100",
|
|
26
39
|
Bi2x100 = "BI2x100"
|
|
27
40
|
}
|
|
28
|
-
export declare enum CaracteristiquesParticulieresEnum {
|
|
29
|
-
Renversable = "RENVERSABLE",
|
|
30
|
-
PreMelange = "PRE_MELANGE"
|
|
31
|
-
}
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.NatureEnum = exports.StatutEnum = exports.DomanialiteEnum = exports.TypeEnum = void 0;
|
|
4
|
+
var TypeEnum;
|
|
5
|
+
(function (TypeEnum) {
|
|
6
|
+
TypeEnum["Pibi"] = "PIBI";
|
|
7
|
+
TypeEnum["Pena"] = "PENA";
|
|
8
|
+
})(TypeEnum = exports.TypeEnum || (exports.TypeEnum = {}));
|
|
4
9
|
var DomanialiteEnum;
|
|
5
10
|
(function (DomanialiteEnum) {
|
|
6
11
|
DomanialiteEnum["Privee"] = "privee";
|
|
7
12
|
DomanialiteEnum["Publique"] = "publique";
|
|
8
13
|
DomanialiteEnum["PriveeConventionnee"] = "privee_conventionnee";
|
|
9
14
|
})(DomanialiteEnum = exports.DomanialiteEnum || (exports.DomanialiteEnum = {}));
|
|
15
|
+
var StatutEnum;
|
|
16
|
+
(function (StatutEnum) {
|
|
17
|
+
StatutEnum["RepriseDeDonnees"] = "reprise_de_donnees";
|
|
18
|
+
StatutEnum["DeclarationEnCours"] = "declaration_en_cours";
|
|
19
|
+
StatutEnum["ReconnaissanceOperationnelleInitiale"] = "reconnaissance_operationnelle_initiale";
|
|
20
|
+
StatutEnum["Actif"] = "actif";
|
|
21
|
+
StatutEnum["Projet"] = "projet";
|
|
22
|
+
StatutEnum["Reforme"] = "reforme";
|
|
23
|
+
})(StatutEnum = exports.StatutEnum || (exports.StatutEnum = {}));
|
|
10
24
|
var NatureEnum;
|
|
11
25
|
(function (NatureEnum) {
|
|
12
26
|
NatureEnum["Pi1x65"] = "PI1x65";
|
|
@@ -18,8 +32,3 @@ var NatureEnum;
|
|
|
18
32
|
NatureEnum["Bi1x100"] = "BI1x100";
|
|
19
33
|
NatureEnum["Bi2x100"] = "BI2x100";
|
|
20
34
|
})(NatureEnum = exports.NatureEnum || (exports.NatureEnum = {}));
|
|
21
|
-
var CaracteristiquesParticulieresEnum;
|
|
22
|
-
(function (CaracteristiquesParticulieresEnum) {
|
|
23
|
-
CaracteristiquesParticulieresEnum["Renversable"] = "RENVERSABLE";
|
|
24
|
-
CaracteristiquesParticulieresEnum["PreMelange"] = "PRE_MELANGE";
|
|
25
|
-
})(CaracteristiquesParticulieresEnum = exports.CaracteristiquesParticulieresEnum || (exports.CaracteristiquesParticulieresEnum = {}));
|
package/lib/model/PEI.d.ts
CHANGED
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
import { AdressePostale } from '../../src/model/AdressePostale';
|
|
2
|
-
import {
|
|
2
|
+
import { DescriptifTechniqueDECIBase } from '../../src/model/DescriptifTechniqueDECIBase';
|
|
3
3
|
import { PEIReferencesExterieuresInner } from '../../src/model/PEIReferencesExterieuresInner';
|
|
4
4
|
export type PEI = {
|
|
5
5
|
'id'?: string;
|
|
6
6
|
'date_de_realisation'?: Date;
|
|
7
7
|
'date_de_derniere_mise_a_jour'?: Date;
|
|
8
|
-
'statut'?: string;
|
|
9
8
|
'references_exterieures'?: Array<PEIReferencesExterieuresInner>;
|
|
10
|
-
'descriptif_technique'?:
|
|
11
|
-
'
|
|
12
|
-
'
|
|
9
|
+
'descriptif_technique'?: DescriptifTechniqueDECIBase;
|
|
10
|
+
'implantation'?: AdressePostale;
|
|
11
|
+
'genre'?: GenreEnum;
|
|
12
|
+
'numero'?: string;
|
|
13
|
+
'numero_compteur'?: string;
|
|
13
14
|
};
|
|
15
|
+
export declare enum GenreEnum {
|
|
16
|
+
Pi1x65 = "PI1x65",
|
|
17
|
+
Pi1x65Pi2x45 = "PI1x65+PI2x45",
|
|
18
|
+
Pi1x100 = "PI1x100",
|
|
19
|
+
Pi2x100 = "PI2x100",
|
|
20
|
+
Bi1x65 = "BI1x65",
|
|
21
|
+
Bi1x80 = "BI1x80",
|
|
22
|
+
Bi1x100 = "BI1x100",
|
|
23
|
+
Bi2x100 = "BI2x100",
|
|
24
|
+
PointAspiration = "POINT_ASPIRATION",
|
|
25
|
+
CiterneAerienne = "CITERNE_AERIENNE",
|
|
26
|
+
CiterneEnterree = "CITERNE_ENTERREE",
|
|
27
|
+
CiterneSemiEnterree = "CITERNE_SEMI_ENTERREE",
|
|
28
|
+
CiterneSouple = "CITERNE_SOUPLE",
|
|
29
|
+
ReserveAerienne = "RESERVE_AERIENNE",
|
|
30
|
+
PoteauRelais = "POTEAU_RELAIS",
|
|
31
|
+
PuisardAspiration = "PUISARD_ASPIRATION",
|
|
32
|
+
PriseDeportee = "PRISE_DEPORTEE",
|
|
33
|
+
PoteauAspiration1x100 = "POTEAU_ASPIRATION_1x100",
|
|
34
|
+
PoteauAspiration2x100 = "POTEAU_ASPIRATION_2x100",
|
|
35
|
+
BoucheAspiration1x100 = "BOUCHE_ASPIRATION_1x100"
|
|
36
|
+
}
|
package/lib/model/PEI.js
CHANGED
|
@@ -1,2 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GenreEnum = void 0;
|
|
4
|
+
var GenreEnum;
|
|
5
|
+
(function (GenreEnum) {
|
|
6
|
+
GenreEnum["Pi1x65"] = "PI1x65";
|
|
7
|
+
GenreEnum["Pi1x65Pi2x45"] = "PI1x65+PI2x45";
|
|
8
|
+
GenreEnum["Pi1x100"] = "PI1x100";
|
|
9
|
+
GenreEnum["Pi2x100"] = "PI2x100";
|
|
10
|
+
GenreEnum["Bi1x65"] = "BI1x65";
|
|
11
|
+
GenreEnum["Bi1x80"] = "BI1x80";
|
|
12
|
+
GenreEnum["Bi1x100"] = "BI1x100";
|
|
13
|
+
GenreEnum["Bi2x100"] = "BI2x100";
|
|
14
|
+
GenreEnum["PointAspiration"] = "POINT_ASPIRATION";
|
|
15
|
+
GenreEnum["CiterneAerienne"] = "CITERNE_AERIENNE";
|
|
16
|
+
GenreEnum["CiterneEnterree"] = "CITERNE_ENTERREE";
|
|
17
|
+
GenreEnum["CiterneSemiEnterree"] = "CITERNE_SEMI_ENTERREE";
|
|
18
|
+
GenreEnum["CiterneSouple"] = "CITERNE_SOUPLE";
|
|
19
|
+
GenreEnum["ReserveAerienne"] = "RESERVE_AERIENNE";
|
|
20
|
+
GenreEnum["PoteauRelais"] = "POTEAU_RELAIS";
|
|
21
|
+
GenreEnum["PuisardAspiration"] = "PUISARD_ASPIRATION";
|
|
22
|
+
GenreEnum["PriseDeportee"] = "PRISE_DEPORTEE";
|
|
23
|
+
GenreEnum["PoteauAspiration1x100"] = "POTEAU_ASPIRATION_1x100";
|
|
24
|
+
GenreEnum["PoteauAspiration2x100"] = "POTEAU_ASPIRATION_2x100";
|
|
25
|
+
GenreEnum["BoucheAspiration1x100"] = "BOUCHE_ASPIRATION_1x100";
|
|
26
|
+
})(GenreEnum = exports.GenreEnum || (exports.GenreEnum = {}));
|
package/package.json
CHANGED
package/src/api/PEIAPI.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { Client } from "../client";
|
|
|
5
5
|
import { Collection } from "../collection";
|
|
6
6
|
import { PEI } from '../model/PEI';
|
|
7
7
|
import { Contact } from '../model/Contact';
|
|
8
|
-
import {
|
|
8
|
+
import { DescriptifTechniqueDECI } from '../model/DescriptifTechniqueDECI';
|
|
9
9
|
import { PieceJointe } from '../model/PieceJointe';
|
|
10
10
|
|
|
11
11
|
export class PEIAPI extends Core {
|
|
@@ -70,10 +70,10 @@ export class PEIAPI extends Core {
|
|
|
70
70
|
* @param page Numéro de page
|
|
71
71
|
* @param perPage Nombre de résultats demandé
|
|
72
72
|
*/
|
|
73
|
-
paginatePeiHistorique(peiId: string, page?: number, perPage?: number): Collection<
|
|
73
|
+
paginatePeiHistorique(peiId: string, page?: number, perPage?: number): Collection<DescriptifTechniqueDECI>
|
|
74
74
|
{
|
|
75
75
|
const pathVariable = { 'pei_id': peiId };
|
|
76
|
-
return this.collect<
|
|
76
|
+
return this.collect<DescriptifTechniqueDECI>({
|
|
77
77
|
method: 'GET',
|
|
78
78
|
endpoint: Utils.constructPath(pathVariable, '/pei/{pei_id}/historique'),
|
|
79
79
|
headers: { },
|
package/src/client.ts
CHANGED
|
@@ -5,7 +5,7 @@ import axios, {
|
|
|
5
5
|
} from "axios";
|
|
6
6
|
import axiosRetry from "axios-retry";
|
|
7
7
|
import { MetariscConfig, OAuth2Options } from "./core";
|
|
8
|
-
import { OAuth2 } from "./auth/oauth2";
|
|
8
|
+
import { GrantResponse, OAuth2 } from "./auth/oauth2";
|
|
9
9
|
import { setupCache } from "axios-cache-interceptor";
|
|
10
10
|
import Utils from "./utils";
|
|
11
11
|
|
|
@@ -87,15 +87,17 @@ export class Client {
|
|
|
87
87
|
async authenticate(
|
|
88
88
|
auth_method: AuthMethod,
|
|
89
89
|
options: OAuth2Options
|
|
90
|
-
): Promise<
|
|
90
|
+
): Promise<GrantResponse> {
|
|
91
91
|
if(auth_method === AuthMethod.AUTHORIZATION_CODE) {
|
|
92
92
|
const response = await this.oauth2.getAuthorizationCode(options);
|
|
93
93
|
this.setAccessToken(response.token_type + " " + response.access_token);
|
|
94
94
|
this.setRefreshToken(response.refresh_token);
|
|
95
|
+
return response;
|
|
95
96
|
}
|
|
96
97
|
else if(auth_method === AuthMethod.CLIENT_CREDENTIALS) {
|
|
97
98
|
const response = await this.oauth2.getClientCredentials(options);
|
|
98
99
|
this.setAccessToken(response.token_type + " " + response.access_token);
|
|
100
|
+
return response;
|
|
99
101
|
}
|
|
100
102
|
else {
|
|
101
103
|
throw new Error("auth_method inconnue");
|
package/src/core.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AxiosResponse } from "axios";
|
|
2
2
|
import { AuthMethod, Client } from "./client";
|
|
3
3
|
import { Collection } from "./collection";
|
|
4
|
+
import { GrantResponse } from "./auth/oauth2";
|
|
4
5
|
|
|
5
6
|
interface RequestConfig {
|
|
6
7
|
body?: any;
|
|
@@ -49,8 +50,8 @@ export class Core {
|
|
|
49
50
|
async authenticate(
|
|
50
51
|
auth_method: AuthMethod,
|
|
51
52
|
options: OAuth2Options
|
|
52
|
-
): Promise<
|
|
53
|
-
await this.client.authenticate(auth_method, options);
|
|
53
|
+
): Promise<GrantResponse> {
|
|
54
|
+
return await this.client.authenticate(auth_method, options);
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
setAccessToken(access_token: string): void {
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { DescriptifTechniquePENA } from '../../src/model/DescriptifTechniquePENA';
|
|
2
2
|
import { DescriptifTechniquePIBI } from '../../src/model/DescriptifTechniquePIBI';
|
|
3
3
|
|
|
4
|
-
export type
|
|
4
|
+
export type DescriptifTechniqueDECI = DescriptifTechniquePIBI | DescriptifTechniquePENA;
|
|
5
|
+
|
|
6
|
+
export enum TypeEnum {
|
|
7
|
+
Pibi = 'PIBI',
|
|
8
|
+
Pena = 'PENA'
|
|
9
|
+
}
|
|
5
10
|
|
|
6
11
|
export enum DomanialiteEnum {
|
|
7
12
|
Privee = 'privee',
|
|
@@ -9,6 +14,15 @@ export enum DomanialiteEnum {
|
|
|
9
14
|
PriveeConventionnee = 'privee_conventionnee'
|
|
10
15
|
}
|
|
11
16
|
|
|
17
|
+
export enum StatutEnum {
|
|
18
|
+
RepriseDeDonnees = 'reprise_de_donnees',
|
|
19
|
+
DeclarationEnCours = 'declaration_en_cours',
|
|
20
|
+
ReconnaissanceOperationnelleInitiale = 'reconnaissance_operationnelle_initiale',
|
|
21
|
+
Actif = 'actif',
|
|
22
|
+
Projet = 'projet',
|
|
23
|
+
Reforme = 'reforme'
|
|
24
|
+
}
|
|
25
|
+
|
|
12
26
|
export enum NatureEnum {
|
|
13
27
|
PointAspiration = 'POINT_ASPIRATION',
|
|
14
28
|
CiterneAerienne = 'CITERNE_AERIENNE',
|
|
@@ -23,24 +37,3 @@ export enum NatureEnum {
|
|
|
23
37
|
PoteauAspiration2x100 = 'POTEAU_ASPIRATION_2x100',
|
|
24
38
|
BoucheAspiration1x100 = 'BOUCHE_ASPIRATION_1x100'
|
|
25
39
|
}
|
|
26
|
-
|
|
27
|
-
export enum CaracteristiquesParticulieresEnum {
|
|
28
|
-
Renversable = 'RENVERSABLE',
|
|
29
|
-
PreMelange = 'PRE_MELANGE'
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export enum EssaisEnginUtiliseEnum {
|
|
33
|
-
Aucun = 'AUCUN',
|
|
34
|
-
Fpt = 'FPT',
|
|
35
|
-
Mpr = 'MPR',
|
|
36
|
-
Ccf = 'CCF'
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export enum EquipementsEnum {
|
|
40
|
-
Guichet = 'GUICHET',
|
|
41
|
-
CanneAspiration = 'CANNE_ASPIRATION',
|
|
42
|
-
Puit = 'PUIT',
|
|
43
|
-
TrouHomme = 'TROU_HOMME',
|
|
44
|
-
RaccordTournant = 'RACCORD_TOURNANT',
|
|
45
|
-
PriseDirecte = 'PRISE_DIRECTE'
|
|
46
|
-
}
|
|
@@ -1,19 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnomaliePEI } from '../../src/model/AnomaliePEI';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
'anomalies'?: Array<
|
|
3
|
+
export type DescriptifTechniqueDECIBase = {
|
|
4
|
+
'id'?: string;
|
|
5
|
+
'type'?: TypeEnum;
|
|
6
|
+
'anomalies'?: Array<AnomaliePEI>;
|
|
7
7
|
'est_reglementaire'?: boolean;
|
|
8
|
-
'est_reforme'?: boolean;
|
|
9
8
|
'domanialite'?: DomanialiteEnum;
|
|
10
|
-
'
|
|
9
|
+
'est_conforme_rddeci'?: boolean;
|
|
11
10
|
'performance_theorique'?: number;
|
|
12
11
|
'performance_reelle'?: number;
|
|
12
|
+
'observations_generales'?: string;
|
|
13
|
+
'date'?: Date;
|
|
14
|
+
'statut'?: StatutEnum;
|
|
15
|
+
'est_disponible'?: boolean;
|
|
13
16
|
};
|
|
14
17
|
|
|
18
|
+
export enum TypeEnum {
|
|
19
|
+
Pibi = 'PIBI',
|
|
20
|
+
Pena = 'PENA'
|
|
21
|
+
}
|
|
22
|
+
|
|
15
23
|
export enum DomanialiteEnum {
|
|
16
24
|
Privee = 'privee',
|
|
17
25
|
Publique = 'publique',
|
|
18
26
|
PriveeConventionnee = 'privee_conventionnee'
|
|
19
27
|
}
|
|
28
|
+
|
|
29
|
+
export enum StatutEnum {
|
|
30
|
+
RepriseDeDonnees = 'reprise_de_donnees',
|
|
31
|
+
DeclarationEnCours = 'declaration_en_cours',
|
|
32
|
+
ReconnaissanceOperationnelleInitiale = 'reconnaissance_operationnelle_initiale',
|
|
33
|
+
Actif = 'actif',
|
|
34
|
+
Projet = 'projet',
|
|
35
|
+
Reforme = 'reforme'
|
|
36
|
+
}
|
|
@@ -1,36 +1,28 @@
|
|
|
1
|
-
import { DescriptifTechniquePENAAllOfRealimentation } from '../../src/model/DescriptifTechniquePENAAllOfRealimentation';
|
|
2
|
-
import { DescriptifTechniquePENAAllOfVolumes } from '../../src/model/DescriptifTechniquePENAAllOfVolumes';
|
|
3
|
-
|
|
4
1
|
import { DescriptifTechniqueDECIBase } from '../model/DescriptifTechniqueDECIBase';
|
|
5
2
|
|
|
6
3
|
export type DescriptifTechniquePENA = DescriptifTechniqueDECIBase & {
|
|
7
|
-
'essais_engin_utilise'?: EssaisEnginUtiliseEnum;
|
|
8
|
-
'equipements'?: EquipementsEnum;
|
|
9
4
|
'nature'?: NatureEnum;
|
|
10
|
-
'
|
|
11
|
-
'realimentation'?: Array<DescriptifTechniquePENAAllOfRealimentation>;
|
|
5
|
+
'volume'?: number;
|
|
12
6
|
};
|
|
13
7
|
|
|
8
|
+
export enum TypeEnum {
|
|
9
|
+
Pibi = 'PIBI',
|
|
10
|
+
Pena = 'PENA'
|
|
11
|
+
}
|
|
12
|
+
|
|
14
13
|
export enum DomanialiteEnum {
|
|
15
14
|
Privee = 'privee',
|
|
16
15
|
Publique = 'publique',
|
|
17
16
|
PriveeConventionnee = 'privee_conventionnee'
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
export enum
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export enum EquipementsEnum {
|
|
28
|
-
Guichet = 'GUICHET',
|
|
29
|
-
CanneAspiration = 'CANNE_ASPIRATION',
|
|
30
|
-
Puit = 'PUIT',
|
|
31
|
-
TrouHomme = 'TROU_HOMME',
|
|
32
|
-
RaccordTournant = 'RACCORD_TOURNANT',
|
|
33
|
-
PriseDirecte = 'PRISE_DIRECTE'
|
|
19
|
+
export enum StatutEnum {
|
|
20
|
+
RepriseDeDonnees = 'reprise_de_donnees',
|
|
21
|
+
DeclarationEnCours = 'declaration_en_cours',
|
|
22
|
+
ReconnaissanceOperationnelleInitiale = 'reconnaissance_operationnelle_initiale',
|
|
23
|
+
Actif = 'actif',
|
|
24
|
+
Projet = 'projet',
|
|
25
|
+
Reforme = 'reforme'
|
|
34
26
|
}
|
|
35
27
|
|
|
36
28
|
export enum NatureEnum {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { DescriptifTechniquePIBIAllOfPesees } from '../../src/model/DescriptifTechniquePIBIAllOfPesees';
|
|
2
|
-
|
|
3
1
|
import { DescriptifTechniqueDECIBase } from '../model/DescriptifTechniqueDECIBase';
|
|
4
2
|
|
|
5
3
|
export type DescriptifTechniquePIBI = DescriptifTechniqueDECIBase & {
|
|
@@ -9,16 +7,32 @@ export type DescriptifTechniquePIBI = DescriptifTechniqueDECIBase & {
|
|
|
9
7
|
*/
|
|
10
8
|
'surpression'?: number;
|
|
11
9
|
'nature'?: NatureEnum;
|
|
12
|
-
'
|
|
13
|
-
'
|
|
10
|
+
'debit_1bar'?: number;
|
|
11
|
+
'pression'?: number;
|
|
12
|
+
'pression_statique'?: number;
|
|
13
|
+
'debit_gueule_bee'?: number;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
+
export enum TypeEnum {
|
|
17
|
+
Pibi = 'PIBI',
|
|
18
|
+
Pena = 'PENA'
|
|
19
|
+
}
|
|
20
|
+
|
|
16
21
|
export enum DomanialiteEnum {
|
|
17
22
|
Privee = 'privee',
|
|
18
23
|
Publique = 'publique',
|
|
19
24
|
PriveeConventionnee = 'privee_conventionnee'
|
|
20
25
|
}
|
|
21
26
|
|
|
27
|
+
export enum StatutEnum {
|
|
28
|
+
RepriseDeDonnees = 'reprise_de_donnees',
|
|
29
|
+
DeclarationEnCours = 'declaration_en_cours',
|
|
30
|
+
ReconnaissanceOperationnelleInitiale = 'reconnaissance_operationnelle_initiale',
|
|
31
|
+
Actif = 'actif',
|
|
32
|
+
Projet = 'projet',
|
|
33
|
+
Reforme = 'reforme'
|
|
34
|
+
}
|
|
35
|
+
|
|
22
36
|
export enum NatureEnum {
|
|
23
37
|
Pi1x65 = 'PI1x65',
|
|
24
38
|
Pi1x65Pi2x45 = 'PI1x65+PI2x45',
|
|
@@ -29,8 +43,3 @@ export enum NatureEnum {
|
|
|
29
43
|
Bi1x100 = 'BI1x100',
|
|
30
44
|
Bi2x100 = 'BI2x100'
|
|
31
45
|
}
|
|
32
|
-
|
|
33
|
-
export enum CaracteristiquesParticulieresEnum {
|
|
34
|
-
Renversable = 'RENVERSABLE',
|
|
35
|
-
PreMelange = 'PRE_MELANGE'
|
|
36
|
-
}
|
package/src/model/PEI.ts
CHANGED
|
@@ -1,14 +1,38 @@
|
|
|
1
1
|
import { AdressePostale } from '../../src/model/AdressePostale';
|
|
2
|
-
import {
|
|
2
|
+
import { DescriptifTechniqueDECIBase } from '../../src/model/DescriptifTechniqueDECIBase';
|
|
3
3
|
import { PEIReferencesExterieuresInner } from '../../src/model/PEIReferencesExterieuresInner';
|
|
4
4
|
|
|
5
5
|
export type PEI = {
|
|
6
6
|
'id'?: string;
|
|
7
7
|
'date_de_realisation'?: Date;
|
|
8
8
|
'date_de_derniere_mise_a_jour'?: Date;
|
|
9
|
-
'statut'?: string;
|
|
10
9
|
'references_exterieures'?: Array<PEIReferencesExterieuresInner>;
|
|
11
|
-
'descriptif_technique'?:
|
|
12
|
-
'
|
|
13
|
-
'
|
|
10
|
+
'descriptif_technique'?: DescriptifTechniqueDECIBase;
|
|
11
|
+
'implantation'?: AdressePostale;
|
|
12
|
+
'genre'?: GenreEnum;
|
|
13
|
+
'numero'?: string;
|
|
14
|
+
'numero_compteur'?: string;
|
|
14
15
|
};
|
|
16
|
+
|
|
17
|
+
export enum GenreEnum {
|
|
18
|
+
Pi1x65 = 'PI1x65',
|
|
19
|
+
Pi1x65Pi2x45 = 'PI1x65+PI2x45',
|
|
20
|
+
Pi1x100 = 'PI1x100',
|
|
21
|
+
Pi2x100 = 'PI2x100',
|
|
22
|
+
Bi1x65 = 'BI1x65',
|
|
23
|
+
Bi1x80 = 'BI1x80',
|
|
24
|
+
Bi1x100 = 'BI1x100',
|
|
25
|
+
Bi2x100 = 'BI2x100',
|
|
26
|
+
PointAspiration = 'POINT_ASPIRATION',
|
|
27
|
+
CiterneAerienne = 'CITERNE_AERIENNE',
|
|
28
|
+
CiterneEnterree = 'CITERNE_ENTERREE',
|
|
29
|
+
CiterneSemiEnterree = 'CITERNE_SEMI_ENTERREE',
|
|
30
|
+
CiterneSouple = 'CITERNE_SOUPLE',
|
|
31
|
+
ReserveAerienne = 'RESERVE_AERIENNE',
|
|
32
|
+
PoteauRelais = 'POTEAU_RELAIS',
|
|
33
|
+
PuisardAspiration = 'PUISARD_ASPIRATION',
|
|
34
|
+
PriseDeportee = 'PRISE_DEPORTEE',
|
|
35
|
+
PoteauAspiration1x100 = 'POTEAU_ASPIRATION_1x100',
|
|
36
|
+
PoteauAspiration2x100 = 'POTEAU_ASPIRATION_2x100',
|
|
37
|
+
BoucheAspiration1x100 = 'BOUCHE_ASPIRATION_1x100'
|
|
38
|
+
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EquipementsEnum = exports.EssaisEnginUtiliseEnum = exports.CaracteristiquesParticulieresEnum = exports.NatureEnum = exports.DomanialiteEnum = void 0;
|
|
4
|
-
var DomanialiteEnum;
|
|
5
|
-
(function (DomanialiteEnum) {
|
|
6
|
-
DomanialiteEnum["Privee"] = "privee";
|
|
7
|
-
DomanialiteEnum["Publique"] = "publique";
|
|
8
|
-
DomanialiteEnum["PriveeConventionnee"] = "privee_conventionnee";
|
|
9
|
-
})(DomanialiteEnum = exports.DomanialiteEnum || (exports.DomanialiteEnum = {}));
|
|
10
|
-
var NatureEnum;
|
|
11
|
-
(function (NatureEnum) {
|
|
12
|
-
NatureEnum["PointAspiration"] = "POINT_ASPIRATION";
|
|
13
|
-
NatureEnum["CiterneAerienne"] = "CITERNE_AERIENNE";
|
|
14
|
-
NatureEnum["CiterneEnterree"] = "CITERNE_ENTERREE";
|
|
15
|
-
NatureEnum["CiterneSemiEnterree"] = "CITERNE_SEMI_ENTERREE";
|
|
16
|
-
NatureEnum["CiterneSouple"] = "CITERNE_SOUPLE";
|
|
17
|
-
NatureEnum["ReserveAerienne"] = "RESERVE_AERIENNE";
|
|
18
|
-
NatureEnum["PoteauRelais"] = "POTEAU_RELAIS";
|
|
19
|
-
NatureEnum["PuisardAspiration"] = "PUISARD_ASPIRATION";
|
|
20
|
-
NatureEnum["PriseDeportee"] = "PRISE_DEPORTEE";
|
|
21
|
-
NatureEnum["PoteauAspiration1x100"] = "POTEAU_ASPIRATION_1x100";
|
|
22
|
-
NatureEnum["PoteauAspiration2x100"] = "POTEAU_ASPIRATION_2x100";
|
|
23
|
-
NatureEnum["BoucheAspiration1x100"] = "BOUCHE_ASPIRATION_1x100";
|
|
24
|
-
})(NatureEnum = exports.NatureEnum || (exports.NatureEnum = {}));
|
|
25
|
-
var CaracteristiquesParticulieresEnum;
|
|
26
|
-
(function (CaracteristiquesParticulieresEnum) {
|
|
27
|
-
CaracteristiquesParticulieresEnum["Renversable"] = "RENVERSABLE";
|
|
28
|
-
CaracteristiquesParticulieresEnum["PreMelange"] = "PRE_MELANGE";
|
|
29
|
-
})(CaracteristiquesParticulieresEnum = exports.CaracteristiquesParticulieresEnum || (exports.CaracteristiquesParticulieresEnum = {}));
|
|
30
|
-
var EssaisEnginUtiliseEnum;
|
|
31
|
-
(function (EssaisEnginUtiliseEnum) {
|
|
32
|
-
EssaisEnginUtiliseEnum["Aucun"] = "AUCUN";
|
|
33
|
-
EssaisEnginUtiliseEnum["Fpt"] = "FPT";
|
|
34
|
-
EssaisEnginUtiliseEnum["Mpr"] = "MPR";
|
|
35
|
-
EssaisEnginUtiliseEnum["Ccf"] = "CCF";
|
|
36
|
-
})(EssaisEnginUtiliseEnum = exports.EssaisEnginUtiliseEnum || (exports.EssaisEnginUtiliseEnum = {}));
|
|
37
|
-
var EquipementsEnum;
|
|
38
|
-
(function (EquipementsEnum) {
|
|
39
|
-
EquipementsEnum["Guichet"] = "GUICHET";
|
|
40
|
-
EquipementsEnum["CanneAspiration"] = "CANNE_ASPIRATION";
|
|
41
|
-
EquipementsEnum["Puit"] = "PUIT";
|
|
42
|
-
EquipementsEnum["TrouHomme"] = "TROU_HOMME";
|
|
43
|
-
EquipementsEnum["RaccordTournant"] = "RACCORD_TOURNANT";
|
|
44
|
-
EquipementsEnum["PriseDirecte"] = "PRISE_DIRECTE";
|
|
45
|
-
})(EquipementsEnum = exports.EquipementsEnum || (exports.EquipementsEnum = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NatureEnum = void 0;
|
|
4
|
-
var NatureEnum;
|
|
5
|
-
(function (NatureEnum) {
|
|
6
|
-
NatureEnum["AdductionEau"] = "ADDUCTION_EAU";
|
|
7
|
-
NatureEnum["Toiture"] = "TOITURE";
|
|
8
|
-
NatureEnum["Autre"] = "AUTRE";
|
|
9
|
-
})(NatureEnum = exports.NatureEnum || (exports.NatureEnum = {}));
|
|
File without changes
|