data_modelling_core/
lib.rs

1//! Data Modelling Core - Shared library for model operations across platforms
2//!
3//! Provides unified interfaces for:
4//! - File/folder operations (via storage backends)
5//! - Model loading/saving
6//! - Import/export functionality
7//! - Validation logic
8//! - Authentication types (shared across web, desktop, mobile)
9//! - Workspace management types
10
11pub mod auth;
12pub mod convert;
13#[cfg(feature = "database")]
14pub mod database;
15pub mod export;
16#[cfg(feature = "git")]
17pub mod git;
18pub mod import;
19#[cfg(feature = "inference")]
20pub mod inference;
21#[cfg(any(feature = "llm", feature = "llm-online", feature = "llm-offline"))]
22pub mod llm;
23#[cfg(feature = "mapping")]
24pub mod mapping;
25pub mod model;
26pub mod models;
27#[cfg(feature = "pipeline")]
28pub mod pipeline;
29#[cfg(any(feature = "staging", feature = "staging-postgres"))]
30pub mod staging;
31pub mod storage;
32pub mod validation;
33pub mod workspace;
34
35// Re-export commonly used types
36#[cfg(feature = "api-backend")]
37pub use storage::api::ApiStorageBackend;
38#[cfg(feature = "native-fs")]
39pub use storage::filesystem::FileSystemStorageBackend;
40pub use storage::{StorageBackend, StorageError};
41
42pub use convert::{ConversionError, convert_to_odcs};
43#[cfg(feature = "png-export")]
44pub use export::PNGExporter;
45pub use export::{
46    AvroExporter, ExportError, ExportResult, JSONSchemaExporter, ODCSExporter, ProtobufExporter,
47    SQLExporter,
48};
49pub use import::{
50    AvroImporter, ImportError, ImportResult, JSONSchemaImporter, ODCSImporter, ProtobufImporter,
51    SQLImporter,
52};
53#[cfg(feature = "api-backend")]
54pub use model::ApiModelLoader;
55pub use model::{ModelLoader, ModelSaver};
56pub use validation::{
57    RelationshipValidationError, RelationshipValidationResult, TableValidationError,
58    TableValidationResult,
59};
60
61// Re-export models
62pub use models::enums::*;
63pub use models::{Column, ContactDetails, DataModel, ForeignKey, Relationship, SlaProperty, Table};
64
65// Re-export auth types
66pub use auth::{
67    AuthMode, AuthState, GitHubEmail, InitiateOAuthRequest, InitiateOAuthResponse,
68    SelectEmailRequest,
69};
70
71// Re-export workspace types
72pub use workspace::{
73    CreateWorkspaceRequest, CreateWorkspaceResponse, ListProfilesResponse, LoadProfileRequest,
74    ProfileInfo, WorkspaceInfo,
75};
76
77// Re-export Git types
78#[cfg(feature = "git")]
79pub use git::{GitError, GitService, GitStatus};