@pnp/cli-microsoft365 6.0.0-beta.62647c9 → 6.0.0-beta.636d726
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/aad/commands/user/user-guest-add.js +103 -0
- package/dist/m365/aad/commands.js +1 -0
- package/dist/m365/outlook/commands/message/message-get.js +97 -0
- package/dist/m365/outlook/commands.js +1 -0
- package/dist/m365/spo/commands/field/field-add.js +26 -1
- package/dist/m365/spo/commands/field/field-set.js +23 -13
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +11 -1
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +12 -1
- package/dist/m365/spo/commands/listitem/listitem-add.js +24 -14
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +18 -8
- package/dist/m365/spo/commands/listitem/listitem-get.js +18 -8
- package/dist/m365/spo/commands/listitem/listitem-isrecord.js +20 -10
- package/dist/m365/spo/commands/listitem/listitem-list.js +21 -11
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +19 -12
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +24 -21
- package/dist/m365/spo/commands/listitem/listitem-remove.js +19 -11
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +13 -5
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +13 -5
- package/dist/m365/spo/commands/listitem/listitem-set.js +52 -44
- package/dist/m365/spo/commands/roledefinition/roledefinition-list.js +15 -2
- package/dist/m365/spo/commands/{hubsite/hubsite-theme-sync.js → site/site-hubsite-theme-sync.js} +11 -11
- package/dist/m365/spo/commands.js +2 -2
- package/dist/m365/todo/commands/task/task-get.js +108 -0
- package/dist/m365/todo/commands.js +1 -0
- package/docs/docs/cmd/aad/user/user-guest-add.md +107 -0
- package/docs/docs/cmd/adaptivecard/adaptivecard-send.md +3 -0
- package/docs/docs/cmd/graph/schemaextension/schemaextension-add.md +4 -11
- package/docs/docs/cmd/graph/schemaextension/schemaextension-set.md +4 -10
- package/docs/docs/cmd/outlook/message/message-get.md +48 -0
- package/docs/docs/cmd/spo/customaction/customaction-add.md +3 -0
- package/docs/docs/cmd/spo/customaction/customaction-set.md +3 -2
- package/docs/docs/cmd/spo/field/field-add.md +20 -2
- package/docs/docs/cmd/spo/field/field-set.md +15 -3
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.md +6 -0
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.md +6 -0
- package/docs/docs/cmd/spo/list/list-view-set.md +14 -3
- package/docs/docs/cmd/spo/listitem/listitem-add.md +11 -2
- package/docs/docs/cmd/spo/listitem/listitem-attachment-list.md +11 -2
- package/docs/docs/cmd/spo/listitem/listitem-get.md +11 -2
- package/docs/docs/cmd/spo/listitem/listitem-isrecord.md +12 -2
- package/docs/docs/cmd/spo/listitem/listitem-list.md +10 -1
- package/docs/docs/cmd/spo/listitem/listitem-record-declare.md +7 -4
- package/docs/docs/cmd/spo/listitem/listitem-record-undeclare.md +11 -2
- package/docs/docs/cmd/spo/listitem/listitem-remove.md +11 -2
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-break.md +7 -4
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-reset.md +8 -5
- package/docs/docs/cmd/spo/listitem/listitem-set.md +7 -4
- package/docs/docs/cmd/spo/page/page-clientsidewebpart-add.md +5 -10
- package/docs/docs/cmd/spo/page/page-control-set.md +2 -1
- package/docs/docs/cmd/spo/{hubsite/hubsite-theme-sync.md → site/site-hubsite-theme-sync.md} +5 -5
- package/docs/docs/cmd/spo/term/term-add.md +5 -0
- package/docs/docs/cmd/spo/term/term-set-add.md +6 -1
- package/docs/docs/cmd/todo/task/task-get.md +75 -0
- package/package.json +1 -1
|
@@ -19,6 +19,7 @@ const config_1 = require("../../../../config");
|
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
20
20
|
const formatting_1 = require("../../../../utils/formatting");
|
|
21
21
|
const spo_1 = require("../../../../utils/spo");
|
|
22
|
+
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
22
23
|
const validation_1 = require("../../../../utils/validation");
|
|
23
24
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
24
25
|
const commands_1 = require("../../commands");
|
|
@@ -43,35 +44,41 @@ class SpoListItemSetCommand extends SpoCommand_1.default {
|
|
|
43
44
|
}
|
|
44
45
|
commandAction(logger, args) {
|
|
45
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
const listIdArgument = args.options.listId || '';
|
|
47
|
-
const listTitleArgument = args.options.listTitle || '';
|
|
48
|
-
const listRestUrl = (args.options.listId ?
|
|
49
|
-
`${args.options.webUrl}/_api/web/lists(guid'${formatting_1.formatting.encodeQueryParameter(listIdArgument)}')`
|
|
50
|
-
: `${args.options.webUrl}/_api/web/lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(listTitleArgument)}')`);
|
|
51
47
|
let contentTypeName = '';
|
|
52
|
-
let
|
|
53
|
-
let environmentListId = '';
|
|
48
|
+
let listId = '';
|
|
54
49
|
try {
|
|
55
|
-
|
|
50
|
+
let requestUrl = `${args.options.webUrl}/_api/web`;
|
|
51
|
+
if (args.options.listId) {
|
|
52
|
+
listId = args.options.listId;
|
|
53
|
+
requestUrl += `/lists(guid'${formatting_1.formatting.encodeQueryParameter(args.options.listId)}')`;
|
|
54
|
+
}
|
|
55
|
+
else if (args.options.listTitle) {
|
|
56
|
+
requestUrl += `/lists/getByTitle('${formatting_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
57
|
+
}
|
|
58
|
+
else if (args.options.listUrl) {
|
|
59
|
+
const listServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
60
|
+
requestUrl += `/GetList('${formatting_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')`;
|
|
61
|
+
}
|
|
62
|
+
if (args.options.systemUpdate && !args.options.listId) {
|
|
56
63
|
if (this.verbose) {
|
|
57
64
|
logger.logToStderr(`Getting list id...`);
|
|
58
65
|
}
|
|
59
66
|
const listRequestOptions = {
|
|
60
|
-
url: `${
|
|
67
|
+
url: `${requestUrl}?$select=Id`,
|
|
61
68
|
headers: {
|
|
62
69
|
'accept': 'application/json;odata=nometadata'
|
|
63
70
|
},
|
|
64
71
|
responseType: 'json'
|
|
65
72
|
};
|
|
66
|
-
const
|
|
67
|
-
|
|
73
|
+
const list = yield request_1.default.get(listRequestOptions);
|
|
74
|
+
listId = list.Id;
|
|
68
75
|
}
|
|
69
76
|
if (args.options.contentType) {
|
|
70
77
|
if (this.verbose) {
|
|
71
78
|
logger.logToStderr(`Getting content types for list...`);
|
|
72
79
|
}
|
|
73
80
|
const requestOptions = {
|
|
74
|
-
url: `${
|
|
81
|
+
url: `${requestUrl}/contenttypes?$select=Name,Id`,
|
|
75
82
|
headers: {
|
|
76
83
|
'accept': 'application/json;odata=nometadata'
|
|
77
84
|
},
|
|
@@ -112,9 +119,9 @@ class SpoListItemSetCommand extends SpoCommand_1.default {
|
|
|
112
119
|
res = yield spo_1.spo.getRequestDigest(args.options.webUrl);
|
|
113
120
|
}
|
|
114
121
|
if (this.verbose) {
|
|
115
|
-
logger.logToStderr(`Updating item in list ${args.options.listId || args.options.listTitle} in site ${args.options.webUrl}...`);
|
|
122
|
+
logger.logToStderr(`Updating item in list ${args.options.listId || args.options.listTitle || args.options.listUrl} in site ${args.options.webUrl}...`);
|
|
116
123
|
}
|
|
117
|
-
formDigestValue = args.options.systemUpdate ? res['FormDigestValue'] : '';
|
|
124
|
+
const formDigestValue = args.options.systemUpdate ? res['FormDigestValue'] : '';
|
|
118
125
|
let objectIdentity = '';
|
|
119
126
|
if (args.options.systemUpdate) {
|
|
120
127
|
objectIdentity = yield this.requestObjectIdentity(args.options.webUrl, logger, formDigestValue);
|
|
@@ -133,7 +140,7 @@ class SpoListItemSetCommand extends SpoCommand_1.default {
|
|
|
133
140
|
<Method Name="SystemUpdate" Id="2" ObjectPathId="147" />
|
|
134
141
|
</Actions>
|
|
135
142
|
<ObjectPaths>
|
|
136
|
-
<Identity Id="147" Name="${objectIdentity}:list:${
|
|
143
|
+
<Identity Id="147" Name="${objectIdentity}:list:${listId}:item:${args.options.id},1" />
|
|
137
144
|
</ObjectPaths>
|
|
138
145
|
</Request>`
|
|
139
146
|
: {
|
|
@@ -158,7 +165,7 @@ class SpoListItemSetCommand extends SpoCommand_1.default {
|
|
|
158
165
|
data: requestBody
|
|
159
166
|
} :
|
|
160
167
|
{
|
|
161
|
-
url: `${
|
|
168
|
+
url: `${requestUrl}/items(${args.options.id})/ValidateUpdateListItem()`,
|
|
162
169
|
headers: {
|
|
163
170
|
'accept': 'application/json;odata=nometadata'
|
|
164
171
|
},
|
|
@@ -186,7 +193,7 @@ class SpoListItemSetCommand extends SpoCommand_1.default {
|
|
|
186
193
|
}
|
|
187
194
|
}
|
|
188
195
|
const requestOptionsItems = {
|
|
189
|
-
url: `${
|
|
196
|
+
url: `${requestUrl}/items(${itemId})`,
|
|
190
197
|
headers: {
|
|
191
198
|
'accept': 'application/json;odata=nometadata'
|
|
192
199
|
},
|
|
@@ -205,6 +212,7 @@ class SpoListItemSetCommand extends SpoCommand_1.default {
|
|
|
205
212
|
const excludeOptions = [
|
|
206
213
|
'listTitle',
|
|
207
214
|
'listId',
|
|
215
|
+
'listUrl',
|
|
208
216
|
'webUrl',
|
|
209
217
|
'id',
|
|
210
218
|
'contentType',
|
|
@@ -247,31 +255,28 @@ class SpoListItemSetCommand extends SpoCommand_1.default {
|
|
|
247
255
|
* @param cmd command cmd
|
|
248
256
|
*/
|
|
249
257
|
requestObjectIdentity(webUrl, logger, formDigestValue) {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
request_1.default.post(requestOptions)
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
}).catch((err) => {
|
|
273
|
-
reject(err);
|
|
274
|
-
});
|
|
258
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
259
|
+
const requestOptions = {
|
|
260
|
+
url: `${webUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
261
|
+
headers: {
|
|
262
|
+
'X-RequestDigest': formDigestValue
|
|
263
|
+
},
|
|
264
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><Query Id="1" ObjectPathId="5"><Query SelectAllProperties="false"><Properties><Property Name="ServerRelativeUrl" ScalarProperty="true" /></Properties></Query></Query></Actions><ObjectPaths><Property Id="5" ParentId="3" Name="Web" /><StaticProperty Id="3" TypeId="{3747adcd-a3c3-41b9-bfab-4a64dd2f1e0a}" Name="Current" /></ObjectPaths></Request>`
|
|
265
|
+
};
|
|
266
|
+
const response = yield request_1.default.post(requestOptions);
|
|
267
|
+
if (this.debug) {
|
|
268
|
+
logger.logToStderr('Attempt to get _ObjectIdentity_ key values');
|
|
269
|
+
}
|
|
270
|
+
const json = JSON.parse(response);
|
|
271
|
+
const contents = json.find(x => { return x['ErrorInfo']; });
|
|
272
|
+
if (contents && contents.ErrorInfo) {
|
|
273
|
+
throw contents.ErrorInfo.ErrorMessage || 'ClientSvc unknown error';
|
|
274
|
+
}
|
|
275
|
+
const identityObject = json.find(x => { return x['_ObjectIdentity_']; });
|
|
276
|
+
if (identityObject) {
|
|
277
|
+
return identityObject['_ObjectIdentity_'];
|
|
278
|
+
}
|
|
279
|
+
throw 'Cannot proceed. _ObjectIdentity_ not found'; // this is not supposed to happen
|
|
275
280
|
});
|
|
276
281
|
}
|
|
277
282
|
}
|
|
@@ -280,6 +285,7 @@ _SpoListItemSetCommand_instances = new WeakSet(), _SpoListItemSetCommand_initTel
|
|
|
280
285
|
Object.assign(this.telemetryProperties, {
|
|
281
286
|
listId: typeof args.options.listId !== 'undefined',
|
|
282
287
|
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
288
|
+
listUrl: typeof args.options.listUrl !== 'undefined',
|
|
283
289
|
contentType: typeof args.options.contentType !== 'undefined',
|
|
284
290
|
systemUpdate: typeof args.options.systemUpdate !== 'undefined'
|
|
285
291
|
});
|
|
@@ -293,6 +299,8 @@ _SpoListItemSetCommand_instances = new WeakSet(), _SpoListItemSetCommand_initTel
|
|
|
293
299
|
option: '-l, --listId [listId]'
|
|
294
300
|
}, {
|
|
295
301
|
option: '-t, --listTitle [listTitle]'
|
|
302
|
+
}, {
|
|
303
|
+
option: '--listUrl [listUrl]'
|
|
296
304
|
}, {
|
|
297
305
|
option: '-c, --contentType [contentType]'
|
|
298
306
|
}, {
|
|
@@ -311,10 +319,10 @@ _SpoListItemSetCommand_instances = new WeakSet(), _SpoListItemSetCommand_initTel
|
|
|
311
319
|
return true;
|
|
312
320
|
}));
|
|
313
321
|
}, _SpoListItemSetCommand_initTypes = function _SpoListItemSetCommand_initTypes() {
|
|
314
|
-
this.types.string.push('webUrl', 'listId', 'listTitle', 'id', 'contentType');
|
|
322
|
+
this.types.string.push('webUrl', 'listId', 'listTitle', 'listUrl', 'id', 'contentType');
|
|
315
323
|
this.types.boolean.push('systemUpdate');
|
|
316
324
|
}, _SpoListItemSetCommand_initOptionSets = function _SpoListItemSetCommand_initOptionSets() {
|
|
317
|
-
this.optionSets.push(['listId', 'listTitle']);
|
|
325
|
+
this.optionSets.push(['listId', 'listTitle', 'listUrl']);
|
|
318
326
|
};
|
|
319
327
|
module.exports = new SpoListItemSetCommand();
|
|
320
328
|
//# sourceMappingURL=listitem-set.js.map
|
|
@@ -18,7 +18,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const validation_1 = require("../../../../utils/validation");
|
|
20
20
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
21
|
+
const base_permissions_1 = require("../../base-permissions");
|
|
21
22
|
const commands_1 = require("../../commands");
|
|
23
|
+
const RoleType_1 = require("./RoleType");
|
|
22
24
|
class SpoRoleDefinitionListCommand extends SpoCommand_1.default {
|
|
23
25
|
constructor() {
|
|
24
26
|
super();
|
|
@@ -48,14 +50,25 @@ class SpoRoleDefinitionListCommand extends SpoCommand_1.default {
|
|
|
48
50
|
responseType: 'json'
|
|
49
51
|
};
|
|
50
52
|
try {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
+
const res = yield request_1.default.get(requestOptions);
|
|
54
|
+
const response = this.setFriendlyPermissions(res.value);
|
|
55
|
+
logger.log(response);
|
|
53
56
|
}
|
|
54
57
|
catch (err) {
|
|
55
58
|
this.handleRejectedODataJsonPromise(err);
|
|
56
59
|
}
|
|
57
60
|
});
|
|
58
61
|
}
|
|
62
|
+
setFriendlyPermissions(response) {
|
|
63
|
+
response.forEach((r) => {
|
|
64
|
+
const permissions = new base_permissions_1.BasePermissions();
|
|
65
|
+
permissions.high = r.BasePermissions.High;
|
|
66
|
+
permissions.low = r.BasePermissions.Low;
|
|
67
|
+
r.BasePermissionsValue = permissions.parse();
|
|
68
|
+
r.RoleTypeKindValue = RoleType_1.RoleType[r.RoleTypeKind];
|
|
69
|
+
});
|
|
70
|
+
return response;
|
|
71
|
+
}
|
|
59
72
|
}
|
|
60
73
|
_SpoRoleDefinitionListCommand_instances = new WeakSet(), _SpoRoleDefinitionListCommand_initOptions = function _SpoRoleDefinitionListCommand_initOptions() {
|
|
61
74
|
this.options.unshift({
|
package/dist/m365/spo/commands/{hubsite/hubsite-theme-sync.js → site/site-hubsite-theme-sync.js}
RENAMED
|
@@ -13,24 +13,24 @@ 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
|
|
16
|
+
var _SpoSiteHubSiteThemeSyncCommand_instances, _SpoSiteHubSiteThemeSyncCommand_initOptions, _SpoSiteHubSiteThemeSyncCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const validation_1 = require("../../../../utils/validation");
|
|
20
20
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
21
21
|
const commands_1 = require("../../commands");
|
|
22
|
-
class
|
|
22
|
+
class SpoSiteHubSiteThemeSyncCommand extends SpoCommand_1.default {
|
|
23
23
|
constructor() {
|
|
24
24
|
super();
|
|
25
|
-
|
|
26
|
-
__classPrivateFieldGet(this,
|
|
27
|
-
__classPrivateFieldGet(this,
|
|
25
|
+
_SpoSiteHubSiteThemeSyncCommand_instances.add(this);
|
|
26
|
+
__classPrivateFieldGet(this, _SpoSiteHubSiteThemeSyncCommand_instances, "m", _SpoSiteHubSiteThemeSyncCommand_initOptions).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _SpoSiteHubSiteThemeSyncCommand_instances, "m", _SpoSiteHubSiteThemeSyncCommand_initValidators).call(this);
|
|
28
28
|
}
|
|
29
29
|
get name() {
|
|
30
|
-
return commands_1.default.
|
|
30
|
+
return commands_1.default.SITE_HUBSITE_THEME_SYNC;
|
|
31
31
|
}
|
|
32
32
|
get description() {
|
|
33
|
-
return 'Applies any theme updates from the
|
|
33
|
+
return 'Applies any theme updates from the hub site the site is connected to.';
|
|
34
34
|
}
|
|
35
35
|
commandAction(logger, args) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -53,12 +53,12 @@ class SpoHubSiteThemeSyncCommand extends SpoCommand_1.default {
|
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
_SpoSiteHubSiteThemeSyncCommand_instances = new WeakSet(), _SpoSiteHubSiteThemeSyncCommand_initOptions = function _SpoSiteHubSiteThemeSyncCommand_initOptions() {
|
|
57
57
|
this.options.unshift({
|
|
58
58
|
option: '-u, --webUrl <webUrl>'
|
|
59
59
|
});
|
|
60
|
-
},
|
|
60
|
+
}, _SpoSiteHubSiteThemeSyncCommand_initValidators = function _SpoSiteHubSiteThemeSyncCommand_initValidators() {
|
|
61
61
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () { return validation_1.validation.isValidSharePointUrl(args.options.webUrl); }));
|
|
62
62
|
};
|
|
63
|
-
module.exports = new
|
|
64
|
-
//# sourceMappingURL=hubsite-theme-sync.js.map
|
|
63
|
+
module.exports = new SpoSiteHubSiteThemeSyncCommand();
|
|
64
|
+
//# sourceMappingURL=site-hubsite-theme-sync.js.map
|
|
@@ -93,7 +93,6 @@ exports.default = {
|
|
|
93
93
|
HUBSITE_RIGHTS_GRANT: `${prefix} hubsite rights grant`,
|
|
94
94
|
HUBSITE_RIGHTS_REVOKE: `${prefix} hubsite rights revoke`,
|
|
95
95
|
HUBSITE_SET: `${prefix} hubsite set`,
|
|
96
|
-
HUBSITE_THEME_SYNC: `${prefix} hubsite theme sync`,
|
|
97
96
|
HUBSITE_UNREGISTER: `${prefix} hubsite unregister`,
|
|
98
97
|
KNOWLEDGEHUB_GET: `${prefix} knowledgehub get`,
|
|
99
98
|
KNOWLEDGEHUB_REMOVE: `${prefix} knowledgehub remove`,
|
|
@@ -206,8 +205,9 @@ exports.default = {
|
|
|
206
205
|
SITE_ENSURE: `${prefix} site ensure`,
|
|
207
206
|
SITE_GET: `${prefix} site get`,
|
|
208
207
|
SITE_GROUPIFY: `${prefix} site groupify`,
|
|
209
|
-
SITE_HUBSITE_DISCONNECT: `${prefix} site hubsite disconnect`,
|
|
210
208
|
SITE_HUBSITE_CONNECT: `${prefix} site hubsite connect`,
|
|
209
|
+
SITE_HUBSITE_DISCONNECT: `${prefix} site hubsite disconnect`,
|
|
210
|
+
SITE_HUBSITE_THEME_SYNC: `${prefix} site hubsite theme sync`,
|
|
211
211
|
SITE_LIST: `${prefix} site list`,
|
|
212
212
|
SITE_INPLACERECORDSMANAGEMENT_SET: `${prefix} site inplacerecordsmanagement set`,
|
|
213
213
|
SITE_RECYCLEBINITEM_LIST: `${prefix} site recyclebinitem list`,
|
|
@@ -0,0 +1,108 @@
|
|
|
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 _TodoTaskGetCommand_instances, _TodoTaskGetCommand_initTelemetry, _TodoTaskGetCommand_initOptions, _TodoTaskGetCommand_initOptionSets;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const request_1 = require("../../../../request");
|
|
19
|
+
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
20
|
+
const commands_1 = require("../../commands");
|
|
21
|
+
class TodoTaskGetCommand extends GraphCommand_1.default {
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
_TodoTaskGetCommand_instances.add(this);
|
|
25
|
+
__classPrivateFieldGet(this, _TodoTaskGetCommand_instances, "m", _TodoTaskGetCommand_initTelemetry).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _TodoTaskGetCommand_instances, "m", _TodoTaskGetCommand_initOptions).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _TodoTaskGetCommand_instances, "m", _TodoTaskGetCommand_initOptionSets).call(this);
|
|
28
|
+
}
|
|
29
|
+
get name() {
|
|
30
|
+
return commands_1.default.TASK_GET;
|
|
31
|
+
}
|
|
32
|
+
get description() {
|
|
33
|
+
return 'Get a specific task from a Microsoft To Do task list';
|
|
34
|
+
}
|
|
35
|
+
defaultProperties() {
|
|
36
|
+
return ['id', 'title', 'status', 'createdDateTime', 'lastModifiedDateTime'];
|
|
37
|
+
}
|
|
38
|
+
getTodoListId(args) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (args.options.listId) {
|
|
41
|
+
return args.options.listId;
|
|
42
|
+
}
|
|
43
|
+
const requestOptions = {
|
|
44
|
+
url: `${this.resource}/v1.0/me/todo/lists?$filter=displayName eq '${escape(args.options.listName)}'`,
|
|
45
|
+
headers: {
|
|
46
|
+
accept: 'application/json;odata.metadata=none'
|
|
47
|
+
},
|
|
48
|
+
responseType: 'json'
|
|
49
|
+
};
|
|
50
|
+
const response = yield request_1.default.get(requestOptions);
|
|
51
|
+
const taskList = response.value[0];
|
|
52
|
+
if (!taskList) {
|
|
53
|
+
throw `The specified task list does not exist`;
|
|
54
|
+
}
|
|
55
|
+
return taskList.id;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
commandAction(logger, args) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
try {
|
|
61
|
+
const listId = yield this.getTodoListId(args);
|
|
62
|
+
const requestOptions = {
|
|
63
|
+
url: `${this.resource}/v1.0/me/todo/lists/${listId}/tasks/${args.options.id}`,
|
|
64
|
+
headers: {
|
|
65
|
+
accept: 'application/json;odata.metadata=none'
|
|
66
|
+
},
|
|
67
|
+
responseType: 'json'
|
|
68
|
+
};
|
|
69
|
+
const item = yield request_1.default.get(requestOptions);
|
|
70
|
+
if (args.options.output === 'json') {
|
|
71
|
+
logger.log(item);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
logger.log({
|
|
75
|
+
id: item.id,
|
|
76
|
+
title: item.title,
|
|
77
|
+
status: item.status,
|
|
78
|
+
createdDateTime: item.createdDateTime,
|
|
79
|
+
lastModifiedDateTime: item.lastModifiedDateTime
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
this.handleRejectedODataJsonPromise(err);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
_TodoTaskGetCommand_instances = new WeakSet(), _TodoTaskGetCommand_initTelemetry = function _TodoTaskGetCommand_initTelemetry() {
|
|
90
|
+
this.telemetry.push((args) => {
|
|
91
|
+
Object.assign(this.telemetryProperties, {
|
|
92
|
+
listId: typeof args.options.listId !== 'undefined',
|
|
93
|
+
listName: typeof args.options.listName !== 'undefined'
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
}, _TodoTaskGetCommand_initOptions = function _TodoTaskGetCommand_initOptions() {
|
|
97
|
+
this.options.unshift({
|
|
98
|
+
option: '-i, --id <id>'
|
|
99
|
+
}, {
|
|
100
|
+
option: '--listName [listName]'
|
|
101
|
+
}, {
|
|
102
|
+
option: '--listId [listId]'
|
|
103
|
+
});
|
|
104
|
+
}, _TodoTaskGetCommand_initOptionSets = function _TodoTaskGetCommand_initOptionSets() {
|
|
105
|
+
this.optionSets.push(['listId', 'listName']);
|
|
106
|
+
};
|
|
107
|
+
module.exports = new TodoTaskGetCommand();
|
|
108
|
+
//# sourceMappingURL=task-get.js.map
|
|
@@ -8,6 +8,7 @@ exports.default = {
|
|
|
8
8
|
LIST_REMOVE: `${prefix} list remove`,
|
|
9
9
|
LIST_SET: `${prefix} list set`,
|
|
10
10
|
TASK_ADD: `${prefix} task add`,
|
|
11
|
+
TASK_GET: `${prefix} task get`,
|
|
11
12
|
TASK_LIST: `${prefix} task list`,
|
|
12
13
|
TASK_REMOVE: `${prefix} task remove`,
|
|
13
14
|
TASK_SET: `${prefix} task set`
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# aad user guest add
|
|
2
|
+
|
|
3
|
+
Invite an external user to the organization
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 aad user guest add [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`--emailAddress <emailAddress>`
|
|
14
|
+
: The email address of the user.
|
|
15
|
+
|
|
16
|
+
`--displayName [displayName]`
|
|
17
|
+
: The display name of the user.
|
|
18
|
+
|
|
19
|
+
`--inviteRedirectUrl [inviteRedirectUrl]`
|
|
20
|
+
: The URL the user should be redirected to once the invitation is redeemed. If not specified, default URL https://myapplications.microsoft.com will be set.
|
|
21
|
+
|
|
22
|
+
`--welcomeMessage [welcomeMessage]`
|
|
23
|
+
: Personal welcome message which will be added to the email along with the default email.
|
|
24
|
+
|
|
25
|
+
`--ccRecipients [ccRecipients]`
|
|
26
|
+
: Additional recipients the invitation message should be sent to. Currently only 1 additional recipient is supported.
|
|
27
|
+
|
|
28
|
+
`--messageLanguage [messageLanguage]`
|
|
29
|
+
: The language you want to send the default message in. The language format should be in [ISO 639](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500/ed06cf15-306c-43be-9053-ca81ca51e656). The default is `en-US`.
|
|
30
|
+
|
|
31
|
+
`--sendInvitationMessage`
|
|
32
|
+
: Indicates whether an email should be sent to the user.
|
|
33
|
+
|
|
34
|
+
--8<-- "docs/cmd/_global.md"
|
|
35
|
+
|
|
36
|
+
## Examples
|
|
37
|
+
|
|
38
|
+
Invite a user via email and set the display name
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
m365 aad user guest add --emailAddress john.doe@contoso.com --displayName "John Doe" --sendInvitationMessage
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Invite a user with a custom email and custom redirect url
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 aad user guest add --emailAddress john.doe@contoso.com --welcomeMessage "Hi John, welcome to the organization!" --sendInvitationMessage
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Invite a user and send an invitation mail in Dutch
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
m365 aad user guest add --emailAddress john.doe@contoso.com --messageLanguage nl-BE --sendInvitationMessage
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Response
|
|
57
|
+
|
|
58
|
+
=== "JSON"
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"id": "35f7f726-c541-4aef-a64e-a7b6868fe47f",
|
|
63
|
+
"inviteRedeemUrl": "https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3db373bc30-03b3-49bc-be72-9dd3e9027da8%26user%3d35f7f726-c541-4aef-a64e-a7b6868fe47f%26ticket%3dCjO3u3ZpQF2uthfZETfZ8gURzod5egvYI0uhaSN1Loo%25253d%26ver%3d2.0",
|
|
64
|
+
"invitedUserDisplayName": "John Doe",
|
|
65
|
+
"invitedUserType": "Guest",
|
|
66
|
+
"invitedUserEmailAddress": "john.doe@contoso.com",
|
|
67
|
+
"sendInvitationMessage": true,
|
|
68
|
+
"resetRedemption": false,
|
|
69
|
+
"inviteRedirectUrl": "https://myapplications.microsoft.com/",
|
|
70
|
+
"status": "PendingAcceptance",
|
|
71
|
+
"invitedUserMessageInfo": {
|
|
72
|
+
"messageLanguage": "en-US",
|
|
73
|
+
"customizedMessageBody": "Hi John, welcome to the organization!",
|
|
74
|
+
"ccRecipients": [
|
|
75
|
+
{
|
|
76
|
+
"emailAddress": {
|
|
77
|
+
"name": null,
|
|
78
|
+
"address": "maria.jones@contoso.com"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"invitedUser": {
|
|
84
|
+
"id": "5257b5b2-4056-4a45-a05e-df5c92d53e6e"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
=== "Text"
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
id : 35f7f726-c541-4aef-a64e-a7b6868fe47f
|
|
93
|
+
inviteRedeemUrl : https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3db373bc30-03b3-49bc-be72-9dd3e9027da8%26user%3d35f7f726-c541-4aef-a64e-a7b6868fe47f%26ticket%3dCjO3u3ZpQF2uthfZETfZ8gURzod5egvYI0uhaSN1Loo%25253d%26ver%3d2.0
|
|
94
|
+
invitedUserDisplayName : John Doe
|
|
95
|
+
invitedUserEmailAddress: liwidit556@adroh.com
|
|
96
|
+
invitedUserType : Guest
|
|
97
|
+
resetRedemption : false
|
|
98
|
+
sendInvitationMessage : true
|
|
99
|
+
status : PendingAcceptance
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
=== "CSV"
|
|
103
|
+
|
|
104
|
+
```csv
|
|
105
|
+
id,inviteRedeemUrl,invitedUserDisplayName,invitedUserEmailAddress,invitedUserType,resetRedemption,sendInvitationMessage,status
|
|
106
|
+
35f7f726-c541-4aef-a64e-a7b6868fe47f,https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3db373bc30-03b3-49bc-be72-9dd3e9027da8%26user%3d35f7f726-c541-4aef-a64e-a7b6868fe47f%26ticket%3dCjO3u3ZpQF2uthfZETfZ8gURzod5egvYI0uhaSN1Loo%25253d%26ver%3d2.0,John Doe,liwidit556@adroh.com,Guest,,1,PendingAcceptance
|
|
107
|
+
```
|
|
@@ -43,6 +43,9 @@ The predefined card is automatically adjusted based on which options have been s
|
|
|
43
43
|
|
|
44
44
|
If your custom card is a card template (card with placeholders like `${title}`), you can fill it with data either by specifying the complete data object using the `cardData` option, or by passing any number of arbitrary options that will be mapped onto the card. The arbitrary properties should not match any of the global options like `output`, `query`, `debug`, etc. Data options like `title`, `description`, `imageUrl` and `actionUrl` will be mapped onto the card as well.
|
|
45
45
|
|
|
46
|
+
!!! warning "Escaping JSON in PowerShell"
|
|
47
|
+
When using the `--card` and `--cardData` options it's possible to enter a JSON string. In PowerShell 5 to 7.2 [specific escaping rules](./../../user-guide/using-cli.md#escaping-double-quotes-in-powershell) apply due to an issue. Remember that you can also use [file tokens](./../../user-guide/using-cli.md#passing-complex-content-into-cli-options) instead.
|
|
48
|
+
|
|
46
49
|
## Examples
|
|
47
50
|
|
|
48
51
|
Send a predefined adaptive card with just title
|
|
@@ -43,26 +43,19 @@ The schema extension owner is the ID of the Azure AD application that is the own
|
|
|
43
43
|
|
|
44
44
|
The target types are the set of Microsoft Graph resource types (that support schema extensions) that this schema extension definition can be applied to. This option is specified as a comma-separated list
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
you
|
|
48
|
-
In addition, when using PowerShell, you should use the `--%` argument.
|
|
46
|
+
!!! warning "Escaping JSON in PowerShell"
|
|
47
|
+
When using the `--properties` option it's possible to enter a JSON string. In PowerShell 5 to 7.2 [specific escaping rules](./../../user-guide/using-cli.md#escaping-double-quotes-in-powershell) apply due to an issue. Remember that you can also use [file tokens](./../../user-guide/using-cli.md#passing-complex-content-into-cli-options) instead.
|
|
49
48
|
|
|
50
49
|
## Examples
|
|
51
50
|
|
|
52
51
|
Create a schema extension
|
|
53
52
|
|
|
54
53
|
```sh
|
|
55
|
-
m365 graph schemaextension add --id MySchemaExtension --description "My Schema Extension" --targetTypes Group --owner 62375ab9-6b52-47ed-826b-58e47e0e304b --properties
|
|
54
|
+
m365 graph schemaextension add --id MySchemaExtension --description "My Schema Extension" --targetTypes Group --owner 62375ab9-6b52-47ed-826b-58e47e0e304b --properties '[{"name":"myProp1","type":"Integer"},{"name":"myProp2","type":"String"}]'
|
|
56
55
|
```
|
|
57
56
|
|
|
58
57
|
Create a schema extension with a verified domain
|
|
59
58
|
|
|
60
59
|
```sh
|
|
61
|
-
m365 graph schemaextension add --id contoso_MySchemaExtension --description "My Schema Extension" --targetTypes Group --owner 62375ab9-6b52-47ed-826b-58e47e0e304b --properties
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Create a schema extension in PowerShell
|
|
65
|
-
|
|
66
|
-
```PowerShell
|
|
67
|
-
graph schemaextension add --id contoso_MySchemaExtension --description "My Schema Extension" --targetTypes Group --owner "62375ab9-6b52-47ed-826b-58e47e0e304b" --properties --% \`"[{""name"":""myProp1"",""type"":""Integer""},{""name"":""myProp2"",""type"":""String""}]\`
|
|
60
|
+
m365 graph schemaextension add --id contoso_MySchemaExtension --description "My Schema Extension" --targetTypes Group --owner 62375ab9-6b52-47ed-826b-58e47e0e304b --properties '[{"name":"myProp1","type":"Integer"},{"name":"myProp2","type":"String"}]'
|
|
68
61
|
```
|
|
@@ -35,9 +35,9 @@ m365 graph schemaextension set [options]
|
|
|
35
35
|
The lifecycle state of the schema extension. The initial state upon creation is `InDevelopment`.
|
|
36
36
|
Possible states transitions are from `InDevelopment` to `Available` and `Available` to `Deprecated`.
|
|
37
37
|
The target types are the set of Microsoft Graph resource types (that support schema extensions) that this schema extension definition can be applied to. This option is specified as a comma-separated list.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
In
|
|
38
|
+
|
|
39
|
+
!!! warning "Escaping JSON in PowerShell"
|
|
40
|
+
When using the `--properties` option it's possible to enter a JSON string. In PowerShell 5 to 7.2 [specific escaping rules](./../../user-guide/using-cli.md#escaping-double-quotes-in-powershell) apply due to an issue. Remember that you can also use [file tokens](./../../user-guide/using-cli.md#passing-complex-content-into-cli-options) instead.
|
|
41
41
|
|
|
42
42
|
## Examples
|
|
43
43
|
|
|
@@ -50,13 +50,7 @@ m365 graph schemaextension set --id MySchemaExtension --owner 62375ab9-6b52-47ed
|
|
|
50
50
|
Update the target types and properties of a schema extension
|
|
51
51
|
|
|
52
52
|
```sh
|
|
53
|
-
m365 graph schemaextension set --id contoso_MySchemaExtension --owner 62375ab9-6b52-47ed-826b-58e47e0e304b --targetTypes "Group,User" --properties
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Update the properties of a schema extension in PowerShell
|
|
57
|
-
|
|
58
|
-
```PowerShell
|
|
59
|
-
graph schemaextension set --id contoso_MySchemaExtension --owner 62375ab9-6b52-47ed-826b-58e47e0e304b --properties --% \`"[{""name"":""myProp1"",""type"":""Integer""},{""name"":""myProp2"",""type"":""String""}]\`
|
|
53
|
+
m365 graph schemaextension set --id contoso_MySchemaExtension --owner 62375ab9-6b52-47ed-826b-58e47e0e304b --targetTypes "Group,User" --properties '[{"name":"myProp1","type":"Integer"},{"name":"myProp2","type":"String"}]'
|
|
60
54
|
```
|
|
61
55
|
|
|
62
56
|
Change the status of a schema extension to 'Available'
|