Space CRUD apis

This commit is contained in:
hannathkadher
2024-10-17 11:20:05 +04:00
parent d6777c8ec1
commit 96d52962aa
11 changed files with 479 additions and 0 deletions
@@ -69,4 +69,33 @@ export class ControllerRoute {
'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.';
};
};
static SPACE = class {
public static readonly ROUTE = '/communities/:communityId/spaces';
static ACTIONS = class {
public static readonly CREATE_SPACE_SUMMARY = 'Create a new space';
public static readonly CREATE_SPACE_DESCRIPTION =
'This endpoint allows you to create a space in a specified community. Optionally, you can specify a parent space to nest the new space under it.';
public static readonly LIST_SPACE_SUMMARY = 'List spaces in community';
public static readonly LIST_SPACE_DESCRIPTION =
'List spaces in specified community by community id';
public static readonly GET_SPACE_SUMMARY = 'Get a space in community';
public static readonly GET_SPACE_DESCRIPTION =
'Get Space in specified community by community id';
public static readonly DELETE_SPACE_SUMMARY = 'Delete a space';
public static readonly DELETE_SPACE_DESCRIPTION =
'Deletes a space by its UUID and community ID. If the space has children, they will also be deleted due to cascade delete.';
public static readonly UPDATE_SPACE_SUMMARY = 'Update a space';
public static readonly UPDATE_SPACE_DESCRIPTION =
'Updates a space by its UUID and community ID. You can update the name, parent space, and other properties. If a parent space is provided and not already a parent, its `isParent` flag will be set to true.';
public static readonly GET_HEIRARCHY_SUMMARY = 'Get spaces hierarchy';
public static readonly GET_HEIRARCHY_DESCRIPTION =
'Fetches all spaces within a community and returns them in a hierarchical structure with parent-child relationships.';
};
};
}