@andrebuzeli/git-mcp 2.29.2 → 2.30.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/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/providers/error-handler.d.ts +0 -24
- package/dist/providers/error-handler.d.ts.map +1 -1
- package/dist/providers/error-handler.js +0 -59
- package/dist/providers/error-handler.js.map +1 -1
- package/dist/providers/gitea-provider.d.ts.map +1 -1
- package/dist/providers/gitea-provider.js +30 -13
- package/dist/providers/gitea-provider.js.map +1 -1
- package/dist/providers/github-provider.d.ts.map +1 -1
- package/dist/providers/github-provider.js +7 -1
- package/dist/providers/github-provider.js.map +1 -1
- package/dist/server.js +7 -7
- package/dist/server.js.map +1 -1
- package/dist/tools/git-archive.d.ts +1 -1
- package/dist/tools/git-archive.d.ts.map +1 -1
- package/dist/tools/git-archive.js +71 -30
- package/dist/tools/git-archive.js.map +1 -1
- package/dist/tools/git-branches.d.ts +2 -2
- package/dist/tools/git-branches.d.ts.map +1 -1
- package/dist/tools/git-branches.js.map +1 -1
- package/dist/tools/git-commits.d.ts +2 -2
- package/dist/tools/git-commits.d.ts.map +1 -1
- package/dist/tools/git-commits.js.map +1 -1
- package/dist/tools/git-config.d.ts.map +1 -1
- package/dist/tools/git-config.js.map +1 -1
- package/dist/tools/git-files.d.ts +2 -2
- package/dist/tools/git-files.d.ts.map +1 -1
- package/dist/tools/git-files.js.map +1 -1
- package/dist/tools/git-initialize.d.ts +3 -3
- package/dist/tools/git-initialize.d.ts.map +1 -1
- package/dist/tools/git-initialize.js +11 -9
- package/dist/tools/git-initialize.js.map +1 -1
- package/dist/tools/git-issues.d.ts.map +1 -1
- package/dist/tools/git-issues.js.map +1 -1
- package/dist/tools/git-pulls.d.ts.map +1 -1
- package/dist/tools/git-pulls.js.map +1 -1
- package/dist/tools/git-releases.d.ts.map +1 -1
- package/dist/tools/git-releases.js.map +1 -1
- package/dist/tools/git-remote.d.ts.map +1 -1
- package/dist/tools/git-remote.js.map +1 -1
- package/dist/tools/git-repositories.d.ts.map +1 -1
- package/dist/tools/git-repositories.js.map +1 -1
- package/dist/tools/git-reset.d.ts.map +1 -1
- package/dist/tools/git-reset.js +6 -4
- package/dist/tools/git-reset.js.map +1 -1
- package/dist/tools/git-revert.d.ts.map +1 -1
- package/dist/tools/git-revert.js.map +1 -1
- package/dist/tools/git-stash.d.ts.map +1 -1
- package/dist/tools/git-stash.js.map +1 -1
- package/dist/tools/git-sync.d.ts +2 -2
- package/dist/tools/git-sync.d.ts.map +1 -1
- package/dist/tools/git-sync.js.map +1 -1
- package/dist/tools/git-tags.d.ts.map +1 -1
- package/dist/tools/git-tags.js.map +1 -1
- package/dist/tools/git-upload-project.d.ts +1 -5
- package/dist/tools/git-upload-project.d.ts.map +1 -1
- package/dist/tools/git-upload-project.js +1 -21
- package/dist/tools/git-upload-project.js.map +1 -1
- package/dist/tools/git-webhooks.d.ts +473 -477
- package/dist/tools/git-webhooks.d.ts.map +1 -1
- package/dist/tools/git-webhooks.js +544 -561
- package/dist/tools/git-webhooks.js.map +1 -1
- package/package.json +59 -59
|
@@ -1,478 +1,474 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { VcsOperations } from '../providers/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* Tool: webhooks
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Gerenciamento completo de webhooks com suporte multi-provider (GitHub e Gitea)
|
|
8
|
-
*
|
|
9
|
-
* FUNCIONALIDADES:
|
|
10
|
-
* -
|
|
11
|
-
* - Listagem e busca de webhooks
|
|
12
|
-
* -
|
|
13
|
-
* -
|
|
14
|
-
* -
|
|
15
|
-
* - Teste de webhooks
|
|
16
|
-
* -
|
|
17
|
-
*
|
|
18
|
-
* USO:
|
|
19
|
-
* - Para
|
|
20
|
-
* - Para
|
|
21
|
-
* - Para
|
|
22
|
-
* - Para
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* - Use HTTPS sempre que
|
|
26
|
-
* - Mantenha secrets seguros
|
|
27
|
-
* - Monitore falhas de entrega
|
|
28
|
-
* - Configure apenas eventos
|
|
29
|
-
*/
|
|
30
|
-
/**
|
|
31
|
-
* Schema de
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* - action:
|
|
35
|
-
* -
|
|
36
|
-
* -
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* - Sempre valide entrada antes de usar
|
|
40
|
-
* - Use
|
|
41
|
-
* - Documente
|
|
42
|
-
*/
|
|
43
|
-
declare const WebhooksInputSchema: z.ZodObject<{
|
|
44
|
-
action: z.ZodEnum<["create", "list", "get", "update", "delete", "test"]>;
|
|
45
|
-
repo: z.ZodString;
|
|
46
|
-
provider: z.ZodEnum<["gitea", "github"]>;
|
|
47
|
-
projectPath: z.ZodString;
|
|
48
|
-
url: z.ZodOptional<z.ZodString>;
|
|
49
|
-
content_type: z.ZodOptional<z.ZodEnum<["json", "form"]>>;
|
|
50
|
-
secret: z.ZodOptional<z.ZodString>;
|
|
51
|
-
events: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
52
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
-
webhook_id: z.ZodOptional<z.ZodNumber>;
|
|
54
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
55
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
56
|
-
new_url: z.ZodOptional<z.ZodString>;
|
|
57
|
-
new_content_type: z.ZodOptional<z.ZodEnum<["json", "form"]>>;
|
|
58
|
-
new_secret: z.ZodOptional<z.ZodString>;
|
|
59
|
-
new_events: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
60
|
-
new_active: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
-
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
provider: "gitea" | "github";
|
|
63
|
-
repo: string;
|
|
64
|
-
action: "delete" | "get" | "list" | "create" | "update" | "test";
|
|
65
|
-
projectPath: string;
|
|
66
|
-
active?: boolean | undefined;
|
|
67
|
-
url?: string | undefined;
|
|
68
|
-
events?: string[] | undefined;
|
|
69
|
-
page?: number | undefined;
|
|
70
|
-
limit?: number | undefined;
|
|
71
|
-
content_type?: "json" | "form" | undefined;
|
|
72
|
-
secret?: string | undefined;
|
|
73
|
-
webhook_id?: number | undefined;
|
|
74
|
-
new_url?: string | undefined;
|
|
75
|
-
new_content_type?: "json" | "form" | undefined;
|
|
76
|
-
new_secret?: string | undefined;
|
|
77
|
-
new_events?: string[] | undefined;
|
|
78
|
-
new_active?: boolean | undefined;
|
|
79
|
-
}, {
|
|
80
|
-
provider: "gitea" | "github";
|
|
81
|
-
repo: string;
|
|
82
|
-
action: "delete" | "get" | "list" | "create" | "update" | "test";
|
|
83
|
-
projectPath: string;
|
|
84
|
-
active?: boolean | undefined;
|
|
85
|
-
url?: string | undefined;
|
|
86
|
-
events?: string[] | undefined;
|
|
87
|
-
page?: number | undefined;
|
|
88
|
-
limit?: number | undefined;
|
|
89
|
-
content_type?: "json" | "form" | undefined;
|
|
90
|
-
secret?: string | undefined;
|
|
91
|
-
webhook_id?: number | undefined;
|
|
92
|
-
new_url?: string | undefined;
|
|
93
|
-
new_content_type?: "json" | "form" | undefined;
|
|
94
|
-
new_secret?: string | undefined;
|
|
95
|
-
new_events?: string[] | undefined;
|
|
96
|
-
new_active?: boolean | undefined;
|
|
97
|
-
}>;
|
|
98
|
-
export type WebhooksInput = z.infer<typeof WebhooksInputSchema>;
|
|
99
|
-
/**
|
|
100
|
-
* Schema de
|
|
101
|
-
*
|
|
102
|
-
* ESTRUTURA:
|
|
103
|
-
* - success: Status da
|
|
104
|
-
* - action:
|
|
105
|
-
* - message: Mensagem descritiva
|
|
106
|
-
* - data: Dados retornados (opcional)
|
|
107
|
-
* - error: Detalhes do erro (opcional)
|
|
108
|
-
*/
|
|
109
|
-
declare const WebhooksResultSchema: z.ZodObject<{
|
|
110
|
-
success: z.ZodBoolean;
|
|
111
|
-
action: z.ZodString;
|
|
112
|
-
message: z.ZodString;
|
|
113
|
-
data: z.ZodOptional<z.ZodAny>;
|
|
114
|
-
error: z.ZodOptional<z.ZodString>;
|
|
115
|
-
}, "strip", z.ZodTypeAny, {
|
|
116
|
-
message: string;
|
|
117
|
-
action: string;
|
|
118
|
-
success: boolean;
|
|
119
|
-
error?: string | undefined;
|
|
120
|
-
data?: any;
|
|
121
|
-
}, {
|
|
122
|
-
message: string;
|
|
123
|
-
action: string;
|
|
124
|
-
success: boolean;
|
|
125
|
-
error?: string | undefined;
|
|
126
|
-
data?: any;
|
|
127
|
-
}>;
|
|
128
|
-
export type WebhooksResult = z.infer<typeof WebhooksResultSchema>;
|
|
129
|
-
/**
|
|
130
|
-
* Tool: webhooks
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
* Gerenciamento completo de webhooks Gitea com
|
|
134
|
-
*
|
|
135
|
-
* ACTIONS
|
|
136
|
-
*
|
|
137
|
-
* 1. create - Criar novo webhook
|
|
138
|
-
*
|
|
139
|
-
* - owner (
|
|
140
|
-
* - repo (
|
|
141
|
-
* - url (
|
|
142
|
-
* - content_type (opcional): Tipo de
|
|
143
|
-
* - secret (opcional): Secret para assinatura
|
|
144
|
-
* - events (opcional): Array de eventos a serem monitorados
|
|
145
|
-
* - active (opcional): Se webhook
|
|
146
|
-
*
|
|
147
|
-
* 2. list - Listar webhooks
|
|
148
|
-
*
|
|
149
|
-
* - owner (
|
|
150
|
-
* - repo (
|
|
151
|
-
* - page (opcional):
|
|
152
|
-
* - limit (opcional): Itens por
|
|
153
|
-
*
|
|
154
|
-
* 3. get - Obter detalhes do webhook
|
|
155
|
-
*
|
|
156
|
-
* - owner (
|
|
157
|
-
* - repo (
|
|
158
|
-
* - webhook_id (
|
|
159
|
-
*
|
|
160
|
-
* 4. update - Atualizar webhook existente
|
|
161
|
-
*
|
|
162
|
-
* - owner (
|
|
163
|
-
* - repo (
|
|
164
|
-
* - webhook_id (
|
|
165
|
-
* - new_url (opcional): Nova URL
|
|
166
|
-
* - new_content_type (opcional): Novo tipo de
|
|
167
|
-
* - new_secret (opcional): Novo secret
|
|
168
|
-
* - new_events (opcional): Novos eventos
|
|
169
|
-
* - new_active (opcional): Novo status ativo
|
|
170
|
-
*
|
|
171
|
-
* 5. delete - Deletar webhook
|
|
172
|
-
*
|
|
173
|
-
* - owner (
|
|
174
|
-
* - repo (
|
|
175
|
-
* - webhook_id (
|
|
176
|
-
*
|
|
177
|
-
* 6. test - Testar webhook
|
|
178
|
-
*
|
|
179
|
-
* - owner (
|
|
180
|
-
* - repo (
|
|
181
|
-
* - webhook_id (
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
* - Use URLs seguras (HTTPS)
|
|
185
|
-
* - Configure eventos adequadamente
|
|
186
|
-
* - Monitore falhas de entrega
|
|
187
|
-
* - Mantenha secrets seguros
|
|
188
|
-
* - Teste webhooks antes de ativar
|
|
189
|
-
* - Configure retry adequado
|
|
190
|
-
* - Monitore logs de entrega
|
|
191
|
-
*/
|
|
192
|
-
export declare const webhooksTool: {
|
|
193
|
-
name: string;
|
|
194
|
-
description: string;
|
|
195
|
-
inputSchema: {
|
|
196
|
-
type: string;
|
|
197
|
-
properties: {
|
|
198
|
-
action: {
|
|
199
|
-
type: string;
|
|
200
|
-
enum: string[];
|
|
201
|
-
description: string;
|
|
202
|
-
};
|
|
203
|
-
repo: {
|
|
204
|
-
type: string;
|
|
205
|
-
description: string;
|
|
206
|
-
};
|
|
207
|
-
provider: {
|
|
208
|
-
type: string;
|
|
209
|
-
description: string;
|
|
210
|
-
};
|
|
211
|
-
url: {
|
|
212
|
-
type: string;
|
|
213
|
-
description: string;
|
|
214
|
-
};
|
|
215
|
-
content_type: {
|
|
216
|
-
type: string;
|
|
217
|
-
enum: string[];
|
|
218
|
-
description: string;
|
|
219
|
-
};
|
|
220
|
-
secret: {
|
|
221
|
-
type: string;
|
|
222
|
-
description: string;
|
|
223
|
-
};
|
|
224
|
-
events: {
|
|
225
|
-
type: string;
|
|
226
|
-
items: {
|
|
227
|
-
type: string;
|
|
228
|
-
};
|
|
229
|
-
description: string;
|
|
230
|
-
};
|
|
231
|
-
active: {
|
|
232
|
-
type: string;
|
|
233
|
-
description: string;
|
|
234
|
-
};
|
|
235
|
-
webhook_id: {
|
|
236
|
-
type: string;
|
|
237
|
-
description: string;
|
|
238
|
-
};
|
|
239
|
-
page: {
|
|
240
|
-
type: string;
|
|
241
|
-
description: string;
|
|
242
|
-
minimum: number;
|
|
243
|
-
};
|
|
244
|
-
limit: {
|
|
245
|
-
type: string;
|
|
246
|
-
description: string;
|
|
247
|
-
minimum: number;
|
|
248
|
-
maximum: number;
|
|
249
|
-
};
|
|
250
|
-
new_url: {
|
|
251
|
-
type: string;
|
|
252
|
-
description: string;
|
|
253
|
-
};
|
|
254
|
-
new_content_type: {
|
|
255
|
-
type: string;
|
|
256
|
-
enum: string[];
|
|
257
|
-
description: string;
|
|
258
|
-
};
|
|
259
|
-
new_secret: {
|
|
260
|
-
type: string;
|
|
261
|
-
description: string;
|
|
262
|
-
};
|
|
263
|
-
new_events: {
|
|
264
|
-
type: string;
|
|
265
|
-
items: {
|
|
266
|
-
type: string;
|
|
267
|
-
};
|
|
268
|
-
description: string;
|
|
269
|
-
};
|
|
270
|
-
new_active: {
|
|
271
|
-
type: string;
|
|
272
|
-
description: string;
|
|
273
|
-
};
|
|
274
|
-
};
|
|
275
|
-
required: string[];
|
|
276
|
-
};
|
|
277
|
-
/**
|
|
278
|
-
* Handler principal da tool webhooks
|
|
279
|
-
*
|
|
280
|
-
* FUNCIONALIDADE:
|
|
281
|
-
* - Valida entrada usando Zod schema
|
|
282
|
-
* - Roteia para
|
|
283
|
-
* - Trata erros de forma uniforme
|
|
284
|
-
* - Retorna resultado padronizado
|
|
285
|
-
*
|
|
286
|
-
* FLUXO:
|
|
287
|
-
* 1.
|
|
288
|
-
* 2.
|
|
289
|
-
* 3. Roteamento por
|
|
290
|
-
* 4.
|
|
291
|
-
* 5. Tratamento de erros
|
|
292
|
-
* 6. Retorno de resultado
|
|
293
|
-
*
|
|
294
|
-
* TRATAMENTO DE ERROS:
|
|
295
|
-
* -
|
|
296
|
-
* -
|
|
297
|
-
* - Roteamento:
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
* - Sempre valide entrada antes de processar
|
|
301
|
-
* - Trate erros
|
|
302
|
-
* - Log detalhes de erro para debug
|
|
303
|
-
* - Retorne mensagens de erro
|
|
304
|
-
*/
|
|
305
|
-
handler(input: WebhooksInput): Promise<WebhooksResult>;
|
|
306
|
-
/**
|
|
307
|
-
* Cria um novo webhook no
|
|
308
|
-
*
|
|
309
|
-
* FUNCIONALIDADE:
|
|
310
|
-
* - Cria webhook com URL e
|
|
311
|
-
* - Suporta diferentes tipos de
|
|
312
|
-
* - Permite
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
* - owner:
|
|
316
|
-
* - repo: Nome do
|
|
317
|
-
* - url: URL de destino do webhook
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
* - content_type: Tipo de
|
|
321
|
-
* - secret: Secret para assinatura
|
|
322
|
-
* - events: Array de eventos a serem monitorados
|
|
323
|
-
* - active: Se webhook
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
* - Todos os
|
|
327
|
-
* - URL deve ser
|
|
328
|
-
* -
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
* - Use URLs seguras (HTTPS)
|
|
332
|
-
* - Configure eventos adequadamente
|
|
333
|
-
* - Mantenha secrets seguros
|
|
334
|
-
* - Teste webhook antes de ativar
|
|
335
|
-
*/
|
|
336
|
-
createWebhook(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
337
|
-
/**
|
|
338
|
-
* Lista webhooks do
|
|
339
|
-
*
|
|
340
|
-
* FUNCIONALIDADE:
|
|
341
|
-
* - Lista webhooks com
|
|
342
|
-
* - Retorna
|
|
343
|
-
* - Inclui status ativo e eventos configurados
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
* - owner:
|
|
347
|
-
* - repo: Nome do
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
* - page:
|
|
351
|
-
* - limit: Itens por
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
-
* - e repo
|
|
355
|
-
* - Page deve ser >= 1
|
|
356
|
-
* - Limit deve ser entre 1 e 100
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
* - Use
|
|
360
|
-
* - Monitore
|
|
361
|
-
* - Verifique status ativo de cada webhook
|
|
362
|
-
* - Mantenha webhooks organizados
|
|
363
|
-
*/
|
|
364
|
-
listWebhooks(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
365
|
-
/**
|
|
366
|
-
*
|
|
367
|
-
*
|
|
368
|
-
* FUNCIONALIDADE:
|
|
369
|
-
* - Retorna
|
|
370
|
-
* - Inclui URL, tipo de
|
|
371
|
-
* - Mostra
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
* - owner:
|
|
375
|
-
* - repo: Nome do
|
|
376
|
-
* - webhook_id: ID do webhook
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
* - Todos os
|
|
380
|
-
* - Webhook deve existir no
|
|
381
|
-
* - ID deve ser
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
* - Use para obter detalhes completos
|
|
385
|
-
* - Verifique
|
|
386
|
-
* - Analise eventos configurados
|
|
387
|
-
* - Monitore status ativo
|
|
388
|
-
*/
|
|
389
|
-
getWebhook(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
390
|
-
/**
|
|
391
|
-
* Atualiza um webhook existente
|
|
392
|
-
*
|
|
393
|
-
* FUNCIONALIDADE:
|
|
394
|
-
* - Atualiza campos do webhook
|
|
395
|
-
* - Suporta
|
|
396
|
-
* - Permite
|
|
397
|
-
*
|
|
398
|
-
*
|
|
399
|
-
* - owner:
|
|
400
|
-
* - repo: Nome do
|
|
401
|
-
* - webhook_id: ID do webhook
|
|
402
|
-
*
|
|
403
|
-
*
|
|
404
|
-
* - new_url: Nova URL
|
|
405
|
-
* - new_content_type: Novo tipo de
|
|
406
|
-
* - new_secret: Novo secret
|
|
407
|
-
* - new_events: Novos eventos
|
|
408
|
-
* - new_active: Novo status ativo
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
* - Todos os
|
|
412
|
-
* - Webhook deve existir
|
|
413
|
-
* - Pelo menos um campo deve ser atualizado
|
|
414
|
-
*
|
|
415
|
-
*
|
|
416
|
-
* - Atualize apenas campos
|
|
417
|
-
* - Use mensagens de commit descritivas
|
|
418
|
-
* - Documente
|
|
419
|
-
* - Teste webhook
|
|
420
|
-
*/
|
|
421
|
-
updateWebhook(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
422
|
-
/**
|
|
423
|
-
* Deleta um webhook do
|
|
424
|
-
*
|
|
425
|
-
* FUNCIONALIDADE:
|
|
426
|
-
* - Remove webhook especificado
|
|
427
|
-
* - Confirma
|
|
428
|
-
* - Limpa
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
* - owner:
|
|
432
|
-
* - repo: Nome do
|
|
433
|
-
* - webhook_id: ID do webhook
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
* - Todos os
|
|
437
|
-
* - Webhook deve existir
|
|
438
|
-
* -
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
* - Confirme
|
|
442
|
-
* - Verifique se webhook
|
|
443
|
-
* - Mantenha backup se
|
|
444
|
-
* - Documente motivo da
|
|
445
|
-
*/
|
|
446
|
-
deleteWebhook(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
447
|
-
/**
|
|
448
|
-
* Testa um webhook existente
|
|
449
|
-
*
|
|
450
|
-
* FUNCIONALIDADE:
|
|
451
|
-
* - Envia payload de teste para webhook
|
|
452
|
-
* - Verifica conectividade e resposta
|
|
453
|
-
* - Retorna resultado do teste
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
* - owner:
|
|
457
|
-
* - repo: Nome do
|
|
458
|
-
* - webhook_id: ID do webhook
|
|
459
|
-
*
|
|
460
|
-
*
|
|
461
|
-
* - Todos os
|
|
462
|
-
* - Webhook deve existir
|
|
463
|
-
* - Webhook deve estar ativo
|
|
464
|
-
*
|
|
465
|
-
*
|
|
466
|
-
* - Teste webhooks
|
|
467
|
-
* - Monitore respostas de teste
|
|
468
|
-
* - Verifique logs de entrega
|
|
469
|
-
* - Configure retry adequado
|
|
470
|
-
*/
|
|
471
|
-
testWebhook(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
*/
|
|
475
|
-
isGitRelatedError(errorMessage: string): boolean;
|
|
476
|
-
};
|
|
477
|
-
export {};
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { VcsOperations } from '../providers/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Tool: webhooks
|
|
5
|
+
*
|
|
6
|
+
* DESCRIÇÃO:
|
|
7
|
+
* Gerenciamento completo de webhooks com suporte multi-provider (GitHub e Gitea)
|
|
8
|
+
*
|
|
9
|
+
* FUNCIONALIDADES:
|
|
10
|
+
* - Criação de novos webhooks
|
|
11
|
+
* - Listagem e busca de webhooks
|
|
12
|
+
* - Obtenção de detalhes específicos
|
|
13
|
+
* - Atualização de webhooks existentes
|
|
14
|
+
* - Exclusão de webhooks
|
|
15
|
+
* - Teste de webhooks
|
|
16
|
+
* - Configuração de eventos
|
|
17
|
+
*
|
|
18
|
+
* USO:
|
|
19
|
+
* - Para integração com CI/CD
|
|
20
|
+
* - Para notificações automáticas
|
|
21
|
+
* - Para sincronização de dados
|
|
22
|
+
* - Para automação de workflows
|
|
23
|
+
*
|
|
24
|
+
* RECOMENDAÇÕES:
|
|
25
|
+
* - Use HTTPS sempre que possível
|
|
26
|
+
* - Mantenha secrets seguros
|
|
27
|
+
* - Monitore falhas de entrega
|
|
28
|
+
* - Configure apenas eventos necessários
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* Schema de validação para entrada da tool webhooks
|
|
32
|
+
*
|
|
33
|
+
* VALIDAÇÕES:
|
|
34
|
+
* - action: Ação obrigatória (create, list, get, update, delete, test)
|
|
35
|
+
* - Parâmetros específicos por ação
|
|
36
|
+
* - Validação de tipos e formatos
|
|
37
|
+
*
|
|
38
|
+
* RECOMENDAÇÕES:
|
|
39
|
+
* - Sempre valide entrada antes de usar
|
|
40
|
+
* - Use parâmetros opcionais adequadamente
|
|
41
|
+
* - Documente parâmetros obrigatórios
|
|
42
|
+
*/
|
|
43
|
+
declare const WebhooksInputSchema: z.ZodObject<{
|
|
44
|
+
action: z.ZodEnum<["create", "list", "get", "update", "delete", "test"]>;
|
|
45
|
+
repo: z.ZodString;
|
|
46
|
+
provider: z.ZodEnum<["gitea", "github"]>;
|
|
47
|
+
projectPath: z.ZodString;
|
|
48
|
+
url: z.ZodOptional<z.ZodString>;
|
|
49
|
+
content_type: z.ZodOptional<z.ZodEnum<["json", "form"]>>;
|
|
50
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
51
|
+
events: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
52
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
+
webhook_id: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
new_url: z.ZodOptional<z.ZodString>;
|
|
57
|
+
new_content_type: z.ZodOptional<z.ZodEnum<["json", "form"]>>;
|
|
58
|
+
new_secret: z.ZodOptional<z.ZodString>;
|
|
59
|
+
new_events: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
60
|
+
new_active: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
provider: "gitea" | "github";
|
|
63
|
+
repo: string;
|
|
64
|
+
action: "delete" | "get" | "list" | "create" | "update" | "test";
|
|
65
|
+
projectPath: string;
|
|
66
|
+
active?: boolean | undefined;
|
|
67
|
+
url?: string | undefined;
|
|
68
|
+
events?: string[] | undefined;
|
|
69
|
+
page?: number | undefined;
|
|
70
|
+
limit?: number | undefined;
|
|
71
|
+
content_type?: "json" | "form" | undefined;
|
|
72
|
+
secret?: string | undefined;
|
|
73
|
+
webhook_id?: number | undefined;
|
|
74
|
+
new_url?: string | undefined;
|
|
75
|
+
new_content_type?: "json" | "form" | undefined;
|
|
76
|
+
new_secret?: string | undefined;
|
|
77
|
+
new_events?: string[] | undefined;
|
|
78
|
+
new_active?: boolean | undefined;
|
|
79
|
+
}, {
|
|
80
|
+
provider: "gitea" | "github";
|
|
81
|
+
repo: string;
|
|
82
|
+
action: "delete" | "get" | "list" | "create" | "update" | "test";
|
|
83
|
+
projectPath: string;
|
|
84
|
+
active?: boolean | undefined;
|
|
85
|
+
url?: string | undefined;
|
|
86
|
+
events?: string[] | undefined;
|
|
87
|
+
page?: number | undefined;
|
|
88
|
+
limit?: number | undefined;
|
|
89
|
+
content_type?: "json" | "form" | undefined;
|
|
90
|
+
secret?: string | undefined;
|
|
91
|
+
webhook_id?: number | undefined;
|
|
92
|
+
new_url?: string | undefined;
|
|
93
|
+
new_content_type?: "json" | "form" | undefined;
|
|
94
|
+
new_secret?: string | undefined;
|
|
95
|
+
new_events?: string[] | undefined;
|
|
96
|
+
new_active?: boolean | undefined;
|
|
97
|
+
}>;
|
|
98
|
+
export type WebhooksInput = z.infer<typeof WebhooksInputSchema>;
|
|
99
|
+
/**
|
|
100
|
+
* Schema de saída padronizado
|
|
101
|
+
*
|
|
102
|
+
* ESTRUTURA:
|
|
103
|
+
* - success: Status da operação
|
|
104
|
+
* - action: Ação executada
|
|
105
|
+
* - message: Mensagem descritiva
|
|
106
|
+
* - data: Dados retornados (opcional)
|
|
107
|
+
* - error: Detalhes do erro (opcional)
|
|
108
|
+
*/
|
|
109
|
+
declare const WebhooksResultSchema: z.ZodObject<{
|
|
110
|
+
success: z.ZodBoolean;
|
|
111
|
+
action: z.ZodString;
|
|
112
|
+
message: z.ZodString;
|
|
113
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
114
|
+
error: z.ZodOptional<z.ZodString>;
|
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
message: string;
|
|
117
|
+
action: string;
|
|
118
|
+
success: boolean;
|
|
119
|
+
error?: string | undefined;
|
|
120
|
+
data?: any;
|
|
121
|
+
}, {
|
|
122
|
+
message: string;
|
|
123
|
+
action: string;
|
|
124
|
+
success: boolean;
|
|
125
|
+
error?: string | undefined;
|
|
126
|
+
data?: any;
|
|
127
|
+
}>;
|
|
128
|
+
export type WebhooksResult = z.infer<typeof WebhooksResultSchema>;
|
|
129
|
+
/**
|
|
130
|
+
* Tool: webhooks
|
|
131
|
+
*
|
|
132
|
+
* DESCRIÇÃO:
|
|
133
|
+
* Gerenciamento completo de webhooks Gitea com múltiplas ações
|
|
134
|
+
*
|
|
135
|
+
* ACTIONS DISPONÍVEIS:
|
|
136
|
+
*
|
|
137
|
+
* 1. create - Criar novo webhook
|
|
138
|
+
* Parâmetros:
|
|
139
|
+
* - owner (obrigatório): Proprietário do repositório
|
|
140
|
+
* - repo (obrigatório): Nome do repositório
|
|
141
|
+
* - url (obrigatório): URL de destino do webhook
|
|
142
|
+
* - content_type (opcional): Tipo de conteúdo (json, form) - padrão: json
|
|
143
|
+
* - secret (opcional): Secret para assinatura
|
|
144
|
+
* - events (opcional): Array de eventos a serem monitorados
|
|
145
|
+
* - active (opcional): Se webhook está ativo (padrão: true)
|
|
146
|
+
*
|
|
147
|
+
* 2. list - Listar webhooks
|
|
148
|
+
* Parâmetros:
|
|
149
|
+
* - owner (obrigatório): Proprietário do repositório
|
|
150
|
+
* - repo (obrigatório): Nome do repositório
|
|
151
|
+
* - page (opcional): Página da listagem (padrão: 1)
|
|
152
|
+
* - limit (opcional): Itens por página (padrão: 30, máximo: 100)
|
|
153
|
+
*
|
|
154
|
+
* 3. get - Obter detalhes do webhook
|
|
155
|
+
* Parâmetros:
|
|
156
|
+
* - owner (obrigatório): Proprietário do repositório
|
|
157
|
+
* - repo (obrigatório): Nome do repositório
|
|
158
|
+
* - webhook_id (obrigatório): ID do webhook
|
|
159
|
+
*
|
|
160
|
+
* 4. update - Atualizar webhook existente
|
|
161
|
+
* Parâmetros:
|
|
162
|
+
* - owner (obrigatório): Proprietário do repositório
|
|
163
|
+
* - repo (obrigatório): Nome do repositório
|
|
164
|
+
* - webhook_id (obrigatório): ID do webhook
|
|
165
|
+
* - new_url (opcional): Nova URL
|
|
166
|
+
* - new_content_type (opcional): Novo tipo de conteúdo
|
|
167
|
+
* - new_secret (opcional): Novo secret
|
|
168
|
+
* - new_events (opcional): Novos eventos
|
|
169
|
+
* - new_active (opcional): Novo status ativo
|
|
170
|
+
*
|
|
171
|
+
* 5. delete - Deletar webhook
|
|
172
|
+
* Parâmetros:
|
|
173
|
+
* - owner (obrigatório): Proprietário do repositório
|
|
174
|
+
* - repo (obrigatório): Nome do repositório
|
|
175
|
+
* - webhook_id (obrigatório): ID do webhook
|
|
176
|
+
*
|
|
177
|
+
* 6. test - Testar webhook
|
|
178
|
+
* Parâmetros:
|
|
179
|
+
* - owner (obrigatório): Proprietário do repositório
|
|
180
|
+
* - repo (obrigatório): Nome do repositório
|
|
181
|
+
* - webhook_id (obrigatório): ID do webhook
|
|
182
|
+
*
|
|
183
|
+
* RECOMENDAÇÕES DE USO:
|
|
184
|
+
* - Use URLs seguras (HTTPS)
|
|
185
|
+
* - Configure eventos adequadamente
|
|
186
|
+
* - Monitore falhas de entrega
|
|
187
|
+
* - Mantenha secrets seguros
|
|
188
|
+
* - Teste webhooks antes de ativar
|
|
189
|
+
* - Configure retry adequado
|
|
190
|
+
* - Monitore logs de entrega
|
|
191
|
+
*/
|
|
192
|
+
export declare const webhooksTool: {
|
|
193
|
+
name: string;
|
|
194
|
+
description: string;
|
|
195
|
+
inputSchema: {
|
|
196
|
+
type: string;
|
|
197
|
+
properties: {
|
|
198
|
+
action: {
|
|
199
|
+
type: string;
|
|
200
|
+
enum: string[];
|
|
201
|
+
description: string;
|
|
202
|
+
};
|
|
203
|
+
repo: {
|
|
204
|
+
type: string;
|
|
205
|
+
description: string;
|
|
206
|
+
};
|
|
207
|
+
provider: {
|
|
208
|
+
type: string;
|
|
209
|
+
description: string;
|
|
210
|
+
};
|
|
211
|
+
url: {
|
|
212
|
+
type: string;
|
|
213
|
+
description: string;
|
|
214
|
+
};
|
|
215
|
+
content_type: {
|
|
216
|
+
type: string;
|
|
217
|
+
enum: string[];
|
|
218
|
+
description: string;
|
|
219
|
+
};
|
|
220
|
+
secret: {
|
|
221
|
+
type: string;
|
|
222
|
+
description: string;
|
|
223
|
+
};
|
|
224
|
+
events: {
|
|
225
|
+
type: string;
|
|
226
|
+
items: {
|
|
227
|
+
type: string;
|
|
228
|
+
};
|
|
229
|
+
description: string;
|
|
230
|
+
};
|
|
231
|
+
active: {
|
|
232
|
+
type: string;
|
|
233
|
+
description: string;
|
|
234
|
+
};
|
|
235
|
+
webhook_id: {
|
|
236
|
+
type: string;
|
|
237
|
+
description: string;
|
|
238
|
+
};
|
|
239
|
+
page: {
|
|
240
|
+
type: string;
|
|
241
|
+
description: string;
|
|
242
|
+
minimum: number;
|
|
243
|
+
};
|
|
244
|
+
limit: {
|
|
245
|
+
type: string;
|
|
246
|
+
description: string;
|
|
247
|
+
minimum: number;
|
|
248
|
+
maximum: number;
|
|
249
|
+
};
|
|
250
|
+
new_url: {
|
|
251
|
+
type: string;
|
|
252
|
+
description: string;
|
|
253
|
+
};
|
|
254
|
+
new_content_type: {
|
|
255
|
+
type: string;
|
|
256
|
+
enum: string[];
|
|
257
|
+
description: string;
|
|
258
|
+
};
|
|
259
|
+
new_secret: {
|
|
260
|
+
type: string;
|
|
261
|
+
description: string;
|
|
262
|
+
};
|
|
263
|
+
new_events: {
|
|
264
|
+
type: string;
|
|
265
|
+
items: {
|
|
266
|
+
type: string;
|
|
267
|
+
};
|
|
268
|
+
description: string;
|
|
269
|
+
};
|
|
270
|
+
new_active: {
|
|
271
|
+
type: string;
|
|
272
|
+
description: string;
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
required: string[];
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* Handler principal da tool webhooks
|
|
279
|
+
*
|
|
280
|
+
* FUNCIONALIDADE:
|
|
281
|
+
* - Valida entrada usando Zod schema
|
|
282
|
+
* - Roteia para método específico baseado na ação
|
|
283
|
+
* - Trata erros de forma uniforme
|
|
284
|
+
* - Retorna resultado padronizado
|
|
285
|
+
*
|
|
286
|
+
* FLUXO:
|
|
287
|
+
* 1. Validação de entrada
|
|
288
|
+
* 2. Seleção do provider
|
|
289
|
+
* 3. Roteamento por ação
|
|
290
|
+
* 4. Execução do método específico
|
|
291
|
+
* 5. Tratamento de erros
|
|
292
|
+
* 6. Retorno de resultado
|
|
293
|
+
*
|
|
294
|
+
* TRATAMENTO DE ERROS:
|
|
295
|
+
* - Validação: erro de schema
|
|
296
|
+
* - Execução: erro da operação
|
|
297
|
+
* - Roteamento: ação não suportada
|
|
298
|
+
*
|
|
299
|
+
* RECOMENDAÇÕES:
|
|
300
|
+
* - Sempre valide entrada antes de processar
|
|
301
|
+
* - Trate erros específicos adequadamente
|
|
302
|
+
* - Log detalhes de erro para debug
|
|
303
|
+
* - Retorne mensagens de erro úteis
|
|
304
|
+
*/
|
|
305
|
+
handler(input: WebhooksInput): Promise<WebhooksResult>;
|
|
306
|
+
/**
|
|
307
|
+
* Cria um novo webhook no repositório
|
|
308
|
+
*
|
|
309
|
+
* FUNCIONALIDADE:
|
|
310
|
+
* - Cria webhook com URL e configurações
|
|
311
|
+
* - Suporta diferentes tipos de conteúdo
|
|
312
|
+
* - Permite configuração de eventos
|
|
313
|
+
*
|
|
314
|
+
* PARÂMETROS OBRIGATÓRIOS:
|
|
315
|
+
* - owner: Proprietário do repositório
|
|
316
|
+
* - repo: Nome do repositório
|
|
317
|
+
* - url: URL de destino do webhook
|
|
318
|
+
*
|
|
319
|
+
* PARÂMETROS OPCIONAIS:
|
|
320
|
+
* - content_type: Tipo de conteúdo (json, form) - padrão: json
|
|
321
|
+
* - secret: Secret para assinatura
|
|
322
|
+
* - events: Array de eventos a serem monitorados
|
|
323
|
+
* - active: Se webhook está ativo (padrão: true)
|
|
324
|
+
*
|
|
325
|
+
* VALIDAÇÕES:
|
|
326
|
+
* - Todos os parâmetros obrigatórios
|
|
327
|
+
* - URL deve ser válida e acessível
|
|
328
|
+
* - Usuário deve ter permissão de escrita
|
|
329
|
+
*
|
|
330
|
+
* RECOMENDAÇÕES:
|
|
331
|
+
* - Use URLs seguras (HTTPS)
|
|
332
|
+
* - Configure eventos adequadamente
|
|
333
|
+
* - Mantenha secrets seguros
|
|
334
|
+
* - Teste webhook antes de ativar
|
|
335
|
+
*/
|
|
336
|
+
createWebhook(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
337
|
+
/**
|
|
338
|
+
* Lista webhooks do repositório
|
|
339
|
+
*
|
|
340
|
+
* FUNCIONALIDADE:
|
|
341
|
+
* - Lista webhooks com paginação
|
|
342
|
+
* - Retorna informações básicas de cada webhook
|
|
343
|
+
* - Inclui status ativo e eventos configurados
|
|
344
|
+
*
|
|
345
|
+
* PARÂMETROS OBRIGATÓRIOS:
|
|
346
|
+
* - owner: Proprietário do repositório
|
|
347
|
+
* - repo: Nome do repositório
|
|
348
|
+
*
|
|
349
|
+
* PARÂMETROS OPCIONAIS:
|
|
350
|
+
* - page: Página da listagem (padrão: 1)
|
|
351
|
+
* - limit: Itens por página (padrão: 30, máximo: 100)
|
|
352
|
+
*
|
|
353
|
+
* VALIDAÇÕES:
|
|
354
|
+
* - e repo obrigatórios
|
|
355
|
+
* - Page deve ser >= 1
|
|
356
|
+
* - Limit deve ser entre 1 e 100
|
|
357
|
+
*
|
|
358
|
+
* RECOMENDAÇÕES:
|
|
359
|
+
* - Use paginação para repositórios com muitos webhooks
|
|
360
|
+
* - Monitore número total de webhooks
|
|
361
|
+
* - Verifique status ativo de cada webhook
|
|
362
|
+
* - Mantenha webhooks organizados
|
|
363
|
+
*/
|
|
364
|
+
listWebhooks(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
365
|
+
/**
|
|
366
|
+
* Obtém detalhes de um webhook específico
|
|
367
|
+
*
|
|
368
|
+
* FUNCIONALIDADE:
|
|
369
|
+
* - Retorna informações completas do webhook
|
|
370
|
+
* - Inclui URL, tipo de conteúdo, eventos e status
|
|
371
|
+
* - Mostra configurações de segurança
|
|
372
|
+
*
|
|
373
|
+
* PARÂMETROS OBRIGATÓRIOS:
|
|
374
|
+
* - owner: Proprietário do repositório
|
|
375
|
+
* - repo: Nome do repositório
|
|
376
|
+
* - webhook_id: ID do webhook
|
|
377
|
+
*
|
|
378
|
+
* VALIDAÇÕES:
|
|
379
|
+
* - Todos os parâmetros obrigatórios
|
|
380
|
+
* - Webhook deve existir no repositório
|
|
381
|
+
* - ID deve ser válido
|
|
382
|
+
*
|
|
383
|
+
* RECOMENDAÇÕES:
|
|
384
|
+
* - Use para obter detalhes completos
|
|
385
|
+
* - Verifique configurações de segurança
|
|
386
|
+
* - Analise eventos configurados
|
|
387
|
+
* - Monitore status ativo
|
|
388
|
+
*/
|
|
389
|
+
getWebhook(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
390
|
+
/**
|
|
391
|
+
* Atualiza um webhook existente
|
|
392
|
+
*
|
|
393
|
+
* FUNCIONALIDADE:
|
|
394
|
+
* - Atualiza campos do webhook
|
|
395
|
+
* - Suporta mudança de URL e eventos
|
|
396
|
+
* - Permite alteração de status ativo
|
|
397
|
+
*
|
|
398
|
+
* PARÂMETROS OBRIGATÓRIOS:
|
|
399
|
+
* - owner: Proprietário do repositório
|
|
400
|
+
* - repo: Nome do repositório
|
|
401
|
+
* - webhook_id: ID do webhook
|
|
402
|
+
*
|
|
403
|
+
* PARÂMETROS OPCIONAIS:
|
|
404
|
+
* - new_url: Nova URL
|
|
405
|
+
* - new_content_type: Novo tipo de conteúdo
|
|
406
|
+
* - new_secret: Novo secret
|
|
407
|
+
* - new_events: Novos eventos
|
|
408
|
+
* - new_active: Novo status ativo
|
|
409
|
+
*
|
|
410
|
+
* VALIDAÇÕES:
|
|
411
|
+
* - Todos os parâmetros obrigatórios
|
|
412
|
+
* - Webhook deve existir
|
|
413
|
+
* - Pelo menos um campo deve ser atualizado
|
|
414
|
+
*
|
|
415
|
+
* RECOMENDAÇÕES:
|
|
416
|
+
* - Atualize apenas campos necessários
|
|
417
|
+
* - Use mensagens de commit descritivas
|
|
418
|
+
* - Documente mudanças importantes
|
|
419
|
+
* - Teste webhook após atualização
|
|
420
|
+
*/
|
|
421
|
+
updateWebhook(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
422
|
+
/**
|
|
423
|
+
* Deleta um webhook do repositório
|
|
424
|
+
*
|
|
425
|
+
* FUNCIONALIDADE:
|
|
426
|
+
* - Remove webhook especificado
|
|
427
|
+
* - Confirma exclusão bem-sucedida
|
|
428
|
+
* - Limpa configurações associadas
|
|
429
|
+
*
|
|
430
|
+
* PARÂMETROS OBRIGATÓRIOS:
|
|
431
|
+
* - owner: Proprietário do repositório
|
|
432
|
+
* - repo: Nome do repositório
|
|
433
|
+
* - webhook_id: ID do webhook
|
|
434
|
+
*
|
|
435
|
+
* VALIDAÇÕES:
|
|
436
|
+
* - Todos os parâmetros obrigatórios
|
|
437
|
+
* - Webhook deve existir
|
|
438
|
+
* - Usuário deve ter permissão de exclusão
|
|
439
|
+
*
|
|
440
|
+
* RECOMENDAÇÕES:
|
|
441
|
+
* - Confirme exclusão antes de executar
|
|
442
|
+
* - Verifique se webhook não está sendo usado
|
|
443
|
+
* - Mantenha backup se necessário
|
|
444
|
+
* - Documente motivo da exclusão
|
|
445
|
+
*/
|
|
446
|
+
deleteWebhook(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
447
|
+
/**
|
|
448
|
+
* Testa um webhook existente
|
|
449
|
+
*
|
|
450
|
+
* FUNCIONALIDADE:
|
|
451
|
+
* - Envia payload de teste para webhook
|
|
452
|
+
* - Verifica conectividade e resposta
|
|
453
|
+
* - Retorna resultado do teste
|
|
454
|
+
*
|
|
455
|
+
* PARÂMETROS OBRIGATÓRIOS:
|
|
456
|
+
* - owner: Proprietário do repositório
|
|
457
|
+
* - repo: Nome do repositório
|
|
458
|
+
* - webhook_id: ID do webhook
|
|
459
|
+
*
|
|
460
|
+
* VALIDAÇÕES:
|
|
461
|
+
* - Todos os parâmetros obrigatórios
|
|
462
|
+
* - Webhook deve existir
|
|
463
|
+
* - Webhook deve estar ativo
|
|
464
|
+
*
|
|
465
|
+
* RECOMENDAÇÕES:
|
|
466
|
+
* - Teste webhooks após criação
|
|
467
|
+
* - Monitore respostas de teste
|
|
468
|
+
* - Verifique logs de entrega
|
|
469
|
+
* - Configure retry adequado
|
|
470
|
+
*/
|
|
471
|
+
testWebhook(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
472
|
+
};
|
|
473
|
+
export {};
|
|
478
474
|
//# sourceMappingURL=git-webhooks.d.ts.map
|