mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-17 14:29:46 +02:00
Got models and event system working
This commit is contained in:
@@ -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, };
|
||||
|
||||
3
crates-proxy/yaak-proxy-lib/bindings/gen_rpc.ts
generated
3
crates-proxy/yaak-proxy-lib/bindings/gen_rpc.ts
generated
@@ -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], };
|
||||
|
||||
Reference in New Issue
Block a user