@pnp/cli-microsoft365 12.0.0-beta.1752794 → 12.0.0-beta.445fe0a
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.
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +19 -2
- package/dist/Command.js +11 -8
- package/dist/cli/cli.js +34 -18
- package/dist/config.js +2 -0
- package/dist/m365/cli/commands/cli-consent.js +9 -2
- package/dist/m365/entra/commands/agent/agent-blueprint-list.js +52 -0
- package/dist/m365/entra/commands/agent/agent-blueprintprincipal-list.js +56 -0
- package/dist/m365/entra/commands/m365group/m365group-add.js +52 -97
- package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +20 -33
- package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +20 -39
- package/dist/m365/entra/commands/m365group/m365group-get.js +20 -41
- package/dist/m365/entra/commands/m365group/m365group-list.js +11 -31
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-clear.js +8 -22
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +9 -25
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-remove.js +21 -43
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-restore.js +21 -41
- package/dist/m365/entra/commands/m365group/m365group-remove.js +25 -46
- package/dist/m365/entra/commands/m365group/m365group-renew.js +19 -32
- package/dist/m365/entra/commands/m365group/m365group-set.js +86 -141
- package/dist/m365/entra/commands/m365group/m365group-teamify.js +20 -43
- package/dist/m365/entra/commands/m365group/m365group-user-add.js +44 -77
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +28 -55
- package/dist/m365/entra/commands/m365group/m365group-user-remove.js +37 -74
- package/dist/m365/entra/commands/m365group/m365group-user-set.js +45 -77
- package/dist/m365/entra/commands.js +2 -0
- package/dist/m365/graph/commands/schemaextension/schemaextension-list.js +14 -16
- package/dist/m365/outlook/commands/calendargroup/calendargroup-add.js +97 -0
- package/dist/m365/outlook/commands/event/event-add.js +324 -0
- package/dist/m365/outlook/commands.js +2 -0
- package/dist/m365/spe/commands/container/container-activate.js +8 -16
- package/dist/m365/spe/commands/container/container-list.js +21 -42
- package/dist/m365/spe/commands/container/container-permission-add.js +114 -0
- package/dist/m365/spe/commands/container/container-permission-remove.js +94 -0
- package/dist/m365/spe/commands/container/container-permission-set.js +90 -0
- package/dist/m365/spe/commands/containertype/containertype-list.js +5 -0
- package/dist/m365/spe/commands.js +3 -0
- package/dist/m365/spfx/commands/SpfxCompatibilityMatrix.js +30 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.24.0.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.24.1.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +3 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012021_TSC_excludeDirectories.js +43 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN027002_OVERRIDES_qs.js +33 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN027003_OVERRIDES_uuid.js +33 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN027004_OVERRIDES_serialize_javascript.js +34 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.24.0.js +77 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.24.1.js +57 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +3 -1
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +38 -71
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +25 -59
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-list.js +11 -34
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +25 -54
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +52 -83
- package/dist/m365/spo/commands/apppage/apppage-add.js +21 -39
- package/dist/m365/spo/commands/apppage/apppage-set.js +20 -30
- package/dist/m365/spo/commands/commandset/commandset-add.js +17 -59
- package/dist/m365/spo/commands/commandset/commandset-get.js +24 -62
- package/dist/m365/spo/commands/commandset/commandset-list.js +11 -34
- package/dist/m365/spo/commands/commandset/commandset-remove.js +21 -54
- package/dist/m365/spo/commands/commandset/commandset-set.js +30 -83
- package/dist/m365/spo/commands/contenttype/contenttype-add.js +22 -51
- package/dist/m365/spo/commands/contenttype/contenttype-field-list.js +38 -62
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +25 -54
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +20 -43
- package/dist/m365/spo/commands/contenttype/contenttype-get.js +29 -54
- package/dist/m365/spo/commands/contenttype/contenttype-list.js +13 -30
- package/dist/m365/spo/commands/contenttype/contenttype-remove.js +24 -39
- package/dist/m365/spo/commands/contenttype/contenttype-set.js +42 -63
- package/dist/m365/spo/commands/contenttype/contenttype-sync.js +37 -59
- package/dist/m365/spo/commands/contenttypehub/contenttypehub-get.js +5 -0
- package/dist/m365/spo/commands/customaction/customaction-add.js +124 -145
- package/dist/m365/spo/commands/customaction/customaction-clear.js +12 -43
- package/dist/m365/spo/commands/customaction/customaction-get.js +28 -59
- package/dist/m365/spo/commands/customaction/customaction-list.js +12 -42
- package/dist/m365/spo/commands/customaction/customaction-remove.js +26 -54
- package/dist/m365/spo/commands/customaction/customaction-set.js +75 -132
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +39 -65
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-list.js +28 -56
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +40 -68
- package/dist/m365/spo/commands/externaluser/externaluser-list.js +29 -80
- package/dist/m365/spo/commands/group/group-add.js +19 -60
- package/dist/m365/spo/commands/group/group-get.js +32 -45
- package/dist/m365/spo/commands/group/group-list.js +13 -27
- package/dist/m365/spo/commands/group/group-member-add.js +52 -84
- package/dist/m365/spo/commands/group/group-member-list.js +24 -38
- package/dist/m365/spo/commands/group/group-member-remove.js +49 -68
- package/dist/m365/spo/commands/group/group-remove.js +25 -45
- package/dist/m365/spo/commands/group/group-set.js +36 -79
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-get.js +5 -0
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +8 -22
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +10 -18
- package/dist/m365/spo/commands/listitem/listitem-add.js +27 -55
- package/dist/m365/spo/commands/listitem/listitem-attachment-add.js +30 -58
- package/dist/m365/spo/commands/listitem/listitem-attachment-get.js +27 -52
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +26 -50
- package/dist/m365/spo/commands/listitem/listitem-attachment-remove.js +28 -55
- package/dist/m365/spo/commands/listitem/listitem-attachment-set.js +30 -57
- package/dist/m365/spo/commands/listitem/listitem-batch-add.js +36 -58
- package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +68 -92
- package/dist/m365/spo/commands/listitem/listitem-batch-set.js +37 -57
- package/dist/m365/spo/commands/listitem/listitem-get.js +45 -68
- package/dist/m365/spo/commands/listitem/listitem-isrecord.js +31 -55
- package/dist/m365/spo/commands/listitem/listitem-list.js +47 -81
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +37 -60
- package/dist/m365/spo/commands/listitem/listitem-record-lock.js +30 -52
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +31 -52
- package/dist/m365/spo/commands/listitem/listitem-record-unlock.js +30 -52
- package/dist/m365/spo/commands/listitem/listitem-remove.js +33 -61
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-ensure.js +46 -67
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +33 -56
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +55 -98
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +48 -74
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +33 -56
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +31 -53
- package/dist/m365/spo/commands/listitem/listitem-set.js +33 -58
- package/dist/m365/spo/commands/navigation/navigation-node-add.js +74 -120
- package/dist/m365/spo/commands/navigation/navigation-node-get.js +4 -13
- package/dist/m365/spo/commands/navigation/navigation-node-list.js +1 -1
- package/dist/m365/spo/commands/navigation/navigation-node-remove.js +13 -47
- package/dist/m365/spo/commands/navigation/navigation-node-set.js +53 -114
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +15 -49
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.js +6 -1
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +9 -17
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-list.js +5 -0
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +11 -27
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-set.js +10 -18
- package/dist/m365/spo/commands/page/page-column-list.js +7 -8
- package/dist/m365/spo/commands/page/page-section-list.js +15 -17
- package/dist/m365/spo/commands/page/page-unpublish.js +53 -0
- package/dist/m365/spo/commands/propertybag/propertybag-get.js +14 -29
- package/dist/m365/spo/commands/propertybag/propertybag-list.js +13 -27
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +15 -32
- package/dist/m365/spo/commands/propertybag/propertybag-set.js +15 -31
- package/dist/m365/spo/commands/roledefinition/roledefinition-add.js +45 -44
- package/dist/m365/spo/commands/roledefinition/roledefinition-get.js +14 -25
- package/dist/m365/spo/commands/roledefinition/roledefinition-list.js +12 -18
- package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +15 -35
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-add.js +9 -17
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-list.js +5 -0
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +9 -17
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +29 -39
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.js +10 -23
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.js +5 -0
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +19 -28
- package/dist/m365/spo/commands/sitedesign/sitedesign-add.js +24 -59
- package/dist/m365/spo/commands/sitedesign/sitedesign-apply.js +10 -34
- package/dist/m365/spo/commands/sitedesign/sitedesign-get.js +19 -36
- package/dist/m365/spo/commands/sitedesign/sitedesign-list.js +8 -0
- package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +9 -32
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-grant.js +10 -31
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-list.js +8 -23
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +10 -34
- package/dist/m365/spo/commands/sitedesign/sitedesign-run-list.js +9 -38
- package/dist/m365/spo/commands/sitedesign/sitedesign-run-status-get.js +9 -29
- package/dist/m365/spo/commands/sitedesign/sitedesign-set.js +27 -80
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-get.js +8 -23
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-list.js +8 -18
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +9 -32
- package/dist/m365/spo/commands/sitescript/sitescript-add.js +22 -37
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +9 -26
- package/dist/m365/spo/commands/sitescript/sitescript-list.js +5 -0
- package/dist/m365/spo/commands/sitescript/sitescript-remove.js +9 -33
- package/dist/m365/spo/commands/sitescript/sitescript-set.js +29 -56
- package/dist/m365/spo/commands/spo-search.js +43 -116
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +15 -46
- package/dist/m365/spo/commands/tenant/tenant-appcatalogurl-get.js +5 -0
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +20 -57
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +25 -49
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-list.js +5 -1
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +25 -49
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +47 -79
- package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +23 -54
- package/dist/m365/spo/commands/tenant/tenant-commandset-get.js +25 -50
- package/dist/m365/spo/commands/tenant/tenant-commandset-list.js +5 -1
- package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +25 -49
- package/dist/m365/spo/commands/tenant/tenant-commandset-set.js +41 -65
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-list.js +5 -0
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +10 -30
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +8 -21
- package/dist/m365/spo/commands/tenant/tenant-settings-list.js +5 -0
- package/dist/m365/spo/commands/tenant/tenant-settings-set.js +104 -386
- package/dist/m365/spo/commands/term/term-add.js +95 -110
- package/dist/m365/spo/commands/term/term-get.js +63 -75
- package/dist/m365/spo/commands/term/term-group-add.js +11 -41
- package/dist/m365/spo/commands/term/term-group-get.js +16 -47
- package/dist/m365/spo/commands/term/term-group-list.js +16 -42
- package/dist/m365/spo/commands/term/term-list.js +42 -57
- package/dist/m365/spo/commands/term/term-set-add.js +50 -71
- package/dist/m365/spo/commands/term/term-set-get.js +41 -58
- package/dist/m365/spo/commands/term/term-set-list.js +22 -56
- package/dist/m365/spo/commands/theme/theme-apply.js +27 -43
- package/dist/m365/spo/commands/theme/theme-get.js +8 -15
- package/dist/m365/spo/commands/theme/theme-list.js +5 -0
- package/dist/m365/spo/commands/theme/theme-remove.js +9 -24
- package/dist/m365/spo/commands/theme/theme-set.js +12 -34
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/spp/commands/contentcenter/contentcenter-list.js +5 -0
- package/dist/m365/spp/commands/model/model-get.js +25 -45
- package/dist/m365/spp/commands/model/model-list.js +12 -23
- package/dist/m365/spp/commands/model/model-remove.js +25 -45
- package/dist/m365/teams/commands/app/app-install.js +35 -44
- package/dist/m365/teams/commands/app/app-list.js +8 -33
- package/dist/m365/teams/commands/app/app-publish.js +21 -27
- package/dist/m365/teams/commands/app/app-remove.js +22 -39
- package/dist/m365/teams/commands/app/app-uninstall.js +12 -34
- package/dist/m365/teams/commands/app/app-update.js +35 -45
- package/dist/m365/teams/commands/funsettings/funsettings-list.js +12 -23
- package/dist/m365/teams/commands/funsettings/funsettings-set.js +18 -54
- package/dist/m365/teams/commands/guestsettings/guestsettings-list.js +12 -23
- package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +15 -40
- package/dist/m365/teams/commands/meeting/meeting-add.js +57 -68
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-get.js +33 -58
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +14 -38
- package/dist/m365/teams/commands/meeting/meeting-get.js +14 -38
- package/dist/m365/teams/commands/meeting/meeting-list.js +34 -59
- package/dist/m365/teams/commands/meeting/meeting-transcript-get.js +34 -58
- package/dist/m365/teams/commands/meeting/meeting-transcript-list.js +29 -50
- package/dist/m365/teams/commands/membersettings/membersettings-list.js +12 -23
- package/dist/m365/teams/commands/membersettings/membersettings-set.js +18 -49
- package/dist/m365/teams/commands/message/message-get.js +19 -30
- package/dist/m365/teams/commands/message/message-list.js +26 -43
- package/dist/m365/teams/commands/message/message-remove.js +43 -58
- package/dist/m365/teams/commands/message/message-reply-list.js +19 -30
- package/dist/m365/teams/commands/message/message-restore.js +40 -50
- package/dist/m365/teams/commands/message/message-send.js +19 -30
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-list.js +12 -23
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +18 -60
- package/dist/m365/teams/commands/report/report-deviceusagedistributionusercounts.js +10 -0
- package/dist/m365/teams/commands/report/report-deviceusageusercounts.js +10 -0
- package/dist/m365/teams/commands/report/report-deviceusageuserdetail.js +22 -0
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +19 -39
- package/dist/m365/teams/commands/report/report-pstncalls.js +19 -39
- package/dist/m365/teams/commands/report/report-useractivitycounts.js +10 -0
- package/dist/m365/teams/commands/report/report-useractivityusercounts.js +10 -0
- package/dist/m365/teams/commands/report/report-useractivityuserdetail.js +22 -0
- package/dist/m365/teams/commands/tab/tab-add.js +23 -49
- package/dist/m365/teams/commands/tab/tab-get.js +55 -56
- package/dist/m365/teams/commands/tab/tab-list.js +17 -28
- package/dist/m365/teams/commands/tab/tab-remove.js +23 -42
- package/dist/m365/teams/commands/team/team-add.js +76 -114
- package/dist/m365/teams/commands/team/team-app-list.js +23 -36
- package/dist/m365/teams/commands/team/team-archive.js +24 -39
- package/dist/m365/teams/commands/team/team-clone.js +28 -62
- package/dist/m365/teams/commands/team/team-get.js +23 -36
- package/dist/m365/teams/commands/team/team-list.js +43 -57
- package/dist/m365/teams/commands/team/team-remove.js +24 -37
- package/dist/m365/teams/commands/team/team-set.js +23 -52
- package/dist/m365/teams/commands/team/team-unarchive.js +23 -28
- package/dist/m365/teams/commands/user/user-app-add.js +40 -49
- package/dist/m365/teams/commands/user/user-app-list.js +26 -39
- package/dist/m365/teams/commands/user/user-app-remove.js +37 -49
- package/dist/m365/teams/commands/user/user-app-upgrade.js +36 -52
- package/dist/m365/teams/commands/user/user-list.js +17 -39
- package/dist/m365/tenant/commands/id/id-get.js +8 -22
- package/dist/m365/tenant/commands/info/info-get.js +23 -36
- package/dist/m365/tenant/commands/people/people-profilecardproperty-add.js +67 -55
- package/dist/m365/tenant/commands/people/people-profilecardproperty-get.js +11 -24
- package/dist/m365/tenant/commands/people/people-profilecardproperty-list.js +5 -0
- package/dist/m365/tenant/commands/people/people-profilecardproperty-remove.js +12 -33
- package/dist/m365/tenant/commands/people/people-profilecardproperty-set.js +31 -51
- package/dist/m365/tenant/commands/people/people-pronouns-get.js +5 -0
- package/dist/m365/tenant/commands/people/profileCardProperties.js +10 -7
- package/dist/m365/tenant/commands/report/report-activeusercounts.js +2 -1
- package/dist/m365/tenant/commands/report/report-activeuserdetail.js +2 -1
- package/dist/m365/tenant/commands/report/report-office365activationcounts.js +9 -0
- package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +9 -0
- package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +9 -0
- package/dist/m365/tenant/commands/report/report-servicesusercounts.js +2 -1
- package/dist/m365/tenant/commands/report/report-settings-get.js +5 -0
- package/dist/m365/tenant/commands/security/security-alerts-list.js +8 -20
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.js +9 -20
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-list.js +8 -20
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-get.js +8 -15
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-list.js +8 -15
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-get.js +12 -26
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-list.js +8 -22
- package/dist/utils/calendar.js +1 -1
- package/dist/utils/formatting.js +16 -0
- package/dist/utils/pid.js +7 -16
- package/dist/utils/spe.js +1 -1
- package/dist/utils/spo.js +39 -0
- package/dist/utils/validation.js +36 -0
- package/dist/utils/zod.js +18 -7
- package/docs/docs/cmd/entra/agent/agent-blueprint-list.mdx +175 -0
- package/docs/docs/cmd/entra/agent/agent-blueprintprincipal-list.mdx +156 -0
- package/docs/docs/cmd/login.mdx +15 -2
- package/docs/docs/cmd/outlook/calendargroup/calendargroup-add.mdx +126 -0
- package/docs/docs/cmd/outlook/event/event-add.mdx +390 -0
- package/docs/docs/cmd/spe/container/container-add.mdx +0 -8
- package/docs/docs/cmd/spe/container/container-list.mdx +0 -8
- package/docs/docs/cmd/spe/container/container-permission-add.mdx +140 -0
- package/docs/docs/cmd/spe/container/container-permission-remove.mdx +78 -0
- package/docs/docs/cmd/spe/container/container-permission-set.mdx +78 -0
- package/docs/docs/cmd/spe/container/container-recyclebinitem-list.mdx +0 -8
- package/docs/docs/cmd/spe/container/container-recyclebinitem-restore.mdx +0 -8
- package/docs/docs/cmd/spe/container/container-remove.mdx +0 -8
- package/docs/docs/cmd/spe/containertype/containertype-add.mdx +1 -1
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +1 -1
- package/docs/docs/cmd/spo/externaluser/externaluser-list.mdx +17 -30
- package/docs/docs/cmd/spo/navigation/navigation-node-add.mdx +45 -30
- package/docs/docs/cmd/spo/navigation/navigation-node-get.mdx +64 -42
- package/docs/docs/cmd/spo/navigation/navigation-node-set.mdx +10 -8
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.mdx +0 -21
- package/docs/docs/cmd/spo/page/page-unpublish.mdx +63 -0
- package/docs/docs/cmd/teams/tab/tab-add.mdx +19 -0
- package/docs/docs/cmd/teams/tab/tab-get.mdx +19 -0
- package/docs/docs/cmd/teams/tab/tab-list.mdx +19 -0
- package/docs/docs/cmd/teams/tab/tab-remove.mdx +21 -0
- package/docs/docs/cmd/viva/engage/engage-message-add.mdx +17 -0
- package/docs/docs/cmd/viva/engage/engage-message-get.mdx +17 -0
- package/docs/docs/cmd/viva/engage/engage-message-list.mdx +17 -0
- package/docs/docs/cmd/viva/engage/engage-message-remove.mdx +19 -0
- package/package.json +4 -6
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoContentTypeRemoveCommand_instances, _SpoContentTypeRemoveCommand_initTelemetry, _SpoContentTypeRemoveCommand_initOptions, _SpoContentTypeRemoveCommand_initValidators, _SpoContentTypeRemoveCommand_initTypes, _SpoContentTypeRemoveCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
6
|
import { validation } from '../../../../utils/validation.js';
|
|
11
7
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
12
8
|
import commands from '../../commands.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
webUrl: z.string()
|
|
12
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
13
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
14
|
+
})
|
|
15
|
+
.alias('u'),
|
|
16
|
+
id: z.string().optional().alias('i'),
|
|
17
|
+
name: z.string().optional().alias('n'),
|
|
18
|
+
force: z.boolean().optional().alias('f')
|
|
19
|
+
});
|
|
13
20
|
class SpoContentTypeRemoveCommand extends SpoCommand {
|
|
14
21
|
get name() {
|
|
15
22
|
return commands.CONTENTTYPE_REMOVE;
|
|
@@ -17,14 +24,17 @@ class SpoContentTypeRemoveCommand extends SpoCommand {
|
|
|
17
24
|
get description() {
|
|
18
25
|
return 'Deletes site content type';
|
|
19
26
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
get schema() {
|
|
28
|
+
return options;
|
|
29
|
+
}
|
|
30
|
+
getRefinedSchema(schema) {
|
|
31
|
+
return schema.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
|
|
32
|
+
error: `Specify either 'id' or 'name', but not both.`,
|
|
33
|
+
params: {
|
|
34
|
+
customCode: 'optionSet',
|
|
35
|
+
options: ['id', 'name']
|
|
36
|
+
}
|
|
37
|
+
});
|
|
28
38
|
}
|
|
29
39
|
async commandAction(logger, args) {
|
|
30
40
|
let contentTypeId = '';
|
|
@@ -92,30 +102,5 @@ class SpoContentTypeRemoveCommand extends SpoCommand {
|
|
|
92
102
|
}
|
|
93
103
|
}
|
|
94
104
|
}
|
|
95
|
-
_SpoContentTypeRemoveCommand_instances = new WeakSet(), _SpoContentTypeRemoveCommand_initTelemetry = function _SpoContentTypeRemoveCommand_initTelemetry() {
|
|
96
|
-
this.telemetry.push((args) => {
|
|
97
|
-
Object.assign(this.telemetryProperties, {
|
|
98
|
-
id: typeof args.options.id !== 'undefined',
|
|
99
|
-
name: typeof args.options.name !== 'undefined',
|
|
100
|
-
force: (!(!args.options.force)).toString()
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
}, _SpoContentTypeRemoveCommand_initOptions = function _SpoContentTypeRemoveCommand_initOptions() {
|
|
104
|
-
this.options.unshift({
|
|
105
|
-
option: '-u, --webUrl <webUrl>'
|
|
106
|
-
}, {
|
|
107
|
-
option: '-i, --id [id]'
|
|
108
|
-
}, {
|
|
109
|
-
option: '-n, --name [name]'
|
|
110
|
-
}, {
|
|
111
|
-
option: '-f, --force'
|
|
112
|
-
});
|
|
113
|
-
}, _SpoContentTypeRemoveCommand_initValidators = function _SpoContentTypeRemoveCommand_initValidators() {
|
|
114
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
|
|
115
|
-
}, _SpoContentTypeRemoveCommand_initTypes = function _SpoContentTypeRemoveCommand_initTypes() {
|
|
116
|
-
this.types.string.push('id', 'i');
|
|
117
|
-
}, _SpoContentTypeRemoveCommand_initOptionSets = function _SpoContentTypeRemoveCommand_initOptionSets() {
|
|
118
|
-
this.optionSets.push({ options: ['id', 'name'] });
|
|
119
|
-
};
|
|
120
105
|
export default new SpoContentTypeRemoveCommand();
|
|
121
106
|
//# sourceMappingURL=contenttype-remove.js.map
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoContentTypeSetCommand_instances, _SpoContentTypeSetCommand_initTelemetry, _SpoContentTypeSetCommand_initOptions, _SpoContentTypeSetCommand_initValidators, _SpoContentTypeSetCommand_initTypes, _SpoContentTypeSetCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import config from '../../../../config.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { formatting } from '../../../../utils/formatting.js';
|
|
@@ -12,6 +8,23 @@ import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
|
12
8
|
import { validation } from '../../../../utils/validation.js';
|
|
13
9
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
14
10
|
import commands from '../../commands.js';
|
|
11
|
+
export const options = z.object({
|
|
12
|
+
...globalOptionsZod.shape,
|
|
13
|
+
webUrl: z.string()
|
|
14
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
15
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
16
|
+
})
|
|
17
|
+
.alias('u'),
|
|
18
|
+
id: z.string().optional().alias('i'),
|
|
19
|
+
name: z.string().optional().alias('n'),
|
|
20
|
+
listTitle: z.string().optional(),
|
|
21
|
+
listId: z.string()
|
|
22
|
+
.refine(id => validation.isValidGuid(id), {
|
|
23
|
+
error: e => `'${e.input}' is not a valid GUID.`
|
|
24
|
+
}).optional(),
|
|
25
|
+
listUrl: z.string().optional(),
|
|
26
|
+
updateChildren: z.boolean().optional()
|
|
27
|
+
}).catchall(z.unknown());
|
|
15
28
|
class SpoContentTypeSetCommand extends SpoCommand {
|
|
16
29
|
get name() {
|
|
17
30
|
return commands.CONTENTTYPE_SET;
|
|
@@ -19,14 +32,29 @@ class SpoContentTypeSetCommand extends SpoCommand {
|
|
|
19
32
|
get description() {
|
|
20
33
|
return 'Updates an existing content type';
|
|
21
34
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
get schema() {
|
|
36
|
+
return options;
|
|
37
|
+
}
|
|
38
|
+
getRefinedSchema(schema) {
|
|
39
|
+
return schema
|
|
40
|
+
.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
|
|
41
|
+
error: `Specify either 'id' or 'name', but not both.`,
|
|
42
|
+
params: {
|
|
43
|
+
customCode: 'optionSet',
|
|
44
|
+
options: ['id', 'name']
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
.refine(opts => [opts.listId, opts.listTitle, opts.listUrl].filter(x => x !== undefined).length <= 1, {
|
|
48
|
+
error: `Specify either listTitle, listId or listUrl.`,
|
|
49
|
+
params: {
|
|
50
|
+
customCode: 'optionSet',
|
|
51
|
+
options: ['listId', 'listTitle', 'listUrl']
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
.refine(opts => !(opts.listId || opts.listTitle || opts.listUrl) || !opts.updateChildren, {
|
|
55
|
+
error: 'It is impossible to pass updateChildren when trying to update a list content type.',
|
|
56
|
+
path: ['updateChildren']
|
|
57
|
+
});
|
|
30
58
|
}
|
|
31
59
|
allowUnknownOptions() {
|
|
32
60
|
return true;
|
|
@@ -134,54 +162,5 @@ class SpoContentTypeSetCommand extends SpoCommand {
|
|
|
134
162
|
return baseString + await spo.getListId(options.webUrl, options.listTitle, options.listUrl, logger, this.verbose);
|
|
135
163
|
}
|
|
136
164
|
}
|
|
137
|
-
_SpoContentTypeSetCommand_instances = new WeakSet(), _SpoContentTypeSetCommand_initTelemetry = function _SpoContentTypeSetCommand_initTelemetry() {
|
|
138
|
-
this.telemetry.push((args) => {
|
|
139
|
-
Object.assign(this.telemetryProperties, {
|
|
140
|
-
id: typeof args.options.id !== 'undefined',
|
|
141
|
-
name: typeof args.options.name !== 'undefined',
|
|
142
|
-
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
143
|
-
listId: typeof args.options.listId !== 'undefined',
|
|
144
|
-
listUrl: typeof args.options.listUrl !== 'undefined',
|
|
145
|
-
updateChildren: args.options.updateChildren
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
}, _SpoContentTypeSetCommand_initOptions = function _SpoContentTypeSetCommand_initOptions() {
|
|
149
|
-
this.options.unshift({
|
|
150
|
-
option: '-u, --webUrl <webUrl>'
|
|
151
|
-
}, {
|
|
152
|
-
option: '-i, --id [id]'
|
|
153
|
-
}, {
|
|
154
|
-
option: '-n, --name [name]'
|
|
155
|
-
}, {
|
|
156
|
-
option: '--listTitle [listTitle]'
|
|
157
|
-
}, {
|
|
158
|
-
option: '--listId [listId]'
|
|
159
|
-
}, {
|
|
160
|
-
option: '--listUrl [listUrl]'
|
|
161
|
-
}, {
|
|
162
|
-
option: '--updateChildren'
|
|
163
|
-
});
|
|
164
|
-
}, _SpoContentTypeSetCommand_initValidators = function _SpoContentTypeSetCommand_initValidators() {
|
|
165
|
-
this.validators.push(async (args) => {
|
|
166
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
167
|
-
if (isValidSharePointUrl !== true) {
|
|
168
|
-
return isValidSharePointUrl;
|
|
169
|
-
}
|
|
170
|
-
if (args.options.listId && !validation.isValidGuid(args.options.listId)) {
|
|
171
|
-
return `'${args.options.listId}' is not a valid GUID.`;
|
|
172
|
-
}
|
|
173
|
-
if ((args.options.listId && (args.options.listTitle || args.options.listUrl)) || (args.options.listTitle && args.options.listUrl)) {
|
|
174
|
-
return `Specify either listTitle, listId or listUrl.`;
|
|
175
|
-
}
|
|
176
|
-
if ((args.options.listId || args.options.listTitle || args.options.listUrl) && args.options.updateChildren) {
|
|
177
|
-
return 'It is impossible to pass updateChildren when trying to update a list content type.';
|
|
178
|
-
}
|
|
179
|
-
return true;
|
|
180
|
-
});
|
|
181
|
-
}, _SpoContentTypeSetCommand_initTypes = function _SpoContentTypeSetCommand_initTypes() {
|
|
182
|
-
this.types.string.push('id', 'i');
|
|
183
|
-
}, _SpoContentTypeSetCommand_initOptionSets = function _SpoContentTypeSetCommand_initOptionSets() {
|
|
184
|
-
this.optionSets.push({ options: ['id', 'name'] });
|
|
185
|
-
};
|
|
186
165
|
export default new SpoContentTypeSetCommand();
|
|
187
166
|
//# sourceMappingURL=contenttype-set.js.map
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoContentTypeSyncCommand_instances, _SpoContentTypeSyncCommand_initTelemetry, _SpoContentTypeSyncCommand_initOptions, _SpoContentTypeSyncCommand_initValidators, _SpoContentTypeSyncCommand_initTypes, _SpoContentTypeSyncCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { formatting } from '../../../../utils/formatting.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -11,6 +7,22 @@ import SpoCommand from '../../../base/SpoCommand.js';
|
|
|
11
7
|
import commands from '../../commands.js';
|
|
12
8
|
import { odata } from '../../../../utils/odata.js';
|
|
13
9
|
import { spo } from '../../../../utils/spo.js';
|
|
10
|
+
export const options = z.strictObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
12
|
+
webUrl: z.string()
|
|
13
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
14
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
15
|
+
})
|
|
16
|
+
.alias('u'),
|
|
17
|
+
id: z.string().optional().alias('i'),
|
|
18
|
+
name: z.string().optional().alias('n'),
|
|
19
|
+
listTitle: z.string().optional(),
|
|
20
|
+
listId: z.string()
|
|
21
|
+
.refine(id => validation.isValidGuid(id), {
|
|
22
|
+
error: e => `${e.input} is not a valid GUID`
|
|
23
|
+
}).optional(),
|
|
24
|
+
listUrl: z.string().optional()
|
|
25
|
+
});
|
|
14
26
|
class SpoContentTypeSyncCommand extends SpoCommand {
|
|
15
27
|
get name() {
|
|
16
28
|
return commands.CONTENTTYPE_SYNC;
|
|
@@ -18,14 +30,25 @@ class SpoContentTypeSyncCommand extends SpoCommand {
|
|
|
18
30
|
get description() {
|
|
19
31
|
return 'Adds a published content type from the content type hub to a site or syncs its latest changes';
|
|
20
32
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
get schema() {
|
|
34
|
+
return options;
|
|
35
|
+
}
|
|
36
|
+
getRefinedSchema(schema) {
|
|
37
|
+
return schema
|
|
38
|
+
.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
|
|
39
|
+
error: `Specify either 'id' or 'name', but not both.`,
|
|
40
|
+
params: {
|
|
41
|
+
customCode: 'optionSet',
|
|
42
|
+
options: ['id', 'name']
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
.refine(opts => [opts.listId, opts.listTitle, opts.listUrl].filter(x => x !== undefined).length <= 1, {
|
|
46
|
+
error: `Specify either 'listId', 'listTitle' or 'listUrl'.`,
|
|
47
|
+
params: {
|
|
48
|
+
customCode: 'optionSet',
|
|
49
|
+
options: ['listId', 'listTitle', 'listUrl']
|
|
50
|
+
}
|
|
51
|
+
});
|
|
29
52
|
}
|
|
30
53
|
async commandAction(logger, args) {
|
|
31
54
|
const { listId, listTitle, listUrl, webUrl } = args.options;
|
|
@@ -78,50 +101,5 @@ class SpoContentTypeSyncCommand extends SpoCommand {
|
|
|
78
101
|
return contentTypes[0].StringId;
|
|
79
102
|
}
|
|
80
103
|
}
|
|
81
|
-
_SpoContentTypeSyncCommand_instances = new WeakSet(), _SpoContentTypeSyncCommand_initTelemetry = function _SpoContentTypeSyncCommand_initTelemetry() {
|
|
82
|
-
this.telemetry.push((args) => {
|
|
83
|
-
Object.assign(this.telemetryProperties, {
|
|
84
|
-
id: typeof args.options.id !== 'undefined',
|
|
85
|
-
name: typeof args.options.name !== 'undefined',
|
|
86
|
-
listId: typeof args.options.listId !== 'undefined',
|
|
87
|
-
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
88
|
-
listUrl: typeof args.options.listUrl !== 'undefined'
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
}, _SpoContentTypeSyncCommand_initOptions = function _SpoContentTypeSyncCommand_initOptions() {
|
|
92
|
-
this.options.unshift({
|
|
93
|
-
option: '-u, --webUrl <webUrl>'
|
|
94
|
-
}, {
|
|
95
|
-
option: '-i, --id [id]'
|
|
96
|
-
}, {
|
|
97
|
-
option: '-n, --name [name]'
|
|
98
|
-
}, {
|
|
99
|
-
option: '--listTitle [listTitle]'
|
|
100
|
-
}, {
|
|
101
|
-
option: '--listId [listId]'
|
|
102
|
-
}, {
|
|
103
|
-
option: '--listUrl [listUrl]'
|
|
104
|
-
});
|
|
105
|
-
}, _SpoContentTypeSyncCommand_initValidators = function _SpoContentTypeSyncCommand_initValidators() {
|
|
106
|
-
this.validators.push(async (args) => {
|
|
107
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
108
|
-
if (isValidSharePointUrl !== true) {
|
|
109
|
-
return isValidSharePointUrl;
|
|
110
|
-
}
|
|
111
|
-
if (args.options.listId && !validation.isValidGuid(args.options.listId)) {
|
|
112
|
-
return `${args.options.listId} is not a valid GUID`;
|
|
113
|
-
}
|
|
114
|
-
return true;
|
|
115
|
-
});
|
|
116
|
-
}, _SpoContentTypeSyncCommand_initTypes = function _SpoContentTypeSyncCommand_initTypes() {
|
|
117
|
-
this.types.string.push('webUrl', 'id', 'name', 'listTitle', 'listId', 'listUrl');
|
|
118
|
-
}, _SpoContentTypeSyncCommand_initOptionSets = function _SpoContentTypeSyncCommand_initOptionSets() {
|
|
119
|
-
this.optionSets.push({
|
|
120
|
-
options: ['id', 'name']
|
|
121
|
-
}, {
|
|
122
|
-
options: ['listId', 'listTitle', 'listUrl'],
|
|
123
|
-
runsWhen: (args) => args.options.listId || args.options.listTitle || args.options.listUrl
|
|
124
|
-
});
|
|
125
|
-
};
|
|
126
104
|
export default new SpoContentTypeSyncCommand();
|
|
127
105
|
//# sourceMappingURL=contenttype-sync.js.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
1
2
|
import config from '../../../../config.js';
|
|
2
3
|
import request from '../../../../request.js';
|
|
3
4
|
import { spo } from '../../../../utils/spo.js';
|
|
4
5
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
5
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = globalOptionsZod.strict();
|
|
6
8
|
class SpoContentTypeHubGetCommand extends SpoCommand {
|
|
7
9
|
get name() {
|
|
8
10
|
return commands.CONTENTTYPEHUB_GET;
|
|
@@ -10,6 +12,9 @@ class SpoContentTypeHubGetCommand extends SpoCommand {
|
|
|
10
12
|
get description() {
|
|
11
13
|
return 'Returns the URL of the SharePoint Content Type Hub of the Tenant';
|
|
12
14
|
}
|
|
15
|
+
get schema() {
|
|
16
|
+
return options;
|
|
17
|
+
}
|
|
13
18
|
async commandAction(logger) {
|
|
14
19
|
try {
|
|
15
20
|
const spoUrl = await spo.getSpoUrl(logger, this.debug);
|
|
@@ -1,14 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoCustomActionAddCommand_instances, _SpoCustomActionAddCommand_initTelemetry, _SpoCustomActionAddCommand_initOptions, _SpoCustomActionAddCommand_initValidators;
|
|
1
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
2
|
import request from '../../../../request.js';
|
|
8
3
|
import { validation } from '../../../../utils/validation.js';
|
|
4
|
+
import { zod } from '../../../../utils/zod.js';
|
|
9
5
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
10
6
|
import { BasePermissions, PermissionKind } from '../../base-permissions.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
const permissionKinds = Object.entries(PermissionKind)
|
|
10
|
+
.filter(([, value]) => typeof value === 'number')
|
|
11
|
+
.map(([key]) => key);
|
|
12
|
+
const permissionKindSet = new Set(permissionKinds);
|
|
13
|
+
const registrationTypes = {
|
|
14
|
+
None: 'None',
|
|
15
|
+
List: 'List',
|
|
16
|
+
ContentType: 'ContentType',
|
|
17
|
+
ProgId: 'ProgId',
|
|
18
|
+
FileType: 'FileType'
|
|
19
|
+
};
|
|
20
|
+
const registrationTypeValues = Object.values(registrationTypes);
|
|
21
|
+
export const options = z.strictObject({
|
|
22
|
+
...globalOptionsZod.shape,
|
|
23
|
+
webUrl: z.string().refine(val => validation.isValidSharePointUrl(val) === true, {
|
|
24
|
+
error: e => `${e.input} is not a valid SharePoint Online site URL.`
|
|
25
|
+
}).alias('u'),
|
|
26
|
+
name: z.string().alias('n'),
|
|
27
|
+
title: z.string().alias('t'),
|
|
28
|
+
location: z.string().alias('l'),
|
|
29
|
+
group: z.string().optional().alias('g'),
|
|
30
|
+
description: z.string().optional().alias('d'),
|
|
31
|
+
sequence: z.coerce.number().refine(val => val >= 0 && val <= 65536, {
|
|
32
|
+
message: 'Invalid option sequence. Expected value in range from 0 to 65536'
|
|
33
|
+
}).optional(),
|
|
34
|
+
actionUrl: z.string().optional(),
|
|
35
|
+
imageUrl: z.string().optional(),
|
|
36
|
+
commandUIExtension: z.string().optional().alias('e'),
|
|
37
|
+
registrationId: z.string().optional(),
|
|
38
|
+
registrationType: zod.coercedEnum(registrationTypes)
|
|
39
|
+
.optional()
|
|
40
|
+
.autocomplete(registrationTypeValues),
|
|
41
|
+
rights: z.string().refine(val => {
|
|
42
|
+
const items = val.split(',').map(item => item.trim());
|
|
43
|
+
return items.every(item => permissionKindSet.has(item));
|
|
44
|
+
}, {
|
|
45
|
+
error: e => {
|
|
46
|
+
const items = e.input.split(',').map(item => item.trim());
|
|
47
|
+
const invalid = items.find(item => !permissionKindSet.has(item));
|
|
48
|
+
return `Rights option '${invalid}' is not recognized as valid PermissionKind choice. Please note it is case sensitive`;
|
|
49
|
+
}
|
|
50
|
+
}).optional().autocomplete(permissionKinds),
|
|
51
|
+
scriptSrc: z.string().optional(),
|
|
52
|
+
scriptBlock: z.string().optional(),
|
|
53
|
+
scope: z.enum(['Site', 'Web']).optional().alias('s'),
|
|
54
|
+
clientSideComponentId: z.string().refine(val => validation.isValidGuid(val), {
|
|
55
|
+
error: e => `ClientSideComponentId ${e.input} is not a valid GUID`
|
|
56
|
+
}).optional().alias('c'),
|
|
57
|
+
clientSideComponentProperties: z.string().optional().alias('p')
|
|
58
|
+
});
|
|
12
59
|
class SpoCustomActionAddCommand extends SpoCommand {
|
|
13
60
|
get name() {
|
|
14
61
|
return commands.CUSTOMACTION_ADD;
|
|
@@ -16,25 +63,78 @@ class SpoCustomActionAddCommand extends SpoCommand {
|
|
|
16
63
|
get description() {
|
|
17
64
|
return 'Adds a user custom action for site or site collection';
|
|
18
65
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_SpoCustomActionAddCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoCustomActionAddCommand_instances, "m", _SpoCustomActionAddCommand_initTelemetry).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoCustomActionAddCommand_instances, "m", _SpoCustomActionAddCommand_initOptions).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoCustomActionAddCommand_instances, "m", _SpoCustomActionAddCommand_initValidators).call(this);
|
|
66
|
+
get schema() {
|
|
67
|
+
return options;
|
|
25
68
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
69
|
+
getRefinedSchema(schema) {
|
|
70
|
+
return schema
|
|
71
|
+
.refine(opts => !opts.registrationId || opts.registrationType, {
|
|
72
|
+
message: 'Option registrationId is specified, but registrationType is missing',
|
|
73
|
+
path: ['registrationType'],
|
|
74
|
+
params: { customCode: 'required' }
|
|
75
|
+
})
|
|
76
|
+
.refine(opts => !opts.registrationType || opts.registrationId, {
|
|
77
|
+
message: 'Option registrationType is specified, but registrationId is missing',
|
|
78
|
+
path: ['registrationId'],
|
|
79
|
+
params: { customCode: 'required' }
|
|
80
|
+
})
|
|
81
|
+
.refine(opts => {
|
|
82
|
+
if (!opts.location) {
|
|
83
|
+
return true;
|
|
35
84
|
}
|
|
36
|
-
|
|
37
|
-
|
|
85
|
+
const location = opts.location.toLowerCase();
|
|
86
|
+
const locationsRequireGroup = [
|
|
87
|
+
'microsoft.sharepoint.standardmenu', 'microsoft.sharepoint.contenttypesettings',
|
|
88
|
+
'microsoft.sharepoint.contenttypetemplatesettings', 'microsoft.sharepoint.create',
|
|
89
|
+
'microsoft.sharepoint.groupspage', 'microsoft.sharepoint.listedit',
|
|
90
|
+
'microsoft.sharepoint.listedit.documentlibrary', 'microsoft.sharepoint.peoplepage',
|
|
91
|
+
'microsoft.sharepoint.sitesettings'
|
|
92
|
+
];
|
|
93
|
+
return !locationsRequireGroup.includes(location) || !!opts.group;
|
|
94
|
+
}, {
|
|
95
|
+
message: 'The location specified requires the group option to be specified as well',
|
|
96
|
+
path: ['group'],
|
|
97
|
+
params: { customCode: 'required' }
|
|
98
|
+
})
|
|
99
|
+
.refine(opts => {
|
|
100
|
+
if (!opts.location) {
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
const location = opts.location.toLowerCase();
|
|
104
|
+
if (location === 'scriptlink') {
|
|
105
|
+
return !!opts.scriptSrc || !!opts.scriptBlock;
|
|
106
|
+
}
|
|
107
|
+
return true;
|
|
108
|
+
}, {
|
|
109
|
+
message: 'Option scriptSrc or scriptBlock is required when the location is set to ScriptLink',
|
|
110
|
+
params: {
|
|
111
|
+
customCode: 'optionSet',
|
|
112
|
+
options: ['scriptSrc', 'scriptBlock']
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
.refine(opts => {
|
|
116
|
+
if (!opts.location) {
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
const location = opts.location.toLowerCase();
|
|
120
|
+
if ((opts.scriptSrc || opts.scriptBlock) && location !== 'scriptlink') {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
return true;
|
|
124
|
+
}, {
|
|
125
|
+
message: 'Option scriptSrc or scriptBlock is specified, but the location option is different than ScriptLink. Please use --actionUrl, if the location should be different than ScriptLink'
|
|
126
|
+
})
|
|
127
|
+
.refine(opts => !(opts.scriptSrc && opts.scriptBlock), {
|
|
128
|
+
message: 'Either option scriptSrc or scriptBlock can be specified, but not both'
|
|
129
|
+
})
|
|
130
|
+
.refine(opts => !opts.clientSideComponentProperties || opts.clientSideComponentId, {
|
|
131
|
+
message: 'Option clientSideComponentProperties is specified, but the clientSideComponentId option is missing',
|
|
132
|
+
path: ['clientSideComponentId'],
|
|
133
|
+
params: { customCode: 'required' }
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
get permissionsKindMap() {
|
|
137
|
+
return permissionKinds;
|
|
38
138
|
}
|
|
39
139
|
async commandAction(logger, args) {
|
|
40
140
|
try {
|
|
@@ -91,7 +191,7 @@ class SpoCustomActionAddCommand extends SpoCommand {
|
|
|
91
191
|
if (options.description) {
|
|
92
192
|
requestBody.Description = options.description;
|
|
93
193
|
}
|
|
94
|
-
if (options.sequence) {
|
|
194
|
+
if (options.sequence !== undefined) {
|
|
95
195
|
requestBody.Sequence = options.sequence;
|
|
96
196
|
}
|
|
97
197
|
if (options.registrationType) {
|
|
@@ -149,126 +249,5 @@ class SpoCustomActionAddCommand extends SpoCommand {
|
|
|
149
249
|
return 0; // None
|
|
150
250
|
}
|
|
151
251
|
}
|
|
152
|
-
_SpoCustomActionAddCommand_instances = new WeakSet(), _SpoCustomActionAddCommand_initTelemetry = function _SpoCustomActionAddCommand_initTelemetry() {
|
|
153
|
-
this.telemetry.push((args) => {
|
|
154
|
-
Object.assign(this.telemetryProperties, {
|
|
155
|
-
location: args.options.location,
|
|
156
|
-
scope: args.options.scope || 'Web',
|
|
157
|
-
group: (!(!args.options.group)).toString(),
|
|
158
|
-
description: (!(!args.options.description)).toString(),
|
|
159
|
-
sequence: (!(!args.options.sequence)).toString(),
|
|
160
|
-
actionUrl: (!(!args.options.actionUrl)).toString(),
|
|
161
|
-
imageUrl: (!(!args.options.imageUrl)).toString(),
|
|
162
|
-
commandUIExtension: (!(!args.options.commandUIExtension)).toString(),
|
|
163
|
-
registrationId: args.options.registrationId,
|
|
164
|
-
registrationType: args.options.registrationType,
|
|
165
|
-
rights: args.options.rights,
|
|
166
|
-
scriptSrc: (!(!args.options.scriptSrc)).toString(),
|
|
167
|
-
scriptBlock: (!(!args.options.scriptBlock)).toString(),
|
|
168
|
-
clientSideComponentId: (!(!args.options.clientSideComponentId)).toString(),
|
|
169
|
-
clientSideComponentProperties: (!(!args.options.clientSideComponentProperties)).toString()
|
|
170
|
-
});
|
|
171
|
-
});
|
|
172
|
-
}, _SpoCustomActionAddCommand_initOptions = function _SpoCustomActionAddCommand_initOptions() {
|
|
173
|
-
this.options.unshift({
|
|
174
|
-
option: '-u, --webUrl <webUrl>'
|
|
175
|
-
}, {
|
|
176
|
-
option: '-n, --name <name>'
|
|
177
|
-
}, {
|
|
178
|
-
option: '-t, --title <title>'
|
|
179
|
-
}, {
|
|
180
|
-
option: '-l, --location <location>'
|
|
181
|
-
}, {
|
|
182
|
-
option: '-g, --group [group]'
|
|
183
|
-
}, {
|
|
184
|
-
option: '-d, --description [description]'
|
|
185
|
-
}, {
|
|
186
|
-
option: '--sequence [sequence]'
|
|
187
|
-
}, {
|
|
188
|
-
option: '--actionUrl [actionUrl]'
|
|
189
|
-
}, {
|
|
190
|
-
option: '--imageUrl [imageUrl]'
|
|
191
|
-
}, {
|
|
192
|
-
option: '-e, --commandUIExtension [commandUIExtension]'
|
|
193
|
-
}, {
|
|
194
|
-
option: '--registrationId [registrationId]'
|
|
195
|
-
}, {
|
|
196
|
-
option: '--registrationType [registrationType]',
|
|
197
|
-
autocomplete: ['None', 'List', 'ContentType', 'ProgId', 'FileType']
|
|
198
|
-
}, {
|
|
199
|
-
option: '--rights [rights]',
|
|
200
|
-
autocomplete: this.permissionsKindMap
|
|
201
|
-
}, {
|
|
202
|
-
option: '-s, --scope [scope]',
|
|
203
|
-
autocomplete: ['Site', 'Web']
|
|
204
|
-
}, {
|
|
205
|
-
option: '--scriptBlock [scriptBlock]'
|
|
206
|
-
}, {
|
|
207
|
-
option: '--scriptSrc [scriptSrc]'
|
|
208
|
-
}, {
|
|
209
|
-
option: '-c, --clientSideComponentId [clientSideComponentId]'
|
|
210
|
-
}, {
|
|
211
|
-
option: '-p, --clientSideComponentProperties [clientSideComponentProperties]'
|
|
212
|
-
});
|
|
213
|
-
}, _SpoCustomActionAddCommand_initValidators = function _SpoCustomActionAddCommand_initValidators() {
|
|
214
|
-
this.validators.push(async (args) => {
|
|
215
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
216
|
-
if (isValidSharePointUrl !== true) {
|
|
217
|
-
return isValidSharePointUrl;
|
|
218
|
-
}
|
|
219
|
-
if (args.options.registrationId && !args.options.registrationType) {
|
|
220
|
-
return 'Option registrationId is specified, but registrationType is missing';
|
|
221
|
-
}
|
|
222
|
-
if (args.options.registrationType && !args.options.registrationId) {
|
|
223
|
-
return 'Option registrationType is specified, but registrationId is missing';
|
|
224
|
-
}
|
|
225
|
-
const location = args.options.location.toLowerCase();
|
|
226
|
-
const locationsRequireGroup = [
|
|
227
|
-
'microsoft.sharepoint.standardmenu', 'microsoft.sharepoint.contenttypesettings',
|
|
228
|
-
'microsoft.sharepoint.contenttypetemplatesettings', 'microsoft.sharepoint.create',
|
|
229
|
-
'microsoft.sharepoint.groupspage', 'microsoft.sharepoint.listedit',
|
|
230
|
-
'microsoft.sharepoint.listedit.documentlibrary', 'microsoft.sharepoint.peoplepage',
|
|
231
|
-
'microsoft.sharepoint.sitesettings'
|
|
232
|
-
];
|
|
233
|
-
if (locationsRequireGroup.indexOf(location) > -1 && !args.options.group) {
|
|
234
|
-
return `The location specified requires the group option to be specified as well`;
|
|
235
|
-
}
|
|
236
|
-
if (location === 'scriptlink' &&
|
|
237
|
-
!args.options.scriptSrc &&
|
|
238
|
-
!args.options.scriptBlock) {
|
|
239
|
-
return 'Option scriptSrc or scriptBlock is required when the location is set to ScriptLink';
|
|
240
|
-
}
|
|
241
|
-
if ((args.options.scriptSrc || args.options.scriptBlock) && location !== 'scriptlink') {
|
|
242
|
-
return 'Option scriptSrc or scriptBlock is specified, but the location option is different than ScriptLink. Please use --actionUrl, if the location should be different than ScriptLink';
|
|
243
|
-
}
|
|
244
|
-
if (args.options.scriptSrc && args.options.scriptBlock) {
|
|
245
|
-
return 'Either option scriptSrc or scriptBlock can be specified, but not both';
|
|
246
|
-
}
|
|
247
|
-
if (args.options.sequence && (args.options.sequence < 0 || args.options.sequence > 65536)) {
|
|
248
|
-
return 'Invalid option sequence. Expected value in range from 0 to 65536';
|
|
249
|
-
}
|
|
250
|
-
if (args.options.clientSideComponentId && validation.isValidGuid(args.options.clientSideComponentId) === false) {
|
|
251
|
-
return `ClientSideComponentId ${args.options.clientSideComponentId} is not a valid GUID`;
|
|
252
|
-
}
|
|
253
|
-
if (args.options.clientSideComponentProperties && !args.options.clientSideComponentId) {
|
|
254
|
-
return `Option clientSideComponentProperties is specified, but the clientSideComponentId option is missing`;
|
|
255
|
-
}
|
|
256
|
-
if (args.options.scope &&
|
|
257
|
-
args.options.scope !== 'Site' &&
|
|
258
|
-
args.options.scope !== 'Web') {
|
|
259
|
-
return `${args.options.scope} is not a valid custom action scope. Allowed values are Site|Web`;
|
|
260
|
-
}
|
|
261
|
-
if (args.options.rights) {
|
|
262
|
-
const rights = args.options.rights.split(',');
|
|
263
|
-
for (const item of rights) {
|
|
264
|
-
const kind = PermissionKind[item.trim()];
|
|
265
|
-
if (!kind) {
|
|
266
|
-
return `Rights option '${item}' is not recognized as valid PermissionKind choice. Please note it is case sensitive`;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
return true;
|
|
271
|
-
});
|
|
272
|
-
};
|
|
273
252
|
export default new SpoCustomActionAddCommand();
|
|
274
253
|
//# sourceMappingURL=customaction-add.js.map
|