@pg-atlas/data-sdk 0.4.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.
Files changed (39) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +64 -0
  3. package/dist/generated/client/client.gen.d.ts +2 -0
  4. package/dist/generated/client/client.gen.js +235 -0
  5. package/dist/generated/client/index.d.ts +8 -0
  6. package/dist/generated/client/index.js +6 -0
  7. package/dist/generated/client/types.gen.d.ts +117 -0
  8. package/dist/generated/client/types.gen.js +2 -0
  9. package/dist/generated/client/utils.gen.d.ts +33 -0
  10. package/dist/generated/client/utils.gen.js +228 -0
  11. package/dist/generated/client.gen.d.ts +12 -0
  12. package/dist/generated/client.gen.js +3 -0
  13. package/dist/generated/core/auth.gen.d.ts +18 -0
  14. package/dist/generated/core/auth.gen.js +14 -0
  15. package/dist/generated/core/bodySerializer.gen.d.ts +25 -0
  16. package/dist/generated/core/bodySerializer.gen.js +57 -0
  17. package/dist/generated/core/params.gen.d.ts +43 -0
  18. package/dist/generated/core/params.gen.js +100 -0
  19. package/dist/generated/core/pathSerializer.gen.d.ts +33 -0
  20. package/dist/generated/core/pathSerializer.gen.js +106 -0
  21. package/dist/generated/core/queryKeySerializer.gen.d.ts +18 -0
  22. package/dist/generated/core/queryKeySerializer.gen.js +92 -0
  23. package/dist/generated/core/serverSentEvents.gen.d.ts +71 -0
  24. package/dist/generated/core/serverSentEvents.gen.js +133 -0
  25. package/dist/generated/core/types.gen.d.ts +78 -0
  26. package/dist/generated/core/types.gen.js +2 -0
  27. package/dist/generated/core/utils.gen.d.ts +19 -0
  28. package/dist/generated/core/utils.gen.js +87 -0
  29. package/dist/generated/index.d.ts +2 -0
  30. package/dist/generated/index.js +2 -0
  31. package/dist/generated/schemas.gen.d.ts +1015 -0
  32. package/dist/generated/schemas.gen.js +1338 -0
  33. package/dist/generated/sdk.gen.d.ts +146 -0
  34. package/dist/generated/sdk.gen.js +133 -0
  35. package/dist/generated/types.gen.d.ts +1172 -0
  36. package/dist/generated/types.gen.js +2 -0
  37. package/dist/index.d.ts +6 -0
  38. package/dist/index.js +7 -0
  39. package/package.json +44 -0
