Skip to content

Organisations

add_organisation async

add_organisation(
    auth: Annotated[Auth, Depends(authorize(HYBRID))],
    db: Annotated[Session, Depends(get_db)],
    body: AddOrganisation,
) -> GetOrganisationResponse

Adds a new organisation.

args:

  • Data representing the organisation to be added

  • The current database

returns:

  • The added organisation data

delete_organisation async

delete_organisation(
    auth: Annotated[Auth, Depends(authorize(HYBRID))],
    db: Annotated[Session, Depends(get_db)],
    organisation_id: Annotated[str, Path(alias=orgId)],
) -> DeleteForceUpdateOrganisationResponse

Deletes an organisation by its ID.

args:

  • ID of the organisation to delete

  • The current database

returns:

  • Response indicating success or failure

get_organisation async

get_organisation(
    auth: Annotated[Auth, Depends(authorize(HYBRID))],
    db: Annotated[Session, Depends(get_db)],
    organisation_id: Annotated[str, Path(alias=orgId)],
) -> GetOrganisationResponse

Gets an organisation by its ID.

args:

  • ID of the organisation to get

  • The current database

  • new: The Users authentification status

returns:

  • Data of the searched organisation

get_organisations async

get_organisations(
    auth: Annotated[Auth, Depends(authorize(HYBRID))],
    db: Annotated[Session, Depends(get_db)],
) -> list[GetAllOrganisationResponse]

Gets all organisations as a list.

args:

  • The current database

returns:

  • List of all organisations

get_organisations_deprecated async

get_organisations_deprecated(
    auth: Annotated[Auth, Depends(authorize(HYBRID))],
    db: Annotated[Session, Depends(get_db)],
) -> list[GetAllOrganisationResponse]

Gets all organisations as a list.

args:

  • The current database

returns:

  • List of all organisations

update_organisation async

update_organisation(
    auth: Annotated[Auth, Depends(authorize(HYBRID))],
    db: Annotated[Session, Depends(get_db)],
    organisation_id: Annotated[str, Path(alias=orgId)],
    body: EditOrganisation,
) -> GetOrganisationResponse

Updates an organisation by its ID.

args:

  • ID of the organisation to update

  • Updated data for the organisation

  • The current database

returns:

  • Updated organisation data