Skip to content

feat(api): api update #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 36
openapi_spec_hash: 6a5cfa54c19b354978b1654c152b0431
openapi_spec_hash: 1850a850b7e27992c6e47190db9add88
config_hash: adbedb6317fca6f566f54564cc341846
6 changes: 3 additions & 3 deletions src/codex/resources/projects/clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import List
from typing import List, Optional
from typing_extensions import Literal

import httpx
Expand Down Expand Up @@ -53,7 +53,7 @@ def list(
limit: int | NotGiven = NOT_GIVEN,
offset: int | NotGiven = NOT_GIVEN,
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
sort: Literal["created_at", "answered_at", "cluster_frequency_count"] | NotGiven = NOT_GIVEN,
sort: Optional[Literal["created_at", "answered_at", "cluster_frequency_count"]] | NotGiven = NOT_GIVEN,
states: List[Literal["unanswered", "draft", "published", "published_with_draft"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -164,7 +164,7 @@ def list(
limit: int | NotGiven = NOT_GIVEN,
offset: int | NotGiven = NOT_GIVEN,
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
sort: Literal["created_at", "answered_at", "cluster_frequency_count"] | NotGiven = NOT_GIVEN,
sort: Optional[Literal["created_at", "answered_at", "cluster_frequency_count"]] | NotGiven = NOT_GIVEN,
states: List[Literal["unanswered", "draft", "published", "published_with_draft"]] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down
4 changes: 2 additions & 2 deletions src/codex/types/projects/cluster_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import List
from typing import List, Optional
from typing_extensions import Literal, TypedDict

__all__ = ["ClusterListParams"]
Expand All @@ -15,6 +15,6 @@ class ClusterListParams(TypedDict, total=False):

order: Literal["asc", "desc"]

sort: Literal["created_at", "answered_at", "cluster_frequency_count"]
sort: Optional[Literal["created_at", "answered_at", "cluster_frequency_count"]]

states: List[Literal["unanswered", "draft", "published", "published_with_draft"]]
3 changes: 3 additions & 0 deletions src/codex/types/projects/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ class Entry(BaseModel):
draft_answer: Optional[str] = None

draft_answer_last_edited: Optional[datetime] = None

frequency_count: Optional[int] = None
"""number of times the entry matched for a /query request"""