Scope Frontdesk team members and add mailbox invite picker.
Deploy Ladill Frontdesk / deploy (push) Successful in 38s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-14 21:59:57 +00:00
co-authored by Cursor
parent a40e1f05c1
commit 1ec397d292
8 changed files with 237 additions and 15 deletions
+30 -4
View File
@@ -32,14 +32,40 @@ class IdentityTeamClient
return (array) $response->json('data', []);
}
/**
* @return array{url: string, apps: list<string>, full_access: bool, show_hub: bool, show_billing: bool}
*/
public function appAccess(string $userPublicId, string $intendedUrl = ''): array
{
$response = $this->request('get', '/identity/team/post-auth-redirect', array_filter([
'user' => $userPublicId,
'redirect' => $intendedUrl !== '' ? $intendedUrl : null,
]));
$data = (array) $response->json('data', []);
return [
'url' => (string) ($data['url'] ?? $intendedUrl),
'apps' => array_values(array_map('strval', (array) ($data['apps'] ?? []))),
'full_access' => (bool) ($data['full_access'] ?? false),
'show_hub' => (bool) ($data['show_hub'] ?? ($data['full_access'] ?? false)),
'show_billing' => (bool) ($data['show_billing'] ?? ($data['full_access'] ?? false)),
];
}
public function postAuthRedirect(string $userPublicId, string $intendedUrl): string
{
$response = $this->request('get', '/identity/team/post-auth-redirect', [
'user' => $userPublicId,
'redirect' => $intendedUrl,
return $this->appAccess($userPublicId, $intendedUrl)['url'];
}
/** @return list<string> */
public function mailboxOptions(string $ownerPublicId): array
{
$response = $this->request('get', '/identity/team/mailbox-options', [
'owner' => $ownerPublicId,
]);
return (string) $response->json('data.url', $intendedUrl);
return array_values(array_map('strval', (array) $response->json('data', [])));
}
/** @return list<array<string, mixed>> */