import Response from "../util/Response"; import { AxiosPromise } from "axios"; declare class Communities { /** * List all the communities. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/resourceCommunityList * * @returns promise */ static list(params?: Record): AxiosPromise>; /** * Create a new community. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/newCommunityResourceStorage * * @param data The data to be passed when creating a community. * * @returns Promise */ static create(data: object, params?: Record): AxiosPromise>; /** * Update a community. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/updateCommunityStorage * * @param community_id The id of the community to update. * @param data The data to update. * * @returns promise */ static update(community_id: string, data: object, params?: Record): AxiosPromise>; /** * Retrieve the information for a single community. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/showCommunityStorage * * @param community_id The id fo the community to retrieve. * * @returns promise */ static view(community_id: string, params?: Record): AxiosPromise>; /** * Deletes a community. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/destoryCommunityStorage * * @param community_id The id of the community to delete. * @returns promise */ static delete(community_id: string, params?: Record): AxiosPromise>; /** * Retrieve the site-admin grant state for the customer-facing game market * research product. */ static getMarketResearchAccess(community_id: string, params?: Record): AxiosPromise>; /** * Enable or disable game market research access for a business account. */ static updateMarketResearchAccess(community_id: string, data: { enabled: boolean; notes?: string; }, params?: Record): AxiosPromise>; /** * Updates the main image for the community using a File object. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/uploadLogoCommunityImage * * @param file The file object to upload. * @param data Any additional data to pass along to the upload. * * @returns promise */ static uploadLogoFile(community_id: string, file: File, data?: object, params?: Record): AxiosPromise>; /** * Updates the main image for the community using a Blob. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/uploadLogoCommunityImage * * @param blob The blob to upload. * @param data Any additional data to pass along to the upload * * @returns promise */ static uploadLogoBlob(community_id: string, blob: Blob, data?: object, params?: Record): AxiosPromise>; /** * Updates the banner image for the community using a File object. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/uploadBannerCommunityImage * * @param file The file object to upload. * @param data Any additional data to pass along to the upload. * * @returns promise */ static uploadBannerImageFile(community_id: string, file: File, data?: object, params?: Record): AxiosPromise>; /** * Updates the banner image for the community using a Blob. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/uploadBannerCommunityImage * * @param blob The blob to upload. * @param data Any additional data to pass along to the upload * * @returns promise */ static uploadBannerImageBlob(community_id: string, blob: Blob, data?: object, params?: Record): AxiosPromise>; /** * Updates the banner image for the community using a File object. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/uploadBannerCommunityImage * * @param file The file object to upload. * @param data Any additional data to pass along to the upload. * * @returns promise */ static uploadVideoLogoFile(community_id: string, file: File, data?: object, params?: Record): AxiosPromise>; /** * Updates the banner image for the community using a Blob. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/uploadBannerCommunityImage * * @param blob The blob to upload. * @param data Any additional data to pass along to the upload * * @returns promise */ static uploadVideoLogoBlob(community_id: string, blob: Blob, data?: object, params?: Record): AxiosPromise>; /** * List the invites that have been sent for the community to users. * * @see https://api.glitch.fun/api/documentation#/communitys%20Route/communitysUserInviteList * * @param community_id The id of the community * * @returns promise */ static listInvites(community_id: string, params?: Record): AxiosPromise>; /** * Send an invitation to a user to join the community. * * @see https://api.glitch.fun/api/documentation#/communitys%20Route/communitySendInvite * * @param community_id The id of the community. * @param data The data that will be passed into sending an invite. * * @returns promise */ static sendInvite(community_id: string, data?: object, params?: Record): AxiosPromise>; /** * Accept an invite to a community. The JSON Web Token (JWT) must be related to the token. * * @see https://api.glitch.fun/api/documentation#/communitys%20Route/communityAcceptInvite * * @param community_id The id of the community * @param token The token required to accept the user. * * @returns promise */ static acceptInvite(community_id: string, token: string, params?: Record): AxiosPromise>; /** * Retrieves a user's invite that have been sent. * * @see https://api.glitch.fun/api/documentation#/communitys%20Route/communityAcceptInvite * * @param community_id The id of the community * @param token The token required to get the invite. * * @returns promise */ static retrieveInvite(community_id: string, token: string, params?: Record): AxiosPromise>; /** * List the users who are currently associated with the community. * * @see https://api.glitch.fun/api/documentation#/communitys%20Route/communityUserList * * @param community_id The id of the community. * * @returns promise */ static listUsers(community_id: string, params?: Record): AxiosPromise>; /** * Add a user to a community. * * @see https://api.glitch.fun/api/documentation#/communitys%20Route/createcommunityUser * * @param community_id The id of the community. * @param data The data to be passed when adding a user. * * @returns promise */ static addUser(community_id: string, data?: object, params?: Record): AxiosPromise>; /** * Retrieves a single user and their information that is associated with a community. * * @see https://api.glitch.fun/api/documentation#/communitys%20Route/showcommunityUser * * @param community_id The id of the community. * @param user_id The id of the user. * * @returns promise */ static getUser(community_id: string, user_id: string, params?: Record): AxiosPromise>; /** * Updates the users information associated with the community. * * @param community_id The id of the community. * @param user_id The id of the user. * * @returns promise */ static updatetUser(community_id: string, user_id: string, data?: object, params?: Record): AxiosPromise>; /** Correctly-spelled alias retained alongside the legacy method name. */ static updateUser(community_id: string, user_id: string, data?: object, params?: Record): AxiosPromise>; /** * Removes a user from a community. * * @param community_id The id of community. * @param user_id The id of the user. * * @returns promise */ static removetUser(community_id: string, user_id: string, params?: Record): AxiosPromise>; /** * Finds a community either by its subdomain or cname. The cname must be active. * * @param domain The subcname of the community. * * @returns promise */ static findByDomain(domain: string, params?: Record): AxiosPromise>; /** * Has a user join a community. The join is executed using the current user's authentication token. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/updateCommunityStorage * * @param community_id The id of the community to update. * * @returns promise */ static join(community_id: string, data: object, params?: Record): AxiosPromise>; /** * Add a payment method to the community. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/51802cc0cb758850807345918130cf3e * * @param community_id The id of the community to update. * * @returns promise */ static addPaymentMethod(community_id: string, data: object, params?: Record): AxiosPromise>; /** * Sets the default payment method for the community. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/dd743e8a7da3b2bebe557cbc6675380d * * @param community_id The id of the community to update. * * @returns promise */ static setDefaultPaymentMethod(community_id: string, data: object, params?: Record): AxiosPromise>; /** * Get the available payment methods. * * @see https://api.glitch.fun/api/documentation#/communitys%20Route/communitysUserInviteList * * @param community_id The id of the community * * @returns promise */ static getPaymentMethods(community_id: string, params?: Record): AxiosPromise>; /** * Get the ledger for all transactions from the community. * * @see https://api.glitch.fun/api/documentation#/communitys%20Route/communitysUserInviteList * * @param community_id The id of the community * * @returns promise */ static getLedger(community_id: string, params?: Record): AxiosPromise>; /** * Clear Docusign authentication information from the current user. * * @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage * * @returns promise */ static clearDocusignAuth(community_id: string): AxiosPromise>; /** * Clear SimpleSin authentication information from the current user. * * @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage * * @returns promise */ static clearSimplesignAuth(community_id: string): AxiosPromise>; /** * Clear SimpleSin authentication information from the current user. * * @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage * * @returns promise */ static clearHellosignAuth(community_id: string): AxiosPromise>; /** * List all the saved email templates for the community. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/resourceCommunityList * * @returns promise */ static listEmailTemplates(community_id: string, params?: Record): AxiosPromise>; /** * Create a new email template for the community * * @see https://api.glitch.fun/api/documentation#/Community%20Route/newCommunityResourceStorage * * @param data The data to be passed when creating a community. * * @returns Promise */ static createEmailTemplate(community_id: string, data: object, params?: Record): AxiosPromise>; /** * Update an email template for the community. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/updateCommunityStorage * * @param community_id The id of the community to update. * @param data The data to update. * * @returns promise */ static updateEmailTemplate(community_id: string, template_id: string, data: object, params?: Record): AxiosPromise>; /** * Retrieve a single email template for the community. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/showCommunityStorage * * @param community_id The id fo the community to retrieve. * * @returns promise */ static viewEmailTemplate(community_id: string, template_id: string, params?: Record): AxiosPromise>; /** * Deletes an email template for the community. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/destoryCommunityStorage * * @param community_id The id of the community to delete. * @returns promise */ static deleteEmailTemplate(community_id: string, template_id: string, params?: Record): AxiosPromise>; /** * Populates an email template for the community that will replace the platholders with the data provided. * * @see https://api.glitch.fun/api/documentation#/Community%20Route/newCommunityResourceStorage * * @param data The data to be passed when creating a community. * * @returns Promise */ static populateEmailTemplate(community_id: string, template_id: string, data: object, params?: Record): AxiosPromise>; /** * List all newsletters for a community. * * @param community_id The ID of the community. * @param params Query parameters. * @returns Promise */ static listNewsletters(params?: Record): AxiosPromise>; /** * Create a new newsletter for a community. * * @param community_id The ID of the community. * @param data The data for the new newsletter. * @returns Promise */ static createNewsletter(community_id: string, data: object, params?: Record): AxiosPromise>; /** * Get a specific newsletter. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param params Query parameters. * @returns Promise */ static viewNewsletter(community_id: string, newsletter_id: string, params?: Record): AxiosPromise>; /** * Update a specific newsletter. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param data The data to update. * @returns Promise */ static updateNewsletter(community_id: string, newsletter_id: string, data: object, params?: Record): AxiosPromise>; /** * Delete a specific newsletter. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @returns Promise */ static deleteNewsletter(community_id: string, newsletter_id: string, params?: Record): AxiosPromise>; /** * Import subscribers from a CSV or XLS file into a newsletter. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param file The CSV or XLS file. * @param params Additional parameters. * @returns Promise */ static importNewsletterSubscribers(community_id: string, newsletter_id: string, file: File, data?: object, params?: Record): AxiosPromise>; /** * Updates the banner image for the game show using a File object. * * @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage * * @param file The file object to upload. * @param data Any additional data to pass along to the upload. * * @returns promise */ static uploadNewsletterBannerImageFile(community_id: string, newsletter_id: string, file: File, data?: object, params?: Record): AxiosPromise>; /** * Updates the banner image for the game show using a Blob. * * @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage * * @param blob The blob to upload. * @param data Any additional data to pass along to the upload * * @returns promise */ static uploadNewsletterBannerImageBlob(community_id: string, newsletter_id: string, blob: Blob, data?: object, params?: Record): AxiosPromise>; /** * List all campaigns for a newsletter. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param params Query parameters. * @returns Promise */ static listCampaigns(community_id: string, newsletter_id: string, params?: Record): AxiosPromise>; /** * Create a new campaign for a newsletter. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param data The data for the new campaign. * @returns Promise */ static createCampaign(community_id: string, newsletter_id: string, data: object, params?: Record): AxiosPromise>; /** * Get a specific campaign. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param campaign_id The ID of the campaign. * @param params Query parameters. * @returns Promise */ static viewCampaign(community_id: string, newsletter_id: string, campaign_id: string, params?: Record): AxiosPromise>; /** * Update a specific campaign. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param campaign_id The ID of the campaign. * @param data The data to update. * @returns Promise */ static updateCampaign(community_id: string, newsletter_id: string, campaign_id: string, data: object, params?: Record): AxiosPromise>; /** * Delete a specific campaign. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param campaign_id The ID of the campaign. * @returns Promise */ static deleteCampaign(community_id: string, newsletter_id: string, campaign_id: string, params?: Record): AxiosPromise>; /** * Send a campaign immediately. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param campaign_id The ID of the campaign. * @returns Promise */ static sendCampaign(community_id: string, newsletter_id: string, campaign_id: string, params?: Record): AxiosPromise>; /** * Schedule a campaign to be sent later. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param campaign_id The ID of the campaign. * @param data The scheduling data (e.g., scheduled_at). * @returns Promise */ static scheduleCampaign(community_id: string, newsletter_id: string, campaign_id: string, data: object, params?: Record): AxiosPromise>; /** * Test an email campaign by sending an email to the current user. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param campaign_id The ID of the campaign. * @param data The scheduling data (e.g., scheduled_at). * @returns Promise */ static testCampaign(community_id: string, newsletter_id: string, campaign_id: string, data: object, params?: Record): AxiosPromise>; /** * List all emails sent in a campaign. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param campaign_id The ID of the campaign. * @param params Query parameters. * @returns Promise */ static listCampaignEmails(community_id: string, newsletter_id: string, campaign_id: string, params?: Record): AxiosPromise>; /** * List all subscribers of a newsletter (admin only). * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param params Query parameters. * @returns Promise */ static listNewsletterSubscribers(community_id: string, newsletter_id: string, params?: Record): AxiosPromise>; /** * Get a specific subscriber of a newsletter (admin only). * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param subscriber_id The ID of the subscriber. * @param params Query parameters. * @returns Promise */ static viewNewsletterSubscriber(community_id: string, newsletter_id: string, subscriber_id: string, params?: Record): AxiosPromise>; /** * Update a specific subscriber of a newsletter (admin only). * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param subscriber_id The ID of the subscriber. * @param data The data to update. * @returns Promise */ static updateNewsletterSubscriber(community_id: string, newsletter_id: string, subscriber_id: string, data: object, params?: Record): AxiosPromise>; /** * Delete a specific subscriber from a newsletter (admin only). * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param subscriber_id The ID of the subscriber. * @returns Promise */ static deleteNewsletterSubscriber(community_id: string, newsletter_id: string, subscriber_id: string, params?: Record): AxiosPromise>; /** * Register a new subscriber to a newsletter. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param data The subscriber data. * @returns Promise */ static registerNewsletterSubscriber(community_id: string, newsletter_id: string, data: object, params?: Record): AxiosPromise>; /** * Get newsletter overall reports (subscriber changes, unsubscribes, etc.). * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param params Optional query params (start_date, end_date, etc). * @returns Promise with aggregated data */ static newsletterReports(community_id: string, newsletter_id: string, params?: Record): AxiosPromise>; /** * Get campaign-level stats for a newsletter. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param params Optional query params (start_date, end_date, etc). * @returns Promise with campaign stats */ static newsletterCampaignReports(community_id: string, newsletter_id: string, params?: Record): AxiosPromise>; /** * Retrieves daily subscriber trend data for the specified newsletter. * * @param community_id The UUID of the community * @param newsletter_id The UUID of the newsletter * @param params Optional date-range filter (start_date, end_date, etc.) */ static newsletterSubscriberTrend(community_id: string, newsletter_id: string, params?: Record): AxiosPromise>; /** * Export subscribers for a specific newsletter. * The file is generated asynchronously on the server and * the user is emailed a link to download the file. * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param data Export options (format: 'csv' or 'xlsx'). * @returns Promise */ static exportNewsletterSubscribers(community_id: string, newsletter_id: string, data: { format: 'csv' | 'xlsx'; }, params?: Record): AxiosPromise>; /** * Import game installs from a game title installations to a newsletter * * @param community_id The ID of the community. * @param newsletter_id The ID of the newsletter. * @param data Export options (format: 'csv' or 'xlsx'). * @returns Promise */ static importGameInstalls(community_id: string, newsletter_id: string, data: { format: 'csv' | 'xlsx'; }, params?: Record): AxiosPromise>; /** * Retrieve the current user's pending community invitations across all communities. * * @returns promise */ static myInvites(params?: Record): AxiosPromise>; /** * Resends an invitation to a user. * * @param community_id The id of the community. * @param invite_id The id of the invite to resend. * * @returns promise */ static resendInvite(community_id: string, invite_id: string, params?: Record): AxiosPromise>; /** * Revokes/deletes a community invitation. * * @param community_id The id of the community. * @param invite_id The id of the invite to delete. * * @returns promise */ static deleteInvite(community_id: string, invite_id: string, params?: Record): AxiosPromise>; /** * Create a one-time immediate invoice for a business account. * * @param community_id The ID of the community. * @param data { amount: number, description: string } */ static createOneTimeInvoice(community_id: string, data: { amount: number; description: string; }, params?: Record): AxiosPromise>; /** * Get a detailed breakdown of a specific invoice including per-title usage. * * @param community_id The ID of the community. * @param invoice_id The Stripe Invoice ID (e.g., in_123...). */ static getInvoiceDetails(community_id: string, invoice_id: string, params?: Record): AxiosPromise>; /** * Generate a custom date-range statement for reimbursement. * * @param community_id The ID of the community. * @param params Should include { start_date: 'YYYY-MM-DD', end_date: 'YYYY-MM-DD' } */ /** * Generate a custom date-range statement for reimbursement. * * @param community_id The ID of the community. * @param startDate 'YYYY-MM-DD' * @param endDate 'YYYY-MM-DD' */ static getCustomStatement(community_id: string, startDate: string, endDate: string): AxiosPromise>; /** * List all Stripe invoices for the community. */ static listInvoices(community_id: string): AxiosPromise>; /** * List influencers saved to the community's private talent pool. * * @param community_id The UUID of the community. * @param params Optional filters like 'list_name'. */ static listSavedInfluencers(community_id: string, params?: Record): AxiosPromise>; /** * Save an influencer to the community's talent pool (Shortlist). * * @param community_id The UUID of the community. * @param data { influencer_id: string, list_name?: string, tags?: string[] } */ static saveInfluencerToPool(community_id: string, data: object): AxiosPromise>; } export default Communities;