+
    Pjf!                     0   R t ^ RIt^ RIHtHtHt ^ RIt^ RIHt ^ RI	H
t
 ^RIHtHtHt ^RIHtHt ^RIHt ]! ]! ]
4      R,          4      t]P*                  ! R	] U u/ uF  q V bK  	  up ]R
7      t]! ]4      t]P*                  ! R] Uu/ uF  qVbK  	  up]R
7      tR R lt]! RR7      t]P9                  R. R+OR7      R,R R ll4       t]P9                  RR.R7      R,R R ll4       t]P9                  R. R-OR7      R.R R ll4       t]P9                  R. R/OR7      R.R R ll4       t ]P9                  RR.R7      R,R  R! ll4       t!]P9                  R"R#.R7      R,R$ R% ll4       t"]P9                  R&R'R(.R7      R0R) R* ll4       t#R# u up i u upi )1z=Contains commands to manage webhooks on the Hugging Face Hub.N)	Annotatedget_argsget_type_hints)WEBHOOK_DOMAIN_T)WebhookWatchedItem)TokenOpt
get_hf_apityper_factory)ArgumentOption)outtypeWatchedItemType)r   WebhookDomainc                \    V ^8  d   QhR\         \        ,          R\         \        ,          /# )   valuesreturn)liststrr   )formats   "u/Users/ahmed/devFolder/Ultron/claude-voice/gateway/.venv/lib/python3.14/site-packages/huggingface_hub/cli/webhooks.py__annotate__r   )   s$      c t,>'?     c           	     b   . p\        \        4      pV  F  pRV9  d-   \        P                  ! RV RRP	                  V4       R24      hVP                  R^4      w  rEWB9  d-   \        P                  ! RV RRP	                  V4       R24      hVP                  \        WER7      4       K  	  V# )a9  Parse 'type:name' strings into WebhookWatchedItem objects.

Args:
    values: List of strings in the format 'type:name'
        (e.g., 'model:bert-base-uncased', 'org:HuggingFace').

Returns:
    List of WebhookWatchedItem objects.

Raises:
    click.BadParameter: If any value doesn't match the expected format.
:zCExpected format 'type:name' (e.g. 'model:bert-base-uncased'), got 'z'. Valid types: z, .zInvalid type ')r   name)tuple_WATCHED_TYPESclickBadParameterjoinsplitappendr   )r   itemsvalid_typesvkindr   s   &     r   _parse_watchr)   )   s     E'Ka<$$UVWUX Y!!%;!7 8;  WWS!_
"$$~dV;KDIIVaLbKccd%eff'T=>  Lr   zManage webhooks on the Hub.helpz	list | ls)examplesc                (    V ^8  d   QhR\         RR/# )r   tokenr   N)r   )r   s   "r   r   r   P   s      	r   c                   \        V R7      pVP                  4        UUu. uF  pRVP                  RVP                  ;'       g    RRVP                  RVP
                  ;'       g    . RVP                  ;'       g    .  Uu. uF  q3P                   RVP                   2NK  	  up/NK  	  ppp\        P                  ! V4       R	# u upi u uppi )
z'List all webhooks for the current user.r.   idurlz(job)disableddomainswatchedr   N)r   list_webhooksr1   r2   r3   r4   r5   r   r   r   table)r.   apiwwiresultss   &    r   webhooks_lsr<   H   s     5
!C ""$	 %A !$$155##G

qyyB!))//r/K/277)1RWWI./K	
 %  	 IIg	 L	s)   $C!C'C=C#C%CCinfozhf webhooks info abc123c                b    V ^8  d   QhR\         \        \        RR7      3,          R\        RR/# )r   
webhook_idzThe ID of the webhook.r*   r.   r   Nr   r   r
   r   )r   s   "r   r   r   h   s6      #x-EFFG 
r   c                l    \        VR7      pVP                  V 4      p\        P                  ! V4       R# )z'Show full details for a single webhook.r0   N)r   get_webhookr   dictr?   r.   r8   webhooks   &&  r   webhooks_inforF   b   s(     5
!Cooj)GHHWr   createc                   V ^8  d   QhR\         \        \        ,          \        RRR7      3,          R\         \        R,          \        RR7      3,          R\         \        R,          \        R	R
R7      3,          R\         \        \        ,          R,          \        RRR7      3,          R\         \        R,          \        RR7      3,          R\
        RR/# )r   watch--watchzRItem to watch, in 'type:name' format (e.g. 'model:bert-base-uncased'). Repeatable.r*   r2   NzBURL to send webhook payloads to. Mutually exclusive with --job-id.job_idz--job-idz]ID of a Job to trigger (from job.id) instead of pinging a URL. Mutually exclusive with --url.domain--domainzNDomain to watch: 'repo' or 'discussions'. Repeatable. Defaults to all domains.secretz.Optional secret used to sign webhook payloads.r.   r   )r   r   r   r   r   r   )r   s   "r   r   r   z   s     ,1 ,1S	e	
	,1 
d
XY	[
,1 d
p	
	,1& ]d"a	
	',14 d
DE	G5,1< =,1> 
?,1r   c                l   Ve   Ve   \         P                  ! R4      hVf   Vf   \         P                  ! R4      h\        VR7      p\        V 4      pV'       d   V Uu. uF  qP                  NK  	  upMRp	VP                  WWyVR7      p
\        P                  ! RV
P                  R7       R# u upi )ztCreate a new webhook.

