@pnp/cli-microsoft365 6.0.0-beta.78fdd2c → 6.0.0-beta.80d195f
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/.devcontainer/Dockerfile +3 -1
- package/.devcontainer/devcontainer.json +1 -0
- package/dist/m365/aad/commands/app/app-add.js +161 -22
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +13 -13
- package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +14 -14
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +12 -12
- package/dist/m365/aad/commands/o365group/o365group-add.js +2 -7
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-list.js +6 -6
- package/dist/m365/aad/commands/o365group/o365group-teamify.js +12 -12
- package/dist/m365/aad/commands/policy/policy-list.js +6 -6
- package/dist/m365/aad/commands/sp/sp-get.js +14 -14
- package/dist/m365/booking/commands/business/business-get.js +86 -0
- package/dist/m365/booking/commands/business/business-list.js +30 -0
- package/dist/m365/booking/commands.js +8 -0
- package/dist/m365/flow/commands/flow-disable.js +2 -2
- package/dist/m365/flow/commands/flow-enable.js +2 -2
- package/dist/m365/flow/commands/flow-export.js +5 -5
- package/dist/m365/flow/commands/flow-get.js +2 -2
- package/dist/m365/flow/commands/flow-list.js +2 -2
- package/dist/m365/flow/commands/flow-remove.js +3 -3
- package/dist/m365/flow/commands/run/run-cancel.js +6 -6
- package/dist/m365/flow/commands/run/run-get.js +4 -4
- package/dist/m365/flow/commands/run/run-list.js +4 -4
- package/dist/m365/flow/commands/run/run-resubmit.js +7 -7
- package/dist/m365/outlook/commands/message/message-move.js +2 -2
- package/dist/m365/pa/commands/connector/connector-export.js +3 -3
- package/dist/m365/pa/commands/connector/connector-list.js +2 -2
- package/dist/m365/pa/commands/solution/solution-reference-add.js +7 -7
- package/dist/m365/search/commands/externalconnection/externalconnection-remove.js +101 -0
- package/dist/m365/search/commands.js +2 -1
- package/dist/m365/spfx/commands/package/package-generate.js +2 -2
- package/dist/m365/spfx/commands/spfx-doctor.js +15 -0
- package/dist/m365/spo/commands/app/SpoAppBaseCommand.js +1 -1
- package/dist/m365/spo/commands/app/app-add.js +7 -7
- package/dist/m365/spo/commands/app/app-deploy.js +7 -7
- package/dist/m365/spo/commands/app/app-get.js +7 -7
- package/dist/m365/spo/commands/app/app-install.js +6 -6
- package/dist/m365/spo/commands/app/app-list.js +7 -7
- package/dist/m365/spo/commands/app/app-remove.js +7 -7
- package/dist/m365/spo/commands/app/app-retract.js +7 -7
- package/dist/m365/spo/commands/app/app-uninstall.js +6 -6
- package/dist/m365/spo/commands/app/app-upgrade.js +6 -6
- package/dist/m365/spo/commands/apppage/apppage-set.js +2 -2
- package/dist/m365/spo/commands/cdn/cdn-policy-list.js +7 -7
- package/dist/m365/spo/commands/cdn/cdn-policy-set.js +7 -7
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +13 -13
- package/dist/m365/spo/commands/customaction/customaction-add.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-clear.js +3 -3
- package/dist/m365/spo/commands/customaction/customaction-get.js +5 -4
- package/dist/m365/spo/commands/customaction/customaction-list.js +5 -4
- package/dist/m365/spo/commands/customaction/customaction-remove.js +6 -5
- package/dist/m365/spo/commands/customaction/customaction-set.js +3 -3
- package/dist/m365/spo/commands/feature/feature-disable.js +4 -4
- package/dist/m365/spo/commands/feature/feature-enable.js +5 -5
- package/dist/m365/spo/commands/feature/feature-list.js +3 -3
- package/dist/m365/spo/commands/field/field-get.js +1 -7
- package/dist/m365/spo/commands/field/field-remove.js +1 -7
- package/dist/m365/spo/commands/file/file-checkin.js +8 -8
- package/dist/m365/spo/commands/file/file-checkout.js +8 -8
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +16 -16
- package/dist/m365/spo/commands/folder/folder-get.js +2 -2
- package/dist/m365/spo/commands/folder/folder-remove.js +3 -3
- package/dist/m365/spo/commands/folder/folder-rename.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-connect.js +7 -7
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +6 -6
- package/dist/m365/spo/commands/hubsite/hubsite-register.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-rights-grant.js +4 -4
- package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +5 -5
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +4 -4
- package/dist/m365/spo/commands/list/list-contenttype-add.js +4 -4
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +6 -6
- package/dist/m365/spo/commands/list/list-roleassignment-add.js +208 -0
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +171 -0
- package/dist/m365/spo/commands/list/list-view-field-add.js +23 -23
- package/dist/m365/spo/commands/list/list-view-field-remove.js +14 -14
- package/dist/m365/spo/commands/list/list-view-field-set.js +18 -18
- package/dist/m365/spo/commands/list/list-view-get.js +12 -12
- package/dist/m365/spo/commands/list/list-view-remove.js +14 -14
- package/dist/m365/spo/commands/list/list-view-set.js +14 -14
- package/dist/m365/spo/commands/listitem/listitem-list.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +4 -4
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +4 -4
- package/dist/m365/spo/commands/page/page-column-get.js +2 -2
- package/dist/m365/spo/commands/page/page-column-list.js +2 -2
- package/dist/m365/spo/commands/page/page-control-get.js +4 -4
- package/dist/m365/spo/commands/page/page-control-list.js +3 -3
- package/dist/m365/spo/commands/page/page-control-set.js +3 -3
- package/dist/m365/spo/commands/page/page-section-add.js +2 -2
- package/dist/m365/spo/commands/page/page-section-get.js +2 -2
- package/dist/m365/spo/commands/page/page-section-list.js +2 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +2 -2
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +4 -4
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.js +4 -4
- package/dist/m365/spo/commands/site/site-appcatalog-add.js +3 -3
- package/dist/m365/spo/commands/site/site-appcatalog-remove.js +3 -3
- package/dist/m365/spo/commands/site/site-apppermission-get.js +2 -2
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +9 -9
- package/dist/m365/spo/commands/site/site-apppermission-set.js +6 -6
- package/dist/m365/spo/commands/site/site-chrome-set.js +3 -3
- package/dist/m365/spo/commands/site/site-ensure.js +1 -1
- package/dist/m365/spo/commands/site/site-groupify.js +3 -3
- package/dist/m365/spo/commands/site/site-rename.js +9 -9
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-grant.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-list.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +5 -5
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-get.js +4 -4
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +5 -5
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +3 -3
- package/dist/m365/spo/commands/web/web-add.js +5 -5
- package/dist/m365/spo/commands/web/web-get.js +3 -3
- package/dist/m365/spo/commands/web/web-list.js +4 -4
- package/dist/m365/spo/commands/web/web-reindex.js +8 -8
- package/dist/m365/spo/commands/web/web-remove.js +5 -5
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +63 -0
- package/dist/m365/spo/commands/web/web-set.js +4 -4
- package/dist/m365/spo/commands.js +3 -0
- package/dist/m365/teams/commands/app/app-install.js +4 -4
- package/dist/m365/teams/commands/app/app-uninstall.js +3 -3
- package/dist/m365/teams/commands/channel/channel-get.js +19 -19
- package/dist/m365/teams/commands/channel/channel-remove.js +15 -15
- package/dist/m365/teams/commands/channel/channel-set.js +7 -7
- package/dist/m365/teams/commands/chat/chat-get.js +2 -2
- package/dist/m365/teams/commands/chat/chat-message-send.js +2 -2
- package/dist/m365/teams/commands/chat/chatUtil.js +0 -12
- package/dist/m365/teams/commands/message/message-get.js +3 -3
- package/dist/m365/teams/commands/tab/tab-get.js +13 -13
- package/dist/m365/teams/commands/tab/tab-remove.js +6 -6
- package/dist/m365/teams/commands/team/team-archive.js +3 -13
- package/dist/m365/teams/commands/team/team-clone.js +3 -20
- package/dist/m365/teams/commands/team/team-remove.js +2 -11
- package/dist/m365/teams/commands/team/team-set.js +1 -13
- package/dist/m365/teams/commands/team/team-unarchive.js +2 -11
- package/dist/m365/teams/commands/user/user-app-add.js +4 -4
- package/dist/m365/teams/commands/user/user-app-remove.js +3 -3
- package/dist/m365/viva/commands/connections/connections-app-create.js +9 -9
- package/dist/m365/yammer/commands/group/group-user-add.js +8 -8
- package/dist/m365/yammer/commands/group/group-user-remove.js +11 -11
- package/dist/m365/yammer/commands/message/message-like-set.js +5 -5
- package/dist/m365/yammer/commands/user/user-get.js +5 -5
- package/docs/docs/cmd/aad/app/app-add.md +12 -1
- package/docs/docs/cmd/aad/app/app-set.md +1 -1
- package/docs/docs/cmd/aad/approleassignment/approleassignment-add.md +5 -5
- package/docs/docs/cmd/aad/approleassignment/approleassignment-list.md +5 -5
- package/docs/docs/cmd/aad/approleassignment/approleassignment-remove.md +5 -5
- package/docs/docs/cmd/aad/o365group/o365group-add.md +3 -3
- package/docs/docs/cmd/aad/o365group/o365group-recyclebinitem-list.md +7 -7
- package/docs/docs/cmd/aad/o365group/o365group-teamify.md +4 -4
- package/docs/docs/cmd/aad/policy/policy-list.md +2 -2
- package/docs/docs/cmd/aad/sp/sp-get.md +5 -5
- package/docs/docs/cmd/booking/business/business-get.md +33 -0
- package/docs/docs/cmd/booking/business/business-list.md +21 -0
- package/docs/docs/cmd/flow/flow-disable.md +3 -3
- package/docs/docs/cmd/flow/flow-enable.md +1 -1
- package/docs/docs/cmd/flow/flow-export.md +5 -5
- package/docs/docs/cmd/flow/flow-get.md +3 -3
- package/docs/docs/cmd/flow/flow-list.md +3 -3
- package/docs/docs/cmd/flow/flow-remove.md +5 -5
- package/docs/docs/cmd/flow/run/run-cancel.md +3 -3
- package/docs/docs/cmd/flow/run/run-get.md +3 -3
- package/docs/docs/cmd/flow/run/run-list.md +3 -3
- package/docs/docs/cmd/flow/run/run-resubmit.md +4 -4
- package/docs/docs/cmd/outlook/message/message-move.md +4 -4
- package/docs/docs/cmd/pa/connector/connector-export.md +3 -3
- package/docs/docs/cmd/pa/connector/connector-list.md +2 -2
- package/docs/docs/cmd/pa/solution/solution-reference-add.md +2 -2
- package/docs/docs/cmd/search/externalconnection/externalconnection-remove.md +40 -0
- package/docs/docs/cmd/spfx/package/package-generate.md +2 -2
- package/docs/docs/cmd/spo/app/app-add.md +2 -2
- package/docs/docs/cmd/spo/app/app-deploy.md +2 -2
- package/docs/docs/cmd/spo/app/app-get.md +2 -2
- package/docs/docs/cmd/spo/app/app-install.md +2 -2
- package/docs/docs/cmd/spo/app/app-list.md +2 -2
- package/docs/docs/cmd/spo/app/app-remove.md +2 -2
- package/docs/docs/cmd/spo/app/app-retract.md +2 -2
- package/docs/docs/cmd/spo/app/app-uninstall.md +2 -2
- package/docs/docs/cmd/spo/app/app-upgrade.md +2 -2
- package/docs/docs/cmd/spo/apppage/apppage-set.md +2 -2
- package/docs/docs/cmd/spo/cdn/cdn-policy-list.md +3 -3
- package/docs/docs/cmd/spo/cdn/cdn-policy-set.md +3 -3
- package/docs/docs/cmd/spo/contenttype/contenttype-field-set.md +4 -4
- package/docs/docs/cmd/spo/customaction/customaction-add.md +10 -10
- package/docs/docs/cmd/spo/customaction/customaction-clear.md +4 -4
- package/docs/docs/cmd/spo/customaction/customaction-get.md +5 -5
- package/docs/docs/cmd/spo/customaction/customaction-list.md +4 -4
- package/docs/docs/cmd/spo/customaction/customaction-remove.md +9 -9
- package/docs/docs/cmd/spo/customaction/customaction-set.md +7 -7
- package/docs/docs/cmd/spo/feature/feature-disable.md +4 -4
- package/docs/docs/cmd/spo/feature/feature-enable.md +2 -2
- package/docs/docs/cmd/spo/feature/feature-list.md +3 -3
- package/docs/docs/cmd/spo/field/field-get.md +0 -3
- package/docs/docs/cmd/spo/field/field-remove.md +0 -3
- package/docs/docs/cmd/spo/file/file-checkin.md +6 -6
- package/docs/docs/cmd/spo/file/file-checkout.md +4 -4
- package/docs/docs/cmd/spo/file/file-sharinginfo-get.md +7 -7
- package/docs/docs/cmd/spo/folder/folder-get.md +2 -2
- package/docs/docs/cmd/spo/folder/folder-remove.md +3 -3
- package/docs/docs/cmd/spo/folder/folder-rename.md +2 -2
- package/docs/docs/cmd/spo/hubsite/hubsite-connect.md +4 -4
- package/docs/docs/cmd/spo/hubsite/hubsite-disconnect.md +4 -4
- package/docs/docs/cmd/spo/hubsite/hubsite-register.md +2 -2
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-grant.md +4 -4
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-revoke.md +3 -3
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-set.md +2 -2
- package/docs/docs/cmd/spo/list/list-contenttype-add.md +3 -3
- package/docs/docs/cmd/spo/list/list-contenttype-remove.md +3 -3
- package/docs/docs/cmd/spo/list/list-roleassignment-add.md +78 -0
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.md +54 -0
- package/docs/docs/cmd/spo/list/list-view-field-add.md +8 -8
- package/docs/docs/cmd/spo/list/list-view-field-remove.md +6 -6
- package/docs/docs/cmd/spo/list/list-view-field-set.md +7 -7
- package/docs/docs/cmd/spo/list/list-view-get.md +7 -7
- package/docs/docs/cmd/spo/list/list-view-remove.md +8 -8
- package/docs/docs/cmd/spo/list/list-view-set.md +7 -7
- package/docs/docs/cmd/spo/listitem/listitem-record-declare.md +5 -5
- package/docs/docs/cmd/spo/listitem/listitem-record-undeclare.md +3 -3
- package/docs/docs/cmd/spo/page/page-column-get.md +3 -3
- package/docs/docs/cmd/spo/page/page-column-list.md +3 -3
- package/docs/docs/cmd/spo/page/page-control-get.md +3 -3
- package/docs/docs/cmd/spo/page/page-control-list.md +3 -3
- package/docs/docs/cmd/spo/page/page-control-set.md +4 -4
- package/docs/docs/cmd/spo/page/page-section-add.md +3 -3
- package/docs/docs/cmd/spo/page/page-section-get.md +3 -3
- package/docs/docs/cmd/spo/page/page-section-list.md +3 -3
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-revoke.md +2 -2
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-approve.md +2 -2
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-deny.md +2 -2
- package/docs/docs/cmd/spo/site/site-appcatalog-add.md +2 -2
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.md +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-get.md +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-remove.md +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-set.md +5 -5
- package/docs/docs/cmd/spo/site/site-chrome-set.md +4 -4
- package/docs/docs/cmd/spo/site/site-groupify.md +5 -5
- package/docs/docs/cmd/spo/site/site-rename.md +6 -6
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-grant.md +4 -4
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-list.md +3 -3
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-revoke.md +3 -3
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-get.md +2 -2
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-remove.md +5 -5
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-remove.md +3 -3
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-restore.md +6 -3
- package/docs/docs/cmd/spo/web/web-add.md +4 -4
- package/docs/docs/cmd/spo/web/web-get.md +3 -3
- package/docs/docs/cmd/spo/web/web-list.md +2 -2
- package/docs/docs/cmd/spo/web/web-reindex.md +2 -2
- package/docs/docs/cmd/spo/web/web-remove.md +2 -2
- package/docs/docs/cmd/spo/web/web-roleinheritance-reset.md +24 -0
- package/docs/docs/cmd/spo/web/web-set.md +9 -9
- package/docs/docs/cmd/teams/app/app-install.md +5 -5
- package/docs/docs/cmd/teams/app/app-uninstall.md +3 -3
- package/docs/docs/cmd/teams/channel/channel-get.md +7 -7
- package/docs/docs/cmd/teams/channel/channel-remove.md +7 -7
- package/docs/docs/cmd/teams/channel/channel-set.md +4 -4
- package/docs/docs/cmd/teams/message/message-get.md +3 -3
- package/docs/docs/cmd/teams/tab/tab-get.md +6 -6
- package/docs/docs/cmd/teams/tab/tab-remove.md +4 -4
- package/docs/docs/cmd/teams/team/team-archive.md +0 -3
- package/docs/docs/cmd/teams/team/team-clone.md +0 -3
- package/docs/docs/cmd/teams/team/team-remove.md +0 -3
- package/docs/docs/cmd/teams/team/team-set.md +0 -3
- package/docs/docs/cmd/teams/team/team-unarchive.md +0 -3
- package/docs/docs/cmd/teams/user/user-app-add.md +3 -3
- package/docs/docs/cmd/teams/user/user-app-remove.md +3 -3
- package/docs/docs/cmd/viva/connections/connections-app-create.md +2 -2
- package/docs/docs/cmd/yammer/group/group-user-add.md +5 -5
- package/docs/docs/cmd/yammer/group/group-user-remove.md +5 -5
- package/docs/docs/cmd/yammer/message/message-like-set.md +4 -4
- package/docs/docs/cmd/yammer/user/user-get.md +2 -2
- package/package.json +11 -1
|
@@ -55,9 +55,9 @@ class SpoSiteRenameCommand extends SpoCommand_1.default {
|
|
|
55
55
|
optionsBitmask = optionsBitmask | 16;
|
|
56
56
|
}
|
|
57
57
|
const requestOptions = {
|
|
58
|
-
"SourceSiteUrl": options.
|
|
59
|
-
"TargetSiteUrl": options.
|
|
60
|
-
"TargetSiteTitle": options.
|
|
58
|
+
"SourceSiteUrl": options.url,
|
|
59
|
+
"TargetSiteUrl": options.newUrl,
|
|
60
|
+
"TargetSiteTitle": options.newTitle || null,
|
|
61
61
|
"Option": optionsBitmask,
|
|
62
62
|
"Reserve": null,
|
|
63
63
|
"SkipGestures": null,
|
|
@@ -87,7 +87,7 @@ class SpoSiteRenameCommand extends SpoCommand_1.default {
|
|
|
87
87
|
return Promise.resolve();
|
|
88
88
|
}
|
|
89
89
|
return new Promise((resolve, reject) => {
|
|
90
|
-
this.waitForRenameCompletion(this, true, spoAdminUrl, options.
|
|
90
|
+
this.waitForRenameCompletion(this, true, spoAdminUrl, options.url, resolve, reject, 0);
|
|
91
91
|
});
|
|
92
92
|
}).then(() => {
|
|
93
93
|
logger.log(this.operationData);
|
|
@@ -127,7 +127,7 @@ class SpoSiteRenameCommand extends SpoCommand_1.default {
|
|
|
127
127
|
_SpoSiteRenameCommand_instances = new WeakSet(), _SpoSiteRenameCommand_initTelemetry = function _SpoSiteRenameCommand_initTelemetry() {
|
|
128
128
|
this.telemetry.push((args) => {
|
|
129
129
|
Object.assign(this.telemetryProperties, {
|
|
130
|
-
|
|
130
|
+
newTitle: args.options.newTitle ? true : false,
|
|
131
131
|
suppressMarketplaceAppCheck: args.options.suppressMarketplaceAppCheck,
|
|
132
132
|
suppressWorkflow2013Check: args.options.suppressWorkflow2013Check,
|
|
133
133
|
wait: args.options.wait
|
|
@@ -135,11 +135,11 @@ _SpoSiteRenameCommand_instances = new WeakSet(), _SpoSiteRenameCommand_initTelem
|
|
|
135
135
|
});
|
|
136
136
|
}, _SpoSiteRenameCommand_initOptions = function _SpoSiteRenameCommand_initOptions() {
|
|
137
137
|
this.options.unshift({
|
|
138
|
-
option: '-u, --
|
|
138
|
+
option: '-u, --url <url>'
|
|
139
139
|
}, {
|
|
140
|
-
option: '--
|
|
140
|
+
option: '--newUrl <newUrl>'
|
|
141
141
|
}, {
|
|
142
|
-
option: '--
|
|
142
|
+
option: '--newTitle [newTitle]'
|
|
143
143
|
}, {
|
|
144
144
|
option: '--suppressMarketplaceAppCheck'
|
|
145
145
|
}, {
|
|
@@ -149,7 +149,7 @@ _SpoSiteRenameCommand_instances = new WeakSet(), _SpoSiteRenameCommand_initTelem
|
|
|
149
149
|
});
|
|
150
150
|
}, _SpoSiteRenameCommand_initValidators = function _SpoSiteRenameCommand_initValidators() {
|
|
151
151
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
152
|
-
if (args.options.
|
|
152
|
+
if (args.options.url.toLowerCase() === args.options.newUrl.toLowerCase()) {
|
|
153
153
|
return 'The new URL cannot be the same as the target URL.';
|
|
154
154
|
}
|
|
155
155
|
return true;
|
|
@@ -50,7 +50,7 @@ class SpoSiteDesignRightsGrantCommand extends SpoCommand_1.default {
|
|
|
50
50
|
accept: 'application/json;odata=nometadata'
|
|
51
51
|
},
|
|
52
52
|
data: {
|
|
53
|
-
id: args.options.
|
|
53
|
+
id: args.options.siteDesignId,
|
|
54
54
|
principalNames: args.options.principals.split(',').map(p => p.trim()),
|
|
55
55
|
grantedRights: grantedRights
|
|
56
56
|
},
|
|
@@ -63,7 +63,7 @@ class SpoSiteDesignRightsGrantCommand extends SpoCommand_1.default {
|
|
|
63
63
|
}
|
|
64
64
|
_SpoSiteDesignRightsGrantCommand_instances = new WeakSet(), _SpoSiteDesignRightsGrantCommand_initOptions = function _SpoSiteDesignRightsGrantCommand_initOptions() {
|
|
65
65
|
this.options.unshift({
|
|
66
|
-
option: '-i, --
|
|
66
|
+
option: '-i, --siteDesignId <siteDesignId>'
|
|
67
67
|
}, {
|
|
68
68
|
option: '-p, --principals <principals>'
|
|
69
69
|
}, {
|
|
@@ -72,8 +72,8 @@ _SpoSiteDesignRightsGrantCommand_instances = new WeakSet(), _SpoSiteDesignRights
|
|
|
72
72
|
});
|
|
73
73
|
}, _SpoSiteDesignRightsGrantCommand_initValidators = function _SpoSiteDesignRightsGrantCommand_initValidators() {
|
|
74
74
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
76
|
-
return `${args.options.
|
|
75
|
+
if (!utils_1.validation.isValidGuid(args.options.siteDesignId)) {
|
|
76
|
+
return `${args.options.siteDesignId} is not a valid GUID`;
|
|
77
77
|
}
|
|
78
78
|
if (args.options.rights !== 'View') {
|
|
79
79
|
return `${args.options.rights} is not a valid rights value. Allowed values View`;
|
|
@@ -48,7 +48,7 @@ class SpoSiteDesignRightsListCommand extends SpoCommand_1.default {
|
|
|
48
48
|
'content-type': 'application/json;charset=utf-8',
|
|
49
49
|
accept: 'application/json;odata=nometadata'
|
|
50
50
|
},
|
|
51
|
-
data: { id: args.options.
|
|
51
|
+
data: { id: args.options.siteDesignId },
|
|
52
52
|
responseType: 'json'
|
|
53
53
|
};
|
|
54
54
|
return request_1.default.post(requestOptions);
|
|
@@ -64,12 +64,12 @@ class SpoSiteDesignRightsListCommand extends SpoCommand_1.default {
|
|
|
64
64
|
}
|
|
65
65
|
_SpoSiteDesignRightsListCommand_instances = new WeakSet(), _SpoSiteDesignRightsListCommand_initOptions = function _SpoSiteDesignRightsListCommand_initOptions() {
|
|
66
66
|
this.options.unshift({
|
|
67
|
-
option: '-i, --
|
|
67
|
+
option: '-i, --siteDesignId <siteDesignId>'
|
|
68
68
|
});
|
|
69
69
|
}, _SpoSiteDesignRightsListCommand_initValidators = function _SpoSiteDesignRightsListCommand_initValidators() {
|
|
70
70
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
71
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
72
|
-
return `${args.options.
|
|
71
|
+
if (!utils_1.validation.isValidGuid(args.options.siteDesignId)) {
|
|
72
|
+
return `${args.options.siteDesignId} is not a valid GUID`;
|
|
73
73
|
}
|
|
74
74
|
return true;
|
|
75
75
|
}));
|
|
@@ -52,7 +52,7 @@ class SpoSiteDesignRightsRevokeCommand extends SpoCommand_1.default {
|
|
|
52
52
|
accept: 'application/json;odata=nometadata'
|
|
53
53
|
},
|
|
54
54
|
data: {
|
|
55
|
-
id: args.options.
|
|
55
|
+
id: args.options.siteDesignId,
|
|
56
56
|
principalNames: args.options.principals.split(',').map(p => p.trim())
|
|
57
57
|
},
|
|
58
58
|
responseType: 'json'
|
|
@@ -69,7 +69,7 @@ class SpoSiteDesignRightsRevokeCommand extends SpoCommand_1.default {
|
|
|
69
69
|
type: 'confirm',
|
|
70
70
|
name: 'continue',
|
|
71
71
|
default: false,
|
|
72
|
-
message: `Are you sure you want to revoke access to site design ${args.options.
|
|
72
|
+
message: `Are you sure you want to revoke access to site design ${args.options.siteDesignId} from the specified users?`
|
|
73
73
|
}, (result) => {
|
|
74
74
|
if (!result.continue) {
|
|
75
75
|
cb();
|
|
@@ -89,7 +89,7 @@ _SpoSiteDesignRightsRevokeCommand_instances = new WeakSet(), _SpoSiteDesignRight
|
|
|
89
89
|
});
|
|
90
90
|
}, _SpoSiteDesignRightsRevokeCommand_initOptions = function _SpoSiteDesignRightsRevokeCommand_initOptions() {
|
|
91
91
|
this.options.unshift({
|
|
92
|
-
option: '-i, --
|
|
92
|
+
option: '-i, --siteDesignId <siteDesignId>'
|
|
93
93
|
}, {
|
|
94
94
|
option: '-p, --principals <principals>'
|
|
95
95
|
}, {
|
|
@@ -97,8 +97,8 @@ _SpoSiteDesignRightsRevokeCommand_instances = new WeakSet(), _SpoSiteDesignRight
|
|
|
97
97
|
});
|
|
98
98
|
}, _SpoSiteDesignRightsRevokeCommand_initValidators = function _SpoSiteDesignRightsRevokeCommand_initValidators() {
|
|
99
99
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
100
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
101
|
-
return `${args.options.
|
|
100
|
+
if (!utils_1.validation.isValidGuid(args.options.siteDesignId)) {
|
|
101
|
+
return `${args.options.siteDesignId} is not a valid GUID`;
|
|
102
102
|
}
|
|
103
103
|
return true;
|
|
104
104
|
}));
|
|
@@ -42,7 +42,7 @@ class SpoSiteDesignTaskGetCommand extends SpoCommand_1.default {
|
|
|
42
42
|
accept: 'application/json;odata=nometadata'
|
|
43
43
|
},
|
|
44
44
|
data: {
|
|
45
|
-
taskId: args.options.
|
|
45
|
+
taskId: args.options.id
|
|
46
46
|
},
|
|
47
47
|
responseType: 'json'
|
|
48
48
|
};
|
|
@@ -58,12 +58,12 @@ class SpoSiteDesignTaskGetCommand extends SpoCommand_1.default {
|
|
|
58
58
|
}
|
|
59
59
|
_SpoSiteDesignTaskGetCommand_instances = new WeakSet(), _SpoSiteDesignTaskGetCommand_initOptions = function _SpoSiteDesignTaskGetCommand_initOptions() {
|
|
60
60
|
this.options.unshift({
|
|
61
|
-
option: '-i, --
|
|
61
|
+
option: '-i, --id <id>'
|
|
62
62
|
});
|
|
63
63
|
}, _SpoSiteDesignTaskGetCommand_initValidators = function _SpoSiteDesignTaskGetCommand_initValidators() {
|
|
64
64
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
66
|
-
return `${args.options.
|
|
65
|
+
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
66
|
+
return `${args.options.id} is not a valid GUID`;
|
|
67
67
|
}
|
|
68
68
|
return true;
|
|
69
69
|
}));
|
|
@@ -45,7 +45,7 @@ class SpoSiteDesignTaskRemoveCommand extends SpoCommand_1.default {
|
|
|
45
45
|
accept: 'application/json;odata=nometadata'
|
|
46
46
|
},
|
|
47
47
|
data: {
|
|
48
|
-
taskId: args.options.
|
|
48
|
+
taskId: args.options.id
|
|
49
49
|
},
|
|
50
50
|
responseType: 'json'
|
|
51
51
|
};
|
|
@@ -61,7 +61,7 @@ class SpoSiteDesignTaskRemoveCommand extends SpoCommand_1.default {
|
|
|
61
61
|
type: 'confirm',
|
|
62
62
|
name: 'continue',
|
|
63
63
|
default: false,
|
|
64
|
-
message: `Are you sure you want to remove the site design task ${args.options.
|
|
64
|
+
message: `Are you sure you want to remove the site design task ${args.options.id}?`
|
|
65
65
|
}, (result) => {
|
|
66
66
|
if (!result.continue) {
|
|
67
67
|
cb();
|
|
@@ -81,14 +81,14 @@ _SpoSiteDesignTaskRemoveCommand_instances = new WeakSet(), _SpoSiteDesignTaskRem
|
|
|
81
81
|
});
|
|
82
82
|
}, _SpoSiteDesignTaskRemoveCommand_initOptions = function _SpoSiteDesignTaskRemoveCommand_initOptions() {
|
|
83
83
|
this.options.unshift({
|
|
84
|
-
option: '-i, --
|
|
84
|
+
option: '-i, --id <id>'
|
|
85
85
|
}, {
|
|
86
86
|
option: '--confirm'
|
|
87
87
|
});
|
|
88
88
|
}, _SpoSiteDesignTaskRemoveCommand_initValidators = function _SpoSiteDesignTaskRemoveCommand_initValidators() {
|
|
89
89
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
91
|
-
return `${args.options.
|
|
90
|
+
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
91
|
+
return `${args.options.id} is not a valid GUID`;
|
|
92
92
|
}
|
|
93
93
|
return true;
|
|
94
94
|
}));
|
|
@@ -46,14 +46,14 @@ class SpoTenantRecycleBinItemRemoveCommand extends SpoCommand_1.default {
|
|
|
46
46
|
.then((res) => {
|
|
47
47
|
this.context = res;
|
|
48
48
|
if (this.verbose) {
|
|
49
|
-
logger.logToStderr(`Removing deleted site collection ${args.options.
|
|
49
|
+
logger.logToStderr(`Removing deleted site collection ${args.options.siteUrl}...`);
|
|
50
50
|
}
|
|
51
51
|
const requestOptions = {
|
|
52
52
|
url: `${this.spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
53
53
|
headers: {
|
|
54
54
|
'X-RequestDigest': this.context.FormDigestValue
|
|
55
55
|
},
|
|
56
|
-
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="16" ObjectPathId="15" /><Query Id="17" ObjectPathId="15"><Query SelectAllProperties="false"><Properties><Property Name="PollingInterval" ScalarProperty="true" /><Property Name="IsComplete" ScalarProperty="true" /></Properties></Query></Query></Actions><ObjectPaths><Method Id="15" ParentId="1" Name="RemoveDeletedSite"><Parameters><Parameter Type="String">${utils_1.formatting.escapeXml(args.options.
|
|
56
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="16" ObjectPathId="15" /><Query Id="17" ObjectPathId="15"><Query SelectAllProperties="false"><Properties><Property Name="PollingInterval" ScalarProperty="true" /><Property Name="IsComplete" ScalarProperty="true" /></Properties></Query></Query></Actions><ObjectPaths><Method Id="15" ParentId="1" Name="RemoveDeletedSite"><Parameters><Parameter Type="String">${utils_1.formatting.escapeXml(args.options.siteUrl)}</Parameter></Parameters></Method><Constructor Id="1" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
57
57
|
};
|
|
58
58
|
return request_1.default.post(requestOptions);
|
|
59
59
|
})
|
|
@@ -97,7 +97,7 @@ class SpoTenantRecycleBinItemRemoveCommand extends SpoCommand_1.default {
|
|
|
97
97
|
type: 'confirm',
|
|
98
98
|
name: 'continue',
|
|
99
99
|
default: false,
|
|
100
|
-
message: `Are you sure you want to remove the deleted site collection ${args.options.
|
|
100
|
+
message: `Are you sure you want to remove the deleted site collection ${args.options.siteUrl} from tenant recycle bin?`
|
|
101
101
|
}, (result) => {
|
|
102
102
|
if (!result.continue) {
|
|
103
103
|
cb();
|
|
@@ -118,14 +118,14 @@ _SpoTenantRecycleBinItemRemoveCommand_instances = new WeakSet(), _SpoTenantRecyc
|
|
|
118
118
|
});
|
|
119
119
|
}, _SpoTenantRecycleBinItemRemoveCommand_initOptions = function _SpoTenantRecycleBinItemRemoveCommand_initOptions() {
|
|
120
120
|
this.options.unshift({
|
|
121
|
-
option: '-u, --
|
|
121
|
+
option: '-u, --siteUrl <siteUrl>'
|
|
122
122
|
}, {
|
|
123
123
|
option: '--wait'
|
|
124
124
|
}, {
|
|
125
125
|
option: '--confirm'
|
|
126
126
|
});
|
|
127
127
|
}, _SpoTenantRecycleBinItemRemoveCommand_initValidators = function _SpoTenantRecycleBinItemRemoveCommand_initValidators() {
|
|
128
|
-
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return utils_1.validation.isValidSharePointUrl(args.options.
|
|
128
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return utils_1.validation.isValidSharePointUrl(args.options.siteUrl); }));
|
|
129
129
|
};
|
|
130
130
|
module.exports = new SpoTenantRecycleBinItemRemoveCommand();
|
|
131
131
|
//# sourceMappingURL=tenant-recyclebinitem-remove.js.map
|
|
@@ -44,7 +44,7 @@ class SpoTenantRecycleBinItemRestoreCommand extends SpoCommand_1.default {
|
|
|
44
44
|
'content-type': 'application/json;charset=utf-8'
|
|
45
45
|
},
|
|
46
46
|
data: {
|
|
47
|
-
siteUrl: args.options.
|
|
47
|
+
siteUrl: args.options.siteUrl
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
return request_1.default.post(requestOptions);
|
|
@@ -63,12 +63,12 @@ _SpoTenantRecycleBinItemRestoreCommand_instances = new WeakSet(), _SpoTenantRecy
|
|
|
63
63
|
});
|
|
64
64
|
}, _SpoTenantRecycleBinItemRestoreCommand_initOptions = function _SpoTenantRecycleBinItemRestoreCommand_initOptions() {
|
|
65
65
|
this.options.unshift({
|
|
66
|
-
option: '-u, --
|
|
66
|
+
option: '-u, --siteUrl <siteUrl>'
|
|
67
67
|
}, {
|
|
68
68
|
option: '--wait'
|
|
69
69
|
});
|
|
70
70
|
}, _SpoTenantRecycleBinItemRestoreCommand_initValidators = function _SpoTenantRecycleBinItemRestoreCommand_initValidators() {
|
|
71
|
-
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return utils_1.validation.isValidSharePointUrl(args.options.
|
|
71
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return utils_1.validation.isValidSharePointUrl(args.options.siteUrl); }));
|
|
72
72
|
};
|
|
73
73
|
module.exports = new SpoTenantRecycleBinItemRestoreCommand();
|
|
74
74
|
//# sourceMappingURL=tenant-recyclebinitem-restore.js.map
|
|
@@ -37,7 +37,7 @@ class SpoWebAddCommand extends SpoCommand_1.default {
|
|
|
37
37
|
return 'Create new subsite';
|
|
38
38
|
}
|
|
39
39
|
getExcludedOptionsWithUrls() {
|
|
40
|
-
return ['
|
|
40
|
+
return ['url'];
|
|
41
41
|
}
|
|
42
42
|
commandAction(logger, args, cb) {
|
|
43
43
|
let siteInfo = null;
|
|
@@ -55,7 +55,7 @@ class SpoWebAddCommand extends SpoCommand_1.default {
|
|
|
55
55
|
responseType: 'json',
|
|
56
56
|
data: {
|
|
57
57
|
parameters: {
|
|
58
|
-
Url: args.options.
|
|
58
|
+
Url: args.options.url,
|
|
59
59
|
Title: args.options.title,
|
|
60
60
|
Description: args.options.description,
|
|
61
61
|
Language: args.options.locale,
|
|
@@ -65,7 +65,7 @@ class SpoWebAddCommand extends SpoCommand_1.default {
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
if (this.verbose) {
|
|
68
|
-
logger.logToStderr(`Creating subsite ${args.options.parentWebUrl}/${args.options.
|
|
68
|
+
logger.logToStderr(`Creating subsite ${args.options.parentWebUrl}/${args.options.url}...`);
|
|
69
69
|
}
|
|
70
70
|
return request_1.default.post(requestOptions);
|
|
71
71
|
})
|
|
@@ -77,7 +77,7 @@ class SpoWebAddCommand extends SpoCommand_1.default {
|
|
|
77
77
|
if (this.verbose) {
|
|
78
78
|
logger.logToStderr("Setting inheriting navigation from the parent site...");
|
|
79
79
|
}
|
|
80
|
-
subsiteFullUrl = `${args.options.parentWebUrl}/${encodeURIComponent(args.options.
|
|
80
|
+
subsiteFullUrl = `${args.options.parentWebUrl}/${encodeURIComponent(args.options.url)}`;
|
|
81
81
|
const requestOptions = {
|
|
82
82
|
url: `${subsiteFullUrl}/_api/web/effectivebasepermissions`,
|
|
83
83
|
headers: {
|
|
@@ -157,7 +157,7 @@ _SpoWebAddCommand_instances = new WeakSet(), _SpoWebAddCommand_initTelemetry = f
|
|
|
157
157
|
}, {
|
|
158
158
|
option: '-d, --description [description]'
|
|
159
159
|
}, {
|
|
160
|
-
option: '-u, --
|
|
160
|
+
option: '-u, --url <url>'
|
|
161
161
|
}, {
|
|
162
162
|
option: '-w, --webTemplate <webTemplate>'
|
|
163
163
|
}, {
|
|
@@ -34,7 +34,7 @@ class SpoWebGetCommand extends SpoCommand_1.default {
|
|
|
34
34
|
return 'Retrieve information about the specified site';
|
|
35
35
|
}
|
|
36
36
|
commandAction(logger, args, cb) {
|
|
37
|
-
let url = `${args.options.
|
|
37
|
+
let url = `${args.options.url}/_api/web`;
|
|
38
38
|
if (args.options.withGroups) {
|
|
39
39
|
url += '?$expand=AssociatedMemberGroup,AssociatedOwnerGroup,AssociatedVisitorGroup';
|
|
40
40
|
}
|
|
@@ -61,12 +61,12 @@ _SpoWebGetCommand_instances = new WeakSet(), _SpoWebGetCommand_initTelemetry = f
|
|
|
61
61
|
});
|
|
62
62
|
}, _SpoWebGetCommand_initOptions = function _SpoWebGetCommand_initOptions() {
|
|
63
63
|
this.options.unshift({
|
|
64
|
-
option: '-u, --
|
|
64
|
+
option: '-u, --url <url>'
|
|
65
65
|
}, {
|
|
66
66
|
option: '--withGroups'
|
|
67
67
|
});
|
|
68
68
|
}, _SpoWebGetCommand_initValidators = function _SpoWebGetCommand_initValidators() {
|
|
69
|
-
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return utils_1.validation.isValidSharePointUrl(args.options.
|
|
69
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return utils_1.validation.isValidSharePointUrl(args.options.url); }));
|
|
70
70
|
};
|
|
71
71
|
module.exports = new SpoWebGetCommand();
|
|
72
72
|
//# sourceMappingURL=web-get.js.map
|
|
@@ -37,9 +37,9 @@ class SpoWebListCommand extends SpoCommand_1.default {
|
|
|
37
37
|
}
|
|
38
38
|
commandAction(logger, args, cb) {
|
|
39
39
|
if (this.verbose) {
|
|
40
|
-
logger.logToStderr(`Retrieving all webs in site at ${args.options.
|
|
40
|
+
logger.logToStderr(`Retrieving all webs in site at ${args.options.url}...`);
|
|
41
41
|
}
|
|
42
|
-
let requestUrl = `${args.options.
|
|
42
|
+
let requestUrl = `${args.options.url}/_api/web/webs`;
|
|
43
43
|
if (args.options.output !== 'json') {
|
|
44
44
|
requestUrl += '?$select=Title,Id,URL';
|
|
45
45
|
}
|
|
@@ -60,10 +60,10 @@ class SpoWebListCommand extends SpoCommand_1.default {
|
|
|
60
60
|
}
|
|
61
61
|
_SpoWebListCommand_instances = new WeakSet(), _SpoWebListCommand_initOptions = function _SpoWebListCommand_initOptions() {
|
|
62
62
|
this.options.unshift({
|
|
63
|
-
option: '-u, --
|
|
63
|
+
option: '-u, --url <url>'
|
|
64
64
|
});
|
|
65
65
|
}, _SpoWebListCommand_initValidators = function _SpoWebListCommand_initValidators() {
|
|
66
|
-
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return utils_1.validation.isValidSharePointUrl(args.options.
|
|
66
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return utils_1.validation.isValidSharePointUrl(args.options.url); }));
|
|
67
67
|
};
|
|
68
68
|
module.exports = new SpoWebListCommand();
|
|
69
69
|
//# sourceMappingURL=web-list.js.map
|
|
@@ -38,13 +38,13 @@ class SpoWebReindexCommand extends SpoCommand_1.default {
|
|
|
38
38
|
let requestDigest = '';
|
|
39
39
|
let webIdentityResp;
|
|
40
40
|
utils_1.spo
|
|
41
|
-
.getRequestDigest(args.options.
|
|
41
|
+
.getRequestDigest(args.options.url)
|
|
42
42
|
.then((res) => {
|
|
43
43
|
requestDigest = res.FormDigestValue;
|
|
44
44
|
if (this.debug) {
|
|
45
45
|
logger.logToStderr(`Retrieved request digest. Retrieving web identity...`);
|
|
46
46
|
}
|
|
47
|
-
return utils_1.spo.getCurrentWebIdentity(args.options.
|
|
47
|
+
return utils_1.spo.getCurrentWebIdentity(args.options.url, requestDigest);
|
|
48
48
|
})
|
|
49
49
|
.then((identityResp) => {
|
|
50
50
|
webIdentityResp = identityResp;
|
|
@@ -54,20 +54,20 @@ class SpoWebReindexCommand extends SpoCommand_1.default {
|
|
|
54
54
|
if (this.verbose) {
|
|
55
55
|
logger.logToStderr(`Checking if the site is a no-script site...`);
|
|
56
56
|
}
|
|
57
|
-
return propertybag_base_1.SpoPropertyBagBaseCommand.isNoScriptSite(args.options.
|
|
57
|
+
return propertybag_base_1.SpoPropertyBagBaseCommand.isNoScriptSite(args.options.url, requestDigest, webIdentityResp, logger, this.debug);
|
|
58
58
|
})
|
|
59
59
|
.then((isNoScriptSite) => {
|
|
60
60
|
if (isNoScriptSite) {
|
|
61
61
|
if (this.verbose) {
|
|
62
62
|
logger.logToStderr(`Site is a no-script site. Reindexing lists instead...`);
|
|
63
63
|
}
|
|
64
|
-
return this.reindexLists(args.options.
|
|
64
|
+
return this.reindexLists(args.options.url, requestDigest, logger, webIdentityResp);
|
|
65
65
|
}
|
|
66
66
|
if (this.verbose) {
|
|
67
67
|
logger.logToStderr(`Site is not a no-script site. Reindexing site...`);
|
|
68
68
|
}
|
|
69
69
|
const requestOptions = {
|
|
70
|
-
url: `${args.options.
|
|
70
|
+
url: `${args.options.url}/_api/web/allproperties`,
|
|
71
71
|
headers: {
|
|
72
72
|
'accept': 'application/json;odata=nometadata'
|
|
73
73
|
},
|
|
@@ -78,7 +78,7 @@ class SpoWebReindexCommand extends SpoCommand_1.default {
|
|
|
78
78
|
.then((webProperties) => {
|
|
79
79
|
let searchVersion = webProperties.vti_x005f_searchversion || 0;
|
|
80
80
|
searchVersion++;
|
|
81
|
-
return propertybag_base_1.SpoPropertyBagBaseCommand.setProperty('vti_searchversion', searchVersion.toString(), args.options.
|
|
81
|
+
return propertybag_base_1.SpoPropertyBagBaseCommand.setProperty('vti_searchversion', searchVersion.toString(), args.options.url, requestDigest, webIdentityResp, logger, this.debug);
|
|
82
82
|
})
|
|
83
83
|
.then(_ => cb(), (err) => {
|
|
84
84
|
if (this.reindexedLists) {
|
|
@@ -138,10 +138,10 @@ class SpoWebReindexCommand extends SpoCommand_1.default {
|
|
|
138
138
|
}
|
|
139
139
|
_SpoWebReindexCommand_instances = new WeakSet(), _SpoWebReindexCommand_initOptions = function _SpoWebReindexCommand_initOptions() {
|
|
140
140
|
this.options.unshift({
|
|
141
|
-
option: '-u, --
|
|
141
|
+
option: '-u, --url <url>'
|
|
142
142
|
});
|
|
143
143
|
}, _SpoWebReindexCommand_initValidators = function _SpoWebReindexCommand_initValidators() {
|
|
144
|
-
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return utils_1.validation.isValidSharePointUrl(args.options.
|
|
144
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return utils_1.validation.isValidSharePointUrl(args.options.url); }));
|
|
145
145
|
};
|
|
146
146
|
module.exports = new SpoWebReindexCommand();
|
|
147
147
|
//# sourceMappingURL=web-reindex.js.map
|
|
@@ -37,7 +37,7 @@ class SpoWebRemoveCommand extends SpoCommand_1.default {
|
|
|
37
37
|
commandAction(logger, args, cb) {
|
|
38
38
|
const removeWeb = () => {
|
|
39
39
|
const requestOptions = {
|
|
40
|
-
url: `${encodeURI(args.options.
|
|
40
|
+
url: `${encodeURI(args.options.url)}/_api/web`,
|
|
41
41
|
headers: {
|
|
42
42
|
accept: 'application/json;odata=nometadata',
|
|
43
43
|
'X-HTTP-Method': 'DELETE'
|
|
@@ -45,7 +45,7 @@ class SpoWebRemoveCommand extends SpoCommand_1.default {
|
|
|
45
45
|
responseType: 'json'
|
|
46
46
|
};
|
|
47
47
|
if (this.verbose) {
|
|
48
|
-
logger.logToStderr(`Deleting subsite ${args.options.
|
|
48
|
+
logger.logToStderr(`Deleting subsite ${args.options.url} ...`);
|
|
49
49
|
}
|
|
50
50
|
request_1.default
|
|
51
51
|
.post(requestOptions)
|
|
@@ -59,7 +59,7 @@ class SpoWebRemoveCommand extends SpoCommand_1.default {
|
|
|
59
59
|
type: 'confirm',
|
|
60
60
|
name: 'continue',
|
|
61
61
|
default: false,
|
|
62
|
-
message: `Are you sure you want to remove the subsite ${args.options.
|
|
62
|
+
message: `Are you sure you want to remove the subsite ${args.options.url}`
|
|
63
63
|
}, (result) => {
|
|
64
64
|
if (!result.continue) {
|
|
65
65
|
cb();
|
|
@@ -79,12 +79,12 @@ _SpoWebRemoveCommand_instances = new WeakSet(), _SpoWebRemoveCommand_initTelemet
|
|
|
79
79
|
});
|
|
80
80
|
}, _SpoWebRemoveCommand_initOptions = function _SpoWebRemoveCommand_initOptions() {
|
|
81
81
|
this.options.unshift({
|
|
82
|
-
option: '-u, --
|
|
82
|
+
option: '-u, --url <url>'
|
|
83
83
|
}, {
|
|
84
84
|
option: '--confirm'
|
|
85
85
|
});
|
|
86
86
|
}, _SpoWebRemoveCommand_initValidators = function _SpoWebRemoveCommand_initValidators() {
|
|
87
|
-
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return utils_1.validation.isValidSharePointUrl(args.options.
|
|
87
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return utils_1.validation.isValidSharePointUrl(args.options.url); }));
|
|
88
88
|
};
|
|
89
89
|
module.exports = new SpoWebRemoveCommand();
|
|
90
90
|
//# sourceMappingURL=web-remove.js.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
|
+
};
|
|
16
|
+
var _SpoWebRoleInheritanceResetCommand_instances, _SpoWebRoleInheritanceResetCommand_initOptions, _SpoWebRoleInheritanceResetCommand_initValidators;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const request_1 = require("../../../../request");
|
|
19
|
+
const utils_1 = require("../../../../utils");
|
|
20
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
21
|
+
const commands_1 = require("../../commands");
|
|
22
|
+
class SpoWebRoleInheritanceResetCommand extends SpoCommand_1.default {
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
_SpoWebRoleInheritanceResetCommand_instances.add(this);
|
|
26
|
+
__classPrivateFieldGet(this, _SpoWebRoleInheritanceResetCommand_instances, "m", _SpoWebRoleInheritanceResetCommand_initOptions).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _SpoWebRoleInheritanceResetCommand_instances, "m", _SpoWebRoleInheritanceResetCommand_initValidators).call(this);
|
|
28
|
+
}
|
|
29
|
+
get name() {
|
|
30
|
+
return commands_1.default.WEB_ROLEINHERITANCE_RESET;
|
|
31
|
+
}
|
|
32
|
+
get description() {
|
|
33
|
+
return 'Restores role inheritance of subsite';
|
|
34
|
+
}
|
|
35
|
+
commandAction(logger, args, cb) {
|
|
36
|
+
if (this.verbose) {
|
|
37
|
+
logger.logToStderr(`Restore role inheritance of subsite at ${args.options.webUrl}...`);
|
|
38
|
+
}
|
|
39
|
+
const requestOptions = {
|
|
40
|
+
url: `${args.options.webUrl}/_api/web/resetroleinheritance`,
|
|
41
|
+
method: 'POST',
|
|
42
|
+
headers: {
|
|
43
|
+
'accept': 'application/json;odata=nometadata',
|
|
44
|
+
'content-type': 'application/json'
|
|
45
|
+
},
|
|
46
|
+
responseType: 'json'
|
|
47
|
+
};
|
|
48
|
+
request_1.default
|
|
49
|
+
.post(requestOptions)
|
|
50
|
+
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
_SpoWebRoleInheritanceResetCommand_instances = new WeakSet(), _SpoWebRoleInheritanceResetCommand_initOptions = function _SpoWebRoleInheritanceResetCommand_initOptions() {
|
|
54
|
+
this.options.unshift({
|
|
55
|
+
option: '-u, --webUrl <webUrl>'
|
|
56
|
+
});
|
|
57
|
+
}, _SpoWebRoleInheritanceResetCommand_initValidators = function _SpoWebRoleInheritanceResetCommand_initValidators() {
|
|
58
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
return utils_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
60
|
+
}));
|
|
61
|
+
};
|
|
62
|
+
module.exports = new SpoWebRoleInheritanceResetCommand();
|
|
63
|
+
//# sourceMappingURL=web-roleinheritance-reset.js.map
|
|
@@ -65,7 +65,7 @@ class SpoWebSetCommand extends SpoCommand_1.default {
|
|
|
65
65
|
payload.SearchScope = SpoWebSetCommand.searchScopeOptions.indexOf(searchScope);
|
|
66
66
|
}
|
|
67
67
|
const requestOptions = {
|
|
68
|
-
url: `${args.options.
|
|
68
|
+
url: `${args.options.url}/_api/web`,
|
|
69
69
|
headers: {
|
|
70
70
|
'content-type': 'application/json;odata=nometadata',
|
|
71
71
|
accept: 'application/json;odata=nometadata'
|
|
@@ -74,7 +74,7 @@ class SpoWebSetCommand extends SpoCommand_1.default {
|
|
|
74
74
|
data: payload
|
|
75
75
|
};
|
|
76
76
|
if (this.verbose) {
|
|
77
|
-
logger.logToStderr(`Updating properties of subsite ${args.options.
|
|
77
|
+
logger.logToStderr(`Updating properties of subsite ${args.options.url}...`);
|
|
78
78
|
}
|
|
79
79
|
request_1.default
|
|
80
80
|
.patch(requestOptions)
|
|
@@ -101,7 +101,7 @@ _SpoWebSetCommand_instances = new WeakSet(), _SpoWebSetCommand_initTelemetry = f
|
|
|
101
101
|
});
|
|
102
102
|
}, _SpoWebSetCommand_initOptions = function _SpoWebSetCommand_initOptions() {
|
|
103
103
|
this.options.unshift({
|
|
104
|
-
option: '-u, --
|
|
104
|
+
option: '-u, --url <url>'
|
|
105
105
|
}, {
|
|
106
106
|
option: '-t, --title [title]'
|
|
107
107
|
}, {
|
|
@@ -128,7 +128,7 @@ _SpoWebSetCommand_instances = new WeakSet(), _SpoWebSetCommand_initTelemetry = f
|
|
|
128
128
|
});
|
|
129
129
|
}, _SpoWebSetCommand_initValidators = function _SpoWebSetCommand_initValidators() {
|
|
130
130
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
131
|
-
const isValidSharePointUrl = utils_1.validation.isValidSharePointUrl(args.options.
|
|
131
|
+
const isValidSharePointUrl = utils_1.validation.isValidSharePointUrl(args.options.url);
|
|
132
132
|
if (isValidSharePointUrl !== true) {
|
|
133
133
|
return isValidSharePointUrl;
|
|
134
134
|
}
|
|
@@ -101,6 +101,8 @@ exports.default = {
|
|
|
101
101
|
LIST_LABEL_SET: `${prefix} list label set`,
|
|
102
102
|
LIST_LIST: `${prefix} list list`,
|
|
103
103
|
LIST_REMOVE: `${prefix} list remove`,
|
|
104
|
+
LIST_ROLEASSIGNMENT_REMOVE: `${prefix} list roleassignment remove`,
|
|
105
|
+
LIST_ROLEASSIGNMENT_ADD: `${prefix} list roleassignment add`,
|
|
104
106
|
LIST_ROLEINHERITANCE_BREAK: `${prefix} list roleinheritance break`,
|
|
105
107
|
LIST_ROLEINHERITANCE_RESET: `${prefix} list roleinheritance reset`,
|
|
106
108
|
LIST_SET: `${prefix} list set`,
|
|
@@ -265,6 +267,7 @@ exports.default = {
|
|
|
265
267
|
WEB_LIST: `${prefix} web list`,
|
|
266
268
|
WEB_REINDEX: `${prefix} web reindex`,
|
|
267
269
|
WEB_REMOVE: `${prefix} web remove`,
|
|
270
|
+
WEB_ROLEINHERITANCE_RESET: `${prefix} web roleinheritance reset`,
|
|
268
271
|
WEB_SET: `${prefix} web set`
|
|
269
272
|
};
|
|
270
273
|
//# sourceMappingURL=commands.js.map
|
|
@@ -55,7 +55,7 @@ class TeamsAppInstallCommand extends GraphCommand_1.default {
|
|
|
55
55
|
},
|
|
56
56
|
responseType: 'json',
|
|
57
57
|
data: {
|
|
58
|
-
'teamsApp@odata.bind': `${this.resource}/v1.0/appCatalogs/teamsApps/${args.options.
|
|
58
|
+
'teamsApp@odata.bind': `${this.resource}/v1.0/appCatalogs/teamsApps/${args.options.id}`
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
return request_1.default.post(requestOptions);
|
|
@@ -101,11 +101,11 @@ _TeamsAppInstallCommand_instances = new WeakSet(), _TeamsAppInstallCommand_initT
|
|
|
101
101
|
});
|
|
102
102
|
});
|
|
103
103
|
}, _TeamsAppInstallCommand_initOptions = function _TeamsAppInstallCommand_initOptions() {
|
|
104
|
-
this.options.unshift({ option: '--
|
|
104
|
+
this.options.unshift({ option: '--id <id>' }, { option: '--teamId [teamId]' }, { option: '--userId [userId]' }, { option: '--userName [userName]' });
|
|
105
105
|
}, _TeamsAppInstallCommand_initValidators = function _TeamsAppInstallCommand_initValidators() {
|
|
106
106
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
107
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
108
|
-
return `${args.options.
|
|
107
|
+
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
108
|
+
return `${args.options.id} is not a valid GUID`;
|
|
109
109
|
}
|
|
110
110
|
if (!args.options.teamId &&
|
|
111
111
|
!args.options.userId &&
|