747 lines
20 KiB
JavaScript
747 lines
20 KiB
JavaScript
// @ts-check
|
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
// This file is automatically generated. DO NOT EDIT
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Unused imports
|
|
import { Create as $Create } from "@wailsio/runtime";
|
|
|
|
/**
|
|
* BatchPullResult 批量 pull 结果
|
|
*/
|
|
export class BatchPullResult {
|
|
/**
|
|
* Creates a new BatchPullResult instance.
|
|
* @param {Partial<BatchPullResult>} [$$source = {}] - The source object to create the BatchPullResult.
|
|
*/
|
|
constructor($$source = {}) {
|
|
if (!("name" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["name"] = "";
|
|
}
|
|
if (!("path" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["path"] = "";
|
|
}
|
|
if (!("success" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {boolean}
|
|
*/
|
|
this["success"] = false;
|
|
}
|
|
if (!("message" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["message"] = "";
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new BatchPullResult instance from a string or object.
|
|
* @param {any} [$$source = {}]
|
|
* @returns {BatchPullResult}
|
|
*/
|
|
static createFrom($$source = {}) {
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
return new BatchPullResult(/** @type {Partial<BatchPullResult>} */($$parsedSource));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* BranchInfo 分支信息
|
|
*/
|
|
export class BranchInfo {
|
|
/**
|
|
* Creates a new BranchInfo instance.
|
|
* @param {Partial<BranchInfo>} [$$source = {}] - The source object to create the BranchInfo.
|
|
*/
|
|
constructor($$source = {}) {
|
|
if (!("name" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["name"] = "";
|
|
}
|
|
if (!("current" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {boolean}
|
|
*/
|
|
this["current"] = false;
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new BranchInfo instance from a string or object.
|
|
* @param {any} [$$source = {}]
|
|
* @returns {BranchInfo}
|
|
*/
|
|
static createFrom($$source = {}) {
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
return new BranchInfo(/** @type {Partial<BranchInfo>} */($$parsedSource));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* CommitFileInfo 提交中的文件变更信息
|
|
*/
|
|
export class CommitFileInfo {
|
|
/**
|
|
* Creates a new CommitFileInfo instance.
|
|
* @param {Partial<CommitFileInfo>} [$$source = {}] - The source object to create the CommitFileInfo.
|
|
*/
|
|
constructor($$source = {}) {
|
|
if (!("status" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["status"] = "";
|
|
}
|
|
if (!("filePath" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["filePath"] = "";
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new CommitFileInfo instance from a string or object.
|
|
* @param {any} [$$source = {}]
|
|
* @returns {CommitFileInfo}
|
|
*/
|
|
static createFrom($$source = {}) {
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
return new CommitFileInfo(/** @type {Partial<CommitFileInfo>} */($$parsedSource));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* CommitLog 提交记录
|
|
*/
|
|
export class CommitLog {
|
|
/**
|
|
* Creates a new CommitLog instance.
|
|
* @param {Partial<CommitLog>} [$$source = {}] - The source object to create the CommitLog.
|
|
*/
|
|
constructor($$source = {}) {
|
|
if (!("hash" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["hash"] = "";
|
|
}
|
|
if (!("shortHash" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["shortHash"] = "";
|
|
}
|
|
if (!("author" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["author"] = "";
|
|
}
|
|
if (!("email" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["email"] = "";
|
|
}
|
|
if (!("timestamp" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {number}
|
|
*/
|
|
this["timestamp"] = 0;
|
|
}
|
|
if (!("message" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["message"] = "";
|
|
}
|
|
if (!("pushed" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {boolean}
|
|
*/
|
|
this["pushed"] = false;
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new CommitLog instance from a string or object.
|
|
* @param {any} [$$source = {}]
|
|
* @returns {CommitLog}
|
|
*/
|
|
static createFrom($$source = {}) {
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
return new CommitLog(/** @type {Partial<CommitLog>} */($$parsedSource));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* ConflictFileInfo 冲突文件信息
|
|
*/
|
|
export class ConflictFileInfo {
|
|
/**
|
|
* Creates a new ConflictFileInfo instance.
|
|
* @param {Partial<ConflictFileInfo>} [$$source = {}] - The source object to create the ConflictFileInfo.
|
|
*/
|
|
constructor($$source = {}) {
|
|
if (!("filePath" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["filePath"] = "";
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new ConflictFileInfo instance from a string or object.
|
|
* @param {any} [$$source = {}]
|
|
* @returns {ConflictFileInfo}
|
|
*/
|
|
static createFrom($$source = {}) {
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
return new ConflictFileInfo(/** @type {Partial<ConflictFileInfo>} */($$parsedSource));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* FileInfo 文件信息
|
|
*/
|
|
export class FileInfo {
|
|
/**
|
|
* Creates a new FileInfo instance.
|
|
* @param {Partial<FileInfo>} [$$source = {}] - The source object to create the FileInfo.
|
|
*/
|
|
constructor($$source = {}) {
|
|
if (!("status" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["status"] = "";
|
|
}
|
|
if (!("statusText" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["statusText"] = "";
|
|
}
|
|
if (!("filePath" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["filePath"] = "";
|
|
}
|
|
if (!("staged" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {boolean}
|
|
*/
|
|
this["staged"] = false;
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new FileInfo instance from a string or object.
|
|
* @param {any} [$$source = {}]
|
|
* @returns {FileInfo}
|
|
*/
|
|
static createFrom($$source = {}) {
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
return new FileInfo(/** @type {Partial<FileInfo>} */($$parsedSource));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* GitConfig Git 全局配置
|
|
*/
|
|
export class GitConfig {
|
|
/**
|
|
* Creates a new GitConfig instance.
|
|
* @param {Partial<GitConfig>} [$$source = {}] - The source object to create the GitConfig.
|
|
*/
|
|
constructor($$source = {}) {
|
|
if (!("userName" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["userName"] = "";
|
|
}
|
|
if (!("userEmail" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["userEmail"] = "";
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new GitConfig instance from a string or object.
|
|
* @param {any} [$$source = {}]
|
|
* @returns {GitConfig}
|
|
*/
|
|
static createFrom($$source = {}) {
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
return new GitConfig(/** @type {Partial<GitConfig>} */($$parsedSource));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* GitStatus Git 安装状态
|
|
*/
|
|
export class GitStatus {
|
|
/**
|
|
* Creates a new GitStatus instance.
|
|
* @param {Partial<GitStatus>} [$$source = {}] - The source object to create the GitStatus.
|
|
*/
|
|
constructor($$source = {}) {
|
|
if (!("installed" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {boolean}
|
|
*/
|
|
this["installed"] = false;
|
|
}
|
|
if (!("version" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["version"] = "";
|
|
}
|
|
if (!("path" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["path"] = "";
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new GitStatus instance from a string or object.
|
|
* @param {any} [$$source = {}]
|
|
* @returns {GitStatus}
|
|
*/
|
|
static createFrom($$source = {}) {
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
return new GitStatus(/** @type {Partial<GitStatus>} */($$parsedSource));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* PlatformInfo 平台信息
|
|
*/
|
|
export class PlatformInfo {
|
|
/**
|
|
* Creates a new PlatformInfo instance.
|
|
* @param {Partial<PlatformInfo>} [$$source = {}] - The source object to create the PlatformInfo.
|
|
*/
|
|
constructor($$source = {}) {
|
|
if (!("name" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["name"] = "";
|
|
}
|
|
if (!("baseUrl" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["baseUrl"] = "";
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new PlatformInfo instance from a string or object.
|
|
* @param {any} [$$source = {}]
|
|
* @returns {PlatformInfo}
|
|
*/
|
|
static createFrom($$source = {}) {
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
return new PlatformInfo(/** @type {Partial<PlatformInfo>} */($$parsedSource));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* ProjectOverview 项目概览信息(轻量级)
|
|
*/
|
|
export class ProjectOverview {
|
|
/**
|
|
* Creates a new ProjectOverview instance.
|
|
* @param {Partial<ProjectOverview>} [$$source = {}] - The source object to create the ProjectOverview.
|
|
*/
|
|
constructor($$source = {}) {
|
|
if (!("key" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["key"] = "";
|
|
}
|
|
if (!("name" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["name"] = "";
|
|
}
|
|
if (!("path" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["path"] = "";
|
|
}
|
|
if (!("branch" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["branch"] = "";
|
|
}
|
|
if (!("hasChanges" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {boolean}
|
|
*/
|
|
this["hasChanges"] = false;
|
|
}
|
|
if (!("unpushed" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {number}
|
|
*/
|
|
this["unpushed"] = 0;
|
|
}
|
|
if (/** @type {any} */(false)) {
|
|
/**
|
|
* @member
|
|
* @type {string | undefined}
|
|
*/
|
|
this["error"] = undefined;
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new ProjectOverview instance from a string or object.
|
|
* @param {any} [$$source = {}]
|
|
* @returns {ProjectOverview}
|
|
*/
|
|
static createFrom($$source = {}) {
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
return new ProjectOverview(/** @type {Partial<ProjectOverview>} */($$parsedSource));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* ProjectStatus 项目状态信息
|
|
*/
|
|
export class ProjectStatus {
|
|
/**
|
|
* Creates a new ProjectStatus instance.
|
|
* @param {Partial<ProjectStatus>} [$$source = {}] - The source object to create the ProjectStatus.
|
|
*/
|
|
constructor($$source = {}) {
|
|
if (!("branch" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["branch"] = "";
|
|
}
|
|
if (!("remoteUrl" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["remoteUrl"] = "";
|
|
}
|
|
if (!("changedFiles" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {FileInfo[]}
|
|
*/
|
|
this["changedFiles"] = [];
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new ProjectStatus instance from a string or object.
|
|
* @param {any} [$$source = {}]
|
|
* @returns {ProjectStatus}
|
|
*/
|
|
static createFrom($$source = {}) {
|
|
const $$createField2_0 = $$createType1;
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
if ("changedFiles" in $$parsedSource) {
|
|
$$parsedSource["changedFiles"] = $$createField2_0($$parsedSource["changedFiles"]);
|
|
}
|
|
return new ProjectStatus(/** @type {Partial<ProjectStatus>} */($$parsedSource));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* StashInfo 贮藏信息
|
|
*/
|
|
export class StashInfo {
|
|
/**
|
|
* Creates a new StashInfo instance.
|
|
* @param {Partial<StashInfo>} [$$source = {}] - The source object to create the StashInfo.
|
|
*/
|
|
constructor($$source = {}) {
|
|
if (!("index" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {number}
|
|
*/
|
|
this["index"] = 0;
|
|
}
|
|
if (!("ref" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["ref"] = "";
|
|
}
|
|
if (!("message" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["message"] = "";
|
|
}
|
|
if (!("timestamp" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {number}
|
|
*/
|
|
this["timestamp"] = 0;
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new StashInfo instance from a string or object.
|
|
* @param {any} [$$source = {}]
|
|
* @returns {StashInfo}
|
|
*/
|
|
static createFrom($$source = {}) {
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
return new StashInfo(/** @type {Partial<StashInfo>} */($$parsedSource));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* TagInfo 标签信息
|
|
*/
|
|
export class TagInfo {
|
|
/**
|
|
* Creates a new TagInfo instance.
|
|
* @param {Partial<TagInfo>} [$$source = {}] - The source object to create the TagInfo.
|
|
*/
|
|
constructor($$source = {}) {
|
|
if (!("name" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["name"] = "";
|
|
}
|
|
if (!("hash" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["hash"] = "";
|
|
}
|
|
if (!("timestamp" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {number}
|
|
*/
|
|
this["timestamp"] = 0;
|
|
}
|
|
if (!("message" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["message"] = "";
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new TagInfo instance from a string or object.
|
|
* @param {any} [$$source = {}]
|
|
* @returns {TagInfo}
|
|
*/
|
|
static createFrom($$source = {}) {
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
return new TagInfo(/** @type {Partial<TagInfo>} */($$parsedSource));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* TreeNode 前端侧边栏树节点
|
|
*/
|
|
export class TreeNode {
|
|
/**
|
|
* Creates a new TreeNode instance.
|
|
* @param {Partial<TreeNode>} [$$source = {}] - The source object to create the TreeNode.
|
|
*/
|
|
constructor($$source = {}) {
|
|
if (!("key" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["key"] = "";
|
|
}
|
|
if (!("label" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["label"] = "";
|
|
}
|
|
if (!("type" in $$source)) {
|
|
/**
|
|
* platform, user, project
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["type"] = "";
|
|
}
|
|
if (/** @type {any} */(false)) {
|
|
/**
|
|
* @member
|
|
* @type {string | undefined}
|
|
*/
|
|
this["path"] = undefined;
|
|
}
|
|
if (/** @type {any} */(false)) {
|
|
/**
|
|
* @member
|
|
* @type {TreeNode[] | undefined}
|
|
*/
|
|
this["children"] = undefined;
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new TreeNode instance from a string or object.
|
|
* @param {any} [$$source = {}]
|
|
* @returns {TreeNode}
|
|
*/
|
|
static createFrom($$source = {}) {
|
|
const $$createField4_0 = $$createType3;
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
if ("children" in $$parsedSource) {
|
|
$$parsedSource["children"] = $$createField4_0($$parsedSource["children"]);
|
|
}
|
|
return new TreeNode(/** @type {Partial<TreeNode>} */($$parsedSource));
|
|
}
|
|
}
|
|
|
|
/**
|
|
* UserInfo 用户信息
|
|
*/
|
|
export class UserInfo {
|
|
/**
|
|
* Creates a new UserInfo instance.
|
|
* @param {Partial<UserInfo>} [$$source = {}] - The source object to create the UserInfo.
|
|
*/
|
|
constructor($$source = {}) {
|
|
if (!("username" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["username"] = "";
|
|
}
|
|
if (!("token" in $$source)) {
|
|
/**
|
|
* @member
|
|
* @type {string}
|
|
*/
|
|
this["token"] = "";
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new UserInfo instance from a string or object.
|
|
* @param {any} [$$source = {}]
|
|
* @returns {UserInfo}
|
|
*/
|
|
static createFrom($$source = {}) {
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
return new UserInfo(/** @type {Partial<UserInfo>} */($$parsedSource));
|
|
}
|
|
}
|
|
|
|
// Private type creation functions
|
|
const $$createType0 = FileInfo.createFrom;
|
|
const $$createType1 = $Create.Array($$createType0);
|
|
const $$createType2 = TreeNode.createFrom;
|
|
const $$createType3 = $Create.Array($$createType2);
|