synology_apm_repo.sdk.units.saas.calendar module¶
CalendarProvider: M365/GWS Calendar via calendar_table +
calendar_event_table, built as a SaasWorkloadProvider +
NamedGroupFlatTree config, wrapped in one extra synthetic level
(tree_strategy.CategorizedGroupTree) that splits the root into “My
Calendars” and “Other Calendars” by each calendar’s own ownership (see
_is_other_calendar for the calendar_type split rule).
Unlike Drive (one service DB), Calendar has two separate service-level
DB snapshots in the same ObjectDB sequence — calendar_table (the
calendar list) and calendar_event_table (its events), each named
independently in the object-name index; SaasWorkloadConfig’s two-table
case locates and opens both independently.
Tree: My/Other Calendars → calendar → event, grouped by
calendar_id(the “grouped flat list” strategy), viaNamedGroupFlatTree.Content:
calendar_event_table.meta_object_id→ a META JSON object; the spec’s additionalmodified_date_list/exdate_listkeys are never read here.build_icsassembles the.icsfromclient_metadataalone — each platform’s own calendar API event resource, verbatim, for both GWS and M365.Detached occurrences are real data (see
build_icsfor howRECURRENCE-IDis derived); undetached occurrences are covered by the exportedRRULE, which the importing calendar app expands on its own.A calendar’s own displayed name isn’t always
calendar_nameverbatim —_group_name_overridecorrects for two real cases: a user’s own relabeling, and GWS’s bare-email default for an unrenamed primary calendar.
- synology_apm_repo.sdk.units.saas.calendar.CALENDAR_CONFIG = SaasWorkloadConfig(root_name='Calendars', leaf_kind=<UnitKind.CALENDAR_EVENT: 'calendar_event'>, tables=('calendar_table', 'calendar_event_table'), tree_factory=<function _build_tree>, assemble=<function _assemble>, object_names={'calendar_table': ('calendar_db', 'group_calendar_db'), 'calendar_event_table': ('calendar_event_db', 'group_calendar_event_db')}, extra_attrs=<function _event_extra_attrs>, group_attrs=<function _group_attrs>, leaf_size=<function SaasWorkloadConfig.<lambda>>)¶
SaasWorkloadConfigbehindCalendarProvider— the two-table (calendar_table/calendar_event_table) case described above.
- async synology_apm_repo.sdk.units.saas.calendar.CalendarProvider(repo, version, saas_streams, *, shared=None)¶
Constructor-style factory over
CALENDAR_CONFIG— callable exactly like a constructor (await CalendarProvider(repo, version, saas_streams)), with an optionalsharedcontext passed straight through toSaasWorkloadProvider.createfor M365’s multi-candidateUSER_EXCHANGE/GROUP_EXCHANGEdispatch.