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

from __future__ import annotations
from apideck_unify.types import BaseModel
from apideck_unify.utils import FieldMetadata
from datetime import datetime
from enum import Enum
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class ExpensesFilterStatus(str, Enum):
    DRAFT = "draft"
    PENDING_APPROVAL = "pending_approval"
    APPROVED = "approved"
    POSTED = "posted"
    VOIDED = "voided"
    REJECTED = "rejected"
    DELETED = "deleted"
    OTHER = "other"


class ExpensesFilterType(str, Enum):
    EXPENSE = "expense"
    REFUND = "refund"


class ExpensesFilterTypedDict(TypedDict):
    updated_since: NotRequired[datetime]
    status: NotRequired[ExpensesFilterStatus]
    type: NotRequired[ExpensesFilterType]


class ExpensesFilter(BaseModel):
    updated_since: Annotated[Optional[datetime], FieldMetadata(query=True)] = None

    status: Annotated[Optional[ExpensesFilterStatus], FieldMetadata(query=True)] = None

    type: Annotated[Optional[ExpensesFilterType], FieldMetadata(query=True)] = None
