+
    &j4$                         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 ]! ]! ]
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]P3                  R. R*OR7      R+R R ll4       t]P3                  RR.R7      R+R R ll4       t]P3                  R. R,OR7      R-R R ll4       t]P3                  R. R.OR7      R-R R ll4       t]P3                  RR.R7      R+R R  ll4       t]P3                  R!R".R7      R+R# R$ ll4       t]P3                  R%R&R'.R7      R/R( R) ll4       t R# u up i u upi )0a  Contains commands to manage webhooks on the Hugging Face Hub.

Usage:
    # list all webhooks
    hf webhooks ls

    # show details of a single webhook
    hf webhooks info <webhook_id>

    # create a new webhook
    hf webhooks create --url https://example.com/hook --watch model:bert-base-uncased

    # create a webhook watching multiple items and domains
    hf webhooks create --url https://example.com/hook --watch org:HuggingFace --watch model:gpt2 --domain repo

    # update a webhook
    hf webhooks update <webhook_id> --url https://new-url.com/hook

    # enable / disable a webhook
    hf webhooks enable <webhook_id>
    hf webhooks disable <webhook_id>

    # delete a webhook
    hf webhooks delete <webhook_id>
N)	Annotatedget_argsget_type_hints)WEBHOOK_DOMAIN_T)WebhookWatchedItem)TokenOpt
get_hf_apityper_factory)outtypeWatchedItemType)r   WebhookDomainc                \    V ^8  d   QhR\         \        ,          R\         \        ,          /# )   valuesreturn)liststrr   )formats   "t/Users/jameslopez/projects/CWCArchive/cwc-podcast/.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:
    typer.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typer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   g   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_webhooksr/   r0   r1   r2   r3   r   r   r
   table)r,   apiwwiresultss   &    r   webhooks_lsr:   _   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                x    V ^8  d   QhR\         \        \        P                  ! RR7      3,          R\        RR/# )r   
webhook_idzThe ID of the webhook.r(   r,   r   Nr   r   r   Argumentr   )r   s   "r   r   r      s:      #u~~3KLLM 
r   c                l    \        VR7      pVP                  V 4      p\        P                  ! V4       R# )z'Show full details for a single webhook.r.   N)r   get_webhookr
   dictr=   r,   r6   webhooks   &&  r   webhooks_inforE   y   s(     5
!Cooj)GHHWr   createc                "   V ^8  d   QhR\         \        \        ,          \        P                  ! RRR7      3,          R\         \        R,          \        P                  ! RR7      3,          R\         \        R,          \        P                  ! R	R
R7      3,          R\         \        \
        ,          R,          \        P                  ! RRR7      3,          R\         \        R,          \        P                  ! RR7      3,          R\        RR/# )r   watch--watchzRItem to watch, in 'type:name' format (e.g. 'model:bert-base-uncased'). Repeatable.r(   r0   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   Optionr   r   )r   s   "r   r   r      s     ,1 ,1S	e	
	,1 
d
^_	a
,1 d
p	
	,1& ]d"a	
	',14 d
JK	M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.r.   )r0   rJ   r3   r2   rM   zWebhook createdr/   )	r   r   r   r'   valuecreate_webhookr
   resultr/   )rH   r0   rJ   rK   rM   r,   r6   watched_itemsdr2   rD   s   &&&&&&     r   webhooks_createrV      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\         \        \        P                  ! RR7      3,          R\         \        R,          \        P                  ! RR7      3,          R\         \
        \        ,          R,          \        P                  ! RR	R7      3,          R
\         \
        \        ,          R,          \        P                  ! RRR7      3,          R\         \        R,          \        P                  ! RR7      3,          R\        RR/# )r   r=   z The ID of the webhook to update.r(   r0   Nz$New URL to send webhook payloads to.rH   rI   ziNew list of items to watch, in 'type:name' format. Repeatable. Replaces the entire existing watched list.rK   rL   zBNew list of domains to watch: 'repo' or 'discussions'. Repeatable.rM   z)New secret used to sign webhook payloads.r,   r   )r   r   r   r?   rN   r   r   r   )r   s   "r   r   r      s     "1 "1#u~~3UVVW"1	d
@A	C
"1 S	DI	
		"1  ]d"U	
	!"1. d
EF	H/"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.r.   N)r0   r3   r2   rM   zWebhook updatedrP   )r   r'   rQ   update_webhookr
   rS   r/   )r=   r0   rH   rK   rM   r,   r6   rT   rU   r2   rD   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                x    V ^8  d   QhR\         \        \        P                  ! 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      s:     1 1#u~~3UVVW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.r.   zWebhook enabledrP   N)r   enable_webhookr
   rS   r/   rC   s   &&  r   webhooks_enabler`      s1     5
!C  ,GJJ WZZ0r   disablezhf webhooks disable abc123c                x    V ^8  d   QhR\         \        \        P                  ! 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     s:     2 2#u~~3VWWX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.r.   zWebhook disabledrP   N)r   disable_webhookr
   rS   r/   rC   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\         \        \        P                  ! RR7      3,          R\         \        \        P
                  ! 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   r?   boolrN   r   )r   s   "r   r   r     sf     1 1#u~~3UVVW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   r.   zWebhook deletedrP   N)r
   confirmr   delete_webhookrS   )r=   rh   r,   r6   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	   _outputr
   r   Enumr   r   _DOMAIN_TYPESr   r'   webhooks_clicommandr:   rE   rV   r[   r`   re   rm   )trU   s   00r   <module>rz      s  4  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
