import { IConnection } from "@nestia/fetcher";
import typia from "typia";
import { IApiReposDeployments } from "../../../structures/IApiReposDeployments";
import { deployment } from "../../../structures/deployment";
import { body } from "../../../structures/body";
export * as statuses from "./statuses";
/**
 * List deployments.
 * Simple filtering of deployments is available via query parameters:
 *
 * @tag repos
 * @path repos/:owner/:repo/deployments
 * @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 = IApiReposDeployments.GetHeader;
    type Query = IApiReposDeployments.GetQuery;
    type Output = deployment[];
    const METADATA: {
        readonly method: "GET";
        readonly path: "/repos/:owner/:repo/deployments";
        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>) => deployment[];
    const simulate: (connection: IConnection<getByOwnerAndRepo.Headers>, owner: string, repo: string, query: getByOwnerAndRepo.Query) => Output;
}
/**
 * Create a deployment.
 * Deployments offer a few configurable parameters with certain defaults.
 *
 * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them
 * before we merge a pull request.
 *
 * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have
 * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter
 * makes it easier to track which environments have requested deployments. The default environment is `production`.
 *
 * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If
 * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,
 * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will
 * return a failure response.
 *
 * By default, [commit statuses](https://docs.github.com/rest/commits/statuses) for every submitted context must be in a `success`
 * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to
 * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do
 * not require any contexts or create any commit statuses, the deployment will always succeed.
 *
 * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text
 * field that will be passed on when a deployment event is dispatched.
 *
 * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might
 * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an
 * application with debugging enabled.
 *
 * Merged branch response:
 *
 * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating
 * a deployment. This auto-merge happens when:
 * *   Auto-merge option is enabled in the repository
 * *   Topic branch does not include the latest changes on the base branch, which is `master` in the response example
 * *   There are no merge conflicts
 *
 * If there are no new commits in the base branch, a new request to create a deployment should give a successful
 * response.
 *
 * Merge conflict response:
 *
 * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't
 * be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.
 *
 * Failed commit status checks:
 *
 * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`
 * status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.
 *
 * OAuth app tokens and personal access tokens (classic) need the `repo` or `repo_deployment` scope to use this endpoint.
 *
 * @tag repos
 * @path repos/:owner/:repo/deployments
 * @nestia Generated by Nestia - https://github.com/samchon/nestia
 */
export declare function postByOwnerAndRepo(connection: IConnection<postByOwnerAndRepo.Headers>, owner: string, repo: string, body: postByOwnerAndRepo.Input): Promise<postByOwnerAndRepo.Output>;
export declare namespace postByOwnerAndRepo {
    type Headers = IApiReposDeployments.PostHeader;
    type Input = body;
    type Output = deployment;
    const METADATA: {
        readonly method: "POST";
        readonly path: "/repos/:owner/:repo/deployments";
        readonly request: {
            readonly type: "application/json";
            readonly encrypted: false;
        };
        readonly response: {
            readonly type: "application/json";
            readonly encrypted: false;
        };
    };
    const path: (owner: string, repo: string) => string;
    const random: (g?: Partial<typia.IRandomGenerator>) => deployment;
    const simulate: (connection: IConnection<postByOwnerAndRepo.Headers>, owner: string, repo: string, body: postByOwnerAndRepo.Input) => Output;
}
/**
 * @tag repos
 * @path repos/:owner/:repo/deployments/:deployment_id
 * @nestia Generated by Nestia - https://github.com/samchon/nestia
 */
export declare function getByOwnerAndRepoAndDeployment_id(connection: IConnection<getByOwnerAndRepoAndDeployment_id.Headers>, owner: string, repo: string, deployment_id: string): Promise<getByOwnerAndRepoAndDeployment_id.Output>;
export declare namespace getByOwnerAndRepoAndDeployment_id {
    type Headers = IApiReposDeployments.GetHeader;
    type Output = deployment;
    const METADATA: {
        readonly method: "GET";
        readonly path: "/repos/:owner/:repo/deployments/:deployment_id";
        readonly request: null;
        readonly response: {
            readonly type: "application/json";
            readonly encrypted: false;
        };
    };
    const path: (owner: string, repo: string, deployment_id: string) => string;
    const random: (g?: Partial<typia.IRandomGenerator>) => deployment;
    const simulate: (connection: IConnection<getByOwnerAndRepoAndDeployment_id.Headers>, owner: string, repo: string, deployment_id: string) => Output;
}
/**
 * Delete a deployment.
 * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment.
 *
 * To set a deployment as inactive, you must:
 *
 * *   Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment.
 * *   Mark the active deployment as inactive by adding any non-successful deployment status.
 *
 * For more information, see "[Create a deployment](https://docs.github.com/rest/deployments/deployments/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/deployments/statuses#create-a-deployment-status)."
 *
 * OAuth app tokens and personal access tokens (classic) need the `repo` or `repo_deployment` scope to use this endpoint.
 *
 * @tag repos
 * @path repos/:owner/:repo/deployments/:deployment_id
 * @nestia Generated by Nestia - https://github.com/samchon/nestia
 */
export declare function eraseByOwnerAndRepoAndDeployment_id(connection: IConnection<eraseByOwnerAndRepoAndDeployment_id.Headers>, owner: string, repo: string, deployment_id: string): Promise<void>;
export declare namespace eraseByOwnerAndRepoAndDeployment_id {
    type Headers = IApiReposDeployments.DeleteHeader;
    const METADATA: {
        readonly method: "DELETE";
        readonly path: "/repos/:owner/:repo/deployments/:deployment_id";
        readonly request: null;
        readonly response: {
            readonly type: "application/json";
            readonly encrypted: false;
        };
    };
    const path: (owner: string, repo: string, deployment_id: string) => string;
    const random: (g?: Partial<typia.IRandomGenerator>) => void;
    const simulate: (connection: IConnection<eraseByOwnerAndRepoAndDeployment_id.Headers>, owner: string, repo: string, deployment_id: string) => void;
}
