@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,13 +37,13 @@ class SpoListViewFieldSetCommand extends SpoCommand_1.default {
|
|
|
37
37
|
const listSelector = args.options.listId ? `(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
38
38
|
const viewSelector = args.options.viewId ? `('${utils_1.formatting.encodeQueryParameter(args.options.viewId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.viewTitle)}')`;
|
|
39
39
|
if (this.verbose) {
|
|
40
|
-
logger.logToStderr(`Getting field ${args.options.
|
|
40
|
+
logger.logToStderr(`Getting field ${args.options.id || args.options.title}...`);
|
|
41
41
|
}
|
|
42
42
|
this
|
|
43
43
|
.getField(args.options, listSelector)
|
|
44
44
|
.then((field) => {
|
|
45
45
|
if (this.verbose) {
|
|
46
|
-
logger.logToStderr(`Moving the field ${args.options.
|
|
46
|
+
logger.logToStderr(`Moving the field ${args.options.id || args.options.title} in view ${args.options.viewId || args.options.viewTitle} to position ${args.options.position}...`);
|
|
47
47
|
}
|
|
48
48
|
const moveRequestUrl = `${args.options.webUrl}/_api/web/lists${listSelector}/views${viewSelector}/viewfields/moveviewfieldto`;
|
|
49
49
|
const moveRequestOptions = {
|
|
@@ -53,7 +53,7 @@ class SpoListViewFieldSetCommand extends SpoCommand_1.default {
|
|
|
53
53
|
},
|
|
54
54
|
data: {
|
|
55
55
|
field: field.InternalName,
|
|
56
|
-
index: args.options.
|
|
56
|
+
index: args.options.position
|
|
57
57
|
},
|
|
58
58
|
responseType: 'json'
|
|
59
59
|
};
|
|
@@ -62,7 +62,7 @@ class SpoListViewFieldSetCommand extends SpoCommand_1.default {
|
|
|
62
62
|
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
63
63
|
}
|
|
64
64
|
getField(options, listSelector) {
|
|
65
|
-
const fieldSelector = options.
|
|
65
|
+
const fieldSelector = options.id ? `/getbyid('${encodeURIComponent(options.id)}')` : `/getbyinternalnameortitle('${encodeURIComponent(options.title)}')`;
|
|
66
66
|
const getRequestUrl = `${options.webUrl}/_api/web/lists${listSelector}/fields${fieldSelector}`;
|
|
67
67
|
const requestOptions = {
|
|
68
68
|
url: getRequestUrl,
|
|
@@ -81,8 +81,8 @@ _SpoListViewFieldSetCommand_instances = new WeakSet(), _SpoListViewFieldSetComma
|
|
|
81
81
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
82
82
|
viewId: typeof args.options.viewId !== 'undefined',
|
|
83
83
|
viewTitle: typeof args.options.viewTitle !== 'undefined',
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
id: typeof args.options.id !== 'undefined',
|
|
85
|
+
title: typeof args.options.title !== 'undefined'
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
}, _SpoListViewFieldSetCommand_initOptions = function _SpoListViewFieldSetCommand_initOptions() {
|
|
@@ -97,11 +97,11 @@ _SpoListViewFieldSetCommand_instances = new WeakSet(), _SpoListViewFieldSetComma
|
|
|
97
97
|
}, {
|
|
98
98
|
option: '--viewTitle [viewTitle]'
|
|
99
99
|
}, {
|
|
100
|
-
option: '--
|
|
100
|
+
option: '--id [id]'
|
|
101
101
|
}, {
|
|
102
|
-
option: '--
|
|
102
|
+
option: '--title [title]'
|
|
103
103
|
}, {
|
|
104
|
-
option: '--
|
|
104
|
+
option: '--position <position>'
|
|
105
105
|
});
|
|
106
106
|
}, _SpoListViewFieldSetCommand_initValidators = function _SpoListViewFieldSetCommand_initValidators() {
|
|
107
107
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -119,14 +119,14 @@ _SpoListViewFieldSetCommand_instances = new WeakSet(), _SpoListViewFieldSetComma
|
|
|
119
119
|
return `${args.options.viewId} is not a valid GUID`;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
if (args.options.
|
|
123
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
124
|
-
return `${args.options.
|
|
122
|
+
if (args.options.id) {
|
|
123
|
+
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
124
|
+
return `${args.options.id} is not a valid GUID`;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
const position = parseInt(args.options.
|
|
127
|
+
const position = parseInt(args.options.position);
|
|
128
128
|
if (isNaN(position)) {
|
|
129
|
-
return `${args.options.
|
|
129
|
+
return `${args.options.position} is not a number`;
|
|
130
130
|
}
|
|
131
131
|
if (args.options.listId && args.options.listTitle) {
|
|
132
132
|
return 'Specify listId or listTitle, but not both';
|
|
@@ -140,11 +140,11 @@ _SpoListViewFieldSetCommand_instances = new WeakSet(), _SpoListViewFieldSetComma
|
|
|
140
140
|
if (!args.options.viewId && !args.options.viewTitle) {
|
|
141
141
|
return 'Specify viewId or viewTitle, one is required';
|
|
142
142
|
}
|
|
143
|
-
if (args.options.
|
|
144
|
-
return 'Specify
|
|
143
|
+
if (args.options.id && args.options.title) {
|
|
144
|
+
return 'Specify id or title, but not both';
|
|
145
145
|
}
|
|
146
|
-
if (!args.options.
|
|
147
|
-
return 'Specify
|
|
146
|
+
if (!args.options.id && !args.options.title) {
|
|
147
|
+
return 'Specify id or title, one is required';
|
|
148
148
|
}
|
|
149
149
|
return true;
|
|
150
150
|
}));
|
|
@@ -46,7 +46,7 @@ class SpoListViewGetCommand extends SpoCommand_1.default {
|
|
|
46
46
|
const listServerRelativeUrl = utils_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
47
47
|
listRestUrl = `/GetList('${utils_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')`;
|
|
48
48
|
}
|
|
49
|
-
const viewRestUrl = `/views/${(args.options.
|
|
49
|
+
const viewRestUrl = `/views/${(args.options.id ? `getById('${utils_1.formatting.encodeQueryParameter(args.options.id)}')` : `getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.title)}')`)}`;
|
|
50
50
|
const requestOptions = {
|
|
51
51
|
url: `${baseRestUrl}${listRestUrl}${viewRestUrl}`,
|
|
52
52
|
headers: {
|
|
@@ -68,8 +68,8 @@ _SpoListViewGetCommand_instances = new WeakSet(), _SpoListViewGetCommand_initTel
|
|
|
68
68
|
listId: typeof args.options.listId !== 'undefined',
|
|
69
69
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
70
70
|
listUrl: typeof args.options.listUrl !== 'undefined',
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
id: typeof args.options.id !== 'undefined',
|
|
72
|
+
title: typeof args.options.title !== 'undefined'
|
|
73
73
|
});
|
|
74
74
|
});
|
|
75
75
|
}, _SpoListViewGetCommand_initOptions = function _SpoListViewGetCommand_initOptions() {
|
|
@@ -82,9 +82,9 @@ _SpoListViewGetCommand_instances = new WeakSet(), _SpoListViewGetCommand_initTel
|
|
|
82
82
|
}, {
|
|
83
83
|
option: '--listUrl [listUrl]'
|
|
84
84
|
}, {
|
|
85
|
-
option: '--
|
|
85
|
+
option: '--id [id]'
|
|
86
86
|
}, {
|
|
87
|
-
option: '--
|
|
87
|
+
option: '--title [title]'
|
|
88
88
|
});
|
|
89
89
|
}, _SpoListViewGetCommand_initValidators = function _SpoListViewGetCommand_initValidators() {
|
|
90
90
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -99,15 +99,15 @@ _SpoListViewGetCommand_instances = new WeakSet(), _SpoListViewGetCommand_initTel
|
|
|
99
99
|
!utils_1.validation.isValidGuid(args.options.listId)) {
|
|
100
100
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
101
101
|
}
|
|
102
|
-
if (!args.options.
|
|
103
|
-
return `Specify
|
|
102
|
+
if (!args.options.id && !args.options.title) {
|
|
103
|
+
return `Specify id or title`;
|
|
104
104
|
}
|
|
105
|
-
if (args.options.
|
|
106
|
-
return `Specify
|
|
105
|
+
if (args.options.id && args.options.title) {
|
|
106
|
+
return `Specify id or title but not both`;
|
|
107
107
|
}
|
|
108
|
-
if (args.options.
|
|
109
|
-
!utils_1.validation.isValidGuid(args.options.
|
|
110
|
-
return `${args.options.
|
|
108
|
+
if (args.options.id &&
|
|
109
|
+
!utils_1.validation.isValidGuid(args.options.id)) {
|
|
110
|
+
return `${args.options.id} in option id is not a valid GUID`;
|
|
111
111
|
}
|
|
112
112
|
return true;
|
|
113
113
|
}));
|
|
@@ -38,11 +38,11 @@ class SpoListViewRemoveCommand extends SpoCommand_1.default {
|
|
|
38
38
|
const removeViewFromList = () => {
|
|
39
39
|
if (this.verbose) {
|
|
40
40
|
const list = (args.options.listId ? args.options.listId : args.options.listTitle);
|
|
41
|
-
logger.logToStderr(`Removing view ${args.options.
|
|
41
|
+
logger.logToStderr(`Removing view ${args.options.id || args.options.title} from list ${list} in site at ${args.options.webUrl}...`);
|
|
42
42
|
}
|
|
43
43
|
let requestUrl = '';
|
|
44
44
|
const listSelector = args.options.listId ? `(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
45
|
-
const viewSelector = args.options.
|
|
45
|
+
const viewSelector = args.options.id ? `(guid'${utils_1.formatting.encodeQueryParameter(args.options.id)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.title)}')`;
|
|
46
46
|
requestUrl = `${args.options.webUrl}/_api/web/lists${listSelector}/views${viewSelector}`;
|
|
47
47
|
const requestOptions = {
|
|
48
48
|
url: requestUrl,
|
|
@@ -68,7 +68,7 @@ class SpoListViewRemoveCommand extends SpoCommand_1.default {
|
|
|
68
68
|
type: 'confirm',
|
|
69
69
|
name: 'continue',
|
|
70
70
|
default: false,
|
|
71
|
-
message: `Are you sure you want to remove the view ${args.options.
|
|
71
|
+
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}?`
|
|
72
72
|
}, (result) => {
|
|
73
73
|
if (!result.continue) {
|
|
74
74
|
cb();
|
|
@@ -85,8 +85,8 @@ _SpoListViewRemoveCommand_instances = new WeakSet(), _SpoListViewRemoveCommand_i
|
|
|
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
|
confirm: (!(!args.options.confirm)).toString()
|
|
91
91
|
});
|
|
92
92
|
});
|
|
@@ -98,9 +98,9 @@ _SpoListViewRemoveCommand_instances = new WeakSet(), _SpoListViewRemoveCommand_i
|
|
|
98
98
|
}, {
|
|
99
99
|
option: '--listTitle [listTitle]'
|
|
100
100
|
}, {
|
|
101
|
-
option: '--
|
|
101
|
+
option: '--id [id]'
|
|
102
102
|
}, {
|
|
103
|
-
option: '--
|
|
103
|
+
option: '--title [title]'
|
|
104
104
|
}, {
|
|
105
105
|
option: '--confirm'
|
|
106
106
|
});
|
|
@@ -115,9 +115,9 @@ _SpoListViewRemoveCommand_instances = new WeakSet(), _SpoListViewRemoveCommand_i
|
|
|
115
115
|
return `${args.options.listId} is not a valid GUID`;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
if (args.options.
|
|
119
|
-
if (!utils_1.validation.isValidGuid(args.options.
|
|
120
|
-
return `${args.options.
|
|
118
|
+
if (args.options.id) {
|
|
119
|
+
if (!utils_1.validation.isValidGuid(args.options.id)) {
|
|
120
|
+
return `${args.options.id} is not a valid GUID`;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
if (args.options.listId && args.options.listTitle) {
|
|
@@ -126,11 +126,11 @@ _SpoListViewRemoveCommand_instances = new WeakSet(), _SpoListViewRemoveCommand_i
|
|
|
126
126
|
if (!args.options.listId && !args.options.listTitle) {
|
|
127
127
|
return 'Specify listId or listTitle, one is required';
|
|
128
128
|
}
|
|
129
|
-
if (args.options.
|
|
130
|
-
return 'Specify
|
|
129
|
+
if (args.options.id && args.options.title) {
|
|
130
|
+
return 'Specify id or title, but not both';
|
|
131
131
|
}
|
|
132
|
-
if (!args.options.
|
|
133
|
-
return 'Specify
|
|
132
|
+
if (!args.options.id && !args.options.title) {
|
|
133
|
+
return 'Specify id or title, one is required';
|
|
134
134
|
}
|
|
135
135
|
return true;
|
|
136
136
|
}));
|
|
@@ -41,7 +41,7 @@ class SpoListViewSetCommand extends SpoCommand_1.default {
|
|
|
41
41
|
const listRestUrl = args.options.listId ?
|
|
42
42
|
`(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')`
|
|
43
43
|
: `/getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
44
|
-
const viewRestUrl = `/views/${(args.options.
|
|
44
|
+
const viewRestUrl = `/views/${(args.options.id ? `getById('${utils_1.formatting.encodeQueryParameter(args.options.id)}')` : `getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.title)}')`)}`;
|
|
45
45
|
utils_1.spo
|
|
46
46
|
.getRequestDigest(args.options.webUrl)
|
|
47
47
|
.then((res) => {
|
|
@@ -65,8 +65,8 @@ class SpoListViewSetCommand extends SpoCommand_1.default {
|
|
|
65
65
|
'webUrl',
|
|
66
66
|
'listId',
|
|
67
67
|
'listTitle',
|
|
68
|
-
'
|
|
69
|
-
'
|
|
68
|
+
'id',
|
|
69
|
+
'title',
|
|
70
70
|
'debug',
|
|
71
71
|
'verbose',
|
|
72
72
|
'output'
|
|
@@ -84,8 +84,8 @@ _SpoListViewSetCommand_instances = new WeakSet(), _SpoListViewSetCommand_initTel
|
|
|
84
84
|
Object.assign(this.telemetryProperties, {
|
|
85
85
|
listId: typeof args.options.listId !== 'undefined',
|
|
86
86
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
id: typeof args.options.id !== 'undefined',
|
|
88
|
+
title: typeof args.options.title !== 'undefined'
|
|
89
89
|
});
|
|
90
90
|
});
|
|
91
91
|
}, _SpoListViewSetCommand_initOptions = function _SpoListViewSetCommand_initOptions() {
|
|
@@ -96,9 +96,9 @@ _SpoListViewSetCommand_instances = new WeakSet(), _SpoListViewSetCommand_initTel
|
|
|
96
96
|
}, {
|
|
97
97
|
option: '--listTitle [listTitle]'
|
|
98
98
|
}, {
|
|
99
|
-
option: '--
|
|
99
|
+
option: '--id [id]'
|
|
100
100
|
}, {
|
|
101
|
-
option: '--
|
|
101
|
+
option: '--title [title]'
|
|
102
102
|
});
|
|
103
103
|
}, _SpoListViewSetCommand_initValidators = function _SpoListViewSetCommand_initValidators() {
|
|
104
104
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -116,15 +116,15 @@ _SpoListViewSetCommand_instances = new WeakSet(), _SpoListViewSetCommand_initTel
|
|
|
116
116
|
!utils_1.validation.isValidGuid(args.options.listId)) {
|
|
117
117
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
118
118
|
}
|
|
119
|
-
if (!args.options.
|
|
120
|
-
return `Specify
|
|
119
|
+
if (!args.options.id && !args.options.title) {
|
|
120
|
+
return `Specify id or title`;
|
|
121
121
|
}
|
|
122
|
-
if (args.options.
|
|
123
|
-
return `Specify
|
|
122
|
+
if (args.options.id && args.options.title) {
|
|
123
|
+
return `Specify id or title but not both`;
|
|
124
124
|
}
|
|
125
|
-
if (args.options.
|
|
126
|
-
!utils_1.validation.isValidGuid(args.options.
|
|
127
|
-
return `${args.options.
|
|
125
|
+
if (args.options.id &&
|
|
126
|
+
!utils_1.validation.isValidGuid(args.options.id)) {
|
|
127
|
+
return `${args.options.id} in option id is not a valid GUID`;
|
|
128
128
|
}
|
|
129
129
|
return true;
|
|
130
130
|
}));
|
|
@@ -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
|
|
@@ -64,7 +64,7 @@ class SpoListItemRecordDeclareCommand extends SpoCommand_1.default {
|
|
|
64
64
|
})
|
|
65
65
|
.then((res) => {
|
|
66
66
|
listId = res.Id;
|
|
67
|
-
const requestBody = this.getDeclareRecordRequestBody(webIdentity, listId, args.options.
|
|
67
|
+
const requestBody = this.getDeclareRecordRequestBody(webIdentity, listId, args.options.listItemId, args.options.date || '');
|
|
68
68
|
const requestOptions = {
|
|
69
69
|
url: `${args.options.webUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
70
70
|
headers: {
|
|
@@ -115,7 +115,7 @@ _SpoListItemRecordDeclareCommand_instances = new WeakSet(), _SpoListItemRecordDe
|
|
|
115
115
|
}, {
|
|
116
116
|
option: '-t, --listTitle [listTitle]'
|
|
117
117
|
}, {
|
|
118
|
-
option: '-i, --
|
|
118
|
+
option: '-i, --listItemId <listItemId>'
|
|
119
119
|
}, {
|
|
120
120
|
option: '-d, --date [date]'
|
|
121
121
|
});
|
|
@@ -134,9 +134,9 @@ _SpoListItemRecordDeclareCommand_instances = new WeakSet(), _SpoListItemRecordDe
|
|
|
134
134
|
if (args.options.listId && !utils_1.validation.isValidGuid(args.options.listId)) {
|
|
135
135
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
136
136
|
}
|
|
137
|
-
const id = parseInt(args.options.
|
|
137
|
+
const id = parseInt(args.options.listItemId);
|
|
138
138
|
if (isNaN(id)) {
|
|
139
|
-
return `${args.options.
|
|
139
|
+
return `${args.options.listItemId} is not a number`;
|
|
140
140
|
}
|
|
141
141
|
if (id < 1) {
|
|
142
142
|
return `Item ID must be a positive number`;
|
|
@@ -79,7 +79,7 @@ class SpoListItemRecordUndeclareCommand extends SpoCommand_1.default {
|
|
|
79
79
|
'Content-Type': 'text/xml',
|
|
80
80
|
'X-RequestDigest': formDigestValue
|
|
81
81
|
},
|
|
82
|
-
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.
|
|
82
|
+
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>`
|
|
83
83
|
};
|
|
84
84
|
return request_1.default.post(requestOptions);
|
|
85
85
|
})
|
|
@@ -100,7 +100,7 @@ _SpoListItemRecordUndeclareCommand_instances = new WeakSet(), _SpoListItemRecord
|
|
|
100
100
|
this.options.unshift({
|
|
101
101
|
option: '-u, --webUrl <webUrl>'
|
|
102
102
|
}, {
|
|
103
|
-
option: '-i, --
|
|
103
|
+
option: '-i, --listItemId <listItemId>'
|
|
104
104
|
}, {
|
|
105
105
|
option: '-l, --listId [listId]'
|
|
106
106
|
}, {
|
|
@@ -108,9 +108,9 @@ _SpoListItemRecordUndeclareCommand_instances = new WeakSet(), _SpoListItemRecord
|
|
|
108
108
|
});
|
|
109
109
|
}, _SpoListItemRecordUndeclareCommand_initValidators = function _SpoListItemRecordUndeclareCommand_initValidators() {
|
|
110
110
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
111
|
-
const id = parseInt(args.options.
|
|
111
|
+
const id = parseInt(args.options.listItemId);
|
|
112
112
|
if (isNaN(id)) {
|
|
113
|
-
return `${args.options.
|
|
113
|
+
return `${args.options.listItemId} is not a valid list item ID`;
|
|
114
114
|
}
|
|
115
115
|
const isValidSharePointUrl = utils_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
116
116
|
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();
|