Skip to main content

hire_candidate

PostgREST stored procedure — POST /rest/v1/rpc/hire_candidate.

These are SECURITY DEFINER functions granted only to the service role (execute is revoked from anon/authenticated). They bypass table RLS and enforce their own company_id and status checks internally, so call them server-side with the service-role key:

const { data, error } = await supabase.rpc('hire_candidate', { p_actor, p_application_id, p_bimonthly_rate_centavos, p_facility_id, p_invitation_expires_at, p_invitation_token_hash, p_login_email, p_position_config_id, p_start_date, p_weekly_hours });

Arguments

ArgumentTypeRequired
p_actoruuidyes
p_application_iduuidyes
p_bimonthly_rate_centavosbigintno
p_facility_iduuidno
p_invitation_expires_attimestamp with time zoneyes
p_invitation_token_hashtextyes
p_login_emailtextyes
p_position_config_iduuidno
p_start_datedateyes
p_weekly_hoursnumericno

Generated from specs/supabase.json. The function's behaviour is defined by its SQL migration; this page documents its call signature only.