flip_api.trusts_services.update_trust_status ============================================ .. py:module:: flip_api.trusts_services.update_trust_status Attributes ---------- .. autoapisummary:: flip_api.trusts_services.update_trust_status.router Functions --------- .. autoapisummary:: flip_api.trusts_services.update_trust_status.check_model_exists flip_api.trusts_services.update_trust_status.check_trust_exists flip_api.trusts_services.update_trust_status.update_trust_status Module Contents --------------- .. py:data:: router .. py:function:: check_model_exists(model_id: uuid.UUID, db: sqlmodel.Session) -> bool Check if a model exists in the database. :param model_id: ID of the model to check. :type model_id: UUID :param db: Database session. :type db: Session :returns: True if the model exists, False otherwise. :rtype: bool .. py:function:: check_trust_exists(trust_id: str, db: sqlmodel.Session) -> bool Check if a trust exists in the database. :param trust_id: ID of the trust to check. :type trust_id: str :param db: Database session. :type db: Session :returns: True if the trust exists, False otherwise. :rtype: bool .. py:function:: update_trust_status(request: fastapi.Request, trust_id: str = Path(..., description='ID of the trust'), model_id: uuid.UUID = Path(..., description='ID of the model'), trust_status: str = Path(..., description='New status to set'), data: flip_api.domain.schemas.trusts.UpdateTrustStatusSchema | None = Body(None), db: sqlmodel.Session = Depends(get_session), user_id: uuid.UUID = Depends(verify_token)) -> dict[str, str] Update the status of a trust intersect with a model. :param request: FastAPI request object. :type request: Request :param trust_id: ID of the trust. :type trust_id: str :param model_id: ID of the model. :type model_id: UUID :param trust_status: New status to set. :type trust_status: str :param data: Request body containing additional data. :type data: UpdateTrustStatusSchema | None :param db: Database session. :type db: Session :param user_id: ID of the authenticated user. :type user_id: UUID :returns: Success message. :rtype: dict[str, str] :raises HTTPException: If the user does not have permission to update the trust status, if the model or trust does not :raises exist, if the trust status is invalid, if there is an error communicating with the trust, or if there is an: :raises error updating the trust status in the database.: