63 lines
1.8 KiB
TypeScript
63 lines
1.8 KiB
TypeScript
export const CHAT_MODULE_KEY = "chat";
|
|
|
|
export function chatIndexPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/chat`;
|
|
}
|
|
|
|
export function chatNewPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/chat/new`;
|
|
}
|
|
|
|
export function chatMentionsPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/chat/mentions`;
|
|
}
|
|
|
|
export function chatSearchPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/chat/search`;
|
|
}
|
|
|
|
export function chatArchivedPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/chat/archived`;
|
|
}
|
|
|
|
export function chatChannelPath(tenantSlug: string, chatId: string): string {
|
|
return `/${tenantSlug}/chat/${chatId}`;
|
|
}
|
|
|
|
export function chatChannelSettingsPath(tenantSlug: string, chatId: string): string {
|
|
return `/${tenantSlug}/chat/${chatId}/settings`;
|
|
}
|
|
|
|
export function chatChannelInfoPath(tenantSlug: string, chatId: string): string {
|
|
return `/${tenantSlug}/chat/${chatId}/info`;
|
|
}
|
|
|
|
export function chatThreadPath(tenantSlug: string, chatId: string, threadId: string): string {
|
|
return `/${tenantSlug}/chat/${chatId}/thread/${threadId}`;
|
|
}
|
|
|
|
export function chatPinnedPath(tenantSlug: string, chatId: string): string {
|
|
return `/${tenantSlug}/chat/${chatId}/pinned`;
|
|
}
|
|
|
|
export function chatFilesPath(tenantSlug: string, chatId: string): string {
|
|
return `/${tenantSlug}/chat/${chatId}/files`;
|
|
}
|
|
|
|
export function chatAuditPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/settings/compliance/chat`;
|
|
}
|
|
|
|
export function chatAuditAttachmentPath(
|
|
tenantSlug: string,
|
|
chatId: string,
|
|
fileId: string,
|
|
variant: "original" | "preview"
|
|
): string {
|
|
return `/${tenantSlug}/settings/chat/audit/${encodeURIComponent(chatId)}/attachments/${encodeURIComponent(fileId)}/${variant}`;
|
|
}
|
|
|
|
export function chatNotFoundResponse(): Response {
|
|
return new Response("Not Found", { status: 404 });
|
|
}
|