@structured-world/gitlab-mcp 6.7.0 → 6.9.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 -21
- package/LICENSE.MIT +21 -0
- package/README.md +182 -3
- package/dist/src/config.d.ts +6 -0
- package/dist/src/config.js +89 -1
- package/dist/src/config.js.map +1 -1
- package/dist/src/entities/core/registry.js +68 -63
- package/dist/src/entities/core/registry.js.map +1 -1
- package/dist/src/entities/core/schema-readonly.d.ts +93 -36
- package/dist/src/entities/core/schema-readonly.js +146 -121
- package/dist/src/entities/core/schema-readonly.js.map +1 -1
- package/dist/src/entities/core/schema.d.ts +33 -23
- package/dist/src/entities/core/schema.js +65 -60
- package/dist/src/entities/core/schema.js.map +1 -1
- package/dist/src/entities/files/registry.js +14 -21
- package/dist/src/entities/files/registry.js.map +1 -1
- package/dist/src/entities/files/schema-readonly.d.ts +8 -7
- package/dist/src/entities/files/schema-readonly.js +20 -25
- package/dist/src/entities/files/schema-readonly.js.map +1 -1
- package/dist/src/entities/files/schema.d.ts +22 -15
- package/dist/src/entities/files/schema.js +32 -73
- package/dist/src/entities/files/schema.js.map +1 -1
- package/dist/src/entities/integrations/index.d.ts +7 -0
- package/dist/src/entities/integrations/index.js +31 -0
- package/dist/src/entities/integrations/index.js.map +1 -0
- package/dist/src/entities/integrations/registry.d.ts +5 -0
- package/dist/src/entities/integrations/registry.js +120 -0
- package/dist/src/entities/integrations/registry.js.map +1 -0
- package/dist/src/entities/integrations/schema-readonly.d.ts +7 -0
- package/dist/src/entities/integrations/schema-readonly.js +10 -0
- package/dist/src/entities/integrations/schema-readonly.js.map +1 -0
- package/dist/src/entities/integrations/schema.d.ts +235 -0
- package/dist/src/entities/integrations/schema.js +112 -0
- package/dist/src/entities/integrations/schema.js.map +1 -0
- package/dist/src/entities/labels/registry.js +8 -7
- package/dist/src/entities/labels/registry.js.map +1 -1
- package/dist/src/entities/labels/schema-readonly.d.ts +8 -7
- package/dist/src/entities/labels/schema-readonly.js +20 -18
- package/dist/src/entities/labels/schema-readonly.js.map +1 -1
- package/dist/src/entities/labels/schema.d.ts +15 -8
- package/dist/src/entities/labels/schema.js +36 -27
- package/dist/src/entities/labels/schema.js.map +1 -1
- package/dist/src/entities/milestones/registry.js +7 -8
- package/dist/src/entities/milestones/registry.js.map +1 -1
- package/dist/src/entities/milestones/schema-readonly.d.ts +25 -10
- package/dist/src/entities/milestones/schema-readonly.js +47 -26
- package/dist/src/entities/milestones/schema-readonly.js.map +1 -1
- package/dist/src/entities/milestones/schema.d.ts +19 -9
- package/dist/src/entities/milestones/schema.js +31 -20
- package/dist/src/entities/milestones/schema.js.map +1 -1
- package/dist/src/entities/mrs/registry.js +75 -79
- package/dist/src/entities/mrs/registry.js.map +1 -1
- package/dist/src/entities/mrs/schema-readonly.d.ts +36 -23
- package/dist/src/entities/mrs/schema-readonly.js +197 -338
- package/dist/src/entities/mrs/schema-readonly.js.map +1 -1
- package/dist/src/entities/mrs/schema.d.ts +113 -37
- package/dist/src/entities/mrs/schema.js +140 -258
- package/dist/src/entities/mrs/schema.js.map +1 -1
- package/dist/src/entities/pipelines/registry.js +10 -4
- package/dist/src/entities/pipelines/registry.js.map +1 -1
- package/dist/src/entities/pipelines/schema-readonly.d.ts +30 -14
- package/dist/src/entities/pipelines/schema-readonly.js +62 -52
- package/dist/src/entities/pipelines/schema-readonly.js.map +1 -1
- package/dist/src/entities/pipelines/schema.d.ts +23 -16
- package/dist/src/entities/pipelines/schema.js +44 -26
- package/dist/src/entities/pipelines/schema.js.map +1 -1
- package/dist/src/entities/snippets/registry.js +79 -67
- package/dist/src/entities/snippets/registry.js.map +1 -1
- package/dist/src/entities/snippets/schema-readonly.d.ts +8 -9
- package/dist/src/entities/snippets/schema-readonly.js +30 -35
- package/dist/src/entities/snippets/schema-readonly.js.map +1 -1
- package/dist/src/entities/snippets/schema.d.ts +7 -11
- package/dist/src/entities/snippets/schema.js +31 -65
- package/dist/src/entities/snippets/schema.js.map +1 -1
- package/dist/src/entities/variables/registry.js +9 -5
- package/dist/src/entities/variables/registry.js.map +1 -1
- package/dist/src/entities/variables/schema-readonly.d.ts +9 -9
- package/dist/src/entities/variables/schema-readonly.js +22 -18
- package/dist/src/entities/variables/schema-readonly.js.map +1 -1
- package/dist/src/entities/variables/schema.d.ts +24 -7
- package/dist/src/entities/variables/schema.js +67 -38
- package/dist/src/entities/variables/schema.js.map +1 -1
- package/dist/src/entities/webhooks/registry.js +48 -46
- package/dist/src/entities/webhooks/registry.js.map +1 -1
- package/dist/src/entities/webhooks/schema-readonly.d.ts +9 -8
- package/dist/src/entities/webhooks/schema-readonly.js +14 -9
- package/dist/src/entities/webhooks/schema-readonly.js.map +1 -1
- package/dist/src/entities/webhooks/schema.d.ts +79 -26
- package/dist/src/entities/webhooks/schema.js +70 -61
- package/dist/src/entities/webhooks/schema.js.map +1 -1
- package/dist/src/entities/wiki/registry.js +7 -4
- package/dist/src/entities/wiki/registry.js.map +1 -1
- package/dist/src/entities/wiki/schema-readonly.d.ts +7 -7
- package/dist/src/entities/wiki/schema-readonly.js +11 -15
- package/dist/src/entities/wiki/schema-readonly.js.map +1 -1
- package/dist/src/entities/wiki/schema.d.ts +19 -8
- package/dist/src/entities/wiki/schema.js +32 -29
- package/dist/src/entities/wiki/schema.js.map +1 -1
- package/dist/src/entities/workitems/registry.js +7 -8
- package/dist/src/entities/workitems/registry.js.map +1 -1
- package/dist/src/entities/workitems/schema-readonly.d.ts +7 -8
- package/dist/src/entities/workitems/schema-readonly.js +12 -14
- package/dist/src/entities/workitems/schema-readonly.js.map +1 -1
- package/dist/src/entities/workitems/schema.d.ts +17 -11
- package/dist/src/entities/workitems/schema.js +25 -25
- package/dist/src/entities/workitems/schema.js.map +1 -1
- package/dist/src/registry-manager.js +32 -11
- package/dist/src/registry-manager.js.map +1 -1
- package/dist/src/utils/schema-utils.d.ts +28 -0
- package/dist/src/utils/schema-utils.js +244 -0
- package/dist/src/utils/schema-utils.js.map +1 -0
- package/dist/structured-world-gitlab-mcp-6.9.0.tgz +0 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/structured-world-gitlab-mcp-6.7.0.tgz +0 -0
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const BrowseMergeRequestsSchema: z.ZodObject<{
|
|
3
|
-
action: z.
|
|
4
|
-
diffs: "diffs";
|
|
5
|
-
list: "list";
|
|
6
|
-
get: "get";
|
|
7
|
-
compare: "compare";
|
|
8
|
-
}>;
|
|
2
|
+
export declare const BrowseMergeRequestsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
action: z.ZodLiteral<"list">;
|
|
9
4
|
project_id: z.ZodOptional<z.ZodCoercedString<unknown>>;
|
|
10
|
-
merge_request_iid: z.ZodOptional<z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>>;
|
|
11
|
-
include_diverged_commits_count: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
12
|
-
include_rebase_in_progress: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
13
|
-
branch_name: z.ZodOptional<z.ZodString>;
|
|
14
|
-
from: z.ZodOptional<z.ZodString>;
|
|
15
|
-
to: z.ZodOptional<z.ZodString>;
|
|
16
|
-
straight: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
17
5
|
state: z.ZodOptional<z.ZodEnum<{
|
|
18
6
|
all: "all";
|
|
19
7
|
closed: "closed";
|
|
@@ -85,18 +73,43 @@ export declare const BrowseMergeRequestsSchema: z.ZodObject<{
|
|
|
85
73
|
min_access_level: z.ZodOptional<z.ZodNumber>;
|
|
86
74
|
per_page: z.ZodOptional<z.ZodNumber>;
|
|
87
75
|
page: z.ZodOptional<z.ZodNumber>;
|
|
88
|
-
}, z.core.$
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
76
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
77
|
+
action: z.ZodLiteral<"get">;
|
|
78
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
79
|
+
merge_request_iid: z.ZodOptional<z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>>;
|
|
80
|
+
branch_name: z.ZodOptional<z.ZodString>;
|
|
81
|
+
include_diverged_commits_count: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
82
|
+
include_rebase_in_progress: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
83
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
84
|
+
action: z.ZodLiteral<"diffs">;
|
|
85
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
86
|
+
merge_request_iid: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
87
|
+
include_diverged_commits_count: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
88
|
+
include_rebase_in_progress: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
89
|
+
per_page: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
92
|
+
action: z.ZodLiteral<"compare">;
|
|
93
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
94
|
+
from: z.ZodString;
|
|
95
|
+
to: z.ZodString;
|
|
96
|
+
straight: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
97
|
+
}, z.core.$loose>], "action">;
|
|
98
|
+
export declare const BrowseMrDiscussionsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
99
|
+
action: z.ZodLiteral<"list">;
|
|
95
100
|
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
96
101
|
merge_request_iid: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
97
|
-
draft_note_id: z.ZodOptional<z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>>;
|
|
98
102
|
per_page: z.ZodOptional<z.ZodNumber>;
|
|
99
103
|
page: z.ZodOptional<z.ZodNumber>;
|
|
100
|
-
}, z.core.$strip
|
|
104
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
105
|
+
action: z.ZodLiteral<"drafts">;
|
|
106
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
107
|
+
merge_request_iid: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
108
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
109
|
+
action: z.ZodLiteral<"draft">;
|
|
110
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
111
|
+
merge_request_iid: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
112
|
+
draft_note_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
113
|
+
}, z.core.$strip>], "action">;
|
|
101
114
|
export type BrowseMergeRequestsInput = z.infer<typeof BrowseMergeRequestsSchema>;
|
|
102
115
|
export type BrowseMrDiscussionsInput = z.infer<typeof BrowseMrDiscussionsSchema>;
|
|
@@ -3,368 +3,227 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BrowseMrDiscussionsSchema = exports.BrowseMergeRequestsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const utils_1 = require("../utils");
|
|
6
|
-
|
|
6
|
+
const projectIdField = utils_1.requiredId.describe("Project ID or URL-encoded path");
|
|
7
|
+
const mergeRequestIidField = utils_1.requiredId.describe("Internal MR ID unique to project");
|
|
8
|
+
const includeDivergedCommitsCountField = utils_1.flexibleBoolean
|
|
9
|
+
.optional()
|
|
10
|
+
.describe("Include count of commits the source branch is behind target");
|
|
11
|
+
const includeRebaseInProgressField = utils_1.flexibleBoolean
|
|
12
|
+
.optional()
|
|
13
|
+
.describe("Check if MR is currently being rebased");
|
|
14
|
+
const NotFilterSchema = zod_1.z
|
|
7
15
|
.object({
|
|
8
|
-
|
|
16
|
+
labels: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
17
|
+
milestone: zod_1.z.string().optional(),
|
|
18
|
+
author_id: zod_1.z.number().optional(),
|
|
19
|
+
author_username: zod_1.z.string().optional(),
|
|
20
|
+
assignee_id: zod_1.z.number().optional(),
|
|
21
|
+
assignee_username: zod_1.z.string().optional(),
|
|
22
|
+
my_reaction_emoji: zod_1.z.string().optional(),
|
|
23
|
+
})
|
|
24
|
+
.describe("Exclusion filters");
|
|
25
|
+
const ListMergeRequestsSchema = zod_1.z
|
|
26
|
+
.object({
|
|
27
|
+
action: zod_1.z.literal("list").describe("List merge requests with filtering"),
|
|
9
28
|
project_id: zod_1.z.coerce
|
|
10
29
|
.string()
|
|
11
30
|
.optional()
|
|
12
|
-
.describe("Project ID or URL-encoded path.
|
|
13
|
-
merge_request_iid: utils_1.requiredId
|
|
14
|
-
.optional()
|
|
15
|
-
.describe("Internal MR ID unique to project. Required for 'diffs'. For 'get': required unless branch_name provided."),
|
|
16
|
-
include_diverged_commits_count: utils_1.flexibleBoolean
|
|
17
|
-
.optional()
|
|
18
|
-
.describe("Include count of commits the source branch is behind target. For 'get'/'diffs'."),
|
|
19
|
-
include_rebase_in_progress: utils_1.flexibleBoolean
|
|
20
|
-
.optional()
|
|
21
|
-
.describe("Check if MR is currently being rebased. For 'get'/'diffs'."),
|
|
22
|
-
branch_name: zod_1.z
|
|
23
|
-
.string()
|
|
24
|
-
.optional()
|
|
25
|
-
.describe("Find MR by its source branch name. For 'get' action only."),
|
|
26
|
-
from: zod_1.z
|
|
27
|
-
.string()
|
|
28
|
-
.optional()
|
|
29
|
-
.describe("Source reference: branch name or commit SHA. Required for 'compare' action."),
|
|
30
|
-
to: zod_1.z
|
|
31
|
-
.string()
|
|
32
|
-
.optional()
|
|
33
|
-
.describe("Target reference: branch name or commit SHA. Required for 'compare' action."),
|
|
34
|
-
straight: utils_1.flexibleBoolean
|
|
35
|
-
.optional()
|
|
36
|
-
.describe("true=straight diff, false=three-way diff from common ancestor. For 'compare' action."),
|
|
31
|
+
.describe("Project ID or URL-encoded path. Optional for cross-project search."),
|
|
37
32
|
state: zod_1.z
|
|
38
33
|
.enum(["opened", "closed", "locked", "merged", "all"])
|
|
39
34
|
.optional()
|
|
40
|
-
.describe("MR state filter
|
|
35
|
+
.describe("MR state filter"),
|
|
41
36
|
order_by: zod_1.z
|
|
42
37
|
.enum(["created_at", "updated_at", "title", "priority"])
|
|
43
38
|
.optional()
|
|
44
|
-
.describe("Sort field
|
|
45
|
-
sort: zod_1.z.enum(["asc", "desc"]).optional().describe("Sort direction
|
|
46
|
-
milestone: zod_1.z
|
|
47
|
-
|
|
48
|
-
.optional()
|
|
49
|
-
.describe('Filter by milestone title. Use "None" or "Any". For \'list\' action.'),
|
|
50
|
-
view: zod_1.z
|
|
51
|
-
.enum(["simple", "full"])
|
|
52
|
-
.optional()
|
|
53
|
-
.describe("Response detail level. For 'list' action."),
|
|
39
|
+
.describe("Sort field"),
|
|
40
|
+
sort: zod_1.z.enum(["asc", "desc"]).optional().describe("Sort direction"),
|
|
41
|
+
milestone: zod_1.z.string().optional().describe('Filter by milestone title. Use "None" or "Any".'),
|
|
42
|
+
view: zod_1.z.enum(["simple", "full"]).optional().describe("Response detail level"),
|
|
54
43
|
labels: zod_1.z
|
|
55
44
|
.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())])
|
|
56
45
|
.optional()
|
|
57
|
-
.describe("Filter by labels
|
|
58
|
-
with_labels_details: utils_1.flexibleBoolean
|
|
59
|
-
.optional()
|
|
60
|
-
.describe("Return full label objects. For 'list' action."),
|
|
46
|
+
.describe("Filter by labels"),
|
|
47
|
+
with_labels_details: utils_1.flexibleBoolean.optional().describe("Return full label objects"),
|
|
61
48
|
with_merge_status_recheck: utils_1.flexibleBoolean
|
|
62
49
|
.optional()
|
|
63
|
-
.describe("Trigger async recheck of merge status
|
|
64
|
-
created_after: zod_1.z
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
author_id: zod_1.z.number().optional().describe("Filter by author's user ID. For 'list' action."),
|
|
85
|
-
author_username: zod_1.z
|
|
86
|
-
.string()
|
|
87
|
-
.optional()
|
|
88
|
-
.describe("Filter by author's username. For 'list' action."),
|
|
89
|
-
assignee_id: zod_1.z.number().optional().describe("Filter by assignee's user ID. For 'list' action."),
|
|
90
|
-
assignee_username: zod_1.z
|
|
91
|
-
.string()
|
|
92
|
-
.optional()
|
|
93
|
-
.describe("Filter by assignee's username. For 'list' action."),
|
|
94
|
-
my_reaction_emoji: zod_1.z
|
|
95
|
-
.string()
|
|
96
|
-
.optional()
|
|
97
|
-
.describe("Filter MRs you've reacted to. For 'list' action."),
|
|
98
|
-
source_branch: zod_1.z.string().optional().describe("Filter by source branch. For 'list' action."),
|
|
99
|
-
target_branch: zod_1.z.string().optional().describe("Filter by target branch. For 'list' action."),
|
|
100
|
-
search: zod_1.z.string().optional().describe("Text search in title/description. For 'list' action."),
|
|
101
|
-
in: zod_1.z
|
|
102
|
-
.enum(["title", "description", "title,description"])
|
|
103
|
-
.optional()
|
|
104
|
-
.describe("Search scope. For 'list' action."),
|
|
105
|
-
wip: zod_1.z.enum(["yes", "no"]).optional().describe("Draft/WIP filter. For 'list' action."),
|
|
106
|
-
not: zod_1.z
|
|
107
|
-
.object({
|
|
108
|
-
labels: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
109
|
-
milestone: zod_1.z.string().optional(),
|
|
110
|
-
author_id: zod_1.z.number().optional(),
|
|
111
|
-
author_username: zod_1.z.string().optional(),
|
|
112
|
-
assignee_id: zod_1.z.number().optional(),
|
|
113
|
-
assignee_username: zod_1.z.string().optional(),
|
|
114
|
-
my_reaction_emoji: zod_1.z.string().optional(),
|
|
115
|
-
})
|
|
116
|
-
.optional()
|
|
117
|
-
.describe("Exclusion filters. For 'list' action."),
|
|
118
|
-
environment: zod_1.z
|
|
119
|
-
.string()
|
|
120
|
-
.optional()
|
|
121
|
-
.describe("Filter by deployment environment. For 'list' action."),
|
|
122
|
-
deployed_before: zod_1.z
|
|
123
|
-
.string()
|
|
124
|
-
.optional()
|
|
125
|
-
.describe("Filter MRs deployed before. For 'list' action."),
|
|
126
|
-
deployed_after: zod_1.z.string().optional().describe("Filter MRs deployed after. For 'list' action."),
|
|
127
|
-
approved_by_ids: zod_1.z
|
|
128
|
-
.array(zod_1.z.string())
|
|
129
|
-
.optional()
|
|
130
|
-
.describe("Filter MRs approved by user IDs. For 'list' action."),
|
|
50
|
+
.describe("Trigger async recheck of merge status"),
|
|
51
|
+
created_after: zod_1.z.string().optional().describe("Filter MRs created after (ISO 8601)"),
|
|
52
|
+
created_before: zod_1.z.string().optional().describe("Filter MRs created before (ISO 8601)"),
|
|
53
|
+
updated_after: zod_1.z.string().optional().describe("Filter MRs modified after (ISO 8601)"),
|
|
54
|
+
updated_before: zod_1.z.string().optional().describe("Filter MRs modified before (ISO 8601)"),
|
|
55
|
+
scope: zod_1.z.enum(["created_by_me", "assigned_to_me", "all"]).optional().describe("Filter scope"),
|
|
56
|
+
author_id: zod_1.z.number().optional().describe("Filter by author's user ID"),
|
|
57
|
+
author_username: zod_1.z.string().optional().describe("Filter by author's username"),
|
|
58
|
+
assignee_id: zod_1.z.number().optional().describe("Filter by assignee's user ID"),
|
|
59
|
+
assignee_username: zod_1.z.string().optional().describe("Filter by assignee's username"),
|
|
60
|
+
my_reaction_emoji: zod_1.z.string().optional().describe("Filter MRs you've reacted to"),
|
|
61
|
+
source_branch: zod_1.z.string().optional().describe("Filter by source branch"),
|
|
62
|
+
target_branch: zod_1.z.string().optional().describe("Filter by target branch"),
|
|
63
|
+
search: zod_1.z.string().optional().describe("Text search in title/description"),
|
|
64
|
+
in: zod_1.z.enum(["title", "description", "title,description"]).optional().describe("Search scope"),
|
|
65
|
+
wip: zod_1.z.enum(["yes", "no"]).optional().describe("Draft/WIP filter"),
|
|
66
|
+
not: NotFilterSchema.optional(),
|
|
67
|
+
environment: zod_1.z.string().optional().describe("Filter by deployment environment"),
|
|
68
|
+
deployed_before: zod_1.z.string().optional().describe("Filter MRs deployed before"),
|
|
69
|
+
deployed_after: zod_1.z.string().optional().describe("Filter MRs deployed after"),
|
|
70
|
+
approved_by_ids: zod_1.z.array(zod_1.z.string()).optional().describe("Filter MRs approved by user IDs"),
|
|
131
71
|
approved_by_usernames: zod_1.z
|
|
132
72
|
.array(zod_1.z.string())
|
|
133
73
|
.optional()
|
|
134
|
-
.describe("Filter MRs approved by usernames
|
|
135
|
-
reviewer_id: zod_1.z.number().optional().describe("Filter by reviewer user ID
|
|
136
|
-
reviewer_username: zod_1.z
|
|
137
|
-
.string()
|
|
138
|
-
.optional()
|
|
139
|
-
.describe("Filter by reviewer username. For 'list' action."),
|
|
74
|
+
.describe("Filter MRs approved by usernames"),
|
|
75
|
+
reviewer_id: zod_1.z.number().optional().describe("Filter by reviewer user ID"),
|
|
76
|
+
reviewer_username: zod_1.z.string().optional().describe("Filter by reviewer username"),
|
|
140
77
|
with_api_entity_associations: utils_1.flexibleBoolean
|
|
141
78
|
.optional()
|
|
142
|
-
.describe("Include extra API associations
|
|
143
|
-
min_access_level: zod_1.z
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
.describe("Minimum access level filter (10-50). For 'list' action."),
|
|
147
|
-
per_page: zod_1.z
|
|
148
|
-
.number()
|
|
149
|
-
.optional()
|
|
150
|
-
.describe("Number of items per page. For 'list'/'diffs' actions."),
|
|
151
|
-
page: zod_1.z.number().optional().describe("Page number. For 'list'/'diffs' actions."),
|
|
79
|
+
.describe("Include extra API associations"),
|
|
80
|
+
min_access_level: zod_1.z.number().optional().describe("Minimum access level filter (10-50)"),
|
|
81
|
+
per_page: zod_1.z.number().optional().describe("Number of items per page"),
|
|
82
|
+
page: zod_1.z.number().optional().describe("Page number"),
|
|
152
83
|
})
|
|
153
|
-
.
|
|
154
|
-
|
|
155
|
-
|
|
84
|
+
.passthrough();
|
|
85
|
+
const GetMergeRequestByIidSchema = zod_1.z
|
|
86
|
+
.object({
|
|
87
|
+
action: zod_1.z.literal("get").describe("Get single MR by IID or branch name"),
|
|
88
|
+
project_id: projectIdField,
|
|
89
|
+
merge_request_iid: mergeRequestIidField
|
|
90
|
+
.optional()
|
|
91
|
+
.describe("Internal MR ID. Required unless branch_name provided."),
|
|
92
|
+
branch_name: zod_1.z.string().optional().describe("Find MR by its source branch name"),
|
|
93
|
+
include_diverged_commits_count: includeDivergedCommitsCountField,
|
|
94
|
+
include_rebase_in_progress: includeRebaseInProgressField,
|
|
156
95
|
})
|
|
157
|
-
.
|
|
158
|
-
|
|
159
|
-
|
|
96
|
+
.passthrough();
|
|
97
|
+
const DiffsMergeRequestSchema = zod_1.z
|
|
98
|
+
.object({
|
|
99
|
+
action: zod_1.z.literal("diffs").describe("Get file changes/diffs for an MR"),
|
|
100
|
+
project_id: projectIdField,
|
|
101
|
+
merge_request_iid: mergeRequestIidField,
|
|
102
|
+
include_diverged_commits_count: includeDivergedCommitsCountField,
|
|
103
|
+
include_rebase_in_progress: includeRebaseInProgressField,
|
|
104
|
+
per_page: zod_1.z.number().optional().describe("Number of items per page"),
|
|
105
|
+
page: zod_1.z.number().optional().describe("Page number"),
|
|
106
|
+
})
|
|
107
|
+
.passthrough();
|
|
108
|
+
const CompareMergeRequestSchema = zod_1.z
|
|
109
|
+
.object({
|
|
110
|
+
action: zod_1.z.literal("compare").describe("Compare two branches or commits"),
|
|
111
|
+
project_id: projectIdField,
|
|
112
|
+
from: zod_1.z.string().describe("Source reference: branch name or commit SHA"),
|
|
113
|
+
to: zod_1.z.string().describe("Target reference: branch name or commit SHA"),
|
|
114
|
+
straight: utils_1.flexibleBoolean
|
|
115
|
+
.optional()
|
|
116
|
+
.describe("true=straight diff, false=three-way diff from common ancestor"),
|
|
117
|
+
})
|
|
118
|
+
.passthrough();
|
|
119
|
+
const BrowseMergeRequestsBaseSchema = zod_1.z.discriminatedUnion("action", [
|
|
120
|
+
ListMergeRequestsSchema,
|
|
121
|
+
GetMergeRequestByIidSchema,
|
|
122
|
+
DiffsMergeRequestSchema,
|
|
123
|
+
CompareMergeRequestSchema,
|
|
124
|
+
]);
|
|
125
|
+
const listOnlyFields = [
|
|
126
|
+
"state",
|
|
127
|
+
"order_by",
|
|
128
|
+
"sort",
|
|
129
|
+
"milestone",
|
|
130
|
+
"view",
|
|
131
|
+
"labels",
|
|
132
|
+
"with_labels_details",
|
|
133
|
+
"with_merge_status_recheck",
|
|
134
|
+
"created_after",
|
|
135
|
+
"created_before",
|
|
136
|
+
"updated_after",
|
|
137
|
+
"updated_before",
|
|
138
|
+
"scope",
|
|
139
|
+
"author_id",
|
|
140
|
+
"author_username",
|
|
141
|
+
"assignee_id",
|
|
142
|
+
"assignee_username",
|
|
143
|
+
"my_reaction_emoji",
|
|
144
|
+
"source_branch",
|
|
145
|
+
"target_branch",
|
|
146
|
+
"search",
|
|
147
|
+
"in",
|
|
148
|
+
"wip",
|
|
149
|
+
"not",
|
|
150
|
+
"environment",
|
|
151
|
+
"deployed_before",
|
|
152
|
+
"deployed_after",
|
|
153
|
+
"approved_by_ids",
|
|
154
|
+
"approved_by_usernames",
|
|
155
|
+
"reviewer_id",
|
|
156
|
+
"reviewer_username",
|
|
157
|
+
"with_api_entity_associations",
|
|
158
|
+
"min_access_level",
|
|
159
|
+
];
|
|
160
|
+
const compareOnlyFields = ["from", "to", "straight"];
|
|
161
|
+
const getOnlyFields = ["merge_request_iid", "branch_name"];
|
|
162
|
+
exports.BrowseMergeRequestsSchema = BrowseMergeRequestsBaseSchema.refine(data => {
|
|
163
|
+
if (data.action === "get") {
|
|
164
|
+
return data.merge_request_iid !== undefined || data.branch_name !== undefined;
|
|
165
|
+
}
|
|
166
|
+
return true;
|
|
167
|
+
}, {
|
|
160
168
|
message: "Either merge_request_iid or branch_name must be provided for 'get' action",
|
|
161
169
|
path: ["merge_request_iid"],
|
|
162
|
-
})
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
})
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
path: ["to"],
|
|
198
|
-
})
|
|
199
|
-
.refine(data => data.action === "compare" || data.straight === undefined, {
|
|
200
|
-
message: "straight is only valid for 'compare' action",
|
|
201
|
-
path: ["straight"],
|
|
202
|
-
})
|
|
203
|
-
.refine(data => data.action === "list" || data.state === undefined, {
|
|
204
|
-
message: "state is only valid for 'list' action",
|
|
205
|
-
path: ["state"],
|
|
206
|
-
})
|
|
207
|
-
.refine(data => data.action === "list" || data.order_by === undefined, {
|
|
208
|
-
message: "order_by is only valid for 'list' action",
|
|
209
|
-
path: ["order_by"],
|
|
210
|
-
})
|
|
211
|
-
.refine(data => data.action === "list" || data.sort === undefined, {
|
|
212
|
-
message: "sort is only valid for 'list' action",
|
|
213
|
-
path: ["sort"],
|
|
214
|
-
})
|
|
215
|
-
.refine(data => data.action === "list" || data.milestone === undefined, {
|
|
216
|
-
message: "milestone is only valid for 'list' action",
|
|
217
|
-
path: ["milestone"],
|
|
218
|
-
})
|
|
219
|
-
.refine(data => data.action === "list" || data.view === undefined, {
|
|
220
|
-
message: "view is only valid for 'list' action",
|
|
221
|
-
path: ["view"],
|
|
222
|
-
})
|
|
223
|
-
.refine(data => data.action === "list" || data.labels === undefined, {
|
|
224
|
-
message: "labels is only valid for 'list' action",
|
|
225
|
-
path: ["labels"],
|
|
226
|
-
})
|
|
227
|
-
.refine(data => data.action === "list" || data.with_labels_details === undefined, {
|
|
228
|
-
message: "with_labels_details is only valid for 'list' action",
|
|
229
|
-
path: ["with_labels_details"],
|
|
230
|
-
})
|
|
231
|
-
.refine(data => data.action === "list" || data.with_merge_status_recheck === undefined, {
|
|
232
|
-
message: "with_merge_status_recheck is only valid for 'list' action",
|
|
233
|
-
path: ["with_merge_status_recheck"],
|
|
234
|
-
})
|
|
235
|
-
.refine(data => data.action === "list" || data.created_after === undefined, {
|
|
236
|
-
message: "created_after is only valid for 'list' action",
|
|
237
|
-
path: ["created_after"],
|
|
238
|
-
})
|
|
239
|
-
.refine(data => data.action === "list" || data.created_before === undefined, {
|
|
240
|
-
message: "created_before is only valid for 'list' action",
|
|
241
|
-
path: ["created_before"],
|
|
242
|
-
})
|
|
243
|
-
.refine(data => data.action === "list" || data.updated_after === undefined, {
|
|
244
|
-
message: "updated_after is only valid for 'list' action",
|
|
245
|
-
path: ["updated_after"],
|
|
246
|
-
})
|
|
247
|
-
.refine(data => data.action === "list" || data.updated_before === undefined, {
|
|
248
|
-
message: "updated_before is only valid for 'list' action",
|
|
249
|
-
path: ["updated_before"],
|
|
250
|
-
})
|
|
251
|
-
.refine(data => data.action === "list" || data.scope === undefined, {
|
|
252
|
-
message: "scope is only valid for 'list' action",
|
|
253
|
-
path: ["scope"],
|
|
254
|
-
})
|
|
255
|
-
.refine(data => data.action === "list" || data.author_id === undefined, {
|
|
256
|
-
message: "author_id is only valid for 'list' action",
|
|
257
|
-
path: ["author_id"],
|
|
258
|
-
})
|
|
259
|
-
.refine(data => data.action === "list" || data.author_username === undefined, {
|
|
260
|
-
message: "author_username is only valid for 'list' action",
|
|
261
|
-
path: ["author_username"],
|
|
262
|
-
})
|
|
263
|
-
.refine(data => data.action === "list" || data.assignee_id === undefined, {
|
|
264
|
-
message: "assignee_id is only valid for 'list' action",
|
|
265
|
-
path: ["assignee_id"],
|
|
266
|
-
})
|
|
267
|
-
.refine(data => data.action === "list" || data.assignee_username === undefined, {
|
|
268
|
-
message: "assignee_username is only valid for 'list' action",
|
|
269
|
-
path: ["assignee_username"],
|
|
270
|
-
})
|
|
271
|
-
.refine(data => data.action === "list" || data.my_reaction_emoji === undefined, {
|
|
272
|
-
message: "my_reaction_emoji is only valid for 'list' action",
|
|
273
|
-
path: ["my_reaction_emoji"],
|
|
274
|
-
})
|
|
275
|
-
.refine(data => data.action === "list" || data.source_branch === undefined, {
|
|
276
|
-
message: "source_branch is only valid for 'list' action",
|
|
277
|
-
path: ["source_branch"],
|
|
278
|
-
})
|
|
279
|
-
.refine(data => data.action === "list" || data.target_branch === undefined, {
|
|
280
|
-
message: "target_branch is only valid for 'list' action",
|
|
281
|
-
path: ["target_branch"],
|
|
282
|
-
})
|
|
283
|
-
.refine(data => data.action === "list" || data.search === undefined, {
|
|
284
|
-
message: "search is only valid for 'list' action",
|
|
285
|
-
path: ["search"],
|
|
286
|
-
})
|
|
287
|
-
.refine(data => data.action === "list" || data.in === undefined, {
|
|
288
|
-
message: "in is only valid for 'list' action",
|
|
289
|
-
path: ["in"],
|
|
290
|
-
})
|
|
291
|
-
.refine(data => data.action === "list" || data.wip === undefined, {
|
|
292
|
-
message: "wip is only valid for 'list' action",
|
|
293
|
-
path: ["wip"],
|
|
294
|
-
})
|
|
295
|
-
.refine(data => data.action === "list" || data.not === undefined, {
|
|
296
|
-
message: "not is only valid for 'list' action",
|
|
297
|
-
path: ["not"],
|
|
298
|
-
})
|
|
299
|
-
.refine(data => data.action === "list" || data.environment === undefined, {
|
|
300
|
-
message: "environment is only valid for 'list' action",
|
|
301
|
-
path: ["environment"],
|
|
302
|
-
})
|
|
303
|
-
.refine(data => data.action === "list" || data.deployed_before === undefined, {
|
|
304
|
-
message: "deployed_before is only valid for 'list' action",
|
|
305
|
-
path: ["deployed_before"],
|
|
306
|
-
})
|
|
307
|
-
.refine(data => data.action === "list" || data.deployed_after === undefined, {
|
|
308
|
-
message: "deployed_after is only valid for 'list' action",
|
|
309
|
-
path: ["deployed_after"],
|
|
310
|
-
})
|
|
311
|
-
.refine(data => data.action === "list" || data.approved_by_ids === undefined, {
|
|
312
|
-
message: "approved_by_ids is only valid for 'list' action",
|
|
313
|
-
path: ["approved_by_ids"],
|
|
314
|
-
})
|
|
315
|
-
.refine(data => data.action === "list" || data.approved_by_usernames === undefined, {
|
|
316
|
-
message: "approved_by_usernames is only valid for 'list' action",
|
|
317
|
-
path: ["approved_by_usernames"],
|
|
318
|
-
})
|
|
319
|
-
.refine(data => data.action === "list" || data.reviewer_id === undefined, {
|
|
320
|
-
message: "reviewer_id is only valid for 'list' action",
|
|
321
|
-
path: ["reviewer_id"],
|
|
322
|
-
})
|
|
323
|
-
.refine(data => data.action === "list" || data.reviewer_username === undefined, {
|
|
324
|
-
message: "reviewer_username is only valid for 'list' action",
|
|
325
|
-
path: ["reviewer_username"],
|
|
326
|
-
})
|
|
327
|
-
.refine(data => data.action === "list" || data.with_api_entity_associations === undefined, {
|
|
328
|
-
message: "with_api_entity_associations is only valid for 'list' action",
|
|
329
|
-
path: ["with_api_entity_associations"],
|
|
330
|
-
})
|
|
331
|
-
.refine(data => data.action === "list" || data.min_access_level === undefined, {
|
|
332
|
-
message: "min_access_level is only valid for 'list' action",
|
|
333
|
-
path: ["min_access_level"],
|
|
334
|
-
})
|
|
335
|
-
.refine(data => ["list", "diffs"].includes(data.action) || data.per_page === undefined, {
|
|
336
|
-
message: "per_page is only valid for 'list' and 'diffs' actions",
|
|
337
|
-
path: ["per_page"],
|
|
338
|
-
})
|
|
339
|
-
.refine(data => ["list", "diffs"].includes(data.action) || data.page === undefined, {
|
|
340
|
-
message: "page is only valid for 'list' and 'diffs' actions",
|
|
341
|
-
path: ["page"],
|
|
170
|
+
}).superRefine((data, ctx) => {
|
|
171
|
+
const input = data;
|
|
172
|
+
if (data.action !== "list") {
|
|
173
|
+
for (const field of listOnlyFields) {
|
|
174
|
+
if (field in input && input[field] !== undefined) {
|
|
175
|
+
ctx.addIssue({
|
|
176
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
177
|
+
message: `'${field}' is only valid for 'list' action`,
|
|
178
|
+
path: [field],
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
if (data.action !== "compare") {
|
|
184
|
+
for (const field of compareOnlyFields) {
|
|
185
|
+
if (field in input && input[field] !== undefined) {
|
|
186
|
+
ctx.addIssue({
|
|
187
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
188
|
+
message: `'${field}' is only valid for 'compare' action`,
|
|
189
|
+
path: [field],
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (data.action === "list") {
|
|
195
|
+
for (const field of getOnlyFields) {
|
|
196
|
+
if (field in input && input[field] !== undefined) {
|
|
197
|
+
ctx.addIssue({
|
|
198
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
199
|
+
message: `'${field}' is only valid for 'get' action`,
|
|
200
|
+
path: [field],
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
342
205
|
});
|
|
343
|
-
|
|
344
|
-
.
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
path: ["draft_note_id"],
|
|
361
|
-
})
|
|
362
|
-
.refine(data => data.action === "list" || data.per_page === undefined, {
|
|
363
|
-
message: "per_page is only valid for 'list' action",
|
|
364
|
-
path: ["per_page"],
|
|
365
|
-
})
|
|
366
|
-
.refine(data => data.action === "list" || data.page === undefined, {
|
|
367
|
-
message: "page is only valid for 'list' action",
|
|
368
|
-
path: ["page"],
|
|
206
|
+
const ListMrDiscussionsSchema = zod_1.z.object({
|
|
207
|
+
action: zod_1.z.literal("list").describe("List all discussion threads on an MR"),
|
|
208
|
+
project_id: projectIdField,
|
|
209
|
+
merge_request_iid: mergeRequestIidField,
|
|
210
|
+
per_page: zod_1.z.number().optional().describe("Number of items per page"),
|
|
211
|
+
page: zod_1.z.number().optional().describe("Page number"),
|
|
212
|
+
});
|
|
213
|
+
const ListDraftNotesSchema = zod_1.z.object({
|
|
214
|
+
action: zod_1.z.literal("drafts").describe("List unpublished draft notes on an MR"),
|
|
215
|
+
project_id: projectIdField,
|
|
216
|
+
merge_request_iid: mergeRequestIidField,
|
|
217
|
+
});
|
|
218
|
+
const GetDraftNoteSchema = zod_1.z.object({
|
|
219
|
+
action: zod_1.z.literal("draft").describe("Get single draft note details"),
|
|
220
|
+
project_id: projectIdField,
|
|
221
|
+
merge_request_iid: mergeRequestIidField,
|
|
222
|
+
draft_note_id: utils_1.requiredId.describe("Unique identifier of the draft note"),
|
|
369
223
|
});
|
|
224
|
+
exports.BrowseMrDiscussionsSchema = zod_1.z.discriminatedUnion("action", [
|
|
225
|
+
ListMrDiscussionsSchema,
|
|
226
|
+
ListDraftNotesSchema,
|
|
227
|
+
GetDraftNoteSchema,
|
|
228
|
+
]);
|
|
370
229
|
//# sourceMappingURL=schema-readonly.js.map
|