/**
 * Vendor Registry
 * Manages vendor onboarding, metadata, contracts, and compliance certifications
 */
import { VendorInfo, VendorCategory, VendorTier, VendorStatus, VendorContact, VendorMetadata, Contract, ContractType, ContractStatus, ContractValue, SLA, DataProcessingTerms, SecurityRequirement, ContractDocument, ComplianceCertification, ComplianceFramework, CertificationDocument, PaginatedResponse } from './types';
export interface VendorRegistryConfig {
    storage: VendorStorage;
    auditLogger: AuditLogger;
    notificationService: NotificationService;
    workflowEngine: WorkflowEngine;
}
export declare class VendorRegistry {
    private storage;
    private auditLogger;
    private notificationService;
    private workflowEngine;
    constructor(config: VendorRegistryConfig);
    createVendor(input: CreateVendorInput, actorId: string): Promise<VendorInfo>;
    updateVendor(vendorId: string, updates: UpdateVendorInput, actorId: string): Promise<VendorInfo>;
    getVendor(vendorId: string): Promise<VendorInfo>;
    listVendors(options: ListVendorsOptions): Promise<PaginatedResponse<VendorInfo>>;
    searchVendors(query: string): Promise<VendorInfo[]>;
    deleteVendor(vendorId: string, actorId: string): Promise<void>;
    initiateOnboarding(vendorId: string, actorId: string): Promise<OnboardingWorkflow>;
    completeOnboardingStep(workflowId: string, stepId: string, data: Record<string, unknown>, actorId: string): Promise<OnboardingWorkflow>;
    completeOnboarding(vendorId: string, actorId: string): Promise<VendorInfo>;
    private getOnboardingSteps;
    private validateOnboardingStep;
    private validateBasicInfo;
    private validateSecurityQuestionnaire;
    private validateComplianceVerification;
    private validateContractReview;
    private validatePenetrationTest;
    private validateArchitectureReview;
    private validateIncidentResponse;
    private validateOnsiteAudit;
    private validateExecutiveApproval;
    private getStakeholders;
    createContract(input: CreateContractInput, actorId: string): Promise<Contract>;
    updateContract(contractId: string, updates: UpdateContractInput, actorId: string): Promise<Contract>;
    getContract(contractId: string): Promise<Contract>;
    getVendorContracts(vendorId: string): Promise<Contract[]>;
    activateContract(contractId: string, actorId: string): Promise<Contract>;
    terminateContract(contractId: string, reason: string, actorId: string): Promise<Contract>;
    addContractDocument(contractId: string, document: ContractDocument, actorId: string): Promise<Contract>;
    updateSLA(contractId: string, slaId: string, updates: Partial<SLA>, actorId: string): Promise<Contract>;
    recordSLABreach(contractId: string, slaId: string, breach: SLABreachRecord, actorId: string): Promise<void>;
    private calculateContractStatus;
    private getContractStakeholders;
    addCertification(input: CreateCertificationInput, actorId: string): Promise<ComplianceCertification>;
    updateCertification(certificationId: string, updates: UpdateCertificationInput, actorId: string): Promise<ComplianceCertification>;
    getCertification(certificationId: string): Promise<ComplianceCertification>;
    getVendorCertifications(vendorId: string): Promise<ComplianceCertification[]>;
    verifyCertification(certificationId: string, verificationResult: CertificationVerificationResult, actorId: string): Promise<ComplianceCertification>;
    addCertificationDocument(certificationId: string, document: CertificationDocument, actorId: string): Promise<ComplianceCertification>;
    getExpiringCertifications(daysAhead: number): Promise<ComplianceCertification[]>;
    private calculateCertificationStatus;
    suspendVendor(vendorId: string, reason: string, actorId: string): Promise<VendorInfo>;
    reinstateVendor(vendorId: string, actorId: string): Promise<VendorInfo>;
    initiateOffboarding(vendorId: string, reason: string, actorId: string): Promise<VendorInfo>;
    terminateVendor(vendorId: string, actorId: string): Promise<VendorInfo>;
    private getOffboardingSteps;
    private generateVendorId;
    private generateContractId;
    private generateCertificationId;
    private validateVendorInput;
    private isValidDomain;
}
export interface CreateVendorInput {
    name: string;
    legalName?: string;
    domain: string;
    industry: string;
    category: VendorCategory;
    tier?: VendorTier;
    contactInfo: VendorContact;
    metadata?: Partial<VendorMetadata>;
}
export interface UpdateVendorInput {
    name?: string;
    legalName?: string;
    domain?: string;
    industry?: string;
    category?: VendorCategory;
    tier?: VendorTier;
    status?: VendorStatus;
    contactInfo?: VendorContact;
    metadata?: Partial<VendorMetadata>;
}
export interface ListVendorsOptions {
    page?: number;
    pageSize?: number;
    status?: VendorStatus;
    tier?: VendorTier;
    category?: VendorCategory;
    sortBy?: string;
    sortOrder?: 'asc' | 'desc';
}
export interface CreateContractInput {
    vendorId: string;
    type: ContractType;
    startDate: Date;
    endDate: Date;
    renewalDate?: Date;
    autoRenewal?: boolean;
    value: ContractValue;
    slas?: SLA[];
    dataProcessingTerms?: DataProcessingTerms;
    securityRequirements?: SecurityRequirement[];
}
export interface UpdateContractInput {
    type?: ContractType;
    status?: ContractStatus;
    startDate?: Date;
    endDate?: Date;
    renewalDate?: Date;
    autoRenewal?: boolean;
    value?: ContractValue;
    slas?: SLA[];
    dataProcessingTerms?: DataProcessingTerms;
    securityRequirements?: SecurityRequirement[];
}
export interface CreateCertificationInput {
    vendorId: string;
    framework: ComplianceFramework;
    certificationBody?: string;
    certificateNumber?: string;
    issueDate: Date;
    expirationDate: Date;
    scope: string;
    documents?: CertificationDocument[];
    verificationMethod?: 'api' | 'manual' | 'attestation';
}
export interface UpdateCertificationInput {
    certificationBody?: string;
    certificateNumber?: string;
    issueDate?: Date;
    expirationDate?: Date;
    scope?: string;
}
export interface CertificationVerificationResult {
    valid: boolean;
    method: 'api' | 'manual' | 'attestation';
    reason?: string;
    verifiedAt: Date;
}
export interface SLABreachRecord {
    timestamp: Date;
    metric: string;
    expectedValue: number;
    actualValue: number;
    description: string;
}
export interface OnboardingWorkflow {
    id: string;
    vendorId: string;
    type: string;
    status: 'in_progress' | 'completed' | 'cancelled';
    steps: OnboardingStep[];
    initiatedBy: string;
    initiatedAt: Date;
    completedAt?: Date;
}
export interface OnboardingStep {
    id: string;
    type: string;
    name: string;
    required: boolean;
    status: 'pending' | 'in_progress' | 'completed' | 'skipped';
    data?: Record<string, unknown>;
    completedBy?: string;
    completedAt?: Date;
}
export interface VendorStorage {
    saveVendor(vendor: VendorInfo): Promise<void>;
    getVendor(vendorId: string): Promise<VendorInfo | null>;
    findVendorByDomain(domain: string): Promise<VendorInfo | null>;
    listVendors(options: ListVendorsOptions): Promise<PaginatedResponse<VendorInfo>>;
    searchVendors(query: string): Promise<VendorInfo[]>;
    deleteVendor(vendorId: string): Promise<void>;
    saveContract(contract: Contract): Promise<void>;
    getContract(contractId: string): Promise<Contract | null>;
    getVendorContracts(vendorId: string): Promise<Contract[]>;
    saveSLABreach(contractId: string, slaId: string, breach: SLABreachRecord): Promise<void>;
    saveCertification(certification: ComplianceCertification): Promise<void>;
    getCertification(certificationId: string): Promise<ComplianceCertification | null>;
    getVendorCertifications(vendorId: string): Promise<ComplianceCertification[]>;
    getExpiringCertifications(daysAhead: number): Promise<ComplianceCertification[]>;
}
export interface AuditLogger {
    log(entry: {
        action: string;
        actorId: string;
        resourceType: string;
        resourceId: string;
        details: Record<string, unknown>;
    }): Promise<void>;
}
export interface NotificationService {
    notify(notification: {
        type: string;
        vendorId?: string;
        contractId?: string;
        certificationId?: string;
        workflowId?: string;
        slaId?: string;
        framework?: string;
        reason?: string;
        breach?: SLABreachRecord;
        recipients: string[];
    }): Promise<void>;
}
export interface WorkflowEngine {
    createWorkflow(input: {
        type: string;
        vendorId: string;
        steps: OnboardingStep[];
        initiatedBy: string;
        metadata?: Record<string, unknown>;
    }): Promise<OnboardingWorkflow>;
    getWorkflow(workflowId: string): Promise<OnboardingWorkflow>;
    completeStep(workflowId: string, stepId: string, data: Record<string, unknown>, actorId: string): Promise<OnboardingWorkflow>;
}
export declare class VendorRegistryError extends Error {
    readonly code: string;
    constructor(code: string, message: string);
}
//# sourceMappingURL=vendor-registry.d.ts.map