siar-client 0.1.4 → 2.2.1
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/dist/client/authentication/AuthenticationService.cjs +75 -0
- package/dist/client/authentication/AuthenticationService.d.ts +44 -0
- package/dist/client/authentication/AuthenticationService.d.ts.map +1 -0
- package/dist/client/authentication/AuthenticationService.js +75 -0
- package/dist/client/authentication/AuthenticationService.js.map +1 -0
- package/dist/client/data/DataService.cjs +38 -9
- package/dist/client/data/DataService.d.ts +2 -0
- package/dist/client/data/DataService.d.ts.map +1 -1
- package/dist/client/data/DataService.js +38 -9
- package/dist/client/data/DataService.js.map +1 -1
- package/dist/client/information/InformationService.cjs +64 -30
- package/dist/client/information/InformationService.d.ts +8 -3
- package/dist/client/information/InformationService.d.ts.map +1 -1
- package/dist/client/information/InformationService.js +64 -30
- package/dist/client/information/InformationService.js.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/Consts.cjs +2 -0
- package/dist/internal/Consts.d.ts +2 -0
- package/dist/internal/Consts.d.ts.map +1 -0
- package/dist/internal/Consts.js +2 -0
- package/dist/internal/Consts.js.map +1 -0
- package/dist/internal/Models.d.ts +1 -1
- package/dist/internal/authentication/Models.cjs +2 -0
- package/dist/internal/authentication/Models.d.ts +15 -0
- package/dist/internal/authentication/Models.d.ts.map +1 -0
- package/dist/internal/authentication/Models.js +2 -0
- package/dist/internal/authentication/Models.js.map +1 -0
- package/dist/internal/data/Models.d.ts +8 -0
- package/dist/internal/data/Models.d.ts.map +1 -1
- package/dist/internal/information/Models.d.ts +47 -30
- package/dist/internal/information/Models.d.ts.map +1 -1
- package/dist/mappers/Mappers.cjs +19 -2
- package/dist/mappers/Mappers.d.ts +6 -2
- package/dist/mappers/Mappers.d.ts.map +1 -1
- package/dist/mappers/Mappers.js +19 -2
- package/dist/mappers/Mappers.js.map +1 -1
- package/dist/public/SIARClient.cjs +23 -0
- package/dist/public/SIARClient.d.ts +21 -0
- package/dist/public/SIARClient.d.ts.map +1 -1
- package/dist/public/SIARClient.js +23 -0
- package/dist/public/SIARClient.js.map +1 -1
- package/dist/public/data/Models.cjs +2 -2
- package/dist/public/data/Models.d.ts +10 -2
- package/dist/public/data/Models.d.ts.map +1 -1
- package/dist/public/data/Models.js +2 -2
- package/dist/public/information/Models.cjs +9 -8
- package/dist/public/information/Models.d.ts +24 -6
- package/dist/public/information/Models.d.ts.map +1 -1
- package/dist/public/information/Models.js +9 -8
- package/dist/public/information/Models.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AutonomousCommunity, type Province, type Station, type AccessInformation } from "../../public/information/Models.js";
|
|
1
|
+
import { type AutonomousCommunity, type Province, type Station, type AccessInformation, type ValidationCode } from "../../public/information/Models.js";
|
|
2
2
|
import type { GeneralResponse } from "../../public/Models.js";
|
|
3
3
|
/**
|
|
4
4
|
* Servicio para obtener información de permisos y accesos en la Web API SIAR
|
|
@@ -13,13 +13,13 @@ export declare class InformationService {
|
|
|
13
13
|
constructor(apiKey: string);
|
|
14
14
|
/**
|
|
15
15
|
* Construye la URL completa para una petición de información
|
|
16
|
-
* @param
|
|
16
|
+
* @param informationCategory Tipo de información a solicitar
|
|
17
17
|
* @returns URL completa para la petición
|
|
18
18
|
*/
|
|
19
19
|
private buildUrl;
|
|
20
20
|
/**
|
|
21
21
|
* Realiza una petición de información a la API
|
|
22
|
-
* @param
|
|
22
|
+
* @param informationCategory Tipo de información a solicitar
|
|
23
23
|
* @returns Promesa con la respuesta de la API
|
|
24
24
|
*/
|
|
25
25
|
private fetchInformation;
|
|
@@ -48,5 +48,10 @@ export declare class InformationService {
|
|
|
48
48
|
* @returns Promesa con la información de accesos
|
|
49
49
|
*/
|
|
50
50
|
fetchAccessData(): Promise<GeneralResponse<AccessInformation>>;
|
|
51
|
+
/**
|
|
52
|
+
* Obtiene la descripción de los códigos de validación
|
|
53
|
+
* @returns Promesa con la lista de códigos de validación
|
|
54
|
+
*/
|
|
55
|
+
fetchValidationCodes(): Promise<GeneralResponse<ValidationCode[]>>;
|
|
51
56
|
}
|
|
52
57
|
//# sourceMappingURL=InformationService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InformationService.d.ts","sourceRoot":"","sources":["../../../src/client/information/InformationService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InformationService.d.ts","sourceRoot":"","sources":["../../../src/client/information/InformationService.ts"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACpB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;GAEG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAS;IAEvB;;;OAGG;gBACS,MAAM,EAAE,MAAM;IAK1B;;;;OAIG;IACH,OAAO,CAAC,QAAQ;IAIhB;;;;OAIG;YACW,gBAAgB;IA2C9B;;;;OAIG;IACG,0BAA0B,IAAI,OAAO,CACzC,eAAe,CAAC,mBAAmB,EAAE,CAAC,CACvC;IAoBD;;;;OAIG;IACG,cAAc,IAAI,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,CAAC;IAoB5D;;;;OAIG;IACG,aAAa,IAAI,OAAO,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC,CAAC;IAoB1D;;;;;OAKG;IACG,eAAe,IAAI,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;IAoBpE;;;OAGG;IACG,oBAAoB,IAAI,OAAO,CAAC,eAAe,CAAC,cAAc,EAAE,CAAC,CAAC;CAmBzE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { BASE_URL } from "../../internal/Consts.js";
|
|
2
|
+
import { mapCCAA, mapProvincia, mapEstacion, mapInformacionAccesos, mapCodigoValidacion, } from "../../mappers/Mappers.js";
|
|
3
|
+
import { InformationCategory, } from "../../public/information/Models.js";
|
|
3
4
|
/**
|
|
4
5
|
* Servicio para obtener información de permisos y accesos en la Web API SIAR
|
|
5
6
|
*/
|
|
@@ -9,24 +10,25 @@ export class InformationService {
|
|
|
9
10
|
* @param apiKey Clave de cliente API de 50 caracteres
|
|
10
11
|
*/
|
|
11
12
|
constructor(apiKey) {
|
|
12
|
-
this.baseUrl = "https://servicio.mapama.gob.es/apisiar/API/v1/Info";
|
|
13
13
|
this.apiKey = apiKey;
|
|
14
|
+
this.baseUrl = BASE_URL + "/API/V1/Info";
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Construye la URL completa para una petición de información
|
|
17
|
-
* @param
|
|
18
|
+
* @param informationCategory Tipo de información a solicitar
|
|
18
19
|
* @returns URL completa para la petición
|
|
19
20
|
*/
|
|
20
|
-
buildUrl(
|
|
21
|
-
return `${this.baseUrl}/${
|
|
21
|
+
buildUrl(informationCategory) {
|
|
22
|
+
return `${this.baseUrl}/${informationCategory}?token=${this.apiKey}`;
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
* Realiza una petición de información a la API
|
|
25
|
-
* @param
|
|
26
|
+
* @param informationCategory Tipo de información a solicitar
|
|
26
27
|
* @returns Promesa con la respuesta de la API
|
|
27
28
|
*/
|
|
28
|
-
async fetchInformation(
|
|
29
|
-
const url = this.buildUrl(
|
|
29
|
+
async fetchInformation(informationCategory) {
|
|
30
|
+
const url = this.buildUrl(informationCategory);
|
|
31
|
+
console.log(`Fetching information from URL: ${url}`);
|
|
30
32
|
try {
|
|
31
33
|
const response = await fetch(url, {
|
|
32
34
|
method: "GET",
|
|
@@ -34,17 +36,18 @@ export class InformationService {
|
|
|
34
36
|
Accept: "application/json",
|
|
35
37
|
},
|
|
36
38
|
});
|
|
39
|
+
const data = (await response.json());
|
|
37
40
|
if (!response.ok) {
|
|
41
|
+
console.error(`HTTP error! status: ${response.status} - ${response.statusText}`);
|
|
38
42
|
return {
|
|
39
|
-
MensajeRespuesta:
|
|
43
|
+
MensajeRespuesta: data.MensajeRespuesta,
|
|
40
44
|
error: {
|
|
41
45
|
type: "http",
|
|
42
46
|
statusCode: response.status,
|
|
43
|
-
details: `HTTP error! status: ${response.status}`,
|
|
47
|
+
details: `HTTP error! status: ${response.status} - ${response.statusText}`,
|
|
44
48
|
},
|
|
45
49
|
};
|
|
46
50
|
}
|
|
47
|
-
const data = (await response.json());
|
|
48
51
|
return data;
|
|
49
52
|
}
|
|
50
53
|
catch (error) {
|
|
@@ -63,8 +66,14 @@ export class InformationService {
|
|
|
63
66
|
* @returns Promesa con la lista de comunidades autónomas
|
|
64
67
|
*/
|
|
65
68
|
async fetchAutonomousCommunities() {
|
|
66
|
-
const response = await this.fetchInformation(
|
|
67
|
-
|
|
69
|
+
const response = await this.fetchInformation(InformationCategory.AutonomousCommunity);
|
|
70
|
+
// If there's no datos field, return only the message (error case)
|
|
71
|
+
if (!response.datos) {
|
|
72
|
+
return {
|
|
73
|
+
message: response.MensajeRespuesta,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
const mappedData = response.datos.map(mapCCAA);
|
|
68
77
|
return {
|
|
69
78
|
data: mappedData,
|
|
70
79
|
message: response.MensajeRespuesta,
|
|
@@ -76,8 +85,14 @@ export class InformationService {
|
|
|
76
85
|
* @returns Promesa con la lista de provincias
|
|
77
86
|
*/
|
|
78
87
|
async fetchProvinces() {
|
|
79
|
-
const response = await this.fetchInformation(
|
|
80
|
-
|
|
88
|
+
const response = await this.fetchInformation(InformationCategory.Province);
|
|
89
|
+
// If there's no datos field, return only the message (error case)
|
|
90
|
+
if (!response.datos) {
|
|
91
|
+
return {
|
|
92
|
+
message: response.MensajeRespuesta,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
const mappedData = response.datos.map(mapProvincia);
|
|
81
96
|
return {
|
|
82
97
|
data: mappedData,
|
|
83
98
|
message: response.MensajeRespuesta,
|
|
@@ -89,8 +104,14 @@ export class InformationService {
|
|
|
89
104
|
* @returns Promesa con la lista de estaciones
|
|
90
105
|
*/
|
|
91
106
|
async fetchStations() {
|
|
92
|
-
const response = await this.fetchInformation(
|
|
93
|
-
|
|
107
|
+
const response = await this.fetchInformation(InformationCategory.Station);
|
|
108
|
+
// If there's no datos field, return only the message (error case)
|
|
109
|
+
if (!response.datos) {
|
|
110
|
+
return {
|
|
111
|
+
message: response.MensajeRespuesta,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
const mappedData = response.datos.map(mapEstacion);
|
|
94
115
|
return {
|
|
95
116
|
data: mappedData,
|
|
96
117
|
message: response.MensajeRespuesta,
|
|
@@ -103,19 +124,32 @@ export class InformationService {
|
|
|
103
124
|
* @returns Promesa con la información de accesos
|
|
104
125
|
*/
|
|
105
126
|
async fetchAccessData() {
|
|
106
|
-
const response = await this.fetchInformation(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
maxAccessesPerMinute: 0,
|
|
112
|
-
accessesCurrentDay: 0,
|
|
113
|
-
maxAccessesPerDay: 0,
|
|
114
|
-
recordsCurrentMinute: 0,
|
|
115
|
-
maxRecordsPerMinute: 0,
|
|
116
|
-
recordsCurrentDay: 0,
|
|
117
|
-
maxRecordsPerDay: 0,
|
|
127
|
+
const response = await this.fetchInformation(InformationCategory.Access);
|
|
128
|
+
// If there's no datos field, return only the message (error case)
|
|
129
|
+
if (!response.datos) {
|
|
130
|
+
return {
|
|
131
|
+
message: response.MensajeRespuesta,
|
|
118
132
|
};
|
|
133
|
+
}
|
|
134
|
+
const mappedData = mapInformacionAccesos(response.datos);
|
|
135
|
+
return {
|
|
136
|
+
data: mappedData,
|
|
137
|
+
message: response.MensajeRespuesta,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Obtiene la descripción de los códigos de validación
|
|
142
|
+
* @returns Promesa con la lista de códigos de validación
|
|
143
|
+
*/
|
|
144
|
+
async fetchValidationCodes() {
|
|
145
|
+
const response = await this.fetchInformation(InformationCategory.ValidationCode);
|
|
146
|
+
// If there's no datos field, return only the message (error case)
|
|
147
|
+
if (!response.datos) {
|
|
148
|
+
return {
|
|
149
|
+
message: response.MensajeRespuesta,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
const mappedData = response.datos.map(mapCodigoValidacion);
|
|
119
153
|
return {
|
|
120
154
|
data: mappedData,
|
|
121
155
|
message: response.MensajeRespuesta,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InformationService.js","sourceRoot":"","sources":["../../../src/client/information/InformationService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InformationService.js","sourceRoot":"","sources":["../../../src/client/information/InformationService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AASpD,OAAO,EACL,OAAO,EACP,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,mBAAmB,GAMpB,MAAM,oCAAoC,CAAC;AAG5C;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAI7B;;;OAGG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,QAAQ,GAAG,cAAc,CAAC;IAC3C,CAAC;IAED;;;;OAIG;IACK,QAAQ,CAAC,mBAAwC;QACvD,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,mBAAmB,UAAU,IAAI,CAAC,MAAM,EAAE,CAAC;IACvE,CAAC;IAED;;;;OAIG;IACK,KAAK,CAAC,gBAAgB,CAC5B,mBAAwC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,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,eAAe;QACnB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAC1C,mBAAmB,CAAC,MAAM,CAC3B,CAAC;QAEF,kEAAkE;QAClE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACpB,OAAO;gBACL,OAAO,EAAE,QAAQ,CAAC,gBAAgB;aACnC,CAAC;QACJ,CAAC;QAED,MAAM,UAAU,GAAG,qBAAqB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAEzD,OAAO;YACL,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,QAAQ,CAAC,gBAAgB;SACnC,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,oBAAoB;QACxB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAC1C,mBAAmB,CAAC,cAAc,CACnC,CAAC;QAEF,kEAAkE;QAClE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACpB,OAAO;gBACL,OAAO,EAAE,QAAQ,CAAC,gBAAgB;aACnC,CAAC;QACJ,CAAC;QAED,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAE3D,OAAO;YACL,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,QAAQ,CAAC,gBAAgB;SACnC,CAAC;IACJ,CAAC;CACF"}
|
package/dist/index.cjs
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,4 +2,6 @@ export type { HourlyData, DailyData, WeeklyData, MonthlyData, } from "./public/d
|
|
|
2
2
|
export { DataType, Scope } from "./public/data/Models.js";
|
|
3
3
|
export { SIARClient } from "./public/SIARClient.js";
|
|
4
4
|
export type { DataPetitionParams } from "./client/data/DataService.js";
|
|
5
|
+
export { InformationCategory } from "./public/information/Models.js";
|
|
6
|
+
export type { AutonomousCommunity, Province, Station, AccessInformation, } from "./public/information/Models.js";
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,GACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,YAAY,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,GACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,YAAY,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,YAAY,EACV,mBAAmB,EACnB,QAAQ,EACR,OAAO,EACP,iBAAiB,GAClB,MAAM,gCAAgC,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Consts.d.ts","sourceRoot":"","sources":["../../src/internal/Consts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,EAAE,MAA+C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Consts.js","sourceRoot":"","sources":["../../src/internal/Consts.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAW,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encrypted string returned by the API
|
|
3
|
+
*/
|
|
4
|
+
export interface CadenaCifrada {
|
|
5
|
+
Datos: string;
|
|
6
|
+
MensajeRespuesta: string | null;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Authentication token returned by the API
|
|
10
|
+
*/
|
|
11
|
+
export interface TokenAutenticacion {
|
|
12
|
+
Datos: string;
|
|
13
|
+
MensajeRespuesta: string | null;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=Models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Models.d.ts","sourceRoot":"","sources":["../../../src/internal/authentication/Models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Models.js","sourceRoot":"","sources":["../../../src/internal/authentication/Models.ts"],"names":[],"mappings":""}
|
|
@@ -24,6 +24,10 @@ export interface DatoHorario {
|
|
|
24
24
|
Estacion: string;
|
|
25
25
|
/** Fecha del dato (formato ISO 8601) */
|
|
26
26
|
Fecha: string;
|
|
27
|
+
/** ID numérico que identifica a la provincia */
|
|
28
|
+
IdProvincia: number;
|
|
29
|
+
/** Identificador interno único de la estación */
|
|
30
|
+
IdEstacion: number;
|
|
27
31
|
}
|
|
28
32
|
/**
|
|
29
33
|
* Datos diarios
|
|
@@ -75,6 +79,10 @@ export interface DatoDiario {
|
|
|
75
79
|
Estacion: string;
|
|
76
80
|
/** Fecha del dato (formato ISO 8601) */
|
|
77
81
|
Fecha: string;
|
|
82
|
+
/** ID numérico que identifica a la provincia */
|
|
83
|
+
IdProvincia: number;
|
|
84
|
+
/** Identificador interno único de la estación */
|
|
85
|
+
IdEstacion: number;
|
|
78
86
|
}
|
|
79
87
|
/**
|
|
80
88
|
* Datos semanales
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Models.d.ts","sourceRoot":"","sources":["../../../src/internal/data/Models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,yBAAyB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,qDAAqD;IACrD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAC;I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,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,eAAe,EAAE,MAAM,CAAC;IACxB,wDAAwD;IACxD,eAAe,EAAE,MAAM,CAAC;IACxB,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface CCAA {
|
|
5
5
|
/** Identificador de la CCAA */
|
|
6
|
-
|
|
6
|
+
CCAA: string;
|
|
7
7
|
/** Descripción de la CCAA */
|
|
8
|
-
|
|
8
|
+
Codigo: string;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Información de una Provincia
|
|
@@ -13,57 +13,74 @@ export interface CCAA {
|
|
|
13
13
|
export interface Provincia {
|
|
14
14
|
/** Nombre de la Provincia */
|
|
15
15
|
Provincia: string;
|
|
16
|
-
/** Código de la
|
|
16
|
+
/** Código que identifica a la provincia para su uso en los servicios de la Web API. */
|
|
17
17
|
Codigo: string;
|
|
18
|
-
/** Código de
|
|
18
|
+
/** Código de tres letras que identifica a la C.A. */
|
|
19
19
|
Codigo_CCAA: string;
|
|
20
|
+
/** ID numérico */
|
|
21
|
+
IdProvincia: number;
|
|
20
22
|
}
|
|
21
23
|
/**
|
|
22
24
|
* Información de una Estación
|
|
23
25
|
*/
|
|
24
26
|
export interface Estacion {
|
|
25
|
-
/**
|
|
26
|
-
Altitud: number;
|
|
27
|
-
/** Código de la estación */
|
|
28
|
-
Codigo: string;
|
|
29
|
-
/** Nombre de la estación */
|
|
27
|
+
/** Nombre de la estación meteorológica */
|
|
30
28
|
Estacion: string;
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
Fecha_Instalacion: string;
|
|
35
|
-
/** Huso horario */
|
|
36
|
-
Huso: number;
|
|
37
|
-
/** Latitud de la estación */
|
|
38
|
-
Latitud: string;
|
|
39
|
-
/** Longitud de la estación */
|
|
40
|
-
Longitud: string;
|
|
41
|
-
/** Término municipal */
|
|
29
|
+
/** Código identificador de la estación (único dentro de la provincia) */
|
|
30
|
+
Codigo: string;
|
|
31
|
+
/** Nombre del término municipal donde está ubicada la estación */
|
|
42
32
|
Termino: string;
|
|
43
|
-
/** Coordenada
|
|
33
|
+
/** Coordenada de longitud en formato DMS (grados, minutos, segundos) */
|
|
34
|
+
Longitud: string;
|
|
35
|
+
/** Coordenada de latitud en formato DMS (grados, minutos, segundos) */
|
|
36
|
+
Latitud: string;
|
|
37
|
+
/** Altura de la estación sobre el nivel del mar (en metros) */
|
|
38
|
+
Altitud: number;
|
|
39
|
+
/** Coordenada UTM en el eje X (Este) */
|
|
44
40
|
XUTM: number;
|
|
45
|
-
/** Coordenada Y
|
|
41
|
+
/** Coordenada UTM en el eje Y (Norte) */
|
|
46
42
|
YUTM: number;
|
|
43
|
+
/** Huso geográfico UTM correspondiente */
|
|
44
|
+
Huso: number;
|
|
45
|
+
/** Fecha de instalación de la estación (formato ISO 8601) */
|
|
46
|
+
Fecha_Instalacion: string;
|
|
47
|
+
/** Fecha de baja de la estación (null si está activa) */
|
|
48
|
+
Fecha_Baja: string | null;
|
|
49
|
+
/** Indica si la estación es del ministerio o de C.A. */
|
|
50
|
+
Red_estacion: string;
|
|
51
|
+
/** ID numérico que identifica a la provincia */
|
|
52
|
+
IdProvincia: number;
|
|
53
|
+
/** Identificador interno único de la estación */
|
|
54
|
+
IdEstacion: number;
|
|
47
55
|
}
|
|
48
56
|
/**
|
|
49
57
|
* Información sobre accesos y limitaciones
|
|
50
58
|
*/
|
|
51
59
|
export interface InformacionAccesos {
|
|
52
|
-
/** Número de
|
|
60
|
+
/** Número de peticiones realizadas por el usuario en el último minuto */
|
|
53
61
|
NumAccesosMinutoActual: number;
|
|
54
|
-
/** Número máximo de
|
|
62
|
+
/** Número máximo de peticiones permitidas por minuto con el token actual */
|
|
55
63
|
MaxAccesosMinuto: number;
|
|
56
|
-
/** Número de
|
|
64
|
+
/** Número total de peticiones realizadas en el día actual */
|
|
57
65
|
NumAccesosDiaActual: number;
|
|
58
|
-
/** Número máximo de
|
|
66
|
+
/** Número máximo de peticiones permitidas por día */
|
|
59
67
|
MaxAccesosDia: number;
|
|
60
|
-
/** Número de registros
|
|
68
|
+
/** Número total de registros descargados en el último minuto */
|
|
61
69
|
RegistrosAcumuladosMinuto: number;
|
|
62
|
-
/**
|
|
70
|
+
/** Límite máximo de registros que pueden descargarse por minuto */
|
|
63
71
|
MaxRegistrosMinuto: number;
|
|
64
|
-
/**
|
|
72
|
+
/** Total de registros descargados en el día actual */
|
|
65
73
|
RegistrosAcumuladosDia: number;
|
|
66
|
-
/**
|
|
74
|
+
/** Límite máximo de registros que se pueden descargar en un solo día */
|
|
67
75
|
MaxRegistrosDia: number;
|
|
68
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Información de un código de validación
|
|
79
|
+
*/
|
|
80
|
+
export interface CodigoValidacion {
|
|
81
|
+
/** Descripción del código de validación */
|
|
82
|
+
Descripcion: string;
|
|
83
|
+
/** ID del código de validación */
|
|
84
|
+
IdCodigoValidacion: string;
|
|
85
|
+
}
|
|
69
86
|
//# sourceMappingURL=Models.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Models.d.ts","sourceRoot":"","sources":["../../../src/internal/information/Models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,+BAA+B;IAC/B,
|
|
1
|
+
{"version":3,"file":"Models.d.ts","sourceRoot":"","sources":["../../../src/internal/information/Models.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,+BAA+B;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,yBAAyB,EAAE,MAAM,CAAC;IAClC,mEAAmE;IACnE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,sDAAsD;IACtD,sBAAsB,EAAE,MAAM,CAAC;IAC/B,wEAAwE;IACxE,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,kBAAkB,EAAE,MAAM,CAAC;CAC5B"}
|
package/dist/mappers/Mappers.cjs
CHANGED
|
@@ -14,6 +14,8 @@ exports.mapDatoHorarioToHourlyData =(dato) {
|
|
|
14
14
|
soilTemperature2: dato.TempSuelo2,
|
|
15
15
|
station: dato.Estacion,
|
|
16
16
|
date: dato.Fecha,
|
|
17
|
+
provinceId: dato.IdProvincia,
|
|
18
|
+
stationId: dato.IdEstacion,
|
|
17
19
|
};
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
@@ -44,6 +46,8 @@ exports.mapDatoDiarioToDailyData =(dato) {
|
|
|
44
46
|
pePenmanMonteith: dato.PePMon,
|
|
45
47
|
station: dato.Estacion,
|
|
46
48
|
date: dato.Fecha,
|
|
49
|
+
provinceId: dato.IdProvincia,
|
|
50
|
+
stationId: dato.IdEstacion,
|
|
47
51
|
};
|
|
48
52
|
}
|
|
49
53
|
/**
|
|
@@ -110,8 +114,8 @@ exports.mapDatoMensualToMonthlyData =(dato) {
|
|
|
110
114
|
*/
|
|
111
115
|
exports.mapCCAA =(ccaa) {
|
|
112
116
|
return {
|
|
113
|
-
id: ccaa.
|
|
114
|
-
description: ccaa.
|
|
117
|
+
id: ccaa.Codigo,
|
|
118
|
+
description: ccaa.CCAA,
|
|
115
119
|
};
|
|
116
120
|
}
|
|
117
121
|
/**
|
|
@@ -122,6 +126,7 @@ exports.mapProvincia =(provincia) {
|
|
|
122
126
|
name: provincia.Provincia,
|
|
123
127
|
code: provincia.Codigo,
|
|
124
128
|
ccaaCode: provincia.Codigo_CCAA,
|
|
129
|
+
id: provincia.IdProvincia,
|
|
125
130
|
};
|
|
126
131
|
}
|
|
127
132
|
/**
|
|
@@ -140,6 +145,9 @@ exports.mapEstacion =(estacion) {
|
|
|
140
145
|
municipality: estacion.Termino,
|
|
141
146
|
utmX: estacion.XUTM,
|
|
142
147
|
utmY: estacion.YUTM,
|
|
148
|
+
networkType: estacion.Red_estacion,
|
|
149
|
+
provinceId: estacion.IdProvincia,
|
|
150
|
+
stationId: estacion.IdEstacion,
|
|
143
151
|
};
|
|
144
152
|
}
|
|
145
153
|
/**
|
|
@@ -157,4 +165,13 @@ exports.mapInformacionAccesos =(info) {
|
|
|
157
165
|
maxRecordsPerDay: info.MaxRegistrosDia,
|
|
158
166
|
};
|
|
159
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* Maps CodigoValidacion to ValidationCode
|
|
170
|
+
*/
|
|
171
|
+
exports.mapCodigoValidacion =(codigo) {
|
|
172
|
+
return {
|
|
173
|
+
description: codigo.Descripcion,
|
|
174
|
+
id: codigo.IdCodigoValidacion,
|
|
175
|
+
};
|
|
176
|
+
}
|
|
160
177
|
//# sourceMappingURL=Mappers.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { AutonomousCommunity, Province, Station, AccessInformation } from "../public/information/Models.js";
|
|
1
|
+
import type { AutonomousCommunity, Province, Station, AccessInformation, ValidationCode } from "../public/information/Models.js";
|
|
2
2
|
import type { HourlyData, DailyData, WeeklyData, MonthlyData } from "../index.js";
|
|
3
3
|
import type { DatoHorario, DatoDiario, DatoSemanal, DatoMensual } from "../internal/data/Models.js";
|
|
4
|
-
import type { CCAA, Provincia, Estacion, InformacionAccesos } from "../internal/information/Models.js";
|
|
4
|
+
import type { CCAA, Provincia, Estacion, InformacionAccesos, CodigoValidacion } from "../internal/information/Models.js";
|
|
5
5
|
/**
|
|
6
6
|
* Maps DatoHorario to HourlyData
|
|
7
7
|
*/
|
|
@@ -34,4 +34,8 @@ export declare function mapEstacion(estacion: Estacion): Station;
|
|
|
34
34
|
* Maps InformacionAccesos to AccessInformation
|
|
35
35
|
*/
|
|
36
36
|
export declare function mapInformacionAccesos(info: InformacionAccesos): AccessInformation;
|
|
37
|
+
/**
|
|
38
|
+
* Maps CodigoValidacion to ValidationCode
|
|
39
|
+
*/
|
|
40
|
+
export declare function mapCodigoValidacion(codigo: CodigoValidacion): ValidationCode;
|
|
37
41
|
//# sourceMappingURL=Mappers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Mappers.d.ts","sourceRoot":"","sources":["../../src/mappers/Mappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,QAAQ,EACR,OAAO,EACP,iBAAiB,
|
|
1
|
+
{"version":3,"file":"Mappers.d.ts","sourceRoot":"","sources":["../../src/mappers/Mappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,QAAQ,EACR,OAAO,EACP,iBAAiB,EACjB,cAAc,EACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,WAAW,EACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mCAAmC,CAAC;AAE3C;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,CAgBxE;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,CA4BpE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,CAyBxE;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,CA0B1E;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,mBAAmB,CAKvD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,QAAQ,CAO3D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAiBvD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,kBAAkB,GACvB,iBAAiB,CAWnB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,gBAAgB,GAAG,cAAc,CAK5E"}
|
package/dist/mappers/Mappers.js
CHANGED
|
@@ -14,6 +14,8 @@ export function mapDatoHorarioToHourlyData(dato) {
|
|
|
14
14
|
soilTemperature2: dato.TempSuelo2,
|
|
15
15
|
station: dato.Estacion,
|
|
16
16
|
date: dato.Fecha,
|
|
17
|
+
provinceId: dato.IdProvincia,
|
|
18
|
+
stationId: dato.IdEstacion,
|
|
17
19
|
};
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
@@ -44,6 +46,8 @@ export function mapDatoDiarioToDailyData(dato) {
|
|
|
44
46
|
pePenmanMonteith: dato.PePMon,
|
|
45
47
|
station: dato.Estacion,
|
|
46
48
|
date: dato.Fecha,
|
|
49
|
+
provinceId: dato.IdProvincia,
|
|
50
|
+
stationId: dato.IdEstacion,
|
|
47
51
|
};
|
|
48
52
|
}
|
|
49
53
|
/**
|
|
@@ -110,8 +114,8 @@ export function mapDatoMensualToMonthlyData(dato) {
|
|
|
110
114
|
*/
|
|
111
115
|
export function mapCCAA(ccaa) {
|
|
112
116
|
return {
|
|
113
|
-
id: ccaa.
|
|
114
|
-
description: ccaa.
|
|
117
|
+
id: ccaa.Codigo,
|
|
118
|
+
description: ccaa.CCAA,
|
|
115
119
|
};
|
|
116
120
|
}
|
|
117
121
|
/**
|
|
@@ -122,6 +126,7 @@ export function mapProvincia(provincia) {
|
|
|
122
126
|
name: provincia.Provincia,
|
|
123
127
|
code: provincia.Codigo,
|
|
124
128
|
ccaaCode: provincia.Codigo_CCAA,
|
|
129
|
+
id: provincia.IdProvincia,
|
|
125
130
|
};
|
|
126
131
|
}
|
|
127
132
|
/**
|
|
@@ -140,6 +145,9 @@ export function mapEstacion(estacion) {
|
|
|
140
145
|
municipality: estacion.Termino,
|
|
141
146
|
utmX: estacion.XUTM,
|
|
142
147
|
utmY: estacion.YUTM,
|
|
148
|
+
networkType: estacion.Red_estacion,
|
|
149
|
+
provinceId: estacion.IdProvincia,
|
|
150
|
+
stationId: estacion.IdEstacion,
|
|
143
151
|
};
|
|
144
152
|
}
|
|
145
153
|
/**
|
|
@@ -157,4 +165,13 @@ export function mapInformacionAccesos(info) {
|
|
|
157
165
|
maxRecordsPerDay: info.MaxRegistrosDia,
|
|
158
166
|
};
|
|
159
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* Maps CodigoValidacion to ValidationCode
|
|
170
|
+
*/
|
|
171
|
+
export function mapCodigoValidacion(codigo) {
|
|
172
|
+
return {
|
|
173
|
+
description: codigo.Descripcion,
|
|
174
|
+
id: codigo.IdCodigoValidacion,
|
|
175
|
+
};
|
|
176
|
+
}
|
|
160
177
|
//# sourceMappingURL=Mappers.js.map
|