1#![cfg_attr(feature = "fail-on-warnings", deny(warnings))]
2#![cfg_attr(feature = "fail-on-warnings", deny(clippy::all))]
3
4mod error;
5mod events;
6mod idempotent;
7mod macros;
8mod nested;
9mod operation;
10mod query;
11mod traits;
12
13pub mod prelude {
14    pub use async_trait;
15    pub use chrono;
16    pub use serde;
17    pub use serde_json;
18    pub use sqlx;
19    pub use uuid;
20
21    #[cfg(feature = "json-schema")]
22    pub use schemars;
23}
24
25pub use error::*;
26pub use es_entity_macros::expand_es_query;
27pub use es_entity_macros::retry_on_concurrent_modification;
28pub use es_entity_macros::EsEntity;
29pub use es_entity_macros::EsEvent;
30pub use es_entity_macros::EsRepo;
31pub use events::*;
32pub use idempotent::*;
33pub use nested::*;
34pub use operation::*;
35pub use query::*;
36pub use traits::*;
37
38#[cfg(feature = "graphql")]
39pub mod graphql {
40    pub use async_graphql;
41    pub use base64;
42
43    #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, Copy)]
44    #[serde(transparent)]
45    pub struct UUID(crate::prelude::uuid::Uuid);
46    async_graphql::scalar!(UUID);
47    impl<T: Into<crate::prelude::uuid::Uuid>> From<T> for UUID {
48        fn from(id: T) -> Self {
49            let uuid = id.into();
50            Self(uuid)
51        }
52    }
53    impl From<&UUID> for crate::prelude::uuid::Uuid {
54        fn from(id: &UUID) -> Self {
55            id.0
56        }
57    }
58}