@golemio/parkings 1.5.2 → 1.5.3-dev.905280299

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.
@@ -0,0 +1,341 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: 🅿️ Parking Input Gateway
4
+ description: >-
5
+ <p>💡 Parkings, parking zones, tarifs, measurements.</p>
6
+ version: 1.0.0
7
+ contact:
8
+ name: Golemio Prague Data Plaform
9
+ email: golemio@operatorict.cz
10
+ url: https://golemio.cz
11
+ servers:
12
+ - url: https://rabin.golemio.cz/v2
13
+ description: Test (development) server
14
+ - url: https://api.golemio.cz/v2
15
+ description: Main (production) server
16
+ - url: http://localhost:3005
17
+ description: Localhost
18
+
19
+ tags:
20
+ - name: 🅿️ Parking
21
+ description: ""
22
+ paths:
23
+ /koridparkings/config:
24
+ post:
25
+ tags:
26
+ - 🅿️ Parking
27
+ summary: Add config
28
+ requestBody:
29
+ content:
30
+ application/json:
31
+ schema:
32
+ $ref: "#/components/schemas/CreateParkingConfig"
33
+ responses:
34
+ 204:
35
+ description: OK
36
+ 401:
37
+ $ref: "#/components/responses/UnauthorizedError"
38
+ 404:
39
+ description: Not found
40
+ 422:
41
+ description: Error while validating input data
42
+ 500:
43
+ description: Database error
44
+
45
+ /koridparkings/data:
46
+ post:
47
+ tags:
48
+ - 🅿️ Parking
49
+ summary: Receive and save data
50
+ requestBody:
51
+ content:
52
+ application/json:
53
+ schema:
54
+ $ref: "#/components/schemas/PostParkingData"
55
+ responses:
56
+ 204:
57
+ description: OK
58
+ 401:
59
+ $ref: "#/components/responses/UnauthorizedError"
60
+ 404:
61
+ description: Not found
62
+ 422:
63
+ description: Error while validating input data
64
+ 500:
65
+ description: Database error
66
+
67
+ components:
68
+ responses:
69
+ UnauthorizedError:
70
+ description: API key is missing or invalid
71
+ headers:
72
+ x-access-token:
73
+ schema:
74
+ type: string
75
+ schemas:
76
+ CreateParkingConfig:
77
+ type: object
78
+ required:
79
+ - time
80
+ - geojson
81
+ - tarif
82
+ properties:
83
+ type:
84
+ type: string
85
+ example: Feature
86
+ version:
87
+ type: string
88
+ example: B.2
89
+ time:
90
+ type: integer
91
+ example: 1686129969676
92
+ geojson:
93
+ type: object
94
+ required:
95
+ - type
96
+ - features
97
+ properties:
98
+ type:
99
+ type: string
100
+ example: FeatureCollection
101
+ features:
102
+ type: array
103
+ items:
104
+ type: object
105
+ required:
106
+ - type
107
+ - properties
108
+ - geometry
109
+ properties:
110
+ type:
111
+ type: string
112
+ example: Feature
113
+ properties:
114
+ type: object
115
+ required:
116
+ - groupid
117
+ - title
118
+ - total
119
+ - tarif
120
+ properties:
121
+ groupid:
122
+ type: number
123
+ example: 1
124
+ title:
125
+ type: string
126
+ example: nám. Dr.E.Beneše (Divadlo)
127
+ total:
128
+ type: number
129
+ example: 14
130
+ tarif:
131
+ type: string
132
+ example: A
133
+ geometry:
134
+ type: object
135
+ required:
136
+ - type
137
+ - coordinates
138
+ properties:
139
+ type:
140
+ type: string
141
+ example: Polygon
142
+ coordinates:
143
+ oneOf:
144
+ - type: array
145
+ items:
146
+ type: array
147
+ items:
148
+ type: array
149
+ items:
150
+ type: array
151
+ items:
152
+ type: number
153
+ example:
154
+ [
155
+ [
156
+ [
157
+ [14.50823156003554, 50.10498927328214],
158
+ [14.505782430390298, 50.1031042405622],
159
+ [14.509701037821998, 50.1029471511537],
160
+ [14.50823156003554, 50.10498927328214],
161
+ ],
162
+ ],
163
+ [
164
+ [
165
+ [14.50823156003554, 50.10498927328214],
166
+ [14.505782430390298, 50.1031042405622],
167
+ [14.509701037821998, 50.1029471511537],
168
+ [14.50823156003554, 50.10498927328214],
169
+ ],
170
+ ],
171
+ ]
172
+ - type: array
173
+ items:
174
+ type: number
175
+ example: [14.441252, 50.109318]
176
+ description: Point
177
+ - type: array
178
+ items:
179
+ type: array
180
+ items:
181
+ type: array
182
+ items:
183
+ type: number
184
+ example:
185
+ [
186
+ [
187
+ [14.50823156003554, 50.10498927328214],
188
+ [14.505782430390298, 50.1031042405622],
189
+ [14.509701037821998, 50.1029471511537],
190
+ [14.50823156003554, 50.10498927328214],
191
+ ],
192
+ ]
193
+ description: Polygon
194
+ - type: array
195
+ items:
196
+ type: array
197
+ items:
198
+ type: array
199
+ items:
200
+ type: array
201
+ items:
202
+ type: number
203
+ example:
204
+ [
205
+ [
206
+ [
207
+ [14.50823156003554, 50.10498927328214],
208
+ [14.505782430390298, 50.1031042405622],
209
+ [14.509701037821998, 50.1029471511537],
210
+ [14.50823156003554, 50.10498927328214],
211
+ ],
212
+ ],
213
+ [
214
+ [
215
+ [14.50823156003554, 50.10498927328214],
216
+ [14.505782430390298, 50.1031042405622],
217
+ [14.509701037821998, 50.1029471511537],
218
+ [14.50823156003554, 50.10498927328214],
219
+ ],
220
+ ],
221
+ ]
222
+ description: MultiPolygon
223
+ tarif:
224
+ type: object
225
+ required:
226
+ - lastUpdated
227
+ - paymentMode
228
+ - freeOfCharge
229
+ - chargeBand
230
+ properties:
231
+ lastUpdated:
232
+ type: string
233
+ example: 2020-10-12T15:19:21+02:00
234
+ paymentMode:
235
+ type: array
236
+ items:
237
+ type: string
238
+ paymentAdditionalDescription:
239
+ type: string
240
+ example: Parkování Liberec
241
+ freeOfCharge:
242
+ type: boolean
243
+ example: false
244
+ urlLinkAddress:
245
+ type: string
246
+ example: https://parking.liberec.cz/
247
+ chargeBand:
248
+ type: array
249
+ items:
250
+ type: object
251
+ required:
252
+ - chargeBandName
253
+ - chargeCurrency
254
+ - charge
255
+ properties:
256
+ chargeBandName:
257
+ type: string
258
+ example: A
259
+ acceptedMeansOfPayment:
260
+ type: array
261
+ items:
262
+ type: string
263
+ example: cash
264
+ chargeCurrency:
265
+ type: string
266
+ example: CZK
267
+ charge:
268
+ type: array
269
+ required:
270
+ - charge
271
+ - chargeOrderIndex
272
+ - chargeInterval
273
+ items:
274
+ type: object
275
+ properties:
276
+ charge:
277
+ type: number
278
+ example: 20
279
+ chargeType:
280
+ type: string
281
+ example: minimum
282
+ chargeOrderIndex:
283
+ type: number
284
+ example: 0
285
+ chargeInterval:
286
+ type: number
287
+ example: 3600
288
+ maxIterationsOfCharge:
289
+ type: number
290
+ example: 1
291
+ minIterationsOfCharge:
292
+ type: number
293
+ example: 1
294
+ timePeriod:
295
+ type: object
296
+ properties:
297
+ endTimeOfPeriod:
298
+ type: string
299
+ example: Mon-Fri 09:00
300
+ startTimeOfPeriod:
301
+ type: string
302
+ example: Mon-Fri 09:00
303
+
304
+ PostParkingData:
305
+ type: object
306
+ required:
307
+ - time
308
+ - data
309
+ properties:
310
+ type:
311
+ type: string
312
+ example: parking-groups-data
313
+ version:
314
+ type: string
315
+ example: B.0
316
+ time:
317
+ type: integer
318
+ example: 1686129969676
319
+ data:
320
+ type: object
321
+ additionalProperties:
322
+ type: object
323
+ required:
324
+ - tot
325
+ - fr
326
+ - occ
327
+ - cls
328
+ properties:
329
+ tot:
330
+ type: integer
331
+ example: 14
332
+ fr:
333
+ type: integer
334
+ example: 2
335
+ occ:
336
+ type: integer
337
+ example: 12
338
+ cls:
339
+ type: integer
340
+ example: 0
341
+ additionalProperties: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/parkings",
3
- "version": "1.5.2",
3
+ "version": "1.5.3-dev.905280299",
4
4
  "description": "Golemio Parkings Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,8 +12,10 @@
