@ixo/decision-oracle 0.2.17 → 0.2.19

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 (48) hide show
  1. package/README.md +1 -1
  2. package/dist/cron/collection.d.ts +14 -1
  3. package/dist/cron/collection.d.ts.map +1 -1
  4. package/dist/cron/collection.js +62 -15
  5. package/dist/cron/collection.js.map +1 -1
  6. package/dist/cron/feed.d.ts +49 -0
  7. package/dist/cron/feed.d.ts.map +1 -0
  8. package/dist/cron/feed.js +170 -0
  9. package/dist/cron/feed.js.map +1 -0
  10. package/dist/cron/scan.d.ts.map +1 -1
  11. package/dist/cron/scan.js +24 -3
  12. package/dist/cron/scan.js.map +1 -1
  13. package/dist/db/schema.d.ts +68 -0
  14. package/dist/db/schema.d.ts.map +1 -1
  15. package/dist/db/schema.js +18 -0
  16. package/dist/db/schema.js.map +1 -1
  17. package/dist/lib/ixo/blocksync/index.d.ts +12 -2
  18. package/dist/lib/ixo/blocksync/index.d.ts.map +1 -1
  19. package/dist/lib/ixo/blocksync/index.js +17 -2
  20. package/dist/lib/ixo/blocksync/index.js.map +1 -1
  21. package/dist/lib/ixo/blocksync/queries.d.ts +2 -1
  22. package/dist/lib/ixo/blocksync/queries.d.ts.map +1 -1
  23. package/dist/lib/ixo/blocksync/queries.js +17 -1
  24. package/dist/lib/ixo/blocksync/queries.js.map +1 -1
  25. package/dist/lib/ixo/blocksync/types.d.ts +10 -0
  26. package/dist/lib/ixo/blocksync/types.d.ts.map +1 -1
  27. package/dist/lib/ixo/blocksync/types.js +5 -0
  28. package/dist/lib/ixo/blocksync/types.js.map +1 -1
  29. package/dist/lib/ixo/chain-write.d.ts.map +1 -1
  30. package/dist/lib/ixo/chain-write.js +5 -1
  31. package/dist/lib/ixo/chain-write.js.map +1 -1
  32. package/dist/lib/openhands/backstop.d.ts +14 -5
  33. package/dist/lib/openhands/backstop.d.ts.map +1 -1
  34. package/dist/lib/openhands/backstop.js +22 -10
  35. package/dist/lib/openhands/backstop.js.map +1 -1
  36. package/dist/routes/v1/shared.d.ts +18 -0
  37. package/dist/routes/v1/shared.d.ts.map +1 -1
  38. package/dist/workflows/claim-ingest.d.ts.map +1 -1
  39. package/dist/workflows/claim-ingest.js +21 -6
  40. package/dist/workflows/claim-ingest.js.map +1 -1
  41. package/docs/api.md +22 -6
  42. package/docs/guide.md +11 -2
  43. package/migrations/0027_cron_state.sql +4 -0
  44. package/migrations/0028_next_scan_at.sql +1 -0
  45. package/migrations/meta/0027_snapshot.json +3007 -0
  46. package/migrations/meta/0028_snapshot.json +3014 -0
  47. package/migrations/meta/_journal.json +14 -0
  48. package/package.json +1 -1
