Added all community endpoints

This commit is contained in:
hannathkadher
2024-10-17 10:55:26 +04:00
parent b8d4a080ef
commit d6777c8ec1
17 changed files with 333 additions and 126 deletions

View File

@ -10,7 +10,7 @@ export class ControllerRoute {
};
static COMMUNITY = class {
public static readonly ROUTE = 'communities';
public static readonly ROUTE = 'community';
static ACTIONS = class {
public static readonly GET_COMMUNITY_BY_ID_SUMMARY =
'Get community by community id';
@ -39,8 +39,8 @@ export class ControllerRoute {
};
};
static COMMUNITYSPACE = class {
public static readonly ROUTE = 'communities/:id/spaces';
static COMMUNITY_SPACE = class {
public static readonly ROUTE = 'community/:id/spaces';
static ACTIONS = class {
public static readonly GET_COMMUNITY_SPACES_HIERARCHY_SUMMARY =
'Fetch hierarchical structure of spaces within a community.';
@ -49,4 +49,24 @@ export class ControllerRoute {
'retrieves all the spaces associated with a given community, organized into a hierarchical structure.';
};
};
static USER_COMMUNITY = class {
public static readonly ROUTE = '/user/:userUuid/communities';
static ACTIONS = class {
public static readonly GET_USER_COMMUNITIES_SUMMARY =
'Get communities associated with a user by user UUID';
public static readonly GET_USER_COMMUNITIES_DESCRIPTION =
'This endpoint returns the list of communities a specific user is associated with';
public static readonly ASSOCIATE_USER_COMMUNITY_SUMMARY =
'Associate a user with a community';
public static readonly ASSOCIATE_USER_COMMUNITY_DESCRIPTION =
'This endpoint associates a user with a community.';
public static readonly DISASSOCIATE_USER_COMMUNITY_SUMMARY =
'Disassociate a user from a community';
public static readonly DISASSOCIATE_USER_COMMUNITY_DESCRIPTION =
'This endpoint disassociates a user from a community. It removes the relationship between the specified user and the community. If the user is not associated with the community, an error will be returned.';
};
};
}