From 542e237de19f74a52f28d15fd3ee94d5904bd2fd Mon Sep 17 00:00:00 2001 From: lukvmil Date: Mon, 19 May 2025 19:57:17 +0800 Subject: [PATCH 1/2] Event model now excludes None fields, manifest and contents will be ommitted from the JSON payload if unset. This is for better compatibility with TypeScript's strict type checking --- src/koi_net/protocol/event.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/koi_net/protocol/event.py b/src/koi_net/protocol/event.py index f631c70..ecebbb6 100644 --- a/src/koi_net/protocol/event.py +++ b/src/koi_net/protocol/event.py @@ -15,6 +15,9 @@ class Event(BaseModel): manifest: Manifest | None = None contents: dict | None = None + class Config: + exclude_none = True + def __repr__(self): return f"" From 8c959e537bb1f2a9a790fc0af07f1a4fc82072a1 Mon Sep 17 00:00:00 2001 From: lukvmil Date: Mon, 19 May 2025 19:57:52 +0800 Subject: [PATCH 2/2] version bump -> beta.19 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 64ce465..e9aaf2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "koi-net" -version = "1.0.0-beta.18" +version = "1.0.0-beta.19" description = "Implementation of KOI-net protocol in Python" authors = [ {name = "Luke Miller", email = "luke@block.science"}