mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
* feat: convert 52 API endpoints from POST to GET for edge caching Convert all cacheable sebuf RPC endpoints to HTTP GET with query/path parameters, enabling CDN edge caching to reduce costs. Flatten nested request types (TimeRange, PaginationRequest, BoundingBox) into scalar query params. Add path params for resource lookups (GetFredSeries, GetHumanitarianSummary, GetCountryStockIndex, GetCountryIntelBrief, GetAircraftDetails). Rewrite router with hybrid static/dynamic matching for path param support. Kept as POST: SummarizeArticle, ClassifyEvent, RecordBaselineSnapshot, GetAircraftDetailsBatch, RegisterInterest. Generated with sebuf v0.9.0 (protoc-gen-ts-client, protoc-gen-ts-server). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: add rate_limited field to market response protos The rateLimited field was hand-patched into generated files on main but never declared in the proto definitions. Regenerating wiped it out, breaking the build. Now properly defined in both ListEtfFlowsResponse and ListMarketQuotesResponse protos. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: remove accidentally committed .planning files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 line
9.3 KiB
JSON
1 line
9.3 KiB
JSON
{"components":{"schemas":{"AisDensityZone":{"description":"AisDensityZone represents a zone of concentrated vessel traffic.","properties":{"deltaPct":{"description":"Change from baseline as a percentage.","format":"double","type":"number"},"id":{"description":"Zone identifier.","minLength":1,"type":"string"},"intensity":{"description":"Traffic intensity score (0-100).","format":"double","maximum":100,"minimum":0,"type":"number"},"location":{"$ref":"#/components/schemas/GeoCoordinates"},"name":{"description":"Zone name (e.g., \"Strait of Malacca\").","type":"string"},"note":{"description":"Analyst note.","type":"string"},"shipsPerDay":{"description":"Estimated ships per day.","format":"int32","type":"integer"}},"required":["id"],"type":"object"},"AisDisruption":{"description":"AisDisruption represents a detected anomaly in AIS vessel tracking data.","properties":{"changePct":{"description":"Percentage change from normal.","format":"double","type":"number"},"darkShips":{"description":"Number of dark ships (AIS off) detected.","format":"int32","type":"integer"},"description":{"description":"Human-readable description.","type":"string"},"id":{"description":"Disruption identifier.","minLength":1,"type":"string"},"location":{"$ref":"#/components/schemas/GeoCoordinates"},"name":{"description":"Descriptive name.","type":"string"},"region":{"description":"Region name.","type":"string"},"severity":{"description":"AisDisruptionSeverity represents the severity of an AIS disruption.","enum":["AIS_DISRUPTION_SEVERITY_UNSPECIFIED","AIS_DISRUPTION_SEVERITY_LOW","AIS_DISRUPTION_SEVERITY_ELEVATED","AIS_DISRUPTION_SEVERITY_HIGH"],"type":"string"},"type":{"description":"AisDisruptionType represents the type of AIS tracking anomaly.\n Maps to TS union: 'gap_spike' | 'chokepoint_congestion'.","enum":["AIS_DISRUPTION_TYPE_UNSPECIFIED","AIS_DISRUPTION_TYPE_GAP_SPIKE","AIS_DISRUPTION_TYPE_CHOKEPOINT_CONGESTION"],"type":"string"},"vesselCount":{"description":"Number of vessels in the affected area.","format":"int32","type":"integer"},"windowHours":{"description":"Analysis window in hours.","format":"int32","type":"integer"}},"required":["id"],"type":"object"},"Error":{"description":"Error is returned when a handler encounters an error. It contains a simple error message that the developer can customize.","properties":{"message":{"description":"Error message (e.g., 'user not found', 'database connection failed')","type":"string"}},"type":"object"},"FieldViolation":{"description":"FieldViolation describes a single validation error for a specific field.","properties":{"description":{"description":"Human-readable description of the validation violation (e.g., 'must be a valid email address', 'required field missing')","type":"string"},"field":{"description":"The field path that failed validation (e.g., 'user.email' for nested fields). For header validation, this will be the header name (e.g., 'X-API-Key')","type":"string"}},"required":["field","description"],"type":"object"},"GeoCoordinates":{"description":"GeoCoordinates represents a geographic location using WGS84 coordinates.","properties":{"latitude":{"description":"Latitude in decimal degrees (-90 to 90).","format":"double","maximum":90,"minimum":-90,"type":"number"},"longitude":{"description":"Longitude in decimal degrees (-180 to 180).","format":"double","maximum":180,"minimum":-180,"type":"number"}},"type":"object"},"GetVesselSnapshotRequest":{"description":"GetVesselSnapshotRequest specifies filters for the vessel snapshot.","properties":{"neLat":{"description":"North-east corner latitude of bounding box.","format":"double","type":"number"},"neLon":{"description":"North-east corner longitude of bounding box.","format":"double","type":"number"},"swLat":{"description":"South-west corner latitude of bounding box.","format":"double","type":"number"},"swLon":{"description":"South-west corner longitude of bounding box.","format":"double","type":"number"}},"type":"object"},"GetVesselSnapshotResponse":{"description":"GetVesselSnapshotResponse contains the vessel traffic snapshot.","properties":{"snapshot":{"$ref":"#/components/schemas/VesselSnapshot"}},"type":"object"},"ListNavigationalWarningsRequest":{"description":"ListNavigationalWarningsRequest specifies filters for retrieving NGA warnings.","properties":{"area":{"description":"Optional area filter (e.g., \"NAVAREA IV\", \"Persian Gulf\").","type":"string"},"cursor":{"description":"Cursor for next page.","type":"string"},"pageSize":{"description":"Maximum items per page (1-100).","format":"int32","type":"integer"}},"type":"object"},"ListNavigationalWarningsResponse":{"description":"ListNavigationalWarningsResponse contains navigational warnings matching the request.","properties":{"pagination":{"$ref":"#/components/schemas/PaginationResponse"},"warnings":{"items":{"$ref":"#/components/schemas/NavigationalWarning"},"type":"array"}},"type":"object"},"NavigationalWarning":{"description":"NavigationalWarning represents a maritime safety warning from NGA.","properties":{"area":{"description":"Geographic area affected.","type":"string"},"authority":{"description":"Warning source authority.","type":"string"},"expiresAt":{"description":"Warning expiry date, as Unix epoch milliseconds.. Warning: Values \u003e 2^53 may lose precision in JavaScript","format":"int64","type":"integer"},"id":{"description":"Warning identifier.","type":"string"},"issuedAt":{"description":"Warning issue date, as Unix epoch milliseconds.. Warning: Values \u003e 2^53 may lose precision in JavaScript","format":"int64","type":"integer"},"location":{"$ref":"#/components/schemas/GeoCoordinates"},"text":{"description":"Full warning text.","type":"string"},"title":{"description":"Warning title.","type":"string"}},"type":"object"},"PaginationResponse":{"description":"PaginationResponse contains pagination metadata returned alongside list results.","properties":{"nextCursor":{"description":"Cursor for fetching the next page. Empty string indicates no more pages.","type":"string"},"totalCount":{"description":"Total count of items matching the query, if known. Zero if the total is unknown.","format":"int32","type":"integer"}},"type":"object"},"ValidationError":{"description":"ValidationError is returned when request validation fails. It contains a list of field violations describing what went wrong.","properties":{"violations":{"description":"List of validation violations","items":{"$ref":"#/components/schemas/FieldViolation"},"type":"array"}},"required":["violations"],"type":"object"},"VesselSnapshot":{"description":"VesselSnapshot represents a point-in-time view of civilian AIS vessel data.","properties":{"densityZones":{"items":{"$ref":"#/components/schemas/AisDensityZone"},"type":"array"},"disruptions":{"items":{"$ref":"#/components/schemas/AisDisruption"},"type":"array"},"snapshotAt":{"description":"Snapshot timestamp, as Unix epoch milliseconds.. Warning: Values \u003e 2^53 may lose precision in JavaScript","format":"int64","type":"integer"}},"type":"object"}}},"info":{"title":"MaritimeService API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/api/maritime/v1/get-vessel-snapshot":{"get":{"description":"GetVesselSnapshot retrieves a point-in-time view of AIS vessel traffic and disruptions.","operationId":"GetVesselSnapshot","parameters":[{"description":"North-east corner latitude of bounding box.","in":"query","name":"ne_lat","required":false,"schema":{"format":"double","type":"number"}},{"description":"North-east corner longitude of bounding box.","in":"query","name":"ne_lon","required":false,"schema":{"format":"double","type":"number"}},{"description":"South-west corner latitude of bounding box.","in":"query","name":"sw_lat","required":false,"schema":{"format":"double","type":"number"}},{"description":"South-west corner longitude of bounding box.","in":"query","name":"sw_lon","required":false,"schema":{"format":"double","type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVesselSnapshotResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}},"description":"Validation error"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response"}},"summary":"GetVesselSnapshot","tags":["MaritimeService"]}},"/api/maritime/v1/list-navigational-warnings":{"get":{"description":"ListNavigationalWarnings retrieves active maritime safety warnings from NGA.","operationId":"ListNavigationalWarnings","parameters":[{"description":"Maximum items per page (1-100).","in":"query","name":"page_size","required":false,"schema":{"format":"int32","type":"integer"}},{"description":"Cursor for next page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Optional area filter (e.g., \"NAVAREA IV\", \"Persian Gulf\").","in":"query","name":"area","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListNavigationalWarningsResponse"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}},"description":"Validation error"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response"}},"summary":"ListNavigationalWarnings","tags":["MaritimeService"]}}}} |