@@ -0,0 +1,1338 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ export const VisibilitySchema = {
3
+ type: 'string',
4
+ enum: [
5
+ 'public',
6
+ 'private'
7
+ ],
8
+ title: 'Visibility',
9
+ description: 'Whether a Repo is publicly accessible (affects data collection scope).'
10
+ };
11
+ export const ValidationErrorSchema = {
12
+ 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: {
28
+ type: 'string',
29
+ title: 'Message'
30
+ },
31
+ type: {
32
+ type: 'string',
33
+ title: 'Error Type'
34
+ },
35
+ input: {
36
+ title: 'Input'
37
+ },
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 SbomSubmission record.'
60
+ };
61
+ export const ScfSubmissionSchema = {
62
+ properties: {
63
+ round: {
64
+ type: 'string',
65
+ title: 'Round'
66
+ },
67
+ title: {
68
+ type: 'string',
69
+ title: 'Title'
70
+ }
71
+ },
72
+ type: 'object',
73
+ required: [
74
+ 'round',
75
+ 'title'
76
+ ],
77
+ title: 'ScfSubmission',
78
+ description: 'A single SCF funding round submission.'
79
+ };
80
+ export const SbomSubmissionResponseSchema = {
81
+ properties: {
82
+ id: {
83
+ type: 'integer',
84
+ title: 'Id'
85
+ },
86
+ repository_claim: {
87
+ type: 'string',
88
+ title: 'Repository Claim'
89
+ },
90
+ actor_claim: {
91
+ type: 'string',
92
+ title: 'Actor Claim'
93
+ },
94
+ sbom_content_hash: {
95
+ type: 'string',
96
+ title: 'Sbom Content Hash'
97
+ },
98
+ artifact_path: {
99
+ type: 'string',
100
+ title: 'Artifact Path'
101
+ },
102
+ status: {
103
+ $ref: '#/components/schemas/SubmissionStatus'
104
+ },
105
+ error_detail: {
106
+ anyOf: [
107
+ {
108
+ type: 'string'
109
+ },
110
+ {
111
+ type: 'null'
112
+ }
113
+ ],
114
+ title: 'Error Detail'
115
+ },
116
+ submitted_at: {
117
+ type: 'string',
118
+ format: 'date-time',
119
+ title: 'Submitted At'
120
+ },
121
+ processed_at: {
122
+ anyOf: [
123
+ {
124
+ type: 'string',
125
+ format: 'date-time'
126
+ },
127
+ {
128
+ type: 'null'
129
+ }
130
+ ],
131
+ title: 'Processed At'
132
+ }
133
+ },
134
+ type: 'object',
135
+ required: [
136
+ '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'
145
+ ],
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.'
148
+ };
149
+ export const SbomSubmissionListResponseSchema = {
150
+ properties: {
151
+ items: {
152
+ items: {
153
+ $ref: '#/components/schemas/SbomSubmissionResponse'
154
+ },
155
+ type: 'array',
156
+ title: 'Items'
157
+ },
158
+ total: {
159
+ type: 'integer',
160
+ title: 'Total'
161
+ },
162
+ limit: {
163
+ type: 'integer',
164
+ title: 'Limit'
165
+ },
166
+ offset: {
167
+ type: 'integer',
168
+ title: 'Offset'
169
+ }
170
+ },
171
+ type: 'object',
172
+ required: [
173
+ 'items',
174
+ 'total',
175
+ 'limit',
176
+ 'offset'
177
+ ],
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.'
180
+ };
181
+ export const SbomSubmissionDetailResponseSchema = {
182
+ properties: {
183
+ id: {
184
+ type: 'integer',
185
+ title: 'Id'
186
+ },
187
+ repository_claim: {
188
+ type: 'string',
189
+ title: 'Repository Claim'
190
+ },
191
+ actor_claim: {
192
+ type: 'string',
193
+ title: 'Actor Claim'
194
+ },
195
+ sbom_content_hash: {
196
+ type: 'string',
197
+ title: 'Sbom Content Hash'
198
+ },
199
+ artifact_path: {
200
+ type: 'string',
201
+ title: 'Artifact Path'
202
+ },
203
+ status: {
204
+ $ref: '#/components/schemas/SubmissionStatus'
205
+ },
206
+ error_detail: {
207
+ anyOf: [
208
+ {
209
+ type: 'string'
210
+ },
211
+ {
212
+ type: 'null'
213
+ }
214
+ ],
215
+ title: 'Error Detail'
216
+ },
217
+ submitted_at: {
218
+ type: 'string',
219
+ format: 'date-time',
220
+ title: 'Submitted At'
221
+ },
222
+ processed_at: {
223
+ anyOf: [
224
+ {
225
+ type: 'string',
226
+ format: 'date-time'
227
+ },
228
+ {
229
+ type: 'null'
230
+ }
231
+ ],
232
+ title: 'Processed At'
233
+ },
234
+ raw_artifact: {
235
+ anyOf: [
236
+ {
237
+ type: 'string'
238
+ },
239
+ {
240
+ type: 'null'
241
+ }
242
+ ],
243
+ title: 'Raw Artifact'
244
+ }
245
+ },
246
+ type: 'object',
247
+ required: [
248
+ 'id',
249
+ 'repository_claim',
250
+ 'actor_claim',
251
+ 'sbom_content_hash',
252
+ 'artifact_path',
253
+ 'status',
254
+ 'error_detail',
255
+ 'submitted_at',
256
+ 'processed_at'
257
+ ],
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.'
260
+ };
261
+ export const SbomAcceptedResponseSchema = {
262
+ properties: {
263
+ message: {
264
+ type: 'string',
265
+ title: 'Message'
266
+ },
267
+ repository: {
268
+ type: 'string',
269
+ title: 'Repository'
270
+ },
271
+ package_count: {
272
+ 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'
299
+ },
300
+ display_name: {
301
+ type: 'string',
302
+ title: 'Display Name'
303
+ },
304
+ visibility: {
305
+ $ref: '#/components/schemas/Visibility'
306
+ },
307
+ latest_version: {
308
+ type: 'string',
309
+ title: 'Latest Version'
310
+ },
311
+ latest_commit_date: {
312
+ anyOf: [
313
+ {
314
+ type: 'string',
315
+ format: 'date-time'
316
+ },
317
+ {
318
+ type: 'null'
319
+ }
320
+ ],
321
+ title: 'Latest Commit Date'
322
+ },
323
+ repo_url: {
324
+ anyOf: [
325
+ {
326
+ type: 'string'
327
+ },
328
+ {
329
+ type: 'null'
330
+ }
331
+ ],
332
+ title: 'Repo Url'
333
+ },
334
+ project_id: {
335
+ anyOf: [
336
+ {
337
+ type: 'integer'
338
+ },
339
+ {
340
+ type: 'null'
341
+ }
342
+ ],
343
+ title: 'Project Id'
344
+ },
345
+ pony_factor: {
346
+ anyOf: [
347
+ {
348
+ type: 'integer'
349
+ },
350
+ {
351
+ type: 'null'
352
+ }
353
+ ],
354
+ title: 'Pony Factor'
355
+ },
356
+ criticality_score: {
357
+ anyOf: [
358
+ {
359
+ type: 'integer'
360
+ },
361
+ {
362
+ type: 'null'
363
+ }
364
+ ],
365
+ title: 'Criticality Score'
366
+ },
367
+ adoption_downloads: {
368
+ anyOf: [
369
+ {
370
+ type: 'integer'
371
+ },
372
+ {
373
+ type: 'null'
374
+ }
375
+ ],
376
+ title: 'Adoption Downloads'
377
+ },
378
+ adoption_stars: {
379
+ anyOf: [
380
+ {
381
+ type: 'integer'
382
+ },
383
+ {
384
+ type: 'null'
385
+ }
386
+ ],
387
+ title: 'Adoption Stars'
388
+ },
389
+ adoption_forks: {
390
+ anyOf: [
391
+ {
392
+ type: 'integer'
393
+ },
394
+ {
395
+ type: 'null'
396
+ }
397
+ ],
398
+ title: 'Adoption Forks'
399
+ },
400
+ updated_at: {
401
+ type: 'string',
402
+ format: 'date-time',
403
+ title: 'Updated At'
404
+ }
405
+ },
406
+ type: 'object',
407
+ 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'
421
+ ],
422
+ title: 'RepoSummary',
423
+ description: 'Compact repo representation used in list endpoints and as an embedded\nreference in project detail responses.'
424
+ };
425
+ export const RepoDetailResponseSchema = {
426
+ 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'
441
+ },
442
+ latest_commit_date: {
443
+ anyOf: [
444
+ {
445
+ type: 'string',
446
+ format: 'date-time'
447
+ },
448
+ {
449
+ type: 'null'
450
+ }
451
+ ],
452
+ title: 'Latest Commit Date'
453
+ },
454
+ repo_url: {
455
+ anyOf: [
456
+ {
457
+ type: 'string'
458
+ },
459
+ {
460
+ type: 'null'
461
+ }
462
+ ],
463
+ title: 'Repo Url'
464
+ },
465
+ project_id: {
466
+ anyOf: [
467
+ {
468
+ type: 'integer'
469
+ },
470
+ {
471
+ type: 'null'
472
+ }
473
+ ],
474
+ title: 'Project Id'
475
+ },
476
+ pony_factor: {
477
+ anyOf: [
478
+ {
479
+ type: 'integer'
480
+ },
481
+ {
482
+ type: 'null'
483
+ }
484
+ ],
485
+ title: 'Pony Factor'
486
+ },
487
+ criticality_score: {
488
+ anyOf: [
489
+ {
490
+ type: 'integer'
491
+ },
492
+ {
493
+ type: 'null'
494
+ }
495
+ ],
496
+ title: 'Criticality Score'
497
+ },
498
+ adoption_downloads: {
499
+ anyOf: [
500
+ {
501
+ type: 'integer'
502
+ },
503
+ {
504
+ type: 'null'
505
+ }
506
+ ],
507
+ title: 'Adoption Downloads'
508
+ },
509
+ adoption_stars: {
510
+ anyOf: [
511
+ {
512
+ type: 'integer'
513
+ },
514
+ {
515
+ type: 'null'
516
+ }
517
+ ],
518
+ title: 'Adoption Stars'
519
+ },
520
+ adoption_forks: {
521
+ anyOf: [
522
+ {
523
+ type: 'integer'
524
+ },
525
+ {
526
+ type: 'null'
527
+ }
528
+ ],
529
+ title: 'Adoption Forks'
530
+ },
531
+ updated_at: {
532
+ type: 'string',
533
+ format: 'date-time',
534
+ title: 'Updated At'
535
+ },
536
+ releases: {
537
+ anyOf: [
538
+ {
539
+ items: {
540
+ additionalProperties: true,
541
+ type: 'object'
542
+ },
543
+ type: 'array'
544
+ },
545
+ {
546
+ type: 'null'
547
+ }
548
+ ],
549
+ title: 'Releases'
550
+ },
551
+ parent_project: {
552
+ anyOf: [
553
+ {
554
+ $ref: '#/components/schemas/ProjectSummary'
555
+ },
556
+ {
557
+ type: 'null'
558
+ }
559
+ ]
560
+ },
561
+ contributors: {
562
+ items: {
563
+ $ref: '#/components/schemas/ContributorSummary'
564
+ },
565
+ type: 'array',
566
+ title: 'Contributors'
567
+ },
568
+ outgoing_dep_counts: {
569
+ $ref: '#/components/schemas/DepCounts'
570
+ },
571
+ incoming_dep_counts: {
572
+ $ref: '#/components/schemas/DepCounts'
573
+ }
574
+ },
575
+ type: 'object',
576
+ required: [
577
+ 'canonical_id',
578
+ 'display_name',
579
+ 'visibility',
580
+ 'latest_version',
581
+ 'latest_commit_date',
582
+ 'repo_url',
583
+ 'project_id',
584
+ 'pony_factor',
585
+ 'criticality_score',
586
+ 'adoption_downloads',
587
+ 'adoption_stars',
588
+ 'adoption_forks',
589
+ 'updated_at',
590
+ 'releases',
591
+ 'parent_project',
592
+ 'contributors',
593
+ 'outgoing_dep_counts',
594
+ 'incoming_dep_counts'
595
+ ],
596
+ title: 'RepoDetailResponse',
597
+ description: 'Full repo detail with parent project, contributors, releases, and\ndependency counts.'
598
+ };
599
+ export const DepCountsSchema = {
600
+ properties: {
601
+ repos: {
602
+ type: 'integer',
603
+ title: 'Repos'
604
+ },
605
+ external_repos: {
606
+ type: 'integer',
607
+ title: 'External Repos'
608
+ }
609
+ },
610
+ type: 'object',
611
+ required: [
612
+ 'repos',
613
+ 'external_repos'
614
+ ],
615
+ title: 'DepCounts',
616
+ 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.'
617
+ };
618
+ export const ContributorSummarySchema = {
619
+ properties: {
620
+ id: {
621
+ type: 'integer',
622
+ title: 'Id'
623
+ },
624
+ name: {
625
+ type: 'string',
626
+ title: 'Name'
627
+ },
628
+ email_hash: {
629
+ type: 'string',
630
+ title: 'Email Hash'
631
+ }
632
+ },
633
+ type: 'object',
634
+ required: [
635
+ 'id',
636
+ 'name',
637
+ 'email_hash'
638
+ ],
639
+ title: 'ContributorSummary',
640
+ description: 'Compact contributor reference embedded in repo detail responses.'
641
+ };
642
+ export const ActivityStatusSchema = {
643
+ type: 'string',
644
+ enum: [
645
+ 'live',
646
+ 'in-dev',
647
+ 'discontinued',
648
+ 'non-responsive'
649
+ ],
650
+ title: 'ActivityStatus',
651
+ 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.'
652
+ };
653
+ export const ProjectTypeSchema = {
654
+ type: 'string',
655
+ enum: [
656
+ 'public-good',
657
+ 'scf-project'
658
+ ],
659
+ title: 'ProjectType',
660
+ description: 'Classification of a Project within the PG Atlas universe.'
661
+ };
662
+ export const ProjectSummarySchema = {
663
+ properties: {
664
+ canonical_id: {
665
+ type: 'string',
666
+ title: 'Canonical Id'
667
+ },
668
+ display_name: {
669
+ type: 'string',
670
+ title: 'Display Name'
671
+ },
672
+ project_type: {
673
+ $ref: '#/components/schemas/ProjectType'
674
+ },
675
+ activity_status: {
676
+ $ref: '#/components/schemas/ActivityStatus'
677
+ },
678
+ category: {
679
+ anyOf: [
680
+ {
681
+ type: 'string'
682
+ },
683
+ {
684
+ type: 'null'
685
+ }
686
+ ],
687
+ title: 'Category'
688
+ },
689
+ git_owner_url: {
690
+ anyOf: [
691
+ {
692
+ type: 'string'
693
+ },
694
+ {
695
+ type: 'null'
696
+ }
697
+ ],
698
+ title: 'Git Owner Url'
699
+ },
700
+ pony_factor: {
701
+ anyOf: [
702
+ {
703
+ type: 'integer'
704
+ },
705
+ {
706
+ type: 'null'
707
+ }
708
+ ],
709
+ title: 'Pony Factor'
710
+ },
711
+ criticality_score: {
712
+ anyOf: [
713
+ {
714
+ type: 'integer'
715
+ },
716
+ {
717
+ type: 'null'
718
+ }
719
+ ],
720
+ title: 'Criticality Score'
721
+ },
722
+ adoption_score: {
723
+ anyOf: [
724
+ {
725
+ type: 'number'
726
+ },
727
+ {
728
+ type: 'null'
729
+ }
730
+ ],
731
+ title: 'Adoption Score'
732
+ },
733
+ updated_at: {
734
+ type: 'string',
735
+ format: 'date-time',
736
+ title: 'Updated At'
737
+ }
738
+ },
739
+ type: 'object',
740
+ required: [
741
+ 'canonical_id',
742
+ 'display_name',
743
+ 'project_type',
744
+ 'activity_status',
745
+ 'category',
746
+ 'git_owner_url',
747
+ 'pony_factor',
748
+ 'criticality_score',
749
+ 'adoption_score',
750
+ 'updated_at'
751
+ ],
752
+ title: 'ProjectSummary',
753
+ description: 'Compact project representation used in list endpoints and as an embedded\nreference in repo detail responses.'
754
+ };
755
+ export const RepoDependencySchema = {
756
+ properties: {
757
+ canonical_id: {
758
+ type: 'string',
759
+ title: 'Canonical Id'
760
+ },
761
+ display_name: {
762
+ type: 'string',
763
+ title: 'Display Name'
764
+ },
765
+ vertex_type: {
766
+ $ref: '#/components/schemas/RepoVertexType'
767
+ },
768
+ version_range: {
769
+ anyOf: [
770
+ {
771
+ type: 'string'
772
+ },
773
+ {
774
+ type: 'null'
775
+ }
776
+ ],
777
+ title: 'Version Range'
778
+ },
779
+ confidence: {
780
+ $ref: '#/components/schemas/EdgeConfidence'
781
+ }
782
+ },
783
+ type: 'object',
784
+ required: [
785
+ 'canonical_id',
786
+ 'display_name',
787
+ 'vertex_type',
788
+ 'version_range',
789
+ 'confidence'
790
+ ],
791
+ title: 'RepoDependency',
792
+ 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``.'
793
+ };
794
+ export const EdgeConfidenceSchema = {
795
+ type: 'string',
796
+ enum: [
797
+ 'verified-sbom',
798
+ 'inferred-shadow'
799
+ ],
800
+ title: 'EdgeConfidence',
801
+ description: 'How firmly an edge was established.'
802
+ };
803
+ export const ProjectMetadataSchema = {
804
+ properties: {
805
+ scf_submissions: {
806
+ items: {
807
+ $ref: '#/components/schemas/ScfSubmission'
808
+ },
809
+ type: 'array',
810
+ title: 'Scf Submissions',
811
+ default: []
812
+ },
813
+ description: {
814
+ anyOf: [
815
+ {
816
+ type: 'string'
817
+ },
818
+ {
819
+ type: 'null'
820
+ }
821
+ ],
822
+ title: 'Description'
823
+ },
824
+ technical_architecture: {
825
+ anyOf: [
826
+ {
827
+ type: 'string'
828
+ },
829
+ {
830
+ type: 'null'
831
+ }
832
+ ],
833
+ title: 'Technical Architecture'
834
+ },
835
+ scf_tranche_completion: {
836
+ anyOf: [
837
+ {
838
+ type: 'string'
839
+ },
840
+ {
841
+ type: 'null'
842
+ }
843
+ ],
844
+ title: 'Scf Tranche Completion'
845
+ },
846
+ website: {
847
+ anyOf: [
848
+ {
849
+ type: 'string'
850
+ },
851
+ {
852
+ type: 'null'
853
+ }
854
+ ],
855
+ title: 'Website'
856
+ },
857
+ x_profile: {
858
+ anyOf: [
859
+ {
860
+ type: 'string'
861
+ },
862
+ {
863
+ type: 'null'
864
+ }
865
+ ],
866
+ title: 'X Profile'
867
+ },
868
+ total_awarded_usd: {
869
+ anyOf: [
870
+ {
871
+ type: 'integer'
872
+ },
873
+ {
874
+ type: 'number'
875
+ },
876
+ {
877
+ type: 'null'
878
+ }
879
+ ],
880
+ title: 'Total Awarded Usd'
881
+ },
882
+ total_paid_usd: {
883
+ anyOf: [
884
+ {
885
+ type: 'integer'
886
+ },
887
+ {
888
+ type: 'number'
889
+ },
890
+ {
891
+ type: 'null'
892
+ }
893
+ ],
894
+ title: 'Total Paid Usd'
895
+ },
896
+ awarded_submissions_count: {
897
+ anyOf: [
898
+ {
899
+ type: 'integer'
900
+ },
901
+ {
902
+ type: 'null'
903
+ }
904
+ ],
905
+ title: 'Awarded Submissions Count'
906
+ },
907
+ open_source: {
908
+ anyOf: [
909
+ {
910
+ type: 'boolean'
911
+ },
912
+ {
913
+ type: 'null'
914
+ }
915
+ ],
916
+ title: 'Open Source'
917
+ },
918
+ socials: {
919
+ anyOf: [
920
+ {
921
+ items: {
922
+ additionalProperties: true,
923
+ type: 'object'
924
+ },
925
+ type: 'array'
926
+ },
927
+ {
928
+ type: 'null'
929
+ }
930
+ ],
931
+ title: 'Socials'
932
+ },
933
+ analytics: {
934
+ anyOf: [
935
+ {},
936
+ {
937
+ type: 'null'
938
+ }
939
+ ],
940
+ title: 'Analytics'
941
+ },
942
+ regions_of_operation: {
943
+ anyOf: [
944
+ {},
945
+ {
946
+ type: 'null'
947
+ }
948
+ ],
949
+ title: 'Regions Of Operation'
950
+ }
951
+ },
952
+ additionalProperties: true,
953
+ type: 'object',
954
+ title: 'ProjectMetadata',
955
+ 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.'
956
+ };
957
+ export const ProjectDetailResponseSchema = {
958
+ properties: {
959
+ canonical_id: {
960
+ type: 'string',
961
+ title: 'Canonical Id'
962
+ },
963
+ display_name: {
964
+ type: 'string',
965
+ title: 'Display Name'
966
+ },
967
+ project_type: {
968
+ $ref: '#/components/schemas/ProjectType'
969
+ },
970
+ activity_status: {
971
+ $ref: '#/components/schemas/ActivityStatus'
972
+ },
973
+ category: {
974
+ anyOf: [
975
+ {
976
+ type: 'string'
977
+ },
978
+ {
979
+ type: 'null'
980
+ }
981
+ ],
982
+ title: 'Category'
983
+ },
984
+ git_owner_url: {
985
+ anyOf: [
986
+ {
987
+ type: 'string'
988
+ },
989
+ {
990
+ type: 'null'
991
+ }
992
+ ],
993
+ title: 'Git Owner Url'
994
+ },
995
+ pony_factor: {
996
+ anyOf: [
997
+ {
998
+ type: 'integer'
999
+ },
1000
+ {
1001
+ type: 'null'
1002
+ }
1003
+ ],
1004
+ title: 'Pony Factor'
1005
+ },
1006
+ criticality_score: {
1007
+ anyOf: [
1008
+ {
1009
+ type: 'integer'
1010
+ },
1011
+ {
1012
+ type: 'null'
1013
+ }
1014
+ ],
1015
+ title: 'Criticality Score'
1016
+ },
1017
+ adoption_score: {
1018
+ anyOf: [
1019
+ {
1020
+ type: 'number'
1021
+ },
1022
+ {
1023
+ type: 'null'
1024
+ }
1025
+ ],
1026
+ title: 'Adoption Score'
1027
+ },
1028
+ updated_at: {
1029
+ type: 'string',
1030
+ format: 'date-time',
1031
+ title: 'Updated At'
1032
+ },
1033
+ project_id: {
1034
+ type: 'integer',
1035
+ title: 'Project Id'
1036
+ },
1037
+ metadata: {
1038
+ $ref: '#/components/schemas/ProjectMetadata'
1039
+ }
1040
+ },
1041
+ type: 'object',
1042
+ required: [
1043
+ 'canonical_id',
1044
+ 'display_name',
1045
+ 'project_type',
1046
+ 'activity_status',
1047
+ 'category',
1048
+ 'git_owner_url',
1049
+ 'pony_factor',
1050
+ 'criticality_score',
1051
+ 'adoption_score',
1052
+ 'updated_at',
1053
+ 'project_id',
1054
+ 'metadata'
1055
+ ],
1056
+ title: 'ProjectDetailResponse',
1057
+ description: 'Full project detail including validated metadata.\n\n``metadata`` is the normalised form of the ``project_metadata`` JSONB column.'
1058
+ };
1059
+ export const ProjectDependencySchema = {
1060
+ properties: {
1061
+ project: {
1062
+ $ref: '#/components/schemas/ProjectSummary'
1063
+ },
1064
+ edge_count: {
1065
+ type: 'integer',
1066
+ title: 'Edge Count'
1067
+ }
1068
+ },
1069
+ type: 'object',
1070
+ required: [
1071
+ 'project',
1072
+ 'edge_count'
1073
+ ],
1074
+ title: 'ProjectDependency',
1075
+ description: 'A collapsed project-level dependency: aggregates repo-level edges\nbetween two projects into a single summary.'
1076
+ };
1077
+ export const PaginatedResponse_RepoSummary_Schema = {
1078
+ properties: {
1079
+ items: {
1080
+ items: {
1081
+ $ref: '#/components/schemas/RepoSummary'
1082
+ },
1083
+ type: 'array',
1084
+ title: 'Items'
1085
+ },
1086
+ total: {
1087
+ type: 'integer',
1088
+ title: 'Total'
1089
+ },
1090
+ limit: {
1091
+ type: 'integer',
1092
+ title: 'Limit'
1093
+ },
1094
+ offset: {
1095
+ type: 'integer',
1096
+ title: 'Offset'
1097
+ }
1098
+ },
1099
+ type: 'object',
1100
+ required: [
1101
+ 'items',
1102
+ 'total',
1103
+ 'limit',
1104
+ 'offset'
1105
+ ],
1106
+ title: 'PaginatedResponse[RepoSummary]'
1107
+ };
1108
+ export const PaginatedResponse_ProjectSummary_Schema = {
1109
+ properties: {
1110
+ items: {
1111
+ items: {
1112
+ $ref: '#/components/schemas/ProjectSummary'
1113
+ },
1114
+ type: 'array',
1115
+ title: 'Items'
1116
+ },
1117
+ total: {
1118
+ type: 'integer',
1119
+ title: 'Total'
1120
+ },
1121
+ limit: {
1122
+ type: 'integer',
1123
+ title: 'Limit'
1124
+ },
1125
+ offset: {
1126
+ type: 'integer',
1127
+ title: 'Offset'
1128
+ }
1129
+ },
1130
+ type: 'object',
1131
+ required: [
1132
+ 'items',
1133
+ 'total',
1134
+ 'limit',
1135
+ 'offset'
1136
+ ],
1137
+ title: 'PaginatedResponse[ProjectSummary]'
1138
+ };
1139
+ export const MetadataResponseSchema = {
1140
+ properties: {
1141
+ total_projects: {
1142
+ type: 'integer',
1143
+ title: 'Total Projects'
1144
+ },
1145
+ active_projects: {
1146
+ type: 'integer',
1147
+ title: 'Active Projects'
1148
+ },
1149
+ total_repos: {
1150
+ type: 'integer',
1151
+ title: 'Total Repos'
1152
+ },
1153
+ total_external_repos: {
1154
+ type: 'integer',
1155
+ title: 'Total External Repos'
1156
+ },
1157
+ total_dependency_edges: {
1158
+ type: 'integer',
1159
+ title: 'Total Dependency Edges'
1160
+ },
1161
+ total_contributor_edges: {
1162
+ type: 'integer',
1163
+ title: 'Total Contributor Edges'
1164
+ },
1165
+ last_updated: {
1166
+ anyOf: [
1167
+ {
1168
+ type: 'string',
1169
+ format: 'date-time'
1170
+ },
1171
+ {
1172
+ type: 'null'
1173
+ }
1174
+ ],
1175
+ title: 'Last Updated'
1176
+ }
1177
+ },
1178
+ type: 'object',
1179
+ required: [
1180
+ 'total_projects',
1181
+ 'active_projects',
1182
+ 'total_repos',
1183
+ 'total_external_repos',
1184
+ 'total_dependency_edges',
1185
+ 'total_contributor_edges',
1186
+ 'last_updated'
1187
+ ],
1188
+ title: 'MetadataResponse',
1189
+ description: 'Ecosystem-wide summary statistics returned by ``GET /metadata``.'
1190
+ };
1191
+ export const HealthResponseSchema = {
1192
+ properties: {
1193
+ status: {
1194
+ type: 'string',
1195
+ title: 'Status'
1196
+ },
1197
+ version: {
1198
+ type: 'string',
1199
+ title: 'Version'
1200
+ }
1201
+ },
1202
+ type: 'object',
1203
+ required: [
1204
+ 'status',
1205
+ 'version'
1206
+ ],
1207
+ title: 'HealthResponse',
1208
+ description: 'Response body for GET /health.'
1209
+ };
1210
+ export const HTTPValidationErrorSchema = {
1211
+ properties: {
1212
+ detail: {
1213
+ items: {
1214
+ $ref: '#/components/schemas/ValidationError'
1215
+ },
1216
+ type: 'array',
1217
+ title: 'Detail'
1218
+ }
1219
+ },
1220
+ type: 'object',
1221
+ title: 'HTTPValidationError'
1222
+ };
1223
+ export const ContributorDetailResponseSchema = {
1224
+ properties: {
1225
+ id: {
1226
+ type: 'integer',
1227
+ title: 'Id'
1228
+ },
1229
+ name: {
1230
+ type: 'string',
1231
+ title: 'Name'
1232
+ },
1233
+ email_hash: {
1234
+ type: 'string',
1235
+ title: 'Email Hash'
1236
+ },
1237
+ total_repos: {
1238
+ type: 'integer',
1239
+ title: 'Total Repos'
1240
+ },
1241
+ total_commits: {
1242
+ type: 'integer',
1243
+ title: 'Total Commits'
1244
+ },
1245
+ first_contribution: {
1246
+ anyOf: [
1247
+ {
1248
+ type: 'string',
1249
+ format: 'date-time'
1250
+ },
1251
+ {
1252
+ type: 'null'
1253
+ }
1254
+ ],
1255
+ title: 'First Contribution'
1256
+ },
1257
+ last_contribution: {
1258
+ anyOf: [
1259
+ {
1260
+ type: 'string',
1261
+ format: 'date-time'
1262
+ },
1263
+ {
1264
+ type: 'null'
1265
+ }
1266
+ ],
1267
+ title: 'Last Contribution'
1268
+ },
1269
+ repos: {
1270
+ items: {
1271
+ $ref: '#/components/schemas/ContributionEntry'
1272
+ },
1273
+ type: 'array',
1274
+ title: 'Repos'
1275
+ }
1276
+ },
1277
+ type: 'object',
1278
+ required: [
1279
+ 'id',
1280
+ 'name',
1281
+ 'email_hash',
1282
+ 'total_repos',
1283
+ 'total_commits',
1284
+ 'first_contribution',
1285
+ 'last_contribution',
1286
+ 'repos'
1287
+ ],
1288
+ title: 'ContributorDetailResponse',
1289
+ description: 'Full contributor detail with aggregated statistics and per-repo activity.'
1290
+ };
1291
+ export const ContributionEntrySchema = {
1292
+ properties: {
1293
+ repo_canonical_id: {
1294
+ type: 'string',
1295
+ title: 'Repo Canonical Id'
1296
+ },
1297
+ repo_display_name: {
1298
+ type: 'string',
1299
+ title: 'Repo Display Name'
1300
+ },
1301
+ project_canonical_id: {
1302
+ anyOf: [
1303
+ {
1304
+ type: 'string'
1305
+ },
1306
+ {
1307
+ type: 'null'
1308
+ }
1309
+ ],
1310
+ title: 'Project Canonical Id'
1311
+ },
1312
+ number_of_commits: {
1313
+ type: 'integer',
1314
+ title: 'Number Of Commits'
1315
+ },
1316
+ first_commit_date: {
1317
+ type: 'string',
1318
+ format: 'date-time',
1319
+ title: 'First Commit Date'
1320
+ },
1321
+ last_commit_date: {
1322
+ type: 'string',
1323
+ format: 'date-time',
1324
+ title: 'Last Commit Date'
1325
+ }
1326
+ },
1327
+ type: 'object',
1328
+ required: [
1329
+ 'repo_canonical_id',
1330
+ 'repo_display_name',
1331
+ 'project_canonical_id',
1332
+ 'number_of_commits',
1333
+ 'first_commit_date',
1334
+ 'last_commit_date'
1335
+ ],
1336
+ title: 'ContributionEntry',
1337
+ description: 'A single repo that a contributor has committed to.'
1338
+ };