UNPKG

@authsignal/node

Version:

The Authsignal Node.js library for server-side applications.

23 lines (22 loc) 637 B
export declare class Webhook { apiSecretKey: string; constructor(apiSecretKey: string); constructEvent(payload: WebhookPayload, signature: string, tolerance?: number): WebhookEvent; parseSignature(value: string): SignatureHeaderData; } export declare type WebhookPayload = string; export declare type WebhookEvent = { version: number; type: string; id: string; source: string; time: string; tenantId: string; data: WebhookEventData; }; export declare type WebhookEventData = Record<string, string>; interface SignatureHeaderData { signatures: string[]; timestamp: number; } export {};