@pnp/cli-microsoft365 5.7.0 → 5.8.0-beta.119711d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Command.js +48 -35
- package/dist/cli/Cli.js +31 -25
- package/dist/m365/aad/commands/app/app-add.js +30 -30
- package/dist/m365/aad/commands/app/app-get.js +16 -20
- package/dist/m365/aad/commands/app/app-remove.js +38 -46
- package/dist/m365/aad/commands/app/app-role-add.js +34 -36
- package/dist/m365/aad/commands/app/app-role-list.js +15 -23
- package/dist/m365/aad/commands/app/app-role-remove.js +27 -44
- package/dist/m365/aad/commands/app/app-set.js +16 -18
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +93 -101
- package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +42 -49
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +93 -99
- package/dist/m365/aad/commands/group/group-list.js +35 -23
- package/dist/m365/aad/commands/groupsetting/groupsetting-add.js +33 -32
- package/dist/m365/aad/commands/groupsetting/groupsetting-get.js +17 -14
- package/dist/m365/aad/commands/groupsetting/groupsetting-list.js +19 -7
- package/dist/m365/aad/commands/groupsetting/groupsetting-remove.js +30 -29
- package/dist/m365/aad/commands/groupsetting/groupsetting-set.js +33 -30
- package/dist/m365/aad/commands/groupsettingtemplate/groupsettingtemplate-get.js +18 -20
- package/dist/m365/aad/commands/groupsettingtemplate/groupsettingtemplate-list.js +19 -7
- package/dist/m365/aad/commands/o365group/o365group-add.js +85 -96
- package/dist/m365/aad/commands/o365group/o365group-conversation-list.js +10 -7
- package/dist/m365/aad/commands/o365group/o365group-conversation-post-list.js +15 -18
- package/dist/m365/aad/commands/o365group/o365group-get.js +20 -25
- package/dist/m365/aad/commands/o365group/o365group-list.js +38 -43
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-clear.js +31 -19
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-list.js +24 -12
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-remove.js +30 -33
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-restore.js +21 -18
- package/dist/m365/aad/commands/o365group/o365group-remove.js +38 -40
- package/dist/m365/aad/commands/o365group/o365group-renew.js +17 -12
- package/dist/m365/aad/commands/o365group/o365group-set.js +96 -114
- package/dist/m365/aad/commands/o365group/o365group-teamify.js +35 -35
- package/dist/m365/aad/commands/o365group/o365group-user-add.js +31 -31
- package/dist/m365/aad/commands/o365group/o365group-user-list.js +15 -17
- package/dist/m365/aad/commands/o365group/o365group-user-remove.js +61 -67
- package/dist/m365/aad/commands/o365group/o365group-user-set.js +63 -67
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-add.js +25 -20
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-list.js +21 -18
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-remove.js +41 -31
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-set.js +30 -16
- package/dist/m365/aad/commands/policy/policy-list.js +22 -23
- package/dist/m365/aad/commands/siteclassification/siteclassification-disable.js +60 -52
- package/dist/m365/aad/commands/siteclassification/siteclassification-enable.js +84 -72
- package/dist/m365/aad/commands/siteclassification/siteclassification-get.js +66 -57
- package/dist/m365/aad/commands/siteclassification/siteclassification-set.js +96 -93
- package/dist/m365/aad/commands/sp/sp-add.js +26 -29
- package/dist/m365/aad/commands/sp/sp-get.js +26 -29
- package/dist/m365/aad/commands/user/user-get.js +41 -46
- package/dist/m365/aad/commands/user/user-hibp.js +21 -22
- package/dist/m365/aad/commands/user/user-list.js +35 -14
- package/dist/m365/aad/commands/user/user-password-validate.js +29 -17
- package/dist/m365/aad/commands/user/user-set.js +22 -20
- package/dist/m365/aad/commands/user/user-signin-list.js +24 -21
- package/dist/m365/adaptivecard/commands/adaptivecard-send.js +39 -37
- package/dist/m365/app/commands/app-get.js +27 -15
- package/dist/m365/app/commands/app-open.js +18 -3
- package/dist/m365/app/commands/permission/permission-list.js +17 -15
- package/dist/m365/base/AnonymousCommand.js +14 -3
- package/dist/m365/base/AppCommand.js +51 -44
- package/dist/m365/base/DateAndPeriodBasedReport.js +7 -5
- package/dist/m365/base/PeriodBasedReport.js +23 -16
- package/dist/m365/base/SpoCommand.js +13 -9
- package/dist/m365/base/YammerCommand.js +4 -4
- package/dist/m365/booking/commands/business/business-get.js +27 -17
- package/dist/m365/booking/commands/business/business-list.js +20 -11
- package/dist/m365/cli/commands/cli-consent.js +15 -12
- package/dist/m365/cli/commands/cli-doctor.js +35 -25
- package/dist/m365/cli/commands/cli-issue.js +15 -15
- package/dist/m365/cli/commands/cli-reconsent.js +30 -18
- package/dist/m365/cli/commands/completion/completion-clink-update.js +13 -3
- package/dist/m365/cli/commands/completion/completion-pwsh-setup.js +47 -38
- package/dist/m365/cli/commands/completion/completion-pwsh-update.js +16 -6
- package/dist/m365/cli/commands/completion/completion-sh-setup.js +21 -11
- package/dist/m365/cli/commands/completion/completion-sh-update.js +16 -6
- package/dist/m365/cli/commands/config/config-get.js +4 -3
- package/dist/m365/cli/commands/config/config-reset.js +9 -8
- package/dist/m365/cli/commands/config/config-set.js +20 -19
- package/dist/m365/commands/commands.js +1 -0
- package/dist/m365/commands/login.js +66 -63
- package/dist/m365/commands/logout.js +34 -23
- package/dist/m365/commands/request.js +150 -0
- package/dist/m365/commands/status.js +49 -27
- package/dist/m365/commands/version.js +13 -3
- package/dist/m365/file/commands/convert/convert-pdf.js +58 -53
- package/dist/m365/file/commands/file-add.js +14 -9
- package/dist/m365/file/commands/file-list.js +27 -30
- package/dist/m365/flow/commands/environment/environment-get.js +34 -22
- package/dist/m365/flow/commands/environment/environment-list.js +33 -21
- package/dist/m365/flow/commands/flow-disable.js +28 -14
- package/dist/m365/flow/commands/flow-enable.js +28 -14
- package/dist/m365/flow/commands/flow-export.js +102 -102
- package/dist/m365/flow/commands/flow-get.js +33 -21
- package/dist/m365/flow/commands/flow-list.js +28 -16
- package/dist/m365/flow/commands/flow-remove.js +38 -42
- package/dist/m365/flow/commands/run/run-cancel.js +32 -31
- package/dist/m365/flow/commands/run/run-get.js +33 -21
- package/dist/m365/flow/commands/run/run-list.js +31 -19
- package/dist/m365/flow/commands/run/run-resubmit.js +36 -37
- package/dist/m365/graph/Changelog.js +3 -0
- package/dist/m365/graph/commands/changelog/changelog-list.js +163 -0
- package/dist/m365/graph/commands/schemaextension/schemaextension-add.js +30 -27
- package/dist/m365/graph/commands/schemaextension/schemaextension-get.js +30 -17
- package/dist/m365/graph/commands/schemaextension/schemaextension-list.js +38 -34
- package/dist/m365/graph/commands/schemaextension/schemaextension-remove.js +42 -31
- package/dist/m365/graph/commands/schemaextension/schemaextension-set.js +57 -54
- package/dist/m365/graph/commands/subscription/subscription-add.js +28 -25
- package/dist/m365/graph/commands.js +1 -0
- package/dist/m365/onedrive/commands/onedrive-list.js +23 -13
- package/dist/m365/onenote/commands/notebook/notebook-list.js +139 -0
- package/dist/m365/onenote/commands.js +7 -0
- package/dist/m365/outlook/commands/mail/mail-send.js +53 -30
- package/dist/m365/outlook/commands/message/message-list.js +16 -25
- package/dist/m365/outlook/commands/message/message-move.js +28 -47
- package/dist/m365/outlook/commands/room/room-list.js +23 -11
- package/dist/m365/outlook/commands/roomlist/roomlist-list.js +19 -7
- package/dist/m365/pa/commands/app/app-get.js +45 -49
- package/dist/m365/pa/commands/app/app-list.js +19 -16
- package/dist/m365/pa/commands/app/app-remove.js +38 -38
- package/dist/m365/pa/commands/connector/connector-export.js +102 -104
- package/dist/m365/pa/commands/connector/connector-list.js +28 -16
- package/dist/m365/pa/commands/environment/environment-get.js +34 -22
- package/dist/m365/pa/commands/environment/environment-list.js +33 -21
- package/dist/m365/pa/commands/pcf/pcf-init.js +35 -34
- package/dist/m365/pa/commands/solution/solution-init.js +48 -47
- package/dist/m365/pa/commands/solution/solution-reference-add.js +15 -14
- package/dist/m365/planner/commands/bucket/bucket-add.js +35 -37
- package/dist/m365/planner/commands/bucket/bucket-get.js +19 -16
- package/dist/m365/planner/commands/bucket/bucket-list.js +23 -23
- package/dist/m365/planner/commands/bucket/bucket-remove.js +39 -40
- package/dist/m365/planner/commands/bucket/bucket-set.js +32 -29
- package/dist/m365/planner/commands/plan/plan-add.js +31 -33
- package/dist/m365/planner/commands/plan/plan-get.js +31 -32
- package/dist/m365/planner/commands/plan/plan-list.js +20 -20
- package/dist/m365/planner/commands/plan/plan-remove.js +34 -37
- package/dist/m365/planner/commands/task/task-add.js +47 -61
- package/dist/m365/planner/commands/task/task-checklistitem-add.js +47 -37
- package/dist/m365/planner/commands/task/task-checklistitem-list.js +35 -21
- package/dist/m365/planner/commands/task/task-checklistitem-remove.js +51 -41
- package/dist/m365/planner/commands/task/task-get.js +32 -22
- package/dist/m365/planner/commands/task/task-list.js +48 -58
- package/dist/m365/planner/commands/task/task-reference-add.js +24 -23
- package/dist/m365/planner/commands/task/task-reference-list.js +30 -18
- package/dist/m365/planner/commands/task/task-reference-remove.js +39 -40
- package/dist/m365/planner/commands/task/task-remove.js +31 -32
- package/dist/m365/planner/commands/task/task-set.js +34 -39
- package/dist/m365/planner/commands/tenant/tenant-settings-list.js +26 -14
- package/dist/m365/planner/commands/tenant/tenant-settings-set.js +25 -22
- package/dist/m365/pp/commands/environment/environment-list.js +41 -29
- package/dist/m365/pp/commands/gateway/gateway-list.js +29 -17
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +23 -29
- package/dist/m365/pp/commands/managementapp/managementapp-list.js +20 -8
- package/dist/m365/search/commands/externalconnection/externalconnection-add.js +29 -24
- package/dist/m365/search/commands/externalconnection/externalconnection-get.js +37 -28
- package/dist/m365/search/commands/externalconnection/externalconnection-list.js +19 -7
- package/dist/m365/search/commands/externalconnection/externalconnection-remove.js +39 -32
- package/dist/m365/spfx/commands/package/package-generate.js +104 -97
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.16.0-beta.1.js +23 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +101 -103
- package/dist/m365/spfx/commands/project/project-externalize.js +45 -38
- package/dist/m365/spfx/commands/project/project-rename.js +38 -30
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010008_YORC_nodeVersion.js +47 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021003_PKG_engines_node.js +48 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.16.0-beta.1.js +61 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +180 -183
- package/dist/m365/spfx/commands/spfx-doctor.js +132 -126
- package/dist/m365/spo/commands/app/app-add.js +31 -32
- package/dist/m365/spo/commands/app/app-deploy.js +41 -45
- package/dist/m365/spo/commands/app/app-get.js +43 -47
- package/dist/m365/spo/commands/app/app-install.js +18 -13
- package/dist/m365/spo/commands/app/app-instance-list.js +25 -21
- package/dist/m365/spo/commands/app/app-list.js +29 -32
- package/dist/m365/spo/commands/app/app-remove.js +33 -36
- package/dist/m365/spo/commands/app/app-retract.js +33 -36
- package/dist/m365/spo/commands/app/app-teamspackage-download.js +42 -43
- package/dist/m365/spo/commands/app/app-uninstall.js +31 -30
- package/dist/m365/spo/commands/app/app-upgrade.js +18 -13
- package/dist/m365/spo/commands/apppage/apppage-add.js +38 -39
- package/dist/m365/spo/commands/apppage/apppage-set.js +20 -15
- package/dist/m365/spo/commands/cdn/cdn-get.js +35 -41
- package/dist/m365/spo/commands/cdn/cdn-origin-add.js +29 -37
- package/dist/m365/spo/commands/cdn/cdn-origin-list.js +33 -39
- package/dist/m365/spo/commands/cdn/cdn-origin-remove.js +43 -57
- package/dist/m365/spo/commands/cdn/cdn-policy-list.js +41 -48
- package/dist/m365/spo/commands/cdn/cdn-policy-set.js +36 -45
- package/dist/m365/spo/commands/cdn/cdn-set.js +63 -67
- package/dist/m365/spo/commands/contenttype/contenttype-add.js +48 -53
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +94 -112
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +120 -146
- package/dist/m365/spo/commands/contenttype/contenttype-get.js +39 -41
- package/dist/m365/spo/commands/contenttype/contenttype-list.js +21 -18
- package/dist/m365/spo/commands/contenttype/contenttype-remove.js +67 -80
- package/dist/m365/spo/commands/contenttypehub/contenttypehub-get.js +50 -47
- package/dist/m365/spo/commands/customaction/customaction-add.js +43 -40
- package/dist/m365/spo/commands/customaction/customaction-clear.js +27 -25
- package/dist/m365/spo/commands/customaction/customaction-get.js +40 -35
- package/dist/m365/spo/commands/customaction/customaction-list.js +28 -23
- package/dist/m365/spo/commands/customaction/customaction-remove.js +32 -31
- package/dist/m365/spo/commands/customaction/customaction-set.js +21 -16
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +42 -39
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-list.js +35 -32
- package/dist/m365/spo/commands/externaluser/externaluser-list.js +51 -56
- package/dist/m365/spo/commands/feature/feature-disable.js +26 -21
- package/dist/m365/spo/commands/feature/feature-enable.js +26 -21
- package/dist/m365/spo/commands/feature/feature-list.js +23 -20
- package/dist/m365/spo/commands/field/field-add.js +25 -24
- package/dist/m365/spo/commands/field/field-get.js +39 -36
- package/dist/m365/spo/commands/field/field-list.js +28 -25
- package/dist/m365/spo/commands/field/field-remove.js +83 -86
- package/dist/m365/spo/commands/field/field-set.js +64 -70
- package/dist/m365/spo/commands/file/file-add.js +153 -175
- package/dist/m365/spo/commands/file/file-checkin.js +40 -38
- package/dist/m365/spo/commands/file/file-checkout.js +27 -25
- package/dist/m365/spo/commands/file/file-copy.js +61 -63
- package/dist/m365/spo/commands/file/file-get.js +68 -73
- package/dist/m365/spo/commands/file/file-list.js +13 -8
- package/dist/m365/spo/commands/file/file-move.js +60 -62
- package/dist/m365/spo/commands/file/file-remove.js +58 -63
- package/dist/m365/spo/commands/file/file-rename.js +29 -31
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +49 -50
- package/dist/m365/spo/commands/folder/folder-add.js +26 -23
- package/dist/m365/spo/commands/folder/folder-copy.js +45 -42
- package/dist/m365/spo/commands/folder/folder-get.js +23 -23
- package/dist/m365/spo/commands/folder/folder-list.js +22 -19
- package/dist/m365/spo/commands/folder/folder-move.js +46 -43
- package/dist/m365/spo/commands/folder/folder-remove.js +40 -39
- package/dist/m365/spo/commands/folder/folder-rename.js +30 -36
- package/dist/m365/spo/commands/group/group-add.js +25 -22
- package/dist/m365/spo/commands/group/group-get.js +40 -37
- package/dist/m365/spo/commands/group/group-list.js +21 -18
- package/dist/m365/spo/commands/group/group-remove.js +50 -56
- package/dist/m365/spo/commands/group/group-set.js +26 -21
- package/dist/m365/spo/commands/group/group-user-add.js +34 -47
- package/dist/m365/spo/commands/group/group-user-list.js +27 -27
- package/dist/m365/spo/commands/group/group-user-remove.js +43 -47
- package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-get.js +29 -19
- package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-set.js +22 -19
- package/dist/m365/spo/commands/homesite/homesite-get.js +28 -18
- package/dist/m365/spo/commands/homesite/homesite-remove.js +48 -47
- package/dist/m365/spo/commands/homesite/homesite-set.js +24 -29
- package/dist/m365/spo/commands/hubsite/hubsite-connect.js +18 -15
- package/dist/m365/spo/commands/hubsite/hubsite-data-get.js +25 -22
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +34 -35
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +18 -32
- package/dist/m365/spo/commands/hubsite/hubsite-list.js +64 -62
- package/dist/m365/spo/commands/hubsite/hubsite-register.js +19 -18
- package/dist/m365/spo/commands/hubsite/hubsite-rights-grant.js +29 -34
- package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +43 -52
- package/dist/m365/spo/commands/hubsite/hubsite-set.js +34 -39
- package/dist/m365/spo/commands/hubsite/hubsite-theme-sync.js +19 -14
- package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +32 -33
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-get.js +34 -31
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +50 -51
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +25 -31
- package/dist/m365/spo/commands/list/list-add.js +23 -20
- package/dist/m365/spo/commands/list/list-contenttype-add.js +34 -34
- package/dist/m365/spo/commands/list/list-contenttype-default-set.js +60 -64
- package/dist/m365/spo/commands/list/list-contenttype-list.js +33 -33
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +45 -50
- package/dist/m365/spo/commands/list/list-get.js +37 -37
- package/dist/m365/spo/commands/list/list-label-get.js +50 -55
- package/dist/m365/spo/commands/list/list-label-set.js +50 -48
- package/dist/m365/spo/commands/list/list-list.js +25 -22
- package/dist/m365/spo/commands/list/list-remove.js +45 -50
- package/dist/m365/spo/commands/list/list-roleassignment-add.js +44 -36
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +63 -36
- package/dist/m365/spo/commands/list/list-roleinheritance-break.js +32 -27
- package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +28 -23
- package/dist/m365/spo/commands/list/list-set.js +25 -22
- package/dist/m365/spo/commands/list/list-sitescript-get.js +53 -59
- package/dist/m365/spo/commands/list/list-view-add.js +29 -26
- package/dist/m365/spo/commands/list/list-view-field-add.js +51 -67
- package/dist/m365/spo/commands/list/list-view-field-remove.js +44 -62
- package/dist/m365/spo/commands/list/list-view-field-set.js +32 -44
- package/dist/m365/spo/commands/list/list-view-get.js +34 -37
- package/dist/m365/spo/commands/list/list-view-list.js +32 -32
- package/dist/m365/spo/commands/list/list-view-remove.js +44 -54
- package/dist/m365/spo/commands/list/list-view-set.js +29 -35
- package/dist/m365/spo/commands/list/list-webhook-add.js +43 -45
- package/dist/m365/spo/commands/list/list-webhook-get.js +33 -35
- package/dist/m365/spo/commands/list/list-webhook-list.js +47 -44
- package/dist/m365/spo/commands/list/list-webhook-remove.js +45 -51
- package/dist/m365/spo/commands/list/list-webhook-set.js +39 -41
- package/dist/m365/spo/commands/listitem/listitem-add.js +104 -116
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +32 -32
- package/dist/m365/spo/commands/listitem/listitem-get.js +32 -32
- package/dist/m365/spo/commands/listitem/listitem-isrecord.js +67 -73
- package/dist/m365/spo/commands/listitem/listitem-list.js +63 -70
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +53 -58
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +53 -58
- package/dist/m365/spo/commands/listitem/listitem-remove.js +50 -54
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +204 -0
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +32 -27
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +25 -20
- package/dist/m365/spo/commands/listitem/listitem-set.js +145 -167
- package/dist/m365/spo/commands/mail/mail-send.js +48 -43
- package/dist/m365/spo/commands/navigation/navigation-node-add.js +29 -26
- package/dist/m365/spo/commands/navigation/navigation-node-list.js +26 -23
- package/dist/m365/spo/commands/navigation/navigation-node-remove.js +34 -35
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +26 -30
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.js +48 -44
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +48 -48
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-list.js +34 -30
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +36 -47
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-set.js +22 -27
- package/dist/m365/spo/commands/page/page-add.js +193 -216
- package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +183 -186
- package/dist/m365/spo/commands/page/page-column-get.js +23 -20
- package/dist/m365/spo/commands/page/page-column-list.js +18 -15
- package/dist/m365/spo/commands/page/page-control-get.js +36 -33
- package/dist/m365/spo/commands/page/page-control-list.js +33 -30
- package/dist/m365/spo/commands/page/page-control-set.js +97 -97
- package/dist/m365/spo/commands/page/page-copy.js +51 -51
- package/dist/m365/spo/commands/page/page-get.js +49 -51
- package/dist/m365/spo/commands/page/page-header-set.js +228 -232
- package/dist/m365/spo/commands/page/page-list.js +40 -39
- package/dist/m365/spo/commands/page/page-remove.js +43 -44
- package/dist/m365/spo/commands/page/page-section-add.js +66 -68
- package/dist/m365/spo/commands/page/page-section-get.js +14 -11
- package/dist/m365/spo/commands/page/page-section-list.js +23 -20
- package/dist/m365/spo/commands/page/page-set.js +215 -236
- package/dist/m365/spo/commands/page/page-template-list.js +24 -25
- package/dist/m365/spo/commands/page/page-text-add.js +40 -40
- package/dist/m365/spo/commands/propertybag/propertybag-get.js +24 -22
- package/dist/m365/spo/commands/propertybag/propertybag-list.js +19 -17
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +30 -36
- package/dist/m365/spo/commands/propertybag/propertybag-set.js +22 -27
- package/dist/m365/spo/commands/roledefinition/roledefinition-add.js +117 -0
- package/dist/m365/spo/commands/roledefinition/roledefinition-get.js +25 -22
- package/dist/m365/spo/commands/roledefinition/roledefinition-list.js +20 -17
- package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +35 -34
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-add.js +38 -34
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-list.js +42 -38
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +33 -29
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +29 -34
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.js +24 -29
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.js +44 -40
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +45 -54
- package/dist/m365/spo/commands/site/site-add.js +177 -189
- package/dist/m365/spo/commands/site/site-appcatalog-add.js +29 -34
- package/dist/m365/spo/commands/site/site-appcatalog-remove.js +29 -34
- package/dist/m365/spo/commands/site/site-apppermission-add.js +26 -28
- package/dist/m365/spo/commands/site/site-apppermission-get.js +19 -16
- package/dist/m365/spo/commands/site/site-apppermission-list.js +15 -17
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +33 -44
- package/dist/m365/spo/commands/site/site-apppermission-set.js +27 -29
- package/dist/m365/spo/commands/site/site-chrome-set.js +50 -45
- package/dist/m365/spo/commands/site/site-classic-add.js +66 -82
- package/dist/m365/spo/commands/site/site-classic-list.js +27 -19
- package/dist/m365/spo/commands/site/site-classic-set.js +168 -186
- package/dist/m365/spo/commands/site/site-commsite-enable.js +25 -30
- package/dist/m365/spo/commands/site/site-ensure.js +38 -28
- package/dist/m365/spo/commands/site/site-get.js +17 -14
- package/dist/m365/spo/commands/site/site-groupify.js +35 -32
- package/dist/m365/spo/commands/site/site-inplacerecordsmanagement-set.js +24 -19
- package/dist/m365/spo/commands/site/site-list.js +17 -18
- package/dist/m365/spo/commands/site/site-recyclebinitem-list.js +27 -24
- package/dist/m365/spo/commands/site/site-recyclebinitem-restore.js +31 -24
- package/dist/m365/spo/commands/site/site-remove.js +49 -58
- package/dist/m365/spo/commands/site/site-rename.js +65 -76
- package/dist/m365/spo/commands/site/site-set.js +26 -32
- package/dist/m365/spo/commands/sitedesign/sitedesign-add.js +37 -40
- package/dist/m365/spo/commands/sitedesign/sitedesign-apply.js +27 -26
- package/dist/m365/spo/commands/sitedesign/sitedesign-get.js +23 -26
- package/dist/m365/spo/commands/sitedesign/sitedesign-list.js +27 -17
- package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +34 -39
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-grant.js +26 -27
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-list.js +25 -28
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +37 -42
- package/dist/m365/spo/commands/sitedesign/sitedesign-run-list.js +27 -23
- package/dist/m365/spo/commands/sitedesign/sitedesign-run-status-get.js +22 -18
- package/dist/m365/spo/commands/sitedesign/sitedesign-set.js +49 -48
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-get.js +22 -21
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-list.js +17 -13
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +33 -34
- package/dist/m365/spo/commands/sitescript/sitescript-add.js +22 -25
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +22 -25
- package/dist/m365/spo/commands/sitescript/sitescript-list.js +30 -24
- package/dist/m365/spo/commands/sitescript/sitescript-remove.js +34 -39
- package/dist/m365/spo/commands/sitescript/sitescript-set.js +35 -38
- package/dist/m365/spo/commands/spo-get.js +16 -6
- package/dist/m365/spo/commands/spo-search.js +19 -20
- package/dist/m365/spo/commands/spo-set.js +9 -7
- package/dist/m365/spo/commands/storageentity/storageentity-get.js +36 -26
- package/dist/m365/spo/commands/storageentity/storageentity-list.js +34 -36
- package/dist/m365/spo/commands/storageentity/storageentity-remove.js +38 -48
- package/dist/m365/spo/commands/storageentity/storageentity-set.js +29 -34
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +15 -16
- package/dist/m365/spo/commands/tenant/tenant-appcatalogurl-get.js +31 -21
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-list.js +38 -34
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +51 -59
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +21 -20
- package/dist/m365/spo/commands/tenant/tenant-settings-list.js +56 -52
- package/dist/m365/spo/commands/tenant/tenant-settings-set.js +54 -65
- package/dist/m365/spo/commands/term/term-add.js +95 -105
- package/dist/m365/spo/commands/term/term-get.js +47 -56
- package/dist/m365/spo/commands/term/term-group-add.js +70 -79
- package/dist/m365/spo/commands/term/term-group-get.js +36 -44
- package/dist/m365/spo/commands/term/term-group-list.js +42 -38
- package/dist/m365/spo/commands/term/term-list.js +39 -53
- package/dist/m365/spo/commands/term/term-set-add.js +83 -93
- package/dist/m365/spo/commands/term/term-set-get.js +37 -51
- package/dist/m365/spo/commands/term/term-set-list.js +39 -47
- package/dist/m365/spo/commands/theme/theme-apply.js +52 -58
- package/dist/m365/spo/commands/theme/theme-get.js +37 -33
- package/dist/m365/spo/commands/theme/theme-list.js +35 -25
- package/dist/m365/spo/commands/theme/theme-remove.js +45 -37
- package/dist/m365/spo/commands/theme/theme-set.js +29 -32
- package/dist/m365/spo/commands/user/user-get.js +35 -37
- package/dist/m365/spo/commands/user/user-list.js +23 -20
- package/dist/m365/spo/commands/user/user-remove.js +43 -45
- package/dist/m365/spo/commands/userprofile/userprofile-get.js +22 -22
- package/dist/m365/spo/commands/userprofile/userprofile-set.js +41 -33
- package/dist/m365/spo/commands/web/web-add.js +71 -97
- package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +29 -26
- package/dist/m365/spo/commands/web/web-get.js +21 -18
- package/dist/m365/spo/commands/web/web-installedlanguage-list.js +20 -17
- package/dist/m365/spo/commands/web/web-list.js +24 -21
- package/dist/m365/spo/commands/web/web-reindex.js +40 -52
- package/dist/m365/spo/commands/web/web-remove.js +33 -32
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +186 -0
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +168 -0
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +21 -16
- package/dist/m365/spo/commands/web/web-set.js +51 -46
- package/dist/m365/spo/commands.js +4 -0
- package/dist/m365/teams/commands/app/app-install.js +31 -35
- package/dist/m365/teams/commands/app/app-list.js +16 -13
- package/dist/m365/teams/commands/app/app-publish.js +23 -20
- package/dist/m365/teams/commands/app/app-remove.js +29 -28
- package/dist/m365/teams/commands/app/app-uninstall.js +28 -27
- package/dist/m365/teams/commands/app/app-update.js +25 -25
- package/dist/m365/teams/commands/cache/cache-remove.js +24 -23
- package/dist/m365/teams/commands/channel/channel-add.js +15 -15
- package/dist/m365/teams/commands/channel/channel-get.js +28 -48
- package/dist/m365/teams/commands/channel/channel-list.js +18 -20
- package/dist/m365/teams/commands/channel/channel-member-add.js +18 -23
- package/dist/m365/teams/commands/channel/channel-member-list.js +25 -36
- package/dist/m365/teams/commands/channel/channel-member-remove.js +26 -25
- package/dist/m365/teams/commands/channel/channel-member-set.js +29 -51
- package/dist/m365/teams/commands/channel/channel-remove.js +58 -64
- package/dist/m365/teams/commands/channel/channel-set.js +27 -24
- package/dist/m365/teams/commands/chat/chat-get.js +15 -25
- package/dist/m365/teams/commands/chat/chat-list.js +12 -9
- package/dist/m365/teams/commands/chat/chat-member-list.js +11 -8
- package/dist/m365/teams/commands/chat/chat-message-list.js +27 -24
- package/dist/m365/teams/commands/chat/chat-message-send.js +14 -24
- package/dist/m365/teams/commands/funsettings/funsettings-list.js +17 -14
- package/dist/m365/teams/commands/funsettings/funsettings-set.js +26 -21
- package/dist/m365/teams/commands/guestsettings/guestsettings-list.js +17 -14
- package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +23 -18
- package/dist/m365/teams/commands/membersettings/membersettings-list.js +17 -14
- package/dist/m365/teams/commands/membersettings/membersettings-set.js +23 -18
- package/dist/m365/teams/commands/message/message-get.js +17 -14
- package/dist/m365/teams/commands/message/message-list.js +16 -13
- package/dist/m365/teams/commands/message/message-reply-list.js +15 -12
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-list.js +17 -14
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +23 -18
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +18 -15
- package/dist/m365/teams/commands/report/report-pstncalls.js +18 -15
- package/dist/m365/teams/commands/tab/tab-add.js +20 -17
- package/dist/m365/teams/commands/tab/tab-get.js +25 -45
- package/dist/m365/teams/commands/tab/tab-list.js +14 -11
- package/dist/m365/teams/commands/tab/tab-remove.js +29 -26
- package/dist/m365/teams/commands/team/team-add.js +53 -55
- package/dist/m365/teams/commands/team/team-archive.js +26 -23
- package/dist/m365/teams/commands/team/team-clone.js +40 -35
- package/dist/m365/teams/commands/team/team-get.js +22 -24
- package/dist/m365/teams/commands/team/team-list.js +28 -18
- package/dist/m365/teams/commands/team/team-remove.js +34 -35
- package/dist/m365/teams/commands/team/team-set.js +26 -21
- package/dist/m365/teams/commands/team/team-unarchive.js +23 -20
- package/dist/m365/teams/commands/user/user-app-add.js +20 -15
- package/dist/m365/teams/commands/user/user-app-list.js +31 -35
- package/dist/m365/teams/commands/user/user-app-remove.js +30 -29
- package/dist/m365/teams/commands/user/user-list.js +16 -18
- package/dist/m365/tenant/commands/id/id-get.js +36 -25
- package/dist/m365/tenant/commands/report/report-office365activationcounts.js +37 -23
- package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +37 -23
- package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +37 -23
- package/dist/m365/tenant/commands/security/security-alerts-list.js +19 -7
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.js +19 -7
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-list.js +19 -7
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-get.js +26 -14
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-list.js +23 -11
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-get.js +20 -17
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-list.js +23 -11
- package/dist/m365/todo/commands/list/list-add.js +31 -19
- package/dist/m365/todo/commands/list/list-list.js +19 -7
- package/dist/m365/todo/commands/list/list-remove.js +51 -60
- package/dist/m365/todo/commands/list/list-set.js +29 -34
- package/dist/m365/todo/commands/task/task-add.js +27 -34
- package/dist/m365/todo/commands/task/task-list.js +27 -34
- package/dist/m365/todo/commands/task/task-remove.js +51 -60
- package/dist/m365/todo/commands/task/task-set.js +26 -28
- package/dist/m365/util/commands/accesstoken/accesstoken-get.js +26 -14
- package/dist/m365/viva/commands/connections/connections-app-create.js +102 -104
- package/dist/m365/yammer/commands/group/group-list.js +11 -8
- package/dist/m365/yammer/commands/group/group-user-add.js +21 -16
- package/dist/m365/yammer/commands/group/group-user-remove.js +38 -37
- package/dist/m365/yammer/commands/message/message-add.js +27 -24
- package/dist/m365/yammer/commands/message/message-get.js +18 -15
- package/dist/m365/yammer/commands/message/message-like-set.js +44 -45
- package/dist/m365/yammer/commands/message/message-list.js +24 -21
- package/dist/m365/yammer/commands/message/message-remove.js +30 -29
- package/dist/m365/yammer/commands/network/network-list.js +29 -17
- package/dist/m365/yammer/commands/user/user-get.js +25 -22
- package/dist/m365/yammer/commands/user/user-list.js +11 -8
- package/dist/m365/yammer/commands/yammer-search.js +76 -73
- package/dist/request.js +6 -2
- package/dist/utils/fsUtil.js +2 -4
- package/dist/utils/md.js +1 -1
- package/docs/docs/cmd/adaptivecard/adaptivecard-send.md +0 -20
- package/docs/docs/cmd/graph/changelog/changelog-list.md +53 -0
- package/docs/docs/cmd/onenote/notebook/notebook-list.md +70 -0
- package/docs/docs/cmd/outlook/mail/mail-send.md +44 -1
- package/docs/docs/cmd/pp/environment/environment-list.md +1 -1
- package/docs/docs/cmd/request.md +76 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
- package/docs/docs/cmd/spfx/spfx-doctor.md +3 -3
- package/docs/docs/cmd/spo/hubsite/hubsite-unregister.md +2 -2
- package/docs/docs/cmd/spo/list/list-roleassignment-add.md +2 -2
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.md +5 -2
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.md +67 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-break.md +6 -6
- package/docs/docs/cmd/spo/roledefinition/roledefinition-add.md +43 -0
- package/docs/docs/cmd/spo/web/web-roleassignment-add.md +57 -0
- package/docs/docs/cmd/spo/web/web-roleassignment-remove.md +54 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +3 -2
- package/scripts/Register-CLIM365Completion.ps1 +1 -1
|
@@ -34,36 +34,37 @@ class TeamsAppUninstallCommand extends GraphCommand_1.default {
|
|
|
34
34
|
get description() {
|
|
35
35
|
return 'Uninstalls an app from a Microsoft Team team';
|
|
36
36
|
}
|
|
37
|
-
commandAction(logger, args
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
commandAction(logger, args) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
const uninstallApp = () => __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
const requestOptions = {
|
|
41
|
+
url: `${this.resource}/v1.0/teams/${args.options.teamId}/installedApps/${args.options.appId}`,
|
|
42
|
+
headers: {
|
|
43
|
+
accept: 'application/json;odata.metadata=none'
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
try {
|
|
47
|
+
yield request_1.default.delete(requestOptions);
|
|
43
48
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
.delete(requestOptions)
|
|
47
|
-
.then(_ => cb(), (res) => this.handleRejectedODataJsonPromise(res, logger, cb));
|
|
48
|
-
};
|
|
49
|
-
if (args.options.confirm) {
|
|
50
|
-
uninstallApp();
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
cli_1.Cli.prompt({
|
|
54
|
-
type: 'confirm',
|
|
55
|
-
name: 'continue',
|
|
56
|
-
default: false,
|
|
57
|
-
message: `Are you sure you want to uninstall the app with id ${args.options.appId} from the Microsoft Teams team ${args.options.teamId}?`
|
|
58
|
-
}, (result) => {
|
|
59
|
-
if (!result.continue) {
|
|
60
|
-
cb();
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
uninstallApp();
|
|
49
|
+
catch (err) {
|
|
50
|
+
this.handleRejectedODataJsonPromise(err);
|
|
64
51
|
}
|
|
65
52
|
});
|
|
66
|
-
|
|
53
|
+
if (args.options.confirm) {
|
|
54
|
+
yield uninstallApp();
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
const result = yield cli_1.Cli.prompt({
|
|
58
|
+
type: 'confirm',
|
|
59
|
+
name: 'continue',
|
|
60
|
+
default: false,
|
|
61
|
+
message: `Are you sure you want to uninstall the app with id ${args.options.appId} from the Microsoft Teams team ${args.options.teamId}?`
|
|
62
|
+
});
|
|
63
|
+
if (result.continue) {
|
|
64
|
+
yield uninstallApp();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
});
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
_TeamsAppUninstallCommand_instances = new WeakSet(), _TeamsAppUninstallCommand_initTelemetry = function _TeamsAppUninstallCommand_initTelemetry() {
|
|
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
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");
|
|
14
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _TeamsAppUpdateCommand_instances, _TeamsAppUpdateCommand_initTelemetry, _TeamsAppUpdateCommand_initOptions, _TeamsAppUpdateCommand_initValidators;
|
|
16
|
+
var _TeamsAppUpdateCommand_instances, _TeamsAppUpdateCommand_initTelemetry, _TeamsAppUpdateCommand_initOptions, _TeamsAppUpdateCommand_initValidators, _TeamsAppUpdateCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const fs = require("fs");
|
|
19
19
|
const path = require("path");
|
|
@@ -28,6 +28,7 @@ class TeamsAppUpdateCommand extends GraphCommand_1.default {
|
|
|
28
28
|
__classPrivateFieldGet(this, _TeamsAppUpdateCommand_instances, "m", _TeamsAppUpdateCommand_initTelemetry).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _TeamsAppUpdateCommand_instances, "m", _TeamsAppUpdateCommand_initOptions).call(this);
|
|
30
30
|
__classPrivateFieldGet(this, _TeamsAppUpdateCommand_instances, "m", _TeamsAppUpdateCommand_initValidators).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _TeamsAppUpdateCommand_instances, "m", _TeamsAppUpdateCommand_initOptionSets).call(this);
|
|
31
32
|
}
|
|
32
33
|
get name() {
|
|
33
34
|
return commands_1.default.APP_UPDATE;
|
|
@@ -35,25 +36,28 @@ class TeamsAppUpdateCommand extends GraphCommand_1.default {
|
|
|
35
36
|
get description() {
|
|
36
37
|
return 'Updates Teams app in the organization\'s app catalog';
|
|
37
38
|
}
|
|
38
|
-
commandAction(logger, args
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
commandAction(logger, args) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
const { filePath } = args.options;
|
|
42
|
+
try {
|
|
43
|
+
const appId = yield this.getAppId(args);
|
|
44
|
+
const fullPath = path.resolve(filePath);
|
|
45
|
+
if (this.verbose) {
|
|
46
|
+
logger.logToStderr(`Updating app with id '${appId}' and file '${fullPath}' in the app catalog...`);
|
|
47
|
+
}
|
|
48
|
+
const requestOptions = {
|
|
49
|
+
url: `${this.resource}/v1.0/appCatalogs/teamsApps/${appId}`,
|
|
50
|
+
headers: {
|
|
51
|
+
"content-type": "application/zip"
|
|
52
|
+
},
|
|
53
|
+
data: fs.readFileSync(fullPath)
|
|
54
|
+
};
|
|
55
|
+
yield request_1.default.put(requestOptions);
|
|
46
56
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
data: fs.readFileSync(fullPath)
|
|
53
|
-
};
|
|
54
|
-
return request_1.default.put(requestOptions);
|
|
55
|
-
})
|
|
56
|
-
.then(_ => cb(), (res) => this.handleRejectedODataJsonPromise(res, logger, cb));
|
|
57
|
+
catch (err) {
|
|
58
|
+
this.handleRejectedODataJsonPromise(err);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
57
61
|
}
|
|
58
62
|
getAppId(args) {
|
|
59
63
|
if (args.options.id) {
|
|
@@ -97,12 +101,6 @@ _TeamsAppUpdateCommand_instances = new WeakSet(), _TeamsAppUpdateCommand_initTel
|
|
|
97
101
|
});
|
|
98
102
|
}, _TeamsAppUpdateCommand_initValidators = function _TeamsAppUpdateCommand_initValidators() {
|
|
99
103
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
100
|
-
if (!args.options.id && !args.options.name) {
|
|
101
|
-
return 'Specify either id or name';
|
|
102
|
-
}
|
|
103
|
-
if (args.options.id && args.options.name) {
|
|
104
|
-
return 'Specify either id or name, but not both';
|
|
105
|
-
}
|
|
106
104
|
if (args.options.id && !utils_1.validation.isValidGuid(args.options.id)) {
|
|
107
105
|
return `${args.options.id} is not a valid GUID`;
|
|
108
106
|
}
|
|
@@ -115,6 +113,8 @@ _TeamsAppUpdateCommand_instances = new WeakSet(), _TeamsAppUpdateCommand_initTel
|
|
|
115
113
|
}
|
|
116
114
|
return true;
|
|
117
115
|
}));
|
|
116
|
+
}, _TeamsAppUpdateCommand_initOptionSets = function _TeamsAppUpdateCommand_initOptionSets() {
|
|
117
|
+
this.optionSets.push(['id', 'name']);
|
|
118
118
|
};
|
|
119
119
|
module.exports = new TeamsAppUpdateCommand();
|
|
120
120
|
//# sourceMappingURL=app-update.js.map
|
|
@@ -34,41 +34,42 @@ class TeamsCacheRemoveCommand extends GraphCommand_1.default {
|
|
|
34
34
|
get description() {
|
|
35
35
|
return 'Removes the Microsoft Teams client cache';
|
|
36
36
|
}
|
|
37
|
-
commandAction(logger, args
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
logger.logToStderr('This command will execute the following steps.');
|
|
43
|
-
logger.logToStderr('- Stop the Microsoft Teams client.');
|
|
44
|
-
logger.logToStderr('- Clear the Microsoft Teams cached files.');
|
|
45
|
-
cli_1.Cli.prompt({
|
|
46
|
-
type: 'confirm',
|
|
47
|
-
name: 'continue',
|
|
48
|
-
default: false,
|
|
49
|
-
message: `Are you sure you want to clear your Microsoft Teams cache?`
|
|
50
|
-
}, (result) => {
|
|
51
|
-
if (!result.continue) {
|
|
52
|
-
cb();
|
|
37
|
+
commandAction(logger, args) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
try {
|
|
40
|
+
if (args.options.confirm) {
|
|
41
|
+
yield this.clearTeamsCache(logger);
|
|
53
42
|
}
|
|
54
43
|
else {
|
|
55
|
-
|
|
44
|
+
logger.logToStderr('This command will execute the following steps.');
|
|
45
|
+
logger.logToStderr('- Stop the Microsoft Teams client.');
|
|
46
|
+
logger.logToStderr('- Clear the Microsoft Teams cached files.');
|
|
47
|
+
const result = yield cli_1.Cli.prompt({
|
|
48
|
+
type: 'confirm',
|
|
49
|
+
name: 'continue',
|
|
50
|
+
default: false,
|
|
51
|
+
message: `Are you sure you want to clear your Microsoft Teams cache?`
|
|
52
|
+
});
|
|
53
|
+
if (result.continue) {
|
|
54
|
+
yield this.clearTeamsCache(logger);
|
|
55
|
+
}
|
|
56
56
|
}
|
|
57
|
-
}
|
|
58
|
-
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
this.handleRejectedODataJsonPromise(err);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
59
62
|
}
|
|
60
|
-
clearTeamsCache(logger
|
|
63
|
+
clearTeamsCache(logger) {
|
|
61
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62
65
|
try {
|
|
63
66
|
yield this.killRunningProcess(logger);
|
|
64
67
|
yield this.removeCacheFiles(logger);
|
|
65
68
|
}
|
|
66
69
|
catch (e) {
|
|
67
|
-
|
|
68
|
-
return;
|
|
70
|
+
throw e.message;
|
|
69
71
|
}
|
|
70
72
|
logger.logToStderr('Teams cache cleared!');
|
|
71
|
-
cb();
|
|
72
73
|
});
|
|
73
74
|
}
|
|
74
75
|
killRunningProcess(logger) {
|
|
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
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");
|
|
14
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _TeamsChannelAddCommand_instances, _TeamsChannelAddCommand_initTelemetry, _TeamsChannelAddCommand_initOptions, _TeamsChannelAddCommand_initValidators;
|
|
16
|
+
var _TeamsChannelAddCommand_instances, _TeamsChannelAddCommand_initTelemetry, _TeamsChannelAddCommand_initOptions, _TeamsChannelAddCommand_initValidators, _TeamsChannelAddCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -26,6 +26,7 @@ class TeamsChannelAddCommand extends GraphCommand_1.default {
|
|
|
26
26
|
__classPrivateFieldGet(this, _TeamsChannelAddCommand_instances, "m", _TeamsChannelAddCommand_initTelemetry).call(this);
|
|
27
27
|
__classPrivateFieldGet(this, _TeamsChannelAddCommand_instances, "m", _TeamsChannelAddCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _TeamsChannelAddCommand_instances, "m", _TeamsChannelAddCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _TeamsChannelAddCommand_instances, "m", _TeamsChannelAddCommand_initOptionSets).call(this);
|
|
29
30
|
}
|
|
30
31
|
get name() {
|
|
31
32
|
return commands_1.default.CHANNEL_ADD;
|
|
@@ -84,14 +85,17 @@ class TeamsChannelAddCommand extends GraphCommand_1.default {
|
|
|
84
85
|
}
|
|
85
86
|
return request_1.default.post(requestOptions);
|
|
86
87
|
}
|
|
87
|
-
commandAction(logger, args
|
|
88
|
-
this
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
commandAction(logger, args) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
try {
|
|
91
|
+
const teamId = yield this.getTeamId(args);
|
|
92
|
+
const res = yield this.createChannel(args, teamId);
|
|
93
|
+
logger.log(res);
|
|
94
|
+
}
|
|
95
|
+
catch (err) {
|
|
96
|
+
this.handleRejectedODataJsonPromise(err);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
95
99
|
}
|
|
96
100
|
}
|
|
97
101
|
_TeamsChannelAddCommand_instances = new WeakSet(), _TeamsChannelAddCommand_initTelemetry = function _TeamsChannelAddCommand_initTelemetry() {
|
|
@@ -121,12 +125,6 @@ _TeamsChannelAddCommand_instances = new WeakSet(), _TeamsChannelAddCommand_initT
|
|
|
121
125
|
});
|
|
122
126
|
}, _TeamsChannelAddCommand_initValidators = function _TeamsChannelAddCommand_initValidators() {
|
|
123
127
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
124
|
-
if (args.options.teamId && args.options.teamName) {
|
|
125
|
-
return 'Specify either teamId or teamName, but not both.';
|
|
126
|
-
}
|
|
127
|
-
if (!args.options.teamId && !args.options.teamName) {
|
|
128
|
-
return 'Specify teamId or teamName, one is required';
|
|
129
|
-
}
|
|
130
128
|
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
131
129
|
return `${args.options.teamId} is not a valid GUID`;
|
|
132
130
|
}
|
|
@@ -141,6 +139,8 @@ _TeamsChannelAddCommand_instances = new WeakSet(), _TeamsChannelAddCommand_initT
|
|
|
141
139
|
}
|
|
142
140
|
return true;
|
|
143
141
|
}));
|
|
142
|
+
}, _TeamsChannelAddCommand_initOptionSets = function _TeamsChannelAddCommand_initOptionSets() {
|
|
143
|
+
this.optionSets.push(['teamId', 'teamName']);
|
|
144
144
|
};
|
|
145
145
|
module.exports = new TeamsChannelAddCommand();
|
|
146
146
|
//# sourceMappingURL=channel-add.js.map
|
|
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
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");
|
|
14
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _TeamsChannelGetCommand_instances, _TeamsChannelGetCommand_initTelemetry, _TeamsChannelGetCommand_initOptions, _TeamsChannelGetCommand_initValidators;
|
|
16
|
+
var _TeamsChannelGetCommand_instances, _TeamsChannelGetCommand_initTelemetry, _TeamsChannelGetCommand_initOptions, _TeamsChannelGetCommand_initValidators, _TeamsChannelGetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -28,6 +28,7 @@ class TeamsChannelGetCommand extends GraphCommand_1.default {
|
|
|
28
28
|
__classPrivateFieldGet(this, _TeamsChannelGetCommand_instances, "m", _TeamsChannelGetCommand_initTelemetry).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _TeamsChannelGetCommand_instances, "m", _TeamsChannelGetCommand_initOptions).call(this);
|
|
30
30
|
__classPrivateFieldGet(this, _TeamsChannelGetCommand_instances, "m", _TeamsChannelGetCommand_initValidators).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _TeamsChannelGetCommand_instances, "m", _TeamsChannelGetCommand_initOptionSets).call(this);
|
|
31
32
|
}
|
|
32
33
|
get name() {
|
|
33
34
|
return commands_1.default.CHANNEL_GET;
|
|
@@ -72,34 +73,32 @@ class TeamsChannelGetCommand extends GraphCommand_1.default {
|
|
|
72
73
|
return Promise.resolve(channelItem.id);
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
|
-
commandAction(logger, args
|
|
76
|
-
this
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
76
|
+
commandAction(logger, args) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
try {
|
|
79
|
+
this.teamId = yield this.getTeamId(args);
|
|
80
|
+
const channelId = yield this.getChannelId(args);
|
|
81
|
+
let url = '';
|
|
82
|
+
if (args.options.primary) {
|
|
83
|
+
url = `${this.resource}/v1.0/teams/${encodeURIComponent(this.teamId)}/primaryChannel`;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
url = `${this.resource}/v1.0/teams/${encodeURIComponent(this.teamId)}/channels/${encodeURIComponent(channelId)}`;
|
|
87
|
+
}
|
|
88
|
+
const requestOptions = {
|
|
89
|
+
url: url,
|
|
90
|
+
headers: {
|
|
91
|
+
accept: 'application/json;odata.metadata=none'
|
|
92
|
+
},
|
|
93
|
+
responseType: 'json'
|
|
94
|
+
};
|
|
95
|
+
const res = yield request_1.default.get(requestOptions);
|
|
96
|
+
logger.log(res);
|
|
86
97
|
}
|
|
87
|
-
|
|
88
|
-
|
|
98
|
+
catch (err) {
|
|
99
|
+
this.handleRejectedODataJsonPromise(err);
|
|
89
100
|
}
|
|
90
|
-
|
|
91
|
-
url: url,
|
|
92
|
-
headers: {
|
|
93
|
-
accept: 'application/json;odata.metadata=none'
|
|
94
|
-
},
|
|
95
|
-
responseType: 'json'
|
|
96
|
-
};
|
|
97
|
-
return request_1.default.get(requestOptions);
|
|
98
|
-
})
|
|
99
|
-
.then((res) => {
|
|
100
|
-
logger.log(res);
|
|
101
|
-
cb();
|
|
102
|
-
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
101
|
+
});
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
104
|
_TeamsChannelGetCommand_instances = new WeakSet(), _TeamsChannelGetCommand_initTelemetry = function _TeamsChannelGetCommand_initTelemetry() {
|
|
@@ -126,35 +125,16 @@ _TeamsChannelGetCommand_instances = new WeakSet(), _TeamsChannelGetCommand_initT
|
|
|
126
125
|
});
|
|
127
126
|
}, _TeamsChannelGetCommand_initValidators = function _TeamsChannelGetCommand_initValidators() {
|
|
128
127
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
129
|
-
if (args.options.teamId && args.options.teamName) {
|
|
130
|
-
return 'Specify either teamId or teamName, but not both.';
|
|
131
|
-
}
|
|
132
|
-
if (!args.options.teamId && !args.options.teamName) {
|
|
133
|
-
return 'Specify teamId or teamName, one is required';
|
|
134
|
-
}
|
|
135
128
|
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
136
129
|
return `${args.options.teamId} is not a valid GUID`;
|
|
137
130
|
}
|
|
138
|
-
if (args.options.channelId && args.options.channelName && args.options.primary) {
|
|
139
|
-
return 'Specify channelId, channelName or primary';
|
|
140
|
-
}
|
|
141
|
-
if (!args.options.channelId && args.options.channelName && args.options.primary) {
|
|
142
|
-
return 'Specify channelId, channelName or primary.';
|
|
143
|
-
}
|
|
144
|
-
if (args.options.channelId && !args.options.channelName && args.options.primary) {
|
|
145
|
-
return 'Specify channelId, channelName or primary.';
|
|
146
|
-
}
|
|
147
|
-
if (args.options.channelId && args.options.channelName && !args.options.primary) {
|
|
148
|
-
return 'Specify channelId, channelName or primary.';
|
|
149
|
-
}
|
|
150
|
-
if (!args.options.channelId && !args.options.channelName && !args.options.primary) {
|
|
151
|
-
return 'Specify channelId, channelName or primary, one is required';
|
|
152
|
-
}
|
|
153
131
|
if (args.options.channelId && !utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
154
132
|
return `${args.options.channelId} is not a valid Teams ChannelId`;
|
|
155
133
|
}
|
|
156
134
|
return true;
|
|
157
135
|
}));
|
|
136
|
+
}, _TeamsChannelGetCommand_initOptionSets = function _TeamsChannelGetCommand_initOptionSets() {
|
|
137
|
+
this.optionSets.push(['teamId', 'teamName'], ['channelId', 'channelName', 'primary']);
|
|
158
138
|
};
|
|
159
139
|
module.exports = new TeamsChannelGetCommand();
|
|
160
140
|
//# sourceMappingURL=channel-get.js.map
|
|
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
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");
|
|
14
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _TeamsChannelListCommand_instances, _TeamsChannelListCommand_initTelemetry, _TeamsChannelListCommand_initOptions, _TeamsChannelListCommand_initValidators;
|
|
16
|
+
var _TeamsChannelListCommand_instances, _TeamsChannelListCommand_initTelemetry, _TeamsChannelListCommand_initOptions, _TeamsChannelListCommand_initValidators, _TeamsChannelListCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const utils_1 = require("../../../../utils");
|
|
19
19
|
const aadGroup_1 = require("../../../../utils/aadGroup");
|
|
@@ -26,6 +26,7 @@ class TeamsChannelListCommand extends GraphCommand_1.default {
|
|
|
26
26
|
__classPrivateFieldGet(this, _TeamsChannelListCommand_instances, "m", _TeamsChannelListCommand_initTelemetry).call(this);
|
|
27
27
|
__classPrivateFieldGet(this, _TeamsChannelListCommand_instances, "m", _TeamsChannelListCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _TeamsChannelListCommand_instances, "m", _TeamsChannelListCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _TeamsChannelListCommand_instances, "m", _TeamsChannelListCommand_initOptionSets).call(this);
|
|
29
30
|
}
|
|
30
31
|
get name() {
|
|
31
32
|
return commands_1.default.CHANNEL_LIST;
|
|
@@ -49,20 +50,21 @@ class TeamsChannelListCommand extends GraphCommand_1.default {
|
|
|
49
50
|
return group.id;
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
|
-
commandAction(logger, args
|
|
53
|
-
this
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
commandAction(logger, args) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
try {
|
|
56
|
+
const teamId = yield this.getTeamId(args);
|
|
57
|
+
let endpoint = `${this.resource}/v1.0/teams/${teamId}/channels`;
|
|
58
|
+
if (args.options.type) {
|
|
59
|
+
endpoint += `?$filter=membershipType eq '${args.options.type}'`;
|
|
60
|
+
}
|
|
61
|
+
const items = yield utils_1.odata.getAllItems(endpoint);
|
|
62
|
+
logger.log(items);
|
|
59
63
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
cb();
|
|
65
|
-
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
64
|
+
catch (err) {
|
|
65
|
+
this.handleRejectedODataJsonPromise(err);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
_TeamsChannelListCommand_instances = new WeakSet(), _TeamsChannelListCommand_initTelemetry = function _TeamsChannelListCommand_initTelemetry() {
|
|
@@ -83,12 +85,6 @@ _TeamsChannelListCommand_instances = new WeakSet(), _TeamsChannelListCommand_ini
|
|
|
83
85
|
});
|
|
84
86
|
}, _TeamsChannelListCommand_initValidators = function _TeamsChannelListCommand_initValidators() {
|
|
85
87
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
if (args.options.teamId && args.options.teamName) {
|
|
87
|
-
return 'Specify either teamId or teamName, but not both';
|
|
88
|
-
}
|
|
89
|
-
if (!args.options.teamId && !args.options.teamName) {
|
|
90
|
-
return 'Specify teamId or teamName, one is required';
|
|
91
|
-
}
|
|
92
88
|
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
93
89
|
return `${args.options.teamId} is not a valid GUID`;
|
|
94
90
|
}
|
|
@@ -97,6 +93,8 @@ _TeamsChannelListCommand_instances = new WeakSet(), _TeamsChannelListCommand_ini
|
|
|
97
93
|
}
|
|
98
94
|
return true;
|
|
99
95
|
}));
|
|
96
|
+
}, _TeamsChannelListCommand_initOptionSets = function _TeamsChannelListCommand_initOptionSets() {
|
|
97
|
+
this.optionSets.push(['teamId', 'teamName']);
|
|
100
98
|
};
|
|
101
99
|
module.exports = new TeamsChannelListCommand();
|
|
102
100
|
//# sourceMappingURL=channel-list.js.map
|
|
@@ -39,30 +39,25 @@ class TeamsChannelMemberAddCommand extends GraphCommand_1.default {
|
|
|
39
39
|
alias() {
|
|
40
40
|
return [commands_1.default.CONVERSATIONMEMBER_ADD];
|
|
41
41
|
}
|
|
42
|
-
commandAction(logger, args
|
|
43
|
-
this
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
.then((userIds) => {
|
|
57
|
-
const endpoint = `${this.resource}/v1.0/teams/${encodeURIComponent(teamId)}/channels/${encodeURIComponent(channelId)}/members`;
|
|
58
|
-
const roles = args.options.owner ? ["owner"] : [];
|
|
59
|
-
const tasks = [];
|
|
60
|
-
for (const userId of userIds) {
|
|
61
|
-
tasks.push(this.addUser(userId, endpoint, roles));
|
|
42
|
+
commandAction(logger, args) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
this.showDeprecationWarning(logger, commands_1.default.CONVERSATIONMEMBER_ADD, commands_1.default.CHANNEL_MEMBER_ADD);
|
|
45
|
+
try {
|
|
46
|
+
const teamId = yield this.getTeamId(args);
|
|
47
|
+
const channelId = yield this.getChannelId(teamId, args);
|
|
48
|
+
const userIds = yield this.getUserId(args);
|
|
49
|
+
const endpoint = `${this.resource}/v1.0/teams/${encodeURIComponent(teamId)}/channels/${encodeURIComponent(channelId)}/members`;
|
|
50
|
+
const roles = args.options.owner ? ["owner"] : [];
|
|
51
|
+
const tasks = [];
|
|
52
|
+
for (const userId of userIds) {
|
|
53
|
+
tasks.push(this.addUser(userId, endpoint, roles));
|
|
54
|
+
}
|
|
55
|
+
yield Promise.all(tasks);
|
|
62
56
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
catch (err) {
|
|
58
|
+
this.handleRejectedODataJsonPromise(err);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
66
61
|
}
|
|
67
62
|
addUser(userId, endpoint, roles) {
|
|
68
63
|
const requestOptions = {
|
|
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
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");
|
|
14
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _TeamsChannelMemberListCommand_instances, _TeamsChannelMemberListCommand_initTelemetry, _TeamsChannelMemberListCommand_initOptions, _TeamsChannelMemberListCommand_initValidators;
|
|
16
|
+
var _TeamsChannelMemberListCommand_instances, _TeamsChannelMemberListCommand_initTelemetry, _TeamsChannelMemberListCommand_initOptions, _TeamsChannelMemberListCommand_initValidators, _TeamsChannelMemberListCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -28,6 +28,7 @@ class TeamsChannelMemberListCommand extends GraphCommand_1.default {
|
|
|
28
28
|
__classPrivateFieldGet(this, _TeamsChannelMemberListCommand_instances, "m", _TeamsChannelMemberListCommand_initTelemetry).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _TeamsChannelMemberListCommand_instances, "m", _TeamsChannelMemberListCommand_initOptions).call(this);
|
|
30
30
|
__classPrivateFieldGet(this, _TeamsChannelMemberListCommand_instances, "m", _TeamsChannelMemberListCommand_initValidators).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _TeamsChannelMemberListCommand_instances, "m", _TeamsChannelMemberListCommand_initOptionSets).call(this);
|
|
31
32
|
}
|
|
32
33
|
get name() {
|
|
33
34
|
return commands_1.default.CHANNEL_MEMBER_LIST;
|
|
@@ -41,31 +42,29 @@ class TeamsChannelMemberListCommand extends GraphCommand_1.default {
|
|
|
41
42
|
defaultProperties() {
|
|
42
43
|
return ['id', 'roles', 'displayName', 'userId', 'email'];
|
|
43
44
|
}
|
|
44
|
-
commandAction(logger, args
|
|
45
|
-
this
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
memberships = memberships.filter(i => i.roles.length === 0);
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
memberships = memberships.filter(i => i.roles.indexOf(args.options.role) !== -1);
|
|
45
|
+
commandAction(logger, args) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
this.showDeprecationWarning(logger, commands_1.default.CONVERSATIONMEMBER_LIST, commands_1.default.CHANNEL_MEMBER_LIST);
|
|
48
|
+
try {
|
|
49
|
+
this.teamId = yield this.getTeamId(args);
|
|
50
|
+
const channelId = yield this.getChannelId(args);
|
|
51
|
+
const endpoint = `${this.resource}/v1.0/teams/${this.teamId}/channels/${channelId}/members`;
|
|
52
|
+
let memberships = yield utils_1.odata.getAllItems(endpoint);
|
|
53
|
+
if (args.options.role) {
|
|
54
|
+
if (args.options.role === 'member') {
|
|
55
|
+
// Members have no role value
|
|
56
|
+
memberships = memberships.filter(i => i.roles.length === 0);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
memberships = memberships.filter(i => i.roles.indexOf(args.options.role) !== -1);
|
|
60
|
+
}
|
|
64
61
|
}
|
|
62
|
+
logger.log(memberships);
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
this.handleRejectedODataJsonPromise(err);
|
|
65
66
|
}
|
|
66
|
-
|
|
67
|
-
cb();
|
|
68
|
-
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
67
|
+
});
|
|
69
68
|
}
|
|
70
69
|
getTeamId(args) {
|
|
71
70
|
if (args.options.teamId) {
|
|
@@ -127,21 +126,9 @@ _TeamsChannelMemberListCommand_instances = new WeakSet(), _TeamsChannelMemberLis
|
|
|
127
126
|
});
|
|
128
127
|
}, _TeamsChannelMemberListCommand_initValidators = function _TeamsChannelMemberListCommand_initValidators() {
|
|
129
128
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
130
|
-
if (args.options.teamId && args.options.teamName) {
|
|
131
|
-
return 'Specify either teamId or teamName, but not both';
|
|
132
|
-
}
|
|
133
|
-
if (!args.options.teamId && !args.options.teamName) {
|
|
134
|
-
return 'Specify teamId or teamName, one is required';
|
|
135
|
-
}
|
|
136
129
|
if (args.options.teamId && !utils_1.validation.isValidGuid(args.options.teamId)) {
|
|
137
130
|
return `${args.options.teamId} is not a valid GUID`;
|
|
138
131
|
}
|
|
139
|
-
if (args.options.channelId && args.options.channelName) {
|
|
140
|
-
return 'Specify either channelId or channelName, but not both';
|
|
141
|
-
}
|
|
142
|
-
if (!args.options.channelId && !args.options.channelName) {
|
|
143
|
-
return 'Specify channelId or channelName, one is required';
|
|
144
|
-
}
|
|
145
132
|
if (args.options.channelId && !utils_1.validation.isValidTeamsChannelId(args.options.channelId)) {
|
|
146
133
|
return `${args.options.channelId} is not a valid Teams Channel ID`;
|
|
147
134
|
}
|
|
@@ -152,6 +139,8 @@ _TeamsChannelMemberListCommand_instances = new WeakSet(), _TeamsChannelMemberLis
|
|
|
152
139
|
}
|
|
153
140
|
return true;
|
|
154
141
|
}));
|
|
142
|
+
}, _TeamsChannelMemberListCommand_initOptionSets = function _TeamsChannelMemberListCommand_initOptionSets() {
|
|
143
|
+
this.optionSets.push(['teamId', 'teamName'], ['channelId', 'channelName']);
|
|
155
144
|
};
|
|
156
145
|
module.exports = new TeamsChannelMemberListCommand();
|
|
157
146
|
//# sourceMappingURL=channel-member-list.js.map
|