@pnp/cli-microsoft365 11.10.0-beta.fdeb2ae → 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/.devcontainer/Dockerfile +1 -1
- package/.devproxy/api-specs/sharepoint-admin.yaml +50 -0
- package/Dockerfile +1 -1
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +4 -2
- 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/outlook/commands/event/event-get.js +77 -0
- package/dist/m365/outlook/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/spfx/commands/SpfxCompatibilityMatrix.js +15 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.23.2.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.23.2.js +55 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +2 -1
- package/dist/m365/spo/commands/folder/folder-add.js +1 -1
- package/dist/m365/spo/commands/homesite/homesite-remove.js +1 -1
- package/dist/m365/spo/commands/web/{web-alert-list.js → web-rule-list.js} +7 -4
- package/dist/m365/spo/commands/web/{web-alert-remove.js → web-rule-remove.js} +7 -4
- package/dist/m365/spo/commands.js +2 -0
- package/docs/docs/cmd/entra/agent/agent-list.mdx +209 -0
- package/docs/docs/cmd/outlook/event/event-get.mdx +280 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkout-undo.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-retentionlabel-remove.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-roleinheritance-break.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-roleinheritance-reset.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-sharinginfo-get.mdx +19 -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/spo/homesite/homesite-add.mdx +21 -2
- package/docs/docs/cmd/spo/homesite/homesite-get.mdx +19 -0
- package/docs/docs/cmd/spo/homesite/homesite-list.mdx +19 -0
- package/docs/docs/cmd/spo/homesite/homesite-remove.mdx +24 -3
- package/docs/docs/cmd/spo/homesite/homesite-set.mdx +21 -2
- package/docs/docs/cmd/spo/hubsite/hubsite-connect.mdx +21 -0
- package/docs/docs/cmd/spo/hubsite/hubsite-data-get.mdx +19 -0
- package/docs/docs/cmd/spo/hubsite/hubsite-disconnect.mdx +21 -0
- package/docs/docs/cmd/spo/hubsite/hubsite-get.mdx +19 -0
- package/docs/docs/cmd/spo/hubsite/hubsite-list.mdx +19 -0
- package/docs/docs/cmd/spo/hubsite/hubsite-register.mdx +19 -0
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-grant.mdx +21 -0
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-revoke.mdx +21 -0
- package/docs/docs/cmd/spo/hubsite/hubsite-set.mdx +19 -0
- package/docs/docs/cmd/spo/hubsite/hubsite-unregister.mdx +21 -0
- package/docs/docs/cmd/spo/web/{web-alert-list.mdx → web-rule-list.mdx} +13 -7
- package/docs/docs/cmd/spo/web/{web-alert-remove.mdx → web-rule-remove.mdx} +10 -4
- 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 +1575 -696
- package/package.json +20 -20
package/dist/Auth.js
CHANGED
|
@@ -361,7 +361,7 @@ export class Auth {
|
|
|
361
361
|
if (response.message) {
|
|
362
362
|
await logger.logToStderr(`🌶️ ${response.message}`);
|
|
363
363
|
}
|
|
364
|
-
if (cli.getSettingWithDefaultValue(settingsNames.autoOpenLinksInBrowser, false)) {
|
|
364
|
+
if (cli.getSettingWithDefaultValue(settingsNames.autoOpenLinksInBrowser, false) && response.verificationUri !== undefined) {
|
|
365
365
|
await browserUtil.open(response.verificationUri);
|
|
366
366
|
}
|
|
367
367
|
if (cli.getSettingWithDefaultValue(settingsNames.copyDeviceCodeToClipboard, false)) {
|
|
@@ -372,7 +372,9 @@ export class Auth {
|
|
|
372
372
|
if (!this._clipboardy) {
|
|
373
373
|
this._clipboardy = (await import('clipboardy')).default;
|
|
374
374
|
}
|
|
375
|
-
|
|
375
|
+
if (response.userCode !== undefined) {
|
|
376
|
+
this._clipboardy.writeSync(response.userCode);
|
|
377
|
+
}
|
|
376
378
|
}
|
|
377
379
|
}
|
|
378
380
|
async ensureAccessTokenWithPassword(resource, logger, debug) {
|
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`,
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
3
|
+
import commands from '../../commands.js';
|
|
4
|
+
import { validation } from '../../../../utils/validation.js';
|
|
5
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
6
|
+
import request from '../../../../request.js';
|
|
7
|
+
import { calendar } from '../../../../utils/calendar.js';
|
|
8
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
id: z.string().alias('i'),
|
|
12
|
+
userId: z.string().refine(id => validation.isValidGuid(id), {
|
|
13
|
+
error: e => `'${e.input}' is not a valid GUID.`
|
|
14
|
+
}).optional(),
|
|
15
|
+
userName: z.string().refine(name => validation.isValidUserPrincipalName(name), {
|
|
16
|
+
error: e => `'${e.input}' is not a valid UPN.`
|
|
17
|
+
}).optional(),
|
|
18
|
+
calendarId: z.string().optional(),
|
|
19
|
+
calendarName: z.string().optional(),
|
|
20
|
+
timeZone: z.string().optional()
|
|
21
|
+
});
|
|
22
|
+
class OutlookEventGetCommand extends GraphCommand {
|
|
23
|
+
get name() {
|
|
24
|
+
return commands.EVENT_GET;
|
|
25
|
+
}
|
|
26
|
+
get description() {
|
|
27
|
+
return `Retrieve an event from a specific calendar of a user`;
|
|
28
|
+
}
|
|
29
|
+
get schema() {
|
|
30
|
+
return options;
|
|
31
|
+
}
|
|
32
|
+
getRefinedSchema(schema) {
|
|
33
|
+
return schema
|
|
34
|
+
.refine(options => [options.userId, options.userName].filter(x => x !== undefined).length === 1, {
|
|
35
|
+
error: 'Specify either userId or userName, but not both'
|
|
36
|
+
})
|
|
37
|
+
.refine(options => !(options.calendarId && options.calendarName), {
|
|
38
|
+
error: 'Specify either calendarId or calendarName, but not both.'
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
async commandAction(logger, args) {
|
|
42
|
+
const userIdentifier = args.options.userId ?? args.options.userName;
|
|
43
|
+
if (this.verbose) {
|
|
44
|
+
await logger.logToStderr(`Retrieving event ${args.options.id} for user ${userIdentifier}...`);
|
|
45
|
+
}
|
|
46
|
+
let calendarId = args.options.calendarId;
|
|
47
|
+
if (args.options.calendarName) {
|
|
48
|
+
calendarId = (await calendar.getUserCalendarByName(userIdentifier, args.options.calendarName)).id;
|
|
49
|
+
}
|
|
50
|
+
let requestUrl = `${this.resource}/v1.0/users('${formatting.encodeQueryParameter(userIdentifier)}')`;
|
|
51
|
+
if (calendarId) {
|
|
52
|
+
requestUrl += `/calendars/${calendarId}/events/${args.options.id}`;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
requestUrl += `/events/${args.options.id}`;
|
|
56
|
+
}
|
|
57
|
+
const requestOptions = {
|
|
58
|
+
url: requestUrl,
|
|
59
|
+
headers: {
|
|
60
|
+
accept: 'application/json;odata.metadata=none'
|
|
61
|
+
},
|
|
62
|
+
responseType: 'json'
|
|
63
|
+
};
|
|
64
|
+
if (args.options.timeZone) {
|
|
65
|
+
requestOptions.headers.Prefer = `outlook.timezone="${args.options.timeZone}"`;
|
|
66
|
+
}
|
|
67
|
+
try {
|
|
68
|
+
const result = await request.get(requestOptions);
|
|
69
|
+
await logger.log(result);
|
|
70
|
+
}
|
|
71
|
+
catch (err) {
|
|
72
|
+
this.handleRejectedODataJsonPromise(err);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export default new OutlookEventGetCommand();
|
|
77
|
+
//# sourceMappingURL=event-get.js.map
|
|
@@ -10,6 +10,7 @@ export default {
|
|
|
10
10
|
CALENDARGROUP_REMOVE: `${prefix} calendargroup remove`,
|
|
11
11
|
CALENDARGROUP_SET: `${prefix} calendargroup set`,
|
|
12
12
|
EVENT_CANCEL: `${prefix} event cancel`,
|
|
13
|
+
EVENT_GET: `${prefix} event get`,
|
|
13
14
|
EVENT_LIST: `${prefix} event list`,
|
|
14
15
|
EVENT_REMOVE: `${prefix} event remove`,
|
|
15
16
|
MAIL_SEARCHFOLDER_ADD: `${prefix} mail searchfolder add`,
|
|
@@ -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
|