Organisations
add_organisation
async
add_organisation(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
body: AddOrganisation,
) -> GetOrganisationResponse
Adds a new organisation.
Input:
-
Data representing the organisation to be added
-
The current database
Output:
- The added organisation data
delete_organisation
async
delete_organisation(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
organisation_id: Annotated[str, Path(alias=orgId)],
) -> DeleteForceUpdateOrganisationResponse
Deletes an organisation by its ID.
Input:
-
ID of the organisation to delete
-
The current database
Output:
- Response indicating success or failure
get_organisation
async
get_organisation(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
organisation_id: Annotated[str, Path(alias=orgId)],
) -> GetOrganisationResponse
Gets an organisation by its ID.
Input:
-
ID of the organisation to get
-
The current database
-
new: The Users authentification status
Output:
- Data of the searched organisation
get_organisations
async
get_organisations(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
) -> list[GetAllOrganisationResponse]
Gets all organisations as a list.
Input:
- The current database
Output:
- List of all organisations
get_organisations_deprecated
async
get_organisations_deprecated(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
) -> list[GetAllOrganisationResponse]
Gets all organisations as a list.
Input:
- The current database
Output:
- List of all organisations
update_organisation
async
update_organisation(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
organisation_id: Annotated[str, Path(alias=orgId)],
body: EditOrganisation,
) -> GetOrganisationResponse
Updates an organisation by its ID.
Input:
-
ID of the organisation to update
-
Updated data for the organisation
-
The current database
Output:
- Updated organisation data