> ## Documentation Index
> Fetch the complete documentation index at: https://docs.erna.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ShiftPattern

Assignable shift option resolved at day level.

A shift pattern is a template that repeats across scheduling days. The solver
may assign eligible members to the full pattern window when doing so helps
satisfy coverage requirements and rules.

## Properties

<ResponseField name="dayOfWeek" type="dayOfWeek?: readonly [DayOfWeek, DayOfWeek]">
  Restricts which days of the week this shift pattern can be used.

  * If omitted: shift can be used on any day
  * If provided: shift can only be assigned on the specified days

  ```typescript theme={null}
  // Saturday-only short shift
  { id: "saturday_shift", startTime: t(9), endTime: t(14), dayOfWeek: ["saturday"] }

  // Weekday-only full shift
  { id: "full_shift", startTime: t(9), endTime: t(18), dayOfWeek: ["monday", "tuesday", "wednesday", "thursday", "friday"] }
  ```
</ResponseField>

<ResponseField name="endTime" type="TimeOfDay" required>
  When the shift ends (e.g., `{ hours: 17, minutes: 30 }` for 5:30 PM)
</ResponseField>

<ResponseField name="id" type="string" required>
  Unique identifier for this shift pattern.
  Used in assignments and rule configurations.
</ResponseField>

<ResponseField name="locationId" type="locationId?: string">
  Physical location where this shift takes place.
  Used for multi-location scheduling and location-based constraints.
</ResponseField>

<ResponseField name="roleIds" type="roleIds?: [string, ...string[]]">
  Restricts who can be assigned to this shift based on their role IDs.

  * If omitted: anyone can work this shift
  * If provided: only team members whose roles overlap with this list can be assigned

  Most venues have the same shifts for everyone and don't need this.
  Use it when different roles have different schedules (e.g., kitchen staff starts
  earlier than floor staff).
</ResponseField>

<ResponseField name="startTime" type="TimeOfDay" required>
  When the shift starts (e.g., `{ hours: 9, minutes: 0 }` for 9:00 AM)
</ResponseField>
