Office365-REST-Python-Client 2.4.3__py3-none-any.whl → 2.4.4__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.
Files changed (255) hide show
  1. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/METADATA +8 -7
  2. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/RECORD +254 -162
  3. office365/base_item.py +26 -4
  4. office365/communications/calls/invitation_participant_info.py +17 -1
  5. office365/communications/calls/options.py +9 -0
  6. office365/communications/onlinemeetings/provider_type.py +3 -0
  7. office365/communications/presences/presence.py +14 -0
  8. office365/communications/presences/status_message.py +12 -0
  9. office365/directory/audit/signins/activity.py +31 -0
  10. office365/directory/audit/signins/location.py +17 -0
  11. office365/directory/audit/signins/signin.py +25 -0
  12. office365/directory/authentication/authentication.py +9 -0
  13. office365/directory/authentication/methods/details.py +18 -0
  14. office365/directory/authentication/methods/email.py +16 -0
  15. office365/directory/authentication/methods/root.py +10 -0
  16. office365/directory/certificates/authority.py +6 -1
  17. office365/directory/extensions/extended_property.py +8 -1
  18. office365/directory/extensions/extension_property.py +0 -3
  19. office365/directory/extensions/open_type.py +8 -0
  20. office365/directory/groups/group.py +2 -1
  21. office365/directory/identities/governance.py +2 -0
  22. office365/directory/insights/shared.py +15 -1
  23. office365/directory/insights/usage_details.py +16 -0
  24. office365/directory/insights/used.py +7 -0
  25. office365/directory/licenses/assigned_plan.py +14 -2
  26. office365/directory/licenses/service_plan_info.py +4 -0
  27. office365/directory/licenses/subscribed_sku.py +26 -0
  28. office365/directory/licenses/units_detail.py +11 -0
  29. office365/directory/permissions/email_identity.py +5 -0
  30. office365/directory/permissions/grants/condition_set.py +26 -0
  31. office365/directory/permissions/grants/resource_specific.py +21 -0
  32. office365/directory/policies/authentication_flows.py +9 -0
  33. office365/directory/policies/authentication_strength.py +10 -0
  34. office365/directory/policies/authorization.py +8 -0
  35. office365/directory/policies/cross_tenant_access.py +5 -0
  36. office365/directory/policies/root.py +35 -2
  37. office365/directory/rolemanagement/template.py +8 -0
  38. office365/directory/rolemanagement/unified_role_assignment.py +37 -0
  39. office365/directory/security/alerts/alert.py +21 -0
  40. office365/directory/security/alerts/history_state.py +5 -0
  41. office365/directory/security/attacksimulations/automation.py +21 -0
  42. office365/directory/security/attacksimulations/automation_run.py +5 -0
  43. office365/directory/security/attacksimulations/repeat_offender.py +6 -0
  44. office365/directory/security/attacksimulations/root.py +26 -0
  45. office365/directory/security/attacksimulations/simulation.py +17 -0
  46. office365/directory/security/cases/ediscovery.py +6 -0
  47. office365/directory/security/cases/root.py +22 -0
  48. office365/directory/security/incidents/incident.py +67 -0
  49. office365/directory/security/security.py +10 -1
  50. office365/directory/serviceprincipals/service_principal.py +88 -3
  51. office365/directory/synchronization/job.py +16 -0
  52. office365/directory/synchronization/progress.py +5 -0
  53. office365/directory/synchronization/status.py +13 -0
  54. office365/directory/synchronization/synchronization.py +24 -0
  55. office365/directory/tenant_information.py +12 -0
  56. office365/directory/users/password_profile.py +15 -3
  57. office365/directory/users/user.py +136 -8
  58. office365/graph_client.py +28 -1
  59. office365/intune/audit/actor.py +5 -0
  60. office365/intune/audit/event.py +21 -25
  61. office365/intune/audit/event_collection.py +26 -0
  62. office365/intune/audit/property.py +5 -0
  63. office365/intune/audit/resource.py +11 -0
  64. office365/intune/brand.py +6 -0
  65. office365/intune/devices/compliance/__init__.py +0 -0
  66. office365/intune/devices/compliance/policy.py +6 -0
  67. office365/intune/devices/compliance/policy_state.py +5 -0
  68. office365/intune/devices/enrollment/__init__.py +0 -0
  69. office365/intune/devices/enrollment/configuration.py +25 -0
  70. office365/intune/devices/enrollment/configuration_assignment.py +5 -0
  71. office365/intune/devices/enrollment/limit_configuration.py +5 -0
  72. office365/intune/devices/managed.py +28 -3
  73. office365/intune/devices/management/__init__.py +0 -0
  74. office365/intune/devices/management/management.py +69 -0
  75. office365/intune/devices/management/reports/__init__.py +0 -0
  76. office365/intune/devices/management/reports/reports.py +5 -0
  77. office365/intune/devices/management/settings.py +18 -0
  78. office365/intune/organizations/branding.py +15 -0
  79. office365/intune/organizations/organization.py +14 -0
  80. office365/intune/printing/base.py +11 -0
  81. office365/intune/printing/capabilities.py +5 -0
  82. office365/intune/printing/connectors/__init__.py +0 -0
  83. office365/intune/printing/connectors/connector.py +6 -0
  84. office365/intune/printing/operations/__init__.py +0 -0
  85. office365/intune/printing/print.py +24 -0
  86. office365/intune/printing/printer.py +6 -0
  87. office365/intune/printing/services/__init__.py +0 -0
  88. office365/intune/printing/services/endpoint.py +5 -0
  89. office365/intune/printing/services/service.py +17 -0
  90. office365/intune/printing/share.py +5 -0
  91. office365/intune/printing/shares/__init__.py +0 -0
  92. office365/intune/printing/taskdefinitions/__init__.py +0 -0
  93. office365/intune/provisioned_plan.py +5 -1
  94. office365/intune/servicecommunications/issues/issue.py +15 -0
  95. office365/intune/vpp_token.py +10 -0
  96. office365/onedrive/columns/content_approval_status.py +5 -0
  97. office365/onedrive/columns/datetime.py +15 -0
  98. office365/onedrive/columns/definition.py +49 -3
  99. office365/onedrive/columns/definition_collection.py +17 -6
  100. office365/onedrive/columns/types.py +13 -0
  101. office365/onedrive/driveitems/audio.py +12 -1
  102. office365/onedrive/driveitems/driveItem.py +66 -15
  103. office365/onedrive/driveitems/image.py +8 -1
  104. office365/onedrive/driveitems/remote_item.py +19 -4
  105. office365/onedrive/drives/recipient.py +4 -0
  106. office365/onedrive/files/system_info.py +8 -6
  107. office365/onedrive/lists/collection.py +11 -5
  108. office365/onedrive/lists/list.py +13 -5
  109. office365/onedrive/operations/pending.py +13 -0
  110. office365/onedrive/operations/pending_content_update.py +5 -0
  111. office365/onedrive/permissions/collection.py +1 -1
  112. office365/onedrive/sensitivitylabels/__init__.py +0 -0
  113. office365/onedrive/sensitivitylabels/assignment.py +17 -0
  114. office365/onedrive/sensitivitylabels/assignment_method.py +4 -0
  115. office365/onedrive/sensitivitylabels/extract_result.py +13 -0
  116. office365/onedrive/sharepoint_settings.py +25 -0
  117. office365/outlook/calendar/calendar.py +116 -5
  118. office365/outlook/calendar/dateTimeTimeZone.py +3 -0
  119. office365/outlook/calendar/email_address.py +7 -0
  120. office365/outlook/calendar/events/event.py +0 -4
  121. office365/outlook/calendar/events/reminder.py +22 -3
  122. office365/outlook/calendar/group.py +0 -2
  123. office365/outlook/calendar/location_constraint.py +16 -1
  124. office365/outlook/calendar/permissions/__init__.py +0 -0
  125. office365/outlook/calendar/permissions/collection.py +24 -0
  126. office365/outlook/calendar/{permission.py → permissions/permission.py} +35 -2
  127. office365/outlook/calendar/role_type.py +17 -0
  128. office365/outlook/calendar/sharing_message.py +2 -2
  129. office365/outlook/calendar/time_zone_base.py +3 -0
  130. office365/outlook/calendar/working_hours.py +17 -1
  131. office365/outlook/contacts/collection.py +39 -0
  132. office365/outlook/contacts/contact.py +21 -11
  133. office365/outlook/geo_coordinates.py +20 -0
  134. office365/outlook/item.py +5 -2
  135. office365/outlook/locale_info.py +3 -0
  136. office365/outlook/mail/folders/folder.py +51 -2
  137. office365/outlook/mail/folders/search.py +11 -0
  138. office365/outlook/mail/importance.py +1 -0
  139. office365/outlook/mail/item_body.py +3 -0
  140. office365/outlook/mail/location.py +27 -2
  141. office365/outlook/mail/location_constraint_item.py +5 -0
  142. office365/outlook/mail/messages/collection.py +7 -0
  143. office365/outlook/mail/messages/followup_flag.py +21 -0
  144. office365/outlook/mail/messages/internet_header.py +16 -0
  145. office365/outlook/mail/messages/message.py +183 -4
  146. office365/outlook/mail/messages/rules/actions.py +33 -0
  147. office365/outlook/mail/patterned_recurrence.py +14 -1
  148. office365/outlook/mail/physical_address.py +5 -1
  149. office365/outlook/mail/recipient.py +3 -0
  150. office365/outlook/mail/recurrence_pattern.py +18 -1
  151. office365/outlook/mail/recurrence_range.py +16 -2
  152. office365/reports/root.py +19 -1
  153. office365/reports/security/__init__.py +0 -0
  154. office365/reports/security/root.py +21 -0
  155. office365/reports/userregistration/__init__.py +0 -0
  156. office365/reports/userregistration/method_count.py +17 -0
  157. office365/reports/userregistration/method_summary.py +21 -0
  158. office365/sharepoint/activities/logger.py +25 -0
  159. office365/sharepoint/addtoonedrive/mount_point.py +25 -0
  160. office365/sharepoint/addtoonedrive/mounted_folder_info.py +5 -0
  161. office365/sharepoint/alerts/alert.py +31 -0
  162. office365/sharepoint/changes/item.py +14 -0
  163. office365/sharepoint/client_context.py +6 -0
  164. office365/sharepoint/clientsidecomponent/component_context_info.py +7 -0
  165. office365/sharepoint/clientsidecomponent/identifier.py +3 -0
  166. office365/sharepoint/compliance/tag_info.py +17 -0
  167. office365/sharepoint/contenttypes/content_type.py +42 -0
  168. office365/sharepoint/contenttypes/fieldlinks/collection.py +5 -6
  169. office365/sharepoint/features/known_list.py +2 -0
  170. office365/sharepoint/fields/collection.py +60 -41
  171. office365/sharepoint/fields/creation_information.py +5 -4
  172. office365/sharepoint/fields/field.py +73 -15
  173. office365/sharepoint/fields/user.py +3 -3
  174. office365/sharepoint/files/file.py +9 -4
  175. office365/sharepoint/folders/coloring.py +39 -0
  176. office365/sharepoint/folders/coloring_information.py +15 -0
  177. office365/sharepoint/folders/folder.py +21 -10
  178. office365/sharepoint/forms/customization.py +8 -0
  179. office365/sharepoint/listitems/listitem.py +10 -3
  180. office365/sharepoint/lists/bloom_filter.py +0 -1
  181. office365/sharepoint/lists/creation_information.py +18 -4
  182. office365/sharepoint/lists/list.py +199 -24
  183. office365/sharepoint/lists/render_data_parameters.py +21 -1
  184. office365/sharepoint/navigation/configured_metadata_items.py +25 -1
  185. office365/sharepoint/navigation/metadata_settings.py +6 -4
  186. office365/sharepoint/permissions/irm/file_settings.py +43 -0
  187. office365/sharepoint/portal/userprofiles/documents_shared_with_group.py +3 -0
  188. office365/sharepoint/publishing/base_custom_property.py +8 -0
  189. office365/sharepoint/publishing/navigation/structural_navigation_cache_wrapper.py +8 -0
  190. office365/sharepoint/publishing/pagecopywithassets/__init__.py +0 -0
  191. office365/sharepoint/publishing/pagecopywithassets/response.py +8 -0
  192. office365/sharepoint/publishing/pages/campaign_publication.py +7 -0
  193. office365/sharepoint/publishing/pages/page.py +4 -1
  194. office365/sharepoint/publishing/pages/reposts/metadata.py +8 -0
  195. office365/sharepoint/publishing/personmagazine/person_magazine.py +4 -1
  196. office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +8 -1
  197. office365/sharepoint/search/query/auto_completion_match.py +3 -0
  198. office365/sharepoint/search/query/property_value.py +18 -0
  199. office365/sharepoint/search/request.py +16 -2
  200. office365/sharepoint/sharing/abilities.py +22 -0
  201. office365/sharepoint/sharing/direct_abilities.py +27 -0
  202. office365/sharepoint/sharing/link_abilities.py +9 -1
  203. office365/sharepoint/sharing/links/data.py +26 -1
  204. office365/sharepoint/sharing/links/info.py +1 -1
  205. office365/sharepoint/sharing/links/partial_success_response.py +5 -0
  206. office365/sharepoint/sharing/links/share_settings.py +24 -1
  207. office365/sharepoint/sharing/object_sharing_information.py +65 -2
  208. office365/sharepoint/sharing/object_sharing_information_user.py +9 -0
  209. office365/sharepoint/sharing/object_sharing_settings.py +17 -4
  210. office365/sharepoint/sharing/principal.py +10 -0
  211. office365/sharepoint/sharing/securable_object_extensions.py +1 -17
  212. office365/sharepoint/sharing/site_sharing_report_helper.py +2 -1
  213. office365/sharepoint/sharing/user_sharing_result.py +18 -8
  214. office365/sharepoint/sitehealth/result.py +10 -0
  215. office365/sharepoint/sites/language.py +11 -1
  216. office365/sharepoint/sites/language_collection.py +1 -0
  217. office365/sharepoint/sites/site.py +34 -6
  218. office365/sharepoint/tenant/administration/audit/search_request_status.py +8 -0
  219. office365/sharepoint/tenant/administration/hubsites/permission.py +10 -0
  220. office365/sharepoint/tenant/administration/tenant.py +1 -0
  221. office365/sharepoint/tenant/apps/information.py +3 -1
  222. office365/sharepoint/tenant/management/office365_tenant.py +0 -1
  223. office365/sharepoint/types/resource_path.py +3 -1
  224. office365/sharepoint/userprofiles/people_manager.py +0 -2
  225. office365/sharepoint/userprofiles/sharedwithme/document.py +16 -0
  226. office365/sharepoint/userprofiles/sharedwithme/document_user.py +12 -0
  227. office365/sharepoint/userprofiles/sharedwithme/item_collection.py +41 -0
  228. office365/sharepoint/userprofiles/sharedwithme/items.py +18 -1
  229. office365/sharepoint/webs/web.py +2 -3
  230. office365/subscriptions/collection.py +12 -6
  231. office365/subscriptions/subscription.py +119 -1
  232. office365/teams/channels/iIdentity.py +5 -0
  233. office365/teams/chats/collection.py +1 -2
  234. office365/teams/chats/messages/info.py +9 -0
  235. office365/teams/chats/messages/message.py +17 -2
  236. office365/teams/members/aad_user_conversation.py +2 -2
  237. office365/teams/members/conversation_collection.py +3 -3
  238. office365/teams/schedule/change_tracked_entity.py +11 -2
  239. office365/teams/tabs/configuration.py +12 -1
  240. office365/teams/tabs/tab.py +0 -1
  241. office365/teams/team.py +23 -1
  242. office365/teams/teamwork/__init__.py +0 -0
  243. office365/teams/teamwork/activity_topic.py +5 -0
  244. office365/teams/teamwork/tags/__init__.py +0 -0
  245. office365/teams/teamwork/tags/member.py +5 -0
  246. office365/{directory/security/cases_root.py → teams/viva/employee_experience_user.py} +1 -1
  247. office365/intune/devices/management.py +0 -35
  248. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/LICENSE +0 -0
  249. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/WHEEL +0 -0
  250. {Office365_REST_Python_Client-2.4.3.dist-info → Office365_REST_Python_Client-2.4.4.dist-info}/top_level.txt +0 -0
  251. /office365/{teams/messages → directory/security/cases}/__init__.py +0 -0
  252. /office365/{teams/tags → directory/synchronization}/__init__.py +0 -0
  253. /office365/teams/{tags → teamwork/tags}/identity.py +0 -0
  254. /office365/teams/{tags → teamwork/tags}/tag.py +0 -0
  255. /office365/teams/{user_teamwork.py → teamwork/user.py} +0 -0
