o
    ùT·jßR  ã                   @  sx  d dl mZ d dlmZ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 ddlmZmZmZ dd	lmZ d
dlmZmZmZmZ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)m*Z* ddl+m,Z,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3 ddgZ4G dd„ de ƒZ5G dd„ de!ƒZ6G dd„ dƒZ7G dd„ dƒZ8G dd„ dƒZ9G dd„ dƒZ:dS ) é    )Úannotations)ÚDictÚOptional)ÚLiteralNé   )Ú_legacy_response)ÚBodyÚOmitÚQueryÚHeadersÚNotGivenÚomitÚ	not_given)Úpath_templateÚmaybe_transformÚasync_maybe_transform)Úcached_propertyé   )ÚCredentialsÚAsyncCredentialsÚCredentialsWithRawResponseÚAsyncCredentialsWithRawResponseÚ CredentialsWithStreamingResponseÚ%AsyncCredentialsWithStreamingResponse)ÚSyncAPIResourceÚAsyncAPIResource)Úto_streamed_response_wrapperÚ"async_to_streamed_response_wrapper)ÚSyncCursorPageÚAsyncCursorPage)ÚAsyncPaginatorÚmake_request_options)Úvault_list_paramsÚvault_create_params)ÚVault)ÚVaultDeleted)ÚVaultStatusFilterParamÚVaultsÚAsyncVaultsc                	   @  óš   e Zd Zed/dd„ƒZed0dd„ƒZed1d	d
„ƒZeedddedœd2dd„Z	dddedœd3dd „Z
eeeeddded!œd4d*d+„Zdddedœd5d-d.„ZdS )6r'   Úreturnr   c                 C  ó
   t | jƒS ©N)r   Ú_client©Úself© r0   úm/home/dinkstrade/pdmp-scanner/venv/lib/python3.10/site-packages/openai/resources/beta/agents/vaults/vaults.pyÚcredentials#   ó   
zVaults.credentialsÚVaultsWithRawResponsec                 C  ó   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
        )r4   r.   r0   r0   r1   Úwith_raw_response'   ó   zVaults.with_raw_responseÚVaultsWithStreamingResponsec                 C  r5   ©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
        )r9   r.   r0   r0   r1   Úwith_streaming_response1   ó   zVaults.with_streaming_responseN©ÚmetadataÚnameÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutr>   úOptional[Dict[str, str]] | Omitr?   ú
str | Omitr@   úHeaders | NonerA   úQuery | NonerB   úBody | NonerC   ú(float | httpx2.Timeout | None | NotGivenr$   c             
   C  sB   ddi|pi ¥}| j dt||dœtjƒt||||ddid�td�S )	á¬  Creates a vault for the current project.

        See
        [vaults](https://developers.openai.com/api/docs/guides/agents-api/tools/vaults).

        Args:
          metadata: Key-value pairs to associate with the vault, such as an application or team
              identifier.

          name: The name is trimmed before storage. It must contain 1 to 256 UTF-8 bytes after
              trimming.

          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
        úOpenAI-Betaú	agents=v1ú/vaults©r>   r?   Úbearer_authT©r@   rA   rB   rC   Úsecurity©ÚbodyÚoptionsÚcast_to)Ú_postr   r#   ÚVaultCreateParamsr!   r$   ©r/   r>   r?   r@   rA   rB   rC   r0   r0   r1   Úcreate:   s$    þûûðzVaults.create©r@   rA   rB   rC   Úvault_idÚstrc             	   C  óL   |s	t d|›�ƒ‚ddi|pi ¥}| jtd|d�t||||ddid�td	�S )
