Warninglists
add_warninglist
async
add_warninglist(auth: Annotated[Auth, Depends(authorize(HYBRID, [WARNINGLIST]))], db: Annotated[Session, Depends(get_db)], body: CreateWarninglistBody) -> WarninglistResponse
Add a new warninglist with given details.
args:
-
auth: Authentication details
-
db: Database session
-
body: CreateWarninglistBody, Data for creating the new warninglist
returns:
- WarninglistResponse: Response with details of the new warninglist
delete_warninglist
async
delete_warninglist(auth: Annotated[Auth, Depends(authorize(HYBRID, [SITE_ADMIN]))], db: Annotated[Session, Depends(get_db)], warninglist_id: Annotated[int, Path(alias=id)]) -> WarninglistResponse
Delete a specific warninglist.
args:
-
auth: Authentication details
-
db: Database session
-
warninglist_id: ID of the warninglist to delete
returns:
- WarninglistResponse: Response showing success or failure
get_all_or_selected_warninglists
async
get_all_or_selected_warninglists(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], value: str | None = None, enabled: bool | None = None) -> GetSelectedAllWarninglistsResponse
Receive a list of all warning lists, or when setting the path parameters value and enabled, receive a list of warninglists for which the value matches either the name, description, or type and enabled matches given parameter.
args:
-
auth: Authentication details
-
db: Database session
-
value: str | None, Search term for filtering by value
-
enabled: bool | None, Status filter (enabled or disabled)
returns:
- GetSelectedAllWarninglistsResponse: Response containing filtered or all warninglists
get_warninglist_details
async
get_warninglist_details(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], warninglist_id: Annotated[int, Path(alias=warninglistId)]) -> WarninglistResponse
Retrieve details of a specific warninglist by its ID.
args:
-
auth: Authentication details
-
db: Database session
-
warninglist_id: ID of the warninglist to fetch
returns:
- WarninglistResponse: Response with details of the searched warninglist
get_warninglist_details_depr
async
get_warninglist_details_depr(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], warninglist_id: Annotated[int, Path(alias=warninglistId)]) -> WarninglistResponse
Deprecated. Retrieve details of a specific warninglist by its ID using the old route.
args:
-
auth: Authentication details
-
db: Database session
-
warninglist_id: ID of the warninglist to fetch
returns:
- WarninglistResponse: Response with details of the searched warninglist
get_warninglists_by_value
async
get_warninglists_by_value(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], body: CheckValueWarninglistsBody) -> CheckValueResponse | dict
Retrieve a list of ID and name of enabled warninglists, which match has the given search term as entry.
args:
-
auth: Authentication details
-
db: Database session
-
body: CheckValueWarninglistsBody, Data for searching warninglists by value
returns:
- CheckValueResponse | dict: Response with searched warninglists
post_toggleEnable
async
post_toggleEnable(auth: Annotated[Auth, Depends(authorize(HYBRID, [SITE_ADMIN]))], db: Annotated[Session, Depends(get_db)], body: ToggleEnableWarninglistsBody) -> ToggleEnableWarninglistsResponse
Disable/Enable a specific warninglist by its ID or name.
args:
-
auth: Authentication details
-
db:Database session
-
body: ToggleEnableWarninglistsBody, Data to toggle enable status of the warninglist
returns:
- ToggleEnableWarninglistsResponse: Response showing success or failure
search_warninglists
async
search_warninglists(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], body: GetSelectedWarninglistsBody) -> GetSelectedAllWarninglistsResponse
Retrieve a list of warninglists, which match given search terms using the old route.
args:
-
auth: Authentication details
-
db: Database session
-
body: GetSelectedWarninglistsBody, Data for filtering warninglists
returns:
- GetSelectedAllWarninglistsResponse: Response containing filtered warninglists
update_all_warninglists
async
update_all_warninglists(auth: Annotated[Auth, Depends(authorize(HYBRID, [SITE_ADMIN]))], db: Annotated[Session, Depends(get_db)]) -> StandardStatusResponse
Update all warninglists.
args:
-
auth: Authentication details
-
db: Database session
returns:
- StandardStatusResponse: Response indicating success or failure
update_all_warninglists_depr
async
update_all_warninglists_depr(auth: Annotated[Auth, Depends(authorize(HYBRID, [SITE_ADMIN]))], db: Annotated[Session, Depends(get_db)]) -> StandardStatusResponse
Deprecated. Update all warninglists.
args:
-
auth: Authentication details
-
db: Database session
returns:
- StandardStatusResponse: Response indicating success or failure