Skip to content

Commit c8fd6ea

Browse files
authored
Update site-design-json-schema.md
Post-SPC / May updates: addition of customizer and add principals actions and subactions.
1 parent 7d94b8d commit c8fd6ea

File tree

1 file changed

+165
-5
lines changed

1 file changed

+165
-5
lines changed

docs/declarative-customization/site-design-json-schema.md

Lines changed: 165 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Site design JSON schema
33
description: JSON schema reference for building site designs for SharePoint.
4-
ms.date: 04/20/2018
4+
ms.date: 05/25/2018
55
---
66

77
# Site design JSON schema
@@ -300,6 +300,101 @@ In this example, we are formatting a number column as a data bar.
300300
}
301301
```
302302

303+
### associateFieldCustomizer
304+
305+
Registers field extension for a list field. For more information on these client-side extensions, see [Build field customizer](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-field-customizer) tutorial.
306+
307+
#### JSON values
308+
309+
- **internalName** – The display name of the field to operate on.
310+
- **clientSiteComponentId** – The identifier (GUID) of the extension in the app catalog. This property value can be found in the manifest.json file or in the elements.xml file.
311+
- **clientSiteComponentProperties** – An optional parameter, which can be used to provide properties for the field customizer extension instance.
312+
313+
#### Example
314+
315+
```json
316+
{
317+
"verb": "createSPList",
318+
"listName": "Custom List with Slider Extension",
319+
"templateType": 100,
320+
"subactions": [
321+
{
322+
"verb": "SetDescription",
323+
"description": "Custom list to illustrate SharePoint site scripting"
324+
},
325+
{
326+
"verb": "addSPField",
327+
"fieldType": "Text",
328+
"displayName": "Text Field",
329+
"isRequired": false,
330+
"addToDefaultView": true
331+
},
332+
{
333+
"fieldType": "Number",
334+
"displayName": "Number Field",
335+
"internalName": "ElectricSlide",
336+
"addToDefaultView": true,
337+
"isRequired": true
338+
},
339+
{
340+
"verb": "associateFieldCustomizer",
341+
"internalName": "ElectricSlide",
342+
"clientSideComponentId": "35944670-3111-4482-b152-9e9d1sean9f7",
343+
"clientSideComponentProperties": "{\"sampleText\":\"Yes - added by a site design, what?\"}"
344+
}
345+
]
346+
}
347+
```
348+
349+
### associateListViewCommandSet
350+
351+
Sets column formatting for a field. For more information, see [Use column formatting to customize SharePoint](column-formatting.md).
352+
353+
#### JSON values
354+
355+
- **title** – The title of the extension.
356+
- **___location** – A required parameter to specify where the command is displayed. Options are: ContextMenu or CommandBar.
357+
- **clientSiteComponentId** – The identifier (GUID) of the extension in the app catalog. This property value can be found in the manifest.json file or in the elements.xml file.
358+
- **clientSiteComponentProperties** – An optional parameter, which can be used to provide properties for the extension instance.
359+
360+
361+
#### Example
362+
363+
```json
364+
{
365+
"verb": "createSPList",
366+
"listName": "CustomList",
367+
"templateType": 100,
368+
"subactions": [
369+
{
370+
"verb": "SetDescription",
371+
"description": "Custom list to illustrate SharePoint site scripting"
372+
},
373+
{
374+
"verb": "addSPField",
375+
"fieldType": "Text",
376+
"displayName": "Text Field",
377+
"isRequired": false,
378+
"addToDefaultView": true
379+
},
380+
{
381+
"verb": "addSPField",
382+
"fieldType": "Number",
383+
"displayName": "Number Field",
384+
"internalName": "ElectricSlide",
385+
"addToDefaultView": true,
386+
"isRequired": true
387+
},
388+
{
389+
"verb": "associateListViewCommandSet",
390+
"title": "HelloWorld",
391+
"___location": "CommandBar"
392+
"clientSideComponentId": "13234283-d6c2-408f-a9ef-31a920c8ae78",
393+
"clientSideComponentProperties": "{\"sampleText\":\"added by a site design\"}"
394+
}
395+
]
396+
}
397+
```
303398

304399
## Define a new site column
305400

@@ -538,11 +633,10 @@ Use the **joinHubSite** verb to join the site to a designated hub site.
538633

539634
## Install an add-in or solution
540635

541-
Use the **installSPFXSolution** action to install a deployed add-in or SharePoint Framework solution from the tenant app catalog.
636+
Use the **installSolution** action to install a deployed add-in or SharePoint Framework solution from the tenant app catalog.
542637

543638
#### JSON values
544639

545-
- **id** – The id of the add-in or solution in the tenant app catalog.
546640

547641
#### Example
548642

@@ -551,11 +645,39 @@ Use the **installSPFXSolution** action to install a deployed add-in or SharePoin
551645
552646
```json
553647
{
554-
"verb": "installSPFXSolution",
648+
"verb": "installSolution",
555649
"id": "d40e4edc-a6da-4cd8-b82d-bba970976803"
556650
}
557651
```
558652

653+
## Register an extension
654+
655+
Use the **associateExtension** action to register a deployed SharePoint Framework extension from the tenant app catalog.
656+
657+
> [!NOTE]
658+
> For more details on how to create and configure a SharePoint Framework extension, check out: [Overview of SharePoint Framework Extensions](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/overview-extensions).
659+
660+
#### JSON values
661+
662+
- **title** – The title of the extension in the app catalog.
663+
- **___location** – Used to specify the extension type. If it is used to create commands, then where the command would be displayed; otherwise this should be set to ClientSideExtension.ApplicationCustomizer.
664+
- **clientSiteComponentId** – The identifier (GUID) of the extension in the app catalog. This property value can be found in the manifest.json file or in the elements.xml file.
665+
- **clientSiteComponentProperties** – An optional parameter, which can be used to provide properties for the extension instance.
666+
- **registrationId** – An optional parameter, which indicates the type of the list the extension is associated to (if it is a list extension).
667+
- **registrationType** – An optional parameter, which should be specified if the extension is associated with a list.
668+
- **scope** – Indicates whether the extension is associated with a Web or a Site.
669+
670+
#### Example
671+
672+
```json
673+
{
674+
"verb": "associateExtension",
675+
"title": "SPFXApplicationCustomizer Example",
676+
"___location": "ClientSideExtension.ApplicationCustomizer",
677+
"clientSideComponentId": "40d64749-a6e5-4691-b440-1e32fb6sean5",
678+
"scope": "Web"
679+
}
680+
```
559681

560682
## Trigger a flow
561683

@@ -605,6 +727,44 @@ Use the **setRegionalSettings** action to configure the regional settings of the
605727
}
606728
```
607729

