// This file is auto-generated by @hey-api/openapi-ts

export type ClientOptions = {
  baseUrl: `${string}://${string}` | (string & {})
}

export type AccessChannels = {
  id?: string
  appInstanceId?: string
  webAppEnabled?: boolean
  developerApiEnabled?: boolean
  updatedBy?: string
  createdAt?: string
  updatedAt?: string
}

export type AccessPolicy = {
  id?: string
  appInstanceId?: string
  environmentId?: string
  mode?:
    | 'ACCESS_MODE_UNSPECIFIED'
    | 'ACCESS_MODE_PUBLIC'
    | 'ACCESS_MODE_PRIVATE'
    | 'ACCESS_MODE_PRIVATE_ALL'
  subjects?: Array<AccessSubject>
  createdAt?: string
  updatedAt?: string
}

export type AccessSubject = {
  subjectType?: 'SUBJECT_TYPE_UNSPECIFIED' | 'SUBJECT_TYPE_ACCOUNT' | 'SUBJECT_TYPE_GROUP'
  subjectId?: string
}

export type Actor = {
  id?: string
  name?: string
}

export type ApiKey = {
  id?: string
  appInstanceId?: string
  environmentId?: string
  name?: string
  maskedToken?: string
  lastUsedAt?: string
  createdBy?: Actor
  createdAt?: string
}

export type AppInstance = {
  id?: string
  tenantId?: string
  name?: string
  description?: string
  createdBy?: string
  updatedBy?: string
  createdAt?: string
  updatedAt?: string
}

export type AppRunnerLog = {
  id?: string
  timestamp?: string
  workflowRunId?: string
  status?: string
  durationSeconds?: number
  totalTokens?: string
  workspaceId?: string
  environmentId?: string
  instanceId?: string
  endUser?: string
  invokeFrom?: string
  traceId?: string
  difyTraceId?: string
  body?: string
  attributesJson?: string
  resourceAttributesJson?: string
}

export type BatchResolveRuntimeArtifactsReply = {
  results?: Array<RuntimeArtifactResult>
}

export type BatchResolveRuntimeArtifactsReq = {
  artifacts?: Array<RuntimeArtifactRequest>
}

export type BootstrapAssignment = {
  appId?: string
  environmentId?: string
  workflowId?: string
  runtimeInstanceId?: string
  workspaceId?: string
  runtimeInstanceVersion?: string
  bindingSnapshotVersion?: string
  executionTokenVersion?: string
  executionToken?: string
  releaseId?: string
  operation?: string
  deploymentId?: string
  reportStatus?: boolean
}

export type BootstrapRunnerReply = {
  runnerId?: string
  assignmentRevision?: string
  assignments?: Array<BootstrapAssignment>
}

export type BootstrapRunnerReq = {
  runner?: RunnerInfo
}

export type CancelDeploymentReq = {
  appInstanceId?: string
  environmentId?: string
}

export type CreateApiKeyReply = {
  apiKey?: ApiKey
  token?: string
}

export type CreateApiKeyReq = {
  appInstanceId?: string
  environmentId?: string
  name?: string
}

export type CreateAppInstanceReply = {
  appInstance?: AppInstance
}

export type CreateAppInstanceReq = {
  name?: string
  description?: string
}

export type CreateInitialDeploymentFromDslReq = {
  dsl?: string
  environmentId?: string
  appInstanceName?: string
  appInstanceDescription?: string
  releaseName?: string
  releaseDescription?: string
  credentials?: Array<CredentialSelectionInput>
  envVars?: Array<EnvVarInput>
  idempotencyKey?: string
  expectedDslDigest?: string
}

export type CreateInitialDeploymentFromSourceAppReq = {
  sourceAppId?: string
  environmentId?: string
  appInstanceName?: string
  appInstanceDescription?: string
  releaseName?: string
  releaseDescription?: string
  credentials?: Array<CredentialSelectionInput>
  envVars?: Array<EnvVarInput>
  idempotencyKey?: string
  expectedDslDigest?: string
}