@@ -3,6 +3,23 @@ from office365.runtime.client_value import ClientValue
3
3
 
4
4
  class ComplianceTagInfo(ClientValue):
5
5
 
6
+ def __init__(self, is_record=None, is_regulatory=None, should_keep=None, tag_name=None, unified_rule_id=None,
7
+ unified_tag_id=None):
8
+ """
9
+ :param bool is_record:
10
+ :param bool is_regulatory:
11
+ :param bool should_keep:
12
+ :param str tag_name:
13
+ :param str unified_rule_id:
14
+ :param str unified_tag_id:
15
+ """
16
+ self.IsRecord = is_record
17
+ self.IsRegulatory = is_regulatory
18
+ self.ShouldKeep = should_keep
19
+ self.TagName = tag_name
20
+ self.UnifiedRuleId = unified_rule_id
21
+ self.UnifiedTagId = unified_tag_id
22
+
6
23
  @property
7
24
  def entity_type_name(self):
8
25
  return "SP.ComplianceFoundation.Models.ComplianceTagInfo"
@@ -45,6 +45,30 @@ class ContentType(BaseEntity):
45
45
  self.context.add_query(qry)
46
46
  return self
47
47
 
48
+ @property
49
+ def client_form_custom_formatter(self):
50
+ """
51
+ :rtype: str
52
+ """
53
+ return self.properties.get("ClientFormCustomFormatter", None)
54
+
55
+ @property
56
+ def display_form_client_side_component_id(self):
57
+ """
58
+ The component ID of an SPFx Form Customizer to connect to this content type for usage with display forms.
59
+ :rtype: str
60
+ """
61
+ return self.properties.get("DisplayFormClientSideComponentId", None)
62
+
63
+ @property
64
+ def display_form_client_side_component_properties(self):
65
+ """
66
+ The component properties of an SPFx Form Customizer to connect to this content type for usage with display forms
67
+ :rtype: str
68
+ """
69
+ return self.properties.get("DisplayFormClientSideComponentProperties", None)
70
+
71
+
48
72
  @property
