mirror of
https://github.com/FlipsideCrypto/sdk.git
synced 2026-02-06 10:46:43 +00:00
Update query descriptions
This commit is contained in:
parent
b60b2ca1ad
commit
2b545b2f32
@ -1,12 +1,10 @@
|
||||
from typing import Any, Union
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class ApiResponse(BaseModel):
|
||||
status_code: int = Field(
|
||||
None, description="The server-side token of the query being executed."
|
||||
)
|
||||
status_code: int
|
||||
status_msg: Union[str, None]
|
||||
error_msg: Union[str, None]
|
||||
data: Union[Any, None]
|
||||
|
||||
@ -18,6 +18,4 @@ class CreateQueryJson(BaseModel):
|
||||
|
||||
|
||||
class CreateQueryResp(ApiResponse):
|
||||
data: Union[CreateQueryJson, None] = Field(
|
||||
False, description="The data payload result after attempting to create a query."
|
||||
)
|
||||
data: Union[CreateQueryJson, None]
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
from typing import Any, List, Optional, Union
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
from pydantic import BaseModel
|
||||
|
||||
from .api_response import ApiResponse
|
||||
|
||||
|
||||
class QueryResultJson(BaseModel):
|
||||
queryId: Optional[str] = Field(None, description="The id of the query.")
|
||||
queryId: Optional[str]
|
||||
status: str
|
||||
results: Optional[List[Any]]
|
||||
startedAt: Optional[str]
|
||||
@ -20,7 +20,4 @@ class QueryResultJson(BaseModel):
|
||||
|
||||
|
||||
class QueryResultResp(ApiResponse):
|
||||
data: Union[QueryResultJson, None] = Field(
|
||||
False,
|
||||
description="The data payload result after attempting to retrieve the query results.",
|
||||
)
|
||||
data: Union[QueryResultJson, None]
|
||||
|
||||
@ -16,7 +16,7 @@ class Query(BaseModel):
|
||||
)
|
||||
cached: Optional[bool] = Field(
|
||||
None,
|
||||
description="An override on the cahce. A value of true will reexecute the query.",
|
||||
description="An override on the cache. A value of true will Re-Execute the query.",
|
||||
)
|
||||
page_size: int = Field(None, description="The number of results to return per page")
|
||||
page_number: int = Field(None, description="The page number to return")
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
from typing import Any, List, Union
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from .query_run_stats import QueryRunStats
|
||||
|
||||
@ -11,5 +11,5 @@ class QueryRunStats(BaseModel):
|
||||
description="The number of seconds elapsed between the start and end times.",
|
||||
)
|
||||
record_count: int = Field(
|
||||
False, description="The number of records returned by the query."
|
||||
None, description="The number of records returned by the query."
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user