@golemio/parkings 1.1.1-dev.553095105 → 1.1.1-dev.564542852

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,675 @@
1
+ # prettier-ignore
2
+
3
+ openapi: 3.0.3
4
+ info:
5
+ title: 🅿️ Parking
6
+ description: >-
7
+ <p>💡 Parkings, parking zones, tarifs, measurements.</p>
8
+ version: 1.0.0
9
+ contact:
10
+ name: Golemio Prague Data Plaform
11
+ email: golemio@operatorict.cz
12
+ url: https://golemio.cz
13
+ servers:
14
+ - url: https://rabin.golemio.cz/v2
15
+ description: Test (development) server
16
+ - url: https://api.golemio.cz/v2
17
+ description: Main (production) server
18
+ tags:
19
+ - name: 🅿️ Parking
20
+ description: >-
21
+ <p>💡 Parkings, parking zones, tarifs, measurements.</p>
22
+ paths:
23
+ /parking:
24
+ get:
25
+ tags:
26
+ - 🅿️ Parking
27
+ summary: GET All Parking Spaces
28
+ parameters:
29
+ - name: latlng
30
+ in: query
31
+ description: Sorting by location (Latitude and Longitude separated by comma,
32
+ latitude first).
33
+ schema:
34
+ type: string
35
+ example: 50.124935,14.457204
36
+ - name: range
37
+ in: query
38
+ description: Filter by distance from latlng in meters (range query). Depends
39
+ on the latlng parameter.
40
+ schema:
41
+ type: number
42
+ example: 5000
43
+ - name: source
44
+ in: query
45
+ description: Filter by data provider.
46
+ schema:
47
+ type: string
48
+ example: korid
49
+ - name: sourceId
50
+ in: query
51
+ description: Filter by parking group id. Unique per data provider.
52
+ schema:
53
+ type: string
54
+ example: 1
55
+ - name: category
56
+ in: query
57
+ description: Filter by parking type. Use with square brackets `category[]`
58
+ style: form
59
+ explode: false
60
+ schema:
61
+ type: array
62
+ items:
63
+ type: object
64
+ example: park_and_ride
65
+ - name: limit
66
+ in: query
67
+ description: Limits number of retrieved items.
68
+ schema:
69
+ type: number
70
+ example: 10
71
+ - name: offset
72
+ in: query
73
+ description: Number of the first items that are skipped.
74
+ schema:
75
+ type: number
76
+ example: 0
77
+
78
+ responses:
79
+ 200:
80
+ description: OK
81
+ content:
82
+ application/json; charset=utf-8:
83
+ schema:
84
+ type: object
85
+ properties:
86
+ features:
87
+ type: array
88
+ items:
89
+ $ref: '#/components/schemas/ParkingSpaceFeature'
90
+ type:
91
+ type: string
92
+ example: FeatureCollection
93
+ 401:
94
+ $ref: "#/components/responses/UnauthorizedError"
95
+
96
+ 404:
97
+ description: Not found
98
+ /parking/{id}:
99
+ get:
100
+ tags:
101
+ - 🅿️ Parking
102
+ summary: GET Parking Space
103
+ parameters:
104
+ - name: id
105
+ in: path
106
+ description: Id of parking location.
107
+ required: true
108
+ schema:
109
+ type: string
110
+ example: 6
111
+ responses:
112
+ 200:
113
+ description: OK
114
+ content:
115
+ application/json; charset=utf-8:
116
+ schema:
117
+ $ref: '#/components/schemas/ParkingSpaceFeature'
118
+ 401:
119
+ $ref: "#/components/responses/UnauthorizedError"
120
+
121
+ 404:
122
+ description: Not found
123
+ /parking/detail:
124
+ get:
125
+ tags:
126
+ - 🅿️ Parking
127
+ summary: GET All Detailed Parking Spaces
128
+ parameters:
129
+ - name: latlng
130
+ in: query
131
+ description: Sorting by location (Latitude and Longitude separated by comma,
132
+ latitude first).
133
+ schema:
134
+ type: string
135
+ example: 50.124935,14.457204
136
+ - name: range
137
+ in: query
138
+ description: Filter by distance from latlng in meters (range query). Depends
139
+ on the latlng parameter.
140
+ schema:
141
+ type: number
142
+ example: 5000
143
+ - name: source
144
+ in: query
145
+ description: Filter by data provider.
146
+ schema:
147
+ type: string
148
+ example: TSK
149
+ - name: sourceId
150
+ in: query
151
+ description: Filter by parking group id. Unique per data provider.
152
+ schema:
153
+ type: string
154
+ example: 1
155
+ - name: category
156
+ in: query
157
+ description: Filter by parking type. Use with square brackets `category[]`
158
+ style: form
159
+ explode: false
160
+ schema:
161
+ type: array
162
+ items:
163
+ type: object
164
+ example: park_and_ride
165
+ - name: limit
166
+ in: query
167
+ description: Limits number of retrieved items.
168
+ schema:
169
+ type: number
170
+ example: 10
171
+ - name: offset
172
+ in: query
173
+ description: Number of the first items that are skipped.
174
+ schema:
175
+ type: number
176
+ example: 0
177
+
178
+ responses:
179
+ 200:
180
+ description: OK
181
+ content:
182
+ application/json; charset=utf-8:
183
+ schema:
184
+ type: object
185
+ properties:
186
+ features:
187
+ type: array
188
+ items:
189
+ $ref: '#/components/schemas/ParkingSpaceFeature'
190
+ type:
191
+ type: string
192
+ example: FeatureCollection
193
+ 401:
194
+ $ref: "#/components/responses/UnauthorizedError"
195
+
196
+ 404:
197
+ description: Not found
198
+ /parking/detail/{id}:
199
+ get:
200
+ tags:
201
+ - 🅿️ Parking
202
+ summary: GET Detailed Parking Space
203
+ parameters:
204
+ - name: id
205
+ in: path
206
+ description: Id of parking location.
207
+ required: true
208
+ schema:
209
+ type: string
210
+ example: 6
211
+ responses:
212
+ 200:
213
+ description: OK
214
+ content:
215
+ application/json; charset=utf-8:
216
+ schema:
217
+ $ref: '#/components/schemas/ParkingSpaceFeature'
218
+ 401:
219
+ $ref: "#/components/responses/UnauthorizedError"
220
+
221
+ 404:
222
+ description: Not found
223
+ /parking/measurements:
224
+ get:
225
+ tags:
226
+ - 🅿️ Parking
227
+ summary: GET All Parking Spaces Measurements
228
+ parameters:
229
+ - name: source
230
+ in: query
231
+ description: Filter by data provider.
232
+ schema:
233
+ type: string
234
+ example: korid
235
+ - name: sourceId
236
+ in: query
237
+ description: Filter by parking group id. Unique per data provider.
238
+ schema:
239
+ type: string
240
+ example: 1
241
+ - name: latest
242
+ in: query
243
+ description: Show only the latest measurement.
244
+ schema:
245
+ type: boolean
246
+ example: true
247
+ default: false
248
+ - name: from
249
+ in: query
250
+ description: Date in ISO8601, limits data measured from this datetime.
251
+ schema:
252
+ type: string
253
+ example: "2021-02-26T12:01:00.000Z"
254
+ - name: to
255
+ in: query
256
+ description: Date in ISO8601, limits data measured up until this datetime.
257
+ schema:
258
+ type: string
259
+ example: "2021-02-26T12:03:00.000Z"
260
+ - name: page
261
+ in: query
262
+ description: Number of result page.
263
+ schema:
264
+ type: number
265
+ example: 1
266
+ - name: pageSize
267
+ in: query
268
+ description: Result page size.
269
+ schema:
270
+ type: number
271
+ example: 10000
272
+ responses:
273
+ 200:
274
+ description: OK
275
+ content:
276
+ application/json; charset=utf-8:
277
+ schema:
278
+ type: array
279
+ items:
280
+ $ref: '#/components/schemas/ParkingMeasurement'
281
+ 401:
282
+ $ref: "#/components/responses/UnauthorizedError"
283
+
284
+ 404:
285
+ description: Not found
286
+
287
+ 400:
288
+ description: Bad request
289
+ content:
290
+ application/json; charset=utf-8:
291
+ schema:
292
+ type: object
293
+ properties:
294
+ error_message:
295
+ type: string
296
+ example: Bad request
297
+ error_status:
298
+ type: number
299
+ example: 400
300
+ error_info:
301
+ type: string
302
+ example: '{"pageSize":{"location":"query","param":"pageSize","value":"-2","msg":"pageSize should be a positive int and should not exceed 10,000"}}'
303
+ /parking/tariffs/:
304
+ get:
305
+ tags:
306
+ - 🅿️ Parking
307
+ summary: GET All Parking Spaces Tariffs
308
+ parameters:
309
+ - name: x-access-token
310
+ in: header
311
+ description: e.g. YOUR_ACCESS_TOKEN
312
+ schema:
313
+ type: string
314
+ example: YOUR_ACCESS_TOKEN
315
+ - name: source
316
+ in: query
317
+ description: Filter by data provider.
318
+ schema:
319
+ type: string
320
+ example: korid
321
+ required: false
322
+ responses:
323
+ 200:
324
+ description: OK
325
+ content:
326
+ application/json; charset=utf-8:
327
+ schema:
328
+ type: array
329
+ items:
330
+ $ref: '#/components/schemas/ParkingSpaceTariff'
331
+ 401:
332
+ $ref: "#/components/responses/UnauthorizedError"
333
+
334
+ 404:
335
+ description: Not found
336
+ /parking/tariffs/{tariffId}:
337
+ get:
338
+ tags:
339
+ - 🅿️ Parking
340
+ summary: GET Parking Space Tariff
341
+ parameters:
342
+ - name: tariffId
343
+ in: path
344
+ description: Id of parking tariff.
345
+ required: true
346
+ schema:
347
+ type: string
348
+ example: b184865e-5a5e-5465-abc1-4fab6bc56a77
349
+ responses:
350
+ 200:
351
+ description: OK
352
+ content:
353
+ application/json; charset=utf-8:
354
+ schema:
355
+ $ref: '#/components/schemas/ParkingSpaceTariff'
356
+ 401:
357
+ $ref: "#/components/responses/UnauthorizedError"
358
+ 404:
359
+ description: Not found
360
+ components:
361
+ responses:
362
+ UnauthorizedError:
363
+ description: API key is missing or invalid
364
+ headers:
365
+ x-access-token:
366
+ schema:
367
+ type: string
368
+ schemas:
369
+ ParkingSpaceFeature:
370
+ type: object
371
+ properties:
372
+ geometry:
373
+ type: object
374
+ description: GeoJSon geometry
375
+ properties:
376
+
377
+ coordinates:
378
+ oneOf:
379
+ - type: array
380
+ items:
381
+ type: number
382
+ example: [14.441252, 50.109318]
383
+ - type: array
384
+ items:
385
+ type: array
386
+ items:
387
+ type: number
388
+ example: [14.441252, 50.109318]
389
+ type:
390
+ type: string
391
+ enum:
392
+ - Point
393
+ - Polygon
394
+ properties:
395
+ type: object
396
+ properties:
397
+ id:
398
+ type: string
399
+ example: 1768
400
+ source:
401
+ type: string
402
+ example: TSK
403
+ source_id:
404
+ type: string
405
+ example: 534002
406
+ data_provider:
407
+ type: string
408
+ nullable: true
409
+ example: www.tsk-praha.cz
410
+ name:
411
+ type: string
412
+ example: Holešovice
413
+ category:
414
+ type: string
415
+ nullable: true
416
+ example: park_and_ride
417
+ date_modified:
418
+ type: string
419
+ example: '2020-05-18T07:38:37.000Z'
420
+ address_formatted:
421
+ type: string
422
+ nullable: true
423
+ example: 'Vrbenského, 17000 Praha Holešovice, Česko'
424
+ address:
425
+ type: object
426
+ nullable: true
427
+ properties:
428
+ address_country:
429
+ type: string
430
+ example: Česko
431
+ address_formatted:
432
+ type: string
433
+ example: Vrbenského, 17000 Praha Holešovice, Česko
434
+ address_locality:
435
+ type: string
436
+ example: Praha
437
+ address_region:
438
+ type: string
439
+ example: Holešovice
440
+ postal_code:
441
+ type: string
442
+ example: 17000
443
+ street_address:
444
+ type: string
445
+ example: Vrbenského
446
+ area_served:
447
+ type: string
448
+ nullable: true
449
+ web_app_payment_url:
450
+ type: string
451
+ nullable: true
452
+ example: 'https://ke-utc.appspot.com/static/select_offstreet.html?shortname=139'
453
+ android_app_payment_url:
454
+ type: string
455
+ nullable: true
456
+ ios_app_payment_url:
457
+ type: string
458
+ nullable: true
459
+ total_spot_number:
460
+ type: number
461
+ example: 74
462
+ tariff_id:
463
+ type: string
464
+ nullable: true
465
+ example: 20
466
+ valid_from:
467
+ type: string
468
+ nullable: true
469
+ example: '2020-05-31T00:00:00.000Z'
470
+ valid_to:
471
+ type: string
472
+ nullable: true
473
+ example: '2022-05-31T00:00:00.000Z'
474
+ parking_type:
475
+ type: string
476
+ enum:
477
+ - park_and_ride
478
+ - park_paid_private
479
+ - on_street
480
+ - other
481
+ - park_sharing
482
+ - disabled_parking
483
+ zone_type:
484
+ type: string
485
+ nullable: true
486
+ enum:
487
+ - zone_residential
488
+ - zone_mixed
489
+ - zone_visitors
490
+ - zone_other
491
+ - zone_free
492
+ centroid:
493
+ type: object
494
+ properties:
495
+ type:
496
+ type: string
497
+ example: Point
498
+ coordinates:
499
+ type: array
500
+ items:
501
+ type: number
502
+ example: [14.441252, 50.109318]
503
+ available_spots_last_updated:
504
+ type: number
505
+ nullable: true
506
+ example: '2021-03-01T00:19:47+01:00'
507
+ available_spots_number:
508
+ type: number
509
+ nullable: true
510
+ example: 17
511
+ required:
512
+ - id
513
+ - source
514
+ - source_id
515
+ - name
516
+ - date_modified
517
+ - parking_type
518
+ - centroid
519
+ - available_spots_last_updated
520
+ - available_spots_number
521
+ type:
522
+ type: string
523
+ example: Feature
524
+ ParkingMeasurement:
525
+ title: Parking Measurement
526
+ type: object
527
+ properties:
528
+ source:
529
+ type: string
530
+ example: korid
531
+ source_id:
532
+ type: string
533
+ example: 1
534
+ available_spot_number:
535
+ type: number
536
+ example: 2
537
+ closed_spot_number:
538
+ type: number
539
+ example: 0
540
+ occupied_spot_number:
541
+ type: number
542
+ example: 12
543
+ total_spot_number:
544
+ type: number
545
+ example: 14
546
+ date_modified:
547
+ type: string
548
+ example: "2021-02-28T23:19:47.384Z"
549
+ required:
550
+ - source
551
+ - source_id
552
+ - available_spot_number
553
+ - closed_spot_number
554
+ - occupied_spot_number
555
+ - total_spot_number
556
+ - date_modified
557
+ ParkingSpaceTariff:
558
+ title: Parking Space Tariff
559
+ required:
560
+ - tariff_id
561
+ - source
562
+ - last_updated
563
+ - payment_mode
564
+ - free_of_charge
565
+ - charge_band_name
566
+ - charge_currency
567
+ type: object
568
+ properties:
569
+ tariff_id:
570
+ type: string
571
+ example: b184865e-5a5e-5465-abc1-4fab6bc56a77
572
+ source:
573
+ type: string
574
+ example: korid
575
+ last_updated:
576
+ type: string
577
+ example: "2020-10-12T15:19:21+02:00"
578
+ payment_mode:
579
+ type: string
580
+ example: "\"\""
581
+ payment_additional_description:
582
+ type: string
583
+ nullable: true
584
+ example: Parkování Liberec
585
+ free_of_charge:
586
+ type: boolean
587
+ example: false
588
+ url_link_address:
589
+ type: string
590
+ nullable: true
591
+ example: https://parking.liberec.cz/
592
+ charge_band_name:
593
+ type: string
594
+ example: E
595
+ payment_methods:
596
+ type: array
597
+ items:
598
+ type: string
599
+ enum:
600
+ - card_online
601
+ - card_offline
602
+ - cash
603
+ - coins_only
604
+ - mobile_app
605
+ - litacka
606
+ - sms_payment
607
+ - apple_pay
608
+ - google_pay
609
+ - unknown
610
+
611
+ charge_currency:
612
+ type: string
613
+ example: CZK
614
+ allowed_vehicle_type:
615
+ type: string
616
+ nullable: true
617
+ example: carSharing, taxi
618
+ allowed_fuel_type:
619
+ type: string
620
+ nullable: true
621
+ example: electricity, petrol, lpg
622
+ charges:
623
+ type: array
624
+ items:
625
+ $ref: '#/components/schemas/ParkingSpaceTariffCharge'
626
+ reservation_url:
627
+ type: string
628
+ nullable: true
629
+ ParkingSpaceTariffCharge:
630
+ title: Parking Space Tariff Charge
631
+ required:
632
+ - charge
633
+ - charge_order_index
634
+ type: object
635
+ properties:
636
+ charge:
637
+ type: number
638
+ example: 20
639
+ charge_type:
640
+ type: string
641
+ nullable: true
642
+ enum:
643
+ - minimum
644
+ - maximum
645
+ - additional_interval_price
646
+ - season_ticket
647
+ - temporary_price
648
+ - first_interval_price
649
+ - free_parking
650
+ - flat
651
+ - unknown
652
+ - other
653
+ charge_order_index:
654
+ type: number
655
+ example: 0
656
+ charge_interval:
657
+ type: number
658
+ nullable: true
659
+ example: 1800
660
+ max_iterations_of_charge:
661
+ type: number
662
+ nullable: true
663
+ example: 1
664
+ min_iterations_of_charge:
665
+ type: number
666
+ nullable: true
667
+ example: 1
668
+ start_time_of_period:
669
+ type: string
670
+ nullable: true
671
+ example: Mon-Fri 09:00
672
+ end_time_of_period:
673
+ type: string
674
+ nullable: true
675
+ example: Mon-Sun 14:30
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/parkings",
3
- "version": "1.1.1-dev.553095105",
3
+ "version": "1.1.1-dev.564542852",
4
4
  "description": "Golemio Parkings Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -27,10 +27,10 @@