49
73
  def display_form_template_name(self):
50
74
  """
@@ -60,6 +84,23 @@ class ContentType(BaseEntity):
60
84
  """
61
85
  return self.properties.get("DisplayFormUrl", None)
62
86
 
87
+ @property
88
+ def edit_form_client_side_component_id(self):
89
+ """
90
+ The component properties of an SPFx Form Customizer to connect to this content type for usage with edit item
91
+ forms
92
+ :rtype: str
93
+ """
94
+ return self.properties.get("EditFormClientSideComponentId", None)
95
+
96
+ @property
97
+ def edit_form_client_side_component_properties(self):
98
+ """
99
+ The component ID of an SPFx Form Customizer to connect to this content type for usage with edit item forms
100
+ :rtype: str
101
+ """
102
+ return self.properties.get("EditFormClientSideComponentProperties", None)
103
+
63
104
  @property
64
105
  def id(self):
65
106
  """Specifies an identifier for the content type as specified in [MS-WSSTS] section 2.1.2.8.1.
@@ -91,6 +132,7 @@ class ContentType(BaseEntity):
91
132
  @property
92
133
  def new_form_client_side_component_properties(self):
93
134
  """
135
+ The component properties of an SPFx Form Customizer to connect to this content type for usage with new item forms
94
136
  :rtype: str or None
