mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
chore: remove coder/preview dependency from codersdk (#17939)
This commit is contained in:
@ -9,8 +9,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
|
||||
previewtypes "github.com/coder/preview/types"
|
||||
)
|
||||
|
||||
type TemplateVersionWarning string
|
||||
@ -125,20 +123,6 @@ func (c *Client) CancelTemplateVersion(ctx context.Context, version uuid.UUID) e
|
||||
return nil
|
||||
}
|
||||
|
||||
type DynamicParametersRequest struct {
|
||||
// ID identifies the request. The response contains the same
|
||||
// ID so that the client can match it to the request.
|
||||
ID int `json:"id"`
|
||||
Inputs map[string]string `json:"inputs"`
|
||||
}
|
||||
|
||||
type DynamicParametersResponse struct {
|
||||
ID int `json:"id"`
|
||||
Diagnostics previewtypes.Diagnostics `json:"diagnostics"`
|
||||
Parameters []previewtypes.Parameter `json:"parameters"`
|
||||
// TODO: Workspace tags
|
||||
}
|
||||
|
||||
// TemplateVersionParameters returns parameters a template version exposes.
|
||||
func (c *Client) TemplateVersionRichParameters(ctx context.Context, version uuid.UUID) ([]TemplateVersionParameter, error) {
|
||||
res, err := c.Request(ctx, http.MethodGet, fmt.Sprintf("/api/v2/templateversions/%s/rich-parameters", version), nil)
|
||||
|
Reference in New Issue
Block a user