@pnp/cli-microsoft365 11.10.0 → 11.11.0-beta.1cb40cb
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/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/config.js +1 -0
- package/dist/m365/entra/commands/agent/agent-list.js +48 -0
- package/dist/m365/entra/commands.js +1 -0
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-get.js +23 -41
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-list.js +9 -24
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-remove.js +24 -44
- package/dist/m365/pp/commands/copilot/copilot-get.js +23 -41
- package/dist/m365/pp/commands/copilot/copilot-list.js +9 -24
- package/dist/m365/pp/commands/copilot/copilot-remove.js +24 -44
- package/dist/m365/pp/commands/dataverse/dataverse-table-get.js +10 -26
- package/dist/m365/pp/commands/dataverse/dataverse-table-list.js +9 -24
- package/dist/m365/pp/commands/dataverse/dataverse-table-remove.js +11 -29
- package/dist/m365/pp/commands/dataverse/dataverse-table-row-list.js +21 -33
- package/dist/m365/pp/commands/dataverse/dataverse-table-row-remove.js +25 -46
- package/dist/m365/pp/commands/gateway/gateway-get.js +10 -23
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +24 -36
- package/dist/m365/pp/commands/managementapp/managementapp-list.js +5 -0
- package/dist/m365/pp/commands/solution/solution-get.js +23 -41
- package/dist/m365/pp/commands/solution/solution-list.js +9 -24
- package/dist/m365/pp/commands/solution/solution-publish.js +25 -45
- package/dist/m365/pp/commands/solution/solution-publisher-add.js +26 -49
- package/dist/m365/pp/commands/solution/solution-publisher-get.js +23 -41
- package/dist/m365/pp/commands/solution/solution-publisher-list.js +10 -27
- package/dist/m365/pp/commands/solution/solution-publisher-remove.js +24 -44
- package/dist/m365/pp/commands/solution/solution-remove.js +24 -44
- package/dist/m365/pp/commands/tenant/tenant-settings-set.js +81 -170
- package/dist/m365/spo/commands/folder/folder-add.js +1 -1
- package/docs/docs/cmd/entra/agent/agent-list.mdx +209 -0
- package/docs/docs/cmd/spo/file/file-version-clear.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-version-get.mdx +19 -0
- package/docs/docs/cmd/spo/file/file-version-list.mdx +19 -0
- package/docs/docs/cmd/spo/file/file-version-remove.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-version-restore.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-add.mdx +20 -1
- package/docs/docs/cmd/spo/folder/folder-archive.mdx +2 -3
- package/docs/docs/cmd/spo/folder/folder-copy.mdx +19 -0
- package/docs/docs/cmd/spo/folder/folder-get.mdx +19 -0
- package/docs/docs/cmd/spo/folder/folder-list.mdx +19 -0
- package/docs/docs/cmd/spo/folder/folder-move.mdx +19 -0
- package/docs/docs/cmd/spo/folder/folder-remove.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-set.mdx +21 -0
- package/docs/docs/cmd/todo/list/list-add.mdx +19 -0
- package/docs/docs/cmd/todo/list/list-get.mdx +19 -0
- package/docs/docs/cmd/todo/list/list-list.mdx +19 -0
- package/docs/docs/cmd/todo/list/list-remove.mdx +21 -0
- package/docs/docs/cmd/todo/list/list-set.mdx +21 -0
- package/docs/docs/cmd/todo/task/task-add.mdx +19 -0
- package/docs/docs/cmd/todo/task/task-get.mdx +19 -0
- package/docs/docs/cmd/todo/task/task-list.mdx +19 -0
- package/docs/docs/cmd/todo/task/task-remove.mdx +21 -0
- package/docs/docs/cmd/todo/task/task-set.mdx +19 -0
- package/npm-shrinkwrap.json +356 -190
- package/package.json +14 -14
package/dist/config.js
CHANGED
|
@@ -56,6 +56,7 @@ export default {
|
|
|
56
56
|
'https://graph.microsoft.com/TeamSettings.ReadWrite.All',
|
|
57
57
|
'https://graph.microsoft.com/TeamsTab.ReadWrite.All',
|
|
58
58
|
'https://graph.microsoft.com/User.Invite.All',
|
|
59
|
+
'https://graph.microsoft.com/User.ReadBasic.All',
|
|
59
60
|
'https://manage.office.com/ActivityFeed.Read',
|
|
60
61
|
'https://manage.office.com/ServiceHealth.Read',
|
|
61
62
|
'https://analysis.windows.net/powerbi/api/Dataset.Read.All',
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
|
+
import { odata } from '../../../../utils/odata.js';
|
|
4
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
5
|
+
import commands from '../../commands.js';
|
|
6
|
+
export const options = z.strictObject({
|
|
7
|
+
...globalOptionsZod.shape,
|
|
8
|
+
properties: z.string().optional().alias('p')
|
|
9
|
+
});
|
|
10
|
+
class EntraAgentListCommand extends GraphCommand {
|
|
11
|
+
get name() {
|
|
12
|
+
return commands.AGENT_LIST;
|
|
13
|
+
}
|
|
14
|
+
get description() {
|
|
15
|
+
return 'Retrieves a list of agents';
|
|
16
|
+
}
|
|
17
|
+
get schema() {
|
|
18
|
+
return options;
|
|
19
|
+
}
|
|
20
|
+
defaultProperties() {
|
|
21
|
+
return ['id', 'displayName'];
|
|
22
|
+
}
|
|
23
|
+
async commandAction(logger, args) {
|
|
24
|
+
const queryParameters = [];
|
|
25
|
+
if (args.options.properties) {
|
|
26
|
+
const allProperties = args.options.properties
|
|
27
|
+
.split(',')
|
|
28
|
+
.map(prop => prop.replace(/['"]/g, '').trim())
|
|
29
|
+
.filter(prop => prop.length > 0);
|
|
30
|
+
const selectProperties = allProperties.filter(prop => !prop.includes('/'));
|
|
31
|
+
if (selectProperties.length > 0) {
|
|
32
|
+
queryParameters.push(`$select=${selectProperties}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const queryString = queryParameters.length > 0
|
|
36
|
+
? `?${queryParameters.join('&')}`
|
|
37
|
+
: '';
|
|
38
|
+
try {
|
|
39
|
+
const results = await odata.getAllItems(`${this.resource}/v1.0/users/microsoft.graph.agentUser${queryString}`);
|
|
40
|
+
await logger.log(results);
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
this.handleRejectedODataJsonPromise(err);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export default new EntraAgentListCommand();
|
|
48
|
+
//# sourceMappingURL=agent-list.js.map
|
|
@@ -9,6 +9,7 @@ export default {
|
|
|
9
9
|
ADMINISTRATIVEUNIT_MEMBER_LIST: `${prefix} administrativeunit member list`,
|
|
10
10
|
ADMINISTRATIVEUNIT_MEMBER_REMOVE: `${prefix} administrativeunit member remove`,
|
|
11
11
|
ADMINISTRATIVEUNIT_ROLEASSIGNMENT_ADD: `${prefix} administrativeunit roleassignment add`,
|
|
12
|
+
AGENT_LIST: `${prefix} agent list`,
|
|
12
13
|
APP_ADD: `${prefix} app add`,
|
|
13
14
|
APP_GET: `${prefix} app get`,
|
|
14
15
|
APP_LIST: `${prefix} app list`,
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _PpAiBuilderModelGetCommand_instances, _PpAiBuilderModelGetCommand_initTelemetry, _PpAiBuilderModelGetCommand_initOptions, _PpAiBuilderModelGetCommand_initOptionSets, _PpAiBuilderModelGetCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
6
|
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
11
7
|
import { validation } from '../../../../utils/validation.js';
|
|
12
8
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
13
9
|
import commands from '../../commands.js';
|
|
10
|
+
export const options = z.strictObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
12
|
+
environmentName: z.string().alias('e'),
|
|
13
|
+
id: z.string().refine(val => validation.isValidGuid(val), {
|
|
14
|
+
error: 'The value must be a valid GUID.'
|
|
15
|
+
}).optional().alias('i'),
|
|
16
|
+
name: z.string().optional().alias('n'),
|
|
17
|
+
asAdmin: z.boolean().optional()
|
|
18
|
+
});
|
|
14
19
|
class PpAiBuilderModelGetCommand extends PowerPlatformCommand {
|
|
15
20
|
get name() {
|
|
16
21
|
return commands.AIBUILDERMODEL_GET;
|
|
@@ -18,13 +23,18 @@ class PpAiBuilderModelGetCommand extends PowerPlatformCommand {
|
|
|
18
23
|
get description() {
|
|
19
24
|
return 'Gets a specific AI builder model in the specified Power Platform environment';
|
|
20
25
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
get schema() {
|
|
27
|
+
return options;
|
|
28
|
+
}
|
|
29
|
+
getRefinedSchema(schema) {
|
|
30
|
+
return schema
|
|
31
|
+
.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
|
|
32
|
+
error: `Specify either 'id' or 'name', but not both.`,
|
|
33
|
+
params: {
|
|
34
|
+
customCode: 'optionSet',
|
|
35
|
+
options: ['id', 'name']
|
|
36
|
+
}
|
|
37
|
+
});
|
|
28
38
|
}
|
|
29
39
|
async commandAction(logger, args) {
|
|
30
40
|
if (this.verbose) {
|
|
@@ -63,33 +73,5 @@ class PpAiBuilderModelGetCommand extends PowerPlatformCommand {
|
|
|
63
73
|
return result.value[0];
|
|
64
74
|
}
|
|
65
75
|
}
|
|
66
|
-
_PpAiBuilderModelGetCommand_instances = new WeakSet(), _PpAiBuilderModelGetCommand_initTelemetry = function _PpAiBuilderModelGetCommand_initTelemetry() {
|
|
67
|
-
this.telemetry.push((args) => {
|
|
68
|
-
Object.assign(this.telemetryProperties, {
|
|
69
|
-
id: typeof args.options.id !== 'undefined',
|
|
70
|
-
name: typeof args.options.name !== 'undefined',
|
|
71
|
-
asAdmin: !!args.options.asAdmin
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
}, _PpAiBuilderModelGetCommand_initOptions = function _PpAiBuilderModelGetCommand_initOptions() {
|
|
75
|
-
this.options.unshift({
|
|
76
|
-
option: '-e, --environmentName <environmentName>'
|
|
77
|
-
}, {
|
|
78
|
-
option: '-i, --id [id]'
|
|
79
|
-
}, {
|
|
80
|
-
option: '-n, --name [name]'
|
|
81
|
-
}, {
|
|
82
|
-
option: '--asAdmin'
|
|
83
|
-
});
|
|
84
|
-
}, _PpAiBuilderModelGetCommand_initOptionSets = function _PpAiBuilderModelGetCommand_initOptionSets() {
|
|
85
|
-
this.optionSets.push({ options: ['id', 'name'] });
|
|
86
|
-
}, _PpAiBuilderModelGetCommand_initValidators = function _PpAiBuilderModelGetCommand_initValidators() {
|
|
87
|
-
this.validators.push(async (args) => {
|
|
88
|
-
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
89
|
-
return `${args.options.id} is not a valid GUID`;
|
|
90
|
-
}
|
|
91
|
-
return true;
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
76
|
export default new PpAiBuilderModelGetCommand();
|
|
95
77
|
//# sourceMappingURL=aibuildermodel-get.js.map
|
|
@@ -1,13 +1,14 @@
|
|
|
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 _PpAiBuilderModelListCommand_instances, _PpAiBuilderModelListCommand_initTelemetry, _PpAiBuilderModelListCommand_initOptions;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { odata } from '../../../../utils/odata.js';
|
|
8
4
|
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
9
5
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
environmentName: z.string().alias('e'),
|
|
10
|
+
asAdmin: z.boolean().optional()
|
|
11
|
+
});
|
|
11
12
|
class PpAiBuilderModelListCommand extends PowerPlatformCommand {
|
|
12
13
|
get name() {
|
|
13
14
|
return commands.AIBUILDERMODEL_LIST;
|
|
@@ -18,11 +19,8 @@ class PpAiBuilderModelListCommand extends PowerPlatformCommand {
|
|
|
18
19
|
defaultProperties() {
|
|
19
20
|
return ['msdyn_name', 'msdyn_aimodelid', 'createdon', 'modifiedon'];
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_PpAiBuilderModelListCommand_instances.add(this);
|
|
24
|
-
__classPrivateFieldGet(this, _PpAiBuilderModelListCommand_instances, "m", _PpAiBuilderModelListCommand_initTelemetry).call(this);
|
|
25
|
-
__classPrivateFieldGet(this, _PpAiBuilderModelListCommand_instances, "m", _PpAiBuilderModelListCommand_initOptions).call(this);
|
|
22
|
+
get schema() {
|
|
23
|
+
return options;
|
|
26
24
|
}
|
|
27
25
|
async commandAction(logger, args) {
|
|
28
26
|
if (this.verbose) {
|
|
@@ -38,18 +36,5 @@ class PpAiBuilderModelListCommand extends PowerPlatformCommand {
|
|
|
38
36
|
}
|
|
39
37
|
}
|
|
40
38
|
}
|
|
41
|
-
_PpAiBuilderModelListCommand_instances = new WeakSet(), _PpAiBuilderModelListCommand_initTelemetry = function _PpAiBuilderModelListCommand_initTelemetry() {
|
|
42
|
-
this.telemetry.push((args) => {
|
|
43
|
-
Object.assign(this.telemetryProperties, {
|
|
44
|
-
asAdmin: !!args.options.asAdmin
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
}, _PpAiBuilderModelListCommand_initOptions = function _PpAiBuilderModelListCommand_initOptions() {
|
|
48
|
-
this.options.unshift({
|
|
49
|
-
option: '-e, --environmentName <environmentName>'
|
|
50
|
-
}, {
|
|
51
|
-
option: '--asAdmin'
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
39
|
export default new PpAiBuilderModelListCommand();
|
|
55
40
|
//# sourceMappingURL=aibuildermodel-list.js.map
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _PpAiBuilderModelRemoveCommand_instances, _PpAiBuilderModelRemoveCommand_initTelemetry, _PpAiBuilderModelRemoveCommand_initOptions, _PpAiBuilderModelRemoveCommand_initOptionSets, _PpAiBuilderModelRemoveCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
10
6
|
import { validation } from '../../../../utils/validation.js';
|
|
11
7
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
12
8
|
import commands from '../../commands.js';
|
|
13
9
|
import ppAiBuilderModelGetCommand from './aibuildermodel-get.js';
|
|
10
|
+
export const options = z.strictObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
12
|
+
environmentName: z.string().alias('e'),
|
|
13
|
+
id: z.string().refine(val => validation.isValidGuid(val), {
|
|
14
|
+
error: 'The value must be a valid GUID.'
|
|
15
|
+
}).optional().alias('i'),
|
|
16
|
+
name: z.string().optional().alias('n'),
|
|
17
|
+
asAdmin: z.boolean().optional(),
|
|
18
|
+
force: z.boolean().optional().alias('f')
|
|
19
|
+
});
|
|
14
20
|
class PpAiBuilderModelRemoveCommand extends PowerPlatformCommand {
|
|
15
21
|
get name() {
|
|
16
22
|
return commands.AIBUILDERMODEL_REMOVE;
|
|
@@ -18,13 +24,18 @@ class PpAiBuilderModelRemoveCommand extends PowerPlatformCommand {
|
|
|
18
24
|
get description() {
|
|
19
25
|
return 'Removes an AI builder model in the specified Power Platform environment.';
|
|
20
26
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
get schema() {
|
|
28
|
+
return options;
|
|
29
|
+
}
|
|
30
|
+
getRefinedSchema(schema) {
|
|
31
|
+
return schema
|
|
32
|
+
.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
|
|
33
|
+
error: `Specify either 'id' or 'name', but not both.`,
|
|
34
|
+
params: {
|
|
35
|
+
customCode: 'optionSet',
|
|
36
|
+
options: ['id', 'name']
|
|
37
|
+
}
|
|
38
|
+
});
|
|
28
39
|
}
|
|
29
40
|
async commandAction(logger, args) {
|
|
30
41
|
if (this.verbose) {
|
|
@@ -73,36 +84,5 @@ class PpAiBuilderModelRemoveCommand extends PowerPlatformCommand {
|
|
|
73
84
|
}
|
|
74
85
|
}
|
|
75
86
|
}
|
|
76
|
-
_PpAiBuilderModelRemoveCommand_instances = new WeakSet(), _PpAiBuilderModelRemoveCommand_initTelemetry = function _PpAiBuilderModelRemoveCommand_initTelemetry() {
|
|
77
|
-
this.telemetry.push((args) => {
|
|
78
|
-
Object.assign(this.telemetryProperties, {
|
|
79
|
-
id: typeof args.options.id !== 'undefined',
|
|
80
|
-
name: typeof args.options.name !== 'undefined',
|
|
81
|
-
asAdmin: !!args.options.asAdmin,
|
|
82
|
-
force: !!args.options.force
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
}, _PpAiBuilderModelRemoveCommand_initOptions = function _PpAiBuilderModelRemoveCommand_initOptions() {
|
|
86
|
-
this.options.unshift({
|
|
87
|
-
option: '-e, --environmentName <environmentName>'
|
|
88
|
-
}, {
|
|
89
|
-
option: '-i, --id [id]'
|
|
90
|
-
}, {
|
|
91
|
-
option: '-n, --name [name]'
|
|
92
|
-
}, {
|
|
93
|
-
option: '--asAdmin'
|
|
94
|
-
}, {
|
|
95
|
-
option: '-f, --force'
|
|
96
|
-
});
|
|
97
|
-
}, _PpAiBuilderModelRemoveCommand_initOptionSets = function _PpAiBuilderModelRemoveCommand_initOptionSets() {
|
|
98
|
-
this.optionSets.push({ options: ['id', 'name'] });
|
|
99
|
-
}, _PpAiBuilderModelRemoveCommand_initValidators = function _PpAiBuilderModelRemoveCommand_initValidators() {
|
|
100
|
-
this.validators.push(async (args) => {
|
|
101
|
-
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
102
|
-
return `${args.options.id} is not a valid GUID`;
|
|
103
|
-
}
|
|
104
|
-
return true;
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
87
|
export default new PpAiBuilderModelRemoveCommand();
|
|
108
88
|
//# sourceMappingURL=aibuildermodel-remove.js.map
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _PpCopilotGetCommand_instances, _PpCopilotGetCommand_initTelemetry, _PpCopilotGetCommand_initOptions, _PpCopilotGetCommand_initOptionSets, _PpCopilotGetCommand_initValidators;
|
|
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';
|
|
9
5
|
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
@@ -11,6 +7,15 @@ import { validation } from '../../../../utils/validation.js';
|
|
|
11
7
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
12
8
|
import commands from '../../commands.js';
|
|
13
9
|
import { cli } from '../../../../cli/cli.js';
|
|
10
|
+
export const options = z.strictObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
12
|
+
environmentName: z.string().alias('e'),
|
|
13
|
+
id: z.string().refine(val => validation.isValidGuid(val), {
|
|
14
|
+
error: 'The value must be a valid GUID.'
|
|
15
|
+
}).optional().alias('i'),
|
|
16
|
+
name: z.string().optional().alias('n'),
|
|
17
|
+
asAdmin: z.boolean().optional()
|
|
18
|
+
});
|
|
14
19
|
class PpCopilotGetCommand extends PowerPlatformCommand {
|
|
15
20
|
get name() {
|
|
16
21
|
return commands.COPILOT_GET;
|
|
@@ -18,13 +23,18 @@ class PpCopilotGetCommand extends PowerPlatformCommand {
|
|
|
18
23
|
get description() {
|
|
19
24
|
return 'Gets information about the specified copilot';
|
|
20
25
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
get schema() {
|
|
27
|
+
return options;
|
|
28
|
+
}
|
|
29
|
+
getRefinedSchema(schema) {
|
|
30
|
+
return schema
|
|
31
|
+
.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
|
|
32
|
+
error: `Specify either 'id' or 'name', but not both.`,
|
|
33
|
+
params: {
|
|
34
|
+
customCode: 'optionSet',
|
|
35
|
+
options: ['id', 'name']
|
|
36
|
+
}
|
|
37
|
+
});
|
|
28
38
|
}
|
|
29
39
|
async commandAction(logger, args) {
|
|
30
40
|
if (this.verbose) {
|
|
@@ -63,33 +73,5 @@ class PpCopilotGetCommand extends PowerPlatformCommand {
|
|
|
63
73
|
return result.value[0];
|
|
64
74
|
}
|
|
65
75
|
}
|
|
66
|
-
_PpCopilotGetCommand_instances = new WeakSet(), _PpCopilotGetCommand_initTelemetry = function _PpCopilotGetCommand_initTelemetry() {
|
|
67
|
-
this.telemetry.push((args) => {
|
|
68
|
-
Object.assign(this.telemetryProperties, {
|
|
69
|
-
id: typeof args.options.id !== 'undefined',
|
|
70
|
-
name: typeof args.options.name !== 'undefined',
|
|
71
|
-
asAdmin: !!args.options.asAdmin
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
}, _PpCopilotGetCommand_initOptions = function _PpCopilotGetCommand_initOptions() {
|
|
75
|
-
this.options.unshift({
|
|
76
|
-
option: '-e, --environmentName <environmentName>'
|
|
77
|
-
}, {
|
|
78
|
-
option: '-i, --id [id]'
|
|
79
|
-
}, {
|
|
80
|
-
option: '-n, --name [name]'
|
|
81
|
-
}, {
|
|
82
|
-
option: '--asAdmin'
|
|
83
|
-
});
|
|
84
|
-
}, _PpCopilotGetCommand_initOptionSets = function _PpCopilotGetCommand_initOptionSets() {
|
|
85
|
-
this.optionSets.push({ options: ['id', 'name'] });
|
|
86
|
-
}, _PpCopilotGetCommand_initValidators = function _PpCopilotGetCommand_initValidators() {
|
|
87
|
-
this.validators.push(async (args) => {
|
|
88
|
-
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
89
|
-
return `${args.options.id} is not a valid GUID`;
|
|
90
|
-
}
|
|
91
|
-
return true;
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
76
|
export default new PpCopilotGetCommand();
|
|
95
77
|
//# sourceMappingURL=copilot-get.js.map
|
|
@@ -1,13 +1,14 @@
|
|
|
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 _PpCopilotListCommand_instances, _PpCopilotListCommand_initTelemetry, _PpCopilotListCommand_initOptions;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { odata } from '../../../../utils/odata.js';
|
|
8
4
|
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
9
5
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
environmentName: z.string().alias('e'),
|
|
10
|
+
asAdmin: z.boolean().optional()
|
|
11
|
+
});
|
|
11
12
|
class PpCopilotListCommand extends PowerPlatformCommand {
|
|
12
13
|
get name() {
|
|
13
14
|
return commands.COPILOT_LIST;
|
|
@@ -18,11 +19,8 @@ class PpCopilotListCommand extends PowerPlatformCommand {
|
|
|
18
19
|
defaultProperties() {
|
|
19
20
|
return ['name', 'botid', 'publishedOn', 'createdOn', 'botModifiedOn'];
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_PpCopilotListCommand_instances.add(this);
|
|
24
|
-
__classPrivateFieldGet(this, _PpCopilotListCommand_instances, "m", _PpCopilotListCommand_initTelemetry).call(this);
|
|
25
|
-
__classPrivateFieldGet(this, _PpCopilotListCommand_instances, "m", _PpCopilotListCommand_initOptions).call(this);
|
|
22
|
+
get schema() {
|
|
23
|
+
return options;
|
|
26
24
|
}
|
|
27
25
|
async commandAction(logger, args) {
|
|
28
26
|
if (this.verbose) {
|
|
@@ -78,18 +76,5 @@ class PpCopilotListCommand extends PowerPlatformCommand {
|
|
|
78
76
|
}
|
|
79
77
|
}
|
|
80
78
|
}
|
|
81
|
-
_PpCopilotListCommand_instances = new WeakSet(), _PpCopilotListCommand_initTelemetry = function _PpCopilotListCommand_initTelemetry() {
|
|
82
|
-
this.telemetry.push((args) => {
|
|
83
|
-
Object.assign(this.telemetryProperties, {
|
|
84
|
-
asAdmin: !!args.options.asAdmin
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
}, _PpCopilotListCommand_initOptions = function _PpCopilotListCommand_initOptions() {
|
|
88
|
-
this.options.unshift({
|
|
89
|
-
option: '-e, --environmentName <environmentName>'
|
|
90
|
-
}, {
|
|
91
|
-
option: '--asAdmin'
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
79
|
export default new PpCopilotListCommand();
|
|
95
80
|
//# sourceMappingURL=copilot-list.js.map
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _PpCopilotRemoveCommand_instances, _PpCopilotRemoveCommand_initTelemetry, _PpCopilotRemoveCommand_initOptions, _PpCopilotRemoveCommand_initOptionSets, _PpCopilotRemoveCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
10
6
|
import { validation } from '../../../../utils/validation.js';
|
|
11
7
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
12
8
|
import commands from '../../commands.js';
|
|
13
9
|
import ppCopilotGetCommand from './copilot-get.js';
|
|
10
|
+
export const options = z.strictObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
12
|
+
environmentName: z.string().alias('e'),
|
|
13
|
+
id: z.string().refine(val => validation.isValidGuid(val), {
|
|
14
|
+
error: 'The value must be a valid GUID.'
|
|
15
|
+
}).optional().alias('i'),
|
|
16
|
+
name: z.string().optional().alias('n'),
|
|
17
|
+
asAdmin: z.boolean().optional(),
|
|
18
|
+
force: z.boolean().optional().alias('f')
|
|
19
|
+
});
|
|
14
20
|
class PpCopilotRemoveCommand extends PowerPlatformCommand {
|
|
15
21
|
get name() {
|
|
16
22
|
return commands.COPILOT_REMOVE;
|
|
@@ -18,13 +24,18 @@ class PpCopilotRemoveCommand extends PowerPlatformCommand {
|
|
|
18
24
|
get description() {
|
|
19
25
|
return 'Removes the specified copilot';
|
|
20
26
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
get schema() {
|
|
28
|
+
return options;
|
|
29
|
+
}
|
|
30
|
+
getRefinedSchema(schema) {
|
|
31
|
+
return schema
|
|
32
|
+
.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
|
|
33
|
+
error: `Specify either 'id' or 'name', but not both.`,
|
|
34
|
+
params: {
|
|
35
|
+
customCode: 'optionSet',
|
|
36
|
+
options: ['id', 'name']
|
|
37
|
+
}
|
|
38
|
+
});
|
|
28
39
|
}
|
|
29
40
|
async commandAction(logger, args) {
|
|
30
41
|
if (this.verbose) {
|
|
@@ -74,36 +85,5 @@ class PpCopilotRemoveCommand extends PowerPlatformCommand {
|
|
|
74
85
|
}
|
|
75
86
|
}
|
|
76
87
|
}
|
|
77
|
-
_PpCopilotRemoveCommand_instances = new WeakSet(), _PpCopilotRemoveCommand_initTelemetry = function _PpCopilotRemoveCommand_initTelemetry() {
|
|
78
|
-
this.telemetry.push((args) => {
|
|
79
|
-
Object.assign(this.telemetryProperties, {
|
|
80
|
-
id: typeof args.options.id !== 'undefined',
|
|
81
|
-
name: typeof args.options.name !== 'undefined',
|
|
82
|
-
asAdmin: !!args.options.asAdmin,
|
|
83
|
-
force: !!args.options.force
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
}, _PpCopilotRemoveCommand_initOptions = function _PpCopilotRemoveCommand_initOptions() {
|
|
87
|
-
this.options.unshift({
|
|
88
|
-
option: '-e, --environmentName <environmentName>'
|
|
89
|
-
}, {
|
|
90
|
-
option: '-i, --id [id]'
|
|
91
|
-
}, {
|
|
92
|
-
option: '-n, --name [name]'
|
|
93
|
-
}, {
|
|
94
|
-
option: '--asAdmin'
|
|
95
|
-
}, {
|
|
96
|
-
option: '-f, --force'
|
|
97
|
-
});
|
|
98
|
-
}, _PpCopilotRemoveCommand_initOptionSets = function _PpCopilotRemoveCommand_initOptionSets() {
|
|
99
|
-
this.optionSets.push({ options: ['id', 'name'] });
|
|
100
|
-
}, _PpCopilotRemoveCommand_initValidators = function _PpCopilotRemoveCommand_initValidators() {
|
|
101
|
-
this.validators.push(async (args) => {
|
|
102
|
-
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
103
|
-
return `${args.options.id} is not a valid GUID`;
|
|
104
|
-
}
|
|
105
|
-
return true;
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
88
|
export default new PpCopilotRemoveCommand();
|
|
109
89
|
//# sourceMappingURL=copilot-remove.js.map
|
|
@@ -1,13 +1,15 @@
|
|
|
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 _PpDataverseTableGetCommand_instances, _PpDataverseTableGetCommand_initTelemetry, _PpDataverseTableGetCommand_initOptions;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
9
5
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
environmentName: z.string().alias('e'),
|
|
10
|
+
name: z.string().alias('n'),
|
|
11
|
+
asAdmin: z.boolean().optional()
|
|
12
|
+
});
|
|
11
13
|
class PpDataverseTableGetCommand extends PowerPlatformCommand {
|
|
12
14
|
get name() {
|
|
13
15
|
return commands.DATAVERSE_TABLE_GET;
|
|
@@ -15,11 +17,8 @@ class PpDataverseTableGetCommand extends PowerPlatformCommand {
|
|
|
15
17
|
get description() {
|
|
16
18
|
return 'Gets a dataverse table in a given environment';
|
|
17
19
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_PpDataverseTableGetCommand_instances.add(this);
|
|
21
|
-
__classPrivateFieldGet(this, _PpDataverseTableGetCommand_instances, "m", _PpDataverseTableGetCommand_initTelemetry).call(this);
|
|
22
|
-
__classPrivateFieldGet(this, _PpDataverseTableGetCommand_instances, "m", _PpDataverseTableGetCommand_initOptions).call(this);
|
|
20
|
+
get schema() {
|
|
21
|
+
return options;
|
|
23
22
|
}
|
|
24
23
|
async commandAction(logger, args) {
|
|
25
24
|
if (this.verbose) {
|
|
@@ -42,20 +41,5 @@ class PpDataverseTableGetCommand extends PowerPlatformCommand {
|
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
|
-
_PpDataverseTableGetCommand_instances = new WeakSet(), _PpDataverseTableGetCommand_initTelemetry = function _PpDataverseTableGetCommand_initTelemetry() {
|
|
46
|
-
this.telemetry.push((args) => {
|
|
47
|
-
Object.assign(this.telemetryProperties, {
|
|
48
|
-
asAdmin: !!args.options.asAdmin
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
}, _PpDataverseTableGetCommand_initOptions = function _PpDataverseTableGetCommand_initOptions() {
|
|
52
|
-
this.options.unshift({
|
|
53
|
-
option: '-e, --environmentName <environmentName>'
|
|
54
|
-
}, {
|
|
55
|
-
option: '-n, --name <name>'
|
|
56
|
-
}, {
|
|
57
|
-
option: '--asAdmin'
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
44
|
export default new PpDataverseTableGetCommand();
|
|
61
45
|
//# sourceMappingURL=dataverse-table-get.js.map
|
|
@@ -1,13 +1,14 @@
|
|
|
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 _PpDataverseTableListCommand_instances, _PpDataverseTableListCommand_initTelemetry, _PpDataverseTableListCommand_initOptions;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { odata } from '../../../../utils/odata.js';
|
|
8
4
|
import { powerPlatform } from '../../../../utils/powerPlatform.js';
|
|
9
5
|
import PowerPlatformCommand from '../../../base/PowerPlatformCommand.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
environmentName: z.string().alias('e'),
|
|
10
|
+
asAdmin: z.boolean().optional()
|
|
11
|
+
});
|
|
11
12
|
class PpDataverseTableListCommand extends PowerPlatformCommand {
|
|
12
13
|
get name() {
|
|
13
14
|
return commands.DATAVERSE_TABLE_LIST;
|
|
@@ -18,11 +19,8 @@ class PpDataverseTableListCommand extends PowerPlatformCommand {
|
|
|
18
19
|
defaultProperties() {
|
|
19
20
|
return ['SchemaName', 'EntitySetName', 'LogicalName', 'IsManaged'];
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_PpDataverseTableListCommand_instances.add(this);
|
|
24
|
-
__classPrivateFieldGet(this, _PpDataverseTableListCommand_instances, "m", _PpDataverseTableListCommand_initTelemetry).call(this);
|
|
25
|
-
__classPrivateFieldGet(this, _PpDataverseTableListCommand_instances, "m", _PpDataverseTableListCommand_initOptions).call(this);
|
|
22
|
+
get schema() {
|
|
23
|
+
return options;
|
|
26
24
|
}
|
|
27
25
|
async commandAction(logger, args) {
|
|
28
26
|
if (this.verbose) {
|
|
@@ -39,18 +37,5 @@ class PpDataverseTableListCommand extends PowerPlatformCommand {
|
|
|
39
37
|
}
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
|
-
_PpDataverseTableListCommand_instances = new WeakSet(), _PpDataverseTableListCommand_initTelemetry = function _PpDataverseTableListCommand_initTelemetry() {
|
|
43
|
-
this.telemetry.push((args) => {
|
|
44
|
-
Object.assign(this.telemetryProperties, {
|
|
45
|
-
asAdmin: !!args.options.asAdmin
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
}, _PpDataverseTableListCommand_initOptions = function _PpDataverseTableListCommand_initOptions() {
|
|
49
|
-
this.options.unshift({
|
|
50
|
-
option: '-e, --environmentName <environmentName>'
|
|
51
|
-
}, {
|
|
52
|
-
option: '--asAdmin'
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
40
|
export default new PpDataverseTableListCommand();
|
|
56
41
|
//# sourceMappingURL=dataverse-table-list.js.map
|