import Response from "../util/Response"; import { AxiosPromise } from "axios"; declare class Posts { /** * List all the Posts. * * @see https://api.glitch.fun/api/documentation#/Post%20Route/resourcePostList * * @returns promise */ static list(params?: Record): AxiosPromise>; /** * Create a new post. * * @see https://api.glitch.fun/api/documentation#/Post%20Route/newPostResourceStorage * * @param data The data to be passed when creating a post. * * @returns Promise */ static create(data: object, params?: Record): AxiosPromise>; /** * Create a new post with a file. The file should either be an image or video. * * @see https://api.glitch.fun/api/documentation#/Post%20Route/newPostResourceStorage * * @param file The file object to upload. * @param data Any additional data to pass along to the upload. * * @returns promise */ static createWithFile(file: File, data?: object): AxiosPromise>; /** * Create a new post with a blob. The blob should either be an image or video. * * @see https://api.glitch.fun/api/documentation#/Post%20Route/newPostResourceStorage * * @param file The blob to upload. * @param data Any additional data to pass along to the upload. * * @returns promise */ static createWithBlob(blob: Blob, data?: object): AxiosPromise>; /** * Create a new post with a file divided into chunks. * * @param file The file object to upload. * @param chunkSize Size of each chunk in bytes. Default is 1MB. * @param data Any additional data to pass along to the upload. * * @returns Promise */ /** * Create a new post with a file divided into chunks. * * @param file The file object to upload. * @param chunkSize Size of each chunk in bytes. Default is 1MB. * @param data Any additional data to pass along to the upload. * * @returns Promise */ static createWithFileInChunks(file: File, chunkSize?: number, data?: { [key: string]: any; }): Promise>>; /** * Update a post. * * @see https://api.glitch.fun/api/documentation#/Post%20Route/updatePostStorage * * @param post_id The id of the post to update. * @param data The data to update. * * @returns promise */ static update(post_id: string, data: object, params?: Record): AxiosPromise>; /** * Retrieve the information for a single post. * * @see https://api.glitch.fun/api/documentation#/Post%20Route/showPostStorage * * @param post_id The id fo the post to retrieve. * * @returns promise */ static view(post_id: string, params?: Record): AxiosPromise>; /** * Deletes a post. * * @see https://api.glitch.fun/api/documentation#/Post%20Route/destoryPostStorage * * @param post_id The id of the post to delete. * @returns promise */ static delete(post_id: string, params?: Record): AxiosPromise>; /** * Toggle a social interaction and off for a post. * * @see hhttps://api.glitch.fun/api/documentation#/Post%20Route/postToggleInteraction * * @param data The data to be passed when toggling the interaction. * * @returns Promise */ static toggleInteraction(post_id: string, data: object, params?: Record): AxiosPromise>; /** * Join a Play Together session. */ static joinSession(post_id: string, data?: object): AxiosPromise>; /** * Follow a bug report for updates. */ static followBug(post_id: string, data?: object): AxiosPromise>; /** * Update notification preferences for a post. */ static updatePreferences(post_id: string, data: object): AxiosPromise>; /** * Leave a session or unfollow a bug. */ static leave(post_id: string): AxiosPromise>; /** * Mark a bug as resolved (Admin only). */ static resolveBug(post_id: string): AxiosPromise>; } export default Posts;