import { Methods } from "./methods.js"; import { ResourceSubscription, ResourceSubscriptionName } from "./types/gumroad.js"; //#region src/resource-subscriptions.d.ts /** Bindings for {@link ResourceSubscription} */ interface ResourceSubscriptionProps { /** * Deletes the resource subscription * * @returns On success, `true` */ delete(requestOptions?: { signal?: AbortSignal; }): Promise; } /** A class having API methods related to Resource Subscriptions */ declare class ResourceSubscriptionsMethods extends Methods { protected _bindResourceSubscription(resource_subscription: ResourceSubscription): ResourceSubscription & ResourceSubscriptionProps; /** * Show all active subscriptions of user for the input resource. * * @param resource_name The name of resource * * @returns On success, an Array of {@link ResourceSubscription} * * @see https://app.gumroad.com/api#get-/resource_subscriptions */ list(resource_name: ResourceSubscriptionName, { signal }?: { signal?: AbortSignal; }): Promise<(ResourceSubscription & ResourceSubscriptionProps)[]>; /** * Subscribe to a resource. * * Currently there are 8 supported resource names: * "sale", "refund", "dispute", "dispute_won", * "cancellation", "subscription_updated", "subscription_ended", and "subscription_restarted". * * @param post_url The url where resource updates should be send * @param resource_name The {@link ResourceSubscriptionName} * * @returns On success, a {@link ResourceSubscription} * * @see https://app.gumroad.com/api#put-/resource_subscriptions */ create(post_url: string, resource_name: ResourceSubscriptionName, { signal }?: { signal?: AbortSignal; }): Promise; /** * Unsubscribe from a resource. * * @param resource_subscription_id The id of resource * * @returns On success, `true` * * @see https://app.gumroad.com/api#delete-/resource_subscriptions/:resource_subscription_id */ delete(resource_subscription_id: string, { signal }?: { signal?: AbortSignal; }): Promise; } //#endregion export { ResourceSubscriptionProps, ResourceSubscriptionsMethods }; //# sourceMappingURL=resource-subscriptions.d.ts.map