o
    ùT·j»F  ã                   @  sD  d dl mZ d dlmZ d dlmZ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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&m'Z' ddl(m)Z) ddgZ*G dd„ deƒZ+G dd„ deƒZ,G dd„ dƒZ-G dd„ dƒZ.G dd„ dƒZ/G dd„ dƒZ0dS )é    )Úannotations)ÚOptional)ÚLiteralÚoverloadNé   )Ú_legacy_response)ÚBodyÚOmitÚQueryÚHeadersÚNotGivenÚomitÚ	not_given)Úpath_templateÚrequired_argsÚmaybe_transformÚasync_maybe_transform)Úcached_property)ÚSyncAPIResourceÚAsyncAPIResource)Úto_streamed_response_wrapperÚ"async_to_streamed_response_wrapper)ÚSyncTokenPageÚAsyncTokenPage)ÚAsyncPaginatorÚmake_request_options)Úfile_list_paramsÚfile_create_params)ÚEnvironmentFileÚFilesÚ
AsyncFilesc                	   @  ó¦   e Zd Zed.dd„ƒZed/dd„ƒZeddded	œd0dd„ƒZeddded	œd1dd„ƒZe	g d¢g d¢ƒe
e
ddded œd2d#d„ƒZe
e
e
e
ddded$œd3d,d-„ZdS )4r   ÚreturnÚFilesWithRawResponsec                 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
        )r#   ©Úself© r(   úr/home/dinkstrade/pdmp-scanner/venv/lib/python3.10/site-packages/openai/resources/beta/agents/environments/files.pyÚwith_raw_response   ó   zFiles.with_raw_responseÚFilesWithStreamingResponsec                 C  r$   ©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&   r(   r(   r)   Úwith_streaming_response#   ó   zFiles.with_streaming_responseN©Úextra_headersÚextra_queryÚ
