|
@@ -1,75 +1,92 @@
|
|
|
-export default {
|
|
|
|
|
|
|
+// Utilidad para simular requests durante desarrollo
|
|
|
|
|
+export const mockRequest = (
|
|
|
|
|
+ success: Boolean,
|
|
|
|
|
+ payload: string,
|
|
|
|
|
+ timeout: number | null
|
|
|
|
|
+): Promise<string> => {
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ if (success) {
|
|
|
|
|
+ resolve(payload);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ reject(payload);
|
|
|
|
|
+ }
|
|
|
|
|
+ }, timeout || 1000);
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+export const mockPayloads = {
|
|
|
general: `
|
|
general: `
|
|
|
[
|
|
[
|
|
|
{
|
|
{
|
|
|
"station": {
|
|
"station": {
|
|
|
- "name": "anim",
|
|
|
|
|
- "code": "fa226136-859f-42a2-bd42-6485dd93b16b"
|
|
|
|
|
|
|
+ "name": "consequat",
|
|
|
|
|
+ "code": "b7d147cb-a5f0-4a55-b6d9-8934b7085f13"
|
|
|
},
|
|
},
|
|
|
- "from": "2015-11-12T02:44:14 +03:00",
|
|
|
|
|
- "to": "2016-07-29T06:14:30 +03:00",
|
|
|
|
|
- "gt10": "1257.00%",
|
|
|
|
|
- "gt30": "3564.00%",
|
|
|
|
|
- "gt33": "1459.00%",
|
|
|
|
|
- "grados_acumulados": "2843.00%",
|
|
|
|
|
- "amplitud_termica": "3902.00%",
|
|
|
|
|
- "precip_acumulada": "2390.00%"
|
|
|
|
|
|
|
+ "from": "2015-02-15T02:03:07 +03:00",
|
|
|
|
|
+ "to": "2018-05-19T10:42:45 +03:00",
|
|
|
|
|
+ "lt10": 23.81,
|
|
|
|
|
+ "gt30": 30.49,
|
|
|
|
|
+ "gt33": 25.3,
|
|
|
|
|
+ "grados_acumulados": 20.88,
|
|
|
|
|
+ "amplitud_termica": 36,
|
|
|
|
|
+ "precip_acumulada": 21.64
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
"station": {
|
|
"station": {
|
|
|
- "name": "consectetur",
|
|
|
|
|
- "code": "e6fa3b79-6e74-4ed1-99c9-9b5655cfbe8d"
|
|
|
|
|
|
|
+ "name": "dolor",
|
|
|
|
|
+ "code": "b3414719-92ad-4977-985b-e9e6f5d09312"
|
|
|
},
|
|
},
|
|
|
- "from": "2016-08-13T11:15:58 +03:00",
|
|
|
|
|
- "to": "2014-05-23T04:47:43 +03:00",
|
|
|
|
|
- "gt10": "1840.00%",
|
|
|
|
|
- "gt30": "2976.00%",
|
|
|
|
|
- "gt33": "2561.00%",
|
|
|
|
|
- "grados_acumulados": "2519.00%",
|
|
|
|
|
- "amplitud_termica": "1830.00%",
|
|
|
|
|
- "precip_acumulada": "1124.00%"
|
|
|
|
|
|
|
+ "from": "2014-03-22T06:51:34 +03:00",
|
|
|
|
|
+ "to": "2018-01-27T07:58:57 +03:00",
|
|
|
|
|
+ "lt10": 37.58,
|
|
|
|
|
+ "gt30": 12.2,
|
|
|
|
|
+ "gt33": 32.12,
|
|
|
|
|
+ "grados_acumulados": 31.02,
|
|
|
|
|
+ "amplitud_termica": 39.29,
|
|
|
|
|
+ "precip_acumulada": 12.01
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
"station": {
|
|
"station": {
|
|
|
- "name": "excepteur",
|
|
|
|
|
- "code": "026ec4a5-9b8e-4f20-80d3-564883f4ac44"
|
|
|
|
|
|
|
+ "name": "dolore",
|
|
|
|
|
+ "code": "889d2e8b-45fd-4342-88ae-1de44b58409c"
|
|
|
},
|
|
},
|
|
|
- "from": "2018-11-13T06:23:37 +03:00",
|
|
|
|
|
- "to": "2018-07-27T11:27:09 +03:00",
|
|
|
|
|
- "gt10": "1525.00%",
|
|
|
|
|
- "gt30": "3794.00%",
|
|
|
|
|
- "gt33": "1143.00%",
|
|
|
|
|
- "grados_acumulados": "3949.00%",
|
|
|
|
|
- "amplitud_termica": "1530.00%",
|
|
|
|
|
- "precip_acumulada": "3544.00%"
|
|
|
|
|
|
|
+ "from": "2020-09-27T02:05:22 +03:00",
|
|
|
|
|
+ "to": "2021-09-16T10:24:50 +03:00",
|
|
|
|
|
+ "lt10": 32.2,
|
|
|
|
|
+ "gt30": 30.93,
|
|
|
|
|
+ "gt33": 32.54,
|
|
|
|
|
+ "grados_acumulados": 26.78,
|
|
|
|
|
+ "amplitud_termica": 24.5,
|
|
|
|
|
+ "precip_acumulada": 21.59
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
"station": {
|
|
"station": {
|
|
|
- "name": "id",
|
|
|
|
|
- "code": "64a361a2-9531-41f6-b58d-771df3c71bd8"
|
|
|
|
|
|
|
+ "name": "eu",
|
|
|
|
|
+ "code": "62fada45-6f04-40b4-95a1-99959b82145c"
|
|
|
},
|
|
},
|
|
|
- "from": "2014-05-08T02:06:52 +03:00",
|
|
|
|
|
- "to": "2015-05-23T10:38:48 +03:00",
|
|
|
|
|
- "gt10": "1818.00%",
|
|
|
|
|
- "gt30": "2814.00%",
|
|
|
|
|
- "gt33": "1232.00%",
|
|
|
|
|
- "grados_acumulados": "1383.00%",
|
|
|
|
|
- "amplitud_termica": "3313.00%",
|
|
|
|
|
- "precip_acumulada": "1347.00%"
|
|
|
|
|
|
|
+ "from": "2019-02-08T12:46:41 +03:00",
|
|
|
|
|
+ "to": "2021-06-01T07:29:53 +03:00",
|
|
|
|
|
+ "lt10": 14.25,
|
|
|
|
|
+ "gt30": 10.34,
|
|
|
|
|
+ "gt33": 30.31,
|
|
|
|
|
+ "grados_acumulados": 29,
|
|
|
|
|
+ "amplitud_termica": 25.09,
|
|
|
|
|
+ "precip_acumulada": 33.63
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
"station": {
|
|
"station": {
|
|
|
- "name": "aliqua",
|
|
|
|
|
- "code": "e01aa408-3bb2-4d4f-bb3b-5ccdfee1820d"
|
|
|
|
|
|
|
+ "name": "officia",
|
|
|
|
|
+ "code": "6cca9007-ea5b-496b-9e7b-a520416a6564"
|
|
|
},
|
|
},
|
|
|
- "from": "2021-05-27T04:20:30 +03:00",
|
|
|
|
|
- "to": "2018-03-22T09:59:53 +03:00",
|
|
|
|
|
- "gt10": "3790.00%",
|
|
|
|
|
- "gt30": "2166.00%",
|
|
|
|
|
- "gt33": "2740.00%",
|
|
|
|
|
- "grados_acumulados": "1322.00%",
|
|
|
|
|
- "amplitud_termica": "1011.00%",
|
|
|
|
|
- "precip_acumulada": "3446.00%"
|
|
|
|
|
|
|
+ "from": "2018-06-26T08:18:13 +03:00",
|
|
|
|
|
+ "to": "2020-03-27T09:04:18 +03:00",
|
|
|
|
|
+ "lt10": 38.79,
|
|
|
|
|
+ "gt30": 34.99,
|
|
|
|
|
+ "gt33": 36.03,
|
|
|
|
|
+ "grados_acumulados": 18.87,
|
|
|
|
|
+ "amplitud_termica": 26.55,
|
|
|
|
|
+ "precip_acumulada": 30.38
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
`,
|
|
`,
|