Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
525 lines (441 sloc) 10.4 KB
schema {
query: Root
mutation: Mutation
subscription: Subscription
}
"""This directive allows results to be deferred during execution"""
directive @defer on FIELD
type AccountTransaction {
accountId: Long!
taskId: Long!
repositoryId: Long!
timestamp: Long!
microCreditsAmount: Long!
creditsAmount: String!
task: Task
repository: Repository
}
"""An edge in a connection"""
type AccountTransactionEdge {
"""The item at the end of the edge"""
node: AccountTransaction
"""cursor marks a unique position or index into the connection"""
cursor: String!
}
"""A connection to a list of items."""
type AccountTransactionsConnection {
"""a list of edges"""
edges: [AccountTransactionEdge]
"""details about this specific page"""
pageInfo: PageInfo!
}
type ApiAccessToken {
maskedToken: String
creationTimestamp: Long
}
type BillingSettings {
accountId: Long!
enabled: Boolean!
billingCreditsLimit: Long!
billingEmailAddress: String!
invoiceTemplate: String
}
input BillingSettingsInput {
accountId: ID!
enabled: Boolean!
billingEmailAddress: String!
invoiceTemplate: String
clientMutationId: String
}
type BillingSettingsPayload {
settings: BillingSettings
clientMutationId: String
}
type Build {
id: ID!
repositoryId: ID!
branch: String!
changeIdInRepo: String!
changeMessageTitle: String
changeMessage: String
durationInSeconds: Long
pullRequest: Long
changeTimestamp: Long!
buildCreatedTimestamp: Long!
status: BuildStatus
notifications: [Notification]
tasks: [Task]
repository: Repository!
viewerPermission: PermissionType!
}
input BuildInput {
buildId: ID!
clientMutationId: String
}
type BuildPayload {
build: Build!
clientMutationId: String
}
input BuildReTriggerInput {
buildId: ID!
clientMutationId: String
}
type BuildReTriggerPayload {
build: Build!
clientMutationId: String
}
"""Build status."""
enum BuildStatus {
CREATED
NEEDS_APPROVAL
TRIGGERED
EXECUTING
FAILED
COMPLETED
ABORTED
}
input BuyComputeCreditsInput {
accountId: ID!
amountOfCredits: String!
paymentTokenId: String!
clientMutationId: String
}
type BuyComputeCreditsPayload {
error: String
info: GitHubOrganizationInfo
clientMutationId: String
}
"""Repository Setting to choose how to decrypt variables."""
enum DecryptEnvironmentVariablesFor {
USERS_WITH_WRITE_PERMISSIONS
EVERYONE
}
input GenerateNewAccessTokenInput {
accountId: ID!
clientMutationId: String
}
type GenerateNewAccessTokenPayload {
token: String!
clientMutationId: String
}
type GitHubMarketplacePurchase {
accountId: Long!
login: String!
planId: Long!
planName: String!
unitCount: Long!
onFreeTrial: Boolean!
freeTrialDaysLeft: Int!
}
type GitHubOrganizationInfo {
id: ID!
name: String!
role: String!
purchase: GitHubMarketplacePurchase
activeUsersAmount: Int!
activeUserNames: [String]
balanceInCredits: String!
transactions(
"""fetching only nodes before this node (exclusive)"""
before: String
"""fetching only nodes after this node (exclusive)"""
after: String
"""fetching only the first certain number of nodes"""
first: Int
"""fetching only the last certain number of nodes"""
last: Int
): AccountTransactionsConnection
billingSettings: BillingSettings
webhookSettings: WebHookSettings
webhookDeliveries(
"""fetching only nodes before this node (exclusive)"""
before: String
"""fetching only nodes after this node (exclusive)"""
after: String
"""fetching only the first certain number of nodes"""
first: Int
"""fetching only the last certain number of nodes"""
last: Int
): WebhookDeliveriesConnection
apiToken: ApiAccessToken
}
"""Long type"""
scalar Long
type Mutation {
securedVariable(input: RepositorySecuredVariableInput!): RepositorySecuredVariablePayload
rerun(input: TaskInput!): TaskPayload
abortTask(input: TaskAbortInput!): TaskAbortPayload
retrigger(input: BuildReTriggerInput!): BuildReTriggerPayload
saveSettings(input: RepositorySettingsInput!): RepositorySettingsPayload
approve(input: BuildInput!): BuildPayload
buyComputeCredits(input: BuyComputeCreditsInput!): BuyComputeCreditsPayload
saveWebHookSettings(input: SaveWebHookSettingsInput!): SaveWebHookSettingsPayload
saveBillingSettings(input: BillingSettingsInput!): BillingSettingsPayload
generateNewAccessToken(input: GenerateNewAccessTokenInput!): GenerateNewAccessTokenPayload
}
type Notification {
level: NotificationLevel
message: String!
link: String
}
"""Notification level."""
enum NotificationLevel {
INFO
WARNING
ERROR
}
"""Information about pagination in a connection."""
type PageInfo {
"""When paginating forwards, are there more items?"""
hasNextPage: Boolean!
"""When paginating backwards, are there more items?"""
hasPreviousPage: Boolean!
"""When paginating backwards, the cursor to continue."""
startCursor: String
"""When paginating forwards, the cursor to continue."""
endCursor: String
}
"""User access level."""
enum PermissionType {
NONE
READ
WRITE
ADMIN
}
type Repository {
id: ID!
owner: String!
name: String!
cloneUrl: String!
masterBranch: String!
isPrivate: Boolean!
builds(
"""fetching only nodes before this node (exclusive)"""
before: String
"""fetching only nodes after this node (exclusive)"""
after: String
"""fetching only the first certain number of nodes"""
first: Int
"""fetching only the last certain number of nodes"""
last: Int
"""branch to fetch builds for"""
branch: String
): RepositoryBuildsConnection
settings: RepositorySettings
viewerPermission: PermissionType
lastDefaultBranchBuild: Build
}
"""An edge in a connection"""
type RepositoryBuildEdge {
"""The item at the end of the edge"""
node: Build
"""cursor marks a unique position or index into the connection"""
cursor: String!
}
"""A connection to a list of items."""
type RepositoryBuildsConnection {
"""a list of edges"""
edges: [RepositoryBuildEdge]
"""details about this specific page"""
pageInfo: PageInfo!
}
input RepositorySecuredVariableInput {
repositoryId: ID!
valueToSecure: String!
clientMutationId: String
}
type RepositorySecuredVariablePayload {
variableName: String!
clientMutationId: String
}
type RepositorySettings {
needsApproval: Boolean
decryptEnvironmentVariables: DecryptEnvironmentVariablesFor
}
input RepositorySettingsInput {
repositoryId: ID!
needsApproval: Boolean
decryptEnvironmentVariables: DecryptEnvironmentVariablesFor
clientMutationId: String
}
type RepositorySettingsPayload {
settings: RepositorySettings!
clientMutationId: String
}
type Root {
viewer: User
repository(id: ID!): Repository
githubRepository(owner: String!, name: String!): Repository
githubRepositories(owner: String!): [Repository]
githubOrganizationInfo(organization: String!): GitHubOrganizationInfo
build(id: ID!): Build
task(id: ID!): Task
webhookDelivery(id: String!): WebHookDelivery
}
input SaveWebHookSettingsInput {
accountId: ID!
webhookURL: String!
clientMutationId: String
}
type SaveWebHookSettingsPayload {
error: String
info: GitHubOrganizationInfo
clientMutationId: String
}
type Subscription {
task(id: ID!): Task
build(id: ID!): Build
repository(id: ID!): Repository
}
type Task {
id: ID!
buildId: ID!
repositoryId: ID!
name: String!
status: TaskStatus
notifications: [Notification]
commands: [TaskCommand]
commandLogsTail(name: String!): [String]
statusTimestamp: Long!
creationTimestamp: Long!
scheduledTimestamp: Long!
executingTimestamp: Long!
finalStatusTimestamp: Long!
durationInSeconds: Long!
labels: [String]
uniqueLabels: [String]
statusDurations: [TaskStatusDuration]
repository: Repository!
build: Build!
previousRuns: [Task]
allOtherRuns: [Task]
dependencies: [Task]
automaticReRun: Boolean!
useComputeCredits: Boolean!
usedComputeCredits: Boolean!
transaction: AccountTransaction
}
input TaskAbortInput {
taskId: ID!
clientMutationId: String
}
type TaskAbortPayload {
abortedTask: Task!
clientMutationId: String
}
type TaskCommand {
name: String
type: TaskCommandType
status: TaskCommandStatus
durationInSeconds: Int
}
"""Task Command status."""
enum TaskCommandStatus {
UNDEFINED
SUCCESS
FAILURE
EXECUTING
SKIPPED
ABORTED
}
"""Task Command type."""
enum TaskCommandType {
WAIT
EXIT
EXECUTE_SCRIPT
CACHE
UPLOAD_CACHE
CLONE
EXECUTE_BACKGROUND_SCRIPT
}
input TaskInput {
taskId: ID!
clientMutationId: String
}
type TaskPayload {
newTask: Task!
clientMutationId: String
}
"""Task status."""
enum TaskStatus {
CREATED
TRIGGERED
SCHEDULED
EXECUTING
ABORTED
FAILED
COMPLETED
SKIPPED
}
type TaskStatusDuration {
status: TaskStatus!
durationInSeconds: Long!
}
type User {
id: ID!
githubUserId: Long
githubUserName: String!
avatarURL: String
builds(
"""fetching only nodes before this node (exclusive)"""
before: String
"""fetching only nodes after this node (exclusive)"""
after: String
"""fetching only the first certain number of nodes"""
first: Int
"""fetching only the last certain number of nodes"""
last: Int
): UserBuildsConnection
githubMarketplacePurchase: GitHubMarketplacePurchase
topActiveRepositories: [Repository]
organizations: [GitHubOrganizationInfo]
}
"""An edge in a connection"""
type UserBuildEdge {
"""The item at the end of the edge"""
node: Build
"""cursor marks a unique position or index into the connection"""
cursor: String!
}
"""A connection to a list of items."""
type UserBuildsConnection {
"""a list of edges"""
edges: [UserBuildEdge]
"""details about this specific page"""
pageInfo: PageInfo!
}
"""A connection to a list of items."""
type WebhookDeliveriesConnection {
"""a list of edges"""
edges: [WebHookDeliveryEdge]
"""details about this specific page"""
pageInfo: PageInfo!
}
type WebHookDelivery {
id: String!
accountId: Long!
repositoryId: Long!
timestamp: Long!
payload: WebHookDeliveryPayload!
response: WebHookDeliveryResponse!
}
"""An edge in a connection"""
type WebHookDeliveryEdge {
"""The item at the end of the edge"""
node: WebHookDelivery
"""cursor marks a unique position or index into the connection"""
cursor: String!
}
type WebHookDeliveryPayload {
event: String!
action: String!
data: String!
}
type WebHookDeliveryResponse {
status: Int!
duration: Long!
data: String!
}
type WebHookSettings {
webhookURL: String
}