-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New command: outlook mailbox settings set. Closes #6208 #6550
base: main
Are you sure you want to change the base?
Conversation
Thank you for the PR @MartinM85! I notice that the workflows are failing due to the issue you've raised in a discussion. We'll try to look into that ASAP. Until fixed, let's mark the PR as a draft until it's ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @MartinM85. Looks great! Could you look at my comments before we merge this?
|
||
```md definition-list | ||
`-i, --userId [userId]` | ||
: The ID of the Microsoft Entra user to update mailbox settings for. Specify either `userId` or `userName`, but not both. This option is required when using application permissions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either userId or userName is required when using application permissions.
Can you also use the options when using delegated permissions?
If not I'd rewrite it slightly. If yes, I'd rewrite it slightly as well to: This is required when using application permissions.
to avoid giving the impression that they're both required...
: The time format for the user's mailbox. Example: `H:mm`. | ||
|
||
`--timeZone [timeZone]` | ||
: The default time zone for the user's mailbox. Should follow [Windows time zone name](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11#time-zones) or [IANA time zone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). Example: `Central Europe Standard Time`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: The default time zone for the user's mailbox. Should follow [Windows time zone name](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11#time-zones) or [IANA time zone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). Example: `Central Europe Standard Time`. | |
: The default time zone for the user's mailbox. Should follow [Windows time zone name](https://learn.microsoft.com/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11#time-zones) or [IANA time zone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). Example: `Central Europe Standard Time`. |
: The time of the day that the user stops working. Example: `17:00:00.000000`. | ||
|
||
`--workingHoursTimeZone [workingHoursTimeZone]` | ||
: The name of a time zone to which the working hours apply. Should follow [Windows time zone name](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11#time-zones) or [IANA time zone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). Example: `Central Europe Standard Time`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: The name of a time zone to which the working hours apply. Should follow [Windows time zone name](https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11#time-zones) or [IANA time zone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). Example: `Central Europe Standard Time`. | |
: The name of a time zone to which the working hours apply. Should follow [Windows time zone name](https://learn.microsoft.com/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11#time-zones) or [IANA time zone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). Example: `Central Europe Standard Time`. |
} | ||
|
||
public async commandAction(logger: Logger, args: CommandArgs): Promise<void> { | ||
const data: any = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move constructing the data
object to a private function for readability...
: The days of the week on which the user works, separated by a comma. Allowed values are `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, or `sunday`. | ||
|
||
`--workingHoursStartTime [workingHoursStartTime]` | ||
: The time of the day that the user starts working. Example: `09:00:00.000000`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Writing down the entire time string doesn't seem to me very user friendly.
Can we write it in multiple formats?
- 09:00
- 09:00:00
- 09:00:00.0000000
If the API doesn't accept that we should make it work by:
- allowing users to use all three time formats
- validating the option input and throwing an error if the format is incorrect...
That would make for better usability I think.
Closes #6208