Skip to main content

ocm_types/
invite.rs

1// SPDX-FileCopyrightText: 2026 Matthias Kraus <info@opengeomesh.org>
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5use serde::{Deserialize, Serialize};
6
7#[derive(Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
8#[serde(rename_all = "camelCase")]
9pub struct AcceptedInvite {
10    /// FQDN of the receiver OCM service.
11    ///
12    /// example: receiver.org
13    pub recipient_provider: String,
14    /// Token received in the invite
15    ///
16    /// example: xyz
17    pub token: String,
18    /// Unique ID to identify the Invite Receiver at their OCM Server.
19    ///
20    /// example: 51dc30ddc473d43a6011e9ebba6ca770
21    pub user_id: String,
22    /// Email address of the Invite Receiver.
23    /// example: richard@gmail.com
24    pub email: String,
25    /// Name of the Invite Receiver.
26    /// example: Richard Feynman
27    pub name: String,
28}
29
30#[derive(Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
31#[serde(rename_all = "camelCase")]
32pub struct AcceptedInviteResponse {
33    /// Unique ID to identify the Invite Sender at their OCM Server.
34    /// example: 9302
35    pub user_id: String,
36    /// Email ID of the Invite Sender.
37    /// example: john@sender.org
38    pub email: String,
39    /// Name of the Invite Sender.
40    /// example: John Doe
41    pub name: String,
42}