Office365-REST-Python-Client 3.1.0__py3-none-any.whl → 3.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- office365/communications/callrecords/call_record.py +18 -0
- office365/communications/calls/call.py +3 -0
- office365/communications/presences/presence.py +3 -0
- office365/communications/quotas.py +66 -0
- office365/communications/virtualevents/virtual_event.py +3 -0
- office365/directory/domains/domain.py +3 -0
- office365/directory/licenses/subscribed_sku.py +3 -0
- office365/directory/objects/object.py +3 -0
- office365/directory/quotas.py +34 -0
- office365/entity_collection.py +2 -2
- office365/graph_client.py +46 -2
- office365/limits.py +66 -0
- office365/migration/__init__.py +6 -1
- office365/migration/adapters/__init__.py +14 -4
- office365/migration/adapters/filesystem.py +4 -1
- office365/migration/assessment/export.py +5 -5
- office365/migration/assessment/issue.py +19 -0
- office365/migration/assessment/report.py +11 -0
- office365/migration/assessment/scanners/base.py +37 -49
- office365/migration/base.py +33 -8
- office365/migration/checkpoint.py +1 -1
- office365/migration/outlook/assessor.py +4 -4
- office365/migration/package/__init__.py +82 -0
- office365/migration/package/builder.py +603 -0
- office365/migration/package/crypto.py +54 -0
- office365/migration/package/manifest_xml.py +495 -0
- office365/migration/package/staging.py +180 -0
- office365/migration/report.py +7 -2
- office365/migration/report_io.py +79 -0
- office365/migration/runner.py +117 -10
- office365/migration/server_job.py +126 -14
- office365/migration/session.py +132 -49
- office365/migration/settings.py +67 -0
- office365/migration/sharepoint/__init__.py +2 -0
- office365/migration/sharepoint/adapters.py +207 -41
- office365/migration/sharepoint/assessor.py +45 -9
- office365/migration/sharepoint/options.py +57 -0
- office365/migration/sharepoint/package_target.py +209 -0
- office365/migration/sharepoint/registry.py +22 -0
- office365/migration/sharepoint/resolvers.py +96 -0
- office365/migration/sharepoint/scanners/__init__.py +29 -0
- office365/migration/sharepoint/scanners/browser_file_handling.py +55 -0
- office365/migration/sharepoint/scanners/checked_out_files.py +57 -0
- office365/migration/sharepoint/scanners/file_versions.py +56 -0
- office365/migration/sharepoint/scanners/files.py +5 -2
- office365/migration/sharepoint/scanners/large_excel_files.py +56 -0
- office365/migration/sharepoint/scanners/large_lists.py +58 -0
- office365/migration/sharepoint/scanners/large_sites.py +4 -3
- office365/migration/sharepoint/scanners/long_onedrive_urls.py +52 -0
- office365/migration/sharepoint/scanners/lookup.py +38 -0
- office365/migration/sharepoint/scanners/paths.py +9 -4
- office365/migration/sharepoint/scanners/permissions.py +20 -2
- office365/migration/sharepoint/scanners/smat.py +51 -0
- office365/migration/sharepoint/scanners/summary.py +1 -0
- office365/migration/sharepoint/scanners/thicket_folders.py +38 -0
- office365/migration/sharepoint/scanners/unsupported_site_templates.py +90 -0
- office365/migration/sharepoint/tenant_assessor.py +5 -3
- office365/migration/sharepoint/transfer.py +4 -2
- office365/migration/tasks.py +121 -0
- office365/migration/validators.py +2 -19
- office365/onedrive/driveitems/driveItem.py +116 -12
- office365/onedrive/termstore/groups/collection.py +2 -9
- office365/onedrive/termstore/sets/collection.py +2 -9
- office365/onedrive/termstore/terms/collection.py +3 -10
- office365/onedrive/workbooks/workbook.py +7 -0
- office365/outlook/contacts/folders/collection.py +4 -13
- office365/runtime/auth/authentication_context.py +5 -0
- office365/runtime/client_object.py +18 -0
- office365/runtime/client_object_collection.py +75 -245
- office365/runtime/client_request.py +77 -1
- office365/runtime/client_request_exception.py +127 -39
- office365/runtime/client_runtime_context.py +79 -8
- office365/runtime/converters/csv_writer.py +10 -4
- office365/runtime/converters/dataframe.py +84 -4
- office365/runtime/converters/json_file.py +12 -3
- office365/runtime/converters/parquet.py +67 -0
- office365/runtime/converters/records.py +31 -12
- office365/runtime/converters/registry.py +185 -0
- office365/runtime/converters/scalars.py +31 -0
- office365/runtime/converters/sql.py +69 -0
- office365/runtime/converters/streamers.py +105 -0
- office365/runtime/converters/streams.py +42 -0
- office365/runtime/converters/upsert.py +101 -0
- office365/runtime/exceptions.py +105 -0
- office365/runtime/http/prefer.py +26 -0
- office365/runtime/http/throttling.py +258 -56
- office365/runtime/imports.py +571 -0
- office365/runtime/limits.py +455 -0
- office365/runtime/odata/request.py +11 -2
- office365/runtime/odata/type.py +1 -0
- office365/runtime/odata/v3/batch_request.py +4 -2
- office365/runtime/odata/v4/batch_request.py +22 -7
- office365/runtime/operations.py +29 -0
- office365/runtime/parallel.py +12 -14
- office365/runtime/paths/v4/entity.py +2 -2
- office365/runtime/queries/batch.py +18 -1
- office365/runtime/queries/get_or_create.py +109 -0
- office365/runtime/record_collection.py +443 -0
- office365/runtime/retry.py +92 -26
- office365/runtime/transport/base.py +6 -1
- office365/runtime/transport/requests_transport.py +4 -0
- office365/runtime/transport/throttled_transport.py +67 -0
- office365/runtime/verification.py +40 -0
- office365/sharepoint/activities/logger.py +118 -8
- office365/sharepoint/administration/analytics/usage_service.py +15 -7
- office365/sharepoint/administration/sitemove/service.py +791 -8
- office365/sharepoint/alerts/alert.py +79 -0
- office365/sharepoint/apps/app_collection.py +25 -0
- office365/sharepoint/apps/launcher.py +16 -0
- office365/sharepoint/authpolicy/tenant/compliancereport.py +5 -0
- office365/sharepoint/businessdata/app_bdc_catalog.py +135 -0
- office365/sharepoint/businessdata/entityfieldvaluedictionary.py +65 -0
- office365/sharepoint/businessdata/entityidentifier.py +23 -0
- office365/sharepoint/businessdata/entityinstance.py +52 -0
- office365/sharepoint/businessdata/entityview.py +31 -0
- office365/sharepoint/businessdata/externalsubscriptionstore.py +9 -0
- office365/sharepoint/businessdata/typedescriptor.py +37 -0
- office365/sharepoint/client_context.py +40 -23
- office365/sharepoint/clientsidecomponent/hostedapps/app.py +21 -0
- office365/sharepoint/clientsidecomponent/hostedapps/manager.py +16 -0
- office365/sharepoint/comments/comment.py +84 -2
- office365/sharepoint/contentcenter/machinelearning/models/model.py +0 -23
- office365/sharepoint/contentcenter/machinelearning/publications/publication.py +0 -9
- office365/sharepoint/contentcenter/machinelearning/samples/sample.py +0 -14
- office365/sharepoint/contentcenter/machinelearning/workitems/item.py +0 -80
- office365/sharepoint/contentsolution/template_api.py +148 -0
- office365/sharepoint/contenttypes/collection.py +32 -10
- office365/sharepoint/convergence/addnoliveblobsinodcservicestateapi.py +9 -0
- office365/sharepoint/convergence/consumer_permissions.py +15 -0
- office365/sharepoint/convergence/migration_complete_state_api.py +25 -0
- office365/sharepoint/convergence/odcmetadatacleanedupapi.py +9 -0
- office365/sharepoint/documentmanagement/document_id.py +12 -0
- office365/sharepoint/entity.py +11 -2
- office365/sharepoint/entity_collection.py +2 -2
- office365/sharepoint/exceptions.py +194 -0
- office365/sharepoint/fields/builtin_field_id.py +45 -34
- office365/sharepoint/fields/builtin_field_name.py +123 -0
- office365/sharepoint/fields/coercion.py +131 -0
- office365/sharepoint/fields/collection.py +54 -37
- office365/sharepoint/fields/field.py +17 -0
- office365/sharepoint/fields/name.py +46 -2
- office365/sharepoint/files/collection.py +7 -1
- office365/sharepoint/files/file.py +54 -8
- office365/sharepoint/files/versions/version.py +38 -13
- office365/sharepoint/folders/collection.py +4 -0
- office365/sharepoint/folders/folder.py +91 -21
- office365/sharepoint/htmlpages/html_page.py +16 -0
- office365/sharepoint/htmlpages/html_page_service.py +19 -0
- office365/sharepoint/ir/migration.py +9 -0
- office365/sharepoint/listitems/caml/__init__.py +31 -0
- office365/sharepoint/listitems/caml/builder.py +129 -0
- office365/sharepoint/listitems/caml/expressions.py +424 -0
- office365/sharepoint/listitems/caml/fields.py +68 -0
- office365/sharepoint/listitems/caml/guard.py +63 -0
- office365/sharepoint/listitems/caml/query.py +71 -2
- office365/sharepoint/listitems/caml/values.py +113 -0
- office365/sharepoint/listitems/collection.py +21 -20
- office365/sharepoint/listitems/upsert.py +75 -0
- office365/sharepoint/lists/collection.py +29 -22
- office365/sharepoint/lists/exporter.py +4 -3
- office365/sharepoint/lists/list.py +397 -39
- office365/sharepoint/lists/smart_wiki_library_utility.py +58 -0
- office365/sharepoint/logger/export.py +12 -0
- office365/sharepoint/marketplace/app_metadata.py +97 -1
- office365/sharepoint/marketplace/appstatequeryjobdefinition.py +9 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/carddesigns/card_designs.py +35 -0
- office365/sharepoint/marketplace/sitecollection/appcatalog/allowed_item.py +5 -0
- office365/sharepoint/marketplace/tenant/appcatalog/accessor.py +107 -30
- office365/sharepoint/microfeed/data.py +0 -6
- office365/sharepoint/microservice/manager.py +61 -0
- office365/sharepoint/migrationcenter/common/task.py +193 -4
- office365/sharepoint/migrationcenter/common/task_entity_data.py +1 -1
- office365/sharepoint/migrationcenter/deploy_status.py +13 -0
- office365/sharepoint/migrationcenter/service/properties.py +20 -0
- office365/sharepoint/migrationcenter/service/storage.py +34 -0
- office365/sharepoint/migrationcenter/spflight.py +13 -0
- office365/sharepoint/migrationcenter/urlparseresult.py +77 -0
- office365/sharepoint/multigeo/service/spmultigeoproxy.py +13 -0
- office365/sharepoint/navigation/servicerest.py +127 -0
- office365/sharepoint/oauth/authentication.py +13 -0
- office365/sharepoint/portal/theme_manager.py +120 -8
- office365/sharepoint/principal/users/user.py +10 -0
- office365/sharepoint/publishing/campaign/campaign.py +36 -1
- office365/sharepoint/publishing/feedvideopage.py +0 -7
- office365/sharepoint/publishing/pages/3d/page.py +0 -6
- office365/sharepoint/publishing/pages/page.py +0 -117
- office365/sharepoint/publishing/pages/reposts/repost.py +0 -7
- office365/sharepoint/publishing/pages/topics/topic.py +0 -7
- office365/sharepoint/publishing/subtitlefile.py +0 -40
- office365/sharepoint/quotamanagement/consumer/consumer_quota_info_api.py +14 -0
- office365/sharepoint/quotamanagement/consumer/non_quota_backfill_api.py +23 -0
- office365/sharepoint/quotamanagement/consumer/nonquotamigrationapi.py +9 -0
- office365/sharepoint/quotamanagement/consumer/quotamigrationapi.py +13 -0
- office365/sharepoint/request.py +57 -16
- office365/sharepoint/search/administration/document_crawl_log.py +24 -7
- office365/sharepoint/search/administration/providers/crawl_versions_info.py +29 -0
- office365/sharepoint/search/administration/providers/recycle_bin_info.py +23 -0
- office365/sharepoint/search/administration/providers/site_content_processing_info.py +67 -0
- office365/sharepoint/sites/site.py +976 -65
- office365/sharepoint/sites/siteprovisioninginfoprovider.py +13 -0
- office365/sharepoint/tenant/administration/datagovernance/insight_client.py +292 -23
- office365/sharepoint/tenant/administration/ddiadapter.py +97 -0
- office365/sharepoint/tenant/administration/internal/aad/collection.py +20 -0
- office365/sharepoint/tenant/administration/internal/aad/permission_grant.py +0 -19
- office365/sharepoint/tenant/administration/internal/appservice/permission_request.py +72 -1
- office365/sharepoint/tenant/administration/internal/appservice/principal.py +1 -3
- office365/sharepoint/tenant/administration/odb_license_enforcement_service.py +26 -0
- office365/sharepoint/tenant/administration/sites/properties.py +564 -6
- office365/sharepoint/tenant/administration/spdatagovernancesarrestapiclient.py +60 -1
- office365/sharepoint/tenant/insights/reports/manager.py +24 -12
- office365/sharepoint/tenant/management/office365_tenant.py +451 -2
- office365/sharepoint/tenantadministration/catalog_management_collection.py +69 -0
- office365/sharepoint/tenantadministration/catalog_management_custom_properties_collection.py +237 -0
- office365/sharepoint/tenantadministration/catalog_management_restricted_content_discovery_collection.py +56 -0
- office365/sharepoint/tenantadministration/sp_data_governance_client_exception.py +7 -0
- office365/sharepoint/thresholds.py +529 -0
- office365/sharepoint/translation/jobs/job.py +72 -2
- office365/sharepoint/translation/jobs/status.py +47 -9
- office365/sharepoint/translation/sync_translator.py +15 -2
- office365/sharepoint/utilities/move_copy_util.py +2 -1
- office365/sharepoint/viva/connections/page.py +27 -0
- office365/sharepoint/viva/home.py +38 -0
- office365/sharepoint/viva/learningmanager.py +9 -0
- office365/sharepoint/viva/vivaresources.py +60 -0
- office365/sharepoint/webhooks/subscription.py +0 -11
- office365/sharepoint/webparts/definitions/definition.py +13 -0
- office365/sharepoint/webparts/limited_manager.py +29 -7
- office365/sharepoint/webs/context_web_information.py +14 -9
- office365/sharepoint/webs/templates/__init__.py +11 -0
- office365/sharepoint/webs/templates/type.py +74 -15
- office365/sharepoint/workflow/definition.py +6 -0
- office365/sharepoint/workflow/deployment_service.py +155 -0
- office365/sharepoint/workflow/instances/service.py +33 -0
- office365/sharepoint/workflow/interopservice.py +68 -0
- office365/sharepoint/workflow/messagingservice.py +24 -0
- office365/sharepoint/workflow/servicesmanager.py +41 -2
- office365/sharepoint/workflow/subscriptions/service.py +67 -0
- office365/sharepoint/workflow/subscriptions/subscription.py +31 -0
- office365/sharepoint/workflow/task.py +425 -0
- office365_rest_python_client-3.2.0.dist-info/METADATA +605 -0
- {office365_rest_python_client-3.1.0.dist-info → office365_rest_python_client-3.2.0.dist-info}/RECORD +242 -185
- office365/migration/_util.py +0 -73
- office365/sharepoint/listitems/caml/types.py +0 -70
- office365_rest_python_client-3.1.0.dist-info/METADATA +0 -475
- {office365_rest_python_client-3.1.0.dist-info → office365_rest_python_client-3.2.0.dist-info}/WHEEL +0 -0
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from dataclasses import dataclass, field
|
|
6
|
-
from typing import Any, Generic, TypeVar
|
|
6
|
+
from typing import Any, Generic, Optional, TypeVar
|
|
7
7
|
|
|
8
8
|
from office365.migration.assessment.containers import ScanContainer
|
|
9
9
|
from office365.migration.assessment.issue import AssessmentIssue
|
|
10
10
|
from office365.migration.assessment.report import AssessmentReport
|
|
11
|
+
from office365.runtime.limits import Limit
|
|
11
12
|
|
|
12
13
|
PayloadT = TypeVar("PayloadT")
|
|
13
14
|
RecordT = TypeVar("RecordT")
|
|
@@ -28,60 +29,45 @@ class ScanTarget(Generic[PayloadT]):
|
|
|
28
29
|
|
|
29
30
|
@dataclass
|
|
30
31
|
class AssessmentOptions:
|
|
31
|
-
"""
|
|
32
|
+
"""Product-agnostic scanner options.
|
|
32
33
|
|
|
34
|
+
Product packages subclass this to seed the thresholds and the ``limits``
|
|
35
|
+
mapping from their catalog (e.g. ``SharePointAssessmentOptions``).
|
|
33
36
|
``disabled_scans`` mirrors SMAT's ScanDef.json ``Enabled`` flag: a scan
|
|
34
37
|
listed here does not run and its data is not collected.
|
|
35
38
|
"""
|
|
36
39
|
|
|
37
|
-
max_path_length: int =
|
|
38
|
-
max_name_length: int =
|
|
39
|
-
invalid_chars: set[str] = field(default_factory=
|
|
40
|
-
large_file_bytes: int =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
max_path_length: Optional[int] = None
|
|
41
|
+
max_name_length: Optional[int] = None
|
|
42
|
+
invalid_chars: set[str] = field(default_factory=set)
|
|
43
|
+
large_file_bytes: Optional[int] = None
|
|
44
|
+
large_excel_bytes: Optional[int] = None
|
|
45
|
+
long_onedrive_url: Optional[int] = None
|
|
46
|
+
list_view_threshold: Optional[int] = None
|
|
47
|
+
index_threshold: Optional[int] = None
|
|
48
|
+
max_list_items: Optional[int] = None
|
|
49
|
+
lookup_joins: Optional[int] = None
|
|
50
|
+
unique_scopes: Optional[int] = None
|
|
51
|
+
recommended_unique_scopes: Optional[int] = None
|
|
52
|
+
large_site_threshold_gb: Optional[float] = None
|
|
53
|
+
strip_field_attrs: set[str] = field(default_factory=set)
|
|
54
|
+
approval_workflow_fields: set[str] = field(default_factory=set)
|
|
46
55
|
disabled_scans: set[str] = field(default_factory=lambda: {"permissions"})
|
|
47
56
|
include_site_admins: bool = False
|
|
48
|
-
system_field_names: set[str] = field(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"File_x0020_Size",
|
|
63
|
-
"UniqueId",
|
|
64
|
-
"Version",
|
|
65
|
-
"owshiddenversion",
|
|
66
|
-
"Attachments",
|
|
67
|
-
"FSObjType",
|
|
68
|
-
"MetaInfo",
|
|
69
|
-
"Order",
|
|
70
|
-
"ScopeId",
|
|
71
|
-
"PermMask",
|
|
72
|
-
"EffectivePermMask",
|
|
73
|
-
"InstanceID",
|
|
74
|
-
"WorkflowVersion",
|
|
75
|
-
"_ModerationStatus",
|
|
76
|
-
"_ModerationComments",
|
|
77
|
-
"_CopySource",
|
|
78
|
-
"_HasCopyDestinations",
|
|
79
|
-
"_CheckinComment",
|
|
80
|
-
"_ColorHex",
|
|
81
|
-
"_ColorTag",
|
|
82
|
-
"_Emoji",
|
|
83
|
-
}
|
|
84
|
-
)
|
|
57
|
+
system_field_names: set[str] = field(default_factory=set)
|
|
58
|
+
#: Maps each threshold field to its source :class:`Limit` (seeded by the
|
|
59
|
+
#: product) so findings can reference the authoritative limit.
|
|
60
|
+
limits: dict[str, Limit] = field(default_factory=dict)
|
|
61
|
+
|
|
62
|
+
def limit(self, name: str) -> Limit:
|
|
63
|
+
"""The source :class:`Limit` for a threshold field (from ``limits``)."""
|
|
64
|
+
limit = self.limits.get(name)
|
|
65
|
+
if limit is None:
|
|
66
|
+
value = getattr(self, name, None)
|
|
67
|
+
if value is None:
|
|
68
|
+
raise ValueError(f"no limit or value configured for {name!r}")
|
|
69
|
+
limit = Limit(name, int(value))
|
|
70
|
+
return limit
|
|
85
71
|
|
|
86
72
|
|
|
87
73
|
class BaseScanner(Generic[RecordT]):
|
|
@@ -124,8 +110,10 @@ class BaseScanner(Generic[RecordT]):
|
|
|
124
110
|
location: str,
|
|
125
111
|
message: str,
|
|
126
112
|
suggestion: str = "",
|
|
113
|
+
risk_code: str = "",
|
|
114
|
+
limit: Optional[Limit] = None,
|
|
127
115
|
) -> None:
|
|
128
|
-
report.issues.append(AssessmentIssue(severity, self.category, location, message, suggestion))
|
|
116
|
+
report.issues.append(AssessmentIssue(severity, self.category, location, message, suggestion, risk_code, limit))
|
|
129
117
|
|
|
130
118
|
def run(self, target: ScanTarget[Any], report: AssessmentReport) -> None:
|
|
131
119
|
"""Inspect a loaded container payload (target.entity) and flag / record."""
|
office365/migration/base.py
CHANGED
|
@@ -7,6 +7,9 @@ from __future__ import annotations
|
|
|
7
7
|
from dataclasses import asdict, dataclass, field, fields
|
|
8
8
|
from enum import Enum
|
|
9
9
|
|
|
10
|
+
from office365.runtime.limits import DEFAULT_BATCH_SIZE
|
|
11
|
+
from office365.runtime.operations import OperationStats
|
|
12
|
+
|
|
10
13
|
|
|
11
14
|
class ConflictResolution(str, Enum):
|
|
12
15
|
SKIP = "skip"
|
|
@@ -69,14 +72,26 @@ class MigrationItem:
|
|
|
69
72
|
error: str | None = None # failure message (SPMT "Message")
|
|
70
73
|
error_code: str | None = None # failure category/code (e.g. exception type name)
|
|
71
74
|
modified: str | None = None # source last-modified (ISO-8601), for incremental
|
|
75
|
+
created: str | None = None # source created (ISO-8601)
|
|
76
|
+
author_id: int | None = None # source author user id (system ``AuthorId``)
|
|
77
|
+
editor_id: int | None = None # source last-modified-by user id (system ``EditorId``)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
@dataclass
|
|
81
|
+
class PermissionEntry:
|
|
82
|
+
"""A single principal → role-names grant, used for best-effort ACL preservation.
|
|
83
|
+
|
|
84
|
+
Produced by :meth:`DataSource.read_permissions` and consumed by
|
|
85
|
+
:meth:`DataTarget.apply_permissions`; role names are the target's role
|
|
86
|
+
definition names (e.g. ``"Read"``, ``"Edit"``, ``"Full Control"``).
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
principal_name: str
|
|
90
|
+
roles: list[str] = field(default_factory=list)
|
|
72
91
|
|
|
73
92
|
|
|
74
93
|
@dataclass
|
|
75
|
-
class MigrationStats:
|
|
76
|
-
total: int = 0
|
|
77
|
-
success: int = 0
|
|
78
|
-
skipped: int = 0
|
|
79
|
-
errors: int = 0
|
|
94
|
+
class MigrationStats(OperationStats):
|
|
80
95
|
bytes_transferred: int = 0
|
|
81
96
|
|
|
82
97
|
def summary(self) -> str:
|
|
@@ -91,13 +106,23 @@ class MigrationStats:
|
|
|
91
106
|
@dataclass
|
|
92
107
|
class MigrationOptions:
|
|
93
108
|
conflict_resolution: ConflictResolution = ConflictResolution.SKIP
|
|
94
|
-
incremental: bool = False # skip items
|
|
95
|
-
preserve_timestamps
|
|
109
|
+
incremental: bool = False # skip items at/below the persisted watermark (and target-newer ones)
|
|
110
|
+
# Fidelity flags. ``preserve_timestamps`` and ``preserve_permissions`` are
|
|
111
|
+
# applied client-side on a best-effort basis when the adapters support it
|
|
112
|
+
# (see ``DataSource.read_permissions`` / ``DataTarget.apply_timestamps`` /
|
|
113
|
+
# ``DataTarget.apply_permissions``); REST cannot restore version history, so
|
|
114
|
+
# ``preserve_versions`` requires the server-side Migration API
|
|
115
|
+
# (``MigrationServerJob``). Defaults are False so they are honest no-ops
|
|
116
|
+
# rather than silently doing nothing.
|
|
117
|
+
preserve_timestamps: bool = False
|
|
96
118
|
preserve_permissions: bool = False
|
|
97
119
|
preserve_versions: bool = False
|
|
98
120
|
include_patterns: list[str] = field(default_factory=list)
|
|
99
121
|
exclude_patterns: list[str] = field(default_factory=list)
|
|
100
|
-
|
|
122
|
+
# Date window (ISO-8601): skip items created/modified at or before these
|
|
123
|
+
created_after: str | None = None
|
|
124
|
+
modified_after: str | None = None
|
|
125
|
+
batch_size: int = DEFAULT_BATCH_SIZE
|
|
101
126
|
concurrency: int = 1 # parallel workers for bulk file upload / batched writes
|
|
102
127
|
|
|
103
128
|
|
|
@@ -14,8 +14,8 @@ import uuid
|
|
|
14
14
|
from dataclasses import dataclass, field
|
|
15
15
|
from pathlib import Path
|
|
16
16
|
|
|
17
|
-
from office365.migration._util import utc_now_iso
|
|
18
17
|
from office365.migration.base import ItemStatus, MigrationItem, MigrationPhase
|
|
18
|
+
from office365.runtime.converters.scalars import utc_now_iso
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
@dataclass
|
|
@@ -9,12 +9,12 @@ dispatches to the registered scans. Reuses the shared :class:`AssessmentReport`
|
|
|
9
9
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
|
-
from office365.migration._util import coerce_int
|
|
13
12
|
from office365.migration.assessment.containers import ScanContainer
|
|
14
13
|
from office365.migration.assessment.report import AssessmentReport
|
|
15
14
|
from office365.migration.assessment.runner import ScanRunner
|
|
16
15
|
from office365.migration.outlook.registry import outlook_scan_pairs
|
|
17
16
|
from office365.migration.outlook.scanner import MailFolderData, OutlookOptions
|
|
17
|
+
from office365.runtime.converters.scalars import parse_int
|
|
18
18
|
|
|
19
19
|
# Graph mailFolder properties the walker selects
|
|
20
20
|
_FOLDER_COLUMNS = ["displayName", "totalItemCount", "unreadItemCount", "childFolderCount"]
|
|
@@ -45,9 +45,9 @@ class MailboxAssessor:
|
|
|
45
45
|
path = f"{parent_path}/{name}" if parent_path else name
|
|
46
46
|
folder_data = MailFolderData(
|
|
47
47
|
path=path,
|
|
48
|
-
item_count=
|
|
49
|
-
unread_count=
|
|
50
|
-
child_count=
|
|
48
|
+
item_count=parse_int(folder.total_item_count),
|
|
49
|
+
unread_count=parse_int(folder.unread_item_count),
|
|
50
|
+
child_count=parse_int(folder.child_folder_count),
|
|
51
51
|
)
|
|
52
52
|
self.folder_count += 1
|
|
53
53
|
self.message_count += folder_data.item_count or 0
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""SharePoint Migration API package — manifest XML models + a package builder.
|
|
2
|
+
|
|
3
|
+
Assembles the XML manifest documents and content blobs ingested by the server-side
|
|
4
|
+
Migration API (``Site.create_migration_job`` / ``create_migration_job_encrypted``).
|
|
5
|
+
Covers the **document-library subset** (webs, lists, folders, files, versions).
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from office365.migration.package.builder import DEFAULT_NAMESPACE, Package, PackageBuilder
|
|
11
|
+
from office365.migration.package.manifest_xml import (
|
|
12
|
+
EXPORT_SETTINGS_NS,
|
|
13
|
+
LOOKUP_LIST_MAP_NS,
|
|
14
|
+
MANIFEST_NS,
|
|
15
|
+
REQUIREMENTS_NS,
|
|
16
|
+
ROOT_OBJECT_MAP_NS,
|
|
17
|
+
SOURCE_TYPES,
|
|
18
|
+
SYSTEM_DATA_NS,
|
|
19
|
+
USER_GROUP_MAP_NS,
|
|
20
|
+
VIEW_FORMS_LIST_NS,
|
|
21
|
+
Assignment,
|
|
22
|
+
DeploymentObject,
|
|
23
|
+
ExportSettings,
|
|
24
|
+
Group,
|
|
25
|
+
Manifest,
|
|
26
|
+
ManifestElement,
|
|
27
|
+
ManifestObject,
|
|
28
|
+
Role,
|
|
29
|
+
RoleAssignment,
|
|
30
|
+
RootObject,
|
|
31
|
+
RootObjectMap,
|
|
32
|
+
SharedWithEvent,
|
|
33
|
+
SystemData,
|
|
34
|
+
SystemObject,
|
|
35
|
+
User,
|
|
36
|
+
UserGroupMap,
|
|
37
|
+
empty_document,
|
|
38
|
+
)
|
|
39
|
+
from office365.migration.package.staging import (
|
|
40
|
+
AzureBlobStaging,
|
|
41
|
+
BlobStaging,
|
|
42
|
+
FileSystemStaging,
|
|
43
|
+
Staging,
|
|
44
|
+
create_staging,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
__all__ = [
|
|
48
|
+
"DEFAULT_NAMESPACE",
|
|
49
|
+
"EXPORT_SETTINGS_NS",
|
|
50
|
+
"LOOKUP_LIST_MAP_NS",
|
|
51
|
+
"MANIFEST_NS",
|
|
52
|
+
"REQUIREMENTS_NS",
|
|
53
|
+
"ROOT_OBJECT_MAP_NS",
|
|
54
|
+
"SOURCE_TYPES",
|
|
55
|
+
"SYSTEM_DATA_NS",
|
|
56
|
+
"USER_GROUP_MAP_NS",
|
|
57
|
+
"VIEW_FORMS_LIST_NS",
|
|
58
|
+
"Assignment",
|
|
59
|
+
"AzureBlobStaging",
|
|
60
|
+
"BlobStaging",
|
|
61
|
+
"DeploymentObject",
|
|
62
|
+
"ExportSettings",
|
|
63
|
+
"FileSystemStaging",
|
|
64
|
+
"Group",
|
|
65
|
+
"Manifest",
|
|
66
|
+
"ManifestElement",
|
|
67
|
+
"ManifestObject",
|
|
68
|
+
"Package",
|
|
69
|
+
"PackageBuilder",
|
|
70
|
+
"Role",
|
|
71
|
+
"RoleAssignment",
|
|
72
|
+
"RootObject",
|
|
73
|
+
"RootObjectMap",
|
|
74
|
+
"SharedWithEvent",
|
|
75
|
+
"Staging",
|
|
76
|
+
"SystemData",
|
|
77
|
+
"SystemObject",
|
|
78
|
+
"User",
|
|
79
|
+
"UserGroupMap",
|
|
80
|
+
"create_staging",
|
|
81
|
+
"empty_document",
|
|
82
|
+
]
|