Skip to content

Commit 8d97e77

Browse files
authored
fix(types): allow dict-style order in query request (#8)
1 parent 340d269 commit 8d97e77

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

examples/quickstart.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def query_data(cube: cube_http.Client):
7373
}
7474
],
7575
"limit": 10,
76+
"order": [{"tasks.count": "desc"}],
7677
}
7778
}
7879
)

src/cube_http/types/v1/load_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class V1LoadRequestQuery(TypedDict):
7474
timeDimensions: NotRequired[list[V1LoadRequestQueryTimeDimension]]
7575
"""List of time dimensions to be used in the query."""
7676

77-
order: NotRequired[list[list[str]]]
77+
order: NotRequired[list[list[str]] | list[dict[str, str]]]
7878
"""Ordering criteria for the query, specified as a dictionary of measures
7979
or dimensions with `asc` or `desc` values."""
8080

0 commit comments

Comments
 (0)