export type CreateInitialDeploymentReply = {
  appInstance?: AppInstance
  release?: Release
  deployment?: Deployment
}

export type CreateReleaseFromDslReq = {
  appInstanceId?: string
  dsl?: string
  name?: string
  description?: string
  createAppInstance?: boolean
}

export type CreateReleaseFromSourceAppReq = {
  appInstanceId?: string
  sourceAppId?: string
  name?: string
  description?: string
  createAppInstance?: boolean
}

export type CreateReleaseReply = {
  release?: Release
  appInstance?: AppInstance
}

export type CredentialCandidate = {
  credentialId?: string
  providerId?: string
  category?: 'PLUGIN_CATEGORY_UNSPECIFIED' | 'PLUGIN_CATEGORY_MODEL' | 'PLUGIN_CATEGORY_TOOL'
  displayName?: string
  fromEnterprise?: boolean
}

export type CredentialSelectionInput = {
  providerId?: string
  category?: 'PLUGIN_CATEGORY_UNSPECIFIED' | 'PLUGIN_CATEGORY_MODEL' | 'PLUGIN_CATEGORY_TOOL'
  credentialId?: string
}

export type CredentialSlot = {
  providerId?: string
  category?: 'PLUGIN_CATEGORY_UNSPECIFIED' | 'PLUGIN_CATEGORY_MODEL' | 'PLUGIN_CATEGORY_TOOL'
  candidates?: Array<CredentialCandidate>
}

export type DeleteApiKeyReply = {
  [key: string]: unknown
}

export type DeleteAppInstanceReply = {
  [key: string]: unknown
}

export type DeleteReleaseReply = {
  [key: string]: unknown
}

export type DeployReq = {
  appInstanceId?: string
  environmentId?: string
  releaseId?: string
  credentials?: Array<CredentialSelectionInput>
  envVars?: Array<EnvVarInput>
  idempotencyKey?: string
  reuseEnvSnapshot?: boolean
}

export type Deployment = {
  id?: string
  status?:
    | 'DEPLOYMENT_STATUS_UNSPECIFIED'
    | 'DEPLOYMENT_STATUS_DEPLOYING'
    | 'DEPLOYMENT_STATUS_READY'
    | 'DEPLOYMENT_STATUS_FAILED'
    | 'DEPLOYMENT_STATUS_CANCELLED'
  environment?: Environment
  release?: Release
  error?: Error
  createdAt?: string
  finalizedAt?: string
}

export type DeploymentOptions = {
  dslDigest?: string
  appInstanceDefaults?: DeploymentOptionsAppInstanceDefaults
  releaseDefaults?: DeploymentOptionsReleaseDefaults
  credentialSlots?: Array<CredentialSlot>
  envVarSlots?: Array<EnvVarSlot>
}

export type DeploymentOptionsAppInstanceDefaults = {
  name?: string
  description?: string
}

export type DeploymentOptionsReleaseDefaults = {
  name?: string
  description?: string
}

export type DeploymentReply = {
  deployment?: Deployment
}

export type EnvVarInput = {
  key?: string
  value?: string
}

export type EnvVarSlot = {
  key?: string
}

export type Environment = {
  id?: string
  name?: string
  description?: string
  mode?: 'ENVIRONMENT_MODE_UNSPECIFIED' | 'ENVIRONMENT_MODE_SHARED' | 'ENVIRONMENT_MODE_ISOLATED'
  backend?: 'RUNTIME_BACKEND_UNSPECIFIED' | 'RUNTIME_BACKEND_K8S' | 'RUNTIME_BACKEND_EXTERNAL'
  namespace?: string
  apiServer?: string
  status?:
    | 'ENVIRONMENT_STATUS_UNSPECIFIED'
    | 'ENVIRONMENT_STATUS_ADMISSION'
    | 'ENVIRONMENT_STATUS_BOOTSTRAPPING'
    | 'ENVIRONMENT_STATUS_READY'
    | 'ENVIRONMENT_STATUS_FAILED'
  statusMessage?: string
  lastError?: EnvironmentError
  managedBy?: string
  createdAt?: string
  updatedAt?: string
  runtimeEndpoint?: string
  cpuCount?: number
}

