import Response from "../util/Response"; import { AxiosPromise } from "axios"; declare class Messages { /** * Get all the message threads that a user has particpated in. * * @see https://api.glitch.fun/api/documentation#/Messages/getConversations * * @returns promise */ static listMessageThreads(params?: Record): AxiosPromise>; /** * Send a new message that will be added to a thread. Festival-scoped threads * enforce current admission, blocking and read-only state server-side. * Include an optional client_message_id UUID and reuse it when retrying a * timed-out request to prevent duplicate messages and notifications. * * @see https://api.glitch.fun/api/documentation#/Messages/storeMessage * * @returns A promise */ static sendMessage(data?: object, params?: Record): AxiosPromise>; /** * Updates a message. * * @see https://api.glitch.fun/api/documentation#/Messages/updateMessage * * @returns A promise */ static updateMessage(message_id: string, data?: object, params?: Record): AxiosPromise>; /** * Deletes a message. * * @see https://api.glitch.fun/api/documentation#/Messages/destroyMessage * * @returns A promise */ static deleteMessage(message_id: string, data?: object, params?: Record): AxiosPromise>; /** * A message thread is a thread between multiple users. Pass the user ids in the thread and it will either * get the current thread or create a new thread. * * @see https://api.glitch.fun/api/documentation#/Messages/conversations * * @returns A promise */ static createOrGetThread(data?: object, params?: Record): AxiosPromise>; /** * Get a single thread. * * @see https://api.glitch.fun/api/documentation#/Messages/getThread * * @returns promise */ static getThread(thread_id: string, params?: Record): AxiosPromise>; } export default Messages;