megacommerce_proto/
users.v1.rs

1// This file is @generated by prost-build.
2#[derive(serde::Serialize, serde::Deserialize)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct EmailConfirmationRequest {
5    #[prost(string, tag = "1")]
6    pub email: ::prost::alloc::string::String,
7    #[prost(string, tag = "2")]
8    pub token: ::prost::alloc::string::String,
9    #[prost(string, tag = "3")]
10    pub token_id: ::prost::alloc::string::String,
11}
12#[derive(serde::Serialize, serde::Deserialize)]
13#[derive(Clone, PartialEq, ::prost::Message)]
14pub struct EmailConfirmationResponse {
15    #[prost(oneof = "email_confirmation_response::Response", tags = "1, 2")]
16    pub response: ::core::option::Option<email_confirmation_response::Response>,
17}
18/// Nested message and enum types in `EmailConfirmationResponse`.
19pub mod email_confirmation_response {
20    #[derive(serde::Serialize, serde::Deserialize)]
21    #[derive(Clone, PartialEq, ::prost::Oneof)]
22    pub enum Response {
23        #[prost(message, tag = "1")]
24        Data(super::super::super::shared::v1::SuccessResponseData),
25        #[prost(message, tag = "2")]
26        Error(super::super::super::shared::v1::AppError),
27    }
28}
29#[derive(serde::Serialize, serde::Deserialize)]
30#[derive(Clone, PartialEq, ::prost::Message)]
31pub struct PasswordForgotRequest {
32    #[prost(string, tag = "1")]
33    pub email: ::prost::alloc::string::String,
34}
35#[derive(serde::Serialize, serde::Deserialize)]
36#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct PasswordForgotResponse {
38    #[prost(oneof = "password_forgot_response::Response", tags = "1, 2")]
39    pub response: ::core::option::Option<password_forgot_response::Response>,
40}
41/// Nested message and enum types in `PasswordForgotResponse`.
42pub mod password_forgot_response {
43    #[derive(serde::Serialize, serde::Deserialize)]
44    #[derive(Clone, PartialEq, ::prost::Oneof)]
45    pub enum Response {
46        #[prost(message, tag = "1")]
47        Data(super::super::super::shared::v1::SuccessResponseData),
48        #[prost(message, tag = "2")]
49        Error(super::super::super::shared::v1::AppError),
50    }
51}
52#[derive(serde::Serialize, serde::Deserialize)]
53#[derive(Clone, PartialEq, ::prost::Message)]
54pub struct LoginRequest {
55    #[prost(string, tag = "1")]
56    pub email: ::prost::alloc::string::String,
57    #[prost(string, tag = "2")]
58    pub password: ::prost::alloc::string::String,
59    #[prost(string, tag = "3")]
60    pub mfa: ::prost::alloc::string::String,
61    #[prost(string, tag = "4")]
62    pub login_challenge: ::prost::alloc::string::String,
63}
64#[derive(serde::Serialize, serde::Deserialize)]
65#[derive(Clone, PartialEq, ::prost::Message)]
66pub struct LoginResponse {
67    #[prost(oneof = "login_response::Response", tags = "1, 2")]
68    pub response: ::core::option::Option<login_response::Response>,
69}
70/// Nested message and enum types in `LoginResponse`.
71pub mod login_response {
72    #[derive(serde::Serialize, serde::Deserialize)]
73    #[derive(Clone, PartialEq, ::prost::Oneof)]
74    pub enum Response {
75        #[prost(message, tag = "1")]
76        Data(super::super::super::shared::v1::SuccessResponseData),
77        #[prost(message, tag = "2")]
78        Error(super::super::super::shared::v1::AppError),
79    }
80}
81#[derive(serde::Serialize, serde::Deserialize)]
82#[derive(Clone, PartialEq, ::prost::Message)]
83pub struct SupplierCreateRequest {
84    #[prost(string, tag = "1")]
85    pub username: ::prost::alloc::string::String,
86    #[prost(string, tag = "2")]
87    pub email: ::prost::alloc::string::String,
88    #[prost(string, tag = "3")]
89    pub first_name: ::prost::alloc::string::String,
90    #[prost(string, tag = "4")]
91    pub last_name: ::prost::alloc::string::String,
92    #[prost(string, tag = "5")]
93    pub password: ::prost::alloc::string::String,
94    #[prost(string, tag = "6")]
95    pub membership: ::prost::alloc::string::String,
96    #[prost(message, optional, tag = "7")]
97    pub image: ::core::option::Option<super::super::shared::v1::Attachment>,
98}
99#[derive(serde::Serialize, serde::Deserialize)]
100#[derive(Clone, PartialEq, ::prost::Message)]
101pub struct SupplierCreateResponse {
102    #[prost(oneof = "supplier_create_response::Response", tags = "1, 2")]
103    pub response: ::core::option::Option<supplier_create_response::Response>,
104}
105/// Nested message and enum types in `SupplierCreateResponse`.
106pub mod supplier_create_response {
107    #[derive(serde::Serialize, serde::Deserialize)]
108    #[derive(Clone, PartialEq, ::prost::Oneof)]
109    pub enum Response {
110        #[prost(message, tag = "1")]
111        Data(super::super::super::shared::v1::SuccessResponseData),
112        #[prost(message, tag = "2")]
113        Error(super::super::super::shared::v1::AppError),
114    }
115}
116/// Generated client implementations.
117pub mod users_service_client {
118    #![allow(
119        unused_variables,
120        dead_code,
121        missing_docs,
122        clippy::wildcard_imports,
123        clippy::let_unit_value,
124    )]
125    use tonic::codegen::*;
126    use tonic::codegen::http::Uri;
127    #[derive(Debug, Clone)]
128    pub struct UsersServiceClient<T> {
129        inner: tonic::client::Grpc<T>,
130    }
131    impl UsersServiceClient<tonic::transport::Channel> {
132        /// Attempt to create a new client by connecting to a given endpoint.
133        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
134        where
135            D: TryInto<tonic::transport::Endpoint>,
136            D::Error: Into<StdError>,
137        {
138            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
139            Ok(Self::new(conn))
140        }
141    }
142    impl<T> UsersServiceClient<T>
143    where
144        T: tonic::client::GrpcService<tonic::body::Body>,
145        T::Error: Into<StdError>,
146        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
147        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
148    {
149        pub fn new(inner: T) -> Self {
150            let inner = tonic::client::Grpc::new(inner);
151            Self { inner }
152        }
153        pub fn with_origin(inner: T, origin: Uri) -> Self {
154            let inner = tonic::client::Grpc::with_origin(inner, origin);
155            Self { inner }
156        }
157        pub fn with_interceptor<F>(
158            inner: T,
159            interceptor: F,
160        ) -> UsersServiceClient<InterceptedService<T, F>>
161        where
162            F: tonic::service::Interceptor,
163            T::ResponseBody: Default,
164            T: tonic::codegen::Service<
165                http::Request<tonic::body::Body>,
166                Response = http::Response<
167                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
168                >,
169            >,
170            <T as tonic::codegen::Service<
171                http::Request<tonic::body::Body>,
172            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
173        {
174            UsersServiceClient::new(InterceptedService::new(inner, interceptor))
175        }
176        /// Compress requests with the given encoding.
177        ///
178        /// This requires the server to support it otherwise it might respond with an
179        /// error.
180        #[must_use]
181        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
182            self.inner = self.inner.send_compressed(encoding);
183            self
184        }
185        /// Enable decompressing responses.
186        #[must_use]
187        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
188            self.inner = self.inner.accept_compressed(encoding);
189            self
190        }
191        /// Limits the maximum size of a decoded message.
192        ///
193        /// Default: `4MB`
194        #[must_use]
195        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
196            self.inner = self.inner.max_decoding_message_size(limit);
197            self
198        }
199        /// Limits the maximum size of an encoded message.
200        ///
201        /// Default: `usize::MAX`
202        #[must_use]
203        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
204            self.inner = self.inner.max_encoding_message_size(limit);
205            self
206        }
207        pub async fn create_supplier(
208            &mut self,
209            request: impl tonic::IntoRequest<super::SupplierCreateRequest>,
210        ) -> std::result::Result<
211            tonic::Response<super::SupplierCreateResponse>,
212            tonic::Status,
213        > {
214            self.inner
215                .ready()
216                .await
217                .map_err(|e| {
218                    tonic::Status::unknown(
219                        format!("Service was not ready: {}", e.into()),
220                    )
221                })?;
222            let codec = tonic::codec::ProstCodec::default();
223            let path = http::uri::PathAndQuery::from_static(
224                "/users.v1.UsersService/CreateSupplier",
225            );
226            let mut req = request.into_request();
227            req.extensions_mut()
228                .insert(GrpcMethod::new("users.v1.UsersService", "CreateSupplier"));
229            self.inner.unary(req, path, codec).await
230        }
231        pub async fn email_confirmation(
232            &mut self,
233            request: impl tonic::IntoRequest<super::EmailConfirmationRequest>,
234        ) -> std::result::Result<
235            tonic::Response<super::EmailConfirmationResponse>,
236            tonic::Status,
237        > {
238            self.inner
239                .ready()
240                .await
241                .map_err(|e| {
242                    tonic::Status::unknown(
243                        format!("Service was not ready: {}", e.into()),
244                    )
245                })?;
246            let codec = tonic::codec::ProstCodec::default();
247            let path = http::uri::PathAndQuery::from_static(
248                "/users.v1.UsersService/EmailConfirmation",
249            );
250            let mut req = request.into_request();
251            req.extensions_mut()
252                .insert(GrpcMethod::new("users.v1.UsersService", "EmailConfirmation"));
253            self.inner.unary(req, path, codec).await
254        }
255        pub async fn password_forgot(
256            &mut self,
257            request: impl tonic::IntoRequest<super::PasswordForgotRequest>,
258        ) -> std::result::Result<
259            tonic::Response<super::PasswordForgotResponse>,
260            tonic::Status,
261        > {
262            self.inner
263                .ready()
264                .await
265                .map_err(|e| {
266                    tonic::Status::unknown(
267                        format!("Service was not ready: {}", e.into()),
268                    )
269                })?;
270            let codec = tonic::codec::ProstCodec::default();
271            let path = http::uri::PathAndQuery::from_static(
272                "/users.v1.UsersService/PasswordForgot",
273            );
274            let mut req = request.into_request();
275            req.extensions_mut()
276                .insert(GrpcMethod::new("users.v1.UsersService", "PasswordForgot"));
277            self.inner.unary(req, path, codec).await
278        }
279        pub async fn login(
280            &mut self,
281            request: impl tonic::IntoRequest<super::LoginRequest>,
282        ) -> std::result::Result<tonic::Response<super::LoginResponse>, tonic::Status> {
283            self.inner
284                .ready()
285                .await
286                .map_err(|e| {
287                    tonic::Status::unknown(
288                        format!("Service was not ready: {}", e.into()),
289                    )
290                })?;
291            let codec = tonic::codec::ProstCodec::default();
292            let path = http::uri::PathAndQuery::from_static(
293                "/users.v1.UsersService/Login",
294            );
295            let mut req = request.into_request();
296            req.extensions_mut()
297                .insert(GrpcMethod::new("users.v1.UsersService", "Login"));
298            self.inner.unary(req, path, codec).await
299        }
300    }
301}
302/// Generated server implementations.
303pub mod users_service_server {
304    #![allow(
305        unused_variables,
306        dead_code,
307        missing_docs,
308        clippy::wildcard_imports,
309        clippy::let_unit_value,
310    )]
311    use tonic::codegen::*;
312    /// Generated trait containing gRPC methods that should be implemented for use with UsersServiceServer.
313    #[async_trait]
314    pub trait UsersService: std::marker::Send + std::marker::Sync + 'static {
315        async fn create_supplier(
316            &self,
317            request: tonic::Request<super::SupplierCreateRequest>,
318        ) -> std::result::Result<
319            tonic::Response<super::SupplierCreateResponse>,
320            tonic::Status,
321        >;
322        async fn email_confirmation(
323            &self,
324            request: tonic::Request<super::EmailConfirmationRequest>,
325        ) -> std::result::Result<
326            tonic::Response<super::EmailConfirmationResponse>,
327            tonic::Status,
328        >;
329        async fn password_forgot(
330            &self,
331            request: tonic::Request<super::PasswordForgotRequest>,
332        ) -> std::result::Result<
333            tonic::Response<super::PasswordForgotResponse>,
334            tonic::Status,
335        >;
336        async fn login(
337            &self,
338            request: tonic::Request<super::LoginRequest>,
339        ) -> std::result::Result<tonic::Response<super::LoginResponse>, tonic::Status>;
340    }
341    #[derive(Debug)]
342    pub struct UsersServiceServer<T> {
343        inner: Arc<T>,
344        accept_compression_encodings: EnabledCompressionEncodings,
345        send_compression_encodings: EnabledCompressionEncodings,
346        max_decoding_message_size: Option<usize>,
347        max_encoding_message_size: Option<usize>,
348    }
349    impl<T> UsersServiceServer<T> {
350        pub fn new(inner: T) -> Self {
351            Self::from_arc(Arc::new(inner))
352        }
353        pub fn from_arc(inner: Arc<T>) -> Self {
354            Self {
355                inner,
356                accept_compression_encodings: Default::default(),
357                send_compression_encodings: Default::default(),
358                max_decoding_message_size: None,
359                max_encoding_message_size: None,
360            }
361        }
362        pub fn with_interceptor<F>(
363            inner: T,
364            interceptor: F,
365        ) -> InterceptedService<Self, F>
366        where
367            F: tonic::service::Interceptor,
368        {
369            InterceptedService::new(Self::new(inner), interceptor)
370        }
371        /// Enable decompressing requests with the given encoding.
372        #[must_use]
373        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
374            self.accept_compression_encodings.enable(encoding);
375            self
376        }
377        /// Compress responses with the given encoding, if the client supports it.
378        #[must_use]
379        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
380            self.send_compression_encodings.enable(encoding);
381            self
382        }
383        /// Limits the maximum size of a decoded message.
384        ///
385        /// Default: `4MB`
386        #[must_use]
387        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
388            self.max_decoding_message_size = Some(limit);
389            self
390        }
391        /// Limits the maximum size of an encoded message.
392        ///
393        /// Default: `usize::MAX`
394        #[must_use]
395        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
396            self.max_encoding_message_size = Some(limit);
397            self
398        }
399    }
400    impl<T, B> tonic::codegen::Service<http::Request<B>> for UsersServiceServer<T>
401    where
402        T: UsersService,
403        B: Body + std::marker::Send + 'static,
404        B::Error: Into<StdError> + std::marker::Send + 'static,
405    {
406        type Response = http::Response<tonic::body::Body>;
407        type Error = std::convert::Infallible;
408        type Future = BoxFuture<Self::Response, Self::Error>;
409        fn poll_ready(
410            &mut self,
411            _cx: &mut Context<'_>,
412        ) -> Poll<std::result::Result<(), Self::Error>> {
413            Poll::Ready(Ok(()))
414        }
415        fn call(&mut self, req: http::Request<B>) -> Self::Future {
416            match req.uri().path() {
417                "/users.v1.UsersService/CreateSupplier" => {
418                    #[allow(non_camel_case_types)]
419                    struct CreateSupplierSvc<T: UsersService>(pub Arc<T>);
420                    impl<
421                        T: UsersService,
422                    > tonic::server::UnaryService<super::SupplierCreateRequest>
423                    for CreateSupplierSvc<T> {
424                        type Response = super::SupplierCreateResponse;
425                        type Future = BoxFuture<
426                            tonic::Response<Self::Response>,
427                            tonic::Status,
428                        >;
429                        fn call(
430                            &mut self,
431                            request: tonic::Request<super::SupplierCreateRequest>,
432                        ) -> Self::Future {
433                            let inner = Arc::clone(&self.0);
434                            let fut = async move {
435                                <T as UsersService>::create_supplier(&inner, request).await
436                            };
437                            Box::pin(fut)
438                        }
439                    }
440                    let accept_compression_encodings = self.accept_compression_encodings;
441                    let send_compression_encodings = self.send_compression_encodings;
442                    let max_decoding_message_size = self.max_decoding_message_size;
443                    let max_encoding_message_size = self.max_encoding_message_size;
444                    let inner = self.inner.clone();
445                    let fut = async move {
446                        let method = CreateSupplierSvc(inner);
447                        let codec = tonic::codec::ProstCodec::default();
448                        let mut grpc = tonic::server::Grpc::new(codec)
449                            .apply_compression_config(
450                                accept_compression_encodings,
451                                send_compression_encodings,
452                            )
453                            .apply_max_message_size_config(
454                                max_decoding_message_size,
455                                max_encoding_message_size,
456                            );
457                        let res = grpc.unary(method, req).await;
458                        Ok(res)
459                    };
460                    Box::pin(fut)
461                }
462                "/users.v1.UsersService/EmailConfirmation" => {
463                    #[allow(non_camel_case_types)]
464                    struct EmailConfirmationSvc<T: UsersService>(pub Arc<T>);
465                    impl<
466                        T: UsersService,
467                    > tonic::server::UnaryService<super::EmailConfirmationRequest>
468                    for EmailConfirmationSvc<T> {
469                        type Response = super::EmailConfirmationResponse;
470                        type Future = BoxFuture<
471                            tonic::Response<Self::Response>,
472                            tonic::Status,
473                        >;
474                        fn call(
475                            &mut self,
476                            request: tonic::Request<super::EmailConfirmationRequest>,
477                        ) -> Self::Future {
478                            let inner = Arc::clone(&self.0);
479                            let fut = async move {
480                                <T as UsersService>::email_confirmation(&inner, request)
481                                    .await
482                            };
483                            Box::pin(fut)
484                        }
485                    }
486                    let accept_compression_encodings = self.accept_compression_encodings;
487                    let send_compression_encodings = self.send_compression_encodings;
488                    let max_decoding_message_size = self.max_decoding_message_size;
489                    let max_encoding_message_size = self.max_encoding_message_size;
490                    let inner = self.inner.clone();
491                    let fut = async move {
492                        let method = EmailConfirmationSvc(inner);
493                        let codec = tonic::codec::ProstCodec::default();
494                        let mut grpc = tonic::server::Grpc::new(codec)
495                            .apply_compression_config(
496                                accept_compression_encodings,
497                                send_compression_encodings,
498                            )
499                            .apply_max_message_size_config(
500                                max_decoding_message_size,
501                                max_encoding_message_size,
502                            );
503                        let res = grpc.unary(method, req).await;
504                        Ok(res)
505                    };
506                    Box::pin(fut)
507                }
508                "/users.v1.UsersService/PasswordForgot" => {
509                    #[allow(non_camel_case_types)]
510                    struct PasswordForgotSvc<T: UsersService>(pub Arc<T>);
511                    impl<
512                        T: UsersService,
513                    > tonic::server::UnaryService<super::PasswordForgotRequest>
514                    for PasswordForgotSvc<T> {
515                        type Response = super::PasswordForgotResponse;
516                        type Future = BoxFuture<
517                            tonic::Response<Self::Response>,
518                            tonic::Status,
519                        >;
520                        fn call(
521                            &mut self,
522                            request: tonic::Request<super::PasswordForgotRequest>,
523                        ) -> Self::Future {
524                            let inner = Arc::clone(&self.0);
525                            let fut = async move {
526                                <T as UsersService>::password_forgot(&inner, request).await
527                            };
528                            Box::pin(fut)
529                        }
530                    }
531                    let accept_compression_encodings = self.accept_compression_encodings;
532                    let send_compression_encodings = self.send_compression_encodings;
533                    let max_decoding_message_size = self.max_decoding_message_size;
534                    let max_encoding_message_size = self.max_encoding_message_size;
535                    let inner = self.inner.clone();
536                    let fut = async move {
537                        let method = PasswordForgotSvc(inner);
538                        let codec = tonic::codec::ProstCodec::default();
539                        let mut grpc = tonic::server::Grpc::new(codec)
540                            .apply_compression_config(
541                                accept_compression_encodings,
542                                send_compression_encodings,
543                            )
544                            .apply_max_message_size_config(
545                                max_decoding_message_size,
546                                max_encoding_message_size,
547                            );
548                        let res = grpc.unary(method, req).await;
549                        Ok(res)
550                    };
551                    Box::pin(fut)
552                }
553                "/users.v1.UsersService/Login" => {
554                    #[allow(non_camel_case_types)]
555                    struct LoginSvc<T: UsersService>(pub Arc<T>);
556                    impl<
557                        T: UsersService,
558                    > tonic::server::UnaryService<super::LoginRequest> for LoginSvc<T> {
559                        type Response = super::LoginResponse;
560                        type Future = BoxFuture<
561                            tonic::Response<Self::Response>,
562                            tonic::Status,
563                        >;
564                        fn call(
565                            &mut self,
566                            request: tonic::Request<super::LoginRequest>,
567                        ) -> Self::Future {
568                            let inner = Arc::clone(&self.0);
569                            let fut = async move {
570                                <T as UsersService>::login(&inner, request).await
571                            };
572                            Box::pin(fut)
573                        }
574                    }
575                    let accept_compression_encodings = self.accept_compression_encodings;
576                    let send_compression_encodings = self.send_compression_encodings;
577                    let max_decoding_message_size = self.max_decoding_message_size;
578                    let max_encoding_message_size = self.max_encoding_message_size;
579                    let inner = self.inner.clone();
580                    let fut = async move {
581                        let method = LoginSvc(inner);
582                        let codec = tonic::codec::ProstCodec::default();
583                        let mut grpc = tonic::server::Grpc::new(codec)
584                            .apply_compression_config(
585                                accept_compression_encodings,
586                                send_compression_encodings,
587                            )
588                            .apply_max_message_size_config(
589                                max_decoding_message_size,
590                                max_encoding_message_size,
591                            );
592                        let res = grpc.unary(method, req).await;
593                        Ok(res)
594                    };
595                    Box::pin(fut)
596                }
597                _ => {
598                    Box::pin(async move {
599                        let mut response = http::Response::new(
600                            tonic::body::Body::default(),
601                        );
602                        let headers = response.headers_mut();
603                        headers
604                            .insert(
605                                tonic::Status::GRPC_STATUS,
606                                (tonic::Code::Unimplemented as i32).into(),
607                            );
608                        headers
609                            .insert(
610                                http::header::CONTENT_TYPE,
611                                tonic::metadata::GRPC_CONTENT_TYPE,
612                            );
613                        Ok(response)
614                    })
615                }
616            }
617        }
618    }
619    impl<T> Clone for UsersServiceServer<T> {
620        fn clone(&self) -> Self {
621            let inner = self.inner.clone();
622            Self {
623                inner,
624                accept_compression_encodings: self.accept_compression_encodings,
625                send_compression_encodings: self.send_compression_encodings,
626                max_decoding_message_size: self.max_decoding_message_size,
627                max_encoding_message_size: self.max_encoding_message_size,
628            }
629        }
630    }
631    /// Generated gRPC service name
632    pub const SERVICE_NAME: &str = "users.v1.UsersService";
633    impl<T> tonic::server::NamedService for UsersServiceServer<T> {
634        const NAME: &'static str = SERVICE_NAME;
635    }
636}
637#[derive(serde::Serialize, serde::Deserialize)]
638#[derive(Clone, PartialEq, ::prost::Message)]
639pub struct CachedUserData {
640    #[prost(bool, tag = "1")]
641    pub is_oauth: bool,
642    #[prost(string, tag = "2")]
643    pub roles: ::prost::alloc::string::String,
644    /// like: theme:light,mobile_notification:true
645    #[prost(string, tag = "3")]
646    pub props: ::prost::alloc::string::String,
647}
648#[derive(serde::Serialize, serde::Deserialize)]
649#[derive(Clone, PartialEq, ::prost::Message)]
650pub struct CachedTokenStatus {
651    #[prost(string, tag = "1")]
652    pub dev_id: ::prost::alloc::string::String,
653    #[prost(int64, tag = "2")]
654    pub last_checked: i64,
655    #[prost(bool, tag = "3")]
656    pub revoked: bool,
657}
658#[derive(serde::Serialize, serde::Deserialize)]
659#[derive(Clone, PartialEq, ::prost::Message)]
660pub struct UserImageMetadata {
661    #[prost(string, tag = "1")]
662    pub mime: ::prost::alloc::string::String,
663    #[prost(int32, tag = "2")]
664    pub height: i32,
665    #[prost(int32, tag = "3")]
666    pub widht: i32,
667    #[prost(int64, tag = "4")]
668    pub size_bytes: i64,
669}
670#[derive(serde::Serialize, serde::Deserialize)]
671#[derive(Clone, PartialEq, ::prost::Message)]
672pub struct User {
673    #[prost(string, optional, tag = "1")]
674    pub id: ::core::option::Option<::prost::alloc::string::String>,
675    #[prost(string, optional, tag = "2")]
676    pub username: ::core::option::Option<::prost::alloc::string::String>,
677    #[prost(string, optional, tag = "3")]
678    pub first_name: ::core::option::Option<::prost::alloc::string::String>,
679    #[prost(string, optional, tag = "4")]
680    pub last_name: ::core::option::Option<::prost::alloc::string::String>,
681    #[prost(string, optional, tag = "5")]
682    pub email: ::core::option::Option<::prost::alloc::string::String>,
683    #[prost(string, optional, tag = "6")]
684    pub user_type: ::core::option::Option<::prost::alloc::string::String>,
685    #[prost(string, optional, tag = "7")]
686    pub image: ::core::option::Option<::prost::alloc::string::String>,
687    #[prost(message, optional, tag = "8")]
688    pub image_metadata: ::core::option::Option<UserImageMetadata>,
689    #[prost(string, optional, tag = "9")]
690    pub membership: ::core::option::Option<::prost::alloc::string::String>,
691    #[prost(bool, optional, tag = "10")]
692    pub is_email_verified: ::core::option::Option<bool>,
693    #[prost(string, optional, tag = "11")]
694    pub password: ::core::option::Option<::prost::alloc::string::String>,
695    #[prost(string, optional, tag = "12")]
696    pub auth_data: ::core::option::Option<::prost::alloc::string::String>,
697    #[prost(string, optional, tag = "13")]
698    pub auth_service: ::core::option::Option<::prost::alloc::string::String>,
699    #[prost(string, repeated, tag = "14")]
700    pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
701    #[prost(string, repeated, tag = "15")]
702    pub props: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
703    #[prost(string, repeated, tag = "16")]
704    pub notify_props: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
705    #[prost(int64, optional, tag = "17")]
706    pub last_password_update: ::core::option::Option<i64>,
707    #[prost(int64, optional, tag = "18")]
708    pub last_picture_update: ::core::option::Option<i64>,
709    #[prost(int32, optional, tag = "19")]
710    pub failed_attempts: ::core::option::Option<i32>,
711    #[prost(string, optional, tag = "20")]
712    pub locale: ::core::option::Option<::prost::alloc::string::String>,
713    #[prost(bool, optional, tag = "21")]
714    pub mfa_active: ::core::option::Option<bool>,
715    #[prost(string, optional, tag = "22")]
716    pub mfa_secret: ::core::option::Option<::prost::alloc::string::String>,
717    #[prost(int64, optional, tag = "23")]
718    pub last_activity_at: ::core::option::Option<i64>,
719    #[prost(int64, optional, tag = "24")]
720    pub last_login: ::core::option::Option<i64>,
721    #[prost(int64, optional, tag = "25")]
722    pub created_at: ::core::option::Option<i64>,
723    #[prost(int64, optional, tag = "26")]
724    pub updated_at: ::core::option::Option<i64>,
725    #[prost(int64, optional, tag = "27")]
726    pub deleted_at: ::core::option::Option<i64>,
727}
728/// Represents the standard JWT claims set (RFC 7519).
729#[derive(serde::Serialize, serde::Deserialize)]
730#[derive(Clone, PartialEq, ::prost::Message)]
731pub struct JwtClaims {
732    /// "iss" (Issuer) - string or URI
733    #[prost(string, tag = "1")]
734    pub iss: ::prost::alloc::string::String,
735    /// "sub" (Subject)
736    #[prost(string, tag = "2")]
737    pub sub: ::prost::alloc::string::String,
738    /// "aud" (Audience) - could be a list
739    #[prost(string, repeated, tag = "3")]
740    pub aud: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
741    /// "exp" (Expiration time)
742    #[prost(message, optional, tag = "4")]
743    pub exp: ::core::option::Option<super::super::shared::v1::Timestamp>,
744    /// "nbf" (Not before)
745    #[prost(message, optional, tag = "5")]
746    pub nbf: ::core::option::Option<super::super::shared::v1::Timestamp>,
747    /// "iat" (Issued at)
748    #[prost(message, optional, tag = "6")]
749    pub iat: ::core::option::Option<super::super::shared::v1::Timestamp>,
750    /// "jti" (JWT ID)
751    #[prost(string, tag = "7")]
752    pub jti: ::prost::alloc::string::String,
753    /// Custom claims (flexible map, e.g. roles, tenant_id, etc.)
754    #[prost(map = "string, message", tag = "100")]
755    pub custom: ::std::collections::HashMap<
756        ::prost::alloc::string::String,
757        super::super::shared::v1::Value,
758    >,
759}
760#[derive(serde::Serialize, serde::Deserialize)]
761#[derive(Clone, PartialEq, ::prost::Message)]
762pub struct Token {
763    #[prost(string, tag = "1")]
764    pub id: ::prost::alloc::string::String,
765    #[prost(string, tag = "2")]
766    pub user_id: ::prost::alloc::string::String,
767    #[prost(string, tag = "3")]
768    pub token: ::prost::alloc::string::String,
769    #[prost(string, tag = "4")]
770    pub r#type: ::prost::alloc::string::String,
771    #[prost(bool, tag = "5")]
772    pub used: bool,
773    #[prost(int64, tag = "6")]
774    pub created_at: i64,
775    #[prost(int64, tag = "7")]
776    pub expires_at: i64,
777}