Interface IWebhookDefinitionBuilder
- Namespace
- Cratis.Chronicle.Webhooks
- Assembly
- Cratis.Chronicle.dll
Defines a builder for WebhookDefinition.
public interface IWebhookDefinitionBuilder
- Extension Methods
Methods
NotActive()
Specifies that the webhook is not active.
IWebhookDefinitionBuilder NotActive()
Returns
- IWebhookDefinitionBuilder
The IWebhookDefinitionBuilder builder for continuation.
NotReplayable()
Specifies that the webhook is not replayable.
IWebhookDefinitionBuilder NotReplayable()
Returns
- IWebhookDefinitionBuilder
The IWebhookDefinitionBuilder builder for continuation.
OnEventSequence(EventSequenceId)
Sets the EventSequenceId that the webhook observer should be registered on.
IWebhookDefinitionBuilder OnEventSequence(EventSequenceId eventSequenceId)
Parameters
eventSequenceIdEventSequenceIdThe EventSequenceId.
Returns
- IWebhookDefinitionBuilder
The IWebhookDefinitionBuilder builder for continuation.
WithBasicAuth(string, string)
Use basic authentication.
IWebhookDefinitionBuilder WithBasicAuth(string username, string password)
Parameters
Returns
- IWebhookDefinitionBuilder
The IWebhookDefinitionBuilder builder for continuation.
WithBearerToken(string)
Use bearer token authentication.
IWebhookDefinitionBuilder WithBearerToken(string token)
Parameters
tokenstringThe bearer token.
Returns
- IWebhookDefinitionBuilder
The IWebhookDefinitionBuilder builder for continuation.
WithEventType<TEventType>()
Adds an event type to the webhook observer.
IWebhookDefinitionBuilder WithEventType<TEventType>()
Returns
- IWebhookDefinitionBuilder
The IWebhookDefinitionBuilder builder for continuation.
Type Parameters
TEventTypeThe Type of the event type.
WithGenerationDelivery(EventGenerationDelivery)
Sets the generation delivery policy. Compatibility is the default.
IWebhookDefinitionBuilder WithGenerationDelivery(EventGenerationDelivery generationDelivery)
Parameters
generationDeliveryEventGenerationDeliveryThe generation delivery policy.
Returns
- IWebhookDefinitionBuilder
The builder for continuation.
Exceptions
- WebhookGenerationDeliveryNotSupported
The builder does not support pinned delivery.
WithHeader(string, string)
Adds a header to the webhook requests.
IWebhookDefinitionBuilder WithHeader(string key, string value)
Parameters
Returns
- IWebhookDefinitionBuilder
The IWebhookDefinitionBuilder builder for continuation.
WithOAuth(string, string, string, string)
Uses OAuth client credentials, optionally requesting a scope.
IWebhookDefinitionBuilder WithOAuth(string authority, string clientId, string clientSecret, string scope = "")
Parameters
authoritystringThe authority.
clientIdstringThe client identifier.
clientSecretstringThe client secret.
scopestringThe optional scope.
Returns
- IWebhookDefinitionBuilder
The builder continuation.
Exceptions
- NotSupportedException
The builder does not support scoped OAuth configuration.