Mirror of https://github.com/roostorg/coop github.com/roostorg/coop
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 31 lines 1.3 kB view raw
1import { type Route } from '../utils/route-helpers.js'; 2import ActionRoutes from './action/ActionRoutes.js'; 3import ContentRoutes from './content/ContentRoutes.js'; 4import GDPRRoutes from './gdpr/gdprRoutes.js'; 5import IntegrationLogosRoutes from './integration_logos/IntegrationLogosRoutes.js'; 6import ItemRoutes from './items/ItemRoutes.js'; 7import PoliciesRoutes from './policies/PoliciesRoutes.js'; 8import ReportingRoutes from './reporting/ReportingRoutes.js'; 9import UserScoresRoutes from './user_scores/UserScoresRoutes.js'; 10 11/** Array of routes accepted by a controller. Uses wide types so GET (no body) and POST routes both fit. */ 12// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Controller accepts any route shape 13export type ControllerRouteList = Route<any, any>[]; 14 15export type Controller = { 16 // Path prefix expected to always start with a slash, given how we're 17 // concatenating it with `/api/v1` in our server setup. 18 pathPrefix: `/${string}`; 19 routes: ControllerRouteList; 20}; 21 22export default { 23 Items: ItemRoutes, 24 Content: ContentRoutes, 25 Reporting: ReportingRoutes, 26 Policies: PoliciesRoutes, 27 UserScores: UserScoresRoutes, 28 Actions: ActionRoutes, 29 GDPR: GDPRRoutes, 30 IntegrationLogos: IntegrationLogosRoutes, 31} satisfies { [key: string]: Controller };