tvf_flutter_schema 1.1.0
tvf_flutter_schema: ^1.1.0 copied to clipboard
KOMBU IoT System - GraphQL Schema for Flutter/Dart (Mobile-focused). Provides GraphQL queries, mutations, and a direct GraphQL client for mobile app development with AWS Amplify. Uses GraphQL directly [...]
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.1.0 2025-01-XX #
Changed #
- BREAKING: Package now uses GraphQL directly without model classes
- Removed model exports (User, Device, DeviceUserMapping, DeviceToken, Notification)
- Added
GraphQLClientclass for direct GraphQL operations - All responses are now
Map<String, dynamic>instead of typed models - More flexible and lightweight approach
- Updated README with examples using GraphQLClient
- Updated package description to reflect direct GraphQL usage
Migration Guide #
If you're upgrading from version 1.0.0:
-
Replace model imports with GraphQLClient:
// Old import 'package:tvf_flutter_schema/tvf_flutter_schema.dart'; final user = User.fromJson(data); // New import 'package:tvf_flutter_schema/tvf_flutter_schema.dart'; final client = GraphQLClient(); final result = await client.query(...); final user = result.data?['getUser']; -
Update all API calls:
// Old final user = User.fromJson(response.data); // New final user = result.data?['getUser']; print('Email: ${user?['email']}'); -
No more model classes - Access data directly from Map:
// Old print(user.fullName); // New print(user['fullName']);
1.0.0 2025-01-XX #
Changed #
- Package renamed:
kombu_flutter_schema→tvf_flutter_schema - Version reset: Starting fresh at 1.0.0 for the renamed package
Migration Guide #
If you're upgrading from kombu_flutter_schema:
-
Update
pubspec.yaml:dependencies: tvf_flutter_schema: path: ../packages/flutter-schema # or git URL -
Update imports:
// Old import 'package:kombu_flutter_schema/kombu_flutter_schema.dart'; // New import 'package:tvf_flutter_schema/tvf_flutter_schema.dart'; -
Run:
flutter pub get
Notes #
- All functionality remains the same
- This is a package rename only, no breaking API changes
- Previous versions of
kombu_flutter_schemawill remain available on pub.dev
1.3.0 2025-01-XX (kombu_flutter_schema) #
Added #
- DeviceUserMapping model - Junction table for many-to-many relationship between User and Device
- Supports: 1 user can connect to many devices
- Supports: 1 device can allow many users to connect
- DeviceUserMappingQueries - GraphQL queries for device-user mappings:
getDeviceUserMapping- Get mapping by IDusersByDevice- Query all users for a devicedevicesByUser- Query all devices for a usermappingByDeviceAndUser- Check if user has access to devicelistDeviceUserMappings- List all mappings
- DeviceUserMappingMutations - GraphQL mutations for device-user mappings:
createDeviceUserMapping- Add user to deviceupdateDeviceUserMapping- Update user role or mapping detailsdeleteDeviceUserMapping- Remove user from device
Changed #
- Updated main export file to include DeviceUserMapping model, queries, and mutations
- Version bumped to 1.3.0 (minor version for new feature)
Notes #
- DeviceUserMapping enables shared device access with role-based permissions
- Backward compatibility: Device.userId and User.devices still work for owned devices
- Use DeviceUserMapping for multi-user device sharing scenarios
1.2.3 - 2025-11-27 #
Changed #
- README.md: Reordered Device Token Registration options
- Direct GraphQL Mutations is now Option 1 (recommended for full control)
- Auto Register moved to Option 2
- Manual Create/Update moved to Option 3
- Updated documentation to prioritize direct GraphQL mutations usage
1.2.2 - 2025-11-25 #
Added #
- Public methods in PushNotificationHelper:
createDeviceToken()- Public method to create device token directlyupdateDeviceToken()- Public method to update device token directly
- Improved documentation for device token management with multiple usage options
Updated #
PushNotificationHelper.registerDeviceToken()- Now includes better documentation explaining it uses built-in Amplify mutations_createDeviceToken()and_updateDeviceToken()- Now supportappVersionparameter- README.md - Added comprehensive examples for device token management (auto register, manual create/update, direct GraphQL)
Notes #
- All device token operations use built-in Amplify Gen 2 mutations:
DeviceTokenMutations.createDeviceTokenDeviceTokenMutations.updateDeviceTokenDeviceTokenMutations.deleteDeviceToken
- No custom mutations needed - Amplify automatically generates these from the schema
1.2.0 - 2025-11-25 #
Added #
- createDevice mutation - Create new device in the system
- pushCommand mutation - Push commands to AWS IoT Core topics via MQTT
- PushCommandHelper class - Helper methods for pushing commands (with automatic payload stringification)
- latestFirmwareVersion field - Added to Device model for KPI tracking and firmware comparison
- deactivateUser mutation - Deactivate user (custom mutation)
- reactivateUser mutation - Reactivate user (custom mutation)
- removeUser mutation - Remove user permanently (custom mutation)
Changed #
- Updated Device model to include
latestFirmwareVersionfield - Updated Device queries to include
latestFirmwareVersionfield - Updated Device mutations to include
latestFirmwareVersionfield
[1.1.0] - 2025-01-15 #
Added #
- Notification model with queries and mutations for mobile app
- DeviceToken model for push notification device token management
- Device queries and mutations for mobile app device management
- PushNotificationHelper class for easy device token registration
- Mobile-focused API documentation and examples
Changed #
- Refactored to mobile-focused: Only includes APIs relevant to mobile app
- Removed admin-only operations (createUser, deleteUser, listUsers)
- Updated User queries to only include
getUser(mobile typically gets own user) - Updated User mutations to only include
updateUser(user creation via Cognito) - Improved README with mobile-focused examples and usage
Removed #
- User
createUser,deleteUser,listUsersmutations/queries (admin-only) - DeviceTelemetry (use MQTT for real-time data)
- DeviceConfiguration (backend/internal only)
1.0.1 - 2025-11-08 #
Changed #
- Updated README.md to use
amplify_flutterinstead ofgraphql_flutter - Updated all code examples to use AWS Amplify Flutter API
- Improved documentation with complete API examples
Updated #
- All queries now use
ModelQuerieswithAmplify.API.query() - All mutations now use
ModelMutationswithAmplify.API.mutate() - All subscriptions now use
ModelSubscriptionswithAmplify.API.onSubscription() - Error handling updated to use
ApiException
[1.0.0] - 2025-11-07 (kombu_flutter_schema) #
Added #
- Initial release of kombu_flutter_schema (now renamed to tvf_flutter_schema)
- User model with JSON serialization
- Device model with JSON serialization
- GraphQL queries for User (getUser, listUsers)
- GraphQL mutations for User (createUser, updateUser, deleteUser)
- Support for Flutter/Dart GraphQL clients