Provide either --url (to ping a remote server) or --job-id (to trigger a Job), but not both.
Nz+Provide either --url or --job-id, not both.z!Provide either --url or --job-id.r0   )r2   rK   r5   r4   rN   zWebhook createdr1   )	r    r!   r   r)   valuecreate_webhookr   resultr1   )rI   r2   rK   rL   rN   r.   r8   watched_itemsdr4   rE   s   &&&&&&     r   webhooks_createrV   r   s    X 6-  !NOO
{v~  !DEE
5
!C 'M+1'1ww'tG  Shn oGJJ WZZ0 (s    B1updatec                   V ^8  d   QhR\         \        \        RR7      3,          R\         \        R,          \        RR7      3,          R\         \        \        ,          R,          \        RR	R7      3,          R
\         \        \
        ,          R,          \        RRR7      3,          R\         \        R,          \        RR7      3,          R\        RR/# )r   r?   z The ID of the webhook to update.r*   r2   Nz$New URL to send webhook payloads to.rI   rJ   ziNew list of items to watch, in 'type:name' format. Repeatable. Replaces the entire existing watched list.rL   rM   zBNew list of domains to watch: 'repo' or 'discussions'. Repeatable.rN   z)New secret used to sign webhook payloads.r.   r   )r   r   r
   r   r   r   r   )r   s   "r   r   r      s     "1 "1#x-OPPQ"1	d
:;	=
"1 S	DI	
		"1  ]d"U	
	!"1. d
?@	B/"16 7"18 
9"1r   c                   \        VR7      pV'       d   \        V4      MRpV'       d   V Uu. uF  qP                  NK  	  upMRp	VP                  WWyVR7      p
\        P
                  ! RV
P                  R7       R# u upi )z>Update an existing webhook. Only provided options are changed.r0   N)r2   r5   r4   rN   zWebhook updatedrP   )r   r)   rQ   update_webhookr   rS   r1   )r?   r2   rI   rL   rN   r.   r8   rT   rU   r4   rE   s   &&&&&&     r   webhooks_updater[      sg    L 5
!C+0L'dM+1'1ww'tG  mek lGJJ WZZ0 (s   A?enablezhf webhooks enable abc123c                b    V ^8  d   QhR\         \        \        RR7      3,          R\        RR/# )r   r?   z The ID of the webhook to enable.r*   r.   r   Nr@   )r   s   "r   r   r      s6     1 1#x-OPPQ11 
1r   c                    \        VR7      pVP                  V 4      p\        P                  ! RVP                  R7       R# )zEnable a disabled webhook.r0   zWebhook enabledrP   N)r   enable_webhookr   rS   r1   rD   s   &&  r   webhooks_enabler`      s1     5
!C  ,GJJ WZZ0r   disablezhf webhooks disable abc123c                b    V ^8  d   QhR\         \        \        RR7      3,          R\        RR/# )r   r?   z!The ID of the webhook to disable.r*   r.   r   Nr@   )r   s   "r   r   r      s6     2 2#x-PQQR22 
2r   c                    \        VR7      pVP                  V 4      p\        P                  ! RVP                  R7       R# )zDisable an active webhook.r0   zWebhook disabledrP   N)r   disable_webhookr   rS   r1   rD   s   &&  r   webhooks_disablere      s1     5
!C!!*-GJJ!gjj1r   deletezhf webhooks delete abc123zhf webhooks delete abc123 --yesc                    V ^8  d   QhR\         \        \        RR7      3,          R\         \        \	        RRRR7      3,          R\
        R	R
/# )r   r?   z The ID of the webhook to delete.r*   yesz--yesz-yzSkip confirmation prompt.r.   r   N)r   r   r
   boolr   r   )r   s   "r   r   r      s^     1 1#x-OPPQ1	,	
	
1 1 
1r   c                    \         P                  ! RV  R2VR7       \        VR7      pVP                  V 4       \         P                  ! RV R7       R# )zDelete a webhook permanently.z)Are you sure you want to delete webhook 'z'?)rh   r0   zWebhook deletedrP   N)r   confirmr   delete_webhookrS   )r?   rh   r.   r8   s   &&& r   webhooks_deleterm      sD    ( KK;J<rJPST
5
!Cz"JJ Z0r   )zhf webhooks lszhf webhooks ls --format jsonzhf webhooks ls --format quiet)N)zQhf webhooks create --url https://example.com/hook --watch model:bert-base-uncasedzjhf webhooks create --url https://example.com/hook --watch org:HuggingFace --watch model:gpt2 --domain repozJhf webhooks create --job-id 687f911eaea852de79c4a50a --watch user:julien-c)NNNNN)z8hf webhooks update abc123 --url https://new-url.com/hookz:hf webhooks update abc123 --watch model:gpt2 --domain repoz,hf webhooks update abc123 --secret newsecret)FN)$__doc__enumtypingr   r   r   r    huggingface_hub.constantsr   huggingface_hub.hf_apir   
_cli_utilsr   r   r	   
_frameworkr
   r   _outputr   r   Enumr   r   _DOMAIN_TYPESr   r)   webhooks_clicommandr<   rF   rV   r[   r`   re   rm   )trU   s   00r   <module>r{      s   D  6 6  6 5 
 )  .);<VDE))-n/Mn1n/MTWX)*		/-+H-QqD-+HsS8 "?@   $ 
!     ,1,1^   "1"1J #  11 $  22 #)  11u 0N ,Is   F
F
