import type { BoardRegistry } from '../../boards/index.js'; import type { FactoryProjectsStorage } from '../../storage/domains/projects/base.js'; import type { WorkItemsStorage } from '../../storage/domains/work-items/base.js'; import type { IntegrationContext } from '../base.js'; import type { IncidentioEventRules } from './default-rules.js'; export interface IncidentioIssueIngress { /** Stable item reference — the prefixed incident.io follow-up id (`incidentio:follow-up:`). */ id: string; identifier: string; title: string; url: string; state: string; stateType: string; priorityLabel: string; assignee: string | null; /** Display name of the follow-up creator, when available. */ author: string | null; /** Reference of the incident this follow-up belongs to, when available. */ incident: string | null; labels: string[]; createdAt: string; updatedAt: string; /** incident.io source the follow-up was read from; resolves the bound board via `intakeBoards`. */ sourceId?: string | null; } export interface IncidentioRulesOptions { projects: Pick; storage: WorkItemsStorage; configVersion: string; boards: BoardRegistry; incidentioRules: IncidentioEventRules; } export interface IncidentioRulesIngress { orgId: string; userId: string; factoryProjectId: string; issues: IncidentioIssueIngress[]; /** Board id per bound incident.io source id, from the project's intake bindings. */ intakeBoards?: Readonly>; } type IngressStatus = 'committed' | 'replayed' | 'missing'; export declare class IncidentioRules { #private; private readonly options; constructor(options: IncidentioRulesOptions); ingest(input: IncidentioRulesIngress): Promise<{ status: IngressStatus; ingested: number; }>; } export declare function attachIncidentioRules(incidentio: { readonly rules: IncidentioEventRules; }, context: IntegrationContext): ((input: IncidentioRulesIngress) => Promise) | undefined; export {}; //# sourceMappingURL=rules.d.ts.map