fix: generate typescript types for healthcheck pkg (#8846)

This commit is contained in:
Colin Adler
2023-08-03 16:20:46 -05:00
committed by GitHub
parent 72780c8031
commit 8ee500c59d
21 changed files with 333 additions and 204 deletions
+91 -2
View File
@@ -1,5 +1,7 @@
// Code generated by 'make site/src/api/typesGenerated.ts'. DO NOT EDIT.
// The code below is generated from codersdk.
// From codersdk/templates.go
export interface ACLAvailable {
readonly users: User[]
@@ -235,7 +237,6 @@ export interface CreateTestAuditLogRequest {
// From codersdk/apikey.go
export interface CreateTokenRequest {
// This is likely an enum in an external package ("time.Duration")
readonly lifetime: number
readonly scope: APIKeyScope
readonly token_name: string
@@ -1075,7 +1076,6 @@ export interface TemplateVersionsByTemplateRequest extends Pagination {
// From codersdk/apikey.go
export interface TokenConfig {
// This is likely an enum in an external package ("time.Duration")
readonly max_token_lifetime: number
}
@@ -1928,3 +1928,92 @@ export const WorkspaceTransitions: WorkspaceTransition[] = [
// From codersdk/workspaceproxy.go
export type RegionTypes = Region | WorkspaceProxy
// The code below is generated from coderd/healthcheck.
// From healthcheck/accessurl.go
export interface HealthcheckAccessURLReport {
readonly access_url: string
readonly healthy: boolean
readonly reachable: boolean
readonly status_code: number
readonly healthz_response: string
readonly error?: string
}
// From healthcheck/derp.go
export interface HealthcheckDERPNodeReport {
readonly healthy: boolean
// Named type "tailscale.com/tailcfg.DERPNode" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly node?: any
// Named type "tailscale.com/derp.ServerInfoMessage" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly node_info: any
readonly can_exchange_messages: boolean
readonly round_trip_ping: string
readonly round_trip_ping_ms: number
readonly uses_websocket: boolean
readonly client_logs: string[][]
readonly client_errs: string[][]
readonly error?: string
readonly stun: HealthcheckDERPStunReport
}
// From healthcheck/derp.go
export interface HealthcheckDERPRegionReport {
readonly healthy: boolean
// Named type "tailscale.com/tailcfg.DERPRegion" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly region?: any
readonly node_reports: HealthcheckDERPNodeReport[]
readonly error?: string
}
// From healthcheck/derp.go
export interface HealthcheckDERPReport {
readonly healthy: boolean
readonly regions: Record<number, HealthcheckDERPRegionReport>
// Named type "tailscale.com/net/netcheck.Report" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly netcheck?: any
readonly netcheck_err?: string
readonly netcheck_logs: string[]
readonly error?: string
}
// From healthcheck/derp.go
export interface HealthcheckDERPStunReport {
readonly Enabled: boolean
readonly CanSTUN: boolean
readonly Error?: string
}
// From healthcheck/database.go
export interface HealthcheckDatabaseReport {
readonly healthy: boolean
readonly reachable: boolean
readonly latency: string
readonly latency_ms: number
readonly error?: string
}
// From healthcheck/healthcheck.go
export interface HealthcheckReport {
readonly time: string
readonly healthy: boolean
readonly failing_sections: string[]
readonly derp: HealthcheckDERPReport
readonly access_url: HealthcheckAccessURLReport
readonly websocket: HealthcheckWebsocketReport
readonly database: HealthcheckDatabaseReport
readonly coder_version: string
}
// From healthcheck/websocket.go
export interface HealthcheckWebsocketReport {
readonly healthy: boolean
readonly body: string
readonly code: number
readonly error?: string
}