§
    .À¶j©  ã                  ób   — d Z ddlmZ ddlmZmZmZ ddlmZ e G d„ de¦  «        ¦   «         Z	dS )a8  Domain Port for General Department of Taxation (GDT) E-Invoice Portal Gateway.

Compliant with Hexagonal Architecture / Clean Architecture (Rule 6).
The Application layer only depends on this Protocol contract; all network
operations (HTTP, TLS, Playwright) are implemented in Secondary Infrastructure Adapters.
é    )Úannotations)ÚAnyÚProtocolÚruntime_checkable)ÚUUIDc                  óF   — e Zd ZdZ	 ddd„Zdd„Z	 	 	 dd d„Zd!d„Zd"d„ZdS )#ÚGdtGatewayPortzTPort interface for GDT portal authentication, captcha solving, and invoice scraping.NÚtax_codeÚstrÚusernameÚpasswordÚextra_configúdict[str, Any] | NoneÚreturnúdict[str, Any]c                ó   — dS )z<Authenticate with GDT portal, solving captcha automatically.N© )Úselfr
   r   r   r   s        úHC:\Projects\DSCons\app\modules\invoices\domain\ports\gdt_gateway_port.pyÚauthenticate_portalz"GdtGatewayPort.authenticate_portal   s	   € ð 	ˆó    útuple[str, str]c                ó   — dS )zCFetch and solve GDT captcha returning (captcha_key, captcha_value).Nr   )r   s    r   Úsolve_captchazGdtGatewayPort.solve_captcha   s   € àˆr   ÚallÚ ÚtokenÚ	from_dateÚto_dateÚ	sync_typeú
str | NoneÚcookie_headerú%tuple[int, int, list[dict[str, Any]]]c                ó   — dS )z$Fetch invoice batch from GDT portal.Nr   )r   r   r   r   r    r
   r"   s          r   Úfetch_invoiceszGdtGatewayPort.fetch_invoices   s	   € ð 	ˆr   Ú
invoice_idÚinv_datac                ó   — dS )z7Fetch and persist line items from GDT portal on-demand.Nr   )r   r&   r'   s      r   Úenrich_invoice_detailz$GdtGatewayPort.enrich_invoice_detail+   s	   € ð 	ˆr   c                ó   — dS )z2Direct single invoice detail sync from GDT portal.Nr   )r   r&   s     r   Úsync_invoice_detailz"GdtGatewayPort.sync_invoice_detail3   s	   € ð
 	ˆr   )N)
r
   r   r   r   r   r   r   r   r   r   )r   r   )r   Nr   )r   r   r   r   r   r   r    r   r
   r!   r"   r   r   r#   )r&   r   r'   r   r   r   )r&   r   r   r   )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r%   r)   r+   r   r   r   r	   r	      s˜   € € € € € à^Ð^ð /3ðð ð ð ð ðð ð ð ð Ø#Øð
ð 
ð 
ð 
ð 
ðð ð ð ðð ð ð ð ð r   r	   N)
r/   Ú
__future__r   Útypingr   r   r   Úuuidr   r	   r   r   r   ú<module>r3      s”   ððð ð #Ð "Ð "Ð "Ð "Ð "à 3Ð 3Ð 3Ð 3Ð 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø Ð Ð Ð Ð Ð ð ð*ð *ð *ð *ð *�Xñ *ô *ñ Ôð*ð *ð *r   