/*! * Copyright Adaptavist 2022 (c) All rights reserved */ import { ProjectAsResponse } from "../definitions/ProjectAsResponse"; import { ValidationErrorSimpleAsResponse } from "../definitions/ValidationErrorSimpleAsResponse"; import { ErrorStrategyOption } from "../errorStrategy"; import { HeadersOption } from "@managed-api/commons-core"; import { BasicErrorAsResponse } from "../definitions/BasicErrorAsResponse"; import { ValidationErrorAsResponse } from "../definitions/ValidationErrorAsResponse"; export interface GetOrganizationProjectsRequest extends HeadersOption, ErrorStrategyOption { /** * The organization name. The name is not case sensitive. */ org: string; /** * Indicates the state of the projects to return. */ state?: "open" | "closed" | "all"; /** * The number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type GetOrganizationProjectsResponseOKType = Array; export interface GetOrganizationProjectsResponseOK extends GetOrganizationProjectsResponseOKType { } declare type GetOrganizationProjectsResponseErrorType = ValidationErrorSimpleAsResponse; export interface GetOrganizationProjectsResponseError extends GetOrganizationProjectsResponseErrorType { } export interface CreateOrganizationProjectRequest extends HeadersOption, ErrorStrategyOption { /** * The organization name. The name is not case sensitive. */ org: string; body: { /** * The name of the project. */ name: string; /** * The description of the project. */ body?: string; }; } declare type CreateOrganizationProjectResponseOKType = ProjectAsResponse; export interface CreateOrganizationProjectResponseOK extends CreateOrganizationProjectResponseOKType { } declare type CreateOrganizationProjectResponseErrorType = BasicErrorAsResponse & BasicErrorAsResponse & BasicErrorAsResponse & BasicErrorAsResponse & ValidationErrorSimpleAsResponse; export interface CreateOrganizationProjectResponseError extends CreateOrganizationProjectResponseErrorType { } export interface GetProjectRequest extends HeadersOption, ErrorStrategyOption { /** * The unique identifier of the project. */ project_id: number; } declare type GetProjectResponseOKType = ProjectAsResponse; export interface GetProjectResponseOK extends GetProjectResponseOKType { } declare type GetProjectResponseErrorType = BasicErrorAsResponse & BasicErrorAsResponse; export interface GetProjectResponseError extends GetProjectResponseErrorType { } export interface UpdateProjectRequest extends HeadersOption, ErrorStrategyOption { /** * The unique identifier of the project. */ project_id: number; body: { /** * Name of the project */ name?: string; /** * Body of the project */ body?: string | null; /** * State of the project; either 'open' or 'closed' */ state?: "open" | "closed"; /** * The baseline permission that all organization members have on this project */ organization_permission?: "read" | "write" | "admin" | "none"; /** * Whether or not this project can be seen by everyone. */ private?: boolean; }; } declare type UpdateProjectResponseOKType = ProjectAsResponse; export interface UpdateProjectResponseOK extends UpdateProjectResponseOKType { } declare type UpdateProjectResponseErrorType = BasicErrorAsResponse & { message?: string; documentation_url?: string; errors?: Array; } & BasicErrorAsResponse & ValidationErrorSimpleAsResponse; export interface UpdateProjectResponseError extends UpdateProjectResponseErrorType { } export interface DeleteProjectRequest extends HeadersOption, ErrorStrategyOption { /** * The unique identifier of the project. */ project_id: number; } export declare type DeleteProjectResponseOK = undefined; declare type DeleteProjectResponseErrorType = BasicErrorAsResponse & { message?: string; documentation_url?: string; errors?: Array; } & BasicErrorAsResponse & BasicErrorAsResponse; export interface DeleteProjectResponseError extends DeleteProjectResponseErrorType { } export interface GetRepositoryProjectsRequest 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; /** * Indicates the state of the projects to return. */ state?: "open" | "closed" | "all"; /** * The number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type GetRepositoryProjectsResponseOKType = Array; export interface GetRepositoryProjectsResponseOK extends GetRepositoryProjectsResponseOKType { } declare type GetRepositoryProjectsResponseErrorType = BasicErrorAsResponse & BasicErrorAsResponse & BasicErrorAsResponse & BasicErrorAsResponse & ValidationErrorSimpleAsResponse; export interface GetRepositoryProjectsResponseError extends GetRepositoryProjectsResponseErrorType { } export interface CreateRepositoryProjectRequest 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 name of the project. */ name: string; /** * The description of the project. */ body?: string; }; } declare type CreateRepositoryProjectResponseOKType = ProjectAsResponse; export interface CreateRepositoryProjectResponseOK extends CreateRepositoryProjectResponseOKType { } declare type CreateRepositoryProjectResponseErrorType = BasicErrorAsResponse & BasicErrorAsResponse & BasicErrorAsResponse & BasicErrorAsResponse & ValidationErrorSimpleAsResponse; export interface CreateRepositoryProjectResponseError extends CreateRepositoryProjectResponseErrorType { } export interface GetUserProjectsRequest extends HeadersOption, ErrorStrategyOption { /** * The handle for the GitHub user account. */ username: string; /** * Indicates the state of the projects to return. */ state?: "open" | "closed" | "all"; /** * The number of results per page (max 100). */ per_page?: number; /** * Page number of the results to fetch. */ page?: number; } declare type GetUserProjectsResponseOKType = Array; export interface GetUserProjectsResponseOK extends GetUserProjectsResponseOKType { } declare type GetUserProjectsResponseErrorType = ValidationErrorAsResponse; export interface GetUserProjectsResponseError extends GetUserProjectsResponseErrorType { } export interface CreateUserProjectRequest extends HeadersOption, ErrorStrategyOption { body: { /** * Name of the project */ name: string; /** * Body of the project */ body?: string | null; }; } declare type CreateUserProjectResponseOKType = ProjectAsResponse; export interface CreateUserProjectResponseOK extends CreateUserProjectResponseOKType { } declare type CreateUserProjectResponseErrorType = BasicErrorAsResponse & BasicErrorAsResponse & ValidationErrorSimpleAsResponse; export interface CreateUserProjectResponseError extends CreateUserProjectResponseErrorType { } export {}; //# sourceMappingURL=project.d.ts.map