á­  Retrieves a vault by its ID.

        See
        [vaults](https://developers.openai.com/api/docs/guides/agents-api/tools/vaults).

        Args:
          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
        ú7Expected a non-empty value for `vault_id` but received rK   rL   ú/vaults/{vault_id}©r[   rO   TrP   ©rT   rU   ©Ú
ValueErrorÚ_getr   r!   r$   ©r/   r[   r@   rA   rB   rC   r0   r0   r1   Úretrieven   ó   
û÷zVaults.retrieve©ÚafterÚlimitÚorderÚstatusr@   rA   rB   rC   rj   rk   úOptional[int] | Omitrl   úLiteral['asc', 'desc'] | Omitrm   úVaultStatusFilterParam | OmitúSyncCursorPage[Vault]c          	      C  óL   ddi|pi ¥}| j dtt t||||t||||dœtjƒddid�td�S ©	aM  Lists vaults using ID-based pagination.

        See
        [vaults](https://developers.openai.com/api/docs/guides/agents-api/tools/vaults).

        Args:
          after: Return resources after this resource ID in the selected order.

          limit: The maximum number of resources to return. Defaults to 20. Values are clamped
              between 1 and 100.

          order: Sort order by the `created_at` timestamp. Use `asc` for ascending order or
              `desc` for descending order. Defaults to `desc`.

              - `asc` - Returns resources in ascending order.
              - `desc` - Returns resources in descending order.

          status: Filter by one status or a list, such as `status=active` or
              `status[]=active&status[]=archived`. Both statuses are included by default.

          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
        rK   rL   rM   )rj   rk   rl   rm   rO   T)r@   rA   rB   rC   ÚqueryrQ   )ÚpagerT   Úmodel)Ú_get_api_listr   r$   r!   r   r"   ÚVaultListParams©	r/   rj   rk   rl   rm   r@   rA   rB   rC   r0   r0   r1   Úlist–   ó*   *üù	òízVaults.listr%   c             	   C  r]   )
