client.d.ts
7.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/// <reference types="node" />
import { Readable } from "stream";
import * as Types from "./types";
import { AxiosRequestConfig } from "axios";
declare type RequestOption = {
retryKey: string;
};
export default class Client {
config: Types.ClientConfig;
private http;
private requestOption;
constructor(config: Types.ClientConfig);
setRequestOptionOnce(option: Partial<RequestOption>): void;
private generateRequestConfig;
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>;
narrowcast(messages: Types.Message | Types.Message[], recipient?: Types.ReceieptObject, filter?: {
demographic: Types.DemographicFilterObject;
}, limit?: {
max?: number;
upToRemainingQuota?: boolean;
}, 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[]>;
getGroupMembersCount(groupId: string): Promise<Types.MembersCountResponse>;
getRoomMembersCount(roomId: string): Promise<Types.MembersCountResponse>;
getGroupSummary(groupId: string): Promise<Types.GroupSummaryResponse>;
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>;
getNarrowcastProgress(requestId: string): Promise<Types.NarrowcastProgressResponse>;
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>;
getUserInteractionStatistics(requestId: string): Promise<Types.UserInteractionStatistics>;
createUploadAudienceGroup(uploadAudienceGroup: {
description: string;
isIfaAudience?: boolean;
audiences?: {
id: string;
}[];
uploadDescription?: string;
}): Promise<{
audienceGroupId: number;
type: string;
description: string;
created: number;
}>;
createUploadAudienceGroupByFile(uploadAudienceGroup: {
description: string;
isIfaAudience?: boolean;
uploadDescription?: string;
file: Buffer | Readable;
}): Promise<{
audienceGroupId: number;
type: "UPLOAD";
description: string;
created: number;
}>;
updateUploadAudienceGroup(uploadAudienceGroup: {
audienceGroupId: number;
description?: string;
uploadDescription?: string;
audiences: {
id: string;
}[];
}, httpConfig?: Partial<AxiosRequestConfig>): Promise<{}>;
updateUploadAudienceGroupByFile(uploadAudienceGroup: {
audienceGroupId: number;
uploadDescription?: string;
file: Buffer | Readable;
}, httpConfig?: Partial<AxiosRequestConfig>): Promise<{}>;
createClickAudienceGroup(clickAudienceGroup: {
description: string;
requestId: string;
clickUrl?: string;
}): Promise<{
audienceGroupId: number;
type: string;
created: number;
} & {
description: string;
requestId: string;
clickUrl?: string;
}>;
createImpAudienceGroup(impAudienceGroup: {
requestId: string;
description: string;
}): Promise<{
audienceGroupId: number;
type: string;
created: number;
} & {
requestId: string;
description: string;
}>;
setDescriptionAudienceGroup(description: string, audienceGroupId: string): Promise<{}>;
deleteAudienceGroup(audienceGroupId: string): Promise<{}>;
getAudienceGroup(audienceGroupId: string): Promise<Types.AudienceGroup>;
getAudienceGroups(page: number, description?: string, status?: Types.AudienceGroupStatus, size?: number, createRoute?: Types.AudienceGroupCreateRoute, includesExternalPublicGroups?: boolean): Promise<{
audienceGroups: Types.AudienceGroups;
hasNextPage: boolean;
totalCount: number;
readWriteAudienceGroupTotalCount: number;
page: number;
size: number;
}>;
getAudienceGroupAuthorityLevel(): Promise<{
authorityLevel: Types.AudienceGroupAuthorityLevel;
}>;
changeAudienceGroupAuthorityLevel(authorityLevel: Types.AudienceGroupAuthorityLevel): Promise<{}>;
getBotInfo(): Promise<Types.BotInfoResponse>;
setWebhookEndpointUrl(endpoint: string): Promise<{}>;
getWebhookEndpointInfo(): Promise<Types.WebhookEndpointInfoResponse>;
testWebhookEndpoint(endpoint?: string): Promise<Types.TestWebhookEndpointResponse>;
}
export declare class OAuth {
private http;
constructor();
issueAccessToken(client_id: string, client_secret: string): Promise<Types.ChannelAccessToken>;
revokeAccessToken(access_token: string): Promise<{}>;
issueChannelAccessTokenV2_1(client_assertion: string): Promise<Types.ChannelAccessToken>;
getChannelAccessTokenKeyIdsV2_1(client_assertion: string): Promise<{
key_ids: string[];
}>;
revokeChannelAccessTokenV2_1(client_id: string, client_secret: string, access_token: string): Promise<{}>;
}
export {};