@pg-atlas/data-sdk 0.7.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'
491
- },
487
+ type: 'string',
488
+ format: 'date-time'
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: {
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: {
554
+ items: {
555
+ $ref: '#/components/schemas/ValidationError'
556
+ },
557
+ type: 'array',
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'
573
+ },
574
+ database: {
575
+ type: 'string',
576
+ enum: [
577
+ 'ready',
578
+ 'not-configured'
579
+ ],
580
+ title: 'Database'
581
+ },
582
+ schema_version: {
569
583
  anyOf: [
570
584
  {
571
- $ref: '#/components/schemas/ProjectSummary'
585
+ type: 'string'
572
586
  },
573
587
  {
574
588
  type: 'null'
575
589
  }
576
- ]
577
- },
578
- contributors: {
579
- items: {
580
- $ref: '#/components/schemas/ContributorSummary'
581
- },
582
- 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'
590
- },
591
- active_contributors_30d: {
592
- type: 'integer',
593
- title: 'Active Contributors 30D'
594
- },
595
- active_contributors_90d: {
596
- type: 'integer',
597
- title: 'Active Contributors 90D'
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'
694
- },
695
- display_name: {
696
- type: 'string',
697
- title: 'Display Name'
675
+ total_projects: {
676
+ type: 'integer',
677
+ title: 'Total Projects'
698
678
  },
699
- project_type: {
700
- $ref: '#/components/schemas/ProjectType'
679
+ active_projects: {
680
+ type: 'integer',
681
+ title: 'Active Projects'
701
682
  },
702
- activity_status: {
703
- $ref: '#/components/schemas/ActivityStatus'
683
+ total_repos: {
684
+ type: 'integer',
685
+ title: 'Total Repos'
704
686
  },
705
- category: {
706
- anyOf: [
707
- {
708
- type: 'string'
709
- },
710
- {
711
- type: 'null'
712
- }
713
- ],
714
- title: 'Category'
687
+ active_repos_90d: {
688
+ type: 'integer',
689
+ title: 'Active Repos 90D'
715
690
  },
716
- git_owner_url: {
717
- anyOf: [
718
- {
719
- type: 'string'
720
- },
721
- {
722
- type: 'null'
723
- }
724
- ],
725
- title: 'Git Owner Url'
691
+ total_external_repos: {
692
+ type: 'integer',
693
+ title: 'Total External Repos'
726
694
  },
727
- pony_factor: {
728
- anyOf: [
729
- {
730
- type: 'integer'
731
- },
732
- {
733
- type: 'null'
734
- }
735
- ],
736
- title: 'Pony Factor'
695
+ total_dependency_edges: {
696
+ type: 'integer',
697
+ title: 'Total Dependency Edges'
737
698
  },
738
- criticality_score: {
739
- anyOf: [
740
- {
741
- type: 'integer'
742
- },
743
- {
744
- type: 'null'
745
- }
746
- ],
747
- title: 'Criticality Score'
699
+ total_contributor_edges: {
700
+ type: 'integer',
701
+ title: 'Total Contributor Edges'
748
702
  },
749
- adoption_score: {
703
+ active_contributors_30d: {
704
+ type: 'integer',
705
+ title: 'Active Contributors 30D'
706
+ },
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,227 +1113,177 @@ 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 = {
1116
+ export const ProjectMetadataSchema = {
1138
1117
  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 = {
1185
- properties: {
1186
- items: {
1187
- items: {
1188
- $ref: '#/components/schemas/RepoSummary'
1189
- },
1190
- type: 'array',
1191
- title: 'Items'
1192
- },
1193
- total: {
1194
- type: 'integer',
1195
- title: 'Total'
1196
- },
1197
- limit: {
1198
- type: 'integer',
1199
- title: 'Limit'
1200
- },
1201
- offset: {
1202
- type: 'integer',
1203
- title: 'Offset'
1204
- }
1205
- },
1206
- type: 'object',
1207
- required: [
1208
- 'items',
1209
- 'total',
1210
- 'limit',
1211
- 'offset'
1212
- ],
1213
- title: 'PaginatedResponse[RepoSummary]'
1214
- };
1215
- export const PaginatedResponse_RepoContributorSummary_Schema = {
1216
- properties: {
1217
- items: {
1118
+ scf_submissions: {
1218
1119
  items: {
1219
- $ref: '#/components/schemas/RepoContributorSummary'
1120
+ $ref: '#/components/schemas/ScfSubmission'
1220
1121
  },
1221
1122
  type: 'array',
1222
- title: 'Items'
1123
+ title: 'Scf Submissions',
1124
+ default: []
1223
1125
  },
1224
- total: {
1225
- type: 'integer',
1226
- title: 'Total'
1126
+ description: {
1127
+ anyOf: [
1128
+ {
1129
+ type: 'string'
1130
+ },
1131
+ {
1132
+ type: 'null'
1133
+ }
1134
+ ],
1135
+ title: 'Description'
1227
1136
  },
1228
- limit: {
1229
- type: 'integer',
1230
- title: 'Limit'
1137
+ technical_architecture: {
1138
+ anyOf: [
1139
+ {
1140
+ type: 'string'
1141
+ },
1142
+ {
1143
+ type: 'null'
1144
+ }
1145
+ ],
1146
+ title: 'Technical Architecture'
1231
1147
  },
1232
- offset: {
1233
- type: 'integer',
1234
- title: 'Offset'
1235
- }
1236
- },
1237
- type: 'object',
1238
- required: [
1239
- 'items',
1240
- 'total',
1241
- 'limit',
1242
- 'offset'
1243
- ],
1244
- title: 'PaginatedResponse[RepoContributorSummary]'
1245
- };
1246
- export const PaginatedResponse_ProjectSummary_Schema = {
1247
- properties: {
1248
- items: {
1249
- items: {
1250
- $ref: '#/components/schemas/ProjectSummary'
1251
- },
1252
- type: 'array',
1253
- title: 'Items'
1148
+ scf_tranche_completion: {
1149
+ anyOf: [
1150
+ {
1151
+ type: 'string'
1152
+ },
1153
+ {
1154
+ type: 'null'
1155
+ }
1156
+ ],
1157
+ title: 'Scf Tranche Completion'
1254
1158
  },
1255
- total: {
1256
- type: 'integer',
1257
- title: 'Total'
1159
+ website: {
1160
+ anyOf: [
1161
+ {
1162
+ type: 'string'
1163
+ },
1164
+ {
1165
+ type: 'null'
1166
+ }
1167
+ ],
1168
+ title: 'Website'
1258
1169
  },
1259
- limit: {
1260
- type: 'integer',
1261
- title: 'Limit'
1170
+ x_profile: {
1171
+ anyOf: [
1172
+ {
1173
+ type: 'string'
1174
+ },
1175
+ {
1176
+ type: 'null'
1177
+ }
1178
+ ],
1179
+ title: 'X Profile'
1262
1180
  },
1263
- offset: {
1264
- type: 'integer',
1265
- title: 'Offset'
1266
- }
1267
- },
1268
- type: 'object',
1269
- required: [
1270
- 'items',
1271
- 'total',
1272
- 'limit',
1273
- 'offset'
1274
- ],
1275
- title: 'PaginatedResponse[ProjectSummary]'
1276
- };
1277
- export const PaginatedResponse_ProjectContributorSummary_Schema = {
1278
- properties: {
1279
- items: {
1280
- items: {
1281
- $ref: '#/components/schemas/ProjectContributorSummary'
1282
- },
1283
- type: 'array',
1284
- title: 'Items'
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'
1285
1194
  },
1286
- total: {
1287
- type: 'integer',
1288
- title: 'Total'
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'
1289
1208
  },
1290
- limit: {
1291
- type: 'integer',
1292
- title: 'Limit'
1209
+ awarded_submissions_count: {
1210
+ anyOf: [
1211
+ {
1212
+ type: 'integer'
1213
+ },
1214
+ {
1215
+ type: 'null'
1216
+ }
1217
+ ],
1218
+ title: 'Awarded Submissions Count'
1293
1219
  },
1294
- offset: {
1295
- type: 'integer',
1296
- title: 'Offset'
1297
- }
1298
- },
1299
- type: 'object',
1300
- required: [
1301
- 'items',
1302
- 'total',
1303
- 'limit',
1304
- 'offset'
1305
- ],
1306
- title: 'PaginatedResponse[ProjectContributorSummary]'
1307
- };
1308
- export const PaginatedResponse_GithubDependentObservationItem_Schema = {
1309
- properties: {
1310
- items: {
1311
- items: {
1312
- $ref: '#/components/schemas/GithubDependentObservationItem'
1313
- },
1314
- type: 'array',
1315
- title: 'Items'
1220
+ open_source: {
1221
+ anyOf: [
1222
+ {
1223
+ type: 'boolean'
1224
+ },
1225
+ {
1226
+ type: 'null'
1227
+ }
1228
+ ],
1229
+ title: 'Open Source'
1316
1230
  },
1317
- total: {
1318
- type: 'integer',
1319
- title: 'Total'
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'
1320
1245
  },
1321
- limit: {
1322
- type: 'integer',
1323
- title: 'Limit'
1246
+ analytics: {
1247
+ anyOf: [
1248
+ {},
1249
+ {
1250
+ type: 'null'
1251
+ }
1252
+ ],
1253
+ title: 'Analytics'
1324
1254
  },
1325
- offset: {
1326
- type: 'integer',
1327
- title: 'Offset'
1255
+ regions_of_operation: {
1256
+ anyOf: [
1257
+ {},
1258
+ {
1259
+ type: 'null'
1260
+ }
1261
+ ],
1262
+ title: 'Regions Of Operation'
1328
1263
  }
1329
1264
  },
1265
+ additionalProperties: true,
1330
1266
  type: 'object',
1331
- required: [
1332
- 'items',
1333
- 'total',
1334
- 'limit',
1335
- 'offset'
1336
- ],
1337
- title: 'PaginatedResponse[GithubDependentObservationItem]'
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.'
1338
1269
  };
1339
- export const GithubDependentObservationItemSchema = {
1270
+ export const ProjectSummarySchema = {
1340
1271
  properties: {
1341
- dependent_canonical_id: {
1272
+ canonical_id: {
1342
1273
  type: 'string',
1343
- title: 'Dependent Canonical Id'
1274
+ title: 'Canonical Id'
1344
1275
  },
1345
- dependent_repo_url: {
1276
+ display_name: {
1346
1277
  type: 'string',
1347
- title: 'Dependent Repo Url'
1278
+ title: 'Display Name'
1348
1279
  },
1349
- observed_owner: {
1350
- type: 'string',
1351
- title: 'Observed Owner'
1280
+ project_type: {
1281
+ $ref: '#/components/schemas/ProjectType'
1352
1282
  },
1353
- observed_repo_name: {
1354
- type: 'string',
1355
- title: 'Observed Repo Name'
1283
+ activity_status: {
1284
+ $ref: '#/components/schemas/ActivityStatus'
1356
1285
  },
1357
- resolved_repo_canonical_id: {
1286
+ category: {
1358
1287
  anyOf: [
1359
1288
  {
1360
1289
  type: 'string'
@@ -1363,109 +1292,193 @@ export const GithubDependentObservationItemSchema = {
1363
1292
  type: 'null'
1364
1293
  }
1365
1294
  ],
1366
- title: 'Resolved Repo Canonical Id'
1295
+ title: 'Category'
1367
1296
  },
1368
- package_ids: {
1297
+ git_owner_url: {
1369
1298
  anyOf: [
1370
1299
  {
1371
- items: {
1372
- type: 'string'
1373
- },
1374
- type: 'array'
1300
+ type: 'string'
1375
1301
  },
1376
1302
  {
1377
1303
  type: 'null'
1378
1304
  }
1379
1305
  ],
1380
- title: 'Package Ids'
1306
+ title: 'Git Owner Url'
1381
1307
  },
1382
- first_seen_at: {
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: {
1383
1342
  type: 'string',
1384
1343
  format: 'date-time',
1385
- title: 'First Seen At'
1344
+ title: 'Updated At'
1345
+ }
1346
+ },
1347
+ type: 'object',
1348
+ required: [
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'
1359
+ ],
1360
+ title: 'ProjectSummary',
1361
+ description: 'Compact project representation used in list endpoints and as an embedded\nreference in repo detail responses.'
1362
+ };
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 = {
1373
+ properties: {
1374
+ id: {
1375
+ type: 'integer',
1376
+ title: 'Id'
1377
+ },
1378
+ name: {
1379
+ type: 'string',
1380
+ title: 'Name'
1381
+ },
1382
+ email_hash: {
1383
+ type: 'string',
1384
+ title: 'Email Hash'
1385
+ },
1386
+ number_of_commits: {
1387
+ type: 'integer',
1388
+ title: 'Number Of Commits'
1389
+ },
1390
+ first_commit_date: {
1391
+ type: 'string',
1392
+ format: 'date-time',
1393
+ title: 'First Commit Date'
1386
1394
  },
1387
- last_seen_at: {
1395
+ last_commit_date: {
1388
1396
  type: 'string',
1389
1397
  format: 'date-time',
1390
- title: 'Last Seen At'
1398
+ title: 'Last Commit Date'
1391
1399
  }
1392
1400
  },
1393
1401
  type: 'object',
1394
1402
  required: [
1395
- 'dependent_canonical_id',
1396
- 'dependent_repo_url',
1397
- 'observed_owner',
1398
- 'observed_repo_name',
1399
- 'first_seen_at',
1400
- 'last_seen_at'
1403
+ 'id',
1404
+ 'name',
1405
+ 'email_hash',
1406
+ 'number_of_commits',
1407
+ 'first_commit_date',
1408
+ 'last_commit_date'
1401
1409
  ],
1402
- title: 'GithubDependentObservationItem',
1403
- description: 'One active GitHub dependent observation for a source repo.'
1410
+ title: 'RepoContributorSummary',
1411
+ description: 'Contributor summary with commit counts for one repo.'
1404
1412
  };
1405
- export const PaginatedResponse_GitLogArtifactSummary_Schema = {
1413
+ export const RepoDependencySchema = {
1406
1414
  properties: {
1407
- items: {
1408
- items: {
1409
- $ref: '#/components/schemas/GitLogArtifactSummary'
1410
- },
1411
- type: 'array',
1412
- title: 'Items'
1415
+ canonical_id: {
1416
+ type: 'string',
1417
+ title: 'Canonical Id'
1413
1418
  },
1414
- total: {
1415
- type: 'integer',
1416
- title: 'Total'
1419
+ display_name: {
1420
+ type: 'string',
1421
+ title: 'Display Name'
1417
1422
  },
1418
- limit: {
1419
- type: 'integer',
1420
- title: 'Limit'
1423
+ vertex_type: {
1424
+ $ref: '#/components/schemas/RepoVertexType'
1421
1425
  },
1422
- offset: {
1423
- type: 'integer',
1424
- title: 'Offset'
1426
+ version_range: {
1427
+ anyOf: [
1428
+ {
1429
+ type: 'string'
1430
+ },
1431
+ {
1432
+ type: 'null'
1433
+ }
1434
+ ],
1435
+ title: 'Version Range'
1436
+ },
1437
+ confidence: {
1438
+ $ref: '#/components/schemas/EdgeConfidence'
1425
1439
  }
1426
1440
  },
1427
1441
  type: 'object',
1428
1442
  required: [
1429
- 'items',
1430
- 'total',
1431
- 'limit',
1432
- 'offset'
1443
+ 'canonical_id',
1444
+ 'display_name',
1445
+ 'vertex_type',
1446
+ 'version_range',
1447
+ 'confidence'
1433
1448
  ],
1434
- title: 'PaginatedResponse[GitLogArtifactSummary]'
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``.'
1435
1451
  };
1436
- export const GitLogArtifactSummarySchema = {
1452
+ export const RepoDetailResponseSchema = {
1437
1453
  properties: {
1438
- id: {
1439
- type: 'integer',
1440
- title: 'Id'
1441
- },
1442
- repo_id: {
1443
- type: 'integer',
1444
- title: 'Repo Id'
1454
+ canonical_id: {
1455
+ type: 'string',
1456
+ title: 'Canonical Id'
1445
1457
  },
1446
- repo_canonical_id: {
1458
+ display_name: {
1447
1459
  type: 'string',
1448
- title: 'Repo Canonical Id'
1460
+ title: 'Display Name'
1449
1461
  },
1450
- repo_display_name: {
1462
+ visibility: {
1463
+ $ref: '#/components/schemas/Visibility'
1464
+ },
1465
+ latest_version: {
1451
1466
  type: 'string',
1452
- title: 'Repo Display Name'
1467
+ title: 'Latest Version'
1453
1468
  },
1454
- artifact_path: {
1469
+ latest_commit_date: {
1455
1470
  anyOf: [
1456
1471
  {
1457
- type: 'string'
1472
+ type: 'string',
1473
+ format: 'date-time'
1458
1474
  },
1459
1475
  {
1460
1476
  type: 'null'
1461
1477
  }
1462
1478
  ],
1463
- title: 'Artifact Path'
1464
- },
1465
- status: {
1466
- $ref: '#/components/schemas/SubmissionStatus'
1479
+ title: 'Latest Commit Date'
1467
1480
  },
1468
- error_detail: {
1481
+ repo_url: {
1469
1482
  anyOf: [
1470
1483
  {
1471
1484
  type: 'string'
@@ -1474,106 +1487,133 @@ export const GitLogArtifactSummarySchema = {
1474
1487
  type: 'null'
1475
1488
  }
1476
1489
  ],
1477
- title: 'Error Detail'
1490
+ title: 'Repo Url'
1478
1491
  },
1479
- since_months: {
1480
- type: 'integer',
1481
- title: 'Since Months'
1492
+ project_id: {
1493
+ anyOf: [
1494
+ {
1495
+ type: 'integer'
1496
+ },
1497
+ {
1498
+ type: 'null'
1499
+ }
1500
+ ],
1501
+ title: 'Project Id'
1482
1502
  },
1483
- submitted_at: {
1484
- type: 'string',
1485
- format: 'date-time',
1486
- title: 'Submitted At'
1503
+ pony_factor: {
1504
+ anyOf: [
1505
+ {
1506
+ type: 'integer'
1507
+ },
1508
+ {
1509
+ type: 'null'
1510
+ }
1511
+ ],
1512
+ title: 'Pony Factor'
1487
1513
  },
1488
- processed_at: {
1514
+ criticality_score: {
1489
1515
  anyOf: [
1490
1516
  {
1491
- type: 'string',
1492
- format: 'date-time'
1517
+ type: 'integer'
1493
1518
  },
1494
1519
  {
1495
1520
  type: 'null'
1496
1521
  }
1497
1522
  ],
1498
- title: 'Processed At'
1499
- }
1500
- },
1501
- type: 'object',
1502
- required: [
1503
- 'id',
1504
- 'repo_id',
1505
- 'repo_canonical_id',
1506
- 'repo_display_name',
1507
- 'artifact_path',
1508
- 'status',
1509
- 'error_detail',
1510
- 'since_months',
1511
- 'submitted_at',
1512
- 'processed_at'
1513
- ],
1514
- title: 'GitLogArtifactSummary',
1515
- description: 'Compact gitlog artifact audit record for list endpoints.'
1516
- };
1517
- export const PaginatedResponse_ContributorSummary_Schema = {
1518
- properties: {
1519
- items: {
1520
- items: {
1521
- $ref: '#/components/schemas/ContributorSummary'
1522
- },
1523
- type: 'array',
1524
- title: 'Items'
1523
+ title: 'Criticality Score'
1525
1524
  },
1526
- total: {
1527
- type: 'integer',
1528
- title: 'Total'
1525
+ adoption_downloads: {
1526
+ anyOf: [
1527
+ {
1528
+ type: 'integer'
1529
+ },
1530
+ {
1531
+ type: 'null'
1532
+ }
1533
+ ],
1534
+ title: 'Adoption Downloads'
1529
1535
  },
1530
- limit: {
1531
- type: 'integer',
1532
- title: 'Limit'
1536
+ adoption_stars: {
1537
+ anyOf: [
1538
+ {
1539
+ type: 'integer'
1540
+ },
1541
+ {
1542
+ type: 'null'
1543
+ }
1544
+ ],
1545
+ title: 'Adoption Stars'
1533
1546
  },
1534
- offset: {
1535
- type: 'integer',
1536
- title: 'Offset'
1537
- }
1538
- },
1539
- type: 'object',
1540
- required: [
1541
- 'items',
1542
- 'total',
1543
- 'limit',
1544
- 'offset'
1545
- ],
1546
- title: 'PaginatedResponse[ContributorSummary]'
1547
- };
1548
- export const MetadataResponseSchema = {
1549
- properties: {
1550
- total_projects: {
1551
- type: 'integer',
1552
- title: 'Total Projects'
1547
+ adoption_forks: {
1548
+ anyOf: [
1549
+ {
1550
+ type: 'integer'
1551
+ },
1552
+ {
1553
+ type: 'null'
1554
+ }
1555
+ ],
1556
+ title: 'Adoption Forks'
1553
1557
  },
1554
- active_projects: {
1555
- type: 'integer',
1556
- title: 'Active Projects'
1558
+ updated_at: {
1559
+ type: 'string',
1560
+ format: 'date-time',
1561
+ title: 'Updated At'
1557
1562
  },
1558
- total_repos: {
1559
- type: 'integer',
1560
- title: 'Total Repos'
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'
1561
1594
  },
1562
- active_repos_90d: {
1563
- type: 'integer',
1564
- title: 'Active Repos 90D'
1595
+ parent_project: {
1596
+ anyOf: [
1597
+ {
1598
+ $ref: '#/components/schemas/ProjectSummary'
1599
+ },
1600
+ {
1601
+ type: 'null'
1602
+ }
1603
+ ]
1565
1604
  },
1566
- total_external_repos: {
1567
- type: 'integer',
1568
- title: 'Total External Repos'
1605
+ contributors: {
1606
+ items: {
1607
+ $ref: '#/components/schemas/ContributorSummary'
1608
+ },
1609
+ type: 'array',
1610
+ title: 'Contributors'
1569
1611
  },
1570
- total_dependency_edges: {
1571
- type: 'integer',
1572
- title: 'Total Dependency Edges'
1612
+ outgoing_dep_counts: {
1613
+ $ref: '#/components/schemas/DepCounts'
1573
1614
  },
1574
- total_contributor_edges: {
1575
- type: 'integer',
1576
- title: 'Total Contributor Edges'
1615
+ incoming_dep_counts: {
1616
+ $ref: '#/components/schemas/DepCounts'
1577
1617
  },
1578
1618
  active_contributors_30d: {
1579
1619
  type: 'integer',
@@ -1582,118 +1622,52 @@ export const MetadataResponseSchema = {
1582
1622
  active_contributors_90d: {
1583
1623
  type: 'integer',
1584
1624
  title: 'Active Contributors 90D'
1585
- },
1586
- last_updated: {
1587
- anyOf: [
1588
- {
1589
- type: 'string',
1590
- format: 'date-time'
1591
- },
1592
- {
1593
- type: 'null'
1594
- }
1595
- ],
1596
- title: 'Last Updated'
1597
1625
  }
1598
1626
  },
1599
1627
  type: 'object',
1600
1628
  required: [
1601
- 'total_projects',
1602
- 'active_projects',
1603
- 'total_repos',
1604
- 'active_repos_90d',
1605
- 'total_external_repos',
1606
- 'total_dependency_edges',
1607
- 'total_contributor_edges',
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',
1608
1647
  'active_contributors_30d',
1609
- 'active_contributors_90d',
1610
- 'last_updated'
1648
+ 'active_contributors_90d'
1611
1649
  ],
1612
- title: 'MetadataResponse',
1613
- description: 'Ecosystem-wide summary statistics returned by ``GET /metadata``.'
1650
+ title: 'RepoDetailResponse',
1651
+ description: 'Full repo detail with parent project, contributors, releases, dependency counts,\nand active contributor stats.'
1614
1652
  };
1615
- export const HealthResponseSchema = {
1653
+ export const RepoSummarySchema = {
1616
1654
  properties: {
1617
- status: {
1655
+ canonical_id: {
1618
1656
  type: 'string',
1619
- enum: [
1620
- 'live',
1621
- 'ready'
1622
- ],
1623
- title: 'Status'
1657
+ title: 'Canonical Id'
1624
1658
  },
1625
- version: {
1659
+ display_name: {
1626
1660
  type: 'string',
1627
- title: 'Version'
1661
+ title: 'Display Name'
1628
1662
  },
1629
- components: {
1630
- $ref: '#/components/schemas/HealthComponents'
1631
- }
1632
- },
1633
- type: 'object',
1634
- required: [
1635
- 'status',
1636
- 'version',
1637
- 'components'
1638
- ],
1639
- title: 'HealthResponse',
1640
- description: 'Response body for GET /health.'
1641
- };
1642
- export const HealthComponentsSchema = {
1643
- properties: {
1644
- artifact_store: {
1645
- type: 'string',
1646
- enum: [
1647
- 'local',
1648
- 'IPFS'
1649
- ],
1650
- title: 'Artifact Store'
1663
+ visibility: {
1664
+ $ref: '#/components/schemas/Visibility'
1651
1665
  },
1652
- database: {
1666
+ latest_version: {
1653
1667
  type: 'string',
1654
- enum: [
1655
- 'ready',
1656
- 'not-configured'
1657
- ],
1658
- title: 'Database'
1668
+ title: 'Latest Version'
1659
1669
  },
1660
- schema_version: {
1661
- anyOf: [
1662
- {
1663
- type: 'string'
1664
- },
1665
- {
1666
- type: 'null'
1667
- }
1668
- ],
1669
- title: 'Schema Version'
1670
- }
1671
- },
1672
- type: 'object',
1673
- required: [
1674
- 'artifact_store',
1675
- 'database',
1676
- 'schema_version'
1677
- ],
1678
- title: 'HealthComponents',
1679
- description: 'Component-level readiness details for GET /health.'
1680
- };
1681
- export const HTTPValidationErrorSchema = {
1682
- properties: {
1683
- detail: {
1684
- items: {
1685
- $ref: '#/components/schemas/ValidationError'
1686
- },
1687
- type: 'array',
1688
- title: 'Detail'
1689
- }
1690
- },
1691
- type: 'object',
1692
- title: 'HTTPValidationError'
1693
- };
1694
- export const GithubDependentsSummarySchema = {
1695
- properties: {
1696
- latest_attempt_at: {
1670
+ latest_commit_date: {
1697
1671
  anyOf: [
1698
1672
  {
1699
1673
  type: 'string',
@@ -1703,20 +1677,9 @@ export const GithubDependentsSummarySchema = {
1703
1677
  type: 'null'
1704
1678
  }
1705
1679
  ],
1706
- title: 'Latest Attempt At'
1707
- },
1708
- latest_attempt_status: {
1709
- anyOf: [
1710
- {
1711
- type: 'string'
1712
- },
1713
- {
1714
- type: 'null'
1715
- }
1716
- ],
1717
- title: 'Latest Attempt Status'
1680
+ title: 'Latest Commit Date'
1718
1681
  },
1719
- latest_attempt_listing_incomplete_reason: {
1682
+ repo_url: {
1720
1683
  anyOf: [
1721
1684
  {
1722
1685
  type: 'string'
@@ -1725,44 +1688,42 @@ export const GithubDependentsSummarySchema = {
1725
1688
  type: 'null'
1726
1689
  }
1727
1690
  ],
1728
- title: 'Latest Attempt Listing Incomplete Reason'
1691
+ title: 'Repo Url'
1729
1692
  },
1730
- latest_attempt_counts_incomplete_reason: {
1693
+ project_id: {
1731
1694
  anyOf: [
1732
1695
  {
1733
- type: 'string'
1696
+ type: 'integer'
1734
1697
  },
1735
1698
  {
1736
1699
  type: 'null'
1737
1700
  }
1738
1701
  ],
1739
- title: 'Latest Attempt Counts Incomplete Reason'
1702
+ title: 'Project Id'
1740
1703
  },
1741
- observations_as_of: {
1704
+ pony_factor: {
1742
1705
  anyOf: [
1743
1706
  {
1744
- type: 'string',
1745
- format: 'date-time'
1707
+ type: 'integer'
1746
1708
  },
1747
1709
  {
1748
1710
  type: 'null'
1749
1711
  }
1750
1712
  ],
1751
- title: 'Observations As Of'
1713
+ title: 'Pony Factor'
1752
1714
  },
1753
- reported_counts_as_of: {
1715
+ criticality_score: {
1754
1716
  anyOf: [
1755
1717
  {
1756
- type: 'string',
1757
- format: 'date-time'
1718
+ type: 'integer'
1758
1719
  },
1759
1720
  {
1760
1721
  type: 'null'
1761
1722
  }
1762
1723
  ],
1763
- title: 'Reported Counts As Of'
1724
+ title: 'Criticality Score'
1764
1725
  },
1765
- repos_total_reported: {
1726
+ adoption_downloads: {
1766
1727
  anyOf: [
1767
1728
  {
1768
1729
  type: 'integer'
@@ -1771,9 +1732,9 @@ export const GithubDependentsSummarySchema = {
1771
1732
  type: 'null'
1772
1733
  }
1773
1734
  ],
1774
- title: 'Repos Total Reported'
1735
+ title: 'Adoption Downloads'
1775
1736
  },
1776
- packages_total_reported: {
1737
+ adoption_stars: {
1777
1738
  anyOf: [
1778
1739
  {
1779
1740
  type: 'integer'
@@ -1782,9 +1743,9 @@ export const GithubDependentsSummarySchema = {
1782
1743
  type: 'null'
1783
1744
  }
1784
1745
  ],
1785
- title: 'Packages Total Reported'
1746
+ title: 'Adoption Stars'
1786
1747
  },
1787
- packages_scanned: {
1748
+ adoption_forks: {
1788
1749
  anyOf: [
1789
1750
  {
1790
1751
  type: 'integer'
@@ -1793,62 +1754,87 @@ export const GithubDependentsSummarySchema = {
1793
1754
  type: 'null'
1794
1755
  }
1795
1756
  ],
1796
- title: 'Packages Scanned'
1757
+ title: 'Adoption Forks'
1797
1758
  },
1798
- active_observations: {
1799
- type: 'integer',
1800
- title: 'Active Observations',
1801
- default: 0
1759
+ updated_at: {
1760
+ type: 'string',
1761
+ format: 'date-time',
1762
+ title: 'Updated At'
1802
1763
  }
1803
1764
  },
1804
1765
  type: 'object',
1805
- title: 'GithubDependentsSummary',
1806
- 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.'
1766
+ required: [
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'
1780
+ ],
1781
+ title: 'RepoSummary',
1782
+ description: 'Compact repo representation used in list endpoints and as an embedded\nreference in project detail responses.'
1807
1783
  };
1808
- export const GithubDependentsResponseSchema = {
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 = {
1809
1795
  properties: {
1810
- summary: {
1811
- $ref: '#/components/schemas/GithubDependentsSummary'
1796
+ message: {
1797
+ type: 'string',
1798
+ title: 'Message'
1812
1799
  },
1813
- observations: {
1814
- $ref: '#/components/schemas/PaginatedResponse_GithubDependentObservationItem_'
1800
+ repository: {
1801
+ type: 'string',
1802
+ title: 'Repository'
1803
+ },
1804
+ package_count: {
1805
+ type: 'integer',
1806
+ title: 'Package Count'
1815
1807
  }
1816
1808
  },
1817
1809
  type: 'object',
1818
1810
  required: [
1819
- 'summary',
1820
- 'observations'
1811
+ 'message',
1812
+ 'repository',
1813
+ 'package_count'
1821
1814
  ],
1822
- title: 'GithubDependentsResponse',
1823
- description: 'Summary plus paginated active observations for one source repo.'
1815
+ title: 'SbomAcceptedResponse',
1816
+ description: 'Response body returned on successful SBOM submission (202 Accepted).'
1824
1817
  };
1825
- export const GitLogArtifactDetailResponseSchema = {
1818
+ export const SbomSubmissionDetailResponseSchema = {
1826
1819
  properties: {
1827
1820
  id: {
1828
1821
  type: 'integer',
1829
1822
  title: 'Id'
1830
1823
  },
1831
- repo_id: {
1832
- type: 'integer',
1833
- title: 'Repo Id'
1824
+ repository_claim: {
1825
+ type: 'string',
1826
+ title: 'Repository Claim'
1834
1827
  },
1835
- repo_canonical_id: {
1828
+ actor_claim: {
1836
1829
  type: 'string',
1837
- title: 'Repo Canonical Id'
1830
+ title: 'Actor Claim'
1838
1831
  },
1839
- repo_display_name: {
1832
+ sbom_content_hash: {
1840
1833
  type: 'string',
1841
- title: 'Repo Display Name'
1834
+ title: 'Sbom Content Hash'
1842
1835
  },
1843
1836
  artifact_path: {
1844
- anyOf: [
1845
- {
1846
- type: 'string'
1847
- },
1848
- {
1849
- type: 'null'
1850
- }
1851
- ],
1837
+ type: 'string',
1852
1838
  title: 'Artifact Path'
1853
1839
  },
1854
1840
  status: {
@@ -1865,10 +1851,6 @@ export const GitLogArtifactDetailResponseSchema = {
1865
1851
  ],
1866
1852
  title: 'Error Detail'
1867
1853
  },
1868
- since_months: {
1869
- type: 'integer',
1870
- title: 'Since Months'
1871
- },
1872
1854
  submitted_at: {
1873
1855
  type: 'string',
1874
1856
  format: 'date-time',
@@ -1901,54 +1883,92 @@ export const GitLogArtifactDetailResponseSchema = {
1901
1883
  type: 'object',
1902
1884
  required: [
1903
1885
  'id',
1904
- 'repo_id',
1905
- 'repo_canonical_id',
1906
- 'repo_display_name',
1886
+ 'repository_claim',
1887
+ 'actor_claim',
1888
+ 'sbom_content_hash',
1907
1889
  'artifact_path',
1908
1890
  'status',
1909
1891
  'error_detail',
1910
- 'since_months',
1911
1892
  'submitted_at',
1912
1893
  'processed_at'
1913
1894
  ],
1914
- title: 'GitLogArtifactDetailResponse',
1915
- 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.'
1916
1897
  };
1917
- 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 = {
1918
1931
  properties: {
1919
1932
  id: {
1920
1933
  type: 'integer',
1921
1934
  title: 'Id'
1922
1935
  },
1923
- name: {
1936
+ repository_claim: {
1924
1937
  type: 'string',
1925
- title: 'Name'
1938
+ title: 'Repository Claim'
1926
1939
  },
1927
- email_hash: {
1940
+ actor_claim: {
1928
1941
  type: 'string',
1929
- title: 'Email Hash'
1942
+ title: 'Actor Claim'
1930
1943
  },
1931
- total_repos: {
1932
- type: 'integer',
1933
- title: 'Total Repos'
1944
+ sbom_content_hash: {
1945
+ type: 'string',
1946
+ title: 'Sbom Content Hash'
1934
1947
  },
1935
- total_commits: {
1936
- type: 'integer',
1937
- title: 'Total Commits'
1948
+ artifact_path: {
1949
+ type: 'string',
1950
+ title: 'Artifact Path'
1938
1951
  },
1939
- first_contribution: {
1952
+ status: {
1953
+ $ref: '#/components/schemas/SubmissionStatus'
1954
+ },
1955
+ error_detail: {
1940
1956
  anyOf: [
1941
1957
  {
1942
- type: 'string',
1943
- format: 'date-time'
1958
+ type: 'string'
1944
1959
  },
1945
1960
  {
1946
1961
  type: 'null'
1947
1962
  }
1948
1963
  ],
1949
- title: 'First Contribution'
1964
+ title: 'Error Detail'
1950
1965
  },
1951
- last_contribution: {
1966
+ submitted_at: {
1967
+ type: 'string',
1968
+ format: 'date-time',
1969
+ title: 'Submitted At'
1970
+ },
1971
+ processed_at: {
1952
1972
  anyOf: [
1953
1973
  {
1954
1974
  type: 'string',
@@ -1958,75 +1978,99 @@ export const ContributorDetailResponseSchema = {
1958
1978
  type: 'null'
1959
1979
  }
1960
1980
  ],
1961
- title: 'Last Contribution'
1962
- },
1963
- repos: {
1964
- items: {
1965
- $ref: '#/components/schemas/ContributionEntry'
1966
- },
1967
- type: 'array',
1968
- title: 'Repos'
1981
+ title: 'Processed At'
1969
1982
  }
1970
1983
  },
1971
1984
  type: 'object',
1972
1985
  required: [
1973
1986
  'id',
1974
- 'name',
1975
- 'email_hash',
1976
- 'total_repos',
1977
- 'total_commits',
1978
- 'first_contribution',
1979
- 'last_contribution',
1980
- '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'
1981
1995
  ],
1982
- title: 'ContributorDetailResponse',
1983
- 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.'
1984
1998
  };
1985
- export const ContributionEntrySchema = {
1999
+ export const ScfSubmissionSchema = {
1986
2000
  properties: {
1987
- repo_canonical_id: {
2001
+ round: {
1988
2002
  type: 'string',
1989
- title: 'Repo Canonical Id'
2003
+ title: 'Round'
1990
2004
  },
1991
- repo_display_name: {
2005
+ title: {
1992
2006
  type: 'string',
1993
- title: 'Repo Display Name'
1994
- },
1995
- project_canonical_id: {
1996
- anyOf: [
1997
- {
1998
- type: 'string'
1999
- },
2000
- {
2001
- type: 'null'
2002
- }
2003
- ],
2004
- title: 'Project Canonical Id'
2005
- },
2006
- number_of_commits: {
2007
- type: 'integer',
2008
- 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'
2009
2043
  },
2010
- first_commit_date: {
2044
+ msg: {
2011
2045
  type: 'string',
2012
- format: 'date-time',
2013
- title: 'First Commit Date'
2046
+ title: 'Message'
2014
2047
  },
2015
- last_commit_date: {
2048
+ type: {
2016
2049
  type: 'string',
2017
- format: 'date-time',
2018
- title: 'Last Commit Date'
2050
+ title: 'Error Type'
2051
+ },
2052
+ input: {
2053
+ title: 'Input'
2054
+ },
2055
+ ctx: {
2056
+ type: 'object',
2057
+ title: 'Context'
2019
2058
  }
2020
2059
  },
2021
2060
  type: 'object',
2022
2061
  required: [
2023
- 'repo_canonical_id',
2024
- 'repo_display_name',
2025
- 'project_canonical_id',
2026
- 'number_of_commits',
2027
- 'first_commit_date',
2028
- 'last_commit_date'
2062
+ 'loc',
2063
+ 'msg',
2064
+ 'type'
2029
2065
  ],
2030
- title: 'ContributionEntry',
2031
- 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).'
2032
2076
  };