Skip to content

Commit 0a33c47

Browse files
feat(api): api update
1 parent 1cdf391 commit 0a33c47

File tree

6 files changed

+2
-235
lines changed

6 files changed

+2
-235
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
configured_endpoints: 55
2-
openapi_spec_hash: fd2542df68972f34edeb819c58600791
1+
configured_endpoints: 54
2+
openapi_spec_hash: 168bdf5a611596d39812ce7259416529
33
config_hash: 8f6e5c3b064cbb77569a6bf654954a56

api.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ Methods:
153153
- <code title="get /api/projects/">client.projects.<a href="./src/codex/resources/projects/projects.py">list</a>(\*\*<a href="src/codex/types/project_list_params.py">params</a>) -> <a href="./src/codex/types/project_list_response.py">ProjectListResponse</a></code>
154154
- <code title="delete /api/projects/{project_id}">client.projects.<a href="./src/codex/resources/projects/projects.py">delete</a>(project_id) -> None</code>
155155
- <code title="get /api/projects/{project_id}/export">client.projects.<a href="./src/codex/resources/projects/projects.py">export</a>(project_id) -> object</code>
156-
- <code title="post /api/projects/{project_id}/increment_queries">client.projects.<a href="./src/codex/resources/projects/projects.py">increment_queries</a>(project_id, \*\*<a href="src/codex/types/project_increment_queries_params.py">params</a>) -> object</code>
157156
- <code title="post /api/projects/{project_id}/notifications">client.projects.<a href="./src/codex/resources/projects/projects.py">invite_sme</a>(project_id, \*\*<a href="src/codex/types/project_invite_sme_params.py">params</a>) -> <a href="./src/codex/types/project_invite_sme_response.py">ProjectInviteSmeResponse</a></code>
158157
- <code title="get /api/projects/{project_id}/analytics/">client.projects.<a href="./src/codex/resources/projects/projects.py">retrieve_analytics</a>(project_id, \*\*<a href="src/codex/types/project_retrieve_analytics_params.py">params</a>) -> <a href="./src/codex/types/project_retrieve_analytics_response.py">ProjectRetrieveAnalyticsResponse</a></code>
159158
- <code title="post /api/projects/{project_id}/validate">client.projects.<a href="./src/codex/resources/projects/projects.py">validate</a>(project_id, \*\*<a href="src/codex/types/project_validate_params.py">params</a>) -> <a href="./src/codex/types/project_validate_response.py">ProjectValidateResponse</a></code>

src/codex/resources/projects/projects.py

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from __future__ import annotations
44

5-
import typing_extensions
65
from typing import Dict, List, Iterable, Optional
76
from typing_extensions import Literal
87

@@ -22,7 +21,6 @@
2221
project_update_params,
2322
project_validate_params,
2423
project_invite_sme_params,
25-
project_increment_queries_params,
2624
project_retrieve_analytics_params,
2725
)
2826
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
@@ -349,45 +347,6 @@ def export(
349347
cast_to=object,
350348
)
351349

