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

from __future__ import annotations
from .v3_workflows_listworkflowapiresponse import (
    V3WorkflowsListWorkflowAPIResponse,
    V3WorkflowsListWorkflowAPIResponseTypedDict,
)
from squadcast_sdk.types import BaseModel
from squadcast_sdk.utils import FieldMetadata, QueryParamMetadata
from typing import Callable, List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class WorkflowsListWorkflowsRequestTypedDict(TypedDict):
    owner_id: str
    page_size: NotRequired[int]
    page_number: NotRequired[int]
    search: NotRequired[str]
    event: NotRequired[List[str]]
    actions: NotRequired[List[str]]
    tags: NotRequired[List[str]]
    owner: NotRequired[List[str]]
    created_by: NotRequired[List[str]]
    updated_by: NotRequired[List[str]]
    enabled: NotRequired[str]


class WorkflowsListWorkflowsRequest(BaseModel):
    owner_id: Annotated[
        str, FieldMetadata(query=QueryParamMetadata(style="form", explode=False))
    ]

    page_size: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None

    page_number: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None

    search: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None

    event: Annotated[
        Optional[List[str]],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None

    actions: Annotated[
        Optional[List[str]],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None

    tags: Annotated[
        Optional[List[str]],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None

    owner: Annotated[
        Optional[List[str]],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None

    created_by: Annotated[
        Optional[List[str]],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None

    updated_by: Annotated[
        Optional[List[str]],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None

    enabled: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=False)),
    ] = None


class WorkflowsListWorkflowsResponseTypedDict(TypedDict):
    result: V3WorkflowsListWorkflowAPIResponseTypedDict


class WorkflowsListWorkflowsResponse(BaseModel):
    next: Callable[[], Optional[WorkflowsListWorkflowsResponse]]

    result: V3WorkflowsListWorkflowAPIResponse
