19
19
from office365 .sharepoint .marketplace .corporatecuratedgallery .app_upgrade_availability import (
20
20
AppUpgradeAvailability ,
21
21
)
22
+ from office365 .sharepoint .marketplace .corporatecuratedgallery .card_designs import (
23
+ CardDesigns ,
24
+ )
22
25
from office365 .sharepoint .marketplace .corporatecuratedgallery .teams_package_download import (
23
26
TeamsPackageDownload ,
24
27
)
@@ -46,6 +49,7 @@ def add(self, content, overwrite, url=None):
46
49
return return_type
47
50
48
51
def app_from_path (self , path , overwrite ):
52
+ # type: (str, bool) -> File
49
53
"""
50
54
Adds a file to the corporate catalog.
51
55
"""
@@ -66,6 +70,7 @@ def app_requests(self):
66
70
67
71
def download_teams_solution (self , _id ):
68
72
"""
73
+ Downloads a Microsoft Teams solution package associated with an app from the SharePoint App Catalog
69
74
:param int _id:
70
75
"""
71
76
return_type = TeamsPackageDownload (self .context )
@@ -87,6 +92,7 @@ def get_app_by_id(self, item_unique_id):
87
92
88
93
def is_app_upgrade_available (self , _id ):
89
94
"""
95
+ Determines if an upgrade is available for an app in the SharePoint app catalog
90
96
:param int _id:
91
97
"""
92
98
return_type = ClientResult (self .context , AppUpgradeAvailability ())
@@ -98,6 +104,7 @@ def is_app_upgrade_available(self, _id):
98
104
return return_type
99
105
100
106
def upload (self , content , overwrite , url , xor_hash = None ):
107
+ """"""
101
108
payload = {
102
109
"Content" : content ,
103
110
"Overwrite" : overwrite ,
@@ -110,6 +117,7 @@ def upload(self, content, overwrite, url, xor_hash=None):
110
117
111
118
def send_app_request_status_notification_email (self , request_guid ):
112
119
"""
120
+ Sends email notifications about the status of an app request in the corporate app catalog
113
121
:param str request_guid:
114
122
"""
115
123
qry = ServiceOperationQuery (
@@ -128,6 +136,14 @@ def available_apps(self):
128
136
),
129
137
)
130
138
139
+ @property
140
+ def card_designs (self ):
141
+ """Returns the card designs available in this corporate catalog."""
142
+ return self .properties .get (
143
+ "CardDesigns" ,
144
+ CardDesigns (self .context , ResourcePath ("CardDesigns" , self .resource_path )),
145
+ )
146
+
131
147
@property
132
148
def site_collection_app_catalogs_sites (self ):
133
149
"""Returns an accessor to the allow list of site collections allowed to have site collection corporate
@@ -140,10 +156,15 @@ def site_collection_app_catalogs_sites(self):
140
156
),
141
157
)
142
158
159
+ @property
160
+ def entity_type_name (self ):
161
+ return "Microsoft.SharePoint.Marketplace.CorporateCuratedGallery.TenantCorporateCatalogAccessor"
162
+
143
163
def get_property (self , name , default_value = None ):
144
164
if default_value is None :
145
165
property_mapping = {
146
166
"AvailableApps" : self .available_apps ,
167
+ "CardDesigns" : self .card_designs ,
147
168
"SiteCollectionAppCatalogsSites" : self .site_collection_app_catalogs_sites ,
148
169
}
149
170
default_value = property_mapping .get (name , None )
0 commit comments