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:
106
plugins/hammerhead/types.go
Normal file
106
plugins/hammerhead/types.go
Normal file
@@ -0,0 +1,106 @@
|
||||
package main
|
||||
|
||||
import "github.com/open-wanderer/wanderer/plugins/sdk"
|
||||
|
||||
type instanceRef = sdk.InstanceRef
|
||||
type refreshSessionInput = sdk.RefreshSessionInput
|
||||
type refreshSessionOutput = sdk.RefreshSessionOutput
|
||||
type trailSendInput = sdk.TrailSendInput
|
||||
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 trailSendPlan = sdk.TrailSendPlan
|
||||
|
||||
type loginResponse struct {
|
||||
Token string `json:"access_token"`
|
||||
}
|
||||
|
||||
type toursResponse struct {
|
||||
TotalPages int `json:"totalPages"`
|
||||
Data []tourResponse `json:"data"`
|
||||
}
|
||||
|
||||
type tourResponse struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
}
|
||||
|
||||
type activitiesResponse struct {
|
||||
TotalPages int `json:"totalPages"`
|
||||
Data []activityResponse `json:"data"`
|
||||
}
|
||||
|
||||
type activityResponse struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
}
|
||||
|
||||
type tour struct {
|
||||
ID string `json:"id"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
Name string `json:"name"`
|
||||
Distance float64 `json:"distance"`
|
||||
Elevation elevation `json:"elevation"`
|
||||
StartLocation location `json:"startLocation"`
|
||||
RoutePolyline string `json:"routePolyline"`
|
||||
IsPublic bool `json:"isPublic"`
|
||||
}
|
||||
|
||||
type elevation struct {
|
||||
Gain float64 `json:"gain"`
|
||||
Loss float64 `json:"loss"`
|
||||
Polyline string `json:"polyline"`
|
||||
}
|
||||
|
||||
type location struct {
|
||||
Lat float64 `json:"lat"`
|
||||
Lng float64 `json:"lng"`
|
||||
}
|
||||
|
||||
type activity struct {
|
||||
ActivityData activityData `json:"activityData"`
|
||||
RecordData recordData `json:"recordData"`
|
||||
}
|
||||
|
||||
type activityData struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
Duration duration `json:"duration"`
|
||||
ActivityInfo []info `json:"activityInfo"`
|
||||
Laps []lapDetail `json:"laps"`
|
||||
ActivityType string `json:"activityType"`
|
||||
}
|
||||
|
||||
type duration struct {
|
||||
ElapsedTime int `json:"elapsedTime"`
|
||||
}
|
||||
|
||||
type info struct {
|
||||
Key string `json:"key"`
|
||||
Value infoValue `json:"value"`
|
||||
}
|
||||
|
||||
type infoValue struct {
|
||||
Value float64 `json:"value"`
|
||||
}
|
||||
|
||||
type lapDetail struct {
|
||||
ActiveTime int `json:"activeTime"`
|
||||
}
|
||||
|
||||
type recordData struct {
|
||||
Timestamp []int `json:"timestamp"`
|
||||
Elevation []float64 `json:"elevation"`
|
||||
Lat []float64 `json:"lat"`
|
||||
Lng []float64 `json:"lng"`
|
||||
}
|
||||
|
||||
type pluginError = sdk.PluginError
|
||||
Reference in New Issue
Block a user