@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
|
@@ -15,49 +15,78 @@ const flexibleVariableType = zod_1.z.preprocess(val => {
|
|
|
15
15
|
}
|
|
16
16
|
return val;
|
|
17
17
|
}, zod_1.z.enum(["env_var", "file"]));
|
|
18
|
-
|
|
18
|
+
const namespaceField = zod_1.z.string().describe("Namespace path (group or project)");
|
|
19
|
+
const keyField = zod_1.z
|
|
20
|
+
.string()
|
|
21
|
+
.describe("The key of the CI/CD variable. Maximum 255 characters, only alphanumeric and underscore characters allowed.");
|
|
22
|
+
const variableTypeField = flexibleVariableType
|
|
23
|
+
.optional()
|
|
24
|
+
.describe('The type of variable: "env_var" for environment variables (default) or "file" for file variables.');
|
|
25
|
+
const environmentScopeField = zod_1.z
|
|
26
|
+
.string()
|
|
27
|
+
.optional()
|
|
28
|
+
.describe('The environment scope. Use "*" for all environments (default), or specify like "production", "staging".');
|
|
29
|
+
const protectedField = utils_1.flexibleBoolean
|
|
30
|
+
.optional()
|
|
31
|
+
.describe("Whether this variable is protected. Protected variables are only available to protected branches/tags.");
|
|
32
|
+
const maskedField = utils_1.flexibleBoolean
|
|
33
|
+
.optional()
|
|
34
|
+
.describe("Whether this variable should be masked in job logs. MASKING REQUIREMENTS: Value must be at least 8 characters, single line with no spaces, only A-Z a-z 0-9 + / = . ~ - _ @ : characters.");
|
|
35
|
+
const rawField = utils_1.flexibleBoolean
|
|
36
|
+
.optional()
|
|
37
|
+
.describe("Whether variable expansion is disabled. When true, variables like $OTHER_VAR in the value will NOT be expanded.");
|
|
38
|
+
const descriptionField = zod_1.z
|
|
39
|
+
.string()
|
|
40
|
+
.optional()
|
|
41
|
+
.describe("Optional description explaining the purpose of this variable (GitLab 16.2+).");
|
|
42
|
+
const filterField = zod_1.z
|
|
19
43
|
.object({
|
|
20
|
-
action: zod_1.z.enum(["create", "update", "delete"]).describe("Action to perform"),
|
|
21
|
-
namespace: zod_1.z.string().describe("Namespace path (group or project)"),
|
|
22
|
-
key: zod_1.z
|
|
23
|
-
.string()
|
|
24
|
-
.describe("The key of the CI/CD variable. Maximum 255 characters, only alphanumeric and underscore characters allowed."),
|
|
25
|
-
value: zod_1.z
|
|
26
|
-
.string()
|
|
27
|
-
.optional()
|
|
28
|
-
.describe("The value of the CI/CD variable. Required for 'create' action. For file type variables, this is the file content."),
|
|
29
|
-
variable_type: flexibleVariableType
|
|
30
|
-
.optional()
|
|
31
|
-
.describe('The type of variable: "env_var" for environment variables (default) or "file" for file variables.'),
|
|
32
44
|
environment_scope: zod_1.z
|
|
33
45
|
.string()
|
|
34
46
|
.optional()
|
|
35
|
-
.describe(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
.
|
|
45
|
-
|
|
47
|
+
.describe("Filter to specify which environment scope variant to update/delete when multiple variables exist with the same key."),
|
|
48
|
+
})
|
|
49
|
+
.optional()
|
|
50
|
+
.describe("Filter parameters to identify the specific variable");
|
|
51
|
+
const CreateVariableSchema = zod_1.z.object({
|
|
52
|
+
action: zod_1.z.literal("create").describe("Create a new CI/CD variable"),
|
|
53
|
+
namespace: namespaceField,
|
|
54
|
+
key: keyField,
|
|
55
|
+
value: zod_1.z
|
|
56
|
+
.string()
|
|
57
|
+
.describe("The value of the CI/CD variable. For file type variables, this is the file content."),
|
|
58
|
+
variable_type: variableTypeField,
|
|
59
|
+
environment_scope: environmentScopeField,
|
|
60
|
+
protected: protectedField,
|
|
61
|
+
masked: maskedField,
|
|
62
|
+
raw: rawField,
|
|
63
|
+
description: descriptionField,
|
|
64
|
+
});
|
|
65
|
+
const UpdateVariableSchema = zod_1.z.object({
|
|
66
|
+
action: zod_1.z.literal("update").describe("Update an existing CI/CD variable"),
|
|
67
|
+
namespace: namespaceField,
|
|
68
|
+
key: keyField,
|
|
69
|
+
value: zod_1.z
|
|
46
70
|
.string()
|
|
47
71
|
.optional()
|
|
48
|
-
.describe("
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
72
|
+
.describe("The value of the CI/CD variable. For file type variables, this is the file content."),
|
|
73
|
+
variable_type: variableTypeField,
|
|
74
|
+
environment_scope: environmentScopeField,
|
|
75
|
+
protected: protectedField,
|
|
76
|
+
masked: maskedField,
|
|
77
|
+
raw: rawField,
|
|
78
|
+
description: descriptionField,
|
|
79
|
+
filter: filterField,
|
|
80
|
+
});
|
|
81
|
+
const DeleteVariableSchema = zod_1.z.object({
|
|
82
|
+
action: zod_1.z.literal("delete").describe("Delete a CI/CD variable"),
|
|
83
|
+
namespace: namespaceField,
|
|
84
|
+
key: keyField,
|
|
85
|
+
filter: filterField,
|
|
62
86
|
});
|
|
87
|
+
exports.ManageVariableSchema = zod_1.z.discriminatedUnion("action", [
|
|
88
|
+
CreateVariableSchema,
|
|
89
|
+
UpdateVariableSchema,
|
|
90
|
+
DeleteVariableSchema,
|
|
91
|
+
]);
|
|
63
92
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/entities/variables/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,oCAA2C;AAU3C,MAAM,oBAAoB,GAAG,OAAC,CAAC,UAAU,CACvC,GAAG,CAAC,EAAE;IACJ,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,MAAM,UAAU,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;QAC5C,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,UA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,OAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACzE,SAAS,EAAE,cAAc;IACzB,GAAG,EAAE,QAAQ;IACb,KAAK,EAAE,OAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,qFAAqF,CACtF;IACH,aAAa,EAAE,iBAAiB;IAChC,iBAAiB,EAAE,qBAAqB;IACxC,SAAS,EAAE,cAAc;IACzB,MAAM,EAAE,WAAW;IACnB,GAAG,EAAE,QAAQ;IACb,WAAW,EAAE,gBAAgB;IAC7B,MAAM,EAAE,WAAW;CACpB,CAAC,CAAC;AAGH,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IAC/D,SAAS,EAAE,cAAc;IACzB,GAAG,EAAE,QAAQ;IACb,MAAM,EAAE,WAAW;CACpB,CAAC,CAAC;AAGU,QAAA,oBAAoB,GAAG,OAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IACjE,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;CACrB,CAAC,CAAC"}
|
|
@@ -41,6 +41,7 @@ const z = __importStar(require("zod"));
|
|
|
41
41
|
const schema_readonly_1 = require("./schema-readonly");
|
|
42
42
|
const schema_1 = require("./schema");
|
|
43
43
|
const gitlab_api_1 = require("../../utils/gitlab-api");
|
|
44
|
+
const config_1 = require("../../config");
|
|
44
45
|
exports.webhooksToolRegistry = new Map([
|
|
45
46
|
[
|
|
46
47
|
"list_webhooks",
|
|
@@ -49,19 +50,26 @@ exports.webhooksToolRegistry = new Map([
|
|
|
49
50
|
description: "List all webhooks configured for a project or group. Use to discover existing integrations, audit webhook configurations, debug delivery issues, or understand event subscriptions. Shows webhook URLs, enabled event types, SSL settings, and delivery status. Group webhooks (Premium tier) are inherited by all child projects.",
|
|
50
51
|
inputSchema: z.toJSONSchema(schema_readonly_1.ListWebhooksSchema),
|
|
51
52
|
handler: async (args) => {
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return gitlab_api_1.gitlab.get(`projects/${encodeURIComponent(projectId)}/hooks`, {
|
|
56
|
-
query: (0, gitlab_api_1.toQuery)(queryParams, []),
|
|
57
|
-
});
|
|
53
|
+
const input = schema_readonly_1.ListWebhooksSchema.parse(args);
|
|
54
|
+
if ((0, config_1.isActionDenied)("list_webhooks", input.scope)) {
|
|
55
|
+
throw new Error(`Scope '${input.scope}' is not allowed for list_webhooks tool`);
|
|
58
56
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
switch (input.scope) {
|
|
58
|
+
case "project": {
|
|
59
|
+
const { scope: _scope, projectId, ...queryParams } = input;
|
|
60
|
+
return gitlab_api_1.gitlab.get(`projects/${encodeURIComponent(projectId)}/hooks`, {
|
|
61
|
+
query: (0, gitlab_api_1.toQuery)(queryParams, []),
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
case "group": {
|
|
65
|
+
const { scope: _scope, groupId, ...queryParams } = input;
|
|
66
|
+
return gitlab_api_1.gitlab.get(`groups/${encodeURIComponent(groupId)}/hooks`, {
|
|
67
|
+
query: (0, gitlab_api_1.toQuery)(queryParams, []),
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
default:
|
|
71
|
+
throw new Error(`Unknown scope: ${input.scope}`);
|
|
63
72
|
}
|
|
64
|
-
throw new Error("Invalid scope or missing project/group ID");
|
|
65
73
|
},
|
|
66
74
|
},
|
|
67
75
|
],
|
|
@@ -72,71 +80,65 @@ exports.webhooksToolRegistry = new Map([
|
|
|
72
80
|
description: "Manage webhooks with full CRUD operations plus testing. Actions: 'create' (add new webhook with URL and event types), 'read' (get webhook details - SAFE FOR READ-ONLY MODE), 'update' (modify URL, events, or settings), 'delete' (remove webhook), 'test' (trigger test delivery for specific event type). Use for setting up CI/CD automation, configuring notifications, integrating external systems, debugging deliveries, or managing event subscriptions. Test action sends actual HTTP request to configured URL. Group webhooks require Premium tier. NOTE: In read-only mode, only 'read' action is allowed; write operations are blocked at handler level.",
|
|
73
81
|
inputSchema: z.toJSONSchema(schema_1.ManageWebhookSchema),
|
|
74
82
|
handler: async (args) => {
|
|
75
|
-
const
|
|
76
|
-
|
|
83
|
+
const input = schema_1.ManageWebhookSchema.parse(args);
|
|
84
|
+
if ((0, config_1.isActionDenied)("manage_webhook", input.action)) {
|
|
85
|
+
throw new Error(`Action '${input.action}' is not allowed for manage_webhook tool`);
|
|
86
|
+
}
|
|
77
87
|
const isReadOnly = process.env.GITLAB_READ_ONLY_MODE === "true";
|
|
78
|
-
if (isReadOnly && action !== "read") {
|
|
79
|
-
throw new Error(`Operation '${action}' is not allowed in read-only mode. Only 'read' action is permitted.`);
|
|
88
|
+
if (isReadOnly && input.action !== "read") {
|
|
89
|
+
throw new Error(`Operation '${input.action}' is not allowed in read-only mode. Only 'read' action is permitted.`);
|
|
80
90
|
}
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
91
|
+
const getBasePath = (scope, projectId, groupId) => {
|
|
92
|
+
if (scope === "project" && projectId) {
|
|
93
|
+
return `projects/${encodeURIComponent(projectId)}/hooks`;
|
|
94
|
+
}
|
|
95
|
+
else if (scope === "group" && groupId) {
|
|
96
|
+
return `groups/${encodeURIComponent(groupId)}/hooks`;
|
|
97
|
+
}
|
|
87
98
|
throw new Error("Invalid scope or missing project/group ID");
|
|
88
|
-
}
|
|
99
|
+
};
|
|
89
100
|
const buildRequestBody = (data) => {
|
|
90
101
|
const body = {};
|
|
91
102
|
for (const [key, value] of Object.entries(data)) {
|
|
92
|
-
if (value !== undefined &&
|
|
103
|
+
if (value !== undefined &&
|
|
104
|
+
!["action", "scope", "projectId", "groupId", "hookId", "trigger"].includes(key)) {
|
|
93
105
|
body[key] = value;
|
|
94
106
|
}
|
|
95
107
|
}
|
|
96
108
|
return body;
|
|
97
109
|
};
|
|
98
|
-
switch (action) {
|
|
110
|
+
switch (input.action) {
|
|
99
111
|
case "create": {
|
|
112
|
+
const basePath = getBasePath(input.scope, input.projectId, input.groupId);
|
|
100
113
|
return gitlab_api_1.gitlab.post(basePath, {
|
|
101
|
-
body: buildRequestBody(
|
|
114
|
+
body: buildRequestBody(input),
|
|
102
115
|
contentType: "json",
|
|
103
116
|
});
|
|
104
117
|
}
|
|
105
118
|
case "read": {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
return gitlab_api_1.gitlab.get(`${basePath}/${hookId}`);
|
|
119
|
+
const basePath = getBasePath(input.scope, input.projectId, input.groupId);
|
|
120
|
+
return gitlab_api_1.gitlab.get(`${basePath}/${input.hookId}`);
|
|
110
121
|
}
|
|
111
122
|
case "update": {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return gitlab_api_1.gitlab.put(`${basePath}/${hookId}`, {
|
|
116
|
-
body: buildRequestBody(webhookData),
|
|
123
|
+
const basePath = getBasePath(input.scope, input.projectId, input.groupId);
|
|
124
|
+
return gitlab_api_1.gitlab.put(`${basePath}/${input.hookId}`, {
|
|
125
|
+
body: buildRequestBody(input),
|
|
117
126
|
contentType: "json",
|
|
118
127
|
});
|
|
119
128
|
}
|
|
120
129
|
case "delete": {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
await gitlab_api_1.gitlab.delete(`${basePath}/${hookId}`);
|
|
130
|
+
const basePath = getBasePath(input.scope, input.projectId, input.groupId);
|
|
131
|
+
await gitlab_api_1.gitlab.delete(`${basePath}/${input.hookId}`);
|
|
125
132
|
return { success: true, message: "Webhook deleted successfully" };
|
|
126
133
|
}
|
|
127
134
|
case "test": {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
if (!trigger) {
|
|
132
|
-
throw new Error("trigger is required for test action");
|
|
133
|
-
}
|
|
134
|
-
return gitlab_api_1.gitlab.post(`${basePath}/${hookId}/test/${trigger}`, {
|
|
135
|
+
const basePath = getBasePath(input.scope, input.projectId, input.groupId);
|
|
136
|
+
return gitlab_api_1.gitlab.post(`${basePath}/${input.hookId}/test/${input.trigger}`, {
|
|
135
137
|
contentType: "json",
|
|
136
138
|
});
|
|
137
139
|
}
|
|
138
140
|
default:
|
|
139
|
-
throw new Error(`Unknown action: ${action}`);
|
|
141
|
+
throw new Error(`Unknown action: ${input.action}`);
|
|
140
142
|
}
|
|
141
143
|
},
|
|
142
144
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/entities/webhooks/registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/entities/webhooks/registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuKA,oEAOC;AAKD,gEAEC;AAKD,4DAQC;AAlMD,uCAAyB;AACzB,uDAAuD;AACvD,qCAA+C;AAC/C,uDAAyD;AAGzD,yCAA8C;AAQjC,QAAA,oBAAoB,GAAiB,IAAI,GAAG,CAAiC;IAKxF;QACE,eAAe;QACf;YACE,IAAI,EAAE,eAAe;YACrB,WAAW,EACT,oUAAoU;YACtU,WAAW,EAAE,CAAC,CAAC,YAAY,CAAC,oCAAkB,CAAC;YAC/C,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;gBAC/B,MAAM,KAAK,GAAG,oCAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAG7C,IAAI,IAAA,uBAAc,EAAC,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjD,MAAM,IAAI,KAAK,CAAC,UAAU,KAAK,CAAC,KAAK,yCA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EZ,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;wBAE1E,OAAO,mBAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,IAAI,KAAK,CAAC,MAAM,SAAS,KAAK,CAAC,OAAO,EAAE,EAAE;4BACtE,WAAW,EAAE,MAAM;yBACpB,CAAC,CAAC;oBACL,CAAC;oBAGD;wBACE,MAAM,IAAI,KAAK,CAAC,mBAAoB,KAA4B,CAAC,MAAM,EAAE,CAAC,CAAC;gBAC/E,CAAC;YACH,CAAC;SACF;KACF;CACF,CAAC,CAAC;AAKH,SAAgB,4BAA4B;IAM1C,OAAO,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;AAC7C,CAAC;AAKD,SAAgB,0BAA0B;IACxC,OAAO,KAAK,CAAC,IAAI,CAAC,4BAAoB,CAAC,MAAM,EAAE,CAAC,CAAC;AACnD,CAAC;AAKD,SAAgB,wBAAwB,CAAC,eAAwB,KAAK;IACpE,IAAI,YAAY,EAAE,CAAC;QACjB,MAAM,aAAa,GAAG,4BAA4B,EAAE,CAAC;QACrD,OAAO,KAAK,CAAC,IAAI,CAAC,4BAAoB,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAC7D,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAClC,CAAC;IACJ,CAAC;IACD,OAAO,0BAA0B,EAAE,CAAC;AACtC,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const ListWebhooksSchema: z.ZodObject<{
|
|
3
|
-
scope: z.
|
|
4
|
-
|
|
5
|
-
group: "group";
|
|
6
|
-
}>;
|
|
7
|
-
projectId: z.ZodOptional<z.ZodString>;
|
|
8
|
-
groupId: z.ZodOptional<z.ZodString>;
|
|
2
|
+
export declare const ListWebhooksSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
scope: z.ZodLiteral<"project">;
|
|
4
|
+
projectId: z.ZodString;
|
|
9
5
|
page: z.ZodOptional<z.ZodNumber>;
|
|
10
6
|
per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
11
|
-
}, z.core.$strip
|
|
7
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8
|
+
scope: z.ZodLiteral<"group">;
|
|
9
|
+
groupId: z.ZodString;
|
|
10
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
12
|
+
}, z.core.$strip>], "scope">;
|
|
12
13
|
export type ListWebhooksOptions = z.infer<typeof ListWebhooksSchema>;
|
|
@@ -3,15 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ListWebhooksSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const shared_1 = require("../shared");
|
|
6
|
-
const
|
|
7
|
-
exports.ListWebhooksSchema = zod_1.z
|
|
6
|
+
const ListProjectWebhooksSchema = zod_1.z
|
|
8
7
|
.object({
|
|
9
|
-
scope: zod_1.z.
|
|
10
|
-
projectId: zod_1.z.string().
|
|
11
|
-
groupId: zod_1.z.string().optional().describe("Group ID or path (required if scope=group)"),
|
|
8
|
+
scope: zod_1.z.literal("project").describe("List webhooks for a project"),
|
|
9
|
+
projectId: zod_1.z.string().describe("Project ID or path"),
|
|
12
10
|
})
|
|
13
|
-
.merge(shared_1.PaginationOptionsSchema)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
.merge(shared_1.PaginationOptionsSchema);
|
|
12
|
+
const ListGroupWebhooksSchema = zod_1.z
|
|
13
|
+
.object({
|
|
14
|
+
scope: zod_1.z.literal("group").describe("List webhooks for a group"),
|
|
15
|
+
groupId: zod_1.z.string().describe("Group ID or path"),
|
|
16
|
+
})
|
|
17
|
+
.merge(shared_1.PaginationOptionsSchema);
|
|
18
|
+
exports.ListWebhooksSchema = zod_1.z.discriminatedUnion("scope", [
|
|
19
|
+
ListProjectWebhooksSchema,
|
|
20
|
+
ListGroupWebhooksSchema,
|
|
21
|
+
]);
|
|
17
22
|
//# sourceMappingURL=schema-readonly.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-readonly.js","sourceRoot":"","sources":["../../../../src/entities/webhooks/schema-readonly.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sCAAoD;
|
|
1
|
+
{"version":3,"file":"schema-readonly.js","sourceRoot":"","sources":["../../../../src/entities/webhooks/schema-readonly.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sCAAoD;AAapD,MAAM,yBAAyB,GAAG,OAAC;KAChC,MAAM,CAAC;IACN,KAAK,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IACnE,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;CACrD,CAAC;KACD,KAAK,CAAC,gCAAuB,CAAC,CAAC;AAGlC,MAAM,uBAAuB,GAAG,OAAC;KAC9B,MAAM,CAAC;IACN,KAAK,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAC/D,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;CACjD,CAAC;KACD,KAAK,CAAC,gCAAuB,CAAC,CAAC;AAGrB,QAAA,kBAAkB,GAAG,OAAC,CAAC,kBAAkB,CAAC,OAAO,EAAE;IAC9D,yBAAyB;IACzB,uBAAuB;CACxB,CAAC,CAAC"}
|
|
@@ -1,38 +1,46 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const ManageWebhookSchema: z.ZodObject<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
export declare const ManageWebhookSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
push_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
4
|
+
push_events_branch_filter: z.ZodOptional<z.ZodString>;
|
|
5
|
+
tag_push_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
6
|
+
merge_requests_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
7
|
+
issues_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
8
|
+
confidential_issues_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
9
|
+
note_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
10
|
+
confidential_note_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
11
|
+
job_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
12
|
+
pipeline_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
13
|
+
wiki_page_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
14
|
+
deployment_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
15
|
+
feature_flag_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
16
|
+
releases_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
17
|
+
emoji_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
18
|
+
resource_access_token_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
19
|
+
member_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
20
|
+
subgroup_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
21
|
+
project_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
22
|
+
enable_ssl_verification: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
23
|
+
action: z.ZodLiteral<"create">;
|
|
10
24
|
scope: z.ZodEnum<{
|
|
11
25
|
project: "project";
|
|
12
26
|
group: "group";
|
|
13
27
|
}>;
|
|
14
28
|
projectId: z.ZodOptional<z.ZodString>;
|
|
15
29
|
groupId: z.ZodOptional<z.ZodString>;
|
|
16
|
-
|
|
17
|
-
trigger: z.ZodOptional<z.ZodEnum<{
|
|
18
|
-
push_events: "push_events";
|
|
19
|
-
tag_push_events: "tag_push_events";
|
|
20
|
-
merge_requests_events: "merge_requests_events";
|
|
21
|
-
issues_events: "issues_events";
|
|
22
|
-
confidential_issues_events: "confidential_issues_events";
|
|
23
|
-
note_events: "note_events";
|
|
24
|
-
job_events: "job_events";
|
|
25
|
-
pipeline_events: "pipeline_events";
|
|
26
|
-
wiki_page_events: "wiki_page_events";
|
|
27
|
-
releases_events: "releases_events";
|
|
28
|
-
milestone_events: "milestone_events";
|
|
29
|
-
emoji_events: "emoji_events";
|
|
30
|
-
resource_access_token_events: "resource_access_token_events";
|
|
31
|
-
}>>;
|
|
32
|
-
url: z.ZodOptional<z.ZodString>;
|
|
30
|
+
url: z.ZodString;
|
|
33
31
|
name: z.ZodOptional<z.ZodString>;
|
|
34
32
|
description: z.ZodOptional<z.ZodString>;
|
|
35
33
|
token: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
action: z.ZodLiteral<"read">;
|
|
36
|
+
scope: z.ZodEnum<{
|
|
37
|
+
project: "project";
|
|
38
|
+
group: "group";
|
|
39
|
+
}>;
|
|
40
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
41
|
+
groupId: z.ZodOptional<z.ZodString>;
|
|
42
|
+
hookId: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
43
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
36
44
|
push_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
37
45
|
push_events_branch_filter: z.ZodOptional<z.ZodString>;
|
|
38
46
|
tag_push_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
@@ -53,5 +61,50 @@ export declare const ManageWebhookSchema: z.ZodObject<{
|
|
|
53
61
|
subgroup_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
54
62
|
project_events: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
55
63
|
enable_ssl_verification: z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>;
|
|
56
|
-
|
|
64
|
+
action: z.ZodLiteral<"update">;
|
|
65
|
+
scope: z.ZodEnum<{
|
|
66
|
+
project: "project";
|
|
67
|
+
group: "group";
|
|
68
|
+
}>;
|
|
69
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
70
|
+
groupId: z.ZodOptional<z.ZodString>;
|
|
71
|
+
hookId: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
72
|
+
url: z.ZodOptional<z.ZodString>;
|
|
73
|
+
name: z.ZodOptional<z.ZodString>;
|
|
74
|
+
description: z.ZodOptional<z.ZodString>;
|
|
75
|
+
token: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
+
action: z.ZodLiteral<"delete">;
|
|
78
|
+
scope: z.ZodEnum<{
|
|
79
|
+
project: "project";
|
|
80
|
+
group: "group";
|
|
81
|
+
}>;
|
|
82
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
83
|
+
groupId: z.ZodOptional<z.ZodString>;
|
|
84
|
+
hookId: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
85
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
86
|
+
action: z.ZodLiteral<"test">;
|
|
87
|
+
scope: z.ZodEnum<{
|
|
88
|
+
project: "project";
|
|
89
|
+
group: "group";
|
|
90
|
+
}>;
|
|
91
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
92
|
+
groupId: z.ZodOptional<z.ZodString>;
|
|
93
|
+
hookId: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
94
|
+
trigger: z.ZodEnum<{
|
|
95
|
+
push_events: "push_events";
|
|
96
|
+
tag_push_events: "tag_push_events";
|
|
97
|
+
merge_requests_events: "merge_requests_events";
|
|
98
|
+
issues_events: "issues_events";
|
|
99
|
+
confidential_issues_events: "confidential_issues_events";
|
|
100
|
+
note_events: "note_events";
|
|
101
|
+
job_events: "job_events";
|
|
102
|
+
pipeline_events: "pipeline_events";
|
|
103
|
+
wiki_page_events: "wiki_page_events";
|
|
104
|
+
releases_events: "releases_events";
|
|
105
|
+
milestone_events: "milestone_events";
|
|
106
|
+
emoji_events: "emoji_events";
|
|
107
|
+
resource_access_token_events: "resource_access_token_events";
|
|
108
|
+
}>;
|
|
109
|
+
}, z.core.$strip>], "action">;
|
|
57
110
|
export type ManageWebhookOptions = z.infer<typeof ManageWebhookSchema>;
|