@pnp/cli-microsoft365 10.9.0-beta.3261443 → 10.9.0-beta.a6007fc

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 (43) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/m365/entra/commands/m365group/m365group-get.js +3 -16
  4. package/dist/m365/entra/commands/m365group/m365group-list.js +1 -7
  5. package/dist/m365/entra/commands/pim/pim-role-assignment-eligibility-list.js +3 -9
  6. package/dist/m365/entra/commands/pim/pim-role-assignment-list.js +3 -9
  7. package/dist/m365/entra/commands/pim/pim-role-request-list.js +3 -9
  8. package/dist/m365/flow/commands/flow-list.js +7 -14
  9. package/dist/m365/flow/commands/run/run-get.js +1 -1
  10. package/dist/m365/graph/commands/subscription/subscription-add.js +3 -10
  11. package/dist/m365/pp/commands/solution/solution-publisher-list.js +1 -8
  12. package/dist/m365/purview/commands/threatassessment/threatassessment-get.js +2 -9
  13. package/dist/m365/spo/commands/file/file-move.js +2 -8
  14. package/dist/m365/spo/commands/hubsite/hubsite-get.js +5 -14
  15. package/dist/m365/spo/commands/hubsite/hubsite-list.js +2 -9
  16. package/dist/m365/spo/commands/page/clientsidepages.js +17 -49
  17. package/dist/m365/spo/commands/tenant/tenant-site-list.js +5 -16
  18. package/dist/m365/spo/commands/term/term-list.js +3 -10
  19. package/dist/m365/teams/commands/chat/chat-member-add.js +4 -10
  20. package/dist/m365/viva/commands/engage/engage-network-list.js +2 -8
  21. package/dist/m365/viva/commands.js +0 -1
  22. package/docs/docs/cmd/entra/m365group/m365group-get.mdx +5 -8
  23. package/docs/docs/cmd/entra/m365group/m365group-list.mdx +12 -14
  24. package/docs/docs/cmd/entra/pim/pim-role-assignment-eligibility-list.mdx +4 -7
  25. package/docs/docs/cmd/entra/pim/pim-role-assignment-list.mdx +6 -9
  26. package/docs/docs/cmd/entra/pim/pim-role-request-list.mdx +4 -7
  27. package/docs/docs/cmd/flow/flow-list.mdx +5 -8
  28. package/docs/docs/cmd/flow/run/run-get.mdx +1 -1
  29. package/docs/docs/cmd/graph/subscription/subscription-add.mdx +3 -6
  30. package/docs/docs/cmd/pp/solution/solution-publisher-list.mdx +4 -7
  31. package/docs/docs/cmd/purview/threatassessment/threatassessment-get.mdx +4 -7
  32. package/docs/docs/cmd/spo/file/file-move.mdx +1 -4
  33. package/docs/docs/cmd/spo/hubsite/hubsite-get.mdx +3 -6
  34. package/docs/docs/cmd/spo/hubsite/hubsite-list.mdx +4 -7
  35. package/docs/docs/cmd/spo/list/list-add.mdx +1 -1
  36. package/docs/docs/cmd/spo/list/list-set.mdx +2 -2
  37. package/docs/docs/cmd/spo/tenant/tenant-site-list.mdx +7 -10
  38. package/docs/docs/cmd/spo/term/term-list.mdx +4 -7
  39. package/docs/docs/cmd/teams/chat/chat-member-add.mdx +3 -6
  40. package/docs/docs/cmd/viva/engage/engage-network-list.mdx +4 -7
  41. package/package.json +1 -1
  42. package/dist/m365/viva/commands/engage/engage-community-remove.js +0 -99
  43. package/docs/docs/cmd/viva/engage/engage-community-remove.mdx +0 -61
@@ -40,16 +40,13 @@ m365 graph subscription add [options]
40
40
  : The latest version of TLS that the notification endpoint supports. Allowed values are `v1_0`, `v1_1`, `v1_2`, `v1_3`. Default is `v1_2`.
