UNPKG

9.23 kBTypeScriptView Raw
1import { Readable } from "node:stream";
2import * as Types from "./types.js";
3import { AxiosRequestConfig } from "axios";
4type RequestOption = {
5 retryKey: string;
6};
7/**
8 * @deprecated Use clients generated by openapi spec instead.
9 */
10export default class Client {
11 config: Types.ClientConfig;
12 private http;
13 private requestOption;
14 constructor(config: Types.ClientConfig);
15 setRequestOptionOnce(option: Partial<RequestOption>): void;
16 private generateRequestConfig;
17 private parseHTTPResponse;
18 pushMessage(to: string, messages: Types.Message | Types.Message[], notificationDisabled?: boolean, customAggregationUnits?: string[]): Promise<Types.MessageAPIResponseBase>;
19 replyMessage(replyToken: string, messages: Types.Message | Types.Message[], notificationDisabled?: boolean): Promise<Types.MessageAPIResponseBase>;
20 multicast(to: string[], messages: Types.Message | Types.Message[], notificationDisabled?: boolean, customAggregationUnits?: string[]): Promise<Types.MessageAPIResponseBase>;
21 narrowcast(messages: Types.Message | Types.Message[], recipient?: Types.ReceieptObject, filter?: {
22 demographic: Types.DemographicFilterObject;
23 }, limit?: {
24 max?: number;
25 upToRemainingQuota?: boolean;
26 }, notificationDisabled?: boolean): Promise<Types.MessageAPIResponseBase>;
27 broadcast(messages: Types.Message | Types.Message[], notificationDisabled?: boolean): Promise<Types.MessageAPIResponseBase>;
28 validatePushMessageObjects(messages: Types.Message | Types.Message[]): Promise<Types.MessageAPIResponseBase>;
29 validateReplyMessageObjects(messages: Types.Message | Types.Message[]): Promise<Types.MessageAPIResponseBase>;
30 validateMulticastMessageObjects(messages: Types.Message | Types.Message[]): Promise<Types.MessageAPIResponseBase>;
31 validateNarrowcastMessageObjects(messages: Types.Message | Types.Message[]): Promise<Types.MessageAPIResponseBase>;
32 validateBroadcastMessageObjects(messages: Types.Message | Types.Message[]): Promise<Types.MessageAPIResponseBase>;
33 validateCustomAggregationUnits(units: string[]): {
34 messages: string[];
35 valid: boolean;
36 };
37 getProfile(userId: string): Promise<Types.Profile>;
38 private getChatMemberProfile;
39 getGroupMemberProfile(groupId: string, userId: string): Promise<Types.Profile>;
40 getRoomMemberProfile(roomId: string, userId: string): Promise<Types.Profile>;
41 private getChatMemberIds;
42 getGroupMemberIds(groupId: string): Promise<string[]>;
43 getRoomMemberIds(roomId: string): Promise<string[]>;
44 getBotFollowersIds(): Promise<string[]>;
45 getGroupMembersCount(groupId: string): Promise<Types.MembersCountResponse>;
46 getRoomMembersCount(roomId: string): Promise<Types.MembersCountResponse>;
47 getGroupSummary(groupId: string): Promise<Types.GroupSummaryResponse>;
48 getMessageContent(messageId: string): Promise<Readable>;
49 private leaveChat;
50 leaveGroup(groupId: string): Promise<any>;
51 leaveRoom(roomId: string): Promise<any>;
52 getRichMenu(richMenuId: string): Promise<Types.RichMenuResponse>;
53 createRichMenu(richMenu: Types.RichMenu): Promise<string>;
54 deleteRichMenu(richMenuId: string): Promise<any>;
55 getRichMenuAliasList(): Promise<Types.GetRichMenuAliasListResponse>;
56 getRichMenuAlias(richMenuAliasId: string): Promise<Types.GetRichMenuAliasResponse>;
57 createRichMenuAlias(richMenuId: string, richMenuAliasId: string): Promise<{}>;
58 deleteRichMenuAlias(richMenuAliasId: string): Promise<{}>;
59 updateRichMenuAlias(richMenuAliasId: string, richMenuId: string): Promise<{}>;
60 getRichMenuIdOfUser(userId: string): Promise<string>;
61 linkRichMenuToUser(userId: string, richMenuId: string): Promise<any>;
62 unlinkRichMenuFromUser(userId: string): Promise<any>;
63 linkRichMenuToMultipleUsers(richMenuId: string, userIds: string[]): Promise<any>;
64 unlinkRichMenusFromMultipleUsers(userIds: string[]): Promise<any>;
65 getRichMenuImage(richMenuId: string): Promise<Readable>;
66 setRichMenuImage(richMenuId: string, data: Buffer | Readable, contentType?: string): Promise<any>;
67 getRichMenuList(): Promise<Array<Types.RichMenuResponse>>;
68 setDefaultRichMenu(richMenuId: string): Promise<{}>;
69 getDefaultRichMenuId(): Promise<string>;
70 deleteDefaultRichMenu(): Promise<{}>;
71 getLinkToken(userId: string): Promise<string>;
72 getNumberOfSentReplyMessages(date: string): Promise<Types.NumberOfMessagesSentResponse>;
73 getNumberOfSentPushMessages(date: string): Promise<Types.NumberOfMessagesSentResponse>;
74 getNumberOfSentMulticastMessages(date: string): Promise<Types.NumberOfMessagesSentResponse>;
75 getNarrowcastProgress(requestId: string): Promise<Types.NarrowcastProgressResponse>;
76 getTargetLimitForAdditionalMessages(): Promise<Types.TargetLimitForAdditionalMessages>;
77 getNumberOfMessagesSentThisMonth(): Promise<Types.NumberOfMessagesSentThisMonth>;
78 getNumberOfSentBroadcastMessages(date: string): Promise<Types.NumberOfMessagesSentResponse>;
79 getNumberOfMessageDeliveries(date: string): Promise<Types.NumberOfMessageDeliveriesResponse>;
80 getNumberOfFollowers(date: string): Promise<Types.NumberOfFollowersResponse>;
81 getFriendDemographics(): Promise<Types.FriendDemographics>;
82 getUserInteractionStatistics(requestId: string): Promise<Types.UserInteractionStatistics>;
83 getStatisticsPerUnit(customAggregationUnit: string, from: string, to: string): Promise<Types.StatisticsPerUnit>;
84 createUploadAudienceGroup(uploadAudienceGroup: {
85 description: string;
86 isIfaAudience?: boolean;
87 audiences?: {
88 id: string;
89 }[];
90 uploadDescription?: string;
91 }): Promise<{
92 audienceGroupId: number;
93 type: string;
94 description: string;
95 created: number;
96 }>;
97 createUploadAudienceGroupByFile(uploadAudienceGroup: {
98 description: string;
99 isIfaAudience?: boolean;
100 uploadDescription?: string;
101 file: Buffer | Readable;
102 }): Promise<{
103 audienceGroupId: number;
104 type: "UPLOAD";
105 description: string;
106 created: number;
107 }>;
108 updateUploadAudienceGroup(uploadAudienceGroup: {
109 audienceGroupId: number;
110 description?: string;
111 uploadDescription?: string;
112 audiences: {
113 id: string;
114 }[];
115 }, httpConfig?: Partial<AxiosRequestConfig>): Promise<{}>;
116 updateUploadAudienceGroupByFile(uploadAudienceGroup: {
117 audienceGroupId: number;
118 uploadDescription?: string;
119 file: Buffer | Readable;
120 }, httpConfig?: Partial<AxiosRequestConfig>): Promise<{}>;
121 createClickAudienceGroup(clickAudienceGroup: {
122 description: string;
123 requestId: string;
124 clickUrl?: string;
125 }): Promise<{
126 audienceGroupId: number;
127 type: string;
128 created: number;
129 } & {
130 description: string;
131 requestId: string;
132 clickUrl?: string;
133 }>;
134 createImpAudienceGroup(impAudienceGroup: {
135 requestId: string;
136 description: string;
137 }): Promise<{
138 audienceGroupId: number;
139 type: string;
140 created: number;
141 } & {
142 requestId: string;
143 description: string;
144 }>;
145 setDescriptionAudienceGroup(description: string, audienceGroupId: string): Promise<{}>;
146 deleteAudienceGroup(audienceGroupId: string): Promise<{}>;
147 getAudienceGroup(audienceGroupId: string): Promise<Types.AudienceGroup>;
148 getAudienceGroups(page: number, description?: string, status?: Types.AudienceGroupStatus, size?: number, createRoute?: Types.AudienceGroupCreateRoute, includesExternalPublicGroups?: boolean): Promise<{
149 audienceGroups: Types.AudienceGroups;
150 hasNextPage: boolean;
151 totalCount: number;
152 readWriteAudienceGroupTotalCount: number;
153 page: number;
154 size: number;
155 }>;
156 getAudienceGroupAuthorityLevel(): Promise<{
157 authorityLevel: Types.AudienceGroupAuthorityLevel;
158 }>;
159 changeAudienceGroupAuthorityLevel(authorityLevel: Types.AudienceGroupAuthorityLevel): Promise<{}>;
160 getBotInfo(): Promise<Types.BotInfoResponse>;
161 setWebhookEndpointUrl(endpoint: string): Promise<{}>;
162 getWebhookEndpointInfo(): Promise<Types.WebhookEndpointInfoResponse>;
163 testWebhookEndpoint(endpoint?: string): Promise<Types.TestWebhookEndpointResponse>;
164 validateRichMenu(richMenu: Types.RichMenu): Promise<{}>;
165}
166export declare class OAuth {
167 private http;
168 constructor();
169 issueAccessToken(client_id: string, client_secret: string): Promise<Types.ChannelAccessToken>;
170 revokeAccessToken(access_token: string): Promise<{}>;
171 verifyAccessToken(access_token: string): Promise<Types.VerifyAccessToken>;
172 verifyIdToken(id_token: string, client_id: string, nonce?: string, user_id?: string): Promise<Types.VerifyIDToken>;
173 issueChannelAccessTokenV2_1(client_assertion: string): Promise<Types.ChannelAccessToken>;
174 getChannelAccessTokenKeyIdsV2_1(client_assertion: string): Promise<{
175 key_ids: string[];
176 }>;
177 revokeChannelAccessTokenV2_1(client_id: string, client_secret: string, access_token: string): Promise<{}>;
178}
179export {};
180//# sourceMappingURL=client.d.ts.map
\No newline at end of file