730+
731+
## Add users (principals) to SharePoing Groups
732+
733+
Use the **addPrincipalToGroup** action to manage addition of users and groups to select default SharePoint groups. For more information, see [Understanding SharePoint Groups](https://support.office.com/en-us/article/Understanding-SharePoint-groups-94D9B261-161E-4ACE-829E-ECA1C8CD2EB8). This action can be used for licensed users, security groups, and Office 365 Groups.
734+
735+
#### JSON values
736+
737+
- **principal** – A required parameter to specify the name of the principal (user or group) to add to the SharePoint group.
738+
- **group** – A required parameter to specify the SharePoint group to add the principal to.
739+
740+
#### Example
741+
742+
> [!NOTE]
743+
> This action currently only supports the Visitors (permission level: read), Members (permission level: contribute or edit, depending on the site template), and Owners (permission level: full control) groups. Principals must be added individually.
744+
745+
```json
746+
{
747+
"verb": "addPrincipalToSPGroup",
748+
"principal": "[email protected]", /* user */
749+
"group": "Owners"
750+
},
751+
{
752+
"verb": "addPrincipalToSPGroup",
753+
"principal": "travelops", /* sg */
754+
"group": "Owners"
755+
},
756+
{
757+
"verb": "addPrincipalToSPGroup",
758+
"principal": "itexecutives", /* mail-enabled sg */
759+
"group": "Members"
760+
},
761+
{
762+
"verb": "addPrincipalToSPGroup",
763+
"principal": "[email protected]", /* o365 group */
764+
"group": "Visitors"
765+
}
766+
```
767+
608768
## Manage guest access
609769

610770
Use the **setSiteExternalSharingCapability** action to manage guest access. For more information, see [Manage external sharing for your SharePoint Online environment](https://support.office.com/en-us/article/Manage-external-sharing-for-your-SharePoint-Online-environment-C8A462EB-0723-4B0B-8D0A-70FEAFE4BE85).
@@ -626,4 +786,4 @@ Use the **setSiteExternalSharingCapability** action to manage guest access. For
626786

627787
## See also
628788

629-
- [SharePoint site design and site script overview](site-design-overview.md)
789+
- [SharePoint site design and site script overview](site-design-overview.md)

0 commit comments

Comments
 (0)