import 'reflect-metadata'; import { WebhookId } from './WebhookId.js'; import { WebhookTargetUrl } from './WebhookTargetUrl.js'; /** * Metadata stored on a webhook class. */ export interface WebhookMetadata { /** The webhook identifier. */ readonly id: WebhookId; /** The webhook target URL. */ readonly targetUrl: WebhookTargetUrl; /** Optional explicit event sequence id. */ readonly eventSequenceId: string | undefined; } /** * TypeScript decorator that marks a class as a discoverable webhook. * Overloads: * - `@webhook(targetUrl)` -> class name is used as identifier. * - `@webhook(id, targetUrl)` -> explicit identifier. * - `@webhook(id, targetUrl, eventSequenceId)` -> explicit identifier and event sequence. * @param idOrTargetUrl - The webhook identifier or target URL. * @param targetUrlOrUndefined - The webhook target URL when id is provided. * @param eventSequenceId - Optional event sequence identifier. * @returns A class decorator. */ export declare function webhook(targetUrl: string): ClassDecorator; export declare function webhook(id: string, targetUrl: string): ClassDecorator; export declare function webhook(id: string, targetUrl: string, eventSequenceId: string): ClassDecorator; /** * Gets webhook metadata from a webhook class. * @param target - The class constructor. * @returns The metadata, if any. */ export declare function getWebhookMetadata(target: Function): WebhookMetadata | undefined; /** * Checks whether a class has webhook metadata. * @param target - The class constructor. * @returns True when decorated as webhook. */ export declare function isWebhook(target: Function): boolean; //# sourceMappingURL=webhook.d.ts.map