coder/site/src/api/typesGenerated.ts

1694 lines
44 KiB
TypeScript
Raw Normal View History

// Code generated by 'make site/src/api/typesGenerated.ts'. DO NOT EDIT.
2022-10-06 19:02:27 +00:00
// From codersdk/apikey.go
export interface APIKey {
readonly id: string
readonly user_id: string
readonly last_used: string
readonly expires_at: string
readonly created_at: string
readonly updated_at: string
readonly login_type: LoginType
readonly scope: APIKeyScope
readonly token_name: string
readonly lifetime_seconds: number
}
// From codersdk/apikey.go
export interface APIKeyWithOwner extends APIKey {
readonly username: string
}
// From codersdk/licenses.go
export interface AddLicenseRequest {
readonly license: string
}
// From codersdk/templates.go
export interface AgentStatsReportResponse {
readonly num_comms: number
readonly rx_bytes: number
readonly tx_bytes: number
}
// From codersdk/deployment.go
export interface AppHostResponse {
readonly host: string
}
// From codersdk/deployment.go
export interface AppearanceConfig {
readonly logo_url: string
readonly service_banner: ServiceBannerConfig
readonly support_links?: LinkConfig[]
}
// From codersdk/roles.go
export interface AssignableRoles extends Role {
readonly assignable: boolean
}
// From codersdk/audit.go
export type AuditDiff = Record<string, AuditDiffField>
// From codersdk/audit.go
export interface AuditDiffField {
// Empty interface{} type, cannot resolve the type.
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- interface{}
2022-09-07 16:38:19 +00:00
readonly old?: any
// Empty interface{} type, cannot resolve the type.
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- interface{}
2022-09-07 16:38:19 +00:00
readonly new?: any
readonly secret: boolean
}
// From codersdk/audit.go
export interface AuditLog {
readonly id: string
readonly request_id: string
readonly time: string
readonly organization_id: string
// Named type "net/netip.Addr" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly ip: any
readonly user_agent: string
readonly resource_type: ResourceType
readonly resource_id: string
readonly resource_target: string
readonly resource_icon: string
readonly action: AuditAction
readonly diff: AuditDiff
readonly status_code: number
readonly additional_fields: Record<string, string>
readonly description: string
readonly resource_link: string
readonly is_deleted: boolean
readonly user?: User
}
2022-09-07 16:38:19 +00:00
// From codersdk/audit.go
export interface AuditLogResponse {
readonly audit_logs: AuditLog[]
readonly count: number
2022-09-07 16:38:19 +00:00
}
// From codersdk/audit.go
export interface AuditLogsRequest extends Pagination {
readonly q?: string
}
// From codersdk/users.go
export interface AuthMethod {
readonly enabled: boolean
}
// From codersdk/users.go
export interface AuthMethods {
readonly password: AuthMethod
readonly github: AuthMethod
readonly oidc: OIDCAuthMethod
}
// From codersdk/authorization.go
export interface AuthorizationCheck {
readonly object: AuthorizationObject
readonly action: string
}
// From codersdk/authorization.go
export interface AuthorizationObject {
readonly resource_type: RBACResource
readonly owner_id?: string
readonly organization_id?: string
readonly resource_id?: string
}
// From codersdk/authorization.go
export interface AuthorizationRequest {
readonly checks: Record<string, AuthorizationCheck>
}
// From codersdk/authorization.go
export type AuthorizationResponse = Record<string, boolean>
// From codersdk/deployment.go
export interface BuildInfoResponse {
readonly external_url: string
readonly version: string
readonly dashboard_url: string
readonly workspace_proxy: boolean
}
// From codersdk/parameters.go
export interface ComputedParameter extends Parameter {
readonly source_value: string
readonly schema_id: string
readonly default_source_value: boolean
}
// From codersdk/users.go
export interface CreateFirstUserRequest {
readonly email: string
readonly username: string
readonly password: string
readonly trial: boolean
}
// From codersdk/users.go
export interface CreateFirstUserResponse {
readonly user_id: string
readonly organization_id: string
}
2022-10-10 20:37:06 +00:00
// From codersdk/groups.go
export interface CreateGroupRequest {
readonly name: string
readonly avatar_url: string
readonly quota_allowance: number
2022-10-10 20:37:06 +00:00
}
// From codersdk/users.go
export interface CreateOrganizationRequest {
readonly name: string
}
// From codersdk/parameters.go
export interface CreateParameterRequest {
readonly copy_from_parameter?: string
readonly name: string
readonly source_value: string
readonly source_scheme: ParameterSourceScheme
readonly destination_scheme: ParameterDestinationScheme
}
// From codersdk/organizations.go
export interface CreateTemplateRequest {
readonly name: string
readonly display_name?: string
2022-05-16 20:56:11 +00:00
readonly description?: string
2022-08-19 13:17:35 +00:00
readonly icon?: string
readonly template_version_id: string
readonly parameter_values?: CreateParameterRequest[]
readonly default_ttl_ms?: number
readonly max_ttl_ms?: number
readonly allow_user_cancel_workspace_jobs?: boolean
readonly allow_user_autostart?: boolean
readonly allow_user_autostop?: boolean
readonly failure_ttl_ms?: number
readonly inactivity_ttl_ms?: number
}
// From codersdk/templateversions.go
export interface CreateTemplateVersionDryRunRequest {
2022-10-11 15:16:19 +00:00
readonly workspace_name: string
readonly parameter_values: CreateParameterRequest[]
readonly rich_parameter_values: WorkspaceBuildParameter[]
readonly user_variable_values?: VariableValue[]
}
// From codersdk/organizations.go
export interface CreateTemplateVersionRequest {
readonly name?: string
readonly template_id?: string
readonly storage_method: ProvisionerStorageMethod
readonly file_id?: string
readonly example_id?: string
readonly provisioner: ProvisionerType
readonly tags: Record<string, string>
readonly parameter_values?: CreateParameterRequest[]
readonly user_variable_values?: VariableValue[]
}
// From codersdk/audit.go
export interface CreateTestAuditLogRequest {
readonly action?: AuditAction
readonly resource_type?: ResourceType
readonly resource_id?: string
readonly additional_fields?: Record<string, string>
readonly time?: string
readonly build_reason?: BuildReason
}
// 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
}
// From codersdk/users.go
export interface CreateUserRequest {
readonly email: string
readonly username: string
readonly password: string
readonly organization_id: string
}
// From codersdk/workspaces.go
export interface CreateWorkspaceBuildRequest {
readonly template_version_id?: string
readonly transition: WorkspaceTransition
readonly dry_run?: boolean
readonly state?: string
readonly orphan?: boolean
readonly parameter_values?: CreateParameterRequest[]
readonly rich_parameter_values?: WorkspaceBuildParameter[]
readonly log_level?: ProvisionerLogLevel
}
// From codersdk/workspaceproxy.go
export interface CreateWorkspaceProxyRequest {
readonly name: string
readonly display_name: string
readonly icon: string
}
// From codersdk/organizations.go
export interface CreateWorkspaceRequest {
readonly template_id: string
readonly name: string
readonly autostart_schedule?: string
readonly ttl_ms?: number
readonly parameter_values?: CreateParameterRequest[]
readonly rich_parameter_values?: WorkspaceBuildParameter[]
}
// From codersdk/templates.go
export interface DAUEntry {
readonly date: string
readonly amount: number
}
// From codersdk/deployment.go
export interface DERP {
readonly server: DERPServerConfig
readonly config: DERPConfig
}
// From codersdk/deployment.go
export interface DERPConfig {
readonly url: string
readonly path: string
}
2022-10-03 21:01:13 +00:00
// From codersdk/workspaceagents.go
feat: Add Tailscale networking (#3505) * fix: Add coder user to docker group on installation This makes for a simpler setup, and reduces the likelihood a user runs into a strange issue. * Add wgnet * Add ping * Add listening * Finish refactor to make this work * Add interface for swapping * Fix conncache with interface * chore: update gvisor * fix tailscale types * linting * more linting * Add coordinator * Add coordinator tests * Fix coordination * It compiles! * Move all connection negotiation in-memory * Migrate coordinator to use net.conn * Add closed func * Fix close listener func * Make reconnecting PTY work * Fix reconnecting PTY * Update CI to Go 1.19 * Add CLI flags for DERP mapping * Fix Tailnet test * Rename ConnCoordinator to TailnetCoordinator * Remove print statement from workspace agent test * Refactor wsconncache to use tailnet * Remove STUN from unit tests * Add migrate back to dump * chore: Upgrade to Go 1.19 This is required as part of #3505. * Fix reconnecting PTY tests * fix: update wireguard-go to fix devtunnel * fix migration numbers * linting * Return early for status if endpoints are empty * Update cli/server.go Co-authored-by: Colin Adler <colin1adler@gmail.com> * Update cli/server.go Co-authored-by: Colin Adler <colin1adler@gmail.com> * Fix frontend entites * Fix agent bicopy * Fix race condition for the last node * Fix down migration * Fix connection RBAC * Fix migration numbers * Fix forwarding TCP to a local port * Implement ping for tailnet * Rename to ForceHTTP * Add external derpmapping * Expose DERP region names to the API * Add global option to enable Tailscale networking for web * Mark DERP flags hidden while testing * Update DERP map on reconnect * Add close func to workspace agents * Fix race condition in upstream dependency * Fix feature columns race condition Co-authored-by: Colin Adler <colin1adler@gmail.com>
2022-09-01 01:09:44 +00:00
export interface DERPRegion {
readonly preferred: boolean
readonly latency_ms: number
}
// From codersdk/deployment.go
export interface DERPServerConfig {
readonly enable: boolean
readonly region_id: number
readonly region_code: string
readonly region_name: string
// This is likely an enum in an external package ("github.com/coder/coder/cli/clibase.StringArray")
readonly stun_addresses: string[]
readonly relay_url: string
}
// From codersdk/deployment.go
export interface DangerousConfig {
readonly allow_path_app_sharing: boolean
readonly allow_path_app_site_owner_access: boolean
}
// From codersdk/deployment.go
export interface DeploymentDAUsResponse {
readonly entries: DAUEntry[]
2022-10-10 19:04:15 +00:00
}
// From codersdk/deployment.go
export interface DeploymentStats {
readonly aggregated_from: string
readonly collected_at: string
readonly next_update_at: string
readonly workspaces: WorkspaceDeploymentStats
readonly session_count: SessionCountDeploymentStats
}
// From codersdk/deployment.go
export interface DeploymentValues {
readonly verbose?: boolean
readonly access_url?: string
readonly wildcard_access_url?: string
readonly redirect_to_access_url?: boolean
readonly http_address?: string
readonly autobuild_poll_interval?: number
readonly derp?: DERP
readonly prometheus?: PrometheusConfig
readonly pprof?: PprofConfig
// This is likely an enum in an external package ("github.com/coder/coder/cli/clibase.StringArray")
readonly proxy_trusted_headers?: string[]
// This is likely an enum in an external package ("github.com/coder/coder/cli/clibase.StringArray")
readonly proxy_trusted_origins?: string[]
readonly cache_directory?: string
readonly in_memory_database?: boolean
readonly pg_connection_url?: string
readonly oauth2?: OAuth2Config
readonly oidc?: OIDCConfig
readonly telemetry?: TelemetryConfig
readonly tls?: TLSConfig
readonly trace?: TraceConfig
readonly secure_auth_cookie?: boolean
readonly strict_transport_security?: number
// This is likely an enum in an external package ("github.com/coder/coder/cli/clibase.StringArray")
readonly strict_transport_security_options?: string[]
readonly ssh_keygen_algorithm?: string
readonly metrics_cache_refresh_interval?: number
readonly agent_stat_refresh_interval?: number
readonly agent_fallback_troubleshooting_url?: string
readonly browser_only?: boolean
readonly scim_api_key?: string
readonly provisioner?: ProvisionerConfig
readonly rate_limit?: RateLimitConfig
// This is likely an enum in an external package ("github.com/coder/coder/cli/clibase.StringArray")
readonly experiments?: string[]
readonly update_check?: boolean
readonly max_token_lifetime?: number
readonly swagger?: SwaggerConfig
readonly logging?: LoggingConfig
readonly dangerous?: DangerousConfig
readonly disable_path_apps?: boolean
readonly max_session_expiry?: number
readonly disable_session_expiry_refresh?: boolean
readonly disable_password_auth?: boolean
readonly support?: SupportConfig
// Named type "github.com/coder/coder/cli/clibase.Struct[[]github.com/coder/coder/codersdk.GitAuthConfig]" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly git_auth?: any
readonly config_ssh?: SSHConfig
readonly wgtunnel_host?: string
readonly disable_owner_workspace_exec?: boolean
// This is likely an enum in an external package ("github.com/coder/coder/cli/clibase.YAMLConfigPath")
readonly config?: string
readonly write_config?: boolean
// Named type "github.com/coder/coder/cli/clibase.HostPort" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly address?: any
}
// From codersdk/deployment.go
export interface Entitlements {
readonly features: Record<FeatureName, Feature>
readonly warnings: string[]
feat: Add high availability for multiple replicas (#4555) * feat: HA tailnet coordinator * fixup! feat: HA tailnet coordinator * fixup! feat: HA tailnet coordinator * remove printlns * close all connections on coordinator * impelement high availability feature * fixup! impelement high availability feature * fixup! impelement high availability feature * fixup! impelement high availability feature * fixup! impelement high availability feature * Add replicas * Add DERP meshing to arbitrary addresses * Move packages to highavailability folder * Move coordinator to high availability package * Add flags for HA * Rename to replicasync * Denest packages for replicas * Add test for multiple replicas * Fix coordination test * Add HA to the helm chart * Rename function pointer * Add warnings for HA * Add the ability to block endpoints * Add flag to disable P2P connections * Wow, I made the tests pass * Add replicas endpoint * Ensure close kills replica * Update sql * Add database latency to high availability * Pipe TLS to DERP mesh * Fix DERP mesh with TLS * Add tests for TLS * Fix replica sync TLS * Fix RootCA for replica meshing * Remove ID from replicasync * Fix getting certificates for meshing * Remove excessive locking * Fix linting * Store mesh key in the database * Fix replica key for tests * Fix types gen * Fix unlocking unlocked * Fix race in tests * Update enterprise/derpmesh/derpmesh.go Co-authored-by: Colin Adler <colin1adler@gmail.com> * Rename to syncReplicas * Reuse http client * Delete old replicas on a CRON * Fix race condition in connection tests * Fix linting * Fix nil type * Move pubsub to in-memory for twenty test * Add comment for configuration tweaking * Fix leak with transport * Fix close leak in derpmesh * Fix race when creating server * Remove handler update * Skip test on Windows * Fix DERP mesh test * Wrap HTTP handler replacement in mutex * Fix error message for relay * Fix API handler for normal tests * Fix speedtest * Fix replica resend * Fix derpmesh send * Ping async * Increase wait time of template version jobd * Fix race when closing replica sync * Add name to client * Log the derpmap being used * Don't connect if DERP is empty * Improve agent coordinator logging * Fix lock in coordinator * Fix relay addr * Fix race when updating durations * Fix client publish race * Run pubsub loop in a queue * Store agent nodes in order * Fix coordinator locking * Check for closed pipe Co-authored-by: Colin Adler <colin1adler@gmail.com>
2022-10-17 13:43:30 +00:00
readonly errors: string[]
readonly has_license: boolean
readonly trial: boolean
readonly require_telemetry: boolean
}
// From codersdk/deployment.go
export type Experiments = Experiment[]
// From codersdk/deployment.go
export interface Feature {
readonly entitlement: Entitlement
readonly enabled: boolean
readonly limit?: number
readonly actual?: number
}
// From codersdk/apikey.go
export interface GenerateAPIKeyResponse {
readonly key: string
}
// From codersdk/users.go
export interface GetUsersResponse {
readonly users: User[]
readonly count: number
}
// From codersdk/deployment.go
export interface GitAuthConfig {
readonly id: string
readonly type: string
readonly client_id: string
readonly auth_url: string
readonly token_url: string
readonly validate_url: string
readonly regex: string
readonly no_refresh: boolean
readonly scopes: string[]
}
// From codersdk/gitsshkey.go
export interface GitSSHKey {
readonly user_id: string
readonly created_at: string
readonly updated_at: string
readonly public_key: string
}
2022-10-10 20:37:06 +00:00
// From codersdk/groups.go
export interface Group {
readonly id: string
readonly name: string
readonly organization_id: string
readonly members: User[]
readonly avatar_url: string
readonly quota_allowance: number
2022-10-10 20:37:06 +00:00
}
// From codersdk/workspaceapps.go
export interface Healthcheck {
readonly url: string
readonly interval: number
readonly threshold: number
}
// From codersdk/workspaceagents.go
export interface IssueReconnectingPTYSignedTokenRequest {
readonly url: string
readonly agentID: string
}
// From codersdk/workspaceagents.go
export interface IssueReconnectingPTYSignedTokenResponse {
readonly signed_token: string
}
// From codersdk/licenses.go
export interface License {
readonly id: number
readonly uuid: string
readonly uploaded_at: string
// Empty interface{} type, cannot resolve the type.
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- interface{}
readonly claims: Record<string, any>
}
// From codersdk/deployment.go
export interface LinkConfig {
readonly name: string
readonly target: string
readonly icon: string
}
// From codersdk/deployment.go
export interface LoggingConfig {
readonly human: string
readonly json: string
readonly stackdriver: string
}
// From codersdk/users.go
export interface LoginWithPasswordRequest {
readonly email: string
readonly password: string
}
// From codersdk/users.go
export interface LoginWithPasswordResponse {
readonly session_token: string
}
// From codersdk/deployment.go
export interface OAuth2Config {
readonly github: OAuth2GithubConfig
}
// From codersdk/deployment.go
export interface OAuth2GithubConfig {
readonly client_id: string
readonly client_secret: string
// This is likely an enum in an external package ("github.com/coder/coder/cli/clibase.StringArray")
readonly allowed_orgs: string[]
// This is likely an enum in an external package ("github.com/coder/coder/cli/clibase.StringArray")
readonly allowed_teams: string[]
readonly allow_signups: boolean
readonly allow_everyone: boolean
readonly enterprise_base_url: string
}
// From codersdk/users.go
export interface OIDCAuthMethod extends AuthMethod {
readonly signInText: string
readonly iconUrl: string
}
// From codersdk/deployment.go
export interface OIDCConfig {
readonly allow_signups: boolean
readonly client_id: string
readonly client_secret: string
// This is likely an enum in an external package ("github.com/coder/coder/cli/clibase.StringArray")
readonly email_domain: string[]
readonly issuer_url: string
// This is likely an enum in an external package ("github.com/coder/coder/cli/clibase.StringArray")
readonly scopes: string[]
readonly ignore_email_verified: boolean
readonly username_field: string
readonly email_field: string
// Named type "github.com/coder/coder/cli/clibase.Struct[map[string]string]" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly auth_url_params: any
readonly ignore_user_info: boolean
readonly groups_field: string
// Named type "github.com/coder/coder/cli/clibase.Struct[map[string]string]" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly group_mapping: any
readonly sign_in_text: string
readonly icon_url: string
}
// From codersdk/organizations.go
export interface Organization {
readonly id: string
readonly name: string
readonly created_at: string
readonly updated_at: string
}
// From codersdk/organizations.go
export interface OrganizationMember {
readonly user_id: string
readonly organization_id: string
readonly created_at: string
readonly updated_at: string
readonly roles: Role[]
}
// From codersdk/pagination.go
export interface Pagination {
readonly after_id?: string
readonly limit?: number
readonly offset?: number
}
// From codersdk/parameters.go
export interface Parameter {
readonly id: string
readonly scope: ParameterScope
readonly scope_id: string
readonly name: string
readonly source_scheme: ParameterSourceScheme
readonly destination_scheme: ParameterDestinationScheme
readonly created_at: string
readonly updated_at: string
}
// From codersdk/parameters.go
export interface ParameterSchema {
readonly id: string
readonly created_at: string
readonly job_id: string
readonly name: string
readonly description: string
readonly default_source_scheme: ParameterSourceScheme
readonly default_source_value: string
readonly allow_override_source: boolean
readonly default_destination_scheme: ParameterDestinationScheme
readonly allow_override_destination: boolean
readonly default_refresh: string
readonly redisplay_value: boolean
readonly validation_error: string
readonly validation_condition: string
readonly validation_type_system: string
readonly validation_value_type: string
readonly validation_contains?: string[]
}
2022-10-10 20:37:06 +00:00
// From codersdk/groups.go
export interface PatchGroupRequest {
readonly add_users: string[]
readonly remove_users: string[]
readonly name: string
readonly avatar_url?: string
readonly quota_allowance?: number
2022-10-10 20:37:06 +00:00
}
// From codersdk/templateversions.go
export interface PatchTemplateVersionRequest {
readonly name: string
}
// From codersdk/workspaceproxy.go
export interface PatchWorkspaceProxy {
readonly id: string
readonly name: string
readonly display_name: string
readonly icon: string
readonly regenerate_token: boolean
}
// From codersdk/deployment.go
export interface PprofConfig {
readonly enable: boolean
// Named type "github.com/coder/coder/cli/clibase.HostPort" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly address: any
}
// From codersdk/deployment.go
export interface PrometheusConfig {
readonly enable: boolean
// Named type "github.com/coder/coder/cli/clibase.HostPort" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly address: any
readonly collect_agent_stats: boolean
}
// From codersdk/deployment.go
export interface ProvisionerConfig {
readonly daemons: number
readonly daemon_poll_interval: number
readonly daemon_poll_jitter: number
readonly force_cancel_interval: number
}
// From codersdk/provisionerdaemons.go
export interface ProvisionerDaemon {
readonly id: string
readonly created_at: string
readonly updated_at?: string
readonly name: string
readonly provisioners: ProvisionerType[]
readonly tags: Record<string, string>
}
// From codersdk/provisionerdaemons.go
export interface ProvisionerJob {
readonly id: string
readonly created_at: string
readonly started_at?: string
readonly completed_at?: string
readonly canceled_at?: string
readonly error?: string
readonly error_code?: JobErrorCode
readonly status: ProvisionerJobStatus
readonly worker_id?: string
readonly file_id: string
readonly tags: Record<string, string>
}
// From codersdk/provisionerdaemons.go
export interface ProvisionerJobLog {
readonly id: number
readonly created_at: string
readonly log_source: LogSource
readonly log_level: LogLevel
readonly stage: string
readonly output: string
}
// From codersdk/workspaceproxy.go
export interface ProxyHealthReport {
readonly errors: string[]
readonly warnings: string[]
}
// From codersdk/workspaces.go
export interface PutExtendWorkspaceRequest {
readonly deadline: string
}
// From codersdk/deployment.go
export interface RateLimitConfig {
readonly disable_all: boolean
readonly api: number
}
// From codersdk/workspaceproxy.go
export interface Region {
readonly id: string
readonly name: string
readonly display_name: string
readonly icon_url: string
readonly healthy: boolean
readonly path_app_url: string
readonly wildcard_hostname: string
}
// From codersdk/workspaceproxy.go
export interface RegionsResponse {
readonly regions: Region[]
}
feat: Add high availability for multiple replicas (#4555) * feat: HA tailnet coordinator * fixup! feat: HA tailnet coordinator * fixup! feat: HA tailnet coordinator * remove printlns * close all connections on coordinator * impelement high availability feature * fixup! impelement high availability feature * fixup! impelement high availability feature * fixup! impelement high availability feature * fixup! impelement high availability feature * Add replicas * Add DERP meshing to arbitrary addresses * Move packages to highavailability folder * Move coordinator to high availability package * Add flags for HA * Rename to replicasync * Denest packages for replicas * Add test for multiple replicas * Fix coordination test * Add HA to the helm chart * Rename function pointer * Add warnings for HA * Add the ability to block endpoints * Add flag to disable P2P connections * Wow, I made the tests pass * Add replicas endpoint * Ensure close kills replica * Update sql * Add database latency to high availability * Pipe TLS to DERP mesh * Fix DERP mesh with TLS * Add tests for TLS * Fix replica sync TLS * Fix RootCA for replica meshing * Remove ID from replicasync * Fix getting certificates for meshing * Remove excessive locking * Fix linting * Store mesh key in the database * Fix replica key for tests * Fix types gen * Fix unlocking unlocked * Fix race in tests * Update enterprise/derpmesh/derpmesh.go Co-authored-by: Colin Adler <colin1adler@gmail.com> * Rename to syncReplicas * Reuse http client * Delete old replicas on a CRON * Fix race condition in connection tests * Fix linting * Fix nil type * Move pubsub to in-memory for twenty test * Add comment for configuration tweaking * Fix leak with transport * Fix close leak in derpmesh * Fix race when creating server * Remove handler update * Skip test on Windows * Fix DERP mesh test * Wrap HTTP handler replacement in mutex * Fix error message for relay * Fix API handler for normal tests * Fix speedtest * Fix replica resend * Fix derpmesh send * Ping async * Increase wait time of template version jobd * Fix race when closing replica sync * Add name to client * Log the derpmap being used * Don't connect if DERP is empty * Improve agent coordinator logging * Fix lock in coordinator * Fix relay addr * Fix race when updating durations * Fix client publish race * Run pubsub loop in a queue * Store agent nodes in order * Fix coordinator locking * Check for closed pipe Co-authored-by: Colin Adler <colin1adler@gmail.com>
2022-10-17 13:43:30 +00:00
// From codersdk/replicas.go
export interface Replica {
readonly id: string
readonly hostname: string
readonly created_at: string
readonly relay_address: string
readonly region_id: number
readonly error: string
readonly database_latency: number
}
// From codersdk/client.go
export interface Response {
readonly message: string
readonly detail?: string
readonly validations?: ValidationError[]
}
// From codersdk/roles.go
export interface Role {
readonly name: string
readonly display_name: string
}
// From codersdk/deployment.go
export interface SSHConfig {
readonly DeploymentName: string
// This is likely an enum in an external package ("github.com/coder/coder/cli/clibase.StringArray")
readonly SSHConfigOptions: string[]
}
// From codersdk/deployment.go
export interface SSHConfigResponse {
readonly hostname_prefix: string
readonly ssh_config_options: Record<string, string>
}
// From codersdk/serversentevents.go
export interface ServerSentEvent {
readonly type: ServerSentEventType
// Empty interface{} type, cannot resolve the type.
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- interface{}
readonly data: any
}
// From codersdk/deployment.go
export interface ServiceBannerConfig {
2022-12-06 18:38:38 +00:00
readonly enabled: boolean
readonly message?: string
readonly background_color?: string
}
// From codersdk/deployment.go
export interface SessionCountDeploymentStats {
readonly vscode: number
readonly ssh: number
readonly jetbrains: number
readonly reconnecting_pty: number
}
// From codersdk/deployment.go
export interface SupportConfig {
// Named type "github.com/coder/coder/cli/clibase.Struct[[]github.com/coder/coder/codersdk.LinkConfig]" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly links: any
}
// From codersdk/deployment.go
feat: Build framework for generating API docs (#5383) * WIP * Gen * WIP * chi swagger * WIP * WIP * WIP * GetWorkspaces * GetWorkspaces * Markdown * Use widdershins * WIP * WIP * WIP * Markdown template * Fix: makefile * fmt * Fix: comment * Enable swagger conditionally * fix: site * Default false * Flag tests * fix * fix * template fixes * Fix * Fix * Fix * WIP * Formatted * Cleanup * Templates * BEGIN END SECTION * subshell exit code * Fix * Fix merge * WIP * Fix * Fix fmt * Fix * Generic api.md page * Fix merge * Link pages * Fix * Fix * Fix: links * Add icon * Write manifest file * Fix fmt * Fix: enterprise * Fix: Swagger.Enable * Fix: rename apidocs to apidoc * Fix: find -not -prune * Fix: json not available * Fix: rename Coderd API to Coder API * Fix: npm exec * Fix: api dir * Fix: by ID * Fix: string uuid * Fix: include deleted * Fix: indirect go.mod * Fix: source lib.sh * Fix: shellcheck * Fix: pushd popd * Fix: fmt * Fix: improve workspaces * Fix: swagger-enable * Fix * Fix: mention only HTTP 200 * Fix: IDs * Fix: https * Fix: icon * More APis * Fix: format swagger.json * Fix: SwaggerEndpoint * Fix: SCRIPT_DIR * Fix: PROJECT_ROOT * Fix: use code tags in schemas.md * Fix: examples * Fix: examples * Fix: improve format * Fix: date-time,enums * Fix: include_deleted * Fix: array of * Fix: parameter, response * Fix: string time or null * Workspaces: more docs * Workspaces: more docs * Fix: renderDisplayName * Fix: ActiveUserCount * Fix * Fix: typo * Templates: docs * Notice: incomplete
2022-12-19 17:43:46 +00:00
export interface SwaggerConfig {
readonly enable: boolean
feat: Build framework for generating API docs (#5383) * WIP * Gen * WIP * chi swagger * WIP * WIP * WIP * GetWorkspaces * GetWorkspaces * Markdown * Use widdershins * WIP * WIP * WIP * Markdown template * Fix: makefile * fmt * Fix: comment * Enable swagger conditionally * fix: site * Default false * Flag tests * fix * fix * template fixes * Fix * Fix * Fix * WIP * Formatted * Cleanup * Templates * BEGIN END SECTION * subshell exit code * Fix * Fix merge * WIP * Fix * Fix fmt * Fix * Generic api.md page * Fix merge * Link pages * Fix * Fix * Fix: links * Add icon * Write manifest file * Fix fmt * Fix: enterprise * Fix: Swagger.Enable * Fix: rename apidocs to apidoc * Fix: find -not -prune * Fix: json not available * Fix: rename Coderd API to Coder API * Fix: npm exec * Fix: api dir * Fix: by ID * Fix: string uuid * Fix: include deleted * Fix: indirect go.mod * Fix: source lib.sh * Fix: shellcheck * Fix: pushd popd * Fix: fmt * Fix: improve workspaces * Fix: swagger-enable * Fix * Fix: mention only HTTP 200 * Fix: IDs * Fix: https * Fix: icon * More APis * Fix: format swagger.json * Fix: SwaggerEndpoint * Fix: SCRIPT_DIR * Fix: PROJECT_ROOT * Fix: use code tags in schemas.md * Fix: examples * Fix: examples * Fix: improve format * Fix: date-time,enums * Fix: include_deleted * Fix: array of * Fix: parameter, response * Fix: string time or null * Workspaces: more docs * Workspaces: more docs * Fix: renderDisplayName * Fix: ActiveUserCount * Fix * Fix: typo * Templates: docs * Notice: incomplete
2022-12-19 17:43:46 +00:00
}
// From codersdk/deployment.go
export interface TLSConfig {
readonly enable: boolean
// Named type "github.com/coder/coder/cli/clibase.HostPort" unknown, using "any"
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- External type
readonly address: any
readonly redirect_http: boolean
// This is likely an enum in an external package ("github.com/coder/coder/cli/clibase.StringArray")
readonly cert_file: string[]
readonly client_auth: string
readonly client_ca_file: string
// This is likely an enum in an external package ("github.com/coder/coder/cli/clibase.StringArray")
readonly key_file: string[]
readonly min_version: string
readonly client_cert_file: string
readonly client_key_file: string
}
// From codersdk/deployment.go
export interface TelemetryConfig {
readonly enable: boolean
readonly trace: boolean
readonly url: string
}
// From codersdk/templates.go
export interface Template {
readonly id: string
readonly created_at: string
readonly updated_at: string
readonly organization_id: string
readonly name: string
readonly display_name: string
readonly provisioner: ProvisionerType
readonly active_version_id: string
readonly active_user_count: number
readonly build_time_stats: TemplateBuildTimeStats
2022-05-16 20:56:11 +00:00
readonly description: string
2022-08-19 13:17:35 +00:00
readonly icon: string
readonly default_ttl_ms: number
readonly max_ttl_ms: number
readonly created_by_id: string
readonly created_by_name: string
readonly allow_user_autostart: boolean
readonly allow_user_autostop: boolean
readonly allow_user_cancel_workspace_jobs: boolean
readonly failure_ttl_ms: number
readonly inactivity_ttl_ms: number
}
2022-10-10 20:37:06 +00:00
// From codersdk/templates.go
export interface TemplateACL {
readonly users: TemplateUser[]
readonly group: TemplateGroup[]
}
// From codersdk/templates.go
export type TemplateBuildTimeStats = Record<
WorkspaceTransition,
TransitionStats
>
// From codersdk/templates.go
export interface TemplateDAUsResponse {
readonly entries: DAUEntry[]
}
// From codersdk/templates.go
export interface TemplateExample {
readonly id: string
readonly url: string
readonly name: string
readonly description: string
readonly icon: string
readonly tags: string[]
readonly markdown: string
}
2022-10-10 20:37:06 +00:00
// From codersdk/templates.go
export interface TemplateGroup extends Group {
readonly role: TemplateRole
}
// From codersdk/templates.go
export interface TemplateUser extends User {
readonly role: TemplateRole
}
// From codersdk/templateversions.go
export interface TemplateVersion {
readonly id: string
readonly template_id?: string
readonly organization_id?: string
readonly created_at: string
readonly updated_at: string
readonly name: string
readonly job: ProvisionerJob
readonly readme: string
readonly created_by: User
}
// From codersdk/templateversions.go
export interface TemplateVersionGitAuth {
readonly id: string
readonly type: GitProvider
readonly authenticate_url: string
readonly authenticated: boolean
}
// From codersdk/templateversions.go
export interface TemplateVersionParameter {
readonly name: string
readonly display_name?: string
readonly description: string
readonly description_plaintext: string
readonly type: string
readonly mutable: boolean
readonly default_value: string
readonly icon: string
readonly options: TemplateVersionParameterOption[]
readonly validation_error?: string
readonly validation_regex?: string
readonly validation_min?: number
readonly validation_max?: number
readonly validation_monotonic?: ValidationMonotonicOrder
readonly required: boolean
readonly legacy_variable_name?: string
}
// From codersdk/templateversions.go
export interface TemplateVersionParameterOption {
readonly name: string
readonly description: string
readonly value: string
readonly icon: string
}
// From codersdk/templateversions.go
export interface TemplateVersionVariable {
readonly name: string
readonly description: string
readonly type: string
readonly value: string
readonly default_value: string
readonly required: boolean
readonly sensitive: boolean
}
// From codersdk/templates.go
export interface TemplateVersionsByTemplateRequest extends Pagination {
readonly template_id: string
}
// From codersdk/apikey.go
export interface TokenConfig {
// This is likely an enum in an external package ("time.Duration")
readonly max_token_lifetime: number
}
// From codersdk/apikey.go
export interface TokensFilter {
readonly include_all: boolean
}
// From codersdk/deployment.go
export interface TraceConfig {
readonly enable: boolean
readonly honeycomb_api_key: string
readonly capture_logs: boolean
}
// From codersdk/templates.go
export interface TransitionStats {
readonly P50?: number
readonly P95?: number
}
// From codersdk/templates.go
export interface UpdateActiveTemplateVersion {
readonly id: string
}
// From codersdk/deployment.go
export interface UpdateAppearanceConfig {
readonly logo_url: string
readonly service_banner: ServiceBannerConfig
}
// From codersdk/updatecheck.go
export interface UpdateCheckResponse {
readonly current: boolean
readonly version: string
readonly url: string
}
// From codersdk/users.go
export interface UpdateRoles {
readonly roles: string[]
}
2022-10-10 20:37:06 +00:00
// From codersdk/templates.go
export interface UpdateTemplateACL {
readonly user_perms?: Record<string, TemplateRole>
readonly group_perms?: Record<string, TemplateRole>
}
// From codersdk/templates.go
export interface UpdateTemplateMeta {
readonly name?: string
readonly display_name?: string
readonly description?: string
2022-08-19 13:17:35 +00:00
readonly icon?: string
readonly default_ttl_ms?: number
readonly max_ttl_ms?: number
readonly allow_user_autostart?: boolean
readonly allow_user_autostop?: boolean
readonly allow_user_cancel_workspace_jobs?: boolean
readonly failure_ttl_ms?: number
readonly inactivity_ttl_ms?: number
}
// From codersdk/users.go
export interface UpdateUserPasswordRequest {
readonly old_password: string
readonly password: string
}
// From codersdk/users.go
export interface UpdateUserProfileRequest {
readonly username: string
}
// From codersdk/workspaces.go
export interface UpdateWorkspaceAutostartRequest {
readonly schedule?: string
}
// From codersdk/workspaceproxy.go
export interface UpdateWorkspaceProxyResponse {
readonly proxy: WorkspaceProxy
readonly proxy_token: string
}
// From codersdk/workspaces.go
export interface UpdateWorkspaceRequest {
readonly name?: string
}
// From codersdk/workspaces.go
export interface UpdateWorkspaceTTLRequest {
readonly ttl_ms?: number
}
// From codersdk/files.go
export interface UploadResponse {
readonly hash: string
}
// From codersdk/users.go
export interface User {
readonly id: string
readonly username: string
readonly email: string
readonly created_at: string
2022-09-26 15:31:03 +00:00
readonly last_seen_at: string
readonly status: UserStatus
readonly organization_ids: string[]
readonly roles: Role[]
readonly avatar_url: string
}
// From codersdk/users.go
export interface UserRoles {
readonly roles: string[]
readonly organization_roles: Record<string, string[]>
}
// From codersdk/users.go
export interface UsersRequest extends Pagination {
readonly q?: string
}
// From codersdk/client.go
export interface ValidationError {
readonly field: string
readonly detail: string
}
// From codersdk/organizations.go
export interface VariableValue {
readonly name: string
readonly value: string
}
// From codersdk/workspaces.go
export interface Workspace {
readonly id: string
readonly created_at: string
readonly updated_at: string
readonly owner_id: string
readonly owner_name: string
readonly organization_id: string
readonly template_id: string
readonly template_name: string
readonly template_display_name: string
readonly template_icon: string
readonly template_allow_user_cancel_workspace_jobs: boolean
readonly latest_build: WorkspaceBuild
readonly outdated: boolean
readonly name: string
readonly autostart_schedule?: string
readonly ttl_ms?: number
readonly last_used_at: string
readonly deleting_at?: string
}
2022-10-03 21:01:13 +00:00
// From codersdk/workspaceagents.go
export interface WorkspaceAgent {
readonly id: string
readonly created_at: string
readonly updated_at: string
readonly first_connected_at?: string
readonly last_connected_at?: string
readonly disconnected_at?: string
readonly status: WorkspaceAgentStatus
readonly lifecycle_state: WorkspaceAgentLifecycle
readonly name: string
readonly resource_id: string
readonly instance_id?: string
readonly architecture: string
readonly environment_variables: Record<string, string>
readonly operating_system: string
readonly startup_script?: string
readonly startup_logs_length: number
readonly startup_logs_overflowed: boolean
readonly directory?: string
readonly expanded_directory?: string
readonly version: string
feat: Add Tailscale networking (#3505) * fix: Add coder user to docker group on installation This makes for a simpler setup, and reduces the likelihood a user runs into a strange issue. * Add wgnet * Add ping * Add listening * Finish refactor to make this work * Add interface for swapping * Fix conncache with interface * chore: update gvisor * fix tailscale types * linting * more linting * Add coordinator * Add coordinator tests * Fix coordination * It compiles! * Move all connection negotiation in-memory * Migrate coordinator to use net.conn * Add closed func * Fix close listener func * Make reconnecting PTY work * Fix reconnecting PTY * Update CI to Go 1.19 * Add CLI flags for DERP mapping * Fix Tailnet test * Rename ConnCoordinator to TailnetCoordinator * Remove print statement from workspace agent test * Refactor wsconncache to use tailnet * Remove STUN from unit tests * Add migrate back to dump * chore: Upgrade to Go 1.19 This is required as part of #3505. * Fix reconnecting PTY tests * fix: update wireguard-go to fix devtunnel * fix migration numbers * linting * Return early for status if endpoints are empty * Update cli/server.go Co-authored-by: Colin Adler <colin1adler@gmail.com> * Update cli/server.go Co-authored-by: Colin Adler <colin1adler@gmail.com> * Fix frontend entites * Fix agent bicopy * Fix race condition for the last node * Fix down migration * Fix connection RBAC * Fix migration numbers * Fix forwarding TCP to a local port * Implement ping for tailnet * Rename to ForceHTTP * Add external derpmapping * Expose DERP region names to the API * Add global option to enable Tailscale networking for web * Mark DERP flags hidden while testing * Update DERP map on reconnect * Add close func to workspace agents * Fix race condition in upstream dependency * Fix feature columns race condition Co-authored-by: Colin Adler <colin1adler@gmail.com>
2022-09-01 01:09:44 +00:00
readonly apps: WorkspaceApp[]
readonly latency?: Record<string, DERPRegion>
readonly connection_timeout_seconds: number
readonly troubleshooting_url: string
readonly login_before_ready: boolean
readonly startup_script_timeout_seconds: number
readonly shutdown_script?: string
readonly shutdown_script_timeout_seconds: number
2022-06-24 15:25:01 +00:00
}
// From codersdk/workspaceagentconn.go
export interface WorkspaceAgentListeningPort {
readonly process_name: string
readonly network: string
readonly port: number
}
// From codersdk/workspaceagentconn.go
export interface WorkspaceAgentListeningPortsResponse {
readonly ports: WorkspaceAgentListeningPort[]
}
2023-03-31 20:26:19 +00:00
// From codersdk/workspaceagents.go
export interface WorkspaceAgentMetadata {
readonly result: WorkspaceAgentMetadataResult
readonly description: WorkspaceAgentMetadataDescription
}
// From codersdk/workspaceagents.go
export interface WorkspaceAgentMetadataDescription {
readonly display_name: string
readonly key: string
readonly script: string
readonly interval: number
readonly timeout: number
}
// From codersdk/workspaceagents.go
export interface WorkspaceAgentMetadataResult {
readonly collected_at: string
readonly age: number
readonly value: string
readonly error: string
}
// From codersdk/workspaceagents.go
export interface WorkspaceAgentStartupLog {
readonly id: number
readonly created_at: string
readonly output: string
readonly level: LogLevel
}
// From codersdk/workspaceapps.go
feat: Add workspace application support (#1773) * feat: Add app support This adds apps as a property to a workspace agent. The resource is added to the Terraform provider here: https://github.com/coder/terraform-provider-coder/pull/17 Apps will be opened in the dashboard or via the CLI with `coder open <name>`. If `command` is specified, a terminal will appear locally and in the web. If `target` is specified, the browser will open to an exposed instance of that target. * Compare fields in apps test * Update Terraform provider to use relative path * Add some basic structure for routing * chore: Remove interface from coderd and lift API surface Abstracting coderd into an interface added misdirection because the interface was never intended to be fulfilled outside of a single implementation. This lifts the abstraction, and attaches all handlers to a root struct named `*coderd.API`. * Add basic proxy logic * Add proxying based on path * Add app proxying for wildcards * Add wsconncache * fix: Race when writing to a closed pipe This is such an intermittent race it's difficult to track, but regardless this is an improvement to the code. * fix: Race when writing to a closed pipe This is such an intermittent race it's difficult to track, but regardless this is an improvement to the code. * fix: Race when writing to a closed pipe This is such an intermittent race it's difficult to track, but regardless this is an improvement to the code. * fix: Race when writing to a closed pipe This is such an intermittent race it's difficult to track, but regardless this is an improvement to the code. * Add workspace route proxying endpoint - Makes the workspace conn cache concurrency-safe - Reduces unnecessary open checks in `peer.Channel` - Fixes the use of a temporary context when dialing a workspace agent * Add embed errors * chore: Refactor site to improve testing It was difficult to develop this package due to the embed build tag being mandatory on the tests. The logic to test doesn't require any embedded files. * Add test for error handler * Remove unused access url * Add RBAC tests * Fix dial agent syntax * Fix linting errors * Fix gen * Fix icon required * Adjust migration number * Fix proxy error status code * Fix empty db lookup
2022-06-04 20:13:37 +00:00
export interface WorkspaceApp {
readonly id: string
readonly url: string
readonly external: boolean
readonly slug: string
readonly display_name: string
feat: Add workspace application support (#1773) * feat: Add app support This adds apps as a property to a workspace agent. The resource is added to the Terraform provider here: https://github.com/coder/terraform-provider-coder/pull/17 Apps will be opened in the dashboard or via the CLI with `coder open <name>`. If `command` is specified, a terminal will appear locally and in the web. If `target` is specified, the browser will open to an exposed instance of that target. * Compare fields in apps test * Update Terraform provider to use relative path * Add some basic structure for routing * chore: Remove interface from coderd and lift API surface Abstracting coderd into an interface added misdirection because the interface was never intended to be fulfilled outside of a single implementation. This lifts the abstraction, and attaches all handlers to a root struct named `*coderd.API`. * Add basic proxy logic * Add proxying based on path * Add app proxying for wildcards * Add wsconncache * fix: Race when writing to a closed pipe This is such an intermittent race it's difficult to track, but regardless this is an improvement to the code. * fix: Race when writing to a closed pipe This is such an intermittent race it's difficult to track, but regardless this is an improvement to the code. * fix: Race when writing to a closed pipe This is such an intermittent race it's difficult to track, but regardless this is an improvement to the code. * fix: Race when writing to a closed pipe This is such an intermittent race it's difficult to track, but regardless this is an improvement to the code. * Add workspace route proxying endpoint - Makes the workspace conn cache concurrency-safe - Reduces unnecessary open checks in `peer.Channel` - Fixes the use of a temporary context when dialing a workspace agent * Add embed errors * chore: Refactor site to improve testing It was difficult to develop this package due to the embed build tag being mandatory on the tests. The logic to test doesn't require any embedded files. * Add test for error handler * Remove unused access url * Add RBAC tests * Fix dial agent syntax * Fix linting errors * Fix gen * Fix icon required * Adjust migration number * Fix proxy error status code * Fix empty db lookup
2022-06-04 20:13:37 +00:00
readonly command?: string
readonly icon?: string
readonly subdomain: boolean
readonly sharing_level: WorkspaceAppSharingLevel
readonly healthcheck: Healthcheck
readonly health: WorkspaceAppHealth
feat: Add workspace application support (#1773) * feat: Add app support This adds apps as a property to a workspace agent. The resource is added to the Terraform provider here: https://github.com/coder/terraform-provider-coder/pull/17 Apps will be opened in the dashboard or via the CLI with `coder open <name>`. If `command` is specified, a terminal will appear locally and in the web. If `target` is specified, the browser will open to an exposed instance of that target. * Compare fields in apps test * Update Terraform provider to use relative path * Add some basic structure for routing * chore: Remove interface from coderd and lift API surface Abstracting coderd into an interface added misdirection because the interface was never intended to be fulfilled outside of a single implementation. This lifts the abstraction, and attaches all handlers to a root struct named `*coderd.API`. * Add basic proxy logic * Add proxying based on path * Add app proxying for wildcards * Add wsconncache * fix: Race when writing to a closed pipe This is such an intermittent race it's difficult to track, but regardless this is an improvement to the code. * fix: Race when writing to a closed pipe This is such an intermittent race it's difficult to track, but regardless this is an improvement to the code. * fix: Race when writing to a closed pipe This is such an intermittent race it's difficult to track, but regardless this is an improvement to the code. * fix: Race when writing to a closed pipe This is such an intermittent race it's difficult to track, but regardless this is an improvement to the code. * Add workspace route proxying endpoint - Makes the workspace conn cache concurrency-safe - Reduces unnecessary open checks in `peer.Channel` - Fixes the use of a temporary context when dialing a workspace agent * Add embed errors * chore: Refactor site to improve testing It was difficult to develop this package due to the embed build tag being mandatory on the tests. The logic to test doesn't require any embedded files. * Add test for error handler * Remove unused access url * Add RBAC tests * Fix dial agent syntax * Fix linting errors * Fix gen * Fix icon required * Adjust migration number * Fix proxy error status code * Fix empty db lookup
2022-06-04 20:13:37 +00:00
}
// From codersdk/workspacebuilds.go
export interface WorkspaceBuild {
readonly id: string
readonly created_at: string
readonly updated_at: string
readonly workspace_id: string
readonly workspace_name: string
readonly workspace_owner_id: string
readonly workspace_owner_name: string
readonly template_version_id: string
readonly template_version_name: string
readonly build_number: number
readonly transition: WorkspaceTransition
readonly initiator_id: string
readonly initiator_name: string
readonly job: ProvisionerJob
readonly reason: BuildReason
readonly resources: WorkspaceResource[]
readonly deadline?: string
readonly max_deadline?: string
readonly status: WorkspaceStatus
readonly daily_cost: number
}
// From codersdk/workspacebuilds.go
export interface WorkspaceBuildParameter {
readonly name: string
readonly value: string
}
// From codersdk/workspaces.go
export interface WorkspaceBuildsRequest extends Pagination {
readonly WorkspaceID: string
readonly Since: string
}
// From codersdk/deployment.go
export interface WorkspaceConnectionLatencyMS {
readonly P50: number
readonly P95: number
}
// From codersdk/deployment.go
export interface WorkspaceDeploymentStats {
readonly pending: number
readonly building: number
readonly running: number
readonly failed: number
readonly stopped: number
readonly connection_latency_ms: WorkspaceConnectionLatencyMS
readonly rx_bytes: number
readonly tx_bytes: number
}
// From codersdk/workspaces.go
export interface WorkspaceFilter {
readonly q?: string
}
// From codersdk/workspaces.go
export interface WorkspaceOptions {
readonly include_deleted?: boolean
}
// From codersdk/workspaceproxy.go
export interface WorkspaceProxy {
readonly id: string
readonly name: string
readonly display_name: string
readonly icon: string
readonly url: string
readonly wildcard_hostname: string
readonly created_at: string
readonly updated_at: string
readonly deleted: boolean
readonly status?: WorkspaceProxyStatus
}
// From codersdk/deployment.go
export interface WorkspaceProxyBuildInfo {
readonly workspace_proxy: boolean
readonly dashboard_url: string
}
// From codersdk/workspaceproxy.go
export interface WorkspaceProxyStatus {
readonly status: ProxyHealthStatus
readonly report?: ProxyHealthReport
readonly checked_at: string
}
// From codersdk/workspaces.go
2022-09-30 18:01:20 +00:00
export interface WorkspaceQuota {
readonly credits_consumed: number
readonly budget: number
2022-09-30 18:01:20 +00:00
}
2022-10-03 21:01:13 +00:00
// From codersdk/workspacebuilds.go
export interface WorkspaceResource {
readonly id: string
readonly created_at: string
readonly job_id: string
readonly workspace_transition: WorkspaceTransition
readonly type: string
readonly name: string
2022-09-09 19:38:00 +00:00
readonly hide: boolean
readonly icon: string
readonly agents?: WorkspaceAgent[]
readonly metadata?: WorkspaceResourceMetadata[]
readonly daily_cost: number
}
2022-10-03 21:01:13 +00:00
// From codersdk/workspacebuilds.go
export interface WorkspaceResourceMetadata {
readonly key: string
readonly value: string
readonly sensitive: boolean
}
// From codersdk/workspaces.go
export interface WorkspacesRequest extends Pagination {
readonly q?: string
}
// From codersdk/workspaces.go
export interface WorkspacesResponse {
readonly workspaces: Workspace[]
readonly count: number
}
// From codersdk/apikey.go
export type APIKeyScope = "all" | "application_connect"
export const APIKeyScopes: APIKeyScope[] = ["all", "application_connect"]
// From codersdk/audit.go
export type AuditAction =
| "create"
| "delete"
| "login"
| "logout"
| "register"
| "start"
| "stop"
| "write"
export const AuditActions: AuditAction[] = [
"create",
"delete",
"login",
"logout",
"register",
"start",
"stop",
"write",
]
// From codersdk/workspacebuilds.go
export type BuildReason = "autostart" | "autostop" | "initiator"
export const BuildReasons: BuildReason[] = [
"autostart",
"autostop",
"initiator",
]
// From codersdk/deployment.go
export type Entitlement = "entitled" | "grace_period" | "not_entitled"
export const Entitlements: Entitlement[] = [
"entitled",
"grace_period",
"not_entitled",
]
// From codersdk/deployment.go
export type Experiment = "moons" | "workspace_actions"
export const Experiments: Experiment[] = ["moons", "workspace_actions"]
// From codersdk/deployment.go
export type FeatureName =
| "advanced_template_scheduling"
| "appearance"
| "audit_log"
| "browser_only"
| "external_provisioner_daemons"
| "high_availability"
| "multiple_git_auth"
| "scim"
| "template_rbac"
| "user_limit"
| "workspace_proxy"
export const FeatureNames: FeatureName[] = [
"advanced_template_scheduling",
"appearance",
"audit_log",
"browser_only",
"external_provisioner_daemons",
"high_availability",
"multiple_git_auth",
"scim",
"template_rbac",
"user_limit",
"workspace_proxy",
]
// From codersdk/workspaceagents.go
export type GitProvider = "azure-devops" | "bitbucket" | "github" | "gitlab"
export const GitProviders: GitProvider[] = [
"azure-devops",
"bitbucket",
"github",
"gitlab",
]
// From codersdk/provisionerdaemons.go
export type JobErrorCode =
| "MISSING_TEMPLATE_PARAMETER"
| "REQUIRED_TEMPLATE_VARIABLES"
export const JobErrorCodes: JobErrorCode[] = [
"MISSING_TEMPLATE_PARAMETER",
"REQUIRED_TEMPLATE_VARIABLES",
]
// From codersdk/provisionerdaemons.go
export type LogLevel = "debug" | "error" | "info" | "trace" | "warn"
export const LogLevels: LogLevel[] = ["debug", "error", "info", "trace", "warn"]
// From codersdk/provisionerdaemons.go
export type LogSource = "provisioner" | "provisioner_daemon"
export const LogSources: LogSource[] = ["provisioner", "provisioner_daemon"]
2022-10-06 19:02:27 +00:00
// From codersdk/apikey.go
export type LoginType = "github" | "oidc" | "password" | "token"
export const LoginTypes: LoginType[] = ["github", "oidc", "password", "token"]
// From codersdk/parameters.go
export type ParameterDestinationScheme =
| "environment_variable"
| "none"
| "provisioner_variable"
export const ParameterDestinationSchemes: ParameterDestinationScheme[] = [
"environment_variable",
"none",
"provisioner_variable",
]
// From codersdk/parameters.go
export type ParameterScope = "import_job" | "template" | "workspace"
export const ParameterScopes: ParameterScope[] = [
"import_job",
"template",
"workspace",
]
// From codersdk/parameters.go
export type ParameterSourceScheme = "data" | "none"
export const ParameterSourceSchemes: ParameterSourceScheme[] = ["data", "none"]
// From codersdk/parameters.go
export type ParameterTypeSystem = "hcl" | "none"
export const ParameterTypeSystems: ParameterTypeSystem[] = ["hcl", "none"]
// From codersdk/provisionerdaemons.go
export type ProvisionerJobStatus =
| "canceled"
| "canceling"
| "failed"
| "pending"
| "running"
| "succeeded"
export const ProvisionerJobStatuses: ProvisionerJobStatus[] = [
"canceled",
"canceling",
"failed",
"pending",
"running",
"succeeded",
]
2022-04-19 02:03:37 +00:00
// From codersdk/workspaces.go
export type ProvisionerLogLevel = "debug"
export const ProvisionerLogLevels: ProvisionerLogLevel[] = ["debug"]
// From codersdk/organizations.go
export type ProvisionerStorageMethod = "file"
export const ProvisionerStorageMethods: ProvisionerStorageMethod[] = ["file"]
// From codersdk/organizations.go
export type ProvisionerType = "echo" | "terraform"
export const ProvisionerTypes: ProvisionerType[] = ["echo", "terraform"]
// From codersdk/workspaceproxy.go
export type ProxyHealthStatus =
| "ok"
| "unhealthy"
| "unreachable"
| "unregistered"
export const ProxyHealthStatuses: ProxyHealthStatus[] = [
"ok",
"unhealthy",
"unreachable",
"unregistered",
]
// From codersdk/rbacresources.go
export type RBACResource =
| "api_key"
| "application_connect"
| "assign_org_role"
| "assign_role"
| "audit_log"
| "debug_info"
| "deployment_config"
| "deployment_stats"
| "file"
| "group"
| "license"
| "organization"
| "organization_member"
| "provisioner_daemon"
| "replicas"
| "system"
| "template"
| "user"
| "user_data"
| "workspace"
| "workspace_execution"
| "workspace_proxy"
export const RBACResources: RBACResource[] = [
"api_key",
"application_connect",
"assign_org_role",
"assign_role",
"audit_log",
"debug_info",
"deployment_config",
"deployment_stats",
"file",
"group",
"license",
"organization",
"organization_member",
"provisioner_daemon",
"replicas",
"system",
"template",
"user",
"user_data",
"workspace",
"workspace_execution",
"workspace_proxy",
]
// From codersdk/audit.go
export type ResourceType =
| "api_key"
| "git_ssh_key"
| "group"
| "license"
| "template"
| "template_version"
| "user"
| "workspace"
| "workspace_build"
export const ResourceTypes: ResourceType[] = [
"api_key",
"git_ssh_key",
"group",
"license",
"template",
"template_version",
"user",
"workspace",
"workspace_build",
]
// From codersdk/serversentevents.go
export type ServerSentEventType = "data" | "error" | "ping"
export const ServerSentEventTypes: ServerSentEventType[] = [
"data",
"error",
"ping",
]
2022-10-10 20:37:06 +00:00
// From codersdk/templates.go
2022-10-12 19:33:21 +00:00
export type TemplateRole = "" | "admin" | "use"
export const TemplateRoles: TemplateRole[] = ["", "admin", "use"]
2022-10-10 20:37:06 +00:00
// From codersdk/users.go
export type UserStatus = "active" | "suspended"
export const UserStatuses: UserStatus[] = ["active", "suspended"]
// From codersdk/templateversions.go
export type ValidationMonotonicOrder = "decreasing" | "increasing"
export const ValidationMonotonicOrders: ValidationMonotonicOrder[] = [
"decreasing",
"increasing",
]
// From codersdk/workspaceagents.go
export type WorkspaceAgentLifecycle =
| "created"
| "off"
| "ready"
| "shutdown_error"
| "shutdown_timeout"
| "shutting_down"
| "start_error"
| "start_timeout"
| "starting"
export const WorkspaceAgentLifecycles: WorkspaceAgentLifecycle[] = [
"created",
"off",
"ready",
"shutdown_error",
"shutdown_timeout",
"shutting_down",
"start_error",
"start_timeout",
"starting",
]
2022-10-03 21:01:13 +00:00
// From codersdk/workspaceagents.go
export type WorkspaceAgentStatus =
| "connected"
| "connecting"
| "disconnected"
| "timeout"
export const WorkspaceAgentStatuses: WorkspaceAgentStatus[] = [
"connected",
"connecting",
"disconnected",
"timeout",
]
// From codersdk/workspaceapps.go
export type WorkspaceAppHealth =
| "disabled"
| "healthy"
| "initializing"
| "unhealthy"
export const WorkspaceAppHealths: WorkspaceAppHealth[] = [
"disabled",
"healthy",
"initializing",
"unhealthy",
]
// From codersdk/workspaceapps.go
export type WorkspaceAppSharingLevel = "authenticated" | "owner" | "public"
export const WorkspaceAppSharingLevels: WorkspaceAppSharingLevel[] = [
"authenticated",
"owner",
"public",
]
// From codersdk/workspacebuilds.go
export type WorkspaceStatus =
| "canceled"
| "canceling"
| "deleted"
| "deleting"
| "failed"
| "pending"
| "running"
| "starting"
| "stopped"
| "stopping"
export const WorkspaceStatuses: WorkspaceStatus[] = [
"canceled",
"canceling",
"deleted",
"deleting",
"failed",
"pending",
"running",
"starting",
"stopped",
"stopping",
]
// From codersdk/workspacebuilds.go
export type WorkspaceTransition = "delete" | "start" | "stop"
export const WorkspaceTransitions: WorkspaceTransition[] = [
"delete",
"start",
"stop",
]