mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 16:38:27 +00:00
feat: Add Line plugin (#1630)
* feat: add LINE plugin (#1630) (thanks @plum-dawg) * feat: complete LINE plugin (#1630) (thanks @plum-dawg) * chore: drop line plugin node_modules (#1630) (thanks @plum-dawg) * test: mock /context report in commands test (#1630) (thanks @plum-dawg) * test: limit macOS CI workers to avoid OOM (#1630) (thanks @plum-dawg) * test: reduce macOS CI vitest workers (#1630) (thanks @plum-dawg) --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
155
src/line/index.ts
Normal file
155
src/line/index.ts
Normal file
@@ -0,0 +1,155 @@
|
||||
export {
|
||||
createLineBot,
|
||||
createLineWebhookCallback,
|
||||
type LineBot,
|
||||
type LineBotOptions,
|
||||
} from "./bot.js";
|
||||
export {
|
||||
monitorLineProvider,
|
||||
getLineRuntimeState,
|
||||
type MonitorLineProviderOptions,
|
||||
type LineProviderMonitor,
|
||||
} from "./monitor.js";
|
||||
export {
|
||||
sendMessageLine,
|
||||
pushMessageLine,
|
||||
pushMessagesLine,
|
||||
replyMessageLine,
|
||||
createImageMessage,
|
||||
createLocationMessage,
|
||||
createFlexMessage,
|
||||
createQuickReplyItems,
|
||||
createTextMessageWithQuickReplies,
|
||||
showLoadingAnimation,
|
||||
getUserProfile,
|
||||
getUserDisplayName,
|
||||
pushImageMessage,
|
||||
pushLocationMessage,
|
||||
pushFlexMessage,
|
||||
pushTemplateMessage,
|
||||
pushTextMessageWithQuickReplies,
|
||||
} from "./send.js";
|
||||
export {
|
||||
startLineWebhook,
|
||||
createLineWebhookMiddleware,
|
||||
type LineWebhookOptions,
|
||||
type StartLineWebhookOptions,
|
||||
} from "./webhook.js";
|
||||
export {
|
||||
handleLineHttpRequest,
|
||||
registerLineHttpHandler,
|
||||
normalizeLineWebhookPath,
|
||||
} from "./http-registry.js";
|
||||
export {
|
||||
resolveLineAccount,
|
||||
listLineAccountIds,
|
||||
resolveDefaultLineAccountId,
|
||||
normalizeAccountId,
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
} from "./accounts.js";
|
||||
export { probeLineBot } from "./probe.js";
|
||||
export { downloadLineMedia } from "./download.js";
|
||||
export { LineConfigSchema, type LineConfigSchemaType } from "./config-schema.js";
|
||||
export { buildLineMessageContext } from "./bot-message-context.js";
|
||||
export { handleLineWebhookEvents, type LineHandlerContext } from "./bot-handlers.js";
|
||||
|
||||
// Flex Message templates
|
||||
export {
|
||||
createInfoCard,
|
||||
createListCard,
|
||||
createImageCard,
|
||||
createActionCard,
|
||||
createCarousel,
|
||||
createNotificationBubble,
|
||||
createReceiptCard,
|
||||
createEventCard,
|
||||
createMediaPlayerCard,
|
||||
createAppleTvRemoteCard,
|
||||
createDeviceControlCard,
|
||||
toFlexMessage,
|
||||
type ListItem,
|
||||
type CardAction,
|
||||
type FlexContainer,
|
||||
type FlexBubble,
|
||||
type FlexCarousel,
|
||||
} from "./flex-templates.js";
|
||||
|
||||
// Markdown to LINE conversion
|
||||
export {
|
||||
processLineMessage,
|
||||
hasMarkdownToConvert,
|
||||
stripMarkdown,
|
||||
extractMarkdownTables,
|
||||
extractCodeBlocks,
|
||||
extractLinks,
|
||||
convertTableToFlexBubble,
|
||||
convertCodeBlockToFlexBubble,
|
||||
convertLinksToFlexBubble,
|
||||
type ProcessedLineMessage,
|
||||
type MarkdownTable,
|
||||
type CodeBlock,
|
||||
type MarkdownLink,
|
||||
} from "./markdown-to-line.js";
|
||||
|
||||
// Rich Menu operations
|
||||
export {
|
||||
createRichMenu,
|
||||
uploadRichMenuImage,
|
||||
setDefaultRichMenu,
|
||||
cancelDefaultRichMenu,
|
||||
getDefaultRichMenuId,
|
||||
linkRichMenuToUser,
|
||||
linkRichMenuToUsers,
|
||||
unlinkRichMenuFromUser,
|
||||
unlinkRichMenuFromUsers,
|
||||
getRichMenuIdOfUser,
|
||||
getRichMenuList,
|
||||
getRichMenu,
|
||||
deleteRichMenu,
|
||||
createRichMenuAlias,
|
||||
deleteRichMenuAlias,
|
||||
createGridLayout,
|
||||
messageAction,
|
||||
uriAction,
|
||||
postbackAction,
|
||||
datetimePickerAction,
|
||||
createDefaultMenuConfig,
|
||||
type CreateRichMenuParams,
|
||||
type RichMenuSize,
|
||||
type RichMenuAreaRequest,
|
||||
} from "./rich-menu.js";
|
||||
|
||||
// Template messages (Button, Confirm, Carousel)
|
||||
export {
|
||||
createConfirmTemplate,
|
||||
createButtonTemplate,
|
||||
createTemplateCarousel,
|
||||
createCarouselColumn,
|
||||
createImageCarousel,
|
||||
createImageCarouselColumn,
|
||||
createYesNoConfirm,
|
||||
createButtonMenu,
|
||||
createLinkMenu,
|
||||
createProductCarousel,
|
||||
messageAction as templateMessageAction,
|
||||
uriAction as templateUriAction,
|
||||
postbackAction as templatePostbackAction,
|
||||
datetimePickerAction as templateDatetimePickerAction,
|
||||
type TemplateMessage,
|
||||
type ConfirmTemplate,
|
||||
type ButtonsTemplate,
|
||||
type CarouselTemplate,
|
||||
type CarouselColumn,
|
||||
} from "./template-messages.js";
|
||||
|
||||
export type {
|
||||
LineConfig,
|
||||
LineAccountConfig,
|
||||
LineGroupConfig,
|
||||
ResolvedLineAccount,
|
||||
LineTokenSource,
|
||||
LineMessageType,
|
||||
LineWebhookContext,
|
||||
LineSendResult,
|
||||
LineProbeResult,
|
||||
} from "./types.js";
|
||||
Reference in New Issue
Block a user