From ca7d55fc518deb1ed6fe1a057df1264285086420 Mon Sep 17 00:00:00 2001 From: Jaayden Halko Date: Mon, 9 Jun 2025 14:34:24 +0000 Subject: [PATCH 01/17] chore: remove dynamic-parameters experiment --- coderd/coderd.go | 3 - coderd/parameters_test.go | 7 +- coderd/workspacebuilds.go | 16 +---- coderd/workspaces.go | 2 +- coderd/wsbuilder/wsbuilder.go | 5 -- codersdk/deployment.go | 1 - enterprise/coderd/parameters_test.go | 4 +- enterprise/coderd/workspaces_test.go | 2 +- .../WorkspaceMoreActions.tsx | 6 +- .../workspaces/WorkspaceUpdateDialogs.tsx | 15 ++-- .../CreateWorkspaceExperimentRouter.tsx | 70 ++++++++----------- .../TemplateSettingsForm.tsx | 4 -- .../TemplateSettingsPage.tsx | 3 - .../TemplateSettingsPageView.tsx | 3 - .../WorkspaceParametersExperimentRouter.tsx | 61 +++++++--------- .../pages/WorkspacesPage/WorkspacesPage.tsx | 4 +- 16 files changed, 70 insertions(+), 136 deletions(-) diff --git a/coderd/coderd.go b/coderd/coderd.go index 0b8a13befde56..8cc5435542189 100644 --- a/coderd/coderd.go +++ b/coderd/coderd.go @@ -1153,9 +1153,6 @@ func New(options *Options) *API { }) r.Group(func(r chi.Router) { - r.Use( - httpmw.RequireExperiment(api.Experiments, codersdk.ExperimentDynamicParameters), - ) r.Route("/dynamic-parameters", func(r chi.Router) { r.Post("/evaluate", api.templateVersionDynamicParametersEvaluate) r.Get("/", api.templateVersionDynamicParametersWebsocket) diff --git a/coderd/parameters_test.go b/coderd/parameters_test.go index 98a5d546eaffc..3cc7e86d8e3a3 100644 --- a/coderd/parameters_test.go +++ b/coderd/parameters_test.go @@ -29,9 +29,7 @@ import ( func TestDynamicParametersOwnerSSHPublicKey(t *testing.T) { t.Parallel() - cfg := coderdtest.DeploymentValues(t) - cfg.Experiments = []string{string(codersdk.ExperimentDynamicParameters)} - ownerClient := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true, DeploymentValues: cfg}) + ownerClient := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerDaemon: true}) owner := coderdtest.CreateFirstUser(t, ownerClient) templateAdmin, _ := coderdtest.CreateAnotherUser(t, ownerClient, owner.OrganizationID, rbac.RoleTemplateAdmin()) @@ -354,14 +352,11 @@ type dynamicParamsTest struct { } func setupDynamicParamsTest(t *testing.T, args setupDynamicParamsTestParams) dynamicParamsTest { - cfg := coderdtest.DeploymentValues(t) - cfg.Experiments = []string{string(codersdk.ExperimentDynamicParameters)} ownerClient, _, api := coderdtest.NewWithAPI(t, &coderdtest.Options{ Database: args.db, Pubsub: args.ps, IncludeProvisionerDaemon: true, ProvisionerDaemonVersion: args.provisionerDaemonVersion, - DeploymentValues: cfg, }) owner := coderdtest.CreateFirstUser(t, ownerClient) diff --git a/coderd/workspacebuilds.go b/coderd/workspacebuilds.go index c01004653f86e..4d90948a8f9a1 100644 --- a/coderd/workspacebuilds.go +++ b/coderd/workspacebuilds.go @@ -384,20 +384,8 @@ func (api *API) postWorkspaceBuilds(rw http.ResponseWriter, r *http.Request) { builder = builder.State(createBuild.ProvisionerState) } - // Only defer to dynamic parameters if the experiment is enabled. - if api.Experiments.Enabled(codersdk.ExperimentDynamicParameters) { - if createBuild.EnableDynamicParameters != nil { - // Explicit opt-in - builder = builder.DynamicParameters(*createBuild.EnableDynamicParameters) - } - } else { - if createBuild.EnableDynamicParameters != nil { - api.Logger.Warn(ctx, "ignoring dynamic parameter field sent by request, the experiment is not enabled", - slog.F("field", *createBuild.EnableDynamicParameters), - slog.F("user", apiKey.UserID.String()), - slog.F("transition", string(createBuild.Transition)), - ) - } + if createBuild.EnableDynamicParameters != nil { + builder = builder.DynamicParameters(*createBuild.EnableDynamicParameters) } workspaceBuild, provisionerJob, provisionerDaemons, err = builder.Build( diff --git a/coderd/workspaces.go b/coderd/workspaces.go index fe0c2d3f609a2..d38de99e95eba 100644 --- a/coderd/workspaces.go +++ b/coderd/workspaces.go @@ -717,7 +717,7 @@ func createWorkspace( builder = builder.MarkPrebuiltWorkspaceClaim() } - if req.EnableDynamicParameters && api.Experiments.Enabled(codersdk.ExperimentDynamicParameters) { + if req.EnableDynamicParameters { builder = builder.DynamicParameters(req.EnableDynamicParameters) } diff --git a/coderd/wsbuilder/wsbuilder.go b/coderd/wsbuilder/wsbuilder.go index bcc2cef40ebdc..d4be0747436f6 100644 --- a/coderd/wsbuilder/wsbuilder.go +++ b/coderd/wsbuilder/wsbuilder.go @@ -1042,11 +1042,6 @@ func (b *Builder) checkRunningBuild() error { } func (b *Builder) usingDynamicParameters() bool { - if !b.experiments.Enabled(codersdk.ExperimentDynamicParameters) { - // Experiment required - return false - } - vals, err := b.getTemplateTerraformValues() if err != nil { return false diff --git a/codersdk/deployment.go b/codersdk/deployment.go index ac72ed2fc1ec1..23715e50a8aba 100644 --- a/codersdk/deployment.go +++ b/codersdk/deployment.go @@ -3356,7 +3356,6 @@ const ( ExperimentNotifications Experiment = "notifications" // Sends notifications via SMTP and webhooks following certain events. ExperimentWorkspaceUsage Experiment = "workspace-usage" // Enables the new workspace usage tracking. ExperimentWebPush Experiment = "web-push" // Enables web push notifications through the browser. - ExperimentDynamicParameters Experiment = "dynamic-parameters" // Enables dynamic parameters when creating a workspace. ExperimentWorkspacePrebuilds Experiment = "workspace-prebuilds" // Enables the new workspace prebuilds feature. ExperimentAgenticChat Experiment = "agentic-chat" // Enables the new agentic AI chat feature. ExperimentAITasks Experiment = "ai-tasks" // Enables the new AI tasks feature. diff --git a/enterprise/coderd/parameters_test.go b/enterprise/coderd/parameters_test.go index 605385430e779..5fc0eaa4aa369 100644 --- a/enterprise/coderd/parameters_test.go +++ b/enterprise/coderd/parameters_test.go @@ -21,8 +21,6 @@ import ( func TestDynamicParametersOwnerGroups(t *testing.T) { t.Parallel() - cfg := coderdtest.DeploymentValues(t) - cfg.Experiments = []string{string(codersdk.ExperimentDynamicParameters)} ownerClient, owner := coderdenttest.New(t, &coderdenttest.Options{ LicenseOptions: &coderdenttest.LicenseOptions{ @@ -30,7 +28,7 @@ func TestDynamicParametersOwnerGroups(t *testing.T) { codersdk.FeatureTemplateRBAC: 1, }, }, - Options: &coderdtest.Options{IncludeProvisionerDaemon: true, DeploymentValues: cfg}, + Options: &coderdtest.Options{IncludeProvisionerDaemon: true}, }, ) templateAdmin, templateAdminUser := coderdtest.CreateAnotherUser(t, ownerClient, owner.OrganizationID, rbac.RoleTemplateAdmin()) diff --git a/enterprise/coderd/workspaces_test.go b/enterprise/coderd/workspaces_test.go index 226232f37bf7f..164234048a16e 100644 --- a/enterprise/coderd/workspaces_test.go +++ b/enterprise/coderd/workspaces_test.go @@ -1698,7 +1698,7 @@ func TestWorkspaceTemplateParamsChange(t *testing.T) { logger := slogtest.Make(t, &slogtest.Options{IgnoreErrors: false}) dv := coderdtest.DeploymentValues(t) - dv.Experiments = []string{string(codersdk.ExperimentDynamicParameters)} + client, owner := coderdenttest.New(t, &coderdenttest.Options{ Options: &coderdtest.Options{ Logger: &logger, diff --git a/site/src/modules/workspaces/WorkspaceMoreActions/WorkspaceMoreActions.tsx b/site/src/modules/workspaces/WorkspaceMoreActions/WorkspaceMoreActions.tsx index 8cdbafad435a3..d2a9e54c24759 100644 --- a/site/src/modules/workspaces/WorkspaceMoreActions/WorkspaceMoreActions.tsx +++ b/site/src/modules/workspaces/WorkspaceMoreActions/WorkspaceMoreActions.tsx @@ -43,14 +43,12 @@ export const WorkspaceMoreActions: FC = ({ disabled, }) => { const queryClient = useQueryClient(); - const { experiments } = useDashboard(); - const isDynamicParametersEnabled = experiments.includes("dynamic-parameters"); const optOutQuery = useDynamicParametersOptOut({ templateId: workspace.template_id, templateUsesClassicParameters: workspace.template_use_classic_parameter_flow, - enabled: isDynamicParametersEnabled, + enabled: true, }); // Permissions @@ -154,7 +152,7 @@ export const WorkspaceMoreActions: FC = ({ onClose={() => setIsDownloadDialogOpen(false)} /> - {!isDynamicParametersEnabled || optOutQuery.data?.optedOut ? ( + {optOutQuery.data?.optedOut ? ( { @@ -164,13 +161,11 @@ const MissingBuildParametersDialog: FC = ({ error, ...dialogProps }) => { - const { experiments } = useDashboard(); - const isDynamicParametersEnabled = experiments.includes("dynamic-parameters"); const optOutQuery = useDynamicParametersOptOut({ templateId: workspace.template_id, templateUsesClassicParameters: workspace.template_use_classic_parameter_flow, - enabled: isDynamicParametersEnabled, + enabled: true, }); const missedParameters = @@ -182,13 +177,11 @@ const MissingBuildParametersDialog: FC = ({ if (optOutQuery.isError) { return ; } - if (isDynamicParametersEnabled && !optOutQuery.data) { + if (!optOutQuery.data) { return ; } - // If dynamic parameters experiment is not enabled, or if opted out, use classic dialog - const shouldUseClassicDialog = - !isDynamicParametersEnabled || optOutQuery.data?.optedOut; + const shouldUseClassicDialog = optOutQuery.data?.optedOut; return shouldUseClassicDialog ? ( { - const { experiments } = useDashboard(); - const isDynamicParametersEnabled = experiments.includes("dynamic-parameters"); - const { organization: organizationName = "default", template: templateName } = useParams() as { organization?: string; template: string }; - const templateQuery = useQuery({ - ...templateByName(organizationName, templateName), - enabled: isDynamicParametersEnabled, - }); + const templateQuery = useQuery(templateByName(organizationName, templateName)); const optOutQuery = useDynamicParametersOptOut({ templateId: templateQuery.data?.id, @@ -31,40 +24,37 @@ const CreateWorkspaceExperimentRouter: FC = () => { enabled: !!templateQuery.data, }); - if (isDynamicParametersEnabled) { - if (templateQuery.isError) { - return ; - } - if (optOutQuery.isError) { - return ; - } - if (!optOutQuery.data) { - return ; - } - - const toggleOptedOut = () => { - const key = optOutKey(optOutQuery.data?.templateId ?? ""); - const storedValue = localStorage.getItem(key); - - const current = storedValue - ? storedValue === "true" - : Boolean(templateQuery.data?.use_classic_parameter_flow); - - localStorage.setItem(key, (!current).toString()); - optOutQuery.refetch(); - }; - return ( - - {optOutQuery.data.optedOut ? ( - - ) : ( - - )} - - ); + if (templateQuery.isError) { + return ; + } + if (optOutQuery.isError) { + return ; + } + if (!optOutQuery.data) { + return ; } - return ; + const toggleOptedOut = () => { + const key = optOutKey(optOutQuery.data?.templateId ?? ""); + const storedValue = localStorage.getItem(key); + + const current = storedValue + ? storedValue === "true" + : Boolean(templateQuery.data?.use_classic_parameter_flow); + + localStorage.setItem(key, (!current).toString()); + optOutQuery.refetch(); + }; + + return ( + + {optOutQuery.data.optedOut ? ( + + ) : ( + + )} + + ); }; export default CreateWorkspaceExperimentRouter; diff --git a/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsForm.tsx b/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsForm.tsx index 8ba0e7b948b8c..cdafacf561db6 100644 --- a/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsForm.tsx +++ b/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsForm.tsx @@ -63,7 +63,6 @@ export interface TemplateSettingsForm { accessControlEnabled: boolean; advancedSchedulingEnabled: boolean; portSharingControlsEnabled: boolean; - isDynamicParametersEnabled: boolean; } export const TemplateSettingsForm: FC = ({ @@ -76,7 +75,6 @@ export const TemplateSettingsForm: FC = ({ accessControlEnabled, advancedSchedulingEnabled, portSharingControlsEnabled, - isDynamicParametersEnabled, }) => { const form = useFormik({ initialValues: { @@ -226,7 +224,6 @@ export const TemplateSettingsForm: FC = ({ } /> - {isDynamicParametersEnabled && ( = ({ } /> - )} diff --git a/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsPage.tsx b/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsPage.tsx index e27f0b75c81e4..be5af252aec31 100644 --- a/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsPage.tsx +++ b/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsPage.tsx @@ -14,8 +14,6 @@ import { useTemplateSettings } from "../TemplateSettingsLayout"; import { TemplateSettingsPageView } from "./TemplateSettingsPageView"; const TemplateSettingsPage: FC = () => { - const { experiments } = useDashboard(); - const isDynamicParametersEnabled = experiments.includes("dynamic-parameters"); const { template: templateName } = useParams() as { template: string }; const navigate = useNavigate(); const getLink = useLinks(); @@ -81,7 +79,6 @@ const TemplateSettingsPage: FC = () => { accessControlEnabled={accessControlEnabled} advancedSchedulingEnabled={advancedSchedulingEnabled} sharedPortControlsEnabled={sharedPortControlsEnabled} - isDynamicParametersEnabled={isDynamicParametersEnabled} /> ); diff --git a/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsPageView.tsx b/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsPageView.tsx index 059999d27bb74..e267d25ce572e 100644 --- a/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsPageView.tsx +++ b/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsPageView.tsx @@ -15,7 +15,6 @@ interface TemplateSettingsPageViewProps { accessControlEnabled: boolean; advancedSchedulingEnabled: boolean; sharedPortControlsEnabled: boolean; - isDynamicParametersEnabled: boolean; } export const TemplateSettingsPageView: FC = ({ @@ -28,7 +27,6 @@ export const TemplateSettingsPageView: FC = ({ accessControlEnabled, advancedSchedulingEnabled, sharedPortControlsEnabled, - isDynamicParametersEnabled, }) => { return ( <> @@ -46,7 +44,6 @@ export const TemplateSettingsPageView: FC = ({ accessControlEnabled={accessControlEnabled} advancedSchedulingEnabled={advancedSchedulingEnabled} portSharingControlsEnabled={sharedPortControlsEnabled} - isDynamicParametersEnabled={isDynamicParametersEnabled} /> ); diff --git a/site/src/pages/WorkspaceSettingsPage/WorkspaceParametersPage/WorkspaceParametersExperimentRouter.tsx b/site/src/pages/WorkspaceSettingsPage/WorkspaceParametersPage/WorkspaceParametersExperimentRouter.tsx index 476a764ac9204..8e47b0105664d 100644 --- a/site/src/pages/WorkspaceSettingsPage/WorkspaceParametersPage/WorkspaceParametersExperimentRouter.tsx +++ b/site/src/pages/WorkspaceSettingsPage/WorkspaceParametersPage/WorkspaceParametersExperimentRouter.tsx @@ -1,6 +1,5 @@ import { ErrorAlert } from "components/Alert/ErrorAlert"; import { Loader } from "components/Loader/Loader"; -import { useDashboard } from "modules/dashboard/useDashboard"; import { optOutKey, useDynamicParametersOptOut, @@ -12,49 +11,43 @@ import WorkspaceParametersPage from "./WorkspaceParametersPage"; import WorkspaceParametersPageExperimental from "./WorkspaceParametersPageExperimental"; const WorkspaceParametersExperimentRouter: FC = () => { - const { experiments } = useDashboard(); const workspace = useWorkspaceSettings(); - const isDynamicParametersEnabled = experiments.includes("dynamic-parameters"); const optOutQuery = useDynamicParametersOptOut({ templateId: workspace.template_id, templateUsesClassicParameters: workspace.template_use_classic_parameter_flow, - enabled: isDynamicParametersEnabled, + enabled: true, }); - if (isDynamicParametersEnabled) { - if (optOutQuery.isError) { - return ; - } - if (!optOutQuery.data) { - return ; - } - - const toggleOptedOut = () => { - const key = optOutKey(optOutQuery.data.templateId); - const storedValue = localStorage.getItem(key); - - const current = storedValue - ? storedValue === "true" - : Boolean(workspace.template_use_classic_parameter_flow); - - localStorage.setItem(key, (!current).toString()); - optOutQuery.refetch(); - }; - - return ( - - {optOutQuery.data.optedOut ? ( - - ) : ( - - )} - - ); + if (optOutQuery.isError) { + return ; + } + if (!optOutQuery.data) { + return ; } - return ; + const toggleOptedOut = () => { + const key = optOutKey(optOutQuery.data.templateId); + const storedValue = localStorage.getItem(key); + + const current = storedValue + ? storedValue === "true" + : Boolean(workspace.template_use_classic_parameter_flow); + + localStorage.setItem(key, (!current).toString()); + optOutQuery.refetch(); + }; + + return ( + + {optOutQuery.data.optedOut ? ( + + ) : ( + + )} + + ); }; export default WorkspaceParametersExperimentRouter; diff --git a/site/src/pages/WorkspacesPage/WorkspacesPage.tsx b/site/src/pages/WorkspacesPage/WorkspacesPage.tsx index acdded15d4bc9..f54fd3df060ff 100644 --- a/site/src/pages/WorkspacesPage/WorkspacesPage.tsx +++ b/site/src/pages/WorkspacesPage/WorkspacesPage.tsx @@ -37,8 +37,6 @@ function useSafeSearchParams() { } const WorkspacesPage: FC = () => { - const { experiments } = useDashboard(); - const isDynamicParametersEnabled = experiments.includes("dynamic-parameters"); const queryClient = useQueryClient(); // If we use a useSearchParams for each hook, the values will not be in sync. // So we have to use a single one, centralizing the values, and pass it to @@ -166,7 +164,7 @@ const WorkspacesPage: FC = () => { onConfirm={async () => { await batchActions.updateAll({ workspaces: checkedWorkspaces, - isDynamicParametersEnabled, + isDynamicParametersEnabled: true, }); setConfirmingBatchAction(null); }} From dde304c4a6e8e328b3e68eb58be66d2311211c61 Mon Sep 17 00:00:00 2001 From: Jaayden Halko Date: Mon, 9 Jun 2025 14:47:33 +0000 Subject: [PATCH 02/17] fix: format --- .../WorkspaceMoreActions.tsx | 1 - .../workspaces/WorkspaceUpdateDialogs.tsx | 1 - .../CreateWorkspaceExperimentRouter.tsx | 6 +- .../TemplateSettingsForm.tsx | 58 +++++++++---------- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/site/src/modules/workspaces/WorkspaceMoreActions/WorkspaceMoreActions.tsx b/site/src/modules/workspaces/WorkspaceMoreActions/WorkspaceMoreActions.tsx index d2a9e54c24759..ff20aea807bf4 100644 --- a/site/src/modules/workspaces/WorkspaceMoreActions/WorkspaceMoreActions.tsx +++ b/site/src/modules/workspaces/WorkspaceMoreActions/WorkspaceMoreActions.tsx @@ -21,7 +21,6 @@ import { SettingsIcon, TrashIcon, } from "lucide-react"; -import { useDashboard } from "modules/dashboard/useDashboard"; import { useDynamicParametersOptOut } from "modules/workspaces/DynamicParameter/useDynamicParametersOptOut"; import { type FC, useEffect, useState } from "react"; import { useMutation, useQuery, useQueryClient } from "react-query"; diff --git a/site/src/modules/workspaces/WorkspaceUpdateDialogs.tsx b/site/src/modules/workspaces/WorkspaceUpdateDialogs.tsx index aa672c47c6f48..60c1c04e2547a 100644 --- a/site/src/modules/workspaces/WorkspaceUpdateDialogs.tsx +++ b/site/src/modules/workspaces/WorkspaceUpdateDialogs.tsx @@ -10,7 +10,6 @@ import { ErrorAlert } from "components/Alert/ErrorAlert"; import { ConfirmDialog } from "components/Dialogs/ConfirmDialog/ConfirmDialog"; import { Loader } from "components/Loader/Loader"; import { MemoizedInlineMarkdown } from "components/Markdown/Markdown"; -import { useDashboard } from "modules/dashboard/useDashboard"; import { useDynamicParametersOptOut } from "modules/workspaces/DynamicParameter/useDynamicParametersOptOut"; import { UpdateBuildParametersDialog } from "modules/workspaces/WorkspaceMoreActions/UpdateBuildParametersDialog"; import { UpdateBuildParametersDialogExperimental } from "modules/workspaces/WorkspaceMoreActions/UpdateBuildParametersDialogExperimental"; diff --git a/site/src/pages/CreateWorkspacePage/CreateWorkspaceExperimentRouter.tsx b/site/src/pages/CreateWorkspacePage/CreateWorkspaceExperimentRouter.tsx index 162146a6f8888..41e259f5a321f 100644 --- a/site/src/pages/CreateWorkspacePage/CreateWorkspaceExperimentRouter.tsx +++ b/site/src/pages/CreateWorkspacePage/CreateWorkspaceExperimentRouter.tsx @@ -15,7 +15,9 @@ import { ExperimentalFormContext } from "./ExperimentalFormContext"; const CreateWorkspaceExperimentRouter: FC = () => { const { organization: organizationName = "default", template: templateName } = useParams() as { organization?: string; template: string }; - const templateQuery = useQuery(templateByName(organizationName, templateName)); + const templateQuery = useQuery( + templateByName(organizationName, templateName), + ); const optOutQuery = useDynamicParametersOptOut({ templateId: templateQuery.data?.id, @@ -45,7 +47,7 @@ const CreateWorkspaceExperimentRouter: FC = () => { localStorage.setItem(key, (!current).toString()); optOutQuery.refetch(); }; - + return ( {optOutQuery.data.optedOut ? ( diff --git a/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsForm.tsx b/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsForm.tsx index cdafacf561db6..8dbe4dcab0290 100644 --- a/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsForm.tsx +++ b/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsForm.tsx @@ -224,35 +224,35 @@ export const TemplateSettingsForm: FC = ({ } /> - - } - label={ - - Use classic workspace creation form - - - Show the original workspace creation form and workspace - parameters settings form without dynamic parameters or - live updates. Recommended if your provisioners aren't - updated or the new form causes issues.{" "} - - Users can always manually switch experiences in the - workspace creation form. - - - - - } - /> + + } + label={ + + Use classic workspace creation form + + + Show the original workspace creation form and workspace + parameters settings form without dynamic parameters or live + updates. Recommended if your provisioners aren't updated or + the new form causes issues.{" "} + + Users can always manually switch experiences in the + workspace creation form. + + + + + } + /> From 70523e4514a4195b3cf743a507dfb6137cf8bc09 Mon Sep 17 00:00:00 2001 From: Jaayden Halko Date: Mon, 9 Jun 2025 15:03:17 +0000 Subject: [PATCH 03/17] fix: cleanup --- coderd/apidoc/docs.go | 3 --- coderd/apidoc/swagger.json | 3 --- docs/reference/api/schemas.md | 1 - 3 files changed, 7 deletions(-) diff --git a/coderd/apidoc/docs.go b/coderd/apidoc/docs.go index d11a0635d6f52..5dc293e2e706e 100644 --- a/coderd/apidoc/docs.go +++ b/coderd/apidoc/docs.go @@ -12745,7 +12745,6 @@ const docTemplate = `{ "notifications", "workspace-usage", "web-push", - "dynamic-parameters", "workspace-prebuilds", "agentic-chat", "ai-tasks" @@ -12754,7 +12753,6 @@ const docTemplate = `{ "ExperimentAITasks": "Enables the new AI tasks feature.", "ExperimentAgenticChat": "Enables the new agentic AI chat feature.", "ExperimentAutoFillParameters": "This should not be taken out of experiments until we have redesigned the feature.", - "ExperimentDynamicParameters": "Enables dynamic parameters when creating a workspace.", "ExperimentExample": "This isn't used for anything.", "ExperimentNotifications": "Sends notifications via SMTP and webhooks following certain events.", "ExperimentWebPush": "Enables web push notifications through the browser.", @@ -12767,7 +12765,6 @@ const docTemplate = `{ "ExperimentNotifications", "ExperimentWorkspaceUsage", "ExperimentWebPush", - "ExperimentDynamicParameters", "ExperimentWorkspacePrebuilds", "ExperimentAgenticChat", "ExperimentAITasks" diff --git a/coderd/apidoc/swagger.json b/coderd/apidoc/swagger.json index aabe0b9b12672..ff48e99d393fc 100644 --- a/coderd/apidoc/swagger.json +++ b/coderd/apidoc/swagger.json @@ -11438,7 +11438,6 @@ "notifications", "workspace-usage", "web-push", - "dynamic-parameters", "workspace-prebuilds", "agentic-chat", "ai-tasks" @@ -11447,7 +11446,6 @@ "ExperimentAITasks": "Enables the new AI tasks feature.", "ExperimentAgenticChat": "Enables the new agentic AI chat feature.", "ExperimentAutoFillParameters": "This should not be taken out of experiments until we have redesigned the feature.", - "ExperimentDynamicParameters": "Enables dynamic parameters when creating a workspace.", "ExperimentExample": "This isn't used for anything.", "ExperimentNotifications": "Sends notifications via SMTP and webhooks following certain events.", "ExperimentWebPush": "Enables web push notifications through the browser.", @@ -11460,7 +11458,6 @@ "ExperimentNotifications", "ExperimentWorkspaceUsage", "ExperimentWebPush", - "ExperimentDynamicParameters", "ExperimentWorkspacePrebuilds", "ExperimentAgenticChat", "ExperimentAITasks" diff --git a/docs/reference/api/schemas.md b/docs/reference/api/schemas.md index 4191ab8970e92..a5b759e5dfb0c 100644 --- a/docs/reference/api/schemas.md +++ b/docs/reference/api/schemas.md @@ -3512,7 +3512,6 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o | `notifications` | | `workspace-usage` | | `web-push` | -| `dynamic-parameters` | | `workspace-prebuilds` | | `agentic-chat` | | `ai-tasks` | From 5d119a87f692a7e041320ad8ce757e63b818b3e8 Mon Sep 17 00:00:00 2001 From: Jaayden Halko Date: Mon, 9 Jun 2025 16:18:22 +0000 Subject: [PATCH 04/17] chore: update migrations --- coderd/database/dump.sql | 2 +- .../migrations/000334_dynamic_parameters_opt_out.down.sql | 3 +++ .../migrations/000334_dynamic_parameters_opt_out.up.sql | 3 +++ coderd/templates_test.go | 2 +- .../TemplateGeneralSettingsPage/TemplateSettingsPage.test.tsx | 2 +- site/src/testHelpers/entities.ts | 4 ++-- 6 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 coderd/database/migrations/000334_dynamic_parameters_opt_out.down.sql create mode 100644 coderd/database/migrations/000334_dynamic_parameters_opt_out.up.sql diff --git a/coderd/database/dump.sql b/coderd/database/dump.sql index 22a0b3d5a8adc..e4cee2333efc4 100644 --- a/coderd/database/dump.sql +++ b/coderd/database/dump.sql @@ -1626,7 +1626,7 @@ CREATE TABLE templates ( deprecated text DEFAULT ''::text NOT NULL, activity_bump bigint DEFAULT '3600000000000'::bigint NOT NULL, max_port_sharing_level app_sharing_level DEFAULT 'owner'::app_sharing_level NOT NULL, - use_classic_parameter_flow boolean DEFAULT false NOT NULL + use_classic_parameter_flow boolean DEFAULT true NOT NULL ); COMMENT ON COLUMN templates.default_ttl IS 'The default duration for autostop for workspaces created from this template.'; diff --git a/coderd/database/migrations/000334_dynamic_parameters_opt_out.down.sql b/coderd/database/migrations/000334_dynamic_parameters_opt_out.down.sql new file mode 100644 index 0000000000000..d18fcc87e87da --- /dev/null +++ b/coderd/database/migrations/000334_dynamic_parameters_opt_out.down.sql @@ -0,0 +1,3 @@ +ALTER TABLE templates ALTER COLUMN use_classic_parameter_flow SET DEFAULT false; + +UPDATE templates SET use_classic_parameter_flow = false diff --git a/coderd/database/migrations/000334_dynamic_parameters_opt_out.up.sql b/coderd/database/migrations/000334_dynamic_parameters_opt_out.up.sql new file mode 100644 index 0000000000000..d1981e04a7f7b --- /dev/null +++ b/coderd/database/migrations/000334_dynamic_parameters_opt_out.up.sql @@ -0,0 +1,3 @@ +ALTER TABLE templates ALTER COLUMN use_classic_parameter_flow SET DEFAULT true; + +UPDATE templates SET use_classic_parameter_flow = true diff --git a/coderd/templates_test.go b/coderd/templates_test.go index f5fbe49741838..f8f2b1372263c 100644 --- a/coderd/templates_test.go +++ b/coderd/templates_test.go @@ -1548,7 +1548,7 @@ func TestPatchTemplateMeta(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, nil) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) - require.False(t, template.UseClassicParameterFlow, "default is false") + require.True(t, template.UseClassicParameterFlow, "default is true") bTrue := true bFalse := false diff --git a/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsPage.test.tsx b/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsPage.test.tsx index 78114589691f8..1703ed5fea1d7 100644 --- a/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsPage.test.tsx +++ b/site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsPage.test.tsx @@ -54,7 +54,7 @@ const validFormValues: FormValues = { require_active_version: false, disable_everyone_group_access: false, max_port_share_level: "owner", - use_classic_parameter_flow: false, + use_classic_parameter_flow: true, }; const renderTemplateSettingsPage = async () => { diff --git a/site/src/testHelpers/entities.ts b/site/src/testHelpers/entities.ts index 72ad6fa508a02..0201e4b563efc 100644 --- a/site/src/testHelpers/entities.ts +++ b/site/src/testHelpers/entities.ts @@ -824,7 +824,7 @@ export const MockTemplate: TypesGen.Template = { deprecated: false, deprecation_message: "", max_port_share_level: "public", - use_classic_parameter_flow: false, + use_classic_parameter_flow: true, }; const MockTemplateVersionFiles: TemplateVersionFiles = { @@ -1410,7 +1410,7 @@ export const MockWorkspace: TypesGen.Workspace = { MockTemplate.allow_user_cancel_workspace_jobs, template_active_version_id: MockTemplate.active_version_id, template_require_active_version: MockTemplate.require_active_version, - template_use_classic_parameter_flow: false, + template_use_classic_parameter_flow: true, outdated: false, owner_id: MockUserOwner.id, organization_id: MockOrganization.id, From 9806edebaf3acc9bd7d2a65139b0c99f7e05251d Mon Sep 17 00:00:00 2001 From: Jaayden Halko Date: Mon, 9 Jun 2025 16:28:09 +0000 Subject: [PATCH 05/17] fix: fix test --- enterprise/coderd/workspaces_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enterprise/coderd/workspaces_test.go b/enterprise/coderd/workspaces_test.go index 164234048a16e..f15e9837d620c 100644 --- a/enterprise/coderd/workspaces_test.go +++ b/enterprise/coderd/workspaces_test.go @@ -1736,7 +1736,7 @@ func TestWorkspaceTemplateParamsChange(t *testing.T) { require.NoError(t, err, "failed to create template version") coderdtest.AwaitTemplateVersionJobCompleted(t, templateAdmin, tv.ID) tpl := coderdtest.CreateTemplate(t, templateAdmin, owner.OrganizationID, tv.ID) - require.False(t, tpl.UseClassicParameterFlow, "template to use dynamic parameters") + require.True(t, tpl.UseClassicParameterFlow, "template to use dynamic parameters") // When: we create a workspace build using the above template but with // parameter values that are different from those defined in the template. From 25dd5c37d0ae4e09c5d5984c0fc6b1227fa94d47 Mon Sep 17 00:00:00 2001 From: "blink-so[bot]" <211532188+blink-so[bot]@users.noreply.github.com> Date: Mon, 9 Jun 2025 18:19:00 +0000 Subject: [PATCH 06/17] fix: regenerate types and update dynamic parameters logic - Regenerated TypeScript types to remove dynamic-parameters experiment - Updated useDynamicParametersOptOut hook to always return optedOut: true since the experiment was removed - This fixes test failures related to dynamic parameters functionality Co-authored-by: jaaydenh <1858163+jaaydenh@users.noreply.github.com> --- site/src/api/typesGenerated.ts | 3686 +++++++---------- .../useDynamicParametersOptOut.ts | 9 +- 2 files changed, 1572 insertions(+), 2123 deletions(-) diff --git a/site/src/api/typesGenerated.ts b/site/src/api/typesGenerated.ts index c662b27386401..e5b217ae36eb2 100644 --- a/site/src/api/typesGenerated.ts +++ b/site/src/api/typesGenerated.ts @@ -2,34 +2,34 @@ // From codersdk/templates.go export interface ACLAvailable { - readonly users: readonly ReducedUser[]; - readonly groups: readonly Group[]; + readonly users: readonly ReducedUser[]; + readonly groups: readonly Group[]; } // From codersdk/deployment.go export interface AIConfig { - readonly providers?: readonly AIProviderConfig[]; + readonly providers?: readonly AIProviderConfig[]; } // From codersdk/deployment.go export interface AIProviderConfig { - readonly type: string; - readonly models: readonly string[]; - readonly base_url: string; + readonly type: string; + readonly models: readonly string[]; + readonly base_url: string; } // 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; + 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 @@ -39,201 +39,170 @@ export const APIKeyScopes: APIKeyScope[] = ["all", "application_connect"]; // From codersdk/apikey.go export interface APIKeyWithOwner extends APIKey { - readonly username: string; + readonly username: string; } // From healthsdk/healthsdk.go export interface AccessURLReport extends BaseReport { - readonly healthy: boolean; - readonly access_url: string; - readonly reachable: boolean; - readonly status_code: number; - readonly healthz_response: string; + readonly healthy: boolean; + readonly access_url: string; + readonly reachable: boolean; + readonly status_code: number; + readonly healthz_response: string; } // From codersdk/licenses.go export interface AddLicenseRequest { - readonly license: string; + readonly license: string; } // From codersdk/workspacebuilds.go export interface AgentConnectionTiming { - readonly started_at: string; - readonly ended_at: string; - readonly stage: TimingStage; - readonly workspace_agent_id: string; - readonly workspace_agent_name: string; + readonly started_at: string; + readonly ended_at: string; + readonly stage: TimingStage; + readonly workspace_agent_id: string; + readonly workspace_agent_name: string; } // From codersdk/workspacebuilds.go export interface AgentScriptTiming { - readonly started_at: string; - readonly ended_at: string; - readonly exit_code: number; - readonly stage: TimingStage; - readonly status: string; - readonly display_name: string; - readonly workspace_agent_id: string; - readonly workspace_agent_name: string; + readonly started_at: string; + readonly ended_at: string; + readonly exit_code: number; + readonly stage: TimingStage; + readonly status: string; + readonly display_name: string; + readonly workspace_agent_id: string; + readonly workspace_agent_name: string; } // From codersdk/templates.go export interface AgentStatsReportResponse { - readonly num_comms: number; - readonly rx_bytes: number; - readonly tx_bytes: number; + readonly num_comms: number; + readonly rx_bytes: number; + readonly tx_bytes: number; } // From codersdk/workspaceagents.go export type AgentSubsystem = "envbox" | "envbuilder" | "exectrace"; -export const AgentSubsystems: AgentSubsystem[] = [ - "envbox", - "envbuilder", - "exectrace", -]; +export const AgentSubsystems: AgentSubsystem[] = ["envbox", "envbuilder", "exectrace"]; // From codersdk/deployment.go export interface AppHostResponse { - readonly host: string; + readonly host: string; } // From codersdk/deployment.go export interface AppearanceConfig { - readonly application_name: string; - readonly logo_url: string; - readonly docs_url: string; - readonly service_banner: BannerConfig; - readonly announcement_banners: readonly BannerConfig[]; - readonly support_links?: readonly LinkConfig[]; + readonly application_name: string; + readonly logo_url: string; + readonly docs_url: string; + readonly service_banner: BannerConfig; + readonly announcement_banners: readonly BannerConfig[]; + readonly support_links?: readonly LinkConfig[]; } // From codersdk/templates.go export interface ArchiveTemplateVersionsRequest { - readonly all: boolean; + readonly all: boolean; } // From codersdk/templates.go export interface ArchiveTemplateVersionsResponse { - readonly template_id: string; - readonly archived_ids: readonly string[]; + readonly template_id: string; + readonly archived_ids: readonly string[]; } // From codersdk/roles.go export interface AssignableRoles extends Role { - readonly assignable: boolean; - readonly built_in: boolean; + readonly assignable: boolean; + readonly built_in: boolean; } // From codersdk/audit.go -export type AuditAction = - | "close" - | "connect" - | "create" - | "delete" - | "disconnect" - | "login" - | "logout" - | "open" - | "register" - | "request_password_reset" - | "start" - | "stop" - | "write"; - -export const AuditActions: AuditAction[] = [ - "close", - "connect", - "create", - "delete", - "disconnect", - "login", - "logout", - "open", - "register", - "request_password_reset", - "start", - "stop", - "write", -]; +export type AuditAction = "close" | "connect" | "create" | "delete" | "disconnect" | "login" | "logout" | "open" | "register" | "request_password_reset" | "start" | "stop" | "write"; + +export const AuditActions: AuditAction[] = ["close", "connect", "create", "delete", "disconnect", "login", "logout", "open", "register", "request_password_reset", "start", "stop", "write"]; // From codersdk/audit.go export type AuditDiff = Record; // From codersdk/audit.go export interface AuditDiffField { - // empty interface{} type, falling back to unknown - readonly old?: unknown; - // empty interface{} type, falling back to unknown - readonly new?: unknown; - readonly secret: boolean; + // empty interface{} type, falling back to unknown + readonly old?: unknown; + // empty interface{} type, falling back to unknown + readonly new?: unknown; + readonly secret: boolean; } // From codersdk/audit.go export interface AuditLog { - readonly id: string; - readonly request_id: string; - readonly time: string; - readonly ip: string; - 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; - readonly description: string; - readonly resource_link: string; - readonly is_deleted: boolean; - readonly organization_id: string; - readonly organization?: MinimalOrganization; - readonly user: User | null; + readonly id: string; + readonly request_id: string; + readonly time: string; + readonly ip: string; + 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; + readonly description: string; + readonly resource_link: string; + readonly is_deleted: boolean; + readonly organization_id: string; + readonly organization?: MinimalOrganization; + readonly user: User | null; } // From codersdk/audit.go export interface AuditLogResponse { - readonly audit_logs: readonly AuditLog[]; - readonly count: number; + readonly audit_logs: readonly AuditLog[]; + readonly count: number; } // From codersdk/audit.go export interface AuditLogsRequest extends Pagination { - readonly q?: string; + readonly q?: string; } // From codersdk/users.go export interface AuthMethod { - readonly enabled: boolean; + readonly enabled: boolean; } // From codersdk/users.go export interface AuthMethods { - readonly terms_of_service_url?: string; - readonly password: AuthMethod; - readonly github: GithubAuthMethod; - readonly oidc: OIDCAuthMethod; + readonly terms_of_service_url?: string; + readonly password: AuthMethod; + readonly github: GithubAuthMethod; + readonly oidc: OIDCAuthMethod; } // From codersdk/authorization.go export interface AuthorizationCheck { - readonly object: AuthorizationObject; - readonly action: RBACAction; + readonly object: AuthorizationObject; + readonly action: RBACAction; } // From codersdk/authorization.go export interface AuthorizationObject { - readonly resource_type: RBACResource; - readonly owner_id?: string; - readonly organization_id?: string; - readonly resource_id?: string; - readonly any_org?: boolean; + readonly resource_type: RBACResource; + readonly owner_id?: string; + readonly organization_id?: string; + readonly resource_id?: string; + readonly any_org?: boolean; } // From codersdk/authorization.go export interface AuthorizationRequest { - readonly checks: Record; + readonly checks: Record; } // From codersdk/authorization.go @@ -246,46 +215,42 @@ export const AutomaticUpdateses: AutomaticUpdates[] = ["always", "never"]; // From codersdk/deployment.go export interface AvailableExperiments { - readonly safe: readonly Experiment[]; + readonly safe: readonly Experiment[]; } // From codersdk/deployment.go export interface BannerConfig { - readonly enabled: boolean; - readonly message?: string; - readonly background_color?: string; + readonly enabled: boolean; + readonly message?: string; + readonly background_color?: string; } // From healthsdk/healthsdk.go export interface BaseReport { - readonly error?: string; - readonly severity: HealthSeverity; - readonly warnings: readonly HealthMessage[]; - readonly dismissed: boolean; + readonly error?: string; + readonly severity: HealthSeverity; + readonly warnings: readonly HealthMessage[]; + readonly dismissed: boolean; } // From codersdk/deployment.go export interface BuildInfoResponse { - readonly external_url: string; - readonly version: string; - readonly dashboard_url: string; - readonly telemetry: boolean; - readonly workspace_proxy: boolean; - readonly agent_api_version: string; - readonly provisioner_api_version: string; - readonly upgrade_message: string; - readonly deployment_id: string; - readonly webpush_public_key?: string; + readonly external_url: string; + readonly version: string; + readonly dashboard_url: string; + readonly telemetry: boolean; + readonly workspace_proxy: boolean; + readonly agent_api_version: string; + readonly provisioner_api_version: string; + readonly upgrade_message: string; + readonly deployment_id: string; + readonly webpush_public_key?: string; } // From codersdk/workspacebuilds.go export type BuildReason = "autostart" | "autostop" | "initiator"; -export const BuildReasons: BuildReason[] = [ - "autostart", - "autostop", - "initiator", -]; +export const BuildReasons: BuildReason[] = ["autostart", "autostop", "initiator"]; // From codersdk/client.go export const BuildVersionHeader = "X-Coder-Build-Version"; @@ -298,31 +263,31 @@ export const CLITelemetryHeader = "Coder-CLI-Telemetry"; // From codersdk/users.go export interface ChangePasswordWithOneTimePasscodeRequest { - readonly email: string; - readonly password: string; - readonly one_time_passcode: string; + readonly email: string; + readonly password: string; + readonly one_time_passcode: string; } // From codersdk/chat.go export interface Chat { - readonly id: string; - readonly created_at: string; - readonly updated_at: string; - readonly title: string; + readonly id: string; + readonly created_at: string; + readonly updated_at: string; + readonly title: string; } // From codersdk/chat.go export interface ChatMessage { - readonly id: string; - readonly createdAt?: Record; - readonly content: string; - readonly role: string; - // external type "github.com/kylecarbs/aisdk-go.Part", to include this type the package must be explicitly included in the parsing - readonly parts?: readonly unknown[]; - // empty interface{} type, falling back to unknown - readonly annotations?: readonly unknown[]; - // external type "github.com/kylecarbs/aisdk-go.Attachment", to include this type the package must be explicitly included in the parsing - readonly experimental_attachments?: readonly unknown[]; + readonly id: string; + readonly createdAt?: (Record); + readonly content: string; + readonly role: string; + // external type "github.com/kylecarbs/aisdk-go.Part", to include this type the package must be explicitly included in the parsing + readonly parts?: readonly unknown[]; + // empty interface{} type, falling back to unknown + readonly annotations?: readonly unknown[]; + // external type "github.com/kylecarbs/aisdk-go.Attachment", to include this type the package must be explicitly included in the parsing + readonly experimental_attachments?: readonly unknown[]; } // From codersdk/client.go @@ -330,8 +295,8 @@ export const CoderDesktopTelemetryHeader = "Coder-Desktop-Telemetry"; // From codersdk/insights.go export interface ConnectionLatency { - readonly p50: number; - readonly p95: number; + readonly p50: number; + readonly p95: number; } // From codersdk/files.go @@ -342,297 +307,288 @@ export const ContentTypeZip = "application/zip"; // From codersdk/users.go export interface ConvertLoginRequest { - readonly to_type: LoginType; - readonly password: string; + readonly to_type: LoginType; + readonly password: string; } // From codersdk/chat.go export interface CreateChatMessageRequest { - readonly model: string; - // external type "github.com/kylecarbs/aisdk-go.Message", to include this type the package must be explicitly included in the parsing - readonly message: unknown; - readonly thinking: boolean; + readonly model: string; + // external type "github.com/kylecarbs/aisdk-go.Message", to include this type the package must be explicitly included in the parsing + readonly message: unknown; + readonly thinking: boolean; } // From codersdk/users.go export interface CreateFirstUserRequest { - readonly email: string; - readonly username: string; - readonly name: string; - readonly password: string; - readonly trial: boolean; - readonly trial_info: CreateFirstUserTrialInfo; + readonly email: string; + readonly username: string; + readonly name: string; + readonly password: string; + readonly trial: boolean; + readonly trial_info: CreateFirstUserTrialInfo; } // From codersdk/users.go export interface CreateFirstUserResponse { - readonly user_id: string; - readonly organization_id: string; + readonly user_id: string; + readonly organization_id: string; } // From codersdk/users.go export interface CreateFirstUserTrialInfo { - readonly first_name: string; - readonly last_name: string; - readonly phone_number: string; - readonly job_title: string; - readonly company_name: string; - readonly country: string; - readonly developers: string; + readonly first_name: string; + readonly last_name: string; + readonly phone_number: string; + readonly job_title: string; + readonly company_name: string; + readonly country: string; + readonly developers: string; } // From codersdk/groups.go export interface CreateGroupRequest { - readonly name: string; - readonly display_name: string; - readonly avatar_url: string; - readonly quota_allowance: number; + readonly name: string; + readonly display_name: string; + readonly avatar_url: string; + readonly quota_allowance: number; } // From codersdk/organizations.go export interface CreateOrganizationRequest { - readonly name: string; - readonly display_name?: string; - readonly description?: string; - readonly icon?: string; + readonly name: string; + readonly display_name?: string; + readonly description?: string; + readonly icon?: string; } // From codersdk/provisionerdaemons.go export interface CreateProvisionerKeyRequest { - readonly name: string; - readonly tags: Record; + readonly name: string; + readonly tags: Record; } // From codersdk/provisionerdaemons.go export interface CreateProvisionerKeyResponse { - readonly key: string; + readonly key: string; } // From codersdk/organizations.go export interface CreateTemplateRequest { - readonly name: string; - readonly display_name?: string; - readonly description?: string; - readonly icon?: string; - readonly template_version_id: string; - readonly default_ttl_ms?: number; - readonly activity_bump_ms?: number; - readonly autostop_requirement?: TemplateAutostopRequirement; - readonly autostart_requirement?: TemplateAutostartRequirement; - readonly allow_user_cancel_workspace_jobs: boolean | null; - readonly allow_user_autostart?: boolean; - readonly allow_user_autostop?: boolean; - readonly failure_ttl_ms?: number; - readonly dormant_ttl_ms?: number; - readonly delete_ttl_ms?: number; - readonly disable_everyone_group_access: boolean; - readonly require_active_version: boolean; - readonly max_port_share_level: WorkspaceAgentPortShareLevel | null; + readonly name: string; + readonly display_name?: string; + readonly description?: string; + readonly icon?: string; + readonly template_version_id: string; + readonly default_ttl_ms?: number; + readonly activity_bump_ms?: number; + readonly autostop_requirement?: TemplateAutostopRequirement; + readonly autostart_requirement?: TemplateAutostartRequirement; + readonly allow_user_cancel_workspace_jobs: boolean | null; + readonly allow_user_autostart?: boolean; + readonly allow_user_autostop?: boolean; + readonly failure_ttl_ms?: number; + readonly dormant_ttl_ms?: number; + readonly delete_ttl_ms?: number; + readonly disable_everyone_group_access: boolean; + readonly require_active_version: boolean; + readonly max_port_share_level: WorkspaceAgentPortShareLevel | null; } // From codersdk/templateversions.go export interface CreateTemplateVersionDryRunRequest { - readonly workspace_name: string; - readonly rich_parameter_values: readonly WorkspaceBuildParameter[]; - readonly user_variable_values?: readonly VariableValue[]; + readonly workspace_name: string; + readonly rich_parameter_values: readonly WorkspaceBuildParameter[]; + readonly user_variable_values?: readonly VariableValue[]; } // From codersdk/organizations.go export interface CreateTemplateVersionRequest { - readonly name?: string; - readonly message?: string; - readonly template_id?: string; - readonly storage_method: ProvisionerStorageMethod; - readonly file_id?: string; - readonly example_id?: string; - readonly provisioner: ProvisionerType; - readonly tags: Record; - readonly user_variable_values?: readonly VariableValue[]; + readonly name?: string; + readonly message?: string; + readonly template_id?: string; + readonly storage_method: ProvisionerStorageMethod; + readonly file_id?: string; + readonly example_id?: string; + readonly provisioner: ProvisionerType; + readonly tags: Record; + readonly user_variable_values?: readonly VariableValue[]; } // From codersdk/audit.go export interface CreateTestAuditLogRequest { - readonly action?: AuditAction; - readonly resource_type?: ResourceType; - readonly resource_id?: string; - readonly additional_fields?: Record; - readonly time?: string; - readonly build_reason?: BuildReason; - readonly organization_id?: string; - readonly request_id?: string; + readonly action?: AuditAction; + readonly resource_type?: ResourceType; + readonly resource_id?: string; + readonly additional_fields?: Record; + readonly time?: string; + readonly build_reason?: BuildReason; + readonly organization_id?: string; + readonly request_id?: string; } // From codersdk/apikey.go export interface CreateTokenRequest { - readonly lifetime: number; - readonly scope: APIKeyScope; - readonly token_name: string; + readonly lifetime: number; + readonly scope: APIKeyScope; + readonly token_name: string; } // From codersdk/users.go export interface CreateUserRequestWithOrgs { - readonly email: string; - readonly username: string; - readonly name: string; - readonly password: string; - readonly login_type: LoginType; - readonly user_status: UserStatus | null; - readonly organization_ids: readonly string[]; + readonly email: string; + readonly username: string; + readonly name: string; + readonly password: string; + readonly login_type: LoginType; + readonly user_status: UserStatus | null; + readonly organization_ids: readonly 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 rich_parameter_values?: readonly WorkspaceBuildParameter[]; - readonly log_level?: ProvisionerLogLevel; - readonly template_version_preset_id?: string; - readonly enable_dynamic_parameters?: boolean; + readonly template_version_id?: string; + readonly transition: WorkspaceTransition; + readonly dry_run?: boolean; + readonly state?: string; + readonly orphan?: boolean; + readonly rich_parameter_values?: readonly WorkspaceBuildParameter[]; + readonly log_level?: ProvisionerLogLevel; + readonly template_version_preset_id?: string; + readonly enable_dynamic_parameters?: boolean; } // From codersdk/workspaceproxy.go export interface CreateWorkspaceProxyRequest { - readonly name: string; - readonly display_name: string; - readonly icon: string; + readonly name: string; + readonly display_name: string; + readonly icon: string; } // From codersdk/organizations.go export interface CreateWorkspaceRequest { - readonly template_id?: string; - readonly template_version_id?: string; - readonly name: string; - readonly autostart_schedule?: string; - readonly ttl_ms?: number; - readonly rich_parameter_values?: readonly WorkspaceBuildParameter[]; - readonly automatic_updates?: AutomaticUpdates; - readonly template_version_preset_id?: string; - readonly enable_dynamic_parameters?: boolean; + readonly template_id?: string; + readonly template_version_id?: string; + readonly name: string; + readonly autostart_schedule?: string; + readonly ttl_ms?: number; + readonly rich_parameter_values?: readonly WorkspaceBuildParameter[]; + readonly automatic_updates?: AutomaticUpdates; + readonly template_version_preset_id?: string; + readonly enable_dynamic_parameters?: boolean; } // From codersdk/deployment.go export interface CryptoKey { - readonly feature: CryptoKeyFeature; - readonly secret: string; - readonly deletes_at: string; - readonly sequence: number; - readonly starts_at: string; + readonly feature: CryptoKeyFeature; + readonly secret: string; + readonly deletes_at: string; + readonly sequence: number; + readonly starts_at: string; } // From codersdk/deployment.go -export type CryptoKeyFeature = - | "oidc_convert" - | "tailnet_resume" - | "workspace_apps_api_key" - | "workspace_apps_token"; +export type CryptoKeyFeature = "oidc_convert" | "tailnet_resume" | "workspace_apps_api_key" | "workspace_apps_token"; -export const CryptoKeyFeatures: CryptoKeyFeature[] = [ - "oidc_convert", - "tailnet_resume", - "workspace_apps_api_key", - "workspace_apps_token", -]; +export const CryptoKeyFeatures: CryptoKeyFeature[] = ["oidc_convert", "tailnet_resume", "workspace_apps_api_key", "workspace_apps_token"]; // From codersdk/roles.go export interface CustomRoleRequest { - readonly name: string; - readonly display_name: string; - readonly site_permissions: readonly Permission[]; - readonly organization_permissions: readonly Permission[]; - readonly user_permissions: readonly Permission[]; + readonly name: string; + readonly display_name: string; + readonly site_permissions: readonly Permission[]; + readonly organization_permissions: readonly Permission[]; + readonly user_permissions: readonly Permission[]; } // From codersdk/deployment.go export interface DAUEntry { - readonly date: string; - readonly amount: number; + readonly date: string; + readonly amount: number; } // From codersdk/deployment.go export interface DAURequest { - readonly TZHourOffset: number; + readonly TZHourOffset: number; } // From codersdk/deployment.go export interface DAUsResponse { - readonly entries: readonly DAUEntry[]; - readonly tz_hour_offset: number; + readonly entries: readonly DAUEntry[]; + readonly tz_hour_offset: number; } // From codersdk/deployment.go export interface DERP { - readonly server: DERPServerConfig; - readonly config: DERPConfig; + readonly server: DERPServerConfig; + readonly config: DERPConfig; } // From codersdk/deployment.go export interface DERPConfig { - readonly block_direct: boolean; - readonly force_websockets: boolean; - readonly url: string; - readonly path: string; + readonly block_direct: boolean; + readonly force_websockets: boolean; + readonly url: string; + readonly path: string; } // From healthsdk/healthsdk.go export interface DERPHealthReport extends BaseReport { - readonly healthy: boolean; - readonly regions: Record; - readonly netcheck?: NetcheckReport; - readonly netcheck_err?: string; - readonly netcheck_logs: readonly string[]; + readonly healthy: boolean; + readonly regions: Record; + readonly netcheck?: NetcheckReport; + readonly netcheck_err?: string; + readonly netcheck_logs: readonly string[]; } // From healthsdk/healthsdk.go export interface DERPNodeReport { - readonly healthy: boolean; - readonly severity: HealthSeverity; - readonly warnings: readonly HealthMessage[]; - readonly error?: string; - readonly node: TailDERPNode | null; - readonly node_info: ServerInfoMessage; - readonly can_exchange_messages: boolean; - readonly round_trip_ping: string; - readonly round_trip_ping_ms: number; - readonly uses_websocket: boolean; - readonly client_logs: readonly string[][]; - readonly client_errs: readonly string[][]; - readonly stun: STUNReport; + readonly healthy: boolean; + readonly severity: HealthSeverity; + readonly warnings: readonly HealthMessage[]; + readonly error?: string; + readonly node: TailDERPNode | null; + readonly node_info: ServerInfoMessage; + readonly can_exchange_messages: boolean; + readonly round_trip_ping: string; + readonly round_trip_ping_ms: number; + readonly uses_websocket: boolean; + readonly client_logs: readonly string[][]; + readonly client_errs: readonly string[][]; + readonly stun: STUNReport; } // From codersdk/workspaceagents.go export interface DERPRegion { - readonly preferred: boolean; - readonly latency_ms: number; + readonly preferred: boolean; + readonly latency_ms: number; } // From healthsdk/healthsdk.go export interface DERPRegionReport { - readonly healthy: boolean; - readonly severity: HealthSeverity; - readonly warnings: readonly HealthMessage[]; - readonly error?: string; - readonly region: TailDERPRegion | null; - readonly node_reports: readonly DERPNodeReport[]; + readonly healthy: boolean; + readonly severity: HealthSeverity; + readonly warnings: readonly HealthMessage[]; + readonly error?: string; + readonly region: TailDERPRegion | null; + readonly node_reports: readonly (DERPNodeReport)[]; } // From codersdk/deployment.go export interface DERPServerConfig { - readonly enable: boolean; - readonly region_id: number; - readonly region_code: string; - readonly region_name: string; - readonly stun_addresses: string; - readonly relay_url: string; + readonly enable: boolean; + readonly region_id: number; + readonly region_code: string; + readonly region_name: string; + 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; - readonly allow_all_cors: boolean; + readonly allow_path_app_sharing: boolean; + readonly allow_path_app_site_owner_access: boolean; + readonly allow_all_cors: boolean; } // From codersdk/database.go @@ -640,339 +596,258 @@ export const DatabaseNotReachable = "database not reachable"; // From healthsdk/healthsdk.go export interface DatabaseReport extends BaseReport { - readonly healthy: boolean; - readonly reachable: boolean; - readonly latency: string; - readonly latency_ms: number; - readonly threshold_ms: number; + readonly healthy: boolean; + readonly reachable: boolean; + readonly latency: string; + readonly latency_ms: number; + readonly threshold_ms: number; } // From codersdk/notifications.go export interface DeleteWebpushSubscription { - readonly endpoint: string; + readonly endpoint: string; } // From codersdk/workspaceagentportshare.go export interface DeleteWorkspaceAgentPortShareRequest { - readonly agent_name: string; - readonly port: number; + readonly agent_name: string; + readonly port: number; } // From codersdk/deployment.go export interface DeploymentConfig { - readonly config?: DeploymentValues; - readonly options?: SerpentOptionSet; + readonly config?: DeploymentValues; + readonly options?: SerpentOptionSet; } // 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; + 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 docs_url?: string; - readonly redirect_to_access_url?: boolean; - readonly http_address?: string; - readonly autobuild_poll_interval?: number; - readonly job_hang_detector_interval?: number; - readonly derp?: DERP; - readonly prometheus?: PrometheusConfig; - readonly pprof?: PprofConfig; - readonly proxy_trusted_headers?: string; - readonly proxy_trusted_origins?: string; - readonly cache_directory?: string; - readonly in_memory_database?: boolean; - readonly ephemeral_deployment?: boolean; - readonly pg_connection_url?: string; - readonly pg_auth?: string; - readonly oauth2?: OAuth2Config; - readonly oidc?: OIDCConfig; - readonly telemetry?: TelemetryConfig; - readonly tls?: TLSConfig; - readonly trace?: TraceConfig; - readonly http_cookies?: HTTPCookieConfig; - readonly strict_transport_security?: number; - 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 external_token_encryption_keys?: string; - readonly provisioner?: ProvisionerConfig; - readonly rate_limit?: RateLimitConfig; - readonly experiments?: string; - readonly update_check?: boolean; - readonly swagger?: SwaggerConfig; - readonly logging?: LoggingConfig; - readonly dangerous?: DangerousConfig; - readonly disable_path_apps?: boolean; - readonly session_lifetime?: SessionLifetime; - readonly disable_password_auth?: boolean; - readonly support?: SupportConfig; - readonly external_auth?: SerpentStruct; - readonly ai?: SerpentStruct; - readonly config_ssh?: SSHConfig; - readonly wgtunnel_host?: string; - readonly disable_owner_workspace_exec?: boolean; - readonly proxy_health_status_interval?: number; - readonly enable_terraform_debug_mode?: boolean; - readonly user_quiet_hours_schedule?: UserQuietHoursScheduleConfig; - readonly web_terminal_renderer?: string; - readonly allow_workspace_renames?: boolean; - readonly healthcheck?: HealthcheckConfig; - readonly cli_upgrade_message?: string; - readonly terms_of_service_url?: string; - readonly notifications?: NotificationsConfig; - readonly additional_csp_policy?: string; - readonly workspace_hostname_suffix?: string; - readonly workspace_prebuilds?: PrebuildsConfig; - readonly config?: string; - readonly write_config?: boolean; - readonly address?: string; + readonly verbose?: boolean; + readonly access_url?: string; + readonly wildcard_access_url?: string; + readonly docs_url?: string; + readonly redirect_to_access_url?: boolean; + readonly http_address?: string; + readonly autobuild_poll_interval?: number; + readonly job_hang_detector_interval?: number; + readonly derp?: DERP; + readonly prometheus?: PrometheusConfig; + readonly pprof?: PprofConfig; + readonly proxy_trusted_headers?: string; + readonly proxy_trusted_origins?: string; + readonly cache_directory?: string; + readonly in_memory_database?: boolean; + readonly ephemeral_deployment?: boolean; + readonly pg_connection_url?: string; + readonly pg_auth?: string; + readonly oauth2?: OAuth2Config; + readonly oidc?: OIDCConfig; + readonly telemetry?: TelemetryConfig; + readonly tls?: TLSConfig; + readonly trace?: TraceConfig; + readonly http_cookies?: HTTPCookieConfig; + readonly strict_transport_security?: number; + 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 external_token_encryption_keys?: string; + readonly provisioner?: ProvisionerConfig; + readonly rate_limit?: RateLimitConfig; + readonly experiments?: string; + readonly update_check?: boolean; + readonly swagger?: SwaggerConfig; + readonly logging?: LoggingConfig; + readonly dangerous?: DangerousConfig; + readonly disable_path_apps?: boolean; + readonly session_lifetime?: SessionLifetime; + readonly disable_password_auth?: boolean; + readonly support?: SupportConfig; + readonly external_auth?: SerpentStruct; + readonly ai?: SerpentStruct; + readonly config_ssh?: SSHConfig; + readonly wgtunnel_host?: string; + readonly disable_owner_workspace_exec?: boolean; + readonly proxy_health_status_interval?: number; + readonly enable_terraform_debug_mode?: boolean; + readonly user_quiet_hours_schedule?: UserQuietHoursScheduleConfig; + readonly web_terminal_renderer?: string; + readonly allow_workspace_renames?: boolean; + readonly healthcheck?: HealthcheckConfig; + readonly cli_upgrade_message?: string; + readonly terms_of_service_url?: string; + readonly notifications?: NotificationsConfig; + readonly additional_csp_policy?: string; + readonly workspace_hostname_suffix?: string; + readonly workspace_prebuilds?: PrebuildsConfig; + readonly config?: string; + readonly write_config?: boolean; + readonly address?: string; } // From codersdk/parameters.go export interface DiagnosticExtra { - readonly code: string; + readonly code: string; } // From codersdk/parameters.go export type DiagnosticSeverityString = "error" | "warning"; -export const DiagnosticSeverityStrings: DiagnosticSeverityString[] = [ - "error", - "warning", -]; +export const DiagnosticSeverityStrings: DiagnosticSeverityString[] = ["error", "warning"]; // From codersdk/workspaceagents.go -export type DisplayApp = - | "port_forwarding_helper" - | "ssh_helper" - | "vscode" - | "vscode_insiders" - | "web_terminal"; - -export const DisplayApps: DisplayApp[] = [ - "port_forwarding_helper", - "ssh_helper", - "vscode", - "vscode_insiders", - "web_terminal", -]; +export type DisplayApp = "port_forwarding_helper" | "ssh_helper" | "vscode" | "vscode_insiders" | "web_terminal"; + +export const DisplayApps: DisplayApp[] = ["port_forwarding_helper", "ssh_helper", "vscode", "vscode_insiders", "web_terminal"]; // From codersdk/parameters.go export interface DynamicParametersRequest { - readonly id: number; - readonly inputs: Record; - readonly owner_id?: string; + readonly id: number; + readonly inputs: Record; + readonly owner_id?: string; } // From codersdk/parameters.go export interface DynamicParametersResponse { - readonly id: number; - readonly diagnostics: readonly FriendlyDiagnostic[]; - readonly parameters: readonly PreviewParameter[]; + readonly id: number; + readonly diagnostics: readonly FriendlyDiagnostic[]; + readonly parameters: readonly PreviewParameter[]; } // From codersdk/externalauth.go -export type EnhancedExternalAuthProvider = - | "azure-devops" - | "azure-devops-entra" - | "bitbucket-cloud" - | "bitbucket-server" - | "github" - | "gitlab" - | "gitea" - | "jfrog" - | "slack"; - -export const EnhancedExternalAuthProviders: EnhancedExternalAuthProvider[] = [ - "azure-devops", - "azure-devops-entra", - "bitbucket-cloud", - "bitbucket-server", - "github", - "gitlab", - "gitea", - "jfrog", - "slack", -]; +export type EnhancedExternalAuthProvider = "azure-devops" | "azure-devops-entra" | "bitbucket-cloud" | "bitbucket-server" | "github" | "gitlab" | "gitea" | "jfrog" | "slack"; + +export const EnhancedExternalAuthProviders: EnhancedExternalAuthProvider[] = ["azure-devops", "azure-devops-entra", "bitbucket-cloud", "bitbucket-server", "github", "gitlab", "gitea", "jfrog", "slack"]; // From codersdk/deployment.go export type Entitlement = "entitled" | "grace_period" | "not_entitled"; // From codersdk/deployment.go export interface Entitlements { - readonly features: Record; - readonly warnings: readonly string[]; - readonly errors: readonly string[]; - readonly has_license: boolean; - readonly trial: boolean; - readonly require_telemetry: boolean; - readonly refreshed_at: string; + readonly features: Record; + readonly warnings: readonly string[]; + readonly errors: readonly string[]; + readonly has_license: boolean; + readonly trial: boolean; + readonly require_telemetry: boolean; + readonly refreshed_at: string; } // From codersdk/client.go export const EntitlementsWarningHeader = "X-Coder-Entitlements-Warning"; // From codersdk/deployment.go -export type Experiment = - | "ai-tasks" - | "agentic-chat" - | "auto-fill-parameters" - | "dynamic-parameters" - | "example" - | "notifications" - | "web-push" - | "workspace-prebuilds" - | "workspace-usage"; +export type Experiment = "ai-tasks" | "agentic-chat" | "auto-fill-parameters" | "example" | "notifications" | "web-push" | "workspace-prebuilds" | "workspace-usage"; // From codersdk/deployment.go export type Experiments = readonly Experiment[]; // From codersdk/externalauth.go export interface ExternalAuth { - readonly authenticated: boolean; - readonly device: boolean; - readonly display_name: string; - readonly user: ExternalAuthUser | null; - readonly app_installable: boolean; - readonly installations: readonly ExternalAuthAppInstallation[]; - readonly app_install_url: string; + readonly authenticated: boolean; + readonly device: boolean; + readonly display_name: string; + readonly user: ExternalAuthUser | null; + readonly app_installable: boolean; + readonly installations: readonly ExternalAuthAppInstallation[]; + readonly app_install_url: string; } // From codersdk/externalauth.go export interface ExternalAuthAppInstallation { - readonly id: number; - readonly account: ExternalAuthUser; - readonly configure_url: string; + readonly id: number; + readonly account: ExternalAuthUser; + readonly configure_url: string; } // From codersdk/deployment.go export interface ExternalAuthConfig { - readonly type: string; - readonly client_id: string; - readonly id: string; - readonly auth_url: string; - readonly token_url: string; - readonly validate_url: string; - readonly app_install_url: string; - readonly app_installations_url: string; - readonly no_refresh: boolean; - readonly scopes: readonly string[]; - readonly device_flow: boolean; - readonly device_code_url: string; - readonly regex: string; - readonly display_name: string; - readonly display_icon: string; + readonly type: string; + readonly client_id: string; + readonly id: string; + readonly auth_url: string; + readonly token_url: string; + readonly validate_url: string; + readonly app_install_url: string; + readonly app_installations_url: string; + readonly no_refresh: boolean; + readonly scopes: readonly string[]; + readonly device_flow: boolean; + readonly device_code_url: string; + readonly regex: string; + readonly display_name: string; + readonly display_icon: string; } // From codersdk/externalauth.go export interface ExternalAuthDevice { - readonly device_code: string; - readonly user_code: string; - readonly verification_uri: string; - readonly expires_in: number; - readonly interval: number; + readonly device_code: string; + readonly user_code: string; + readonly verification_uri: string; + readonly expires_in: number; + readonly interval: number; } // From codersdk/externalauth.go export interface ExternalAuthDeviceExchange { - readonly device_code: string; + readonly device_code: string; } // From codersdk/externalauth.go export interface ExternalAuthLink { - readonly provider_id: string; - readonly created_at: string; - readonly updated_at: string; - readonly has_refresh_token: boolean; - readonly expires: string; - readonly authenticated: boolean; - readonly validate_error: string; + readonly provider_id: string; + readonly created_at: string; + readonly updated_at: string; + readonly has_refresh_token: boolean; + readonly expires: string; + readonly authenticated: boolean; + readonly validate_error: string; } // From codersdk/externalauth.go export interface ExternalAuthLinkProvider { - readonly id: string; - readonly type: string; - readonly device: boolean; - readonly display_name: string; - readonly display_icon: string; - readonly allow_refresh: boolean; - readonly allow_validate: boolean; + readonly id: string; + readonly type: string; + readonly device: boolean; + readonly display_name: string; + readonly display_icon: string; + readonly allow_refresh: boolean; + readonly allow_validate: boolean; } // From codersdk/externalauth.go export interface ExternalAuthUser { - readonly id: number; - readonly login: string; - readonly avatar_url: string; - readonly profile_url: string; - readonly name: string; + readonly id: number; + readonly login: string; + readonly avatar_url: string; + readonly profile_url: string; + readonly name: string; } // From codersdk/deployment.go export interface Feature { - readonly entitlement: Entitlement; - readonly enabled: boolean; - readonly limit?: number; - readonly actual?: number; -} - -// From codersdk/deployment.go -export type FeatureName = - | "access_control" - | "advanced_template_scheduling" - | "appearance" - | "audit_log" - | "browser_only" - | "control_shared_ports" - | "custom_roles" - | "external_provisioner_daemons" - | "external_token_encryption" - | "high_availability" - | "multiple_external_auth" - | "multiple_organizations" - | "scim" - | "template_rbac" - | "user_limit" - | "user_role_management" - | "workspace_batch_actions" - | "workspace_prebuilds" - | "workspace_proxy"; - -export const FeatureNames: FeatureName[] = [ - "access_control", - "advanced_template_scheduling", - "appearance", - "audit_log", - "browser_only", - "control_shared_ports", - "custom_roles", - "external_provisioner_daemons", - "external_token_encryption", - "high_availability", - "multiple_external_auth", - "multiple_organizations", - "scim", - "template_rbac", - "user_limit", - "user_role_management", - "workspace_batch_actions", - "workspace_prebuilds", - "workspace_proxy", -]; + readonly entitlement: Entitlement; + readonly enabled: boolean; + readonly limit?: number; + readonly actual?: number; +} + +// From codersdk/deployment.go +export type FeatureName = "access_control" | "advanced_template_scheduling" | "appearance" | "audit_log" | "browser_only" | "control_shared_ports" | "custom_roles" | "external_provisioner_daemons" | "external_token_encryption" | "high_availability" | "multiple_external_auth" | "multiple_organizations" | "scim" | "template_rbac" | "user_limit" | "user_role_management" | "workspace_batch_actions" | "workspace_prebuilds" | "workspace_proxy"; + +export const FeatureNames: FeatureName[] = ["access_control", "advanced_template_scheduling", "appearance", "audit_log", "browser_only", "control_shared_ports", "custom_roles", "external_provisioner_daemons", "external_token_encryption", "high_availability", "multiple_external_auth", "multiple_organizations", "scim", "template_rbac", "user_limit", "user_role_management", "workspace_batch_actions", "workspace_prebuilds", "workspace_proxy"]; // From codersdk/deployment.go export type FeatureSet = "enterprise" | "" | "premium"; @@ -984,73 +859,73 @@ export const FormatZip = "zip"; // From codersdk/parameters.go export interface FriendlyDiagnostic { - readonly severity: DiagnosticSeverityString; - readonly summary: string; - readonly detail: string; - readonly extra: DiagnosticExtra; + readonly severity: DiagnosticSeverityString; + readonly summary: string; + readonly detail: string; + readonly extra: DiagnosticExtra; } // From codersdk/apikey.go export interface GenerateAPIKeyResponse { - readonly key: string; + readonly key: string; } // From codersdk/inboxnotification.go export interface GetInboxNotificationResponse { - readonly notification: InboxNotification; - readonly unread_count: number; + readonly notification: InboxNotification; + readonly unread_count: number; } // From codersdk/insights.go export interface GetUserStatusCountsRequest { - readonly offset: string; + readonly offset: string; } // From codersdk/insights.go export interface GetUserStatusCountsResponse { - readonly status_counts: Record; + readonly status_counts: Record; } // From codersdk/users.go export interface GetUsersResponse { - readonly users: readonly User[]; - readonly count: number; + readonly users: readonly User[]; + readonly count: number; } // From codersdk/gitsshkey.go export interface GitSSHKey { - readonly user_id: string; - readonly created_at: string; - readonly updated_at: string; - readonly public_key: string; + readonly user_id: string; + readonly created_at: string; + readonly updated_at: string; + readonly public_key: string; } // From codersdk/users.go export interface GithubAuthMethod { - readonly enabled: boolean; - readonly default_provider_configured: boolean; + readonly enabled: boolean; + readonly default_provider_configured: boolean; } // From codersdk/groups.go export interface Group { - readonly id: string; - readonly name: string; - readonly display_name: string; - readonly organization_id: string; - readonly members: readonly ReducedUser[]; - readonly total_member_count: number; - readonly avatar_url: string; - readonly quota_allowance: number; - readonly source: GroupSource; - readonly organization_name: string; - readonly organization_display_name: string; + readonly id: string; + readonly name: string; + readonly display_name: string; + readonly organization_id: string; + readonly members: readonly ReducedUser[]; + readonly total_member_count: number; + readonly avatar_url: string; + readonly quota_allowance: number; + readonly source: GroupSource; + readonly organization_name: string; + readonly organization_display_name: string; } // From codersdk/groups.go export interface GroupArguments { - readonly Organization: string; - readonly HasMember: string; - readonly GroupIDs: readonly string[]; + readonly Organization: string; + readonly HasMember: string; + readonly GroupIDs: readonly string[]; } // From codersdk/groups.go @@ -1060,39 +935,21 @@ export const GroupSources: GroupSource[] = ["oidc", "user"]; // From codersdk/idpsync.go export interface GroupSyncSettings { - readonly field: string; - readonly mapping: Record; - readonly regex_filter: string | null; - readonly auto_create_missing_groups: boolean; - readonly legacy_group_name_mapping?: Record; + readonly field: string; + readonly mapping: Record; + readonly regex_filter: string | null; + readonly auto_create_missing_groups: boolean; + readonly legacy_group_name_mapping?: Record; } // From codersdk/deployment.go export interface HTTPCookieConfig { - readonly secure_auth_cookie?: boolean; - readonly same_site?: string; + readonly secure_auth_cookie?: boolean; + readonly same_site?: string; } // From health/model.go -export type HealthCode = - | "EACS03" - | "EACS02" - | "EACS04" - | "EACS01" - | "EDERP01" - | "EDERP02" - | "EDB01" - | "EDB02" - | "EPD03" - | "EPD02" - | "EPD01" - | "EWP02" - | "EWP04" - | "EWP01" - | "EUNKNOWN" - | "EWS01" - | "EWS02" - | "EWS03"; +export type HealthCode = "EACS03" | "EACS02" | "EACS04" | "EACS01" | "EDERP01" | "EDERP02" | "EDB01" | "EDB02" | "EPD03" | "EPD02" | "EPD01" | "EWP02" | "EWP04" | "EWP01" | "EUNKNOWN" | "EWS01" | "EWS02" | "EWS03"; // From health/model.go export const HealthCodeInterfaceSmallMTU = "EIF01"; @@ -1103,54 +960,22 @@ export const HealthCodeSTUNMapVaryDest = "ESTUN02"; // From health/model.go export const HealthCodeSTUNNoNodes = "ESTUN01"; -export const HealthCodes: HealthCode[] = [ - "EACS03", - "EACS02", - "EACS04", - "EACS01", - "EDERP01", - "EDERP02", - "EDB01", - "EDB02", - "EPD03", - "EPD02", - "EPD01", - "EWP02", - "EWP04", - "EWP01", - "EUNKNOWN", - "EWS01", - "EWS02", - "EWS03", -]; +export const HealthCodes: HealthCode[] = ["EACS03", "EACS02", "EACS04", "EACS01", "EDERP01", "EDERP02", "EDB01", "EDB02", "EPD03", "EPD02", "EPD01", "EWP02", "EWP04", "EWP01", "EUNKNOWN", "EWS01", "EWS02", "EWS03"]; // From health/model.go export interface HealthMessage { - readonly code: HealthCode; - readonly message: string; + readonly code: HealthCode; + readonly message: string; } // From healthsdk/healthsdk.go -export type HealthSection = - | "AccessURL" - | "DERP" - | "Database" - | "ProvisionerDaemons" - | "Websocket" - | "WorkspaceProxy"; - -export const HealthSections: HealthSection[] = [ - "AccessURL", - "DERP", - "Database", - "ProvisionerDaemons", - "Websocket", - "WorkspaceProxy", -]; +export type HealthSection = "AccessURL" | "DERP" | "Database" | "ProvisionerDaemons" | "Websocket" | "WorkspaceProxy"; + +export const HealthSections: HealthSection[] = ["AccessURL", "DERP", "Database", "ProvisionerDaemons", "Websocket", "WorkspaceProxy"]; // From healthsdk/healthsdk.go export interface HealthSettings { - readonly dismissed_healthchecks: readonly HealthSection[]; + readonly dismissed_healthchecks: readonly HealthSection[]; } // From health/model.go @@ -1160,55 +985,55 @@ export const HealthSeveritys: HealthSeverity[] = ["error", "ok", "warning"]; // From codersdk/workspaceapps.go export interface Healthcheck { - readonly url: string; - readonly interval: number; - readonly threshold: number; + readonly url: string; + readonly interval: number; + readonly threshold: number; } // From codersdk/deployment.go export interface HealthcheckConfig { - readonly refresh: number; - readonly threshold_database: number; + readonly refresh: number; + readonly threshold_database: number; } // From healthsdk/healthsdk.go export interface HealthcheckReport { - readonly time: string; - readonly healthy: boolean; - readonly severity: HealthSeverity; - readonly derp: DERPHealthReport; - readonly access_url: AccessURLReport; - readonly websocket: WebsocketReport; - readonly database: DatabaseReport; - readonly workspace_proxy: WorkspaceProxyReport; - readonly provisioner_daemons: ProvisionerDaemonsReport; - readonly coder_version: string; + readonly time: string; + readonly healthy: boolean; + readonly severity: HealthSeverity; + readonly derp: DERPHealthReport; + readonly access_url: AccessURLReport; + readonly websocket: WebsocketReport; + readonly database: DatabaseReport; + readonly workspace_proxy: WorkspaceProxyReport; + readonly provisioner_daemons: ProvisionerDaemonsReport; + readonly coder_version: string; } // From codersdk/idpsync.go export interface IDPSyncMapping { - readonly Given: string; - readonly Gets: ResourceIdType; + readonly Given: string; + readonly Gets: ResourceIdType; } // From codersdk/inboxnotification.go export interface InboxNotification { - readonly id: string; - readonly user_id: string; - readonly template_id: string; - readonly targets: readonly string[]; - readonly title: string; - readonly content: string; - readonly icon: string; - readonly actions: readonly InboxNotificationAction[]; - readonly read_at: string | null; - readonly created_at: string; + readonly id: string; + readonly user_id: string; + readonly template_id: string; + readonly targets: readonly string[]; + readonly title: string; + readonly content: string; + readonly icon: string; + readonly actions: readonly InboxNotificationAction[]; + readonly read_at: string | null; + readonly created_at: string; } // From codersdk/inboxnotification.go export interface InboxNotificationAction { - readonly label: string; - readonly url: string; + readonly label: string; + readonly url: string; } // From codersdk/inboxnotification.go @@ -1226,20 +1051,17 @@ export const InboxNotificationFallbackIconWorkspace = "DEFAULT_ICON_WORKSPACE"; // From codersdk/insights.go export type InsightsReportInterval = "day" | "week"; -export const InsightsReportIntervals: InsightsReportInterval[] = [ - "day", - "week", -]; +export const InsightsReportIntervals: InsightsReportInterval[] = ["day", "week"]; // From codersdk/workspaceagents.go export interface IssueReconnectingPTYSignedTokenRequest { - readonly url: string; - readonly agentID: string; + readonly url: string; + readonly agentID: string; } // From codersdk/workspaceagents.go export interface IssueReconnectingPTYSignedTokenResponse { - readonly signed_token: string; + readonly signed_token: string; } // From codersdk/provisionerdaemons.go @@ -1249,69 +1071,62 @@ export const JobErrorCodes: JobErrorCode[] = ["REQUIRED_TEMPLATE_VARIABLES"]; // From codersdk/deployment.go export interface LanguageModel { - readonly id: string; - readonly display_name: string; - readonly provider: string; + readonly id: string; + readonly display_name: string; + readonly provider: string; } // From codersdk/deployment.go export interface LanguageModelConfig { - readonly models: readonly LanguageModel[]; + readonly models: readonly LanguageModel[]; } // From codersdk/licenses.go export interface License { - readonly id: number; - readonly uuid: string; - readonly uploaded_at: string; - // empty interface{} type, falling back to unknown - readonly claims: Record; + readonly id: number; + readonly uuid: string; + readonly uploaded_at: string; + // empty interface{} type, falling back to unknown + readonly claims: Record; } // From codersdk/licenses.go export const LicenseExpiryClaim = "license_expires"; // From codersdk/licenses.go -export const LicenseTelemetryRequiredErrorText = - "License requires telemetry but telemetry is disabled"; +export const LicenseTelemetryRequiredErrorText = "License requires telemetry but telemetry is disabled"; // From codersdk/deployment.go export interface LinkConfig { - readonly name: string; - readonly target: string; - readonly icon: string; + readonly name: string; + readonly target: string; + readonly icon: string; } // From codersdk/inboxnotification.go export interface ListInboxNotificationsRequest { - readonly targets?: string; - readonly templates?: string; - readonly read_status?: string; - readonly starting_before?: string; + readonly targets?: string; + readonly templates?: string; + readonly read_status?: string; + readonly starting_before?: string; } // From codersdk/inboxnotification.go export interface ListInboxNotificationsResponse { - readonly notifications: readonly InboxNotification[]; - readonly unread_count: number; + readonly notifications: readonly InboxNotification[]; + readonly unread_count: number; } // From codersdk/externalauth.go export interface ListUserExternalAuthResponse { - readonly providers: readonly ExternalAuthLinkProvider[]; - readonly links: readonly ExternalAuthLink[]; + readonly providers: readonly ExternalAuthLinkProvider[]; + readonly links: readonly ExternalAuthLink[]; } // From codersdk/provisionerdaemons.go export type LogLevel = "debug" | "error" | "info" | "trace" | "warn"; -export const LogLevels: 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"; @@ -1320,242 +1135,230 @@ export const LogSources: LogSource[] = ["provisioner", "provisioner_daemon"]; // From codersdk/deployment.go export interface LoggingConfig { - readonly log_filter: string; - readonly human: string; - readonly json: string; - readonly stackdriver: string; + readonly log_filter: string; + readonly human: string; + readonly json: string; + readonly stackdriver: string; } // From codersdk/apikey.go export type LoginType = "github" | "none" | "oidc" | "password" | "token" | ""; -export const LoginTypes: LoginType[] = [ - "github", - "none", - "oidc", - "password", - "token", - "", -]; +export const LoginTypes: LoginType[] = ["github", "none", "oidc", "password", "token", ""]; // From codersdk/users.go export interface LoginWithPasswordRequest { - readonly email: string; - readonly password: string; + readonly email: string; + readonly password: string; } // From codersdk/users.go export interface LoginWithPasswordResponse { - readonly session_token: string; + readonly session_token: string; } // From codersdk/provisionerdaemons.go export interface MatchedProvisioners { - readonly count: number; - readonly available: number; - readonly most_recently_seen?: string; + readonly count: number; + readonly available: number; + readonly most_recently_seen?: string; } // From codersdk/organizations.go export interface MinimalOrganization { - readonly id: string; - readonly name: string; - readonly display_name: string; - readonly icon: string; + readonly id: string; + readonly name: string; + readonly display_name: string; + readonly icon: string; } // From codersdk/users.go export interface MinimalUser { - readonly id: string; - readonly username: string; - readonly avatar_url?: string; + readonly id: string; + readonly username: string; + readonly avatar_url?: string; } // From netcheck/netcheck.go export interface NetcheckReport { - readonly UDP: boolean; - readonly IPv6: boolean; - readonly IPv4: boolean; - readonly IPv6CanSend: boolean; - readonly IPv4CanSend: boolean; - readonly OSHasIPv6: boolean; - readonly ICMPv4: boolean; - readonly MappingVariesByDestIP: boolean | null; - readonly HairPinning: boolean | null; - readonly UPnP: boolean | null; - readonly PMP: boolean | null; - readonly PCP: boolean | null; - readonly PreferredDERP: number; - readonly RegionLatency: Record; - readonly RegionV4Latency: Record; - readonly RegionV6Latency: Record; - readonly GlobalV4: string; - readonly GlobalV6: string; - readonly CaptivePortal: boolean | null; + readonly UDP: boolean; + readonly IPv6: boolean; + readonly IPv4: boolean; + readonly IPv6CanSend: boolean; + readonly IPv4CanSend: boolean; + readonly OSHasIPv6: boolean; + readonly ICMPv4: boolean; + readonly MappingVariesByDestIP: boolean | null; + readonly HairPinning: boolean | null; + readonly UPnP: boolean | null; + readonly PMP: boolean | null; + readonly PCP: boolean | null; + readonly PreferredDERP: number; + readonly RegionLatency: Record; + readonly RegionV4Latency: Record; + readonly RegionV6Latency: Record; + readonly GlobalV4: string; + readonly GlobalV6: string; + readonly CaptivePortal: boolean | null; } // From codersdk/notifications.go export interface NotificationMethodsResponse { - readonly available: readonly string[]; - readonly default: string; + readonly available: readonly string[]; + readonly default: string; } // From codersdk/notifications.go export interface NotificationPreference { - readonly id: string; - readonly disabled: boolean; - readonly updated_at: string; + readonly id: string; + readonly disabled: boolean; + readonly updated_at: string; } // From codersdk/notifications.go export interface NotificationTemplate { - readonly id: string; - readonly name: string; - readonly title_template: string; - readonly body_template: string; - readonly actions: string; - readonly group: string; - readonly method: string; - readonly kind: string; - readonly enabled_by_default: boolean; + readonly id: string; + readonly name: string; + readonly title_template: string; + readonly body_template: string; + readonly actions: string; + readonly group: string; + readonly method: string; + readonly kind: string; + readonly enabled_by_default: boolean; } // From codersdk/deployment.go export interface NotificationsConfig { - readonly max_send_attempts: number; - readonly retry_interval: number; - readonly sync_interval: number; - readonly sync_buffer_size: number; - readonly lease_period: number; - readonly lease_count: number; - readonly fetch_interval: number; - readonly method: string; - readonly dispatch_timeout: number; - readonly email: NotificationsEmailConfig; - readonly webhook: NotificationsWebhookConfig; - readonly inbox: NotificationsInboxConfig; + readonly max_send_attempts: number; + readonly retry_interval: number; + readonly sync_interval: number; + readonly sync_buffer_size: number; + readonly lease_period: number; + readonly lease_count: number; + readonly fetch_interval: number; + readonly method: string; + readonly dispatch_timeout: number; + readonly email: NotificationsEmailConfig; + readonly webhook: NotificationsWebhookConfig; + readonly inbox: NotificationsInboxConfig; } // From codersdk/deployment.go export interface NotificationsEmailAuthConfig { - readonly identity: string; - readonly username: string; - readonly password: string; - readonly password_file: string; + readonly identity: string; + readonly username: string; + readonly password: string; + readonly password_file: string; } // From codersdk/deployment.go export interface NotificationsEmailConfig { - readonly from: string; - readonly smarthost: string; - readonly hello: string; - readonly auth: NotificationsEmailAuthConfig; - readonly tls: NotificationsEmailTLSConfig; - readonly force_tls: boolean; + readonly from: string; + readonly smarthost: string; + readonly hello: string; + readonly auth: NotificationsEmailAuthConfig; + readonly tls: NotificationsEmailTLSConfig; + readonly force_tls: boolean; } // From codersdk/deployment.go export interface NotificationsEmailTLSConfig { - readonly start_tls: boolean; - readonly server_name: string; - readonly insecure_skip_verify: boolean; - readonly ca_file: string; - readonly cert_file: string; - readonly key_file: string; + readonly start_tls: boolean; + readonly server_name: string; + readonly insecure_skip_verify: boolean; + readonly ca_file: string; + readonly cert_file: string; + readonly key_file: string; } // From codersdk/deployment.go export interface NotificationsInboxConfig { - readonly enabled: boolean; + readonly enabled: boolean; } // From codersdk/notifications.go export interface NotificationsSettings { - readonly notifier_paused: boolean; + readonly notifier_paused: boolean; } // From codersdk/deployment.go export interface NotificationsWebhookConfig { - readonly endpoint: string; + readonly endpoint: string; } // From codersdk/parameters.go export interface NullHCLString { - readonly value: string; - readonly valid: boolean; + readonly value: string; + readonly valid: boolean; } // From codersdk/oauth2.go export interface OAuth2AppEndpoints { - readonly authorization: string; - readonly token: string; - readonly device_authorization: string; + readonly authorization: string; + readonly token: string; + readonly device_authorization: string; } // From codersdk/deployment.go export interface OAuth2Config { - readonly github: OAuth2GithubConfig; + readonly github: OAuth2GithubConfig; } // From codersdk/oauth2.go export interface OAuth2DeviceFlowCallbackResponse { - readonly redirect_url: string; + readonly redirect_url: string; } // From codersdk/deployment.go export interface OAuth2GithubConfig { - readonly client_id: string; - readonly client_secret: string; - readonly device_flow: boolean; - readonly default_provider_enable: boolean; - readonly allowed_orgs: string; - readonly allowed_teams: string; - readonly allow_signups: boolean; - readonly allow_everyone: boolean; - readonly enterprise_base_url: string; + readonly client_id: string; + readonly client_secret: string; + readonly device_flow: boolean; + readonly default_provider_enable: boolean; + readonly allowed_orgs: string; + readonly allowed_teams: string; + readonly allow_signups: boolean; + readonly allow_everyone: boolean; + readonly enterprise_base_url: string; } // From codersdk/oauth2.go export interface OAuth2ProviderApp { - readonly id: string; - readonly name: string; - readonly callback_url: string; - readonly icon: string; - readonly endpoints: OAuth2AppEndpoints; + readonly id: string; + readonly name: string; + readonly callback_url: string; + readonly icon: string; + readonly endpoints: OAuth2AppEndpoints; } // From codersdk/oauth2.go export interface OAuth2ProviderAppFilter { - readonly user_id?: string; + readonly user_id?: string; } // From codersdk/oauth2.go export interface OAuth2ProviderAppSecret { - readonly id: string; - readonly last_used_at: string | null; - readonly client_secret_truncated: string; + readonly id: string; + readonly last_used_at: string | null; + readonly client_secret_truncated: string; } // From codersdk/oauth2.go export interface OAuth2ProviderAppSecretFull { - readonly id: string; - readonly client_secret_full: string; + readonly id: string; + readonly client_secret_full: string; } // From codersdk/oauth2.go export type OAuth2ProviderGrantType = "authorization_code" | "refresh_token"; -export const OAuth2ProviderGrantTypes: OAuth2ProviderGrantType[] = [ - "authorization_code", - "refresh_token", -]; +export const OAuth2ProviderGrantTypes: OAuth2ProviderGrantType[] = ["authorization_code", "refresh_token"]; // From codersdk/oauth2.go export type OAuth2ProviderResponseType = "code"; -export const OAuth2ProviderResponseTypes: OAuth2ProviderResponseType[] = [ - "code", -]; +export const OAuth2ProviderResponseTypes: OAuth2ProviderResponseType[] = ["code"]; // From codersdk/client.go export const OAuth2RedirectCookie = "oauth_redirect"; @@ -1565,216 +1368,188 @@ export const OAuth2StateCookie = "oauth_state"; // From codersdk/users.go export interface OAuthConversionResponse { - readonly state_string: string; - readonly expires_at: string; - readonly to_type: LoginType; - readonly user_id: string; + readonly state_string: string; + readonly expires_at: string; + readonly to_type: LoginType; + readonly user_id: string; } // From codersdk/users.go export interface OIDCAuthMethod extends AuthMethod { - readonly signInText: string; - readonly iconUrl: string; + 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; - readonly client_key_file: string; - readonly client_cert_file: string; - readonly email_domain: string; - readonly issuer_url: string; - readonly scopes: string; - readonly ignore_email_verified: boolean; - readonly username_field: string; - readonly name_field: string; - readonly email_field: string; - readonly auth_url_params: SerpentStruct>; - readonly ignore_user_info: boolean; - readonly source_user_info_from_access_token: boolean; - readonly organization_field: string; - readonly organization_mapping: SerpentStruct>; - readonly organization_assign_default: boolean; - readonly group_auto_create: boolean; - readonly group_regex_filter: string; - readonly group_allow_list: string; - readonly groups_field: string; - readonly group_mapping: SerpentStruct>; - readonly user_role_field: string; - readonly user_role_mapping: SerpentStruct>; - readonly user_roles_default: string; - readonly sign_in_text: string; - readonly icon_url: string; - readonly signups_disabled_text: string; - readonly skip_issuer_checks: boolean; + readonly allow_signups: boolean; + readonly client_id: string; + readonly client_secret: string; + readonly client_key_file: string; + readonly client_cert_file: string; + readonly email_domain: string; + readonly issuer_url: string; + readonly scopes: string; + readonly ignore_email_verified: boolean; + readonly username_field: string; + readonly name_field: string; + readonly email_field: string; + readonly auth_url_params: SerpentStruct>; + readonly ignore_user_info: boolean; + readonly source_user_info_from_access_token: boolean; + readonly organization_field: string; + readonly organization_mapping: SerpentStruct>; + readonly organization_assign_default: boolean; + readonly group_auto_create: boolean; + readonly group_regex_filter: string; + readonly group_allow_list: string; + readonly groups_field: string; + readonly group_mapping: SerpentStruct>; + readonly user_role_field: string; + readonly user_role_mapping: SerpentStruct>; + readonly user_roles_default: string; + readonly sign_in_text: string; + readonly icon_url: string; + readonly signups_disabled_text: string; + readonly skip_issuer_checks: boolean; } // From codersdk/parameters.go export type OptionType = "bool" | "list(string)" | "number" | "string"; -export const OptionTypes: OptionType[] = [ - "bool", - "list(string)", - "number", - "string", -]; +export const OptionTypes: OptionType[] = ["bool", "list(string)", "number", "string"]; // From codersdk/organizations.go export interface Organization extends MinimalOrganization { - readonly description: string; - readonly created_at: string; - readonly updated_at: string; - readonly is_default: boolean; + readonly description: string; + readonly created_at: string; + readonly updated_at: string; + readonly is_default: boolean; } // 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: readonly SlimRole[]; + readonly user_id: string; + readonly organization_id: string; + readonly created_at: string; + readonly updated_at: string; + readonly roles: readonly SlimRole[]; } // From codersdk/organizations.go export interface OrganizationMemberWithUserData extends OrganizationMember { - readonly username: string; - readonly name?: string; - readonly avatar_url?: string; - readonly email: string; - readonly global_roles: readonly SlimRole[]; + readonly username: string; + readonly name?: string; + readonly avatar_url?: string; + readonly email: string; + readonly global_roles: readonly SlimRole[]; } // From codersdk/organizations.go export interface OrganizationProvisionerDaemonsOptions { - readonly Limit: number; - readonly IDs: readonly string[]; - readonly Tags: Record; + readonly Limit: number; + readonly IDs: readonly string[]; + readonly Tags: Record; } // From codersdk/organizations.go export interface OrganizationProvisionerJobsOptions { - readonly Limit: number; - readonly IDs: readonly string[]; - readonly Status: readonly ProvisionerJobStatus[]; - readonly Tags: Record; + readonly Limit: number; + readonly IDs: readonly string[]; + readonly Status: readonly ProvisionerJobStatus[]; + readonly Tags: Record; } // From codersdk/idpsync.go export interface OrganizationSyncSettings { - readonly field: string; - readonly mapping: Record; - readonly organization_assign_default: boolean; + readonly field: string; + readonly mapping: Record; + readonly organization_assign_default: boolean; } // From codersdk/organizations.go export interface PaginatedMembersRequest { - readonly limit?: number; - readonly offset?: number; + readonly limit?: number; + readonly offset?: number; } // From codersdk/organizations.go export interface PaginatedMembersResponse { - readonly members: readonly OrganizationMemberWithUserData[]; - readonly count: number; + readonly members: readonly OrganizationMemberWithUserData[]; + readonly count: number; } // From codersdk/pagination.go export interface Pagination { - readonly after_id?: string; - readonly limit?: number; - readonly offset?: number; + readonly after_id?: string; + readonly limit?: number; + readonly offset?: number; } // From codersdk/parameters.go -export type ParameterFormType = - | "checkbox" - | "" - | "dropdown" - | "error" - | "input" - | "multi-select" - | "radio" - | "slider" - | "switch" - | "tag-select" - | "textarea"; - -export const ParameterFormTypes: ParameterFormType[] = [ - "checkbox", - "", - "dropdown", - "error", - "input", - "multi-select", - "radio", - "slider", - "switch", - "tag-select", - "textarea", -]; +export type ParameterFormType = "checkbox" | "" | "dropdown" | "error" | "input" | "multi-select" | "radio" | "slider" | "switch" | "tag-select" | "textarea"; + +export const ParameterFormTypes: ParameterFormType[] = ["checkbox", "", "dropdown", "error", "input", "multi-select", "radio", "slider", "switch", "tag-select", "textarea"]; // From codersdk/idpsync.go export interface PatchGroupIDPSyncConfigRequest { - readonly field: string; - readonly regex_filter: string | null; - readonly auto_create_missing_groups: boolean; + readonly field: string; + readonly regex_filter: string | null; + readonly auto_create_missing_groups: boolean; } // From codersdk/idpsync.go export interface PatchGroupIDPSyncMappingRequest { - readonly Add: readonly IDPSyncMapping[]; - readonly Remove: readonly IDPSyncMapping[]; + readonly Add: readonly IDPSyncMapping[]; + readonly Remove: readonly IDPSyncMapping[]; } // From codersdk/groups.go export interface PatchGroupRequest { - readonly add_users: readonly string[]; - readonly remove_users: readonly string[]; - readonly name: string; - readonly display_name: string | null; - readonly avatar_url: string | null; - readonly quota_allowance: number | null; + readonly add_users: readonly string[]; + readonly remove_users: readonly string[]; + readonly name: string; + readonly display_name: string | null; + readonly avatar_url: string | null; + readonly quota_allowance: number | null; } // From codersdk/idpsync.go export interface PatchOrganizationIDPSyncConfigRequest { - readonly field: string; - readonly assign_default: boolean; + readonly field: string; + readonly assign_default: boolean; } // From codersdk/idpsync.go export interface PatchOrganizationIDPSyncMappingRequest { - readonly Add: readonly IDPSyncMapping[]; - readonly Remove: readonly IDPSyncMapping[]; + readonly Add: readonly IDPSyncMapping[]; + readonly Remove: readonly IDPSyncMapping[]; } // From codersdk/idpsync.go export interface PatchRoleIDPSyncConfigRequest { - readonly field: string; + readonly field: string; } // From codersdk/idpsync.go export interface PatchRoleIDPSyncMappingRequest { - readonly Add: readonly IDPSyncMapping[]; - readonly Remove: readonly IDPSyncMapping[]; + readonly Add: readonly IDPSyncMapping[]; + readonly Remove: readonly IDPSyncMapping[]; } // From codersdk/templateversions.go export interface PatchTemplateVersionRequest { - readonly name: string; - readonly message?: string; + readonly name: string; + readonly message?: 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; + readonly id: string; + readonly name: string; + readonly display_name: string; + readonly icon: string; + readonly regenerate_token: boolean; } // From codersdk/client.go @@ -1782,22 +1557,22 @@ export const PathAppSessionTokenCookie = "coder_path_app_session_token"; // From codersdk/roles.go export interface Permission { - readonly negate: boolean; - readonly resource_type: RBACResource; - readonly action: RBACAction; + readonly negate: boolean; + readonly resource_type: RBACResource; + readonly action: RBACAction; } // From codersdk/oauth2.go export interface PostOAuth2ProviderAppRequest { - readonly name: string; - readonly callback_url: string; - readonly icon: string; + readonly name: string; + readonly callback_url: string; + readonly icon: string; } // From codersdk/workspaces.go export interface PostWorkspaceUsageRequest { - readonly agent_id: string; - readonly app_name: UsageAppName; + readonly agent_id: string; + readonly app_name: UsageAppName; } // From codersdk/deployment.go @@ -1807,123 +1582,123 @@ export const PostgresAuths: PostgresAuth[] = ["awsiamrds", "password"]; // From codersdk/deployment.go export interface PprofConfig { - readonly enable: boolean; - readonly address: string; + readonly enable: boolean; + readonly address: string; } // From codersdk/deployment.go export interface PrebuildsConfig { - readonly reconciliation_interval: number; - readonly reconciliation_backoff_interval: number; - readonly reconciliation_backoff_lookback: number; - readonly failure_hard_limit: number; + readonly reconciliation_interval: number; + readonly reconciliation_backoff_interval: number; + readonly reconciliation_backoff_lookback: number; + readonly failure_hard_limit: number; } // From codersdk/presets.go export interface Preset { - readonly ID: string; - readonly Name: string; - readonly Parameters: readonly PresetParameter[]; + readonly ID: string; + readonly Name: string; + readonly Parameters: readonly PresetParameter[]; } // From codersdk/presets.go export interface PresetParameter { - readonly Name: string; - readonly Value: string; + readonly Name: string; + readonly Value: string; } // From codersdk/parameters.go export interface PreviewParameter extends PreviewParameterData { - readonly value: NullHCLString; - readonly diagnostics: readonly FriendlyDiagnostic[]; + readonly value: NullHCLString; + readonly diagnostics: readonly FriendlyDiagnostic[]; } // From codersdk/parameters.go export interface PreviewParameterData { - readonly name: string; - readonly display_name: string; - readonly description: string; - readonly type: OptionType; - readonly form_type: ParameterFormType; - readonly styling: PreviewParameterStyling; - readonly mutable: boolean; - readonly default_value: NullHCLString; - readonly icon: string; - readonly options: readonly PreviewParameterOption[]; - readonly validations: readonly PreviewParameterValidation[]; - readonly required: boolean; - readonly order: number; - readonly ephemeral: boolean; + readonly name: string; + readonly display_name: string; + readonly description: string; + readonly type: OptionType; + readonly form_type: ParameterFormType; + readonly styling: PreviewParameterStyling; + readonly mutable: boolean; + readonly default_value: NullHCLString; + readonly icon: string; + readonly options: readonly PreviewParameterOption[]; + readonly validations: readonly PreviewParameterValidation[]; + readonly required: boolean; + readonly order: number; + readonly ephemeral: boolean; } // From codersdk/parameters.go export interface PreviewParameterOption { - readonly name: string; - readonly description: string; - readonly value: NullHCLString; - readonly icon: string; + readonly name: string; + readonly description: string; + readonly value: NullHCLString; + readonly icon: string; } // From codersdk/parameters.go export interface PreviewParameterStyling { - readonly placeholder?: string; - readonly disabled?: boolean; - readonly label?: string; + readonly placeholder?: string; + readonly disabled?: boolean; + readonly label?: string; } // From codersdk/parameters.go export interface PreviewParameterValidation { - readonly validation_error: string; - readonly validation_regex: string | null; - readonly validation_min: number | null; - readonly validation_max: number | null; - readonly validation_monotonic: string | null; + readonly validation_error: string; + readonly validation_regex: string | null; + readonly validation_min: number | null; + readonly validation_max: number | null; + readonly validation_monotonic: string | null; } // From codersdk/deployment.go export interface PrometheusConfig { - readonly enable: boolean; - readonly address: string; - readonly collect_agent_stats: boolean; - readonly collect_db_metrics: boolean; - readonly aggregate_agent_stats_by: string; + readonly enable: boolean; + readonly address: string; + readonly collect_agent_stats: boolean; + readonly collect_db_metrics: boolean; + readonly aggregate_agent_stats_by: string; } // From codersdk/deployment.go export interface ProvisionerConfig { - readonly daemons: number; - readonly daemon_types: string; - readonly daemon_poll_interval: number; - readonly daemon_poll_jitter: number; - readonly force_cancel_interval: number; - readonly daemon_psk: string; + readonly daemons: number; + readonly daemon_types: string; + readonly daemon_poll_interval: number; + readonly daemon_poll_jitter: number; + readonly force_cancel_interval: number; + readonly daemon_psk: string; } // From codersdk/provisionerdaemons.go export interface ProvisionerDaemon { - readonly id: string; - readonly organization_id: string; - readonly key_id: string; - readonly created_at: string; - readonly last_seen_at?: string; - readonly name: string; - readonly version: string; - readonly api_version: string; - readonly provisioners: readonly ProvisionerType[]; - readonly tags: Record; - readonly key_name: string | null; - readonly status: ProvisionerDaemonStatus | null; - readonly current_job: ProvisionerDaemonJob | null; - readonly previous_job: ProvisionerDaemonJob | null; + readonly id: string; + readonly organization_id: string; + readonly key_id: string; + readonly created_at: string; + readonly last_seen_at?: string; + readonly name: string; + readonly version: string; + readonly api_version: string; + readonly provisioners: readonly ProvisionerType[]; + readonly tags: Record; + readonly key_name: string | null; + readonly status: ProvisionerDaemonStatus | null; + readonly current_job: ProvisionerDaemonJob | null; + readonly previous_job: ProvisionerDaemonJob | null; } // From codersdk/provisionerdaemons.go export interface ProvisionerDaemonJob { - readonly id: string; - readonly status: ProvisionerJobStatus; - readonly template_name: string; - readonly template_icon: string; - readonly template_display_name: string; + readonly id: string; + readonly status: ProvisionerJobStatus; + readonly template_name: string; + readonly template_icon: string; + readonly template_display_name: string; } // From codersdk/client.go @@ -1935,119 +1710,93 @@ export const ProvisionerDaemonPSK = "Coder-Provisioner-Daemon-PSK"; // From codersdk/provisionerdaemons.go export type ProvisionerDaemonStatus = "busy" | "idle" | "offline"; -export const ProvisionerDaemonStatuses: ProvisionerDaemonStatus[] = [ - "busy", - "idle", - "offline", -]; +export const ProvisionerDaemonStatuses: ProvisionerDaemonStatus[] = ["busy", "idle", "offline"]; // From healthsdk/healthsdk.go export interface ProvisionerDaemonsReport extends BaseReport { - readonly items: readonly ProvisionerDaemonsReportItem[]; + readonly items: readonly ProvisionerDaemonsReportItem[]; } // From healthsdk/healthsdk.go export interface ProvisionerDaemonsReportItem { - readonly provisioner_daemon: ProvisionerDaemon; - readonly warnings: readonly HealthMessage[]; + readonly provisioner_daemon: ProvisionerDaemon; + readonly warnings: readonly HealthMessage[]; } // 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 worker_name?: string; - readonly file_id: string; - readonly tags: Record; - readonly queue_position: number; - readonly queue_size: number; - readonly organization_id: string; - readonly input: ProvisionerJobInput; - readonly type: ProvisionerJobType; - readonly available_workers?: readonly string[]; - readonly metadata: ProvisionerJobMetadata; + 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 worker_name?: string; + readonly file_id: string; + readonly tags: Record; + readonly queue_position: number; + readonly queue_size: number; + readonly organization_id: string; + readonly input: ProvisionerJobInput; + readonly type: ProvisionerJobType; + readonly available_workers?: readonly string[]; + readonly metadata: ProvisionerJobMetadata; } // From codersdk/provisionerdaemons.go export interface ProvisionerJobInput { - readonly template_version_id?: string; - readonly workspace_build_id?: string; - readonly error?: string; + readonly template_version_id?: string; + readonly workspace_build_id?: string; + readonly error?: 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; + readonly id: number; + readonly created_at: string; + readonly log_source: LogSource; + readonly log_level: LogLevel; + readonly stage: string; + readonly output: string; } // From codersdk/provisionerdaemons.go export interface ProvisionerJobMetadata { - readonly template_version_name: string; - readonly template_id: string; - readonly template_name: string; - readonly template_display_name: string; - readonly template_icon: string; - readonly workspace_id?: string; - readonly workspace_name?: string; + readonly template_version_name: string; + readonly template_id: string; + readonly template_name: string; + readonly template_display_name: string; + readonly template_icon: string; + readonly workspace_id?: string; + readonly workspace_name?: string; } // From codersdk/provisionerdaemons.go -export type ProvisionerJobStatus = - | "canceled" - | "canceling" - | "failed" - | "pending" - | "running" - | "succeeded" - | "unknown"; - -export const ProvisionerJobStatuses: ProvisionerJobStatus[] = [ - "canceled", - "canceling", - "failed", - "pending", - "running", - "succeeded", - "unknown", -]; +export type ProvisionerJobStatus = "canceled" | "canceling" | "failed" | "pending" | "running" | "succeeded" | "unknown"; + +export const ProvisionerJobStatuses: ProvisionerJobStatus[] = ["canceled", "canceling", "failed", "pending", "running", "succeeded", "unknown"]; // From codersdk/provisionerdaemons.go -export type ProvisionerJobType = - | "template_version_dry_run" - | "template_version_import" - | "workspace_build"; +export type ProvisionerJobType = "template_version_dry_run" | "template_version_import" | "workspace_build"; -export const ProvisionerJobTypes: ProvisionerJobType[] = [ - "template_version_dry_run", - "template_version_import", - "workspace_build", -]; +export const ProvisionerJobTypes: ProvisionerJobType[] = ["template_version_dry_run", "template_version_import", "workspace_build"]; // From codersdk/provisionerdaemons.go export interface ProvisionerKey { - readonly id: string; - readonly created_at: string; - readonly organization: string; - readonly name: string; - readonly tags: ProvisionerKeyTags; + readonly id: string; + readonly created_at: string; + readonly organization: string; + readonly name: string; + readonly tags: ProvisionerKeyTags; } // From codersdk/provisionerdaemons.go export interface ProvisionerKeyDaemons { - readonly key: ProvisionerKey; - readonly daemons: readonly ProvisionerDaemon[]; + readonly key: ProvisionerKey; + readonly daemons: readonly ProvisionerDaemon[]; } // From codersdk/provisionerdaemons.go @@ -2083,13 +1832,13 @@ export const ProvisionerStorageMethods: ProvisionerStorageMethod[] = ["file"]; // From codersdk/workspacebuilds.go export interface ProvisionerTiming { - readonly job_id: string; - readonly started_at: string; - readonly ended_at: string; - readonly stage: TimingStage; - readonly source: string; - readonly action: string; - readonly resource: string; + readonly job_id: string; + readonly started_at: string; + readonly ended_at: string; + readonly stage: TimingStage; + readonly source: string; + readonly action: string; + readonly resource: string; } // From codersdk/organizations.go @@ -2099,181 +1848,64 @@ export const ProvisionerTypes: ProvisionerType[] = ["echo", "terraform"]; // From codersdk/workspaceproxy.go export interface ProxyHealthReport { - readonly errors: readonly string[]; - readonly warnings: readonly string[]; + readonly errors: readonly string[]; + readonly warnings: readonly string[]; } // From codersdk/workspaceproxy.go -export type ProxyHealthStatus = - | "ok" - | "unhealthy" - | "unreachable" - | "unregistered"; - -export const ProxyHealthStatuses: ProxyHealthStatus[] = [ - "ok", - "unhealthy", - "unreachable", - "unregistered", -]; +export type ProxyHealthStatus = "ok" | "unhealthy" | "unreachable" | "unregistered"; + +export const ProxyHealthStatuses: ProxyHealthStatus[] = ["ok", "unhealthy", "unreachable", "unregistered"]; // From codersdk/workspaces.go export interface PutExtendWorkspaceRequest { - readonly deadline: string; + readonly deadline: string; } // From codersdk/oauth2.go export interface PutOAuth2ProviderAppRequest { - readonly name: string; - readonly callback_url: string; - readonly icon: string; + readonly name: string; + readonly callback_url: string; + readonly icon: string; } // From codersdk/rbacresources_gen.go -export type RBACAction = - | "application_connect" - | "assign" - | "create" - | "create_agent" - | "delete" - | "delete_agent" - | "read" - | "read_personal" - | "ssh" - | "unassign" - | "update" - | "update_personal" - | "use" - | "view_insights" - | "start" - | "stop"; - -export const RBACActions: RBACAction[] = [ - "application_connect", - "assign", - "create", - "create_agent", - "delete", - "delete_agent", - "read", - "read_personal", - "ssh", - "unassign", - "update", - "update_personal", - "use", - "view_insights", - "start", - "stop", -]; +export type RBACAction = "application_connect" | "assign" | "create" | "create_agent" | "delete" | "delete_agent" | "read" | "read_personal" | "ssh" | "unassign" | "update" | "update_personal" | "use" | "view_insights" | "start" | "stop"; + +export const RBACActions: RBACAction[] = ["application_connect", "assign", "create", "create_agent", "delete", "delete_agent", "read", "read_personal", "ssh", "unassign", "update", "update_personal", "use", "view_insights", "start", "stop"]; // From codersdk/rbacresources_gen.go -export type RBACResource = - | "api_key" - | "assign_org_role" - | "assign_role" - | "audit_log" - | "chat" - | "crypto_key" - | "debug_info" - | "deployment_config" - | "deployment_stats" - | "file" - | "group" - | "group_member" - | "idpsync_settings" - | "inbox_notification" - | "license" - | "notification_message" - | "notification_preference" - | "notification_template" - | "oauth2_app" - | "oauth2_app_code_token" - | "oauth2_app_secret" - | "organization" - | "organization_member" - | "provisioner_daemon" - | "provisioner_jobs" - | "replicas" - | "system" - | "tailnet_coordinator" - | "template" - | "user" - | "webpush_subscription" - | "*" - | "workspace" - | "workspace_agent_devcontainers" - | "workspace_agent_resource_monitor" - | "workspace_dormant" - | "workspace_proxy"; - -export const RBACResources: RBACResource[] = [ - "api_key", - "assign_org_role", - "assign_role", - "audit_log", - "chat", - "crypto_key", - "debug_info", - "deployment_config", - "deployment_stats", - "file", - "group", - "group_member", - "idpsync_settings", - "inbox_notification", - "license", - "notification_message", - "notification_preference", - "notification_template", - "oauth2_app", - "oauth2_app_code_token", - "oauth2_app_secret", - "organization", - "organization_member", - "provisioner_daemon", - "provisioner_jobs", - "replicas", - "system", - "tailnet_coordinator", - "template", - "user", - "webpush_subscription", - "*", - "workspace", - "workspace_agent_devcontainers", - "workspace_agent_resource_monitor", - "workspace_dormant", - "workspace_proxy", -]; +export type RBACResource = "api_key" | "assign_org_role" | "assign_role" | "audit_log" | "chat" | "crypto_key" | "debug_info" | "deployment_config" | "deployment_stats" | "file" | "group" | "group_member" | "idpsync_settings" | "inbox_notification" | "license" | "notification_message" | "notification_preference" | "notification_template" | "oauth2_app" | "oauth2_app_code_token" | "oauth2_app_secret" | "organization" | "organization_member" | "provisioner_daemon" | "provisioner_jobs" | "replicas" | "system" | "tailnet_coordinator" | "template" | "user" | "webpush_subscription" | "*" | "workspace" | "workspace_agent_devcontainers" | "workspace_agent_resource_monitor" | "workspace_dormant" | "workspace_proxy"; + +export const RBACResources: RBACResource[] = ["api_key", "assign_org_role", "assign_role", "audit_log", "chat", "crypto_key", "debug_info", "deployment_config", "deployment_stats", "file", "group", "group_member", "idpsync_settings", "inbox_notification", "license", "notification_message", "notification_preference", "notification_template", "oauth2_app", "oauth2_app_code_token", "oauth2_app_secret", "organization", "organization_member", "provisioner_daemon", "provisioner_jobs", "replicas", "system", "tailnet_coordinator", "template", "user", "webpush_subscription", "*", "workspace", "workspace_agent_devcontainers", "workspace_agent_resource_monitor", "workspace_dormant", "workspace_proxy"]; // From codersdk/deployment.go export interface RateLimitConfig { - readonly disable_all: boolean; - readonly api: number; + readonly disable_all: boolean; + readonly api: number; } // From codersdk/users.go export interface ReducedUser extends MinimalUser { - readonly name?: string; - readonly email: string; - readonly created_at: string; - readonly updated_at: string; - readonly last_seen_at?: string; - readonly status: UserStatus; - readonly login_type: LoginType; - readonly theme_preference?: string; + readonly name?: string; + readonly email: string; + readonly created_at: string; + readonly updated_at: string; + readonly last_seen_at?: string; + readonly status: UserStatus; + readonly login_type: LoginType; + readonly theme_preference?: string; } // 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; + 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 @@ -2281,99 +1913,50 @@ export type RegionTypes = Region | WorkspaceProxy; // From codersdk/workspaceproxy.go export interface RegionsResponse { - readonly regions: readonly R[]; + readonly regions: readonly R[]; } // 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; + 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/users.go export interface RequestOneTimePasscodeRequest { - readonly email: string; + readonly email: string; } // From codersdk/workspaces.go export interface ResolveAutostartResponse { - readonly parameter_mismatch: boolean; + readonly parameter_mismatch: boolean; } // From codersdk/audit.go -export type ResourceType = - | "api_key" - | "convert_login" - | "custom_role" - | "git_ssh_key" - | "group" - | "health_settings" - | "idp_sync_settings_group" - | "idp_sync_settings_organization" - | "idp_sync_settings_role" - | "license" - | "notification_template" - | "notifications_settings" - | "oauth2_provider_app" - | "oauth2_provider_app_secret" - | "organization" - | "organization_member" - | "template" - | "template_version" - | "user" - | "workspace" - | "workspace_agent" - | "workspace_app" - | "workspace_build" - | "workspace_proxy"; - -export const ResourceTypes: ResourceType[] = [ - "api_key", - "convert_login", - "custom_role", - "git_ssh_key", - "group", - "health_settings", - "idp_sync_settings_group", - "idp_sync_settings_organization", - "idp_sync_settings_role", - "license", - "notification_template", - "notifications_settings", - "oauth2_provider_app", - "oauth2_provider_app_secret", - "organization", - "organization_member", - "template", - "template_version", - "user", - "workspace", - "workspace_agent", - "workspace_app", - "workspace_build", - "workspace_proxy", -]; +export type ResourceType = "api_key" | "convert_login" | "custom_role" | "git_ssh_key" | "group" | "health_settings" | "idp_sync_settings_group" | "idp_sync_settings_organization" | "idp_sync_settings_role" | "license" | "notification_template" | "notifications_settings" | "oauth2_provider_app" | "oauth2_provider_app_secret" | "organization" | "organization_member" | "template" | "template_version" | "user" | "workspace" | "workspace_agent" | "workspace_app" | "workspace_build" | "workspace_proxy"; + +export const ResourceTypes: ResourceType[] = ["api_key", "convert_login", "custom_role", "git_ssh_key", "group", "health_settings", "idp_sync_settings_group", "idp_sync_settings_organization", "idp_sync_settings_role", "license", "notification_template", "notifications_settings", "oauth2_provider_app", "oauth2_provider_app_secret", "organization", "organization_member", "template", "template_version", "user", "workspace", "workspace_agent", "workspace_app", "workspace_build", "workspace_proxy"]; // From codersdk/client.go export interface Response { - readonly message: string; - readonly detail?: string; - readonly validations?: readonly ValidationError[]; + readonly message: string; + readonly detail?: string; + readonly validations?: readonly ValidationError[]; } // From codersdk/roles.go export interface Role { - readonly name: string; - readonly organization_id?: string; - readonly display_name: string; - readonly site_permissions: readonly Permission[]; - readonly organization_permissions: readonly Permission[]; - readonly user_permissions: readonly Permission[]; + readonly name: string; + readonly organization_id?: string; + readonly display_name: string; + readonly site_permissions: readonly Permission[]; + readonly organization_permissions: readonly Permission[]; + readonly user_permissions: readonly Permission[]; } // From codersdk/rbacroles.go @@ -2398,16 +1981,15 @@ export const RoleOrganizationTemplateAdmin = "organization-template-admin"; export const RoleOrganizationUserAdmin = "organization-user-admin"; // From codersdk/rbacroles.go -export const RoleOrganizationWorkspaceCreationBan = - "organization-workspace-creation-ban"; +export const RoleOrganizationWorkspaceCreationBan = "organization-workspace-creation-ban"; // From codersdk/rbacroles.go export const RoleOwner = "owner"; // From codersdk/idpsync.go export interface RoleSyncSettings { - readonly field: string; - readonly mapping: Record; + readonly field: string; + readonly mapping: Record; } // From codersdk/rbacroles.go @@ -2418,22 +2000,22 @@ export const RoleUserAdmin = "user-admin"; // From codersdk/deployment.go export interface SSHConfig { - readonly DeploymentName: string; - readonly SSHConfigOptions: string; + readonly DeploymentName: string; + readonly SSHConfigOptions: string; } // From codersdk/deployment.go export interface SSHConfigResponse { - readonly hostname_prefix: string; - readonly hostname_suffix: string; - readonly ssh_config_options: Record; + readonly hostname_prefix: string; + readonly hostname_suffix: string; + readonly ssh_config_options: Record; } // From healthsdk/healthsdk.go export interface STUNReport { - readonly Enabled: boolean; - readonly CanSTUN: boolean; - readonly Error: string | null; + readonly Enabled: boolean; + readonly CanSTUN: boolean; + readonly Error: string | null; } // From serpent/serpent.go @@ -2441,30 +2023,30 @@ export type SerpentAnnotations = Record; // From serpent/serpent.go export interface SerpentGroup { - readonly parent?: SerpentGroup; - readonly name?: string; - readonly yaml?: string; - readonly description?: string; + readonly parent?: SerpentGroup; + readonly name?: string; + readonly yaml?: string; + readonly description?: string; } // From serpent/option.go export interface SerpentOption { - readonly name?: string; - readonly description?: string; - readonly required?: boolean; - readonly flag?: string; - readonly flag_shorthand?: string; - readonly env?: string; - readonly yaml?: string; - readonly default?: string; - // interface type, falling back to unknown - // this is likely an enum in an external package "github.com/spf13/pflag.Value" - readonly value?: unknown; - readonly annotations?: SerpentAnnotations; - readonly group?: SerpentGroup; - readonly use_instead?: readonly SerpentOption[]; - readonly hidden?: boolean; - readonly value_source?: SerpentValueSource; + readonly name?: string; + readonly description?: string; + readonly required?: boolean; + readonly flag?: string; + readonly flag_shorthand?: string; + readonly env?: string; + readonly yaml?: string; + readonly default?: string; + // interface type, falling back to unknown + // this is likely an enum in an external package "github.com/spf13/pflag.Value" + readonly value?: unknown; + readonly annotations?: SerpentAnnotations; + readonly group?: SerpentGroup; + readonly use_instead?: readonly SerpentOption[]; + readonly hidden?: boolean; + readonly value_source?: SerpentValueSource; } // From serpent/option.go @@ -2478,48 +2060,44 @@ export type SerpentValueSource = string; // From derp/derp_client.go export interface ServerInfoMessage { - readonly TokenBucketBytesPerSecond: number; - readonly TokenBucketBytesBurst: number; + readonly TokenBucketBytesPerSecond: number; + readonly TokenBucketBytesBurst: number; } // From codersdk/serversentevents.go export interface ServerSentEvent { - readonly type: ServerSentEventType; - // empty interface{} type, falling back to unknown - readonly data: unknown; + readonly type: ServerSentEventType; + // empty interface{} type, falling back to unknown + readonly data: unknown; } // From codersdk/serversentevents.go export type ServerSentEventType = "data" | "error" | "ping"; -export const ServerSentEventTypes: ServerSentEventType[] = [ - "data", - "error", - "ping", -]; +export const ServerSentEventTypes: ServerSentEventType[] = ["data", "error", "ping"]; // From codersdk/deployment.go export interface ServiceBannerConfig { - readonly enabled: boolean; - readonly message?: string; - readonly background_color?: string; + 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; + readonly vscode: number; + readonly ssh: number; + readonly jetbrains: number; + readonly reconnecting_pty: number; } // From codersdk/deployment.go export interface SessionLifetime { - readonly disable_expiry_refresh?: boolean; - readonly default_duration: number; - readonly default_token_lifetime?: number; - readonly max_token_lifetime?: number; - readonly max_admin_token_lifetime?: number; + readonly disable_expiry_refresh?: boolean; + readonly default_duration: number; + readonly default_token_lifetime?: number; + readonly max_token_lifetime?: number; + readonly max_admin_token_lifetime?: number; } // From codersdk/client.go @@ -2536,126 +2114,125 @@ export const SignedAppTokenQueryParameter = "coder_signed_app_token_23db1dde"; // From codersdk/roles.go export interface SlimRole { - readonly name: string; - readonly display_name: string; - readonly organization_id?: string; + readonly name: string; + readonly display_name: string; + readonly organization_id?: string; } // From codersdk/client.go -export const SubdomainAppSessionTokenCookie = - "coder_subdomain_app_session_token"; +export const SubdomainAppSessionTokenCookie = "coder_subdomain_app_session_token"; // From codersdk/deployment.go export interface SupportConfig { - readonly links: SerpentStruct; + readonly links: SerpentStruct; } // From codersdk/deployment.go export interface SwaggerConfig { - readonly enable: boolean; + readonly enable: boolean; } // From codersdk/deployment.go export interface TLSConfig { - readonly enable: boolean; - readonly address: string; - readonly redirect_http: boolean; - readonly cert_file: string; - readonly client_auth: string; - readonly client_ca_file: string; - readonly key_file: string; - readonly min_version: string; - readonly client_cert_file: string; - readonly client_key_file: string; - readonly supported_ciphers: string; - readonly allow_insecure_ciphers: boolean; + readonly enable: boolean; + readonly address: string; + readonly redirect_http: boolean; + readonly cert_file: string; + readonly client_auth: string; + readonly client_ca_file: string; + readonly key_file: string; + readonly min_version: string; + readonly client_cert_file: string; + readonly client_key_file: string; + readonly supported_ciphers: string; + readonly allow_insecure_ciphers: boolean; } // From tailcfg/derpmap.go export interface TailDERPNode { - readonly Name: string; - readonly RegionID: number; - readonly HostName: string; - readonly CertName?: string; - readonly IPv4?: string; - readonly IPv6?: string; - readonly STUNPort?: number; - readonly STUNOnly?: boolean; - readonly DERPPort?: number; - readonly InsecureForTests?: boolean; - readonly ForceHTTP?: boolean; - readonly STUNTestIP?: string; - readonly CanPort80?: boolean; + readonly Name: string; + readonly RegionID: number; + readonly HostName: string; + readonly CertName?: string; + readonly IPv4?: string; + readonly IPv6?: string; + readonly STUNPort?: number; + readonly STUNOnly?: boolean; + readonly DERPPort?: number; + readonly InsecureForTests?: boolean; + readonly ForceHTTP?: boolean; + readonly STUNTestIP?: string; + readonly CanPort80?: boolean; } // From tailcfg/derpmap.go export interface TailDERPRegion { - readonly EmbeddedRelay: boolean; - readonly RegionID: number; - readonly RegionCode: string; - readonly RegionName: string; - readonly Avoid?: boolean; - readonly Nodes: readonly TailDERPNode[]; + readonly EmbeddedRelay: boolean; + readonly RegionID: number; + readonly RegionCode: string; + readonly RegionName: string; + readonly Avoid?: boolean; + readonly Nodes: readonly (TailDERPNode)[]; } // From codersdk/deployment.go export interface TelemetryConfig { - readonly enable: boolean; - readonly trace: boolean; - readonly url: string; + 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 organization_name: string; - readonly organization_display_name: string; - readonly organization_icon: 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; - readonly description: string; - readonly deprecated: boolean; - readonly deprecation_message: string; - readonly icon: string; - readonly default_ttl_ms: number; - readonly activity_bump_ms: number; - readonly autostop_requirement: TemplateAutostopRequirement; - readonly autostart_requirement: TemplateAutostartRequirement; - 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 time_til_dormant_ms: number; - readonly time_til_dormant_autodelete_ms: number; - readonly require_active_version: boolean; - readonly max_port_share_level: WorkspaceAgentPortShareLevel; - readonly use_classic_parameter_flow: boolean; + readonly id: string; + readonly created_at: string; + readonly updated_at: string; + readonly organization_id: string; + readonly organization_name: string; + readonly organization_display_name: string; + readonly organization_icon: 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; + readonly description: string; + readonly deprecated: boolean; + readonly deprecation_message: string; + readonly icon: string; + readonly default_ttl_ms: number; + readonly activity_bump_ms: number; + readonly autostop_requirement: TemplateAutostopRequirement; + readonly autostart_requirement: TemplateAutostartRequirement; + 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 time_til_dormant_ms: number; + readonly time_til_dormant_autodelete_ms: number; + readonly require_active_version: boolean; + readonly max_port_share_level: WorkspaceAgentPortShareLevel; + readonly use_classic_parameter_flow: boolean; } // From codersdk/templates.go export interface TemplateACL { - readonly users: readonly TemplateUser[]; - readonly group: readonly TemplateGroup[]; + readonly users: readonly TemplateUser[]; + readonly group: readonly TemplateGroup[]; } // From codersdk/insights.go export interface TemplateAppUsage { - readonly template_ids: readonly string[]; - readonly type: TemplateAppsType; - readonly display_name: string; - readonly slug: string; - readonly icon: string; - readonly seconds: number; - readonly times_used: number; + readonly template_ids: readonly string[]; + readonly type: TemplateAppsType; + readonly display_name: string; + readonly slug: string; + readonly icon: string; + readonly seconds: number; + readonly times_used: number; } // From codersdk/insights.go @@ -2665,20 +2242,17 @@ export const TemplateAppsTypes: TemplateAppsType[] = ["app", "builtin"]; // From codersdk/templates.go export interface TemplateAutostartRequirement { - readonly days_of_week: readonly string[]; + readonly days_of_week: readonly string[]; } // From codersdk/templates.go export interface TemplateAutostopRequirement { - readonly days_of_week: readonly string[]; - readonly weeks: number; + readonly days_of_week: readonly string[]; + readonly weeks: number; } // From codersdk/templates.go -export type TemplateBuildTimeStats = Record< - WorkspaceTransition, - TransitionStats ->; +export type TemplateBuildTimeStats = Record; // From codersdk/insights.go export const TemplateBuiltinAppDisplayNameJetBrains = "JetBrains"; @@ -2697,82 +2271,79 @@ export const TemplateBuiltinAppDisplayNameWebTerminal = "Web Terminal"; // From codersdk/templates.go export interface TemplateExample { - readonly id: string; - readonly url: string; - readonly name: string; - readonly description: string; - readonly icon: string; - readonly tags: readonly string[]; - readonly markdown: string; + readonly id: string; + readonly url: string; + readonly name: string; + readonly description: string; + readonly icon: string; + readonly tags: readonly string[]; + readonly markdown: string; } // From codersdk/organizations.go export interface TemplateFilter { - readonly q?: string; + readonly q?: string; } // From codersdk/templates.go export interface TemplateGroup extends Group { - readonly role: TemplateRole; + readonly role: TemplateRole; } // From codersdk/insights.go export interface TemplateInsightsIntervalReport { - readonly start_time: string; - readonly end_time: string; - readonly template_ids: readonly string[]; - readonly interval: InsightsReportInterval; - readonly active_users: number; + readonly start_time: string; + readonly end_time: string; + readonly template_ids: readonly string[]; + readonly interval: InsightsReportInterval; + readonly active_users: number; } // From codersdk/insights.go export interface TemplateInsightsReport { - readonly start_time: string; - readonly end_time: string; - readonly template_ids: readonly string[]; - readonly active_users: number; - readonly apps_usage: readonly TemplateAppUsage[]; - readonly parameters_usage: readonly TemplateParameterUsage[]; + readonly start_time: string; + readonly end_time: string; + readonly template_ids: readonly string[]; + readonly active_users: number; + readonly apps_usage: readonly TemplateAppUsage[]; + readonly parameters_usage: readonly TemplateParameterUsage[]; } // From codersdk/insights.go export interface TemplateInsightsRequest { - readonly start_time: string; - readonly end_time: string; - readonly template_ids: readonly string[]; - readonly interval: InsightsReportInterval; - readonly sections: readonly TemplateInsightsSection[]; + readonly start_time: string; + readonly end_time: string; + readonly template_ids: readonly string[]; + readonly interval: InsightsReportInterval; + readonly sections: readonly TemplateInsightsSection[]; } // From codersdk/insights.go export interface TemplateInsightsResponse { - readonly report?: TemplateInsightsReport; - readonly interval_reports?: readonly TemplateInsightsIntervalReport[]; + readonly report?: TemplateInsightsReport; + readonly interval_reports?: readonly TemplateInsightsIntervalReport[]; } // From codersdk/insights.go export type TemplateInsightsSection = "interval_reports" | "report"; -export const TemplateInsightsSections: TemplateInsightsSection[] = [ - "interval_reports", - "report", -]; +export const TemplateInsightsSections: TemplateInsightsSection[] = ["interval_reports", "report"]; // From codersdk/insights.go export interface TemplateParameterUsage { - readonly template_ids: readonly string[]; - readonly display_name: string; - readonly name: string; - readonly type: string; - readonly description: string; - readonly options?: readonly TemplateVersionParameterOption[]; - readonly values: readonly TemplateParameterValue[]; + readonly template_ids: readonly string[]; + readonly display_name: string; + readonly name: string; + readonly type: string; + readonly description: string; + readonly options?: readonly TemplateVersionParameterOption[]; + readonly values: readonly TemplateParameterValue[]; } // From codersdk/insights.go export interface TemplateParameterValue { - readonly value: string; - readonly count: number; + readonly value: string; + readonly count: number; } // From codersdk/templates.go @@ -2782,420 +2353,385 @@ export const TemplateRoles: TemplateRole[] = ["admin", "", "use"]; // From codersdk/templates.go export interface TemplateUser extends User { - readonly role: TemplateRole; + 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 message: string; - readonly job: ProvisionerJob; - readonly readme: string; - readonly created_by: MinimalUser; - readonly archived: boolean; - readonly warnings?: readonly TemplateVersionWarning[]; - readonly matched_provisioners?: MatchedProvisioners; + readonly id: string; + readonly template_id?: string; + readonly organization_id?: string; + readonly created_at: string; + readonly updated_at: string; + readonly name: string; + readonly message: string; + readonly job: ProvisionerJob; + readonly readme: string; + readonly created_by: MinimalUser; + readonly archived: boolean; + readonly warnings?: readonly TemplateVersionWarning[]; + readonly matched_provisioners?: MatchedProvisioners; } // From codersdk/templateversions.go export interface TemplateVersionExternalAuth { - readonly id: string; - readonly type: string; - readonly display_name: string; - readonly display_icon: string; - readonly authenticate_url: string; - readonly authenticated: boolean; - readonly optional?: boolean; + readonly id: string; + readonly type: string; + readonly display_name: string; + readonly display_icon: string; + readonly authenticate_url: string; + readonly authenticated: boolean; + readonly optional?: 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 form_type: string; - readonly mutable: boolean; - readonly default_value: string; - readonly icon: string; - readonly options: readonly 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 ephemeral: boolean; + readonly name: string; + readonly display_name?: string; + readonly description: string; + readonly description_plaintext: string; + readonly type: string; + readonly form_type: string; + readonly mutable: boolean; + readonly default_value: string; + readonly icon: string; + readonly options: readonly 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 ephemeral: boolean; } // From codersdk/templateversions.go export interface TemplateVersionParameterOption { - readonly name: string; - readonly description: string; - readonly value: string; - readonly icon: string; + 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; + readonly name: string; + readonly description: string; + readonly type: string; + readonly value: string; + readonly default_value: string; + readonly required: boolean; + readonly sensitive: boolean; } // From codersdk/templateversions.go export type TemplateVersionWarning = "UNSUPPORTED_WORKSPACES"; -export const TemplateVersionWarnings: TemplateVersionWarning[] = [ - "UNSUPPORTED_WORKSPACES", -]; +export const TemplateVersionWarnings: TemplateVersionWarning[] = ["UNSUPPORTED_WORKSPACES"]; // From codersdk/templates.go export interface TemplateVersionsByTemplateRequest extends Pagination { - readonly template_id: string; - readonly include_archived: boolean; + readonly template_id: string; + readonly include_archived: boolean; } // From codersdk/users.go -export type TerminalFontName = - | "fira-code" - | "ibm-plex-mono" - | "jetbrains-mono" - | "source-code-pro" - | ""; - -export const TerminalFontNames: TerminalFontName[] = [ - "fira-code", - "ibm-plex-mono", - "jetbrains-mono", - "source-code-pro", - "", -]; +export type TerminalFontName = "fira-code" | "ibm-plex-mono" | "jetbrains-mono" | "source-code-pro" | ""; + +export const TerminalFontNames: TerminalFontName[] = ["fira-code", "ibm-plex-mono", "jetbrains-mono", "source-code-pro", ""]; // From codersdk/workspacebuilds.go -export type TimingStage = - | "apply" - | "connect" - | "cron" - | "graph" - | "init" - | "plan" - | "start" - | "stop"; - -export const TimingStages: TimingStage[] = [ - "apply", - "connect", - "cron", - "graph", - "init", - "plan", - "start", - "stop", -]; +export type TimingStage = "apply" | "connect" | "cron" | "graph" | "init" | "plan" | "start" | "stop"; + +export const TimingStages: TimingStage[] = ["apply", "connect", "cron", "graph", "init", "plan", "start", "stop"]; // From codersdk/apikey.go export interface TokenConfig { - readonly max_token_lifetime: number; + readonly max_token_lifetime: number; } // From codersdk/apikey.go export interface TokensFilter { - readonly include_all: boolean; + readonly include_all: boolean; } // From codersdk/deployment.go export interface TraceConfig { - readonly enable: boolean; - readonly honeycomb_api_key: string; - readonly capture_logs: boolean; - readonly data_dog: boolean; + readonly enable: boolean; + readonly honeycomb_api_key: string; + readonly capture_logs: boolean; + readonly data_dog: boolean; } // From codersdk/templates.go export interface TransitionStats { - readonly P50: number | null; - readonly P95: number | null; + readonly P50: number | null; + readonly P95: number | null; } // From codersdk/templates.go export interface UpdateActiveTemplateVersion { - readonly id: string; + readonly id: string; } // From codersdk/deployment.go export interface UpdateAppearanceConfig { - readonly application_name: string; - readonly logo_url: string; - readonly service_banner: BannerConfig; - readonly announcement_banners: readonly BannerConfig[]; + readonly application_name: string; + readonly logo_url: string; + readonly service_banner: BannerConfig; + readonly announcement_banners: readonly BannerConfig[]; } // From codersdk/updatecheck.go export interface UpdateCheckResponse { - readonly current: boolean; - readonly version: string; - readonly url: string; + readonly current: boolean; + readonly version: string; + readonly url: string; } // From healthsdk/healthsdk.go export interface UpdateHealthSettings { - readonly dismissed_healthchecks: readonly HealthSection[]; + readonly dismissed_healthchecks: readonly HealthSection[]; } // From codersdk/inboxnotification.go export interface UpdateInboxNotificationReadStatusRequest { - readonly is_read: boolean; + readonly is_read: boolean; } // From codersdk/inboxnotification.go export interface UpdateInboxNotificationReadStatusResponse { - readonly notification: InboxNotification; - readonly unread_count: number; + readonly notification: InboxNotification; + readonly unread_count: number; } // From codersdk/notifications.go export interface UpdateNotificationTemplateMethod { - readonly method?: string; + readonly method?: string; } // From codersdk/organizations.go export interface UpdateOrganizationRequest { - readonly name?: string; - readonly display_name?: string; - readonly description?: string; - readonly icon?: string; + readonly name?: string; + readonly display_name?: string; + readonly description?: string; + readonly icon?: string; } // From codersdk/users.go export interface UpdateRoles { - readonly roles: readonly string[]; + readonly roles: readonly string[]; } // From codersdk/templates.go export interface UpdateTemplateACL { - readonly user_perms?: Record; - readonly group_perms?: Record; + readonly user_perms?: Record; + readonly group_perms?: Record; } // From codersdk/templates.go export interface UpdateTemplateMeta { - readonly name?: string; - readonly display_name?: string; - readonly description?: string; - readonly icon?: string; - readonly default_ttl_ms?: number; - readonly activity_bump_ms?: number; - readonly autostop_requirement?: TemplateAutostopRequirement; - readonly autostart_requirement?: TemplateAutostartRequirement; - readonly allow_user_autostart?: boolean; - readonly allow_user_autostop?: boolean; - readonly allow_user_cancel_workspace_jobs?: boolean; - readonly failure_ttl_ms?: number; - readonly time_til_dormant_ms?: number; - readonly time_til_dormant_autodelete_ms?: number; - readonly update_workspace_last_used_at: boolean; - readonly update_workspace_dormant_at: boolean; - readonly require_active_version?: boolean; - readonly deprecation_message?: string; - readonly disable_everyone_group_access: boolean; - readonly max_port_share_level?: WorkspaceAgentPortShareLevel; - readonly use_classic_parameter_flow?: boolean; + readonly name?: string; + readonly display_name?: string; + readonly description?: string; + readonly icon?: string; + readonly default_ttl_ms?: number; + readonly activity_bump_ms?: number; + readonly autostop_requirement?: TemplateAutostopRequirement; + readonly autostart_requirement?: TemplateAutostartRequirement; + readonly allow_user_autostart?: boolean; + readonly allow_user_autostop?: boolean; + readonly allow_user_cancel_workspace_jobs?: boolean; + readonly failure_ttl_ms?: number; + readonly time_til_dormant_ms?: number; + readonly time_til_dormant_autodelete_ms?: number; + readonly update_workspace_last_used_at: boolean; + readonly update_workspace_dormant_at: boolean; + readonly require_active_version?: boolean; + readonly deprecation_message?: string; + readonly disable_everyone_group_access: boolean; + readonly max_port_share_level?: WorkspaceAgentPortShareLevel; + readonly use_classic_parameter_flow?: boolean; } // From codersdk/users.go export interface UpdateUserAppearanceSettingsRequest { - readonly theme_preference: string; - readonly terminal_font: TerminalFontName; + readonly theme_preference: string; + readonly terminal_font: TerminalFontName; } // From codersdk/notifications.go export interface UpdateUserNotificationPreferences { - readonly template_disabled_map: Record; + readonly template_disabled_map: Record; } // From codersdk/users.go export interface UpdateUserPasswordRequest { - readonly old_password: string; - readonly password: string; + readonly old_password: string; + readonly password: string; } // From codersdk/users.go export interface UpdateUserProfileRequest { - readonly username: string; - readonly name: string; + readonly username: string; + readonly name: string; } // From codersdk/users.go export interface UpdateUserQuietHoursScheduleRequest { - readonly schedule: string; + readonly schedule: string; } // From codersdk/workspaces.go export interface UpdateWorkspaceAutomaticUpdatesRequest { - readonly automatic_updates: AutomaticUpdates; + readonly automatic_updates: AutomaticUpdates; } // From codersdk/workspaces.go export interface UpdateWorkspaceAutostartRequest { - readonly schedule?: string; + readonly schedule?: string; } // From codersdk/workspaces.go export interface UpdateWorkspaceDormancy { - readonly dormant: boolean; + readonly dormant: boolean; } // From codersdk/workspaceproxy.go export interface UpdateWorkspaceProxyResponse { - readonly proxy: WorkspaceProxy; - readonly proxy_token: string; + readonly proxy: WorkspaceProxy; + readonly proxy_token: string; } // From codersdk/workspaces.go export interface UpdateWorkspaceRequest { - readonly name?: string; + readonly name?: string; } // From codersdk/workspaces.go export interface UpdateWorkspaceTTLRequest { - readonly ttl_ms: number | null; + readonly ttl_ms: number | null; } // From codersdk/files.go export interface UploadResponse { - readonly hash: string; + readonly hash: string; } // From codersdk/workspaceagentportshare.go export interface UpsertWorkspaceAgentPortShareRequest { - readonly agent_name: string; - readonly port: number; - readonly share_level: WorkspaceAgentPortShareLevel; - readonly protocol: WorkspaceAgentPortShareProtocol; + readonly agent_name: string; + readonly port: number; + readonly share_level: WorkspaceAgentPortShareLevel; + readonly protocol: WorkspaceAgentPortShareProtocol; } // From codersdk/workspaces.go export type UsageAppName = "jetbrains" | "reconnecting-pty" | "ssh" | "vscode"; -export const UsageAppNames: UsageAppName[] = [ - "jetbrains", - "reconnecting-pty", - "ssh", - "vscode", -]; +export const UsageAppNames: UsageAppName[] = ["jetbrains", "reconnecting-pty", "ssh", "vscode"]; // From codersdk/users.go export interface User extends ReducedUser { - readonly organization_ids: readonly string[]; - readonly roles: readonly SlimRole[]; + readonly organization_ids: readonly string[]; + readonly roles: readonly SlimRole[]; } // From codersdk/insights.go export interface UserActivity { - readonly template_ids: readonly string[]; - readonly user_id: string; - readonly username: string; - readonly avatar_url: string; - readonly seconds: number; + readonly template_ids: readonly string[]; + readonly user_id: string; + readonly username: string; + readonly avatar_url: string; + readonly seconds: number; } // From codersdk/insights.go export interface UserActivityInsightsReport { - readonly start_time: string; - readonly end_time: string; - readonly template_ids: readonly string[]; - readonly users: readonly UserActivity[]; + readonly start_time: string; + readonly end_time: string; + readonly template_ids: readonly string[]; + readonly users: readonly UserActivity[]; } // From codersdk/insights.go export interface UserActivityInsightsRequest { - readonly start_time: string; - readonly end_time: string; - readonly template_ids: readonly string[]; + readonly start_time: string; + readonly end_time: string; + readonly template_ids: readonly string[]; } // From codersdk/insights.go export interface UserActivityInsightsResponse { - readonly report: UserActivityInsightsReport; + readonly report: UserActivityInsightsReport; } // From codersdk/users.go export interface UserAppearanceSettings { - readonly theme_preference: string; - readonly terminal_font: TerminalFontName; + readonly theme_preference: string; + readonly terminal_font: TerminalFontName; } // From codersdk/insights.go export interface UserLatency { - readonly template_ids: readonly string[]; - readonly user_id: string; - readonly username: string; - readonly avatar_url: string; - readonly latency_ms: ConnectionLatency; + readonly template_ids: readonly string[]; + readonly user_id: string; + readonly username: string; + readonly avatar_url: string; + readonly latency_ms: ConnectionLatency; } // From codersdk/insights.go export interface UserLatencyInsightsReport { - readonly start_time: string; - readonly end_time: string; - readonly template_ids: readonly string[]; - readonly users: readonly UserLatency[]; + readonly start_time: string; + readonly end_time: string; + readonly template_ids: readonly string[]; + readonly users: readonly UserLatency[]; } // From codersdk/insights.go export interface UserLatencyInsightsRequest { - readonly start_time: string; - readonly end_time: string; - readonly template_ids: readonly string[]; + readonly start_time: string; + readonly end_time: string; + readonly template_ids: readonly string[]; } // From codersdk/insights.go export interface UserLatencyInsightsResponse { - readonly report: UserLatencyInsightsReport; + readonly report: UserLatencyInsightsReport; } // From codersdk/users.go export interface UserLoginType { - readonly login_type: LoginType; + readonly login_type: LoginType; } // From codersdk/users.go export interface UserParameter { - readonly name: string; - readonly value: string; + readonly name: string; + readonly value: string; } // From codersdk/deployment.go export interface UserQuietHoursScheduleConfig { - readonly default_schedule: string; - readonly allow_user_custom: boolean; + readonly default_schedule: string; + readonly allow_user_custom: boolean; } // From codersdk/users.go export interface UserQuietHoursScheduleResponse { - readonly raw_schedule: string; - readonly user_set: boolean; - readonly user_can_set: boolean; - readonly time: string; - readonly timezone: string; - readonly next: string; + readonly raw_schedule: string; + readonly user_set: boolean; + readonly user_can_set: boolean; + readonly time: string; + readonly timezone: string; + readonly next: string; } // From codersdk/users.go export interface UserRoles { - readonly roles: readonly string[]; - readonly organization_roles: Record; + readonly roles: readonly string[]; + readonly organization_roles: Record; } // From codersdk/users.go @@ -3203,381 +2739,330 @@ export type UserStatus = "active" | "dormant" | "suspended"; // From codersdk/insights.go export interface UserStatusChangeCount { - readonly date: string; - readonly count: number; + readonly date: string; + readonly count: number; } export const UserStatuses: UserStatus[] = ["active", "dormant", "suspended"]; // From codersdk/users.go export interface UsersRequest extends Pagination { - readonly q?: string; + readonly q?: string; } // From codersdk/users.go export interface ValidateUserPasswordRequest { - readonly password: string; + readonly password: string; } // From codersdk/users.go export interface ValidateUserPasswordResponse { - readonly valid: boolean; - readonly details: string; + readonly valid: boolean; + readonly details: string; } // From codersdk/client.go export interface ValidationError { - readonly field: string; - readonly detail: string; + readonly field: string; + readonly detail: string; } // From codersdk/templateversions.go export type ValidationMonotonicOrder = "decreasing" | "increasing"; -export const ValidationMonotonicOrders: ValidationMonotonicOrder[] = [ - "decreasing", - "increasing", -]; +export const ValidationMonotonicOrders: ValidationMonotonicOrder[] = ["decreasing", "increasing"]; // From codersdk/organizations.go export interface VariableValue { - readonly name: string; - readonly value: string; + readonly name: string; + readonly value: string; } // From codersdk/notifications.go export interface WebpushMessage { - readonly icon: string; - readonly title: string; - readonly body: string; - readonly actions: readonly WebpushMessageAction[]; + readonly icon: string; + readonly title: string; + readonly body: string; + readonly actions: readonly WebpushMessageAction[]; } // From codersdk/notifications.go export interface WebpushMessageAction { - readonly label: string; - readonly url: string; + readonly label: string; + readonly url: string; } // From codersdk/notifications.go export interface WebpushSubscription { - readonly endpoint: string; - readonly auth_key: string; - readonly p256dh_key: string; + readonly endpoint: string; + readonly auth_key: string; + readonly p256dh_key: string; } // From healthsdk/healthsdk.go export interface WebsocketReport extends BaseReport { - readonly healthy: boolean; - readonly body: string; - readonly code: number; + readonly healthy: boolean; + readonly body: string; + readonly code: number; } // 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 owner_avatar_url: string; - readonly organization_id: string; - readonly organization_name: 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 template_active_version_id: string; - readonly template_require_active_version: boolean; - readonly template_use_classic_parameter_flow: boolean; - readonly latest_build: WorkspaceBuild; - readonly latest_app_status: WorkspaceAppStatus | null; - readonly outdated: boolean; - readonly name: string; - readonly autostart_schedule?: string; - readonly ttl_ms?: number; - readonly last_used_at: string; - readonly deleting_at: string | null; - readonly dormant_at: string | null; - readonly health: WorkspaceHealth; - readonly automatic_updates: AutomaticUpdates; - readonly allow_renames: boolean; - readonly favorite: boolean; - readonly next_start_at: string | null; + readonly id: string; + readonly created_at: string; + readonly updated_at: string; + readonly owner_id: string; + readonly owner_name: string; + readonly owner_avatar_url: string; + readonly organization_id: string; + readonly organization_name: 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 template_active_version_id: string; + readonly template_require_active_version: boolean; + readonly template_use_classic_parameter_flow: boolean; + readonly latest_build: WorkspaceBuild; + readonly latest_app_status: WorkspaceAppStatus | null; + readonly outdated: boolean; + readonly name: string; + readonly autostart_schedule?: string; + readonly ttl_ms?: number; + readonly last_used_at: string; + readonly deleting_at: string | null; + readonly dormant_at: string | null; + readonly health: WorkspaceHealth; + readonly automatic_updates: AutomaticUpdates; + readonly allow_renames: boolean; + readonly favorite: boolean; + readonly next_start_at: string | null; } // From codersdk/workspaceagents.go export interface WorkspaceAgent { - readonly id: string; - readonly parent_id: string | null; - readonly created_at: string; - readonly updated_at: string; - readonly first_connected_at?: string; - readonly last_connected_at?: string; - readonly disconnected_at?: string; - readonly started_at?: string; - readonly ready_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; - readonly operating_system: string; - readonly logs_length: number; - readonly logs_overflowed: boolean; - readonly directory?: string; - readonly expanded_directory?: string; - readonly version: string; - readonly api_version: string; - readonly apps: readonly WorkspaceApp[]; - readonly latency?: Record; - readonly connection_timeout_seconds: number; - readonly troubleshooting_url: string; - readonly subsystems: readonly AgentSubsystem[]; - readonly health: WorkspaceAgentHealth; - readonly display_apps: readonly DisplayApp[]; - readonly log_sources: readonly WorkspaceAgentLogSource[]; - readonly scripts: readonly WorkspaceAgentScript[]; - readonly startup_script_behavior: WorkspaceAgentStartupScriptBehavior; + readonly id: string; + readonly parent_id: string | null; + readonly created_at: string; + readonly updated_at: string; + readonly first_connected_at?: string; + readonly last_connected_at?: string; + readonly disconnected_at?: string; + readonly started_at?: string; + readonly ready_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; + readonly operating_system: string; + readonly logs_length: number; + readonly logs_overflowed: boolean; + readonly directory?: string; + readonly expanded_directory?: string; + readonly version: string; + readonly api_version: string; + readonly apps: readonly WorkspaceApp[]; + readonly latency?: Record; + readonly connection_timeout_seconds: number; + readonly troubleshooting_url: string; + readonly subsystems: readonly AgentSubsystem[]; + readonly health: WorkspaceAgentHealth; + readonly display_apps: readonly DisplayApp[]; + readonly log_sources: readonly WorkspaceAgentLogSource[]; + readonly scripts: readonly WorkspaceAgentScript[]; + readonly startup_script_behavior: WorkspaceAgentStartupScriptBehavior; } // From codersdk/workspaceagents.go export interface WorkspaceAgentContainer { - readonly created_at: string; - readonly id: string; - readonly name: string; - readonly image: string; - readonly labels: Record; - readonly running: boolean; - readonly ports: readonly WorkspaceAgentContainerPort[]; - readonly status: string; - readonly volumes: Record; - readonly devcontainer_status?: WorkspaceAgentDevcontainerStatus; - readonly devcontainer_dirty: boolean; + readonly created_at: string; + readonly id: string; + readonly name: string; + readonly image: string; + readonly labels: Record; + readonly running: boolean; + readonly ports: readonly WorkspaceAgentContainerPort[]; + readonly status: string; + readonly volumes: Record; + readonly devcontainer_status?: WorkspaceAgentDevcontainerStatus; + readonly devcontainer_dirty: boolean; } // From codersdk/workspaceagents.go export interface WorkspaceAgentContainerPort { - readonly port: number; - readonly network: string; - readonly host_ip?: string; - readonly host_port?: number; + readonly port: number; + readonly network: string; + readonly host_ip?: string; + readonly host_port?: number; } // From codersdk/workspaceagents.go export interface WorkspaceAgentDevcontainer { - readonly id: string; - readonly name: string; - readonly workspace_folder: string; - readonly config_path?: string; - readonly status: WorkspaceAgentDevcontainerStatus; - readonly dirty: boolean; - readonly container?: WorkspaceAgentContainer; + readonly id: string; + readonly name: string; + readonly workspace_folder: string; + readonly config_path?: string; + readonly status: WorkspaceAgentDevcontainerStatus; + readonly dirty: boolean; + readonly container?: WorkspaceAgentContainer; } // From codersdk/workspaceagents.go -export type WorkspaceAgentDevcontainerStatus = - | "error" - | "running" - | "starting" - | "stopped"; +export type WorkspaceAgentDevcontainerStatus = "error" | "running" | "starting" | "stopped"; -export const WorkspaceAgentDevcontainerStatuses: WorkspaceAgentDevcontainerStatus[] = - ["error", "running", "starting", "stopped"]; +export const WorkspaceAgentDevcontainerStatuses: WorkspaceAgentDevcontainerStatus[] = ["error", "running", "starting", "stopped"]; // From codersdk/workspaceagents.go export interface WorkspaceAgentDevcontainersResponse { - readonly devcontainers: readonly WorkspaceAgentDevcontainer[]; + readonly devcontainers: readonly WorkspaceAgentDevcontainer[]; } // From codersdk/workspaceagents.go export interface WorkspaceAgentHealth { - readonly healthy: boolean; - readonly reason?: string; + readonly healthy: boolean; + readonly reason?: string; } // 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", -]; +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"]; // From codersdk/workspaceagents.go export interface WorkspaceAgentListContainersResponse { - readonly containers: readonly WorkspaceAgentContainer[]; - readonly warnings?: readonly string[]; + readonly containers: readonly WorkspaceAgentContainer[]; + readonly warnings?: readonly string[]; } // From codersdk/workspaceagents.go export interface WorkspaceAgentListeningPort { - readonly process_name: string; - readonly network: string; - readonly port: number; + readonly process_name: string; + readonly network: string; + readonly port: number; } // From codersdk/workspaceagents.go export interface WorkspaceAgentListeningPortsResponse { - readonly ports: readonly WorkspaceAgentListeningPort[]; + readonly ports: readonly WorkspaceAgentListeningPort[]; } // From codersdk/workspaceagents.go export interface WorkspaceAgentLog { - readonly id: number; - readonly created_at: string; - readonly output: string; - readonly level: LogLevel; - readonly source_id: string; + readonly id: number; + readonly created_at: string; + readonly output: string; + readonly level: LogLevel; + readonly source_id: string; } // From codersdk/workspaceagents.go export interface WorkspaceAgentLogSource { - readonly workspace_agent_id: string; - readonly id: string; - readonly created_at: string; - readonly display_name: string; - readonly icon: string; + readonly workspace_agent_id: string; + readonly id: string; + readonly created_at: string; + readonly display_name: string; + readonly icon: string; } // From codersdk/workspaceagents.go export interface WorkspaceAgentMetadata { - readonly result: WorkspaceAgentMetadataResult; - readonly description: WorkspaceAgentMetadataDescription; + 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; + 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; + readonly collected_at: string; + readonly age: number; + readonly value: string; + readonly error: string; } // From codersdk/workspaceagentportshare.go export interface WorkspaceAgentPortShare { - readonly workspace_id: string; - readonly agent_name: string; - readonly port: number; - readonly share_level: WorkspaceAgentPortShareLevel; - readonly protocol: WorkspaceAgentPortShareProtocol; + readonly workspace_id: string; + readonly agent_name: string; + readonly port: number; + readonly share_level: WorkspaceAgentPortShareLevel; + readonly protocol: WorkspaceAgentPortShareProtocol; } // From codersdk/workspaceagentportshare.go export type WorkspaceAgentPortShareLevel = "authenticated" | "owner" | "public"; -export const WorkspaceAgentPortShareLevels: WorkspaceAgentPortShareLevel[] = [ - "authenticated", - "owner", - "public", -]; +export const WorkspaceAgentPortShareLevels: WorkspaceAgentPortShareLevel[] = ["authenticated", "owner", "public"]; // From codersdk/workspaceagentportshare.go export type WorkspaceAgentPortShareProtocol = "http" | "https"; -export const WorkspaceAgentPortShareProtocols: WorkspaceAgentPortShareProtocol[] = - ["http", "https"]; +export const WorkspaceAgentPortShareProtocols: WorkspaceAgentPortShareProtocol[] = ["http", "https"]; // From codersdk/workspaceagentportshare.go export interface WorkspaceAgentPortShares { - readonly shares: readonly WorkspaceAgentPortShare[]; + readonly shares: readonly WorkspaceAgentPortShare[]; } // From codersdk/workspaceagents.go export interface WorkspaceAgentScript { - readonly id: string; - readonly log_source_id: string; - readonly log_path: string; - readonly script: string; - readonly cron: string; - readonly run_on_start: boolean; - readonly run_on_stop: boolean; - readonly start_blocks_login: boolean; - readonly timeout: number; - readonly display_name: string; + readonly id: string; + readonly log_source_id: string; + readonly log_path: string; + readonly script: string; + readonly cron: string; + readonly run_on_start: boolean; + readonly run_on_stop: boolean; + readonly start_blocks_login: boolean; + readonly timeout: number; + readonly display_name: string; } // From codersdk/workspaceagents.go export type WorkspaceAgentStartupScriptBehavior = "blocking" | "non-blocking"; -export const WorkspaceAgentStartupScriptBehaviors: WorkspaceAgentStartupScriptBehavior[] = - ["blocking", "non-blocking"]; +export const WorkspaceAgentStartupScriptBehaviors: WorkspaceAgentStartupScriptBehavior[] = ["blocking", "non-blocking"]; // From codersdk/workspaceagents.go -export type WorkspaceAgentStatus = - | "connected" - | "connecting" - | "disconnected" - | "timeout"; - -export const WorkspaceAgentStatuses: WorkspaceAgentStatus[] = [ - "connected", - "connecting", - "disconnected", - "timeout", -]; +export type WorkspaceAgentStatus = "connected" | "connecting" | "disconnected" | "timeout"; + +export const WorkspaceAgentStatuses: WorkspaceAgentStatus[] = ["connected", "connecting", "disconnected", "timeout"]; // From codersdk/workspaceapps.go export interface WorkspaceApp { - readonly id: string; - readonly url?: string; - readonly external: boolean; - readonly slug: string; - readonly display_name?: string; - readonly command?: string; - readonly icon?: string; - readonly subdomain: boolean; - readonly subdomain_name?: string; - readonly sharing_level: WorkspaceAppSharingLevel; - readonly healthcheck?: Healthcheck; - readonly health: WorkspaceAppHealth; - readonly group?: string; - readonly hidden: boolean; - readonly open_in: WorkspaceAppOpenIn; - readonly statuses: readonly WorkspaceAppStatus[]; + readonly id: string; + readonly url?: string; + readonly external: boolean; + readonly slug: string; + readonly display_name?: string; + readonly command?: string; + readonly icon?: string; + readonly subdomain: boolean; + readonly subdomain_name?: string; + readonly sharing_level: WorkspaceAppSharingLevel; + readonly healthcheck?: Healthcheck; + readonly health: WorkspaceAppHealth; + readonly group?: string; + readonly hidden: boolean; + readonly open_in: WorkspaceAppOpenIn; + readonly statuses: readonly WorkspaceAppStatus[]; } // From codersdk/workspaceapps.go -export type WorkspaceAppHealth = - | "disabled" - | "healthy" - | "initializing" - | "unhealthy"; - -export const WorkspaceAppHealths: WorkspaceAppHealth[] = [ - "disabled", - "healthy", - "initializing", - "unhealthy", -]; +export type WorkspaceAppHealth = "disabled" | "healthy" | "initializing" | "unhealthy"; + +export const WorkspaceAppHealths: WorkspaceAppHealth[] = ["disabled", "healthy", "initializing", "unhealthy"]; // From codersdk/workspaceapps.go export type WorkspaceAppOpenIn = "slim-window" | "tab"; @@ -3587,216 +3072,183 @@ export const WorkspaceAppOpenIns: WorkspaceAppOpenIn[] = ["slim-window", "tab"]; // From codersdk/workspaceapps.go export type WorkspaceAppSharingLevel = "authenticated" | "owner" | "public"; -export const WorkspaceAppSharingLevels: WorkspaceAppSharingLevel[] = [ - "authenticated", - "owner", - "public", -]; +export const WorkspaceAppSharingLevels: WorkspaceAppSharingLevel[] = ["authenticated", "owner", "public"]; // From codersdk/workspaceapps.go export interface WorkspaceAppStatus { - readonly id: string; - readonly created_at: string; - readonly workspace_id: string; - readonly agent_id: string; - readonly app_id: string; - readonly state: WorkspaceAppStatusState; - readonly message: string; - readonly uri: string; - readonly icon: string; - readonly needs_user_attention: boolean; + readonly id: string; + readonly created_at: string; + readonly workspace_id: string; + readonly agent_id: string; + readonly app_id: string; + readonly state: WorkspaceAppStatusState; + readonly message: string; + readonly uri: string; + readonly icon: string; + readonly needs_user_attention: boolean; } // From codersdk/workspaceapps.go export type WorkspaceAppStatusState = "complete" | "failure" | "working"; -export const WorkspaceAppStatusStates: WorkspaceAppStatusState[] = [ - "complete", - "failure", - "working", -]; +export const WorkspaceAppStatusStates: WorkspaceAppStatusState[] = ["complete", "failure", "working"]; // 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 workspace_owner_avatar_url?: 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: readonly WorkspaceResource[]; - readonly deadline?: string; - readonly max_deadline?: string; - readonly status: WorkspaceStatus; - readonly daily_cost: number; - readonly matched_provisioners?: MatchedProvisioners; - readonly template_version_preset_id: string | null; + 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 workspace_owner_avatar_url?: 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: readonly WorkspaceResource[]; + readonly deadline?: string; + readonly max_deadline?: string; + readonly status: WorkspaceStatus; + readonly daily_cost: number; + readonly matched_provisioners?: MatchedProvisioners; + readonly template_version_preset_id: string | null; } // From codersdk/workspacebuilds.go export interface WorkspaceBuildParameter { - readonly name: string; - readonly value: string; + readonly name: string; + readonly value: string; } // From codersdk/workspacebuilds.go export interface WorkspaceBuildTimings { - readonly provisioner_timings: readonly ProvisionerTiming[]; - readonly agent_script_timings: readonly AgentScriptTiming[]; - readonly agent_connection_timings: readonly AgentConnectionTiming[]; + readonly provisioner_timings: readonly ProvisionerTiming[]; + readonly agent_script_timings: readonly AgentScriptTiming[]; + readonly agent_connection_timings: readonly AgentConnectionTiming[]; } // From codersdk/workspaces.go export interface WorkspaceBuildsRequest extends Pagination { - readonly since?: string; + readonly since?: string; } // From codersdk/deployment.go export interface WorkspaceConnectionLatencyMS { - readonly P50: number; - readonly P95: number; + 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; + 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; + readonly q?: string; } // From codersdk/workspaces.go export interface WorkspaceHealth { - readonly healthy: boolean; - readonly failing_agents: readonly string[]; + readonly healthy: boolean; + readonly failing_agents: readonly string[]; } // From codersdk/workspaces.go export interface WorkspaceOptions { - readonly include_deleted?: boolean; + readonly include_deleted?: boolean; } // From codersdk/workspaceproxy.go export interface WorkspaceProxy extends Region { - readonly derp_enabled: boolean; - readonly derp_only: boolean; - readonly status?: WorkspaceProxyStatus; - readonly created_at: string; - readonly updated_at: string; - readonly deleted: boolean; - readonly version: string; + readonly derp_enabled: boolean; + readonly derp_only: boolean; + readonly status?: WorkspaceProxyStatus; + readonly created_at: string; + readonly updated_at: string; + readonly deleted: boolean; + readonly version: string; } // From codersdk/deployment.go export interface WorkspaceProxyBuildInfo { - readonly workspace_proxy: boolean; - readonly dashboard_url: string; + readonly workspace_proxy: boolean; + readonly dashboard_url: string; } // From healthsdk/healthsdk.go export interface WorkspaceProxyReport extends BaseReport { - readonly healthy: boolean; - readonly workspace_proxies: RegionsResponse; + readonly healthy: boolean; + readonly workspace_proxies: RegionsResponse; } // From codersdk/workspaceproxy.go export interface WorkspaceProxyStatus { - readonly status: ProxyHealthStatus; - readonly report?: ProxyHealthReport; - readonly checked_at: string; + readonly status: ProxyHealthStatus; + readonly report?: ProxyHealthReport; + readonly checked_at: string; } // From codersdk/workspaces.go export interface WorkspaceQuota { - readonly credits_consumed: number; - readonly budget: number; + readonly credits_consumed: number; + readonly budget: number; } // 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; - readonly hide: boolean; - readonly icon: string; - readonly agents?: readonly WorkspaceAgent[]; - readonly metadata?: readonly WorkspaceResourceMetadata[]; - readonly daily_cost: number; + readonly id: string; + readonly created_at: string; + readonly job_id: string; + readonly workspace_transition: WorkspaceTransition; + readonly type: string; + readonly name: string; + readonly hide: boolean; + readonly icon: string; + readonly agents?: readonly WorkspaceAgent[]; + readonly metadata?: readonly WorkspaceResourceMetadata[]; + readonly daily_cost: number; } // From codersdk/workspacebuilds.go export interface WorkspaceResourceMetadata { - readonly key: string; - readonly value: string; - readonly sensitive: boolean; + readonly key: string; + readonly value: string; + readonly sensitive: boolean; } // 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", -]; +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", -]; +export const WorkspaceTransitions: WorkspaceTransition[] = ["delete", "start", "stop"]; // From codersdk/workspaces.go export interface WorkspacesRequest extends Pagination { - readonly q?: string; + readonly q?: string; } // From codersdk/workspaces.go export interface WorkspacesResponse { - readonly workspaces: readonly Workspace[]; - readonly count: number; + readonly workspaces: readonly Workspace[]; + readonly count: number; } // From codersdk/deployment.go @@ -3819,3 +3271,5 @@ export const safeMTU = 1378; // From codersdk/workspacedisplaystatus.go export const unknownStatus = "Unknown"; + + diff --git a/site/src/modules/workspaces/DynamicParameter/useDynamicParametersOptOut.ts b/site/src/modules/workspaces/DynamicParameter/useDynamicParametersOptOut.ts index 6401f5f7f3564..22364edb0c70f 100644 --- a/site/src/modules/workspaces/DynamicParameter/useDynamicParametersOptOut.ts +++ b/site/src/modules/workspaces/DynamicParameter/useDynamicParametersOptOut.ts @@ -25,13 +25,8 @@ export const useDynamicParametersOptOut = ({ const localStorageKey = optOutKey(templateId); const storedOptOutString = localStorage.getItem(localStorageKey); - let optedOut: boolean; - - if (storedOptOutString !== null) { - optedOut = storedOptOutString === "true"; - } else { - optedOut = Boolean(templateUsesClassicParameters); - } + // Since the dynamic-parameters experiment was removed, always use classic parameters + const optedOut = true; return { templateId, From 696d4a5da728dba77705441416af326701279ede Mon Sep 17 00:00:00 2001 From: Jaayden Halko Date: Mon, 9 Jun 2025 20:50:55 +0000 Subject: [PATCH 07/17] fix: fix tests --- coderd/templates_test.go | 2 +- enterprise/coderd/workspaces_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coderd/templates_test.go b/coderd/templates_test.go index f8f2b1372263c..f5fbe49741838 100644 --- a/coderd/templates_test.go +++ b/coderd/templates_test.go @@ -1548,7 +1548,7 @@ func TestPatchTemplateMeta(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, nil) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) - require.True(t, template.UseClassicParameterFlow, "default is true") + require.False(t, template.UseClassicParameterFlow, "default is false") bTrue := true bFalse := false diff --git a/enterprise/coderd/workspaces_test.go b/enterprise/coderd/workspaces_test.go index f15e9837d620c..164234048a16e 100644 --- a/enterprise/coderd/workspaces_test.go +++ b/enterprise/coderd/workspaces_test.go @@ -1736,7 +1736,7 @@ func TestWorkspaceTemplateParamsChange(t *testing.T) { require.NoError(t, err, "failed to create template version") coderdtest.AwaitTemplateVersionJobCompleted(t, templateAdmin, tv.ID) tpl := coderdtest.CreateTemplate(t, templateAdmin, owner.OrganizationID, tv.ID) - require.True(t, tpl.UseClassicParameterFlow, "template to use dynamic parameters") + require.False(t, tpl.UseClassicParameterFlow, "template to use dynamic parameters") // When: we create a workspace build using the above template but with // parameter values that are different from those defined in the template. From 38fde97337e50c6eb388b9ad7f0e54f043f33b72 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 9 Jun 2025 15:56:34 -0500 Subject: [PATCH 08/17] make test use dynamic params --- enterprise/coderd/workspaces_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/enterprise/coderd/workspaces_test.go b/enterprise/coderd/workspaces_test.go index 164234048a16e..5065b7628e849 100644 --- a/enterprise/coderd/workspaces_test.go +++ b/enterprise/coderd/workspaces_test.go @@ -1736,6 +1736,13 @@ func TestWorkspaceTemplateParamsChange(t *testing.T) { require.NoError(t, err, "failed to create template version") coderdtest.AwaitTemplateVersionJobCompleted(t, templateAdmin, tv.ID) tpl := coderdtest.CreateTemplate(t, templateAdmin, owner.OrganizationID, tv.ID) + + // Set to dynamic params + tpl, err = client.UpdateTemplateMeta(ctx, tpl.ID, codersdk.UpdateTemplateMeta{ + UseClassicParameterFlow: ptr.Ref(false), + }) + require.NoError(t, err, "failed to update template meta") + require.False(t, tpl.UseClassicParameterFlow, "template to use dynamic parameters") // When: we create a workspace build using the above template but with From a48d2f3aa4f7bc87a28ef62289e687532de26626 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 9 Jun 2025 15:55:58 -0500 Subject: [PATCH 09/17] make test use dynamic params --- enterprise/coderd/workspaces_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/enterprise/coderd/workspaces_test.go b/enterprise/coderd/workspaces_test.go index 5065b7628e849..ce86151f9b883 100644 --- a/enterprise/coderd/workspaces_test.go +++ b/enterprise/coderd/workspaces_test.go @@ -1742,7 +1742,6 @@ func TestWorkspaceTemplateParamsChange(t *testing.T) { UseClassicParameterFlow: ptr.Ref(false), }) require.NoError(t, err, "failed to update template meta") - require.False(t, tpl.UseClassicParameterFlow, "template to use dynamic parameters") // When: we create a workspace build using the above template but with From 9e0bfd90f6618362bd1e015f56e544e3ee67c92b Mon Sep 17 00:00:00 2001 From: Jaayden Halko Date: Mon, 9 Jun 2025 20:54:09 +0000 Subject: [PATCH 10/17] fix: format --- site/src/api/typesGenerated.ts | 3685 ++++++++++++++++++-------------- 1 file changed, 2115 insertions(+), 1570 deletions(-) diff --git a/site/src/api/typesGenerated.ts b/site/src/api/typesGenerated.ts index e5b217ae36eb2..a512305c489d3 100644 --- a/site/src/api/typesGenerated.ts +++ b/site/src/api/typesGenerated.ts @@ -2,34 +2,34 @@ // From codersdk/templates.go export interface ACLAvailable { - readonly users: readonly ReducedUser[]; - readonly groups: readonly Group[]; + readonly users: readonly ReducedUser[]; + readonly groups: readonly Group[]; } // From codersdk/deployment.go export interface AIConfig { - readonly providers?: readonly AIProviderConfig[]; + readonly providers?: readonly AIProviderConfig[]; } // From codersdk/deployment.go export interface AIProviderConfig { - readonly type: string; - readonly models: readonly string[]; - readonly base_url: string; + readonly type: string; + readonly models: readonly string[]; + readonly base_url: string; } // 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; + 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 @@ -39,170 +39,201 @@ export const APIKeyScopes: APIKeyScope[] = ["all", "application_connect"]; // From codersdk/apikey.go export interface APIKeyWithOwner extends APIKey { - readonly username: string; + readonly username: string; } // From healthsdk/healthsdk.go export interface AccessURLReport extends BaseReport { - readonly healthy: boolean; - readonly access_url: string; - readonly reachable: boolean; - readonly status_code: number; - readonly healthz_response: string; + readonly healthy: boolean; + readonly access_url: string; + readonly reachable: boolean; + readonly status_code: number; + readonly healthz_response: string; } // From codersdk/licenses.go export interface AddLicenseRequest { - readonly license: string; + readonly license: string; } // From codersdk/workspacebuilds.go export interface AgentConnectionTiming { - readonly started_at: string; - readonly ended_at: string; - readonly stage: TimingStage; - readonly workspace_agent_id: string; - readonly workspace_agent_name: string; + readonly started_at: string; + readonly ended_at: string; + readonly stage: TimingStage; + readonly workspace_agent_id: string; + readonly workspace_agent_name: string; } // From codersdk/workspacebuilds.go export interface AgentScriptTiming { - readonly started_at: string; - readonly ended_at: string; - readonly exit_code: number; - readonly stage: TimingStage; - readonly status: string; - readonly display_name: string; - readonly workspace_agent_id: string; - readonly workspace_agent_name: string; + readonly started_at: string; + readonly ended_at: string; + readonly exit_code: number; + readonly stage: TimingStage; + readonly status: string; + readonly display_name: string; + readonly workspace_agent_id: string; + readonly workspace_agent_name: string; } // From codersdk/templates.go export interface AgentStatsReportResponse { - readonly num_comms: number; - readonly rx_bytes: number; - readonly tx_bytes: number; + readonly num_comms: number; + readonly rx_bytes: number; + readonly tx_bytes: number; } // From codersdk/workspaceagents.go export type AgentSubsystem = "envbox" | "envbuilder" | "exectrace"; -export const AgentSubsystems: AgentSubsystem[] = ["envbox", "envbuilder", "exectrace"]; +export const AgentSubsystems: AgentSubsystem[] = [ + "envbox", + "envbuilder", + "exectrace", +]; // From codersdk/deployment.go export interface AppHostResponse { - readonly host: string; + readonly host: string; } // From codersdk/deployment.go export interface AppearanceConfig { - readonly application_name: string; - readonly logo_url: string; - readonly docs_url: string; - readonly service_banner: BannerConfig; - readonly announcement_banners: readonly BannerConfig[]; - readonly support_links?: readonly LinkConfig[]; + readonly application_name: string; + readonly logo_url: string; + readonly docs_url: string; + readonly service_banner: BannerConfig; + readonly announcement_banners: readonly BannerConfig[]; + readonly support_links?: readonly LinkConfig[]; } // From codersdk/templates.go export interface ArchiveTemplateVersionsRequest { - readonly all: boolean; + readonly all: boolean; } // From codersdk/templates.go export interface ArchiveTemplateVersionsResponse { - readonly template_id: string; - readonly archived_ids: readonly string[]; + readonly template_id: string; + readonly archived_ids: readonly string[]; } // From codersdk/roles.go export interface AssignableRoles extends Role { - readonly assignable: boolean; - readonly built_in: boolean; + readonly assignable: boolean; + readonly built_in: boolean; } // From codersdk/audit.go -export type AuditAction = "close" | "connect" | "create" | "delete" | "disconnect" | "login" | "logout" | "open" | "register" | "request_password_reset" | "start" | "stop" | "write"; - -export const AuditActions: AuditAction[] = ["close", "connect", "create", "delete", "disconnect", "login", "logout", "open", "register", "request_password_reset", "start", "stop", "write"]; +export type AuditAction = + | "close" + | "connect" + | "create" + | "delete" + | "disconnect" + | "login" + | "logout" + | "open" + | "register" + | "request_password_reset" + | "start" + | "stop" + | "write"; + +export const AuditActions: AuditAction[] = [ + "close", + "connect", + "create", + "delete", + "disconnect", + "login", + "logout", + "open", + "register", + "request_password_reset", + "start", + "stop", + "write", +]; // From codersdk/audit.go export type AuditDiff = Record; // From codersdk/audit.go export interface AuditDiffField { - // empty interface{} type, falling back to unknown - readonly old?: unknown; - // empty interface{} type, falling back to unknown - readonly new?: unknown; - readonly secret: boolean; + // empty interface{} type, falling back to unknown + readonly old?: unknown; + // empty interface{} type, falling back to unknown + readonly new?: unknown; + readonly secret: boolean; } // From codersdk/audit.go export interface AuditLog { - readonly id: string; - readonly request_id: string; - readonly time: string; - readonly ip: string; - 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; - readonly description: string; - readonly resource_link: string; - readonly is_deleted: boolean; - readonly organization_id: string; - readonly organization?: MinimalOrganization; - readonly user: User | null; + readonly id: string; + readonly request_id: string; + readonly time: string; + readonly ip: string; + 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; + readonly description: string; + readonly resource_link: string; + readonly is_deleted: boolean; + readonly organization_id: string; + readonly organization?: MinimalOrganization; + readonly user: User | null; } // From codersdk/audit.go export interface AuditLogResponse { - readonly audit_logs: readonly AuditLog[]; - readonly count: number; + readonly audit_logs: readonly AuditLog[]; + readonly count: number; } // From codersdk/audit.go export interface AuditLogsRequest extends Pagination { - readonly q?: string; + readonly q?: string; } // From codersdk/users.go export interface AuthMethod { - readonly enabled: boolean; + readonly enabled: boolean; } // From codersdk/users.go export interface AuthMethods { - readonly terms_of_service_url?: string; - readonly password: AuthMethod; - readonly github: GithubAuthMethod; - readonly oidc: OIDCAuthMethod; + readonly terms_of_service_url?: string; + readonly password: AuthMethod; + readonly github: GithubAuthMethod; + readonly oidc: OIDCAuthMethod; } // From codersdk/authorization.go export interface AuthorizationCheck { - readonly object: AuthorizationObject; - readonly action: RBACAction; + readonly object: AuthorizationObject; + readonly action: RBACAction; } // From codersdk/authorization.go export interface AuthorizationObject { - readonly resource_type: RBACResource; - readonly owner_id?: string; - readonly organization_id?: string; - readonly resource_id?: string; - readonly any_org?: boolean; + readonly resource_type: RBACResource; + readonly owner_id?: string; + readonly organization_id?: string; + readonly resource_id?: string; + readonly any_org?: boolean; } // From codersdk/authorization.go export interface AuthorizationRequest { - readonly checks: Record; + readonly checks: Record; } // From codersdk/authorization.go @@ -215,42 +246,46 @@ export const AutomaticUpdateses: AutomaticUpdates[] = ["always", "never"]; // From codersdk/deployment.go export interface AvailableExperiments { - readonly safe: readonly Experiment[]; + readonly safe: readonly Experiment[]; } // From codersdk/deployment.go export interface BannerConfig { - readonly enabled: boolean; - readonly message?: string; - readonly background_color?: string; + readonly enabled: boolean; + readonly message?: string; + readonly background_color?: string; } // From healthsdk/healthsdk.go export interface BaseReport { - readonly error?: string; - readonly severity: HealthSeverity; - readonly warnings: readonly HealthMessage[]; - readonly dismissed: boolean; + readonly error?: string; + readonly severity: HealthSeverity; + readonly warnings: readonly HealthMessage[]; + readonly dismissed: boolean; } // From codersdk/deployment.go export interface BuildInfoResponse { - readonly external_url: string; - readonly version: string; - readonly dashboard_url: string; - readonly telemetry: boolean; - readonly workspace_proxy: boolean; - readonly agent_api_version: string; - readonly provisioner_api_version: string; - readonly upgrade_message: string; - readonly deployment_id: string; - readonly webpush_public_key?: string; + readonly external_url: string; + readonly version: string; + readonly dashboard_url: string; + readonly telemetry: boolean; + readonly workspace_proxy: boolean; + readonly agent_api_version: string; + readonly provisioner_api_version: string; + readonly upgrade_message: string; + readonly deployment_id: string; + readonly webpush_public_key?: string; } // From codersdk/workspacebuilds.go export type BuildReason = "autostart" | "autostop" | "initiator"; -export const BuildReasons: BuildReason[] = ["autostart", "autostop", "initiator"]; +export const BuildReasons: BuildReason[] = [ + "autostart", + "autostop", + "initiator", +]; // From codersdk/client.go export const BuildVersionHeader = "X-Coder-Build-Version"; @@ -263,31 +298,31 @@ export const CLITelemetryHeader = "Coder-CLI-Telemetry"; // From codersdk/users.go export interface ChangePasswordWithOneTimePasscodeRequest { - readonly email: string; - readonly password: string; - readonly one_time_passcode: string; + readonly email: string; + readonly password: string; + readonly one_time_passcode: string; } // From codersdk/chat.go export interface Chat { - readonly id: string; - readonly created_at: string; - readonly updated_at: string; - readonly title: string; + readonly id: string; + readonly created_at: string; + readonly updated_at: string; + readonly title: string; } // From codersdk/chat.go export interface ChatMessage { - readonly id: string; - readonly createdAt?: (Record); - readonly content: string; - readonly role: string; - // external type "github.com/kylecarbs/aisdk-go.Part", to include this type the package must be explicitly included in the parsing - readonly parts?: readonly unknown[]; - // empty interface{} type, falling back to unknown - readonly annotations?: readonly unknown[]; - // external type "github.com/kylecarbs/aisdk-go.Attachment", to include this type the package must be explicitly included in the parsing - readonly experimental_attachments?: readonly unknown[]; + readonly id: string; + readonly createdAt?: Record; + readonly content: string; + readonly role: string; + // external type "github.com/kylecarbs/aisdk-go.Part", to include this type the package must be explicitly included in the parsing + readonly parts?: readonly unknown[]; + // empty interface{} type, falling back to unknown + readonly annotations?: readonly unknown[]; + // external type "github.com/kylecarbs/aisdk-go.Attachment", to include this type the package must be explicitly included in the parsing + readonly experimental_attachments?: readonly unknown[]; } // From codersdk/client.go @@ -295,8 +330,8 @@ export const CoderDesktopTelemetryHeader = "Coder-Desktop-Telemetry"; // From codersdk/insights.go export interface ConnectionLatency { - readonly p50: number; - readonly p95: number; + readonly p50: number; + readonly p95: number; } // From codersdk/files.go @@ -307,288 +342,297 @@ export const ContentTypeZip = "application/zip"; // From codersdk/users.go export interface ConvertLoginRequest { - readonly to_type: LoginType; - readonly password: string; + readonly to_type: LoginType; + readonly password: string; } // From codersdk/chat.go export interface CreateChatMessageRequest { - readonly model: string; - // external type "github.com/kylecarbs/aisdk-go.Message", to include this type the package must be explicitly included in the parsing - readonly message: unknown; - readonly thinking: boolean; + readonly model: string; + // external type "github.com/kylecarbs/aisdk-go.Message", to include this type the package must be explicitly included in the parsing + readonly message: unknown; + readonly thinking: boolean; } // From codersdk/users.go export interface CreateFirstUserRequest { - readonly email: string; - readonly username: string; - readonly name: string; - readonly password: string; - readonly trial: boolean; - readonly trial_info: CreateFirstUserTrialInfo; + readonly email: string; + readonly username: string; + readonly name: string; + readonly password: string; + readonly trial: boolean; + readonly trial_info: CreateFirstUserTrialInfo; } // From codersdk/users.go export interface CreateFirstUserResponse { - readonly user_id: string; - readonly organization_id: string; + readonly user_id: string; + readonly organization_id: string; } // From codersdk/users.go export interface CreateFirstUserTrialInfo { - readonly first_name: string; - readonly last_name: string; - readonly phone_number: string; - readonly job_title: string; - readonly company_name: string; - readonly country: string; - readonly developers: string; + readonly first_name: string; + readonly last_name: string; + readonly phone_number: string; + readonly job_title: string; + readonly company_name: string; + readonly country: string; + readonly developers: string; } // From codersdk/groups.go export interface CreateGroupRequest { - readonly name: string; - readonly display_name: string; - readonly avatar_url: string; - readonly quota_allowance: number; + readonly name: string; + readonly display_name: string; + readonly avatar_url: string; + readonly quota_allowance: number; } // From codersdk/organizations.go export interface CreateOrganizationRequest { - readonly name: string; - readonly display_name?: string; - readonly description?: string; - readonly icon?: string; + readonly name: string; + readonly display_name?: string; + readonly description?: string; + readonly icon?: string; } // From codersdk/provisionerdaemons.go export interface CreateProvisionerKeyRequest { - readonly name: string; - readonly tags: Record; + readonly name: string; + readonly tags: Record; } // From codersdk/provisionerdaemons.go export interface CreateProvisionerKeyResponse { - readonly key: string; + readonly key: string; } // From codersdk/organizations.go export interface CreateTemplateRequest { - readonly name: string; - readonly display_name?: string; - readonly description?: string; - readonly icon?: string; - readonly template_version_id: string; - readonly default_ttl_ms?: number; - readonly activity_bump_ms?: number; - readonly autostop_requirement?: TemplateAutostopRequirement; - readonly autostart_requirement?: TemplateAutostartRequirement; - readonly allow_user_cancel_workspace_jobs: boolean | null; - readonly allow_user_autostart?: boolean; - readonly allow_user_autostop?: boolean; - readonly failure_ttl_ms?: number; - readonly dormant_ttl_ms?: number; - readonly delete_ttl_ms?: number; - readonly disable_everyone_group_access: boolean; - readonly require_active_version: boolean; - readonly max_port_share_level: WorkspaceAgentPortShareLevel | null; + readonly name: string; + readonly display_name?: string; + readonly description?: string; + readonly icon?: string; + readonly template_version_id: string; + readonly default_ttl_ms?: number; + readonly activity_bump_ms?: number; + readonly autostop_requirement?: TemplateAutostopRequirement; + readonly autostart_requirement?: TemplateAutostartRequirement; + readonly allow_user_cancel_workspace_jobs: boolean | null; + readonly allow_user_autostart?: boolean; + readonly allow_user_autostop?: boolean; + readonly failure_ttl_ms?: number; + readonly dormant_ttl_ms?: number; + readonly delete_ttl_ms?: number; + readonly disable_everyone_group_access: boolean; + readonly require_active_version: boolean; + readonly max_port_share_level: WorkspaceAgentPortShareLevel | null; } // From codersdk/templateversions.go export interface CreateTemplateVersionDryRunRequest { - readonly workspace_name: string; - readonly rich_parameter_values: readonly WorkspaceBuildParameter[]; - readonly user_variable_values?: readonly VariableValue[]; + readonly workspace_name: string; + readonly rich_parameter_values: readonly WorkspaceBuildParameter[]; + readonly user_variable_values?: readonly VariableValue[]; } // From codersdk/organizations.go export interface CreateTemplateVersionRequest { - readonly name?: string; - readonly message?: string; - readonly template_id?: string; - readonly storage_method: ProvisionerStorageMethod; - readonly file_id?: string; - readonly example_id?: string; - readonly provisioner: ProvisionerType; - readonly tags: Record; - readonly user_variable_values?: readonly VariableValue[]; + readonly name?: string; + readonly message?: string; + readonly template_id?: string; + readonly storage_method: ProvisionerStorageMethod; + readonly file_id?: string; + readonly example_id?: string; + readonly provisioner: ProvisionerType; + readonly tags: Record; + readonly user_variable_values?: readonly VariableValue[]; } // From codersdk/audit.go export interface CreateTestAuditLogRequest { - readonly action?: AuditAction; - readonly resource_type?: ResourceType; - readonly resource_id?: string; - readonly additional_fields?: Record; - readonly time?: string; - readonly build_reason?: BuildReason; - readonly organization_id?: string; - readonly request_id?: string; + readonly action?: AuditAction; + readonly resource_type?: ResourceType; + readonly resource_id?: string; + readonly additional_fields?: Record; + readonly time?: string; + readonly build_reason?: BuildReason; + readonly organization_id?: string; + readonly request_id?: string; } // From codersdk/apikey.go export interface CreateTokenRequest { - readonly lifetime: number; - readonly scope: APIKeyScope; - readonly token_name: string; + readonly lifetime: number; + readonly scope: APIKeyScope; + readonly token_name: string; } // From codersdk/users.go export interface CreateUserRequestWithOrgs { - readonly email: string; - readonly username: string; - readonly name: string; - readonly password: string; - readonly login_type: LoginType; - readonly user_status: UserStatus | null; - readonly organization_ids: readonly string[]; + readonly email: string; + readonly username: string; + readonly name: string; + readonly password: string; + readonly login_type: LoginType; + readonly user_status: UserStatus | null; + readonly organization_ids: readonly 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 rich_parameter_values?: readonly WorkspaceBuildParameter[]; - readonly log_level?: ProvisionerLogLevel; - readonly template_version_preset_id?: string; - readonly enable_dynamic_parameters?: boolean; + readonly template_version_id?: string; + readonly transition: WorkspaceTransition; + readonly dry_run?: boolean; + readonly state?: string; + readonly orphan?: boolean; + readonly rich_parameter_values?: readonly WorkspaceBuildParameter[]; + readonly log_level?: ProvisionerLogLevel; + readonly template_version_preset_id?: string; + readonly enable_dynamic_parameters?: boolean; } // From codersdk/workspaceproxy.go export interface CreateWorkspaceProxyRequest { - readonly name: string; - readonly display_name: string; - readonly icon: string; + readonly name: string; + readonly display_name: string; + readonly icon: string; } // From codersdk/organizations.go export interface CreateWorkspaceRequest { - readonly template_id?: string; - readonly template_version_id?: string; - readonly name: string; - readonly autostart_schedule?: string; - readonly ttl_ms?: number; - readonly rich_parameter_values?: readonly WorkspaceBuildParameter[]; - readonly automatic_updates?: AutomaticUpdates; - readonly template_version_preset_id?: string; - readonly enable_dynamic_parameters?: boolean; + readonly template_id?: string; + readonly template_version_id?: string; + readonly name: string; + readonly autostart_schedule?: string; + readonly ttl_ms?: number; + readonly rich_parameter_values?: readonly WorkspaceBuildParameter[]; + readonly automatic_updates?: AutomaticUpdates; + readonly template_version_preset_id?: string; + readonly enable_dynamic_parameters?: boolean; } // From codersdk/deployment.go export interface CryptoKey { - readonly feature: CryptoKeyFeature; - readonly secret: string; - readonly deletes_at: string; - readonly sequence: number; - readonly starts_at: string; + readonly feature: CryptoKeyFeature; + readonly secret: string; + readonly deletes_at: string; + readonly sequence: number; + readonly starts_at: string; } // From codersdk/deployment.go -export type CryptoKeyFeature = "oidc_convert" | "tailnet_resume" | "workspace_apps_api_key" | "workspace_apps_token"; +export type CryptoKeyFeature = + | "oidc_convert" + | "tailnet_resume" + | "workspace_apps_api_key" + | "workspace_apps_token"; -export const CryptoKeyFeatures: CryptoKeyFeature[] = ["oidc_convert", "tailnet_resume", "workspace_apps_api_key", "workspace_apps_token"]; +export const CryptoKeyFeatures: CryptoKeyFeature[] = [ + "oidc_convert", + "tailnet_resume", + "workspace_apps_api_key", + "workspace_apps_token", +]; // From codersdk/roles.go export interface CustomRoleRequest { - readonly name: string; - readonly display_name: string; - readonly site_permissions: readonly Permission[]; - readonly organization_permissions: readonly Permission[]; - readonly user_permissions: readonly Permission[]; + readonly name: string; + readonly display_name: string; + readonly site_permissions: readonly Permission[]; + readonly organization_permissions: readonly Permission[]; + readonly user_permissions: readonly Permission[]; } // From codersdk/deployment.go export interface DAUEntry { - readonly date: string; - readonly amount: number; + readonly date: string; + readonly amount: number; } // From codersdk/deployment.go export interface DAURequest { - readonly TZHourOffset: number; + readonly TZHourOffset: number; } // From codersdk/deployment.go export interface DAUsResponse { - readonly entries: readonly DAUEntry[]; - readonly tz_hour_offset: number; + readonly entries: readonly DAUEntry[]; + readonly tz_hour_offset: number; } // From codersdk/deployment.go export interface DERP { - readonly server: DERPServerConfig; - readonly config: DERPConfig; + readonly server: DERPServerConfig; + readonly config: DERPConfig; } // From codersdk/deployment.go export interface DERPConfig { - readonly block_direct: boolean; - readonly force_websockets: boolean; - readonly url: string; - readonly path: string; + readonly block_direct: boolean; + readonly force_websockets: boolean; + readonly url: string; + readonly path: string; } // From healthsdk/healthsdk.go export interface DERPHealthReport extends BaseReport { - readonly healthy: boolean; - readonly regions: Record; - readonly netcheck?: NetcheckReport; - readonly netcheck_err?: string; - readonly netcheck_logs: readonly string[]; + readonly healthy: boolean; + readonly regions: Record; + readonly netcheck?: NetcheckReport; + readonly netcheck_err?: string; + readonly netcheck_logs: readonly string[]; } // From healthsdk/healthsdk.go export interface DERPNodeReport { - readonly healthy: boolean; - readonly severity: HealthSeverity; - readonly warnings: readonly HealthMessage[]; - readonly error?: string; - readonly node: TailDERPNode | null; - readonly node_info: ServerInfoMessage; - readonly can_exchange_messages: boolean; - readonly round_trip_ping: string; - readonly round_trip_ping_ms: number; - readonly uses_websocket: boolean; - readonly client_logs: readonly string[][]; - readonly client_errs: readonly string[][]; - readonly stun: STUNReport; + readonly healthy: boolean; + readonly severity: HealthSeverity; + readonly warnings: readonly HealthMessage[]; + readonly error?: string; + readonly node: TailDERPNode | null; + readonly node_info: ServerInfoMessage; + readonly can_exchange_messages: boolean; + readonly round_trip_ping: string; + readonly round_trip_ping_ms: number; + readonly uses_websocket: boolean; + readonly client_logs: readonly string[][]; + readonly client_errs: readonly string[][]; + readonly stun: STUNReport; } // From codersdk/workspaceagents.go export interface DERPRegion { - readonly preferred: boolean; - readonly latency_ms: number; + readonly preferred: boolean; + readonly latency_ms: number; } // From healthsdk/healthsdk.go export interface DERPRegionReport { - readonly healthy: boolean; - readonly severity: HealthSeverity; - readonly warnings: readonly HealthMessage[]; - readonly error?: string; - readonly region: TailDERPRegion | null; - readonly node_reports: readonly (DERPNodeReport)[]; + readonly healthy: boolean; + readonly severity: HealthSeverity; + readonly warnings: readonly HealthMessage[]; + readonly error?: string; + readonly region: TailDERPRegion | null; + readonly node_reports: readonly DERPNodeReport[]; } // From codersdk/deployment.go export interface DERPServerConfig { - readonly enable: boolean; - readonly region_id: number; - readonly region_code: string; - readonly region_name: string; - readonly stun_addresses: string; - readonly relay_url: string; + readonly enable: boolean; + readonly region_id: number; + readonly region_code: string; + readonly region_name: string; + 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; - readonly allow_all_cors: boolean; + readonly allow_path_app_sharing: boolean; + readonly allow_path_app_site_owner_access: boolean; + readonly allow_all_cors: boolean; } // From codersdk/database.go @@ -596,258 +640,338 @@ export const DatabaseNotReachable = "database not reachable"; // From healthsdk/healthsdk.go export interface DatabaseReport extends BaseReport { - readonly healthy: boolean; - readonly reachable: boolean; - readonly latency: string; - readonly latency_ms: number; - readonly threshold_ms: number; + readonly healthy: boolean; + readonly reachable: boolean; + readonly latency: string; + readonly latency_ms: number; + readonly threshold_ms: number; } // From codersdk/notifications.go export interface DeleteWebpushSubscription { - readonly endpoint: string; + readonly endpoint: string; } // From codersdk/workspaceagentportshare.go export interface DeleteWorkspaceAgentPortShareRequest { - readonly agent_name: string; - readonly port: number; + readonly agent_name: string; + readonly port: number; } // From codersdk/deployment.go export interface DeploymentConfig { - readonly config?: DeploymentValues; - readonly options?: SerpentOptionSet; + readonly config?: DeploymentValues; + readonly options?: SerpentOptionSet; } // 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; + 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 docs_url?: string; - readonly redirect_to_access_url?: boolean; - readonly http_address?: string; - readonly autobuild_poll_interval?: number; - readonly job_hang_detector_interval?: number; - readonly derp?: DERP; - readonly prometheus?: PrometheusConfig; - readonly pprof?: PprofConfig; - readonly proxy_trusted_headers?: string; - readonly proxy_trusted_origins?: string; - readonly cache_directory?: string; - readonly in_memory_database?: boolean; - readonly ephemeral_deployment?: boolean; - readonly pg_connection_url?: string; - readonly pg_auth?: string; - readonly oauth2?: OAuth2Config; - readonly oidc?: OIDCConfig; - readonly telemetry?: TelemetryConfig; - readonly tls?: TLSConfig; - readonly trace?: TraceConfig; - readonly http_cookies?: HTTPCookieConfig; - readonly strict_transport_security?: number; - 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 external_token_encryption_keys?: string; - readonly provisioner?: ProvisionerConfig; - readonly rate_limit?: RateLimitConfig; - readonly experiments?: string; - readonly update_check?: boolean; - readonly swagger?: SwaggerConfig; - readonly logging?: LoggingConfig; - readonly dangerous?: DangerousConfig; - readonly disable_path_apps?: boolean; - readonly session_lifetime?: SessionLifetime; - readonly disable_password_auth?: boolean; - readonly support?: SupportConfig; - readonly external_auth?: SerpentStruct; - readonly ai?: SerpentStruct; - readonly config_ssh?: SSHConfig; - readonly wgtunnel_host?: string; - readonly disable_owner_workspace_exec?: boolean; - readonly proxy_health_status_interval?: number; - readonly enable_terraform_debug_mode?: boolean; - readonly user_quiet_hours_schedule?: UserQuietHoursScheduleConfig; - readonly web_terminal_renderer?: string; - readonly allow_workspace_renames?: boolean; - readonly healthcheck?: HealthcheckConfig; - readonly cli_upgrade_message?: string; - readonly terms_of_service_url?: string; - readonly notifications?: NotificationsConfig; - readonly additional_csp_policy?: string; - readonly workspace_hostname_suffix?: string; - readonly workspace_prebuilds?: PrebuildsConfig; - readonly config?: string; - readonly write_config?: boolean; - readonly address?: string; + readonly verbose?: boolean; + readonly access_url?: string; + readonly wildcard_access_url?: string; + readonly docs_url?: string; + readonly redirect_to_access_url?: boolean; + readonly http_address?: string; + readonly autobuild_poll_interval?: number; + readonly job_hang_detector_interval?: number; + readonly derp?: DERP; + readonly prometheus?: PrometheusConfig; + readonly pprof?: PprofConfig; + readonly proxy_trusted_headers?: string; + readonly proxy_trusted_origins?: string; + readonly cache_directory?: string; + readonly in_memory_database?: boolean; + readonly ephemeral_deployment?: boolean; + readonly pg_connection_url?: string; + readonly pg_auth?: string; + readonly oauth2?: OAuth2Config; + readonly oidc?: OIDCConfig; + readonly telemetry?: TelemetryConfig; + readonly tls?: TLSConfig; + readonly trace?: TraceConfig; + readonly http_cookies?: HTTPCookieConfig; + readonly strict_transport_security?: number; + 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 external_token_encryption_keys?: string; + readonly provisioner?: ProvisionerConfig; + readonly rate_limit?: RateLimitConfig; + readonly experiments?: string; + readonly update_check?: boolean; + readonly swagger?: SwaggerConfig; + readonly logging?: LoggingConfig; + readonly dangerous?: DangerousConfig; + readonly disable_path_apps?: boolean; + readonly session_lifetime?: SessionLifetime; + readonly disable_password_auth?: boolean; + readonly support?: SupportConfig; + readonly external_auth?: SerpentStruct; + readonly ai?: SerpentStruct; + readonly config_ssh?: SSHConfig; + readonly wgtunnel_host?: string; + readonly disable_owner_workspace_exec?: boolean; + readonly proxy_health_status_interval?: number; + readonly enable_terraform_debug_mode?: boolean; + readonly user_quiet_hours_schedule?: UserQuietHoursScheduleConfig; + readonly web_terminal_renderer?: string; + readonly allow_workspace_renames?: boolean; + readonly healthcheck?: HealthcheckConfig; + readonly cli_upgrade_message?: string; + readonly terms_of_service_url?: string; + readonly notifications?: NotificationsConfig; + readonly additional_csp_policy?: string; + readonly workspace_hostname_suffix?: string; + readonly workspace_prebuilds?: PrebuildsConfig; + readonly config?: string; + readonly write_config?: boolean; + readonly address?: string; } // From codersdk/parameters.go export interface DiagnosticExtra { - readonly code: string; + readonly code: string; } // From codersdk/parameters.go export type DiagnosticSeverityString = "error" | "warning"; -export const DiagnosticSeverityStrings: DiagnosticSeverityString[] = ["error", "warning"]; +export const DiagnosticSeverityStrings: DiagnosticSeverityString[] = [ + "error", + "warning", +]; // From codersdk/workspaceagents.go -export type DisplayApp = "port_forwarding_helper" | "ssh_helper" | "vscode" | "vscode_insiders" | "web_terminal"; - -export const DisplayApps: DisplayApp[] = ["port_forwarding_helper", "ssh_helper", "vscode", "vscode_insiders", "web_terminal"]; +export type DisplayApp = + | "port_forwarding_helper" + | "ssh_helper" + | "vscode" + | "vscode_insiders" + | "web_terminal"; + +export const DisplayApps: DisplayApp[] = [ + "port_forwarding_helper", + "ssh_helper", + "vscode", + "vscode_insiders", + "web_terminal", +]; // From codersdk/parameters.go export interface DynamicParametersRequest { - readonly id: number; - readonly inputs: Record; - readonly owner_id?: string; + readonly id: number; + readonly inputs: Record; + readonly owner_id?: string; } // From codersdk/parameters.go export interface DynamicParametersResponse { - readonly id: number; - readonly diagnostics: readonly FriendlyDiagnostic[]; - readonly parameters: readonly PreviewParameter[]; + readonly id: number; + readonly diagnostics: readonly FriendlyDiagnostic[]; + readonly parameters: readonly PreviewParameter[]; } // From codersdk/externalauth.go -export type EnhancedExternalAuthProvider = "azure-devops" | "azure-devops-entra" | "bitbucket-cloud" | "bitbucket-server" | "github" | "gitlab" | "gitea" | "jfrog" | "slack"; - -export const EnhancedExternalAuthProviders: EnhancedExternalAuthProvider[] = ["azure-devops", "azure-devops-entra", "bitbucket-cloud", "bitbucket-server", "github", "gitlab", "gitea", "jfrog", "slack"]; +export type EnhancedExternalAuthProvider = + | "azure-devops" + | "azure-devops-entra" + | "bitbucket-cloud" + | "bitbucket-server" + | "github" + | "gitlab" + | "gitea" + | "jfrog" + | "slack"; + +export const EnhancedExternalAuthProviders: EnhancedExternalAuthProvider[] = [ + "azure-devops", + "azure-devops-entra", + "bitbucket-cloud", + "bitbucket-server", + "github", + "gitlab", + "gitea", + "jfrog", + "slack", +]; // From codersdk/deployment.go export type Entitlement = "entitled" | "grace_period" | "not_entitled"; // From codersdk/deployment.go export interface Entitlements { - readonly features: Record; - readonly warnings: readonly string[]; - readonly errors: readonly string[]; - readonly has_license: boolean; - readonly trial: boolean; - readonly require_telemetry: boolean; - readonly refreshed_at: string; + readonly features: Record; + readonly warnings: readonly string[]; + readonly errors: readonly string[]; + readonly has_license: boolean; + readonly trial: boolean; + readonly require_telemetry: boolean; + readonly refreshed_at: string; } // From codersdk/client.go export const EntitlementsWarningHeader = "X-Coder-Entitlements-Warning"; // From codersdk/deployment.go -export type Experiment = "ai-tasks" | "agentic-chat" | "auto-fill-parameters" | "example" | "notifications" | "web-push" | "workspace-prebuilds" | "workspace-usage"; +export type Experiment = + | "ai-tasks" + | "agentic-chat" + | "auto-fill-parameters" + | "example" + | "notifications" + | "web-push" + | "workspace-prebuilds" + | "workspace-usage"; // From codersdk/deployment.go export type Experiments = readonly Experiment[]; // From codersdk/externalauth.go export interface ExternalAuth { - readonly authenticated: boolean; - readonly device: boolean; - readonly display_name: string; - readonly user: ExternalAuthUser | null; - readonly app_installable: boolean; - readonly installations: readonly ExternalAuthAppInstallation[]; - readonly app_install_url: string; + readonly authenticated: boolean; + readonly device: boolean; + readonly display_name: string; + readonly user: ExternalAuthUser | null; + readonly app_installable: boolean; + readonly installations: readonly ExternalAuthAppInstallation[]; + readonly app_install_url: string; } // From codersdk/externalauth.go export interface ExternalAuthAppInstallation { - readonly id: number; - readonly account: ExternalAuthUser; - readonly configure_url: string; + readonly id: number; + readonly account: ExternalAuthUser; + readonly configure_url: string; } // From codersdk/deployment.go export interface ExternalAuthConfig { - readonly type: string; - readonly client_id: string; - readonly id: string; - readonly auth_url: string; - readonly token_url: string; - readonly validate_url: string; - readonly app_install_url: string; - readonly app_installations_url: string; - readonly no_refresh: boolean; - readonly scopes: readonly string[]; - readonly device_flow: boolean; - readonly device_code_url: string; - readonly regex: string; - readonly display_name: string; - readonly display_icon: string; + readonly type: string; + readonly client_id: string; + readonly id: string; + readonly auth_url: string; + readonly token_url: string; + readonly validate_url: string; + readonly app_install_url: string; + readonly app_installations_url: string; + readonly no_refresh: boolean; + readonly scopes: readonly string[]; + readonly device_flow: boolean; + readonly device_code_url: string; + readonly regex: string; + readonly display_name: string; + readonly display_icon: string; } // From codersdk/externalauth.go export interface ExternalAuthDevice { - readonly device_code: string; - readonly user_code: string; - readonly verification_uri: string; - readonly expires_in: number; - readonly interval: number; + readonly device_code: string; + readonly user_code: string; + readonly verification_uri: string; + readonly expires_in: number; + readonly interval: number; } // From codersdk/externalauth.go export interface ExternalAuthDeviceExchange { - readonly device_code: string; + readonly device_code: string; } // From codersdk/externalauth.go export interface ExternalAuthLink { - readonly provider_id: string; - readonly created_at: string; - readonly updated_at: string; - readonly has_refresh_token: boolean; - readonly expires: string; - readonly authenticated: boolean; - readonly validate_error: string; + readonly provider_id: string; + readonly created_at: string; + readonly updated_at: string; + readonly has_refresh_token: boolean; + readonly expires: string; + readonly authenticated: boolean; + readonly validate_error: string; } // From codersdk/externalauth.go export interface ExternalAuthLinkProvider { - readonly id: string; - readonly type: string; - readonly device: boolean; - readonly display_name: string; - readonly display_icon: string; - readonly allow_refresh: boolean; - readonly allow_validate: boolean; + readonly id: string; + readonly type: string; + readonly device: boolean; + readonly display_name: string; + readonly display_icon: string; + readonly allow_refresh: boolean; + readonly allow_validate: boolean; } // From codersdk/externalauth.go export interface ExternalAuthUser { - readonly id: number; - readonly login: string; - readonly avatar_url: string; - readonly profile_url: string; - readonly name: string; + readonly id: number; + readonly login: string; + readonly avatar_url: string; + readonly profile_url: string; + readonly name: string; } // From codersdk/deployment.go export interface Feature { - readonly entitlement: Entitlement; - readonly enabled: boolean; - readonly limit?: number; - readonly actual?: number; -} - -// From codersdk/deployment.go -export type FeatureName = "access_control" | "advanced_template_scheduling" | "appearance" | "audit_log" | "browser_only" | "control_shared_ports" | "custom_roles" | "external_provisioner_daemons" | "external_token_encryption" | "high_availability" | "multiple_external_auth" | "multiple_organizations" | "scim" | "template_rbac" | "user_limit" | "user_role_management" | "workspace_batch_actions" | "workspace_prebuilds" | "workspace_proxy"; - -export const FeatureNames: FeatureName[] = ["access_control", "advanced_template_scheduling", "appearance", "audit_log", "browser_only", "control_shared_ports", "custom_roles", "external_provisioner_daemons", "external_token_encryption", "high_availability", "multiple_external_auth", "multiple_organizations", "scim", "template_rbac", "user_limit", "user_role_management", "workspace_batch_actions", "workspace_prebuilds", "workspace_proxy"]; + readonly entitlement: Entitlement; + readonly enabled: boolean; + readonly limit?: number; + readonly actual?: number; +} + +// From codersdk/deployment.go +export type FeatureName = + | "access_control" + | "advanced_template_scheduling" + | "appearance" + | "audit_log" + | "browser_only" + | "control_shared_ports" + | "custom_roles" + | "external_provisioner_daemons" + | "external_token_encryption" + | "high_availability" + | "multiple_external_auth" + | "multiple_organizations" + | "scim" + | "template_rbac" + | "user_limit" + | "user_role_management" + | "workspace_batch_actions" + | "workspace_prebuilds" + | "workspace_proxy"; + +export const FeatureNames: FeatureName[] = [ + "access_control", + "advanced_template_scheduling", + "appearance", + "audit_log", + "browser_only", + "control_shared_ports", + "custom_roles", + "external_provisioner_daemons", + "external_token_encryption", + "high_availability", + "multiple_external_auth", + "multiple_organizations", + "scim", + "template_rbac", + "user_limit", + "user_role_management", + "workspace_batch_actions", + "workspace_prebuilds", + "workspace_proxy", +]; // From codersdk/deployment.go export type FeatureSet = "enterprise" | "" | "premium"; @@ -859,73 +983,73 @@ export const FormatZip = "zip"; // From codersdk/parameters.go export interface FriendlyDiagnostic { - readonly severity: DiagnosticSeverityString; - readonly summary: string; - readonly detail: string; - readonly extra: DiagnosticExtra; + readonly severity: DiagnosticSeverityString; + readonly summary: string; + readonly detail: string; + readonly extra: DiagnosticExtra; } // From codersdk/apikey.go export interface GenerateAPIKeyResponse { - readonly key: string; + readonly key: string; } // From codersdk/inboxnotification.go export interface GetInboxNotificationResponse { - readonly notification: InboxNotification; - readonly unread_count: number; + readonly notification: InboxNotification; + readonly unread_count: number; } // From codersdk/insights.go export interface GetUserStatusCountsRequest { - readonly offset: string; + readonly offset: string; } // From codersdk/insights.go export interface GetUserStatusCountsResponse { - readonly status_counts: Record; + readonly status_counts: Record; } // From codersdk/users.go export interface GetUsersResponse { - readonly users: readonly User[]; - readonly count: number; + readonly users: readonly User[]; + readonly count: number; } // From codersdk/gitsshkey.go export interface GitSSHKey { - readonly user_id: string; - readonly created_at: string; - readonly updated_at: string; - readonly public_key: string; + readonly user_id: string; + readonly created_at: string; + readonly updated_at: string; + readonly public_key: string; } // From codersdk/users.go export interface GithubAuthMethod { - readonly enabled: boolean; - readonly default_provider_configured: boolean; + readonly enabled: boolean; + readonly default_provider_configured: boolean; } // From codersdk/groups.go export interface Group { - readonly id: string; - readonly name: string; - readonly display_name: string; - readonly organization_id: string; - readonly members: readonly ReducedUser[]; - readonly total_member_count: number; - readonly avatar_url: string; - readonly quota_allowance: number; - readonly source: GroupSource; - readonly organization_name: string; - readonly organization_display_name: string; + readonly id: string; + readonly name: string; + readonly display_name: string; + readonly organization_id: string; + readonly members: readonly ReducedUser[]; + readonly total_member_count: number; + readonly avatar_url: string; + readonly quota_allowance: number; + readonly source: GroupSource; + readonly organization_name: string; + readonly organization_display_name: string; } // From codersdk/groups.go export interface GroupArguments { - readonly Organization: string; - readonly HasMember: string; - readonly GroupIDs: readonly string[]; + readonly Organization: string; + readonly HasMember: string; + readonly GroupIDs: readonly string[]; } // From codersdk/groups.go @@ -935,21 +1059,39 @@ export const GroupSources: GroupSource[] = ["oidc", "user"]; // From codersdk/idpsync.go export interface GroupSyncSettings { - readonly field: string; - readonly mapping: Record; - readonly regex_filter: string | null; - readonly auto_create_missing_groups: boolean; - readonly legacy_group_name_mapping?: Record; + readonly field: string; + readonly mapping: Record; + readonly regex_filter: string | null; + readonly auto_create_missing_groups: boolean; + readonly legacy_group_name_mapping?: Record; } // From codersdk/deployment.go export interface HTTPCookieConfig { - readonly secure_auth_cookie?: boolean; - readonly same_site?: string; + readonly secure_auth_cookie?: boolean; + readonly same_site?: string; } // From health/model.go -export type HealthCode = "EACS03" | "EACS02" | "EACS04" | "EACS01" | "EDERP01" | "EDERP02" | "EDB01" | "EDB02" | "EPD03" | "EPD02" | "EPD01" | "EWP02" | "EWP04" | "EWP01" | "EUNKNOWN" | "EWS01" | "EWS02" | "EWS03"; +export type HealthCode = + | "EACS03" + | "EACS02" + | "EACS04" + | "EACS01" + | "EDERP01" + | "EDERP02" + | "EDB01" + | "EDB02" + | "EPD03" + | "EPD02" + | "EPD01" + | "EWP02" + | "EWP04" + | "EWP01" + | "EUNKNOWN" + | "EWS01" + | "EWS02" + | "EWS03"; // From health/model.go export const HealthCodeInterfaceSmallMTU = "EIF01"; @@ -960,22 +1102,54 @@ export const HealthCodeSTUNMapVaryDest = "ESTUN02"; // From health/model.go export const HealthCodeSTUNNoNodes = "ESTUN01"; -export const HealthCodes: HealthCode[] = ["EACS03", "EACS02", "EACS04", "EACS01", "EDERP01", "EDERP02", "EDB01", "EDB02", "EPD03", "EPD02", "EPD01", "EWP02", "EWP04", "EWP01", "EUNKNOWN", "EWS01", "EWS02", "EWS03"]; +export const HealthCodes: HealthCode[] = [ + "EACS03", + "EACS02", + "EACS04", + "EACS01", + "EDERP01", + "EDERP02", + "EDB01", + "EDB02", + "EPD03", + "EPD02", + "EPD01", + "EWP02", + "EWP04", + "EWP01", + "EUNKNOWN", + "EWS01", + "EWS02", + "EWS03", +]; // From health/model.go export interface HealthMessage { - readonly code: HealthCode; - readonly message: string; + readonly code: HealthCode; + readonly message: string; } // From healthsdk/healthsdk.go -export type HealthSection = "AccessURL" | "DERP" | "Database" | "ProvisionerDaemons" | "Websocket" | "WorkspaceProxy"; - -export const HealthSections: HealthSection[] = ["AccessURL", "DERP", "Database", "ProvisionerDaemons", "Websocket", "WorkspaceProxy"]; +export type HealthSection = + | "AccessURL" + | "DERP" + | "Database" + | "ProvisionerDaemons" + | "Websocket" + | "WorkspaceProxy"; + +export const HealthSections: HealthSection[] = [ + "AccessURL", + "DERP", + "Database", + "ProvisionerDaemons", + "Websocket", + "WorkspaceProxy", +]; // From healthsdk/healthsdk.go export interface HealthSettings { - readonly dismissed_healthchecks: readonly HealthSection[]; + readonly dismissed_healthchecks: readonly HealthSection[]; } // From health/model.go @@ -985,55 +1159,55 @@ export const HealthSeveritys: HealthSeverity[] = ["error", "ok", "warning"]; // From codersdk/workspaceapps.go export interface Healthcheck { - readonly url: string; - readonly interval: number; - readonly threshold: number; + readonly url: string; + readonly interval: number; + readonly threshold: number; } // From codersdk/deployment.go export interface HealthcheckConfig { - readonly refresh: number; - readonly threshold_database: number; + readonly refresh: number; + readonly threshold_database: number; } // From healthsdk/healthsdk.go export interface HealthcheckReport { - readonly time: string; - readonly healthy: boolean; - readonly severity: HealthSeverity; - readonly derp: DERPHealthReport; - readonly access_url: AccessURLReport; - readonly websocket: WebsocketReport; - readonly database: DatabaseReport; - readonly workspace_proxy: WorkspaceProxyReport; - readonly provisioner_daemons: ProvisionerDaemonsReport; - readonly coder_version: string; + readonly time: string; + readonly healthy: boolean; + readonly severity: HealthSeverity; + readonly derp: DERPHealthReport; + readonly access_url: AccessURLReport; + readonly websocket: WebsocketReport; + readonly database: DatabaseReport; + readonly workspace_proxy: WorkspaceProxyReport; + readonly provisioner_daemons: ProvisionerDaemonsReport; + readonly coder_version: string; } // From codersdk/idpsync.go export interface IDPSyncMapping { - readonly Given: string; - readonly Gets: ResourceIdType; + readonly Given: string; + readonly Gets: ResourceIdType; } // From codersdk/inboxnotification.go export interface InboxNotification { - readonly id: string; - readonly user_id: string; - readonly template_id: string; - readonly targets: readonly string[]; - readonly title: string; - readonly content: string; - readonly icon: string; - readonly actions: readonly InboxNotificationAction[]; - readonly read_at: string | null; - readonly created_at: string; + readonly id: string; + readonly user_id: string; + readonly template_id: string; + readonly targets: readonly string[]; + readonly title: string; + readonly content: string; + readonly icon: string; + readonly actions: readonly InboxNotificationAction[]; + readonly read_at: string | null; + readonly created_at: string; } // From codersdk/inboxnotification.go export interface InboxNotificationAction { - readonly label: string; - readonly url: string; + readonly label: string; + readonly url: string; } // From codersdk/inboxnotification.go @@ -1051,17 +1225,20 @@ export const InboxNotificationFallbackIconWorkspace = "DEFAULT_ICON_WORKSPACE"; // From codersdk/insights.go export type InsightsReportInterval = "day" | "week"; -export const InsightsReportIntervals: InsightsReportInterval[] = ["day", "week"]; +export const InsightsReportIntervals: InsightsReportInterval[] = [ + "day", + "week", +]; // From codersdk/workspaceagents.go export interface IssueReconnectingPTYSignedTokenRequest { - readonly url: string; - readonly agentID: string; + readonly url: string; + readonly agentID: string; } // From codersdk/workspaceagents.go export interface IssueReconnectingPTYSignedTokenResponse { - readonly signed_token: string; + readonly signed_token: string; } // From codersdk/provisionerdaemons.go @@ -1071,62 +1248,69 @@ export const JobErrorCodes: JobErrorCode[] = ["REQUIRED_TEMPLATE_VARIABLES"]; // From codersdk/deployment.go export interface LanguageModel { - readonly id: string; - readonly display_name: string; - readonly provider: string; + readonly id: string; + readonly display_name: string; + readonly provider: string; } // From codersdk/deployment.go export interface LanguageModelConfig { - readonly models: readonly LanguageModel[]; + readonly models: readonly LanguageModel[]; } // From codersdk/licenses.go export interface License { - readonly id: number; - readonly uuid: string; - readonly uploaded_at: string; - // empty interface{} type, falling back to unknown - readonly claims: Record; + readonly id: number; + readonly uuid: string; + readonly uploaded_at: string; + // empty interface{} type, falling back to unknown + readonly claims: Record; } // From codersdk/licenses.go export const LicenseExpiryClaim = "license_expires"; // From codersdk/licenses.go -export const LicenseTelemetryRequiredErrorText = "License requires telemetry but telemetry is disabled"; +export const LicenseTelemetryRequiredErrorText = + "License requires telemetry but telemetry is disabled"; // From codersdk/deployment.go export interface LinkConfig { - readonly name: string; - readonly target: string; - readonly icon: string; + readonly name: string; + readonly target: string; + readonly icon: string; } // From codersdk/inboxnotification.go export interface ListInboxNotificationsRequest { - readonly targets?: string; - readonly templates?: string; - readonly read_status?: string; - readonly starting_before?: string; + readonly targets?: string; + readonly templates?: string; + readonly read_status?: string; + readonly starting_before?: string; } // From codersdk/inboxnotification.go export interface ListInboxNotificationsResponse { - readonly notifications: readonly InboxNotification[]; - readonly unread_count: number; + readonly notifications: readonly InboxNotification[]; + readonly unread_count: number; } // From codersdk/externalauth.go export interface ListUserExternalAuthResponse { - readonly providers: readonly ExternalAuthLinkProvider[]; - readonly links: readonly ExternalAuthLink[]; + readonly providers: readonly ExternalAuthLinkProvider[]; + readonly links: readonly ExternalAuthLink[]; } // From codersdk/provisionerdaemons.go export type LogLevel = "debug" | "error" | "info" | "trace" | "warn"; -export const LogLevels: 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"; @@ -1135,230 +1319,242 @@ export const LogSources: LogSource[] = ["provisioner", "provisioner_daemon"]; // From codersdk/deployment.go export interface LoggingConfig { - readonly log_filter: string; - readonly human: string; - readonly json: string; - readonly stackdriver: string; + readonly log_filter: string; + readonly human: string; + readonly json: string; + readonly stackdriver: string; } // From codersdk/apikey.go export type LoginType = "github" | "none" | "oidc" | "password" | "token" | ""; -export const LoginTypes: LoginType[] = ["github", "none", "oidc", "password", "token", ""]; +export const LoginTypes: LoginType[] = [ + "github", + "none", + "oidc", + "password", + "token", + "", +]; // From codersdk/users.go export interface LoginWithPasswordRequest { - readonly email: string; - readonly password: string; + readonly email: string; + readonly password: string; } // From codersdk/users.go export interface LoginWithPasswordResponse { - readonly session_token: string; + readonly session_token: string; } // From codersdk/provisionerdaemons.go export interface MatchedProvisioners { - readonly count: number; - readonly available: number; - readonly most_recently_seen?: string; + readonly count: number; + readonly available: number; + readonly most_recently_seen?: string; } // From codersdk/organizations.go export interface MinimalOrganization { - readonly id: string; - readonly name: string; - readonly display_name: string; - readonly icon: string; + readonly id: string; + readonly name: string; + readonly display_name: string; + readonly icon: string; } // From codersdk/users.go export interface MinimalUser { - readonly id: string; - readonly username: string; - readonly avatar_url?: string; + readonly id: string; + readonly username: string; + readonly avatar_url?: string; } // From netcheck/netcheck.go export interface NetcheckReport { - readonly UDP: boolean; - readonly IPv6: boolean; - readonly IPv4: boolean; - readonly IPv6CanSend: boolean; - readonly IPv4CanSend: boolean; - readonly OSHasIPv6: boolean; - readonly ICMPv4: boolean; - readonly MappingVariesByDestIP: boolean | null; - readonly HairPinning: boolean | null; - readonly UPnP: boolean | null; - readonly PMP: boolean | null; - readonly PCP: boolean | null; - readonly PreferredDERP: number; - readonly RegionLatency: Record; - readonly RegionV4Latency: Record; - readonly RegionV6Latency: Record; - readonly GlobalV4: string; - readonly GlobalV6: string; - readonly CaptivePortal: boolean | null; + readonly UDP: boolean; + readonly IPv6: boolean; + readonly IPv4: boolean; + readonly IPv6CanSend: boolean; + readonly IPv4CanSend: boolean; + readonly OSHasIPv6: boolean; + readonly ICMPv4: boolean; + readonly MappingVariesByDestIP: boolean | null; + readonly HairPinning: boolean | null; + readonly UPnP: boolean | null; + readonly PMP: boolean | null; + readonly PCP: boolean | null; + readonly PreferredDERP: number; + readonly RegionLatency: Record; + readonly RegionV4Latency: Record; + readonly RegionV6Latency: Record; + readonly GlobalV4: string; + readonly GlobalV6: string; + readonly CaptivePortal: boolean | null; } // From codersdk/notifications.go export interface NotificationMethodsResponse { - readonly available: readonly string[]; - readonly default: string; + readonly available: readonly string[]; + readonly default: string; } // From codersdk/notifications.go export interface NotificationPreference { - readonly id: string; - readonly disabled: boolean; - readonly updated_at: string; + readonly id: string; + readonly disabled: boolean; + readonly updated_at: string; } // From codersdk/notifications.go export interface NotificationTemplate { - readonly id: string; - readonly name: string; - readonly title_template: string; - readonly body_template: string; - readonly actions: string; - readonly group: string; - readonly method: string; - readonly kind: string; - readonly enabled_by_default: boolean; + readonly id: string; + readonly name: string; + readonly title_template: string; + readonly body_template: string; + readonly actions: string; + readonly group: string; + readonly method: string; + readonly kind: string; + readonly enabled_by_default: boolean; } // From codersdk/deployment.go export interface NotificationsConfig { - readonly max_send_attempts: number; - readonly retry_interval: number; - readonly sync_interval: number; - readonly sync_buffer_size: number; - readonly lease_period: number; - readonly lease_count: number; - readonly fetch_interval: number; - readonly method: string; - readonly dispatch_timeout: number; - readonly email: NotificationsEmailConfig; - readonly webhook: NotificationsWebhookConfig; - readonly inbox: NotificationsInboxConfig; + readonly max_send_attempts: number; + readonly retry_interval: number; + readonly sync_interval: number; + readonly sync_buffer_size: number; + readonly lease_period: number; + readonly lease_count: number; + readonly fetch_interval: number; + readonly method: string; + readonly dispatch_timeout: number; + readonly email: NotificationsEmailConfig; + readonly webhook: NotificationsWebhookConfig; + readonly inbox: NotificationsInboxConfig; } // From codersdk/deployment.go export interface NotificationsEmailAuthConfig { - readonly identity: string; - readonly username: string; - readonly password: string; - readonly password_file: string; + readonly identity: string; + readonly username: string; + readonly password: string; + readonly password_file: string; } // From codersdk/deployment.go export interface NotificationsEmailConfig { - readonly from: string; - readonly smarthost: string; - readonly hello: string; - readonly auth: NotificationsEmailAuthConfig; - readonly tls: NotificationsEmailTLSConfig; - readonly force_tls: boolean; + readonly from: string; + readonly smarthost: string; + readonly hello: string; + readonly auth: NotificationsEmailAuthConfig; + readonly tls: NotificationsEmailTLSConfig; + readonly force_tls: boolean; } // From codersdk/deployment.go export interface NotificationsEmailTLSConfig { - readonly start_tls: boolean; - readonly server_name: string; - readonly insecure_skip_verify: boolean; - readonly ca_file: string; - readonly cert_file: string; - readonly key_file: string; + readonly start_tls: boolean; + readonly server_name: string; + readonly insecure_skip_verify: boolean; + readonly ca_file: string; + readonly cert_file: string; + readonly key_file: string; } // From codersdk/deployment.go export interface NotificationsInboxConfig { - readonly enabled: boolean; + readonly enabled: boolean; } // From codersdk/notifications.go export interface NotificationsSettings { - readonly notifier_paused: boolean; + readonly notifier_paused: boolean; } // From codersdk/deployment.go export interface NotificationsWebhookConfig { - readonly endpoint: string; + readonly endpoint: string; } // From codersdk/parameters.go export interface NullHCLString { - readonly value: string; - readonly valid: boolean; + readonly value: string; + readonly valid: boolean; } // From codersdk/oauth2.go export interface OAuth2AppEndpoints { - readonly authorization: string; - readonly token: string; - readonly device_authorization: string; + readonly authorization: string; + readonly token: string; + readonly device_authorization: string; } // From codersdk/deployment.go export interface OAuth2Config { - readonly github: OAuth2GithubConfig; + readonly github: OAuth2GithubConfig; } // From codersdk/oauth2.go export interface OAuth2DeviceFlowCallbackResponse { - readonly redirect_url: string; + readonly redirect_url: string; } // From codersdk/deployment.go export interface OAuth2GithubConfig { - readonly client_id: string; - readonly client_secret: string; - readonly device_flow: boolean; - readonly default_provider_enable: boolean; - readonly allowed_orgs: string; - readonly allowed_teams: string; - readonly allow_signups: boolean; - readonly allow_everyone: boolean; - readonly enterprise_base_url: string; + readonly client_id: string; + readonly client_secret: string; + readonly device_flow: boolean; + readonly default_provider_enable: boolean; + readonly allowed_orgs: string; + readonly allowed_teams: string; + readonly allow_signups: boolean; + readonly allow_everyone: boolean; + readonly enterprise_base_url: string; } // From codersdk/oauth2.go export interface OAuth2ProviderApp { - readonly id: string; - readonly name: string; - readonly callback_url: string; - readonly icon: string; - readonly endpoints: OAuth2AppEndpoints; + readonly id: string; + readonly name: string; + readonly callback_url: string; + readonly icon: string; + readonly endpoints: OAuth2AppEndpoints; } // From codersdk/oauth2.go export interface OAuth2ProviderAppFilter { - readonly user_id?: string; + readonly user_id?: string; } // From codersdk/oauth2.go export interface OAuth2ProviderAppSecret { - readonly id: string; - readonly last_used_at: string | null; - readonly client_secret_truncated: string; + readonly id: string; + readonly last_used_at: string | null; + readonly client_secret_truncated: string; } // From codersdk/oauth2.go export interface OAuth2ProviderAppSecretFull { - readonly id: string; - readonly client_secret_full: string; + readonly id: string; + readonly client_secret_full: string; } // From codersdk/oauth2.go export type OAuth2ProviderGrantType = "authorization_code" | "refresh_token"; -export const OAuth2ProviderGrantTypes: OAuth2ProviderGrantType[] = ["authorization_code", "refresh_token"]; +export const OAuth2ProviderGrantTypes: OAuth2ProviderGrantType[] = [ + "authorization_code", + "refresh_token", +]; // From codersdk/oauth2.go export type OAuth2ProviderResponseType = "code"; -export const OAuth2ProviderResponseTypes: OAuth2ProviderResponseType[] = ["code"]; +export const OAuth2ProviderResponseTypes: OAuth2ProviderResponseType[] = [ + "code", +]; // From codersdk/client.go export const OAuth2RedirectCookie = "oauth_redirect"; @@ -1368,188 +1564,216 @@ export const OAuth2StateCookie = "oauth_state"; // From codersdk/users.go export interface OAuthConversionResponse { - readonly state_string: string; - readonly expires_at: string; - readonly to_type: LoginType; - readonly user_id: string; + readonly state_string: string; + readonly expires_at: string; + readonly to_type: LoginType; + readonly user_id: string; } // From codersdk/users.go export interface OIDCAuthMethod extends AuthMethod { - readonly signInText: string; - readonly iconUrl: string; + 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; - readonly client_key_file: string; - readonly client_cert_file: string; - readonly email_domain: string; - readonly issuer_url: string; - readonly scopes: string; - readonly ignore_email_verified: boolean; - readonly username_field: string; - readonly name_field: string; - readonly email_field: string; - readonly auth_url_params: SerpentStruct>; - readonly ignore_user_info: boolean; - readonly source_user_info_from_access_token: boolean; - readonly organization_field: string; - readonly organization_mapping: SerpentStruct>; - readonly organization_assign_default: boolean; - readonly group_auto_create: boolean; - readonly group_regex_filter: string; - readonly group_allow_list: string; - readonly groups_field: string; - readonly group_mapping: SerpentStruct>; - readonly user_role_field: string; - readonly user_role_mapping: SerpentStruct>; - readonly user_roles_default: string; - readonly sign_in_text: string; - readonly icon_url: string; - readonly signups_disabled_text: string; - readonly skip_issuer_checks: boolean; + readonly allow_signups: boolean; + readonly client_id: string; + readonly client_secret: string; + readonly client_key_file: string; + readonly client_cert_file: string; + readonly email_domain: string; + readonly issuer_url: string; + readonly scopes: string; + readonly ignore_email_verified: boolean; + readonly username_field: string; + readonly name_field: string; + readonly email_field: string; + readonly auth_url_params: SerpentStruct>; + readonly ignore_user_info: boolean; + readonly source_user_info_from_access_token: boolean; + readonly organization_field: string; + readonly organization_mapping: SerpentStruct>; + readonly organization_assign_default: boolean; + readonly group_auto_create: boolean; + readonly group_regex_filter: string; + readonly group_allow_list: string; + readonly groups_field: string; + readonly group_mapping: SerpentStruct>; + readonly user_role_field: string; + readonly user_role_mapping: SerpentStruct>; + readonly user_roles_default: string; + readonly sign_in_text: string; + readonly icon_url: string; + readonly signups_disabled_text: string; + readonly skip_issuer_checks: boolean; } // From codersdk/parameters.go export type OptionType = "bool" | "list(string)" | "number" | "string"; -export const OptionTypes: OptionType[] = ["bool", "list(string)", "number", "string"]; +export const OptionTypes: OptionType[] = [ + "bool", + "list(string)", + "number", + "string", +]; // From codersdk/organizations.go export interface Organization extends MinimalOrganization { - readonly description: string; - readonly created_at: string; - readonly updated_at: string; - readonly is_default: boolean; + readonly description: string; + readonly created_at: string; + readonly updated_at: string; + readonly is_default: boolean; } // 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: readonly SlimRole[]; + readonly user_id: string; + readonly organization_id: string; + readonly created_at: string; + readonly updated_at: string; + readonly roles: readonly SlimRole[]; } // From codersdk/organizations.go export interface OrganizationMemberWithUserData extends OrganizationMember { - readonly username: string; - readonly name?: string; - readonly avatar_url?: string; - readonly email: string; - readonly global_roles: readonly SlimRole[]; + readonly username: string; + readonly name?: string; + readonly avatar_url?: string; + readonly email: string; + readonly global_roles: readonly SlimRole[]; } // From codersdk/organizations.go export interface OrganizationProvisionerDaemonsOptions { - readonly Limit: number; - readonly IDs: readonly string[]; - readonly Tags: Record; + readonly Limit: number; + readonly IDs: readonly string[]; + readonly Tags: Record; } // From codersdk/organizations.go export interface OrganizationProvisionerJobsOptions { - readonly Limit: number; - readonly IDs: readonly string[]; - readonly Status: readonly ProvisionerJobStatus[]; - readonly Tags: Record; + readonly Limit: number; + readonly IDs: readonly string[]; + readonly Status: readonly ProvisionerJobStatus[]; + readonly Tags: Record; } // From codersdk/idpsync.go export interface OrganizationSyncSettings { - readonly field: string; - readonly mapping: Record; - readonly organization_assign_default: boolean; + readonly field: string; + readonly mapping: Record; + readonly organization_assign_default: boolean; } // From codersdk/organizations.go export interface PaginatedMembersRequest { - readonly limit?: number; - readonly offset?: number; + readonly limit?: number; + readonly offset?: number; } // From codersdk/organizations.go export interface PaginatedMembersResponse { - readonly members: readonly OrganizationMemberWithUserData[]; - readonly count: number; + readonly members: readonly OrganizationMemberWithUserData[]; + readonly count: number; } // From codersdk/pagination.go export interface Pagination { - readonly after_id?: string; - readonly limit?: number; - readonly offset?: number; + readonly after_id?: string; + readonly limit?: number; + readonly offset?: number; } // From codersdk/parameters.go -export type ParameterFormType = "checkbox" | "" | "dropdown" | "error" | "input" | "multi-select" | "radio" | "slider" | "switch" | "tag-select" | "textarea"; - -export const ParameterFormTypes: ParameterFormType[] = ["checkbox", "", "dropdown", "error", "input", "multi-select", "radio", "slider", "switch", "tag-select", "textarea"]; +export type ParameterFormType = + | "checkbox" + | "" + | "dropdown" + | "error" + | "input" + | "multi-select" + | "radio" + | "slider" + | "switch" + | "tag-select" + | "textarea"; + +export const ParameterFormTypes: ParameterFormType[] = [ + "checkbox", + "", + "dropdown", + "error", + "input", + "multi-select", + "radio", + "slider", + "switch", + "tag-select", + "textarea", +]; // From codersdk/idpsync.go export interface PatchGroupIDPSyncConfigRequest { - readonly field: string; - readonly regex_filter: string | null; - readonly auto_create_missing_groups: boolean; + readonly field: string; + readonly regex_filter: string | null; + readonly auto_create_missing_groups: boolean; } // From codersdk/idpsync.go export interface PatchGroupIDPSyncMappingRequest { - readonly Add: readonly IDPSyncMapping[]; - readonly Remove: readonly IDPSyncMapping[]; + readonly Add: readonly IDPSyncMapping[]; + readonly Remove: readonly IDPSyncMapping[]; } // From codersdk/groups.go export interface PatchGroupRequest { - readonly add_users: readonly string[]; - readonly remove_users: readonly string[]; - readonly name: string; - readonly display_name: string | null; - readonly avatar_url: string | null; - readonly quota_allowance: number | null; + readonly add_users: readonly string[]; + readonly remove_users: readonly string[]; + readonly name: string; + readonly display_name: string | null; + readonly avatar_url: string | null; + readonly quota_allowance: number | null; } // From codersdk/idpsync.go export interface PatchOrganizationIDPSyncConfigRequest { - readonly field: string; - readonly assign_default: boolean; + readonly field: string; + readonly assign_default: boolean; } // From codersdk/idpsync.go export interface PatchOrganizationIDPSyncMappingRequest { - readonly Add: readonly IDPSyncMapping[]; - readonly Remove: readonly IDPSyncMapping[]; + readonly Add: readonly IDPSyncMapping[]; + readonly Remove: readonly IDPSyncMapping[]; } // From codersdk/idpsync.go export interface PatchRoleIDPSyncConfigRequest { - readonly field: string; + readonly field: string; } // From codersdk/idpsync.go export interface PatchRoleIDPSyncMappingRequest { - readonly Add: readonly IDPSyncMapping[]; - readonly Remove: readonly IDPSyncMapping[]; + readonly Add: readonly IDPSyncMapping[]; + readonly Remove: readonly IDPSyncMapping[]; } // From codersdk/templateversions.go export interface PatchTemplateVersionRequest { - readonly name: string; - readonly message?: string; + readonly name: string; + readonly message?: 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; + readonly id: string; + readonly name: string; + readonly display_name: string; + readonly icon: string; + readonly regenerate_token: boolean; } // From codersdk/client.go @@ -1557,22 +1781,22 @@ export const PathAppSessionTokenCookie = "coder_path_app_session_token"; // From codersdk/roles.go export interface Permission { - readonly negate: boolean; - readonly resource_type: RBACResource; - readonly action: RBACAction; + readonly negate: boolean; + readonly resource_type: RBACResource; + readonly action: RBACAction; } // From codersdk/oauth2.go export interface PostOAuth2ProviderAppRequest { - readonly name: string; - readonly callback_url: string; - readonly icon: string; + readonly name: string; + readonly callback_url: string; + readonly icon: string; } // From codersdk/workspaces.go export interface PostWorkspaceUsageRequest { - readonly agent_id: string; - readonly app_name: UsageAppName; + readonly agent_id: string; + readonly app_name: UsageAppName; } // From codersdk/deployment.go @@ -1582,123 +1806,123 @@ export const PostgresAuths: PostgresAuth[] = ["awsiamrds", "password"]; // From codersdk/deployment.go export interface PprofConfig { - readonly enable: boolean; - readonly address: string; + readonly enable: boolean; + readonly address: string; } // From codersdk/deployment.go export interface PrebuildsConfig { - readonly reconciliation_interval: number; - readonly reconciliation_backoff_interval: number; - readonly reconciliation_backoff_lookback: number; - readonly failure_hard_limit: number; + readonly reconciliation_interval: number; + readonly reconciliation_backoff_interval: number; + readonly reconciliation_backoff_lookback: number; + readonly failure_hard_limit: number; } // From codersdk/presets.go export interface Preset { - readonly ID: string; - readonly Name: string; - readonly Parameters: readonly PresetParameter[]; + readonly ID: string; + readonly Name: string; + readonly Parameters: readonly PresetParameter[]; } // From codersdk/presets.go export interface PresetParameter { - readonly Name: string; - readonly Value: string; + readonly Name: string; + readonly Value: string; } // From codersdk/parameters.go export interface PreviewParameter extends PreviewParameterData { - readonly value: NullHCLString; - readonly diagnostics: readonly FriendlyDiagnostic[]; + readonly value: NullHCLString; + readonly diagnostics: readonly FriendlyDiagnostic[]; } // From codersdk/parameters.go export interface PreviewParameterData { - readonly name: string; - readonly display_name: string; - readonly description: string; - readonly type: OptionType; - readonly form_type: ParameterFormType; - readonly styling: PreviewParameterStyling; - readonly mutable: boolean; - readonly default_value: NullHCLString; - readonly icon: string; - readonly options: readonly PreviewParameterOption[]; - readonly validations: readonly PreviewParameterValidation[]; - readonly required: boolean; - readonly order: number; - readonly ephemeral: boolean; + readonly name: string; + readonly display_name: string; + readonly description: string; + readonly type: OptionType; + readonly form_type: ParameterFormType; + readonly styling: PreviewParameterStyling; + readonly mutable: boolean; + readonly default_value: NullHCLString; + readonly icon: string; + readonly options: readonly PreviewParameterOption[]; + readonly validations: readonly PreviewParameterValidation[]; + readonly required: boolean; + readonly order: number; + readonly ephemeral: boolean; } // From codersdk/parameters.go export interface PreviewParameterOption { - readonly name: string; - readonly description: string; - readonly value: NullHCLString; - readonly icon: string; + readonly name: string; + readonly description: string; + readonly value: NullHCLString; + readonly icon: string; } // From codersdk/parameters.go export interface PreviewParameterStyling { - readonly placeholder?: string; - readonly disabled?: boolean; - readonly label?: string; + readonly placeholder?: string; + readonly disabled?: boolean; + readonly label?: string; } // From codersdk/parameters.go export interface PreviewParameterValidation { - readonly validation_error: string; - readonly validation_regex: string | null; - readonly validation_min: number | null; - readonly validation_max: number | null; - readonly validation_monotonic: string | null; + readonly validation_error: string; + readonly validation_regex: string | null; + readonly validation_min: number | null; + readonly validation_max: number | null; + readonly validation_monotonic: string | null; } // From codersdk/deployment.go export interface PrometheusConfig { - readonly enable: boolean; - readonly address: string; - readonly collect_agent_stats: boolean; - readonly collect_db_metrics: boolean; - readonly aggregate_agent_stats_by: string; + readonly enable: boolean; + readonly address: string; + readonly collect_agent_stats: boolean; + readonly collect_db_metrics: boolean; + readonly aggregate_agent_stats_by: string; } // From codersdk/deployment.go export interface ProvisionerConfig { - readonly daemons: number; - readonly daemon_types: string; - readonly daemon_poll_interval: number; - readonly daemon_poll_jitter: number; - readonly force_cancel_interval: number; - readonly daemon_psk: string; + readonly daemons: number; + readonly daemon_types: string; + readonly daemon_poll_interval: number; + readonly daemon_poll_jitter: number; + readonly force_cancel_interval: number; + readonly daemon_psk: string; } // From codersdk/provisionerdaemons.go export interface ProvisionerDaemon { - readonly id: string; - readonly organization_id: string; - readonly key_id: string; - readonly created_at: string; - readonly last_seen_at?: string; - readonly name: string; - readonly version: string; - readonly api_version: string; - readonly provisioners: readonly ProvisionerType[]; - readonly tags: Record; - readonly key_name: string | null; - readonly status: ProvisionerDaemonStatus | null; - readonly current_job: ProvisionerDaemonJob | null; - readonly previous_job: ProvisionerDaemonJob | null; + readonly id: string; + readonly organization_id: string; + readonly key_id: string; + readonly created_at: string; + readonly last_seen_at?: string; + readonly name: string; + readonly version: string; + readonly api_version: string; + readonly provisioners: readonly ProvisionerType[]; + readonly tags: Record; + readonly key_name: string | null; + readonly status: ProvisionerDaemonStatus | null; + readonly current_job: ProvisionerDaemonJob | null; + readonly previous_job: ProvisionerDaemonJob | null; } // From codersdk/provisionerdaemons.go export interface ProvisionerDaemonJob { - readonly id: string; - readonly status: ProvisionerJobStatus; - readonly template_name: string; - readonly template_icon: string; - readonly template_display_name: string; + readonly id: string; + readonly status: ProvisionerJobStatus; + readonly template_name: string; + readonly template_icon: string; + readonly template_display_name: string; } // From codersdk/client.go @@ -1710,93 +1934,119 @@ export const ProvisionerDaemonPSK = "Coder-Provisioner-Daemon-PSK"; // From codersdk/provisionerdaemons.go export type ProvisionerDaemonStatus = "busy" | "idle" | "offline"; -export const ProvisionerDaemonStatuses: ProvisionerDaemonStatus[] = ["busy", "idle", "offline"]; +export const ProvisionerDaemonStatuses: ProvisionerDaemonStatus[] = [ + "busy", + "idle", + "offline", +]; // From healthsdk/healthsdk.go export interface ProvisionerDaemonsReport extends BaseReport { - readonly items: readonly ProvisionerDaemonsReportItem[]; + readonly items: readonly ProvisionerDaemonsReportItem[]; } // From healthsdk/healthsdk.go export interface ProvisionerDaemonsReportItem { - readonly provisioner_daemon: ProvisionerDaemon; - readonly warnings: readonly HealthMessage[]; + readonly provisioner_daemon: ProvisionerDaemon; + readonly warnings: readonly HealthMessage[]; } // 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 worker_name?: string; - readonly file_id: string; - readonly tags: Record; - readonly queue_position: number; - readonly queue_size: number; - readonly organization_id: string; - readonly input: ProvisionerJobInput; - readonly type: ProvisionerJobType; - readonly available_workers?: readonly string[]; - readonly metadata: ProvisionerJobMetadata; + 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 worker_name?: string; + readonly file_id: string; + readonly tags: Record; + readonly queue_position: number; + readonly queue_size: number; + readonly organization_id: string; + readonly input: ProvisionerJobInput; + readonly type: ProvisionerJobType; + readonly available_workers?: readonly string[]; + readonly metadata: ProvisionerJobMetadata; } // From codersdk/provisionerdaemons.go export interface ProvisionerJobInput { - readonly template_version_id?: string; - readonly workspace_build_id?: string; - readonly error?: string; + readonly template_version_id?: string; + readonly workspace_build_id?: string; + readonly error?: 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; + readonly id: number; + readonly created_at: string; + readonly log_source: LogSource; + readonly log_level: LogLevel; + readonly stage: string; + readonly output: string; } // From codersdk/provisionerdaemons.go export interface ProvisionerJobMetadata { - readonly template_version_name: string; - readonly template_id: string; - readonly template_name: string; - readonly template_display_name: string; - readonly template_icon: string; - readonly workspace_id?: string; - readonly workspace_name?: string; + readonly template_version_name: string; + readonly template_id: string; + readonly template_name: string; + readonly template_display_name: string; + readonly template_icon: string; + readonly workspace_id?: string; + readonly workspace_name?: string; } // From codersdk/provisionerdaemons.go -export type ProvisionerJobStatus = "canceled" | "canceling" | "failed" | "pending" | "running" | "succeeded" | "unknown"; - -export const ProvisionerJobStatuses: ProvisionerJobStatus[] = ["canceled", "canceling", "failed", "pending", "running", "succeeded", "unknown"]; +export type ProvisionerJobStatus = + | "canceled" + | "canceling" + | "failed" + | "pending" + | "running" + | "succeeded" + | "unknown"; + +export const ProvisionerJobStatuses: ProvisionerJobStatus[] = [ + "canceled", + "canceling", + "failed", + "pending", + "running", + "succeeded", + "unknown", +]; // From codersdk/provisionerdaemons.go -export type ProvisionerJobType = "template_version_dry_run" | "template_version_import" | "workspace_build"; +export type ProvisionerJobType = + | "template_version_dry_run" + | "template_version_import" + | "workspace_build"; -export const ProvisionerJobTypes: ProvisionerJobType[] = ["template_version_dry_run", "template_version_import", "workspace_build"]; +export const ProvisionerJobTypes: ProvisionerJobType[] = [ + "template_version_dry_run", + "template_version_import", + "workspace_build", +]; // From codersdk/provisionerdaemons.go export interface ProvisionerKey { - readonly id: string; - readonly created_at: string; - readonly organization: string; - readonly name: string; - readonly tags: ProvisionerKeyTags; + readonly id: string; + readonly created_at: string; + readonly organization: string; + readonly name: string; + readonly tags: ProvisionerKeyTags; } // From codersdk/provisionerdaemons.go export interface ProvisionerKeyDaemons { - readonly key: ProvisionerKey; - readonly daemons: readonly ProvisionerDaemon[]; + readonly key: ProvisionerKey; + readonly daemons: readonly ProvisionerDaemon[]; } // From codersdk/provisionerdaemons.go @@ -1832,13 +2082,13 @@ export const ProvisionerStorageMethods: ProvisionerStorageMethod[] = ["file"]; // From codersdk/workspacebuilds.go export interface ProvisionerTiming { - readonly job_id: string; - readonly started_at: string; - readonly ended_at: string; - readonly stage: TimingStage; - readonly source: string; - readonly action: string; - readonly resource: string; + readonly job_id: string; + readonly started_at: string; + readonly ended_at: string; + readonly stage: TimingStage; + readonly source: string; + readonly action: string; + readonly resource: string; } // From codersdk/organizations.go @@ -1848,64 +2098,181 @@ export const ProvisionerTypes: ProvisionerType[] = ["echo", "terraform"]; // From codersdk/workspaceproxy.go export interface ProxyHealthReport { - readonly errors: readonly string[]; - readonly warnings: readonly string[]; + readonly errors: readonly string[]; + readonly warnings: readonly string[]; } // From codersdk/workspaceproxy.go -export type ProxyHealthStatus = "ok" | "unhealthy" | "unreachable" | "unregistered"; - -export const ProxyHealthStatuses: ProxyHealthStatus[] = ["ok", "unhealthy", "unreachable", "unregistered"]; +export type ProxyHealthStatus = + | "ok" + | "unhealthy" + | "unreachable" + | "unregistered"; + +export const ProxyHealthStatuses: ProxyHealthStatus[] = [ + "ok", + "unhealthy", + "unreachable", + "unregistered", +]; // From codersdk/workspaces.go export interface PutExtendWorkspaceRequest { - readonly deadline: string; + readonly deadline: string; } // From codersdk/oauth2.go export interface PutOAuth2ProviderAppRequest { - readonly name: string; - readonly callback_url: string; - readonly icon: string; + readonly name: string; + readonly callback_url: string; + readonly icon: string; } // From codersdk/rbacresources_gen.go -export type RBACAction = "application_connect" | "assign" | "create" | "create_agent" | "delete" | "delete_agent" | "read" | "read_personal" | "ssh" | "unassign" | "update" | "update_personal" | "use" | "view_insights" | "start" | "stop"; - -export const RBACActions: RBACAction[] = ["application_connect", "assign", "create", "create_agent", "delete", "delete_agent", "read", "read_personal", "ssh", "unassign", "update", "update_personal", "use", "view_insights", "start", "stop"]; +export type RBACAction = + | "application_connect" + | "assign" + | "create" + | "create_agent" + | "delete" + | "delete_agent" + | "read" + | "read_personal" + | "ssh" + | "unassign" + | "update" + | "update_personal" + | "use" + | "view_insights" + | "start" + | "stop"; + +export const RBACActions: RBACAction[] = [ + "application_connect", + "assign", + "create", + "create_agent", + "delete", + "delete_agent", + "read", + "read_personal", + "ssh", + "unassign", + "update", + "update_personal", + "use", + "view_insights", + "start", + "stop", +]; // From codersdk/rbacresources_gen.go -export type RBACResource = "api_key" | "assign_org_role" | "assign_role" | "audit_log" | "chat" | "crypto_key" | "debug_info" | "deployment_config" | "deployment_stats" | "file" | "group" | "group_member" | "idpsync_settings" | "inbox_notification" | "license" | "notification_message" | "notification_preference" | "notification_template" | "oauth2_app" | "oauth2_app_code_token" | "oauth2_app_secret" | "organization" | "organization_member" | "provisioner_daemon" | "provisioner_jobs" | "replicas" | "system" | "tailnet_coordinator" | "template" | "user" | "webpush_subscription" | "*" | "workspace" | "workspace_agent_devcontainers" | "workspace_agent_resource_monitor" | "workspace_dormant" | "workspace_proxy"; - -export const RBACResources: RBACResource[] = ["api_key", "assign_org_role", "assign_role", "audit_log", "chat", "crypto_key", "debug_info", "deployment_config", "deployment_stats", "file", "group", "group_member", "idpsync_settings", "inbox_notification", "license", "notification_message", "notification_preference", "notification_template", "oauth2_app", "oauth2_app_code_token", "oauth2_app_secret", "organization", "organization_member", "provisioner_daemon", "provisioner_jobs", "replicas", "system", "tailnet_coordinator", "template", "user", "webpush_subscription", "*", "workspace", "workspace_agent_devcontainers", "workspace_agent_resource_monitor", "workspace_dormant", "workspace_proxy"]; +export type RBACResource = + | "api_key" + | "assign_org_role" + | "assign_role" + | "audit_log" + | "chat" + | "crypto_key" + | "debug_info" + | "deployment_config" + | "deployment_stats" + | "file" + | "group" + | "group_member" + | "idpsync_settings" + | "inbox_notification" + | "license" + | "notification_message" + | "notification_preference" + | "notification_template" + | "oauth2_app" + | "oauth2_app_code_token" + | "oauth2_app_secret" + | "organization" + | "organization_member" + | "provisioner_daemon" + | "provisioner_jobs" + | "replicas" + | "system" + | "tailnet_coordinator" + | "template" + | "user" + | "webpush_subscription" + | "*" + | "workspace" + | "workspace_agent_devcontainers" + | "workspace_agent_resource_monitor" + | "workspace_dormant" + | "workspace_proxy"; + +export const RBACResources: RBACResource[] = [ + "api_key", + "assign_org_role", + "assign_role", + "audit_log", + "chat", + "crypto_key", + "debug_info", + "deployment_config", + "deployment_stats", + "file", + "group", + "group_member", + "idpsync_settings", + "inbox_notification", + "license", + "notification_message", + "notification_preference", + "notification_template", + "oauth2_app", + "oauth2_app_code_token", + "oauth2_app_secret", + "organization", + "organization_member", + "provisioner_daemon", + "provisioner_jobs", + "replicas", + "system", + "tailnet_coordinator", + "template", + "user", + "webpush_subscription", + "*", + "workspace", + "workspace_agent_devcontainers", + "workspace_agent_resource_monitor", + "workspace_dormant", + "workspace_proxy", +]; // From codersdk/deployment.go export interface RateLimitConfig { - readonly disable_all: boolean; - readonly api: number; + readonly disable_all: boolean; + readonly api: number; } // From codersdk/users.go export interface ReducedUser extends MinimalUser { - readonly name?: string; - readonly email: string; - readonly created_at: string; - readonly updated_at: string; - readonly last_seen_at?: string; - readonly status: UserStatus; - readonly login_type: LoginType; - readonly theme_preference?: string; + readonly name?: string; + readonly email: string; + readonly created_at: string; + readonly updated_at: string; + readonly last_seen_at?: string; + readonly status: UserStatus; + readonly login_type: LoginType; + readonly theme_preference?: string; } // 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; + 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 @@ -1913,50 +2280,99 @@ export type RegionTypes = Region | WorkspaceProxy; // From codersdk/workspaceproxy.go export interface RegionsResponse { - readonly regions: readonly R[]; + readonly regions: readonly R[]; } // 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; + 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/users.go export interface RequestOneTimePasscodeRequest { - readonly email: string; + readonly email: string; } // From codersdk/workspaces.go export interface ResolveAutostartResponse { - readonly parameter_mismatch: boolean; + readonly parameter_mismatch: boolean; } // From codersdk/audit.go -export type ResourceType = "api_key" | "convert_login" | "custom_role" | "git_ssh_key" | "group" | "health_settings" | "idp_sync_settings_group" | "idp_sync_settings_organization" | "idp_sync_settings_role" | "license" | "notification_template" | "notifications_settings" | "oauth2_provider_app" | "oauth2_provider_app_secret" | "organization" | "organization_member" | "template" | "template_version" | "user" | "workspace" | "workspace_agent" | "workspace_app" | "workspace_build" | "workspace_proxy"; - -export const ResourceTypes: ResourceType[] = ["api_key", "convert_login", "custom_role", "git_ssh_key", "group", "health_settings", "idp_sync_settings_group", "idp_sync_settings_organization", "idp_sync_settings_role", "license", "notification_template", "notifications_settings", "oauth2_provider_app", "oauth2_provider_app_secret", "organization", "organization_member", "template", "template_version", "user", "workspace", "workspace_agent", "workspace_app", "workspace_build", "workspace_proxy"]; +export type ResourceType = + | "api_key" + | "convert_login" + | "custom_role" + | "git_ssh_key" + | "group" + | "health_settings" + | "idp_sync_settings_group" + | "idp_sync_settings_organization" + | "idp_sync_settings_role" + | "license" + | "notification_template" + | "notifications_settings" + | "oauth2_provider_app" + | "oauth2_provider_app_secret" + | "organization" + | "organization_member" + | "template" + | "template_version" + | "user" + | "workspace" + | "workspace_agent" + | "workspace_app" + | "workspace_build" + | "workspace_proxy"; + +export const ResourceTypes: ResourceType[] = [ + "api_key", + "convert_login", + "custom_role", + "git_ssh_key", + "group", + "health_settings", + "idp_sync_settings_group", + "idp_sync_settings_organization", + "idp_sync_settings_role", + "license", + "notification_template", + "notifications_settings", + "oauth2_provider_app", + "oauth2_provider_app_secret", + "organization", + "organization_member", + "template", + "template_version", + "user", + "workspace", + "workspace_agent", + "workspace_app", + "workspace_build", + "workspace_proxy", +]; // From codersdk/client.go export interface Response { - readonly message: string; - readonly detail?: string; - readonly validations?: readonly ValidationError[]; + readonly message: string; + readonly detail?: string; + readonly validations?: readonly ValidationError[]; } // From codersdk/roles.go export interface Role { - readonly name: string; - readonly organization_id?: string; - readonly display_name: string; - readonly site_permissions: readonly Permission[]; - readonly organization_permissions: readonly Permission[]; - readonly user_permissions: readonly Permission[]; + readonly name: string; + readonly organization_id?: string; + readonly display_name: string; + readonly site_permissions: readonly Permission[]; + readonly organization_permissions: readonly Permission[]; + readonly user_permissions: readonly Permission[]; } // From codersdk/rbacroles.go @@ -1981,15 +2397,16 @@ export const RoleOrganizationTemplateAdmin = "organization-template-admin"; export const RoleOrganizationUserAdmin = "organization-user-admin"; // From codersdk/rbacroles.go -export const RoleOrganizationWorkspaceCreationBan = "organization-workspace-creation-ban"; +export const RoleOrganizationWorkspaceCreationBan = + "organization-workspace-creation-ban"; // From codersdk/rbacroles.go export const RoleOwner = "owner"; // From codersdk/idpsync.go export interface RoleSyncSettings { - readonly field: string; - readonly mapping: Record; + readonly field: string; + readonly mapping: Record; } // From codersdk/rbacroles.go @@ -2000,22 +2417,22 @@ export const RoleUserAdmin = "user-admin"; // From codersdk/deployment.go export interface SSHConfig { - readonly DeploymentName: string; - readonly SSHConfigOptions: string; + readonly DeploymentName: string; + readonly SSHConfigOptions: string; } // From codersdk/deployment.go export interface SSHConfigResponse { - readonly hostname_prefix: string; - readonly hostname_suffix: string; - readonly ssh_config_options: Record; + readonly hostname_prefix: string; + readonly hostname_suffix: string; + readonly ssh_config_options: Record; } // From healthsdk/healthsdk.go export interface STUNReport { - readonly Enabled: boolean; - readonly CanSTUN: boolean; - readonly Error: string | null; + readonly Enabled: boolean; + readonly CanSTUN: boolean; + readonly Error: string | null; } // From serpent/serpent.go @@ -2023,30 +2440,30 @@ export type SerpentAnnotations = Record; // From serpent/serpent.go export interface SerpentGroup { - readonly parent?: SerpentGroup; - readonly name?: string; - readonly yaml?: string; - readonly description?: string; + readonly parent?: SerpentGroup; + readonly name?: string; + readonly yaml?: string; + readonly description?: string; } // From serpent/option.go export interface SerpentOption { - readonly name?: string; - readonly description?: string; - readonly required?: boolean; - readonly flag?: string; - readonly flag_shorthand?: string; - readonly env?: string; - readonly yaml?: string; - readonly default?: string; - // interface type, falling back to unknown - // this is likely an enum in an external package "github.com/spf13/pflag.Value" - readonly value?: unknown; - readonly annotations?: SerpentAnnotations; - readonly group?: SerpentGroup; - readonly use_instead?: readonly SerpentOption[]; - readonly hidden?: boolean; - readonly value_source?: SerpentValueSource; + readonly name?: string; + readonly description?: string; + readonly required?: boolean; + readonly flag?: string; + readonly flag_shorthand?: string; + readonly env?: string; + readonly yaml?: string; + readonly default?: string; + // interface type, falling back to unknown + // this is likely an enum in an external package "github.com/spf13/pflag.Value" + readonly value?: unknown; + readonly annotations?: SerpentAnnotations; + readonly group?: SerpentGroup; + readonly use_instead?: readonly SerpentOption[]; + readonly hidden?: boolean; + readonly value_source?: SerpentValueSource; } // From serpent/option.go @@ -2060,44 +2477,48 @@ export type SerpentValueSource = string; // From derp/derp_client.go export interface ServerInfoMessage { - readonly TokenBucketBytesPerSecond: number; - readonly TokenBucketBytesBurst: number; + readonly TokenBucketBytesPerSecond: number; + readonly TokenBucketBytesBurst: number; } // From codersdk/serversentevents.go export interface ServerSentEvent { - readonly type: ServerSentEventType; - // empty interface{} type, falling back to unknown - readonly data: unknown; + readonly type: ServerSentEventType; + // empty interface{} type, falling back to unknown + readonly data: unknown; } // From codersdk/serversentevents.go export type ServerSentEventType = "data" | "error" | "ping"; -export const ServerSentEventTypes: ServerSentEventType[] = ["data", "error", "ping"]; +export const ServerSentEventTypes: ServerSentEventType[] = [ + "data", + "error", + "ping", +]; // From codersdk/deployment.go export interface ServiceBannerConfig { - readonly enabled: boolean; - readonly message?: string; - readonly background_color?: string; + 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; + readonly vscode: number; + readonly ssh: number; + readonly jetbrains: number; + readonly reconnecting_pty: number; } // From codersdk/deployment.go export interface SessionLifetime { - readonly disable_expiry_refresh?: boolean; - readonly default_duration: number; - readonly default_token_lifetime?: number; - readonly max_token_lifetime?: number; - readonly max_admin_token_lifetime?: number; + readonly disable_expiry_refresh?: boolean; + readonly default_duration: number; + readonly default_token_lifetime?: number; + readonly max_token_lifetime?: number; + readonly max_admin_token_lifetime?: number; } // From codersdk/client.go @@ -2114,125 +2535,126 @@ export const SignedAppTokenQueryParameter = "coder_signed_app_token_23db1dde"; // From codersdk/roles.go export interface SlimRole { - readonly name: string; - readonly display_name: string; - readonly organization_id?: string; + readonly name: string; + readonly display_name: string; + readonly organization_id?: string; } // From codersdk/client.go -export const SubdomainAppSessionTokenCookie = "coder_subdomain_app_session_token"; +export const SubdomainAppSessionTokenCookie = + "coder_subdomain_app_session_token"; // From codersdk/deployment.go export interface SupportConfig { - readonly links: SerpentStruct; + readonly links: SerpentStruct; } // From codersdk/deployment.go export interface SwaggerConfig { - readonly enable: boolean; + readonly enable: boolean; } // From codersdk/deployment.go export interface TLSConfig { - readonly enable: boolean; - readonly address: string; - readonly redirect_http: boolean; - readonly cert_file: string; - readonly client_auth: string; - readonly client_ca_file: string; - readonly key_file: string; - readonly min_version: string; - readonly client_cert_file: string; - readonly client_key_file: string; - readonly supported_ciphers: string; - readonly allow_insecure_ciphers: boolean; + readonly enable: boolean; + readonly address: string; + readonly redirect_http: boolean; + readonly cert_file: string; + readonly client_auth: string; + readonly client_ca_file: string; + readonly key_file: string; + readonly min_version: string; + readonly client_cert_file: string; + readonly client_key_file: string; + readonly supported_ciphers: string; + readonly allow_insecure_ciphers: boolean; } // From tailcfg/derpmap.go export interface TailDERPNode { - readonly Name: string; - readonly RegionID: number; - readonly HostName: string; - readonly CertName?: string; - readonly IPv4?: string; - readonly IPv6?: string; - readonly STUNPort?: number; - readonly STUNOnly?: boolean; - readonly DERPPort?: number; - readonly InsecureForTests?: boolean; - readonly ForceHTTP?: boolean; - readonly STUNTestIP?: string; - readonly CanPort80?: boolean; + readonly Name: string; + readonly RegionID: number; + readonly HostName: string; + readonly CertName?: string; + readonly IPv4?: string; + readonly IPv6?: string; + readonly STUNPort?: number; + readonly STUNOnly?: boolean; + readonly DERPPort?: number; + readonly InsecureForTests?: boolean; + readonly ForceHTTP?: boolean; + readonly STUNTestIP?: string; + readonly CanPort80?: boolean; } // From tailcfg/derpmap.go export interface TailDERPRegion { - readonly EmbeddedRelay: boolean; - readonly RegionID: number; - readonly RegionCode: string; - readonly RegionName: string; - readonly Avoid?: boolean; - readonly Nodes: readonly (TailDERPNode)[]; + readonly EmbeddedRelay: boolean; + readonly RegionID: number; + readonly RegionCode: string; + readonly RegionName: string; + readonly Avoid?: boolean; + readonly Nodes: readonly TailDERPNode[]; } // From codersdk/deployment.go export interface TelemetryConfig { - readonly enable: boolean; - readonly trace: boolean; - readonly url: string; + 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 organization_name: string; - readonly organization_display_name: string; - readonly organization_icon: 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; - readonly description: string; - readonly deprecated: boolean; - readonly deprecation_message: string; - readonly icon: string; - readonly default_ttl_ms: number; - readonly activity_bump_ms: number; - readonly autostop_requirement: TemplateAutostopRequirement; - readonly autostart_requirement: TemplateAutostartRequirement; - 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 time_til_dormant_ms: number; - readonly time_til_dormant_autodelete_ms: number; - readonly require_active_version: boolean; - readonly max_port_share_level: WorkspaceAgentPortShareLevel; - readonly use_classic_parameter_flow: boolean; + readonly id: string; + readonly created_at: string; + readonly updated_at: string; + readonly organization_id: string; + readonly organization_name: string; + readonly organization_display_name: string; + readonly organization_icon: 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; + readonly description: string; + readonly deprecated: boolean; + readonly deprecation_message: string; + readonly icon: string; + readonly default_ttl_ms: number; + readonly activity_bump_ms: number; + readonly autostop_requirement: TemplateAutostopRequirement; + readonly autostart_requirement: TemplateAutostartRequirement; + 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 time_til_dormant_ms: number; + readonly time_til_dormant_autodelete_ms: number; + readonly require_active_version: boolean; + readonly max_port_share_level: WorkspaceAgentPortShareLevel; + readonly use_classic_parameter_flow: boolean; } // From codersdk/templates.go export interface TemplateACL { - readonly users: readonly TemplateUser[]; - readonly group: readonly TemplateGroup[]; + readonly users: readonly TemplateUser[]; + readonly group: readonly TemplateGroup[]; } // From codersdk/insights.go export interface TemplateAppUsage { - readonly template_ids: readonly string[]; - readonly type: TemplateAppsType; - readonly display_name: string; - readonly slug: string; - readonly icon: string; - readonly seconds: number; - readonly times_used: number; + readonly template_ids: readonly string[]; + readonly type: TemplateAppsType; + readonly display_name: string; + readonly slug: string; + readonly icon: string; + readonly seconds: number; + readonly times_used: number; } // From codersdk/insights.go @@ -2242,17 +2664,20 @@ export const TemplateAppsTypes: TemplateAppsType[] = ["app", "builtin"]; // From codersdk/templates.go export interface TemplateAutostartRequirement { - readonly days_of_week: readonly string[]; + readonly days_of_week: readonly string[]; } // From codersdk/templates.go export interface TemplateAutostopRequirement { - readonly days_of_week: readonly string[]; - readonly weeks: number; + readonly days_of_week: readonly string[]; + readonly weeks: number; } // From codersdk/templates.go -export type TemplateBuildTimeStats = Record; +export type TemplateBuildTimeStats = Record< + WorkspaceTransition, + TransitionStats +>; // From codersdk/insights.go export const TemplateBuiltinAppDisplayNameJetBrains = "JetBrains"; @@ -2271,79 +2696,82 @@ export const TemplateBuiltinAppDisplayNameWebTerminal = "Web Terminal"; // From codersdk/templates.go export interface TemplateExample { - readonly id: string; - readonly url: string; - readonly name: string; - readonly description: string; - readonly icon: string; - readonly tags: readonly string[]; - readonly markdown: string; + readonly id: string; + readonly url: string; + readonly name: string; + readonly description: string; + readonly icon: string; + readonly tags: readonly string[]; + readonly markdown: string; } // From codersdk/organizations.go export interface TemplateFilter { - readonly q?: string; + readonly q?: string; } // From codersdk/templates.go export interface TemplateGroup extends Group { - readonly role: TemplateRole; + readonly role: TemplateRole; } // From codersdk/insights.go export interface TemplateInsightsIntervalReport { - readonly start_time: string; - readonly end_time: string; - readonly template_ids: readonly string[]; - readonly interval: InsightsReportInterval; - readonly active_users: number; + readonly start_time: string; + readonly end_time: string; + readonly template_ids: readonly string[]; + readonly interval: InsightsReportInterval; + readonly active_users: number; } // From codersdk/insights.go export interface TemplateInsightsReport { - readonly start_time: string; - readonly end_time: string; - readonly template_ids: readonly string[]; - readonly active_users: number; - readonly apps_usage: readonly TemplateAppUsage[]; - readonly parameters_usage: readonly TemplateParameterUsage[]; + readonly start_time: string; + readonly end_time: string; + readonly template_ids: readonly string[]; + readonly active_users: number; + readonly apps_usage: readonly TemplateAppUsage[]; + readonly parameters_usage: readonly TemplateParameterUsage[]; } // From codersdk/insights.go export interface TemplateInsightsRequest { - readonly start_time: string; - readonly end_time: string; - readonly template_ids: readonly string[]; - readonly interval: InsightsReportInterval; - readonly sections: readonly TemplateInsightsSection[]; + readonly start_time: string; + readonly end_time: string; + readonly template_ids: readonly string[]; + readonly interval: InsightsReportInterval; + readonly sections: readonly TemplateInsightsSection[]; } // From codersdk/insights.go export interface TemplateInsightsResponse { - readonly report?: TemplateInsightsReport; - readonly interval_reports?: readonly TemplateInsightsIntervalReport[]; + readonly report?: TemplateInsightsReport; + readonly interval_reports?: readonly TemplateInsightsIntervalReport[]; } // From codersdk/insights.go export type TemplateInsightsSection = "interval_reports" | "report"; -export const TemplateInsightsSections: TemplateInsightsSection[] = ["interval_reports", "report"]; +export const TemplateInsightsSections: TemplateInsightsSection[] = [ + "interval_reports", + "report", +]; // From codersdk/insights.go export interface TemplateParameterUsage { - readonly template_ids: readonly string[]; - readonly display_name: string; - readonly name: string; - readonly type: string; - readonly description: string; - readonly options?: readonly TemplateVersionParameterOption[]; - readonly values: readonly TemplateParameterValue[]; + readonly template_ids: readonly string[]; + readonly display_name: string; + readonly name: string; + readonly type: string; + readonly description: string; + readonly options?: readonly TemplateVersionParameterOption[]; + readonly values: readonly TemplateParameterValue[]; } // From codersdk/insights.go export interface TemplateParameterValue { - readonly value: string; - readonly count: number; + readonly value: string; + readonly count: number; } // From codersdk/templates.go @@ -2353,385 +2781,420 @@ export const TemplateRoles: TemplateRole[] = ["admin", "", "use"]; // From codersdk/templates.go export interface TemplateUser extends User { - readonly role: TemplateRole; + 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 message: string; - readonly job: ProvisionerJob; - readonly readme: string; - readonly created_by: MinimalUser; - readonly archived: boolean; - readonly warnings?: readonly TemplateVersionWarning[]; - readonly matched_provisioners?: MatchedProvisioners; + readonly id: string; + readonly template_id?: string; + readonly organization_id?: string; + readonly created_at: string; + readonly updated_at: string; + readonly name: string; + readonly message: string; + readonly job: ProvisionerJob; + readonly readme: string; + readonly created_by: MinimalUser; + readonly archived: boolean; + readonly warnings?: readonly TemplateVersionWarning[]; + readonly matched_provisioners?: MatchedProvisioners; } // From codersdk/templateversions.go export interface TemplateVersionExternalAuth { - readonly id: string; - readonly type: string; - readonly display_name: string; - readonly display_icon: string; - readonly authenticate_url: string; - readonly authenticated: boolean; - readonly optional?: boolean; + readonly id: string; + readonly type: string; + readonly display_name: string; + readonly display_icon: string; + readonly authenticate_url: string; + readonly authenticated: boolean; + readonly optional?: 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 form_type: string; - readonly mutable: boolean; - readonly default_value: string; - readonly icon: string; - readonly options: readonly 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 ephemeral: boolean; + readonly name: string; + readonly display_name?: string; + readonly description: string; + readonly description_plaintext: string; + readonly type: string; + readonly form_type: string; + readonly mutable: boolean; + readonly default_value: string; + readonly icon: string; + readonly options: readonly 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 ephemeral: boolean; } // From codersdk/templateversions.go export interface TemplateVersionParameterOption { - readonly name: string; - readonly description: string; - readonly value: string; - readonly icon: string; + 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; + readonly name: string; + readonly description: string; + readonly type: string; + readonly value: string; + readonly default_value: string; + readonly required: boolean; + readonly sensitive: boolean; } // From codersdk/templateversions.go export type TemplateVersionWarning = "UNSUPPORTED_WORKSPACES"; -export const TemplateVersionWarnings: TemplateVersionWarning[] = ["UNSUPPORTED_WORKSPACES"]; +export const TemplateVersionWarnings: TemplateVersionWarning[] = [ + "UNSUPPORTED_WORKSPACES", +]; // From codersdk/templates.go export interface TemplateVersionsByTemplateRequest extends Pagination { - readonly template_id: string; - readonly include_archived: boolean; + readonly template_id: string; + readonly include_archived: boolean; } // From codersdk/users.go -export type TerminalFontName = "fira-code" | "ibm-plex-mono" | "jetbrains-mono" | "source-code-pro" | ""; - -export const TerminalFontNames: TerminalFontName[] = ["fira-code", "ibm-plex-mono", "jetbrains-mono", "source-code-pro", ""]; +export type TerminalFontName = + | "fira-code" + | "ibm-plex-mono" + | "jetbrains-mono" + | "source-code-pro" + | ""; + +export const TerminalFontNames: TerminalFontName[] = [ + "fira-code", + "ibm-plex-mono", + "jetbrains-mono", + "source-code-pro", + "", +]; // From codersdk/workspacebuilds.go -export type TimingStage = "apply" | "connect" | "cron" | "graph" | "init" | "plan" | "start" | "stop"; - -export const TimingStages: TimingStage[] = ["apply", "connect", "cron", "graph", "init", "plan", "start", "stop"]; +export type TimingStage = + | "apply" + | "connect" + | "cron" + | "graph" + | "init" + | "plan" + | "start" + | "stop"; + +export const TimingStages: TimingStage[] = [ + "apply", + "connect", + "cron", + "graph", + "init", + "plan", + "start", + "stop", +]; // From codersdk/apikey.go export interface TokenConfig { - readonly max_token_lifetime: number; + readonly max_token_lifetime: number; } // From codersdk/apikey.go export interface TokensFilter { - readonly include_all: boolean; + readonly include_all: boolean; } // From codersdk/deployment.go export interface TraceConfig { - readonly enable: boolean; - readonly honeycomb_api_key: string; - readonly capture_logs: boolean; - readonly data_dog: boolean; + readonly enable: boolean; + readonly honeycomb_api_key: string; + readonly capture_logs: boolean; + readonly data_dog: boolean; } // From codersdk/templates.go export interface TransitionStats { - readonly P50: number | null; - readonly P95: number | null; + readonly P50: number | null; + readonly P95: number | null; } // From codersdk/templates.go export interface UpdateActiveTemplateVersion { - readonly id: string; + readonly id: string; } // From codersdk/deployment.go export interface UpdateAppearanceConfig { - readonly application_name: string; - readonly logo_url: string; - readonly service_banner: BannerConfig; - readonly announcement_banners: readonly BannerConfig[]; + readonly application_name: string; + readonly logo_url: string; + readonly service_banner: BannerConfig; + readonly announcement_banners: readonly BannerConfig[]; } // From codersdk/updatecheck.go export interface UpdateCheckResponse { - readonly current: boolean; - readonly version: string; - readonly url: string; + readonly current: boolean; + readonly version: string; + readonly url: string; } // From healthsdk/healthsdk.go export interface UpdateHealthSettings { - readonly dismissed_healthchecks: readonly HealthSection[]; + readonly dismissed_healthchecks: readonly HealthSection[]; } // From codersdk/inboxnotification.go export interface UpdateInboxNotificationReadStatusRequest { - readonly is_read: boolean; + readonly is_read: boolean; } // From codersdk/inboxnotification.go export interface UpdateInboxNotificationReadStatusResponse { - readonly notification: InboxNotification; - readonly unread_count: number; + readonly notification: InboxNotification; + readonly unread_count: number; } // From codersdk/notifications.go export interface UpdateNotificationTemplateMethod { - readonly method?: string; + readonly method?: string; } // From codersdk/organizations.go export interface UpdateOrganizationRequest { - readonly name?: string; - readonly display_name?: string; - readonly description?: string; - readonly icon?: string; + readonly name?: string; + readonly display_name?: string; + readonly description?: string; + readonly icon?: string; } // From codersdk/users.go export interface UpdateRoles { - readonly roles: readonly string[]; + readonly roles: readonly string[]; } // From codersdk/templates.go export interface UpdateTemplateACL { - readonly user_perms?: Record; - readonly group_perms?: Record; + readonly user_perms?: Record; + readonly group_perms?: Record; } // From codersdk/templates.go export interface UpdateTemplateMeta { - readonly name?: string; - readonly display_name?: string; - readonly description?: string; - readonly icon?: string; - readonly default_ttl_ms?: number; - readonly activity_bump_ms?: number; - readonly autostop_requirement?: TemplateAutostopRequirement; - readonly autostart_requirement?: TemplateAutostartRequirement; - readonly allow_user_autostart?: boolean; - readonly allow_user_autostop?: boolean; - readonly allow_user_cancel_workspace_jobs?: boolean; - readonly failure_ttl_ms?: number; - readonly time_til_dormant_ms?: number; - readonly time_til_dormant_autodelete_ms?: number; - readonly update_workspace_last_used_at: boolean; - readonly update_workspace_dormant_at: boolean; - readonly require_active_version?: boolean; - readonly deprecation_message?: string; - readonly disable_everyone_group_access: boolean; - readonly max_port_share_level?: WorkspaceAgentPortShareLevel; - readonly use_classic_parameter_flow?: boolean; + readonly name?: string; + readonly display_name?: string; + readonly description?: string; + readonly icon?: string; + readonly default_ttl_ms?: number; + readonly activity_bump_ms?: number; + readonly autostop_requirement?: TemplateAutostopRequirement; + readonly autostart_requirement?: TemplateAutostartRequirement; + readonly allow_user_autostart?: boolean; + readonly allow_user_autostop?: boolean; + readonly allow_user_cancel_workspace_jobs?: boolean; + readonly failure_ttl_ms?: number; + readonly time_til_dormant_ms?: number; + readonly time_til_dormant_autodelete_ms?: number; + readonly update_workspace_last_used_at: boolean; + readonly update_workspace_dormant_at: boolean; + readonly require_active_version?: boolean; + readonly deprecation_message?: string; + readonly disable_everyone_group_access: boolean; + readonly max_port_share_level?: WorkspaceAgentPortShareLevel; + readonly use_classic_parameter_flow?: boolean; } // From codersdk/users.go export interface UpdateUserAppearanceSettingsRequest { - readonly theme_preference: string; - readonly terminal_font: TerminalFontName; + readonly theme_preference: string; + readonly terminal_font: TerminalFontName; } // From codersdk/notifications.go export interface UpdateUserNotificationPreferences { - readonly template_disabled_map: Record; + readonly template_disabled_map: Record; } // From codersdk/users.go export interface UpdateUserPasswordRequest { - readonly old_password: string; - readonly password: string; + readonly old_password: string; + readonly password: string; } // From codersdk/users.go export interface UpdateUserProfileRequest { - readonly username: string; - readonly name: string; + readonly username: string; + readonly name: string; } // From codersdk/users.go export interface UpdateUserQuietHoursScheduleRequest { - readonly schedule: string; + readonly schedule: string; } // From codersdk/workspaces.go export interface UpdateWorkspaceAutomaticUpdatesRequest { - readonly automatic_updates: AutomaticUpdates; + readonly automatic_updates: AutomaticUpdates; } // From codersdk/workspaces.go export interface UpdateWorkspaceAutostartRequest { - readonly schedule?: string; + readonly schedule?: string; } // From codersdk/workspaces.go export interface UpdateWorkspaceDormancy { - readonly dormant: boolean; + readonly dormant: boolean; } // From codersdk/workspaceproxy.go export interface UpdateWorkspaceProxyResponse { - readonly proxy: WorkspaceProxy; - readonly proxy_token: string; + readonly proxy: WorkspaceProxy; + readonly proxy_token: string; } // From codersdk/workspaces.go export interface UpdateWorkspaceRequest { - readonly name?: string; + readonly name?: string; } // From codersdk/workspaces.go export interface UpdateWorkspaceTTLRequest { - readonly ttl_ms: number | null; + readonly ttl_ms: number | null; } // From codersdk/files.go export interface UploadResponse { - readonly hash: string; + readonly hash: string; } // From codersdk/workspaceagentportshare.go export interface UpsertWorkspaceAgentPortShareRequest { - readonly agent_name: string; - readonly port: number; - readonly share_level: WorkspaceAgentPortShareLevel; - readonly protocol: WorkspaceAgentPortShareProtocol; + readonly agent_name: string; + readonly port: number; + readonly share_level: WorkspaceAgentPortShareLevel; + readonly protocol: WorkspaceAgentPortShareProtocol; } // From codersdk/workspaces.go export type UsageAppName = "jetbrains" | "reconnecting-pty" | "ssh" | "vscode"; -export const UsageAppNames: UsageAppName[] = ["jetbrains", "reconnecting-pty", "ssh", "vscode"]; +export const UsageAppNames: UsageAppName[] = [ + "jetbrains", + "reconnecting-pty", + "ssh", + "vscode", +]; // From codersdk/users.go export interface User extends ReducedUser { - readonly organization_ids: readonly string[]; - readonly roles: readonly SlimRole[]; + readonly organization_ids: readonly string[]; + readonly roles: readonly SlimRole[]; } // From codersdk/insights.go export interface UserActivity { - readonly template_ids: readonly string[]; - readonly user_id: string; - readonly username: string; - readonly avatar_url: string; - readonly seconds: number; + readonly template_ids: readonly string[]; + readonly user_id: string; + readonly username: string; + readonly avatar_url: string; + readonly seconds: number; } // From codersdk/insights.go export interface UserActivityInsightsReport { - readonly start_time: string; - readonly end_time: string; - readonly template_ids: readonly string[]; - readonly users: readonly UserActivity[]; + readonly start_time: string; + readonly end_time: string; + readonly template_ids: readonly string[]; + readonly users: readonly UserActivity[]; } // From codersdk/insights.go export interface UserActivityInsightsRequest { - readonly start_time: string; - readonly end_time: string; - readonly template_ids: readonly string[]; + readonly start_time: string; + readonly end_time: string; + readonly template_ids: readonly string[]; } // From codersdk/insights.go export interface UserActivityInsightsResponse { - readonly report: UserActivityInsightsReport; + readonly report: UserActivityInsightsReport; } // From codersdk/users.go export interface UserAppearanceSettings { - readonly theme_preference: string; - readonly terminal_font: TerminalFontName; + readonly theme_preference: string; + readonly terminal_font: TerminalFontName; } // From codersdk/insights.go export interface UserLatency { - readonly template_ids: readonly string[]; - readonly user_id: string; - readonly username: string; - readonly avatar_url: string; - readonly latency_ms: ConnectionLatency; + readonly template_ids: readonly string[]; + readonly user_id: string; + readonly username: string; + readonly avatar_url: string; + readonly latency_ms: ConnectionLatency; } // From codersdk/insights.go export interface UserLatencyInsightsReport { - readonly start_time: string; - readonly end_time: string; - readonly template_ids: readonly string[]; - readonly users: readonly UserLatency[]; + readonly start_time: string; + readonly end_time: string; + readonly template_ids: readonly string[]; + readonly users: readonly UserLatency[]; } // From codersdk/insights.go export interface UserLatencyInsightsRequest { - readonly start_time: string; - readonly end_time: string; - readonly template_ids: readonly string[]; + readonly start_time: string; + readonly end_time: string; + readonly template_ids: readonly string[]; } // From codersdk/insights.go export interface UserLatencyInsightsResponse { - readonly report: UserLatencyInsightsReport; + readonly report: UserLatencyInsightsReport; } // From codersdk/users.go export interface UserLoginType { - readonly login_type: LoginType; + readonly login_type: LoginType; } // From codersdk/users.go export interface UserParameter { - readonly name: string; - readonly value: string; + readonly name: string; + readonly value: string; } // From codersdk/deployment.go export interface UserQuietHoursScheduleConfig { - readonly default_schedule: string; - readonly allow_user_custom: boolean; + readonly default_schedule: string; + readonly allow_user_custom: boolean; } // From codersdk/users.go export interface UserQuietHoursScheduleResponse { - readonly raw_schedule: string; - readonly user_set: boolean; - readonly user_can_set: boolean; - readonly time: string; - readonly timezone: string; - readonly next: string; + readonly raw_schedule: string; + readonly user_set: boolean; + readonly user_can_set: boolean; + readonly time: string; + readonly timezone: string; + readonly next: string; } // From codersdk/users.go export interface UserRoles { - readonly roles: readonly string[]; - readonly organization_roles: Record; + readonly roles: readonly string[]; + readonly organization_roles: Record; } // From codersdk/users.go @@ -2739,330 +3202,381 @@ export type UserStatus = "active" | "dormant" | "suspended"; // From codersdk/insights.go export interface UserStatusChangeCount { - readonly date: string; - readonly count: number; + readonly date: string; + readonly count: number; } export const UserStatuses: UserStatus[] = ["active", "dormant", "suspended"]; // From codersdk/users.go export interface UsersRequest extends Pagination { - readonly q?: string; + readonly q?: string; } // From codersdk/users.go export interface ValidateUserPasswordRequest { - readonly password: string; + readonly password: string; } // From codersdk/users.go export interface ValidateUserPasswordResponse { - readonly valid: boolean; - readonly details: string; + readonly valid: boolean; + readonly details: string; } // From codersdk/client.go export interface ValidationError { - readonly field: string; - readonly detail: string; + readonly field: string; + readonly detail: string; } // From codersdk/templateversions.go export type ValidationMonotonicOrder = "decreasing" | "increasing"; -export const ValidationMonotonicOrders: ValidationMonotonicOrder[] = ["decreasing", "increasing"]; +export const ValidationMonotonicOrders: ValidationMonotonicOrder[] = [ + "decreasing", + "increasing", +]; // From codersdk/organizations.go export interface VariableValue { - readonly name: string; - readonly value: string; + readonly name: string; + readonly value: string; } // From codersdk/notifications.go export interface WebpushMessage { - readonly icon: string; - readonly title: string; - readonly body: string; - readonly actions: readonly WebpushMessageAction[]; + readonly icon: string; + readonly title: string; + readonly body: string; + readonly actions: readonly WebpushMessageAction[]; } // From codersdk/notifications.go export interface WebpushMessageAction { - readonly label: string; - readonly url: string; + readonly label: string; + readonly url: string; } // From codersdk/notifications.go export interface WebpushSubscription { - readonly endpoint: string; - readonly auth_key: string; - readonly p256dh_key: string; + readonly endpoint: string; + readonly auth_key: string; + readonly p256dh_key: string; } // From healthsdk/healthsdk.go export interface WebsocketReport extends BaseReport { - readonly healthy: boolean; - readonly body: string; - readonly code: number; + readonly healthy: boolean; + readonly body: string; + readonly code: number; } // 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 owner_avatar_url: string; - readonly organization_id: string; - readonly organization_name: 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 template_active_version_id: string; - readonly template_require_active_version: boolean; - readonly template_use_classic_parameter_flow: boolean; - readonly latest_build: WorkspaceBuild; - readonly latest_app_status: WorkspaceAppStatus | null; - readonly outdated: boolean; - readonly name: string; - readonly autostart_schedule?: string; - readonly ttl_ms?: number; - readonly last_used_at: string; - readonly deleting_at: string | null; - readonly dormant_at: string | null; - readonly health: WorkspaceHealth; - readonly automatic_updates: AutomaticUpdates; - readonly allow_renames: boolean; - readonly favorite: boolean; - readonly next_start_at: string | null; + readonly id: string; + readonly created_at: string; + readonly updated_at: string; + readonly owner_id: string; + readonly owner_name: string; + readonly owner_avatar_url: string; + readonly organization_id: string; + readonly organization_name: 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 template_active_version_id: string; + readonly template_require_active_version: boolean; + readonly template_use_classic_parameter_flow: boolean; + readonly latest_build: WorkspaceBuild; + readonly latest_app_status: WorkspaceAppStatus | null; + readonly outdated: boolean; + readonly name: string; + readonly autostart_schedule?: string; + readonly ttl_ms?: number; + readonly last_used_at: string; + readonly deleting_at: string | null; + readonly dormant_at: string | null; + readonly health: WorkspaceHealth; + readonly automatic_updates: AutomaticUpdates; + readonly allow_renames: boolean; + readonly favorite: boolean; + readonly next_start_at: string | null; } // From codersdk/workspaceagents.go export interface WorkspaceAgent { - readonly id: string; - readonly parent_id: string | null; - readonly created_at: string; - readonly updated_at: string; - readonly first_connected_at?: string; - readonly last_connected_at?: string; - readonly disconnected_at?: string; - readonly started_at?: string; - readonly ready_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; - readonly operating_system: string; - readonly logs_length: number; - readonly logs_overflowed: boolean; - readonly directory?: string; - readonly expanded_directory?: string; - readonly version: string; - readonly api_version: string; - readonly apps: readonly WorkspaceApp[]; - readonly latency?: Record; - readonly connection_timeout_seconds: number; - readonly troubleshooting_url: string; - readonly subsystems: readonly AgentSubsystem[]; - readonly health: WorkspaceAgentHealth; - readonly display_apps: readonly DisplayApp[]; - readonly log_sources: readonly WorkspaceAgentLogSource[]; - readonly scripts: readonly WorkspaceAgentScript[]; - readonly startup_script_behavior: WorkspaceAgentStartupScriptBehavior; + readonly id: string; + readonly parent_id: string | null; + readonly created_at: string; + readonly updated_at: string; + readonly first_connected_at?: string; + readonly last_connected_at?: string; + readonly disconnected_at?: string; + readonly started_at?: string; + readonly ready_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; + readonly operating_system: string; + readonly logs_length: number; + readonly logs_overflowed: boolean; + readonly directory?: string; + readonly expanded_directory?: string; + readonly version: string; + readonly api_version: string; + readonly apps: readonly WorkspaceApp[]; + readonly latency?: Record; + readonly connection_timeout_seconds: number; + readonly troubleshooting_url: string; + readonly subsystems: readonly AgentSubsystem[]; + readonly health: WorkspaceAgentHealth; + readonly display_apps: readonly DisplayApp[]; + readonly log_sources: readonly WorkspaceAgentLogSource[]; + readonly scripts: readonly WorkspaceAgentScript[]; + readonly startup_script_behavior: WorkspaceAgentStartupScriptBehavior; } // From codersdk/workspaceagents.go export interface WorkspaceAgentContainer { - readonly created_at: string; - readonly id: string; - readonly name: string; - readonly image: string; - readonly labels: Record; - readonly running: boolean; - readonly ports: readonly WorkspaceAgentContainerPort[]; - readonly status: string; - readonly volumes: Record; - readonly devcontainer_status?: WorkspaceAgentDevcontainerStatus; - readonly devcontainer_dirty: boolean; + readonly created_at: string; + readonly id: string; + readonly name: string; + readonly image: string; + readonly labels: Record; + readonly running: boolean; + readonly ports: readonly WorkspaceAgentContainerPort[]; + readonly status: string; + readonly volumes: Record; + readonly devcontainer_status?: WorkspaceAgentDevcontainerStatus; + readonly devcontainer_dirty: boolean; } // From codersdk/workspaceagents.go export interface WorkspaceAgentContainerPort { - readonly port: number; - readonly network: string; - readonly host_ip?: string; - readonly host_port?: number; + readonly port: number; + readonly network: string; + readonly host_ip?: string; + readonly host_port?: number; } // From codersdk/workspaceagents.go export interface WorkspaceAgentDevcontainer { - readonly id: string; - readonly name: string; - readonly workspace_folder: string; - readonly config_path?: string; - readonly status: WorkspaceAgentDevcontainerStatus; - readonly dirty: boolean; - readonly container?: WorkspaceAgentContainer; + readonly id: string; + readonly name: string; + readonly workspace_folder: string; + readonly config_path?: string; + readonly status: WorkspaceAgentDevcontainerStatus; + readonly dirty: boolean; + readonly container?: WorkspaceAgentContainer; } // From codersdk/workspaceagents.go -export type WorkspaceAgentDevcontainerStatus = "error" | "running" | "starting" | "stopped"; +export type WorkspaceAgentDevcontainerStatus = + | "error" + | "running" + | "starting" + | "stopped"; -export const WorkspaceAgentDevcontainerStatuses: WorkspaceAgentDevcontainerStatus[] = ["error", "running", "starting", "stopped"]; +export const WorkspaceAgentDevcontainerStatuses: WorkspaceAgentDevcontainerStatus[] = + ["error", "running", "starting", "stopped"]; // From codersdk/workspaceagents.go export interface WorkspaceAgentDevcontainersResponse { - readonly devcontainers: readonly WorkspaceAgentDevcontainer[]; + readonly devcontainers: readonly WorkspaceAgentDevcontainer[]; } // From codersdk/workspaceagents.go export interface WorkspaceAgentHealth { - readonly healthy: boolean; - readonly reason?: string; + readonly healthy: boolean; + readonly reason?: string; } // 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"]; +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", +]; // From codersdk/workspaceagents.go export interface WorkspaceAgentListContainersResponse { - readonly containers: readonly WorkspaceAgentContainer[]; - readonly warnings?: readonly string[]; + readonly containers: readonly WorkspaceAgentContainer[]; + readonly warnings?: readonly string[]; } // From codersdk/workspaceagents.go export interface WorkspaceAgentListeningPort { - readonly process_name: string; - readonly network: string; - readonly port: number; + readonly process_name: string; + readonly network: string; + readonly port: number; } // From codersdk/workspaceagents.go export interface WorkspaceAgentListeningPortsResponse { - readonly ports: readonly WorkspaceAgentListeningPort[]; + readonly ports: readonly WorkspaceAgentListeningPort[]; } // From codersdk/workspaceagents.go export interface WorkspaceAgentLog { - readonly id: number; - readonly created_at: string; - readonly output: string; - readonly level: LogLevel; - readonly source_id: string; + readonly id: number; + readonly created_at: string; + readonly output: string; + readonly level: LogLevel; + readonly source_id: string; } // From codersdk/workspaceagents.go export interface WorkspaceAgentLogSource { - readonly workspace_agent_id: string; - readonly id: string; - readonly created_at: string; - readonly display_name: string; - readonly icon: string; + readonly workspace_agent_id: string; + readonly id: string; + readonly created_at: string; + readonly display_name: string; + readonly icon: string; } // From codersdk/workspaceagents.go export interface WorkspaceAgentMetadata { - readonly result: WorkspaceAgentMetadataResult; - readonly description: WorkspaceAgentMetadataDescription; + 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; + 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; + readonly collected_at: string; + readonly age: number; + readonly value: string; + readonly error: string; } // From codersdk/workspaceagentportshare.go export interface WorkspaceAgentPortShare { - readonly workspace_id: string; - readonly agent_name: string; - readonly port: number; - readonly share_level: WorkspaceAgentPortShareLevel; - readonly protocol: WorkspaceAgentPortShareProtocol; + readonly workspace_id: string; + readonly agent_name: string; + readonly port: number; + readonly share_level: WorkspaceAgentPortShareLevel; + readonly protocol: WorkspaceAgentPortShareProtocol; } // From codersdk/workspaceagentportshare.go export type WorkspaceAgentPortShareLevel = "authenticated" | "owner" | "public"; -export const WorkspaceAgentPortShareLevels: WorkspaceAgentPortShareLevel[] = ["authenticated", "owner", "public"]; +export const WorkspaceAgentPortShareLevels: WorkspaceAgentPortShareLevel[] = [ + "authenticated", + "owner", + "public", +]; // From codersdk/workspaceagentportshare.go export type WorkspaceAgentPortShareProtocol = "http" | "https"; -export const WorkspaceAgentPortShareProtocols: WorkspaceAgentPortShareProtocol[] = ["http", "https"]; +export const WorkspaceAgentPortShareProtocols: WorkspaceAgentPortShareProtocol[] = + ["http", "https"]; // From codersdk/workspaceagentportshare.go export interface WorkspaceAgentPortShares { - readonly shares: readonly WorkspaceAgentPortShare[]; + readonly shares: readonly WorkspaceAgentPortShare[]; } // From codersdk/workspaceagents.go export interface WorkspaceAgentScript { - readonly id: string; - readonly log_source_id: string; - readonly log_path: string; - readonly script: string; - readonly cron: string; - readonly run_on_start: boolean; - readonly run_on_stop: boolean; - readonly start_blocks_login: boolean; - readonly timeout: number; - readonly display_name: string; + readonly id: string; + readonly log_source_id: string; + readonly log_path: string; + readonly script: string; + readonly cron: string; + readonly run_on_start: boolean; + readonly run_on_stop: boolean; + readonly start_blocks_login: boolean; + readonly timeout: number; + readonly display_name: string; } // From codersdk/workspaceagents.go export type WorkspaceAgentStartupScriptBehavior = "blocking" | "non-blocking"; -export const WorkspaceAgentStartupScriptBehaviors: WorkspaceAgentStartupScriptBehavior[] = ["blocking", "non-blocking"]; +export const WorkspaceAgentStartupScriptBehaviors: WorkspaceAgentStartupScriptBehavior[] = + ["blocking", "non-blocking"]; // From codersdk/workspaceagents.go -export type WorkspaceAgentStatus = "connected" | "connecting" | "disconnected" | "timeout"; - -export const WorkspaceAgentStatuses: WorkspaceAgentStatus[] = ["connected", "connecting", "disconnected", "timeout"]; +export type WorkspaceAgentStatus = + | "connected" + | "connecting" + | "disconnected" + | "timeout"; + +export const WorkspaceAgentStatuses: WorkspaceAgentStatus[] = [ + "connected", + "connecting", + "disconnected", + "timeout", +]; // From codersdk/workspaceapps.go export interface WorkspaceApp { - readonly id: string; - readonly url?: string; - readonly external: boolean; - readonly slug: string; - readonly display_name?: string; - readonly command?: string; - readonly icon?: string; - readonly subdomain: boolean; - readonly subdomain_name?: string; - readonly sharing_level: WorkspaceAppSharingLevel; - readonly healthcheck?: Healthcheck; - readonly health: WorkspaceAppHealth; - readonly group?: string; - readonly hidden: boolean; - readonly open_in: WorkspaceAppOpenIn; - readonly statuses: readonly WorkspaceAppStatus[]; + readonly id: string; + readonly url?: string; + readonly external: boolean; + readonly slug: string; + readonly display_name?: string; + readonly command?: string; + readonly icon?: string; + readonly subdomain: boolean; + readonly subdomain_name?: string; + readonly sharing_level: WorkspaceAppSharingLevel; + readonly healthcheck?: Healthcheck; + readonly health: WorkspaceAppHealth; + readonly group?: string; + readonly hidden: boolean; + readonly open_in: WorkspaceAppOpenIn; + readonly statuses: readonly WorkspaceAppStatus[]; } // From codersdk/workspaceapps.go -export type WorkspaceAppHealth = "disabled" | "healthy" | "initializing" | "unhealthy"; - -export const WorkspaceAppHealths: WorkspaceAppHealth[] = ["disabled", "healthy", "initializing", "unhealthy"]; +export type WorkspaceAppHealth = + | "disabled" + | "healthy" + | "initializing" + | "unhealthy"; + +export const WorkspaceAppHealths: WorkspaceAppHealth[] = [ + "disabled", + "healthy", + "initializing", + "unhealthy", +]; // From codersdk/workspaceapps.go export type WorkspaceAppOpenIn = "slim-window" | "tab"; @@ -3072,183 +3586,216 @@ export const WorkspaceAppOpenIns: WorkspaceAppOpenIn[] = ["slim-window", "tab"]; // From codersdk/workspaceapps.go export type WorkspaceAppSharingLevel = "authenticated" | "owner" | "public"; -export const WorkspaceAppSharingLevels: WorkspaceAppSharingLevel[] = ["authenticated", "owner", "public"]; +export const WorkspaceAppSharingLevels: WorkspaceAppSharingLevel[] = [ + "authenticated", + "owner", + "public", +]; // From codersdk/workspaceapps.go export interface WorkspaceAppStatus { - readonly id: string; - readonly created_at: string; - readonly workspace_id: string; - readonly agent_id: string; - readonly app_id: string; - readonly state: WorkspaceAppStatusState; - readonly message: string; - readonly uri: string; - readonly icon: string; - readonly needs_user_attention: boolean; + readonly id: string; + readonly created_at: string; + readonly workspace_id: string; + readonly agent_id: string; + readonly app_id: string; + readonly state: WorkspaceAppStatusState; + readonly message: string; + readonly uri: string; + readonly icon: string; + readonly needs_user_attention: boolean; } // From codersdk/workspaceapps.go export type WorkspaceAppStatusState = "complete" | "failure" | "working"; -export const WorkspaceAppStatusStates: WorkspaceAppStatusState[] = ["complete", "failure", "working"]; +export const WorkspaceAppStatusStates: WorkspaceAppStatusState[] = [ + "complete", + "failure", + "working", +]; // 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 workspace_owner_avatar_url?: 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: readonly WorkspaceResource[]; - readonly deadline?: string; - readonly max_deadline?: string; - readonly status: WorkspaceStatus; - readonly daily_cost: number; - readonly matched_provisioners?: MatchedProvisioners; - readonly template_version_preset_id: string | null; + 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 workspace_owner_avatar_url?: 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: readonly WorkspaceResource[]; + readonly deadline?: string; + readonly max_deadline?: string; + readonly status: WorkspaceStatus; + readonly daily_cost: number; + readonly matched_provisioners?: MatchedProvisioners; + readonly template_version_preset_id: string | null; } // From codersdk/workspacebuilds.go export interface WorkspaceBuildParameter { - readonly name: string; - readonly value: string; + readonly name: string; + readonly value: string; } // From codersdk/workspacebuilds.go export interface WorkspaceBuildTimings { - readonly provisioner_timings: readonly ProvisionerTiming[]; - readonly agent_script_timings: readonly AgentScriptTiming[]; - readonly agent_connection_timings: readonly AgentConnectionTiming[]; + readonly provisioner_timings: readonly ProvisionerTiming[]; + readonly agent_script_timings: readonly AgentScriptTiming[]; + readonly agent_connection_timings: readonly AgentConnectionTiming[]; } // From codersdk/workspaces.go export interface WorkspaceBuildsRequest extends Pagination { - readonly since?: string; + readonly since?: string; } // From codersdk/deployment.go export interface WorkspaceConnectionLatencyMS { - readonly P50: number; - readonly P95: number; + 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; + 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; + readonly q?: string; } // From codersdk/workspaces.go export interface WorkspaceHealth { - readonly healthy: boolean; - readonly failing_agents: readonly string[]; + readonly healthy: boolean; + readonly failing_agents: readonly string[]; } // From codersdk/workspaces.go export interface WorkspaceOptions { - readonly include_deleted?: boolean; + readonly include_deleted?: boolean; } // From codersdk/workspaceproxy.go export interface WorkspaceProxy extends Region { - readonly derp_enabled: boolean; - readonly derp_only: boolean; - readonly status?: WorkspaceProxyStatus; - readonly created_at: string; - readonly updated_at: string; - readonly deleted: boolean; - readonly version: string; + readonly derp_enabled: boolean; + readonly derp_only: boolean; + readonly status?: WorkspaceProxyStatus; + readonly created_at: string; + readonly updated_at: string; + readonly deleted: boolean; + readonly version: string; } // From codersdk/deployment.go export interface WorkspaceProxyBuildInfo { - readonly workspace_proxy: boolean; - readonly dashboard_url: string; + readonly workspace_proxy: boolean; + readonly dashboard_url: string; } // From healthsdk/healthsdk.go export interface WorkspaceProxyReport extends BaseReport { - readonly healthy: boolean; - readonly workspace_proxies: RegionsResponse; + readonly healthy: boolean; + readonly workspace_proxies: RegionsResponse; } // From codersdk/workspaceproxy.go export interface WorkspaceProxyStatus { - readonly status: ProxyHealthStatus; - readonly report?: ProxyHealthReport; - readonly checked_at: string; + readonly status: ProxyHealthStatus; + readonly report?: ProxyHealthReport; + readonly checked_at: string; } // From codersdk/workspaces.go export interface WorkspaceQuota { - readonly credits_consumed: number; - readonly budget: number; + readonly credits_consumed: number; + readonly budget: number; } // 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; - readonly hide: boolean; - readonly icon: string; - readonly agents?: readonly WorkspaceAgent[]; - readonly metadata?: readonly WorkspaceResourceMetadata[]; - readonly daily_cost: number; + readonly id: string; + readonly created_at: string; + readonly job_id: string; + readonly workspace_transition: WorkspaceTransition; + readonly type: string; + readonly name: string; + readonly hide: boolean; + readonly icon: string; + readonly agents?: readonly WorkspaceAgent[]; + readonly metadata?: readonly WorkspaceResourceMetadata[]; + readonly daily_cost: number; } // From codersdk/workspacebuilds.go export interface WorkspaceResourceMetadata { - readonly key: string; - readonly value: string; - readonly sensitive: boolean; + readonly key: string; + readonly value: string; + readonly sensitive: boolean; } // 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"]; +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"]; +export const WorkspaceTransitions: WorkspaceTransition[] = [ + "delete", + "start", + "stop", +]; // From codersdk/workspaces.go export interface WorkspacesRequest extends Pagination { - readonly q?: string; + readonly q?: string; } // From codersdk/workspaces.go export interface WorkspacesResponse { - readonly workspaces: readonly Workspace[]; - readonly count: number; + readonly workspaces: readonly Workspace[]; + readonly count: number; } // From codersdk/deployment.go @@ -3271,5 +3818,3 @@ export const safeMTU = 1378; // From codersdk/workspacedisplaystatus.go export const unknownStatus = "Unknown"; - - From 1c5926b5db3060cf9db6dd0e16fdb26c81c5fbb8 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 9 Jun 2025 16:19:01 -0500 Subject: [PATCH 11/17] match default of postgres --- coderd/database/dbmem/dbmem.go | 1 + 1 file changed, 1 insertion(+) diff --git a/coderd/database/dbmem/dbmem.go b/coderd/database/dbmem/dbmem.go index f838a93d24c78..cc63844ce16a3 100644 --- a/coderd/database/dbmem/dbmem.go +++ b/coderd/database/dbmem/dbmem.go @@ -9345,6 +9345,7 @@ func (q *FakeQuerier) InsertTemplate(_ context.Context, arg database.InsertTempl AllowUserAutostart: true, AllowUserAutostop: true, MaxPortSharingLevel: arg.MaxPortSharingLevel, + UseClassicParameterFlow: true, } q.templates = append(q.templates, template) return nil From 733dcd7731ceb525a5e0fd163b3d9fab27a7c4c8 Mon Sep 17 00:00:00 2001 From: Jaayden Halko Date: Mon, 9 Jun 2025 21:19:24 +0000 Subject: [PATCH 12/17] fix: fix jest tests --- site/src/pages/WorkspacesPage/WorkspacesPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/src/pages/WorkspacesPage/WorkspacesPage.tsx b/site/src/pages/WorkspacesPage/WorkspacesPage.tsx index f54fd3df060ff..22ba0d15f1f9a 100644 --- a/site/src/pages/WorkspacesPage/WorkspacesPage.tsx +++ b/site/src/pages/WorkspacesPage/WorkspacesPage.tsx @@ -164,7 +164,7 @@ const WorkspacesPage: FC = () => { onConfirm={async () => { await batchActions.updateAll({ workspaces: checkedWorkspaces, - isDynamicParametersEnabled: true, + isDynamicParametersEnabled: false, }); setConfirmingBatchAction(null); }} From 1a1334e9910ccfa121a4b5311cec9c3156702bed Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 9 Jun 2025 16:28:20 -0500 Subject: [PATCH 13/17] update db mock --- coderd/wsbuilder/wsbuilder_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/coderd/wsbuilder/wsbuilder_test.go b/coderd/wsbuilder/wsbuilder_test.go index abe5e3fe9b8b7..58999a33e6e5e 100644 --- a/coderd/wsbuilder/wsbuilder_test.go +++ b/coderd/wsbuilder/wsbuilder_test.go @@ -894,10 +894,11 @@ func withTemplate(mTx *dbmock.MockStore) { mTx.EXPECT().GetTemplateByID(gomock.Any(), templateID). Times(1). Return(database.Template{ - ID: templateID, - OrganizationID: orgID, - Provisioner: database.ProvisionerTypeTerraform, - ActiveVersionID: activeVersionID, + ID: templateID, + OrganizationID: orgID, + Provisioner: database.ProvisionerTypeTerraform, + ActiveVersionID: activeVersionID, + UseClassicParameterFlow: true, }, nil) } From 69d032347048784d1c60e7a094dec54e9da70d9b Mon Sep 17 00:00:00 2001 From: Jaayden Halko Date: Mon, 9 Jun 2025 21:30:13 +0000 Subject: [PATCH 14/17] fix: update test data --- cli/testdata/coder_list_--output_json.golden | 2 +- .../migrations/000334_dynamic_parameters_opt_out.up.sql | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/testdata/coder_list_--output_json.golden b/cli/testdata/coder_list_--output_json.golden index c37c89c4efe2a..5304f2ce262ee 100644 --- a/cli/testdata/coder_list_--output_json.golden +++ b/cli/testdata/coder_list_--output_json.golden @@ -15,7 +15,7 @@ "template_allow_user_cancel_workspace_jobs": false, "template_active_version_id": "============[version ID]============", "template_require_active_version": false, - "template_use_classic_parameter_flow": false, + "template_use_classic_parameter_flow": true, "latest_build": { "id": "========[workspace build ID]========", "created_at": "====[timestamp]=====", diff --git a/coderd/database/migrations/000334_dynamic_parameters_opt_out.up.sql b/coderd/database/migrations/000334_dynamic_parameters_opt_out.up.sql index d1981e04a7f7b..342275f64ad9c 100644 --- a/coderd/database/migrations/000334_dynamic_parameters_opt_out.up.sql +++ b/coderd/database/migrations/000334_dynamic_parameters_opt_out.up.sql @@ -1,3 +1,4 @@ +-- All templates should opt out of dynamic parameters by default. ALTER TABLE templates ALTER COLUMN use_classic_parameter_flow SET DEFAULT true; UPDATE templates SET use_classic_parameter_flow = true From 55a7c4d62c4c5534a16afbe6c65534f199ffe9c2 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 9 Jun 2025 16:34:34 -0500 Subject: [PATCH 15/17] update db mock --- coderd/wsbuilder/wsbuilder_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/coderd/wsbuilder/wsbuilder_test.go b/coderd/wsbuilder/wsbuilder_test.go index 58999a33e6e5e..9bc45e6c0a1d9 100644 --- a/coderd/wsbuilder/wsbuilder_test.go +++ b/coderd/wsbuilder/wsbuilder_test.go @@ -57,6 +57,7 @@ func TestBuilder_NoOptions(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, + withTerraformValuesErrNoRows, withInactiveVersion(nil), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -113,6 +114,7 @@ func TestBuilder_Initiator(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, + withTerraformValuesErrNoRows, withInactiveVersion(nil), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -159,6 +161,7 @@ func TestBuilder_Baggage(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, + withTerraformValuesErrNoRows, withInactiveVersion(nil), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -197,6 +200,7 @@ func TestBuilder_Reason(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, + withTerraformValuesErrNoRows, withInactiveVersion(nil), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -235,6 +239,7 @@ func TestBuilder_ActiveVersion(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, + withTerraformValuesErrNoRows, withActiveVersion(nil), withLastBuildNotFound, withTemplateVersionVariables(activeVersionID, nil), @@ -338,6 +343,7 @@ func TestWorkspaceBuildWithTags(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, + withTerraformValuesErrNoRows, withInactiveVersion(richParameters), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, templateVersionVariables), @@ -433,6 +439,7 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, + withTerraformValuesErrNoRows, withInactiveVersion(richParameters), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -480,6 +487,7 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, + withTerraformValuesErrNoRows, withInactiveVersion(richParameters), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -533,6 +541,7 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, + withTerraformValuesErrNoRows, withInactiveVersion(richParameters), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -565,6 +574,7 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, + withTerraformValuesErrNoRows, withInactiveVersion(richParameters), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -617,6 +627,7 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, + withTerraformValuesErrNoRows, withActiveVersion(version2params), withLastBuildFound, withTemplateVersionVariables(activeVersionID, nil), @@ -680,6 +691,7 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, + withTerraformValuesErrNoRows, withActiveVersion(version2params), withLastBuildFound, withTemplateVersionVariables(activeVersionID, nil), @@ -741,6 +753,7 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, + withTerraformValuesErrNoRows, withActiveVersion(version2params), withLastBuildFound, withTemplateVersionVariables(activeVersionID, nil), @@ -788,6 +801,7 @@ func TestWorkspaceBuildWithPreset(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, + withTerraformValuesErrNoRows, withActiveVersion(nil), // building workspaces using presets with different combinations of parameters // is tested at the API layer, in TestWorkspace. Here, it is sufficient to @@ -902,6 +916,12 @@ func withTemplate(mTx *dbmock.MockStore) { }, nil) } +func withTerraformValuesErrNoRows(mTx *dbmock.MockStore) { + mTx.EXPECT().GetTemplateVersionTerraformValues(gomock.Any(), gomock.Any()). + Times(1). + Return(database.TemplateVersionTerraformValue{}, sql.ErrNoRows) +} + // withInTx runs the given functions on the same db mock. func withInTx(mTx *dbmock.MockStore) { mTx.EXPECT().InTx(gomock.Any(), gomock.Any()).Times(1).DoAndReturn( From 62e11f2fdf69391e7e7f05087e62b9447e1afb9b Mon Sep 17 00:00:00 2001 From: Jaayden Halko Date: Tue, 10 Jun 2025 19:38:37 +0000 Subject: [PATCH 16/17] fix: fix tests --- coderd/parameters_test.go | 1 + coderd/templates_test.go | 2 +- coderd/wsbuilder/wsbuilder.go | 22 +++++++++++++--------- coderd/wsbuilder/wsbuilder_test.go | 20 -------------------- 4 files changed, 15 insertions(+), 30 deletions(-) diff --git a/coderd/parameters_test.go b/coderd/parameters_test.go index 3cc7e86d8e3a3..24e974dc3e73c 100644 --- a/coderd/parameters_test.go +++ b/coderd/parameters_test.go @@ -249,6 +249,7 @@ func TestDynamicParametersWithTerraformValues(t *testing.T) { Value: "GO", }, } + request.EnableDynamicParameters = true }) coderdtest.AwaitWorkspaceBuildJobCompleted(t, setup.client, wrk.LatestBuild.ID) diff --git a/coderd/templates_test.go b/coderd/templates_test.go index f5fbe49741838..f8f2b1372263c 100644 --- a/coderd/templates_test.go +++ b/coderd/templates_test.go @@ -1548,7 +1548,7 @@ func TestPatchTemplateMeta(t *testing.T) { user := coderdtest.CreateFirstUser(t, client) version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, nil) template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID) - require.False(t, template.UseClassicParameterFlow, "default is false") + require.True(t, template.UseClassicParameterFlow, "default is true") bTrue := true bFalse := false diff --git a/coderd/wsbuilder/wsbuilder.go b/coderd/wsbuilder/wsbuilder.go index d4be0747436f6..201ef0c53a307 100644 --- a/coderd/wsbuilder/wsbuilder.go +++ b/coderd/wsbuilder/wsbuilder.go @@ -1042,24 +1042,28 @@ func (b *Builder) checkRunningBuild() error { } func (b *Builder) usingDynamicParameters() bool { - vals, err := b.getTemplateTerraformValues() + if b.dynamicParametersEnabled != nil { + return *b.dynamicParametersEnabled + } + + tpl, err := b.getTemplate() if err != nil { + return false // Let another part of the code get this error + } + if tpl.UseClassicParameterFlow { return false } - if !ProvisionerVersionSupportsDynamicParameters(vals.ProvisionerdVersion) { + vals, err := b.getTemplateTerraformValues() + if err != nil { return false } - if b.dynamicParametersEnabled != nil { - return *b.dynamicParametersEnabled + if !ProvisionerVersionSupportsDynamicParameters(vals.ProvisionerdVersion) { + return false } - tpl, err := b.getTemplate() - if err != nil { - return false // Let another part of the code get this error - } - return !tpl.UseClassicParameterFlow + return true } func ProvisionerVersionSupportsDynamicParameters(version string) bool { diff --git a/coderd/wsbuilder/wsbuilder_test.go b/coderd/wsbuilder/wsbuilder_test.go index 9bc45e6c0a1d9..58999a33e6e5e 100644 --- a/coderd/wsbuilder/wsbuilder_test.go +++ b/coderd/wsbuilder/wsbuilder_test.go @@ -57,7 +57,6 @@ func TestBuilder_NoOptions(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, - withTerraformValuesErrNoRows, withInactiveVersion(nil), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -114,7 +113,6 @@ func TestBuilder_Initiator(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, - withTerraformValuesErrNoRows, withInactiveVersion(nil), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -161,7 +159,6 @@ func TestBuilder_Baggage(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, - withTerraformValuesErrNoRows, withInactiveVersion(nil), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -200,7 +197,6 @@ func TestBuilder_Reason(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, - withTerraformValuesErrNoRows, withInactiveVersion(nil), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -239,7 +235,6 @@ func TestBuilder_ActiveVersion(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, - withTerraformValuesErrNoRows, withActiveVersion(nil), withLastBuildNotFound, withTemplateVersionVariables(activeVersionID, nil), @@ -343,7 +338,6 @@ func TestWorkspaceBuildWithTags(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, - withTerraformValuesErrNoRows, withInactiveVersion(richParameters), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, templateVersionVariables), @@ -439,7 +433,6 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, - withTerraformValuesErrNoRows, withInactiveVersion(richParameters), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -487,7 +480,6 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, - withTerraformValuesErrNoRows, withInactiveVersion(richParameters), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -541,7 +533,6 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, - withTerraformValuesErrNoRows, withInactiveVersion(richParameters), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -574,7 +565,6 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, - withTerraformValuesErrNoRows, withInactiveVersion(richParameters), withLastBuildFound, withTemplateVersionVariables(inactiveVersionID, nil), @@ -627,7 +617,6 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, - withTerraformValuesErrNoRows, withActiveVersion(version2params), withLastBuildFound, withTemplateVersionVariables(activeVersionID, nil), @@ -691,7 +680,6 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, - withTerraformValuesErrNoRows, withActiveVersion(version2params), withLastBuildFound, withTemplateVersionVariables(activeVersionID, nil), @@ -753,7 +741,6 @@ func TestWorkspaceBuildWithRichParameters(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, - withTerraformValuesErrNoRows, withActiveVersion(version2params), withLastBuildFound, withTemplateVersionVariables(activeVersionID, nil), @@ -801,7 +788,6 @@ func TestWorkspaceBuildWithPreset(t *testing.T) { mDB := expectDB(t, // Inputs withTemplate, - withTerraformValuesErrNoRows, withActiveVersion(nil), // building workspaces using presets with different combinations of parameters // is tested at the API layer, in TestWorkspace. Here, it is sufficient to @@ -916,12 +902,6 @@ func withTemplate(mTx *dbmock.MockStore) { }, nil) } -func withTerraformValuesErrNoRows(mTx *dbmock.MockStore) { - mTx.EXPECT().GetTemplateVersionTerraformValues(gomock.Any(), gomock.Any()). - Times(1). - Return(database.TemplateVersionTerraformValue{}, sql.ErrNoRows) -} - // withInTx runs the given functions on the same db mock. func withInTx(mTx *dbmock.MockStore) { mTx.EXPECT().InTx(gomock.Any(), gomock.Any()).Times(1).DoAndReturn( From 414801dd75d12f22cea6267cba5c17ba0a62bca6 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 11 Jun 2025 09:54:41 -0500 Subject: [PATCH 17/17] set dynamic on the template --- coderd/parameters_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/coderd/parameters_test.go b/coderd/parameters_test.go index 24e974dc3e73c..7e84ee63890bf 100644 --- a/coderd/parameters_test.go +++ b/coderd/parameters_test.go @@ -249,7 +249,6 @@ func TestDynamicParametersWithTerraformValues(t *testing.T) { Value: "GO", }, } - request.EnableDynamicParameters = true }) coderdtest.AwaitWorkspaceBuildJobCompleted(t, setup.client, wrk.LatestBuild.ID) @@ -380,6 +379,12 @@ func setupDynamicParamsTest(t *testing.T, args setupDynamicParamsTestParams) dyn coderdtest.AwaitTemplateVersionJobCompleted(t, templateAdmin, version.ID) tpl := coderdtest.CreateTemplate(t, templateAdmin, owner.OrganizationID, version.ID) + var err error + tpl, err = templateAdmin.UpdateTemplateMeta(t.Context(), tpl.ID, codersdk.UpdateTemplateMeta{ + UseClassicParameterFlow: ptr.Ref(false), + }) + require.NoError(t, err) + ctx := testutil.Context(t, testutil.WaitShort) stream, err := templateAdmin.TemplateVersionDynamicParameters(ctx, version.ID) if args.expectWebsocketError { 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