@pnp/cli-microsoft365 11.0.0-beta.1f852eb → 11.0.0-beta.3143306
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devproxy/api-specs/sharepoint.yaml +54 -0
- package/.eslintrc.cjs +2 -0
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Command.js +4 -0
- package/dist/config.js +1 -0
- package/dist/m365/adaptivecard/commands/adaptivecard-send.js +1 -1
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-add.js +13 -27
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +18 -43
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-list.js +10 -21
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +25 -49
- package/dist/m365/entra/commands/app/app-add.js +14 -2
- package/dist/m365/entra/commands/group/group-member-add.js +6 -27
- package/dist/m365/entra/commands/group/group-member-set.js +5 -26
- package/dist/m365/entra/commands/m365group/m365group-get.js +1 -7
- package/dist/m365/entra/commands/m365group/m365group-list.js +1 -7
- package/dist/m365/entra/commands/pim/pim-role-assignment-eligibility-list.js +1 -7
- package/dist/m365/entra/commands/pim/pim-role-assignment-list.js +1 -7
- package/dist/m365/entra/commands/pim/pim-role-request-list.js +1 -7
- package/dist/m365/entra/commands/roleassignment/roleassignment-add.js +146 -0
- package/dist/m365/entra/commands.js +1 -0
- package/dist/m365/flow/commands/environment/environment-get.js +19 -29
- package/dist/m365/flow/commands/flow-list.js +7 -14
- package/dist/m365/flow/commands/run/run-get.js +1 -7
- package/dist/m365/graph/commands/openextension/openextension-add.js +2 -2
- package/dist/m365/graph/commands/openextension/openextension-set.js +2 -6
- package/dist/m365/graph/commands/subscription/subscription-add.js +3 -10
- package/dist/m365/outlook/commands/mail/mail-searchfolder-add.js +85 -0
- package/dist/m365/outlook/commands.js +1 -0
- package/dist/m365/pa/commands/environment/environment-get.js +18 -23
- package/dist/m365/pp/commands/copilot/copilot-get.js +0 -4
- package/dist/m365/pp/commands/copilot/copilot-list.js +0 -4
- package/dist/m365/pp/commands/copilot/copilot-remove.js +0 -4
- package/dist/m365/pp/commands/environment/environment-get.js +19 -26
- package/dist/m365/pp/commands/solution/solution-publisher-list.js +1 -8
- package/dist/m365/pp/commands.js +0 -7
- package/dist/m365/purview/commands/threatassessment/threatassessment-get.js +1 -7
- package/dist/m365/spe/commands/container/container-add.js +1 -3
- package/dist/m365/spe/commands/container/container-list.js +1 -3
- package/dist/m365/spe/commands/container/container-recyclebinitem-list.js +1 -3
- package/dist/m365/spe/commands/container/container-recyclebinitem-restore.js +1 -3
- package/dist/m365/spe/commands/container/container-remove.js +1 -3
- package/dist/m365/spe/commands/containertype/containertype-add.js +67 -90
- package/dist/m365/spe/commands/containertype/containertype-get.js +53 -81
- package/dist/m365/spe/commands/containertype/containertype-list.js +8 -19
- package/dist/m365/spe/commands/containertype/containertype-remove.js +27 -5
- package/dist/m365/spfx/commands/project/project-upgrade.js +23 -66
- package/dist/m365/spo/commands/customaction/customaction-list.js +3 -10
- package/dist/m365/spo/commands/file/file-move.js +2 -8
- package/dist/m365/spo/commands/file/file-version-keep.js +78 -0
- package/dist/m365/spo/commands/homesite/homesite-add.js +26 -2
- package/dist/m365/spo/commands/homesite/homesite-get.js +28 -14
- package/dist/m365/spo/commands/homesite/homesite-list.js +1 -12
- package/dist/m365/spo/commands/homesite/homesite-remove.js +6 -34
- package/dist/m365/spo/commands/homesite/homesite-set.js +88 -44
- package/dist/m365/spo/commands/hubsite/hubsite-get.js +4 -13
- package/dist/m365/spo/commands/hubsite/hubsite-list.js +1 -8
- package/dist/m365/spo/commands/list/list-view-add.js +1 -1
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-list.js +17 -25
- package/dist/m365/spo/commands/{tenant/tenant-site-archive.js → site/site-archive.js} +14 -14
- package/dist/m365/spo/commands/{tenant/tenant-site-list.js → site/site-list.js} +16 -27
- package/dist/m365/spo/commands/{tenant/tenant-site-membership-list.js → site/site-membership-list.js} +15 -15
- package/dist/m365/spo/commands/{tenant/tenant-site-rename.js → site/site-rename.js} +14 -14
- package/dist/m365/spo/commands/{tenant/tenant-site-unarchive.js → site/site-unarchive.js} +14 -14
- package/dist/m365/spo/commands/term/term-list.js +1 -7
- package/dist/m365/spo/commands.js +5 -7
- package/dist/m365/teams/commands/chat/chat-member-add.js +3 -9
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +5 -12
- package/dist/m365/teams/commands/report/report-pstncalls.js +5 -12
- package/dist/m365/viva/commands/engage/engage-network-list.js +1 -7
- package/dist/m365/viva/commands.js +0 -3
- package/dist/utils/entraAdministrativeUnit.js +1 -1
- package/dist/utils/entraApp.js +15 -0
- package/dist/utils/spe.js +5 -39
- package/docs/docs/cmd/entra/app/app-add.mdx +7 -1
- package/docs/docs/cmd/entra/group/group-member-add.mdx +7 -26
- package/docs/docs/cmd/entra/group/group-member-set.mdx +5 -23
- package/docs/docs/cmd/entra/m365group/m365group-get.mdx +0 -3
- package/docs/docs/cmd/entra/m365group/m365group-list.mdx +0 -3
- package/docs/docs/cmd/entra/pim/pim-role-assignment-eligibility-list.mdx +0 -3
- package/docs/docs/cmd/entra/pim/pim-role-assignment-list.mdx +0 -3
- package/docs/docs/cmd/entra/pim/pim-role-request-list.mdx +0 -3
- package/docs/docs/cmd/entra/roleassignment/roleassignment-add.mdx +163 -0
- package/docs/docs/cmd/flow/environment/environment-get.mdx +6 -5
- package/docs/docs/cmd/flow/flow-list.mdx +0 -3
- package/docs/docs/cmd/flow/run/run-get.mdx +0 -3
- package/docs/docs/cmd/graph/subscription/subscription-add.mdx +0 -3
- package/docs/docs/cmd/outlook/mail/mail-searchfolder-add.mdx +147 -0
- package/docs/docs/cmd/pa/environment/environment-get.mdx +5 -2
- package/docs/docs/cmd/pp/copilot/copilot-get.mdx +0 -6
- package/docs/docs/cmd/pp/copilot/copilot-list.mdx +0 -6
- package/docs/docs/cmd/pp/copilot/copilot-remove.mdx +0 -6
- package/docs/docs/cmd/pp/environment/environment-get.mdx +5 -2
- package/docs/docs/cmd/pp/solution/solution-publisher-list.mdx +0 -3
- package/docs/docs/cmd/purview/threatassessment/threatassessment-get.mdx +0 -3
- package/docs/docs/cmd/spe/container/container-activate.mdx +21 -0
- package/docs/docs/cmd/spe/container/container-add.mdx +29 -0
- package/docs/docs/cmd/spe/container/container-get.mdx +20 -1
- package/docs/docs/cmd/spe/container/container-list.mdx +29 -0
- package/docs/docs/cmd/spe/container/container-permission-list.mdx +19 -0
- package/docs/docs/cmd/spe/container/container-recyclebinitem-list.mdx +29 -0
- package/docs/docs/cmd/spe/container/container-recyclebinitem-restore.mdx +31 -0
- package/docs/docs/cmd/spe/container/container-remove.mdx +31 -0
- package/docs/docs/cmd/spe/containertype/containertype-add.mdx +111 -55
- package/docs/docs/cmd/spe/containertype/containertype-get.mdx +69 -38
- package/docs/docs/cmd/spe/containertype/containertype-list.mdx +59 -31
- package/docs/docs/cmd/spe/containertype/containertype-remove.mdx +31 -4
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +18 -5
- package/docs/docs/cmd/spo/file/file-move.mdx +0 -3
- package/docs/docs/cmd/spo/file/file-version-keep.mdx +68 -0
- package/docs/docs/cmd/spo/homesite/homesite-add.mdx +13 -4
- package/docs/docs/cmd/spo/homesite/homesite-get.mdx +44 -23
- package/docs/docs/cmd/spo/homesite/homesite-list.mdx +0 -6
- package/docs/docs/cmd/spo/homesite/homesite-remove.mdx +10 -35
- package/docs/docs/cmd/spo/homesite/homesite-set.mdx +84 -44
- package/docs/docs/cmd/spo/hubsite/hubsite-get.mdx +0 -3
- package/docs/docs/cmd/spo/hubsite/hubsite-list.mdx +0 -3
- package/docs/docs/cmd/spo/list/list-view-add.mdx +11 -11
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-list.mdx +18 -18
- package/docs/docs/cmd/spo/{tenant/tenant-site-archive.mdx → site/site-archive.mdx} +4 -4
- package/docs/docs/cmd/spo/{tenant/tenant-site-list.mdx → site/site-list.mdx} +7 -16
- package/docs/docs/cmd/spo/{tenant/tenant-site-membership-list.mdx → site/site-membership-list.mdx} +5 -5
- package/docs/docs/cmd/spo/{tenant/tenant-site-rename.mdx → site/site-rename.mdx} +7 -7
- package/docs/docs/cmd/spo/{tenant/tenant-site-unarchive.mdx → site/site-unarchive.mdx} +4 -4
- package/docs/docs/cmd/spo/term/term-list.mdx +0 -3
- package/docs/docs/cmd/teams/chat/chat-member-add.mdx +2 -5
- package/docs/docs/cmd/teams/report/report-directroutingcalls.mdx +25 -44
- package/docs/docs/cmd/teams/report/report-pstncalls.mdx +25 -48
- package/docs/docs/cmd/viva/engage/engage-community-list.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-community-user-add.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-community-user-remove.mdx +19 -0
- package/docs/docs/cmd/viva/engage/engage-network-list.mdx +0 -3
- package/npm-shrinkwrap.json +51 -51
- package/package.json +12 -12
- package/dist/m365/pp/commands/card/card-clone.js +0 -101
- package/dist/m365/pp/commands/card/card-get.js +0 -89
- package/dist/m365/pp/commands/card/card-list.js +0 -55
- package/dist/m365/pp/commands/card/card-remove.js +0 -105
- package/dist/m365/skype/commands/report/report-activitycounts.js +0 -15
- package/dist/m365/skype/commands/report/report-activityusercounts.js +0 -15
- package/dist/m365/skype/commands/report/report-activityuserdetail.js +0 -15
- package/dist/m365/skype/commands.js +0 -7
- package/dist/m365/spo/commands/mail/mail-send.js +0 -108
- package/dist/m365/spo/commands/tenant/SPOTenantSitePropertiesEnumerable.js +0 -2
- package/dist/m365/spo/commands/tenant/TenantSiteProperties.js +0 -2
- package/dist/m365/viva/commands/engage/engage-group-list.js +0 -93
- package/dist/m365/viva/commands/engage/engage-group-user-add.js +0 -73
- package/dist/m365/viva/commands/engage/engage-group-user-remove.js +0 -88
- package/docs/docs/cmd/pp/card/card-clone.mdx +0 -103
- package/docs/docs/cmd/pp/card/card-get.mdx +0 -212
- package/docs/docs/cmd/pp/card/card-list.mdx +0 -163
- package/docs/docs/cmd/pp/card/card-remove.mdx +0 -86
- package/docs/docs/cmd/skype/report/report-activitycounts.mdx +0 -96
- package/docs/docs/cmd/skype/report/report-activityusercounts.mdx +0 -96
- package/docs/docs/cmd/skype/report/report-activityuserdetail.mdx +0 -134
- package/docs/docs/cmd/spo/mail/mail-send.mdx +0 -69
- package/docs/docs/cmd/viva/engage/engage-group-list.mdx +0 -174
- package/docs/docs/cmd/viva/engage/engage-group-user-add.mdx +0 -60
- package/docs/docs/cmd/viva/engage/engage-group-user-remove.mdx +0 -58
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _PaEnvironmentGetCommand_instances, _PaEnvironmentGetCommand_initTelemetry, _PaEnvironmentGetCommand_initOptions;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { formatting } from '../../../../utils/formatting.js';
|
|
5
|
+
import { zod } from '../../../../utils/zod.js';
|
|
9
6
|
import PowerAppsCommand from '../../../base/PowerAppsCommand.js';
|
|
10
7
|
import commands from '../../commands.js';
|
|
8
|
+
const options = globalOptionsZod
|
|
9
|
+
.extend({
|
|
10
|
+
name: zod.alias('n', z.string().optional()),
|
|
11
|
+
default: z.boolean().optional()
|
|
12
|
+
})
|
|
13
|
+
.strict();
|
|
11
14
|
class PaEnvironmentGetCommand extends PowerAppsCommand {
|
|
12
15
|
get name() {
|
|
13
16
|
return commands.ENVIRONMENT_GET;
|
|
@@ -15,17 +18,20 @@ class PaEnvironmentGetCommand extends PowerAppsCommand {
|
|
|
15
18
|
get description() {
|
|
16
19
|
return 'Gets information about the specified Microsoft Power Apps environment';
|
|
17
20
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
get schema() {
|
|
22
|
+
return options;
|
|
23
|
+
}
|
|
24
|
+
getRefinedSchema(schema) {
|
|
25
|
+
return schema
|
|
26
|
+
.refine(options => !!options.name !== !!options.default, {
|
|
27
|
+
message: `Specify either name or default, but not both.`
|
|
28
|
+
});
|
|
23
29
|
}
|
|
24
30
|
async commandAction(logger, args) {
|
|
25
31
|
if (this.verbose) {
|
|
26
32
|
await logger.logToStderr(`Retrieving information about Microsoft Power Apps environment ${args.options.name || 'default'}...`);
|
|
27
33
|
}
|
|
28
|
-
const environmentName = args.options.
|
|
34
|
+
const environmentName = args.options.default ? '~default' : formatting.encodeQueryParameter(args.options.name);
|
|
29
35
|
const requestOptions = {
|
|
30
36
|
url: `${this.resource}/providers/Microsoft.PowerApps/environments/${environmentName}?api-version=2016-11-01`,
|
|
31
37
|
headers: {
|
|
@@ -47,16 +53,5 @@ class PaEnvironmentGetCommand extends PowerAppsCommand {
|
|
|
47
53
|
}
|
|
48
54
|
}
|
|
49
55
|
}
|
|
50
|
-
_PaEnvironmentGetCommand_instances = new WeakSet(), _PaEnvironmentGetCommand_initTelemetry = function _PaEnvironmentGetCommand_initTelemetry() {
|
|
51
|
-
this.telemetry.push((args) => {
|
|
52
|
-
Object.assign(this.telemetryProperties, {
|
|
53
|
-
name: typeof args.options.name !== 'undefined'
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
}, _PaEnvironmentGetCommand_initOptions = function _PaEnvironmentGetCommand_initOptions() {
|
|
57
|
-
this.options.unshift({
|
|
58
|
-
option: '-n, --name [name]'
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
56
|
export default new PaEnvironmentGetCommand();
|
|
62
57
|
//# sourceMappingURL=environment-get.js.map
|
|
@@ -18,9 +18,6 @@ class PpCopilotGetCommand extends PowerPlatformCommand {
|
|
|
18
18
|
get description() {
|
|
19
19
|
return 'Get information about the specified copilot';
|
|
20
20
|
}
|
|
21
|
-
alias() {
|
|
22
|
-
return [commands.CHATBOT_GET];
|
|
23
|
-
}
|
|
24
21
|
constructor() {
|
|
25
22
|
super();
|
|
26
23
|
_PpCopilotGetCommand_instances.add(this);
|
|
@@ -30,7 +27,6 @@ class PpCopilotGetCommand extends PowerPlatformCommand {
|
|
|
30
27
|
__classPrivateFieldGet(this, _PpCopilotGetCommand_instances, "m", _PpCopilotGetCommand_initOptionSets).call(this);
|
|
31
28
|
}
|
|
32
29
|
async commandAction(logger, args) {
|
|
33
|
-
await this.showDeprecationWarning(logger, commands.CHATBOT_GET, commands.COPILOT_GET);
|
|
34
30
|
if (this.verbose) {
|
|
35
31
|
await logger.logToStderr(`Retrieving copilot '${args.options.id || args.options.name}'...`);
|
|
36
32
|
}
|
|
@@ -15,9 +15,6 @@ class PpCopilotListCommand extends PowerPlatformCommand {
|
|
|
15
15
|
get description() {
|
|
16
16
|
return 'Lists Microsoft Power Platform copilots in the specified Power Platform environment';
|
|
17
17
|
}
|
|
18
|
-
alias() {
|
|
19
|
-
return [commands.CHATBOT_LIST];
|
|
20
|
-
}
|
|
21
18
|
defaultProperties() {
|
|
22
19
|
return ['name', 'botid', 'publishedOn', 'createdOn', 'botModifiedOn'];
|
|
23
20
|
}
|
|
@@ -28,7 +25,6 @@ class PpCopilotListCommand extends PowerPlatformCommand {
|
|
|
28
25
|
__classPrivateFieldGet(this, _PpCopilotListCommand_instances, "m", _PpCopilotListCommand_initOptions).call(this);
|
|
29
26
|
}
|
|
30
27
|
async commandAction(logger, args) {
|
|
31
|
-
await this.showDeprecationWarning(logger, commands.CHATBOT_LIST, commands.COPILOT_LIST);
|
|
32
28
|
if (this.verbose) {
|
|
33
29
|
await logger.logToStderr(`Retrieving list of copilots for environment '${args.options.environmentName}'.`);
|
|
34
30
|
}
|
|
@@ -18,9 +18,6 @@ class PpCopilotRemoveCommand extends PowerPlatformCommand {
|
|
|
18
18
|
get description() {
|
|
19
19
|
return 'Removes the specified copilot';
|
|
20
20
|
}
|
|
21
|
-
alias() {
|
|
22
|
-
return [commands.CHATBOT_REMOVE];
|
|
23
|
-
}
|
|
24
21
|
constructor() {
|
|
25
22
|
super();
|
|
26
23
|
_PpCopilotRemoveCommand_instances.add(this);
|
|
@@ -30,7 +27,6 @@ class PpCopilotRemoveCommand extends PowerPlatformCommand {
|
|
|
30
27
|
__classPrivateFieldGet(this, _PpCopilotRemoveCommand_instances, "m", _PpCopilotRemoveCommand_initOptionSets).call(this);
|
|
31
28
|
}
|
|
32
29
|
async commandAction(logger, args) {
|
|
33
|
-
await this.showDeprecationWarning(logger, commands.CHATBOT_REMOVE, commands.COPILOT_REMOVE);
|
|
34
30
|
if (this.verbose) {
|
|
35
31
|
await logger.logToStderr(`Removing copilot '${args.options.id || args.options.name}'...`);
|
|
36
32
|
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _PpEnvironmentGetCommand_instances, _PpEnvironmentGetCommand_initTelemetry, _PpEnvironmentGetCommand_initOptions;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { formatting } from '../../../../utils/formatting.js';
|
|
5
|
+
import { zod } from '../../../../utils/zod.js';
|
|
9
6
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
10
7
|
import commands from '../../commands.js';
|
|
8
|
+
const options = globalOptionsZod
|
|
9
|
+
.extend({
|
|
10
|
+
name: zod.alias('n', z.string().optional()),
|
|
11
|
+
default: z.boolean().optional(),
|
|
12
|
+
asAdmin: z.boolean().optional()
|
|
13
|
+
})
|
|
14
|
+
.strict();
|
|
11
15
|
class PpEnvironmentGetCommand extends PowerPlatformCommand {
|
|
12
16
|
get name() {
|
|
13
17
|
return commands.ENVIRONMENT_GET;
|
|
@@ -15,11 +19,14 @@ class PpEnvironmentGetCommand extends PowerPlatformCommand {
|
|
|
15
19
|
get description() {
|
|
16
20
|
return 'Gets information about the specified Power Platform environment';
|
|
17
21
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
get schema() {
|
|
23
|
+
return options;
|
|
24
|
+
}
|
|
25
|
+
getRefinedSchema(schema) {
|
|
26
|
+
return schema
|
|
27
|
+
.refine(options => !!options.name !== !!options.default, {
|
|
28
|
+
message: `Specify either name or default, but not both.`
|
|
29
|
+
});
|
|
23
30
|
}
|
|
24
31
|
async commandAction(logger, args) {
|
|
25
32
|
if (this.verbose) {
|
|
@@ -29,7 +36,7 @@ class PpEnvironmentGetCommand extends PowerPlatformCommand {
|
|
|
29
36
|
if (args.options.asAdmin) {
|
|
30
37
|
url += '/scopes/admin';
|
|
31
38
|
}
|
|
32
|
-
const envName = args.options.
|
|
39
|
+
const envName = args.options.default ? '~Default' : formatting.encodeQueryParameter(args.options.name);
|
|
33
40
|
url += `/environments/${envName}?api-version=2020-10-01`;
|
|
34
41
|
const requestOptions = {
|
|
35
42
|
url: url,
|
|
@@ -42,19 +49,5 @@ class PpEnvironmentGetCommand extends PowerPlatformCommand {
|
|
|
42
49
|
await logger.log(response);
|
|
43
50
|
}
|
|
44
51
|
}
|
|
45
|
-
_PpEnvironmentGetCommand_instances = new WeakSet(), _PpEnvironmentGetCommand_initTelemetry = function _PpEnvironmentGetCommand_initTelemetry() {
|
|
46
|
-
this.telemetry.push((args) => {
|
|
47
|
-
Object.assign(this.telemetryProperties, {
|
|
48
|
-
name: typeof args.options.name !== 'undefined',
|
|
49
|
-
asAdmin: !!args.options.asAdmin
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
}, _PpEnvironmentGetCommand_initOptions = function _PpEnvironmentGetCommand_initOptions() {
|
|
53
|
-
this.options.unshift({
|
|
54
|
-
option: '-n, --name [name]'
|
|
55
|
-
}, {
|
|
56
|
-
option: '--asAdmin'
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
52
|
export default new PpEnvironmentGetCommand();
|
|
60
53
|
//# sourceMappingURL=environment-get.js.map
|
|
@@ -25,17 +25,13 @@ class PpSolutionPublisherListCommand extends PowerPlatformCommand {
|
|
|
25
25
|
__classPrivateFieldGet(this, _PpSolutionPublisherListCommand_instances, "m", _PpSolutionPublisherListCommand_initOptions).call(this);
|
|
26
26
|
}
|
|
27
27
|
async commandAction(logger, args) {
|
|
28
|
-
if (args.options.includeMicrosoftPublishers) {
|
|
29
|
-
await this.warn(logger, `Parameter 'includeMicrosoftPublishers' is deprecated. Please use 'withMicrosoftPublishers' instead`);
|
|
30
|
-
}
|
|
31
28
|
if (this.verbose) {
|
|
32
29
|
await logger.logToStderr(`Retrieving list of publishers...`);
|
|
33
30
|
}
|
|
34
31
|
try {
|
|
35
32
|
const dynamicsApiUrl = await powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
36
|
-
const shouldIncludeMicrosoftPublishers = args.options.withMicrosoftPublishers || args.options.includeMicrosoftPublishers;
|
|
37
33
|
const requestOptions = {
|
|
38
|
-
url: `${dynamicsApiUrl}/api/data/v9.0/publishers?$select=publisherid,uniquename,friendlyname,versionnumber,isreadonly,description,customizationprefix,customizationoptionvalueprefix${!
|
|
34
|
+
url: `${dynamicsApiUrl}/api/data/v9.0/publishers?$select=publisherid,uniquename,friendlyname,versionnumber,isreadonly,description,customizationprefix,customizationoptionvalueprefix${!args.options.withMicrosoftPublishers ? `&$filter=publisherid ne 'd21aab70-79e7-11dd-8874-00188b01e34f'` : ''}&api-version=9.1`,
|
|
39
35
|
headers: {
|
|
40
36
|
accept: 'application/json;odata.metadata=none'
|
|
41
37
|
},
|
|
@@ -52,7 +48,6 @@ class PpSolutionPublisherListCommand extends PowerPlatformCommand {
|
|
|
52
48
|
_PpSolutionPublisherListCommand_instances = new WeakSet(), _PpSolutionPublisherListCommand_initTelemetry = function _PpSolutionPublisherListCommand_initTelemetry() {
|
|
53
49
|
this.telemetry.push((args) => {
|
|
54
50
|
Object.assign(this.telemetryProperties, {
|
|
55
|
-
includeMicrosoftPublishers: typeof args.options.includeMicrosoftPublishers !== 'undefined',
|
|
56
51
|
withMicrosoftPublishers: typeof args.options.withMicrosoftPublishers !== 'undefined',
|
|
57
52
|
asAdmin: !!args.options.asAdmin
|
|
58
53
|
});
|
|
@@ -60,8 +55,6 @@ _PpSolutionPublisherListCommand_instances = new WeakSet(), _PpSolutionPublisherL
|
|
|
60
55
|
}, _PpSolutionPublisherListCommand_initOptions = function _PpSolutionPublisherListCommand_initOptions() {
|
|
61
56
|
this.options.unshift({
|
|
62
57
|
option: '-e, --environmentName <environmentName>'
|
|
63
|
-
}, {
|
|
64
|
-
option: '--includeMicrosoftPublishers'
|
|
65
58
|
}, {
|
|
66
59
|
option: '--withMicrosoftPublishers'
|
|
67
60
|
}, {
|
package/dist/m365/pp/commands.js
CHANGED
|
@@ -3,13 +3,6 @@ export default {
|
|
|
3
3
|
AIBUILDERMODEL_GET: `${prefix} aibuildermodel get`,
|
|
4
4
|
AIBUILDERMODEL_LIST: `${prefix} aibuildermodel list`,
|
|
5
5
|
AIBUILDERMODEL_REMOVE: `${prefix} aibuildermodel remove`,
|
|
6
|
-
CARD_CLONE: `${prefix} card clone`,
|
|
7
|
-
CARD_GET: `${prefix} card get`,
|
|
8
|
-
CARD_LIST: `${prefix} card list`,
|
|
9
|
-
CARD_REMOVE: `${prefix} card remove`,
|
|
10
|
-
CHATBOT_GET: `${prefix} chatbot get`,
|
|
11
|
-
CHATBOT_LIST: `${prefix} chatbot list`,
|
|
12
|
-
CHATBOT_REMOVE: `${prefix} chatbot remove`,
|
|
13
6
|
COPILOT_GET: `${prefix} copilot get`,
|
|
14
7
|
COPILOT_LIST: `${prefix} copilot list`,
|
|
15
8
|
COPILOT_REMOVE: `${prefix} copilot remove`,
|
|
@@ -24,15 +24,11 @@ class PurviewThreatAssessmentGetCommand extends GraphCommand {
|
|
|
24
24
|
}
|
|
25
25
|
async commandAction(logger, args) {
|
|
26
26
|
try {
|
|
27
|
-
if (args.options.includeResults) {
|
|
28
|
-
await this.warn(logger, `Parameter 'includeResults' is deprecated. Please use 'withResults' instead`);
|
|
29
|
-
}
|
|
30
27
|
if (this.verbose) {
|
|
31
28
|
await logger.logToStderr(`Retrieving threat assessment with id ${args.options.id}`);
|
|
32
29
|
}
|
|
33
|
-
const shouldIncludeResults = args.options.includeResults || args.options.withResults;
|
|
34
30
|
const requestOptions = {
|
|
35
|
-
url: `${this.resource}/v1.0/informationProtection/threatAssessmentRequests/${args.options.id}${
|
|
31
|
+
url: `${this.resource}/v1.0/informationProtection/threatAssessmentRequests/${args.options.id}${args.options.withResults ? '?$expand=results' : ''}`,
|
|
36
32
|
headers: {
|
|
37
33
|
accept: 'application/json;odata.metadata=none'
|
|
38
34
|
},
|
|
@@ -56,8 +52,6 @@ _PurviewThreatAssessmentGetCommand_instances = new WeakSet(), _PurviewThreatAsse
|
|
|
56
52
|
}, _PurviewThreatAssessmentGetCommand_initOptions = function _PurviewThreatAssessmentGetCommand_initOptions() {
|
|
57
53
|
this.options.unshift({
|
|
58
54
|
option: '-i, --id <id>'
|
|
59
|
-
}, {
|
|
60
|
-
option: '--includeResults'
|
|
61
55
|
}, {
|
|
62
56
|
option: '--withResults'
|
|
63
57
|
});
|
|
@@ -4,7 +4,6 @@ import { zod } from '../../../../utils/zod.js';
|
|
|
4
4
|
import commands from '../../commands.js';
|
|
5
5
|
import { validation } from '../../../../utils/validation.js';
|
|
6
6
|
import { spe } from '../../../../utils/spe.js';
|
|
7
|
-
import { spo } from '../../../../utils/spo.js';
|
|
8
7
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
8
|
import request from '../../../../request.js';
|
|
10
9
|
const options = globalOptionsZod
|
|
@@ -77,8 +76,7 @@ class SpeContainerAddCommand extends GraphCommand {
|
|
|
77
76
|
if (this.verbose) {
|
|
78
77
|
await logger.logToStderr(`Getting container type with name '${options.containerTypeName}'...`);
|
|
79
78
|
}
|
|
80
|
-
|
|
81
|
-
return spe.getContainerTypeIdByName(adminUrl, options.containerTypeName);
|
|
79
|
+
return spe.getContainerTypeIdByName(options.containerTypeName);
|
|
82
80
|
}
|
|
83
81
|
}
|
|
84
82
|
export default new SpeContainerAddCommand();
|
|
@@ -10,7 +10,6 @@ import { validation } from '../../../../utils/validation.js';
|
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
12
12
|
import { spe } from '../../../../utils/spe.js';
|
|
13
|
-
import { spo } from '../../../../utils/spo.js';
|
|
14
13
|
class SpeContainerListCommand extends GraphCommand {
|
|
15
14
|
get name() {
|
|
16
15
|
return commands.CONTAINER_LIST;
|
|
@@ -47,8 +46,7 @@ class SpeContainerListCommand extends GraphCommand {
|
|
|
47
46
|
if (options.containerTypeId) {
|
|
48
47
|
return options.containerTypeId;
|
|
49
48
|
}
|
|
50
|
-
|
|
51
|
-
return spe.getContainerTypeIdByName(spoAdminUrl, options.containerTypeName);
|
|
49
|
+
return spe.getContainerTypeIdByName(options.containerTypeName);
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
_SpeContainerListCommand_instances = new WeakSet(), _SpeContainerListCommand_initTelemetry = function _SpeContainerListCommand_initTelemetry() {
|
|
@@ -2,7 +2,6 @@ import { globalOptionsZod } from '../../../../Command.js';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import commands from '../../commands.js';
|
|
4
4
|
import { validation } from '../../../../utils/validation.js';
|
|
5
|
-
import { spo } from '../../../../utils/spo.js';
|
|
6
5
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
7
6
|
import { spe } from '../../../../utils/spe.js';
|
|
8
7
|
import { odata } from '../../../../utils/odata.js';
|
|
@@ -54,8 +53,7 @@ class SpeContainerRecycleBinItemListCommand extends GraphCommand {
|
|
|
54
53
|
if (this.verbose) {
|
|
55
54
|
await logger.logToStderr(`Retrieving container type id for container type '${options.containerTypeName}'...`);
|
|
56
55
|
}
|
|
57
|
-
|
|
58
|
-
return spe.getContainerTypeIdByName(adminUrl, options.containerTypeName);
|
|
56
|
+
return spe.getContainerTypeIdByName(options.containerTypeName);
|
|
59
57
|
}
|
|
60
58
|
}
|
|
61
59
|
export default new SpeContainerRecycleBinItemListCommand();
|
|
@@ -2,7 +2,6 @@ import { globalOptionsZod } from '../../../../Command.js';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import commands from '../../commands.js';
|
|
4
4
|
import { validation } from '../../../../utils/validation.js';
|
|
5
|
-
import { spo } from '../../../../utils/spo.js';
|
|
6
5
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
7
6
|
import { spe } from '../../../../utils/spe.js';
|
|
8
7
|
import { odata } from '../../../../utils/odata.js';
|
|
@@ -88,8 +87,7 @@ class SpeContainerRecycleBinItemRestoreCommand extends GraphCommand {
|
|
|
88
87
|
if (this.verbose) {
|
|
89
88
|
await logger.logToStderr(`Getting container type with name '${options.containerTypeName}'...`);
|
|
90
89
|
}
|
|
91
|
-
|
|
92
|
-
return spe.getContainerTypeIdByName(adminUrl, options.containerTypeName);
|
|
90
|
+
return spe.getContainerTypeIdByName(options.containerTypeName);
|
|
93
91
|
}
|
|
94
92
|
}
|
|
95
93
|
export default new SpeContainerRecycleBinItemRestoreCommand();
|
|
@@ -4,7 +4,6 @@ import { zod } from '../../../../utils/zod.js';
|
|
|
4
4
|
import commands from '../../commands.js';
|
|
5
5
|
import { validation } from '../../../../utils/validation.js';
|
|
6
6
|
import { spe } from '../../../../utils/spe.js';
|
|
7
|
-
import { spo } from '../../../../utils/spo.js';
|
|
8
7
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
8
|
import request from '../../../../request.js';
|
|
10
9
|
import { cli } from '../../../../cli/cli.js';
|
|
@@ -91,8 +90,7 @@ class SpeContainerRemoveCommand extends GraphCommand {
|
|
|
91
90
|
if (this.verbose) {
|
|
92
91
|
await logger.logToStderr(`Getting container type with name '${options.containerTypeName}'...`);
|
|
93
92
|
}
|
|
94
|
-
|
|
95
|
-
return spe.getContainerTypeIdByName(adminUrl, options.containerTypeName);
|
|
93
|
+
return spe.getContainerTypeIdByName(options.containerTypeName);
|
|
96
94
|
}
|
|
97
95
|
}
|
|
98
96
|
export default new SpeContainerRemoveCommand();
|
|
@@ -1,115 +1,92 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpeContainerTypeAddCommand_instances, _SpeContainerTypeAddCommand_initTelemetry, _SpeContainerTypeAddCommand_initOptions, _SpeContainerTypeAddCommand_initValidators;
|
|
7
|
-
import config from '../../../../config.js';
|
|
1
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { zod } from '../../../../utils/zod.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
|
-
import { spo } from '../../../../utils/spo.js';
|
|
10
5
|
import { validation } from '../../../../utils/validation.js';
|
|
11
|
-
import
|
|
6
|
+
import GraphDelegatedCommand from '../../../base/GraphDelegatedCommand.js';
|
|
12
7
|
import commands from '../../commands.js';
|
|
13
|
-
|
|
8
|
+
import Auth from '../../../../Auth.js';
|
|
9
|
+
const consumingTenantOverridablesOptions = ['urlTemplate', 'isDiscoverabilityEnabled', 'isSearchEnabled', 'isItemVersioningEnabled', 'itemMajorVersionLimit', 'maxStoragePerContainerInBytes'];
|
|
10
|
+
const options = globalOptionsZod
|
|
11
|
+
.extend({
|
|
12
|
+
name: zod.alias('n', z.string()),
|
|
13
|
+
appId: z.string()
|
|
14
|
+
.refine(id => validation.isValidGuid(id), id => ({
|
|
15
|
+
message: `'${id}' is not a valid GUID.`
|
|
16
|
+
})).optional(),
|
|
17
|
+
billingType: z.enum(['standard', 'trial', 'directToCustomer']).default('standard'),
|
|
18
|
+
consumingTenantOverridables: z.string()
|
|
19
|
+
.refine(values => values.split(',').every(v => consumingTenantOverridablesOptions.includes(v.trim())), values => ({
|
|
20
|
+
message: `'${values}' is not a valid value. Valid options are: ${consumingTenantOverridablesOptions.join(', ')}.`
|
|
21
|
+
})).optional(),
|
|
22
|
+
isDiscoverabilityEnabled: z.boolean().optional(),
|
|
23
|
+
isItemVersioningEnabled: z.boolean().optional(),
|
|
24
|
+
isSearchEnabled: z.boolean().optional(),
|
|
25
|
+
isSharingRestricted: z.boolean().optional(),
|
|
26
|
+
itemMajorVersionLimit: z.number()
|
|
27
|
+
.refine(n => validation.isValidPositiveInteger(n), n => ({
|
|
28
|
+
message: `'${n}' is not a valid positive integer.`
|
|
29
|
+
})).optional(),
|
|
30
|
+
maxStoragePerContainerInBytes: z.number()
|
|
31
|
+
.refine(n => validation.isValidPositiveInteger(n), n => ({
|
|
32
|
+
message: `'${n}' is not a valid positive integer.`
|
|
33
|
+
})).optional(),
|
|
34
|
+
sharingCapability: z.enum(['disabled', 'externalUserSharingOnly', 'externalUserAndGuestSharing', 'existingExternalUserSharingOnly']).optional(),
|
|
35
|
+
urlTemplate: z.string().optional()
|
|
36
|
+
})
|
|
37
|
+
.strict();
|
|
38
|
+
class SpeContainerTypeAddCommand extends GraphDelegatedCommand {
|
|
14
39
|
get name() {
|
|
15
40
|
return commands.CONTAINERTYPE_ADD;
|
|
16
41
|
}
|
|
17
42
|
get description() {
|
|
18
|
-
return 'Creates a new
|
|
43
|
+
return 'Creates a new container type';
|
|
19
44
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
45
|
+
get schema() {
|
|
46
|
+
return options;
|
|
47
|
+
}
|
|
48
|
+
getRefinedSchema(schema) {
|
|
49
|
+
return schema
|
|
50
|
+
.refine(options => !options.itemMajorVersionLimit || options.isItemVersioningEnabled !== false, {
|
|
51
|
+
message: `Cannot set itemMajorVersionLimit when isItemVersioningEnabled is false.`
|
|
52
|
+
});
|
|
26
53
|
}
|
|
27
54
|
async commandAction(logger, args) {
|
|
28
55
|
try {
|
|
29
56
|
if (this.verbose) {
|
|
30
|
-
await logger.logToStderr(`Creating a new Container Type for your app with name ${args.options.name}
|
|
57
|
+
await logger.logToStderr(`Creating a new Container Type for your app with name '${args.options.name}'.`);
|
|
31
58
|
}
|
|
32
|
-
const
|
|
33
|
-
const requestBody = this.getRequestBody(args.options);
|
|
34
|
-
const formDigestInfo = await spo.ensureFormDigest(adminUrl, logger, undefined, this.debug);
|
|
59
|
+
const appId = args.options.appId ?? Auth.connection.appId;
|
|
35
60
|
const requestOptions = {
|
|
36
|
-
url: `${
|
|
61
|
+
url: `${this.resource}/beta/storage/fileStorage/containerTypes`,
|
|
37
62
|
headers: {
|
|
38
|
-
|
|
63
|
+
accept: 'application/json;odata.metadata=none'
|
|
39
64
|
},
|
|
40
|
-
|
|
65
|
+
responseType: 'json',
|
|
66
|
+
data: {
|
|
67
|
+
name: args.options.name,
|
|
68
|
+
owningAppId: appId,
|
|
69
|
+
billingClassification: args.options.billingType,
|
|
70
|
+
settings: {
|
|
71
|
+
consumingTenantOverridables: args.options.consumingTenantOverridables?.split(',').map(s => s.trim()).join(','),
|
|
72
|
+
isDiscoverabilityEnabled: args.options.isDiscoverabilityEnabled,
|
|
73
|
+
isItemVersioningEnabled: args.options.isItemVersioningEnabled,
|
|
74
|
+
isSearchEnabled: args.options.isSearchEnabled,
|
|
75
|
+
isSharingRestricted: args.options.isSharingRestricted,
|
|
76
|
+
itemMajorVersionLimit: args.options.itemMajorVersionLimit,
|
|
77
|
+
maxStoragePerContainerInBytes: args.options.maxStoragePerContainerInBytes,
|
|
78
|
+
sharingCapability: args.options.sharingCapability,
|
|
79
|
+
urlTemplate: args.options.urlTemplate
|
|
80
|
+
}
|
|
81
|
+
}
|
|
41
82
|
};
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
const response = json[0];
|
|
45
|
-
if (response.ErrorInfo) {
|
|
46
|
-
throw response.ErrorInfo.ErrorMessage;
|
|
47
|
-
}
|
|
48
|
-
const result = json.pop();
|
|
49
|
-
delete result._ObjectType_;
|
|
50
|
-
result.SPContainerTypeBillingClassification = args.options.trial ? 'Trial' : 'Standard';
|
|
51
|
-
result.AzureSubscriptionId = this.replaceString(result.AzureSubscriptionId);
|
|
52
|
-
result.OwningAppId = this.replaceString(result.OwningAppId);
|
|
53
|
-
result.OwningTenantId = this.replaceString(result.OwningTenantId);
|
|
54
|
-
result.ContainerTypeId = this.replaceString(result.ContainerTypeId);
|
|
55
|
-
await logger.log(result);
|
|
83
|
+
const response = await request.post(requestOptions);
|
|
84
|
+
await logger.log(response);
|
|
56
85
|
}
|
|
57
86
|
catch (err) {
|
|
58
87
|
this.handleRejectedODataJsonPromise(err);
|
|
59
88
|
}
|
|
60
89
|
}
|
|
61
|
-
replaceString(s) {
|
|
62
|
-
return s.replace('/Guid(', '').replace(')/', '');
|
|
63
|
-
}
|
|
64
|
-
getRequestBody(options) {
|
|
65
|
-
if (options.trial) {
|
|
66
|
-
return `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="4" ObjectPathId="3" /><Method Name="NewSPOContainerType" Id="5" ObjectPathId="3"><Parameters><Parameter TypeId="{5466648e-c306-441b-9df4-c09deef25cb1}"><Property Name="AzureSubscriptionId" Type="Guid">{00000000-0000-0000-0000-000000000000}</Property><Property Name="ContainerTypeId" Type="Guid">{00000000-0000-0000-0000-000000000000}</Property><Property Name="CreationDate" Type="Null" /><Property Name="DisplayName" Type="String">${options.name}</Property><Property Name="ExpiryDate" Type="Null" /><Property Name="IsBillingProfileRequired" Type="Boolean">false</Property><Property Name="OwningAppId" Type="Guid">{${options.applicationId}}</Property><Property Name="OwningTenantId" Type="Guid">{00000000-0000-0000-0000-000000000000}</Property><Property Name="Region" Type="Null" /><Property Name="ResourceGroup" Type="Null" /><Property Name="SPContainerTypeBillingClassification" Type="Enum">1</Property></Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="3" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`;
|
|
67
|
-
}
|
|
68
|
-
return `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><Method Name="NewSPOContainerType" Id="4" ObjectPathId="1"><Parameters><Parameter TypeId="{5466648e-c306-441b-9df4-c09deef25cb1}"><Property Name="AzureSubscriptionId" Type="Guid">{${options.azureSubscriptionId}}</Property><Property Name="ContainerTypeId" Type="Guid">{00000000-0000-0000-0000-000000000000}</Property><Property Name="CreationDate" Type="Null" /><Property Name="DisplayName" Type="String">${options.name}</Property><Property Name="ExpiryDate" Type="Null" /><Property Name="IsBillingProfileRequired" Type="Boolean">false</Property><Property Name="OwningAppId" Type="Guid">{${options.applicationId}}</Property><Property Name="OwningTenantId" Type="Guid">{00000000-0000-0000-0000-000000000000}</Property><Property Name="Region" Type="String">${options.region}</Property><Property Name="ResourceGroup" Type="String">${options.resourceGroup}</Property><Property Name="SPContainerTypeBillingClassification" Type="Enum">0</Property></Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="1" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`;
|
|
69
|
-
}
|
|
70
90
|
}
|
|
71
|
-
_SpeContainerTypeAddCommand_instances = new WeakSet(), _SpeContainerTypeAddCommand_initTelemetry = function _SpeContainerTypeAddCommand_initTelemetry() {
|
|
72
|
-
this.telemetry.push((args) => {
|
|
73
|
-
Object.assign(this.telemetryProperties, {
|
|
74
|
-
trial: !!args.options.trial,
|
|
75
|
-
azureSubscriptionId: typeof args.options.azureSubscriptionId !== 'undefined',
|
|
76
|
-
resourceGroup: typeof args.options.resourceGroup !== 'undefined',
|
|
77
|
-
region: typeof args.options.region !== 'undefined'
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
}, _SpeContainerTypeAddCommand_initOptions = function _SpeContainerTypeAddCommand_initOptions() {
|
|
81
|
-
this.options.unshift({
|
|
82
|
-
option: '-n, --name <name>'
|
|
83
|
-
}, {
|
|
84
|
-
option: '--applicationId <applicationId>'
|
|
85
|
-
}, {
|
|
86
|
-
option: '--trial'
|
|
87
|
-
}, {
|
|
88
|
-
option: '--azureSubscriptionId [azureSubscriptionId]'
|
|
89
|
-
}, {
|
|
90
|
-
option: '--resourceGroup [resourceGroup]'
|
|
91
|
-
}, {
|
|
92
|
-
option: '--region [region]'
|
|
93
|
-
});
|
|
94
|
-
}, _SpeContainerTypeAddCommand_initValidators = function _SpeContainerTypeAddCommand_initValidators() {
|
|
95
|
-
this.validators.push(async (args) => {
|
|
96
|
-
if (!validation.isValidGuid(args.options.applicationId)) {
|
|
97
|
-
return `${args.options.applicationId} is not a valid GUID for option applicationId.`;
|
|
98
|
-
}
|
|
99
|
-
if (args.options.trial === undefined && !args.options.azureSubscriptionId) {
|
|
100
|
-
return 'You must specify the azureSubscriptionId when creating a non-trial environment.';
|
|
101
|
-
}
|
|
102
|
-
if (args.options.trial === undefined && !args.options.resourceGroup) {
|
|
103
|
-
return 'You must specify the resourceGroup when creating a non-trial environment.';
|
|
104
|
-
}
|
|
105
|
-
if (args.options.trial === undefined && !args.options.region) {
|
|
106
|
-
return 'You must specify the region when creating a non-trial environment.';
|
|
107
|
-
}
|
|
108
|
-
if (args.options.azureSubscriptionId && !validation.isValidGuid(args.options.azureSubscriptionId)) {
|
|
109
|
-
return `${args.options.azureSubscriptionId} is not a valid GUID for option azureSubscriptionId.`;
|
|
110
|
-
}
|
|
111
|
-
return true;
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
91
|
export default new SpeContainerTypeAddCommand();
|
|
115
92
|
//# sourceMappingURL=containertype-add.js.map
|