nil_payload/query.rs
1// Copyright (C) Call of Nil contributors
2// SPDX-License-Identifier: AGPL-3.0-only
3
4use nil_core::world::config::WorldId;
5use nil_crypto::password::Password;
6use serde::Deserialize;
7
8#[cfg(feature = "typescript")]
9use ts_rs::TS;
10
11#[derive(Clone, Debug, Deserialize)]
12#[serde(rename_all = "camelCase")]
13#[cfg_attr(feature = "typescript", derive(TS))]
14#[cfg_attr(feature = "typescript", ts(optional_fields = nullable))]
15pub struct WebsocketQuery {
16 pub world_id: WorldId,
17 #[serde(default)]
18 pub world_password: Option<Password>,
19}