@pnp/cli-microsoft365 5.7.0-beta.c116041 → 6.0.0-beta.22bbec5
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/dist/Auth.js +1 -2
- package/dist/m365/aad/commands/app/app-remove.js +0 -4
- package/dist/m365/aad/commands/app/app-role-remove.js +0 -4
- 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/aad/commands.js +0 -2
- package/dist/m365/cli/commands/config/config-set.js +0 -1
- 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/planner/commands/bucket/bucket-add.js +4 -11
- package/dist/m365/planner/commands/bucket/bucket-get.js +4 -11
- package/dist/m365/planner/commands/bucket/bucket-list.js +4 -11
- package/dist/m365/planner/commands/bucket/bucket-remove.js +4 -11
- package/dist/m365/planner/commands/bucket/bucket-set.js +4 -11
- package/dist/m365/planner/commands/plan/plan-get.js +0 -4
- package/dist/m365/planner/commands/task/task-add.js +5 -10
- package/dist/m365/planner/commands/task/task-get.js +5 -19
- package/dist/m365/planner/commands/task/task-list.js +4 -11
- package/dist/m365/planner/commands/task/task-set.js +5 -10
- package/dist/m365/planner/commands.js +0 -2
- package/dist/m365/spfx/commands/package/package-generate.js +2 -2
- 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-list.js +3 -13
- 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 +6 -25
- 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-list.js +6 -17
- 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-set.js +4 -4
- package/dist/m365/spo/commands.js +0 -3
- 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/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 +5 -17
- package/dist/m365/teams/commands/team/team-set.js +1 -13
- package/dist/m365/teams/commands/team/team-unarchive.js +4 -16
- 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/dist/settingsNames.js +0 -1
- package/docs/docs/cmd/aad/app/app-remove.md +0 -6
- package/docs/docs/cmd/aad/app/app-role-remove.md +0 -6
- 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/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/planner/bucket/bucket-add.md +0 -3
- package/docs/docs/cmd/planner/bucket/bucket-get.md +0 -3
- package/docs/docs/cmd/planner/bucket/bucket-list.md +0 -3
- package/docs/docs/cmd/planner/bucket/bucket-remove.md +0 -3
- package/docs/docs/cmd/planner/bucket/bucket-set.md +0 -3
- package/docs/docs/cmd/planner/plan/plan-get.md +0 -6
- package/docs/docs/cmd/planner/task/task-add.md +0 -3
- package/docs/docs/cmd/planner/task/task-get.md +0 -3
- package/docs/docs/cmd/planner/task/task-list.md +0 -3
- package/docs/docs/cmd/planner/task/task-set.md +0 -3
- 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-list.md +0 -3
- 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-list.md +0 -6
- 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-list.md +6 -6
- 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-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/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/m365/spo/commands/site/site-classic-add.js +0 -342
- package/dist/m365/spo/commands/site/site-classic-list.js +0 -106
- package/dist/m365/spo/commands/site/site-classic-set.js +0 -367
- package/docs/docs/cmd/spo/site/site-classic-add.md +0 -93
- package/docs/docs/cmd/spo/site/site-classic-list.md +0 -68
- package/docs/docs/cmd/spo/site/site-classic-set.md +0 -102
|
@@ -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
|
|
@@ -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
|
}
|
|
@@ -192,9 +192,6 @@ exports.default = {
|
|
|
192
192
|
SITE_APPPERMISSION_LIST: `${prefix} site apppermission list`,
|
|
193
193
|
SITE_APPPERMISSION_REMOVE: `${prefix} site apppermission remove`,
|
|
194
194
|
SITE_APPPERMISSION_SET: `${prefix} site apppermission set`,
|
|
195
|
-
SITE_CLASSIC_ADD: `${prefix} site classic add`,
|
|
196
|
-
SITE_CLASSIC_LIST: `${prefix} site classic list`,
|
|
197
|
-
SITE_CLASSIC_SET: `${prefix} site classic set`,
|
|
198
195
|
SITE_COMMSITE_ENABLE: `${prefix} site commsite enable`,
|
|
199
196
|
SITE_ENSURE: `${prefix} site ensure`,
|
|
200
197
|
SITE_GET: `${prefix} site get`,
|
|
@@ -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 &&
|
|
@@ -37,7 +37,7 @@ class TeamsAppUninstallCommand extends GraphCommand_1.default {
|
|
|
37
37
|
commandAction(logger, args, cb) {
|
|
38
38
|
const uninstallApp = () => {
|
|
39
39
|
const requestOptions = {
|
|
40
|
-
url: `${this.resource}/v1.0/teams/${args.options.teamId}/installedApps/${args.options.
|
|
40
|
+
url: `${this.resource}/v1.0/teams/${args.options.teamId}/installedApps/${args.options.id}`,
|
|
41
41
|
headers: {
|
|
42
42
|
accept: 'application/json;odata.metadata=none'
|
|
43
43
|
}
|
|
@@ -54,7 +54,7 @@ class TeamsAppUninstallCommand extends GraphCommand_1.default {
|
|
|
54
54
|
type: 'confirm',
|
|
55
55
|
name: 'continue',
|
|
56
56
|
default: false,
|
|
57
|
-
message: `Are you sure you want to uninstall the app with id ${args.options.
|
|
57
|
+
message: `Are you sure you want to uninstall the app with id ${args.options.id} from the Microsoft Teams team ${args.options.teamId}?`
|
|
58
58
|
}, (result) => {
|
|
59
59
|
if (!result.continue) {
|
|
60
60
|
cb();
|
|
@@ -74,7 +74,7 @@ _TeamsAppUninstallCommand_instances = new WeakSet(), _TeamsAppUninstallCommand_i
|
|
|
74
74
|
});
|
|
75
75
|
}, _TeamsAppUninstallCommand_initOptions = function _TeamsAppUninstallCommand_initOptions() {
|
|
76
76
|
this.options.unshift({
|
|
77
|
-
option: '--
|
|
77
|
+
option: '--id <id>'
|
|
78
78
|
}, {
|
|
79
79
|
option: '--teamId <teamId>'
|
|
80
80
|
}, {
|
|
@@ -49,14 +49,14 @@ class TeamsChannelGetCommand extends GraphCommand_1.default {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
getChannelId(args) {
|
|
52
|
-
if (args.options.
|
|
53
|
-
return Promise.resolve(args.options.
|
|
52
|
+
if (args.options.id) {
|
|
53
|
+
return Promise.resolve(args.options.id);
|
|
54
54
|
}
|
|
55
55
|
if (args.options.primary) {
|
|
56
56
|
return Promise.resolve('');
|
|
57
57
|
}
|
|
58
58
|
const channelRequestOptions = {
|
|
59
|
-
url: `${this.resource}/v1.0/teams/${encodeURIComponent(this.teamId)}/channels?$filter=displayName eq '${encodeURIComponent(args.options.
|
|
59
|
+
url: `${this.resource}/v1.0/teams/${encodeURIComponent(this.teamId)}/channels?$filter=displayName eq '${encodeURIComponent(args.options.name)}'`,
|
|
60
60
|
headers: {
|
|
61
61
|
accept: 'application/json;odata.metadata=none'
|
|
62
62
|
},
|
|
@@ -107,8 +107,8 @@ _TeamsChannelGetCommand_instances = new WeakSet(), _TeamsChannelGetCommand_initT
|
|
|
107
107
|
Object.assign(this.telemetryProperties, {
|
|
108
108
|
teamId: typeof args.options.teamId !== 'undefined',
|
|
109
109
|
teamName: typeof args.options.teamName !== 'undefined',
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
id: typeof args.options.id !== 'undefined',
|
|
111
|
+
name: typeof args.options.name !== 'undefined',
|
|
112
112
|
primary: (!(!args.options.primary)).toString()
|
|
113
113
|
});
|
|
114
114
|
});
|
|
@@ -118,9 +118,9 @@ _TeamsChannelGetCommand_instances = new WeakSet(), _TeamsChannelGetCommand_initT
|
|
|
118
118
|
}, {
|
|
119
119
|
option: '--teamName [teamName]'
|
|
120
120
|
}, {
|
|
121
|
-
option: '-c, --
|
|
121
|
+
option: '-c, --id [id]'
|
|
122
122
|
}, {
|
|
123
|
-
option: '--
|
|
123
|
+
option: '--name [name]'
|
|
124
124
|
}, {
|
|
125
125
|
option: '--primary'
|
|
126
126
|
});
|
|
@@ -135,23 +135,23 @@ _TeamsChannelGetCommand_instances = new WeakSet(), _TeamsChannelGetCommand_initT
|
|
|
135
135
|
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
136
136
|
return `${args.options.teamId} is not a valid GUID`;
|
|
137
137
|
}
|
|
138
|
-
if (args.options.
|
|
139
|
-
return 'Specify
|
|
138
|
+
if (args.options.id && args.options.name && args.options.primary) {
|
|
139
|
+
return 'Specify id, name or primary';
|
|
140
140
|
}
|
|
141
|
-
if (!args.options.
|
|
142
|
-
return 'Specify
|
|
141
|
+
if (!args.options.id && args.options.name && args.options.primary) {
|
|
142
|
+
return 'Specify id, name or primary.';
|
|
143
143
|
}
|
|
144
|
-
if (args.options.
|
|
145
|
-
return 'Specify
|
|
144
|
+
if (args.options.id && !args.options.name && args.options.primary) {
|
|
145
|
+
return 'Specify id, name or primary.';
|
|
146
146
|
}
|
|
147
|
-
if (args.options.
|
|
148
|
-
return 'Specify
|
|
147
|
+
if (args.options.id && args.options.name && !args.options.primary) {
|
|
148
|
+
return 'Specify id, name or primary.';
|
|
149
149
|
}
|
|
150
|
-
if (!args.options.
|
|
151
|
-
return 'Specify
|
|
150
|
+
if (!args.options.id && !args.options.name && !args.options.primary) {
|
|
151
|
+
return 'Specify id, name or primary, one is required';
|
|
152
152
|
}
|
|
153
|
-
if (args.options.
|
|
154
|
-
return `${args.options.
|
|
153
|
+
if (args.options.id && !utils_1.validation.isValidTeamsChannelId(args.options.id)) {
|
|
154
|
+
return `${args.options.id} is not a valid Teams channel id`;
|
|
155
155
|
}
|
|
156
156
|
return true;
|
|
157
157
|
}));
|
|
@@ -36,9 +36,9 @@ class TeamsChannelRemoveCommand extends GraphCommand_1.default {
|
|
|
36
36
|
}
|
|
37
37
|
commandAction(logger, args, cb) {
|
|
38
38
|
const removeChannel = () => {
|
|
39
|
-
if (args.options.
|
|
39
|
+
if (args.options.name) {
|
|
40
40
|
const requestOptions = {
|
|
41
|
-
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels?$filter=displayName eq '${encodeURIComponent(args.options.
|
|
41
|
+
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels?$filter=displayName eq '${encodeURIComponent(args.options.name)}'`,
|
|
42
42
|
headers: {
|
|
43
43
|
accept: 'application/json;odata.metadata=none'
|
|
44
44
|
},
|
|
@@ -63,9 +63,9 @@ class TeamsChannelRemoveCommand extends GraphCommand_1.default {
|
|
|
63
63
|
})
|
|
64
64
|
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
65
65
|
}
|
|
66
|
-
if (args.options.
|
|
66
|
+
if (args.options.id) {
|
|
67
67
|
const requestOptions = {
|
|
68
|
-
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels/${encodeURIComponent(args.options.
|
|
68
|
+
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels/${encodeURIComponent(args.options.id)}`,
|
|
69
69
|
headers: {
|
|
70
70
|
accept: 'application/json;odata.metadata=none'
|
|
71
71
|
},
|
|
@@ -80,7 +80,7 @@ class TeamsChannelRemoveCommand extends GraphCommand_1.default {
|
|
|
80
80
|
removeChannel();
|
|
81
81
|
}
|
|
82
82
|
else {
|
|
83
|
-
const channelName = args.options.
|
|
83
|
+
const channelName = args.options.name ? args.options.name : args.options.id;
|
|
84
84
|
cli_1.Cli.prompt({
|
|
85
85
|
type: 'confirm',
|
|
86
86
|
name: 'continue',
|
|
@@ -100,16 +100,16 @@ class TeamsChannelRemoveCommand extends GraphCommand_1.default {
|
|
|
100
100
|
_TeamsChannelRemoveCommand_instances = new WeakSet(), _TeamsChannelRemoveCommand_initTelemetry = function _TeamsChannelRemoveCommand_initTelemetry() {
|
|
101
101
|
this.telemetry.push((args) => {
|
|
102
102
|
Object.assign(this.telemetryProperties, {
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
id: typeof args.options.id !== 'undefined',
|
|
104
|
+
name: typeof args.options.name !== 'undefined',
|
|
105
105
|
confirm: (!(!args.options.confirm)).toString()
|
|
106
106
|
});
|
|
107
107
|
});
|
|
108
108
|
}, _TeamsChannelRemoveCommand_initOptions = function _TeamsChannelRemoveCommand_initOptions() {
|
|
109
109
|
this.options.unshift({
|
|
110
|
-
option: '-c, --
|
|
110
|
+
option: '-c, --id [id]'
|
|
111
111
|
}, {
|
|
112
|
-
option: '-n, --
|
|
112
|
+
option: '-n, --name [name]'
|
|
113
113
|
}, {
|
|
114
114
|
option: '-i, --teamId <teamId>'
|
|
115
115
|
}, {
|
|
@@ -117,14 +117,14 @@ _TeamsChannelRemoveCommand_instances = new WeakSet(), _TeamsChannelRemoveCommand
|
|
|
117
117
|
});
|
|
118
118
|
}, _TeamsChannelRemoveCommand_initValidators = function _TeamsChannelRemoveCommand_initValidators() {
|
|
119
119
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
120
|
-
if (args.options.
|
|
121
|
-
return 'Specify
|
|
120
|
+
if (args.options.id && args.options.name) {
|
|
121
|
+
return 'Specify id or name but not both';
|
|
122
122
|
}
|
|
123
|
-
if (!args.options.
|
|
124
|
-
return 'Specify
|
|
123
|
+
if (!args.options.id && !args.options.name) {
|
|
124
|
+
return 'Specify id or name';
|
|
125
125
|
}
|
|
126
|
-
if (args.options.
|
|
127
|
-
return `${args.options.
|
|
126
|
+
if (args.options.id && !utils_1.validation.isValidTeamsChannelId(args.options.id)) {
|
|
127
|
+
return `${args.options.id} is not a valid Teams channel id`;
|
|
128
128
|
}
|
|
129
129
|
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
130
130
|
return `${args.options.teamId} is not a valid GUID`;
|
|
@@ -35,7 +35,7 @@ class TeamsChannelSetCommand extends GraphCommand_1.default {
|
|
|
35
35
|
}
|
|
36
36
|
commandAction(logger, args, cb) {
|
|
37
37
|
const requestOptions = {
|
|
38
|
-
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels?$filter=displayName eq '${encodeURIComponent(args.options.
|
|
38
|
+
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels?$filter=displayName eq '${encodeURIComponent(args.options.name)}'`,
|
|
39
39
|
headers: {
|
|
40
40
|
accept: 'application/json;odata.metadata=none'
|
|
41
41
|
},
|
|
@@ -64,8 +64,8 @@ class TeamsChannelSetCommand extends GraphCommand_1.default {
|
|
|
64
64
|
}
|
|
65
65
|
mapRequestBody(options) {
|
|
66
66
|
const requestBody = {};
|
|
67
|
-
if (options.
|
|
68
|
-
requestBody.displayName = options.
|
|
67
|
+
if (options.newName) {
|
|
68
|
+
requestBody.displayName = options.newName;
|
|
69
69
|
}
|
|
70
70
|
if (options.description) {
|
|
71
71
|
requestBody.description = options.description;
|
|
@@ -76,7 +76,7 @@ class TeamsChannelSetCommand extends GraphCommand_1.default {
|
|
|
76
76
|
_TeamsChannelSetCommand_instances = new WeakSet(), _TeamsChannelSetCommand_initTelemetry = function _TeamsChannelSetCommand_initTelemetry() {
|
|
77
77
|
this.telemetry.push((args) => {
|
|
78
78
|
Object.assign(this.telemetryProperties, {
|
|
79
|
-
|
|
79
|
+
newName: typeof args.options.newName !== 'undefined',
|
|
80
80
|
description: typeof args.options.description !== 'undefined'
|
|
81
81
|
});
|
|
82
82
|
});
|
|
@@ -84,9 +84,9 @@ _TeamsChannelSetCommand_instances = new WeakSet(), _TeamsChannelSetCommand_initT
|
|
|
84
84
|
this.options.unshift({
|
|
85
85
|
option: '-i, --teamId <teamId>'
|
|
86
86
|
}, {
|
|
87
|
-
option: '--
|
|
87
|
+
option: '--name <name>'
|
|
88
88
|
}, {
|
|
89
|
-
option: '--
|
|
89
|
+
option: '--newName [newName]'
|
|
90
90
|
}, {
|
|
91
91
|
option: '--description [description]'
|
|
92
92
|
});
|
|
@@ -95,7 +95,7 @@ _TeamsChannelSetCommand_instances = new WeakSet(), _TeamsChannelSetCommand_initT
|
|
|
95
95
|
if (!utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
96
96
|
return `${args.options.teamId} is not a valid GUID`;
|
|
97
97
|
}
|
|
98
|
-
if (args.options.
|
|
98
|
+
if (args.options.name.toLowerCase() === "general") {
|
|
99
99
|
return 'General channel cannot be updated';
|
|
100
100
|
}
|
|
101
101
|
return true;
|
|
@@ -34,7 +34,7 @@ class TeamsMessageGetCommand extends GraphCommand_1.default {
|
|
|
34
34
|
}
|
|
35
35
|
commandAction(logger, args, cb) {
|
|
36
36
|
const requestOptions = {
|
|
37
|
-
url: `${this.resource}/v1.0/teams/${args.options.teamId}/channels/${args.options.channelId}/messages/${args.options.
|
|
37
|
+
url: `${this.resource}/v1.0/teams/${args.options.teamId}/channels/${args.options.channelId}/messages/${args.options.id}`,
|
|
38
38
|
headers: {
|
|
39
39
|
accept: 'application/json;odata.metadata=none'
|
|
40
40
|
},
|
|
@@ -50,11 +50,11 @@ class TeamsMessageGetCommand extends GraphCommand_1.default {
|
|
|
50
50
|
}
|
|
51
51
|
_TeamsMessageGetCommand_instances = new WeakSet(), _TeamsMessageGetCommand_initOptions = function _TeamsMessageGetCommand_initOptions() {
|
|
52
52
|
this.options.unshift({
|
|
53
|
-
option: '-
|
|
53
|
+
option: '-t, --teamId <teamId>'
|
|
54
54
|
}, {
|
|
55
55
|
option: '-c, --channelId <channelId>'
|
|
56
56
|
}, {
|
|
57
|
-
option: '-
|
|
57
|
+
option: '-i, --id <id>'
|
|
58
58
|
});
|
|
59
59
|
}, _TeamsMessageGetCommand_initValidators = function _TeamsMessageGetCommand_initValidators() {
|
|
60
60
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -71,11 +71,11 @@ class TeamsTabGetCommand extends GraphCommand_1.default {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
getTabId(args) {
|
|
74
|
-
if (args.options.
|
|
75
|
-
return Promise.resolve(args.options.
|
|
74
|
+
if (args.options.id) {
|
|
75
|
+
return Promise.resolve(args.options.id);
|
|
76
76
|
}
|
|
77
77
|
const tabRequestOptions = {
|
|
78
|
-
url: `${this.resource}/v1.0/teams/${encodeURIComponent(this.teamId)}/channels/${encodeURIComponent(this.channelId)}/tabs?$filter=displayName eq '${encodeURIComponent(args.options.
|
|
78
|
+
url: `${this.resource}/v1.0/teams/${encodeURIComponent(this.teamId)}/channels/${encodeURIComponent(this.channelId)}/tabs?$filter=displayName eq '${encodeURIComponent(args.options.name)}'`,
|
|
79
79
|
headers: {
|
|
80
80
|
accept: 'application/json;odata.metadata=none'
|
|
81
81
|
},
|
|
@@ -126,8 +126,8 @@ _TeamsTabGetCommand_instances = new WeakSet(), _TeamsTabGetCommand_initTelemetry
|
|
|
126
126
|
teamName: typeof args.options.teamName !== 'undefined',
|
|
127
127
|
channelId: typeof args.options.channelId !== 'undefined',
|
|
128
128
|
channelName: typeof args.options.channelName !== 'undefined',
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
id: typeof args.options.id !== 'undefined',
|
|
130
|
+
name: typeof args.options.name !== 'undefined'
|
|
131
131
|
});
|
|
132
132
|
});
|
|
133
133
|
}, _TeamsTabGetCommand_initOptions = function _TeamsTabGetCommand_initOptions() {
|
|
@@ -140,9 +140,9 @@ _TeamsTabGetCommand_instances = new WeakSet(), _TeamsTabGetCommand_initTelemetry
|
|
|
140
140
|
}, {
|
|
141
141
|
option: '--channelName [channelName]'
|
|
142
142
|
}, {
|
|
143
|
-
option: '-i, --
|
|
143
|
+
option: '-i, --id [id]'
|
|
144
144
|
}, {
|
|
145
|
-
option: '-n, --
|
|
145
|
+
option: '-n, --name [name]'
|
|
146
146
|
});
|
|
147
147
|
}, _TeamsTabGetCommand_initValidators = function _TeamsTabGetCommand_initValidators() {
|
|
148
148
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -164,14 +164,14 @@ _TeamsTabGetCommand_instances = new WeakSet(), _TeamsTabGetCommand_initTelemetry
|
|
|
164
164
|
if (args.options.channelId && !utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
165
165
|
return `${args.options.channelId} is not a valid Teams ChannelId`;
|
|
166
166
|
}
|
|
167
|
-
if (args.options.
|
|
168
|
-
return 'Specify either
|
|
167
|
+
if (args.options.id && args.options.name) {
|
|
168
|
+
return 'Specify either id or name, but not both.';
|
|
169
169
|
}
|
|
170
|
-
if (!args.options.
|
|
171
|
-
return 'Specify
|
|
170
|
+
if (!args.options.id && !args.options.name) {
|
|
171
|
+
return 'Specify id or name, one is required';
|
|
172
172
|
}
|
|
173
|
-
if (args.options.
|
|
174
|
-
return `${args.options.
|
|
173
|
+
if (args.options.id && !utils_1.validation.isValidGuid(args.options.id)) {
|
|
174
|
+
return `${args.options.id} is not a valid GUID`;
|
|
175
175
|
}
|
|
176
176
|
return true;
|
|
177
177
|
}));
|
|
@@ -37,7 +37,7 @@ class TeamsTabRemoveCommand extends GraphCommand_1.default {
|
|
|
37
37
|
commandAction(logger, args, cb) {
|
|
38
38
|
const removeTab = () => {
|
|
39
39
|
const requestOptions = {
|
|
40
|
-
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels/${args.options.channelId}/tabs/${encodeURIComponent(args.options.
|
|
40
|
+
url: `${this.resource}/v1.0/teams/${encodeURIComponent(args.options.teamId)}/channels/${args.options.channelId}/tabs/${encodeURIComponent(args.options.id)}`,
|
|
41
41
|
headers: {
|
|
42
42
|
accept: "application/json;odata.metadata=none"
|
|
43
43
|
},
|
|
@@ -53,7 +53,7 @@ class TeamsTabRemoveCommand extends GraphCommand_1.default {
|
|
|
53
53
|
type: "confirm",
|
|
54
54
|
name: "continue",
|
|
55
55
|
default: false,
|
|
56
|
-
message: `Are you sure you want to remove the tab with id ${args.options.
|
|
56
|
+
message: `Are you sure you want to remove the tab with id ${args.options.id} from channel ${args.options.channelId} in team ${args.options.teamId}?`
|
|
57
57
|
}, (result) => {
|
|
58
58
|
if (!result.continue) {
|
|
59
59
|
cb();
|
|
@@ -73,11 +73,11 @@ _TeamsTabRemoveCommand_instances = new WeakSet(), _TeamsTabRemoveCommand_initTel
|
|
|
73
73
|
});
|
|
74
74
|
}, _TeamsTabRemoveCommand_initOptions = function _TeamsTabRemoveCommand_initOptions() {
|
|
75
75
|
this.options.unshift({
|
|
76
|
-
option: "-
|
|
76
|
+
option: "-t, --teamId <teamId>"
|
|
77
77
|
}, {
|
|
78
78
|
option: "-c, --channelId <channelId>"
|
|
79
79
|
}, {
|
|
80
|
-
option: "-
|
|
80
|
+
option: "-i, --id <id>"
|
|
81
81
|
}, {
|
|
82
82
|
option: "--confirm"
|
|
83
83
|
});
|
|
@@ -89,8 +89,8 @@ _TeamsTabRemoveCommand_instances = new WeakSet(), _TeamsTabRemoveCommand_initTel
|
|
|
89
89
|
if (!utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
90
90
|
return `${args.options.channelId} is not a valid Teams ChannelId`;
|
|
91
91
|
}
|
|
92
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
93
|
-
return `${args.options.
|
|
92
|
+
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
93
|
+
return `${args.options.id} is not a valid GUID`;
|
|
94
94
|
}
|
|
95
95
|
return true;
|
|
96
96
|
}));
|