import { IConnection } from "@nestia/fetcher";
import typia, { tags } from "typia";
import { IApiReposCodeScanningAnalyses } from "../../../../structures/IApiReposCodeScanningAnalyses";
import { code_minus_scanning_minus_analysis } from "../../../../structures/code_minus_scanning_minus_analysis";
import { code_minus_scanning_minus_analysis_minus_deletion } from "../../../../structures/code_minus_scanning_minus_analysis_minus_deletion";
/**
 * List code scanning analyses for a repository.
 * Lists the details of all code scanning analyses for a repository,
 * starting with the most recent.
 * The response is paginated and you can use the `page` and `per_page` parameters
 * to list the analyses you're interested in.
 * By default 30 analyses are listed per page.
 *
 * The `rules_count` field in the response give the number of rules
 * that were run in the analysis.
 * For very old analyses this data is not available,
 * and `0` is returned in this field.
 *
 * > [!WARNING]
 * > **Deprecation notice:** The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field.
 *
 * OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
 *
 * @tag code-scanning
 * @path repos/:owner/:repo/code-scanning/analyses
 * @nestia Generated by Nestia - https://github.com/samchon/nestia
 */
export declare function getByOwnerAndRepo(connection: IConnection<getByOwnerAndRepo.Headers>, owner: string, repo: string, query: getByOwnerAndRepo.Query): Promise<getByOwnerAndRepo.Output>;
export declare namespace getByOwnerAndRepo {
    type Headers = IApiReposCodeScanningAnalyses.GetHeader;
    type Query = IApiReposCodeScanningAnalyses.GetQuery;
    type Output = code_minus_scanning_minus_analysis[];
    const METADATA: {
        readonly method: "GET";
        readonly path: "/repos/:owner/:repo/code-scanning/analyses";
        readonly request: null;
        readonly response: {
            readonly type: "application/json";
            readonly encrypted: false;
        };
    };
    const path: (owner: string, repo: string, query: getByOwnerAndRepo.Query) => string;
    const random: (g?: Partial<typia.IRandomGenerator>) => code_minus_scanning_minus_analysis[];
    const simulate: (connection: IConnection<getByOwnerAndRepo.Headers>, owner: string, repo: string, query: getByOwnerAndRepo.Query) => Output;
}
/**
 * Get a code scanning analysis for a repository.
 * Gets a specified code scanning analysis for a repository.
 *
 * The default JSON response contains fields that describe the analysis.
 * This includes the Git reference and commit SHA to which the analysis relates,
 * the datetime of the analysis, the name of the code scanning tool,
 * and the number of alerts.
 *
 * The `rules_count` field in the default response give the number of rules
 * that were run in the analysis.
 * For very old analyses this data is not available,
 * and `0` is returned in this field.
 *
 * This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."
 *
 * - **`application/sarif+json`**: Instead of returning a summary of the analysis, this endpoint returns a subset of the analysis data that was uploaded. The data is formatted as [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). It also returns additional data such as the `github/alertNumber` and `github/alertUrl` properties.
 *
 * OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
 *
 * @param analysis_id The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation.
 * @tag code-scanning
 * @path repos/:owner/:repo/code-scanning/analyses/:analysis_id
 * @nestia Generated by Nestia - https://github.com/samchon/nestia
 */
