import ApiBase from "./ApiBase"; import { IMessageEntity, IChannelEntity, IChannelWithMembershipsEntity } from "../IPuripara"; export interface IPutChannelBody { channel_name?: string; description?: string; } export interface IPostChannelBody { channel_name: string; description: string; kind?: "public_channel" | "private_channel"; } export interface IPostChannelMessageBody { message: string; nsfw?: boolean; idempotent_key?: string; expand_embed_contents?: string; } export interface IPostDirectMessageBody { target_user_profile_id: string; } export interface IPutMemberAuthority { authority: string; } export default class Channels extends ApiBase { getChannels(archived?: boolean): Promise; getChannel(channelId: string): Promise; putArchiveChannel(channelId: string): Promise; putUnarchiveChannel(channelId: string): Promise; getChannelMemberships(channelId: string): Promise; postChannel(body: IPostChannelBody): Promise; putChannel(channelId: string, body: IPutChannelBody): Promise; getChannelMessages(channelId: string, limit?: number, before_id?: number, after_id?: number): Promise; postChannelMessage(channelId: string, body: IPostChannelMessageBody): Promise; postDirectMessage(body: IPostDirectMessageBody): Promise; putMemberAuthority(channelId: string, memberId: string, body: IPutMemberAuthority): Promise; }