41
41
 
42
42
  `--includeResourceData`
43
- : (deprecated. Use option `withResourceData` instead) When set, the change notifications will include the changed resource data.
44
-
45
- `--withResourceData`
46
43
  : When set, the change notifications will include the changed resource data.
47
44
 
48
45
  `--encryptionCertificate [encryptionCertificate]`
49
- : A base64-encoded representation of a certificate with a public key used to encrypt resource data in change notifications. Required when using `withResourceData`.
46
+ : A base64-encoded representation of a certificate with a public key used to encrypt resource data in change notifications. Required when using `includeResourceData`.
50
47
 
51
48
  `--encryptionCertificateId [encryptionCertificateId]`
52
- : A custom app-provided identifier to help identify the certificate needed to decrypt resource data. Required when using `withResourceData`.
49
+ : A custom app-provided identifier to help identify the certificate needed to decrypt resource data. Required when using `includeResourceData`.
53
50
  ```
54
51
 
55
52
  <Global />
@@ -86,7 +83,7 @@ m365 graph subscription add --resource "me/mailFolders('Inbox')/messages" --chan
86
83
  Create a subscription on multiple change types and include resource data
87
84
 
88
85
  ```sh
89
- m365 graph subscription add --resource "me/messages" --changeTypes "updated,deleted" --withResourceData --encryptionCertificate 'Q0xJIGZvciBNaWNyb3NvZnQgMzY1' --encryptionCertificateId 'myCert' --notificationUrl "https://webhook.azurewebsites.net/api/send/myNotifyClient" --expirationDateTime "2016-11-20T18:23:45.935Z" --clientState "secretClientState"
86
+ m365 graph subscription add --resource "me/messages" --changeTypes "updated,deleted" --includeResourceData --encryptionCertificate 'Q0xJIGZvciBNaWNyb3NvZnQgMzY1' --encryptionCertificateId 'myCert' --notificationUrl "https://webhook.azurewebsites.net/api/send/myNotifyClient" --expirationDateTime "2016-11-20T18:23:45.935Z" --clientState "secretClientState"
90
87
  ```
91
88
 
92
89
  Create a subscription using the maximum allowed expiration for Group resources
@@ -16,13 +16,10 @@ m365 pp solution publisher list [options]
16
16
 
17
17
  ```md definition-list
18
18
  `-e, --environmentName <environmentName>`
19
- : The name of the environment.
19
+ : The name of the environment
20
20
 
21
21
  `--includeMicrosoftPublishers`
22
- : (deprecated. Use option `withMicrosoftPublishers` instead) Include the Microsoft Publishers.
23
-
24
- `--withMicrosoftPublishers`
25
- : Include the Microsoft Publishers.
22
+ : Include the Microsoft Publishers
26
23
 
27
24
  `--asAdmin`
28
25
  : Run the command as admin for environments you do not have explicitly assigned permissions to.
@@ -32,13 +29,13 @@ m365 pp solution publisher list [options]
32
29
 
33
30
  ## Examples
34
31
 
35
- List all publishers in a specific environment.
32
+ List all publishers in a specific environment
36
33
 
37
34
  ```sh
38
35
  m365 pp solution publisher list --environmentName "Default-2ca3eaa5-140f-4175-8261-3272edf9f339"
39
36
  ```
40
37
 
41
- List all publishers in a specific environment as Admin.
38
+ List all publishers in a specific environment as Admin
42
39
 
43
40
  ```sh
44
41
  m365 pp solution publisher list --environmentName "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --asAdmin
@@ -19,9 +19,6 @@ m365 purview threatassessment get [options]
19
19
  : The Id of the threat assessment.
20
20
 
21
21
  `--includeResults`
22
- : (deprecated. Use option `withResults` instead) Include the threat assessment results.
23
-
24
- `--withResults`
25
22
  : Include the threat assessment results.
26
23
  ```
27
24
 
@@ -38,7 +35,7 @@ m365 purview threatassessment get --id c37d695e-d581-4ae9-82a0-9364eba4291e
38
35
  Get a threat assessment including results.
39
36
 
40
37
  ```sh
41
- m365 purview threatassessment get --id c37d695e-d581-4ae9-82a0-9364eba4291e --withResults
38
+ m365 purview threatassessment get --id c37d695e-d581-4ae9-82a0-9364eba4291e --includeResults
42
39
  ```
43
40
 
44
41
  ## Response
@@ -121,9 +118,9 @@ m365 purview threatassessment get --id c37d695e-d581-4ae9-82a0-9364eba4291e --wi
121
118
  </TabItem>
122
119
  </Tabs>
123
120
 
124
- ### `withResults` response
121
+ ### `includeResults` response
125
122
 
126
- When we make use of the option `withResults` the response will differ.
123
+ When we make use of the option `includeResults` the response will differ.
127
124
 
128
125
  <Tabs>
129
126
  <TabItem value="JSON">
@@ -187,7 +184,7 @@ When we make use of the option `withResults` the response will differ.
187
184
  <TabItem value="Markdown">
188
185
 
189
186
  ```md
190
- # purview threatassessment get --id "8aaba0ac-ec4d-4e62-5774-08db16c68731" --withResults "true"
187
+ # purview threatassessment get --id "8aaba0ac-ec4d-4e62-5774-08db16c68731" --includeResults "true"
191
188
 
192
189
  Date: 25/02/2023
193
190
 
@@ -34,9 +34,6 @@ m365 spo file move [options]
34
34
  : Behavior when a file or folder with the same name is already present at the destination. Allowed values: `fail`, `replace`, `rename`. Defaults to `fail`.
35
35
 
36
36
  `--includeItemPermissions`
37
- : (deprecated. Use option `withItemPermissions` instead) Ensure that item-level permissions are preserved during the move.
38
-
39
- `--withItemPermissions`
40
37
  : Ensure that item-level permissions are preserved during the move.
41
38
 
42
39
  `--bypassSharedLock`
@@ -78,7 +75,7 @@ m365 spo file move --webUrl https://contoso.sharepoint.com/sites/project-x --sou
78
75
  Move a file referenced by its ID to another document library and retain item-level permissions.
79
76
 
80
77
  ```sh
81
- m365 spo file move --webUrl https://contoso.sharepoint.com/sites/project-x --sourceId b8cc341b-9c11-4f2d-aa2b-0ce9c18bcba2 --targetUrl "/sites/project-x/My Documents" --withItemPermissions
78
+ m365 spo file move --webUrl https://contoso.sharepoint.com/sites/project-x --sourceId b8cc341b-9c11-4f2d-aa2b-0ce9c18bcba2 --targetUrl "/sites/project-x/My Documents" --includeItemPermissions
82
79
  ```
83
80
 
84
81
  ## Response
@@ -25,9 +25,6 @@ m365 spo hubsite get [options]
25
25
  : URL of the hub site. Specify either `id`, `title`, or `url` but not multiple.
26
26
 
27
27
  `--includeAssociatedSites`
28
- : (deprecated. Use option `withAssociatedSites` instead) Include the associated sites in the result (only in JSON output).
29
-
30
- `--withAssociatedSites`
31
28
  : Include the associated sites in the result (only in JSON output)
32
29
  ```
33
30
 
@@ -56,7 +53,7 @@ m365 spo hubsite get --url 'https://contoso.sharepoint.com/sites/HubSite'
56
53
  Get information about the hub site with specific ID, including its associated sites. Associated site info is only shown in JSON output.
57
54
 
58
55
  ```sh
59
- m365 spo hubsite get --id 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a --withAssociatedSites --output json
56
+ m365 spo hubsite get --id 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a --includeAssociatedSites --output json
60
57
  ```
61
58
 
62
59
  ## Response
@@ -150,9 +147,9 @@ m365 spo hubsite get --id 2c1ba4c4-cd9b-4417-832f-92a34bc34b2a --withAssociatedS
150
147
  </TabItem>
151
148
  </Tabs>
152
149
 
153
- ### `withAssociatedSites` response
150
+ ### `includeAssociatedSites` response
154
151
 
155
- When we make use of the option `withAssociatedSites` the response will differ. This command can only be executed using --output json or an error will be thrown.
152
+ When we make use of the option `includeAssociatedSites` the response will differ. This command can only be executed using --output json or an error will be thrown.
156
153
 
157
154
  <Tabs>
158
155
  <TabItem value="JSON">
@@ -16,9 +16,6 @@ m365 spo hubsite list [options]
16
16
 
17
17
  ```md definition-list
18
18
  `-i, --includeAssociatedSites`
19
- : (deprecated. Use option `withAssociatedSites` instead) Include the associated sites in the result (only in JSON output).
20
-
21
- `--withAssociatedSites`
22
19
  : Include the associated sites in the result (only in JSON output).
23
20
  ```
24
21
 
@@ -39,7 +36,7 @@ m365 spo hubsite list
39
36
  List hub sites, including their associated sites, in the current tenant. Associated site info is only shown in JSON output.
40
37
 
41
38
  ```sh
42
- m365 spo hubsite list --withAssociatedSites --output json
39
+ m365 spo hubsite list --includeAssociatedSites --output json
43
40
  ```
44
41
 
45
42
  ## Response
@@ -122,9 +119,9 @@ m365 spo hubsite list --withAssociatedSites --output json
122
119
  </TabItem>
123
120
  </Tabs>
124
121
 
125
- ### `withAssociatedSites` response
122
+ ### `includeAssociatedSites` response
126
123
 
127
- When we make use of the option `withAssociatedSites` the response will differ.
124
+ When we make use of the option `includeAssociatedSites` the response will differ.
128
125
 
129
126
  <Tabs>
130
127
  <TabItem value="JSON">
@@ -179,7 +176,7 @@ When we make use of the option `withAssociatedSites` the response will differ.
179
176
  <TabItem value="Markdown">
180
177
 
181
178
  ```md
182
- # spo hubsite list --withAssociatedSites "true"
179
+ # spo hubsite list --includeAssociatedSites "true"
183
180
 
184
181
  Date: 2/20/2023
185
182
 
@@ -127,7 +127,7 @@ m365 spo list add [options]
127
127
  : Boolean value that specifies whether the list is hidden. Valid values are `true`, `false`.
128
128
 
129
129
  `--includedInMyFilesScope [includedInMyFilesScope]`
130
- : Specifies whether this list is accessible to an app principal that has been granted an OAuth scope that contains the string "myfiles" by a case-insensitive comparison when the current user is a site collection administrator of the personal site that contains the list.
130
+ : Specifies whether this list is accessible to an app principal that has been granted an OAuth scope that contains the string myfiles by a case-insensitive comparison when the current user is a site collection administrator of the personal site that contains the list.
131
131
 
132
132
  `--irmEnabled [irmEnabled]`
133
133
  : Gets or sets a Boolean value that specifies whether Information Rights Management (IRM) is enabled for the list.
@@ -14,7 +14,7 @@ m365 spo list set [options]
14
14
 
15
15
  ```md definition-list
16
16
  `-u, --webUrl <webUrl>`
17
- : URL of the site.
17
+ : URL of the site
18
18
 
19
19
  `--id [id]`
20
20
  : ID of the list. Specify either `id`, `title`, or `url` but not multiple.
@@ -128,7 +128,7 @@ m365 spo list set [options]
128
128
  : Boolean value that specifies whether the list is hidden. Valid values are `true`, `false`.
129
129
 
130
130
  `--includedInMyFilesScope [includedInMyFilesScope]`
131
- : Specifies whether this list is accessible to an app principal that has been granted an OAuth scope that contains the string "myfiles" by a case-insensitive comparison when the current user is a site collection administrator of the personal site that contains the list.
131
+ : Specifies whether this list is accessible to an app principal that has been granted an OAuth scope that contains the string myfiles by a case-insensitive comparison when the current user is a site collection administrator of the personal site that contains the list.
132
132
 
133
133
  `--irmEnabled [irmEnabled]`
134
134
  : Gets or sets a Boolean value that specifies whether Information Rights Management (IRM) is enabled for the list.
@@ -28,12 +28,9 @@ m365 spo site list
28
28
  : type of sites to list. To be used with values like `GROUP#0` and `SITEPAGEPUBLISHING#0`. Specify either `type` or `webTemplate`, but not both.
29
29
 
30
30
  `--filter [filter]`
31
- : filter to apply when retrieving sites.
31
+ : filter to apply when retrieving sites
32
32
 
33
33
  `--includeOneDriveSites`
34
- : (deprecated. Use option `withOneDriveSites` instead) use this switch to include OneDrive sites in the result when retrieving sites. Do not specify the `type` or `webTemplate` options when using this.
35
-
36
- `--withOneDriveSites`
37
34
  : use this switch to include OneDrive sites in the result when retrieving sites. Do not specify the `type` or `webTemplate` options when using this.
38
35
  ```
39
36
 
@@ -55,34 +52,34 @@ To use this command you have to have permissions to access the tenant admin site
55
52
 
56
53
  ## Examples
57
54
 
58
- List all sites in the currently connected tenant.
55
+ List all sites in the currently connected tenant
59
56
 
60
57
  ```sh
61
58
  m365 spo tenant site list
62
59
  ```
63
60
 
64
- List all group connected team sites in the currently connected tenant.
61
+ List all group connected team sites in the currently connected tenant
65
62
 
66
63
  ```sh
67
64
  m365 spo tenant site list --type TeamSite
68
65
  ```
69
66
 
70
- List all communication sites in the currently connected tenant.
67
+ List all communication sites in the currently connected tenant
71
68
 
72
69
  ```sh
73
70
  m365 spo tenant site list --type CommunicationSite
74
71
  ```
75
72
 
76
- List all group connected team sites that contain _project_ in the URL.
73
+ List all group connected team sites that contain _project_ in the URL
77
74
 
78
75
  ```sh
79
76
  m365 spo tenant site list --type TeamSite --filter "Url -like 'project'"
80
77
  ```
81
78
 
82
- List all sites in the currently connected tenant including OneDrive sites.
79
+ List all sites in the currently connected tenant including OneDrive sites
83
80
 
84
81
  ```sh
85
- m365 spo tenant site list --withOneDriveSites
82
+ m365 spo tenant site list --includeOneDriveSites
86
83
  ```
87
84
 
88
85
  ## Response
@@ -31,9 +31,6 @@ m365 spo term list [options]
31
31
  : Name of the term set for which to retrieve terms. Specify `termSetId` or `termSetName` but not both.
32
32
 
33
33
  `--includeChildTerms`
34
- : (deprecated. Use option `withChildTerms` instead) If specified, child terms are loaded as well.
35
-
36
- `--withChildTerms`
37
34
  : If specified, child terms are loaded as well.
38
35
  ```
39
36
 
@@ -72,7 +69,7 @@ m365 spo term list --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb --termSetI
72
69
  List taxonomy terms from the term group and term set with the given ID including child terms if any are found.
73
70
 
74
71
  ```sh
75
- m365 spo term list --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb --termSetId 0e8f395e-ff58-4d45-9ff7-e331ab728bec --withChildTerms
72
+ m365 spo term list --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb --termSetId 0e8f395e-ff58-4d45-9ff7-e331ab728bec --includeChildTerms
76
73
  ```
77
74
 
78
75
  ## Response
@@ -165,9 +162,9 @@ m365 spo term list --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb --termSetI
165
162
  </TabItem>
166
163
  </Tabs>
167
164
 
168
- ### `withChildTerms` response
165
+ ### `includeChildTerms` response
169
166
 
170
- When we make use of the option `withChildTerms` the response will differ.
167
+ When we make use of the option `includeChildTerms` the response will differ.
171
168
 
172
169
  <Tabs>
173
170
  <TabItem value="JSON">
@@ -248,7 +245,7 @@ When we make use of the option `withChildTerms` the response will differ.
248
245
  <TabItem value="Markdown">
249
246
 
250
247
  ```md
251
- # spo term list --termGroupName "PnPTermSets" --termSetName "PnP-Organizations" --withChildTerms "true"
248
+ # spo term list --termGroupName "PnPTermSets" --termSetName "PnP-Organizations" --includeChildTerms "true"
252
249
 
253
250
  Date: 5/8/2023
254
251
 
@@ -26,13 +26,10 @@ m365 teams chat member add [options]
26
26
  : The role for the user to add. Valid values are: `owner`, `guest`. Defaults to `owner`.
27
27
 
28
28
  `--visibleHistoryStartDateTime [visibleHistoryStartDateTime]`
29
- : Include chat history until a certain point in time. Specify either `visibleHistoryStartDateTime`, `includeAllHistory`, `withAllHistory` or neither.
29
+ : Include chat history until a certain point in time. Specify either `visibleHistoryStartDateTime`, `includeAllHistory`, or neither.
30
30
 
31
31
  `--includeAllHistory`
32
- : (deprecated. Use option `withChildTerms` instead) Include all chat history. Specify either `visibleHistoryStartDateTime`, `includeAllHistory`, `withAllHistory` or neither.
33
-
34
- `--withAllHistory`
35
- : Include all chat history. Specify either `visibleHistoryStartDateTime`, `includeAllHistory`, `withAllHistory` or neither.
32
+ : Include all chat history. Specify either `visibleHistoryStartDateTime`, `includeAllHistory`, or neither.
36
33
  ```
37
34
 
38
35
  <Global />
@@ -61,7 +58,7 @@ m365 teams chat member add --chatId 19:8b081ef6-4792-4def-b2c9-c363a1bf41d5_5031
61
58
  Add a guest member by UPN to a Teams chat and share all chat history.
62
59
 
63
60
  ```sh
64
- m365 teams chat member add --chatId 19:8b081ef6-4792-4def-b2c9-c363a1bf41d5_5031bb31-22c0-4f6f-9f73-91d34ab2b32d@unq.gbl.spaces --userName nelson.wilke@fabrikam.com --role guest --withAllHistory
61
+ m365 teams chat member add --chatId 19:8b081ef6-4792-4def-b2c9-c363a1bf41d5_5031bb31-22c0-4f6f-9f73-91d34ab2b32d@unq.gbl.spaces --userName nelson.wilke@fabrikam.com --role guest --includeAllHistory
65
62
  ```
66
63
 
67
64
  ## Response
@@ -16,10 +16,7 @@ m365 viva engage network list [options]
16
16
 
17
17
  ```md definition-list
18
18
  `--includeSuspended`
19
- : (deprecated. Use option `withSuspended` instead) Include the networks in which the user is suspended.
20
-
21
- `--withSuspended`
22
- : Include the networks in which the user is suspended.
19
+ : Include the networks in which the user is suspended
23
20
  ```
24
21
 
25
22
  <Global />
@@ -34,16 +31,16 @@ In order to use this command, you need to grant the Microsoft Entra application
34
31
 
35
32
  ## Examples
36
33
 
37
- Returns the current user's networks.
34
+ Returns the current user's networks
38
35
 
39
36
  ```sh
40
37
  m365 viva engage network list
41
38
  ```
42
39
 
