@pnp/cli-microsoft365 5.8.0-beta.bc15f2b → 6.0.0-beta.076a3a5
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 +11 -11
- package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +10 -10
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +10 -10
- 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 +9 -9
- package/dist/m365/aad/commands/policy/policy-list.js +6 -6
- package/dist/m365/aad/commands/sp/sp-get.js +12 -12
- 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 +2 -9
- package/dist/m365/planner/commands/bucket/bucket-get.js +4 -11
- package/dist/m365/planner/commands/bucket/bucket-list.js +2 -9
- 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 +3 -8
- 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 +5 -5
- package/dist/m365/spo/commands/file/file-checkout.js +5 -5
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +13 -13
- 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 +20 -20
- package/dist/m365/spo/commands/list/list-view-field-remove.js +11 -11
- package/dist/m365/spo/commands/list/list-view-field-set.js +15 -15
- package/dist/m365/spo/commands/list/list-view-get.js +9 -9
- package/dist/m365/spo/commands/list/list-view-remove.js +11 -11
- package/dist/m365/spo/commands/list/list-view-set.js +11 -11
- 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 +5 -5
- package/dist/m365/spo/commands/site/site-apppermission-set.js +5 -5
- 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 +10 -10
- package/dist/m365/teams/commands/channel/channel-remove.js +12 -12
- 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 +10 -10
- 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
|
@@ -38,13 +38,13 @@ class SpoListViewFieldSetCommand extends SpoCommand_1.default {
|
|
|
38
38
|
const listSelector = args.options.listId ? `(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
39
39
|
const viewSelector = args.options.viewId ? `('${utils_1.formatting.encodeQueryParameter(args.options.viewId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.viewTitle)}')`;
|
|
40
40
|
if (this.verbose) {
|
|
41
|
-
logger.logToStderr(`Getting field ${args.options.
|
|
41
|
+
logger.logToStderr(`Getting field ${args.options.id || args.options.title}...`);
|
|
42
42
|
}
|
|
43
43
|
this
|
|
44
44
|
.getField(args.options, listSelector)
|
|
45
45
|
.then((field) => {
|
|
46
46
|
if (this.verbose) {
|
|
47
|
-
logger.logToStderr(`Moving the field ${args.options.
|
|
47
|
+
logger.logToStderr(`Moving the field ${args.options.id || args.options.title} in view ${args.options.viewId || args.options.viewTitle} to position ${args.options.position}...`);
|
|
48
48
|
}
|
|
49
49
|
const moveRequestUrl = `${args.options.webUrl}/_api/web/lists${listSelector}/views${viewSelector}/viewfields/moveviewfieldto`;
|
|
50
50
|
const moveRequestOptions = {
|
|
@@ -54,7 +54,7 @@ class SpoListViewFieldSetCommand extends SpoCommand_1.default {
|
|
|
54
54
|
},
|
|
55
55
|
data: {
|
|
56
56
|
field: field.InternalName,
|
|
57
|
-
index: args.options.
|
|
57
|
+
index: args.options.position
|
|
58
58
|
},
|
|
59
59
|
responseType: 'json'
|
|
60
60
|
};
|
|
@@ -63,7 +63,7 @@ class SpoListViewFieldSetCommand extends SpoCommand_1.default {
|
|
|
63
63
|
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
64
64
|
}
|
|
65
65
|
getField(options, listSelector) {
|
|
66
|
-
const fieldSelector = options.
|
|
66
|
+
const fieldSelector = options.id ? `/getbyid('${encodeURIComponent(options.id)}')` : `/getbyinternalnameortitle('${encodeURIComponent(options.title)}')`;
|
|
67
67
|
const getRequestUrl = `${options.webUrl}/_api/web/lists${listSelector}/fields${fieldSelector}`;
|
|
68
68
|
const requestOptions = {
|
|
69
69
|
url: getRequestUrl,
|
|
@@ -82,8 +82,8 @@ _SpoListViewFieldSetCommand_instances = new WeakSet(), _SpoListViewFieldSetComma
|
|
|
82
82
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
83
83
|
viewId: typeof args.options.viewId !== 'undefined',
|
|
84
84
|
viewTitle: typeof args.options.viewTitle !== 'undefined',
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
id: typeof args.options.id !== 'undefined',
|
|
86
|
+
title: typeof args.options.title !== 'undefined'
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
}, _SpoListViewFieldSetCommand_initOptions = function _SpoListViewFieldSetCommand_initOptions() {
|
|
@@ -98,11 +98,11 @@ _SpoListViewFieldSetCommand_instances = new WeakSet(), _SpoListViewFieldSetComma
|
|
|
98
98
|
}, {
|
|
99
99
|
option: '--viewTitle [viewTitle]'
|
|
100
100
|
}, {
|
|
101
|
-
option: '--
|
|
101
|
+
option: '--id [id]'
|
|
102
102
|
}, {
|
|
103
|
-
option: '--
|
|
103
|
+
option: '--title [title]'
|
|
104
104
|
}, {
|
|
105
|
-
option: '--
|
|
105
|
+
option: '--position <position>'
|
|
106
106
|
});
|
|
107
107
|
}, _SpoListViewFieldSetCommand_initValidators = function _SpoListViewFieldSetCommand_initValidators() {
|
|
108
108
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -120,19 +120,19 @@ _SpoListViewFieldSetCommand_instances = new WeakSet(), _SpoListViewFieldSetComma
|
|
|
120
120
|
return `${args.options.viewId} is not a valid GUID`;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
if (args.options.
|
|
124
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
125
|
-
return `${args.options.
|
|
123
|
+
if (args.options.id) {
|
|
124
|
+
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
125
|
+
return `${args.options.id} is not a valid GUID`;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
const position = parseInt(args.options.
|
|
128
|
+
const position = parseInt(args.options.position);
|
|
129
129
|
if (isNaN(position)) {
|
|
130
|
-
return `${args.options.
|
|
130
|
+
return `${args.options.position} is not a number`;
|
|
131
131
|
}
|
|
132
132
|
return true;
|
|
133
133
|
}));
|
|
134
134
|
}, _SpoListViewFieldSetCommand_initOptionSets = function _SpoListViewFieldSetCommand_initOptionSets() {
|
|
135
|
-
this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle'], ['
|
|
135
|
+
this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle'], ['id', 'title']);
|
|
136
136
|
};
|
|
137
137
|
module.exports = new SpoListViewFieldSetCommand();
|
|
138
138
|
//# sourceMappingURL=list-view-field-set.js.map
|
|
@@ -47,7 +47,7 @@ class SpoListViewGetCommand extends SpoCommand_1.default {
|
|
|
47
47
|
const listServerRelativeUrl = utils_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
48
48
|
listRestUrl = `/GetList('${utils_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')`;
|
|
49
49
|
}
|
|
50
|
-
const viewRestUrl = `/views/${(args.options.
|
|
50
|
+
const viewRestUrl = `/views/${(args.options.id ? `getById('${utils_1.formatting.encodeQueryParameter(args.options.id)}')` : `getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.title)}')`)}`;
|
|
51
51
|
const requestOptions = {
|
|
52
52
|
url: `${baseRestUrl}${listRestUrl}${viewRestUrl}`,
|
|
53
53
|
headers: {
|
|
@@ -69,8 +69,8 @@ _SpoListViewGetCommand_instances = new WeakSet(), _SpoListViewGetCommand_initTel
|
|
|
69
69
|
listId: typeof args.options.listId !== 'undefined',
|
|
70
70
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
71
71
|
listUrl: typeof args.options.listUrl !== 'undefined',
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
id: typeof args.options.id !== 'undefined',
|
|
73
|
+
title: typeof args.options.title !== 'undefined'
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
76
|
}, _SpoListViewGetCommand_initOptions = function _SpoListViewGetCommand_initOptions() {
|
|
@@ -83,9 +83,9 @@ _SpoListViewGetCommand_instances = new WeakSet(), _SpoListViewGetCommand_initTel
|
|
|
83
83
|
}, {
|
|
84
84
|
option: '--listUrl [listUrl]'
|
|
85
85
|
}, {
|
|
86
|
-
option: '--
|
|
86
|
+
option: '--id [id]'
|
|
87
87
|
}, {
|
|
88
|
-
option: '--
|
|
88
|
+
option: '--title [title]'
|
|
89
89
|
});
|
|
90
90
|
}, _SpoListViewGetCommand_initValidators = function _SpoListViewGetCommand_initValidators() {
|
|
91
91
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -97,14 +97,14 @@ _SpoListViewGetCommand_instances = new WeakSet(), _SpoListViewGetCommand_initTel
|
|
|
97
97
|
!utils_1.validation.isValidGuid(args.options.listId)) {
|
|
98
98
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
99
99
|
}
|
|
100
|
-
if (args.options.
|
|
101
|
-
!utils_1.validation.isValidGuid(args.options.
|
|
102
|
-
return `${args.options.
|
|
100
|
+
if (args.options.id &&
|
|
101
|
+
!utils_1.validation.isValidGuid(args.options.id)) {
|
|
102
|
+
return `${args.options.id} in option id is not a valid GUID`;
|
|
103
103
|
}
|
|
104
104
|
return true;
|
|
105
105
|
}));
|
|
106
106
|
}, _SpoListViewGetCommand_initOptionSets = function _SpoListViewGetCommand_initOptionSets() {
|
|
107
|
-
this.optionSets.push(['listId', 'listTitle', 'listUrl'], ['
|
|
107
|
+
this.optionSets.push(['listId', 'listTitle', 'listUrl'], ['id', 'title']);
|
|
108
108
|
};
|
|
109
109
|
module.exports = new SpoListViewGetCommand();
|
|
110
110
|
//# sourceMappingURL=list-view-get.js.map
|
|
@@ -39,11 +39,11 @@ class SpoListViewRemoveCommand extends SpoCommand_1.default {
|
|
|
39
39
|
const removeViewFromList = () => {
|
|
40
40
|
if (this.verbose) {
|
|
41
41
|
const list = (args.options.listId ? args.options.listId : args.options.listTitle);
|
|
42
|
-
logger.logToStderr(`Removing view ${args.options.
|
|
42
|
+
logger.logToStderr(`Removing view ${args.options.id || args.options.title} from list ${list} in site at ${args.options.webUrl}...`);
|
|
43
43
|
}
|
|
44
44
|
let requestUrl = '';
|
|
45
45
|
const listSelector = args.options.listId ? `(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
46
|
-
const viewSelector = args.options.
|
|
46
|
+
const viewSelector = args.options.id ? `(guid'${utils_1.formatting.encodeQueryParameter(args.options.id)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.title)}')`;
|
|
47
47
|
requestUrl = `${args.options.webUrl}/_api/web/lists${listSelector}/views${viewSelector}`;
|
|
48
48
|
const requestOptions = {
|
|
49
49
|
url: requestUrl,
|
|
@@ -69,7 +69,7 @@ class SpoListViewRemoveCommand extends SpoCommand_1.default {
|
|
|
69
69
|
type: 'confirm',
|
|
70
70
|
name: 'continue',
|
|
71
71
|
default: false,
|
|
72
|
-
message: `Are you sure you want to remove the view ${args.options.
|
|
72
|
+
message: `Are you sure you want to remove the view ${args.options.id || args.options.title} from the list ${args.options.listId || args.options.listTitle} in site ${args.options.webUrl}?`
|
|
73
73
|
}, (result) => {
|
|
74
74
|
if (!result.continue) {
|
|
75
75
|
cb();
|
|
@@ -86,8 +86,8 @@ _SpoListViewRemoveCommand_instances = new WeakSet(), _SpoListViewRemoveCommand_i
|
|
|
86
86
|
Object.assign(this.telemetryProperties, {
|
|
87
87
|
listId: typeof args.options.listId !== 'undefined',
|
|
88
88
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
id: typeof args.options.id !== 'undefined',
|
|
90
|
+
title: typeof args.options.title !== 'undefined',
|
|
91
91
|
confirm: (!(!args.options.confirm)).toString()
|
|
92
92
|
});
|
|
93
93
|
});
|
|
@@ -99,9 +99,9 @@ _SpoListViewRemoveCommand_instances = new WeakSet(), _SpoListViewRemoveCommand_i
|
|
|
99
99
|
}, {
|
|
100
100
|
option: '--listTitle [listTitle]'
|
|
101
101
|
}, {
|
|
102
|
-
option: '--
|
|
102
|
+
option: '--id [id]'
|
|
103
103
|
}, {
|
|
104
|
-
option: '--
|
|
104
|
+
option: '--title [title]'
|
|
105
105
|
}, {
|
|
106
106
|
option: '--confirm'
|
|
107
107
|
});
|
|
@@ -116,15 +116,15 @@ _SpoListViewRemoveCommand_instances = new WeakSet(), _SpoListViewRemoveCommand_i
|
|
|
116
116
|
return `${args.options.listId} is not a valid GUID`;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
if (args.options.
|
|
120
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
121
|
-
return `${args.options.
|
|
119
|
+
if (args.options.id) {
|
|
120
|
+
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
121
|
+
return `${args.options.id} is not a valid GUID`;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
return true;
|
|
125
125
|
}));
|
|
126
126
|
}, _SpoListViewRemoveCommand_initOptionSets = function _SpoListViewRemoveCommand_initOptionSets() {
|
|
127
|
-
this.optionSets.push(['listId', 'listTitle'], ['
|
|
127
|
+
this.optionSets.push(['listId', 'listTitle'], ['id', 'title']);
|
|
128
128
|
};
|
|
129
129
|
module.exports = new SpoListViewRemoveCommand();
|
|
130
130
|
//# sourceMappingURL=list-view-remove.js.map
|
|
@@ -42,7 +42,7 @@ class SpoListViewSetCommand extends SpoCommand_1.default {
|
|
|
42
42
|
const listRestUrl = args.options.listId ?
|
|
43
43
|
`(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')`
|
|
44
44
|
: `/getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
45
|
-
const viewRestUrl = `/views/${(args.options.
|
|
45
|
+
const viewRestUrl = `/views/${(args.options.id ? `getById('${utils_1.formatting.encodeQueryParameter(args.options.id)}')` : `getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.title)}')`)}`;
|
|
46
46
|
utils_1.spo
|
|
47
47
|
.getRequestDigest(args.options.webUrl)
|
|
48
48
|
.then((res) => {
|
|
@@ -66,8 +66,8 @@ class SpoListViewSetCommand extends SpoCommand_1.default {
|
|
|
66
66
|
'webUrl',
|
|
67
67
|
'listId',
|
|
68
68
|
'listTitle',
|
|
69
|
-
'
|
|
70
|
-
'
|
|
69
|
+
'id',
|
|
70
|
+
'title',
|
|
71
71
|
'debug',
|
|
72
72
|
'verbose',
|
|
73
73
|
'output'
|
|
@@ -85,8 +85,8 @@ _SpoListViewSetCommand_instances = new WeakSet(), _SpoListViewSetCommand_initTel
|
|
|
85
85
|
Object.assign(this.telemetryProperties, {
|
|
86
86
|
listId: typeof args.options.listId !== 'undefined',
|
|
87
87
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
id: typeof args.options.id !== 'undefined',
|
|
89
|
+
title: typeof args.options.title !== 'undefined'
|
|
90
90
|
});
|
|
91
91
|
});
|
|
92
92
|
}, _SpoListViewSetCommand_initOptions = function _SpoListViewSetCommand_initOptions() {
|
|
@@ -97,9 +97,9 @@ _SpoListViewSetCommand_instances = new WeakSet(), _SpoListViewSetCommand_initTel
|
|
|
97
97
|
}, {
|
|
98
98
|
option: '--listTitle [listTitle]'
|
|
99
99
|
}, {
|
|
100
|
-
option: '--
|
|
100
|
+
option: '--id [id]'
|
|
101
101
|
}, {
|
|
102
|
-
option: '--
|
|
102
|
+
option: '--title [title]'
|
|
103
103
|
});
|
|
104
104
|
}, _SpoListViewSetCommand_initValidators = function _SpoListViewSetCommand_initValidators() {
|
|
105
105
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -111,14 +111,14 @@ _SpoListViewSetCommand_instances = new WeakSet(), _SpoListViewSetCommand_initTel
|
|
|
111
111
|
!utils_1.validation.isValidGuid(args.options.listId)) {
|
|
112
112
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
113
113
|
}
|
|
114
|
-
if (args.options.
|
|
115
|
-
!utils_1.validation.isValidGuid(args.options.
|
|
116
|
-
return `${args.options.
|
|
114
|
+
if (args.options.id &&
|
|
115
|
+
!utils_1.validation.isValidGuid(args.options.id)) {
|
|
116
|
+
return `${args.options.id} in option id is not a valid GUID`;
|
|
117
117
|
}
|
|
118
118
|
return true;
|
|
119
119
|
}));
|
|
120
120
|
}, _SpoListViewSetCommand_initOptionSets = function _SpoListViewSetCommand_initOptionSets() {
|
|
121
|
-
this.optionSets.push(['listId', 'listTitle'], ['
|
|
121
|
+
this.optionSets.push(['listId', 'listTitle'], ['id', 'title']);
|
|
122
122
|
};
|
|
123
123
|
module.exports = new SpoListViewSetCommand();
|
|
124
124
|
//# sourceMappingURL=list-view-set.js.map
|
|
@@ -35,14 +35,8 @@ class SpoListItemListCommand extends SpoCommand_1.default {
|
|
|
35
35
|
return 'Gets a list of items from the specified list';
|
|
36
36
|
}
|
|
37
37
|
commandAction(logger, args, cb) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
if (args.options.title) {
|
|
42
|
-
this.warn(logger, `Option 'title' is deprecated. Please use 'listTitle' instead.`);
|
|
43
|
-
}
|
|
44
|
-
const listIdArgument = args.options.listId || args.options.id || '';
|
|
45
|
-
const listTitleArgument = args.options.listTitle || args.options.title || '';
|
|
38
|
+
const listIdArgument = args.options.listId || '';
|
|
39
|
+
const listTitleArgument = args.options.listTitle || '';
|
|
46
40
|
let formDigestValue = '';
|
|
47
41
|
const fieldsArray = args.options.fields ? args.options.fields.split(",")
|
|
48
42
|
: (!args.options.output || args.options.output === "text") ? ["Title", "Id"] : [];
|
|
@@ -120,10 +114,8 @@ class SpoListItemListCommand extends SpoCommand_1.default {
|
|
|
120
114
|
_SpoListItemListCommand_instances = new WeakSet(), _SpoListItemListCommand_initTelemetry = function _SpoListItemListCommand_initTelemetry() {
|
|
121
115
|
this.telemetry.push((args) => {
|
|
122
116
|
Object.assign(this.telemetryProperties, {
|
|
123
|
-
id: typeof args.options.id !== 'undefined',
|
|
124
117
|
listId: typeof args.options.listId !== 'undefined',
|
|
125
118
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
126
|
-
title: typeof args.options.title !== 'undefined',
|
|
127
119
|
fields: typeof args.options.fields !== 'undefined',
|
|
128
120
|
filter: typeof args.options.filter !== 'undefined',
|
|
129
121
|
pageNumber: typeof args.options.pageNumber !== 'undefined',
|
|
@@ -134,10 +126,6 @@ _SpoListItemListCommand_instances = new WeakSet(), _SpoListItemListCommand_initT
|
|
|
134
126
|
}, _SpoListItemListCommand_initOptions = function _SpoListItemListCommand_initOptions() {
|
|
135
127
|
this.options.unshift({
|
|
136
128
|
option: '-u, --webUrl <webUrl>'
|
|
137
|
-
}, {
|
|
138
|
-
option: '--id [id]'
|
|
139
|
-
}, {
|
|
140
|
-
option: '--title [title]'
|
|
141
129
|
}, {
|
|
142
130
|
option: '-i, --listId [listId]'
|
|
143
131
|
}, {
|
|
@@ -159,15 +147,11 @@ _SpoListItemListCommand_instances = new WeakSet(), _SpoListItemListCommand_initT
|
|
|
159
147
|
if (isValidSharePointUrl !== true) {
|
|
160
148
|
return isValidSharePointUrl;
|
|
161
149
|
}
|
|
162
|
-
if (!args.options.
|
|
150
|
+
if (!args.options.listId && !args.options.listTitle) {
|
|
163
151
|
return `Specify listId or listTitle`;
|
|
164
152
|
}
|
|
165
|
-
if (args.options.
|
|
166
|
-
return `Specify
|
|
167
|
-
}
|
|
168
|
-
// Check if only one of the 4 options is specified
|
|
169
|
-
if ([args.options.id, args.options.title, args.options.listId, args.options.listTitle].filter(o => o).length > 1) {
|
|
170
|
-
return 'Specify listId or listTitle but not both';
|
|
153
|
+
if (args.options.listId && args.options.listTitle) {
|
|
154
|
+
return `Specify listId or listTitle but not both`;
|
|
171
155
|
}
|
|
172
156
|
if (args.options.camlQuery && args.options.fields) {
|
|
173
157
|
return `Specify camlQuery or fields but not both`;
|
|
@@ -190,13 +174,10 @@ _SpoListItemListCommand_instances = new WeakSet(), _SpoListItemListCommand_initT
|
|
|
190
174
|
if (args.options.listId && !utils_1.validation.isValidGuid(args.options.listId)) {
|
|
191
175
|
return `${args.options.listId} is not a valid GUID`;
|
|
192
176
|
}
|
|
193
|
-
if (args.options.id && !utils_1.validation.isValidGuid(args.options.id)) {
|
|
194
|
-
return `${args.options.id} in option id is not a valid GUID`;
|
|
195
|
-
}
|
|
196
177
|
return true;
|
|
197
178
|
}));
|
|
198
179
|
}, _SpoListItemListCommand_initTypes = function _SpoListItemListCommand_initTypes() {
|
|
199
|
-
this.types.string.push('webUrl', '
|
|
180
|
+
this.types.string.push('webUrl', 'camlQuery', 'pageSize', 'pageNumber', 'fields', 'filter');
|
|
200
181
|
};
|
|
201
182
|
module.exports = new SpoListItemListCommand();
|
|
202
183
|
//# sourceMappingURL=listitem-list.js.map
|
|
@@ -65,7 +65,7 @@ class SpoListItemRecordDeclareCommand extends SpoCommand_1.default {
|
|
|
65
65
|
})
|
|
66
66
|
.then((res) => {
|
|
67
67
|
listId = res.Id;
|
|
68
|
-
const requestBody = this.getDeclareRecordRequestBody(webIdentity, listId, args.options.
|
|
68
|
+
const requestBody = this.getDeclareRecordRequestBody(webIdentity, listId, args.options.listItemId, args.options.date || '');
|
|
69
69
|
const requestOptions = {
|
|
70
70
|
url: `${args.options.webUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
71
71
|
headers: {
|
|
@@ -116,7 +116,7 @@ _SpoListItemRecordDeclareCommand_instances = new WeakSet(), _SpoListItemRecordDe
|
|
|
116
116
|
}, {
|
|
117
117
|
option: '-t, --listTitle [listTitle]'
|
|
118
118
|
}, {
|
|
119
|
-
option: '-i, --
|
|
119
|
+
option: '-i, --listItemId <listItemId>'
|
|
120
120
|
}, {
|
|
121
121
|
option: '-d, --date [date]'
|
|
122
122
|
});
|
|
@@ -129,9 +129,9 @@ _SpoListItemRecordDeclareCommand_instances = new WeakSet(), _SpoListItemRecordDe
|
|
|
129
129
|
if (args.options.listId && !utils_1.validation.isValidGuid(args.options.listId)) {
|
|
130
130
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
131
131
|
}
|
|
132
|
-
const id = parseInt(args.options.
|
|
132
|
+
const id = parseInt(args.options.listItemId);
|
|
133
133
|
if (isNaN(id)) {
|
|
134
|
-
return `${args.options.
|
|
134
|
+
return `${args.options.listItemId} is not a number`;
|
|
135
135
|
}
|
|
136
136
|
if (id < 1) {
|
|
137
137
|
return `Item ID must be a positive number`;
|
|
@@ -80,7 +80,7 @@ class SpoListItemRecordUndeclareCommand extends SpoCommand_1.default {
|
|
|
80
80
|
'Content-Type': 'text/xml',
|
|
81
81
|
'X-RequestDigest': formDigestValue
|
|
82
82
|
},
|
|
83
|
-
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><StaticMethod TypeId="{ea8e1356-5910-4e69-bc05-d0c30ed657fc}" Name="UndeclareItemAsRecord" Id="53"><Parameters><Parameter ObjectPathId="49" /></Parameters></StaticMethod></Actions><ObjectPaths><Identity Id="49" Name="${objectIdentity.objectIdentity}:list:${environmentListId}:item:${args.options.
|
|
83
|
+
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><StaticMethod TypeId="{ea8e1356-5910-4e69-bc05-d0c30ed657fc}" Name="UndeclareItemAsRecord" Id="53"><Parameters><Parameter ObjectPathId="49" /></Parameters></StaticMethod></Actions><ObjectPaths><Identity Id="49" Name="${objectIdentity.objectIdentity}:list:${environmentListId}:item:${args.options.listItemId},1" /></ObjectPaths></Request>`
|
|
84
84
|
};
|
|
85
85
|
return request_1.default.post(requestOptions);
|
|
86
86
|
})
|
|
@@ -101,7 +101,7 @@ _SpoListItemRecordUndeclareCommand_instances = new WeakSet(), _SpoListItemRecord
|
|
|
101
101
|
this.options.unshift({
|
|
102
102
|
option: '-u, --webUrl <webUrl>'
|
|
103
103
|
}, {
|
|
104
|
-
option: '-i, --
|
|
104
|
+
option: '-i, --listItemId <listItemId>'
|
|
105
105
|
}, {
|
|
106
106
|
option: '-l, --listId [listId]'
|
|
107
107
|
}, {
|
|
@@ -109,9 +109,9 @@ _SpoListItemRecordUndeclareCommand_instances = new WeakSet(), _SpoListItemRecord
|
|
|
109
109
|
});
|
|
110
110
|
}, _SpoListItemRecordUndeclareCommand_initValidators = function _SpoListItemRecordUndeclareCommand_initValidators() {
|
|
111
111
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
112
|
-
const id = parseInt(args.options.
|
|
112
|
+
const id = parseInt(args.options.listItemId);
|
|
113
113
|
if (isNaN(id)) {
|
|
114
|
-
return `${args.options.
|
|
114
|
+
return `${args.options.listItemId} is not a valid list item ID`;
|
|
115
115
|
}
|
|
116
116
|
const isValidSharePointUrl = utils_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
117
117
|
if (isValidSharePointUrl !== true) {
|
|
@@ -34,7 +34,7 @@ class SpoPageColumnGetCommand extends SpoCommand_1.default {
|
|
|
34
34
|
}
|
|
35
35
|
commandAction(logger, args, cb) {
|
|
36
36
|
Page_1.Page
|
|
37
|
-
.getPage(args.options.
|
|
37
|
+
.getPage(args.options.pageName, args.options.webUrl, logger, this.debug, this.verbose)
|
|
38
38
|
.then((clientSidePage) => {
|
|
39
39
|
const sections = clientSidePage.sections
|
|
40
40
|
.filter(section => section.order === args.options.section);
|
|
@@ -61,7 +61,7 @@ _SpoPageColumnGetCommand_instances = new WeakSet(), _SpoPageColumnGetCommand_ini
|
|
|
61
61
|
this.options.unshift({
|
|
62
62
|
option: '-u, --webUrl <webUrl>'
|
|
63
63
|
}, {
|
|
64
|
-
option: '-n, --
|
|
64
|
+
option: '-n, --pageName <pageName>'
|
|
65
65
|
}, {
|
|
66
66
|
option: '-s, --section <section>'
|
|
67
67
|
}, {
|
|
@@ -34,7 +34,7 @@ class SpoPageColumnListCommand extends SpoCommand_1.default {
|
|
|
34
34
|
}
|
|
35
35
|
commandAction(logger, args, cb) {
|
|
36
36
|
Page_1.Page
|
|
37
|
-
.getPage(args.options.
|
|
37
|
+
.getPage(args.options.pageName, args.options.webUrl, logger, this.debug, this.verbose)
|
|
38
38
|
.then((clientSidePage) => {
|
|
39
39
|
const sections = clientSidePage.sections
|
|
40
40
|
.filter(section => section.order === args.options.section);
|
|
@@ -54,7 +54,7 @@ _SpoPageColumnListCommand_instances = new WeakSet(), _SpoPageColumnListCommand_i
|
|
|
54
54
|
this.options.unshift({
|
|
55
55
|
option: '-u, --webUrl <webUrl>'
|
|
56
56
|
}, {
|
|
57
|
-
option: '-n, --
|
|
57
|
+
option: '-n, --pageName <pageName>'
|
|
58
58
|
}, {
|
|
59
59
|
option: '-s, --section <sectionId>'
|
|
60
60
|
});
|
|
@@ -34,8 +34,8 @@ class SpoPageControlGetCommand extends SpoCommand_1.default {
|
|
|
34
34
|
return 'Gets information about the specific control on a modern page';
|
|
35
35
|
}
|
|
36
36
|
commandAction(logger, args, cb) {
|
|
37
|
-
let pageName = args.options.
|
|
38
|
-
if (args.options.
|
|
37
|
+
let pageName = args.options.pageName;
|
|
38
|
+
if (args.options.pageName.indexOf('.aspx') < 0) {
|
|
39
39
|
pageName += '.aspx';
|
|
40
40
|
}
|
|
41
41
|
const requestOptions = {
|
|
@@ -64,7 +64,7 @@ class SpoPageControlGetCommand extends SpoCommand_1.default {
|
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
66
|
if (this.verbose) {
|
|
67
|
-
logger.logToStderr(`Control with ID ${args.options.id} not found on page ${args.options.
|
|
67
|
+
logger.logToStderr(`Control with ID ${args.options.id} not found on page ${args.options.pageName}`);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
cb();
|
|
@@ -75,7 +75,7 @@ _SpoPageControlGetCommand_instances = new WeakSet(), _SpoPageControlGetCommand_i
|
|
|
75
75
|
this.options.unshift({
|
|
76
76
|
option: '-i, --id <id>'
|
|
77
77
|
}, {
|
|
78
|
-
option: '-n, --
|
|
78
|
+
option: '-n, --pageName <pageName>'
|
|
79
79
|
}, {
|
|
80
80
|
option: '-u, --webUrl <webUrl>'
|
|
81
81
|
});
|
|
@@ -37,8 +37,8 @@ class SpoPageControlListCommand extends SpoCommand_1.default {
|
|
|
37
37
|
return ['id', 'type', 'title'];
|
|
38
38
|
}
|
|
39
39
|
commandAction(logger, args, cb) {
|
|
40
|
-
let pageName = args.options.
|
|
41
|
-
if (args.options.
|
|
40
|
+
let pageName = args.options.pageName;
|
|
41
|
+
if (args.options.pageName.indexOf('.aspx') < 0) {
|
|
42
42
|
pageName += '.aspx';
|
|
43
43
|
}
|
|
44
44
|
const requestOptions = {
|
|
@@ -70,7 +70,7 @@ class SpoPageControlListCommand extends SpoCommand_1.default {
|
|
|
70
70
|
}
|
|
71
71
|
_SpoPageControlListCommand_instances = new WeakSet(), _SpoPageControlListCommand_initOptions = function _SpoPageControlListCommand_initOptions() {
|
|
72
72
|
this.options.unshift({
|
|
73
|
-
option: '-n, --
|
|
73
|
+
option: '-n, --pageName <pageName>'
|
|
74
74
|
}, {
|
|
75
75
|
option: '-u, --webUrl <webUrl>'
|
|
76
76
|
});
|
|
@@ -35,8 +35,8 @@ class SpoPageControlSetCommand extends SpoCommand_1.default {
|
|
|
35
35
|
return 'Updates web part data or properties of a control on a modern page';
|
|
36
36
|
}
|
|
37
37
|
commandAction(logger, args, cb) {
|
|
38
|
-
let pageName = args.options.
|
|
39
|
-
if (args.options.
|
|
38
|
+
let pageName = args.options.pageName;
|
|
39
|
+
if (args.options.pageName.indexOf('.aspx') < 0) {
|
|
40
40
|
pageName += '.aspx';
|
|
41
41
|
}
|
|
42
42
|
const requestOptions = {
|
|
@@ -151,7 +151,7 @@ _SpoPageControlSetCommand_instances = new WeakSet(), _SpoPageControlSetCommand_i
|
|
|
151
151
|
this.options.unshift({
|
|
152
152
|
option: '-i, --id <id>'
|
|
153
153
|
}, {
|
|
154
|
-
option: '-n, --
|
|
154
|
+
option: '-n, --pageName <pageName>'
|
|
155
155
|
}, {
|
|
156
156
|
option: '-u, --webUrl <webUrl>'
|
|
157
157
|
}, {
|
|
@@ -36,7 +36,7 @@ class SpoPageSectionAddCommand extends SpoCommand_1.default {
|
|
|
36
36
|
return 'Adds section to modern page';
|
|
37
37
|
}
|
|
38
38
|
commandAction(logger, args, cb) {
|
|
39
|
-
let pageFullName = args.options.
|
|
39
|
+
let pageFullName = args.options.pageName.toLowerCase();
|
|
40
40
|
if (pageFullName.indexOf('.aspx') < 0) {
|
|
41
41
|
pageFullName += '.aspx';
|
|
42
42
|
}
|
|
@@ -174,7 +174,7 @@ _SpoPageSectionAddCommand_instances = new WeakSet(), _SpoPageSectionAddCommand_i
|
|
|
174
174
|
});
|
|
175
175
|
}, _SpoPageSectionAddCommand_initOptions = function _SpoPageSectionAddCommand_initOptions() {
|
|
176
176
|
this.options.unshift({
|
|
177
|
-
option: '-n, --
|
|
177
|
+
option: '-n, --pageName <pageName>'
|
|
178
178
|
}, {
|
|
179
179
|
option: '-u, --webUrl <webUrl>'
|
|
180
180
|
}, {
|
|
@@ -34,7 +34,7 @@ class SpoPageSectionGetCommand extends SpoCommand_1.default {
|
|
|
34
34
|
}
|
|
35
35
|
commandAction(logger, args, cb) {
|
|
36
36
|
Page_1.Page
|
|
37
|
-
.getPage(args.options.
|
|
37
|
+
.getPage(args.options.pageName, args.options.webUrl, logger, this.debug, this.verbose)
|
|
38
38
|
.then((clientSidePage) => {
|
|
39
39
|
const sections = clientSidePage.sections
|
|
40
40
|
.filter(section => section.order === args.options.section);
|
|
@@ -50,7 +50,7 @@ _SpoPageSectionGetCommand_instances = new WeakSet(), _SpoPageSectionGetCommand_i
|
|
|
50
50
|
this.options.unshift({
|
|
51
51
|
option: '-u, --webUrl <webUrl>'
|
|
52
52
|
}, {
|
|
53
|
-
option: '-n, --
|
|
53
|
+
option: '-n, --pageName <pageName>'
|
|
54
54
|
}, {
|
|
55
55
|
option: '-s, --section <section>'
|
|
56
56
|
});
|
|
@@ -34,7 +34,7 @@ class SpoPageSectionListCommand extends SpoCommand_1.default {
|
|
|
34
34
|
}
|
|
35
35
|
commandAction(logger, args, cb) {
|
|
36
36
|
Page_1.Page
|
|
37
|
-
.getPage(args.options.
|
|
37
|
+
.getPage(args.options.pageName, args.options.webUrl, logger, this.debug, this.verbose)
|
|
38
38
|
.then((clientSidePage) => {
|
|
39
39
|
const sections = clientSidePage.sections;
|
|
40
40
|
const isJSONOutput = args.options.output === 'json';
|
|
@@ -60,7 +60,7 @@ _SpoPageSectionListCommand_instances = new WeakSet(), _SpoPageSectionListCommand
|
|
|
60
60
|
this.options.unshift({
|
|
61
61
|
option: '-u, --webUrl <webUrl>'
|
|
62
62
|
}, {
|
|
63
|
-
option: '-n, --
|
|
63
|
+
option: '-n, --pageName <pageName>'
|
|
64
64
|
});
|
|
65
65
|
}, _SpoPageSectionListCommand_initValidators = function _SpoPageSectionListCommand_initValidators() {
|
|
66
66
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return utils_1.validation.isValidSharePointUrl(args.options.webUrl); }));
|
|
@@ -44,7 +44,7 @@ class SpoServicePrincipalGrantRevokeCommand extends SpoCommand_1.default {
|
|
|
44
44
|
headers: {
|
|
45
45
|
'X-RequestDigest': res.FormDigestValue
|
|
46
46
|
},
|
|
47
|
-
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="10" ObjectPathId="9" /><ObjectPath Id="12" ObjectPathId="11" /><ObjectPath Id="14" ObjectPathId="13" /><Method Name="DeleteObject" Id="15" ObjectPathId="13" /><Query Id="16" ObjectPathId="13"><Query SelectAllProperties="true"><Properties /></Query></Query></Actions><ObjectPaths><Constructor Id="9" TypeId="{104e8f06-1e00-4675-99c6-1b9b504ed8d8}" /><Property Id="11" ParentId="9" Name="PermissionGrants" /><Method Id="13" ParentId="11" Name="GetByObjectId"><Parameters><Parameter Type="String">${utils_1.formatting.escapeXml(args.options.
|
|
47
|
+
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="10" ObjectPathId="9" /><ObjectPath Id="12" ObjectPathId="11" /><ObjectPath Id="14" ObjectPathId="13" /><Method Name="DeleteObject" Id="15" ObjectPathId="13" /><Query Id="16" ObjectPathId="13"><Query SelectAllProperties="true"><Properties /></Query></Query></Actions><ObjectPaths><Constructor Id="9" TypeId="{104e8f06-1e00-4675-99c6-1b9b504ed8d8}" /><Property Id="11" ParentId="9" Name="PermissionGrants" /><Method Id="13" ParentId="11" Name="GetByObjectId"><Parameters><Parameter Type="String">${utils_1.formatting.escapeXml(args.options.id)}</Parameter></Parameters></Method></ObjectPaths></Request>`
|
|
48
48
|
};
|
|
49
49
|
return request_1.default.post(requestOptions);
|
|
50
50
|
})
|
|
@@ -61,7 +61,7 @@ class SpoServicePrincipalGrantRevokeCommand extends SpoCommand_1.default {
|
|
|
61
61
|
}
|
|
62
62
|
_SpoServicePrincipalGrantRevokeCommand_instances = new WeakSet(), _SpoServicePrincipalGrantRevokeCommand_initOptions = function _SpoServicePrincipalGrantRevokeCommand_initOptions() {
|
|
63
63
|
this.options.unshift({
|
|
64
|
-
option: '-i, --
|
|
64
|
+
option: '-i, --id <id>'
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
67
|
module.exports = new SpoServicePrincipalGrantRevokeCommand();
|
package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js
CHANGED
|
@@ -54,7 +54,7 @@ class SpoServicePrincipalPermissionRequestApproveCommand extends SpoCommand_1.de
|
|
|
54
54
|
headers: {
|
|
55
55
|
'X-RequestDigest': res.FormDigestValue
|
|
56
56
|
},
|
|
57
|
-
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" /><ObjectPath Id="18" ObjectPathId="17" /><ObjectPath Id="20" ObjectPathId="19" /><ObjectPath Id="22" ObjectPathId="21" /><Query Id="23" ObjectPathId="21"><Query SelectAllProperties="true"><Properties /></Query></Query></Actions><ObjectPaths><Constructor Id="15" TypeId="{104e8f06-1e00-4675-99c6-1b9b504ed8d8}" /><Property Id="17" ParentId="15" Name="PermissionRequests" /><Method Id="19" ParentId="17" Name="GetById"><Parameters><Parameter Type="Guid">{${utils_1.formatting.escapeXml(args.options.
|
|
57
|
+
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" /><ObjectPath Id="18" ObjectPathId="17" /><ObjectPath Id="20" ObjectPathId="19" /><ObjectPath Id="22" ObjectPathId="21" /><Query Id="23" ObjectPathId="21"><Query SelectAllProperties="true"><Properties /></Query></Query></Actions><ObjectPaths><Constructor Id="15" TypeId="{104e8f06-1e00-4675-99c6-1b9b504ed8d8}" /><Property Id="17" ParentId="15" Name="PermissionRequests" /><Method Id="19" ParentId="17" Name="GetById"><Parameters><Parameter Type="Guid">{${utils_1.formatting.escapeXml(args.options.id)}}</Parameter></Parameters></Method><Method Id="21" ParentId="19" Name="Approve" /></ObjectPaths></Request>`
|
|
58
58
|
};
|
|
59
59
|
return request_1.default.post(requestOptions);
|
|
60
60
|
})
|
|
@@ -76,12 +76,12 @@ class SpoServicePrincipalPermissionRequestApproveCommand extends SpoCommand_1.de
|
|
|
76
76
|
}
|
|
77
77
|
_SpoServicePrincipalPermissionRequestApproveCommand_instances = new WeakSet(), _SpoServicePrincipalPermissionRequestApproveCommand_initOptions = function _SpoServicePrincipalPermissionRequestApproveCommand_initOptions() {
|
|
78
78
|
this.options.unshift({
|
|
79
|
-
option: '-i, --
|
|
79
|
+
option: '-i, --id <id>'
|
|
80
80
|
});
|
|
81
81
|
}, _SpoServicePrincipalPermissionRequestApproveCommand_initValidators = function _SpoServicePrincipalPermissionRequestApproveCommand_initValidators() {
|
|
82
82
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
83
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
84
|
-
return `${args.options.
|
|
83
|
+
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
84
|
+
return `${args.options.id} is not a valid GUID`;
|
|
85
85
|
}
|
|
86
86
|
return true;
|
|
87
87
|
}));
|