@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.
@@ -0,0 +1,630 @@
1
+ "use strict";
2
+ /**
3
+ * Swagger Schema Definitions
4
+ * Contains OpenAPI component schemas, responses, and security schemes
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.swaggerSchemas = void 0;
8
+ exports.swaggerSchemas = {
9
+ schemas: {
10
+ Package: {
11
+ type: 'object',
12
+ properties: {
13
+ name: {
14
+ type: 'string',
15
+ description: 'Package name',
16
+ },
17
+ path: {
18
+ type: 'string',
19
+ description: 'Package path in monorepo',
20
+ },
21
+ version: {
22
+ type: 'string',
23
+ description: 'Package version',
24
+ },
25
+ size: {
26
+ type: 'number',
27
+ description: 'Package size in bytes',
28
+ },
29
+ dependencies: {
30
+ type: 'array',
31
+ items: {
32
+ type: 'string',
33
+ },
34
+ description: 'List of package dependencies',
35
+ },
36
+ },
37
+ },
38
+ PackageHealth: {
39
+ type: 'object',
40
+ properties: {
41
+ packageName: {
42
+ type: 'string',
43
+ description: 'Name of the package',
44
+ },
45
+ healthScore: {
46
+ type: 'number',
47
+ description: 'Health score (0-100)',
48
+ minimum: 0,
49
+ maximum: 100,
50
+ },
51
+ lintStatus: {
52
+ type: 'string',
53
+ enum: ['pass', 'warning', 'fail'],
54
+ description: 'Linting status',
55
+ },
56
+ buildStatus: {
57
+ type: 'string',
58
+ enum: ['success', 'failed', 'pending'],
59
+ description: 'Build status',
60
+ },
61
+ securityStatus: {
62
+ type: 'string',
63
+ enum: ['secure', 'warning', 'vulnerable'],
64
+ description: 'Security status',
65
+ },
66
+ testCoverage: {
67
+ type: 'number',
68
+ description: 'Test coverage percentage',
69
+ },
70
+ },
71
+ },
72
+ Commit: {
73
+ type: 'object',
74
+ properties: {
75
+ hash: {
76
+ type: 'string',
77
+ description: 'Commit hash',
78
+ },
79
+ author: {
80
+ type: 'string',
81
+ description: 'Commit author',
82
+ },
83
+ message: {
84
+ type: 'string',
85
+ description: 'Commit message',
86
+ },
87
+ date: {
88
+ type: 'string',
89
+ format: 'date-time',
90
+ description: 'Commit date',
91
+ },
92
+ filesChanged: {
93
+ type: 'number',
94
+ description: 'Number of files changed',
95
+ },
96
+ },
97
+ },
98
+ ConfigFile: {
99
+ type: 'object',
100
+ properties: {
101
+ id: {
102
+ type: 'string',
103
+ description: 'Configuration file ID',
104
+ },
105
+ name: {
106
+ type: 'string',
107
+ description: 'Configuration file name',
108
+ },
109
+ path: {
110
+ type: 'string',
111
+ description: 'Configuration file path',
112
+ },
113
+ content: {
114
+ type: 'string',
115
+ description: 'Configuration file content',
116
+ },
117
+ },
118
+ },
119
+ ReleasePipeline: {
120
+ type: 'object',
121
+ properties: {
122
+ id: {
123
+ type: 'string',
124
+ description: 'Unique pipeline ID',
125
+ },
126
+ releaseVersion: {
127
+ type: 'string',
128
+ description: 'Release version number',
129
+ },
130
+ packageName: {
131
+ type: 'string',
132
+ description: 'Name of the package being released',
133
+ },
134
+ owner: {
135
+ type: 'string',
136
+ description: 'Repository owner',
137
+ },
138
+ repo: {
139
+ type: 'string',
140
+ description: 'Repository name',
141
+ },
142
+ workflowId: {
143
+ type: 'string',
144
+ description: 'GitHub workflow ID',
145
+ },
146
+ workflowName: {
147
+ type: 'string',
148
+ description: 'GitHub workflow name',
149
+ },
150
+ workflowPath: {
151
+ type: 'string',
152
+ description: 'Path to the workflow file',
153
+ },
154
+ triggerType: {
155
+ type: 'string',
156
+ description: 'Type of trigger (e.g., "manual", "scheduled")',
157
+ },
158
+ triggeredBy: {
159
+ type: 'string',
160
+ description: 'Username of who triggered the release',
161
+ },
162
+ triggeredAt: {
163
+ type: 'string',
164
+ format: 'date-time',
165
+ description: 'When the pipeline was triggered',
166
+ },
167
+ currentStatus: {
168
+ type: 'string',
169
+ enum: ['queued', 'in_progress', 'completed'],
170
+ description: 'Current pipeline status',
171
+ },
172
+ currentConclusion: {
173
+ type: 'string',
174
+ enum: ['success', 'failure', 'cancelled', 'skipped', 'neutral'],
175
+ description: 'Pipeline conclusion result',
176
+ },
177
+ lastRunId: {
178
+ type: 'string',
179
+ description: 'ID of the last workflow run',
180
+ },
181
+ createdAt: {
182
+ type: 'string',
183
+ format: 'date-time',
184
+ description: 'When the pipeline record was created',
185
+ },
186
+ updatedAt: {
187
+ type: 'string',
188
+ format: 'date-time',
189
+ description: 'When the pipeline record was last updated',
190
+ },
191
+ },
192
+ },
193
+ PublishPackage: {
194
+ type: 'object',
195
+ properties: {
196
+ name: {
197
+ type: 'string',
198
+ description: 'Package name',
199
+ },
200
+ path: {
201
+ type: 'string',
202
+ description: 'Package path in the monorepo',
203
+ },
204
+ version: {
205
+ type: 'string',
206
+ description: 'Current version of the package',
207
+ },
208
+ private: {
209
+ type: 'boolean',
210
+ description: 'Whether the package is private',
211
+ },
212
+ dependencies: {
213
+ type: 'object',
214
+ additionalProperties: { type: 'string' },
215
+ description: 'Package dependencies',
216
+ },
217
+ devDependencies: {
218
+ type: 'object',
219
+ additionalProperties: { type: 'string' },
220
+ description: 'Dev dependencies',
221
+ },
222
+ },
223
+ },
224
+ Changeset: {
225
+ type: 'object',
226
+ properties: {
227
+ id: {
228
+ type: 'string',
229
+ description: 'Changeset ID or filename',
230
+ },
231
+ packages: {
232
+ type: 'array',
233
+ items: { type: 'string' },
234
+ description: 'List of packages affected by this changeset',
235
+ },
236
+ summary: {
237
+ type: 'string',
238
+ description: 'Summary of changes in the changeset',
239
+ },
240
+ author: {
241
+ type: 'string',
242
+ description: 'GitHub username of the changeset author',
243
+ },
244
+ createdAt: {
245
+ type: 'string',
246
+ format: 'date-time',
247
+ description: 'When the changeset was created',
248
+ },
249
+ },
250
+ },
251
+ VersionBump: {
252
+ type: 'object',
253
+ required: ['package', 'bumpType'],
254
+ properties: {
255
+ package: {
256
+ type: 'string',
257
+ description: 'Package name',
258
+ },
259
+ bumpType: {
260
+ type: 'string',
261
+ enum: ['major', 'minor', 'patch'],
262
+ description: 'Type of version bump to apply',
263
+ },
264
+ },
265
+ },
266
+ PublishPreview: {
267
+ type: 'object',
268
+ properties: {
269
+ success: {
270
+ type: 'boolean',
271
+ description: 'Whether the preview was successful',
272
+ },
273
+ isValid: {
274
+ type: 'boolean',
275
+ description: 'Whether the publish operation is valid and can proceed',
276
+ },
277
+ errors: {
278
+ type: 'array',
279
+ items: { type: 'string' },
280
+ description: 'List of validation errors that prevent publishing',
281
+ },
282
+ warnings: {
283
+ type: 'array',
284
+ items: { type: 'string' },
285
+ description: 'List of validation warnings',
286
+ },
287
+ checks: {
288
+ type: 'object',
289
+ properties: {
290
+ permissions: {
291
+ type: 'boolean',
292
+ description: 'Whether the user has sufficient permissions',
293
+ },
294
+ workingTreeClean: {
295
+ type: 'boolean',
296
+ description: 'Whether the working tree is clean',
297
+ },
298
+ ciPassing: {
299
+ type: 'boolean',
300
+ description: 'Whether the latest CI run passed',
301
+ },
302
+ versionAvailable: {
303
+ type: 'boolean',
304
+ description: 'Whether the new versions are available on npm',
305
+ },
306
+ },
307
+ description: 'Individual validation check results',
308
+ },
309
+ preview: {
310
+ type: 'object',
311
+ properties: {
312
+ packages: {
313
+ type: 'array',
314
+ items: {
315
+ type: 'object',
316
+ properties: {
317
+ package: { type: 'string' },
318
+ oldVersion: { type: 'string' },
319
+ newVersion: { type: 'string' },
320
+ bumpType: { type: 'string' },
321
+ },
322
+ },
323
+ description: 'Package version changes in the preview',
324
+ },
325
+ workingTreeClean: {
326
+ type: 'boolean',
327
+ },
328
+ existingChangesets: {
329
+ type: 'number',
330
+ description: 'Number of existing changesets',
331
+ },
332
+ affectedPackages: {
333
+ type: 'number',
334
+ description: 'Number of affected packages',
335
+ },
336
+ },
337
+ description: 'Preview details',
338
+ },
339
+ },
340
+ },
341
+ PublishStatus: {
342
+ type: 'object',
343
+ properties: {
344
+ workingTreeClean: {
345
+ type: 'boolean',
346
+ description: 'Whether the working tree is clean',
347
+ },
348
+ hasChangesets: {
349
+ type: 'boolean',
350
+ description: 'Whether there are existing changesets',
351
+ },
352
+ changesetCount: {
353
+ type: 'number',
354
+ description: 'Number of existing changesets',
355
+ },
356
+ readyToPublish: {
357
+ type: 'boolean',
358
+ description: 'Whether the repository is ready to publish',
359
+ },
360
+ },
361
+ },
362
+ Pipeline: {
363
+ type: 'object',
364
+ properties: {
365
+ id: {
366
+ type: 'string',
367
+ description: 'Pipeline ID',
368
+ },
369
+ name: {
370
+ type: 'string',
371
+ description: 'Pipeline name',
372
+ },
373
+ status: {
374
+ type: 'string',
375
+ enum: ['queued', 'in_progress', 'completed', 'failed'],
376
+ description: 'Current status of the pipeline',
377
+ },
378
+ conclusion: {
379
+ type: 'string',
380
+ enum: ['success', 'failure', 'cancelled', 'skipped'],
381
+ description: 'Pipeline conclusion',
382
+ },
383
+ workflowName: {
384
+ type: 'string',
385
+ description: 'Associated workflow name',
386
+ },
387
+ runNumber: {
388
+ type: 'number',
389
+ description: 'Run number',
390
+ },
391
+ createdAt: {
392
+ type: 'string',
393
+ format: 'date-time',
394
+ description: 'When the pipeline was created',
395
+ },
396
+ updatedAt: {
397
+ type: 'string',
398
+ format: 'date-time',
399
+ description: 'When the pipeline was last updated',
400
+ },
401
+ triggeredBy: {
402
+ type: 'string',
403
+ description: 'User who triggered the pipeline',
404
+ },
405
+ },
406
+ },
407
+ PipelineStatus: {
408
+ type: 'object',
409
+ properties: {
410
+ status: {
411
+ type: 'string',
412
+ enum: ['queued', 'in_progress', 'completed', 'failed'],
413
+ description: 'Pipeline status to update',
414
+ },
415
+ conclusion: {
416
+ type: 'string',
417
+ enum: ['success', 'failure', 'cancelled', 'skipped'],
418
+ description: 'Pipeline conclusion',
419
+ },
420
+ lastRunId: {
421
+ type: 'string',
422
+ description: 'Last workflow run ID',
423
+ },
424
+ },
425
+ },
426
+ AuditLog: {
427
+ type: 'object',
428
+ properties: {
429
+ id: {
430
+ type: 'string',
431
+ description: 'Audit log entry ID',
432
+ },
433
+ pipelineId: {
434
+ type: 'string',
435
+ description: 'Associated pipeline ID',
436
+ },
437
+ action: {
438
+ type: 'string',
439
+ description: 'Action performed',
440
+ },
441
+ status: {
442
+ type: 'string',
443
+ description: 'Status at the time of action',
444
+ },
445
+ actor: {
446
+ type: 'string',
447
+ description: 'User who performed the action',
448
+ },
449
+ timestamp: {
450
+ type: 'string',
451
+ format: 'date-time',
452
+ description: 'When the action occurred',
453
+ },
454
+ details: {
455
+ type: 'object',
456
+ description: 'Additional action details',
457
+ },
458
+ },
459
+ },
460
+ Workflow: {
461
+ type: 'object',
462
+ properties: {
463
+ id: {
464
+ type: 'string',
465
+ description: 'Workflow ID',
466
+ },
467
+ name: {
468
+ type: 'string',
469
+ description: 'Workflow name',
470
+ },
471
+ path: {
472
+ type: 'string',
473
+ description: 'Path to workflow file',
474
+ },
475
+ state: {
476
+ type: 'string',
477
+ enum: ['active', 'deleted'],
478
+ description: 'Workflow state',
479
+ },
480
+ createdAt: {
481
+ type: 'string',
482
+ format: 'date-time',
483
+ description: 'When the workflow was created',
484
+ },
485
+ updatedAt: {
486
+ type: 'string',
487
+ format: 'date-time',
488
+ description: 'When the workflow was last updated',
489
+ },
490
+ },
491
+ },
492
+ WorkflowRun: {
493
+ type: 'object',
494
+ properties: {
495
+ id: {
496
+ type: 'string',
497
+ description: 'Workflow run ID',
498
+ },
499
+ name: {
500
+ type: 'string',
501
+ description: 'Workflow run name',
502
+ },
503
+ workflowId: {
504
+ type: 'string',
505
+ description: 'Associated workflow ID',
506
+ },
507
+ headBranch: {
508
+ type: 'string',
509
+ description: 'Branch the workflow ran on',
510
+ },
511
+ headRef: {
512
+ type: 'string',
513
+ description: 'Git ref',
514
+ },
515
+ status: {
516
+ type: 'string',
517
+ enum: ['queued', 'in_progress', 'completed'],
518
+ description: 'Run status',
519
+ },
520
+ conclusion: {
521
+ type: 'string',
522
+ enum: ['success', 'failure', 'cancelled', 'skipped', 'neutral'],
523
+ description: 'Run conclusion',
524
+ },
525
+ runNumber: {
526
+ type: 'number',
527
+ description: 'Run number',
528
+ },
529
+ createdAt: {
530
+ type: 'string',
531
+ format: 'date-time',
532
+ description: 'When the run was created',
533
+ },
534
+ updatedAt: {
535
+ type: 'string',
536
+ format: 'date-time',
537
+ description: 'When the run was last updated',
538
+ },
539
+ },
540
+ },
541
+ WorkflowRunDetail: {
542
+ type: 'object',
543
+ properties: {
544
+ id: {
545
+ type: 'string',
546
+ description: 'Workflow run ID',
547
+ },
548
+ name: {
549
+ type: 'string',
550
+ description: 'Workflow run name',
551
+ },
552
+ workflowId: {
553
+ type: 'string',
554
+ description: 'Associated workflow ID',
555
+ },
556
+ status: {
557
+ type: 'string',
558
+ enum: ['queued', 'in_progress', 'completed'],
559
+ description: 'Run status',
560
+ },
561
+ conclusion: {
562
+ type: 'string',
563
+ enum: ['success', 'failure', 'cancelled', 'skipped', 'neutral'],
564
+ description: 'Run conclusion',
565
+ },
566
+ jobs: {
567
+ type: 'array',
568
+ items: {
569
+ type: 'object',
570
+ properties: {
571
+ id: { type: 'string' },
572
+ name: { type: 'string' },
573
+ status: { type: 'string' },
574
+ conclusion: { type: 'string' },
575
+ startedAt: { type: 'string', format: 'date-time' },
576
+ completedAt: { type: 'string', format: 'date-time' },
577
+ },
578
+ },
579
+ description: 'Jobs in the workflow run',
580
+ },
581
+ createdAt: {
582
+ type: 'string',
583
+ format: 'date-time',
584
+ description: 'When the run was created',
585
+ },
586
+ updatedAt: {
587
+ type: 'string',
588
+ format: 'date-time',
589
+ description: 'When the run was last updated',
590
+ },
591
+ },
592
+ },
593
+ Error: {
594
+ type: 'object',
595
+ properties: {
596
+ error: {
597
+ type: 'string',
598
+ description: 'Error message',
599
+ },
600
+ message: {
601
+ type: 'string',
602
+ description: 'Detailed error message',
603
+ },
604
+ code: {
605
+ type: 'string',
606
+ description: 'Error code',
607
+ },
608
+ },
609
+ },
610
+ },
611
+ responses: {
612
+ UnauthorizedError: {
613
+ description: 'Unauthorized access',
614
+ },
615
+ NotFoundError: {
616
+ description: 'Resource not found',
617
+ },
618
+ InternalServerError: {
619
+ description: 'Internal server error',
620
+ },
621
+ },
622
+ securitySchemes: {
623
+ BearerAuth: {
624
+ type: 'http',
625
+ scheme: 'bearer',
626
+ bearerFormat: 'JWT',
627
+ description: 'Enter your session token in the format: Bearer YOUR_SESSION_TOKEN',
628
+ },
629
+ },
630
+ };
@@ -21,7 +21,8 @@ const config_routes_1 = __importDefault(require("../routes/config-routes"));
21
21
  const auth_routes_1 = __importDefault(require("../routes/auth-routes"));
22
22
  const permission_routes_1 = __importDefault(require("../routes/permission-routes"));
23
23
  const publish_routes_1 = __importDefault(require("../routes/publish-routes"));
24
- const pipeline_routes_1 = require("../routes/pipeline-routes");
24
+ const pipeline_routes_1 = __importDefault(require("../routes/pipeline-routes"));
25
+ const workflow_routes_1 = __importDefault(require("../routes/workflow-routes"));
25
26
  const constants_1 = require("../constants");
26
27
  const auth_middleware_1 = require("./auth-middleware");
27
28
  const permission_service_1 = require("../services/permission-service");
@@ -61,7 +62,6 @@ function createApp(rootPath) {
61
62
  (0, permission_service_1.startCacheCleanup)();
62
63
  // Create a router for pipeline routes
63
64
  const router = express_1.default.Router();
64
- (0, pipeline_routes_1.setupPipelineRoutes)(router);
65
65
  // Routes
66
66
  app.use('/api/auth', auth_routes_1.default);
67
67
  app.use('/api/permissions', permission_routes_1.default);
@@ -70,6 +70,8 @@ function createApp(rootPath) {
70
70
  app.use('/api/health/', health_routes_1.default);
71
71
  app.use('/api/config/', config_routes_1.default);
72
72
  app.use('/api/publish', publish_routes_1.default);
73
+ app.use('/api/pipelines', pipeline_routes_1.default);
74
+ app.use('/api/workflows', workflow_routes_1.default);
73
75
  app.use('/api', router);
74
76
  // 404 handlerAPI_ENDPOINTS
75
77
  app.use('*', error_handler_1.notFoundHandler);