Operations Docs

Calendar Page API v1

/operations/calendar-page-api-v1

Calendar Page API v1

Calendar Page API v1 makes the Flutter calendar screen independent of Firestore Cloud Functions for the day-to-day page contract.

Endpoints

  • GET /api/families/:familyId/calendar/overview

    • Query: from, to, upcomingLimit, limit, today=YYYY-MM-DD
    • Response: { events, taskSummary, generatedAt }
    • events is the same CalendarEvent JSON shape used by /calendar/events.
    • taskSummary counts eventType == "task" into total, open, completed, overdue, dueToday, and upcomingOpen.
  • PATCH /api/families/:familyId/calendar/events/:eventId

    • Body: { title, startAt, endAt, allDay, eventType }
    • Replaces editable fields only. Source-chat provenance, creator, and module linkage stay immutable in v1.
  • DELETE /api/families/:familyId/calendar/events/:eventId

    • Soft-deletes the event by setting deleted_at; listings exclude it.
  • PATCH /api/families/:familyId/calendar/events/:eventId/completion

    • Body: { completed: boolean }
    • Sets or clears completedAt / completedBy. Non-task events are tolerated for parity with the legacy setCalendarEventCompleted Cloud Function.

Flutter bridge

EngineCalendarRepository.eventsStream reads calendar/overview and parses its events array. setEventCompleted calls the completion endpoint and refreshes active calendar polling streams immediately.

SDK assets

Static SDK files

JavaScript runtime and TypeScript definitions are served from this docs app.
membloc-sdk.jsmembloc-sdk.d.ts