feat: platform update
This commit is contained in:
@@ -15,9 +15,10 @@ interface CreateChannelInput {
|
||||
}
|
||||
|
||||
interface CreateChannelResult {
|
||||
channel: {
|
||||
id: string;
|
||||
};
|
||||
index: number;
|
||||
status: "created" | "updated" | "failed";
|
||||
channel: Channel | null;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
interface CreateChannelsResponse {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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}`,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user