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