@foss.global/interfaces 0.4.0 → 0.5.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.
package/changelog.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-07-21 - 0.5.0
4
+
5
+ ### Features
6
+
7
+ - add repository CI status and run request contracts (repository-ci)
8
+ - Add repository CI run, commit status, and run log view interfaces.
9
+ - Add public typed request contracts for CI status, run logs, and run cancellation.
10
+ - Add test coverage for exported repository CI interfaces and request types.
11
+
3
12
  ## 2026-07-20 - 0.4.0
4
13
 
5
14
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@foss.global/interfaces',
6
- version: '0.4.0',
6
+ version: '0.5.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the foss.global Git platform ecosystem.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx5QkFBeUI7SUFDL0IsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHFHQUFxRztDQUNuSCxDQUFBIn0=
@@ -187,3 +187,37 @@ export interface ICiSetRunnerDrainResponse {
187
187
  runnerId: string;
188
188
  drainRequested: boolean;
189
189
  }
190
+ export type TRepositoryCiTrigger = 'push' | 'manual';
191
+ export type TRepositoryCiRunState = 'dispatching' | TCiJobState;
192
+ export type TRepositoryCiCommitState = 'not_run' | TRepositoryCiRunState;
193
+ export interface IRepositoryCiRunStatus {
194
+ dispatchId: string;
195
+ trigger: TRepositoryCiTrigger;
196
+ refName: string;
197
+ objectId: string;
198
+ workflowRevision: number;
199
+ state: TRepositoryCiRunState;
200
+ jobId: string | null;
201
+ attemptNumber?: number;
202
+ cancelRequested?: boolean;
203
+ createdAt: string;
204
+ updatedAt: string;
205
+ startedAt?: string;
206
+ completedAt?: string;
207
+ exitCode?: number | null;
208
+ failureReason?: string;
209
+ }
210
+ export interface IRepositoryCiCommitStatus {
211
+ org: string;
212
+ repo: string;
213
+ objectId: string;
214
+ state: TRepositoryCiCommitState;
215
+ totalRuns: number;
216
+ counts: Partial<Record<TRepositoryCiRunState, number>>;
217
+ latestRun: IRepositoryCiRunStatus | null;
218
+ runs: IRepositoryCiRunStatus[];
219
+ }
220
+ export interface IRepositoryCiRunLogView {
221
+ run: IRepositoryCiRunStatus;
222
+ logs: ICiLogPage;
223
+ }
@@ -83,3 +83,41 @@ export interface IReq_PublicCommits extends plugins.typedrequestInterfaces.imple
83
83
  selectedCommit: data.IPublicCommitDetail | null;
84
84
  };
85
85
  }
