@pnp/cli-microsoft365 7.0.0-beta.3bbfbdf → 7.0.0-beta.40f2698
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/m365group/m365group-add.js +9 -3
- package/dist/m365/spo/commands/file/file-get.js +2 -2
- package/dist/m365/spo/commands/file/file-remove.js +2 -2
- package/dist/m365/spo/commands/file/file-version-clear.js +2 -2
- package/dist/m365/spo/commands/file/file-version-get.js +2 -2
- package/dist/m365/spo/commands/file/file-version-list.js +2 -2
- package/dist/m365/spo/commands/file/file-version-remove.js +2 -2
- package/dist/m365/spo/commands/file/file-version-restore.js +2 -2
- package/docs/docs/cmd/aad/m365group/m365group-add.mdx +13 -3
- package/docs/docs/cmd/spo/file/file-get.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-remove.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-version-clear.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-version-get.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-version-list.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-version-remove.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-version-restore.mdx +2 -2
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ class AadM365GroupAddCommand extends GraphCommand {
|
|
|
22
22
|
super();
|
|
23
23
|
_AadM365GroupAddCommand_instances.add(this);
|
|
24
24
|
this.pollingInterval = 500;
|
|
25
|
+
this.allowedVisibilities = ['Private', 'Public', 'HiddenMembership'];
|
|
25
26
|
__classPrivateFieldGet(this, _AadM365GroupAddCommand_instances, "m", _AadM365GroupAddCommand_initTelemetry).call(this);
|
|
26
27
|
__classPrivateFieldGet(this, _AadM365GroupAddCommand_instances, "m", _AadM365GroupAddCommand_initOptions).call(this);
|
|
27
28
|
__classPrivateFieldGet(this, _AadM365GroupAddCommand_instances, "m", _AadM365GroupAddCommand_initTypes).call(this);
|
|
@@ -32,6 +33,7 @@ class AadM365GroupAddCommand extends GraphCommand {
|
|
|
32
33
|
let ownerIds = [];
|
|
33
34
|
let memberIds = [];
|
|
34
35
|
const resourceBehaviorOptionsCollection = [];
|
|
36
|
+
const resolvedVisibility = args.options.visibility || 'Public';
|
|
35
37
|
if (this.verbose) {
|
|
36
38
|
await logger.logToStderr('Creating Microsoft 365 Group...');
|
|
37
39
|
}
|
|
@@ -63,7 +65,7 @@ class AadM365GroupAddCommand extends GraphCommand {
|
|
|
63
65
|
mailNickname: args.options.mailNickname,
|
|
64
66
|
resourceBehaviorOptions: resourceBehaviorOptionsCollection,
|
|
65
67
|
securityEnabled: false,
|
|
66
|
-
visibility:
|
|
68
|
+
visibility: resolvedVisibility
|
|
67
69
|
}
|
|
68
70
|
};
|
|
69
71
|
try {
|
|
@@ -185,7 +187,7 @@ _AadM365GroupAddCommand_instances = new WeakSet(), _AadM365GroupAddCommand_initT
|
|
|
185
187
|
owners: typeof args.options.owners !== 'undefined',
|
|
186
188
|
members: typeof args.options.members !== 'undefined',
|
|
187
189
|
logoPath: typeof args.options.logoPath !== 'undefined',
|
|
188
|
-
|
|
190
|
+
visibility: typeof args.options.visibility !== 'undefined',
|
|
189
191
|
allowMembersToPost: !!args.options.allowMembersToPost,
|
|
190
192
|
hideGroupInOutlook: !!args.options.hideGroupInOutlook,
|
|
191
193
|
subscribeNewGroupMembers: !!args.options.subscribeNewGroupMembers,
|
|
@@ -204,7 +206,8 @@ _AadM365GroupAddCommand_instances = new WeakSet(), _AadM365GroupAddCommand_initT
|
|
|
204
206
|
}, {
|
|
205
207
|
option: '--members [members]'
|
|
206
208
|
}, {
|
|
207
|
-
option: '--
|
|
209
|
+
option: '--visibility [visibility]',
|
|
210
|
+
autocomplete: this.allowedVisibilities
|
|
208
211
|
}, {
|
|
209
212
|
option: '--allowMembersToPost [allowMembersToPost]',
|
|
210
213
|
autocomplete: ['true', 'false']
|
|
@@ -252,6 +255,9 @@ _AadM365GroupAddCommand_instances = new WeakSet(), _AadM365GroupAddCommand_initT
|
|
|
252
255
|
return `Path '${fullPath}' points to a directory`;
|
|
253
256
|
}
|
|
254
257
|
}
|
|
258
|
+
if (args.options.visibility && this.allowedVisibilities.map(x => x.toLowerCase()).indexOf(args.options.visibility.toLowerCase()) === -1) {
|
|
259
|
+
return `${args.options.visibility} is not a valid visibility. Allowed values are ${this.allowedVisibilities.join(', ')}`;
|
|
260
|
+
}
|
|
255
261
|
return true;
|
|
256
262
|
});
|
|
257
263
|
};
|
|
@@ -129,9 +129,9 @@ _SpoFileGetCommand_instances = new WeakSet(), _SpoFileGetCommand_initTelemetry =
|
|
|
129
129
|
});
|
|
130
130
|
}, _SpoFileGetCommand_initOptions = function _SpoFileGetCommand_initOptions() {
|
|
131
131
|
this.options.unshift({
|
|
132
|
-
option: '-
|
|
132
|
+
option: '-u, --webUrl <webUrl>'
|
|
133
133
|
}, {
|
|
134
|
-
option: '
|
|
134
|
+
option: '--url [url]'
|
|
135
135
|
}, {
|
|
136
136
|
option: '-i, --id [id]'
|
|
137
137
|
}, {
|
|
@@ -92,11 +92,11 @@ _SpoFileRemoveCommand_instances = new WeakSet(), _SpoFileRemoveCommand_initTelem
|
|
|
92
92
|
});
|
|
93
93
|
}, _SpoFileRemoveCommand_initOptions = function _SpoFileRemoveCommand_initOptions() {
|
|
94
94
|
this.options.unshift({
|
|
95
|
-
option: '-
|
|
95
|
+
option: '-u, --webUrl <webUrl>'
|
|
96
96
|
}, {
|
|
97
97
|
option: '-i, --id [id]'
|
|
98
98
|
}, {
|
|
99
|
-
option: '
|
|
99
|
+
option: '--url [url]'
|
|
100
100
|
}, {
|
|
101
101
|
option: '--recycle'
|
|
102
102
|
}, {
|
|
@@ -79,9 +79,9 @@ _SpoFileVersionClearCommand_instances = new WeakSet(), _SpoFileVersionClearComma
|
|
|
79
79
|
});
|
|
80
80
|
}, _SpoFileVersionClearCommand_initOptions = function _SpoFileVersionClearCommand_initOptions() {
|
|
81
81
|
this.options.unshift({
|
|
82
|
-
option: '-
|
|
82
|
+
option: '-u, --webUrl <webUrl>'
|
|
83
83
|
}, {
|
|
84
|
-
option: '
|
|
84
|
+
option: '--fileUrl [fileUrl]'
|
|
85
85
|
}, {
|
|
86
86
|
option: '-i, --fileId [fileId]'
|
|
87
87
|
}, {
|
|
@@ -67,11 +67,11 @@ _SpoFileVersionGetCommand_instances = new WeakSet(), _SpoFileVersionGetCommand_i
|
|
|
67
67
|
});
|
|
68
68
|
}, _SpoFileVersionGetCommand_initOptions = function _SpoFileVersionGetCommand_initOptions() {
|
|
69
69
|
this.options.unshift({
|
|
70
|
-
option: '-
|
|
70
|
+
option: '-u, --webUrl <webUrl>'
|
|
71
71
|
}, {
|
|
72
72
|
option: '--label <label>'
|
|
73
73
|
}, {
|
|
74
|
-
option: '
|
|
74
|
+
option: '--fileUrl [fileUrl]'
|
|
75
75
|
}, {
|
|
76
76
|
option: '-i, --fileId [fileId]'
|
|
77
77
|
});
|
|
@@ -59,9 +59,9 @@ _SpoFileVersionListCommand_instances = new WeakSet(), _SpoFileVersionListCommand
|
|
|
59
59
|
});
|
|
60
60
|
}, _SpoFileVersionListCommand_initOptions = function _SpoFileVersionListCommand_initOptions() {
|
|
61
61
|
this.options.unshift({
|
|
62
|
-
option: '-
|
|
62
|
+
option: '-u, --webUrl <webUrl>'
|
|
63
63
|
}, {
|
|
64
|
-
option: '
|
|
64
|
+
option: '--fileUrl [fileUrl]'
|
|
65
65
|
}, {
|
|
66
66
|
option: '-i, --fileId [fileId]'
|
|
67
67
|
});
|
|
@@ -80,11 +80,11 @@ _SpoFileVersionRemoveCommand_instances = new WeakSet(), _SpoFileVersionRemoveCom
|
|
|
80
80
|
});
|
|
81
81
|
}, _SpoFileVersionRemoveCommand_initOptions = function _SpoFileVersionRemoveCommand_initOptions() {
|
|
82
82
|
this.options.unshift({
|
|
83
|
-
option: '-
|
|
83
|
+
option: '-u, --webUrl <webUrl>'
|
|
84
84
|
}, {
|
|
85
85
|
option: '--label <label>'
|
|
86
86
|
}, {
|
|
87
|
-
option: '
|
|
87
|
+
option: '--fileUrl [fileUrl]'
|
|
88
88
|
}, {
|
|
89
89
|
option: '-i, --fileId [fileId]'
|
|
90
90
|
}, {
|
|
@@ -80,11 +80,11 @@ _SpoFileVersionRestoreCommand_instances = new WeakSet(), _SpoFileVersionRestoreC
|
|
|
80
80
|
});
|
|
81
81
|
}, _SpoFileVersionRestoreCommand_initOptions = function _SpoFileVersionRestoreCommand_initOptions() {
|
|
82
82
|
this.options.unshift({
|
|
83
|
-
option: '-
|
|
83
|
+
option: '-u, --webUrl <webUrl>'
|
|
84
84
|
}, {
|
|
85
85
|
option: '--label <label>'
|
|
86
86
|
}, {
|
|
87
|
-
option: '
|
|
87
|
+
option: '--fileUrl [fileUrl]'
|
|
88
88
|
}, {
|
|
89
89
|
option: '-i, --fileId [fileId]'
|
|
90
90
|
}, {
|
|
@@ -30,8 +30,8 @@ m365 aad m365group add [options]
|
|
|
30
30
|
`--members [members]`
|
|
31
31
|
: Comma-separated list of Microsoft 365 Group members
|
|
32
32
|
|
|
33
|
-
`--
|
|
34
|
-
:
|
|
33
|
+
`--visibility [visibility]`
|
|
34
|
+
: Specifies the group join policy and group content visibility for groups. Possible values are: `Private`, `Public`, or `HiddenMembership`. Defaults to `Public`.
|
|
35
35
|
|
|
36
36
|
`--allowMembersToPost [allowMembersToPost]`
|
|
37
37
|
: Set if only group members should be able to post conversations to the group
|
|
@@ -53,9 +53,19 @@ m365 aad m365group add [options]
|
|
|
53
53
|
|
|
54
54
|
## Remarks
|
|
55
55
|
|
|
56
|
+
You cannot change the group type when you choose `HiddenMembership` visibility. HiddenMembership can be set only for Microsoft 365 groups, when the groups are created. It can't be updated later.
|
|
57
|
+
|
|
56
58
|
When specifying the path to the logo image you can use both relative and absolute paths. Note, that ~ in the path, will not be resolved and will most likely result in an error.
|
|
57
59
|
If an invalid user is provided in the comma-separated list of Owners or Members, the command operation will fail and the Microsoft 365 Group will not be created.
|
|
58
60
|
|
|
61
|
+
Group visibility options:
|
|
62
|
+
|
|
63
|
+
Value | Description
|
|
64
|
+
-------|-------------
|
|
65
|
+
Public | Anyone can join the group without needing owner permission. Anyone can view the attributes of the group. Anyone can see the members of the group.
|
|
66
|
+
Private | Owner permission is needed to join the group. Anyone can view the attributes of the group. Anyone can see the members of the group.
|
|
67
|
+
HiddenMembership | Owner permission is needed to join the group. Guest users cannot view the attributes of the group. Non-members cannot see the members of the group. Administrators (global, company, user, and helpdesk) can view the membership of the group. The group appears in the global address book (GAL).
|
|
68
|
+
|
|
59
69
|
## Examples
|
|
60
70
|
|
|
61
71
|
Create a public Microsoft 365 Group
|
|
@@ -67,7 +77,7 @@ m365 aad m365group add --displayName Finance --description "This is the Contoso
|
|
|
67
77
|
Create a private Microsoft 365 Group
|
|
68
78
|
|
|
69
79
|
```sh
|
|
70
|
-
m365 aad m365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --
|
|
80
|
+
m365 aad m365group add --displayName Finance --description "This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more." --mailNickname finance --visibility Private
|
|
71
81
|
```
|
|
72
82
|
|
|
73
83
|
Create a public Microsoft 365 Group and set specified users as its owners
|
|
@@ -15,10 +15,10 @@ m365 spo file get [options]
|
|
|
15
15
|
## Options
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
|
-
`-
|
|
18
|
+
`-u, --webUrl <webUrl>`
|
|
19
19
|
: The URL of the site where the file is located
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
`--url [url]`
|
|
22
22
|
: The server- or site-relative decoded URL of the file to retrieve. Specify either `url` or `id` but not both
|
|
23
23
|
|
|
24
24
|
`-i, --id [id]`
|
|
@@ -19,13 +19,13 @@ m365 spo page template remove
|
|
|
19
19
|
## Options
|
|
20
20
|
|
|
21
21
|
```md definition-list
|
|
22
|
-
`-
|
|
22
|
+
`-u, --webUrl <webUrl>`
|
|
23
23
|
: URL of the site where the file to remove is located
|
|
24
24
|
|
|
25
25
|
`-i, --id [id]`
|
|
26
26
|
: The ID of the file to remove. Specify either `id` or `url` but not both
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
`--url [url]`
|
|
29
29
|
: The server- or site-relative decoded URL of the file to remove. Specify either `id` or `url` but not both
|
|
30
30
|
|
|
31
31
|
`--recycle`
|
|
@@ -13,10 +13,10 @@ m365 spo file version clear [options]
|
|
|
13
13
|
## Options
|
|
14
14
|
|
|
15
15
|
```md definition-list
|
|
16
|
-
`-
|
|
16
|
+
`-u, --webUrl <webUrl>`
|
|
17
17
|
: The URL of the site where the file is located
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
`--fileUrl [fileUrl]`
|
|
20
20
|
: The server- or site-relative decoded URL of the file. Specify either `fileUrl` or `fileId` but not both
|
|
21
21
|
|
|
22
22
|
`-i, --fileId [fileId]`
|
|
@@ -15,13 +15,13 @@ m365 spo file version get [options]
|
|
|
15
15
|
## Options
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
|
-
`-
|
|
18
|
+
`-u, --webUrl <webUrl>`
|
|
19
19
|
: The URL of the site where the file is located
|
|
20
20
|
|
|
21
21
|
`--label <label>`
|
|
22
22
|
: Label of version which will be retrieved
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
`--fileUrl [fileUrl]`
|
|
25
25
|
: The server- or site-relative decoded URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
|
|
26
26
|
|
|
27
27
|
`-i, --fileId [fileId]`
|
|
@@ -15,10 +15,10 @@ m365 spo file version list [options]
|
|
|
15
15
|
## Options
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
|
-
`-
|
|
18
|
+
`-u, --webUrl <webUrl>`
|
|
19
19
|
: The URL of the site where the file is located
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
`--fileUrl [fileUrl]`
|
|
22
22
|
: The server- or site-relative decoded URL of the file. Specify either `fileUrl` or `fileId` but not both
|
|
23
23
|
|
|
24
24
|
`-i, --fileId [fileId]`
|
|
@@ -13,13 +13,13 @@ m365 spo file version remove [options]
|
|
|
13
13
|
## Options
|
|
14
14
|
|
|
15
15
|
```md definition-list
|
|
16
|
-
`-
|
|
16
|
+
`-u, --webUrl <webUrl>`
|
|
17
17
|
: The URL of the site where the file is located
|
|
18
18
|
|
|
19
19
|
`--label <label>`
|
|
20
20
|
: Label of version which will be removed
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
`--fileUrl [fileUrl]`
|
|
23
23
|
: The server- or site-relative decoded URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
|
|
24
24
|
|
|
25
25
|
`-i, --fileId [fileId]`
|
|
@@ -13,13 +13,13 @@ m365 spo file version restore [options]
|
|
|
13
13
|
## Options
|
|
14
14
|
|
|
15
15
|
```md definition-list
|
|
16
|
-
`-
|
|
16
|
+
`-u, --webUrl <webUrl>`
|
|
17
17
|
: The URL of the site where the file is located
|
|
18
18
|
|
|
19
19
|
`--label <label>`
|
|
20
20
|
: Label of version which will be restored
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
`--fileUrl [fileUrl]`
|
|
23
23
|
: The server- or site-relative decoded URL of the file whose version will be restored. Specify either `fileUrl` or `fileId` but not both
|
|
24
24
|
|
|
25
25
|
`-i, --fileId [fileId]`
|
package/package.json
CHANGED