export declare function getByOwnerAndRepoAndAnalysis_id(connection: IConnection<getByOwnerAndRepoAndAnalysis_id.Headers>, owner: string, repo: string, analysis_id: number & tags.Type<"int32">): Promise<getByOwnerAndRepoAndAnalysis_id.Output>;
export declare namespace getByOwnerAndRepoAndAnalysis_id {
    type Headers = IApiReposCodeScanningAnalyses.GetHeader;
    type Output = code_minus_scanning_minus_analysis;
    const METADATA: {
        readonly method: "GET";
        readonly path: "/repos/:owner/:repo/code-scanning/analyses/:analysis_id";
        readonly request: null;
        readonly response: {
            readonly type: "application/json";
            readonly encrypted: false;
        };
    };
    const path: (owner: string, repo: string, analysis_id: number & tags.Type<"int32">) => string;
    const random: (g?: Partial<typia.IRandomGenerator>) => code_minus_scanning_minus_analysis;
    const simulate: (connection: IConnection<getByOwnerAndRepoAndAnalysis_id.Headers>, owner: string, repo: string, analysis_id: number & tags.Type<"int32">) => Output;
}
/**
 * Delete a code scanning analysis from a repository.
 * Deletes a specified code scanning analysis from a repository.
 *
 * You can delete one analysis at a time.
 * To delete a series of analyses, start with the most recent analysis and work backwards.
 * Conceptually, the process is similar to the undo function in a text editor.
 *
 * When you list the analyses for a repository,
 * one or more will be identified as deletable in the response:
 *
 * ```
 * "deletable": true
 * ```
 *
 * An analysis is deletable when it's the most recent in a set of analyses.
 * Typically, a repository will have multiple sets of analyses
 * for each enabled code scanning tool,
 * where a set is determined by a unique combination of analysis values:
 *
 * * `ref`
 * * `tool`
 * * `category`
 *
 * If you attempt to delete an analysis that is not the most recent in a set,
 * you'll get a 400 response with the message:
 *
 * ```
 * Analysis specified is not deletable.
 * ```
 *
 * The response from a successful `DELETE` operation provides you with
 * two alternative URLs for deleting the next analysis in the set:
 * `next_analysis_url` and `confirm_delete_url`.
 * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis
 * in a set. This is a useful option if you want to preserve at least one analysis
 * for the specified tool in your repository.
 * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool.
 * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`
 * in the 200 response is `null`.
 *
 * As an example of the deletion process,
 * let's imagine that you added a workflow that configured a particular code scanning tool
 * to analyze the code in a repository. This tool has added 15 analyses:
 * 10 on the default branch, and another 5 on a topic branch.
 * You therefore have two separate sets of analyses for this tool.
 * You've now decided that you want to remove all of the analyses for the tool.
 * To do this you must make 15 separate deletion requests.
 * To start, you must find an analysis that's identified as deletable.
 * Each set of analyses always has one that's identified as deletable.
 * Having found the deletable analysis for one of the two sets,
 * delete this analysis and then continue deleting the next analysis in the set until they're all deleted.
 * Then repeat the process for the second set.
 * The procedure therefore consists of a nested loop:
 *
 * **Outer loop**:
 * * List the analyses for the repository, filtered by tool.
 * * Parse this list to find a deletable analysis. If found:
 *
 * **Inner loop**:
 * * Delete the identified analysis.
 * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.
 *
 * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.
 *
 * OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
 *
 * @param analysis_id The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation.
 * @tag code-scanning
 * @path repos/:owner/:repo/code-scanning/analyses/:analysis_id
 * @nestia Generated by Nestia - https://github.com/samchon/nestia
 */
export declare function eraseByOwnerAndRepoAndAnalysis_id(connection: IConnection<eraseByOwnerAndRepoAndAnalysis_id.Headers>, owner: string, repo: string, analysis_id: number & tags.Type<"int32">, query: eraseByOwnerAndRepoAndAnalysis_id.Query): Promise<eraseByOwnerAndRepoAndAnalysis_id.Output>;
export declare namespace eraseByOwnerAndRepoAndAnalysis_id {
    type Headers = IApiReposCodeScanningAnalyses.DeleteHeader;
    type Query = IApiReposCodeScanningAnalyses.DeleteQuery;
    type Output = code_minus_scanning_minus_analysis_minus_deletion;
    const METADATA: {
        readonly method: "DELETE";
        readonly path: "/repos/:owner/:repo/code-scanning/analyses/:analysis_id";
        readonly request: null;
        readonly response: {
            readonly type: "application/json";
            readonly encrypted: false;
        };
    };
    const path: (owner: string, repo: string, analysis_id: number & tags.Type<"int32">, query: eraseByOwnerAndRepoAndAnalysis_id.Query) => string;
    const random: (g?: Partial<typia.IRandomGenerator>) => code_minus_scanning_minus_analysis_minus_deletion;
    const simulate: (connection: IConnection<eraseByOwnerAndRepoAndAnalysis_id.Headers>, owner: string, repo: string, analysis_id: number & tags.Type<"int32">, query: eraseByOwnerAndRepoAndAnalysis_id.Query) => Output;
}
