Add, change and delete calendar events from journal pages
CalDAV and Google calendars can now be written to from the journal on
the web and in the phone app. Each change goes to the source at once
with If-Match set to the ETag the last sync read, so a change made
elsewhere is refused (409) instead of overwritten; the account is then
read again. Repeating events, iCal feeds and read-only Google calendars
stay read-only.
- calendar_events keep each event's calendar, object/event id, ETag and
whether it repeats; accounts keep their writable calendars and the
one new events go to (migration 1764800000_calendar_writes).
- Google sign-in asks for calendar.events; older read-only accounts are
offered "Connect again".
- New API: POST /calendar/events, PATCH and DELETE /calendar/events/{id}.
- Translations, Docs-Site guides and changelog updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7f09338b60
commit
29465e4617
34 files changed
+3238
-223
No files matched your search
@@ -1537,6 +1537,9 @@ type BrandingSettings struct {
|
||||
|
||||
// CalendarAccount defines model for CalendarAccount.
|
||||
type CalendarAccount struct {
|
||||
// CanWrite Events can be added to and changed in this calendar
|
||||
CanWrite bool `json:"canWrite"`
|
||||
|
||||
// Color A colour of the editor palette, drawn from the theme; empty for none
|
||||
Color LabelColor `json:"color"`
|
||||
Created string `json:"created"`
|
||||
@@ -1558,8 +1561,17 @@ type CalendarAccount struct {
|
||||
// LastSync When the source was last read
|
||||
LastSync string `json:"lastSync"`
|
||||
Name string `json:"name"`
|
||||
Url string `json:"url"`
|
||||
Username string `json:"username"`
|
||||
|
||||
// NeedsReconnect A Google account connected read-only; connecting it again allows editing
|
||||
NeedsReconnect bool `json:"needsReconnect"`
|
||||
|
||||
// Targets The account's calendars new events can go to (filled by a sync)
|
||||
Targets []CalendarTarget `json:"targets"`
|
||||
Url string `json:"url"`
|
||||
Username string `json:"username"`
|
||||
|
||||
// WriteTo The target new events go to; empty when there is none
|
||||
WriteTo string `json:"writeTo"`
|
||||
}
|
||||
|
||||
// CalendarAccountKind google accounts are connected with /calendars/google/connect
|
||||
@@ -1581,6 +1593,9 @@ type CalendarAccountInput struct {
|
||||
// Url http, https or webcal address
|
||||
Url *string `json:"url,omitempty"`
|
||||
Username *string `json:"username,omitempty"`
|
||||
|
||||
// WriteTo One of the account's targets (changing only); empty for the first
|
||||
WriteTo *string `json:"writeTo,omitempty"`
|
||||
}
|
||||
|
||||
// CalendarAccountInputKind defines model for CalendarAccountInput.Kind.
|
||||
@@ -1596,6 +1611,9 @@ type CalendarEvent struct {
|
||||
// Color A colour of the editor palette, drawn from the theme; empty for none
|
||||
Color LabelColor `json:"color"`
|
||||
|
||||
// Editable Can be changed and deleted here: a single event in a calendar that takes changes
|
||||
Editable bool `json:"editable"`
|
||||
|
||||
// End Exclusive; a date for all-day events
|
||||
End string `json:"end"`
|
||||
Id string `json:"id"`
|
||||
@@ -1607,6 +1625,31 @@ type CalendarEvent struct {
|
||||
Url string `json:"url"`
|
||||
}
|
||||
|
||||
// CalendarEventInput Creating needs calendar, title and start; changing sends only what changes.
|
||||
type CalendarEventInput struct {
|
||||
AllDay *bool `json:"allDay,omitempty"`
|
||||
|
||||
// Calendar The calendar account's id (creating only)
|
||||
Calendar *string `json:"calendar,omitempty"`
|
||||
|
||||
// End Exclusive, written like start; missing is an hour (or a day) after start, or the old length when moving
|
||||
End *string `json:"end,omitempty"`
|
||||
Location *string `json:"location,omitempty"`
|
||||
|
||||
// Start RFC 3339 time, or a date (YYYY-MM-DD) when allDay
|
||||
Start *string `json:"start,omitempty"`
|
||||
Title *string `json:"title,omitempty"`
|
||||
}
|
||||
|
||||
// CalendarTarget defines model for CalendarTarget.
|
||||
type CalendarTarget struct {
|
||||
// Id A CalDAV collection path or a Google calendar id
|
||||
Id string `json:"id"`
|
||||
|
||||
// Name Empty when the account is a single CalDAV calendar
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// Collection defines model for Collection.
|
||||
type Collection struct {
|
||||
CanEdit bool `json:"canEdit"`
|
||||
@@ -3568,6 +3611,12 @@ type ConfirmVerificationJSONRequestBody ConfirmVerificationJSONBody
|
||||
// RequestVerificationJSONRequestBody defines body for RequestVerification for application/json ContentType.
|
||||
type RequestVerificationJSONRequestBody = EmailRequest
|
||||
|
||||
// CreateCalendarEventJSONRequestBody defines body for CreateCalendarEvent for application/json ContentType.
|
||||
type CreateCalendarEventJSONRequestBody = CalendarEventInput
|
||||
|
||||
// UpdateCalendarEventJSONRequestBody defines body for UpdateCalendarEvent for application/json ContentType.
|
||||
type UpdateCalendarEventJSONRequestBody = CalendarEventInput
|
||||
|
||||
// CreateCalendarJSONRequestBody defines body for CreateCalendar for application/json ContentType.
|
||||
type CreateCalendarJSONRequestBody = CalendarAccountInput
|
||||
|
||||
|
||||
Reference in new issue
Block a user