95
137
  """
96
138
  return self.properties.get("NewFormClientSideComponentProperties", None)
@@ -20,23 +20,22 @@ class FieldLinkCollection(BaseEntityCollection):
20
20
 
21
21
  :param str or office365.sharepoint.fields.field.Field field: Specifies the internal name of the field or type
22
22
  """
23
- def _create_query(field_internal_name):
23
+ def _create_and_add_query(field_internal_name):
24
24
  """
25
25
  :type field_internal_name: str
26
26
  """
27
27
  return_type.set_property("FieldInternalName", field_internal_name)
28
- return CreateEntityQuery(self, return_type, return_type)
28
+ qry = CreateEntityQuery(self, return_type, return_type)
29
+ self.context.add_query(qry)
29
30
 
30
31
  return_type = FieldLink(self.context)
31
32
  self.add_child(return_type)
32
33
  if isinstance(field, Field):
33
34
  def _field_loaded():
34
- next_qry = _create_query(field.internal_name)
35
- self.context.add_query(next_qry)
35
+ _create_and_add_query(field.internal_name)
36
36
  field.ensure_property("InternalName", _field_loaded)
37
37
  else:
38
- qry = _create_query(field)
39
- self.context.add_query(qry)
38
+ _create_and_add_query(field)
40
39
  return return_type
