import { Creem } from 'creem'; import { C as CreemConfig, L as Logger, a as CreemCheckoutCreateOptions, b as CreemWebhookRaw, D as DataFastPaymentRequest } from './index-2mzMgi45.js'; export { c as CreemCheckoutCompletedEvent, d as CreemCheckoutCompletedObject, e as CreemDataFastConfig, f as CreemRefundCreatedEvent, g as CreemRefundCreatedObject, h as CreemSubscriptionPaidEvent, i as CreemSubscriptionPaidObject, j as CreemWebhookCustomer, k as CreemWebhookEvent, l as CreemWebhookOrder, m as CreemWebhookProduct, n as CreemWebhookSubscription, o as DataFastConfig, p as DataFastPaymentResponse, I as IdempotencyStore, R as RetryOptions, W as WebhookEventType, q as WebhookHandlerOptions } from './index-2mzMgi45.js'; export { DataFastClient, addTrackingToMetadata, buildCheckoutUrlWithVisitorId, getDataFastSessionId, getDataFastVisitorId as getDataFastVisitorIdBrowser, hasDataFastVisitorId } from './client/index.js'; export { WebhookHandler, createNextJsWebhookHandler, createWebhookHandler, creemDataFastWebhook, creemDataFastWebhookHandler, handleGenericWebhook } from './server/index.js'; export { MemoryIdempotencyStore, createMemoryIdempotencyStore } from './utils/idempotency.js'; export { createUpstashIdempotencyStore } from './utils/idempotency-upstash.js'; import 'express'; import 'next/server'; interface CreemDataFastClientOptions extends CreemConfig { cookieName?: string; sessionCookieName?: string; strictTracking?: boolean; testMode?: boolean; logger?: Logger; } declare class CreemDataFastClient { private creem; private cookieName; private sessionCookieName; private strictTracking; private logger; constructor(options: CreemDataFastClientOptions); createCheckout(options: CreemCheckoutCreateOptions, cookies?: string | Record): Promise<{ checkoutUrl: string; checkoutId: string; }>; createCheckoutWithVisitorId(options: CreemCheckoutCreateOptions, visitorId: string | null, sessionId?: string | null): Promise<{ checkoutUrl: string; checkoutId: string; }>; private createCheckoutWithTracking; getCreemClient(): Creem; healthCheck(): Promise<{ ok: boolean; healthy: boolean; checks: Record; timestamp: string; }>; buildCheckoutUrl(params: { checkoutUrl: string; visitorId?: string; sessionId?: string; }): string; replayWebhook(_input: { rawBody: string; headers: { get: (name: string) => string | undefined; }; }): Promise<{ ok: boolean; }>; handleWebhook(_input: { rawBody: string; headers: { get: (name: string) => string | undefined; }; }): Promise<{ ok: boolean; }>; } declare function createCreemDataFastClient(options: CreemDataFastClientOptions): CreemDataFastClient; interface MappedPaymentData { transactionId: string; currency: string; amount: number; visitorId: string | null; sessionId?: string; customerId?: string; customerEmail?: string; customerName?: string; isRenewal: boolean; isRefunded: boolean; timestamp: string; } declare function mapCreemEventToDataFast(raw: CreemWebhookRaw): MappedPaymentData | null; declare function mapToDataFastPaymentRequest(mapped: MappedPaymentData): DataFastPaymentRequest; declare function getDataFastVisitorId(cookies: string | Record, cookieName?: string): string | null; declare function parseCookieHeader(cookieHeader: string | string[] | undefined): Record; interface IDataFastRequestError { retryable: boolean; status: number; requestId?: string; } declare class CreemDataFastError extends Error { constructor(message: string); } declare class InvalidCreemSignatureError extends CreemDataFastError { constructor(message?: string); } declare class MissingTrackingError extends CreemDataFastError { constructor(message?: string); } declare class DataFastRequestError extends CreemDataFastError implements IDataFastRequestError { retryable: boolean; status: number; requestId?: string; constructor(message: string, options: { retryable: boolean; status: number; requestId?: string; }); } export { CreemCheckoutCreateOptions, CreemConfig, CreemDataFastClient, CreemDataFastError, CreemWebhookRaw, DataFastPaymentRequest, DataFastRequestError, InvalidCreemSignatureError, Logger, MissingTrackingError, createCreemDataFastClient as createCreemDataFast, createCreemDataFastClient, getDataFastVisitorId, mapCreemEventToDataFast, mapToDataFastPaymentRequest, parseCookieHeader };