Skip to content

shares

API routes for recipe sharing operations.

accept_all_shares

accept_all_shares(service: RecipeShareService, user_id: UUID) -> list[ShareResponse]

Accept all pending share invitations.

accept_share

accept_share(
    share_id: UUID, service: RecipeShareService, user_id: UUID
) -> ShareResponse

Accept a pending share invitation.

get_pending_shares

get_pending_shares(
    service: RecipeShareService, user_id: UUID
) -> list[PendingShareResponse]

List pending share invitations for the current user.

get_pending_shares_count

get_pending_shares_count(
    service: RecipeShareService, user_id: UUID
) -> PendingShareCountResponse

Count pending share invitations for the current user.

leave_recipe

leave_recipe(recipe_id: UUID, service: RecipeShareService, user_id: UUID) -> None

Remove yourself from a shared recipe.

reject_share

reject_share(
    share_id: UUID, service: RecipeShareService, user_id: UUID
) -> ShareResponse

Reject a pending share invitation.

remove_share

remove_share(share_id: UUID, service: RecipeShareService, user_id: UUID) -> None

Remove a share (owner revokes or shared user leaves).

share_recipe

share_recipe(
    data: ShareRecipeRequest, service: RecipeShareService, user_id: UUID
) -> ShareResponse

Share a recipe with another user by email.