Skip to main content

WebhookTemplateService

Trait WebhookTemplateService 

Source
pub trait WebhookTemplateService<I: Iterator<Item = Result<Bytes, Error>>> {
    // Required methods
    fn validate_template(
        &self,
        auth_: &BearerToken,
        request: &ValidateTemplateRequest,
    ) -> Result<ValidationResult, Error>;
    fn test_webhook(
        &self,
        auth_: &BearerToken,
        request: &TestWebhookRequest,
    ) -> Result<TestWebhookResponse, Error>;
}

Required Methods§

Source

fn validate_template( &self, auth_: &BearerToken, request: &ValidateTemplateRequest, ) -> Result<ValidationResult, Error>

Validates a Handlebars webhook template and returns the evaluated payload. Checks for template syntax errors and validates that the result is valid JSON.

Source

fn test_webhook( &self, auth_: &BearerToken, request: &TestWebhookRequest, ) -> Result<TestWebhookResponse, Error>

Sends a test webhook using the specified integration and template. This allows users to verify their webhook configuration before using it in procedures.

Implementors§

Source§

impl<I: Iterator<Item = Result<Bytes, Error>>, __C> WebhookTemplateService<I> for WebhookTemplateServiceClient<__C>
where __C: Client<ResponseBody = I>,