export type EnvironmentDeployment = {
  appInstanceId?: string
  environment?: Environment
  status?:
    | 'RUNTIME_INSTANCE_STATUS_UNSPECIFIED'
    | 'RUNTIME_INSTANCE_STATUS_UNDEPLOYED'
    | 'RUNTIME_INSTANCE_STATUS_DEPLOYING'
    | 'RUNTIME_INSTANCE_STATUS_READY'
    | 'RUNTIME_INSTANCE_STATUS_FAILED'
    | 'RUNTIME_INSTANCE_STATUS_DRIFTED'
    | 'RUNTIME_INSTANCE_STATUS_INVALID'
  currentRelease?: Release
  desiredRelease?: Release
  currentDeployment?: EnvironmentDeploymentRecord
  error?: Error
  updatedAt?: string
}

export type EnvironmentDeploymentRecord = {
  id?: string
  status?:
    | 'DEPLOYMENT_STATUS_UNSPECIFIED'
    | 'DEPLOYMENT_STATUS_DEPLOYING'
    | 'DEPLOYMENT_STATUS_READY'
    | 'DEPLOYMENT_STATUS_FAILED'
    | 'DEPLOYMENT_STATUS_CANCELLED'
  createdAt?: string
  finalizedAt?: string
}

export type EnvironmentError = {
  code?: string
  message?: string
}

export type Error = {
  phase?: string
  code?: string
  message?: string
  atUnix?: string
}

export type GetAccessChannelsReply = {
  accessChannels?: AccessChannels
}

export type GetAccessPolicyReply = {
  policy?: AccessPolicy
}

export type GetAppInstanceReply = {
  appInstance?: AppInstance
}

export type GetAppRunnerLogReply = {
  data?: AppRunnerLog
  lastArchived?: string
}

export type GetDeploymentOptionsFromDslReq = {
  dsl?: string
}

export type GetDeploymentOptionsFromSourceAppReq = {
  sourceAppId?: string
}

export type GetDeploymentOptionsReply = {
  options?: DeploymentOptions
}

export type GetReleaseReply = {
  release?: Release
}

export type ListApiKeysReply = {
  data?: Array<ApiKey>
  apiUrl?: string
}

export type ListAppInstancesReply = {
  data?: Array<AppInstance>
  pagination?: Pagination
}

export type ListAppRunnerLogsReply = {
  data?: Array<AppRunnerLog>
  pagination?: CursorPagination
  lastArchived?: string
}

export type ListDeployableEnvironmentsReply = {
  data?: Array<Environment>
}

export type ListDeploymentsReply = {
  data?: Array<Deployment>
  pagination?: Pagination
}

export type ListEnvironmentDeploymentsReply = {
  data?: Array<EnvironmentDeployment>
}

export type ListReleaseCredentialCandidatesReply = {
  slots?: Array<CredentialSlot>
}

export type ListReleasesReply = {
  data?: Array<Release>
  pagination?: Pagination
}

export type PromoteReq = {
  appInstanceId?: string
  fromEnvironmentId?: string
  toEnvironmentId?: string
  sourceDeploymentId?: string
  credentials?: Array<CredentialSelectionInput>
  envVars?: Array<EnvVarInput>
  idempotencyKey?: string
}

export type PutAccessPolicyReply = {
  policy?: AccessPolicy
}

