@pnp/cli-microsoft365 11.12.0-beta.8589b73 → 12.0.0-beta.c9bd7f3

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 (166) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/Auth.js +2 -6
  4. package/dist/auth/FileTokenStorage.js +0 -3
  5. package/dist/auth/msalCachePlugin.js +201 -12
  6. package/dist/m365/commands/logout.js +2 -4
  7. package/dist/m365/entra/commands/m365group/m365group-remove.js +9 -2
  8. package/dist/m365/spe/commands/container/container-remove.js +6 -7
  9. package/dist/m365/spfx/commands/project/DeployWorkflow.js +7 -15
  10. package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-add.js +30 -2
  11. package/dist/m365/spfx/commands/project/project-github-workflow-add.js +12 -2
  12. package/dist/m365/spo/commands/cdn/cdn-get.js +8 -35
  13. package/dist/m365/spo/commands/cdn/cdn-origin-add.js +9 -36
  14. package/dist/m365/spo/commands/cdn/cdn-origin-list.js +8 -34
  15. package/dist/m365/spo/commands/cdn/cdn-origin-remove.js +10 -39
  16. package/dist/m365/spo/commands/cdn/cdn-policy-list.js +8 -34
  17. package/dist/m365/spo/commands/cdn/cdn-policy-set.js +10 -45
  18. package/dist/m365/spo/commands/cdn/cdn-set.js +10 -46
  19. package/dist/m365/spo/commands/contenttype/contenttype-sync.js +12 -24
  20. package/dist/m365/spo/commands/file/file-add.js +2 -6
  21. package/dist/m365/spo/commands/file/file-archive.js +1 -1
  22. package/dist/m365/spo/commands/file/file-remove.js +5 -5
  23. package/dist/m365/spo/commands/file/file-unarchive.js +1 -1
  24. package/dist/m365/spo/commands/folder/folder-archive.js +1 -1
  25. package/dist/m365/spo/commands/folder/folder-remove.js +5 -5
  26. package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-get.js +5 -0
  27. package/dist/m365/spo/commands/hidedefaultthemes/hidedefaultthemes-set.js +8 -26
  28. package/dist/m365/spo/commands/homesite/homesite-list.js +5 -0
  29. package/dist/m365/spo/commands/list/list-remove.js +4 -4
  30. package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +5 -4
  31. package/dist/m365/spo/commands/listitem/listitem-get.js +15 -7
  32. package/dist/m365/spo/commands/listitem/listitem-remove.js +8 -5
  33. package/dist/m365/spo/commands/page/page-header-set.js +123 -64
  34. package/dist/m365/spo/commands/page/page-remove.js +7 -7
  35. package/dist/m365/spo/commands/site/site-list.js +60 -49
  36. package/dist/m365/spo/commands/site/site-remove.js +12 -6
  37. package/dist/m365/spo/commands/spo-get.js +5 -0
  38. package/dist/m365/spo/commands/spo-set.js +10 -21
  39. package/dist/m365/spo/commands/storageentity/storageentity-get.js +23 -17
  40. package/dist/m365/spo/commands/storageentity/storageentity-list.js +39 -36
  41. package/dist/m365/spo/commands/storageentity/storageentity-remove.js +26 -33
  42. package/dist/m365/spo/commands/storageentity/storageentity-set.js +26 -36
  43. package/dist/m365/spo/commands/user/user-ensure.js +24 -60
  44. package/dist/m365/spo/commands/user/user-get.js +25 -65
  45. package/dist/m365/spo/commands/user/user-list.js +10 -18
  46. package/dist/m365/spo/commands/user/user-remove.js +26 -68
  47. package/dist/m365/spo/commands/userprofile/userprofile-get.js +10 -23
  48. package/dist/m365/spo/commands/userprofile/userprofile-set.js +10 -19
  49. package/dist/m365/spo/commands/web/web-add.js +20 -55
  50. package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +10 -18
  51. package/dist/m365/spo/commands/web/web-get.js +12 -30
  52. package/dist/m365/spo/commands/web/web-installedlanguage-list.js +10 -18
  53. package/dist/m365/spo/commands/web/web-list.js +10 -18
  54. package/dist/m365/spo/commands/web/web-reindex.js +10 -18
  55. package/dist/m365/spo/commands/web/web-remove.js +11 -27
  56. package/dist/m365/spo/commands/web/web-retentionlabel-list.js +10 -18
  57. package/dist/m365/spo/commands/web/web-roleassignment-add.js +40 -64
  58. package/dist/m365/spo/commands/web/web-roleassignment-remove.js +31 -58
  59. package/dist/m365/spo/commands/web/web-roleinheritance-break.js +12 -36
  60. package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +11 -29
  61. package/dist/m365/spo/commands/web/web-set.js +26 -96
  62. package/dist/m365/spo/commands.js +0 -4
  63. package/dist/m365/teams/commands/channel/channel-list.js +2 -6
  64. package/dist/m365/teams/commands/channel/channel-member-add.js +2 -6
  65. package/dist/m365/teams/commands/channel/channel-member-list.js +2 -6
  66. package/dist/m365/teams/commands/channel/channel-member-remove.js +2 -6
  67. package/dist/m365/teams/commands/channel/channel-member-set.js +2 -6
  68. package/dist/m365/teams/commands/channel/channel-remove.js +2 -8
  69. package/dist/m365/teams/commands/channel/channel-set.js +2 -8
  70. package/dist/m365/teams/commands/tab/tab-get.js +2 -6
  71. package/dist/m365/teams/commands/team/team-archive.js +2 -6
  72. package/dist/m365/teams/commands/team/team-remove.js +2 -6
  73. package/dist/m365/teams/commands/team/team-unarchive.js +2 -6
  74. package/docs/docs/cmd/entra/m365group/m365group-remove.mdx +6 -3
  75. package/docs/docs/cmd/spe/container/container-remove.mdx +5 -5
  76. package/docs/docs/cmd/spo/contenttype/contenttype-sync.mdx +4 -4
  77. package/docs/docs/cmd/spo/file/file-add.mdx +2 -2
  78. package/docs/docs/cmd/spo/file/file-archive.mdx +8 -0
  79. package/docs/docs/cmd/spo/file/file-checkin.mdx +21 -0
  80. package/docs/docs/cmd/spo/file/file-checkout.mdx +21 -0
  81. package/docs/docs/cmd/spo/file/file-copy.mdx +19 -0
  82. package/docs/docs/cmd/spo/file/file-get.mdx +19 -0
  83. package/docs/docs/cmd/spo/file/file-list.mdx +19 -0
  84. package/docs/docs/cmd/spo/file/file-move.mdx +19 -0
  85. package/docs/docs/cmd/spo/file/file-remove.mdx +25 -4
  86. package/docs/docs/cmd/spo/file/file-rename.mdx +19 -0
  87. package/docs/docs/cmd/spo/file/file-unarchive.mdx +8 -0
  88. package/docs/docs/cmd/spo/folder/folder-archive.mdx +6 -0
  89. package/docs/docs/cmd/spo/folder/folder-remove.mdx +4 -4
  90. package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +21 -0
  91. package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.mdx +21 -0
  92. package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +21 -0
  93. package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +21 -0
  94. package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.mdx +21 -0
  95. package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.mdx +21 -0
  96. package/docs/docs/cmd/spo/list/list-add.mdx +19 -0
  97. package/docs/docs/cmd/spo/list/list-contenttype-add.mdx +19 -0
  98. package/docs/docs/cmd/spo/list/list-contenttype-default-set.mdx +21 -0
  99. package/docs/docs/cmd/spo/list/list-contenttype-list.mdx +19 -0
  100. package/docs/docs/cmd/spo/list/list-contenttype-remove.mdx +21 -0
  101. package/docs/docs/cmd/spo/list/list-defaultvalue-clear.mdx +21 -0
  102. package/docs/docs/cmd/spo/list/list-defaultvalue-list.mdx +19 -0
  103. package/docs/docs/cmd/spo/list/list-defaultvalue-remove.mdx +21 -0
  104. package/docs/docs/cmd/spo/list/list-defaultvalue-set.mdx +21 -0
  105. package/docs/docs/cmd/spo/list/list-get.mdx +19 -0
  106. package/docs/docs/cmd/spo/list/list-list.mdx +19 -0
  107. package/docs/docs/cmd/spo/list/list-remove.mdx +25 -4
  108. package/docs/docs/cmd/spo/list/list-retentionlabel-ensure.mdx +21 -0
  109. package/docs/docs/cmd/spo/list/list-retentionlabel-get.mdx +19 -0
  110. package/docs/docs/cmd/spo/list/list-retentionlabel-remove.mdx +21 -0
  111. package/docs/docs/cmd/spo/list/list-roleassignment-add.mdx +21 -0
  112. package/docs/docs/cmd/spo/list/list-roleassignment-remove.mdx +21 -0
  113. package/docs/docs/cmd/spo/list/list-roleinheritance-break.mdx +21 -0
  114. package/docs/docs/cmd/spo/list/list-roleinheritance-reset.mdx +21 -0
  115. package/docs/docs/cmd/spo/list/list-sensitivitylabel-ensure.mdx +23 -0
  116. package/docs/docs/cmd/spo/list/list-set.mdx +21 -0
  117. package/docs/docs/cmd/spo/list/list-sitescript-get.mdx +19 -0
  118. package/docs/docs/cmd/spo/list/list-view-add.mdx +19 -0
  119. package/docs/docs/cmd/spo/list/list-view-field-add.mdx +21 -0
  120. package/docs/docs/cmd/spo/list/list-view-field-remove.mdx +21 -0
  121. package/docs/docs/cmd/spo/list/list-view-field-set.mdx +21 -0
  122. package/docs/docs/cmd/spo/list/list-view-get.mdx +19 -0
  123. package/docs/docs/cmd/spo/list/list-view-list.mdx +19 -0
  124. package/docs/docs/cmd/spo/list/list-view-remove.mdx +21 -0
  125. package/docs/docs/cmd/spo/list/list-view-set.mdx +19 -0
  126. package/docs/docs/cmd/spo/list/list-webhook-add.mdx +19 -0
  127. package/docs/docs/cmd/spo/list/list-webhook-get.mdx +19 -0
  128. package/docs/docs/cmd/spo/list/list-webhook-list.mdx +19 -0
  129. package/docs/docs/cmd/spo/list/list-webhook-remove.mdx +21 -0
  130. package/docs/docs/cmd/spo/list/list-webhook-set.mdx +21 -0
  131. package/docs/docs/cmd/spo/listitem/listitem-attachment-add.mdx +19 -0
  132. package/docs/docs/cmd/spo/listitem/listitem-attachment-get.mdx +19 -0
  133. package/docs/docs/cmd/spo/listitem/listitem-attachment-list.mdx +19 -0
  134. package/docs/docs/cmd/spo/listitem/listitem-attachment-remove.mdx +19 -0
  135. package/docs/docs/cmd/spo/listitem/listitem-attachment-set.mdx +19 -0
  136. package/docs/docs/cmd/spo/listitem/listitem-batch-remove.mdx +8 -2
  137. package/docs/docs/cmd/spo/listitem/listitem-get.mdx +13 -7
  138. package/docs/docs/cmd/spo/listitem/listitem-remove.mdx +8 -2
  139. package/docs/docs/cmd/spo/page/page-header-set.mdx +9 -9
  140. package/docs/docs/cmd/spo/page/page-remove.mdx +4 -4
  141. package/docs/docs/cmd/spo/site/site-apppermission-add.mdx +52 -21
  142. package/docs/docs/cmd/spo/site/site-list.mdx +22 -1
  143. package/docs/docs/cmd/spo/site/site-remove.mdx +5 -2
  144. package/docs/docs/cmd/spo/storageentity/storageentity-get.mdx +11 -2
  145. package/docs/docs/cmd/spo/storageentity/storageentity-list.mdx +9 -3
  146. package/docs/docs/cmd/spo/storageentity/storageentity-remove.mdx +6 -6
  147. package/docs/docs/cmd/spo/storageentity/storageentity-set.mdx +10 -4
  148. package/docs/docs/cmd/teams/app/app-install.mdx +21 -0
  149. package/docs/docs/cmd/teams/app/app-list.mdx +19 -0
  150. package/docs/docs/cmd/teams/app/app-publish.mdx +17 -0
  151. package/docs/docs/cmd/teams/app/app-remove.mdx +19 -0
  152. package/docs/docs/cmd/teams/app/app-uninstall.mdx +21 -0
  153. package/docs/docs/cmd/teams/app/app-update.mdx +19 -0
  154. package/docs/docs/cmd/tenant/id/id-get.mdx +15 -0
  155. package/docs/docs/cmd/tenant/info/info-get.mdx +19 -0
  156. package/docs/docs/cmd/tenant/people/people-pronouns-get.mdx +19 -0
  157. package/docs/docs/cmd/tenant/people/people-pronouns-set.mdx +19 -0
  158. package/docs/docs/cmd/tenant/report/report-settings-get.mdx +19 -0
  159. package/docs/docs/cmd/tenant/report/report-settings-set.mdx +21 -0
  160. package/docs/docs/cmd/tenant/security/security-alerts-list.mdx +19 -0
  161. package/npm-shrinkwrap.json +1541 -1163
  162. package/package.json +22 -17
  163. package/dist/m365/spo/commands/web/web-rule-list.js +0 -111
  164. package/dist/m365/spo/commands/web/web-rule-remove.js +0 -57
  165. package/docs/docs/cmd/spo/web/web-rule-list.mdx +0 -193
  166. package/docs/docs/cmd/spo/web/web-rule-remove.mdx +0 -71
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "11.12.0-beta.8589b73",
3
+ "version": "12.0.0-beta.c9bd7f3",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",
@@ -302,34 +302,35 @@
302
302
  }
303
303
  },
304
304
  "dependencies": {
305
- "@azure/msal-common": "^16.11.3",
306
- "@azure/msal-node": "^5.4.3",
307
- "@inquirer/confirm": "^6.1.1",
308
- "@inquirer/input": "^5.1.2",
309
- "@inquirer/select": "^5.2.1",
310
- "@xmldom/xmldom": "^0.9.10",
305
+ "@azure/msal-common": "^16.13.0",
306
+ "@azure/msal-node": "^5.6.0",
307
+ "@inquirer/confirm": "^6.2.0",
308
+ "@inquirer/input": "^5.1.3",
309
+ "@inquirer/select": "^5.2.2",
310
+ "@xmldom/xmldom": "^0.9.12",
311
311
  "adaptive-expressions": "^4.23.3",
312
312
  "adaptivecards": "^3.0.6",
313
313
  "adaptivecards-templating": "^2.3.1",
314
314
  "adm-zip": "^0.6.0",
315
- "applicationinsights": "^3.15.1",
316
- "axios": "^1.19.0",
315
+ "applicationinsights": "^3.16.0",
316
+ "axios": "^1.20.0",
317
317
  "chalk": "^6.0.0",
318
318
  "clipboardy": "^5.3.2",
319
319
  "configstore": "^8.0.0",
320
320
  "csv-parse": "^6.2.1",
321
- "csv-stringify": "^6.8.1",
321
+ "csv-stringify": "^6.8.3",
322
322
  "easy-table": "^1.2.0",
323
323
  "jmespath": "^0.16.0",
324
324
  "json-to-ast": "^2.1.0",
325
325
  "node-forge": "^1.4.0",
326
326
  "omelette": "^0.4.17",
327
- "open": "^11.0.0",
327
+ "open": "^11.0.1",
328
+ "proper-lockfile": "^4.1.2",
328
329
  "semver": "^7.8.5",
329
330
  "strip-json-comments": "^5.0.3",
330
331
  "typescript": "^5.9.3",
331
332
  "update-notifier": "^7.3.1",
332
- "uuid": "^14.0.1",
333
+ "uuid": "^14.0.2",
333
334
  "yaml": "^2.9.0",
334
335
  "yargs-parser": "^22.0.0",
335
336
  "zod": "^4.4.3"
@@ -347,21 +348,25 @@
347
348
  "@types/node": "^24.13.3",
348
349
  "@types/node-forge": "^1.3.14",
349
350
  "@types/omelette": "^0.4.5",
350
- "@types/semver": "^7.7.1",
351
+ "@types/proper-lockfile": "^4.1.4",
352
+ "@types/semver": "^7.8.0",
351
353
  "@types/sinon": "^22.0.0",
352
354
  "@types/update-notifier": "^6.0.8",
353
355
  "@types/uuid": "^10.0.0",
354
356
  "@types/yargs-parser": "^21.0.3",
355
- "@typescript-eslint/eslint-plugin": "^8.65.0",
357
+ "@typescript-eslint/eslint-plugin": "^8.68.0",
356
358
  "@typescript-eslint/parser": "^8.58.0",
357
359
  "c8": "^12.0.0",
358
- "eslint": "^10.8.0",
360
+ "eslint": "^10.9.1",
359
361
  "eslint-plugin-mocha": "^11.3.0",
360
- "globals": "^17.8.0",
361
- "mocha": "^11.7.6",
362
+ "globals": "^17.11.0",
363
+ "mocha": "^11.8.0",
362
364
  "rimraf": "^6.1.3",
363
365
  "sinon": "^22.1.0",
364
366
  "source-map-support": "^0.5.21",
365
367
  "tsc-watch": "^7.2.1"
368
+ },
369
+ "optionalDependencies": {
370
+ "@azure/msal-node-extensions": "^5.5.0"
366
371
  }
367
372
  }
@@ -1,111 +0,0 @@
1
- import { z } from 'zod';
2
- import { cli } from '../../../../cli/cli.js';
3
- import { globalOptionsZod } from '../../../../Command.js';
4
- import { entraUser } from '../../../../utils/entraUser.js';
5
- import { formatting } from '../../../../utils/formatting.js';
6
- import { odata } from '../../../../utils/odata.js';
7
- import { spo } from '../../../../utils/spo.js';
8
- import { validation } from '../../../../utils/validation.js';
9
- import SpoCommand from '../../../base/SpoCommand.js';
10
- import commands from '../../commands.js';
11
- export const options = z.strictObject({
12
- ...globalOptionsZod.shape,
13
- webUrl: z.string().alias('u')
14
- .refine(url => validation.isValidSharePointUrl(url) === true, {
15
- error: e => `'${e.input}' is not a valid SharePoint site URL.`
16
- }),
17
- listId: z.uuid().optional(),
18
- listUrl: z.string().optional(),
19
- listTitle: z.string().optional(),
20
- userName: z.string().optional().refine(upn => typeof upn === 'undefined' || validation.isValidUserPrincipalName(upn), {
21
- error: e => `'${e.input}' is not a valid UPN.`
22
- }),
23
- userId: z.uuid().optional()
24
- });
25
- class SpoWebRuleListCommand extends SpoCommand {
26
- get name() {
27
- return commands.WEB_RULE_LIST;
28
- }
29
- get description() {
30
- return 'Lists all SharePoint list alerts';
31
- }
32
- alias() {
33
- return [commands.WEB_ALERT_LIST];
34
- }
35
- defaultProperties() {
36
- return ['ID', 'Title', 'UserPrincipalName'];
37
- }
38
- get schema() {
39
- return options;
40
- }
41
- getRefinedSchema(schema) {
42
- return schema
43
- .refine(options => [options.listId, options.listUrl, options.listTitle].filter(x => x !== undefined).length <= 1, {
44
- error: `Specify either listId, listUrl, or listTitle, but not more than one.`,
45
- params: {
46
- customCode: 'optionSet',
47
- options: ['listId', 'listUrl', 'listTitle']
48
- }
49
- })
50
- .refine(options => [options.userName, options.userId].filter(x => x !== undefined).length <= 1, {
51
- error: `Specify either userName or userId, but not both.`,
52
- params: {
53
- customCode: 'optionSet',
54
- options: ['userName', 'userId']
55
- }
56
- });
57
- }
58
- async commandAction(logger, args) {
59
- if (this.verbose) {
60
- const listParams = args.options.listId || args.options.listTitle || args.options.listUrl;
61
- const userParams = args.options.userName || args.options.userId;
62
- let message = `Retrieving alerts from site '${args.options.webUrl}'`;
63
- if (listParams) {
64
- message += ` for list '${listParams}'`;
65
- }
66
- if (userParams) {
67
- message += `${listParams ? ' and' : ''} for user '${userParams}'`;
68
- }
69
- await logger.logToStderr(`${message}...`);
70
- }
71
- let requestUrl = `${args.options.webUrl}/_api/web/alerts?$expand=List,User,List/Rootfolder,Item&$select=*,List/Id,List/Title,List/Rootfolder/ServerRelativeUrl,Item/ID,Item/FileRef,Item/Guid`;
72
- const filters = [];
73
- let listId;
74
- if (args.options.listId) {
75
- listId = args.options.listId;
76
- }
77
- else if (args.options.listUrl || args.options.listTitle) {
78
- listId = await spo.getListId(args.options.webUrl, args.options.listTitle, args.options.listUrl, logger, this.verbose);
79
- }
80
- if (listId) {
81
- filters.push(`List/Id eq guid'${formatting.encodeQueryParameter(listId)}'`);
82
- }
83
- if (args.options.userName) {
84
- filters.push(`User/UserPrincipalName eq '${formatting.encodeQueryParameter(args.options.userName)}'`);
85
- }
86
- else if (args.options.userId) {
87
- const userPrincipalName = await entraUser.getUpnByUserId(args.options.userId);
88
- filters.push(`User/UserPrincipalName eq '${formatting.encodeQueryParameter(userPrincipalName)}'`);
89
- }
90
- if (filters.length > 0) {
91
- requestUrl += `&$filter=${filters.join(' and ')}`;
92
- }
93
- try {
94
- const res = await odata.getAllItems(requestUrl);
95
- res.forEach(alert => {
96
- if (alert.Item) {
97
- delete alert.Item['ID'];
98
- }
99
- if (cli.shouldTrimOutput(args.options.output)) {
100
- alert.UserPrincipalName = alert.User?.UserPrincipalName;
101
- }
102
- });
103
- await logger.log(res);
104
- }
105
- catch (err) {
106
- this.handleRejectedODataJsonPromise(err);
107
- }
108
- }
109
- }
110
- export default new SpoWebRuleListCommand();
111
- //# sourceMappingURL=web-rule-list.js.map
@@ -1,57 +0,0 @@
1
- import { z } from 'zod';
2
- import { cli } from '../../../../cli/cli.js';
3
- import { globalOptionsZod } from '../../../../Command.js';
4
- import request from '../../../../request.js';
5
- import { formatting } from '../../../../utils/formatting.js';
6
- import { validation } from '../../../../utils/validation.js';
7
- import SpoCommand from '../../../base/SpoCommand.js';
8
- import commands from '../../commands.js';
9
- const options = z.strictObject({
10
- ...globalOptionsZod.shape,
11
- webUrl: z.string().alias('u')
12
- .refine(url => validation.isValidSharePointUrl(url) === true, {
13
- error: e => `'${e.input}' is not a valid SharePoint URL.`
14
- }),
15
- id: z.uuid(),
16
- force: z.boolean().optional().alias('f')
17
- });
18
- class SpoWebRuleRemoveCommand extends SpoCommand {
19
- get name() {
20
- return commands.WEB_RULE_REMOVE;
21
- }
22
- get description() {
23
- return 'Removes an alert from a SharePoint list';
24
- }
25
- alias() {
26
- return [commands.WEB_ALERT_REMOVE];
27
- }
28
- get schema() {
29
- return options;
30
- }
31
- async commandAction(logger, args) {
32
- if (!args.options.force) {
33
- const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the alert with id '${args.options.id}' from site '${args.options.webUrl}'?` });
34
- if (!result) {
35
- return;
36
- }
37
- }
38
- try {
39
- if (this.verbose) {
40
- await logger.logToStderr(`Removing alert with ID '${args.options.id}' from site '${args.options.webUrl}'...`);
41
- }
42
- const requestOptions = {
43
- url: `${args.options.webUrl}/_api/web/Alerts/DeleteAlert('${formatting.encodeQueryParameter(args.options.id)}')`,
44
- headers: {
45
- accept: 'application/json;odata=nometadata'
46
- },
47
- responseType: 'json'
48
- };
49
- await request.delete(requestOptions);
50
- }
51
- catch (err) {
52
- this.handleRejectedODataJsonPromise(err);
53
- }
54
- }
55
- }
56
- export default new SpoWebRuleRemoveCommand();
57
- //# sourceMappingURL=web-rule-remove.js.map
@@ -1,193 +0,0 @@
1
- import Global from '../../_global.mdx';
2
- import Tabs from '@theme/Tabs';
3
- import TabItem from '@theme/TabItem';
4
-
5
- # spo web rule list
6
-
7
- Lists all SharePoint list alerts
8
-
9
- ## Usage
10
-
11
- ```sh
12
- m365 spo web rule list [options]
13
- ```
14
-
15
- ## Alias
16
-
17
- ```sh
18
- m365 spo web alert list
19
- ```
20
-
21
- ## Options
22
-
23
- ```md definition-list
24
- `-u, --webUrl <webUrl>`
25
- : The URL of the SharePoint site.
26
-
27
- `--listId [listId]`
28
- : The ID of the SharePoint list. Specify either `listId`, `listUrl`, or `listTitle`, but not more than one.
29
-
30
- `--listUrl [listUrl]`
31
- : The URL of the SharePoint list. Specify either `listId`, `listUrl`, or `listTitle`, but not more than one.
32
-
33
- `--listTitle [listTitle]`
34
- : The title of the SharePoint list. Specify either `listId`, `listUrl`, or `listTitle`, but not more than one.
35
-
36
- `--userName [userName]`
37
- : The user name to filter alerts for. Specify either `userName` or `userId`, but not both.
38
-
39
- `--userId [userId]`
40
- : The user ID to filter alerts for. Specify either `userName` or `userId`, but not both.
41
- ```
42
-
43
- <Global />
44
-
45
- ## Permissions
46
-
47
- <Tabs>
48
- <TabItem value="Delegated">
49
-
50
- | Resource | Permissions |
51
- |------------|----------------------|
52
- | SharePoint | AllSites.FullControl |
53
-
54
- </TabItem>
55
- <TabItem value="Application">
56
-
57
- | Resource | Permissions |
58
- |------------|-----------------------|
59
- | SharePoint | Sites.FullControl.All |
60
-
61
- </TabItem>
62
- </Tabs>
63
-
64
- ## Examples
65
-
66
- List all alerts for a SharePoint site:
67
-
68
- ```sh
69
- m365 spo web rule list --webUrl https://contoso.sharepoint.com/sites/Marketing
70
- ```
71
-
72
- List alerts for a SharePoint list by listUrl:
73
-
74
- ```sh
75
- m365 spo web rule list --webUrl https://contoso.sharepoint.com/sites/Marketing --listUrl /sites/Marketing/lists/Tasks
76
- ```
77
-
78
- List alerts for a specific user by userId:
79
-
80
- ```sh
81
- m365 spo web rule list --webUrl https://contoso.sharepoint.com/sites/Marketing --userId 7cbb4c8d-8e4d-4d2e-9c6f-3f1d8b2e6a0e
82
- ```
83
-
84
- List alerts for a specific list by title and user by username:
85
-
86
- ```sh
87
- m365 spo web rule list --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle "Tasks" --userName jane.doe@contoso.com
88
- ```
89
-
90
- ## Response
91
-
92
- <Tabs>
93
- <TabItem value="JSON">
94
-
95
- ```json
96
- [
97
- {
98
- "AlertFrequency": 0,
99
- "AlertTemplateName": "SPAlertTemplateType.DocumentLibrary",
100
- "AlertType": 1,
101
- "AlwaysNotify": false,
102
- "DeliveryChannels": 1,
103
- "EventType": -1,
104
- "Filter": "",
105
- "ID": "c52b4bf0-add0-4323-b670-f765bb46337b",
106
- "Properties": [
107
- {
108
- "Key": "dispformurl",
109
- "Value": "Shared Documents/Forms/DispForm.aspx",
110
- "ValueType": "Edm.String"
111
- }
112
- ],
113
- "Status": 0,
114
- "Title": "Documents: ProjectPlan.docx",
115
- "UserId": 9,
116
- "Item": {
117
- "Id": 37326,
118
- "FileRef": "/sites/marketing/Shared Documents/ProjectPlan.docx",
119
- "GUID": "ef5cc60b-71c0-4357-a291-14274234efde"
120
- },
121
- "List": {
122
- "Id": "6b4f195c-02da-47f4-8237-065b96258cf3",
123
- "Title": "Documents",
124
- "RootFolder": {
125
- "ServerRelativeUrl": "/sites/marketing/Shared Documents"
126
- }
127
- },
128
- "User": {
129
- "Id": 9,
130
- "IsHiddenInUI": false,
131
- "LoginName": "i:0#.f|membership|jane.doe@contoso.onmicrosoft.com",
132
- "Title": "Jane Doe",
133
- "PrincipalType": 1,
134
- "Email": "jane.doe@contoso.onmicrosoft.com",
135
- "Expiration": "",
136
- "IsEmailAuthenticationGuestUser": false,
137
- "IsShareByEmailGuestUser": false,
138
- "IsSiteAdmin": false,
139
- "UserId": {
140
- "NameId": "10037ffeaed549a5",
141
- "NameIdIssuer": "urn:federation:microsoftonline"
142
- },
143
- "UserPrincipalName": "jane.doe@contoso.onmicrosoft.com"
144
- }
145
- }
146
- ]
147
- ```
148
-
149
- </TabItem>
150
- <TabItem value="Text">
151
-
152
- ```txt
153
- ID Title UserPrincipalName
154
- ------------------------------------ --------------------------- --------------------
155
- fa5115ee-0c72-4d17-9fda-ee2451ba1c6d Documents: ProjectPlan.docx jane.doe@contoso.com
156
- ```
157
-
158
- </TabItem>
159
- <TabItem value="CSV">
160
-
161
- ```csv
162
- AlertFrequency,AlertTemplateName,AlertType,AlwaysNotify,DeliveryChannels,EventType,Filter,ID,Status,Title,UserId,UserPrincipalName
163
- 0,SPAlertTemplateType.DocumentLibrary,1,0,1,-1,,fa5115ee-0c72-4d17-9fda-ee2451ba1c6d,0,Documents: ProjectPlan.docx,6,jane.doe@contoso.com
164
- ```
165
-
166
- </TabItem>
167
- <TabItem value="Markdown">
168
-
169
- ```md
170
- # spo web rule list --webUrl "https://contoso.sharepoint.com/sites/marketing" --listUrl "/sites/marketing/Shared Documents"
171
-
172
- Date: 10/6/2025
173
-
174
- ## Documents: ProjectPlan.docx (c52b4bf0-add0-4323-b670-f765bb46337b)
175
-
176
- Property | Value
177
- ---------|-------
178
- AlertFrequency | 0
179
- AlertTemplateName | SPAlertTemplateType.DocumentLibrary
180
- AlertType | 1
181
- AlwaysNotify | false
182
- DeliveryChannels | 1
183
- EventType | -1
184
- Filter |
185
- ID | c52b4bf0-add0-4323-b670-f765bb46337b
186
- Status | 0
187
- Title | Documents: ProjectPlan.docx
188
- UserId | 9
189
- UserPrincipalName | jane.doe@contoso.com
190
- ```
191
-
192
- </TabItem>
193
- </Tabs>
@@ -1,71 +0,0 @@
1
- import Global from '../../_global.mdx';
2
- import Tabs from '@theme/Tabs';
3
- import TabItem from '@theme/TabItem';
4
-
5
- # spo web rule remove
6
-
7
- Removes an alert from a SharePoint list
8
-
9
- ## Usage
10
-
11
- ```sh
12
- m365 spo web rule remove [options]
13
- ```
14
-
15
- ## Alias
16
-
17
- ```sh
18
- m365 spo web alert remove
19
- ```
20
-
21
- ## Options
22
-
23
- ```md definition-list
24
- `-u, --webUrl <webUrl>`
25
- : The URL of the SharePoint site.
26
-
27
- `--id <id>`
28
- : The ID of the alert.
29
-
30
- `-f, --force`
31
- : Don't prompt for confirmation.
32
- ```
33
-
34
- <Global />
35
-
36
- ## Permissions
37
-
38
- <Tabs>
39
- <TabItem value="Delegated">
40
-
41
- | Resource | Permissions |
42
- |------------|----------------------|
43
- | SharePoint | AllSites.FullControl |
44
-
45
- </TabItem>
46
- <TabItem value="Application">
47
-
48
- | Resource | Permissions |
49
- |------------|-----------------------|
50
- | SharePoint | Sites.FullControl.All |
51
-
52
- </TabItem>
53
- </Tabs>
54
-
55
- ## Examples
56
-
57
- Remove an alert by ID
58
-
59
- ```sh
60
- m365 spo web rule remove --webUrl https://contoso.sharepoint.com/sites/Marketing --id 7cbb4c8d-8e4d-4d2e-9c6f-3f1d8b2e6a0e
61
- ```
62
-
63
- Remove another alert without confirmation
64
-
65
- ```sh
66
- m365 spo web rule remove --webUrl https://contoso.sharepoint.com/sites/Marketing --id 2b6f1c8a-3e6a-4c7e-b8c0-7bf4c8e6d7f1 --force
67
- ```
68
-
69
- ## Response
70
-
71
- The command won't return a response on success.