á¹  Deletes a vault and all its credentials.

        See
        [vaults](https://developers.openai.com/api/docs/guides/agents-api/tools/vaults).

        Args:
          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
        r_   rK   rL   r`   ra   rO   TrP   rb   ©rd   Ú_deleter   r!   r%   rf   r0   r0   r1   Údelete×   rh   zVaults.delete)r*   r   )r*   r4   )r*   r9   ©r>   rD   r?   rE   r@   rF   rA   rG   rB   rH   rC   rI   r*   r$   ©r[   r\   r@   rF   rA   rG   rB   rH   rC   rI   r*   r$   )rj   rE   rk   rn   rl   ro   rm   rp   r@   rF   rA   rG   rB   rH   rC   rI   r*   rq   ©r[   r\   r@   rF   rA   rG   rB   rH   rC   rI   r*   r%   ©Ú__name__Ú
__module__Ú__qualname__r   r2   r7   r;   r   r   rY   rg   rz   r   r0   r0   r0   r1   r'   "   óB    	ö:÷+ôG÷c                	   @  r)   )6r(   r*   r   c                 C  r+   r,   )r   r-   r.   r0   r0   r1   r2     r3   zAsyncVaults.credentialsÚAsyncVaultsWithRawResponsec                 C  r5   r6   )rˆ   r.   r0   r0   r1   r7     r8   zAsyncVaults.with_raw_responseÚ AsyncVaultsWithStreamingResponsec                 C  r5   r:   )r‰   r.   r0   r0   r1   r;     r<   z#AsyncVaults.with_streaming_responseNr=   r>   rD   r?   rE   r@   rF   rA   rG   rB   rH   rC   rI   r$   c             
   Ã  sP   �ddi|pi ¥}| j dt||dœtjƒI dH t||||ddid�td	�I dH S )
rJ   rK   rL   rM   rN   NrO   TrP   rR   )rV   r   r#   rW   r!   r$   rX   r0   r0   r1   rY     s&   € þûûðzAsyncVaults.createrZ   r[   r\   c             	   Ã  óT   �|s
t d|›�ƒ‚ddi|pi ¥}| jtd|d�t||||ddid�td	�I d
H S )r^   r_   rK   rL   r`   ra   rO   TrP   rb   Nrc   rf   r0   r0   r1   rg   L  ó   €
û÷zAsyncVaults.retrieveri   rj   rk   rn   rl   ro   rm   rp   ú-AsyncPaginator[Vault, AsyncCursorPage[Vault]]c          	      C  rr   rs   )rw   r   r$   r!   r   r"   rx   ry   r0   r0   r1   rz   t  r{   zAsyncVaults.listr%   c             	   Ã  rŠ   )r|   r_   rK   rL   r`   ra   rO   TrP   rb   Nr}   rf   r0   r0   r1   r   µ  r‹   zAsyncVaults.delete)r*   r   )r*   rˆ   )r*   r‰   r€   r�   )rj   rE   rk   rn   rl   ro   rm   rp   r@   rF   rA   rG   rB   rH   rC   rI   r*   rŒ   r‚   rƒ   r0   r0   r0   r1   r(      r‡   c                   @  ó$   e Zd Zddd„Zeddd	„ƒZd
S )r4   Úvaultsr'   r*   ÚNonec                 C  óB   || _ t |j¡| _t |j¡| _t |j¡| _t |j¡| _d S r,   )Ú_vaultsr   Úto_raw_response_wrapperrY   rg   rz   r   ©r/   rŽ   r0   r0   r1   Ú__init__ß  ó   ÿÿÿ
ÿzVaultsWithRawResponse.__init__r   c                 C  ó   t | jjƒS r,   )r   r‘   r2   r.   r0   r0   r1   r2   ï  ó   z!VaultsWithRawResponse.credentialsN©rŽ   r'   r*   r�   )r*   r   ©r„   r…   r†   r”   r   r2   r0   r0   r0   r1   r4   Þ  ó    
r4   c                   @  r�   )rˆ   rŽ   r(   r*   r�   c                 C  r�   r,   )r‘   r   Úasync_to_raw_response_wrapperrY   rg   rz   r   r“   r0   r0   r1   r”   õ  r•   z#AsyncVaultsWithRawResponse.__init__r   c                 C  r–   r,   )r   r‘   r2   r.   r0   r0   r1   r2     r—   z&AsyncVaultsWithRawResponse.credentialsN©rŽ   r(   r*   r�   )r*   r   r™   r0   r0   r0   r1   rˆ   ô  rš   rˆ   c                   @  r�   )r9   rŽ   r'   r*   r�   c                 C  ó:   || _ t|jƒ| _t|jƒ| _t|jƒ| _t|jƒ| _d S r,   )r‘   r   rY   rg   rz   r   r“   r0   r0   r1   r”     ó   ÿÿÿ
ÿz$VaultsWithStreamingResponse.__init__r   c                 C  r–   r,   )r   r‘   r2   r.   r0   r0   r1   r2     r—   z'VaultsWithStreamingResponse.credentialsNr˜   )r*   r   r™   r0   r0   r0   r1   r9   
  rš   r9   c                   @  r�   )r‰   rŽ   r(   r*   r�   c                 C  r�   r,   )r‘   r   rY   rg   rz   r   r“   r0   r0   r1   r”   !  rž   z)AsyncVaultsWithStreamingResponse.__init__r   c                 C  r–   r,   )r   r‘   r2   r.   r0   r0   r1   r2   1  r—   z,AsyncVaultsWithStreamingResponse.credentialsNrœ   )r*   r   r™   r0   r0   r0   r1   r‰      rš   r‰   );Ú
__future__r   Útypingr   r   Útyping_extensionsr   Úhttpx2Ú r   Ú_typesr   r	   r
   r   r   r   r   Ú_utilsr   r   r   Ú_compatr   r2   r   r   r   r   r   r   Ú	_resourcer   r   Ú	_responser   r   Ú
paginationr   r   Ú_base_clientr    r!   Útypes.beta.agentsr"   r#   Útypes.beta.agents.vaultr$   Útypes.beta.agents.vault_deletedr%   Ú+types.beta.agents.vault_status_filter_paramr&   Ú__all__r'   r(   r4   rˆ   r9   r‰   r0   r0   r0   r1   Ú<module>   s4   $  _ _