# This file was auto-generated by Fern from our API Definition.

import typing_extensions
import typing_extensions
import typing
from .time_range import TimeRangeParams
from .scheduled_shift_workday import ScheduledShiftWorkdayParams
from ..types.scheduled_shift_filter_assignment_status import ScheduledShiftFilterAssignmentStatus
from ..types.scheduled_shift_filter_scheduled_shift_status import ScheduledShiftFilterScheduledShiftStatus


class ScheduledShiftFilterParams(typing_extensions.TypedDict):
    """
    Defines filter criteria for a [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts)
    request. Multiple filters in a query are combined as an `AND` operation.
    """

    location_ids: typing_extensions.NotRequired[typing.Optional[typing.Sequence[str]]]
    """
    Return shifts for the specified locations. When omitted, shifts for all
    locations are returned. If needed, call [ListLocations](api-endpoint:Locations-ListLocations)
    to get location IDs.
    """

    start: typing_extensions.NotRequired[TimeRangeParams]
    """
    Return shifts whose `start_at` time is within the specified
    time range (inclusive).
    """

    end: typing_extensions.NotRequired[TimeRangeParams]
    """
    Return shifts whose `end_at` time is within the specified
    time range (inclusive).
    """

    workday: typing_extensions.NotRequired[ScheduledShiftWorkdayParams]
    """
    Return shifts based on a workday date range.
    """

    team_member_ids: typing_extensions.NotRequired[typing.Optional[typing.Sequence[str]]]
    """
    Return shifts assigned to specified team members. If needed, call
    [SearchTeamMembers](api-endpoint:Team-SearchTeamMembers) to get team member IDs.
    
    To return only the shifts assigned to the specified team members, include the
    `assignment_status` filter in the query. Otherwise, all unassigned shifts are
    returned along with shifts assigned to the specified team members.
    """

    assignment_status: typing_extensions.NotRequired[ScheduledShiftFilterAssignmentStatus]
    """
    Return shifts based on whether a team member is assigned. A shift is
    assigned if the `team_member_id` field is populated in the `draft_shift_details`
    or `published_shift details` field of the shift.
    
    To return only draft or published shifts, include the `scheduled_shift_statuses`
    filter in the query.
    See [ScheduledShiftFilterAssignmentStatus](#type-scheduledshiftfilterassignmentstatus) for possible values
    """

    scheduled_shift_statuses: typing_extensions.NotRequired[
        typing.Optional[typing.Sequence[ScheduledShiftFilterScheduledShiftStatus]]
    ]
    """
    Return shifts based on the draft or published status of the shift.
    A shift is published if the `published_shift_details` field is present.
    
    Note that shifts with `draft_shift_details.is_deleted` set to `true` are ignored
    with the `DRAFT` filter.
    See [ScheduledShiftFilterScheduledShiftStatus](#type-scheduledshiftfilterscheduledshiftstatus) for possible values
    """
