From fc8613606d9887002e027de09d111a258e973e82 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Wed, 23 Oct 2024 12:29:18 +0200 Subject: [PATCH] Fix `entry_id` field to camelCase --- crates/radicle-types/bindings/cob/issue/Operation.ts | 2 +- crates/radicle-types/bindings/cob/patch/Action.ts | 7 ------- crates/radicle-types/src/cobs/issue.rs | 1 + 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/crates/radicle-types/bindings/cob/issue/Operation.ts b/crates/radicle-types/bindings/cob/issue/Operation.ts index 04b174001..588a4009c 100644 --- a/crates/radicle-types/bindings/cob/issue/Operation.ts +++ b/crates/radicle-types/bindings/cob/issue/Operation.ts @@ -4,7 +4,7 @@ import type { Embed } from "../thread/Embed"; import type { State } from "./State"; export type Operation = { - entry_id: string; + entryId: string; timestamp: number; author: Author; } & ( diff --git a/crates/radicle-types/bindings/cob/patch/Action.ts b/crates/radicle-types/bindings/cob/patch/Action.ts index b792fd319..61174d5d0 100644 --- a/crates/radicle-types/bindings/cob/patch/Action.ts +++ b/crates/radicle-types/bindings/cob/patch/Action.ts @@ -2,9 +2,6 @@ import type { CodeLocation } from "../thread/CodeLocation"; import type { Embed } from "../thread/Embed"; -/** - * Patch operation. - */ export type Action = | { type: "edit"; title: string; target: string } | { type: "label"; labels: Array } @@ -31,10 +28,6 @@ export type Action = review: string; body: string; location?: CodeLocation; - /** - * Comment this is a reply to. - * Should be [`null`] if it's the top-level comment. - */ reply_to?: string; embeds?: Array; } diff --git a/crates/radicle-types/src/cobs/issue.rs b/crates/radicle-types/src/cobs/issue.rs index c09833b16..959cbe65b 100644 --- a/crates/radicle-types/src/cobs/issue.rs +++ b/crates/radicle-types/src/cobs/issue.rs @@ -50,6 +50,7 @@ impl Issue { } #[derive(Serialize, TS)] +#[serde(rename_all = "camelCase")] #[ts(export)] #[ts(export_to = "cob/issue/")] pub struct Operation {