41
40
 
42
41
  def get_by_id(self, _id):
@@ -5,3 +5,5 @@ class KnownFeaturesList:
5
5
  ContentTypeHub = "9a447926-5937-44cb-857a-d3829301c73b"
6
6
 
7
7
  DocId = "b50e3104-6812-424f-a011-cc90e6327318"
8
+
9
+ MetadataNavigationAndFiltering = "7201d6a4-a5d3-49a1-8c19-19c4bac6e668"
@@ -38,35 +38,53 @@ class FieldCollection(BaseEntityCollection):
38
38
  description=description,
39
39
  field_type_kind=FieldType.URL))
40
40
 
41
- def add_lookup_field(self, title, lookup_list_id, lookup_field_name, allow_multiple_values=False):
41
+ def add_lookup_field(self, title, lookup_list, lookup_field_name, allow_multiple_values=False):
42
42
  """
43
43
  Creates a Lookup field
44
44
 
45
- :param bool allow_multiple_values:
46
- :param str lookup_field_name:
47
- :param str lookup_list_id:
48
- :param str title:
45
+ :param bool allow_multiple_values: Flag determines whether to create multi lookup field or not
46
+ :param str lookup_field_name: Specifies the name of the field in the other data source when creating
47
+ a lookup field
48
+ :param str or office365.sharepoint.lists.list.List lookup_list: Lookup List object or identifier
49
+ :param str title: Specifies the display name of the field.
49
50
  """
50
- if allow_multiple_values:
51
- field_schema = '''
52
- <Field Type="LookupMulti" Mult="TRUE" DisplayName="{title}" Required="FALSE" Hidden="TRUE" \
53
- ShowField="{lookup_field_name}" List="{{{lookup_list_id}}}" StaticName="{title}" Name="{title}">
54
- </Field>
55
- '''.format(title=title, lookup_field_name=lookup_field_name, lookup_list_id=lookup_list_id)
56
- return self.create_field_as_xml(field_schema)
51
+ return_type = Field(self.context)
52
+
53
+ def _add_lookup_field(lookup_list_id):
54
+ """
55
+ :type lookup_list_id: str
56
+ """
57
+ if allow_multiple_values:
58
+ field_schema = '''
59
+ <Field Type="LookupMulti" Mult="TRUE" DisplayName="{title}" Required="FALSE" Hidden="TRUE" \
60
+ ShowField="{lookup_field_name}" List="{{{lookup_list_id}}}" StaticName="{title}" Name="{title}">
61
+ </Field>
62
+ '''.format(title=title, lookup_field_name=lookup_field_name, lookup_list_id=lookup_list_id)
63
+ self.create_field_as_xml(field_schema, return_type=return_type)
64
+ else:
65
+ self.add_field(FieldCreationInformation(title=title,
66
+ lookup_list_id=lookup_list_id,
67
+ lookup_field_name=lookup_field_name,
68
+ field_type_kind=FieldType.Lookup),
69
+ return_type=return_type)
70
+
71
+ from office365.sharepoint.lists.list import List
72
+ if isinstance(lookup_list, List):
73
+
74
+ def _lookup_list_loaded():
75
+ _add_lookup_field(lookup_list.id)
76
+ lookup_list.ensure_property("Id", _lookup_list_loaded)
57
77
  else:
58
- return self.add_field(FieldCreationInformation(title=title,
59
- lookup_list_id=lookup_list_id,
60
- lookup_field_name=lookup_field_name,
61
- field_type_kind=FieldType.Lookup))
78
+ _add_lookup_field(lookup_list)
79
+ return return_type
62
80
 
63
81
  def add_choice_field(self, title, values, multiple_values=False):
64
82
  """
65
- Created Choice field
83
+ Creates a Choice field
66
84
 
67
85
  :param bool multiple_values:
68
86
  :param list[str] values:
69
- :param str title:
87
+ :param str title: Specifies the display name of the field.
70
88
  """
71
89
  fld_type = FieldType.MultiChoice if multiple_values else FieldType.Choice
72
90
  create_field_info = FieldCreationInformation(title, fld_type)
@@ -77,7 +95,7 @@ class FieldCollection(BaseEntityCollection):
77
95
  """
78
96
  Creates a User field
79
97
 
80
- :param str title: specifies the display name of the field
98
+ :param str title: Specifies the display name of the field
81
99
  """
82
100
  return self.add_field(FieldCreationInformation(title, FieldType.User))
83
101
 
@@ -90,32 +108,27 @@ class FieldCollection(BaseEntityCollection):
90
108
  """
91
109
  return self.add_field(FieldCreationInformation(title, FieldType.Text))
92
110
 
93
- def add_dependent_lookup_field(self, display_name, primary_lookup_field, lookup_field):
94
- """Adds a secondary lookup field to a field (2) collection.
95
- A reference (3) to the SP.Field that was added is returned.
96
- :param str lookup_field: Name of the field (2) from the target list (1) to include data from.
97
- :param Field primary_lookup_field: Main lookup field to associate the dependent lookup field with.
98
- A dependent lookup field will include data from the list item referred to from the instance of the main
99
- lookup field.
100
- :param str display_name: Title of the added field
111
+ def add_dependent_lookup_field(self, display_name, primary_lookup_field_id, show_field):
112
+ """Adds a secondary lookup field to a field collection (target).
113
+ Args:
114
+ display_name (str): title of the added field in the target FieldCollection.
115
+ primary_lookup_field_id (str): ID of the main lookup-field in the target to associate the dependent lookup field with.
116
+ show_field (str): name of the field from the source list to include data from.
117
+ Returns:
118
+ Field: reference to the SP.Field that was added.
101
119
  """
