python-cnb 1.25.8__tar.gz → 1.29.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_cnb-1.25.8/python_cnb.egg-info → python_cnb-1.29.15}/PKG-INFO +1 -1
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/activities.py +17 -0
- python_cnb-1.29.15/cnb/artifactsecurity.py +32 -0
- python_cnb-1.29.15/cnb/authentication.py +24 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/build.py +12 -10
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/cnb.py +6 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/git.py +5 -3
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/gitsettings.py +2 -2
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/issues.py +17 -0
- python_cnb-1.29.15/cnb/missionresources.py +47 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/models/api.py +43 -8
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/models/die.py +5 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/models/dto.py +125 -59
- python_cnb-1.29.15/cnb/models/handler.py +16 -0
- python_cnb-1.29.15/cnb/models/mission_mission_resource_dto_web.py +11 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/models/organization.py +6 -0
- python_cnb-1.25.8/cnb/models/git_woa_com_cnb_monorepo_platform_service_api_internal_models_artifactory_dto.py → python_cnb-1.29.15/cnb/models/platform_service_api_internal_models_artifactory_dto.py +1 -1
- python_cnb-1.29.15/cnb/models/web.py +103 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/organizations.py +68 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/registries.py +3 -3
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/repocontributor.py +21 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15/python_cnb.egg-info}/PKG-INFO +1 -1
- {python_cnb-1.25.8 → python_cnb-1.29.15}/python_cnb.egg-info/SOURCES.txt +8 -3
- {python_cnb-1.25.8 → python_cnb-1.29.15}/setup.py +1 -1
- python_cnb-1.25.8/cnb/models/web.py +0 -25
- {python_cnb-1.25.8 → python_cnb-1.29.15}/LICENSE +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/MANIFEST.in +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/README.md +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/__init__.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/ai.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/ai_ext.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/assets.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/badge.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/charge.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/client.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/event.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/exceptions.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/followers.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/knowledgebase.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/members.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/missions.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/models/__init__.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/models/chart.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/models/constant.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/models/convert.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/models/errors.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/models/flags.py +0 -0
- /python_cnb-1.25.8/cnb/models/git_woa_com_cnb_monorepo_git_internal_app_git_service_bff_api.py → /python_cnb-1.29.15/cnb/models/git_internal_app_git_service_bff_api.py +0 -0
- /python_cnb-1.25.8/cnb/models/git_woa_com_cnb_monorepo_git_internal_app_vcs_service_bff_api.py → /python_cnb-1.29.15/cnb/models/git_internal_app_vcs_service_bff_api.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/models/member.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/models/models.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/models/openapi.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/npcobservability.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/pulls.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/rank.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/releases.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/repocodeissue.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/repolabels.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/repositories.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/search.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/security.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/starring.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/users.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/cnb/workspace.py +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/pyproject.toml +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/python_cnb.egg-info/dependency_links.txt +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/python_cnb.egg-info/requires.txt +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/python_cnb.egg-info/top_level.txt +0 -0
- {python_cnb-1.25.8 → python_cnb-1.29.15}/setup.cfg +0 -0
|
@@ -24,6 +24,23 @@ class ActivitiesService:
|
|
|
24
24
|
)
|
|
25
25
|
return dto.ActivityDate.safe_parse(data)
|
|
26
26
|
|
|
27
|
+
# 获取活跃点日历。Get activity calendar.
|
|
28
|
+
def get_user_calendar(self,
|
|
29
|
+
username: str,
|
|
30
|
+
year: Optional[str] = None,
|
|
31
|
+
) -> dto.ActivityCalendar:
|
|
32
|
+
u = "/users/%s/calendar" % (username, )
|
|
33
|
+
|
|
34
|
+
query_params = {
|
|
35
|
+
"year": year,
|
|
36
|
+
}
|
|
37
|
+
data = self._client.request(
|
|
38
|
+
method="GET",
|
|
39
|
+
endpoint=u,
|
|
40
|
+
params=query_params,
|
|
41
|
+
)
|
|
42
|
+
return dto.ActivityCalendar.safe_parse(data)
|
|
43
|
+
|
|
27
44
|
# 获取仓库动态详情。Get repository activity details.
|
|
28
45
|
def get_user_repo_activity_details(self,
|
|
29
46
|
username: str,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Code generated by cnb.cool/cnb/sdk/cnb-sdk-generator. DO NOT EDIT.
|
|
2
|
+
# source: https://api.cnb.cool/swagger.json
|
|
3
|
+
|
|
4
|
+
from typing import Optional
|
|
5
|
+
from .models import dto
|
|
6
|
+
class ArtifactsecurityService:
|
|
7
|
+
def __init__(self, client):
|
|
8
|
+
self._client = client
|
|
9
|
+
|
|
10
|
+
# 查询制品安全概览。Get artifact security overview.
|
|
11
|
+
def get_artifact_security_overview(self,
|
|
12
|
+
slug: str,
|
|
13
|
+
t: str,
|
|
14
|
+
name: str,
|
|
15
|
+
tag: str,
|
|
16
|
+
filename: Optional[str] = None,
|
|
17
|
+
types: Optional[str] = None,
|
|
18
|
+
) -> dto.OpenAPIArtifactOverview:
|
|
19
|
+
u = "/%s/-/sca-artifact-scan/%s/%s/-/tag/%s/security/overview" % (slug, t, name, tag, )
|
|
20
|
+
|
|
21
|
+
query_params = {
|
|
22
|
+
"filename": filename,
|
|
23
|
+
"types": types,
|
|
24
|
+
}
|
|
25
|
+
data = self._client.request(
|
|
26
|
+
method="GET",
|
|
27
|
+
endpoint=u,
|
|
28
|
+
params=query_params,
|
|
29
|
+
)
|
|
30
|
+
return dto.OpenAPIArtifactOverview.safe_parse(data)
|
|
31
|
+
|
|
32
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Code generated by cnb.cool/cnb/sdk/cnb-sdk-generator. DO NOT EDIT.
|
|
2
|
+
# source: https://api.cnb.cool/swagger.json
|
|
3
|
+
|
|
4
|
+
from typing import Optional
|
|
5
|
+
from .models import dto
|
|
6
|
+
class AuthenticationService:
|
|
7
|
+
def __init__(self, client):
|
|
8
|
+
self._client = client
|
|
9
|
+
|
|
10
|
+
# 用 cnb_token 兑换 id_token, 仅允许流水线 token(oci 渠道)
|
|
11
|
+
def exchange_oidc_idtoken(self,
|
|
12
|
+
repo: str,
|
|
13
|
+
body_params: dto.IDTokenRequest,
|
|
14
|
+
) -> dto.IDTokenResponse:
|
|
15
|
+
u = "/%s/-/id_token" % (repo, )
|
|
16
|
+
|
|
17
|
+
data = self._client.request(
|
|
18
|
+
method="POST",
|
|
19
|
+
endpoint=u,
|
|
20
|
+
json=body_params.to_dict(),
|
|
21
|
+
)
|
|
22
|
+
return dto.IDTokenResponse.safe_parse(data)
|
|
23
|
+
|
|
24
|
+
|
|
@@ -20,7 +20,7 @@ class BuildService:
|
|
|
20
20
|
)
|
|
21
21
|
return dto.BuildCommonResult.safe_parse(data)
|
|
22
22
|
|
|
23
|
-
#
|
|
23
|
+
# 删除构建日志。Delete build logs.
|
|
24
24
|
def build_logs_delete(self,
|
|
25
25
|
repo: str,
|
|
26
26
|
sn: str,
|
|
@@ -33,7 +33,7 @@ class BuildService:
|
|
|
33
33
|
)
|
|
34
34
|
return dto.BuildCommonResult.safe_parse(data)
|
|
35
35
|
|
|
36
|
-
#
|
|
36
|
+
# 下载 Runner 日志。Download runner logs.
|
|
37
37
|
def build_runner_download_log(self,
|
|
38
38
|
repo: str,
|
|
39
39
|
pipelineId: str,
|
|
@@ -46,7 +46,7 @@ class BuildService:
|
|
|
46
46
|
)
|
|
47
47
|
return
|
|
48
48
|
|
|
49
|
-
#
|
|
49
|
+
# 查询 AI 用量汇总。List AI usage by model.
|
|
50
50
|
def get_build_ai_audit(self,
|
|
51
51
|
repo: str,
|
|
52
52
|
sn: str,
|
|
@@ -60,7 +60,7 @@ class BuildService:
|
|
|
60
60
|
)
|
|
61
61
|
return dto.BuildAiAuditResult.safe_parse(data)
|
|
62
62
|
|
|
63
|
-
# 查询 AI 请求明细。List AI
|
|
63
|
+
# 查询 AI 请求明细。List AI requests.
|
|
64
64
|
def get_build_ai_request(self,
|
|
65
65
|
repo: str,
|
|
66
66
|
sn: str,
|
|
@@ -75,7 +75,7 @@ class BuildService:
|
|
|
75
75
|
)
|
|
76
76
|
return dto.BuildAiRequestResult.safe_parse(data)
|
|
77
77
|
|
|
78
|
-
#
|
|
78
|
+
# 查询 AI 请求详情。Get AI request detail.
|
|
79
79
|
def get_build_ai_request_detail(self,
|
|
80
80
|
repo: str,
|
|
81
81
|
sn: str,
|
|
@@ -90,7 +90,7 @@ class BuildService:
|
|
|
90
90
|
)
|
|
91
91
|
return dto.BuildAiRequestDetailResult.safe_parse(data)
|
|
92
92
|
|
|
93
|
-
#
|
|
93
|
+
# 查询构建历史。List build history.
|
|
94
94
|
def get_build_logs(self,
|
|
95
95
|
repo: str,
|
|
96
96
|
createTime: Optional[str] = None,
|
|
@@ -103,6 +103,7 @@ class BuildService:
|
|
|
103
103
|
sourceRef: Optional[str] = None,
|
|
104
104
|
status: Optional[str] = None,
|
|
105
105
|
targetRef: Optional[str] = None,
|
|
106
|
+
title: Optional[str] = None,
|
|
106
107
|
userId: Optional[str] = None,
|
|
107
108
|
userName: Optional[str] = None,
|
|
108
109
|
) -> dto.BuildLogsResult:
|
|
@@ -119,6 +120,7 @@ class BuildService:
|
|
|
119
120
|
"sourceRef": sourceRef,
|
|
120
121
|
"status": status,
|
|
121
122
|
"targetRef": targetRef,
|
|
123
|
+
"title": title,
|
|
122
124
|
"userId": userId,
|
|
123
125
|
"userName": userName,
|
|
124
126
|
}
|
|
@@ -129,7 +131,7 @@ class BuildService:
|
|
|
129
131
|
)
|
|
130
132
|
return dto.BuildLogsResult.safe_parse(data)
|
|
131
133
|
|
|
132
|
-
#
|
|
134
|
+
# 查询阶段详情。Get stage detail.
|
|
133
135
|
def get_build_stage(self,
|
|
134
136
|
repo: str,
|
|
135
137
|
sn: str,
|
|
@@ -144,7 +146,7 @@ class BuildService:
|
|
|
144
146
|
)
|
|
145
147
|
return dto.BuildStageResult.safe_parse(data)
|
|
146
148
|
|
|
147
|
-
#
|
|
149
|
+
# 查询构建状态。Get build status.
|
|
148
150
|
def get_build_status(self,
|
|
149
151
|
repo: str,
|
|
150
152
|
sn: str,
|
|
@@ -157,7 +159,7 @@ class BuildService:
|
|
|
157
159
|
)
|
|
158
160
|
return dto.BuildStatusResult.safe_parse(data)
|
|
159
161
|
|
|
160
|
-
#
|
|
162
|
+
# 触发构建。Trigger a build.
|
|
161
163
|
def start_build(self,
|
|
162
164
|
repo: str,
|
|
163
165
|
body_params: dto.StartBuildReq,
|
|
@@ -171,7 +173,7 @@ class BuildService:
|
|
|
171
173
|
)
|
|
172
174
|
return dto.BuildResult.safe_parse(data)
|
|
173
175
|
|
|
174
|
-
#
|
|
176
|
+
# 停止构建。Stop a build.
|
|
175
177
|
def stop_build(self,
|
|
176
178
|
repo: str,
|
|
177
179
|
sn: str,
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
# source: https://api.cnb.cool/swagger.json
|
|
3
3
|
from .activities import ActivitiesService
|
|
4
4
|
from .ai_ext import AiService
|
|
5
|
+
from .artifactsecurity import ArtifactsecurityService
|
|
5
6
|
from .assets import AssetsService
|
|
7
|
+
from .authentication import AuthenticationService
|
|
6
8
|
from .badge import BadgeService
|
|
7
9
|
from .build import BuildService
|
|
8
10
|
from .charge import ChargeService
|
|
@@ -13,6 +15,7 @@ from .gitsettings import GitsettingsService
|
|
|
13
15
|
from .issues import IssuesService
|
|
14
16
|
from .knowledgebase import KnowledgebaseService
|
|
15
17
|
from .members import MembersService
|
|
18
|
+
from .missionresources import MissionResourcesService
|
|
16
19
|
from .missions import MissionsService
|
|
17
20
|
from .npcobservability import NpcobservabilityService
|
|
18
21
|
from .organizations import OrganizationsService
|
|
@@ -35,7 +38,9 @@ class CNBServices:
|
|
|
35
38
|
self.client = client
|
|
36
39
|
self.activities = ActivitiesService(client)
|
|
37
40
|
self.ai = AiService(client)
|
|
41
|
+
self.artifactsecurity = ArtifactsecurityService(client)
|
|
38
42
|
self.assets = AssetsService(client)
|
|
43
|
+
self.authentication = AuthenticationService(client)
|
|
39
44
|
self.badge = BadgeService(client)
|
|
40
45
|
self.build = BuildService(client)
|
|
41
46
|
self.charge = ChargeService(client)
|
|
@@ -46,6 +51,7 @@ class CNBServices:
|
|
|
46
51
|
self.issues = IssuesService(client)
|
|
47
52
|
self.knowledgebase = KnowledgebaseService(client)
|
|
48
53
|
self.members = MembersService(client)
|
|
54
|
+
self.missionResources = MissionResourcesService(client)
|
|
49
55
|
self.missions = MissionsService(client)
|
|
50
56
|
self.npcobservability = NpcobservabilityService(client)
|
|
51
57
|
self.organizations = OrganizationsService(client)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
from typing import Optional
|
|
5
5
|
from .models import api
|
|
6
|
-
from .models import
|
|
6
|
+
from .models import git_internal_app_git_service_bff_api
|
|
7
7
|
from .models import openapi
|
|
8
8
|
from .models import web
|
|
9
9
|
class GitService:
|
|
@@ -273,14 +273,14 @@ class GitService:
|
|
|
273
273
|
def get_commit_statuses(self,
|
|
274
274
|
repo: str,
|
|
275
275
|
commitish: str,
|
|
276
|
-
) -> list[
|
|
276
|
+
) -> list[git_internal_app_git_service_bff_api.CommitStatus]:
|
|
277
277
|
u = "/%s/-/git/commit-statuses/%s" % (repo, commitish, )
|
|
278
278
|
|
|
279
279
|
data = self._client.request(
|
|
280
280
|
method="GET",
|
|
281
281
|
endpoint=u,
|
|
282
282
|
)
|
|
283
|
-
return [
|
|
283
|
+
return [git_internal_app_git_service_bff_api.CommitStatus.safe_parse(item) for item in data]
|
|
284
284
|
|
|
285
285
|
# 比较提交差异。Compare commits.
|
|
286
286
|
def get_compare_commits(self,
|
|
@@ -409,12 +409,14 @@ class GitService:
|
|
|
409
409
|
repo: str,
|
|
410
410
|
page: Optional[int] = None,
|
|
411
411
|
page_size: Optional[int] = None,
|
|
412
|
+
query: Optional[str] = None,
|
|
412
413
|
) -> list[api.Branch]:
|
|
413
414
|
u = "/%s/-/git/branches" % (repo, )
|
|
414
415
|
|
|
415
416
|
query_params = {
|
|
416
417
|
"page": page,
|
|
417
418
|
"page_size": page_size,
|
|
419
|
+
"query": query,
|
|
418
420
|
}
|
|
419
421
|
data = self._client.request(
|
|
420
422
|
method="GET",
|
|
@@ -57,7 +57,7 @@ class GitsettingsService:
|
|
|
57
57
|
)
|
|
58
58
|
return api.PullRequestSettings.safe_parse(data)
|
|
59
59
|
|
|
60
|
-
#
|
|
60
|
+
# 查询推送管控设置。Get push control settings.
|
|
61
61
|
def get_push_limit_settings(self,
|
|
62
62
|
repo: str,
|
|
63
63
|
) -> api.PushLimitSettings:
|
|
@@ -138,7 +138,7 @@ class GitsettingsService:
|
|
|
138
138
|
)
|
|
139
139
|
return
|
|
140
140
|
|
|
141
|
-
#
|
|
141
|
+
# 设置推送管控。Set push control.
|
|
142
142
|
def put_push_limit_settings(self,
|
|
143
143
|
repo: str,
|
|
144
144
|
body_params: api.PushLimitSettings,
|
|
@@ -144,6 +144,23 @@ class IssuesService:
|
|
|
144
144
|
)
|
|
145
145
|
return [api.IssueProperty.safe_parse(item) for item in data]
|
|
146
146
|
|
|
147
|
+
# 批量查询 Issue。Batch get issues.
|
|
148
|
+
def get_issues_in_batch(self,
|
|
149
|
+
repo: str,
|
|
150
|
+
numbers: Optional[list[str]] = None,
|
|
151
|
+
) -> list[api.Issue]:
|
|
152
|
+
u = "/%s/-/issues/batch" % (repo, )
|
|
153
|
+
|
|
154
|
+
query_params = {
|
|
155
|
+
"numbers": numbers,
|
|
156
|
+
}
|
|
157
|
+
data = self._client.request(
|
|
158
|
+
method="GET",
|
|
159
|
+
endpoint=u,
|
|
160
|
+
params=query_params,
|
|
161
|
+
)
|
|
162
|
+
return [api.Issue.safe_parse(item) for item in data]
|
|
163
|
+
|
|
147
164
|
# 查询 Issue 动态。List issue activities.
|
|
148
165
|
def list_issue_activities(self,
|
|
149
166
|
repo: str,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Code generated by cnb.cool/cnb/sdk/cnb-sdk-generator. DO NOT EDIT.
|
|
2
|
+
# source: https://api.cnb.cool/swagger.json
|
|
3
|
+
|
|
4
|
+
from typing import Optional
|
|
5
|
+
from .models import handler
|
|
6
|
+
from .models import web
|
|
7
|
+
class MissionResourcesService:
|
|
8
|
+
def __init__(self, client):
|
|
9
|
+
self._client = client
|
|
10
|
+
|
|
11
|
+
# 获取任务集属性。Get mission fields.
|
|
12
|
+
def list_mission_fields_open_api(self,
|
|
13
|
+
mission: str,
|
|
14
|
+
type: Optional[str] = None,
|
|
15
|
+
) -> list[web.MissionField]:
|
|
16
|
+
u = "/%s/-/mission-resource/fields" % (mission, )
|
|
17
|
+
|
|
18
|
+
query_params = {
|
|
19
|
+
"type": type,
|
|
20
|
+
}
|
|
21
|
+
data = self._client.request(
|
|
22
|
+
method="GET",
|
|
23
|
+
endpoint=u,
|
|
24
|
+
params=query_params,
|
|
25
|
+
)
|
|
26
|
+
return [web.MissionField.safe_parse(item) for item in data]
|
|
27
|
+
|
|
28
|
+
# 查询任务集资源列表。Query mission resources.
|
|
29
|
+
def list_mission_resources_open_api(self,
|
|
30
|
+
mission: str,
|
|
31
|
+
cursor: Optional[str] = None,
|
|
32
|
+
body_params: Optional[handler.MissionFilterFrom] = None,
|
|
33
|
+
) -> web.MissionResources:
|
|
34
|
+
u = "/%s/-/mission-resource/resources" % (mission, )
|
|
35
|
+
|
|
36
|
+
query_params = {
|
|
37
|
+
"cursor": cursor,
|
|
38
|
+
}
|
|
39
|
+
data = self._client.request(
|
|
40
|
+
method="POST",
|
|
41
|
+
endpoint=u,
|
|
42
|
+
params=query_params,
|
|
43
|
+
json=body_params.to_dict(),
|
|
44
|
+
)
|
|
45
|
+
return web.MissionResources.safe_parse(data)
|
|
46
|
+
|
|
47
|
+
|
|
@@ -5,8 +5,8 @@ from pydantic import Field
|
|
|
5
5
|
from enum import Enum
|
|
6
6
|
from typing import Optional, Dict
|
|
7
7
|
from .models import CNBBaseModel
|
|
8
|
-
from . import
|
|
9
|
-
from . import
|
|
8
|
+
from . import git_internal_app_git_service_bff_api
|
|
9
|
+
from . import git_internal_app_vcs_service_bff_api
|
|
10
10
|
class AssetGroup(CNBBaseModel):
|
|
11
11
|
asset_group_id: Optional[str] = Field(alias="asset_group_id", default=None)
|
|
12
12
|
file_upload_urls: Optional[list['IssueAssetUploadURL']] = Field(alias="file_upload_urls", default=None)
|
|
@@ -105,7 +105,6 @@ class CommitAsset(CNBBaseModel):
|
|
|
105
105
|
author: Optional['UserInfo'] = Field(alias="author", default=None)
|
|
106
106
|
content_type: Optional[str] = Field(alias="content_type", default=None)
|
|
107
107
|
created_at: Optional[str] = Field(alias="created_at", default=None)
|
|
108
|
-
download_count: Optional[int] = Field(alias="download_count", default=None)
|
|
109
108
|
hash_algo: Optional[str] = Field(alias="hash_algo", default=None)
|
|
110
109
|
hash_value: Optional[str] = Field(alias="hash_value", default=None)
|
|
111
110
|
id: Optional[str] = Field(alias="id", default=None)
|
|
@@ -149,7 +148,7 @@ class CommitParent(CNBBaseModel):
|
|
|
149
148
|
class CommitStatuses(CNBBaseModel):
|
|
150
149
|
sha: Optional[str] = Field(alias="sha", default=None)
|
|
151
150
|
state: Optional[str] = Field(alias="state", default=None)
|
|
152
|
-
statuses: Optional[list['
|
|
151
|
+
statuses: Optional[list['git_internal_app_vcs_service_bff_api.CommitStatus']] = Field(alias="statuses", default=None)
|
|
153
152
|
pass
|
|
154
153
|
class CompareResponse(CNBBaseModel):
|
|
155
154
|
base_commit: Optional['Commit'] = Field(alias="base_commit", default=None)
|
|
@@ -217,6 +216,7 @@ class GPGSubkey(CNBBaseModel):
|
|
|
217
216
|
class Issue(CNBBaseModel):
|
|
218
217
|
assignees: Optional[list['UserInfo']] = Field(alias="assignees", default=None)
|
|
219
218
|
author: Optional['UserInfo'] = Field(alias="author", default=None)
|
|
219
|
+
closed_at: Optional[str] = Field(alias="closed_at", default=None)
|
|
220
220
|
comment_count: Optional[int] = Field(alias="comment_count", default=None)
|
|
221
221
|
created_at: Optional[str] = Field(alias="created_at", default=None)
|
|
222
222
|
ended_at: Optional[str] = Field(alias="ended_at", default=None)
|
|
@@ -252,13 +252,15 @@ class IssueComment(CNBBaseModel):
|
|
|
252
252
|
body: Optional[str] = Field(alias="body", default=None)
|
|
253
253
|
created_at: Optional[str] = Field(alias="created_at", default=None)
|
|
254
254
|
id: Optional[str] = Field(alias="id", default=None)
|
|
255
|
-
reactions: Optional[list['
|
|
255
|
+
reactions: Optional[list['git_internal_app_vcs_service_bff_api.SceneReaction']] = Field(alias="reactions", default=None)
|
|
256
|
+
statuses: Optional['StatusesMap'] = Field(alias="statuses", default=None)
|
|
256
257
|
updated_at: Optional[str] = Field(alias="updated_at", default=None)
|
|
257
258
|
pass
|
|
258
259
|
class IssueDetail(CNBBaseModel):
|
|
259
260
|
assignees: Optional[list['UserInfo']] = Field(alias="assignees", default=None)
|
|
260
261
|
author: Optional['UserInfo'] = Field(alias="author", default=None)
|
|
261
262
|
body: Optional[str] = Field(alias="body", default=None)
|
|
263
|
+
closed_at: Optional[str] = Field(alias="closed_at", default=None)
|
|
262
264
|
comment_count: Optional[int] = Field(alias="comment_count", default=None)
|
|
263
265
|
created_at: Optional[str] = Field(alias="created_at", default=None)
|
|
264
266
|
ended_at: Optional[str] = Field(alias="ended_at", default=None)
|
|
@@ -271,6 +273,7 @@ class IssueDetail(CNBBaseModel):
|
|
|
271
273
|
started_at: Optional[str] = Field(alias="started_at", default=None)
|
|
272
274
|
state: Optional[str] = Field(alias="state", default=None)
|
|
273
275
|
state_reason: Optional[str] = Field(alias="state_reason", default=None)
|
|
276
|
+
statuses: Optional['StatusesMap'] = Field(alias="statuses", default=None)
|
|
274
277
|
title: Optional[str] = Field(alias="title", default=None)
|
|
275
278
|
updated_at: Optional[str] = Field(alias="updated_at", default=None)
|
|
276
279
|
pass
|
|
@@ -302,6 +305,7 @@ class LabelInfo(CNBBaseModel):
|
|
|
302
305
|
class MergePullRequest(CNBBaseModel):
|
|
303
306
|
commit_message: Optional[str] = Field(alias="commit_message", default=None)
|
|
304
307
|
commit_title: Optional[str] = Field(alias="commit_title", default=None)
|
|
308
|
+
force: Optional[bool] = Field(alias="force", default=None)
|
|
305
309
|
merge_style: Optional[str] = Field(alias="merge_style", default=None)
|
|
306
310
|
pass
|
|
307
311
|
class MergePullResponse(CNBBaseModel):
|
|
@@ -323,6 +327,7 @@ class PatchIssueCommentForm(CNBBaseModel):
|
|
|
323
327
|
class PatchIssueForm(CNBBaseModel):
|
|
324
328
|
body: Optional[str] = Field(alias="body", default=None)
|
|
325
329
|
end_date: Optional[str] = Field(alias="end_date", default=None)
|
|
330
|
+
invisible: Optional[bool] = Field(alias="invisible", default=None)
|
|
326
331
|
priority: Optional[str] = Field(alias="priority", default=None)
|
|
327
332
|
start_date: Optional[str] = Field(alias="start_date", default=None)
|
|
328
333
|
state: Optional[str] = Field(alias="state", default=None)
|
|
@@ -421,6 +426,7 @@ class Pull(CNBBaseModel):
|
|
|
421
426
|
number: Optional[str] = Field(alias="number", default=None)
|
|
422
427
|
reviewers: Optional[list['PullReviewer']] = Field(alias="reviewers", default=None)
|
|
423
428
|
state: Optional[str] = Field(alias="state", default=None)
|
|
429
|
+
statuses: Optional['StatusesMap'] = Field(alias="statuses", default=None)
|
|
424
430
|
title: Optional[str] = Field(alias="title", default=None)
|
|
425
431
|
pass
|
|
426
432
|
class PullCommentCreationForm(CNBBaseModel):
|
|
@@ -483,7 +489,8 @@ class PullRequestComment(CNBBaseModel):
|
|
|
483
489
|
body: Optional[str] = Field(alias="body", default=None)
|
|
484
490
|
created_at: Optional[str] = Field(alias="created_at", default=None)
|
|
485
491
|
id: Optional[str] = Field(alias="id", default=None)
|
|
486
|
-
reactions: Optional[list['
|
|
492
|
+
reactions: Optional[list['git_internal_app_git_service_bff_api.SceneReaction']] = Field(alias="reactions", default=None)
|
|
493
|
+
statuses: Optional['StatusesMap'] = Field(alias="statuses", default=None)
|
|
487
494
|
updated_at: Optional[str] = Field(alias="updated_at", default=None)
|
|
488
495
|
pass
|
|
489
496
|
class PullRequestInfo(CNBBaseModel):
|
|
@@ -518,6 +525,7 @@ class PullReview(CNBBaseModel):
|
|
|
518
525
|
created_at: Optional[str] = Field(alias="created_at", default=None)
|
|
519
526
|
id: Optional[str] = Field(alias="id", default=None)
|
|
520
527
|
state: Optional[str] = Field(alias="state", default=None)
|
|
528
|
+
statuses: Optional['StatusesMap'] = Field(alias="statuses", default=None)
|
|
521
529
|
updated_at: Optional[str] = Field(alias="updated_at", default=None)
|
|
522
530
|
pass
|
|
523
531
|
class PullReviewComment(CNBBaseModel):
|
|
@@ -530,12 +538,13 @@ class PullReviewComment(CNBBaseModel):
|
|
|
530
538
|
end_side: Optional[str] = Field(alias="end_side", default=None)
|
|
531
539
|
id: Optional[str] = Field(alias="id", default=None)
|
|
532
540
|
path: Optional[str] = Field(alias="path", default=None)
|
|
533
|
-
reactions: Optional[list['
|
|
541
|
+
reactions: Optional[list['git_internal_app_git_service_bff_api.SceneReaction']] = Field(alias="reactions", default=None)
|
|
534
542
|
reply_to_comment_id: Optional[str] = Field(alias="reply_to_comment_id", default=None)
|
|
535
543
|
review_id: Optional[str] = Field(alias="review_id", default=None)
|
|
536
544
|
review_state: Optional[str] = Field(alias="review_state", default=None)
|
|
537
545
|
start_line: Optional[int] = Field(alias="start_line", default=None)
|
|
538
546
|
start_side: Optional[str] = Field(alias="start_side", default=None)
|
|
547
|
+
statuses: Optional['StatusesMap'] = Field(alias="statuses", default=None)
|
|
539
548
|
subject_type: Optional[str] = Field(alias="subject_type", default=None)
|
|
540
549
|
updated_at: Optional[str] = Field(alias="updated_at", default=None)
|
|
541
550
|
pass
|
|
@@ -591,7 +600,6 @@ class ReleaseAsset(CNBBaseModel):
|
|
|
591
600
|
browser_download_url: Optional[str] = Field(alias="browser_download_url", default=None)
|
|
592
601
|
content_type: Optional[str] = Field(alias="content_type", default=None)
|
|
593
602
|
created_at: Optional[str] = Field(alias="created_at", default=None)
|
|
594
|
-
download_count: Optional[int] = Field(alias="download_count", default=None)
|
|
595
603
|
hash_algo: Optional[str] = Field(alias="hash_algo", default=None)
|
|
596
604
|
hash_value: Optional[str] = Field(alias="hash_value", default=None)
|
|
597
605
|
id: Optional[str] = Field(alias="id", default=None)
|
|
@@ -608,6 +616,11 @@ class Repo(CNBBaseModel):
|
|
|
608
616
|
path: Optional[str] = Field(alias="path", default=None)
|
|
609
617
|
web_url: Optional[str] = Field(alias="web_url", default=None)
|
|
610
618
|
pass
|
|
619
|
+
class RepoContribSimply(CNBBaseModel):
|
|
620
|
+
meta: Optional['Meta'] = Field(alias="meta", default=None)
|
|
621
|
+
top_100_contrib: Optional[list['UserContributorSimply']] = Field(alias="top_100_contrib", default=None)
|
|
622
|
+
total: Optional[int] = Field(alias="total", default=None)
|
|
623
|
+
pass
|
|
611
624
|
class RepoContribTrend(CNBBaseModel):
|
|
612
625
|
meta: Optional['Meta'] = Field(alias="meta", default=None)
|
|
613
626
|
repo_data: Optional[list['Week']] = Field(alias="repo_data", default=None)
|
|
@@ -633,6 +646,22 @@ class Signature(CNBBaseModel):
|
|
|
633
646
|
email: Optional[str] = Field(alias="email", default=None)
|
|
634
647
|
name: Optional[str] = Field(alias="name", default=None)
|
|
635
648
|
pass
|
|
649
|
+
class StatusGroup(CNBBaseModel):
|
|
650
|
+
annotations: Optional[Dict[str, 'str']] = Field(alias="annotations", default=None)
|
|
651
|
+
context: Optional[Dict[str, 'str']] = Field(alias="context", default=None)
|
|
652
|
+
key: Optional[Dict[str, 'str']] = Field(alias="key", default=None)
|
|
653
|
+
statuses: Optional[list['StatusItem']] = Field(alias="statuses", default=None)
|
|
654
|
+
pass
|
|
655
|
+
class StatusItem(CNBBaseModel):
|
|
656
|
+
annotations: Optional[Dict[str, 'str']] = Field(alias="annotations", default=None)
|
|
657
|
+
context: Optional[str] = Field(alias="context", default=None)
|
|
658
|
+
description: Optional[str] = Field(alias="description", default=None)
|
|
659
|
+
state: Optional[str] = Field(alias="state", default=None)
|
|
660
|
+
target_url: Optional[str] = Field(alias="target_url", default=None)
|
|
661
|
+
tasks: Optional[Dict[str, 'str']] = Field(alias="tasks", default=None)
|
|
662
|
+
pass
|
|
663
|
+
class StatusesMap(CNBBaseModel):
|
|
664
|
+
pass
|
|
636
665
|
class Tag(CNBBaseModel):
|
|
637
666
|
commit: Optional['Commit'] = Field(alias="commit", default=None)
|
|
638
667
|
name: Optional[str] = Field(alias="name", default=None)
|
|
@@ -653,6 +682,11 @@ class TreeEntry(CNBBaseModel):
|
|
|
653
682
|
sha: Optional[str] = Field(alias="sha", default=None)
|
|
654
683
|
type: Optional[str] = Field(alias="type", default=None)
|
|
655
684
|
pass
|
|
685
|
+
class UserContributorSimply(CNBBaseModel):
|
|
686
|
+
commit_count: Optional[int] = Field(alias="commit_count", default=None)
|
|
687
|
+
email: Optional[str] = Field(alias="email", default=None)
|
|
688
|
+
user_name: Optional[str] = Field(alias="user_name", default=None)
|
|
689
|
+
pass
|
|
656
690
|
class UserInfo(CNBBaseModel):
|
|
657
691
|
avatar: Optional[str] = Field(alias="avatar", default=None)
|
|
658
692
|
email: Optional[str] = Field(alias="email", default=None)
|
|
@@ -664,6 +698,7 @@ class UserInfo(CNBBaseModel):
|
|
|
664
698
|
class UserIssue(CNBBaseModel):
|
|
665
699
|
assignees: Optional[list['UserInfo']] = Field(alias="assignees", default=None)
|
|
666
700
|
author: Optional['UserInfo'] = Field(alias="author", default=None)
|
|
701
|
+
closed_at: Optional[str] = Field(alias="closed_at", default=None)
|
|
667
702
|
comment_count: Optional[int] = Field(alias="comment_count", default=None)
|
|
668
703
|
created_at: Optional[str] = Field(alias="created_at", default=None)
|
|
669
704
|
ended_at: Optional[str] = Field(alias="ended_at", default=None)
|
|
@@ -5,6 +5,11 @@ from pydantic import Field
|
|
|
5
5
|
from enum import Enum
|
|
6
6
|
from typing import Optional, Dict
|
|
7
7
|
from .models import CNBBaseModel
|
|
8
|
+
class WebErr(CNBBaseModel):
|
|
9
|
+
errcode: Optional[int] = Field(alias="errcode", default=None)
|
|
10
|
+
errmsg: Optional[str] = Field(alias="errmsg", default=None)
|
|
11
|
+
errparam: Optional[Dict[str, 'object']] = Field(alias="errparam", default=None)
|
|
12
|
+
pass
|
|
8
13
|
class WebError(CNBBaseModel):
|
|
9
14
|
errcode: Optional[int] = Field(alias="errcode", default=None)
|
|
10
15
|
errmsg: Optional[str] = Field(alias="errmsg", default=None)
|