UNPKG

node-cnb

Version:

node sdk for cnb open api

2,540 lines (2,094 loc) 96 kB
export type ApiBlob = { sha: string; }; export type ApiBranch = { commit: { sha: string; }; name: string; protected: boolean; }; export type ApiBranchDetail = { commit: ApiCommit; name: string; protected: boolean; }; export type ApiBranchProtection = { allow_creation: boolean; allow_deletions: boolean; allow_force_pushes: boolean; allow_master_creation: boolean; allow_master_deletions: boolean; allow_master_force_pushes: boolean; allow_master_manual_merge: boolean; allow_master_pushes: boolean; allow_pushes: boolean; id: string; required_approved_review_count: number; required_approved_review_ratio: number; required_commit_signatures: boolean; required_linear_history: boolean; required_master_approve: boolean; required_must_auto_merge: boolean; required_must_push_via_pull_request: boolean; required_pull_request_reviews: boolean; required_status_checks: boolean; rule: string; }; export type ApiCommit = { author: GitWoaComCnbMonorepoGitInternalAppGitServiceBffApiUserInfo; commit: ApiCommitObject; committer: GitWoaComCnbMonorepoGitInternalAppGitServiceBffApiUserInfo; parents: ApiCommitParent[]; sha: string; }; export type ApiCommitAsset = { author: GitWoaComCnbMonorepoGitInternalAppGitServiceBffApiUserInfo; content_type: string; created_at: string; id: string; name: string; path: string; size_in_byte: number; updated_at: string; }; export type ApiCommitDiffFilePatch = { additions: number; deletions: number; name: string; patch: string; path: string; status: string; }; export type ApiCommitObject = { author: ApiSignature; comment_count: number; committer: ApiSignature; message: string; tree: ApiCommitObjectTree; verification: ApiCommitObjectVerification; }; export type ApiCommitObjectTree = { sha: string; }; export type ApiCommitObjectVerification = { payload: string; reason: string; signature: string; verified: boolean; verified_at: string; }; export type ApiCommitParent = { sha: string; }; export type ApiCommitRefs = { has_more: boolean; refs: string[]; }; export type ApiCommitStatus = { context: string; created_at: string; description: string; state: string; target_url: string; updated_at: string; }; export type ApiCompareResponse = { base_commit: ApiCommit; commits: ApiCommit[]; files: ApiCommitDiffFilePatch[]; head_commit: ApiCommit; merge_base_commit: ApiCommit; total_commits: number; }; export type ApiContent = { content: string; encoding: string; entries: ApiTreeEntry[]; lfs_download_url: string; name: string; path: string; sha: string; size: number; type: string; }; export type ApiDeleteIssueAssigneesForm = { assignees: string[]; }; export type ApiDeletePullAssigneesForm = { assignees: string[]; }; export type ApiIssue = { assignees: GitWoaComCnbMonorepoGitInternalAppVcsServiceBffApiUserInfo[]; author: GitWoaComCnbMonorepoGitInternalAppVcsServiceBffApiUserInfo; comment_count: number; created_at: string; ended_at: string; labels: ApiLabel[]; last_acted_at: string; number: string; priority: string; started_at: string; state: string; state_reason: string; title: string; updated_at: string; }; export type ApiIssueComment = { author: GitWoaComCnbMonorepoGitInternalAppVcsServiceBffApiUserInfo; body: string; created_at: string; id: string; updated_at: string; }; export type ApiIssueDetail = { assignees: GitWoaComCnbMonorepoGitInternalAppVcsServiceBffApiUserInfo[]; author: GitWoaComCnbMonorepoGitInternalAppVcsServiceBffApiUserInfo; body: string; comment_count: number; created_at: string; ended_at: string; labels: ApiLabel[]; last_acted_at: string; number: string; priority: string; started_at: string; state: string; state_reason: string; title: string; updated_at: string; }; export type ApiLabel = { color: string; description: string; id: string; name: string; }; export type ApiMergePullRequest = { commit_message: string; commit_title: string; /**The merge method to use. Can be one of: `merge`, `squash`, `rebase`*/ merge_style: string; }; export type ApiMergePullResponse = { merged: boolean; message: string; sha: string; }; export type ApiPatchIssueCommentForm = { body: string; }; export type ApiPatchIssueForm = { body: string; /**Priority of this issue. Can be one of: `p0`, `p1`, `p2`, `p3`, `""`.*/ priority: string; /**State of this issue. Either `open` or `closed`.*/ state: string; /**StateReason can be one of: `completed`, `not_planned`, `reopened`*/ state_reason: string; title: string; }; export type ApiPatchLabelForm = { /**The hexadecimal color code for the label, without the leading `#`.*/ color: string; description: string; new_name: string; }; export type ApiPatchPullRequest = { body: string; /**State of this Pull Request. Either `open` or `closed`.*/ state: string; title: string; }; export type ApiPipelineSettings = { auto_trigger: boolean; forked_repo_auto_trigger: boolean; }; export type ApiPostBlobForm = { content: string; /**当前编码只支持 `"utf-8"` and `"base64"` 。默认: `utf-8`*/ encoding: string; }; export type ApiPostIssueAssigneesForm = { assignees: string[]; }; export type ApiPostIssueCommentForm = { body: string; }; export type ApiPostIssueForm = { assignees: string[]; body: string; end_date: string; labels: string[]; /**Priority of this issue. Can be one of: `p0`, `p1`, `p2`, `p3`, `""`.*/ priority: string; start_date: string; title: string; }; export type ApiPostIssueLabelsForm = { labels: string[]; }; export type ApiPostLabelForm = { /**The hexadecimal color code for the label, without the leading `#`.*/ color: string; description: string; name: string; }; export type ApiPostPullAssigneesForm = { assignees: string[]; }; export type ApiPostPullLabelsForm = { labels: string[]; }; export type ApiPostTagFrom = { message: string; name: string; target: string; }; export type ApiPull = { base: ApiPullRef; body: string; head: ApiPullRef; merged_by: GitWoaComCnbMonorepoGitInternalAppGitServiceBffApiUserInfo; number: string; state: string; title: string; }; export type ApiPullCommentCreationForm = { body: string; }; export type ApiPullCreationForm = { base: string; body: string; head: string; head_repo: string; title: string; }; export type ApiPullRef = { ref: string; repo: ApiRepo; sha: string; }; export type ApiPullRefInfo = { ref: string; repo: ApiRepoInfo; sha: string; }; export type ApiPullRequest = { assignees: GitWoaComCnbMonorepoGitInternalAppGitServiceBffApiUserInfo[]; author: GitWoaComCnbMonorepoGitInternalAppGitServiceBffApiUserInfo; base: ApiPullRef; blocked_on: string; comment_count: number; created_at: string; head: ApiPullRef; last_acted_at: string; mergeable_state: string; merged_by: GitWoaComCnbMonorepoGitInternalAppGitServiceBffApiUserInfo; number: string; repo: ApiRepo; review_count: number; state: string; title: string; updated_at: string; }; export type ApiPullRequestComment = { author: GitWoaComCnbMonorepoGitInternalAppGitServiceBffApiUserInfo; body: string; created_at: string; updated_at: string; }; export type ApiPullRequestInfo = { assignees: GitWoaComCnbMonorepoGitInternalAppVcsServiceBffApiUserInfo[]; author: GitWoaComCnbMonorepoGitInternalAppVcsServiceBffApiUserInfo; base: ApiPullRefInfo; blocked_on: string; created_at: string; head: ApiPullRefInfo; last_acted_at: string; mergeable_state: string; merged_by: GitWoaComCnbMonorepoGitInternalAppVcsServiceBffApiUserInfo; number: string; repo: ApiRepoInfo; reviewers: GitWoaComCnbMonorepoGitInternalAppVcsServiceBffApiUserInfo[]; state: string; title: string; updated_at: string; }; export type ApiPullRequestSettings = { allow_merge_commit_merge: boolean; allow_rebase_merge: boolean; allow_squash_merge: boolean; master_auto_as_reviewer: boolean; merge_commit_message_style: string; squash_commit_message_style: string; }; export type ApiPullReviewCommentCreationForm = { body: string; end_line: number; end_side: string; path: string; start_line: number; start_side: string; /**can be one of: line, file*/ subject_type: string; }; export type ApiPullReviewCreationForm = { body: string; comments: ApiPullReviewCommentCreationForm[]; event: string; }; export type ApiPushLimitSettings = { allow_single_push_number: number; check_single_push_number: boolean; only_master_can_push_tag: boolean; push_commit_must_be: string; }; export type ApiPutIssueLabelsForm = { labels: string[]; }; export type ApiPutPullLabelsForm = { labels: string[]; }; export type ApiRelease = { assets: ApiReleaseAsset[]; author: GitWoaComCnbMonorepoGitInternalAppGitServiceBffApiUserInfo; body: string; created_at: string; draft: boolean; id: string; is_latest: boolean; name: string; prerelease: boolean; published_at: string; tag_commitish: string; tag_name: string; updated_at: string; }; export type ApiReleaseAsset = { content_type: string; created_at: string; id: string; name: string; path: string; size: number; updated_at: string; uploader: GitWoaComCnbMonorepoGitInternalAppGitServiceBffApiUserInfo; }; export type ApiRepo = { id: string; name: string; path: string; web_url: string; }; export type ApiRepoInfo = { id: string; name: string; path: string; web_url: string; }; export type ApiSignature = { date: string; email: string; name: string; }; export type ApiTag = { commit: ApiCommit; name: string; target: string; target_type: string; verification: ApiTagObjectVerification; }; export type ApiTagObjectVerification = { payload: string; reason: string; signature: string; verified: boolean; verified_at: string; }; export type ApiTreeEntry = { name: string; path: string; sha: string; type: string; }; export type ChartDependency = { /**Alias usable alias to be used for the chart*/ alias: string; /**A yaml path that resolves to a boolean, used for enabling/disabling charts (e.g. subchart1.enabled )*/ condition: string; /**Enabled bool determines if chart should be loaded*/ enabled: boolean; /**ImportValues holds the mapping of source values to parent key to be imported. Each item can be a string or pair of child/parent sublist items.*/ "import-values": any[]; /**Name is the name of the dependency. This must mach the name in the dependency's Chart.yaml.*/ name: string; /**The URL to the repository. Appending `index.yaml` to this string should result in a URL that can be used to fetch the repository index.*/ repository: string; /**Tags can be used to group charts for enabling/disabling together*/ tags: string[]; /**Version is the version (range) of this chart. A lock file will always produce a single version, while a dependency may contain a semantic version range.*/ version: string; }; export type ChartMaintainer = { /**Email is an optional email address to contact the named maintainer*/ email: string; /**Name is a user name or organization name*/ name: string; /**URL is an optional URL to an address for the named maintainer*/ url: string; }; export type ChartMetadata = { /**Annotations are additional mappings uninterpreted by Helm, made available for inspection by other applications.*/ annotations: any; /**The API Version of this chart. Required.*/ apiVersion: string; /**The version of the application enclosed inside of this chart.*/ appVersion: string; /**The condition to check to enable chart*/ condition: string; /**Dependencies are a list of dependencies for a chart.*/ dependencies: ChartDependency[]; /**Whether or not this chart is deprecated*/ deprecated: boolean; /**A one-sentence description of the chart*/ description: string; /**The URL to a relevant project page, git repo, or contact person*/ home: string; /**The URL to an icon file.*/ icon: string; /**A list of string keywords*/ keywords: string[]; /**KubeVersion is a SemVer constraint specifying the version of Kubernetes required.*/ kubeVersion: string; /**A list of name and URL/email address combinations for the maintainer(s)*/ maintainers: ChartMaintainer[]; /**The name of the chart. Required.*/ name: string; /**Source is the URL to the source code of this chart*/ sources: string[]; /**The tags to check to enable chart*/ tags: string; /**Specifies the chart type: application or library*/ type: string; /**A SemVer 2 conformant version string of the chart. Required.*/ version: string; }; export type ConstantAccessRole = 0 | 10 | 20 | 30 | 40 | 50; export type ConstantActivityType = | "mine" | "fork" | "follow" | "star" | "join_group" | "create_repo" | "user_create_release" | "repo_create_release" | "user_deploy_success" | "repo_deploy_success"; export type ConstantBudgetSts = 1 | 2 | 3 | 4; export type ConstantChargeResType = | "charge_type_git" | "charge_type_object" | "charge_type_ci" | "charge_type_dev"; export type ConstantRepoDisplayModule = 1 | 2 | 4; export type ConstantRepoStatus = 0 | 1 | 2; export type ConstantSearchResourceType = 0 | 1 | 2 | 3 | 4 | 5; export type ConstantSlugType = 0 | 1 | 2 | 3 | 4; export type ConstantUserEditable = 1 | 2 | 4 | 8 | 16 | 32; export type ConstantUserType = 0 | 1 | 2 | 3; export type ConstantVisibility = 0 | 10 | 20; export type ConvertNullTime = { time: string; /**Valid is true if Time is not NULL*/ valid: boolean; }; export type DieWebErr = { errcode: number; errmsg: string; errparam: any; }; export type DieWebError = { errcode: number; errmsg: string; errparam: any; }; export type DtoAccessTokenItem = { created_at: string; description: string; expired_at: string; last_activity_at: string; resource_type: ConstantSlugType; scope: string; slug: string; title: string; token_fragment: string; /**id 的 string 格式,用于兼容前端 int64 支持*/ token_id: string; }; export type DtoAccessTokenPatchPayload = { description: string; }; export type DtoAccessTokenPayload = { description: string; expired_at: ConvertNullTime; scope: string; slug: string; token: string; }; export type DtoActivityCalendar = any; export type DtoActivityCalendarDate = { commit_count: number; issues_count: number; pr_count: number; score: number; /**有效cr数,代码评审通过且对应的pr被合入*/ valid_cr_count: number; /**有效pr数,已被合入,且pr具有至少一个已通过的代码评审*/ valid_pr_count: number; }; export type DtoActivityCreateRepoDetail = { create_at: string; /**公仓转私仓或仓库被删除后为 null*/ detail: any; /**activity 发生时仓库的 path,这时的 path 是可以公开的*/ exposed_repo_path: string; /**仓库是否封禁*/ freeze: boolean; /**仓库是否不可访问(公仓转私仓或仓库被删除后不可访问)*/ repo_unaccessible: boolean; /**仓库可见性*/ visibility_level: any; }; export type DtoActivityDate = { code_review_count: number; code_reviews: DtoActivityRepoDetail[]; commit_count: number; commits: DtoActivityRepoDetail[]; group_count: number; groups: DtoActivityJoinGroupDetail[]; issues: DtoActivityRepoDetail[]; issues_count: number; private_score: number; pull_request_count: number; pull_requests: DtoActivityRepoDetail[]; repo_count: number; repos: DtoActivityCreateRepoDetail[]; }; export type DtoActivityJoinGroupDetail = { create_at: string; /**组织详情,组织被删后为 null*/ detail: any; /**组织别名,组织被删除后才有值*/ remark: string; }; export type DtoActivityMineData = { activity_type: ConstantActivityType; created_at: ConvertNullTime; repo: DtoActivityRepos; user: DtoActivityUsers; }; export type DtoActivityRelease = { commit_hash: string; tag: string; title: string; }; export type DtoActivityRepoDetail = { /**公仓转私仓或仓库被删除后为 null*/ detail: any; /**activity 发生时仓库的 path,这时的 path 是可以公开的*/ exposed_repo_path: string; /**仓库是否封禁*/ freeze: boolean; /**仓库是否不可访问(公仓转私仓或仓库被删除后不可访问)*/ repo_unaccessible: boolean; time: number; /**仓库可见性*/ visibility_level: any; }; export type DtoActivityRepos = { created_at: string; description: string; display_module: ConstantRepoDisplayModule; fork_count: number; fork_target: string; forked_from: string; freeze: boolean; id: number; is_star: boolean; /**仓库程序语言,预留*/ language: string; /**最新代码更新时间*/ last_updated_at: any; license: string; mark_count: number; name: string; path: string; site: string; star_count: number; status: any; topics: string; updated_at: string; visibility_level: ConstantVisibility; }; export type DtoActivitySlugDetail = { /**完整仓库路径*/ path: string; }; export type DtoActivityTotal = { activity_type: ConstantActivityType; unread: boolean; users: string[]; }; export type DtoActivityUsers = { address: string; /**用户赞赏码状态,0-无赞赏码,1-有*/ appreciate_status: number; avatar: string; bio: string; company: string; created_at: string; email: string; follow_count: number; follow_mission_count: number; follow_repo_count: number; follower_count: number; freeze: boolean; gender: number; group_count: number; id: string; is_follow: boolean; location: string; lock: boolean; mission_count: number; nickname: string; registry_count: number; repo_count: number; reward_amount: number; reward_count: number; site: string; stars_count: number; type: ConstantUserType; username: string; /**认证类型*/ verified: number; /**认证过期时间*/ verified_expire_in: string; wechat_mp: string; wechat_mp_qrcode: string; }; export type DtoActivityWorkflowData = { activity_type: ConstantActivityType; created_at: ConvertNullTime; group: DtoOrganizationUnion; release: DtoActivityRelease; repo: DtoActivityRepos; user: DtoActivityUsers; }; export type DtoAnnouncement = { announcement_msg: string; created_at: string; expired_at: string; id: string; pinned: number; title: string; updated_at: string; }; export type DtoArtifactStatus = { status: string; }; export type DtoAssetRecords = { id: string; /**来源地址,例如 release 附件的来源地址是对应的 release 页面。issue和pr文件没有。*/ origin_path: string; path: string; referer: string; size_in_byte: number; }; export type DtoAssetSize = { used_in_byte: string; }; export type DtoAssets = { content_type: string; name: string; path: string; size: number; }; export type DtoBindResources = { app_id: string; created_at: string; metadata: string; openid: string; updated_at: string; }; export type DtoBindUsers = { app_id: string; created_at: string; metadata: string; openid: string; updated_at: string; }; export type DtoBoolResponse = { message: string; result: boolean; }; export type DtoBoolResponseWithDataMapConstantSlugTypeInt64 = { data: MapConstantSlugTypeInt64; message: string; result: boolean; }; export type DtoBudget = { /**单位:核时*/ charge_type_ci: number; charge_type_dev: number; /**单位:Gib*/ charge_type_git: number; charge_type_object: number; /**预算单名称*/ name: string; /**预算单状态,1-正常,2-隔离,3-销毁*/ status: any; /**云账号id*/ uin: string; }; export type DtoBudgetItemPrice = { price: number; /**用量,单位:GiB/核时*/ vol: number; }; export type DtoBuildLogsResult = { /**构建数据列表*/ data: DtoLogInfo[]; /**当前仓库是否已经有构建记录,1 表示有构建记录,0 表示没有构建记录*/ init: boolean; /**当前时间戳*/ timestamp: number; /**总数*/ total: number; }; export type DtoBuildResult = { /**构建链接*/ buildLogUrl: string; /**message*/ message: string; /**构建号*/ sn: string; }; export type DtoBuildStatusResult = { /**流水线的状态*/ pipelinesStatus: any; /**构建状态*/ status: string; }; export type DtoCnbRegistry = { artifact_policy: "all" | "snapshot" | "release"; created_at: string; description: string; freeze: boolean; id: string; kind: string; last_push_time: string; last_push_user: DtoUsers; name: string; overwrite_policy: "forbid" | "allow"; pkg_count: number; updated_at: string; used_size: number; visibility_level: ConstantVisibility; }; export type DtoChartPackageDetail = { address: string; desc: string; last_pusher: DtoLastPusher; package: string; pull_count: number; recent_pull_count: number; slug: string; tag_total: number; tags: DtoChartTag[]; }; export type DtoChartTag = { address: string; digest: string; is_deprecated: boolean; last_pusher: DtoLastPusher; metadata: ChartMetadata; name: string; pull_count: number; recent_pull_count: number; size: number; }; export type DtoChartTagDetail = { address: string; is_deprecated: boolean; last_pusher: DtoLastPusher; metadata: ChartMetadata; package: string; pull_count: number; recent_pull_count: number; size: number; slug: string; tag: string; }; export type DtoCheckFollowingResponse = { is_following: boolean; }; export type DtoCheckStarResponse = { is_star: boolean; }; export type DtoCleanPolicy = "pull_time" | "push_time"; export type DtoCleanPolicyStatus = "enabled" | "disabled"; export type DtoCodeRepoTagPolicy = { cleanup_policy: DtoTagCleanupPolicy; override_policy: DtoTagOverridePolicy; }; export type DtoCommonRegistryCleanDetail = { artifact_num: number; clean_policy: DtoCleanPolicy; status: DtoCleanPolicyStatus; }; export type DtoCommonRegistryOverwritePolicy = { overwrite_policy: DtoOverwritePolicy; }; export type DtoCommonRegistryPackageDetail = { address: string; desc: string; last_pusher: DtoLastPusher; package: string; pull_count: number; recent_pull_count: number; slug: string; tag_total: number; tags: DtoCommonRegistryTag[]; }; export type DtoCommonRegistryPolicy = { clean_policy_detail: DtoCommonRegistryCleanDetail; overwrite_policy: DtoOverwritePolicy; version_policy: DtoVersionPolicy; }; export type DtoCommonRegistryTag = { desc: string; digest: string; last_pusher: DtoLastPusher; name: string; pull_count: number; recent_pull_count: number; size: number; status: string; }; export type DtoCommonRegistryTagDetail = { address: string; dependencies: DtoDependency[]; desc: string; files: DtoFile[]; last_pusher: DtoLastPusher; metadata: DtoMetaData; package: string; pull_count: number; recent_pull_count: number; size: number; slug: string; status: string; tag: string; tags: DtoCommonRegistryTag[]; }; export type DtoContainerAnnotation = { revision: string; version: string; }; export type DtoContainerImage = { arch: string; digest: string; layers: DtoContainerImageLayer[]; os: string; size: number; }; export type DtoContainerImageLayer = { instruction: string; size: number; }; export type DtoContainerPackageDetail = { address: string; desc: string; last_pusher: DtoLastPusher; package: string; pull_count: number; recent_pull_count: number; slug: string; tag_total: number; tags: DtoContainerTag[]; }; export type DtoContainerTag = { address: string; annotations: DtoContainerAnnotation; images: DtoContainerImage[]; last_pusher: DtoLastPusher; name: string; pull_count: number; recent_pull_count: number; }; export type DtoContainerTagDetail = { address: string; annotations: DtoContainerAnnotation; image: DtoContainerImage; last_pusher: DtoLastPusher; options: DtoContainerImage[]; package: string; pull_count: number; recent_pull_count: number; slug: string; tag: string; }; export type DtoCopyReq = { description: string; group: string; name: string; visibility: "public" | "private"; }; export type DtoCountResponse = { group: number; repo: number; user: number; }; export type DtoCreateGroupReq = { /**BindDomain 根组织绑定的域名*/ bind_domain: string; description: string; path: string; remark: string; }; export type DtoCreateInvitationRequest = { is_outside_collaborator: boolean; member_number: number; member_role: ConstantAccessRole; validity_hour: number; }; export type DtoCreateInvitationResponse = { link_token: string; resource_name: string; resource_type: ConstantSlugType; username: string; }; export type DtoCreateMissionReq = { description: string; name: string; repos: string[]; visibility: "public" | "private"; }; export type DtoCreateRegistryReq = { artifact_policy: "all" | "snapshot" | "release"; description: string; kind: string; name: string; overwrite_policy: "forbid" | "allow"; visibility: "public" | "private"; }; export type DtoCreateRepoReq = { description: string; license: string; name: string; visibility: "public" | "private" | "secret"; }; export type DtoCreator = { freeze: boolean; lock: boolean; name: string; nick: string; }; export type DtoDashboardStar = { mission: DtoMissions4User; repo: DtoRepos4User; resource_type: ConstantSlugType; }; export type DtoDependency = { artifact: string; framework_name: string; name: string; }; export type DtoExploreList = { explore_repos: DtoExploreRepo[]; explore_type: string; explore_users: DtoUsersResult[]; }; export type DtoExploreRepo = { created_at: string; description: string; display_module: ConstantRepoDisplayModule; fork_count: number; /**预留*/ forked_from_repo: any; freeze: boolean; id: number; /**仓库程序语言,预留*/ language: string; /**仓库语言*/ languages: any; /**最新代码更新人姓名*/ last_update_nickname: string; /**最新代码更新人账户名*/ last_update_username: string; /**最新代码更新时间*/ last_updated_at: any; license: string; mark_count: number; name: string; /**开启的issue数*/ open_issue_count: number; /**开启的pull request数*/ open_pull_request_count: number; /**完整仓库路径*/ path: string; /**第二语言*/ second_languages: any; site: string; star_count: number; stared: boolean; status: any; tags: { name: string; }[]; topics: string; updated_at: string; visibility_level: ConstantVisibility; web_url: string; }; export type DtoFile = { name: string; size: number; }; export type DtoForkReq = { branch: string; description: string; group: string; name: string; }; export type DtoForks = { created_at: string; fork_count: number; freeze: boolean; nickname: string; path: string; user_freeze: boolean; user_lock: boolean; username: string; }; export type DtoGetActivityMineDetailRsp = { activity_mine_datas: DtoActivityMineData[]; next_offset: string; }; export type DtoGetActivityWorkflowDetailRsp = { activity_workflow_datas: DtoActivityWorkflowData[]; next_offset: string; }; export type DtoGetMineCreateDetailRsp = { issue_datas: DtoIssueData[]; mine_type: string; pull_request_datas: DtoPullRequestData[]; }; export type DtoGetTodoDetailRsp = { issue_datas: DtoIssueData[]; pull_request_datas: DtoPullRequestData[]; todo_type: string; }; export type DtoGroupSettingReq = { /**组织限制指定邮箱认证才能加入*/ email_verification: string; /**组织保护开关,0 - 关闭,1 - 打开*/ group_protection: number; /**是否对外隐藏组织成员,0 - 否, 1 - 是*/ hide_members: number; /**是否对外隐藏子组织,0 - 否, 1 - 是*/ hide_sub_groups: number; /**是否对外显示私有仓库水印,0 - 否, 1 - 是*/ show_private_repo_watermark: number; /**SettingValue 组织设置值,多个选项,用逗号拼接。可选值来自 SettingNamesArray 的值,e.g. disable_organization_readme,cloud_native_dev_only*/ values: string; }; export type DtoHandoverMemberRequest = { after: string; before: string; }; export type DtoHarborGcSchedule = { cron: string; last_triggered_time: string; next_scheduled_time: string; type: string; }; export type DtoHarborRepository = { /**The description of the repository*/ description: string; /**The repository labels*/ labels: string[]; /**The push time of the artifact inside the repository Format: date-time*/ push_time: string; /**The ID of the pusher who push the artifact.*/ pusher_id: number; /**The count that the artifact inside the repository recent pulled*/ recent_pull_count: number; }; export type DtoInheritMembersUser = { access_level: ConstantAccessRole; avatar: string; created_at: string; email: string; email_verification: string; freeze: boolean; id: string; inviter: DtoUsers; join_time: string; lock: boolean; nickname: string; self_member: boolean; type: ConstantUserType; username: string; /**认证类型*/ verified: number; /**认证过期时间*/ verified_expire_in: string; }; export type DtoInteractionType = "radio" | "checkbox" | "time_selector"; export type DtoInvitationWithEmail = { count: number; creator: string; email: string; email_match: boolean; expire: number; is_outside_collaborator: boolean; resource: DtoResources; role: ConstantAccessRole; status: string; }; export type DtoIssueData = { associated_pull_request_counts: number; comment_counts: number; created_time: string; creator: DtoCreator; label: DtoLabel[]; number: number; pinned: boolean; priority: string; slug: string; slug_freeze: boolean; state: string; title: string; todo_id: string; updated_time: string; }; export type DtoLabel = { color: string; description: string; name: string; }; export type DtoLastPusher = { is_frozen: boolean; is_lock: boolean; name: string; nickname: string; push_at: string; }; export type DtoListForks = { fork_tree_count: number; forks: DtoForks[]; }; export type DtoListInheritMembers = { inherit_path: string; total: number; users: DtoInheritMembersUser[]; }; export type DtoLogInfo = { /**构建日志 url*/ buildLogUrl: string; /**提交日志 title*/ commitTitle: string; /**构建开始时间*/ createTime: string; /**构建耗时,单位:ms*/ duration: number; /**事件名*/ event: string; /**事件 url*/ eventUrl: string; /**构建用户是否被冻结*/ freeze: boolean; /**组织名*/ groupName: string; /**流水线标签*/ labels: string; /**构建用户昵称*/ nickName: string; /**失败的子流水线个数*/ pipelineFailCount: number; /**成功的子流水线个数*/ pipelineSuccessCount: number; /**子流水线个数*/ pipelineTotalCount: number; /**commitid*/ sha: string; /**仓库路径*/ slug: string; /**构建号*/ sn: string; /**源分支名*/ sourceRef: string; /**源仓库路径*/ sourceSlug: string; /**构建状态*/ status: string; /**目标分支名*/ targetRef: string; /**构建 title*/ title: string; /**用户名*/ userName: string; }; export type DtoManifest = { metadata: DtoManifestMetadata; /**Type manifest/manifest_list*/ type: string; }; export type DtoManifestMetadata = { /**Annotations contains arbitrary metadata for the image manifest.*/ annotations: any; /**ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact.*/ artifactType: string; /**Config references a configuration object for a container, by digest. The referenced configuration object is a JSON blob that the runtime uses to set up the container.*/ config: any; /**Layers is an indexed list of layers referenced by the manifest.*/ layers: V1Descriptor[]; /**Manifests references platform specific manifests.*/ manifests: V1Descriptor[]; /**MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json`*/ mediaType: string; /**SchemaVersion is the image manifest schema that this image follows*/ schemaVersion: number; /**Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.*/ subject: any; }; export type DtoMember4GetAllMembersByRoot = { access_level: ConstantAccessRole; avatar: string; created_at: string; email: string; freeze: boolean; id: string; inviter: DtoUsers; join_time: string; lock: boolean; nickname: string; path: string; type: ConstantUserType; user_freeze: boolean; username: string; /**认证类型*/ verified: number; /**认证过期时间*/ verified_expire_in: string; }; export type DtoMemberAccessLevel = { access_level: ConstantAccessRole; path: string; }; export type DtoMemberAccessLevelInSlugUnion = { access_level: ConstantAccessRole; inherit: boolean; read_privilege: boolean; write_privilege: boolean; }; export type DtoMetaData = { author: string; home_page: string; license_url: string; minimum_stability: string; package_name: string; package_tag: string; package_type: string; readme: string; repository_url: string; }; export type DtoMineCreateTotal = { issue_count: number; pull_request_count: number; total: number; }; export type DtoMissionPatch = { description: string; ref_repos: string[]; }; export type DtoMissionWithRepos = { created_at: string; description: string; freeze: boolean; id: number; name: string; repos: DtoRepos4User[]; stared: boolean; updated_at: string; visibility_level: ConstantVisibility; }; export type DtoMissions4User = { access: any; created_at: string; description: string; freeze: boolean; id: number; name: string; path: string; pinned: boolean; pinned_time: string; star_time: string; stared: boolean; updated_at: string; visibility_level: ConstantVisibility; }; export type DtoOperatorType = | "equal" | "equals" | "not_equals" | "contains" | "not_contains" | "empty" | "not_empty" | "before" | "after" | "time_selector"; export type DtoOrganizationAccess = { /**AccessRole 用户在当前资源的最大权限*/ access_role: any; all_member_count: number; /**下面所有层级子组织*/ all_sub_group_count: number; /**下面所有层级子任务*/ all_sub_mission_count: number; all_sub_registry_count: number; /**下面所有层级子仓库*/ all_sub_repo_count: number; created_at: string; description: string; domain: string; email: string; follow_count: number; freeze: boolean; has_sub_group: boolean; id: number; member_count: number; name: string; path: string; remark: string; site: string; /**下一级子组织数量*/ sub_group_count: number; sub_mission_count: number; sub_registry_count: number; /**下一级子仓库*/ sub_repo_count: number; updated_at: string; wechat_mp: string; }; export type DtoOrganizationSettingWithParent = { /**上级group设置了hide_members为1,则下级都不能显示*/ can_show_members: boolean; /**上级group设置了hide_sub_groups为1,则下级都不能显示*/ can_show_sub_groups: boolean; can_show_watermark: boolean; email_verification: string; group_protection: number; /**是否对外隐藏组织成员,0 - 否, 1 - 是*/ hide_members: number; /**是否对外隐藏子组织,0 - 否, 1 - 是*/ hide_sub_groups: number; root_email_verification: string; root_group_protection: boolean; root_values: OrganizationSettingValue; show_private_repo_watermark: number; values: OrganizationSettingValue; }; export type DtoOrganizationUnion = { all_member_count: number; /**下面所有层级子组织*/ all_sub_group_count: number; /**下面所有层级子任务*/ all_sub_mission_count: number; all_sub_registry_count: number; /**下面所有层级子仓库*/ all_sub_repo_count: number; created_at: string; description: string; domain: string; email: string; follow_count: number; freeze: boolean; has_sub_group: boolean; id: number; member_count: number; name: string; path: string; remark: string; site: string; /**下一级子组织数量*/ sub_group_count: number; sub_mission_count: number; sub_registry_count: number; /**下一级子仓库*/ sub_repo_count: number; updated_at: string; wechat_mp: string; }; export type DtoOutsideCollaboratorInRepo = { access_level: ConstantAccessRole; avatar: string; created_at: string; email: string; freeze: boolean; id: string; join_time: string; lock: boolean; nickname: string; type: ConstantUserType; username: string; /**认证类型*/ verified: number; /**认证过期时间*/ verified_expire_in: string; }; export type DtoOverwritePolicy = "forbid" | "allow" | "snapshot"; export type DtoPack = { expire_at: string; name: string; res_type: ConstantChargeResType; /**单位: GiB/核时*/ size: number; type: DtoPackType; }; export type DtoPackType = -1 | 0 | 1 | 10 | 20 | 255; export type DtoPackage = { count: number; description: string; labels: string[]; last_artifact_name: string; last_pusher: DtoLastPusher; name: string; package: string; package_type: DtoPackageType; pull_count: number; recent_pull_count: number; }; export type DtoPackageDetail = { composer: DtoCommonRegistryPackageDetail; docker: DtoContainerPackageDetail; helm: DtoChartPackageDetail; maven: DtoCommonRegistryPackageDetail; npm: DtoCommonRegistryPackageDetail; nuget: DtoCommonRegistryPackageDetail; ohpm: DtoCommonRegistryPackageDetail; pypi: DtoCommonRegistryPackageDetail; }; export type DtoPackageType = | "all" | "docker" | "helm" | "npm" | "maven" | "ohpm" | "pypi" | "composer" | "nuget"; export type DtoPipelineStatus = { /**流水线耗时*/ duration: number; /**流水线各 stage 的状态*/ stages: DtoStage[]; /**流水线状态*/ status: string; }; export type DtoPullRequestData = { associated_issue_counts: number; build_status: string; comment_counts: number; created_time: string; label: DtoLabel[]; mergeable_state: string; number: number; pinned: boolean; slug: string; slug_freeze: boolean; src_ref: string; state: string; target_ref: string; title: string; todo_id: string; updated_time: string; }; export type DtoQuota = { /**The hard limits of the quota,example: { "hard": { "storage": -1}}*/ hard: any; }; export type DtoQuotaRsp = { /**The hard limits of the quota,example: { "hard": { "storage": -1}}*/ hard: any; /**The repository name of the quota*/ repository_name: string; /**The cnb default quota value*/ storage_per_project: string; /**The used limits of the quota,example: { "used": { "storage": 0}}*/ used: any; }; export type DtoRankDetail = { created_at: string; description: string; display_module: ConstantRepoDisplayModule; fork_count: number; /**预留*/ forked_from_repo: any; freeze: boolean; id: number; /**仓库程序语言,预留*/ language: string; /**仓库语言*/ languages: any; /**最新代码更新人姓名*/ last_update_nickname: string; /**最新代码更新人账户名*/ last_update_username: string; /**最新代码更新时间*/ last_updated_at: any; license: string; mark_count: number; name: string; /**开启的issue数*/ open_issue_count: number; /**开启的pull request数*/ open_pull_request_count: number; /**完整仓库路径*/ path: string; rank_value: number; /**第二语言*/ second_languages: any; site: string; star_count: number; stared: boolean; status: any; tags: { name: string; }[]; topics: string; updated_at: string; visibility_level: ConstantVisibility; web_url: string; }; export type DtoRankDetailWithIncr = { created_at: string; description: string; display_module: ConstantRepoDisplayModule; fork_count: number; /**预留*/ forked_from_repo: any; freeze: boolean; id: number; increase_fork: number; increase_star: number; /**仓库程序语言,预留*/ language: string; /**仓库语言*/ languages: any; /**最新代码更新人姓名*/ last_update_nickname: string; /**最新代码更新人账户名*/ last_update_username: string; /**最新代码更新时间*/ last_updated_at: any; license: string; mark_count: number; name: string; /**开启的issue数*/ open_issue_count: number; /**开启的pull request数*/ open_pull_request_count: number; /**完整仓库路径*/ path: string; /**第二语言*/ second_languages: any; site: string; star_count: number; stared: boolean; status: any; tags: { name: string; }[]; topics: string; updated_at: string; visibility_level: ConstantVisibility; web_url: string; weight_score: number; }; export type DtoRegistry4User = { access: any; artifact_policy: "all" | "snapshot" | "release"; created_at: string; description: string; freeze: boolean; id: string; kind: string; last_push_time: string; last_push_user: DtoUsers; name: string; overwrite_policy: "forbid" | "allow"; path: string; pinned: boolean; pinned_time: string; pkg_count: number; star_time: string; stared: boolean; updated_at: string; used_size: number; visibility_level: ConstantVisibility; }; export type DtoRegistryLevelCleanPolicy = { /**前端更换路由后删除*/ artifact_num: number; /**前端更换路由后删除*/ clean_policy: any; code_repo: DtoTagCleanupPolicy; common_registry: DtoCommonRegistryCleanDetail; /**前端更换路由后删除*/ status: any; }; export type DtoRegistryLevelOverwritePolicy = { code_repo: DtoTagOverridePolicy; common_registry: DtoCommonRegistryOverwritePolicy; overwrite_policy: DtoOverwritePolicy; }; export type DtoRegistryLevelPolicy = { /**前端更换路由后删除*/ clean_policy_detail: any; code_repo: DtoCodeRepoTagPolicy; common_registry: DtoCommonRegistryPolicy; /**前端更换路由后删除*/ overwrite_policy: any; /**前端更换路由后删除*/ version_policy: any; }; export type DtoRegistryPatch = { description: string; }; export type DtoRepoCoreHour = { ci_used_core_Sec: string; ci_used_core_hour: string; code_used_core_Sec: string; code_used_core_hour: string; }; export type DtoRepoLanguage = { color: string; language: string; }; export type DtoRepoPatch = { description: string; license: string; site: string; topics: string[]; }; export type DtoRepoRank = { rank_type: string; repo_detail: DtoRankDetail[]; top_n: number; }; export type DtoRepoStarUsers = { my_follow_count: number; total: number; users: DtoStarUser[]; }; export type DtoRepoVolume = { is_deleted: boolean; resource_id: string; resource_type: ConstantSlugType; slug: string; volume: string; }; export type DtoRepos4User = { access: any; created_at: string; description: string; display_module: ConstantRepoDisplayModule; fork_count: number; /**预留*/ forked_from_repo: any; freeze: boolean; id: number; /**仓库程序语言,预留*/ language: string; /**仓库语言*/ languages: any; /**最新代码更新人姓名*/ last_update_nickname: string; /**最新代码更新人账户名*/ last_update_username: string; /**最新代码更新时间*/ last_updated_at: any; license: string; mark_count: number; name: string; /**开启的issue数*/ open_issue_count: number; /**开启的pull request数*/ open_pull_request_count: number; /**完整仓库路径*/ path: string; pinned: boolean; pinned_time: string; /**第二语言*/ second_languages: any; site: string; star_count: number; star_time: string; stared: boolean; status: any; tags: { name: string; }[]; topics: string; updated_at: string; visibility_level: ConstantVisibility; web_url: string; }; export type DtoRepos4UserBase = { created_at: string; description: string; display_module: ConstantRepoDisplayModule; fork_count: number; /**预留*/ forked_from_repo: any; freeze: boolean; id: number; /**仓库程序语言,预留*/ language: string; /**仓库语言*/ languages: any; /**最新代码更新人姓名*/ last_update_nickname: string; /**最新代码更新人账户名*/ last_update_username: string; /**最新代码更新时间*/ last_updated_at: any; license: string; mark_count: number; name: string; /**开启的issue数*/ open_issue_count: number; /**开启的pull request数*/ open_pull_request_count: number; /**完整仓库路径*/ path: string; /**第二语言*/ second_languages: any; site: string; star_count: number; status: any; tags: { name: string; }[]; topics: string; updated_at: string; visibility_level: ConstantVisibility; web_url: string; }; export type DtoResTypeSummary = { /**平均用量*/ avg_vol: number; /**计费用量*/ fee_vol: number; /**单位:byte/核毫秒*/ vol_in_base_unit: number; }; export type DtoResourceBindInfo = { code: string; expire_at: string; name: string; nick: string; slug: string; url: string; }; export type DtoResourceGroup = { created_at: string; description: string; domain: string; email: string; freeze: boolean; id: number; name: string; path: string; remark: string; site: string; updated_at: string; wechat_mp: string; }; export type DtoResourceMission = { created_at: string; description: string; freeze: boolean; id: number; name: string; path: string; updated_at: string; visibility_level: ConstantVisibility; }; export type DtoResourceRegistry = { artifact_policy: "all" | "snapshot" | "release"; created_at: string; description: string; freeze: boolean; id: string; kind: string; last_push_time: string; last_push_user: DtoUsers; name: string; overwrite_policy: "forbid" | "allow"; path: string; pkg_count: number; updated_at: string; used_size: number; visibility_level: ConstantVisibility; }; export type DtoResourceRepo = { created_at: string; freeze: boolean; id: number; name: string; path: string; status: any; updated_at: string; visibility_level: ConstantVisibility; }; export type DtoResources = { group: DtoResourceGroup; mission: DtoResourceMission; registry: DtoResourceRegistry; repo: DtoResourceRepo; type: ConstantSlugType; }; export type DtoSearchResponseAny = { resource_type: ConstantSearchResourceType; results: any; }; export type DtoSlugMemberCount = { /**继承成员总数*/ inherited_member_count: number; /**直接成员总数*/ member_count: number; /**外部协作者总数*/ outside_collaborator_count: number; }; export type DtoSlugs = { created_at: string; freeze: boolean; path: string; resource_id: number; resource_type: ConstantSlugType; root_freeze: boolean; root_id: number; updated_at: string; }; export type DtoSpecialAmount = { compute_build_corehour: number; compute_build_desc: string; compute_build_expire: string; compute_develop_corehour: number; compute_develop_desc: string; compute_develop_expire: string; storage_git_desc: string; storage_git_expire: string; storage_git_gib: number; storage_object_desc: string; storage_object_expire: string; storage_object_gib: number; }; export type DtoStage = { /**stage 耗时*/ duration: number; /**stage 状态*/ status: string; }; export type DtoStarUser = { avatar: string; created_at: string; email: string; freeze: boolean; id: string; is_follow: boolean; lock: boolean; nickname: string; stared_at: string; type: ConstantUserType; username: string; /**认证类型*/ verified: number; /**认证过期时间*/ verified_expire_in: string; }; export type DtoStartBuildReq = { /**触发分支,默认为主分支*/ branch: string; /**指定配置文件内容,yaml 格式*/ config: string; /**环境变量,对象格式*/ env: any; /**事件名,必须是 api_trigger 或以 api_trigger_ 开头,默认为 `api_trigger`*/ event: string; /**commit id ,优先级比 tag 高,默认为分支最新提交记录*/ sha: string; /**是否等待构建正式触发,为false时会立刻返回 sn 和 buildLogUrl*/ sync: string; /**触发 tag,优先级比 branch 高*/ tag: string; }; export type DtoStatus = { /**预算单状态,0-没有预算单,1-正常,2-欠费被隔离,3-被销毁*/ budget_status: any; /**对应资源类型阈值状态*/ threshold: any; }; export type DtoSyncUserData = { flag: boolean; }; export type DtoSystemAcceleration = { priority: number; url: string; user_name: string; }; export type DtoTag = { composer: DtoCommonRegistryTag[]; docker: DtoContainerTag[]; helm: DtoChartTag[]; maven: DtoCommonRegistryTag[]; npm: DtoCommonRegistryTag[]; nuget: DtoCommonRegistryTag[]; ohpm: DtoCommonRegistryTag[]; package: string; pypi: DtoCommonRegistryTag[]; }; export type DtoTagCleanupPolicy = { disabled: boolean; /**是否保留latest标签*/ is_retain_latest: boolean; /**是否保留最近7天内拉取过的制品*/ is_retain_pulled_in_7_days: boolean; /**保留的制品版本数量,按照时间倒排序*/ latest_pushed_k: number; }; export type DtoTagDetail = { composer: DtoCommonRegistryTagDetail; docker: DtoContainerTagDetail; helm: DtoChartTagDetail; maven: DtoCommonRegistryTagDetail; npm: DtoCommonRegistryTagDetail; nuget: DtoCommonRegistryTagDetail; ohpm: DtoCommonRegistryTagDetail; pypi: DtoCommonRegistryTagDetail; }; export type DtoTagOverridePolicy = { /**是否禁止覆盖带前缀的语义化版本标签*/ is_forbid_prefixed_sem_ver: boolean; /**是否禁止覆盖语义化版本标签 (semantic version: https://semver.org/lang/zh-CN/ )*/ is_forbid_sem_ver: boolean; }; export type DtoThreshold = "normal" | "warning-80" | "exceed"; export type DtoTimeVolume = { time_rfc3339: string; volume: string; }; export type DtoTodoTotal = { issue_complete_count: number; issue_pending_count: number; pull_request_complete_count: number; pull_request_pending_count: number; total: number; }; export type DtoTransferSlugReq = { source: string; target: string; }; export type DtoUpdateGroupAvatarReq = { /**新头像 url*/ url: string; }; export type DtoUpdateGroupReq = { description: string; domain: string; email: string; remark: string; site: string; wechat_mp: string; }; export type DtoUpdateMembersRequest = { access_level: string; is_outside_collaborator: boolean; }; export type DtoUploadAssetsResponse = { assets: DtoAssets; form: any; /**后续调用 confirm 接口用的*/ token: string; upload_url: string; }; export type DtoUploadRequestParams = { name: string; size: number; }; export type DtoUserBindInfo = { code: string; expire_at: string; name: string; nick: string; url: string; user: string; }; export type DtoUserEmailPayload = { email: string; }; export type DtoUserEmailType = "git" | "contact"; export type DtoUserEmailWithCodePayload = { code: string; email: string; }; export type DtoUserEmailWithTypePayload = { email: string; type: DtoUserEmailType; }; export type DtoUserEmails = { /**ContactEmail 用户通知邮箱*/ contact_email: string; /**Email 用户git提交邮箱,是 emails 里面的某一个*/ email: string; /**Emails 邮箱列表*/ emails: string[]; /**系统默认邮箱*/ system_email: string; /**系统默认邮箱是否可以通知*/ system_email_contact: boolean; }; export type DtoUserFollowResult = { freeze: boolean; /**查询人是否follow了此用户*/ is_following: boolean; lock: boolean; nickname: string; username: string; }; export type DtoUserForSelf = { avatar: string; created_at: string; editable: ConstantUserEditable; email: string; freeze: boolean; id: string; language: string; lock: boolean; next_updated_name_at: strin