File tree Expand file tree Collapse file tree 3 files changed +79
-1
lines changed
Expand file tree Collapse file tree 3 files changed +79
-1
lines changed Original file line number Diff line number Diff line change 1+ import "@typespec/http" ;
2+ import "@typespec/rest" ;
3+ import "@typespec/openapi3" ;
4+
5+ import "../models/common.tsp" ;
6+ import "../models/siteDesigns.tsp" ;
7+
8+ using TypeSpec .Http ;
9+
10+ namespace Graph .Community ;
11+
12+ @ tag ("Site Designs" )
13+ @ route ("/{serverRelativeSiteUrl}/_api/SiteScriptUtility/GetSiteDesigns" )
14+ @ doc ("Gets a list of information about existing site designs." )
15+ @ post
16+ op GetSiteDesigns (... CommonParameters ): SiteDesignCollection ;
17+
18+ @ tag ("Site Designs" )
19+ @ route ("/{serverRelativeSiteUrl}/_api/SiteScriptUtility/GetSiteDesignMetadata" )
20+ @ doc ("Gets information about a specific site design." )
21+ @ post
22+ op GetSiteDesignMetadata (
23+ @ body req : SiteDesignMetadataRequest ,
24+ ... CommonParameters ,
25+ ): SiteDesign ;
Original file line number Diff line number Diff line change @@ -6,9 +6,11 @@ import "@typespec/openapi3";
66import "./controllers/files.tsp" ;
77import "./controllers/hubSites.tsp" ;
88import "./controllers/lists.tsp" ;
9+ import "./controllers/site.tsp" ;
10+ import "./controllers/siteDesigns.tsp" ;
911import "./controllers/sitePages.tsp" ;
1012import "./controllers/web.tsp" ;
11- import "./controllers/site.tsp" ;
13+
1214
1315using TypeSpec .Http ;
1416using TypeSpec .OpenAPI ;
@@ -17,6 +19,15 @@ using TypeSpec.OpenAPI;
1719 title : "Graph.Community SDK for Microsoft SharePoint REST API" ,
1820 version : "5.5.0" ,
1921})
22+ @ tagMetadata (
23+ "Site Designs" ,
24+ #{
25+ description : "Site design and site script REST API." ,
26+ externalDocs : #{
27+ url : "https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-rest-api" ,
28+ },
29+ }
30+ )
2031@ tagMetadata (
2132 "Lists" ,
2233 #{
Original file line number Diff line number Diff line change 1+ import "@typespec/http" ;
2+ import "./common.tsp" ;
3+
4+ using TypeSpec .Http ;
5+
6+ namespace Graph .Community ;
7+
8+ model SiteDesign {
9+ @ format ("uuid" )
10+ DesignPackageId : string ;
11+
12+ DesignType : int32 ;
13+ IsOutOfBoxTemplate : boolean ;
14+ IsTenantAdminOnly : boolean ;
15+ ListColor : int32 ;
16+ ListIcon : int32 ;
17+ PreviewImageAltText : string ;
18+ PreviewImageUrl : string ;
19+ RequiresGroupConnected : boolean ;
20+ RequiresTeamsConnected : boolean ;
21+ RequiresYammerConnected : boolean ;
22+ SiteScriptIds : string [];
23+ SupportedWebTemplates : string [];
24+ TemplateFeatures : string [];
25+ ThumbnailUrl : string ;
26+ Title : string ;
27+ WebTemplate : string ;
28+ Order : string ;
29+ }
30+
31+ model SiteDesignCollection {
32+ ... OkResponse ;
33+ ... Body <CollectionResponse <SiteDesign >>;
34+ }
35+
36+ model SiteDesignMetadataRequest {
37+ /**
38+ * The ID of the site design.
39+ */
40+ @ format ("uuid" )
41+ id : string ;
42+ }
You can’t perform that action at this time.
0 commit comments