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

export interface paths {
    "/envs": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** Get the environment variables */
        get: {
            parameters: {
                query?: never;
                header?: never;
                path?: never;
                cookie?: never;
            };
            requestBody?: never;
            responses: {
                /** @description Environment variables */
                200: {
                    headers: {
                        [name: string]: unknown;
                    };
                    content: {
                        "application/json": components["schemas"]["EnvVars"];
                    };
                };
            };
        };
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/files": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** Download a file */
        get: {
            parameters: {
                query?: {
                    /** @description Path to the file, URL encoded. Can be relative to user's home directory. */
                    path?: components["parameters"]["FilePath"];
                    /** @description Signature used for file access permission verification. */
                    signature?: components["parameters"]["Signature"];
                    /** @description Signature expiration used for defining the expiration time of the signature. */
                    signature_expiration?: components["parameters"]["SignatureExpiration"];
                    /** @description User used for setting the owner, or resolving relative paths. */
                    username?: components["parameters"]["User"];
                };
                header?: never;
                path?: never;
                cookie?: never;
            };
            requestBody?: never;
            responses: {
                200: components["responses"]["DownloadSuccess"];
                400: components["responses"]["InvalidPath"];
                401: components["responses"]["InvalidUser"];
                404: components["responses"]["FileNotFound"];
                500: components["responses"]["InternalServerError"];
            };
        };
        put?: never;
        /**
         * Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.
         * @description Any request header of the form `X-Metadata-<key>: <value>` is persisted
         *     as a user-defined extended attribute on the uploaded file. The
         *     `X-Metadata-` prefix is stripped and the remaining header name is
         *     lowercased to form the metadata key; the resulting map is returned on
         *     `EntryInfo` lookups (e.g. `Stat`, `ListDir`).
         *
         *     Each upload replaces the file's metadata with the keys provided in
         *     that request: keys previously stored but absent from the new request
         *     are removed, and an upload that sends no `X-Metadata-*` header clears
         *     all existing metadata.
         *
         *     Both keys and values must be printable US-ASCII (bytes `0x20`-`0x7E`)
         *     and are rejected with HTTP 400 otherwise. Each key is capped at 246
         *     bytes (the Linux VFS xattr-name limit minus the namespace prefix), and
         *     the combined size of all metadata on a file (keys plus values, with the
         *     namespace prefix counted per key) is capped at 4096 bytes to stay within
         *     the filesystem's per-inode xattr budget. Multiple files in a single
         *     multipart upload receive the same metadata. If the same
         *     `X-Metadata-<key>` header is sent more than once, only the first
         *     value is used.
         *
         */
        post: {
            parameters: {
                query?: {
                    /** @description Path to the file, URL encoded. Can be relative to user's home directory. */
                    path?: components["parameters"]["FilePath"];
                    /** @description Signature used for file access permission verification. */
                    signature?: components["parameters"]["Signature"];
                    /** @description Signature expiration used for defining the expiration time of the signature. */
                    signature_expiration?: components["parameters"]["SignatureExpiration"];
                    /** @description User used for setting the owner, or resolving relative paths. */
                    username?: components["parameters"]["User"];
                };
                header?: never;
                path?: never;
                cookie?: never;
            };
            requestBody: components["requestBodies"]["File"];
            responses: {
                200: components["responses"]["UploadSuccess"];
                400: components["responses"]["InvalidPath"];
                401: components["responses"]["InvalidUser"];
                500: components["responses"]["InternalServerError"];
                507: components["responses"]["NotEnoughDiskSpace"];
            };
        };
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/health": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** Check the health of the service */
        get: {
            parameters: {
                query?: never;
                header?: never;
                path?: never;
                cookie?: never;
            };
            requestBody?: never;
            responses: {
                /** @description The service is healthy */
                204: {
                    headers: {
                        [name: string]: unknown;
                    };
                    content?: never;
                };
            };
        };
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/init": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /** Set initial vars, ensure the time and metadata is synced with the host */
        post: {
            parameters: {
                query?: never;
                header?: never;
                path?: never;
                cookie?: never;
            };
            requestBody?: {
                content: {
                    "application/json": {
                        /** @description Access token for secure access to envd service */
                        accessToken?: string;
                        /** @description The default user to use for operations */
                        defaultUser?: string;
                        /** @description The default working directory to use for operations */
                        defaultWorkdir?: string;
                        envVars?: components["schemas"]["EnvVars"];
                        /** @description IP address of the hyperloop server to connect to */
                        hyperloopIP?: string;
                        /**
                         * Format: date-time
                         * @description The current timestamp in RFC3339 format
                         */
                        timestamp?: string;
                    };
                };
            };
            responses: {
                /** @description Env vars set, the time and metadata is synced with the host */
                204: {
                    headers: {
                        [name: string]: unknown;
                    };
                    content?: never;
                };
            };
        };
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/metrics": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** Get the stats of the service */
        get: {
            parameters: {
                query?: never;
                header?: never;
                path?: never;
                cookie?: never;
            };
            requestBody?: never;
            responses: {
                /** @description The resource usage metrics of the service */
                200: {
                    headers: {
                        [name: string]: unknown;
                    };
                    content: {
                        "application/json": components["schemas"]["Metrics"];
                    };
                };
            };
        };
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
}
export type webhooks = Record<string, never>;
export interface components {
    schemas: {
        EntryInfo: {
            /** @description User-defined metadata stored as extended attributes on the file. */
            metadata?: {
                [key: string]: string;
            };
            /** @description Name of the file */
            name: string;
            /** @description Path to the file */
            path: string;
            /**
             * @description Type of the file
             * @enum {string}
             */
            type: "file";
        };
        /** @description Environment variables to set */
        EnvVars: {
            [key: string]: string;
        };
        Error: {
            /** @description Error code */
            code: number;
            /** @description Error message */
            message: string;
        };
        /** @description Resource usage metrics */
        Metrics: {
            /** @description Number of CPU cores */
            cpu_count?: number;
            /**
             * Format: float
             * @description CPU usage percentage
             */
            cpu_used_pct?: number;
            /** @description Total disk space in bytes */
            disk_total?: number;
            /** @description Used disk space in bytes */
            disk_used?: number;
            /** @description Total virtual memory in bytes */
            mem_total?: number;
            /** @description Used virtual memory in bytes */
            mem_used?: number;
            /**
             * Format: int64
             * @description Unix timestamp in UTC for current sandbox time
             */
            ts?: number;
        };
    };
    responses: {
        /** @description Entire file downloaded successfully. */
        DownloadSuccess: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/octet-stream": string;
            };
        };
        /** @description File not found */
        FileNotFound: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/json": components["schemas"]["Error"];
            };
        };
        /** @description Internal server error */
        InternalServerError: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/json": components["schemas"]["Error"];
            };
        };
        /** @description Invalid path */
        InvalidPath: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/json": components["schemas"]["Error"];
            };
        };
        /** @description Invalid user */
        InvalidUser: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/json": components["schemas"]["Error"];
            };
        };
        /** @description Not enough disk space */
        NotEnoughDiskSpace: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/json": components["schemas"]["Error"];
            };
        };
        /** @description The file was uploaded successfully. */
        UploadSuccess: {
            headers: {
                [name: string]: unknown;
            };
            content: {
                "application/json": components["schemas"]["EntryInfo"][];
            };
        };
    };
    parameters: {
        /** @description Path to the file, URL encoded. Can be relative to user's home directory. */
        FilePath: string;
        /** @description Signature used for file access permission verification. */
        Signature: string;
        /** @description Signature expiration used for defining the expiration time of the signature. */
        SignatureExpiration: number;
        /** @description User used for setting the owner, or resolving relative paths. */
        User: string;
    };
    requestBodies: {
        File: {
            content: {
                "multipart/form-data": {
                    /** Format: binary */
                    file?: string;
                };
            };
        };
    };
    headers: never;
    pathItems: never;
}
export type $defs = Record<string, never>;
export type operations = Record<string, never>;
