Skip to content

chore: move agent functions from codersdk into agentsdk #5903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jan 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename codersdk.WorkspaceAppHostResponse to codersdk.AppHostResponse
  • Loading branch information
kylecarbs committed Jan 29, 2023
commit af3f67a6874a00505250bbac7d3b9b952da2e5e2
20 changes: 10 additions & 10 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion coderd/workspaceapps.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const (
// @Security CoderSessionToken
// @Produce json
// @Tags Applications
// @Success 200 {object} codersdk.WorkspaceAppHostResponse
// @Success 200 {object} codersdk.AppHostResponse
// @Router /applications/host [get]
func (api *API) appHost(rw http.ResponseWriter, r *http.Request) {
host := api.AppHostname
Expand Down
6 changes: 3 additions & 3 deletions docs/api/applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ curl -X GET http://coder-server:8080/api/v2/applications/host \

### Responses

| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.WorkspaceAppHostResponse](schemas.md#codersdkworkspaceapphostresponse) |
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.AppHostResponse](schemas.md#codersdkapphostresponse) |

To perform this operation, you must be authenticated. [Learn more](authentication.md).
28 changes: 14 additions & 14 deletions docs/api/schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,20 @@
| --------- | ------ | -------- | ------------ | ----------- |
| `license` | string | true | | |

## codersdk.AppHostResponse

```json
{
"host": "string"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| ------ | ------ | -------- | ------------ | ------------------------------------------------------------- |
| `host` | string | false | | Host is the externally accessible URL for the Coder instance. |

## codersdk.AppearanceConfig

```json
Expand Down Expand Up @@ -5083,20 +5097,6 @@ Parameter represents a set value for the scope.
| `healthy` |
| `unhealthy` |

## codersdk.WorkspaceAppHostResponse

```json
{
"host": "string"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| ------ | ------ | -------- | ------------ | ------------------------------------------------------------- |
| `host` | string | false | | Host is the externally accessible URL for the Coder instance. |

## codersdk.WorkspaceAppSharingLevel

```json
Expand Down
20 changes: 10 additions & 10 deletions site/src/api/typesGenerated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export interface AgentStatsReportResponse {
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
Expand Down Expand Up @@ -330,7 +335,7 @@ export interface DeploymentConfigField<T extends Flaggable> {
readonly value: T
}

// From codersdk/insights.go
// From codersdk/deployment.go
export interface DeploymentDAUsResponse {
readonly entries: DAUEntry[]
}
Expand Down Expand Up @@ -468,7 +473,7 @@ export interface Organization {
readonly updated_at: string
}

// From codersdk/organizationmember.go
// From codersdk/organizations.go
export interface OrganizationMember {
readonly user_id: string
readonly organization_id: string
Expand Down Expand Up @@ -615,7 +620,7 @@ export interface Role {
readonly display_name: string
}

// From codersdk/sse.go
// From codersdk/serversentevents.go
export interface ServerSentEvent {
readonly type: ServerSentEventType
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO explain why this is needed
Expand Down Expand Up @@ -936,11 +941,6 @@ export interface WorkspaceApp {
readonly health: WorkspaceAppHealth
}

// From codersdk/workspaces.go
export interface WorkspaceAppHostResponse {
readonly host: string
}

// From codersdk/workspacebuilds.go
export interface WorkspaceBuild {
readonly id: string
Expand Down Expand Up @@ -986,7 +986,7 @@ export interface WorkspaceOptions {
readonly include_deleted?: boolean
}

// From codersdk/quota.go
// From codersdk/workspaces.go
export interface WorkspaceQuota {
readonly credits_consumed: number
readonly budget: number
Expand Down Expand Up @@ -1167,7 +1167,7 @@ export const ResourceTypes: ResourceType[] = [
"workspace_build",
]

// From codersdk/sse.go
// From codersdk/serversentevents.go
export type ServerSentEventType = "data" | "error" | "ping"
export const ServerSentEventTypes: ServerSentEventType[] = [
"data",
Expand Down