diff --git a/extensions/line/src/bot-message-context.ts b/extensions/line/src/bot-message-context.ts index 5514bea428b..db921706c12 100644 --- a/extensions/line/src/bot-message-context.ts +++ b/extensions/line/src/bot-message-context.ts @@ -42,7 +42,7 @@ interface BuildLineMessageContextParams { historyLimit?: number; } -export type LineSourceInfo = { +type LineSourceInfo = { userId?: string; groupId?: string; roomId?: string; @@ -576,6 +576,6 @@ export async function buildLinePostbackContext(params: { }; } -export type LineMessageContext = NonNullable>>; -export type LinePostbackContext = NonNullable>>; +type LineMessageContext = NonNullable>>; +type LinePostbackContext = NonNullable>>; export type LineInboundContext = LineMessageContext | LinePostbackContext; diff --git a/extensions/line/src/bot.ts b/extensions/line/src/bot.ts index 34c050e2238..4d25cfdad52 100644 --- a/extensions/line/src/bot.ts +++ b/extensions/line/src/bot.ts @@ -12,7 +12,7 @@ import { createLineWebhookReplayCache, handleLineWebhookEvents } from "./bot-han import type { LineInboundContext } from "./bot-message-context.js"; import type { ResolvedLineAccount } from "./types.js"; -export interface LineBotOptions { +interface LineBotOptions { channelAccessToken: string; channelSecret: string; accountId?: string; @@ -22,7 +22,7 @@ export interface LineBotOptions { onMessage?: (ctx: LineInboundContext) => Promise; } -export interface LineBot { +interface LineBot { handleWebhook: (body: webhook.CallbackRequest) => Promise; account: ResolvedLineAccount; } diff --git a/extensions/line/src/channel-shared.ts b/extensions/line/src/channel-shared.ts index 887c785ddd1..9e14fd01311 100644 --- a/extensions/line/src/channel-shared.ts +++ b/extensions/line/src/channel-shared.ts @@ -1,10 +1,10 @@ import { describeWebhookAccountSnapshot } from "openclaw/plugin-sdk/account-helpers"; -import { hasLineCredentials, parseLineAllowFromId } from "./account-helpers.js"; +import { hasLineCredentials } from "./account-helpers.js"; import { type ChannelPlugin, type ResolvedLineAccount } from "./channel-api.js"; import { lineConfigAdapter } from "./config-adapter.js"; import { LineChannelConfigSchema } from "./config-schema.js"; -export const lineChannelMeta = { +const lineChannelMeta = { id: "line", label: "LINE", selectionLabel: "LINE (Messaging API)", @@ -46,5 +46,3 @@ export const lineChannelPluginCommon = { ChannelPlugin, "meta" | "capabilities" | "reload" | "configSchema" | "config" >; - -export { parseLineAllowFromId }; diff --git a/extensions/line/src/config-adapter.ts b/extensions/line/src/config-adapter.ts index 17c9a74c497..d86b96bbf13 100644 --- a/extensions/line/src/config-adapter.ts +++ b/extensions/line/src/config-adapter.ts @@ -6,7 +6,7 @@ import { type ResolvedLineAccount, } from "./channel-api.js"; -export function normalizeLineAllowFrom(entry: string): string { +function normalizeLineAllowFrom(entry: string): string { return entry.replace(/^line:(?:user:)?/i, ""); } diff --git a/extensions/line/src/outbound-media.ts b/extensions/line/src/outbound-media.ts index 480db862b6d..b18f63b9dc0 100644 --- a/extensions/line/src/outbound-media.ts +++ b/extensions/line/src/outbound-media.ts @@ -1,7 +1,7 @@ import { resolvePinnedHostnameWithPolicy, type SsrFPolicy } from "openclaw/plugin-sdk/ssrf-runtime"; import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; -export type LineOutboundMediaKind = "image" | "video" | "audio"; +type LineOutboundMediaKind = "image" | "video" | "audio"; export type LineOutboundMediaResolved = { mediaUrl: string; diff --git a/extensions/line/src/reply-chunks.ts b/extensions/line/src/reply-chunks.ts index 264317f2dee..fbd8d87a2bf 100644 --- a/extensions/line/src/reply-chunks.ts +++ b/extensions/line/src/reply-chunks.ts @@ -1,7 +1,7 @@ import type { messagingApi } from "@line/bot-sdk"; import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; -export type LineReplyMessage = messagingApi.TextMessage; +type LineReplyMessage = messagingApi.TextMessage; export type SendLineReplyChunksParams = { to: string; diff --git a/extensions/line/src/runtime.ts b/extensions/line/src/runtime.ts index 3c165ebd201..9ab7e119c90 100644 --- a/extensions/line/src/runtime.ts +++ b/extensions/line/src/runtime.ts @@ -15,7 +15,7 @@ type LineChannelRuntime = { sendMessageLine?: typeof import("./send.js").sendMessageLine; }; -export type LineRuntime = PluginRuntime & { +type LineRuntime = PluginRuntime & { channel: PluginRuntime["channel"] & { line?: LineChannelRuntime; }; diff --git a/extensions/line/src/types.ts b/extensions/line/src/types.ts index 72dacf57501..399359c3f21 100644 --- a/extensions/line/src/types.ts +++ b/extensions/line/src/types.ts @@ -2,7 +2,7 @@ import type { BaseProbeResult } from "openclaw/plugin-sdk/channel-contract"; export type LineTokenSource = "config" | "env" | "file" | "none"; -export interface LineThreadBindingsConfig { +interface LineThreadBindingsConfig { enabled?: boolean; idleHours?: number; maxAgeHours?: number; @@ -67,7 +67,7 @@ export type LineProbeResult = BaseProbeResult & { }; }; -export type LineFlexMessagePayload = { +type LineFlexMessagePayload = { altText: string; contents: unknown; };