diff --git a/anansyTypes/__init__.py b/anansyTypes/__init__.py index 9d7a407..353c61b 100644 --- a/anansyTypes/__init__.py +++ b/anansyTypes/__init__.py @@ -22,6 +22,7 @@ __all__ = [ "GetWordResponse", "GetSimilarWordRequest", "GetAllPhrasesResponse", + "UsageStatusResponse", "ModelType", "PreprocessorType", "SymbolProvider", diff --git a/anansyTypes/schemas.py b/anansyTypes/schemas.py index 38ce482..e18d34b 100644 --- a/anansyTypes/schemas.py +++ b/anansyTypes/schemas.py @@ -78,8 +78,13 @@ class TextToSymbolRequest(ModifiedBaseModel): class TextToSymbolResponse(ModifiedBaseModel): symbols: List[Symbol] - - - - - +class UsageStatusResponse(ModifiedBaseModel): + """Read-only snapshot of a caller's rate-limit window.""" + limit: int + used: int + remaining: int + unlimited: bool + window_seconds: int + # Seconds until the oldest recorded call falls out of the window, i.e. until + # one use is handed back. None when the caller has no recorded calls. + reset_in_seconds: Optional[int] = None