export type PutAccessPolicyReq = {
  appInstanceId?: string
  environmentId?: string
  mode?:
    | 'ACCESS_MODE_UNSPECIFIED'
    | 'ACCESS_MODE_PUBLIC'
    | 'ACCESS_MODE_PRIVATE'
    | 'ACCESS_MODE_PRIVATE_ALL'
  subjects?: Array<AccessSubject>
}

export type Release = {
  id?: string
  appInstanceId?: string
  name?: string
  description?: string
  source?: 'RELEASE_SOURCE_UNSPECIFIED' | 'RELEASE_SOURCE_SOURCE_APP' | 'RELEASE_SOURCE_UPLOAD'
  sourceAppId?: string
  gateCommitId?: string
  requiredSlots?: Array<RequiredSlot>
  createdBy?: Actor
  createdAt?: string
}

export type ReportRuntimeAssignmentStatusReply = {
  accepted?: boolean
  stale?: boolean
}

export type ReportRuntimeAssignmentStatusReq = {
  deploymentId?: string
  runtimeInstanceId?: string
  releaseId?: string
  status?: string
  lastError?: RuntimeLastError
  runnerId?: string
  assignmentRevision?: string
}

export type RequiredSlot = {
  type?: 'SLOT_TYPE_UNSPECIFIED' | 'SLOT_TYPE_PLUGIN_CREDENTIAL' | 'SLOT_TYPE_ENV_VAR'
  providerId?: string
  category?: 'PLUGIN_CATEGORY_UNSPECIFIED' | 'PLUGIN_CATEGORY_MODEL' | 'PLUGIN_CATEGORY_TOOL'
  name?: string
}

export type ResolveApiTokenRouteReply = {
  environmentId?: string
  namespace?: string
  serviceName?: string
  servicePort?: number
  environmentStatus?: string
  appId?: string
  tenantId?: string
  runtimeInstanceId?: string
  observedReleaseId?: string
  runtimeInstanceStatus?: string
  revoked?: boolean
  unavailableReason?: string
  targetKind?: string
  directUpstream?: string
}

export type ResolveApiTokenRouteReq = {
  token?: string
}

export type RollbackReq = {
  appInstanceId?: string
  environmentId?: string
  idempotencyKey?: string
}

export type RunnerInfo = {
  hostname?: string
}

export type RuntimeArtifact = {
  dslYaml?: string
  bindingSnapshotVersion?: string
  bindingSnapshot?: {
    [key: string]: unknown
  }
}

export type RuntimeArtifactRequest = {
  runtimeInstanceId?: string
  releaseId?: string
  deploymentId?: string
  bindingSnapshotVersion?: string
}

export type RuntimeArtifactResult = {
  runtimeInstanceId?: string
  releaseId?: string
  artifact?: RuntimeArtifact
  errorCode?: string
  errorMessage?: string
  deploymentId?: string
}

export type RuntimeLastError = {
  phase?: string
  code?: string
  message?: string
  releaseId?: string
}

export type TokenExchangeReply = {
  accessToken?: string
  expiresAt?: string
}

export type TokenExchangeReq = {
  joinToken?: string
}

export type UndeployReq = {
  appInstanceId?: string
  environmentId?: string
  idempotencyKey?: string
}

export type UpdateAccessChannelsReply = {
  accessChannels?: AccessChannels
}

export type UpdateAccessChannelsReq = {
  appInstanceId?: string
  webAppEnabled?: boolean
  developerApiEnabled?: boolean
}

export type UpdateAppInstanceReply = {
  appInstance?: AppInstance
}

export type UpdateAppInstanceReq = {
  appInstanceId?: string
  name?: string
  description?: string
}

export type UpdateReleaseReply = {
  release?: Release
}

export type UpdateReleaseReq = {
  releaseId?: string
  name?: string
  description?: string
}

export type CursorPagination = {
  pageSize?: number
  nextCursor?: string
  prevCursor?: string
  hasNextPage?: boolean
  hasPrevPage?: boolean
  totalCount?: string
}

