import type { Result } from './result'; export interface WebhookVerifier { readonly signatureHeader: string; readonly algorithm: WebhookSignatureAlgorithm; readonly secretSource: 'org-connection-secret' | 'provider-shared'; verify(input: WebhookVerifyInput): Result; } export type WebhookSignatureAlgorithm = 'hmac-sha256' | 'hmac-sha1' | 'ed25519' | 'none'; export interface WebhookVerifyInput { readonly rawBody: Uint8Array; readonly headers: Readonly>; readonly secret: string; } export interface MappedEnvelope { readonly entityKind: string; readonly event: string; readonly payload: Readonly>; readonly externalId?: string; readonly externalSpaceKey?: string; readonly adapterKindOverride?: string; } export interface EventMapper { map(input: EventMapperInput): Result; } export interface EventMapperInput { readonly rawEvent: unknown; readonly headers: Readonly>; } export type IdempotencyKeyExtractor = (input: { readonly rawBody: unknown; readonly headers: Readonly>; }) => string; export interface WebhookOrgResolver { resolve(input: { readonly rawBody: unknown; readonly headers: Readonly>; readonly lookup: OrgConnectionLookup; }): Promise<{ orgId: string; orgConnectionId: string; } | null>; } export interface OrgConnectionLookup { byExternalInstallationId(provider: string, externalInstallationId: string): Promise<{ orgId: string; orgConnectionId: string; } | null>; } //# sourceMappingURL=webhook.d.ts.map