sbb-mcp 0.3.0 β†’ 0.4.0

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/README.md CHANGED
@@ -1,153 +1,314 @@
1
- # MCP Registry
2
-
3
- The MCP registry provides MCP clients with a list of MCP servers, like an app store for MCP servers.
4
-
5
- [**πŸ“€ Publish my MCP server**](docs/modelcontextprotocol-io/quickstart.mdx) | [**⚑️ Live API docs**](https://registry.modelcontextprotocol.io/docs) | [**πŸ‘€ Ecosystem vision**](docs/design/ecosystem-vision.md) | πŸ“– **[Full documentation](./docs)**
6
-
7
- ## Development Status
8
-
9
- **2025-10-24 update**: The Registry API has entered an **API freeze (v0.1)** πŸŽ‰. For the next month or more, the API will remain stable with no breaking changes, allowing integrators to confidently implement support. This freeze applies to v0.1 while development continues on v0. We'll use this period to validate the API in real-world integrations and gather feedback to shape v1 for general availability. Thank you to everyone for your contributions and patienceβ€”your involvement has been key to getting us here!
10
-
11
- **2025-09-08 update**: The registry has launched in preview πŸŽ‰ ([announcement blog post](https://blog.modelcontextprotocol.io/posts/2025-09-08-mcp-registry-preview/)). While the system is now more stable, this is still a preview release and breaking changes or data resets may occur. A general availability (GA) release will follow later. We'd love your feedback in [GitHub discussions](https://github.com/modelcontextprotocol/registry/discussions/new?category=ideas) or in the [#registry-dev Discord](https://discord.com/channels/1358869848138059966/1369487942862504016) ([joining details here](https://modelcontextprotocol.io/community/communication)).
12
-
13
- Current key maintainers:
14
- - **Adam Jones** (Anthropic) [@domdomegg](https://github.com/domdomegg)
15
- - **Tadas Antanavicius** (PulseMCP) [@tadasant](https://github.com/tadasant)
16
- - **Toby Padilla** (GitHub) [@toby](https://github.com/toby)
17
- - **Radoslav (Rado) Dimitrov** (Stacklok) [@rdimitrov](https://github.com/rdimitrov)
18
-
19
- ## Contributing
20
-
21
- We use multiple channels for collaboration - see [modelcontextprotocol.io/community/communication](https://modelcontextprotocol.io/community/communication).
22
-
23
- Often (but not always) ideas flow through this pipeline:
24
-
25
- - **[Discord](https://modelcontextprotocol.io/community/communication)** - Real-time community discussions
26
- - **[Discussions](https://github.com/modelcontextprotocol/registry/discussions)** - Propose and discuss product/technical requirements
27
- - **[Issues](https://github.com/modelcontextprotocol/registry/issues)** - Track well-scoped technical work
28
- - **[Pull Requests](https://github.com/modelcontextprotocol/registry/pulls)** - Contribute work towards issues
29
-
30
- ### Quick start:
31
-
32
- #### Pre-requisites
33
-
34
- - **Docker**
35
- - **Go 1.24.x**
36
- - **ko** - Container image builder for Go ([installation instructions](https://ko.build/install/))
37
- - **golangci-lint v2.4.0**
38
-
39
- #### Running the server
40
-
41
- ```bash
42
- # Start full development environment
43
- make dev-compose
44
- ```
45
-
46
- This starts the registry at [`localhost:8080`](http://localhost:8080) with PostgreSQL. The database uses ephemeral storage and is reset each time you restart the containers, ensuring a clean state for development and testing.
47
-
48
- **Note:** The registry uses [ko](https://ko.build) to build container images. The `make dev-compose` command automatically builds the registry image with ko and loads it into your local Docker daemon before starting the services.
49
-
50
- By default, the registry seeds from the production API with a filtered subset of servers (to keep startup fast). This ensures your local environment mirrors production behavior and all seed data passes validation. For offline development you can seed from a file without validation with `MCP_REGISTRY_SEED_FROM=data/seed.json MCP_REGISTRY_ENABLE_REGISTRY_VALIDATION=false make dev-compose`.
51
-
52
- The setup can be configured with environment variables in [docker-compose.yml](./docker-compose.yml) - see [.env.example](./.env.example) for a reference.
53
-
54
- <details>
55
- <summary>Alternative: Running a pre-built Docker image</summary>
56
-
57
- Pre-built Docker images are automatically published to GitHub Container Registry:
58
-
59
- ```bash
60
- # Run latest stable release
61
- docker run -p 8080:8080 ghcr.io/modelcontextprotocol/registry:latest
62
-
63
- # Run latest from main branch (continuous deployment)
64
- docker run -p 8080:8080 ghcr.io/modelcontextprotocol/registry:main
65
-
66
- # Run specific release version
67
- docker run -p 8080:8080 ghcr.io/modelcontextprotocol/registry:v1.0.0
68
-
69
- # Run development build from main branch
70
- docker run -p 8080:8080 ghcr.io/modelcontextprotocol/registry:main-20250906-abc123d
71
- ```
72
-
73
- **Available tags:**
74
- - **Releases**: `latest`, `v1.0.0`, `v1.1.0`, etc.
75
- - **Continuous**: `main` (latest main branch build)
76
- - **Development**: `main-<date>-<sha>` (specific commit builds)
77
-
78
- </details>
79
-
80
- #### Publishing a server
81
-
82
- To publish a server, we've built a simple CLI. You can use it with:
83
-
84
- ```bash
85
- # Build the latest CLI
86
- make publisher
87
-
88
- # Use it!
89
- ./bin/mcp-publisher --help
90
- ```
91
-
92
- See [the publisher guide](./docs/modelcontextprotocol-io/quickstart.mdx) for more details.
93
-
94
- #### Other commands
95
-
96
- ```bash
97
- # Run lint, unit tests and integration tests
98
- make check
99
- ```
100
-
101
- There are also a few more helpful commands for development. Run `make help` to learn more, or look in [Makefile](./Makefile).
102
-
103
- <!--
104
- For Claude and other AI tools: Always prefer make targets over custom commands where possible.
105
- -->
106
-
107
- ## Architecture
108
-
109
- ### Project Structure
110
-
111
- ```
112
- β”œβ”€β”€ cmd/ # Application entry points
113
- β”‚ └── publisher/ # Server publishing tool
114
- β”œβ”€β”€ data/ # Seed data
115
- β”œβ”€β”€ deploy/ # Deployment configuration (Pulumi)
116
- β”œβ”€β”€ docs/ # Documentation
117
- β”œβ”€β”€ internal/ # Private application code
118
- β”‚ β”œβ”€β”€ api/ # HTTP handlers and routing
119
- β”‚ β”œβ”€β”€ auth/ # Authentication (GitHub OAuth, JWT, namespace blocking)
120
- β”‚ β”œβ”€β”€ config/ # Configuration management
121
- β”‚ β”œβ”€β”€ database/ # Data persistence (PostgreSQL)
122
- β”‚ β”œβ”€β”€ service/ # Business logic
123
- β”‚ β”œβ”€β”€ telemetry/ # Metrics and monitoring
124
- β”‚ └── validators/ # Input validation
125
- β”œβ”€β”€ pkg/ # Public packages
126
- β”‚ β”œβ”€β”€ api/ # API types and structures
127
- β”‚ β”‚ └── v0/ # Version 0 API types
128
- β”‚ └── model/ # Data models for server.json
129
- β”œβ”€β”€ scripts/ # Development and testing scripts
130
- β”œβ”€β”€ tests/ # Integration tests
131
- └── tools/ # CLI tools and utilities
132
- └── validate-*.sh # Schema validation tools
133
- ```
134
-
135
- ### Authentication
136
-
137
- Publishing supports multiple authentication methods:
138
- - **GitHub OAuth** - For publishing by logging into GitHub
139
- - **GitHub OIDC** - For publishing from GitHub Actions
140
- - **DNS verification** - For proving ownership of a domain and its subdomains
141
- - **HTTP verification** - For proving ownership of a domain
142
-
143
- The registry validates namespace ownership when publishing. E.g. to publish...:
144
- - `io.github.domdomegg/my-cool-mcp` you must login to GitHub as `domdomegg`, or be in a GitHub Action on domdomegg's repos
145
- - `me.adamjones/my-cool-mcp` you must prove ownership of `adamjones.me` via DNS or HTTP challenge
146
-
147
- ## Community Projects
148
-
149
- Check out [community projects](docs/community-projects.md) to explore notable registry-related work created by the community.
150
-
151
- ## More documentation
152
-
153
- See the [documentation](./docs) for more details if your question has not been answered here!
1
+ # sbb-mcp
2
+
3
+ [![npm version](https://img.shields.io/npm/v/sbb-mcp.svg)](https://www.npmjs.com/package/sbb-mcp)
4
+ [![License: FSL-1.1-MIT](https://img.shields.io/badge/License-FSL--1.1--MIT-blue.svg)](https://fsl.software/)
5
+ [![smithery badge](https://smithery.ai/badge/fabsforward2-zhoi/sbb-mcp)](https://smithery.ai/servers/fabsforward2-zhoi/sbb-mcp)
6
+
7
+ MCP server for **Swiss Federal Railways** (SBB/CFF/FFS) -- real-time train schedules, prices, and ticket purchase links for any AI assistant.
8
+
9
+ Works with Claude Desktop, Claude Code, Cursor, Windsurf, VS Code Copilot, ChatGPT, and any MCP-compatible AI client.
10
+
11
+ ## Features
12
+
13
+ - **Search stations** -- find any Swiss train station by name
14
+ - **Train connections** -- real-time schedules with departure/arrival times, platforms, transfers
15
+ - **Ticket prices** -- 1st/2nd class with Half-Fare (Halbtax) and GA travelcard support
16
+ - **Purchase links** -- direct deep links to buy tickets on SBB.ch
17
+ - **Pagination** -- browse earlier/later connections
18
+ - **Trip details** -- intermediate stops, occupancy, platform changes
19
+ - **Journey planning** -- built-in prompt for end-to-end trip planning
20
+ - **Destination weather** -- automatic weather forecast for your destination (powered by [swiss-weather-mcp](https://www.npmjs.com/package/swiss-weather-mcp))
21
+ - **Multi-traveler** -- family trip pricing when connected to SwissTrip (partner, kids, each with their own reduction card)
22
+ - **Multilingual** -- output in 9 languages: de, fr, it, en, es, pt, ru, ar, zh (v0.4.0+)
23
+ - **Mock mode** -- works without credentials for testing and demos
24
+
25
+ ## Quick Start
26
+
27
+ ### Claude Desktop
28
+
29
+ Add to your `claude_desktop_config.json`:
30
+
31
+ ```json
32
+ {
33
+ "mcpServers": {
34
+ "sbb": {
35
+ "command": "npx",
36
+ "args": ["-y", "sbb-mcp"],
37
+ "env": {
38
+ "SMAPI_CLIENT_ID": "your-client-id",
39
+ "SMAPI_CLIENT_SECRET": "your-secret",
40
+ "SMAPI_SCOPE": "your-scope",
41
+ "SMAPI_CONTRACT_ID": "your-contract-id"
42
+ }
43
+ }
44
+ }
45
+ }
46
+ ```
47
+
48
+ ### Claude Code
49
+
50
+ ```bash
51
+ claude mcp add sbb -- npx -y sbb-mcp
52
+ ```
53
+
54
+ ### Cursor
55
+
56
+ Add to `.cursor/mcp.json`:
57
+
58
+ ```json
59
+ {
60
+ "mcpServers": {
61
+ "sbb": {
62
+ "command": "npx",
63
+ "args": ["-y", "sbb-mcp"],
64
+ "env": {
65
+ "SMAPI_CLIENT_ID": "your-client-id",
66
+ "SMAPI_CLIENT_SECRET": "your-secret",
67
+ "SMAPI_SCOPE": "your-scope",
68
+ "SMAPI_CONTRACT_ID": "your-contract-id"
69
+ }
70
+ }
71
+ }
72
+ }
73
+ ```
74
+
75
+ ### Windsurf
76
+
77
+ Add to `~/.codeium/windsurf/mcp_config.json`:
78
+
79
+ ```json
80
+ {
81
+ "mcpServers": {
82
+ "sbb": {
83
+ "command": "npx",
84
+ "args": ["-y", "sbb-mcp"],
85
+ "env": {
86
+ "SMAPI_CLIENT_ID": "your-client-id",
87
+ "SMAPI_CLIENT_SECRET": "your-secret",
88
+ "SMAPI_SCOPE": "your-scope",
89
+ "SMAPI_CONTRACT_ID": "your-contract-id"
90
+ }
91
+ }
92
+ }
93
+ }
94
+ ```
95
+
96
+ ### VS Code Copilot
97
+
98
+ Add to `.vscode/mcp.json`:
99
+
100
+ ```json
101
+ {
102
+ "servers": {
103
+ "sbb": {
104
+ "command": "npx",
105
+ "args": ["-y", "sbb-mcp"],
106
+ "env": {
107
+ "SMAPI_CLIENT_ID": "your-client-id",
108
+ "SMAPI_CLIENT_SECRET": "your-secret",
109
+ "SMAPI_SCOPE": "your-scope",
110
+ "SMAPI_CONTRACT_ID": "your-contract-id"
111
+ }
112
+ }
113
+ }
114
+ }
115
+ ```
116
+
117
+ ### Smithery
118
+
119
+ Install via [Smithery](https://smithery.ai/servers/fabsforward2-zhoi/sbb-mcp):
120
+
121
+ ```bash
122
+ npx @smithery/cli mcp add fabsforward2-zhoi/sbb-mcp
123
+ ```
124
+
125
+ ### Demo Mode (No Credentials)
126
+
127
+ Run without any environment variables to use mock data:
128
+
129
+ ```bash
130
+ npx sbb-mcp
131
+ ```
132
+
133
+ This lets you test the MCP server with realistic Swiss station data without SBB API credentials.
134
+
135
+ ## Multilingual output (v0.4.0+)
136
+
137
+ Every tool accepts an optional `language` argument β€” one of `de`, `fr`, `it`, `en`, `es`, `pt`, `ru`, `ar`, `zh`. This controls the output language for labels, date/time formatting, and the ticket-buy button text. It also sets the `Accept-Language` header on SBB API calls so station names come back in the requested language where the SBB API supports it (de/fr/it/en).
138
+
139
+ Resolution order: `language` arg β†’ saved profile language (`save_profile`) β†’ English.
140
+
141
+ ```jsonc
142
+ // Example: French output
143
+ { "from": "Zurich HB", "to": "Bern", "language": "fr" }
144
+ ```
145
+
146
+ The SBB deep link path uses `de/fr/it/en` where supported and falls back to `en` for other languages (SBB.ch serves those four).
147
+
148
+ Save a default language once per user:
149
+
150
+ ```jsonc
151
+ { "tool": "save_profile", "language": "de" }
152
+ ```
153
+
154
+ ## Tools
155
+
156
+ ### search_stations
157
+
158
+ Search for Swiss train stations by name. Returns station IDs needed for other tools.
159
+
160
+ **Input:**
161
+ - `query` (string, required) -- Station name, e.g. "Zurich", "Bern", "Interlaken"
162
+ - `limit` (number, optional) -- Max results (default: 10)
163
+
164
+ **Example:** "Find stations matching Luzern"
165
+
166
+ ### search_connections
167
+
168
+ Find train connections between two stations. Automatically resolves station names to IDs.
169
+
170
+ **Input:**
171
+ - `from` (string, required) -- Origin station name or ID (e.g. "Zurich HB" or "8503000")
172
+ - `to` (string, required) -- Destination station name or ID
173
+ - `date` (string, optional) -- Travel date YYYY-MM-DD
174
+ - `time` (string, optional) -- Departure time HH:MM
175
+ - `arrival_time` (boolean, optional) -- Treat time as arrival time
176
+
177
+ **Example:** "Show me trains from Zurich to Bern tomorrow at 9am"
178
+
179
+ Results automatically include destination weather when coordinates are available (e.g. **Bern weather:** 6-18Β°C, mostly sunny, 10% rain).
180
+
181
+ ### get_trip_details
182
+
183
+ Get detailed stop-by-stop information for a connection including intermediate stops, platforms, and occupancy forecasts.
184
+
185
+ **Input:**
186
+ - `trip_id` (string, required) -- Trip ID from search_connections
187
+
188
+ ### get_more_connections
189
+
190
+ Load earlier or later trains for a previous search.
191
+
192
+ **Input:**
193
+ - `collection_id` (string, required) -- Collection ID from search_connections
194
+ - `direction` ("next" | "previous") -- Later or earlier trains
195
+
196
+ ### get_prices
197
+
198
+ Get ticket prices with Swiss reduction card support. Supports multi-traveler family pricing when connected to SwissTrip.
199
+
200
+ **Input:**
201
+ - `trip_ids` (string[], required) -- Trip IDs from search_connections
202
+ - `traveler_type` ("ADULT" | "CHILD", default: "ADULT") -- used when no traveler_names given
203
+ - `reduction_card` ("HALF_FARE" | "GA" | "NONE", default: "HALF_FARE") -- used when no traveler_names given
204
+ - `traveler_names` (string[], optional) -- SwissTrip traveler names for family pricing (requires `SWISSTRIP_TOKEN`)
205
+
206
+ **Example:** "How much for Zurich to Zermatt for Fabian and Anna?" (with SwissTrip connected, each traveler's reduction card is applied automatically)
207
+
208
+ ### get_ticket_link
209
+
210
+ Get a direct purchase link to buy the ticket on SBB.ch. On mobile with the SBB app installed, opens directly in the app with Halbtax/GA applied automatically. Supports multi-traveler tickets when connected to SwissTrip.
211
+
212
+ **Input:**
213
+ - `trip_id` (string, required) -- Trip ID to purchase
214
+ - `from_name` (string, required) -- Origin station name
215
+ - `from_id` (string, required) -- Origin station ID
216
+ - `to_name` (string, required) -- Destination station name
217
+ - `to_id` (string, required) -- Destination station ID
218
+ - `date` (string, required) -- Travel date YYYY-MM-DD
219
+ - `time` (string, required) -- Departure time HH:MM
220
+ - `traveler_type` ("ADULT" | "CHILD", default: "ADULT") -- used when no traveler_names given
221
+ - `reduction_card` ("HALF_FARE" | "GA" | "NONE", default: "HALF_FARE") -- used when no traveler_names given
222
+ - `traveler_names` (string[], optional) -- SwissTrip traveler names for family tickets (requires `SWISSTRIP_TOKEN`)
223
+
224
+ ### list_travelers
225
+
226
+ List all travelers in the user's SwissTrip account (self, partner, kids). Each traveler has their own reduction card. Requires `SWISSTRIP_TOKEN`.
227
+
228
+ **Example:** "Who are my travelers?" β†’ shows all saved travelers with their reduction cards
229
+
230
+ ## Prompts
231
+
232
+ ### plan_journey
233
+
234
+ End-to-end journey planning prompt. Searches connections, compares prices, and provides ticket links.
235
+
236
+ **Input:**
237
+ - `from` (string, required) -- Origin station
238
+ - `to` (string, required) -- Destination station
239
+ - `date` (string, optional) -- Travel date
240
+
241
+ ## Environment Variables
242
+
243
+ | Variable | Required | Description |
244
+ |----------|----------|-------------|
245
+ | `SMAPI_CLIENT_ID` | Yes* | OAuth 2.0 client ID from SBB Developer Portal |
246
+ | `SMAPI_CLIENT_SECRET` | Yes* | OAuth 2.0 client secret |
247
+ | `SMAPI_SCOPE` | Yes* | OAuth scope |
248
+ | `SMAPI_CONTRACT_ID` | Yes* | SBB business contract ID |
249
+ | `SMAPI_ENV` | No | `int` (default) or `prod` |
250
+ | `SMAPI_TENANT_ID` | No | Azure AD tenant (defaults to SBB tenant) |
251
+ | `SWISSTRIP_TOKEN` | No | SwissTrip auth token for cloud profiles and multi-traveler support |
252
+ | `SWISSTRIP_URL` | No | SwissTrip API base URL (defaults to `https://swisstrip.ch`) |
253
+
254
+ *Without SMAPI credentials, the server runs in mock mode with realistic demo data.
255
+
256
+ ## SwissTrip Integration (Optional)
257
+
258
+ Set `SWISSTRIP_TOKEN` to connect sbb-mcp to your [SwissTrip](https://swisstrip.ch) account. This enables:
259
+
260
+ - **Cloud-synced profiles** -- your travel profile (name, DOB, reduction card) syncs from SwissTrip instead of local `~/.sbb-mcp/profile.json`
261
+ - **Multi-traveler pricing** -- add your partner, kids, or travel companions on SwissTrip and get per-person pricing with correct reduction cards
262
+ - **Family tickets** -- pass `traveler_names` to `get_prices` and `get_ticket_link` for group pricing
263
+
264
+ ```json
265
+ {
266
+ "mcpServers": {
267
+ "sbb": {
268
+ "command": "npx",
269
+ "args": ["-y", "sbb-mcp"],
270
+ "env": {
271
+ "SMAPI_CLIENT_ID": "your-client-id",
272
+ "SMAPI_CLIENT_SECRET": "your-secret",
273
+ "SMAPI_SCOPE": "your-scope",
274
+ "SWISSTRIP_TOKEN": "your-swisstrip-auth-token"
275
+ }
276
+ }
277
+ }
278
+ }
279
+ ```
280
+
281
+ Without `SWISSTRIP_TOKEN`, sbb-mcp uses local file-based profiles as before -- no SwissTrip account required.
282
+
283
+ ## Available on
284
+
285
+ - [npm](https://www.npmjs.com/package/sbb-mcp)
286
+ - [Official MCP Registry](https://registry.modelcontextprotocol.io)
287
+ - [Smithery](https://smithery.ai/servers/fabsforward2-zhoi/sbb-mcp)
288
+
289
+ Also available as: [sbb-mcp-official](https://www.npmjs.com/package/sbb-mcp-official) | [swiss-rail-mcp](https://www.npmjs.com/package/swiss-rail-mcp) | [sbb-cff-ffs-mcp](https://www.npmjs.com/package/sbb-cff-ffs-mcp) | [swiss-train-mcp](https://www.npmjs.com/package/swiss-train-mcp) | [swiss-railways-mcp](https://www.npmjs.com/package/swiss-railways-mcp)
290
+
291
+ ## About
292
+
293
+ Built on the official SBB Swiss Mobility API (SMAPI) with OSDM-compliant journey planning and pricing. Covers the entire Swiss public transport network including SBB, BLS, SOB, and regional operators. Weather data powered by [swiss-weather-mcp](https://www.npmjs.com/package/swiss-weather-mcp) (MeteoSwiss + Open-Meteo).
294
+
295
+ **SBB** (Schweizerische Bundesbahnen) / **CFF** (Chemins de fer federaux suisses) / **FFS** (Ferrovie federali svizzere) -- Swiss Federal Railways operates one of the densest rail networks in the world with over 10,000 daily connections.
296
+
297
+ ## Changelog
298
+
299
+ ### v0.4.0 β€” Multilingual
300
+
301
+ - Every tool now accepts an optional `language` parameter (`de | fr | it | en | es | pt | ru | ar | zh`).
302
+ - Labels, date/time formatting, and the SBB ticket-buy button text are translated.
303
+ - `Accept-Language` is passed to SBB SMAPI so station names come back in the requested language where supported (de/fr/it/en).
304
+ - `save_profile` stores a preferred language; later tool calls default to it when `language` is omitted.
305
+ - **Breaking:** default output locale with no profile and no tool arg is now `en` (was implicitly `de-CH`). Set a profile or pass `language: 'de'` to restore the old behavior.
306
+ - Translations shared with the WhatsApp/Telegram bots via the new [`sbb-i18n`](https://www.npmjs.com/package/sbb-i18n) package.
307
+
308
+ ### v0.3.0 β€” Destination weather
309
+
310
+ - Automatic weather forecast appended to `search_connections` results via [`swiss-weather-mcp`](https://www.npmjs.com/package/swiss-weather-mcp).
311
+
312
+ ## License
313
+
314
+ [FSL-1.1-MIT](https://fsl.software/) -- Functional Source License. Free to use for any non-competing purpose. Converts to MIT after 2 years. See [LICENSE](LICENSE) for details.
@@ -1,12 +1,12 @@
1
1
  import type { SmapiPlace, SmapiTrip, SmapiTripsCollection, SmapiPriceResult } from './transport/smapi-types.js';
2
- export declare function formatStations(stations: SmapiPlace[]): string;
3
- export declare function formatConnections(collection: SmapiTripsCollection): string;
4
- export declare function formatTripDetails(trip: SmapiTrip): string;
5
- export declare function formatPrices(results: SmapiPriceResult[]): string;
2
+ import type { Lang } from './i18n.js';
3
+ export declare function formatStations(stations: SmapiPlace[], lang?: Lang): string;
4
+ export declare function formatConnections(collection: SmapiTripsCollection, lang?: Lang): string;
5
+ export declare function formatTripDetails(trip: SmapiTrip, lang?: Lang): string;
6
+ export declare function formatPrices(results: SmapiPriceResult[], lang?: Lang): string;
6
7
  /**
7
8
  * Build an SBB.ch deep link URL with connection pre-filled.
8
- * Uses the official SBB deep linking format (von/nach/date/time/moment).
9
- * On mobile with SBB app installed, opens directly in the app (user already logged in).
9
+ * SBB.ch URLs support de/fr/it/en; other languages fall back to `en`.
10
10
  */
11
11
  export declare function buildSbbDeepLink(params: {
12
12
  fromName: string;
@@ -15,8 +15,8 @@ export declare function buildSbbDeepLink(params: {
15
15
  toId: string;
16
16
  date: string;
17
17
  time: string;
18
- lang?: string;
18
+ lang?: Lang;
19
19
  }): string;
20
- export declare function formatTicketLink(tripId: string, deepLink?: string, sbbLink?: string): string;
20
+ export declare function formatTicketLink(tripId: string, deepLink?: string, sbbLink?: string, lang?: Lang): string;
21
21
  /** Append destination weather to formatted connections */
22
22
  export declare function appendWeatherToConnections(formatted: string, destinationLat: number, destinationLon: number, date: string, destinationName: string): Promise<string>;