12
12
  "test": "cross-env NODE_ENV=test mocha --exit --check-leaks --timeout 120000 -r ts-node/register -r tsconfig-paths/register -r dotenv/config 'test/**/*.test.ts' --file 'test/setup.ts'",
13
13
  "test-debug": "run-s 'test -- --inspect-brk=9230'",
14
14
  "code-coverage": "nyc run-s 'test -- -r source-map-support/register'",
15
- "preapidocs-test": "run-s 'pretest'",
16
- "apidocs-test": "cross-env NODE_ENV=test ts-node -r tsconfig-paths/register -r dotenv/config test/api-docs/index.ts",
15
+ "apidocs": "cross-env NODE_ENV=test ts-node -r tsconfig-paths/register -r dotenv/config test/api-docs/index.ts",
16
+ "apidocs-test": "run-s \"apidocs -- input,output\"",
17
+ "apidocs-test-input": "run-s \"apidocs -- input\"",
18
+ "apidocs-test-output": "run-s \"apidocs -- output\"",
17
19
  "generate-docs": "typedoc --out docs/typedoc src",
18
20
  "lint": "eslint --cache \"{src,test}/**/*.ts\""
19
21
  },
@@ -63,6 +65,7 @@
63
65
  "ts-node": "^10.9.1",
64
66
  "ts-patch": "3.0.0-beta3",
65
67
  "tsconfig-paths": "^4.2.0",
68
+ "ttypescript": "^1.5.15",
66
69
  "typedoc": "^0.24.8",
67
70
  "typescript": "5.1.3",
68
71
  "typescript-transform-paths": "^3.4.6"