Skip to main content

shaperail_core/
lib.rs

1//! # shaperail-core
2//!
3//! Shared foundation types for the Shaperail framework.
4//!
5//! This crate defines the core data structures that all other Shaperail crates
6//! consume: resource definitions, field types, endpoint specs, error handling,
7//! and project configuration.
8
9mod channel;
10mod config;
11mod database;
12mod endpoint;
13mod error;
14mod field_type;
15mod relation;
16mod resource;
17mod saga;
18mod schema;
19mod workspace;
20
21pub use channel::{ChannelDefinition, ChannelHooks, WsClientMessage, WsServerMessage};
22pub use config::{
23    AuthConfig, CacheConfig, EventSubscriber, EventTarget, EventsConfig, GraphQLConfig, GrpcConfig,
24    InboundWebhookConfig, LoggingConfig, NamedDatabaseConfig, ProjectConfig, StorageConfig,
25    WebhookConfig, WorkerCount,
26};
27pub use database::DatabaseEngine;
28pub use endpoint::{
29    apply_endpoint_defaults, endpoint_convention, to_brace_path, AuthRule, CacheSpec,
30    ControllerSpec, EndpointSpec, HookList, HttpMethod, PaginationStyle, RateLimitSpec,
31    SubscriberSpec, UploadSpec, WASM_HOOK_PREFIX,
32};
33pub use error::{FieldError, ShaperailError};
34pub use field_type::FieldType;
35pub use relation::{IndexSpec, RelationSpec, RelationType};
36pub use resource::ResourceDefinition;
37pub use saga::{SagaDefinition, SagaExecutionStatus, SagaStep};
38pub use schema::{FieldSchema, ItemsSpec};
39pub use workspace::{
40    InterServiceClientConfig, ServiceDefinition, ServiceRegistryEntry, ServiceStatus, SharedConfig,
41    WorkspaceConfig,
42};