import { Duration } from 'aws-cdk-lib';
import { Metric, MetricOptions } from 'aws-cdk-lib/aws-cloudwatch';
import { IGrantable, IPrincipal } from 'aws-cdk-lib/aws-iam';
import { IFunction } from 'aws-cdk-lib/aws-lambda';
import { RetentionDays } from 'aws-cdk-lib/aws-logs';
import { IBucket } from 'aws-cdk-lib/aws-s3';
import { IQueue } from 'aws-cdk-lib/aws-sqs';
import { Construct } from 'constructs';
import { Repository } from '../../codeartifact/repository';
import { Monitoring } from '../../monitoring';
import { OverviewDashboard } from '../../overview-dashboard';
import { PackageTagConfig } from '../../package-tag';
import type { PackageLinkConfig } from '../../webapp';
import { Orchestration } from '../orchestration';
export interface IngestionProps {
    /**
     * The bucket in which ingested objects are due to be inserted.
     */
    readonly bucket: IBucket;
    /**
     * The CodeArtifact repository to which packages should be published. This is
     * the ConstructHub internal CodeArtifact repository, if one exists.
     */
    readonly codeArtifact?: Repository;
    /**
     * The monitoring handler to register alarms with.
     */
    readonly monitoring: Monitoring;
    /**
     * The backend orchestration to invoke once the package metadata has been
     * successfully registered.
     */
    readonly orchestration: Orchestration;
    readonly overviewDashboard: OverviewDashboard;
    /**
     * How long to retain the CloudWatch logs.
     *
     * @default RetentionDays.TEN_YEARS
     */
    readonly logRetention?: RetentionDays;
    /**
     * Configuration for custom package page links.
     */
    readonly packageLinks?: PackageLinkConfig[];
    /**
     * Serialized configuration for custom package tags.
     */
    readonly packageTags?: PackageTagConfig[];
    /**
     * How frequently all packages should get fully reprocessed.
     *
     * See the operator runbook for more information about reprocessing.
     * @see https://github.com/cdklabs/construct-hub/blob/main/docs/operator-runbook.md
     *
     * @default - never
     */
    readonly reprocessFrequency?: Duration;
    /**
     * Package versions that have been published before this time window will not be reprocessed.
     *
     * @default Duration.days(90)
     */
    readonly reprocessAge?: Duration;
    /**
     * The SQS queue where new package will be added to fetch release notes.
     */
    readonly releaseNotesFetchQueue?: IQueue;
}
/**
 * The ingestion function receives messages from discovery integrations and
 * processes their payloads into the provided S3 Bucket.
 *
 * This function is also an `IGrantable`, so that it can be granted permissions
 * to read from the source S3 buckets.
 */
export declare class Ingestion extends Construct implements IGrantable {
    readonly grantPrincipal: IPrincipal;
    /**
     * The SQS queue that triggers the ingestion function.
     */
    readonly queue: IQueue;
    /**
     * The ingestion dead letter queue, which will hold messages that failed
     * ingestion one too many times, so that poison pills don't endlessly consume
     * resources.
     */
    readonly deadLetterQueue: IQueue;
    readonly queueRetentionPeriod: Duration;
    readonly function: IFunction;
    constructor(scope: Construct, id: string, props: IngestionProps);
    metricFoundLicenseFile(opts?: MetricOptions): Metric;
    metricIneligibleLicense(opts?: MetricOptions): Metric;
    metricInvalidAssembly(opts?: MetricOptions): Metric;
    metricInvalidTarball(opts?: MetricOptions): Metric;
    /**
     * This metrics is the total count of packages that were rejected due to
     * mismatched identity (name, version, license) between the `package.json`
     * file and the `.jsii` attribute.
     */
    metricMismatchedIdentityRejections(opts?: MetricOptions): Metric;
}