export type Pagination = {
  totalCount?: number
  perPage?: number
  currentPage?: number
  totalPages?: number
}

export type AccessServiceDeleteApiKeyData = {
  body?: never
  path: {
    apiKeyId: string
  }
  query?: never
  url: '/enterprise/app-deploy/api-keys/{apiKeyId}'
}

export type AccessServiceDeleteApiKeyResponses = {
  200: DeleteApiKeyReply
}

export type AccessServiceDeleteApiKeyResponse
  = AccessServiceDeleteApiKeyResponses[keyof AccessServiceDeleteApiKeyResponses]

export type AppInstanceServiceListAppInstancesData = {
  body?: never
  path?: never
  query?: {
    pageNumber?: number
    resultsPerPage?: number
    name?: string
    environmentId?: string
  }
  url: '/enterprise/app-deploy/app-instances'
}

export type AppInstanceServiceListAppInstancesResponses = {
  200: ListAppInstancesReply
}

export type AppInstanceServiceListAppInstancesResponse
  = AppInstanceServiceListAppInstancesResponses[keyof AppInstanceServiceListAppInstancesResponses]

export type AppInstanceServiceCreateAppInstanceData = {
  body: CreateAppInstanceReq
  path?: never
  query?: never
  url: '/enterprise/app-deploy/app-instances'
}

export type AppInstanceServiceCreateAppInstanceResponses = {
  200: CreateAppInstanceReply
}

export type AppInstanceServiceCreateAppInstanceResponse
  = AppInstanceServiceCreateAppInstanceResponses[keyof AppInstanceServiceCreateAppInstanceResponses]

export type AppInstanceServiceDeleteAppInstanceData = {
  body?: never
  path: {
    appInstanceId: string
  }
  query?: never
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}'
}

export type AppInstanceServiceDeleteAppInstanceResponses = {
  200: DeleteAppInstanceReply
}

export type AppInstanceServiceDeleteAppInstanceResponse
  = AppInstanceServiceDeleteAppInstanceResponses[keyof AppInstanceServiceDeleteAppInstanceResponses]

export type AppInstanceServiceGetAppInstanceData = {
  body?: never
  path: {
    appInstanceId: string
  }
  query?: never
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}'
}

export type AppInstanceServiceGetAppInstanceResponses = {
  200: GetAppInstanceReply
}

export type AppInstanceServiceGetAppInstanceResponse
  = AppInstanceServiceGetAppInstanceResponses[keyof AppInstanceServiceGetAppInstanceResponses]

export type AppInstanceServiceUpdateAppInstanceData = {
  body: UpdateAppInstanceReq
  path: {
    appInstanceId: string
  }
  query?: never
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}'
}

export type AppInstanceServiceUpdateAppInstanceResponses = {
  200: UpdateAppInstanceReply
}

export type AppInstanceServiceUpdateAppInstanceResponse
  = AppInstanceServiceUpdateAppInstanceResponses[keyof AppInstanceServiceUpdateAppInstanceResponses]

export type AccessServiceGetAccessChannelsData = {
  body?: never
  path: {
    appInstanceId: string
  }
  query?: never
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}/access-channels'
}

export type AccessServiceGetAccessChannelsResponses = {
  200: GetAccessChannelsReply
}

export type AccessServiceGetAccessChannelsResponse
  = AccessServiceGetAccessChannelsResponses[keyof AccessServiceGetAccessChannelsResponses]

export type AccessServiceUpdateAccessChannelsData = {
  body: UpdateAccessChannelsReq
  path: {
    appInstanceId: string
  }
  query?: never
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}/access-channels'
}

export type AccessServiceUpdateAccessChannelsResponses = {
  200: UpdateAccessChannelsReply
}

export type AccessServiceUpdateAccessChannelsResponse
  = AccessServiceUpdateAccessChannelsResponses[keyof AccessServiceUpdateAccessChannelsResponses]

