Skip to main content

nil_payload/request/
chat.rs

1// Copyright (C) Call of Nil contributors
2// SPDX-License-Identifier: AGPL-3.0-only
3
4use bon::Builder;
5use nil_core::world::config::WorldId;
6use serde::{Deserialize, Serialize};
7
8#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
9#[serde(rename_all = "camelCase")]
10#[cfg_attr(feature = "typescript", derive(ts_rs::TS))]
11#[cfg_attr(feature = "typescript", ts(export))]
12pub struct GetChatHistoryRequest {
13  #[builder(start_fn, into)]
14  pub world: WorldId,
15}
16
17#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
18#[serde(rename_all = "camelCase")]
19#[cfg_attr(feature = "typescript", derive(ts_rs::TS))]
20#[cfg_attr(feature = "typescript", ts(export))]
21pub struct PushChatMessageRequest {
22  #[builder(start_fn, into)]
23  pub world: WorldId,
24  #[builder(into)]
25  pub message: String,
26}