Merge upstream 2.0.3 into the dev1 preview backend

This commit is contained in:
n30nex committed 2026-10-07 05:48:19 -04:00
commit b0b591c220
47 files changed
+2747 -121

No files matched your search

+276 -1
View File
@@ -897,6 +897,26 @@ const docTemplate = `{
}
}
},
"/info": {
"get": {
"description": "minAppVersion is null when the server sets no requirement.",
"produces": [
"application/json"
],
"tags": [
"Info"
],
"summary": "Server info and minimum mobile app version",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.Info"
}
}
}
}
},
"/messages": {
"get": {
"produces": [
@@ -1430,6 +1450,127 @@ const docTemplate = `{
}
}
},
"/observers/directory": {
"get": {
"description": "Defaults to the trailing seven days through request time. Counts combine completed whole-hour analytics with retained observations for other hours and exact boundary slices. Incomplete history still returns numeric counts and the requested sort; coverage describes available history. Repeat filters and the returned windowStart/windowEnd as since/until with the cursor on later pages. Results may move as data changes; refresh without bounds for a new rolling window.",
"produces": [
"application/json"
],
"tags": [
"Observers"
],
"summary": "List observers with windowed traffic counts",
"parameters": [
{
"type": "string",
"description": "Single IATA",
"name": "iata",
"in": "query"
},
{
"type": "string",
"description": "Comma-separated IATAs",
"name": "iatas",
"in": "query"
},
{
"type": "integer",
"description": "Region ID",
"name": "regionId",
"in": "query"
},
{
"type": "string",
"description": "Region slug",
"name": "region",
"in": "query"
},
{
"type": "string",
"description": "Observer type",
"name": "type",
"in": "query"
},
{
"type": "string",
"description": "Broker membership",
"name": "broker",
"in": "query"
},
{
"type": "string",
"description": "online or offline",
"name": "status",
"in": "query"
},
{
"type": "string",
"description": "Case-insensitive partial name",
"name": "name",
"in": "query"
},
{
"type": "string",
"description": "Transport scope membership",
"name": "scope",
"in": "query"
},
{
"type": "string",
"description": "traffic (default) or name",
"name": "sort",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Inclusive epoch ms, preserved exactly; default seven days before until; maximum window 31 days",
"name": "since",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Exclusive epoch ms, preserved exactly; default request time",
"name": "until",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "nextCursor returned by preceding page",
"name": "cursor",
"in": "query"
},
{
"type": "integer",
"description": "Page size, default 50, maximum 200",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverDirectory"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/internal_api_handlers.APIError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/internal_api_handlers.APIError"
}
}
}
}
},
"/observers/{observerId}": {
"get": {
"produces": [
@@ -3601,6 +3742,9 @@ const docTemplate = `{
},
"ingest": {
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.AdminIngestConfig"
},
"mobile": {
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.AdminMobileConfig"
}
}
},
@@ -3613,6 +3757,15 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Beacon_beacon-server_internal_api.AdminMobileConfig": {
"type": "object",
"properties": {
"min_app_version": {
"description": "empty means no requirement",
"type": "string"
}
}
},
"github_com_MeshCore-Beacon_beacon-server_internal_api.AdvertObservation": {
"type": "object",
"properties": {
@@ -3909,6 +4062,20 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Beacon_beacon-server_internal_api.Info": {
"type": "object",
"properties": {
"minAppVersion": {
"description": "MinAppVersion is the oldest allowed app version (X.Y.Z); null means no requirement.",
"type": "string",
"example": "0.1.1"
},
"serverVersion": {
"type": "string",
"example": "2.0.2"
}
}
},
"github_com_MeshCore-Beacon_beacon-server_internal_api.KnownRoute": {
"type": "object",
"properties": {
@@ -4484,6 +4651,110 @@ const docTemplate = `{
}
}
},
"github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverDirectory": {
"type": "object",
"properties": {
"coverage": {
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverDirectoryCoverage"
},
"effectiveSort": {
"type": "string"
},
"generatedAt": {
"type": "integer"
},
"hasMore": {
"type": "boolean"
},
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverDirectoryItem"
}
},
"maxObservationCount": {
"description": "Maximum over all matching observers, not only this page; zero when none match.",
"type": "integer"
},
"nextCursor": {
"type": "integer"
},
"observerTypes": {
"type": "array",
"items": {
"type": "string"
}
},
"sort": {
"type": "string"
},
"windowEnd": {
"type": "integer"
},
"windowStart": {
"type": "integer"
}
}
},
"github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverDirectoryCoverage": {
"type": "object",
"properties": {
"completeHours": {
"type": "integer"
},
"expectedHours": {
"type": "integer"
},
"missingHours": {
"type": "integer"
},
"partialHours": {
"type": "integer"
},
"status": {
"type": "string"
}
}
},
"github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverDirectoryItem": {
"type": "object",
"properties": {
"displayName": {
"description": "friendly name from /status messages",
"type": "string"
},
"iata": {
"description": "most recently heard IATA",
"type": "string"
},
"id": {
"type": "string"
},
"observationCount": {
"description": "Available observations in [windowStart, windowEnd), including zero with missing history.",
"type": "integer"
},
"observerType": {
"description": "e.g. \"meshcoretomqtt\", \"meshcoreha\"",
"type": "string"
},
"radio": {
"description": "friendly radio param string: freqMhz,BwKhz,SF e.g. \"910.525,62.5,7\"",
"type": "string"
},
"scopes": {
"description": "list of observer forwarded scopes matched to config",
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"description": "\"online\" or \"offline\" derived from last_status_at",
"type": "string"
}
}
},
"github_com_MeshCore-Beacon_beacon-server_internal_api.ObserverSummary": {
"type": "object",
"properties": {
@@ -5997,13 +6268,17 @@ const docTemplate = `{
{
"description": "Network statistics and time series",
"name": "Stats"
},
{
"description": "Server info for the BEACON Mobile app",
"name": "Info"
}
]
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "2.0.1",
Version: "2.0.3",
Host: "localhost:8080",
BasePath: "/api/v1",
Schemes: []string{"http", "https"},