export type DeploymentServiceListDeploymentsData = {
  body?: never
  path: {
    appInstanceId: string
  }
  query?: {
    pageNumber?: number
    resultsPerPage?: number
    environmentId?: string
  }
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}/deployments'
}

export type DeploymentServiceListDeploymentsResponses = {
  200: ListDeploymentsReply
}

export type DeploymentServiceListDeploymentsResponse
  = DeploymentServiceListDeploymentsResponses[keyof DeploymentServiceListDeploymentsResponses]

export type DeploymentServiceListEnvironmentDeploymentsData = {
  body?: never
  path: {
    appInstanceId: string
  }
  query?: never
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}/environment-deployments'
}

export type DeploymentServiceListEnvironmentDeploymentsResponses = {
  200: ListEnvironmentDeploymentsReply
}

export type DeploymentServiceListEnvironmentDeploymentsResponse
  = DeploymentServiceListEnvironmentDeploymentsResponses[keyof DeploymentServiceListEnvironmentDeploymentsResponses]

export type AccessServiceGetAccessPolicyData = {
  body?: never
  path: {
    appInstanceId: string
    environmentId: string
  }
  query?: never
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}/environments/{environmentId}/access-policy'
}

export type AccessServiceGetAccessPolicyResponses = {
  200: GetAccessPolicyReply
}

export type AccessServiceGetAccessPolicyResponse
  = AccessServiceGetAccessPolicyResponses[keyof AccessServiceGetAccessPolicyResponses]

export type AccessServicePutAccessPolicyData = {
  body: PutAccessPolicyReq
  path: {
    appInstanceId: string
    environmentId: string
  }
  query?: never
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}/environments/{environmentId}/access-policy'
}

export type AccessServicePutAccessPolicyResponses = {
  200: PutAccessPolicyReply
}

export type AccessServicePutAccessPolicyResponse
  = AccessServicePutAccessPolicyResponses[keyof AccessServicePutAccessPolicyResponses]

export type AccessServiceListApiKeysData = {
  body?: never
  path: {
    appInstanceId: string
    environmentId: string
  }
  query?: never
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}/environments/{environmentId}/api-keys'
}

export type AccessServiceListApiKeysResponses = {
  200: ListApiKeysReply
}

export type AccessServiceListApiKeysResponse
  = AccessServiceListApiKeysResponses[keyof AccessServiceListApiKeysResponses]

export type AccessServiceCreateApiKeyData = {
  body: CreateApiKeyReq
  path: {
    appInstanceId: string
    environmentId: string
  }
  query?: never
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}/environments/{environmentId}/api-keys'
}

export type AccessServiceCreateApiKeyResponses = {
  200: CreateApiKeyReply
}

export type AccessServiceCreateApiKeyResponse
  = AccessServiceCreateApiKeyResponses[keyof AccessServiceCreateApiKeyResponses]

export type DeploymentServiceCancelDeploymentData = {
  body: CancelDeploymentReq
  path: {
    appInstanceId: string
    environmentId: string
  }
  query?: never
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}/environments/{environmentId}/cancel'
}

export type DeploymentServiceCancelDeploymentResponses = {
  200: DeploymentReply
}

export type DeploymentServiceCancelDeploymentResponse
  = DeploymentServiceCancelDeploymentResponses[keyof DeploymentServiceCancelDeploymentResponses]

export type DeploymentServiceDeployData = {
  body: DeployReq
  path: {
    appInstanceId: string
    environmentId: string
  }
  query?: never
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}/environments/{environmentId}/deploy'
}

export type DeploymentServiceDeployResponses = {
  200: DeploymentReply
}

export type DeploymentServiceDeployResponse
  = DeploymentServiceDeployResponses[keyof DeploymentServiceDeployResponses]

