|
|
|
@ -1,8 +1,11 @@
|
|
|
|
|
import { gql } from '@apollo/client';
|
|
|
|
|
export type Maybe<T> = T | null;
|
|
|
|
|
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
|
|
|
|
|
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
|
|
|
|
|
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
|
|
|
|
|
export type Exact<T extends { [key: string]: unknown }> = {
|
|
|
|
|
[K in keyof T]: T[K];
|
|
|
|
|
};
|
|
|
|
|
export type MakeOptional<T, K extends keyof T> = Omit<T, K> &
|
|
|
|
|
{ [SubKey in K]?: Maybe<T[SubKey]> };
|
|
|
|
|
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> &
|
|
|
|
|
{ [SubKey in K]: Maybe<T[SubKey]> };
|
|
|
|
|
/** All built-in and custom scalars, mapped to their actual values */
|
|
|
|
|
export type Scalars = {
|
|
|
|
|
ID: string;
|
|
|
|
@ -15,174 +18,165 @@ export type Scalars = {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type Commit = {
|
|
|
|
|
__typename?: 'Commit';
|
|
|
|
|
hash: Scalars['String'];
|
|
|
|
|
date: Scalars['DateTime'];
|
|
|
|
|
message: Scalars['String'];
|
|
|
|
|
refs: Scalars['String'];
|
|
|
|
|
body: Scalars['String'];
|
|
|
|
|
author_name: Scalars['String'];
|
|
|
|
|
author_email: Scalars['String'];
|
|
|
|
|
__typename?: "Commit";
|
|
|
|
|
hash: Scalars["String"];
|
|
|
|
|
date: Scalars["DateTime"];
|
|
|
|
|
message: Scalars["String"];
|
|
|
|
|
refs: Scalars["String"];
|
|
|
|
|
body: Scalars["String"];
|
|
|
|
|
author_name: Scalars["String"];
|
|
|
|
|
author_email: Scalars["String"];
|
|
|
|
|
tasks: Array<PipelineTask>;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type CreatePipelineInput = {
|
|
|
|
|
projectId: Scalars['String'];
|
|
|
|
|
branch: Scalars['String'];
|
|
|
|
|
name: Scalars['String'];
|
|
|
|
|
projectId: Scalars["String"];
|
|
|
|
|
branch: Scalars["String"];
|
|
|
|
|
name: Scalars["String"];
|
|
|
|
|
workUnitMetadata: WorkUnitMetadataInput;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type CreatePipelineTaskInput = {
|
|
|
|
|
pipelineId: Scalars['String'];
|
|
|
|
|
commit: Scalars['String'];
|
|
|
|
|
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']>;
|
|
|
|
|
name: Scalars["String"];
|
|
|
|
|
comment: Scalars["String"];
|
|
|
|
|
sshUrl: Scalars["String"];
|
|
|
|
|
webUrl?: Maybe<Scalars["String"]>;
|
|
|
|
|
webHookSecret?: Maybe<Scalars["String"]>;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type Hello = {
|
|
|
|
|
__typename?: 'Hello';
|
|
|
|
|
message: Scalars['String'];
|
|
|
|
|
__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'];
|
|
|
|
|
__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 Mutation = {
|
|
|
|
|
__typename?: 'Mutation';
|
|
|
|
|
__typename?: "Mutation";
|
|
|
|
|
createProject: Project;
|
|
|
|
|
updateProject: Project;
|
|
|
|
|
removeProject: Scalars['Float'];
|
|
|
|
|
removeProject: Scalars["Float"];
|
|
|
|
|
createPipeline: Pipeline;
|
|
|
|
|
updatePipeline: Pipeline;
|
|
|
|
|
deletePipeline: Scalars['Float'];
|
|
|
|
|
deletePipeline: Scalars["Float"];
|
|
|
|
|
createPipelineTask: PipelineTask;
|
|
|
|
|
stopPipelineTask: Scalars['Boolean'];
|
|
|
|
|
stopPipelineTask: Scalars["Boolean"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type MutationCreateProjectArgs = {
|
|
|
|
|
project: CreateProjectInput;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type MutationUpdateProjectArgs = {
|
|
|
|
|
project: UpdateProjectInput;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type MutationRemoveProjectArgs = {
|
|
|
|
|
id: Scalars['String'];
|
|
|
|
|
id: Scalars["String"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type MutationCreatePipelineArgs = {
|
|
|
|
|
pipeline: CreatePipelineInput;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type MutationUpdatePipelineArgs = {
|
|
|
|
|
pipeline: UpdatePipelineInput;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type MutationDeletePipelineArgs = {
|
|
|
|
|
id: Scalars['String'];
|
|
|
|
|
id: Scalars["String"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type MutationCreatePipelineTaskArgs = {
|
|
|
|
|
task: CreatePipelineTaskInput;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type MutationStopPipelineTaskArgs = {
|
|
|
|
|
id: Scalars['String'];
|
|
|
|
|
id: Scalars["String"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type Pipeline = {
|
|
|
|
|
__typename?: 'Pipeline';
|
|
|
|
|
id: Scalars['ID'];
|
|
|
|
|
__typename?: "Pipeline";
|
|
|
|
|
id: Scalars["ID"];
|
|
|
|
|
project: Project;
|
|
|
|
|
projectId: Scalars['String'];
|
|
|
|
|
branch: Scalars['String'];
|
|
|
|
|
name: Scalars['String'];
|
|
|
|
|
projectId: Scalars["String"];
|
|
|
|
|
branch: Scalars["String"];
|
|
|
|
|
name: Scalars["String"];
|
|
|
|
|
workUnitMetadata: WorkUnitMetadata;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type PipelineTask = {
|
|
|
|
|
__typename?: 'PipelineTask';
|
|
|
|
|
id: Scalars['ID'];
|
|
|
|
|
__typename?: "PipelineTask";
|
|
|
|
|
id: Scalars["ID"];
|
|
|
|
|
pipeline: Pipeline;
|
|
|
|
|
pipelineId: Scalars['String'];
|
|
|
|
|
commit: Scalars['String'];
|
|
|
|
|
pipelineId: Scalars["String"];
|
|
|
|
|
commit: Scalars["String"];
|
|
|
|
|
units: Array<PipelineUnits>;
|
|
|
|
|
logs: Array<PipelineTaskLogs>;
|
|
|
|
|
status: TaskStatuses;
|
|
|
|
|
startedAt?: Maybe<Scalars['DateTime']>;
|
|
|
|
|
endedAt?: Maybe<Scalars['DateTime']>;
|
|
|
|
|
runOn: Scalars['String'];
|
|
|
|
|
startedAt?: Maybe<Scalars["DateTime"]>;
|
|
|
|
|
endedAt?: Maybe<Scalars["DateTime"]>;
|
|
|
|
|
runOn: Scalars["String"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type PipelineTaskEvent = {
|
|
|
|
|
__typename?: 'PipelineTaskEvent';
|
|
|
|
|
taskId: Scalars['String'];
|
|
|
|
|
pipelineId: Scalars['String'];
|
|
|
|
|
projectId: Scalars['String'];
|
|
|
|
|
__typename?: "PipelineTaskEvent";
|
|
|
|
|
taskId: Scalars["String"];
|
|
|
|
|
pipelineId: Scalars["String"];
|
|
|
|
|
projectId: Scalars["String"];
|
|
|
|
|
unit?: Maybe<PipelineUnits>;
|
|
|
|
|
emittedAt: Scalars['DateTime'];
|
|
|
|
|
message: Scalars['String'];
|
|
|
|
|
messageType: Scalars['String'];
|
|
|
|
|
emittedAt: Scalars["DateTime"];
|
|
|
|
|
message: Scalars["String"];
|
|
|
|
|
messageType: Scalars["String"];
|
|
|
|
|
status: TaskStatuses;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type PipelineTaskLogs = {
|
|
|
|
|
__typename?: 'PipelineTaskLogs';
|
|
|
|
|
__typename?: "PipelineTaskLogs";
|
|
|
|
|
unit: PipelineUnits;
|
|
|
|
|
status: TaskStatuses;
|
|
|
|
|
startedAt?: Maybe<Scalars['DateTime']>;
|
|
|
|
|
endedAt?: Maybe<Scalars['DateTime']>;
|
|
|
|
|
logs: Scalars['String'];
|
|
|
|
|
startedAt?: Maybe<Scalars["DateTime"]>;
|
|
|
|
|
endedAt?: Maybe<Scalars["DateTime"]>;
|
|
|
|
|
logs: Scalars["String"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 流水线单元 */
|
|
|
|
|
export enum PipelineUnits {
|
|
|
|
|
Checkout = 'checkout',
|
|
|
|
|
InstallDependencies = 'installDependencies',
|
|
|
|
|
Test = 'test',
|
|
|
|
|
Deploy = 'deploy',
|
|
|
|
|
CleanUp = 'cleanUp'
|
|
|
|
|
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']>;
|
|
|
|
|
__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';
|
|
|
|
|
__typename?: "Query";
|
|
|
|
|
hello: Hello;
|
|
|
|
|
projects: Array<Project>;
|
|
|
|
|
project: Project;
|
|
|
|
@ -193,101 +187,92 @@ export type Query = {
|
|
|
|
|
pipelineTask: PipelineTask;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type QueryProjectArgs = {
|
|
|
|
|
id: Scalars['String'];
|
|
|
|
|
id: Scalars["String"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type QueryPipelinesArgs = {
|
|
|
|
|
projectId?: Maybe<Scalars['String']>;
|
|
|
|
|
projectId?: Maybe<Scalars["String"]>;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type QueryPipelineArgs = {
|
|
|
|
|
id: Scalars['String'];
|
|
|
|
|
id: Scalars["String"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type QueryCommitsArgs = {
|
|
|
|
|
pipelineId: Scalars['String'];
|
|
|
|
|
pipelineId: Scalars["String"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type QueryListPipelineTaskByPipelineIdArgs = {
|
|
|
|
|
pipelineId: Scalars['String'];
|
|
|
|
|
pipelineId: Scalars["String"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type QueryPipelineTaskArgs = {
|
|
|
|
|
id: Scalars['String'];
|
|
|
|
|
id: Scalars["String"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type Subscription = {
|
|
|
|
|
__typename?: 'Subscription';
|
|
|
|
|
syncCommits?: Maybe<Scalars['String']>;
|
|
|
|
|
__typename?: "Subscription";
|
|
|
|
|
syncCommits?: Maybe<Scalars["String"]>;
|
|
|
|
|
pipelineTaskEvent: PipelineTaskEvent;
|
|
|
|
|
pipelineTaskChanged: PipelineTask;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type SubscriptionSyncCommitsArgs = {
|
|
|
|
|
appInstance?: Maybe<Scalars['String']>;
|
|
|
|
|
pipelineId: Scalars['String'];
|
|
|
|
|
appInstance?: Maybe<Scalars["String"]>;
|
|
|
|
|
pipelineId: Scalars["String"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type SubscriptionPipelineTaskEventArgs = {
|
|
|
|
|
taskId: Scalars['String'];
|
|
|
|
|
taskId: Scalars["String"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type SubscriptionPipelineTaskChangedArgs = {
|
|
|
|
|
id: Scalars['String'];
|
|
|
|
|
id: Scalars["String"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 任务状态 */
|
|
|
|
|
export enum TaskStatuses {
|
|
|
|
|
Success = 'success',
|
|
|
|
|
Failed = 'failed',
|
|
|
|
|
Working = 'working',
|
|
|
|
|
Pending = 'pending'
|
|
|
|
|
Success = "success",
|
|
|
|
|
Failed = "failed",
|
|
|
|
|
Working = "working",
|
|
|
|
|
Pending = "pending",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type UpdatePipelineInput = {
|
|
|
|
|
branch: Scalars['String'];
|
|
|
|
|
name: Scalars['String'];
|
|
|
|
|
branch: Scalars["String"];
|
|
|
|
|
name: Scalars["String"];
|
|
|
|
|
workUnitMetadata: WorkUnitMetadataInput;
|
|
|
|
|
id: Scalars['String'];
|
|
|
|
|
id: Scalars["String"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type UpdateProjectInput = {
|
|
|
|
|
name: Scalars['String'];
|
|
|
|
|
comment: Scalars['String'];
|
|
|
|
|
sshUrl: Scalars['String'];
|
|
|
|
|
webUrl?: Maybe<Scalars['String']>;
|
|
|
|
|
webHookSecret?: Maybe<Scalars['String']>;
|
|
|
|
|
id: Scalars['String'];
|
|
|
|
|
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';
|
|
|
|
|
__typename?: "WorkUnit";
|
|
|
|
|
type: PipelineUnits;
|
|
|
|
|
scripts: Array<Scalars['String']>;
|
|
|
|
|
scripts: Array<Scalars["String"]>;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type WorkUnitInput = {
|
|
|
|
|
type: PipelineUnits;
|
|
|
|
|
scripts: Array<Scalars['String']>;
|
|
|
|
|
scripts: Array<Scalars["String"]>;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type WorkUnitMetadata = {
|
|
|
|
|
__typename?: 'WorkUnitMetadata';
|
|
|
|
|
version: Scalars['Int'];
|
|
|
|
|
__typename?: "WorkUnitMetadata";
|
|
|
|
|
version: Scalars["Int"];
|
|
|
|
|
units: Array<WorkUnit>;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type WorkUnitMetadataInput = {
|
|
|
|
|
version?: Maybe<Scalars['Int']>;
|
|
|
|
|
version?: Maybe<Scalars["Int"]>;
|
|
|
|
|
units: Array<WorkUnitInput>;
|
|
|
|
|
};
|
|
|
|
|