@pnp/cli-microsoft365 5.0.0-beta.d025005 → 5.0.0-beta.ef2dfe7

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.
Files changed (42) hide show
  1. package/.devcontainer/devcontainer.json +12 -9
  2. package/.eslintrc.js +1 -0
  3. package/.mocharc.json +9 -0
  4. package/README.md +2 -2
  5. package/dist/Command.js +1 -1
  6. package/dist/m365/aad/commands/app/app-delete.js +123 -0
  7. package/dist/m365/aad/commands/app/app-get.js +56 -11
  8. package/dist/m365/aad/commands/app/app-set.js +98 -3
  9. package/dist/m365/aad/commands/group/group-list.js +14 -1
  10. package/dist/m365/aad/commands/o365group/o365group-conversation-list.js +41 -0
  11. package/dist/m365/aad/commands.js +2 -0
  12. package/dist/m365/outlook/commands/room/room-list.js +43 -0
  13. package/dist/m365/outlook/commands/roomlist/roomlist-list.js +25 -0
  14. package/dist/m365/outlook/commands.js +2 -0
  15. package/dist/m365/planner/commands/task/task-get.js +1 -1
  16. package/dist/m365/planner/commands/task/task-list.js +37 -7
  17. package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.14.0-rc.2.js → upgrade-1.14.0.js} +25 -25
  18. package/dist/m365/spfx/commands/project/project-upgrade.js +13 -15
  19. package/dist/m365/spfx/commands/spfx-doctor.js +25 -6
  20. package/dist/m365/spo/commands/group/group-user-add.js +15 -8
  21. package/dist/m365/teams/commands/app/app-install.js +75 -21
  22. package/dist/m365/teams/commands/app/app-update.js +55 -12
  23. package/dist/m365/teams/commands/channel/channel-get.js +29 -7
  24. package/dist/m365/teams/commands/chat/chat-message-send.js +225 -0
  25. package/dist/m365/teams/commands.js +1 -0
  26. package/docs/docs/cmd/aad/app/app-delete.md +51 -0
  27. package/docs/docs/cmd/aad/app/app-get.md +12 -1
  28. package/docs/docs/cmd/aad/app/app-set.md +21 -0
  29. package/docs/docs/cmd/aad/group/group-list.md +9 -0
  30. package/docs/docs/cmd/aad/o365group/o365group-conversation-list.md +24 -0
  31. package/docs/docs/cmd/outlook/room/room-list.md +30 -0
  32. package/docs/docs/cmd/outlook/roomlist/roomlist-list.md +21 -0
  33. package/docs/docs/cmd/planner/task/task-get.md +5 -0
  34. package/docs/docs/cmd/planner/task/task-list.md +5 -0
  35. package/docs/docs/cmd/spfx/project/project-upgrade.md +8 -8
  36. package/docs/docs/cmd/spo/group/group-user-add.md +4 -0
  37. package/docs/docs/cmd/teams/app/app-install.md +22 -4
  38. package/docs/docs/cmd/teams/app/app-update.md +12 -3
  39. package/docs/docs/cmd/teams/channel/channel-get.md +10 -1
  40. package/docs/docs/cmd/teams/chat/chat-message-send.md +55 -0
  41. package/npm-shrinkwrap.json +36 -3
  42. package/package.json +6 -2
@@ -3,17 +3,20 @@
3
3
  "dockerFile": "Dockerfile",
4
4
  "settings": {
5
5
  "terminal.integrated.profiles.linux": {
6
- "zsh": {
7
- "path": "/bin/zsh",
8
- "args": [
9
- "-l"
10
- ]
11
- }
12
- },
13
- "terminal.integrated.defaultProfile.linux": "zsh"
6
+ "zsh": {
7
+ "path": "/bin/zsh",
8
+ "args": [
9
+ "-l"
10
+ ]
11
+ }
12
+ },
13
+ "terminal.integrated.defaultProfile.linux": "zsh"
14
14
  },
15
15
  "postCreateCommand": "npm i && npm run clean && npm run build && npm link",
16
16
  "extensions": [
17
- "dbaeumer.vscode-eslint"
17
+ "dbaeumer.vscode-eslint",
18
+ "hbenl.vscode-test-explorer",
19
+ "hbenl.vscode-mocha-test-adapter",
20
+ "eamodio.gitlens"
18
21
  ]
