synology_apm_repo.sdk.units.saas.teams_chat module¶
TeamsChatProvider: M365 Teams channels and 1:1/group chats, each
exported as one self-contained HTML transcript (render_channel_html).
Channels are listed under Standard/Private/Shared categories
(CategorizedGroupTree over channel_info_table.channel_type); chats
are one flat list. The service DBs are located by teams_discovery.py,
which doesn’t fit SaasWorkloadProvider’s per-table model. Chat support
follows FORMAT-SPEC.md: Teams/Chat container discrimination, and has not
been checked against an observed chat backup.
Every leaf is UnitKind.TEAMS_CHAT_MESSAGE, and every container
carries the same value as Node.leaf_kind.
- class synology_apm_repo.sdk.units.saas.teams_chat.TeamsChatProvider(repo, version)¶
Bases:
AsyncClosing,TreeBackedProviderUnitProviderfor one Teams or Chat (M365 only) workload version. Build one withcreate.- async classmethod create(repo, version, saas_streams, *, shared=None)¶
Locate the version’s channel/chat index and read its container DB.
- Parameters:
repo (DedupRepo) – The repository
versionbelongs to.version (Version) – The Teams or Chat version to open.
saas_streams (SaasStreamCache) – Borrowed, not owned; the
saas_objstays cached there.shared (SharedSaasContext | None) – The version’s resolved stream object and index, when
units/dispatch.pyalready resolved them; resolved here otherwise.
- Raises:
UnsupportedDataFormatError – No channel/chat index is found.
DataCorruptError – The container DB doesn’t decode, or its
channel_info_tablelackschannel_id.
- async close()¶
Release this provider’s hold on the index ObjectDB; the borrowed stream stays open. Safe after a partial
create()and more than once.
- root()¶
- async unit(node)¶