102
120
  return_type = Field(self.context)
103
121
  self.add_child(return_type)
104
122
  parameters = {
105
123
  "displayName": display_name,
106
- "primaryLookupField": primary_lookup_field,
107
- "lookupField": lookup_field
124
+ "primaryLookupFieldId": primary_lookup_field_id,
125
+ "showField": show_field
108
126
  }
109
- qry = ServiceOperationQuery(self, "AddDependentLookupField", None, parameters, None, return_type)
127
+ qry = ServiceOperationQuery(self, "AddDependentLookupField", None, parameters,
128
+ None, return_type)
110
129
  self.context.add_query(qry)
111
130
  return return_type
112
131
 
113
- def add_taxonomy_field(self, title, description=None):
114
- """
115
- Adds a taxonomy field
116
- """
117
- pass
118
-
119
132
  def add(self, field_create_information):
120
133
  """Adds a fields to the fields collection.
121
134
 
@@ -127,15 +140,18 @@ class FieldCollection(BaseEntityCollection):
127
140
  self.context.add_query(qry)
128
141
  return return_type
129
142
 
130
- def add_field(self, parameters):
143
+ def add_field(self, parameters, return_type=None):
131
144
  """Adds a fields to the fields collection.
132
145
 
133
146
  :type parameters: office365.sharepoint.fields.creation_information.FieldCreationInformation
147
+ :param Field or None return_type: Return type
134
148
  """
135
- return_type = Field(self.context)
149
+ if return_type is None:
150
+ return_type = Field(self.context)
136
151
  self.add_child(return_type)
137
152
  payload = {"parameters": parameters}
138
- qry = ServiceOperationQuery(self, "AddField", None, payload, None, return_type)
153
+ qry = ServiceOperationQuery(self, "AddField", None, payload, None,
154
+ return_type)
139
155
  self.context.add_query(qry)
140
156
  return return_type
141
157
 
@@ -151,7 +167,9 @@ class FieldCollection(BaseEntityCollection):
151
167
 
152
168
  if isinstance(term_set, TermSet):
153
169
  def _term_set_loaded():
154
- TaxonomyField.create(self, name, term_set.id, None, allow_multiple_values, return_type=return_type)
170
+ TaxonomyField.create(self, name, term_set.id, None, allow_multiple_values,
171
+ return_type=return_type)
172
+
155
173
  term_set.ensure_property("id", _term_set_loaded)
156
174
  return return_type
157
175
  else:
@@ -159,6 +177,7 @@ class FieldCollection(BaseEntityCollection):
159
177
  def _term_store_loaded(term_store):
160
178
  TaxonomyField.create(self, name, term_set, term_store.id, allow_multiple_values,
161
179
  return_type=return_type)
180
+
162
181
  self.context.load(self.context.taxonomy.term_store, after_loaded=_term_store_loaded)
163
182
  return return_type
164
183
 
@@ -167,7 +186,7 @@ class FieldCollection(BaseEntityCollection):
167
186
  Creates a field based on the values defined in the parameters input parameter.
168
187
 
169
188
  :param str schema_xml: Specifies the schema that defines the field
170
- :type return_type: Field
189
+ :param Field or None return_type: Return type
171
190
  """
172
191
  if return_type is None:
173
192
  return_type = Field(self.context)
@@ -15,10 +15,11 @@ class FieldCreationInformation(ClientValue):
15
15
  :param str lookup_web_id: Specifies the identifier of the site (2) that contains the list that is the
16
16
  source for the field (2) value.
17
17
  :param bool required: Specifies whether the field (2) requires a value.
18
- :param str lookup_field_name:
19
- :param str lookup_list_id: A CSOM GUID that specifies the target list for the lookup field (2).
20
- :param str title:
21
- :param int field_type_kind: Specifies the type of the field (2).
18
+ :param str lookup_field_name: Specifies the name of the field in the other data source when creating
19
+ a lookup field.
20
+ :param str lookup_list_id: A CSOM GUID that specifies the target list for the lookup field.
21
+ :param str title: Specifies the display name of the field.
22
+ :param int field_type_kind: Specifies the type of the field.
22
23
  :type description: str or None
23
24
  :param str formula:
24
25
  :param list[str] or None choices:
@@ -69,7 +69,8 @@ class Field(BaseEntity):
69
69
 
70
70
  def enable_index(self):
71
71
  """
72
-
72
+ Enables the index for a field
73
+ An index speeds up queries on the indexed fields as well as sorting and grouping operations
73
74
  """
74
75
  return_type = ClientResult(self.context)
75
76
  qry = ServiceOperationQuery(self, "enableIndex", None, None, None, return_type)
@@ -78,7 +79,7 @@ class Field(BaseEntity):
78
79
 
79
80
  def disable_index(self):
80
81
  """
81
-
82
+ Disables the index for a field
82
83
  """
83
84
  return_type = ClientResult(self.context)
