/** * Webhook types and utilities. */ export interface WebhookConfig { url: string; secret?: string; retries?: number; timeout?: number; } export interface WebhookEvent { type: WebhookEventType; timestamp: string; data: Record; } export type WebhookEventType = "prediction.created" | "prediction.processing" | "prediction.succeeded" | "prediction.failed" | "prediction.canceled"; export interface WebhookDeliveryResult { success: boolean; statusCode?: number; error?: string; retryCount: number; timestamp: string; } /** * Generate a webhook signature for request verification. */ export declare function generateWebhookSignature(payload: string, secret: string): string; /** * Verify a webhook signature from request headers. */ export declare function verifyWebhookSignature(payload: string, signature: string, secret: string): boolean; /** * Format a webhook event payload. */ export declare function formatWebhookEvent(type: WebhookEventType, data: Record): WebhookEvent; /** * Validate webhook configuration. */ export declare function validateWebhookConfig(config: WebhookConfig): string[]; /** * Default webhook configuration. */ export declare const DEFAULT_WEBHOOK_CONFIG: Partial; /** * Retry delay calculator with exponential backoff. */ export declare function calculateRetryDelay(attempt: number, baseDelay?: number): number;