UNPKG

node-cnb

Version:

node sdk for cnb open api

2,010 lines (1,758 loc) 101 kB
import { DtoCreateGroupReq, DtoUsersResultForSelf, HttpUpdateUserInfoPayload, DtoOrganizationAccess, DtoRepos4User, DtoUsersResult, DtoActivityDate, DtoUserFollowResult, DtoOrganizationUnion, DtoWorkspaceDeleteResult, DtoWorkspaceDeleteReq, DtoWorkspaceListResult, DtoUpdateGroupReq, DtoUpdateGroupAvatarReq, DtoListInheritMembers, DtoUsersWithAccessLevelInSlug, DtoMemberAccessLevelInSlugUnion, DtoMemberAccessLevel, DtoUpdateMembersRequest, DtoRepos4UserBase, DtoCreateRepoReq, DtoOrganizationSettingWithParent, DtoGroupSettingReq, DtoUploadAssetsResponse, DtoUploadRequestParams, DtoRepoPatch, DtoBuildLogsResult, DtoBuildResult, DtoStartBuildReq, DtoBuildStatusResult, WebRepoContribTrend, DtoListForks, DtoForkReq, ApiPostBlobForm, ApiBranch, OpenapiCreateBranchForm, ApiBranchDetail, WebCommitAnnotationInBatch, WebGetCommitAnnotationsInBatchForm, WebCommitAnnotation, OpenapiPutCommitAnnotationsForm, ApiCommitAsset, OpenapiPostCommitAssetUploadUrlForm, ApiCommitStatus, ApiCommit, ApiCompareResponse, ApiContent, WebDeferredCommit, OpenapiHeadRef, WebTagAnnotation, OpenapiPutTagAnnotationsForm, ApiTag, ApiPostTagFrom, ApiIssue, ApiPostIssueForm, ApiIssueDetail, ApiPatchIssueForm, ApiDeleteIssueAssigneesForm, GitWoaComCnbMonorepoGitInternalAppVcsServiceBffApiUserInfo, ApiPostIssueAssigneesForm, ApiIssueComment, ApiPostIssueCommentForm, ApiPatchIssueCommentForm, ApiLabel, ApiPostIssueLabelsForm, ApiPutIssueLabelsForm, ApiPostLabelForm, ApiPatchLabelForm, DtoOutsideCollaboratorInRepo, ApiPullRequestInfo, ApiPullRequest, ApiPullCreationForm, ApiPull, ApiPatchPullRequest, ApiDeletePullAssigneesForm, GitWoaComCnbMonorepoGitInternalAppGitServiceBffApiUserInfo, ApiPostPullAssigneesForm, ApiPullRequestComment, ApiPullCommentCreationForm, ApiPostPullLabelsForm, ApiPutPullLabelsForm, ApiMergePullResponse, ApiMergePullRequest, ApiPullReviewCreationForm, ApiRelease, OpenapiPostReleaseForm, OpenapiPatchReleaseForm, OpenapiPostReleaseAssetUploadUrlForm, ApiReleaseAsset, ApiBranchProtection, ApiPipelineSettings, WebPipelineSettings, ApiPullRequestSettings, ApiPushLimitSettings, DtoRepoStarUsers, DtoWorkspaceDetailResult, DtoPackage, DtoQuotaRsp, DtoPackageDetail, DtoTagDetail, DtoTag, } from "./types"; type Organizations_CreateOrganization = (params: { request: DtoCreateGroupReq; }) => Promise<any>; type Users_GetUserInfo = () => Promise<DtoUsersResultForSelf>; type Users_UpdateUserInfo = (params: { request: HttpUpdateUserInfoPayload; }) => Promise<any>; type Users_AutoCompleteSource = (params?: { source_type?: "Group" | "Repo"; page?: number; page_size?: number; search?: string; access?: "Reporter" | "Developer" | "Master" | "Owner"; }) => Promise<string[]>; type Organizations_ListTopGroups = (params?: { page?: number; page_size?: number; search?: string; role?: "Guest" | "Reporter" | "Developer" | "Master" | "Owner"; }) => Promise<DtoOrganizationAccess[]>; type Organizations_ListGroups = (params: { group: string; page?: number; page_size?: number; access?: number; }) => Promise<DtoOrganizationAccess[]>; type Repositories_GetRepos = (params?: { page?: number; page_size?: number; search?: string; filter_type?: "private" | "public" | "encrypted"; role?: "Reporter" | "Developer" | "Master" | "Owner"; order_by?: "created_at" | "last_updated_at" | "stars" | "slug_path" | "forks"; desc?: boolean; }) => Promise<DtoRepos4User[]>; type Repositories_GetUserAllStaredRepos = (params?: { page?: number; page_size?: number; search?: string; desc?: boolean; order_by?: "created_at" | "last_updated_at" | "stars" | "forks"; }) => Promise<DtoRepos4User[]>; type Users_GetUserInfoByName = (params: { username: string; }) => Promise<DtoUsersResult>; type Activities_GetUserActivitiesByDate = (params: { username: string; date?: string; }) => Promise<DtoActivityDate>; type Assets_GetUserAvatar = (params: { username: string; size: string; }) => Promise<any>; type Followers_GetFollowersByUserID = (params: { username: string; page?: number; page_size?: number; }) => Promise<DtoUserFollowResult[]>; type Followers_GetFollowingByUserID = (params: { username: string; page?: number; page_size?: number; }) => Promise<DtoUserFollowResult[]>; type Organizations_GetGroupsByUserID = (params: { username: string; search?: string; page?: number; page_size?: number; desc?: boolean; order_by?: "join_time" | "created_at"; }) => Promise<DtoOrganizationUnion>; type Repositories_GetPinnedRepoByID = (params: { username: string; }) => Promise<DtoRepos4User[]>; type Activities_GetUserRepoActivityDetails = (params: { username: string; activityType: "issue" | "pull_request" | "code_review"; slug: string; date: string; }) => Promise<any[]>; type Repositories_GetReposByUserName = (params: { username: string; search?: string; role?: "Reporter" | "Developer" | "Master" | "Owner"; page?: number; page_size?: number; desc?: boolean; order_by?: "created_at" | "last_updated_at" | "stars" | "slug_path" | "forks"; }) => Promise<DtoRepos4User[]>; type Starring_GetUserStaredRepos = (params: { username: string; search?: string; page?: number; page_size?: number; desc?: boolean; order_by?: "created_at" | "last_updated_at" | "stars" | "forks"; }) => Promise<DtoRepos4User[]>; type Workspace_DeleteWorkspace = (params: { request: DtoWorkspaceDeleteReq; }) => Promise<DtoWorkspaceDeleteResult>; type Workspace_ListWorkspaces = (params?: { branch?: string; end?: string; page?: number; pageSize?: number; slug?: string; start?: string; status?: string; }) => Promise<DtoWorkspaceListResult>; type Organizations_DeleteOrganization = (params: { group: string; "x-cnb-identity-ticket"?: string; }) => Promise<any>; type Organizations_GetGroup = (params: { group: string; }) => Promise<DtoOrganizationAccess>; type Organizations_UpdateOrganization = (params: { group: string; request: DtoUpdateGroupReq; }) => Promise<any>; type Organizations_UpdateGroupAvatar = (params: { group: string; request: DtoUpdateGroupAvatarReq; }) => Promise<any>; type Collaborators_ListInheritMembersOfGroup = (params: { group: string; search?: string; role?: "Guest" | "Reporter" | "Developer" | "Master" | "Owner"; page?: number; page_size?: number; }) => Promise<DtoListInheritMembers[]>; type Assets_PutLogos = (params: { group: string; token: string; }) => Promise<any>; type Assets_GetLogos = (params: { group: string; size?: string; }) => Promise<any>; type Collaborators_ListMembersOfGroup = (params: { group: string; page?: number; page_size?: number; role?: "Guest" | "Reporter" | "Developer" | "Master" | "Owner"; search?: string; }) => Promise<DtoUsersWithAccessLevelInSlug[]>; type Contributors_GetMemberAccessLevelOfGroup = (params: { group: string; include_inherit?: boolean; }) => Promise<DtoMemberAccessLevelInSlugUnion>; type Contributors_ListMemberAccessLevelOfGroup = (params: { group: string; username: string; }) => Promise<DtoMemberAccessLevel[]>; type Collaborators_DeleteMembersOfGroup = (params: { group: string; username: string; }) => Promise<any>; type Collaborators_AddMembersOfGroup = (params: { group: string; username: string; request: DtoUpdateMembersRequest; }) => Promise<any>; type Collaborators_UpdateMembersOfGroup = (params: { group: string; username: string; request: DtoUpdateMembersRequest; }) => Promise<any>; type Repositories_GetPinnedRepoByGroup = (params: { group: string; }) => Promise<DtoRepos4UserBase[]>; type Repositories_SetPinnedRepoByGroup = (params: { group: string; request: string[]; }) => Promise<DtoRepos4UserBase[]>; type Repositories_GetGroupSubRepos = (params: { group: string; page?: number; page_size?: number; filter_type?: "private" | "public" | "encrypted"; order_by?: "created_at" | "last_updated_at" | "stars" | "slug_path"; desc?: boolean; descendant?: "all" | "sub" | "grand"; search?: string; }) => Promise<DtoRepos4User[]>; type Repositories_CreateRepo = (params: { group: string; request: DtoCreateRepoReq; }) => Promise<any>; type Organizations_GetGroupSetting = (params: { group: string; }) => Promise<DtoOrganizationSettingWithParent>; type Organizations_UpdateGroupSetting = (params: { group: string; request: DtoGroupSettingReq; }) => Promise<any>; type Organizations_ListSubgroups = (params: { group: string; search?: string; page: number; page_size: number; }) => Promise<DtoOrganizationUnion[]>; type Assets_UploadLogos = (params: { group: string; request: DtoUploadRequestParams; }) => Promise<DtoUploadAssetsResponse>; type Missions_DeleteMission = (params: { mission: string; "x-cnb-identity-ticket"?: string; }) => Promise<any>; type Collaborators_AddMembersOfMission = (params: { mission: string; username: string; request: DtoUpdateMembersRequest; }) => Promise<any>; type Artifactory_DeleteRegistry = (params: { registry: string; "x-cnb-identity-ticket"?: string; }) => Promise<any>; type Collaborators_AddMembersOfRegistry = (params: { registry: string; username: string; request: DtoUpdateMembersRequest; }) => Promise<any>; type Repositories_DeleteRepo = (params: { repo: string; "x-cnb-identity-ticket"?: string; }) => Promise<any>; type Repositories_GetRepo = (params: { repo: string; }) => Promise<DtoRepos4User>; type Repositories_UpdateRepo = (params: { repo: string; request: DtoRepoPatch; }) => Promise<any>; type Build_GetBuildLogs = (params: { repo: string; createTime?: string; endTime?: string; event?: string; page?: number; pagesize?: number; sha?: string; sn?: string; sourceRef?: string; status?: string; targetRef?: string; userId?: string; userName?: string; }) => Promise<DtoBuildLogsResult>; type Build_StartBuild = (params: { repo: string; request: DtoStartBuildReq; }) => Promise<DtoBuildResult>; type Build_GetBuildStatus = (params: { repo: string; sn: string; }) => Promise<DtoBuildStatusResult>; type Build_StopBuild = (params: { repo: string; sn: string; }) => Promise<DtoBuildResult>; type Assets_GetCommitAssets = (params: { repo: string; fileName: string; }) => Promise<any>; type RepoContributor_GetRepoContributorTrend = (params: { repo: string; limit?: number; exclude_external_users?: boolean; }) => Promise<WebRepoContribTrend>; type Assets_GetFiles = (params: { repo: string; userIdKey: string; randomUUID: string; fileName: string; }) => Promise<any>; type Assets_PutFiles = (params: { repo: string; userIdKey: string; randomUUID: string; fileName: string; token: string; }) => Promise<any>; type Repositories_ListForksRepos = (params: { repo: string; start_from_root?: boolean; page: number; page_size: number; }) => Promise<DtoListForks>; type Repositories_CreateAFork = (params: { repo: string; request: DtoForkReq; }) => Promise<any>; type Git_GetArchiveCommitChangedFiles = (params: { repo: string; sha1?: string; }) => Promise<any>; type Git_GetArchiveCompareChangedFiles = (params: { repo: string; base_head: string; }) => Promise<any>; type Git_CreateBlob = (params: { repo: string; post_blob_form: ApiPostBlobForm; }) => Promise<any>; type Git_ListBranches = (params: { repo: string; page?: number; page_size?: number; }) => Promise<ApiBranch[]>; type Git_CreateBranch = (params: { repo: string; create_branch_form: OpenapiCreateBranchForm; }) => Promise<any>; type Git_DeleteBranch = (params: { repo: string; branch: string; }) => Promise<any>; type Git_GetBranch = (params: { repo: string; branch?: string; }) => Promise<ApiBranchDetail>; type Git_GetCommitAnnotationsInBatch = (params: { repo: string; get_commit_annotations_form: WebGetCommitAnnotationsInBatchForm; }) => Promise<WebCommitAnnotationInBatch[]>; type Git_GetCommitAnnotations = (params: { repo: string; sha: string; }) => Promise<WebCommitAnnotation[]>; type Git_PutCommitAnnotations = (params: { repo: string; sha: string; put_commit_annotations_form: OpenapiPutCommitAnnotationsForm; }) => Promise<any>; type Git_DeleteCommitAnnotation = (params: { repo: string; sha: string; key: string; }) => Promise<any>; type Git_GetCommitAssetsBySha = (params: { repo: string; sha1: string; }) => Promise<ApiCommitAsset[]>; type Git_PostCommitAssetUploadConfirmation = (params: { repo: string; sha1: string; token: string; asset_path: string; }) => Promise<any>; type Git_PostCommitAssetUploadURL = (params: { repo: string; sha1: string; create_commit_asset_upload_url_form: OpenapiPostCommitAssetUploadUrlForm; }) => Promise<any>; type Git_DeleteCommitAsset = (params: { repo: string; sha1: string; asset_id: string; }) => Promise<any>; type Git_GetCommitStatuses = (params: { repo: string; commitish: string; }) => Promise<ApiCommitStatus[]>; type Git_ListCommits = (params: { repo: string; sha?: string; author?: string; committer?: string; since?: string; until?: string; page?: number; page_size?: number; }) => Promise<ApiCommit[]>; type Git_GetCommit = (params: { repo: string; ref: string; }) => Promise<ApiCommit>; type Git_GetCompareCommits = (params: { repo: string; base_head: string; }) => Promise<ApiCompareResponse>; type Git_GetContent = (params: { repo: string; file_path: string; ref?: string; }) => Promise<ApiContent>; type Git_ListDeferredCommits = (params: { repo: string; cs: string; }) => Promise<WebDeferredCommit[]>; type Git_GetHead = (params: { repo: string }) => Promise<OpenapiHeadRef>; type Git_DeleteTagAnnotation = (params: { repo: string; tag_with_key: string; }) => Promise<any>; type Git_GetTagAnnotations = (params: { repo: string; tag: string; }) => Promise<WebTagAnnotation[]>; type Git_PutTagAnnotations = (params: { repo: string; tag: string; put_tag_annotations_form: OpenapiPutTagAnnotationsForm; }) => Promise<any>; type Git_ListTags = (params: { repo: string; page?: number; page_size?: number; }) => Promise<ApiTag[]>; type Git_CreateTag = (params: { repo: string; post_tag_form: ApiPostTagFrom; }) => Promise<any>; type Git_DeleteTag = (params: { repo: string; tag: string }) => Promise<any>; type Git_GetTag = (params: { repo: string; tag: string }) => Promise<ApiTag>; type Assets_GetImgs = (params: { repo: string; userIdKey: string; fileName: string; }) => Promise<any>; type Assets_PutImgs = (params: { repo: string; userIdKey: string; fileName: string; token: string; }) => Promise<any>; type Collaborators_ListInheritMembersOfRepo = (params: { repo: string; search?: string; role?: "Guest" | "Reporter" | "Developer" | "Master" | "Owner"; page?: number; page_size?: number; }) => Promise<DtoListInheritMembers[]>; type Issues_ListIssues = (params: { repo: string; page?: number; page_size?: number; state?: string; keyword?: string; priority?: string; labels?: string; authors?: string; assignees?: string; updated_time_begin?: string; updated_time_end?: string; close_time_begin?: string; close_time_end?: string; order_by?: string; }) => Promise<ApiIssue[]>; type Issues_CreateIssue = (params: { repo: string; post_issue_form: ApiPostIssueForm; }) => Promise<any>; type Issues_GetIssue = (params: { repo: string; number: number; }) => Promise<ApiIssueDetail>; type Issues_UpdateIssue = (params: { repo: string; number: number; patch_issue_form: ApiPatchIssueForm; }) => Promise<ApiIssueDetail>; type Issues_DeleteIssueAssignees = (params: { repo: string; number: string; delete_issue_assignees_form: ApiDeleteIssueAssigneesForm; }) => Promise<ApiIssueDetail>; type Issues_ListIssueAssignees = (params: { repo: string; number: string; }) => Promise<GitWoaComCnbMonorepoGitInternalAppVcsServiceBffApiUserInfo[]>; type Issues_PostIssueAssignees = (params: { repo: string; number: string; post_issue_assignees_form: ApiPostIssueAssigneesForm; }) => Promise<any>; type Issues_CanUserBeAssignedToIssue = (params: { repo: string; number: string; assignee: string; }) => Promise<any>; type Issues_ListIssueComments = (params: { repo: string; number: number; page?: number; page_size?: number; }) => Promise<ApiIssueComment[]>; type Issues_PostIssueComment = (params: { repo: string; number: number; post_issue_comment_form: ApiPostIssueCommentForm; }) => Promise<any>; type Issues_GetIssueComment = (params: { repo: string; number: string; comment_id: string; }) => Promise<ApiIssueComment>; type Issues_PatchIssueComment = (params: { repo: string; number: number; comment_id: number; patch_issue_comment_form: ApiPatchIssueCommentForm; }) => Promise<ApiIssueComment>; type Issues_DeleteIssueLabels = (params: { repo: string; number: number; }) => Promise<any>; type Issues_ListIssueLabels = (params: { repo: string; number: number; page?: number; page_size?: number; }) => Promise<ApiLabel[]>; type Issues_PostIssueLabels = (params: { repo: string; number: number; post_issue_labels_form: ApiPostIssueLabelsForm; }) => Promise<ApiLabel>; type Issues_PutIssueLabels = (params: { repo: string; number: number; put_issue_labels_form: ApiPutIssueLabelsForm; }) => Promise<ApiLabel>; type Issues_DeleteIssueLabel = (params: { repo: string; number: number; name: string; }) => Promise<ApiLabel>; type RepoLabels_ListLabels = (params: { repo: string; page?: number; page_size?: number; keyword?: string; }) => Promise<ApiLabel[]>; type RepoLabels_PostLabel = (params: { repo: string; post_label_form: ApiPostLabelForm; }) => Promise<any>; type RepoLabels_DeleteLabel = (params: { repo: string; name: string; }) => Promise<any>; type RepoLabels_PatchLabel = (params: { repo: string; name: string; patch_label_form: ApiPatchLabelForm; }) => Promise<ApiLabel>; type Git_GetPresignedLFSDownloadLink = (params: { repo: string; oid: string; name: string; }) => Promise<any>; type Collaborators_ListAllMembers = (params: { repo: string; page?: number; page_size?: number; role?: "Guest" | "Reporter" | "Developer" | "Master" | "Owner"; search?: string; names?: string; order_by?: "created_at" | "stars" | "follower"; desc?: boolean; }) => Promise<DtoUsersWithAccessLevelInSlug[]>; type Collaborators_ListMembersOfRepo = (params: { repo: string; page?: number; page_size?: number; role?: "Guest" | "Reporter" | "Developer" | "Master" | "Owner"; search?: string; }) => Promise<DtoUsersWithAccessLevelInSlug[]>; type Contributors_GetMemberAccessLevelOfRepo = (params: { repo: string; include_inherit?: boolean; }) => Promise<DtoMemberAccessLevelInSlugUnion>; type Contributors_ListMemberAccessLevelOfRepo = (params: { repo: string; username: string; }) => Promise<DtoMemberAccessLevel[]>; type Collaborators_DeleteMembersOfRepo = (params: { repo: string; username: string; }) => Promise<any>; type Collaborators_AddMembersOfRepo = (params: { repo: string; username: string; request: DtoUpdateMembersRequest; }) => Promise<any>; type Collaborators_UpdateMembersOfRepo = (params: { repo: string; username: string; request: DtoUpdateMembersRequest; }) => Promise<any>; type Collaborators_ListOutsideCollaborators = (params: { repo: string; page?: number; page_size?: number; role?: "Guest" | "Reporter" | "Developer" | "Master"; search?: string; }) => Promise<DtoOutsideCollaboratorInRepo[]>; type Collaborators_DeleteOutsideCollaborators = (params: { repo: string; username: string; }) => Promise<any>; type Collaborators_UpdateOutsideCollaborators = (params: { repo: string; username: string; role: "Guest" | "Reporter" | "Developer"; }) => Promise<any>; type Pulls_ListPullsByNumbers = (params: { repo: string; n: any[]; }) => Promise<ApiPullRequestInfo[]>; type Pulls_ListPulls = (params: { repo: string; page?: number; page_size?: number; state?: string; authors?: string; reviewers?: string; assignees?: string; base_ref?: string; }) => Promise<ApiPullRequest[]>; type Pulls_PostPull = (params: { repo: string; post_pull_form: ApiPullCreationForm; }) => Promise<any>; type Pulls_GetPull = (params: { repo: string; number: string; }) => Promise<ApiPull>; type Pulls_PatchPull = (params: { repo: string; number: string; update_pull_request_form: ApiPatchPullRequest; }) => Promise<ApiPull>; type Pulls_DeletePullAssignees = (params: { repo: string; number: string; delete_pull_assignees_form: ApiDeletePullAssigneesForm; }) => Promise<ApiPull>; type Pulls_ListPullAssignees = (params: { repo: string; number: string; }) => Promise<GitWoaComCnbMonorepoGitInternalAppGitServiceBffApiUserInfo[]>; type Pulls_PostPullAssignees = (params: { repo: string; number: string; post_pull_assignees_form: ApiPostPullAssigneesForm; }) => Promise<any>; type Pulls_CanUserBeAssignedToPull = (params: { repo: string; number: string; assignee: string; }) => Promise<any>; type Pulls_ListPullComments = (params: { repo: string; number: string; page?: number; page_size?: number; }) => Promise<ApiPullRequestComment[]>; type Pulls_PostPullComment = (params: { repo: string; number: string; post_pull_comment_form: ApiPullCommentCreationForm; }) => Promise<any>; type Pulls_DeletePullLabels = (params: { repo: string; number: string; }) => Promise<any>; type Pulls_ListPullLabels = (params: { repo: string; number: string; page?: number; page_size?: number; }) => Promise<ApiLabel[]>; type Pulls_PostPullLabels = (params: { repo: string; number: string; post_pull_labels_form: ApiPostPullLabelsForm; }) => Promise<ApiLabel>; type Pulls_PutPullLabels = (params: { repo: string; number: string; put_pull_labels_form: ApiPutPullLabelsForm; }) => Promise<ApiLabel>; type Pulls_DeletePullLabel = (params: { repo: string; number: string; name: string; }) => Promise<ApiLabel>; type Pulls_MergePull = (params: { repo: string; number: string; merge_pull_request_form: ApiMergePullRequest; }) => Promise<ApiMergePullResponse>; type Pulls_PostPullReview = (params: { repo: string; number: string; post_pull_review_form: ApiPullReviewCreationForm; }) => Promise<any>; type Releases_ListReleases = (params: { repo: string; page?: number; page_size?: number; }) => Promise<ApiRelease[]>; type Releases_PostRelease = (params: { repo: string; create_release_form: OpenapiPostReleaseForm; }) => Promise<any>; type Assets_GetReleasesAsset = (params: { repo: string; fileName: string; }) => Promise<any>; type Releases_GetLatestRelease = (params: { repo: string; }) => Promise<ApiRelease>; type Assets_GetLatestReleasesAsset = (params: { repo: string; fileName: string; }) => Promise<any>; type Releases_GetReleaseByTag = (params: { repo: string; tag: string; }) => Promise<ApiRelease>; type Releases_DeleteRelease = (params: { repo: string; release_id: string; }) => Promise<any>; type Releases_GetReleaseByID = (params: { repo: string; release_id: string; }) => Promise<ApiRelease>; type Releases_PatchRelease = (params: { repo: string; release_id: string; patch_release_form: OpenapiPatchReleaseForm; }) => Promise<any>; type Releases_PostReleaseAssetUploadConfirmation = (params: { repo: string; release_id: string; token: string; asset_path: string; }) => Promise<any>; type Releases_PostReleaseAssetUploadURL = (params: { repo: string; release_id: string; create_release_asset_upload_url_form: OpenapiPostReleaseAssetUploadUrlForm; }) => Promise<any>; type Releases_DeleteReleaseAsset = (params: { repo: string; release_id: string; asset_id: string; }) => Promise<any>; type Releases_GetReleaseAsset = (params: { repo: string; release_id: string; asset_id: string; }) => Promise<ApiReleaseAsset>; type GitSettings_ListBranchProtections = (params: { repo: string; }) => Promise<ApiBranchProtection[]>; type GitSettings_PostBranchProtection = (params: { repo: string; branch_protection_form: ApiBranchProtection; }) => Promise<any>; type GitSettings_DeleteBranchProtection = (params: { repo: string; id: string; }) => Promise<any>; type GitSettings_GetBranchProtection = (params: { repo: string; id: string; }) => Promise<ApiBranchProtection>; type GitSettings_PatchBranchProtection = (params: { repo: string; id: string; branch_protection_form: ApiBranchProtection; }) => Promise<any>; type GitSettings_GetPipelineSettings = (params: { repo: string; }) => Promise<ApiPipelineSettings>; type GitSettings_PutPipelineSettings = (params: { repo: string; pipeline_form: WebPipelineSettings; }) => Promise<any>; type GitSettings_GetPullRequestSettings = (params: { repo: string; }) => Promise<ApiPullRequestSettings>; type GitSettings_PutPullRequestSettings = (params: { repo: string; pull_request_form: ApiPullRequestSettings; }) => Promise<any>; type GitSettings_GetPushLimitSettings = (params: { repo: string; }) => Promise<ApiPushLimitSettings>; type GitSettings_PutPushLimitSettings = (params: { repo: string; push_limit_form: ApiPushLimitSettings; }) => Promise<any>; type Starring_ListStarUsers = (params: { repo: string; filter_type: "all" | "followed"; page: number; page_size: number; }) => Promise<DtoRepoStarUsers>; type Collaborators_TopContributors = (params: { repo: string; top?: number; }) => Promise<DtoUsersResult[]>; type Assets_UploadFiles = (params: { repo: string; request: DtoUploadRequestParams; }) => Promise<DtoUploadAssetsResponse>; type Assets_UploadImgs = (params: { repo: string; request: DtoUploadRequestParams; }) => Promise<DtoUploadAssetsResponse>; type Assets_UploadReleases = (params: { repo: string; tagName: string; request: DtoUploadRequestParams; }) => Promise<DtoUploadAssetsResponse>; type Workspace_GetWorkspaceDetail = (params: { repo: string; sn: string; }) => Promise<DtoWorkspaceDetailResult>; type Artifactory_ListPackages = (params: { slug: string; type: "all" | "docker" | "helm" | "maven" | "npm" | "ohpm"; page?: number; page_size?: number; ordering?: "pull_count" | "last_push_at" | "name_ascend" | "name_descend"; name?: string; }) => Promise<DtoPackage[]>; type Artifactory_HeadPackages = (params: { slug: string; type: "all" | "docker" | "helm"; page?: number; page_size?: number; ordering?: "pull_count" | "last_push_at" | "name_ascend" | "name_descend"; name?: string; }) => Promise<any>; type Artifactory_GetQuotaByProjectName = (params: { slug: string; type: "docker" | "helm" | "maven" | "npm" | "ohpm"; }) => Promise<DtoQuotaRsp>; type Artifactory_GetQuotasByProjectName = (params: { slug: string; type: "docker" | "helm" | "maven" | "npm" | "ohpm"; page?: number; page_size?: number; ordering?: "used_ascend" | "used_descend"; }) => Promise<DtoQuotaRsp[]>; type Artifactory_DownloadQuotasByProjectName = (params: { slug: string; type: "docker" | "helm" | "maven" | "npm" | "ohpm"; page?: number; page_size?: number; ordering?: "used_ascend" | "used_descend"; }) => Promise<DtoQuotaRsp[]>; type Artifactory_GetPackage = (params: { slug: string; type: "docker" | "helm" | "maven" | "npm" | "ohpm"; name: string; }) => Promise<DtoPackageDetail>; type Artifactory_DeletePackageTag = (params: { slug: string; type: "docker" | "helm" | "maven" | "npm" | "ohpm"; name: string; tag: string; }) => Promise<any>; type Artifactory_GetPackageTagDetail = (params: { slug: string; type: "docker" | "helm" | "maven" | "npm" | "ohpm"; name: string; tag: string; sha256?: string; }) => Promise<DtoTagDetail>; type Artifactory_ListPackageTags = (params: { slug: string; type: "docker" | "helm" | "maven" | "npm" | "ohpm"; pkgname: string; page?: number; page_size?: number; ordering?: "pull_count" | "last_push_at"; name?: string; }) => Promise<DtoTag>; export interface Client { groups: { /*** * 创建新组织。Create new organization. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:rw * * /groups */ post: Organizations_CreateOrganization; }; user: { /*** * 获取指定用户的详情信息。Get detailed information for a specified user. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-profile:r * * /user */ get: Users_GetUserInfo; /*** * 更新指定用户的详情信息。Updates the specified user's profile information. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-profile:rw * * /user */ post: Users_UpdateUserInfo; autocompleteSource: { /*** * 查询当前用户用户拥有指定权限的所有资源列表。List resources that the current user has specified permissions for. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-engage:r * * /user/autocomplete_source */ list: Users_AutoCompleteSource; }; groups: { /*** * 获取当前用户拥有权限的顶层组织列表。Get top-level organizations list that the current user has access to. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-engage:r * * /user/groups */ list: Organizations_ListTopGroups; /*** * 查询当前用户在指定组织下拥有指定权限的子组织列表。Get the list of sub-organizations that the current user has access to in the specified organization. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-engage:r * * /user/groups/{group} */ listByGroup: Organizations_ListGroups; }; repos: { /*** * 获取当前用户拥有指定权限及其以上权限的仓库。List repositories owned by the current user with the specified permissions or higher. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-engage:r * * /user/repos */ list: Repositories_GetRepos; }; staredRepos: { /*** * 获取当前用户 star 的仓库列表。List all stared repositories. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-engage:r * * /user/stared-repos */ list: Repositories_GetUserAllStaredRepos; }; }; users: { /*** * 获取指定用户的详情信息。Get detailed information for a specified user. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-profile:r * * /users/{username} */ get: Users_GetUserInfoByName; activities: { /*** * 获取个人动态活跃详情汇总 * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-engage:r * * /users/{username}/activities */ get: Activities_GetUserActivitiesByDate; }; avatar: { /*** * 获取指定用户的用户头像。Get the user's avatar. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-profile:r * * /users/{username}/avatar/{size} */ get: Assets_GetUserAvatar; }; followers: { /*** * 获取指定用户的粉丝列表。Get the followers list of specified user. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-engage:r * * /users/{username}/followers */ list: Followers_GetFollowersByUserID; }; following: { /*** * 获取指定用户的关注人列表。Get the list of users that the specified user is following. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-engage:r * * /users/{username}/following */ list: Followers_GetFollowingByUserID; }; groups: { /*** * 获取指定用户拥有权限的顶层组织列表。 Get a list of top-level organizations that the specified user has permissions to access. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-engage:r * * /users/{username}/groups */ get: Organizations_GetGroupsByUserID; }; pinnedRepos: { /*** * 获取指定用户的用户仓库墙。 Get a list of repositories that the specified user has pinned. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-engage:r * * /users/{username}/pinned-repos */ list: Repositories_GetPinnedRepoByID; }; repoActivities: { /*** * 个人仓库动态详情列表 * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-engage:r * * /users/{username}/repo-activities/{activityType} */ list: Activities_GetUserRepoActivityDetails; }; repos: { /*** * 获取指定用户有指定以上权限并且客人态可见的仓库。List repositories where the specified user has the specified permission level or higher and are visible to guests. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-engage:r * * /users/{username}/repos */ list: Repositories_GetReposByUserName; }; staredRepos: { /*** * 获取指定用户的 star 仓库列表。Get the list of repositories starred by the specified user. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-engage:r * * /users/{username}/stared-repos */ list: Starring_GetUserStaredRepos; }; }; workspace: { delete: { /*** * 删除我的云原生开发环境。Delete my workspace. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-engage:rw * * /workspace/delete */ post: Workspace_DeleteWorkspace; }; list: { /*** * 获取我的云原生开发环境列表。List my workspaces. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * account-engage:r * * /workspace/list */ get: Workspace_ListWorkspaces; }; }; group: { /*** * 删除指定组织。Delete the specified organization. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-delete:rw * * /{group} */ delete: Organizations_DeleteOrganization; /*** * 获取指定组织信息。Get information for the specified organization. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-resource:r * * /{group} */ get: Organizations_GetGroup; /*** * 更新组织信息, 可更新的内容为: 组织描述, 组织展示名称, 组织网站, 组织联系邮箱。Updates organization information including: description, display name, website URL and contact email. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:rw * * /{group} */ put: Organizations_UpdateOrganization; avatar: { /*** * 更新组织头像 URL 地址。Updates the organization avatar URL. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:rw * * /{group}/-/avatar */ put: Organizations_UpdateGroupAvatar; }; inheritMembers: { /*** * 获取指定组织或仓库内的继承成员。List inherited members within specified organization or repository。 * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:r * * /{group}/-/inherit-members */ list: Collaborators_ListInheritMembersOfGroup; }; logos: { /*** * 确认上传的logo。Confirms the uploaded logo. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:rw * * /{group}/-/logos */ put: Assets_PutLogos; /*** * 发起一个获取 logo 的请求,返回内容或者 302 到某个地址。Post a request to fetch a logo and returns the content directly or a 302 redirect to the logo URL. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-resource:r * * /{group}/-/logos/{size} */ get: Assets_GetLogos; }; members: { /*** * 获取指定组织或仓库内的所有直接成员。List all direct members within specified organization or repository. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:r * * /{group}/-/members */ list: Collaborators_ListMembersOfGroup; accessLevel: { /*** * 获取指定组织或仓库内, 访问成员在当前层级内的权限信息。Get permission information for accessing members at current level. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:r * * /{group}/-/members/access-level */ get: Contributors_GetMemberAccessLevelOfGroup; /*** * 获取指定组织或仓库内指定成员的权限信息, 结果按组织层级来展示, 包含上层组织的权限继承信息。Get specified member's permissions with organizational hierarchy. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:r * * /{group}/-/members/{username}/access-level */ list: Contributors_ListMemberAccessLevelOfGroup; }; /*** * 删除指定组织或仓库的直接成员。Remove direct members from specified organization/repository. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:rw * * /{group}/-/members/{username} */ delete: Collaborators_DeleteMembersOfGroup; /*** * 添加成员。Add members. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:rw * * /{group}/-/members/{username} */ post: Collaborators_AddMembersOfGroup; /*** * 更新指定组织或仓库内的直接成员权限信息。Update permission information for direct members in specified organization/repository. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:rw * * /{group}/-/members/{username} */ put: Collaborators_UpdateMembersOfGroup; }; pinnedRepos: { /*** * 获取指定组织的仓库墙列表。List the pinned repositories of a group. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:r * * /{group}/-/pinned-repos */ list: Repositories_GetPinnedRepoByGroup; /*** * 更新指定组织仓库墙。Update the pinned repositories of a group. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:rw * * /{group}/-/pinned-repos */ put: Repositories_SetPinnedRepoByGroup; }; repos: { /*** * 查询组织下访问用户有权限查看到仓库。List the repositories that the user has access to. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-resource:r * * /{group}/-/repos */ list: Repositories_GetGroupSubRepos; /*** * 创建仓库。Create repositories. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-resource:rw * * /{group}/-/repos */ post: Repositories_CreateRepo; }; settings: { /*** * 获取指定组织的配置详情。Get the configuration details for the specified organization. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:r * * /{group}/-/settings */ get: Organizations_GetGroupSetting; /*** * 更新指定组织的配置。Updates the configuration for the specified organization. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:rw * * /{group}/-/settings */ put: Organizations_UpdateGroupSetting; }; subGroups: { /*** * 获取指定组织下的子组织列表。Get the list of sub-organizations under the specified organization. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-resource:r * * /{group}/-/sub-groups */ list: Organizations_ListSubgroups; }; upload: { logos: { /*** * 发起一个上传 logo 的请求,返回上传 cos 的 url 和 form 内容。Post a request to upload a logo. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-manage:rw * * /{group}/-/upload/logos */ post: Assets_UploadLogos; }; }; }; mission: { /*** * 删除指定任务集。Delete the specified mission. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * mission-delete:rw * * /{mission} */ delete: Missions_DeleteMission; members: { /*** * 添加成员。Add members. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * mission-manage:rw * * /{mission}/-/members/{username} */ post: Collaborators_AddMembersOfMission; }; }; registry: { /*** * 删除制品仓库。Delete the artifact repository. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * registry-delete:rw * * /{registry} */ delete: Artifactory_DeleteRegistry; members: { /*** * 添加成员。Add members. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * registry-manage:rw * * /{registry}/-/members/{username} */ post: Collaborators_AddMembersOfRegistry; }; }; repo: { /*** * 删除指定仓库。Delete the specified repository. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-delete:rw * * /{repo} */ delete: Repositories_DeleteRepo; /*** * 获取指定仓库信息。Get information for the specified repository. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-basic-info:r * * /{repo} */ get: Repositories_GetRepo; /*** * 更新仓库信息, 可更新的内容为: 仓库简介, 仓库站点, 仓库主题, 开源许可证。updates repository details including description, website URL,topics and license type. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-manage:rw * * /{repo} */ patch: Repositories_UpdateRepo; build: { logs: { /*** * 查询流水线构建列表。List pipeline builds. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-cnb-trigger:r * * /{repo}/-/build/logs */ get: Build_GetBuildLogs; }; start: { /*** * 开始一个构建。Start a build. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-cnb-trigger:rw * * /{repo}/-/build/start */ post: Build_StartBuild; }; status: { /*** * 查询流水线构建状态。Get pipeline build status. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-cnb-trigger:r * * /{repo}/-/build/status/{sn} */ get: Build_GetBuildStatus; }; stop: { /*** * 停止一个构建。 Stop a build. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-cnb-trigger:rw * * /{repo}/-/build/stop/{sn} */ post: Build_StopBuild; }; }; commitAssets: { download: { /*** * 发起一个获取 commits 附件的请求,返回内容或者 302 到某个地址。Get a request to fetch a commit assets and returns the content directly or a 302 redirect to the assets URL. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-contents:r * * /{repo}/-/commit-assets/download/{fileName} */ get: Assets_GetCommitAssets; }; }; contributor: { trend: { /*** * 查询仓库贡献者前 100 名的详细趋势数据。Query detailed trend data for top 100 contributors of the repository. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:r * * /{repo}/-/contributor/trend */ get: RepoContributor_GetRepoContributorTrend; }; }; files: { /*** * 发起一个获取 files 的请求,返回内容或者 302 到某个地址。Initiate a request to retrieve files, returns content or 302 redirect. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-contents:r * * /{repo}/-/files/{userIdKey}/{randomUUID}/{fileName} */ get: Assets_GetFiles; /*** * 发起一个确认 files 的请求,上传的图片要调用此接口才能生效。Initiate a request to confirm files, uploaded images need to call this API to take effect. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-contents:rw * * /{repo}/-/files/{userIdKey}/{randomUUID}/{fileName} */ put: Assets_PutFiles; }; forks: { /*** * 获取指定仓库的 fork 列表。Get fork list for specified repository. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-base-info:r * * /{repo}/-/forks */ get: Repositories_ListForksRepos; /*** * fork 仓库。Fork a repository. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * group-resource:rw * * /{repo}/-/forks */ post: Repositories_CreateAFork; }; git: { archiveCommitChangedFiles: { /*** * 打包下载 commit 变更文件。Download archive of changed files for a commit. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:r * * /{repo}/-/git/archive-commit-changed-files/{sha1} */ get: Git_GetArchiveCommitChangedFiles; }; archiveCompareChangedFiles: { /*** * 打包下载两次 ref 之间的变更文件。Download archive of changed files for a compare. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:r * * /{repo}/-/git/archive-compare-changed-files/{base_head} */ get: Git_GetArchiveCompareChangedFiles; }; blobs: { /*** * 创建一个 blob。Create a blob. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:rw * * /{repo}/-/git/blobs */ post: Git_CreateBlob; }; branches: { /*** * 查询分支列表。List branches. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:r * * /{repo}/-/git/branches */ list: Git_ListBranches; /*** * 创建新分支。Create a new branch based on a start point. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:rw * * /{repo}/-/git/branches */ post: Git_CreateBranch; /*** * 删除指定分支。Delete the specified branch. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:rw * * /{repo}/-/git/branches/{branch} */ delete: Git_DeleteBranch; /*** * 查询指定分支。Get a branch. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:r * * /{repo}/-/git/branches/{branch} */ get: Git_GetBranch; }; commitAnnotationsInBatch: { /*** * 查询指定 commit 的元数据。Get commit annotations in batch. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:r * * /{repo}/-/git/commit-annotations-in-batch */ post: Git_GetCommitAnnotationsInBatch; }; commitAnnotations: { /*** * 查询指定 commit 的元数据。Get commit annotations. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:r * * /{repo}/-/git/commit-annotations/{sha} */ list: Git_GetCommitAnnotations; /*** * 设定指定 commit 的元数据。Put commit annotations. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:rw * * /{repo}/-/git/commit-annotations/{sha} */ put: Git_PutCommitAnnotations; /*** * 删除指定 commit 的元数据。Delete commit annotation. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:rw * * /{repo}/-/git/commit-annotations/{sha}/{key} */ delete: Git_DeleteCommitAnnotation; }; commitAssets: { /*** * 查询指定 commit 的附件。List commit assets. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:r * * /{repo}/-/git/commit-assets/{sha1} */ list: Git_GetCommitAssetsBySha; assetUploadConfirmation: { /*** * 确认 Commit asset 上传完成。Confirm commit asset upload. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:rw * * /{repo}/-/git/commit-assets/{sha1}/asset-upload-confirmation/{token}/{asset_path} */ post: Git_PostCommitAssetUploadConfirmation; }; assetUploadUrl: { /*** * 新增一个 Commit asset。Create a commit asset. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:rw * * /{repo}/-/git/commit-assets/{sha1}/asset-upload-url */ post: Git_PostCommitAssetUploadURL; }; /*** * 删除指定 commit 的附件。Delete commit asset. * * 访问令牌调用此接口需包含以下权限。Required permissions for access token. * repo-code:rw * * /{repo}/-/git/commit-assets/{sha1}/{asset_id}