export type DeploymentServiceRollbackData = {
  body: RollbackReq
  path: {
    appInstanceId: string
    environmentId: string
  }
  query?: never
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}/environments/{environmentId}/rollback'
}

export type DeploymentServiceRollbackResponses = {
  200: DeploymentReply
}

export type DeploymentServiceRollbackResponse
  = DeploymentServiceRollbackResponses[keyof DeploymentServiceRollbackResponses]

export type DeploymentServiceUndeployData = {
  body: UndeployReq
  path: {
    appInstanceId: string
    environmentId: string
  }
  query?: never
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}/environments/{environmentId}/undeploy'
}

export type DeploymentServiceUndeployResponses = {
  200: DeploymentReply
}

export type DeploymentServiceUndeployResponse
  = DeploymentServiceUndeployResponses[keyof DeploymentServiceUndeployResponses]

export type DeploymentServicePromoteData = {
  body: PromoteReq
  path: {
    appInstanceId: string
  }
  query?: never
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}/promote'
}

export type DeploymentServicePromoteResponses = {
  200: DeploymentReply
}

export type DeploymentServicePromoteResponse
  = DeploymentServicePromoteResponses[keyof DeploymentServicePromoteResponses]

export type ReleaseServiceListReleasesData = {
  body?: never
  path: {
    appInstanceId: string
  }
  query?: {
    releaseId?: string
    name?: string
    pageNumber?: number
    resultsPerPage?: number
    environmentId?: string
  }
  url: '/enterprise/app-deploy/app-instances/{appInstanceId}/releases'
}

export type ReleaseServiceListReleasesResponses = {
  200: ListReleasesReply
}

export type ReleaseServiceListReleasesResponse
  = ReleaseServiceListReleasesResponses[keyof ReleaseServiceListReleasesResponses]

export type EnvironmentServiceListDeployableEnvironmentsData = {
  body?: never
  path?: never
  query?: {
    environmentId?: string
    name?: string
  }
  url: '/enterprise/app-deploy/deployable-environments'
}

export type EnvironmentServiceListDeployableEnvironmentsResponses = {
  200: ListDeployableEnvironmentsReply
}

export type EnvironmentServiceListDeployableEnvironmentsResponse
  = EnvironmentServiceListDeployableEnvironmentsResponses[keyof EnvironmentServiceListDeployableEnvironmentsResponses]

export type ReleaseServiceGetDeploymentOptionsFromDslData = {
  body: GetDeploymentOptionsFromDslReq
  path?: never
  query?: never
  url: '/enterprise/app-deploy/deployment-options/dsl'
}

export type ReleaseServiceGetDeploymentOptionsFromDslResponses = {
  200: GetDeploymentOptionsReply
}

export type ReleaseServiceGetDeploymentOptionsFromDslResponse
  = ReleaseServiceGetDeploymentOptionsFromDslResponses[keyof ReleaseServiceGetDeploymentOptionsFromDslResponses]

export type ReleaseServiceGetDeploymentOptionsFromSourceAppData = {
  body: GetDeploymentOptionsFromSourceAppReq
  path?: never
  query?: never
  url: '/enterprise/app-deploy/deployment-options/source-app'
}

export type ReleaseServiceGetDeploymentOptionsFromSourceAppResponses = {
  200: GetDeploymentOptionsReply
}

export type ReleaseServiceGetDeploymentOptionsFromSourceAppResponse
  = ReleaseServiceGetDeploymentOptionsFromSourceAppResponses[keyof ReleaseServiceGetDeploymentOptionsFromSourceAppResponses]

export type DeploymentServiceCreateInitialDeploymentFromDslData = {
  body: CreateInitialDeploymentFromDslReq
  path?: never
  query?: never
  url: '/enterprise/app-deploy/initial-deployments/dsl'
}

export type DeploymentServiceCreateInitialDeploymentFromDslResponses = {
  200: CreateInitialDeploymentReply
}

