import { Client } from "./client.js"; import { Logger } from "./logger.js"; import { Purchase } from "./types/gumroad.js"; import { CoversMethods } from "./covers.js"; import { CustomFieldsMethods } from "./custom-fields.js"; import { EarningsMethods } from "./earnings.js"; import { SDKBadRequestError, SDKError, SDKForbiddenError, SDKInputNotFoundError, SDKInternalServerError, SDKNotFoundError, SDKRequestError, SDKRequestFailedError, SDKUnauthorizedError } from "./errors.js"; import { FilesMethods } from "./files.js"; import { LicensesMethods } from "./licenses.js"; import { OfferCodesMethods } from "./offer-codes.js"; import { PayoutsMethods } from "./payouts.js"; import { ProductsMethods } from "./products.js"; import { ResourceSubscriptionsMethods } from "./resource-subscriptions.js"; import { SalesMethods } from "./sales.js"; import { SubscribersMethods } from "./subscribers.js"; import { TaxFormsMethods } from "./tax-forms.js"; import { UserMethods } from "./user.js"; import { VariantCategoriesMethods } from "./variant-categories.js"; import { VariantsMethods } from "./variants.js"; //#region src/api.d.ts /** An interface representing options for {@link API} */ interface APIOptions { /** * Indicates whether to enable debug mode or not * * @default false */ debug?: boolean; } /** A class for making API requests to Gumroad API endpoints */ declare class API { static readonly SDKBadRequestError: typeof SDKBadRequestError; static readonly SDKError: typeof SDKError; static readonly SDKInputNotFoundError: typeof SDKInputNotFoundError; static readonly SDKInternalServerError: typeof SDKInternalServerError; static readonly SDKNotFoundError: typeof SDKNotFoundError; static readonly SDKRequestError: typeof SDKRequestError; static readonly SDKRequestFailedError: typeof SDKRequestFailedError; static readonly SDKForbiddenError: typeof SDKForbiddenError; static readonly SDKUnauthorizedError: typeof SDKUnauthorizedError; /** * Verify a license * * @param product_id The unique ID of the product, available on product's edit page * @param license_key The license key provided by your customer * * @returns On success, a {@link Purchase} * * @see https://app.gumroad.com/api#post-/licenses/verify */ static verifyLicense(product_id: string, license_key: string, options?: { /** Increments license uses on successful verification, defaults to: `true` */ increment_uses_count?: boolean; }, { debug, signal }?: { debug?: boolean; signal?: AbortSignal; }): Promise; readonly client: Client; readonly logger: Logger; readonly products: ProductsMethods; readonly files: FilesMethods; readonly covers: CoversMethods; readonly variant_categories: VariantCategoriesMethods; readonly variants: VariantsMethods; readonly offer_codes: OfferCodesMethods; readonly custom_fields: CustomFieldsMethods; readonly user: UserMethods; readonly sales: SalesMethods; readonly resource_subscriptions: ResourceSubscriptionsMethods; readonly subscribers: SubscribersMethods; readonly licenses: LicensesMethods; readonly payouts: PayoutsMethods; readonly tax_forms: TaxFormsMethods; readonly earnings: EarningsMethods; /** * Creates an instance of {@link API} * * @param accessToken Gumroad API access token, read [guide](https://help.gumroad.com/article/280-create-application-api). * @param options The {@link APIOptions} */ constructor(accessToken: string, options?: APIOptions); } //#endregion export { API, APIOptions }; //# sourceMappingURL=api.d.ts.map