352-
@typing_extensions.deprecated("deprecated")
353-
def increment_queries(
354-
self,
355-
project_id: str,
356-
*,
357-
count: int | NotGiven = NOT_GIVEN,
358-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
359-
# The extra values given here take precedence over values defined on the client or passed to this method.
360-
extra_headers: Headers | None = None,
361-
extra_query: Query | None = None,
362-
extra_body: Body | None = None,
363-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
364-
) -> object:
365-
"""
366-
Increment the queries metric for a project.
367-
368-
Args:
369-
extra_headers: Send extra headers
370-
371-
extra_query: Add additional query parameters to the request
372-
373-
extra_body: Add additional JSON properties to the request
374-
375-
timeout: Override the client-level default timeout for this request, in seconds
376-
"""
377-
if not project_id:
378-
raise ValueError(f"Expected a non-empty value for `project_id` but received {project_id!r}")
379-
return self._post(
380-
f"/api/projects/{project_id}/increment_queries",
381-
options=make_request_options(
382-
extra_headers=extra_headers,
383-
extra_query=extra_query,
384-
extra_body=extra_body,
385-
timeout=timeout,
386-
query=maybe_transform({"count": count}, project_increment_queries_params.ProjectIncrementQueriesParams),
387-
),
388-
cast_to=object,
389-
)
390-
391350
def invite_sme(
392351
self,
393352
project_id: str,
@@ -956,47 +915,6 @@ async def export(
956915
cast_to=object,
957916
)
958917

959-
@typing_extensions.deprecated("deprecated")
960-
async def increment_queries(
961-
self,
962-
project_id: str,
963-
*,
964-
count: int | NotGiven = NOT_GIVEN,
965-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
966-
# The extra values given here take precedence over values defined on the client or passed to this method.
967-
extra_headers: Headers | None = None,
968-
extra_query: Query | None = None,
969-
extra_body: Body | None = None,
970-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
971-
) -> object:
972-
"""
973-
Increment the queries metric for a project.
974-
975-
Args:
976-
extra_headers: Send extra headers
977-
978-
extra_query: Add additional query parameters to the request
979-
980-
extra_body: Add additional JSON properties to the request
981-
982-
timeout: Override the client-level default timeout for this request, in seconds
983-
"""
984-
if not project_id:
985-
raise ValueError(f"Expected a non-empty value for `project_id` but received {project_id!r}")
986-
return await self._post(
987-
f"/api/projects/{project_id}/increment_queries",
988-
options=make_request_options(
989-
extra_headers=extra_headers,
990-
extra_query=extra_query,
991-
extra_body=extra_body,
992-
timeout=timeout,
993-
query=await async_maybe_transform(
994-
{"count": count}, project_increment_queries_params.ProjectIncrementQueriesParams
995-
),
996-
),
997-
cast_to=object,
998-
)
999-
1000918
async def invite_sme(
1001919
self,
1002920
project_id: str,
@@ -1308,11 +1226,6 @@ def __init__(self, projects: ProjectsResource) -> None:
13081226
self.export = to_raw_response_wrapper(
13091227
projects.export,
13101228
)
1311-
self.increment_queries = ( # pyright: ignore[reportDeprecated]
1312-
to_raw_response_wrapper(
1313-
projects.increment_queries # pyright: ignore[reportDeprecated],
1314-
)
1315-
)
13161229
self.invite_sme = to_raw_response_wrapper(
13171230
projects.invite_sme,
13181231
)
@@ -1362,11 +1275,6 @@ def __init__(self, projects: AsyncProjectsResource) -> None:
13621275
self.export = async_to_raw_response_wrapper(
13631276
projects.export,
13641277
)
1365-
self.increment_queries = ( # pyright: ignore[reportDeprecated]
1366-
async_to_raw_response_wrapper(
1367-
projects.increment_queries # pyright: ignore[reportDeprecated],
1368-
)
1369-
)
13701278
self.invite_sme = async_to_raw_response_wrapper(
13711279
projects.invite_sme,
13721280
)
@@ -1416,11 +1324,6 @@ def __init__(self, projects: ProjectsResource) -> None:
14161324
self.export = to_streamed_response_wrapper(
14171325
projects.export,
14181326
)
1419-
self.increment_queries = ( # pyright: ignore[reportDeprecated]
1420-
to_streamed_response_wrapper(
1421-
projects.increment_queries # pyright: ignore[reportDeprecated],
1422-
)
1423-
)
14241327
self.invite_sme = to_streamed_response_wrapper(
14251328
projects.invite_sme,
14261329
)
@@ -1470,11 +1373,6 @@ def __init__(self, projects: AsyncProjectsResource) -> None:
14701373
self.export = async_to_streamed_response_wrapper(
14711374
projects.export,
14721375
)
1473-
self.increment_queries = ( # pyright: ignore[reportDeprecated]
1474-
async_to_streamed_response_wrapper(
1475-
projects.increment_queries # pyright: ignore[reportDeprecated],
1476-
)
1477-
)
14781376
self.invite_sme = async_to_streamed_response_wrapper(
14791377
projects.invite_sme,
14801378
)

src/codex/types/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from .organization_schema_public import OrganizationSchemaPublic as OrganizationSchemaPublic
2020
from .project_invite_sme_response import ProjectInviteSmeResponse as ProjectInviteSmeResponse
2121
from .user_activate_account_params import UserActivateAccountParams as UserActivateAccountParams
22-
from .project_increment_queries_params import ProjectIncrementQueriesParams as ProjectIncrementQueriesParams
2322
from .project_retrieve_analytics_params import ProjectRetrieveAnalyticsParams as ProjectRetrieveAnalyticsParams
2423
from .organization_list_members_response import OrganizationListMembersResponse as OrganizationListMembersResponse
2524
from .project_retrieve_analytics_response import ProjectRetrieveAnalyticsResponse as ProjectRetrieveAnalyticsResponse

src/codex/types/project_increment_queries_params.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/api_resources/test_projects.py

Lines changed: 0 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
)
1919
from tests.utils import assert_matches_type
2020

21-
# pyright: reportDeprecated=false
22-
2321
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
2422

2523

@@ -462,64 +460,6 @@ def test_path_params_export(self, client: Codex) -> None:
462460
"",
463461
)
464462

