mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-08 15:43:55 +00:00
refactor(line): localize internal declarations (#102037)
This commit is contained in:
@@ -3,7 +3,7 @@ import type { messagingApi } from "@line/bot-sdk";
|
||||
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
||||
|
||||
export type Action = messagingApi.Action;
|
||||
export const LINE_ACTION_LABEL_LIMIT = 20;
|
||||
const LINE_ACTION_LABEL_LIMIT = 20;
|
||||
const LINE_ACTION_DATA_LIMIT = 300;
|
||||
|
||||
export function truncateLineActionLabel(label: string, limit = LINE_ACTION_LABEL_LIMIT): string {
|
||||
|
||||
@@ -43,7 +43,7 @@ export type LineAutoReplyDeps = {
|
||||
| "onReplyError"
|
||||
>;
|
||||
|
||||
export type LineAutoReplyDeliveryResult =
|
||||
type LineAutoReplyDeliveryResult =
|
||||
| { status: "delivered"; replyTokenUsed: boolean }
|
||||
| { status: "partial"; replyTokenUsed: boolean; error: Error };
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ function isDownloadableLineMessageType(
|
||||
return LINE_DOWNLOADABLE_MESSAGE_TYPES.has(messageType);
|
||||
}
|
||||
|
||||
export interface LineHandlerContext {
|
||||
interface LineHandlerContext {
|
||||
cfg: OpenClawConfig;
|
||||
account: ResolvedLineAccount;
|
||||
runtime: RuntimeEnv;
|
||||
@@ -79,7 +79,7 @@ export interface LineHandlerContext {
|
||||
|
||||
const LINE_WEBHOOK_REPLAY_WINDOW_MS = 10 * 60 * 1000;
|
||||
const LINE_WEBHOOK_REPLAY_MAX_ENTRIES = 4096;
|
||||
export type LineWebhookReplayCache = ClaimableDedupe;
|
||||
type LineWebhookReplayCache = ClaimableDedupe;
|
||||
|
||||
function normalizeLineIngressEntry(value: string): string | null {
|
||||
return normalizeLineAllowEntry(value) || null;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-pay
|
||||
import type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime";
|
||||
import type { LineChannelData } from "./types.js";
|
||||
|
||||
export type LineDurableReplyOptions = {
|
||||
type LineDurableReplyOptions = {
|
||||
to: string;
|
||||
};
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ import type { LineChannelData, ResolvedLineAccount } from "./types.js";
|
||||
import { createLineNodeWebhookHandler, readLineWebhookRequestBody } from "./webhook-node.js";
|
||||
import { parseLineWebhookBody, validateLineSignature } from "./webhook-utils.js";
|
||||
|
||||
export interface MonitorLineProviderOptions {
|
||||
interface MonitorLineProviderOptions {
|
||||
channelAccessToken: string;
|
||||
channelSecret: string;
|
||||
accountId?: string;
|
||||
@@ -57,7 +57,7 @@ export interface MonitorLineProviderOptions {
|
||||
webhookPath?: string;
|
||||
}
|
||||
|
||||
export interface LineProviderMonitor {
|
||||
interface LineProviderMonitor {
|
||||
account: ResolvedLineAccount;
|
||||
handleWebhook: (body: webhook.CallbackRequest) => Promise<void>;
|
||||
stop: () => void;
|
||||
|
||||
Reference in New Issue
Block a user