feat(projects): list, create and update.
This commit is contained in:
@@ -14,20 +14,25 @@ export type Scalars = {
|
||||
DateTime: any;
|
||||
};
|
||||
|
||||
export type Article = {
|
||||
__typename?: 'Article';
|
||||
id: Scalars['ID'];
|
||||
title: Scalars['String'];
|
||||
content: Scalars['String'];
|
||||
publishedAt?: Maybe<Scalars['DateTime']>;
|
||||
tags: Array<Scalars['String']>;
|
||||
export type CreatePipelineInput = {
|
||||
projectId: Scalars['String'];
|
||||
branch: Scalars['String'];
|
||||
name: Scalars['String'];
|
||||
workUnitMetadata: WorkUnitMetadataInput;
|
||||
};
|
||||
|
||||
export type CreateArticleInput = {
|
||||
title: Scalars['String'];
|
||||
content: Scalars['String'];
|
||||
publishedAt?: Maybe<Scalars['DateTime']>;
|
||||
tags: Array<Scalars['String']>;
|
||||
export type CreatePipelineTaskInput = {
|
||||
pipelineId: Scalars['String'];
|
||||
commit: Scalars['String'];
|
||||
units: Array<PipelineUnits>;
|
||||
};
|
||||
|
||||
export type CreateProjectInput = {
|
||||
name: Scalars['String'];
|
||||
comment: Scalars['String'];
|
||||
sshUrl: Scalars['String'];
|
||||
webUrl?: Maybe<Scalars['String']>;
|
||||
webHookSecret?: Maybe<Scalars['String']>;
|
||||
};
|
||||
|
||||
|
||||
@@ -36,44 +41,231 @@ export type 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<PipelineTask>;
|
||||
};
|
||||
|
||||
export type LogList = {
|
||||
__typename?: 'LogList';
|
||||
all: Array<LogFields>;
|
||||
total: Scalars['Float'];
|
||||
latest: LogFields;
|
||||
};
|
||||
|
||||
export type Mutation = {
|
||||
__typename?: 'Mutation';
|
||||
createArticle: Article;
|
||||
updateArticle: Article;
|
||||
removeArticle: Scalars['Int'];
|
||||
createProject: Project;
|
||||
updateProject: Project;
|
||||
removeProject: Scalars['Float'];
|
||||
createPipeline: Pipeline;
|
||||
modifyPipeline: Pipeline;
|
||||
deletePipeline: Scalars['Float'];
|
||||
createPipelineTask: PipelineTask;
|
||||
};
|
||||
|
||||
|
||||
export type MutationCreateArticleArgs = {
|
||||
createArticleInput: CreateArticleInput;
|
||||
export type MutationCreateProjectArgs = {
|
||||
project: CreateProjectInput;
|
||||
};
|
||||
|
||||
|
||||
export type MutationUpdateArticleArgs = {
|
||||
updateArticleInput: UpdateArticleInput;
|
||||
export type MutationUpdateProjectArgs = {
|
||||
project: UpdateProjectInput;
|
||||
};
|
||||
|
||||
|
||||
export type MutationRemoveArticleArgs = {
|
||||
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<PipelineUnits>;
|
||||
logs: Array<PipelineTaskLogs>;
|
||||
status: TaskStatuses;
|
||||
startedAt?: Maybe<Scalars['DateTime']>;
|
||||
endedAt?: Maybe<Scalars['DateTime']>;
|
||||
};
|
||||
|
||||
export type PipelineTaskLogMessage = {
|
||||
__typename?: 'PipelineTaskLogMessage';
|
||||
unit?: Maybe<PipelineUnits>;
|
||||
time: Scalars['DateTime'];
|
||||
message: Scalars['String'];
|
||||
isError: Scalars['Boolean'];
|
||||
};
|
||||
|
||||
export type PipelineTaskLogs = {
|
||||
__typename?: 'PipelineTaskLogs';
|
||||
unit: PipelineUnits;
|
||||
status: TaskStatuses;
|
||||
startedAt?: Maybe<Scalars['DateTime']>;
|
||||
endedAt?: Maybe<Scalars['DateTime']>;
|
||||
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<Scalars['String']>;
|
||||
webHookSecret?: Maybe<Scalars['String']>;
|
||||
};
|
||||
|
||||
export type Query = {
|
||||
__typename?: 'Query';
|
||||
hello: Hello;
|
||||
articles: Array<Article>;
|
||||
article: Article;
|
||||
projects: Array<Project>;
|
||||
project: Project;
|
||||
listPipelines: Array<Pipeline>;
|
||||
findPipeline: Pipeline;
|
||||
listPipelineTaskByPipelineId: Array<PipelineTask>;
|
||||
findPipelineTask: PipelineTask;
|
||||
};
|
||||
|
||||
|
||||
export type QueryArticleArgs = {
|
||||
export type QueryProjectArgs = {
|
||||
id: Scalars['String'];
|
||||
};
|
||||
|
||||
export type UpdateArticleInput = {
|
||||
title?: Maybe<Scalars['String']>;
|
||||
content?: Maybe<Scalars['String']>;
|
||||
publishedAt?: Maybe<Scalars['DateTime']>;
|
||||
tags?: Maybe<Array<Scalars['String']>>;
|
||||
|
||||
export type QueryListPipelinesArgs = {
|
||||
projectId?: Maybe<Scalars['String']>;
|
||||
};
|
||||
|
||||
|
||||
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<Scalars['String']>;
|
||||
webHookSecret?: Maybe<Scalars['String']>;
|
||||
id: Scalars['String'];
|
||||
};
|
||||
|
||||
export type WorkUnit = {
|
||||
__typename?: 'WorkUnit';
|
||||
type: PipelineUnits;
|
||||
scripts: Array<Scalars['String']>;
|
||||
};
|
||||
|
||||
export type WorkUnitInput = {
|
||||
type: PipelineUnits;
|
||||
scripts: Array<Scalars['String']>;
|
||||
};
|
||||
|
||||
export type WorkUnitMetadata = {
|
||||
__typename?: 'WorkUnitMetadata';
|
||||
version: Scalars['Float'];
|
||||
units: Array<WorkUnit>;
|
||||
};
|
||||
|
||||
export type WorkUnitMetadataInput = {
|
||||
version?: Maybe<Scalars['Float']>;
|
||||
units: Array<WorkUnitInput>;
|
||||
};
|
||||
|
Reference in New Issue
Block a user