UNPKG

discourse-js

Version:

A client-side javascript wrapper for the discourse API.

19 lines (18 loc) 663 B
import Discourse from '../index'; import { PrivateMessageList } from '../types/Messages'; import { Post } from '../types/Posts'; export interface SendMessageBody { topic_id: number; raw: string; [key: string]: string | number; } export interface IMessages { get(): Promise<PrivateMessageList>; getGroupMessages(params: { group_name: string; }): Promise<PrivateMessageList>; getSentMessages(): Promise<PrivateMessageList>; getAllMessages(): Promise<[PrivateMessageList, PrivateMessageList]>; send(inputs: SendMessageBody): Promise<Post>; } export default function Messages(discourse: Discourse): void;