@pnp/cli-microsoft365 12.0.0-beta.10c5833 → 12.0.0-beta.235caf5
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/.devproxy/generate-openapi-spec.json +1 -1
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +19 -2
- package/dist/cli/cli.js +3 -0
- package/dist/config.js +1 -0
- package/dist/googleAnalytics.js +96 -0
- package/dist/m365/cli/commands/cli-consent.js +9 -2
- package/dist/m365/entra/commands/agent/agent-blueprint-list.js +52 -0
- package/dist/m365/entra/commands/m365group/m365group-add.js +52 -97
- package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +20 -33
- package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +20 -39
- package/dist/m365/entra/commands/m365group/m365group-get.js +20 -41
- package/dist/m365/entra/commands/m365group/m365group-list.js +11 -31
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-clear.js +8 -22
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +9 -25
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-remove.js +21 -43
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-restore.js +21 -41
- package/dist/m365/entra/commands/m365group/m365group-remove.js +25 -46
- package/dist/m365/entra/commands/m365group/m365group-renew.js +19 -32
- package/dist/m365/entra/commands/m365group/m365group-set.js +86 -141
- package/dist/m365/entra/commands/m365group/m365group-teamify.js +20 -43
- package/dist/m365/entra/commands/m365group/m365group-user-add.js +44 -77
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +28 -55
- package/dist/m365/entra/commands/m365group/m365group-user-remove.js +37 -74
- package/dist/m365/entra/commands/m365group/m365group-user-set.js +45 -77
- package/dist/m365/entra/commands.js +1 -0
- package/dist/m365/graph/commands/schemaextension/schemaextension-list.js +14 -16
- package/dist/m365/outlook/commands/calendargroup/calendargroup-add.js +97 -0
- package/dist/m365/outlook/commands/event/event-add.js +324 -0
- package/dist/m365/outlook/commands.js +2 -0
- package/dist/m365/spe/commands/container/container-permission-add.js +114 -0
- package/dist/m365/spe/commands/container/container-permission-remove.js +94 -0
- package/dist/m365/spe/commands/container/container-permission-set.js +90 -0
- package/dist/m365/spe/commands.js +3 -0
- package/dist/m365/spfx/commands/SpfxCompatibilityMatrix.js +15 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.24.0.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012021_TSC_excludeDirectories.js +43 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN027002_OVERRIDES_qs.js +33 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN027003_OVERRIDES_uuid.js +33 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.24.0.js +77 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +2 -1
- package/dist/m365/spo/commands/app/app-add.js +35 -56
- package/dist/m365/spo/commands/app/app-deploy.js +41 -59
- package/dist/m365/spo/commands/app/app-get.js +40 -56
- package/dist/m365/spo/commands/app/app-install.js +20 -41
- package/dist/m365/spo/commands/app/app-instance-list.js +12 -24
- package/dist/m365/spo/commands/app/app-list.js +26 -44
- package/dist/m365/spo/commands/app/app-remove.js +32 -52
- package/dist/m365/spo/commands/app/app-retract.js +32 -51
- package/dist/m365/spo/commands/app/app-teamspackage-download.js +35 -54
- package/dist/m365/spo/commands/app/app-uninstall.js +21 -44
- package/dist/m365/spo/commands/app/app-upgrade.js +20 -41
- package/dist/m365/spo/commands/commandset/commandset-add.js +17 -59
- package/dist/m365/spo/commands/commandset/commandset-get.js +24 -62
- package/dist/m365/spo/commands/commandset/commandset-list.js +11 -34
- package/dist/m365/spo/commands/commandset/commandset-remove.js +21 -54
- package/dist/m365/spo/commands/commandset/commandset-set.js +30 -83
- package/dist/m365/spo/commands/contenttype/contenttype-add.js +22 -51
- package/dist/m365/spo/commands/contenttype/contenttype-field-list.js +38 -62
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +25 -54
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +20 -43
- package/dist/m365/spo/commands/contenttype/contenttype-get.js +29 -54
- package/dist/m365/spo/commands/contenttype/contenttype-list.js +13 -30
- package/dist/m365/spo/commands/contenttype/contenttype-remove.js +24 -39
- package/dist/m365/spo/commands/contenttype/contenttype-set.js +42 -63
- package/dist/m365/spo/commands/contenttype/contenttype-sync.js +37 -59
- package/dist/m365/spo/commands/contenttypehub/contenttypehub-get.js +5 -0
- package/dist/m365/spo/commands/customaction/customaction-add.js +124 -145
- package/dist/m365/spo/commands/customaction/customaction-clear.js +12 -43
- package/dist/m365/spo/commands/customaction/customaction-get.js +28 -59
- package/dist/m365/spo/commands/customaction/customaction-list.js +12 -42
- package/dist/m365/spo/commands/customaction/customaction-remove.js +26 -54
- package/dist/m365/spo/commands/customaction/customaction-set.js +75 -132
- package/dist/m365/spo/commands/externaluser/externaluser-list.js +5 -14
- package/dist/m365/spo/commands/feature/feature-disable.js +20 -50
- package/dist/m365/spo/commands/feature/feature-enable.js +22 -50
- package/dist/m365/spo/commands/feature/feature-list.js +11 -36
- package/dist/m365/spo/commands/field/field-add.js +33 -62
- package/dist/m365/spo/commands/field/field-get.js +30 -57
- package/dist/m365/spo/commands/field/field-list.js +21 -46
- package/dist/m365/spo/commands/field/field-remove.js +32 -63
- package/dist/m365/spo/commands/field/field-set.js +34 -66
- package/dist/m365/spo/commands/file/file-get.js +4 -3
- package/dist/m365/spo/commands/folder/folder-unarchive.js +90 -0
- package/dist/m365/spo/commands/hubsite/hubsite-connect.js +38 -63
- package/dist/m365/spo/commands/hubsite/hubsite-data-get.js +11 -27
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +25 -47
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +25 -37
- package/dist/m365/spo/commands/hubsite/hubsite-list.js +12 -24
- package/dist/m365/spo/commands/hubsite/hubsite-register.js +10 -18
- package/dist/m365/spo/commands/hubsite/hubsite-rights-grant.js +14 -32
- package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +12 -29
- package/dist/m365/spo/commands/hubsite/hubsite-set.js +19 -46
- package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +11 -27
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-get.js +5 -0
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +8 -22
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +10 -18
- package/dist/m365/spo/commands/listitem/listitem-add.js +27 -55
- package/dist/m365/spo/commands/listitem/listitem-attachment-add.js +30 -58
- package/dist/m365/spo/commands/listitem/listitem-attachment-get.js +27 -52
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +26 -50
- package/dist/m365/spo/commands/listitem/listitem-attachment-remove.js +28 -55
- package/dist/m365/spo/commands/listitem/listitem-attachment-set.js +30 -57
- package/dist/m365/spo/commands/listitem/listitem-batch-add.js +36 -58
- package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +68 -92
- package/dist/m365/spo/commands/listitem/listitem-batch-set.js +37 -57
- package/dist/m365/spo/commands/listitem/listitem-get.js +45 -79
- package/dist/m365/spo/commands/listitem/listitem-isrecord.js +31 -55
- package/dist/m365/spo/commands/listitem/listitem-list.js +47 -81
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +37 -60
- package/dist/m365/spo/commands/listitem/listitem-record-lock.js +30 -52
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +31 -52
- package/dist/m365/spo/commands/listitem/listitem-record-unlock.js +30 -52
- package/dist/m365/spo/commands/listitem/listitem-remove.js +33 -61
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-ensure.js +46 -67
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +33 -56
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +55 -98
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +48 -74
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +33 -56
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +31 -53
- package/dist/m365/spo/commands/listitem/listitem-set.js +33 -58
- package/dist/m365/spo/commands/navigation/navigation-node-add.js +74 -120
- package/dist/m365/spo/commands/navigation/navigation-node-get.js +4 -13
- package/dist/m365/spo/commands/navigation/navigation-node-list.js +7 -5
- package/dist/m365/spo/commands/navigation/navigation-node-remove.js +13 -47
- package/dist/m365/spo/commands/navigation/navigation-node-set.js +53 -114
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.js +1 -1
- package/dist/m365/spo/commands/page/page-column-list.js +7 -8
- package/dist/m365/spo/commands/page/page-section-list.js +15 -17
- package/dist/m365/spo/commands/page/page-unpublish.js +53 -0
- package/dist/m365/spo/commands/sitescript/sitescript-add.js +22 -37
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +9 -26
- package/dist/m365/spo/commands/sitescript/sitescript-list.js +5 -0
- package/dist/m365/spo/commands/sitescript/sitescript-remove.js +9 -33
- package/dist/m365/spo/commands/sitescript/sitescript-set.js +29 -56
- package/dist/m365/spo/commands/spo-search.js +43 -116
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +8 -1
- package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +8 -1
- package/dist/m365/spo/commands/term/term-group-list.js +7 -8
- package/dist/m365/spo/commands/term/term-set-list.js +6 -9
- package/dist/m365/spo/commands.js +3 -1
- package/dist/m365/spp/commands/contentcenter/contentcenter-list.js +5 -0
- package/dist/m365/spp/commands/model/model-get.js +25 -45
- package/dist/m365/spp/commands/model/model-list.js +12 -23
- package/dist/m365/spp/commands/model/model-remove.js +25 -45
- package/dist/m365/teams/commands/app/app-install.js +35 -44
- package/dist/m365/teams/commands/app/app-list.js +8 -33
- package/dist/m365/teams/commands/app/app-publish.js +21 -27
- package/dist/m365/teams/commands/app/app-remove.js +22 -39
- package/dist/m365/teams/commands/app/app-uninstall.js +12 -34
- package/dist/m365/teams/commands/app/app-update.js +35 -45
- package/dist/m365/teams/commands/channel/channel-add.js +46 -57
- package/dist/m365/teams/commands/channel/channel-get.js +41 -48
- package/dist/m365/teams/commands/channel/channel-list.js +28 -42
- package/dist/m365/teams/commands/channel/channel-member-add.js +53 -54
- package/dist/m365/teams/commands/channel/channel-member-list.js +47 -55
- package/dist/m365/teams/commands/channel/channel-member-remove.js +62 -62
- package/dist/m365/teams/commands/channel/channel-member-set.js +61 -65
- package/dist/m365/teams/commands/channel/channel-remove.js +47 -49
- package/dist/m365/teams/commands/channel/channel-set.js +47 -54
- package/dist/m365/teams/commands/chat/chat-get.js +30 -45
- package/dist/m365/teams/commands/chat/chat-list.js +22 -42
- package/dist/m365/teams/commands/chat/chat-member-add.js +43 -64
- package/dist/m365/teams/commands/chat/chat-member-list.js +10 -23
- package/dist/m365/teams/commands/chat/chat-member-remove.js +28 -50
- package/dist/m365/teams/commands/chat/chat-message-send.js +32 -55
- package/dist/m365/teams/commands/funsettings/funsettings-list.js +12 -23
- package/dist/m365/teams/commands/funsettings/funsettings-set.js +18 -54
- package/dist/m365/teams/commands/guestsettings/guestsettings-list.js +12 -23
- package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +15 -40
- package/dist/m365/teams/commands/meeting/meeting-add.js +57 -68
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-get.js +33 -58
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +14 -38
- package/dist/m365/teams/commands/meeting/meeting-get.js +14 -38
- package/dist/m365/teams/commands/meeting/meeting-list.js +34 -59
- package/dist/m365/teams/commands/meeting/meeting-transcript-get.js +34 -58
- package/dist/m365/teams/commands/meeting/meeting-transcript-list.js +29 -50
- package/dist/m365/teams/commands/membersettings/membersettings-list.js +12 -23
- package/dist/m365/teams/commands/membersettings/membersettings-set.js +18 -49
- package/dist/m365/teams/commands/message/message-get.js +19 -30
- package/dist/m365/teams/commands/message/message-list.js +26 -43
- package/dist/m365/teams/commands/message/message-remove.js +43 -58
- package/dist/m365/teams/commands/message/message-reply-list.js +19 -30
- package/dist/m365/teams/commands/message/message-restore.js +40 -50
- package/dist/m365/teams/commands/message/message-send.js +19 -30
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-list.js +12 -23
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +18 -60
- package/dist/m365/teams/commands/report/report-deviceusagedistributionusercounts.js +10 -0
- package/dist/m365/teams/commands/report/report-deviceusageusercounts.js +10 -0
- package/dist/m365/teams/commands/report/report-deviceusageuserdetail.js +22 -0
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +19 -39
- package/dist/m365/teams/commands/report/report-pstncalls.js +19 -39
- package/dist/m365/teams/commands/report/report-useractivitycounts.js +10 -0
- package/dist/m365/teams/commands/report/report-useractivityusercounts.js +10 -0
- package/dist/m365/teams/commands/report/report-useractivityuserdetail.js +22 -0
- package/dist/m365/teams/commands/tab/tab-add.js +23 -49
- package/dist/m365/teams/commands/tab/tab-get.js +55 -56
- package/dist/m365/teams/commands/tab/tab-list.js +17 -28
- package/dist/m365/teams/commands/tab/tab-remove.js +23 -42
- package/dist/m365/teams/commands/team/team-add.js +76 -114
- package/dist/m365/teams/commands/team/team-app-list.js +23 -36
- package/dist/m365/teams/commands/team/team-archive.js +24 -39
- package/dist/m365/teams/commands/team/team-clone.js +28 -62
- package/dist/m365/teams/commands/team/team-get.js +23 -36
- package/dist/m365/teams/commands/team/team-list.js +43 -57
- package/dist/m365/teams/commands/team/team-remove.js +24 -37
- package/dist/m365/teams/commands/team/team-set.js +23 -52
- package/dist/m365/teams/commands/team/team-unarchive.js +23 -28
- package/dist/m365/teams/commands/user/user-app-add.js +40 -49
- package/dist/m365/teams/commands/user/user-app-list.js +26 -39
- package/dist/m365/teams/commands/user/user-app-remove.js +37 -49
- package/dist/m365/teams/commands/user/user-app-upgrade.js +36 -52
- package/dist/m365/teams/commands/user/user-list.js +17 -39
- package/dist/m365/tenant/commands/report/report-activeusercounts.js +2 -1
- package/dist/m365/tenant/commands/report/report-activeuserdetail.js +2 -1
- package/dist/m365/tenant/commands/report/report-office365activationcounts.js +9 -0
- package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +9 -0
- package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +9 -0
- package/dist/m365/tenant/commands/report/report-servicesusercounts.js +2 -1
- package/dist/m365/tenant/commands/report/report-settings-get.js +5 -0
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.js +9 -20
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-list.js +8 -20
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-get.js +8 -15
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-list.js +8 -15
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-get.js +12 -26
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-list.js +8 -22
- package/dist/m365/util/commands/accesstoken/accesstoken-get.js +10 -28
- package/dist/telemetry.js +7 -11
- package/dist/utils/calendar.js +1 -1
- package/dist/utils/formatting.js +16 -0
- package/dist/utils/pid.js +7 -16
- package/dist/utils/spe.js +1 -1
- package/dist/utils/spo.js +40 -3
- package/dist/utils/urlUtil.js +2 -2
- package/dist/utils/validation.js +24 -0
- package/dist/utils/zod.js +17 -7
- package/docs/docs/cmd/entra/agent/agent-blueprint-list.mdx +175 -0
- package/docs/docs/cmd/login.mdx +15 -2
- package/docs/docs/cmd/outlook/calendargroup/calendargroup-add.mdx +126 -0
- package/docs/docs/cmd/outlook/event/event-add.mdx +390 -0
- package/docs/docs/cmd/spe/container/container-add.mdx +0 -8
- package/docs/docs/cmd/spe/container/container-list.mdx +0 -8
- package/docs/docs/cmd/spe/container/container-permission-add.mdx +140 -0
- package/docs/docs/cmd/spe/container/container-permission-remove.mdx +78 -0
- package/docs/docs/cmd/spe/container/container-permission-set.mdx +78 -0
- package/docs/docs/cmd/spe/container/container-recyclebinitem-list.mdx +0 -8
- package/docs/docs/cmd/spe/container/container-recyclebinitem-restore.mdx +0 -8
- package/docs/docs/cmd/spe/container/container-remove.mdx +0 -8
- package/docs/docs/cmd/spe/containertype/containertype-add.mdx +1 -1
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/externaluser/externaluser-list.mdx +17 -30
- package/docs/docs/cmd/spo/file/file-archive.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkin.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-checkout-undo.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkout.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-copy.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-get.mdx +6 -6
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-retentionlabel-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-break.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-roleinheritance-reset.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-sharinginfo-get.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-sharinglink-add.mdx +22 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-clear.mdx +24 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-get.mdx +22 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-list.mdx +22 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-remove.mdx +24 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-set.mdx +22 -1
- package/docs/docs/cmd/spo/file/file-unarchive.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-clear.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-keep.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-restore.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-archive.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-copy.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-get.mdx +2 -2
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-sharinglink-add.mdx +22 -1
- package/docs/docs/cmd/spo/folder/folder-sharinglink-clear.mdx +23 -0
- package/docs/docs/cmd/spo/folder/folder-sharinglink-get.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-sharinglink-list.mdx +22 -1
- package/docs/docs/cmd/spo/folder/folder-sharinglink-remove.mdx +24 -1
- package/docs/docs/cmd/spo/folder/folder-sharinglink-set.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-unarchive.mdx +76 -0
- package/docs/docs/cmd/spo/listitem/listitem-get.mdx +0 -6
- package/docs/docs/cmd/spo/navigation/navigation-node-add.mdx +45 -30
- package/docs/docs/cmd/spo/navigation/navigation-node-get.mdx +64 -42
- package/docs/docs/cmd/spo/navigation/navigation-node-list.mdx +37 -27
- package/docs/docs/cmd/spo/navigation/navigation-node-set.mdx +10 -8
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.mdx +0 -21
- package/docs/docs/cmd/spo/page/page-unpublish.mdx +63 -0
- package/docs/docs/cmd/spp/model/model-get.mdx +1 -1
- package/docs/docs/cmd/spp/model/model-remove.mdx +1 -1
- package/docs/docs/cmd/teams/tab/tab-add.mdx +19 -0
- package/docs/docs/cmd/teams/tab/tab-get.mdx +19 -0
- package/docs/docs/cmd/teams/tab/tab-list.mdx +19 -0
- package/docs/docs/cmd/teams/tab/tab-remove.mdx +21 -0
- package/docs/docs/cmd/viva/engage/engage-message-add.mdx +17 -0
- package/docs/docs/cmd/viva/engage/engage-message-get.mdx +17 -0
- package/docs/docs/cmd/viva/engage/engage-message-list.mdx +17 -0
- package/docs/docs/cmd/viva/engage/engage-message-remove.mdx +19 -0
- package/npm-shrinkwrap.json +702 -3230
- package/package.json +21 -38
- package/dist/appInsights.js +0 -43
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
|
+
import request from '../../../../request.js';
|
|
4
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
5
|
+
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
6
|
+
import { validation } from '../../../../utils/validation.js';
|
|
7
|
+
import SpoCommand from '../../../base/SpoCommand.js';
|
|
8
|
+
import commands from '../../commands.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
webUrl: z.string()
|
|
12
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
13
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
14
|
+
})
|
|
15
|
+
.alias('u'),
|
|
16
|
+
name: z.string().alias('n')
|
|
17
|
+
});
|
|
18
|
+
class SpoPageUnpublishCommand extends SpoCommand {
|
|
19
|
+
get name() {
|
|
20
|
+
return commands.PAGE_UNPUBLISH;
|
|
21
|
+
}
|
|
22
|
+
get description() {
|
|
23
|
+
return 'Unpublishes a modern page';
|
|
24
|
+
}
|
|
25
|
+
get schema() {
|
|
26
|
+
return options;
|
|
27
|
+
}
|
|
28
|
+
async commandAction(logger, args) {
|
|
29
|
+
try {
|
|
30
|
+
let pageName = urlUtil.removeLeadingSlashes(args.options.name);
|
|
31
|
+
if (!pageName.toLowerCase().endsWith('.aspx')) {
|
|
32
|
+
pageName += '.aspx';
|
|
33
|
+
}
|
|
34
|
+
if (this.verbose) {
|
|
35
|
+
await logger.logToStderr(`Unpublishing page ${pageName}...`);
|
|
36
|
+
}
|
|
37
|
+
const filePath = `${urlUtil.getServerRelativeSiteUrl(args.options.webUrl)}/SitePages/${pageName}`;
|
|
38
|
+
const requestOptions = {
|
|
39
|
+
url: `${args.options.webUrl}/_api/web/GetFileByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(filePath)}')/UnPublish`,
|
|
40
|
+
headers: {
|
|
41
|
+
accept: 'application/json;odata=nometadata'
|
|
42
|
+
},
|
|
43
|
+
responseType: 'json'
|
|
44
|
+
};
|
|
45
|
+
await request.post(requestOptions);
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
this.handleRejectedODataJsonPromise(err);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export default new SpoPageUnpublishCommand();
|
|
53
|
+
//# sourceMappingURL=page-unpublish.js.map
|
|
@@ -1,14 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoSiteScriptAddCommand_instances, _SpoSiteScriptAddCommand_initTelemetry, _SpoSiteScriptAddCommand_initOptions, _SpoSiteScriptAddCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
5
|
import { spo } from '../../../../utils/spo.js';
|
|
10
6
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
title: z.string().alias('t'),
|
|
11
|
+
content: z.string()
|
|
12
|
+
.refine(val => {
|
|
13
|
+
try {
|
|
14
|
+
JSON.parse(val);
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
}, {
|
|
21
|
+
error: 'Specified content value is not a valid JSON string.'
|
|
22
|
+
})
|
|
23
|
+
.alias('c'),
|
|
24
|
+
description: z.string().optional().alias('d')
|
|
25
|
+
});
|
|
12
26
|
class SpoSiteScriptAddCommand extends SpoCommand {
|
|
13
27
|
get name() {
|
|
14
28
|
return commands.SITESCRIPT_ADD;
|
|
@@ -16,12 +30,8 @@ class SpoSiteScriptAddCommand extends SpoCommand {
|
|
|
16
30
|
get description() {
|
|
17
31
|
return 'Adds site script for use with site designs';
|
|
18
32
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_SpoSiteScriptAddCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoSiteScriptAddCommand_instances, "m", _SpoSiteScriptAddCommand_initTelemetry).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoSiteScriptAddCommand_instances, "m", _SpoSiteScriptAddCommand_initOptions).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoSiteScriptAddCommand_instances, "m", _SpoSiteScriptAddCommand_initValidators).call(this);
|
|
33
|
+
get schema() {
|
|
34
|
+
return options;
|
|
25
35
|
}
|
|
26
36
|
async commandAction(logger, args) {
|
|
27
37
|
try {
|
|
@@ -45,30 +55,5 @@ class SpoSiteScriptAddCommand extends SpoCommand {
|
|
|
45
55
|
}
|
|
46
56
|
}
|
|
47
57
|
}
|
|
48
|
-
_SpoSiteScriptAddCommand_instances = new WeakSet(), _SpoSiteScriptAddCommand_initTelemetry = function _SpoSiteScriptAddCommand_initTelemetry() {
|
|
49
|
-
this.telemetry.push((args) => {
|
|
50
|
-
Object.assign(this.telemetryProperties, {
|
|
51
|
-
description: typeof args.options.description !== 'undefined'
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
}, _SpoSiteScriptAddCommand_initOptions = function _SpoSiteScriptAddCommand_initOptions() {
|
|
55
|
-
this.options.unshift({
|
|
56
|
-
option: '-t, --title <title>'
|
|
57
|
-
}, {
|
|
58
|
-
option: '-c, --content <content>'
|
|
59
|
-
}, {
|
|
60
|
-
option: '-d, --description [description]'
|
|
61
|
-
});
|
|
62
|
-
}, _SpoSiteScriptAddCommand_initValidators = function _SpoSiteScriptAddCommand_initValidators() {
|
|
63
|
-
this.validators.push(async (args) => {
|
|
64
|
-
try {
|
|
65
|
-
JSON.parse(args.options.content);
|
|
66
|
-
}
|
|
67
|
-
catch (e) {
|
|
68
|
-
return `Specified content value is not a valid JSON string. Error: ${e}`;
|
|
69
|
-
}
|
|
70
|
-
return true;
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
58
|
export default new SpoSiteScriptAddCommand();
|
|
74
59
|
//# sourceMappingURL=sitescript-add.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoSiteScriptGetCommand_instances, _SpoSiteScriptGetCommand_initOptions, _SpoSiteScriptGetCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { spo } from '../../../../utils/spo.js';
|
|
9
|
-
import { validation } from '../../../../utils/validation.js';
|
|
10
5
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
id: z.guid().alias('i'),
|
|
10
|
+
content: z.boolean().optional().alias('c')
|
|
11
|
+
});
|
|
12
12
|
class SpoSiteScriptGetCommand extends SpoCommand {
|
|
13
13
|
get name() {
|
|
14
14
|
return commands.SITESCRIPT_GET;
|
|
@@ -16,11 +16,8 @@ class SpoSiteScriptGetCommand extends SpoCommand {
|
|
|
16
16
|
get description() {
|
|
17
17
|
return 'Gets information about the specified site script';
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_SpoSiteScriptGetCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoSiteScriptGetCommand_instances, "m", _SpoSiteScriptGetCommand_initOptions).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoSiteScriptGetCommand_instances, "m", _SpoSiteScriptGetCommand_initValidators).call(this);
|
|
19
|
+
get schema() {
|
|
20
|
+
return options;
|
|
24
21
|
}
|
|
25
22
|
async commandAction(logger, args) {
|
|
26
23
|
try {
|
|
@@ -49,19 +46,5 @@ class SpoSiteScriptGetCommand extends SpoCommand {
|
|
|
49
46
|
}
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
|
-
_SpoSiteScriptGetCommand_instances = new WeakSet(), _SpoSiteScriptGetCommand_initOptions = function _SpoSiteScriptGetCommand_initOptions() {
|
|
53
|
-
this.options.unshift({
|
|
54
|
-
option: '-i, --id <id>'
|
|
55
|
-
}, {
|
|
56
|
-
option: '-c, --content'
|
|
57
|
-
});
|
|
58
|
-
}, _SpoSiteScriptGetCommand_initValidators = function _SpoSiteScriptGetCommand_initValidators() {
|
|
59
|
-
this.validators.push(async (args) => {
|
|
60
|
-
if (!validation.isValidGuid(args.options.id)) {
|
|
61
|
-
return `${args.options.id} is not a valid GUID`;
|
|
62
|
-
}
|
|
63
|
-
return true;
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
49
|
export default new SpoSiteScriptGetCommand();
|
|
67
50
|
//# sourceMappingURL=sitescript-get.js.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
1
2
|
import request from '../../../../request.js';
|
|
2
3
|
import { spo } from '../../../../utils/spo.js';
|
|
3
4
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
4
5
|
import commands from '../../commands.js';
|
|
6
|
+
export const options = globalOptionsZod.strict();
|
|
5
7
|
class SpoSiteScriptListCommand extends SpoCommand {
|
|
6
8
|
get name() {
|
|
7
9
|
return commands.SITESCRIPT_LIST;
|
|
@@ -9,6 +11,9 @@ class SpoSiteScriptListCommand extends SpoCommand {
|
|
|
9
11
|
get description() {
|
|
10
12
|
return 'Lists site script available for use with site designs';
|
|
11
13
|
}
|
|
14
|
+
get schema() {
|
|
15
|
+
return options;
|
|
16
|
+
}
|
|
12
17
|
async commandAction(logger) {
|
|
13
18
|
try {
|
|
14
19
|
const spoUrl = await spo.getSpoUrl(logger, this.debug);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoSiteScriptRemoveCommand_instances, _SpoSiteScriptRemoveCommand_initTelemetry, _SpoSiteScriptRemoveCommand_initOptions, _SpoSiteScriptRemoveCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { spo } from '../../../../utils/spo.js';
|
|
10
|
-
import { validation } from '../../../../utils/validation.js';
|
|
11
6
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
12
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
id: z.guid().alias('i'),
|
|
11
|
+
force: z.boolean().optional().alias('f')
|
|
12
|
+
});
|
|
13
13
|
class SpoSiteScriptRemoveCommand extends SpoCommand {
|
|
14
14
|
get name() {
|
|
15
15
|
return commands.SITESCRIPT_REMOVE;
|
|
@@ -17,12 +17,8 @@ class SpoSiteScriptRemoveCommand extends SpoCommand {
|
|
|
17
17
|
get description() {
|
|
18
18
|
return 'Removes the specified site script';
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
_SpoSiteScriptRemoveCommand_instances.add(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoSiteScriptRemoveCommand_instances, "m", _SpoSiteScriptRemoveCommand_initTelemetry).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoSiteScriptRemoveCommand_instances, "m", _SpoSiteScriptRemoveCommand_initOptions).call(this);
|
|
25
|
-
__classPrivateFieldGet(this, _SpoSiteScriptRemoveCommand_instances, "m", _SpoSiteScriptRemoveCommand_initValidators).call(this);
|
|
20
|
+
get schema() {
|
|
21
|
+
return options;
|
|
26
22
|
}
|
|
27
23
|
async commandAction(logger, args) {
|
|
28
24
|
if (args.options.force) {
|
|
@@ -56,25 +52,5 @@ class SpoSiteScriptRemoveCommand extends SpoCommand {
|
|
|
56
52
|
}
|
|
57
53
|
}
|
|
58
54
|
}
|
|
59
|
-
_SpoSiteScriptRemoveCommand_instances = new WeakSet(), _SpoSiteScriptRemoveCommand_initTelemetry = function _SpoSiteScriptRemoveCommand_initTelemetry() {
|
|
60
|
-
this.telemetry.push((args) => {
|
|
61
|
-
Object.assign(this.telemetryProperties, {
|
|
62
|
-
force: args.options.force || false
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
}, _SpoSiteScriptRemoveCommand_initOptions = function _SpoSiteScriptRemoveCommand_initOptions() {
|
|
66
|
-
this.options.unshift({
|
|
67
|
-
option: '-i, --id <id>'
|
|
68
|
-
}, {
|
|
69
|
-
option: '-f, --force'
|
|
70
|
-
});
|
|
71
|
-
}, _SpoSiteScriptRemoveCommand_initValidators = function _SpoSiteScriptRemoveCommand_initValidators() {
|
|
72
|
-
this.validators.push(async (args) => {
|
|
73
|
-
if (!validation.isValidGuid(args.options.id)) {
|
|
74
|
-
return `${args.options.id} is not a valid GUID`;
|
|
75
|
-
}
|
|
76
|
-
return true;
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
55
|
export default new SpoSiteScriptRemoveCommand();
|
|
80
56
|
//# sourceMappingURL=sitescript-remove.js.map
|
|
@@ -1,14 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoSiteScriptSetCommand_instances, _SpoSiteScriptSetCommand_initTelemetry, _SpoSiteScriptSetCommand_initOptions, _SpoSiteScriptSetCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { spo } from '../../../../utils/spo.js';
|
|
9
|
-
import { validation } from '../../../../utils/validation.js';
|
|
10
5
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
6
|
import commands from '../../commands.js';
|
|
7
|
+
import { validation } from '../../../../utils/validation.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
id: z.guid().alias('i'),
|
|
11
|
+
title: z.string().optional().alias('t'),
|
|
12
|
+
description: z.string().optional().alias('d'),
|
|
13
|
+
version: z.string()
|
|
14
|
+
.refine(val => validation.isValidPositiveInteger(val), {
|
|
15
|
+
error: 'Version must be a number.'
|
|
16
|
+
})
|
|
17
|
+
.optional().alias('v'),
|
|
18
|
+
content: z.string()
|
|
19
|
+
.refine(val => {
|
|
20
|
+
try {
|
|
21
|
+
JSON.parse(val);
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
}, {
|
|
28
|
+
error: 'Specified content value is not a valid JSON string.'
|
|
29
|
+
})
|
|
30
|
+
.optional().alias('c')
|
|
31
|
+
});
|
|
12
32
|
class SpoSiteScriptSetCommand extends SpoCommand {
|
|
13
33
|
get name() {
|
|
14
34
|
return commands.SITESCRIPT_SET;
|
|
@@ -16,12 +36,8 @@ class SpoSiteScriptSetCommand extends SpoCommand {
|
|
|
16
36
|
get description() {
|
|
17
37
|
return 'Updates existing site script';
|
|
18
38
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_SpoSiteScriptSetCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoSiteScriptSetCommand_instances, "m", _SpoSiteScriptSetCommand_initTelemetry).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoSiteScriptSetCommand_instances, "m", _SpoSiteScriptSetCommand_initOptions).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoSiteScriptSetCommand_instances, "m", _SpoSiteScriptSetCommand_initValidators).call(this);
|
|
39
|
+
get schema() {
|
|
40
|
+
return options;
|
|
25
41
|
}
|
|
26
42
|
async commandAction(logger, args) {
|
|
27
43
|
try {
|
|
@@ -60,48 +76,5 @@ class SpoSiteScriptSetCommand extends SpoCommand {
|
|
|
60
76
|
}
|
|
61
77
|
}
|
|
62
78
|
}
|
|
63
|
-
_SpoSiteScriptSetCommand_instances = new WeakSet(), _SpoSiteScriptSetCommand_initTelemetry = function _SpoSiteScriptSetCommand_initTelemetry() {
|
|
64
|
-
this.telemetry.push((args) => {
|
|
65
|
-
Object.assign(this.telemetryProperties, {
|
|
66
|
-
title: (!(!args.options.title)).toString(),
|
|
67
|
-
description: (!(!args.options.description)).toString(),
|
|
68
|
-
version: (!(!args.options.version)).toString(),
|
|
69
|
-
content: (!(!args.options.content)).toString()
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
}, _SpoSiteScriptSetCommand_initOptions = function _SpoSiteScriptSetCommand_initOptions() {
|
|
73
|
-
this.options.unshift({
|
|
74
|
-
option: '-i, --id <id>'
|
|
75
|
-
}, {
|
|
76
|
-
option: '-t, --title [title]'
|
|
77
|
-
}, {
|
|
78
|
-
option: '-d, --description [description]'
|
|
79
|
-
}, {
|
|
80
|
-
option: '-v, --version [version]'
|
|
81
|
-
}, {
|
|
82
|
-
option: '-c, --content [content]'
|
|
83
|
-
});
|
|
84
|
-
}, _SpoSiteScriptSetCommand_initValidators = function _SpoSiteScriptSetCommand_initValidators() {
|
|
85
|
-
this.validators.push(async (args) => {
|
|
86
|
-
if (!validation.isValidGuid(args.options.id)) {
|
|
87
|
-
return `${args.options.id} is not a valid GUID`;
|
|
88
|
-
}
|
|
89
|
-
if (args.options.version) {
|
|
90
|
-
const version = parseInt(args.options.version);
|
|
91
|
-
if (isNaN(version)) {
|
|
92
|
-
return `${args.options.version} is not a number`;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
if (args.options.content) {
|
|
96
|
-
try {
|
|
97
|
-
JSON.parse(args.options.content);
|
|
98
|
-
}
|
|
99
|
-
catch (e) {
|
|
100
|
-
return `Specified content value is not a valid JSON string. Error: ${e}`;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return true;
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
79
|
export default new SpoSiteScriptSetCommand();
|
|
107
80
|
//# sourceMappingURL=sitescript-set.js.map
|
|
@@ -1,16 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoSearchCommand_instances, _SpoSearchCommand_initTelemetry, _SpoSearchCommand_initOptions, _SpoSearchCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../Command.js';
|
|
8
4
|
import request from '../../../request.js';
|
|
9
5
|
import { formatting } from '../../../utils/formatting.js';
|
|
10
6
|
import { spo } from '../../../utils/spo.js';
|
|
11
7
|
import { validation } from '../../../utils/validation.js';
|
|
12
8
|
import SpoCommand from '../../base/SpoCommand.js';
|
|
13
9
|
import commands from '../commands.js';
|
|
10
|
+
export const options = z.strictObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
12
|
+
queryText: z.string().alias('q'),
|
|
13
|
+
selectProperties: z.string().optional().alias('p'),
|
|
14
|
+
webUrl: z.string().optional().alias('u'),
|
|
15
|
+
allResults: z.boolean().optional(),
|
|
16
|
+
rowLimit: z.number().int().optional(),
|
|
17
|
+
sourceId: z.string().refine(val => validation.isValidGuid(val), {
|
|
18
|
+
message: 'The value must be a valid GUID.'
|
|
19
|
+
}).optional(),
|
|
20
|
+
trimDuplicates: z.boolean().optional(),
|
|
21
|
+
enableStemming: z.boolean().optional(),
|
|
22
|
+
culture: z.number().int().optional(),
|
|
23
|
+
refinementFilters: z.string().optional(),
|
|
24
|
+
queryTemplate: z.string().optional(),
|
|
25
|
+
sortList: z.string().refine(val => /^([a-z0-9_]+:(ascending|descending))(,([a-z0-9_]+:(ascending|descending)))*$/i.test(val), {
|
|
26
|
+
message: `sortlist parameter value does not match the required pattern (=comma-separated list of '<property>:(ascending|descending)'-pattern)`
|
|
27
|
+
}).optional(),
|
|
28
|
+
rankingModelId: z.string().refine(val => validation.isValidGuid(val), {
|
|
29
|
+
message: 'The value must be a valid GUID.'
|
|
30
|
+
}).optional(),
|
|
31
|
+
startRow: z.number().int().optional(),
|
|
32
|
+
properties: z.string().optional(),
|
|
33
|
+
sourceName: z.string().optional(),
|
|
34
|
+
refiners: z.string().optional(),
|
|
35
|
+
hiddenConstraints: z.string().optional(),
|
|
36
|
+
clientType: z.string().optional(),
|
|
37
|
+
enablePhonetic: z.boolean().optional(),
|
|
38
|
+
processBestBets: z.boolean().optional(),
|
|
39
|
+
enableQueryRules: z.boolean().optional(),
|
|
40
|
+
processPersonalFavorites: z.boolean().optional(),
|
|
41
|
+
rawOutput: z.boolean().optional()
|
|
42
|
+
});
|
|
14
43
|
class SpoSearchCommand extends SpoCommand {
|
|
15
44
|
get name() {
|
|
16
45
|
return commands.SEARCH;
|
|
@@ -18,12 +47,14 @@ class SpoSearchCommand extends SpoCommand {
|
|
|
18
47
|
get description() {
|
|
19
48
|
return 'Executes a search query';
|
|
20
49
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
50
|
+
get schema() {
|
|
51
|
+
return options;
|
|
52
|
+
}
|
|
53
|
+
getRefinedSchema(schema) {
|
|
54
|
+
return schema
|
|
55
|
+
.refine(opts => !(opts.startRow && opts.allResults), {
|
|
56
|
+
message: 'You cannot specify startRow when allResults is set'
|
|
57
|
+
});
|
|
27
58
|
}
|
|
28
59
|
async commandAction(logger, args) {
|
|
29
60
|
let webUrl;
|
|
@@ -176,109 +207,5 @@ class SpoSearchCommand extends SpoCommand {
|
|
|
176
207
|
return outputData;
|
|
177
208
|
}
|
|
178
209
|
}
|
|
179
|
-
_SpoSearchCommand_instances = new WeakSet(), _SpoSearchCommand_initTelemetry = function _SpoSearchCommand_initTelemetry() {
|
|
180
|
-
this.telemetry.push((args) => {
|
|
181
|
-
Object.assign(this.telemetryProperties, {
|
|
182
|
-
selectproperties: typeof args.options.selectProperties !== 'undefined',
|
|
183
|
-
allResults: args.options.allResults,
|
|
184
|
-
rowLimit: args.options.rowLimit,
|
|
185
|
-
sourceId: typeof args.options.sourceId !== 'undefined',
|
|
186
|
-
trimDuplicates: args.options.trimDuplicates,
|
|
187
|
-
enableStemming: args.options.enableStemming,
|
|
188
|
-
culture: args.options.culture,
|
|
189
|
-
refinementFilters: typeof args.options.refinementFilters !== 'undefined',
|
|
190
|
-
queryTemplate: typeof args.options.queryTemplate !== 'undefined',
|
|
191
|
-
sortList: typeof args.options.sortList !== 'undefined',
|
|
192
|
-
rankingModelId: typeof args.options.rankingModelId !== 'undefined',
|
|
193
|
-
startRow: typeof args.options.startRow !== 'undefined',
|
|
194
|
-
properties: typeof args.options.properties !== 'undefined',
|
|
195
|
-
sourceName: typeof args.options.sourceName !== 'undefined',
|
|
196
|
-
refiners: typeof args.options.refiners !== 'undefined',
|
|
197
|
-
webUrl: typeof args.options.webUrl !== 'undefined',
|
|
198
|
-
hiddenConstraints: typeof args.options.hiddenConstraints !== 'undefined',
|
|
199
|
-
clientType: typeof args.options.clientType !== 'undefined',
|
|
200
|
-
enablePhonetic: args.options.enablePhonetic,
|
|
201
|
-
processBestBets: args.options.processBestBets,
|
|
202
|
-
enableQueryRules: args.options.enableQueryRules,
|
|
203
|
-
processPersonalFavorites: args.options.processPersonalFavorites,
|
|
204
|
-
rawOutput: args.options.rawOutput
|
|
205
|
-
});
|
|
206
|
-
});
|
|
207
|
-
}, _SpoSearchCommand_initOptions = function _SpoSearchCommand_initOptions() {
|
|
208
|
-
this.options.unshift({
|
|
209
|
-
option: '-q, --queryText <queryText>'
|
|
210
|
-
}, {
|
|
211
|
-
option: '-p, --selectProperties [selectProperties]'
|
|
212
|
-
}, {
|
|
213
|
-
option: '-u, --webUrl [webUrl]'
|
|
214
|
-
}, {
|
|
215
|
-
option: '--allResults'
|
|
216
|
-
}, {
|
|
217
|
-
option: '--rowLimit [rowLimit]'
|
|
218
|
-
}, {
|
|
219
|
-
option: '--sourceId [sourceId]'
|
|
220
|
-
}, {
|
|
221
|
-
option: '--trimDuplicates'
|
|
222
|
-
}, {
|
|
223
|
-
option: '--enableStemming'
|
|
224
|
-
}, {
|
|
225
|
-
option: '--culture [culture]'
|
|
226
|
-
}, {
|
|
227
|
-
option: '--refinementFilters [refinementFilters]'
|
|
228
|
-
}, {
|
|
229
|
-
option: '--queryTemplate [queryTemplate]'
|
|
230
|
-
}, {
|
|
231
|
-
option: '--sortList [sortList]'
|
|
232
|
-
}, {
|
|
233
|
-
option: '--rankingModelId [rankingModelId]'
|
|
234
|
-
}, {
|
|
235
|
-
option: '--startRow [startRow]'
|
|
236
|
-
}, {
|
|
237
|
-
option: '--properties [properties]'
|
|
238
|
-
}, {
|
|
239
|
-
option: '--sourceName [sourceName]'
|
|
240
|
-
}, {
|
|
241
|
-
option: '--refiners [refiners]'
|
|
242
|
-
}, {
|
|
243
|
-
option: '--hiddenConstraints [hiddenConstraints]'
|
|
244
|
-
}, {
|
|
245
|
-
option: '--clientType [clientType]'
|
|
246
|
-
}, {
|
|
247
|
-
option: '--enablePhonetic'
|
|
248
|
-
}, {
|
|
249
|
-
option: '--processBestBets'
|
|
250
|
-
}, {
|
|
251
|
-
option: '--enableQueryRules'
|
|
252
|
-
}, {
|
|
253
|
-
option: '--processPersonalFavorites'
|
|
254
|
-
}, {
|
|
255
|
-
option: '--rawOutput'
|
|
256
|
-
});
|
|
257
|
-
}, _SpoSearchCommand_initValidators = function _SpoSearchCommand_initValidators() {
|
|
258
|
-
this.validators.push(async (args) => {
|
|
259
|
-
if (args.options.sourceId && !validation.isValidGuid(args.options.sourceId)) {
|
|
260
|
-
return `${args.options.sourceId} is not a valid GUID`;
|
|
261
|
-
}
|
|
262
|
-
if (args.options.rankingModelId && !validation.isValidGuid(args.options.rankingModelId)) {
|
|
263
|
-
return `${args.options.rankingModelId} is not a valid GUID`;
|
|
264
|
-
}
|
|
265
|
-
if (args.options.sortList && !/^([a-z0-9_]+:(ascending|descending))(,([a-z0-9_]+:(ascending|descending)))*$/gi.test(args.options.sortList)) {
|
|
266
|
-
return `sortlist parameter value '${args.options.sortList}' does not match the required pattern (=comma-separated list of '<property>:(ascending|descending)'-pattern)`;
|
|
267
|
-
}
|
|
268
|
-
if (args.options.rowLimit && !Number.isInteger(args.options.rowLimit)) {
|
|
269
|
-
return `${args.options.rowLimit} is not a valid number`;
|
|
270
|
-
}
|
|
271
|
-
if (args.options.startRow && !Number.isInteger(args.options.startRow)) {
|
|
272
|
-
return `${args.options.startRow} is not a valid number`;
|
|
273
|
-
}
|
|
274
|
-
if (args.options.startRow && args.options.allResults) {
|
|
275
|
-
return 'You cannot specify startRow when allResults is set';
|
|
276
|
-
}
|
|
277
|
-
if (args.options.culture && !Number.isInteger(args.options.culture)) {
|
|
278
|
-
return `${args.options.culture} is not a valid number`;
|
|
279
|
-
}
|
|
280
|
-
return true;
|
|
281
|
-
});
|
|
282
|
-
};
|
|
283
210
|
export default new SpoSearchCommand();
|
|
284
211
|
//# sourceMappingURL=spo-search.js.map
|
|
@@ -111,6 +111,13 @@ class SpoTenantApplicationCustomizerAddCommand extends SpoCommand {
|
|
|
111
111
|
if (this.verbose) {
|
|
112
112
|
await logger.logToStderr('Pre-checks finished. Adding tenant wide extension to the TenantWideExtensions list');
|
|
113
113
|
}
|
|
114
|
+
const output = options.output === 'text' ||
|
|
115
|
+
options.output === 'csv' ||
|
|
116
|
+
options.output === 'json' ||
|
|
117
|
+
options.output === 'md' ||
|
|
118
|
+
options.output === 'none'
|
|
119
|
+
? options.output
|
|
120
|
+
: undefined;
|
|
114
121
|
const commandOptions = {
|
|
115
122
|
webUrl: appCatalogUrl,
|
|
116
123
|
listUrl: `${urlUtil.getServerRelativeSiteUrl(appCatalogUrl)}/Lists/TenantWideExtensions`,
|
|
@@ -125,7 +132,7 @@ class SpoTenantApplicationCustomizerAddCommand extends SpoCommand {
|
|
|
125
132
|
TenantWideExtensionDisabled: false,
|
|
126
133
|
verbose: this.verbose,
|
|
127
134
|
debug: this.debug,
|
|
128
|
-
output:
|
|
135
|
+
output: output
|
|
129
136
|
};
|
|
130
137
|
await cli.executeCommand(spoListItemAddCommand, { options: { ...commandOptions, _: [] } });
|
|
131
138
|
}
|
|
@@ -111,6 +111,13 @@ class SpoTenantCommandSetAddCommand extends SpoCommand {
|
|
|
111
111
|
if (this.verbose) {
|
|
112
112
|
await logger.logToStderr('Pre-checks finished. Adding tenant wide extension to the TenantWideExtensions list');
|
|
113
113
|
}
|
|
114
|
+
const output = options.output === 'text' ||
|
|
115
|
+
options.output === 'csv' ||
|
|
116
|
+
options.output === 'json' ||
|
|
117
|
+
options.output === 'md' ||
|
|
118
|
+
options.output === 'none'
|
|
119
|
+
? options.output
|
|
120
|
+
: undefined;
|
|
114
121
|
const commandOptions = {
|
|
115
122
|
webUrl: appCatalogUrl,
|
|
116
123
|
listUrl: `${urlUtil.getServerRelativeSiteUrl(appCatalogUrl)}/Lists/TenantWideExtensions`,
|
|
@@ -124,7 +131,7 @@ class SpoTenantCommandSetAddCommand extends SpoCommand {
|
|
|
124
131
|
TenantWideExtensionDisabled: false,
|
|
125
132
|
verbose: this.verbose,
|
|
126
133
|
debug: this.debug,
|
|
127
|
-
output:
|
|
134
|
+
output: output
|
|
128
135
|
};
|
|
129
136
|
await cli.executeCommand(spoListItemAddCommand, { options: { ...commandOptions, _: [] } });
|
|
130
137
|
}
|
|
@@ -6,6 +6,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _SpoTermGroupListCommand_instances, _SpoTermGroupListCommand_initTelemetry, _SpoTermGroupListCommand_initOptions, _SpoTermGroupListCommand_initValidators;
|
|
7
7
|
import config from '../../../../config.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
9
10
|
import { spo } from '../../../../utils/spo.js';
|
|
10
11
|
import { validation } from '../../../../utils/validation.js';
|
|
11
12
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
@@ -48,14 +49,12 @@ class SpoTermGroupListCommand extends SpoCommand {
|
|
|
48
49
|
throw response.ErrorInfo.ErrorMessage;
|
|
49
50
|
}
|
|
50
51
|
const result = json[json.length - 1];
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
await logger.log(result._Child_Items_);
|
|
58
|
-
}
|
|
52
|
+
result._Child_Items_.forEach(t => {
|
|
53
|
+
t.CreatedDate = new Date(Number(t.CreatedDate.replace('/Date(', '').replace(')/', ''))).toISOString();
|
|
54
|
+
t.Id = formatting.extractCsomGuid(t.Id);
|
|
55
|
+
t.LastModifiedDate = new Date(Number(t.LastModifiedDate.replace('/Date(', '').replace(')/', ''))).toISOString();
|
|
56
|
+
});
|
|
57
|
+
await logger.log(result._Child_Items_);
|
|
59
58
|
}
|
|
60
59
|
catch (err) {
|
|
61
60
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -51,15 +51,12 @@ class SpoTermSetListCommand extends SpoCommand {
|
|
|
51
51
|
throw response.ErrorInfo.ErrorMessage;
|
|
52
52
|
}
|
|
53
53
|
const result = json[json.length - 1];
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
});
|
|
61
|
-
await logger.log(result._Child_Items_);
|
|
62
|
-
}
|
|
54
|
+
result._Child_Items_.forEach(t => {
|
|
55
|
+
t.CreatedDate = new Date(Number(t.CreatedDate.replace('/Date(', '').replace(')/', ''))).toISOString();
|
|
56
|
+
t.Id = formatting.extractCsomGuid(t.Id);
|
|
57
|
+
t.LastModifiedDate = new Date(Number(t.LastModifiedDate.replace('/Date(', '').replace(')/', ''))).toISOString();
|
|
58
|
+
});
|
|
59
|
+
await logger.log(result._Child_Items_);
|
|
63
60
|
}
|
|
64
61
|
catch (err) {
|
|
65
62
|
this.handleRejectedODataJsonPromise(err);
|