import type { FastifyInstance } from "fastify"; import { type OrgGraph, type ResourceEntry } from "@jgalego/teamapi-core"; export interface ResourceRouteOptions { tag: string; /** URL path segment under `/teams/:id/`, e.g. `"agents"` -> `/teams/:id/agents`. */ collectionPath: string; /** Singular, human-readable label used in generated summaries/descriptions/error messages. */ resourceLabel: string; listInTeam: (graph: OrgGraph, teamId: string) => T[]; getById: (graph: OrgGraph, teamId: string, resourceId: string) => T | undefined; listAcrossOrg: (graph: OrgGraph, search?: string) => ResourceEntry[]; } /** * Registers the read-only list/detail routes shared by every AI-native resource domain (agents, * memory, specifications, prompts, playbooks, policies, knowledge base, workflows, sessions): * `GET /` (org-wide, searchable), `GET /teams/:id/` (one team's * declared resources), and `GET /teams/:id//:resourceId` (one resource). * * Factored out once ten near-identical domains made the copy-pasted version of this genuinely * worse than a shared factory — steering documents are the one domain that *doesn't* use this * (its `effective=true` inheritance view needs a bespoke query param the others don't have). */ export declare function registerResourceRoutes(app: FastifyInstance, opts: ResourceRouteOptions): void; //# sourceMappingURL=resource-collection.d.ts.map