@fix-portal/ci-frontend 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,98 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface CiBoardProps {
5
+ /** Whether the viewer is an admin: sees private repos + actionable PR links. Host-computed. */
6
+ adminSignal: boolean;
7
+ /** Origin of the CI backend snapshot API (no trailing slash). Defaults to the public CI host. */
8
+ apiBase?: string;
9
+ /** Brand mark for the header. Defaults to a plain text wordmark. */
10
+ logo?: ReactNode;
11
+ /** Footer node. Defaults to a generic, brand-free footer. */
12
+ footerSlot?: ReactNode;
13
+ }
14
+ declare function CiBoard({ adminSignal, apiBase, logo, footerSlot }: CiBoardProps): react.JSX.Element;
15
+
16
+ declare function DefaultFooter(): react.JSX.Element;
17
+
18
+ interface CiConfig {
19
+ apiBase: string;
20
+ }
21
+ declare const DEFAULT_CI_API_BASE = "https://ci.fixportal.org";
22
+
23
+ type SignalState = 'success' | 'failure' | 'running' | 'unknown';
24
+ interface WorkflowRun {
25
+ status: string | null;
26
+ conclusion: string | null;
27
+ htmlUrl: string;
28
+ title: string;
29
+ runNumber: number;
30
+ branch: string | null;
31
+ event: string | null;
32
+ updatedAt: string;
33
+ }
34
+ interface WorkflowSnapshot {
35
+ name: string;
36
+ file: string;
37
+ state: SignalState;
38
+ lastRun: WorkflowRun | null;
39
+ }
40
+ interface PullRequest {
41
+ number: number;
42
+ title: string;
43
+ author: string;
44
+ htmlUrl: string;
45
+ isDraft: boolean;
46
+ createdAt: string;
47
+ }
48
+ interface RepoMetrics {
49
+ nloc: number;
50
+ avgComplexity: number;
51
+ functionCount: number;
52
+ highComplexityCount: number;
53
+ computedAt: string;
54
+ }
55
+ interface JobSignal {
56
+ workflow: string;
57
+ name: string;
58
+ state: SignalState;
59
+ htmlUrl: string;
60
+ updatedAt: string;
61
+ }
62
+ interface RepositorySnapshot {
63
+ name: string;
64
+ htmlUrl: string;
65
+ private: boolean;
66
+ workflows: WorkflowSnapshot[];
67
+ pullRequests: PullRequest[];
68
+ metrics: RepoMetrics | null;
69
+ deploys: JobSignal[];
70
+ packages: JobSignal[];
71
+ }
72
+ interface SummaryCount {
73
+ key: string;
74
+ count: number;
75
+ }
76
+ interface MergedPr {
77
+ number: number;
78
+ title: string;
79
+ author: string;
80
+ repo: string;
81
+ htmlUrl: string;
82
+ mergedAt: string;
83
+ }
84
+ type CiTrendState = 'noData' | 'passing' | 'failing';
85
+ interface CiTrendBucket {
86
+ bucketStart: string;
87
+ state: CiTrendState;
88
+ }
89
+ interface DashboardSnapshot {
90
+ refreshedAt: string;
91
+ org: string;
92
+ repositories: RepositorySnapshot[];
93
+ summary: SummaryCount[];
94
+ lastMergedPr: MergedPr | null;
95
+ ciTrend?: CiTrendBucket[];
96
+ }
97
+
98
+ export { CiBoard, type CiBoardProps, type CiConfig, DEFAULT_CI_API_BASE, type DashboardSnapshot, DefaultFooter, type MergedPr, type PullRequest, type RepositorySnapshot, type SignalState };