@@ -0,0 +1,3014 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "190fc99e-3b13-4a6e-84af-e8870a681454",
5
+ "prevId": "0b353fd3-2c5c-4eee-af21-559bfd86de3f",
6
+ "tables": {
7
+ "ai_calls": {
8
+ "name": "ai_calls",
9
+ "columns": {
10
+ "call_id": {
11
+ "name": "call_id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "claim_id": {
18
+ "name": "claim_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "fact": {
25
+ "name": "fact",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "model": {
32
+ "name": "model",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "prompt_tokens": {
39
+ "name": "prompt_tokens",
40
+ "type": "integer",
41
+ "primaryKey": false,
42
+ "notNull": false,
43
+ "autoincrement": false
44
+ },
45
+ "completion_tokens": {
46
+ "name": "completion_tokens",
47
+ "type": "integer",
48
+ "primaryKey": false,
49
+ "notNull": false,
50
+ "autoincrement": false
51
+ },
52
+ "cached_tokens": {
53
+ "name": "cached_tokens",
54
+ "type": "integer",
55
+ "primaryKey": false,
56
+ "notNull": false,
57
+ "autoincrement": false
58
+ },
59
+ "cost_micro_usd": {
60
+ "name": "cost_micro_usd",
61
+ "type": "integer",
62
+ "primaryKey": false,
63
+ "notNull": false,
64
+ "autoincrement": false
65
+ },
66
+ "cost_status": {
67
+ "name": "cost_status",
68
+ "type": "text",
69
+ "primaryKey": false,
70
+ "notNull": true,
71
+ "autoincrement": false,
72
+ "default": "'pending'"
73
+ },
74
+ "created_at": {
75
+ "name": "created_at",
76
+ "type": "integer",
77
+ "primaryKey": false,
78
+ "notNull": true,
79
+ "autoincrement": false
80
+ },
81
+ "cost_at": {
82
+ "name": "cost_at",
83
+ "type": "integer",
84
+ "primaryKey": false,
85
+ "notNull": false,
86
+ "autoincrement": false
87
+ }
88
+ },
89
+ "indexes": {
90
+ "ai_calls_pending_idx": {
91
+ "name": "ai_calls_pending_idx",
92
+ "columns": [
93
+ "cost_status",
94
+ "created_at"
95
+ ],
96
+ "isUnique": false
97
+ },
98
+ "ai_calls_claim_idx": {
99
+ "name": "ai_calls_claim_idx",
100
+ "columns": [
101
+ "claim_id"
102
+ ],
103
+ "isUnique": false
104
+ }
105
+ },
106
+ "foreignKeys": {},
107
+ "compositePrimaryKeys": {},
108
+ "uniqueConstraints": {},
109
+ "checkConstraints": {}
110
+ },
111
+ "api_audit": {
112
+ "name": "api_audit",
113
+ "columns": {
114
+ "audit_id": {
115
+ "name": "audit_id",
116
+ "type": "text",
117
+ "primaryKey": true,
118
+ "notNull": true,
119
+ "autoincrement": false
120
+ },
121
+ "source_id": {
122
+ "name": "source_id",
123
+ "type": "text",
124
+ "primaryKey": false,
125
+ "notNull": false,
126
+ "autoincrement": false
127
+ },
128
+ "actor": {
129
+ "name": "actor",
130
+ "type": "text",
131
+ "primaryKey": false,
132
+ "notNull": true,
133
+ "autoincrement": false
134
+ },
135
+ "actor_kind": {
136
+ "name": "actor_kind",
137
+ "type": "text",
138
+ "primaryKey": false,
139
+ "notNull": true,
140
+ "autoincrement": false
141
+ },
142
+ "client_id": {
143
+ "name": "client_id",
144
+ "type": "text",
145
+ "primaryKey": false,
146
+ "notNull": false,
147
+ "autoincrement": false
148
+ },
149
+ "client_name": {
150
+ "name": "client_name",
151
+ "type": "text",
152
+ "primaryKey": false,
153
+ "notNull": false,
154
+ "autoincrement": false
155
+ },
156
+ "action": {
157
+ "name": "action",
158
+ "type": "text",
159
+ "primaryKey": false,
160
+ "notNull": true,
161
+ "autoincrement": false
162
+ },
163
+ "target": {
164
+ "name": "target",
165
+ "type": "text",
166
+ "primaryKey": false,
167
+ "notNull": false,
168
+ "autoincrement": false
169
+ },
170
+ "details": {
171
+ "name": "details",
172
+ "type": "text",
173
+ "primaryKey": false,
174
+ "notNull": false,
175
+ "autoincrement": false
176
+ },
177
+ "request_id": {
178
+ "name": "request_id",
179
+ "type": "text",
180
+ "primaryKey": false,
181
+ "notNull": false,
182
+ "autoincrement": false
183
+ },
184
+ "created_at": {
185
+ "name": "created_at",
186
+ "type": "integer",
187
+ "primaryKey": false,
188
+ "notNull": true,
189
+ "autoincrement": false
190
+ }
191
+ },
192
+ "indexes": {
193
+ "api_audit_source_created_idx": {
194
+ "name": "api_audit_source_created_idx",
195
+ "columns": [
196
+ "source_id",
197
+ "created_at"
198
+ ],
199
+ "isUnique": false
200
+ },
201
+ "api_audit_created_idx": {
202
+ "name": "api_audit_created_idx",
203
+ "columns": [
204
+ "created_at"
205
+ ],
206
+ "isUnique": false
207
+ }
208
+ },
209
+ "foreignKeys": {},
210
+ "compositePrimaryKeys": {},
211
+ "uniqueConstraints": {},
212
+ "checkConstraints": {}
213
+ },
214
+ "api_charges": {
215
+ "name": "api_charges",
216
+ "columns": {
217
+ "claim_id": {
218
+ "name": "claim_id",
219
+ "type": "text",
220
+ "primaryKey": true,
221
+ "notNull": true,
222
+ "autoincrement": false
223
+ },
224
+ "source_id": {
225
+ "name": "source_id",
226
+ "type": "text",
227
+ "primaryKey": false,
228
+ "notNull": true,
229
+ "autoincrement": false
230
+ },
231
+ "settlement_id": {
232
+ "name": "settlement_id",
233
+ "type": "text",
234
+ "primaryKey": false,
235
+ "notNull": false,
236
+ "autoincrement": false
237
+ },
238
+ "amount": {
239
+ "name": "amount",
240
+ "type": "text",
241
+ "primaryKey": false,
242
+ "notNull": true,
243
+ "autoincrement": false
244
+ },
245
+ "asset": {
246
+ "name": "asset",
247
+ "type": "text",
248
+ "primaryKey": false,
249
+ "notNull": true,
250
+ "autoincrement": false,
251
+ "default": "'upay'"
252
+ },
253
+ "offer_id": {
254
+ "name": "offer_id",
255
+ "type": "text",
256
+ "primaryKey": false,
257
+ "notNull": false,
258
+ "autoincrement": false
259
+ },
260
+ "payer_did": {
261
+ "name": "payer_did",
262
+ "type": "text",
263
+ "primaryKey": false,
264
+ "notNull": false,
265
+ "autoincrement": false
266
+ },
267
+ "key_prefix": {
268
+ "name": "key_prefix",
269
+ "type": "text",
270
+ "primaryKey": false,
271
+ "notNull": false,
272
+ "autoincrement": false
273
+ },
274
+ "via": {
275
+ "name": "via",
276
+ "type": "text",
277
+ "primaryKey": false,
278
+ "notNull": false,
279
+ "autoincrement": false
280
+ },
281
+ "amount_cents": {
282
+ "name": "amount_cents",
283
+ "type": "integer",
284
+ "primaryKey": false,
285
+ "notNull": true,
286
+ "autoincrement": false
287
+ },
288
+ "status": {
289
+ "name": "status",
290
+ "type": "text",
291
+ "primaryKey": false,
292
+ "notNull": true,
293
+ "autoincrement": false,
294
+ "default": "'reserved'"
295
+ },
296
+ "tx_hash": {
297
+ "name": "tx_hash",
298
+ "type": "text",
299
+ "primaryKey": false,
300
+ "notNull": false,
301
+ "autoincrement": false
302
+ },
303
+ "settle_result": {
304
+ "name": "settle_result",
305
+ "type": "text",
306
+ "primaryKey": false,
307
+ "notNull": false,
308
+ "autoincrement": false
309
+ },
310
+ "payment_header": {
311
+ "name": "payment_header",
312
+ "type": "text",
313
+ "primaryKey": false,
314
+ "notNull": false,
315
+ "autoincrement": false
316
+ },
317
+ "scheme": {
318
+ "name": "scheme",
319
+ "type": "text",
320
+ "primaryKey": false,
321
+ "notNull": false,
322
+ "autoincrement": false
323
+ },
324
+ "lane": {
325
+ "name": "lane",
326
+ "type": "text",
327
+ "primaryKey": false,
328
+ "notNull": false,
329
+ "autoincrement": false
330
+ },
331
+ "collection_id": {
332
+ "name": "collection_id",
333
+ "type": "text",
334
+ "primaryKey": false,
335
+ "notNull": false,
336
+ "autoincrement": false
337
+ },
338
+ "reservation_expires_at": {
339
+ "name": "reservation_expires_at",
340
+ "type": "integer",
341
+ "primaryKey": false,
342
+ "notNull": false,
343
+ "autoincrement": false
344
+ },
345
+ "refunded_at": {
346
+ "name": "refunded_at",
347
+ "type": "integer",
348
+ "primaryKey": false,
349
+ "notNull": false,
350
+ "autoincrement": false
351
+ },
352
+ "refund_id": {
353
+ "name": "refund_id",
354
+ "type": "text",
355
+ "primaryKey": false,
356
+ "notNull": false,
357
+ "autoincrement": false
358
+ },
359
+ "refunded_amount_cents": {
360
+ "name": "refunded_amount_cents",
361
+ "type": "integer",
362
+ "primaryKey": false,
363
+ "notNull": false,
364
+ "autoincrement": false
365
+ },
366
+ "refund_checked_at": {
367
+ "name": "refund_checked_at",
368
+ "type": "integer",
369
+ "primaryKey": false,
370
+ "notNull": false,
371
+ "autoincrement": false
372
+ },
373
+ "error": {
374
+ "name": "error",
375
+ "type": "text",
376
+ "primaryKey": false,
377
+ "notNull": false,
378
+ "autoincrement": false
379
+ },
380
+ "created_at": {
381
+ "name": "created_at",
382
+ "type": "integer",
383
+ "primaryKey": false,
384
+ "notNull": true,
385
+ "autoincrement": false
386
+ },
387
+ "updated_at": {
388
+ "name": "updated_at",
389
+ "type": "integer",
390
+ "primaryKey": false,
391
+ "notNull": true,
392
+ "autoincrement": false
393
+ }
394
+ },
395
+ "indexes": {
396
+ "api_charges_settlement_idx": {
397
+ "name": "api_charges_settlement_idx",
398
+ "columns": [
399
+ "settlement_id"
400
+ ],
401
+ "isUnique": false
402
+ },
403
+ "api_charges_status_updated_idx": {
404
+ "name": "api_charges_status_updated_idx",
405
+ "columns": [
406
+ "status",
407
+ "updated_at"
408
+ ],
409
+ "isUnique": false
410
+ },
411
+ "api_charges_source_created_idx": {
412
+ "name": "api_charges_source_created_idx",
413
+ "columns": [
414
+ "source_id",
415
+ "created_at"
416
+ ],
417
+ "isUnique": false
418
+ },
419
+ "api_charges_key_created_idx": {
420
+ "name": "api_charges_key_created_idx",
421
+ "columns": [
422
+ "key_prefix",
423
+ "created_at"
424
+ ],
425
+ "isUnique": false
426
+ },
427
+ "api_charges_via_created_idx": {
428
+ "name": "api_charges_via_created_idx",
429
+ "columns": [
430
+ "via",
431
+ "created_at"
432
+ ],
433
+ "isUnique": false
434
+ },
435
+ "api_charges_created_idx": {
436
+ "name": "api_charges_created_idx",
437
+ "columns": [
438
+ "created_at"
439
+ ],
440
+ "isUnique": false
441
+ }
442
+ },
443
+ "foreignKeys": {},
444
+ "compositePrimaryKeys": {},
445
+ "uniqueConstraints": {},
446
+ "checkConstraints": {}
447
+ },
448
+ "api_claims": {
449
+ "name": "api_claims",
450
+ "columns": {
451
+ "claim_id": {
452
+ "name": "claim_id",
453
+ "type": "text",
454
+ "primaryKey": true,
455
+ "notNull": true,
456
+ "autoincrement": false
457
+ },
458
+ "source_id": {
459
+ "name": "source_id",
460
+ "type": "text",
461
+ "primaryKey": false,
462
+ "notNull": true,
463
+ "autoincrement": false
464
+ },
465
+ "protocol_did": {
466
+ "name": "protocol_did",
467
+ "type": "text",
468
+ "primaryKey": false,
469
+ "notNull": true,
470
+ "autoincrement": false
471
+ },
472
+ "body": {
473
+ "name": "body",
474
+ "type": "text",
475
+ "primaryKey": false,
476
+ "notNull": false,
477
+ "autoincrement": false
478
+ },
479
+ "body_digest": {
480
+ "name": "body_digest",
481
+ "type": "text",
482
+ "primaryKey": false,
483
+ "notNull": true,
484
+ "autoincrement": false
485
+ },
486
+ "attachments": {
487
+ "name": "attachments",
488
+ "type": "text",
489
+ "primaryKey": false,
490
+ "notNull": false,
491
+ "autoincrement": false
492
+ },
493
+ "submitter": {
494
+ "name": "submitter",
495
+ "type": "text",
496
+ "primaryKey": false,
497
+ "notNull": false,
498
+ "autoincrement": false
499
+ },
500
+ "submitter_digest": {
501
+ "name": "submitter_digest",
502
+ "type": "text",
503
+ "primaryKey": false,
504
+ "notNull": false,
505
+ "autoincrement": false
506
+ },
507
+ "metadata": {
508
+ "name": "metadata",
509
+ "type": "text",
510
+ "primaryKey": false,
511
+ "notNull": false,
512
+ "autoincrement": false
513
+ },
514
+ "idempotency_key": {
515
+ "name": "idempotency_key",
516
+ "type": "text",
517
+ "primaryKey": false,
518
+ "notNull": false,
519
+ "autoincrement": false
520
+ },
521
+ "request_digest": {
522
+ "name": "request_digest",
523
+ "type": "text",
524
+ "primaryKey": false,
525
+ "notNull": false,
526
+ "autoincrement": false
527
+ },
528
+ "webhook_url": {
529
+ "name": "webhook_url",
530
+ "type": "text",
531
+ "primaryKey": false,
532
+ "notNull": false,
533
+ "autoincrement": false
534
+ },
535
+ "via": {
536
+ "name": "via",
537
+ "type": "text",
538
+ "primaryKey": false,
539
+ "notNull": false,
540
+ "autoincrement": false
541
+ },
542
+ "payment": {
543
+ "name": "payment",
544
+ "type": "text",
545
+ "primaryKey": false,
546
+ "notNull": false,
547
+ "autoincrement": false
548
+ },
549
+ "received_at": {
550
+ "name": "received_at",
551
+ "type": "integer",
552
+ "primaryKey": false,
553
+ "notNull": true,
554
+ "autoincrement": false
555
+ },
556
+ "body_erased_at": {
557
+ "name": "body_erased_at",
558
+ "type": "integer",
559
+ "primaryKey": false,
560
+ "notNull": false,
561
+ "autoincrement": false
562
+ },
563
+ "content_digest": {
564
+ "name": "content_digest",
565
+ "type": "text",
566
+ "primaryKey": false,
567
+ "notNull": false,
568
+ "autoincrement": false
569
+ },
570
+ "content": {
571
+ "name": "content",
572
+ "type": "text",
573
+ "primaryKey": false,
574
+ "notNull": false,
575
+ "autoincrement": false
576
+ },
577
+ "submitted_by": {
578
+ "name": "submitted_by",
579
+ "type": "text",
580
+ "primaryKey": false,
581
+ "notNull": false,
582
+ "autoincrement": false
583
+ },
584
+ "submitted_via": {
585
+ "name": "submitted_via",
586
+ "type": "text",
587
+ "primaryKey": false,
588
+ "notNull": false,
589
+ "autoincrement": false
590
+ },
591
+ "submitted_via_verified": {
592
+ "name": "submitted_via_verified",
593
+ "type": "integer",
594
+ "primaryKey": false,
595
+ "notNull": false,
596
+ "autoincrement": false
597
+ }
598
+ },
599
+ "indexes": {
600
+ "api_claims_source_received_idx": {
601
+ "name": "api_claims_source_received_idx",
602
+ "columns": [
603
+ "source_id",
604
+ "received_at",
605
+ "claim_id"
606
+ ],
607
+ "isUnique": false
608
+ },
609
+ "api_claims_frequency_idx": {
610
+ "name": "api_claims_frequency_idx",
611
+ "columns": [
612
+ "source_id",
613
+ "protocol_did",
614
+ "submitter_digest",
615
+ "received_at"
616
+ ],
617
+ "isUnique": false
618
+ }
619
+ },
620
+ "foreignKeys": {},
621
+ "compositePrimaryKeys": {},
622
+ "uniqueConstraints": {},
623
+ "checkConstraints": {}
624
+ },
625
+ "api_events": {
626
+ "name": "api_events",
627
+ "columns": {
628
+ "event_id": {
629
+ "name": "event_id",
630
+ "type": "text",
631
+ "primaryKey": true,
632
+ "notNull": true,
633
+ "autoincrement": false
634
+ },
635
+ "source_id": {
636
+ "name": "source_id",
637
+ "type": "text",
638
+ "primaryKey": false,
639
+ "notNull": true,
640
+ "autoincrement": false
641
+ },
642
+ "claim_id": {
643
+ "name": "claim_id",
644
+ "type": "text",
645
+ "primaryKey": false,
646
+ "notNull": false,
647
+ "autoincrement": false
648
+ },
649
+ "type": {
650
+ "name": "type",
651
+ "type": "text",
652
+ "primaryKey": false,
653
+ "notNull": true,
654
+ "autoincrement": false
655
+ },
656
+ "data": {
657
+ "name": "data",
658
+ "type": "text",
659
+ "primaryKey": false,
660
+ "notNull": false,
661
+ "autoincrement": false
662
+ },
663
+ "created_at": {
664
+ "name": "created_at",
665
+ "type": "integer",
666
+ "primaryKey": false,
667
+ "notNull": true,
668
+ "autoincrement": false
669
+ }
670
+ },
671
+ "indexes": {
672
+ "api_events_claim_idx": {
673
+ "name": "api_events_claim_idx",
674
+ "columns": [
675
+ "claim_id",
676
+ "event_id"
677
+ ],
678
+ "isUnique": false
679
+ },
680
+ "api_events_source_created_idx": {
681
+ "name": "api_events_source_created_idx",
682
+ "columns": [
683
+ "source_id",
684
+ "created_at"
685
+ ],
686
+ "isUnique": false
687
+ },
688
+ "api_events_created_idx": {
689
+ "name": "api_events_created_idx",
690
+ "columns": [
691
+ "created_at"
692
+ ],
693
+ "isUnique": false
694
+ }
695
+ },
696
+ "foreignKeys": {},
697
+ "compositePrimaryKeys": {},
698
+ "uniqueConstraints": {},
699
+ "checkConstraints": {}
700
+ },
701
+ "api_idempotency": {
702
+ "name": "api_idempotency",
703
+ "columns": {
704
+ "source_id": {
705
+ "name": "source_id",
706
+ "type": "text",
707
+ "primaryKey": false,
708
+ "notNull": true,
709
+ "autoincrement": false
710
+ },
711
+ "idempotency_key": {
712
+ "name": "idempotency_key",
713
+ "type": "text",
714
+ "primaryKey": false,
715
+ "notNull": true,
716
+ "autoincrement": false
717
+ },
718
+ "request_digest": {
719
+ "name": "request_digest",
720
+ "type": "text",
721
+ "primaryKey": false,
722
+ "notNull": true,
723
+ "autoincrement": false
724
+ },
725
+ "status": {
726
+ "name": "status",
727
+ "type": "text",
728
+ "primaryKey": false,
729
+ "notNull": true,
730
+ "autoincrement": false,
731
+ "default": "'in_flight'"
732
+ },
733
+ "response_status": {
734
+ "name": "response_status",
735
+ "type": "integer",
736
+ "primaryKey": false,
737
+ "notNull": false,
738
+ "autoincrement": false
739
+ },
740
+ "response_body": {
741
+ "name": "response_body",
742
+ "type": "text",
743
+ "primaryKey": false,
744
+ "notNull": false,
745
+ "autoincrement": false
746
+ },
747
+ "created_at": {
748
+ "name": "created_at",
749
+ "type": "integer",
750
+ "primaryKey": false,
751
+ "notNull": true,
752
+ "autoincrement": false
753
+ },
754
+ "expires_at": {
755
+ "name": "expires_at",
756
+ "type": "integer",
757
+ "primaryKey": false,
758
+ "notNull": true,
759
+ "autoincrement": false
760
+ }
761
+ },
762
+ "indexes": {
763
+ "api_idempotency_expires_idx": {
764
+ "name": "api_idempotency_expires_idx",
765
+ "columns": [
766
+ "expires_at"
767
+ ],
768
+ "isUnique": false
769
+ }
770
+ },
771
+ "foreignKeys": {},
772
+ "compositePrimaryKeys": {
773
+ "api_idempotency_source_id_idempotency_key_pk": {
774
+ "columns": [
775
+ "source_id",
776
+ "idempotency_key"
777
+ ],
778
+ "name": "api_idempotency_source_id_idempotency_key_pk"
779
+ }
780
+ },
781
+ "uniqueConstraints": {},
782
+ "checkConstraints": {}
783
+ },
784
+ "api_keys": {
785
+ "name": "api_keys",
786
+ "columns": {
787
+ "prefix": {
788
+ "name": "prefix",
789
+ "type": "text",
790
+ "primaryKey": true,
791
+ "notNull": true,
792
+ "autoincrement": false
793
+ },
794
+ "key_hash": {
795
+ "name": "key_hash",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": true,
799
+ "autoincrement": false
800
+ },
801
+ "source_id": {
802
+ "name": "source_id",
803
+ "type": "text",
804
+ "primaryKey": false,
805
+ "notNull": true,
806
+ "autoincrement": false
807
+ },
808
+ "name": {
809
+ "name": "name",
810
+ "type": "text",
811
+ "primaryKey": false,
812
+ "notNull": false,
813
+ "autoincrement": false
814
+ },
815
+ "environment": {
816
+ "name": "environment",
817
+ "type": "text",
818
+ "primaryKey": false,
819
+ "notNull": true,
820
+ "autoincrement": false
821
+ },
822
+ "scopes": {
823
+ "name": "scopes",
824
+ "type": "text",
825
+ "primaryKey": false,
826
+ "notNull": true,
827
+ "autoincrement": false
828
+ },
829
+ "max_spend_cents_per_day": {
830
+ "name": "max_spend_cents_per_day",
831
+ "type": "integer",
832
+ "primaryKey": false,
833
+ "notNull": false,
834
+ "autoincrement": false
835
+ },
836
+ "created_by": {
837
+ "name": "created_by",
838
+ "type": "text",
839
+ "primaryKey": false,
840
+ "notNull": false,
841
+ "autoincrement": false
842
+ },
843
+ "last_used_at": {
844
+ "name": "last_used_at",
845
+ "type": "integer",
846
+ "primaryKey": false,
847
+ "notNull": false,
848
+ "autoincrement": false
849
+ },
850
+ "revoked_at": {
851
+ "name": "revoked_at",
852
+ "type": "integer",
853
+ "primaryKey": false,
854
+ "notNull": false,
855
+ "autoincrement": false
856
+ },
857
+ "created_at": {
858
+ "name": "created_at",
859
+ "type": "integer",
860
+ "primaryKey": false,
861
+ "notNull": true,
862
+ "autoincrement": false
863
+ }
864
+ },
865
+ "indexes": {
866
+ "api_keys_source_idx": {
867
+ "name": "api_keys_source_idx",
868
+ "columns": [
869
+ "source_id"
870
+ ],
871
+ "isUnique": false
872
+ }
873
+ },
874
+ "foreignKeys": {},
875
+ "compositePrimaryKeys": {},
876
+ "uniqueConstraints": {},
877
+ "checkConstraints": {}
878
+ },
879
+ "api_members": {
880
+ "name": "api_members",
881
+ "columns": {
882
+ "member_id": {
883
+ "name": "member_id",
884
+ "type": "text",
885
+ "primaryKey": true,
886
+ "notNull": true,
887
+ "autoincrement": false
888
+ },
889
+ "source_id": {
890
+ "name": "source_id",
891
+ "type": "text",
892
+ "primaryKey": false,
893
+ "notNull": true,
894
+ "autoincrement": false
895
+ },
896
+ "did": {
897
+ "name": "did",
898
+ "type": "text",
899
+ "primaryKey": false,
900
+ "notNull": false,
901
+ "autoincrement": false
902
+ },
903
+ "email": {
904
+ "name": "email",
905
+ "type": "text",
906
+ "primaryKey": false,
907
+ "notNull": false,
908
+ "autoincrement": false
909
+ },
910
+ "role": {
911
+ "name": "role",
912
+ "type": "text",
913
+ "primaryKey": false,
914
+ "notNull": true,
915
+ "autoincrement": false
916
+ },
917
+ "delegation": {
918
+ "name": "delegation",
919
+ "type": "text",
920
+ "primaryKey": false,
921
+ "notNull": false,
922
+ "autoincrement": false
923
+ },
924
+ "delegation_cid": {
925
+ "name": "delegation_cid",
926
+ "type": "text",
927
+ "primaryKey": false,
928
+ "notNull": false,
929
+ "autoincrement": false
930
+ },
931
+ "nb_protocols": {
932
+ "name": "nb_protocols",
933
+ "type": "text",
934
+ "primaryKey": false,
935
+ "notNull": false,
936
+ "autoincrement": false
937
+ },
938
+ "expires_at": {
939
+ "name": "expires_at",
940
+ "type": "integer",
941
+ "primaryKey": false,
942
+ "notNull": false,
943
+ "autoincrement": false
944
+ },
945
+ "revoked_at": {
946
+ "name": "revoked_at",
947
+ "type": "integer",
948
+ "primaryKey": false,
949
+ "notNull": false,
950
+ "autoincrement": false
951
+ },
952
+ "invite_token_hash": {
953
+ "name": "invite_token_hash",
954
+ "type": "text",
955
+ "primaryKey": false,
956
+ "notNull": false,
957
+ "autoincrement": false
958
+ },
959
+ "invite_expires_at": {
960
+ "name": "invite_expires_at",
961
+ "type": "integer",
962
+ "primaryKey": false,
963
+ "notNull": false,
964
+ "autoincrement": false
965
+ },
966
+ "reviewer_did": {
967
+ "name": "reviewer_did",
968
+ "type": "text",
969
+ "primaryKey": false,
970
+ "notNull": false,
971
+ "autoincrement": false
972
+ },
973
+ "reviewer_delegation": {
974
+ "name": "reviewer_delegation",
975
+ "type": "text",
976
+ "primaryKey": false,
977
+ "notNull": false,
978
+ "autoincrement": false
979
+ },
980
+ "reviewer_delegation_expires_at": {
981
+ "name": "reviewer_delegation_expires_at",
982
+ "type": "integer",
983
+ "primaryKey": false,
984
+ "notNull": false,
985
+ "autoincrement": false
986
+ },
987
+ "notify_reviews": {
988
+ "name": "notify_reviews",
989
+ "type": "integer",
990
+ "primaryKey": false,
991
+ "notNull": true,
992
+ "autoincrement": false,
993
+ "default": true
994
+ },
995
+ "review_email_at": {
996
+ "name": "review_email_at",
997
+ "type": "integer",
998
+ "primaryKey": false,
999
+ "notNull": false,
1000
+ "autoincrement": false
1001
+ },
1002
+ "invited_by": {
1003
+ "name": "invited_by",
1004
+ "type": "text",
1005
+ "primaryKey": false,
1006
+ "notNull": false,
1007
+ "autoincrement": false
1008
+ },
1009
+ "invited_at": {
1010
+ "name": "invited_at",
1011
+ "type": "integer",
1012
+ "primaryKey": false,
1013
+ "notNull": true,
1014
+ "autoincrement": false
1015
+ },
1016
+ "accepted_at": {
1017
+ "name": "accepted_at",
1018
+ "type": "integer",
1019
+ "primaryKey": false,
1020
+ "notNull": false,
1021
+ "autoincrement": false
1022
+ }
1023
+ },
1024
+ "indexes": {
1025
+ "api_members_source_did_idx": {
1026
+ "name": "api_members_source_did_idx",
1027
+ "columns": [
1028
+ "source_id",
1029
+ "did"
1030
+ ],
1031
+ "isUnique": true
1032
+ },
1033
+ "api_members_did_idx": {
1034
+ "name": "api_members_did_idx",
1035
+ "columns": [
1036
+ "did"
1037
+ ],
1038
+ "isUnique": false
1039
+ },
1040
+ "api_members_source_reviewer_idx": {
1041
+ "name": "api_members_source_reviewer_idx",
1042
+ "columns": [
1043
+ "source_id",
1044
+ "reviewer_did"
1045
+ ],
1046
+ "isUnique": true
1047
+ },
1048
+ "api_members_invite_token_idx": {
1049
+ "name": "api_members_invite_token_idx",
1050
+ "columns": [
1051
+ "invite_token_hash"
1052
+ ],
1053
+ "isUnique": true
1054
+ }
1055
+ },
1056
+ "foreignKeys": {},
1057
+ "compositePrimaryKeys": {},
1058
+ "uniqueConstraints": {},
1059
+ "checkConstraints": {}
1060
+ },
1061
+ "api_revocations": {
1062
+ "name": "api_revocations",
1063
+ "columns": {
1064
+ "source_id": {
1065
+ "name": "source_id",
1066
+ "type": "text",
1067
+ "primaryKey": false,
1068
+ "notNull": true,
1069
+ "autoincrement": false
1070
+ },
1071
+ "cid": {
1072
+ "name": "cid",
1073
+ "type": "text",
1074
+ "primaryKey": false,
1075
+ "notNull": true,
1076
+ "autoincrement": false
1077
+ },
1078
+ "revoked_by": {
1079
+ "name": "revoked_by",
1080
+ "type": "text",
1081
+ "primaryKey": false,
1082
+ "notNull": false,
1083
+ "autoincrement": false
1084
+ },
1085
+ "revoked_at": {
1086
+ "name": "revoked_at",
1087
+ "type": "integer",
1088
+ "primaryKey": false,
1089
+ "notNull": true,
1090
+ "autoincrement": false
1091
+ }
1092
+ },
1093
+ "indexes": {},
1094
+ "foreignKeys": {},
1095
+ "compositePrimaryKeys": {
1096
+ "api_revocations_source_id_cid_pk": {
1097
+ "columns": [
1098
+ "source_id",
1099
+ "cid"
1100
+ ],
1101
+ "name": "api_revocations_source_id_cid_pk"
1102
+ }
1103
+ },
1104
+ "uniqueConstraints": {},
1105
+ "checkConstraints": {}
1106
+ },
1107
+ "api_source_collections": {
1108
+ "name": "api_source_collections",
1109
+ "columns": {
1110
+ "source_id": {
1111
+ "name": "source_id",
1112
+ "type": "text",
1113
+ "primaryKey": false,
1114
+ "notNull": true,
1115
+ "autoincrement": false
1116
+ },
1117
+ "collection_id": {
1118
+ "name": "collection_id",
1119
+ "type": "text",
1120
+ "primaryKey": false,
1121
+ "notNull": true,
1122
+ "autoincrement": false
1123
+ },
1124
+ "protocol_did": {
1125
+ "name": "protocol_did",
1126
+ "type": "text",
1127
+ "primaryKey": false,
1128
+ "notNull": true,
1129
+ "autoincrement": false
1130
+ },
1131
+ "linked_by": {
1132
+ "name": "linked_by",
1133
+ "type": "text",
1134
+ "primaryKey": false,
1135
+ "notNull": true,
1136
+ "autoincrement": false
1137
+ },
1138
+ "linked_at": {
1139
+ "name": "linked_at",
1140
+ "type": "integer",
1141
+ "primaryKey": false,
1142
+ "notNull": true,
1143
+ "autoincrement": false
1144
+ },
1145
+ "checked_at": {
1146
+ "name": "checked_at",
1147
+ "type": "integer",
1148
+ "primaryKey": false,
1149
+ "notNull": true,
1150
+ "autoincrement": false
1151
+ },
1152
+ "verified_at": {
1153
+ "name": "verified_at",
1154
+ "type": "integer",
1155
+ "primaryKey": false,
1156
+ "notNull": true,
1157
+ "autoincrement": false
1158
+ },
1159
+ "miss_count": {
1160
+ "name": "miss_count",
1161
+ "type": "integer",
1162
+ "primaryKey": false,
1163
+ "notNull": true,
1164
+ "autoincrement": false,
1165
+ "default": 0
1166
+ }
1167
+ },
1168
+ "indexes": {
1169
+ "api_source_collections_collection_idx": {
1170
+ "name": "api_source_collections_collection_idx",
1171
+ "columns": [
1172
+ "collection_id"
1173
+ ],
1174
+ "isUnique": false
1175
+ },
1176
+ "api_source_collections_checked_idx": {
1177
+ "name": "api_source_collections_checked_idx",
1178
+ "columns": [
1179
+ "checked_at"
1180
+ ],
1181
+ "isUnique": false
1182
+ }
1183
+ },
1184
+ "foreignKeys": {},
1185
+ "compositePrimaryKeys": {
1186
+ "api_source_collections_source_id_collection_id_pk": {
1187
+ "columns": [
1188
+ "source_id",
1189
+ "collection_id"
1190
+ ],
1191
+ "name": "api_source_collections_source_id_collection_id_pk"
1192
+ }
1193
+ },
1194
+ "uniqueConstraints": {},
1195
+ "checkConstraints": {}
1196
+ },
1197
+ "api_sources": {
1198
+ "name": "api_sources",
1199
+ "columns": {
1200
+ "source_id": {
1201
+ "name": "source_id",
1202
+ "type": "text",
1203
+ "primaryKey": true,
1204
+ "notNull": true,
1205
+ "autoincrement": false
1206
+ },
1207
+ "name": {
1208
+ "name": "name",
1209
+ "type": "text",
1210
+ "primaryKey": false,
1211
+ "notNull": true,
1212
+ "autoincrement": false
1213
+ },
1214
+ "owner_did": {
1215
+ "name": "owner_did",
1216
+ "type": "text",
1217
+ "primaryKey": false,
1218
+ "notNull": true,
1219
+ "autoincrement": false
1220
+ },
1221
+ "allowed_protocols": {
1222
+ "name": "allowed_protocols",
1223
+ "type": "text",
1224
+ "primaryKey": false,
1225
+ "notNull": true,
1226
+ "autoincrement": false,
1227
+ "default": "'[]'"
1228
+ },
1229
+ "price_overrides": {
1230
+ "name": "price_overrides",
1231
+ "type": "text",
1232
+ "primaryKey": false,
1233
+ "notNull": false,
1234
+ "autoincrement": false
1235
+ },
1236
+ "billing_mode": {
1237
+ "name": "billing_mode",
1238
+ "type": "text",
1239
+ "primaryKey": false,
1240
+ "notNull": true,
1241
+ "autoincrement": false,
1242
+ "default": "'x402'"
1243
+ },
1244
+ "refill_floor_cents": {
1245
+ "name": "refill_floor_cents",
1246
+ "type": "integer",
1247
+ "primaryKey": false,
1248
+ "notNull": false,
1249
+ "autoincrement": false
1250
+ },
1251
+ "balance_low_at": {
1252
+ "name": "balance_low_at",
1253
+ "type": "integer",
1254
+ "primaryKey": false,
1255
+ "notNull": false,
1256
+ "autoincrement": false
1257
+ },
1258
+ "webhook_url": {
1259
+ "name": "webhook_url",
1260
+ "type": "text",
1261
+ "primaryKey": false,
1262
+ "notNull": false,
1263
+ "autoincrement": false
1264
+ },
1265
+ "webhook_secret_ciphertext": {
1266
+ "name": "webhook_secret_ciphertext",
1267
+ "type": "text",
1268
+ "primaryKey": false,
1269
+ "notNull": false,
1270
+ "autoincrement": false
1271
+ },
1272
+ "previous_webhook_secret_ciphertext": {
1273
+ "name": "previous_webhook_secret_ciphertext",
1274
+ "type": "text",
1275
+ "primaryKey": false,
1276
+ "notNull": false,
1277
+ "autoincrement": false
1278
+ },
1279
+ "previous_webhook_secret_expires_at": {
1280
+ "name": "previous_webhook_secret_expires_at",
1281
+ "type": "integer",
1282
+ "primaryKey": false,
1283
+ "notNull": false,
1284
+ "autoincrement": false
1285
+ },
1286
+ "status": {
1287
+ "name": "status",
1288
+ "type": "text",
1289
+ "primaryKey": false,
1290
+ "notNull": true,
1291
+ "autoincrement": false,
1292
+ "default": "'active'"
1293
+ },
1294
+ "activated_at": {
1295
+ "name": "activated_at",
1296
+ "type": "integer",
1297
+ "primaryKey": false,
1298
+ "notNull": false,
1299
+ "autoincrement": false
1300
+ },
1301
+ "paused_reason": {
1302
+ "name": "paused_reason",
1303
+ "type": "text",
1304
+ "primaryKey": false,
1305
+ "notNull": false,
1306
+ "autoincrement": false
1307
+ },
1308
+ "contact_email": {
1309
+ "name": "contact_email",
1310
+ "type": "text",
1311
+ "primaryKey": false,
1312
+ "notNull": false,
1313
+ "autoincrement": false
1314
+ },
1315
+ "notes": {
1316
+ "name": "notes",
1317
+ "type": "text",
1318
+ "primaryKey": false,
1319
+ "notNull": false,
1320
+ "autoincrement": false
1321
+ },
1322
+ "company_entity_did": {
1323
+ "name": "company_entity_did",
1324
+ "type": "text",
1325
+ "primaryKey": false,
1326
+ "notNull": false,
1327
+ "autoincrement": false
1328
+ },
1329
+ "company_link": {
1330
+ "name": "company_link",
1331
+ "type": "text",
1332
+ "primaryKey": false,
1333
+ "notNull": false,
1334
+ "autoincrement": false
1335
+ },
1336
+ "company_link_issued_at": {
1337
+ "name": "company_link_issued_at",
1338
+ "type": "integer",
1339
+ "primaryKey": false,
1340
+ "notNull": false,
1341
+ "autoincrement": false
1342
+ },
1343
+ "payee_field": {
1344
+ "name": "payee_field",
1345
+ "type": "text",
1346
+ "primaryKey": false,
1347
+ "notNull": false,
1348
+ "autoincrement": false
1349
+ },
1350
+ "created_at": {
1351
+ "name": "created_at",
1352
+ "type": "integer",
1353
+ "primaryKey": false,
1354
+ "notNull": true,
1355
+ "autoincrement": false
1356
+ },
1357
+ "updated_at": {
1358
+ "name": "updated_at",
1359
+ "type": "integer",
1360
+ "primaryKey": false,
1361
+ "notNull": true,
1362
+ "autoincrement": false
1363
+ }
1364
+ },
1365
+ "indexes": {},
1366
+ "foreignKeys": {},
1367
+ "compositePrimaryKeys": {},
1368
+ "uniqueConstraints": {},
1369
+ "checkConstraints": {}
1370
+ },
1371
+ "api_uploads": {
1372
+ "name": "api_uploads",
1373
+ "columns": {
1374
+ "upload_id": {
1375
+ "name": "upload_id",
1376
+ "type": "text",
1377
+ "primaryKey": true,
1378
+ "notNull": true,
1379
+ "autoincrement": false
1380
+ },
1381
+ "source_id": {
1382
+ "name": "source_id",
1383
+ "type": "text",
1384
+ "primaryKey": false,
1385
+ "notNull": true,
1386
+ "autoincrement": false
1387
+ },
1388
+ "r2_key": {
1389
+ "name": "r2_key",
1390
+ "type": "text",
1391
+ "primaryKey": false,
1392
+ "notNull": true,
1393
+ "autoincrement": false
1394
+ },
1395
+ "cid": {
1396
+ "name": "cid",
1397
+ "type": "text",
1398
+ "primaryKey": false,
1399
+ "notNull": true,
1400
+ "autoincrement": false
1401
+ },
1402
+ "media_type": {
1403
+ "name": "media_type",
1404
+ "type": "text",
1405
+ "primaryKey": false,
1406
+ "notNull": true,
1407
+ "autoincrement": false
1408
+ },
1409
+ "size": {
1410
+ "name": "size",
1411
+ "type": "integer",
1412
+ "primaryKey": false,
1413
+ "notNull": true,
1414
+ "autoincrement": false
1415
+ },
1416
+ "claim_id": {
1417
+ "name": "claim_id",
1418
+ "type": "text",
1419
+ "primaryKey": false,
1420
+ "notNull": false,
1421
+ "autoincrement": false
1422
+ },
1423
+ "delete_at": {
1424
+ "name": "delete_at",
1425
+ "type": "integer",
1426
+ "primaryKey": false,
1427
+ "notNull": false,
1428
+ "autoincrement": false
1429
+ },
1430
+ "created_at": {
1431
+ "name": "created_at",
1432
+ "type": "integer",
1433
+ "primaryKey": false,
1434
+ "notNull": true,
1435
+ "autoincrement": false
1436
+ }
1437
+ },
1438
+ "indexes": {
1439
+ "api_uploads_delete_idx": {
1440
+ "name": "api_uploads_delete_idx",
1441
+ "columns": [
1442
+ "delete_at"
1443
+ ],
1444
+ "isUnique": false
1445
+ },
1446
+ "api_uploads_claim_idx": {
1447
+ "name": "api_uploads_claim_idx",
1448
+ "columns": [
1449
+ "claim_id"
1450
+ ],
1451
+ "isUnique": false
1452
+ }
1453
+ },
1454
+ "foreignKeys": {},
1455
+ "compositePrimaryKeys": {},
1456
+ "uniqueConstraints": {},
1457
+ "checkConstraints": {}
1458
+ },
1459
+ "claim_attachment_cids": {
1460
+ "name": "claim_attachment_cids",
1461
+ "columns": {
1462
+ "collection_id": {
1463
+ "name": "collection_id",
1464
+ "type": "text",
1465
+ "primaryKey": false,
1466
+ "notNull": true,
1467
+ "autoincrement": false
1468
+ },
1469
+ "cid": {
1470
+ "name": "cid",
1471
+ "type": "text",
1472
+ "primaryKey": false,
1473
+ "notNull": true,
1474
+ "autoincrement": false
1475
+ },
1476
+ "claim_id": {
1477
+ "name": "claim_id",
1478
+ "type": "text",
1479
+ "primaryKey": false,
1480
+ "notNull": true,
1481
+ "autoincrement": false
1482
+ },
1483
+ "agent_address": {
1484
+ "name": "agent_address",
1485
+ "type": "text",
1486
+ "primaryKey": false,
1487
+ "notNull": false,
1488
+ "autoincrement": false
1489
+ },
1490
+ "phash": {
1491
+ "name": "phash",
1492
+ "type": "text",
1493
+ "primaryKey": false,
1494
+ "notNull": false,
1495
+ "autoincrement": false
1496
+ },
1497
+ "media_type": {
1498
+ "name": "media_type",
1499
+ "type": "text",
1500
+ "primaryKey": false,
1501
+ "notNull": false,
1502
+ "autoincrement": false
1503
+ },
1504
+ "created_at": {
1505
+ "name": "created_at",
1506
+ "type": "integer",
1507
+ "primaryKey": false,
1508
+ "notNull": true,
1509
+ "autoincrement": false
1510
+ }
1511
+ },
1512
+ "indexes": {
1513
+ "cac_recent": {
1514
+ "name": "cac_recent",
1515
+ "columns": [
1516
+ "collection_id",
1517
+ "created_at"
1518
+ ],
1519
+ "isUnique": false
1520
+ }
1521
+ },
1522
+ "foreignKeys": {},
1523
+ "compositePrimaryKeys": {
1524
+ "claim_attachment_cids_collection_id_cid_claim_id_pk": {
1525
+ "columns": [
1526
+ "collection_id",
1527
+ "cid",
1528
+ "claim_id"
1529
+ ],
1530
+ "name": "claim_attachment_cids_collection_id_cid_claim_id_pk"
1531
+ }
1532
+ },
1533
+ "uniqueConstraints": {},
1534
+ "checkConstraints": {}
1535
+ },
1536
+ "claim_body_digests": {
1537
+ "name": "claim_body_digests",
1538
+ "columns": {
1539
+ "collection_id": {
1540
+ "name": "collection_id",
1541
+ "type": "text",
1542
+ "primaryKey": false,
1543
+ "notNull": true,
1544
+ "autoincrement": false
1545
+ },
1546
+ "digest": {
1547
+ "name": "digest",
1548
+ "type": "text",
1549
+ "primaryKey": false,
1550
+ "notNull": true,
1551
+ "autoincrement": false
1552
+ },
1553
+ "claim_id": {
1554
+ "name": "claim_id",
1555
+ "type": "text",
1556
+ "primaryKey": false,
1557
+ "notNull": true,
1558
+ "autoincrement": false
1559
+ },
1560
+ "agent_address": {
1561
+ "name": "agent_address",
1562
+ "type": "text",
1563
+ "primaryKey": false,
1564
+ "notNull": false,
1565
+ "autoincrement": false
1566
+ },
1567
+ "normalized_text": {
1568
+ "name": "normalized_text",
1569
+ "type": "text",
1570
+ "primaryKey": false,
1571
+ "notNull": false,
1572
+ "autoincrement": false
1573
+ },
1574
+ "final_verdict": {
1575
+ "name": "final_verdict",
1576
+ "type": "text",
1577
+ "primaryKey": false,
1578
+ "notNull": false,
1579
+ "autoincrement": false
1580
+ },
1581
+ "created_at": {
1582
+ "name": "created_at",
1583
+ "type": "integer",
1584
+ "primaryKey": false,
1585
+ "notNull": true,
1586
+ "autoincrement": false
1587
+ }
1588
+ },
1589
+ "indexes": {
1590
+ "cbd_recent": {
1591
+ "name": "cbd_recent",
1592
+ "columns": [
1593
+ "collection_id",
1594
+ "created_at"
1595
+ ],
1596
+ "isUnique": false
1597
+ },
1598
+ "cbd_claim": {
1599
+ "name": "cbd_claim",
1600
+ "columns": [
1601
+ "claim_id",
1602
+ "collection_id"
1603
+ ],
1604
+ "isUnique": false
1605
+ }
1606
+ },
1607
+ "foreignKeys": {},
1608
+ "compositePrimaryKeys": {
1609
+ "claim_body_digests_collection_id_digest_claim_id_pk": {
1610
+ "columns": [
1611
+ "collection_id",
1612
+ "digest",
1613
+ "claim_id"
1614
+ ],
1615
+ "name": "claim_body_digests_collection_id_digest_claim_id_pk"
1616
+ }
1617
+ },
1618
+ "uniqueConstraints": {},
1619
+ "checkConstraints": {}
1620
+ },
1621
+ "claim_ingests": {
1622
+ "name": "claim_ingests",
1623
+ "columns": {
1624
+ "claim_id": {
1625
+ "name": "claim_id",
1626
+ "type": "text",
1627
+ "primaryKey": true,
1628
+ "notNull": true,
1629
+ "autoincrement": false
1630
+ },
1631
+ "collection_id": {
1632
+ "name": "collection_id",
1633
+ "type": "text",
1634
+ "primaryKey": false,
1635
+ "notNull": true,
1636
+ "autoincrement": false
1637
+ },
1638
+ "status": {
1639
+ "name": "status",
1640
+ "type": "text",
1641
+ "primaryKey": false,
1642
+ "notNull": true,
1643
+ "autoincrement": false,
1644
+ "default": "'queued'"
1645
+ },
1646
+ "lane": {
1647
+ "name": "lane",
1648
+ "type": "text",
1649
+ "primaryKey": false,
1650
+ "notNull": true,
1651
+ "autoincrement": false,
1652
+ "default": "'chain'"
1653
+ },
1654
+ "instance_id": {
1655
+ "name": "instance_id",
1656
+ "type": "text",
1657
+ "primaryKey": false,
1658
+ "notNull": false,
1659
+ "autoincrement": false
1660
+ },
1661
+ "error": {
1662
+ "name": "error",
1663
+ "type": "text",
1664
+ "primaryKey": false,
1665
+ "notNull": false,
1666
+ "autoincrement": false
1667
+ },
1668
+ "erased_at": {
1669
+ "name": "erased_at",
1670
+ "type": "integer",
1671
+ "primaryKey": false,
1672
+ "notNull": false,
1673
+ "autoincrement": false
1674
+ },
1675
+ "created_at": {
1676
+ "name": "created_at",
1677
+ "type": "integer",
1678
+ "primaryKey": false,
1679
+ "notNull": true,
1680
+ "autoincrement": false
1681
+ },
1682
+ "updated_at": {
1683
+ "name": "updated_at",
1684
+ "type": "integer",
1685
+ "primaryKey": false,
1686
+ "notNull": true,
1687
+ "autoincrement": false
1688
+ }
1689
+ },
1690
+ "indexes": {
1691
+ "claim_ingests_collection_created_claim_idx": {
1692
+ "name": "claim_ingests_collection_created_claim_idx",
1693
+ "columns": [
1694
+ "collection_id",
1695
+ "created_at",
1696
+ "claim_id"
1697
+ ],
1698
+ "isUnique": false
1699
+ },
1700
+ "claim_ingests_lane_created_claim_idx": {
1701
+ "name": "claim_ingests_lane_created_claim_idx",
1702
+ "columns": [
1703
+ "lane",
1704
+ "created_at",
1705
+ "claim_id"
1706
+ ],
1707
+ "isUnique": false
1708
+ }
1709
+ },
1710
+ "foreignKeys": {},
1711
+ "compositePrimaryKeys": {},
1712
+ "uniqueConstraints": {},
1713
+ "checkConstraints": {}
1714
+ },
1715
+ "claim_reviews": {
1716
+ "name": "claim_reviews",
1717
+ "columns": {
1718
+ "claim_id": {
1719
+ "name": "claim_id",
1720
+ "type": "text",
1721
+ "primaryKey": true,
1722
+ "notNull": true,
1723
+ "autoincrement": false
1724
+ },
1725
+ "answers": {
1726
+ "name": "answers",
1727
+ "type": "text",
1728
+ "primaryKey": false,
1729
+ "notNull": true,
1730
+ "autoincrement": false
1731
+ },
1732
+ "reviewer_did": {
1733
+ "name": "reviewer_did",
1734
+ "type": "text",
1735
+ "primaryKey": false,
1736
+ "notNull": true,
1737
+ "autoincrement": false
1738
+ },
1739
+ "attestation_jws": {
1740
+ "name": "attestation_jws",
1741
+ "type": "text",
1742
+ "primaryKey": false,
1743
+ "notNull": false,
1744
+ "autoincrement": false
1745
+ },
1746
+ "answered_at": {
1747
+ "name": "answered_at",
1748
+ "type": "integer",
1749
+ "primaryKey": false,
1750
+ "notNull": true,
1751
+ "autoincrement": false
1752
+ },
1753
+ "folded_at": {
1754
+ "name": "folded_at",
1755
+ "type": "integer",
1756
+ "primaryKey": false,
1757
+ "notNull": false,
1758
+ "autoincrement": false
1759
+ },
1760
+ "fold_error": {
1761
+ "name": "fold_error",
1762
+ "type": "text",
1763
+ "primaryKey": false,
1764
+ "notNull": false,
1765
+ "autoincrement": false
1766
+ },
1767
+ "reviewer_grant": {
1768
+ "name": "reviewer_grant",
1769
+ "type": "text",
1770
+ "primaryKey": false,
1771
+ "notNull": false,
1772
+ "autoincrement": false
1773
+ }
1774
+ },
1775
+ "indexes": {},
1776
+ "foreignKeys": {},
1777
+ "compositePrimaryKeys": {},
1778
+ "uniqueConstraints": {},
1779
+ "checkConstraints": {}
1780
+ },
1781
+ "collection_reviewers": {
1782
+ "name": "collection_reviewers",
1783
+ "columns": {
1784
+ "collection_id": {
1785
+ "name": "collection_id",
1786
+ "type": "text",
1787
+ "primaryKey": false,
1788
+ "notNull": true,
1789
+ "autoincrement": false
1790
+ },
1791
+ "member_did": {
1792
+ "name": "member_did",
1793
+ "type": "text",
1794
+ "primaryKey": false,
1795
+ "notNull": true,
1796
+ "autoincrement": false
1797
+ },
1798
+ "root_did": {
1799
+ "name": "root_did",
1800
+ "type": "text",
1801
+ "primaryKey": false,
1802
+ "notNull": true,
1803
+ "autoincrement": false
1804
+ },
1805
+ "delegation": {
1806
+ "name": "delegation",
1807
+ "type": "text",
1808
+ "primaryKey": false,
1809
+ "notNull": true,
1810
+ "autoincrement": false
1811
+ },
1812
+ "delegation_cid": {
1813
+ "name": "delegation_cid",
1814
+ "type": "text",
1815
+ "primaryKey": false,
1816
+ "notNull": true,
1817
+ "autoincrement": false
1818
+ },
1819
+ "expires_at": {
1820
+ "name": "expires_at",
1821
+ "type": "integer",
1822
+ "primaryKey": false,
1823
+ "notNull": true,
1824
+ "autoincrement": false
1825
+ },
1826
+ "revoked_at": {
1827
+ "name": "revoked_at",
1828
+ "type": "integer",
1829
+ "primaryKey": false,
1830
+ "notNull": false,
1831
+ "autoincrement": false
1832
+ },
1833
+ "created_at": {
1834
+ "name": "created_at",
1835
+ "type": "integer",
1836
+ "primaryKey": false,
1837
+ "notNull": true,
1838
+ "autoincrement": false
1839
+ }
1840
+ },
1841
+ "indexes": {
1842
+ "collection_reviewers_member_idx": {
1843
+ "name": "collection_reviewers_member_idx",
1844
+ "columns": [
1845
+ "collection_id",
1846
+ "member_did"
1847
+ ],
1848
+ "isUnique": false
1849
+ }
1850
+ },
1851
+ "foreignKeys": {},
1852
+ "compositePrimaryKeys": {
1853
+ "collection_reviewers_collection_id_delegation_cid_pk": {
1854
+ "columns": [
1855
+ "collection_id",
1856
+ "delegation_cid"
1857
+ ],
1858
+ "name": "collection_reviewers_collection_id_delegation_cid_pk"
1859
+ }
1860
+ },
1861
+ "uniqueConstraints": {},
1862
+ "checkConstraints": {}
1863
+ },
1864
+ "cron_state": {
1865
+ "name": "cron_state",
1866
+ "columns": {
1867
+ "name": {
1868
+ "name": "name",
1869
+ "type": "text",
1870
+ "primaryKey": true,
1871
+ "notNull": true,
1872
+ "autoincrement": false
1873
+ },
1874
+ "value": {
1875
+ "name": "value",
1876
+ "type": "text",
1877
+ "primaryKey": false,
1878
+ "notNull": true,
1879
+ "autoincrement": false
1880
+ }
1881
+ },
1882
+ "indexes": {},
1883
+ "foreignKeys": {},
1884
+ "compositePrimaryKeys": {},
1885
+ "uniqueConstraints": {},
1886
+ "checkConstraints": {}
1887
+ },
1888
+ "decisions": {
1889
+ "name": "decisions",
1890
+ "columns": {
1891
+ "claim_id": {
1892
+ "name": "claim_id",
1893
+ "type": "text",
1894
+ "primaryKey": true,
1895
+ "notNull": true,
1896
+ "autoincrement": false
1897
+ },
1898
+ "collection_id": {
1899
+ "name": "collection_id",
1900
+ "type": "text",
1901
+ "primaryKey": false,
1902
+ "notNull": true,
1903
+ "autoincrement": false
1904
+ },
1905
+ "rubric_id": {
1906
+ "name": "rubric_id",
1907
+ "type": "text",
1908
+ "primaryKey": false,
1909
+ "notNull": false,
1910
+ "autoincrement": false
1911
+ },
1912
+ "facts_digest": {
1913
+ "name": "facts_digest",
1914
+ "type": "text",
1915
+ "primaryKey": false,
1916
+ "notNull": false,
1917
+ "autoincrement": false
1918
+ },
1919
+ "verdict": {
1920
+ "name": "verdict",
1921
+ "type": "text",
1922
+ "primaryKey": false,
1923
+ "notNull": false,
1924
+ "autoincrement": false
1925
+ },
1926
+ "status": {
1927
+ "name": "status",
1928
+ "type": "text",
1929
+ "primaryKey": false,
1930
+ "notNull": true,
1931
+ "autoincrement": false
1932
+ },
1933
+ "result_digest": {
1934
+ "name": "result_digest",
1935
+ "type": "text",
1936
+ "primaryKey": false,
1937
+ "notNull": false,
1938
+ "autoincrement": false
1939
+ },
1940
+ "receipt_cid": {
1941
+ "name": "receipt_cid",
1942
+ "type": "text",
1943
+ "primaryKey": false,
1944
+ "notNull": false,
1945
+ "autoincrement": false
1946
+ },
1947
+ "receipt_jws": {
1948
+ "name": "receipt_jws",
1949
+ "type": "text",
1950
+ "primaryKey": false,
1951
+ "notNull": false,
1952
+ "autoincrement": false
1953
+ },
1954
+ "decision": {
1955
+ "name": "decision",
1956
+ "type": "text",
1957
+ "primaryKey": false,
1958
+ "notNull": false,
1959
+ "autoincrement": false
1960
+ },
1961
+ "explanation": {
1962
+ "name": "explanation",
1963
+ "type": "text",
1964
+ "primaryKey": false,
1965
+ "notNull": false,
1966
+ "autoincrement": false
1967
+ },
1968
+ "facts": {
1969
+ "name": "facts",
1970
+ "type": "text",
1971
+ "primaryKey": false,
1972
+ "notNull": false,
1973
+ "autoincrement": false
1974
+ },
1975
+ "errored_facts": {
1976
+ "name": "errored_facts",
1977
+ "type": "text",
1978
+ "primaryKey": false,
1979
+ "notNull": false,
1980
+ "autoincrement": false
1981
+ },
1982
+ "reviewer_note": {
1983
+ "name": "reviewer_note",
1984
+ "type": "text",
1985
+ "primaryKey": false,
1986
+ "notNull": false,
1987
+ "autoincrement": false
1988
+ },
1989
+ "pending_task_details": {
1990
+ "name": "pending_task_details",
1991
+ "type": "text",
1992
+ "primaryKey": false,
1993
+ "notNull": false,
1994
+ "autoincrement": false
1995
+ },
1996
+ "chain_status": {
1997
+ "name": "chain_status",
1998
+ "type": "text",
1999
+ "primaryKey": false,
2000
+ "notNull": true,
2001
+ "autoincrement": false,
2002
+ "default": "'pending'"
2003
+ },
2004
+ "tx_hash": {
2005
+ "name": "tx_hash",
2006
+ "type": "text",
2007
+ "primaryKey": false,
2008
+ "notNull": false,
2009
+ "autoincrement": false
2010
+ },
2011
+ "chain_error": {
2012
+ "name": "chain_error",
2013
+ "type": "text",
2014
+ "primaryKey": false,
2015
+ "notNull": false,
2016
+ "autoincrement": false
2017
+ },
2018
+ "created_at": {
2019
+ "name": "created_at",
2020
+ "type": "integer",
2021
+ "primaryKey": false,
2022
+ "notNull": true,
2023
+ "autoincrement": false
2024
+ },
2025
+ "updated_at": {
2026
+ "name": "updated_at",
2027
+ "type": "integer",
2028
+ "primaryKey": false,
2029
+ "notNull": true,
2030
+ "autoincrement": false
2031
+ }
2032
+ },
2033
+ "indexes": {
2034
+ "decisions_status_created_idx": {
2035
+ "name": "decisions_status_created_idx",
2036
+ "columns": [
2037
+ "status",
2038
+ "created_at"
2039
+ ],
2040
+ "isUnique": false
2041
+ },
2042
+ "dec_collection_chain": {
2043
+ "name": "dec_collection_chain",
2044
+ "columns": [
2045
+ "collection_id",
2046
+ "chain_status",
2047
+ "created_at"
2048
+ ],
2049
+ "isUnique": false
2050
+ }
2051
+ },
2052
+ "foreignKeys": {},
2053
+ "compositePrimaryKeys": {},
2054
+ "uniqueConstraints": {},
2055
+ "checkConstraints": {}
2056
+ },
2057
+ "fact_cache": {
2058
+ "name": "fact_cache",
2059
+ "columns": {
2060
+ "claim_id": {
2061
+ "name": "claim_id",
2062
+ "type": "text",
2063
+ "primaryKey": false,
2064
+ "notNull": true,
2065
+ "autoincrement": false
2066
+ },
2067
+ "rubric_id": {
2068
+ "name": "rubric_id",
2069
+ "type": "text",
2070
+ "primaryKey": false,
2071
+ "notNull": true,
2072
+ "autoincrement": false
2073
+ },
2074
+ "kind": {
2075
+ "name": "kind",
2076
+ "type": "text",
2077
+ "primaryKey": false,
2078
+ "notNull": true,
2079
+ "autoincrement": false
2080
+ },
2081
+ "name": {
2082
+ "name": "name",
2083
+ "type": "text",
2084
+ "primaryKey": false,
2085
+ "notNull": true,
2086
+ "autoincrement": false
2087
+ },
2088
+ "fact": {
2089
+ "name": "fact",
2090
+ "type": "text",
2091
+ "primaryKey": false,
2092
+ "notNull": true,
2093
+ "autoincrement": false
2094
+ },
2095
+ "created_at": {
2096
+ "name": "created_at",
2097
+ "type": "integer",
2098
+ "primaryKey": false,
2099
+ "notNull": true,
2100
+ "autoincrement": false
2101
+ }
2102
+ },
2103
+ "indexes": {},
2104
+ "foreignKeys": {},
2105
+ "compositePrimaryKeys": {
2106
+ "fact_cache_claim_id_rubric_id_kind_name_pk": {
2107
+ "columns": [
2108
+ "claim_id",
2109
+ "rubric_id",
2110
+ "kind",
2111
+ "name"
2112
+ ],
2113
+ "name": "fact_cache_claim_id_rubric_id_kind_name_pk"
2114
+ }
2115
+ },
2116
+ "uniqueConstraints": {},
2117
+ "checkConstraints": {}
2118
+ },
2119
+ "matrix_deliveries": {
2120
+ "name": "matrix_deliveries",
2121
+ "columns": {
2122
+ "dedupe_key": {
2123
+ "name": "dedupe_key",
2124
+ "type": "text",
2125
+ "primaryKey": true,
2126
+ "notNull": true,
2127
+ "autoincrement": false
2128
+ },
2129
+ "kind": {
2130
+ "name": "kind",
2131
+ "type": "text",
2132
+ "primaryKey": false,
2133
+ "notNull": true,
2134
+ "autoincrement": false
2135
+ },
2136
+ "claim_id": {
2137
+ "name": "claim_id",
2138
+ "type": "text",
2139
+ "primaryKey": false,
2140
+ "notNull": false,
2141
+ "autoincrement": false
2142
+ },
2143
+ "collection_id": {
2144
+ "name": "collection_id",
2145
+ "type": "text",
2146
+ "primaryKey": false,
2147
+ "notNull": false,
2148
+ "autoincrement": false
2149
+ },
2150
+ "room_id": {
2151
+ "name": "room_id",
2152
+ "type": "text",
2153
+ "primaryKey": false,
2154
+ "notNull": false,
2155
+ "autoincrement": false
2156
+ },
2157
+ "event_id": {
2158
+ "name": "event_id",
2159
+ "type": "text",
2160
+ "primaryKey": false,
2161
+ "notNull": false,
2162
+ "autoincrement": false
2163
+ },
2164
+ "result_digest": {
2165
+ "name": "result_digest",
2166
+ "type": "text",
2167
+ "primaryKey": false,
2168
+ "notNull": false,
2169
+ "autoincrement": false
2170
+ },
2171
+ "status": {
2172
+ "name": "status",
2173
+ "type": "text",
2174
+ "primaryKey": false,
2175
+ "notNull": true,
2176
+ "autoincrement": false,
2177
+ "default": "'failed'"
2178
+ },
2179
+ "attempts": {
2180
+ "name": "attempts",
2181
+ "type": "integer",
2182
+ "primaryKey": false,
2183
+ "notNull": true,
2184
+ "autoincrement": false,
2185
+ "default": 0
2186
+ },
2187
+ "last_error": {
2188
+ "name": "last_error",
2189
+ "type": "text",
2190
+ "primaryKey": false,
2191
+ "notNull": false,
2192
+ "autoincrement": false
2193
+ },
2194
+ "source_id": {
2195
+ "name": "source_id",
2196
+ "type": "text",
2197
+ "primaryKey": false,
2198
+ "notNull": false,
2199
+ "autoincrement": false
2200
+ },
2201
+ "endpoint_id": {
2202
+ "name": "endpoint_id",
2203
+ "type": "text",
2204
+ "primaryKey": false,
2205
+ "notNull": false,
2206
+ "autoincrement": false
2207
+ },
2208
+ "target_url": {
2209
+ "name": "target_url",
2210
+ "type": "text",
2211
+ "primaryKey": false,
2212
+ "notNull": false,
2213
+ "autoincrement": false
2214
+ },
2215
+ "event_type": {
2216
+ "name": "event_type",
2217
+ "type": "text",
2218
+ "primaryKey": false,
2219
+ "notNull": false,
2220
+ "autoincrement": false
2221
+ },
2222
+ "payload": {
2223
+ "name": "payload",
2224
+ "type": "text",
2225
+ "primaryKey": false,
2226
+ "notNull": false,
2227
+ "autoincrement": false
2228
+ },
2229
+ "next_attempt_at": {
2230
+ "name": "next_attempt_at",
2231
+ "type": "integer",
2232
+ "primaryKey": false,
2233
+ "notNull": false,
2234
+ "autoincrement": false
2235
+ },
2236
+ "last_status_code": {
2237
+ "name": "last_status_code",
2238
+ "type": "integer",
2239
+ "primaryKey": false,
2240
+ "notNull": false,
2241
+ "autoincrement": false
2242
+ },
2243
+ "created_at": {
2244
+ "name": "created_at",
2245
+ "type": "integer",
2246
+ "primaryKey": false,
2247
+ "notNull": true,
2248
+ "autoincrement": false
2249
+ },
2250
+ "updated_at": {
2251
+ "name": "updated_at",
2252
+ "type": "integer",
2253
+ "primaryKey": false,
2254
+ "notNull": true,
2255
+ "autoincrement": false
2256
+ }
2257
+ },
2258
+ "indexes": {
2259
+ "matrix_deliveries_claim_idx": {
2260
+ "name": "matrix_deliveries_claim_idx",
2261
+ "columns": [
2262
+ "claim_id"
2263
+ ],
2264
+ "isUnique": false
2265
+ },
2266
+ "matrix_deliveries_due_idx": {
2267
+ "name": "matrix_deliveries_due_idx",
2268
+ "columns": [
2269
+ "kind",
2270
+ "status",
2271
+ "next_attempt_at"
2272
+ ],
2273
+ "isUnique": false
2274
+ },
2275
+ "matrix_deliveries_source_created_idx": {
2276
+ "name": "matrix_deliveries_source_created_idx",
2277
+ "columns": [
2278
+ "source_id",
2279
+ "created_at"
2280
+ ],
2281
+ "isUnique": false
2282
+ },
2283
+ "matrix_deliveries_kind_created_idx": {
2284
+ "name": "matrix_deliveries_kind_created_idx",
2285
+ "columns": [
2286
+ "kind",
2287
+ "created_at"
2288
+ ],
2289
+ "isUnique": false
2290
+ }
2291
+ },
2292
+ "foreignKeys": {},
2293
+ "compositePrimaryKeys": {},
2294
+ "uniqueConstraints": {},
2295
+ "checkConstraints": {}
2296
+ },
2297
+ "mcp_approvals": {
2298
+ "name": "mcp_approvals",
2299
+ "columns": {
2300
+ "id": {
2301
+ "name": "id",
2302
+ "type": "text",
2303
+ "primaryKey": true,
2304
+ "notNull": true,
2305
+ "autoincrement": false
2306
+ },
2307
+ "grant_id": {
2308
+ "name": "grant_id",
2309
+ "type": "text",
2310
+ "primaryKey": false,
2311
+ "notNull": true,
2312
+ "autoincrement": false
2313
+ },
2314
+ "did": {
2315
+ "name": "did",
2316
+ "type": "text",
2317
+ "primaryKey": false,
2318
+ "notNull": true,
2319
+ "autoincrement": false
2320
+ },
2321
+ "source_id": {
2322
+ "name": "source_id",
2323
+ "type": "text",
2324
+ "primaryKey": false,
2325
+ "notNull": true,
2326
+ "autoincrement": false
2327
+ },
2328
+ "protocol_did": {
2329
+ "name": "protocol_did",
2330
+ "type": "text",
2331
+ "primaryKey": false,
2332
+ "notNull": true,
2333
+ "autoincrement": false
2334
+ },
2335
+ "client_id": {
2336
+ "name": "client_id",
2337
+ "type": "text",
2338
+ "primaryKey": false,
2339
+ "notNull": true,
2340
+ "autoincrement": false
2341
+ },
2342
+ "client_name": {
2343
+ "name": "client_name",
2344
+ "type": "text",
2345
+ "primaryKey": false,
2346
+ "notNull": true,
2347
+ "autoincrement": false
2348
+ },
2349
+ "request_digest": {
2350
+ "name": "request_digest",
2351
+ "type": "text",
2352
+ "primaryKey": false,
2353
+ "notNull": true,
2354
+ "autoincrement": false
2355
+ },
2356
+ "price": {
2357
+ "name": "price",
2358
+ "type": "text",
2359
+ "primaryKey": false,
2360
+ "notNull": true,
2361
+ "autoincrement": false
2362
+ },
2363
+ "max_amount_upay": {
2364
+ "name": "max_amount_upay",
2365
+ "type": "text",
2366
+ "primaryKey": false,
2367
+ "notNull": true,
2368
+ "autoincrement": false
2369
+ },
2370
+ "billing_mode": {
2371
+ "name": "billing_mode",
2372
+ "type": "text",
2373
+ "primaryKey": false,
2374
+ "notNull": true,
2375
+ "autoincrement": false
2376
+ },
2377
+ "status": {
2378
+ "name": "status",
2379
+ "type": "text",
2380
+ "primaryKey": false,
2381
+ "notNull": true,
2382
+ "autoincrement": false,
2383
+ "default": "'pending'"
2384
+ },
2385
+ "delegation": {
2386
+ "name": "delegation",
2387
+ "type": "text",
2388
+ "primaryKey": false,
2389
+ "notNull": false,
2390
+ "autoincrement": false
2391
+ },
2392
+ "offer_id": {
2393
+ "name": "offer_id",
2394
+ "type": "text",
2395
+ "primaryKey": false,
2396
+ "notNull": false,
2397
+ "autoincrement": false
2398
+ },
2399
+ "payment_intent_id": {
2400
+ "name": "payment_intent_id",
2401
+ "type": "text",
2402
+ "primaryKey": false,
2403
+ "notNull": false,
2404
+ "autoincrement": false
2405
+ },
2406
+ "expires_at": {
2407
+ "name": "expires_at",
2408
+ "type": "integer",
2409
+ "primaryKey": false,
2410
+ "notNull": true,
2411
+ "autoincrement": false
2412
+ },
2413
+ "created_at": {
2414
+ "name": "created_at",
2415
+ "type": "integer",
2416
+ "primaryKey": false,
2417
+ "notNull": true,
2418
+ "autoincrement": false
2419
+ }
2420
+ },
2421
+ "indexes": {
2422
+ "mcp_approvals_live_idx": {
2423
+ "name": "mcp_approvals_live_idx",
2424
+ "columns": [
2425
+ "grant_id",
2426
+ "request_digest"
2427
+ ],
2428
+ "isUnique": true,
2429
+ "where": "status in ('pending', 'approved', 'awaiting_3ds')"
2430
+ },
2431
+ "mcp_approvals_expires_idx": {
2432
+ "name": "mcp_approvals_expires_idx",
2433
+ "columns": [
2434
+ "expires_at"
2435
+ ],
2436
+ "isUnique": false
2437
+ }
2438
+ },
2439
+ "foreignKeys": {},
2440
+ "compositePrimaryKeys": {},
2441
+ "uniqueConstraints": {},
2442
+ "checkConstraints": {}
2443
+ },
2444
+ "mcp_standing": {
2445
+ "name": "mcp_standing",
2446
+ "columns": {
2447
+ "grant_id": {
2448
+ "name": "grant_id",
2449
+ "type": "text",
2450
+ "primaryKey": true,
2451
+ "notNull": true,
2452
+ "autoincrement": false
2453
+ },
2454
+ "did": {
2455
+ "name": "did",
2456
+ "type": "text",
2457
+ "primaryKey": false,
2458
+ "notNull": true,
2459
+ "autoincrement": false
2460
+ },
2461
+ "per_claim_upay": {
2462
+ "name": "per_claim_upay",
2463
+ "type": "integer",
2464
+ "primaryKey": false,
2465
+ "notNull": true,
2466
+ "autoincrement": false
2467
+ },
2468
+ "total_upay": {
2469
+ "name": "total_upay",
2470
+ "type": "integer",
2471
+ "primaryKey": false,
2472
+ "notNull": true,
2473
+ "autoincrement": false
2474
+ },
2475
+ "spent_upay": {
2476
+ "name": "spent_upay",
2477
+ "type": "integer",
2478
+ "primaryKey": false,
2479
+ "notNull": true,
2480
+ "autoincrement": false,
2481
+ "default": 0
2482
+ },
2483
+ "until": {
2484
+ "name": "until",
2485
+ "type": "integer",
2486
+ "primaryKey": false,
2487
+ "notNull": true,
2488
+ "autoincrement": false
2489
+ },
2490
+ "delegation": {
2491
+ "name": "delegation",
2492
+ "type": "text",
2493
+ "primaryKey": false,
2494
+ "notNull": false,
2495
+ "autoincrement": false
2496
+ },
2497
+ "updated_at": {
2498
+ "name": "updated_at",
2499
+ "type": "integer",
2500
+ "primaryKey": false,
2501
+ "notNull": true,
2502
+ "autoincrement": false
2503
+ }
2504
+ },
2505
+ "indexes": {},
2506
+ "foreignKeys": {},
2507
+ "compositePrimaryKeys": {},
2508
+ "uniqueConstraints": {},
2509
+ "checkConstraints": {}
2510
+ },
2511
+ "mcp_standing_spends": {
2512
+ "name": "mcp_standing_spends",
2513
+ "columns": {
2514
+ "grant_id": {
2515
+ "name": "grant_id",
2516
+ "type": "text",
2517
+ "primaryKey": false,
2518
+ "notNull": true,
2519
+ "autoincrement": false
2520
+ },
2521
+ "request_digest": {
2522
+ "name": "request_digest",
2523
+ "type": "text",
2524
+ "primaryKey": false,
2525
+ "notNull": true,
2526
+ "autoincrement": false
2527
+ },
2528
+ "spend_id": {
2529
+ "name": "spend_id",
2530
+ "type": "text",
2531
+ "primaryKey": false,
2532
+ "notNull": true,
2533
+ "autoincrement": false
2534
+ },
2535
+ "upay": {
2536
+ "name": "upay",
2537
+ "type": "integer",
2538
+ "primaryKey": false,
2539
+ "notNull": true,
2540
+ "autoincrement": false
2541
+ },
2542
+ "created_at": {
2543
+ "name": "created_at",
2544
+ "type": "integer",
2545
+ "primaryKey": false,
2546
+ "notNull": true,
2547
+ "autoincrement": false
2548
+ }
2549
+ },
2550
+ "indexes": {
2551
+ "mcp_standing_spends_grant_created_idx": {
2552
+ "name": "mcp_standing_spends_grant_created_idx",
2553
+ "columns": [
2554
+ "grant_id",
2555
+ "created_at"
2556
+ ],
2557
+ "isUnique": false
2558
+ }
2559
+ },
2560
+ "foreignKeys": {},
2561
+ "compositePrimaryKeys": {
2562
+ "mcp_standing_spends_grant_id_request_digest_pk": {
2563
+ "columns": [
2564
+ "grant_id",
2565
+ "request_digest"
2566
+ ],
2567
+ "name": "mcp_standing_spends_grant_id_request_digest_pk"
2568
+ }
2569
+ },
2570
+ "uniqueConstraints": {},
2571
+ "checkConstraints": {}
2572
+ },
2573
+ "openhands_hires": {
2574
+ "name": "openhands_hires",
2575
+ "columns": {
2576
+ "collection_id": {
2577
+ "name": "collection_id",
2578
+ "type": "text",
2579
+ "primaryKey": true,
2580
+ "notNull": true,
2581
+ "autoincrement": false
2582
+ },
2583
+ "remaining": {
2584
+ "name": "remaining",
2585
+ "type": "integer",
2586
+ "primaryKey": false,
2587
+ "notNull": true,
2588
+ "autoincrement": false
2589
+ },
2590
+ "mint_quota": {
2591
+ "name": "mint_quota",
2592
+ "type": "integer",
2593
+ "primaryKey": false,
2594
+ "notNull": true,
2595
+ "autoincrement": false
2596
+ },
2597
+ "checked_at": {
2598
+ "name": "checked_at",
2599
+ "type": "text",
2600
+ "primaryKey": false,
2601
+ "notNull": true,
2602
+ "autoincrement": false
2603
+ },
2604
+ "ends_at": {
2605
+ "name": "ends_at",
2606
+ "type": "text",
2607
+ "primaryKey": false,
2608
+ "notNull": false,
2609
+ "autoincrement": false
2610
+ }
2611
+ },
2612
+ "indexes": {},
2613
+ "foreignKeys": {},
2614
+ "compositePrimaryKeys": {},
2615
+ "uniqueConstraints": {},
2616
+ "checkConstraints": {}
2617
+ },
2618
+ "openhands_state": {
2619
+ "name": "openhands_state",
2620
+ "columns": {
2621
+ "name": {
2622
+ "name": "name",
2623
+ "type": "text",
2624
+ "primaryKey": true,
2625
+ "notNull": true,
2626
+ "autoincrement": false
2627
+ },
2628
+ "value": {
2629
+ "name": "value",
2630
+ "type": "text",
2631
+ "primaryKey": false,
2632
+ "notNull": true,
2633
+ "autoincrement": false
2634
+ }
2635
+ },
2636
+ "indexes": {},
2637
+ "foreignKeys": {},
2638
+ "compositePrimaryKeys": {},
2639
+ "uniqueConstraints": {},
2640
+ "checkConstraints": {}
2641
+ },
2642
+ "review_billing_delegations": {
2643
+ "name": "review_billing_delegations",
2644
+ "columns": {
2645
+ "source_id": {
2646
+ "name": "source_id",
2647
+ "type": "text",
2648
+ "primaryKey": true,
2649
+ "notNull": true,
2650
+ "autoincrement": false
2651
+ },
2652
+ "payer_did": {
2653
+ "name": "payer_did",
2654
+ "type": "text",
2655
+ "primaryKey": false,
2656
+ "notNull": true,
2657
+ "autoincrement": false
2658
+ },
2659
+ "delegation_cid": {
2660
+ "name": "delegation_cid",
2661
+ "type": "text",
2662
+ "primaryKey": false,
2663
+ "notNull": true,
2664
+ "autoincrement": false
2665
+ },
2666
+ "max_amount": {
2667
+ "name": "max_amount",
2668
+ "type": "text",
2669
+ "primaryKey": false,
2670
+ "notNull": true,
2671
+ "autoincrement": false
2672
+ },
2673
+ "cap_upay": {
2674
+ "name": "cap_upay",
2675
+ "type": "integer",
2676
+ "primaryKey": false,
2677
+ "notNull": true,
2678
+ "autoincrement": false
2679
+ },
2680
+ "spent_upay": {
2681
+ "name": "spent_upay",
2682
+ "type": "integer",
2683
+ "primaryKey": false,
2684
+ "notNull": true,
2685
+ "autoincrement": false,
2686
+ "default": 0
2687
+ },
2688
+ "expires_at": {
2689
+ "name": "expires_at",
2690
+ "type": "integer",
2691
+ "primaryKey": false,
2692
+ "notNull": true,
2693
+ "autoincrement": false
2694
+ },
2695
+ "not_before": {
2696
+ "name": "not_before",
2697
+ "type": "integer",
2698
+ "primaryKey": false,
2699
+ "notNull": false,
2700
+ "autoincrement": false
2701
+ },
2702
+ "delegation_ciphertext": {
2703
+ "name": "delegation_ciphertext",
2704
+ "type": "text",
2705
+ "primaryKey": false,
2706
+ "notNull": true,
2707
+ "autoincrement": false
2708
+ },
2709
+ "created_by": {
2710
+ "name": "created_by",
2711
+ "type": "text",
2712
+ "primaryKey": false,
2713
+ "notNull": true,
2714
+ "autoincrement": false
2715
+ },
2716
+ "created_at": {
2717
+ "name": "created_at",
2718
+ "type": "integer",
2719
+ "primaryKey": false,
2720
+ "notNull": true,
2721
+ "autoincrement": false
2722
+ },
2723
+ "updated_at": {
2724
+ "name": "updated_at",
2725
+ "type": "integer",
2726
+ "primaryKey": false,
2727
+ "notNull": true,
2728
+ "autoincrement": false
2729
+ }
2730
+ },
2731
+ "indexes": {
2732
+ "review_billing_delegations_expires_idx": {
2733
+ "name": "review_billing_delegations_expires_idx",
2734
+ "columns": [
2735
+ "expires_at"
2736
+ ],
2737
+ "isUnique": false
2738
+ }
2739
+ },
2740
+ "foreignKeys": {},
2741
+ "compositePrimaryKeys": {},
2742
+ "uniqueConstraints": {},
2743
+ "checkConstraints": {}
2744
+ },
2745
+ "watched_collections": {
2746
+ "name": "watched_collections",
2747
+ "columns": {
2748
+ "collection_id": {
2749
+ "name": "collection_id",
2750
+ "type": "text",
2751
+ "primaryKey": true,
2752
+ "notNull": true,
2753
+ "autoincrement": false
2754
+ },
2755
+ "owner_did": {
2756
+ "name": "owner_did",
2757
+ "type": "text",
2758
+ "primaryKey": false,
2759
+ "notNull": true,
2760
+ "autoincrement": false
2761
+ },
2762
+ "enrolled_by_did": {
2763
+ "name": "enrolled_by_did",
2764
+ "type": "text",
2765
+ "primaryKey": false,
2766
+ "notNull": true,
2767
+ "autoincrement": false
2768
+ },
2769
+ "evaluation_denom": {
2770
+ "name": "evaluation_denom",
2771
+ "type": "text",
2772
+ "primaryKey": false,
2773
+ "notNull": false,
2774
+ "autoincrement": false
2775
+ },
2776
+ "evaluation_amount": {
2777
+ "name": "evaluation_amount",
2778
+ "type": "text",
2779
+ "primaryKey": false,
2780
+ "notNull": false,
2781
+ "autoincrement": false
2782
+ },
2783
+ "protocol_did": {
2784
+ "name": "protocol_did",
2785
+ "type": "text",
2786
+ "primaryKey": false,
2787
+ "notNull": false,
2788
+ "autoincrement": false
2789
+ },
2790
+ "rubric_id": {
2791
+ "name": "rubric_id",
2792
+ "type": "text",
2793
+ "primaryKey": false,
2794
+ "notNull": false,
2795
+ "autoincrement": false
2796
+ },
2797
+ "delegation_car": {
2798
+ "name": "delegation_car",
2799
+ "type": "text",
2800
+ "primaryKey": false,
2801
+ "notNull": false,
2802
+ "autoincrement": false
2803
+ },
2804
+ "delegation_expires_at": {
2805
+ "name": "delegation_expires_at",
2806
+ "type": "integer",
2807
+ "primaryKey": false,
2808
+ "notNull": false,
2809
+ "autoincrement": false
2810
+ },
2811
+ "contact_email": {
2812
+ "name": "contact_email",
2813
+ "type": "text",
2814
+ "primaryKey": false,
2815
+ "notNull": false,
2816
+ "autoincrement": false
2817
+ },
2818
+ "status": {
2819
+ "name": "status",
2820
+ "type": "text",
2821
+ "primaryKey": false,
2822
+ "notNull": true,
2823
+ "autoincrement": false,
2824
+ "default": "'active'"
2825
+ },
2826
+ "paused_reason": {
2827
+ "name": "paused_reason",
2828
+ "type": "text",
2829
+ "primaryKey": false,
2830
+ "notNull": false,
2831
+ "autoincrement": false
2832
+ },
2833
+ "billing_source_id": {
2834
+ "name": "billing_source_id",
2835
+ "type": "text",
2836
+ "primaryKey": false,
2837
+ "notNull": false,
2838
+ "autoincrement": false
2839
+ },
2840
+ "cursor": {
2841
+ "name": "cursor",
2842
+ "type": "text",
2843
+ "primaryKey": false,
2844
+ "notNull": false,
2845
+ "autoincrement": false
2846
+ },
2847
+ "last_scanned_at": {
2848
+ "name": "last_scanned_at",
2849
+ "type": "integer",
2850
+ "primaryKey": false,
2851
+ "notNull": false,
2852
+ "autoincrement": false
2853
+ },
2854
+ "next_scan_at": {
2855
+ "name": "next_scan_at",
2856
+ "type": "integer",
2857
+ "primaryKey": false,
2858
+ "notNull": false,
2859
+ "autoincrement": false
2860
+ },
2861
+ "operator_amounts": {
2862
+ "name": "operator_amounts",
2863
+ "type": "text",
2864
+ "primaryKey": false,
2865
+ "notNull": true,
2866
+ "autoincrement": false,
2867
+ "default": "'off'"
2868
+ },
2869
+ "operator_amounts_by": {
2870
+ "name": "operator_amounts_by",
2871
+ "type": "text",
2872
+ "primaryKey": false,
2873
+ "notNull": false,
2874
+ "autoincrement": false
2875
+ },
2876
+ "created_at": {
2877
+ "name": "created_at",
2878
+ "type": "integer",
2879
+ "primaryKey": false,
2880
+ "notNull": true,
2881
+ "autoincrement": false
2882
+ },
2883
+ "updated_at": {
2884
+ "name": "updated_at",
2885
+ "type": "integer",
2886
+ "primaryKey": false,
2887
+ "notNull": true,
2888
+ "autoincrement": false
2889
+ }
2890
+ },
2891
+ "indexes": {
2892
+ "watched_collections_status_last_scanned_idx": {
2893
+ "name": "watched_collections_status_last_scanned_idx",
2894
+ "columns": [
2895
+ "status",
2896
+ "last_scanned_at"
2897
+ ],
2898
+ "isUnique": false
2899
+ }
2900
+ },
2901
+ "foreignKeys": {},
2902
+ "compositePrimaryKeys": {},
2903
+ "uniqueConstraints": {},
2904
+ "checkConstraints": {}
2905
+ },
2906
+ "webhook_endpoints": {
2907
+ "name": "webhook_endpoints",
2908
+ "columns": {
2909
+ "endpoint_id": {
2910
+ "name": "endpoint_id",
2911
+ "type": "text",
2912
+ "primaryKey": true,
2913
+ "notNull": true,
2914
+ "autoincrement": false
2915
+ },
2916
+ "source_id": {
2917
+ "name": "source_id",
2918
+ "type": "text",
2919
+ "primaryKey": false,
2920
+ "notNull": true,
2921
+ "autoincrement": false
2922
+ },
2923
+ "url": {
2924
+ "name": "url",
2925
+ "type": "text",
2926
+ "primaryKey": false,
2927
+ "notNull": true,
2928
+ "autoincrement": false
2929
+ },
2930
+ "secret_ciphertext": {
2931
+ "name": "secret_ciphertext",
2932
+ "type": "text",
2933
+ "primaryKey": false,
2934
+ "notNull": true,
2935
+ "autoincrement": false
2936
+ },
2937
+ "previous_secret_ciphertext": {
2938
+ "name": "previous_secret_ciphertext",
2939
+ "type": "text",
2940
+ "primaryKey": false,
2941
+ "notNull": false,
2942
+ "autoincrement": false
2943
+ },
2944
+ "previous_secret_expires_at": {
2945
+ "name": "previous_secret_expires_at",
2946
+ "type": "integer",
2947
+ "primaryKey": false,
2948
+ "notNull": false,
2949
+ "autoincrement": false
2950
+ },
2951
+ "events": {
2952
+ "name": "events",
2953
+ "type": "text",
2954
+ "primaryKey": false,
2955
+ "notNull": true,
2956
+ "autoincrement": false,
2957
+ "default": "'[]'"
2958
+ },
2959
+ "status": {
2960
+ "name": "status",
2961
+ "type": "text",
2962
+ "primaryKey": false,
2963
+ "notNull": true,
2964
+ "autoincrement": false,
2965
+ "default": "'active'"
2966
+ },
2967
+ "description": {
2968
+ "name": "description",
2969
+ "type": "text",
2970
+ "primaryKey": false,
2971
+ "notNull": false,
2972
+ "autoincrement": false
2973
+ },
2974
+ "created_at": {
2975
+ "name": "created_at",
2976
+ "type": "integer",
2977
+ "primaryKey": false,
2978
+ "notNull": true,
2979
+ "autoincrement": false
2980
+ },
2981
+ "updated_at": {
2982
+ "name": "updated_at",
2983
+ "type": "integer",
2984
+ "primaryKey": false,
2985
+ "notNull": true,
2986
+ "autoincrement": false
2987
+ }
2988
+ },
2989
+ "indexes": {
2990
+ "webhook_endpoints_source_idx": {
2991
+ "name": "webhook_endpoints_source_idx",
2992
+ "columns": [
2993
+ "source_id"
2994
+ ],
2995
+ "isUnique": false
2996
+ }
2997
+ },
2998
+ "foreignKeys": {},
2999
+ "compositePrimaryKeys": {},
3000
+ "uniqueConstraints": {},
3001
+ "checkConstraints": {}
3002
+ }
3003
+ },
3004
+ "views": {},
3005
+ "enums": {},
3006
+ "_meta": {
3007
+ "schemas": {},
3008
+ "tables": {},
3009
+ "columns": {}
3010
+ },
3011
+ "internal": {
3012
+ "indexes": {}
3013
+ }
3014
+ }