export type DeploymentServiceCreateInitialDeploymentFromDslResponse
  = DeploymentServiceCreateInitialDeploymentFromDslResponses[keyof DeploymentServiceCreateInitialDeploymentFromDslResponses]

export type DeploymentServiceCreateInitialDeploymentFromSourceAppData = {
  body: CreateInitialDeploymentFromSourceAppReq
  path?: never
  query?: never
  url: '/enterprise/app-deploy/initial-deployments/source-app'
}

export type DeploymentServiceCreateInitialDeploymentFromSourceAppResponses = {
  200: CreateInitialDeploymentReply
}

export type DeploymentServiceCreateInitialDeploymentFromSourceAppResponse
  = DeploymentServiceCreateInitialDeploymentFromSourceAppResponses[keyof DeploymentServiceCreateInitialDeploymentFromSourceAppResponses]

export type ReleaseServiceCreateReleaseFromDslData = {
  body: CreateReleaseFromDslReq
  path?: never
  query?: never
  url: '/enterprise/app-deploy/releases/dsl'
}

export type ReleaseServiceCreateReleaseFromDslResponses = {
  200: CreateReleaseReply
}

export type ReleaseServiceCreateReleaseFromDslResponse
  = ReleaseServiceCreateReleaseFromDslResponses[keyof ReleaseServiceCreateReleaseFromDslResponses]

export type ReleaseServiceCreateReleaseFromSourceAppData = {
  body: CreateReleaseFromSourceAppReq
  path?: never
  query?: never
  url: '/enterprise/app-deploy/releases/source-app'
}

export type ReleaseServiceCreateReleaseFromSourceAppResponses = {
  200: CreateReleaseReply
}

export type ReleaseServiceCreateReleaseFromSourceAppResponse
  = ReleaseServiceCreateReleaseFromSourceAppResponses[keyof ReleaseServiceCreateReleaseFromSourceAppResponses]

export type ReleaseServiceDeleteReleaseData = {
  body?: never
  path: {
    releaseId: string
  }
  query?: never
  url: '/enterprise/app-deploy/releases/{releaseId}'
}

export type ReleaseServiceDeleteReleaseResponses = {
  200: DeleteReleaseReply
}

export type ReleaseServiceDeleteReleaseResponse
  = ReleaseServiceDeleteReleaseResponses[keyof ReleaseServiceDeleteReleaseResponses]

export type ReleaseServiceGetReleaseData = {
  body?: never
  path: {
    releaseId: string
  }
  query?: never
  url: '/enterprise/app-deploy/releases/{releaseId}'
}

export type ReleaseServiceGetReleaseResponses = {
  200: GetReleaseReply
}

export type ReleaseServiceGetReleaseResponse
  = ReleaseServiceGetReleaseResponses[keyof ReleaseServiceGetReleaseResponses]

export type ReleaseServiceUpdateReleaseData = {
  body: UpdateReleaseReq
  path: {
    releaseId: string
  }
  query?: never
  url: '/enterprise/app-deploy/releases/{releaseId}'
}

export type ReleaseServiceUpdateReleaseResponses = {
  200: UpdateReleaseReply
}

export type ReleaseServiceUpdateReleaseResponse
  = ReleaseServiceUpdateReleaseResponses[keyof ReleaseServiceUpdateReleaseResponses]

export type ReleaseServiceListReleaseCredentialCandidatesData = {
  body?: never
  path: {
    releaseId: string
  }
  query?: never
  url: '/enterprise/app-deploy/releases/{releaseId}/credential-candidates'
}

export type ReleaseServiceListReleaseCredentialCandidatesResponses = {
  200: ListReleaseCredentialCandidatesReply
}

export type ReleaseServiceListReleaseCredentialCandidatesResponse
  = ReleaseServiceListReleaseCredentialCandidatesResponses[keyof ReleaseServiceListReleaseCredentialCandidatesResponses]
