Updates to use messages and broadcasts UUID fields#110
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the messages and broadcasts API from using integer-based id fields to UUID-based uuid fields for primary identification. This change improves data consistency and aligns with modern API design practices that favor UUIDs over sequential integer IDs.
Key changes include:
- Updated field definitions in data models to use
uuidinstead ofid - Modified API method parameters to accept UUIDs instead of integer IDs
- Updated test data and test cases to use UUID values
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test_files/v2/messages.json | Updated test data to use UUID fields instead of id and broadcast integer fields |
| test_files/v2/broadcasts.json | Updated test data to use UUID fields instead of integer id fields |
| temba_client/v2/types.py | Modified Broadcast and Message model definitions to use uuid SimpleField instead of id IntegerField |
| temba_client/v2/tests.py | Updated test assertions and method calls to use UUID values instead of integer IDs |
| temba_client/v2/init.py | Updated get_broadcasts and get_messages method signatures to accept uuid parameters instead of id |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| uuid = SimpleField() | ||
| contact = ObjectField(item_class=ObjectRef) |
There was a problem hiding this comment.
The Message class definition appears incomplete. The uuid field is defined outside of a proper class definition - it should be properly indented within the Message class.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #110 +/- ##
==========================================
- Coverage 99.79% 99.79% -0.01%
==========================================
Files 9 9
Lines 1435 1433 -2
==========================================
- Hits 1432 1430 -2
Misses 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.