import { gql } from '@apollo/client'; export type Maybe = T | null; export type Exact = { [K in keyof T]: T[K] }; export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: string; String: string; Boolean: boolean; Int: number; Float: number; /** A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format. */ DateTime: any; }; export type CreatePipelineInput = { projectId: Scalars['String']; branch: Scalars['String']; name: Scalars['String']; workUnitMetadata: WorkUnitMetadataInput; }; export type CreatePipelineTaskInput = { pipelineId: Scalars['String']; commit: Scalars['String']; units: Array; }; export type CreateProjectInput = { name: Scalars['String']; comment: Scalars['String']; sshUrl: Scalars['String']; webUrl?: Maybe; webHookSecret?: Maybe; }; export type Hello = { __typename?: 'Hello'; message: Scalars['String']; }; export type LogFields = { __typename?: 'LogFields'; hash: Scalars['String']; date: Scalars['String']; message: Scalars['String']; refs: Scalars['String']; body: Scalars['String']; author_name: Scalars['String']; author_email: Scalars['String']; tasks: Array; }; export type LogList = { __typename?: 'LogList'; all: Array; total: Scalars['Float']; latest: LogFields; }; export type Mutation = { __typename?: 'Mutation'; createProject: Project; updateProject: Project; removeProject: Scalars['Float']; createPipeline: Pipeline; modifyPipeline: Pipeline; deletePipeline: Scalars['Float']; createPipelineTask: PipelineTask; }; export type MutationCreateProjectArgs = { project: CreateProjectInput; }; export type MutationUpdateProjectArgs = { project: UpdateProjectInput; }; export type MutationRemoveProjectArgs = { id: Scalars['String']; }; export type MutationCreatePipelineArgs = { pipeline: CreatePipelineInput; }; export type MutationModifyPipelineArgs = { Pipeline: UpdatePipelineInput; id: Scalars['String']; }; export type MutationDeletePipelineArgs = { id: Scalars['String']; }; export type MutationCreatePipelineTaskArgs = { task: CreatePipelineTaskInput; }; export type Pipeline = { __typename?: 'Pipeline'; id: Scalars['ID']; project: Project; projectId: Scalars['String']; branch: Scalars['String']; name: Scalars['String']; workUnitMetadata: WorkUnitMetadata; }; export type PipelineTask = { __typename?: 'PipelineTask'; id: Scalars['ID']; pipeline: Pipeline; pipelineId: Scalars['String']; commit: Scalars['String']; units: Array; logs: Array; status: TaskStatuses; startedAt?: Maybe; endedAt?: Maybe; }; export type PipelineTaskLogMessage = { __typename?: 'PipelineTaskLogMessage'; unit?: Maybe; time: Scalars['DateTime']; message: Scalars['String']; isError: Scalars['Boolean']; }; export type PipelineTaskLogs = { __typename?: 'PipelineTaskLogs'; unit: PipelineUnits; status: TaskStatuses; startedAt?: Maybe; endedAt?: Maybe; logs: Scalars['String']; }; /** 流水线单元 */ export enum PipelineUnits { Checkout = 'checkout', InstallDependencies = 'installDependencies', Test = 'test', Deploy = 'deploy', CleanUp = 'cleanUp' } export type Project = { __typename?: 'Project'; id: Scalars['ID']; name: Scalars['String']; comment: Scalars['String']; sshUrl: Scalars['String']; webUrl?: Maybe; webHookSecret?: Maybe; }; export type Query = { __typename?: 'Query'; hello: Hello; projects: Array; project: Project; listPipelines: Array; findPipeline: Pipeline; listPipelineTaskByPipelineId: Array; findPipelineTask: PipelineTask; }; export type QueryProjectArgs = { id: Scalars['String']; }; export type QueryListPipelinesArgs = { projectId?: Maybe; }; export type QueryFindPipelineArgs = { id: Scalars['String']; }; export type QueryListPipelineTaskByPipelineIdArgs = { pipelineId: Scalars['String']; }; export type QueryFindPipelineTaskArgs = { id: Scalars['String']; }; export type Subscription = { __typename?: 'Subscription'; listLogsForPipeline: LogList; pipelineTaskLog: PipelineTaskLogMessage; pipelineTaskChanged: PipelineTask; }; export type SubscriptionListLogsForPipelineArgs = { id: Scalars['String']; }; export type SubscriptionPipelineTaskLogArgs = { taskId: Scalars['String']; }; export type SubscriptionPipelineTaskChangedArgs = { id: Scalars['String']; }; /** 任务状态 */ export enum TaskStatuses { Success = 'success', Failed = 'failed', Working = 'working', Pending = 'pending' } export type UpdatePipelineInput = { projectId: Scalars['String']; branch: Scalars['String']; name: Scalars['String']; workUnitMetadata: WorkUnitMetadataInput; }; export type UpdateProjectInput = { name: Scalars['String']; comment: Scalars['String']; sshUrl: Scalars['String']; webUrl?: Maybe; webHookSecret?: Maybe; id: Scalars['String']; }; export type WorkUnit = { __typename?: 'WorkUnit'; type: PipelineUnits; scripts: Array; }; export type WorkUnitInput = { type: PipelineUnits; scripts: Array; }; export type WorkUnitMetadata = { __typename?: 'WorkUnitMetadata'; version: Scalars['Float']; units: Array; }; export type WorkUnitMetadataInput = { version?: Maybe; units: Array; };