from __future__ import annotations

from typing_extensions import TypedDict

from .common import TransactionStatus, TransactionType


class Transaction(TypedDict):
    transaction_id: str
    tenant_id: str
    type: TransactionType
    status: TransactionStatus
    amount: float
    currency: str
    phone_number: str
    channel_id: str | None
    external_reference: str | None
    customer_name: str | None
    callback_url: str | None
    provider: str
    provider_request_id: str | None
    provider_checkout_id: str | None
    result_code: str | None
    result_desc: str | None
    created_at: str
    updated_at: str


class TransactionListResponse(TypedDict):
    items: list[Transaction]
    next_cursor: str | None
