"""SOAP schema constants for the Ross1000 Regione Liguria integration.

Centralises all namespace URIs, endpoint URLs, and WSDL operation names
used by the Ross1000 SOAP layer.  Import from here rather than hard-coding
strings in envelope_builder.py or payload_builder.py.

Reference:
    https://turismows.regione.liguria.it/ws/checkinV2?wsdl
"""

from __future__ import annotations

from typing import Final

# ── SOAP 1.1 standard namespaces ─────────────────────────────────────────────

SOAP_ENV_NS: Final[str] = "http://schemas.xmlsoap.org/soap/envelope/"
SOAP_ENC_NS: Final[str] = "http://schemas.xmlsoap.org/soap/encoding/"

# ── WS-Security namespace ─────────────────────────────────────────────────────

WS_SECURITY_NS: Final[str] = (
    "http://docs.oasis-open.org/wss/2004/01/"
    "oasis-200401-wss-wssecurity-secext-1.0.xsd"
)

# ── Regione Liguria Ross1000 namespace (from WSDL) ───────────────────────────

ROSS1000_NS: Final[str] = "http://turismows.regione.liguria.it/ws/checkinV2"

# ── Endpoint URL ──────────────────────────────────────────────────────────────

ROSS1000_ENDPOINT_URL: Final[str] = (
    "https://turismows.regione.liguria.it/ws/checkinV2"
)

ROSS1000_WSDL_URL: Final[str] = (
    "https://turismows.regione.liguria.it/ws/checkinV2?wsdl"
)

# ── WSDL operation names ──────────────────────────────────────────────────────

OPERATION_INVIA_MOVIMENTI: Final[str] = "inviaMovimenti"

# ── Content-Type headers ──────────────────────────────────────────────────────

SOAP_CONTENT_TYPE: Final[str] = "text/xml; charset=utf-8"
XML_CONTENT_TYPE: Final[str] = "application/xml; charset=utf-8"

# ── SOAPAction header value (required by SOAP 1.1 endpoints) ─────────────────
# The exact value must be confirmed against the WSDL before live transmission.

SOAP_ACTION_INVIA_MOVIMENTI: Final[str] = (
    f"{ROSS1000_NS}/{OPERATION_INVIA_MOVIMENTI}"
)
