@lucern/events 0.3.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ import { WebhookDeliveryStatus, WebhookRecord } from '@lucern/contracts';
2
+
3
+ declare function assertValidWebhookUrl(url: string): string;
4
+ declare function normalizeWebhookPatterns(patterns: readonly string[]): string[];
5
+ declare function assertValidWebhookSecret(secret: string): string;
6
+ declare function computeWebhookSignature(payload: string, secret: string): Promise<string>;
7
+ declare function nextDeliveryAttemptAt(currentAttemptCount: number, now?: number): number | undefined;
8
+ declare function resolveDeliveryFailureStatus(attemptCount: number): WebhookDeliveryStatus;
9
+ declare function sanitizeWebhookRecord(value: Record<string, unknown>): WebhookRecord;
10
+ declare function truncateWebhookResponseBody(responseBody: string | undefined, maxLength?: number): string | undefined;
11
+
12
+ export { assertValidWebhookSecret, assertValidWebhookUrl, computeWebhookSignature, nextDeliveryAttemptAt, normalizeWebhookPatterns, resolveDeliveryFailureStatus, sanitizeWebhookRecord, truncateWebhookResponseBody };