Repository navigation
Commit e182e81
Remove deprecated storage APIs and introduce instance usage model (#80)
## Summary
Refactors the storage and usage tracking layer of the
`robosystems_client` by removing deprecated storage limit/usage API
endpoints and models, replacing them with a streamlined instance usage
model and updated graph limits response structure.
## Key Accomplishments
- **Removed deprecated API endpoints:** Deleted `check_storage_limits`
and `get_storage_usage` endpoints under the `credits_` API module,
eliminating ~470 lines of obsolete code.
- **Introduced `InstanceUsage` model:** Added a new comprehensive model
(`instance_usage.py`, 162 lines) to consolidate usage tracking into a
single, well-structured representation.
- **Added `DatabaseStorageEntry` model:** New model
(`database_storage_entry.py`, 93 lines) for representing individual
database storage records, enabling more granular storage reporting.
- **Updated `GraphLimitsResponse`:** Enriched the graph limits response
to incorporate usage data directly, reducing the need for separate API
calls to retrieve storage information.
- **Simplified `ContentLimits` model:** Stripped down the content limits
model significantly (~75 lines removed), removing fields that are now
covered by the new instance usage model.
- **Removed obsolete models:** Deleted `StorageLimitResponse`,
`GetStorageUsageResponseGetstorageusage`, and trimmed
`GraphSubscriptionTier` to remove unused fields.
- **Enhanced `SearchRequest` model:** Added new fields to the search
request model to support storage search optimizations.
- **Updated model registry:** `models/__init__.py` updated to reflect
all added and removed model classes.
## Breaking Changes
13 files changed
Lines changed: 314 additions & 782 deletions
File tree
- robosystems_client
- api
- credits_
- graph_limits
- models
This file was deleted.
0 commit comments