client.d.ts 3.38 KB
/// <reference types="node" />
import { Readable } from "stream";
import * as Types from "./types";
export default class Client {
    config: Types.ClientConfig;
    private http;
    constructor(config: Types.ClientConfig);
    private parseHTTPResponse;
    pushMessage(to: string, messages: Types.Message | Types.Message[], notificationDisabled?: boolean): Promise<Types.MessageAPIResponseBase>;
    replyMessage(replyToken: string, messages: Types.Message | Types.Message[], notificationDisabled?: boolean): Promise<Types.MessageAPIResponseBase>;
    multicast(to: string[], messages: Types.Message | Types.Message[], notificationDisabled?: boolean): Promise<Types.MessageAPIResponseBase>;
    broadcast(messages: Types.Message | Types.Message[], notificationDisabled?: boolean): Promise<Types.MessageAPIResponseBase>;
    getProfile(userId: string): Promise<Types.Profile>;
    private getChatMemberProfile;
    getGroupMemberProfile(groupId: string, userId: string): Promise<Types.Profile>;
    getRoomMemberProfile(roomId: string, userId: string): Promise<Types.Profile>;
    private getChatMemberIds;
    getGroupMemberIds(groupId: string): Promise<string[]>;
    getRoomMemberIds(roomId: string): Promise<string[]>;
    getMessageContent(messageId: string): Promise<Readable>;
    private leaveChat;
    leaveGroup(groupId: string): Promise<any>;
    leaveRoom(roomId: string): Promise<any>;
    getRichMenu(richMenuId: string): Promise<Types.RichMenuResponse>;
    createRichMenu(richMenu: Types.RichMenu): Promise<string>;
    deleteRichMenu(richMenuId: string): Promise<any>;
    getRichMenuIdOfUser(userId: string): Promise<string>;
    linkRichMenuToUser(userId: string, richMenuId: string): Promise<any>;
    unlinkRichMenuFromUser(userId: string): Promise<any>;
    linkRichMenuToMultipleUsers(richMenuId: string, userIds: string[]): Promise<any>;
    unlinkRichMenusFromMultipleUsers(userIds: string[]): Promise<any>;
    getRichMenuImage(richMenuId: string): Promise<Readable>;
    setRichMenuImage(richMenuId: string, data: Buffer | Readable, contentType?: string): Promise<any>;
    getRichMenuList(): Promise<Array<Types.RichMenuResponse>>;
    setDefaultRichMenu(richMenuId: string): Promise<{}>;
    getDefaultRichMenuId(): Promise<string>;
    deleteDefaultRichMenu(): Promise<{}>;
    getLinkToken(userId: string): Promise<string>;
    getNumberOfSentReplyMessages(date: string): Promise<Types.NumberOfMessagesSentResponse>;
    getNumberOfSentPushMessages(date: string): Promise<Types.NumberOfMessagesSentResponse>;
    getNumberOfSentMulticastMessages(date: string): Promise<Types.NumberOfMessagesSentResponse>;
    getTargetLimitForAdditionalMessages(): Promise<Types.TargetLimitForAdditionalMessages>;
    getNumberOfMessagesSentThisMonth(): Promise<Types.NumberOfMessagesSentThisMonth>;
    getNumberOfSentBroadcastMessages(date: string): Promise<Types.NumberOfMessagesSentResponse>;
    getNumberOfMessageDeliveries(date: string): Promise<Types.NumberOfMessageDeliveriesResponse>;
    getNumberOfFollowers(date: string): Promise<Types.NumberOfFollowersResponse>;
    getFriendDemographics(): Promise<Types.FriendDemoGraphics>;
}
export declare class OAuth {
    private http;
    constructor();
    issueAccessToken(client_id: string, client_secret: string): Promise<{
        access_token: string;
        expires_in: number;
        token_type: "Bearer";
    }>;
    revokeAccessToken(access_token: string): Promise<{}>;
}