@manojkmfsi/monodog 1.1.30 → 1.1.32

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.
Files changed (57) hide show
  1. package/.env.example +1 -15
  2. package/CHANGELOG.md +18 -0
  3. package/README.md +8 -3
  4. package/dist/config/swagger-config.js +738 -0
  5. package/dist/constants/api-messages.js +45 -0
  6. package/dist/constants/error-messages.js +84 -0
  7. package/dist/constants/features.js +53 -0
  8. package/dist/constants/http.js +87 -0
  9. package/dist/constants/index.js +8 -0
  10. package/dist/constants/middleware.js +2 -13
  11. package/dist/constants/security.js +1 -9
  12. package/dist/controllers/auth-controller.js +197 -0
  13. package/dist/controllers/commit-controller.js +4 -2
  14. package/dist/controllers/config-controller.js +8 -6
  15. package/dist/controllers/health-controller.js +5 -3
  16. package/dist/controllers/package-controller.js +11 -7
  17. package/dist/controllers/permission-controller.js +154 -0
  18. package/dist/controllers/pipeline-controller.js +26 -23
  19. package/dist/controllers/publish-controller.js +110 -75
  20. package/dist/middleware/auth-middleware.js +17 -15
  21. package/dist/middleware/dashboard-startup.js +3 -1
  22. package/dist/middleware/error-handler.js +4 -2
  23. package/dist/middleware/server-startup.js +3 -51
  24. package/dist/repositories/index.js +5 -1
  25. package/dist/repositories/pipeline-audit-log-repository.js +82 -0
  26. package/dist/repositories/release-pipeline-repository.js +123 -0
  27. package/dist/routes/auth-routes.js +7 -338
  28. package/dist/routes/permission-routes.js +4 -139
  29. package/dist/services/auth-service.js +249 -0
  30. package/dist/services/changeset-service.js +83 -3
  31. package/dist/services/config-service.js +7 -6
  32. package/dist/services/github-actions-service.js +66 -138
  33. package/dist/services/github-oauth-service.js +24 -45
  34. package/dist/services/package-service.js +0 -6
  35. package/dist/services/permission-service.js +27 -10
  36. package/dist/services/pipeline-service.js +10 -275
  37. package/dist/types/auth-service-dto.js +5 -0
  38. package/dist/types/changeset.js +5 -0
  39. package/dist/types/config-service.js +2 -0
  40. package/dist/types/controllers.js +5 -0
  41. package/dist/types/errors.js +5 -0
  42. package/dist/types/github-service.js +2 -0
  43. package/dist/types/index.js +1 -0
  44. package/dist/types/package-service.js +2 -0
  45. package/dist/types/permission-dto.js +5 -0
  46. package/dist/utils/monorepo-scanner.js +4 -3
  47. package/dist/utils/utilities.js +3 -6
  48. package/monodog-dashboard/dist/assets/index-BKi7VQTX.js +20 -0
  49. package/monodog-dashboard/dist/assets/index-BKi7VQTX.js.map +1 -0
  50. package/monodog-dashboard/dist/assets/{index-DcvKt8qx.css → index-Dc2vaUOq.css} +1 -1
  51. package/monodog-dashboard/dist/index.html +2 -2
  52. package/package.json +13 -3
  53. package/check-db.js +0 -58
  54. package/dist/utils/ci-status.js +0 -447
  55. package/dist/utils/db-utils.js +0 -87
  56. package/monodog-dashboard/dist/assets/index-6NrFUGfK.js +0 -15
  57. package/monodog-dashboard/dist/assets/index-6NrFUGfK.js.map +0 -1
@@ -28,6 +28,233 @@ exports.swaggerDefinition = {
28
28
  },
29
29
  ],
30
30
  paths: {
31
+ '/auth/login': {
32
+ get: {
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
+ },
31
258
  '/packages': {
32
259
  get: {
33
260
  tags: ['Packages'],
@@ -178,8 +405,264 @@ exports.swaggerDefinition = {
178
405
  },
179
406
  },
180
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
+ },
181
660
  },
182
661
  tags: [
662
+ {
663
+ name: 'Authentication',
664
+ description: 'GitHub OAuth authentication and session management endpoints',
665
+ },
183
666
  {
184
667
  name: 'Packages',
185
668
  description: 'Package management and analysis endpoints',
@@ -196,6 +679,10 @@ exports.swaggerDefinition = {
196
679
  name: 'Configuration',
197
680
  description: 'Configuration file management endpoints',
198
681
  },
682
+ {
683
+ name: 'Publish/Release',
684
+ description: 'Generate Changeset and publish package',
685
+ },
199
686
  ],
200
687
  components: {
201
688
  schemas: {
@@ -308,6 +795,249 @@ exports.swaggerDefinition = {
308
795
  },
309
796
  },
310
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
+ },
311
1041
  Error: {
312
1042
  type: 'object',
313
1043
  properties: {
@@ -337,6 +1067,14 @@ exports.swaggerDefinition = {
337
1067
  description: 'Internal server error',
338
1068
  },
339
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
+ },
340
1078
  },
341
1079
  };
342
1080
  exports.swaggerOptions = {