mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-27 03:41:26 +01:00
Add .oxfmtignore to skip generated bindings and wasm-pack output. Add npm format script, update DEVELOPMENT.md for Vite+ toolchain, and format all non-generated files with oxfmt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
44 lines
895 B
TypeScript
44 lines
895 B
TypeScript
import { invoke } from "@tauri-apps/api/core";
|
|
import { WebsocketConnection } from "@yaakapp-internal/models";
|
|
|
|
export function deleteWebsocketConnections(requestId: string) {
|
|
return invoke("cmd_ws_delete_connections", {
|
|
requestId,
|
|
});
|
|
}
|
|
|
|
export function connectWebsocket({
|
|
requestId,
|
|
environmentId,
|
|
cookieJarId,
|
|
}: {
|
|
requestId: string;
|
|
environmentId: string | null;
|
|
cookieJarId: string | null;
|
|
}) {
|
|
return invoke("cmd_ws_connect", {
|
|
requestId,
|
|
environmentId,
|
|
cookieJarId,
|
|
}) as Promise<WebsocketConnection>;
|
|
}
|
|
|
|
export function closeWebsocket({ connectionId }: { connectionId: string }) {
|
|
return invoke("cmd_ws_close", {
|
|
connectionId,
|
|
});
|
|
}
|
|
|
|
export function sendWebsocket({
|
|
connectionId,
|
|
environmentId,
|
|
}: {
|
|
connectionId: string;
|
|
environmentId: string | null;
|
|
}) {
|
|
return invoke("cmd_ws_send", {
|
|
connectionId,
|
|
environmentId,
|
|
});
|
|
}
|