synology_apm_repo.sdk.units.saas.teams_discovery module

Teams/Chat service-DB discovery for TeamsChatProvider: finding the channel/chat container among a version’s indexed objects, and naming each channel (with its Standard/Private/Shared category) and each chat (from its topic or its other members).

Unlike other SaaS workloads, the object-name index entry points at an INDEX object listing one message DB per channel/chat plus the container, since their number is only known at backup time (FORMAT-SPEC.md: Teams/Chat container discrimination).

synology_apm_repo.sdk.units.saas.teams_discovery.CHANNEL_CATEGORY_STANDARD = 'standard'

channel_type values (Microsoft Graph’s membershipType), each a tree category; an unrecognized or missing value is Standard.

async synology_apm_repo.sdk.units.saas.teams_discovery.resolve_message_index(dedup_file, object_name_index, object_db)

Locate Teams/Chat’s channel/chat INDEX object through object_db (the index’s ObjectDB, borrowed) and validate its container entry.

Returns:

(container_tables, container_object_id, entity_object_ids), or None when the INDEX object or its container is missing or doesn’t validate.

Return type:

tuple[frozenset[str], str, dict[str, str]] | None

async synology_apm_repo.sdk.units.saas.teams_discovery.channel_info(source)

channel_id -> name, channel_id -> category and channel_id -> create_time (epoch seconds) from source’s channel_info_table. Doesn’t close source.

Raises:

DataCorruptError – channel_info_table is missing or lacks channel_id.

async synology_apm_repo.sdk.units.saas.teams_discovery.owning_account_email(repo, version)

The backed-up account’s email (owning_account_user_info), or None.

async synology_apm_repo.sdk.units.saas.teams_discovery.chat_labels(source, self_email)

Best-effort chat_id -> label (the topic, else _NO_TITLE_MEETING_LABEL for a meeting, else the other members’ names, else _BOT_CHAT_LABEL for a 1:1 chat) and chat_id -> create_time maps. chat_info_table’s columns are looked up by name, not assumed. Doesn’t close source.