cadrumo.application.live.iva_remote_state module¶
Application orchestration for read-only live IVA remote state.
- list_iva_compensation_history(*, ports, as_of_year=None)[source]¶
List profile-local IVA history through the entrypoint-composed port.
- Return type:
- Parameters:
ports (IvaRemoteStatePort)
as_of_year (int | None)
- async capture_iva_compensation_history(*, ports, year_from, year_to, output_root)[source]¶
Capture filed Modelo 303 history using the composed remote-state port.
- Return type:
- Parameters:
ports (IvaRemoteStatePort)
year_from (int)
year_to (int)
output_root (Path)
- async capture_iva_compensation_wallet(*, ports, target_year, target_period, taxpayer_nif=None, output_root=None)[source]¶
Live-fetch AEAT’s IVA wallet using the entrypoint-composed port.
- Return type:
- Parameters:
ports (IvaRemoteStatePort)
target_year (int)
target_period (Period)
taxpayer_nif (str | None)
output_root (Path | None)
- async capture_iva_remote_state(*, ports, year_from, year_to, target_year, target_period, taxpayer_nif=None, output_root=None)[source]¶
Acquire filed-history and wallet state, retaining independent outcomes.
- Return type:
- Parameters:
- filed_history_surface_timeout_ms(settings, *, year_from, year_to)[source]¶
Return the timeout budget for the requested filed-history year span.
- async await_live_iva_surface(awaitable, *, surface, timeout_ms, progress_context=None)[source]¶
Await one live IVA surface operation within its timeout budget.
- suppress_live_iva_playwright_cancellation_noise(*, drain_ms=0, restore_on_exit=True)[source]¶
Temporarily suppress expected Playwright target-closed cancellation noise.
- build_iva_remote_state_acquisition_report(*, output_root, year_from, year_to, target_year, target_period, acquisition_manifest_id=None, auth_result=None, auth_error=None, filed_history=None, wallet=None, filed_history_error=None, wallet_error=None)[source]¶
Build an acquisition report from authentication and surface outcomes.
- Return type:
- Parameters:
output_root (Path)
year_from (int)
year_to (int)
target_year (int)
target_period (Period)
acquisition_manifest_id (str | None)
auth_result (AuthenticatedAeatSessionResult | None)
auth_error (BaseException | None)
filed_history (IvaCompensationHistoryCaptureReport | None)
wallet (IvaWalletCaptureReport | None)
filed_history_error (BaseException | None)
wallet_error (BaseException | None)
- persist_iva_remote_state_acquisition_report(report, *, ports, captured_at=None)[source]¶
Persist an acquisition report and return its manifest.
- Return type:
- Parameters:
report (IvaRemoteStateAcquisitionReport)
ports (IvaRemoteStatePort)
captured_at (datetime | None)