27
27
  "devDependencies": {
28
28
  "@commitlint/cli": "^11.0.0",
29
29
  "@commitlint/config-conventional": "^11.0.0",
30
- "@golemio/core": "1.2.10-dev.544242823",
31
- "@golemio/city-districts": "1.0.5-dev.551054240",
30
+ "@golemio/core": "1.2.13",
31
+ "@golemio/city-districts": "1.0.5",
32
32
  "@golemio/eslint-config": "^1.1.0",
33
- "@golemio/schema-definitions": "2.0.37-dev.549508871",
33
+ "@golemio/schema-definitions": "2.0.37",
34
34
  "@ovos-media/ts-transform-paths": "^1.7.18-1",
35
35
  "@types/chai": "4.2.3",
36
36
  "@types/chai-as-promised": "7.1.2",
@@ -1,7 +0,0 @@
1
- import { SequelizeModel } from "@golemio/core/dist/output-gateway";
2
- import { IGetMeasurementsFilterParams, IParkingsMeasurement } from "./ParkingsMeasurementsModel";
3
- export declare class ParkingsMeasurementsActualModel extends SequelizeModel {
4
- constructor();
5
- GetAll: (options?: IGetMeasurementsFilterParams) => Promise<IParkingsMeasurement[]>;
6
- GetOne: () => Promise<void>;
7
- }