84
85
  qry = ServiceOperationQuery(self, "disableIndex", None, None, None, return_type)
@@ -120,6 +121,14 @@ class Field(BaseEntity):
120
121
  """
121
122
  return self.properties.get('Id', None)
122
123
 
124
+ @property
125
+ def auto_indexed(self):
126
+ """
127
+ Gets a Boolean value that specifies whether the field is auto-indexed.
128
+ :rtype: str or None
129
+ """
130
+ return self.properties.get('AutoIndexed', None)
131
+
123
132
  @property
124
133
  def default_formula(self):
125
134
  """
@@ -166,16 +175,16 @@ class Field(BaseEntity):
166
175
 
167
176
  @title.setter
168
177
  def title(self, val):
169
- """Sets a value that specifies the display name of the field.
170
-
178
+ """
179
+ Sets a value that specifies the display name of the field.
171
180
  :rtype: str or None
172
181
  """
173
182
  self.set_property("Title", val)
174
183
 
175
184
  @property
176
185
  def group(self):
177
- """Gets a value that specifies the field group.
178
-
186
+ """
187
+ Gets a value that specifies the field group.
179
188
  :rtype: str or None
180
189
  """
181
190
  return self.properties.get('Group', None)
@@ -183,23 +192,22 @@ class Field(BaseEntity):
183
192
  @group.setter
184
193
  def group(self, val):
185
194
  """Sets a value that specifies the field group.
186
-
187
195
  :rtype: str or None
188
196
  """
189
197
  self.set_property("Group", val)
190
198
 
191
199
  @property
192
200
  def internal_name(self):
193
- """Gets a value that specifies the field internal name.
194
-
201
+ """
202
+ Gets a value that specifies the field internal name.
195
203
  :rtype: str or None
196
204
  """
197
205
  return self.properties.get('InternalName', None)
198
206
 
199
207
  @property
200
208
  def can_be_deleted(self):
201
- """Gets a value that specifies whether the field can be deleted
202
-
209
+ """
210
+ Gets a value that specifies whether the field can be deleted
203
211
  :rtype: bool or None
204
212
  """
205
213
  return self.properties.get('CanBeDeleted', None)
@@ -218,12 +226,42 @@ class Field(BaseEntity):
218
226
  """
219
227
  return self.properties.get('ClientSideComponentProperties', None)
220
228
 
229
+ @property
230
+ def client_validation_formula(self):
231
+ """
232
+ :rtype: str or None
233
+ """
234
+ return self.properties.get('ClientValidationFormula', None)
235
+
236
+ @property
237
+ def enforce_unique_values(self):
238
+ """
239
+ Specifies whether the field enforces unique values.
240
+ :rtype: bool or None
241
+ """
242
+ return self.properties.get('enforceUniqueValues', None)
243
+
244
+ @property
245
+ def filterable(self):
246
+ """
247
+ Specifies whether list items in the list can be filtered by the field value.
248
+ :rtype: bool or None
249
+ """
250
+ return self.properties.get('Filterable', None)
251
+
252
+ @property
253
+ def from_base_type(self):
254
+ """
255
+ Gets a Boolean value that indicates whether the field derives from a base field type.
256
+ :rtype: bool or None
257
+ """
258
+ return self.properties.get('FromBaseType', None)
259
+
221
260
  @property
222
261
  def js_link(self):
223
262
  """
224
263
  When implemented in a derived class, gets or sets the name of an external JavaScript file that contains
225
264
  any client rendering logic for fields of the derived type.
226
-
227
265
  :rtype: str or None
228
266
  """
229
267
  return self.properties.get('JSLink', None)
@@ -232,7 +270,6 @@ class Field(BaseEntity):
232
270
  def hidden(self):
233
271
  """
234
272
  Gets a value that specifies whether the field is hidden in list views and list forms.
235
-
236
273
  :rtype: bool or None
237
274
  """
238
275
  return self.properties.get('Hidden', None)
@@ -244,11 +281,26 @@ class Field(BaseEntity):
244
281
  """
245
282
  self.set_property("Hidden", val)
246
283
 
284
+ @property
285
+ def no_crawl(self):
286
+ """
287
+ Gets value that specifies whether the field can be crawled by a search engine.
288
+ :rtype: bool or None
289
+ """
290
+ return self.properties.get('NoCrawl', None)
291
+
292
+ @property
293
+ def read_only_field(self):
294
+ """
295
+ Specifies whether the value of the field is read-only.
296
+ :rtype: bool or None
297
+ """
298
+ return self.properties.get('ReadOnlyField', None)
299
+
247
300
  @property
248
301
  def default_value(self):
249
302
  """
250
303
  Gets a value that specifies the default value for the field.
251
-
252
304
  :rtype: str or None
253
305
  """
254
306
  return self.properties.get('DefaultValue', None)
@@ -260,11 +312,17 @@ class Field(BaseEntity):
260
312
  """
261
313
  self.set_property("DefaultValue", val)
262
314
 
315
+ @property
316
+ def indexed(self):
317
+ """
318
+ :rtype: str or None
319
+ """
320
+ return self.properties.get('Indexed', None)
321
+
263
322
  @property
264
323
  def type_display_name(self):
265
324
  """
266
325
  Gets a value that specifies the display name for the type of the field.
267
-
268
326
  :rtype: str or None
