Skip to content

Commit 11008e4

Browse files
committed
fix types
1 parent 6aa0a6d commit 11008e4

File tree

4 files changed

+12
-33
lines changed

4 files changed

+12
-33
lines changed

codersdk/agentconn.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ var (
3030

3131
// ReconnectingPTYRequest is sent from the client to the server
3232
// to pipe data to a PTY.
33+
// @typescript-ignore ReconnectingPTYRequest
3334
type ReconnectingPTYRequest struct {
3435
Data string `json:"data"`
3536
Height uint16 `json:"height"`
3637
Width uint16 `json:"width"`
3738
}
3839

40+
// @typescript-ignore AgentConn
3941
type AgentConn struct {
4042
*tailnet.Conn
4143
CloseFunc func()
@@ -70,6 +72,7 @@ func (c *AgentConn) Close() error {
7072
return c.Conn.Close()
7173
}
7274

75+
// @typescript-ignore ReconnectingPTYInit
7376
type ReconnectingPTYInit struct {
7477
ID string
7578
Height uint16

codersdk/workspaceagents.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,36 +25,43 @@ import (
2525
"github.com/coder/retry"
2626
)
2727

28+
// @typescript-ignore GoogleInstanceIdentityToken
2829
type GoogleInstanceIdentityToken struct {
2930
JSONWebToken string `json:"json_web_token" validate:"required"`
3031
}
3132

33+
// @typescript-ignore AWSInstanceIdentityToken
3234
type AWSInstanceIdentityToken struct {
3335
Signature string `json:"signature" validate:"required"`
3436
Document string `json:"document" validate:"required"`
3537
}
3638

39+
// @typescript-ignore ReconnectingPTYRequest
3740
type AzureInstanceIdentityToken struct {
3841
Signature string `json:"signature" validate:"required"`
3942
Encoding string `json:"encoding" validate:"required"`
4043
}
4144

4245
// WorkspaceAgentAuthenticateResponse is returned when an instance ID
4346
// has been exchanged for a session token.
47+
// @typescript-ignore WorkspaceAgentAuthenticateResponse
4448
type WorkspaceAgentAuthenticateResponse struct {
4549
SessionToken string `json:"session_token"`
4650
}
4751

4852
// WorkspaceAgentConnectionInfo returns required information for establishing
4953
// a connection with a workspace.
54+
// @typescript-ignore WorkspaceAgentConnectionInfo
5055
type WorkspaceAgentConnectionInfo struct {
5156
DERPMap *tailcfg.DERPMap `json:"derp_map"`
5257
}
5358

59+
// @typescript-ignore PostWorkspaceAgentVersionRequest
5460
type PostWorkspaceAgentVersionRequest struct {
5561
Version string `json:"version"`
5662
}
5763

64+
// @typescript-ignore WorkspaceAgentMetadata
5865
type WorkspaceAgentMetadata struct {
5966
DERPMap *tailcfg.DERPMap `json:"derpmap"`
6067
EnvironmentVariables map[string]string `json:"environment_variables"`
@@ -409,6 +416,7 @@ func (c *Client) WorkspaceAgentReconnectingPTY(ctx context.Context, agentID, rec
409416
// Stats records the Agent's network connection statistics for use in
410417
// user-facing metrics and debugging.
411418
// Each member value must be written and read with atomic.
419+
// @typescript-ignore AgentStats
412420
type AgentStats struct {
413421
NumConns int64 `json:"num_comms"`
414422
RxBytes int64 `json:"rx_bytes"`

codersdk/workspaceapps.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type WorkspaceApp struct {
3030
Health WorkspaceAppHealth `json:"health"`
3131
}
3232

33+
// @typescript-ignore PostWorkspaceAppHealthsRequest
3334
type PostWorkspaceAppHealthsRequest struct {
3435
// Healths is a map of the workspace app name and the health of the app.
3536
Healths map[string]WorkspaceAppHealth

site/src/api/typesGenerated.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ export interface APIKey {
1212
readonly lifetime_seconds: number
1313
}
1414

15-
// From codersdk/workspaceagents.go
16-
export interface AWSInstanceIdentityToken {
17-
readonly signature: string
18-
readonly document: string
19-
}
20-
2115
// From codersdk/licenses.go
2216
export interface AddLicenseRequest {
2317
readonly license: string
@@ -249,11 +243,6 @@ export interface GitSSHKey {
249243
readonly public_key: string
250244
}
251245

252-
// From codersdk/workspaceagents.go
253-
export interface GoogleInstanceIdentityToken {
254-
readonly json_web_token: string
255-
}
256-
257246
// From codersdk/licenses.go
258247
export interface License {
259248
readonly id: number
@@ -330,16 +319,6 @@ export interface ParameterSchema {
330319
readonly validation_contains?: string[]
331320
}
332321

333-
// From codersdk/workspaceagents.go
334-
export interface PostWorkspaceAgentVersionRequest {
335-
readonly version: string
336-
}
337-
338-
// From codersdk/workspaceapps.go
339-
export interface PostWorkspaceAppHealthsRequest {
340-
readonly Healths: Record<string, WorkspaceAppHealth>
341-
}
342-
343322
// From codersdk/provisionerdaemons.go
344323
export interface ProvisionerDaemon {
345324
readonly id: string
@@ -580,18 +559,6 @@ export interface WorkspaceAgent {
580559
readonly latency?: Record<string, DERPRegion>
581560
}
582561

583-
// From codersdk/workspaceagents.go
584-
export interface WorkspaceAgentAuthenticateResponse {
585-
readonly session_token: string
586-
}
587-
588-
// From codersdk/workspaceagents.go
589-
export interface WorkspaceAgentConnectionInfo {
590-
// Named type "tailscale.com/tailcfg.DERPMap" unknown, using "any"
591-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
592-
readonly derp_map?: any
593-
}
594-
595562
// From codersdk/workspaceresources.go
596563
export interface WorkspaceAgentInstanceMetadata {
597564
readonly jail_orchestrator: string

0 commit comments

Comments
 (0)