@pnp/cli-microsoft365 11.7.0-beta.b9f508d → 11.7.0-beta.ba78c1f

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 (79) hide show
  1. package/.devproxy/api-specs/sharepoint.yaml +53 -0
  2. package/allCommands.json +1 -1
  3. package/allCommandsFull.json +1 -1
  4. package/dist/m365/context/commands/option/option-list.js +6 -1
  5. package/dist/m365/entra/commands/resourcenamespace/resourcenamespace-list.js +6 -0
  6. package/dist/m365/external/commands/connection/connection-list.js +6 -0
  7. package/dist/m365/outlook/commands/calendar/calendar-set.js +132 -0
  8. package/dist/m365/outlook/commands/calendargroup/calendargroup-get.js +114 -0
  9. package/dist/m365/outlook/commands/calendargroup/calendargroup-set.js +115 -0
  10. package/dist/m365/outlook/commands.js +3 -0
  11. package/dist/m365/spfx/commands/SpfxCompatibilityMatrix.js +21 -6
  12. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.23.0-rc.0.js +19 -0
  13. package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
  14. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002021_DEVDEP_rushstack_eslint_config.js +2 -2
  15. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002032_DEVDEP_typescript_eslint_parser.js +2 -2
  16. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015008_FILE_eslintrc_js.js +1 -1
  17. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN015016_FILE_eslint_config_js.js +10 -0
  18. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.23.0-rc.0.js +84 -0
  19. package/dist/m365/spfx/commands/project/project-upgrade.js +12 -11
  20. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +13 -1
  21. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +24 -3
  22. package/dist/m365/spo/commands/brandcenter/brandcenter-colors-list.js +59 -0
  23. package/dist/m365/spo/commands/file/file-archive.js +83 -0
  24. package/dist/m365/spo/commands/propertybag/propertybag-set.js +3 -9
  25. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +20 -0
  26. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +27 -2
  27. package/dist/m365/spo/commands/tenant/tenant-settings-set.js +5 -1
  28. package/dist/m365/spo/commands.js +2 -0
  29. package/dist/request.js +0 -16
  30. package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +21 -0
  31. package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +19 -0
  32. package/docs/docs/cmd/entra/m365group/m365group-user-remove.mdx +21 -0
  33. package/docs/docs/cmd/entra/m365group/m365group-user-set.mdx +21 -0
  34. package/docs/docs/cmd/entra/roledefinition/roledefinition-add.mdx +19 -0
  35. package/docs/docs/cmd/entra/roledefinition/roledefinition-get.mdx +19 -0
  36. package/docs/docs/cmd/entra/roledefinition/roledefinition-list.mdx +19 -0
  37. package/docs/docs/cmd/entra/roledefinition/roledefinition-remove.mdx +21 -0
  38. package/docs/docs/cmd/entra/roledefinition/roledefinition-set.mdx +21 -0
  39. package/docs/docs/cmd/entra/siteclassification/siteclassification-disable.mdx +21 -0
  40. package/docs/docs/cmd/entra/siteclassification/siteclassification-enable.mdx +21 -0
  41. package/docs/docs/cmd/entra/siteclassification/siteclassification-get.mdx +19 -0
  42. package/docs/docs/cmd/entra/siteclassification/siteclassification-set.mdx +20 -0
  43. package/docs/docs/cmd/entra/user/user-groupmembership-list.mdx +19 -0
  44. package/docs/docs/cmd/entra/user/user-guest-add.mdx +19 -0
  45. package/docs/docs/cmd/entra/user/user-password-validate.mdx +12 -0
  46. package/docs/docs/cmd/entra/user/user-recyclebinitem-clear.mdx +21 -0
  47. package/docs/docs/cmd/entra/user/user-recyclebinitem-list.mdx +19 -0
  48. package/docs/docs/cmd/entra/user/user-recyclebinitem-remove.mdx +21 -0
  49. package/docs/docs/cmd/entra/user/user-recyclebinitem-restore.mdx +19 -0
  50. package/docs/docs/cmd/entra/user/user-registrationdetails-list.mdx +19 -0
  51. package/docs/docs/cmd/entra/user/user-session-revoke.mdx +21 -0
  52. package/docs/docs/cmd/entra/user/user-signin-list.mdx +19 -0
  53. package/docs/docs/cmd/exo/approleassignment/approleassignment-add.mdx +19 -0
  54. package/docs/docs/cmd/external/connection/connection-add.mdx +21 -0
  55. package/docs/docs/cmd/external/connection/connection-doctor.mdx +19 -0
  56. package/docs/docs/cmd/external/connection/connection-get.mdx +19 -0
  57. package/docs/docs/cmd/external/connection/connection-list.mdx +19 -0
  58. package/docs/docs/cmd/external/connection/connection-remove.mdx +21 -0
  59. package/docs/docs/cmd/external/connection/connection-schema-add.mdx +21 -0
  60. package/docs/docs/cmd/external/connection/connection-urltoitemresolver-add.mdx +21 -0
  61. package/docs/docs/cmd/external/item/item-add.mdx +19 -0
  62. package/docs/docs/cmd/file/convert/convert-pdf.mdx +21 -0
  63. package/docs/docs/cmd/file/file-add.mdx +21 -0
  64. package/docs/docs/cmd/file/file-copy.mdx +21 -0
  65. package/docs/docs/cmd/file/file-list.mdx +19 -0
  66. package/docs/docs/cmd/file/file-move.mdx +21 -0
  67. package/docs/docs/cmd/outlook/calendar/calendar-set.mdx +178 -0
  68. package/docs/docs/cmd/outlook/calendargroup/calendargroup-get.mdx +125 -0
  69. package/docs/docs/cmd/outlook/calendargroup/calendargroup-set.mdx +83 -0
  70. package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
  71. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.mdx +14 -11
  72. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +9 -6
  73. package/docs/docs/cmd/spo/brandcenter/brandcenter-colors-list.mdx +115 -0
  74. package/docs/docs/cmd/spo/file/file-archive.mdx +68 -0
  75. package/docs/docs/cmd/spo/propertybag/propertybag-set.mdx +1 -1
  76. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +13 -10
  77. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-set.mdx +7 -4
  78. package/docs/docs/cmd/spo/tenant/tenant-settings-set.mdx +3 -0
  79. package/package.json +1 -1
@@ -1,7 +1,9 @@
1
1
  import fs from 'fs';
2
- import { CommandError } from '../../../../Command.js';
2
+ import { z } from 'zod';
3
+ import { CommandError, globalOptionsZod } from '../../../../Command.js';
3
4
  import ContextCommand from '../../../base/ContextCommand.js';
4
5
  import commands from '../../commands.js';
6
+ export const options = z.strictObject({ ...globalOptionsZod.shape });
5
7
  class ContextOptionListCommand extends ContextCommand {
6
8
  get name() {
7
9
  return commands.OPTION_LIST;
@@ -9,6 +11,9 @@ class ContextOptionListCommand extends ContextCommand {
9
11
  get description() {
10
12
  return 'List all options added to the context';
11
13
  }
14
+ get schema() {
15
+ return options;
16
+ }
12
17
  async commandAction(logger) {
13
18
  if (this.verbose) {
14
19
  await logger.logToStderr(`Retrieving context options...`);
@@ -1,6 +1,9 @@
1
1
  import { odata } from '../../../../utils/odata.js';
2
2
  import GraphCommand from '../../../base/GraphCommand.js';
3
3
  import commands from '../../commands.js';
4
+ import { z } from 'zod';
5
+ import { globalOptionsZod } from '../../../../Command.js';
6
+ export const options = z.strictObject({ ...globalOptionsZod.shape });
4
7
  class EntraResourcenamespaceListCommand extends GraphCommand {
5
8
  get name() {
6
9
  return commands.RESOURCENAMESPACE_LIST;
@@ -8,6 +11,9 @@ class EntraResourcenamespaceListCommand extends GraphCommand {
8
11
  get description() {
9
12
  return 'Get a list of the RBAC resource namespaces and their properties';
10
13
  }
14
+ get schema() {
15
+ return options;
16
+ }
11
17
  defaultProperties() {
12
18
  return ['id', 'name'];
13
19
  }
@@ -1,6 +1,9 @@
1
1
  import { odata } from '../../../../utils/odata.js';
2
2
  import GraphCommand from '../../../base/GraphCommand.js';
3
3
  import commands from '../../commands.js';
4
+ import { z } from 'zod';
5
+ import { globalOptionsZod } from '../../../../Command.js';
6
+ export const options = z.strictObject({ ...globalOptionsZod.shape });
4
7
  class ExternalConnectionListCommand extends GraphCommand {
5
8
  get name() {
6
9
  return commands.CONNECTION_LIST;
@@ -11,6 +14,9 @@ class ExternalConnectionListCommand extends GraphCommand {
11
14
  alias() {
12
15
  return [commands.EXTERNALCONNECTION_LIST];
13
16
  }
17
+ get schema() {
18
+ return options;
19
+ }
14
20
  defaultProperties() {
15
21
  return ['id', 'name', 'state'];
16
22
  }
@@ -0,0 +1,132 @@
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
3
+ import GraphCommand from '../../../base/GraphCommand.js';
4
+ import commands from '../../commands.js';
5
+ import { validation } from '../../../../utils/validation.js';
6
+ import request from '../../../../request.js';
7
+ import { accessToken } from '../../../../utils/accessToken.js';
8
+ import auth from '../../../../Auth.js';
9
+ import { calendarGroup } from '../../../../utils/calendarGroup.js';
10
+ const calendarColors = ['auto', 'lightBlue', 'lightGreen', 'lightOrange', 'lightGray', 'lightYellow', 'lightTeal', 'lightPink', 'lightBrown', 'lightRed', 'maxColor'];
11
+ export const options = z.strictObject({
12
+ ...globalOptionsZod.shape,
13
+ id: z.string().alias('i'),
14
+ name: z.string().optional().alias('n'),
15
+ userId: z.string().refine(id => validation.isValidGuid(id), {
16
+ error: e => `'${e.input}' is not a valid GUID.`
17
+ }).optional(),
18
+ userName: z.string().refine(name => validation.isValidUserPrincipalName(name), {
19
+ error: e => `'${e.input}' is not a valid UPN.`
20
+ }).optional(),
21
+ calendarGroupId: z.string().optional(),
22
+ calendarGroupName: z.string().optional(),
23
+ color: z.enum(calendarColors).optional(),
24
+ isDefault: z.boolean().optional()
25
+ });
26
+ class OutlookCalendarSetCommand extends GraphCommand {
27
+ get name() {
28
+ return commands.CALENDAR_SET;
29
+ }
30
+ get description() {
31
+ return 'Updates a calendar for a user';
32
+ }
33
+ get schema() {
34
+ return options;
35
+ }
36
+ getRefinedSchema(schema) {
37
+ return schema
38
+ .refine(options => !(options.userId && options.userName), {
39
+ error: 'Specify either userId or userName, but not both.'
40
+ })
41
+ .refine(options => !(options.calendarGroupId && options.calendarGroupName), {
42
+ error: 'Specify either calendarGroupId or calendarGroupName, but not both.'
43
+ })
44
+ .refine(options => [options.name, options.color, options.isDefault].filter(o => o !== undefined).length > 0, {
45
+ error: 'Specify at least one of the following options: name, color, or isDefault.'
46
+ });
47
+ }
48
+ async commandAction(logger, args) {
49
+ try {
50
+ const token = auth.connection.accessTokens[auth.defaultResource].accessToken;
51
+ const isAppOnlyAccessToken = accessToken.isAppOnlyAccessToken(token);
52
+ let requestUrl;
53
+ if (isAppOnlyAccessToken) {
54
+ if (!args.options.userId && !args.options.userName) {
55
+ throw 'When running with application permissions either userId or userName is required.';
56
+ }
57
+ const userIdentifier = args.options.userId ?? args.options.userName;
58
+ requestUrl = this.buildRequestUrl(userIdentifier);
59
+ }
60
+ else {
61
+ if (args.options.userId || args.options.userName) {
62
+ const currentUserId = accessToken.getUserIdFromAccessToken(token);
63
+ const currentUserName = accessToken.getUserNameFromAccessToken(token);
64
+ const isOtherUser = (args.options.userId && args.options.userId !== currentUserId) ||
65
+ (args.options.userName && args.options.userName.toLowerCase() !== currentUserName?.toLowerCase());
66
+ if (isOtherUser) {
67
+ const scopes = accessToken.getScopesFromAccessToken(token);
68
+ const hasSharedScope = scopes.some(s => s === 'Calendars.ReadWrite.Shared');
69
+ if (!hasSharedScope) {
70
+ throw 'To update calendars of other users, the Entra ID application used for authentication must have the Calendars.ReadWrite.Shared delegated permission assigned.';
71
+ }
72
+ }
73
+ const userIdentifier = args.options.userId ?? args.options.userName;
74
+ requestUrl = this.buildRequestUrl(userIdentifier);
75
+ }
76
+ else {
77
+ requestUrl = this.buildRequestUrl(undefined);
78
+ }
79
+ }
80
+ if (this.verbose) {
81
+ await logger.logToStderr(`Updating calendar '${args.options.id}'...`);
82
+ }
83
+ let calendarGroupId = args.options.calendarGroupId;
84
+ if (args.options.calendarGroupName) {
85
+ const userIdForGroup = args.options.userId ?? args.options.userName ?? accessToken.getUserIdFromAccessToken(token);
86
+ const calendarGroupResult = await calendarGroup.getUserCalendarGroupByName(userIdForGroup, args.options.calendarGroupName, 'id');
87
+ calendarGroupId = calendarGroupResult.id;
88
+ }
89
+ const url = this.buildCalendarUrl(requestUrl, args.options.id, calendarGroupId);
90
+ const requestOptions = {
91
+ url,
92
+ headers: {
93
+ accept: 'application/json;odata.metadata=none'
94
+ },
95
+ responseType: 'json',
96
+ data: this.createRequestBody(args)
97
+ };
98
+ const result = await request.patch(requestOptions);
99
+ await logger.log(result);
100
+ }
101
+ catch (err) {
102
+ this.handleRejectedODataJsonPromise(err);
103
+ }
104
+ }
105
+ buildRequestUrl(userIdentifier) {
106
+ if (userIdentifier) {
107
+ return `${this.resource}/v1.0/users('${userIdentifier}')`;
108
+ }
109
+ return `${this.resource}/v1.0/me`;
110
+ }
111
+ buildCalendarUrl(baseUrl, calendarId, calendarGroupId) {
112
+ if (calendarGroupId) {
113
+ return `${baseUrl}/calendarGroups/${calendarGroupId}/calendars/${calendarId}`;
114
+ }
115
+ return `${baseUrl}/calendars/${calendarId}`;
116
+ }
117
+ createRequestBody(args) {
118
+ const data = {};
119
+ if (args.options.name !== undefined) {
120
+ data.name = args.options.name;
121
+ }
122
+ if (args.options.color !== undefined) {
123
+ data.color = args.options.color;
124
+ }
125
+ if (args.options.isDefault !== undefined) {
126
+ data.isDefaultCalendar = args.options.isDefault;
127
+ }
128
+ return data;
129
+ }
130
+ }
131
+ export default new OutlookCalendarSetCommand();
132
+ //# sourceMappingURL=calendar-set.js.map
@@ -0,0 +1,114 @@
1
+ import { z } from 'zod';
2
+ import GraphCommand from '../../../base/GraphCommand.js';
3
+ import commands from '../../commands.js';
4
+ import { validation } from '../../../../utils/validation.js';
5
+ import { globalOptionsZod } from '../../../../Command.js';
6
+ import { formatting } from '../../../../utils/formatting.js';
7
+ import { odata } from '../../../../utils/odata.js';
8
+ import request from '../../../../request.js';
9
+ import { accessToken } from '../../../../utils/accessToken.js';
10
+ import auth from '../../../../Auth.js';
11
+ export const options = z.strictObject({
12
+ ...globalOptionsZod.shape,
13
+ id: z.string().optional(),
14
+ name: z.string().optional(),
15
+ userId: z.string().refine(id => validation.isValidGuid(id), {
16
+ error: e => `'${e.input}' is not a valid GUID.`
17
+ }).optional(),
18
+ userName: z.string().refine(name => validation.isValidUserPrincipalName(name), {
19
+ error: e => `'${e.input}' is not a valid UPN.`
20
+ }).optional()
21
+ });
22
+ class OutlookCalendarGroupGetCommand extends GraphCommand {
23
+ get name() {
24
+ return commands.CALENDARGROUP_GET;
25
+ }
26
+ get description() {
27
+ return 'Retrieve information about a calendar group for a user';
28
+ }
29
+ get schema() {
30
+ return options;
31
+ }
32
+ getRefinedSchema(schema) {
33
+ return schema
34
+ .refine(o => !(o.id && o.name), {
35
+ error: 'Specify either id or name, but not both.'
36
+ })
37
+ .refine(o => Boolean(o.id || o.name), {
38
+ error: 'Specify either id or name.'
39
+ })
40
+ .refine(o => !(o.userId && o.userName), {
41
+ error: 'Specify either userId or userName, but not both.'
42
+ });
43
+ }
44
+ async commandAction(logger, args) {
45
+ try {
46
+ const token = auth.connection.accessTokens[auth.defaultResource].accessToken;
47
+ const isAppOnlyAccessToken = accessToken.isAppOnlyAccessToken(token);
48
+ let userIdentifier = undefined;
49
+ if (args.options.userId || args.options.userName) {
50
+ userIdentifier = args.options.userId ?? args.options.userName;
51
+ }
52
+ const encodedUserIdentifier = userIdentifier
53
+ ? formatting.encodeQueryParameter(userIdentifier)
54
+ : undefined;
55
+ if (isAppOnlyAccessToken) {
56
+ if (!args.options.userId && !args.options.userName) {
57
+ throw 'When running with application permissions either userId or userName is required.';
58
+ }
59
+ }
60
+ else {
61
+ if (args.options.userId || args.options.userName) {
62
+ const currentUserId = accessToken.getUserIdFromAccessToken(token);
63
+ const currentUserName = accessToken.getUserNameFromAccessToken(token);
64
+ const isOtherUser = (args.options.userId && args.options.userId !== currentUserId) ||
65
+ (args.options.userName && args.options.userName.toLowerCase() !== currentUserName?.toLowerCase());
66
+ if (isOtherUser) {
67
+ const scopes = accessToken.getScopesFromAccessToken(token);
68
+ const hasSharedScope = scopes.some(s => s === 'Calendars.Read.Shared' || s === 'Calendars.ReadWrite.Shared');
69
+ if (!hasSharedScope) {
70
+ throw `To retrieve calendar groups of other users, the Entra ID application used for authentication must have either the Calendars.Read.Shared or Calendars.ReadWrite.Shared delegated permission assigned.`;
71
+ }
72
+ }
73
+ }
74
+ }
75
+ const getCalendarGroupByName = async (calendarGroupName) => {
76
+ const userPath = encodedUserIdentifier ? `users('${encodedUserIdentifier}')` : 'me';
77
+ const calendarGroups = await odata.getAllItems(`${this.resource}/v1.0/${userPath}/calendarGroups?$filter=name eq '${formatting.encodeQueryParameter(calendarGroupName)}'`);
78
+ if (calendarGroups.length === 0) {
79
+ throw `The specified calendar group '${calendarGroupName}' does not exist.`;
80
+ }
81
+ return calendarGroups[0];
82
+ };
83
+ if (args.options.name) {
84
+ if (this.verbose) {
85
+ await logger.logToStderr(`Retrieving calendar group '${args.options.name}'...`);
86
+ }
87
+ const result = await getCalendarGroupByName(args.options.name);
88
+ await logger.log(result);
89
+ }
90
+ else {
91
+ const calendarGroupId = args.options.id;
92
+ const userPath = encodedUserIdentifier ? `users('${encodedUserIdentifier}')` : 'me';
93
+ const requestUrl = `${this.resource}/v1.0/${userPath}/calendarGroups/${calendarGroupId}`;
94
+ if (this.verbose) {
95
+ await logger.logToStderr(`Retrieving calendar group '${calendarGroupId}'...`);
96
+ }
97
+ const requestOptions = {
98
+ url: requestUrl,
99
+ headers: {
100
+ accept: 'application/json;odata.metadata=none'
101
+ },
102
+ responseType: 'json'
103
+ };
104
+ const result = await request.get(requestOptions);
105
+ await logger.log(result);
106
+ }
107
+ }
108
+ catch (err) {
109
+ this.handleRejectedODataJsonPromise(err);
110
+ }
111
+ }
112
+ }
113
+ export default new OutlookCalendarGroupGetCommand();
114
+ //# sourceMappingURL=calendargroup-get.js.map
@@ -0,0 +1,115 @@
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
3
+ import GraphCommand from '../../../base/GraphCommand.js';
4
+ import commands from '../../commands.js';
5
+ import { validation } from '../../../../utils/validation.js';
6
+ import request from '../../../../request.js';
7
+ import { accessToken } from '../../../../utils/accessToken.js';
8
+ import auth from '../../../../Auth.js';
9
+ import { formatting } from '../../../../utils/formatting.js';
10
+ import { calendarGroup } from '../../../../utils/calendarGroup.js';
11
+ export const options = z.strictObject({
12
+ ...globalOptionsZod.shape,
13
+ id: z.string().optional(),
14
+ name: z.string().optional(),
15
+ userId: z.string().refine(id => validation.isValidGuid(id), {
16
+ error: e => `'${e.input}' is not a valid GUID.`
17
+ }).optional(),
18
+ userName: z.string().refine(name => validation.isValidUserPrincipalName(name), {
19
+ error: e => `'${e.input}' is not a valid UPN.`
20
+ }).optional(),
21
+ newName: z.string()
22
+ });
23
+ class OutlookCalendarGroupSetCommand extends GraphCommand {
24
+ get name() {
25
+ return commands.CALENDARGROUP_SET;
26
+ }
27
+ get description() {
28
+ return 'Updates a calendar group for a user';
29
+ }
30
+ get schema() {
31
+ return options;
32
+ }
33
+ getRefinedSchema(schema) {
34
+ return schema
35
+ .refine(options => !(options.userId && options.userName), {
36
+ error: 'Specify either userId or userName, but not both.'
37
+ })
38
+ .refine(options => !(!options.id && !options.name), {
39
+ error: 'Specify either id or name.'
40
+ })
41
+ .refine(options => !(options.id && options.name), {
42
+ error: 'Specify either id or name, but not both.'
43
+ });
44
+ }
45
+ async commandAction(logger, args) {
46
+ try {
47
+ const token = auth.connection.accessTokens[auth.defaultResource].accessToken;
48
+ const isAppOnlyAccessToken = accessToken.isAppOnlyAccessToken(token);
49
+ let userUrl;
50
+ let graphUserId;
51
+ if (isAppOnlyAccessToken) {
52
+ if (!args.options.userId && !args.options.userName) {
53
+ throw 'When running with application permissions either userId or userName is required.';
54
+ }
55
+ graphUserId = (args.options.userId ?? args.options.userName);
56
+ userUrl = `${this.resource}/v1.0/users('${formatting.encodeQueryParameter(graphUserId)}')`;
57
+ if (this.verbose) {
58
+ await logger.logToStderr(`Updating calendar group using application permissions for user '${graphUserId}'...`);
59
+ }
60
+ }
61
+ else if (args.options.userId || args.options.userName) {
62
+ const currentUserId = accessToken.getUserIdFromAccessToken(token);
63
+ const currentUserName = accessToken.getUserNameFromAccessToken(token);
64
+ const isOtherUser = (args.options.userId && args.options.userId !== currentUserId) ||
65
+ (args.options.userName && args.options.userName.toLowerCase() !== currentUserName?.toLowerCase());
66
+ if (isOtherUser) {
67
+ const scopes = accessToken.getScopesFromAccessToken(token);
68
+ const hasSharedScope = scopes.some(s => s === 'Calendars.ReadWrite.Shared');
69
+ if (!hasSharedScope) {
70
+ throw `To update calendar groups of other users, the Entra ID application used for authentication must have the Calendars.ReadWrite.Shared delegated permission assigned.`;
71
+ }
72
+ }
73
+ graphUserId = (args.options.userId ?? args.options.userName);
74
+ userUrl = `${this.resource}/v1.0/users('${formatting.encodeQueryParameter(graphUserId)}')`;
75
+ if (this.verbose) {
76
+ await logger.logToStderr(`Updating calendar group using delegated permissions for user '${graphUserId}'...`);
77
+ }
78
+ }
79
+ else {
80
+ graphUserId = accessToken.getUserIdFromAccessToken(token);
81
+ userUrl = `${this.resource}/v1.0/me`;
82
+ if (this.verbose) {
83
+ await logger.logToStderr('Updating calendar group for the signed-in user...');
84
+ }
85
+ }
86
+ let calendarGroupId;
87
+ if (args.options.id) {
88
+ calendarGroupId = args.options.id;
89
+ }
90
+ else {
91
+ const calendarGroupResult = await calendarGroup.getUserCalendarGroupByName(graphUserId, args.options.name);
92
+ calendarGroupId = calendarGroupResult.id;
93
+ }
94
+ if (this.verbose) {
95
+ await logger.logToStderr(`Updating calendar group '${calendarGroupId}'...`);
96
+ }
97
+ const requestOptions = {
98
+ url: `${userUrl}/calendarGroups/${calendarGroupId}`,
99
+ headers: {
100
+ accept: 'application/json;odata.metadata=none'
101
+ },
102
+ responseType: 'json',
103
+ data: {
104
+ name: args.options.newName
105
+ }
106
+ };
107
+ await request.patch(requestOptions);
108
+ }
109
+ catch (err) {
110
+ this.handleRejectedODataJsonPromise(err);
111
+ }
112
+ }
113
+ }
114
+ export default new OutlookCalendarGroupSetCommand();
115
+ //# sourceMappingURL=calendargroup-set.js.map
@@ -3,7 +3,10 @@ export default {
3
3
  CALENDAR_ADD: `${prefix} calendar add`,
4
4
  CALENDAR_GET: `${prefix} calendar get`,
5
5
  CALENDAR_REMOVE: `${prefix} calendar remove`,
6
+ CALENDAR_SET: `${prefix} calendar set`,
7
+ CALENDARGROUP_GET: `${prefix} calendargroup get`,
6
8
  CALENDARGROUP_LIST: `${prefix} calendargroup list`,
9
+ CALENDARGROUP_SET: `${prefix} calendargroup set`,
7
10
  EVENT_CANCEL: `${prefix} event cancel`,
8
11
  EVENT_LIST: `${prefix} event list`,
9
12
  EVENT_REMOVE: `${prefix} event remove`,
@@ -590,8 +590,8 @@ export const versions = {
590
590
  },
591
591
  sp: SharePointVersion.SPO,
592
592
  yo: {
593
- range: '^4 || ^5 || ^6',
594
- fix: 'npm i -g yo@6'
593
+ range: '^4 || ^5 || ^6 || ^7',
594
+ fix: 'npm i -g yo@7'
595
595
  }
596
596
  },
597
597
  '1.22.1': {
@@ -605,8 +605,8 @@ export const versions = {
605
605
  },
606
606
  sp: SharePointVersion.SPO,
607
607
  yo: {
608
- range: '^4 || ^5 || ^6',
609
- fix: 'npm i -g yo@6'
608
+ range: '^4 || ^5 || ^6 || ^7',
609
+ fix: 'npm i -g yo@7'
610
610
  }
611
611
  },
612
612
  '1.22.2': {
@@ -620,8 +620,23 @@ export const versions = {
620
620
  },
621
621
  sp: SharePointVersion.SPO,
622
622
  yo: {
623
- range: '^4 || ^5 || ^6',
624
- fix: 'npm i -g yo@6'
623
+ range: '^4 || ^5 || ^6 || ^7',
624
+ fix: 'npm i -g yo@7'
625
+ }
626
+ },
627
+ '1.23.0-rc.0': {
628
+ heft: {
629
+ range: '^1',
630
+ fix: 'npm i -g @rushstack/heft@1'
631
+ },
632
+ node: {
633
+ range: '>=22.14.0 <23.0.0',
634
+ fix: 'Install Node.js >=22.14.0 <23.0.0'
635
+ },
636
+ sp: SharePointVersion.SPO,
637
+ yo: {
638
+ range: '^4 || ^5 || ^6 || ^7',
639
+ fix: 'npm i -g yo@7'
625
640
  }
626
641
  }
627
642
  };
@@ -0,0 +1,19 @@
1
+ import { FN001008_DEP_react } from './rules/FN001008_DEP_react.js';
2
+ import { FN001009_DEP_react_dom } from './rules/FN001009_DEP_react_dom.js';
3
+ import { FN001035_DEP_fluentui_react } from './rules/FN001035_DEP_fluentui_react.js';
4
+ import { FN002013_DEVDEP_types_webpack_env } from './rules/FN002013_DEVDEP_types_webpack_env.js';
5
+ import { FN002015_DEVDEP_types_react } from './rules/FN002015_DEVDEP_types_react.js';
6
+ import { FN002016_DEVDEP_types_react_dom } from './rules/FN002016_DEVDEP_types_react_dom.js';
7
+ import { FN002022_DEVDEP_typescript } from './rules/FN002022_DEVDEP_typescript.js';
8
+ import { FN021001_PKG_spfx_deps_versions_match_project_version } from './rules/FN021001_PKG_spfx_deps_versions_match_project_version.js';
9
+ export default [
10
+ new FN001008_DEP_react('17'),
11
+ new FN001009_DEP_react_dom('17'),
12
+ new FN001035_DEP_fluentui_react('^8.106.4'),
13
+ new FN002013_DEVDEP_types_webpack_env('~1.15.2'),
14
+ new FN002015_DEVDEP_types_react('17'),
15
+ new FN002016_DEVDEP_types_react_dom('17'),
16
+ new FN002022_DEVDEP_typescript('~5.8.0'),
17
+ new FN021001_PKG_spfx_deps_versions_match_project_version(true)
18
+ ];
19
+ //# sourceMappingURL=doctor-1.23.0-rc.0.js.map
@@ -76,7 +76,8 @@ class SpfxProjectDoctorCommand extends BaseProjectCommand {
76
76
  '1.21.1',
77
77
  '1.22.0',
78
78
  '1.22.1',
79
- '1.22.2'
79
+ '1.22.2',
80
+ '1.23.0-rc.0'
80
81
  ];
81
82
  __classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initTelemetry).call(this);
82
83
  __classPrivateFieldGet(this, _SpfxProjectDoctorCommand_instances, "m", _SpfxProjectDoctorCommand_initOptions).call(this);
@@ -1,7 +1,7 @@
1
1
  import { DependencyRule } from "./DependencyRule.js";
2
2
  export class FN002021_DEVDEP_rushstack_eslint_config extends DependencyRule {
3
- constructor(packageVersion) {
4
- super('@rushstack/eslint-config', packageVersion, true);
3
+ constructor(packageVersion, add = true) {
4
+ super('@rushstack/eslint-config', packageVersion, true, false, add);
5
5
  }
6
6
  get id() {
7
7
  return 'FN002021';
@@ -1,7 +1,7 @@
1
1
  import { DependencyRule } from "./DependencyRule.js";
2
2
  export class FN002032_DEVDEP_typescript_eslint_parser extends DependencyRule {
3
- constructor(packageVersion) {
4
- super('@typescript-eslint/parser', packageVersion, true);
3
+ constructor(packageVersion, add = true) {
4
+ super('@typescript-eslint/parser', packageVersion, true, false, add);
5
5
  }
6
6
  get id() {
7
7
  return 'FN002032';
@@ -8,7 +8,7 @@ export class FN015008_FILE_eslintrc_js extends FileAddRemoveRule {
8
8
  return 'FN015008';
9
9
  }
10
10
  visit(project, notifications) {
11
- if (spfx.isReactProject(project)) {
11
+ if (spfx.isReactProject(project) && this.contents) {
12
12
  this.contents = this.contents.replace('@microsoft/eslint-config-spfx/lib/profiles/default', '@microsoft/eslint-config-spfx/lib/profiles/react');
13
13
  }
14
14
  super.visit(project, notifications);
@@ -0,0 +1,10 @@
1
+ import { FileAddRemoveRule } from "./FileAddRemoveRule.js";
2
+ export class FN015016_FILE_eslint_config_js extends FileAddRemoveRule {
3
+ constructor(add, contents) {
4
+ super('./eslint.config.js', add, contents);
5
+ }
6
+ get id() {
7
+ return 'FN015016';
8
+ }
9
+ }
10
+ //# sourceMappingURL=FN015016_FILE_eslint_config_js.js.map
@@ -0,0 +1,84 @@
1
+ import { FN001001_DEP_microsoft_sp_core_library } from './rules/FN001001_DEP_microsoft_sp_core_library.js';
2
+ import { FN001002_DEP_microsoft_sp_lodash_subset } from './rules/FN001002_DEP_microsoft_sp_lodash_subset.js';
3
+ import { FN001003_DEP_microsoft_sp_office_ui_fabric_core } from './rules/FN001003_DEP_microsoft_sp_office_ui_fabric_core.js';
4
+ import { FN001004_DEP_microsoft_sp_webpart_base } from './rules/FN001004_DEP_microsoft_sp_webpart_base.js';
5
+ import { FN001011_DEP_microsoft_sp_dialog } from './rules/FN001011_DEP_microsoft_sp_dialog.js';
6
+ import { FN001012_DEP_microsoft_sp_application_base } from './rules/FN001012_DEP_microsoft_sp_application_base.js';
7
+ import { FN001013_DEP_microsoft_decorators } from './rules/FN001013_DEP_microsoft_decorators.js';
8
+ import { FN001014_DEP_microsoft_sp_listview_extensibility } from './rules/FN001014_DEP_microsoft_sp_listview_extensibility.js';
9
+ import { FN001021_DEP_microsoft_sp_property_pane } from './rules/FN001021_DEP_microsoft_sp_property_pane.js';
10
+ import { FN001023_DEP_microsoft_sp_component_base } from './rules/FN001023_DEP_microsoft_sp_component_base.js';
11
+ import { FN001024_DEP_microsoft_sp_diagnostics } from './rules/FN001024_DEP_microsoft_sp_diagnostics.js';
12
+ import { FN001025_DEP_microsoft_sp_dynamic_data } from './rules/FN001025_DEP_microsoft_sp_dynamic_data.js';
13
+ import { FN001026_DEP_microsoft_sp_extension_base } from './rules/FN001026_DEP_microsoft_sp_extension_base.js';
14
+ import { FN001027_DEP_microsoft_sp_http } from './rules/FN001027_DEP_microsoft_sp_http.js';
15
+ import { FN001028_DEP_microsoft_sp_list_subscription } from './rules/FN001028_DEP_microsoft_sp_list_subscription.js';
16
+ import { FN001029_DEP_microsoft_sp_loader } from './rules/FN001029_DEP_microsoft_sp_loader.js';
17
+ import { FN001030_DEP_microsoft_sp_module_interfaces } from './rules/FN001030_DEP_microsoft_sp_module_interfaces.js';
18
+ import { FN001031_DEP_microsoft_sp_odata_types } from './rules/FN001031_DEP_microsoft_sp_odata_types.js';
19
+ import { FN001032_DEP_microsoft_sp_page_context } from './rules/FN001032_DEP_microsoft_sp_page_context.js';
20
+ import { FN001034_DEP_microsoft_sp_adaptive_card_extension_base } from './rules/FN001034_DEP_microsoft_sp_adaptive_card_extension_base.js';
21
+ import { FN002002_DEVDEP_microsoft_sp_module_interfaces } from './rules/FN002002_DEVDEP_microsoft_sp_module_interfaces.js';
22
+ import { FN002021_DEVDEP_rushstack_eslint_config } from './rules/FN002021_DEVDEP_rushstack_eslint_config.js';
23
+ import { FN002022_DEVDEP_microsoft_eslint_plugin_spfx } from './rules/FN002022_DEVDEP_microsoft_eslint_plugin_spfx.js';
24
+ import { FN002023_DEVDEP_microsoft_eslint_config_spfx } from './rules/FN002023_DEVDEP_microsoft_eslint_config_spfx.js';
25
+ import { FN002024_DEVDEP_eslint } from './rules/FN002024_DEVDEP_eslint.js';
26
+ import { FN002025_DEVDEP_eslint_plugin_react_hooks } from './rules/FN002025_DEVDEP_eslint_plugin_react_hooks.js';
27
+ import { FN002030_DEVDEP_microsoft_spfx_web_build_rig } from './rules/FN002030_DEVDEP_microsoft_spfx_web_build_rig.js';
28
+ import { FN002031_DEVDEP_rushstack_heft } from './rules/FN002031_DEVDEP_rushstack_heft.js';
29
+ import { FN002032_DEVDEP_typescript_eslint_parser } from './rules/FN002032_DEVDEP_typescript_eslint_parser.js';
30
+ import { FN002034_DEVDEP_microsoft_spfx_heft_plugins } from './rules/FN002034_DEVDEP_microsoft_spfx_heft_plugins.js';
31
+ import { FN010001_YORC_version } from './rules/FN010001_YORC_version.js';
32
+ import { FN015008_FILE_eslintrc_js } from './rules/FN015008_FILE_eslintrc_js.js';
33
+ import { FN015016_FILE_eslint_config_js } from './rules/FN015016_FILE_eslint_config_js.js';
34
+ import { FN021009_PKG_overrides_rushstack_heft } from './rules/FN021009_PKG_overrides_rushstack_heft.js';
35
+ export default [
36
+ new FN001001_DEP_microsoft_sp_core_library('1.23.0-rc.0'),
37
+ new FN001002_DEP_microsoft_sp_lodash_subset('1.23.0-rc.0'),
38
+ new FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.23.0-rc.0'),
39
+ new FN001004_DEP_microsoft_sp_webpart_base('1.23.0-rc.0'),
40
+ new FN001011_DEP_microsoft_sp_dialog('1.23.0-rc.0'),
41
+ new FN001012_DEP_microsoft_sp_application_base('1.23.0-rc.0'),
42
+ new FN001014_DEP_microsoft_sp_listview_extensibility('1.23.0-rc.0'),
43
+ new FN001021_DEP_microsoft_sp_property_pane('1.23.0-rc.0'),
44
+ new FN001023_DEP_microsoft_sp_component_base('1.23.0-rc.0'),
45
+ new FN001024_DEP_microsoft_sp_diagnostics('1.23.0-rc.0'),
46
+ new FN001025_DEP_microsoft_sp_dynamic_data('1.23.0-rc.0'),
47
+ new FN001026_DEP_microsoft_sp_extension_base('1.23.0-rc.0'),
48
+ new FN001027_DEP_microsoft_sp_http('1.23.0-rc.0'),
49
+ new FN001028_DEP_microsoft_sp_list_subscription('1.23.0-rc.0'),
50
+ new FN001029_DEP_microsoft_sp_loader('1.23.0-rc.0'),
51
+ new FN001030_DEP_microsoft_sp_module_interfaces('1.23.0-rc.0'),
52
+ new FN001031_DEP_microsoft_sp_odata_types('1.23.0-rc.0'),
53
+ new FN001032_DEP_microsoft_sp_page_context('1.23.0-rc.0'),
54
+ new FN001013_DEP_microsoft_decorators('1.23.0-rc.0'),
55
+ new FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.23.0-rc.0'),
56
+ new FN002002_DEVDEP_microsoft_sp_module_interfaces('1.23.0-rc.0'),
57
+ new FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.23.0-rc.0'),
58
+ new FN002023_DEVDEP_microsoft_eslint_config_spfx('1.23.0-rc.0'),
59
+ new FN002030_DEVDEP_microsoft_spfx_web_build_rig('1.23.0-rc.0'),
60
+ new FN002034_DEVDEP_microsoft_spfx_heft_plugins('1.23.0-rc.0'),
61
+ new FN010001_YORC_version('1.23.0-rc.0'),
62
+ new FN002031_DEVDEP_rushstack_heft('1.2.7'),
63
+ new FN021009_PKG_overrides_rushstack_heft('1.2.7'),
64
+ new FN002025_DEVDEP_eslint_plugin_react_hooks('5.2.0'),
65
+ new FN002024_DEVDEP_eslint('9.37.0'),
66
+ new FN015016_FILE_eslint_config_js(true, `const spfxProfile = require('@microsoft/eslint-config-spfx/lib/flat-profiles/react');
67
+
68
+ module.exports = [
69
+ ...spfxProfile,
70
+ {
71
+ files: ['**/*.ts', '**/*.tsx'],
72
+ languageOptions: {
73
+ parserOptions: {
74
+ tsconfigRootDir: __dirname,
75
+ project: './tsconfig.json'
76
+ }
77
+ }
78
+ }
79
+ ];`),
80
+ new FN015008_FILE_eslintrc_js(false),
81
+ new FN002021_DEVDEP_rushstack_eslint_config('4.5.2', false),
82
+ new FN002032_DEVDEP_typescript_eslint_parser('8.46.2', false)
83
+ ];
84
+ //# sourceMappingURL=upgrade-1.23.0-rc.0.js.map