@ixo/decision-oracle 0.2.11 → 0.2.13

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 (83) hide show
  1. package/README.md +14 -13
  2. package/dist/cli/commands/derive.d.ts +6 -2
  3. package/dist/cli/commands/derive.d.ts.map +1 -1
  4. package/dist/cli/commands/derive.js +33 -3
  5. package/dist/cli/commands/derive.js.map +1 -1
  6. package/dist/cli/commands/engine.d.ts.map +1 -1
  7. package/dist/cli/commands/engine.js +9 -2
  8. package/dist/cli/commands/engine.js.map +1 -1
  9. package/dist/cli/commands/init.js +2 -2
  10. package/dist/cli/commands/oracle-init.d.ts.map +1 -1
  11. package/dist/cli/commands/oracle-init.js +2 -2
  12. package/dist/cli/commands/oracle-init.js.map +1 -1
  13. package/dist/cli/commands/reviewer-note.d.ts +11 -0
  14. package/dist/cli/commands/reviewer-note.d.ts.map +1 -0
  15. package/dist/cli/commands/reviewer-note.js +36 -0
  16. package/dist/cli/commands/reviewer-note.js.map +1 -0
  17. package/dist/cli/index.js +26 -85
  18. package/dist/cli/index.js.map +1 -1
  19. package/dist/cli/lib/usage.d.ts +11 -0
  20. package/dist/cli/lib/usage.d.ts.map +1 -0
  21. package/dist/cli/lib/usage.js +113 -0
  22. package/dist/cli/lib/usage.js.map +1 -0
  23. package/dist/config.d.ts +9 -0
  24. package/dist/config.d.ts.map +1 -1
  25. package/dist/config.js +15 -1
  26. package/dist/config.js.map +1 -1
  27. package/dist/db/schema.d.ts +20 -0
  28. package/dist/db/schema.d.ts.map +1 -1
  29. package/dist/db/schema.js +7 -0
  30. package/dist/db/schema.js.map +1 -1
  31. package/dist/lib/api-lane/retention.d.ts.map +1 -1
  32. package/dist/lib/api-lane/retention.js +5 -1
  33. package/dist/lib/api-lane/retention.js.map +1 -1
  34. package/dist/lib/claim-erase.d.ts.map +1 -1
  35. package/dist/lib/claim-erase.js +5 -1
  36. package/dist/lib/claim-erase.js.map +1 -1
  37. package/dist/lib/redact.d.ts.map +1 -1
  38. package/dist/lib/redact.js +1 -0
  39. package/dist/lib/redact.js.map +1 -1
  40. package/dist/lib/review/reviewer-note-prompt.d.ts +43 -0
  41. package/dist/lib/review/reviewer-note-prompt.d.ts.map +1 -0
  42. package/dist/lib/review/reviewer-note-prompt.js +106 -0
  43. package/dist/lib/review/reviewer-note-prompt.js.map +1 -0
  44. package/dist/lib/review/reviewer-note.d.ts +67 -0
  45. package/dist/lib/review/reviewer-note.d.ts.map +1 -0
  46. package/dist/lib/review/reviewer-note.js +138 -0
  47. package/dist/lib/review/reviewer-note.js.map +1 -0
  48. package/dist/middleware/capability.d.ts +1 -1
  49. package/dist/middleware/capability.d.ts.map +1 -1
  50. package/dist/middleware/capability.js +4 -0
  51. package/dist/middleware/capability.js.map +1 -1
  52. package/dist/middleware/error-handler.d.ts.map +1 -1
  53. package/dist/middleware/error-handler.js +11 -0
  54. package/dist/middleware/error-handler.js.map +1 -1
  55. package/dist/oracle.d.ts +1 -0
  56. package/dist/oracle.d.ts.map +1 -1
  57. package/dist/oracle.js +7 -0
  58. package/dist/oracle.js.map +1 -1
  59. package/dist/routes/v1/admin.d.ts.map +1 -1
  60. package/dist/routes/v1/admin.js +59 -0
  61. package/dist/routes/v1/admin.js.map +1 -1
  62. package/dist/routes/v1/claims.js +3 -0
  63. package/dist/routes/v1/claims.js.map +1 -1
  64. package/dist/routes/v1/reviews.js +2 -0
  65. package/dist/routes/v1/reviews.js.map +1 -1
  66. package/dist/workflows/claim-ingest.d.ts.map +1 -1
  67. package/dist/workflows/claim-ingest.js +23 -0
  68. package/dist/workflows/claim-ingest.js.map +1 -1
  69. package/docs/api.md +10 -3
  70. package/docs/guide.md +21 -9
  71. package/migrations/0026_reviewer_note.sql +1 -0
  72. package/migrations/meta/0026_snapshot.json +2983 -0
  73. package/migrations/meta/_journal.json +7 -0
  74. package/package.json +1 -1
  75. package/skills/create-oracle/SKILL.md +17 -13
  76. package/skills/create-rubric/SKILL.md +7 -0
  77. package/skills/create-rubric/reference/format-cheatsheet.md +20 -0
  78. package/skills/decision-api-oracle/SKILL.md +2 -2
  79. package/templates/project/README.md +4 -3
  80. package/templates/project/package.json +1 -0
  81. package/templates/project/src/facts/index.ts +6 -2
  82. package/templates/project/src/index.ts +3 -1
  83. package/templates/project/wrangler.jsonc +116 -11
