@pnp/cli-microsoft365 7.3.0-beta.e0b37b9 → 7.4.0-beta.2324d53
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 +1 -0
- package/README.md +1 -1
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +3 -0
- package/dist/m365/app/commands/app-get.js +1 -1
- package/dist/m365/app/commands/permission/permission-list.js +1 -1
- package/dist/m365/base/PowerAutomateCommand.js +18 -0
- package/dist/m365/{aad/commands.js → entra/aadCommands.js} +2 -1
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-add.js +12 -8
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-get.js +18 -14
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-list.js +6 -2
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-member-add.js +16 -12
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-get.js +116 -0
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-member-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/administrativeunit/administrativeunit-remove.js +18 -14
- package/dist/m365/{aad → entra}/commands/app/app-add.js +25 -21
- package/dist/m365/{aad → entra}/commands/app/app-get.js +17 -13
- package/dist/m365/{aad → entra}/commands/app/app-list.js +7 -3
- package/dist/m365/{aad → entra}/commands/app/app-permission-add.js +16 -12
- package/dist/m365/{aad → entra}/commands/app/app-remove.js +17 -13
- package/dist/m365/{aad → entra}/commands/app/app-role-add.js +18 -14
- package/dist/m365/{aad → entra}/commands/app/app-role-list.js +15 -11
- package/dist/m365/{aad → entra}/commands/app/app-role-remove.js +17 -13
- package/dist/m365/{aad → entra}/commands/app/app-set.js +18 -14
- package/dist/m365/{aad → entra}/commands/approleassignment/approleassignment-add.js +17 -13
- package/dist/m365/{aad → entra}/commands/approleassignment/approleassignment-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/approleassignment/approleassignment-remove.js +17 -13
- package/dist/m365/{aad → entra}/commands/group/group-get.js +17 -13
- package/dist/m365/{aad → entra}/commands/group/group-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/group/group-remove.js +19 -15
- package/dist/m365/{aad → entra}/commands/group/group-user-list.js +17 -13
- package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-add.js +12 -8
- package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-get.js +12 -8
- package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-list.js +7 -3
- package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-remove.js +14 -10
- package/dist/m365/{aad → entra}/commands/groupsetting/groupsetting-set.js +12 -8
- package/dist/m365/{aad → entra}/commands/groupsettingtemplate/groupsettingtemplate-get.js +17 -13
- package/dist/m365/{aad → entra}/commands/groupsettingtemplate/groupsettingtemplate-list.js +7 -3
- package/dist/m365/{aad → entra}/commands/license/license-list.js +6 -2
- package/dist/m365/{aad → entra}/commands/m365group/m365group-add.js +19 -15
- package/dist/m365/{aad → entra}/commands/m365group/m365group-conversation-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/m365group/m365group-conversation-post-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/m365group/m365group-get.js +12 -8
- package/dist/m365/{aad → entra}/commands/m365group/m365group-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-clear.js +12 -8
- package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-remove.js +16 -12
- package/dist/m365/{aad → entra}/commands/m365group/m365group-recyclebinitem-restore.js +16 -12
- package/dist/m365/{aad → entra}/commands/m365group/m365group-remove.js +17 -13
- package/dist/m365/{aad → entra}/commands/m365group/m365group-renew.js +12 -8
- package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitycounts.js +4 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitydetail.js +4 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activityfilecounts.js +4 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitygroupcounts.js +4 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-report-activitystorage.js +4 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-set.js +19 -15
- package/dist/m365/{aad → entra}/commands/m365group/m365group-teamify.js +16 -12
- package/dist/m365/{aad → entra}/commands/m365group/m365group-user-add.js +14 -13
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +154 -0
- package/dist/m365/{aad → entra}/commands/m365group/m365group-user-remove.js +14 -13
- package/dist/m365/{aad → entra}/commands/m365group/m365group-user-set.js +14 -13
- package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-add.js +12 -8
- package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-remove.js +10 -6
- package/dist/m365/{aad → entra}/commands/oauth2grant/oauth2grant-set.js +10 -6
- package/dist/m365/{aad → entra}/commands/policy/policy-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-disable.js +12 -8
- package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-enable.js +12 -8
- package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-get.js +6 -2
- package/dist/m365/{aad → entra}/commands/siteclassification/siteclassification-set.js +14 -10
- package/dist/m365/{aad → entra}/commands/sp/sp-add.js +17 -13
- package/dist/m365/{aad → entra}/commands/sp/sp-get.js +16 -12
- package/dist/m365/{aad → entra}/commands/sp/sp-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/user/user-add.js +18 -14
- package/dist/m365/{aad → entra}/commands/user/user-get.js +16 -12
- package/dist/m365/{aad → entra}/commands/user/user-guest-add.js +12 -8
- package/dist/m365/{aad → entra}/commands/user/user-hibp.js +14 -10
- package/dist/m365/{aad → entra}/commands/user/user-license-add.js +16 -12
- package/dist/m365/{aad → entra}/commands/user/user-license-list.js +16 -12
- package/dist/m365/{aad → entra}/commands/user/user-license-remove.js +16 -12
- package/dist/m365/{aad → entra}/commands/user/user-list.js +12 -8
- package/dist/m365/{aad → entra}/commands/user/user-password-validate.js +10 -6
- package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-clear.js +12 -8
- package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-list.js +6 -2
- package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-remove.js +14 -10
- package/dist/m365/{aad → entra}/commands/user/user-recyclebinitem-restore.js +12 -8
- package/dist/m365/{aad → entra}/commands/user/user-remove.js +16 -12
- package/dist/m365/{aad → entra}/commands/user/user-set.js +18 -14
- package/dist/m365/{aad → entra}/commands/user/user-signin-list.js +15 -11
- package/dist/m365/entra/commands.js +85 -0
- package/dist/m365/external/commands/connection/connection-schema-add.js +36 -3
- package/dist/m365/flow/commands/environment/environment-get.js +3 -3
- package/dist/m365/flow/commands/environment/environment-list.js +3 -3
- package/dist/m365/flow/commands/flow-disable.js +3 -3
- package/dist/m365/flow/commands/flow-enable.js +3 -3
- package/dist/m365/flow/commands/flow-get.js +3 -3
- package/dist/m365/flow/commands/flow-list.js +14 -12
- package/dist/m365/flow/commands/flow-remove.js +3 -3
- package/dist/m365/flow/commands/owner/owner-ensure.js +3 -3
- package/dist/m365/flow/commands/owner/owner-list.js +3 -3
- package/dist/m365/flow/commands/owner/owner-remove.js +3 -3
- package/dist/m365/flow/commands/run/run-cancel.js +3 -3
- package/dist/m365/flow/commands/run/run-get.js +3 -3
- package/dist/m365/flow/commands/run/run-list.js +8 -7
- package/dist/m365/flow/commands/run/run-resubmit.js +4 -4
- package/dist/m365/pa/commands/app/app-get.js +26 -11
- package/dist/m365/pa/commands/app/app-remove.js +19 -2
- package/dist/m365/spo/commands/group/group-member-remove.js +1 -1
- package/dist/m365/spo/commands/group/group-set.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-batch-add.js +18 -7
- package/dist/m365/spo/commands/page/page-add.js +7 -28
- package/dist/m365/spo/commands/site/site-set.js +1 -1
- package/dist/m365/teams/commands/app/app-install.js +1 -1
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +1 -1
- package/dist/utils/aadAdministrativeUnit.js +4 -4
- package/docs/docs/cmd/adaptivecard/adaptivecard-send.mdx +1 -1
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-add.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-get.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-list.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-member-add.mdx +13 -7
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-member-get.mdx +136 -0
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-member-list.mdx +16 -10
- package/docs/docs/cmd/{aad → entra}/administrativeunit/administrativeunit-remove.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/app/app-add.mdx +44 -38
- package/docs/docs/cmd/{aad → entra}/app/app-get.mdx +23 -17
- package/docs/docs/cmd/{aad → entra}/app/app-list.mdx +11 -5
- package/docs/docs/cmd/entra/app/app-permission-add.mdx +68 -0
- package/docs/docs/cmd/entra/app/app-remove.mdx +65 -0
- package/docs/docs/cmd/entra/app/app-role-add.mdx +74 -0
- package/docs/docs/cmd/{aad → entra}/app/app-role-list.mdx +20 -14
- package/docs/docs/cmd/entra/app/app-role-remove.mdx +84 -0
- package/docs/docs/cmd/entra/app/app-set.mdx +103 -0
- package/docs/docs/cmd/{aad → entra}/approleassignment/approleassignment-add.mdx +14 -8
- package/docs/docs/cmd/{aad → entra}/approleassignment/approleassignment-list.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/approleassignment/approleassignment-remove.mdx +13 -7
- package/docs/docs/cmd/{aad → entra}/group/group-get.mdx +15 -9
- package/docs/docs/cmd/{aad → entra}/group/group-list.mdx +13 -7
- package/docs/docs/cmd/entra/group/group-remove.mdx +50 -0
- package/docs/docs/cmd/{aad → entra}/group/group-user-list.mdx +17 -11
- package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-add.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-get.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-list.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-remove.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/groupsetting/groupsetting-set.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/groupsettingtemplate/groupsettingtemplate-get.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/groupsettingtemplate/groupsettingtemplate-list.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/license/license-list.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-add.mdx +17 -11
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-conversation-list.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-conversation-post-list.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-get.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-list.mdx +13 -7
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-clear.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-list.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-remove.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-recyclebinitem-restore.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-remove.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-renew.mdx +8 -2
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitycounts.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitydetail.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activityfilecounts.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitygroupcounts.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-report-activitystorage.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-set.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-teamify.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-user-add.mdx +9 -3
- package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +131 -0
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-user-remove.mdx +9 -5
- package/docs/docs/cmd/{aad → entra}/m365group/m365group-user-set.mdx +10 -6
- package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-add.mdx +15 -9
- package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-list.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-remove.mdx +13 -7
- package/docs/docs/cmd/{aad → entra}/oauth2grant/oauth2grant-set.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/policy/policy-list.mdx +14 -8
- package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-disable.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-enable.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-get.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/siteclassification/siteclassification-set.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/sp/sp-add.mdx +25 -19
- package/docs/docs/cmd/{aad → entra}/sp/sp-get.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/sp/sp-list.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/user/user-add.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/user/user-get.mdx +16 -10
- package/docs/docs/cmd/{aad → entra}/user/user-guest-add.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/user/user-hibp.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/user/user-license-add.mdx +10 -4
- package/docs/docs/cmd/{aad → entra}/user/user-license-list.mdx +11 -5
- package/docs/docs/cmd/{aad → entra}/user/user-license-remove.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-list.mdx +12 -6
- package/docs/docs/cmd/{aad → entra}/user/user-password-validate.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-clear.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-list.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-remove.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-recyclebinitem-restore.mdx +8 -2
- package/docs/docs/cmd/{aad → entra}/user/user-remove.mdx +9 -3
- package/docs/docs/cmd/{aad → entra}/user/user-set.mdx +15 -9
- package/docs/docs/cmd/{aad → entra}/user/user-signin-list.mdx +19 -13
- package/docs/docs/cmd/external/connection/connection-schema-add.mdx +14 -1
- package/docs/docs/cmd/graph/schemaextension/schemaextension-add.mdx +1 -1
- package/docs/docs/cmd/graph/schemaextension/schemaextension-set.mdx +1 -1
- package/docs/docs/cmd/pa/app/app-get.mdx +15 -0
- package/docs/docs/cmd/pa/app/app-remove.mdx +14 -0
- package/docs/docs/cmd/planner/plan/plan-add.mdx +1 -1
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.mdx +1 -1
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +1 -1
- package/docs/docs/cmd/spo/commandset/commandset-add.mdx +1 -1
- package/docs/docs/cmd/spo/commandset/commandset-set.mdx +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-set.mdx +1 -1
- package/docs/docs/cmd/spo/customaction/customaction-add.mdx +1 -1
- package/docs/docs/cmd/spo/customaction/customaction-set.mdx +1 -1
- package/docs/docs/cmd/spo/field/field-set.mdx +1 -1
- package/docs/docs/cmd/spo/list/list-view-set.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-add.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-batch-add.mdx +26 -4
- package/docs/docs/cmd/spo/listitem/listitem-set.mdx +1 -1
- package/docs/docs/cmd/spo/page/page-clientsidewebpart-add.mdx +1 -1
- package/docs/docs/cmd/spo/page/page-control-set.mdx +1 -1
- package/docs/docs/cmd/spo/page/page-set.mdx +2 -2
- package/docs/docs/cmd/spo/site/site-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-set.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +1 -1
- package/docs/docs/cmd/spo/term/term-add.mdx +1 -1
- package/docs/docs/cmd/spo/term/term-group-add.mdx +1 -1
- package/docs/docs/cmd/spo/term/term-set-add.mdx +1 -1
- package/docs/docs/cmd/teams/team/team-add.mdx +1 -1
- package/npm-shrinkwrap.json +186 -432
- package/package.json +9 -9
- package/dist/m365/aad/commands/m365group/m365group-user-list.js +0 -94
- package/docs/docs/cmd/aad/app/app-permission-add.mdx +0 -62
- package/docs/docs/cmd/aad/app/app-remove.mdx +0 -59
- package/docs/docs/cmd/aad/app/app-role-add.mdx +0 -68
- package/docs/docs/cmd/aad/app/app-role-remove.mdx +0 -78
- package/docs/docs/cmd/aad/app/app-set.mdx +0 -97
- package/docs/docs/cmd/aad/group/group-remove.mdx +0 -44
- package/docs/docs/cmd/aad/m365group/m365group-user-list.mdx +0 -99
- /package/dist/m365/{aad → entra}/commands/approleassignment/ServicePrincipal.js +0 -0
- /package/dist/m365/{aad → entra}/commands/m365group/GroupExtended.js +0 -0
- /package/dist/m365/{aad → entra}/commands/siteclassification/SiteClassificationSettings.js +0 -0
|
@@ -6,9 +6,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _FlowEnvironmentGetCommand_instances, _FlowEnvironmentGetCommand_initOptions, _FlowEnvironmentGetCommand_initTelemetry;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
-
import
|
|
9
|
+
import PowerAutomateCommand from '../../../base/PowerAutomateCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
11
|
-
class FlowEnvironmentGetCommand extends
|
|
11
|
+
class FlowEnvironmentGetCommand extends PowerAutomateCommand {
|
|
12
12
|
get name() {
|
|
13
13
|
return commands.ENVIRONMENT_GET;
|
|
14
14
|
}
|
|
@@ -28,7 +28,7 @@ class FlowEnvironmentGetCommand extends AzmgmtCommand {
|
|
|
28
28
|
if (this.verbose) {
|
|
29
29
|
await logger.logToStderr(`Retrieving information about Microsoft Flow environment ${args.options.name ?? ''}...`);
|
|
30
30
|
}
|
|
31
|
-
let requestUrl = `${this.resource}providers/Microsoft.ProcessSimple/environments/`;
|
|
31
|
+
let requestUrl = `${this.resource}/providers/Microsoft.ProcessSimple/environments/`;
|
|
32
32
|
if (args.options.name) {
|
|
33
33
|
requestUrl += `${formatting.encodeQueryParameter(args.options.name)}`;
|
|
34
34
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { odata } from '../../../../utils/odata.js';
|
|
2
|
-
import
|
|
2
|
+
import PowerAutomateCommand from '../../../base/PowerAutomateCommand.js';
|
|
3
3
|
import commands from '../../commands.js';
|
|
4
|
-
class FlowEnvironmentListCommand extends
|
|
4
|
+
class FlowEnvironmentListCommand extends PowerAutomateCommand {
|
|
5
5
|
get name() {
|
|
6
6
|
return commands.ENVIRONMENT_LIST;
|
|
7
7
|
}
|
|
@@ -16,7 +16,7 @@ class FlowEnvironmentListCommand extends AzmgmtCommand {
|
|
|
16
16
|
await logger.logToStderr(`Retrieving list of Microsoft Flow environments...`);
|
|
17
17
|
}
|
|
18
18
|
try {
|
|
19
|
-
const res = await odata.getAllItems(`${this.resource}providers/Microsoft.ProcessSimple/environments?api-version=2016-11-01`);
|
|
19
|
+
const res = await odata.getAllItems(`${this.resource}/providers/Microsoft.ProcessSimple/environments?api-version=2016-11-01`);
|
|
20
20
|
if (res.length > 0) {
|
|
21
21
|
if (args.options.output !== 'json') {
|
|
22
22
|
res.forEach(e => {
|
|
@@ -6,9 +6,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _FlowDisableCommand_instances, _FlowDisableCommand_initTelemetry, _FlowDisableCommand_initOptions;
|
|
7
7
|
import request from '../../../request.js';
|
|
8
8
|
import { formatting } from '../../../utils/formatting.js';
|
|
9
|
-
import
|
|
9
|
+
import PowerAutomateCommand from '../../base/PowerAutomateCommand.js';
|
|
10
10
|
import commands from '../commands.js';
|
|
11
|
-
class FlowDisableCommand extends
|
|
11
|
+
class FlowDisableCommand extends PowerAutomateCommand {
|
|
12
12
|
get name() {
|
|
13
13
|
return commands.DISABLE;
|
|
14
14
|
}
|
|
@@ -26,7 +26,7 @@ class FlowDisableCommand extends AzmgmtCommand {
|
|
|
26
26
|
await logger.logToStderr(`Disables Microsoft Flow ${args.options.name}...`);
|
|
27
27
|
}
|
|
28
28
|
const requestOptions = {
|
|
29
|
-
url: `${this.resource}providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.name)}/stop?api-version=2016-11-01`,
|
|
29
|
+
url: `${this.resource}/providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.name)}/stop?api-version=2016-11-01`,
|
|
30
30
|
headers: {
|
|
31
31
|
accept: 'application/json'
|
|
32
32
|
},
|
|
@@ -6,9 +6,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _FlowEnableCommand_instances, _FlowEnableCommand_initTelemetry, _FlowEnableCommand_initOptions;
|
|
7
7
|
import request from '../../../request.js';
|
|
8
8
|
import { formatting } from '../../../utils/formatting.js';
|
|
9
|
-
import
|
|
9
|
+
import PowerAutomateCommand from '../../base/PowerAutomateCommand.js';
|
|
10
10
|
import commands from '../commands.js';
|
|
11
|
-
class FlowEnableCommand extends
|
|
11
|
+
class FlowEnableCommand extends PowerAutomateCommand {
|
|
12
12
|
get name() {
|
|
13
13
|
return commands.ENABLE;
|
|
14
14
|
}
|
|
@@ -26,7 +26,7 @@ class FlowEnableCommand extends AzmgmtCommand {
|
|
|
26
26
|
await logger.logToStderr(`Enables Microsoft Flow ${args.options.name}...`);
|
|
27
27
|
}
|
|
28
28
|
const requestOptions = {
|
|
29
|
-
url: `${this.resource}providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.name)}/start?api-version=2016-11-01`,
|
|
29
|
+
url: `${this.resource}/providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.name)}/start?api-version=2016-11-01`,
|
|
30
30
|
headers: {
|
|
31
31
|
accept: 'application/json'
|
|
32
32
|
},
|
|
@@ -6,9 +6,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _FlowGetCommand_instances, _FlowGetCommand_initTelemetry, _FlowGetCommand_initOptions;
|
|
7
7
|
import request from '../../../request.js';
|
|
8
8
|
import { formatting } from '../../../utils/formatting.js';
|
|
9
|
-
import
|
|
9
|
+
import PowerAutomateCommand from '../../base/PowerAutomateCommand.js';
|
|
10
10
|
import commands from '../commands.js';
|
|
11
|
-
class FlowGetCommand extends
|
|
11
|
+
class FlowGetCommand extends PowerAutomateCommand {
|
|
12
12
|
get name() {
|
|
13
13
|
return commands.GET;
|
|
14
14
|
}
|
|
@@ -29,7 +29,7 @@ class FlowGetCommand extends AzmgmtCommand {
|
|
|
29
29
|
await logger.logToStderr(`Retrieving information about Microsoft Flow ${args.options.name}...`);
|
|
30
30
|
}
|
|
31
31
|
const requestOptions = {
|
|
32
|
-
url: `${this.resource}providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.name)}?api-version=2016-11-01`,
|
|
32
|
+
url: `${this.resource}/providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.name)}?api-version=2016-11-01`,
|
|
33
33
|
headers: {
|
|
34
34
|
accept: 'application/json'
|
|
35
35
|
},
|
|
@@ -5,9 +5,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _FlowListCommand_instances, _FlowListCommand_initTelemetry, _FlowListCommand_initOptions, _FlowListCommand_initValidators;
|
|
7
7
|
import { formatting } from '../../../utils/formatting.js';
|
|
8
|
-
import {
|
|
8
|
+
import { odata } from '../../../utils/odata.js';
|
|
9
|
+
import PowerAutomateCommand from '../../base/PowerAutomateCommand.js';
|
|
9
10
|
import commands from '../commands.js';
|
|
10
|
-
class FlowListCommand extends
|
|
11
|
+
class FlowListCommand extends PowerAutomateCommand {
|
|
11
12
|
get name() {
|
|
12
13
|
return commands.LIST;
|
|
13
14
|
}
|
|
@@ -28,31 +29,32 @@ class FlowListCommand extends AzmgmtItemsListCommand {
|
|
|
28
29
|
async commandAction(logger, args) {
|
|
29
30
|
try {
|
|
30
31
|
const { environmentName, asAdmin, sharingStatus, includeSolutions } = args.options;
|
|
32
|
+
let items = [];
|
|
31
33
|
if (sharingStatus === 'personal') {
|
|
32
34
|
const url = this.getApiUrl(environmentName, asAdmin, includeSolutions, 'personal');
|
|
33
|
-
await
|
|
35
|
+
items = await odata.getAllItems(url);
|
|
34
36
|
}
|
|
35
37
|
else if (sharingStatus === 'sharedWithMe') {
|
|
36
38
|
const url = this.getApiUrl(environmentName, asAdmin, includeSolutions, 'team');
|
|
37
|
-
await
|
|
39
|
+
items = await odata.getAllItems(url);
|
|
38
40
|
}
|
|
39
41
|
else if (sharingStatus === 'all') {
|
|
40
42
|
let url = this.getApiUrl(environmentName, asAdmin, includeSolutions, 'personal');
|
|
41
|
-
await
|
|
43
|
+
items = await odata.getAllItems(url);
|
|
42
44
|
url = this.getApiUrl(environmentName, asAdmin, includeSolutions, 'team');
|
|
43
|
-
await
|
|
45
|
+
items = await odata.getAllItems(url);
|
|
44
46
|
}
|
|
45
47
|
else {
|
|
46
48
|
const url = this.getApiUrl(environmentName, asAdmin, includeSolutions);
|
|
47
|
-
await
|
|
49
|
+
items = await odata.getAllItems(url);
|
|
48
50
|
}
|
|
49
51
|
// Remove duplicates
|
|
50
|
-
|
|
51
|
-
if (
|
|
52
|
-
|
|
52
|
+
items = items.filter((flow, index, self) => index === self.findIndex(f => f.id === flow.id));
|
|
53
|
+
if (items.length > 0) {
|
|
54
|
+
items.forEach(i => {
|
|
53
55
|
i.displayName = i.properties.displayName;
|
|
54
56
|
});
|
|
55
|
-
await logger.log(
|
|
57
|
+
await logger.log(items);
|
|
56
58
|
}
|
|
57
59
|
else {
|
|
58
60
|
if (this.verbose) {
|
|
@@ -65,7 +67,7 @@ class FlowListCommand extends AzmgmtItemsListCommand {
|
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
69
|
getApiUrl(environmentName, asAdmin, includeSolutionFlows, filter) {
|
|
68
|
-
let url = `${this.resource}providers/Microsoft.ProcessSimple${asAdmin ? '/scopes/admin' : ''}/environments/${formatting.encodeQueryParameter(environmentName)}/flows?api-version=2016-11-01`;
|
|
70
|
+
let url = `${this.resource}/providers/Microsoft.ProcessSimple${asAdmin ? '/scopes/admin' : ''}/environments/${formatting.encodeQueryParameter(environmentName)}/flows?api-version=2016-11-01`;
|
|
69
71
|
if (filter === 'personal') {
|
|
70
72
|
url += `&$filter=search('personal')`;
|
|
71
73
|
}
|
|
@@ -8,9 +8,9 @@ import { cli } from '../../../cli/cli.js';
|
|
|
8
8
|
import request from '../../../request.js';
|
|
9
9
|
import { formatting } from '../../../utils/formatting.js';
|
|
10
10
|
import { validation } from '../../../utils/validation.js';
|
|
11
|
-
import AzmgmtCommand from '../../base/AzmgmtCommand.js';
|
|
12
11
|
import commands from '../commands.js';
|
|
13
|
-
|
|
12
|
+
import PowerAutomateCommand from '../../base/PowerAutomateCommand.js';
|
|
13
|
+
class FlowRemoveCommand extends PowerAutomateCommand {
|
|
14
14
|
get name() {
|
|
15
15
|
return commands.REMOVE;
|
|
16
16
|
}
|
|
@@ -30,7 +30,7 @@ class FlowRemoveCommand extends AzmgmtCommand {
|
|
|
30
30
|
}
|
|
31
31
|
const removeFlow = async () => {
|
|
32
32
|
const requestOptions = {
|
|
33
|
-
url: `${this.resource}providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.name)}?api-version=2016-11-01`,
|
|
33
|
+
url: `${this.resource}/providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.name)}?api-version=2016-11-01`,
|
|
34
34
|
fullResponse: true,
|
|
35
35
|
headers: {
|
|
36
36
|
accept: 'application/json'
|
|
@@ -9,9 +9,9 @@ import { aadGroup } from '../../../../utils/aadGroup.js';
|
|
|
9
9
|
import { aadUser } from '../../../../utils/aadUser.js';
|
|
10
10
|
import { formatting } from '../../../../utils/formatting.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
|
-
import
|
|
12
|
+
import PowerAutomateCommand from '../../../base/PowerAutomateCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
14
|
-
class FlowOwnerEnsureCommand extends
|
|
14
|
+
class FlowOwnerEnsureCommand extends PowerAutomateCommand {
|
|
15
15
|
get name() {
|
|
16
16
|
return commands.OWNER_ENSURE;
|
|
17
17
|
}
|
|
@@ -52,7 +52,7 @@ class FlowOwnerEnsureCommand extends AzmgmtCommand {
|
|
|
52
52
|
type = 'Group';
|
|
53
53
|
}
|
|
54
54
|
const requestOptions = {
|
|
55
|
-
url: `${this.resource}providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/modifyPermissions?api-version=2016-11-01`,
|
|
55
|
+
url: `${this.resource}/providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/modifyPermissions?api-version=2016-11-01`,
|
|
56
56
|
headers: {
|
|
57
57
|
accept: 'application/json'
|
|
58
58
|
},
|
|
@@ -8,9 +8,9 @@ import { cli } from '../../../../cli/cli.js';
|
|
|
8
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
9
|
import { odata } from '../../../../utils/odata.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
|
-
import
|
|
11
|
+
import PowerAutomateCommand from '../../../base/PowerAutomateCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
13
|
-
class FlowOwnerListCommand extends
|
|
13
|
+
class FlowOwnerListCommand extends PowerAutomateCommand {
|
|
14
14
|
get name() {
|
|
15
15
|
return commands.OWNER_LIST;
|
|
16
16
|
}
|
|
@@ -32,7 +32,7 @@ class FlowOwnerListCommand extends AzmgmtCommand {
|
|
|
32
32
|
if (this.verbose) {
|
|
33
33
|
await logger.logToStderr(`Listing owners for flow ${args.options.flowName} in environment ${args.options.environmentName}`);
|
|
34
34
|
}
|
|
35
|
-
const response = await odata.getAllItems(`${this.resource}providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/permissions?api-version=2016-11-01`);
|
|
35
|
+
const response = await odata.getAllItems(`${this.resource}/providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/permissions?api-version=2016-11-01`);
|
|
36
36
|
if (!cli.shouldTrimOutput(args.options.output)) {
|
|
37
37
|
await logger.log(response);
|
|
38
38
|
}
|
|
@@ -10,9 +10,9 @@ import { aadGroup } from '../../../../utils/aadGroup.js';
|
|
|
10
10
|
import { aadUser } from '../../../../utils/aadUser.js';
|
|
11
11
|
import { formatting } from '../../../../utils/formatting.js';
|
|
12
12
|
import { validation } from '../../../../utils/validation.js';
|
|
13
|
-
import
|
|
13
|
+
import PowerAutomateCommand from '../../../base/PowerAutomateCommand.js';
|
|
14
14
|
import commands from '../../commands.js';
|
|
15
|
-
class FlowOwnerRemoveCommand extends
|
|
15
|
+
class FlowOwnerRemoveCommand extends PowerAutomateCommand {
|
|
16
16
|
get name() {
|
|
17
17
|
return commands.OWNER_REMOVE;
|
|
18
18
|
}
|
|
@@ -47,7 +47,7 @@ class FlowOwnerRemoveCommand extends AzmgmtCommand {
|
|
|
47
47
|
idToRemove = await aadGroup.getGroupIdByDisplayName(args.options.groupName);
|
|
48
48
|
}
|
|
49
49
|
const requestOptions = {
|
|
50
|
-
url: `${this.resource}providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/modifyPermissions?api-version=2016-11-01`,
|
|
50
|
+
url: `${this.resource}/providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/modifyPermissions?api-version=2016-11-01`,
|
|
51
51
|
headers: {
|
|
52
52
|
accept: 'application/json'
|
|
53
53
|
},
|
|
@@ -8,9 +8,9 @@ import { cli } from '../../../../cli/cli.js';
|
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
|
-
import
|
|
11
|
+
import PowerAutomateCommand from '../../../base/PowerAutomateCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
13
|
-
class FlowRunCancelCommand extends
|
|
13
|
+
class FlowRunCancelCommand extends PowerAutomateCommand {
|
|
14
14
|
get name() {
|
|
15
15
|
return commands.RUN_CANCEL;
|
|
16
16
|
}
|
|
@@ -30,7 +30,7 @@ class FlowRunCancelCommand extends AzmgmtCommand {
|
|
|
30
30
|
}
|
|
31
31
|
const cancelFlow = async () => {
|
|
32
32
|
const requestOptions = {
|
|
33
|
-
url: `${this.resource}providers/Microsoft.ProcessSimple/environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/runs/${formatting.encodeQueryParameter(args.options.name)}/cancel?api-version=2016-11-01`,
|
|
33
|
+
url: `${this.resource}/providers/Microsoft.ProcessSimple/environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/runs/${formatting.encodeQueryParameter(args.options.name)}/cancel?api-version=2016-11-01`,
|
|
34
34
|
headers: {
|
|
35
35
|
accept: 'application/json'
|
|
36
36
|
},
|
|
@@ -7,9 +7,9 @@ var _FlowRunGetCommand_instances, _FlowRunGetCommand_initOptions, _FlowRunGetCom
|
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
|
-
import
|
|
10
|
+
import PowerAutomateCommand from '../../../base/PowerAutomateCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
12
|
-
class FlowRunGetCommand extends
|
|
12
|
+
class FlowRunGetCommand extends PowerAutomateCommand {
|
|
13
13
|
get name() {
|
|
14
14
|
return commands.RUN_GET;
|
|
15
15
|
}
|
|
@@ -31,7 +31,7 @@ class FlowRunGetCommand extends AzmgmtCommand {
|
|
|
31
31
|
await logger.logToStderr(`Retrieving information about run ${args.options.name} of Microsoft Flow ${args.options.flowName}...`);
|
|
32
32
|
}
|
|
33
33
|
const requestOptions = {
|
|
34
|
-
url: `${this.resource}providers/Microsoft.ProcessSimple/environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/runs/${formatting.encodeQueryParameter(args.options.name)}?api-version=2016-11-01`,
|
|
34
|
+
url: `${this.resource}/providers/Microsoft.ProcessSimple/environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/runs/${formatting.encodeQueryParameter(args.options.name)}?api-version=2016-11-01`,
|
|
35
35
|
headers: {
|
|
36
36
|
accept: 'application/json'
|
|
37
37
|
},
|
|
@@ -5,10 +5,11 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _FlowRunListCommand_instances, _FlowRunListCommand_initTelemetry, _FlowRunListCommand_initOptions, _FlowRunListCommand_initValidators;
|
|
7
7
|
import { formatting } from '../../../../utils/formatting.js';
|
|
8
|
+
import { odata } from '../../../../utils/odata.js';
|
|
8
9
|
import { validation } from '../../../../utils/validation.js';
|
|
9
|
-
import
|
|
10
|
+
import PowerAutomateCommand from '../../../base/PowerAutomateCommand.js';
|
|
10
11
|
import commands from '../../commands.js';
|
|
11
|
-
class FlowRunListCommand extends
|
|
12
|
+
class FlowRunListCommand extends PowerAutomateCommand {
|
|
12
13
|
get name() {
|
|
13
14
|
return commands.RUN_LIST;
|
|
14
15
|
}
|
|
@@ -30,20 +31,20 @@ class FlowRunListCommand extends AzmgmtItemsListCommand {
|
|
|
30
31
|
if (this.verbose) {
|
|
31
32
|
await logger.logToStderr(`Retrieving list of runs for Microsoft Flow ${args.options.flowName}...`);
|
|
32
33
|
}
|
|
33
|
-
let url = `${this.resource}providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/runs?api-version=2016-11-01`;
|
|
34
|
+
let url = `${this.resource}/providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/runs?api-version=2016-11-01`;
|
|
34
35
|
const filters = this.getFilters(args.options);
|
|
35
36
|
if (filters.length > 0) {
|
|
36
37
|
url += `&$filter=${filters.join(' and ')}`;
|
|
37
38
|
}
|
|
38
39
|
try {
|
|
39
|
-
await
|
|
40
|
-
if (args.options.output !== 'json' &&
|
|
41
|
-
|
|
40
|
+
const items = await odata.getAllItems(url);
|
|
41
|
+
if (args.options.output !== 'json' && items.length > 0) {
|
|
42
|
+
items.forEach(i => {
|
|
42
43
|
i.startTime = i.properties.startTime;
|
|
43
44
|
i.status = i.properties.status;
|
|
44
45
|
});
|
|
45
46
|
}
|
|
46
|
-
await logger.log(
|
|
47
|
+
await logger.log(items);
|
|
47
48
|
}
|
|
48
49
|
catch (err) {
|
|
49
50
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -9,9 +9,9 @@ import { cli } from '../../../../cli/cli.js';
|
|
|
9
9
|
import request from '../../../../request.js';
|
|
10
10
|
import { formatting } from '../../../../utils/formatting.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
|
-
import AzmgmtCommand from '../../../base/AzmgmtCommand.js';
|
|
13
12
|
import commands from '../../commands.js';
|
|
14
|
-
|
|
13
|
+
import PowerAutomateCommand from '../../../base/PowerAutomateCommand.js';
|
|
14
|
+
class FlowRunResubmitCommand extends PowerAutomateCommand {
|
|
15
15
|
get name() {
|
|
16
16
|
return commands.RUN_RESUBMIT;
|
|
17
17
|
}
|
|
@@ -36,7 +36,7 @@ class FlowRunResubmitCommand extends AzmgmtCommand {
|
|
|
36
36
|
await logger.logToStderr(chalk.yellow(`Retrieved trigger: ${triggerName}`));
|
|
37
37
|
}
|
|
38
38
|
const requestOptions = {
|
|
39
|
-
url: `${this.resource}providers/Microsoft.ProcessSimple/environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/triggers/${formatting.encodeQueryParameter(triggerName)}/histories/${formatting.encodeQueryParameter(args.options.name)}/resubmit?api-version=2016-11-01`,
|
|
39
|
+
url: `${this.resource}/providers/Microsoft.ProcessSimple/environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/triggers/${formatting.encodeQueryParameter(triggerName)}/histories/${formatting.encodeQueryParameter(args.options.name)}/resubmit?api-version=2016-11-01`,
|
|
40
40
|
headers: {
|
|
41
41
|
accept: 'application/json'
|
|
42
42
|
},
|
|
@@ -60,7 +60,7 @@ class FlowRunResubmitCommand extends AzmgmtCommand {
|
|
|
60
60
|
}
|
|
61
61
|
async getTriggerName(environment, flow) {
|
|
62
62
|
const requestOptions = {
|
|
63
|
-
url: `${this.resource}providers/Microsoft.ProcessSimple/environments/${formatting.encodeQueryParameter(environment)}/flows/${formatting.encodeQueryParameter(flow)}/triggers?api-version=2016-11-01`,
|
|
63
|
+
url: `${this.resource}/providers/Microsoft.ProcessSimple/environments/${formatting.encodeQueryParameter(environment)}/flows/${formatting.encodeQueryParameter(flow)}/triggers?api-version=2016-11-01`,
|
|
64
64
|
headers: {
|
|
65
65
|
accept: 'application/json'
|
|
66
66
|
},
|
|
@@ -32,8 +32,13 @@ class PaAppGetCommand extends PowerAppsCommand {
|
|
|
32
32
|
async commandAction(logger, args) {
|
|
33
33
|
try {
|
|
34
34
|
if (args.options.name) {
|
|
35
|
+
let endpoint = `${this.resource}/providers/Microsoft.PowerApps`;
|
|
36
|
+
if (args.options.asAdmin) {
|
|
37
|
+
endpoint += `/scopes/admin/environments/${formatting.encodeQueryParameter(args.options.environmentName)}`;
|
|
38
|
+
}
|
|
39
|
+
endpoint += `/apps/${formatting.encodeQueryParameter(args.options.name)}?api-version=2016-11-01`;
|
|
35
40
|
const requestOptions = {
|
|
36
|
-
url:
|
|
41
|
+
url: endpoint,
|
|
37
42
|
headers: {
|
|
38
43
|
accept: 'application/json'
|
|
39
44
|
},
|
|
@@ -50,8 +55,8 @@ class PaAppGetCommand extends PowerAppsCommand {
|
|
|
50
55
|
await logger.logToStderr(`Retrieving information about Microsoft Power App with displayName '${args.options.displayName}'...`);
|
|
51
56
|
}
|
|
52
57
|
const getAppsOutput = await this.getApps(args, logger);
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
if (getAppsOutput.stdout && JSON.parse(getAppsOutput.stdout).length > 0) {
|
|
59
|
+
const allApps = JSON.parse(getAppsOutput.stdout);
|
|
55
60
|
const app = allApps.find((a) => {
|
|
56
61
|
return a.properties.displayName.toLowerCase() === `${args.options.displayName}`.toLowerCase();
|
|
57
62
|
});
|
|
@@ -59,15 +64,11 @@ class PaAppGetCommand extends PowerAppsCommand {
|
|
|
59
64
|
await logger.log(this.setProperties(app));
|
|
60
65
|
}
|
|
61
66
|
else {
|
|
62
|
-
|
|
63
|
-
await logger.logToStderr(`No app found with displayName '${args.options.displayName}'`);
|
|
64
|
-
}
|
|
67
|
+
throw `No app found with displayName '${args.options.displayName}'.`;
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
70
|
else {
|
|
68
|
-
|
|
69
|
-
await logger.logToStderr('No apps found');
|
|
70
|
-
}
|
|
71
|
+
throw 'No apps found.';
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
}
|
|
@@ -82,7 +83,9 @@ class PaAppGetCommand extends PowerAppsCommand {
|
|
|
82
83
|
const options = {
|
|
83
84
|
output: 'json',
|
|
84
85
|
debug: this.debug,
|
|
85
|
-
verbose: this.verbose
|
|
86
|
+
verbose: this.verbose,
|
|
87
|
+
environmentName: args.options.environmentName,
|
|
88
|
+
asAdmin: args.options.asAdmin
|
|
86
89
|
};
|
|
87
90
|
return await cli.executeCommandWithOutput(paAppListCommand, { options: { ...options, _: [] } });
|
|
88
91
|
}
|
|
@@ -98,7 +101,9 @@ _PaAppGetCommand_instances = new WeakSet(), _PaAppGetCommand_initTelemetry = fun
|
|
|
98
101
|
this.telemetry.push((args) => {
|
|
99
102
|
Object.assign(this.telemetryProperties, {
|
|
100
103
|
name: typeof args.options.name !== 'undefined',
|
|
101
|
-
displayName: typeof args.options.displayName !== 'undefined'
|
|
104
|
+
displayName: typeof args.options.displayName !== 'undefined',
|
|
105
|
+
asAdmin: !!args.options.asAdmin,
|
|
106
|
+
environmentName: typeof args.options.environmentName !== 'undefined'
|
|
102
107
|
});
|
|
103
108
|
});
|
|
104
109
|
}, _PaAppGetCommand_initOptions = function _PaAppGetCommand_initOptions() {
|
|
@@ -106,12 +111,22 @@ _PaAppGetCommand_instances = new WeakSet(), _PaAppGetCommand_initTelemetry = fun
|
|
|
106
111
|
option: '-n, --name [name]'
|
|
107
112
|
}, {
|
|
108
113
|
option: '-d, --displayName [displayName]'
|
|
114
|
+
}, {
|
|
115
|
+
option: '-e, --environmentName [environmentName]'
|
|
116
|
+
}, {
|
|
117
|
+
option: '--asAdmin'
|
|
109
118
|
});
|
|
110
119
|
}, _PaAppGetCommand_initValidators = function _PaAppGetCommand_initValidators() {
|
|
111
120
|
this.validators.push(async (args) => {
|
|
112
121
|
if (args.options.name && !validation.isValidGuid(args.options.name)) {
|
|
113
122
|
return `${args.options.name} is not a valid GUID`;
|
|
114
123
|
}
|
|
124
|
+
if (args.options.asAdmin && !args.options.environmentName) {
|
|
125
|
+
return 'When specifying the asAdmin option, the environment option is required as well.';
|
|
126
|
+
}
|
|
127
|
+
if (args.options.environmentName && !args.options.asAdmin) {
|
|
128
|
+
return 'When specifying the environment option, the asAdmin option is required as well.';
|
|
129
|
+
}
|
|
115
130
|
return true;
|
|
116
131
|
});
|
|
117
132
|
}, _PaAppGetCommand_initOptionSets = function _PaAppGetCommand_initOptionSets() {
|
|
@@ -30,8 +30,13 @@ class PaAppRemoveCommand extends PowerAppsCommand {
|
|
|
30
30
|
await logger.logToStderr(`Removing Microsoft Power App ${args.options.name}...`);
|
|
31
31
|
}
|
|
32
32
|
const removePaApp = async () => {
|
|
33
|
+
let endpoint = `${this.resource}/providers/Microsoft.PowerApps`;
|
|
34
|
+
if (args.options.asAdmin) {
|
|
35
|
+
endpoint += `/scopes/admin/environments/${formatting.encodeQueryParameter(args.options.environmentName)}`;
|
|
36
|
+
}
|
|
37
|
+
endpoint += `/apps/${formatting.encodeQueryParameter(args.options.name)}?api-version=2017-08-01`;
|
|
33
38
|
const requestOptions = {
|
|
34
|
-
url:
|
|
39
|
+
url: endpoint,
|
|
35
40
|
fullResponse: true,
|
|
36
41
|
headers: {
|
|
37
42
|
accept: 'application/json'
|
|
@@ -64,7 +69,9 @@ class PaAppRemoveCommand extends PowerAppsCommand {
|
|
|
64
69
|
_PaAppRemoveCommand_instances = new WeakSet(), _PaAppRemoveCommand_initTelemetry = function _PaAppRemoveCommand_initTelemetry() {
|
|
65
70
|
this.telemetry.push((args) => {
|
|
66
71
|
Object.assign(this.telemetryProperties, {
|
|
67
|
-
force: typeof args.options.force !== 'undefined'
|
|
72
|
+
force: typeof args.options.force !== 'undefined',
|
|
73
|
+
asAdmin: !!args.options.asAdmin,
|
|
74
|
+
environmentName: typeof args.options.environmentName !== 'undefined'
|
|
68
75
|
});
|
|
69
76
|
});
|
|
70
77
|
}, _PaAppRemoveCommand_initOptions = function _PaAppRemoveCommand_initOptions() {
|
|
@@ -72,12 +79,22 @@ _PaAppRemoveCommand_instances = new WeakSet(), _PaAppRemoveCommand_initTelemetry
|
|
|
72
79
|
option: '-n, --name <name>'
|
|
73
80
|
}, {
|
|
74
81
|
option: '-f, --force'
|
|
82
|
+
}, {
|
|
83
|
+
option: '--asAdmin'
|
|
84
|
+
}, {
|
|
85
|
+
option: '-e, --environmentName [environmentName]'
|
|
75
86
|
});
|
|
76
87
|
}, _PaAppRemoveCommand_initValidators = function _PaAppRemoveCommand_initValidators() {
|
|
77
88
|
this.validators.push(async (args) => {
|
|
78
89
|
if (!validation.isValidGuid(args.options.name)) {
|
|
79
90
|
return `${args.options.name} is not a valid GUID`;
|
|
80
91
|
}
|
|
92
|
+
if (args.options.asAdmin && !args.options.environmentName) {
|
|
93
|
+
return 'When specifying the asAdmin option, the environment option is required as well.';
|
|
94
|
+
}
|
|
95
|
+
if (args.options.environmentName && !args.options.asAdmin) {
|
|
96
|
+
return 'When specifying the environment option, the asAdmin option is required as well.';
|
|
97
|
+
}
|
|
81
98
|
return true;
|
|
82
99
|
});
|
|
83
100
|
};
|
|
@@ -8,7 +8,7 @@ import { cli } from '../../../../cli/cli.js';
|
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
|
-
import aadUserGetCommand from '../../../
|
|
11
|
+
import aadUserGetCommand from '../../../entra/commands/user/user-get.js';
|
|
12
12
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
14
14
|
import SpoGroupMemberListCommand from './group-member-list.js';
|
|
@@ -7,7 +7,7 @@ var _SpoGroupSetCommand_instances, _SpoGroupSetCommand_initTelemetry, _SpoGroupS
|
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
|
-
import aadUserGetCommand from '../../../
|
|
10
|
+
import aadUserGetCommand from '../../../entra/commands/user/user-get.js';
|
|
11
11
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
13
13
|
class SpoGroupSetCommand extends SpoCommand {
|
|
@@ -35,9 +35,9 @@ class SpoListItemBatchAddCommand extends SpoCommand {
|
|
|
35
35
|
async commandAction(logger, args) {
|
|
36
36
|
try {
|
|
37
37
|
if (this.verbose) {
|
|
38
|
-
await logger.logToStderr(`Starting to create batch items from csv at path ${args.options.filePath}`);
|
|
38
|
+
await logger.logToStderr(`Starting to create batch items from csv ${args.options.filePath ? `at path ${args.options.filePath}` : 'from content'}`);
|
|
39
39
|
}
|
|
40
|
-
const csvContent = fs.readFileSync(args.options.filePath, 'utf8');
|
|
40
|
+
const csvContent = args.options.filePath ? fs.readFileSync(args.options.filePath, 'utf8') : args.options.csvContent;
|
|
41
41
|
const jsonContent = formatting.parseCsvToJson(csvContent);
|
|
42
42
|
await this.addItemsAsBatch(jsonContent, args.options, logger);
|
|
43
43
|
}
|
|
@@ -97,7 +97,7 @@ class SpoListItemBatchAddCommand extends SpoCommand {
|
|
|
97
97
|
batchBody.push(`Accept: application/json;odata=nometadata\n`);
|
|
98
98
|
batchBody.push(`Content-Type: application/json;odata=verbose\n`);
|
|
99
99
|
batchBody.push(`If-Match: *\n\n`);
|
|
100
|
-
batchBody.push(`{\n"formValues": ${JSON.stringify(item)}\n}`);
|
|
100
|
+
batchBody.push(`{\n"formValues": ${JSON.stringify(this.formatFormValues(item))}\n}`);
|
|
101
101
|
});
|
|
102
102
|
// close batch body
|
|
103
103
|
batchBody.push(`\n\n`);
|
|
@@ -105,6 +105,13 @@ class SpoListItemBatchAddCommand extends SpoCommand {
|
|
|
105
105
|
batchBody.push(`--batch_${batchId}--\n`);
|
|
106
106
|
return batchBody;
|
|
107
107
|
}
|
|
108
|
+
formatFormValues(input) {
|
|
109
|
+
// Fix for PS 7
|
|
110
|
+
return input.map(obj => ({
|
|
111
|
+
FieldName: obj.FieldName.replace(/\\"/g, ''),
|
|
112
|
+
FieldValue: obj.FieldValue.replace(/\\"/g, '')
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
108
115
|
parseBatchResponseBody(response) {
|
|
109
116
|
const batchResults = [];
|
|
110
117
|
response.split('\r\n')
|
|
@@ -151,6 +158,8 @@ class SpoListItemBatchAddCommand extends SpoCommand {
|
|
|
151
158
|
_SpoListItemBatchAddCommand_instances = new WeakSet(), _SpoListItemBatchAddCommand_initTelemetry = function _SpoListItemBatchAddCommand_initTelemetry() {
|
|
152
159
|
this.telemetry.push((args) => {
|
|
153
160
|
Object.assign(this.telemetryProperties, {
|
|
161
|
+
filePath: typeof args.options.filePath !== 'undefined',
|
|
162
|
+
csvContent: typeof args.options.csvContent !== 'undefined',
|
|
154
163
|
listId: typeof args.options.listId !== 'undefined',
|
|
155
164
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
156
165
|
listUrl: typeof args.options.listUrl !== 'undefined'
|
|
@@ -158,9 +167,11 @@ _SpoListItemBatchAddCommand_instances = new WeakSet(), _SpoListItemBatchAddComma
|
|
|
158
167
|
});
|
|
159
168
|
}, _SpoListItemBatchAddCommand_initOptions = function _SpoListItemBatchAddCommand_initOptions() {
|
|
160
169
|
this.options.unshift({
|
|
161
|
-
option: '-p, --filePath <filePath>'
|
|
162
|
-
}, {
|
|
163
170
|
option: '-u, --webUrl <webUrl>'
|
|
171
|
+
}, {
|
|
172
|
+
option: '-p, --filePath [filePath]'
|
|
173
|
+
}, {
|
|
174
|
+
option: '-c, --csvContent [csvContent]'
|
|
164
175
|
}, {
|
|
165
176
|
option: '-l, --listId [listId]'
|
|
166
177
|
}, {
|
|
@@ -178,7 +189,7 @@ _SpoListItemBatchAddCommand_instances = new WeakSet(), _SpoListItemBatchAddComma
|
|
|
178
189
|
!validation.isValidGuid(args.options.listId)) {
|
|
179
190
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
180
191
|
}
|
|
181
|
-
if (!fs.existsSync(args.options.filePath)) {
|
|
192
|
+
if (args.options.filePath && !fs.existsSync(args.options.filePath)) {
|
|
182
193
|
return `File with path ${args.options.filePath} does not exist`;
|
|
183
194
|
}
|
|
184
195
|
return true;
|
|
@@ -186,7 +197,7 @@ _SpoListItemBatchAddCommand_instances = new WeakSet(), _SpoListItemBatchAddComma
|
|
|
186
197
|
}, _SpoListItemBatchAddCommand_initTypes = function _SpoListItemBatchAddCommand_initTypes() {
|
|
187
198
|
this.types.string.push('webUrl', 'filePath', 'listId', 'listTitle', 'listUrl');
|
|
188
199
|
}, _SpoListItemBatchAddCommand_initOptionSets = function _SpoListItemBatchAddCommand_initOptionSets() {
|
|
189
|
-
this.optionSets.push({ options: ['listId', 'listTitle', 'listUrl'] });
|
|
200
|
+
this.optionSets.push({ options: ['listId', 'listTitle', 'listUrl'] }, { options: ['filePath', 'csvContent'] });
|
|
190
201
|
};
|
|
191
202
|
export default new SpoListItemBatchAddCommand();
|
|
192
203
|
//# sourceMappingURL=listitem-batch-add.js.map
|