@autobusal/providers 1.6.2 → 1.6.4

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/CHANGELOG.md CHANGED
@@ -4,6 +4,21 @@ All notable changes to `@autobusal/providers` are documented here. This project
4
4
  adheres to [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
5
5
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.6.4] - 2026-07-30
8
+
9
+ ### Added
10
+
11
+ - **`types/locations.ts` `CityStats`/`CityDestination` types + `CityData.stats`/`.destinations`** - real route/operator/destination-count/price stats and reachable-destinations list from obtapi's new `cities/view` endpoint, for city hub landing pages.
12
+
13
+ ## [1.6.3] - 2026-07-30
14
+
15
+ ### Added
16
+
17
+ - **`types/locations.ts` `CountryStats` type + `CountryData.stats`** - real
18
+ route/operator/city/price-from counts from obtapi's enriched
19
+ `countries/view` endpoint, for country landing pages to render actual
20
+ descriptive content instead of a bare city list.
21
+
7
22
  ## [1.6.2] - 2026-07-30
8
23
 
9
24
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/providers",
3
- "version": "1.6.2",
3
+ "version": "1.6.4",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"
@@ -8,6 +8,13 @@ export interface LocationData {
8
8
  order_id: number
9
9
  }
10
10
 
11
+ export interface CountryStats {
12
+ routes: number
13
+ operators: number
14
+ cities: number
15
+ price_from: string | null
16
+ }
17
+
11
18
  export interface CountryData {
12
19
  id: number
13
20
  name: string
@@ -17,6 +24,24 @@ export interface CountryData {
17
24
  cities?: CityData[]
18
25
  iso_code: string
19
26
  available?: number
27
+ stats?: CountryStats
28
+ }
29
+
30
+ export interface CityStats {
31
+ routes: number
32
+ operators: number
33
+ destinations: number
34
+ price_from: string | null
35
+ }
36
+
37
+ // The lightweight shape Cities\BrowseController::view() nests under
38
+ // `destinations` (other cities reachable from this one) - not a full
39
+ // CityData (no `location`, only what a destination link needs).
40
+ export interface CityDestination {
41
+ id: number
42
+ name: string
43
+ slug: string
44
+ image_url?: string
20
45
  }
21
46
 
22
47
  export interface CityData {
@@ -35,6 +60,8 @@ export interface CityData {
35
60
  front?: number
36
61
  front_order?: number
37
62
  image?: string[]
63
+ stats?: CityStats
64
+ destinations?: CityDestination[]
38
65
  }
39
66
 
40
67
  export interface StopData {