mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-06-07 23:22:47 +02:00
Filesystem Sync (#142)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "yaak-sse"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0.204", features = ["derive"] }
|
||||
ts-rs = { version = "10.0.0", features = ["serde-json-impl"] }
|
||||
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ServerSentEvent = { eventType: string, data: string, id: string | null, retry: bigint | null, };
|
||||
@@ -0,0 +1 @@
|
||||
export * from './bindings/sse';
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "@yaakapp-internal/sse",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"main": "index.ts"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
pub mod sse;
|
||||
@@ -0,0 +1,12 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use ts_rs::TS;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, Default, TS)]
|
||||
#[serde(default, rename_all = "camelCase")]
|
||||
#[ts(export, export_to = "sse.ts")]
|
||||
pub struct ServerSentEvent {
|
||||
pub event_type: String,
|
||||
pub data: String,
|
||||
pub id: Option<String>,
|
||||
pub retry: Option<u64>,
|
||||
}
|
||||
Reference in New Issue
Block a user