/*! * Copyright Adaptavist 2022 (c) All rights reserved */ import { DeploymentAsResponse } from "../definitions/DeploymentAsResponse"; import { ErrorStrategyOption } from "../errorStrategy"; import { HeadersOption } from "@managed-api/commons-core"; import { ValidationErrorAsResponse } from "../definitions/ValidationErrorAsResponse"; import { BasicErrorAsResponse } from "../definitions/BasicErrorAsResponse"; import { ValidationErrorSimpleAsResponse } from "../definitions/ValidationErrorSimpleAsResponse"; export interface GetDeploymentsRequest extends HeadersOption, ErrorStrategyOption { /** * The account owner of the repository. The name is not case sensitive. */ owner: string; /** * The name of the repository. The name is not case sensitive. */ repo: string; /** * The SHA recorded at creation time. */ sha?: string; /** * The name of the ref. This can be a branch, tag, or SHA. */ ref?: string; /** * The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ task?: string; /** * The name of the environment that was deployed to (e.g., `staging` or `production`). */ environment?: string | null; /** * The number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type GetDeploymentsResponseOKType = Array; export interface GetDeploymentsResponseOK extends GetDeploymentsResponseOKType { } export declare type GetDeploymentsResponseError = undefined; export interface CreateDeploymentRequest extends HeadersOption, ErrorStrategyOption { /** * The account owner of the repository. The name is not case sensitive. */ owner: string; /** * The name of the repository. The name is not case sensitive. */ repo: string; body: { /** * The ref to deploy. This can be a branch, tag, or SHA. */ ref: string; /** * Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). */ task?: string; /** * Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. */ auto_merge?: boolean; /** * The [status](https://docs.github.com/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. */ required_contexts?: Array; payload?: { [x: string]: any; } | string; /** * Name for the target deployment environment (e.g., `production`, `staging`, `qa`). */ environment?: string; /** * Short description of the deployment. */ description?: string | null; /** * Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` */ transient_environment?: boolean; /** * Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ production_environment?: boolean; }; } declare type CreateDeploymentResponseOKType = DeploymentAsResponse & { message?: string; }; export interface CreateDeploymentResponseOK extends CreateDeploymentResponseOKType { } declare type CreateDeploymentResponseErrorType = ValidationErrorAsResponse; export interface CreateDeploymentResponseError extends CreateDeploymentResponseErrorType { } export interface GetDeploymentRequest extends HeadersOption, ErrorStrategyOption { /** * The account owner of the repository. The name is not case sensitive. */ owner: string; /** * The name of the repository. The name is not case sensitive. */ repo: string; /** * deployment_id parameter */ deployment_id: number; } declare type GetDeploymentResponseOKType = DeploymentAsResponse; export interface GetDeploymentResponseOK extends GetDeploymentResponseOKType { } declare type GetDeploymentResponseErrorType = BasicErrorAsResponse; export interface GetDeploymentResponseError extends GetDeploymentResponseErrorType { } export interface DeleteDeploymentRequest extends HeadersOption, ErrorStrategyOption { /** * The account owner of the repository. The name is not case sensitive. */ owner: string; /** * The name of the repository. The name is not case sensitive. */ repo: string; /** * deployment_id parameter */ deployment_id: number; } export declare type DeleteDeploymentResponseOK = undefined; declare type DeleteDeploymentResponseErrorType = BasicErrorAsResponse & ValidationErrorSimpleAsResponse; export interface DeleteDeploymentResponseError extends DeleteDeploymentResponseErrorType { } export {}; //# sourceMappingURL=deployment.d.ts.map