@pg-atlas/data-sdk 0.6.0 → 0.8.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.
@@ -1,124 +1,98 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
- export const VisibilitySchema = {
2
+ export const ActivityStatusSchema = {
3
3
  type: 'string',
4
4
  enum: [
5
- 'public',
6
- 'private'
5
+ 'live',
6
+ 'in-dev',
7
+ 'discontinued',
8
+ 'non-responsive'
7
9
  ],
8
- title: 'Visibility',
9
- description: 'Whether a Repo is publicly accessible (affects data collection scope).'
10
+ title: 'ActivityStatus',
11
+ description: 'Lifecycle status of a Project.\n\nUpdated by the SCF Impact Survey (yearly) and higher-frequency signals;\nsee the Activity Status Update Logic in the architecture docs.'
10
12
  };
11
- export const ValidationErrorSchema = {
13
+ export const ContributionEntrySchema = {
12
14
  properties: {
13
- loc: {
14
- items: {
15
- anyOf: [
16
- {
17
- type: 'string'
18
- },
19
- {
20
- type: 'integer'
21
- }
22
- ]
23
- },
24
- type: 'array',
25
- title: 'Location'
26
- },
27
- msg: {
15
+ repo_canonical_id: {
28
16
  type: 'string',
29
- title: 'Message'
17
+ title: 'Repo Canonical Id'
30
18
  },
31
- type: {
19
+ repo_display_name: {
32
20
  type: 'string',
33
- title: 'Error Type'
21
+ title: 'Repo Display Name'
34
22
  },
35
- input: {
36
- title: 'Input'
23
+ project_canonical_id: {
24
+ anyOf: [
25
+ {
26
+ type: 'string'
27
+ },
28
+ {
29
+ type: 'null'
30
+ }
31
+ ],
32
+ title: 'Project Canonical Id'
37
33
  },
38
- ctx: {
39
- type: 'object',
40
- title: 'Context'
41
- }
42
- },
43
- type: 'object',
44
- required: [
45
- 'loc',
46
- 'msg',
47
- 'type'
48
- ],
49
- title: 'ValidationError'
50
- };
51
- export const SubmissionStatusSchema = {
52
- type: 'string',
53
- enum: [
54
- 'pending',
55
- 'processed',
56
- 'failed'
57
- ],
58
- title: 'SubmissionStatus',
59
- description: 'Processing state of an artifact-linked audit record.'
60
- };
61
- export const ScfSubmissionSchema = {
62
- properties: {
63
- round: {
34
+ number_of_commits: {
35
+ type: 'integer',
36
+ title: 'Number Of Commits'
37
+ },
38
+ first_commit_date: {
64
39
  type: 'string',
65
- title: 'Round'
40
+ format: 'date-time',
41
+ title: 'First Commit Date'
66
42
  },
67
- title: {
43
+ last_commit_date: {
68
44
  type: 'string',
69
- title: 'Title'
45
+ format: 'date-time',
46
+ title: 'Last Commit Date'
70
47
  }
71
48
  },
72
49
  type: 'object',
73
50
  required: [
74
- 'round',
75
- 'title'
51
+ 'repo_canonical_id',
52
+ 'repo_display_name',
53
+ 'project_canonical_id',
54
+ 'number_of_commits',
55
+ 'first_commit_date',
56
+ 'last_commit_date'
76
57
  ],
77
- title: 'ScfSubmission',
78
- description: 'A single SCF funding round submission.'
58
+ title: 'ContributionEntry',
59
+ description: 'A single repo that a contributor has committed to.'
79
60
  };
80
- export const SbomSubmissionResponseSchema = {
61
+ export const ContributorDetailResponseSchema = {
81
62
  properties: {
82
63
  id: {
83
64
  type: 'integer',
84
65
  title: 'Id'
85
66
  },
86
- repository_claim: {
87
- type: 'string',
88
- title: 'Repository Claim'
89
- },
90
- actor_claim: {
67
+ name: {
91
68
  type: 'string',
92
- title: 'Actor Claim'
69
+ title: 'Name'
93
70
  },
94
- sbom_content_hash: {
71
+ email_hash: {
95
72
  type: 'string',
96
- title: 'Sbom Content Hash'
73
+ title: 'Email Hash'
97
74
  },
98
- artifact_path: {
99
- type: 'string',
100
- title: 'Artifact Path'
75
+ total_repos: {
76
+ type: 'integer',
77
+ title: 'Total Repos'
101
78
  },
102
- status: {
103
- $ref: '#/components/schemas/SubmissionStatus'
79
+ total_commits: {
80
+ type: 'integer',
81
+ title: 'Total Commits'
104
82
  },
105
- error_detail: {
83
+ first_contribution: {
106
84
  anyOf: [
107
85
  {
108
- type: 'string'
86
+ type: 'string',
87
+ format: 'date-time'
109
88
  },
110
89
  {
111
90
  type: 'null'
112
91
  }
113
92
  ],
114
- title: 'Error Detail'
115
- },
116
- submitted_at: {
117
- type: 'string',
118
- format: 'date-time',
119
- title: 'Submitted At'
93
+ title: 'First Contribution'
120
94
  },
121
- processed_at: {
95
+ last_contribution: {
122
96
  anyOf: [
123
97
  {
124
98
  type: 'string',
@@ -128,76 +102,109 @@ export const SbomSubmissionResponseSchema = {
128
102
  type: 'null'
129
103
  }
130
104
  ],
131
- title: 'Processed At'
105
+ title: 'Last Contribution'
106
+ },
107
+ repos: {
108
+ items: {
109
+ $ref: '#/components/schemas/ContributionEntry'
110
+ },
111
+ type: 'array',
112
+ title: 'Repos'
132
113
  }
133
114
  },
134
115
  type: 'object',
135
116
  required: [
136
117
  'id',
137
- 'repository_claim',
138
- 'actor_claim',
139
- 'sbom_content_hash',
140
- 'artifact_path',
141
- 'status',
142
- 'error_detail',
143
- 'submitted_at',
144
- 'processed_at'
118
+ 'name',
119
+ 'email_hash',
120
+ 'total_repos',
121
+ 'total_commits',
122
+ 'first_contribution',
123
+ 'last_contribution',
124
+ 'repos'
145
125
  ],
146
- title: 'SbomSubmissionResponse',
147
- description: 'Full SBOM submission record.\n\nSerialised from the ``SbomSubmission`` ORM model. The ``sbom_content_hash``\nfield is the SHA-256 hex digest of the raw submitted payload.'
126
+ title: 'ContributorDetailResponse',
127
+ description: 'Full contributor detail with aggregated statistics and per-repo activity.'
148
128
  };
149
- export const SbomSubmissionListResponseSchema = {
129
+ export const ContributorSummarySchema = {
150
130
  properties: {
151
- items: {
152
- items: {
153
- $ref: '#/components/schemas/SbomSubmissionResponse'
154
- },
155
- type: 'array',
156
- title: 'Items'
157
- },
158
- total: {
131
+ id: {
159
132
  type: 'integer',
160
- title: 'Total'
133
+ title: 'Id'
161
134
  },
162
- limit: {
135
+ name: {
136
+ type: 'string',
137
+ title: 'Name'
138
+ },
139
+ email_hash: {
140
+ type: 'string',
141
+ title: 'Email Hash'
142
+ }
143
+ },
144
+ type: 'object',
145
+ required: [
146
+ 'id',
147
+ 'name',
148
+ 'email_hash'
149
+ ],
150
+ title: 'ContributorSummary',
151
+ description: 'Compact contributor reference embedded in repo detail responses.'
152
+ };
153
+ export const DepCountsSchema = {
154
+ properties: {
155
+ repos: {
163
156
  type: 'integer',
164
- title: 'Limit'
157
+ title: 'Repos'
165
158
  },
166
- offset: {
159
+ external_repos: {
167
160
  type: 'integer',
168
- title: 'Offset'
161
+ title: 'External Repos'
169
162
  }
170
163
  },
171
164
  type: 'object',
172
165
  required: [
173
- 'items',
174
- 'total',
175
- 'limit',
176
- 'offset'
166
+ 'repos',
167
+ 'external_repos'
177
168
  ],
178
- title: 'SbomSubmissionListResponse',
179
- description: 'Paginated list of SBOM submission records.\n\nReturned by the list endpoint with ``total`` reflecting the count after\nany ``repository`` filter has been applied.'
169
+ title: 'DepCounts',
170
+ description: 'Counts of dependency edges grouped by target vertex type.\n\nProvided as part of the repo detail response so the frontend can show\n"depends on N repos + M external" without fetching the full edge list.'
180
171
  };
181
- export const SbomSubmissionDetailResponseSchema = {
172
+ export const EdgeConfidenceSchema = {
173
+ type: 'string',
174
+ enum: [
175
+ 'verified-sbom',
176
+ 'inferred-shadow'
177
+ ],
178
+ title: 'EdgeConfidence',
179
+ description: 'How firmly an edge was established.'
180
+ };
181
+ export const GitLogArtifactDetailResponseSchema = {
182
182
  properties: {
183
183
  id: {
184
184
  type: 'integer',
185
185
  title: 'Id'
186
186
  },
187
- repository_claim: {
188
- type: 'string',
189
- title: 'Repository Claim'
187
+ repo_id: {
188
+ type: 'integer',
189
+ title: 'Repo Id'
190
190
  },
191
- actor_claim: {
191
+ repo_canonical_id: {
192
192
  type: 'string',
193
- title: 'Actor Claim'
193
+ title: 'Repo Canonical Id'
194
194
  },
195
- sbom_content_hash: {
195
+ repo_display_name: {
196
196
  type: 'string',
197
- title: 'Sbom Content Hash'
197
+ title: 'Repo Display Name'
198
198
  },
199
199
  artifact_path: {
200
- type: 'string',
200
+ anyOf: [
201
+ {
202
+ type: 'string'
203
+ },
204
+ {
205
+ type: 'null'
206
+ }
207
+ ],
201
208
  title: 'Artifact Path'
202
209
  },
203
210
  status: {
@@ -214,6 +221,10 @@ export const SbomSubmissionDetailResponseSchema = {
214
221
  ],
215
222
  title: 'Error Detail'
216
223
  },
224
+ since_months: {
225
+ type: 'integer',
226
+ title: 'Since Months'
227
+ },
217
228
  submitted_at: {
218
229
  type: 'string',
219
230
  format: 'date-time',
@@ -246,81 +257,52 @@ export const SbomSubmissionDetailResponseSchema = {
246
257
  type: 'object',
247
258
  required: [
248
259
  'id',
249
- 'repository_claim',
250
- 'actor_claim',
251
- 'sbom_content_hash',
260
+ 'repo_id',
261
+ 'repo_canonical_id',
262
+ 'repo_display_name',
252
263
  'artifact_path',
253
264
  'status',
254
265
  'error_detail',
266
+ 'since_months',
255
267
  'submitted_at',
256
268
  'processed_at'
257
269
  ],
258
- title: 'SbomSubmissionDetailResponse',
259
- description: 'Extended SBOM submission record with the raw artifact content.\n\nReturned by the detail endpoint. ``raw_artifact`` contains the full JSON\ntext of the stored SBOM, or ``None`` if the artifact file is missing from\nthe store.'
270
+ title: 'GitLogArtifactDetailResponse',
271
+ description: 'Full gitlog artifact audit record including raw artifact content.'
260
272
  };
261
- export const SbomAcceptedResponseSchema = {
273
+ export const GitLogArtifactSummarySchema = {
262
274
  properties: {
263
- message: {
264
- type: 'string',
265
- title: 'Message'
266
- },
267
- repository: {
268
- type: 'string',
269
- title: 'Repository'
275
+ id: {
276
+ type: 'integer',
277
+ title: 'Id'
270
278
  },
271
- package_count: {
279
+ repo_id: {
272
280
  type: 'integer',
273
- title: 'Package Count'
274
- }
275
- },
276
- type: 'object',
277
- required: [
278
- 'message',
279
- 'repository',
280
- 'package_count'
281
- ],
282
- title: 'SbomAcceptedResponse',
283
- description: 'Response body returned on successful SBOM submission (202 Accepted).'
284
- };
285
- export const RepoVertexTypeSchema = {
286
- type: 'string',
287
- enum: [
288
- 'repo',
289
- 'external-repo'
290
- ],
291
- title: 'RepoVertexType',
292
- description: 'Discriminator values for the RepoVertex joined-table-inheritance hierarchy.'
293
- };
294
- export const RepoSummarySchema = {
295
- properties: {
296
- canonical_id: {
297
- type: 'string',
298
- title: 'Canonical Id'
281
+ title: 'Repo Id'
299
282
  },
300
- display_name: {
283
+ repo_canonical_id: {
301
284
  type: 'string',
302
- title: 'Display Name'
303
- },
304
- visibility: {
305
- $ref: '#/components/schemas/Visibility'
285
+ title: 'Repo Canonical Id'
306
286
  },
307
- latest_version: {
287
+ repo_display_name: {
308
288
  type: 'string',
309
- title: 'Latest Version'
289
+ title: 'Repo Display Name'
310
290
  },
311
- latest_commit_date: {
291
+ artifact_path: {
312
292
  anyOf: [
313
293
  {
314
- type: 'string',
315
- format: 'date-time'
294
+ type: 'string'
316
295
  },
317
296
  {
318
297
  type: 'null'
319
298
  }
320
299
  ],
321
- title: 'Latest Commit Date'
300
+ title: 'Artifact Path'
322
301
  },
323
- repo_url: {
302
+ status: {
303
+ $ref: '#/components/schemas/SubmissionStatus'
304
+ },
305
+ error_detail: {
324
306
  anyOf: [
325
307
  {
326
308
  type: 'string'
@@ -329,117 +311,132 @@ export const RepoSummarySchema = {
329
311
  type: 'null'
330
312
  }
331
313
  ],
332
- title: 'Repo Url'
314
+ title: 'Error Detail'
333
315
  },
334
- project_id: {
335
- anyOf: [
336
- {
337
- type: 'integer'
338
- },
339
- {
340
- type: 'null'
341
- }
342
- ],
343
- title: 'Project Id'
316
+ since_months: {
317
+ type: 'integer',
318
+ title: 'Since Months'
344
319
  },
345
- pony_factor: {
346
- anyOf: [
347
- {
348
- type: 'integer'
349
- },
350
- {
351
- type: 'null'
352
- }
353
- ],
354
- title: 'Pony Factor'
320
+ submitted_at: {
321
+ type: 'string',
322
+ format: 'date-time',
323
+ title: 'Submitted At'
355
324
  },
356
- criticality_score: {
325
+ processed_at: {
357
326
  anyOf: [
358
327
  {
359
- type: 'integer'
328
+ type: 'string',
329
+ format: 'date-time'
360
330
  },
361
331
  {
362
332
  type: 'null'
363
333
  }
364
334
  ],
365
- title: 'Criticality Score'
335
+ title: 'Processed At'
336
+ }
337
+ },
338
+ type: 'object',
339
+ required: [
340
+ 'id',
341
+ 'repo_id',
342
+ 'repo_canonical_id',
343
+ 'repo_display_name',
344
+ 'artifact_path',
345
+ 'status',
346
+ 'error_detail',
347
+ 'since_months',
348
+ 'submitted_at',
349
+ 'processed_at'
350
+ ],
351
+ title: 'GitLogArtifactSummary',
352
+ description: 'Compact gitlog artifact audit record for list endpoints.'
353
+ };
354
+ export const GithubDependentObservationItemSchema = {
355
+ properties: {
356
+ dependent_canonical_id: {
357
+ type: 'string',
358
+ title: 'Dependent Canonical Id'
366
359
  },
367
- adoption_downloads: {
368
- anyOf: [
369
- {
370
- type: 'integer'
371
- },
372
- {
373
- type: 'null'
374
- }
375
- ],
376
- title: 'Adoption Downloads'
360
+ dependent_repo_url: {
361
+ type: 'string',
362
+ title: 'Dependent Repo Url'
377
363
  },
378
- adoption_stars: {
364
+ observed_owner: {
365
+ type: 'string',
366
+ title: 'Observed Owner'
367
+ },
368
+ observed_repo_name: {
369
+ type: 'string',
370
+ title: 'Observed Repo Name'
371
+ },
372
+ resolved_repo_canonical_id: {
379
373
  anyOf: [
380
374
  {
381
- type: 'integer'
375
+ type: 'string'
382
376
  },
383
377
  {
384
378
  type: 'null'
385
379
  }
386
380
  ],
387
- title: 'Adoption Stars'
381
+ title: 'Resolved Repo Canonical Id'
388
382
  },
389
- adoption_forks: {
383
+ package_ids: {
390
384
  anyOf: [
391
385
  {
392
- type: 'integer'
386
+ items: {
387
+ type: 'string'
388
+ },
389
+ type: 'array'
393
390
  },
394
391
  {
395
392
  type: 'null'
396
393
  }
397
394
  ],
398
- title: 'Adoption Forks'
395
+ title: 'Package Ids'
399
396
  },
400
- updated_at: {
397
+ first_seen_at: {
401
398
  type: 'string',
402
399
  format: 'date-time',
403
- title: 'Updated At'
400
+ title: 'First Seen At'
401
+ },
402
+ last_seen_at: {
403
+ type: 'string',
404
+ format: 'date-time',
405
+ title: 'Last Seen At'
404
406
  }
405
407
  },
406
408
  type: 'object',
407
409
  required: [
408
- 'canonical_id',
409
- 'display_name',
410
- 'visibility',
411
- 'latest_version',
412
- 'latest_commit_date',
413
- 'repo_url',
414
- 'project_id',
415
- 'pony_factor',
416
- 'criticality_score',
417
- 'adoption_downloads',
418
- 'adoption_stars',
419
- 'adoption_forks',
420
- 'updated_at'
410
+ 'dependent_canonical_id',
411
+ 'dependent_repo_url',
412
+ 'observed_owner',
413
+ 'observed_repo_name',
414
+ 'first_seen_at',
415
+ 'last_seen_at'
421
416
  ],
422
- title: 'RepoSummary',
423
- description: 'Compact repo representation used in list endpoints and as an embedded\nreference in project detail responses.'
417
+ title: 'GithubDependentObservationItem',
418
+ description: 'One active GitHub dependent observation for a source repo.'
424
419
  };
425
- export const RepoDetailResponseSchema = {
420
+ export const GithubDependentsResponseSchema = {
426
421
  properties: {
427
- canonical_id: {
428
- type: 'string',
429
- title: 'Canonical Id'
430
- },
431
- display_name: {
432
- type: 'string',
433
- title: 'Display Name'
434
- },
435
- visibility: {
436
- $ref: '#/components/schemas/Visibility'
437
- },
438
- latest_version: {
439
- type: 'string',
440
- title: 'Latest Version'
422
+ summary: {
423
+ $ref: '#/components/schemas/GithubDependentsSummary'
441
424
  },
442
- latest_commit_date: {
425
+ observations: {
426
+ $ref: '#/components/schemas/PaginatedResponse_GithubDependentObservationItem_'
427
+ }
428
+ },
429
+ type: 'object',
430
+ required: [
431
+ 'summary',
432
+ 'observations'
433
+ ],
434
+ title: 'GithubDependentsResponse',
435
+ description: 'Summary plus paginated active observations for one source repo.'
436
+ };
437
+ export const GithubDependentsSummarySchema = {
438
+ properties: {
439
+ latest_attempt_at: {
443
440
  anyOf: [
444
441
  {
445
442
  type: 'string',
@@ -449,9 +446,9 @@ export const RepoDetailResponseSchema = {
449
446
  type: 'null'
450
447
  }
451
448
  ],
452
- title: 'Latest Commit Date'
449
+ title: 'Latest Attempt At'
453
450
  },
454
- repo_url: {
451
+ latest_attempt_status: {
455
452
  anyOf: [
456
453
  {
457
454
  type: 'string'
@@ -460,53 +457,55 @@ export const RepoDetailResponseSchema = {
460
457
  type: 'null'
461
458
  }
462
459
  ],
463
- title: 'Repo Url'
460
+ title: 'Latest Attempt Status'
464
461
  },
465
- project_id: {
462
+ latest_attempt_listing_incomplete_reason: {
466
463
  anyOf: [
467
464
  {
468
- type: 'integer'
465
+ type: 'string'
469
466
  },
470
467
  {
471
468
  type: 'null'
472
469
  }
473
470
  ],
474
- title: 'Project Id'
471
+ title: 'Latest Attempt Listing Incomplete Reason'
475
472
  },
476
- pony_factor: {
473
+ latest_attempt_counts_incomplete_reason: {
477
474
  anyOf: [
478
475
  {
479
- type: 'integer'
476
+ type: 'string'
480
477
  },
481
478
  {
482
479
  type: 'null'
483
480
  }
484
481
  ],
485
- title: 'Pony Factor'
482
+ title: 'Latest Attempt Counts Incomplete Reason'
486
483
  },
487
- criticality_score: {
484
+ observations_as_of: {
488
485
  anyOf: [
489
486
  {
490
- type: 'integer'
487
+ type: 'string',
488
+ format: 'date-time'
491
489
  },
492
490
  {
493
491
  type: 'null'
494
492
  }
495
493
  ],
496
- title: 'Criticality Score'
494
+ title: 'Observations As Of'
497
495
  },
498
- adoption_downloads: {
496
+ reported_counts_as_of: {
499
497
  anyOf: [
500
498
  {
501
- type: 'integer'
499
+ type: 'string',
500
+ format: 'date-time'
502
501
  },
503
502
  {
504
503
  type: 'null'
505
504
  }
506
505
  ],
507
- title: 'Adoption Downloads'
506
+ title: 'Reported Counts As Of'
508
507
  },
509
- adoption_stars: {
508
+ repos_total_reported: {
510
509
  anyOf: [
511
510
  {
512
511
  type: 'integer'
@@ -515,9 +514,9 @@ export const RepoDetailResponseSchema = {
515
514
  type: 'null'
516
515
  }
517
516
  ],
518
- title: 'Adoption Stars'
517
+ title: 'Repos Total Reported'
519
518
  },
520
- adoption_forks: {
519
+ packages_total_reported: {
521
520
  anyOf: [
522
521
  {
523
522
  type: 'integer'
@@ -526,501 +525,481 @@ export const RepoDetailResponseSchema = {
526
525
  type: 'null'
527
526
  }
528
527
  ],
529
- title: 'Adoption Forks'
530
- },
531
- updated_at: {
532
- type: 'string',
533
- format: 'date-time',
534
- title: 'Updated At'
528
+ title: 'Packages Total Reported'
535
529
  },
536
- releases: {
530
+ packages_scanned: {
537
531
  anyOf: [
538
532
  {
539
- items: {
540
- properties: {
541
- purl: {
542
- type: 'string'
543
- },
544
- version: {
545
- type: 'string'
546
- },
547
- release_date: {
548
- type: 'string',
549
- default: ''
550
- }
551
- },
552
- type: 'object',
553
- required: [
554
- 'purl',
555
- 'version'
556
- ],
557
- title: 'Release',
558
- description: 'One normalized release record keyed by package PURL + version.'
559
- },
560
- type: 'array'
533
+ type: 'integer'
561
534
  },
562
535
  {
563
536
  type: 'null'
564
537
  }
565
538
  ],
566
- title: 'Releases'
539
+ title: 'Packages Scanned'
567
540
  },
568
- parent_project: {
569
- anyOf: [
570
- {
571
- $ref: '#/components/schemas/ProjectSummary'
572
- },
573
- {
574
- type: 'null'
575
- }
576
- ]
577
- },
578
- contributors: {
541
+ active_observations: {
542
+ type: 'integer',
543
+ title: 'Active Observations',
544
+ default: 0
545
+ }
546
+ },
547
+ type: 'object',
548
+ title: 'GithubDependentsSummary',
549
+ description: 'Freshness and completeness summary for a source repo\'s observations.\n\n``observations_as_of`` is the finish time of the latest applied\nlisting-complete run; ``reported_counts_as_of`` is the finish time of the\nlatest applied counts-complete run. The two can point to different runs,\nso the reported totals always carry their own timestamp. Reported header\ntotals may exceed the enumerable public entries and, for multi-package\nrepositories, are per-package sums that can double count a dependent\nusing several packages.'
550
+ };
551
+ export const HTTPValidationErrorSchema = {
552
+ properties: {
553
+ detail: {
579
554
  items: {
580
- $ref: '#/components/schemas/ContributorSummary'
555
+ $ref: '#/components/schemas/ValidationError'
581
556
  },
582
557
  type: 'array',
583
- title: 'Contributors'
584
- },
585
- outgoing_dep_counts: {
586
- $ref: '#/components/schemas/DepCounts'
587
- },
588
- incoming_dep_counts: {
589
- $ref: '#/components/schemas/DepCounts'
558
+ title: 'Detail'
559
+ }
560
+ },
561
+ type: 'object',
562
+ title: 'HTTPValidationError'
563
+ };
564
+ export const HealthComponentsSchema = {
565
+ properties: {
566
+ artifact_store: {
567
+ type: 'string',
568
+ enum: [
569
+ 'local',
570
+ 'IPFS'
571
+ ],
572
+ title: 'Artifact Store'
590
573
  },
591
- active_contributors_30d: {
592
- type: 'integer',
593
- title: 'Active Contributors 30D'
574
+ database: {
575
+ type: 'string',
576
+ enum: [
577
+ 'ready',
578
+ 'not-configured'
579
+ ],
580
+ title: 'Database'
594
581
  },
595
- active_contributors_90d: {
596
- type: 'integer',
597
- title: 'Active Contributors 90D'
582
+ schema_version: {
583
+ anyOf: [
584
+ {
585
+ type: 'string'
586
+ },
587
+ {
588
+ type: 'null'
589
+ }
590
+ ],
591
+ title: 'Schema Version'
598
592
  }
599
593
  },
600
594
  type: 'object',
601
595
  required: [
602
- 'canonical_id',
603
- 'display_name',
604
- 'visibility',
605
- 'latest_version',
606
- 'latest_commit_date',
607
- 'repo_url',
608
- 'project_id',
609
- 'pony_factor',
610
- 'criticality_score',
611
- 'adoption_downloads',
612
- 'adoption_stars',
613
- 'adoption_forks',
614
- 'updated_at',
615
- 'releases',
616
- 'parent_project',
617
- 'contributors',
618
- 'outgoing_dep_counts',
619
- 'incoming_dep_counts',
620
- 'active_contributors_30d',
621
- 'active_contributors_90d'
596
+ 'artifact_store',
597
+ 'database',
598
+ 'schema_version'
622
599
  ],
623
- title: 'RepoDetailResponse',
624
- description: 'Full repo detail with parent project, contributors, releases, dependency counts,\nand active contributor stats.'
600
+ title: 'HealthComponents',
601
+ description: 'Component-level readiness details for GET /health.'
625
602
  };
626
- export const DepCountsSchema = {
603
+ export const HealthResponseSchema = {
627
604
  properties: {
628
- repos: {
629
- type: 'integer',
630
- title: 'Repos'
605
+ status: {
606
+ type: 'string',
607
+ enum: [
608
+ 'live',
609
+ 'ready'
610
+ ],
611
+ title: 'Status'
631
612
  },
632
- external_repos: {
633
- type: 'integer',
634
- title: 'External Repos'
613
+ version: {
614
+ type: 'string',
615
+ title: 'Version'
616
+ },
617
+ components: {
618
+ $ref: '#/components/schemas/HealthComponents'
635
619
  }
636
620
  },
637
621
  type: 'object',
638
622
  required: [
639
- 'repos',
640
- 'external_repos'
623
+ 'status',
624
+ 'version',
625
+ 'components'
641
626
  ],
642
- title: 'DepCounts',
643
- description: 'Counts of dependency edges grouped by target vertex type.\n\nProvided as part of the repo detail response so the frontend can show\n"depends on N repos + M external" without fetching the full edge list.'
627
+ title: 'HealthResponse',
628
+ description: 'Response body for GET /health.'
644
629
  };
645
- export const ContributorSummarySchema = {
630
+ export const MaintenanceProfileResponseSchema = {
646
631
  properties: {
647
- id: {
632
+ schema_version: {
648
633
  type: 'integer',
649
- title: 'Id'
634
+ title: 'Schema Version'
650
635
  },
651
- name: {
636
+ as_of: {
652
637
  type: 'string',
653
- title: 'Name'
638
+ title: 'As Of'
654
639
  },
655
- email_hash: {
656
- type: 'string',
657
- title: 'Email Hash'
640
+ window_days: {
641
+ type: 'integer',
642
+ title: 'Window Days'
643
+ },
644
+ response_interval_days: {
645
+ type: 'integer',
646
+ title: 'Response Interval Days'
647
+ },
648
+ eligible_population: {
649
+ type: 'integer',
650
+ title: 'Eligible Population'
651
+ },
652
+ signals: {
653
+ additionalProperties: {
654
+ additionalProperties: true,
655
+ type: 'object'
656
+ },
657
+ type: 'object',
658
+ title: 'Signals'
658
659
  }
659
660
  },
660
661
  type: 'object',
661
662
  required: [
662
- 'id',
663
- 'name',
664
- 'email_hash'
665
- ],
666
- title: 'ContributorSummary',
667
- description: 'Compact contributor reference embedded in repo detail responses.'
668
- };
669
- export const ActivityStatusSchema = {
670
- type: 'string',
671
- enum: [
672
- 'live',
673
- 'in-dev',
674
- 'discontinued',
675
- 'non-responsive'
676
- ],
677
- title: 'ActivityStatus',
678
- description: 'Lifecycle status of a Project.\n\nUpdated by the SCF Impact Survey (yearly) and higher-frequency signals;\nsee the Activity Status Update Logic in the architecture docs.'
679
- };
680
- export const ProjectTypeSchema = {
681
- type: 'string',
682
- enum: [
683
- 'public-good',
684
- 'scf-project'
663
+ 'schema_version',
664
+ 'as_of',
665
+ 'window_days',
666
+ 'response_interval_days',
667
+ 'eligible_population',
668
+ 'signals'
685
669
  ],
686
- title: 'ProjectType',
687
- description: 'Classification of a Project within the PG Atlas universe.'
670
+ title: 'MaintenanceProfileResponse',
671
+ description: 'Stored maintenance profile for one repo, as materialized.'
688
672
  };
689
- export const ProjectSummarySchema = {
673
+ export const MetadataResponseSchema = {
690
674
  properties: {
691
- canonical_id: {
692
- type: 'string',
693
- title: 'Canonical Id'
675
+ total_projects: {
676
+ type: 'integer',
677
+ title: 'Total Projects'
694
678
  },
695
- display_name: {
696
- type: 'string',
697
- title: 'Display Name'
679
+ active_projects: {
680
+ type: 'integer',
681
+ title: 'Active Projects'
698
682
  },
699
- project_type: {
700
- $ref: '#/components/schemas/ProjectType'
683
+ total_repos: {
684
+ type: 'integer',
685
+ title: 'Total Repos'
701
686
  },
702
- activity_status: {
703
- $ref: '#/components/schemas/ActivityStatus'
687
+ active_repos_90d: {
688
+ type: 'integer',
689
+ title: 'Active Repos 90D'
704
690
  },
705
- category: {
706
- anyOf: [
707
- {
708
- type: 'string'
709
- },
710
- {
711
- type: 'null'
712
- }
713
- ],
714
- title: 'Category'
691
+ total_external_repos: {
692
+ type: 'integer',
693
+ title: 'Total External Repos'
715
694
  },
716
- git_owner_url: {
717
- anyOf: [
718
- {
719
- type: 'string'
720
- },
721
- {
722
- type: 'null'
723
- }
724
- ],
725
- title: 'Git Owner Url'
695
+ total_dependency_edges: {
696
+ type: 'integer',
697
+ title: 'Total Dependency Edges'
726
698
  },
727
- pony_factor: {
728
- anyOf: [
729
- {
730
- type: 'integer'
731
- },
732
- {
733
- type: 'null'
734
- }
735
- ],
736
- title: 'Pony Factor'
699
+ total_contributor_edges: {
700
+ type: 'integer',
701
+ title: 'Total Contributor Edges'
737
702
  },
738
- criticality_score: {
739
- anyOf: [
740
- {
741
- type: 'integer'
742
- },
743
- {
744
- type: 'null'
745
- }
746
- ],
747
- title: 'Criticality Score'
703
+ active_contributors_30d: {
704
+ type: 'integer',
705
+ title: 'Active Contributors 30D'
748
706
  },
749
- adoption_score: {
707
+ active_contributors_90d: {
708
+ type: 'integer',
709
+ title: 'Active Contributors 90D'
710
+ },
711
+ last_updated: {
750
712
  anyOf: [
751
713
  {
752
- type: 'number'
714
+ type: 'string',
715
+ format: 'date-time'
753
716
  },
754
717
  {
755
718
  type: 'null'
756
719
  }
757
720
  ],
758
- title: 'Adoption Score'
759
- },
760
- updated_at: {
761
- type: 'string',
762
- format: 'date-time',
763
- title: 'Updated At'
721
+ title: 'Last Updated'
764
722
  }
765
723
  },
766
724
  type: 'object',
767
725
  required: [
768
- 'canonical_id',
769
- 'display_name',
770
- 'project_type',
771
- 'activity_status',
772
- 'category',
773
- 'git_owner_url',
774
- 'pony_factor',
775
- 'criticality_score',
776
- 'adoption_score',
777
- 'updated_at'
726
+ 'total_projects',
727
+ 'active_projects',
728
+ 'total_repos',
729
+ 'active_repos_90d',
730
+ 'total_external_repos',
731
+ 'total_dependency_edges',
732
+ 'total_contributor_edges',
733
+ 'active_contributors_30d',
734
+ 'active_contributors_90d',
735
+ 'last_updated'
778
736
  ],
779
- title: 'ProjectSummary',
780
- description: 'Compact project representation used in list endpoints and as an embedded\nreference in repo detail responses.'
737
+ title: 'MetadataResponse',
738
+ description: 'Ecosystem-wide summary statistics returned by ``GET /metadata``.'
781
739
  };
782
- export const RepoDependencySchema = {
740
+ export const PaginatedResponse_ContributorSummary_Schema = {
783
741
  properties: {
784
- canonical_id: {
785
- type: 'string',
786
- title: 'Canonical Id'
787
- },
788
- display_name: {
789
- type: 'string',
790
- title: 'Display Name'
742
+ items: {
743
+ items: {
744
+ $ref: '#/components/schemas/ContributorSummary'
745
+ },
746
+ type: 'array',
747
+ title: 'Items'
791
748
  },
792
- vertex_type: {
793
- $ref: '#/components/schemas/RepoVertexType'
749
+ total: {
750
+ type: 'integer',
751
+ title: 'Total'
794
752
  },
795
- version_range: {
796
- anyOf: [
797
- {
798
- type: 'string'
799
- },
800
- {
801
- type: 'null'
802
- }
803
- ],
804
- title: 'Version Range'
753
+ limit: {
754
+ type: 'integer',
755
+ title: 'Limit'
805
756
  },
806
- confidence: {
807
- $ref: '#/components/schemas/EdgeConfidence'
757
+ offset: {
758
+ type: 'integer',
759
+ title: 'Offset'
808
760
  }
809
761
  },
810
762
  type: 'object',
811
763
  required: [
812
- 'canonical_id',
813
- 'display_name',
814
- 'vertex_type',
815
- 'version_range',
816
- 'confidence'
817
- ],
818
- title: 'RepoDependency',
819
- description: 'A single dependency or reverse-dependency edge from a repo.\n\n``vertex_type`` tells the frontend whether the target is an in-ecosystem\n``Repo`` or an ``ExternalRepo``.'
820
- };
821
- export const EdgeConfidenceSchema = {
822
- type: 'string',
823
- enum: [
824
- 'verified-sbom',
825
- 'inferred-shadow'
764
+ 'items',
765
+ 'total',
766
+ 'limit',
767
+ 'offset'
826
768
  ],
827
- title: 'EdgeConfidence',
828
- description: 'How firmly an edge was established.'
769
+ title: 'PaginatedResponse[ContributorSummary]'
829
770
  };
830
- export const RepoContributorSummarySchema = {
771
+ export const PaginatedResponse_GitLogArtifactSummary_Schema = {
831
772
  properties: {
832
- id: {
773
+ items: {
774
+ items: {
775
+ $ref: '#/components/schemas/GitLogArtifactSummary'
776
+ },
777
+ type: 'array',
778
+ title: 'Items'
779
+ },
780
+ total: {
833
781
  type: 'integer',
834
- title: 'Id'
782
+ title: 'Total'
835
783
  },
836
- name: {
837
- type: 'string',
838
- title: 'Name'
784
+ limit: {
785
+ type: 'integer',
786
+ title: 'Limit'
839
787
  },
840
- email_hash: {
841
- type: 'string',
842
- title: 'Email Hash'
788
+ offset: {
789
+ type: 'integer',
790
+ title: 'Offset'
791
+ }
792
+ },
793
+ type: 'object',
794
+ required: [
795
+ 'items',
796
+ 'total',
797
+ 'limit',
798
+ 'offset'
799
+ ],
800
+ title: 'PaginatedResponse[GitLogArtifactSummary]'
801
+ };
802
+ export const PaginatedResponse_GithubDependentObservationItem_Schema = {
803
+ properties: {
804
+ items: {
805
+ items: {
806
+ $ref: '#/components/schemas/GithubDependentObservationItem'
807
+ },
808
+ type: 'array',
809
+ title: 'Items'
843
810
  },
844
- number_of_commits: {
811
+ total: {
845
812
  type: 'integer',
846
- title: 'Number Of Commits'
813
+ title: 'Total'
847
814
  },
848
- first_commit_date: {
849
- type: 'string',
850
- format: 'date-time',
851
- title: 'First Commit Date'
815
+ limit: {
816
+ type: 'integer',
817
+ title: 'Limit'
852
818
  },
853
- last_commit_date: {
854
- type: 'string',
855
- format: 'date-time',
856
- title: 'Last Commit Date'
819
+ offset: {
820
+ type: 'integer',
821
+ title: 'Offset'
857
822
  }
858
823
  },
859
824
  type: 'object',
860
825
  required: [
861
- 'id',
862
- 'name',
863
- 'email_hash',
864
- 'number_of_commits',
865
- 'first_commit_date',
866
- 'last_commit_date'
826
+ 'items',
827
+ 'total',
828
+ 'limit',
829
+ 'offset'
867
830
  ],
868
- title: 'RepoContributorSummary',
869
- description: 'Contributor summary with commit counts for one repo.'
831
+ title: 'PaginatedResponse[GithubDependentObservationItem]'
870
832
  };
871
- export const ProjectMetadataSchema = {
833
+ export const PaginatedResponse_ProjectContributorSummary_Schema = {
872
834
  properties: {
873
- scf_submissions: {
835
+ items: {
874
836
  items: {
875
- $ref: '#/components/schemas/ScfSubmission'
837
+ $ref: '#/components/schemas/ProjectContributorSummary'
876
838
  },
877
839
  type: 'array',
878
- title: 'Scf Submissions',
879
- default: []
840
+ title: 'Items'
880
841
  },
881
- description: {
882
- anyOf: [
883
- {
884
- type: 'string'
885
- },
886
- {
887
- type: 'null'
888
- }
889
- ],
890
- title: 'Description'
842
+ total: {
843
+ type: 'integer',
844
+ title: 'Total'
891
845
  },
892
- technical_architecture: {
893
- anyOf: [
894
- {
895
- type: 'string'
896
- },
897
- {
898
- type: 'null'
899
- }
900
- ],
901
- title: 'Technical Architecture'
846
+ limit: {
847
+ type: 'integer',
848
+ title: 'Limit'
902
849
  },
903
- scf_tranche_completion: {
904
- anyOf: [
905
- {
906
- type: 'string'
907
- },
908
- {
909
- type: 'null'
910
- }
911
- ],
912
- title: 'Scf Tranche Completion'
850
+ offset: {
851
+ type: 'integer',
852
+ title: 'Offset'
853
+ }
854
+ },
855
+ type: 'object',
856
+ required: [
857
+ 'items',
858
+ 'total',
859
+ 'limit',
860
+ 'offset'
861
+ ],
862
+ title: 'PaginatedResponse[ProjectContributorSummary]'
863
+ };
864
+ export const PaginatedResponse_ProjectSummary_Schema = {
865
+ properties: {
866
+ items: {
867
+ items: {
868
+ $ref: '#/components/schemas/ProjectSummary'
869
+ },
870
+ type: 'array',
871
+ title: 'Items'
913
872
  },
914
- website: {
915
- anyOf: [
916
- {
917
- type: 'string'
918
- },
919
- {
920
- type: 'null'
921
- }
922
- ],
923
- title: 'Website'
873
+ total: {
874
+ type: 'integer',
875
+ title: 'Total'
924
876
  },
925
- x_profile: {
926
- anyOf: [
927
- {
928
- type: 'string'
929
- },
930
- {
931
- type: 'null'
932
- }
933
- ],
934
- title: 'X Profile'
877
+ limit: {
878
+ type: 'integer',
879
+ title: 'Limit'
935
880
  },
936
- total_awarded_usd: {
937
- anyOf: [
938
- {
939
- type: 'integer'
940
- },
941
- {
942
- type: 'number'
943
- },
944
- {
945
- type: 'null'
946
- }
947
- ],
948
- title: 'Total Awarded Usd'
881
+ offset: {
882
+ type: 'integer',
883
+ title: 'Offset'
884
+ }
885
+ },
886
+ type: 'object',
887
+ required: [
888
+ 'items',
889
+ 'total',
890
+ 'limit',
891
+ 'offset'
892
+ ],
893
+ title: 'PaginatedResponse[ProjectSummary]'
894
+ };
895
+ export const PaginatedResponse_RepoContributorSummary_Schema = {
896
+ properties: {
897
+ items: {
898
+ items: {
899
+ $ref: '#/components/schemas/RepoContributorSummary'
900
+ },
901
+ type: 'array',
902
+ title: 'Items'
949
903
  },
950
- total_paid_usd: {
951
- anyOf: [
952
- {
953
- type: 'integer'
954
- },
955
- {
956
- type: 'number'
957
- },
958
- {
959
- type: 'null'
960
- }
961
- ],
962
- title: 'Total Paid Usd'
904
+ total: {
905
+ type: 'integer',
906
+ title: 'Total'
963
907
  },
964
- awarded_submissions_count: {
965
- anyOf: [
966
- {
967
- type: 'integer'
968
- },
969
- {
970
- type: 'null'
971
- }
972
- ],
973
- title: 'Awarded Submissions Count'
908
+ limit: {
909
+ type: 'integer',
910
+ title: 'Limit'
974
911
  },
975
- open_source: {
976
- anyOf: [
977
- {
978
- type: 'boolean'
979
- },
980
- {
981
- type: 'null'
982
- }
983
- ],
984
- title: 'Open Source'
912
+ offset: {
913
+ type: 'integer',
914
+ title: 'Offset'
915
+ }
916
+ },
917
+ type: 'object',
918
+ required: [
919
+ 'items',
920
+ 'total',
921
+ 'limit',
922
+ 'offset'
923
+ ],
924
+ title: 'PaginatedResponse[RepoContributorSummary]'
925
+ };
926
+ export const PaginatedResponse_RepoSummary_Schema = {
927
+ properties: {
928
+ items: {
929
+ items: {
930
+ $ref: '#/components/schemas/RepoSummary'
931
+ },
932
+ type: 'array',
933
+ title: 'Items'
985
934
  },
986
- socials: {
987
- anyOf: [
988
- {
989
- items: {
990
- additionalProperties: true,
991
- type: 'object'
992
- },
993
- type: 'array'
994
- },
995
- {
996
- type: 'null'
997
- }
998
- ],
999
- title: 'Socials'
935
+ total: {
936
+ type: 'integer',
937
+ title: 'Total'
1000
938
  },
1001
- analytics: {
1002
- anyOf: [
1003
- {},
1004
- {
1005
- type: 'null'
1006
- }
1007
- ],
1008
- title: 'Analytics'
939
+ limit: {
940
+ type: 'integer',
941
+ title: 'Limit'
1009
942
  },
1010
- regions_of_operation: {
1011
- anyOf: [
1012
- {},
1013
- {
1014
- type: 'null'
1015
- }
1016
- ],
1017
- title: 'Regions Of Operation'
943
+ offset: {
944
+ type: 'integer',
945
+ title: 'Offset'
1018
946
  }
1019
947
  },
1020
- additionalProperties: true,
1021
948
  type: 'object',
1022
- title: 'ProjectMetadata',
1023
- description: 'Validates and normalises the ``project_metadata`` JSONB column on ``Project``.\n\nThe single write path (``_build_project_metadata`` in the OpenGrants crawler)\nguarantees consistent key names and types. ``extra = "allow"`` ensures that\nany future keys added by the crawler pass through without breaking the API.\nFuture keys must still be added in this model for clarity.'
949
+ required: [
950
+ 'items',
951
+ 'total',
952
+ 'limit',
953
+ 'offset'
954
+ ],
955
+ title: 'PaginatedResponse[RepoSummary]'
956
+ };
957
+ export const ProjectContributorSummarySchema = {
958
+ properties: {
959
+ id: {
960
+ type: 'integer',
961
+ title: 'Id'
962
+ },
963
+ name: {
964
+ type: 'string',
965
+ title: 'Name'
966
+ },
967
+ email_hash: {
968
+ type: 'string',
969
+ title: 'Email Hash'
970
+ },
971
+ total_commits_in_project: {
972
+ type: 'integer',
973
+ title: 'Total Commits In Project'
974
+ }
975
+ },
976
+ type: 'object',
977
+ required: [
978
+ 'id',
979
+ 'name',
980
+ 'email_hash',
981
+ 'total_commits_in_project'
982
+ ],
983
+ title: 'ProjectContributorSummary',
984
+ description: 'Contributor summary aggregated across all repos in a project.'
985
+ };
986
+ export const ProjectDependencySchema = {
987
+ properties: {
988
+ project: {
989
+ $ref: '#/components/schemas/ProjectSummary'
990
+ },
991
+ edge_count: {
992
+ type: 'integer',
993
+ title: 'Edge Count'
994
+ }
995
+ },
996
+ type: 'object',
997
+ required: [
998
+ 'project',
999
+ 'edge_count'
1000
+ ],
1001
+ title: 'ProjectDependency',
1002
+ description: 'A collapsed project-level dependency: aggregates repo-level edges\nbetween two projects into a single summary.'
1024
1003
  };
1025
1004
  export const ProjectDetailResponseSchema = {
1026
1005
  properties: {
@@ -1134,241 +1113,573 @@ export const ProjectDetailResponseSchema = {
1134
1113
  title: 'ProjectDetailResponse',
1135
1114
  description: 'Full project detail including contributor stats and metadata.\n\n``metadata`` is the normalised form of the ``project_metadata`` JSONB column.'
1136
1115
  };
1137
- export const ProjectDependencySchema = {
1138
- properties: {
1139
- project: {
1140
- $ref: '#/components/schemas/ProjectSummary'
1141
- },
1142
- edge_count: {
1143
- type: 'integer',
1144
- title: 'Edge Count'
1145
- }
1146
- },
1147
- type: 'object',
1148
- required: [
1149
- 'project',
1150
- 'edge_count'
1151
- ],
1152
- title: 'ProjectDependency',
1153
- description: 'A collapsed project-level dependency: aggregates repo-level edges\nbetween two projects into a single summary.'
1154
- };
1155
- export const ProjectContributorSummarySchema = {
1156
- properties: {
1157
- id: {
1158
- type: 'integer',
1159
- title: 'Id'
1160
- },
1161
- name: {
1162
- type: 'string',
1163
- title: 'Name'
1164
- },
1165
- email_hash: {
1166
- type: 'string',
1167
- title: 'Email Hash'
1168
- },
1169
- total_commits_in_project: {
1170
- type: 'integer',
1171
- title: 'Total Commits In Project'
1172
- }
1173
- },
1174
- type: 'object',
1175
- required: [
1176
- 'id',
1177
- 'name',
1178
- 'email_hash',
1179
- 'total_commits_in_project'
1180
- ],
1181
- title: 'ProjectContributorSummary',
1182
- description: 'Contributor summary aggregated across all repos in a project.'
1183
- };
1184
- export const PaginatedResponse_RepoSummary_Schema = {
1116
+ export const ProjectMetadataSchema = {
1185
1117
  properties: {
1186
- items: {
1118
+ scf_submissions: {
1187
1119
  items: {
1188
- $ref: '#/components/schemas/RepoSummary'
1120
+ $ref: '#/components/schemas/ScfSubmission'
1189
1121
  },
1190
1122
  type: 'array',
1191
- title: 'Items'
1192
- },
1193
- total: {
1194
- type: 'integer',
1195
- title: 'Total'
1123
+ title: 'Scf Submissions',
1124
+ default: []
1196
1125
  },
1197
- limit: {
1198
- type: 'integer',
1199
- title: 'Limit'
1126
+ description: {
1127
+ anyOf: [
1128
+ {
1129
+ type: 'string'
1130
+ },
1131
+ {
1132
+ type: 'null'
1133
+ }
1134
+ ],
1135
+ title: 'Description'
1200
1136
  },
1201
- offset: {
1202
- type: 'integer',
1203
- title: 'Offset'
1137
+ technical_architecture: {
1138
+ anyOf: [
1139
+ {
1140
+ type: 'string'
1141
+ },
1142
+ {
1143
+ type: 'null'
1144
+ }
1145
+ ],
1146
+ title: 'Technical Architecture'
1147
+ },
1148
+ scf_tranche_completion: {
1149
+ anyOf: [
1150
+ {
1151
+ type: 'string'
1152
+ },
1153
+ {
1154
+ type: 'null'
1155
+ }
1156
+ ],
1157
+ title: 'Scf Tranche Completion'
1158
+ },
1159
+ website: {
1160
+ anyOf: [
1161
+ {
1162
+ type: 'string'
1163
+ },
1164
+ {
1165
+ type: 'null'
1166
+ }
1167
+ ],
1168
+ title: 'Website'
1169
+ },
1170
+ x_profile: {
1171
+ anyOf: [
1172
+ {
1173
+ type: 'string'
1174
+ },
1175
+ {
1176
+ type: 'null'
1177
+ }
1178
+ ],
1179
+ title: 'X Profile'
1180
+ },
1181
+ total_awarded_usd: {
1182
+ anyOf: [
1183
+ {
1184
+ type: 'integer'
1185
+ },
1186
+ {
1187
+ type: 'number'
1188
+ },
1189
+ {
1190
+ type: 'null'
1191
+ }
1192
+ ],
1193
+ title: 'Total Awarded Usd'
1194
+ },
1195
+ total_paid_usd: {
1196
+ anyOf: [
1197
+ {
1198
+ type: 'integer'
1199
+ },
1200
+ {
1201
+ type: 'number'
1202
+ },
1203
+ {
1204
+ type: 'null'
1205
+ }
1206
+ ],
1207
+ title: 'Total Paid Usd'
1208
+ },
1209
+ awarded_submissions_count: {
1210
+ anyOf: [
1211
+ {
1212
+ type: 'integer'
1213
+ },
1214
+ {
1215
+ type: 'null'
1216
+ }
1217
+ ],
1218
+ title: 'Awarded Submissions Count'
1219
+ },
1220
+ open_source: {
1221
+ anyOf: [
1222
+ {
1223
+ type: 'boolean'
1224
+ },
1225
+ {
1226
+ type: 'null'
1227
+ }
1228
+ ],
1229
+ title: 'Open Source'
1230
+ },
1231
+ socials: {
1232
+ anyOf: [
1233
+ {
1234
+ items: {
1235
+ additionalProperties: true,
1236
+ type: 'object'
1237
+ },
1238
+ type: 'array'
1239
+ },
1240
+ {
1241
+ type: 'null'
1242
+ }
1243
+ ],
1244
+ title: 'Socials'
1245
+ },
1246
+ analytics: {
1247
+ anyOf: [
1248
+ {},
1249
+ {
1250
+ type: 'null'
1251
+ }
1252
+ ],
1253
+ title: 'Analytics'
1254
+ },
1255
+ regions_of_operation: {
1256
+ anyOf: [
1257
+ {},
1258
+ {
1259
+ type: 'null'
1260
+ }
1261
+ ],
1262
+ title: 'Regions Of Operation'
1204
1263
  }
1205
1264
  },
1265
+ additionalProperties: true,
1206
1266
  type: 'object',
1207
- required: [
1208
- 'items',
1209
- 'total',
1210
- 'limit',
1211
- 'offset'
1212
- ],
1213
- title: 'PaginatedResponse[RepoSummary]'
1267
+ title: 'ProjectMetadata',
1268
+ description: 'Validates and normalises the ``project_metadata`` JSONB column on ``Project``.\n\nThe single write path (``_build_project_metadata`` in the OpenGrants crawler)\nguarantees consistent key names and types. ``extra = "allow"`` ensures that\nany future keys added by the crawler pass through without breaking the API.\nFuture keys must still be added in this model for clarity.'
1214
1269
  };
1215
- export const PaginatedResponse_RepoContributorSummary_Schema = {
1270
+ export const ProjectSummarySchema = {
1216
1271
  properties: {
1217
- items: {
1218
- items: {
1219
- $ref: '#/components/schemas/RepoContributorSummary'
1220
- },
1221
- type: 'array',
1222
- title: 'Items'
1272
+ canonical_id: {
1273
+ type: 'string',
1274
+ title: 'Canonical Id'
1223
1275
  },
1224
- total: {
1225
- type: 'integer',
1226
- title: 'Total'
1276
+ display_name: {
1277
+ type: 'string',
1278
+ title: 'Display Name'
1227
1279
  },
1228
- limit: {
1229
- type: 'integer',
1230
- title: 'Limit'
1280
+ project_type: {
1281
+ $ref: '#/components/schemas/ProjectType'
1231
1282
  },
1232
- offset: {
1233
- type: 'integer',
1234
- title: 'Offset'
1283
+ activity_status: {
1284
+ $ref: '#/components/schemas/ActivityStatus'
1285
+ },
1286
+ category: {
1287
+ anyOf: [
1288
+ {
1289
+ type: 'string'
1290
+ },
1291
+ {
1292
+ type: 'null'
1293
+ }
1294
+ ],
1295
+ title: 'Category'
1296
+ },
1297
+ git_owner_url: {
1298
+ anyOf: [
1299
+ {
1300
+ type: 'string'
1301
+ },
1302
+ {
1303
+ type: 'null'
1304
+ }
1305
+ ],
1306
+ title: 'Git Owner Url'
1307
+ },
1308
+ pony_factor: {
1309
+ anyOf: [
1310
+ {
1311
+ type: 'integer'
1312
+ },
1313
+ {
1314
+ type: 'null'
1315
+ }
1316
+ ],
1317
+ title: 'Pony Factor'
1318
+ },
1319
+ criticality_score: {
1320
+ anyOf: [
1321
+ {
1322
+ type: 'integer'
1323
+ },
1324
+ {
1325
+ type: 'null'
1326
+ }
1327
+ ],
1328
+ title: 'Criticality Score'
1329
+ },
1330
+ adoption_score: {
1331
+ anyOf: [
1332
+ {
1333
+ type: 'number'
1334
+ },
1335
+ {
1336
+ type: 'null'
1337
+ }
1338
+ ],
1339
+ title: 'Adoption Score'
1340
+ },
1341
+ updated_at: {
1342
+ type: 'string',
1343
+ format: 'date-time',
1344
+ title: 'Updated At'
1235
1345
  }
1236
1346
  },
1237
1347
  type: 'object',
1238
1348
  required: [
1239
- 'items',
1240
- 'total',
1241
- 'limit',
1242
- 'offset'
1349
+ 'canonical_id',
1350
+ 'display_name',
1351
+ 'project_type',
1352
+ 'activity_status',
1353
+ 'category',
1354
+ 'git_owner_url',
1355
+ 'pony_factor',
1356
+ 'criticality_score',
1357
+ 'adoption_score',
1358
+ 'updated_at'
1243
1359
  ],
1244
- title: 'PaginatedResponse[RepoContributorSummary]'
1360
+ title: 'ProjectSummary',
1361
+ description: 'Compact project representation used in list endpoints and as an embedded\nreference in repo detail responses.'
1245
1362
  };
1246
- export const PaginatedResponse_ProjectSummary_Schema = {
1363
+ export const ProjectTypeSchema = {
1364
+ type: 'string',
1365
+ enum: [
1366
+ 'public-good',
1367
+ 'scf-project'
1368
+ ],
1369
+ title: 'ProjectType',
1370
+ description: 'Classification of a Project within the PG Atlas universe.'
1371
+ };
1372
+ export const RepoContributorSummarySchema = {
1247
1373
  properties: {
1248
- items: {
1249
- items: {
1250
- $ref: '#/components/schemas/ProjectSummary'
1251
- },
1252
- type: 'array',
1253
- title: 'Items'
1254
- },
1255
- total: {
1374
+ id: {
1256
1375
  type: 'integer',
1257
- title: 'Total'
1376
+ title: 'Id'
1258
1377
  },
1259
- limit: {
1260
- type: 'integer',
1261
- title: 'Limit'
1378
+ name: {
1379
+ type: 'string',
1380
+ title: 'Name'
1262
1381
  },
1263
- offset: {
1382
+ email_hash: {
1383
+ type: 'string',
1384
+ title: 'Email Hash'
1385
+ },
1386
+ number_of_commits: {
1264
1387
  type: 'integer',
1265
- title: 'Offset'
1388
+ title: 'Number Of Commits'
1389
+ },
1390
+ first_commit_date: {
1391
+ type: 'string',
1392
+ format: 'date-time',
1393
+ title: 'First Commit Date'
1394
+ },
1395
+ last_commit_date: {
1396
+ type: 'string',
1397
+ format: 'date-time',
1398
+ title: 'Last Commit Date'
1266
1399
  }
1267
1400
  },
1268
1401
  type: 'object',
1269
1402
  required: [
1270
- 'items',
1271
- 'total',
1272
- 'limit',
1273
- 'offset'
1403
+ 'id',
1404
+ 'name',
1405
+ 'email_hash',
1406
+ 'number_of_commits',
1407
+ 'first_commit_date',
1408
+ 'last_commit_date'
1274
1409
  ],
1275
- title: 'PaginatedResponse[ProjectSummary]'
1410
+ title: 'RepoContributorSummary',
1411
+ description: 'Contributor summary with commit counts for one repo.'
1276
1412
  };
1277
- export const PaginatedResponse_ProjectContributorSummary_Schema = {
1413
+ export const RepoDependencySchema = {
1278
1414
  properties: {
1279
- items: {
1280
- items: {
1281
- $ref: '#/components/schemas/ProjectContributorSummary'
1282
- },
1283
- type: 'array',
1284
- title: 'Items'
1415
+ canonical_id: {
1416
+ type: 'string',
1417
+ title: 'Canonical Id'
1285
1418
  },
1286
- total: {
1287
- type: 'integer',
1288
- title: 'Total'
1419
+ display_name: {
1420
+ type: 'string',
1421
+ title: 'Display Name'
1422
+ },
1423
+ vertex_type: {
1424
+ $ref: '#/components/schemas/RepoVertexType'
1289
1425
  },
1290
- limit: {
1291
- type: 'integer',
1292
- title: 'Limit'
1426
+ version_range: {
1427
+ anyOf: [
1428
+ {
1429
+ type: 'string'
1430
+ },
1431
+ {
1432
+ type: 'null'
1433
+ }
1434
+ ],
1435
+ title: 'Version Range'
1293
1436
  },
1294
- offset: {
1295
- type: 'integer',
1296
- title: 'Offset'
1437
+ confidence: {
1438
+ $ref: '#/components/schemas/EdgeConfidence'
1297
1439
  }
1298
1440
  },
1299
1441
  type: 'object',
1300
1442
  required: [
1301
- 'items',
1302
- 'total',
1303
- 'limit',
1304
- 'offset'
1443
+ 'canonical_id',
1444
+ 'display_name',
1445
+ 'vertex_type',
1446
+ 'version_range',
1447
+ 'confidence'
1305
1448
  ],
1306
- title: 'PaginatedResponse[ProjectContributorSummary]'
1449
+ title: 'RepoDependency',
1450
+ description: 'A single dependency or reverse-dependency edge from a repo.\n\n``vertex_type`` tells the frontend whether the target is an in-ecosystem\n``Repo`` or an ``ExternalRepo``.'
1307
1451
  };
1308
- export const PaginatedResponse_GitLogArtifactSummary_Schema = {
1452
+ export const RepoDetailResponseSchema = {
1309
1453
  properties: {
1310
- items: {
1454
+ canonical_id: {
1455
+ type: 'string',
1456
+ title: 'Canonical Id'
1457
+ },
1458
+ display_name: {
1459
+ type: 'string',
1460
+ title: 'Display Name'
1461
+ },
1462
+ visibility: {
1463
+ $ref: '#/components/schemas/Visibility'
1464
+ },
1465
+ latest_version: {
1466
+ type: 'string',
1467
+ title: 'Latest Version'
1468
+ },
1469
+ latest_commit_date: {
1470
+ anyOf: [
1471
+ {
1472
+ type: 'string',
1473
+ format: 'date-time'
1474
+ },
1475
+ {
1476
+ type: 'null'
1477
+ }
1478
+ ],
1479
+ title: 'Latest Commit Date'
1480
+ },
1481
+ repo_url: {
1482
+ anyOf: [
1483
+ {
1484
+ type: 'string'
1485
+ },
1486
+ {
1487
+ type: 'null'
1488
+ }
1489
+ ],
1490
+ title: 'Repo Url'
1491
+ },
1492
+ project_id: {
1493
+ anyOf: [
1494
+ {
1495
+ type: 'integer'
1496
+ },
1497
+ {
1498
+ type: 'null'
1499
+ }
1500
+ ],
1501
+ title: 'Project Id'
1502
+ },
1503
+ pony_factor: {
1504
+ anyOf: [
1505
+ {
1506
+ type: 'integer'
1507
+ },
1508
+ {
1509
+ type: 'null'
1510
+ }
1511
+ ],
1512
+ title: 'Pony Factor'
1513
+ },
1514
+ criticality_score: {
1515
+ anyOf: [
1516
+ {
1517
+ type: 'integer'
1518
+ },
1519
+ {
1520
+ type: 'null'
1521
+ }
1522
+ ],
1523
+ title: 'Criticality Score'
1524
+ },
1525
+ adoption_downloads: {
1526
+ anyOf: [
1527
+ {
1528
+ type: 'integer'
1529
+ },
1530
+ {
1531
+ type: 'null'
1532
+ }
1533
+ ],
1534
+ title: 'Adoption Downloads'
1535
+ },
1536
+ adoption_stars: {
1537
+ anyOf: [
1538
+ {
1539
+ type: 'integer'
1540
+ },
1541
+ {
1542
+ type: 'null'
1543
+ }
1544
+ ],
1545
+ title: 'Adoption Stars'
1546
+ },
1547
+ adoption_forks: {
1548
+ anyOf: [
1549
+ {
1550
+ type: 'integer'
1551
+ },
1552
+ {
1553
+ type: 'null'
1554
+ }
1555
+ ],
1556
+ title: 'Adoption Forks'
1557
+ },
1558
+ updated_at: {
1559
+ type: 'string',
1560
+ format: 'date-time',
1561
+ title: 'Updated At'
1562
+ },
1563
+ releases: {
1564
+ anyOf: [
1565
+ {
1566
+ items: {
1567
+ properties: {
1568
+ purl: {
1569
+ type: 'string'
1570
+ },
1571
+ version: {
1572
+ type: 'string'
1573
+ },
1574
+ release_date: {
1575
+ type: 'string',
1576
+ default: ''
1577
+ }
1578
+ },
1579
+ type: 'object',
1580
+ required: [
1581
+ 'purl',
1582
+ 'version'
1583
+ ],
1584
+ title: 'Release',
1585
+ description: 'One normalized release record keyed by package PURL + version.'
1586
+ },
1587
+ type: 'array'
1588
+ },
1589
+ {
1590
+ type: 'null'
1591
+ }
1592
+ ],
1593
+ title: 'Releases'
1594
+ },
1595
+ parent_project: {
1596
+ anyOf: [
1597
+ {
1598
+ $ref: '#/components/schemas/ProjectSummary'
1599
+ },
1600
+ {
1601
+ type: 'null'
1602
+ }
1603
+ ]
1604
+ },
1605
+ contributors: {
1311
1606
  items: {
1312
- $ref: '#/components/schemas/GitLogArtifactSummary'
1607
+ $ref: '#/components/schemas/ContributorSummary'
1313
1608
  },
1314
1609
  type: 'array',
1315
- title: 'Items'
1610
+ title: 'Contributors'
1316
1611
  },
1317
- total: {
1318
- type: 'integer',
1319
- title: 'Total'
1612
+ outgoing_dep_counts: {
1613
+ $ref: '#/components/schemas/DepCounts'
1320
1614
  },
1321
- limit: {
1615
+ incoming_dep_counts: {
1616
+ $ref: '#/components/schemas/DepCounts'
1617
+ },
1618
+ active_contributors_30d: {
1322
1619
  type: 'integer',
1323
- title: 'Limit'
1620
+ title: 'Active Contributors 30D'
1324
1621
  },
1325
- offset: {
1622
+ active_contributors_90d: {
1326
1623
  type: 'integer',
1327
- title: 'Offset'
1624
+ title: 'Active Contributors 90D'
1328
1625
  }
1329
1626
  },
1330
1627
  type: 'object',
1331
1628
  required: [
1332
- 'items',
1333
- 'total',
1334
- 'limit',
1335
- 'offset'
1629
+ 'canonical_id',
1630
+ 'display_name',
1631
+ 'visibility',
1632
+ 'latest_version',
1633
+ 'latest_commit_date',
1634
+ 'repo_url',
1635
+ 'project_id',
1636
+ 'pony_factor',
1637
+ 'criticality_score',
1638
+ 'adoption_downloads',
1639
+ 'adoption_stars',
1640
+ 'adoption_forks',
1641
+ 'updated_at',
1642
+ 'releases',
1643
+ 'parent_project',
1644
+ 'contributors',
1645
+ 'outgoing_dep_counts',
1646
+ 'incoming_dep_counts',
1647
+ 'active_contributors_30d',
1648
+ 'active_contributors_90d'
1336
1649
  ],
1337
- title: 'PaginatedResponse[GitLogArtifactSummary]'
1650
+ title: 'RepoDetailResponse',
1651
+ description: 'Full repo detail with parent project, contributors, releases, dependency counts,\nand active contributor stats.'
1338
1652
  };
1339
- export const GitLogArtifactSummarySchema = {
1653
+ export const RepoSummarySchema = {
1340
1654
  properties: {
1341
- id: {
1342
- type: 'integer',
1343
- title: 'Id'
1344
- },
1345
- repo_id: {
1346
- type: 'integer',
1347
- title: 'Repo Id'
1655
+ canonical_id: {
1656
+ type: 'string',
1657
+ title: 'Canonical Id'
1348
1658
  },
1349
- repo_canonical_id: {
1659
+ display_name: {
1350
1660
  type: 'string',
1351
- title: 'Repo Canonical Id'
1661
+ title: 'Display Name'
1352
1662
  },
1353
- repo_display_name: {
1663
+ visibility: {
1664
+ $ref: '#/components/schemas/Visibility'
1665
+ },
1666
+ latest_version: {
1354
1667
  type: 'string',
1355
- title: 'Repo Display Name'
1668
+ title: 'Latest Version'
1356
1669
  },
1357
- artifact_path: {
1670
+ latest_commit_date: {
1358
1671
  anyOf: [
1359
1672
  {
1360
- type: 'string'
1673
+ type: 'string',
1674
+ format: 'date-time'
1361
1675
  },
1362
1676
  {
1363
1677
  type: 'null'
1364
1678
  }
1365
1679
  ],
1366
- title: 'Artifact Path'
1367
- },
1368
- status: {
1369
- $ref: '#/components/schemas/SubmissionStatus'
1680
+ title: 'Latest Commit Date'
1370
1681
  },
1371
- error_detail: {
1682
+ repo_url: {
1372
1683
  anyOf: [
1373
1684
  {
1374
1685
  type: 'string'
@@ -1377,250 +1688,153 @@ export const GitLogArtifactSummarySchema = {
1377
1688
  type: 'null'
1378
1689
  }
1379
1690
  ],
1380
- title: 'Error Detail'
1381
- },
1382
- since_months: {
1383
- type: 'integer',
1384
- title: 'Since Months'
1385
- },
1386
- submitted_at: {
1387
- type: 'string',
1388
- format: 'date-time',
1389
- title: 'Submitted At'
1691
+ title: 'Repo Url'
1390
1692
  },
1391
- processed_at: {
1693
+ project_id: {
1392
1694
  anyOf: [
1393
1695
  {
1394
- type: 'string',
1395
- format: 'date-time'
1696
+ type: 'integer'
1396
1697
  },
1397
1698
  {
1398
1699
  type: 'null'
1399
1700
  }
1400
1701
  ],
1401
- title: 'Processed At'
1402
- }
1403
- },
1404
- type: 'object',
1405
- required: [
1406
- 'id',
1407
- 'repo_id',
1408
- 'repo_canonical_id',
1409
- 'repo_display_name',
1410
- 'artifact_path',
1411
- 'status',
1412
- 'error_detail',
1413
- 'since_months',
1414
- 'submitted_at',
1415
- 'processed_at'
1416
- ],
1417
- title: 'GitLogArtifactSummary',
1418
- description: 'Compact gitlog artifact audit record for list endpoints.'
1419
- };
1420
- export const PaginatedResponse_ContributorSummary_Schema = {
1421
- properties: {
1422
- items: {
1423
- items: {
1424
- $ref: '#/components/schemas/ContributorSummary'
1425
- },
1426
- type: 'array',
1427
- title: 'Items'
1428
- },
1429
- total: {
1430
- type: 'integer',
1431
- title: 'Total'
1432
- },
1433
- limit: {
1434
- type: 'integer',
1435
- title: 'Limit'
1436
- },
1437
- offset: {
1438
- type: 'integer',
1439
- title: 'Offset'
1440
- }
1441
- },
1442
- type: 'object',
1443
- required: [
1444
- 'items',
1445
- 'total',
1446
- 'limit',
1447
- 'offset'
1448
- ],
1449
- title: 'PaginatedResponse[ContributorSummary]'
1450
- };
1451
- export const MetadataResponseSchema = {
1452
- properties: {
1453
- total_projects: {
1454
- type: 'integer',
1455
- title: 'Total Projects'
1456
- },
1457
- active_projects: {
1458
- type: 'integer',
1459
- title: 'Active Projects'
1460
- },
1461
- total_repos: {
1462
- type: 'integer',
1463
- title: 'Total Repos'
1464
- },
1465
- active_repos_90d: {
1466
- type: 'integer',
1467
- title: 'Active Repos 90D'
1468
- },
1469
- total_external_repos: {
1470
- type: 'integer',
1471
- title: 'Total External Repos'
1472
- },
1473
- total_dependency_edges: {
1474
- type: 'integer',
1475
- title: 'Total Dependency Edges'
1476
- },
1477
- total_contributor_edges: {
1478
- type: 'integer',
1479
- title: 'Total Contributor Edges'
1480
- },
1481
- active_contributors_30d: {
1482
- type: 'integer',
1483
- title: 'Active Contributors 30D'
1484
- },
1485
- active_contributors_90d: {
1486
- type: 'integer',
1487
- title: 'Active Contributors 90D'
1702
+ title: 'Project Id'
1488
1703
  },
1489
- last_updated: {
1704
+ pony_factor: {
1490
1705
  anyOf: [
1491
1706
  {
1492
- type: 'string',
1493
- format: 'date-time'
1707
+ type: 'integer'
1494
1708
  },
1495
1709
  {
1496
1710
  type: 'null'
1497
1711
  }
1498
1712
  ],
1499
- title: 'Last Updated'
1500
- }
1501
- },
1502
- type: 'object',
1503
- required: [
1504
- 'total_projects',
1505
- 'active_projects',
1506
- 'total_repos',
1507
- 'active_repos_90d',
1508
- 'total_external_repos',
1509
- 'total_dependency_edges',
1510
- 'total_contributor_edges',
1511
- 'active_contributors_30d',
1512
- 'active_contributors_90d',
1513
- 'last_updated'
1514
- ],
1515
- title: 'MetadataResponse',
1516
- description: 'Ecosystem-wide summary statistics returned by ``GET /metadata``.'
1517
- };
1518
- export const HealthResponseSchema = {
1519
- properties: {
1520
- status: {
1521
- type: 'string',
1522
- enum: [
1523
- 'live',
1524
- 'ready'
1525
- ],
1526
- title: 'Status'
1713
+ title: 'Pony Factor'
1527
1714
  },
1528
- version: {
1529
- type: 'string',
1530
- title: 'Version'
1715
+ criticality_score: {
1716
+ anyOf: [
1717
+ {
1718
+ type: 'integer'
1719
+ },
1720
+ {
1721
+ type: 'null'
1722
+ }
1723
+ ],
1724
+ title: 'Criticality Score'
1531
1725
  },
1532
- components: {
1533
- $ref: '#/components/schemas/HealthComponents'
1534
- }
1535
- },
1536
- type: 'object',
1537
- required: [
1538
- 'status',
1539
- 'version',
1540
- 'components'
1541
- ],
1542
- title: 'HealthResponse',
1543
- description: 'Response body for GET /health.'
1544
- };
1545
- export const HealthComponentsSchema = {
1546
- properties: {
1547
- artifact_store: {
1548
- type: 'string',
1549
- enum: [
1550
- 'local',
1551
- 'IPFS'
1726
+ adoption_downloads: {
1727
+ anyOf: [
1728
+ {
1729
+ type: 'integer'
1730
+ },
1731
+ {
1732
+ type: 'null'
1733
+ }
1552
1734
  ],
1553
- title: 'Artifact Store'
1735
+ title: 'Adoption Downloads'
1554
1736
  },
1555
- database: {
1556
- type: 'string',
1557
- enum: [
1558
- 'ready',
1559
- 'not-configured'
1737
+ adoption_stars: {
1738
+ anyOf: [
1739
+ {
1740
+ type: 'integer'
1741
+ },
1742
+ {
1743
+ type: 'null'
1744
+ }
1560
1745
  ],
1561
- title: 'Database'
1746
+ title: 'Adoption Stars'
1562
1747
  },
1563
- schema_version: {
1748
+ adoption_forks: {
1564
1749
  anyOf: [
1565
1750
  {
1566
- type: 'string'
1751
+ type: 'integer'
1567
1752
  },
1568
1753
  {
1569
1754
  type: 'null'
1570
1755
  }
1571
1756
  ],
1572
- title: 'Schema Version'
1757
+ title: 'Adoption Forks'
1758
+ },
1759
+ updated_at: {
1760
+ type: 'string',
1761
+ format: 'date-time',
1762
+ title: 'Updated At'
1573
1763
  }
1574
1764
  },
1575
1765
  type: 'object',
1576
1766
  required: [
1577
- 'artifact_store',
1578
- 'database',
1579
- 'schema_version'
1767
+ 'canonical_id',
1768
+ 'display_name',
1769
+ 'visibility',
1770
+ 'latest_version',
1771
+ 'latest_commit_date',
1772
+ 'repo_url',
1773
+ 'project_id',
1774
+ 'pony_factor',
1775
+ 'criticality_score',
1776
+ 'adoption_downloads',
1777
+ 'adoption_stars',
1778
+ 'adoption_forks',
1779
+ 'updated_at'
1580
1780
  ],
1581
- title: 'HealthComponents',
1582
- description: 'Component-level readiness details for GET /health.'
1781
+ title: 'RepoSummary',
1782
+ description: 'Compact repo representation used in list endpoints and as an embedded\nreference in project detail responses.'
1583
1783
  };
1584
- export const HTTPValidationErrorSchema = {
1784
+ export const RepoVertexTypeSchema = {
1785
+ type: 'string',
1786
+ enum: [
1787
+ 'repo',
1788
+ 'external-repo',
1789
+ 'redirect'
1790
+ ],
1791
+ title: 'RepoVertexType',
1792
+ description: 'Discriminator values for the RepoVertex joined-table-inheritance hierarchy.'
1793
+ };
1794
+ export const SbomAcceptedResponseSchema = {
1585
1795
  properties: {
1586
- detail: {
1587
- items: {
1588
- $ref: '#/components/schemas/ValidationError'
1589
- },
1590
- type: 'array',
1591
- title: 'Detail'
1796
+ message: {
1797
+ type: 'string',
1798
+ title: 'Message'
1799
+ },
1800
+ repository: {
1801
+ type: 'string',
1802
+ title: 'Repository'
1803
+ },
1804
+ package_count: {
1805
+ type: 'integer',
1806
+ title: 'Package Count'
1592
1807
  }
1593
1808
  },
1594
1809
  type: 'object',
1595
- title: 'HTTPValidationError'
1810
+ required: [
1811
+ 'message',
1812
+ 'repository',
1813
+ 'package_count'
1814
+ ],
1815
+ title: 'SbomAcceptedResponse',
1816
+ description: 'Response body returned on successful SBOM submission (202 Accepted).'
1596
1817
  };
1597
- export const GitLogArtifactDetailResponseSchema = {
1818
+ export const SbomSubmissionDetailResponseSchema = {
1598
1819
  properties: {
1599
1820
  id: {
1600
1821
  type: 'integer',
1601
1822
  title: 'Id'
1602
1823
  },
1603
- repo_id: {
1604
- type: 'integer',
1605
- title: 'Repo Id'
1824
+ repository_claim: {
1825
+ type: 'string',
1826
+ title: 'Repository Claim'
1606
1827
  },
1607
- repo_canonical_id: {
1828
+ actor_claim: {
1608
1829
  type: 'string',
1609
- title: 'Repo Canonical Id'
1830
+ title: 'Actor Claim'
1610
1831
  },
1611
- repo_display_name: {
1832
+ sbom_content_hash: {
1612
1833
  type: 'string',
1613
- title: 'Repo Display Name'
1834
+ title: 'Sbom Content Hash'
1614
1835
  },
1615
1836
  artifact_path: {
1616
- anyOf: [
1617
- {
1618
- type: 'string'
1619
- },
1620
- {
1621
- type: 'null'
1622
- }
1623
- ],
1837
+ type: 'string',
1624
1838
  title: 'Artifact Path'
1625
1839
  },
1626
1840
  status: {
@@ -1637,10 +1851,6 @@ export const GitLogArtifactDetailResponseSchema = {
1637
1851
  ],
1638
1852
  title: 'Error Detail'
1639
1853
  },
1640
- since_months: {
1641
- type: 'integer',
1642
- title: 'Since Months'
1643
- },
1644
1854
  submitted_at: {
1645
1855
  type: 'string',
1646
1856
  format: 'date-time',
@@ -1673,54 +1883,92 @@ export const GitLogArtifactDetailResponseSchema = {
1673
1883
  type: 'object',
1674
1884
  required: [
1675
1885
  'id',
1676
- 'repo_id',
1677
- 'repo_canonical_id',
1678
- 'repo_display_name',
1886
+ 'repository_claim',
1887
+ 'actor_claim',
1888
+ 'sbom_content_hash',
1679
1889
  'artifact_path',
1680
1890
  'status',
1681
1891
  'error_detail',
1682
- 'since_months',
1683
1892
  'submitted_at',
1684
1893
  'processed_at'
1685
1894
  ],
1686
- title: 'GitLogArtifactDetailResponse',
1687
- description: 'Full gitlog artifact audit record including raw artifact content.'
1895
+ title: 'SbomSubmissionDetailResponse',
1896
+ description: 'Extended SBOM submission record with the raw artifact content.\n\nReturned by the detail endpoint. ``raw_artifact`` contains the full JSON\ntext of the stored SBOM, or ``None`` if the artifact file is missing from\nthe store.'
1688
1897
  };
1689
- export const ContributorDetailResponseSchema = {
1898
+ export const SbomSubmissionListResponseSchema = {
1899
+ properties: {
1900
+ items: {
1901
+ items: {
1902
+ $ref: '#/components/schemas/SbomSubmissionResponse'
1903
+ },
1904
+ type: 'array',
1905
+ title: 'Items'
1906
+ },
1907
+ total: {
1908
+ type: 'integer',
1909
+ title: 'Total'
1910
+ },
1911
+ limit: {
1912
+ type: 'integer',
1913
+ title: 'Limit'
1914
+ },
1915
+ offset: {
1916
+ type: 'integer',
1917
+ title: 'Offset'
1918
+ }
1919
+ },
1920
+ type: 'object',
1921
+ required: [
1922
+ 'items',
1923
+ 'total',
1924
+ 'limit',
1925
+ 'offset'
1926
+ ],
1927
+ title: 'SbomSubmissionListResponse',
1928
+ description: 'Paginated list of SBOM submission records.\n\nReturned by the list endpoint with ``total`` reflecting the count after\nany ``repository`` filter has been applied.'
1929
+ };
1930
+ export const SbomSubmissionResponseSchema = {
1690
1931
  properties: {
1691
1932
  id: {
1692
1933
  type: 'integer',
1693
1934
  title: 'Id'
1694
1935
  },
1695
- name: {
1936
+ repository_claim: {
1696
1937
  type: 'string',
1697
- title: 'Name'
1938
+ title: 'Repository Claim'
1698
1939
  },
1699
- email_hash: {
1940
+ actor_claim: {
1700
1941
  type: 'string',
1701
- title: 'Email Hash'
1942
+ title: 'Actor Claim'
1702
1943
  },
1703
- total_repos: {
1704
- type: 'integer',
1705
- title: 'Total Repos'
1944
+ sbom_content_hash: {
1945
+ type: 'string',
1946
+ title: 'Sbom Content Hash'
1706
1947
  },
1707
- total_commits: {
1708
- type: 'integer',
1709
- title: 'Total Commits'
1948
+ artifact_path: {
1949
+ type: 'string',
1950
+ title: 'Artifact Path'
1710
1951
  },
1711
- first_contribution: {
1952
+ status: {
1953
+ $ref: '#/components/schemas/SubmissionStatus'
1954
+ },
1955
+ error_detail: {
1712
1956
  anyOf: [
1713
1957
  {
1714
- type: 'string',
1715
- format: 'date-time'
1958
+ type: 'string'
1716
1959
  },
1717
1960
  {
1718
1961
  type: 'null'
1719
1962
  }
1720
1963
  ],
1721
- title: 'First Contribution'
1964
+ title: 'Error Detail'
1722
1965
  },
1723
- last_contribution: {
1966
+ submitted_at: {
1967
+ type: 'string',
1968
+ format: 'date-time',
1969
+ title: 'Submitted At'
1970
+ },
1971
+ processed_at: {
1724
1972
  anyOf: [
1725
1973
  {
1726
1974
  type: 'string',
@@ -1730,75 +1978,99 @@ export const ContributorDetailResponseSchema = {
1730
1978
  type: 'null'
1731
1979
  }
1732
1980
  ],
1733
- title: 'Last Contribution'
1734
- },
1735
- repos: {
1736
- items: {
1737
- $ref: '#/components/schemas/ContributionEntry'
1738
- },
1739
- type: 'array',
1740
- title: 'Repos'
1981
+ title: 'Processed At'
1741
1982
  }
1742
1983
  },
1743
1984
  type: 'object',
1744
1985
  required: [
1745
1986
  'id',
1746
- 'name',
1747
- 'email_hash',
1748
- 'total_repos',
1749
- 'total_commits',
1750
- 'first_contribution',
1751
- 'last_contribution',
1752
- 'repos'
1987
+ 'repository_claim',
1988
+ 'actor_claim',
1989
+ 'sbom_content_hash',
1990
+ 'artifact_path',
1991
+ 'status',
1992
+ 'error_detail',
1993
+ 'submitted_at',
1994
+ 'processed_at'
1753
1995
  ],
1754
- title: 'ContributorDetailResponse',
1755
- description: 'Full contributor detail with aggregated statistics and per-repo activity.'
1996
+ title: 'SbomSubmissionResponse',
1997
+ description: 'Full SBOM submission record.\n\nSerialised from the ``SbomSubmission`` ORM model. The ``sbom_content_hash``\nfield is the SHA-256 hex digest of the raw submitted payload.'
1756
1998
  };
1757
- export const ContributionEntrySchema = {
1999
+ export const ScfSubmissionSchema = {
1758
2000
  properties: {
1759
- repo_canonical_id: {
2001
+ round: {
1760
2002
  type: 'string',
1761
- title: 'Repo Canonical Id'
2003
+ title: 'Round'
1762
2004
  },
1763
- repo_display_name: {
2005
+ title: {
1764
2006
  type: 'string',
1765
- title: 'Repo Display Name'
1766
- },
1767
- project_canonical_id: {
1768
- anyOf: [
1769
- {
1770
- type: 'string'
1771
- },
1772
- {
1773
- type: 'null'
1774
- }
1775
- ],
1776
- title: 'Project Canonical Id'
1777
- },
1778
- number_of_commits: {
1779
- type: 'integer',
1780
- title: 'Number Of Commits'
2007
+ title: 'Title'
2008
+ }
2009
+ },
2010
+ type: 'object',
2011
+ required: [
2012
+ 'round',
2013
+ 'title'
2014
+ ],
2015
+ title: 'ScfSubmission',
2016
+ description: 'A single SCF funding round submission.'
2017
+ };
2018
+ export const SubmissionStatusSchema = {
2019
+ type: 'string',
2020
+ enum: [
2021
+ 'pending',
2022
+ 'processed',
2023
+ 'failed'
2024
+ ],
2025
+ title: 'SubmissionStatus',
2026
+ description: 'Processing state of an artifact-linked audit record.'
2027
+ };
2028
+ export const ValidationErrorSchema = {
2029
+ properties: {
2030
+ loc: {
2031
+ items: {
2032
+ anyOf: [
2033
+ {
2034
+ type: 'string'
2035
+ },
2036
+ {
2037
+ type: 'integer'
2038
+ }
2039
+ ]
2040
+ },
2041
+ type: 'array',
2042
+ title: 'Location'
1781
2043
  },
1782
- first_commit_date: {
2044
+ msg: {
1783
2045
  type: 'string',
1784
- format: 'date-time',
1785
- title: 'First Commit Date'
2046
+ title: 'Message'
1786
2047
  },
1787
- last_commit_date: {
2048
+ type: {
1788
2049
  type: 'string',
1789
- format: 'date-time',
1790
- title: 'Last Commit Date'
2050
+ title: 'Error Type'
2051
+ },
2052
+ input: {
2053
+ title: 'Input'
2054
+ },
2055
+ ctx: {
2056
+ type: 'object',
2057
+ title: 'Context'
1791
2058
  }
1792
2059
  },
1793
2060
  type: 'object',
1794
2061
  required: [
1795
- 'repo_canonical_id',
1796
- 'repo_display_name',
1797
- 'project_canonical_id',
1798
- 'number_of_commits',
1799
- 'first_commit_date',
1800
- 'last_commit_date'
2062
+ 'loc',
2063
+ 'msg',
2064
+ 'type'
1801
2065
  ],
1802
- title: 'ContributionEntry',
1803
- description: 'A single repo that a contributor has committed to.'
2066
+ title: 'ValidationError'
2067
+ };
2068
+ export const VisibilitySchema = {
2069
+ type: 'string',
2070
+ enum: [
2071
+ 'public',
2072
+ 'private'
2073
+ ],
2074
+ title: 'Visibility',
2075
+ description: 'Whether a Repo is publicly accessible (affects data collection scope).'
1804
2076
  };