@golemio/flow 1.2.14-dev.1288385588 → 1.2.14-dev.1311678859
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/output-gateway/PedestriansRouter.d.ts +3 -1
- package/dist/output-gateway/PedestriansRouter.js +7 -5
- package/dist/output-gateway/PedestriansRouter.js.map +1 -1
- package/dist/output-gateway/ioc/Di.d.ts +3 -0
- package/dist/output-gateway/ioc/Di.js +8 -0
- package/dist/output-gateway/ioc/Di.js.map +1 -0
- package/docs/openapi.yaml +260 -248
- package/package.json +7 -5
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/// <reference types="express" />
|
|
2
|
-
import {
|
|
2
|
+
import { CacheHeaderMiddleware } from "@golemio/core/dist/output-gateway/CacheHeaderMiddleware";
|
|
3
3
|
import { BaseRouter } from "@golemio/core/dist/output-gateway/routes/BaseRouter";
|
|
4
|
+
import { NextFunction, Request, Response, Router } from "@golemio/core/dist/shared/express";
|
|
4
5
|
import { PedestriansLocationsModel, PedestriansMeasurementsModel } from "./models";
|
|
5
6
|
export declare class PedestriansRouter extends BaseRouter {
|
|
6
7
|
protected pedestriansLocationsModel: PedestriansLocationsModel;
|
|
7
8
|
protected pedestriansMeasurementsModel: PedestriansMeasurementsModel;
|
|
9
|
+
protected cacheHeaderMiddleware: CacheHeaderMiddleware;
|
|
8
10
|
constructor();
|
|
9
11
|
GetPedestriansLocations: (req: Request, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>> | undefined>;
|
|
10
12
|
GetPedestriansMeasurements: (req: Request, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>> | undefined>;
|
|
@@ -10,10 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.pedestriansRouter = exports.PedestriansRouter = void 0;
|
|
13
|
-
const
|
|
14
|
-
const redis_1 = require("@golemio/core/dist/output-gateway/redis");
|
|
15
|
-
const BaseRouter_1 = require("@golemio/core/dist/output-gateway/routes/BaseRouter");
|
|
13
|
+
const Di_1 = require("./ioc/Di");
|
|
16
14
|
const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
|
|
15
|
+
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
|
|
16
|
+
const BaseRouter_1 = require("@golemio/core/dist/output-gateway/routes/BaseRouter");
|
|
17
|
+
const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
|
|
17
18
|
const models_1 = require("./models");
|
|
18
19
|
class PedestriansRouter extends BaseRouter_1.BaseRouter {
|
|
19
20
|
constructor() {
|
|
@@ -56,16 +57,17 @@ class PedestriansRouter extends BaseRouter_1.BaseRouter {
|
|
|
56
57
|
next(err);
|
|
57
58
|
}
|
|
58
59
|
});
|
|
60
|
+
this.cacheHeaderMiddleware = Di_1.FlowContainer.resolve(ioc_1.ContainerToken.CacheHeaderMiddleware);
|
|
59
61
|
this.router.get("/locations", [
|
|
60
62
|
(0, express_validator_1.query)("locationId").optional().not().isEmpty({ ignore_whitespace: true }).not().isArray(),
|
|
61
63
|
(0, express_validator_1.query)("locationName").optional().not().isEmpty({ ignore_whitespace: true }).not().isArray(),
|
|
62
|
-
], Validation_1.pagination, Validation_1.checkErrors, (0, Validation_1.paginationLimitMiddleware)("PedestriansRouter"), (
|
|
64
|
+
], Validation_1.pagination, Validation_1.checkErrors, (0, Validation_1.paginationLimitMiddleware)("PedestriansRouter"), this.cacheHeaderMiddleware.getMiddleware(60 * 60, 300), this.GetPedestriansLocations);
|
|
63
65
|
this.router.get("/measurements", [
|
|
64
66
|
(0, express_validator_1.query)("locationId").optional().not().isEmpty({ ignore_whitespace: true }).not().isArray(),
|
|
65
67
|
(0, express_validator_1.query)("directionId").optional().not().isEmpty({ ignore_whitespace: true }).not().isArray(),
|
|
66
68
|
(0, express_validator_1.query)("from").optional().isISO8601().not().isArray(),
|
|
67
69
|
(0, express_validator_1.query)("to").optional().isISO8601().not().isArray(),
|
|
68
|
-
], Validation_1.pagination, Validation_1.checkErrors, (0, Validation_1.paginationLimitMiddleware)("PedestriansRouter"), (
|
|
70
|
+
], Validation_1.pagination, Validation_1.checkErrors, (0, Validation_1.paginationLimitMiddleware)("PedestriansRouter"), this.cacheHeaderMiddleware.getMiddleware(60 * 60, 300), this.GetPedestriansMeasurements);
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
73
|
exports.PedestriansRouter = PedestriansRouter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PedestriansRouter.js","sourceRoot":"","sources":["../../src/output-gateway/PedestriansRouter.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"PedestriansRouter.js","sourceRoot":"","sources":["../../src/output-gateway/PedestriansRouter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iCAA2C;AAE3C,6EAAkH;AAClH,+DAAuE;AACvE,oFAAiF;AAEjF,mFAAoE;AACpE,qCAAqF;AAErF,MAAa,iBAAkB,SAAQ,uBAAU;IAK7C;QACI,KAAK,EAAE,CAAC;QALF,8BAAyB,GAA8B,IAAI,kCAAyB,EAAE,CAAC;QACvF,iCAA4B,GAAiC,IAAI,qCAA4B,EAAE,CAAC;QAmCnG,4BAAuB,GAAG,CAAO,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YACvF,IAAI;gBACA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,MAAM,CAAC;oBACrD,UAAU,EAAE,GAAG,CAAC,KAAK,CAAC,UAAoB;oBAC1C,YAAY,EAAE,GAAG,CAAC,KAAK,CAAC,YAAsB;oBAC9C,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;oBACrD,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,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,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;YACpD,IAAA,yBAAK,EAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE;SACrD,EACD,uBAAU,EACV,wBAAW,EACX,IAAA,sCAAyB,EAAC,mBAAmB,CAAC,EAC9C,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,EAAE,GAAG,EAAE,EAAE,GAAG,CAAC,EACtD,IAAI,CAAC,0BAA0B,CAClC,CAAC;IACN,CAAC;CAmCJ;AAtED,8CAsEC;AAED,MAAM,iBAAiB,GAAW,IAAI,iBAAiB,EAAE,CAAC,MAAM,CAAC;AAExD,8CAAiB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FlowContainer = void 0;
|
|
4
|
+
const Di_1 = require("@golemio/core/dist/output-gateway/ioc/Di");
|
|
5
|
+
//#region Initialization
|
|
6
|
+
const flowContainer = Di_1.OutputGatewayContainer.createChildContainer();
|
|
7
|
+
exports.FlowContainer = flowContainer;
|
|
8
|
+
//# sourceMappingURL=Di.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,iEAAkF;AAGlF,wBAAwB;AACxB,MAAM,aAAa,GAAwB,2BAAsB,CAAC,oBAAoB,EAAE,CAAC;AAG/D,sCAAa"}
|
package/docs/openapi.yaml
CHANGED
|
@@ -1,248 +1,260 @@
|
|
|
1
|
-
openapi: 3.0.3
|
|
2
|
-
|
|
3
|
-
info:
|
|
4
|
-
title: 🚶 Pedestrians
|
|
5
|
-
description: Locations and Measurements of movement
|
|
6
|
-
version: 1.0.0
|
|
7
|
-
contact:
|
|
8
|
-
name: Golemio Prague Data Platform
|
|
9
|
-
email: golemio@operatorict.cz
|
|
10
|
-
url: https://golemio.cz
|
|
11
|
-
|
|
12
|
-
servers:
|
|
13
|
-
- url: https://api.golemio.cz
|
|
14
|
-
description: Main (production) server
|
|
15
|
-
- url: https://rabin.golemio.cz
|
|
16
|
-
description: Test (development) server
|
|
17
|
-
|
|
18
|
-
tags:
|
|
19
|
-
- name: 🚶 Pedestrians (v2)
|
|
20
|
-
description: 💡 Locations and Measurements of movement
|
|
21
|
-
paths:
|
|
22
|
-
/v2/pedestrians/locations:
|
|
23
|
-
get:
|
|
24
|
-
summary: Get locations and directions
|
|
25
|
-
description: ""
|
|
26
|
-
tags:
|
|
27
|
-
- 🚶 Pedestrians (v2)
|
|
28
|
-
parameters:
|
|
29
|
-
- name: locationId
|
|
30
|
-
in: query
|
|
31
|
-
description: Lists only locations with this ID
|
|
32
|
-
required: false
|
|
33
|
-
schema:
|
|
34
|
-
type: integer
|
|
35
|
-
format: int64
|
|
36
|
-
- name: locationName
|
|
37
|
-
in: query
|
|
38
|
-
description: Lists only locations with this NAME
|
|
39
|
-
required: false
|
|
40
|
-
schema:
|
|
41
|
-
type: string
|
|
42
|
-
- name: limit
|
|
43
|
-
in: query
|
|
44
|
-
description: Limits number of retrieved items
|
|
45
|
-
required: false
|
|
46
|
-
schema:
|
|
47
|
-
type: integer
|
|
48
|
-
format: int64
|
|
49
|
-
- name: offset
|
|
50
|
-
in: query
|
|
51
|
-
description: Number of the first items that are skipped
|
|
52
|
-
required: false
|
|
53
|
-
schema:
|
|
54
|
-
type: integer
|
|
55
|
-
format: int64
|
|
56
|
-
responses:
|
|
57
|
-
"200":
|
|
58
|
-
description: successful operation
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
example:
|
|
164
|
-
|
|
165
|
-
type: string
|
|
166
|
-
example:
|
|
167
|
-
|
|
168
|
-
type: string
|
|
169
|
-
example:
|
|
170
|
-
|
|
171
|
-
type: string
|
|
172
|
-
example:
|
|
173
|
-
|
|
174
|
-
type: string
|
|
175
|
-
example:
|
|
176
|
-
|
|
177
|
-
type: string
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
type:
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
type: string
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
1
|
+
openapi: 3.0.3
|
|
2
|
+
|
|
3
|
+
info:
|
|
4
|
+
title: 🚶 Pedestrians
|
|
5
|
+
description: Locations and Measurements of movement
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
contact:
|
|
8
|
+
name: Golemio Prague Data Platform
|
|
9
|
+
email: golemio@operatorict.cz
|
|
10
|
+
url: https://golemio.cz
|
|
11
|
+
|
|
12
|
+
servers:
|
|
13
|
+
- url: https://api.golemio.cz
|
|
14
|
+
description: Main (production) server
|
|
15
|
+
- url: https://rabin.golemio.cz
|
|
16
|
+
description: Test (development) server
|
|
17
|
+
|
|
18
|
+
tags:
|
|
19
|
+
- name: 🚶 Pedestrians (v2)
|
|
20
|
+
description: 💡 Locations and Measurements of movement
|
|
21
|
+
paths:
|
|
22
|
+
/v2/pedestrians/locations:
|
|
23
|
+
get:
|
|
24
|
+
summary: Get locations and directions
|
|
25
|
+
description: ""
|
|
26
|
+
tags:
|
|
27
|
+
- 🚶 Pedestrians (v2)
|
|
28
|
+
parameters:
|
|
29
|
+
- name: locationId
|
|
30
|
+
in: query
|
|
31
|
+
description: Lists only locations with this ID
|
|
32
|
+
required: false
|
|
33
|
+
schema:
|
|
34
|
+
type: integer
|
|
35
|
+
format: int64
|
|
36
|
+
- name: locationName
|
|
37
|
+
in: query
|
|
38
|
+
description: Lists only locations with this NAME
|
|
39
|
+
required: false
|
|
40
|
+
schema:
|
|
41
|
+
type: string
|
|
42
|
+
- name: limit
|
|
43
|
+
in: query
|
|
44
|
+
description: Limits number of retrieved items
|
|
45
|
+
required: false
|
|
46
|
+
schema:
|
|
47
|
+
type: integer
|
|
48
|
+
format: int64
|
|
49
|
+
- name: offset
|
|
50
|
+
in: query
|
|
51
|
+
description: Number of the first items that are skipped
|
|
52
|
+
required: false
|
|
53
|
+
schema:
|
|
54
|
+
type: integer
|
|
55
|
+
format: int64
|
|
56
|
+
responses:
|
|
57
|
+
"200":
|
|
58
|
+
description: successful operation
|
|
59
|
+
headers:
|
|
60
|
+
Cache-Control:
|
|
61
|
+
description: Cache control directive for caching proxies
|
|
62
|
+
schema:
|
|
63
|
+
type: string
|
|
64
|
+
example: public, s-maxage=3600, stale-while-revalidate=300
|
|
65
|
+
content:
|
|
66
|
+
application/json:
|
|
67
|
+
schema:
|
|
68
|
+
$ref: "#/components/schemas/PedestriansLocation"
|
|
69
|
+
"401":
|
|
70
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
71
|
+
"404":
|
|
72
|
+
description: Location not found
|
|
73
|
+
|
|
74
|
+
/v2/pedestrians/measurements:
|
|
75
|
+
get:
|
|
76
|
+
summary: GET measurements of pedestrian traffic
|
|
77
|
+
description: ""
|
|
78
|
+
tags:
|
|
79
|
+
- 🚶 Pedestrians (v2)
|
|
80
|
+
parameters:
|
|
81
|
+
- name: locationId
|
|
82
|
+
in: query
|
|
83
|
+
description: Lists only measurements for this location
|
|
84
|
+
required: false
|
|
85
|
+
schema:
|
|
86
|
+
type: integer
|
|
87
|
+
format: int64
|
|
88
|
+
example: 0
|
|
89
|
+
- name: directionId
|
|
90
|
+
in: query
|
|
91
|
+
description: Lists only measurements for this direction
|
|
92
|
+
required: false
|
|
93
|
+
schema:
|
|
94
|
+
type: integer
|
|
95
|
+
format: int64
|
|
96
|
+
example: 4
|
|
97
|
+
- name: limit
|
|
98
|
+
in: query
|
|
99
|
+
description: Limits number of retrieved items
|
|
100
|
+
required: false
|
|
101
|
+
schema:
|
|
102
|
+
type: integer
|
|
103
|
+
format: int64
|
|
104
|
+
example: 1
|
|
105
|
+
- name: offset
|
|
106
|
+
in: query
|
|
107
|
+
description: Number of the first items that are skipped
|
|
108
|
+
required: false
|
|
109
|
+
schema:
|
|
110
|
+
type: integer
|
|
111
|
+
format: int64
|
|
112
|
+
example: 1
|
|
113
|
+
- name: from
|
|
114
|
+
in: query
|
|
115
|
+
description: Date in ISO8601, limits data measured from this datetime
|
|
116
|
+
required: false
|
|
117
|
+
schema:
|
|
118
|
+
type: string
|
|
119
|
+
format: date
|
|
120
|
+
example: 2020-09-01T01:15:00.000Z
|
|
121
|
+
- name: to
|
|
122
|
+
in: query
|
|
123
|
+
description: Date in ISO8601, limits data measured up until this datetime
|
|
124
|
+
required: false
|
|
125
|
+
schema:
|
|
126
|
+
type: string
|
|
127
|
+
format: date
|
|
128
|
+
example: 2020-10-22T01:15:00.000Z
|
|
129
|
+
responses:
|
|
130
|
+
"200":
|
|
131
|
+
description: successful operation
|
|
132
|
+
headers:
|
|
133
|
+
Cache-Control:
|
|
134
|
+
description: Cache control directive for caching proxies
|
|
135
|
+
schema:
|
|
136
|
+
type: string
|
|
137
|
+
example: public, s-maxage=3600, stale-while-revalidate=300
|
|
138
|
+
content:
|
|
139
|
+
application/json:
|
|
140
|
+
schema:
|
|
141
|
+
$ref: "#/components/schemas/PedestriansMeasurement"
|
|
142
|
+
"401":
|
|
143
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
144
|
+
"404":
|
|
145
|
+
description: Location not found
|
|
146
|
+
|
|
147
|
+
components:
|
|
148
|
+
responses:
|
|
149
|
+
UnauthorizedError:
|
|
150
|
+
description: API key is missing or invalid
|
|
151
|
+
headers:
|
|
152
|
+
WWW_Authenticate:
|
|
153
|
+
schema:
|
|
154
|
+
type: string
|
|
155
|
+
|
|
156
|
+
schemas:
|
|
157
|
+
PedestriansLocation:
|
|
158
|
+
type: object
|
|
159
|
+
properties:
|
|
160
|
+
id:
|
|
161
|
+
type: string
|
|
162
|
+
description: Location id
|
|
163
|
+
example: "2"
|
|
164
|
+
location_name:
|
|
165
|
+
type: string
|
|
166
|
+
example: Rytířská 12
|
|
167
|
+
lat:
|
|
168
|
+
type: string
|
|
169
|
+
example: "50.084781715549276"
|
|
170
|
+
lng:
|
|
171
|
+
type: string
|
|
172
|
+
example: "14.422412102465428"
|
|
173
|
+
address:
|
|
174
|
+
type: string
|
|
175
|
+
example: Na Můstku 12
|
|
176
|
+
city_district:
|
|
177
|
+
type: string
|
|
178
|
+
example: Praha 1
|
|
179
|
+
tech:
|
|
180
|
+
type: string
|
|
181
|
+
example: kamera
|
|
182
|
+
map_url:
|
|
183
|
+
type: string
|
|
184
|
+
example: https://storage.golemio.cz/intenzita-pesi-dopravy/2-map.png
|
|
185
|
+
photo_url:
|
|
186
|
+
type: string
|
|
187
|
+
example: https://storage.golemio.cz/intenzita-pesi-dopravy/2.png
|
|
188
|
+
measurement_start:
|
|
189
|
+
type: string
|
|
190
|
+
format: date
|
|
191
|
+
example: 2020-09-02 12:00
|
|
192
|
+
measurement_end:
|
|
193
|
+
type: string
|
|
194
|
+
format: date
|
|
195
|
+
example: 2020-09-05 12:00
|
|
196
|
+
directions:
|
|
197
|
+
type: array
|
|
198
|
+
items:
|
|
199
|
+
$ref: "#/components/schemas/PedestriansDirection"
|
|
200
|
+
required:
|
|
201
|
+
- id
|
|
202
|
+
- location_name
|
|
203
|
+
- lat
|
|
204
|
+
- lng
|
|
205
|
+
- address
|
|
206
|
+
- city_district
|
|
207
|
+
- tech
|
|
208
|
+
- map_url
|
|
209
|
+
- photo_url
|
|
210
|
+
- measurement_start
|
|
211
|
+
|
|
212
|
+
PedestriansDirection:
|
|
213
|
+
type: object
|
|
214
|
+
properties:
|
|
215
|
+
id:
|
|
216
|
+
type: integer
|
|
217
|
+
format: int64
|
|
218
|
+
example: "2"
|
|
219
|
+
name:
|
|
220
|
+
type: string
|
|
221
|
+
example: Můstek
|
|
222
|
+
to:
|
|
223
|
+
type: integer
|
|
224
|
+
format: int64
|
|
225
|
+
example: "1"
|
|
226
|
+
required:
|
|
227
|
+
- id
|
|
228
|
+
- name
|
|
229
|
+
- to
|
|
230
|
+
|
|
231
|
+
PedestriansMeasurement:
|
|
232
|
+
type: object
|
|
233
|
+
properties:
|
|
234
|
+
location_id:
|
|
235
|
+
type: string
|
|
236
|
+
example: "1"
|
|
237
|
+
direction_id:
|
|
238
|
+
type: string
|
|
239
|
+
example: "3"
|
|
240
|
+
value:
|
|
241
|
+
type: string
|
|
242
|
+
example: "114"
|
|
243
|
+
quality:
|
|
244
|
+
type: string
|
|
245
|
+
example: "1.00000000000000000000"
|
|
246
|
+
measured_from:
|
|
247
|
+
type: string
|
|
248
|
+
format: date
|
|
249
|
+
example: 2020-08-21T17:30:00.000Z
|
|
250
|
+
measured_to:
|
|
251
|
+
type: string
|
|
252
|
+
format: date
|
|
253
|
+
example: 2020-08-21T17:45:00.000Z
|
|
254
|
+
required:
|
|
255
|
+
- location_id
|
|
256
|
+
- direction_id
|
|
257
|
+
- value
|
|
258
|
+
- quality
|
|
259
|
+
- measured_from
|
|
260
|
+
- measured_to
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/flow",
|
|
3
|
-
"version": "1.2.14-dev.
|
|
3
|
+
"version": "1.2.14-dev.1311678859",
|
|
4
4
|
"description": "Golemio Flow Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -36,13 +36,14 @@
|
|
|
36
36
|
"@golemio/core": "1.10.0",
|
|
37
37
|
"@golemio/db-common": "1.1.4",
|
|
38
38
|
"@golemio/eslint-config": "1.1.2",
|
|
39
|
-
"@types/chai": "4.2.3",
|
|
40
|
-
"@types/chai-as-promised": "7.1.2",
|
|
39
|
+
"@types/chai": "^4.2.3",
|
|
40
|
+
"@types/chai-as-promised": "^7.1.2",
|
|
41
41
|
"@types/mocha": "^8.2.0",
|
|
42
42
|
"@types/node": "^20.12.7",
|
|
43
43
|
"@types/sinon": "^9.0.10",
|
|
44
|
-
"
|
|
45
|
-
"chai
|
|
44
|
+
"@types/supertest": "^6.0.2",
|
|
45
|
+
"chai": "^4.2.0",
|
|
46
|
+
"chai-as-promised": "^7.1.1",
|
|
46
47
|
"cross-env": "^7.0.3",
|
|
47
48
|
"eslint": "^8.1.1",
|
|
48
49
|
"husky": "^4.3.7",
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
"rimraf": "^3.0.2",
|
|
55
56
|
"sinon": "^9.2.3",
|
|
56
57
|
"source-map-support": "0.5.21",
|
|
58
|
+
"supertest": "^7.0.0",
|
|
57
59
|
"ts-node": "^10.9.1",
|
|
58
60
|
"ts-patch": "3.0.0-beta3",
|
|
59
61
|
"tsconfig-paths": "^4.2.0",
|