@pnp/cli-microsoft365 7.0.0-beta.b7ec1d3 → 7.0.0-beta.c2db9df
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/{.eslintrc.js → .eslintrc.cjs} +2 -4
- package/README.md +4 -4
- package/dist/Auth.js +358 -392
- package/dist/AuthServer.js +8 -12
- package/dist/Command.js +183 -214
- package/dist/GlobalOptions.js +1 -10
- package/dist/api.js +5 -9
- package/dist/appInsights.js +17 -16
- package/dist/auth/FileTokenStorage.js +4 -8
- package/dist/auth/TokenStorage.js +1 -2
- package/dist/auth/msalCachePlugin.js +17 -33
- package/dist/autocomplete.js +12 -13
- package/dist/chili/chili.js +208 -232
- package/dist/chili/index.js +2 -13
- package/dist/cli/Cli.js +299 -304
- package/dist/cli/CommandInfo.js +1 -2
- package/dist/cli/CommandOptionInfo.js +1 -2
- package/dist/cli/Logger.js +1 -2
- package/dist/config.js +3 -5
- package/dist/index.js +14 -13
- package/dist/m365/aad/commands/app/app-add.js +411 -453
- package/dist/m365/aad/commands/app/app-get.js +94 -110
- package/dist/m365/aad/commands/app/app-list.js +14 -27
- package/dist/m365/aad/commands/app/app-remove.js +73 -86
- package/dist/m365/aad/commands/app/app-role-add.js +79 -93
- package/dist/m365/aad/commands/app/app-role-list.js +47 -59
- package/dist/m365/aad/commands/app/app-role-remove.js +133 -153
- package/dist/m365/aad/commands/app/app-set.js +198 -220
- package/dist/m365/aad/commands/approleassignment/ServicePrincipal.js +2 -0
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +121 -131
- package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +91 -112
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +119 -136
- package/dist/m365/aad/commands/group/group-get.js +25 -38
- package/dist/m365/aad/commands/group/group-list.js +30 -65
- package/dist/m365/aad/commands/groupsetting/groupsetting-add.js +41 -54
- package/dist/m365/aad/commands/groupsetting/groupsetting-get.js +25 -38
- package/dist/m365/aad/commands/groupsetting/groupsetting-list.js +14 -27
- package/dist/m365/aad/commands/groupsetting/groupsetting-remove.js +41 -54
- package/dist/m365/aad/commands/groupsetting/groupsetting-set.js +41 -54
- package/dist/m365/aad/commands/groupsettingtemplate/groupsettingtemplate-get.js +22 -35
- package/dist/m365/aad/commands/groupsettingtemplate/groupsettingtemplate-list.js +14 -27
- package/dist/m365/aad/commands/license/license-list.js +17 -30
- package/dist/m365/aad/commands/m365group/GroupExtended.js +2 -0
- package/dist/m365/aad/commands/m365group/m365group-add.js +260 -0
- package/dist/m365/aad/commands/m365group/m365group-conversation-list.js +50 -0
- package/dist/m365/aad/commands/m365group/m365group-conversation-post-list.js +75 -0
- package/dist/m365/aad/commands/m365group/m365group-get.js +65 -0
- package/dist/m365/aad/commands/m365group/m365group-list.js +100 -0
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-clear.js +82 -0
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-list.js +57 -0
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-remove.js +122 -0
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-restore.js +107 -0
- package/dist/m365/aad/commands/m365group/m365group-remove.js +93 -0
- package/dist/m365/aad/commands/m365group/m365group-renew.js +55 -0
- package/dist/m365/aad/commands/m365group/m365group-report-activitycounts.js +15 -0
- package/dist/m365/aad/commands/m365group/m365group-report-activitydetail.js +15 -0
- package/dist/m365/aad/commands/m365group/m365group-report-activityfilecounts.js +15 -0
- package/dist/m365/aad/commands/m365group/m365group-report-activitygroupcounts.js +15 -0
- package/dist/m365/aad/commands/m365group/m365group-report-activitystorage.js +15 -0
- package/dist/m365/aad/commands/m365group/m365group-set.js +231 -0
- package/dist/m365/aad/commands/m365group/m365group-teamify.js +107 -0
- package/dist/m365/aad/commands/m365group/m365group-user-add.js +96 -0
- package/dist/m365/aad/commands/m365group/m365group-user-list.js +89 -0
- package/dist/m365/aad/commands/m365group/m365group-user-remove.js +134 -0
- package/dist/m365/aad/commands/m365group/m365group-user-set.js +152 -0
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-add.js +35 -48
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-list.js +30 -43
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-remove.js +39 -52
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-set.js +27 -40
- package/dist/m365/aad/commands/policy/policy-list.js +48 -63
- package/dist/m365/aad/commands/siteclassification/SiteClassificationSettings.js +1 -5
- package/dist/m365/aad/commands/siteclassification/siteclassification-disable.js +55 -68
- package/dist/m365/aad/commands/siteclassification/siteclassification-enable.js +78 -91
- package/dist/m365/aad/commands/siteclassification/siteclassification-get.js +62 -75
- package/dist/m365/aad/commands/siteclassification/siteclassification-set.js +102 -115
- package/dist/m365/aad/commands/sp/sp-add.js +59 -71
- package/dist/m365/aad/commands/sp/sp-get.js +59 -71
- package/dist/m365/aad/commands/sp/sp-list.js +25 -38
- package/dist/m365/aad/commands/user/user-add.js +43 -57
- package/dist/m365/aad/commands/user/user-get.js +54 -62
- package/dist/m365/aad/commands/user/user-guest-add.js +31 -44
- package/dist/m365/aad/commands/user/user-hibp.js +31 -44
- package/dist/m365/aad/commands/user/user-license-add.js +29 -42
- package/dist/m365/aad/commands/user/user-license-list.js +36 -49
- package/dist/m365/aad/commands/user/user-license-remove.js +47 -62
- package/dist/m365/aad/commands/user/user-list.js +24 -37
- package/dist/m365/aad/commands/user/user-password-validate.js +24 -37
- package/dist/m365/aad/commands/user/user-recyclebinitem-clear.js +53 -66
- package/dist/m365/aad/commands/user/user-recyclebinitem-list.js +17 -30
- package/dist/m365/aad/commands/user/user-recyclebinitem-remove.js +39 -52
- package/dist/m365/aad/commands/user/user-recyclebinitem-restore.js +28 -41
- package/dist/m365/aad/commands/user/user-remove.js +43 -58
- package/dist/m365/aad/commands/user/user-set.js +95 -114
- package/dist/m365/aad/commands/user/user-signin-list.js +33 -46
- package/dist/m365/aad/commands.js +23 -25
- package/dist/m365/adaptivecard/commands/adaptivecard-send.js +47 -60
- package/dist/m365/adaptivecard/commands.js +1 -3
- package/dist/m365/app/commands/app-get.js +23 -36
- package/dist/m365/app/commands/app-open.js +24 -39
- package/dist/m365/app/commands/permission/permission-add.js +91 -155
- package/dist/m365/app/commands/permission/permission-list.js +201 -227
- package/dist/m365/app/commands.js +1 -3
- package/dist/m365/base/AnonymousCommand.js +5 -19
- package/dist/m365/base/AppCommand.js +55 -71
- package/dist/m365/base/AzmgmtCommand.js +6 -9
- package/dist/m365/base/AzmgmtItemsListCommand.js +33 -48
- package/dist/m365/base/ContextCommand.js +6 -9
- package/dist/m365/base/DateAndPeriodBasedReport.js +11 -24
- package/dist/m365/base/GraphCommand.js +2 -5
- package/dist/m365/base/M365RcJson.js +1 -2
- package/dist/m365/base/O365MgmtCommand.js +2 -5
- package/dist/m365/base/PeriodBasedReport.js +41 -58
- package/dist/m365/base/PlannerCommand.js +2 -5
- package/dist/m365/base/PowerAppsCommand.js +6 -9
- package/dist/m365/base/PowerBICommand.js +2 -5
- package/dist/m365/base/PowerPlatformCommand.js +6 -9
- package/dist/m365/base/SpoCommand.js +33 -50
- package/dist/m365/base/YammerCommand.js +5 -8
- package/dist/m365/booking/commands/business/business-get.js +42 -54
- package/dist/m365/booking/commands/business/business-list.js +15 -28
- package/dist/m365/booking/commands.js +1 -3
- package/dist/m365/cli/commands/cli-consent.js +19 -34
- package/dist/m365/cli/commands/cli-doctor.js +35 -49
- package/dist/m365/cli/commands/cli-issue.js +28 -41
- package/dist/m365/cli/commands/cli-reconsent.js +22 -35
- package/dist/m365/cli/commands/completion/completion-clink-update.js +8 -21
- package/dist/m365/cli/commands/completion/completion-pwsh-setup.js +48 -59
- package/dist/m365/cli/commands/completion/completion-pwsh-update.js +11 -24
- package/dist/m365/cli/commands/completion/completion-sh-setup.js +16 -29
- package/dist/m365/cli/commands/completion/completion-sh-update.js +11 -24
- package/dist/m365/cli/commands/config/config-get.js +17 -30
- package/dist/m365/cli/commands/config/config-list.js +16 -0
- package/dist/m365/cli/commands/config/config-reset.js +22 -35
- package/dist/m365/cli/commands/config/config-set.js +40 -53
- package/dist/m365/cli/commands.js +2 -3
- package/dist/m365/commands/commands.js +1 -3
- package/dist/m365/commands/docs.js +15 -28
- package/dist/m365/commands/login.js +107 -123
- package/dist/m365/commands/logout.js +30 -45
- package/dist/m365/commands/request.js +65 -78
- package/dist/m365/commands/setup.js +90 -103
- package/dist/m365/commands/setupPresets.js +3 -6
- package/dist/m365/commands/status.js +50 -65
- package/dist/m365/commands/version.js +8 -21
- package/dist/m365/context/commands/context-init.js +7 -20
- package/dist/m365/context/commands/context-remove.js +25 -38
- package/dist/m365/context/commands/option/option-list.js +29 -42
- package/dist/m365/context/commands/option/option-remove.js +31 -44
- package/dist/m365/context/commands/option/option-set.js +38 -51
- package/dist/m365/context/commands.js +1 -3
- package/dist/m365/file/commands/convert/convert-pdf.js +254 -287
- package/dist/m365/file/commands/file-add.js +138 -161
- package/dist/m365/file/commands/file-list.js +120 -141
- package/dist/m365/file/commands.js +1 -3
- package/dist/m365/flow/commands/environment/FlowEnvironmentDetails.js +1 -2
- package/dist/m365/flow/commands/environment/environment-get.js +33 -45
- package/dist/m365/flow/commands/environment/environment-list.js +21 -41
- package/dist/m365/flow/commands/flow-disable.js +24 -37
- package/dist/m365/flow/commands/flow-enable.js +24 -37
- package/dist/m365/flow/commands/flow-export.js +111 -124
- package/dist/m365/flow/commands/flow-get.js +29 -42
- package/dist/m365/flow/commands/flow-list.js +45 -58
- package/dist/m365/flow/commands/flow-remove.js +48 -61
- package/dist/m365/flow/commands/owner/owner-ensure.js +69 -82
- package/dist/m365/flow/commands/owner/owner-list.js +31 -44
- package/dist/m365/flow/commands/owner/owner-remove.js +64 -77
- package/dist/m365/flow/commands/run/run-cancel.js +42 -55
- package/dist/m365/flow/commands/run/run-get.js +44 -57
- package/dist/m365/flow/commands/run/run-list.js +33 -51
- package/dist/m365/flow/commands/run/run-resubmit.js +57 -72
- package/dist/m365/flow/commands.js +1 -3
- package/dist/m365/graph/Changelog.js +1 -2
- package/dist/m365/graph/commands/changelog/changelog-list.js +37 -50
- package/dist/m365/graph/commands/schemaextension/schemaextension-add.js +38 -51
- package/dist/m365/graph/commands/schemaextension/schemaextension-get.js +25 -38
- package/dist/m365/graph/commands/schemaextension/schemaextension-list.js +46 -59
- package/dist/m365/graph/commands/schemaextension/schemaextension-remove.js +39 -52
- package/dist/m365/graph/commands/schemaextension/schemaextension-set.js +65 -78
- package/dist/m365/graph/commands/subscription/subscription-add.js +45 -58
- package/dist/m365/graph/commands.js +1 -3
- package/dist/m365/onedrive/commands/onedrive-list.js +41 -56
- package/dist/m365/onedrive/commands/report/report-activityfilecounts.js +5 -7
- package/dist/m365/onedrive/commands/report/report-activityusercounts.js +5 -7
- package/dist/m365/onedrive/commands/report/report-activityuserdetail.js +5 -7
- package/dist/m365/onedrive/commands/report/report-usageaccountcounts.js +5 -7
- package/dist/m365/onedrive/commands/report/report-usageaccountdetail.js +5 -7
- package/dist/m365/onedrive/commands/report/report-usagefilecounts.js +5 -7
- package/dist/m365/onedrive/commands/report/report-usagestorage.js +5 -7
- package/dist/m365/onedrive/commands.js +1 -3
- package/dist/m365/onenote/commands/notebook/notebook-list.js +61 -80
- package/dist/m365/onenote/commands/page/page-list.js +50 -67
- package/dist/m365/onenote/commands.js +1 -3
- package/dist/m365/outlook/Outlook.js +1 -5
- package/dist/m365/outlook/commands/mail/mail-send.js +35 -49
- package/dist/m365/outlook/commands/message/message-get.js +43 -56
- package/dist/m365/outlook/commands/message/message-list.js +49 -62
- package/dist/m365/outlook/commands/message/message-move.js +54 -67
- package/dist/m365/outlook/commands/report/report-mailactivitycounts.js +5 -7
- package/dist/m365/outlook/commands/report/report-mailactivityusercounts.js +5 -7
- package/dist/m365/outlook/commands/report/report-mailactivityuserdetail.js +5 -7
- package/dist/m365/outlook/commands/report/report-mailappusageappsusercounts.js +5 -7
- package/dist/m365/outlook/commands/report/report-mailappusageusercounts.js +5 -7
- package/dist/m365/outlook/commands/report/report-mailappusageuserdetail.js +5 -7
- package/dist/m365/outlook/commands/report/report-mailappusageversionsusercounts.js +5 -7
- package/dist/m365/outlook/commands/report/report-mailboxusagedetail.js +5 -7
- package/dist/m365/outlook/commands/report/report-mailboxusagemailboxcount.js +5 -7
- package/dist/m365/outlook/commands/report/report-mailboxusagequotastatusmailboxcounts.js +5 -7
- package/dist/m365/outlook/commands/report/report-mailboxusagestorage.js +5 -7
- package/dist/m365/outlook/commands/room/room-list.js +18 -31
- package/dist/m365/outlook/commands/roomlist/roomlist-list.js +14 -27
- package/dist/m365/outlook/commands.js +1 -3
- package/dist/m365/pa/commands/app/app-consent-set.js +44 -59
- package/dist/m365/pa/commands/app/app-export.js +115 -134
- package/dist/m365/pa/commands/app/app-get.js +60 -75
- package/dist/m365/pa/commands/app/app-list.js +26 -39
- package/dist/m365/pa/commands/app/app-owner-set.js +46 -61
- package/dist/m365/pa/commands/app/app-permission-ensure.js +162 -0
- package/dist/m365/pa/commands/app/app-permission-list.js +31 -44
- package/dist/m365/pa/commands/app/app-permission-remove.js +153 -0
- package/dist/m365/pa/commands/app/app-remove.js +47 -60
- package/dist/m365/pa/commands/connector/Connector.js +1 -2
- package/dist/m365/pa/commands/connector/connector-export.js +113 -126
- package/dist/m365/pa/commands/connector/connector-list.js +26 -39
- package/dist/m365/pa/commands/environment/environment-get.js +31 -44
- package/dist/m365/pa/commands/environment/environment-list.js +28 -41
- package/dist/m365/pa/commands.js +4 -7
- package/dist/m365/planner/AppliedCategories.js +1 -2
- package/dist/m365/planner/Task.js +1 -2
- package/dist/m365/planner/commands/bucket/bucket-add.js +50 -67
- package/dist/m365/planner/commands/bucket/bucket-get.js +75 -92
- package/dist/m365/planner/commands/bucket/bucket-list.js +38 -55
- package/dist/m365/planner/commands/bucket/bucket-remove.js +83 -100
- package/dist/m365/planner/commands/bucket/bucket-set.js +78 -94
- package/dist/m365/planner/commands/plan/plan-add.js +105 -128
- package/dist/m365/planner/commands/plan/plan-get.js +52 -70
- package/dist/m365/planner/commands/plan/plan-list.js +31 -47
- package/dist/m365/planner/commands/plan/plan-remove.js +57 -74
- package/dist/m365/planner/commands/plan/plan-set.js +149 -178
- package/dist/m365/planner/commands/roster/roster-add.js +26 -39
- package/dist/m365/planner/commands/roster/roster-get.js +24 -37
- package/dist/m365/planner/commands/roster/roster-member-add.js +43 -58
- package/dist/m365/planner/commands/roster/roster-member-get.js +36 -51
- package/dist/m365/planner/commands/roster/roster-member-list.js +17 -30
- package/dist/m365/planner/commands/roster/roster-member-remove.js +65 -84
- package/dist/m365/planner/commands/roster/roster-plan-list.js +39 -52
- package/dist/m365/planner/commands/roster/roster-remove.js +38 -53
- package/dist/m365/planner/commands/task/task-add.js +161 -182
- package/dist/m365/planner/commands/task/task-checklistitem-add.js +50 -65
- package/dist/m365/planner/commands/task/task-checklistitem-list.js +28 -41
- package/dist/m365/planner/commands/task/task-checklistitem-remove.js +53 -70
- package/dist/m365/planner/commands/task/task-get.js +135 -145
- package/dist/m365/planner/commands/task/task-list.js +101 -113
- package/dist/m365/planner/commands/task/task-reference-add.js +45 -55
- package/dist/m365/planner/commands/task/task-reference-list.js +22 -35
- package/dist/m365/planner/commands/task/task-reference-remove.js +70 -88
- package/dist/m365/planner/commands/task/task-remove.js +131 -144
- package/dist/m365/planner/commands/task/task-set.js +175 -192
- package/dist/m365/planner/commands/tenant/tenant-settings-list.js +21 -34
- package/dist/m365/planner/commands/tenant/tenant-settings-set.js +31 -44
- package/dist/m365/planner/commands.js +1 -3
- package/dist/m365/planner/taskPriority.js +1 -4
- package/dist/m365/pp/commands/Environment.js +1 -2
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-get.js +47 -59
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-list.js +19 -32
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-remove.js +60 -77
- package/dist/m365/pp/commands/card/card-clone.js +54 -71
- package/dist/m365/pp/commands/card/card-get.js +47 -64
- package/dist/m365/pp/commands/card/card-list.js +19 -32
- package/dist/m365/pp/commands/card/card-remove.js +60 -77
- package/dist/m365/pp/commands/chatbot/chatbot-get.js +47 -60
- package/dist/m365/pp/commands/chatbot/chatbot-list.js +20 -33
- package/dist/m365/pp/commands/chatbot/chatbot-remove.js +61 -78
- package/dist/m365/pp/commands/dataverse/dataverse-table-get.js +26 -39
- package/dist/m365/pp/commands/dataverse/dataverse-table-list.js +20 -33
- package/dist/m365/pp/commands/dataverse/dataverse-table-remove.js +40 -55
- package/dist/m365/pp/commands/dataverse/dataverse-table-row-list.js +35 -50
- package/dist/m365/pp/commands/dataverse/dataverse-table-row-remove.js +55 -72
- package/dist/m365/pp/commands/environment/environment-get.js +26 -39
- package/dist/m365/pp/commands/environment/environment-list.js +35 -48
- package/dist/m365/pp/commands/gateway/gateway-get.js +21 -34
- package/dist/m365/pp/commands/gateway/gateway-list.js +24 -37
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +51 -63
- package/dist/m365/pp/commands/managementapp/managementapp-list.js +15 -28
- package/dist/m365/pp/commands/solution/Solution.js +1 -2
- package/dist/m365/pp/commands/solution/solution-get.js +50 -65
- package/dist/m365/pp/commands/solution/solution-list.js +31 -44
- package/dist/m365/pp/commands/solution/solution-publish.js +69 -86
- package/dist/m365/pp/commands/solution/solution-publisher-add.js +33 -46
- package/dist/m365/pp/commands/solution/solution-publisher-get.js +39 -54
- package/dist/m365/pp/commands/solution/solution-publisher-list.js +26 -39
- package/dist/m365/pp/commands/solution/solution-publisher-remove.js +60 -77
- package/dist/m365/pp/commands/solution/solution-remove.js +60 -77
- package/dist/m365/pp/commands/tenant/tenant-settings-list.js +21 -34
- package/dist/m365/pp/commands/tenant/tenant-settings-set.js +71 -84
- package/dist/m365/pp/commands.js +1 -3
- package/dist/m365/purview/commands/auditlog/auditlog-list.js +101 -120
- package/dist/m365/purview/commands/retentionevent/retentionevent-add.js +57 -72
- package/dist/m365/purview/commands/retentionevent/retentionevent-get.js +28 -41
- package/dist/m365/purview/commands/retentionevent/retentionevent-list.js +16 -29
- package/dist/m365/purview/commands/retentionevent/retentionevent-remove.js +39 -54
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-add.js +26 -39
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-get.js +27 -40
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-list.js +14 -27
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-remove.js +39 -54
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-set.js +31 -44
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-add.js +84 -99
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-get.js +27 -40
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-list.js +14 -27
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-remove.js +39 -54
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-set.js +29 -42
- package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-get.js +39 -52
- package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-list.js +28 -41
- package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-policysettings-list.js +35 -48
- package/dist/m365/purview/commands/threatassessment/threatassessment-get.js +27 -40
- package/dist/m365/purview/commands.js +1 -3
- package/dist/m365/search/commands/externalconnection/externalconnection-add.js +35 -48
- package/dist/m365/search/commands/externalconnection/externalconnection-get.js +33 -46
- package/dist/m365/search/commands/externalconnection/externalconnection-list.js +14 -27
- package/dist/m365/search/commands/externalconnection/externalconnection-remove.js +54 -69
- package/dist/m365/search/commands/externalconnection/externalconnection-schema-add.js +26 -39
- package/dist/m365/search/commands.js +1 -3
- package/dist/m365/skype/commands/report/report-activitycounts.js +5 -7
- package/dist/m365/skype/commands/report/report-activityusercounts.js +5 -7
- package/dist/m365/skype/commands/report/report-activityuserdetail.js +5 -7
- package/dist/m365/skype/commands.js +1 -3
- package/dist/m365/spfx/commands/package/package-generate.js +122 -133
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +55 -0
- package/dist/m365/spfx/commands/project/JsonRule.js +3 -7
- package/dist/m365/spfx/commands/project/Rule.js +1 -5
- package/dist/m365/spfx/commands/project/WebApiPermissionRequests.js +1 -2
- package/dist/m365/spfx/commands/project/base-project-command.js +45 -49
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.0.0.js +5 -7
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.0.1.js +5 -7
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.0.2.js +5 -7
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.1.0.js +13 -15
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.1.1.js +13 -15
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.1.3.js +13 -15
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.10.0.js +19 -21
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.11.0.js +19 -21
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.12.0.js +19 -21
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.12.1.js +19 -21
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.13.0.js +19 -21
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.13.1.js +19 -21
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.14.0.js +19 -21
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.15.0.js +19 -21
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.15.2.js +19 -21
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.16.0.js +19 -21
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.16.1.js +19 -21
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.0.js +19 -21
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.1.js +19 -21
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.2.js +21 -23
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.3.js +21 -23
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.4.js +21 -23
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.18.0-rc.1.js +21 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.2.0.js +13 -15
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.0.js +13 -15
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.1.js +13 -15
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.2.js +13 -15
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.4.js +15 -17
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.4.0.js +15 -17
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.4.1.js +15 -17
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.5.0.js +15 -17
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.5.1.js +15 -17
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.6.0.js +15 -17
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.7.0.js +15 -17
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.7.1.js +15 -17
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.8.0.js +17 -19
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.8.1.js +17 -19
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.8.2.js +19 -21
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.9.1.js +19 -21
- package/dist/m365/spfx/commands/project/project-doctor/generic-rules.js +25 -28
- package/dist/m365/spfx/commands/project/project-doctor/rules/DependencyRule.js +5 -9
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN001008_DEP_react.js +4 -8
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN001009_DEP_react_dom.js +4 -8
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN001022_DEP_office_ui_fabric_react.js +4 -8
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN001035_DEP_fluentui_react.js +4 -8
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002004_DEVDEP_gulp.js +2 -6
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002007_DEVDEP_ajv.js +2 -6
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002013_DEVDEP_types_webpack_env.js +2 -6
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002015_DEVDEP_types_react.js +4 -8
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002016_DEVDEP_types_react_dom.js +4 -8
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002019_DEVDEP_microsoft_rush_stack_compiler.js +2 -6
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021001_PKG_spfx_deps_versions_match_project_version.js +5 -9
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021002_PKG_spfx_deps_use_exact_version.js +5 -9
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021003_PKG_spfx_deps_installed_as_deps.js +3 -7
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021004_PKG_spfx_devdeps_installed_as_devdeps.js +3 -7
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021005_PKG_types_installed_as_devdep.js +2 -6
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021006_PKG_rush_stack_compiler_installed_as_devdep.js +2 -6
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021007_PKG_only_one_rush_stack_compiler_installed.js +3 -8
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021008_PKG_no_duplicate_deps.js +3 -7
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021009_PKG_no_duplicate_oui_deps.js +5 -10
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021010_PKG_gulp_installed_as_devdep.js +2 -6
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021011_PKG_ajv_installed_as_devdep.js +2 -6
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021012_PKG_no_duplicate_pnpjs_deps.js +2 -6
- package/dist/m365/spfx/commands/project/project-doctor/spfx-deps.js +2 -5
- package/dist/m365/spfx/commands/project/project-doctor.js +121 -133
- package/dist/m365/spfx/commands/project/project-externalize/DefaultRules.js +4 -6
- package/dist/m365/spfx/commands/project/project-externalize/ExternalizeEntry.js +1 -2
- package/dist/m365/spfx/commands/project/project-externalize/FileEdit.js +1 -2
- package/dist/m365/spfx/commands/project/project-externalize/VisitationResult.js +1 -2
- package/dist/m365/spfx/commands/project/project-externalize/index.js +3 -19
- package/dist/m365/spfx/commands/project/project-externalize/rules/BasicDependencyRule.js +1 -5
- package/dist/m365/spfx/commands/project/project-externalize/rules/DynamicRule.js +67 -88
- package/dist/m365/spfx/commands/project/project-externalize/rules/PnPJsRule.js +9 -11
- package/dist/m365/spfx/commands/project/project-externalize/rules/index.js +3 -19
- package/dist/m365/spfx/commands/project/project-externalize.js +48 -60
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +157 -0
- package/dist/m365/spfx/commands/project/project-github-workflow-model.js +2 -0
- package/dist/m365/spfx/commands/project/project-model/ConfigJson.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/CopyAssetsJson.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/DeployAzureStorageJson.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/EsLintRcJs.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/Gitignore.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/GulpfileJs.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/JsonFile.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/Manifest.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/Npmignore.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/PackageJson.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/PackageSolutionJson.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/Project.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/ScssFile.js +3 -7
- package/dist/m365/spfx/commands/project/project-model/ServeJson.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/TsConfigJson.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/TsFile.js +8 -11
- package/dist/m365/spfx/commands/project/project-model/TsLintJson.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/VsCode.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/VsCodeExtensionsJson.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/VsCodeLaunchJson.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/VsCodeSettingsJson.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/WriteManifestsJson.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/YoRcJson.js +1 -2
- package/dist/m365/spfx/commands/project/project-model/index.js +23 -39
- package/dist/m365/spfx/commands/project/project-permissions-grant.js +44 -57
- package/dist/m365/spfx/commands/project/project-rename.js +47 -60
- package/dist/m365/spfx/commands/project/project-upgrade/rules/DependencyRule.js +6 -10
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001001_DEP_microsoft_sp_core_library.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001002_DEP_microsoft_sp_lodash_subset.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001003_DEP_microsoft_sp_office_ui_fabric_core.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001004_DEP_microsoft_sp_webpart_base.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001005_DEP_types_react.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001006_DEP_types_react_dom.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001007_DEP_types_webpack_env.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001008_DEP_react.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001009_DEP_react_dom.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001010_DEP_types_es6_promise.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001011_DEP_microsoft_sp_dialog.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001012_DEP_microsoft_sp_application_base.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001013_DEP_microsoft_decorators.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001014_DEP_microsoft_sp_listview_extensibility.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001015_DEP_types_react_addons_shallow_compare.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001016_DEP_types_react_addons_update.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001017_DEP_types_react_addons_update.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001018_DEP_microsoft_sp_client_base.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001019_DEP_knockout.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001020_DEP_types_knockout.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001021_DEP_microsoft_sp_property_pane.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001022_DEP_office_ui_fabric_react.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001023_DEP_microsoft_sp_component_base.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001024_DEP_microsoft_sp_diagnostics.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001025_DEP_microsoft_sp_dynamic_data.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001026_DEP_microsoft_sp_extension_base.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001027_DEP_microsoft_sp_http.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001028_DEP_microsoft_sp_list_subscription.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001029_DEP_microsoft_sp_loader.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001030_DEP_microsoft_sp_module_interfaces.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001031_DEP_microsoft_sp_odata_types.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001032_DEP_microsoft_sp_page_context.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001033_DEP_tslib.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001034_DEP_microsoft_sp_adaptive_card_extension_base.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001035_DEP_fluentui_react.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002001_DEVDEP_microsoft_sp_build_web.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002002_DEVDEP_microsoft_sp_module_interfaces.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002003_DEVDEP_microsoft_sp_webpart_workbench.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002004_DEVDEP_gulp.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002005_DEVDEP_types_chai.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002006_DEVDEP_types_mocha.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002007_DEVDEP_ajv.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002008_DEVDEP_tslint_microsoft_contrib.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002009_DEVDEP_microsoft_sp_tslint_rules.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002010_DEVDEP_microsoft_rush_stack_compiler_2_7.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002011_DEVDEP_microsoft_rush_stack_compiler_2_9.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002012_DEVDEP_microsoft_rush_stack_compiler_3_3.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002013_DEVDEP_types_webpack_env.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002014_DEVDEP_types_es6_promise.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002015_DEVDEP_types_react.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002016_DEVDEP_types_react_dom.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002017_DEVDEP_microsoft_rush_stack_compiler_3_7.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002018_DEVDEP_microsoft_rush_stack_compiler_3_9.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002019_DEVDEP_spfx_fast_serve_helpers.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002021_DEVDEP_rushstack_eslint_config.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002022_DEVDEP_microsoft_eslint_plugin_spfx.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002023_DEVDEP_microsoft_eslint_config_spfx.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002024_DEVDEP_eslint.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002025_DEVDEP_eslint_plugin_react_hooks.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002026_DEVDEP_typescript.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002027_DEVDEP_fluentui_react.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002028_DEVDEP_microsoft_rush_stack_compiler_4_7.js +13 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN003001_CFG_schema.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN003002_CFG_version.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN003003_CFG_bundles.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN003004_CFG_entries.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN003005_CFG_localizedResource_pathLib.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN004001_CFG_CA_schema.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN004002_CFG_CA_deployCdnPath.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN005001_CFG_DAS_schema.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN005002_CFG_DAS_workingDir.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006001_CFG_PS_schema.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006002_CFG_PS_includeClientSideAssets.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006003_CFG_PS_isDomainIsolated.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006004_CFG_PS_developer.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006005_CFG_PS_metadata.js +3 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006006_CFG_PS_features.js +4 -9
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN007001_CFG_S_schema.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN007002_CFG_S_initialPage.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN007003_CFG_S_api.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN008001_CFG_TSL_schema.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN008002_CFG_TSL_removeRule.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN008003_CFG_TSL_preferConst.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN009001_CFG_WM_schema.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010001_YORC_version.js +3 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010002_YORC_isCreatingSolution.js +3 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010003_YORC_packageManager.js +3 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010004_YORC_componentType.js +3 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010005_YORC_environment.js +3 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010006_YORC_framework.js +4 -9
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010007_YORC_isDomainIsolated.js +3 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010008_YORC_nodeVersion.js +4 -9
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010009_YORC_sdkVersions_microsoft_graph_client.js +4 -9
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010010_YORC_sdkVersions_teams_js.js +4 -9
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011001_MAN_webpart_schema.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011002_MAN_applicationCustomizer_schema.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011003_MAN_listViewCommandSet_schema.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011004_MAN_fieldCustomizer_schema.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011005_MAN_webpart_defaultGroup.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011006_MAN_listViewCommandSet_items.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011007_MAN_listViewCommandSet_removeCommands.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011008_MAN_requiresCustomScript.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011009_MAN_webpart_safeWithCustomScriptDisabled.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011010_MAN_webpart_version.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN011011_MAN_webpart_supportedHosts.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012001_TSC_module.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012002_TSC_moduleResolution.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012003_TSC_skipLibCheck.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012004_TSC_typeRoots_types.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012005_TSC_typeRoots_microsoft.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012006_TSC_types_es6_collections.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012007_TSC_lib_es5.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012008_TSC_lib_dom.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012009_TSC_lib_es2015_collection.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012010_TSC_experimentalDecorators.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012011_TSC_outDir.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012012_TSC_include.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012013_TSC_exclude.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012014_TSC_inlineSources.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012015_TSC_strictNullChecks.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012016_TSC_noUnusedLocals.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012017_TSC_extends.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012018_TSC_lib_es2015_promise.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012019_TSC_types_es6_promise.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012020_TSC_noImplicitAny.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN013001_GULP_msGridSassSuppression.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN013002_GULP_serveTask.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014001_CODE_settings_jsonSchemas.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014002_CODE_extensions.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014003_CODE_launch.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014004_CODE_settings_jsonSchemas_configJson_url.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014005_CODE_settingsfile.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014006_CODE_launch_sourceMapPathOverrides.js +3 -7
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014007_CODE_launch_localWorkbench.js +3 -7
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014008_CODE_launch_hostedWorkbench_type.js +3 -7
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN014009_CODE_launch_hostedWorkbench_url.js +3 -7
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015001_FILE_typings_tsd_d_ts.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015002_FILE_typings__ms_odsp_d_ts.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015003_FILE_tslint_json.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015004_FILE_config_tslint_json.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015005_FILE_src_index_ts.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015007_FILE_config_copy_assets_json.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015008_FILE_eslintrc_js.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015009_FILE_config_sass_json.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN016001_TS_msgraphclient_packageName.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN016002_TS_msgraphclient_instance.js +5 -9
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN016003_TS_aadhttpclient_instance.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN016004_TS_property_pane_property_import.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN017001_MISC_npm_dedupe.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN018001_TEAMS_folder.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN018002_TEAMS_manifest.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN018003_TEAMS_tab20x20_png.js +6 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN018004_TEAMS_tab96x96_png.js +6 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN018005_TEAMS_deprecated_manifest.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN019001_TSL_rulesDirectory.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN019002_TSL_extends.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN020001_RES_types_react.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021001_PKG_main.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021002_PKG_engines.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021003_PKG_engines_node.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN022001_SCSS_remove_fabric_react.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN022002_SCSS_add_fabric_react.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023001_GITIGNORE_release.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN023002_GITIGNORE_heft.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN024001_NPMIGNORE_file.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN025001_ESLINTRCJS_overrides.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FileAddRemoveRule.js +4 -8
- package/dist/m365/spfx/commands/project/project-upgrade/rules/ManifestRule.js +3 -7
- package/dist/m365/spfx/commands/project/project-upgrade/rules/PackageRule.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/ResolutionRule.js +2 -6
- package/dist/m365/spfx/commands/project/project-upgrade/rules/ScssRule.js +3 -7
- package/dist/m365/spfx/commands/project/project-upgrade/rules/TsRule.js +3 -7
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.0.1.js +5 -7
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.0.2.js +9 -11
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.1.0.js +57 -59
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.1.1.js +15 -17
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.1.3.js +9 -11
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.10.0.js +57 -59
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.11.0.js +71 -73
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.12.0.js +87 -89
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.12.1.js +55 -57
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.13.0.js +79 -81
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.13.1.js +49 -51
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.14.0.js +57 -59
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.0.js +82 -84
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.2.js +62 -64
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.16.0.js +73 -75
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.16.1.js +53 -55
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.17.0.js +63 -65
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.17.1.js +51 -53
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.17.2.js +57 -59
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.17.3.js +55 -57
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.17.4.js +51 -53
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.18.0-rc.1.js +67 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.2.0.js +69 -71
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.3.0.js +39 -41
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.3.1.js +3 -5
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.3.2.js +3 -5
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.3.4.js +45 -47
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.4.0.js +73 -75
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.4.1.js +41 -43
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.5.0.js +83 -85
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.5.1.js +43 -45
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.6.0.js +63 -65
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.7.0.js +71 -73
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.7.1.js +53 -55
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.8.0.js +73 -75
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.8.1.js +49 -51
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.8.2.js +63 -65
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.9.1.js +71 -73
- package/dist/m365/spfx/commands/project/project-upgrade.js +207 -219
- package/dist/m365/spfx/commands/project/report-model/Finding.js +1 -2
- package/dist/m365/spfx/commands/project/report-model/FindingToReport.js +1 -2
- package/dist/m365/spfx/commands/project/report-model/FindingTour.js +1 -2
- package/dist/m365/spfx/commands/project/report-model/FindingTourStep.js +1 -2
- package/dist/m365/spfx/commands/project/report-model/Occurrence.js +1 -2
- package/dist/m365/spfx/commands/project/report-model/ReportData.js +1 -2
- package/dist/m365/spfx/commands/project/report-model/index.js +5 -21
- package/dist/m365/spfx/commands/spfx-doctor.js +187 -231
- package/dist/m365/spfx/commands.js +2 -3
- package/dist/m365/spo/ClientSideComponent.js +1 -2
- package/dist/m365/spo/StandardWebPartTypes.js +1 -5
- package/dist/m365/spo/base-permissions.js +3 -7
- package/dist/m365/spo/commands/app/AppMetadata.js +1 -2
- package/dist/m365/spo/commands/app/SpoAppBaseCommand.js +30 -33
- package/dist/m365/spo/commands/app/app-add.js +52 -65
- package/dist/m365/spo/commands/app/app-deploy.js +47 -60
- package/dist/m365/spo/commands/app/app-get.js +42 -55
- package/dist/m365/spo/commands/app/app-install.js +28 -41
- package/dist/m365/spo/commands/app/app-instance-list.js +33 -46
- package/dist/m365/spo/commands/app/app-list.js +31 -44
- package/dist/m365/spo/commands/app/app-remove.js +46 -59
- package/dist/m365/spo/commands/app/app-retract.js +46 -59
- package/dist/m365/spo/commands/app/app-teamspackage-download.js +99 -117
- package/dist/m365/spo/commands/app/app-uninstall.js +43 -56
- package/dist/m365/spo/commands/app/app-upgrade.js +28 -41
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +39 -52
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +63 -76
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-list.js +21 -34
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +66 -83
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +71 -87
- package/dist/m365/spo/commands/apppage/apppage-add.js +45 -58
- package/dist/m365/spo/commands/apppage/apppage-set.js +27 -40
- package/dist/m365/spo/commands/cdn/cdn-get.js +43 -56
- package/dist/m365/spo/commands/cdn/cdn-origin-add.js +38 -51
- package/dist/m365/spo/commands/cdn/cdn-origin-list.js +41 -54
- package/dist/m365/spo/commands/cdn/cdn-origin-remove.js +54 -67
- package/dist/m365/spo/commands/cdn/cdn-policy-list.js +49 -62
- package/dist/m365/spo/commands/cdn/cdn-policy-set.js +45 -58
- package/dist/m365/spo/commands/cdn/cdn-set.js +71 -84
- package/dist/m365/spo/commands/commandset/commandset-add.js +55 -68
- package/dist/m365/spo/commands/commandset/commandset-get.js +58 -69
- package/dist/m365/spo/commands/commandset/commandset-list.js +25 -38
- package/dist/m365/spo/commands/commandset/commandset-remove.js +76 -92
- package/dist/m365/spo/commands/commandset/commandset-set.js +84 -97
- package/dist/m365/spo/commands/contenttype/FieldLink.js +1 -2
- package/dist/m365/spo/commands/contenttype/contenttype-add.js +122 -143
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +126 -143
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +193 -215
- package/dist/m365/spo/commands/contenttype/contenttype-get.js +57 -70
- package/dist/m365/spo/commands/contenttype/contenttype-list.js +20 -33
- package/dist/m365/spo/commands/contenttype/contenttype-remove.js +69 -82
- package/dist/m365/spo/commands/contenttype/contenttype-set.js +123 -148
- package/dist/m365/spo/commands/contenttypehub/contenttypehub-get.js +35 -48
- package/dist/m365/spo/commands/customaction/customaction-add.js +57 -70
- package/dist/m365/spo/commands/customaction/customaction-clear.js +42 -57
- package/dist/m365/spo/commands/customaction/customaction-get.js +70 -82
- package/dist/m365/spo/commands/customaction/customaction-list.js +30 -43
- package/dist/m365/spo/commands/customaction/customaction-remove.js +77 -94
- package/dist/m365/spo/commands/customaction/customaction-set.js +59 -76
- package/dist/m365/spo/commands/customaction/customaction.js +1 -2
- package/dist/m365/spo/commands/eventreceiver/EventReceiver.js +1 -2
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +65 -78
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-list.js +39 -52
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +71 -88
- package/dist/m365/spo/commands/externaluser/ExternalUser.js +1 -2
- package/dist/m365/spo/commands/externaluser/ExternalUserCollection.js +1 -2
- package/dist/m365/spo/commands/externaluser/GetExternalUsersResults.js +1 -2
- package/dist/m365/spo/commands/externaluser/externaluser-list.js +62 -75
- package/dist/m365/spo/commands/feature/Feature.js +1 -2
- package/dist/m365/spo/commands/feature/feature-disable.js +32 -45
- package/dist/m365/spo/commands/feature/feature-enable.js +34 -47
- package/dist/m365/spo/commands/feature/feature-list.js +24 -37
- package/dist/m365/spo/commands/field/field-add.js +46 -59
- package/dist/m365/spo/commands/field/field-get.js +47 -60
- package/dist/m365/spo/commands/field/field-list.js +32 -45
- package/dist/m365/spo/commands/field/field-remove.js +91 -104
- package/dist/m365/spo/commands/field/field-set.js +74 -87
- package/dist/m365/spo/commands/file/FileProperties.js +1 -2
- package/dist/m365/spo/commands/file/FilePropertiesCollection.js +2 -0
- package/dist/m365/spo/commands/file/FileSharingPrincipalType.js +2 -5
- package/dist/m365/spo/commands/file/file-add.js +313 -338
- package/dist/m365/spo/commands/file/file-checkin.js +48 -61
- package/dist/m365/spo/commands/file/file-checkout-undo.js +52 -65
- package/dist/m365/spo/commands/file/file-checkout.js +35 -48
- package/dist/m365/spo/commands/file/file-copy.js +84 -65
- package/dist/m365/spo/commands/file/file-get.js +94 -104
- package/dist/m365/spo/commands/file/file-list.js +92 -109
- package/dist/m365/spo/commands/file/file-move.js +94 -133
- package/dist/m365/spo/commands/file/file-remove.js +63 -76
- package/dist/m365/spo/commands/file/file-rename.js +62 -79
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +68 -85
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +68 -85
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +99 -122
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +94 -113
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +62 -77
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +61 -76
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +78 -93
- package/dist/m365/spo/commands/file/file-sharinglink-add.js +45 -58
- package/dist/m365/spo/commands/file/file-sharinglink-clear.js +59 -74
- package/dist/m365/spo/commands/file/file-sharinglink-get.js +31 -44
- package/dist/m365/spo/commands/file/file-sharinglink-list.js +44 -57
- package/dist/m365/spo/commands/file/file-sharinglink-remove.js +44 -57
- package/dist/m365/spo/commands/file/file-sharinglink-set.js +36 -49
- package/dist/m365/spo/commands/file/file-version-clear.js +51 -66
- package/dist/m365/spo/commands/file/file-version-get.js +42 -57
- package/dist/m365/spo/commands/file/file-version-list.js +31 -44
- package/dist/m365/spo/commands/file/file-version-remove.js +51 -66
- package/dist/m365/spo/commands/file/file-version-restore.js +51 -66
- package/dist/m365/spo/commands/folder/FileFolderCollection.js +2 -0
- package/dist/m365/spo/commands/folder/FolderProperties.js +1 -2
- package/dist/m365/spo/commands/folder/folder-add.js +31 -46
- package/dist/m365/spo/commands/folder/folder-copy.js +96 -65
- package/dist/m365/spo/commands/folder/folder-get.js +53 -66
- package/dist/m365/spo/commands/folder/folder-list.js +64 -79
- package/dist/m365/spo/commands/folder/folder-move.js +96 -67
- package/dist/m365/spo/commands/folder/folder-remove.js +55 -67
- package/dist/m365/spo/commands/folder/folder-rename.js +34 -51
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +69 -84
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +83 -100
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +111 -134
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +82 -101
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +47 -60
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +46 -59
- package/dist/m365/spo/commands/group/AssociatedGroupPropertiesCollection.js +1 -2
- package/dist/m365/spo/commands/group/GroupProperties.js +1 -2
- package/dist/m365/spo/commands/group/SharingResult.js +1 -2
- package/dist/m365/spo/commands/group/group-add.js +33 -46
- package/dist/m365/spo/commands/group/group-get.js +49 -62
- package/dist/m365/spo/commands/group/group-list.js +44 -62
- package/dist/m365/spo/commands/group/group-member-add.js +95 -113
- package/dist/m365/spo/commands/group/group-member-list.js +25 -38
- package/dist/m365/spo/commands/group/group-member-remove.js +107 -126
- package/dist/m365/spo/commands/group/group-remove.js +54 -67
- package/dist/m365/spo/commands/group/group-set.js +71 -88
- package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-get.js +25 -38
- package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-set.js +27 -40
- package/dist/m365/spo/commands/homesite/homesite-get.js +24 -37
- package/dist/m365/spo/commands/homesite/homesite-remove.js +45 -58
- package/dist/m365/spo/commands/homesite/homesite-set.js +37 -50
- package/dist/m365/spo/commands/hubsite/AssociatedSite.js +1 -2
- package/dist/m365/spo/commands/hubsite/HubSite.js +1 -2
- package/dist/m365/spo/commands/hubsite/HubSiteProperties.js +1 -2
- package/dist/m365/spo/commands/hubsite/QueryListResult.js +1 -2
- package/dist/m365/spo/commands/hubsite/hubsite-connect.js +51 -63
- package/dist/m365/spo/commands/hubsite/hubsite-data-get.js +31 -44
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +81 -93
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +75 -92
- package/dist/m365/spo/commands/hubsite/hubsite-list.js +71 -86
- package/dist/m365/spo/commands/hubsite/hubsite-register.js +26 -39
- package/dist/m365/spo/commands/hubsite/hubsite-rights-grant.js +40 -53
- package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +52 -65
- package/dist/m365/spo/commands/hubsite/hubsite-set.js +45 -58
- package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +42 -55
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-get.js +32 -45
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +49 -62
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +34 -47
- package/dist/m365/spo/commands/list/DraftVisibilityType.js +2 -5
- package/dist/m365/spo/commands/list/ListExperience.js +2 -5
- package/dist/m365/spo/commands/list/ListInstance.js +1 -2
- package/dist/m365/spo/commands/list/ListPrincipalType.js +2 -5
- package/dist/m365/spo/commands/list/ListTemplateType.js +2 -5
- package/dist/m365/spo/commands/list/list-add.js +52 -65
- package/dist/m365/spo/commands/list/list-contenttype-add.js +47 -60
- package/dist/m365/spo/commands/list/list-contenttype-default-set.js +112 -131
- package/dist/m365/spo/commands/list/list-contenttype-list.js +36 -49
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +59 -72
- package/dist/m365/spo/commands/list/list-get.js +56 -69
- package/dist/m365/spo/commands/list/list-list.js +26 -39
- package/dist/m365/spo/commands/list/list-remove.js +53 -66
- package/dist/m365/spo/commands/list/list-retentionlabel-ensure.js +48 -83
- package/dist/m365/spo/commands/list/list-retentionlabel-get.js +58 -71
- package/dist/m365/spo/commands/list/list-retentionlabel-remove.js +72 -89
- package/dist/m365/spo/commands/list/list-roleassignment-add.js +62 -79
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +92 -111
- package/dist/m365/spo/commands/list/list-roleinheritance-break.js +60 -74
- package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +56 -70
- package/dist/m365/spo/commands/list/list-sensitivitylabel-ensure.js +59 -74
- package/dist/m365/spo/commands/list/list-set.js +63 -76
- package/dist/m365/spo/commands/list/list-sitescript-get.js +60 -73
- package/dist/m365/spo/commands/list/list-view-add.js +43 -56
- package/dist/m365/spo/commands/list/list-view-field-add.js +77 -92
- package/dist/m365/spo/commands/list/list-view-field-remove.js +74 -89
- package/dist/m365/spo/commands/list/list-view-field-set.js +58 -73
- package/dist/m365/spo/commands/list/list-view-get.js +42 -55
- package/dist/m365/spo/commands/list/list-view-list.js +32 -45
- package/dist/m365/spo/commands/list/list-view-remove.js +62 -75
- package/dist/m365/spo/commands/list/list-view-set.js +45 -58
- package/dist/m365/spo/commands/list/list-webhook-add.js +55 -68
- package/dist/m365/spo/commands/list/list-webhook-get.js +46 -59
- package/dist/m365/spo/commands/list/list-webhook-list.js +42 -55
- package/dist/m365/spo/commands/list/list-webhook-remove.js +60 -73
- package/dist/m365/spo/commands/list/list-webhook-set.js +49 -62
- package/dist/m365/spo/commands/listitem/ListItemFieldValueResult.js +1 -2
- package/dist/m365/spo/commands/listitem/ListItemInstance.js +1 -2
- package/dist/m365/spo/commands/listitem/ListItemInstanceCollection.js +1 -2
- package/dist/m365/spo/commands/listitem/ListItemRetentionLabel.js +1 -2
- package/dist/m365/spo/commands/listitem/SiteRetentionLabel.js +1 -2
- package/dist/m365/spo/commands/listitem/listitem-add.js +121 -132
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +44 -57
- package/dist/m365/spo/commands/listitem/listitem-batch-add.js +68 -107
- package/dist/m365/spo/commands/listitem/listitem-batch-set.js +131 -177
- package/dist/m365/spo/commands/listitem/listitem-get.js +59 -72
- package/dist/m365/spo/commands/listitem/listitem-isrecord.js +79 -92
- package/dist/m365/spo/commands/listitem/listitem-list.js +127 -147
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +62 -75
- package/dist/m365/spo/commands/listitem/listitem-record-lock.js +48 -61
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +55 -68
- package/dist/m365/spo/commands/listitem/listitem-record-unlock.js +48 -61
- package/dist/m365/spo/commands/listitem/listitem-remove.js +64 -77
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-ensure.js +102 -121
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +63 -78
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +97 -118
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +93 -114
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +59 -75
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +56 -72
- package/dist/m365/spo/commands/listitem/listitem-set.js +170 -183
- package/dist/m365/spo/commands/mail/mail-send.js +54 -67
- package/dist/m365/spo/commands/navigation/NavigationNode.js +1 -2
- package/dist/m365/spo/commands/navigation/navigation-node-add.js +50 -64
- package/dist/m365/spo/commands/navigation/navigation-node-get.js +28 -41
- package/dist/m365/spo/commands/navigation/navigation-node-list.js +21 -34
- package/dist/m365/spo/commands/navigation/navigation-node-remove.js +44 -59
- package/dist/m365/spo/commands/navigation/navigation-node-set.js +57 -70
- package/dist/m365/spo/commands/orgassetslibrary/OrgAssets.js +1 -2
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +70 -54
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.js +45 -58
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +45 -60
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-list.js +31 -44
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +46 -61
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-set.js +31 -44
- package/dist/m365/spo/commands/page/ClientSideControl.js +1 -2
- package/dist/m365/spo/commands/page/ClientSidePageProperties.js +1 -2
- package/dist/m365/spo/commands/page/Page.js +47 -72
- package/dist/m365/spo/commands/page/PageControl.js +1 -2
- package/dist/m365/spo/commands/page/PageHeader.js +1 -2
- package/dist/m365/spo/commands/page/PageItem.js +1 -2
- package/dist/m365/spo/commands/page/PageTemplate.js +1 -2
- package/dist/m365/spo/commands/page/canvasContent.js +1 -2
- package/dist/m365/spo/commands/page/clientsidepages.js +26 -98
- package/dist/m365/spo/commands/page/page-add.js +197 -212
- package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +249 -264
- package/dist/m365/spo/commands/page/page-column-get.js +32 -45
- package/dist/m365/spo/commands/page/page-column-list.js +27 -40
- package/dist/m365/spo/commands/page/page-control-get.js +48 -60
- package/dist/m365/spo/commands/page/page-control-list.js +42 -54
- package/dist/m365/spo/commands/page/page-control-set.js +115 -120
- package/dist/m365/spo/commands/page/page-copy.js +58 -71
- package/dist/m365/spo/commands/page/page-get.js +52 -64
- package/dist/m365/spo/commands/page/page-header-set.js +243 -256
- package/dist/m365/spo/commands/page/page-list.js +36 -45
- package/dist/m365/spo/commands/page/page-remove.js +51 -66
- package/dist/m365/spo/commands/page/page-section-add.js +127 -105
- package/dist/m365/spo/commands/page/page-section-get.js +23 -36
- package/dist/m365/spo/commands/page/page-section-list.js +30 -43
- package/dist/m365/spo/commands/page/page-set.js +240 -255
- package/dist/m365/spo/commands/page/page-template-list.js +24 -37
- package/dist/m365/spo/commands/page/page-text-add.js +61 -74
- package/dist/m365/spo/commands/page/pageMethods.js +1 -5
- package/dist/m365/spo/commands/propertybag/propertybag-base.js +73 -73
- package/dist/m365/spo/commands/propertybag/propertybag-get.js +30 -43
- package/dist/m365/spo/commands/propertybag/propertybag-list.js +24 -37
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +51 -67
- package/dist/m365/spo/commands/propertybag/propertybag-set.js +30 -43
- package/dist/m365/spo/commands/report/report-activityfilecounts.js +5 -7
- package/dist/m365/spo/commands/report/report-activitypages.js +5 -7
- package/dist/m365/spo/commands/report/report-activityusercounts.js +5 -7
- package/dist/m365/spo/commands/report/report-activityuserdetail.js +5 -7
- package/dist/m365/spo/commands/report/report-siteusagedetail.js +5 -7
- package/dist/m365/spo/commands/report/report-siteusagefilecounts.js +5 -7
- package/dist/m365/spo/commands/report/report-siteusagepages.js +5 -7
- package/dist/m365/spo/commands/report/report-siteusagesitecounts.js +5 -7
- package/dist/m365/spo/commands/report/report-siteusagestorage.js +5 -7
- package/dist/m365/spo/commands/roledefinition/RoleDefinition.js +1 -2
- package/dist/m365/spo/commands/roledefinition/RoleType.js +2 -5
- package/dist/m365/spo/commands/roledefinition/roledefinition-add.js +45 -58
- package/dist/m365/spo/commands/roledefinition/roledefinition-get.js +35 -48
- package/dist/m365/spo/commands/roledefinition/roledefinition-list.js +21 -34
- package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +45 -60
- package/dist/m365/spo/commands/search/datatypes/QueryResult.js +1 -2
- package/dist/m365/spo/commands/search/datatypes/RefinementResult.js +1 -2
- package/dist/m365/spo/commands/search/datatypes/RelevantResults.js +1 -2
- package/dist/m365/spo/commands/search/datatypes/ResultTable.js +1 -2
- package/dist/m365/spo/commands/search/datatypes/ResultTableRow.js +1 -2
- package/dist/m365/spo/commands/search/datatypes/SearchResult.js +1 -2
- package/dist/m365/spo/commands/search/datatypes/SearchResultProperty.js +1 -2
- package/dist/m365/spo/commands/search/datatypes/SpecialTermResult.js +1 -2
- package/dist/m365/spo/commands/serviceprincipal/SPOWebAppServicePrincipalPermissionGrant.js +1 -2
- package/dist/m365/spo/commands/serviceprincipal/SPOWebAppServicePrincipalPermissionRequest.js +1 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-add.js +37 -50
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-list.js +40 -53
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +32 -45
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +68 -85
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.js +36 -49
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.js +78 -95
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +50 -65
- package/dist/m365/spo/commands/site/DeletedSiteProperties.js +1 -2
- package/dist/m365/spo/commands/site/FlowsPolicy.js +7 -0
- package/dist/m365/spo/commands/site/SPOSitePropertiesEnumerable.js +1 -2
- package/dist/m365/spo/commands/site/SharingCapabilities.js +2 -5
- package/dist/m365/spo/commands/site/SiteProperties.js +1 -2
- package/dist/m365/spo/commands/site/site-add.js +257 -321
- package/dist/m365/spo/commands/site/site-appcatalog-add.js +38 -51
- package/dist/m365/spo/commands/site/site-appcatalog-list.js +18 -31
- package/dist/m365/spo/commands/site/site-appcatalog-remove.js +38 -51
- package/dist/m365/spo/commands/site/site-apppermission-add.js +44 -60
- package/dist/m365/spo/commands/site/site-apppermission-get.js +27 -40
- package/dist/m365/spo/commands/site/site-apppermission-list.js +26 -39
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +59 -76
- package/dist/m365/spo/commands/site/site-apppermission-set.js +44 -60
- package/dist/m365/spo/commands/site/site-chrome-set.js +58 -71
- package/dist/m365/spo/commands/site/site-commsite-enable.js +30 -43
- package/dist/m365/spo/commands/site/site-ensure.js +86 -158
- package/dist/m365/spo/commands/site/site-get.js +23 -36
- package/dist/m365/spo/commands/site/site-groupify.js +41 -54
- package/dist/m365/spo/commands/site/site-hubsite-connect.js +29 -42
- package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +42 -55
- package/dist/m365/spo/commands/site/site-hubsite-theme-sync.js +24 -37
- package/dist/m365/spo/commands/site/site-inplacerecordsmanagement-set.js +31 -44
- package/dist/m365/spo/commands/site/site-list.js +50 -81
- package/dist/m365/spo/commands/site/site-recyclebinitem-clear.js +51 -66
- package/dist/m365/spo/commands/site/site-recyclebinitem-list.js +40 -53
- package/dist/m365/spo/commands/site/site-recyclebinitem-move.js +49 -64
- package/dist/m365/spo/commands/site/site-recyclebinitem-remove.js +46 -61
- package/dist/m365/spo/commands/site/site-recyclebinitem-restore.js +42 -55
- package/dist/m365/spo/commands/site/site-remove.js +192 -249
- package/dist/m365/spo/commands/site/site-rename.js +72 -87
- package/dist/m365/spo/commands/site/site-set.js +245 -279
- package/dist/m365/spo/commands/sitedesign/SiteDesign.js +1 -2
- package/dist/m365/spo/commands/sitedesign/SiteDesignPrincipal.js +1 -2
- package/dist/m365/spo/commands/sitedesign/SiteDesignRun.js +1 -2
- package/dist/m365/spo/commands/sitedesign/SiteDesignTask.js +1 -2
- package/dist/m365/spo/commands/sitedesign/SiteScriptActionStatus.js +1 -2
- package/dist/m365/spo/commands/sitedesign/sitedesign-add.js +49 -62
- package/dist/m365/spo/commands/sitedesign/sitedesign-apply.js +37 -50
- package/dist/m365/spo/commands/sitedesign/sitedesign-get.js +31 -44
- package/dist/m365/spo/commands/sitedesign/sitedesign-list.js +23 -36
- package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +45 -58
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-grant.js +35 -48
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-list.js +34 -47
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +48 -61
- package/dist/m365/spo/commands/sitedesign/sitedesign-run-list.js +36 -49
- package/dist/m365/spo/commands/sitedesign/sitedesign-run-status-get.js +31 -44
- package/dist/m365/spo/commands/sitedesign/sitedesign-set.js +59 -72
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-get.js +31 -44
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-list.js +23 -36
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +44 -59
- package/dist/m365/spo/commands/sitescript/sitescript-add.js +30 -43
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +31 -44
- package/dist/m365/spo/commands/sitescript/sitescript-list.js +26 -39
- package/dist/m365/spo/commands/sitescript/sitescript-remove.js +45 -60
- package/dist/m365/spo/commands/sitescript/sitescript-set.js +44 -57
- package/dist/m365/spo/commands/spo-get.js +11 -24
- package/dist/m365/spo/commands/spo-search.js +62 -77
- package/dist/m365/spo/commands/spo-set.js +16 -29
- package/dist/m365/spo/commands/storageentity/TenantProperty.js +1 -2
- package/dist/m365/spo/commands/storageentity/storageentity-get.js +33 -46
- package/dist/m365/spo/commands/storageentity/storageentity-list.js +44 -57
- package/dist/m365/spo/commands/storageentity/storageentity-remove.js +49 -64
- package/dist/m365/spo/commands/storageentity/storageentity-set.js +38 -51
- package/dist/m365/spo/commands/tenant/DeletedSiteProperties.js +1 -2
- package/dist/m365/spo/commands/tenant/DeletedSitePropertiesEnumerable.js +1 -2
- package/dist/m365/spo/commands/tenant/Solution.js +1 -2
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +72 -88
- package/dist/m365/spo/commands/tenant/tenant-appcatalogurl-get.js +27 -40
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +109 -130
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +50 -58
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-list.js +24 -36
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +76 -92
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +142 -162
- package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +117 -138
- package/dist/m365/spo/commands/tenant/tenant-commandset-get.js +53 -61
- package/dist/m365/spo/commands/tenant/tenant-commandset-list.js +27 -39
- package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +78 -93
- package/dist/m365/spo/commands/tenant/tenant-commandset-set.js +106 -206
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-list.js +35 -48
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +67 -82
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +28 -41
- package/dist/m365/spo/commands/tenant/tenant-settings-list.js +53 -66
- package/dist/m365/spo/commands/tenant/tenant-settings-set.js +67 -80
- package/dist/m365/spo/commands/term/Term.js +1 -2
- package/dist/m365/spo/commands/term/TermCollection.js +1 -2
- package/dist/m365/spo/commands/term/TermGroup.js +1 -2
- package/dist/m365/spo/commands/term/TermGroupCollection.js +1 -2
- package/dist/m365/spo/commands/term/TermSet.js +1 -2
- package/dist/m365/spo/commands/term/TermSetCollection.js +1 -2
- package/dist/m365/spo/commands/term/TermStore.js +1 -2
- package/dist/m365/spo/commands/term/term-add.js +101 -114
- package/dist/m365/spo/commands/term/term-get.js +71 -86
- package/dist/m365/spo/commands/term/term-group-add.js +76 -89
- package/dist/m365/spo/commands/term/term-group-get.js +44 -57
- package/dist/m365/spo/commands/term/term-group-list.js +43 -56
- package/dist/m365/spo/commands/term/term-list.js +93 -110
- package/dist/m365/spo/commands/term/term-set-add.js +87 -100
- package/dist/m365/spo/commands/term/term-set-get.js +46 -59
- package/dist/m365/spo/commands/term/term-set-list.js +47 -60
- package/dist/m365/spo/commands/theme/theme-apply.js +63 -76
- package/dist/m365/spo/commands/theme/theme-get.js +34 -47
- package/dist/m365/spo/commands/theme/theme-list.js +25 -46
- package/dist/m365/spo/commands/theme/theme-remove.js +42 -55
- package/dist/m365/spo/commands/theme/theme-set.js +39 -53
- package/dist/m365/spo/commands/user/user-ensure.js +40 -55
- package/dist/m365/spo/commands/user/user-get.js +40 -53
- package/dist/m365/spo/commands/user/user-list.js +29 -42
- package/dist/m365/spo/commands/user/user-remove.js +50 -63
- package/dist/m365/spo/commands/userprofile/userprofile-get.js +32 -45
- package/dist/m365/spo/commands/userprofile/userprofile-set.js +37 -50
- package/dist/m365/spo/commands/web/GetClientSideWebPartsRsp.js +1 -2
- package/dist/m365/spo/commands/web/WebProperties.js +1 -2
- package/dist/m365/spo/commands/web/WebPropertiesCollection.js +1 -2
- package/dist/m365/spo/commands/web/web-add.js +80 -93
- package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +35 -48
- package/dist/m365/spo/commands/web/web-get.js +35 -48
- package/dist/m365/spo/commands/web/web-installedlanguage-list.js +26 -39
- package/dist/m365/spo/commands/web/web-list.js +23 -36
- package/dist/m365/spo/commands/web/web-reindex.js +83 -103
- package/dist/m365/spo/commands/web/web-remove.js +41 -54
- package/dist/m365/spo/commands/web/web-retentionlabel-list.js +21 -34
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +48 -76
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +55 -79
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +43 -56
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +44 -57
- package/dist/m365/spo/commands/web/web-set.js +75 -88
- package/dist/m365/spo/commands.js +1 -3
- package/dist/m365/teams/Tab.js +2 -0
- package/dist/m365/teams/TeamsAppInstallation.js +2 -0
- package/dist/m365/teams/commands/app/app-install.js +62 -78
- package/dist/m365/teams/commands/app/app-list.js +24 -37
- package/dist/m365/teams/commands/app/app-publish.js +30 -43
- package/dist/m365/teams/commands/app/app-remove.js +41 -54
- package/dist/m365/teams/commands/app/app-uninstall.js +40 -53
- package/dist/m365/teams/commands/app/app-update.js +49 -64
- package/dist/m365/teams/commands/cache/cache-remove.js +99 -117
- package/dist/m365/teams/commands/channel/channel-add.js +69 -82
- package/dist/m365/teams/commands/channel/channel-get.js +60 -77
- package/dist/m365/teams/commands/channel/channel-list.js +32 -47
- package/dist/m365/teams/commands/channel/channel-member-add.js +102 -123
- package/dist/m365/teams/commands/channel/channel-member-list.js +58 -75
- package/dist/m365/teams/commands/channel/channel-member-remove.js +109 -131
- package/dist/m365/teams/commands/channel/channel-member-set.js +89 -108
- package/dist/m365/teams/commands/channel/channel-remove.js +75 -92
- package/dist/m365/teams/commands/channel/channel-set.js +59 -76
- package/dist/m365/teams/commands/chat/chat-get.js +65 -89
- package/dist/m365/teams/commands/chat/chat-list.js +31 -44
- package/dist/m365/teams/commands/chat/chat-member-add.js +41 -54
- package/dist/m365/teams/commands/chat/chat-member-list.js +19 -32
- package/dist/m365/teams/commands/chat/chat-member-remove.js +62 -77
- package/dist/m365/teams/commands/chat/chat-message-list.js +35 -48
- package/dist/m365/teams/commands/chat/chat-message-send.js +94 -120
- package/dist/m365/teams/commands/chat/chatUtil.js +19 -35
- package/dist/m365/teams/commands/funsettings/funsettings-list.js +29 -42
- package/dist/m365/teams/commands/funsettings/funsettings-set.js +41 -54
- package/dist/m365/teams/commands/guestsettings/guestsettings-list.js +26 -39
- package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +35 -48
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +52 -67
- package/dist/m365/teams/commands/meeting/meeting-get.js +60 -75
- package/dist/m365/teams/commands/meeting/meeting-list.js +119 -82
- package/dist/m365/teams/commands/meeting/meeting-transcript-list.js +48 -61
- package/dist/m365/teams/commands/membersettings/membersettings-list.js +26 -39
- package/dist/m365/teams/commands/membersettings/membersettings-set.js +35 -48
- package/dist/m365/teams/commands/message/message-get.js +26 -39
- package/dist/m365/teams/commands/message/message-list.js +27 -40
- package/dist/m365/teams/commands/message/message-reply-list.js +24 -37
- package/dist/m365/teams/commands/message/message-send.js +32 -45
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-list.js +26 -39
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +36 -49
- package/dist/m365/teams/commands/report/report-deviceusagedistributionusercounts.js +5 -7
- package/dist/m365/teams/commands/report/report-deviceusageusercounts.js +5 -7
- package/dist/m365/teams/commands/report/report-deviceusageuserdetail.js +5 -7
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +28 -41
- package/dist/m365/teams/commands/report/report-pstncalls.js +28 -41
- package/dist/m365/teams/commands/report/report-useractivitycounts.js +5 -7
- package/dist/m365/teams/commands/report/report-useractivityusercounts.js +5 -7
- package/dist/m365/teams/commands/report/report-useractivityuserdetail.js +5 -7
- package/dist/m365/teams/commands/tab/tab-add.js +30 -43
- package/dist/m365/teams/commands/tab/tab-get.js +72 -91
- package/dist/m365/teams/commands/tab/tab-list.js +24 -37
- package/dist/m365/teams/commands/tab/tab-remove.js +42 -55
- package/dist/m365/teams/commands/team/team-add.js +85 -102
- package/dist/m365/teams/commands/team/team-app-list.js +46 -61
- package/dist/m365/teams/commands/team/team-archive.js +41 -56
- package/dist/m365/teams/commands/team/team-clone.js +45 -63
- package/dist/m365/teams/commands/team/team-get.js +37 -52
- package/dist/m365/teams/commands/team/team-list.js +112 -63
- package/dist/m365/teams/commands/team/team-remove.js +50 -65
- package/dist/m365/teams/commands/team/team-set.js +30 -43
- package/dist/m365/teams/commands/team/team-unarchive.js +38 -53
- package/dist/m365/teams/commands/user/user-app-add.js +29 -42
- package/dist/m365/teams/commands/user/user-app-list.js +51 -66
- package/dist/m365/teams/commands/user/user-app-remove.js +40 -53
- package/dist/m365/teams/commands/user/user-list.js +37 -54
- package/dist/m365/teams/commands.js +1 -3
- package/dist/m365/tenant/commands/id/id-get.js +33 -46
- package/dist/m365/tenant/commands/info/info-get.js +83 -0
- package/dist/m365/tenant/commands/report/report-activeusercounts.js +5 -7
- package/dist/m365/tenant/commands/report/report-activeuserdetail.js +5 -7
- package/dist/m365/tenant/commands/report/report-office365activationcounts.js +31 -46
- package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +31 -46
- package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +31 -46
- package/dist/m365/tenant/commands/report/report-servicesusercounts.js +5 -7
- package/dist/m365/tenant/commands/security/security-alerts-list.js +43 -58
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.js +15 -28
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-list.js +28 -43
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-get.js +22 -35
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-list.js +19 -32
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-get.js +26 -39
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-list.js +19 -32
- package/dist/m365/tenant/commands.js +2 -3
- package/dist/m365/todo/ToDoList.js +1 -2
- package/dist/m365/todo/ToDoTask.js +1 -2
- package/dist/m365/todo/commands/list/list-add.js +26 -39
- package/dist/m365/todo/commands/list/list-get.js +33 -48
- package/dist/m365/todo/commands/list/list-list.js +14 -27
- package/dist/m365/todo/commands/list/list-remove.js +46 -63
- package/dist/m365/todo/commands/list/list-set.js +40 -55
- package/dist/m365/todo/commands/task/task-add.js +68 -85
- package/dist/m365/todo/commands/task/task-get.js +44 -59
- package/dist/m365/todo/commands/task/task-list.js +30 -43
- package/dist/m365/todo/commands/task/task-remove.js +53 -66
- package/dist/m365/todo/commands/task/task-set.js +36 -50
- package/dist/m365/todo/commands.js +1 -3
- package/dist/m365/util/commands/accesstoken/accesstoken-get.js +24 -37
- package/dist/m365/util/commands.js +1 -3
- package/dist/m365/viva/commands/connections/connections-app-create.js +117 -130
- package/dist/m365/viva/commands.js +1 -3
- package/dist/m365/yammer/commands/group/group-list.js +45 -60
- package/dist/m365/yammer/commands/group/group-user-add.js +27 -40
- package/dist/m365/yammer/commands/group/group-user-remove.js +46 -59
- package/dist/m365/yammer/commands/message/message-add.js +33 -46
- package/dist/m365/yammer/commands/message/message-get.js +24 -37
- package/dist/m365/yammer/commands/message/message-like-set.js +50 -64
- package/dist/m365/yammer/commands/message/message-list.js +96 -128
- package/dist/m365/yammer/commands/message/message-remove.js +38 -51
- package/dist/m365/yammer/commands/network/network-list.js +24 -37
- package/dist/m365/yammer/commands/report/report-activitycounts.js +5 -7
- package/dist/m365/yammer/commands/report/report-activityusercounts.js +5 -7
- package/dist/m365/yammer/commands/report/report-activityuserdetail.js +5 -7
- package/dist/m365/yammer/commands/report/report-deviceusagedistributionusercounts.js +5 -7
- package/dist/m365/yammer/commands/report/report-deviceusageusercounts.js +5 -7
- package/dist/m365/yammer/commands/report/report-deviceusageuserdetail.js +5 -7
- package/dist/m365/yammer/commands/report/report-groupsactivitycounts.js +5 -7
- package/dist/m365/yammer/commands/report/report-groupsactivitydetail.js +5 -7
- package/dist/m365/yammer/commands/report/report-groupsactivitygroupcounts.js +5 -7
- package/dist/m365/yammer/commands/user/user-get.js +32 -45
- package/dist/m365/yammer/commands/user/user-list.js +18 -31
- package/dist/m365/yammer/commands/yammer-search.js +141 -171
- package/dist/m365/yammer/commands.js +1 -3
- package/dist/request.js +27 -22
- package/dist/settingsNames.js +1 -4
- package/dist/telemetry.js +10 -13
- package/dist/utils/aadGroup.js +46 -42
- package/dist/utils/aadUser.js +39 -57
- package/dist/utils/accessToken.js +5 -8
- package/dist/utils/app.js +12 -0
- package/dist/utils/basic.js +8 -0
- package/dist/utils/browserUtil.js +5 -19
- package/dist/utils/cache.js +8 -11
- package/dist/utils/formatting.js +16 -12
- package/dist/utils/fsUtil.js +10 -8
- package/dist/utils/md.js +11 -14
- package/dist/utils/misc.js +1 -4
- package/dist/utils/odata.js +20 -35
- package/dist/utils/packageManager.js +13 -16
- package/dist/utils/pid.js +11 -14
- package/dist/utils/planner.js +29 -44
- package/dist/utils/powerPlatform.js +25 -39
- package/dist/utils/session.js +5 -8
- package/dist/utils/sinonUtil.js +1 -4
- package/dist/utils/spfx.js +3 -8
- package/dist/utils/spo.js +820 -319
- package/dist/utils/tsUtil.js +8 -0
- package/dist/utils/types.js +1 -2
- package/dist/utils/urlUtil.js +3 -6
- package/dist/utils/validation.js +2 -8
- package/docs/docs/_clisettings.mdx +1 -1
- package/docs/docs/cmd/_global.mdx +1 -1
- package/docs/docs/cmd/aad/group/group-get.mdx +5 -5
- package/docs/docs/cmd/aad/group/group-list.mdx +0 -11
- package/docs/docs/cmd/aad/{o365group/o365group-add.mdx → m365group/m365group-add.mdx} +13 -13
- package/docs/docs/cmd/aad/{o365group/o365group-conversation-list.mdx → m365group/m365group-conversation-list.mdx} +4 -4
- package/docs/docs/cmd/aad/{o365group/o365group-conversation-post-list.mdx → m365group/m365group-conversation-post-list.mdx} +8 -8
- package/docs/docs/cmd/aad/{o365group/o365group-get.mdx → m365group/m365group-get.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-list.mdx → m365group/m365group-list.mdx} +12 -29
- package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-clear.mdx → m365group/m365group-recyclebinitem-clear.mdx} +5 -5
- package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-list.mdx → m365group/m365group-recyclebinitem-list.mdx} +8 -8
- package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-remove.mdx → m365group/m365group-recyclebinitem-remove.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-recyclebinitem-restore.mdx → m365group/m365group-recyclebinitem-restore.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-remove.mdx → m365group/m365group-remove.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-renew.mdx → m365group/m365group-renew.mdx} +4 -4
- package/docs/docs/cmd/aad/{o365group/o365group-report-activitycounts.mdx → m365group/m365group-report-activitycounts.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-report-activitydetail.mdx → m365group/m365group-report-activitydetail.mdx} +7 -7
- package/docs/docs/cmd/aad/{o365group/o365group-report-activityfilecounts.mdx → m365group/m365group-report-activityfilecounts.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-report-activitygroupcounts.mdx → m365group/m365group-report-activitygroupcounts.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-report-activitystorage.mdx → m365group/m365group-report-activitystorage.mdx} +6 -6
- package/docs/docs/cmd/aad/{o365group/o365group-set.mdx → m365group/m365group-set.mdx} +8 -8
- package/docs/docs/cmd/aad/{o365group/o365group-teamify.mdx → m365group/m365group-teamify.mdx} +5 -5
- package/docs/docs/cmd/aad/{o365group/o365group-user-add.mdx → m365group/m365group-user-add.mdx} +5 -5
- package/docs/docs/cmd/aad/{o365group/o365group-user-list.mdx → m365group/m365group-user-list.mdx} +7 -7
- package/docs/docs/cmd/aad/{o365group/o365group-user-remove.mdx → m365group/m365group-user-remove.mdx} +5 -5
- package/docs/docs/cmd/aad/{o365group/o365group-user-set.mdx → m365group/m365group-user-set.mdx} +5 -5
- package/docs/docs/cmd/aad/policy/policy-list.mdx +5 -5
- package/docs/docs/cmd/aad/user/user-set.mdx +1 -1
- package/docs/docs/cmd/cli/config/config-list.mdx +78 -0
- package/docs/docs/cmd/flow/environment/environment-get.mdx +1 -2
- package/docs/docs/cmd/flow/environment/environment-list.mdx +1 -2
- package/docs/docs/cmd/flow/flow-enable.mdx +2 -2
- package/docs/docs/cmd/flow/run/run-list.mdx +1 -3
- package/docs/docs/cmd/login.mdx +6 -0
- package/docs/docs/cmd/pa/app/app-export.mdx +5 -5
- package/docs/docs/cmd/pa/app/app-permission-ensure.mdx +85 -0
- package/docs/docs/cmd/pa/app/app-permission-remove.mdx +74 -0
- package/docs/docs/cmd/planner/plan/plan-add.mdx +1 -1
- package/docs/docs/cmd/planner/task/task-add.mdx +22 -7
- package/docs/docs/cmd/planner/task/task-get.mdx +13 -4
- package/docs/docs/cmd/planner/task/task-list.mdx +22 -7
- package/docs/docs/cmd/planner/task/task-remove.mdx +25 -8
- package/docs/docs/cmd/planner/task/task-set.mdx +22 -7
- package/docs/docs/cmd/pp/dataverse/dataverse-table-get.mdx +2 -2
- package/docs/docs/cmd/pp/dataverse/dataverse-table-list.mdx +2 -2
- package/docs/docs/cmd/pp/dataverse/dataverse-table-remove.mdx +3 -3
- package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +94 -0
- package/docs/docs/cmd/spo/file/file-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkin.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkout-undo.mdx +1 -9
- package/docs/docs/cmd/spo/file/file-checkout.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-copy.mdx +20 -16
- package/docs/docs/cmd/spo/file/file-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-list.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-move.mdx +36 -18
- package/docs/docs/cmd/spo/file/file-remove.mdx +8 -8
- package/docs/docs/cmd/spo/file/file-rename.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-retentionlabel-remove.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-break.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-reset.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinginfo-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-clear.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-set.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-clear.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-restore.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-add.mdx +76 -1
- package/docs/docs/cmd/spo/folder/folder-copy.mdx +39 -12
- package/docs/docs/cmd/spo/folder/folder-get.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-list.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-move.mdx +40 -13
- package/docs/docs/cmd/spo/folder/folder-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-rename.mdx +5 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +2 -2
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.mdx +1 -1
- package/docs/docs/cmd/spo/list/list-retentionlabel-ensure.mdx +2 -11
- package/docs/docs/cmd/spo/listitem/listitem-add.mdx +2 -5
- package/docs/docs/cmd/spo/listitem/listitem-attachment-list.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-set.mdx +2 -5
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-add.mdx +14 -1
- package/docs/docs/cmd/spo/page/page-get.mdx +0 -1
- package/docs/docs/cmd/spo/page/page-list.mdx +0 -1
- package/docs/docs/cmd/spo/page/page-section-add.mdx +25 -1
- package/docs/docs/cmd/spo/site/site-add.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-list.mdx +3 -78
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-get.mdx +2 -2
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +3 -5
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-remove.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-list.mdx +2 -4
- package/docs/docs/cmd/spo/tenant/tenant-commandset-remove.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +1 -1
- package/docs/docs/cmd/teams/meeting/meeting-list.mdx +135 -92
- package/docs/docs/cmd/teams/team/team-add.mdx +1 -1
- package/docs/docs/cmd/teams/team/team-clone.mdx +3 -3
- package/docs/docs/cmd/teams/team/team-list.mdx +47 -22
- package/docs/docs/cmd/tenant/info/info-get.mdx +101 -0
- package/docs/docs/cmd/yammer/network/network-list.mdx +1 -1
- package/npm-shrinkwrap.json +1451 -6330
- package/package.json +30 -34
- package/dist/m365/aad/commands/o365group/GroupExtended.js +0 -3
- package/dist/m365/aad/commands/o365group/o365group-add.js +0 -274
- package/dist/m365/aad/commands/o365group/o365group-conversation-list.js +0 -63
- package/dist/m365/aad/commands/o365group/o365group-conversation-post-list.js +0 -90
- package/dist/m365/aad/commands/o365group/o365group-get.js +0 -75
- package/dist/m365/aad/commands/o365group/o365group-list.js +0 -130
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-clear.js +0 -97
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-list.js +0 -70
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-remove.js +0 -135
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-restore.js +0 -119
- package/dist/m365/aad/commands/o365group/o365group-remove.js +0 -106
- package/dist/m365/aad/commands/o365group/o365group-renew.js +0 -68
- package/dist/m365/aad/commands/o365group/o365group-report-activitycounts.js +0 -17
- package/dist/m365/aad/commands/o365group/o365group-report-activitydetail.js +0 -17
- package/dist/m365/aad/commands/o365group/o365group-report-activityfilecounts.js +0 -17
- package/dist/m365/aad/commands/o365group/o365group-report-activitygroupcounts.js +0 -17
- package/dist/m365/aad/commands/o365group/o365group-report-activitystorage.js +0 -17
- package/dist/m365/aad/commands/o365group/o365group-set.js +0 -246
- package/dist/m365/aad/commands/o365group/o365group-teamify.js +0 -119
- package/dist/m365/aad/commands/o365group/o365group-user-add.js +0 -109
- package/dist/m365/aad/commands/o365group/o365group-user-list.js +0 -106
- package/dist/m365/aad/commands/o365group/o365group-user-remove.js +0 -147
- package/dist/m365/aad/commands/o365group/o365group-user-set.js +0 -169
- package/dist/m365/pa/cds-project-mutator.js +0 -94
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/generated/ManifestTypes.d.ts +0 -11
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/template_ControlManifest.Input.xml +0 -31
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/template_index.ts +0 -56
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/generated/ManifestTypes.d.ts +0 -12
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/template_ControlManifest.Input.xml +0 -37
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/template_index.ts +0 -53
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/index.ts +0 -0
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-dataset-template/template_ControlManifest.Input.xml +0 -31
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-dataset-template/template_index.tsx +0 -58
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-field-template/template_ControlManifest.Input.xml +0 -37
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-field-template/template_index.tsx +0 -55
- package/dist/m365/pa/commands/pcf/pcf-init/assets/package.json +0 -19
- package/dist/m365/pa/commands/pcf/pcf-init/assets/pcfconfig.json +0 -3
- package/dist/m365/pa/commands/pcf/pcf-init/assets/template_.gitignore +0 -14
- package/dist/m365/pa/commands/pcf/pcf-init/assets/template_pcfprojecttype.pcfproj +0 -45
- package/dist/m365/pa/commands/pcf/pcf-init/pcf-init-variables.js +0 -3
- package/dist/m365/pa/commands/pcf/pcf-init.js +0 -131
- package/dist/m365/pa/commands/solution/solution-init/assets/Other/Customizations.xml +0 -18
- package/dist/m365/pa/commands/solution/solution-init/assets/Other/Relationships.xml +0 -2
- package/dist/m365/pa/commands/solution/solution-init/assets/Other/template_Solution.xml +0 -94
- package/dist/m365/pa/commands/solution/solution-init/assets/template_.gitignore +0 -2
- package/dist/m365/pa/commands/solution/solution-init/assets/template_solutionprojecttype.cdsproj +0 -44
- package/dist/m365/pa/commands/solution/solution-init/solution-init-variables.js +0 -3
- package/dist/m365/pa/commands/solution/solution-init.js +0 -137
- package/dist/m365/pa/commands/solution/solution-reference-add.js +0 -101
- package/dist/m365/pa/template-instantiator.js +0 -59
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.18.0-beta.1.js +0 -23
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.18.0-beta.1.js +0 -61
- package/docs/docs/cmd/pa/pcf/pcf-init.mdx +0 -56
- package/docs/docs/cmd/pa/solution/solution-init.mdx +0 -46
- package/docs/docs/cmd/pa/solution/solution-reference-add.mdx +0 -42
package/dist/utils/spo.js
CHANGED
|
@@ -1,26 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
const urlUtil_1 = require("./urlUtil");
|
|
15
|
-
const validation_1 = require("./validation");
|
|
16
|
-
const Auth_1 = require("../Auth");
|
|
17
|
-
const config_1 = require("../config");
|
|
18
|
-
const base_permissions_1 = require("../m365/spo/base-permissions");
|
|
19
|
-
const request_1 = require("../request");
|
|
20
|
-
const formatting_1 = require("./formatting");
|
|
21
|
-
const odata_1 = require("./odata");
|
|
22
|
-
const RoleType_1 = require("../m365/spo/commands/roledefinition/RoleType");
|
|
23
|
-
exports.spo = {
|
|
1
|
+
import url from 'url';
|
|
2
|
+
import { urlUtil } from "./urlUtil.js";
|
|
3
|
+
import { validation } from "./validation.js";
|
|
4
|
+
import auth from '../Auth.js';
|
|
5
|
+
import config from "../config.js";
|
|
6
|
+
import { BasePermissions } from '../m365/spo/base-permissions.js';
|
|
7
|
+
import request from "../request.js";
|
|
8
|
+
import { formatting } from './formatting.js';
|
|
9
|
+
import { odata } from './odata.js';
|
|
10
|
+
import { RoleType } from '../m365/spo/commands/roledefinition/RoleType.js';
|
|
11
|
+
import { aadGroup } from './aadGroup.js';
|
|
12
|
+
import { SharingCapabilities } from '../m365/spo/commands/site/SharingCapabilities.js';
|
|
13
|
+
export const spo = {
|
|
24
14
|
getRequestDigest(siteUrl) {
|
|
25
15
|
const requestOptions = {
|
|
26
16
|
url: `${siteUrl}/_api/contextinfo`,
|
|
@@ -29,18 +19,18 @@ exports.spo = {
|
|
|
29
19
|
},
|
|
30
20
|
responseType: 'json'
|
|
31
21
|
};
|
|
32
|
-
return
|
|
22
|
+
return request.post(requestOptions);
|
|
33
23
|
},
|
|
34
24
|
ensureFormDigest(siteUrl, logger, context, debug) {
|
|
35
|
-
return new Promise((resolve, reject) => {
|
|
36
|
-
if (
|
|
25
|
+
return new Promise(async (resolve, reject) => {
|
|
26
|
+
if (validation.isValidFormDigest(context)) {
|
|
37
27
|
if (debug) {
|
|
38
|
-
logger.logToStderr('Existing form digest still valid');
|
|
28
|
+
await logger.logToStderr('Existing form digest still valid');
|
|
39
29
|
}
|
|
40
30
|
resolve(context);
|
|
41
31
|
return;
|
|
42
32
|
}
|
|
43
|
-
|
|
33
|
+
spo
|
|
44
34
|
.getRequestDigest(siteUrl)
|
|
45
35
|
.then((res) => {
|
|
46
36
|
const now = new Date();
|
|
@@ -58,21 +48,21 @@ exports.spo = {
|
|
|
58
48
|
});
|
|
59
49
|
},
|
|
60
50
|
waitUntilFinished({ operationId, siteUrl, resolve, reject, logger, currentContext, debug, verbose }) {
|
|
61
|
-
|
|
51
|
+
spo
|
|
62
52
|
.ensureFormDigest(siteUrl, logger, currentContext, debug)
|
|
63
|
-
.then((res) => {
|
|
53
|
+
.then(async (res) => {
|
|
64
54
|
currentContext = res;
|
|
65
55
|
if (debug) {
|
|
66
|
-
logger.logToStderr(`Checking if operation ${operationId} completed...`);
|
|
56
|
+
await logger.logToStderr(`Checking if operation ${operationId} completed...`);
|
|
67
57
|
}
|
|
68
58
|
const requestOptions = {
|
|
69
59
|
url: `${siteUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
70
60
|
headers: {
|
|
71
61
|
'X-RequestDigest': currentContext.FormDigestValue
|
|
72
62
|
},
|
|
73
|
-
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${
|
|
63
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><Query Id="188" ObjectPathId="184"><Query SelectAllProperties="false"><Properties><Property Name="IsComplete" ScalarProperty="true" /><Property Name="PollingInterval" ScalarProperty="true" /></Properties></Query></Query></Actions><ObjectPaths><Identity Id="184" Name="${operationId.replace(/\\n/g, '
').replace(/"/g, '')}" /></ObjectPaths></Request>`
|
|
74
64
|
};
|
|
75
|
-
return
|
|
65
|
+
return request.post(requestOptions);
|
|
76
66
|
})
|
|
77
67
|
.then((res) => {
|
|
78
68
|
const json = JSON.parse(res);
|
|
@@ -91,7 +81,7 @@ exports.spo = {
|
|
|
91
81
|
return;
|
|
92
82
|
}
|
|
93
83
|
setTimeout(() => {
|
|
94
|
-
|
|
84
|
+
spo.waitUntilFinished({
|
|
95
85
|
operationId: JSON.stringify(operation._ObjectIdentity_),
|
|
96
86
|
siteUrl,
|
|
97
87
|
resolve,
|
|
@@ -105,57 +95,16 @@ exports.spo = {
|
|
|
105
95
|
}
|
|
106
96
|
});
|
|
107
97
|
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const requestOptions = {
|
|
111
|
-
url: requestUrl,
|
|
112
|
-
headers: {
|
|
113
|
-
'accept': 'application/json;odata=nometadata'
|
|
114
|
-
},
|
|
115
|
-
data: { "copyJobInfo": copyJobInfo },
|
|
116
|
-
responseType: 'json'
|
|
117
|
-
};
|
|
118
|
-
request_1.default
|
|
119
|
-
.post(requestOptions)
|
|
120
|
-
.then((resp) => {
|
|
121
|
-
if (debug) {
|
|
122
|
-
logger.logToStderr('getCopyJobProgress response...');
|
|
123
|
-
logger.logToStderr(resp);
|
|
124
|
-
}
|
|
125
|
-
for (const item of resp.Logs) {
|
|
126
|
-
const log = JSON.parse(item);
|
|
127
|
-
// reject if progress error
|
|
128
|
-
if (log.Event === "JobError" || log.Event === "JobFatalError") {
|
|
129
|
-
return reject(log.Message);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
// two possible scenarios
|
|
133
|
-
// job done = success promise returned
|
|
134
|
-
// job in progress = recursive call using setTimeout returned
|
|
135
|
-
if (resp.JobState === 0) {
|
|
136
|
-
// job done
|
|
137
|
-
if (verbose) {
|
|
138
|
-
process.stdout.write('\n');
|
|
139
|
-
}
|
|
140
|
-
resolve();
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
143
|
-
setTimeout(() => {
|
|
144
|
-
exports.spo.waitUntilCopyJobFinished({ copyJobInfo, siteUrl, pollingInterval, resolve, reject, logger, debug, verbose });
|
|
145
|
-
}, pollingInterval);
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
},
|
|
149
|
-
getSpoUrl(logger, debug) {
|
|
150
|
-
if (Auth_1.default.service.spoUrl) {
|
|
98
|
+
async getSpoUrl(logger, debug) {
|
|
99
|
+
if (auth.service.spoUrl) {
|
|
151
100
|
if (debug) {
|
|
152
|
-
logger.logToStderr(`SPO URL previously retrieved ${
|
|
101
|
+
await logger.logToStderr(`SPO URL previously retrieved ${auth.service.spoUrl}. Returning...`);
|
|
153
102
|
}
|
|
154
|
-
return Promise.resolve(
|
|
103
|
+
return Promise.resolve(auth.service.spoUrl);
|
|
155
104
|
}
|
|
156
|
-
return new Promise((resolve, reject) => {
|
|
105
|
+
return new Promise(async (resolve, reject) => {
|
|
157
106
|
if (debug) {
|
|
158
|
-
logger.logToStderr(`No SPO URL available. Retrieving from MS Graph...`);
|
|
107
|
+
await logger.logToStderr(`No SPO URL available. Retrieving from MS Graph...`);
|
|
159
108
|
}
|
|
160
109
|
const requestOptions = {
|
|
161
110
|
url: `https://graph.microsoft.com/v1.0/sites/root?$select=webUrl`,
|
|
@@ -164,17 +113,17 @@ exports.spo = {
|
|
|
164
113
|
},
|
|
165
114
|
responseType: 'json'
|
|
166
115
|
};
|
|
167
|
-
|
|
116
|
+
request
|
|
168
117
|
.get(requestOptions)
|
|
169
118
|
.then((res) => {
|
|
170
|
-
|
|
171
|
-
return
|
|
119
|
+
auth.service.spoUrl = res.webUrl;
|
|
120
|
+
return auth.storeConnectionInfo();
|
|
172
121
|
})
|
|
173
122
|
.then(() => {
|
|
174
|
-
resolve(
|
|
123
|
+
resolve(auth.service.spoUrl);
|
|
175
124
|
}, (err) => {
|
|
176
|
-
if (
|
|
177
|
-
resolve(
|
|
125
|
+
if (auth.service.spoUrl) {
|
|
126
|
+
resolve(auth.service.spoUrl);
|
|
178
127
|
}
|
|
179
128
|
else {
|
|
180
129
|
reject(err);
|
|
@@ -184,7 +133,7 @@ exports.spo = {
|
|
|
184
133
|
},
|
|
185
134
|
getSpoAdminUrl(logger, debug) {
|
|
186
135
|
return new Promise((resolve, reject) => {
|
|
187
|
-
|
|
136
|
+
spo
|
|
188
137
|
.getSpoUrl(logger, debug)
|
|
189
138
|
.then((spoUrl) => {
|
|
190
139
|
resolve(spoUrl.replace(/(https:\/\/)([^\.]+)(.*)/, '$1$2-admin$3'));
|
|
@@ -193,23 +142,23 @@ exports.spo = {
|
|
|
193
142
|
});
|
|
194
143
|
});
|
|
195
144
|
},
|
|
196
|
-
getTenantId(logger, debug) {
|
|
197
|
-
if (
|
|
145
|
+
async getTenantId(logger, debug) {
|
|
146
|
+
if (auth.service.tenantId) {
|
|
198
147
|
if (debug) {
|
|
199
|
-
logger.logToStderr(`SPO Tenant ID previously retrieved ${
|
|
148
|
+
await logger.logToStderr(`SPO Tenant ID previously retrieved ${auth.service.tenantId}. Returning...`);
|
|
200
149
|
}
|
|
201
|
-
return Promise.resolve(
|
|
150
|
+
return Promise.resolve(auth.service.tenantId);
|
|
202
151
|
}
|
|
203
|
-
return new Promise((resolve, reject) => {
|
|
152
|
+
return new Promise(async (resolve, reject) => {
|
|
204
153
|
if (debug) {
|
|
205
|
-
logger.logToStderr(`No SPO Tenant ID available. Retrieving...`);
|
|
154
|
+
await logger.logToStderr(`No SPO Tenant ID available. Retrieving...`);
|
|
206
155
|
}
|
|
207
156
|
let spoAdminUrl = '';
|
|
208
|
-
|
|
157
|
+
spo
|
|
209
158
|
.getSpoAdminUrl(logger, debug)
|
|
210
159
|
.then((_spoAdminUrl) => {
|
|
211
160
|
spoAdminUrl = _spoAdminUrl;
|
|
212
|
-
return
|
|
161
|
+
return spo.getRequestDigest(spoAdminUrl);
|
|
213
162
|
})
|
|
214
163
|
.then((contextInfo) => {
|
|
215
164
|
const tenantInfoRequestOptions = {
|
|
@@ -218,20 +167,20 @@ exports.spo = {
|
|
|
218
167
|
'X-RequestDigest': contextInfo.FormDigestValue,
|
|
219
168
|
accept: 'application/json;odata=nometadata'
|
|
220
169
|
},
|
|
221
|
-
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${
|
|
170
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="4" ObjectPathId="3" /><Query Id="5" ObjectPathId="3"><Query SelectAllProperties="true"><Properties /></Query></Query></Actions><ObjectPaths><Constructor Id="3" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
222
171
|
};
|
|
223
|
-
return
|
|
172
|
+
return request.post(tenantInfoRequestOptions);
|
|
224
173
|
})
|
|
225
174
|
.then((res) => {
|
|
226
175
|
const json = JSON.parse(res);
|
|
227
|
-
|
|
228
|
-
return
|
|
176
|
+
auth.service.tenantId = json[json.length - 1]._ObjectIdentity_.replace('\n', '
');
|
|
177
|
+
return auth.storeConnectionInfo();
|
|
229
178
|
})
|
|
230
179
|
.then(() => {
|
|
231
|
-
resolve(
|
|
180
|
+
resolve(auth.service.tenantId);
|
|
232
181
|
}, (err) => {
|
|
233
|
-
if (
|
|
234
|
-
resolve(
|
|
182
|
+
if (auth.service.tenantId) {
|
|
183
|
+
resolve(auth.service.tenantId);
|
|
235
184
|
}
|
|
236
185
|
else {
|
|
237
186
|
reject(err);
|
|
@@ -243,19 +192,17 @@ exports.spo = {
|
|
|
243
192
|
* Returns the Graph id of a site
|
|
244
193
|
* @param webUrl web url e.g. https://contoso.sharepoint.com/sites/site1
|
|
245
194
|
*/
|
|
246
|
-
getSpoGraphSiteId(webUrl) {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
return result.id;
|
|
258
|
-
});
|
|
195
|
+
async getSpoGraphSiteId(webUrl) {
|
|
196
|
+
const url = new URL(webUrl);
|
|
197
|
+
const requestOptions = {
|
|
198
|
+
url: `https://graph.microsoft.com/v1.0/sites/${url.hostname}:${url.pathname}?$select=id`,
|
|
199
|
+
headers: {
|
|
200
|
+
'accept': 'application/json;odata.metadata=none'
|
|
201
|
+
},
|
|
202
|
+
responseType: 'json'
|
|
203
|
+
};
|
|
204
|
+
const result = await request.get(requestOptions);
|
|
205
|
+
return result.id;
|
|
259
206
|
},
|
|
260
207
|
/**
|
|
261
208
|
* Ensures the folder path exists
|
|
@@ -263,7 +210,7 @@ exports.spo = {
|
|
|
263
210
|
* @param folderToEnsure web relative or server relative folder path e.g. /Documents/MyFolder or /sites/site1/Documents/MyFolder
|
|
264
211
|
* @param siteAccessToken a valid access token for the site specified in the webFullUrl param
|
|
265
212
|
*/
|
|
266
|
-
ensureFolder(webFullUrl, folderToEnsure, logger, debug) {
|
|
213
|
+
async ensureFolder(webFullUrl, folderToEnsure, logger, debug) {
|
|
267
214
|
const webUrl = url.parse(webFullUrl);
|
|
268
215
|
if (!webUrl.protocol || !webUrl.hostname) {
|
|
269
216
|
return Promise.reject('webFullUrl is not a valid URL');
|
|
@@ -277,11 +224,11 @@ exports.spo = {
|
|
|
277
224
|
webFullUrl[webFullUrlLastCharPos] === '/') {
|
|
278
225
|
webFullUrl = webFullUrl.substring(0, webFullUrlLastCharPos);
|
|
279
226
|
}
|
|
280
|
-
folderToEnsure =
|
|
227
|
+
folderToEnsure = urlUtil.getWebRelativePath(webFullUrl, folderToEnsure);
|
|
281
228
|
if (debug) {
|
|
282
|
-
logger.log(`folderToEnsure`);
|
|
283
|
-
logger.log(folderToEnsure);
|
|
284
|
-
logger.log('');
|
|
229
|
+
await logger.log(`folderToEnsure`);
|
|
230
|
+
await logger.log(folderToEnsure);
|
|
231
|
+
await logger.log('');
|
|
285
232
|
}
|
|
286
233
|
let nextFolder = '';
|
|
287
234
|
let prevFolder = '';
|
|
@@ -289,51 +236,51 @@ exports.spo = {
|
|
|
289
236
|
// build array of folders e.g. ["Shared%20Documents","22","54","55"]
|
|
290
237
|
const folders = folderToEnsure.substring(1).split('/');
|
|
291
238
|
if (debug) {
|
|
292
|
-
logger.log('folders to process');
|
|
293
|
-
logger.log(JSON.stringify(folders));
|
|
294
|
-
logger.log('');
|
|
239
|
+
await logger.log('folders to process');
|
|
240
|
+
await logger.log(JSON.stringify(folders));
|
|
241
|
+
await logger.log('');
|
|
295
242
|
}
|
|
296
243
|
// recursive function
|
|
297
|
-
const checkOrAddFolder = (resolve, reject) => {
|
|
244
|
+
const checkOrAddFolder = async (resolve, reject) => {
|
|
298
245
|
if (folderIndex === folders.length) {
|
|
299
246
|
if (debug) {
|
|
300
|
-
logger.log(`All sub-folders exist`);
|
|
247
|
+
await logger.log(`All sub-folders exist`);
|
|
301
248
|
}
|
|
302
249
|
return resolve();
|
|
303
250
|
}
|
|
304
251
|
// append the next sub-folder to the folder path and check if it exists
|
|
305
252
|
prevFolder = nextFolder;
|
|
306
253
|
nextFolder += `/${folders[folderIndex]}`;
|
|
307
|
-
const folderServerRelativeUrl =
|
|
254
|
+
const folderServerRelativeUrl = urlUtil.getServerRelativePath(webFullUrl, nextFolder);
|
|
308
255
|
const requestOptions = {
|
|
309
|
-
url: `${webFullUrl}/_api/web/
|
|
256
|
+
url: `${webFullUrl}/_api/web/GetFolderByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(folderServerRelativeUrl)}')`,
|
|
310
257
|
headers: {
|
|
311
258
|
'accept': 'application/json;odata=nometadata'
|
|
312
259
|
}
|
|
313
260
|
};
|
|
314
|
-
|
|
261
|
+
request
|
|
315
262
|
.get(requestOptions)
|
|
316
263
|
.then(() => {
|
|
317
264
|
folderIndex++;
|
|
318
265
|
checkOrAddFolder(resolve, reject);
|
|
319
266
|
})
|
|
320
267
|
.catch(() => {
|
|
321
|
-
const prevFolderServerRelativeUrl =
|
|
268
|
+
const prevFolderServerRelativeUrl = urlUtil.getServerRelativePath(webFullUrl, prevFolder);
|
|
322
269
|
const requestOptions = {
|
|
323
|
-
url: `${webFullUrl}/_api/web/GetFolderByServerRelativePath(DecodedUrl=@a1)/AddSubFolderUsingPath(DecodedUrl=@a2)?@a1=%27${
|
|
270
|
+
url: `${webFullUrl}/_api/web/GetFolderByServerRelativePath(DecodedUrl=@a1)/AddSubFolderUsingPath(DecodedUrl=@a2)?@a1=%27${formatting.encodeQueryParameter(prevFolderServerRelativeUrl)}%27&@a2=%27${formatting.encodeQueryParameter(folders[folderIndex])}%27`,
|
|
324
271
|
headers: {
|
|
325
272
|
'accept': 'application/json;odata=nometadata'
|
|
326
273
|
},
|
|
327
274
|
responseType: 'json'
|
|
328
275
|
};
|
|
329
|
-
return
|
|
276
|
+
return request.post(requestOptions)
|
|
330
277
|
.then(() => {
|
|
331
278
|
folderIndex++;
|
|
332
279
|
checkOrAddFolder(resolve, reject);
|
|
333
280
|
})
|
|
334
|
-
.catch((err) => {
|
|
281
|
+
.catch(async (err) => {
|
|
335
282
|
if (debug) {
|
|
336
|
-
logger.log(`Could not create sub-folder ${folderServerRelativeUrl}`);
|
|
283
|
+
await logger.log(`Could not create sub-folder ${folderServerRelativeUrl}`);
|
|
337
284
|
}
|
|
338
285
|
reject(err);
|
|
339
286
|
});
|
|
@@ -357,10 +304,10 @@ exports.spo = {
|
|
|
357
304
|
headers: {
|
|
358
305
|
'X-RequestDigest': formDigestValue
|
|
359
306
|
},
|
|
360
|
-
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${
|
|
307
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><Query Id="1" ObjectPathId="5"><Query SelectAllProperties="false"><Properties><Property Name="ServerRelativeUrl" ScalarProperty="true" /></Properties></Query></Query></Actions><ObjectPaths><Property Id="5" ParentId="3" Name="Web" /><StaticProperty Id="3" TypeId="{3747adcd-a3c3-41b9-bfab-4a64dd2f1e0a}" Name="Current" /></ObjectPaths></Request>`
|
|
361
308
|
};
|
|
362
309
|
return new Promise((resolve, reject) => {
|
|
363
|
-
|
|
310
|
+
request.post(requestOptions).then((res) => {
|
|
364
311
|
const json = JSON.parse(res);
|
|
365
312
|
const contents = json.find(x => { return x.ErrorInfo; });
|
|
366
313
|
if (contents && contents.ErrorInfo) {
|
|
@@ -385,18 +332,18 @@ exports.spo = {
|
|
|
385
332
|
* @param formDigestValue formDigestValue
|
|
386
333
|
*/
|
|
387
334
|
getEffectiveBasePermissions(webObjectIdentity, webUrl, formDigestValue, logger, debug) {
|
|
388
|
-
const basePermissionsResult = new
|
|
335
|
+
const basePermissionsResult = new BasePermissions();
|
|
389
336
|
const requestOptions = {
|
|
390
337
|
url: `${webUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
391
338
|
headers: {
|
|
392
339
|
'X-RequestDigest': formDigestValue
|
|
393
340
|
},
|
|
394
|
-
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${
|
|
341
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><Query Id="11" ObjectPathId="5"><Query SelectAllProperties="false"><Properties><Property Name="EffectiveBasePermissions" ScalarProperty="true" /></Properties></Query></Query></Actions><ObjectPaths><Identity Id="5" Name="${webObjectIdentity}" /></ObjectPaths></Request>`
|
|
395
342
|
};
|
|
396
343
|
return new Promise((resolve, reject) => {
|
|
397
|
-
|
|
344
|
+
request.post(requestOptions).then(async (res) => {
|
|
398
345
|
if (debug) {
|
|
399
|
-
logger.log('Attempt to get the web EffectiveBasePermissions');
|
|
346
|
+
await logger.log('Attempt to get the web EffectiveBasePermissions');
|
|
400
347
|
}
|
|
401
348
|
const json = JSON.parse(res);
|
|
402
349
|
const contents = json.find(x => { return x.ErrorInfo; });
|
|
@@ -424,16 +371,16 @@ exports.spo = {
|
|
|
424
371
|
* @param formDigestValue formDigestValue
|
|
425
372
|
*/
|
|
426
373
|
getFolderIdentity(webObjectIdentity, webUrl, siteRelativeUrl, formDigestValue) {
|
|
427
|
-
const serverRelativePath =
|
|
374
|
+
const serverRelativePath = urlUtil.getServerRelativePath(webUrl, siteRelativeUrl);
|
|
428
375
|
const requestOptions = {
|
|
429
376
|
url: `${webUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
430
377
|
headers: {
|
|
431
378
|
'X-RequestDigest': formDigestValue
|
|
432
379
|
},
|
|
433
|
-
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${
|
|
380
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="10" ObjectPathId="9" /><ObjectIdentityQuery Id="11" ObjectPathId="9" /><Query Id="12" ObjectPathId="9"><Query SelectAllProperties="false"><Properties><Property Name="Properties" SelectAll="true"><Query SelectAllProperties="false"><Properties /></Query></Property></Properties></Query></Query></Actions><ObjectPaths><Method Id="9" ParentId="5" Name="GetFolderByServerRelativeUrl"><Parameters><Parameter Type="String">${serverRelativePath}</Parameter></Parameters></Method><Identity Id="5" Name="${webObjectIdentity}" /></ObjectPaths></Request>`
|
|
434
381
|
};
|
|
435
382
|
return new Promise((resolve, reject) => {
|
|
436
|
-
return
|
|
383
|
+
return request.post(requestOptions).then((res) => {
|
|
437
384
|
const json = JSON.parse(res);
|
|
438
385
|
const contents = json.find(x => { return x.ErrorInfo; });
|
|
439
386
|
if (contents && contents.ErrorInfo) {
|
|
@@ -456,27 +403,25 @@ exports.spo = {
|
|
|
456
403
|
* @param fileId GUID ID of the file
|
|
457
404
|
* @param fileUrl Decoded site-relative or server-relative URL of the file
|
|
458
405
|
*/
|
|
459
|
-
getVroomFileDetails(webUrl, fileId, fileUrl) {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
return res;
|
|
479
|
-
});
|
|
406
|
+
async getVroomFileDetails(webUrl, fileId, fileUrl) {
|
|
407
|
+
let requestUrl = `${webUrl}/_api/web/`;
|
|
408
|
+
if (fileUrl) {
|
|
409
|
+
const fileServerRelativeUrl = urlUtil.getServerRelativePath(webUrl, fileUrl);
|
|
410
|
+
requestUrl += `GetFileByServerRelativePath(decodedUrl='${formatting.encodeQueryParameter(fileServerRelativeUrl)}')`;
|
|
411
|
+
}
|
|
412
|
+
else {
|
|
413
|
+
requestUrl += `GetFileById('${fileId}')`;
|
|
414
|
+
}
|
|
415
|
+
requestUrl += '?$select=SiteId,VroomItemId,VroomDriveId';
|
|
416
|
+
const requestOptions = {
|
|
417
|
+
url: requestUrl,
|
|
418
|
+
headers: {
|
|
419
|
+
accept: 'application/json;odata=nometadata'
|
|
420
|
+
},
|
|
421
|
+
responseType: 'json'
|
|
422
|
+
};
|
|
423
|
+
const res = await request.get(requestOptions);
|
|
424
|
+
return res;
|
|
480
425
|
},
|
|
481
426
|
/**
|
|
482
427
|
* Retrieves a list of Custom Actions from a SharePoint site.
|
|
@@ -484,21 +429,19 @@ exports.spo = {
|
|
|
484
429
|
* @param scope The scope of custom actions to retrieve, allowed values "Site", "Web" or "All".
|
|
485
430
|
* @param filter An OData filter query to limit the results.
|
|
486
431
|
*/
|
|
487
|
-
getCustomActions(webUrl, scope, filter) {
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
return customActions;
|
|
501
|
-
});
|
|
432
|
+
async getCustomActions(webUrl, scope, filter) {
|
|
433
|
+
if (scope && scope !== "All" && scope !== "Site" && scope !== "Web") {
|
|
434
|
+
throw `Invalid scope '${scope}'. Allowed values are 'Site', 'Web' or 'All'.`;
|
|
435
|
+
}
|
|
436
|
+
const queryString = filter ? `?$filter=${filter}` : "";
|
|
437
|
+
if (scope && scope !== "All") {
|
|
438
|
+
return await odata.getAllItems(`${webUrl}/_api/${scope}/UserCustomActions${queryString}`);
|
|
439
|
+
}
|
|
440
|
+
const customActions = [
|
|
441
|
+
...await odata.getAllItems(`${webUrl}/_api/Site/UserCustomActions${queryString}`),
|
|
442
|
+
...await odata.getAllItems(`${webUrl}/_api/Web/UserCustomActions${queryString}`)
|
|
443
|
+
];
|
|
444
|
+
return customActions;
|
|
502
445
|
},
|
|
503
446
|
/**
|
|
504
447
|
* Retrieves a Custom Actions from a SharePoint site by Id.
|
|
@@ -506,69 +449,61 @@ exports.spo = {
|
|
|
506
449
|
* @param id The Id of the Custom Action
|
|
507
450
|
* @param scope The scope of custom actions to retrieve, allowed values "Site", "Web" or "All".
|
|
508
451
|
*/
|
|
509
|
-
getCustomActionById(webUrl, id, scope) {
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
function getById(webUrl, id, scope) {
|
|
515
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
516
|
-
const requestOptions = {
|
|
517
|
-
url: `${webUrl}/_api/${scope}/UserCustomActions(guid'${id}')`,
|
|
518
|
-
headers: {
|
|
519
|
-
accept: 'application/json;odata=nometadata'
|
|
520
|
-
},
|
|
521
|
-
responseType: 'json'
|
|
522
|
-
};
|
|
523
|
-
const result = yield request_1.default.get(requestOptions);
|
|
524
|
-
if (result["odata.null"] === true) {
|
|
525
|
-
return undefined;
|
|
526
|
-
}
|
|
527
|
-
return result;
|
|
528
|
-
});
|
|
529
|
-
}
|
|
530
|
-
if (scope && scope !== "All") {
|
|
531
|
-
return yield getById(webUrl, id, scope);
|
|
532
|
-
}
|
|
533
|
-
const customActionOnWeb = yield getById(webUrl, id, "Web");
|
|
534
|
-
if (customActionOnWeb) {
|
|
535
|
-
return customActionOnWeb;
|
|
536
|
-
}
|
|
537
|
-
const customActionOnSite = yield getById(webUrl, id, "Site");
|
|
538
|
-
return customActionOnSite;
|
|
539
|
-
});
|
|
540
|
-
},
|
|
541
|
-
getTenantAppCatalogUrl(logger, debug) {
|
|
542
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
543
|
-
const spoUrl = yield exports.spo.getSpoUrl(logger, debug);
|
|
452
|
+
async getCustomActionById(webUrl, id, scope) {
|
|
453
|
+
if (scope && scope !== "All" && scope !== "Site" && scope !== "Web") {
|
|
454
|
+
throw `Invalid scope '${scope}'. Allowed values are 'Site', 'Web' or 'All'.`;
|
|
455
|
+
}
|
|
456
|
+
async function getById(webUrl, id, scope) {
|
|
544
457
|
const requestOptions = {
|
|
545
|
-
url: `${
|
|
458
|
+
url: `${webUrl}/_api/${scope}/UserCustomActions(guid'${id}')`,
|
|
546
459
|
headers: {
|
|
547
460
|
accept: 'application/json;odata=nometadata'
|
|
548
461
|
},
|
|
549
462
|
responseType: 'json'
|
|
550
463
|
};
|
|
551
|
-
const result =
|
|
552
|
-
|
|
553
|
-
|
|
464
|
+
const result = await request.get(requestOptions);
|
|
465
|
+
if (result["odata.null"] === true) {
|
|
466
|
+
return undefined;
|
|
467
|
+
}
|
|
468
|
+
return result;
|
|
469
|
+
}
|
|
470
|
+
if (scope && scope !== "All") {
|
|
471
|
+
return await getById(webUrl, id, scope);
|
|
472
|
+
}
|
|
473
|
+
const customActionOnWeb = await getById(webUrl, id, "Web");
|
|
474
|
+
if (customActionOnWeb) {
|
|
475
|
+
return customActionOnWeb;
|
|
476
|
+
}
|
|
477
|
+
const customActionOnSite = await getById(webUrl, id, "Site");
|
|
478
|
+
return customActionOnSite;
|
|
479
|
+
},
|
|
480
|
+
async getTenantAppCatalogUrl(logger, debug) {
|
|
481
|
+
const spoUrl = await spo.getSpoUrl(logger, debug);
|
|
482
|
+
const requestOptions = {
|
|
483
|
+
url: `${spoUrl}/_api/SP_TenantSettings_Current`,
|
|
484
|
+
headers: {
|
|
485
|
+
accept: 'application/json;odata=nometadata'
|
|
486
|
+
},
|
|
487
|
+
responseType: 'json'
|
|
488
|
+
};
|
|
489
|
+
const result = await request.get(requestOptions);
|
|
490
|
+
return result.CorporateCatalogUrl;
|
|
554
491
|
},
|
|
555
492
|
/**
|
|
556
493
|
* Retrieves the Azure AD ID from a SP user.
|
|
557
494
|
* @param webUrl Web url
|
|
558
495
|
* @param id The Id of the user
|
|
559
496
|
*/
|
|
560
|
-
getUserAzureIdBySpoId(webUrl, id) {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
return res.AadObjectId.NameId;
|
|
571
|
-
});
|
|
497
|
+
async getUserAzureIdBySpoId(webUrl, id) {
|
|
498
|
+
const requestOptions = {
|
|
499
|
+
url: `${webUrl}/_api/web/siteusers/GetById('${formatting.encodeQueryParameter(id)}')?$select=AadObjectId`,
|
|
500
|
+
headers: {
|
|
501
|
+
accept: 'application/json;odata=nometadata'
|
|
502
|
+
},
|
|
503
|
+
responseType: 'json'
|
|
504
|
+
};
|
|
505
|
+
const res = await request.get(requestOptions);
|
|
506
|
+
return res.AadObjectId.NameId;
|
|
572
507
|
},
|
|
573
508
|
/**
|
|
574
509
|
* Retrieves the spo user by email.
|
|
@@ -577,131 +512,697 @@ exports.spo = {
|
|
|
577
512
|
* @param logger the Logger object
|
|
578
513
|
* @param debug set if debug logging should be logged
|
|
579
514
|
*/
|
|
580
|
-
getUserByEmail(webUrl, email, logger, debug) {
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
return userInstance;
|
|
595
|
-
});
|
|
515
|
+
async getUserByEmail(webUrl, email, logger, debug) {
|
|
516
|
+
if (debug) {
|
|
517
|
+
await logger.logToStderr(`Retrieving the spo user by email ${email}`);
|
|
518
|
+
}
|
|
519
|
+
const requestUrl = `${webUrl}/_api/web/siteusers/GetByEmail('${formatting.encodeQueryParameter(email)}')`;
|
|
520
|
+
const requestOptions = {
|
|
521
|
+
url: requestUrl,
|
|
522
|
+
headers: {
|
|
523
|
+
'accept': 'application/json;odata=nometadata'
|
|
524
|
+
},
|
|
525
|
+
responseType: 'json'
|
|
526
|
+
};
|
|
527
|
+
const userInstance = await request.get(requestOptions);
|
|
528
|
+
return userInstance;
|
|
596
529
|
},
|
|
597
530
|
/**
|
|
598
531
|
* Retrieves the menu state for the quick launch.
|
|
599
532
|
* @param webUrl Web url
|
|
600
533
|
*/
|
|
601
|
-
getQuickLaunchMenuState(webUrl) {
|
|
602
|
-
return
|
|
603
|
-
return this.getMenuState(webUrl);
|
|
604
|
-
});
|
|
534
|
+
async getQuickLaunchMenuState(webUrl) {
|
|
535
|
+
return this.getMenuState(webUrl);
|
|
605
536
|
},
|
|
606
537
|
/**
|
|
607
538
|
* Retrieves the menu state for the top navigation.
|
|
608
539
|
* @param webUrl Web url
|
|
609
540
|
*/
|
|
610
|
-
getTopNavigationMenuState(webUrl) {
|
|
611
|
-
return
|
|
612
|
-
return this.getMenuState(webUrl, '1002');
|
|
613
|
-
});
|
|
541
|
+
async getTopNavigationMenuState(webUrl) {
|
|
542
|
+
return this.getMenuState(webUrl, '1002');
|
|
614
543
|
},
|
|
615
544
|
/**
|
|
616
545
|
* Retrieves the menu state.
|
|
617
546
|
* @param webUrl Web url
|
|
618
547
|
* @param menuNodeKey Menu node key
|
|
619
548
|
*/
|
|
620
|
-
getMenuState(webUrl, menuNodeKey) {
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
return request_1.default.post(requestOptions);
|
|
637
|
-
});
|
|
549
|
+
async getMenuState(webUrl, menuNodeKey) {
|
|
550
|
+
const requestBody = {
|
|
551
|
+
customProperties: null,
|
|
552
|
+
depth: 10,
|
|
553
|
+
mapProviderName: null,
|
|
554
|
+
menuNodeKey: menuNodeKey || null
|
|
555
|
+
};
|
|
556
|
+
const requestOptions = {
|
|
557
|
+
url: `${webUrl}/_api/navigation/MenuState`,
|
|
558
|
+
headers: {
|
|
559
|
+
accept: 'application/json;odata=nometadata'
|
|
560
|
+
},
|
|
561
|
+
data: requestBody,
|
|
562
|
+
responseType: 'json'
|
|
563
|
+
};
|
|
564
|
+
return request.post(requestOptions);
|
|
638
565
|
},
|
|
639
566
|
/**
|
|
640
567
|
* Saves the menu state.
|
|
641
568
|
* @param webUrl Web url
|
|
642
569
|
* @param menuState Updated menu state
|
|
643
570
|
*/
|
|
644
|
-
saveMenuState(webUrl, menuState) {
|
|
645
|
-
|
|
571
|
+
async saveMenuState(webUrl, menuState) {
|
|
572
|
+
const requestOptions = {
|
|
573
|
+
url: `${webUrl}/_api/navigation/SaveMenuState`,
|
|
574
|
+
headers: {
|
|
575
|
+
accept: 'application/json;odata=nometadata'
|
|
576
|
+
},
|
|
577
|
+
data: { menuState: menuState },
|
|
578
|
+
responseType: 'json'
|
|
579
|
+
};
|
|
580
|
+
return request.post(requestOptions);
|
|
581
|
+
},
|
|
582
|
+
/**
|
|
583
|
+
* Retrieves the spo group by name.
|
|
584
|
+
* @param webUrl Web url
|
|
585
|
+
* @param name The name of the group
|
|
586
|
+
* @param logger the Logger object
|
|
587
|
+
* @param debug set if debug logging should be logged
|
|
588
|
+
*/
|
|
589
|
+
async getGroupByName(webUrl, name, logger, debug) {
|
|
590
|
+
if (debug) {
|
|
591
|
+
await logger.logToStderr(`Retrieving the group by name ${name}`);
|
|
592
|
+
}
|
|
593
|
+
const requestUrl = `${webUrl}/_api/web/sitegroups/GetByName('${formatting.encodeQueryParameter(name)}')`;
|
|
594
|
+
const requestOptions = {
|
|
595
|
+
url: requestUrl,
|
|
596
|
+
headers: {
|
|
597
|
+
'accept': 'application/json;odata=nometadata'
|
|
598
|
+
},
|
|
599
|
+
responseType: 'json'
|
|
600
|
+
};
|
|
601
|
+
const groupInstance = await request.get(requestOptions);
|
|
602
|
+
return groupInstance;
|
|
603
|
+
},
|
|
604
|
+
/**
|
|
605
|
+
* Retrieves the role definition by name.
|
|
606
|
+
* @param webUrl Web url
|
|
607
|
+
* @param name the name of the role definition
|
|
608
|
+
* @param logger the Logger object
|
|
609
|
+
* @param debug set if debug logging should be logged
|
|
610
|
+
*/
|
|
611
|
+
async getRoleDefinitionByName(webUrl, name, logger, debug) {
|
|
612
|
+
if (debug) {
|
|
613
|
+
await logger.logToStderr(`Retrieving the role definitions for ${name}`);
|
|
614
|
+
}
|
|
615
|
+
const roledefinitions = await odata.getAllItems(`${webUrl}/_api/web/roledefinitions`);
|
|
616
|
+
const roledefinition = roledefinitions.find((role) => role.Name === name);
|
|
617
|
+
if (!roledefinition) {
|
|
618
|
+
throw `No roledefinition is found for ${name}`;
|
|
619
|
+
}
|
|
620
|
+
const permissions = new BasePermissions();
|
|
621
|
+
permissions.high = roledefinition.BasePermissions.High;
|
|
622
|
+
permissions.low = roledefinition.BasePermissions.Low;
|
|
623
|
+
roledefinition.BasePermissionsValue = permissions.parse();
|
|
624
|
+
roledefinition.RoleTypeKindValue = RoleType[roledefinition.RoleTypeKind];
|
|
625
|
+
return roledefinition;
|
|
626
|
+
},
|
|
627
|
+
/**
|
|
628
|
+
* Adds a SharePoint site.
|
|
629
|
+
* @param type Type of sites to add. Allowed values TeamSite, CommunicationSite, ClassicSite, default TeamSite
|
|
630
|
+
* @param title Site title
|
|
631
|
+
* @param alias Site alias, used in the URL and in the team site group e-mail (applies to type TeamSite)
|
|
632
|
+
* @param url Site URL (applies to type CommunicationSite, ClassicSite)
|
|
633
|
+
* @param timeZone Integer representing time zone to use for the site (applies to type ClassicSite)
|
|
634
|
+
* @param description Site description
|
|
635
|
+
* @param lcid Site language in the LCID format
|
|
636
|
+
* @param owners Comma-separated list of users to set as site owners (applies to type TeamSite, ClassicSite)
|
|
637
|
+
* @param isPublic Determines if the associated group is public or not (applies to type TeamSite)
|
|
638
|
+
* @param classification Site classification (applies to type TeamSite, CommunicationSite)
|
|
639
|
+
* @param siteDesignType of communication site to create. Allowed values Topic, Showcase, Blank, default Topic. When creating a communication site, specify either siteDesign or siteDesignId (applies to type CommunicationSite)
|
|
640
|
+
* @param siteDesignId Id of the custom site design to use to create the site. When creating a communication site, specify either siteDesign or siteDesignId (applies to type CommunicationSite)
|
|
641
|
+
* @param shareByEmailEnabled Determines whether it's allowed to share file with guests (applies to type CommunicationSite)
|
|
642
|
+
* @param webTemplate Template to use for creating the site. Default `STS#0` (applies to type ClassicSite)
|
|
643
|
+
* @param resourceQuota The quota for this site collection in Sandboxed Solutions units. Default 0 (applies to type ClassicSite)
|
|
644
|
+
* @param resourceQuotaWarningLevel The warning level for the resource quota. Default 0 (applies to type ClassicSite)
|
|
645
|
+
* @param storageQuota The storage quota for this site collection in megabytes. Default 100 (applies to type ClassicSite)
|
|
646
|
+
* @param storageQuotaWarningLevel The warning level for the storage quota in megabytes. Default 100 (applies to type ClassicSite)
|
|
647
|
+
* @param removeDeletedSite Set, to remove existing deleted site with the same URL from the Recycle Bin (applies to type ClassicSite)
|
|
648
|
+
* @param wait Wait for the site to be provisioned before completing the command (applies to type ClassicSite)
|
|
649
|
+
* @param logger the Logger object
|
|
650
|
+
* @param verbose set if verbose logging should be logged
|
|
651
|
+
*/
|
|
652
|
+
async addSite(title, logger, verbose, wait, type, alias, description, owners, shareByEmailEnabled, removeDeletedSite, classification, isPublic, lcid, url, siteDesign, siteDesignId, timeZone, webTemplate, resourceQuota, resourceQuotaWarningLevel, storageQuota, storageQuotaWarningLevel) {
|
|
653
|
+
if (type === 'ClassicSite') {
|
|
654
|
+
const spoAdminUrl = await spo.getSpoAdminUrl(logger, verbose);
|
|
655
|
+
let context = await spo.ensureFormDigest(spoAdminUrl, logger, undefined, verbose);
|
|
656
|
+
let exists;
|
|
657
|
+
if (removeDeletedSite) {
|
|
658
|
+
exists = await spo.siteExists(url, logger, verbose);
|
|
659
|
+
}
|
|
660
|
+
else {
|
|
661
|
+
// assume site doesn't exist
|
|
662
|
+
exists = false;
|
|
663
|
+
}
|
|
664
|
+
if (exists) {
|
|
665
|
+
if (verbose) {
|
|
666
|
+
await logger.logToStderr('Site exists in the recycle bin');
|
|
667
|
+
}
|
|
668
|
+
await spo.deleteSiteFromTheRecycleBin(url, logger, verbose, wait);
|
|
669
|
+
}
|
|
670
|
+
else {
|
|
671
|
+
if (verbose) {
|
|
672
|
+
await logger.logToStderr('Site not found');
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
context = await spo.ensureFormDigest(spoAdminUrl, logger, context, verbose);
|
|
676
|
+
if (verbose) {
|
|
677
|
+
await logger.logToStderr(`Creating site collection ${url}...`);
|
|
678
|
+
}
|
|
679
|
+
const lcidOption = typeof lcid === 'number' ? lcid : 1033;
|
|
680
|
+
const storageQuotaOption = typeof storageQuota === 'number' ? storageQuota : 100;
|
|
681
|
+
const storageQuotaWarningLevelOption = typeof storageQuotaWarningLevel === 'number' ? storageQuotaWarningLevel : 100;
|
|
682
|
+
const resourceQuotaOption = typeof resourceQuota === 'number' ? resourceQuota : 0;
|
|
683
|
+
const resourceQuotaWarningLevelOption = typeof resourceQuotaWarningLevel === 'number' ? resourceQuotaWarningLevel : 0;
|
|
684
|
+
const webTemplateOption = webTemplate || 'STS#0';
|
|
646
685
|
const requestOptions = {
|
|
647
|
-
url: `${
|
|
686
|
+
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
648
687
|
headers: {
|
|
649
|
-
|
|
688
|
+
'X-RequestDigest': context.FormDigestValue
|
|
650
689
|
},
|
|
651
|
-
data: {
|
|
652
|
-
responseType: 'json'
|
|
690
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="4" ObjectPathId="3" /><ObjectPath Id="6" ObjectPathId="5" /><Query Id="7" ObjectPathId="3"><Query SelectAllProperties="true"><Properties /></Query></Query><Query Id="8" ObjectPathId="5"><Query SelectAllProperties="false"><Properties><Property Name="IsComplete" ScalarProperty="true" /><Property Name="PollingInterval" ScalarProperty="true" /></Properties></Query></Query></Actions><ObjectPaths><Constructor Id="3" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /><Method Id="5" ParentId="3" Name="CreateSite"><Parameters><Parameter TypeId="{11f84fff-b8cf-47b6-8b50-34e692656606}"><Property Name="CompatibilityLevel" Type="Int32">0</Property><Property Name="Lcid" Type="UInt32">${lcidOption}</Property><Property Name="Owner" Type="String">${formatting.escapeXml(owners)}</Property><Property Name="StorageMaximumLevel" Type="Int64">${storageQuotaOption}</Property><Property Name="StorageWarningLevel" Type="Int64">${storageQuotaWarningLevelOption}</Property><Property Name="Template" Type="String">${formatting.escapeXml(webTemplateOption)}</Property><Property Name="TimeZoneId" Type="Int32">${timeZone}</Property><Property Name="Title" Type="String">${formatting.escapeXml(title)}</Property><Property Name="Url" Type="String">${formatting.escapeXml(url)}</Property><Property Name="UserCodeMaximumLevel" Type="Double">${resourceQuotaOption}</Property><Property Name="UserCodeWarningLevel" Type="Double">${resourceQuotaWarningLevelOption}</Property></Parameter></Parameters></Method></ObjectPaths></Request>`
|
|
653
691
|
};
|
|
654
|
-
|
|
692
|
+
const res = await request.post(requestOptions);
|
|
693
|
+
const json = JSON.parse(res);
|
|
694
|
+
const response = json[0];
|
|
695
|
+
if (response.ErrorInfo) {
|
|
696
|
+
throw response.ErrorInfo.ErrorMessage;
|
|
697
|
+
}
|
|
698
|
+
else {
|
|
699
|
+
const operation = json[json.length - 1];
|
|
700
|
+
const isComplete = operation.IsComplete;
|
|
701
|
+
if (!wait || isComplete) {
|
|
702
|
+
return;
|
|
703
|
+
}
|
|
704
|
+
await new Promise((resolve, reject) => {
|
|
705
|
+
setTimeout(() => {
|
|
706
|
+
spo.waitUntilFinished({
|
|
707
|
+
operationId: JSON.stringify(operation._ObjectIdentity_),
|
|
708
|
+
siteUrl: spoAdminUrl,
|
|
709
|
+
resolve,
|
|
710
|
+
reject,
|
|
711
|
+
logger,
|
|
712
|
+
currentContext: context,
|
|
713
|
+
verbose: verbose,
|
|
714
|
+
debug: verbose
|
|
715
|
+
});
|
|
716
|
+
}, operation.PollingInterval);
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
else {
|
|
721
|
+
const isTeamSite = type !== 'CommunicationSite';
|
|
722
|
+
const spoUrl = await spo.getSpoUrl(logger, verbose);
|
|
723
|
+
if (verbose) {
|
|
724
|
+
await logger.logToStderr(`Creating new site...`);
|
|
725
|
+
}
|
|
726
|
+
let requestOptions = {};
|
|
727
|
+
if (isTeamSite) {
|
|
728
|
+
requestOptions = {
|
|
729
|
+
url: `${spoUrl}/_api/GroupSiteManager/CreateGroupEx`,
|
|
730
|
+
headers: {
|
|
731
|
+
'content-type': 'application/json; odata=verbose; charset=utf-8',
|
|
732
|
+
accept: 'application/json;odata=nometadata'
|
|
733
|
+
},
|
|
734
|
+
responseType: 'json',
|
|
735
|
+
data: {
|
|
736
|
+
displayName: title,
|
|
737
|
+
alias: alias,
|
|
738
|
+
isPublic: isPublic,
|
|
739
|
+
optionalParams: {
|
|
740
|
+
Description: description || '',
|
|
741
|
+
CreationOptions: {
|
|
742
|
+
results: [],
|
|
743
|
+
Classification: classification || ''
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
if (lcid) {
|
|
749
|
+
requestOptions.data.optionalParams.CreationOptions.results.push(`SPSiteLanguage:${lcid}`);
|
|
750
|
+
}
|
|
751
|
+
if (owners) {
|
|
752
|
+
requestOptions.data.optionalParams.Owners = {
|
|
753
|
+
results: owners.split(',').map(o => o.trim())
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
else {
|
|
758
|
+
if (siteDesignId) {
|
|
759
|
+
siteDesignId = siteDesignId;
|
|
760
|
+
}
|
|
761
|
+
else {
|
|
762
|
+
if (siteDesign) {
|
|
763
|
+
switch (siteDesign) {
|
|
764
|
+
case 'Topic':
|
|
765
|
+
siteDesignId = '00000000-0000-0000-0000-000000000000';
|
|
766
|
+
break;
|
|
767
|
+
case 'Showcase':
|
|
768
|
+
siteDesignId = '6142d2a0-63a5-4ba0-aede-d9fefca2c767';
|
|
769
|
+
break;
|
|
770
|
+
case 'Blank':
|
|
771
|
+
siteDesignId = 'f6cc5403-0d63-442e-96c0-285923709ffc';
|
|
772
|
+
break;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
else {
|
|
776
|
+
siteDesignId = '00000000-0000-0000-0000-000000000000';
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
requestOptions = {
|
|
780
|
+
url: `${spoUrl}/_api/SPSiteManager/Create`,
|
|
781
|
+
headers: {
|
|
782
|
+
'content-type': 'application/json;odata=nometadata',
|
|
783
|
+
accept: 'application/json;odata=nometadata'
|
|
784
|
+
},
|
|
785
|
+
responseType: 'json',
|
|
786
|
+
data: {
|
|
787
|
+
request: {
|
|
788
|
+
Title: title,
|
|
789
|
+
Url: url,
|
|
790
|
+
ShareByEmailEnabled: shareByEmailEnabled,
|
|
791
|
+
Description: description || '',
|
|
792
|
+
Classification: classification || '',
|
|
793
|
+
WebTemplate: 'SITEPAGEPUBLISHING#0',
|
|
794
|
+
SiteDesignId: siteDesignId
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
if (lcid) {
|
|
799
|
+
requestOptions.data.request.Lcid = lcid;
|
|
800
|
+
}
|
|
801
|
+
if (owners) {
|
|
802
|
+
requestOptions.data.request.Owner = owners;
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
const res = await request.post(requestOptions);
|
|
806
|
+
if (isTeamSite) {
|
|
807
|
+
if (res.ErrorMessage !== null) {
|
|
808
|
+
throw res.ErrorMessage;
|
|
809
|
+
}
|
|
810
|
+
else {
|
|
811
|
+
return res.SiteUrl;
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
else {
|
|
815
|
+
if (res.SiteStatus === 2) {
|
|
816
|
+
return res.SiteUrl;
|
|
817
|
+
}
|
|
818
|
+
else {
|
|
819
|
+
throw 'An error has occurred while creating the site';
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
/**
|
|
825
|
+
* Checks if a site exists
|
|
826
|
+
* Returns a boolean
|
|
827
|
+
* @param url The url of the site
|
|
828
|
+
* @param logger the Logger object
|
|
829
|
+
* @param verbose set if verbose logging should be logged
|
|
830
|
+
*/
|
|
831
|
+
async siteExists(url, logger, verbose) {
|
|
832
|
+
const spoAdminUrl = await spo.getSpoAdminUrl(logger, verbose);
|
|
833
|
+
const context = await spo.ensureFormDigest(spoAdminUrl, logger, undefined, verbose);
|
|
834
|
+
if (verbose) {
|
|
835
|
+
await logger.logToStderr(`Checking if the site ${url} exists...`);
|
|
836
|
+
}
|
|
837
|
+
const requestOptions = {
|
|
838
|
+
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
839
|
+
headers: {
|
|
840
|
+
'X-RequestDigest': context.FormDigestValue
|
|
841
|
+
},
|
|
842
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="197" ObjectPathId="196" /><ObjectPath Id="199" ObjectPathId="198" /><Query Id="200" ObjectPathId="198"><Query SelectAllProperties="true"><Properties /></Query></Query></Actions><ObjectPaths><Constructor Id="196" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /><Method Id="198" ParentId="196" Name="GetSitePropertiesByUrl"><Parameters><Parameter Type="String">${formatting.escapeXml(url)}</Parameter><Parameter Type="Boolean">false</Parameter></Parameters></Method></ObjectPaths></Request>`
|
|
843
|
+
};
|
|
844
|
+
const res1 = await request.post(requestOptions);
|
|
845
|
+
const json = JSON.parse(res1);
|
|
846
|
+
const response = json[0];
|
|
847
|
+
if (response.ErrorInfo) {
|
|
848
|
+
if (response.ErrorInfo.ErrorTypeName === 'Microsoft.Online.SharePoint.Common.SpoNoSiteException') {
|
|
849
|
+
return await this.siteExistsInTheRecycleBin(url, logger, verbose);
|
|
850
|
+
}
|
|
851
|
+
else {
|
|
852
|
+
throw response.ErrorInfo.ErrorMessage;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
else {
|
|
856
|
+
const site = json[json.length - 1];
|
|
857
|
+
return site.Status === 'Recycled';
|
|
858
|
+
}
|
|
859
|
+
},
|
|
860
|
+
/**
|
|
861
|
+
* Checks if a site exists in the recycle bin
|
|
862
|
+
* Returns a boolean
|
|
863
|
+
* @param url The url of the site
|
|
864
|
+
* @param logger the Logger object
|
|
865
|
+
* @param verbose set if verbose logging should be logged
|
|
866
|
+
*/
|
|
867
|
+
async siteExistsInTheRecycleBin(url, logger, verbose) {
|
|
868
|
+
if (verbose) {
|
|
869
|
+
await logger.logToStderr(`Site doesn't exist. Checking if the site ${url} exists in the recycle bin...`);
|
|
870
|
+
}
|
|
871
|
+
const spoAdminUrl = await spo.getSpoAdminUrl(logger, verbose);
|
|
872
|
+
const context = await spo.ensureFormDigest(spoAdminUrl, logger, undefined, verbose);
|
|
873
|
+
const requestOptions = {
|
|
874
|
+
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
875
|
+
headers: {
|
|
876
|
+
'X-RequestDigest': context.FormDigestValue
|
|
877
|
+
},
|
|
878
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="181" ObjectPathId="180" /><Query Id="182" ObjectPathId="180"><Query SelectAllProperties="true"><Properties /></Query></Query></Actions><ObjectPaths><Method Id="180" ParentId="175" Name="GetDeletedSitePropertiesByUrl"><Parameters><Parameter Type="String">${formatting.escapeXml(url)}</Parameter></Parameters></Method><Constructor Id="175" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
879
|
+
};
|
|
880
|
+
const res = await request.post(requestOptions);
|
|
881
|
+
const json = JSON.parse(res);
|
|
882
|
+
const response = json[0];
|
|
883
|
+
if (response.ErrorInfo) {
|
|
884
|
+
if (response.ErrorInfo.ErrorTypeName === 'Microsoft.SharePoint.Client.UnknownError') {
|
|
885
|
+
return false;
|
|
886
|
+
}
|
|
887
|
+
throw response.ErrorInfo.ErrorMessage;
|
|
888
|
+
}
|
|
889
|
+
const site = json[json.length - 1];
|
|
890
|
+
return site.Status === 'Recycled';
|
|
891
|
+
},
|
|
892
|
+
/**
|
|
893
|
+
* Deletes a site from the recycle bin
|
|
894
|
+
* @param url The url of the site
|
|
895
|
+
* @param logger the Logger object
|
|
896
|
+
* @param verbose set if verbose logging should be logged
|
|
897
|
+
* @param wait set to wait until finished
|
|
898
|
+
*/
|
|
899
|
+
async deleteSiteFromTheRecycleBin(url, logger, verbose, wait) {
|
|
900
|
+
const spoAdminUrl = await spo.getSpoAdminUrl(logger, verbose);
|
|
901
|
+
const context = await spo.ensureFormDigest(spoAdminUrl, logger, undefined, verbose);
|
|
902
|
+
if (verbose) {
|
|
903
|
+
await logger.logToStderr(`Deleting site ${url} from the recycle bin...`);
|
|
904
|
+
}
|
|
905
|
+
const requestOptions = {
|
|
906
|
+
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
907
|
+
headers: {
|
|
908
|
+
'X-RequestDigest': context.FormDigestValue
|
|
909
|
+
},
|
|
910
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="185" ObjectPathId="184" /><Query Id="186" ObjectPathId="184"><Query SelectAllProperties="false"><Properties><Property Name="IsComplete" ScalarProperty="true" /><Property Name="PollingInterval" ScalarProperty="true" /></Properties></Query></Query></Actions><ObjectPaths><Method Id="184" ParentId="175" Name="RemoveDeletedSite"><Parameters><Parameter Type="String">${formatting.escapeXml(url)}</Parameter></Parameters></Method><Constructor Id="175" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
911
|
+
};
|
|
912
|
+
const response = await request.post(requestOptions);
|
|
913
|
+
const json = JSON.parse(response);
|
|
914
|
+
const responseContent = json[0];
|
|
915
|
+
if (responseContent.ErrorInfo) {
|
|
916
|
+
throw responseContent.ErrorInfo.ErrorMessage;
|
|
917
|
+
}
|
|
918
|
+
const operation = json[json.length - 1];
|
|
919
|
+
const isComplete = operation.IsComplete;
|
|
920
|
+
if (!wait || isComplete) {
|
|
921
|
+
return;
|
|
922
|
+
}
|
|
923
|
+
await new Promise((resolve, reject) => {
|
|
924
|
+
setTimeout(() => {
|
|
925
|
+
spo.waitUntilFinished({
|
|
926
|
+
operationId: JSON.stringify(operation._ObjectIdentity_),
|
|
927
|
+
siteUrl: spoAdminUrl,
|
|
928
|
+
resolve,
|
|
929
|
+
reject,
|
|
930
|
+
logger,
|
|
931
|
+
currentContext: context,
|
|
932
|
+
verbose: verbose,
|
|
933
|
+
debug: verbose
|
|
934
|
+
});
|
|
935
|
+
}, operation.PollingInterval);
|
|
655
936
|
});
|
|
656
937
|
},
|
|
657
938
|
/**
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
939
|
+
* Updates a site with the given properties
|
|
940
|
+
* @param url The url of the site
|
|
941
|
+
* @param logger The logger object
|
|
942
|
+
* @param verbose Set for verbose logging
|
|
943
|
+
* @param title The new title
|
|
944
|
+
* @param classification The classification to be updated
|
|
945
|
+
* @param disableFlows If flows should be disabled or not
|
|
946
|
+
* @param isPublic If site should be public or private
|
|
947
|
+
* @param owners The owners to be updated
|
|
948
|
+
* @param shareByEmailEnabled If share by e-mail should be enabled or not
|
|
949
|
+
* @param siteDesignId The site design to be updated
|
|
950
|
+
* @param sharingCapability The sharing capability to be updated
|
|
951
|
+
*/
|
|
952
|
+
async updateSite(url, logger, verbose, title, classification, disableFlows, isPublic, owners, shareByEmailEnabled, siteDesignId, sharingCapability) {
|
|
953
|
+
const tenantId = await spo.getTenantId(logger, verbose);
|
|
954
|
+
const spoAdminUrl = await spo.getSpoAdminUrl(logger, verbose);
|
|
955
|
+
let context = await spo.ensureFormDigest(spoAdminUrl, logger, undefined, verbose);
|
|
956
|
+
if (verbose) {
|
|
957
|
+
await logger.logToStderr('Loading site IDs...');
|
|
958
|
+
}
|
|
959
|
+
const requestOptions = {
|
|
960
|
+
url: `${url}/_api/site?$select=GroupId,Id`,
|
|
961
|
+
headers: {
|
|
962
|
+
accept: 'application/json;odata=nometadata'
|
|
963
|
+
},
|
|
964
|
+
responseType: 'json'
|
|
965
|
+
};
|
|
966
|
+
const siteInfo = await request.get(requestOptions);
|
|
967
|
+
const groupId = siteInfo.GroupId;
|
|
968
|
+
const siteId = siteInfo.Id;
|
|
969
|
+
const isGroupConnectedSite = groupId !== '00000000-0000-0000-0000-000000000000';
|
|
970
|
+
if (verbose) {
|
|
971
|
+
await logger.logToStderr(`Retrieved site IDs. siteId: ${siteId}, groupId: ${groupId}`);
|
|
972
|
+
}
|
|
973
|
+
if (isGroupConnectedSite) {
|
|
974
|
+
if (verbose) {
|
|
975
|
+
await logger.logToStderr(`Site attached to group ${groupId}`);
|
|
668
976
|
}
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
977
|
+
if (typeof title !== 'undefined' &&
|
|
978
|
+
typeof isPublic !== 'undefined' &&
|
|
979
|
+
typeof owners !== 'undefined') {
|
|
980
|
+
const promises = [];
|
|
981
|
+
if (typeof title !== 'undefined') {
|
|
982
|
+
const requestOptions = {
|
|
983
|
+
url: `${spoAdminUrl}/_api/SPOGroup/UpdateGroupPropertiesBySiteId`,
|
|
984
|
+
headers: {
|
|
985
|
+
accept: 'application/json;odata=nometadata',
|
|
986
|
+
'content-type': 'application/json;charset=utf-8',
|
|
987
|
+
'X-RequestDigest': context.FormDigestValue
|
|
988
|
+
},
|
|
989
|
+
data: {
|
|
990
|
+
groupId: groupId,
|
|
991
|
+
siteId: siteId,
|
|
992
|
+
displayName: title
|
|
993
|
+
},
|
|
994
|
+
responseType: 'json'
|
|
995
|
+
};
|
|
996
|
+
promises.push(request.post(requestOptions));
|
|
997
|
+
}
|
|
998
|
+
if (typeof isPublic !== 'undefined') {
|
|
999
|
+
promises.push(aadGroup.setGroup(groupId, (isPublic === false), logger, verbose));
|
|
1000
|
+
}
|
|
1001
|
+
if (typeof owners !== 'undefined') {
|
|
1002
|
+
promises.push(spo.setGroupifiedSiteOwners(spoAdminUrl, groupId, owners, logger, verbose));
|
|
1003
|
+
}
|
|
1004
|
+
await Promise.all(promises);
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
else {
|
|
1008
|
+
if (verbose) {
|
|
1009
|
+
await logger.logToStderr('Site is not group connected');
|
|
1010
|
+
}
|
|
1011
|
+
if (typeof isPublic !== 'undefined') {
|
|
1012
|
+
throw `The isPublic option can't be set on a site that is not groupified`;
|
|
1013
|
+
}
|
|
1014
|
+
if (owners) {
|
|
1015
|
+
await Promise.all(owners.split(',').map(async (o) => {
|
|
1016
|
+
await spo.setSiteAdmin(spoAdminUrl, context, url, o.trim());
|
|
1017
|
+
}));
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
context = await spo.ensureFormDigest(spoAdminUrl, logger, context, verbose);
|
|
1021
|
+
if (verbose) {
|
|
1022
|
+
await logger.logToStderr(`Updating site ${url} properties...`);
|
|
1023
|
+
}
|
|
1024
|
+
let updatedProperties = false;
|
|
1025
|
+
if (!isGroupConnectedSite) {
|
|
1026
|
+
if (title !== undefined) {
|
|
1027
|
+
updatedProperties = true;
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
else {
|
|
1031
|
+
if (classification !== undefined || disableFlows !== undefined || shareByEmailEnabled !== undefined || sharingCapability !== undefined) {
|
|
1032
|
+
updatedProperties = true;
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
if (updatedProperties) {
|
|
1036
|
+
let propertyId = 27;
|
|
1037
|
+
const payload = [];
|
|
1038
|
+
if (!isGroupConnectedSite) {
|
|
1039
|
+
if (title) {
|
|
1040
|
+
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="Title"><Parameter Type="String">${formatting.escapeXml(title)}</Parameter></SetProperty>`);
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
if (typeof classification === 'string') {
|
|
1044
|
+
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="Classification"><Parameter Type="String">${formatting.escapeXml(classification)}</Parameter></SetProperty>`);
|
|
1045
|
+
}
|
|
1046
|
+
if (typeof disableFlows !== 'undefined') {
|
|
1047
|
+
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="DisableFlows"><Parameter Type="Boolean">${disableFlows}</Parameter></SetProperty>`);
|
|
1048
|
+
}
|
|
1049
|
+
if (typeof shareByEmailEnabled !== 'undefined') {
|
|
1050
|
+
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="ShareByEmailEnabled"><Parameter Type="Boolean">${shareByEmailEnabled}</Parameter></SetProperty>`);
|
|
1051
|
+
}
|
|
1052
|
+
if (sharingCapability) {
|
|
1053
|
+
const sharingCapabilityOption = SharingCapabilities[sharingCapability];
|
|
1054
|
+
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="SharingCapability"><Parameter Type="Enum">${sharingCapabilityOption}</Parameter></SetProperty>`);
|
|
1055
|
+
}
|
|
1056
|
+
const pos = tenantId.indexOf('|') + 1;
|
|
1057
|
+
const requestOptionsUpdateProperties = {
|
|
1058
|
+
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
672
1059
|
headers: {
|
|
673
|
-
'
|
|
1060
|
+
'X-RequestDigest': context.FormDigestValue
|
|
674
1061
|
},
|
|
675
|
-
|
|
1062
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions>${payload.join('')}<ObjectPath Id="14" ObjectPathId="13" /><ObjectIdentityQuery Id="15" ObjectPathId="5" /><Query Id="16" ObjectPathId="13"><Query SelectAllProperties="false"><Properties><Property Name="IsComplete" ScalarProperty="true" /><Property Name="PollingInterval" ScalarProperty="true" /></Properties></Query></Query></Actions><ObjectPaths><Identity Id="5" Name="53d8499e-d0d2-5000-cb83-9ade5be42ca4|${tenantId.substr(pos, tenantId.indexOf('&') - pos)}
SiteProperties
${formatting.encodeQueryParameter(url)}" /><Method Id="13" ParentId="5" Name="Update" /></ObjectPaths></Request>`
|
|
676
1063
|
};
|
|
677
|
-
const
|
|
678
|
-
|
|
679
|
-
|
|
1064
|
+
const res = await request.post(requestOptionsUpdateProperties);
|
|
1065
|
+
const json = JSON.parse(res);
|
|
1066
|
+
const response = json[0];
|
|
1067
|
+
if (response.ErrorInfo) {
|
|
1068
|
+
throw response.ErrorInfo.ErrorMessage;
|
|
1069
|
+
}
|
|
1070
|
+
else {
|
|
1071
|
+
const operation = json[json.length - 1];
|
|
1072
|
+
const isComplete = operation.IsComplete;
|
|
1073
|
+
if (!isComplete) {
|
|
1074
|
+
await new Promise((resolve, reject) => {
|
|
1075
|
+
setTimeout(() => {
|
|
1076
|
+
spo.waitUntilFinished({
|
|
1077
|
+
operationId: JSON.stringify(operation._ObjectIdentity_),
|
|
1078
|
+
siteUrl: spoAdminUrl,
|
|
1079
|
+
resolve,
|
|
1080
|
+
reject,
|
|
1081
|
+
logger,
|
|
1082
|
+
currentContext: context,
|
|
1083
|
+
verbose: verbose,
|
|
1084
|
+
debug: verbose
|
|
1085
|
+
});
|
|
1086
|
+
}, operation.PollingInterval);
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
if (siteDesignId) {
|
|
1092
|
+
await spo.applySiteDesign(siteDesignId, url, logger, verbose);
|
|
1093
|
+
}
|
|
680
1094
|
},
|
|
681
1095
|
/**
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
1096
|
+
* Updates the groupified site owners
|
|
1097
|
+
* @param spoAdminUrl The SharePoint admin url
|
|
1098
|
+
* @param groupId The ID of the group
|
|
1099
|
+
* @param owners The owners to be updated
|
|
1100
|
+
* @param logger The logger object
|
|
1101
|
+
* @param verbose Set for verbose logging
|
|
1102
|
+
*/
|
|
1103
|
+
async setGroupifiedSiteOwners(spoAdminUrl, groupId, owners, logger, verbose) {
|
|
1104
|
+
const splittedOwners = owners.split(',').map(o => o.trim());
|
|
1105
|
+
if (verbose) {
|
|
1106
|
+
await logger.logToStderr('Retrieving user information to set group owners...');
|
|
1107
|
+
}
|
|
1108
|
+
const requestOptions = {
|
|
1109
|
+
url: `https://graph.microsoft.com/v1.0/users?$filter=${splittedOwners.map(o => `userPrincipalName eq '${o}'`).join(' or ')}&$select=id`,
|
|
1110
|
+
headers: {
|
|
1111
|
+
'content-type': 'application/json;odata.metadata=none'
|
|
1112
|
+
},
|
|
1113
|
+
responseType: 'json'
|
|
1114
|
+
};
|
|
1115
|
+
return request.get(requestOptions)
|
|
1116
|
+
.then((res) => {
|
|
1117
|
+
if (res.value.length === 0) {
|
|
1118
|
+
return Promise.resolve();
|
|
1119
|
+
}
|
|
1120
|
+
return Promise.all(res.value.map(user => {
|
|
1121
|
+
const requestOptions = {
|
|
1122
|
+
url: `${spoAdminUrl}/_api/SP.Directory.DirectorySession/Group('${groupId}')/Owners/Add(objectId='${user.id}', principalName='')`,
|
|
1123
|
+
headers: {
|
|
1124
|
+
'content-type': 'application/json;odata=verbose'
|
|
1125
|
+
}
|
|
1126
|
+
};
|
|
1127
|
+
return request.post(requestOptions);
|
|
1128
|
+
}));
|
|
704
1129
|
});
|
|
1130
|
+
},
|
|
1131
|
+
/**
|
|
1132
|
+
* Updates the site admin
|
|
1133
|
+
* @param spoAdminUrl The SharePoint admin url
|
|
1134
|
+
* @param context The FormDigestInfo
|
|
1135
|
+
* @param siteUrl The url of the site where the owners has to be updated
|
|
1136
|
+
* @param principal The principal of the admin
|
|
1137
|
+
* @param logger The logger object
|
|
1138
|
+
* @param verbose Set for verbose logging
|
|
1139
|
+
*/
|
|
1140
|
+
async setSiteAdmin(spoAdminUrl, context, siteUrl, principal, logger, verbose) {
|
|
1141
|
+
if (verbose && logger) {
|
|
1142
|
+
await logger.logToStderr(`Updating site admin ${principal} on ${siteUrl}...`);
|
|
1143
|
+
}
|
|
1144
|
+
const requestOptions = {
|
|
1145
|
+
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
1146
|
+
headers: {
|
|
1147
|
+
'X-RequestDigest': context.FormDigestValue
|
|
1148
|
+
},
|
|
1149
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="48" ObjectPathId="47" /></Actions><ObjectPaths><Method Id="47" ParentId="34" Name="SetSiteAdmin"><Parameters><Parameter Type="String">${formatting.escapeXml(siteUrl)}</Parameter><Parameter Type="String">${formatting.escapeXml(principal)}</Parameter><Parameter Type="Boolean">true</Parameter></Parameters></Method><Constructor Id="34" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
1150
|
+
};
|
|
1151
|
+
const res = await request.post(requestOptions);
|
|
1152
|
+
const json = JSON.parse(res);
|
|
1153
|
+
const response = json[0];
|
|
1154
|
+
if (response.ErrorInfo) {
|
|
1155
|
+
throw response.ErrorInfo.ErrorMessage;
|
|
1156
|
+
}
|
|
1157
|
+
else {
|
|
1158
|
+
return;
|
|
1159
|
+
}
|
|
1160
|
+
},
|
|
1161
|
+
/**
|
|
1162
|
+
* Applies a site design
|
|
1163
|
+
* @param id The ID of the site design (GUID)
|
|
1164
|
+
* @param webUrl The url of the site where the design should be applied
|
|
1165
|
+
* @param logger The logger object
|
|
1166
|
+
* @param verbose Set for verbose logging
|
|
1167
|
+
*/
|
|
1168
|
+
async applySiteDesign(id, webUrl, logger, verbose) {
|
|
1169
|
+
if (verbose) {
|
|
1170
|
+
await logger.logToStderr(`Applying site design ${id}...`);
|
|
1171
|
+
}
|
|
1172
|
+
const spoUrl = await spo.getSpoUrl(logger, verbose);
|
|
1173
|
+
const requestOptions = {
|
|
1174
|
+
url: `${spoUrl}/_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.ApplySiteDesign`,
|
|
1175
|
+
headers: {
|
|
1176
|
+
'content-type': 'application/json;charset=utf-8',
|
|
1177
|
+
accept: 'application/json;odata=nometadata'
|
|
1178
|
+
},
|
|
1179
|
+
data: {
|
|
1180
|
+
siteDesignId: id,
|
|
1181
|
+
webUrl: webUrl
|
|
1182
|
+
},
|
|
1183
|
+
responseType: 'json'
|
|
1184
|
+
};
|
|
1185
|
+
await request.post(requestOptions);
|
|
1186
|
+
},
|
|
1187
|
+
/**
|
|
1188
|
+
* Gets the web properties for a given url
|
|
1189
|
+
* @param url The url of the web
|
|
1190
|
+
* @param logger The logger object
|
|
1191
|
+
* @param verbose Set for verbose logging
|
|
1192
|
+
*/
|
|
1193
|
+
async getWeb(url, logger, verbose) {
|
|
1194
|
+
if (verbose && logger) {
|
|
1195
|
+
await logger.logToStderr(`Getting the web properties for ${url}`);
|
|
1196
|
+
}
|
|
1197
|
+
const requestOptions = {
|
|
1198
|
+
url: `${url}/_api/web`,
|
|
1199
|
+
headers: {
|
|
1200
|
+
'accept': 'application/json;odata=nometadata'
|
|
1201
|
+
},
|
|
1202
|
+
responseType: 'json'
|
|
1203
|
+
};
|
|
1204
|
+
const webProperties = await request.get(requestOptions);
|
|
1205
|
+
return webProperties;
|
|
705
1206
|
}
|
|
706
1207
|
};
|
|
707
1208
|
//# sourceMappingURL=spo.js.map
|