@manojkmfsi/monodog 1.1.43 → 1.1.44
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/CHANGELOG.md +6 -0
- package/README.md +16 -2
- package/dist/config/swagger-config.js +9 -1050
- package/dist/config/swagger-paths-auth.js +236 -0
- package/dist/config/swagger-paths-packages.js +165 -0
- package/dist/config/swagger-paths-pipelines.js +78 -0
- package/dist/config/swagger-paths-publish.js +261 -0
- package/dist/config/swagger-paths-workflows.js +226 -0
- package/dist/config/swagger-paths.js +72 -0
- package/dist/config/swagger-schemas.js +630 -0
- package/dist/middleware/server-startup.js +4 -2
- package/dist/routes/pipeline-routes.js +22 -70
- package/dist/routes/workflow-routes.js +51 -0
- package/package.json +1 -1
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Swagger Auth Paths
|
|
4
|
+
* GitHub OAuth authentication and session management endpoints
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.authPaths = void 0;
|
|
8
|
+
exports.authPaths = {
|
|
9
|
+
'/auth/login': {
|
|
10
|
+
get: {
|
|
11
|
+
tags: ['Authentication'],
|
|
12
|
+
summary: 'Initiate GitHub OAuth login',
|
|
13
|
+
operationId: 'initiateLogin',
|
|
14
|
+
description: 'Starts the GitHub OAuth authentication flow and returns the authorization URL',
|
|
15
|
+
parameters: [
|
|
16
|
+
{
|
|
17
|
+
name: 'redirect',
|
|
18
|
+
in: 'query',
|
|
19
|
+
required: false,
|
|
20
|
+
description: 'URL to redirect to after successful authentication',
|
|
21
|
+
schema: { type: 'string' },
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
responses: {
|
|
25
|
+
'200': {
|
|
26
|
+
description: 'OAuth login initiated successfully',
|
|
27
|
+
content: {
|
|
28
|
+
'application/json': {
|
|
29
|
+
schema: {
|
|
30
|
+
type: 'object',
|
|
31
|
+
properties: {
|
|
32
|
+
success: { type: 'boolean' },
|
|
33
|
+
authUrl: { type: 'string', description: 'GitHub OAuth authorization URL' },
|
|
34
|
+
message: { type: 'string' },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
'500': { description: 'Internal server error' },
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
'/auth/callback': {
|
|
45
|
+
get: {
|
|
46
|
+
tags: ['Authentication'],
|
|
47
|
+
summary: 'Handle GitHub OAuth callback',
|
|
48
|
+
operationId: 'handleOAuthCallback',
|
|
49
|
+
description: 'Processes the OAuth callback from GitHub with authorization code and state',
|
|
50
|
+
parameters: [
|
|
51
|
+
{
|
|
52
|
+
name: 'code',
|
|
53
|
+
in: 'query',
|
|
54
|
+
required: true,
|
|
55
|
+
description: 'GitHub OAuth authorization code',
|
|
56
|
+
schema: { type: 'string' },
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'state',
|
|
60
|
+
in: 'query',
|
|
61
|
+
required: true,
|
|
62
|
+
description: 'State parameter for CSRF protection',
|
|
63
|
+
schema: { type: 'string' },
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'error',
|
|
67
|
+
in: 'query',
|
|
68
|
+
required: false,
|
|
69
|
+
description: 'OAuth error code if authentication failed',
|
|
70
|
+
schema: { type: 'string' },
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'error_description',
|
|
74
|
+
in: 'query',
|
|
75
|
+
required: false,
|
|
76
|
+
description: 'Detailed error message from OAuth provider',
|
|
77
|
+
schema: { type: 'string' },
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
responses: {
|
|
81
|
+
'200': {
|
|
82
|
+
description: 'OAuth callback processed successfully',
|
|
83
|
+
content: {
|
|
84
|
+
'application/json': {
|
|
85
|
+
schema: {
|
|
86
|
+
type: 'object',
|
|
87
|
+
properties: {
|
|
88
|
+
success: { type: 'boolean' },
|
|
89
|
+
sessionToken: { type: 'string', description: 'Session token for authenticated requests' },
|
|
90
|
+
user: {
|
|
91
|
+
type: 'object',
|
|
92
|
+
properties: {
|
|
93
|
+
id: { type: 'string' },
|
|
94
|
+
username: { type: 'string' },
|
|
95
|
+
email: { type: 'string' },
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
message: { type: 'string' },
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
'400': { description: 'Invalid request parameters or OAuth error' },
|
|
105
|
+
'500': { description: 'Internal server error' },
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
'/auth/me': {
|
|
110
|
+
get: {
|
|
111
|
+
tags: ['Authentication'],
|
|
112
|
+
summary: 'Get current user session',
|
|
113
|
+
operationId: 'getCurrentSession',
|
|
114
|
+
description: 'Retrieves the current authenticated user session information',
|
|
115
|
+
security: [{ BearerAuth: [] }],
|
|
116
|
+
responses: {
|
|
117
|
+
'200': {
|
|
118
|
+
description: 'User session retrieved successfully',
|
|
119
|
+
content: {
|
|
120
|
+
'application/json': {
|
|
121
|
+
schema: {
|
|
122
|
+
type: 'object',
|
|
123
|
+
properties: {
|
|
124
|
+
success: { type: 'boolean' },
|
|
125
|
+
user: {
|
|
126
|
+
type: 'object',
|
|
127
|
+
properties: {
|
|
128
|
+
id: { type: 'string' },
|
|
129
|
+
username: { type: 'string' },
|
|
130
|
+
email: { type: 'string' },
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
permissions: {
|
|
134
|
+
type: 'array',
|
|
135
|
+
items: { type: 'string' },
|
|
136
|
+
description: 'User repository permissions',
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
'401': { description: 'Unauthorized - no valid session' },
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
'/auth/validate': {
|
|
148
|
+
post: {
|
|
149
|
+
tags: ['Authentication'],
|
|
150
|
+
summary: 'Validate current session',
|
|
151
|
+
operationId: 'validateSession',
|
|
152
|
+
description: 'Validates the current user session and checks if it is still valid',
|
|
153
|
+
security: [{ BearerAuth: [] }],
|
|
154
|
+
responses: {
|
|
155
|
+
'200': {
|
|
156
|
+
description: 'Session validation result',
|
|
157
|
+
content: {
|
|
158
|
+
'application/json': {
|
|
159
|
+
schema: {
|
|
160
|
+
type: 'object',
|
|
161
|
+
properties: {
|
|
162
|
+
success: { type: 'boolean' },
|
|
163
|
+
valid: { type: 'boolean', description: 'Whether the session is valid' },
|
|
164
|
+
user: {
|
|
165
|
+
type: 'object',
|
|
166
|
+
properties: {
|
|
167
|
+
id: { type: 'string' },
|
|
168
|
+
username: { type: 'string' },
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
message: { type: 'string' },
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
'401': { description: 'Unauthorized - session invalid or expired' },
|
|
178
|
+
'500': { description: 'Internal server error' },
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
'/auth/logout': {
|
|
183
|
+
post: {
|
|
184
|
+
tags: ['Authentication'],
|
|
185
|
+
summary: 'Logout user',
|
|
186
|
+
operationId: 'logoutUser',
|
|
187
|
+
description: 'Logs out the current user and invalidates their session',
|
|
188
|
+
responses: {
|
|
189
|
+
'200': {
|
|
190
|
+
description: 'User logged out successfully',
|
|
191
|
+
content: {
|
|
192
|
+
'application/json': {
|
|
193
|
+
schema: {
|
|
194
|
+
type: 'object',
|
|
195
|
+
properties: {
|
|
196
|
+
success: { type: 'boolean' },
|
|
197
|
+
message: { type: 'string' },
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
'500': { description: 'Internal server error' },
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
'/auth/refresh': {
|
|
208
|
+
post: {
|
|
209
|
+
tags: ['Authentication'],
|
|
210
|
+
summary: 'Refresh user session',
|
|
211
|
+
operationId: 'refreshSession',
|
|
212
|
+
description: 'Refreshes the current user session and extends the expiration time',
|
|
213
|
+
security: [{ BearerAuth: [] }],
|
|
214
|
+
responses: {
|
|
215
|
+
'200': {
|
|
216
|
+
description: 'Session refreshed successfully',
|
|
217
|
+
content: {
|
|
218
|
+
'application/json': {
|
|
219
|
+
schema: {
|
|
220
|
+
type: 'object',
|
|
221
|
+
properties: {
|
|
222
|
+
success: { type: 'boolean' },
|
|
223
|
+
sessionToken: { type: 'string', description: 'New session token' },
|
|
224
|
+
expiresAt: { type: 'string', format: 'date-time', description: 'Session expiration time' },
|
|
225
|
+
message: { type: 'string' },
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
'401': { description: 'Unauthorized - session invalid or expired' },
|
|
232
|
+
'500': { description: 'Internal server error' },
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Swagger Packages, Health, Commits & Config Paths
|
|
4
|
+
* Package management, health monitoring, and configuration endpoints
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.configPaths = exports.commitsPaths = exports.healthPaths = exports.packagesPaths = void 0;
|
|
8
|
+
exports.packagesPaths = {
|
|
9
|
+
'/packages': {
|
|
10
|
+
get: {
|
|
11
|
+
tags: ['Packages'],
|
|
12
|
+
summary: 'Get all packages',
|
|
13
|
+
operationId: 'getPackages',
|
|
14
|
+
responses: {
|
|
15
|
+
'200': {
|
|
16
|
+
description: 'List of packages',
|
|
17
|
+
content: {
|
|
18
|
+
'application/json': {
|
|
19
|
+
schema: { type: 'array', items: { $ref: '#/components/schemas/Package' } },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
'500': { description: 'Internal server error' },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
'/packages/{name}': {
|
|
28
|
+
get: {
|
|
29
|
+
tags: ['Packages'],
|
|
30
|
+
summary: 'Get package by name',
|
|
31
|
+
operationId: 'getPackageByName',
|
|
32
|
+
parameters: [{ name: 'name', in: 'path', required: true, schema: { type: 'string' } }],
|
|
33
|
+
responses: {
|
|
34
|
+
'200': {
|
|
35
|
+
description: 'Package details',
|
|
36
|
+
content: {
|
|
37
|
+
'application/json': {
|
|
38
|
+
schema: { $ref: '#/components/schemas/Package' },
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
'404': { description: 'Package not found' },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
'/packages/refresh': {
|
|
47
|
+
post: {
|
|
48
|
+
tags: ['Packages'],
|
|
49
|
+
summary: 'Refresh packages',
|
|
50
|
+
operationId: 'refreshPackages',
|
|
51
|
+
responses: {
|
|
52
|
+
'200': { description: 'Packages refreshed successfully' },
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
'/packages/update-config': {
|
|
57
|
+
put: {
|
|
58
|
+
tags: ['Packages'],
|
|
59
|
+
summary: 'Update package configuration',
|
|
60
|
+
operationId: 'updatePackageConfig',
|
|
61
|
+
requestBody: {
|
|
62
|
+
required: true,
|
|
63
|
+
content: {
|
|
64
|
+
'application/json': {
|
|
65
|
+
schema: { $ref: '#/components/schemas/Package' },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
responses: {
|
|
70
|
+
'200': { description: 'Package configuration updated successfully' },
|
|
71
|
+
'400': { description: 'Invalid request' },
|
|
72
|
+
'404': { description: 'Package not found' },
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
exports.healthPaths = {
|
|
78
|
+
'/health/packages': {
|
|
79
|
+
get: {
|
|
80
|
+
tags: ['Health'],
|
|
81
|
+
summary: 'Get packages health status',
|
|
82
|
+
operationId: 'getPackagesHealth',
|
|
83
|
+
responses: {
|
|
84
|
+
'200': {
|
|
85
|
+
description: 'Health status of all packages',
|
|
86
|
+
content: {
|
|
87
|
+
'application/json': {
|
|
88
|
+
schema: { type: 'array', items: { $ref: '#/components/schemas/PackageHealth' } },
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
'/health/refresh': {
|
|
96
|
+
post: {
|
|
97
|
+
tags: ['Health'],
|
|
98
|
+
summary: 'Refresh health status',
|
|
99
|
+
operationId: 'refreshHealth',
|
|
100
|
+
responses: {
|
|
101
|
+
'200': { description: 'Health status refreshed successfully' },
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
exports.commitsPaths = {
|
|
107
|
+
'/commits/{packagePath}': {
|
|
108
|
+
get: {
|
|
109
|
+
tags: ['Commits'],
|
|
110
|
+
summary: 'Get commits for a package',
|
|
111
|
+
operationId: 'getCommits',
|
|
112
|
+
parameters: [{ name: 'packagePath', in: 'path', required: true, schema: { type: 'string' } }],
|
|
113
|
+
responses: {
|
|
114
|
+
'200': {
|
|
115
|
+
description: 'List of commits',
|
|
116
|
+
content: {
|
|
117
|
+
'application/json': {
|
|
118
|
+
schema: { type: 'array', items: { $ref: '#/components/schemas/Commit' } },
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
exports.configPaths = {
|
|
127
|
+
'/config/files': {
|
|
128
|
+
get: {
|
|
129
|
+
tags: ['Configuration'],
|
|
130
|
+
summary: 'Get configuration files',
|
|
131
|
+
operationId: 'getConfigFiles',
|
|
132
|
+
responses: {
|
|
133
|
+
'200': {
|
|
134
|
+
description: 'List of configuration files',
|
|
135
|
+
content: {
|
|
136
|
+
'application/json': {
|
|
137
|
+
schema: { type: 'array', items: { $ref: '#/components/schemas/ConfigFile' } },
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
'/config/files/{id}': {
|
|
145
|
+
put: {
|
|
146
|
+
tags: ['Configuration'],
|
|
147
|
+
summary: 'Update configuration file',
|
|
148
|
+
operationId: 'updateConfigFile',
|
|
149
|
+
parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'string' } }],
|
|
150
|
+
requestBody: {
|
|
151
|
+
required: true,
|
|
152
|
+
content: {
|
|
153
|
+
'application/json': {
|
|
154
|
+
schema: { $ref: '#/components/schemas/ConfigFile' },
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
responses: {
|
|
159
|
+
'200': { description: 'Configuration file updated successfully' },
|
|
160
|
+
'400': { description: 'Invalid request' },
|
|
161
|
+
'404': { description: 'Configuration file not found' },
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Swagger Pipelines Paths
|
|
4
|
+
* GitHub Actions pipeline management and monitoring endpoints
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.pipelinesPaths = void 0;
|
|
8
|
+
exports.pipelinesPaths = {
|
|
9
|
+
'/pipelines': {
|
|
10
|
+
get: {
|
|
11
|
+
tags: ['Pipelines'],
|
|
12
|
+
summary: 'Get recent pipelines',
|
|
13
|
+
operationId: 'getRecentPipelines',
|
|
14
|
+
description: 'Retrieves recent GitHub Actions pipelines and workflow runs for the repository',
|
|
15
|
+
security: [{ BearerAuth: [] }],
|
|
16
|
+
responses: {
|
|
17
|
+
'200': {
|
|
18
|
+
description: 'List of recent pipelines',
|
|
19
|
+
content: {
|
|
20
|
+
'application/json': {
|
|
21
|
+
schema: { type: 'array', items: { $ref: '#/components/schemas/Pipeline' } },
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
'401': { description: 'Unauthorized - authentication required' },
|
|
26
|
+
'500': { description: 'Internal server error' },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
'/pipelines/{pipelineId}/status': {
|
|
31
|
+
put: {
|
|
32
|
+
tags: ['Pipelines'],
|
|
33
|
+
summary: 'Update pipeline status',
|
|
34
|
+
operationId: 'updatePipelineStatus',
|
|
35
|
+
description: 'Updates the status of a pipeline based on the latest workflow run',
|
|
36
|
+
security: [{ BearerAuth: [] }],
|
|
37
|
+
parameters: [{ name: 'pipelineId', in: 'path', required: true, schema: { type: 'string' } }],
|
|
38
|
+
requestBody: {
|
|
39
|
+
required: true,
|
|
40
|
+
content: {
|
|
41
|
+
'application/json': {
|
|
42
|
+
schema: { $ref: '#/components/schemas/PipelineStatus' },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
responses: {
|
|
47
|
+
'200': { description: 'Pipeline status updated successfully' },
|
|
48
|
+
'400': { description: 'Invalid request' },
|
|
49
|
+
'401': { description: 'Unauthorized - authentication required' },
|
|
50
|
+
'404': { description: 'Pipeline not found' },
|
|
51
|
+
'500': { description: 'Internal server error' },
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
'/pipelines/{pipelineId}/audit-logs': {
|
|
56
|
+
get: {
|
|
57
|
+
tags: ['Pipelines'],
|
|
58
|
+
summary: 'Get pipeline audit logs',
|
|
59
|
+
operationId: 'getPipelineAuditLogs',
|
|
60
|
+
description: 'Retrieves audit logs for a specific pipeline including all status changes and events',
|
|
61
|
+
security: [{ BearerAuth: [] }],
|
|
62
|
+
parameters: [{ name: 'pipelineId', in: 'path', required: true, schema: { type: 'string' } }],
|
|
63
|
+
responses: {
|
|
64
|
+
'200': {
|
|
65
|
+
description: 'Pipeline audit logs',
|
|
66
|
+
content: {
|
|
67
|
+
'application/json': {
|
|
68
|
+
schema: { type: 'array', items: { $ref: '#/components/schemas/AuditLog' } },
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
'401': { description: 'Unauthorized - authentication required' },
|
|
73
|
+
'404': { description: 'Pipeline not found' },
|
|
74
|
+
'500': { description: 'Internal server error' },
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|