# GetShiftSchedule

## Overview

getShiftSchedule retrieves a single shift schedule period by id, in any status. It is the lookup behind the shift schedule header view and behind any flow that has to know whether a period is still `DRAFT` (editable) or already `CONFIRMED` (committed to workers).

## Business Rules

- Accepts a `shiftScheduleId` as input
- Returns the ShiftSchedule record — `startDate`, `endDate`, `status`, `confirmedAt` — for either status
- Does not filter by status; a caller that wants only committed periods reads `status` off the returned record
- Does not return the period's shifts; those are read with `listShifts` / `listPublishedShifts`

## Process Flow

```mermaid
flowchart TD
    A[Receive shiftScheduleId] --> B[Look up ShiftSchedule by id]
    B --> C{Found?}
    C -->|No| D[Return error: SHIFT_SCHEDULE_NOT_FOUND]
    C -->|Yes| E[Return shiftSchedule]
```

## External Dependencies

None.

## Error Scenarios

- **SHIFT_SCHEDULE_NOT_FOUND**: no ShiftSchedule exists for the given id

## Test Cases

- returns the ShiftSchedule for a given id regardless of status
- returns confirmedAt null for a DRAFT shiftSchedule
- throws SHIFT_SCHEDULE_NOT_FOUND for an unknown id
