import Response from "../util/Response"; import { AxiosPromise } from "axios"; declare class Subscriptions { /** * Get a creator subscription for the creator program. * * @see https://api.glitch.fun/api/documentation#/Subscriptions/getCreatorSubscription * * @returns promise */ static getCreatorSubscription(stripe_subscription_id: string, params?: Record): AxiosPromise>; /** * Get a s subscription plan that a community has to talk with influencers * * @see https://api.glitch.fun/api/documentation#/Subscriptions/getCommunityInfluencerSubscription * * @returns promise */ static getCommunityInfluencerSubscription(community_id: string, stripe_subscription_id: string, params?: Record): AxiosPromise>; /** * List all the subscription plans that a creator has. * * @see https://api.glitch.fun/api/documentation#/Subscriptions/getCreatorSubscriptions * * @returns promise */ static listCreatorSubscriptions(params?: Record): AxiosPromise>; /** * List all the subscription plans that a community has. * * @see https://api.glitch.fun/api/documentation#/Subscriptions/getCommunityInfluencerSubscriptions * * @returns promise */ static listCommunityInfluencerSubscriptions(community_id: string, params?: Record): AxiosPromise>; /** * Check whether the current user can access developer tool creation for a feature. * * @param params { feature: 'social_media'|'influencers'|'ads', community_id?: string, title_id?: string, scheduler_id?: string } * @returns promise */ static getDeveloperToolAccess(params?: Record): AxiosPromise>; /** * Create a new subscription of a content creator * * @see https://api.glitch.fun/api/documentation#/Subscriptions/createCreatorSubscription * * @returns A promise */ static createCreatorSubscription(data?: object, params?: Record): AxiosPromise>; /** * Create a new subscription of a community engaging in influencer marketing * * @see https://api.glitch.fun/api/documentation#/Subscriptions/createCommunityInfluencerSubscription * * @returns A promise */ static createCommunityInfluencerSubscription(community_id: string, data?: object, params?: Record): AxiosPromise>; /** * Cancels a creator subscription * * @see https://api.glitch.fun/api/documentation#/Subscriptions/cancelCreatorSubscription * * @returns A promise */ static cancelCreatorSubscription(stripe_subscription_id: string, data?: object, params?: Record): AxiosPromise>; /** * Cancels a community subscription * * @see https://api.glitch.fun/api/documentation#/Subscriptions/cancelCommunityInfluencerSubscription * * @returns A promise */ static cancelCommunityInfluencerSubscription(community_id: string, stripe_subscription_id: string, data?: object, params?: Record): AxiosPromise>; /** * Change the current subscription that the community is associated with. * * @see https://api.glitch.fun/api/documentation#/Subscriptions/createCreatorSubscription * * @returns A promise */ static changeCommunityInfluencerSubscription(community_id: string, data?: object, params?: Record): AxiosPromise>; /** * Create a custom tailored subscription for a business/community. * Only accessible by Glitch administrators. * * @param community_id The ID of the community. * @param data { priceId, paymentMethod, custom_name, limits: { posts, enrichments, invites, ads }, metered_prices: [] } */ static createCustomCommunitySubscription(community_id: string, data: object, params?: Record): AxiosPromise>; /** * Purchase a permanent license or rent a game title. * If a rental was active in the last 7 days, the fee is automatically deducted from the premium price. * @param data { purchase_type: 'premium' | 'rental', payment_method_id: string } */ static purchaseLicense(title_id: string, data: object): AxiosPromise>; /** * List all game licenses (Premium/Rental) owned by the current user. */ static listMyLicenses(params?: Record): AxiosPromise>; /** * Request a refund for a premium purchase. */ static refundLicense(license_id: string): AxiosPromise>; /** * Purchase a game or subscription as a gift for another user. * * @see https://api.glitch.fun/api/documentation#/Subscriptions/purchaseGift * * @param data { gift_type: 'premium'|'rental'|'subscription', payment_method_id: string, title_id?: string, recipient_id?: string, recipient_email?: string, recipient_name?: string } * @returns promise */ static purchaseGift(data: object): AxiosPromise>; /** * Redeem a gift code to grant access to a game or subscription. * * @see https://api.glitch.fun/api/documentation#/Subscriptions/redeemGift * * @param redemption_code The unique GLITCH-XXXX-XXXX code. * @returns promise */ static redeemGift(redemption_code: string): AxiosPromise>; /** * Cancel an unredeemed gift and trigger a refund. * Only the user who purchased the gift (the giver) can perform this action. * * @see https://api.glitch.fun/api/documentation#/Subscriptions/cancelGift * * @param gift_id The UUID of the gift to cancel. * @returns promise */ static cancelGift(gift_id: string): AxiosPromise>; /** * Validates a coupon code and returns the calculated discount. * @param data { code: string, price: number, currency?: string } */ static validateCoupon(data: { code: string; price: number; currency?: string; }): AxiosPromise>; } export default Subscriptions;