@pnp/cli-microsoft365 7.6.0-beta.c74fe4b → 7.6.0-beta.fc0eacc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +3 -0
- package/README.md +1 -1
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +12 -10
- package/dist/AuthServer.js +1 -1
- package/dist/config.js +2 -2
- package/dist/m365/app/commands/app-get.js +1 -1
- package/dist/m365/app/commands/app-open.js +1 -1
- package/dist/m365/app/commands/permission/permission-add.js +2 -2
- package/dist/m365/app/commands/permission/permission-list.js +2 -2
- package/dist/m365/base/PeriodBasedReport.js +3 -0
- package/dist/m365/cli/commands/cli-consent.js +2 -2
- package/dist/m365/cli/commands/cli-reconsent.js +3 -3
- package/dist/m365/commands/login.js +1 -1
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-add.js +1 -0
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +1 -0
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-list.js +1 -0
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-add.js +1 -0
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-get.js +1 -0
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-list.js +1 -0
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +1 -0
- package/dist/m365/entra/commands/app/app-add.js +7 -6
- package/dist/m365/entra/commands/app/app-get.js +4 -3
- package/dist/m365/entra/commands/app/app-list.js +1 -0
- package/dist/m365/entra/commands/app/app-permission-add.js +3 -2
- package/dist/m365/entra/commands/app/app-permission-list.js +1 -1
- package/dist/m365/entra/commands/app/app-remove.js +5 -4
- package/dist/m365/entra/commands/app/app-role-add.js +6 -5
- package/dist/m365/entra/commands/app/app-role-list.js +4 -3
- package/dist/m365/entra/commands/app/app-role-remove.js +6 -5
- package/dist/m365/entra/commands/app/app-set.js +8 -7
- package/dist/m365/entra/commands/approleassignment/approleassignment-add.js +2 -1
- package/dist/m365/entra/commands/approleassignment/approleassignment-list.js +1 -0
- package/dist/m365/entra/commands/approleassignment/approleassignment-remove.js +1 -0
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +1 -0
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +1 -0
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +1 -0
- package/dist/m365/entra/commands/group/group-get.js +1 -0
- package/dist/m365/entra/commands/group/group-list.js +1 -0
- package/dist/m365/entra/commands/group/group-remove.js +1 -0
- package/dist/m365/entra/commands/group/group-user-list.js +1 -0
- package/dist/m365/entra/commands/groupsetting/groupsetting-add.js +1 -0
- package/dist/m365/entra/commands/groupsetting/groupsetting-get.js +1 -0
- package/dist/m365/entra/commands/groupsetting/groupsetting-list.js +1 -0
- package/dist/m365/entra/commands/groupsetting/groupsetting-remove.js +1 -0
- package/dist/m365/entra/commands/groupsetting/groupsetting-set.js +1 -0
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-get.js +1 -0
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-list.js +1 -0
- package/dist/m365/entra/commands/license/license-list.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-add.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-get.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-list.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-clear.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-remove.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-restore.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-remove.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-renew.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-set.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-teamify.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-user-add.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-user-remove.js +1 -0
- package/dist/m365/entra/commands/m365group/m365group-user-set.js +1 -0
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-add.js +1 -0
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +1 -0
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-remove.js +1 -0
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-set.js +1 -0
- package/dist/m365/entra/commands/policy/policy-list.js +1 -0
- package/dist/m365/entra/commands/siteclassification/siteclassification-disable.js +1 -0
- package/dist/m365/entra/commands/siteclassification/siteclassification-enable.js +1 -0
- package/dist/m365/entra/commands/siteclassification/siteclassification-get.js +1 -0
- package/dist/m365/entra/commands/siteclassification/siteclassification-set.js +1 -0
- package/dist/m365/entra/commands/user/user-add.js +1 -0
- package/dist/m365/entra/commands/user/user-get.js +1 -0
- package/dist/m365/entra/commands/user/user-guest-add.js +1 -0
- package/dist/m365/entra/commands/user/user-hibp.js +1 -0
- package/dist/m365/entra/commands/user/user-license-add.js +1 -0
- package/dist/m365/entra/commands/user/user-license-list.js +1 -0
- package/dist/m365/entra/commands/user/user-license-remove.js +1 -0
- package/dist/m365/entra/commands/user/user-list.js +1 -0
- package/dist/m365/entra/commands/user/user-password-validate.js +1 -0
- package/dist/m365/entra/commands/user/user-recyclebinitem-clear.js +1 -0
- package/dist/m365/entra/commands/user/user-recyclebinitem-list.js +1 -0
- package/dist/m365/entra/commands/user/user-recyclebinitem-remove.js +2 -1
- package/dist/m365/entra/commands/user/user-recyclebinitem-restore.js +1 -0
- package/dist/m365/entra/commands/user/user-remove.js +1 -0
- package/dist/m365/entra/commands/user/user-set.js +1 -0
- package/dist/m365/entra/commands/user/user-signin-list.js +1 -0
- package/dist/m365/outlook/commands/message/message-remove.js +113 -0
- package/dist/m365/outlook/commands.js +1 -0
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +7 -7
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +111 -0
- package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-add.js +183 -0
- package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-model.js +2 -0
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +6 -4
- package/dist/m365/spfx/commands.js +1 -0
- package/dist/m365/spo/commands/folder/FolderColor.js +19 -0
- package/dist/m365/spo/commands/folder/folder-add.js +46 -17
- package/dist/m365/spo/commands/folder/folder-set.js +118 -0
- package/dist/m365/spo/commands/group/group-member-add.js +2 -2
- package/dist/m365/spo/commands/group/group-member-remove.js +1 -1
- package/dist/m365/spo/commands/site/site-apppermission-add.js +2 -2
- package/dist/m365/spo/commands/site/site-recyclebinitem-restore.js +66 -27
- package/dist/m365/spo/commands/tenant/tenant-settings-set.js +1 -1
- package/dist/m365/spo/commands/user/user-remove.js +93 -16
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +3 -0
- package/dist/m365/teams/commands/report/report-pstncalls.js +3 -0
- package/dist/m365/teams/commands/tab/tab-get.js +1 -1
- package/dist/m365/teams/commands/team/team-add.js +132 -3
- package/dist/m365/tenant/commands/report/report-office365activationcounts.js +3 -0
- package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +3 -0
- package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +3 -0
- package/dist/utils/entraUser.js +36 -0
- package/dist/utils/spo.js +1 -1
- package/docs/docs/cmd/app/app-get.mdx +10 -10
- package/docs/docs/cmd/app/app-open.mdx +6 -6
- package/docs/docs/cmd/app/permission/permission-add.mdx +2 -2
- package/docs/docs/cmd/app/permission/permission-list.mdx +5 -5
- package/docs/docs/cmd/cli/cli-consent.mdx +2 -2
- package/docs/docs/cmd/cli/cli-reconsent.mdx +6 -6
- package/docs/docs/cmd/entra/app/app-permission-add.mdx +6 -6
- package/docs/docs/cmd/entra/approleassignment/approleassignment-add.mdx +1 -1
- package/docs/docs/cmd/entra/approleassignment/approleassignment-list.mdx +4 -4
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-add.mdx +1 -1
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-get.mdx +1 -1
- package/docs/docs/cmd/entra/group/group-user-add.mdx +7 -7
- package/docs/docs/cmd/entra/m365group/m365group-report-activitycounts.mdx +8 -0
- package/docs/docs/cmd/entra/m365group/m365group-report-activitydetail.mdx +8 -0
- package/docs/docs/cmd/entra/m365group/m365group-report-activityfilecounts.mdx +8 -0
- package/docs/docs/cmd/entra/m365group/m365group-report-activitygroupcounts.mdx +8 -0
- package/docs/docs/cmd/entra/m365group/m365group-report-activitystorage.mdx +8 -0
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-add.mdx +1 -1
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-list.mdx +1 -1
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-remove.mdx +1 -1
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-set.mdx +1 -1
- package/docs/docs/cmd/external/connection/connection-add.mdx +2 -2
- package/docs/docs/cmd/file/file-add.mdx +1 -1
- package/docs/docs/cmd/graph/schemaextension/schemaextension-add.mdx +2 -2
- package/docs/docs/cmd/graph/schemaextension/schemaextension-set.mdx +1 -1
- package/docs/docs/cmd/login.mdx +18 -18
- package/docs/docs/cmd/onedrive/report/report-activityfilecounts.mdx +8 -0
- package/docs/docs/cmd/onedrive/report/report-activityusercounts.mdx +8 -0
- package/docs/docs/cmd/onedrive/report/report-activityuserdetail.mdx +8 -0
- package/docs/docs/cmd/onedrive/report/report-usageaccountcounts.mdx +8 -0
- package/docs/docs/cmd/onedrive/report/report-usageaccountdetail.mdx +8 -0
- package/docs/docs/cmd/onedrive/report/report-usagefilecounts.mdx +6 -0
- package/docs/docs/cmd/onedrive/report/report-usagestorage.mdx +8 -0
- package/docs/docs/cmd/outlook/message/message-remove.mdx +67 -0
- package/docs/docs/cmd/outlook/report/report-mailactivitycounts.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailactivityusercounts.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailactivityuserdetail.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailappusageappsusercounts.mdx +7 -0
- package/docs/docs/cmd/outlook/report/report-mailappusageusercounts.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailappusageuserdetail.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailappusageversionsusercounts.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailboxusagedetail.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailboxusagemailboxcount.mdx +6 -0
- package/docs/docs/cmd/outlook/report/report-mailboxusagequotastatusmailboxcounts.mdx +8 -0
- package/docs/docs/cmd/outlook/report/report-mailboxusagestorage.mdx +8 -0
- package/docs/docs/cmd/pa/app/app-owner-set.mdx +1 -1
- package/docs/docs/cmd/pa/app/app-permission-ensure.mdx +3 -3
- package/docs/docs/cmd/pa/app/app-permission-remove.mdx +3 -3
- package/docs/docs/cmd/planner/plan/plan-add.mdx +1 -1
- package/docs/docs/cmd/planner/roster/roster-add.mdx +5 -5
- package/docs/docs/cmd/planner/roster/roster-get.mdx +7 -7
- package/docs/docs/cmd/planner/roster/roster-member-add.mdx +4 -4
- package/docs/docs/cmd/planner/roster/roster-member-get.mdx +4 -4
- package/docs/docs/cmd/planner/roster/roster-member-list.mdx +2 -2
- package/docs/docs/cmd/planner/roster/roster-member-remove.mdx +5 -5
- package/docs/docs/cmd/planner/roster/roster-plan-list.mdx +1 -1
- package/docs/docs/cmd/planner/roster/roster-remove.mdx +2 -2
- package/docs/docs/cmd/planner/task/task-add.mdx +1 -1
- package/docs/docs/cmd/planner/task/task-get.mdx +1 -1
- package/docs/docs/cmd/planner/task/task-list.mdx +1 -1
- package/docs/docs/cmd/planner/task/task-remove.mdx +1 -1
- package/docs/docs/cmd/planner/task/task-set.mdx +1 -1
- package/docs/docs/cmd/pp/environment/environment-get.mdx +1 -1
- package/docs/docs/cmd/pp/environment/environment-list.mdx +1 -1
- package/docs/docs/cmd/pp/managementapp/managementapp-add.mdx +9 -9
- package/docs/docs/cmd/purview/auditlog/auditlog-list.mdx +1 -1
- package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-get.mdx +1 -1
- package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-list.mdx +1 -1
- package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-policysettings-list.mdx +1 -1
- package/docs/docs/cmd/request.mdx +1 -1
- package/docs/docs/cmd/skype/report/report-activitycounts.mdx +8 -0
- package/docs/docs/cmd/skype/report/report-activityusercounts.mdx +8 -0
- package/docs/docs/cmd/skype/report/report-activityuserdetail.mdx +8 -0
- package/docs/docs/cmd/spfx/project/project-azuredevops-pipeline-add.mdx +87 -0
- package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +2 -2
- package/docs/docs/cmd/spo/folder/folder-add.mdx +38 -0
- package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-set.mdx +88 -0
- package/docs/docs/cmd/spo/group/group-member-add.mdx +2 -2
- package/docs/docs/cmd/spo/group/group-member-remove.mdx +3 -3
- package/docs/docs/cmd/spo/list/list-roleassignment-add.mdx +3 -3
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.mdx +2 -2
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-add.mdx +8 -8
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.mdx +2 -2
- package/docs/docs/cmd/spo/report/report-activityfilecounts.mdx +8 -0
- package/docs/docs/cmd/spo/report/report-activitypages.mdx +8 -0
- package/docs/docs/cmd/spo/report/report-activityusercounts.mdx +6 -0
- package/docs/docs/cmd/spo/report/report-activityuserdetail.mdx +6 -0
- package/docs/docs/cmd/spo/report/report-siteusagedetail.mdx +6 -0
- package/docs/docs/cmd/spo/report/report-siteusagefilecounts.mdx +6 -0
- package/docs/docs/cmd/spo/report/report-siteusagepages.mdx +8 -0
- package/docs/docs/cmd/spo/report/report-siteusagesitecounts.mdx +6 -0
- package/docs/docs/cmd/spo/report/report-siteusagestorage.mdx +8 -0
- package/docs/docs/cmd/spo/site/site-apppermission-add.mdx +2 -2
- package/docs/docs/cmd/spo/site/site-apppermission-set.mdx +2 -2
- package/docs/docs/cmd/spo/site/site-recyclebinitem-restore.mdx +29 -5
- package/docs/docs/cmd/spo/tenant/tenant-settings-set.mdx +89 -89
- package/docs/docs/cmd/spo/user/user-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/user/user-remove.mdx +40 -9
- package/docs/docs/cmd/spo/web/web-roleassignment-add.mdx +3 -3
- package/docs/docs/cmd/spo/web/web-roleassignment-remove.mdx +2 -2
- package/docs/docs/cmd/teams/channel/channel-member-remove.mdx +1 -1
- package/docs/docs/cmd/teams/channel/channel-member-set.mdx +1 -1
- package/docs/docs/cmd/teams/chat/chat-member-remove.mdx +3 -3
- package/docs/docs/cmd/teams/report/report-deviceusagedistributionusercounts.mdx +8 -0
- package/docs/docs/cmd/teams/report/report-deviceusageusercounts.mdx +8 -0
- package/docs/docs/cmd/teams/report/report-deviceusageuserdetail.mdx +6 -0
- package/docs/docs/cmd/teams/report/report-directroutingcalls.mdx +7 -1
- package/docs/docs/cmd/teams/report/report-pstncalls.mdx +7 -1
- package/docs/docs/cmd/teams/report/report-useractivitycounts.mdx +8 -0
- package/docs/docs/cmd/teams/report/report-useractivityusercounts.mdx +8 -0
- package/docs/docs/cmd/teams/report/report-useractivityuserdetail.mdx +8 -0
- package/docs/docs/cmd/teams/tab/tab-get.mdx +19 -12
- package/docs/docs/cmd/teams/team/team-add.mdx +28 -4
- package/docs/docs/cmd/tenant/report/report-activeusercounts.mdx +8 -0
- package/docs/docs/cmd/tenant/report/report-activeuserdetail.mdx +6 -0
- package/docs/docs/cmd/tenant/report/report-office365activationcounts.mdx +8 -0
- package/docs/docs/cmd/tenant/report/report-office365activationsusercounts.mdx +8 -0
- package/docs/docs/cmd/tenant/report/report-office365activationsuserdetail.mdx +8 -0
- package/docs/docs/cmd/tenant/report/report-servicesusercounts.mdx +8 -0
- package/docs/docs/cmd/tenant/security/security-alerts-list.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-group-list.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-group-user-add.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-group-user-remove.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-message-add.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-message-get.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-message-like-set.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-message-list.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-message-remove.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-network-list.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-report-activitycounts.mdx +8 -0
- package/docs/docs/cmd/viva/engage/engage-report-activityusercounts.mdx +8 -0
- package/docs/docs/cmd/viva/engage/engage-report-activityuserdetail.mdx +6 -0
- package/docs/docs/cmd/viva/engage/engage-report-deviceusagedistributionusercounts.mdx +8 -0
- package/docs/docs/cmd/viva/engage/engage-report-deviceusageusercounts.mdx +8 -0
- package/docs/docs/cmd/viva/engage/engage-report-deviceusageuserdetail.mdx +6 -0
- package/docs/docs/cmd/viva/engage/engage-report-groupsactivitycounts.mdx +8 -0
- package/docs/docs/cmd/viva/engage/engage-report-groupsactivitydetail.mdx +6 -0
- package/docs/docs/cmd/viva/engage/engage-report-groupsactivitygroupcounts.mdx +8 -0
- package/docs/docs/cmd/viva/engage/engage-search.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-user-get.mdx +1 -1
- package/docs/docs/cmd/viva/engage/engage-user-list.mdx +1 -1
- package/npm-shrinkwrap.json +62 -58
- package/package.json +11 -11
- package/dist/m365/spo/commands/folder/folder-rename.js +0 -72
- package/docs/docs/cmd/spo/folder/folder-rename.mdx +0 -44
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
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 _SpoFolderSetCommand_instances, _SpoFolderSetCommand_initTelemetry, _SpoFolderSetCommand_initOptions, _SpoFolderSetCommand_initValidators, _SpoFolderSetCommand_initTypes;
|
|
7
|
+
import request from '../../../../request.js';
|
|
8
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
10
|
+
import { validation } from '../../../../utils/validation.js';
|
|
11
|
+
import SpoCommand from '../../../base/SpoCommand.js';
|
|
12
|
+
import commands from '../../commands.js';
|
|
13
|
+
import { FolderColorValues } from './FolderColor.js';
|
|
14
|
+
class SpoFolderSetCommand extends SpoCommand {
|
|
15
|
+
get name() {
|
|
16
|
+
return commands.FOLDER_SET;
|
|
17
|
+
}
|
|
18
|
+
get description() {
|
|
19
|
+
return 'Updates a folder';
|
|
20
|
+
}
|
|
21
|
+
alias() {
|
|
22
|
+
return [commands.FOLDER_RENAME];
|
|
23
|
+
}
|
|
24
|
+
constructor() {
|
|
25
|
+
super();
|
|
26
|
+
_SpoFolderSetCommand_instances.add(this);
|
|
27
|
+
__classPrivateFieldGet(this, _SpoFolderSetCommand_instances, "m", _SpoFolderSetCommand_initTelemetry).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _SpoFolderSetCommand_instances, "m", _SpoFolderSetCommand_initOptions).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _SpoFolderSetCommand_instances, "m", _SpoFolderSetCommand_initValidators).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _SpoFolderSetCommand_instances, "m", _SpoFolderSetCommand_initTypes).call(this);
|
|
31
|
+
}
|
|
32
|
+
getExcludedOptionsWithUrls() {
|
|
33
|
+
return ['url'];
|
|
34
|
+
}
|
|
35
|
+
async commandAction(logger, args) {
|
|
36
|
+
try {
|
|
37
|
+
await this.showDeprecationWarning(logger, this.alias()[0], this.name);
|
|
38
|
+
if (this.verbose) {
|
|
39
|
+
await logger.logToStderr(`Updating folder '${args.options.name}'...`);
|
|
40
|
+
}
|
|
41
|
+
const serverRelativePath = urlUtil.getServerRelativePath(args.options.webUrl, args.options.url);
|
|
42
|
+
if (!args.options.color) {
|
|
43
|
+
const requestOptions = {
|
|
44
|
+
url: `${args.options.webUrl}/_api/Web/GetFolderByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativePath)}')/ListItemAllFields`,
|
|
45
|
+
headers: {
|
|
46
|
+
accept: 'application/json;odata=nometadata',
|
|
47
|
+
'if-match': '*'
|
|
48
|
+
},
|
|
49
|
+
data: {
|
|
50
|
+
FileLeafRef: args.options.name,
|
|
51
|
+
Title: args.options.name
|
|
52
|
+
},
|
|
53
|
+
responseType: 'json'
|
|
54
|
+
};
|
|
55
|
+
const response = await request.patch(requestOptions);
|
|
56
|
+
if (response && response['odata.null'] === true) {
|
|
57
|
+
throw 'Folder not found.';
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
const requestOptions = {
|
|
62
|
+
url: `${args.options.webUrl}/_api/foldercoloring/${args.options.name ? 'renamefolder' : 'stampcolor'}(DecodedUrl='${formatting.encodeQueryParameter(serverRelativePath)}')`,
|
|
63
|
+
headers: {
|
|
64
|
+
accept: 'application/json;odata=nometadata'
|
|
65
|
+
},
|
|
66
|
+
responseType: 'json',
|
|
67
|
+
data: {
|
|
68
|
+
coloringInformation: {
|
|
69
|
+
ColorHex: FolderColorValues[args.options.color] || args.options.color
|
|
70
|
+
},
|
|
71
|
+
newName: args.options.name
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
await request.post(requestOptions);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
this.handleRejectedODataJsonPromise(err);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
_SpoFolderSetCommand_instances = new WeakSet(), _SpoFolderSetCommand_initTelemetry = function _SpoFolderSetCommand_initTelemetry() {
|
|
83
|
+
this.telemetry.push((args) => {
|
|
84
|
+
Object.assign(this.telemetryProperties, {
|
|
85
|
+
name: typeof args.options.name !== 'undefined',
|
|
86
|
+
color: typeof args.options.color !== 'undefined'
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
}, _SpoFolderSetCommand_initOptions = function _SpoFolderSetCommand_initOptions() {
|
|
90
|
+
this.options.unshift({
|
|
91
|
+
option: '-u, --webUrl <webUrl>'
|
|
92
|
+
}, {
|
|
93
|
+
option: '--url <url>'
|
|
94
|
+
}, {
|
|
95
|
+
option: '-n, --name [name]'
|
|
96
|
+
}, {
|
|
97
|
+
option: '--color [color]',
|
|
98
|
+
autocomplete: Object.keys(FolderColorValues)
|
|
99
|
+
});
|
|
100
|
+
}, _SpoFolderSetCommand_initValidators = function _SpoFolderSetCommand_initValidators() {
|
|
101
|
+
this.validators.push(async (args) => {
|
|
102
|
+
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
103
|
+
if (isValidSharePointUrl !== true) {
|
|
104
|
+
return isValidSharePointUrl;
|
|
105
|
+
}
|
|
106
|
+
if (args.options.color === undefined && args.options.name === undefined) {
|
|
107
|
+
return `Specify at least one of the options: name or color.`;
|
|
108
|
+
}
|
|
109
|
+
if (args.options.color && !Object.entries(FolderColorValues).flat().includes(args.options.color)) {
|
|
110
|
+
return `'${args.options.color}' is not a valid value for option 'color'. Allowed values are ${Object.keys(FolderColorValues).join(', ')}, ${Object.values(FolderColorValues).join(', ')}.`;
|
|
111
|
+
}
|
|
112
|
+
return true;
|
|
113
|
+
});
|
|
114
|
+
}, _SpoFolderSetCommand_initTypes = function _SpoFolderSetCommand_initTypes() {
|
|
115
|
+
this.types.string.push('webUrl', 'url', 'name', 'color');
|
|
116
|
+
};
|
|
117
|
+
export default new SpoFolderSetCommand();
|
|
118
|
+
//# sourceMappingURL=folder-set.js.map
|
|
@@ -109,14 +109,14 @@ class SpoGroupMemberAddCommand extends SpoCommand {
|
|
|
109
109
|
}
|
|
110
110
|
else if (args.options.entraGroupNames) {
|
|
111
111
|
if (this.verbose) {
|
|
112
|
-
await logger.logToStderr(`Getting ID of
|
|
112
|
+
await logger.logToStderr(`Getting ID of Microsoft Entra group ${trimmedIdentifier}`);
|
|
113
113
|
}
|
|
114
114
|
const groupId = await entraGroup.getGroupIdByDisplayName(trimmedIdentifier);
|
|
115
115
|
validUserNames.push(groupId);
|
|
116
116
|
}
|
|
117
117
|
else {
|
|
118
118
|
if (this.verbose) {
|
|
119
|
-
await logger.logToStderr(`Getting
|
|
119
|
+
await logger.logToStderr(`Getting Microsoft Entra ID for user ${trimmedIdentifier}`);
|
|
120
120
|
}
|
|
121
121
|
const upn = await entraUser.getUserIdByEmail(trimmedIdentifier);
|
|
122
122
|
validUserNames.push(upn);
|
|
@@ -122,7 +122,7 @@ class SpoGroupMemberRemoveCommand extends SpoCommand {
|
|
|
122
122
|
foundGroups = getGroupMemberListOutput.filter((x) => { return x.Title === args.options.entraGroupName && (x.LoginName.indexOf("c:0o.c|federateddirectoryclaimprovider|") === 0 || x.LoginName.indexOf("c:0t.c|tenant|") === 0); });
|
|
123
123
|
}
|
|
124
124
|
if (foundGroups.length === 0) {
|
|
125
|
-
throw `The
|
|
125
|
+
throw `The Microsoft Entra group ${args.options.entraGroupId || args.options.entraGroupName} is not found in SharePoint group ${args.options.groupId || args.options.groupName}`;
|
|
126
126
|
}
|
|
127
127
|
return foundGroups[0].Id;
|
|
128
128
|
}
|
|
@@ -51,10 +51,10 @@ class SpoSiteAppPermissionAddCommand extends GraphCommand {
|
|
|
51
51
|
const response = await request.get(appRequestOptions);
|
|
52
52
|
const appItem = response.value[0];
|
|
53
53
|
if (!appItem) {
|
|
54
|
-
throw "The specified
|
|
54
|
+
throw "The specified Microsoft Entra app does not exist";
|
|
55
55
|
}
|
|
56
56
|
if (response.value.length > 1) {
|
|
57
|
-
throw `Multiple
|
|
57
|
+
throw `Multiple Microsoft Entra apps with displayName ${args.options.appDisplayName} found: ${response.value.map(x => x.appId)}`;
|
|
58
58
|
}
|
|
59
59
|
return {
|
|
60
60
|
appId: appItem.appId,
|
|
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
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
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _SpoSiteRecycleBinItemRestoreCommand_instances, _SpoSiteRecycleBinItemRestoreCommand_initOptions, _SpoSiteRecycleBinItemRestoreCommand_initValidators;
|
|
6
|
+
var _SpoSiteRecycleBinItemRestoreCommand_instances, _SpoSiteRecycleBinItemRestoreCommand_initOptions, _SpoSiteRecycleBinItemRestoreCommand_initValidators, _SpoSiteRecycleBinItemRestoreCommand_initTypes;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -21,43 +21,73 @@ class SpoSiteRecycleBinItemRestoreCommand extends SpoCommand {
|
|
|
21
21
|
_SpoSiteRecycleBinItemRestoreCommand_instances.add(this);
|
|
22
22
|
__classPrivateFieldGet(this, _SpoSiteRecycleBinItemRestoreCommand_instances, "m", _SpoSiteRecycleBinItemRestoreCommand_initOptions).call(this);
|
|
23
23
|
__classPrivateFieldGet(this, _SpoSiteRecycleBinItemRestoreCommand_instances, "m", _SpoSiteRecycleBinItemRestoreCommand_initValidators).call(this);
|
|
24
|
+
__classPrivateFieldGet(this, _SpoSiteRecycleBinItemRestoreCommand_instances, "m", _SpoSiteRecycleBinItemRestoreCommand_initTypes).call(this);
|
|
24
25
|
}
|
|
25
26
|
async commandAction(logger, args) {
|
|
26
27
|
if (this.verbose) {
|
|
27
28
|
await logger.logToStderr(`Restoring items from recycle bin at ${args.options.siteUrl}...`);
|
|
28
29
|
}
|
|
29
|
-
const
|
|
30
|
-
const ids = formatting.splitAndTrim(args.options.ids);
|
|
31
|
-
const idsChunks = [];
|
|
32
|
-
while (ids.length) {
|
|
33
|
-
idsChunks.push(ids.splice(0, 20));
|
|
34
|
-
}
|
|
30
|
+
const baseUrl = `${args.options.siteUrl}/_api`;
|
|
35
31
|
try {
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
32
|
+
if (args.options.ids) {
|
|
33
|
+
const requestUrl = baseUrl + '/site/RecycleBin/RestoreByIds';
|
|
34
|
+
const ids = formatting.splitAndTrim(args.options.ids);
|
|
35
|
+
const idsChunks = [];
|
|
36
|
+
while (ids.length) {
|
|
37
|
+
idsChunks.push(ids.splice(0, 20));
|
|
38
|
+
}
|
|
39
|
+
await Promise.all(idsChunks.map((idsChunk) => {
|
|
40
|
+
const requestOptions = {
|
|
41
|
+
url: requestUrl,
|
|
42
|
+
headers: {
|
|
43
|
+
'accept': 'application/json;odata=nometadata',
|
|
44
|
+
'content-type': 'application/json'
|
|
45
|
+
},
|
|
46
|
+
responseType: 'json',
|
|
47
|
+
data: {
|
|
48
|
+
ids: idsChunk
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
return request.post(requestOptions);
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
if (args.options.allPrimary && args.options.allSecondary) {
|
|
56
|
+
await this.restoreRecycleBinStage(baseUrl + '/site/RecycleBin/RestoreAll');
|
|
57
|
+
}
|
|
58
|
+
else if (args.options.allPrimary) {
|
|
59
|
+
await this.restoreRecycleBinStage(baseUrl + '/web/RecycleBin/RestoreAll');
|
|
60
|
+
}
|
|
61
|
+
else if (args.options.allSecondary) {
|
|
62
|
+
await this.restoreRecycleBinStage(baseUrl + '/site/GetRecycleBinItems(rowLimit=2000000000,itemState=2)/RestoreAll');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
50
65
|
}
|
|
51
66
|
catch (err) {
|
|
52
67
|
this.handleRejectedODataJsonPromise(err);
|
|
53
68
|
}
|
|
54
69
|
}
|
|
70
|
+
async restoreRecycleBinStage(requestUrl) {
|
|
71
|
+
const requestOptions = {
|
|
72
|
+
url: requestUrl,
|
|
73
|
+
headers: {
|
|
74
|
+
accept: 'application/json;odata=nometadata',
|
|
75
|
+
'content-type': 'application/json'
|
|
76
|
+
},
|
|
77
|
+
responseType: 'json'
|
|
78
|
+
};
|
|
79
|
+
return request.post(requestOptions);
|
|
80
|
+
}
|
|
55
81
|
}
|
|
56
82
|
_SpoSiteRecycleBinItemRestoreCommand_instances = new WeakSet(), _SpoSiteRecycleBinItemRestoreCommand_initOptions = function _SpoSiteRecycleBinItemRestoreCommand_initOptions() {
|
|
57
83
|
this.options.unshift({
|
|
58
84
|
option: '-u, --siteUrl <siteUrl>'
|
|
59
85
|
}, {
|
|
60
|
-
option: '-i, --ids
|
|
86
|
+
option: '-i, --ids [ids]'
|
|
87
|
+
}, {
|
|
88
|
+
option: '--allPrimary'
|
|
89
|
+
}, {
|
|
90
|
+
option: '--allSecondary'
|
|
61
91
|
});
|
|
62
92
|
}, _SpoSiteRecycleBinItemRestoreCommand_initValidators = function _SpoSiteRecycleBinItemRestoreCommand_initValidators() {
|
|
63
93
|
this.validators.push(async (args) => {
|
|
@@ -65,14 +95,23 @@ _SpoSiteRecycleBinItemRestoreCommand_instances = new WeakSet(), _SpoSiteRecycleB
|
|
|
65
95
|
if (isValidSharePointUrl !== true) {
|
|
66
96
|
return isValidSharePointUrl;
|
|
67
97
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
98
|
+
if (args.options.ids) {
|
|
99
|
+
const invalidIds = formatting
|
|
100
|
+
.splitAndTrim(args.options.ids)
|
|
101
|
+
.filter(id => !validation.isValidGuid(id));
|
|
102
|
+
if (invalidIds.length > 0) {
|
|
103
|
+
return `The following IDs are invalid: ${invalidIds.join(', ')}`;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if ((!args.options.ids && !args.options.allPrimary && !args.options.allSecondary)
|
|
107
|
+
|| (args.options.ids && (args.options.allPrimary || args.options.allSecondary))) {
|
|
108
|
+
return `Option 'ids' cannot be used with 'allPrimary' or 'allSecondary'.`;
|
|
73
109
|
}
|
|
74
110
|
return true;
|
|
75
111
|
});
|
|
112
|
+
}, _SpoSiteRecycleBinItemRestoreCommand_initTypes = function _SpoSiteRecycleBinItemRestoreCommand_initTypes() {
|
|
113
|
+
this.types.string.push('siteUrl', 'ids');
|
|
114
|
+
this.types.boolean.push('allPrimary', 'allSecondary');
|
|
76
115
|
};
|
|
77
116
|
export default new SpoSiteRecycleBinItemRestoreCommand();
|
|
78
117
|
//# sourceMappingURL=site-recyclebinitem-restore.js.map
|
|
@@ -89,7 +89,7 @@ class SpoTenantSettingsSetCommand extends SpoCommand {
|
|
|
89
89
|
throw response.ErrorInfo.ErrorMessage;
|
|
90
90
|
}
|
|
91
91
|
if (args.options.EnableAzureADB2BIntegration === true) {
|
|
92
|
-
await this.warn(logger, 'WARNING: Make sure to also enable the
|
|
92
|
+
await this.warn(logger, 'WARNING: Make sure to also enable the Microsoft Entra one-time passcode authentication preview. If it is not enabled then SharePoint will not use Microsoft Entra B2B even if EnableAzureADB2BIntegration is set to true. Learn more at http://aka.ms/spo-b2b-integration.');
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
catch (err) {
|
|
@@ -5,11 +5,14 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _SpoUserRemoveCommand_instances, _SpoUserRemoveCommand_initTelemetry, _SpoUserRemoveCommand_initOptions, _SpoUserRemoveCommand_initValidators, _SpoUserRemoveCommand_initOptionSets;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
|
+
import { spo } from '../../../../utils/spo.js';
|
|
8
9
|
import request from '../../../../request.js';
|
|
10
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
11
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
12
|
import { validation } from '../../../../utils/validation.js';
|
|
11
13
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
12
14
|
import commands from '../../commands.js';
|
|
15
|
+
;
|
|
13
16
|
class SpoUserRemoveCommand extends SpoCommand {
|
|
14
17
|
get name() {
|
|
15
18
|
return commands.USER_REMOVE;
|
|
@@ -40,13 +43,58 @@ class SpoUserRemoveCommand extends SpoCommand {
|
|
|
40
43
|
if (this.verbose) {
|
|
41
44
|
await logger.logToStderr(`Removing user from subsite ${options.webUrl} ...`);
|
|
42
45
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
try {
|
|
47
|
+
let requestUrl = `${encodeURI(options.webUrl)}/_api/web/siteusers/`;
|
|
48
|
+
if (options.id) {
|
|
49
|
+
requestUrl += `removebyid(${options.id})`;
|
|
50
|
+
}
|
|
51
|
+
else if (options.loginName) {
|
|
52
|
+
requestUrl += `removeByLoginName('${formatting.encodeQueryParameter(options.loginName)}')`;
|
|
53
|
+
}
|
|
54
|
+
else if (options.email) {
|
|
55
|
+
const user = await spo.getUserByEmail(options.webUrl, options.email, logger, this.verbose);
|
|
56
|
+
requestUrl += `removebyid(${user.Id})`;
|
|
57
|
+
}
|
|
58
|
+
else if (options.userName) {
|
|
59
|
+
const user = await this.getUser(options);
|
|
60
|
+
if (!user) {
|
|
61
|
+
throw new Error(`User not found: ${options.userName}`);
|
|
62
|
+
}
|
|
63
|
+
if (this.verbose) {
|
|
64
|
+
await logger.logToStderr(`Removing user ${user.Title} ...`);
|
|
65
|
+
}
|
|
66
|
+
requestUrl += `removebyid(${user.Id})`;
|
|
67
|
+
}
|
|
68
|
+
else if (options.entraGroupId || options.entraGroupName) {
|
|
69
|
+
const entraGroup = await this.getEntraGroup(options);
|
|
70
|
+
if (this.verbose) {
|
|
71
|
+
await logger.logToStderr(`Removing entra group ${entraGroup?.displayName} ...`);
|
|
72
|
+
}
|
|
73
|
+
//for entra groups, M365 groups have an associated email and security groups don't
|
|
74
|
+
if (entraGroup?.mail) {
|
|
75
|
+
//M365 group is prefixed with c:0o.c|federateddirectoryclaimprovider
|
|
76
|
+
requestUrl += `removeByLoginName('c:0o.c|federateddirectoryclaimprovider|${entraGroup.id}')`;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
//security group is prefixed with c:0t.c|tenant
|
|
80
|
+
requestUrl += `removeByLoginName('c:0t.c|tenant|${entraGroup?.id}')`;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const requestOptions = {
|
|
84
|
+
url: requestUrl,
|
|
85
|
+
headers: {
|
|
86
|
+
accept: 'application/json;odata=nometadata'
|
|
87
|
+
},
|
|
88
|
+
responseType: 'json'
|
|
89
|
+
};
|
|
90
|
+
await request.post(requestOptions);
|
|
46
91
|
}
|
|
47
|
-
|
|
48
|
-
|
|
92
|
+
catch (err) {
|
|
93
|
+
this.handleRejectedODataJsonPromise(err);
|
|
49
94
|
}
|
|
95
|
+
}
|
|
96
|
+
async getUser(options) {
|
|
97
|
+
const requestUrl = `${options.webUrl}/_api/web/siteusers?$filter=UserPrincipalName eq ('${formatting.encodeQueryParameter(options.userName)}')`;
|
|
50
98
|
const requestOptions = {
|
|
51
99
|
url: requestUrl,
|
|
52
100
|
headers: {
|
|
@@ -54,20 +102,23 @@ class SpoUserRemoveCommand extends SpoCommand {
|
|
|
54
102
|
},
|
|
55
103
|
responseType: 'json'
|
|
56
104
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
105
|
+
const userInstance = await request.get(requestOptions);
|
|
106
|
+
return userInstance.value[0];
|
|
107
|
+
}
|
|
108
|
+
async getEntraGroup(options) {
|
|
109
|
+
return options.entraGroupId ? await entraGroup.getGroupById(options.entraGroupId) : await entraGroup.getGroupByDisplayName(options.entraGroupName);
|
|
63
110
|
}
|
|
64
111
|
}
|
|
65
112
|
_SpoUserRemoveCommand_instances = new WeakSet(), _SpoUserRemoveCommand_initTelemetry = function _SpoUserRemoveCommand_initTelemetry() {
|
|
66
113
|
this.telemetry.push((args) => {
|
|
67
114
|
Object.assign(this.telemetryProperties, {
|
|
68
|
-
id:
|
|
69
|
-
loginName:
|
|
70
|
-
|
|
115
|
+
id: typeof args.options.id !== 'undefined',
|
|
116
|
+
loginName: typeof args.options.loginName !== 'undefined',
|
|
117
|
+
email: typeof args.options.email !== 'undefined',
|
|
118
|
+
userName: typeof args.options.userName !== 'undefined',
|
|
119
|
+
entraGroupId: typeof args.options.entraGroupId !== 'undefined',
|
|
120
|
+
entraGroupName: typeof args.options.entraGroupName !== 'undefined',
|
|
121
|
+
force: !!args.options.force
|
|
71
122
|
});
|
|
72
123
|
});
|
|
73
124
|
}, _SpoUserRemoveCommand_initOptions = function _SpoUserRemoveCommand_initOptions() {
|
|
@@ -77,15 +128,41 @@ _SpoUserRemoveCommand_instances = new WeakSet(), _SpoUserRemoveCommand_initTelem
|
|
|
77
128
|
option: '-i, --id [id]'
|
|
78
129
|
}, {
|
|
79
130
|
option: '--loginName [loginName]'
|
|
131
|
+
}, {
|
|
132
|
+
option: '--email [email]'
|
|
133
|
+
}, {
|
|
134
|
+
option: '--userName [userName]'
|
|
135
|
+
}, {
|
|
136
|
+
option: '--entraGroupId [entraGroupId]'
|
|
137
|
+
}, {
|
|
138
|
+
option: '--entraGroupName [entraGroupName]'
|
|
80
139
|
}, {
|
|
81
140
|
option: '-f, --force'
|
|
82
141
|
});
|
|
83
142
|
}, _SpoUserRemoveCommand_initValidators = function _SpoUserRemoveCommand_initValidators() {
|
|
84
143
|
this.validators.push(async (args) => {
|
|
85
|
-
|
|
144
|
+
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
145
|
+
if (isValidSharePointUrl !== true) {
|
|
146
|
+
return isValidSharePointUrl;
|
|
147
|
+
}
|
|
148
|
+
if (args.options.id && isNaN(parseInt(args.options.id))) {
|
|
149
|
+
return `Specified id ${args.options.id} is not a number`;
|
|
150
|
+
}
|
|
151
|
+
if (args.options.entraGroupId && !validation.isValidGuid(args.options.entraGroupId)) {
|
|
152
|
+
return `${args.options.entraId} is not a valid GUID.`;
|
|
153
|
+
}
|
|
154
|
+
if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
|
|
155
|
+
return `${args.options.userName} is not a valid userName.`;
|
|
156
|
+
}
|
|
157
|
+
if (args.options.email && !validation.isValidUserPrincipalName(args.options.email)) {
|
|
158
|
+
return `${args.options.email} is not a valid email.`;
|
|
159
|
+
}
|
|
160
|
+
return true;
|
|
86
161
|
});
|
|
87
162
|
}, _SpoUserRemoveCommand_initOptionSets = function _SpoUserRemoveCommand_initOptionSets() {
|
|
88
|
-
this.optionSets.push({
|
|
163
|
+
this.optionSets.push({
|
|
164
|
+
options: ['id', 'loginName', 'email', 'userName', 'entraGroupId', 'entraGroupName']
|
|
165
|
+
});
|
|
89
166
|
};
|
|
90
167
|
export default new SpoUserRemoveCommand();
|
|
91
168
|
//# sourceMappingURL=user-remove.js.map
|
|
@@ -91,6 +91,7 @@ export default {
|
|
|
91
91
|
FOLDER_MOVE: `${prefix} folder move`,
|
|
92
92
|
FOLDER_REMOVE: `${prefix} folder remove`,
|
|
93
93
|
FOLDER_RENAME: `${prefix} folder rename`,
|
|
94
|
+
FOLDER_SET: `${prefix} folder set`,
|
|
94
95
|
FOLDER_RETENTIONLABEL_ENSURE: `${prefix} folder retentionlabel ensure`,
|
|
95
96
|
FOLDER_RETENTIONLABEL_REMOVE: `${prefix} folder retentionlabel remove`,
|
|
96
97
|
FOLDER_ROLEASSIGNMENT_REMOVE: `${prefix} folder roleassignment remove`,
|
|
@@ -10,6 +10,9 @@ import { validation } from '../../../../utils/validation.js';
|
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
12
12
|
class TeamsReportDirectroutingcallsCommand extends GraphCommand {
|
|
13
|
+
get allowedOutputs() {
|
|
14
|
+
return ['json', 'csv'];
|
|
15
|
+
}
|
|
13
16
|
get name() {
|
|
14
17
|
return commands.REPORT_DIRECTROUTINGCALLS;
|
|
15
18
|
}
|
|
@@ -10,6 +10,9 @@ import { validation } from '../../../../utils/validation.js';
|
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
12
12
|
class TeamsReportPstncallsCommand extends GraphCommand {
|
|
13
|
+
get allowedOutputs() {
|
|
14
|
+
return ['json', 'csv'];
|
|
15
|
+
}
|
|
13
16
|
get name() {
|
|
14
17
|
return commands.REPORT_PSTNCALLS;
|
|
15
18
|
}
|
|
@@ -78,7 +78,7 @@ class TeamsTabGetCommand extends GraphCommand {
|
|
|
78
78
|
this.teamId = await this.getTeamId(args);
|
|
79
79
|
this.channelId = await this.getChannelId(args);
|
|
80
80
|
const tabId = await this.getTabId(args);
|
|
81
|
-
const endpoint = `${this.resource}/v1.0/teams/${formatting.encodeQueryParameter(this.teamId)}/channels/${formatting.encodeQueryParameter(this.channelId)}/tabs/${formatting.encodeQueryParameter(tabId)}`;
|
|
81
|
+
const endpoint = `${this.resource}/v1.0/teams/${formatting.encodeQueryParameter(this.teamId)}/channels/${formatting.encodeQueryParameter(this.channelId)}/tabs/${formatting.encodeQueryParameter(tabId)}?$expand=teamsApp`;
|
|
82
82
|
const requestOptions = {
|
|
83
83
|
url: endpoint,
|
|
84
84
|
headers: {
|