Channels
Every option for the Telegram, Slack and WhatsApp channels in @intentface/latch-channels.
What channels are for: Channels. What they handle for you: Chat apps.
Each platform is a subpath, and each channel has one handleRequest(request) for its webhook route.
Telegram
ts
import { telegramChannel } from "@intentface/latch-channels/telegram";| Option | Type | Default | Details |
|---|---|---|---|
agent | string | — | |
botRef | string | — | |
botToken | TelegramToken | — | |
webhookSecret | string | (() => string | Promise<string>) | — | |
runtime | ChannelRunOps<P> | — | |
authorizeUser | (user: TelegramUser) => Promise<AuthResult<P>> | — | |
seen? | ((deliveryKey: string) => Promise<boolean>) | — | |
claimTurn? | ((chatId: string) => Promise<string | null>) | — | |
releaseTurn? | ((chatId: string, token: string) => Promise<void>) | — | |
stashPending? | function | — | |
authorizeUrl? | function | — | |
transcribe? | TranscribeAudio | — | |
askState? | AskStateStore | — | |
thread? | ChannelThreadStore | — | |
waitUntil? | ((p: Promise<unknown>) => void) | — | |
apiOptions? | TelegramApiOptions | — |
Slack
ts
import { slackChannel } from "@intentface/latch-channels/slack";| Option | Type | Default | Details |
|---|---|---|---|
agent | string | — | |
appId | string | — | |
principal | P | — | |
botToken | SlackToken | — | |
runtime | ChannelRunOps<P> | — | |
botUserId | string | — | |
teamId | string | — | |
signingSecret | string | (() => string | Promise<string>) | — | |
waitUntil? | ((p: Promise<unknown>) => void) | — | |
claimOnce | (key: string, ttlMs: number) => Promise<boolean> | — | |
claimTurn? | ((chatId: string) => Promise<string | null>) | — | |
releaseTurn? | ((chatId: string, token: string) => Promise<void>) | — | |
threads | SlackThreadStore | — | |
authorizeUser? | function | — | |
authorizeUrl? | function | — | |
onLifecycle? | function | — | |
onStreamMode? | function | — | |
apiOptions? | SlackApiOptions | — |
ts
import { whatsappChannel } from "@intentface/latch-channels/whatsapp";| Option | Type | Default | Details |
|---|---|---|---|
agent | string | — | |
botRef | string | — | |
accessToken | LazyString | — | |
phoneNumberId | LazyString | — | |
appSecret | LazyString | — | |
verifyToken | LazyString | — | |
runtime | ChannelRunOps<P> | — | |
authorizeUser | (user: WhatsappUser) => Promise<AuthResult<P>> | — | |
seen? | ((deliveryKey: string) => Promise<boolean>) | — | |
claimTurn? | ((chatId: string) => Promise<string | null>) | — | |
releaseTurn? | ((chatId: string, token: string) => Promise<void>) | — | |
stashPending? | function | — | |
authorizeUrl? | function | — | |
askState? | AskStateStore | — | |
thread? | ChannelThreadStore | — | |
waitUntil? | ((p: Promise<unknown>) => void) | — | |
apiOptions? | WhatsappApiOptions | — |