@catchmexz/fedin-vibe-mcp-server 0.1.0
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/LICENSE +202 -0
- package/dist/common/errors.js +69 -0
- package/dist/common/modularTemplates.js +483 -0
- package/dist/common/pipelineTemplates.js +19 -0
- package/dist/common/types.js +42 -0
- package/dist/common/utils.js +347 -0
- package/dist/common/version.js +1 -0
- package/dist/index.js +217 -0
- package/dist/operations/appstack/appOrchestrations.js +235 -0
- package/dist/operations/appstack/appTags.js +147 -0
- package/dist/operations/appstack/appTemplates.js +67 -0
- package/dist/operations/appstack/applications.js +154 -0
- package/dist/operations/appstack/changeOrders.js +293 -0
- package/dist/operations/appstack/changeRequests.js +263 -0
- package/dist/operations/appstack/deploymentResources.js +265 -0
- package/dist/operations/appstack/globalVars.js +200 -0
- package/dist/operations/appstack/releaseWorkflows.js +178 -0
- package/dist/operations/appstack/variableGroups.js +216 -0
- package/dist/operations/codeup/branches.js +144 -0
- package/dist/operations/codeup/changeRequestComments.js +89 -0
- package/dist/operations/codeup/changeRequests.js +203 -0
- package/dist/operations/codeup/compare.js +26 -0
- package/dist/operations/codeup/files.js +483 -0
- package/dist/operations/codeup/repositories.js +83 -0
- package/dist/operations/codeup/types.js +372 -0
- package/dist/operations/flow/hostGroup.js +48 -0
- package/dist/operations/flow/pipeline.js +530 -0
- package/dist/operations/flow/pipelineJob.js +113 -0
- package/dist/operations/flow/serviceConnection.js +23 -0
- package/dist/operations/flow/types.js +377 -0
- package/dist/operations/git/git-repository.js +334 -0
- package/dist/operations/git/index.js +210 -0
- package/dist/operations/organization/members.js +94 -0
- package/dist/operations/organization/organization.js +73 -0
- package/dist/operations/organization/types.js +111 -0
- package/dist/operations/packages/artifacts.js +64 -0
- package/dist/operations/packages/repositories.js +35 -0
- package/dist/operations/packages/types.js +56 -0
- package/dist/operations/projex/project.js +206 -0
- package/dist/operations/projex/sprint.js +90 -0
- package/dist/operations/projex/types.js +390 -0
- package/dist/operations/projex/workitem.js +452 -0
- package/dist/tool-handlers/appstack-change-orders.js +55 -0
- package/dist/tool-handlers/appstack-change-requests.js +49 -0
- package/dist/tool-handlers/appstack-deployment-resources.js +43 -0
- package/dist/tool-handlers/appstack-global-vars.js +43 -0
- package/dist/tool-handlers/appstack-orchestrations.js +49 -0
- package/dist/tool-handlers/appstack-tags.js +43 -0
- package/dist/tool-handlers/appstack-templates.js +19 -0
- package/dist/tool-handlers/appstack-variable-groups.js +55 -0
- package/dist/tool-handlers/appstack.js +37 -0
- package/dist/tool-handlers/code-management.js +174 -0
- package/dist/tool-handlers/git/branch-operations.js +1 -0
- package/dist/tool-handlers/git/clone-repository.js +36 -0
- package/dist/tool-handlers/git/create-branch.js +26 -0
- package/dist/tool-handlers/git/get-repository-status.js +33 -0
- package/dist/tool-handlers/git/pull-repository.js +27 -0
- package/dist/tool-handlers/git/push-repository.js +37 -0
- package/dist/tool-handlers/git/switch-branch.js +25 -0
- package/dist/tool-handlers/index.js +43 -0
- package/dist/tool-handlers/organization.js +90 -0
- package/dist/tool-handlers/packages.js +32 -0
- package/dist/tool-handlers/pipeline.js +272 -0
- package/dist/tool-handlers/project-management.js +152 -0
- package/dist/tool-handlers/service-connections.js +16 -0
- package/dist/tool-registry/appstack-change-orders.js +40 -0
- package/dist/tool-registry/appstack-change-requests.js +35 -0
- package/dist/tool-registry/appstack-deployment-resources.js +30 -0
- package/dist/tool-registry/appstack-global-vars.js +30 -0
- package/dist/tool-registry/appstack-orchestrations.js +35 -0
- package/dist/tool-registry/appstack-tags.js +30 -0
- package/dist/tool-registry/appstack-templates.js +10 -0
- package/dist/tool-registry/appstack-variable-groups.js +40 -0
- package/dist/tool-registry/appstack.js +25 -0
- package/dist/tool-registry/code-management.js +89 -0
- package/dist/tool-registry/git-repository.js +41 -0
- package/dist/tool-registry/index.js +6 -0
- package/dist/tool-registry/organization.js +65 -0
- package/dist/tool-registry/packages.js +21 -0
- package/dist/tool-registry/pipeline.js +157 -0
- package/dist/tool-registry/project-management.js +108 -0
- package/dist/tool-registry/service-connections.js +10 -0
- package/package.json +39 -0
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { UserInfoSchema } from "../organization/types.js";
|
|
3
|
+
// Custom field related types
|
|
4
|
+
export const FieldItemSchema = z.object({
|
|
5
|
+
displayValue: z.string().nullable().optional().describe("Display value"),
|
|
6
|
+
identifier: z.string().nullable().optional().describe("Identifier"),
|
|
7
|
+
});
|
|
8
|
+
export const CustomFieldValuesSchema = z.object({
|
|
9
|
+
fieldId: z.string().nullable().optional().describe("Custom field ID"),
|
|
10
|
+
fieldName: z.string().nullable().optional().describe("Custom field name"),
|
|
11
|
+
values: z.array(FieldItemSchema).nullable().optional().describe("Values"),
|
|
12
|
+
});
|
|
13
|
+
export const ValueSchema = z.object({
|
|
14
|
+
displayValue: z.string().nullable().optional().describe("Display value"),
|
|
15
|
+
identifier: z.string().nullable().optional().describe("Identifier"),
|
|
16
|
+
});
|
|
17
|
+
export const CustomFieldValueSchema = z.object({
|
|
18
|
+
fieldFormat: z.string().nullable().optional().describe("Field format"),
|
|
19
|
+
fieldId: z.string().nullable().optional().describe("Field ID"),
|
|
20
|
+
fieldName: z.string().nullable().optional().describe("Field name"),
|
|
21
|
+
values: z.array(ValueSchema).nullable().optional().describe("Values"),
|
|
22
|
+
});
|
|
23
|
+
// Project related types
|
|
24
|
+
export const ProjectStatusInfoSchema = z.object({
|
|
25
|
+
id: z.string().nullable().optional().describe("Status ID"),
|
|
26
|
+
name: z.string().nullable().optional().describe("Status name"),
|
|
27
|
+
});
|
|
28
|
+
export const ProjectInfoSchema = z.object({
|
|
29
|
+
id: z.string().nullable().optional().describe("Project ID, unique identifier for the project"),
|
|
30
|
+
name: z.string().nullable().optional().describe("Project name"),
|
|
31
|
+
description: z.string().nullable().optional().describe("Project description"),
|
|
32
|
+
icon: z.string().nullable().optional().describe("Icon URL"),
|
|
33
|
+
customCode: z.string().nullable().optional().describe("Code number"),
|
|
34
|
+
gmtCreate: z.number().int().nullable().optional().describe("Creation timestamp"),
|
|
35
|
+
gmtModified: z.number().int().nullable().optional().describe("Last update timestamp"),
|
|
36
|
+
logicalStatus: z.string().nullable().optional().describe("Logical status, e.g., normal"),
|
|
37
|
+
scope: z.string().nullable().optional().describe("Public type, enum values: public, private"),
|
|
38
|
+
creator: UserInfoSchema.nullable().optional().describe("Creator"),
|
|
39
|
+
modifier: UserInfoSchema.nullable().optional().describe("Modifier"),
|
|
40
|
+
status: ProjectStatusInfoSchema.nullable().optional().describe("Status"),
|
|
41
|
+
customFieldValues: z.array(CustomFieldValuesSchema).nullable().optional().describe("Custom field values"),
|
|
42
|
+
logoUrl: z.string().nullable().optional().describe("Project logo URL"),
|
|
43
|
+
isArchived: z.boolean().nullable().optional().describe("Whether archived"),
|
|
44
|
+
isPublic: z.boolean().nullable().optional().describe("Whether public"),
|
|
45
|
+
accessLevel: z.string().nullable().optional().describe("Access level"),
|
|
46
|
+
organizationIdentifier: z.string().nullable().optional().describe("Organization identifier"),
|
|
47
|
+
includeSubOrgs: z.boolean().nullable().optional().describe("Whether to include sub-organizations"),
|
|
48
|
+
isTemplate: z.boolean().nullable().optional().describe("Whether it's a template"),
|
|
49
|
+
parentIdentifier: z.string().nullable().optional().describe("Parent identifier"),
|
|
50
|
+
associatedCodes: z.array(z.string()).nullable().optional().describe("Associated code repositories"),
|
|
51
|
+
associatedCodeSources: z.array(z.string()).nullable().optional().describe("Associated code sources"),
|
|
52
|
+
customField: z.record(z.string(), z.any()).nullable().optional().describe("Custom fields"),
|
|
53
|
+
statusInfo: z.object({
|
|
54
|
+
identifier: z.string().nullable().optional().describe("Status identifier"),
|
|
55
|
+
name: z.string().nullable().optional().describe("Status name"),
|
|
56
|
+
color: z.string().nullable().optional().describe("Status color"),
|
|
57
|
+
type: z.string().nullable().optional().describe("Status type"),
|
|
58
|
+
desc: z.string().nullable().optional().describe("Status description"),
|
|
59
|
+
}).nullable().optional().describe("Status information"),
|
|
60
|
+
});
|
|
61
|
+
// Sprint related types
|
|
62
|
+
export const SprintInfoSchema = z.object({
|
|
63
|
+
identifier: z.string().optional().describe("Sprint identifier"),
|
|
64
|
+
name: z.string().optional().describe("Sprint name"),
|
|
65
|
+
goal: z.string().optional().describe("Sprint goal"),
|
|
66
|
+
startDate: z.number().nullable().optional().describe("Start date"),
|
|
67
|
+
endDate: z.number().nullable().optional().describe("End date"),
|
|
68
|
+
status: z.string().optional().describe("Status"),
|
|
69
|
+
spaceIdentifier: z.string().optional().describe("Project identifier"),
|
|
70
|
+
organizationIdentifier: z.string().optional().describe("Organization identifier"),
|
|
71
|
+
gmtCreate: z.number().optional().describe("Creation time"),
|
|
72
|
+
gmtModified: z.number().optional().describe("Last modified time"),
|
|
73
|
+
capacityHours: z.number().nullable().optional().describe("Capacity hours"),
|
|
74
|
+
creator: UserInfoSchema.nullable().optional().describe("Creator"),
|
|
75
|
+
description: z.string().optional().describe("Description"),
|
|
76
|
+
locked: z.boolean().optional().describe("Whether locked"),
|
|
77
|
+
modifier: UserInfoSchema.nullable().optional().describe("Modifier"),
|
|
78
|
+
owners: z.array(UserInfoSchema).nullable().optional().describe("Owners"),
|
|
79
|
+
});
|
|
80
|
+
export const SprintSchema = z.object({
|
|
81
|
+
id: z.string().optional().describe("Sprint ID"),
|
|
82
|
+
name: z.string().optional().describe("Sprint name"),
|
|
83
|
+
});
|
|
84
|
+
// List Sprints Schema
|
|
85
|
+
export const ListSprintsSchema = z.object({
|
|
86
|
+
organizationId: z.string().describe("Organization ID"),
|
|
87
|
+
id: z.string().describe("Project unique identifier"),
|
|
88
|
+
status: z.array(z.string()).optional().describe("Filter by status: TODO, DOING, ARCHIVED"),
|
|
89
|
+
page: z.number().int().min(1).optional().describe("Page number"),
|
|
90
|
+
perPage: z.number().int().min(1).max(100).optional().describe("Page size"),
|
|
91
|
+
});
|
|
92
|
+
// Get Sprint Schema
|
|
93
|
+
export const GetSprintSchema = z.object({
|
|
94
|
+
organizationId: z.string().describe("Organization ID"),
|
|
95
|
+
projectId: z.string().describe("Project unique identifier"),
|
|
96
|
+
id: z.string().describe("Sprint unique identifier"),
|
|
97
|
+
});
|
|
98
|
+
// Create Sprint Schema
|
|
99
|
+
export const CreateSprintSchema = z.object({
|
|
100
|
+
organizationId: z.string().describe("Organization ID"),
|
|
101
|
+
projectId: z.string().describe("Project unique identifier"),
|
|
102
|
+
name: z.string().describe("Sprint name"),
|
|
103
|
+
owners: z.array(z.string()).describe("Sprint owner user IDs"),
|
|
104
|
+
startDate: z.string().optional().describe("Date string in YYYY-MM-DD format"),
|
|
105
|
+
endDate: z.string().optional().describe("Date string in YYYY-MM-DD format"),
|
|
106
|
+
description: z.string().optional().describe("Sprint description"),
|
|
107
|
+
capacityHours: z.number().int().optional().describe("Sprint capacity hours"),
|
|
108
|
+
});
|
|
109
|
+
// Update Sprint Schema
|
|
110
|
+
export const UpdateSprintSchema = z.object({
|
|
111
|
+
organizationId: z.string().describe("Organization ID"),
|
|
112
|
+
projectId: z.string().describe("Project unique identifier"),
|
|
113
|
+
id: z.string().describe("Sprint unique identifier"),
|
|
114
|
+
name: z.string().describe("Sprint name"),
|
|
115
|
+
owners: z.array(z.string()).optional().describe("Sprint owner user IDs"),
|
|
116
|
+
startDate: z.string().optional().describe("Date string in YYYY-MM-DD format"),
|
|
117
|
+
endDate: z.string().optional().describe("Date string in YYYY-MM-DD format"),
|
|
118
|
+
description: z.string().optional().describe("Sprint description"),
|
|
119
|
+
capacityHours: z.number().int().optional().describe("Sprint capacity hours"),
|
|
120
|
+
});
|
|
121
|
+
// Work item related types
|
|
122
|
+
export const WorkItemTypeSchema = z.object({
|
|
123
|
+
addUser: z.object({
|
|
124
|
+
id: z.string().nullable().optional().describe("user id"),
|
|
125
|
+
name: z.string().nullable().optional().describe("名称")
|
|
126
|
+
}).nullable().optional(),
|
|
127
|
+
categoryId: z.string().nullable().optional().describe("Unique identifier of the category, e.g., Req, Task, Bug"),
|
|
128
|
+
creator: z.object({
|
|
129
|
+
id: z.string().nullable().optional().describe("User ID"),
|
|
130
|
+
name: z.string().nullable().optional().describe("Name")
|
|
131
|
+
}).nullable().optional(),
|
|
132
|
+
defaultType: z.boolean().nullable().optional().describe("Is it the default type"),
|
|
133
|
+
description: z.string().nullable().optional().describe("Type description"),
|
|
134
|
+
enable: z.boolean().nullable().optional().describe("Is it enabled"),
|
|
135
|
+
gmtAdd: z.string().nullable().optional().describe("Add time"),
|
|
136
|
+
gmtCreate: z.string().nullable().optional().describe("Creation time"),
|
|
137
|
+
id: z.string().describe("Unique identifier of the work item type"),
|
|
138
|
+
name: z.string().nullable().optional().describe("Type name"),
|
|
139
|
+
nameEn: z.string().nullable().optional().describe("English name of the type"),
|
|
140
|
+
systemDefault: z.boolean().nullable().optional().describe("Is it a system default type")
|
|
141
|
+
});
|
|
142
|
+
export const StatusSchema = z.object({
|
|
143
|
+
displayName: z.string().nullable().optional().describe("Display name"),
|
|
144
|
+
id: z.string().nullable().optional().describe("Status ID"),
|
|
145
|
+
name: z.string().nullable().optional().describe("Status name"),
|
|
146
|
+
nameEn: z.string().nullable().optional().describe("English name"),
|
|
147
|
+
});
|
|
148
|
+
export const SpaceSchema = z.object({
|
|
149
|
+
id: z.string().optional().describe("Space ID"),
|
|
150
|
+
name: z.string().optional().describe("Space name"),
|
|
151
|
+
});
|
|
152
|
+
export const LabelSchema = z.object({
|
|
153
|
+
id: z.string().nullable().optional().describe("Label ID"),
|
|
154
|
+
name: z.string().nullable().optional().describe("Label name"),
|
|
155
|
+
color: z.string().nullable().optional().describe("Label color"),
|
|
156
|
+
});
|
|
157
|
+
export const VersionSchema = z.object({
|
|
158
|
+
id: z.string().nullable().optional().describe("Version ID"),
|
|
159
|
+
name: z.string().nullable().optional().describe("Version name"),
|
|
160
|
+
});
|
|
161
|
+
export const WorkItemSchema = z.object({
|
|
162
|
+
id: z.string().describe("Work item ID"),
|
|
163
|
+
subject: z.string().nullable().optional().describe("Title"),
|
|
164
|
+
description: z.string().nullable().optional().describe("Description"),
|
|
165
|
+
gmtCreate: z.number().int().nullable().optional().describe("Creation time"),
|
|
166
|
+
gmtModified: z.number().int().nullable().optional().describe("Last modification time"),
|
|
167
|
+
workitemType: WorkItemTypeSchema.nullable().optional().describe("Work item type"),
|
|
168
|
+
status: StatusSchema.nullable().optional().describe("Status"),
|
|
169
|
+
formatType: z.string().nullable().optional().describe("Description format. Supported values: RICHTEXT (rich text format), MARKDOWN (markdown format)"),
|
|
170
|
+
categoryId: z.string().nullable().optional().describe("Category ID"),
|
|
171
|
+
logicalStatus: z.string().nullable().optional().describe("Logical status, e.g., normal, archived"),
|
|
172
|
+
parentId: z.string().nullable().optional().describe("Parent Work item ID"),
|
|
173
|
+
serialNumber: z.string().nullable().optional().describe("Serial number"),
|
|
174
|
+
statusStageId: z.string().nullable().optional().describe("Status stage ID"),
|
|
175
|
+
updateStatusAt: z.number().int().nullable().optional().describe("Status update time"),
|
|
176
|
+
idPath: z.string().nullable().optional().describe("Work item ID path"),
|
|
177
|
+
assignedTo: UserInfoSchema.nullable().optional().describe("Assignee user ID, multiple values separated by commas. Special value 'self' can be used to represent the current user"),
|
|
178
|
+
creator: UserInfoSchema.nullable().optional().describe("Creator user ID, multiple values separated by commas. Special value 'self' can be used to represent the current user"),
|
|
179
|
+
modifier: UserInfoSchema.nullable().optional().describe("Modifier"),
|
|
180
|
+
verifier: UserInfoSchema.nullable().optional().describe("Verifier"),
|
|
181
|
+
space: SpaceSchema.nullable().optional().describe("Space"),
|
|
182
|
+
sprint: SprintSchema.nullable().optional().describe("Sprint"),
|
|
183
|
+
labels: z.array(LabelSchema).nullable().optional().describe("Labels"),
|
|
184
|
+
participants: z.array(UserInfoSchema).nullable().optional().describe("Participants"),
|
|
185
|
+
trackers: z.array(UserInfoSchema).nullable().optional().describe("Trackers"),
|
|
186
|
+
versions: z.array(VersionSchema).nullable().optional().describe("Versions"),
|
|
187
|
+
customFieldValues: z.array(CustomFieldValueSchema).nullable().optional().describe("Custom field values"),
|
|
188
|
+
identifier: z.string().nullable().optional().describe("Work item identifier"),
|
|
189
|
+
priority: z.string().nullable().optional().describe("Priority"),
|
|
190
|
+
spaceIdentifier: z.string().nullable().optional().describe("Project identifier"),
|
|
191
|
+
organizationIdentifier: z.string().nullable().optional().describe("Organization identifier"),
|
|
192
|
+
parentIdentifier: z.string().nullable().optional().describe("Parent work item identifier"),
|
|
193
|
+
customFields: z.record(z.string(), z.any()).nullable().optional().describe("Custom fields"),
|
|
194
|
+
type: z.string().nullable().optional().describe("Type"),
|
|
195
|
+
});
|
|
196
|
+
// Search condition related types
|
|
197
|
+
export const FilterConditionSchema = z.object({
|
|
198
|
+
className: z.string().optional().describe("Class name"),
|
|
199
|
+
fieldIdentifier: z.string().optional().describe("Field identifier"),
|
|
200
|
+
format: z.string().optional().describe("Format"),
|
|
201
|
+
operator: z.string().optional().describe("Operator"),
|
|
202
|
+
toValue: z.string().nullable().optional().describe("To value"),
|
|
203
|
+
value: z.array(z.string()).nullable().optional().describe("Values"),
|
|
204
|
+
});
|
|
205
|
+
export const ConditionsSchema = z.object({
|
|
206
|
+
conditionGroups: z.array(z.array(z.any())).nullable().optional().describe("Condition groups"),
|
|
207
|
+
});
|
|
208
|
+
// Projex Project related schemas
|
|
209
|
+
export const GetProjectSchema = z.object({
|
|
210
|
+
organizationId: z.string().describe("Organization ID"),
|
|
211
|
+
id: z.string().describe("Project unique identifier"),
|
|
212
|
+
});
|
|
213
|
+
export const SearchProjectsSchema = z.object({
|
|
214
|
+
organizationId: z.string().describe("Organization ID"),
|
|
215
|
+
// Simplified search parameters
|
|
216
|
+
name: z.string().nullable().optional().describe("Text contained in project name"),
|
|
217
|
+
status: z.string().nullish().optional().describe("Project status ID, multiple separated by commas"),
|
|
218
|
+
createdAfter: z.string().nullable().optional().describe("Created not earlier than, format: YYYY-MM-DD"),
|
|
219
|
+
createdBefore: z.string().nullable().optional().describe("Created not later than, format: YYYY-MM-DD"),
|
|
220
|
+
creator: z.string().nullable().optional().describe("Creator"),
|
|
221
|
+
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"),
|
|
222
|
+
logicalStatus: z.string().nullable().optional().describe("Logical status, e.g., NORMAL"),
|
|
223
|
+
// Special filter for common scenarios
|
|
224
|
+
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."),
|
|
225
|
+
userId: z.string().nullable().optional().describe("User ID to use with scenarioFilter, should be the userId returned from getCurrentOrganizationInfoFunc"),
|
|
226
|
+
// Advanced parameters
|
|
227
|
+
advancedConditions: z.string().nullable().optional().describe("Advanced filter conditions, JSON format"),
|
|
228
|
+
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]}]]})"),
|
|
229
|
+
orderBy: z.string().optional().default("gmtCreate").describe("Sort field, default is gmtCreate, supports: gmtCreate (creation time), name (name)"),
|
|
230
|
+
page: z.number().int().default(1).optional().describe("Pagination parameter, page number"),
|
|
231
|
+
perPage: z.number().int().default(20).optional().describe("Pagination parameter, page size, 0-200, default value is 20"),
|
|
232
|
+
sort: z.string().optional().default("desc").describe("Sort order, default is desc, options: desc (descending), asc (ascending)"),
|
|
233
|
+
});
|
|
234
|
+
// Work item related schemas
|
|
235
|
+
export const GetWorkItemSchema = z.object({
|
|
236
|
+
organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
|
|
237
|
+
workItemId: z.string().describe("Work item unique identifier, required parameter"),
|
|
238
|
+
});
|
|
239
|
+
export const CreateWorkItemSchema = z.object({
|
|
240
|
+
organizationId: z.string().describe("Organization ID"),
|
|
241
|
+
spaceId: z.string().describe("Space ID, project unique identifier"),
|
|
242
|
+
subject: z.string().describe("Work item title"),
|
|
243
|
+
workitemTypeId: z.string().describe("Work item type ID"),
|
|
244
|
+
assignedTo: z.string().describe("Assignee user ID"),
|
|
245
|
+
customFieldValues: z.record(z.string()).optional().describe("Custom field values"),
|
|
246
|
+
description: z.string().optional().describe("Work item description"),
|
|
247
|
+
labels: z.array(z.string()).optional().describe("Associated label IDs"),
|
|
248
|
+
parentId: z.string().optional().describe("Parent work item ID"),
|
|
249
|
+
participants: z.array(z.string()).optional().describe("Participant user IDs"),
|
|
250
|
+
sprint: z.string().optional().describe("Associated sprint ID"),
|
|
251
|
+
trackers: z.array(z.string()).optional().describe("CC user IDs"),
|
|
252
|
+
verifier: z.string().optional().describe("Verifier user ID"),
|
|
253
|
+
versions: z.array(z.string()).optional().describe("Associated version IDs")
|
|
254
|
+
});
|
|
255
|
+
export const SearchWorkitemsSchema = z.object({
|
|
256
|
+
organizationId: z.string().describe("Organization ID"),
|
|
257
|
+
category: z.string().describe("Search for work item types, such as Req (requirement), Task (task), Bug (defect), etc., multiple values separated by commas"),
|
|
258
|
+
spaceId: z.string().describe("Project ID, project unique identifier"),
|
|
259
|
+
// Simplified search parameters
|
|
260
|
+
subject: z.string().nullable().optional().describe("Text contained in the title"),
|
|
261
|
+
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)"),
|
|
262
|
+
createdAfter: z.string().nullable().optional().describe("Created not earlier than, format: YYYY-MM-DD"),
|
|
263
|
+
createdBefore: z.string().nullable().optional().describe("Created not later than, format: YYYY-MM-DD"),
|
|
264
|
+
updatedAfter: z.string().nullable().optional().describe("Updated not earlier than, format: YYYY-MM-DD"),
|
|
265
|
+
updatedBefore: z.string().nullable().optional().describe("Updated not later than, format: YYYY-MM-DD"),
|
|
266
|
+
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"),
|
|
267
|
+
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"),
|
|
268
|
+
// Advanced parameters
|
|
269
|
+
advancedConditions: z.string().nullable().optional().describe("Advanced filter conditions, JSON format"),
|
|
270
|
+
orderBy: z.string().optional().default("gmtCreate").describe("Sort field, default is gmtCreate. Possible values: gmtCreate, subject, status, priority, assignedTo"),
|
|
271
|
+
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")
|
|
272
|
+
});
|
|
273
|
+
// Work item type related schemas
|
|
274
|
+
export const WorkItemTypeDetailSchema = z.object({
|
|
275
|
+
id: z.string().nullable().optional().describe("工作项类型ID"),
|
|
276
|
+
name: z.string().nullable().optional().describe("工作项类型名称"),
|
|
277
|
+
nameEn: z.string().nullable().optional().describe("工作项类型英文名称"),
|
|
278
|
+
category: z.string().nullable().optional().describe("工作项类型分类"),
|
|
279
|
+
description: z.string().nullable().optional().describe("工作项类型描述"),
|
|
280
|
+
icon: z.string().nullable().optional().describe("图标"),
|
|
281
|
+
color: z.string().nullable().optional().describe("颜色"),
|
|
282
|
+
enable: z.boolean().nullable().optional().describe("是否启用"),
|
|
283
|
+
defaultType: z.boolean().nullable().optional().describe("是否默认类型"),
|
|
284
|
+
systemDefault: z.boolean().nullable().optional().describe("是否系统默认"),
|
|
285
|
+
});
|
|
286
|
+
export const ListAllWorkItemTypesSchema = z.object({
|
|
287
|
+
organizationId: z.string().describe("企业ID,可在组织管理后台的基本信息页面获取"),
|
|
288
|
+
});
|
|
289
|
+
export const ListWorkItemTypesSchema = z.object({
|
|
290
|
+
organizationId: z.string().describe("企业ID,可在组织管理后台的基本信息页面获取"),
|
|
291
|
+
projectId: z.string().describe("项目唯一标识"),
|
|
292
|
+
category: z.string().optional().describe("工作项类型,可选值为 Req,Bug,Task 等。"),
|
|
293
|
+
});
|
|
294
|
+
export const GetWorkItemTypeSchema = z.object({
|
|
295
|
+
organizationId: z.string().describe("企业ID,可在组织管理后台的基本信息页面获取"),
|
|
296
|
+
id: z.string().describe("工作项类型ID"),
|
|
297
|
+
});
|
|
298
|
+
export const ListWorkItemRelationWorkItemTypesSchema = z.object({
|
|
299
|
+
organizationId: z.string().describe("企业ID,可在组织管理后台的基本信息页面获取"),
|
|
300
|
+
workItemTypeId: z.string().describe("工作项类型ID"),
|
|
301
|
+
relationType: z.enum(["PARENT", "SUB", "ASSOCIATED", "DEPEND_ON", "DEPENDED_BY"]).optional().describe("关联类型,可选值为 PARENT、SUB、ASSOCIATED,DEPEND_ON, DEPENDED_BY 分别对应父项,子项,关联项,依赖项,支撑项。"),
|
|
302
|
+
});
|
|
303
|
+
// Work item comment related schemas
|
|
304
|
+
export const ListWorkItemCommentsSchema = z.object({
|
|
305
|
+
organizationId: z.string().describe("企业ID,可在组织管理后台的基本信息页面获取"),
|
|
306
|
+
workItemId: z.string().describe("工作项ID"),
|
|
307
|
+
page: z.number().int().optional().default(1).describe("页码"),
|
|
308
|
+
perPage: z.number().int().optional().default(20).describe("每页条数"),
|
|
309
|
+
});
|
|
310
|
+
export const CreateWorkItemCommentSchema = z.object({
|
|
311
|
+
organizationId: z.string().describe("企业ID,可在组织管理后台的基本信息页面获取"),
|
|
312
|
+
workItemId: z.string().describe("工作项ID"),
|
|
313
|
+
content: z.string().describe("评论内容"),
|
|
314
|
+
});
|
|
315
|
+
// Work item type field configuration schemas
|
|
316
|
+
export const FieldOptionSchema = z.object({
|
|
317
|
+
id: z.string().nullable().optional().describe("选项ID"),
|
|
318
|
+
name: z.string().nullable().optional().describe("选项名称"),
|
|
319
|
+
value: z.string().nullable().optional().describe("选项值"),
|
|
320
|
+
});
|
|
321
|
+
export const WorkItemTypeFieldConfigSchema = z.object({
|
|
322
|
+
id: z.string().nullable().optional().describe("字段配置ID"),
|
|
323
|
+
workItemTypeId: z.string().nullable().optional().describe("工作项类型ID"),
|
|
324
|
+
fieldId: z.string().nullable().optional().describe("字段ID"),
|
|
325
|
+
fieldName: z.string().nullable().optional().describe("字段名称"),
|
|
326
|
+
fieldType: z.string().nullable().optional().describe("字段类型"),
|
|
327
|
+
required: z.boolean().nullable().optional().describe("是否必填"),
|
|
328
|
+
editable: z.boolean().nullable().optional().describe("是否可编辑"),
|
|
329
|
+
visible: z.boolean().nullable().optional().describe("是否可见"),
|
|
330
|
+
defaultValue: z.string().nullable().optional().describe("默认值"),
|
|
331
|
+
options: z.array(FieldOptionSchema).nullable().optional().describe("选项列表"),
|
|
332
|
+
});
|
|
333
|
+
// Workflow schemas
|
|
334
|
+
export const WorkflowStateSchema = z.object({
|
|
335
|
+
id: z.string().nullable().optional().describe("状态ID"),
|
|
336
|
+
name: z.string().nullable().optional().describe("状态名称"),
|
|
337
|
+
nameEn: z.string().nullable().optional().describe("状态英文名称"),
|
|
338
|
+
color: z.string().nullable().optional().describe("状态颜色"),
|
|
339
|
+
order: z.number().int().nullable().optional().describe("状态顺序"),
|
|
340
|
+
initialState: z.boolean().nullable().optional().describe("是否初始状态"),
|
|
341
|
+
finalState: z.boolean().nullable().optional().describe("是否最终状态"),
|
|
342
|
+
});
|
|
343
|
+
export const TransitionConditionSchema = z.object({
|
|
344
|
+
fieldId: z.string().nullable().optional().describe("字段ID"),
|
|
345
|
+
operator: z.string().nullable().optional().describe("操作符"),
|
|
346
|
+
value: z.string().nullable().optional().describe("值"),
|
|
347
|
+
});
|
|
348
|
+
export const WorkflowTransitionSchema = z.object({
|
|
349
|
+
id: z.string().nullable().optional().describe("转换ID"),
|
|
350
|
+
fromStateId: z.string().nullable().optional().describe("起始状态ID"),
|
|
351
|
+
toStateId: z.string().nullable().optional().describe("目标状态ID"),
|
|
352
|
+
name: z.string().nullable().optional().describe("转换名称"),
|
|
353
|
+
conditions: z.array(TransitionConditionSchema).nullable().optional().describe("转换条件列表"),
|
|
354
|
+
});
|
|
355
|
+
export const WorkItemWorkflowSchema = z.object({
|
|
356
|
+
id: z.string().nullable().optional().describe("工作流ID"),
|
|
357
|
+
name: z.string().nullable().optional().describe("工作流名称"),
|
|
358
|
+
workItemTypeId: z.string().nullable().optional().describe("工作项类型ID"),
|
|
359
|
+
states: z.array(WorkflowStateSchema).nullable().optional().describe("状态列表"),
|
|
360
|
+
transitions: z.array(WorkflowTransitionSchema).nullable().optional().describe("转换列表"),
|
|
361
|
+
});
|
|
362
|
+
export const GetWorkItemTypeFieldConfigSchema = z.object({
|
|
363
|
+
organizationId: z.string().describe("企业ID,可在组织管理后台的基本信息页面获取"),
|
|
364
|
+
projectId: z.string().describe("项目唯一标识"),
|
|
365
|
+
workItemTypeId: z.string().describe("工作项类型ID"),
|
|
366
|
+
});
|
|
367
|
+
export const GetWorkItemWorkflowSchema = z.object({
|
|
368
|
+
organizationId: z.string().describe("企业ID,可在组织管理后台的基本信息页面获取"),
|
|
369
|
+
projectId: z.string().describe("项目唯一标识"),
|
|
370
|
+
workItemTypeId: z.string().describe("工作项类型ID"),
|
|
371
|
+
});
|
|
372
|
+
// Update work item schemas
|
|
373
|
+
export const UpdateWorkItemFieldSchema = z.object({
|
|
374
|
+
subject: z.string().optional().describe("工作项标题"),
|
|
375
|
+
description: z.string().optional().describe("工作项描述"),
|
|
376
|
+
status: z.string().optional().describe("状态Id"),
|
|
377
|
+
assignedTo: z.string().optional().describe("指派人userId"),
|
|
378
|
+
priority: z.string().optional().describe("优先级Id"),
|
|
379
|
+
labels: z.array(z.string()).optional().describe("关联的标签id列表"),
|
|
380
|
+
sprint: z.string().optional().describe("关联的迭代Id"),
|
|
381
|
+
trackers: z.array(z.string()).optional().describe("抄送人userId列表"),
|
|
382
|
+
verifier: z.string().optional().describe("验证人userId"),
|
|
383
|
+
participants: z.array(z.string()).optional().describe("参与人userId列表"),
|
|
384
|
+
versions: z.array(z.string()).optional().describe("关联的版本Id列表"),
|
|
385
|
+
});
|
|
386
|
+
export const UpdateWorkItemSchema = z.object({
|
|
387
|
+
organizationId: z.string().describe("Organization ID"),
|
|
388
|
+
workItemId: z.string().describe("Work item ID"),
|
|
389
|
+
updateWorkItemFields: UpdateWorkItemFieldSchema
|
|
390
|
+
});
|