@foss.global/interfaces 0.5.0 → 0.7.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,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-07-21 - 0.7.0
4
+
5
+ ### Features
6
+
7
+ - add repository issue mutation contracts (repository-issues)
8
+ - Add public typed request contracts for issue creation, comment creation, and state updates.
9
+ - Constrain public issue state values to open or closed.
10
+ - Add test coverage for exported repository issue mutation request types.
11
+
12
+ ## 2026-07-21 - 0.6.0
13
+
14
+ ### Features
15
+
16
+ - add repository CI artifact contracts (ci-artifacts)
17
+ - Add runner job artifact specification types and optional artifact definitions on job specs
18
+ - Expose artifact upload and repository artifact list view interfaces
19
+ - Add repositoryCiArtifacts typed request contract
20
+
3
21
  ## 2026-07-21 - 0.5.0
4
22
 
5
23
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@foss.global/interfaces',
6
- version: '0.5.0',
6
+ version: '0.7.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=
@@ -90,12 +90,13 @@ export interface IPublicIssueLabel {
90
90
  name: string;
91
91
  color: string;
92
92
  }
93
+ export type TRepositoryIssueState = 'open' | 'closed';
93
94
  export interface IPublicIssue {
94
95
  number: number;
95
96
  title: string;
96
97
  body: string;
97
98
  htmlUrl: string;
98
- state: string;
99
+ state: TRepositoryIssueState;
99
100
  comments: number;
100
101
  createdAt: string;
101
102
  updatedAt: string;
@@ -3,6 +3,7 @@ export type TRunnerProtocolVersion = typeof runnerProtocolVersion;
3
3
  export type TOciRuntime = 'docker' | 'podman';
4
4
  export type TJobNetwork = 'none' | 'bridge';
5
5
  export type TLogStream = 'stdout' | 'stderr' | 'runner';
6
+ export type TJobArtifactWhen = 'always' | 'success' | 'failure';
6
7
  export type TJobCompletionStatus = 'succeeded' | 'failed' | 'canceled' | 'timed_out' | 'system_error';
7
8
  export type TCiJobState = 'queued' | 'running' | TJobCompletionStatus;
8
9
  export interface IRunnerCredential {
@@ -15,7 +16,7 @@ export interface IRunnerCapabilities {
15
16
  runtime: TOciRuntime;
16
17
  networks: TJobNetwork[];
17
18
  sourceArchives: ['tar.gz'];
18
- artifacts: false;
19
+ artifacts: boolean;
19
20
  caches: false;
20
21
  serviceContainers: false;
21
22
  }
@@ -63,6 +64,13 @@ export interface IJobSourceArchive {
63
64
  url: string;
64
65
  sha256: string;
65
66
  }
67
+ export interface IJobArtifactSpec {
68
+ name: string;
69
+ path: string;
70
+ when?: TJobArtifactWhen;
71
+ required?: boolean;
72
+ retentionDays?: number;
73
+ }
66
74
  export interface IJobSpec {
67
75
  image: string;
68
76
  command: string[];
@@ -72,6 +80,7 @@ export interface IJobSpec {
72
80
  timeoutMs?: number;
73
81
  resources?: IJobResources;
74
82
  source?: IJobSourceArchive;
83
+ artifacts?: IJobArtifactSpec[];
75
84
  }
76
85
  export interface IJobLease {
77
86
  jobId: string;
@@ -115,6 +124,17 @@ export interface ILogAcknowledgement {
115
124
  serverTime: string;
116
125
  nextSequence: number;
117
126
  }
127
+ export interface ICiArtifactUploadResponse {
128
+ artifactId: string;
129
+ jobId: string;
130
+ attemptId: string;
131
+ name: string;
132
+ sha256: string;
133
+ sizeBytes: number;
134
+ contentType: string;
135
+ createdAt: string;
136
+ expiresAt: string;
137
+ }
118
138
  export interface ICompleteJobRequest extends IJobMutationIdentity {
119
139
  status: TJobCompletionStatus;
120
140
  exitCode: number | null;
@@ -221,3 +241,19 @@ export interface IRepositoryCiRunLogView {
221
241
  run: IRepositoryCiRunStatus;
222
242
  logs: ICiLogPage;
223
243
  }
244
+ export interface IRepositoryCiArtifact {
245
+ artifactId: string;
246
+ dispatchId: string;
247
+ jobId: string;
248
+ attemptId: string;
249
+ name: string;
250
+ sha256: string;
251
+ sizeBytes: number;
252
+ contentType: string;
253
+ createdAt: string;
254
+ expiresAt: string;
255
+ }
256
+ export interface IRepositoryCiArtifactListView {
257
+ run: IRepositoryCiRunStatus;
258
+ artifacts: IRepositoryCiArtifact[];
259
+ }
@@ -121,3 +121,52 @@ export interface IReq_RepositoryCiCancelRun extends plugins.typedrequestInterfac
121
121
  run: data.IRepositoryCiRunStatus;
122
122
  };
123
123
  }
124
+ export interface IReq_RepositoryCiArtifacts extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RepositoryCiArtifacts> {
125
+ method: 'repositoryCiArtifacts';
126
+ request: {
127
+ org: string;
128
+ repo: string;
129
+ dispatchId: string;
130
+ accessToken: string;
131
+ };
132
+ response: data.IRepositoryCiArtifactListView;
133
+ }
134
+ export interface IReq_RepositoryIssueCreate extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RepositoryIssueCreate> {
135
+ method: 'repositoryIssueCreate';
136
+ request: {
137
+ org: string;
138
+ repo: string;
139
+ title: string;
140
+ body: string;
141
+ accessToken: string;
142
+ };
143
+ response: {
144
+ issue: data.IPublicIssue;
145
+ };
146
+ }
147
+ export interface IReq_RepositoryIssueCommentCreate extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RepositoryIssueCommentCreate> {
148
+ method: 'repositoryIssueCommentCreate';
149
+ request: {
150
+ org: string;
151
+ repo: string;
152
+ issueNumber: number;
153
+ body: string;
154
+ accessToken: string;
155
+ };
156
+ response: {
157
+ comment: data.IPublicIssueComment;
158
+ };
159
+ }
160
+ export interface IReq_RepositoryIssueStateUpdate extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RepositoryIssueStateUpdate> {
161
+ method: 'repositoryIssueStateUpdate';
162
+ request: {
163
+ org: string;
164
+ repo: string;
165
+ issueNumber: number;
166
+ state: data.TRepositoryIssueState;
167
+ accessToken: string;
168
+ };
169
+ response: {
170
+ issue: data.IPublicIssue;
171
+ };
172
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foss.global/interfaces",
3
- "version": "0.5.0",
3
+ "version": "0.7.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.5.0',
6
+ version: '0.7.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the foss.global Git platform ecosystem.'
8
8
  }
package/ts/data/public.ts CHANGED
@@ -111,12 +111,14 @@ export interface IPublicIssueLabel {
111
111
  color: string;
112
112
  }
113
113
 
114
+ export type TRepositoryIssueState = 'open' | 'closed';
115
+
114
116
  export interface IPublicIssue {
115
117
  number: number;
116
118
  title: string;
117
119
  body: string;
118
120
  htmlUrl: string;
119
- state: string;
121
+ state: TRepositoryIssueState;
120
122
  comments: number;
121
123
  createdAt: string;
122
124
  updatedAt: string;
package/ts/data/runner.ts CHANGED
@@ -4,6 +4,7 @@ export type TRunnerProtocolVersion = typeof runnerProtocolVersion;
4
4
  export type TOciRuntime = 'docker' | 'podman';
5
5
  export type TJobNetwork = 'none' | 'bridge';
6
6
  export type TLogStream = 'stdout' | 'stderr' | 'runner';
7
+ export type TJobArtifactWhen = 'always' | 'success' | 'failure';
7
8
  export type TJobCompletionStatus =
8
9
  | 'succeeded'
9
10
  | 'failed'
@@ -23,7 +24,7 @@ export interface IRunnerCapabilities {
23
24
  runtime: TOciRuntime;
24
25
  networks: TJobNetwork[];
25
26
  sourceArchives: ['tar.gz'];
26
- artifacts: false;
27
+ artifacts: boolean;
27
28
  caches: false;
28
29
  serviceContainers: false;
29
30
  }
@@ -80,6 +81,14 @@ export interface IJobSourceArchive {
80
81
  sha256: string;
81
82
  }
82
83
 
84
+ export interface IJobArtifactSpec {
85
+ name: string;
86
+ path: string;
87
+ when?: TJobArtifactWhen;
88
+ required?: boolean;
89
+ retentionDays?: number;
90
+ }
91
+
83
92
  export interface IJobSpec {
84
93
  image: string;
85
94
  command: string[];
@@ -89,6 +98,7 @@ export interface IJobSpec {
89
98
  timeoutMs?: number;
90
99
  resources?: IJobResources;
91
100
  source?: IJobSourceArchive;
101
+ artifacts?: IJobArtifactSpec[];
92
102
  }
93
103
 
94
104
  export interface IJobLease {
@@ -140,6 +150,18 @@ export interface ILogAcknowledgement {
140
150
  nextSequence: number;
141
151
  }
142
152
 
153
+ export interface ICiArtifactUploadResponse {
154
+ artifactId: string;
155
+ jobId: string;
156
+ attemptId: string;
157
+ name: string;
158
+ sha256: string;
159
+ sizeBytes: number;
160
+ contentType: string;
161
+ createdAt: string;
162
+ expiresAt: string;
163
+ }
164
+
143
165
  export interface ICompleteJobRequest extends IJobMutationIdentity {
144
166
  status: TJobCompletionStatus;
145
167
  exitCode: number | null;
@@ -261,3 +283,21 @@ export interface IRepositoryCiRunLogView {
261
283
  run: IRepositoryCiRunStatus;
262
284
  logs: ICiLogPage;
263
285
  }
286
+
287
+ export interface IRepositoryCiArtifact {
288
+ artifactId: string;
289
+ dispatchId: string;
290
+ jobId: string;
291
+ attemptId: string;
292
+ name: string;
293
+ sha256: string;
294
+ sizeBytes: number;
295
+ contentType: string;
296
+ createdAt: string;
297
+ expiresAt: string;
298
+ }
299
+
300
+ export interface IRepositoryCiArtifactListView {
301
+ run: IRepositoryCiRunStatus;
302
+ artifacts: IRepositoryCiArtifact[];
303
+ }
@@ -166,3 +166,72 @@ export interface IReq_RepositoryCiCancelRun
166
166
  run: data.IRepositoryCiRunStatus;
167
167
  };
168
168
  }
169
+
170
+ export interface IReq_RepositoryCiArtifacts
171
+ extends plugins.typedrequestInterfaces.implementsTR<
172
+ plugins.typedrequestInterfaces.ITypedRequest,
173
+ IReq_RepositoryCiArtifacts
174
+ > {
175
+ method: 'repositoryCiArtifacts';
176
+ request: {
177
+ org: string;
178
+ repo: string;
179
+ dispatchId: string;
180
+ accessToken: string;
181
+ };
182
+ response: data.IRepositoryCiArtifactListView;
183
+ }
184
+
185
+ export interface IReq_RepositoryIssueCreate
186
+ extends plugins.typedrequestInterfaces.implementsTR<
187
+ plugins.typedrequestInterfaces.ITypedRequest,
188
+ IReq_RepositoryIssueCreate
189
+ > {
190
+ method: 'repositoryIssueCreate';
191
+ request: {
192
+ org: string;
193
+ repo: string;
194
+ title: string;
195
+ body: string;
196
+ accessToken: string;
197
+ };
198
+ response: {
199
+ issue: data.IPublicIssue;
200
+ };
201
+ }
202
+
203
+ export interface IReq_RepositoryIssueCommentCreate
204
+ extends plugins.typedrequestInterfaces.implementsTR<
205
+ plugins.typedrequestInterfaces.ITypedRequest,
206
+ IReq_RepositoryIssueCommentCreate
207
+ > {
208
+ method: 'repositoryIssueCommentCreate';
209
+ request: {
210
+ org: string;
211
+ repo: string;
212
+ issueNumber: number;
213
+ body: string;
214
+ accessToken: string;
215
+ };
216
+ response: {
217
+ comment: data.IPublicIssueComment;
218
+ };
219
+ }
220
+
221
+ export interface IReq_RepositoryIssueStateUpdate
222
+ extends plugins.typedrequestInterfaces.implementsTR<
223
+ plugins.typedrequestInterfaces.ITypedRequest,
224
+ IReq_RepositoryIssueStateUpdate
225
+ > {
226
+ method: 'repositoryIssueStateUpdate';
227
+ request: {
228
+ org: string;
229
+ repo: string;
230
+ issueNumber: number;
231
+ state: data.TRepositoryIssueState;
232
+ accessToken: string;
233
+ };
234
+ response: {
235
+ issue: data.IPublicIssue;
236
+ };
237
+ }