TorbatYar/frontend/modules/communication/constants/featureRegistry.ts
Mortezakoohjani 0d424c500a feat(platform): complete commercial runtime consolidation
Unify commercial runtime ownership across backend and frontend so platform, experience, and hospitality modules use the shared commercial source of truth.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 11:11:53 +03:30

166 lines
5.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import type { FeatureLockConfig } from "@/modules/communication/types";
/** Backend-active features (from /capabilities features[] + channel status). */
export const SMS_FEATURES = [
"sms",
"provider_framework",
"communication_router",
"template_engine",
"dynamic_contact_sources",
"queue_engine",
"delivery_tracking",
"otp",
"webhooks",
"failover",
"circuit_breaker",
"rate_limiting",
"idempotency",
"metrics",
] as const;
/** Future modules — always locked until backend registers capability. */
export const FUTURE_MODULE_REGISTRY: Record<string, FeatureLockConfig> = {
email: {
feature: "channel_email",
title: "پلتفرم ایمیل",
description: "ارسال ایمیل سازمانی با SMTP، قالب‌های HTML، پیگیری تحویل و failover.",
phase: "Roadmap"
},
whatsapp: {
feature: "channel_whatsapp",
title: "واتساپ بیزینس",
description: "پیام‌رسانی WhatsApp Cloud API با قالب‌های تأیید‌شده و webhook تحویل.",
phase: "Roadmap"
},
telegram: {
feature: "channel_telegram",
title: "تلگرام",
description: "ربات تلگرام برای اعلان‌ها، OTP و پشتیبانی.",
phase: "Roadmap"
},
rubika: {
feature: "channel_rubika",
title: "روبیکا",
description: "پیام‌رسانی اجتماعی بومی با adapter اختصاصی.",
phase: "Roadmap"
},
push: {
feature: "channel_push",
title: "Push Notifications",
description: "اعلان push موبایل و وب via FCM با ثبت توکن دستگاه.",
phase: "Roadmap"
},
voice: {
feature: "channel_voice",
title: "تماس صوتی",
description: "OTP و اعلان صوتی با gateway تلفنی.",
phase: "Roadmap"
},
video: {
feature: "channel_video",
title: "تماس ویدیویی",
description: "جلسات ویدیویی و تماس تصویری برای پشتیبانی.",
phase: "Roadmap"
},
live_chat: {
feature: "live_chat",
title: "Live Chat",
description: "چت زنده وب‌سایت با routing به اپراتور.",
phase: "Roadmap"
},
omnichannel_inbox: {
feature: "omnichannel_inbox",
title: "صندوق ورودی Omnichannel",
description: "تجمیع SMS، ایمیل، چت و شبکه‌های اجتماعی در یک inbox.",
phase: "Roadmap"
},
marketing_automation: {
feature: "marketing_automation",
title: "Marketing Automation",
description: "اتوماسیون کمپین چندمرحله‌ای با trigger و segment.",
phase: "Roadmap"
},
automation_triggers: {
feature: "automation_triggers",
title: "Automation Triggers",
description: "تریگرهای رویداد-محور برای ارسال خودکار پیام.",
phase: "Roadmap"
},
journey_builder: {
feature: "journey_builder",
title: "Journey Builder",
description: "طراح بصری مسیر مشتری با شاخه و wait steps.",
phase: "Roadmap"
},
ai_campaigns: {
feature: "ai_campaigns",
title: "AI Campaigns",
description: "پیشنهاد محتوا و زمان‌بندی هوشمند کمپین.",
phase: "Roadmap"
},
webhook_center: {
feature: "webhook_center",
title: "Webhook Center",
description: "مدیریت متمرکز webhookهای ورودی و خروجی.",
phase: "Roadmap"
},
connectors: {
feature: "third_party_connectors",
title: "Third-party Connectors",
description: "اتصال به سرویس‌های خارجی و marketplace adapters.",
phase: "Roadmap"
},
conversations: {
feature: "customer_conversation_timeline",
title: "Customer Conversation Timeline",
description: "خط زمانی یکپارچه مکالمات مشتری across channels.",
phase: "Roadmap"
},
campaign_orchestrator: {
feature: "campaign_orchestrator",
title: "Campaign Orchestrator",
description: "هماهنگی کمپین‌های چندکاناله با بودجه و cap.",
phase: "Roadmap"
},
notification_center: {
feature: "notification_center",
title: "Notification Center",
description: "مرکز اعلان in-app و out-of-app برای tenant users.",
phase: "Roadmap"
},
template_categories: {
feature: "template_categories",
title: "دسته‌بندی قالب‌ها",
description: "سازماندهی قالب‌ها در دسته‌های قابل جستجو.",
phase: "Roadmap"
},
roles: {
feature: "communication_roles",
title: "نقش‌های ارتباطات",
description: "مدیریت نقش اختصاصی Communication Platform.",
phase: "Roadmap"
},
audit: {
feature: "communication_audit_ui",
title: "ممیزی ارتباطات",
description: "رابط کاربری جستجوی audit log (backend موجود — UI در roadmap).",
phase: "Roadmap"
},
api_keys: {
feature: "communication_api_keys",
title: "کلیدهای API",
description: "صدور و چرخش کلید API برای یکپارچه‌سازی سرویس-به-سرویس.",
phase: "Roadmap"
},
integrations_hub: {
feature: "integrations_hub",
title: "Integrations",
description: "مرکز یکپارچه‌سازی با ماژول‌های TorbatYar.",
phase: "Roadmap"
}
};
export function getFutureModule(key: string): FeatureLockConfig | undefined {
return FUTURE_MODULE_REGISTRY[key];
}