@@ -0,0 +1,2983 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "63b72f79-7cfd-4fc5-813f-028fbf149ae2",
5
+ "prevId": "ce2e1ae2-34ec-4d27-89a1-159a531d47eb",
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
+ "decisions": {
1865
+ "name": "decisions",
1866
+ "columns": {
1867
+ "claim_id": {
1868
+ "name": "claim_id",
1869
+ "type": "text",
1870
+ "primaryKey": true,
1871
+ "notNull": true,
1872
+ "autoincrement": false
1873
+ },
1874
+ "collection_id": {
1875
+ "name": "collection_id",
1876
+ "type": "text",
1877
+ "primaryKey": false,
1878
+ "notNull": true,
1879
+ "autoincrement": false
1880
+ },
1881
+ "rubric_id": {
1882
+ "name": "rubric_id",
1883
+ "type": "text",
1884
+ "primaryKey": false,
1885
+ "notNull": false,
1886
+ "autoincrement": false
1887
+ },
1888
+ "facts_digest": {
1889
+ "name": "facts_digest",
1890
+ "type": "text",
1891
+ "primaryKey": false,
1892
+ "notNull": false,
1893
+ "autoincrement": false
1894
+ },
1895
+ "verdict": {
1896
+ "name": "verdict",
1897
+ "type": "text",
1898
+ "primaryKey": false,
1899
+ "notNull": false,
1900
+ "autoincrement": false
1901
+ },
1902
+ "status": {
1903
+ "name": "status",
1904
+ "type": "text",
1905
+ "primaryKey": false,
1906
+ "notNull": true,
1907
+ "autoincrement": false
1908
+ },
1909
+ "result_digest": {
1910
+ "name": "result_digest",
1911
+ "type": "text",
1912
+ "primaryKey": false,
1913
+ "notNull": false,
1914
+ "autoincrement": false
1915
+ },
1916
+ "receipt_cid": {
1917
+ "name": "receipt_cid",
1918
+ "type": "text",
1919
+ "primaryKey": false,
1920
+ "notNull": false,
1921
+ "autoincrement": false
1922
+ },
1923
+ "receipt_jws": {
1924
+ "name": "receipt_jws",
1925
+ "type": "text",
1926
+ "primaryKey": false,
1927
+ "notNull": false,
1928
+ "autoincrement": false
1929
+ },
1930
+ "decision": {
1931
+ "name": "decision",
1932
+ "type": "text",
1933
+ "primaryKey": false,
1934
+ "notNull": false,
1935
+ "autoincrement": false
1936
+ },
1937
+ "explanation": {
1938
+ "name": "explanation",
1939
+ "type": "text",
1940
+ "primaryKey": false,
1941
+ "notNull": false,
1942
+ "autoincrement": false
1943
+ },
1944
+ "facts": {
1945
+ "name": "facts",
1946
+ "type": "text",
1947
+ "primaryKey": false,
1948
+ "notNull": false,
1949
+ "autoincrement": false
1950
+ },
1951
+ "errored_facts": {
1952
+ "name": "errored_facts",
1953
+ "type": "text",
1954
+ "primaryKey": false,
1955
+ "notNull": false,
1956
+ "autoincrement": false
1957
+ },
1958
+ "reviewer_note": {
1959
+ "name": "reviewer_note",
1960
+ "type": "text",
1961
+ "primaryKey": false,
1962
+ "notNull": false,
1963
+ "autoincrement": false
1964
+ },
1965
+ "pending_task_details": {
1966
+ "name": "pending_task_details",
1967
+ "type": "text",
1968
+ "primaryKey": false,
1969
+ "notNull": false,
1970
+ "autoincrement": false
1971
+ },
1972
+ "chain_status": {
1973
+ "name": "chain_status",
1974
+ "type": "text",
1975
+ "primaryKey": false,
1976
+ "notNull": true,
1977
+ "autoincrement": false,
1978
+ "default": "'pending'"
1979
+ },
1980
+ "tx_hash": {
1981
+ "name": "tx_hash",
1982
+ "type": "text",
1983
+ "primaryKey": false,
1984
+ "notNull": false,
1985
+ "autoincrement": false
1986
+ },
1987
+ "chain_error": {
1988
+ "name": "chain_error",
1989
+ "type": "text",
1990
+ "primaryKey": false,
1991
+ "notNull": false,
1992
+ "autoincrement": false
1993
+ },
1994
+ "created_at": {
1995
+ "name": "created_at",
1996
+ "type": "integer",
1997
+ "primaryKey": false,
1998
+ "notNull": true,
1999
+ "autoincrement": false
2000
+ },
2001
+ "updated_at": {
2002
+ "name": "updated_at",
2003
+ "type": "integer",
2004
+ "primaryKey": false,
2005
+ "notNull": true,
2006
+ "autoincrement": false
2007
+ }
2008
+ },
2009
+ "indexes": {
2010
+ "decisions_status_created_idx": {
2011
+ "name": "decisions_status_created_idx",
2012
+ "columns": [
2013
+ "status",
2014
+ "created_at"
2015
+ ],
2016
+ "isUnique": false
2017
+ },
2018
+ "dec_collection_chain": {
2019
+ "name": "dec_collection_chain",
2020
+ "columns": [
2021
+ "collection_id",
2022
+ "chain_status",
2023
+ "created_at"
2024
+ ],
2025
+ "isUnique": false
2026
+ }
2027
+ },
2028
+ "foreignKeys": {},
2029
+ "compositePrimaryKeys": {},
2030
+ "uniqueConstraints": {},
2031
+ "checkConstraints": {}
2032
+ },
2033
+ "fact_cache": {
2034
+ "name": "fact_cache",
2035
+ "columns": {
2036
+ "claim_id": {
2037
+ "name": "claim_id",
2038
+ "type": "text",
2039
+ "primaryKey": false,
2040
+ "notNull": true,
2041
+ "autoincrement": false
2042
+ },
2043
+ "rubric_id": {
2044
+ "name": "rubric_id",
2045
+ "type": "text",
2046
+ "primaryKey": false,
2047
+ "notNull": true,
2048
+ "autoincrement": false
2049
+ },
2050
+ "kind": {
2051
+ "name": "kind",
2052
+ "type": "text",
2053
+ "primaryKey": false,
2054
+ "notNull": true,
2055
+ "autoincrement": false
2056
+ },
2057
+ "name": {
2058
+ "name": "name",
2059
+ "type": "text",
2060
+ "primaryKey": false,
2061
+ "notNull": true,
2062
+ "autoincrement": false
2063
+ },
2064
+ "fact": {
2065
+ "name": "fact",
2066
+ "type": "text",
2067
+ "primaryKey": false,
2068
+ "notNull": true,
2069
+ "autoincrement": false
2070
+ },
2071
+ "created_at": {
2072
+ "name": "created_at",
2073
+ "type": "integer",
2074
+ "primaryKey": false,
2075
+ "notNull": true,
2076
+ "autoincrement": false
2077
+ }
2078
+ },
2079
+ "indexes": {},
2080
+ "foreignKeys": {},
2081
+ "compositePrimaryKeys": {
2082
+ "fact_cache_claim_id_rubric_id_kind_name_pk": {
2083
+ "columns": [
2084
+ "claim_id",
2085
+ "rubric_id",
2086
+ "kind",
2087
+ "name"
2088
+ ],
2089
+ "name": "fact_cache_claim_id_rubric_id_kind_name_pk"
2090
+ }
2091
+ },
2092
+ "uniqueConstraints": {},
2093
+ "checkConstraints": {}
2094
+ },
2095
+ "matrix_deliveries": {
2096
+ "name": "matrix_deliveries",
2097
+ "columns": {
2098
+ "dedupe_key": {
2099
+ "name": "dedupe_key",
2100
+ "type": "text",
2101
+ "primaryKey": true,
2102
+ "notNull": true,
2103
+ "autoincrement": false
2104
+ },
2105
+ "kind": {
2106
+ "name": "kind",
2107
+ "type": "text",
2108
+ "primaryKey": false,
2109
+ "notNull": true,
2110
+ "autoincrement": false
2111
+ },
2112
+ "claim_id": {
2113
+ "name": "claim_id",
2114
+ "type": "text",
2115
+ "primaryKey": false,
2116
+ "notNull": false,
2117
+ "autoincrement": false
2118
+ },
2119
+ "collection_id": {
2120
+ "name": "collection_id",
2121
+ "type": "text",
2122
+ "primaryKey": false,
2123
+ "notNull": false,
2124
+ "autoincrement": false
2125
+ },
2126
+ "room_id": {
2127
+ "name": "room_id",
2128
+ "type": "text",
2129
+ "primaryKey": false,
2130
+ "notNull": false,
2131
+ "autoincrement": false
2132
+ },
2133
+ "event_id": {
2134
+ "name": "event_id",
2135
+ "type": "text",
2136
+ "primaryKey": false,
2137
+ "notNull": false,
2138
+ "autoincrement": false
2139
+ },
2140
+ "result_digest": {
2141
+ "name": "result_digest",
2142
+ "type": "text",
2143
+ "primaryKey": false,
2144
+ "notNull": false,
2145
+ "autoincrement": false
2146
+ },
2147
+ "status": {
2148
+ "name": "status",
2149
+ "type": "text",
2150
+ "primaryKey": false,
2151
+ "notNull": true,
2152
+ "autoincrement": false,
2153
+ "default": "'failed'"
2154
+ },
2155
+ "attempts": {
2156
+ "name": "attempts",
2157
+ "type": "integer",
2158
+ "primaryKey": false,
2159
+ "notNull": true,
2160
+ "autoincrement": false,
2161
+ "default": 0
2162
+ },
2163
+ "last_error": {
2164
+ "name": "last_error",
2165
+ "type": "text",
2166
+ "primaryKey": false,
2167
+ "notNull": false,
2168
+ "autoincrement": false
2169
+ },
2170
+ "source_id": {
2171
+ "name": "source_id",
2172
+ "type": "text",
2173
+ "primaryKey": false,
2174
+ "notNull": false,
2175
+ "autoincrement": false
2176
+ },
2177
+ "endpoint_id": {
2178
+ "name": "endpoint_id",
2179
+ "type": "text",
2180
+ "primaryKey": false,
2181
+ "notNull": false,
2182
+ "autoincrement": false
2183
+ },
2184
+ "target_url": {
2185
+ "name": "target_url",
2186
+ "type": "text",
2187
+ "primaryKey": false,
2188
+ "notNull": false,
2189
+ "autoincrement": false
2190
+ },
2191
+ "event_type": {
2192
+ "name": "event_type",
2193
+ "type": "text",
2194
+ "primaryKey": false,
2195
+ "notNull": false,
2196
+ "autoincrement": false
2197
+ },
2198
+ "payload": {
2199
+ "name": "payload",
2200
+ "type": "text",
2201
+ "primaryKey": false,
2202
+ "notNull": false,
2203
+ "autoincrement": false
2204
+ },
2205
+ "next_attempt_at": {
2206
+ "name": "next_attempt_at",
2207
+ "type": "integer",
2208
+ "primaryKey": false,
2209
+ "notNull": false,
2210
+ "autoincrement": false
2211
+ },
2212
+ "last_status_code": {
2213
+ "name": "last_status_code",
2214
+ "type": "integer",
2215
+ "primaryKey": false,
2216
+ "notNull": false,
2217
+ "autoincrement": false
2218
+ },
2219
+ "created_at": {
2220
+ "name": "created_at",
2221
+ "type": "integer",
2222
+ "primaryKey": false,
2223
+ "notNull": true,
2224
+ "autoincrement": false
2225
+ },
2226
+ "updated_at": {
2227
+ "name": "updated_at",
2228
+ "type": "integer",
2229
+ "primaryKey": false,
2230
+ "notNull": true,
2231
+ "autoincrement": false
2232
+ }
2233
+ },
2234
+ "indexes": {
2235
+ "matrix_deliveries_claim_idx": {
2236
+ "name": "matrix_deliveries_claim_idx",
2237
+ "columns": [
2238
+ "claim_id"
2239
+ ],
2240
+ "isUnique": false
2241
+ },
2242
+ "matrix_deliveries_due_idx": {
2243
+ "name": "matrix_deliveries_due_idx",
2244
+ "columns": [
2245
+ "kind",
2246
+ "status",
2247
+ "next_attempt_at"
2248
+ ],
2249
+ "isUnique": false
2250
+ },
2251
+ "matrix_deliveries_source_created_idx": {
2252
+ "name": "matrix_deliveries_source_created_idx",
2253
+ "columns": [
2254
+ "source_id",
2255
+ "created_at"
2256
+ ],
2257
+ "isUnique": false
2258
+ },
2259
+ "matrix_deliveries_kind_created_idx": {
2260
+ "name": "matrix_deliveries_kind_created_idx",
2261
+ "columns": [
2262
+ "kind",
2263
+ "created_at"
2264
+ ],
2265
+ "isUnique": false
2266
+ }
2267
+ },
2268
+ "foreignKeys": {},
2269
+ "compositePrimaryKeys": {},
2270
+ "uniqueConstraints": {},
2271
+ "checkConstraints": {}
2272
+ },
2273
+ "mcp_approvals": {
2274
+ "name": "mcp_approvals",
2275
+ "columns": {
2276
+ "id": {
2277
+ "name": "id",
2278
+ "type": "text",
2279
+ "primaryKey": true,
2280
+ "notNull": true,
2281
+ "autoincrement": false
2282
+ },
2283
+ "grant_id": {
2284
+ "name": "grant_id",
2285
+ "type": "text",
2286
+ "primaryKey": false,
2287
+ "notNull": true,
2288
+ "autoincrement": false
2289
+ },
2290
+ "did": {
2291
+ "name": "did",
2292
+ "type": "text",
2293
+ "primaryKey": false,
2294
+ "notNull": true,
2295
+ "autoincrement": false
2296
+ },
2297
+ "source_id": {
2298
+ "name": "source_id",
2299
+ "type": "text",
2300
+ "primaryKey": false,
2301
+ "notNull": true,
2302
+ "autoincrement": false
2303
+ },
2304
+ "protocol_did": {
2305
+ "name": "protocol_did",
2306
+ "type": "text",
2307
+ "primaryKey": false,
2308
+ "notNull": true,
2309
+ "autoincrement": false
2310
+ },
2311
+ "client_id": {
2312
+ "name": "client_id",
2313
+ "type": "text",
2314
+ "primaryKey": false,
2315
+ "notNull": true,
2316
+ "autoincrement": false
2317
+ },
2318
+ "client_name": {
2319
+ "name": "client_name",
2320
+ "type": "text",
2321
+ "primaryKey": false,
2322
+ "notNull": true,
2323
+ "autoincrement": false
2324
+ },
2325
+ "request_digest": {
2326
+ "name": "request_digest",
2327
+ "type": "text",
2328
+ "primaryKey": false,
2329
+ "notNull": true,
2330
+ "autoincrement": false
2331
+ },
2332
+ "price": {
2333
+ "name": "price",
2334
+ "type": "text",
2335
+ "primaryKey": false,
2336
+ "notNull": true,
2337
+ "autoincrement": false
2338
+ },
2339
+ "max_amount_upay": {
2340
+ "name": "max_amount_upay",
2341
+ "type": "text",
2342
+ "primaryKey": false,
2343
+ "notNull": true,
2344
+ "autoincrement": false
2345
+ },
2346
+ "billing_mode": {
2347
+ "name": "billing_mode",
2348
+ "type": "text",
2349
+ "primaryKey": false,
2350
+ "notNull": true,
2351
+ "autoincrement": false
2352
+ },
2353
+ "status": {
2354
+ "name": "status",
2355
+ "type": "text",
2356
+ "primaryKey": false,
2357
+ "notNull": true,
2358
+ "autoincrement": false,
2359
+ "default": "'pending'"
2360
+ },
2361
+ "delegation": {
2362
+ "name": "delegation",
2363
+ "type": "text",
2364
+ "primaryKey": false,
2365
+ "notNull": false,
2366
+ "autoincrement": false
2367
+ },
2368
+ "offer_id": {
2369
+ "name": "offer_id",
2370
+ "type": "text",
2371
+ "primaryKey": false,
2372
+ "notNull": false,
2373
+ "autoincrement": false
2374
+ },
2375
+ "payment_intent_id": {
2376
+ "name": "payment_intent_id",
2377
+ "type": "text",
2378
+ "primaryKey": false,
2379
+ "notNull": false,
2380
+ "autoincrement": false
2381
+ },
2382
+ "expires_at": {
2383
+ "name": "expires_at",
2384
+ "type": "integer",
2385
+ "primaryKey": false,
2386
+ "notNull": true,
2387
+ "autoincrement": false
2388
+ },
2389
+ "created_at": {
2390
+ "name": "created_at",
2391
+ "type": "integer",
2392
+ "primaryKey": false,
2393
+ "notNull": true,
2394
+ "autoincrement": false
2395
+ }
2396
+ },
2397
+ "indexes": {
2398
+ "mcp_approvals_live_idx": {
2399
+ "name": "mcp_approvals_live_idx",
2400
+ "columns": [
2401
+ "grant_id",
2402
+ "request_digest"
2403
+ ],
2404
+ "isUnique": true,
2405
+ "where": "status in ('pending', 'approved', 'awaiting_3ds')"
2406
+ },
2407
+ "mcp_approvals_expires_idx": {
2408
+ "name": "mcp_approvals_expires_idx",
2409
+ "columns": [
2410
+ "expires_at"
2411
+ ],
2412
+ "isUnique": false
2413
+ }
2414
+ },
2415
+ "foreignKeys": {},
2416
+ "compositePrimaryKeys": {},
2417
+ "uniqueConstraints": {},
2418
+ "checkConstraints": {}
2419
+ },
2420
+ "mcp_standing": {
2421
+ "name": "mcp_standing",
2422
+ "columns": {
2423
+ "grant_id": {
2424
+ "name": "grant_id",
2425
+ "type": "text",
2426
+ "primaryKey": true,
2427
+ "notNull": true,
2428
+ "autoincrement": false
2429
+ },
2430
+ "did": {
2431
+ "name": "did",
2432
+ "type": "text",
2433
+ "primaryKey": false,
2434
+ "notNull": true,
2435
+ "autoincrement": false
2436
+ },
2437
+ "per_claim_upay": {
2438
+ "name": "per_claim_upay",
2439
+ "type": "integer",
2440
+ "primaryKey": false,
2441
+ "notNull": true,
2442
+ "autoincrement": false
2443
+ },
2444
+ "total_upay": {
2445
+ "name": "total_upay",
2446
+ "type": "integer",
2447
+ "primaryKey": false,
2448
+ "notNull": true,
2449
+ "autoincrement": false
2450
+ },
2451
+ "spent_upay": {
2452
+ "name": "spent_upay",
2453
+ "type": "integer",
2454
+ "primaryKey": false,
2455
+ "notNull": true,
2456
+ "autoincrement": false,
2457
+ "default": 0
2458
+ },
2459
+ "until": {
2460
+ "name": "until",
2461
+ "type": "integer",
2462
+ "primaryKey": false,
2463
+ "notNull": true,
2464
+ "autoincrement": false
2465
+ },
2466
+ "delegation": {
2467
+ "name": "delegation",
2468
+ "type": "text",
2469
+ "primaryKey": false,
2470
+ "notNull": false,
2471
+ "autoincrement": false
2472
+ },
2473
+ "updated_at": {
2474
+ "name": "updated_at",
2475
+ "type": "integer",
2476
+ "primaryKey": false,
2477
+ "notNull": true,
2478
+ "autoincrement": false
2479
+ }
2480
+ },
2481
+ "indexes": {},
2482
+ "foreignKeys": {},
2483
+ "compositePrimaryKeys": {},
2484
+ "uniqueConstraints": {},
2485
+ "checkConstraints": {}
2486
+ },
2487
+ "mcp_standing_spends": {
2488
+ "name": "mcp_standing_spends",
2489
+ "columns": {
2490
+ "grant_id": {
2491
+ "name": "grant_id",
2492
+ "type": "text",
2493
+ "primaryKey": false,
2494
+ "notNull": true,
2495
+ "autoincrement": false
2496
+ },
2497
+ "request_digest": {
2498
+ "name": "request_digest",
2499
+ "type": "text",
2500
+ "primaryKey": false,
2501
+ "notNull": true,
2502
+ "autoincrement": false
2503
+ },
2504
+ "spend_id": {
2505
+ "name": "spend_id",
2506
+ "type": "text",
2507
+ "primaryKey": false,
2508
+ "notNull": true,
2509
+ "autoincrement": false
2510
+ },
2511
+ "upay": {
2512
+ "name": "upay",
2513
+ "type": "integer",
2514
+ "primaryKey": false,
2515
+ "notNull": true,
2516
+ "autoincrement": false
2517
+ },
2518
+ "created_at": {
2519
+ "name": "created_at",
2520
+ "type": "integer",
2521
+ "primaryKey": false,
2522
+ "notNull": true,
2523
+ "autoincrement": false
2524
+ }
2525
+ },
2526
+ "indexes": {
2527
+ "mcp_standing_spends_grant_created_idx": {
2528
+ "name": "mcp_standing_spends_grant_created_idx",
2529
+ "columns": [
2530
+ "grant_id",
2531
+ "created_at"
2532
+ ],
2533
+ "isUnique": false
2534
+ }
2535
+ },
2536
+ "foreignKeys": {},
2537
+ "compositePrimaryKeys": {
2538
+ "mcp_standing_spends_grant_id_request_digest_pk": {
2539
+ "columns": [
2540
+ "grant_id",
2541
+ "request_digest"
2542
+ ],
2543
+ "name": "mcp_standing_spends_grant_id_request_digest_pk"
2544
+ }
2545
+ },
2546
+ "uniqueConstraints": {},
2547
+ "checkConstraints": {}
2548
+ },
2549
+ "openhands_hires": {
2550
+ "name": "openhands_hires",
2551
+ "columns": {
2552
+ "collection_id": {
2553
+ "name": "collection_id",
2554
+ "type": "text",
2555
+ "primaryKey": true,
2556
+ "notNull": true,
2557
+ "autoincrement": false
2558
+ },
2559
+ "remaining": {
2560
+ "name": "remaining",
2561
+ "type": "integer",
2562
+ "primaryKey": false,
2563
+ "notNull": true,
2564
+ "autoincrement": false
2565
+ },
2566
+ "mint_quota": {
2567
+ "name": "mint_quota",
2568
+ "type": "integer",
2569
+ "primaryKey": false,
2570
+ "notNull": true,
2571
+ "autoincrement": false
2572
+ },
2573
+ "checked_at": {
2574
+ "name": "checked_at",
2575
+ "type": "text",
2576
+ "primaryKey": false,
2577
+ "notNull": true,
2578
+ "autoincrement": false
2579
+ },
2580
+ "ends_at": {
2581
+ "name": "ends_at",
2582
+ "type": "text",
2583
+ "primaryKey": false,
2584
+ "notNull": false,
2585
+ "autoincrement": false
2586
+ }
2587
+ },
2588
+ "indexes": {},
2589
+ "foreignKeys": {},
2590
+ "compositePrimaryKeys": {},
2591
+ "uniqueConstraints": {},
2592
+ "checkConstraints": {}
2593
+ },
2594
+ "openhands_state": {
2595
+ "name": "openhands_state",
2596
+ "columns": {
2597
+ "name": {
2598
+ "name": "name",
2599
+ "type": "text",
2600
+ "primaryKey": true,
2601
+ "notNull": true,
2602
+ "autoincrement": false
2603
+ },
2604
+ "value": {
2605
+ "name": "value",
2606
+ "type": "text",
2607
+ "primaryKey": false,
2608
+ "notNull": true,
2609
+ "autoincrement": false
2610
+ }
2611
+ },
2612
+ "indexes": {},
2613
+ "foreignKeys": {},
2614
+ "compositePrimaryKeys": {},
2615
+ "uniqueConstraints": {},
2616
+ "checkConstraints": {}
2617
+ },
2618
+ "review_billing_delegations": {
2619
+ "name": "review_billing_delegations",
2620
+ "columns": {
2621
+ "source_id": {
2622
+ "name": "source_id",
2623
+ "type": "text",
2624
+ "primaryKey": true,
2625
+ "notNull": true,
2626
+ "autoincrement": false
2627
+ },
2628
+ "payer_did": {
2629
+ "name": "payer_did",
2630
+ "type": "text",
2631
+ "primaryKey": false,
2632
+ "notNull": true,
2633
+ "autoincrement": false
2634
+ },
2635
+ "delegation_cid": {
2636
+ "name": "delegation_cid",
2637
+ "type": "text",
2638
+ "primaryKey": false,
2639
+ "notNull": true,
2640
+ "autoincrement": false
2641
+ },
2642
+ "max_amount": {
2643
+ "name": "max_amount",
2644
+ "type": "text",
2645
+ "primaryKey": false,
2646
+ "notNull": true,
2647
+ "autoincrement": false
2648
+ },
2649
+ "cap_upay": {
2650
+ "name": "cap_upay",
2651
+ "type": "integer",
2652
+ "primaryKey": false,
2653
+ "notNull": true,
2654
+ "autoincrement": false
2655
+ },
2656
+ "spent_upay": {
2657
+ "name": "spent_upay",
2658
+ "type": "integer",
2659
+ "primaryKey": false,
2660
+ "notNull": true,
2661
+ "autoincrement": false,
2662
+ "default": 0
2663
+ },
2664
+ "expires_at": {
2665
+ "name": "expires_at",
2666
+ "type": "integer",
2667
+ "primaryKey": false,
2668
+ "notNull": true,
2669
+ "autoincrement": false
2670
+ },
2671
+ "not_before": {
2672
+ "name": "not_before",
2673
+ "type": "integer",
2674
+ "primaryKey": false,
2675
+ "notNull": false,
2676
+ "autoincrement": false
2677
+ },
2678
+ "delegation_ciphertext": {
2679
+ "name": "delegation_ciphertext",
2680
+ "type": "text",
2681
+ "primaryKey": false,
2682
+ "notNull": true,
2683
+ "autoincrement": false
2684
+ },
2685
+ "created_by": {
2686
+ "name": "created_by",
2687
+ "type": "text",
2688
+ "primaryKey": false,
2689
+ "notNull": true,
2690
+ "autoincrement": false
2691
+ },
2692
+ "created_at": {
2693
+ "name": "created_at",
2694
+ "type": "integer",
2695
+ "primaryKey": false,
2696
+ "notNull": true,
2697
+ "autoincrement": false
2698
+ },
2699
+ "updated_at": {
2700
+ "name": "updated_at",
2701
+ "type": "integer",
2702
+ "primaryKey": false,
2703
+ "notNull": true,
2704
+ "autoincrement": false
2705
+ }
2706
+ },
2707
+ "indexes": {
2708
+ "review_billing_delegations_expires_idx": {
2709
+ "name": "review_billing_delegations_expires_idx",
2710
+ "columns": [
2711
+ "expires_at"
2712
+ ],
2713
+ "isUnique": false
2714
+ }
2715
+ },
2716
+ "foreignKeys": {},
2717
+ "compositePrimaryKeys": {},
2718
+ "uniqueConstraints": {},
2719
+ "checkConstraints": {}
2720
+ },
2721
+ "watched_collections": {
2722
+ "name": "watched_collections",
2723
+ "columns": {
2724
+ "collection_id": {
2725
+ "name": "collection_id",
2726
+ "type": "text",
2727
+ "primaryKey": true,
2728
+ "notNull": true,
2729
+ "autoincrement": false
2730
+ },
2731
+ "owner_did": {
2732
+ "name": "owner_did",
2733
+ "type": "text",
2734
+ "primaryKey": false,
2735
+ "notNull": true,
2736
+ "autoincrement": false
2737
+ },
2738
+ "enrolled_by_did": {
2739
+ "name": "enrolled_by_did",
2740
+ "type": "text",
2741
+ "primaryKey": false,
2742
+ "notNull": true,
2743
+ "autoincrement": false
2744
+ },
2745
+ "evaluation_denom": {
2746
+ "name": "evaluation_denom",
2747
+ "type": "text",
2748
+ "primaryKey": false,
2749
+ "notNull": false,
2750
+ "autoincrement": false
2751
+ },
2752
+ "evaluation_amount": {
2753
+ "name": "evaluation_amount",
2754
+ "type": "text",
2755
+ "primaryKey": false,
2756
+ "notNull": false,
2757
+ "autoincrement": false
2758
+ },
2759
+ "protocol_did": {
2760
+ "name": "protocol_did",
2761
+ "type": "text",
2762
+ "primaryKey": false,
2763
+ "notNull": false,
2764
+ "autoincrement": false
2765
+ },
2766
+ "rubric_id": {
2767
+ "name": "rubric_id",
2768
+ "type": "text",
2769
+ "primaryKey": false,
2770
+ "notNull": false,
2771
+ "autoincrement": false
2772
+ },
2773
+ "delegation_car": {
2774
+ "name": "delegation_car",
2775
+ "type": "text",
2776
+ "primaryKey": false,
2777
+ "notNull": false,
2778
+ "autoincrement": false
2779
+ },
2780
+ "delegation_expires_at": {
2781
+ "name": "delegation_expires_at",
2782
+ "type": "integer",
2783
+ "primaryKey": false,
2784
+ "notNull": false,
2785
+ "autoincrement": false
2786
+ },
2787
+ "contact_email": {
2788
+ "name": "contact_email",
2789
+ "type": "text",
2790
+ "primaryKey": false,
2791
+ "notNull": false,
2792
+ "autoincrement": false
2793
+ },
2794
+ "status": {
2795
+ "name": "status",
2796
+ "type": "text",
2797
+ "primaryKey": false,
2798
+ "notNull": true,
2799
+ "autoincrement": false,
2800
+ "default": "'active'"
2801
+ },
2802
+ "paused_reason": {
2803
+ "name": "paused_reason",
2804
+ "type": "text",
2805
+ "primaryKey": false,
2806
+ "notNull": false,
2807
+ "autoincrement": false
2808
+ },
2809
+ "billing_source_id": {
2810
+ "name": "billing_source_id",
2811
+ "type": "text",
2812
+ "primaryKey": false,
2813
+ "notNull": false,
2814
+ "autoincrement": false
2815
+ },
2816
+ "cursor": {
2817
+ "name": "cursor",
2818
+ "type": "text",
2819
+ "primaryKey": false,
2820
+ "notNull": false,
2821
+ "autoincrement": false
2822
+ },
2823
+ "last_scanned_at": {
2824
+ "name": "last_scanned_at",
2825
+ "type": "integer",
2826
+ "primaryKey": false,
2827
+ "notNull": false,
2828
+ "autoincrement": false
2829
+ },
2830
+ "operator_amounts": {
2831
+ "name": "operator_amounts",
2832
+ "type": "text",
2833
+ "primaryKey": false,
2834
+ "notNull": true,
2835
+ "autoincrement": false,
2836
+ "default": "'off'"
2837
+ },
2838
+ "operator_amounts_by": {
2839
+ "name": "operator_amounts_by",
2840
+ "type": "text",
2841
+ "primaryKey": false,
2842
+ "notNull": false,
2843
+ "autoincrement": false
2844
+ },
2845
+ "created_at": {
2846
+ "name": "created_at",
2847
+ "type": "integer",
2848
+ "primaryKey": false,
2849
+ "notNull": true,
2850
+ "autoincrement": false
2851
+ },
2852
+ "updated_at": {
2853
+ "name": "updated_at",
2854
+ "type": "integer",
2855
+ "primaryKey": false,
2856
+ "notNull": true,
2857
+ "autoincrement": false
2858
+ }
2859
+ },
2860
+ "indexes": {
2861
+ "watched_collections_status_last_scanned_idx": {
2862
+ "name": "watched_collections_status_last_scanned_idx",
2863
+ "columns": [
2864
+ "status",
2865
+ "last_scanned_at"
2866
+ ],
2867
+ "isUnique": false
2868
+ }
2869
+ },
2870
+ "foreignKeys": {},
2871
+ "compositePrimaryKeys": {},
2872
+ "uniqueConstraints": {},
2873
+ "checkConstraints": {}
2874
+ },
2875
+ "webhook_endpoints": {
2876
+ "name": "webhook_endpoints",
2877
+ "columns": {
2878
+ "endpoint_id": {
2879
+ "name": "endpoint_id",
2880
+ "type": "text",
2881
+ "primaryKey": true,
2882
+ "notNull": true,
2883
+ "autoincrement": false
2884
+ },
2885
+ "source_id": {
2886
+ "name": "source_id",
2887
+ "type": "text",
2888
+ "primaryKey": false,
2889
+ "notNull": true,
2890
+ "autoincrement": false
2891
+ },
2892
+ "url": {
2893
+ "name": "url",
2894
+ "type": "text",
2895
+ "primaryKey": false,
2896
+ "notNull": true,
2897
+ "autoincrement": false
2898
+ },
2899
+ "secret_ciphertext": {
2900
+ "name": "secret_ciphertext",
2901
+ "type": "text",
2902
+ "primaryKey": false,
2903
+ "notNull": true,
2904
+ "autoincrement": false
2905
+ },
2906
+ "previous_secret_ciphertext": {
2907
+ "name": "previous_secret_ciphertext",
2908
+ "type": "text",
2909
+ "primaryKey": false,
2910
+ "notNull": false,
2911
+ "autoincrement": false
2912
+ },
2913
+ "previous_secret_expires_at": {
2914
+ "name": "previous_secret_expires_at",
2915
+ "type": "integer",
2916
+ "primaryKey": false,
2917
+ "notNull": false,
2918
+ "autoincrement": false
2919
+ },
2920
+ "events": {
2921
+ "name": "events",
2922
+ "type": "text",
2923
+ "primaryKey": false,
2924
+ "notNull": true,
2925
+ "autoincrement": false,
2926
+ "default": "'[]'"
2927
+ },
2928
+ "status": {
2929
+ "name": "status",
2930
+ "type": "text",
2931
+ "primaryKey": false,
2932
+ "notNull": true,
2933
+ "autoincrement": false,
2934
+ "default": "'active'"
2935
+ },
2936
+ "description": {
2937
+ "name": "description",
2938
+ "type": "text",
2939
+ "primaryKey": false,
2940
+ "notNull": false,
2941
+ "autoincrement": false
2942
+ },
2943
+ "created_at": {
2944
+ "name": "created_at",
2945
+ "type": "integer",
2946
+ "primaryKey": false,
2947
+ "notNull": true,
2948
+ "autoincrement": false
2949
+ },
2950
+ "updated_at": {
2951
+ "name": "updated_at",
2952
+ "type": "integer",
2953
+ "primaryKey": false,
2954
+ "notNull": true,
2955
+ "autoincrement": false
2956
+ }
2957
+ },
2958
+ "indexes": {
2959
+ "webhook_endpoints_source_idx": {
2960
+ "name": "webhook_endpoints_source_idx",
2961
+ "columns": [
2962
+ "source_id"
2963
+ ],
2964
+ "isUnique": false
2965
+ }
2966
+ },
2967
+ "foreignKeys": {},
2968
+ "compositePrimaryKeys": {},
2969
+ "uniqueConstraints": {},
2970
+ "checkConstraints": {}
2971
+ }
2972
+ },
2973
+ "views": {},
2974
+ "enums": {},
2975
+ "_meta": {
2976
+ "schemas": {},
2977
+ "tables": {},
2978
+ "columns": {}
2979
+ },
2980
+ "internal": {
2981
+ "indexes": {}
2982
+ }
2983
+ }