/**
 * This file was auto-generated by openapi-typescript.
 * Do not make direct changes to the file.
 */

export interface paths {
    "/packages": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /**
         * Retrieve package information
         * @description Fetch packages from the ALHP system. You can filter results using query parameters.
         */
        get: operations["getPackages"];
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/stats": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** Retrieve general build statistics */
        get: operations["getStats"];
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
}
export type webhooks = Record<string, never>;
export interface components {
    schemas: {
        Package: {
            /**
             * @description The base name of the package
             * @example linux-zen
             */
            pkgbase?: string;
            /**
             * @description Repository from which the package originates
             * @example extra-x86-64-v4
             */
            repo?: string;
            /**
             * @description List of package names split from the base package
             * @example [
             *       "linux-zen",
             *       "linux-zen-headers",
             *       "linux-zen-docs"
             *     ]
             */
            split_packages?: string[];
            /**
             * @description Current build or repository status of the package
             * @example latest
             * @enum {string}
             */
            status?: "latest" | "failed" | "built" | "skipped" | "delayed" | "building" | "signing" | "unknown" | "queued";
            /**
             * @description Reason for skipping the package build (if any)
             * @example blacklisted
             */
            skip_reason?: string;
            /**
             * @description Link Time Optimization (LTO) status for the package
             * @example enabled
             * @enum {string}
             */
            lto?: "enabled" | "unknown" | "disabled" | "auto_disabled";
            /**
             * @description Availability of debug symbols in the package
             * @example available
             * @enum {string}
             */
            debug_symbols?: "available" | "unknown" | "not_available";
            /**
             * @description Version available in the official Arch Linux repositories
             * @example 1.3.4-2
             */
            arch_version?: string;
            /**
             * @description Version available in ALHP repositories (may be empty if not built)
             * @example 1.3.4-2.1
             */
            repo_version?: string;
            /**
             * @description Date and time when the package was built (RFC1123 format)
             * @example Fri, 15 Dec 2023 03:43:11 UTC
             */
            build_date?: string;
            /**
             * @description Peak memory usage during the build process (human-readable format)
             * @example 5 GB
             */
            peak_mem?: string;
        };
        /** @description Aggregated statistics across all packages */
        Stats: {
            /**
             * Format: int64
             * @description Number of packages that failed to build
             * @example 17
             */
            failed?: number;
            /**
             * Format: int64
             * @description Number of packages that were skipped
             * @example 29
             */
            skipped?: number;
            /**
             * Format: int64
             * @description Number of packages that are up-to-date
             * @example 743
             */
            latest?: number;
            /**
             * Format: int64
             * @description Number of packages currently in the build queue
             * @example 5
             */
            queued?: number;
            /**
             * Format: int64
             * @description Number of packages currently building
             * @example 11
             */
            building?: number;
            /**
             * Format: int64
             * @description Latest mirror timestamp to detect outdated mirrors (Unix timestamp)
             * @example 1702612991
             */
            last_mirror_timestamp?: number;
            /** @description LTO status summary across all packages */
            lto?: {
                /**
                 * Format: int64
                 * @description Number of packages with LTO enabled
                 * @example 532
                 */
                enabled?: number;
                /**
                 * Format: int64
                 * @description Number of packages with LTO explicitly disabled
                 * @example 203
                 */
                disabled?: number;
                /**
                 * Format: int64
                 * @description Number of packages with unknown LTO status
                 * @example 11
                 */
                unknown?: number;
            };
        };
    };
    responses: never;
    parameters: never;
    requestBodies: never;
    headers: never;
    pathItems: never;
}
export type $defs = Record<string, never>;
export interface operations {
    getPackages: {
        parameters: {
            query: {
                /** @description Filter by package status. Accepts multiple values via repeated parameters. */
                status?: ("latest" | "failed" | "built" | "skipped" | "delayed" | "building" | "signing" | "unknown" | "queued")[];
                /** @description Filter by the base package name (`pkgbase`). This is often the main identifier of a package group. */
                pkgbase?: string;
                /** @description If present, matches the `pkgbase` exactly. If not provided, allows partial matches. */
                exact?: boolean;
                /** @description Filter by repository name. */
                repo?: string;
                /** @description Number of results to skip (for pagination). */
                offset: number;
                /** @description Maximum number of results to return. */
                limit: number;
            };
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Package data retrieved successfully */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        packages?: components["schemas"]["Package"][];
                        /**
                         * Format: int64
                         * @description Total number of matching packages
                         * @example 1423
                         */
                        total?: number;
                        /**
                         * Format: int64
                         * @example 0
                         */
                        offset?: number;
                        /**
                         * Format: int64
                         * @example 25
                         */
                        limit?: number;
                    };
                };
            };
            /** @description No packages found matching the specified filters */
            404: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
            /** @description Internal server error occurred */
            500: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
        };
    };
    getStats: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description General statistics retrieved successfully */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Stats"];
                };
            };
            /** @description Internal server error occurred */
            500: {
                headers: {
                    [name: string]: unknown;
                };
                content?: never;
            };
        };
    };
}
