import { type WebhookDefinition } from '@cratis/chronicle.contracts'; import { Constructor } from '@cratis/fundamentals'; import { IEventTypes } from '../events/IEventTypes.js'; import { EventSequenceId } from '../eventSequences/EventSequenceId.js'; import { IWebhookDefinitionBuilder } from './IWebhookDefinitionBuilder.js'; import { WebhookId } from './WebhookId.js'; import { WebhookTargetUrl } from './WebhookTargetUrl.js'; /** * Implements {@link IWebhookDefinitionBuilder}. */ export declare class WebhookDefinitionBuilder implements IWebhookDefinitionBuilder { private readonly _registeredEventTypes; private readonly _eventTypes; private readonly _headers; private _eventSequenceId; private _authorization; private _isReplayable; private _isActive; /** * Creates a new builder. * @param _registeredEventTypes - Registered event types. */ constructor(_registeredEventTypes: IEventTypes); /** @inheritdoc */ onEventSequence(eventSequenceId: EventSequenceId): IWebhookDefinitionBuilder; /** @inheritdoc */ withBasicAuth(username: string, password: string): IWebhookDefinitionBuilder; /** @inheritdoc */ withBearerToken(token: string): IWebhookDefinitionBuilder; /** @inheritdoc */ withOAuth(authority: string, clientId: string, clientSecret: string): IWebhookDefinitionBuilder; /** @inheritdoc */ withHeader(key: string, value: string): IWebhookDefinitionBuilder; /** @inheritdoc */ withEventType(eventType: Constructor): IWebhookDefinitionBuilder; /** @inheritdoc */ notReplayable(): IWebhookDefinitionBuilder; /** @inheritdoc */ notActive(): IWebhookDefinitionBuilder; /** * Builds a webhook definition. * When no event types are explicitly configured, all registered event types are used. * @param id - Webhook identifier. * @param targetUrl - Webhook target URL. * @returns A contract webhook definition. */ build(id: WebhookId, targetUrl: WebhookTargetUrl): WebhookDefinition; } //# sourceMappingURL=WebhookDefinitionBuilder.d.ts.map