269
327
  """
270
328
  return self.properties.get('TypeDisplayName', None)
@@ -34,9 +34,9 @@ class FieldUser(FieldLookup):
34
34
 
35
35
  @property
36
36
  def selection_group(self):
37
- """Gets a value that specifies the identifier of the SharePoint group whose members can be selected
38
- as values of the field.
39
-
37
+ """
38
+ Gets a value that specifies the identifier of the SharePoint group whose members can be selected
39
+ as values of the field.
40
40
  :rtype: int or None
41
41
  """
42
42
  return self.properties.get('SelectionGroup', None)
@@ -13,6 +13,7 @@ from office365.sharepoint.files.versions.event import FileVersionEvent
13
13
  from office365.sharepoint.base_entity import BaseEntity
14
14
  from office365.sharepoint.folders.folder import Folder
15
15
  from office365.sharepoint.permissions.irm.effective_settings import EffectiveInformationRightsManagementSettings
16
+ from office365.sharepoint.permissions.irm.file_settings import InformationRightsManagementFileSettings
16
17
  from office365.sharepoint.permissions.irm.settings import InformationRightsManagementSettings
17
18
  from office365.sharepoint.principal.users.user import User
18
19
  from office365.sharepoint.files.versions.collection import FileVersionCollection
@@ -131,18 +132,22 @@ class File(AbstractFile):
131
132
  self.context.add_query(qry)
132
133
  return return_type
133
134
 
134
- def share_link(self, link_kind, expiration=None):
135
+ def share_link(self, link_kind, expiration=None, role=None, password=None):
135
136
  """Creates a tokenized sharing link for a file based on the specified parameters and optionally
136
137
  sends an email to the people that are listed in the specified parameters.
137
138
 
138
139
  :param int link_kind: The kind of the tokenized sharing link to be created/updated or retrieved.
139
- :param datetime or None expiration: A date/time string for which the format conforms to the ISO 8601:2004(E)
140
+ :param datetime.datetime or None expiration: A date/time string for which the format conforms to the ISO 8601:2004(E)
140
141
  complete representation for calendar date and time of day and which represents the time and date of expiry
141
142
  for the tokenized sharing link. Both the minutes and hour value MUST be specified for the difference
142
143
  between the local and UTC time. Midnight is represented as 00:00:00. A null value indicates no expiry.
143
144
  This value is only applicable to tokenized sharing links that are anonymous access links.
145
+ :param int role: The role to be used for the tokenized sharing link. This is required for Flexible links
146
+ and ignored for all other kinds.
147
+ :param str password: Optional password value to apply to the tokenized sharing link,
148
+ if it can support password protection.
144
149
  """
145
- return self.listItemAllFields.share_link(link_kind, expiration)
150
+ return self.listItemAllFields.share_link(link_kind, expiration, role, password)
146
151
 
147
152
  def unshare_link(self, link_kind, share_id=None):
148
153
  """
@@ -676,7 +681,7 @@ class File(AbstractFile):
676
681
  Returns the Information Rights Management (IRM) settings for the file.
677
682
  """
678
683
  return self.properties.get('InformationRightsManagementSettings',
679
- InformationRightsManagementSettings(self.context,
684
+ InformationRightsManagementFileSettings(self.context,
680
685
  ResourcePath(
681
686
  "InformationRightsManagementSettings",
682
687
  self.resource_path)))
@@ -0,0 +1,39 @@
1
+ from office365.runtime.queries.service_operation import ServiceOperationQuery
2
+ from office365.sharepoint.base_entity import BaseEntity
3
+ from office365.sharepoint.folders.folder import Folder
4
+
5
+
6
+ class FolderColoring(BaseEntity):
7
+ """"""
8
+
9
+ def create_folder(self, decoded_url, ensure_unique_file_name=True, overwrite=True, coloring_information=None):
10
+ """
11
+ :param str decoded_url:
12
+ :param bool ensure_unique_file_name:
13
+ :param bool overwrite:
14
+ :param FolderColoringInformation coloring_information:
15
+ """
16
+ return_type = Folder(self.context)
17
+
18
+ payload = {
19
+ "DecodedUrl": decoded_url,
20
+ "EnsureUniqueFileName": ensure_unique_file_name,
21
+ "Overwrite": overwrite,
22
+ "coloringInformation": coloring_information
23
+ }
24
+ qry = ServiceOperationQuery(self, "CreateFolder", parameters_type=payload, return_type=return_type)
25
+ self.context.add_query(qry)
26
+ return return_type
27
+
28
+ def stamp_color(self, decoded_url, coloring_information):
29
+ """
30
+ :param str decoded_url:
31
+ :param FolderColoringInformation coloring_information:
32
+ """
33
+ payload = {
34
+ "DecodedUrl": decoded_url,
35
+ "coloringInformation": coloring_information
36
+ }
37
+ qry = ServiceOperationQuery(self, "StampColor", parameters_type=payload)
38
+ self.context.add_query(qry)
39
+ return self
@@ -0,0 +1,15 @@
1
+ from office365.runtime.client_value import ClientValue
2
+
3
+
4
+ class FolderColoringInformation(ClientValue):
5
+ """"""
6
+
7
+ def __init__(self, color_hex=None, color_tag=None, emoji=None):
8
+ """
9
+ :param str color_hex:
10
+ :param str color_tag:
11
+ :param str emoji:
12
+ """
13
+ self.ColorHex = color_hex
14
+ self.ColorTag = color_tag
15
+ self.Emoji = emoji