@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
|
@@ -3,9 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.swaggerOptions = exports.swaggerDefinition = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Swagger API Documentation Configuration
|
|
6
|
-
*
|
|
6
|
+
* Main configuration file that assembles OpenAPI specification for MonoDog API
|
|
7
|
+
*
|
|
8
|
+
* Imports API paths, schemas, and other components from dedicated modules
|
|
9
|
+
* for better maintainability and organization.
|
|
7
10
|
*/
|
|
8
11
|
const config_loader_1 = require("../config-loader");
|
|
12
|
+
const swagger_paths_1 = require("./swagger-paths");
|
|
13
|
+
const swagger_schemas_1 = require("./swagger-schemas");
|
|
9
14
|
exports.swaggerDefinition = {
|
|
10
15
|
openapi: '3.0.0',
|
|
11
16
|
info: {
|
|
@@ -27,1055 +32,9 @@ exports.swaggerDefinition = {
|
|
|
27
32
|
description: 'Development server',
|
|
28
33
|
},
|
|
29
34
|
],
|
|
30
|
-
paths:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
tags: ['Authentication'],
|
|
34
|
-
summary: 'Initiate GitHub OAuth login',
|
|
35
|
-
operationId: 'initiateLogin',
|
|
36
|
-
description: 'Starts the GitHub OAuth authentication flow and returns the authorization URL',
|
|
37
|
-
parameters: [
|
|
38
|
-
{
|
|
39
|
-
name: 'redirect',
|
|
40
|
-
in: 'query',
|
|
41
|
-
required: false,
|
|
42
|
-
description: 'URL to redirect to after successful authentication',
|
|
43
|
-
schema: { type: 'string' },
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
responses: {
|
|
47
|
-
'200': {
|
|
48
|
-
description: 'OAuth login initiated successfully',
|
|
49
|
-
content: {
|
|
50
|
-
'application/json': {
|
|
51
|
-
schema: {
|
|
52
|
-
type: 'object',
|
|
53
|
-
properties: {
|
|
54
|
-
success: { type: 'boolean' },
|
|
55
|
-
authUrl: { type: 'string', description: 'GitHub OAuth authorization URL' },
|
|
56
|
-
message: { type: 'string' },
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
'500': { description: 'Internal server error' },
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
'/auth/callback': {
|
|
67
|
-
get: {
|
|
68
|
-
tags: ['Authentication'],
|
|
69
|
-
summary: 'Handle GitHub OAuth callback',
|
|
70
|
-
operationId: 'handleOAuthCallback',
|
|
71
|
-
description: 'Processes the OAuth callback from GitHub with authorization code and state',
|
|
72
|
-
parameters: [
|
|
73
|
-
{
|
|
74
|
-
name: 'code',
|
|
75
|
-
in: 'query',
|
|
76
|
-
required: true,
|
|
77
|
-
description: 'GitHub OAuth authorization code',
|
|
78
|
-
schema: { type: 'string' },
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
name: 'state',
|
|
82
|
-
in: 'query',
|
|
83
|
-
required: true,
|
|
84
|
-
description: 'State parameter for CSRF protection',
|
|
85
|
-
schema: { type: 'string' },
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
name: 'error',
|
|
89
|
-
in: 'query',
|
|
90
|
-
required: false,
|
|
91
|
-
description: 'OAuth error code if authentication failed',
|
|
92
|
-
schema: { type: 'string' },
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
name: 'error_description',
|
|
96
|
-
in: 'query',
|
|
97
|
-
required: false,
|
|
98
|
-
description: 'Detailed error message from OAuth provider',
|
|
99
|
-
schema: { type: 'string' },
|
|
100
|
-
},
|
|
101
|
-
],
|
|
102
|
-
responses: {
|
|
103
|
-
'200': {
|
|
104
|
-
description: 'OAuth callback processed successfully',
|
|
105
|
-
content: {
|
|
106
|
-
'application/json': {
|
|
107
|
-
schema: {
|
|
108
|
-
type: 'object',
|
|
109
|
-
properties: {
|
|
110
|
-
success: { type: 'boolean' },
|
|
111
|
-
sessionToken: { type: 'string', description: 'Session token for authenticated requests' },
|
|
112
|
-
user: {
|
|
113
|
-
type: 'object',
|
|
114
|
-
properties: {
|
|
115
|
-
id: { type: 'string' },
|
|
116
|
-
username: { type: 'string' },
|
|
117
|
-
email: { type: 'string' },
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
message: { type: 'string' },
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
'400': { description: 'Invalid request parameters or OAuth error' },
|
|
127
|
-
'500': { description: 'Internal server error' },
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
'/auth/me': {
|
|
132
|
-
get: {
|
|
133
|
-
tags: ['Authentication'],
|
|
134
|
-
summary: 'Get current user session',
|
|
135
|
-
operationId: 'getCurrentSession',
|
|
136
|
-
description: 'Retrieves the current authenticated user session information',
|
|
137
|
-
security: [{ BearerAuth: [] }],
|
|
138
|
-
responses: {
|
|
139
|
-
'200': {
|
|
140
|
-
description: 'User session retrieved successfully',
|
|
141
|
-
content: {
|
|
142
|
-
'application/json': {
|
|
143
|
-
schema: {
|
|
144
|
-
type: 'object',
|
|
145
|
-
properties: {
|
|
146
|
-
success: { type: 'boolean' },
|
|
147
|
-
user: {
|
|
148
|
-
type: 'object',
|
|
149
|
-
properties: {
|
|
150
|
-
id: { type: 'string' },
|
|
151
|
-
username: { type: 'string' },
|
|
152
|
-
email: { type: 'string' },
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
permissions: {
|
|
156
|
-
type: 'array',
|
|
157
|
-
items: { type: 'string' },
|
|
158
|
-
description: 'User repository permissions',
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
'401': { description: 'Unauthorized - no valid session' },
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
'/auth/validate': {
|
|
170
|
-
post: {
|
|
171
|
-
tags: ['Authentication'],
|
|
172
|
-
summary: 'Validate current session',
|
|
173
|
-
operationId: 'validateSession',
|
|
174
|
-
description: 'Validates the current user session and checks if it is still valid',
|
|
175
|
-
security: [{ BearerAuth: [] }],
|
|
176
|
-
responses: {
|
|
177
|
-
'200': {
|
|
178
|
-
description: 'Session validation result',
|
|
179
|
-
content: {
|
|
180
|
-
'application/json': {
|
|
181
|
-
schema: {
|
|
182
|
-
type: 'object',
|
|
183
|
-
properties: {
|
|
184
|
-
success: { type: 'boolean' },
|
|
185
|
-
valid: { type: 'boolean', description: 'Whether the session is valid' },
|
|
186
|
-
user: {
|
|
187
|
-
type: 'object',
|
|
188
|
-
properties: {
|
|
189
|
-
id: { type: 'string' },
|
|
190
|
-
username: { type: 'string' },
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
message: { type: 'string' },
|
|
194
|
-
},
|
|
195
|
-
},
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
'401': { description: 'Unauthorized - session invalid or expired' },
|
|
200
|
-
'500': { description: 'Internal server error' },
|
|
201
|
-
},
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
'/auth/logout': {
|
|
205
|
-
post: {
|
|
206
|
-
tags: ['Authentication'],
|
|
207
|
-
summary: 'Logout user',
|
|
208
|
-
operationId: 'logoutUser',
|
|
209
|
-
description: 'Logs out the current user and invalidates their session',
|
|
210
|
-
responses: {
|
|
211
|
-
'200': {
|
|
212
|
-
description: 'User logged out successfully',
|
|
213
|
-
content: {
|
|
214
|
-
'application/json': {
|
|
215
|
-
schema: {
|
|
216
|
-
type: 'object',
|
|
217
|
-
properties: {
|
|
218
|
-
success: { type: 'boolean' },
|
|
219
|
-
message: { type: 'string' },
|
|
220
|
-
},
|
|
221
|
-
},
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
},
|
|
225
|
-
'500': { description: 'Internal server error' },
|
|
226
|
-
},
|
|
227
|
-
},
|
|
228
|
-
},
|
|
229
|
-
'/auth/refresh': {
|
|
230
|
-
post: {
|
|
231
|
-
tags: ['Authentication'],
|
|
232
|
-
summary: 'Refresh user session',
|
|
233
|
-
operationId: 'refreshSession',
|
|
234
|
-
description: 'Refreshes the current user session and extends the expiration time',
|
|
235
|
-
security: [{ BearerAuth: [] }],
|
|
236
|
-
responses: {
|
|
237
|
-
'200': {
|
|
238
|
-
description: 'Session refreshed successfully',
|
|
239
|
-
content: {
|
|
240
|
-
'application/json': {
|
|
241
|
-
schema: {
|
|
242
|
-
type: 'object',
|
|
243
|
-
properties: {
|
|
244
|
-
success: { type: 'boolean' },
|
|
245
|
-
sessionToken: { type: 'string', description: 'New session token' },
|
|
246
|
-
expiresAt: { type: 'string', format: 'date-time', description: 'Session expiration time' },
|
|
247
|
-
message: { type: 'string' },
|
|
248
|
-
},
|
|
249
|
-
},
|
|
250
|
-
},
|
|
251
|
-
},
|
|
252
|
-
},
|
|
253
|
-
'401': { description: 'Unauthorized - session invalid or expired' },
|
|
254
|
-
'500': { description: 'Internal server error' },
|
|
255
|
-
},
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
-
'/packages': {
|
|
259
|
-
get: {
|
|
260
|
-
tags: ['Packages'],
|
|
261
|
-
summary: 'Get all packages',
|
|
262
|
-
operationId: 'getPackages',
|
|
263
|
-
responses: {
|
|
264
|
-
'200': {
|
|
265
|
-
description: 'List of packages',
|
|
266
|
-
content: {
|
|
267
|
-
'application/json': {
|
|
268
|
-
schema: { type: 'array', items: { $ref: '#/components/schemas/Package' } },
|
|
269
|
-
},
|
|
270
|
-
},
|
|
271
|
-
},
|
|
272
|
-
'500': { description: 'Internal server error' },
|
|
273
|
-
},
|
|
274
|
-
},
|
|
275
|
-
},
|
|
276
|
-
'/packages/{name}': {
|
|
277
|
-
get: {
|
|
278
|
-
tags: ['Packages'],
|
|
279
|
-
summary: 'Get package by name',
|
|
280
|
-
operationId: 'getPackageByName',
|
|
281
|
-
parameters: [{ name: 'name', in: 'path', required: true, schema: { type: 'string' } }],
|
|
282
|
-
responses: {
|
|
283
|
-
'200': {
|
|
284
|
-
description: 'Package details',
|
|
285
|
-
content: {
|
|
286
|
-
'application/json': {
|
|
287
|
-
schema: { $ref: '#/components/schemas/Package' },
|
|
288
|
-
},
|
|
289
|
-
},
|
|
290
|
-
},
|
|
291
|
-
'404': { description: 'Package not found' },
|
|
292
|
-
},
|
|
293
|
-
},
|
|
294
|
-
},
|
|
295
|
-
'/packages/refresh': {
|
|
296
|
-
post: {
|
|
297
|
-
tags: ['Packages'],
|
|
298
|
-
summary: 'Refresh packages',
|
|
299
|
-
operationId: 'refreshPackages',
|
|
300
|
-
responses: {
|
|
301
|
-
'200': { description: 'Packages refreshed successfully' },
|
|
302
|
-
},
|
|
303
|
-
},
|
|
304
|
-
},
|
|
305
|
-
'/packages/update-config': {
|
|
306
|
-
put: {
|
|
307
|
-
tags: ['Packages'],
|
|
308
|
-
summary: 'Update package configuration',
|
|
309
|
-
operationId: 'updatePackageConfig',
|
|
310
|
-
requestBody: {
|
|
311
|
-
required: true,
|
|
312
|
-
content: {
|
|
313
|
-
'application/json': {
|
|
314
|
-
schema: { $ref: '#/components/schemas/Package' },
|
|
315
|
-
},
|
|
316
|
-
},
|
|
317
|
-
},
|
|
318
|
-
responses: {
|
|
319
|
-
'200': { description: 'Package configuration updated successfully' },
|
|
320
|
-
'400': { description: 'Invalid request' },
|
|
321
|
-
'404': { description: 'Package not found' },
|
|
322
|
-
},
|
|
323
|
-
},
|
|
324
|
-
},
|
|
325
|
-
'/health/packages': {
|
|
326
|
-
get: {
|
|
327
|
-
tags: ['Health'],
|
|
328
|
-
summary: 'Get packages health status',
|
|
329
|
-
operationId: 'getPackagesHealth',
|
|
330
|
-
responses: {
|
|
331
|
-
'200': {
|
|
332
|
-
description: 'Health status of all packages',
|
|
333
|
-
content: {
|
|
334
|
-
'application/json': {
|
|
335
|
-
schema: { type: 'array', items: { $ref: '#/components/schemas/PackageHealth' } },
|
|
336
|
-
},
|
|
337
|
-
},
|
|
338
|
-
},
|
|
339
|
-
},
|
|
340
|
-
},
|
|
341
|
-
},
|
|
342
|
-
'/health/refresh': {
|
|
343
|
-
post: {
|
|
344
|
-
tags: ['Health'],
|
|
345
|
-
summary: 'Refresh health status',
|
|
346
|
-
operationId: 'refreshHealth',
|
|
347
|
-
responses: {
|
|
348
|
-
'200': { description: 'Health status refreshed successfully' },
|
|
349
|
-
},
|
|
350
|
-
},
|
|
351
|
-
},
|
|
352
|
-
'/commits/{packagePath}': {
|
|
353
|
-
get: {
|
|
354
|
-
tags: ['Commits'],
|
|
355
|
-
summary: 'Get commits for a package',
|
|
356
|
-
operationId: 'getCommits',
|
|
357
|
-
parameters: [{ name: 'packagePath', in: 'path', required: true, schema: { type: 'string' } }],
|
|
358
|
-
responses: {
|
|
359
|
-
'200': {
|
|
360
|
-
description: 'List of commits',
|
|
361
|
-
content: {
|
|
362
|
-
'application/json': {
|
|
363
|
-
schema: { type: 'array', items: { $ref: '#/components/schemas/Commit' } },
|
|
364
|
-
},
|
|
365
|
-
},
|
|
366
|
-
},
|
|
367
|
-
},
|
|
368
|
-
},
|
|
369
|
-
},
|
|
370
|
-
'/config/files': {
|
|
371
|
-
get: {
|
|
372
|
-
tags: ['Configuration'],
|
|
373
|
-
summary: 'Get configuration files',
|
|
374
|
-
operationId: 'getConfigFiles',
|
|
375
|
-
responses: {
|
|
376
|
-
'200': {
|
|
377
|
-
description: 'List of configuration files',
|
|
378
|
-
content: {
|
|
379
|
-
'application/json': {
|
|
380
|
-
schema: { type: 'array', items: { $ref: '#/components/schemas/ConfigFile' } },
|
|
381
|
-
},
|
|
382
|
-
},
|
|
383
|
-
},
|
|
384
|
-
},
|
|
385
|
-
},
|
|
386
|
-
},
|
|
387
|
-
'/config/files/{id}': {
|
|
388
|
-
put: {
|
|
389
|
-
tags: ['Configuration'],
|
|
390
|
-
summary: 'Update configuration file',
|
|
391
|
-
operationId: 'updateConfigFile',
|
|
392
|
-
parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'string' } }],
|
|
393
|
-
requestBody: {
|
|
394
|
-
required: true,
|
|
395
|
-
content: {
|
|
396
|
-
'application/json': {
|
|
397
|
-
schema: { $ref: '#/components/schemas/ConfigFile' },
|
|
398
|
-
},
|
|
399
|
-
},
|
|
400
|
-
},
|
|
401
|
-
responses: {
|
|
402
|
-
'200': { description: 'Configuration file updated successfully' },
|
|
403
|
-
'400': { description: 'Invalid request' },
|
|
404
|
-
'404': { description: 'Configuration file not found' },
|
|
405
|
-
},
|
|
406
|
-
},
|
|
407
|
-
},
|
|
408
|
-
'/publish/packages': {
|
|
409
|
-
get: {
|
|
410
|
-
tags: ['Publish/Release'],
|
|
411
|
-
summary: 'Get all workspace packages for publishing',
|
|
412
|
-
operationId: 'getPublishPackages',
|
|
413
|
-
description: 'Retrieves all public packages in the workspace that can be published. Private packages are filtered out.',
|
|
414
|
-
security: [{ BearerAuth: [] }],
|
|
415
|
-
responses: {
|
|
416
|
-
'200': {
|
|
417
|
-
description: 'List of packages available for publishing',
|
|
418
|
-
content: {
|
|
419
|
-
'application/json': {
|
|
420
|
-
schema: {
|
|
421
|
-
type: 'object',
|
|
422
|
-
properties: {
|
|
423
|
-
success: { type: 'boolean' },
|
|
424
|
-
packages: {
|
|
425
|
-
type: 'array',
|
|
426
|
-
items: { $ref: '#/components/schemas/PublishPackage' },
|
|
427
|
-
},
|
|
428
|
-
total: { type: 'number', description: 'Total number of packages' },
|
|
429
|
-
},
|
|
430
|
-
},
|
|
431
|
-
},
|
|
432
|
-
},
|
|
433
|
-
},
|
|
434
|
-
'401': { description: 'Unauthorized - authentication required' },
|
|
435
|
-
'500': { description: 'Internal server error' },
|
|
436
|
-
},
|
|
437
|
-
},
|
|
438
|
-
},
|
|
439
|
-
'/publish/changesets': {
|
|
440
|
-
get: {
|
|
441
|
-
tags: ['Publish/Release'],
|
|
442
|
-
summary: 'Get existing unpublished changesets',
|
|
443
|
-
operationId: 'getPublishChangesets',
|
|
444
|
-
description: 'Retrieves all existing changesets that have not yet been published.',
|
|
445
|
-
security: [{ BearerAuth: [] }],
|
|
446
|
-
responses: {
|
|
447
|
-
'200': {
|
|
448
|
-
description: 'List of existing changesets',
|
|
449
|
-
content: {
|
|
450
|
-
'application/json': {
|
|
451
|
-
schema: {
|
|
452
|
-
type: 'object',
|
|
453
|
-
properties: {
|
|
454
|
-
success: { type: 'boolean' },
|
|
455
|
-
changesets: {
|
|
456
|
-
type: 'array',
|
|
457
|
-
items: { $ref: '#/components/schemas/Changeset' },
|
|
458
|
-
},
|
|
459
|
-
total: { type: 'number', description: 'Total number of changesets' },
|
|
460
|
-
},
|
|
461
|
-
},
|
|
462
|
-
},
|
|
463
|
-
},
|
|
464
|
-
},
|
|
465
|
-
'401': { description: 'Unauthorized - authentication required' },
|
|
466
|
-
'500': { description: 'Internal server error' },
|
|
467
|
-
},
|
|
468
|
-
},
|
|
469
|
-
post: {
|
|
470
|
-
tags: ['Publish/Release'],
|
|
471
|
-
summary: 'Create a new changeset',
|
|
472
|
-
operationId: 'createChangeset',
|
|
473
|
-
description: 'Creates a new changeset for selected packages with specified version bumps. Requires write permission.',
|
|
474
|
-
security: [{ BearerAuth: [] }],
|
|
475
|
-
requestBody: {
|
|
476
|
-
required: true,
|
|
477
|
-
content: {
|
|
478
|
-
'application/json': {
|
|
479
|
-
schema: {
|
|
480
|
-
type: 'object',
|
|
481
|
-
required: ['packages', 'summary'],
|
|
482
|
-
properties: {
|
|
483
|
-
packages: {
|
|
484
|
-
type: 'array',
|
|
485
|
-
items: { type: 'string' },
|
|
486
|
-
description: 'Array of package names to include in changeset',
|
|
487
|
-
},
|
|
488
|
-
bumps: {
|
|
489
|
-
type: 'array',
|
|
490
|
-
items: { $ref: '#/components/schemas/VersionBump' },
|
|
491
|
-
description: 'Version bump specifications for packages (optional, defaults to patch)',
|
|
492
|
-
},
|
|
493
|
-
summary: {
|
|
494
|
-
type: 'string',
|
|
495
|
-
minLength: 10,
|
|
496
|
-
description: 'Summary of changes (minimum 10 characters)',
|
|
497
|
-
},
|
|
498
|
-
},
|
|
499
|
-
},
|
|
500
|
-
},
|
|
501
|
-
},
|
|
502
|
-
},
|
|
503
|
-
responses: {
|
|
504
|
-
'200': {
|
|
505
|
-
description: 'Changeset created successfully',
|
|
506
|
-
content: {
|
|
507
|
-
'application/json': {
|
|
508
|
-
schema: {
|
|
509
|
-
type: 'object',
|
|
510
|
-
properties: {
|
|
511
|
-
success: { type: 'boolean' },
|
|
512
|
-
changeset: { $ref: '#/components/schemas/Changeset' },
|
|
513
|
-
message: { type: 'string' },
|
|
514
|
-
},
|
|
515
|
-
},
|
|
516
|
-
},
|
|
517
|
-
},
|
|
518
|
-
},
|
|
519
|
-
'400': { description: 'Invalid request - missing or invalid parameters' },
|
|
520
|
-
'401': { description: 'Unauthorized - authentication required' },
|
|
521
|
-
'403': { description: 'Forbidden - insufficient permissions (write required)' },
|
|
522
|
-
'500': { description: 'Internal server error' },
|
|
523
|
-
},
|
|
524
|
-
},
|
|
525
|
-
},
|
|
526
|
-
'/publish/preview': {
|
|
527
|
-
post: {
|
|
528
|
-
tags: ['Publish/Release'],
|
|
529
|
-
summary: 'Preview the publish plan',
|
|
530
|
-
operationId: 'previewPublish',
|
|
531
|
-
description: 'Calculates and previews a publish plan including new versions, affected packages, and validation checks.',
|
|
532
|
-
security: [{ BearerAuth: [] }],
|
|
533
|
-
requestBody: {
|
|
534
|
-
required: true,
|
|
535
|
-
content: {
|
|
536
|
-
'application/json': {
|
|
537
|
-
schema: {
|
|
538
|
-
type: 'object',
|
|
539
|
-
required: ['packages'],
|
|
540
|
-
properties: {
|
|
541
|
-
packages: {
|
|
542
|
-
type: 'array',
|
|
543
|
-
items: { type: 'string' },
|
|
544
|
-
description: 'Array of package names to preview',
|
|
545
|
-
},
|
|
546
|
-
bumps: {
|
|
547
|
-
type: 'array',
|
|
548
|
-
items: { $ref: '#/components/schemas/VersionBump' },
|
|
549
|
-
description: 'Version bump specifications (optional)',
|
|
550
|
-
},
|
|
551
|
-
},
|
|
552
|
-
},
|
|
553
|
-
},
|
|
554
|
-
},
|
|
555
|
-
},
|
|
556
|
-
responses: {
|
|
557
|
-
'200': {
|
|
558
|
-
description: 'Publish preview calculated successfully',
|
|
559
|
-
content: {
|
|
560
|
-
'application/json': {
|
|
561
|
-
schema: { $ref: '#/components/schemas/PublishPreview' },
|
|
562
|
-
},
|
|
563
|
-
},
|
|
564
|
-
},
|
|
565
|
-
'400': { description: 'Invalid request parameters' },
|
|
566
|
-
'401': { description: 'Unauthorized - authentication required' },
|
|
567
|
-
'500': { description: 'Internal server error' },
|
|
568
|
-
},
|
|
569
|
-
},
|
|
570
|
-
},
|
|
571
|
-
'/publish/status': {
|
|
572
|
-
get: {
|
|
573
|
-
tags: ['Publish/Release'],
|
|
574
|
-
summary: 'Check publish readiness status',
|
|
575
|
-
operationId: 'checkPublishStatus',
|
|
576
|
-
description: 'Checks if the repository is ready for publishing (clean working tree, changesets exist, etc.).',
|
|
577
|
-
security: [{ BearerAuth: [] }],
|
|
578
|
-
responses: {
|
|
579
|
-
'200': {
|
|
580
|
-
description: 'Publish status retrieved successfully',
|
|
581
|
-
content: {
|
|
582
|
-
'application/json': {
|
|
583
|
-
schema: {
|
|
584
|
-
type: 'object',
|
|
585
|
-
properties: {
|
|
586
|
-
success: { type: 'boolean' },
|
|
587
|
-
status: { $ref: '#/components/schemas/PublishStatus' },
|
|
588
|
-
},
|
|
589
|
-
},
|
|
590
|
-
},
|
|
591
|
-
},
|
|
592
|
-
},
|
|
593
|
-
'401': { description: 'Unauthorized - authentication required' },
|
|
594
|
-
'500': { description: 'Internal server error' },
|
|
595
|
-
},
|
|
596
|
-
},
|
|
597
|
-
},
|
|
598
|
-
'/publish/trigger': {
|
|
599
|
-
post: {
|
|
600
|
-
tags: ['Publish/Release'],
|
|
601
|
-
summary: 'Trigger the publishing workflow',
|
|
602
|
-
operationId: 'triggerPublish',
|
|
603
|
-
description: 'Triggers the GitHub Actions release/publish workflow. Requires maintain permission and clean working tree.',
|
|
604
|
-
security: [{ BearerAuth: [] }],
|
|
605
|
-
requestBody: {
|
|
606
|
-
required: false,
|
|
607
|
-
content: {
|
|
608
|
-
'application/json': {
|
|
609
|
-
schema: {
|
|
610
|
-
type: 'object',
|
|
611
|
-
properties: {
|
|
612
|
-
packages: {
|
|
613
|
-
type: 'array',
|
|
614
|
-
items: {
|
|
615
|
-
type: 'object',
|
|
616
|
-
properties: {
|
|
617
|
-
name: { type: 'string' },
|
|
618
|
-
newVersion: { type: 'string' },
|
|
619
|
-
bumpType: { type: 'string', enum: ['major', 'minor', 'patch'] },
|
|
620
|
-
},
|
|
621
|
-
},
|
|
622
|
-
description: 'Array of packages to publish with version info',
|
|
623
|
-
},
|
|
624
|
-
},
|
|
625
|
-
},
|
|
626
|
-
},
|
|
627
|
-
},
|
|
628
|
-
},
|
|
629
|
-
responses: {
|
|
630
|
-
'200': {
|
|
631
|
-
description: 'Publishing workflow triggered successfully',
|
|
632
|
-
content: {
|
|
633
|
-
'application/json': {
|
|
634
|
-
schema: {
|
|
635
|
-
type: 'object',
|
|
636
|
-
properties: {
|
|
637
|
-
success: { type: 'boolean' },
|
|
638
|
-
message: { type: 'string' },
|
|
639
|
-
result: {
|
|
640
|
-
type: 'object',
|
|
641
|
-
properties: {
|
|
642
|
-
workflow_runs: {
|
|
643
|
-
type: 'array',
|
|
644
|
-
items: { type: 'object' },
|
|
645
|
-
},
|
|
646
|
-
},
|
|
647
|
-
},
|
|
648
|
-
},
|
|
649
|
-
},
|
|
650
|
-
},
|
|
651
|
-
},
|
|
652
|
-
},
|
|
653
|
-
'400': { description: 'Invalid request - working tree not clean or no changesets' },
|
|
654
|
-
'401': { description: 'Unauthorized - authentication required' },
|
|
655
|
-
'403': { description: 'Forbidden - insufficient permissions (maintain required)' },
|
|
656
|
-
'500': { description: 'Internal server error' },
|
|
657
|
-
},
|
|
658
|
-
},
|
|
659
|
-
},
|
|
660
|
-
},
|
|
661
|
-
tags: [
|
|
662
|
-
{
|
|
663
|
-
name: 'Authentication',
|
|
664
|
-
description: 'GitHub OAuth authentication and session management endpoints',
|
|
665
|
-
},
|
|
666
|
-
{
|
|
667
|
-
name: 'Packages',
|
|
668
|
-
description: 'Package management and analysis endpoints',
|
|
669
|
-
},
|
|
670
|
-
{
|
|
671
|
-
name: 'Health',
|
|
672
|
-
description: 'Health monitoring and status endpoints',
|
|
673
|
-
},
|
|
674
|
-
{
|
|
675
|
-
name: 'Commits',
|
|
676
|
-
description: 'Git commit history and analysis endpoints',
|
|
677
|
-
},
|
|
678
|
-
{
|
|
679
|
-
name: 'Configuration',
|
|
680
|
-
description: 'Configuration file management endpoints',
|
|
681
|
-
},
|
|
682
|
-
{
|
|
683
|
-
name: 'Publish/Release',
|
|
684
|
-
description: 'Generate Changeset and publish package',
|
|
685
|
-
},
|
|
686
|
-
],
|
|
687
|
-
components: {
|
|
688
|
-
schemas: {
|
|
689
|
-
Package: {
|
|
690
|
-
type: 'object',
|
|
691
|
-
properties: {
|
|
692
|
-
name: {
|
|
693
|
-
type: 'string',
|
|
694
|
-
description: 'Package name',
|
|
695
|
-
},
|
|
696
|
-
path: {
|
|
697
|
-
type: 'string',
|
|
698
|
-
description: 'Package path in monorepo',
|
|
699
|
-
},
|
|
700
|
-
version: {
|
|
701
|
-
type: 'string',
|
|
702
|
-
description: 'Package version',
|
|
703
|
-
},
|
|
704
|
-
size: {
|
|
705
|
-
type: 'number',
|
|
706
|
-
description: 'Package size in bytes',
|
|
707
|
-
},
|
|
708
|
-
dependencies: {
|
|
709
|
-
type: 'array',
|
|
710
|
-
items: {
|
|
711
|
-
type: 'string',
|
|
712
|
-
},
|
|
713
|
-
description: 'List of package dependencies',
|
|
714
|
-
},
|
|
715
|
-
},
|
|
716
|
-
},
|
|
717
|
-
PackageHealth: {
|
|
718
|
-
type: 'object',
|
|
719
|
-
properties: {
|
|
720
|
-
packageName: {
|
|
721
|
-
type: 'string',
|
|
722
|
-
description: 'Name of the package',
|
|
723
|
-
},
|
|
724
|
-
healthScore: {
|
|
725
|
-
type: 'number',
|
|
726
|
-
description: 'Health score (0-100)',
|
|
727
|
-
minimum: 0,
|
|
728
|
-
maximum: 100,
|
|
729
|
-
},
|
|
730
|
-
lintStatus: {
|
|
731
|
-
type: 'string',
|
|
732
|
-
enum: ['pass', 'warning', 'fail'],
|
|
733
|
-
description: 'Linting status',
|
|
734
|
-
},
|
|
735
|
-
buildStatus: {
|
|
736
|
-
type: 'string',
|
|
737
|
-
enum: ['success', 'failed', 'pending'],
|
|
738
|
-
description: 'Build status',
|
|
739
|
-
},
|
|
740
|
-
securityStatus: {
|
|
741
|
-
type: 'string',
|
|
742
|
-
enum: ['secure', 'warning', 'vulnerable'],
|
|
743
|
-
description: 'Security status',
|
|
744
|
-
},
|
|
745
|
-
testCoverage: {
|
|
746
|
-
type: 'number',
|
|
747
|
-
description: 'Test coverage percentage',
|
|
748
|
-
},
|
|
749
|
-
},
|
|
750
|
-
},
|
|
751
|
-
Commit: {
|
|
752
|
-
type: 'object',
|
|
753
|
-
properties: {
|
|
754
|
-
hash: {
|
|
755
|
-
type: 'string',
|
|
756
|
-
description: 'Commit hash',
|
|
757
|
-
},
|
|
758
|
-
author: {
|
|
759
|
-
type: 'string',
|
|
760
|
-
description: 'Commit author',
|
|
761
|
-
},
|
|
762
|
-
message: {
|
|
763
|
-
type: 'string',
|
|
764
|
-
description: 'Commit message',
|
|
765
|
-
},
|
|
766
|
-
date: {
|
|
767
|
-
type: 'string',
|
|
768
|
-
format: 'date-time',
|
|
769
|
-
description: 'Commit date',
|
|
770
|
-
},
|
|
771
|
-
filesChanged: {
|
|
772
|
-
type: 'number',
|
|
773
|
-
description: 'Number of files changed',
|
|
774
|
-
},
|
|
775
|
-
},
|
|
776
|
-
},
|
|
777
|
-
ConfigFile: {
|
|
778
|
-
type: 'object',
|
|
779
|
-
properties: {
|
|
780
|
-
id: {
|
|
781
|
-
type: 'string',
|
|
782
|
-
description: 'Configuration file ID',
|
|
783
|
-
},
|
|
784
|
-
name: {
|
|
785
|
-
type: 'string',
|
|
786
|
-
description: 'Configuration file name',
|
|
787
|
-
},
|
|
788
|
-
path: {
|
|
789
|
-
type: 'string',
|
|
790
|
-
description: 'Configuration file path',
|
|
791
|
-
},
|
|
792
|
-
content: {
|
|
793
|
-
type: 'string',
|
|
794
|
-
description: 'Configuration file content',
|
|
795
|
-
},
|
|
796
|
-
},
|
|
797
|
-
},
|
|
798
|
-
ReleasePipeline: {
|
|
799
|
-
type: 'object',
|
|
800
|
-
properties: {
|
|
801
|
-
id: {
|
|
802
|
-
type: 'string',
|
|
803
|
-
description: 'Unique pipeline ID',
|
|
804
|
-
},
|
|
805
|
-
releaseVersion: {
|
|
806
|
-
type: 'string',
|
|
807
|
-
description: 'Release version number',
|
|
808
|
-
},
|
|
809
|
-
packageName: {
|
|
810
|
-
type: 'string',
|
|
811
|
-
description: 'Name of the package being released',
|
|
812
|
-
},
|
|
813
|
-
owner: {
|
|
814
|
-
type: 'string',
|
|
815
|
-
description: 'Repository owner',
|
|
816
|
-
},
|
|
817
|
-
repo: {
|
|
818
|
-
type: 'string',
|
|
819
|
-
description: 'Repository name',
|
|
820
|
-
},
|
|
821
|
-
workflowId: {
|
|
822
|
-
type: 'string',
|
|
823
|
-
description: 'GitHub workflow ID',
|
|
824
|
-
},
|
|
825
|
-
workflowName: {
|
|
826
|
-
type: 'string',
|
|
827
|
-
description: 'GitHub workflow name',
|
|
828
|
-
},
|
|
829
|
-
workflowPath: {
|
|
830
|
-
type: 'string',
|
|
831
|
-
description: 'Path to the workflow file',
|
|
832
|
-
},
|
|
833
|
-
triggerType: {
|
|
834
|
-
type: 'string',
|
|
835
|
-
description: 'Type of trigger (e.g., "manual", "scheduled")',
|
|
836
|
-
},
|
|
837
|
-
triggeredBy: {
|
|
838
|
-
type: 'string',
|
|
839
|
-
description: 'Username of who triggered the release',
|
|
840
|
-
},
|
|
841
|
-
triggeredAt: {
|
|
842
|
-
type: 'string',
|
|
843
|
-
format: 'date-time',
|
|
844
|
-
description: 'When the pipeline was triggered',
|
|
845
|
-
},
|
|
846
|
-
currentStatus: {
|
|
847
|
-
type: 'string',
|
|
848
|
-
enum: ['queued', 'in_progress', 'completed'],
|
|
849
|
-
description: 'Current pipeline status',
|
|
850
|
-
},
|
|
851
|
-
currentConclusion: {
|
|
852
|
-
type: 'string',
|
|
853
|
-
enum: ['success', 'failure', 'cancelled', 'skipped', 'neutral'],
|
|
854
|
-
description: 'Pipeline conclusion result',
|
|
855
|
-
},
|
|
856
|
-
lastRunId: {
|
|
857
|
-
type: 'string',
|
|
858
|
-
description: 'ID of the last workflow run',
|
|
859
|
-
},
|
|
860
|
-
createdAt: {
|
|
861
|
-
type: 'string',
|
|
862
|
-
format: 'date-time',
|
|
863
|
-
description: 'When the pipeline record was created',
|
|
864
|
-
},
|
|
865
|
-
updatedAt: {
|
|
866
|
-
type: 'string',
|
|
867
|
-
format: 'date-time',
|
|
868
|
-
description: 'When the pipeline record was last updated',
|
|
869
|
-
},
|
|
870
|
-
},
|
|
871
|
-
},
|
|
872
|
-
PublishPackage: {
|
|
873
|
-
type: 'object',
|
|
874
|
-
properties: {
|
|
875
|
-
name: {
|
|
876
|
-
type: 'string',
|
|
877
|
-
description: 'Package name',
|
|
878
|
-
},
|
|
879
|
-
path: {
|
|
880
|
-
type: 'string',
|
|
881
|
-
description: 'Package path in the monorepo',
|
|
882
|
-
},
|
|
883
|
-
version: {
|
|
884
|
-
type: 'string',
|
|
885
|
-
description: 'Current version of the package',
|
|
886
|
-
},
|
|
887
|
-
private: {
|
|
888
|
-
type: 'boolean',
|
|
889
|
-
description: 'Whether the package is private',
|
|
890
|
-
},
|
|
891
|
-
dependencies: {
|
|
892
|
-
type: 'object',
|
|
893
|
-
additionalProperties: { type: 'string' },
|
|
894
|
-
description: 'Package dependencies',
|
|
895
|
-
},
|
|
896
|
-
devDependencies: {
|
|
897
|
-
type: 'object',
|
|
898
|
-
additionalProperties: { type: 'string' },
|
|
899
|
-
description: 'Dev dependencies',
|
|
900
|
-
},
|
|
901
|
-
},
|
|
902
|
-
},
|
|
903
|
-
Changeset: {
|
|
904
|
-
type: 'object',
|
|
905
|
-
properties: {
|
|
906
|
-
id: {
|
|
907
|
-
type: 'string',
|
|
908
|
-
description: 'Changeset ID or filename',
|
|
909
|
-
},
|
|
910
|
-
packages: {
|
|
911
|
-
type: 'array',
|
|
912
|
-
items: { type: 'string' },
|
|
913
|
-
description: 'List of packages affected by this changeset',
|
|
914
|
-
},
|
|
915
|
-
summary: {
|
|
916
|
-
type: 'string',
|
|
917
|
-
description: 'Summary of changes in the changeset',
|
|
918
|
-
},
|
|
919
|
-
author: {
|
|
920
|
-
type: 'string',
|
|
921
|
-
description: 'GitHub username of the changeset author',
|
|
922
|
-
},
|
|
923
|
-
createdAt: {
|
|
924
|
-
type: 'string',
|
|
925
|
-
format: 'date-time',
|
|
926
|
-
description: 'When the changeset was created',
|
|
927
|
-
},
|
|
928
|
-
},
|
|
929
|
-
},
|
|
930
|
-
VersionBump: {
|
|
931
|
-
type: 'object',
|
|
932
|
-
required: ['package', 'bumpType'],
|
|
933
|
-
properties: {
|
|
934
|
-
package: {
|
|
935
|
-
type: 'string',
|
|
936
|
-
description: 'Package name',
|
|
937
|
-
},
|
|
938
|
-
bumpType: {
|
|
939
|
-
type: 'string',
|
|
940
|
-
enum: ['major', 'minor', 'patch'],
|
|
941
|
-
description: 'Type of version bump to apply',
|
|
942
|
-
},
|
|
943
|
-
},
|
|
944
|
-
},
|
|
945
|
-
PublishPreview: {
|
|
946
|
-
type: 'object',
|
|
947
|
-
properties: {
|
|
948
|
-
success: {
|
|
949
|
-
type: 'boolean',
|
|
950
|
-
description: 'Whether the preview was successful',
|
|
951
|
-
},
|
|
952
|
-
isValid: {
|
|
953
|
-
type: 'boolean',
|
|
954
|
-
description: 'Whether the publish operation is valid and can proceed',
|
|
955
|
-
},
|
|
956
|
-
errors: {
|
|
957
|
-
type: 'array',
|
|
958
|
-
items: { type: 'string' },
|
|
959
|
-
description: 'List of validation errors that prevent publishing',
|
|
960
|
-
},
|
|
961
|
-
warnings: {
|
|
962
|
-
type: 'array',
|
|
963
|
-
items: { type: 'string' },
|
|
964
|
-
description: 'List of validation warnings',
|
|
965
|
-
},
|
|
966
|
-
checks: {
|
|
967
|
-
type: 'object',
|
|
968
|
-
properties: {
|
|
969
|
-
permissions: {
|
|
970
|
-
type: 'boolean',
|
|
971
|
-
description: 'Whether the user has sufficient permissions',
|
|
972
|
-
},
|
|
973
|
-
workingTreeClean: {
|
|
974
|
-
type: 'boolean',
|
|
975
|
-
description: 'Whether the working tree is clean',
|
|
976
|
-
},
|
|
977
|
-
ciPassing: {
|
|
978
|
-
type: 'boolean',
|
|
979
|
-
description: 'Whether the latest CI run passed',
|
|
980
|
-
},
|
|
981
|
-
versionAvailable: {
|
|
982
|
-
type: 'boolean',
|
|
983
|
-
description: 'Whether the new versions are available on npm',
|
|
984
|
-
},
|
|
985
|
-
},
|
|
986
|
-
description: 'Individual validation check results',
|
|
987
|
-
},
|
|
988
|
-
preview: {
|
|
989
|
-
type: 'object',
|
|
990
|
-
properties: {
|
|
991
|
-
packages: {
|
|
992
|
-
type: 'array',
|
|
993
|
-
items: {
|
|
994
|
-
type: 'object',
|
|
995
|
-
properties: {
|
|
996
|
-
package: { type: 'string' },
|
|
997
|
-
oldVersion: { type: 'string' },
|
|
998
|
-
newVersion: { type: 'string' },
|
|
999
|
-
bumpType: { type: 'string' },
|
|
1000
|
-
},
|
|
1001
|
-
},
|
|
1002
|
-
description: 'Package version changes in the preview',
|
|
1003
|
-
},
|
|
1004
|
-
workingTreeClean: {
|
|
1005
|
-
type: 'boolean',
|
|
1006
|
-
},
|
|
1007
|
-
existingChangesets: {
|
|
1008
|
-
type: 'number',
|
|
1009
|
-
description: 'Number of existing changesets',
|
|
1010
|
-
},
|
|
1011
|
-
affectedPackages: {
|
|
1012
|
-
type: 'number',
|
|
1013
|
-
description: 'Number of affected packages',
|
|
1014
|
-
},
|
|
1015
|
-
},
|
|
1016
|
-
description: 'Preview details',
|
|
1017
|
-
},
|
|
1018
|
-
},
|
|
1019
|
-
},
|
|
1020
|
-
PublishStatus: {
|
|
1021
|
-
type: 'object',
|
|
1022
|
-
properties: {
|
|
1023
|
-
workingTreeClean: {
|
|
1024
|
-
type: 'boolean',
|
|
1025
|
-
description: 'Whether the working tree is clean',
|
|
1026
|
-
},
|
|
1027
|
-
hasChangesets: {
|
|
1028
|
-
type: 'boolean',
|
|
1029
|
-
description: 'Whether there are existing changesets',
|
|
1030
|
-
},
|
|
1031
|
-
changesetCount: {
|
|
1032
|
-
type: 'number',
|
|
1033
|
-
description: 'Number of existing changesets',
|
|
1034
|
-
},
|
|
1035
|
-
readyToPublish: {
|
|
1036
|
-
type: 'boolean',
|
|
1037
|
-
description: 'Whether the repository is ready to publish',
|
|
1038
|
-
},
|
|
1039
|
-
},
|
|
1040
|
-
},
|
|
1041
|
-
Error: {
|
|
1042
|
-
type: 'object',
|
|
1043
|
-
properties: {
|
|
1044
|
-
error: {
|
|
1045
|
-
type: 'string',
|
|
1046
|
-
description: 'Error message',
|
|
1047
|
-
},
|
|
1048
|
-
message: {
|
|
1049
|
-
type: 'string',
|
|
1050
|
-
description: 'Detailed error message',
|
|
1051
|
-
},
|
|
1052
|
-
code: {
|
|
1053
|
-
type: 'string',
|
|
1054
|
-
description: 'Error code',
|
|
1055
|
-
},
|
|
1056
|
-
},
|
|
1057
|
-
},
|
|
1058
|
-
},
|
|
1059
|
-
responses: {
|
|
1060
|
-
UnauthorizedError: {
|
|
1061
|
-
description: 'Unauthorized access',
|
|
1062
|
-
},
|
|
1063
|
-
NotFoundError: {
|
|
1064
|
-
description: 'Resource not found',
|
|
1065
|
-
},
|
|
1066
|
-
InternalServerError: {
|
|
1067
|
-
description: 'Internal server error',
|
|
1068
|
-
},
|
|
1069
|
-
},
|
|
1070
|
-
securitySchemes: {
|
|
1071
|
-
BearerAuth: {
|
|
1072
|
-
type: 'http',
|
|
1073
|
-
scheme: 'bearer',
|
|
1074
|
-
bearerFormat: 'JWT',
|
|
1075
|
-
description: 'Enter your session token in the format: Bearer YOUR_SESSION_TOKEN',
|
|
1076
|
-
},
|
|
1077
|
-
},
|
|
1078
|
-
},
|
|
35
|
+
paths: swagger_paths_1.swaggerPaths,
|
|
36
|
+
tags: swagger_paths_1.swaggerTags,
|
|
37
|
+
components: swagger_schemas_1.swaggerSchemas,
|
|
1079
38
|
};
|
|
1080
39
|
exports.swaggerOptions = {
|
|
1081
40
|
definition: exports.swaggerDefinition,
|