@opentabs-dev/opentabs-plugin-gitlab 0.0.74
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/adapter.iife.js +15367 -0
- package/dist/adapter.iife.js.map +7 -0
- package/dist/gitlab-api.d.ts +13 -0
- package/dist/gitlab-api.d.ts.map +1 -0
- package/dist/gitlab-api.js +114 -0
- package/dist/gitlab-api.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +70 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/create-issue.d.ts +27 -0
- package/dist/tools/create-issue.d.ts.map +1 -0
- package/dist/tools/create-issue.js +43 -0
- package/dist/tools/create-issue.js.map +1 -0
- package/dist/tools/create-merge-request.d.ts +32 -0
- package/dist/tools/create-merge-request.d.ts.map +1 -0
- package/dist/tools/create-merge-request.js +52 -0
- package/dist/tools/create-merge-request.js.map +1 -0
- package/dist/tools/create-note.d.ts +20 -0
- package/dist/tools/create-note.d.ts.map +1 -0
- package/dist/tools/create-note.js +26 -0
- package/dist/tools/create-note.js.map +1 -0
- package/dist/tools/get-file-content.d.ts +10 -0
- package/dist/tools/get-file-content.d.ts.map +1 -0
- package/dist/tools/get-file-content.js +33 -0
- package/dist/tools/get-file-content.js.map +1 -0
- package/dist/tools/get-issue.d.ts +22 -0
- package/dist/tools/get-issue.d.ts.map +1 -0
- package/dist/tools/get-issue.js +24 -0
- package/dist/tools/get-issue.js.map +1 -0
- package/dist/tools/get-job-log.d.ts +8 -0
- package/dist/tools/get-job-log.d.ts.map +1 -0
- package/dist/tools/get-job-log.js +23 -0
- package/dist/tools/get-job-log.js.map +1 -0
- package/dist/tools/get-merge-request-diff.d.ts +15 -0
- package/dist/tools/get-merge-request-diff.d.ts.map +1 -0
- package/dist/tools/get-merge-request-diff.js +41 -0
- package/dist/tools/get-merge-request-diff.js.map +1 -0
- package/dist/tools/get-merge-request.d.ts +24 -0
- package/dist/tools/get-merge-request.d.ts.map +1 -0
- package/dist/tools/get-merge-request.js +24 -0
- package/dist/tools/get-merge-request.js.map +1 -0
- package/dist/tools/get-project.d.ts +21 -0
- package/dist/tools/get-project.d.ts.map +1 -0
- package/dist/tools/get-project.js +23 -0
- package/dist/tools/get-project.js.map +1 -0
- package/dist/tools/get-user-profile.d.ts +17 -0
- package/dist/tools/get-user-profile.d.ts.map +1 -0
- package/dist/tools/get-user-profile.js +29 -0
- package/dist/tools/get-user-profile.js.map +1 -0
- package/dist/tools/list-branches.d.ts +16 -0
- package/dist/tools/list-branches.d.ts.map +1 -0
- package/dist/tools/list-branches.js +32 -0
- package/dist/tools/list-branches.js.map +1 -0
- package/dist/tools/list-commits.d.ts +22 -0
- package/dist/tools/list-commits.d.ts.map +1 -0
- package/dist/tools/list-commits.js +41 -0
- package/dist/tools/list-commits.js.map +1 -0
- package/dist/tools/list-issues.d.ts +40 -0
- package/dist/tools/list-issues.d.ts.map +1 -0
- package/dist/tools/list-issues.js +49 -0
- package/dist/tools/list-issues.js.map +1 -0
- package/dist/tools/list-merge-requests.d.ts +46 -0
- package/dist/tools/list-merge-requests.d.ts.map +1 -0
- package/dist/tools/list-merge-requests.js +56 -0
- package/dist/tools/list-merge-requests.js.map +1 -0
- package/dist/tools/list-notes.d.ts +29 -0
- package/dist/tools/list-notes.d.ts.map +1 -0
- package/dist/tools/list-notes.js +35 -0
- package/dist/tools/list-notes.js.map +1 -0
- package/dist/tools/list-pipeline-jobs.d.ts +20 -0
- package/dist/tools/list-pipeline-jobs.d.ts.map +1 -0
- package/dist/tools/list-pipeline-jobs.js +30 -0
- package/dist/tools/list-pipeline-jobs.js.map +1 -0
- package/dist/tools/list-pipelines.d.ts +42 -0
- package/dist/tools/list-pipelines.d.ts.map +1 -0
- package/dist/tools/list-pipelines.js +47 -0
- package/dist/tools/list-pipelines.js.map +1 -0
- package/dist/tools/list-projects.d.ts +42 -0
- package/dist/tools/list-projects.d.ts.map +1 -0
- package/dist/tools/list-projects.js +47 -0
- package/dist/tools/list-projects.js.map +1 -0
- package/dist/tools/merge-merge-request.d.ts +28 -0
- package/dist/tools/merge-merge-request.d.ts.map +1 -0
- package/dist/tools/merge-merge-request.js +37 -0
- package/dist/tools/merge-merge-request.js.map +1 -0
- package/dist/tools/schemas.d.ts +326 -0
- package/dist/tools/schemas.d.ts.map +1 -0
- package/dist/tools/schemas.js +213 -0
- package/dist/tools/schemas.js.map +1 -0
- package/dist/tools/search-projects.d.ts +35 -0
- package/dist/tools/search-projects.d.ts.map +1 -0
- package/dist/tools/search-projects.js +37 -0
- package/dist/tools/search-projects.js.map +1 -0
- package/dist/tools/update-issue.d.ts +32 -0
- package/dist/tools/update-issue.d.ts.map +1 -0
- package/dist/tools/update-issue.js +46 -0
- package/dist/tools/update-issue.js.map +1 -0
- package/dist/tools/update-merge-request.d.ts +35 -0
- package/dist/tools/update-merge-request.d.ts.map +1 -0
- package/dist/tools/update-merge-request.js +49 -0
- package/dist/tools/update-merge-request.js.map +1 -0
- package/dist/tools.json +2661 -0
- package/package.json +55 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const projectSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodNumber;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
path_with_namespace: z.ZodString;
|
|
6
|
+
description: z.ZodString;
|
|
7
|
+
visibility: z.ZodString;
|
|
8
|
+
web_url: z.ZodString;
|
|
9
|
+
default_branch: z.ZodString;
|
|
10
|
+
star_count: z.ZodNumber;
|
|
11
|
+
forks_count: z.ZodNumber;
|
|
12
|
+
open_issues_count: z.ZodNumber;
|
|
13
|
+
archived: z.ZodBoolean;
|
|
14
|
+
created_at: z.ZodString;
|
|
15
|
+
last_activity_at: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export declare const issueSchema: z.ZodObject<{
|
|
18
|
+
iid: z.ZodNumber;
|
|
19
|
+
title: z.ZodString;
|
|
20
|
+
state: z.ZodString;
|
|
21
|
+
description: z.ZodString;
|
|
22
|
+
web_url: z.ZodString;
|
|
23
|
+
author_username: z.ZodString;
|
|
24
|
+
labels: z.ZodArray<z.ZodString>;
|
|
25
|
+
assignees: z.ZodArray<z.ZodString>;
|
|
26
|
+
milestone_title: z.ZodString;
|
|
27
|
+
confidential: z.ZodBoolean;
|
|
28
|
+
created_at: z.ZodString;
|
|
29
|
+
updated_at: z.ZodString;
|
|
30
|
+
closed_at: z.ZodString;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export declare const mergeRequestSchema: z.ZodObject<{
|
|
33
|
+
iid: z.ZodNumber;
|
|
34
|
+
title: z.ZodString;
|
|
35
|
+
state: z.ZodString;
|
|
36
|
+
description: z.ZodString;
|
|
37
|
+
web_url: z.ZodString;
|
|
38
|
+
author_username: z.ZodString;
|
|
39
|
+
source_branch: z.ZodString;
|
|
40
|
+
target_branch: z.ZodString;
|
|
41
|
+
labels: z.ZodArray<z.ZodString>;
|
|
42
|
+
draft: z.ZodBoolean;
|
|
43
|
+
merged_by_username: z.ZodString;
|
|
44
|
+
merge_status: z.ZodString;
|
|
45
|
+
has_conflicts: z.ZodBoolean;
|
|
46
|
+
created_at: z.ZodString;
|
|
47
|
+
updated_at: z.ZodString;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export declare const noteSchema: z.ZodObject<{
|
|
50
|
+
id: z.ZodNumber;
|
|
51
|
+
body: z.ZodString;
|
|
52
|
+
author_username: z.ZodString;
|
|
53
|
+
system: z.ZodBoolean;
|
|
54
|
+
created_at: z.ZodString;
|
|
55
|
+
updated_at: z.ZodString;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export declare const userSchema: z.ZodObject<{
|
|
58
|
+
id: z.ZodNumber;
|
|
59
|
+
username: z.ZodString;
|
|
60
|
+
name: z.ZodString;
|
|
61
|
+
state: z.ZodString;
|
|
62
|
+
avatar_url: z.ZodString;
|
|
63
|
+
web_url: z.ZodString;
|
|
64
|
+
bio: z.ZodString;
|
|
65
|
+
location: z.ZodString;
|
|
66
|
+
public_email: z.ZodString;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
export declare const branchSchema: z.ZodObject<{
|
|
69
|
+
name: z.ZodString;
|
|
70
|
+
protected: z.ZodBoolean;
|
|
71
|
+
default: z.ZodBoolean;
|
|
72
|
+
sha: z.ZodString;
|
|
73
|
+
web_url: z.ZodString;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export declare const pipelineSchema: z.ZodObject<{
|
|
76
|
+
id: z.ZodNumber;
|
|
77
|
+
iid: z.ZodNumber;
|
|
78
|
+
status: z.ZodString;
|
|
79
|
+
ref: z.ZodString;
|
|
80
|
+
sha: z.ZodString;
|
|
81
|
+
source: z.ZodString;
|
|
82
|
+
web_url: z.ZodString;
|
|
83
|
+
created_at: z.ZodString;
|
|
84
|
+
updated_at: z.ZodString;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
export declare const jobSchema: z.ZodObject<{
|
|
87
|
+
id: z.ZodNumber;
|
|
88
|
+
name: z.ZodString;
|
|
89
|
+
stage: z.ZodString;
|
|
90
|
+
status: z.ZodString;
|
|
91
|
+
ref: z.ZodString;
|
|
92
|
+
web_url: z.ZodString;
|
|
93
|
+
duration: z.ZodNumber;
|
|
94
|
+
created_at: z.ZodString;
|
|
95
|
+
finished_at: z.ZodString;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
interface RawProject {
|
|
98
|
+
id?: number;
|
|
99
|
+
name?: string;
|
|
100
|
+
path_with_namespace?: string;
|
|
101
|
+
description?: string | null;
|
|
102
|
+
visibility?: string;
|
|
103
|
+
web_url?: string;
|
|
104
|
+
default_branch?: string | null;
|
|
105
|
+
star_count?: number;
|
|
106
|
+
forks_count?: number;
|
|
107
|
+
open_issues_count?: number;
|
|
108
|
+
archived?: boolean;
|
|
109
|
+
created_at?: string;
|
|
110
|
+
last_activity_at?: string;
|
|
111
|
+
}
|
|
112
|
+
export declare const mapProject: (p: RawProject) => {
|
|
113
|
+
id: number;
|
|
114
|
+
name: string;
|
|
115
|
+
path_with_namespace: string;
|
|
116
|
+
description: string;
|
|
117
|
+
visibility: string;
|
|
118
|
+
web_url: string;
|
|
119
|
+
default_branch: string;
|
|
120
|
+
star_count: number;
|
|
121
|
+
forks_count: number;
|
|
122
|
+
open_issues_count: number;
|
|
123
|
+
archived: boolean;
|
|
124
|
+
created_at: string;
|
|
125
|
+
last_activity_at: string;
|
|
126
|
+
};
|
|
127
|
+
interface RawUser {
|
|
128
|
+
username?: string;
|
|
129
|
+
}
|
|
130
|
+
interface RawMilestone {
|
|
131
|
+
title?: string;
|
|
132
|
+
}
|
|
133
|
+
interface RawIssue {
|
|
134
|
+
iid?: number;
|
|
135
|
+
title?: string;
|
|
136
|
+
state?: string;
|
|
137
|
+
description?: string | null;
|
|
138
|
+
web_url?: string;
|
|
139
|
+
author?: RawUser | null;
|
|
140
|
+
labels?: string[];
|
|
141
|
+
assignees?: RawUser[];
|
|
142
|
+
milestone?: RawMilestone | null;
|
|
143
|
+
confidential?: boolean;
|
|
144
|
+
created_at?: string;
|
|
145
|
+
updated_at?: string;
|
|
146
|
+
closed_at?: string | null;
|
|
147
|
+
}
|
|
148
|
+
export declare const mapIssue: (i: RawIssue) => {
|
|
149
|
+
iid: number;
|
|
150
|
+
title: string;
|
|
151
|
+
state: string;
|
|
152
|
+
description: string;
|
|
153
|
+
web_url: string;
|
|
154
|
+
author_username: string;
|
|
155
|
+
labels: string[];
|
|
156
|
+
assignees: string[];
|
|
157
|
+
milestone_title: string;
|
|
158
|
+
confidential: boolean;
|
|
159
|
+
created_at: string;
|
|
160
|
+
updated_at: string;
|
|
161
|
+
closed_at: string;
|
|
162
|
+
};
|
|
163
|
+
interface RawMergeRequest {
|
|
164
|
+
iid?: number;
|
|
165
|
+
title?: string;
|
|
166
|
+
state?: string;
|
|
167
|
+
description?: string | null;
|
|
168
|
+
web_url?: string;
|
|
169
|
+
author?: RawUser | null;
|
|
170
|
+
source_branch?: string;
|
|
171
|
+
target_branch?: string;
|
|
172
|
+
labels?: string[];
|
|
173
|
+
draft?: boolean;
|
|
174
|
+
merged_by?: RawUser | null;
|
|
175
|
+
merge_status?: string;
|
|
176
|
+
has_conflicts?: boolean;
|
|
177
|
+
created_at?: string;
|
|
178
|
+
updated_at?: string;
|
|
179
|
+
}
|
|
180
|
+
export declare const mapMergeRequest: (mr: RawMergeRequest) => {
|
|
181
|
+
iid: number;
|
|
182
|
+
title: string;
|
|
183
|
+
state: string;
|
|
184
|
+
description: string;
|
|
185
|
+
web_url: string;
|
|
186
|
+
author_username: string;
|
|
187
|
+
source_branch: string;
|
|
188
|
+
target_branch: string;
|
|
189
|
+
labels: string[];
|
|
190
|
+
draft: boolean;
|
|
191
|
+
merged_by_username: string;
|
|
192
|
+
merge_status: string;
|
|
193
|
+
has_conflicts: boolean;
|
|
194
|
+
created_at: string;
|
|
195
|
+
updated_at: string;
|
|
196
|
+
};
|
|
197
|
+
interface RawNote {
|
|
198
|
+
id?: number;
|
|
199
|
+
body?: string;
|
|
200
|
+
author?: RawUser | null;
|
|
201
|
+
system?: boolean;
|
|
202
|
+
created_at?: string;
|
|
203
|
+
updated_at?: string;
|
|
204
|
+
}
|
|
205
|
+
export declare const mapNote: (n: RawNote) => {
|
|
206
|
+
id: number;
|
|
207
|
+
body: string;
|
|
208
|
+
author_username: string;
|
|
209
|
+
system: boolean;
|
|
210
|
+
created_at: string;
|
|
211
|
+
updated_at: string;
|
|
212
|
+
};
|
|
213
|
+
interface RawUserProfile {
|
|
214
|
+
id?: number;
|
|
215
|
+
username?: string;
|
|
216
|
+
name?: string;
|
|
217
|
+
state?: string;
|
|
218
|
+
avatar_url?: string;
|
|
219
|
+
web_url?: string;
|
|
220
|
+
bio?: string | null;
|
|
221
|
+
location?: string | null;
|
|
222
|
+
public_email?: string | null;
|
|
223
|
+
}
|
|
224
|
+
export declare const mapUser: (u: RawUserProfile) => {
|
|
225
|
+
id: number;
|
|
226
|
+
username: string;
|
|
227
|
+
name: string;
|
|
228
|
+
state: string;
|
|
229
|
+
avatar_url: string;
|
|
230
|
+
web_url: string;
|
|
231
|
+
bio: string;
|
|
232
|
+
location: string;
|
|
233
|
+
public_email: string;
|
|
234
|
+
};
|
|
235
|
+
interface RawBranch {
|
|
236
|
+
name?: string;
|
|
237
|
+
protected?: boolean;
|
|
238
|
+
default?: boolean;
|
|
239
|
+
commit?: {
|
|
240
|
+
id?: string;
|
|
241
|
+
};
|
|
242
|
+
web_url?: string;
|
|
243
|
+
}
|
|
244
|
+
export declare const mapBranch: (b: RawBranch) => {
|
|
245
|
+
name: string;
|
|
246
|
+
protected: boolean;
|
|
247
|
+
default: boolean;
|
|
248
|
+
sha: string;
|
|
249
|
+
web_url: string;
|
|
250
|
+
};
|
|
251
|
+
interface RawPipeline {
|
|
252
|
+
id?: number;
|
|
253
|
+
iid?: number;
|
|
254
|
+
status?: string;
|
|
255
|
+
ref?: string;
|
|
256
|
+
sha?: string;
|
|
257
|
+
source?: string;
|
|
258
|
+
web_url?: string;
|
|
259
|
+
created_at?: string;
|
|
260
|
+
updated_at?: string;
|
|
261
|
+
}
|
|
262
|
+
export declare const mapPipeline: (p: RawPipeline) => {
|
|
263
|
+
id: number;
|
|
264
|
+
iid: number;
|
|
265
|
+
status: string;
|
|
266
|
+
ref: string;
|
|
267
|
+
sha: string;
|
|
268
|
+
source: string;
|
|
269
|
+
web_url: string;
|
|
270
|
+
created_at: string;
|
|
271
|
+
updated_at: string;
|
|
272
|
+
};
|
|
273
|
+
interface RawJob {
|
|
274
|
+
id?: number;
|
|
275
|
+
name?: string;
|
|
276
|
+
stage?: string;
|
|
277
|
+
status?: string;
|
|
278
|
+
ref?: string;
|
|
279
|
+
web_url?: string;
|
|
280
|
+
duration?: number | null;
|
|
281
|
+
created_at?: string;
|
|
282
|
+
finished_at?: string | null;
|
|
283
|
+
}
|
|
284
|
+
export declare const mapJob: (j: RawJob) => {
|
|
285
|
+
id: number;
|
|
286
|
+
name: string;
|
|
287
|
+
stage: string;
|
|
288
|
+
status: string;
|
|
289
|
+
ref: string;
|
|
290
|
+
web_url: string;
|
|
291
|
+
duration: number;
|
|
292
|
+
created_at: string;
|
|
293
|
+
finished_at: string;
|
|
294
|
+
};
|
|
295
|
+
export declare const commitSchema: z.ZodObject<{
|
|
296
|
+
id: z.ZodString;
|
|
297
|
+
short_id: z.ZodString;
|
|
298
|
+
title: z.ZodString;
|
|
299
|
+
message: z.ZodString;
|
|
300
|
+
author_name: z.ZodString;
|
|
301
|
+
author_email: z.ZodString;
|
|
302
|
+
authored_date: z.ZodString;
|
|
303
|
+
web_url: z.ZodString;
|
|
304
|
+
}, z.core.$strip>;
|
|
305
|
+
interface RawCommit {
|
|
306
|
+
id?: string;
|
|
307
|
+
short_id?: string;
|
|
308
|
+
title?: string;
|
|
309
|
+
message?: string;
|
|
310
|
+
author_name?: string;
|
|
311
|
+
author_email?: string;
|
|
312
|
+
authored_date?: string;
|
|
313
|
+
web_url?: string;
|
|
314
|
+
}
|
|
315
|
+
export declare const mapCommit: (c: RawCommit) => {
|
|
316
|
+
id: string;
|
|
317
|
+
short_id: string;
|
|
318
|
+
title: string;
|
|
319
|
+
message: string;
|
|
320
|
+
author_name: string;
|
|
321
|
+
author_email: string;
|
|
322
|
+
authored_date: string;
|
|
323
|
+
web_url: string;
|
|
324
|
+
};
|
|
325
|
+
export {};
|
|
326
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/tools/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;iBAcxB,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;iBActB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;iBAgB7B,CAAC;AA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G,WAAW;;;;;;;;;;CAUxC,CAAC;AAEH,UAAU,MAAM;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,eAAO,MAAM,MAAM,GAAI,GAAG,MAAM;;;;;;;;;;CAU9B,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;iBASvB,CAAC;AAEH,UAAU,SAAS;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,SAAS,GAAI,GAAG,SAAS;;;;;;;;;CASpC,CAAC"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// --- Shared schemas ---
|
|
3
|
+
export const projectSchema = z.object({
|
|
4
|
+
id: z.number().describe('Project ID'),
|
|
5
|
+
name: z.string().describe('Project name'),
|
|
6
|
+
path_with_namespace: z.string().describe('Full path including namespace (e.g., "group/project")'),
|
|
7
|
+
description: z.string().describe('Project description'),
|
|
8
|
+
visibility: z.string().describe('Visibility level: private, internal, or public'),
|
|
9
|
+
web_url: z.string().describe('URL to the project on GitLab'),
|
|
10
|
+
default_branch: z.string().describe('Default branch name'),
|
|
11
|
+
star_count: z.number().describe('Number of stars'),
|
|
12
|
+
forks_count: z.number().describe('Number of forks'),
|
|
13
|
+
open_issues_count: z.number().describe('Number of open issues'),
|
|
14
|
+
archived: z.boolean().describe('Whether the project is archived'),
|
|
15
|
+
created_at: z.string().describe('Created ISO 8601 timestamp'),
|
|
16
|
+
last_activity_at: z.string().describe('Last activity ISO 8601 timestamp'),
|
|
17
|
+
});
|
|
18
|
+
export const issueSchema = z.object({
|
|
19
|
+
iid: z.number().describe('Issue IID (project-scoped ID)'),
|
|
20
|
+
title: z.string().describe('Issue title'),
|
|
21
|
+
state: z.string().describe('Issue state: opened or closed'),
|
|
22
|
+
description: z.string().describe('Issue description in Markdown'),
|
|
23
|
+
web_url: z.string().describe('URL to the issue on GitLab'),
|
|
24
|
+
author_username: z.string().describe('Username of the author'),
|
|
25
|
+
labels: z.array(z.string()).describe('Label names'),
|
|
26
|
+
assignees: z.array(z.string()).describe('Assignee usernames'),
|
|
27
|
+
milestone_title: z.string().describe('Milestone title or empty string'),
|
|
28
|
+
confidential: z.boolean().describe('Whether the issue is confidential'),
|
|
29
|
+
created_at: z.string().describe('Created ISO 8601 timestamp'),
|
|
30
|
+
updated_at: z.string().describe('Updated ISO 8601 timestamp'),
|
|
31
|
+
closed_at: z.string().describe('Closed ISO 8601 timestamp or empty string'),
|
|
32
|
+
});
|
|
33
|
+
export const mergeRequestSchema = z.object({
|
|
34
|
+
iid: z.number().describe('Merge request IID (project-scoped ID)'),
|
|
35
|
+
title: z.string().describe('Merge request title'),
|
|
36
|
+
state: z.string().describe('MR state: opened, closed, merged, or locked'),
|
|
37
|
+
description: z.string().describe('Merge request description in Markdown'),
|
|
38
|
+
web_url: z.string().describe('URL to the MR on GitLab'),
|
|
39
|
+
author_username: z.string().describe('Username of the author'),
|
|
40
|
+
source_branch: z.string().describe('Source branch name'),
|
|
41
|
+
target_branch: z.string().describe('Target branch name'),
|
|
42
|
+
labels: z.array(z.string()).describe('Label names'),
|
|
43
|
+
draft: z.boolean().describe('Whether this is a draft MR'),
|
|
44
|
+
merged_by_username: z.string().describe('Username who merged, or empty string'),
|
|
45
|
+
merge_status: z.string().describe('Merge status (e.g., can_be_merged, cannot_be_merged)'),
|
|
46
|
+
has_conflicts: z.boolean().describe('Whether the MR has merge conflicts'),
|
|
47
|
+
created_at: z.string().describe('Created ISO 8601 timestamp'),
|
|
48
|
+
updated_at: z.string().describe('Updated ISO 8601 timestamp'),
|
|
49
|
+
});
|
|
50
|
+
export const noteSchema = z.object({
|
|
51
|
+
id: z.number().describe('Note ID'),
|
|
52
|
+
body: z.string().describe('Note body in Markdown'),
|
|
53
|
+
author_username: z.string().describe('Username of the commenter'),
|
|
54
|
+
system: z.boolean().describe('Whether this is a system-generated note'),
|
|
55
|
+
created_at: z.string().describe('Created ISO 8601 timestamp'),
|
|
56
|
+
updated_at: z.string().describe('Updated ISO 8601 timestamp'),
|
|
57
|
+
});
|
|
58
|
+
export const userSchema = z.object({
|
|
59
|
+
id: z.number().describe('User ID'),
|
|
60
|
+
username: z.string().describe('Username'),
|
|
61
|
+
name: z.string().describe('Display name'),
|
|
62
|
+
state: z.string().describe('Account state (e.g., active, blocked)'),
|
|
63
|
+
avatar_url: z.string().describe('Avatar image URL'),
|
|
64
|
+
web_url: z.string().describe('URL to the profile on GitLab'),
|
|
65
|
+
bio: z.string().describe('User bio'),
|
|
66
|
+
location: z.string().describe('Location'),
|
|
67
|
+
public_email: z.string().describe('Public email address'),
|
|
68
|
+
});
|
|
69
|
+
export const branchSchema = z.object({
|
|
70
|
+
name: z.string().describe('Branch name'),
|
|
71
|
+
protected: z.boolean().describe('Whether the branch is protected'),
|
|
72
|
+
default: z.boolean().describe('Whether this is the default branch'),
|
|
73
|
+
sha: z.string().describe('SHA of the branch HEAD commit'),
|
|
74
|
+
web_url: z.string().describe('URL to the branch on GitLab'),
|
|
75
|
+
});
|
|
76
|
+
export const pipelineSchema = z.object({
|
|
77
|
+
id: z.number().describe('Pipeline ID'),
|
|
78
|
+
iid: z.number().describe('Pipeline IID (project-scoped)'),
|
|
79
|
+
status: z.string().describe('Pipeline status (e.g., running, success, failed, canceled, pending)'),
|
|
80
|
+
ref: z.string().describe('Branch or tag name'),
|
|
81
|
+
sha: z.string().describe('Commit SHA'),
|
|
82
|
+
source: z.string().describe('Pipeline source (e.g., push, web, schedule, merge_request_event)'),
|
|
83
|
+
web_url: z.string().describe('URL to the pipeline on GitLab'),
|
|
84
|
+
created_at: z.string().describe('Created ISO 8601 timestamp'),
|
|
85
|
+
updated_at: z.string().describe('Updated ISO 8601 timestamp'),
|
|
86
|
+
});
|
|
87
|
+
export const jobSchema = z.object({
|
|
88
|
+
id: z.number().describe('Job ID'),
|
|
89
|
+
name: z.string().describe('Job name'),
|
|
90
|
+
stage: z.string().describe('Stage name'),
|
|
91
|
+
status: z.string().describe('Job status (e.g., running, success, failed, canceled, pending)'),
|
|
92
|
+
ref: z.string().describe('Branch or tag name'),
|
|
93
|
+
web_url: z.string().describe('URL to the job on GitLab'),
|
|
94
|
+
duration: z.number().describe('Duration in seconds or 0 if not finished'),
|
|
95
|
+
created_at: z.string().describe('Created ISO 8601 timestamp'),
|
|
96
|
+
finished_at: z.string().describe('Finished ISO 8601 timestamp or empty string'),
|
|
97
|
+
});
|
|
98
|
+
export const mapProject = (p) => ({
|
|
99
|
+
id: p.id ?? 0,
|
|
100
|
+
name: p.name ?? '',
|
|
101
|
+
path_with_namespace: p.path_with_namespace ?? '',
|
|
102
|
+
description: p.description ?? '',
|
|
103
|
+
visibility: p.visibility ?? '',
|
|
104
|
+
web_url: p.web_url ?? '',
|
|
105
|
+
default_branch: p.default_branch ?? '',
|
|
106
|
+
star_count: p.star_count ?? 0,
|
|
107
|
+
forks_count: p.forks_count ?? 0,
|
|
108
|
+
open_issues_count: p.open_issues_count ?? 0,
|
|
109
|
+
archived: p.archived ?? false,
|
|
110
|
+
created_at: p.created_at ?? '',
|
|
111
|
+
last_activity_at: p.last_activity_at ?? '',
|
|
112
|
+
});
|
|
113
|
+
export const mapIssue = (i) => ({
|
|
114
|
+
iid: i.iid ?? 0,
|
|
115
|
+
title: i.title ?? '',
|
|
116
|
+
state: i.state ?? '',
|
|
117
|
+
description: i.description ?? '',
|
|
118
|
+
web_url: i.web_url ?? '',
|
|
119
|
+
author_username: i.author?.username ?? '',
|
|
120
|
+
labels: i.labels ?? [],
|
|
121
|
+
assignees: (i.assignees ?? []).map(a => a.username ?? ''),
|
|
122
|
+
milestone_title: i.milestone?.title ?? '',
|
|
123
|
+
confidential: i.confidential ?? false,
|
|
124
|
+
created_at: i.created_at ?? '',
|
|
125
|
+
updated_at: i.updated_at ?? '',
|
|
126
|
+
closed_at: i.closed_at ?? '',
|
|
127
|
+
});
|
|
128
|
+
export const mapMergeRequest = (mr) => ({
|
|
129
|
+
iid: mr.iid ?? 0,
|
|
130
|
+
title: mr.title ?? '',
|
|
131
|
+
state: mr.state ?? '',
|
|
132
|
+
description: mr.description ?? '',
|
|
133
|
+
web_url: mr.web_url ?? '',
|
|
134
|
+
author_username: mr.author?.username ?? '',
|
|
135
|
+
source_branch: mr.source_branch ?? '',
|
|
136
|
+
target_branch: mr.target_branch ?? '',
|
|
137
|
+
labels: mr.labels ?? [],
|
|
138
|
+
draft: mr.draft ?? false,
|
|
139
|
+
merged_by_username: mr.merged_by?.username ?? '',
|
|
140
|
+
merge_status: mr.merge_status ?? '',
|
|
141
|
+
has_conflicts: mr.has_conflicts ?? false,
|
|
142
|
+
created_at: mr.created_at ?? '',
|
|
143
|
+
updated_at: mr.updated_at ?? '',
|
|
144
|
+
});
|
|
145
|
+
export const mapNote = (n) => ({
|
|
146
|
+
id: n.id ?? 0,
|
|
147
|
+
body: n.body ?? '',
|
|
148
|
+
author_username: n.author?.username ?? '',
|
|
149
|
+
system: n.system ?? false,
|
|
150
|
+
created_at: n.created_at ?? '',
|
|
151
|
+
updated_at: n.updated_at ?? '',
|
|
152
|
+
});
|
|
153
|
+
export const mapUser = (u) => ({
|
|
154
|
+
id: u.id ?? 0,
|
|
155
|
+
username: u.username ?? '',
|
|
156
|
+
name: u.name ?? '',
|
|
157
|
+
state: u.state ?? '',
|
|
158
|
+
avatar_url: u.avatar_url ?? '',
|
|
159
|
+
web_url: u.web_url ?? '',
|
|
160
|
+
bio: u.bio ?? '',
|
|
161
|
+
location: u.location ?? '',
|
|
162
|
+
public_email: u.public_email ?? '',
|
|
163
|
+
});
|
|
164
|
+
export const mapBranch = (b) => ({
|
|
165
|
+
name: b.name ?? '',
|
|
166
|
+
protected: b.protected ?? false,
|
|
167
|
+
default: b.default ?? false,
|
|
168
|
+
sha: b.commit?.id ?? '',
|
|
169
|
+
web_url: b.web_url ?? '',
|
|
170
|
+
});
|
|
171
|
+
export const mapPipeline = (p) => ({
|
|
172
|
+
id: p.id ?? 0,
|
|
173
|
+
iid: p.iid ?? 0,
|
|
174
|
+
status: p.status ?? '',
|
|
175
|
+
ref: p.ref ?? '',
|
|
176
|
+
sha: p.sha ?? '',
|
|
177
|
+
source: p.source ?? '',
|
|
178
|
+
web_url: p.web_url ?? '',
|
|
179
|
+
created_at: p.created_at ?? '',
|
|
180
|
+
updated_at: p.updated_at ?? '',
|
|
181
|
+
});
|
|
182
|
+
export const mapJob = (j) => ({
|
|
183
|
+
id: j.id ?? 0,
|
|
184
|
+
name: j.name ?? '',
|
|
185
|
+
stage: j.stage ?? '',
|
|
186
|
+
status: j.status ?? '',
|
|
187
|
+
ref: j.ref ?? '',
|
|
188
|
+
web_url: j.web_url ?? '',
|
|
189
|
+
duration: j.duration ?? 0,
|
|
190
|
+
created_at: j.created_at ?? '',
|
|
191
|
+
finished_at: j.finished_at ?? '',
|
|
192
|
+
});
|
|
193
|
+
export const commitSchema = z.object({
|
|
194
|
+
id: z.string().describe('Full commit SHA'),
|
|
195
|
+
short_id: z.string().describe('Short commit SHA'),
|
|
196
|
+
title: z.string().describe('Commit title (first line of the message)'),
|
|
197
|
+
message: z.string().describe('Full commit message'),
|
|
198
|
+
author_name: z.string().describe('Author name'),
|
|
199
|
+
author_email: z.string().describe('Author email'),
|
|
200
|
+
authored_date: z.string().describe('Authored ISO 8601 timestamp'),
|
|
201
|
+
web_url: z.string().describe('URL to the commit on GitLab'),
|
|
202
|
+
});
|
|
203
|
+
export const mapCommit = (c) => ({
|
|
204
|
+
id: c.id ?? '',
|
|
205
|
+
short_id: c.short_id ?? '',
|
|
206
|
+
title: c.title ?? '',
|
|
207
|
+
message: c.message ?? '',
|
|
208
|
+
author_name: c.author_name ?? '',
|
|
209
|
+
author_email: c.author_email ?? '',
|
|
210
|
+
authored_date: c.authored_date ?? '',
|
|
211
|
+
web_url: c.web_url ?? '',
|
|
212
|
+
});
|
|
213
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/tools/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yBAAyB;AAEzB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;IACzC,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;IACjG,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IACvD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC;IACjF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IAC5D,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAA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AC;IACjD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IACtE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IACnD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;IAC/C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;IACjD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IACjE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;CAC5D,CAAC,CAAC;AAaH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAY,EAAE,EAAE,CAAC,CAAC;IAC1C,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE;IACd,QAAQ,EAAE,CAAC,CAAC,QAAQ,IAAI,EAAE;IAC1B,KAAK,EAAE,CAAC,CAAC,KAAK,IAAI,EAAE;IACpB,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,EAAE;IACxB,WAAW,EAAE,CAAC,CAAC,WAAW,IAAI,EAAE;IAChC,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,EAAE;IAClC,aAAa,EAAE,CAAC,CAAC,aAAa,IAAI,EAAE;IACpC,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,EAAE;CACzB,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const searchProjects: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
|
|
3
|
+
search: z.ZodString;
|
|
4
|
+
order_by: z.ZodOptional<z.ZodEnum<{
|
|
5
|
+
id: "id";
|
|
6
|
+
name: "name";
|
|
7
|
+
created_at: "created_at";
|
|
8
|
+
last_activity_at: "last_activity_at";
|
|
9
|
+
updated_at: "updated_at";
|
|
10
|
+
path: "path";
|
|
11
|
+
}>>;
|
|
12
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
asc: "asc";
|
|
14
|
+
desc: "desc";
|
|
15
|
+
}>>;
|
|
16
|
+
per_page: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
19
|
+
projects: z.ZodArray<z.ZodObject<{
|
|
20
|
+
id: z.ZodNumber;
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
path_with_namespace: z.ZodString;
|
|
23
|
+
description: z.ZodString;
|
|
24
|
+
visibility: z.ZodString;
|
|
25
|
+
web_url: z.ZodString;
|
|
26
|
+
default_branch: z.ZodString;
|
|
27
|
+
star_count: z.ZodNumber;
|
|
28
|
+
forks_count: z.ZodNumber;
|
|
29
|
+
open_issues_count: z.ZodNumber;
|
|
30
|
+
archived: z.ZodBoolean;
|
|
31
|
+
created_at: z.ZodString;
|
|
32
|
+
last_activity_at: z.ZodString;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
//# sourceMappingURL=search-projects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-projects.d.ts","sourceRoot":"","sources":["../../src/tools/search-projects.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgCzB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineTool } from '@opentabs-dev/plugin-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { api } from '../gitlab-api.js';
|
|
4
|
+
import { mapProject, projectSchema } from './schemas.js';
|
|
5
|
+
export const searchProjects = defineTool({
|
|
6
|
+
name: 'search_projects',
|
|
7
|
+
displayName: 'Search Projects',
|
|
8
|
+
description: 'Search for projects by name across GitLab.',
|
|
9
|
+
summary: 'Search for projects',
|
|
10
|
+
icon: 'search',
|
|
11
|
+
group: 'Search',
|
|
12
|
+
input: z.object({
|
|
13
|
+
search: z.string().min(1).describe('Search query'),
|
|
14
|
+
order_by: z
|
|
15
|
+
.enum(['id', 'name', 'path', 'created_at', 'updated_at', 'last_activity_at'])
|
|
16
|
+
.optional()
|
|
17
|
+
.describe('Sort field (default: created_at)'),
|
|
18
|
+
sort: z.enum(['asc', 'desc']).optional().describe('Sort direction (default: desc)'),
|
|
19
|
+
per_page: z.number().int().min(1).max(100).optional().describe('Results per page (default 20, max 100)'),
|
|
20
|
+
page: z.number().int().min(1).optional().describe('Page number (default 1)'),
|
|
21
|
+
}),
|
|
22
|
+
output: z.object({
|
|
23
|
+
projects: z.array(projectSchema).describe('List of matching projects'),
|
|
24
|
+
}),
|
|
25
|
+
handle: async (params) => {
|
|
26
|
+
const query = {
|
|
27
|
+
search: params.search,
|
|
28
|
+
per_page: params.per_page ?? 20,
|
|
29
|
+
page: params.page,
|
|
30
|
+
order_by: params.order_by,
|
|
31
|
+
sort: params.sort,
|
|
32
|
+
};
|
|
33
|
+
const data = await api('/projects', { query });
|
|
34
|
+
return { projects: (data ?? []).map(mapProject) };
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=search-projects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-projects.js","sourceRoot":"","sources":["../../src/tools/search-projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,CAAC,MAAM,cAAc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