extra_bodyÚtimeoutÚenvironment_idÚstrÚfile_idÚpathÚtypeúLiteral['file_id']r1   úHeaders | Noner2   úQuery | Noner3   úBody | Noner4   ú(float | httpx2.Timeout | None | NotGivenr   c          	      C  ó   dS ©a©  
        Copies inline bytes or a Files API file into a connected execution environment.
        See
        [environment files](https://developers.openai.com/api/docs/guides/agents-api/environments/files).

        Args:
          file_id: The ID of the uploaded file.

          path: The absolute destination path inside `/workspace`.

          type: The type of the object. Always `file_id`.

          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
        Nr(   ©	r'   r5   r7   r8   r9   r1   r2   r3   r4   r(   r(   r)   Úcreate,   ó   #zFiles.createÚdataúLiteral['inline']c          	      C  r?   ©a³  
        Copies inline bytes or a Files API file into a connected execution environment.
        See
        [environment files](https://developers.openai.com/api/docs/guides/agents-api/environments/files).

        Args:
          data: The standard-base64-encoded file contents.

          path: The absolute destination path inside `/workspace`.

          type: The type of the object. Always `inline`.

          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
        Nr(   ©	r'   r5   rD   r8   r9   r1   r2   r3   r4   r(   r(   r)   rB   Q   rC   ©r7   r8   r9   ©rD   r8   r9   ©r7   rD   r1   r2   r3   r4   ú
str | Omitú&Literal['file_id'] | Literal['inline']c          
   
   C  s`   |s	t d|›�ƒ‚ddi|pi ¥}| jtd|d�t||||dœtjƒt||||	ddid	�td
�S ©Nú=Expected a non-empty value for `environment_id` but received úOpenAI-Betaú	agents=v1ú+/agents/environments/{environment_id}/files©r5   )r7   r8   r9   rD   Úbearer_authT)r1   r2   r3   r4   Úsecurity)ÚbodyÚoptionsÚcast_to)Ú
ValueErrorÚ_postr   r   r   ÚFileCreateParamsr   r   ©
r'   r5   r7   r8   r9   rD   r1   r2   r3   r4   r(   r(   r)   rB   v   s,   
üù	ûî©ÚlimitÚorderÚpager8   r1   r2   r3   r4   r]   úOptional[int] | Omitr^   úLiteral['asc', 'desc'] | Omitr_   úOptional[str] | OmitúSyncTokenPage[EnvironmentFile]c          
      C  óf   |s	t d|›�ƒ‚ddi|pi ¥}| jtd|d�tt t||||	t||||dœtjƒddid	�td
�S ©aè  
        Lists live files on a connected execution environment with optional directory
        filtering and opaque cursor pagination. See
        [environment files](https://developers.openai.com/api/docs/guides/agents-api/environments/files).

        Args:
          limit: The maximum number of files to return, between 1 and 100.

          order: Sort by case-sensitive path components. Defaults to descending.

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

          page: The opaque token from the previous page. Keep the same path, order, and limit.

          path: Restrict the listing to this absolute workspace directory.

          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
        rN   rO   rP   rQ   rR   )r]   r^   r_   r8   rS   T)r1   r2   r3   r4   ÚqueryrT   )r_   rV   Úmodel)	rX   Ú_get_api_listr   r   r   r   r   r   ÚFileListParams©
r'   r5   r]   r^   r_   r8   r1   r2   r3   r4   r(   r(   r)   Úlistž   ó.   (
üù	òíz
Files.list)r"   r#   )r"   r,   ©r5   r6   r7   r6   r8   r6   r9   r:   r1   r;   r2   r<   r3   r=   r4   r>   r"   r   ©r5   r6   rD   r6   r8   r6   r9   rE   r1   r;   r2   r<   r3   r=   r4   r>   r"   r   ©r5   r6   r7   rK   r8   r6   r9   rL   rD   rK   r1   r;   r2   r<   r3   r=   r4   r>   r"   r   )r5   r6   r]   r`   r^   ra   r_   rK   r8   rb   r1   r;   r2   r<   r3   r=   r4   r>   r"   rc   ©Ú__name__Ú
__module__Ú__qualname__r   r*   r.   r   r   rB   r   r   rk   r(   r(   r(   r)   r      óD    	
ô$
ô$ó+óc                	   @  r!   )4r    r"   ÚAsyncFilesWithRawResponsec                 C  r$   r%   )ru   r&   r(   r(   r)   r*   á   r+   zAsyncFiles.with_raw_responseÚAsyncFilesWithStreamingResponsec                 C  r$   r-   )rv   r&   r(   r(   r)   r.   ë   r/   z"AsyncFiles.with_streaming_responseNr0   r5   r6   r7   r8   r9   r:   r1   r;   r2   r<   r3   r=   r4   r>   r   c          	      Ã  ó   �dS r@   r(   rA   r(   r(   r)   rB   ô   ó   €#zAsyncFiles.createrD   rE   c          	      Ã  rw   rF   r(   rG   r(   r(   r)   rB     rx   rH   rI   rJ   rK   rL   c          
   
   Ã  sn   �|s
t d|›�ƒ‚ddi|pi ¥}| jtd|d�t||||dœtjƒI d H t||||	ddid	�td
�I d H S rM   )rX   rY   r   r   r   rZ   r   r   r[   r(   r(   r)   rB   >  s.   €
üù	ûîr\   r]   r`   r^   ra   r_   rb   ú@AsyncPaginator[EnvironmentFile, AsyncTokenPage[EnvironmentFile]]c          
      C  rd   re   )	rX   rh   r   r   r   r   r   r   ri   rj   r(   r(   r)   rk   f  rl   zAsyncFiles.list)r"   ru   )r"   rv   rm   rn   ro   )r5   r6   r]   r`   r^   ra   r_   rK   r8   rb   r1   r;   r2   r<   r3   r=   r4   r>   r"   ry   rp   r(   r(   r(   r)   r    à   rt   c                   @  ó   e Zd Zddd„ZdS )	r#   Úfilesr   r"   ÚNonec                 C  ó&   || _ t |j¡| _t |j¡| _d S ©N)Ú_filesr   Úto_raw_response_wrapperrB   rk   ©r'   r{   r(   r(   r)   Ú__init__©  ó   ÿ
ÿzFilesWithRawResponse.__init__N©r{   r   r"   r|   ©rq   rr   rs   r‚   r(   r(   r(   r)   r#   ¨  ó    r#   c                   @  rz   )	ru   r{   r    r"   r|   c                 C  r}   r~   )r   r   Úasync_to_raw_response_wrapperrB   rk   r�   r(   r(   r)   r‚   µ  rƒ   z"AsyncFilesWithRawResponse.__init__N©r{   r    r"   r|   r…   r(   r(   r(   r)   ru   ´  r†   ru   c                   @  rz   )	r,   r{   r   r"   r|   c                 C  ó"   || _ t|jƒ| _t|jƒ| _d S r~   )r   r   rB   rk   r�   r(   r(   r)   r‚   Á  ó   ÿ
ÿz#FilesWithStreamingResponse.__init__Nr„   r…   r(   r(   r(   r)   r,   À  r†   r,   c                   @  rz   )	rv   r{   r    r"   r|   c                 C  r‰   r~   )r   r   rB   rk   r�   r(   r(   r)   r‚   Í  rŠ   z(AsyncFilesWithStreamingResponse.__init__Nrˆ   r…   r(   r(   r(   r)   rv   Ì  r†   rv   )1Ú
__future__r   Útypingr   Útyping_extensionsr   r   Úhttpx2Ú r   Ú_typesr   r	   r
   r   r   r   r   Ú_utilsr   r   r   r   Ú_compatr   Ú	_resourcer   r   Ú	_responser   r   Ú
paginationr   r   Ú_base_clientr   r   Útypes.beta.agents.environmentsr   r   Ú/types.beta.agents.environments.environment_filer   Ú__all__r   r    r#   ru   r,   rv   r(   r(   r(   r)   Ú<module>   s.   $ I I