discord-bot/Clients/CirrusCiClient/schema.graphql
2021-04-14 00:19:55 +05:00

913 lines
20 KiB
GraphQL

schema {
query: Root
mutation: Mutation
subscription: Subscription
}
type AccountTransaction {
accountId: Long!
taskId: Long!
repositoryId: Long!
timestamp: Long!
microCreditsAmount: Long!
creditsAmount: String!
initialCreditsAmount: 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 ArtifactFileInfo {
path: String!
size: Long!
}
type Artifacts {
name: String!
type: String
format: String
files: [ArtifactFileInfo]
}
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
clockDurationInSeconds: Long
pullRequest: Long
checkSuiteId: Long
isSenderUserCollaborator: Boolean
senderUserPermissions: String
changeTimestamp: Long!
buildCreatedTimestamp: Long!
status: BuildStatus
notifications: [Notification]
parsingResult: ParsingResult
tasks: [Task]
taskGroupsAmount: Long
latestGroupTasks: [Task]
repository: Repository!
viewerPermission: PermissionType!
source: String
hooks: [Hook]
}
input BuildApproveInput {
buildId: ID!
clientMutationId: String
}
type BuildApprovePayload {
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
ERRORED
}
input BuyComputeCreditsInput {
accountId: ID!
amountOfCredits: String!
paymentTokenId: String!
receiptEmail: String
clientMutationId: String
}
type BuyComputeCreditsPayload {
error: String
info: GitHubOrganizationInfo
user: User
clientMutationId: String
}
"Repository Setting to choose where to look for the configuration file."
enum ConfigResolutionStrategy {
SAME_SHA
MERGE_FOR_PRS
DEFAULT_BRANCH
}
input CreatePersistentWorkerPoolInput {
ownerId: Long!
name: String!
enabledForPublic: Boolean!
clientMutationId: String
}
type CreatePersistentWorkerPoolPayload {
pool: PersistentWorkerPool!
clientMutationId: String
}
type DayDate {
year: Int
month: Int
day: Int
}
"Repository Setting to choose how to decrypt variables."
enum DecryptEnvironmentVariablesFor {
USERS_WITH_WRITE_PERMISSIONS
EVERYONE
}
input DeletePersistentWorkerInput {
poolId: String!
name: String!
clientMutationId: String
}
type DeletePersistentWorkerPayload {
clientMutationId: String
}
input DeletePersistentWorkerPoolInput {
poolId: String!
clientMutationId: String
}
type DeletePersistentWorkerPoolPayload {
deletedPoolId: String!
clientMutationId: String
}
input DeleteWebPushConfigurationInput {
endpoint: String!
clientMutationId: String
}
type DeleteWebPushConfigurationPayload {
clientMutationId: String
}
type ExecutionChart {
startTimestamp: Long!
maxValue: Float!
minValue: Float!
points: [ExecutionChartPoint]!
}
type ExecutionChartPoint {
value: Float!
secondsFromStart: Long!
}
type ExecutionEvent {
timestamp: Long!
message: String!
}
type ExecutionInfo {
labels: [String]
events: [ExecutionEvent]
cpuChart: ExecutionChart
memoryChart: ExecutionChart
}
input GenerateNewAccessTokenInput {
accountId: ID
clientMutationId: String
}
type GenerateNewAccessTokenPayload {
token: String!
clientMutationId: String
}
input GetPersistentWorkerPoolRegistrationTokenInput {
poolId: ID
clientMutationId: String
}
type GetPersistentWorkerPoolRegistrationTokenPayload {
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
persistentWorkerPools: [PersistentWorkerPool]
}
type Hook {
id: ID!
repositoryId: ID!
repository: Repository!
buildId: ID
build: Build
taskId: ID
task: Task
timestamp: Long!
name: String!
info: HookExecutionInfo!
}
type HookExecutionInfo {
error: String!
arguments: String
result: String
outputLogs: [String]
durationNanos: Long!
}
type InstanceResources {
cpu: Float!
memory: Long!
}
"Long type"
scalar Long
type MetricsChart {
title: String
points: [TimePoint]
dataUnits: String
}
input MetricsQueryParameters {
status: TaskStatus
platform: PlatformType
type: String
isCommunity: Boolean
isPR: Boolean
usedComputeCredits: Boolean
branch: String
}
type Mutation {
securedVariable(input: RepositorySecuredVariableInput!): RepositorySecuredVariablePayload
securedOrganizationVariable(input: OrganizationSecuredVariableInput!): OrganizationSecuredVariablePayload
updateSecuredOrganizationVariable(input: UpdateOrganizationSecuredVariableInput!): UpdateOrganizationSecuredVariablePayload
createBuild(input: RepositoryCreateBuildInput!): RepositoryCreateBuildPayload
deleteRepository(input: RepositoryDeleteInput!): RepositoryDeletePayload
rerun(input: TaskReRunInput!): TaskReRunPayload
batchReRun(input: TasksReRunInput!): TasksReRunPayload
abortTask(input: TaskAbortInput!): TaskAbortPayload
batchAbort(input: TaskBatchAbortInput!): TaskBatchAbortPayload
retrigger(input: BuildReTriggerInput!): BuildReTriggerPayload
saveSettings(input: RepositorySettingsInput!): RepositorySettingsPayload
saveCronSettings(input: RepositorySaveCronSettingsInput!): RepositorySaveCronSettingsPayload
removeCronSettings(input: RepositoryRemoveCronSettingsInput!): RepositoryRemoveCronSettingsPayload
approve(input: BuildApproveInput!): BuildApprovePayload
trigger(input: TaskTriggerInput!): TaskTriggerPayload
buyComputeCredits(input: BuyComputeCreditsInput!): BuyComputeCreditsPayload
saveWebHookSettings(input: SaveWebHookSettingsInput!): SaveWebHookSettingsPayload
saveBillingSettings(input: BillingSettingsInput!): BillingSettingsPayload
generateNewAccessToken(input: GenerateNewAccessTokenInput!): GenerateNewAccessTokenPayload
deletePersistentWorker(input: DeletePersistentWorkerInput!): DeletePersistentWorkerPayload
updatePersistentWorker(input: UpdatePersistentWorkerInput!): UpdatePersistentWorkerPayload
persistentWorkerPoolRegistrationToken(input: GetPersistentWorkerPoolRegistrationTokenInput!): GetPersistentWorkerPoolRegistrationTokenPayload
createPersistentWorkerPool(input: CreatePersistentWorkerPoolInput!): CreatePersistentWorkerPoolPayload
updatePersistentWorkerPool(input: UpdatePersistentWorkerPoolInput!): UpdatePersistentWorkerPoolPayload
deletePersistentWorkerPool(input: DeletePersistentWorkerPoolInput!): DeletePersistentWorkerPoolPayload
saveWebPushConfiguration(input: SaveWebPushConfigurationInput!): SaveWebPushConfigurationPayload
deleteWebPushConfiguration(input: DeleteWebPushConfigurationInput!): DeleteWebPushConfigurationPayload
}
type Notification {
level: NotificationLevel
message: String!
link: String
}
"Notification level."
enum NotificationLevel {
INFO
WARNING
ERROR
}
input OrganizationSecuredVariableInput {
organizationId: ID!
valueToSecure: String!
clientMutationId: String
}
type OrganizationSecuredVariablePayload {
variableName: String!
clientMutationId: String
}
"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
}
type ParsingResult {
rawYamlConfig: String!
rawStarlarkConfig: String!
processedYamlConfig: String!
issues: [ParsingResultIssue]
outputLogs: [String]
}
type ParsingResultIssue {
level: ParsingResultIssueLevel!
message: String!
line: Long!
column: Long!
}
enum ParsingResultIssueLevel {
INFO
WARNING
ERROR
}
"User access level."
enum PermissionType {
NONE
READ
WRITE
ADMIN
}
type PersistentWorker {
name: String!
disabled: Boolean!
arch: String!
hostname: String!
os: String!
version: String!
labels: [String]
info: PersistentWorkerInfo
assignedTasks("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): PersistentWorkerAssignedTasksConnection
}
"An edge in a connection"
type PersistentWorkerAssignedTaskEdge {
"The item at the end of the edge"
node: Task
"cursor marks a unique position or index into the connection"
cursor: String!
}
"A connection to a list of items."
type PersistentWorkerAssignedTasksConnection {
"a list of edges"
edges: [PersistentWorkerAssignedTaskEdge]
"details about this specific page"
pageInfo: PageInfo!
}
type PersistentWorkerInfo {
heartbeatTimestamp: Long!
runningTasks: [Task]
}
type PersistentWorkerPool {
id: ID!
name: String!
enabledForPublic: Boolean!
workers: [PersistentWorker]
viewerPermission: PermissionType
}
"Task platform."
enum PlatformType {
LINUX
DARWIN
WINDOWS
FREEBSD
}
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
cronSettings: [RepositoryCronSettings]
viewerPermission: PermissionType
lastDefaultBranchBuild: Build
metrics(parameters: MetricsQueryParameters): [MetricsChart]
}
"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 RepositoryCreateBuildInput {
repositoryId: ID!
branch: String!
sha: String
configOverride: String
clientMutationId: String
}
type RepositoryCreateBuildPayload {
build: Build!
clientMutationId: String
}
type RepositoryCronSettings {
name: String!
expression: String!
branch: String!
nextInvocationTimestamp: Long!
lastInvocationBuild: Build
}
input RepositoryDeleteInput {
repositoryId: ID!
clientMutationId: String
}
type RepositoryDeletePayload {
deleted: Boolean!
clientMutationId: String
}
input RepositoryRemoveCronSettingsInput {
repositoryId: ID!
name: String!
clientMutationId: String
}
type RepositoryRemoveCronSettingsPayload {
settings: [RepositoryCronSettings]
clientMutationId: String
}
input RepositorySaveCronSettingsInput {
repositoryId: ID!
name: String!
expression: String!
branch: String!
clientMutationId: String
}
type RepositorySaveCronSettingsPayload {
settings: [RepositoryCronSettings]
clientMutationId: String
}
input RepositorySecuredVariableInput {
repositoryId: ID!
valueToSecure: String!
clientMutationId: String
}
type RepositorySecuredVariablePayload {
variableName: String!
clientMutationId: String
}
type RepositorySettings {
needsApproval: Boolean
decryptEnvironmentVariables: DecryptEnvironmentVariablesFor
configResolutionStrategy: ConfigResolutionStrategy
additionalEnvironment: [String]
}
input RepositorySettingsInput {
repositoryId: ID!
needsApproval: Boolean
decryptEnvironmentVariables: DecryptEnvironmentVariablesFor
configResolutionStrategy: ConfigResolutionStrategy
additionalEnvironment: [String]
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
searchBuilds(repositoryOwner: String! repositoryName: String! SHA: String): [Build]
task(id: ID!): Task
hook(id: ID!): Hook
webhookDelivery(id: String!): WebHookDelivery
persistentWorkerPool(poolId: ID): PersistentWorkerPool
persistentWorker(poolId: ID name: String): PersistentWorker
}
input SaveWebHookSettingsInput {
accountId: ID!
webhookURL: String!
clientMutationId: String
}
type SaveWebHookSettingsPayload {
error: String
info: GitHubOrganizationInfo
clientMutationId: String
}
input SaveWebPushConfigurationInput {
endpoint: String!
p256dhKey: String!
authKey: String!
clientMutationId: String
}
type SaveWebPushConfigurationPayload {
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!
localGroupId: Long!
requiredGroups: [Long]
status: TaskStatus
notifications: [Notification]
commands: [TaskCommand]
firstFailedCommand: TaskCommand
artifacts: [Artifacts]
commandLogsTail(name: String!): [String]
statusTimestamp: Long!
creationTimestamp: Long!
scheduledTimestamp: Long!
executingTimestamp: Long!
finalStatusTimestamp: Long!
durationInSeconds: Long!
labels: [String]
uniqueLabels: [String]
requiredPRLabels: [String]
timeoutInSeconds: Long!
optional: Boolean
statusDurations: [TaskStatusDuration]
repository: Repository!
build: Build!
previousRuns: [Task]
allOtherRuns: [Task]
dependencies: [Task]
automaticReRun: Boolean!
automaticallyReRunnable: Boolean!
experimental: Boolean!
stateful: Boolean!
useComputeCredits: Boolean!
usedComputeCredits: Boolean!
transaction: AccountTransaction
triggerType: TaskTriggerType!
instanceResources: InstanceResources
executionInfo: ExecutionInfo
baseEnvironment: [String]
hooks: [Hook]
}
input TaskAbortInput {
taskId: ID!
clientMutationId: String
}
type TaskAbortPayload {
abortedTask: Task!
clientMutationId: String
}
input TaskBatchAbortInput {
taskIds: [ID]
clientMutationId: String
}
type TaskBatchAbortPayload {
tasks: [Task]
clientMutationId: String
}
type TaskCommand {
name: String
type: TaskCommandType
status: TaskCommandStatus
durationInSeconds: Int
logsTail: [String]
}
"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
ARTIFACTS
}
input TaskReRunInput {
taskId: ID!
clientMutationId: String
}
type TaskReRunPayload {
newTask: Task!
clientMutationId: String
}
"Task status."
enum TaskStatus {
CREATED
TRIGGERED
SCHEDULED
EXECUTING
ABORTED
FAILED
COMPLETED
SKIPPED
PAUSED
}
type TaskStatusDuration {
status: TaskStatus!
durationInSeconds: Long!
}
input TaskTriggerInput {
taskId: ID!
clientMutationId: String
}
type TaskTriggerPayload {
task: Task!
clientMutationId: String
}
"Task trigger type."
enum TaskTriggerType {
AUTOMATIC
MANUAL
}
input TasksReRunInput {
taskIds: [ID]
clientMutationId: String
}
type TasksReRunPayload {
newTasks: [Task]
clientMutationId: String
}
type TimePoint {
date: DayDate
value: Float
}
input UpdateOrganizationSecuredVariableInput {
organizationId: ID!
name: String!
updatedValueToSecure: String!
clientMutationId: String
}
type UpdateOrganizationSecuredVariablePayload {
variableName: String!
clientMutationId: String
}
input UpdatePersistentWorkerInput {
poolId: String!
name: String!
disabled: Boolean!
clientMutationId: String
}
type UpdatePersistentWorkerPayload {
worker: PersistentWorker!
clientMutationId: String
}
input UpdatePersistentWorkerPoolInput {
poolId: String!
name: String!
enabledForPublic: Boolean!
clientMutationId: String
}
type UpdatePersistentWorkerPoolPayload {
pool: PersistentWorkerPool!
clientMutationId: String
}
type User {
id: ID!
githubUserId: Long
githubUserName: String!
category: UserCategoryType!
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]
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): UserTransactionsConnection
apiToken: ApiAccessToken
webPushServerKey: String!
persistentWorkerPools: [PersistentWorkerPool]
}
"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!
}
"User type."
enum UserCategoryType {
DEFAULT
BLOCKED
TRUSTED
ADMIN
}
"An edge in a connection"
type UserTransactionEdge {
"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 UserTransactionsConnection {
"a list of edges"
edges: [UserTransactionEdge]
"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
}
"A connection to a list of items."
type WebhookDeliveriesConnection {
"a list of edges"
edges: [WebHookDeliveryEdge]
"details about this specific page"
pageInfo: PageInfo!
}