update
This commit is contained in:
@@ -27,6 +27,10 @@ export interface ListParams {
|
||||
status?: 'running' | 'closed';
|
||||
}
|
||||
|
||||
/**
|
||||
* 云原生开发环境管理模块
|
||||
* https://api.cnb.cool/#/operations/GetWorkspaceDetail
|
||||
*/
|
||||
export class Workspace extends CNBCore {
|
||||
constructor(token: string) {
|
||||
super({ token });
|
||||
@@ -137,8 +141,10 @@ export type ResultList<T> = {
|
||||
export interface WorkspaceInfo {
|
||||
/** 分支名,例如:main */
|
||||
branch: string;
|
||||
/** 业务 ID */
|
||||
business_id: string;
|
||||
/** 备份的 commit 数 */
|
||||
commit_count: number;
|
||||
commit_count: number | null;
|
||||
/** 开发环境创建时间,例如:2024-12-02T03:20:22.000Z */
|
||||
create_time: string;
|
||||
/** 开发环境持续时间,单位:ms(非实时更新) */
|
||||
@@ -147,24 +153,36 @@ export interface WorkspaceInfo {
|
||||
file_count: number;
|
||||
/** 备份的文件列表,仅前五个备份文件相对路径 */
|
||||
file_list: string;
|
||||
/** 是否为预览环境,0: 否,1: 是 */
|
||||
is_preview: number;
|
||||
/** JetBrains IDE 列表 */
|
||||
jetbrainsList: any[];
|
||||
/** 环境销毁时远程最新的 commit short hash */
|
||||
latest_sha: string;
|
||||
latest_sha: string | null;
|
||||
/** 创建环境的子流水线 id */
|
||||
pipeline_id: string;
|
||||
/** 备份的 stash 数 */
|
||||
remote_stash_count: number;
|
||||
remote_stash_count: number | null;
|
||||
/** 仓库 ID */
|
||||
repo_id: string;
|
||||
/** 仓库地址 */
|
||||
repo_url: string;
|
||||
/** 恢复备份代码的流水线 id,如果有值表示备份代码已被恢复(重建环境时会恢复备份代码) */
|
||||
restore_id: string;
|
||||
restore_id: string | null;
|
||||
/** 单个 stash 标识,1: 是,0: 否 */
|
||||
single_stash: number;
|
||||
/** 仓库路径,例如:groupname/reponame */
|
||||
slug: string;
|
||||
/** 创建开发环境的流水线 sn */
|
||||
sn: string;
|
||||
/** 开发环境是否支持 ssh 链接 */
|
||||
ssh: boolean;
|
||||
/** 本地 stash 数 */
|
||||
stash_count: number;
|
||||
/** 工作区状态,running: 开发环境已启动,closed:开发环境已关闭 */
|
||||
status: string;
|
||||
/** 用户名 */
|
||||
user_name: string;
|
||||
/** 开发环境默认工作区路径 */
|
||||
workspace: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user