19
22
  }
package/.eslintrc.js CHANGED
@@ -49,6 +49,7 @@ const dictionary = [
49
49
  'records',
50
50
  'recycle',
51
51
  'role',
52
+ 'room',
52
53
  'schema',
53
54
  'service',
54
55
  'setting',
package/.mocharc.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "extension": [
3
+ "ts"
4
+ ],
5
+ "spec": "dist/**/*.spec.js",
6
+ "require": "source-map-support/register",
7
+ "watch": "dist/**/*.js",
8
+ "logpanel": true
9
+ }
package/README.md CHANGED
@@ -208,9 +208,9 @@ If you want to get involved with helping us grow the CLI, whether that is sugges
208
208
 
209
209
  Checkout our [Wiki](https://github.com/pnp/cli-microsoft365/wiki) for guides on how to contribute to this project.
210
210
 
211
- ## Sharing is Caring
211
+ ## Microsoft 365 Platform Community
212
212
 
213
- This project is associated with the [Microsoft 365 Patterns and Practices](https://pnp.github.io) (PnP) organisation, which is a virtual team consisting of Microsoft employees and community members focused on helping the community make the best use of Microsoft products.
213
+ CLI for Microsoft 365 is a [Microsoft 365 Platform Community](https://pnp.github.io) (PnP) project. Microsoft 365 Platform Community is a virtual team consisting of Microsoft employees and community members focused on helping the community make the best use of Microsoft products. CLI for Microsoft 365 is an open-source project not affiliated with Microsoft and not covered by Microsoft support. If you experience any issues using the CLI, please submit an issue in the [issues list](https://github.com/pnp/cli-microsoft365/issues).
214
214
 
215
215
  ## Disclaimer
216
216
 
package/dist/Command.js CHANGED
@@ -113,7 +113,7 @@ class Command {
113
113
  },
114
114
  {
115
115
  option: '-o, --output [output]',
116
- autocomplete: ['json', 'text']
116
+ autocomplete: ['csv', 'json', 'text']
117
117
  },
118
118
  {
119
119
  option: '--verbose'
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const cli_1 = require("../../../../cli");
4
+ const request_1 = require("../../../../request");
5
+ const Utils_1 = require("../../../../Utils");
6
+ const GraphCommand_1 = require("../../../base/GraphCommand");
7
+ const commands_1 = require("../../commands");
8
+ class AadAppDeleteCommand extends GraphCommand_1.default {
9
+ get name() {
10
+ return commands_1.default.APP_DELETE;
11
+ }
12
+ get description() {
13
+ return 'Removes an Azure AD app registration';
14
+ }
15
+ getTelemetryProperties(args) {
16
+ const telemetryProps = super.getTelemetryProperties(args);
17
+ telemetryProps.appId = typeof args.options.appId !== 'undefined';
18
+ telemetryProps.objectId = typeof args.options.objectId !== 'undefined';
19
+ telemetryProps.name = typeof args.options.name !== 'undefined';
20
+ telemetryProps.confirm = (!(!args.options.confirm)).toString();
21
+ return telemetryProps;
22
+ }
23
+ commandAction(logger, args, cb) {
24
+ const deleteApp = () => {
25
+ this
26
+ .getObjectId(args, logger)
27
+ .then((objectId) => {
28
+ if (this.verbose) {
29
+ logger.logToStderr(`Deleting Azure AD app ${objectId}...`);
30
+ }
31
+ const requestOptions = {
32
+ url: `${this.resource}/v1.0/myorganization/applications/${objectId}`,
33
+ headers: {
34
+ accept: 'application/json;odata.metadata=none'
35
+ },
36
+ responseType: 'json'
37
+ };
38
+ return request_1.default.delete(requestOptions);
39
+ })
40
+ .then(_ => cb(), (rawRes) => this.handleRejectedODataJsonPromise(rawRes, logger, cb));
41
+ };
42
+ if (args.options.confirm) {
43
+ deleteApp();
44
+ }
45
+ else {
46
+ cli_1.Cli.prompt({
47
+ type: 'confirm',
48
+ name: 'continue',
49
+ default: false,
50
+ message: `Are you sure you want to delete the App?`
51
+ }, (result) => {
52
+ if (!result.continue) {
53
+ cb();
54
+ }
55
+ else {
56
+ deleteApp();
57
+ }
58
+ });
59
+ }
60
+ }
61
+ getObjectId(args, logger) {
62
+ if (args.options.objectId) {
63
+ return Promise.resolve(args.options.objectId);
64
+ }
65
+ const { appId, name } = args.options;
66
+ if (this.verbose) {
67
+ logger.logToStderr(`Retrieving information about Azure AD app ${appId ? appId : name}...`);
68
+ }
69
+ const filter = appId ?
70
+ `appId eq '${encodeURIComponent(appId)}'` :
71
+ `displayName eq '${encodeURIComponent(name)}'`;
72
+ const requestOptions = {
73
+ url: `${this.resource}/v1.0/myorganization/applications?$filter=${filter}&$select=id`,
74
+ headers: {
75
+ accept: 'application/json;odata.metadata=none'
76
+ },
77
+ responseType: 'json'
78
+ };
79
+ return request_1.default
80
+ .get(requestOptions)
81
+ .then((res) => {
82
+ if (res.value.length === 1) {
83
+ return Promise.resolve(res.value[0].id);
84
+ }
85
+ if (res.value.length === 0) {
86
+ const applicationIdentifier = appId ? `ID ${appId}` : `name ${name}`;
87
+ return Promise.reject(`No Azure AD application registration with ${applicationIdentifier} found`);
88
+ }
89
+ return Promise.reject(`Multiple Azure AD application registration with name ${name} found. Please choose one of the object IDs: ${res.value.map(a => a.id).join(', ')}`);
90
+ });
91
+ }
92
+ options() {
93
+ const options = [
94
+ { option: '--appId [appId]' },
95
+ { option: '--objectId [objectId]' },
96
+ { option: '--name [name]' },
97
+ { option: '--confirm' }
98
+ ];
99
+ const parentOptions = super.options();
100
+ return options.concat(parentOptions);
101
+ }
102
+ validate(args) {
103
+ if (!args.options.appId &&
104
+ !args.options.objectId &&
105
+ !args.options.name) {
106
+ return 'Specify either appId, objectId, or name';
107
+ }
108
+ if ((args.options.appId && args.options.objectId) ||
109
+ (args.options.appId && args.options.name) ||
110
+ (args.options.objectId && args.options.name)) {
111
+ return 'Specify either appId, objectId, or name';
112
+ }
113
+ if (args.options.appId && !Utils_1.default.isValidGuid(args.options.appId)) {
114
+ return `${args.options.appId} is not a valid GUID`;
115
+ }
116
+ if (args.options.objectId && !Utils_1.default.isValidGuid(args.options.objectId)) {
117
+ return `${args.options.objectId} is not a valid GUID`;
118
+ }
119
+ return true;
120
+ }
121
+ }
122
+ module.exports = new AadAppDeleteCommand();
123
+ //# sourceMappingURL=app-delete.js.map
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fs = require("fs");
3
4
  const request_1 = require("../../../../request");
4
5
  const Utils_1 = require("../../../../Utils");
5
6
  const GraphCommand_1 = require("../../../base/GraphCommand");
@@ -21,16 +22,8 @@ class AadAppGetCommand extends GraphCommand_1.default {
21
22
  commandAction(logger, args, cb) {
22
23
  this
23
24
  .getAppObjectId(args)
24
- .then((appObjectId) => {
25
- const requestOptions = {
26
- url: `${this.resource}/v1.0/myorganization/applications/${appObjectId}`,
27
- headers: {
28
- accept: 'application/json;odata.metadata=none'
29
- },
30
- responseType: 'json'
31
- };
32
- return request_1.default.get(requestOptions);
33
- })
25
+ .then(appObjectId => this.getAppInfo(appObjectId))
26
+ .then(appInfo => this.saveAppInfo(args, appInfo, logger))
34
27
  .then((res) => {
35
28
  logger.log(res);
36
29
  cb();
@@ -64,11 +57,63 @@ class AadAppGetCommand extends GraphCommand_1.default {
64
57
  return Promise.reject(`Multiple Azure AD application registration with name ${name} found. Please disambiguate (app object IDs): ${res.value.map(a => a.id).join(', ')}`);
65
58
  });
66
59
  }
60
+ getAppInfo(appObjectId) {
61
+ const requestOptions = {
62
+ url: `${this.resource}/v1.0/myorganization/applications/${appObjectId}`,
63
+ headers: {
64
+ accept: 'application/json;odata.metadata=none'
65
+ },
66
+ responseType: 'json'
67
+ };
68
+ return request_1.default.get(requestOptions);
69
+ }
70
+ saveAppInfo(args, appInfo, logger) {
71
+ if (!args.options.save) {
72
+ return Promise.resolve(appInfo);
73
+ }
74
+ const filePath = '.m365rc.json';
75
+ if (this.verbose) {
76
+ logger.logToStderr(`Saving Azure AD app registration information to the ${filePath} file...`);
77
+ }
78
+ let m365rc = {};
79
+ if (fs.existsSync(filePath)) {
80
+ if (this.debug) {
81
+ logger.logToStderr(`Reading existing ${filePath}...`);
82
+ }
83
+ try {
84
+ const fileContents = fs.readFileSync(filePath, 'utf8');
85
+ if (fileContents) {
86
+ m365rc = JSON.parse(fileContents);
87
+ }
88
+ }
89
+ catch (e) {
90
+ logger.logToStderr(`Error reading ${filePath}: ${e}. Please add app info to ${filePath} manually.`);
91
+ return Promise.resolve(appInfo);
92
+ }
93
+ }
94
+ if (!m365rc.apps) {
95
+ m365rc.apps = [];
96
+ }
97
+ if (!m365rc.apps.some(a => a.appId === appInfo.appId)) {
98
+ m365rc.apps.push({
99
+ appId: appInfo.appId,
100
+ name: appInfo.displayName
101
+ });
102
+ try {
103
+ fs.writeFileSync(filePath, JSON.stringify(m365rc, null, 2));
104
+ }
105
+ catch (e) {
106
+ logger.logToStderr(`Error writing ${filePath}: ${e}. Please add app info to ${filePath} manually.`);
107
+ }
108
+ }
109
+ return Promise.resolve(appInfo);
110
+ }
67
111
  options() {
68
112
  const options = [
69
113
  { option: '--appId [appId]' },
70
114
  { option: '--objectId [objectId]' },
71
- { option: '--name [name]' }
115
+ { option: '--name [name]' },
116
+ { option: '--save' }
72
117
  ];
73
118
  const parentOptions = super.options();
74
119
  return options.concat(parentOptions);
@@ -15,6 +15,9 @@ class AadAppSetCommand extends GraphCommand_1.default {
15
15
  telemetryProps.appId = typeof args.options.appId !== 'undefined';
16
16
  telemetryProps.objectId = typeof args.options.objectId !== 'undefined';
17
17
  telemetryProps.name = typeof args.options.name !== 'undefined';
18
+ telemetryProps.platform = typeof args.options.platform !== 'undefined';
19
+ telemetryProps.redirectUris = typeof args.options.redirectUris !== 'undefined';
20
+ telemetryProps.redirectUrisToRemove = typeof args.options.redirectUrisToRemove !== 'undefined';
18
21
  telemetryProps.uri = typeof args.options.uri !== 'undefined';
19
22
  return telemetryProps;
20
23
  }
@@ -22,6 +25,7 @@ class AadAppSetCommand extends GraphCommand_1.default {
22
25
  this
23
26
  .getAppObjectId(args, logger)
24
27
  .then(objectId => this.configureUri(args, objectId, logger))
28
+ .then(objectId => this.configureRedirectUris(args, objectId, logger))
25
29
  .then(_ => cb(), (rawRes) => this.handleRejectedODataJsonPromise(rawRes, logger, cb));
26
30
  }
27
31
  getAppObjectId(args, logger) {
@@ -57,7 +61,7 @@ class AadAppSetCommand extends GraphCommand_1.default {
57
61
  }
58
62
  configureUri(args, objectId, logger) {
59
63
  if (!args.options.uri) {
60
- return Promise.resolve();
64
+ return Promise.resolve(objectId);
61
65
  }
62
66
  if (this.verbose) {
63
67
  logger.logToStderr(`Configuring Azure AD application ID URI...`);
@@ -73,14 +77,97 @@ class AadAppSetCommand extends GraphCommand_1.default {
73
77
  responseType: 'json',
74
78
  data: applicationInfo
75
79
  };
76
- return request_1.default.patch(requestOptions);
80
+ return request_1.default
81
+ .patch(requestOptions)
82
+ .then(_ => Promise.resolve(objectId));
83
+ }
84
+ configureRedirectUris(args, objectId, logger) {
85
+ if (!args.options.redirectUris && !args.options.redirectUrisToRemove) {
86
+ return Promise.resolve(objectId);
87
+ }
88
+ if (this.verbose) {
89
+ logger.logToStderr(`Configuring Azure AD application redirect URIs...`);
90
+ }
91
+ const getAppRequestOptions = {
92
+ url: `${this.resource}/v1.0/myorganization/applications/${objectId}`,
93
+ headers: {
94
+ 'content-type': 'application/json;odata.metadata=none'
95
+ },
96
+ responseType: 'json'
97
+ };
98
+ return request_1.default
99
+ .get(getAppRequestOptions)
100
+ .then((application) => {
101
+ const publicClientRedirectUris = application.publicClient.redirectUris;
102
+ const spaRedirectUris = application.spa.redirectUris;
103
+ const webRedirectUris = application.web.redirectUris;
104
+ // start with existing redirect URIs
105
+ const applicationPatch = {
106
+ publicClient: {
107
+ redirectUris: publicClientRedirectUris
108
+ },
109
+ spa: {
110
+ redirectUris: spaRedirectUris
111
+ },
112
+ web: {
113
+ redirectUris: webRedirectUris
114
+ }
115
+ };
116
+ if (args.options.redirectUrisToRemove) {
117
+ // remove redirect URIs from all platforms
118
+ const redirectUrisToRemove = args.options.redirectUrisToRemove
119
+ .split(',')
120
+ .map(u => u.trim());
121
+ applicationPatch.publicClient.redirectUris =
122
+ publicClientRedirectUris.filter(u => !redirectUrisToRemove.includes(u));
123
+ applicationPatch.spa.redirectUris =
124
+ spaRedirectUris.filter(u => !redirectUrisToRemove.includes(u));
125
+ applicationPatch.web.redirectUris =
126
+ webRedirectUris.filter(u => !redirectUrisToRemove.includes(u));
127
+ }
128
+ if (args.options.redirectUris) {
129
+ const urlsToAdd = args.options.redirectUris
130
+ .split(',')
131
+ .map(u => u.trim());
132
+ // add new redirect URIs. If the URI is already present, it will be ignored
133
+ switch (args.options.platform) {
134
+ case 'spa':
135
+ applicationPatch.spa.redirectUris
136
+ .push(...urlsToAdd.filter(u => !spaRedirectUris.includes(u)));
137
+ break;
138
+ case 'publicClient':
139
+ applicationPatch.publicClient.redirectUris
140
+ .push(...urlsToAdd.filter(u => !publicClientRedirectUris.includes(u)));
141
+ break;
142
+ case 'web':
143
+ applicationPatch.web.redirectUris
144
+ .push(...urlsToAdd.filter(u => !webRedirectUris.includes(u)));
145
+ }
146
+ }
147
+ const requestOptions = {
148
+ url: `${this.resource}/v1.0/myorganization/applications/${objectId}`,
149
+ headers: {
150
+ 'content-type': 'application/json;odata.metadata=none'
151
+ },
152
+ responseType: 'json',
153
+ data: applicationPatch
154
+ };
155
+ return request_1.default.patch(requestOptions);
156
+ })
157
+ .then(_ => Promise.resolve(objectId));
77
158
  }
78
159
  options() {
79
160
  const options = [
80
161
  { option: '--appId [appId]' },
81
162
  { option: '--objectId [objectId]' },
82
163
  { option: '-n, --name [name]' },
83
- { option: '-u, --uri [uri]' }
164
+ { option: '-u, --uri [uri]' },
165
+ { option: '-r, --redirectUris [redirectUris]' },
166
+ {
167
+ option: '--platform [platform]',
168
+ autocomplete: AadAppSetCommand.aadApplicationPlatform
169
+ },
170
+ { option: '--redirectUrisToRemove [redirectUrisToRemove]' }
84
171
  ];
85
172
  const parentOptions = super.options();
86
173
  return options.concat(parentOptions);
@@ -96,8 +183,16 @@ class AadAppSetCommand extends GraphCommand_1.default {
96
183
  (args.options.objectId && args.options.name)) {
97
184
  return 'Specify either appId, objectId or name but not both';
98
185
  }
186
+ if (args.options.redirectUris && !args.options.platform) {
187
+ return `When you specify redirectUris you also need to specify platform`;
188
+ }
189
+ if (args.options.platform &&
190
+ AadAppSetCommand.aadApplicationPlatform.indexOf(args.options.platform) < 0) {
191
+ return `${args.options.platform} is not a valid value for platform. Allowed values are ${AadAppSetCommand.aadApplicationPlatform.join(', ')}`;
192
+ }
99
193
  return true;
100
194
  }
101
195
  }
196
+ AadAppSetCommand.aadApplicationPlatform = ['spa', 'web', 'publicClient'];
102
197
  module.exports = new AadAppSetCommand();
103
198
  //# sourceMappingURL=app-set.js.map
@@ -9,12 +9,18 @@ class AadGroupListCommand extends GraphItemsListCommand_1.GraphItemsListCommand
9
9
  get description() {
10
10
  return 'Lists all groups defined in Azure Active Directory.';
11
11
  }
12
+ getTelemetryProperties(args) {
13
+ const telemetryProps = super.getTelemetryProperties(args);
14
+ telemetryProps.deleted = args.options.deleted;
15
+ return telemetryProps;
16
+ }
12
17
  defaultProperties() {
13
18
  return ['id', 'displayName', 'groupType'];
14
19
  }
15
20
  commandAction(logger, args, cb) {
21
+ const endpoint = args.options.deleted ? 'directory/deletedItems/microsoft.graph.group' : 'groups';
16
22
  this
17
- .getAllItems(`${this.resource}/v1.0/groups`, logger, true)
23
+ .getAllItems(`${this.resource}/v1.0/${endpoint}`, logger, true)
18
24
  .then(() => {
19
25
  if (args.options.output === 'text') {
20
26
  this.items.forEach((group) => {
@@ -36,6 +42,13 @@ class AadGroupListCommand extends GraphItemsListCommand_1.GraphItemsListCommand
36
42
  cb();
37
43
  }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
38
44
  }
45
+ options() {
46
+ const options = [
47
+ { option: '-d, --deleted' }
48
+ ];
49
+ const parentOptions = super.options();
50
+ return options.concat(parentOptions);
51
+ }
39
52
  }
40
53
  module.exports = new AadGroupListCommand();
41
54
  //# sourceMappingURL=group-list.js.map
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const Utils_1 = require("../../../../Utils");
4
+ const GraphItemsListCommand_1 = require("../../../base/GraphItemsListCommand");
5
+ const commands_1 = require("../../commands");
6
+ class AadO365GroupConversationListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
7
+ get name() {
8
+ return commands_1.default.O365GROUP_CONVERSATION_LIST;
9
+ }
10
+ get description() {
11
+ return 'Lists conversations for the specified Microsoft 365 group';
12
+ }
13
+ defaultProperties() {
14
+ return ['topic', 'lastDeliveredDateTime', 'id'];
15
+ }
16
+ commandAction(logger, args, cb) {
17
+ this
18
+ .getAllItems(`${this.resource}/v1.0/groups/${args.options.groupId}/conversations`, logger, true)
19
+ .then(() => {
20
+ logger.log(this.items);
21
+ cb();
22
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
23
+ }
24
+ options() {
25
+ const options = [
26
+ {
27
+ option: '-i, --groupId <groupId>'
28
+ }
29
+ ];
30
+ const parentOptions = super.options();
31
+ return options.concat(parentOptions);
32
+ }
33
+ validate(args) {
34
+ if (!Utils_1.default.isValidGuid(args.options.groupId)) {
35
+ return `${args.options.groupId} is not a valid GUID`;
36
+ }
37
+ return true;
38
+ }
39
+ }
40
+ module.exports = new AadO365GroupConversationListCommand();
41
+ //# sourceMappingURL=o365group-conversation-list.js.map
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const prefix = 'aad';
4
4
  exports.default = {
5
5
  APP_ADD: `${prefix} app add`,
6
+ APP_DELETE: `${prefix} app delete`,
6
7
  APP_GET: `${prefix} app get`,
7
8
  APP_SET: `${prefix} app set`,
8
9
  APP_ROLE_ADD: `${prefix} app role add`,
@@ -22,6 +23,7 @@ exports.default = {
22
23
  O365GROUP_ADD: `${prefix} o365group add`,
23
24
  O365GROUP_GET: `${prefix} o365group get`,
24
25
  O365GROUP_LIST: `${prefix} o365group list`,
26
+ O365GROUP_CONVERSATION_LIST: `${prefix} o365group conversation list`,
25
27
  O365GROUP_RECYCLEBINITEM_CLEAR: `${prefix} o365group recyclebinitem clear`,
26
28
  O365GROUP_RECYCLEBINITEM_LIST: `${prefix} o365group recyclebinitem list`,
27
29
  O365GROUP_RECYCLEBINITEM_RESTORE: `${prefix} o365group recyclebinitem restore`,
@@ -0,0 +1,43 @@
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 OutlookRoomListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
6
+ get name() {
7
+ return commands_1.default.ROOM_LIST;
8
+ }
9
+ get description() {
10
+ return 'Get a collection of all available rooms';
11
+ }
12
+ getTelemetryProperties(args) {
13
+ const telemetryProps = super.getTelemetryProperties(args);
14
+ telemetryProps.roomlistEmail = typeof args.options.roomlistEmail !== 'undefined';
15
+ return telemetryProps;
16
+ }
17
+ defaultProperties() {
18
+ return ['id', 'displayName', 'phone', 'emailAddress'];
19
+ }
20
+ commandAction(logger, args, cb) {
21
+ let endpoint = `${this.resource}/v1.0/places/microsoft.graph.room`;
22
+ if (args.options.roomlistEmail) {
23
+ endpoint = `${this.resource}/v1.0/places/${args.options.roomlistEmail}/microsoft.graph.roomlist/rooms`;
24
+ }
25
+ this
26
+ .getAllItems(endpoint, logger, true)
27
+ .then(() => {
28
+ logger.log(this.items);
29
+ cb();
30
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
31
+ }
32
+ options() {
33
+ const options = [
34
+ {
35
+ option: '--roomlistEmail [roomlistEmail]'
36
+ }
37
+ ];
38
+ const parentOptions = super.options();
39
+ return options.concat(parentOptions);
40
+ }
41
+ }
42
+ module.exports = new OutlookRoomListCommand();
43
+ //# sourceMappingURL=room-list.js.map
@@ -0,0 +1,25 @@
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 OutlookRoomListListCommand extends GraphItemsListCommand_1.GraphItemsListCommand {
6
+ get name() {
7
+ return commands_1.default.ROOMLIST_LIST;
8
+ }
9
+ get description() {
10
+ return 'Get a collection of available roomlists';
11
+ }
12
+ defaultProperties() {
13
+ return ['id', 'displayName', 'phone', 'emailAddress'];
14
+ }
15
+ commandAction(logger, args, cb) {
16
+ this
17
+ .getAllItems(`${this.resource}/v1.0/places/microsoft.graph.roomlist`, logger, true)
18
+ .then(() => {
19
+ logger.log(this.items);
20
+ cb();
21
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
22
+ }
23
+ }
24
+ module.exports = new OutlookRoomListListCommand();
25
+ //# sourceMappingURL=roomlist-list.js.map
@@ -16,6 +16,8 @@ exports.default = {
16
16
  REPORT_MAILBOXUSAGEMAILBOXCOUNT: `${prefix} report mailboxusagemailboxcount`,
17
17
  REPORT_MAILBOXUSAGEQUOTASTATUSMAILBOXCOUNTS: `${prefix} report mailboxusagequotastatusmailboxcounts`,
18
18
  REPORT_MAILBOXUSAGESTORAGE: `${prefix} report mailboxusagestorage`,
19
+ ROOM_LIST: `${prefix} room list`,
20
+ ROOMLIST_LIST: `${prefix} roomlist list`,
19
21
  SENDMAIL: `${prefix} sendmail`
20
22
  };
21
23
  //# sourceMappingURL=commands.js.map
@@ -12,7 +12,7 @@ class PlannerTaskGetCommand extends GraphCommand_1.default {
12
12
  }
13
13
  commandAction(logger, args, cb) {
14
14
  const requestOptions = {
15
- url: `${this.resource}/v1.0/planner/tasks/${encodeURIComponent(args.options.id)}`,
15
+ url: `${this.resource}/beta/planner/tasks/${encodeURIComponent(args.options.id)}`,
16
16
  headers: {
17
17
  accept: 'application/json;odata.metadata=none'
18
18
  },