Checkpoint
Some checks failed
Test and build / Test and lint (push) Failing after 36s
Test and build / Build collector (push) Failing after 43s
Test and build / Build receiver (push) Failing after 42s

This commit is contained in:
2026-03-05 15:38:18 +01:00
parent 3106b2cf45
commit 13afa08e8a
108 changed files with 19509 additions and 729 deletions

View File

@@ -0,0 +1,40 @@
import type { APIService } from './API';
export interface FetchedAPRSPacket {
id?: number;
radio_id?: number;
radio?: {
id?: number;
name?: string;
};
src?: string;
source?: string;
dst?: string;
destination?: string;
path?: string;
comment?: string;
latitude?: number | { Float64?: number; Valid?: boolean } | null;
longitude?: number | { Float64?: number; Valid?: boolean } | null;
raw?: string;
payload?: string;
received_at?: string;
timestamp?: string;
time?: string;
created_at?: string;
}
export class APRSServiceImpl {
private api: APIService;
constructor(api: APIService) {
this.api = api;
}
public async fetchPackets(limit = 200): Promise<FetchedAPRSPacket[]> {
const endpoint = '/aprs/packets';
const params = { limit };
return this.api.fetch<FetchedAPRSPacket[]>(endpoint, { params });
}
}
export default APRSServiceImpl;