longvan_dart_sdk 1.0.0
longvan_dart_sdk: ^1.0.0 copied to clipboard
A comprehensive Dart SDK for LongVan services with native GraphQL and REST support. Features lazy loading, multi-tenant context management, and type-safe API access.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2025-01-03 #
Added #
- Initial release of LongVan Dart SDK
- Native GraphQL and REST API support
- Authentication service with login, OTP, and user management
- Lazy loading service registry for optimal performance
- Multi-tenant context management (orgId, storeId, accessToken)
- Environment-specific endpoint configuration (dev/live)
- Type-safe models and responses
- Comprehensive error handling with direct BE error passthrough
- Logging framework integration
- Complete unit test coverage
- Example implementation with context management demo
Features #
- AuthService: Login, register, OTP, user management
- Context Management: setOrgId(), setStoreId(), setToken(), clearToken()
- Environment Support: Development and production endpoints
- Service Registry: Lazy-loaded services for memory efficiency
- Type Safety: Full Dart type checking and null safety
- GraphQL Native: Direct GraphQL queries without REST conversion
- Multi-Level API: Raw GraphQL, REST, and convenience methods
Architecture #
- Service-based architecture with lazy loading
- Base service class with GraphQL and REST support
- SDK context for multi-tenant applications
- Environment-specific endpoint configuration
- Extensible design for adding new services
Dependencies #
http: ^1.1.0- HTTP client for REST APIsgraphql: ^5.1.3- GraphQL clientjson_annotation: ^4.8.1- JSON serializationmeta: ^1.9.1- Metadata annotationslogging: ^1.2.0- Logging framework