mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
add Google Maps route import and plugin corridor search
This commit is contained in:
@@ -407,3 +407,7 @@ It is already silent in CI (any `CI` env var), under `NODE_ENV=test`, and whenev
|
||||
stdout isn't a terminal (i.e. when piped or redirected).
|
||||
|
||||
The SDK tooling in this repo is MIT. Your plugin is your own code under your own license.
|
||||
|
||||
### Roadtrip category searches
|
||||
|
||||
The `searchProvider.search` request can include `category` and `bounds` (south, west, north, east). Search within that rectangle for the category; `query` remains a readable category query and `near` its centre, so existing providers continue to work. These optional fields are absent on older hosts and ordinary name searches. The host validates and filters coordinates, namespaces IDs, and applies the exact route corridor after combining sources. The existing permission and two-second hook timeout still apply.
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "trek-plugin-sdk",
|
||||
"version": "1.7.0",
|
||||
"version": "1.7.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "trek-plugin-sdk",
|
||||
"version": "1.7.0",
|
||||
"version": "1.7.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@clack/prompts": "^1.7.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "trek-plugin-sdk",
|
||||
"version": "1.7.0",
|
||||
"version": "1.7.1",
|
||||
"description": "SDK for building TREK plugins: types, definePlugin, a mock host, manifest validation, and the create-trek-plugin / trek-plugin CLIs.",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -505,6 +505,9 @@ export interface SearchRequest {
|
||||
lang?: string;
|
||||
/** Where the person is looking, when there is somewhere to bias toward. */
|
||||
near?: { lat: number; lng: number };
|
||||
/** Category search within a Roadtrip search rectangle. Older hosts omit these fields. */
|
||||
category?: string;
|
||||
bounds?: { south: number; west: number; north: number; east: number };
|
||||
}
|
||||
export interface SearchProvider {
|
||||
/** Places for a query, drawn into TREK's own search list beside the core results.
|
||||
|
||||
Reference in New Issue
Block a user