Skip to content

Commit f6bb9c7

Browse files
feat(api): manual updates
Generate SDK for admin.organization.audit_logs.
1 parent d0ac311 commit f6bb9c7

17 files changed

Lines changed: 2041 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 152
1+
configured_endpoints: 153
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-617ac7ff7388ed68d19955b74d6dd1a3e2313e5bc47eb7c7a138162e29e23b71.yml
33
openapi_spec_hash: d431cf9d2bf2b01122bb98cc7b7a357b
4-
config_hash: 2b2791e02f87210a840b88c95ccefd31
4+
config_hash: 88be7d18ee7f33affcdad19572cd0c91

api.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,22 @@ Methods:
707707

708708
- <code title="post /uploads/{upload_id}/parts">client.uploads.parts.<a href="./src/openai/resources/uploads/parts.py">create</a>(upload_id, \*\*<a href="src/openai/types/uploads/part_create_params.py">params</a>) -> <a href="./src/openai/types/uploads/upload_part.py">UploadPart</a></code>
709709

710+
# Admin
711+
712+
## Organization
713+
714+
### AuditLogs
715+
716+
Types:
717+
718+
```python
719+
from openai.types.admin.organization import AuditLogListResponse
720+
```
721+
722+
Methods:
723+
724+
- <code title="get /organization/audit_logs">client.admin.organization.audit_logs.<a href="./src/openai/resources/admin/organization/audit_logs.py">list</a>(\*\*<a href="src/openai/types/admin/organization/audit_log_list_params.py">params</a>) -> <a href="./src/openai/types/admin/organization/audit_log_list_response.py">SyncConversationCursorPage[AuditLogListResponse]</a></code>
725+
710726
# [Responses](src/openai/resources/responses/api.md)
711727

712728
# [Realtime](src/openai/resources/realtime/api.md)

src/openai/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ def _reset_client() -> None: # type: ignore[reportUnusedFunction]
398398
from ._module_client import (
399399
beta as beta,
400400
chat as chat,
401+
admin as admin,
401402
audio as audio,
402403
evals as evals,
403404
files as files,

src/openai/_client.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
from .resources import (
4444
beta,
4545
chat,
46+
admin,
4647
audio,
4748
evals,
4849
files,
@@ -70,6 +71,7 @@
7071
from .resources.beta.beta import Beta, AsyncBeta
7172
from .resources.chat.chat import Chat, AsyncChat
7273
from .resources.embeddings import Embeddings, AsyncEmbeddings
74+
from .resources.admin.admin import Admin, AsyncAdmin
7375
from .resources.audio.audio import Audio, AsyncAudio
7476
from .resources.completions import Completions, AsyncCompletions
7577
from .resources.evals.evals import Evals, AsyncEvals
@@ -324,6 +326,12 @@ def uploads(self) -> Uploads:
324326

325327
return Uploads(self)
326328

329+
@cached_property
330+
def admin(self) -> Admin:
331+
from .resources.admin import Admin
332+
333+
return Admin(self)
334+
327335
@cached_property
328336
def responses(self) -> Responses:
329337
from .resources.responses import Responses
@@ -813,6 +821,12 @@ def uploads(self) -> AsyncUploads:
813821

814822
return AsyncUploads(self)
815823

824+
@cached_property
825+
def admin(self) -> AsyncAdmin:
826+
from .resources.admin import AsyncAdmin
827+
828+
return AsyncAdmin(self)
829+
816830
@cached_property
817831
def responses(self) -> AsyncResponses:
818832
from .resources.responses import AsyncResponses
@@ -1166,6 +1180,12 @@ def uploads(self) -> uploads.UploadsWithRawResponse:
11661180

11671181
return UploadsWithRawResponse(self._client.uploads)
11681182

1183+
@cached_property
1184+
def admin(self) -> admin.AdminWithRawResponse:
1185+
from .resources.admin import AdminWithRawResponse
1186+
1187+
return AdminWithRawResponse(self._client.admin)
1188+
11691189
@cached_property
11701190
def responses(self) -> responses.ResponsesWithRawResponse:
11711191
from .resources.responses import ResponsesWithRawResponse
@@ -1311,6 +1331,12 @@ def uploads(self) -> uploads.AsyncUploadsWithRawResponse:
13111331

13121332
return AsyncUploadsWithRawResponse(self._client.uploads)
13131333

1334+
@cached_property
1335+
def admin(self) -> admin.AsyncAdminWithRawResponse:
1336+
from .resources.admin import AsyncAdminWithRawResponse
1337+
1338+
return AsyncAdminWithRawResponse(self._client.admin)
1339+
13141340
@cached_property
13151341
def responses(self) -> responses.AsyncResponsesWithRawResponse:
13161342
from .resources.responses import AsyncResponsesWithRawResponse
@@ -1456,6 +1482,12 @@ def uploads(self) -> uploads.UploadsWithStreamingResponse:
14561482

14571483
return UploadsWithStreamingResponse(self._client.uploads)
14581484

1485+
@cached_property
1486+
def admin(self) -> admin.AdminWithStreamingResponse:
1487+
from .resources.admin import AdminWithStreamingResponse
1488+
1489+
return AdminWithStreamingResponse(self._client.admin)
1490+
14591491
@cached_property
14601492
def responses(self) -> responses.ResponsesWithStreamingResponse:
14611493
from .resources.responses import ResponsesWithStreamingResponse
@@ -1601,6 +1633,12 @@ def uploads(self) -> uploads.AsyncUploadsWithStreamingResponse:
16011633

16021634
return AsyncUploadsWithStreamingResponse(self._client.uploads)
16031635

1636+
@cached_property
1637+
def admin(self) -> admin.AsyncAdminWithStreamingResponse:
1638+
from .resources.admin import AsyncAdminWithStreamingResponse
1639+
1640+
return AsyncAdminWithStreamingResponse(self._client.admin)
1641+
16041642
@cached_property
16051643
def responses(self) -> responses.AsyncResponsesWithStreamingResponse:
16061644
from .resources.responses import AsyncResponsesWithStreamingResponse

src/openai/_module_client.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from .resources.beta.beta import Beta
1515
from .resources.chat.chat import Chat
1616
from .resources.embeddings import Embeddings
17+
from .resources.admin.admin import Admin
1718
from .resources.audio.audio import Audio
1819
from .resources.completions import Completions
1920
from .resources.evals.evals import Evals
@@ -56,6 +57,12 @@ def __load__(self) -> Audio:
5657
return _load_client().audio
5758

5859

60+
class AdminProxy(LazyProxy["Admin"]):
61+
@override
62+
def __load__(self) -> Admin:
63+
return _load_client().admin
64+
65+
5966
class EvalsProxy(LazyProxy["Evals"]):
6067
@override
6168
def __load__(self) -> Evals:
@@ -162,6 +169,7 @@ def __load__(self) -> Conversations:
162169
beta: Beta = BetaProxy().__as_proxied__()
163170
files: Files = FilesProxy().__as_proxied__()
164171
audio: Audio = AudioProxy().__as_proxied__()
172+
admin: Admin = AdminProxy().__as_proxied__()
165173
evals: Evals = EvalsProxy().__as_proxied__()
166174
images: Images = ImagesProxy().__as_proxied__()
167175
models: Models = ModelsProxy().__as_proxied__()

src/openai/resources/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
ChatWithStreamingResponse,
1717
AsyncChatWithStreamingResponse,
1818
)
19+
from .admin import (
20+
Admin,
21+
AsyncAdmin,
22+
AdminWithRawResponse,
23+
AsyncAdminWithRawResponse,
24+
AdminWithStreamingResponse,
25+
AsyncAdminWithStreamingResponse,
26+
)
1927
from .audio import (
2028
Audio,
2129
AsyncAudio,
@@ -216,6 +224,12 @@
216224
"AsyncUploadsWithRawResponse",
217225
"UploadsWithStreamingResponse",
218226
"AsyncUploadsWithStreamingResponse",
227+
"Admin",
228+
"AsyncAdmin",
229+
"AdminWithRawResponse",
230+
"AsyncAdminWithRawResponse",
231+
"AdminWithStreamingResponse",
232+
"AsyncAdminWithStreamingResponse",
219233
"Evals",
220234
"AsyncEvals",
221235
"EvalsWithRawResponse",
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .admin import (
4+
Admin,
5+
AsyncAdmin,
6+
AdminWithRawResponse,
7+
AsyncAdminWithRawResponse,
8+
AdminWithStreamingResponse,
9+
AsyncAdminWithStreamingResponse,
10+
)
11+
from .organization import (
12+
Organization,
13+
AsyncOrganization,
14+
OrganizationWithRawResponse,
15+
AsyncOrganizationWithRawResponse,
16+
OrganizationWithStreamingResponse,
17+
AsyncOrganizationWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"Organization",
22+
"AsyncOrganization",
23+
"OrganizationWithRawResponse",
24+
"AsyncOrganizationWithRawResponse",
25+
"OrganizationWithStreamingResponse",
26+
"AsyncOrganizationWithStreamingResponse",
27+
"Admin",
28+
"AsyncAdmin",
29+
"AdminWithRawResponse",
30+
"AsyncAdminWithRawResponse",
31+
"AdminWithStreamingResponse",
32+
"AsyncAdminWithStreamingResponse",
33+
]
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from ..._compat import cached_property
6+
from ..._resource import SyncAPIResource, AsyncAPIResource
7+
from .organization.organization import (
8+
Organization,
9+
AsyncOrganization,
10+
OrganizationWithRawResponse,
11+
AsyncOrganizationWithRawResponse,
12+
OrganizationWithStreamingResponse,
13+
AsyncOrganizationWithStreamingResponse,
14+
)
15+
16+
__all__ = ["Admin", "AsyncAdmin"]
17+
18+
19+
class Admin(SyncAPIResource):
20+
@cached_property
21+
def organization(self) -> Organization:
22+
return Organization(self._client)
23+
24+
@cached_property
25+
def with_raw_response(self) -> AdminWithRawResponse:
26+
"""
27+
This property can be used as a prefix for any HTTP method call to return
28+
the raw response object instead of the parsed content.
29+
30+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
31+
"""
32+
return AdminWithRawResponse(self)
33+
34+
@cached_property
35+
def with_streaming_response(self) -> AdminWithStreamingResponse:
36+
"""
37+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
38+
39+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
40+
"""
41+
return AdminWithStreamingResponse(self)
42+
43+
44+
class AsyncAdmin(AsyncAPIResource):
45+
@cached_property
46+
def organization(self) -> AsyncOrganization:
47+
return AsyncOrganization(self._client)
48+
49+
@cached_property
50+
def with_raw_response(self) -> AsyncAdminWithRawResponse:
51+
"""
52+
This property can be used as a prefix for any HTTP method call to return
53+
the raw response object instead of the parsed content.
54+
55+
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
56+
"""
57+
return AsyncAdminWithRawResponse(self)
58+
59+
@cached_property
60+
def with_streaming_response(self) -> AsyncAdminWithStreamingResponse:
61+
"""
62+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
63+
64+
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
65+
"""
66+
return AsyncAdminWithStreamingResponse(self)
67+
68+
69+
class AdminWithRawResponse:
70+
def __init__(self, admin: Admin) -> None:
71+
self._admin = admin
72+
73+
@cached_property
74+
def organization(self) -> OrganizationWithRawResponse:
75+
return OrganizationWithRawResponse(self._admin.organization)
76+
77+
78+
class AsyncAdminWithRawResponse:
79+
def __init__(self, admin: AsyncAdmin) -> None:
80+
self._admin = admin
81+
82+
@cached_property
83+
def organization(self) -> AsyncOrganizationWithRawResponse:
84+
return AsyncOrganizationWithRawResponse(self._admin.organization)
85+
86+
87+
class AdminWithStreamingResponse:
88+
def __init__(self, admin: Admin) -> None:
89+
self._admin = admin
90+
91+
@cached_property
92+
def organization(self) -> OrganizationWithStreamingResponse:
93+
return OrganizationWithStreamingResponse(self._admin.organization)
94+
95+
96+
class AsyncAdminWithStreamingResponse:
97+
def __init__(self, admin: AsyncAdmin) -> None:
98+
self._admin = admin
99+
100+
@cached_property
101+
def organization(self) -> AsyncOrganizationWithStreamingResponse:
102+
return AsyncOrganizationWithStreamingResponse(self._admin.organization)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .audit_logs import (
4+
AuditLogs,
5+
AsyncAuditLogs,
6+
AuditLogsWithRawResponse,
7+
AsyncAuditLogsWithRawResponse,
8+
AuditLogsWithStreamingResponse,
9+
AsyncAuditLogsWithStreamingResponse,
10+
)
11+
from .organization import (
12+
Organization,
13+
AsyncOrganization,
14+
OrganizationWithRawResponse,
15+
AsyncOrganizationWithRawResponse,
16+
OrganizationWithStreamingResponse,
17+
AsyncOrganizationWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"AuditLogs",
22+
"AsyncAuditLogs",
23+
"AuditLogsWithRawResponse",
24+
"AsyncAuditLogsWithRawResponse",
25+
"AuditLogsWithStreamingResponse",
26+
"AsyncAuditLogsWithStreamingResponse",
27+
"Organization",
28+
"AsyncOrganization",
29+
"OrganizationWithRawResponse",
30+
"AsyncOrganizationWithRawResponse",
31+
"OrganizationWithStreamingResponse",
32+
"AsyncOrganizationWithStreamingResponse",
33+
]

0 commit comments

Comments
 (0)