o
    ùT·jh#  ã                   @  s8  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 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„ 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ƒZ-dS )é    )Úannotations)ÚAnyÚcast)ÚLiteralNé   )Ú_legacy_response)ÚBodyÚOmitÚQueryÚHeadersÚNotGivenÚomitÚ	not_given)Úpath_templateÚmaybe_transform)Úcached_property)ÚSyncAPIResourceÚAsyncAPIResource)Úto_streamed_response_wrapperÚ"async_to_streamed_response_wrapper)ÚSyncCursorPageÚAsyncCursorPage)ÚAsyncPaginatorÚmake_request_options)ÚAgentSessionItem)Úitem_list_paramsÚItemsÚ
AsyncItemsc                   @  óD   e Zd Zeddd„ƒZeddd„ƒZeeeddded	œd dd„ZdS )!r   ÚreturnÚItemsWithRawResponsec                 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%   úx/home/dinkstrade/pdmp-scanner/venv/lib/python3.10/site-packages/openai/resources/beta/agents/sessions/subagents/items.pyÚwith_raw_response   ó   zItems.with_raw_responseÚItemsWithStreamingResponsec                 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Items.with_streaming_responseN©ÚafterÚlimitÚorderÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutÚsubagent_idÚstrÚ
session_idr.   ú
str | Omitr/   ú
int | Omitr0   úLiteral['asc', 'desc'] | Omitr1   úHeaders | Noner2   úQuery | Noner3   úBody | Noner4   ú(float | httpx2.Timeout | None | NotGivenú SyncCursorPage[AgentSessionItem]c          
      C  ó~   |s	t d|›�ƒ‚|st d|›�ƒ‚ddi|pi ¥}| jtd||d�tt t||||	t|||dœtjƒdd	id
�t	t
tƒd�S ©aU  Lists this subagent's own items across all of its turns.

        See
        [subagent workflows](https://developers.openai.com/api/docs/guides/agents-api/multi-agent).

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

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

          order: The order in which resources are returned. Defaults to `desc`.

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

          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
        z9Expected a non-empty value for `session_id` but received z:Expected a non-empty value for `subagent_id` but received zOpenAI-Betaz	agents=v1z;/agents/sessions/{session_id}/subagents/{subagent_id}/items)r7   r5   )r.   r/   r0   Úbearer_authT)r1   r2   r3   r4   ÚqueryÚsecurity)ÚpageÚoptionsÚmodel)Ú
ValueErrorÚ_get_api_listr   r   r   r   r   r   ÚItemListParamsr   r   ©
r$   r5   r7   r.   r/   r0   r1   r2   r3   r4   r%   r%   r&   Úlist,   ó8   &ýýúóêz
Items.list)r   r    )r   r)   )r5   r6   r7   r6   r.   r8   r/   r9   r0   r:   r1   r;   r2   r<   r3   r=   r4   r>   r   r?   ©	Ú__name__Ú
__module__Ú__qualname__r   r'   r+   r   r   rL   r%   r%   r%   r&   r      ó    	óc                   @  r   )!r   r   ÚAsyncItemsWithRawResponsec                 C  r!   r"   )rS   r#   r%   r%   r&   r'   r   r(   zAsyncItems.with_raw_responseÚAsyncItemsWithStreamingResponsec                 C  r!   r*   )rT   r#   r%   r%   r&   r+   |   r,   z"AsyncItems.with_streaming_responseNr-   r5   r6   r7   r.   r8   r/   r9   r0   r:   r1   r;   r2   r<   r3   r=   r4   r>   úCAsyncPaginator[AgentSessionItem, AsyncCursorPage[AgentSessionItem]]c          
      C  r@   rA   )rH   rI   r   r   r   r   r   r   rJ   r   r   rK   r%   r%   r&   rL   …   rM   zAsyncItems.list)r   rS   )r   rT   )r5   r6   r7   r6   r.   r8   r/   r9   r0   r:   r1   r;   r2   r<   r3   r=   r4   r>   r   rU   rN   r%   r%   r%   r&   r   q   rR   c                   @  ó   e Zd Zddd„ZdS )	r    Úitemsr   r   ÚNonec                 C  ó   || _ t |j¡| _d S ©N)Ú_itemsr   Úto_raw_response_wrapperrL   ©r$   rW   r%   r%   r&   Ú__init__Ë   ó   
ÿzItemsWithRawResponse.__init__N©rW   r   r   rX   ©rO   rP   rQ   r^   r%   r%   r%   r&   r    Ê   ó    r    c                   @  rV   )	rS   rW   r   r   rX   c                 C  rY   rZ   )r[   r   Úasync_to_raw_response_wrapperrL   r]   r%   r%   r&   r^   Ô   r_   z"AsyncItemsWithRawResponse.__init__N©rW   r   r   rX   ra   r%   r%   r%   r&   rS   Ó   rb   rS   c                   @  rV   )	r)   rW   r   r   rX   c                 C  ó   || _ t|jƒ| _d S rZ   )r[   r   rL   r]   r%   r%   r&   r^   Ý   ó   
ÿz#ItemsWithStreamingResponse.__init__Nr`   ra   r%   r%   r%   r&   r)   Ü   rb   r)   c                   @  rV   )	rT   rW   r   r   rX   c                 C  re   rZ   )r[   r   rL   r]   r%   r%   r&   r^   æ   rf   z(AsyncItemsWithStreamingResponse.__init__Nrd   ra   r%   r%   r%   r&   rT   å   rb   rT   ).Ú
__future__r   Útypingr   r   Útyping_extensionsr   Úhttpx2Ú r   Ú_typesr   r	   r
   r   r   r   r   Ú_utilsr   r   Ú_compatr   Ú	_resourcer   r   Ú	_responser   r   Ú
paginationr   r   Ú_base_clientr   r   Útypes.beta.agent_session_itemr   Ú$types.beta.agents.sessions.subagentsr   Ú__all__r   r   r    rS   r)   rT   r%   r%   r%   r&   Ú<module>   s*   $YY			