@pnp/cli-microsoft365 12.0.0 → 12.1.0-beta.3545352
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/.mocharc.json +1 -1
- package/README.md +2 -2
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/cli/cli.js +29 -23
- package/dist/m365/base/AppCommand.js +1 -1
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +1 -1
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-add.js +4 -4
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-get.js +2 -2
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-list.js +1 -1
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-remove.js +5 -5
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +1 -1
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-roleassignment-add.js +3 -3
- package/dist/m365/entra/commands/app/app-add.js +106 -150
- package/dist/m365/entra/commands/app/app-get.js +22 -38
- package/dist/m365/entra/commands/app/app-list.js +10 -22
- package/dist/m365/entra/commands/app/app-permission-add.js +36 -50
- package/dist/m365/entra/commands/app/app-permission-list.js +29 -48
- package/dist/m365/entra/commands/app/app-permission-remove.js +44 -82
- package/dist/m365/entra/commands/app/app-remove.js +21 -38
- package/dist/m365/entra/commands/app/app-role-add.js +32 -46
- package/dist/m365/entra/commands/app/app-role-list.js +20 -25
- package/dist/m365/entra/commands/app/app-role-remove.js +33 -41
- package/dist/m365/entra/commands/app/app-set.js +46 -69
- package/dist/m365/entra/commands/approleassignment/approleassignment-add.js +2 -2
- package/dist/m365/entra/commands/approleassignment/approleassignment-list.js +2 -2
- package/dist/m365/entra/commands/approleassignment/approleassignment-remove.js +2 -2
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +2 -2
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +2 -2
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-remove.js +2 -2
- package/dist/m365/entra/commands/group/group-get.js +1 -1
- package/dist/m365/entra/commands/group/group-member-add.js +1 -1
- package/dist/m365/entra/commands/group/group-member-list.js +1 -1
- package/dist/m365/entra/commands/group/group-member-remove.js +1 -1
- package/dist/m365/entra/commands/group/group-member-set.js +1 -1
- package/dist/m365/entra/commands/group/group-remove.js +1 -1
- package/dist/m365/entra/commands/group/group-set.js +1 -1
- package/dist/m365/entra/commands/groupsetting/groupsetting-add.js +1 -1
- package/dist/m365/entra/commands/groupsetting/groupsetting-get.js +1 -1
- package/dist/m365/entra/commands/groupsetting/groupsetting-remove.js +1 -1
- package/dist/m365/entra/commands/groupsetting/groupsetting-set.js +1 -1
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-get.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-get.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +2 -2
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-remove.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-restore.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-remove.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-renew.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-set.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-teamify.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-user-add.js +2 -2
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +1 -1
- package/dist/m365/entra/commands/m365group/m365group-user-remove.js +2 -2
- package/dist/m365/entra/commands/m365group/m365group-user-set.js +2 -2
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-add.js +2 -2
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +1 -1
- package/dist/m365/entra/commands/organization/organization-set.js +1 -1
- package/dist/m365/entra/commands/pim/pim-role-assignment-add.js +5 -5
- package/dist/m365/entra/commands/pim/pim-role-assignment-eligibility-list.js +2 -2
- package/dist/m365/entra/commands/pim/pim-role-assignment-list.js +2 -2
- package/dist/m365/entra/commands/pim/pim-role-assignment-remove.js +5 -5
- package/dist/m365/entra/commands/pim/pim-role-request-list.js +2 -2
- package/dist/m365/entra/commands/roleassignment/roleassignment-add.js +7 -7
- package/dist/m365/entra/commands/roledefinition/roledefinition-get.js +1 -1
- package/dist/m365/entra/commands/roledefinition/roledefinition-remove.js +1 -1
- package/dist/m365/entra/commands/roledefinition/roledefinition-set.js +1 -1
- package/dist/m365/entra/commands/user/user-add.js +1 -1
- package/dist/m365/entra/commands/user/user-get.js +1 -1
- package/dist/m365/entra/commands/user/user-groupmembership-list.js +1 -1
- package/dist/m365/entra/commands/user/user-license-add.js +1 -1
- package/dist/m365/entra/commands/user/user-license-list.js +1 -1
- package/dist/m365/entra/commands/user/user-license-remove.js +1 -1
- package/dist/m365/entra/commands/user/user-recyclebinitem-remove.js +1 -1
- package/dist/m365/entra/commands/user/user-recyclebinitem-restore.js +1 -1
- package/dist/m365/entra/commands/user/user-remove.js +1 -1
- package/dist/m365/entra/commands/user/user-session-revoke.js +1 -1
- package/dist/m365/entra/commands/user/user-set.js +2 -2
- package/dist/m365/entra/commands/user/user-signin-list.js +2 -2
- package/dist/m365/flow/commands/flow-export.js +1 -1
- package/dist/m365/flow/commands/flow-remove.js +1 -1
- package/dist/m365/flow/commands/owner/owner-ensure.js +1 -1
- package/dist/m365/flow/commands/owner/owner-list.js +1 -1
- package/dist/m365/flow/commands/owner/owner-remove.js +1 -1
- package/dist/m365/flow/commands/recyclebinitem/recyclebinitem-restore.js +1 -1
- package/dist/m365/flow/commands/run/run-cancel.js +1 -1
- package/dist/m365/flow/commands/run/run-get.js +1 -1
- package/dist/m365/flow/commands/run/run-list.js +1 -1
- package/dist/m365/flow/commands/run/run-resubmit.js +1 -1
- package/dist/m365/graph/commands/directoryextension/directoryextension-get.js +3 -3
- package/dist/m365/graph/commands/directoryextension/directoryextension-list.js +2 -2
- package/dist/m365/graph/commands/directoryextension/directoryextension-remove.js +3 -3
- package/dist/m365/outlook/commands/mail/mail-searchfolder-add.js +1 -1
- package/dist/m365/outlook/commands/mailbox/mailbox-settings-get.js +1 -1
- package/dist/m365/pp/commands/website/website-get.js +1 -1
- package/dist/m365/pp/commands/website/website-remove.js +1 -1
- package/dist/m365/pp/commands/website/website-webrole-list.js +1 -1
- package/dist/m365/spe/commands/container/container-add.js +1 -1
- package/dist/m365/spe/commands/container/container-get.js +1 -1
- package/dist/m365/spe/commands/container/container-permission-add.js +1 -1
- package/dist/m365/spe/commands/container/container-permission-list.js +1 -1
- package/dist/m365/spe/commands/container/container-permission-remove.js +1 -1
- package/dist/m365/spe/commands/container/container-permission-set.js +1 -1
- package/dist/m365/spe/commands/container/container-recyclebinitem-list.js +1 -1
- package/dist/m365/spe/commands/container/container-recyclebinitem-remove.js +1 -1
- package/dist/m365/spe/commands/container/container-recyclebinitem-restore.js +1 -1
- package/dist/m365/spe/commands/container/container-remove.js +1 -1
- package/dist/m365/spe/commands/containertype/containertype-add.js +1 -1
- package/dist/m365/spe/commands/containertype/containertype-get.js +1 -1
- package/dist/m365/spe/commands/containertype/containertype-remove.js +1 -1
- package/dist/m365/spfx/commands/SpfxCompatibilityMatrix.js +15 -0
- package/dist/m365/spfx/commands/package/package-generate.js +31 -52
- package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-add.js +27 -62
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.24.2.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor/spfx-deps.js +5 -2
- package/dist/m365/spfx/commands/project/project-doctor.js +22 -52
- package/dist/m365/spfx/commands/project/project-externalize.js +16 -26
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +28 -65
- package/dist/m365/spfx/commands/project/project-permissions-grant.js +4 -2
- package/dist/m365/spfx/commands/project/project-rename.js +17 -29
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN001036_DEP_microsoft_sp_copilot_component.js +10 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.24.2.js +57 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +2 -4
- package/dist/m365/spfx/commands/spfx-doctor.js +23 -47
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +39 -65
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-list.js +28 -56
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +40 -68
- package/dist/m365/spo/commands/externaluser/externaluser-list.js +24 -66
- package/dist/m365/spo/commands/file/file-add.js +51 -77
- package/dist/m365/spo/commands/file/file-archive.js +1 -1
- package/dist/m365/spo/commands/file/file-checkin.js +35 -64
- package/dist/m365/spo/commands/file/file-checkout-undo.js +25 -49
- package/dist/m365/spo/commands/file/file-checkout.js +24 -47
- package/dist/m365/spo/commands/file/file-copy.js +37 -68
- package/dist/m365/spo/commands/file/file-get.js +44 -79
- package/dist/m365/spo/commands/file/file-list.js +16 -39
- package/dist/m365/spo/commands/file/file-move.js +30 -68
- package/dist/m365/spo/commands/file/file-remove.js +27 -56
- package/dist/m365/spo/commands/file/file-rename.js +15 -36
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +26 -51
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +25 -50
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +47 -75
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +39 -70
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +26 -52
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +25 -49
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +24 -47
- package/dist/m365/spo/commands/file/file-sharinglink-add.js +46 -70
- package/dist/m365/spo/commands/file/file-sharinglink-clear.js +33 -57
- package/dist/m365/spo/commands/file/file-sharinglink-get.js +25 -47
- package/dist/m365/spo/commands/file/file-sharinglink-list.js +32 -53
- package/dist/m365/spo/commands/file/file-sharinglink-remove.js +26 -51
- package/dist/m365/spo/commands/file/file-sharinglink-set.js +29 -55
- package/dist/m365/spo/commands/file/file-unarchive.js +1 -1
- package/dist/m365/spo/commands/file/file-version-clear.js +25 -45
- package/dist/m365/spo/commands/file/file-version-get.js +25 -43
- package/dist/m365/spo/commands/file/file-version-keep.js +1 -1
- package/dist/m365/spo/commands/file/file-version-list.js +24 -41
- package/dist/m365/spo/commands/file/file-version-remove.js +26 -47
- package/dist/m365/spo/commands/file/file-version-restore.js +26 -47
- package/dist/m365/spo/commands/folder/folder-add.js +19 -48
- package/dist/m365/spo/commands/folder/folder-archive.js +1 -1
- package/dist/m365/spo/commands/folder/folder-copy.js +36 -62
- package/dist/m365/spo/commands/folder/folder-get.js +30 -51
- package/dist/m365/spo/commands/folder/folder-list.js +16 -39
- package/dist/m365/spo/commands/folder/folder-move.js +36 -62
- package/dist/m365/spo/commands/folder/folder-remove.js +15 -36
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +30 -48
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +30 -50
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +49 -79
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +37 -67
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +15 -36
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +14 -33
- package/dist/m365/spo/commands/folder/folder-set.js +28 -48
- package/dist/m365/spo/commands/folder/folder-sharinglink-add.js +58 -86
- package/dist/m365/spo/commands/folder/folder-sharinglink-clear.js +33 -50
- package/dist/m365/spo/commands/folder/folder-sharinglink-get.js +33 -42
- package/dist/m365/spo/commands/folder/folder-sharinglink-list.js +32 -47
- package/dist/m365/spo/commands/folder/folder-sharinglink-remove.js +34 -41
- package/dist/m365/spo/commands/folder/folder-sharinglink-set.js +38 -43
- package/dist/m365/spo/commands/folder/folder-unarchive.js +1 -1
- package/dist/m365/spo/commands/group/group-add.js +19 -60
- package/dist/m365/spo/commands/group/group-get.js +32 -45
- package/dist/m365/spo/commands/group/group-list.js +13 -27
- package/dist/m365/spo/commands/group/group-member-add.js +52 -84
- package/dist/m365/spo/commands/group/group-member-list.js +24 -38
- package/dist/m365/spo/commands/group/group-member-remove.js +49 -68
- package/dist/m365/spo/commands/group/group-remove.js +25 -45
- package/dist/m365/spo/commands/group/group-set.js +36 -79
- package/dist/m365/spo/commands/list/list-defaultvalue-clear.js +1 -1
- package/dist/m365/spo/commands/list/list-defaultvalue-get.js +1 -1
- package/dist/m365/spo/commands/list/list-defaultvalue-list.js +1 -1
- package/dist/m365/spo/commands/list/list-defaultvalue-remove.js +1 -1
- package/dist/m365/spo/commands/list/list-defaultvalue-set.js +1 -1
- package/dist/m365/spo/commands/list/list-sensitivitylabel-remove.js +1 -1
- package/dist/m365/spo/commands/list/list-view-add.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-batch-add.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +3 -3
- package/dist/m365/spo/commands/listitem/listitem-batch-set.js +1 -1
- package/dist/m365/spo/commands/page/page-add.js +32 -69
- package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +74 -101
- package/dist/m365/spo/commands/page/page-column-get.js +15 -32
- package/dist/m365/spo/commands/page/page-column-list.js +14 -27
- package/dist/m365/spo/commands/page/page-control-get.js +18 -27
- package/dist/m365/spo/commands/page/page-control-list.js +13 -20
- package/dist/m365/spo/commands/page/page-control-remove.js +1 -1
- package/dist/m365/spo/commands/page/page-control-set.js +51 -61
- package/dist/m365/spo/commands/page/page-copy.js +15 -31
- package/dist/m365/spo/commands/page/page-header-set.js +25 -89
- package/dist/m365/spo/commands/page/page-list.js +12 -18
- package/dist/m365/spo/commands/page/page-remove.js +16 -39
- package/dist/m365/spo/commands/page/page-section-add.js +108 -173
- package/dist/m365/spo/commands/page/page-section-get.js +17 -27
- package/dist/m365/spo/commands/page/page-section-list.js +13 -20
- package/dist/m365/spo/commands/page/page-section-remove.js +4 -1
- package/dist/m365/spo/commands/page/page-set.js +50 -100
- package/dist/m365/spo/commands/page/page-template-list.js +12 -18
- package/dist/m365/spo/commands/page/page-text-add.js +23 -45
- package/dist/m365/spo/commands/propertybag/propertybag-get.js +14 -29
- package/dist/m365/spo/commands/propertybag/propertybag-list.js +13 -27
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +15 -32
- package/dist/m365/spo/commands/propertybag/propertybag-set.js +15 -31
- package/dist/m365/spo/commands/roledefinition/roledefinition-add.js +45 -44
- package/dist/m365/spo/commands/roledefinition/roledefinition-get.js +14 -25
- package/dist/m365/spo/commands/roledefinition/roledefinition-list.js +12 -18
- package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +15 -35
- package/dist/m365/spo/commands/site/site-hubsite-connect.js +1 -1
- package/dist/m365/spo/commands/tenant/tenant-site-get.js +1 -1
- package/dist/m365/spo/commands/user/user-get.js +1 -1
- package/dist/m365/spo/commands/web/web-rule-get.js +1 -1
- package/dist/m365/spo/commands/web/web-rule-list.js +2 -2
- package/dist/m365/spo/commands/web/web-rule-remove.js +1 -1
- package/dist/m365/spp/commands/autofillcolumn/autofillcolumn-set.js +2 -2
- package/dist/m365/spp/commands/model/model-apply.js +2 -2
- package/dist/m365/teams/commands/callrecord/callrecord-get.js +1 -1
- package/dist/m365/teams/commands/callrecord/callrecord-list.js +1 -1
- package/dist/m365/teams/commands/chat/chatUtil.js +1 -1
- package/dist/m365/viva/commands/connections/connections-app-create.js +36 -42
- package/dist/m365/viva/commands/engage/engage-community-add.js +75 -71
- package/dist/m365/viva/commands/engage/engage-community-get.js +8 -16
- package/dist/m365/viva/commands/engage/engage-community-list.js +5 -0
- package/dist/m365/viva/commands/engage/engage-community-remove.js +28 -48
- package/dist/m365/viva/commands/engage/engage-community-set.js +43 -66
- package/dist/m365/viva/commands/engage/engage-community-user-add.js +8 -13
- package/dist/m365/viva/commands/engage/engage-community-user-list.js +1 -1
- package/dist/m365/viva/commands/engage/engage-community-user-remove.js +4 -2
- package/dist/m365/viva/commands/engage/engage-message-add.js +22 -52
- package/dist/m365/viva/commands/engage/engage-message-get.js +8 -23
- package/dist/m365/viva/commands/engage/engage-message-like-set.js +10 -39
- package/dist/m365/viva/commands/engage/engage-message-list.js +22 -66
- package/dist/m365/viva/commands/engage/engage-message-remove.js +9 -32
- package/dist/m365/viva/commands/engage/engage-network-list.js +8 -22
- package/dist/m365/viva/commands/engage/engage-report-activitycounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-activityusercounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-activityuserdetail.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-deviceusagedistributionusercounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-deviceusageusercounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-deviceusageuserdetail.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitycounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitydetail.js +2 -1
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitygroupcounts.js +2 -1
- package/dist/m365/viva/commands/engage/engage-role-list.js +5 -0
- package/dist/m365/viva/commands/engage/engage-role-member-add.js +3 -5
- package/dist/m365/viva/commands/engage/engage-role-member-list.js +1 -1
- package/dist/m365/viva/commands/engage/engage-role-member-remove.js +4 -2
- package/dist/m365/viva/commands/engage/engage-search.js +16 -65
- package/dist/m365/viva/commands/engage/engage-user-get.js +15 -33
- package/dist/m365/viva/commands/engage/engage-user-list.js +22 -57
- package/dist/utils/formatting.js +5 -4
- package/dist/utils/zod.js +2 -1
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-add.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-batch-add.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-batch-remove.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-batch-set.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-get.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-isrecord.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-list.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-declare.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-lock.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-undeclare.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-unlock.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-remove.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-retentionlabel-ensure.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-retentionlabel-remove.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-add.mdx +23 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.mdx +23 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-break.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-reset.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-set.mdx +19 -0
- package/docs/docs/cmd/spo/page/page-text-add.mdx +1 -1
- package/docs/docs/cmd/spo/user/user-get.mdx +5 -0
- package/docs/docs/cmd/viva/engage/engage-community-add.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-community-get.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-community-remove.mdx +21 -0
- package/docs/docs/cmd/viva/engage/engage-community-set.mdx +19 -0
- package/npm-shrinkwrap.json +592 -929
- package/package.json +32 -31
|
@@ -1,14 +1,23 @@
|
|
|
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 _SpoPageSectionGetCommand_instances, _SpoPageSectionGetCommand_initOptions, _SpoPageSectionGetCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import { validation } from '../../../../utils/validation.js';
|
|
9
5
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
11
7
|
import { Page } from './Page.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
webUrl: z.string()
|
|
11
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
12
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
13
|
+
})
|
|
14
|
+
.alias('u'),
|
|
15
|
+
pageName: z.string().alias('n'),
|
|
16
|
+
section: z.number()
|
|
17
|
+
.int()
|
|
18
|
+
.min(1, { error: 'The value of parameter section must be 1 or higher' })
|
|
19
|
+
.alias('s')
|
|
20
|
+
});
|
|
12
21
|
class SpoPageSectionGetCommand extends SpoCommand {
|
|
13
22
|
get name() {
|
|
14
23
|
return commands.PAGE_SECTION_GET;
|
|
@@ -16,11 +25,8 @@ class SpoPageSectionGetCommand extends SpoCommand {
|
|
|
16
25
|
get description() {
|
|
17
26
|
return 'Gets information about the specified modern page section';
|
|
18
27
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_SpoPageSectionGetCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoPageSectionGetCommand_instances, "m", _SpoPageSectionGetCommand_initOptions).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoPageSectionGetCommand_instances, "m", _SpoPageSectionGetCommand_initValidators).call(this);
|
|
28
|
+
get schema() {
|
|
29
|
+
return options;
|
|
24
30
|
}
|
|
25
31
|
async commandAction(logger, args) {
|
|
26
32
|
try {
|
|
@@ -37,21 +43,5 @@ class SpoPageSectionGetCommand extends SpoCommand {
|
|
|
37
43
|
}
|
|
38
44
|
}
|
|
39
45
|
}
|
|
40
|
-
_SpoPageSectionGetCommand_instances = new WeakSet(), _SpoPageSectionGetCommand_initOptions = function _SpoPageSectionGetCommand_initOptions() {
|
|
41
|
-
this.options.unshift({
|
|
42
|
-
option: '-u, --webUrl <webUrl>'
|
|
43
|
-
}, {
|
|
44
|
-
option: '-n, --pageName <pageName>'
|
|
45
|
-
}, {
|
|
46
|
-
option: '-s, --section <section>'
|
|
47
|
-
});
|
|
48
|
-
}, _SpoPageSectionGetCommand_initValidators = function _SpoPageSectionGetCommand_initValidators() {
|
|
49
|
-
this.validators.push(async (args) => {
|
|
50
|
-
if (isNaN(args.options.section)) {
|
|
51
|
-
return `${args.options.section} is not a number`;
|
|
52
|
-
}
|
|
53
|
-
return validation.isValidSharePointUrl(args.options.webUrl);
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
46
|
export default new SpoPageSectionGetCommand();
|
|
57
47
|
//# sourceMappingURL=page-section-get.js.map
|
|
@@ -1,14 +1,19 @@
|
|
|
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 _SpoPageSectionListCommand_instances, _SpoPageSectionListCommand_initOptions, _SpoPageSectionListCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import { validation } from '../../../../utils/validation.js';
|
|
9
5
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
11
7
|
import { Page } from './Page.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
webUrl: z.string()
|
|
11
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
12
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
13
|
+
})
|
|
14
|
+
.alias('u'),
|
|
15
|
+
pageName: z.string().alias('n')
|
|
16
|
+
});
|
|
12
17
|
class SpoPageSectionListCommand extends SpoCommand {
|
|
13
18
|
get name() {
|
|
14
19
|
return commands.PAGE_SECTION_LIST;
|
|
@@ -16,11 +21,8 @@ class SpoPageSectionListCommand extends SpoCommand {
|
|
|
16
21
|
get description() {
|
|
17
22
|
return 'Lists sections in the specific modern page';
|
|
18
23
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_SpoPageSectionListCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoPageSectionListCommand_instances, "m", _SpoPageSectionListCommand_initOptions).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoPageSectionListCommand_instances, "m", _SpoPageSectionListCommand_initValidators).call(this);
|
|
24
|
+
get schema() {
|
|
25
|
+
return options;
|
|
24
26
|
}
|
|
25
27
|
async commandAction(logger, args) {
|
|
26
28
|
try {
|
|
@@ -49,14 +51,5 @@ class SpoPageSectionListCommand extends SpoCommand {
|
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
|
-
_SpoPageSectionListCommand_instances = new WeakSet(), _SpoPageSectionListCommand_initOptions = function _SpoPageSectionListCommand_initOptions() {
|
|
53
|
-
this.options.unshift({
|
|
54
|
-
option: '-u, --webUrl <webUrl>'
|
|
55
|
-
}, {
|
|
56
|
-
option: '-n, --pageName <pageName>'
|
|
57
|
-
});
|
|
58
|
-
}, _SpoPageSectionListCommand_initValidators = function _SpoPageSectionListCommand_initValidators() {
|
|
59
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
|
|
60
|
-
};
|
|
61
54
|
export default new SpoPageSectionListCommand();
|
|
62
55
|
//# sourceMappingURL=page-section-list.js.map
|
|
@@ -16,7 +16,10 @@ export const options = z.strictObject({
|
|
|
16
16
|
})
|
|
17
17
|
.alias('u'),
|
|
18
18
|
pageName: z.string().alias('n'),
|
|
19
|
-
section: z.number()
|
|
19
|
+
section: z.number()
|
|
20
|
+
.int()
|
|
21
|
+
.min(1, { error: 'The value of parameter section must be 1 or higher' })
|
|
22
|
+
.alias('s'),
|
|
20
23
|
force: z.boolean().optional().alias('f')
|
|
21
24
|
});
|
|
22
25
|
class SpoPageSectionRemoveCommand extends SpoCommand {
|
|
@@ -1,10 +1,6 @@
|
|
|
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 _SpoPageSetCommand_instances, _SpoPageSetCommand_initTelemetry, _SpoPageSetCommand_initOptions, _SpoPageSetCommand_initTypes, _SpoPageSetCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { Auth } from '../../../../Auth.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';
|
|
@@ -13,6 +9,37 @@ import { validation } from '../../../../utils/validation.js';
|
|
|
13
9
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
14
10
|
import commands from '../../commands.js';
|
|
15
11
|
import { Page, supportedPageLayouts, supportedPromoteAs } from './Page.js';
|
|
12
|
+
export const options = z.strictObject({
|
|
13
|
+
...globalOptionsZod.shape,
|
|
14
|
+
webUrl: z.string()
|
|
15
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
16
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
17
|
+
})
|
|
18
|
+
.alias('u'),
|
|
19
|
+
name: z.string().alias('n'),
|
|
20
|
+
layoutType: z.enum(supportedPageLayouts).optional().alias('l'),
|
|
21
|
+
promoteAs: z.enum(supportedPromoteAs).optional().alias('p'),
|
|
22
|
+
demoteFrom: z.enum(['NewsPage']).optional(),
|
|
23
|
+
commentsEnabled: z.boolean().optional().autocomplete(['true', 'false']),
|
|
24
|
+
publish: z.boolean().optional(),
|
|
25
|
+
publishMessage: z.string().optional(),
|
|
26
|
+
description: z.string().optional(),
|
|
27
|
+
title: z.string().optional(),
|
|
28
|
+
content: z.string()
|
|
29
|
+
.refine(content => {
|
|
30
|
+
try {
|
|
31
|
+
JSON.parse(content);
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
error: 'Specified content is not a valid JSON string.'
|
|
39
|
+
})
|
|
40
|
+
.optional(),
|
|
41
|
+
isRetired: z.boolean().optional().autocomplete(['true', 'false'])
|
|
42
|
+
});
|
|
16
43
|
class SpoPageSetCommand extends SpoCommand {
|
|
17
44
|
get name() {
|
|
18
45
|
return commands.PAGE_SET;
|
|
@@ -20,13 +47,23 @@ class SpoPageSetCommand extends SpoCommand {
|
|
|
20
47
|
get description() {
|
|
21
48
|
return 'Updates modern page properties';
|
|
22
49
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
50
|
+
get schema() {
|
|
51
|
+
return options;
|
|
52
|
+
}
|
|
53
|
+
getRefinedSchema(schema) {
|
|
54
|
+
return schema
|
|
55
|
+
.refine(opts => !!(opts.layoutType || opts.promoteAs || opts.demoteFrom || opts.commentsEnabled !== undefined ||
|
|
56
|
+
opts.publish || opts.description || opts.title || opts.content || opts.isRetired !== undefined), {
|
|
57
|
+
error: 'Specify at least one option to update.'
|
|
58
|
+
})
|
|
59
|
+
.refine(opts => opts.promoteAs !== 'HomePage' || opts.layoutType === 'Home', {
|
|
60
|
+
error: 'You can only promote home pages as site home page',
|
|
61
|
+
path: ['promoteAs']
|
|
62
|
+
})
|
|
63
|
+
.refine(opts => opts.promoteAs !== 'NewsPage' || !opts.layoutType || opts.layoutType === 'Article', {
|
|
64
|
+
error: 'You can only promote article pages as news article',
|
|
65
|
+
path: ['promoteAs']
|
|
66
|
+
});
|
|
30
67
|
}
|
|
31
68
|
async commandAction(logger, args) {
|
|
32
69
|
const resource = Auth.getResourceFromUrl(args.options.webUrl);
|
|
@@ -231,92 +268,5 @@ class SpoPageSetCommand extends SpoCommand {
|
|
|
231
268
|
}
|
|
232
269
|
}
|
|
233
270
|
}
|
|
234
|
-
_SpoPageSetCommand_instances = new WeakSet(), _SpoPageSetCommand_initTelemetry = function _SpoPageSetCommand_initTelemetry() {
|
|
235
|
-
this.telemetry.push((args) => {
|
|
236
|
-
Object.assign(this.telemetryProperties, {
|
|
237
|
-
layoutType: args.options.layoutType || false,
|
|
238
|
-
promoteAs: args.options.promoteAs || false,
|
|
239
|
-
demotefrom: args.options.demoteFrom || false,
|
|
240
|
-
commentsEnabled: args.options.commentsEnabled || false,
|
|
241
|
-
publish: args.options.publish || false,
|
|
242
|
-
publishMessage: typeof args.options.publishMessage !== 'undefined',
|
|
243
|
-
description: typeof args.options.description !== 'undefined',
|
|
244
|
-
title: typeof args.options.title !== 'undefined',
|
|
245
|
-
content: typeof args.options.content !== 'undefined',
|
|
246
|
-
isRetired: typeof args.options.isRetired !== 'undefined'
|
|
247
|
-
});
|
|
248
|
-
});
|
|
249
|
-
}, _SpoPageSetCommand_initOptions = function _SpoPageSetCommand_initOptions() {
|
|
250
|
-
this.options.unshift({
|
|
251
|
-
option: '-n, --name <name>'
|
|
252
|
-
}, {
|
|
253
|
-
option: '-u, --webUrl <webUrl>'
|
|
254
|
-
}, {
|
|
255
|
-
option: '-l, --layoutType [layoutType]',
|
|
256
|
-
autocomplete: supportedPageLayouts
|
|
257
|
-
}, {
|
|
258
|
-
option: '-p, --promoteAs [promoteAs]',
|
|
259
|
-
autocomplete: supportedPromoteAs
|
|
260
|
-
}, {
|
|
261
|
-
option: '--demoteFrom [demoteFrom]',
|
|
262
|
-
autocomplete: ['NewsPage']
|
|
263
|
-
}, {
|
|
264
|
-
option: '--commentsEnabled [commentsEnabled]',
|
|
265
|
-
autocomplete: ['true', 'false']
|
|
266
|
-
}, {
|
|
267
|
-
option: '--publish'
|
|
268
|
-
}, {
|
|
269
|
-
option: '--publishMessage [publishMessage]'
|
|
270
|
-
}, {
|
|
271
|
-
option: '--description [description]'
|
|
272
|
-
}, {
|
|
273
|
-
option: '--title [title]'
|
|
274
|
-
}, {
|
|
275
|
-
option: '--content [content]'
|
|
276
|
-
}, {
|
|
277
|
-
option: '--isRetired [isRetired]',
|
|
278
|
-
autocomplete: ['true', 'false']
|
|
279
|
-
});
|
|
280
|
-
}, _SpoPageSetCommand_initTypes = function _SpoPageSetCommand_initTypes() {
|
|
281
|
-
this.types.boolean.push('commentsEnabled', 'isRetired');
|
|
282
|
-
}, _SpoPageSetCommand_initValidators = function _SpoPageSetCommand_initValidators() {
|
|
283
|
-
this.validators.push(async (args) => {
|
|
284
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
285
|
-
if (isValidSharePointUrl !== true) {
|
|
286
|
-
return isValidSharePointUrl;
|
|
287
|
-
}
|
|
288
|
-
if (!args.options.layoutType && !args.options.promoteAs && !args.options.demoteFrom && args.options.commentsEnabled === undefined &&
|
|
289
|
-
!args.options.publish && !args.options.description && !args.options.title && !args.options.content && args.options.isRetired === undefined) {
|
|
290
|
-
return 'Specify at least one option to update.';
|
|
291
|
-
}
|
|
292
|
-
if (args.options.layoutType &&
|
|
293
|
-
supportedPageLayouts.indexOf(args.options.layoutType) < 0) {
|
|
294
|
-
return `${args.options.layoutType} is not a valid option for layoutType. Allowed values ${supportedPageLayouts.join(', ')}`;
|
|
295
|
-
}
|
|
296
|
-
if (args.options.promoteAs &&
|
|
297
|
-
supportedPromoteAs.indexOf(args.options.promoteAs) < 0) {
|
|
298
|
-
return `${args.options.promoteAs} is not a valid option for promoteAs. Allowed values ${supportedPromoteAs.join(', ')}`;
|
|
299
|
-
}
|
|
300
|
-
if (args.options.demoteFrom &&
|
|
301
|
-
args.options.demoteFrom !== 'NewsPage') {
|
|
302
|
-
return `${args.options.demoteFrom} is not a valid option for demoteFrom. The only allowed value is 'NewsPage'`;
|
|
303
|
-
}
|
|
304
|
-
if (args.options.promoteAs === 'HomePage' && args.options.layoutType !== 'Home') {
|
|
305
|
-
return 'You can only promote home pages as site home page';
|
|
306
|
-
}
|
|
307
|
-
if (args.options.promoteAs === 'NewsPage' && args.options.layoutType && args.options.layoutType !== 'Article') {
|
|
308
|
-
return 'You can only promote article pages as news article';
|
|
309
|
-
}
|
|
310
|
-
if (args.options.content) {
|
|
311
|
-
try {
|
|
312
|
-
JSON.parse(args.options.content);
|
|
313
|
-
}
|
|
314
|
-
catch (e) {
|
|
315
|
-
return `Specified content is not a valid JSON string. Input: ${args.options.content}. Error: ${e}`;
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
return true;
|
|
319
|
-
});
|
|
320
|
-
};
|
|
321
271
|
export default new SpoPageSetCommand();
|
|
322
272
|
//# sourceMappingURL=page-set.js.map
|
|
@@ -1,13 +1,17 @@
|
|
|
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 _SpoPageTemplateListCommand_instances, _SpoPageTemplateListCommand_initOptions, _SpoPageTemplateListCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { odata } from '../../../../utils/odata.js';
|
|
8
4
|
import { validation } from '../../../../utils/validation.js';
|
|
9
5
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
webUrl: z.string()
|
|
10
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
11
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
12
|
+
})
|
|
13
|
+
.alias('u')
|
|
14
|
+
});
|
|
11
15
|
class SpoPageTemplateListCommand extends SpoCommand {
|
|
12
16
|
get name() {
|
|
13
17
|
return commands.PAGE_TEMPLATE_LIST;
|
|
@@ -18,11 +22,8 @@ class SpoPageTemplateListCommand extends SpoCommand {
|
|
|
18
22
|
defaultProperties() {
|
|
19
23
|
return ['Title', 'FileName', 'Id', 'PageLayoutType', 'Url'];
|
|
20
24
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_SpoPageTemplateListCommand_instances.add(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoPageTemplateListCommand_instances, "m", _SpoPageTemplateListCommand_initOptions).call(this);
|
|
25
|
-
__classPrivateFieldGet(this, _SpoPageTemplateListCommand_instances, "m", _SpoPageTemplateListCommand_initValidators).call(this);
|
|
25
|
+
get schema() {
|
|
26
|
+
return options;
|
|
26
27
|
}
|
|
27
28
|
async commandAction(logger, args) {
|
|
28
29
|
if (this.verbose) {
|
|
@@ -42,12 +43,5 @@ class SpoPageTemplateListCommand extends SpoCommand {
|
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
_SpoPageTemplateListCommand_instances = new WeakSet(), _SpoPageTemplateListCommand_initOptions = function _SpoPageTemplateListCommand_initOptions() {
|
|
46
|
-
this.options.unshift({
|
|
47
|
-
option: '-u, --webUrl <webUrl>'
|
|
48
|
-
});
|
|
49
|
-
}, _SpoPageTemplateListCommand_initValidators = function _SpoPageTemplateListCommand_initValidators() {
|
|
50
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
|
|
51
|
-
};
|
|
52
46
|
export default new SpoPageTemplateListCommand();
|
|
53
47
|
//# sourceMappingURL=page-template-list.js.map
|
|
@@ -1,9 +1,5 @@
|
|
|
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 _SpoPageTextAddCommand_instances, _SpoPageTextAddCommand_initTelemetry, _SpoPageTextAddCommand_initOptions, _SpoPageTextAddCommand_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
5
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
@@ -12,6 +8,25 @@ import SpoCommand from '../../../base/SpoCommand.js';
|
|
|
12
8
|
import commands from '../../commands.js';
|
|
13
9
|
import { CanvasSection, ClientSideText } from './clientsidepages.js';
|
|
14
10
|
import { Page } from './Page.js';
|
|
11
|
+
export const options = z.strictObject({
|
|
12
|
+
...globalOptionsZod.shape,
|
|
13
|
+
webUrl: z.string()
|
|
14
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
15
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
16
|
+
})
|
|
17
|
+
.alias('u'),
|
|
18
|
+
pageName: z.string().alias('n'),
|
|
19
|
+
text: z.string().alias('t'),
|
|
20
|
+
section: z.number()
|
|
21
|
+
.int()
|
|
22
|
+
.min(1, { error: 'The value of parameter section must be 1 or higher' })
|
|
23
|
+
.optional(),
|
|
24
|
+
column: z.number()
|
|
25
|
+
.int()
|
|
26
|
+
.min(1, { error: 'The value of parameter column must be 1 or higher' })
|
|
27
|
+
.optional(),
|
|
28
|
+
order: z.number().int().min(1, { error: 'The value of parameter order must be 1 or higher' }).optional()
|
|
29
|
+
});
|
|
15
30
|
class SpoPageTextAddCommand extends SpoCommand {
|
|
16
31
|
get name() {
|
|
17
32
|
return commands.PAGE_TEXT_ADD;
|
|
@@ -19,12 +34,8 @@ class SpoPageTextAddCommand extends SpoCommand {
|
|
|
19
34
|
get description() {
|
|
20
35
|
return 'Adds text to a modern page';
|
|
21
36
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_SpoPageTextAddCommand_instances.add(this);
|
|
25
|
-
__classPrivateFieldGet(this, _SpoPageTextAddCommand_instances, "m", _SpoPageTextAddCommand_initTelemetry).call(this);
|
|
26
|
-
__classPrivateFieldGet(this, _SpoPageTextAddCommand_instances, "m", _SpoPageTextAddCommand_initOptions).call(this);
|
|
27
|
-
__classPrivateFieldGet(this, _SpoPageTextAddCommand_instances, "m", _SpoPageTextAddCommand_initValidators).call(this);
|
|
37
|
+
get schema() {
|
|
38
|
+
return options;
|
|
28
39
|
}
|
|
29
40
|
async commandAction(logger, args) {
|
|
30
41
|
let pageName = args.options.pageName;
|
|
@@ -100,38 +111,5 @@ class SpoPageTextAddCommand extends SpoCommand {
|
|
|
100
111
|
return request.post(requestOptions);
|
|
101
112
|
}
|
|
102
113
|
}
|
|
103
|
-
_SpoPageTextAddCommand_instances = new WeakSet(), _SpoPageTextAddCommand_initTelemetry = function _SpoPageTextAddCommand_initTelemetry() {
|
|
104
|
-
this.telemetry.push((args) => {
|
|
105
|
-
Object.assign(this.telemetryProperties, {
|
|
106
|
-
section: typeof args.options.section !== 'undefined',
|
|
107
|
-
column: typeof args.options.column !== 'undefined',
|
|
108
|
-
order: typeof args.options.order !== 'undefined'
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
}, _SpoPageTextAddCommand_initOptions = function _SpoPageTextAddCommand_initOptions() {
|
|
112
|
-
this.options.unshift({
|
|
113
|
-
option: '-u, --webUrl <webUrl>'
|
|
114
|
-
}, {
|
|
115
|
-
option: '-n, --pageName <pageName>'
|
|
116
|
-
}, {
|
|
117
|
-
option: '-t, --text <text>'
|
|
118
|
-
}, {
|
|
119
|
-
option: '--section [section]'
|
|
120
|
-
}, {
|
|
121
|
-
option: '--column [column]'
|
|
122
|
-
}, {
|
|
123
|
-
option: '--order [order]'
|
|
124
|
-
});
|
|
125
|
-
}, _SpoPageTextAddCommand_initValidators = function _SpoPageTextAddCommand_initValidators() {
|
|
126
|
-
this.validators.push(async (args) => {
|
|
127
|
-
if (args.options.section && (!Number.isInteger(args.options.section) || args.options.section < 1)) {
|
|
128
|
-
return 'The value of parameter section must be 1 or higher';
|
|
129
|
-
}
|
|
130
|
-
if (args.options.column && (!Number.isInteger(args.options.column) || args.options.column < 1)) {
|
|
131
|
-
return 'The value of parameter column must be 1 or higher';
|
|
132
|
-
}
|
|
133
|
-
return validation.isValidSharePointUrl(args.options.webUrl);
|
|
134
|
-
});
|
|
135
|
-
};
|
|
136
114
|
export default new SpoPageTextAddCommand();
|
|
137
115
|
//# sourceMappingURL=page-text-add.js.map
|
|
@@ -1,13 +1,19 @@
|
|
|
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 _SpoPropertyBagGetCommand_instances, _SpoPropertyBagGetCommand_initTelemetry, _SpoPropertyBagGetCommand_initOptions, _SpoPropertyBagGetCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { spo } from '../../../../utils/spo.js';
|
|
8
4
|
import { validation } from '../../../../utils/validation.js';
|
|
9
5
|
import commands from '../../commands.js';
|
|
10
6
|
import { SpoPropertyBagBaseCommand } from './propertybag-base.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
webUrl: z.string()
|
|
10
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
11
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
12
|
+
})
|
|
13
|
+
.alias('u'),
|
|
14
|
+
key: z.string().alias('k'),
|
|
15
|
+
folder: z.string().optional()
|
|
16
|
+
});
|
|
11
17
|
class SpoPropertyBagGetCommand extends SpoPropertyBagBaseCommand {
|
|
12
18
|
get name() {
|
|
13
19
|
return commands.PROPERTYBAG_GET;
|
|
@@ -15,12 +21,8 @@ class SpoPropertyBagGetCommand extends SpoPropertyBagBaseCommand {
|
|
|
15
21
|
get description() {
|
|
16
22
|
return 'Gets the value of the specified property from the property bag';
|
|
17
23
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_SpoPropertyBagGetCommand_instances.add(this);
|
|
21
|
-
__classPrivateFieldGet(this, _SpoPropertyBagGetCommand_instances, "m", _SpoPropertyBagGetCommand_initTelemetry).call(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoPropertyBagGetCommand_instances, "m", _SpoPropertyBagGetCommand_initOptions).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoPropertyBagGetCommand_instances, "m", _SpoPropertyBagGetCommand_initValidators).call(this);
|
|
24
|
+
get schema() {
|
|
25
|
+
return options;
|
|
24
26
|
}
|
|
25
27
|
async commandAction(logger, args) {
|
|
26
28
|
try {
|
|
@@ -61,22 +63,5 @@ class SpoPropertyBagGetCommand extends SpoPropertyBagBaseCommand {
|
|
|
61
63
|
return null;
|
|
62
64
|
}
|
|
63
65
|
}
|
|
64
|
-
_SpoPropertyBagGetCommand_instances = new WeakSet(), _SpoPropertyBagGetCommand_initTelemetry = function _SpoPropertyBagGetCommand_initTelemetry() {
|
|
65
|
-
this.telemetry.push((args) => {
|
|
66
|
-
Object.assign(this.telemetryProperties, {
|
|
67
|
-
folder: typeof args.options.folder !== 'undefined'
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
}, _SpoPropertyBagGetCommand_initOptions = function _SpoPropertyBagGetCommand_initOptions() {
|
|
71
|
-
this.options.unshift({
|
|
72
|
-
option: '-u, --webUrl <webUrl>'
|
|
73
|
-
}, {
|
|
74
|
-
option: '-k, --key <key>'
|
|
75
|
-
}, {
|
|
76
|
-
option: '--folder [folder]'
|
|
77
|
-
});
|
|
78
|
-
}, _SpoPropertyBagGetCommand_initValidators = function _SpoPropertyBagGetCommand_initValidators() {
|
|
79
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
|
|
80
|
-
};
|
|
81
66
|
export default new SpoPropertyBagGetCommand();
|
|
82
67
|
//# sourceMappingURL=propertybag-get.js.map
|
|
@@ -1,13 +1,18 @@
|
|
|
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 _SpoPropertyBagListCommand_instances, _SpoPropertyBagListCommand_initTelemetry, _SpoPropertyBagListCommand_initOptions, _SpoPropertyBagListCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { spo } from '../../../../utils/spo.js';
|
|
8
4
|
import { validation } from '../../../../utils/validation.js';
|
|
9
5
|
import commands from '../../commands.js';
|
|
10
6
|
import { SpoPropertyBagBaseCommand } from './propertybag-base.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
webUrl: z.string()
|
|
10
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
11
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
12
|
+
})
|
|
13
|
+
.alias('u'),
|
|
14
|
+
folder: z.string().optional()
|
|
15
|
+
});
|
|
11
16
|
class SpoPropertyBagListCommand extends SpoPropertyBagBaseCommand {
|
|
12
17
|
get name() {
|
|
13
18
|
return commands.PROPERTYBAG_LIST;
|
|
@@ -15,12 +20,8 @@ class SpoPropertyBagListCommand extends SpoPropertyBagBaseCommand {
|
|
|
15
20
|
get description() {
|
|
16
21
|
return 'Gets property bag values';
|
|
17
22
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_SpoPropertyBagListCommand_instances.add(this);
|
|
21
|
-
__classPrivateFieldGet(this, _SpoPropertyBagListCommand_instances, "m", _SpoPropertyBagListCommand_initTelemetry).call(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoPropertyBagListCommand_instances, "m", _SpoPropertyBagListCommand_initOptions).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _SpoPropertyBagListCommand_instances, "m", _SpoPropertyBagListCommand_initValidators).call(this);
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
24
25
|
}
|
|
25
26
|
async commandAction(logger, args) {
|
|
26
27
|
try {
|
|
@@ -61,20 +62,5 @@ class SpoPropertyBagListCommand extends SpoPropertyBagBaseCommand {
|
|
|
61
62
|
return result;
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
|
-
_SpoPropertyBagListCommand_instances = new WeakSet(), _SpoPropertyBagListCommand_initTelemetry = function _SpoPropertyBagListCommand_initTelemetry() {
|
|
65
|
-
this.telemetry.push((args) => {
|
|
66
|
-
Object.assign(this.telemetryProperties, {
|
|
67
|
-
folder: typeof args.options.folder !== 'undefined'
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
}, _SpoPropertyBagListCommand_initOptions = function _SpoPropertyBagListCommand_initOptions() {
|
|
71
|
-
this.options.unshift({
|
|
72
|
-
option: '-u, --webUrl <webUrl>'
|
|
73
|
-
}, {
|
|
74
|
-
option: '--folder [folder]'
|
|
75
|
-
});
|
|
76
|
-
}, _SpoPropertyBagListCommand_initValidators = function _SpoPropertyBagListCommand_initValidators() {
|
|
77
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
|
|
78
|
-
};
|
|
79
65
|
export default new SpoPropertyBagListCommand();
|
|
80
66
|
//# sourceMappingURL=propertybag-list.js.map
|
|
@@ -1,17 +1,24 @@
|
|
|
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 _SpoPropertyBagRemoveCommand_instances, _SpoPropertyBagRemoveCommand_initTelemetry, _SpoPropertyBagRemoveCommand_initOptions, _SpoPropertyBagRemoveCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
8
3
|
import config from '../../../../config.js';
|
|
4
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
9
5
|
import request from '../../../../request.js';
|
|
10
6
|
import { formatting } from '../../../../utils/formatting.js';
|
|
11
7
|
import { spo } from '../../../../utils/spo.js';
|
|
12
8
|
import { validation } from '../../../../utils/validation.js';
|
|
13
9
|
import commands from '../../commands.js';
|
|
14
10
|
import { SpoPropertyBagBaseCommand } from './propertybag-base.js';
|
|
11
|
+
export const options = z.strictObject({
|
|
12
|
+
...globalOptionsZod.shape,
|
|
13
|
+
webUrl: z.string()
|
|
14
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
15
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
16
|
+
})
|
|
17
|
+
.alias('u'),
|
|
18
|
+
key: z.string().alias('k'),
|
|
19
|
+
folder: z.string().optional(),
|
|
20
|
+
force: z.boolean().optional().alias('f')
|
|
21
|
+
});
|
|
15
22
|
class SpoPropertyBagRemoveCommand extends SpoPropertyBagBaseCommand {
|
|
16
23
|
get name() {
|
|
17
24
|
return commands.PROPERTYBAG_REMOVE;
|
|
@@ -19,12 +26,8 @@ class SpoPropertyBagRemoveCommand extends SpoPropertyBagBaseCommand {
|
|
|
19
26
|
get description() {
|
|
20
27
|
return 'Removes specified property from the property bag';
|
|
21
28
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_SpoPropertyBagRemoveCommand_instances.add(this);
|
|
25
|
-
__classPrivateFieldGet(this, _SpoPropertyBagRemoveCommand_instances, "m", _SpoPropertyBagRemoveCommand_initTelemetry).call(this);
|
|
26
|
-
__classPrivateFieldGet(this, _SpoPropertyBagRemoveCommand_instances, "m", _SpoPropertyBagRemoveCommand_initOptions).call(this);
|
|
27
|
-
__classPrivateFieldGet(this, _SpoPropertyBagRemoveCommand_instances, "m", _SpoPropertyBagRemoveCommand_initValidators).call(this);
|
|
29
|
+
get schema() {
|
|
30
|
+
return options;
|
|
28
31
|
}
|
|
29
32
|
async commandAction(logger, args) {
|
|
30
33
|
if (args.options.force) {
|
|
@@ -76,25 +79,5 @@ class SpoPropertyBagRemoveCommand extends SpoPropertyBagBaseCommand {
|
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
|
-
_SpoPropertyBagRemoveCommand_instances = new WeakSet(), _SpoPropertyBagRemoveCommand_initTelemetry = function _SpoPropertyBagRemoveCommand_initTelemetry() {
|
|
80
|
-
this.telemetry.push((args) => {
|
|
81
|
-
Object.assign(this.telemetryProperties, {
|
|
82
|
-
folder: (!(!args.options.folder)).toString(),
|
|
83
|
-
force: args.options.force === true
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
}, _SpoPropertyBagRemoveCommand_initOptions = function _SpoPropertyBagRemoveCommand_initOptions() {
|
|
87
|
-
this.options.unshift({
|
|
88
|
-
option: '-u, --webUrl <webUrl>'
|
|
89
|
-
}, {
|
|
90
|
-
option: '-k, --key <key>'
|
|
91
|
-
}, {
|
|
92
|
-
option: '--folder [folder]'
|
|
93
|
-
}, {
|
|
94
|
-
option: '-f, --force'
|
|
95
|
-
});
|
|
96
|
-
}, _SpoPropertyBagRemoveCommand_initValidators = function _SpoPropertyBagRemoveCommand_initValidators() {
|
|
97
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
|
|
98
|
-
};
|
|
99
82
|
export default new SpoPropertyBagRemoveCommand();
|
|
100
83
|
//# sourceMappingURL=propertybag-remove.js.map
|