"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .errorresponse import ErrorResponse, ErrorResponseTypedDict
from .shipmentcancellation import ShipmentCancellation, ShipmentCancellationTypedDict
from postivo_client.types import BaseModel
from postivo_client.utils import FieldMetadata, PathParamMetadata
from typing import Dict, List, Union
from typing_extensions import Annotated, TypeAliasType, TypedDict


class CancelShipmentRequestTypedDict(TypedDict):
    ids: List[str]
    r"""Shipment IDs assigned by the system (comma-separated). The system accepts a maximum of **50** identifiers per call."""


class CancelShipmentRequest(BaseModel):
    ids: Annotated[
        List[str], FieldMetadata(path=PathParamMetadata(style="simple", explode=True))
    ]
    r"""Shipment IDs assigned by the system (comma-separated). The system accepts a maximum of **50** identifiers per call."""


CancelShipmentResponseResultTypedDict = TypeAliasType(
    "CancelShipmentResponseResultTypedDict",
    Union[ErrorResponseTypedDict, List[ShipmentCancellationTypedDict]],
)


CancelShipmentResponseResult = TypeAliasType(
    "CancelShipmentResponseResult", Union[ErrorResponse, List[ShipmentCancellation]]
)


class CancelShipmentResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: CancelShipmentResponseResultTypedDict


class CancelShipmentResponse(BaseModel):
    headers: Dict[str, List[str]]

    result: CancelShipmentResponseResult
