Users
add_user
async
add_user(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
body: AddUserBody,
) -> AddUserResponse
Adds a new user with the given details.
Input:
-
Data representing the new user to be added
-
The current database
Output:
- Data representing the attributes of the new user
add_user_deprecated
async
add_user_deprecated(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
body: AddUserBody,
) -> AddUserResponse
Adds a new user with the given details.
Input:
-
Data representing the new user to be added
-
The current database
Output:
- Data representing the attributes of the new user
delete_user
async
delete_user(
user_id: Annotated[str, Path(alias=user_id)],
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
) -> StandardStatusIdentifiedResponse
Deletes a user by their ID.
Input:
-
ID of the user to delete
-
auth: Authentication details of the current user
-
The current database
Output: - StandardStatusIdentifiedResponse: Response indicating success or failure
delete_user_depr
async
delete_user_depr(
user_id: Annotated[str, Path(alias=userId)],
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
) -> StandardStatusIdentifiedResponse
Deprecated. Deletes a user by their ID with the old route.
Input:
-
ID of the user to delete
-
auth: Authentication details of the current user
-
The current database
Output: - StandardStatusIdentifiedResponse: Response indicating success or failure
delete_user_token
async
delete_user_token(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
user_id: Annotated[str, Path(alias=userId)],
) -> None
Deletes a users login token by their ID.
Input:
-
ID of the user with the token to delete
-
The current database
Output:
- Response indicating success or failure
get_all_users
async
get_all_users(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
) -> list[GetUsersElement]
Retrieves a list of all users.
Input:
- None
Output:
- List containing all users
get_all_users_deprecated
async
get_all_users_deprecated(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
) -> list[GetUsersElement]
Retrieves a list of all users.
Input:
- None
Output:
- List containing all users
get_logged_in_user_info
async
get_logged_in_user_info(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
) -> GetUsersElement
Retrieves information about the logged in user.
Input:
- Authentication details of the logged in user
Output:
- Information about the logged in user
get_user_by_id
async
get_user_by_id(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
user_id: Annotated[str, Path(alias=userId)],
) -> GetUsersElement
Retrieves a user specified by id.
Input:
-
ID of the user to get
-
The current database
Output:
- Data representing the attributes of the searched user
get_user_by_id_depr
async
get_user_by_id_depr(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
user_id: Annotated[str, Path(alias=userId)],
) -> GetUsersElement
Deprecated. Retrieves a user specified by id with the old route.
Input:
-
ID of the user to get
-
The current database
Output:
- Data representing the attributes of the searched user
update_user
async
update_user(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
user_id: Annotated[str, Path(alias=userId)],
body: UserAttributesBody,
) -> UserWithName
Updates an existing user by their ID.
Input:
-
ID of the user to update
-
Updated data for the user
-
The current database
Output:
- Data representing the updated attributes of the user
update_user_depr
async
update_user_depr(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
user_id: Annotated[str, Path(alias=userId)],
body: UserAttributesBody,
) -> UserWithName
Deprecated. Updates an existing user using the old route.
Input:
-
ID of the user to update
-
Updated data for the user
-
The current database
Output:
- Data representing the updated attributes of the user