Defines shared channel type enums and validation schemas to ensure type safety across database, business logic, and UI layers.
// Source: https://github.com/ChatbotXIO/ChatbotX | License: MIT | Copyright 2024-present AhaChat LLC
// Provided via justclaw.it.com; keep this notice with the code.
import { z } from "zod"
/**
* The channels a workspace can talk to a contact through.
*
* See this package's README ("Exception: cross-cutting product enums") for why
* a product enum lives in a generic-utils package: `@chatbotx.io/flow-config`
* needs it without depending on `@chatbotx.io/database`. Before this move those
* tables had to fall back to `Record<string, ...>`, so a typo'd or renamed
* channel silently missed its entry instead of failing to compile.
*
* `@chatbotx.io/database/partials` re-exports this, so the many existing
* importers there keep working unchanged.
*
* Adding a value here cascades: gr
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key