465-
@pytest.mark.skip()
466-
@parametrize
467-
def test_method_increment_queries(self, client: Codex) -> None:
468-
with pytest.warns(DeprecationWarning):
469-
project = client.projects.increment_queries(
470-
project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
471-
)
472-
473-
assert_matches_type(object, project, path=["response"])
474-
475-
@pytest.mark.skip()
476-
@parametrize
477-
def test_method_increment_queries_with_all_params(self, client: Codex) -> None:
478-
with pytest.warns(DeprecationWarning):
479-
project = client.projects.increment_queries(
480-
project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
481-
count=0,
482-
)
483-
484-
assert_matches_type(object, project, path=["response"])
485-
486-
@pytest.mark.skip()
487-
@parametrize
488-
def test_raw_response_increment_queries(self, client: Codex) -> None:
489-
with pytest.warns(DeprecationWarning):
490-
response = client.projects.with_raw_response.increment_queries(
491-
project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
492-
)
493-
494-
assert response.is_closed is True
495-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
496-
project = response.parse()
497-
assert_matches_type(object, project, path=["response"])
498-
499-
@pytest.mark.skip()
500-
@parametrize
501-
def test_streaming_response_increment_queries(self, client: Codex) -> None:
502-
with pytest.warns(DeprecationWarning):
503-
with client.projects.with_streaming_response.increment_queries(
504-
project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
505-
) as response:
506-
assert not response.is_closed
507-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
508-
509-
project = response.parse()
510-
assert_matches_type(object, project, path=["response"])
511-
512-
assert cast(Any, response.is_closed) is True
513-
514-
@pytest.mark.skip()
515-
@parametrize
516-
def test_path_params_increment_queries(self, client: Codex) -> None:
517-
with pytest.warns(DeprecationWarning):
518-
with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_id` but received ''"):
519-
client.projects.with_raw_response.increment_queries(
520-
project_id="",
521-
)
522-
523463
@pytest.mark.skip()
524464
@parametrize
525465
def test_method_invite_sme(self, client: Codex) -> None:
@@ -1164,64 +1104,6 @@ async def test_path_params_export(self, async_client: AsyncCodex) -> None:
11641104
"",
11651105
)
11661106

1167-
@pytest.mark.skip()
1168-
@parametrize
1169-
async def test_method_increment_queries(self, async_client: AsyncCodex) -> None:
1170-
with pytest.warns(DeprecationWarning):
1171-
project = await async_client.projects.increment_queries(
1172-
project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
1173-
)
1174-
1175-
assert_matches_type(object, project, path=["response"])
1176-
1177-
@pytest.mark.skip()
1178-
@parametrize
1179-
async def test_method_increment_queries_with_all_params(self, async_client: AsyncCodex) -> None:
1180-
with pytest.warns(DeprecationWarning):
1181-
project = await async_client.projects.increment_queries(
1182-
project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
1183-
count=0,
1184-
)
1185-
1186-
assert_matches_type(object, project, path=["response"])
1187-
1188-
@pytest.mark.skip()
1189-
@parametrize
1190-
async def test_raw_response_increment_queries(self, async_client: AsyncCodex) -> None:
1191-
with pytest.warns(DeprecationWarning):
1192-
response = await async_client.projects.with_raw_response.increment_queries(
1193-
project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
1194-
)
1195-
1196-
assert response.is_closed is True
1197-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
1198-
project = await response.parse()
1199-
assert_matches_type(object, project, path=["response"])
1200-
1201-
@pytest.mark.skip()
1202-
@parametrize
1203-
async def test_streaming_response_increment_queries(self, async_client: AsyncCodex) -> None:
1204-
with pytest.warns(DeprecationWarning):
1205-
async with async_client.projects.with_streaming_response.increment_queries(
1206-
project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
1207-
) as response:
1208-
assert not response.is_closed
1209-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
1210-
1211-
project = await response.parse()
1212-
assert_matches_type(object, project, path=["response"])
1213-
1214-
assert cast(Any, response.is_closed) is True
1215-
1216-
@pytest.mark.skip()
1217-
@parametrize
1218-
async def test_path_params_increment_queries(self, async_client: AsyncCodex) -> None:
1219-
with pytest.warns(DeprecationWarning):
1220-
with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_id` but received ''"):
1221-
await async_client.projects.with_raw_response.increment_queries(
1222-
project_id="",
1223-
)
1224-
12251107
@pytest.mark.skip()
12261108
@parametrize
12271109
async def test_method_invite_sme(self, async_client: AsyncCodex) -> None:

0 commit comments

Comments
 (0)