import { REST } from '@abacatepay/rest'; import type { RESTDeleteCustomerData, RESTGetCheckQRCodePixStatusData, RESTGetCustomerData, RESTGetListCheckoutsData, RESTGetListCouponsData, RESTGetListCouponsQueryParams, RESTGetListCustomersData, RESTGetListCustomersQueryParams, RESTGetListPayoutsData, RESTGetListPayoutsQueryParams, RESTGetListProductsData, RESTGetListProductsQueryParams, RESTGetListSubscriptionsData, RESTGetListSubscriptionsQueryParams, RESTGetMerchantData, RESTGetMRRData, RESTGetProductQueryParams, RESTGetRevenueByPeriodData, RESTGetRevenueByPeriodQueryParams, RESTPostCreateCouponBody, RESTPostCreateCustomerBody, RESTPostCreateNewCheckoutBody, RESTPostCreateNewPayoutBody, RESTPostCreateProductBody, RESTPostCreateQRCodePixBody, RESTPostCreateSubscriptionBody } from '@abacatepay/types/v2'; import type { AbacatePayOptions } from './types'; export * from './types'; /** * This is the main entry point for interacting with the AbacatePay API, * providing high-level, domain-oriented methods on top of the REST client. */ export declare const AbacatePay: ({ secret, rest }: AbacatePayOptions) => { /** * Low-level REST client instance. * * Exposes the raw REST interface in case you need direct access * to HTTP methods or custom routes. */ rest: REST; /** * Customer management operations. */ customers: { /** * Retrieve a customer by its unique identifier. * * @param id Customer ID. * @returns The customer data. */ get(id: string): Promise; /** * Permanently delete a customer. * * @param id Customer ID. * @returns Deletion result. */ delete(id: string): Promise; /** * Create a new customer. * * @param body Customer creation payload. * @returns The created customer. */ create(body: RESTPostCreateCustomerBody): Promise; /** * List customers with optional pagination. * * @param query Optional query parameters. * @returns A paginated list of customers. */ list(query?: RESTGetListCustomersQueryParams): Promise; }; /** * Checkout management operations. */ checkouts: { /** * Create a new checkout. * * @param body Checkout creation payload. * @returns The created checkout. */ create(body: RESTPostCreateNewCheckoutBody): Promise; /** * List all checkouts. * * @returns A list of checkouts. */ list(): Promise; /** * Retrieve a checkout by ID. * * @param id Checkout ID. * @returns The checkout data. */ get(id: string): Promise; }; /** * PIX payment operations. */ pix: { /** * Create a new PIX QR Code payment. * * @param body PIX creation payload. * @returns The created PIX QR Code. */ create(body: RESTPostCreateQRCodePixBody): Promise; /** * Simulate a PIX payment for testing purposes. * * @param id PIX transaction ID. * @param metadata Optional metadata to attach to the simulation. * @returns The simulated payment result. */ simulate(id: string, metadata?: Record): Promise; /** * Retrieve the current status of a PIX payment. * * @param id PIX transaction ID. * @returns The PIX payment status. */ status(id: string): Promise; }; /** * Coupon management operations. */ coupons: { /** * Create a new coupon. * * @param body Coupon creation payload. * @returns The created coupon. */ create(body: RESTPostCreateCouponBody): Promise; /** * Delete a coupon. * * @param id Coupon ID. * @returns Deletion result. */ delete(id: string): Promise; /** * Retrieve a coupon by ID. * * @param id Coupon ID. * @returns The coupon data. */ get(id: string): Promise; /** * List coupons with optional filters. * * @param query Optional query parameters. * @returns A list of coupons. */ list(query?: RESTGetListCouponsQueryParams): Promise; /** * Toggle the status of a coupon. * * @param id Coupon ID. * @returns Updated coupon status. */ toggleStatus(id: string): Promise; }; /** * Store-related operations. */ store: { /** * Retrieve store details. * * @returns Store information. */ get(): Promise; }; /** * Monthly recurring revenue (MRR) and analytics. */ mrr: { /** * Retrieve MRR metrics. * * @returns MRR data. */ get(): Promise; /** * Retrieve revenue data for a specific period. * * @param params Date range parameters. * @returns Revenue metrics for the period. */ revenue({ startDate, endDate }: RESTGetRevenueByPeriodQueryParams): Promise; /** * Retrieve merchant-level revenue data. * * @returns Merchant revenue data. */ merchant(): Promise; }; /** * Payout management operations. */ payouts: { /** * Create a new payout. * * @param body Payout creation payload. * @returns The created payout. */ create(body: RESTPostCreateNewPayoutBody): Promise; /** * Retrieve a payout by ID. * * @param id Payout ID. * @returns Payout details. */ get(id: string): Promise; /** * List payouts with optional pagination. * * @param query Optional query parameters. * @returns A list of payouts. */ list(query?: RESTGetListPayoutsQueryParams): Promise; }; /** * Subscription management operations. */ subscriptions: { /** * Create a new subscription. * * @param body Subscription creation payload. * @returns The created subscription. */ create(body: RESTPostCreateSubscriptionBody): Promise; /** * List subscriptions with optional pagination. * * @param query Optional query parameters. * @returns A list of subscriptions. */ list(query?: RESTGetListSubscriptionsQueryParams): Promise; }; /** * Product management operations. */ products: { /** * Create a new product. * * @param body Product creation payload. * @returns The created product. */ create(body: RESTPostCreateProductBody): Promise; /** * Retrieve a product by query parameters. * * @param query Product query parameters. * @returns The product data. */ get(query: RESTGetProductQueryParams): Promise; /** * List products with optional pagination. * * @param query Optional query parameters. * @returns A list of products. */ list(query?: RESTGetListProductsQueryParams): Promise; }; };