mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add user secrets SDK types and db2sdk converters (#24102)
Adds the SDK types and database-to-SDK conversion helpers for the user secrets feature.
This commit is contained in:
Generated
+43
@@ -2811,6 +2811,20 @@ export interface CreateUserRequestWithOrgs {
|
||||
readonly service_account?: boolean;
|
||||
}
|
||||
|
||||
// From codersdk/usersecrets.go
|
||||
/**
|
||||
* CreateUserSecretRequest is the payload for creating a new user
|
||||
* secret. Name and Value are required. All other fields are optional
|
||||
* and default to empty string.
|
||||
*/
|
||||
export interface CreateUserSecretRequest {
|
||||
readonly name: string;
|
||||
readonly value: string;
|
||||
readonly description?: string;
|
||||
readonly env_name?: string;
|
||||
readonly file_path?: string;
|
||||
}
|
||||
|
||||
// From codersdk/workspaces.go
|
||||
export type CreateWorkspaceBuildReason =
|
||||
| "cli"
|
||||
@@ -7686,6 +7700,20 @@ export interface UpdateUserQuietHoursScheduleRequest {
|
||||
readonly schedule: string;
|
||||
}
|
||||
|
||||
// From codersdk/usersecrets.go
|
||||
/**
|
||||
* UpdateUserSecretRequest is the payload for partially updating a
|
||||
* user secret. At least one field must be non-nil. Pointer fields
|
||||
* distinguish "not sent" (nil) from "set to empty string" (pointer
|
||||
* to empty string).
|
||||
*/
|
||||
export interface UpdateUserSecretRequest {
|
||||
readonly value?: string;
|
||||
readonly description?: string;
|
||||
readonly env_name?: string;
|
||||
readonly file_path?: string;
|
||||
}
|
||||
|
||||
// From codersdk/workspaces.go
|
||||
export interface UpdateWorkspaceACL {
|
||||
/**
|
||||
@@ -8038,6 +8066,21 @@ export interface UserRoles {
|
||||
readonly organization_roles: Record<string, string[]>;
|
||||
}
|
||||
|
||||
// From codersdk/usersecrets.go
|
||||
/**
|
||||
* UserSecret represents a user secret's metadata. The secret value
|
||||
* is never included in API responses.
|
||||
*/
|
||||
export interface UserSecret {
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly description: string;
|
||||
readonly env_name: string;
|
||||
readonly file_path: string;
|
||||
readonly created_at: string;
|
||||
readonly updated_at: string;
|
||||
}
|
||||
|
||||
// From codersdk/users.go
|
||||
export type UserStatus = "active" | "dormant" | "suspended";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user