+
    ^PîiJ  ã                  óV  € R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHtH	t	H
t
HtHtHt ^ RIHtHtHt ^ RIHt ^ RIHtHtHt ^ RIHt ^ R	IHt ]! R
R.R7      t]P=                  R]R7      ]! R4      ]	! ]4      3R R ll4       t]P=                  R]R7      ]	! ]4      3R R ll4       t R# )u£   
routes/setup.py â€” Interview Setup
POST /api/setup/photo     â€” upload candidate photo
POST /api/setup/complete  â€” mark setup complete, return next stage URL
)ÚannotationsN)ÚPath)Ú	APIRouterÚDependsÚHTTPExceptionÚ
UploadFileÚFileÚForm)ÚPhotoUploadResponseÚSetupCompleteRequestÚSuccessResponse)Úget_current_candidate)Úget_redirect_urlÚget_stage_nameÚadvance_stage)Úsettings)Újson_dbz
/api/setupÚsetup)ÚprefixÚtagsz/photo)Úresponse_model.c               ó    € V ^8„  d   QhRRRR/# )é   Úfiler   Ú	candidateÚdict© )Úformats   "Ú1D:\Python_Codes\gen_ai\people_hub\routes\setup.pyÚ__annotate__r      s   € ÷ (ñ (Ø
ð(àñ(ó    c              ƒ  óÊ  "  € \         P                  P                  RRR7       V P                  R9  d   \	        RRR7      hV P                  4       G Rj  x€L
 p\        V4      R8”  d   \	        RRR7      h\        \        P                  ! 4       4      pV P                  R8X  d   R	MR
p\         P                  VR,           RV RV 2,          p\        VR4      ;_uu_ 4       pVP                  V4       RRR4       \        P                  ! \         P                  RVR,          RVR\        V4      RR/4       \        RVRRRRR/R7      #  Lø  + '       g   i     Lb; i5i)zt
Accept candidate photo from setup screen.
Stores in data/photos/{candidate_id}.jpg
Returns photo_id for reference.
T)ÚparentsÚexist_okú
image/jpegi�  z,Only JPEG, PNG, or WebP images are accepted.)Ústatus_codeÚdetailNz&Image too large. Maximum size is 5 MB.ÚjpgÚpngÚidÚ_Ú.ÚwbÚcandidate_idÚphoto_idÚ
photo_pathÚeventÚphoto_capturedz'Photo captured and stored successfully.ÚstatusÚpendingÚnotez+Face verification will run at session start)Úsuccessr.   ÚmessageÚfraud_check)r$   z	image/pngz
image/webpi  P )r   Ú	PHOTO_DIRÚmkdirÚcontent_typer   ÚreadÚlenÚstrÚuuidÚuuid4ÚopenÚwriteÚdbÚinsertÚSESSIONS_FILEr
   )r   r   Úcontentsr.   Úextr/   Úfs   &&     r   Úupload_photorH      s=  é € ô ×Ñ×Ñ T°DÐÔ9ð ×ÑÐ IÔIÜ¨Ð4bÔcÐcð —Y‘Y“[× €HÜ
ˆ8ƒ}�Ô&Ü¨Ð4\Ô]Ð]ä”T—Z’Z“\Ó"€HØ×+Ñ+¨|Ô;‘À€CÜ×#Ñ#¨°4­Ð(9¸¸8¸*ÀAÀcÀUÐ&KÕK€Jä	ˆj˜$×	Ô	 1Ø	�‰�Ô÷ 
 ô ‡I‚IŒh×$Ñ$Ø˜	 $�Ø˜Øœ˜J›ØÐ(ð	'ô ô ØØØ9Ø˜y¨&Ð2_Ð`ô	ð ñ' !÷ 
 ×	üs,   ‚AE#ÁEÁBE#Ã$EÃ6AE#ÅE 	ÅE#z	/completec               ó    € V ^8„  d   QhRRRR/# )r   Úbodyr   r   r   r   )r   s   "r   r   r   @   s   € ÷ ñ Ø
ðàñr    c              ƒ  óH  "  € \         P                  ! \        P                  RVR,          RRRV P                  RV P
                  RV P                  RV P                  /4       VP                  R	^4      p\        V4      p\        V4      p\        R
V R2RVRVRV/R7      # 5i)zR
Mark setup as complete. Returns the interview URL for candidate's current stage.
r-   r)   r0   Úsetup_completer.   Ú	camera_okÚmic_okÚ
network_okÚcurrent_stagezSetup complete. Proceeding to r+   Úredirect_urlÚstageÚ
stage_name)r6   Údata)rB   rC   r   rD   r.   rM   rN   rO   Úgetr   r   r   )rJ   r   rR   ÚredirectrS   s   &&   r   rL   rL   ?   s¦   é € ô ‡I‚IŒh×$Ñ$Ø˜	 $�ØÐ(Ø˜Ÿ™Ø˜Ÿ™Ø˜Ÿ™Ø˜Ÿ™ð'ô ð —-‘- °Ó3€EÜ" 5Ó)€HÜ  Ó'€JäØ0°°¸AÐ>à˜HØ˜EØ˜Jð
ôð ùs   ‚B B")!Ú__doc__Ú
__future__r   Úbase64r>   Úpathlibr   Úfastapir   r   r   r   r   r	   Úmodels.schemasr
   r   r   Úmiddleware.auth_middlewarer   Úservices.auth_servicer   r   r   Úconfigr   Úutilsr   rB   ÚrouterÚpostrH   rL   r   r    r   Ú<module>rc      s�   ðñõ
 #ß Ý ß M× Mß UÑ UÝ <ß QÑ QÝ Ý á	˜,¨g¨YÔ	7€ð ‡�ˆXÐ&9€Ó:á˜C“yÙÐ3Ó4ö(ó ;ð(ðV ‡�ˆ[¨€Ó9ñ Ð3Ó4öó :òr    