import { i as RelioClientOptions, t as RelioApiError } from "./core-CsUV4Y00.mjs"; import { t as RelioClient } from "./client-DVtVAFDI.mjs"; //#region src/server.d.ts declare const RELIO_SIGNATURE_HEADER = "x-relio-signature"; declare const RELIO_EVENT_HEADER = "x-relio-event"; declare const RELIO_WEBHOOK_ID_HEADER = "x-relio-webhook-id"; type RelioWebhookVerificationOptions = { secret: string; payload: string; signatureHeader: string | null | undefined; toleranceSeconds?: number; nowMs?: number; }; type RelioWebhookHeaders = { signature: string | null; event: string | null; webhookId: string | null; }; type VerifiedRelioWebhook = { event: string | null; webhookId: string | null; payload: TPayload; }; declare class RelioWebhookSignatureError extends RelioApiError { constructor(message: string); } declare function parseRelioSignatureHeader(signatureHeader: string | null | undefined): { timestamp: number; signature: string; } | null; declare function buildRelioWebhookSignature(payload: string, secret: string, timestamp?: number): string; declare function verifyRelioWebhookSignature(options: RelioWebhookVerificationOptions): boolean; declare function assertRelioWebhookSignature(options: RelioWebhookVerificationOptions): void; declare function readRelioWebhookHeaders(headers: Headers | Record): RelioWebhookHeaders; declare function verifyRelioWebhookRequest(options: { request: Request; secret: string; parseJson?: boolean; toleranceSeconds?: number; }): Promise>; /** * Server-oriented Relio API client. * Uses the same transport as `createRelioClient`, but exposed from `@relio/sdk/server` * for backend integrations. */ declare function createRelioServerClient(options: RelioClientOptions): RelioClient; //#endregion export { RelioWebhookSignatureError as a, assertRelioWebhookSignature as c, parseRelioSignatureHeader as d, readRelioWebhookHeaders as f, RelioWebhookHeaders as i, buildRelioWebhookSignature as l, verifyRelioWebhookSignature as m, RELIO_SIGNATURE_HEADER as n, RelioWebhookVerificationOptions as o, verifyRelioWebhookRequest as p, RELIO_WEBHOOK_ID_HEADER as r, VerifiedRelioWebhook as s, RELIO_EVENT_HEADER as t, createRelioServerClient as u }; //# sourceMappingURL=server-CLjq7cOk.d.mts.map