18559: Add basic field validation for profile email
[arvados.git] / src / routes / routes.ts
index 41c71f7ca87994a32938d9c0138d1ba204a1ce6d..205ae08fdd3c21978dddb1cc8316d3512d9e0ad8 100644 (file)
@@ -40,6 +40,7 @@ export const Routes = {
     LINK_ACCOUNT: '/link_account',
     KEEP_SERVICES: `/keep-services`,
     USERS: '/users',
+    USER_PROFILE: `/user/:id(${RESOURCE_UUID_PATTERN})`,
     API_CLIENT_AUTHORIZATIONS: `/api_client_authorizations`,
     GROUPS: '/groups',
     GROUP_DETAILS: `/group/:id(${RESOURCE_UUID_PATTERN})`,
@@ -99,6 +100,8 @@ export const getProcessLogUrl = (uuid: string) => `/process-logs/${uuid}`;
 
 export const getGroupUrl = (uuid: string) => `/group/${uuid}`;
 
+export const getUserProfileUrl = (uuid: string) => `/user/${uuid}`;
+
 export interface ResourceRouteParams {
     id: string;
 }
@@ -175,6 +178,9 @@ export const matchFedTokenRoute = (route: string) =>
 export const matchUsersRoute = (route: string) =>
     matchPath(route, { path: Routes.USERS });
 
+export const matchUserProfileRoute = (route: string) =>
+    matchPath<ResourceRouteParams>(route, { path: Routes.USER_PROFILE });
+
 export const matchApiClientAuthorizationsRoute = (route: string) =>
     matchPath(route, { path: Routes.API_CLIENT_AUTHORIZATIONS });