mirror of
https://github.com/coder/coder.git
synced 2026-10-24 01:26:25 +08:00
feat: workspace quotas (#4184)
This commit is contained in:
@@ -500,3 +500,8 @@ export const getApplicationsHost = async (): Promise<TypesGen.GetAppHostResponse
|
||||
const response = await axios.get(`/api/v2/applications/host`)
|
||||
return response.data
|
||||
}
|
||||
|
||||
export const getWorkspaceQuota = async (userID: string): Promise<TypesGen.WorkspaceQuota> => {
|
||||
const response = await axios.get(`/api/v2/workspace-quota/${userID}`)
|
||||
return response.data
|
||||
}
|
||||
|
||||
@@ -20,4 +20,6 @@ export enum FeatureNames {
|
||||
AuditLog = "audit_log",
|
||||
UserLimit = "user_limit",
|
||||
BrowserOnly = "browser_only",
|
||||
SCIM = "scim",
|
||||
WorkspaceQuota = "workspace_quota",
|
||||
}
|
||||
|
||||
@@ -641,6 +641,12 @@ export interface WorkspaceOptions {
|
||||
readonly include_deleted?: boolean
|
||||
}
|
||||
|
||||
// From codersdk/workspacequota.go
|
||||
export interface WorkspaceQuota {
|
||||
readonly user_workspace_count: number
|
||||
readonly user_workspace_limit: number
|
||||
}
|
||||
|
||||
// From codersdk/workspaceresources.go
|
||||
export interface WorkspaceResource {
|
||||
readonly id: string
|
||||
|
||||
Reference in New Issue
Block a user