Add initial Portal version
This commit is contained in:
104
src/lib/packages.ts
Normal file
104
src/lib/packages.ts
Normal file
@@ -0,0 +1,104 @@
|
||||
export interface PackageDef {
|
||||
id: string;
|
||||
name: string;
|
||||
descriptionKey: string; // i18n key
|
||||
icon: string; // emoji or lucide icon name
|
||||
requiresSecrets: boolean;
|
||||
secrets?: {
|
||||
key: string;
|
||||
labelKey: string;
|
||||
placeholderKey: string;
|
||||
}[];
|
||||
customerInstructionsKey?: string; // i18n key for how-to
|
||||
disclaimerKey?: string; // i18n key
|
||||
category: "channel" | "skill";
|
||||
}
|
||||
|
||||
export const PACKAGE_CATALOG: PackageDef[] = [
|
||||
{
|
||||
id: "telegram",
|
||||
name: "Telegram",
|
||||
descriptionKey: "packages.telegram.description",
|
||||
icon: "MessageCircle",
|
||||
requiresSecrets: true,
|
||||
secrets: [
|
||||
{
|
||||
key: "bot-token",
|
||||
labelKey: "packages.telegram.botTokenLabel",
|
||||
placeholderKey: "packages.telegram.botTokenPlaceholder",
|
||||
},
|
||||
],
|
||||
customerInstructionsKey: "packages.telegram.instructions",
|
||||
disclaimerKey: "packages.telegram.disclaimer",
|
||||
category: "channel",
|
||||
},
|
||||
{
|
||||
id: "discord",
|
||||
name: "Discord",
|
||||
descriptionKey: "packages.discord.description",
|
||||
icon: "Hash",
|
||||
requiresSecrets: true,
|
||||
secrets: [
|
||||
{
|
||||
key: "bot-token",
|
||||
labelKey: "packages.discord.botTokenLabel",
|
||||
placeholderKey: "packages.discord.botTokenPlaceholder",
|
||||
},
|
||||
],
|
||||
customerInstructionsKey: "packages.discord.instructions",
|
||||
disclaimerKey: "packages.discord.disclaimer",
|
||||
category: "channel",
|
||||
},
|
||||
{
|
||||
id: "email",
|
||||
name: "Email",
|
||||
descriptionKey: "packages.email.description",
|
||||
icon: "Mail",
|
||||
requiresSecrets: true,
|
||||
secrets: [
|
||||
{
|
||||
key: "smtp-host",
|
||||
labelKey: "packages.email.smtpHostLabel",
|
||||
placeholderKey: "packages.email.smtpHostPlaceholder",
|
||||
},
|
||||
{
|
||||
key: "smtp-user",
|
||||
labelKey: "packages.email.smtpUserLabel",
|
||||
placeholderKey: "packages.email.smtpUserPlaceholder",
|
||||
},
|
||||
{
|
||||
key: "smtp-password",
|
||||
labelKey: "packages.email.smtpPasswordLabel",
|
||||
placeholderKey: "packages.email.smtpPasswordPlaceholder",
|
||||
},
|
||||
{
|
||||
key: "imap-host",
|
||||
labelKey: "packages.email.imapHostLabel",
|
||||
placeholderKey: "packages.email.imapHostPlaceholder",
|
||||
},
|
||||
],
|
||||
customerInstructionsKey: "packages.email.instructions",
|
||||
disclaimerKey: "packages.email.disclaimer",
|
||||
category: "channel",
|
||||
},
|
||||
{
|
||||
id: "web-search",
|
||||
name: "Web Search",
|
||||
descriptionKey: "packages.webSearch.description",
|
||||
icon: "Search",
|
||||
requiresSecrets: false,
|
||||
category: "skill",
|
||||
},
|
||||
{
|
||||
id: "document-processing",
|
||||
name: "Document Processing",
|
||||
descriptionKey: "packages.documentProcessing.description",
|
||||
icon: "FileText",
|
||||
requiresSecrets: false,
|
||||
category: "skill",
|
||||
},
|
||||
];
|
||||
|
||||
export function getPackageDef(id: string): PackageDef | undefined {
|
||||
return PACKAGE_CATALOG.find((p) => p.id === id);
|
||||
}
|
||||
Reference in New Issue
Block a user