@structured-world/gitlab-mcp 6.2.3 → 6.3.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/dist/src/entities/milestones/registry.js +77 -125
- package/dist/src/entities/milestones/registry.js.map +1 -1
- package/dist/src/entities/milestones/schema-readonly.d.ts +11 -27
- package/dist/src/entities/milestones/schema-readonly.js +22 -18
- package/dist/src/entities/milestones/schema-readonly.js.map +1 -1
- package/dist/src/entities/milestones/schema.d.ts +9 -21
- package/dist/src/entities/milestones/schema.js +21 -21
- package/dist/src/entities/milestones/schema.js.map +1 -1
- package/dist/structured-world-gitlab-mcp-6.3.0.tgz +0 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/structured-world-gitlab-mcp-6.2.3.tgz +0 -0
|
@@ -42,147 +42,99 @@ const schema_readonly_1 = require("./schema-readonly");
|
|
|
42
42
|
const schema_1 = require("./schema");
|
|
43
43
|
const gitlab_api_1 = require("../../utils/gitlab-api");
|
|
44
44
|
const namespace_1 = require("../../utils/namespace");
|
|
45
|
+
const utils_1 = require("../utils");
|
|
45
46
|
exports.milestonesToolRegistry = new Map([
|
|
46
47
|
[
|
|
47
|
-
"
|
|
48
|
+
"browse_milestones",
|
|
48
49
|
{
|
|
49
|
-
name: "
|
|
50
|
-
description:
|
|
51
|
-
inputSchema: z.toJSONSchema(schema_readonly_1.
|
|
50
|
+
name: "browse_milestones",
|
|
51
|
+
description: 'BROWSE milestones. Actions: "list" shows milestones with filtering, "get" retrieves single milestone, "issues" lists issues in milestone, "merge_requests" lists MRs in milestone, "burndown" gets burndown chart data.',
|
|
52
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.BrowseMilestonesSchema),
|
|
52
53
|
handler: async (args) => {
|
|
53
|
-
const
|
|
54
|
-
const { entityType, encodedPath } = await (0, namespace_1.resolveNamespaceForAPI)(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"get_milestone_merge_requests",
|
|
89
|
-
{
|
|
90
|
-
name: "get_milestone_merge_requests",
|
|
91
|
-
description: "List merge requests scheduled for a milestone. Use to track feature completion, review code changes for release, or identify pending work. Shows MR status, approvals, and pipeline status. Critical for release readiness assessment.",
|
|
92
|
-
inputSchema: z.toJSONSchema(schema_readonly_1.GetMilestoneMergeRequestsSchema),
|
|
93
|
-
handler: async (args) => {
|
|
94
|
-
const options = schema_readonly_1.GetMilestoneMergeRequestsSchema.parse(args);
|
|
95
|
-
const { entityType, encodedPath } = await (0, namespace_1.resolveNamespaceForAPI)(options.namespace);
|
|
96
|
-
return gitlab_api_1.gitlab.get(`${entityType}/${encodedPath}/milestones/${options.milestone_id}/merge_requests`, { query: (0, gitlab_api_1.toQuery)(options, ["namespace", "milestone_id"]) });
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
[
|
|
101
|
-
"get_milestone_burndown_events",
|
|
102
|
-
{
|
|
103
|
-
name: "get_milestone_burndown_events",
|
|
104
|
-
description: "Track milestone progress with burndown chart data. Use for agile metrics, velocity tracking, and sprint analysis. Returns time-series events showing work completion rate. Premium/Ultimate feature for advanced project analytics.",
|
|
105
|
-
inputSchema: z.toJSONSchema(schema_readonly_1.GetMilestoneBurndownEventsSchema),
|
|
106
|
-
handler: async (args) => {
|
|
107
|
-
const options = schema_readonly_1.GetMilestoneBurndownEventsSchema.parse(args);
|
|
108
|
-
const { entityType, encodedPath } = await (0, namespace_1.resolveNamespaceForAPI)(options.namespace);
|
|
109
|
-
return gitlab_api_1.gitlab.get(`${entityType}/${encodedPath}/milestones/${options.milestone_id}/burndown_events`, { query: (0, gitlab_api_1.toQuery)(options, ["namespace", "milestone_id"]) });
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
],
|
|
113
|
-
[
|
|
114
|
-
"create_milestone",
|
|
115
|
-
{
|
|
116
|
-
name: "create_milestone",
|
|
117
|
-
description: "Define a new release milestone or sprint cycle. Use to establish delivery targets, organize work phases, or plan releases. Set title, description, start/due dates. Group milestones coordinate releases across multiple projects.",
|
|
118
|
-
inputSchema: z.toJSONSchema(schema_1.CreateProjectMilestoneSchema),
|
|
119
|
-
handler: async (args) => {
|
|
120
|
-
const options = schema_1.CreateProjectMilestoneSchema.parse(args);
|
|
121
|
-
const { entityType, encodedPath } = await (0, namespace_1.resolveNamespaceForAPI)(options.namespace);
|
|
122
|
-
const { namespace: _namespace, ...body } = options;
|
|
123
|
-
return gitlab_api_1.gitlab.post(`${entityType}/${encodedPath}/milestones`, {
|
|
124
|
-
body,
|
|
125
|
-
contentType: "json",
|
|
126
|
-
});
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
],
|
|
130
|
-
[
|
|
131
|
-
"edit_milestone",
|
|
132
|
-
{
|
|
133
|
-
name: "edit_milestone",
|
|
134
|
-
description: "Update milestone properties like dates, description, or state. Use to adjust release schedules, extend sprints, or close completed milestones. Changes apply immediately to all associated issues and MRs.",
|
|
135
|
-
inputSchema: z.toJSONSchema(schema_1.EditProjectMilestoneSchema),
|
|
136
|
-
handler: async (args) => {
|
|
137
|
-
const options = schema_1.EditProjectMilestoneSchema.parse(args);
|
|
138
|
-
const { entityType, encodedPath } = await (0, namespace_1.resolveNamespaceForAPI)(options.namespace);
|
|
139
|
-
const { namespace: _namespace, milestone_id, ...body } = options;
|
|
140
|
-
return gitlab_api_1.gitlab.put(`${entityType}/${encodedPath}/milestones/${milestone_id}`, {
|
|
141
|
-
body,
|
|
142
|
-
contentType: "json",
|
|
143
|
-
});
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
],
|
|
147
|
-
[
|
|
148
|
-
"delete_milestone",
|
|
149
|
-
{
|
|
150
|
-
name: "delete_milestone",
|
|
151
|
-
description: "Remove a milestone permanently. Use to clean up cancelled releases or obsolete milestones. Warning: removes milestone association from all issues and MRs. Consider closing instead of deleting for historical tracking.",
|
|
152
|
-
inputSchema: z.toJSONSchema(schema_1.DeleteProjectMilestoneSchema),
|
|
153
|
-
handler: async (args) => {
|
|
154
|
-
const options = schema_1.DeleteProjectMilestoneSchema.parse(args);
|
|
155
|
-
const { entityType, encodedPath } = await (0, namespace_1.resolveNamespaceForAPI)(options.namespace);
|
|
156
|
-
await gitlab_api_1.gitlab.delete(`${entityType}/${encodedPath}/milestones/${options.milestone_id}`);
|
|
157
|
-
return { deleted: true };
|
|
54
|
+
const input = schema_readonly_1.BrowseMilestonesSchema.parse(args);
|
|
55
|
+
const { entityType, encodedPath } = await (0, namespace_1.resolveNamespaceForAPI)(input.namespace);
|
|
56
|
+
switch (input.action) {
|
|
57
|
+
case "list": {
|
|
58
|
+
const { action: _action, namespace: _namespace, ...rest } = input;
|
|
59
|
+
const query = (0, gitlab_api_1.toQuery)(rest, []);
|
|
60
|
+
return gitlab_api_1.gitlab.get(`${entityType}/${encodedPath}/milestones`, { query });
|
|
61
|
+
}
|
|
62
|
+
case "get": {
|
|
63
|
+
(0, utils_1.assertDefined)(input.milestone_id, "milestone_id");
|
|
64
|
+
return gitlab_api_1.gitlab.get(`${entityType}/${encodedPath}/milestones/${input.milestone_id}`);
|
|
65
|
+
}
|
|
66
|
+
case "issues": {
|
|
67
|
+
(0, utils_1.assertDefined)(input.milestone_id, "milestone_id");
|
|
68
|
+
const { action: _action, namespace: _namespace, milestone_id, ...rest } = input;
|
|
69
|
+
const query = (0, gitlab_api_1.toQuery)(rest, []);
|
|
70
|
+
return gitlab_api_1.gitlab.get(`${entityType}/${encodedPath}/milestones/${milestone_id}/issues`, {
|
|
71
|
+
query,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
case "merge_requests": {
|
|
75
|
+
(0, utils_1.assertDefined)(input.milestone_id, "milestone_id");
|
|
76
|
+
const { action: _action, namespace: _namespace, milestone_id, ...rest } = input;
|
|
77
|
+
const query = (0, gitlab_api_1.toQuery)(rest, []);
|
|
78
|
+
return gitlab_api_1.gitlab.get(`${entityType}/${encodedPath}/milestones/${milestone_id}/merge_requests`, { query });
|
|
79
|
+
}
|
|
80
|
+
case "burndown": {
|
|
81
|
+
(0, utils_1.assertDefined)(input.milestone_id, "milestone_id");
|
|
82
|
+
const { action: _action, namespace: _namespace, milestone_id, ...rest } = input;
|
|
83
|
+
const query = (0, gitlab_api_1.toQuery)(rest, []);
|
|
84
|
+
return gitlab_api_1.gitlab.get(`${entityType}/${encodedPath}/milestones/${milestone_id}/burndown_events`, { query });
|
|
85
|
+
}
|
|
86
|
+
default:
|
|
87
|
+
throw new Error(`Unknown action: ${input.action}`);
|
|
88
|
+
}
|
|
158
89
|
},
|
|
159
90
|
},
|
|
160
91
|
],
|
|
161
92
|
[
|
|
162
|
-
"
|
|
93
|
+
"manage_milestone",
|
|
163
94
|
{
|
|
164
|
-
name: "
|
|
165
|
-
description:
|
|
166
|
-
inputSchema: z.toJSONSchema(schema_1.
|
|
95
|
+
name: "manage_milestone",
|
|
96
|
+
description: 'MANAGE milestones. Actions: "create" creates new milestone, "update" modifies existing milestone, "delete" removes milestone, "promote" elevates project milestone to group level.',
|
|
97
|
+
inputSchema: z.toJSONSchema(schema_1.ManageMilestoneSchema),
|
|
167
98
|
handler: async (args) => {
|
|
168
|
-
const
|
|
169
|
-
const { entityType, encodedPath } = await (0, namespace_1.resolveNamespaceForAPI)(
|
|
170
|
-
|
|
171
|
-
|
|
99
|
+
const input = schema_1.ManageMilestoneSchema.parse(args);
|
|
100
|
+
const { entityType, encodedPath } = await (0, namespace_1.resolveNamespaceForAPI)(input.namespace);
|
|
101
|
+
switch (input.action) {
|
|
102
|
+
case "create": {
|
|
103
|
+
const { action: _action, namespace: _namespace, ...body } = input;
|
|
104
|
+
return gitlab_api_1.gitlab.post(`${entityType}/${encodedPath}/milestones`, {
|
|
105
|
+
body,
|
|
106
|
+
contentType: "json",
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
case "update": {
|
|
110
|
+
(0, utils_1.assertDefined)(input.milestone_id, "milestone_id");
|
|
111
|
+
const { action: _action, namespace: _namespace, milestone_id, ...body } = input;
|
|
112
|
+
return gitlab_api_1.gitlab.put(`${entityType}/${encodedPath}/milestones/${milestone_id}`, {
|
|
113
|
+
body,
|
|
114
|
+
contentType: "json",
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
case "delete": {
|
|
118
|
+
(0, utils_1.assertDefined)(input.milestone_id, "milestone_id");
|
|
119
|
+
await gitlab_api_1.gitlab.delete(`${entityType}/${encodedPath}/milestones/${input.milestone_id}`);
|
|
120
|
+
return { deleted: true };
|
|
121
|
+
}
|
|
122
|
+
case "promote": {
|
|
123
|
+
(0, utils_1.assertDefined)(input.milestone_id, "milestone_id");
|
|
124
|
+
if (entityType !== "projects") {
|
|
125
|
+
throw new Error("Milestone promotion is only available for projects, not groups");
|
|
126
|
+
}
|
|
127
|
+
return gitlab_api_1.gitlab.post(`projects/${encodedPath}/milestones/${encodeURIComponent(input.milestone_id)}/promote`);
|
|
128
|
+
}
|
|
129
|
+
default:
|
|
130
|
+
throw new Error(`Unknown action: ${input.action}`);
|
|
172
131
|
}
|
|
173
|
-
return gitlab_api_1.gitlab.post(`projects/${encodedPath}/milestones/${encodeURIComponent(options.milestone_id)}/promote`);
|
|
174
132
|
},
|
|
175
133
|
},
|
|
176
134
|
],
|
|
177
135
|
]);
|
|
178
136
|
function getMilestonesReadOnlyToolNames() {
|
|
179
|
-
return [
|
|
180
|
-
"list_milestones",
|
|
181
|
-
"get_milestone",
|
|
182
|
-
"get_milestone_issue",
|
|
183
|
-
"get_milestone_merge_requests",
|
|
184
|
-
"get_milestone_burndown_events",
|
|
185
|
-
];
|
|
137
|
+
return ["browse_milestones"];
|
|
186
138
|
}
|
|
187
139
|
function getMilestonesToolDefinitions() {
|
|
188
140
|
return Array.from(exports.milestonesToolRegistry.values());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/entities/milestones/registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/entities/milestones/registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0JA,wEAEC;AAKD,oEAEC;AAKD,gEAUC;AAlLD,uCAAyB;AACzB,uDAA2D;AAC3D,qCAAiD;AACjD,uDAAyD;AACzD,qDAA+D;AAE/D,oCAAyC;AAQ5B,QAAA,sBAAsB,GAAiB,IAAI,GAAG,CAAiC;IAI1F;QACE,mBAAmB;QACnB;YACE,IAAI,EAAE,mBAAmB;YACzB,WAAW,EACT,yNAAyN;YAC3N,WAAW,EAAE,CAAC,CAAC,YAAY,CAAC,wCAAsB,CAAC;YACnD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;gBAC/B,MAAM,KAAK,GAAG,wCAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBACjD,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,MAAM,IAAA,kCAAsB,EAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBAElF,QAAQ,KAAK,CAAC,MAAM,EAAE,CAAC;oBACrB,KAAK,MAAM,CAAC,CAAC,CAAC;wBACZ,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;wBAClE,MAAM,KA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AKD,SAAgB,4BAA4B;IAC1C,OAAO,KAAK,CAAC,IAAI,CAAC,8BAAsB,CAAC,MAAM,EAAE,CAAC,CAAC;AACrD,CAAC;AAKD,SAAgB,0BAA0B,CACxC,eAAwB,KAAK;IAE7B,IAAI,YAAY,EAAE,CAAC;QACjB,MAAM,aAAa,GAAG,8BAA8B,EAAE,CAAC;QACvD,OAAO,KAAK,CAAC,IAAI,CAAC,8BAAsB,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAC/D,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAClC,CAAC;IACJ,CAAC;IACD,OAAO,4BAA4B,EAAE,CAAC;AACxC,CAAC"}
|
|
@@ -15,8 +15,16 @@ export declare const GitLabMilestonesSchema: z.ZodObject<{
|
|
|
15
15
|
expired: z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>;
|
|
16
16
|
web_url: z.ZodOptional<z.ZodString>;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const BrowseMilestonesSchema: z.ZodObject<{
|
|
19
|
+
action: z.ZodEnum<{
|
|
20
|
+
issues: "issues";
|
|
21
|
+
merge_requests: "merge_requests";
|
|
22
|
+
list: "list";
|
|
23
|
+
get: "get";
|
|
24
|
+
burndown: "burndown";
|
|
25
|
+
}>;
|
|
19
26
|
namespace: z.ZodString;
|
|
27
|
+
milestone_id: z.ZodOptional<z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>>;
|
|
20
28
|
iids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
21
29
|
state: z.ZodOptional<z.ZodEnum<{
|
|
22
30
|
closed: "closed";
|
|
@@ -27,32 +35,8 @@ export declare const ListProjectMilestonesSchema: z.ZodObject<{
|
|
|
27
35
|
include_ancestors: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
28
36
|
updated_before: z.ZodOptional<z.ZodString>;
|
|
29
37
|
updated_after: z.ZodOptional<z.ZodString>;
|
|
38
|
+
per_page: z.ZodOptional<z.ZodNumber>;
|
|
30
39
|
page: z.ZodOptional<z.ZodNumber>;
|
|
31
|
-
per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
32
|
-
}, z.core.$strip>;
|
|
33
|
-
export declare const GetProjectMilestoneSchema: z.ZodObject<{
|
|
34
|
-
namespace: z.ZodString;
|
|
35
|
-
milestone_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
36
|
-
}, z.core.$strip>;
|
|
37
|
-
export declare const GetMilestoneIssuesSchema: z.ZodObject<{
|
|
38
|
-
namespace: z.ZodString;
|
|
39
|
-
milestone_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
40
|
-
}, z.core.$strip>;
|
|
41
|
-
export declare const GetMilestoneMergeRequestsSchema: z.ZodObject<{
|
|
42
|
-
namespace: z.ZodString;
|
|
43
|
-
milestone_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
44
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
45
|
-
per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
46
|
-
}, z.core.$strip>;
|
|
47
|
-
export declare const GetMilestoneBurndownEventsSchema: z.ZodObject<{
|
|
48
|
-
namespace: z.ZodString;
|
|
49
|
-
milestone_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
50
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
51
|
-
per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
52
40
|
}, z.core.$strip>;
|
|
41
|
+
export type BrowseMilestonesInput = z.infer<typeof BrowseMilestonesSchema>;
|
|
53
42
|
export type GitLabMilestones = z.infer<typeof GitLabMilestonesSchema>;
|
|
54
|
-
export type ListProjectMilestonesOptions = z.infer<typeof ListProjectMilestonesSchema>;
|
|
55
|
-
export type GetProjectMilestoneOptions = z.infer<typeof GetProjectMilestoneSchema>;
|
|
56
|
-
export type GetMilestoneIssuesOptions = z.infer<typeof GetMilestoneIssuesSchema>;
|
|
57
|
-
export type GetMilestoneMergeRequestsOptions = z.infer<typeof GetMilestoneMergeRequestsSchema>;
|
|
58
|
-
export type GetMilestoneBurndownEventsOptions = z.infer<typeof GetMilestoneBurndownEventsSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.BrowseMilestonesSchema = exports.GitLabMilestonesSchema = exports.GitLabMilestoneSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const shared_1 = require("../shared");
|
|
6
6
|
Object.defineProperty(exports, "GitLabMilestoneSchema", { enumerable: true, get: function () { return shared_1.GitLabMilestoneSchema; } });
|
|
@@ -19,42 +19,46 @@ exports.GitLabMilestonesSchema = zod_1.z.object({
|
|
|
19
19
|
expired: utils_1.flexibleBoolean,
|
|
20
20
|
web_url: zod_1.z.string().optional(),
|
|
21
21
|
});
|
|
22
|
-
exports.
|
|
22
|
+
exports.BrowseMilestonesSchema = zod_1.z
|
|
23
23
|
.object({
|
|
24
|
-
|
|
24
|
+
action: zod_1.z
|
|
25
|
+
.enum(["list", "get", "issues", "merge_requests", "burndown"])
|
|
26
|
+
.describe("Action to perform"),
|
|
27
|
+
namespace: zod_1.z.string().describe("Namespace path (group or project)"),
|
|
28
|
+
milestone_id: utils_1.requiredId
|
|
29
|
+
.optional()
|
|
30
|
+
.describe("The ID of a project or group milestone. Required for 'get', 'issues', 'merge_requests', 'burndown' actions."),
|
|
25
31
|
iids: zod_1.z
|
|
26
32
|
.array(zod_1.z.string())
|
|
27
33
|
.optional()
|
|
28
|
-
.describe("
|
|
34
|
+
.describe("For 'list': return only the milestones having the given iid"),
|
|
29
35
|
state: zod_1.z
|
|
30
36
|
.enum(["active", "closed"])
|
|
31
37
|
.optional()
|
|
32
|
-
.describe("
|
|
38
|
+
.describe("For 'list': return only active or closed milestones"),
|
|
33
39
|
title: zod_1.z
|
|
34
40
|
.string()
|
|
35
41
|
.optional()
|
|
36
|
-
.describe("
|
|
42
|
+
.describe("For 'list': return only milestones with a title matching the provided string"),
|
|
37
43
|
search: zod_1.z
|
|
38
44
|
.string()
|
|
39
45
|
.optional()
|
|
40
|
-
.describe("
|
|
41
|
-
include_ancestors: utils_1.flexibleBoolean.optional().describe("
|
|
46
|
+
.describe("For 'list': return only milestones with a title or description matching the provided string"),
|
|
47
|
+
include_ancestors: utils_1.flexibleBoolean.optional().describe("For 'list': include ancestor groups"),
|
|
42
48
|
updated_before: zod_1.z
|
|
43
49
|
.string()
|
|
44
50
|
.optional()
|
|
45
|
-
.describe("
|
|
51
|
+
.describe("For 'list': return milestones updated before the specified date (ISO 8601 format)"),
|
|
46
52
|
updated_after: zod_1.z
|
|
47
53
|
.string()
|
|
48
54
|
.optional()
|
|
49
|
-
.describe("
|
|
55
|
+
.describe("For 'list': return milestones updated after the specified date (ISO 8601 format)"),
|
|
56
|
+
per_page: zod_1.z.number().optional().describe("Number of items per page"),
|
|
57
|
+
page: zod_1.z.number().optional().describe("Page number"),
|
|
50
58
|
})
|
|
51
|
-
.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
.refine(data => !["get", "issues", "merge_requests", "burndown"].includes(data.action) ||
|
|
60
|
+
data.milestone_id !== undefined, {
|
|
61
|
+
message: "milestone_id is required for 'get', 'issues', 'merge_requests', and 'burndown' actions",
|
|
62
|
+
path: ["milestone_id"],
|
|
55
63
|
});
|
|
56
|
-
exports.GetProjectMilestoneSchema = GetProjectMilestoneBaseSchema;
|
|
57
|
-
exports.GetMilestoneIssuesSchema = exports.GetProjectMilestoneSchema;
|
|
58
|
-
exports.GetMilestoneMergeRequestsSchema = GetProjectMilestoneBaseSchema.merge(shared_1.PaginationOptionsSchema);
|
|
59
|
-
exports.GetMilestoneBurndownEventsSchema = GetProjectMilestoneBaseSchema.merge(shared_1.PaginationOptionsSchema);
|
|
60
64
|
//# sourceMappingURL=schema-readonly.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-readonly.js","sourceRoot":"","sources":["../../../../src/entities/milestones/schema-readonly.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"schema-readonly.js","sourceRoot":"","sources":["../../../../src/entities/milestones/schema-readonly.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sCAAkD;AAIzC,sGAJA,8BAAqB,OAIA;AAH9B,oCAAuD;AAM1C,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,EAAE,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IACrB,GAAG,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IAC7B,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,OAAO,EAAE,uBAAe;IACxB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AASU,QAAA,sBAAsB,GAAG,OAAC;KACpC,MAAM,CAAC;IACN,MAAM,EAAE,OAAC;SACN,IAAI,CAAC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,QAAQ,EAAE,gBAAgB,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;IACtE,IAAI,CAAC,YAAY,KAAK,SAAS,EACjC;IACE,OAAO,EACL,wFAAwF;IAC1F,IAAI,EAAE,CAAC,cAAc,CAAC;CACvB,CACF,CAAC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const ManageMilestoneSchema: z.ZodObject<{
|
|
3
|
+
action: z.ZodEnum<{
|
|
4
|
+
create: "create";
|
|
5
|
+
update: "update";
|
|
6
|
+
delete: "delete";
|
|
7
|
+
promote: "promote";
|
|
8
|
+
}>;
|
|
3
9
|
namespace: z.ZodString;
|
|
4
|
-
|
|
5
|
-
description: z.ZodOptional<z.ZodString>;
|
|
6
|
-
due_date: z.ZodOptional<z.ZodString>;
|
|
7
|
-
start_date: z.ZodOptional<z.ZodString>;
|
|
8
|
-
}, z.core.$strip>;
|
|
9
|
-
export declare const EditProjectMilestoneSchema: z.ZodObject<{
|
|
10
|
-
namespace: z.ZodString;
|
|
11
|
-
milestone_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
10
|
+
milestone_id: z.ZodOptional<z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>>;
|
|
12
11
|
title: z.ZodOptional<z.ZodString>;
|
|
13
12
|
description: z.ZodOptional<z.ZodString>;
|
|
14
13
|
due_date: z.ZodOptional<z.ZodString>;
|
|
@@ -18,15 +17,4 @@ export declare const EditProjectMilestoneSchema: z.ZodObject<{
|
|
|
18
17
|
activate: "activate";
|
|
19
18
|
}>>>;
|
|
20
19
|
}, z.core.$strip>;
|
|
21
|
-
export
|
|
22
|
-
namespace: z.ZodString;
|
|
23
|
-
milestone_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
24
|
-
}, z.core.$strip>;
|
|
25
|
-
export declare const PromoteProjectMilestoneSchema: z.ZodObject<{
|
|
26
|
-
namespace: z.ZodString;
|
|
27
|
-
milestone_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
28
|
-
}, z.core.$strip>;
|
|
29
|
-
export type CreateProjectMilestoneOptions = z.infer<typeof CreateProjectMilestoneSchema>;
|
|
30
|
-
export type EditProjectMilestoneOptions = z.infer<typeof EditProjectMilestoneSchema>;
|
|
31
|
-
export type DeleteProjectMilestoneOptions = z.infer<typeof DeleteProjectMilestoneSchema>;
|
|
32
|
-
export type PromoteProjectMilestoneOptions = z.infer<typeof PromoteProjectMilestoneSchema>;
|
|
20
|
+
export type ManageMilestoneInput = z.infer<typeof ManageMilestoneSchema>;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ManageMilestoneSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const utils_1 = require("../utils");
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
exports.ManageMilestoneSchema = zod_1.z
|
|
7
|
+
.object({
|
|
8
|
+
action: zod_1.z.enum(["create", "update", "delete", "promote"]).describe("Action to perform"),
|
|
9
|
+
namespace: zod_1.z.string().describe("Namespace path (group or project)"),
|
|
10
|
+
milestone_id: utils_1.requiredId
|
|
11
|
+
.optional()
|
|
12
|
+
.describe("The ID of a project or group milestone. Required for 'update', 'delete', 'promote' actions."),
|
|
13
|
+
title: zod_1.z
|
|
14
|
+
.string()
|
|
15
|
+
.optional()
|
|
16
|
+
.describe("The title of the milestone. Required for 'create' action."),
|
|
17
17
|
description: zod_1.z.string().optional().describe("The description of the milestone"),
|
|
18
18
|
due_date: zod_1.z.string().optional().describe("The due date of the milestone (YYYY-MM-DD)"),
|
|
19
19
|
start_date: zod_1.z.string().optional().describe("The start date of the milestone (YYYY-MM-DD)"),
|
|
@@ -22,14 +22,14 @@ exports.EditProjectMilestoneSchema = zod_1.z.object({
|
|
|
22
22
|
.transform(val => val.toLowerCase())
|
|
23
23
|
.pipe(zod_1.z.enum(["close", "activate"]))
|
|
24
24
|
.optional()
|
|
25
|
-
.describe("
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
.describe("For 'update': the state event of the milestone (close or activate)"),
|
|
26
|
+
})
|
|
27
|
+
.refine(data => !["update", "delete", "promote"].includes(data.action) || data.milestone_id !== undefined, {
|
|
28
|
+
message: "milestone_id is required for 'update', 'delete', and 'promote' actions",
|
|
29
|
+
path: ["milestone_id"],
|
|
30
|
+
})
|
|
31
|
+
.refine(data => data.action !== "create" || data.title !== undefined, {
|
|
32
|
+
message: "title is required for 'create' action",
|
|
33
|
+
path: ["title"],
|
|
34
34
|
});
|
|
35
35
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/entities/milestones/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,oCAAsC;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/entities/milestones/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,oCAAsC;AASzB,QAAA,qBAAqB,GAAG,OAAC;KACnC,MAAM,CAAC;IACN,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IACvF,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,C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