diff --git a/src/line/auto-reply-delivery.ts b/src/line/auto-reply-delivery.ts index c303382f9b2..aa5443a536e 100644 --- a/src/line/auto-reply-delivery.ts +++ b/src/line/auto-reply-delivery.ts @@ -2,7 +2,7 @@ import type { messagingApi } from "@line/bot-sdk"; import type { ReplyPayload } from "../auto-reply/types.js"; import type { FlexContainer } from "./flex-templates.js"; import type { ProcessedLineMessage } from "./markdown-to-line.js"; -import type { LineReplyMessage, SendLineReplyChunksParams } from "./reply-chunks.js"; +import type { SendLineReplyChunksParams } from "./reply-chunks.js"; import type { LineChannelData, LineTemplateMessagePayload } from "./types.js"; export type LineAutoReplyDeps = { @@ -12,19 +12,6 @@ export type LineAutoReplyDeps = { processLineMessage: (text: string) => ProcessedLineMessage; chunkMarkdownText: (text: string, limit: number) => string[]; sendLineReplyChunks: (params: SendLineReplyChunksParams) => Promise<{ replyTokenUsed: boolean }>; - replyMessageLine: ( - replyToken: string, - messages: messagingApi.Message[], - opts?: { accountId?: string }, - ) => Promise; - pushMessageLine: (to: string, text: string, opts?: { accountId?: string }) => Promise; - pushTextMessageWithQuickReplies: ( - to: string, - text: string, - quickReplies: string[], - opts?: { accountId?: string }, - ) => Promise; - createTextMessageWithQuickReplies: (text: string, quickReplies: string[]) => LineReplyMessage; createQuickReplyItems: (labels: string[]) => messagingApi.QuickReply; pushMessagesLine: ( to: string, @@ -42,8 +29,14 @@ export type LineAutoReplyDeps = { latitude: number; longitude: number; }) => messagingApi.LocationMessage; - onReplyError?: (err: unknown) => void; -}; +} & Pick< + SendLineReplyChunksParams, + | "replyMessageLine" + | "pushMessageLine" + | "pushTextMessageWithQuickReplies" + | "createTextMessageWithQuickReplies" + | "onReplyError" +>; export async function deliverLineAutoReply(params: { payload: ReplyPayload;