refactor: trim line helper exports · openclaw/openclaw@57fcd7b
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -42,7 +42,7 @@ interface BuildLineMessageContextParams {
|
42 | 42 | historyLimit?: number; |
43 | 43 | } |
44 | 44 | |
45 | | -export type LineSourceInfo = { |
| 45 | +type LineSourceInfo = { |
46 | 46 | userId?: string; |
47 | 47 | groupId?: string; |
48 | 48 | roomId?: string; |
@@ -576,6 +576,6 @@ export async function buildLinePostbackContext(params: {
|
576 | 576 | }; |
577 | 577 | } |
578 | 578 | |
579 | | -export type LineMessageContext = NonNullable<Awaited<ReturnType<typeof buildLineMessageContext>>>; |
580 | | -export type LinePostbackContext = NonNullable<Awaited<ReturnType<typeof buildLinePostbackContext>>>; |
| 579 | +type LineMessageContext = NonNullable<Awaited<ReturnType<typeof buildLineMessageContext>>>; |
| 580 | +type LinePostbackContext = NonNullable<Awaited<ReturnType<typeof buildLinePostbackContext>>>; |
581 | 581 | export type LineInboundContext = LineMessageContext | LinePostbackContext; |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,7 @@ import { createLineWebhookReplayCache, handleLineWebhookEvents } from "./bot-han
|
12 | 12 | import type { LineInboundContext } from "./bot-message-context.js"; |
13 | 13 | import type { ResolvedLineAccount } from "./types.js"; |
14 | 14 | |
15 | | -export interface LineBotOptions { |
| 15 | +interface LineBotOptions { |
16 | 16 | channelAccessToken: string; |
17 | 17 | channelSecret: string; |
18 | 18 | accountId?: string; |
@@ -22,7 +22,7 @@ export interface LineBotOptions {
|
22 | 22 | onMessage?: (ctx: LineInboundContext) => Promise<void>; |
23 | 23 | } |
24 | 24 | |
25 | | -export interface LineBot { |
| 25 | +interface LineBot { |
26 | 26 | handleWebhook: (body: webhook.CallbackRequest) => Promise<void>; |
27 | 27 | account: ResolvedLineAccount; |
28 | 28 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { describeWebhookAccountSnapshot } from "openclaw/plugin-sdk/account-helpers"; |
2 | | -import { hasLineCredentials, parseLineAllowFromId } from "./account-helpers.js"; |
| 2 | +import { hasLineCredentials } from "./account-helpers.js"; |
3 | 3 | import { type ChannelPlugin, type ResolvedLineAccount } from "./channel-api.js"; |
4 | 4 | import { lineConfigAdapter } from "./config-adapter.js"; |
5 | 5 | import { LineChannelConfigSchema } from "./config-schema.js"; |
6 | 6 | |
7 | | -export const lineChannelMeta = { |
| 7 | +const lineChannelMeta = { |
8 | 8 | id: "line", |
9 | 9 | label: "LINE", |
10 | 10 | selectionLabel: "LINE (Messaging API)", |
@@ -46,5 +46,3 @@ export const lineChannelPluginCommon = {
|
46 | 46 | ChannelPlugin<ResolvedLineAccount>, |
47 | 47 | "meta" | "capabilities" | "reload" | "configSchema" | "config" |
48 | 48 | >; |
49 | | - |
50 | | -export { parseLineAllowFromId }; |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ import {
|
6 | 6 | type ResolvedLineAccount, |
7 | 7 | } from "./channel-api.js"; |
8 | 8 | |
9 | | -export function normalizeLineAllowFrom(entry: string): string { |
| 9 | +function normalizeLineAllowFrom(entry: string): string { |
10 | 10 | return entry.replace(/^line:(?:user:)?/i, ""); |
11 | 11 | } |
12 | 12 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { resolvePinnedHostnameWithPolicy, type SsrFPolicy } from "openclaw/plugin-sdk/ssrf-runtime"; |
2 | 2 | import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; |
3 | 3 | |
4 | | -export type LineOutboundMediaKind = "image" | "video" | "audio"; |
| 4 | +type LineOutboundMediaKind = "image" | "video" | "audio"; |
5 | 5 | |
6 | 6 | export type LineOutboundMediaResolved = { |
7 | 7 | mediaUrl: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import type { messagingApi } from "@line/bot-sdk"; |
2 | 2 | import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; |
3 | 3 | |
4 | | -export type LineReplyMessage = messagingApi.TextMessage; |
| 4 | +type LineReplyMessage = messagingApi.TextMessage; |
5 | 5 | |
6 | 6 | export type SendLineReplyChunksParams = { |
7 | 7 | to: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -15,7 +15,7 @@ type LineChannelRuntime = {
|
15 | 15 | sendMessageLine?: typeof import("./send.js").sendMessageLine; |
16 | 16 | }; |
17 | 17 | |
18 | | -export type LineRuntime = PluginRuntime & { |
| 18 | +type LineRuntime = PluginRuntime & { |
19 | 19 | channel: PluginRuntime["channel"] & { |
20 | 20 | line?: LineChannelRuntime; |
21 | 21 | }; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,7 @@ import type { BaseProbeResult } from "openclaw/plugin-sdk/channel-contract";
|
2 | 2 | |
3 | 3 | export type LineTokenSource = "config" | "env" | "file" | "none"; |
4 | 4 | |
5 | | -export interface LineThreadBindingsConfig { |
| 5 | +interface LineThreadBindingsConfig { |
6 | 6 | enabled?: boolean; |
7 | 7 | idleHours?: number; |
8 | 8 | maxAgeHours?: number; |
@@ -67,7 +67,7 @@ export type LineProbeResult = BaseProbeResult<string> & {
|
67 | 67 | }; |
68 | 68 | }; |
69 | 69 | |
70 | | -export type LineFlexMessagePayload = { |
| 70 | +type LineFlexMessagePayload = { |
71 | 71 | altText: string; |
72 | 72 | contents: unknown; |
73 | 73 | }; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。