import { SmrtClassOptions } from '@happyvertical/smrt-core'; import { DevelopmentRequestCollection } from '../collections/DevelopmentRequests.js'; import { ProjectIntegrationCollection } from '../collections/ProjectIntegrations.js'; import { PreviewApproval, PreviewApprovalCollection, ProjectDeliveryEvent, ProjectDeliveryEventCollection } from '../models/delivery-control-plane.js'; import { ProjectIntegration } from '../models/ProjectIntegration.js'; import { DeliveryEventType } from '../types.js'; import { DevelopmentWorkAdapter } from './development-request-service.js'; export interface DeliveryEventSender { send(event: ProjectDeliveryEvent): Promise; } export interface ApprovalPolicy { canApprove(input: { integration: ProjectIntegration; requestId: string; previewId: string; }): Promise; } export declare class ProjectDeliveryService { private readonly integrations; private readonly requests; private readonly events; private readonly approvals; private readonly workAdapter?; private readonly approvalPolicy?; constructor(integrations: ProjectIntegrationCollection, requests: DevelopmentRequestCollection, events: ProjectDeliveryEventCollection, approvals: PreviewApprovalCollection, workAdapter?: DevelopmentWorkAdapter | undefined, approvalPolicy?: ApprovalPolicy | undefined); static create(options?: SmrtClassOptions, dependencies?: { workAdapter?: DevelopmentWorkAdapter; approvalPolicy?: ApprovalPolicy; }): Promise; record(input: { integration: ProjectIntegration; requestId: string; idempotencyKey: string; sequence: number; type: DeliveryEventType; payload: Record; occurredAt?: Date; }): Promise; private applySideEffects; listForIntegration(integration: ProjectIntegration, requestId: string): Promise; deliverPending(sender: DeliveryEventSender, tenantId: string, integrationId?: string): Promise; replay(sender: DeliveryEventSender, integration: ProjectIntegration, afterSequence?: number): Promise; decidePreview(integration: ProjectIntegration, preview: PreviewApproval, input: { approved: boolean; actorRef: string; reason: string; }): Promise; markPreviewStale(preview: PreviewApproval): Promise; private requestForIntegration; private isLatestTerminalEvent; private upsertPreview; } export declare function requireIntegrationCapability(integration: ProjectIntegration, capability: string): void; export declare function requireActiveIntegrationCapability(integrations: ProjectIntegrationCollection, integration: Pick, capability: string): Promise; //# sourceMappingURL=delivery-service.d.ts.map