import type { ApiRoute } from '@mastra/core/server'; import { z } from 'zod'; import type { BoardRegistry } from '../boards/index.js'; import type { Intake } from '../capabilities/intake.js'; import type { AuditEmitter } from '../storage/domains/audit/domain.js'; import type { IntakeConfig, IntakeStorage } from '../storage/domains/intake/base.js'; import type { WorkItemsStorage } from '../storage/domains/work-items/base.js'; import type { RouteDependencies } from './route.js'; import { Route } from './route.js'; export interface IntakeIntegration { id: string; intake: Pick; } export interface IntakeRoutesDeps extends RouteDependencies { audit: AuditEmitter; /** Intake selection domain handle. */ intake: IntakeStorage; /** Factory project domain handle, used to validate binding targets. */ projects?: { get(input: { orgId: string; id: string; }): Promise; }; integrations?: IntakeIntegration[]; /** Installed boards, used to validate binding targets. Absent means only legacy routing is accepted. */ boardRegistry?: BoardRegistry; /** Work items domain handle; when present, rebinding a source to another board moves its resting cards. */ workItems?: Pick; } /** One integration that failed while the rest of the aggregation succeeded. */ export interface IntakeIntegrationFailure { integrationId: string; message: string; } interface ParsedBinding { integrationId: string; sourceId: string; factoryProjectId: string | null; /** Installed board target; `null`/omitted keeps legacy source-type routing. */ board: string | null; } /** Validate a binding request body, rejecting unknown shapes. */ export declare function parseIntakeBinding(body: unknown): ParsedBinding | null; declare const labelRouteBodySchema: z.ZodObject<{ factoryProjectId: z.ZodString; integrationId: z.ZodString; label: z.ZodPipe>; board: z.ZodPipe>, z.ZodTransform>; }, z.core.$strip>; type ParsedLabelRoute = z.output; /** Validate a label-route request body, rejecting unknown shapes. */ export declare function parseIntakeLabelRoute(body: unknown): ParsedLabelRoute | null; /** Validate a request body into an intake config, rejecting unknown shapes. */ export declare function parseIntakeConfig(body: unknown): IntakeConfig | null; export declare class IntakeRoutes extends Route { #private; routes(): ApiRoute[]; } export {}; //# sourceMappingURL=intake.d.ts.map