feat: add plugin system (#1034)
* feat: add plugin system * fix db docker build * fix hammerhead readme, add strava subscription news to docs * fixes and sdk improvements * fix: reduce Meilisearch load, debounce federation sync (#1012) * optimize meili trail index * several fixes --------- Co-authored-by: Flomp <Flomp@users.noreply.github.com> * Bump svelte from 5.55.5 to 5.56.0 in /docs (#1032) Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 5.55.5 to 5.56.0. - [Release notes](https://github.com/sveltejs/svelte/releases) - [Changelog](https://github.com/sveltejs/svelte/blob/main/packages/svelte/CHANGELOG.md) - [Commits](https://github.com/sveltejs/svelte/commits/svelte@5.56.0/packages/svelte) --- updated-dependencies: - dependency-name: svelte dependency-version: 5.56.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Flomp <Flomp@users.noreply.github.com> * Release v0.19.2 (#1035) * chore: release v0.19.2 * add changelog --------- Co-authored-by: Flomp <26000991+Flomp@users.noreply.github.com> Co-authored-by: Christian Beutel <> * speed up plugin sync and several small fixes * concepts for security improvements and process stability * improve concept * security concept implemented * remove insecure TLS * worker concept implemented * fixes and cleanup * fixes * docu * mermaid, namings * WASM plugin host improvements, plugin logging * fix db migration * Improve plugin config and category mapping UI * fixes * further fixes * remove manual test sync * fix db migration and strava mapping * type added, UI improvements * fix plugin card toggle clickable area * optimize synch status card layout * plugin type 'trails' instead of 'integration' * session auth validation in UI * fix komoot date and waypoints * improve category mapping * fix send to hammerhead: trail name * plugin setup error handling improved * fix review findings * re-mapping added * rename remote_category --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Flomp <Flomp@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Flomp <26000991+Flomp@users.noreply.github.com>
This commit is contained in:
95
plugins/strava/types.go
Normal file
95
plugins/strava/types.go
Normal file
@@ -0,0 +1,95 @@
|
||||
package main
|
||||
|
||||
import "github.com/open-wanderer/wanderer/plugins/sdk"
|
||||
|
||||
type instanceRef = sdk.InstanceRef
|
||||
type listInput = sdk.ListInput
|
||||
type listOutput = sdk.ListOutput
|
||||
type detailInput = sdk.DetailInput
|
||||
type detailOutput = sdk.DetailOutput
|
||||
type trailSummary = sdk.TrailSummary
|
||||
type trailImport = sdk.TrailImport
|
||||
type trailImportSource = sdk.TrailImportSource
|
||||
type track = sdk.Track
|
||||
type waypoint = sdk.Waypoint
|
||||
type photo = sdk.Photo
|
||||
type mediaSource = sdk.MediaSource
|
||||
|
||||
type pluginError = sdk.PluginError
|
||||
|
||||
type route struct {
|
||||
Description string `json:"description"`
|
||||
Distance float64 `json:"distance"`
|
||||
ElevationGain float64 `json:"elevation_gain"`
|
||||
IDStr string `json:"id_str"`
|
||||
Name string `json:"name"`
|
||||
Private bool `json:"private"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
Type int `json:"type"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
EstimatedMovingTime int `json:"estimated_moving_time"`
|
||||
Waypoints []routeWaypoint `json:"waypoints"`
|
||||
}
|
||||
|
||||
type routeWaypoint struct {
|
||||
Latlng []float64 `json:"latlng"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
type activity struct {
|
||||
ID int64 `json:"id"`
|
||||
}
|
||||
|
||||
type detailedActivity struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Distance float64 `json:"distance"`
|
||||
ElapsedTime int `json:"elapsed_time"`
|
||||
TotalElevationGain float64 `json:"total_elevation_gain"`
|
||||
Private bool `json:"private"`
|
||||
StartDate string `json:"start_date"`
|
||||
StartLatlng []float64 `json:"start_latlng"`
|
||||
Type string `json:"type"`
|
||||
SportType string `json:"sport_type"`
|
||||
Photos photos `json:"photos"`
|
||||
}
|
||||
|
||||
type photos struct {
|
||||
Count int `json:"count"`
|
||||
Primary primaryPhoto `json:"primary"`
|
||||
}
|
||||
|
||||
type primaryPhoto struct {
|
||||
ID int64 `json:"id"`
|
||||
Urls photoURLs `json:"urls"`
|
||||
}
|
||||
|
||||
type photoURLs struct {
|
||||
Num100 string `json:"100"`
|
||||
Num600 string `json:"600"`
|
||||
}
|
||||
|
||||
type activityPhoto struct {
|
||||
UniqueID string `json:"unique_id"`
|
||||
Urls photoURLs `json:"urls"`
|
||||
}
|
||||
|
||||
type activityStreamResponse struct {
|
||||
LatLng streamLatLng `json:"latlng"`
|
||||
Time streamInt `json:"time"`
|
||||
Altitude streamFloat64 `json:"altitude"`
|
||||
}
|
||||
|
||||
type streamLatLng struct {
|
||||
Data [][]float64 `json:"data"`
|
||||
}
|
||||
|
||||
type streamInt struct {
|
||||
Data []int `json:"data"`
|
||||
}
|
||||
|
||||
type streamFloat64 struct {
|
||||
Data []float64 `json:"data"`
|
||||
}
|
||||
Reference in New Issue
Block a user