30 lines
1.4 KiB
TypeScript
30 lines
1.4 KiB
TypeScript
// R-P5 (P5) §P3 — pure route-path builders for Apps-Engine URLs. Loaders build
|
|
// these and pass them into the VMs so the VMs stay routing-agnostic.
|
|
//
|
|
// NOTE: the designer brief writes "/admin/integrations"; since DataConnection is
|
|
// TENANT-scoped (tenant connector + integrations.* tenant permission), the screens
|
|
// live under the tenant app at /<tenant>/integrations. The platform-admin drift
|
|
// warning is a separate P19 surface. (Confirm with David in the D-P5 delta.)
|
|
|
|
// Tenant connector module key. It lives in this client-safe module (not in
|
|
// integrationsAccess.server) so a route `handle` export can reference it without
|
|
// dragging the server-only access guard into the client bundle (RR code-splitting
|
|
// only strips loader/action/middleware/headers, not `handle`).
|
|
export const INTEGRATIONS_MODULE_KEY = "integrations";
|
|
|
|
export function integrationsCatalogPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/integrations`;
|
|
}
|
|
|
|
export function integrationsAppPath(tenantSlug: string, appKey: string): string {
|
|
return `/${tenantSlug}/integrations/${appKey}`;
|
|
}
|
|
|
|
export function integrationsSyncsPath(tenantSlug: string, appKey: string, connectionId: string): string {
|
|
return `/${tenantSlug}/integrations/${appKey}/${connectionId}/syncs`;
|
|
}
|
|
|
|
export function integrationsSyncRunPath(tenantSlug: string, appKey: string, connectionId: string, runId: string): string {
|
|
return `/${tenantSlug}/integrations/${appKey}/${connectionId}/syncs/${runId}`;
|
|
}
|