Skip to content

Commit 1472e6f

Browse files
feat(api): api update
1 parent 376681a commit 1472e6f

File tree

5 files changed

+9
-15
lines changed

5 files changed

+9
-15
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
configured_endpoints: 43
2-
openapi_spec_hash: 62b629dd5b215c1eebc57e0c6039eea7
2+
openapi_spec_hash: 1d2bab7a30685ae6ba2f0a98abf2dd54
33
config_hash: 5e459b33c53ffa6e554087a779bdb790

src/codex/resources/projects/projects.py

-8
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ def retrieve_analytics(
365365
project_id: str,
366366
*,
367367
end: int | NotGiven = NOT_GIVEN,
368-
sme_limit: int | NotGiven = NOT_GIVEN,
369368
start: int | NotGiven = NOT_GIVEN,
370369
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
371370
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -380,8 +379,6 @@ def retrieve_analytics(
380379
Args:
381380
end: End timestamp in seconds since epoch
382381
383-
sme_limit: Limit the number of top SME contributors to return.
384-
385382
start: Start timestamp in seconds since epoch
386383
387384
extra_headers: Send extra headers
@@ -404,7 +401,6 @@ def retrieve_analytics(
404401
query=maybe_transform(
405402
{
406403
"end": end,
407-
"sme_limit": sme_limit,
408404
"start": start,
409405
},
410406
project_retrieve_analytics_params.ProjectRetrieveAnalyticsParams,
@@ -723,7 +719,6 @@ async def retrieve_analytics(
723719
project_id: str,
724720
*,
725721
end: int | NotGiven = NOT_GIVEN,
726-
sme_limit: int | NotGiven = NOT_GIVEN,
727722
start: int | NotGiven = NOT_GIVEN,
728723
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
729724
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -738,8 +733,6 @@ async def retrieve_analytics(
738733
Args:
739734
end: End timestamp in seconds since epoch
740735
741-
sme_limit: Limit the number of top SME contributors to return.
742-
743736
start: Start timestamp in seconds since epoch
744737
745738
extra_headers: Send extra headers
@@ -762,7 +755,6 @@ async def retrieve_analytics(
762755
query=await async_maybe_transform(
763756
{
764757
"end": end,
765-
"sme_limit": sme_limit,
766758
"start": start,
767759
},
768760
project_retrieve_analytics_params.ProjectRetrieveAnalyticsParams,

src/codex/types/project_retrieve_analytics_params.py

-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,5 @@ class ProjectRetrieveAnalyticsParams(TypedDict, total=False):
1111
end: int
1212
"""End timestamp in seconds since epoch"""
1313

14-
sme_limit: int
15-
"""Limit the number of top SME contributors to return."""
16-
1714
start: int
1815
"""Start timestamp in seconds since epoch"""

src/codex/types/project_retrieve_analytics_response.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"AnswersPublished",
1010
"AnswersPublishedAnswersByAuthor",
1111
"BadResponses",
12+
"BadResponsesResponsesByType",
1213
"Queries",
1314
]
1415

@@ -25,8 +26,14 @@ class AnswersPublished(BaseModel):
2526
answers_by_author: List[AnswersPublishedAnswersByAuthor]
2627

2728

29+
class BadResponsesResponsesByType(BaseModel):
30+
num_prevented: int
31+
32+
total: int
33+
34+
2835
class BadResponses(BaseModel):
29-
responses_by_type: Dict[str, int]
36+
responses_by_type: Dict[str, BadResponsesResponsesByType]
3037

3138
total: int
3239

tests/api_resources/test_projects.py

-2
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ def test_method_retrieve_analytics_with_all_params(self, client: Codex) -> None:
374374
project = client.projects.retrieve_analytics(
375375
project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
376376
end=0,
377-
sme_limit=1,
378377
start=0,
379378
)
380379
assert_matches_type(ProjectRetrieveAnalyticsResponse, project, path=["response"])
@@ -769,7 +768,6 @@ async def test_method_retrieve_analytics_with_all_params(self, async_client: Asy
769768
project = await async_client.projects.retrieve_analytics(
770769
project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
771770
end=0,
772-
sme_limit=1,
773771
start=0,
774772
)
775773
assert_matches_type(ProjectRetrieveAnalyticsResponse, project, path=["response"])

0 commit comments

Comments
 (0)