@pnp/cli-microsoft365 6.0.0-beta.da01a44 → 6.0.0-beta.da9cd2c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +4 -2
- package/dist/Command.js +16 -2
- package/dist/m365/aad/commands/app/app-add.js +40 -17
- package/dist/m365/aad/commands/app/app-list.js +38 -0
- package/dist/m365/aad/commands/user/user-get.js +1 -0
- package/dist/m365/aad/commands/user/user-guest-add.js +103 -0
- package/dist/m365/aad/commands.js +2 -0
- package/dist/m365/adaptivecard/commands/adaptivecard-send.js +4 -4
- package/dist/m365/base/SpoCommand.js +12 -11
- package/dist/m365/commands/status.js +6 -1
- package/dist/m365/outlook/commands/mail/mail-send.js +55 -31
- package/dist/m365/outlook/commands/message/message-get.js +97 -0
- package/dist/m365/outlook/commands.js +1 -0
- package/dist/m365/planner/commands/bucket/bucket-get.js +5 -8
- package/dist/m365/planner/commands/plan/plan-get.js +11 -31
- package/dist/m365/pp/commands/Environment.js +3 -0
- package/dist/m365/pp/commands/card/card-clone.js +122 -0
- package/dist/m365/pp/commands/card/card-get.js +110 -0
- package/dist/m365/pp/commands/card/card-list.js +68 -0
- package/dist/m365/pp/commands/card/card-remove.js +130 -0
- package/dist/m365/pp/commands/dataverse/dataverse-table-get.js +77 -0
- package/dist/m365/pp/commands/dataverse/dataverse-table-list.js +6 -12
- package/dist/m365/pp/commands/environment/environment-get.js +75 -0
- package/dist/m365/pp/commands/gateway/gateway-get.js +70 -0
- package/dist/m365/pp/commands/solution/solution-get.js +117 -0
- package/dist/m365/pp/commands/solution/solution-publisher-get.js +107 -0
- package/dist/m365/pp/commands/solution/solution-publisher-list.js +78 -0
- package/dist/m365/pp/commands/solution/solution-publisher-remove.js +130 -0
- package/dist/m365/pp/commands/solution/solution-remove.js +130 -0
- package/dist/m365/pp/commands.js +12 -0
- package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.16.0-beta.1.js → doctor-1.16.0-rc.0.js} +6 -6
- package/dist/m365/spfx/commands/project/project-doctor.js +5 -2
- package/dist/m365/spfx/commands/project/project-externalize.js +4 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010001_YORC_version.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010002_YORC_isCreatingSolution.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010003_YORC_packageManager.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010004_YORC_componentType.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010005_YORC_environment.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010006_YORC_framework.js +3 -2
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010007_YORC_isDomainIsolated.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010008_YORC_nodeVersion.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010009_YORC_sdkVersions_microsoft_graph_client.js +56 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010010_YORC_sdkVersions_teams_js.js +56 -0
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.16.0-beta.1.js → upgrade-1.16.0-rc.0.js} +44 -28
- package/dist/m365/spfx/commands/project/project-upgrade.js +5 -2
- package/dist/m365/spfx/commands/spfx-doctor.js +6 -6
- package/dist/m365/spo/commands/contenttype/contenttype-add.js +82 -43
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +53 -21
- package/dist/m365/spo/commands/contenttype/contenttype-get.js +35 -14
- package/dist/m365/spo/commands/field/field-add.js +26 -1
- package/dist/m365/spo/commands/field/field-set.js +23 -13
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +1 -15
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +129 -0
- package/dist/m365/spo/commands/file/file-version-list.js +96 -0
- package/dist/m365/spo/commands/folder/folder-list.js +35 -12
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +215 -0
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +168 -0
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +11 -1
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +12 -1
- package/dist/m365/spo/commands/hubsite/hubsite-connect.js +93 -18
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +69 -13
- package/dist/m365/spo/commands/list/list-contenttype-add.js +21 -18
- package/dist/m365/spo/commands/list/list-contenttype-default-set.js +59 -47
- package/dist/m365/spo/commands/list/list-contenttype-list.js +16 -8
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +16 -8
- package/dist/m365/spo/commands/list/list-roleassignment-add.js +5 -23
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +4 -15
- package/dist/m365/spo/commands/list/list-roleinheritance-break.js +14 -6
- package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +14 -6
- package/dist/m365/spo/commands/list/list-set.js +31 -8
- package/dist/m365/spo/commands/list/list-view-field-add.js +19 -5
- package/dist/m365/spo/commands/list/list-view-field-remove.js +18 -4
- package/dist/m365/spo/commands/list/list-view-field-set.js +18 -4
- package/dist/m365/spo/commands/list/list-view-list.js +14 -10
- package/dist/m365/spo/commands/list/list-view-remove.js +17 -8
- package/dist/m365/spo/commands/list/list-view-set.js +19 -7
- package/dist/m365/spo/commands/list/list-webhook-add.js +19 -11
- package/dist/m365/spo/commands/list/list-webhook-get.js +17 -10
- package/dist/m365/spo/commands/list/list-webhook-list.js +17 -42
- package/dist/m365/spo/commands/list/list-webhook-remove.js +19 -11
- package/dist/m365/spo/commands/list/list-webhook-set.js +27 -20
- package/dist/m365/spo/commands/listitem/listitem-add.js +24 -14
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +18 -8
- package/dist/m365/spo/commands/listitem/listitem-get.js +18 -8
- package/dist/m365/spo/commands/listitem/listitem-isrecord.js +20 -10
- package/dist/m365/spo/commands/listitem/listitem-list.js +21 -14
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +19 -12
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +24 -21
- package/dist/m365/spo/commands/listitem/listitem-remove.js +19 -11
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +239 -0
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +4 -15
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +13 -5
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +13 -5
- package/dist/m365/spo/commands/listitem/listitem-set.js +52 -44
- package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +4 -7
- package/dist/m365/spo/commands/roledefinition/roledefinition-list.js +15 -2
- package/dist/m365/spo/commands/site/site-add.js +4 -11
- package/dist/m365/spo/commands/site/site-hubsite-connect.js +75 -0
- package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +93 -0
- package/dist/m365/spo/commands/{hubsite/hubsite-theme-sync.js → site/site-hubsite-theme-sync.js} +11 -11
- package/dist/m365/spo/commands/sitedesign/sitedesign-get.js +4 -7
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +4 -15
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +4 -8
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +100 -0
- package/dist/m365/spo/commands.js +9 -1
- package/dist/m365/teams/commands/Meeting.js +3 -0
- package/dist/m365/teams/commands/channel/channel-add.js +9 -9
- package/dist/m365/teams/commands/channel/channel-get.js +2 -2
- package/dist/m365/teams/commands/channel/channel-remove.js +56 -39
- package/dist/m365/teams/commands/channel/channel-set.js +57 -19
- package/dist/m365/teams/commands/meeting/meeting-list.js +153 -0
- package/dist/m365/teams/commands/team/team-archive.js +4 -7
- package/dist/m365/teams/commands/team/team-remove.js +3 -3
- package/dist/m365/teams/commands/team/team-set.js +0 -7
- package/dist/m365/teams/commands/team/team-unarchive.js +3 -3
- package/dist/m365/teams/commands.js +1 -0
- package/dist/m365/todo/commands/list/list-get.js +89 -0
- package/dist/m365/todo/commands/task/task-add.js +55 -3
- package/dist/m365/todo/commands/task/task-get.js +108 -0
- package/dist/m365/todo/commands/task/task-set.js +53 -1
- package/dist/m365/todo/commands.js +2 -0
- package/dist/utils/md.js +8 -1
- package/docs/docs/_clisettings.md +18 -0
- package/docs/docs/cmd/aad/app/app-add.md +19 -19
- package/docs/docs/cmd/aad/app/app-list.md +149 -0
- package/docs/docs/cmd/aad/user/user-guest-add.md +107 -0
- package/docs/docs/cmd/adaptivecard/adaptivecard-send.md +12 -5
- package/docs/docs/cmd/app/app-get.md +156 -0
- package/docs/docs/cmd/app/app-open.md +20 -0
- package/docs/docs/cmd/app/permission/permission-list.md +43 -0
- package/docs/docs/cmd/booking/business/business-get.md +107 -0
- package/docs/docs/cmd/booking/business/business-list.md +34 -0
- package/docs/docs/cmd/flow/flow-get.md +1 -1
- package/docs/docs/cmd/graph/schemaextension/schemaextension-add.md +4 -11
- package/docs/docs/cmd/graph/schemaextension/schemaextension-set.md +4 -10
- package/docs/docs/cmd/outlook/mail/mail-send.md +13 -0
- package/docs/docs/cmd/outlook/message/message-get.md +48 -0
- package/docs/docs/cmd/pa/app/app-get.md +184 -0
- package/docs/docs/cmd/pa/app/app-list.md +181 -0
- package/docs/docs/cmd/pa/app/app-remove.md +4 -0
- package/docs/docs/cmd/pa/connector/connector-export.md +4 -0
- package/docs/docs/cmd/pa/connector/connector-list.md +89 -0
- package/docs/docs/cmd/pa/environment/environment-get.md +113 -0
- package/docs/docs/cmd/pa/environment/environment-list.md +109 -0
- package/docs/docs/cmd/pa/pcf/pcf-init.md +4 -0
- package/docs/docs/cmd/pa/solution/solution-init.md +5 -0
- package/docs/docs/cmd/pa/solution/solution-reference-add.md +4 -0
- package/docs/docs/cmd/planner/bucket/bucket-add.md +29 -0
- package/docs/docs/cmd/planner/bucket/bucket-get.md +29 -0
- package/docs/docs/cmd/planner/bucket/bucket-list.md +30 -0
- package/docs/docs/cmd/planner/bucket/bucket-remove.md +4 -0
- package/docs/docs/cmd/planner/bucket/bucket-set.md +4 -0
- package/docs/docs/cmd/planner/plan/plan-add.md +123 -0
- package/docs/docs/cmd/planner/plan/plan-get.md +77 -8
- package/docs/docs/cmd/planner/plan/plan-list.md +45 -0
- package/docs/docs/cmd/planner/plan/plan-remove.md +4 -0
- package/docs/docs/cmd/planner/task/task-get.md +0 -3
- package/docs/docs/cmd/pp/card/card-clone.md +77 -0
- package/docs/docs/cmd/pp/card/card-get.md +122 -0
- package/docs/docs/cmd/pp/card/card-list.md +104 -0
- package/docs/docs/cmd/pp/card/card-remove.md +82 -0
- package/docs/docs/cmd/pp/dataverse/dataverse-table-get.md +120 -0
- package/docs/docs/cmd/pp/dataverse/dataverse-table-list.md +85 -0
- package/docs/docs/cmd/pp/environment/environment-get.md +346 -0
- package/docs/docs/cmd/pp/environment/environment-list.md +312 -0
- package/docs/docs/cmd/pp/gateway/gateway-get.md +56 -0
- package/docs/docs/cmd/pp/gateway/gateway-list.md +35 -0
- package/docs/docs/cmd/pp/managementapp/managementapp-add.md +23 -0
- package/docs/docs/cmd/pp/managementapp/managementapp-list.md +27 -0
- package/docs/docs/cmd/pp/solution/solution-get.md +86 -0
- package/docs/docs/cmd/pp/solution/solution-list.md +37 -0
- package/docs/docs/cmd/pp/solution/solution-publisher-get.md +83 -0
- package/docs/docs/cmd/pp/solution/solution-publisher-list.md +71 -0
- package/docs/docs/cmd/pp/solution/solution-publisher-remove.md +58 -0
- package/docs/docs/cmd/pp/solution/solution-remove.md +82 -0
- package/docs/docs/cmd/pp/tenant/tenant-settings-list.md +62 -0
- package/docs/docs/cmd/spfx/project/project-rename.md +1 -14
- package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-add.md +20 -2
- package/docs/docs/cmd/spo/contenttype/contenttype-field-remove.md +22 -4
- package/docs/docs/cmd/spo/contenttype/contenttype-get.md +21 -3
- package/docs/docs/cmd/spo/customaction/customaction-add.md +3 -0
- package/docs/docs/cmd/spo/customaction/customaction-set.md +3 -2
- package/docs/docs/cmd/spo/eventreceiver/eventreceiver-get.md +2 -2
- package/docs/docs/cmd/spo/eventreceiver/eventreceiver-remove.md +2 -2
- package/docs/docs/cmd/spo/field/field-add.md +20 -2
- package/docs/docs/cmd/spo/field/field-set.md +15 -3
- package/docs/docs/cmd/spo/file/file-roleassignment-add.md +9 -9
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.md +3 -3
- package/docs/docs/cmd/spo/file/file-roleinheritance-break.md +54 -0
- package/docs/docs/cmd/spo/file/file-version-list.md +76 -0
- package/docs/docs/cmd/spo/folder/folder-list.md +45 -0
- package/docs/docs/cmd/spo/folder/folder-roleassignment-add.md +59 -0
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.md +57 -0
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.md +6 -0
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.md +6 -0
- package/docs/docs/cmd/spo/hubsite/hubsite-connect.md +36 -14
- package/docs/docs/cmd/spo/hubsite/hubsite-disconnect.md +28 -12
- package/docs/docs/cmd/spo/hubsite/hubsite-register.md +2 -2
- package/docs/docs/cmd/spo/hubsite/hubsite-unregister.md +2 -2
- package/docs/docs/cmd/spo/list/list-contenttype-add.md +15 -6
- package/docs/docs/cmd/spo/list/list-contenttype-default-set.md +16 -7
- package/docs/docs/cmd/spo/list/list-contenttype-list.md +15 -6
- package/docs/docs/cmd/spo/list/list-contenttype-remove.md +16 -7
- package/docs/docs/cmd/spo/list/list-roleassignment-add.md +9 -9
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.md +8 -8
- package/docs/docs/cmd/spo/list/list-roleinheritance-break.md +11 -8
- package/docs/docs/cmd/spo/list/list-roleinheritance-reset.md +16 -7
- package/docs/docs/cmd/spo/list/list-set.md +18 -6
- package/docs/docs/cmd/spo/list/list-view-field-add.md +14 -4
- package/docs/docs/cmd/spo/list/list-view-field-remove.md +11 -2
- package/docs/docs/cmd/spo/list/list-view-field-set.md +18 -2
- package/docs/docs/cmd/spo/list/list-view-list.md +16 -7
- package/docs/docs/cmd/spo/list/list-view-remove.md +12 -3
- package/docs/docs/cmd/spo/list/list-view-set.md +20 -6
- package/docs/docs/cmd/spo/list/list-webhook-add.md +15 -16
- package/docs/docs/cmd/spo/list/list-webhook-get.md +16 -7
- package/docs/docs/cmd/spo/list/list-webhook-list.md +13 -10
- package/docs/docs/cmd/spo/list/list-webhook-remove.md +12 -10
- package/docs/docs/cmd/spo/list/list-webhook-set.md +21 -12
- package/docs/docs/cmd/spo/listitem/listitem-add.md +11 -2
- package/docs/docs/cmd/spo/listitem/listitem-attachment-list.md +11 -2
- package/docs/docs/cmd/spo/listitem/listitem-get.md +11 -2
- package/docs/docs/cmd/spo/listitem/listitem-isrecord.md +12 -2
- package/docs/docs/cmd/spo/listitem/listitem-list.md +17 -8
- package/docs/docs/cmd/spo/listitem/listitem-record-declare.md +7 -4
- package/docs/docs/cmd/spo/listitem/listitem-record-undeclare.md +11 -2
- package/docs/docs/cmd/spo/listitem/listitem-remove.md +11 -2
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-add.md +81 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.md +8 -8
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-break.md +7 -4
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-reset.md +8 -5
- package/docs/docs/cmd/spo/listitem/listitem-set.md +7 -4
- package/docs/docs/cmd/spo/page/page-clientsidewebpart-add.md +14 -19
- package/docs/docs/cmd/spo/page/page-control-set.md +2 -1
- package/docs/docs/cmd/spo/site/site-add.md +0 -3
- package/docs/docs/cmd/spo/site/site-hubsite-connect.md +40 -0
- package/docs/docs/cmd/spo/site/site-hubsite-disconnect.md +42 -0
- package/docs/docs/cmd/spo/{hubsite/hubsite-theme-sync.md → site/site-hubsite-theme-sync.md} +5 -5
- package/docs/docs/cmd/spo/sitedesign/sitedesign-get.md +2 -2
- package/docs/docs/cmd/spo/term/term-add.md +5 -0
- package/docs/docs/cmd/spo/term/term-set-add.md +6 -1
- package/docs/docs/cmd/spo/web/web-roleassignment-add.md +6 -6
- package/docs/docs/cmd/spo/web/web-roleassignment-remove.md +4 -4
- package/docs/docs/cmd/spo/web/web-roleinheritance-break.md +44 -0
- package/docs/docs/cmd/teams/channel/channel-add.md +4 -4
- package/docs/docs/cmd/teams/channel/channel-get.md +7 -7
- package/docs/docs/cmd/teams/channel/channel-remove.md +12 -9
- package/docs/docs/cmd/teams/channel/channel-set.md +13 -6
- package/docs/docs/cmd/teams/meeting/meeting-list.md +149 -0
- package/docs/docs/cmd/teams/message/message-get.md +80 -0
- package/docs/docs/cmd/teams/message/message-list.md +63 -0
- package/docs/docs/cmd/teams/message/message-reply-list.md +63 -0
- package/docs/docs/cmd/teams/messagingsettings/messagingsettings-list.md +31 -0
- package/docs/docs/cmd/teams/messagingsettings/messagingsettings-set.md +4 -0
- package/docs/docs/cmd/teams/report/report-deviceusagedistributionusercounts.md +35 -0
- package/docs/docs/cmd/teams/report/report-deviceusageusercounts.md +36 -0
- package/docs/docs/cmd/teams/report/report-deviceusageuserdetail.md +41 -0
- package/docs/docs/cmd/teams/report/report-directroutingcalls.md +49 -0
- package/docs/docs/cmd/teams/report/report-pstncalls.md +49 -0
- package/docs/docs/cmd/teams/report/report-useractivitycounts.md +39 -0
- package/docs/docs/cmd/teams/report/report-useractivityusercounts.md +33 -0
- package/docs/docs/cmd/teams/report/report-useractivityuserdetail.md +58 -0
- package/docs/docs/cmd/teams/tab/tab-add.md +35 -0
- package/docs/docs/cmd/teams/tab/tab-get.md +35 -0
- package/docs/docs/cmd/teams/tab/tab-list.md +43 -0
- package/docs/docs/cmd/teams/tab/tab-remove.md +4 -0
- package/docs/docs/cmd/teams/team/team-add.md +145 -0
- package/docs/docs/cmd/teams/team/team-archive.md +7 -3
- package/docs/docs/cmd/teams/team/team-clone.md +4 -3
- package/docs/docs/cmd/teams/team/team-get.md +78 -0
- package/docs/docs/cmd/teams/team/team-list.md +30 -0
- package/docs/docs/cmd/teams/team/team-remove.md +7 -3
- package/docs/docs/cmd/teams/team/team-set.md +4 -3
- package/docs/docs/cmd/teams/team/team-unarchive.md +5 -2
- package/docs/docs/cmd/teams/user/user-app-add.md +4 -0
- package/docs/docs/cmd/teams/user/user-app-list.md +40 -0
- package/docs/docs/cmd/teams/user/user-app-remove.md +4 -0
- package/docs/docs/cmd/teams/user/user-list.md +31 -0
- package/docs/docs/cmd/tenant/id/id-get.md +20 -0
- package/docs/docs/cmd/tenant/report/report-activeusercounts.md +35 -0
- package/docs/docs/cmd/tenant/report/report-activeuserdetail.md +49 -0
- package/docs/docs/cmd/tenant/report/report-office365activationcounts.md +32 -0
- package/docs/docs/cmd/tenant/report/report-office365activationsusercounts.md +30 -0
- package/docs/docs/cmd/tenant/report/report-office365activationsuserdetail.md +36 -0
- package/docs/docs/cmd/tenant/report/report-servicesusercounts.md +41 -0
- package/docs/docs/cmd/tenant/security/security-alerts-list.md +105 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-get.md +87 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-list.md +91 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-get.md +62 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-list.md +51 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-get.md +64 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-list.md +52 -0
- package/docs/docs/cmd/todo/list/list-add.md +32 -1
- package/docs/docs/cmd/todo/list/list-get.md +61 -0
- package/docs/docs/cmd/todo/list/list-list.md +31 -0
- package/docs/docs/cmd/todo/list/list-remove.md +10 -6
- package/docs/docs/cmd/todo/list/list-set.md +9 -5
- package/docs/docs/cmd/todo/task/task-add.md +88 -5
- package/docs/docs/cmd/todo/task/task-get.md +75 -0
- package/docs/docs/cmd/todo/task/task-list.md +47 -0
- package/docs/docs/cmd/todo/task/task-remove.md +9 -4
- package/docs/docs/cmd/todo/task/task-set.md +88 -7
- package/docs/docs/cmd/util/accesstoken/accesstoken-get.md +20 -0
- package/docs/docs/cmd/viva/connections/connections-app-create.md +4 -0
- package/package.json +14 -3
package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010010_YORC_sdkVersions_teams_js.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FN010010_YORC_sdkVersions_teams_js = void 0;
|
|
4
|
+
const JsonRule_1 = require("../../JsonRule");
|
|
5
|
+
class FN010010_YORC_sdkVersions_teams_js extends JsonRule_1.JsonRule {
|
|
6
|
+
constructor(version) {
|
|
7
|
+
super();
|
|
8
|
+
this.version = version;
|
|
9
|
+
}
|
|
10
|
+
get id() {
|
|
11
|
+
return 'FN010010';
|
|
12
|
+
}
|
|
13
|
+
get title() {
|
|
14
|
+
return '.yo-rc.json @microsoft/teams-js SDK version';
|
|
15
|
+
}
|
|
16
|
+
get description() {
|
|
17
|
+
return `Update @microsoft/teams-js SDK version in .yo-rc.json`;
|
|
18
|
+
}
|
|
19
|
+
get resolution() {
|
|
20
|
+
return `{
|
|
21
|
+
"@microsoft/generator-sharepoint": {
|
|
22
|
+
"sdkVersions": {
|
|
23
|
+
"@microsoft/teams-js": "${this.version}"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}`;
|
|
27
|
+
}
|
|
28
|
+
get resolutionType() {
|
|
29
|
+
return 'json';
|
|
30
|
+
}
|
|
31
|
+
get severity() {
|
|
32
|
+
return 'Recommended';
|
|
33
|
+
}
|
|
34
|
+
get file() {
|
|
35
|
+
return './.yo-rc.json';
|
|
36
|
+
}
|
|
37
|
+
visit(project, findings) {
|
|
38
|
+
var _a, _b, _c;
|
|
39
|
+
if (!project.yoRcJson) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (((_b = (_a = project.yoRcJson["@microsoft/generator-sharepoint"]) === null || _a === void 0 ? void 0 : _a.sdkVersions) === null || _b === void 0 ? void 0 : _b['@microsoft/teams-js']) !== this.version) {
|
|
43
|
+
let nodePath = '@microsoft/generator-sharepoint';
|
|
44
|
+
if ((_c = project.yoRcJson["@microsoft/generator-sharepoint"]) === null || _c === void 0 ? void 0 : _c.sdkVersions) {
|
|
45
|
+
nodePath += '.sdkVersions';
|
|
46
|
+
if (project.yoRcJson["@microsoft/generator-sharepoint"].sdkVersions['@microsoft/teams-js']) {
|
|
47
|
+
nodePath += '.@microsoft/teams-js';
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const node = this.getAstNodeFromFile(project.yoRcJson, nodePath);
|
|
51
|
+
this.addFindingWithPosition(findings, node);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.FN010010_YORC_sdkVersions_teams_js = FN010010_YORC_sdkVersions_teams_js;
|
|
56
|
+
//# sourceMappingURL=FN010010_YORC_sdkVersions_teams_js.js.map
|
|
@@ -4,6 +4,8 @@ const FN001001_DEP_microsoft_sp_core_library_1 = require("./rules/FN001001_DEP_m
|
|
|
4
4
|
const FN001002_DEP_microsoft_sp_lodash_subset_1 = require("./rules/FN001002_DEP_microsoft_sp_lodash_subset");
|
|
5
5
|
const FN001003_DEP_microsoft_sp_office_ui_fabric_core_1 = require("./rules/FN001003_DEP_microsoft_sp_office_ui_fabric_core");
|
|
6
6
|
const FN001004_DEP_microsoft_sp_webpart_base_1 = require("./rules/FN001004_DEP_microsoft_sp_webpart_base");
|
|
7
|
+
const FN001008_DEP_react_1 = require("./rules/FN001008_DEP_react");
|
|
8
|
+
const FN001009_DEP_react_dom_1 = require("./rules/FN001009_DEP_react_dom");
|
|
7
9
|
const FN001011_DEP_microsoft_sp_dialog_1 = require("./rules/FN001011_DEP_microsoft_sp_dialog");
|
|
8
10
|
const FN001012_DEP_microsoft_sp_application_base_1 = require("./rules/FN001012_DEP_microsoft_sp_application_base");
|
|
9
11
|
const FN001013_DEP_microsoft_decorators_1 = require("./rules/FN001013_DEP_microsoft_decorators");
|
|
@@ -23,39 +25,53 @@ const FN001032_DEP_microsoft_sp_page_context_1 = require("./rules/FN001032_DEP_m
|
|
|
23
25
|
const FN001034_DEP_microsoft_sp_adaptive_card_extension_base_1 = require("./rules/FN001034_DEP_microsoft_sp_adaptive_card_extension_base");
|
|
24
26
|
const FN002001_DEVDEP_microsoft_sp_build_web_1 = require("./rules/FN002001_DEVDEP_microsoft_sp_build_web");
|
|
25
27
|
const FN002002_DEVDEP_microsoft_sp_module_interfaces_1 = require("./rules/FN002002_DEVDEP_microsoft_sp_module_interfaces");
|
|
28
|
+
const FN002015_DEVDEP_types_react_1 = require("./rules/FN002015_DEVDEP_types_react");
|
|
29
|
+
const FN002016_DEVDEP_types_react_dom_1 = require("./rules/FN002016_DEVDEP_types_react_dom");
|
|
26
30
|
const FN002022_DEVDEP_microsoft_eslint_plugin_spfx_1 = require("./rules/FN002022_DEVDEP_microsoft_eslint_plugin_spfx");
|
|
27
31
|
const FN002023_DEVDEP_microsoft_eslint_config_spfx_1 = require("./rules/FN002023_DEVDEP_microsoft_eslint_config_spfx");
|
|
28
32
|
const FN010001_YORC_version_1 = require("./rules/FN010001_YORC_version");
|
|
29
33
|
const FN010008_YORC_nodeVersion_1 = require("./rules/FN010008_YORC_nodeVersion");
|
|
34
|
+
const FN010009_YORC_sdkVersions_microsoft_graph_client_1 = require("./rules/FN010009_YORC_sdkVersions_microsoft_graph_client");
|
|
35
|
+
const FN010010_YORC_sdkVersions_teams_js_1 = require("./rules/FN010010_YORC_sdkVersions_teams_js");
|
|
30
36
|
const FN021003_PKG_engines_node_1 = require("./rules/FN021003_PKG_engines_node");
|
|
37
|
+
const FN022001_SCSS_remove_fabric_react_1 = require("./rules/FN022001_SCSS_remove_fabric_react");
|
|
38
|
+
const FN022002_SCSS_add_fabric_react_1 = require("./rules/FN022002_SCSS_add_fabric_react");
|
|
31
39
|
module.exports = [
|
|
32
|
-
new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.16.0-
|
|
33
|
-
new
|
|
34
|
-
new
|
|
35
|
-
new
|
|
36
|
-
new
|
|
37
|
-
new
|
|
38
|
-
new
|
|
39
|
-
new
|
|
40
|
-
new
|
|
41
|
-
new
|
|
42
|
-
new
|
|
43
|
-
new
|
|
44
|
-
new
|
|
45
|
-
new
|
|
46
|
-
new
|
|
47
|
-
new
|
|
48
|
-
new
|
|
49
|
-
new
|
|
50
|
-
new
|
|
51
|
-
new
|
|
52
|
-
new
|
|
53
|
-
new
|
|
54
|
-
new
|
|
55
|
-
new
|
|
56
|
-
new
|
|
57
|
-
new
|
|
40
|
+
new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.16.0-rc.0'),
|
|
41
|
+
new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.16.0-rc.0'),
|
|
42
|
+
new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.16.0-rc.0'),
|
|
43
|
+
new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.16.0-rc.0'),
|
|
44
|
+
new FN001008_DEP_react_1.FN001008_DEP_react('17.0.1'),
|
|
45
|
+
new FN001009_DEP_react_dom_1.FN001009_DEP_react_dom('17.0.1'),
|
|
46
|
+
new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.16.0-rc.0'),
|
|
47
|
+
new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.16.0-rc.0'),
|
|
48
|
+
new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.16.0-rc.0'),
|
|
49
|
+
new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.16.0-rc.0'),
|
|
50
|
+
new FN001022_DEP_office_ui_fabric_react_1.FN001022_DEP_office_ui_fabric_react('7.199.1'),
|
|
51
|
+
new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.16.0-rc.0'),
|
|
52
|
+
new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.16.0-rc.0'),
|
|
53
|
+
new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.16.0-rc.0'),
|
|
54
|
+
new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.16.0-rc.0'),
|
|
55
|
+
new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.16.0-rc.0'),
|
|
56
|
+
new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.16.0-rc.0'),
|
|
57
|
+
new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.16.0-rc.0'),
|
|
58
|
+
new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.16.0-rc.0'),
|
|
59
|
+
new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.16.0-rc.0'),
|
|
60
|
+
new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.16.0-rc.0'),
|
|
61
|
+
new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.16.0-rc.0'),
|
|
62
|
+
new FN001034_DEP_microsoft_sp_adaptive_card_extension_base_1.FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.16.0-rc.0'),
|
|
63
|
+
new FN002022_DEVDEP_microsoft_eslint_plugin_spfx_1.FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.16.0-rc.0'),
|
|
64
|
+
new FN002023_DEVDEP_microsoft_eslint_config_spfx_1.FN002023_DEVDEP_microsoft_eslint_config_spfx('1.16.0-rc.0'),
|
|
65
|
+
new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.16.0-rc.0'),
|
|
66
|
+
new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.16.0-rc.0'),
|
|
67
|
+
new FN002015_DEVDEP_types_react_1.FN002015_DEVDEP_types_react('17.0.45'),
|
|
68
|
+
new FN002016_DEVDEP_types_react_dom_1.FN002016_DEVDEP_types_react_dom('17.0.17'),
|
|
69
|
+
new FN010001_YORC_version_1.FN010001_YORC_version('1.16.0-rc.0'),
|
|
58
70
|
new FN010008_YORC_nodeVersion_1.FN010008_YORC_nodeVersion(),
|
|
59
|
-
new
|
|
71
|
+
new FN010009_YORC_sdkVersions_microsoft_graph_client_1.FN010009_YORC_sdkVersions_microsoft_graph_client('3.0.2'),
|
|
72
|
+
new FN010010_YORC_sdkVersions_teams_js_1.FN010010_YORC_sdkVersions_teams_js('2.4.1'),
|
|
73
|
+
new FN021003_PKG_engines_node_1.FN021003_PKG_engines_node('>=16.13.0 <17.0.0'),
|
|
74
|
+
new FN022001_SCSS_remove_fabric_react_1.FN022001_SCSS_remove_fabric_react('~office-ui-fabric-react/dist/sass/References.scss'),
|
|
75
|
+
new FN022002_SCSS_add_fabric_react_1.FN022002_SCSS_add_fabric_react('~@fluentui/react/dist/sass/References.scss')
|
|
60
76
|
];
|
|
61
|
-
//# sourceMappingURL=upgrade-1.16.0-
|
|
77
|
+
//# sourceMappingURL=upgrade-1.16.0-rc.0.js.map
|
|
@@ -66,7 +66,7 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
|
|
|
66
66
|
'1.14.0',
|
|
67
67
|
'1.15.0',
|
|
68
68
|
'1.15.2',
|
|
69
|
-
'1.16.0-
|
|
69
|
+
'1.16.0-rc.0'
|
|
70
70
|
];
|
|
71
71
|
__classPrivateFieldGet(this, _SpfxProjectUpgradeCommand_instances, "m", _SpfxProjectUpgradeCommand_initTelemetry).call(this);
|
|
72
72
|
__classPrivateFieldGet(this, _SpfxProjectUpgradeCommand_instances, "m", _SpfxProjectUpgradeCommand_initOptions).call(this);
|
|
@@ -78,6 +78,9 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
|
|
|
78
78
|
get description() {
|
|
79
79
|
return 'Upgrades SharePoint Framework project to the specified version';
|
|
80
80
|
}
|
|
81
|
+
get allowedOutputs() {
|
|
82
|
+
return ['json', 'text', 'md', 'tour'];
|
|
83
|
+
}
|
|
81
84
|
commandAction(logger, args) {
|
|
82
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
83
86
|
this.projectRootPath = this.getProjectRoot(process.cwd());
|
|
@@ -494,7 +497,7 @@ _SpfxProjectUpgradeCommand_instances = new WeakSet(), _SpfxProjectUpgradeCommand
|
|
|
494
497
|
});
|
|
495
498
|
this.options.forEach(o => {
|
|
496
499
|
if (o.option.indexOf('--output') > -1) {
|
|
497
|
-
o.autocomplete =
|
|
500
|
+
o.autocomplete = this.allowedOutputs;
|
|
498
501
|
}
|
|
499
502
|
});
|
|
500
503
|
}, _SpfxProjectUpgradeCommand_initValidators = function _SpfxProjectUpgradeCommand_initValidators() {
|
|
@@ -429,14 +429,14 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
429
429
|
fix: 'npm i -g yo@4'
|
|
430
430
|
}
|
|
431
431
|
},
|
|
432
|
-
'1.16.0-
|
|
432
|
+
'1.16.0-rc.0': {
|
|
433
433
|
gulpCli: {
|
|
434
434
|
range: '^1 || ^2',
|
|
435
435
|
fix: 'npm i -g gulp-cli@2'
|
|
436
436
|
},
|
|
437
437
|
node: {
|
|
438
|
-
range: '
|
|
439
|
-
fix: 'Install Node.js
|
|
438
|
+
range: '>=16.13.0 <17.0.0',
|
|
439
|
+
fix: 'Install Node.js >=16.13.0 <17.0.0'
|
|
440
440
|
},
|
|
441
441
|
sp: SharePointVersion.SPO,
|
|
442
442
|
yo: {
|
|
@@ -449,6 +449,9 @@ class SpfxDoctorCommand extends AnonymousCommand_1.default {
|
|
|
449
449
|
__classPrivateFieldGet(this, _SpfxDoctorCommand_instances, "m", _SpfxDoctorCommand_initOptions).call(this);
|
|
450
450
|
__classPrivateFieldGet(this, _SpfxDoctorCommand_instances, "m", _SpfxDoctorCommand_initValidators).call(this);
|
|
451
451
|
}
|
|
452
|
+
get allowedOutputs() {
|
|
453
|
+
return ['text'];
|
|
454
|
+
}
|
|
452
455
|
get name() {
|
|
453
456
|
return commands_1.default.DOCTOR;
|
|
454
457
|
}
|
|
@@ -758,9 +761,6 @@ _SpfxDoctorCommand_instances = new WeakSet(), _SpfxDoctorCommand_initTelemetry =
|
|
|
758
761
|
return `${args.options.spfxVersion} is not a supported SharePoint Framework version. Supported versions are ${Object.keys(this.versions).join(', ')}`;
|
|
759
762
|
}
|
|
760
763
|
}
|
|
761
|
-
if (args.options.output && args.options.output !== 'text') {
|
|
762
|
-
return `The output option only accepts the type 'text'`;
|
|
763
|
-
}
|
|
764
764
|
return true;
|
|
765
765
|
}));
|
|
766
766
|
};
|
|
@@ -20,6 +20,7 @@ const config_1 = require("../../../../config");
|
|
|
20
20
|
const request_1 = require("../../../../request");
|
|
21
21
|
const formatting_1 = require("../../../../utils/formatting");
|
|
22
22
|
const spo_1 = require("../../../../utils/spo");
|
|
23
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
23
24
|
const validation_1 = require("../../../../utils/validation");
|
|
24
25
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
25
26
|
const commands_1 = require("../../commands");
|
|
@@ -42,7 +43,13 @@ class SpoContentTypeAddCommand extends SpoCommand_1.default {
|
|
|
42
43
|
commandAction(logger, args) {
|
|
43
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
45
|
try {
|
|
45
|
-
|
|
46
|
+
let parentInfo = '';
|
|
47
|
+
if (!args.options.listId && !args.options.listTitle && !args.options.listUrl) {
|
|
48
|
+
parentInfo = '<Property Id="5" ParentId="3" Name="Web" /><StaticProperty Id="3" TypeId="{3747adcd-a3c3-41b9-bfab-4a64dd2f1e0a}" Name="Current" />';
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
parentInfo = yield this.getParentInfo(args.options, logger);
|
|
52
|
+
}
|
|
46
53
|
if (this.verbose) {
|
|
47
54
|
logger.logToStderr(`Retrieving request digest...`);
|
|
48
55
|
}
|
|
@@ -69,6 +76,8 @@ class SpoContentTypeAddCommand extends SpoCommand_1.default {
|
|
|
69
76
|
const options = {
|
|
70
77
|
webUrl: args.options.webUrl,
|
|
71
78
|
listTitle: args.options.listTitle,
|
|
79
|
+
listUrl: args.options.listUrl,
|
|
80
|
+
listId: args.options.listId,
|
|
72
81
|
id: args.options.id,
|
|
73
82
|
output: 'json',
|
|
74
83
|
debug: this.debug,
|
|
@@ -90,60 +99,79 @@ class SpoContentTypeAddCommand extends SpoCommand_1.default {
|
|
|
90
99
|
}
|
|
91
100
|
});
|
|
92
101
|
}
|
|
93
|
-
getParentInfo(
|
|
94
|
-
return
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
102
|
+
getParentInfo(options, logger) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
const siteId = yield this.getSiteId(options.webUrl, logger);
|
|
105
|
+
const webId = yield this.getWebId(options.webUrl, logger);
|
|
106
|
+
const listId = yield this.getListId(options, logger);
|
|
107
|
+
return `<Identity Id="5" Name="1a48869e-c092-0000-1f61-81ec89809537|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:${siteId}:web:${webId}:list:${listId}" />`;
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
getSiteId(webUrl, logger) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
if (this.verbose) {
|
|
113
|
+
logger.logToStderr(`Retrieving site collection id...`);
|
|
98
114
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
const requestOptions = {
|
|
116
|
+
url: `${webUrl}/_api/site?$select=Id`,
|
|
117
|
+
headers: {
|
|
118
|
+
accept: 'application/json;odata=nometadata'
|
|
119
|
+
},
|
|
120
|
+
responseType: 'json'
|
|
121
|
+
};
|
|
122
|
+
const siteResponse = yield request_1.default.get(requestOptions);
|
|
123
|
+
return siteResponse.Id;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
getWebId(webUrl, logger) {
|
|
127
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
+
if (this.verbose) {
|
|
129
|
+
logger.logToStderr(`Retrieving web id...`);
|
|
130
|
+
}
|
|
131
|
+
const requestOptions = {
|
|
132
|
+
url: `${webUrl}/_api/web?$select=Id`,
|
|
133
|
+
headers: {
|
|
134
|
+
accept: 'application/json;odata=nometadata'
|
|
135
|
+
},
|
|
136
|
+
responseType: 'json'
|
|
137
|
+
};
|
|
138
|
+
const webResponse = yield request_1.default.get(requestOptions);
|
|
139
|
+
return webResponse.Id;
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
getListId(options, logger) {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
if (this.verbose) {
|
|
145
|
+
logger.logToStderr(`Retrieving list id...`);
|
|
146
|
+
}
|
|
147
|
+
let listId = '';
|
|
148
|
+
if (options.listId) {
|
|
149
|
+
return options.listId;
|
|
150
|
+
}
|
|
151
|
+
else if (options.listTitle) {
|
|
119
152
|
const requestOptions = {
|
|
120
|
-
url: `${webUrl}/_api/web?$select=Id`,
|
|
153
|
+
url: `${options.webUrl}/_api/web/lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(options.listTitle)}')?$select=Id`,
|
|
121
154
|
headers: {
|
|
122
155
|
accept: 'application/json;odata=nometadata'
|
|
123
156
|
},
|
|
124
157
|
responseType: 'json'
|
|
125
158
|
};
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
logger.logToStderr(`Retrieving list id...`);
|
|
132
|
-
}
|
|
159
|
+
const listResponse = yield request_1.default.get(requestOptions);
|
|
160
|
+
listId = listResponse.Id;
|
|
161
|
+
}
|
|
162
|
+
else if (options.listUrl) {
|
|
163
|
+
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(options.webUrl, options.listUrl);
|
|
133
164
|
const requestOptions = {
|
|
134
|
-
url: `${webUrl}/_api/web/
|
|
165
|
+
url: `${options.webUrl}/_api/web/GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')?$select=Id`,
|
|
135
166
|
headers: {
|
|
136
167
|
accept: 'application/json;odata=nometadata'
|
|
137
168
|
},
|
|
138
169
|
responseType: 'json'
|
|
139
170
|
};
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}, (error) => {
|
|
145
|
-
reject(error);
|
|
146
|
-
});
|
|
171
|
+
const listResponse = yield request_1.default.get(requestOptions);
|
|
172
|
+
listId = listResponse.Id;
|
|
173
|
+
}
|
|
174
|
+
return listId;
|
|
147
175
|
});
|
|
148
176
|
}
|
|
149
177
|
}
|
|
@@ -160,6 +188,10 @@ _SpoContentTypeAddCommand_instances = new WeakSet(), _SpoContentTypeAddCommand_i
|
|
|
160
188
|
option: '-u, --webUrl <webUrl>'
|
|
161
189
|
}, {
|
|
162
190
|
option: '-l, --listTitle [listTitle]'
|
|
191
|
+
}, {
|
|
192
|
+
option: '--listId [listId]'
|
|
193
|
+
}, {
|
|
194
|
+
option: '--listUrl [listUrl]'
|
|
163
195
|
}, {
|
|
164
196
|
option: '-i, --id <id>'
|
|
165
197
|
}, {
|
|
@@ -170,7 +202,14 @@ _SpoContentTypeAddCommand_instances = new WeakSet(), _SpoContentTypeAddCommand_i
|
|
|
170
202
|
option: '-g, --group [group]'
|
|
171
203
|
});
|
|
172
204
|
}, _SpoContentTypeAddCommand_initValidators = function _SpoContentTypeAddCommand_initValidators() {
|
|
173
|
-
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
205
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
if (args.options.listId) {
|
|
207
|
+
if (!validation_1.validation.isValidGuid(args.options.listId)) {
|
|
208
|
+
return `${args.options.listId} is not a valid GUID`;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return validation_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
212
|
+
}));
|
|
174
213
|
}, _SpoContentTypeAddCommand_initTypes = function _SpoContentTypeAddCommand_initTypes() {
|
|
175
214
|
this.types.string.push('id', 'i');
|
|
176
215
|
};
|
|
@@ -19,6 +19,7 @@ const Cli_1 = require("../../../../cli/Cli");
|
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
20
20
|
const formatting_1 = require("../../../../utils/formatting");
|
|
21
21
|
const spo_1 = require("../../../../utils/spo");
|
|
22
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
22
23
|
const validation_1 = require("../../../../utils/validation");
|
|
23
24
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
24
25
|
const commands_1 = require("../../commands");
|
|
@@ -72,30 +73,25 @@ class SpoContentTypeFieldRemoveCommand extends SpoCommand_1.default {
|
|
|
72
73
|
logger.logToStderr(`WebId: ${webId}`);
|
|
73
74
|
}
|
|
74
75
|
let listId = undefined;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
listId = list.Id;
|
|
87
|
-
if (this.debug) {
|
|
88
|
-
logger.logToStderr(`ListId: ${listId}`);
|
|
89
|
-
}
|
|
76
|
+
if (args.options.listId) {
|
|
77
|
+
listId = args.options.listId;
|
|
78
|
+
}
|
|
79
|
+
else if (args.options.listTitle) {
|
|
80
|
+
listId = yield this.getListIdFromListTitle(args.options.webUrl, args.options.listTitle);
|
|
81
|
+
}
|
|
82
|
+
else if (args.options.listUrl) {
|
|
83
|
+
listId = yield this.getListIdFromListUrl(args.options.webUrl, args.options.listUrl);
|
|
84
|
+
}
|
|
85
|
+
if (this.debug) {
|
|
86
|
+
logger.logToStderr(`ListId: ${listId}`);
|
|
90
87
|
}
|
|
91
88
|
const reqDigest = yield spo_1.spo.getRequestDigest(args.options.webUrl);
|
|
92
89
|
const requestDigest = reqDigest.FormDigestValue;
|
|
93
|
-
const updateChildContentTypes = args.options.listTitle ? false : args.options.updateChildContentTypes === true;
|
|
90
|
+
const updateChildContentTypes = args.options.listTitle || args.options.listId || args.options.listUrl ? false : args.options.updateChildContentTypes === true;
|
|
94
91
|
if (this.debug) {
|
|
95
|
-
const additionalLog = args.options.listTitle ? `; ListTitle='${args.options.listTitle}'` : ` ; UpdateChildContentTypes='${updateChildContentTypes}`;
|
|
92
|
+
const additionalLog = args.options.listTitle ? `; ListTitle='${args.options.listTitle}'` : args.options.listId ? `; ListId='${args.options.listId}'` : args.options.listUrl ? `; ListUrl='${args.options.listUrl}'` : ` ; UpdateChildContentTypes='${updateChildContentTypes}`;
|
|
96
93
|
logger.logToStderr(`Remove FieldLink from ContentType. FieldLinkId='${args.options.fieldLinkId}' ; ContentTypeId='${args.options.contentTypeId}' ${additionalLog}`);
|
|
97
94
|
logger.logToStderr(`Execute ProcessQuery.`);
|
|
98
|
-
logger.logToStderr('');
|
|
99
95
|
}
|
|
100
96
|
let requestBody = '';
|
|
101
97
|
if (listId) {
|
|
@@ -138,13 +134,42 @@ class SpoContentTypeFieldRemoveCommand extends SpoCommand_1.default {
|
|
|
138
134
|
}
|
|
139
135
|
});
|
|
140
136
|
}
|
|
137
|
+
getListIdFromListTitle(webUrl, listTitle) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
const requestOptions = {
|
|
140
|
+
url: `${webUrl}/_api/lists/GetByTitle('${formatting_1.formatting.encodeQueryParameter(listTitle)}')?$select=Id`,
|
|
141
|
+
headers: {
|
|
142
|
+
accept: 'application/json;odata=nometadata'
|
|
143
|
+
},
|
|
144
|
+
responseType: 'json'
|
|
145
|
+
};
|
|
146
|
+
const list = yield request_1.default.get(requestOptions);
|
|
147
|
+
return list.Id;
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
getListIdFromListUrl(webUrl, listUrl) {
|
|
151
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
152
|
+
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(webUrl, listUrl);
|
|
153
|
+
const requestOptions = {
|
|
154
|
+
url: `${webUrl}/_api/web/GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')?$select=Id`,
|
|
155
|
+
headers: {
|
|
156
|
+
accept: 'application/json;odata=nometadata'
|
|
157
|
+
},
|
|
158
|
+
responseType: 'json'
|
|
159
|
+
};
|
|
160
|
+
const list = yield request_1.default.get(requestOptions);
|
|
161
|
+
return list.Id;
|
|
162
|
+
});
|
|
163
|
+
}
|
|
141
164
|
}
|
|
142
165
|
_SpoContentTypeFieldRemoveCommand_instances = new WeakSet(), _SpoContentTypeFieldRemoveCommand_initTelemetry = function _SpoContentTypeFieldRemoveCommand_initTelemetry() {
|
|
143
166
|
this.telemetry.push((args) => {
|
|
144
167
|
Object.assign(this.telemetryProperties, {
|
|
145
|
-
listTitle:
|
|
146
|
-
|
|
147
|
-
|
|
168
|
+
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
169
|
+
listId: typeof args.options.listId !== 'undefined',
|
|
170
|
+
listUrl: typeof args.options.listUrl !== 'undefined',
|
|
171
|
+
updateChildContentTypes: !!args.options.updateChildContentTypes,
|
|
172
|
+
confirm: !!args.options.confirm
|
|
148
173
|
});
|
|
149
174
|
});
|
|
150
175
|
}, _SpoContentTypeFieldRemoveCommand_initOptions = function _SpoContentTypeFieldRemoveCommand_initOptions() {
|
|
@@ -152,6 +177,10 @@ _SpoContentTypeFieldRemoveCommand_instances = new WeakSet(), _SpoContentTypeFiel
|
|
|
152
177
|
option: '-u, --webUrl <webUrl>'
|
|
153
178
|
}, {
|
|
154
179
|
option: '-l, --listTitle [listTitle]'
|
|
180
|
+
}, {
|
|
181
|
+
option: '--listId [listId]'
|
|
182
|
+
}, {
|
|
183
|
+
option: '--listUrl [listUrl]'
|
|
155
184
|
}, {
|
|
156
185
|
option: '-i, --contentTypeId <contentTypeId>'
|
|
157
186
|
}, {
|
|
@@ -166,6 +195,9 @@ _SpoContentTypeFieldRemoveCommand_instances = new WeakSet(), _SpoContentTypeFiel
|
|
|
166
195
|
if (!validation_1.validation.isValidGuid(args.options.fieldLinkId)) {
|
|
167
196
|
return `${args.options.fieldLinkId} is not a valid GUID`;
|
|
168
197
|
}
|
|
198
|
+
if (args.options.listId && !validation_1.validation.isValidGuid(args.options.listId)) {
|
|
199
|
+
return `${args.options.listId} is not a valid GUID`;
|
|
200
|
+
}
|
|
169
201
|
return validation_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
170
202
|
}));
|
|
171
203
|
}, _SpoContentTypeFieldRemoveCommand_initTypes = function _SpoContentTypeFieldRemoveCommand_initTypes() {
|
|
@@ -17,6 +17,7 @@ var _SpoContentTypeGetCommand_instances, _SpoContentTypeGetCommand_initTelemetry
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const formatting_1 = require("../../../../utils/formatting");
|
|
20
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
20
21
|
const validation_1 = require("../../../../utils/validation");
|
|
21
22
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
22
23
|
const commands_1 = require("../../commands");
|
|
@@ -38,21 +39,32 @@ class SpoContentTypeGetCommand extends SpoCommand_1.default {
|
|
|
38
39
|
}
|
|
39
40
|
commandAction(logger, args) {
|
|
40
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
let requestUrl = `${args.options.webUrl}/_api/web`;
|
|
43
|
+
if (args.options.listId) {
|
|
44
|
+
requestUrl += `/lists(guid'${formatting_1.formatting.encodeQueryParameter(args.options.listId)}')`;
|
|
45
|
+
}
|
|
46
|
+
else if (args.options.listTitle) {
|
|
47
|
+
requestUrl += `/lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
48
|
+
}
|
|
49
|
+
else if (args.options.listUrl) {
|
|
50
|
+
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
51
|
+
requestUrl += `/GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')`;
|
|
52
|
+
}
|
|
53
|
+
requestUrl += "/contenttypes";
|
|
54
|
+
if (args.options.id) {
|
|
55
|
+
requestUrl += `('${encodeURIComponent(args.options.id)}')`;
|
|
56
|
+
}
|
|
57
|
+
else if (args.options.name) {
|
|
58
|
+
requestUrl += `?$filter=Name eq '${encodeURIComponent(args.options.name)}'`;
|
|
59
|
+
}
|
|
60
|
+
const requestOptions = {
|
|
61
|
+
url: requestUrl,
|
|
62
|
+
headers: {
|
|
63
|
+
accept: 'application/json;odata=nometadata'
|
|
64
|
+
},
|
|
65
|
+
responseType: 'json'
|
|
66
|
+
};
|
|
41
67
|
try {
|
|
42
|
-
let requestUrl = `${args.options.webUrl}/_api/web/${(args.options.listTitle ? `lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(args.options.listTitle)}')/` : '')}contenttypes`;
|
|
43
|
-
if (args.options.id) {
|
|
44
|
-
requestUrl += `('${encodeURIComponent(args.options.id)}')`;
|
|
45
|
-
}
|
|
46
|
-
else if (args.options.name) {
|
|
47
|
-
requestUrl += `?$filter=Name eq '${encodeURIComponent(args.options.name)}'`;
|
|
48
|
-
}
|
|
49
|
-
const requestOptions = {
|
|
50
|
-
url: requestUrl,
|
|
51
|
-
headers: {
|
|
52
|
-
accept: 'application/json;odata=nometadata'
|
|
53
|
-
},
|
|
54
|
-
responseType: 'json'
|
|
55
|
-
};
|
|
56
68
|
let res = yield request_1.default.get(requestOptions);
|
|
57
69
|
let errorMessage = '';
|
|
58
70
|
if (args.options.name) {
|
|
@@ -80,7 +92,9 @@ class SpoContentTypeGetCommand extends SpoCommand_1.default {
|
|
|
80
92
|
_SpoContentTypeGetCommand_instances = new WeakSet(), _SpoContentTypeGetCommand_initTelemetry = function _SpoContentTypeGetCommand_initTelemetry() {
|
|
81
93
|
this.telemetry.push((args) => {
|
|
82
94
|
Object.assign(this.telemetryProperties, {
|
|
95
|
+
listId: typeof args.options.listId !== 'undefined',
|
|
83
96
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
97
|
+
listUrl: typeof args.options.listUrl !== 'undefined',
|
|
84
98
|
id: typeof args.options.id !== 'undefined',
|
|
85
99
|
name: typeof args.options.name !== 'undefined'
|
|
86
100
|
});
|
|
@@ -90,6 +104,10 @@ _SpoContentTypeGetCommand_instances = new WeakSet(), _SpoContentTypeGetCommand_i
|
|
|
90
104
|
option: '-u, --webUrl <webUrl>'
|
|
91
105
|
}, {
|
|
92
106
|
option: '-l, --listTitle [listTitle]'
|
|
107
|
+
}, {
|
|
108
|
+
option: '--listId [listId]'
|
|
109
|
+
}, {
|
|
110
|
+
option: '--listUrl [listUrl]'
|
|
93
111
|
}, {
|
|
94
112
|
option: '-i, --id [id]'
|
|
95
113
|
}, {
|
|
@@ -101,6 +119,9 @@ _SpoContentTypeGetCommand_instances = new WeakSet(), _SpoContentTypeGetCommand_i
|
|
|
101
119
|
if (isValidSharePointUrl !== true) {
|
|
102
120
|
return isValidSharePointUrl;
|
|
103
121
|
}
|
|
122
|
+
if (args.options.listId && !validation_1.validation.isValidGuid(args.options.listId)) {
|
|
123
|
+
return `${args.options.listId} is not a valid GUID`;
|
|
124
|
+
}
|
|
104
125
|
return true;
|
|
105
126
|
}));
|
|
106
127
|
}, _SpoContentTypeGetCommand_initTypes = function _SpoContentTypeGetCommand_initTypes() {
|