#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EmailConfirmationRequest {
#[prost(string, tag = "1")]
pub email: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub token: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub token_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EmailConfirmationResponse {
#[prost(oneof = "email_confirmation_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<email_confirmation_response::Response>,
}
pub mod email_confirmation_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Data(super::super::super::shared::v1::SuccessResponseData),
#[prost(message, tag = "2")]
Error(super::super::super::shared::v1::AppError),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PasswordForgotRequest {
#[prost(string, tag = "1")]
pub email: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PasswordForgotResponse {
#[prost(oneof = "password_forgot_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<password_forgot_response::Response>,
}
pub mod password_forgot_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Data(super::super::super::shared::v1::SuccessResponseData),
#[prost(message, tag = "2")]
Error(super::super::super::shared::v1::AppError),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LoginRequest {
#[prost(string, tag = "1")]
pub email: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub password: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub mfa: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub login_challenge: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LoginResponse {
#[prost(oneof = "login_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<login_response::Response>,
}
pub mod login_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Data(super::super::super::shared::v1::SuccessResponseData),
#[prost(message, tag = "2")]
Error(super::super::super::shared::v1::AppError),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SupplierCreateRequest {
#[prost(string, tag = "1")]
pub username: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub email: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub first_name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub last_name: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub password: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub membership: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub image: ::core::option::Option<super::super::shared::v1::Attachment>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SupplierCreateResponse {
#[prost(oneof = "supplier_create_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<supplier_create_response::Response>,
}
pub mod supplier_create_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Data(super::super::super::shared::v1::SuccessResponseData),
#[prost(message, tag = "2")]
Error(super::super::super::shared::v1::AppError),
}
}
pub mod users_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct UsersServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl UsersServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> UsersServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> UsersServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
UsersServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn create_supplier(
&mut self,
request: impl tonic::IntoRequest<super::SupplierCreateRequest>,
) -> std::result::Result<
tonic::Response<super::SupplierCreateResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/users.v1.UsersService/CreateSupplier",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("users.v1.UsersService", "CreateSupplier"));
self.inner.unary(req, path, codec).await
}
pub async fn email_confirmation(
&mut self,
request: impl tonic::IntoRequest<super::EmailConfirmationRequest>,
) -> std::result::Result<
tonic::Response<super::EmailConfirmationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/users.v1.UsersService/EmailConfirmation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("users.v1.UsersService", "EmailConfirmation"));
self.inner.unary(req, path, codec).await
}
pub async fn password_forgot(
&mut self,
request: impl tonic::IntoRequest<super::PasswordForgotRequest>,
) -> std::result::Result<
tonic::Response<super::PasswordForgotResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/users.v1.UsersService/PasswordForgot",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("users.v1.UsersService", "PasswordForgot"));
self.inner.unary(req, path, codec).await
}
pub async fn login(
&mut self,
request: impl tonic::IntoRequest<super::LoginRequest>,
) -> std::result::Result<tonic::Response<super::LoginResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/users.v1.UsersService/Login",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("users.v1.UsersService", "Login"));
self.inner.unary(req, path, codec).await
}
}
}
pub mod users_service_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait UsersService: std::marker::Send + std::marker::Sync + 'static {
async fn create_supplier(
&self,
request: tonic::Request<super::SupplierCreateRequest>,
) -> std::result::Result<
tonic::Response<super::SupplierCreateResponse>,
tonic::Status,
>;
async fn email_confirmation(
&self,
request: tonic::Request<super::EmailConfirmationRequest>,
) -> std::result::Result<
tonic::Response<super::EmailConfirmationResponse>,
tonic::Status,
>;
async fn password_forgot(
&self,
request: tonic::Request<super::PasswordForgotRequest>,
) -> std::result::Result<
tonic::Response<super::PasswordForgotResponse>,
tonic::Status,
>;
async fn login(
&self,
request: tonic::Request<super::LoginRequest>,
) -> std::result::Result<tonic::Response<super::LoginResponse>, tonic::Status>;
}
#[derive(Debug)]
pub struct UsersServiceServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> UsersServiceServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for UsersServiceServer<T>
where
T: UsersService,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::Body>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
match req.uri().path() {
"/users.v1.UsersService/CreateSupplier" => {
#[allow(non_camel_case_types)]
struct CreateSupplierSvc<T: UsersService>(pub Arc<T>);
impl<
T: UsersService,
> tonic::server::UnaryService<super::SupplierCreateRequest>
for CreateSupplierSvc<T> {
type Response = super::SupplierCreateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SupplierCreateRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as UsersService>::create_supplier(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CreateSupplierSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/users.v1.UsersService/EmailConfirmation" => {
#[allow(non_camel_case_types)]
struct EmailConfirmationSvc<T: UsersService>(pub Arc<T>);
impl<
T: UsersService,
> tonic::server::UnaryService<super::EmailConfirmationRequest>
for EmailConfirmationSvc<T> {
type Response = super::EmailConfirmationResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::EmailConfirmationRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as UsersService>::email_confirmation(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = EmailConfirmationSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/users.v1.UsersService/PasswordForgot" => {
#[allow(non_camel_case_types)]
struct PasswordForgotSvc<T: UsersService>(pub Arc<T>);
impl<
T: UsersService,
> tonic::server::UnaryService<super::PasswordForgotRequest>
for PasswordForgotSvc<T> {
type Response = super::PasswordForgotResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::PasswordForgotRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as UsersService>::password_forgot(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = PasswordForgotSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/users.v1.UsersService/Login" => {
#[allow(non_camel_case_types)]
struct LoginSvc<T: UsersService>(pub Arc<T>);
impl<
T: UsersService,
> tonic::server::UnaryService<super::LoginRequest> for LoginSvc<T> {
type Response = super::LoginResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::LoginRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as UsersService>::login(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = LoginSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
let mut response = http::Response::new(
tonic::body::Body::default(),
);
let headers = response.headers_mut();
headers
.insert(
tonic::Status::GRPC_STATUS,
(tonic::Code::Unimplemented as i32).into(),
);
headers
.insert(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
);
Ok(response)
})
}
}
}
}
impl<T> Clone for UsersServiceServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
pub const SERVICE_NAME: &str = "users.v1.UsersService";
impl<T> tonic::server::NamedService for UsersServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CachedUserData {
#[prost(bool, tag = "1")]
pub is_oauth: bool,
#[prost(string, tag = "2")]
pub roles: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub props: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CachedTokenStatus {
#[prost(string, tag = "1")]
pub dev_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub last_checked: i64,
#[prost(bool, tag = "3")]
pub revoked: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserImageMetadata {
#[prost(string, tag = "1")]
pub mime: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub height: i32,
#[prost(int32, tag = "3")]
pub widht: i32,
#[prost(int64, tag = "4")]
pub size_bytes: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
#[prost(string, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "2")]
pub username: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "3")]
pub first_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "4")]
pub last_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub email: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "6")]
pub user_type: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "7")]
pub image: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "8")]
pub image_metadata: ::core::option::Option<UserImageMetadata>,
#[prost(string, optional, tag = "9")]
pub membership: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, optional, tag = "10")]
pub is_email_verified: ::core::option::Option<bool>,
#[prost(string, optional, tag = "11")]
pub password: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "12")]
pub auth_data: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "13")]
pub auth_service: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "14")]
pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "15")]
pub props: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "16")]
pub notify_props: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int64, optional, tag = "17")]
pub last_password_update: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "18")]
pub last_picture_update: ::core::option::Option<i64>,
#[prost(int32, optional, tag = "19")]
pub failed_attempts: ::core::option::Option<i32>,
#[prost(string, optional, tag = "20")]
pub locale: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, optional, tag = "21")]
pub mfa_active: ::core::option::Option<bool>,
#[prost(string, optional, tag = "22")]
pub mfa_secret: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int64, optional, tag = "23")]
pub last_activity_at: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "24")]
pub last_login: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "25")]
pub created_at: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "26")]
pub updated_at: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "27")]
pub deleted_at: ::core::option::Option<i64>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JwtClaims {
#[prost(string, tag = "1")]
pub iss: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub sub: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub aud: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub exp: ::core::option::Option<super::super::shared::v1::Timestamp>,
#[prost(message, optional, tag = "5")]
pub nbf: ::core::option::Option<super::super::shared::v1::Timestamp>,
#[prost(message, optional, tag = "6")]
pub iat: ::core::option::Option<super::super::shared::v1::Timestamp>,
#[prost(string, tag = "7")]
pub jti: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "100")]
pub custom: ::std::collections::HashMap<
::prost::alloc::string::String,
super::super::shared::v1::Value,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Token {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub user_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub r#type: ::prost::alloc::string::String,
#[prost(bool, tag = "5")]
pub used: bool,
#[prost(int64, tag = "6")]
pub created_at: i64,
#[prost(int64, tag = "7")]
pub expires_at: i64,
}