Got models and event system working

This commit is contained in:
Gregory Schier
2026-03-08 15:18:31 -07:00
parent 7382287bef
commit 0a616eb5e2
13 changed files with 181 additions and 52 deletions

View File

@@ -1,5 +1,9 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type ModelChangeEvent = { "type": "upsert" } | { "type": "delete" };
export type ModelPayload = { model: ProxyEntry, change: ModelChangeEvent, };
export type ProxyEntry = { id: string, createdAt: string, updatedAt: string, url: string, method: string, reqHeaders: Array<ProxyHeader>, reqBody: Array<number> | null, resStatus: number | null, resHeaders: Array<ProxyHeader>, resBody: Array<number> | null, error: string | null, };
export type ProxyHeader = { name: string, value: string, };

View File

@@ -1,4 +1,5 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ModelPayload } from "./gen_models";
export type ProxyStartRequest = { port: number | null, };
@@ -6,4 +7,6 @@ export type ProxyStartResponse = { port: number, alreadyRunning: boolean, };
export type ProxyStopRequest = Record<string, never>;
export type RpcEventSchema = { model_write: ModelPayload, };
export type RpcSchema = { proxy_start: [ProxyStartRequest, ProxyStartResponse], proxy_stop: [ProxyStopRequest, boolean], };