86
+ export interface IReq_RepositoryCiStatus extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RepositoryCiStatus> {
87
+ method: 'repositoryCiStatus';
88
+ request: {
89
+ org: string;
90
+ repo: string;
91
+ objectId: string;
92
+ accessToken?: string;
93
+ };
94
+ response: {
95
+ available: boolean;
96
+ status: data.IRepositoryCiCommitStatus | null;
97
+ };
98
+ }
99
+ export interface IReq_RepositoryCiRunLogs extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RepositoryCiRunLogs> {
100
+ method: 'repositoryCiRunLogs';
101
+ request: {
102
+ org: string;
103
+ repo: string;
104
+ dispatchId: string;
105
+ accessToken: string;
106
+ attemptId?: string;
107
+ fromSequence?: number;
108
+ limit?: number;
109
+ };
110
+ response: data.IRepositoryCiRunLogView;
111
+ }
112
+ export interface IReq_RepositoryCiCancelRun extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RepositoryCiCancelRun> {
113
+ method: 'repositoryCiCancelRun';
114
+ request: {
115
+ org: string;
116
+ repo: string;
117
+ dispatchId: string;
118
+ accessToken: string;
119
+ };
120
+ response: {
121
+ run: data.IRepositoryCiRunStatus;
122
+ };
123
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foss.global/interfaces",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the foss.global Git platform ecosystem.",
6
6
  "exports": {
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@foss.global/interfaces',
6
- version: '0.4.0',
6
+ version: '0.5.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the foss.global Git platform ecosystem.'
8
8
  }
package/ts/data/runner.ts CHANGED
@@ -223,3 +223,41 @@ export interface ICiSetRunnerDrainResponse {
223
223
  runnerId: string;
224
224
  drainRequested: boolean;
225
225
  }
226
+
227
+ export type TRepositoryCiTrigger = 'push' | 'manual';
228
+ export type TRepositoryCiRunState = 'dispatching' | TCiJobState;
229
+ export type TRepositoryCiCommitState = 'not_run' | TRepositoryCiRunState;
230
+
231
+ export interface IRepositoryCiRunStatus {
232
+ dispatchId: string;
233
+ trigger: TRepositoryCiTrigger;
234
+ refName: string;
235
+ objectId: string;
236
+ workflowRevision: number;
237
+ state: TRepositoryCiRunState;
238
+ jobId: string | null;
239
+ attemptNumber?: number;
240
+ cancelRequested?: boolean;
241
+ createdAt: string;
242
+ updatedAt: string;
243
+ startedAt?: string;
244
+ completedAt?: string;
245
+ exitCode?: number | null;
246
+ failureReason?: string;
247
+ }
248
+
249
+ export interface IRepositoryCiCommitStatus {
250
+ org: string;
251
+ repo: string;
252
+ objectId: string;
253
+ state: TRepositoryCiCommitState;
254
+ totalRuns: number;
255
+ counts: Partial<Record<TRepositoryCiRunState, number>>;
256
+ latestRun: IRepositoryCiRunStatus | null;
257
+ runs: IRepositoryCiRunStatus[];
258
+ }
259
+
260
+ export interface IRepositoryCiRunLogView {
261
+ run: IRepositoryCiRunStatus;
262
+ logs: ICiLogPage;
263
+ }
@@ -113,3 +113,56 @@ export interface IReq_PublicCommits
113
113
  selectedCommit: data.IPublicCommitDetail | null;
114
114
  };
115
115
  }
116
+
117
+ export interface IReq_RepositoryCiStatus
118
+ extends plugins.typedrequestInterfaces.implementsTR<
119
+ plugins.typedrequestInterfaces.ITypedRequest,
120
+ IReq_RepositoryCiStatus
121
+ > {
122
+ method: 'repositoryCiStatus';
123
+ request: {
124
+ org: string;
125
+ repo: string;
126
+ objectId: string;
127
+ accessToken?: string;
128
+ };
129
+ response: {
130
+ available: boolean;
131
+ status: data.IRepositoryCiCommitStatus | null;
132
+ };
133
+ }
134
+
135
+ export interface IReq_RepositoryCiRunLogs
136
+ extends plugins.typedrequestInterfaces.implementsTR<
137
+ plugins.typedrequestInterfaces.ITypedRequest,
138
+ IReq_RepositoryCiRunLogs
139
+ > {
140
+ method: 'repositoryCiRunLogs';
141
+ request: {
142
+ org: string;
143
+ repo: string;
144
+ dispatchId: string;
145
+ accessToken: string;
146
+ attemptId?: string;
147
+ fromSequence?: number;
148
+ limit?: number;
149
+ };
150
+ response: data.IRepositoryCiRunLogView;
151
+ }
152
+
153
+ export interface IReq_RepositoryCiCancelRun
154
+ extends plugins.typedrequestInterfaces.implementsTR<
155
+ plugins.typedrequestInterfaces.ITypedRequest,
156
+ IReq_RepositoryCiCancelRun
157
+ > {
158
+ method: 'repositoryCiCancelRun';
159
+ request: {
160
+ org: string;
161
+ repo: string;
162
+ dispatchId: string;
163
+ accessToken: string;
164
+ };
165
+ response: {
166
+ run: data.IRepositoryCiRunStatus;
167
+ };
168
+ }