docs(api): document booking window meta and month-availability endpoint
- appointment-settings.md: weekly-schedule meta (online_booking_enabled, booking_window value/unit), defaults, and the slot-gating behavior. - appointment.md: new public month-availability endpoint (Gregorian year/month, disabled/enabled dates) and the empty-slots conditions for appointment-slots. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -77,6 +77,27 @@ Create or update the weekly schedule for a doctor (upsert).
|
||||
| `doctor_uuid` | string (UUID) | ✅ | Doctor UUID |
|
||||
| `schedule` | object | ✅ | Keys `"0"` through `"6"` (day indices) |
|
||||
| `schedule.{n}.sessions` | array | ✅ | Array of session config objects |
|
||||
| `meta` | object | ❌ | Online-booking settings (see below) |
|
||||
|
||||
**Online-booking `meta` object:**
|
||||
|
||||
```json
|
||||
{
|
||||
"meta": {
|
||||
"online_booking_enabled": true,
|
||||
"booking_window_value": 2,
|
||||
"booking_window_unit": "month"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `online_booking_enabled` | boolean | ❌ | `false` = no online booking; the public slot/month endpoints return no availability |
|
||||
| `booking_window_value` | integer | ❌ | How far ahead patients may book (≥ 1) |
|
||||
| `booking_window_unit` | string | ❌ | `"week"` or `"month"` |
|
||||
|
||||
> Defaults when `meta` is absent: `{ online_booking_enabled: true, booking_window_value: 1, booking_window_unit: "month" }`. `meta` is stored inside the schedule `setting` JSON (no DB migration) and is **preserved** when only `schedule` is sent. `SlotCalculatorService` rejects any date in the past, beyond `today + value unit`, or when online booking is disabled — for the weekly schedule, date overrides, and `appointment-slots` alike.
|
||||
|
||||
**Session Config Object:**
|
||||
|
||||
@@ -111,6 +132,11 @@ Create or update the weekly schedule for a doctor (upsert).
|
||||
"5": { "sessions": [] },
|
||||
"6": { "sessions": [] }
|
||||
},
|
||||
"meta": {
|
||||
"online_booking_enabled": true,
|
||||
"booking_window_value": 1,
|
||||
"booking_window_unit": "month"
|
||||
},
|
||||
"created_at": 1717000000,
|
||||
"updated_at": 1717000000
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user