@taole/deploy-helper 1.0.2 → 1.0.3
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.
- package/README.md +1 -4
- package/lib/pipelineApi.mjs +17 -16
- package/lib/yunxiaoFlowApi.mjs +115 -0
- package/package.json +4 -5
- package/modules/alibabacloud-devops-mcp-server/dist/common/errors.js +0 -69
- package/modules/alibabacloud-devops-mcp-server/dist/common/modularTemplates.js +0 -483
- package/modules/alibabacloud-devops-mcp-server/dist/common/pipelineTemplates.js +0 -19
- package/modules/alibabacloud-devops-mcp-server/dist/common/types.js +0 -1119
- package/modules/alibabacloud-devops-mcp-server/dist/common/utils.js +0 -353
- package/modules/alibabacloud-devops-mcp-server/dist/common/version.js +0 -1
- package/modules/alibabacloud-devops-mcp-server/dist/index.js +0 -1067
- package/modules/alibabacloud-devops-mcp-server/dist/operations/codeup/branches.js +0 -144
- package/modules/alibabacloud-devops-mcp-server/dist/operations/codeup/changeRequestComments.js +0 -89
- package/modules/alibabacloud-devops-mcp-server/dist/operations/codeup/changeRequests.js +0 -203
- package/modules/alibabacloud-devops-mcp-server/dist/operations/codeup/compare.js +0 -26
- package/modules/alibabacloud-devops-mcp-server/dist/operations/codeup/files.js +0 -233
- package/modules/alibabacloud-devops-mcp-server/dist/operations/codeup/repositories.js +0 -64
- package/modules/alibabacloud-devops-mcp-server/dist/operations/flow/hostGroup.js +0 -48
- package/modules/alibabacloud-devops-mcp-server/dist/operations/flow/pipeline.js +0 -514
- package/modules/alibabacloud-devops-mcp-server/dist/operations/flow/pipelineJob.js +0 -113
- package/modules/alibabacloud-devops-mcp-server/dist/operations/flow/serviceConnection.js +0 -23
- package/modules/alibabacloud-devops-mcp-server/dist/operations/organization/members.js +0 -94
- package/modules/alibabacloud-devops-mcp-server/dist/operations/organization/organization.js +0 -73
- package/modules/alibabacloud-devops-mcp-server/dist/operations/packages/artifacts.js +0 -64
- package/modules/alibabacloud-devops-mcp-server/dist/operations/packages/repositories.js +0 -35
- package/modules/alibabacloud-devops-mcp-server/dist/operations/projex/project.js +0 -206
- package/modules/alibabacloud-devops-mcp-server/dist/operations/projex/sprint.js +0 -30
- package/modules/alibabacloud-devops-mcp-server/dist/operations/projex/workitem.js +0 -264
|
@@ -1,1119 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export let GetOrganizationMembersSchema = z.object({
|
|
3
|
-
organizationId: z.string().describe("Organization ID"),
|
|
4
|
-
page: z.number().int().optional().describe("Page number"),
|
|
5
|
-
perPage: z.number().int().optional().describe("Page size"),
|
|
6
|
-
});
|
|
7
|
-
// Organization Role related types
|
|
8
|
-
export const OrganizationRoleSchema = z.object({
|
|
9
|
-
id: z.string().describe("Role ID"),
|
|
10
|
-
name: z.string().describe("Role name"),
|
|
11
|
-
organizationId: z.string().describe("Organization ID"),
|
|
12
|
-
permissions: z.array(z.string()).describe("Role permission list")
|
|
13
|
-
});
|
|
14
|
-
export const OrganizationRole = z.array(OrganizationRoleSchema);
|
|
15
|
-
export const ListOrganizationRolesSchema = z.object({
|
|
16
|
-
organizationId: z.string().describe("Organization ID")
|
|
17
|
-
});
|
|
18
|
-
export const GetOrganizationRoleSchema = z.object({
|
|
19
|
-
organizationId: z.string().describe("Organization ID"),
|
|
20
|
-
roleId: z.string().describe("Role ID")
|
|
21
|
-
});
|
|
22
|
-
// Organization Department related types
|
|
23
|
-
export const GetOrganizationDepartmentAncestorsSchema = z.object({
|
|
24
|
-
organizationId: z.string().describe("Organization ID"),
|
|
25
|
-
id: z.string().describe("Department ID"),
|
|
26
|
-
});
|
|
27
|
-
export const GetOrganizationDepartmentInfoSchema = z.object({
|
|
28
|
-
organizationId: z.string().describe("Organization ID"),
|
|
29
|
-
id: z.string().describe("Department ID"),
|
|
30
|
-
});
|
|
31
|
-
export const GetOrganizationDepartmentsSchema = z.object({
|
|
32
|
-
organizationId: z.string().describe("Organization ID"),
|
|
33
|
-
parentId: z.string().optional().describe("Parent department ID"),
|
|
34
|
-
});
|
|
35
|
-
// Organization related types
|
|
36
|
-
export const CurrentOrganizationInfoSchema = z.object({
|
|
37
|
-
lastOrganization: z.string().optional().describe("Organization ID of the most recent login, used for subsequent API calls, should be used as organizationId"),
|
|
38
|
-
userId: z.string().optional().describe("Current user ID, not the organization ID"),
|
|
39
|
-
userName: z.string().optional().describe("Current user name"),
|
|
40
|
-
});
|
|
41
|
-
export const OrganizationInfoSchema = z.object({
|
|
42
|
-
id: z.string().optional().describe("Organization ID"),
|
|
43
|
-
name: z.string().optional().describe("Organization name"),
|
|
44
|
-
description: z.string().optional().describe("Organization description"),
|
|
45
|
-
});
|
|
46
|
-
export const UserOrganizationsInfoSchema = z.array(OrganizationInfoSchema);
|
|
47
|
-
// User related types
|
|
48
|
-
export const UserInfoSchema = z.object({
|
|
49
|
-
id: z.string().nullable().optional().describe("User ID"),
|
|
50
|
-
name: z.string().nullable().optional().describe("User name"),
|
|
51
|
-
});
|
|
52
|
-
// Current user information schema
|
|
53
|
-
export const CurrentUserSchema = z.object({
|
|
54
|
-
id: z.string().nullable().optional().describe("User ID"),
|
|
55
|
-
name: z.string().optional().describe("Display name"),
|
|
56
|
-
email: z.string().optional().describe("Email address"),
|
|
57
|
-
username: z.string().optional().describe("Login account name"),
|
|
58
|
-
lastOrganization: z.string().optional().describe("Last login organization ID"),
|
|
59
|
-
staffId: z.string().optional().describe("Staff ID"),
|
|
60
|
-
nickName: z.string().optional().describe("Nickname"),
|
|
61
|
-
sysDeptIds: z.array(z.string()).optional().describe("Department IDs"),
|
|
62
|
-
createdAt: z.string().optional().describe("Creation time"),
|
|
63
|
-
deletedAt: z.string().optional().describe("Deletion time")
|
|
64
|
-
});
|
|
65
|
-
// Custom field related types
|
|
66
|
-
export const FieldItemSchema = z.object({
|
|
67
|
-
displayValue: z.string().nullable().optional().describe("Display value"),
|
|
68
|
-
identifier: z.string().nullable().optional().describe("Identifier"),
|
|
69
|
-
});
|
|
70
|
-
export const CustomFieldValuesSchema = z.object({
|
|
71
|
-
fieldId: z.string().nullable().optional().describe("Custom field ID"),
|
|
72
|
-
fieldName: z.string().nullable().optional().describe("Custom field name"),
|
|
73
|
-
values: z.array(FieldItemSchema).nullable().optional().describe("Values"),
|
|
74
|
-
});
|
|
75
|
-
export const ValueSchema = z.object({
|
|
76
|
-
displayValue: z.string().nullable().optional().describe("Display value"),
|
|
77
|
-
identifier: z.string().nullable().optional().describe("Identifier"),
|
|
78
|
-
});
|
|
79
|
-
export const CustomFieldValueSchema = z.object({
|
|
80
|
-
fieldFormat: z.string().nullable().optional().describe("Field format"),
|
|
81
|
-
fieldId: z.string().nullable().optional().describe("Field ID"),
|
|
82
|
-
fieldName: z.string().nullable().optional().describe("Field name"),
|
|
83
|
-
values: z.array(ValueSchema).nullable().optional().describe("Values"),
|
|
84
|
-
});
|
|
85
|
-
// Project related types
|
|
86
|
-
export const ProjectStatusInfoSchema = z.object({
|
|
87
|
-
id: z.string().nullable().optional().describe("Status ID"),
|
|
88
|
-
name: z.string().nullable().optional().describe("Status name"),
|
|
89
|
-
});
|
|
90
|
-
export const ProjectInfoSchema = z.object({
|
|
91
|
-
id: z.string().nullable().optional().describe("Project ID, unique identifier for the project"),
|
|
92
|
-
name: z.string().nullable().optional().describe("Project name"),
|
|
93
|
-
description: z.string().nullable().optional().describe("Project description"),
|
|
94
|
-
icon: z.string().nullable().optional().describe("Icon URL"),
|
|
95
|
-
customCode: z.string().nullable().optional().describe("Code number"),
|
|
96
|
-
gmtCreate: z.number().int().nullable().optional().describe("Creation timestamp"),
|
|
97
|
-
gmtModified: z.number().int().nullable().optional().describe("Last update timestamp"),
|
|
98
|
-
logicalStatus: z.string().nullable().optional().describe("Logical status, e.g., normal"),
|
|
99
|
-
scope: z.string().nullable().optional().describe("Public type, enum values: public, private"),
|
|
100
|
-
creator: UserInfoSchema.nullable().optional().describe("Creator"),
|
|
101
|
-
modifier: UserInfoSchema.nullable().optional().describe("Modifier"),
|
|
102
|
-
status: ProjectStatusInfoSchema.nullable().optional().describe("Status"),
|
|
103
|
-
customFieldValues: z.array(CustomFieldValuesSchema).nullable().optional().describe("Custom field values"),
|
|
104
|
-
logoUrl: z.string().nullable().optional().describe("Project logo URL"),
|
|
105
|
-
isArchived: z.boolean().nullable().optional().describe("Whether archived"),
|
|
106
|
-
isPublic: z.boolean().nullable().optional().describe("Whether public"),
|
|
107
|
-
accessLevel: z.string().nullable().optional().describe("Access level"),
|
|
108
|
-
organizationIdentifier: z.string().nullable().optional().describe("Organization identifier"),
|
|
109
|
-
includeSubOrgs: z.boolean().nullable().optional().describe("Whether to include sub-organizations"),
|
|
110
|
-
isTemplate: z.boolean().nullable().optional().describe("Whether it's a template"),
|
|
111
|
-
parentIdentifier: z.string().nullable().optional().describe("Parent identifier"),
|
|
112
|
-
associatedCodes: z.array(z.string()).nullable().optional().describe("Associated code repositories"),
|
|
113
|
-
associatedCodeSources: z.array(z.string()).nullable().optional().describe("Associated code sources"),
|
|
114
|
-
customField: z.record(z.string(), z.any()).nullable().optional().describe("Custom fields"),
|
|
115
|
-
statusInfo: z.object({
|
|
116
|
-
identifier: z.string().nullable().optional().describe("Status identifier"),
|
|
117
|
-
name: z.string().nullable().optional().describe("Status name"),
|
|
118
|
-
color: z.string().nullable().optional().describe("Status color"),
|
|
119
|
-
type: z.string().nullable().optional().describe("Status type"),
|
|
120
|
-
desc: z.string().nullable().optional().describe("Status description"),
|
|
121
|
-
}).nullable().optional().describe("Status information"),
|
|
122
|
-
});
|
|
123
|
-
// Sprint related types
|
|
124
|
-
export const SprintInfoSchema = z.object({
|
|
125
|
-
identifier: z.string().optional().describe("Sprint identifier"),
|
|
126
|
-
name: z.string().optional().describe("Sprint name"),
|
|
127
|
-
goal: z.string().optional().describe("Sprint goal"),
|
|
128
|
-
startDate: z.string().optional().describe("Start date"),
|
|
129
|
-
endDate: z.string().optional().describe("End date"),
|
|
130
|
-
status: z.string().optional().describe("Status"),
|
|
131
|
-
spaceIdentifier: z.string().optional().describe("Project identifier"),
|
|
132
|
-
organizationIdentifier: z.string().optional().describe("Organization identifier"),
|
|
133
|
-
gmtCreate: z.string().optional().describe("Creation time"),
|
|
134
|
-
gmtModified: z.string().optional().describe("Last modified time"),
|
|
135
|
-
capacityHours: z.number().optional().describe("Capacity hours"),
|
|
136
|
-
creator: UserInfoSchema.nullable().optional().describe("Creator"),
|
|
137
|
-
description: z.string().optional().describe("Description"),
|
|
138
|
-
locked: z.boolean().optional().describe("Whether locked"),
|
|
139
|
-
modifier: UserInfoSchema.nullable().optional().describe("Modifier"),
|
|
140
|
-
owners: z.array(UserInfoSchema).nullable().optional().describe("Owners"),
|
|
141
|
-
});
|
|
142
|
-
export const SprintSchema = z.object({
|
|
143
|
-
id: z.string().optional().describe("Sprint ID"),
|
|
144
|
-
name: z.string().optional().describe("Sprint name"),
|
|
145
|
-
});
|
|
146
|
-
// Work item related types
|
|
147
|
-
export const WorkItemTypeSchema = z.object({
|
|
148
|
-
addUser: z.object({
|
|
149
|
-
id: z.string().nullable().optional().describe("user id"),
|
|
150
|
-
name: z.string().nullable().optional().describe("名称")
|
|
151
|
-
}).nullable().optional(),
|
|
152
|
-
categoryId: z.string().nullable().optional().describe("Unique identifier of the category, e.g., Req, Task, Bug"),
|
|
153
|
-
creator: z.object({
|
|
154
|
-
id: z.string().nullable().optional().describe("User ID"),
|
|
155
|
-
name: z.string().nullable().optional().describe("Name")
|
|
156
|
-
}).nullable().optional(),
|
|
157
|
-
defaultType: z.boolean().nullable().optional().describe("Is it the default type"),
|
|
158
|
-
description: z.string().nullable().optional().describe("Type description"),
|
|
159
|
-
enable: z.boolean().nullable().optional().describe("Is it enabled"),
|
|
160
|
-
gmtAdd: z.string().nullable().optional().describe("Add time"),
|
|
161
|
-
gmtCreate: z.string().nullable().optional().describe("Creation time"),
|
|
162
|
-
id: z.string().describe("Unique identifier of the work item type"),
|
|
163
|
-
name: z.string().nullable().optional().describe("Type name"),
|
|
164
|
-
nameEn: z.string().nullable().optional().describe("English name of the type"),
|
|
165
|
-
systemDefault: z.boolean().nullable().optional().describe("Is it a system default type")
|
|
166
|
-
});
|
|
167
|
-
export const StatusSchema = z.object({
|
|
168
|
-
displayName: z.string().nullable().optional().describe("Display name"),
|
|
169
|
-
id: z.string().nullable().optional().describe("Status ID"),
|
|
170
|
-
name: z.string().nullable().optional().describe("Status name"),
|
|
171
|
-
nameEn: z.string().nullable().optional().describe("English name"),
|
|
172
|
-
});
|
|
173
|
-
export const SpaceSchema = z.object({
|
|
174
|
-
id: z.string().optional().describe("Space ID"),
|
|
175
|
-
name: z.string().optional().describe("Space name"),
|
|
176
|
-
});
|
|
177
|
-
export const LabelSchema = z.object({
|
|
178
|
-
id: z.string().nullable().optional().describe("Label ID"),
|
|
179
|
-
name: z.string().nullable().optional().describe("Label name"),
|
|
180
|
-
color: z.string().nullable().optional().describe("Label color"),
|
|
181
|
-
});
|
|
182
|
-
export const VersionSchema = z.object({
|
|
183
|
-
id: z.string().nullable().optional().describe("Version ID"),
|
|
184
|
-
name: z.string().nullable().optional().describe("Version name"),
|
|
185
|
-
});
|
|
186
|
-
export const WorkItemSchema = z.object({
|
|
187
|
-
id: z.string().describe("Work item ID"),
|
|
188
|
-
subject: z.string().nullable().optional().describe("Title"),
|
|
189
|
-
description: z.string().nullable().optional().describe("Description"),
|
|
190
|
-
gmtCreate: z.number().int().nullable().optional().describe("Creation time"),
|
|
191
|
-
gmtModified: z.number().int().nullable().optional().describe("Last modification time"),
|
|
192
|
-
workitemType: WorkItemTypeSchema.nullable().optional().describe("Work item type"),
|
|
193
|
-
status: StatusSchema.nullable().optional().describe("Status"),
|
|
194
|
-
formatType: z.string().nullable().optional().describe("Description format. Supported values: RICHTEXT (rich text format), MARKDOWN (markdown format)"),
|
|
195
|
-
categoryId: z.string().nullable().optional().describe("Category ID"),
|
|
196
|
-
logicalStatus: z.string().nullable().optional().describe("Logical status, e.g., normal, archived"),
|
|
197
|
-
parentId: z.string().nullable().optional().describe("Parent Work item ID"),
|
|
198
|
-
serialNumber: z.string().nullable().optional().describe("Serial number"),
|
|
199
|
-
statusStageId: z.string().nullable().optional().describe("Status stage ID"),
|
|
200
|
-
updateStatusAt: z.number().int().nullable().optional().describe("Status update time"),
|
|
201
|
-
idPath: z.string().nullable().optional().describe("Work item ID path"),
|
|
202
|
-
assignedTo: UserInfoSchema.nullable().optional().describe("Assignee user ID, multiple values separated by commas. Special value 'self' can be used to represent the current user"),
|
|
203
|
-
creator: UserInfoSchema.nullable().optional().describe("Creator user ID, multiple values separated by commas. Special value 'self' can be used to represent the current user"),
|
|
204
|
-
modifier: UserInfoSchema.nullable().optional().describe("Modifier"),
|
|
205
|
-
verifier: UserInfoSchema.nullable().optional().describe("Verifier"),
|
|
206
|
-
space: SpaceSchema.nullable().optional().describe("Space"),
|
|
207
|
-
sprint: SprintSchema.nullable().optional().describe("Sprint"),
|
|
208
|
-
labels: z.array(LabelSchema).nullable().optional().describe("Labels"),
|
|
209
|
-
participants: z.array(UserInfoSchema).nullable().optional().describe("Participants"),
|
|
210
|
-
trackers: z.array(UserInfoSchema).nullable().optional().describe("Trackers"),
|
|
211
|
-
versions: z.array(VersionSchema).nullable().optional().describe("Versions"),
|
|
212
|
-
customFieldValues: z.array(CustomFieldValueSchema).nullable().optional().describe("Custom field values"),
|
|
213
|
-
identifier: z.string().nullable().optional().describe("Work item identifier"),
|
|
214
|
-
priority: z.string().nullable().optional().describe("Priority"),
|
|
215
|
-
spaceIdentifier: z.string().nullable().optional().describe("Project identifier"),
|
|
216
|
-
organizationIdentifier: z.string().nullable().optional().describe("Organization identifier"),
|
|
217
|
-
parentIdentifier: z.string().nullable().optional().describe("Parent work item identifier"),
|
|
218
|
-
customFields: z.record(z.string(), z.any()).nullable().optional().describe("Custom fields"),
|
|
219
|
-
type: z.string().nullable().optional().describe("Type"),
|
|
220
|
-
});
|
|
221
|
-
// Search condition related types
|
|
222
|
-
export const FilterConditionSchema = z.object({
|
|
223
|
-
className: z.string().optional().describe("Class name"),
|
|
224
|
-
fieldIdentifier: z.string().optional().describe("Field identifier"),
|
|
225
|
-
format: z.string().optional().describe("Format"),
|
|
226
|
-
operator: z.string().optional().describe("Operator"),
|
|
227
|
-
toValue: z.string().nullable().optional().describe("To value"),
|
|
228
|
-
value: z.array(z.string()).nullable().optional().describe("Values"),
|
|
229
|
-
});
|
|
230
|
-
export const ConditionsSchema = z.object({
|
|
231
|
-
conditionGroups: z.array(z.array(z.any())).nullable().optional().describe("Condition groups"),
|
|
232
|
-
});
|
|
233
|
-
export const CodeupBranchSchema = z.object({
|
|
234
|
-
name: z.string().optional().describe("Branch name"),
|
|
235
|
-
defaultBranch: z.boolean().optional().describe("Whether it is the default branch"),
|
|
236
|
-
commit: z.object({
|
|
237
|
-
authorEmail: z.string().optional().describe("Author email"),
|
|
238
|
-
authorName: z.string().optional().describe("Author name"),
|
|
239
|
-
committedDate: z.string().optional().describe("Commit date"),
|
|
240
|
-
committerEmail: z.string().optional().describe("Committer email"),
|
|
241
|
-
committerName: z.string().optional().describe("Committer name"),
|
|
242
|
-
id: z.string().optional().describe("Commit ID"),
|
|
243
|
-
message: z.string().optional().describe("Commit message"),
|
|
244
|
-
parentIds: z.array(z.string()).optional().describe("Parent commit IDs"),
|
|
245
|
-
shortId: z.string().optional().describe("Code group path"),
|
|
246
|
-
stats: z.object({
|
|
247
|
-
additions: z.number().optional().describe("Added lines"),
|
|
248
|
-
deletions: z.number().optional().describe("Deleted lines"),
|
|
249
|
-
total: z.number().optional().describe("Total lines"),
|
|
250
|
-
}).nullable().optional().describe("Commit statistics"),
|
|
251
|
-
title: z.string().optional().describe("Title, first line of the commit message"),
|
|
252
|
-
webUrl: z.string().url().optional().describe("Web access URL"),
|
|
253
|
-
}).nullable().optional().describe("Commit information"),
|
|
254
|
-
protected: z.boolean().optional().describe("Whether it is a protected branch"),
|
|
255
|
-
webUrl: z.string().url().optional().describe("Web access URL"),
|
|
256
|
-
});
|
|
257
|
-
export const FileContentSchema = z.object({
|
|
258
|
-
fileName: z.string().optional().describe("File name"),
|
|
259
|
-
filePath: z.string().optional().describe("File path"),
|
|
260
|
-
size: z.string().optional().describe("File size"),
|
|
261
|
-
content: z.string().optional().describe("File content"),
|
|
262
|
-
encoding: z.string().optional().describe("Content encoding (base64 or text)"),
|
|
263
|
-
ref: z.string().optional().describe("Reference (branch, tag, or commit)"),
|
|
264
|
-
blobId: z.string().optional().describe("Blob ID"),
|
|
265
|
-
commitId: z.string().optional().describe("Commit ID"),
|
|
266
|
-
});
|
|
267
|
-
export const FileInfoSchema = z.object({
|
|
268
|
-
id: z.string().optional().describe("File/directory ID"),
|
|
269
|
-
name: z.string().optional().describe("File/directory name"),
|
|
270
|
-
path: z.string().optional().describe("File/directory path"),
|
|
271
|
-
type: z.string().optional().describe("Type of entry: tree (directory) or blob (file)"),
|
|
272
|
-
mode: z.string().optional().describe("File mode"),
|
|
273
|
-
size: z.number().int().optional().describe("File size (not present for directories)"),
|
|
274
|
-
});
|
|
275
|
-
export const RepositorySchema = z.object({
|
|
276
|
-
id: z.number().int().optional().describe("Repository ID"),
|
|
277
|
-
name: z.string().optional().describe("Repository name"),
|
|
278
|
-
webUrl: z.string().optional().describe("Web URL for accessing the repository"),
|
|
279
|
-
description: z.string().optional().describe("Repository description"),
|
|
280
|
-
path: z.string().optional().describe("Repository path"),
|
|
281
|
-
});
|
|
282
|
-
export const PatchSetSchema = z.object({
|
|
283
|
-
commitId: z.string().nullable().optional(),
|
|
284
|
-
createTime: z.string().nullable().optional(),
|
|
285
|
-
patchSetBizId: z.string().nullable().optional(),
|
|
286
|
-
patchSetName: z.string().optional(),
|
|
287
|
-
ref: z.string().optional(),
|
|
288
|
-
relatedMergeItemType: z.string().optional(),
|
|
289
|
-
shortId: z.string().optional(),
|
|
290
|
-
versionNo: z.number().int().optional(),
|
|
291
|
-
});
|
|
292
|
-
export const ChangeRequestCommentSchema = z.object({
|
|
293
|
-
author: z.object({
|
|
294
|
-
avatar: z.string().nullable().optional().describe("用户头像地址"),
|
|
295
|
-
email: z.string().nullable().optional().describe("用户邮箱"),
|
|
296
|
-
name: z.string().nullable().optional().describe("用户名称"),
|
|
297
|
-
state: z.string().nullable().optional().describe("用户状态:active - 激活可用;blocked - 阻塞暂不可用"),
|
|
298
|
-
userId: z.string().nullable().optional().describe("云效用户ID"),
|
|
299
|
-
username: z.string().nullable().optional().describe("用户登录名")
|
|
300
|
-
}).nullable().optional().describe("评论作者信息"),
|
|
301
|
-
child_comments_list: z.array(z.any()).nullable().optional().describe("子评论列表"),
|
|
302
|
-
comment_biz_id: z.string().nullable().optional().describe("评论业务ID"),
|
|
303
|
-
comment_time: z.string().nullable().optional().describe("评论时间"),
|
|
304
|
-
comment_type: z.string().nullable().optional().describe("评论类型:GLOBAL_COMMENT - 全局评论;INLINE_COMMENT - 行内评论"),
|
|
305
|
-
content: z.string().nullable().optional().describe("评论内容"),
|
|
306
|
-
expression_reply_list: z.array(z.any()).nullable().optional().describe("表情回复列表"),
|
|
307
|
-
filePath: z.string().nullable().optional().describe("文件路径,仅行内评论有"),
|
|
308
|
-
from_patchset_biz_id: z.string().nullable().optional().describe("比较的起始版本ID"),
|
|
309
|
-
is_deleted: z.boolean().nullable().optional().describe("是否已删除"),
|
|
310
|
-
last_edit_time: z.string().nullable().optional().describe("最后编辑时间"),
|
|
311
|
-
last_edit_user: z.object({
|
|
312
|
-
avatar: z.string().nullable().optional().describe("用户头像地址"),
|
|
313
|
-
email: z.string().nullable().optional().describe("用户邮箱"),
|
|
314
|
-
name: z.string().nullable().optional().describe("用户名称"),
|
|
315
|
-
state: z.string().nullable().optional().describe("用户状态"),
|
|
316
|
-
userId: z.string().nullable().optional().describe("云效用户ID"),
|
|
317
|
-
username: z.string().nullable().optional().describe("用户登录名")
|
|
318
|
-
}).nullable().optional().describe("最后编辑用户"),
|
|
319
|
-
last_resolved_status_change_time: z.string().nullable().optional().describe("最后解决状态变更时间"),
|
|
320
|
-
last_resolved_status_change_user: z.object({
|
|
321
|
-
avatar: z.string().nullable().optional().describe("用户头像地址"),
|
|
322
|
-
email: z.string().nullable().optional().describe("用户邮箱"),
|
|
323
|
-
name: z.string().nullable().optional().describe("用户名称"),
|
|
324
|
-
state: z.string().nullable().optional().describe("用户状态"),
|
|
325
|
-
userId: z.string().nullable().optional().describe("云效用户ID"),
|
|
326
|
-
username: z.string().nullable().optional().describe("用户登录名")
|
|
327
|
-
}).nullable().optional().describe("最后解决状态变更用户"),
|
|
328
|
-
line_number: z.number().int().nullable().optional().describe("所在行号"),
|
|
329
|
-
location: z.object({
|
|
330
|
-
can_located: z.boolean().nullable().optional().describe("是否可以定位"),
|
|
331
|
-
located_file_path: z.string().nullable().optional().describe("定位的文件路径"),
|
|
332
|
-
located_line_number: z.number().int().nullable().optional().describe("定位的行号"),
|
|
333
|
-
located_patch_set_biz_id: z.string().nullable().optional().describe("定位的补丁集业务ID")
|
|
334
|
-
}).nullable().optional().describe("位置信息"),
|
|
335
|
-
mr_biz_id: z.string().nullable().optional().describe("所属合并请求的业务ID"),
|
|
336
|
-
out_dated: z.boolean().nullable().optional().describe("是否过期评论"),
|
|
337
|
-
parent_comment_biz_id: z.string().nullable().optional().describe("父评论业务ID"),
|
|
338
|
-
project_id: z.number().int().nullable().optional().describe("代码库ID"),
|
|
339
|
-
related_patchset: z.object({
|
|
340
|
-
commitId: z.string().nullable().optional().describe("版本对应的提交ID"),
|
|
341
|
-
createTime: z.string().nullable().optional().describe("版本创建时间"),
|
|
342
|
-
patchSetBizId: z.string().nullable().optional().describe("版本ID,具有唯一性"),
|
|
343
|
-
patchSetName: z.string().nullable().optional().describe("版本名称"),
|
|
344
|
-
ref: z.string().nullable().optional().describe("版本对应的ref信息"),
|
|
345
|
-
relatedMergeItemType: z.string().nullable().optional().describe("关联的类型:MERGE_SOURCE - 合并源;MERGE_TARGET - 合并目标"),
|
|
346
|
-
shortId: z.string().nullable().optional().describe("提交ID对应的短ID,通常为8位"),
|
|
347
|
-
versionNo: z.number().int().nullable().optional().describe("版本号")
|
|
348
|
-
}).nullable().optional().describe("关联的补丁集信息"),
|
|
349
|
-
resolved: z.boolean().nullable().optional().describe("是否已解决"),
|
|
350
|
-
root_comment_biz_id: z.string().nullable().optional().describe("根评论业务ID"),
|
|
351
|
-
state: z.string().nullable().optional().describe("评论状态:OPENED - 已公开;DRAFT - 草稿"),
|
|
352
|
-
to_patchset_biz_id: z.string().nullable().optional().describe("比较的目标版本ID"),
|
|
353
|
-
});
|
|
354
|
-
export const ChangeRequestSchema = z.object({
|
|
355
|
-
ahead: z.number().int().nullable().optional().describe("源分支领先目标分支的commit数量"),
|
|
356
|
-
allRequirementsPass: z.boolean().nullable().optional().describe("是否所有卡点项通过"),
|
|
357
|
-
author: z.object({
|
|
358
|
-
avatar: z.string().nullable().optional().describe("用户头像地址"),
|
|
359
|
-
email: z.string().nullable().optional().describe("用户邮箱"),
|
|
360
|
-
name: z.string().nullable().optional().describe("用户名称"),
|
|
361
|
-
state: z.string().nullable().optional().describe("用户状态:active - 激活可用;blocked - 阻塞暂不可用"),
|
|
362
|
-
userId: z.string().nullable().optional().describe("云效用户ID"),
|
|
363
|
-
username: z.string().nullable().optional().describe("用户登录名")
|
|
364
|
-
}).nullable().optional().describe("创建者信息"),
|
|
365
|
-
behind: z.number().int().nullable().optional().describe("目标分支领先源分支的commit数量"),
|
|
366
|
-
canRevertOrCherryPick: z.boolean().nullable().optional().describe("是否能Revert或者CherryPick"),
|
|
367
|
-
conflictCheckStatus: z.string().nullable().optional().describe("冲突检测状态:CHECKING - 检测中;HAS_CONFLICT - 有冲突;NO_CONFLICT - 无冲突;FAILED - 检测失败"),
|
|
368
|
-
createFrom: z.string().nullable().optional().describe("创建来源:WEB - 页面创建;COMMAND_LINE - 命令行创建"),
|
|
369
|
-
createTime: z.string().nullable().optional().describe("创建时间"),
|
|
370
|
-
description: z.string().nullable().optional().describe("描述"),
|
|
371
|
-
detailUrl: z.string().nullable().optional().describe("合并请求详情地址"),
|
|
372
|
-
hasReverted: z.boolean().nullable().optional().describe("是否Revert过"),
|
|
373
|
-
localId: z.union([z.string(), z.number().int()]).nullable().optional().describe("局部ID,表示代码库中第几个合并请求"),
|
|
374
|
-
mergedRevision: z.string().nullable().optional().describe("合并版本(提交ID),仅已合并状态才有值"),
|
|
375
|
-
mrType: z.string().nullable().optional().describe("合并请求类型"),
|
|
376
|
-
projectId: z.number().int().nullable().optional().describe("项目ID"),
|
|
377
|
-
reviewers: z.array(z.object({
|
|
378
|
-
avatar: z.string().nullable().optional().describe("用户头像地址"),
|
|
379
|
-
email: z.string().nullable().optional().describe("用户邮箱"),
|
|
380
|
-
hasCommented: z.boolean().nullable().optional().describe("是否已评论"),
|
|
381
|
-
hasReviewed: z.boolean().nullable().optional().describe("是否已审阅"),
|
|
382
|
-
name: z.string().nullable().optional().describe("用户名称"),
|
|
383
|
-
reviewOpinionStatus: z.string().nullable().optional().describe("审阅意见状态"),
|
|
384
|
-
reviewTime: z.string().nullable().optional().describe("审阅时间"),
|
|
385
|
-
state: z.string().nullable().optional().describe("用户状态"),
|
|
386
|
-
userId: z.string().nullable().optional().describe("云效用户ID"),
|
|
387
|
-
username: z.string().nullable().optional().describe("用户登录名")
|
|
388
|
-
})).nullable().optional().describe("评审人列表"),
|
|
389
|
-
sourceBranch: z.string().nullable().optional().describe("源分支"),
|
|
390
|
-
sourceCommitId: z.string().nullable().optional().describe("源提交ID,当createFrom=COMMAND_LINE时有值"),
|
|
391
|
-
sourceProjectId: z.union([z.string(), z.number().int()]).nullable().optional().describe("源库ID"),
|
|
392
|
-
sourceRef: z.string().nullable().optional().describe("源提交引用,当createFrom=COMMAND_LINE时有值"),
|
|
393
|
-
status: z.string().nullable().optional().describe("合并请求状态:UNDER_DEV - 开发中;UNDER_REVIEW - 评审中;TO_BE_MERGED - 待合并;CLOSED - 已关闭;MERGED - 已合并"),
|
|
394
|
-
subscribers: z.array(z.object({
|
|
395
|
-
avatar: z.string().nullable().optional().describe("用户头像地址"),
|
|
396
|
-
email: z.string().nullable().optional().describe("用户邮箱"),
|
|
397
|
-
name: z.string().nullable().optional().describe("用户名称"),
|
|
398
|
-
state: z.string().nullable().optional().describe("用户状态"),
|
|
399
|
-
userId: z.string().nullable().optional().describe("云效用户ID"),
|
|
400
|
-
username: z.string().nullable().optional().describe("用户登录名")
|
|
401
|
-
})).nullable().optional().describe("订阅人列表"),
|
|
402
|
-
supportMergeFastForwardOnly: z.boolean().nullable().optional().describe("是否支持fast-forward-only"),
|
|
403
|
-
targetBranch: z.string().nullable().optional().describe("目标分支"),
|
|
404
|
-
targetProjectId: z.union([z.string(), z.number().int()]).nullable().optional().describe("目标库ID"),
|
|
405
|
-
targetProjectNameWithNamespace: z.string().nullable().optional().describe("目标库名称(含完整父路径)"),
|
|
406
|
-
targetProjectPathWithNamespace: z.string().nullable().optional().describe("目标库路径(含完整父路径)"),
|
|
407
|
-
title: z.string().nullable().optional().describe("标题"),
|
|
408
|
-
totalCommentCount: z.number().int().nullable().optional().describe("总评论数"),
|
|
409
|
-
unResolvedCommentCount: z.number().int().nullable().optional().describe("未解决评论数"),
|
|
410
|
-
updateTime: z.string().nullable().optional().describe("更新时间"),
|
|
411
|
-
webUrl: z.string().nullable().optional().describe("页面地址")
|
|
412
|
-
});
|
|
413
|
-
export const CompareSchema = z.object({
|
|
414
|
-
base_commit_sha: z.string().optional(),
|
|
415
|
-
commits: z.array(z.unknown()).optional(),
|
|
416
|
-
commits_count: z.number().optional(),
|
|
417
|
-
diffs: z.array(z.unknown()).optional(),
|
|
418
|
-
files_count: z.number().optional(),
|
|
419
|
-
from: z.string().optional(),
|
|
420
|
-
to: z.string().optional(),
|
|
421
|
-
});
|
|
422
|
-
export const CreateFileResponseSchema = z.object({
|
|
423
|
-
filePath: z.string().optional().describe("File path"),
|
|
424
|
-
branch: z.string().optional().describe("Branch name"),
|
|
425
|
-
newOid: z.string().optional().describe("Git Object ID"),
|
|
426
|
-
});
|
|
427
|
-
export const DeleteFileResponseSchema = z.object({
|
|
428
|
-
filePath: z.string().optional().describe("File path"),
|
|
429
|
-
branch: z.string().optional().describe("Branch name"),
|
|
430
|
-
commitId: z.string().optional().describe("Commit ID"),
|
|
431
|
-
commitMessage: z.string().optional().describe("Commit message"),
|
|
432
|
-
});
|
|
433
|
-
// 组织部门相关类型
|
|
434
|
-
export const DepartmentInfoSchema = z.object({
|
|
435
|
-
creatorId: z.string().optional().describe("创建人 ID"),
|
|
436
|
-
id: z.string().optional().describe("部门 ID"),
|
|
437
|
-
name: z.string().optional().describe("部门名称"),
|
|
438
|
-
organizationId: z.string().optional().describe("组织 ID"),
|
|
439
|
-
parentId: z.string().optional().describe("父部门 ID"),
|
|
440
|
-
hasSub: z.boolean().optional().describe("是否有子部门")
|
|
441
|
-
});
|
|
442
|
-
export const OrganizationDepartmentsSchema = z.array(DepartmentInfoSchema);
|
|
443
|
-
// 组织成员相关类型
|
|
444
|
-
export const MemberInfoSchema = z.object({
|
|
445
|
-
deptIds: z.array(z.string()).optional().describe("所属组织部门列表"),
|
|
446
|
-
id: z.string().optional().describe("成员 ID"),
|
|
447
|
-
joined: z.string().optional().describe("加入时间"),
|
|
448
|
-
name: z.string().optional().describe("成员名"),
|
|
449
|
-
organizationId: z.string().optional().describe("组织 ID"),
|
|
450
|
-
roleIds: z.array(z.string()).optional().describe("角色信息"),
|
|
451
|
-
status: z.string().optional().describe("成员状态,可选值:ENABLED,DISABLED,UNDELETED,DELETED,NORMAL_USING,UNVISITED"),
|
|
452
|
-
userId: z.string().optional().describe("用户 ID"),
|
|
453
|
-
visited: z.string().optional().describe("最后访问时间")
|
|
454
|
-
});
|
|
455
|
-
export const OrganizationMembersSchema = z.array(MemberInfoSchema);
|
|
456
|
-
// 组织成员详细信息类型
|
|
457
|
-
export const GetOrganizationMemberInfoSchema = z.object({
|
|
458
|
-
organizationId: z.string().describe("组织 ID"),
|
|
459
|
-
memberId: z.string().describe("成员 ID"),
|
|
460
|
-
});
|
|
461
|
-
// 通过用户ID查询组织成员详细信息类型
|
|
462
|
-
export const GetOrganizationMemberByUserIdInfoSchema = z.object({
|
|
463
|
-
organizationId: z.string().describe("组织 ID"),
|
|
464
|
-
userId: z.string().describe("用户 ID"),
|
|
465
|
-
});
|
|
466
|
-
// 添加流水线相关的Schema
|
|
467
|
-
// 流水线配置源Schema
|
|
468
|
-
export const PipelineConfigSourceSchema = z.object({
|
|
469
|
-
data: z.object({
|
|
470
|
-
branch: z.string().nullable().optional().describe("Default branch"),
|
|
471
|
-
cloneDepth: z.number().int().nullable().optional().describe("Clone depth"),
|
|
472
|
-
credentialId: z.number().int().nullable().optional().describe("Credential ID"),
|
|
473
|
-
credentialLabel: z.string().nullable().optional().describe("Credential label"),
|
|
474
|
-
credentialType: z.string().nullable().optional().describe("Credential type"),
|
|
475
|
-
events: z.array(z.string()).nullable().optional().describe("Trigger events"),
|
|
476
|
-
isBranchMode: z.boolean().nullable().optional().describe("Whether branch mode is enabled"),
|
|
477
|
-
isCloneDepth: z.boolean().nullable().optional().describe("Whether clone depth is enabled"),
|
|
478
|
-
isSubmodule: z.boolean().nullable().optional().describe("Whether submodule is enabled"),
|
|
479
|
-
isTrigger: z.boolean().nullable().optional().describe("Whether commit trigger is enabled"),
|
|
480
|
-
label: z.string().nullable().optional().describe("Display name"),
|
|
481
|
-
namespace: z.string().nullable().optional().describe("Namespace"),
|
|
482
|
-
repo: z.string().nullable().optional().describe("Repository URL"),
|
|
483
|
-
serviceConnectionId: z.number().int().nullable().optional().describe("Service connection ID"),
|
|
484
|
-
triggerFilter: z.string().nullable().optional().describe("Trigger filter condition"),
|
|
485
|
-
webhook: z.string().nullable().optional().describe("Webhook URL"),
|
|
486
|
-
}),
|
|
487
|
-
sign: z.string().nullable().optional().describe("Code source identifier"),
|
|
488
|
-
type: z.string().nullable().optional().describe("Code source type"),
|
|
489
|
-
});
|
|
490
|
-
export const PipelineTagSchema = z.object({
|
|
491
|
-
id: z.number().int().nullable().optional().describe("Tag ID"),
|
|
492
|
-
name: z.string().nullable().optional().describe("Tag name"),
|
|
493
|
-
});
|
|
494
|
-
export const PipelineConfigSchema = z.object({
|
|
495
|
-
flow: z.string().nullable().optional().describe("Flow configuration"),
|
|
496
|
-
settings: z.string().nullable().optional().describe("Pipeline settings"),
|
|
497
|
-
sources: z.array(PipelineConfigSourceSchema).nullable().optional().describe("Code source configurations"),
|
|
498
|
-
});
|
|
499
|
-
// 流水线详情Schema
|
|
500
|
-
export const PipelineDetailSchema = z.object({
|
|
501
|
-
createTime: z.number().int().nullable().optional().describe("Creation time"),
|
|
502
|
-
creatorAccountId: z.string().nullable().optional().describe("Creator account ID"),
|
|
503
|
-
envId: z.number().int().nullable().optional().describe("Environment ID: 0-Daily 1-Pre-release 2-Production"),
|
|
504
|
-
envName: z.string().nullable().optional().describe("Environment name"),
|
|
505
|
-
groupId: z.number().int().nullable().optional().describe("Pipeline group ID"),
|
|
506
|
-
modifierAccountId: z.string().nullable().optional().describe("Last modifier account ID"),
|
|
507
|
-
name: z.string().nullable().optional().describe("Pipeline name"),
|
|
508
|
-
pipelineConfig: PipelineConfigSchema.nullable().optional().describe("Pipeline configuration"),
|
|
509
|
-
tagList: z.array(PipelineTagSchema).nullable().optional().describe("Tag list"),
|
|
510
|
-
updateTime: z.number().int().nullable().optional().describe("Update time"),
|
|
511
|
-
});
|
|
512
|
-
// 获取流水线详情的参数Schema
|
|
513
|
-
export const GetPipelineSchema = z.object({
|
|
514
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
515
|
-
pipelineId: z.string().describe("Pipeline ID"),
|
|
516
|
-
});
|
|
517
|
-
// 创建流水线的参数Schema
|
|
518
|
-
export const CreatePipelineSchema = z.object({
|
|
519
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
520
|
-
name: z.string().max(60).describe("Pipeline name, maximum 60 characters"),
|
|
521
|
-
content: z.string().describe("Pipeline YAML description, refer to YAML pipeline documentation for writing. This should be a complete YAML configuration including sources, stages, jobs, and steps."),
|
|
522
|
-
});
|
|
523
|
-
// 基于结构化参数创建流水线的Schema
|
|
524
|
-
export const CreatePipelineWithStructuredOptionsSchema = z.object({
|
|
525
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
526
|
-
name: z.string().max(60).describe("Pipeline name (required). LLM should generate a meaningful name based on user's request"),
|
|
527
|
-
// 技术栈参数(必需,由大模型从IDE上下文和用户描述中提取)
|
|
528
|
-
buildLanguage: z.enum(['java', 'nodejs', 'python', 'go', 'dotnet']).describe("Programming language (REQUIRED). LLM should detect from project files: pom.xml→java, package.json→nodejs, requirements.txt→python, go.mod→go, *.csproj→dotnet"),
|
|
529
|
-
buildTool: z.enum(['maven', 'gradle', 'npm', 'yarn', 'pip', 'go', 'dotnet']).describe("Build tool (REQUIRED). LLM should infer from buildLanguage and project files: java+pom.xml→maven, java+build.gradle→gradle, nodejs+package-lock.json→npm, nodejs+yarn.lock→yarn, python→pip, go→go, dotnet→dotnet"),
|
|
530
|
-
deployTarget: z.enum(['vm', 'k8s', 'none']).optional().describe("Deployment target from user description. vm: Virtual Machine/Host deployment, k8s: Kubernetes deployment, none: Build only without deployment. Default: none"),
|
|
531
|
-
// 代码源相关参数(由大模型从IDE上下文中获取)
|
|
532
|
-
repoUrl: z.string().optional().describe("Repository URL (LLM should get from 'git config --get remote.origin.url')"),
|
|
533
|
-
branch: z.string().optional().describe("Git branch (LLM should get from 'git branch --show-current')"),
|
|
534
|
-
serviceName: z.string().optional().describe("Service name (LLM can derive from repository name or project directory name)"),
|
|
535
|
-
serviceConnectionId: z.string().optional().describe("Service connection UUID for repository access"),
|
|
536
|
-
// 版本相关参数(大模型应该从项目文件中提取)
|
|
537
|
-
jdkVersion: z.string().optional().describe("JDK version for Java projects (LLM should read from pom.xml or gradle.properties). Options: 1.6, 1.7, 1.8, 11, 17, 21. Default: 1.8"),
|
|
538
|
-
mavenVersion: z.string().optional().describe("Maven version for Java projects. Options: 3.6.1, 3.6.3, 3.8.4, 3.9.3. Default: 3.6.3"),
|
|
539
|
-
nodeVersion: z.string().optional().describe("Node.js version for Node projects (LLM should read from package.json engines.node or .nvmrc). Options: 16.8, 18.12, 20. Default: 18.12"),
|
|
540
|
-
pythonVersion: z.string().optional().describe("Python version for Python projects (LLM should read from .python-version or pyproject.toml). Options: 3.9, 3.12. Default: 3.12"),
|
|
541
|
-
goVersion: z.string().optional().describe("Go version for Go projects (LLM should read from go.mod). Options: 1.19.x, 1.20.x, 1.21.x. Default: 1.21.x"),
|
|
542
|
-
kubectlVersion: z.string().optional().describe("Kubectl version for Kubernetes apply. Options: 1.25.16, 1.26.12, 1.27.9. Default: 1.27.9"),
|
|
543
|
-
// 构建配置
|
|
544
|
-
buildCommand: z.string().optional().describe("Custom build command to override default"),
|
|
545
|
-
testCommand: z.string().optional().describe("Custom test command to override default"),
|
|
546
|
-
// 构建物上传相关参数
|
|
547
|
-
uploadType: z.enum(['flowPublic', 'packages']).optional().describe("Artifact upload type. flowPublic: Yunxiao public storage space, packages: Organization private generic package repository. Default: packages"),
|
|
548
|
-
artifactName: z.string().optional().describe("Custom artifact name. Default: 'Artifacts_${PIPELINE_ID}'"),
|
|
549
|
-
artifactVersion: z.string().optional().describe("Artifact version number, required when uploadType is packages. Default: '1.0'"),
|
|
550
|
-
packagesServiceConnection: z.string().optional().describe("Packages service connection UUID, required when uploadType is packages"),
|
|
551
|
-
packagesRepoId: z.string().optional().describe("Packages generic repository ID, required when uploadType is packages. Default: 'flow_generic_repo'"),
|
|
552
|
-
includePathInArtifact: z.boolean().optional().describe("Whether to include full path in artifact. Default: false"),
|
|
553
|
-
// VM部署相关参数(当deployTarget为'vm'时)
|
|
554
|
-
machineGroupId: z.string().optional().describe("Machine group UUID for VM deployment (required when deployTarget=vm)"),
|
|
555
|
-
executeUser: z.string().optional().describe("User for executing deployment scripts (root, admin). Default: root"),
|
|
556
|
-
artifactDownloadPath: z.string().optional().describe("Path to download artifacts on target machine for VM deployment. Default: /home/admin/app/package.tgz"),
|
|
557
|
-
deployCommand: z.string().optional().describe("Custom deploy command for VM deployment"),
|
|
558
|
-
pauseStrategy: z.enum(['firstBatchPause', 'noPause', 'eachBatchPause']).optional().describe("Pause strategy for VM deployment. firstBatchPause: The first batch is paused. noPause: No pause. eachBatchPause: Pause each batch. Default: firstBatchPause"),
|
|
559
|
-
batchNumber: z.number().int().optional().describe("Number of batches for VM deployment. Default: 2"),
|
|
560
|
-
// Kubernetes部署相关参数(当deployTarget为'k8s'时)
|
|
561
|
-
kubernetesClusterId: z.string().optional().describe("Kubernetes cluster ID for K8s deployment (required when deployTarget=k8s)"),
|
|
562
|
-
namespace: z.string().optional().describe("Kubernetes namespace for K8s deployment"),
|
|
563
|
-
dockerImage: z.string().optional().describe("Docker image name for container deployment"),
|
|
564
|
-
yamlPath: z.string().optional().describe("Path to Kubernetes YAML file for K8s deployment"),
|
|
565
|
-
});
|
|
566
|
-
// 兼容性:保留原有的schema名称,但指向新的schema
|
|
567
|
-
export const CreatePipelineFromDescriptionSchema = CreatePipelineWithStructuredOptionsSchema;
|
|
568
|
-
// 获取流水线列表的参数Schema
|
|
569
|
-
export const ListPipelinesSchema = z.object({
|
|
570
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
571
|
-
createStartTime: z.number().int().optional().describe("Creation start time in milliseconds timestamp format (e.g., 1729178040000). For filtering pipelines created after this time."),
|
|
572
|
-
createEndTime: z.number().int().optional().describe("Creation end time in milliseconds timestamp format (e.g., 1729178040000). For filtering pipelines created before this time."),
|
|
573
|
-
executeStartTime: z.number().int().optional().describe("Execution start time in milliseconds timestamp format (e.g., 1729178040000). For filtering pipelines executed after this time."),
|
|
574
|
-
executeEndTime: z.number().int().optional().describe("Execution end time in milliseconds timestamp format (e.g., 1729178040000). For filtering pipelines executed before this time."),
|
|
575
|
-
pipelineName: z.string().optional().describe("Pipeline name for filtering"),
|
|
576
|
-
statusList: z.string().optional().describe("Pipeline status list, comma separated (SUCCESS,RUNNING,FAIL,CANCELED,WAITING)"),
|
|
577
|
-
perPage: z.number().int().min(1).max(30).default(10).optional().describe("Number of items per page, default 10, max 30"),
|
|
578
|
-
page: z.number().int().min(1).default(1).optional().describe("Page number, default 1"),
|
|
579
|
-
});
|
|
580
|
-
// 流水线列表项Schema
|
|
581
|
-
export const PipelineListItemSchema = z.object({
|
|
582
|
-
name: z.string().nullable().optional().describe("Pipeline name"),
|
|
583
|
-
id: z.number().int().nullable().optional().describe("Pipeline ID"),
|
|
584
|
-
creatorAccountId: z.string().nullable().optional().describe("Creator account ID"),
|
|
585
|
-
createTime: z.number().int().nullable().optional().describe("Creation time"),
|
|
586
|
-
});
|
|
587
|
-
// 创建流水线运行的参数Schema
|
|
588
|
-
export const CreatePipelineRunSchema = z.object({
|
|
589
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
590
|
-
pipelineId: z.string().describe("Pipeline ID to run"),
|
|
591
|
-
params: z.string().optional().describe("Pipeline run parameters in JSON string format. Can include: branchModeBranchs(array), envs(object), runningBranchs(object), runningTags(object), runningPipelineArtifacts(object), runningAcrArtifacts(object), runningPackagesArtifacts(object), comment(string), needCreateBranch(boolean), releaseBranch(string)"),
|
|
592
|
-
// 添加自然语言相关参数,这些参数将被转换为params参数的内容
|
|
593
|
-
description: z.string().optional().describe("Natural language description of how to run the pipeline, e.g. 'Run pipeline using branch mode with branches main and develop'"),
|
|
594
|
-
branches: z.array(z.string()).optional().describe("Branches to use in branch mode or specific branches for repositories"),
|
|
595
|
-
branchMode: z.boolean().optional().describe("Whether to run in branch mode"),
|
|
596
|
-
releaseBranch: z.string().optional().describe("Specific release branch to use"),
|
|
597
|
-
createReleaseBranch: z.boolean().optional().describe("Whether to create a release branch"),
|
|
598
|
-
environmentVariables: z.record(z.string()).optional().describe("Environment variables for the pipeline run"),
|
|
599
|
-
repositories: z.array(z.object({
|
|
600
|
-
url: z.string().describe("Repository URL"),
|
|
601
|
-
branch: z.string().optional().describe("Branch to use for this repository"),
|
|
602
|
-
tag: z.string().optional().describe("Tag to use for this repository")
|
|
603
|
-
})).optional().describe("Specific repository configurations")
|
|
604
|
-
});
|
|
605
|
-
// 流水线运行相关Schema
|
|
606
|
-
export const PipelineRunActionSchema = z.object({
|
|
607
|
-
data: z.string().nullable().optional().describe("Action data"),
|
|
608
|
-
disable: z.boolean().nullable().optional().describe("Whether the action is disabled"),
|
|
609
|
-
displayType: z.string().nullable().optional().describe("Display type of the action"),
|
|
610
|
-
name: z.string().nullable().optional().describe("Action name"),
|
|
611
|
-
order: z.number().int().nullable().optional().describe("Order of the action"),
|
|
612
|
-
params: z.record(z.any()).nullable().optional().describe("Action parameters"),
|
|
613
|
-
title: z.string().nullable().optional().describe("Action title"),
|
|
614
|
-
type: z.string().nullable().optional().describe("Action type")
|
|
615
|
-
});
|
|
616
|
-
export const PipelineRunJobSchema = z.object({
|
|
617
|
-
id: z.number().int().nullable().optional().describe("Job ID"),
|
|
618
|
-
name: z.string().nullable().optional().describe("Job name"),
|
|
619
|
-
startTime: z.number().int().nullable().optional().describe("Start time of the job"),
|
|
620
|
-
endTime: z.number().int().nullable().optional().describe("End time of the job"),
|
|
621
|
-
status: z.string().nullable().optional().describe("Job status: FAIL, SUCCESS, RUNNING"),
|
|
622
|
-
params: z.string().nullable().optional().describe("Job parameters in JSON string format"),
|
|
623
|
-
jobSign: z.string().nullable().optional().describe("Job unique identifier"),
|
|
624
|
-
result: z.string().nullable().optional().describe("Job result data in JSON string format"),
|
|
625
|
-
actions: z.array(PipelineRunActionSchema).nullable().optional().describe("Available actions for the job"),
|
|
626
|
-
});
|
|
627
|
-
export const PipelineStageInfoSchema = z.object({
|
|
628
|
-
startTime: z.number().int().nullable().optional().describe("Start time of the stage"),
|
|
629
|
-
endTime: z.number().int().nullable().optional().describe("End time of the stage"),
|
|
630
|
-
name: z.string().nullable().optional().describe("Stage name"),
|
|
631
|
-
status: z.string().nullable().optional().describe("Stage status: FAIL, SUCCESS, RUNNING"),
|
|
632
|
-
id: z.number().int().nullable().optional().describe("Stage ID"),
|
|
633
|
-
jobs: z.array(PipelineRunJobSchema).nullable().optional().describe("Jobs in this stage"),
|
|
634
|
-
});
|
|
635
|
-
export const PipelineStageSchema = z.object({
|
|
636
|
-
index: z.string().nullable().optional().describe("Stage index"),
|
|
637
|
-
name: z.string().nullable().optional().describe("Stage name"),
|
|
638
|
-
stageInfo: PipelineStageInfoSchema.nullable().optional().describe("Stage detailed information")
|
|
639
|
-
});
|
|
640
|
-
export const PipelineRunSourceSchema = z.object({
|
|
641
|
-
data: z.record(z.any()).optional().describe("Source configuration data"),
|
|
642
|
-
name: z.string().nullable().optional().describe("Source name"),
|
|
643
|
-
sign: z.string().nullable().optional().describe("Source identifier"),
|
|
644
|
-
type: z.string().nullable().optional().describe("Source type"),
|
|
645
|
-
label: z.string().nullable().optional().describe("Source label"),
|
|
646
|
-
});
|
|
647
|
-
export const PipelineRunGlobalParamSchema = z.object({
|
|
648
|
-
key: z.string().nullable().optional().describe("Parameter key"),
|
|
649
|
-
value: z.string().nullable().optional().describe("Parameter value"),
|
|
650
|
-
masked: z.boolean().nullable().optional().describe("Whether the parameter is masked"),
|
|
651
|
-
runningConfig: z.boolean().nullable().optional().describe("Whether the parameter is running configuration"),
|
|
652
|
-
encrypted: z.boolean().nullable().optional().describe("Whether the parameter is encrypted"),
|
|
653
|
-
metaData: z.string().nullable().optional().describe("Parameter metadata"),
|
|
654
|
-
type: z.string().nullable().optional().describe("Parameter type"),
|
|
655
|
-
description: z.string().nullable().optional().describe("Parameter description"),
|
|
656
|
-
optionType: z.string().nullable().optional().describe("Parameter option type"),
|
|
657
|
-
});
|
|
658
|
-
export const PipelineRunGroupSchema = z.object({
|
|
659
|
-
id: z.number().int().nullable().optional().describe("Group ID"),
|
|
660
|
-
name: z.string().nullable().optional().describe("Group name")
|
|
661
|
-
});
|
|
662
|
-
export const PipelineRunSchema = z.object({
|
|
663
|
-
updateTime: z.number().int().nullable().optional().describe("Last update time"),
|
|
664
|
-
pipelineConfigId: z.number().int().nullable().optional().describe("Pipeline configuration ID"),
|
|
665
|
-
createTime: z.number().int().nullable().optional().describe("Creation time of the run"),
|
|
666
|
-
pipelineId: z.number().int().nullable().optional().describe("Pipeline ID"),
|
|
667
|
-
pipelineRunId: z.number().int().nullable().optional().describe("Pipeline run ID"),
|
|
668
|
-
status: z.string().optional().nullable().describe("Pipeline run status: FAIL, SUCCESS, RUNNING"),
|
|
669
|
-
triggerMode: z.number().int().nullable().optional().describe("Trigger mode: 1-Manual, 2-Scheduled, 3-Code commit, 5-Pipeline, 6-Webhook"),
|
|
670
|
-
stageGroup: z.array(z.array(z.string())).nullable().optional().describe("Stage groups"),
|
|
671
|
-
groups: z.array(PipelineRunGroupSchema).nullable().optional().describe("Pipeline groups"),
|
|
672
|
-
pipelineType: z.string().nullable().optional().describe("Pipeline type"),
|
|
673
|
-
creatorAccountId: z.string().nullable().optional().describe("Creator account ID"),
|
|
674
|
-
modifierAccountId: z.string().optional().describe("Last modifier account ID"),
|
|
675
|
-
stages: z.array(PipelineStageSchema).nullable().optional().describe("Pipeline stages"),
|
|
676
|
-
sources: z.array(PipelineRunSourceSchema).nullable().optional().describe("Code sources used in this run"),
|
|
677
|
-
creator: z.string().nullable().optional().describe("Creator"),
|
|
678
|
-
modifier: z.string().nullable().optional().describe("Last modifier"),
|
|
679
|
-
globalParams: z.array(PipelineRunGlobalParamSchema).nullable().optional().describe("Global parameters"),
|
|
680
|
-
});
|
|
681
|
-
// 获取最近一次流水线运行信息的参数Schema
|
|
682
|
-
export const GetLatestPipelineRunSchema = z.object({
|
|
683
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
684
|
-
pipelineId: z.string().describe("Pipeline ID to get the latest run information"),
|
|
685
|
-
});
|
|
686
|
-
// 获取特定流水线运行实例的参数Schema
|
|
687
|
-
export const GetPipelineRunSchema = z.object({
|
|
688
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
689
|
-
pipelineId: z.string().describe("Pipeline ID"),
|
|
690
|
-
pipelineRunId: z.string().describe("Pipeline run ID to retrieve details for"),
|
|
691
|
-
});
|
|
692
|
-
// 流水线运行实例列表项Schema
|
|
693
|
-
export const PipelineRunListItemSchema = z.object({
|
|
694
|
-
status: z.string().nullable().optional().describe("Pipeline run status: FAIL, SUCCESS, RUNNING"),
|
|
695
|
-
startTime: z.number().int().nullable().optional().describe("Start time of the run"),
|
|
696
|
-
triggerMode: z.number().int().nullable().optional().describe("Trigger mode: 1-Manual, 2-Scheduled, 3-Code commit, 5-Pipeline, 6-Webhook"),
|
|
697
|
-
pipelineRunId: z.number().int().nullable().optional().describe("Pipeline run ID"),
|
|
698
|
-
pipelineId: z.number().int().nullable().optional().describe("Pipeline ID"),
|
|
699
|
-
endTime: z.number().int().nullable().optional().describe("End time of the run"),
|
|
700
|
-
creator: z.string().nullable().optional().describe("Creator"),
|
|
701
|
-
creatorAccountId: z.string().nullable().optional().describe("Creator account ID"),
|
|
702
|
-
});
|
|
703
|
-
// 获取流水线运行实例列表的参数Schema
|
|
704
|
-
export const ListPipelineRunsSchema = z.object({
|
|
705
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
706
|
-
pipelineId: z.string().describe("Pipeline ID to list runs for"),
|
|
707
|
-
perPage: z.number().int().min(1).max(30).default(10).optional().describe("Number of items per page, default 10, max 30"),
|
|
708
|
-
page: z.number().int().min(1).default(1).optional().describe("Page number, default 1"),
|
|
709
|
-
startTime: z.number().int().optional().describe("Execution start time filter in milliseconds timestamp format"),
|
|
710
|
-
endTime: z.number().int().optional().describe("Execution end time filter in milliseconds timestamp format"),
|
|
711
|
-
status: z.string().optional().describe("Run status filter: FAIL, SUCCESS, or RUNNING"),
|
|
712
|
-
triggerMode: z.number().int().optional().describe("Trigger mode filter: 1-Manual, 2-Scheduled, 3-Code commit, 5-Pipeline, 6-Webhook")
|
|
713
|
-
});
|
|
714
|
-
// 添加projex目录中项目的Schema定义
|
|
715
|
-
export const GetProjectSchema = z.object({
|
|
716
|
-
organizationId: z.string().describe("Organization ID"),
|
|
717
|
-
id: z.string().describe("Project unique identifier"),
|
|
718
|
-
});
|
|
719
|
-
export const SearchProjectsSchema = z.object({
|
|
720
|
-
organizationId: z.string().describe("Organization ID"),
|
|
721
|
-
// Simplified search parameters
|
|
722
|
-
name: z.string().nullable().optional().describe("Text contained in project name"),
|
|
723
|
-
status: z.string().nullish().optional().describe("Project status ID, multiple separated by commas"),
|
|
724
|
-
createdAfter: z.string().nullable().optional().describe("Created not earlier than, format: YYYY-MM-DD"),
|
|
725
|
-
createdBefore: z.string().nullable().optional().describe("Created not later than, format: YYYY-MM-DD"),
|
|
726
|
-
creator: z.string().nullable().optional().describe("Creator"),
|
|
727
|
-
adminUserId: z.string().nullable().optional().describe("Project administrator user ID, should use userId returned from getCurrentOrganizationInfoFunc or user-provided user ID, multiple IDs separated by commas"),
|
|
728
|
-
logicalStatus: z.string().nullable().optional().describe("Logical status, e.g., NORMAL"),
|
|
729
|
-
// Special filter for common scenarios
|
|
730
|
-
scenarioFilter: z.enum(["manage", "participate", "favorite"]).nullable().optional().describe("Predefined filter scenarios: 'manage' (projects I manage), 'participate' (projects I participate in), 'favorite' (projects I favorited). Will be used to construct appropriate extraConditions. Requires userId from getCurrentOrganizationInfoFunc."),
|
|
731
|
-
userId: z.string().nullable().optional().describe("User ID to use with scenarioFilter, should be the userId returned from getCurrentOrganizationInfoFunc"),
|
|
732
|
-
// Advanced parameters
|
|
733
|
-
advancedConditions: z.string().nullable().optional().describe("Advanced filter conditions, JSON format"),
|
|
734
|
-
extraConditions: z.string().nullable().optional().describe("Additional filter conditions as JSON string. Should be constructed similar to the conditions parameter. For common scenarios: 1) For 'projects I manage': use fieldIdentifier 'project.admin' with the user ID; 2) For 'projects I participate in': use fieldIdentifier 'users' with the user ID; 3) For 'projects I favorited': use fieldIdentifier 'collectMembers' with the user ID. Example: JSON.stringify({conditionGroups:[[{className:'user',fieldIdentifier:'project.admin',format:'multiList',operator:'CONTAINS',value:[userId]}]]})"),
|
|
735
|
-
orderBy: z.string().optional().default("gmtCreate").describe("Sort field, default is gmtCreate, supports: gmtCreate (creation time), name (name)"),
|
|
736
|
-
page: z.number().int().default(1).optional().describe("Pagination parameter, page number"),
|
|
737
|
-
perPage: z.number().int().default(20).optional().describe("Pagination parameter, page size, 0-200, default value is 20"),
|
|
738
|
-
sort: z.string().optional().default("desc").describe("Sort order, default is desc, options: desc (descending), asc (ascending)"),
|
|
739
|
-
});
|
|
740
|
-
// 工作项相关的Schema定义
|
|
741
|
-
export const GetWorkItemSchema = z.object({
|
|
742
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
743
|
-
workItemId: z.string().describe("Work item unique identifier, required parameter"),
|
|
744
|
-
});
|
|
745
|
-
export const CreateWorkItemSchema = z.object({
|
|
746
|
-
organizationId: z.string().describe("Organization ID"),
|
|
747
|
-
spaceId: z.string().describe("Space ID, project unique identifier"),
|
|
748
|
-
subject: z.string().describe("Work item title"),
|
|
749
|
-
workitemTypeId: z.string().describe("Work item type ID"),
|
|
750
|
-
assignedTo: z.string().describe("Assignee user ID"),
|
|
751
|
-
customFieldValues: z.record(z.string()).optional().describe("Custom field values"),
|
|
752
|
-
description: z.string().optional().describe("Work item description"),
|
|
753
|
-
labels: z.array(z.string()).optional().describe("Associated label IDs"),
|
|
754
|
-
parentId: z.string().optional().describe("Parent work item ID"),
|
|
755
|
-
participants: z.array(z.string()).optional().describe("Participant user IDs"),
|
|
756
|
-
sprint: z.string().optional().describe("Associated sprint ID"),
|
|
757
|
-
trackers: z.array(z.string()).optional().describe("CC user IDs"),
|
|
758
|
-
verifier: z.string().optional().describe("Verifier user ID"),
|
|
759
|
-
versions: z.array(z.string()).optional().describe("Associated version IDs")
|
|
760
|
-
});
|
|
761
|
-
export const SearchWorkitemsSchema = z.object({
|
|
762
|
-
organizationId: z.string().describe("Organization ID"),
|
|
763
|
-
category: z.string().describe("Search for work item types, such as Req (requirement), Task (task), Bug (defect), etc., multiple values separated by commas"),
|
|
764
|
-
spaceId: z.string().describe("Project ID, project unique identifier"),
|
|
765
|
-
// Simplified search parameters
|
|
766
|
-
subject: z.string().nullable().optional().describe("Text contained in the title"),
|
|
767
|
-
status: z.string().nullable().optional().describe("Status ID, multiple separated by commas. Status names and their IDs: Pending Confirmation (28), Pending Processing (100005), Reopened (30), Deferred Fix (34), Confirmed (32), Selected (625489), In Analysis (154395), Analysis Complete (165115), In Progress (100010), In Design (156603), Design Complete (307012), In Development (142838), Development Complete (100011), In Testing (100012)"),
|
|
768
|
-
createdAfter: z.string().nullable().optional().describe("Created not earlier than, format: YYYY-MM-DD"),
|
|
769
|
-
createdBefore: z.string().nullable().optional().describe("Created not later than, format: YYYY-MM-DD"),
|
|
770
|
-
updatedAfter: z.string().nullable().optional().describe("Updated not earlier than, format: YYYY-MM-DD"),
|
|
771
|
-
updatedBefore: z.string().nullable().optional().describe("Updated not later than, format: YYYY-MM-DD"),
|
|
772
|
-
creator: z.string().nullable().optional().describe("Creator user ID, multiple values separated by commas. Special value 'self' can be used to represent the current user"),
|
|
773
|
-
assignedTo: z.string().nullable().optional().describe("Assignee user ID, multiple values separated by commas. Special value 'self' can be used to represent the current user"),
|
|
774
|
-
// Advanced parameters
|
|
775
|
-
advancedConditions: z.string().nullable().optional().describe("Advanced filter conditions, JSON format"),
|
|
776
|
-
orderBy: z.string().optional().default("gmtCreate").describe("Sort field, default is gmtCreate. Possible values: gmtCreate, subject, status, priority, assignedTo"),
|
|
777
|
-
includeDetails: z.boolean().optional().describe("Set to true when you need work item descriptions/detailed content. This automatically fetches missing descriptions instead of requiring separate get_work_item calls. RECOMMENDED: Use includeDetails=true when user asks for 'detailed content', 'descriptions', or 'full information' of work items. This is more efficient than calling get_work_item multiple times. Default is false")
|
|
778
|
-
});
|
|
779
|
-
// Codeup branches related Schema definitions
|
|
780
|
-
export const CreateBranchSchema = z.object({
|
|
781
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
782
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
783
|
-
branch: z.string().describe("Name of the branch to be created"),
|
|
784
|
-
ref: z.string().default("master").describe("Source branch name, the new branch will be created based on this branch, default value is master"),
|
|
785
|
-
});
|
|
786
|
-
export const GetBranchSchema = z.object({
|
|
787
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
788
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
789
|
-
branchName: z.string().describe("Branch name (if it contains special characters, use URL encoding), example: master or feature%2Fdev"),
|
|
790
|
-
});
|
|
791
|
-
export const DeleteBranchSchema = z.object({
|
|
792
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
793
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
794
|
-
branchName: z.string().describe("Branch name (use URL-Encoder for encoding, example: feature%2Fdev)"),
|
|
795
|
-
});
|
|
796
|
-
export const ListBranchesSchema = z.object({
|
|
797
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
798
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
799
|
-
page: z.number().int().default(1).optional().describe("Page number"),
|
|
800
|
-
perPage: z.number().int().default(20).optional().describe("Items per page"),
|
|
801
|
-
sort: z.enum(["name_asc", "name_desc", "updated_asc", "updated_desc"]).default("name_asc").optional().describe("Sort order: name_asc - name ascending, name_desc - name descending, updated_asc - update time ascending, updated_desc - update time descending"),
|
|
802
|
-
search: z.string().nullable().optional().describe("Search query"),
|
|
803
|
-
});
|
|
804
|
-
// Codeup repositories related Schema definitions
|
|
805
|
-
export const GetRepositorySchema = z.object({
|
|
806
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
807
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
808
|
-
});
|
|
809
|
-
export const ListRepositoriesSchema = z.object({
|
|
810
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
811
|
-
page: z.number().int().default(1).optional().describe("Page number, default starts from 1, generally should not exceed 150 pages"),
|
|
812
|
-
perPage: z.number().int().default(20).optional().describe("Items per page, default 20, value range [1, 100]"),
|
|
813
|
-
orderBy: z.string().default("created_at").optional().describe("Sort field, options include {created_at, name, path, last_activity_at}, default is created_at"),
|
|
814
|
-
sort: z.string().default("desc").optional().describe("Sort order, options include {asc, desc}, default is desc"),
|
|
815
|
-
search: z.string().nullable().optional().describe("Search keyword, used to fuzzy match repository paths"),
|
|
816
|
-
archived: z.boolean().default(false).optional().describe("Whether archived"),
|
|
817
|
-
});
|
|
818
|
-
// Codeup files related Schema definitions
|
|
819
|
-
export const GetFileBlobsSchema = z.object({
|
|
820
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
821
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
822
|
-
filePath: z.string().describe("File path, needs to be URL encoded, for example: /src/main/java/com/aliyun/test.java"),
|
|
823
|
-
ref: z.string().describe("Reference name, usually branch name, can be branch name, tag name or commit SHA. If not provided, the default branch of the repository will be used, such as master"),
|
|
824
|
-
});
|
|
825
|
-
export const CreateFileSchema = z.object({
|
|
826
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
827
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
828
|
-
filePath: z.string().describe("File path, needs to be URL encoded, for example: /src/main/java/com/aliyun/test.java"),
|
|
829
|
-
content: z.string().describe("File content"),
|
|
830
|
-
commitMessage: z.string().describe("Commit message, not empty, no more than 102400 characters"),
|
|
831
|
-
branch: z.string().describe("Branch name"),
|
|
832
|
-
encoding: z.string().optional().describe("Encoding rule, options {text, base64}, default is text"),
|
|
833
|
-
});
|
|
834
|
-
export const UpdateFileSchema = z.object({
|
|
835
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
836
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
837
|
-
filePath: z.string().describe("File path, needs to be URL encoded, for example: /src/main/java/com/aliyun/test.java"),
|
|
838
|
-
content: z.string().describe("File content"),
|
|
839
|
-
commitMessage: z.string().describe("Commit message, not empty, no more than 102400 characters"),
|
|
840
|
-
branch: z.string().describe("Branch name"),
|
|
841
|
-
encoding: z.string().default("text").optional().describe("Encoding rule, options {text, base64}, default is text"),
|
|
842
|
-
});
|
|
843
|
-
export const DeleteFileSchema = z.object({
|
|
844
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
845
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
846
|
-
filePath: z.string().describe("File path, needs to be URL encoded, for example: /src/main/java/com/aliyun/test.java"),
|
|
847
|
-
commitMessage: z.string().describe("Commit message"),
|
|
848
|
-
branch: z.string().describe("Branch name"),
|
|
849
|
-
});
|
|
850
|
-
export const ListFilesSchema = z.object({
|
|
851
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
852
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
853
|
-
path: z.string().optional().describe("Specific path to query, for example to query files in the src/main directory"),
|
|
854
|
-
ref: z.string().optional().describe("Reference name, usually branch name, can be branch name, tag name or commit SHA. If not provided, the default branch of the repository will be used, such as master"),
|
|
855
|
-
type: z.string().default("RECURSIVE").optional().describe("File tree retrieval method: DIRECT - only get the current directory, default method; RECURSIVE - recursively find all files under the current path; FLATTEN - flat display (if it is a directory, recursively find until the subdirectory contains files or multiple directories)"),
|
|
856
|
-
});
|
|
857
|
-
// Codeup compare related Schema definitions
|
|
858
|
-
export const GetCompareSchema = z.object({
|
|
859
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
860
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
861
|
-
from: z.string().describe("Can be CommitSHA, branch name or tag name"),
|
|
862
|
-
to: z.string().describe("Can be CommitSHA, branch name or tag name"),
|
|
863
|
-
sourceType: z.string().nullable().optional().describe("Options: branch, tag; if it's a commit comparison, you can omit this; if it's a branch comparison, you need to provide: branch, or you can omit it but ensure there are no branch or tag name conflicts; if it's a tag comparison, you need to provide: tag; if there are branches and tags with the same name, you need to strictly provide branch or tag"),
|
|
864
|
-
targetType: z.string().nullable().optional().describe("Options: branch, tag; if it's a commit comparison, you can omit this; if it's a branch comparison, you need to provide: branch, or you can omit it but ensure there are no branch or tag name conflicts; if it's a tag comparison, you need to provide: tag; if there are branches and tags with the same name, you need to strictly provide branch or tag"),
|
|
865
|
-
straight: z.string().default("false").nullable().optional().describe("Whether to use Merge-Base: straight=false means using Merge-Base; straight=true means not using Merge-Base; default is false, meaning using Merge-Base"),
|
|
866
|
-
});
|
|
867
|
-
// Codeup change requests related Schema definitions
|
|
868
|
-
export const GetChangeRequestSchema = z.object({
|
|
869
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
870
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
871
|
-
localId: z.string().describe("Local ID, represents the nth merge request in the repository"),
|
|
872
|
-
});
|
|
873
|
-
export const ListChangeRequestsSchema = z.object({
|
|
874
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
875
|
-
page: z.number().int().default(1).optional().describe("Page number"),
|
|
876
|
-
perPage: z.number().int().default(20).optional().describe("Items per page"),
|
|
877
|
-
projectIds: z.string().nullable().optional().describe("Repository ID or a combination of organization ID and repository name list, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F), multiple separated by commas"),
|
|
878
|
-
authorIds: z.string().nullable().optional().describe("Creator user ID list, multiple separated by commas"),
|
|
879
|
-
reviewerIds: z.string().nullable().optional().describe("Reviewer user ID list, multiple separated by commas"),
|
|
880
|
-
state: z.string().nullable().optional().describe("Merge request filter status. Possible values: opened, merged, closed. Default is null, which queries all statuses"),
|
|
881
|
-
search: z.string().nullable().optional().describe("Title keyword search"),
|
|
882
|
-
orderBy: z.string().default("updated_at").optional().describe("Sort field. Possible values: created_at (creation time), updated_at (update time, default)"),
|
|
883
|
-
sort: z.string().default("desc").optional().describe("Sort order. Possible values: asc (ascending), desc (descending, default)"),
|
|
884
|
-
createdBefore: z.string().nullable().optional().describe("Start creation time, time format is ISO 8601, for example: 2019-03-15T08:00:00Z"),
|
|
885
|
-
createdAfter: z.string().nullable().optional().describe("End creation time, time format is ISO 8601, for example: 2019-03-15T08:00:00Z"),
|
|
886
|
-
});
|
|
887
|
-
export const CreateChangeRequestSchema = z.object({
|
|
888
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
889
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
890
|
-
title: z.string().describe("Title, no more than 256 characters"),
|
|
891
|
-
description: z.string().nullable().optional().describe("Description, no more than 10000 characters"),
|
|
892
|
-
sourceBranch: z.string().describe("Source branch name"),
|
|
893
|
-
sourceProjectId: z.number().optional().describe("Source repository ID (if not provided, will try to get automatically)"),
|
|
894
|
-
targetBranch: z.string().describe("Target branch name"),
|
|
895
|
-
targetProjectId: z.number().optional().describe("Target repository ID (if not provided, will try to get automatically)"),
|
|
896
|
-
reviewerUserIds: z.array(z.string()).nullable().optional().describe("Reviewer user ID list"),
|
|
897
|
-
workItemIds: z.array(z.string()).nullable().optional().describe("Associated work item ID list"),
|
|
898
|
-
createFrom: z.string().optional().default("WEB").describe("Creation source. Possible values: WEB (created from web page), COMMAND_LINE (created from command line). Default is WEB"),
|
|
899
|
-
});
|
|
900
|
-
export const ListChangeRequestPatchSetsSchema = z.object({
|
|
901
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
902
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
903
|
-
localId: z.string().describe("Local ID, represents the nth merge request in the repository"),
|
|
904
|
-
});
|
|
905
|
-
// Codeup change request comments related Schema definitions
|
|
906
|
-
export const CreateChangeRequestCommentSchema = z.object({
|
|
907
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
908
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
909
|
-
localId: z.string().describe("Local ID, represents the nth merge request in the repository"),
|
|
910
|
-
comment_type: z.string().default("GLOBAL_COMMENT").describe("Comment type. Possible values: GLOBAL_COMMENT, INLINE_COMMENT"),
|
|
911
|
-
content: z.string().describe("Comment content, length must be between 1 and 65535"),
|
|
912
|
-
draft: z.boolean().default(false).describe("Whether it is a draft comment"),
|
|
913
|
-
resolved: z.boolean().default(false).describe("Whether to mark as resolved"),
|
|
914
|
-
patchset_biz_id: z.string().describe("Associated version ID, if it's INLINE_COMMENT, choose one from from_patchset_biz_id or to_patchset_biz_id"),
|
|
915
|
-
file_path: z.string().nullable().optional().describe("File name, only for inline comments"),
|
|
916
|
-
line_number: z.number().int().nullable().optional().describe("Line number, only for inline comments"),
|
|
917
|
-
from_patchset_biz_id: z.string().nullable().optional().describe("Start version ID for comparison, required for INLINE_COMMENT type"),
|
|
918
|
-
to_patchset_biz_id: z.string().nullable().optional().describe("Target version ID for comparison, required for INLINE_COMMENT type"),
|
|
919
|
-
parent_comment_biz_id: z.string().nullable().optional().describe("Parent comment ID"),
|
|
920
|
-
});
|
|
921
|
-
export const ListChangeRequestCommentsSchema = z.object({
|
|
922
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
923
|
-
repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
|
|
924
|
-
localId: z.string().describe("Change request local ID"),
|
|
925
|
-
patchSetBizIds: z.array(z.string()).nullable().optional().describe("Associated version ID list, each comment is associated with a version, indicating which version the comment was posted on, for global comments, it's associated with the latest merge source version"),
|
|
926
|
-
commentType: z.string().optional().default("GLOBAL_COMMENT").describe("Comment type. Possible values: GLOBAL_COMMENT, INLINE_COMMENT"),
|
|
927
|
-
state: z.string().optional().default("OPENED").describe("Comment state. Possible values: OPENED, DRAFT"),
|
|
928
|
-
resolved: z.boolean().optional().default(false).describe("Whether marked as resolved"),
|
|
929
|
-
filePath: z.string().nullable().optional().describe("Filter by file path (for inline comments)"),
|
|
930
|
-
});
|
|
931
|
-
// 制品仓库相关的Schema定义
|
|
932
|
-
export const PackageRepositorySchema = z.object({
|
|
933
|
-
accessLevel: z.string().nullable().optional().describe("Access level: PRIVATE - Private repository (only accessible to repository members), INTERNAL - Organization-wide visibility (accessible to all organization members)"),
|
|
934
|
-
latestUpdate: z.number().int().nullable().optional().describe("Latest update time"),
|
|
935
|
-
repoCategory: z.string().nullable().optional().describe("Repository mode: Hybrid/Local/Proxy/ProxyCache/Group"),
|
|
936
|
-
repoDesc: z.string().nullable().optional().describe("Repository description"),
|
|
937
|
-
repoDescriptor: z.string().nullable().optional().describe("Repository descriptor file"),
|
|
938
|
-
repoId: z.string().nullable().optional().describe("Repository ID"),
|
|
939
|
-
repoName: z.string().nullable().optional().describe("Repository name"),
|
|
940
|
-
repoType: z.string().nullable().optional().describe("Repository type: GENERIC/DOCKER/MAVEN/NPM/NUGET"),
|
|
941
|
-
star: z.boolean().nullable().optional().describe("Whether the repository is favorited"),
|
|
942
|
-
});
|
|
943
|
-
export const ListPackageRepositoriesSchema = z.object({
|
|
944
|
-
organizationId: z.string().describe("Organization ID"),
|
|
945
|
-
repoTypes: z.string().optional().describe("Repository types, available values: GENERIC/DOCKER/MAVEN/NPM/NUGET, multiple types can be separated by commas"),
|
|
946
|
-
repoCategories: z.string().optional().describe("Repository modes, available values: Hybrid/Local/Proxy/ProxyCache/Group, multiple modes can be separated by commas"),
|
|
947
|
-
perPage: z.number().int().optional().default(8).describe("Number of items per page, default value is 8"),
|
|
948
|
-
page: z.number().int().optional().default(1).describe("Current page number"),
|
|
949
|
-
});
|
|
950
|
-
// 制品相关的Schema定义
|
|
951
|
-
export const ArtifactVersionSchema = z.object({
|
|
952
|
-
createTime: z.number().int().nullable().optional().describe("Creation time"),
|
|
953
|
-
creator: z.string().nullable().optional().describe("Creator"),
|
|
954
|
-
gmtDownload: z.number().int().nullable().optional().describe("Latest download time"),
|
|
955
|
-
id: z.number().int().nullable().optional().describe("Artifact version ID"),
|
|
956
|
-
modifier: z.string().nullable().optional().describe("Modifier"),
|
|
957
|
-
updateTime: z.number().int().nullable().optional().describe("Modification time"),
|
|
958
|
-
version: z.string().nullable().optional().describe("Version number"),
|
|
959
|
-
});
|
|
960
|
-
export const ArtifactSchema = z.object({
|
|
961
|
-
downloadCount: z.number().int().nullable().optional().describe("Download count"),
|
|
962
|
-
gmtDownload: z.number().int().nullable().optional().describe("Latest download time"),
|
|
963
|
-
id: z.number().int().nullable().optional().describe("Artifact ID"),
|
|
964
|
-
latestUpdate: z.number().int().nullable().optional().describe("Latest update time"),
|
|
965
|
-
module: z.string().nullable().optional().describe("Module name"),
|
|
966
|
-
organization: z.string().nullable().optional().describe("Organization information"),
|
|
967
|
-
repositoryId: z.string().nullable().optional().describe("Repository ID"),
|
|
968
|
-
versions: z.array(ArtifactVersionSchema).nullable().optional().describe("Version list"),
|
|
969
|
-
});
|
|
970
|
-
export const ListArtifactsSchema = z.object({
|
|
971
|
-
organizationId: z.string().describe("Organization ID"),
|
|
972
|
-
repoId: z.string().describe("Repository ID"),
|
|
973
|
-
repoType: z.string().describe("Repository type, available values: GENERIC/DOCKER/MAVEN/NPM/NUGET"),
|
|
974
|
-
page: z.number().int().optional().default(1).describe("Current page number"),
|
|
975
|
-
perPage: z.number().int().optional().default(8).describe("Number of items per page, default is 10"),
|
|
976
|
-
search: z.string().optional().describe("Search by package name"),
|
|
977
|
-
orderBy: z.string().optional().default("latestUpdate").describe("Sort method: latestUpdate - by latest update time; gmtDownload - by latest download time"),
|
|
978
|
-
sort: z.string().optional().default("desc").describe("Sort order: asc - ascending; desc - descending"),
|
|
979
|
-
});
|
|
980
|
-
export const GetArtifactSchema = z.object({
|
|
981
|
-
organizationId: z.string().describe("Organization ID"),
|
|
982
|
-
repoId: z.string().describe("Repository ID"),
|
|
983
|
-
id: z.number().int().describe("Artifact ID, can be obtained from ListArtifacts API"),
|
|
984
|
-
repoType: z.string().describe("Repository type, available values: GENERIC/DOCKER/MAVEN/NPM/NUGET/PYPI"),
|
|
985
|
-
});
|
|
986
|
-
// 添加流水线任务相关Schema
|
|
987
|
-
export const ListPipelineJobsByCategorySchema = z.object({
|
|
988
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
989
|
-
pipelineId: z.string().describe("Pipeline ID"),
|
|
990
|
-
category: z.string().describe("Task category, currently only supports DEPLOY")
|
|
991
|
-
});
|
|
992
|
-
export const PipelineJobItemSchema = z.object({
|
|
993
|
-
identifier: z.string().nullable().optional().describe("Task identifier"),
|
|
994
|
-
jobName: z.string().nullable().optional().describe("Task name"),
|
|
995
|
-
lastJobId: z.number().int().nullable().optional().describe("ID of the last executed task"),
|
|
996
|
-
lastJobParams: z.string().nullable().optional().describe("Parameters of the last executed task in JSON format")
|
|
997
|
-
});
|
|
998
|
-
// 添加流水线任务历史相关Schema
|
|
999
|
-
export const ListPipelineJobHistorysSchema = z.object({
|
|
1000
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
1001
|
-
pipelineId: z.string().describe("Pipeline ID"),
|
|
1002
|
-
category: z.string().describe("Task category, currently only supports DEPLOY"),
|
|
1003
|
-
identifier: z.string().describe("Task identifier"),
|
|
1004
|
-
perPage: z.number().int().min(1).max(30).default(10).optional().describe("Number of items per page, default 10, max 30"),
|
|
1005
|
-
page: z.number().int().min(1).default(1).optional().describe("Page number, default 1")
|
|
1006
|
-
});
|
|
1007
|
-
export const PipelineJobHistoryItemSchema = z.object({
|
|
1008
|
-
executeNumber: z.number().int().nullable().optional().describe("Task execution number"),
|
|
1009
|
-
identifier: z.string().nullable().optional().describe("Task identifier"),
|
|
1010
|
-
jobId: z.number().int().nullable().optional().describe("Job ID"),
|
|
1011
|
-
jobName: z.string().nullable().optional().describe("Job name"),
|
|
1012
|
-
operatorAccountId: z.string().nullable().optional().describe("Operator account ID"),
|
|
1013
|
-
pipelineId: z.number().int().nullable().optional().describe("Pipeline ID"),
|
|
1014
|
-
pipelineRunId: z.number().int().nullable().optional().describe("Pipeline run instance ID"),
|
|
1015
|
-
sources: z.string().nullable().optional().describe("Code source information for the job run, in JSON format"),
|
|
1016
|
-
status: z.string().nullable().optional().describe("Job execution status")
|
|
1017
|
-
});
|
|
1018
|
-
// 添加手动运行流水线任务相关Schema
|
|
1019
|
-
export const ExecutePipelineJobRunSchema = z.object({
|
|
1020
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
1021
|
-
pipelineId: z.string().describe("Pipeline ID"),
|
|
1022
|
-
pipelineRunId: z.string().describe("Pipeline run instance ID"),
|
|
1023
|
-
jobId: z.string().describe("Job ID for the pipeline run task")
|
|
1024
|
-
});
|
|
1025
|
-
// 添加获取流水线任务运行日志相关Schema
|
|
1026
|
-
export const GetPipelineJobRunLogSchema = z.object({
|
|
1027
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
1028
|
-
pipelineId: z.string().describe("Pipeline ID"),
|
|
1029
|
-
pipelineRunId: z.string().describe("Pipeline run instance ID"),
|
|
1030
|
-
jobId: z.string().describe("Job ID of the pipeline run task")
|
|
1031
|
-
});
|
|
1032
|
-
export const PipelineJobRunLogSchema = z.object({
|
|
1033
|
-
content: z.string().nullable().optional().describe("Log content"),
|
|
1034
|
-
last: z.number().int().nullable().optional().describe("Last log line number"),
|
|
1035
|
-
more: z.boolean().nullable().optional().describe("Whether there are more logs available")
|
|
1036
|
-
});
|
|
1037
|
-
// 搜索组织成员相关类型
|
|
1038
|
-
export const SearchOrganizationMembersSchema = z.object({
|
|
1039
|
-
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
1040
|
-
deptIds: z.array(z.string()).optional().describe("Department IDs to search for"),
|
|
1041
|
-
query: z.string().optional().describe("Search query"),
|
|
1042
|
-
includeChildren: z.boolean().optional().describe("Whether to include sub-departments"),
|
|
1043
|
-
nextToken: z.string().optional().describe("Next token for pagination"),
|
|
1044
|
-
roleIds: z.array(z.string()).optional().describe("Role IDs to search for"),
|
|
1045
|
-
statuses: z.array(z.string()).optional().describe("User statuses, posibble values: ENABLED,DISABLED,UNDELETED,DELETED,NORMAL_USING,UNVISITED。ENABLED=NORMAL_USING+UNVISITED;UNDELETED=ENABLED+DISABLED"),
|
|
1046
|
-
page: z.number().int().optional().describe("Current page number, defaults to 1"),
|
|
1047
|
-
perPage: z.number().int().optional().describe("Number of items per page, defaults to 100")
|
|
1048
|
-
});
|
|
1049
|
-
export const SearchOrganizationMembersResultSchema = z.array(MemberInfoSchema);
|
|
1050
|
-
// 服务连接相关的Schema定义
|
|
1051
|
-
export const ServiceConnectionSchema = z.object({
|
|
1052
|
-
createTime: z.number().int().nullable().optional().describe("创建时间"),
|
|
1053
|
-
id: z.number().int().nullable().optional().describe("服务连接ID"),
|
|
1054
|
-
name: z.string().nullable().optional().describe("服务连接名称"),
|
|
1055
|
-
ownerAccountId: z.union([z.string(), z.number().int()]).nullable().optional().describe("拥有者阿里云账号ID"),
|
|
1056
|
-
type: z.string().nullable().optional().describe("服务连接类型"),
|
|
1057
|
-
uuid: z.string().nullable().optional().describe("UUID"),
|
|
1058
|
-
});
|
|
1059
|
-
export const ListServiceConnectionsSchema = z.object({
|
|
1060
|
-
organizationId: z.string().describe("组织ID,可在组织管理后台的基本信息页面获取"),
|
|
1061
|
-
serviceConnectionType: z.enum([
|
|
1062
|
-
"aliyun_code",
|
|
1063
|
-
"codeup",
|
|
1064
|
-
"gitee",
|
|
1065
|
-
"github",
|
|
1066
|
-
"ack",
|
|
1067
|
-
"docker_register_aliyun",
|
|
1068
|
-
"ecs",
|
|
1069
|
-
"edas",
|
|
1070
|
-
"emas",
|
|
1071
|
-
"fc",
|
|
1072
|
-
"kubernetes",
|
|
1073
|
-
"oss",
|
|
1074
|
-
"packages",
|
|
1075
|
-
"ros",
|
|
1076
|
-
"sae"
|
|
1077
|
-
]).describe("服务连接类型: aliyun_code-阿里云代码, codeup-Codeup, gitee-码云, github-Github, ack-容器服务Kubernetes(ACK), docker_register_aliyun-容器镜像服务(ACR), ecs-ECS主机, edas-企业级分布式应用(EDAS), emas-移动研发平台(EMAS), fc-阿里云函数计算(FC), kubernetes-自建k8s集群, oss-对象存储(OSS), packages-制品仓库, ros-资源编排服务(ROS), sae-Serverless应用引擎(SAE)"),
|
|
1078
|
-
});
|
|
1079
|
-
// 主机组相关的Schema定义
|
|
1080
|
-
export const HostInfoSchema = z.object({
|
|
1081
|
-
aliyunRegion: z.string().nullable().optional().describe("阿里云区域"),
|
|
1082
|
-
createTime: z.number().int().nullable().optional().describe("创建时间"),
|
|
1083
|
-
creatorAccountId: z.string().nullable().optional().describe("创建者阿里云账号"),
|
|
1084
|
-
instanceName: z.string().nullable().optional().describe("主机名"),
|
|
1085
|
-
ip: z.string().nullable().optional().describe("机器IP"),
|
|
1086
|
-
machineSn: z.string().nullable().optional().describe("机器SN"),
|
|
1087
|
-
modiferAccountId: z.string().nullable().optional().describe("修改者阿里云账号"),
|
|
1088
|
-
objectType: z.string().nullable().optional().describe("对象类型,固定为MachineInfo"),
|
|
1089
|
-
updateTime: z.number().int().nullable().optional().describe("更新时间"),
|
|
1090
|
-
});
|
|
1091
|
-
export const HostGroupSchema = z.object({
|
|
1092
|
-
aliyunRegion: z.string().nullable().optional().describe("阿里云区域"),
|
|
1093
|
-
createTime: z.number().int().nullable().optional().describe("创建时间"),
|
|
1094
|
-
creatorAccountId: z.string().nullable().optional().describe("创建人"),
|
|
1095
|
-
description: z.string().nullable().optional().describe("主机组描述"),
|
|
1096
|
-
ecsLabelKey: z.string().nullable().optional().describe("ECS标签Key"),
|
|
1097
|
-
ecsLabelValue: z.string().nullable().optional().describe("ECS标签Value"),
|
|
1098
|
-
ecsType: z.string().nullable().optional().describe("ECS类型,暂只支持ECS_ALIYUN"),
|
|
1099
|
-
hostInfos: z.array(HostInfoSchema).nullable().optional().describe("主机信息列表"),
|
|
1100
|
-
hostNum: z.number().int().nullable().optional().describe("主机数"),
|
|
1101
|
-
id: z.number().int().nullable().optional().describe("主机组ID"),
|
|
1102
|
-
modiferAccountId: z.string().nullable().optional().describe("更新人"),
|
|
1103
|
-
name: z.string().nullable().optional().describe("主机组名称"),
|
|
1104
|
-
serviceConnectionId: z.number().int().nullable().optional().describe("服务连接ID"),
|
|
1105
|
-
type: z.string().nullable().optional().describe("主机组类型"),
|
|
1106
|
-
updateTime: z.number().int().nullable().optional().describe("更新时间"),
|
|
1107
|
-
});
|
|
1108
|
-
export const ListHostGroupsSchema = z.object({
|
|
1109
|
-
organizationId: z.string().describe("组织ID,可在组织管理后台的基本信息页面获取"),
|
|
1110
|
-
ids: z.string().optional().describe("主机组ID,多个逗号分割"),
|
|
1111
|
-
name: z.string().optional().describe("主机组名称"),
|
|
1112
|
-
createStartTime: z.number().int().optional().describe("主机组创建开始时间"),
|
|
1113
|
-
createEndTime: z.number().int().optional().describe("主机组创建结束时间"),
|
|
1114
|
-
creatorAccountIds: z.string().optional().describe("创建阿里云账号ID,多个逗号分割"),
|
|
1115
|
-
perPage: z.number().int().min(1).max(30).default(10).optional().describe("每页数据条数,默认10,最大支持30"),
|
|
1116
|
-
page: z.number().int().min(1).default(1).optional().describe("当前页,默认1"),
|
|
1117
|
-
pageSort: z.string().optional().describe("排序条件ID"),
|
|
1118
|
-
pageOrder: z.enum(["DESC", "ASC"]).default("DESC").optional().describe("排序顺序 DESC 降序 ASC 升序"),
|
|
1119
|
-
});
|