data_modelling_sdk/
lib.rs

1//! Data Modelling SDK - 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 export;
13#[cfg(feature = "git")]
14pub mod git;
15pub mod import;
16pub mod model;
17pub mod models;
18pub mod storage;
19pub mod validation;
20pub mod workspace;
21
22// Re-export commonly used types
23#[cfg(feature = "api-backend")]
24pub use storage::api::ApiStorageBackend;
25#[cfg(all(target_arch = "wasm32", feature = "wasm"))]
26pub use storage::browser::BrowserStorageBackend;
27#[cfg(feature = "native-fs")]
28pub use storage::filesystem::FileSystemStorageBackend;
29pub use storage::{StorageBackend, StorageError};
30
31#[cfg(feature = "png-export")]
32pub use export::PNGExporter;
33pub use export::{
34    AvroExporter, ExportError, ExportResult, JSONSchemaExporter, ODCSExporter, ProtobufExporter,
35    SQLExporter,
36};
37pub use import::{
38    AvroImporter, ImportError, ImportResult, JSONSchemaImporter, ODCSImporter, ProtobufImporter,
39    SQLImporter,
40};
41#[cfg(feature = "api-backend")]
42pub use model::ApiModelLoader;
43pub use model::{ModelLoader, ModelSaver};
44pub use validation::{
45    RelationshipValidationError, RelationshipValidationResult, TableValidationError,
46    TableValidationResult,
47};
48
49// Re-export models
50pub use models::enums::*;
51pub use models::{Column, DataModel, ForeignKey, Relationship, Table};
52
53// Re-export auth types
54pub use auth::{
55    AuthMode, AuthState, GitHubEmail, InitiateOAuthRequest, InitiateOAuthResponse,
56    SelectEmailRequest,
57};
58
59// Re-export workspace types
60pub use workspace::{
61    CreateWorkspaceRequest, CreateWorkspaceResponse, ListProfilesResponse, LoadProfileRequest,
62    ProfileInfo, WorkspaceInfo,
63};
64
65// Re-export Git types
66#[cfg(feature = "git")]
67pub use git::{GitError, GitService, GitStatus};