synology_apm_repo.sdk.units.saas.site module

open_site_provider: M365 SharePoint Site (FORMAT-SPEC.md: SharePoint Site) via list_version_table + item_version_table. M365-only.

  • Tree: “Document Library”/”List” categories (CategorizedGroupTree) → list → items, with document-library folders nested by parent_folder_id (NamedGroupRecursiveTree). Each list’s top-level anchor is its root_folder_id ("" for a general list, a non-empty id for a document library).

  • Content: an item with a content_list entry (an attached file) reads that object; one without (a plain list row, a folder) exports its values as JSON.

class synology_apm_repo.sdk.units.saas.site.SiteState(list_create_time)

Bases: object

What _build_tree prefetches for _group_extras.

Variables:

list_create_time (collections.abc.Mapping[str, int]) – Each list’s create_time, by list_id.

list_create_time: Mapping[str, int]
synology_apm_repo.sdk.units.saas.site.SITE_CONFIG = SaasWorkloadConfig(root_name='Lists', leaf_kind=<UnitKind.SITE_ITEM: 'site_item'>, tables=('list_version_table', 'item_version_table'), tree_factory=<function _build_tree>, content=<function _content>, object_names={'list_version_table': ('site_list_db',), 'item_version_table': ('site_item_db',)}, leaf_extras=<function _item_extras>, group_extras=<function _group_extras>, leaf_size=<function _leaf_size>, leaf_export_name=None)

SaasWorkloadConfig behind open_site_provider — Lists/document libraries via tree_strategy.CategorizedGroupTree.

async synology_apm_repo.sdk.units.saas.site.open_site_provider(repo, version, saas_streams, *, shared=None)

Async factory over SITE_CONFIG (see make_saas_provider).

class synology_apm_repo.sdk.units.saas.site.SiteListItems(rows, truncated)

Bases: object

A SharePoint List’s items, each as its field dict.

Variables:
  • rows (list[dict[str, object]]) – One field dict per readable item, in the order provider.children() listed them.

  • truncated (bool) – Whether item_cap items were listed, so the List may hold more than rows.

rows: list[dict[str, object]]
truncated: bool
async synology_apm_repo.sdk.units.saas.site.read_site_list_items(provider, node, *, item_cap, read_limit, max_concurrent)

Up to item_cap of the items of node (a List group node, NodeRole.LIST_OVERVIEW), each read through at most read_limit bytes, max_concurrent at a time, for showing the List as one table. Best-effort past the listing: an item that can’t be opened, read or parsed as a JSON object is left out rather than failing the whole List.

Raises:

ApmRepoError – Listing the List’s items failed.