@rokoyfa/calendar 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/LICENSE +21 -0
- package/README.md +159 -3
- package/api/openapi.yaml +919 -0
- package/dist-lib/cdn/calendar-widget.js +14 -0
- package/dist-lib/cdn/calendar-widget.js.map +1 -0
- package/dist-lib/cdn/de-BPZBZXaZ.js +2 -0
- package/dist-lib/cdn/de-BPZBZXaZ.js.map +1 -0
- package/dist-lib/cdn/es-DsIckdik.js +2 -0
- package/dist-lib/cdn/es-DsIckdik.js.map +1 -0
- package/dist-lib/cdn/fr-DWAs3O6J.js +2 -0
- package/dist-lib/cdn/fr-DWAs3O6J.js.map +1 -0
- package/dist-lib/cdn/it-CbhjxqIb.js +2 -0
- package/dist-lib/cdn/it-CbhjxqIb.js.map +1 -0
- package/dist-lib/cdn/nl-mjTHznX5.js +2 -0
- package/dist-lib/cdn/nl-mjTHznX5.js.map +1 -0
- package/dist-lib/cdn/pl-CXT0jb2D.js +2 -0
- package/dist-lib/cdn/pl-CXT0jb2D.js.map +1 -0
- package/dist-lib/cdn/pt-D0oXlVdU.js +2 -0
- package/dist-lib/cdn/pt-D0oXlVdU.js.map +1 -0
- package/dist-lib/npm/de-CCzGjeTd.js +573 -0
- package/dist-lib/npm/de-CCzGjeTd.js.map +1 -0
- package/dist-lib/npm/es-Ciaf66rH.js +559 -0
- package/dist-lib/npm/es-Ciaf66rH.js.map +1 -0
- package/dist-lib/npm/fr-CAqNm10Z.js +559 -0
- package/dist-lib/npm/fr-CAqNm10Z.js.map +1 -0
- package/dist-lib/npm/index.d.ts +1 -0
- package/dist-lib/npm/index.js +13277 -0
- package/dist-lib/npm/index.js.map +1 -0
- package/dist-lib/npm/it-Cqqdu2ua.js +565 -0
- package/dist-lib/npm/it-Cqqdu2ua.js.map +1 -0
- package/dist-lib/npm/nl-CkchSA8q.js +559 -0
- package/dist-lib/npm/nl-CkchSA8q.js.map +1 -0
- package/dist-lib/npm/pl-CCBDUr8k.js +565 -0
- package/dist-lib/npm/pl-CCBDUr8k.js.map +1 -0
- package/dist-lib/npm/pt-DucaCaoY.js +566 -0
- package/dist-lib/npm/pt-DucaCaoY.js.map +1 -0
- package/dist-lib/npm/types/components/Button.d.ts +17 -0
- package/dist-lib/npm/types/components/ChoiceChip.d.ts +13 -0
- package/dist-lib/npm/types/components/ConfirmModal.d.ts +11 -0
- package/dist-lib/npm/types/components/DateTimeField.d.ts +15 -0
- package/dist-lib/npm/types/components/Form.d.ts +8 -0
- package/dist-lib/npm/types/components/FormField.d.ts +10 -0
- package/dist-lib/npm/types/components/IconButton.d.ts +11 -0
- package/dist-lib/npm/types/components/Icons.d.ts +10 -0
- package/dist-lib/npm/types/components/Modal.d.ts +10 -0
- package/dist-lib/npm/types/components/NumberField.d.ts +12 -0
- package/dist-lib/npm/types/components/PageLayout.d.ts +13 -0
- package/dist-lib/npm/types/components/PageSection.d.ts +10 -0
- package/dist-lib/npm/types/components/PasswordField.d.ts +4 -0
- package/dist-lib/npm/types/components/SegmentedControl.d.ts +11 -0
- package/dist-lib/npm/types/components/SegmentedField.d.ts +11 -0
- package/dist-lib/npm/types/components/SelectField.d.ts +13 -0
- package/dist-lib/npm/types/components/StatusMessage.d.ts +13 -0
- package/dist-lib/npm/types/components/Stepper.d.ts +9 -0
- package/dist-lib/npm/types/components/Switch.d.ts +8 -0
- package/dist-lib/npm/types/components/Tabs.d.ts +14 -0
- package/dist-lib/npm/types/components/TeamsGate.d.ts +4 -0
- package/dist-lib/npm/types/components/TextField.d.ts +9 -0
- package/dist-lib/npm/types/config/calendars.d.ts +1 -0
- package/dist-lib/npm/types/config/routes.d.ts +18 -0
- package/dist-lib/npm/types/context/HostContext.d.ts +11 -0
- package/dist-lib/npm/types/context/RootElementContext.d.ts +2 -0
- package/dist-lib/npm/types/data/index.d.ts +4 -0
- package/dist-lib/npm/types/data/localDataSource.d.ts +3 -0
- package/dist-lib/npm/types/data/restDataSource.d.ts +11 -0
- package/dist-lib/npm/types/data/tenantDataSource.d.ts +10 -0
- package/dist-lib/npm/types/data/types.d.ts +21 -0
- package/dist-lib/npm/types/features/authorization/components/AccountMenu.d.ts +6 -0
- package/dist-lib/npm/types/features/authorization/components/AuthFields.d.ts +26 -0
- package/dist-lib/npm/types/features/authorization/components/AuthGate.d.ts +7 -0
- package/dist-lib/npm/types/features/authorization/components/ContinueLink.d.ts +1 -0
- package/dist-lib/npm/types/features/authorization/components/EmailVerificationBanner.d.ts +1 -0
- package/dist-lib/npm/types/features/authorization/components/ForgotPasswordPage.d.ts +1 -0
- package/dist-lib/npm/types/features/authorization/components/LoginPage.d.ts +1 -0
- package/dist-lib/npm/types/features/authorization/components/RegisterPage.d.ts +1 -0
- package/dist-lib/npm/types/features/authorization/components/ResendVerificationButton.d.ts +4 -0
- package/dist-lib/npm/types/features/authorization/components/ResetPasswordPage.d.ts +1 -0
- package/dist-lib/npm/types/features/authorization/components/VerifyEmailPage.d.ts +1 -0
- package/dist-lib/npm/types/features/authorization/components/account/AccountSettings.d.ts +1 -0
- package/dist-lib/npm/types/features/authorization/components/account/DeleteAccountSection.d.ts +1 -0
- package/dist-lib/npm/types/features/authorization/components/account/EmailSection.d.ts +4 -0
- package/dist-lib/npm/types/features/authorization/components/account/PasswordSection.d.ts +1 -0
- package/dist-lib/npm/types/features/authorization/components/account/ProfileSection.d.ts +4 -0
- package/dist-lib/npm/types/features/authorization/context/AuthContext.d.ts +2 -0
- package/dist-lib/npm/types/features/authorization/context/AuthProvider.d.ts +8 -0
- package/dist-lib/npm/types/features/authorization/hooks/useAuth.d.ts +18 -0
- package/dist-lib/npm/types/features/authorization/index.d.ts +14 -0
- package/dist-lib/npm/types/features/authorization/repositories/HostTokenAuthRepository.d.ts +18 -0
- package/dist-lib/npm/types/features/authorization/repositories/RemoteAuthRepository.d.ts +18 -0
- package/dist-lib/npm/types/features/authorization/types/auth.d.ts +52 -0
- package/dist-lib/npm/types/features/authorization/utils/validation.d.ts +22 -0
- package/dist-lib/npm/types/features/calendar/components/Calendar.d.ts +14 -0
- package/dist-lib/npm/types/features/calendar/components/CalendarHeader.d.ts +16 -0
- package/dist-lib/npm/types/features/calendar/components/DayColumn.d.ts +21 -0
- package/dist-lib/npm/types/features/calendar/components/EventBlock.d.ts +10 -0
- package/dist-lib/npm/types/features/calendar/components/EventChip.d.ts +10 -0
- package/dist-lib/npm/types/features/calendar/components/EventTitle.d.ts +8 -0
- package/dist-lib/npm/types/features/calendar/components/MiniMonth.d.ts +9 -0
- package/dist-lib/npm/types/features/calendar/components/MonthGrid.d.ts +8 -0
- package/dist-lib/npm/types/features/calendar/components/MonthView.d.ts +2 -0
- package/dist-lib/npm/types/features/calendar/components/NowIndicator.d.ts +6 -0
- package/dist-lib/npm/types/features/calendar/components/TimeColumn.d.ts +1 -0
- package/dist-lib/npm/types/features/calendar/components/TimeGridView.d.ts +2 -0
- package/dist-lib/npm/types/features/calendar/components/YearView.d.ts +2 -0
- package/dist-lib/npm/types/features/calendar/constants/grid.d.ts +4 -0
- package/dist-lib/npm/types/features/calendar/constants/views.d.ts +7 -0
- package/dist-lib/npm/types/features/calendar/context/DragContext.d.ts +2 -0
- package/dist-lib/npm/types/features/calendar/context/EventSourcesContext.d.ts +3 -0
- package/dist-lib/npm/types/features/calendar/hooks/useCalendarView.d.ts +19 -0
- package/dist-lib/npm/types/features/calendar/hooks/useEventDrag.d.ts +15 -0
- package/dist-lib/npm/types/features/calendar/hooks/useEventSource.d.ts +2 -0
- package/dist-lib/npm/types/features/calendar/hooks/useNow.d.ts +1 -0
- package/dist-lib/npm/types/features/calendar/hooks/useSlotSelection.d.ts +6 -0
- package/dist-lib/npm/types/features/calendar/index.d.ts +4 -0
- package/dist-lib/npm/types/features/calendar/types/editor.d.ts +5 -0
- package/dist-lib/npm/types/features/calendar/types/eventLayout.d.ts +14 -0
- package/dist-lib/npm/types/features/calendar/types/eventSource.d.ts +6 -0
- package/dist-lib/npm/types/features/calendar/types/view.d.ts +27 -0
- package/dist-lib/npm/types/features/calendar/utils/allDay.d.ts +12 -0
- package/dist-lib/npm/types/features/calendar/utils/eventDrag.d.ts +12 -0
- package/dist-lib/npm/types/features/calendar/utils/eventGeometry.d.ts +3 -0
- package/dist-lib/npm/types/features/calendar/utils/eventLabels.d.ts +16 -0
- package/dist-lib/npm/types/features/calendar/utils/layoutEvents.d.ts +3 -0
- package/dist-lib/npm/types/features/calendar/utils/segmentEvents.d.ts +5 -0
- package/dist-lib/npm/types/features/calendar/utils/slotSelection.d.ts +17 -0
- package/dist-lib/npm/types/features/calendars/components/ActiveCalendarIndicator.d.ts +1 -0
- package/dist-lib/npm/types/features/calendars/components/CalendarPreview.d.ts +4 -0
- package/dist-lib/npm/types/features/calendars/components/CalendarSettings.d.ts +1 -0
- package/dist-lib/npm/types/features/calendars/components/CalendarSwitcher.d.ts +1 -0
- package/dist-lib/npm/types/features/calendars/components/InvitationList.d.ts +1 -0
- package/dist-lib/npm/types/features/calendars/components/create/ColorStep.d.ts +7 -0
- package/dist-lib/npm/types/features/calendars/components/create/CreateCalendarPage.d.ts +1 -0
- package/dist-lib/npm/types/features/calendars/components/create/DetailsStep.d.ts +12 -0
- package/dist-lib/npm/types/features/calendars/components/create/MembersStep.d.ts +8 -0
- package/dist-lib/npm/types/features/calendars/components/create/ReviewStep.d.ts +4 -0
- package/dist-lib/npm/types/features/calendars/components/settings/CalendarSettingsPage.d.ts +1 -0
- package/dist-lib/npm/types/features/calendars/components/settings/DangerSection.d.ts +9 -0
- package/dist-lib/npm/types/features/calendars/components/settings/GeneralSection.d.ts +4 -0
- package/dist-lib/npm/types/features/calendars/components/settings/MembersSection.d.ts +11 -0
- package/dist-lib/npm/types/features/calendars/components/settings/RoleOverview.d.ts +1 -0
- package/dist-lib/npm/types/features/calendars/components/settings/TeamInvitationsSection.d.ts +12 -0
- package/dist-lib/npm/types/features/calendars/components/settings/TransferOwnershipModal.d.ts +8 -0
- package/dist-lib/npm/types/features/calendars/constants/calendars.d.ts +9 -0
- package/dist-lib/npm/types/features/calendars/context/CalendarsContext.d.ts +2 -0
- package/dist-lib/npm/types/features/calendars/context/CalendarsProvider.d.ts +8 -0
- package/dist-lib/npm/types/features/calendars/hooks/useCalendars.d.ts +1 -0
- package/dist-lib/npm/types/features/calendars/hooks/useTeam.d.ts +12 -0
- package/dist-lib/npm/types/features/calendars/index.d.ts +12 -0
- package/dist-lib/npm/types/features/calendars/repositories/LocalCalendarRepository.d.ts +20 -0
- package/dist-lib/npm/types/features/calendars/repositories/RemoteCalendarRepository.d.ts +23 -0
- package/dist-lib/npm/types/features/calendars/types/calendar.d.ts +91 -0
- package/dist-lib/npm/types/features/calendars/utils/draft.d.ts +7 -0
- package/dist-lib/npm/types/features/calendars/utils/permissions.d.ts +13 -0
- package/dist-lib/npm/types/features/events/components/ColorPicker.d.ts +7 -0
- package/dist-lib/npm/types/features/events/components/CustomColorSettings.d.ts +1 -0
- package/dist-lib/npm/types/features/events/components/DeleteEventModal.d.ts +8 -0
- package/dist-lib/npm/types/features/events/components/EventModal.d.ts +11 -0
- package/dist-lib/npm/types/features/events/components/RecurrenceFields.d.ts +9 -0
- package/dist-lib/npm/types/features/events/components/RecurrenceScopeModal.d.ts +8 -0
- package/dist-lib/npm/types/features/events/components/ScopeButtons.d.ts +10 -0
- package/dist-lib/npm/types/features/events/components/TimeZoneField.d.ts +6 -0
- package/dist-lib/npm/types/features/events/constants/colors.d.ts +3 -0
- package/dist-lib/npm/types/features/events/hooks/useCustomColors.d.ts +8 -0
- package/dist-lib/npm/types/features/events/hooks/useEvents.d.ts +15 -0
- package/dist-lib/npm/types/features/events/index.d.ts +7 -0
- package/dist-lib/npm/types/features/events/types/eventModal.d.ts +1 -0
- package/dist-lib/npm/types/features/events/utils/scopeOptions.d.ts +3 -0
- package/dist-lib/npm/types/features/events/utils/seriesActions.d.ts +4 -0
- package/dist-lib/npm/types/features/preferences/components/PreferencesSettings.d.ts +1 -0
- package/dist-lib/npm/types/features/preferences/context/PreferencesContext.d.ts +6 -0
- package/dist-lib/npm/types/features/preferences/context/PreferencesProvider.d.ts +4 -0
- package/dist-lib/npm/types/features/preferences/hooks/usePreferences.d.ts +1 -0
- package/dist-lib/npm/types/features/preferences/index.d.ts +3 -0
- package/dist-lib/npm/types/features/storage/components/LocalImportPrompt.d.ts +5 -0
- package/dist-lib/npm/types/features/storage/context/StorageContext.d.ts +2 -0
- package/dist-lib/npm/types/features/storage/context/StorageProvider.d.ts +8 -0
- package/dist-lib/npm/types/features/storage/hooks/useStorage.d.ts +7 -0
- package/dist-lib/npm/types/features/storage/index.d.ts +10 -0
- package/dist-lib/npm/types/features/storage/repositories/LocalColorRepository.d.ts +9 -0
- package/dist-lib/npm/types/features/storage/repositories/LocalEventRepository.d.ts +13 -0
- package/dist-lib/npm/types/features/storage/repositories/LocalPreferencesRepository.d.ts +8 -0
- package/dist-lib/npm/types/features/storage/repositories/RemoteColorRepository.d.ts +10 -0
- package/dist-lib/npm/types/features/storage/repositories/RemoteEventRepository.d.ts +12 -0
- package/dist-lib/npm/types/features/storage/repositories/RemotePreferencesRepository.d.ts +9 -0
- package/dist-lib/npm/types/features/storage/types/storage.d.ts +35 -0
- package/dist-lib/npm/types/features/storage/utils/copyEvents.d.ts +3 -0
- package/dist-lib/npm/types/features/storage/utils/localStorageList.d.ts +5 -0
- package/dist-lib/npm/types/features/storage/utils/localStorageValue.d.ts +9 -0
- package/dist-lib/npm/types/hooks/useArrowKeyNavigation.d.ts +6 -0
- package/dist-lib/npm/types/hooks/useAsyncAction.d.ts +6 -0
- package/dist-lib/npm/types/hooks/useAsyncResource.d.ts +9 -0
- package/dist-lib/npm/types/hooks/useForm.d.ts +21 -0
- package/dist-lib/npm/types/hooks/useFormState.d.ts +8 -0
- package/dist-lib/npm/types/hooks/useRequiredContext.d.ts +2 -0
- package/dist-lib/npm/types/hooks/useTabParam.d.ts +3 -0
- package/dist-lib/npm/types/i18n/I18nContext.d.ts +16 -0
- package/dist-lib/npm/types/i18n/I18nProvider.d.ts +9 -0
- package/dist-lib/npm/types/i18n/errorMessage.d.ts +2 -0
- package/dist-lib/npm/types/i18n/format.d.ts +28 -0
- package/dist-lib/npm/types/i18n/index.d.ts +8 -0
- package/dist-lib/npm/types/i18n/locale.d.ts +21 -0
- package/dist-lib/npm/types/i18n/messages/de/auth.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/de/calendar.d.ts +3 -0
- package/dist-lib/npm/types/i18n/messages/de/calendars.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/de/core.d.ts +7 -0
- package/dist-lib/npm/types/i18n/messages/de/events.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/de/index.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/de/settings.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/de/storage.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/en/auth.d.ts +97 -0
- package/dist-lib/npm/types/i18n/messages/en/calendar.d.ts +34 -0
- package/dist-lib/npm/types/i18n/messages/en/calendars.d.ts +179 -0
- package/dist-lib/npm/types/i18n/messages/en/core.d.ts +86 -0
- package/dist-lib/npm/types/i18n/messages/en/events.d.ts +46 -0
- package/dist-lib/npm/types/i18n/messages/en/index.d.ts +468 -0
- package/dist-lib/npm/types/i18n/messages/en/settings.d.ts +19 -0
- package/dist-lib/npm/types/i18n/messages/en/storage.d.ts +7 -0
- package/dist-lib/npm/types/i18n/messages/es/index.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/fr/index.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/index.d.ts +473 -0
- package/dist-lib/npm/types/i18n/messages/it/index.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/nl/index.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/pl/index.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/pt/index.d.ts +2 -0
- package/dist-lib/npm/types/i18n/messages/types.d.ts +7 -0
- package/dist-lib/npm/types/i18n/useI18n.d.ts +3 -0
- package/dist-lib/npm/types/i18n/useLocaleGetter.d.ts +1 -0
- package/dist-lib/npm/types/i18n/weekInfo.d.ts +5 -0
- package/dist-lib/npm/types/lib/CalendarApp.d.ts +14 -0
- package/dist-lib/npm/types/lib/CalendarWidget.d.ts +2 -0
- package/dist-lib/npm/types/lib/IsolatedRoot.d.ts +9 -0
- package/dist-lib/npm/types/lib/config.d.ts +31 -0
- package/dist-lib/npm/types/lib/defaults.d.ts +13 -0
- package/dist-lib/npm/types/lib/element.d.ts +19 -0
- package/dist-lib/npm/types/lib/eventCallbacks.d.ts +11 -0
- package/dist-lib/npm/types/lib/index.d.ts +17 -0
- package/dist-lib/npm/types/lib/linkParam.d.ts +2 -0
- package/dist-lib/npm/types/lib/version.d.ts +1 -0
- package/dist-lib/npm/types/pages/CalendarPage.d.ts +1 -0
- package/dist-lib/npm/types/pages/SettingsPage.d.ts +1 -0
- package/dist-lib/npm/types/router.d.ts +7 -0
- package/dist-lib/npm/types/utils/api.d.ts +32 -0
- package/dist-lib/npm/types/utils/apiError.d.ts +26 -0
- package/dist-lib/npm/types/utils/appError.d.ts +10 -0
- package/dist-lib/npm/types/utils/calendarView.d.ts +3 -0
- package/dist-lib/npm/types/utils/classNames.d.ts +2 -0
- package/dist-lib/npm/types/utils/color.d.ts +5 -0
- package/dist-lib/npm/types/utils/date.d.ts +44 -0
- package/dist-lib/npm/types/utils/dom.d.ts +3 -0
- package/dist-lib/npm/types/utils/event.d.ts +86 -0
- package/dist-lib/npm/types/utils/number.d.ts +1 -0
- package/dist-lib/npm/types/utils/object.d.ts +3 -0
- package/dist-lib/npm/types/utils/preferences.d.ts +14 -0
- package/dist-lib/npm/types/utils/recurrence.d.ts +33 -0
- package/dist-lib/npm/types/utils/series.d.ts +9 -0
- package/dist-lib/npm/types/utils/timeZone.d.ts +11 -0
- package/dist-lib/npm/types/utils/validation.d.ts +6 -0
- package/package.json +88 -6
package/api/openapi.yaml
ADDED
|
@@ -0,0 +1,919 @@
|
|
|
1
|
+
openapi: 3.1.0
|
|
2
|
+
info:
|
|
3
|
+
title: Calendar API
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: |
|
|
6
|
+
REST contract between the calendar component (`restDataSource`) and a backend.
|
|
7
|
+
The test backend (`TestBE`) is the reference implementation.
|
|
8
|
+
|
|
9
|
+
- Authentication uses an HttpOnly session cookie set by the backend. Alternatively a host can send
|
|
10
|
+
`Authorization: Bearer …` (`restDataSource({ getAccessToken })`).
|
|
11
|
+
- Changing requests must use `Content-Type: application/json`.
|
|
12
|
+
- Every request carries `Accept-Language` with the current language of the component. Mails use the
|
|
13
|
+
recipient's stored `locale`, otherwise this header, otherwise English.
|
|
14
|
+
- Errors are `Problem` objects. The component translates known `code` values itself and otherwise shows `message`.
|
|
15
|
+
|
|
16
|
+
**Tenants** (public multi-tenant backend, `tenantDataSource`): every request carries the header
|
|
17
|
+
`X-Calendar-Tenant: <public tenant id>`. A backend with exactly one tenant may ignore it. A multi-tenant backend
|
|
18
|
+
answers `403` with `unknownTenant` for an unknown id and `403` with `originNotAllowed` when `Origin` is not in the
|
|
19
|
+
tenant's allowed domains, and scopes every query to the tenant.
|
|
20
|
+
|
|
21
|
+
**Host token sign-in** (`getUserToken`): when `GET /auth/me` answers `401`, the component asks the host page for a
|
|
22
|
+
short-lived token (a JWT signed with the tenant key, claims `tenant`, `sub`, `name`, `email`, `exp`) and exchanges it at
|
|
23
|
+
`POST /auth/token` for a normal session. The same happens when any request answers `401` later. Password endpoints
|
|
24
|
+
are not used in this mode.
|
|
25
|
+
servers:
|
|
26
|
+
- url: /api
|
|
27
|
+
security:
|
|
28
|
+
- sessionCookie: []
|
|
29
|
+
- bearerToken: []
|
|
30
|
+
tags:
|
|
31
|
+
- name: Auth
|
|
32
|
+
- name: Events
|
|
33
|
+
- name: Calendars
|
|
34
|
+
- name: Teams
|
|
35
|
+
- name: Invitations
|
|
36
|
+
- name: Preferences
|
|
37
|
+
paths:
|
|
38
|
+
/auth/me:
|
|
39
|
+
get:
|
|
40
|
+
tags: [Auth]
|
|
41
|
+
summary: Current user
|
|
42
|
+
security: []
|
|
43
|
+
responses:
|
|
44
|
+
'200': { $ref: '#/components/responses/User' }
|
|
45
|
+
'401': { $ref: '#/components/responses/Problem' }
|
|
46
|
+
patch:
|
|
47
|
+
tags: [Auth]
|
|
48
|
+
summary: Change name
|
|
49
|
+
requestBody:
|
|
50
|
+
required: true
|
|
51
|
+
content:
|
|
52
|
+
application/json:
|
|
53
|
+
schema:
|
|
54
|
+
type: object
|
|
55
|
+
required: [name]
|
|
56
|
+
properties:
|
|
57
|
+
name: { $ref: '#/components/schemas/PersonName' }
|
|
58
|
+
responses:
|
|
59
|
+
'200': { $ref: '#/components/responses/User' }
|
|
60
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
61
|
+
'401': { $ref: '#/components/responses/Problem' }
|
|
62
|
+
delete:
|
|
63
|
+
tags: [Auth]
|
|
64
|
+
summary: Delete account
|
|
65
|
+
description: Deletes the account, sessions, preferences, the personal team and teams the user was alone in.
|
|
66
|
+
requestBody:
|
|
67
|
+
required: true
|
|
68
|
+
content:
|
|
69
|
+
application/json:
|
|
70
|
+
schema:
|
|
71
|
+
type: object
|
|
72
|
+
required: [password]
|
|
73
|
+
properties:
|
|
74
|
+
password: { type: string }
|
|
75
|
+
responses:
|
|
76
|
+
'204': { description: Deleted, session cookie cleared }
|
|
77
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
78
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
79
|
+
/auth/me/password:
|
|
80
|
+
post:
|
|
81
|
+
tags: [Auth]
|
|
82
|
+
summary: Change password
|
|
83
|
+
description: Ends all other sessions of the user. `403` with `wrongCurrentPassword`.
|
|
84
|
+
requestBody:
|
|
85
|
+
required: true
|
|
86
|
+
content:
|
|
87
|
+
application/json:
|
|
88
|
+
schema:
|
|
89
|
+
type: object
|
|
90
|
+
required: [currentPassword, newPassword]
|
|
91
|
+
properties:
|
|
92
|
+
currentPassword: { type: string }
|
|
93
|
+
newPassword: { $ref: '#/components/schemas/NewPassword' }
|
|
94
|
+
responses:
|
|
95
|
+
'204': { description: Changed }
|
|
96
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
97
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
98
|
+
/auth/register:
|
|
99
|
+
post:
|
|
100
|
+
tags: [Auth]
|
|
101
|
+
summary: Register
|
|
102
|
+
description: |
|
|
103
|
+
Creates the account with a personal team and calendar, starts a session and sends a confirmation link.
|
|
104
|
+
`409` with `emailTaken`.
|
|
105
|
+
security: []
|
|
106
|
+
requestBody:
|
|
107
|
+
required: true
|
|
108
|
+
content:
|
|
109
|
+
application/json:
|
|
110
|
+
schema:
|
|
111
|
+
type: object
|
|
112
|
+
required: [name, email, password]
|
|
113
|
+
properties:
|
|
114
|
+
name: { $ref: '#/components/schemas/PersonName' }
|
|
115
|
+
email: { $ref: '#/components/schemas/Email' }
|
|
116
|
+
password: { $ref: '#/components/schemas/NewPassword' }
|
|
117
|
+
responses:
|
|
118
|
+
'201': { $ref: '#/components/responses/User' }
|
|
119
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
120
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
121
|
+
/auth/login:
|
|
122
|
+
post:
|
|
123
|
+
tags: [Auth]
|
|
124
|
+
summary: Sign in
|
|
125
|
+
description: '`401` with `invalidCredentials`, `429` with `tooManyLoginAttempts` after 5 failures in 15 minutes.'
|
|
126
|
+
security: []
|
|
127
|
+
requestBody:
|
|
128
|
+
required: true
|
|
129
|
+
content:
|
|
130
|
+
application/json:
|
|
131
|
+
schema:
|
|
132
|
+
type: object
|
|
133
|
+
required: [email, password]
|
|
134
|
+
properties:
|
|
135
|
+
email: { $ref: '#/components/schemas/Email' }
|
|
136
|
+
password: { type: string }
|
|
137
|
+
responses:
|
|
138
|
+
'200': { $ref: '#/components/responses/User' }
|
|
139
|
+
'401': { $ref: '#/components/responses/Problem' }
|
|
140
|
+
'429': { $ref: '#/components/responses/Problem' }
|
|
141
|
+
/auth/token:
|
|
142
|
+
post:
|
|
143
|
+
tags: [Auth]
|
|
144
|
+
summary: Sign in with a token issued by the host page
|
|
145
|
+
description: |
|
|
146
|
+
Verifies signature, expiry and tenant, creates the user on first use (linked to `sub`) and starts a session.
|
|
147
|
+
`401` with `invalidUserToken`, `403` with `unknownTenant` or when token sign-in is disabled for the tenant.
|
|
148
|
+
security: []
|
|
149
|
+
parameters:
|
|
150
|
+
- { $ref: '#/components/parameters/Tenant' }
|
|
151
|
+
requestBody:
|
|
152
|
+
required: true
|
|
153
|
+
content:
|
|
154
|
+
application/json:
|
|
155
|
+
schema:
|
|
156
|
+
type: object
|
|
157
|
+
required: [token]
|
|
158
|
+
properties:
|
|
159
|
+
token: { type: string, description: JWT signed with a key of the tenant }
|
|
160
|
+
responses:
|
|
161
|
+
'200': { $ref: '#/components/responses/User' }
|
|
162
|
+
'401': { $ref: '#/components/responses/Problem' }
|
|
163
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
164
|
+
/auth/logout:
|
|
165
|
+
post:
|
|
166
|
+
tags: [Auth]
|
|
167
|
+
summary: Sign out
|
|
168
|
+
security: []
|
|
169
|
+
responses:
|
|
170
|
+
'204': { description: Session ended, cookie cleared }
|
|
171
|
+
/auth/password-reset:
|
|
172
|
+
post:
|
|
173
|
+
tags: [Auth]
|
|
174
|
+
summary: Request a password reset link
|
|
175
|
+
description: Always answers 204, also for unknown addresses. The link is valid for one hour.
|
|
176
|
+
security: []
|
|
177
|
+
requestBody:
|
|
178
|
+
required: true
|
|
179
|
+
content:
|
|
180
|
+
application/json:
|
|
181
|
+
schema:
|
|
182
|
+
type: object
|
|
183
|
+
required: [email]
|
|
184
|
+
properties:
|
|
185
|
+
email: { $ref: '#/components/schemas/Email' }
|
|
186
|
+
responses:
|
|
187
|
+
'204': { description: Accepted }
|
|
188
|
+
/auth/password-reset/confirm:
|
|
189
|
+
post:
|
|
190
|
+
tags: [Auth]
|
|
191
|
+
summary: Set a new password with a reset token
|
|
192
|
+
description: Ends all sessions. `410` with `invalidLink`.
|
|
193
|
+
security: []
|
|
194
|
+
requestBody:
|
|
195
|
+
required: true
|
|
196
|
+
content:
|
|
197
|
+
application/json:
|
|
198
|
+
schema:
|
|
199
|
+
type: object
|
|
200
|
+
required: [token, password]
|
|
201
|
+
properties:
|
|
202
|
+
token: { type: string }
|
|
203
|
+
password: { $ref: '#/components/schemas/NewPassword' }
|
|
204
|
+
responses:
|
|
205
|
+
'204': { description: Changed }
|
|
206
|
+
'410': { $ref: '#/components/responses/Problem' }
|
|
207
|
+
/auth/verify-email:
|
|
208
|
+
post:
|
|
209
|
+
tags: [Auth]
|
|
210
|
+
summary: Confirm the email address
|
|
211
|
+
description: '`410` with `invalidLink`.'
|
|
212
|
+
security: []
|
|
213
|
+
requestBody:
|
|
214
|
+
required: true
|
|
215
|
+
content:
|
|
216
|
+
application/json:
|
|
217
|
+
schema:
|
|
218
|
+
type: object
|
|
219
|
+
required: [token]
|
|
220
|
+
properties:
|
|
221
|
+
token: { type: string }
|
|
222
|
+
responses:
|
|
223
|
+
'204': { description: Confirmed }
|
|
224
|
+
'410': { $ref: '#/components/responses/Problem' }
|
|
225
|
+
/auth/verify-email/resend:
|
|
226
|
+
post:
|
|
227
|
+
tags: [Auth]
|
|
228
|
+
summary: Send a new confirmation link
|
|
229
|
+
responses:
|
|
230
|
+
'204': { description: Sent }
|
|
231
|
+
'401': { $ref: '#/components/responses/Problem' }
|
|
232
|
+
/events:
|
|
233
|
+
get:
|
|
234
|
+
tags: [Events]
|
|
235
|
+
summary: List events
|
|
236
|
+
description: |
|
|
237
|
+
Either `from`, `to` and at least one `calendarId` (events in the range and all series that can occur in it),
|
|
238
|
+
or `seriesId` (the series and its detached events).
|
|
239
|
+
parameters:
|
|
240
|
+
- { name: from, in: query, schema: { $ref: '#/components/schemas/ISODate' } }
|
|
241
|
+
- { name: to, in: query, schema: { $ref: '#/components/schemas/ISODate' } }
|
|
242
|
+
- name: calendarId
|
|
243
|
+
in: query
|
|
244
|
+
description: Repeatable. `personal` stands for the own personal calendar.
|
|
245
|
+
schema: { type: array, items: { type: string } }
|
|
246
|
+
style: form
|
|
247
|
+
explode: true
|
|
248
|
+
- { name: seriesId, in: query, schema: { type: string } }
|
|
249
|
+
responses:
|
|
250
|
+
'200':
|
|
251
|
+
description: Events
|
|
252
|
+
content:
|
|
253
|
+
application/json:
|
|
254
|
+
schema: { type: array, items: { $ref: '#/components/schemas/CalendarEvent' } }
|
|
255
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
256
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
257
|
+
post:
|
|
258
|
+
tags: [Events]
|
|
259
|
+
summary: Create an event
|
|
260
|
+
description: Needs `create_entry`.
|
|
261
|
+
requestBody:
|
|
262
|
+
required: true
|
|
263
|
+
content:
|
|
264
|
+
application/json:
|
|
265
|
+
schema:
|
|
266
|
+
allOf:
|
|
267
|
+
- $ref: '#/components/schemas/EventInput'
|
|
268
|
+
- type: object
|
|
269
|
+
required: [calendarId]
|
|
270
|
+
properties:
|
|
271
|
+
calendarId: { type: string }
|
|
272
|
+
responses:
|
|
273
|
+
'201': { $ref: '#/components/responses/Event' }
|
|
274
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
275
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
276
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
277
|
+
/events/{id}:
|
|
278
|
+
parameters:
|
|
279
|
+
- { name: id, in: path, required: true, schema: { type: string } }
|
|
280
|
+
put:
|
|
281
|
+
tags: [Events]
|
|
282
|
+
summary: Replace an event
|
|
283
|
+
description: |
|
|
284
|
+
The calendar stays the same. Needs `update_any_entry` or, for own events, `update_own_entry`.
|
|
285
|
+
`409` with `seriesHasDetached` when the recurrence is removed while detached events exist.
|
|
286
|
+
requestBody:
|
|
287
|
+
required: true
|
|
288
|
+
content:
|
|
289
|
+
application/json:
|
|
290
|
+
schema: { $ref: '#/components/schemas/EventInput' }
|
|
291
|
+
responses:
|
|
292
|
+
'200': { $ref: '#/components/responses/Event' }
|
|
293
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
294
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
295
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
296
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
297
|
+
delete:
|
|
298
|
+
tags: [Events]
|
|
299
|
+
summary: Delete an event
|
|
300
|
+
description: Also deletes detached events of a series. Needs `delete_any_entry` or, for own events, `delete_own_entry`.
|
|
301
|
+
responses:
|
|
302
|
+
'204': { description: Deleted }
|
|
303
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
304
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
305
|
+
/calendars:
|
|
306
|
+
get:
|
|
307
|
+
tags: [Calendars]
|
|
308
|
+
summary: Calendars of the user
|
|
309
|
+
description: Personal calendar first, then team calendars by team name.
|
|
310
|
+
responses:
|
|
311
|
+
'200': { $ref: '#/components/responses/CalendarSummaries' }
|
|
312
|
+
post:
|
|
313
|
+
tags: [Calendars]
|
|
314
|
+
summary: Create a team with its first calendar
|
|
315
|
+
description: The caller becomes owner. `400` with `selfInvite` when the own address is in `invitations`.
|
|
316
|
+
requestBody:
|
|
317
|
+
required: true
|
|
318
|
+
content:
|
|
319
|
+
application/json:
|
|
320
|
+
schema:
|
|
321
|
+
type: object
|
|
322
|
+
required: [name]
|
|
323
|
+
properties:
|
|
324
|
+
name: { $ref: '#/components/schemas/CalendarName' }
|
|
325
|
+
description: { $ref: '#/components/schemas/Description' }
|
|
326
|
+
color: { $ref: '#/components/schemas/EventColor' }
|
|
327
|
+
invitations:
|
|
328
|
+
type: array
|
|
329
|
+
maxItems: 50
|
|
330
|
+
items: { $ref: '#/components/schemas/InvitationInput' }
|
|
331
|
+
responses:
|
|
332
|
+
'201': { $ref: '#/components/responses/CalendarSummary' }
|
|
333
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
334
|
+
/calendars/{calendarId}:
|
|
335
|
+
parameters:
|
|
336
|
+
- { $ref: '#/components/parameters/CalendarId' }
|
|
337
|
+
patch:
|
|
338
|
+
tags: [Calendars]
|
|
339
|
+
summary: Change name or color
|
|
340
|
+
description: Needs `manage_calendars`.
|
|
341
|
+
requestBody:
|
|
342
|
+
required: true
|
|
343
|
+
content:
|
|
344
|
+
application/json:
|
|
345
|
+
schema:
|
|
346
|
+
type: object
|
|
347
|
+
properties:
|
|
348
|
+
name: { $ref: '#/components/schemas/CalendarName' }
|
|
349
|
+
color: { $ref: '#/components/schemas/EventColor' }
|
|
350
|
+
responses:
|
|
351
|
+
'200': { $ref: '#/components/responses/CalendarSummary' }
|
|
352
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
353
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
354
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
355
|
+
delete:
|
|
356
|
+
tags: [Calendars]
|
|
357
|
+
summary: Delete a calendar of a team
|
|
358
|
+
description: Needs `manage_calendars`. `409` with `lastCalendar` for the last calendar of a team.
|
|
359
|
+
responses:
|
|
360
|
+
'204': { description: Deleted with its events }
|
|
361
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
362
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
363
|
+
/calendars/{calendarId}/settings:
|
|
364
|
+
parameters:
|
|
365
|
+
- { $ref: '#/components/parameters/CalendarId' }
|
|
366
|
+
put:
|
|
367
|
+
tags: [Calendars]
|
|
368
|
+
summary: Personal display settings for a team calendar
|
|
369
|
+
description: '`409` with `personalTeam` for the personal calendar.'
|
|
370
|
+
requestBody:
|
|
371
|
+
required: true
|
|
372
|
+
content:
|
|
373
|
+
application/json:
|
|
374
|
+
schema:
|
|
375
|
+
type: object
|
|
376
|
+
required: [showInPersonal]
|
|
377
|
+
properties:
|
|
378
|
+
showInPersonal: { type: boolean }
|
|
379
|
+
responses:
|
|
380
|
+
'200': { $ref: '#/components/responses/CalendarSummary' }
|
|
381
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
382
|
+
/teams/{teamId}:
|
|
383
|
+
parameters:
|
|
384
|
+
- { $ref: '#/components/parameters/TeamId' }
|
|
385
|
+
patch:
|
|
386
|
+
tags: [Teams]
|
|
387
|
+
summary: Change team name or description
|
|
388
|
+
description: Needs `manage_team`. `409` with `personalTeam`.
|
|
389
|
+
requestBody:
|
|
390
|
+
required: true
|
|
391
|
+
content:
|
|
392
|
+
application/json:
|
|
393
|
+
schema:
|
|
394
|
+
type: object
|
|
395
|
+
properties:
|
|
396
|
+
name: { $ref: '#/components/schemas/CalendarName' }
|
|
397
|
+
description: { $ref: '#/components/schemas/Description' }
|
|
398
|
+
responses:
|
|
399
|
+
'200': { $ref: '#/components/responses/CalendarSummaries' }
|
|
400
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
401
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
402
|
+
delete:
|
|
403
|
+
tags: [Teams]
|
|
404
|
+
summary: Delete a team
|
|
405
|
+
description: Needs `delete_team`. Deletes calendars, events and invitations. `409` with `personalTeam`.
|
|
406
|
+
responses:
|
|
407
|
+
'204': { description: Deleted }
|
|
408
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
409
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
410
|
+
/teams/{teamId}/calendars:
|
|
411
|
+
parameters:
|
|
412
|
+
- { $ref: '#/components/parameters/TeamId' }
|
|
413
|
+
post:
|
|
414
|
+
tags: [Teams]
|
|
415
|
+
summary: Add a calendar to a team
|
|
416
|
+
description: Needs `manage_calendars`.
|
|
417
|
+
requestBody:
|
|
418
|
+
required: true
|
|
419
|
+
content:
|
|
420
|
+
application/json:
|
|
421
|
+
schema:
|
|
422
|
+
type: object
|
|
423
|
+
required: [name]
|
|
424
|
+
properties:
|
|
425
|
+
name: { $ref: '#/components/schemas/CalendarName' }
|
|
426
|
+
color: { $ref: '#/components/schemas/EventColor' }
|
|
427
|
+
responses:
|
|
428
|
+
'201': { $ref: '#/components/responses/CalendarSummary' }
|
|
429
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
430
|
+
/teams/{teamId}/membership:
|
|
431
|
+
parameters:
|
|
432
|
+
- { $ref: '#/components/parameters/TeamId' }
|
|
433
|
+
delete:
|
|
434
|
+
tags: [Teams]
|
|
435
|
+
summary: Leave a team
|
|
436
|
+
description: '`409` with `personalTeam` or `lastOwner`.'
|
|
437
|
+
responses:
|
|
438
|
+
'204': { description: Left }
|
|
439
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
440
|
+
/teams/{teamId}/transfer-ownership:
|
|
441
|
+
parameters:
|
|
442
|
+
- { $ref: '#/components/parameters/TeamId' }
|
|
443
|
+
post:
|
|
444
|
+
tags: [Teams]
|
|
445
|
+
summary: Make another member owner
|
|
446
|
+
description: |
|
|
447
|
+
Only for owners. The new owner gets `owner`, the caller becomes `admin`.
|
|
448
|
+
`400` with `alreadyOwner` for the caller itself, `409` with `alreadyOwner` for another owner.
|
|
449
|
+
requestBody:
|
|
450
|
+
required: true
|
|
451
|
+
content:
|
|
452
|
+
application/json:
|
|
453
|
+
schema:
|
|
454
|
+
type: object
|
|
455
|
+
required: [userId]
|
|
456
|
+
properties:
|
|
457
|
+
userId: { type: string }
|
|
458
|
+
responses:
|
|
459
|
+
'200': { $ref: '#/components/responses/CalendarSummaries' }
|
|
460
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
461
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
462
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
463
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
464
|
+
/teams/{teamId}/members:
|
|
465
|
+
parameters:
|
|
466
|
+
- { $ref: '#/components/parameters/TeamId' }
|
|
467
|
+
get:
|
|
468
|
+
tags: [Teams]
|
|
469
|
+
summary: Members of a team
|
|
470
|
+
responses:
|
|
471
|
+
'200':
|
|
472
|
+
description: Members
|
|
473
|
+
content:
|
|
474
|
+
application/json:
|
|
475
|
+
schema: { type: array, items: { $ref: '#/components/schemas/TeamMember' } }
|
|
476
|
+
/teams/{teamId}/members/{userId}:
|
|
477
|
+
parameters:
|
|
478
|
+
- { $ref: '#/components/parameters/TeamId' }
|
|
479
|
+
- { name: userId, in: path, required: true, schema: { type: string } }
|
|
480
|
+
patch:
|
|
481
|
+
tags: [Teams]
|
|
482
|
+
summary: Change a member's role
|
|
483
|
+
description: Needs `manage_members` and a role above the target and the new role. `409` with `lastOwner`.
|
|
484
|
+
requestBody:
|
|
485
|
+
required: true
|
|
486
|
+
content:
|
|
487
|
+
application/json:
|
|
488
|
+
schema:
|
|
489
|
+
type: object
|
|
490
|
+
required: [role]
|
|
491
|
+
properties:
|
|
492
|
+
role: { $ref: '#/components/schemas/TeamRole' }
|
|
493
|
+
responses:
|
|
494
|
+
'200':
|
|
495
|
+
description: Member
|
|
496
|
+
content:
|
|
497
|
+
application/json:
|
|
498
|
+
schema: { $ref: '#/components/schemas/TeamMember' }
|
|
499
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
500
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
501
|
+
delete:
|
|
502
|
+
tags: [Teams]
|
|
503
|
+
summary: Remove a member
|
|
504
|
+
description: Members can remove themselves. `409` with `lastOwner`.
|
|
505
|
+
responses:
|
|
506
|
+
'204': { description: Removed }
|
|
507
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
508
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
509
|
+
/teams/{teamId}/invitations:
|
|
510
|
+
parameters:
|
|
511
|
+
- { $ref: '#/components/parameters/TeamId' }
|
|
512
|
+
get:
|
|
513
|
+
tags: [Invitations]
|
|
514
|
+
summary: Open invitations of a team
|
|
515
|
+
description: Needs `invite_members`.
|
|
516
|
+
responses:
|
|
517
|
+
'200':
|
|
518
|
+
description: Invitations
|
|
519
|
+
content:
|
|
520
|
+
application/json:
|
|
521
|
+
schema: { type: array, items: { $ref: '#/components/schemas/TeamInvitation' } }
|
|
522
|
+
post:
|
|
523
|
+
tags: [Invitations]
|
|
524
|
+
summary: Invite by email
|
|
525
|
+
description: |
|
|
526
|
+
Needs `invite_members` and a role above the invited role. Valid for 7 days.
|
|
527
|
+
`409` with `selfInvite`, `alreadyMember`, `alreadyInvited` or `personalTeam`.
|
|
528
|
+
requestBody:
|
|
529
|
+
required: true
|
|
530
|
+
content:
|
|
531
|
+
application/json:
|
|
532
|
+
schema: { $ref: '#/components/schemas/InvitationInput' }
|
|
533
|
+
responses:
|
|
534
|
+
'201':
|
|
535
|
+
description: Invitation
|
|
536
|
+
content:
|
|
537
|
+
application/json:
|
|
538
|
+
schema: { $ref: '#/components/schemas/TeamInvitation' }
|
|
539
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
540
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
541
|
+
/teams/{teamId}/invitations/{invitationId}:
|
|
542
|
+
parameters:
|
|
543
|
+
- { $ref: '#/components/parameters/TeamId' }
|
|
544
|
+
- { $ref: '#/components/parameters/InvitationId' }
|
|
545
|
+
delete:
|
|
546
|
+
tags: [Invitations]
|
|
547
|
+
summary: Withdraw an invitation
|
|
548
|
+
responses:
|
|
549
|
+
'204': { description: Withdrawn }
|
|
550
|
+
'403': { $ref: '#/components/responses/Problem' }
|
|
551
|
+
/invitations:
|
|
552
|
+
get:
|
|
553
|
+
tags: [Invitations]
|
|
554
|
+
summary: Open invitations to the own email address
|
|
555
|
+
responses:
|
|
556
|
+
'200':
|
|
557
|
+
description: Invitations
|
|
558
|
+
content:
|
|
559
|
+
application/json:
|
|
560
|
+
schema: { type: array, items: { $ref: '#/components/schemas/PendingInvitation' } }
|
|
561
|
+
/invitations/accept:
|
|
562
|
+
post:
|
|
563
|
+
tags: [Invitations]
|
|
564
|
+
summary: Accept an invitation with the token from the mail
|
|
565
|
+
description: '`410` with `invitationExpired`.'
|
|
566
|
+
requestBody:
|
|
567
|
+
required: true
|
|
568
|
+
content:
|
|
569
|
+
application/json:
|
|
570
|
+
schema:
|
|
571
|
+
type: object
|
|
572
|
+
required: [token]
|
|
573
|
+
properties:
|
|
574
|
+
token: { type: string }
|
|
575
|
+
responses:
|
|
576
|
+
'200': { $ref: '#/components/responses/CalendarSummaries' }
|
|
577
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
578
|
+
'410': { $ref: '#/components/responses/Problem' }
|
|
579
|
+
/invitations/{invitationId}/accept:
|
|
580
|
+
parameters:
|
|
581
|
+
- { $ref: '#/components/parameters/InvitationId' }
|
|
582
|
+
post:
|
|
583
|
+
tags: [Invitations]
|
|
584
|
+
summary: Accept an invitation
|
|
585
|
+
description: '`409` with `alreadyMember`, `410` with `invitationExpired`.'
|
|
586
|
+
responses:
|
|
587
|
+
'200': { $ref: '#/components/responses/CalendarSummaries' }
|
|
588
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
589
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
590
|
+
'410': { $ref: '#/components/responses/Problem' }
|
|
591
|
+
/invitations/{invitationId}/decline:
|
|
592
|
+
parameters:
|
|
593
|
+
- { $ref: '#/components/parameters/InvitationId' }
|
|
594
|
+
post:
|
|
595
|
+
tags: [Invitations]
|
|
596
|
+
summary: Decline an invitation
|
|
597
|
+
responses:
|
|
598
|
+
'204': { description: Declined }
|
|
599
|
+
'404': { $ref: '#/components/responses/Problem' }
|
|
600
|
+
/preferences:
|
|
601
|
+
get:
|
|
602
|
+
tags: [Preferences]
|
|
603
|
+
summary: Preferences of the user
|
|
604
|
+
description: Defaults until something is stored.
|
|
605
|
+
responses:
|
|
606
|
+
'200': { $ref: '#/components/responses/Preferences' }
|
|
607
|
+
patch:
|
|
608
|
+
tags: [Preferences]
|
|
609
|
+
summary: Change single preferences
|
|
610
|
+
requestBody:
|
|
611
|
+
required: true
|
|
612
|
+
content:
|
|
613
|
+
application/json:
|
|
614
|
+
schema:
|
|
615
|
+
type: object
|
|
616
|
+
properties:
|
|
617
|
+
theme: { $ref: '#/components/schemas/Theme' }
|
|
618
|
+
defaultView: { $ref: '#/components/schemas/CalendarView' }
|
|
619
|
+
mobileDefaultView: { $ref: '#/components/schemas/CalendarView' }
|
|
620
|
+
locale: { $ref: '#/components/schemas/Locale' }
|
|
621
|
+
responses:
|
|
622
|
+
'200': { $ref: '#/components/responses/Preferences' }
|
|
623
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
624
|
+
/colors:
|
|
625
|
+
get:
|
|
626
|
+
tags: [Preferences]
|
|
627
|
+
summary: Custom colors in the order they were added
|
|
628
|
+
responses:
|
|
629
|
+
'200': { $ref: '#/components/responses/Colors' }
|
|
630
|
+
post:
|
|
631
|
+
tags: [Preferences]
|
|
632
|
+
summary: Add a custom color
|
|
633
|
+
description: An existing color is not added twice. `409` with `tooManyColors` from 12 colors.
|
|
634
|
+
requestBody:
|
|
635
|
+
required: true
|
|
636
|
+
content:
|
|
637
|
+
application/json:
|
|
638
|
+
schema:
|
|
639
|
+
type: object
|
|
640
|
+
required: [color]
|
|
641
|
+
properties:
|
|
642
|
+
color: { $ref: '#/components/schemas/HexColor' }
|
|
643
|
+
responses:
|
|
644
|
+
'200': { $ref: '#/components/responses/Colors' }
|
|
645
|
+
'400': { $ref: '#/components/responses/Problem' }
|
|
646
|
+
'409': { $ref: '#/components/responses/Problem' }
|
|
647
|
+
/colors/{color}:
|
|
648
|
+
delete:
|
|
649
|
+
tags: [Preferences]
|
|
650
|
+
summary: Remove a custom color
|
|
651
|
+
parameters:
|
|
652
|
+
- name: color
|
|
653
|
+
in: path
|
|
654
|
+
required: true
|
|
655
|
+
description: Color without `#`, e.g. `ff8800`
|
|
656
|
+
schema: { type: string, pattern: '^[0-9a-fA-F]{6}$' }
|
|
657
|
+
responses:
|
|
658
|
+
'200': { $ref: '#/components/responses/Colors' }
|
|
659
|
+
components:
|
|
660
|
+
securitySchemes:
|
|
661
|
+
sessionCookie:
|
|
662
|
+
type: apiKey
|
|
663
|
+
in: cookie
|
|
664
|
+
name: sid
|
|
665
|
+
bearerToken:
|
|
666
|
+
type: http
|
|
667
|
+
scheme: bearer
|
|
668
|
+
parameters:
|
|
669
|
+
Tenant:
|
|
670
|
+
name: X-Calendar-Tenant
|
|
671
|
+
in: header
|
|
672
|
+
required: false
|
|
673
|
+
description: Public tenant id. Sent by `tenantDataSource` on every request.
|
|
674
|
+
schema: { type: string }
|
|
675
|
+
CalendarId:
|
|
676
|
+
name: calendarId
|
|
677
|
+
in: path
|
|
678
|
+
required: true
|
|
679
|
+
description: '`personal` stands for the own personal calendar.'
|
|
680
|
+
schema: { type: string }
|
|
681
|
+
TeamId:
|
|
682
|
+
name: teamId
|
|
683
|
+
in: path
|
|
684
|
+
required: true
|
|
685
|
+
schema: { type: string }
|
|
686
|
+
InvitationId:
|
|
687
|
+
name: invitationId
|
|
688
|
+
in: path
|
|
689
|
+
required: true
|
|
690
|
+
schema: { type: string }
|
|
691
|
+
responses:
|
|
692
|
+
Problem:
|
|
693
|
+
description: Error
|
|
694
|
+
content:
|
|
695
|
+
application/json:
|
|
696
|
+
schema: { $ref: '#/components/schemas/Problem' }
|
|
697
|
+
User:
|
|
698
|
+
description: User
|
|
699
|
+
content:
|
|
700
|
+
application/json:
|
|
701
|
+
schema: { $ref: '#/components/schemas/User' }
|
|
702
|
+
Event:
|
|
703
|
+
description: Event
|
|
704
|
+
content:
|
|
705
|
+
application/json:
|
|
706
|
+
schema: { $ref: '#/components/schemas/CalendarEvent' }
|
|
707
|
+
CalendarSummary:
|
|
708
|
+
description: Calendar
|
|
709
|
+
content:
|
|
710
|
+
application/json:
|
|
711
|
+
schema: { $ref: '#/components/schemas/CalendarSummary' }
|
|
712
|
+
CalendarSummaries:
|
|
713
|
+
description: Calendars
|
|
714
|
+
content:
|
|
715
|
+
application/json:
|
|
716
|
+
schema: { type: array, items: { $ref: '#/components/schemas/CalendarSummary' } }
|
|
717
|
+
Preferences:
|
|
718
|
+
description: Preferences
|
|
719
|
+
content:
|
|
720
|
+
application/json:
|
|
721
|
+
schema: { $ref: '#/components/schemas/Preferences' }
|
|
722
|
+
Colors:
|
|
723
|
+
description: Custom colors
|
|
724
|
+
content:
|
|
725
|
+
application/json:
|
|
726
|
+
schema: { type: array, maxItems: 12, items: { $ref: '#/components/schemas/HexColor' } }
|
|
727
|
+
schemas:
|
|
728
|
+
Problem:
|
|
729
|
+
type: object
|
|
730
|
+
required: [code, message]
|
|
731
|
+
properties:
|
|
732
|
+
code:
|
|
733
|
+
type: string
|
|
734
|
+
description: Machine-readable reason. The component translates the codes it knows.
|
|
735
|
+
examples: [invalidCredentials, emailTaken, forbidden, lastOwner, tooManyColors, invalidInput, unknownTenant, originNotAllowed, invalidUserToken]
|
|
736
|
+
message:
|
|
737
|
+
type: string
|
|
738
|
+
description: English description, shown when the component does not know the code.
|
|
739
|
+
User:
|
|
740
|
+
type: object
|
|
741
|
+
required: [id, email, name, emailVerified]
|
|
742
|
+
properties:
|
|
743
|
+
id: { type: string }
|
|
744
|
+
email: { $ref: '#/components/schemas/Email' }
|
|
745
|
+
name: { $ref: '#/components/schemas/PersonName' }
|
|
746
|
+
emailVerified: { type: boolean }
|
|
747
|
+
Email:
|
|
748
|
+
type: string
|
|
749
|
+
format: email
|
|
750
|
+
maxLength: 254
|
|
751
|
+
PersonName:
|
|
752
|
+
type: string
|
|
753
|
+
minLength: 1
|
|
754
|
+
maxLength: 80
|
|
755
|
+
NewPassword:
|
|
756
|
+
type: string
|
|
757
|
+
minLength: 8
|
|
758
|
+
maxLength: 128
|
|
759
|
+
ISODate:
|
|
760
|
+
type: string
|
|
761
|
+
pattern: '^\d{4}-\d{2}-\d{2}$'
|
|
762
|
+
Time:
|
|
763
|
+
type: string
|
|
764
|
+
pattern: '^\d{2}:\d{2}$'
|
|
765
|
+
HexColor:
|
|
766
|
+
type: string
|
|
767
|
+
pattern: '^#[0-9a-f]{6}$'
|
|
768
|
+
EventColor:
|
|
769
|
+
description: A preset name or a custom color
|
|
770
|
+
anyOf:
|
|
771
|
+
- { type: string, enum: [blue, red, green, yellow] }
|
|
772
|
+
- { $ref: '#/components/schemas/HexColor' }
|
|
773
|
+
Recurrence:
|
|
774
|
+
type: object
|
|
775
|
+
required: [frequency, interval, weekdays, monthlyMode, until, count]
|
|
776
|
+
properties:
|
|
777
|
+
frequency: { type: string, enum: [daily, weekly, monthly, yearly] }
|
|
778
|
+
interval: { type: integer, minimum: 1, maximum: 99 }
|
|
779
|
+
weekdays:
|
|
780
|
+
type: array
|
|
781
|
+
description: 0 = Monday … 6 = Sunday, at least one for weekly
|
|
782
|
+
items: { type: integer, minimum: 0, maximum: 6 }
|
|
783
|
+
monthlyMode: { type: string, enum: [dayOfMonth, weekdayOfMonth, lastWeekdayOfMonth] }
|
|
784
|
+
until: { oneOf: [{ $ref: '#/components/schemas/ISODate' }, { type: 'null' }] }
|
|
785
|
+
count: { oneOf: [{ type: integer, minimum: 1, maximum: 999 }, { type: 'null' }] }
|
|
786
|
+
EventInput:
|
|
787
|
+
type: object
|
|
788
|
+
required: [title, startDate, start, endDate, end, description, color, recurrence, excludedDates, seriesId, originalDate]
|
|
789
|
+
properties:
|
|
790
|
+
title: { type: string, minLength: 1, maxLength: 100 }
|
|
791
|
+
startDate: { $ref: '#/components/schemas/ISODate' }
|
|
792
|
+
start: { $ref: '#/components/schemas/Time' }
|
|
793
|
+
endDate: { $ref: '#/components/schemas/ISODate' }
|
|
794
|
+
end: { $ref: '#/components/schemas/Time' }
|
|
795
|
+
allDay:
|
|
796
|
+
type: boolean
|
|
797
|
+
default: false
|
|
798
|
+
description: All-day events cover startDate to endDate inclusive. start and end are '00:00'.
|
|
799
|
+
timeZone:
|
|
800
|
+
description: IANA zone of start and end, e.g. 'Europe/Berlin'. null keeps the same local time in every zone and is always null for all-day events.
|
|
801
|
+
oneOf: [{ type: string }, { type: 'null' }]
|
|
802
|
+
default: null
|
|
803
|
+
description: { type: string, maxLength: 2000 }
|
|
804
|
+
color: { $ref: '#/components/schemas/EventColor' }
|
|
805
|
+
recurrence: { oneOf: [{ $ref: '#/components/schemas/Recurrence' }, { type: 'null' }] }
|
|
806
|
+
excludedDates: { type: array, items: { $ref: '#/components/schemas/ISODate' } }
|
|
807
|
+
seriesId:
|
|
808
|
+
description: For a detached occurrence, the series it was taken from
|
|
809
|
+
oneOf: [{ type: string }, { type: 'null' }]
|
|
810
|
+
originalDate:
|
|
811
|
+
description: For a detached occurrence, its original date in the series
|
|
812
|
+
oneOf: [{ $ref: '#/components/schemas/ISODate' }, { type: 'null' }]
|
|
813
|
+
CalendarEvent:
|
|
814
|
+
allOf:
|
|
815
|
+
- $ref: '#/components/schemas/EventInput'
|
|
816
|
+
- type: object
|
|
817
|
+
required: [id, calendarId, createdBy, createdAt, updatedAt]
|
|
818
|
+
properties:
|
|
819
|
+
id: { type: string }
|
|
820
|
+
calendarId: { type: string }
|
|
821
|
+
createdBy: { oneOf: [{ type: string }, { type: 'null' }] }
|
|
822
|
+
createdAt: { type: string, format: date-time }
|
|
823
|
+
updatedAt: { type: string, format: date-time }
|
|
824
|
+
TeamRole:
|
|
825
|
+
type: string
|
|
826
|
+
enum: [owner, admin, manager, editor, member, contributor, viewer]
|
|
827
|
+
InvitableRole:
|
|
828
|
+
type: string
|
|
829
|
+
enum: [admin, manager, editor, member, contributor, viewer]
|
|
830
|
+
Permission:
|
|
831
|
+
type: string
|
|
832
|
+
enum:
|
|
833
|
+
- read_calendar
|
|
834
|
+
- manage_calendars
|
|
835
|
+
- create_entry
|
|
836
|
+
- update_own_entry
|
|
837
|
+
- update_any_entry
|
|
838
|
+
- delete_own_entry
|
|
839
|
+
- delete_any_entry
|
|
840
|
+
- invite_members
|
|
841
|
+
- manage_members
|
|
842
|
+
- manage_team
|
|
843
|
+
- delete_team
|
|
844
|
+
CalendarName:
|
|
845
|
+
type: string
|
|
846
|
+
minLength: 1
|
|
847
|
+
maxLength: 80
|
|
848
|
+
Description:
|
|
849
|
+
type: string
|
|
850
|
+
maxLength: 500
|
|
851
|
+
CalendarSummary:
|
|
852
|
+
type: object
|
|
853
|
+
required: [id, teamId, name, color, kind, teamName, description, role, showInPersonal, permissions]
|
|
854
|
+
properties:
|
|
855
|
+
id: { type: string }
|
|
856
|
+
teamId: { type: string }
|
|
857
|
+
name: { type: string }
|
|
858
|
+
color: { $ref: '#/components/schemas/EventColor' }
|
|
859
|
+
kind: { type: string, enum: [personal, team] }
|
|
860
|
+
teamName: { oneOf: [{ type: string }, { type: 'null' }] }
|
|
861
|
+
description: { type: string }
|
|
862
|
+
role: { $ref: '#/components/schemas/TeamRole' }
|
|
863
|
+
showInPersonal: { type: boolean }
|
|
864
|
+
permissions: { type: array, items: { $ref: '#/components/schemas/Permission' } }
|
|
865
|
+
TeamMember:
|
|
866
|
+
type: object
|
|
867
|
+
required: [userId, name, email, role, joinedAt]
|
|
868
|
+
properties:
|
|
869
|
+
userId: { type: string }
|
|
870
|
+
name: { type: string }
|
|
871
|
+
email: { type: string }
|
|
872
|
+
role: { $ref: '#/components/schemas/TeamRole' }
|
|
873
|
+
joinedAt: { type: string, format: date-time }
|
|
874
|
+
InvitationInput:
|
|
875
|
+
type: object
|
|
876
|
+
required: [email, role]
|
|
877
|
+
properties:
|
|
878
|
+
email: { $ref: '#/components/schemas/Email' }
|
|
879
|
+
role: { $ref: '#/components/schemas/InvitableRole' }
|
|
880
|
+
PendingInvitation:
|
|
881
|
+
type: object
|
|
882
|
+
required: [id, teamId, teamName, description, role, invitedBy, expiresAt]
|
|
883
|
+
properties:
|
|
884
|
+
id: { type: string }
|
|
885
|
+
teamId: { type: string }
|
|
886
|
+
teamName: { type: string }
|
|
887
|
+
description: { type: string }
|
|
888
|
+
role: { $ref: '#/components/schemas/InvitableRole' }
|
|
889
|
+
invitedBy:
|
|
890
|
+
description: Name of the inviting person
|
|
891
|
+
oneOf: [{ type: string }, { type: 'null' }]
|
|
892
|
+
createdAt: { type: string, format: date-time }
|
|
893
|
+
expiresAt: { type: string, format: date-time }
|
|
894
|
+
TeamInvitation:
|
|
895
|
+
allOf:
|
|
896
|
+
- $ref: '#/components/schemas/PendingInvitation'
|
|
897
|
+
- type: object
|
|
898
|
+
required: [email]
|
|
899
|
+
properties:
|
|
900
|
+
email: { $ref: '#/components/schemas/Email' }
|
|
901
|
+
Theme:
|
|
902
|
+
type: string
|
|
903
|
+
enum: [system, light, dark]
|
|
904
|
+
CalendarView:
|
|
905
|
+
type: string
|
|
906
|
+
enum: [day, week, month, year]
|
|
907
|
+
Locale:
|
|
908
|
+
type: string
|
|
909
|
+
description: '`auto` or a BCP 47 language tag such as `en-US`, `en-GB`, `de-DE`'
|
|
910
|
+
maxLength: 35
|
|
911
|
+
pattern: '^(auto|[a-z]{2,3}(-[A-Za-z0-9]{2,8})*)$'
|
|
912
|
+
Preferences:
|
|
913
|
+
type: object
|
|
914
|
+
required: [theme, defaultView, mobileDefaultView, locale]
|
|
915
|
+
properties:
|
|
916
|
+
theme: { $ref: '#/components/schemas/Theme' }
|
|
917
|
+
defaultView: { $ref: '#/components/schemas/CalendarView' }
|
|
918
|
+
mobileDefaultView: { $ref: '#/components/schemas/CalendarView' }
|
|
919
|
+
locale: { $ref: '#/components/schemas/Locale' }
|