diff --git a/Makefile b/Makefile index 163d1ba16c991..2bf11ded32cf4 100644 --- a/Makefile +++ b/Makefile @@ -642,8 +642,6 @@ vpn/vpn.pb.go: vpn/vpn.proto site/src/api/typesGenerated.ts: $(wildcard scripts/apitypings/*) $(shell find ./codersdk $(FIND_EXCLUSIONS) -type f -name '*.go') # -C sets the directory for the go run command go run -C ./scripts/apitypings main.go > $@ - (cd ./site && npx biome format --write ./src/api/typesGenerated.ts) - ./scripts/pnpm_install.sh site/e2e/provisionerGenerated.ts: provisionerd/proto/provisionerd.pb.go provisionersdk/proto/provisioner.pb.go cd site diff --git a/site/.storybook/main.js b/site/.storybook/main.js index 642d8a36f7eba..253733f9ee053 100644 --- a/site/.storybook/main.js +++ b/site/.storybook/main.js @@ -1,42 +1,40 @@ import turbosnap from "vite-plugin-turbosnap"; module.exports = { - stories: ["../src/**/*.stories.tsx"], + stories: ["../src/**/*.stories.tsx"], - addons: [ - "@chromatic-com/storybook", - { - name: "@storybook/addon-essentials", - options: { - backgrounds: false, - }, - }, - "@storybook/addon-links", - "@storybook/addon-mdx-gfm", - "@storybook/addon-themes", - "@storybook/addon-actions", - "@storybook/addon-interactions", - "storybook-addon-remix-react-router", - ], + addons: [ + "@chromatic-com/storybook", + { + name: "@storybook/addon-essentials", + options: { + backgrounds: false, + }, + }, + "@storybook/addon-links", + "@storybook/addon-mdx-gfm", + "@storybook/addon-themes", + "@storybook/addon-actions", + "@storybook/addon-interactions", + "storybook-addon-remix-react-router", + ], - staticDirs: ["../static"], + staticDirs: ["../static"], - framework: { - name: "@storybook/react-vite", - options: {}, - }, + framework: { + name: "@storybook/react-vite", + options: {}, + }, - async viteFinal(config, { configType }) { - config.plugins = config.plugins || []; - // return the customized config - if (configType === "PRODUCTION") { - // ignore @ts-ignore because it's not in the vite types yet - config.plugins.push( - turbosnap({ - rootDir: config.root || "", - }), - ); - } - return config; - }, + async viteFinal(config, { configType }) { + config.plugins = config.plugins || []; + if (configType === "PRODUCTION") { + config.plugins.push( + turbosnap({ + rootDir: config.root || "", + }), + ); + } + return config; + }, }; diff --git a/site/.storybook/preview.jsx b/site/.storybook/preview.jsx index 2dbc1308bb733..9953c0533e5d6 100644 --- a/site/.storybook/preview.jsx +++ b/site/.storybook/preview.jsx @@ -22,12 +22,13 @@ import CssBaseline from "@mui/material/CssBaseline"; import { ThemeProvider as MuiThemeProvider, StyledEngineProvider, + // biome-ignore lint/nursery/noRestrictedImports: we extend the MUI theme } from "@mui/material/styles"; import { DecoratorHelpers } from "@storybook/addon-themes"; import isChromatic from "chromatic/isChromatic"; import React, { StrictMode } from "react"; import { HelmetProvider } from "react-helmet-async"; -import { parseQueryArgs, QueryClient, QueryClientProvider } from "react-query"; +import { QueryClient, QueryClientProvider, parseQueryArgs } from "react-query"; import { withRouter } from "storybook-addon-remix-react-router"; import "theme/globalFonts"; import themes from "../src/theme"; diff --git a/site/biome.json b/site/biome.jsonc similarity index 87% rename from site/biome.json rename to site/biome.jsonc index 4be74e32ecffe..95d121ed4858f 100644 --- a/site/biome.json +++ b/site/biome.jsonc @@ -1,10 +1,13 @@ { "files": { "ignore": [ - "e2e/provisionerGenerated.ts", - "e2e/google/protobuf/timestampGenerated.ts", - "src/api/countriesGenerated.ts", - "src/api/rbacresourcesGenerated.ts" + "build/", + "node_modules/", + "out/", + "test-results/", + "e2e/**/*Generated.ts", + "src/api/*Generated.ts", + "pnpm-lock.yaml" ] }, "linter": { @@ -44,5 +47,6 @@ } } } - } + }, + "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json" } diff --git a/site/jest.config.ts b/site/jest.config.ts index 088c63e6ded6b..3131500df0131 100644 --- a/site/jest.config.ts +++ b/site/jest.config.ts @@ -1,68 +1,68 @@ module.exports = { - // Use a big timeout for CI. - testTimeout: 20_000, - maxWorkers: 8, - projects: [ - { - displayName: "test", - roots: [""], - setupFiles: ["./jest.polyfills.js"], - setupFilesAfterEnv: ["./jest.setup.ts"], - extensionsToTreatAsEsm: [".ts"], - transform: { - "^.+\\.(t|j)sx?$": [ - "@swc/jest", - { - jsc: { - transform: { - react: { - runtime: "automatic", - importSource: "@emotion/react", - }, - }, - experimental: { - plugins: [["jest_workaround", {}]], - }, - }, - }, - ], - }, - testEnvironment: "jsdom", - testEnvironmentOptions: { - customExportConditions: [""], - }, - testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$", - testPathIgnorePatterns: [ - "/node_modules/", - "/e2e/", - // TODO: This test is timing out after upgrade a few Jest dependencies - // and I was not able to figure out why. When running it specifically, I - // can see many act warnings that may can help us to find the issue. - "/usePaginatedQuery.test.ts", - ], - transformIgnorePatterns: [ - "/node_modules/@chartjs-adapter-date-fns", - ], - moduleDirectories: ["node_modules", "/src"], - moduleNameMapper: { - "\\.css$": "/src/testHelpers/styleMock.ts", - "^@fontsource": "/src/testHelpers/styleMock.ts", - }, - }, - ], - collectCoverageFrom: [ - // included files - "/**/*.ts", - "/**/*.tsx", - // excluded files - "!/**/*.stories.tsx", - "!/_jest/**/*.*", - "!/api.ts", - "!/coverage/**/*.*", - "!/e2e/**/*.*", - "!/jest-runner.eslint.config.js", - "!/jest.config.js", - "!/out/**/*.*", - "!/storybook-static/**/*.*", - ], + // Use a big timeout for CI. + testTimeout: 20_000, + maxWorkers: 8, + projects: [ + { + displayName: "test", + roots: [""], + setupFiles: ["./jest.polyfills.js"], + setupFilesAfterEnv: ["./jest.setup.ts"], + extensionsToTreatAsEsm: [".ts"], + transform: { + "^.+\\.(t|j)sx?$": [ + "@swc/jest", + { + jsc: { + transform: { + react: { + runtime: "automatic", + importSource: "@emotion/react", + }, + }, + experimental: { + plugins: [["jest_workaround", {}]], + }, + }, + }, + ], + }, + testEnvironment: "jsdom", + testEnvironmentOptions: { + customExportConditions: [""], + }, + testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$", + testPathIgnorePatterns: [ + "/node_modules/", + "/e2e/", + // TODO: This test is timing out after upgrade a few Jest dependencies + // and I was not able to figure out why. When running it specifically, I + // can see many act warnings that may can help us to find the issue. + "/usePaginatedQuery.test.ts", + ], + transformIgnorePatterns: [ + "/node_modules/@chartjs-adapter-date-fns", + ], + moduleDirectories: ["node_modules", "/src"], + moduleNameMapper: { + "\\.css$": "/src/testHelpers/styleMock.ts", + "^@fontsource": "/src/testHelpers/styleMock.ts", + }, + }, + ], + collectCoverageFrom: [ + // included files + "/**/*.ts", + "/**/*.tsx", + // excluded files + "!/**/*.stories.tsx", + "!/_jest/**/*.*", + "!/api.ts", + "!/coverage/**/*.*", + "!/e2e/**/*.*", + "!/jest-runner.eslint.config.js", + "!/jest.config.js", + "!/out/**/*.*", + "!/storybook-static/**/*.*", + ], }; diff --git a/site/jest.polyfills.js b/site/jest.polyfills.js index 518cf6e94d889..8835fff7667c8 100644 --- a/site/jest.polyfills.js +++ b/site/jest.polyfills.js @@ -13,32 +13,32 @@ const { TextDecoder, TextEncoder } = require("node:util"); const { ReadableStream } = require("node:stream/web"); Object.defineProperties(globalThis, { - TextDecoder: { value: TextDecoder }, - TextEncoder: { value: TextEncoder }, - ReadableStream: { value: ReadableStream }, + TextDecoder: { value: TextDecoder }, + TextEncoder: { value: TextEncoder }, + ReadableStream: { value: ReadableStream }, }); const { Blob, File } = require("node:buffer"); const { fetch, Headers, FormData, Request, Response } = require("undici"); Object.defineProperties(globalThis, { - fetch: { value: fetch, writable: true }, - Blob: { value: Blob }, - File: { value: File }, - Headers: { value: Headers }, - FormData: { value: FormData }, - Request: { value: Request }, - Response: { value: Response }, - matchMedia: { - value: (query) => ({ - matches: false, - media: query, - onchange: null, - addListener: jest.fn(), - removeListener: jest.fn(), - addEventListener: jest.fn(), - removeEventListener: jest.fn(), - dispatchEvent: jest.fn(), - }), - }, + fetch: { value: fetch, writable: true }, + Blob: { value: Blob }, + File: { value: File }, + Headers: { value: Headers }, + FormData: { value: FormData }, + Request: { value: Request }, + Response: { value: Response }, + matchMedia: { + value: (query) => ({ + matches: false, + media: query, + onchange: null, + addListener: jest.fn(), + removeListener: jest.fn(), + addEventListener: jest.fn(), + removeEventListener: jest.fn(), + dispatchEvent: jest.fn(), + }), + }, }); diff --git a/site/jest.setup.ts b/site/jest.setup.ts index 7d4b6f0772bc4..31868b0d92d80 100644 --- a/site/jest.setup.ts +++ b/site/jest.setup.ts @@ -1,10 +1,10 @@ import "@testing-library/jest-dom"; import "jest-location-mock"; -import { cleanup } from "@testing-library/react"; import crypto from "node:crypto"; -import { useMemo } from "react"; +import { cleanup } from "@testing-library/react"; import type { Region } from "api/typesGenerated"; import type { ProxyLatencyReport } from "contexts/useProxyLatency"; +import { useMemo } from "react"; import { server } from "testHelpers/server"; // useProxyLatency does some http requests to determine latency. diff --git a/site/package.json b/site/package.json index 1951d32ad82c2..c0b3286c530fa 100644 --- a/site/package.json +++ b/site/package.json @@ -6,16 +6,16 @@ "license": "AGPL-3.0", "scripts": { "build": "NODE_ENV=production pnpm vite build", - "check": "biome check --error-on-warnings e2e/ src/", - "check:fix": "biome check --error-on-warnings --fix e2e/ src/", + "check": "biome check --error-on-warnings .", + "check:fix": "biome check --error-on-warnings --fix .", "check:all": "pnpm check && pnpm test", "chromatic": "chromatic", "dev": "vite", - "format": "biome format --write e2e/ src/", - "format:check": "biome format e2e/ src/", + "format": "biome format --write .", + "format:check": "biome format .", "lint": "pnpm run lint:check && pnpm run lint:types", - "lint:check": " biome lint --error-on-warnings e2e/ src/", - "lint:fix": " biome lint --error-on-warnings --write e2e/ src/", + "lint:check": " biome lint --error-on-warnings .", + "lint:fix": " biome lint --error-on-warnings --write .", "lint:types": "tsc -p .", "playwright:install": "playwright install --with-deps chromium", "playwright:test": "playwright test --config=e2e/playwright.config.ts", @@ -115,7 +115,7 @@ "yup": "1.4.0" }, "devDependencies": { - "@biomejs/biome": "1.9.3", + "@biomejs/biome": "1.9.4", "@chromatic-com/storybook": "3.2.2", "@octokit/types": "12.3.0", "@playwright/test": "1.47.2", @@ -182,11 +182,7 @@ "vite-plugin-checker": "0.8.0", "vite-plugin-turbosnap": "1.0.3" }, - "browserslist": [ - "chrome 110", - "firefox 111", - "safari 16.0" - ], + "browserslist": ["chrome 110", "firefox 111", "safari 16.0"], "resolutions": { "optionator": "0.9.3", "semver": "7.6.2" diff --git a/site/pnpm-lock.yaml b/site/pnpm-lock.yaml index a9218c49473e1..9f8f251470a5d 100644 --- a/site/pnpm-lock.yaml +++ b/site/pnpm-lock.yaml @@ -254,8 +254,8 @@ importers: version: 1.4.0 devDependencies: '@biomejs/biome': - specifier: 1.9.3 - version: 1.9.3 + specifier: 1.9.4 + version: 1.9.4 '@chromatic-com/storybook': specifier: 3.2.2 version: 3.2.2(react@18.3.1)(storybook@8.4.6(prettier@3.4.1)) @@ -447,7 +447,7 @@ importers: version: 5.4.10(@types/node@20.17.6) vite-plugin-checker: specifier: 0.8.0 - version: 0.8.0(@biomejs/biome@1.9.3)(eslint@8.52.0)(optionator@0.9.3)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.6)) + version: 0.8.0(@biomejs/biome@1.9.4)(eslint@8.52.0)(optionator@0.9.3)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.6)) vite-plugin-turbosnap: specifier: 1.0.3 version: 1.0.3 @@ -677,55 +677,55 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - '@biomejs/biome@1.9.3': - resolution: {integrity: sha512-POjAPz0APAmX33WOQFGQrwLvlu7WLV4CFJMlB12b6ZSg+2q6fYu9kZwLCOA+x83zXfcPd1RpuWOKJW0GbBwLIQ==} + '@biomejs/biome@1.9.4': + resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@1.9.3': - resolution: {integrity: sha512-QZzD2XrjJDUyIZK+aR2i5DDxCJfdwiYbUKu9GzkCUJpL78uSelAHAPy7m0GuPMVtF/Uo+OKv97W3P9nuWZangQ==} + '@biomejs/cli-darwin-arm64@1.9.4': + resolution: {integrity: sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@1.9.3': - resolution: {integrity: sha512-vSCoIBJE0BN3SWDFuAY/tRavpUtNoqiceJ5PrU3xDfsLcm/U6N93JSM0M9OAiC/X7mPPfejtr6Yc9vSgWlEgVw==} + '@biomejs/cli-darwin-x64@1.9.4': + resolution: {integrity: sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@1.9.3': - resolution: {integrity: sha512-VBzyhaqqqwP3bAkkBrhVq50i3Uj9+RWuj+pYmXrMDgjS5+SKYGE56BwNw4l8hR3SmYbLSbEo15GcV043CDSk+Q==} + '@biomejs/cli-linux-arm64-musl@1.9.4': + resolution: {integrity: sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-arm64@1.9.3': - resolution: {integrity: sha512-vJkAimD2+sVviNTbaWOGqEBy31cW0ZB52KtpVIbkuma7PlfII3tsLhFa+cwbRAcRBkobBBhqZ06hXoZAN8NODQ==} + '@biomejs/cli-linux-arm64@1.9.4': + resolution: {integrity: sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-x64-musl@1.9.3': - resolution: {integrity: sha512-TJmnOG2+NOGM72mlczEsNki9UT+XAsMFAOo8J0me/N47EJ/vkLXxf481evfHLlxMejTY6IN8SdRSiPVLv6AHlA==} + '@biomejs/cli-linux-x64-musl@1.9.4': + resolution: {integrity: sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-linux-x64@1.9.3': - resolution: {integrity: sha512-x220V4c+romd26Mu1ptU+EudMXVS4xmzKxPVb9mgnfYlN4Yx9vD5NZraSx/onJnd3Gh/y8iPUdU5CDZJKg9COA==} + '@biomejs/cli-linux-x64@1.9.4': + resolution: {integrity: sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-win32-arm64@1.9.3': - resolution: {integrity: sha512-lg/yZis2HdQGsycUvHWSzo9kOvnGgvtrYRgoCEwPBwwAL8/6crOp3+f47tPwI/LI1dZrhSji7PNsGKGHbwyAhw==} + '@biomejs/cli-win32-arm64@1.9.4': + resolution: {integrity: sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@1.9.3': - resolution: {integrity: sha512-cQMy2zanBkVLpmmxXdK6YePzmZx0s5Z7KEnwmrW54rcXK3myCNbQa09SwGZ8i/8sLw0H9F3X7K4rxVNGU8/D4Q==} + '@biomejs/cli-win32-x64@1.9.4': + resolution: {integrity: sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] @@ -6319,39 +6319,39 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} - '@biomejs/biome@1.9.3': + '@biomejs/biome@1.9.4': optionalDependencies: - '@biomejs/cli-darwin-arm64': 1.9.3 - '@biomejs/cli-darwin-x64': 1.9.3 - '@biomejs/cli-linux-arm64': 1.9.3 - '@biomejs/cli-linux-arm64-musl': 1.9.3 - '@biomejs/cli-linux-x64': 1.9.3 - '@biomejs/cli-linux-x64-musl': 1.9.3 - '@biomejs/cli-win32-arm64': 1.9.3 - '@biomejs/cli-win32-x64': 1.9.3 + '@biomejs/cli-darwin-arm64': 1.9.4 + '@biomejs/cli-darwin-x64': 1.9.4 + '@biomejs/cli-linux-arm64': 1.9.4 + '@biomejs/cli-linux-arm64-musl': 1.9.4 + '@biomejs/cli-linux-x64': 1.9.4 + '@biomejs/cli-linux-x64-musl': 1.9.4 + '@biomejs/cli-win32-arm64': 1.9.4 + '@biomejs/cli-win32-x64': 1.9.4 - '@biomejs/cli-darwin-arm64@1.9.3': + '@biomejs/cli-darwin-arm64@1.9.4': optional: true - '@biomejs/cli-darwin-x64@1.9.3': + '@biomejs/cli-darwin-x64@1.9.4': optional: true - '@biomejs/cli-linux-arm64-musl@1.9.3': + '@biomejs/cli-linux-arm64-musl@1.9.4': optional: true - '@biomejs/cli-linux-arm64@1.9.3': + '@biomejs/cli-linux-arm64@1.9.4': optional: true - '@biomejs/cli-linux-x64-musl@1.9.3': + '@biomejs/cli-linux-x64-musl@1.9.4': optional: true - '@biomejs/cli-linux-x64@1.9.3': + '@biomejs/cli-linux-x64@1.9.4': optional: true - '@biomejs/cli-win32-arm64@1.9.3': + '@biomejs/cli-win32-arm64@1.9.4': optional: true - '@biomejs/cli-win32-x64@1.9.3': + '@biomejs/cli-win32-x64@1.9.4': optional: true '@bundled-es-modules/cookie@2.0.0': @@ -12095,7 +12095,7 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - vite-plugin-checker@0.8.0(@biomejs/biome@1.9.3)(eslint@8.52.0)(optionator@0.9.3)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.6)): + vite-plugin-checker@0.8.0(@biomejs/biome@1.9.4)(eslint@8.52.0)(optionator@0.9.3)(typescript@5.6.3)(vite@5.4.10(@types/node@20.17.6)): dependencies: '@babel/code-frame': 7.25.7 ansi-escapes: 4.3.2 @@ -12113,7 +12113,7 @@ snapshots: vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 optionalDependencies: - '@biomejs/biome': 1.9.3 + '@biomejs/biome': 1.9.4 eslint: 8.52.0 optionator: 0.9.3 typescript: 5.6.3 diff --git a/site/postcss.config.js b/site/postcss.config.js index 33ad091d26d8a..e873f1a4f2358 100644 --- a/site/postcss.config.js +++ b/site/postcss.config.js @@ -1,6 +1,6 @@ module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/site/src/api/typesGenerated.ts b/site/src/api/typesGenerated.ts index 35bcdeb052c9d..d1a93ce9bda37 100644 --- a/site/src/api/typesGenerated.ts +++ b/site/src/api/typesGenerated.ts @@ -2,22 +2,22 @@ // 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/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 @@ -27,193 +27,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 = - | "create" - | "delete" - | "login" - | "logout" - | "register" - | "request_password_reset" - | "start" - | "stop" - | "write"; - -export const AuditActions: AuditAction[] = [ - "create", - "delete", - "login", - "logout", - "register", - "request_password_reset", - "start", - "stop", - "write", -]; +export type AuditAction = "create" | "delete" | "login" | "logout" | "register" | "request_password_reset" | "start" | "stop" | "write"; + +export const AuditActions: AuditAction[] = ["create", "delete", "login", "logout", "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: AuthMethod; - readonly oidc: OIDCAuthMethod; + readonly terms_of_service_url?: string; + readonly password: AuthMethod; + readonly github: AuthMethod; + 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 @@ -226,45 +203,41 @@ 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 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; } // 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"; @@ -277,15 +250,15 @@ 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/insights.go export interface ConnectionLatency { - readonly p50: number; - readonly p95: number; + readonly p50: number; + readonly p95: number; } // From codersdk/files.go @@ -296,586 +269,506 @@ 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/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 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; } // 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?: readonly string[]; - readonly orphan?: boolean; - readonly rich_parameter_values?: readonly WorkspaceBuildParameter[]; - readonly log_level?: ProvisionerLogLevel; + readonly template_version_id?: string; + readonly transition: WorkspaceTransition; + readonly dry_run?: boolean; + readonly state?: readonly string[]; + readonly orphan?: boolean; + readonly rich_parameter_values?: readonly WorkspaceBuildParameter[]; + readonly log_level?: ProvisionerLogLevel; } // 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_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; } // 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 const CryptoKeyFeatures: 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"]; // 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; - // Invalid type, using 'any'. Might be a reference to any external package - // biome-ignore lint lint/complexity/noUselessTypeConstraint: ignore linter - readonly netcheck?: any; - readonly netcheck_err?: string; - readonly netcheck_logs: readonly string[]; + readonly healthy: boolean; + readonly regions: Record; + // Invalid type, using 'any'. Might be a reference to any external package + // biome-ignore lint lint/complexity/noUselessTypeConstraint: ignore linter + readonly netcheck?: any; + 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; - // Invalid type, using 'any'. Might be a reference to any external package - // biome-ignore lint lint/complexity/noUselessTypeConstraint: ignore linter - readonly node: any | null; - // Invalid type, using 'any'. Might be a reference to any external package - // biome-ignore lint lint/complexity/noUselessTypeConstraint: ignore linter - readonly node_info: any; - 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; + // Invalid type, using 'any'. Might be a reference to any external package + // biome-ignore lint lint/complexity/noUselessTypeConstraint: ignore linter + readonly node: any | null; + // Invalid type, using 'any'. Might be a reference to any external package + // biome-ignore lint lint/complexity/noUselessTypeConstraint: ignore linter + readonly node_info: any; + 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; - // Invalid type, using 'any'. Might be a reference to any external package - // biome-ignore lint lint/complexity/noUselessTypeConstraint: ignore linter - readonly region: any | null; - readonly node_reports: readonly (DERPNodeReport | null)[]; + readonly healthy: boolean; + readonly severity: HealthSeverity; + readonly warnings: readonly HealthMessage[]; + readonly error?: string; + // Invalid type, using 'any'. Might be a reference to any external package + // biome-ignore lint lint/complexity/noUselessTypeConstraint: ignore linter + readonly region: any | null; + readonly node_reports: readonly (DERPNodeReport | null)[]; } // 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 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/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 pg_connection_url?: string; - readonly pg_auth?: string; - readonly oauth2?: OAuth2Config; - readonly oidc?: OIDCConfig; - readonly telemetry?: TelemetryConfig; - readonly tls?: TLSConfig; - readonly trace?: TraceConfig; - readonly secure_auth_cookie?: boolean; - 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 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 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 pg_connection_url?: string; + readonly pg_auth?: string; + readonly oauth2?: OAuth2Config; + readonly oidc?: OIDCConfig; + readonly telemetry?: TelemetryConfig; + readonly tls?: TLSConfig; + readonly trace?: TraceConfig; + readonly secure_auth_cookie?: boolean; + 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 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 config?: string; + readonly write_config?: boolean; + readonly address?: string; } // 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/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 = - | "auto-fill-parameters" - | "example" - | "notifications" - | "workspace-usage"; +export type Experiment = "auto-fill-parameters" | "example" | "notifications" | "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; + 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_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_proxy", -]; +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_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_proxy"]; // From codersdk/deployment.go export type FeatureSet = "enterprise" | "" | "premium"; @@ -887,43 +780,43 @@ export const FormatZip = "zip"; // From codersdk/apikey.go export interface GenerateAPIKeyResponse { - readonly key: string; + readonly key: string; } // 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/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 @@ -933,33 +826,15 @@ 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 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"; @@ -970,54 +845,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 @@ -1027,58 +870,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/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/jfrog.go export interface JFrogXrayScan { - readonly workspace_id: string; - readonly agent_id: string; - readonly critical: number; - readonly high: number; - readonly medium: number; - readonly results_url: string; + readonly workspace_id: string; + readonly agent_id: string; + readonly critical: number; + readonly high: number; + readonly medium: number; + readonly results_url: string; } // From codersdk/provisionerdaemons.go @@ -1088,11 +928,11 @@ export const JobErrorCodes: JobErrorCode[] = ["REQUIRED_TEMPLATE_VARIABLES"]; // 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 @@ -1100,27 +940,21 @@ export const LicenseExpiryClaim = "license_expires"; // 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/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"; @@ -1129,199 +963,187 @@ 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 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 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; } // 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 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; } // 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/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/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/deployment.go export interface OAuth2GithubConfig { - readonly client_id: string; - readonly client_secret: string; - 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 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"; @@ -1331,114 +1153,114 @@ 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 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 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/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/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/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/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/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 @@ -1446,22 +1268,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 @@ -1471,41 +1293,41 @@ 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 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 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; } // From codersdk/client.go @@ -1516,75 +1338,60 @@ export const ProvisionerDaemonPSK = "Coder-Provisioner-Daemon-PSK"; // 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 file_id: string; - readonly tags: Record; - readonly queue_position: number; - readonly queue_size: number; + 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 file_id: string; + readonly tags: Record; + readonly queue_position: number; + readonly queue_size: number; } // 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 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 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 @@ -1620,13 +1427,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 @@ -1636,165 +1443,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" - | "delete" - | "read" - | "read_personal" - | "ssh" - | "update" - | "update_personal" - | "use" - | "view_insights" - | "start" - | "stop"; - -export const RBACActions: RBACAction[] = [ - "application_connect", - "assign", - "create", - "delete", - "read", - "read_personal", - "ssh", - "update", - "update_personal", - "use", - "view_insights", - "start", - "stop", -]; +export type RBACAction = "application_connect" | "assign" | "create" | "delete" | "read" | "read_personal" | "ssh" | "update" | "update_personal" | "use" | "view_insights" | "start" | "stop"; + +export const RBACActions: RBACAction[] = ["application_connect", "assign", "create", "delete", "read", "read_personal", "ssh", "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" - | "crypto_key" - | "debug_info" - | "deployment_config" - | "deployment_stats" - | "file" - | "group" - | "group_member" - | "idpsync_settings" - | "license" - | "notification_message" - | "notification_preference" - | "notification_template" - | "oauth2_app" - | "oauth2_app_code_token" - | "oauth2_app_secret" - | "organization" - | "organization_member" - | "provisioner_daemon" - | "provisioner_keys" - | "replicas" - | "system" - | "tailnet_coordinator" - | "template" - | "user" - | "*" - | "workspace" - | "workspace_dormant" - | "workspace_proxy"; - -export const RBACResources: RBACResource[] = [ - "api_key", - "assign_org_role", - "assign_role", - "audit_log", - "crypto_key", - "debug_info", - "deployment_config", - "deployment_stats", - "file", - "group", - "group_member", - "idpsync_settings", - "license", - "notification_message", - "notification_preference", - "notification_template", - "oauth2_app", - "oauth2_app_code_token", - "oauth2_app_secret", - "organization", - "organization_member", - "provisioner_daemon", - "provisioner_keys", - "replicas", - "system", - "tailnet_coordinator", - "template", - "user", - "*", - "workspace", - "workspace_dormant", - "workspace_proxy", -]; +export type RBACResource = "api_key" | "assign_org_role" | "assign_role" | "audit_log" | "crypto_key" | "debug_info" | "deployment_config" | "deployment_stats" | "file" | "group" | "group_member" | "idpsync_settings" | "license" | "notification_message" | "notification_preference" | "notification_template" | "oauth2_app" | "oauth2_app_code_token" | "oauth2_app_secret" | "organization" | "organization_member" | "provisioner_daemon" | "provisioner_keys" | "replicas" | "system" | "tailnet_coordinator" | "template" | "user" | "*" | "workspace" | "workspace_dormant" | "workspace_proxy"; + +export const RBACResources: RBACResource[] = ["api_key", "assign_org_role", "assign_role", "audit_log", "crypto_key", "debug_info", "deployment_config", "deployment_stats", "file", "group", "group_member", "idpsync_settings", "license", "notification_message", "notification_preference", "notification_template", "oauth2_app", "oauth2_app_code_token", "oauth2_app_secret", "organization", "organization_member", "provisioner_daemon", "provisioner_keys", "replicas", "system", "tailnet_coordinator", "template", "user", "*", "workspace", "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 @@ -1802,49 +1508,32 @@ 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" - | "license" - | "notifications_settings" - | "oauth2_provider_app" - | "oauth2_provider_app_secret" - | "organization" - | "template" - | "template_version" - | "user" - | "workspace" - | "workspace_build" - | "workspace_proxy"; +export type ResourceType = "api_key" | "convert_login" | "custom_role" | "git_ssh_key" | "group" | "health_settings" | "license" | "notifications_settings" | "oauth2_provider_app" | "oauth2_provider_app_secret" | "organization" | "template" | "template_version" | "user" | "workspace" | "workspace_build" | "workspace_proxy"; // From codersdk/audit.go export const ResourceTypeNotificationTemplate = "notification_template"; @@ -1852,41 +1541,23 @@ export const ResourceTypeNotificationTemplate = "notification_template"; // From codersdk/audit.go export const ResourceTypeOrganizationMember = "organization_member"; -export const ResourceTypes: ResourceType[] = [ - "api_key", - "convert_login", - "custom_role", - "git_ssh_key", - "group", - "health_settings", - "license", - "notifications_settings", - "oauth2_provider_app", - "oauth2_provider_app_secret", - "organization", - "template", - "template_version", - "user", - "workspace", - "workspace_build", - "workspace_proxy", -]; +export const ResourceTypes: ResourceType[] = ["api_key", "convert_login", "custom_role", "git_ssh_key", "group", "health_settings", "license", "notifications_settings", "oauth2_provider_app", "oauth2_provider_app_secret", "organization", "template", "template_version", "user", "workspace", "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 @@ -1915,8 +1586,8 @@ 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 @@ -1927,21 +1598,21 @@ 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 ssh_config_options: Record; + readonly hostname_prefix: 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 @@ -1949,30 +1620,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 @@ -1986,41 +1657,37 @@ export type SerpentValueSource = string; // 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 disable_expiry_refresh?: boolean; + readonly default_duration: number; + readonly default_token_lifetime?: number; + readonly max_token_lifetime?: number; } // From codersdk/client.go @@ -2037,98 +1704,97 @@ 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 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 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; } // 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 @@ -2138,20 +1804,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"; @@ -2170,82 +1833,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 @@ -2255,384 +1915,360 @@ 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 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 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/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/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 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; } // From codersdk/users.go export interface UpdateUserAppearanceSettingsRequest { - readonly theme_preference: string; + readonly theme_preference: string; } // 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/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 @@ -2642,481 +2278,406 @@ 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 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 latest_build: WorkspaceBuild; - 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 latest_build: WorkspaceBuild; + 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 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 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 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 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 hidden: boolean; + 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 hidden: boolean; } // 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 WorkspaceAppSharingLevel = "authenticated" | "owner" | "public"; -export const WorkspaceAppSharingLevels: WorkspaceAppSharingLevel[] = [ - "authenticated", - "owner", - "public", -]; +export const WorkspaceAppSharingLevels: WorkspaceAppSharingLevel[] = ["authenticated", "owner", "public"]; // 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 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; } // 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 @@ -3139,3 +2700,5 @@ export const safeMTU = 1378; // From codersdk/workspacedisplaystatus.go export const unknownStatus = "Unknown"; + + diff --git a/site/src/modules/workspaces/WorkspaceTiming/Chart/XAxis.tsx b/site/src/modules/workspaces/WorkspaceTiming/Chart/XAxis.tsx index 4863b08ec19bd..9ab5054957992 100644 --- a/site/src/modules/workspaces/WorkspaceTiming/Chart/XAxis.tsx +++ b/site/src/modules/workspaces/WorkspaceTiming/Chart/XAxis.tsx @@ -121,7 +121,9 @@ export const XGrid: FC = ({ columns, ...htmlProps }) => { // A dashed line is used as a background image to create the grid. // Using it as a background simplifies replication along the Y axis. -const dashedLine = (color: string) => ` +const dashedLine = ( + color: string, +) => ` `; diff --git a/site/tsconfig.json b/site/tsconfig.json index e0223fe117b2c..7e969d18c42dd 100644 --- a/site/tsconfig.json +++ b/site/tsconfig.json @@ -16,7 +16,7 @@ "skipLibCheck": true, "strict": true, "target": "es2020", - "baseUrl": "src/", + "baseUrl": "src/" }, "include": ["**/*.ts", "**/*.tsx"], "exclude": ["node_modules/", "_jest"], diff --git a/site/tsconfig.test.json b/site/tsconfig.test.json index 4e497e63e8eb6..c6f5e679af857 100644 --- a/site/tsconfig.test.json +++ b/site/tsconfig.test.json @@ -1,5 +1,5 @@ { - "extends": "./tsconfig.json", - "exclude": ["node_modules", "_jest"], - "include": ["**/*.stories.tsx", "**/*.test.tsx", "**/*.d.ts"] + "extends": "./tsconfig.json", + "exclude": ["node_modules", "_jest"], + "include": ["**/*.stories.tsx", "**/*.test.tsx", "**/*.d.ts"] } diff --git a/site/vite.config.mts b/site/vite.config.mts index d58e7538581ba..9da0221016cb1 100644 --- a/site/vite.config.mts +++ b/site/vite.config.mts @@ -1,7 +1,7 @@ -import react from "@vitejs/plugin-react"; import * as path from "node:path"; +import react from "@vitejs/plugin-react"; import { visualizer } from "rollup-plugin-visualizer"; -import { defineConfig, type PluginOption } from "vite"; +import { type PluginOption, defineConfig } from "vite"; import checker from "vite-plugin-checker"; const plugins: PluginOption[] = [