§
    �’j¹i  ã                  ó~  — d dl mZ d dlmZ d dlmZ d dlZddlmZ ddl	m
Z
mZmZmZmZmZmZmZ ddlmZ dd	lmZ dd
lmZmZ ddlmZmZ ddlmZmZ ddlm Z m!Z! ddl"m#Z# ddl$m%Z% ddgZ& G d„ de¦  «        Z' G d„ de¦  «        Z( G d„ d¦  «        Z) G d„ d¦  «        Z* G d„ d¦  «        Z+ G d„ d¦  «        Z,dS )é    )Úannotations)ÚList)ÚLiteralNé   )Ú_legacy_response)ÚBodyÚOmitÚQueryÚHeadersÚNotGivenÚSequenceNotStrÚomitÚ	not_given)Úmaybe_transform)Úcached_property)ÚSyncAPIResourceÚAsyncAPIResource)Úto_streamed_response_wrapperÚ"async_to_streamed_response_wrapper)ÚSyncConversationCursorPageÚAsyncConversationCursorPage)ÚAsyncPaginatorÚmake_request_options)Úaudit_log_list_params)ÚAuditLogListResponseÚ	AuditLogsÚAsyncAuditLogsc                  ój   — e Zd ZdZed#d„¦   «         Zed$d„¦   «         Zeeeeeeeeeedddedœd%d"„Z	dS )&r   úEList user actions and configuration changes within this organization.ÚreturnÚAuditLogsWithRawResponsec                ó    — t          | ¦  «        S ©a  
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
        )r!   ©Úselfs    ú\C:\Projects\DSCons\.venv\Lib\site-packages\openai\resources\admin\organization\audit_logs.pyÚwith_raw_responsezAuditLogs.with_raw_response   s   € õ (¨Ñ-Ô-Ð-ó    ÚAuditLogsWithStreamingResponsec                ó    — t          | ¦  «        S ©zÌ
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/openai/openai-python#with_streaming_response
        )r)   r$   s    r&   Úwith_streaming_responsez!AuditLogs.with_streaming_response%   s   € õ .¨dÑ3Ô3Ð3r(   N©Úactor_emailsÚ	actor_idsÚafterÚbeforeÚeffective_atÚevent_typesÚlimitÚproject_idsÚresource_idsÚtenant_onlyÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutr.   úSequenceNotStr[str] | Omitr/   r0   ú
str | Omitr1   r2   ú(audit_log_list_params.EffectiveAt | Omitr3   áo  List[Literal['api_key.created', 'api_key.updated', 'api_key.deleted', 'certificate.created', 'certificate.updated', 'certificate.deleted', 'certificates.activated', 'certificates.deactivated', 'checkpoint.permission.created', 'checkpoint.permission.deleted', 'external_key.registered', 'external_key.removed', 'group.created', 'group.updated', 'group.deleted', 'invite.sent', 'invite.accepted', 'invite.deleted', 'ip_allowlist.created', 'ip_allowlist.updated', 'ip_allowlist.deleted', 'ip_allowlist.config.activated', 'ip_allowlist.config.deactivated', 'login.succeeded', 'login.failed', 'logout.succeeded', 'logout.failed', 'organization.updated', 'project.created', 'project.updated', 'project.archived', 'project.deleted', 'rate_limit.updated', 'rate_limit.deleted', 'resource.deleted', 'tunnel.created', 'tunnel.updated', 'tunnel.deleted', 'workload_identity_provider.created', 'workload_identity_provider.updated', 'workload_identity_provider.deleted', 'workload_identity_provider_mapping.created', 'workload_identity_provider_mapping.updated', 'workload_identity_provider_mapping.deleted', 'role.created', 'role.updated', 'role.deleted', 'role.assignment.created', 'role.assignment.deleted', 'role.bound_to_resource', 'role.unbound_from_resource', 'scim.enabled', 'scim.disabled', 'service_account.created', 'service_account.updated', 'service_account.deleted', 'user.added', 'user.updated', 'user.deleted', 'tenant.metadata.updated', 'tenant.microsoft_entra_mapping.upserted', 'tenant.microsoft_entra_mapping.deleted', 'tenant.workload_identity.provider.created', 'tenant.workload_identity.provider.updated', 'tenant.workload_identity.provider.archived', 'tenant.workload_identity.mapping.created', 'tenant.workload_identity.mapping.updated', 'tenant.workload_identity.mapping.archived', 'tenant.workload_identity.binding.created', 'tenant.workload_identity.principal.provisioned', 'tenant.workload_identity.access_token.issued', 'tenant.admin_api_key.created', 'tenant.admin_api_key.updated', 'tenant.admin_api_key.deleted', 'tenant.project_api_key.created', 'tenant.chatgpt_access_token.revoked', 'tenant.migration.completed', 'tenant.sso.migrated', 'tenant.domains.migrated', 'tenant.sso_connection.created', 'tenant.sso_connection.updated', 'tenant.sso_connection.deleted', 'tenant.sso_connection.setup.started', 'tenant.policy.created', 'tenant.policy.updated', 'tenant.policy.deleted', 'tenant.policy.attached', 'tenant.policy.detached', 'tenant.principal_authentication_policy.resolved', 'tenant.scim.setup.started', 'tenant.scim.deletion.requested', 'tenant.scim.directory.created', 'tenant.product_access_policy.updated', 'tenant.resource_share_grant.created', 'tenant.resource_share_grant.updated', 'tenant.resource_share_grant.accepted', 'tenant.resource_share_grant.declined', 'tenant.resource_share_grant.revoked', 'tenant.resource_share_grant.deleted', 'tenant.service_account.updated', 'tenant.service_account.deleted', 'tenant.service_account.token.revoked', 'tenant.billing.overage_limit.updated', 'tenant.billing.alerts.updated', 'tenant.billing.info.updated', 'tenant.usage_limit.workspace.updated', 'tenant.usage_limit.group.updated', 'tenant.usage_limit.user.updated', 'tenant.usage_limit.increase_request.updated', 'tenant.usage_limit.increase_request.resolved', 'tenant.group.created', 'tenant.group.updated', 'tenant.group.deleted', 'tenant.group.member.added', 'tenant.group.member.removed', 'tenant.migration_rollout.status.updated', 'tenant.migration_rollout.tier.updated', 'tenant.role.metadata.updated', 'tenant.custom_role.created', 'tenant.custom_role.updated', 'tenant.custom_role.deleted', 'tenant.role_assignment.created', 'tenant.role_assignment.deleted', 'tenant.resource_role_assignment.created', 'tenant.resource_role_assignment.deleted', 'tenant.resource_access.updated', 'tenant.resource_access.deleted', 'tenant.ads_account.onboarding.redemption', 'tenant.session_policy.created', 'tenant.session_policy.updated', 'tenant.session_policy.deleted', 'tenant.session_revocation.started', 'tenant.third_party_app_policy.updated', 'tenant.user.added', 'tenant.user.updated', 'tenant.user.removed', 'tenant.user.looked_up', 'tenant.user.invited', 'tenant.membership.revoked', 'tenant.api_organization_invite.upserted', 'tenant.api_organization_invite.deleted', 'tenant.chatgpt_workspace_invite.upserted', 'tenant.membership.accepted', 'tenant.membership.declined', 'tenant.workspace_invite_email_settings.updated']] | Omitr4   ú
int | Omitr5   r6   r7   úbool | Omitr8   úHeaders | Noner9   úQuery | Noner:   úBody | Noner;   ú(float | httpx2.Timeout | None | NotGivenú0SyncConversationCursorPage[AuditLogListResponse]c               óÎ   — |                       dt          t                   t          ||||t	          |||||||||	|
dœ
t
          j        ¦  «        ddi¬¦  «        t          ¬¦  «        S ©az	  
        List user actions and configuration changes within this organization.

        Args:
          actor_emails: Return only events performed by users with these emails.

          actor_ids: Return only events performed by these actors. Can be a user ID, a service
              account ID, or an api key tracking ID.

          after: A cursor for use in pagination. `after` is an object ID that defines your place
              in the list. For instance, if you make a list request and receive 100 objects,
              ending with obj_foo, your subsequent call can include after=obj_foo in order to
              fetch the next page of the list.

          before: A cursor for use in pagination. `before` is an object ID that defines your place
              in the list. For instance, if you make a list request and receive 100 objects,
              starting with obj_foo, your subsequent call can include before=obj_foo in order
              to fetch the previous page of the list.

          effective_at: Return only events whose `effective_at` (Unix seconds) is in this range.

          event_types: Return only events with a `type` in one of these values. For example,
              `project.created`. For all options, see the documentation for the
              [audit log object](https://platform.openai.com/docs/api-reference/audit-logs/object).

          limit: A limit on the number of objects to be returned. Limit can range between 1 and
              100, and the default is 20.

          project_ids: Return only events for these projects.

          resource_ids: Return only events performed on these targets. For example, a project ID
              updated. For ChatGPT connector role events, use the workspace connector resource
              ID shown in `details.id`, such as `<workspace_id>__<connector_id>`.

          tenant_only: Return only tenant-scoped events associated with this organization. Required for
              tenant-scoped events such as `role.bound_to_resource` and
              `role.unbound_from_resource`. When `true`, all supplied event types must be
              tenant-scoped.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        z/organization/audit_logs)
r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   Úadmin_api_key_authT)r8   r9   r:   r;   ÚqueryÚsecurity)ÚpageÚoptionsÚmodel)Ú_get_api_listr   r   r   r   r   ÚAuditLogListParams©r%   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   s                  r&   ÚlistzAuditLogs.list.   s˜   € ðp ×!Ò!Ø&Ý+Õ,@ÔAÝ(Ø+Ø'Ø%ØÝ%à(4Ø%.Ø!&Ø"(Ø(4Ø'2Ø!&Ø'2Ø(4Ø'2ðð õ *Ô<ñô ð /°Ð5ð)ñ ô õ, 'ð3 "ñ 
ô 
ð 	
r(   )r    r!   )r    r)   )r.   r<   r/   r<   r0   r=   r1   r=   r2   r>   r3   r?   r4   r@   r5   r<   r6   r<   r7   rA   r8   rB   r9   rC   r:   rD   r;   rE   r    rF   ©
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r'   r,   r   r   rR   © r(   r&   r   r      s°   € € € € € ØOÐOàð.ð .ð .ñ „_ð.ð ð4ð 4ð 4ñ „_ð4ð 48Ø04Ø Ø!ØAEðl Ø Ø26Ø37Ø#'ð )-Ø$(Ø"&Ø<EðOr
ð r
ð r
ð r
ð r
ð r
ð r
ð r
r(   c                  ój   — e Zd ZdZed#d„¦   «         Zed$d„¦   «         Zeeeeeeeeeedddedœd%d"„Z	dS )&r   r   r    ÚAsyncAuditLogsWithRawResponsec                ó    — t          | ¦  «        S r#   )rZ   r$   s    r&   r'   z AsyncAuditLogs.with_raw_response&  s   € õ -¨TÑ2Ô2Ð2r(   Ú#AsyncAuditLogsWithStreamingResponsec                ó    — t          | ¦  «        S r+   )r\   r$   s    r&   r,   z&AsyncAuditLogs.with_streaming_response0  s   € õ 3°4Ñ8Ô8Ð8r(   Nr-   r.   r<   r/   r0   r=   r1   r2   r>   r3   r?   r4   r@   r5   r6   r7   rA   r8   rB   r9   rC   r:   rD   r;   rE   úWAsyncPaginator[AuditLogListResponse, AsyncConversationCursorPage[AuditLogListResponse]]c               óÎ   — |                       dt          t                   t          ||||t	          |||||||||	|
dœ
t
          j        ¦  «        ddi¬¦  «        t          ¬¦  «        S rH   )rO   r   r   r   r   r   rP   rQ   s                  r&   rR   zAsyncAuditLogs.list9  s˜   € ðp ×!Ò!Ø&Ý,Õ-AÔBÝ(Ø+Ø'Ø%ØÝ%à(4Ø%.Ø!&Ø"(Ø(4Ø'2Ø!&Ø'2Ø(4Ø'2ðð õ *Ô<ñô ð /°Ð5ð)ñ ô õ, 'ð3 "ñ 
ô 
ð 	
r(   )r    rZ   )r    r\   )r.   r<   r/   r<   r0   r=   r1   r=   r2   r>   r3   r?   r4   r@   r5   r<   r6   r<   r7   rA   r8   rB   r9   rC   r:   rD   r;   rE   r    r^   rS   rX   r(   r&   r   r   #  s°   € € € € € ØOÐOàð3ð 3ð 3ñ „_ð3ð ð9ð 9ð 9ñ „_ð9ð 48Ø04Ø Ø!ØAEðl Ø Ø26Ø37Ø#'ð )-Ø$(Ø"&Ø<EðOr
ð r
ð r
ð r
ð r
ð r
ð r
ð r
r(   c                  ó   — e Zd Zdd„ZdS )r!   Ú
audit_logsr   r    ÚNonec                óP   — || _         t          j        |j        ¦  «        | _        d S ©N)Ú_audit_logsr   Úto_raw_response_wrapperrR   ©r%   ra   s     r&   Ú__init__z!AuditLogsWithRawResponse.__init__/  s'   € Ø%ˆÔå$Ô<ØŒOñ
ô 
ˆŒ	ˆ	ˆ	r(   N©ra   r   r    rb   ©rT   rU   rV   rh   rX   r(   r&   r!   r!   .  ó(   € € € € € ð
ð 
ð 
ð 
ð 
ð 
r(   r!   c                  ó   — e Zd Zdd„ZdS )rZ   ra   r   r    rb   c                óP   — || _         t          j        |j        ¦  «        | _        d S rd   )re   r   Úasync_to_raw_response_wrapperrR   rg   s     r&   rh   z&AsyncAuditLogsWithRawResponse.__init__8  s'   € Ø%ˆÔå$ÔBØŒOñ
ô 
ˆŒ	ˆ	ˆ	r(   N©ra   r   r    rb   rj   rX   r(   r&   rZ   rZ   7  rk   r(   rZ   c                  ó   — e Zd Zdd„ZdS )r)   ra   r   r    rb   c                óF   — || _         t          |j        ¦  «        | _        d S rd   )re   r   rR   rg   s     r&   rh   z'AuditLogsWithStreamingResponse.__init__A  s$   € Ø%ˆÔå0ØŒOñ
ô 
ˆŒ	ˆ	ˆ	r(   Nri   rj   rX   r(   r&   r)   r)   @  rk   r(   r)   c                  ó   — e Zd Zdd„ZdS )r\   ra   r   r    rb   c                óF   — || _         t          |j        ¦  «        | _        d S rd   )re   r   rR   rg   s     r&   rh   z,AsyncAuditLogsWithStreamingResponse.__init__J  s$   € Ø%ˆÔå6ØŒOñ
ô 
ˆŒ	ˆ	ˆ	r(   Nro   rj   rX   r(   r&   r\   r\   I  rk   r(   r\   )-Ú
__future__r   Útypingr   Útyping_extensionsr   Úhttpx2Ú r   Ú_typesr   r	   r
   r   r   r   r   r   Ú_utilsr   Ú_compatr   Ú	_resourcer   r   Ú	_responser   r   Ú
paginationr   r   Ú_base_clientr   r   Útypes.admin.organizationr   Ú0types.admin.organization.audit_log_list_responser   Ú__all__r   r   r!   rZ   r)   r\   rX   r(   r&   ú<module>rƒ      sX  ðð #Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ð Ð Ø %Ð %Ð %Ð %Ð %Ð %à €€€à !Ð !Ð !Ð !Ð !Ð !Ø \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ø &Ð &Ð &Ð &Ð &Ð &Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ø ZÐ ZÐ ZÐ ZÐ ZÐ ZÐ ZÐ ZØ RÐ RÐ RÐ RÐ RÐ RÐ RÐ RØ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AØ >Ð >Ð >Ð >Ð >Ð >Ø UÐ UÐ UÐ UÐ UÐ UàÐ(Ð
)€ðH
ð H
ð H
ð H
ð H
�ñ H
ô H
ð H
ðVH
ð H
ð H
ð H
ð H
Ð%ñ H
ô H
ð H
ðV
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð 
ð 
r(   