Skip to content

Commit d3c4119

Browse files
committed
fix types
1 parent ec673bd commit d3c4119

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"`
@@ -407,6 +414,7 @@ func (c *Client) WorkspaceAgentReconnectingPTY(ctx context.Context, agentID, rec
407414
// Stats records the Agent's network connection statistics for use in
408415
// user-facing metrics and debugging.
409416
// Each member value must be written and read with atomic.
417+
// @typescript-ignore AgentStats
410418
type AgentStats struct {
411419
NumConns int64 `json:"num_comms"`
412420
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
@@ -250,11 +244,6 @@ export interface GitSSHKey {
250244
readonly public_key: string
251245
}
252246

253-
// From codersdk/workspaceagents.go
254-
export interface GoogleInstanceIdentityToken {
255-
readonly json_web_token: string
256-
}
257-
258247
// From codersdk/licenses.go
259248
export interface License {
260249
readonly id: number
@@ -331,16 +320,6 @@ export interface ParameterSchema {
331320
readonly validation_contains?: string[]
332321
}
333322

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

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy