@verdict-ai/db 0.1.0 → 0.2.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 (42) hide show
  1. package/dist/auth.d.ts +12 -2
  2. package/dist/auth.js +5 -4
  3. package/dist/auth.js.map +1 -1
  4. package/dist/control.d.ts +58 -0
  5. package/dist/control.js +305 -0
  6. package/dist/control.js.map +1 -0
  7. package/dist/d1.d.ts +1201 -0
  8. package/dist/dialects.d.ts +7 -0
  9. package/dist/dialects.js +17 -0
  10. package/dist/dialects.js.map +1 -1
  11. package/dist/documents.d.ts +2 -0
  12. package/dist/postgres.d.ts +2454 -268
  13. package/dist/queries.d.ts +2 -0
  14. package/dist/queries.js +4 -0
  15. package/dist/queries.js.map +1 -1
  16. package/dist/schema/control.d.ts +71 -0
  17. package/dist/schema/control.js +29 -0
  18. package/dist/schema/control.js.map +1 -0
  19. package/dist/schema/pg.d.ts +2453 -262
  20. package/dist/schema/pg.js +44 -2
  21. package/dist/schema/pg.js.map +1 -1
  22. package/dist/schema/sqlite.d.ts +2680 -273
  23. package/dist/schema/sqlite.js +44 -2
  24. package/dist/schema/sqlite.js.map +1 -1
  25. package/dist/store.d.ts +12 -4
  26. package/dist/store.js +77 -6
  27. package/dist/store.js.map +1 -1
  28. package/drizzle/0002_publications.sql +20 -0
  29. package/drizzle/0003_publishers.sql +9 -0
  30. package/drizzle/0004_control_plane.sql +75 -0
  31. package/drizzle/meta/0002_snapshot.json +659 -0
  32. package/drizzle/meta/0003_snapshot.json +712 -0
  33. package/drizzle/meta/0004_snapshot.json +1191 -0
  34. package/drizzle/meta/_journal.json +21 -0
  35. package/drizzle/pg/0001_publications.sql +20 -0
  36. package/drizzle/pg/0002_publishers.sql +9 -0
  37. package/drizzle/pg/0003_control_plane.sql +75 -0
  38. package/drizzle/pg/meta/0001_snapshot.json +769 -0
  39. package/drizzle/pg/meta/0002_snapshot.json +828 -0
  40. package/drizzle/pg/meta/0003_snapshot.json +1381 -0
  41. package/drizzle/pg/meta/_journal.json +21 -0
  42. package/package.json +4 -3
@@ -0,0 +1,1191 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "d463d363-d835-486f-b921-d164691a99a2",
5
+ "prevId": "df6264ec-10d2-4f0b-a7e5-016bc15e056d",
6
+ "tables": {
7
+ "api_keys": {
8
+ "name": "api_keys",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "tenant_id": {
18
+ "name": "tenant_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "name": {
25
+ "name": "name",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "key_hash": {
32
+ "name": "key_hash",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "prefix": {
39
+ "name": "prefix",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "created_at": {
46
+ "name": "created_at",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "last_used_at": {
53
+ "name": "last_used_at",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": false,
57
+ "autoincrement": false
58
+ },
59
+ "revoked_at": {
60
+ "name": "revoked_at",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": false,
64
+ "autoincrement": false
65
+ }
66
+ },
67
+ "indexes": {
68
+ "api_keys_hash": {
69
+ "name": "api_keys_hash",
70
+ "columns": [
71
+ "key_hash"
72
+ ],
73
+ "isUnique": true
74
+ },
75
+ "api_keys_tenant": {
76
+ "name": "api_keys_tenant",
77
+ "columns": [
78
+ "tenant_id"
79
+ ],
80
+ "isUnique": false
81
+ }
82
+ },
83
+ "foreignKeys": {},
84
+ "compositePrimaryKeys": {},
85
+ "uniqueConstraints": {},
86
+ "checkConstraints": {}
87
+ },
88
+ "comparison_reports": {
89
+ "name": "comparison_reports",
90
+ "columns": {
91
+ "tenant_id": {
92
+ "name": "tenant_id",
93
+ "type": "text",
94
+ "primaryKey": false,
95
+ "notNull": true,
96
+ "autoincrement": false
97
+ },
98
+ "project": {
99
+ "name": "project",
100
+ "type": "text",
101
+ "primaryKey": false,
102
+ "notNull": true,
103
+ "autoincrement": false
104
+ },
105
+ "id": {
106
+ "name": "id",
107
+ "type": "text",
108
+ "primaryKey": false,
109
+ "notNull": true,
110
+ "autoincrement": false
111
+ },
112
+ "rubric_name": {
113
+ "name": "rubric_name",
114
+ "type": "text",
115
+ "primaryKey": false,
116
+ "notNull": true,
117
+ "autoincrement": false
118
+ },
119
+ "head_version_id": {
120
+ "name": "head_version_id",
121
+ "type": "text",
122
+ "primaryKey": false,
123
+ "notNull": true,
124
+ "autoincrement": false
125
+ },
126
+ "doc": {
127
+ "name": "doc",
128
+ "type": "text",
129
+ "primaryKey": false,
130
+ "notNull": true,
131
+ "autoincrement": false
132
+ },
133
+ "reported_at": {
134
+ "name": "reported_at",
135
+ "type": "text",
136
+ "primaryKey": false,
137
+ "notNull": true,
138
+ "autoincrement": false
139
+ }
140
+ },
141
+ "indexes": {
142
+ "comparison_reports_reported": {
143
+ "name": "comparison_reports_reported",
144
+ "columns": [
145
+ "tenant_id",
146
+ "project",
147
+ "reported_at"
148
+ ],
149
+ "isUnique": false
150
+ }
151
+ },
152
+ "foreignKeys": {},
153
+ "compositePrimaryKeys": {
154
+ "comparison_reports_tenant_id_project_id_pk": {
155
+ "columns": [
156
+ "tenant_id",
157
+ "project",
158
+ "id"
159
+ ],
160
+ "name": "comparison_reports_tenant_id_project_id_pk"
161
+ }
162
+ },
163
+ "uniqueConstraints": {},
164
+ "checkConstraints": {}
165
+ },
166
+ "environments": {
167
+ "name": "environments",
168
+ "columns": {
169
+ "tenant_id": {
170
+ "name": "tenant_id",
171
+ "type": "text",
172
+ "primaryKey": false,
173
+ "notNull": true,
174
+ "autoincrement": false
175
+ },
176
+ "project": {
177
+ "name": "project",
178
+ "type": "text",
179
+ "primaryKey": false,
180
+ "notNull": true,
181
+ "autoincrement": false
182
+ },
183
+ "name": {
184
+ "name": "name",
185
+ "type": "text",
186
+ "primaryKey": false,
187
+ "notNull": true,
188
+ "autoincrement": false
189
+ },
190
+ "created_at": {
191
+ "name": "created_at",
192
+ "type": "text",
193
+ "primaryKey": false,
194
+ "notNull": true,
195
+ "autoincrement": false
196
+ }
197
+ },
198
+ "indexes": {},
199
+ "foreignKeys": {},
200
+ "compositePrimaryKeys": {
201
+ "environments_tenant_id_project_name_pk": {
202
+ "columns": [
203
+ "tenant_id",
204
+ "project",
205
+ "name"
206
+ ],
207
+ "name": "environments_tenant_id_project_name_pk"
208
+ }
209
+ },
210
+ "uniqueConstraints": {},
211
+ "checkConstraints": {}
212
+ },
213
+ "evaluations": {
214
+ "name": "evaluations",
215
+ "columns": {
216
+ "id": {
217
+ "name": "id",
218
+ "type": "text",
219
+ "primaryKey": true,
220
+ "notNull": true,
221
+ "autoincrement": false
222
+ },
223
+ "tenant_id": {
224
+ "name": "tenant_id",
225
+ "type": "text",
226
+ "primaryKey": false,
227
+ "notNull": false,
228
+ "autoincrement": false
229
+ },
230
+ "rubric_id": {
231
+ "name": "rubric_id",
232
+ "type": "text",
233
+ "primaryKey": false,
234
+ "notNull": false,
235
+ "autoincrement": false
236
+ },
237
+ "rubric_name": {
238
+ "name": "rubric_name",
239
+ "type": "text",
240
+ "primaryKey": false,
241
+ "notNull": true,
242
+ "autoincrement": false
243
+ },
244
+ "subject_name": {
245
+ "name": "subject_name",
246
+ "type": "text",
247
+ "primaryKey": false,
248
+ "notNull": false,
249
+ "autoincrement": false
250
+ },
251
+ "status": {
252
+ "name": "status",
253
+ "type": "text",
254
+ "primaryKey": false,
255
+ "notNull": true,
256
+ "autoincrement": false
257
+ },
258
+ "score": {
259
+ "name": "score",
260
+ "type": "real",
261
+ "primaryKey": false,
262
+ "notNull": false,
263
+ "autoincrement": false
264
+ },
265
+ "grade": {
266
+ "name": "grade",
267
+ "type": "text",
268
+ "primaryKey": false,
269
+ "notNull": false,
270
+ "autoincrement": false
271
+ },
272
+ "passed": {
273
+ "name": "passed",
274
+ "type": "integer",
275
+ "primaryKey": false,
276
+ "notNull": false,
277
+ "autoincrement": false
278
+ },
279
+ "pending_human": {
280
+ "name": "pending_human",
281
+ "type": "integer",
282
+ "primaryKey": false,
283
+ "notNull": true,
284
+ "autoincrement": false,
285
+ "default": 0
286
+ },
287
+ "decision_calls": {
288
+ "name": "decision_calls",
289
+ "type": "integer",
290
+ "primaryKey": false,
291
+ "notNull": true,
292
+ "autoincrement": false,
293
+ "default": 0
294
+ },
295
+ "llm_calls": {
296
+ "name": "llm_calls",
297
+ "type": "integer",
298
+ "primaryKey": false,
299
+ "notNull": true,
300
+ "autoincrement": false,
301
+ "default": 0
302
+ },
303
+ "input_tokens": {
304
+ "name": "input_tokens",
305
+ "type": "integer",
306
+ "primaryKey": false,
307
+ "notNull": true,
308
+ "autoincrement": false,
309
+ "default": 0
310
+ },
311
+ "duration_ms": {
312
+ "name": "duration_ms",
313
+ "type": "integer",
314
+ "primaryKey": false,
315
+ "notNull": true,
316
+ "autoincrement": false,
317
+ "default": 0
318
+ },
319
+ "doc": {
320
+ "name": "doc",
321
+ "type": "text",
322
+ "primaryKey": false,
323
+ "notNull": true,
324
+ "autoincrement": false
325
+ },
326
+ "created_at": {
327
+ "name": "created_at",
328
+ "type": "text",
329
+ "primaryKey": false,
330
+ "notNull": true,
331
+ "autoincrement": false
332
+ },
333
+ "updated_at": {
334
+ "name": "updated_at",
335
+ "type": "text",
336
+ "primaryKey": false,
337
+ "notNull": true,
338
+ "autoincrement": false
339
+ }
340
+ },
341
+ "indexes": {
342
+ "evaluations_tenant_created": {
343
+ "name": "evaluations_tenant_created",
344
+ "columns": [
345
+ "tenant_id",
346
+ "created_at"
347
+ ],
348
+ "isUnique": false
349
+ },
350
+ "evaluations_rubric_created": {
351
+ "name": "evaluations_rubric_created",
352
+ "columns": [
353
+ "rubric_id",
354
+ "created_at"
355
+ ],
356
+ "isUnique": false
357
+ },
358
+ "evaluations_tenant_status": {
359
+ "name": "evaluations_tenant_status",
360
+ "columns": [
361
+ "tenant_id",
362
+ "status"
363
+ ],
364
+ "isUnique": false
365
+ }
366
+ },
367
+ "foreignKeys": {},
368
+ "compositePrimaryKeys": {},
369
+ "uniqueConstraints": {},
370
+ "checkConstraints": {}
371
+ },
372
+ "idempotency_keys": {
373
+ "name": "idempotency_keys",
374
+ "columns": {
375
+ "tenant_id": {
376
+ "name": "tenant_id",
377
+ "type": "text",
378
+ "primaryKey": false,
379
+ "notNull": false,
380
+ "autoincrement": false
381
+ },
382
+ "key": {
383
+ "name": "key",
384
+ "type": "text",
385
+ "primaryKey": false,
386
+ "notNull": true,
387
+ "autoincrement": false
388
+ },
389
+ "fingerprint": {
390
+ "name": "fingerprint",
391
+ "type": "text",
392
+ "primaryKey": false,
393
+ "notNull": true,
394
+ "autoincrement": false
395
+ },
396
+ "target_type": {
397
+ "name": "target_type",
398
+ "type": "text",
399
+ "primaryKey": false,
400
+ "notNull": true,
401
+ "autoincrement": false
402
+ },
403
+ "target_id": {
404
+ "name": "target_id",
405
+ "type": "text",
406
+ "primaryKey": false,
407
+ "notNull": false,
408
+ "autoincrement": false
409
+ },
410
+ "target_ids": {
411
+ "name": "target_ids",
412
+ "type": "text",
413
+ "primaryKey": false,
414
+ "notNull": false,
415
+ "autoincrement": false
416
+ },
417
+ "created_at": {
418
+ "name": "created_at",
419
+ "type": "text",
420
+ "primaryKey": false,
421
+ "notNull": true,
422
+ "autoincrement": false
423
+ },
424
+ "expires_at": {
425
+ "name": "expires_at",
426
+ "type": "text",
427
+ "primaryKey": false,
428
+ "notNull": true,
429
+ "autoincrement": false
430
+ }
431
+ },
432
+ "indexes": {
433
+ "idempotency_keys_tenant_key": {
434
+ "name": "idempotency_keys_tenant_key",
435
+ "columns": [
436
+ "tenant_id",
437
+ "key"
438
+ ],
439
+ "isUnique": true
440
+ }
441
+ },
442
+ "foreignKeys": {},
443
+ "compositePrimaryKeys": {},
444
+ "uniqueConstraints": {},
445
+ "checkConstraints": {}
446
+ },
447
+ "pointers": {
448
+ "name": "pointers",
449
+ "columns": {
450
+ "tenant_id": {
451
+ "name": "tenant_id",
452
+ "type": "text",
453
+ "primaryKey": false,
454
+ "notNull": true,
455
+ "autoincrement": false
456
+ },
457
+ "project": {
458
+ "name": "project",
459
+ "type": "text",
460
+ "primaryKey": false,
461
+ "notNull": true,
462
+ "autoincrement": false
463
+ },
464
+ "environment": {
465
+ "name": "environment",
466
+ "type": "text",
467
+ "primaryKey": false,
468
+ "notNull": true,
469
+ "autoincrement": false
470
+ },
471
+ "rubric_name": {
472
+ "name": "rubric_name",
473
+ "type": "text",
474
+ "primaryKey": false,
475
+ "notNull": true,
476
+ "autoincrement": false
477
+ },
478
+ "version_id": {
479
+ "name": "version_id",
480
+ "type": "text",
481
+ "primaryKey": false,
482
+ "notNull": true,
483
+ "autoincrement": false
484
+ },
485
+ "updated_at": {
486
+ "name": "updated_at",
487
+ "type": "text",
488
+ "primaryKey": false,
489
+ "notNull": true,
490
+ "autoincrement": false
491
+ }
492
+ },
493
+ "indexes": {
494
+ "pointers_version": {
495
+ "name": "pointers_version",
496
+ "columns": [
497
+ "tenant_id",
498
+ "project",
499
+ "rubric_name",
500
+ "version_id"
501
+ ],
502
+ "isUnique": false
503
+ }
504
+ },
505
+ "foreignKeys": {},
506
+ "compositePrimaryKeys": {
507
+ "pointers_tenant_id_project_environment_rubric_name_pk": {
508
+ "columns": [
509
+ "tenant_id",
510
+ "project",
511
+ "environment",
512
+ "rubric_name"
513
+ ],
514
+ "name": "pointers_tenant_id_project_environment_rubric_name_pk"
515
+ }
516
+ },
517
+ "uniqueConstraints": {},
518
+ "checkConstraints": {}
519
+ },
520
+ "project_versions": {
521
+ "name": "project_versions",
522
+ "columns": {
523
+ "tenant_id": {
524
+ "name": "tenant_id",
525
+ "type": "text",
526
+ "primaryKey": false,
527
+ "notNull": true,
528
+ "autoincrement": false
529
+ },
530
+ "project": {
531
+ "name": "project",
532
+ "type": "text",
533
+ "primaryKey": false,
534
+ "notNull": true,
535
+ "autoincrement": false
536
+ },
537
+ "rubric_name": {
538
+ "name": "rubric_name",
539
+ "type": "text",
540
+ "primaryKey": false,
541
+ "notNull": true,
542
+ "autoincrement": false
543
+ },
544
+ "version_id": {
545
+ "name": "version_id",
546
+ "type": "text",
547
+ "primaryKey": false,
548
+ "notNull": true,
549
+ "autoincrement": false
550
+ },
551
+ "doc": {
552
+ "name": "doc",
553
+ "type": "text",
554
+ "primaryKey": false,
555
+ "notNull": true,
556
+ "autoincrement": false
557
+ },
558
+ "created_at": {
559
+ "name": "created_at",
560
+ "type": "text",
561
+ "primaryKey": false,
562
+ "notNull": true,
563
+ "autoincrement": false
564
+ }
565
+ },
566
+ "indexes": {
567
+ "project_versions_created": {
568
+ "name": "project_versions_created",
569
+ "columns": [
570
+ "tenant_id",
571
+ "project",
572
+ "created_at"
573
+ ],
574
+ "isUnique": false
575
+ }
576
+ },
577
+ "foreignKeys": {},
578
+ "compositePrimaryKeys": {
579
+ "project_versions_tenant_id_project_rubric_name_version_id_pk": {
580
+ "columns": [
581
+ "tenant_id",
582
+ "project",
583
+ "rubric_name",
584
+ "version_id"
585
+ ],
586
+ "name": "project_versions_tenant_id_project_rubric_name_version_id_pk"
587
+ }
588
+ },
589
+ "uniqueConstraints": {},
590
+ "checkConstraints": {}
591
+ },
592
+ "projects": {
593
+ "name": "projects",
594
+ "columns": {
595
+ "tenant_id": {
596
+ "name": "tenant_id",
597
+ "type": "text",
598
+ "primaryKey": false,
599
+ "notNull": true,
600
+ "autoincrement": false
601
+ },
602
+ "name": {
603
+ "name": "name",
604
+ "type": "text",
605
+ "primaryKey": false,
606
+ "notNull": true,
607
+ "autoincrement": false
608
+ },
609
+ "created_at": {
610
+ "name": "created_at",
611
+ "type": "text",
612
+ "primaryKey": false,
613
+ "notNull": true,
614
+ "autoincrement": false
615
+ }
616
+ },
617
+ "indexes": {},
618
+ "foreignKeys": {},
619
+ "compositePrimaryKeys": {
620
+ "projects_tenant_id_name_pk": {
621
+ "columns": [
622
+ "tenant_id",
623
+ "name"
624
+ ],
625
+ "name": "projects_tenant_id_name_pk"
626
+ }
627
+ },
628
+ "uniqueConstraints": {},
629
+ "checkConstraints": {}
630
+ },
631
+ "promotions": {
632
+ "name": "promotions",
633
+ "columns": {
634
+ "tenant_id": {
635
+ "name": "tenant_id",
636
+ "type": "text",
637
+ "primaryKey": false,
638
+ "notNull": true,
639
+ "autoincrement": false
640
+ },
641
+ "project": {
642
+ "name": "project",
643
+ "type": "text",
644
+ "primaryKey": false,
645
+ "notNull": true,
646
+ "autoincrement": false
647
+ },
648
+ "id": {
649
+ "name": "id",
650
+ "type": "text",
651
+ "primaryKey": false,
652
+ "notNull": true,
653
+ "autoincrement": false
654
+ },
655
+ "environment": {
656
+ "name": "environment",
657
+ "type": "text",
658
+ "primaryKey": false,
659
+ "notNull": true,
660
+ "autoincrement": false
661
+ },
662
+ "rubric_name": {
663
+ "name": "rubric_name",
664
+ "type": "text",
665
+ "primaryKey": false,
666
+ "notNull": true,
667
+ "autoincrement": false
668
+ },
669
+ "doc": {
670
+ "name": "doc",
671
+ "type": "text",
672
+ "primaryKey": false,
673
+ "notNull": true,
674
+ "autoincrement": false
675
+ },
676
+ "created_at": {
677
+ "name": "created_at",
678
+ "type": "text",
679
+ "primaryKey": false,
680
+ "notNull": true,
681
+ "autoincrement": false
682
+ }
683
+ },
684
+ "indexes": {
685
+ "promotions_created": {
686
+ "name": "promotions_created",
687
+ "columns": [
688
+ "tenant_id",
689
+ "project",
690
+ "created_at"
691
+ ],
692
+ "isUnique": false
693
+ }
694
+ },
695
+ "foreignKeys": {},
696
+ "compositePrimaryKeys": {
697
+ "promotions_tenant_id_project_id_pk": {
698
+ "columns": [
699
+ "tenant_id",
700
+ "project",
701
+ "id"
702
+ ],
703
+ "name": "promotions_tenant_id_project_id_pk"
704
+ }
705
+ },
706
+ "uniqueConstraints": {},
707
+ "checkConstraints": {}
708
+ },
709
+ "publications": {
710
+ "name": "publications",
711
+ "columns": {
712
+ "id": {
713
+ "name": "id",
714
+ "type": "text",
715
+ "primaryKey": true,
716
+ "notNull": true,
717
+ "autoincrement": false
718
+ },
719
+ "tenant_id": {
720
+ "name": "tenant_id",
721
+ "type": "text",
722
+ "primaryKey": false,
723
+ "notNull": false,
724
+ "autoincrement": false
725
+ },
726
+ "owner": {
727
+ "name": "owner",
728
+ "type": "text",
729
+ "primaryKey": false,
730
+ "notNull": true,
731
+ "autoincrement": false
732
+ },
733
+ "slug": {
734
+ "name": "slug",
735
+ "type": "text",
736
+ "primaryKey": false,
737
+ "notNull": true,
738
+ "autoincrement": false
739
+ },
740
+ "version_id": {
741
+ "name": "version_id",
742
+ "type": "text",
743
+ "primaryKey": false,
744
+ "notNull": true,
745
+ "autoincrement": false
746
+ },
747
+ "title": {
748
+ "name": "title",
749
+ "type": "text",
750
+ "primaryKey": false,
751
+ "notNull": true,
752
+ "autoincrement": false
753
+ },
754
+ "domain": {
755
+ "name": "domain",
756
+ "type": "text",
757
+ "primaryKey": false,
758
+ "notNull": false,
759
+ "autoincrement": false
760
+ },
761
+ "locale": {
762
+ "name": "locale",
763
+ "type": "text",
764
+ "primaryKey": false,
765
+ "notNull": false,
766
+ "autoincrement": false
767
+ },
768
+ "judgment_type": {
769
+ "name": "judgment_type",
770
+ "type": "text",
771
+ "primaryKey": false,
772
+ "notNull": true,
773
+ "autoincrement": false
774
+ },
775
+ "license": {
776
+ "name": "license",
777
+ "type": "text",
778
+ "primaryKey": false,
779
+ "notNull": true,
780
+ "autoincrement": false
781
+ },
782
+ "doc": {
783
+ "name": "doc",
784
+ "type": "text",
785
+ "primaryKey": false,
786
+ "notNull": true,
787
+ "autoincrement": false
788
+ },
789
+ "created_at": {
790
+ "name": "created_at",
791
+ "type": "text",
792
+ "primaryKey": false,
793
+ "notNull": true,
794
+ "autoincrement": false
795
+ },
796
+ "withdrawn_at": {
797
+ "name": "withdrawn_at",
798
+ "type": "text",
799
+ "primaryKey": false,
800
+ "notNull": false,
801
+ "autoincrement": false
802
+ }
803
+ },
804
+ "indexes": {
805
+ "publications_owner_slug_version": {
806
+ "name": "publications_owner_slug_version",
807
+ "columns": [
808
+ "owner",
809
+ "slug",
810
+ "version_id"
811
+ ],
812
+ "isUnique": true
813
+ },
814
+ "publications_created": {
815
+ "name": "publications_created",
816
+ "columns": [
817
+ "created_at"
818
+ ],
819
+ "isUnique": false
820
+ },
821
+ "publications_version": {
822
+ "name": "publications_version",
823
+ "columns": [
824
+ "version_id"
825
+ ],
826
+ "isUnique": false
827
+ },
828
+ "publications_tenant": {
829
+ "name": "publications_tenant",
830
+ "columns": [
831
+ "tenant_id"
832
+ ],
833
+ "isUnique": false
834
+ }
835
+ },
836
+ "foreignKeys": {},
837
+ "compositePrimaryKeys": {},
838
+ "uniqueConstraints": {},
839
+ "checkConstraints": {}
840
+ },
841
+ "publishers": {
842
+ "name": "publishers",
843
+ "columns": {
844
+ "tenant_id": {
845
+ "name": "tenant_id",
846
+ "type": "text",
847
+ "primaryKey": true,
848
+ "notNull": true,
849
+ "autoincrement": false
850
+ },
851
+ "github_id": {
852
+ "name": "github_id",
853
+ "type": "integer",
854
+ "primaryKey": false,
855
+ "notNull": true,
856
+ "autoincrement": false
857
+ },
858
+ "login": {
859
+ "name": "login",
860
+ "type": "text",
861
+ "primaryKey": false,
862
+ "notNull": true,
863
+ "autoincrement": false
864
+ },
865
+ "created_at": {
866
+ "name": "created_at",
867
+ "type": "text",
868
+ "primaryKey": false,
869
+ "notNull": true,
870
+ "autoincrement": false
871
+ },
872
+ "updated_at": {
873
+ "name": "updated_at",
874
+ "type": "text",
875
+ "primaryKey": false,
876
+ "notNull": true,
877
+ "autoincrement": false
878
+ }
879
+ },
880
+ "indexes": {
881
+ "publishers_github_id": {
882
+ "name": "publishers_github_id",
883
+ "columns": [
884
+ "github_id"
885
+ ],
886
+ "isUnique": true
887
+ }
888
+ },
889
+ "foreignKeys": {},
890
+ "compositePrimaryKeys": {},
891
+ "uniqueConstraints": {},
892
+ "checkConstraints": {}
893
+ },
894
+ "ratings": {
895
+ "name": "ratings",
896
+ "columns": {
897
+ "id": {
898
+ "name": "id",
899
+ "type": "text",
900
+ "primaryKey": true,
901
+ "notNull": true,
902
+ "autoincrement": false
903
+ },
904
+ "evaluation_id": {
905
+ "name": "evaluation_id",
906
+ "type": "text",
907
+ "primaryKey": false,
908
+ "notNull": true,
909
+ "autoincrement": false
910
+ },
911
+ "tenant_id": {
912
+ "name": "tenant_id",
913
+ "type": "text",
914
+ "primaryKey": false,
915
+ "notNull": false,
916
+ "autoincrement": false
917
+ },
918
+ "rubric_id": {
919
+ "name": "rubric_id",
920
+ "type": "text",
921
+ "primaryKey": false,
922
+ "notNull": false,
923
+ "autoincrement": false
924
+ },
925
+ "criterion_id": {
926
+ "name": "criterion_id",
927
+ "type": "text",
928
+ "primaryKey": false,
929
+ "notNull": true,
930
+ "autoincrement": false
931
+ },
932
+ "rater_id": {
933
+ "name": "rater_id",
934
+ "type": "text",
935
+ "primaryKey": false,
936
+ "notNull": true,
937
+ "autoincrement": false
938
+ },
939
+ "judge_type": {
940
+ "name": "judge_type",
941
+ "type": "text",
942
+ "primaryKey": false,
943
+ "notNull": true,
944
+ "autoincrement": false
945
+ },
946
+ "status": {
947
+ "name": "status",
948
+ "type": "text",
949
+ "primaryKey": false,
950
+ "notNull": true,
951
+ "autoincrement": false
952
+ },
953
+ "score": {
954
+ "name": "score",
955
+ "type": "real",
956
+ "primaryKey": false,
957
+ "notNull": false,
958
+ "autoincrement": false
959
+ },
960
+ "normalized": {
961
+ "name": "normalized",
962
+ "type": "real",
963
+ "primaryKey": false,
964
+ "notNull": false,
965
+ "autoincrement": false
966
+ },
967
+ "confidence": {
968
+ "name": "confidence",
969
+ "type": "real",
970
+ "primaryKey": false,
971
+ "notNull": false,
972
+ "autoincrement": false
973
+ },
974
+ "model": {
975
+ "name": "model",
976
+ "type": "text",
977
+ "primaryKey": false,
978
+ "notNull": false,
979
+ "autoincrement": false
980
+ },
981
+ "created_at": {
982
+ "name": "created_at",
983
+ "type": "text",
984
+ "primaryKey": false,
985
+ "notNull": true,
986
+ "autoincrement": false
987
+ }
988
+ },
989
+ "indexes": {
990
+ "ratings_evaluation": {
991
+ "name": "ratings_evaluation",
992
+ "columns": [
993
+ "evaluation_id"
994
+ ],
995
+ "isUnique": false
996
+ },
997
+ "ratings_rubric_criterion": {
998
+ "name": "ratings_rubric_criterion",
999
+ "columns": [
1000
+ "rubric_id",
1001
+ "criterion_id"
1002
+ ],
1003
+ "isUnique": false
1004
+ },
1005
+ "ratings_tenant_judge": {
1006
+ "name": "ratings_tenant_judge",
1007
+ "columns": [
1008
+ "tenant_id",
1009
+ "judge_type"
1010
+ ],
1011
+ "isUnique": false
1012
+ }
1013
+ },
1014
+ "foreignKeys": {},
1015
+ "compositePrimaryKeys": {},
1016
+ "uniqueConstraints": {},
1017
+ "checkConstraints": {}
1018
+ },
1019
+ "rubrics": {
1020
+ "name": "rubrics",
1021
+ "columns": {
1022
+ "id": {
1023
+ "name": "id",
1024
+ "type": "text",
1025
+ "primaryKey": true,
1026
+ "notNull": true,
1027
+ "autoincrement": false
1028
+ },
1029
+ "tenant_id": {
1030
+ "name": "tenant_id",
1031
+ "type": "text",
1032
+ "primaryKey": false,
1033
+ "notNull": false,
1034
+ "autoincrement": false
1035
+ },
1036
+ "name": {
1037
+ "name": "name",
1038
+ "type": "text",
1039
+ "primaryKey": false,
1040
+ "notNull": true,
1041
+ "autoincrement": false
1042
+ },
1043
+ "version": {
1044
+ "name": "version",
1045
+ "type": "text",
1046
+ "primaryKey": false,
1047
+ "notNull": true,
1048
+ "autoincrement": false,
1049
+ "default": "'1'"
1050
+ },
1051
+ "doc": {
1052
+ "name": "doc",
1053
+ "type": "text",
1054
+ "primaryKey": false,
1055
+ "notNull": true,
1056
+ "autoincrement": false
1057
+ },
1058
+ "created_at": {
1059
+ "name": "created_at",
1060
+ "type": "text",
1061
+ "primaryKey": false,
1062
+ "notNull": true,
1063
+ "autoincrement": false
1064
+ },
1065
+ "updated_at": {
1066
+ "name": "updated_at",
1067
+ "type": "text",
1068
+ "primaryKey": false,
1069
+ "notNull": true,
1070
+ "autoincrement": false
1071
+ }
1072
+ },
1073
+ "indexes": {
1074
+ "rubrics_tenant_created": {
1075
+ "name": "rubrics_tenant_created",
1076
+ "columns": [
1077
+ "tenant_id",
1078
+ "created_at"
1079
+ ],
1080
+ "isUnique": false
1081
+ }
1082
+ },
1083
+ "foreignKeys": {},
1084
+ "compositePrimaryKeys": {},
1085
+ "uniqueConstraints": {},
1086
+ "checkConstraints": {}
1087
+ },
1088
+ "run_reports": {
1089
+ "name": "run_reports",
1090
+ "columns": {
1091
+ "tenant_id": {
1092
+ "name": "tenant_id",
1093
+ "type": "text",
1094
+ "primaryKey": false,
1095
+ "notNull": true,
1096
+ "autoincrement": false
1097
+ },
1098
+ "project": {
1099
+ "name": "project",
1100
+ "type": "text",
1101
+ "primaryKey": false,
1102
+ "notNull": true,
1103
+ "autoincrement": false
1104
+ },
1105
+ "run_id": {
1106
+ "name": "run_id",
1107
+ "type": "text",
1108
+ "primaryKey": false,
1109
+ "notNull": true,
1110
+ "autoincrement": false
1111
+ },
1112
+ "rubric_name": {
1113
+ "name": "rubric_name",
1114
+ "type": "text",
1115
+ "primaryKey": false,
1116
+ "notNull": true,
1117
+ "autoincrement": false
1118
+ },
1119
+ "version_id": {
1120
+ "name": "version_id",
1121
+ "type": "text",
1122
+ "primaryKey": false,
1123
+ "notNull": true,
1124
+ "autoincrement": false
1125
+ },
1126
+ "dataset_name": {
1127
+ "name": "dataset_name",
1128
+ "type": "text",
1129
+ "primaryKey": false,
1130
+ "notNull": false,
1131
+ "autoincrement": false
1132
+ },
1133
+ "started_at": {
1134
+ "name": "started_at",
1135
+ "type": "text",
1136
+ "primaryKey": false,
1137
+ "notNull": true,
1138
+ "autoincrement": false
1139
+ },
1140
+ "doc": {
1141
+ "name": "doc",
1142
+ "type": "text",
1143
+ "primaryKey": false,
1144
+ "notNull": true,
1145
+ "autoincrement": false
1146
+ },
1147
+ "reported_at": {
1148
+ "name": "reported_at",
1149
+ "type": "text",
1150
+ "primaryKey": false,
1151
+ "notNull": true,
1152
+ "autoincrement": false
1153
+ }
1154
+ },
1155
+ "indexes": {
1156
+ "run_reports_started": {
1157
+ "name": "run_reports_started",
1158
+ "columns": [
1159
+ "tenant_id",
1160
+ "project",
1161
+ "started_at"
1162
+ ],
1163
+ "isUnique": false
1164
+ }
1165
+ },
1166
+ "foreignKeys": {},
1167
+ "compositePrimaryKeys": {
1168
+ "run_reports_tenant_id_project_run_id_pk": {
1169
+ "columns": [
1170
+ "tenant_id",
1171
+ "project",
1172
+ "run_id"
1173
+ ],
1174
+ "name": "run_reports_tenant_id_project_run_id_pk"
1175
+ }
1176
+ },
1177
+ "uniqueConstraints": {},
1178
+ "checkConstraints": {}
1179
+ }
1180
+ },
1181
+ "views": {},
1182
+ "enums": {},
1183
+ "_meta": {
1184
+ "schemas": {},
1185
+ "tables": {},
1186
+ "columns": {}
1187
+ },
1188
+ "internal": {
1189
+ "indexes": {}
1190
+ }
1191
+ }