import type { NormalizedWebhook } from './pipedrive-adapter.js'; import type { PipedriveAdapterConfig, PipedriveWebhookBasicAuthConfig } from './types.js'; export declare const PIPEDRIVE_PROVIDER = "pipedrive"; export declare const PIPEDRIVE_AUTHORIZATION_HEADER = "authorization"; export declare const PIPEDRIVE_EVENT_ACTION_HEADER = "x-pipedrive-event-action"; export declare const PIPEDRIVE_EVENT_OBJECT_HEADER = "x-pipedrive-event-object"; export declare const PIPEDRIVE_TIMESTAMP_HEADER = "x-pipedrive-timestamp"; type PipedriveRecord = Record; type HeaderValue = boolean | number | readonly string[] | string | null | undefined; export type PipedriveWebhookHeaders = Headers | Iterable | Record; export interface PipedriveWebhookConnectionMetadata { connectionId?: string; deliveryId?: string; provider: string; providerConfigKey?: string; requestId?: string; webhookTimestamp?: number; } export interface PipedriveWebhookAuthValidationResult { expectedAuthorization?: string; ok: boolean; reason?: 'invalid-authorization' | 'missing-authorization' | 'missing-credentials'; receivedAuthorization?: string; } export interface PipedriveWebhookTimestampValidationResult { driftMs?: number; ok: boolean; reason?: 'missing-timestamp' | 'stale-timestamp'; webhookTimestamp?: number; } export declare function normalizePipedriveWebhook(rawPayload: unknown, headers?: PipedriveWebhookHeaders, config?: PipedriveAdapterConfig): NormalizedWebhook; export declare function parsePipedriveWebhookPayload(rawPayload: unknown): PipedriveRecord; export declare function computePipedriveBasicAuthorization(credentials: PipedriveWebhookBasicAuthConfig): string; export declare function validatePipedriveWebhookBasicAuth(headers: PipedriveWebhookHeaders, credentials: PipedriveWebhookBasicAuthConfig | undefined): PipedriveWebhookAuthValidationResult; export declare function assertValidPipedriveWebhookBasicAuth(headers: PipedriveWebhookHeaders, credentials: PipedriveWebhookBasicAuthConfig | undefined): void; export declare function validatePipedriveWebhookTimestamp(payload: unknown, headers?: PipedriveWebhookHeaders, toleranceMs?: number, now?: number): PipedriveWebhookTimestampValidationResult; export declare function assertValidPipedriveWebhookTimestamp(payload: unknown, headers?: PipedriveWebhookHeaders, toleranceMs?: number, now?: number): void; export declare function extractPipedriveConnectionMetadata(payload: unknown, headers?: PipedriveWebhookHeaders): PipedriveWebhookConnectionMetadata; export declare function extractPipedriveEventType(payload: unknown, headers?: PipedriveWebhookHeaders, objectType?: string, action?: string): string; export declare function extractPipedriveObjectType(payload: unknown, headers?: PipedriveWebhookHeaders): string; export declare function extractPipedriveAction(payload: unknown, headers?: PipedriveWebhookHeaders): string; export declare function extractPipedriveObjectId(payload: unknown, objectType?: string): string; export declare function computePipedriveBodyDigest(rawPayload: unknown, salt?: string): string; export {}; //# sourceMappingURL=webhook-normalizer.d.ts.map