ephemeris_forge_forgejo/api/operations/
webhooks.rs1use ephemeris_forge::RepoRef;
2
3use crate::api::error::ForgeError;
4use crate::api::model::Hook;
5use crate::api::request::{CreateHookOption, EditHookOption};
6
7pub trait WebhooksApi {
9 fn create_webhook(
11 &self,
12 repo: &RepoRef,
13 body: &CreateHookOption,
14 ) -> impl Future<Output = Result<(), ForgeError>> + Send;
15
16 fn delete_webhook(
18 &self,
19 repo: &RepoRef,
20 id: i64,
21 ) -> impl Future<Output = Result<(), ForgeError>> + Send;
22
23 fn patch_webhook(
25 &self,
26 repo: &RepoRef,
27 id: i64,
28 body: &EditHookOption,
29 ) -> impl Future<Output = Result<(), ForgeError>> + Send;
30
31 fn webhooks(
33 &self,
34 repo: &RepoRef,
35 ) -> impl Future<Output = Result<Vec<Hook>, ForgeError>> + Send;
36}