Files
HiveGrid-Wireframes/03 Quellen und Referenzen/hivegrid-cloud/apps/web/app/modules/calendar/routes/calendarRoutePaths.ts
T
2026-07-08 16:15:37 +02:00

34 lines
1.5 KiB
TypeScript

// AK-P16a · pure client-safe route-path builders for the calendar module. Loaders
// build these and pass them into the VMs so the VMs stay routing-agnostic (mirrors
// integrationsRoutePaths). Calendar reuses the `integrations` tenant-connector
// module key (calendar is an Apps-Engine integration; see calendarAccess.server).
export { INTEGRATIONS_MODULE_KEY as CALENDAR_MODULE_KEY } from "~/utils/integrations/integrationsRoutePaths";
/** The calendar grid view (all sources). */
export function calendarViewPath(tenantSlug: string): string {
return `/${tenantSlug}/calendar`;
}
/** The calendar connections settings list. */
export function calendarConnectionsPath(tenantSlug: string): string {
return `/${tenantSlug}/settings/integrations/calendar`;
}
/** A single connection's detail (selected calendars, status, conflict log). */
export function calendarConnectionDetailPath(tenantSlug: string, connectionId: string): string {
return `/${tenantSlug}/settings/integrations/calendar/${connectionId}`;
}
/**
* The OAuth callback URI. NOT tenant-scoped: EXT-10 registered exactly
* `/integrations/google/oauth/callback` at the app root (Google redirects here);
* the signed `state` carries the tenant + user.
*/
export const GOOGLE_OAUTH_CALLBACK_PATH = "/integrations/google/oauth/callback";
/** 404 helper (Bauprinzip A.5.3 — permission/owner miss renders 404, not 403). */
export function notFoundResponse(): Response {
return new Response("Not Found", { status: 404 });
}