@pnp/cli-microsoft365 5.0.0-beta.2df6db4 → 5.0.0-beta.460e9b7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.js CHANGED
@@ -23,6 +23,7 @@ const dictionary = [
23
23
  'group',
24
24
  'groupify',
25
25
  'guest',
26
+ 'health',
26
27
  'hide',
27
28
  'historical',
28
29
  'home',
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const request_1 = require("../../../../request");
4
+ const GraphCommand_1 = require("../../../base/GraphCommand");
5
+ const commands_1 = require("../../commands");
6
+ class TenantServiceAnnouncementHealthIssueGetCommand extends GraphCommand_1.default {
7
+ get name() {
8
+ return commands_1.default.SERVICEANNOUNCEMENT_HEALTHISSUE_GET;
9
+ }
10
+ get description() {
11
+ return 'Gets a specified service health issue for tenant';
12
+ }
13
+ commandAction(logger, args, cb) {
14
+ const requestOptions = {
15
+ url: `${this.resource}/v1.0/admin/serviceAnnouncement/issues/${encodeURIComponent(args.options.id)}`,
16
+ headers: {
17
+ accept: 'application/json;odata.metadata=none'
18
+ },
19
+ responseType: 'json'
20
+ };
21
+ request_1.default
22
+ .get(requestOptions)
23
+ .then((res) => {
24
+ logger.log(res);
25
+ cb();
26
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
27
+ }
28
+ options() {
29
+ const options = [
30
+ {
31
+ option: '-i, --id <id>'
32
+ }
33
+ ];
34
+ const parentOptions = super.options();
35
+ return options.concat(parentOptions);
36
+ }
37
+ }
38
+ module.exports = new TenantServiceAnnouncementHealthIssueGetCommand();
39
+ //# sourceMappingURL=serviceannouncement-healthissue-get.js.map
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const GraphItemsListCommand_1 = require("../../../base/GraphItemsListCommand");
4
+ const commands_1 = require("../../commands");
5
+ class TenantServiceAnnouncementHealthIssueListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
6
+ get name() {
7
+ return commands_1.default.SERVICEANNOUNCEMENT_HEALTHISSUE_LIST;
8
+ }
9
+ get description() {
10
+ return 'Gets all service health issues for the tenant';
11
+ }
12
+ defaultProperties() {
13
+ return ['id', 'title'];
14
+ }
15
+ commandAction(logger, args, cb) {
16
+ let endpoint = `${this.resource}/v1.0/admin/serviceAnnouncement/issues`;
17
+ if (args.options.service) {
18
+ endpoint += `?$filter=service eq '${encodeURIComponent(args.options.service)}'`;
19
+ }
20
+ this
21
+ .getAllItems(endpoint, logger, true)
22
+ .then(() => {
23
+ logger.log(this.items);
24
+ cb();
25
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
26
+ }
27
+ options() {
28
+ const options = [
29
+ {
30
+ option: '-s, --service [service]'
31
+ }
32
+ ];
33
+ const parentOptions = super.options();
34
+ return options.concat(parentOptions);
35
+ }
36
+ }
37
+ module.exports = new TenantServiceAnnouncementHealthIssueListCommand();
38
+ //# sourceMappingURL=serviceannouncement-healthissue-list.js.map
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const request_1 = require("../../../../request");
4
+ const GraphCommand_1 = require("../../../base/GraphCommand");
5
+ const commands_1 = require("../../commands");
6
+ class TenantServiceAnnouncementMessageGetCommand extends GraphCommand_1.default {
7
+ get name() {
8
+ return commands_1.default.SERVICEANNOUNCEMENT_MESSAGE_GET;
9
+ }
10
+ get description() {
11
+ return 'Retrieves a specified service update message for the tenant';
12
+ }
13
+ commandAction(logger, args, cb) {
14
+ if (this.verbose) {
15
+ logger.logToStderr(`Retrieving service update message ${args.options.id}`);
16
+ }
17
+ const requestOptions = {
18
+ url: `${this.resource}/v1.0/admin/serviceAnnouncement/messages/${args.options.id}`,
19
+ headers: {
20
+ accept: 'application/json;odata.metadata=none'
21
+ },
22
+ responseType: 'json'
23
+ };
24
+ request_1.default
25
+ .get(requestOptions)
26
+ .then((res) => {
27
+ logger.log(res);
28
+ cb();
29
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
30
+ }
31
+ options() {
32
+ const options = [
33
+ {
34
+ option: '-i, --id <id>'
35
+ }
36
+ ];
37
+ const parentOptions = super.options();
38
+ return options.concat(parentOptions);
39
+ }
40
+ isValidId(id) {
41
+ return (/MC\d{6}/).test(id);
42
+ }
43
+ validate(args) {
44
+ if (!this.isValidId(args.options.id)) {
45
+ return `${args.options.id} is not a valid message ID`;
46
+ }
47
+ return true;
48
+ }
49
+ }
50
+ module.exports = new TenantServiceAnnouncementMessageGetCommand();
51
+ //# sourceMappingURL=serviceannouncement-message-get.js.map
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const GraphItemsListCommand_1 = require("../../../base/GraphItemsListCommand");
4
+ const commands_1 = require("../../commands");
5
+ class TenantServiceAnnouncementMessageListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
6
+ get name() {
7
+ return commands_1.default.SERVICEANNOUNCEMENT_MESSAGE_LIST;
8
+ }
9
+ get description() {
10
+ return 'Gets all service update messages for the tenant';
11
+ }
12
+ defaultProperties() {
13
+ return ['id', 'title'];
14
+ }
15
+ commandAction(logger, args, cb) {
16
+ let endpoint = `${this.resource}/v1.0/admin/serviceAnnouncement/messages`;
17
+ if (args.options.service) {
18
+ endpoint += `?$filter=services/any(c:c+eq+'${encodeURIComponent(args.options.service)}')`;
19
+ }
20
+ this
21
+ .getAllItems(endpoint, logger, true)
22
+ .then(() => {
23
+ logger.log(this.items);
24
+ cb();
25
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
26
+ }
27
+ options() {
28
+ const options = [
29
+ {
30
+ option: '-s, --service [service]'
31
+ }
32
+ ];
33
+ const parentOptions = super.options();
34
+ return options.concat(parentOptions);
35
+ }
36
+ }
37
+ module.exports = new TenantServiceAnnouncementMessageListCommand();
38
+ //# sourceMappingURL=serviceannouncement-message-list.js.map
@@ -10,11 +10,15 @@ exports.default = {
10
10
  REPORT_OFFICE365ACTIVATIONSUSERDETAIL: `${prefix} report office365activationsuserdetail`,
11
11
  REPORT_OFFICE365ACTIVATIONSUSERCOUNTS: `${prefix} report office365activationsusercounts`,
12
12
  REPORT_SERVICESUSERCOUNTS: `${prefix} report servicesusercounts`,
13
+ SERVICEANNOUNCEMENT_HEALTHISSUE_GET: `${prefix} serviceannouncement healthissue get`,
13
14
  SERVICE_LIST: `${prefix} service list`,
14
15
  SERVICE_MESSAGE_LIST: `${prefix} service message list`,
15
16
  SERVICE_REPORT_HISTORICALSERVICESTATUS: `${prefix} service report historicalservicestatus`,
16
17
  SERVICEANNOUNCEMENT_HEALTH_GET: `${prefix} serviceannouncement health get`,
17
18
  SERVICEANNOUNCEMENT_HEALTH_LIST: `${prefix} serviceannouncement health list`,
19
+ SERVICEANNOUNCEMENT_HEALTHISSUE_LIST: `${prefix} serviceannouncement healthissue list`,
20
+ SERVICEANNOUNCEMENT_MESSAGE_GET: `${prefix} serviceannouncement message get`,
21
+ SERVICEANNOUNCEMENT_MESSAGE_LIST: `${prefix} serviceannouncement message list`,
18
22
  STATUS_LIST: `${prefix} status list`
19
23
  };
20
24
  //# sourceMappingURL=commands.js.map
@@ -0,0 +1,24 @@
1
+ # tenant serviceannouncement healthissue get
2
+
3
+ Gets a specified service health issue for tenant.
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 tenant serviceannouncement healthissue get [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-i, --id <id>`
14
+ : The issue id to get details for
15
+
16
+ --8<-- "docs/cmd/_global.md"
17
+
18
+ ## Examples
19
+
20
+ Gets information about issue with ID _MO226784_
21
+
22
+ ```sh
23
+ m365 tenant serviceannouncement healthissue get --id MO226784
24
+ ```
@@ -0,0 +1,34 @@
1
+ # tenant serviceannouncement healthissue list
2
+
3
+ Gets all service health issues for the tenant.
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 tenant serviceannouncement healthissue list [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-s, --service [service]`
14
+ : Retrieve service health issues for the particular service. If not provided, retrieves health issues for all services
15
+
16
+ --8<-- "docs/cmd/\_global.md"
17
+
18
+ ## Examples
19
+
20
+ Get service health issues of all services in Microsoft 365
21
+
22
+ ```sh
23
+ m365 tenant serviceannouncement healthissue list
24
+ ```
25
+
26
+ Get service health issues for Microsoft Forms
27
+
28
+ ```sh
29
+ m365 tenant serviceannouncement healthissue list --service "Microsoft Forms"
30
+ ```
31
+
32
+ ## More information
33
+
34
+ - List serviceAnnouncement issues: [https://docs.microsoft.com/en-us/graph/api/serviceannouncement-list-issues](https://docs.microsoft.com/en-us/graph/api/serviceannouncement-list-issues)
@@ -0,0 +1,28 @@
1
+ # tenant serviceannouncement message get
2
+
3
+ Retrieves a specified service update message for the tenant
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 tenant serviceannouncement message get [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-i, --id <id>`
14
+ : The ID of the service update message.
15
+
16
+ --8<-- "docs/cmd/_global.md"
17
+
18
+ ## Examples
19
+
20
+ Get service update message with ID MC001337
21
+
22
+ ```sh
23
+ m365 tenant serviceannouncement message get --id MC001337
24
+ ```
25
+
26
+ ## More information
27
+
28
+ - Microsoft Graph REST API reference: [https://docs.microsoft.com/en-us/graph/api/serviceupdatemessage-get](https://docs.microsoft.com/en-us/graph/api/serviceupdatemessage-get)
@@ -0,0 +1,34 @@
1
+ # tenant serviceannouncement message list
2
+
3
+ Gets all service update messages for the tenant.
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 tenant serviceannouncement message list [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-s, --service [service]`
14
+ : Retrieve service update messages for the particular service. If not provided, retrieves messages for all services
15
+
16
+ --8<-- "docs/cmd/\_global.md"
17
+
18
+ ## Examples
19
+
20
+ Get service update messages of all services in Microsoft 365
21
+
22
+ ```sh
23
+ m365 tenant serviceannouncement message list
24
+ ```
25
+
26
+ Get service update messages for Microsoft Teams
27
+
28
+ ```sh
29
+ m365 tenant serviceannouncement message list --service "Microsoft Teams"
30
+ ```
31
+
32
+ ## More information
33
+
34
+ - List serviceAnnouncement messages: [https://docs.microsoft.com/en-us/graph/api/serviceannouncement-list-messages](https://docs.microsoft.com/en-us/graph/api/serviceannouncement-list-messages)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "5.0.0-beta.2df6db4",
3
+ "version": "5.0.0-beta.460e9b7",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",