43
- Returns the current user's networks including the networks in which the user is suspended.
40
+ Returns the current user's networks including the networks in which the user is suspended
44
41
 
45
42
  ```sh
46
- m365 viva engage network list --withSuspended
43
+ m365 viva engage network list --includeSuspended
47
44
  ```
48
45
 
49
46
  ## Response
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "10.9.0-beta.3261443",
3
+ "version": "10.9.0-beta.a6007fc",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",
@@ -1,99 +0,0 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- 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");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _VivaEngageCommunityRemoveCommand_instances, _VivaEngageCommunityRemoveCommand_initTelemetry, _VivaEngageCommunityRemoveCommand_initOptions, _VivaEngageCommunityRemoveCommand_initValidators, _VivaEngageCommunityRemoveCommand_initOptionSets, _VivaEngageCommunityRemoveCommand_initTypes;
7
- import { cli } from '../../../../cli/cli.js';
8
- import request from '../../../../request.js';
9
- import { validation } from '../../../../utils/validation.js';
10
- import { vivaEngage } from '../../../../utils/vivaEngage.js';
11
- import GraphCommand from '../../../base/GraphCommand.js';
12
- import commands from '../../commands.js';
13
- class VivaEngageCommunityRemoveCommand extends GraphCommand {
14
- get name() {
15
- return commands.ENGAGE_COMMUNITY_REMOVE;
16
- }
17
- get description() {
18
- return 'Removes a Viva Engage community';
19
- }
20
- constructor() {
21
- super();
22
- _VivaEngageCommunityRemoveCommand_instances.add(this);
23
- __classPrivateFieldGet(this, _VivaEngageCommunityRemoveCommand_instances, "m", _VivaEngageCommunityRemoveCommand_initTelemetry).call(this);
24
- __classPrivateFieldGet(this, _VivaEngageCommunityRemoveCommand_instances, "m", _VivaEngageCommunityRemoveCommand_initOptions).call(this);
25
- __classPrivateFieldGet(this, _VivaEngageCommunityRemoveCommand_instances, "m", _VivaEngageCommunityRemoveCommand_initValidators).call(this);
26
- __classPrivateFieldGet(this, _VivaEngageCommunityRemoveCommand_instances, "m", _VivaEngageCommunityRemoveCommand_initOptionSets).call(this);
27
- __classPrivateFieldGet(this, _VivaEngageCommunityRemoveCommand_instances, "m", _VivaEngageCommunityRemoveCommand_initTypes).call(this);
28
- }
29
- async commandAction(logger, args) {
30
- const removeCommunity = async () => {
31
- try {
32
- let communityId = args.options.id;
33
- if (args.options.displayName) {
34
- communityId = (await vivaEngage.getCommunityByDisplayName(args.options.displayName, ['id'])).id;
35
- }
36
- else if (args.options.entraGroupId) {
37
- communityId = (await vivaEngage.getCommunityByEntraGroupId(args.options.entraGroupId, ['id'])).id;
38
- }
39
- if (args.options.verbose) {
40
- await logger.logToStderr(`Removing Viva Engage community with ID ${communityId}...`);
41
- }
42
- const requestOptions = {
43
- url: `${this.resource}/v1.0/employeeExperience/communities/${communityId}`,
44
- headers: {
45
- accept: 'application/json;odata.metadata=none'
46
- }
47
- };
48
- await request.delete(requestOptions);
49
- }
50
- catch (err) {
51
- this.handleRejectedODataJsonPromise(err);
52
- }
53
- };
54
- if (args.options.force) {
55
- await removeCommunity();
56
- }
57
- else {
58
- const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove Viva Engage community '${args.options.id || args.options.displayName || args.options.entraGroupId}'?` });
59
- if (result) {
60
- await removeCommunity();
61
- }
62
- }
63
- }
64
- }
65
- _VivaEngageCommunityRemoveCommand_instances = new WeakSet(), _VivaEngageCommunityRemoveCommand_initTelemetry = function _VivaEngageCommunityRemoveCommand_initTelemetry() {
66
- this.telemetry.push((args) => {
67
- Object.assign(this.telemetryProperties, {
68
- id: args.options.id !== 'undefined',
69
- displayName: args.options.displayName !== 'undefined',
70
- entraGroupId: args.options.entraGroupId !== 'undefined',
71
- force: !!args.options.force
72
- });
73
- });
74
- }, _VivaEngageCommunityRemoveCommand_initOptions = function _VivaEngageCommunityRemoveCommand_initOptions() {
75
- this.options.unshift({
76
- option: '-i, --id [id]'
77
- }, {
78
- option: '-n, --displayName [displayName]'
79
- }, {
80
- option: '--entraGroupId [entraGroupId]'
81
- }, {
82
- option: '-f, --force'
83
- });
84
- }, _VivaEngageCommunityRemoveCommand_initValidators = function _VivaEngageCommunityRemoveCommand_initValidators() {
85
- this.validators.push(async (args) => {
86
- if (args.options.entraGroupId && !validation.isValidGuid(args.options.entraGroupId)) {
87
- return `${args.options.entraGroupId} is not a valid GUID for the option 'entraGroupId'.`;
88
- }
89
- return true;
90
- });
91
- }, _VivaEngageCommunityRemoveCommand_initOptionSets = function _VivaEngageCommunityRemoveCommand_initOptionSets() {
92
- this.optionSets.push({
93
- options: ['id', 'displayName', 'entraGroupId']
94
- });
95
- }, _VivaEngageCommunityRemoveCommand_initTypes = function _VivaEngageCommunityRemoveCommand_initTypes() {
96
- this.types.string.push('id', 'displayName', 'entraGroupId');
97
- };
98
- export default new VivaEngageCommunityRemoveCommand();
99
- //# sourceMappingURL=engage-community-remove.js.map
@@ -1,61 +0,0 @@
1
- import Global from '/docs/cmd/_global.mdx';
2
-
3
- # viva engage community remove
4
-
5
- Removes a Viva Engage community
6
-
7
- ## Usage
8
-
9
- ```sh
10
- m365 viva engage community remove [options]
11
- ```
12
-
13
- ## Options
14
-
15
- ```md definition-list
16
- `-i, --id [id]`
17
- : The id of the community. Specify either `id`, `displayName` or `entraGroupId`, but not multiple.
18
-
19
- `-n, --displayName [displayName]`
20
- : The name of the community. Specify either `id`, `displayName` or `entraGroupId`, but not multiple.
21
-
22
- `--entraGroupId [entraGroupId]`
23
- : The id of the Microsoft 365 group associated with the community. Specify either `id`, `displayName` or `entraGroupId`, but not multiple.
24
-
25
- `-f, --force`
26
- : Don't prompt for confirmation.
27
- ```
28
-
29
- <Global />
30
-
31
- ## Remarks
32
-
33
- :::info
34
-
35
- When the Viva Engage community is removed, all the associated Microsoft 365 content, including the M365 group, the document library, OneNote notebook, and Planner plan is deleted.
36
-
37
- :::
38
-
39
- ## Examples
40
-
41
- Remove a community specified by id without prompting
42
-
43
- ```sh
44
- m365 viva engage community remove --id eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiI0NzY5MTM1ODIwOSJ9 --force
45
- ```
46
-
47
- Remove a community specified by name and prompt for confirmation
48
-
49
- ```sh
50
- m365 viva engage community remove --displayName 'Software Engineers'
51
- ```
52
-
53
- Remove a community specified by Entra group id and prompt for confirmation
54
-
55
- ```sh
56
- m365 viva engage community remove --entraGroupId '0bed8b86-5026-4a93-ac7d-56750cc099f1'
57
- ```
58
-
59
- ## Response
60
-
61
- The command won't return a response on success