-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ocp): add calendar api to retrieve availability of attendees
Signed-off-by: Richard Steinmetz <[email protected]>
- Loading branch information
Showing
10 changed files
with
457 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OC\Calendar; | ||
|
||
use OCP\Calendar\IAvailabilityResult; | ||
|
||
class AvailabilityResult implements IAvailabilityResult { | ||
public function __construct( | ||
private readonly string $attendee, | ||
private readonly bool $available, | ||
) { | ||
} | ||
|
||
public function getAttendeeEmail(): string { | ||
return $this->attendee; | ||
} | ||
|
||
public function isAvailable(): bool { | ||
return $this->available; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OCP\Calendar; | ||
|
||
/** | ||
* DTO for the availability check results. | ||
* Holds information about whether an attendee is available or not during the request time slot. | ||
* | ||
* @since 31.0.0 | ||
*/ | ||
interface IAvailabilityResult { | ||
/** | ||
* Get the attendee's email address. | ||
* | ||
* @since 31.0.0 | ||
*/ | ||
public function getAttendeeEmail(): string; | ||
|
||
/** | ||
* Whether the attendee is available during the requested time slot. | ||
* | ||
* @since 31.0.0 | ||
*/ | ||
public function isAvailable(): bool; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
PRODID:-//Sabre//Sabre VObject 4.5.6//EN | ||
CALSCALE:GREGORIAN | ||
METHOD:REQUEST | ||
BEGIN:VFREEBUSY | ||
DTSTART:20250116T060000Z | ||
DTEND:20250117T060000Z | ||
ORGANIZER:mailto:[email protected] | ||
ATTENDEE:mailto:[email protected] | ||
ATTENDEE:mailto:[email protected] | ||
ATTENDEE:mailto:[email protected] | ||
END:VFREEBUSY | ||
END:VCALENDAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
SPDX-License-Identifier: AGPL-3.0-or-later |
Oops, something went wrong.