feat: platform update

This commit is contained in:
ivannoskov
2026-02-09 13:10:08 +03:00
parent f7597270e5
commit 1826483750
15 changed files with 907 additions and 2796 deletions

View File

@@ -15,9 +15,10 @@ interface CreateChannelInput {
}
interface CreateChannelResult {
channel: {
id: string;
};
index: number;
status: "created" | "updated" | "failed";
channel: Channel | null;
error?: string;
}
interface CreateChannelsResponse {

View File

@@ -13,11 +13,11 @@ export function parseChannelInput(input: string): string | null {
// Patterns for different URL formats
const patterns: RegExp[] = [
/telemetr\.me\/content\/([a-zA-Z0-9_]+)/, // telemetr.me/content/rian_ru
/telemetr\.me\/([a-zA-Z0-9_]+)/, // telemetr.me/rian_ru (alternative)
/t\.me\/([a-zA-Z0-9_]+)/, // t.me/rian_ru or https://t.me/rian_ru
/tgstat\.ru\/channel\/@?([a-zA-Z0-9_]+)/, // tgstat.ru/channel/@rian_ru or tgstat.ru/channel/rian_ru
/tg\.me\/([a-zA-Z0-9_]+)/, // tg.me/rian_ru
/telemetr\.me\/content\/([a-zA-Z0-9_]+)/, // telemetr.me/content/username
/telemetr\.me\/([a-zA-Z0-9_]+)/, // telemetr.me/username (alternative)
/t\.me\/([a-zA-Z0-9_]+)/, // t.me/username or https://t.me/username
/tgstat\.ru\/channel\/@?([a-zA-Z0-9_]+)/, // tgstat.ru/channel/@username or tgstat.ru/channel/username
/tg\.me\/([a-zA-Z0-9_]+)/, // tg.me/username
];
for (const pattern of patterns) {

View File

@@ -56,13 +56,10 @@ export const buildRoute = {
// Creatives
creatives: (workspaceId: string) => `/dashboard/${workspaceId}/creatives`,
creativeNew: (workspaceId: string) => `/dashboard/${workspaceId}/creatives/new`,
creativeDetail: (workspaceId: string, creativeId: string) =>
`/dashboard/${workspaceId}/creatives/${creativeId}`,
// Placements
placements: (workspaceId: string) => `/dashboard/${workspaceId}/placements`,
placementNew: (workspaceId: string) => `/dashboard/${workspaceId}/placements/new`,
placementDetail: (workspaceId: string, placementId: string) =>
`/dashboard/${workspaceId}/placements/${placementId}`,