Added test for sending share invitation to user with expiration

This commit is contained in:
Prarup Gurung
2024-01-01 14:46:20 +05:45
parent d6daa53ca2
commit 82be964ec1
3 changed files with 104 additions and 2 deletions
+7 -1
View File
@@ -1585,6 +1585,7 @@ class GraphHelper {
* @param string $shareType
* @param string|null $role
* @param string|null $permission
* @param string|null $expireDate
*
* @return ResponseInterface
* @throws \JsonException
@@ -1600,7 +1601,8 @@ class GraphHelper {
string $shareeId,
string $shareType,
?string $role,
?string $permission
?string $permission,
?string $expireDate
): ResponseInterface {
$url = self::getBetaFullUrl($baseUrl, "drives/$spaceId/items/$itemId/invite");
$body = [];
@@ -1619,6 +1621,10 @@ class GraphHelper {
$body['@libre.graph.permissions.actions'] = ['libre.graph/driveItem/' . $permission];
}
if ($expireDate !== null) {
$body['expirationDateTime'] = $expireDate;
}
return HttpRequestHelper::post(
$url,
$xRequestId,