import { G as GMMConfig, I as Interceptor, R as RequestOptions, C as CheckoutSessionPayload, a as CheckoutSessionResponse, P as Plugin } from './types-v3qqgEGV.js'; declare class HttpClient { private config; private baseUrl; private interceptors; constructor(config: GMMConfig); use(interceptor: Interceptor): void; request(method: string, path: string, body?: any, options?: RequestOptions): Promise; private handleError; } declare class SessionsResource { private http; constructor(http: HttpClient); /** Creates a new checkout session and returns the checkout URL. Throws an error if the checkout URL is not found in the response. * @param payload - An object containing the details of the checkout session to be created, including customer email, currency, items, and metadata. * example payload: * { * customer_email: "test@example.com", * currency: "USD", * items: [ * { * id: 1, * name: "Product A", * quantity: 2, * price: 500, * }, * ], * metadata: { * orderId: "12345", * customerId: "67890", * sessionId: "abcde", * }, * } * @param options - Optional request options such as retries and timeout settings. * @returns An object containing the checkout URL for the created session. * @throws Will throw an error if the checkout URL is not found in the response from the API. */ create(payload: CheckoutSessionPayload, options?: RequestOptions): Promise; /** Retrieves a checkout session using its unique tracking ID. * * This method is typically used on merchant success or cancel pages * to verify and display the latest payment session status. * * @param trackId - The unique tracking ID generated for the checkout session. * * Example: * ```ts * const session = await gmm.sessions.findByTrackId( * "7107319375257" * ); * ``` * * @returns The checkout session details returned from the GMM API. * * Example response: * ```json * { * "statusCode": 200, * "success": true, * "message": "Checkout session retrieved successfully.", * "data": { * "track_id": "7107319375257", * "payment_status": "paid", * "currency": "USD", * "amount": 1000, * "customer_email": "customer@example.com" * } * } * ``` * * @throws Will throw an error if the session is not found * or if the API request fails. */ findByTrackId(trackId: string): Promise; } declare class WebhooksResource { private config; constructor(config: GMMConfig); private verifySignature; constructEvent(params: { rawBody: string; headers: { "gmm-webhook-signature": string; "gmm-webhook-timestamp": string; }; }): any; } declare class GMMGateway { private config; http: HttpClient; sessions: SessionsResource; webhooks: WebhooksResource; constructor(config: GMMConfig); use(plugin: Plugin): void; } export { GMMGateway };