@pnp/cli-microsoft365 5.9.0-beta.1713b46 → 5.9.0-beta.1e08e6c
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/dist/m365/outlook/commands/mail/mail-send.js +54 -30
- package/dist/m365/pp/commands/card/card-get.js +110 -0
- package/dist/m365/pp/commands/gateway/gateway-get.js +70 -0
- package/dist/m365/pp/commands/solution/solution-get.js +117 -0
- package/dist/m365/pp/commands.js +3 -0
- package/dist/m365/todo/commands/task/task-add.js +55 -3
- package/docs/docs/_clisettings.md +19 -0
- package/docs/docs/cmd/outlook/mail/mail-send.md +13 -0
- package/docs/docs/cmd/pp/card/card-get.md +51 -0
- package/docs/docs/cmd/pp/gateway/gateway-get.md +24 -0
- package/docs/docs/cmd/pp/solution/solution-get.md +51 -0
- package/docs/docs/cmd/todo/task/task-add.md +32 -5
- package/package.json +3 -1
|
@@ -15,10 +15,13 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _OutlookMailSendCommand_instances, _OutlookMailSendCommand_initTelemetry, _OutlookMailSendCommand_initOptions, _OutlookMailSendCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const fs = require("fs");
|
|
19
|
+
const path = require("path");
|
|
18
20
|
const Auth_1 = require("../../../../Auth");
|
|
19
21
|
const request_1 = require("../../../../request");
|
|
20
22
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
21
23
|
const commands_1 = require("../../commands");
|
|
24
|
+
const validation_1 = require("../../../../utils/validation");
|
|
22
25
|
class OutlookMailSendCommand extends GraphCommand_1.default {
|
|
23
26
|
constructor() {
|
|
24
27
|
super();
|
|
@@ -37,7 +40,6 @@ class OutlookMailSendCommand extends GraphCommand_1.default {
|
|
|
37
40
|
return [commands_1.default.SENDMAIL];
|
|
38
41
|
}
|
|
39
42
|
commandAction(logger, args) {
|
|
40
|
-
var _a, _b;
|
|
41
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
44
|
try {
|
|
43
45
|
const isAppOnlyAuth = Auth_1.Auth.isAppOnlyAuth(Auth_1.default.service.accessTokens[this.resource].accessToken);
|
|
@@ -51,28 +53,8 @@ class OutlookMailSendCommand extends GraphCommand_1.default {
|
|
|
51
53
|
'content-type': 'application/json'
|
|
52
54
|
},
|
|
53
55
|
responseType: 'json',
|
|
54
|
-
data:
|
|
55
|
-
message: {
|
|
56
|
-
subject: args.options.subject,
|
|
57
|
-
body: {
|
|
58
|
-
contentType: args.options.bodyContentType || 'Text',
|
|
59
|
-
content: args.options.bodyContents
|
|
60
|
-
},
|
|
61
|
-
toRecipients: this.mapEmailAddressesToRecipients(args.options.to.split(',')),
|
|
62
|
-
ccRecipients: this.mapEmailAddressesToRecipients((_a = args.options.cc) === null || _a === void 0 ? void 0 : _a.split(',')),
|
|
63
|
-
bccRecipients: this.mapEmailAddressesToRecipients((_b = args.options.bcc) === null || _b === void 0 ? void 0 : _b.split(',')),
|
|
64
|
-
importance: args.options.importance
|
|
65
|
-
},
|
|
66
|
-
saveToSentItems: args.options.saveToSentItems
|
|
67
|
-
}
|
|
56
|
+
data: this.getRequestBody(args.options)
|
|
68
57
|
};
|
|
69
|
-
if (args.options.mailbox) {
|
|
70
|
-
requestOptions.data.message.from = {
|
|
71
|
-
emailAddress: {
|
|
72
|
-
address: args.options.mailbox
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
58
|
yield request_1.default.post(requestOptions);
|
|
77
59
|
}
|
|
78
60
|
catch (err) {
|
|
@@ -80,15 +62,40 @@ class OutlookMailSendCommand extends GraphCommand_1.default {
|
|
|
80
62
|
}
|
|
81
63
|
});
|
|
82
64
|
}
|
|
83
|
-
|
|
84
|
-
if (!
|
|
85
|
-
return
|
|
65
|
+
mapEmailAddressToRecipient(email) {
|
|
66
|
+
if (!email) {
|
|
67
|
+
return undefined;
|
|
86
68
|
}
|
|
87
|
-
return
|
|
69
|
+
return {
|
|
88
70
|
emailAddress: {
|
|
89
71
|
address: email.trim()
|
|
90
72
|
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
getRequestBody(options) {
|
|
76
|
+
var _a, _b;
|
|
77
|
+
const attachments = typeof options.attachment === 'string' ? [options.attachment] : options.attachment;
|
|
78
|
+
const attachmentContents = attachments === null || attachments === void 0 ? void 0 : attachments.map(a => ({
|
|
79
|
+
'@odata.type': '#microsoft.graph.fileAttachment',
|
|
80
|
+
name: path.basename(a),
|
|
81
|
+
contentBytes: fs.readFileSync(a, { encoding: 'base64' })
|
|
91
82
|
}));
|
|
83
|
+
return ({
|
|
84
|
+
message: {
|
|
85
|
+
subject: options.subject,
|
|
86
|
+
body: {
|
|
87
|
+
contentType: options.bodyContentType || 'Text',
|
|
88
|
+
content: options.bodyContents
|
|
89
|
+
},
|
|
90
|
+
from: this.mapEmailAddressToRecipient(options.mailbox),
|
|
91
|
+
toRecipients: options.to.split(',').map(mail => this.mapEmailAddressToRecipient(mail)),
|
|
92
|
+
ccRecipients: (_a = options.cc) === null || _a === void 0 ? void 0 : _a.split(',').map(mail => this.mapEmailAddressToRecipient(mail)),
|
|
93
|
+
bccRecipients: (_b = options.bcc) === null || _b === void 0 ? void 0 : _b.split(',').map(mail => this.mapEmailAddressToRecipient(mail)),
|
|
94
|
+
importance: options.importance,
|
|
95
|
+
attachments: attachmentContents
|
|
96
|
+
},
|
|
97
|
+
saveToSentItems: options.saveToSentItems
|
|
98
|
+
});
|
|
92
99
|
}
|
|
93
100
|
}
|
|
94
101
|
_OutlookMailSendCommand_instances = new WeakSet(), _OutlookMailSendCommand_initTelemetry = function _OutlookMailSendCommand_initTelemetry() {
|
|
@@ -100,7 +107,8 @@ _OutlookMailSendCommand_instances = new WeakSet(), _OutlookMailSendCommand_initT
|
|
|
100
107
|
saveToSentItems: args.options.saveToSentItems,
|
|
101
108
|
importance: args.options.importance,
|
|
102
109
|
mailbox: typeof args.options.mailbox !== 'undefined',
|
|
103
|
-
sender: typeof args.options.sender !== 'undefined'
|
|
110
|
+
sender: typeof args.options.sender !== 'undefined',
|
|
111
|
+
attachment: typeof args.options.attachment !== 'undefined'
|
|
104
112
|
});
|
|
105
113
|
});
|
|
106
114
|
}, _OutlookMailSendCommand_initOptions = function _OutlookMailSendCommand_initOptions() {
|
|
@@ -124,6 +132,8 @@ _OutlookMailSendCommand_instances = new WeakSet(), _OutlookMailSendCommand_initT
|
|
|
124
132
|
}, {
|
|
125
133
|
option: '--importance [importance]',
|
|
126
134
|
autocomplete: ['low', 'normal', 'high']
|
|
135
|
+
}, {
|
|
136
|
+
option: '--attachment [attachment]'
|
|
127
137
|
}, {
|
|
128
138
|
option: '--saveToSentItems [saveToSentItems]'
|
|
129
139
|
});
|
|
@@ -134,14 +144,28 @@ _OutlookMailSendCommand_instances = new WeakSet(), _OutlookMailSendCommand_initT
|
|
|
134
144
|
args.options.bodyContentType !== 'HTML') {
|
|
135
145
|
return `${args.options.bodyContentType} is not a valid value for the bodyContentType option. Allowed values are Text|HTML`;
|
|
136
146
|
}
|
|
137
|
-
if (args.options.saveToSentItems &&
|
|
138
|
-
args.options.saveToSentItems !== 'true' &&
|
|
139
|
-
args.options.saveToSentItems !== 'false') {
|
|
147
|
+
if (args.options.saveToSentItems && !validation_1.validation.isValidBoolean(args.options.saveToSentItems)) {
|
|
140
148
|
return `${args.options.saveToSentItems} is not a valid value for the saveToSentItems option. Allowed values are true|false`;
|
|
141
149
|
}
|
|
142
150
|
if (args.options.importance && ['low', 'normal', 'high'].indexOf(args.options.importance) === -1) {
|
|
143
151
|
return `'${args.options.importance}' is not a valid value for the importance option. Allowed values are low|normal|high`;
|
|
144
152
|
}
|
|
153
|
+
if (args.options.attachment) {
|
|
154
|
+
const attachments = typeof args.options.attachment === 'string' ? [args.options.attachment] : args.options.attachment;
|
|
155
|
+
for (const attachment of attachments) {
|
|
156
|
+
if (!fs.existsSync(attachment)) {
|
|
157
|
+
return `File with path '${attachment}' was not found.`;
|
|
158
|
+
}
|
|
159
|
+
if (!fs.lstatSync(attachment).isFile()) {
|
|
160
|
+
return `'${attachment}' is not a file.`;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
const requestBody = this.getRequestBody(args.options);
|
|
164
|
+
// The max body size of the request is 4 194 304 chars before getting a 413 response
|
|
165
|
+
if (JSON.stringify(requestBody).length > 4194304) {
|
|
166
|
+
return 'Exceeded the max total size of attachments which is 3MB.';
|
|
167
|
+
}
|
|
168
|
+
}
|
|
145
169
|
return true;
|
|
146
170
|
}));
|
|
147
171
|
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
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");
|
|
14
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
|
+
};
|
|
16
|
+
var _PpCardGetCommand_instances, _PpCardGetCommand_initTelemetry, _PpCardGetCommand_initOptions, _PpCardGetCommand_initOptionSets, _PpCardGetCommand_initValidators;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const powerPlatform_1 = require("../../../../utils/powerPlatform");
|
|
19
|
+
const PowerPlatformCommand_1 = require("../../../base/PowerPlatformCommand");
|
|
20
|
+
const commands_1 = require("../../commands");
|
|
21
|
+
const request_1 = require("../../../../request");
|
|
22
|
+
const validation_1 = require("../../../../utils/validation");
|
|
23
|
+
class PpCardGetCommand extends PowerPlatformCommand_1.default {
|
|
24
|
+
constructor() {
|
|
25
|
+
super();
|
|
26
|
+
_PpCardGetCommand_instances.add(this);
|
|
27
|
+
__classPrivateFieldGet(this, _PpCardGetCommand_instances, "m", _PpCardGetCommand_initTelemetry).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _PpCardGetCommand_instances, "m", _PpCardGetCommand_initOptions).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _PpCardGetCommand_instances, "m", _PpCardGetCommand_initValidators).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _PpCardGetCommand_instances, "m", _PpCardGetCommand_initOptionSets).call(this);
|
|
31
|
+
}
|
|
32
|
+
get name() {
|
|
33
|
+
return commands_1.default.CARD_GET;
|
|
34
|
+
}
|
|
35
|
+
get description() {
|
|
36
|
+
return 'Get specific Microsoft Power Platform card in the specified Power Platform environment.';
|
|
37
|
+
}
|
|
38
|
+
defaultProperties() {
|
|
39
|
+
return ['name', 'cardid', 'publishdate', 'createdon', 'modifiedon'];
|
|
40
|
+
}
|
|
41
|
+
commandAction(logger, args) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
if (this.verbose) {
|
|
44
|
+
logger.logToStderr(`Retrieving a card '${args.options.id || args.options.name}'...`);
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.environment, args.options.asAdmin);
|
|
48
|
+
const res = yield this.getCard(dynamicsApiUrl, args.options);
|
|
49
|
+
logger.log(res);
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
this.handleRejectedODataJsonPromise(err);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
getCard(dynamicsApiUrl, options) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const requestOptions = {
|
|
59
|
+
headers: {
|
|
60
|
+
accept: 'application/json;odata.metadata=none'
|
|
61
|
+
},
|
|
62
|
+
responseType: 'json'
|
|
63
|
+
};
|
|
64
|
+
if (options.id) {
|
|
65
|
+
requestOptions.url = `${dynamicsApiUrl}/api/data/v9.1/cards(${options.id})`;
|
|
66
|
+
const result = yield request_1.default.get(requestOptions);
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
requestOptions.url = `${dynamicsApiUrl}/api/data/v9.1/cards?$filter=name eq '${options.name}'`;
|
|
70
|
+
const result = yield request_1.default.get(requestOptions);
|
|
71
|
+
if (result.value.length === 0) {
|
|
72
|
+
throw `The specified card '${options.name}' does not exist.`;
|
|
73
|
+
}
|
|
74
|
+
if (result.value.length > 1) {
|
|
75
|
+
throw `Multiple cards with name '${options.name}' found: ${result.value.map(x => x.cardid).join(',')}`;
|
|
76
|
+
}
|
|
77
|
+
return result.value[0];
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
_PpCardGetCommand_instances = new WeakSet(), _PpCardGetCommand_initTelemetry = function _PpCardGetCommand_initTelemetry() {
|
|
82
|
+
this.telemetry.push((args) => {
|
|
83
|
+
Object.assign(this.telemetryProperties, {
|
|
84
|
+
id: typeof args.options.id !== 'undefined',
|
|
85
|
+
name: typeof args.options.name !== 'undefined',
|
|
86
|
+
asAdmin: !!args.options.asAdmin
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
}, _PpCardGetCommand_initOptions = function _PpCardGetCommand_initOptions() {
|
|
90
|
+
this.options.unshift({
|
|
91
|
+
option: '-e, --environment <environment>'
|
|
92
|
+
}, {
|
|
93
|
+
option: '-i, --id [id]'
|
|
94
|
+
}, {
|
|
95
|
+
option: '-n, --name [name]'
|
|
96
|
+
}, {
|
|
97
|
+
option: '-a, --asAdmin'
|
|
98
|
+
});
|
|
99
|
+
}, _PpCardGetCommand_initOptionSets = function _PpCardGetCommand_initOptionSets() {
|
|
100
|
+
this.optionSets.push(['id', 'name']);
|
|
101
|
+
}, _PpCardGetCommand_initValidators = function _PpCardGetCommand_initValidators() {
|
|
102
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
if (args.options.id && !validation_1.validation.isValidGuid(args.options.id)) {
|
|
104
|
+
return `${args.options.id} is not a valid GUID`;
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
107
|
+
}));
|
|
108
|
+
};
|
|
109
|
+
module.exports = new PpCardGetCommand();
|
|
110
|
+
//# sourceMappingURL=card-get.js.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
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");
|
|
14
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
|
+
};
|
|
16
|
+
var _PpGatewayGetCommand_instances, _PpGatewayGetCommand_initOptions, _PpGatewayGetCommand_initValidators;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const request_1 = require("../../../../request");
|
|
19
|
+
const validation_1 = require("../../../../utils/validation");
|
|
20
|
+
const PowerBICommand_1 = require("../../../base/PowerBICommand");
|
|
21
|
+
const commands_1 = require("../../commands");
|
|
22
|
+
class PpGatewayGetCommand extends PowerBICommand_1.default {
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
_PpGatewayGetCommand_instances.add(this);
|
|
26
|
+
__classPrivateFieldGet(this, _PpGatewayGetCommand_instances, "m", _PpGatewayGetCommand_initOptions).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _PpGatewayGetCommand_instances, "m", _PpGatewayGetCommand_initValidators).call(this);
|
|
28
|
+
}
|
|
29
|
+
get name() {
|
|
30
|
+
return commands_1.default.GATEWAY_GET;
|
|
31
|
+
}
|
|
32
|
+
get description() {
|
|
33
|
+
return "Get information about the specified gateway.";
|
|
34
|
+
}
|
|
35
|
+
commandAction(logger, args) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
try {
|
|
38
|
+
const gateway = yield this.getGateway(args.options.id);
|
|
39
|
+
logger.log(gateway);
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
this.handleRejectedODataJsonPromise(error);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
getGateway(gatewayId) {
|
|
47
|
+
const requestOptions = {
|
|
48
|
+
url: `${this.resource}/v1.0/myorg/gateways/${encodeURIComponent(gatewayId)}`,
|
|
49
|
+
headers: {
|
|
50
|
+
accept: "application/json;odata.metadata=none"
|
|
51
|
+
},
|
|
52
|
+
responseType: "json"
|
|
53
|
+
};
|
|
54
|
+
return request_1.default.get(requestOptions);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
_PpGatewayGetCommand_instances = new WeakSet(), _PpGatewayGetCommand_initOptions = function _PpGatewayGetCommand_initOptions() {
|
|
58
|
+
this.options.unshift({
|
|
59
|
+
option: "-i, --id <id>"
|
|
60
|
+
});
|
|
61
|
+
}, _PpGatewayGetCommand_initValidators = function _PpGatewayGetCommand_initValidators() {
|
|
62
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
if (!validation_1.validation.isValidGuid(args.options.id)) {
|
|
64
|
+
return `${args.options.id} is not a valid GUID`;
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
}));
|
|
68
|
+
};
|
|
69
|
+
module.exports = new PpGatewayGetCommand();
|
|
70
|
+
//# sourceMappingURL=gateway-get.js.map
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
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");
|
|
14
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
|
+
};
|
|
16
|
+
var _PpSolutionGetCommand_instances, _PpSolutionGetCommand_initTelemetry, _PpSolutionGetCommand_initOptions, _PpSolutionGetCommand_initOptionSets, _PpSolutionGetCommand_initValidators;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const request_1 = require("../../../../request");
|
|
19
|
+
const powerPlatform_1 = require("../../../../utils/powerPlatform");
|
|
20
|
+
const validation_1 = require("../../../../utils/validation");
|
|
21
|
+
const PowerPlatformCommand_1 = require("../../../base/PowerPlatformCommand");
|
|
22
|
+
const commands_1 = require("../../commands");
|
|
23
|
+
class PpSolutionGetCommand extends PowerPlatformCommand_1.default {
|
|
24
|
+
constructor() {
|
|
25
|
+
super();
|
|
26
|
+
_PpSolutionGetCommand_instances.add(this);
|
|
27
|
+
__classPrivateFieldGet(this, _PpSolutionGetCommand_instances, "m", _PpSolutionGetCommand_initTelemetry).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _PpSolutionGetCommand_instances, "m", _PpSolutionGetCommand_initOptions).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _PpSolutionGetCommand_instances, "m", _PpSolutionGetCommand_initValidators).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _PpSolutionGetCommand_instances, "m", _PpSolutionGetCommand_initOptionSets).call(this);
|
|
31
|
+
}
|
|
32
|
+
get name() {
|
|
33
|
+
return commands_1.default.SOLUTION_GET;
|
|
34
|
+
}
|
|
35
|
+
get description() {
|
|
36
|
+
return 'Gets a specific solution in a given environment.';
|
|
37
|
+
}
|
|
38
|
+
defaultProperties() {
|
|
39
|
+
return ['uniquename', 'version', 'publisher'];
|
|
40
|
+
}
|
|
41
|
+
commandAction(logger, args) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
if (this.verbose) {
|
|
44
|
+
logger.logToStderr(`Retrieving a specific solution '${args.options.id || args.options.name}'...`);
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.environment, args.options.asAdmin);
|
|
48
|
+
const res = yield this.getSolution(dynamicsApiUrl, args.options);
|
|
49
|
+
if (!args.options.output || args.options.output === 'json') {
|
|
50
|
+
logger.log(res);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
// Converted to text friendly output
|
|
54
|
+
logger.log({
|
|
55
|
+
uniquename: res.uniquename,
|
|
56
|
+
version: res.version,
|
|
57
|
+
publisher: res.publisherid.friendlyname
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch (err) {
|
|
62
|
+
this.handleRejectedODataJsonPromise(err);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
getSolution(dynamicsApiUrl, options) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
const requestOptions = {
|
|
69
|
+
headers: {
|
|
70
|
+
accept: 'application/json;odata.metadata=none'
|
|
71
|
+
},
|
|
72
|
+
responseType: 'json'
|
|
73
|
+
};
|
|
74
|
+
if (options.id) {
|
|
75
|
+
requestOptions.url = `${dynamicsApiUrl}/api/data/v9.0/solutions(${options.id})?$expand=publisherid($select=friendlyname)&$select=solutionid,uniquename,version,publisherid,installedon,solutionpackageversion,friendlyname,versionnumber&api-version=9.1`;
|
|
76
|
+
const result = yield request_1.default.get(requestOptions);
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
requestOptions.url = `${dynamicsApiUrl}/api/data/v9.0/solutions?$filter=isvisible eq true and uniquename eq \'${options.name}\'&$expand=publisherid($select=friendlyname)&$select=solutionid,uniquename,version,publisherid,installedon,solutionpackageversion,friendlyname,versionnumber&api-version=9.1`;
|
|
80
|
+
const result = yield request_1.default.get(requestOptions);
|
|
81
|
+
if (result.value.length === 0) {
|
|
82
|
+
throw `The specified solution '${options.name}' does not exist.`;
|
|
83
|
+
}
|
|
84
|
+
return result.value[0];
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
_PpSolutionGetCommand_instances = new WeakSet(), _PpSolutionGetCommand_initTelemetry = function _PpSolutionGetCommand_initTelemetry() {
|
|
89
|
+
this.telemetry.push((args) => {
|
|
90
|
+
Object.assign(this.telemetryProperties, {
|
|
91
|
+
id: typeof args.options.id !== 'undefined',
|
|
92
|
+
name: typeof args.options.name !== 'undefined',
|
|
93
|
+
asAdmin: !!args.options.asAdmin
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
}, _PpSolutionGetCommand_initOptions = function _PpSolutionGetCommand_initOptions() {
|
|
97
|
+
this.options.unshift({
|
|
98
|
+
option: '-e, --environment <environment>'
|
|
99
|
+
}, {
|
|
100
|
+
option: '-i, --id [id]'
|
|
101
|
+
}, {
|
|
102
|
+
option: '-n, --name [name]'
|
|
103
|
+
}, {
|
|
104
|
+
option: '-a, --asAdmin'
|
|
105
|
+
});
|
|
106
|
+
}, _PpSolutionGetCommand_initOptionSets = function _PpSolutionGetCommand_initOptionSets() {
|
|
107
|
+
this.optionSets.push(['id', 'name']);
|
|
108
|
+
}, _PpSolutionGetCommand_initValidators = function _PpSolutionGetCommand_initValidators() {
|
|
109
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
if (args.options.id && !validation_1.validation.isValidGuid(args.options.id)) {
|
|
111
|
+
return `${args.options.id} is not a valid GUID`;
|
|
112
|
+
}
|
|
113
|
+
return true;
|
|
114
|
+
}));
|
|
115
|
+
};
|
|
116
|
+
module.exports = new PpSolutionGetCommand();
|
|
117
|
+
//# sourceMappingURL=solution-get.js.map
|
package/dist/m365/pp/commands.js
CHANGED
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const prefix = 'pp';
|
|
4
4
|
exports.default = {
|
|
5
|
+
CARD_GET: `${prefix} card get`,
|
|
5
6
|
CARD_LIST: `${prefix} card list`,
|
|
6
7
|
DATAVERSE_TABLE_LIST: `${prefix} dataverse table list`,
|
|
7
8
|
ENVIRONMENT_GET: `${prefix} environment get`,
|
|
8
9
|
ENVIRONMENT_LIST: `${prefix} environment list`,
|
|
10
|
+
GATEWAY_GET: `${prefix} gateway get`,
|
|
9
11
|
GATEWAY_LIST: `${prefix} gateway list`,
|
|
10
12
|
MANAGEMENTAPP_ADD: `${prefix} managementapp add`,
|
|
11
13
|
MANAGEMENTAPP_LIST: `${prefix} managementapp list`,
|
|
14
|
+
SOLUTION_GET: `${prefix} solution get`,
|
|
12
15
|
SOLUTION_LIST: `${prefix} solution list`,
|
|
13
16
|
TENANT_SETTINGS_LIST: `${prefix} tenant settings list`
|
|
14
17
|
};
|
|
@@ -13,9 +13,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
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");
|
|
14
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _TodoTaskAddCommand_instances, _TodoTaskAddCommand_initTelemetry, _TodoTaskAddCommand_initOptions, _TodoTaskAddCommand_initOptionSets;
|
|
16
|
+
var _TodoTaskAddCommand_instances, _TodoTaskAddCommand_initTelemetry, _TodoTaskAddCommand_initOptions, _TodoTaskAddCommand_initValidators, _TodoTaskAddCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
+
const validation_1 = require("../../../../utils/validation");
|
|
19
20
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
20
21
|
const commands_1 = require("../../commands");
|
|
21
22
|
class TodoTaskAddCommand extends GraphCommand_1.default {
|
|
@@ -24,6 +25,7 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
|
|
|
24
25
|
_TodoTaskAddCommand_instances.add(this);
|
|
25
26
|
__classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initTelemetry).call(this);
|
|
26
27
|
__classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initOptions).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initValidators).call(this);
|
|
27
29
|
__classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initOptionSets).call(this);
|
|
28
30
|
}
|
|
29
31
|
get name() {
|
|
@@ -33,6 +35,7 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
|
|
|
33
35
|
return 'Add a task to a Microsoft To Do task list';
|
|
34
36
|
}
|
|
35
37
|
commandAction(logger, args) {
|
|
38
|
+
var _a, _b;
|
|
36
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
40
|
const endpoint = `${this.resource}/v1.0`;
|
|
38
41
|
try {
|
|
@@ -44,7 +47,14 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
|
|
|
44
47
|
'Content-Type': 'application/json'
|
|
45
48
|
},
|
|
46
49
|
data: {
|
|
47
|
-
title: args.options.title
|
|
50
|
+
title: args.options.title,
|
|
51
|
+
body: {
|
|
52
|
+
content: args.options.bodyContent,
|
|
53
|
+
contentType: ((_a = args.options.bodyContentType) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || 'text'
|
|
54
|
+
},
|
|
55
|
+
importance: (_b = args.options.importance) === null || _b === void 0 ? void 0 : _b.toLowerCase(),
|
|
56
|
+
dueDateTime: this.getDateTimeTimeZone(args.options.dueDateTime),
|
|
57
|
+
reminderDateTime: this.getDateTimeTimeZone(args.options.reminderDateTime)
|
|
48
58
|
},
|
|
49
59
|
responseType: 'json'
|
|
50
60
|
};
|
|
@@ -56,6 +66,15 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
|
|
|
56
66
|
}
|
|
57
67
|
});
|
|
58
68
|
}
|
|
69
|
+
getDateTimeTimeZone(dateTime) {
|
|
70
|
+
if (!dateTime) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
dateTime: dateTime,
|
|
75
|
+
timeZone: 'Etc/GMT'
|
|
76
|
+
};
|
|
77
|
+
}
|
|
59
78
|
getTodoListId(args) {
|
|
60
79
|
if (args.options.listId) {
|
|
61
80
|
return Promise.resolve(args.options.listId);
|
|
@@ -81,7 +100,12 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
|
|
|
81
100
|
this.telemetry.push((args) => {
|
|
82
101
|
Object.assign(this.telemetryProperties, {
|
|
83
102
|
listId: typeof args.options.listId !== 'undefined',
|
|
84
|
-
listName: typeof args.options.listName !== 'undefined'
|
|
103
|
+
listName: typeof args.options.listName !== 'undefined',
|
|
104
|
+
bodyContent: typeof args.options.bodyContent !== 'undefined',
|
|
105
|
+
bodyContentType: args.options.bodyContentType,
|
|
106
|
+
dueDateTime: typeof args.options.dueDateTime !== 'undefined',
|
|
107
|
+
importance: args.options.importance,
|
|
108
|
+
reminderDateTime: typeof args.options.reminderDateTime !== 'undefined'
|
|
85
109
|
});
|
|
86
110
|
});
|
|
87
111
|
}, _TodoTaskAddCommand_initOptions = function _TodoTaskAddCommand_initOptions() {
|
|
@@ -91,7 +115,35 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
|
|
|
91
115
|
option: '--listName [listName]'
|
|
92
116
|
}, {
|
|
93
117
|
option: '--listId [listId]'
|
|
118
|
+
}, {
|
|
119
|
+
option: '--bodyContent [bodyContent]'
|
|
120
|
+
}, {
|
|
121
|
+
option: '--bodyContentType [bodyContentType]',
|
|
122
|
+
autocomplete: ['text', 'html']
|
|
123
|
+
}, {
|
|
124
|
+
option: '--dueDateTime [dueDateTime]'
|
|
125
|
+
}, {
|
|
126
|
+
option: '--importance [importance]',
|
|
127
|
+
autocomplete: ['low', 'normal', 'high']
|
|
128
|
+
}, {
|
|
129
|
+
option: '--reminderDateTime [reminderDateTime]'
|
|
94
130
|
});
|
|
131
|
+
}, _TodoTaskAddCommand_initValidators = function _TodoTaskAddCommand_initValidators() {
|
|
132
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
if (args.options.bodyContentType && ['text', 'html'].indexOf(args.options.bodyContentType.toLowerCase()) === -1) {
|
|
134
|
+
return `'${args.options.bodyContentType}' is not a valid value for the bodyContentType option. Allowed values are text|html`;
|
|
135
|
+
}
|
|
136
|
+
if (args.options.importance && ['low', 'normal', 'high'].indexOf(args.options.importance.toLowerCase()) === -1) {
|
|
137
|
+
return `'${args.options.importance}' is not a valid value for the importance option. Allowed values are low|normal|high`;
|
|
138
|
+
}
|
|
139
|
+
if (args.options.dueDateTime && !validation_1.validation.isValidISODateTime(args.options.dueDateTime)) {
|
|
140
|
+
return `'${args.options.dueDateTime}' is not a valid ISO date string`;
|
|
141
|
+
}
|
|
142
|
+
if (args.options.reminderDateTime && !validation_1.validation.isValidISODateTime(args.options.reminderDateTime)) {
|
|
143
|
+
return `'${args.options.reminderDateTime}' is not a valid ISO date string`;
|
|
144
|
+
}
|
|
145
|
+
return true;
|
|
146
|
+
}));
|
|
95
147
|
}, _TodoTaskAddCommand_initOptionSets = function _TodoTaskAddCommand_initOptionSets() {
|
|
96
148
|
this.optionSets.push(['listId', 'listName']);
|
|
97
149
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
## Available settings
|
|
2
|
+
|
|
3
|
+
Following is the list of configuration settings available in CLI for Microsoft 365.
|
|
4
|
+
|
|
5
|
+
Setting name|Definition|Default value
|
|
6
|
+
------------|----------|-------------
|
|
7
|
+
`autoOpenBrowserOnLogin`|Automatically open the browser to the Azure AD login page after running `m365 login` command in device code mode. This setting will be replaced by `autoOpenLinksInBrowser` in the next major release.|`false`
|
|
8
|
+
`autoOpenLinksInBrowser`|Automatically open the browser for all commands which return a url and expect the user to copy paste this to the browser. For example when logging in, using `m365 login` in device code mode. This setting will replace `autoOpenBrowserOnLogin` in the next major release.|`false`
|
|
9
|
+
`copyDeviceCodeToClipboard`|Automatically copy the device code to the clipboard when running `m365 login` command in device code mode|`false`
|
|
10
|
+
`csvEscape`|Single character used for escaping; only apply to characters matching the quote and the escape options|`"`
|
|
11
|
+
`csvHeader`|Display the column names on the first line|`true`
|
|
12
|
+
`csvQuote`|The quote characters surrounding a field. An empty quote value will preserve the original field, whether it contains quotation marks or not.|` `
|
|
13
|
+
`csvQuoted`|Quote all the non-empty fields even if not required|`false`
|
|
14
|
+
`csvQuotedEmpty`|Quote empty strings and overrides quoted_string on empty strings when defined|`false`
|
|
15
|
+
`errorOutput`|Defines if errors should be written to `stdout` or `stderr`|`stderr`
|
|
16
|
+
`output`|Defines the default output when issuing a command|`json`
|
|
17
|
+
`printErrorsAsPlainText`|When output mode is set to `json`, print error messages as plain-text rather than JSON|`true`
|
|
18
|
+
`prompt`|Prompts for missing values in required options|`false`
|
|
19
|
+
`showHelpOnFailure`|Automatically display help when executing a command failed|`true`
|
|
@@ -43,6 +43,9 @@ m365 outlook sendmail [options]
|
|
|
43
43
|
`--importance [importance]`
|
|
44
44
|
: The importance of the message. Available options: `low`, `normal` or `high`. Default is `normal`.
|
|
45
45
|
|
|
46
|
+
`--attachment [attachment]`
|
|
47
|
+
: Path to the file that will be added as attachment to the email. This option can be used multiple times to attach multiple attachments.
|
|
48
|
+
|
|
46
49
|
`--saveToSentItems [saveToSentItems]`
|
|
47
50
|
: Save email in the sent items folder. Default `true`.
|
|
48
51
|
|
|
@@ -50,6 +53,10 @@ m365 outlook sendmail [options]
|
|
|
50
53
|
|
|
51
54
|
## Remarks
|
|
52
55
|
|
|
56
|
+
### Attachments
|
|
57
|
+
|
|
58
|
+
When using the `attachment` option, note that the total size of all attachment files cannot exceed 3 MB.
|
|
59
|
+
|
|
53
60
|
### If you are connected using app only authentication
|
|
54
61
|
|
|
55
62
|
- Always specify a user id or upn in the `--sender` option. The email will be sent as if it came from the specified user, and can optionally be saved in the sent folder of that user account.
|
|
@@ -116,3 +123,9 @@ Send an email with cc and bcc recipients marked as important
|
|
|
116
123
|
```sh
|
|
117
124
|
m365 outlook mail send --to chris@contoso.com --cc claire@contoso.com --bcc randy@contoso.com --subject "DG2000 Data Sheets" --bodyContents "The latest data sheets are in the team site" --importance high
|
|
118
125
|
```
|
|
126
|
+
|
|
127
|
+
Send an email with multiple attachments
|
|
128
|
+
|
|
129
|
+
```sh
|
|
130
|
+
m365 outlook mail send --to chris@contoso.com --subject "Monthly reports" --bodyContents "Here are the reports of this month." --attachment "C:/Reports/File1.jpg" --attachment "C:/Reports/File2.docx" --attachment "C:/Reports/File3.xlsx"
|
|
131
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# pp card get
|
|
2
|
+
|
|
3
|
+
Gets a specific Microsoft Power Platform card in the specified Power Platform environment
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pp card get [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-e, --environment <environment>`
|
|
14
|
+
: The name of the environment.
|
|
15
|
+
|
|
16
|
+
`-i, --id [id]`
|
|
17
|
+
: The id of the card. Specify either `id` or `name` but not both.
|
|
18
|
+
|
|
19
|
+
`-n, --name [name]`
|
|
20
|
+
: The name of the card. Specify either `id` or `name` but not both.
|
|
21
|
+
|
|
22
|
+
`-a, --asAdmin`
|
|
23
|
+
: Run the command as admin for environments you do not have explicitly assigned permissions to.
|
|
24
|
+
|
|
25
|
+
--8<-- "docs/cmd/_global.md"
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
Get a specific card in a specific environment based on name
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
m365 pp card get --environment "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --name "CLI 365 Card"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Get a specific card in a specific environment based on name as admin
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 pp card get --environment "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --name "CLI 365 Card" --asAdmin
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Get a specific card in a specific environment based on id
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 pp card get --environment "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --id "408e3f42-4c9e-4c93-8aaf-3cbdea9179aa"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Get a specific card in a specific environment based on id as admin
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 pp card get --environment "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --id "408e3f42-4c9e-4c93-8aaf-3cbdea9179aa" --asAdmin
|
|
51
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# pp gateway get
|
|
2
|
+
|
|
3
|
+
Get information about the specified gateway
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 pp gateway get [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-i, --id <id>`
|
|
14
|
+
: ID of the Gateway.
|
|
15
|
+
|
|
16
|
+
--8<-- "docs/cmd/_global.md"
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
Get information about the specified gateway.
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
m365 pp gateway get --id 1f69e798-5852-4fdd-ab01-33bb14b6e934
|
|
24
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# pp solution get
|
|
2
|
+
|
|
3
|
+
Gets a specific solution in a given environment.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 pp solution get [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-e, --environment <environment>`
|
|
14
|
+
: The name of the environment.
|
|
15
|
+
|
|
16
|
+
`-i --id [id]`
|
|
17
|
+
: The ID of the solution. Specify either `id` or `name` but not both.
|
|
18
|
+
|
|
19
|
+
`-n, --name [name]`
|
|
20
|
+
: The unique name (not the display name) of the solution. Specify either `id` or `name` but not both.
|
|
21
|
+
|
|
22
|
+
`-a, --asAdmin`
|
|
23
|
+
: Run the command as admin for environments you do not have explicitly assigned permissions to.
|
|
24
|
+
|
|
25
|
+
--8<-- "docs/cmd/_global.md"
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
Gets a specific solution in a specific environment based on name
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
m365 pp solution get --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "Default"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Gets a specific solution in a specific environment based on name as Admin
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 pp solution get --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --name "Default" --asAdmin
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Gets a specific solution in a specific environment based on id
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 pp solution get --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --id "ee62fd63-e49e-4c09-80de-8fae1b9a427e"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Gets a specific solution in a specific environment based on id as Admin
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 pp solution get --environment "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --id "ee62fd63-e49e-4c09-80de-8fae1b9a427e" --asAdmin
|
|
51
|
+
```
|
|
@@ -11,26 +11,53 @@ m365 todo task add [options]
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
13
|
`-t, --title <title>`
|
|
14
|
-
: The title of the task
|
|
14
|
+
: The title of the task.
|
|
15
15
|
|
|
16
16
|
`--listName [listName]`
|
|
17
|
-
: The name of the list in which to create the task. Specify either `listName` or `listId` but not both
|
|
17
|
+
: The name of the list in which to create the task. Specify either `listName` or `listId` but not both.
|
|
18
18
|
|
|
19
19
|
`--listId [listId]`
|
|
20
|
-
: The id of the list in which to create the task. Specify either `listName` or `listId` but not both
|
|
20
|
+
: The id of the list in which to create the task. Specify either `listName` or `listId` but not both.
|
|
21
|
+
|
|
22
|
+
`--bodyContent [bodyContent]`
|
|
23
|
+
: The body content of the task. In the UI this is called 'notes'.
|
|
24
|
+
|
|
25
|
+
`--bodyContentType [bodyContentType]`
|
|
26
|
+
: The type of the body content. Possible values are `text` and `html`. Default is `text`.
|
|
27
|
+
|
|
28
|
+
`--dueDateTime [dueDateTime]`
|
|
29
|
+
: The date when the task is due. This should be defined as a valid ISO 8601 string in the UTC time zone. Only date value is needed, time value is always ignored.
|
|
30
|
+
|
|
31
|
+
`--importance [importance]`
|
|
32
|
+
: The importance of the task. Possible values are: `low`, `normal`, `high`. Default is `normal`.
|
|
33
|
+
|
|
34
|
+
`--reminderDateTime [reminderDateTime]`
|
|
35
|
+
: The date and time for a reminder alert of the task to occur. This should be defined as a valid ISO 8601 string in the UTC time zone.
|
|
21
36
|
|
|
22
37
|
--8<-- "docs/cmd/_global.md"
|
|
23
38
|
|
|
24
39
|
## Examples
|
|
25
40
|
|
|
26
|
-
Add a task
|
|
41
|
+
Add a task to Microsoft To Do tasks list with with a specific name
|
|
27
42
|
|
|
28
43
|
```sh
|
|
29
44
|
m365 todo task add --title "New task" --listName "My task list"
|
|
30
45
|
```
|
|
31
46
|
|
|
32
|
-
Add a task
|
|
47
|
+
Add a task to a Microsoft To Do tasks list with a specific id
|
|
33
48
|
|
|
34
49
|
```sh
|
|
35
50
|
m365 todo task add --title "New task" --listId "AQMkADlhMTRkOGEzLWQ1M2QtNGVkNS04NjdmLWU0NzJhMjZmZWNmMwAuAAADKvwNgAMNPE_zFNRJXVrU1wEAhHKQZHItDEOVCn8U3xuA2AABmQeVPwAAAA=="
|
|
36
51
|
```
|
|
52
|
+
|
|
53
|
+
Create a new task with bodyContent and reminder and flag it as important
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
m365 todo task add --title "New task" --listName "My task list" --bodyContent "I should not forget this" --reminderDateTime 2023-01-01T12:00:00Z --importance high
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Create a new task with a specific due date
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
m365 todo task add --title "New task" --listId "AQMkADlhMTRkOGEzLWQ1M2QtNGVkNS04NjdmLWU0NzJhMjZmZWNmMwAuAAADKvwNgAMNPE_zFNRJXVrU1wEAhHKQZHItDEOVCn8U3xuA2AABmQeVPwAAAA==" --dueDateTime 2023-01-01
|
|
63
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnp/cli-microsoft365",
|
|
3
|
-
"version": "5.9.0-beta.
|
|
3
|
+
"version": "5.9.0-beta.1e08e6c",
|
|
4
4
|
"description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/api.js",
|
|
@@ -117,6 +117,7 @@
|
|
|
117
117
|
"Choudhary, Karnail Singh <pradhankarnail@gmail.com>",
|
|
118
118
|
"Connell, Andrew <me@andrewconnell.com>",
|
|
119
119
|
"Conor O'Callaghan <brioscaibriste@gmail.com>",
|
|
120
|
+
"De Cleyre, Nico <nico.de.cleyre@gmail.com>",
|
|
120
121
|
"Deshpande, Vardhaman <vardhaman.rd@gmail.com>",
|
|
121
122
|
"Dyjas, Robert <15113729+robdy@users.noreply.github.com>",
|
|
122
123
|
"Faleel, Mohamed Ashiq <ashiqf@gmail.com>",
|
|
@@ -158,6 +159,7 @@
|
|
|
158
159
|
"Mücklisch, Steve <steve.muecklisch@gmail.com>",
|
|
159
160
|
"Nachan, Nanddeep <nanddeepnachan@gmail.com>",
|
|
160
161
|
"Nachan, Smita <smita.nachan@gmail.com>",
|
|
162
|
+
"Nadir, Daniaal <daniaal1030@gmail.com>",
|
|
161
163
|
"Nikolić, Aleksandar <alexandair@live.com>",
|
|
162
164
|
"Otto <berot3@gmail.com>",
|
|
163
165
|
"Pandey, Vividh <vividh.pandey.13@gmail.com>",
|