@sentry/junior 0.123.0 → 0.124.1

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 (53) hide show
  1. package/dist/{agent-hooks-7JCABN73.js → agent-hooks-2YRIRKNT.js} +7 -7
  2. package/dist/api/conversations/detail.d.ts +2 -2
  3. package/dist/api/conversations/event-list.d.ts +2 -2
  4. package/dist/api/conversations/events.d.ts +1 -1
  5. package/dist/api/schema/conversation.d.ts +8 -8
  6. package/dist/api/schema.js +1 -1
  7. package/dist/api.js +25 -22
  8. package/dist/app.js +23 -23
  9. package/dist/{catalog-runtime-SZAS6EVH.js → catalog-runtime-R4N3NYWQ.js} +5 -5
  10. package/dist/chat/conversations/history.d.ts +7 -7
  11. package/dist/chat/conversations/projection.d.ts +13 -0
  12. package/dist/chat/conversations/structured-events.d.ts +31 -0
  13. package/dist/chat/services/provider-error.d.ts +2 -0
  14. package/dist/chat/tools/query-conversation-events.d.ts +1 -1
  15. package/dist/{chunk-DVPWU77W.js → chunk-5FEVPYXP.js} +7 -7
  16. package/dist/{chunk-JPG43UG7.js → chunk-5HFV6BEV.js} +9 -4
  17. package/dist/{chunk-VTWLP6YS.js → chunk-6RHGQF6H.js} +1 -1
  18. package/dist/{chunk-QKYO7ZNS.js → chunk-7SCPUYHG.js} +1 -1
  19. package/dist/{chunk-JMUPEYKC.js → chunk-AYQZCJZJ.js} +4 -4
  20. package/dist/{chunk-A3TUEGKH.js → chunk-B3Y7UZVA.js} +1 -1
  21. package/dist/{chunk-7YOBVIHY.js → chunk-BBSB62UJ.js} +1 -1
  22. package/dist/{chunk-THYOK2SL.js → chunk-DVSAX7MS.js} +3 -3
  23. package/dist/{chunk-5P4QBMTY.js → chunk-GI56KFRQ.js} +57 -11
  24. package/dist/{chunk-RQ6BLJJD.js → chunk-J45CX6IY.js} +7 -7
  25. package/dist/{chunk-DQQCWMA2.js → chunk-LCIYVQBM.js} +10 -8
  26. package/dist/{chunk-2DZD6HX2.js → chunk-MXVTNDYF.js} +4 -4
  27. package/dist/{chunk-5EUADEG3.js → chunk-OAUFSZ54.js} +1 -1
  28. package/dist/{chunk-K5DCMBUV.js → chunk-P2RFRHJS.js} +48 -6
  29. package/dist/{chunk-MU6HHZEN.js → chunk-PR3M62LK.js} +74 -0
  30. package/dist/{chunk-DAMUPWYR.js → chunk-S7KM4EQY.js} +2 -2
  31. package/dist/{chunk-XLPETJXX.js → chunk-SFYFRZ6A.js} +1 -1
  32. package/dist/{chunk-3S2K7SYY.js → chunk-TWHNWGXY.js} +39 -16
  33. package/dist/{chunk-LEQXDCWK.js → chunk-V6O47TCR.js} +1 -1
  34. package/dist/{chunk-ZOOZ25BO.js → chunk-WTB3ATMR.js} +1 -1
  35. package/dist/{chunk-ZO4TL4OK.js → chunk-XDX3QTFA.js} +4 -4
  36. package/dist/{chunk-JCJN6TPV.js → chunk-ZOYZCEYE.js} +14 -1
  37. package/dist/cli/chat.js +22 -22
  38. package/dist/cli/check.js +6 -6
  39. package/dist/cli/plugins.js +10 -10
  40. package/dist/cli/snapshot-create.js +8 -8
  41. package/dist/cli/upgrade.js +5 -5
  42. package/dist/{db-XKB2CHDW.js → db-NPESWXWE.js} +5 -5
  43. package/dist/instrumentation.js +2 -2
  44. package/dist/nitro.js +2 -2
  45. package/dist/{oauth-callback-server-EVMACH4G.js → oauth-callback-server-V6OVD7NI.js} +16 -16
  46. package/dist/{runner-BVHV5Y6L.js → runner-ORVU25XU.js} +11 -11
  47. package/dist/{skills-QTI6GGJ4.js → skills-Y3OSYR6V.js} +6 -6
  48. package/dist/{validation-SCQUYIUU.js → validation-4MRKY64W.js} +6 -6
  49. package/dist/version.js +1 -1
  50. package/migrations/0012_structured_conversation_events.sql +4 -0
  51. package/migrations/meta/0012_snapshot.json +1244 -0
  52. package/migrations/meta/_journal.json +7 -0
  53. package/package.json +5 -5
@@ -0,0 +1,1244 @@
1
+ {
2
+ "id": "4fefda78-20c0-4a45-8224-4e4420dede2e",
3
+ "prevId": "d68ca73e-2d45-4adf-a955-7226d68dddcf",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.junior_api_tokens": {
8
+ "name": "junior_api_tokens",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "owner_email_normalized": {
18
+ "name": "owner_email_normalized",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "name": {
24
+ "name": "name",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "token_hash": {
30
+ "name": "token_hash",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "token_suffix": {
36
+ "name": "token_suffix",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "created_at": {
42
+ "name": "created_at",
43
+ "type": "timestamp with time zone",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "expires_at": {
48
+ "name": "expires_at",
49
+ "type": "timestamp with time zone",
50
+ "primaryKey": false,
51
+ "notNull": true
52
+ },
53
+ "last_used_at": {
54
+ "name": "last_used_at",
55
+ "type": "timestamp with time zone",
56
+ "primaryKey": false,
57
+ "notNull": false
58
+ },
59
+ "revoked_at": {
60
+ "name": "revoked_at",
61
+ "type": "timestamp with time zone",
62
+ "primaryKey": false,
63
+ "notNull": false
64
+ }
65
+ },
66
+ "indexes": {
67
+ "junior_api_tokens_token_hash_uidx": {
68
+ "name": "junior_api_tokens_token_hash_uidx",
69
+ "columns": [
70
+ {
71
+ "expression": "token_hash",
72
+ "isExpression": false,
73
+ "asc": true,
74
+ "nulls": "last"
75
+ }
76
+ ],
77
+ "isUnique": true,
78
+ "with": {},
79
+ "method": "btree",
80
+ "concurrently": false
81
+ },
82
+ "junior_api_tokens_owner_email_idx": {
83
+ "name": "junior_api_tokens_owner_email_idx",
84
+ "columns": [
85
+ {
86
+ "expression": "owner_email_normalized",
87
+ "isExpression": false,
88
+ "asc": true,
89
+ "nulls": "last"
90
+ }
91
+ ],
92
+ "isUnique": false,
93
+ "with": {},
94
+ "method": "btree",
95
+ "concurrently": false
96
+ }
97
+ },
98
+ "foreignKeys": {},
99
+ "compositePrimaryKeys": {},
100
+ "uniqueConstraints": {},
101
+ "policies": {},
102
+ "checkConstraints": {},
103
+ "isRLSEnabled": false
104
+ },
105
+ "public.junior_conversation_annotations": {
106
+ "name": "junior_conversation_annotations",
107
+ "schema": "",
108
+ "columns": {
109
+ "conversation_id": {
110
+ "name": "conversation_id",
111
+ "type": "text",
112
+ "primaryKey": false,
113
+ "notNull": true
114
+ },
115
+ "plugin": {
116
+ "name": "plugin",
117
+ "type": "text",
118
+ "primaryKey": false,
119
+ "notNull": true
120
+ },
121
+ "kind": {
122
+ "name": "kind",
123
+ "type": "text",
124
+ "primaryKey": false,
125
+ "notNull": true
126
+ },
127
+ "key": {
128
+ "name": "key",
129
+ "type": "text",
130
+ "primaryKey": false,
131
+ "notNull": true
132
+ },
133
+ "annotation_json": {
134
+ "name": "annotation_json",
135
+ "type": "jsonb",
136
+ "primaryKey": false,
137
+ "notNull": true
138
+ },
139
+ "created_at": {
140
+ "name": "created_at",
141
+ "type": "timestamp with time zone",
142
+ "primaryKey": false,
143
+ "notNull": true
144
+ },
145
+ "updated_at": {
146
+ "name": "updated_at",
147
+ "type": "timestamp with time zone",
148
+ "primaryKey": false,
149
+ "notNull": true
150
+ }
151
+ },
152
+ "indexes": {},
153
+ "foreignKeys": {
154
+ "junior_conversation_annotations_conversation_id_fk": {
155
+ "name": "junior_conversation_annotations_conversation_id_fk",
156
+ "tableFrom": "junior_conversation_annotations",
157
+ "columnsFrom": [
158
+ "conversation_id"
159
+ ],
160
+ "tableTo": "junior_conversations",
161
+ "columnsTo": [
162
+ "conversation_id"
163
+ ],
164
+ "onUpdate": "no action",
165
+ "onDelete": "cascade"
166
+ }
167
+ },
168
+ "compositePrimaryKeys": {
169
+ "junior_conversation_annotations_pk": {
170
+ "name": "junior_conversation_annotations_pk",
171
+ "columns": [
172
+ "conversation_id",
173
+ "plugin",
174
+ "kind",
175
+ "key"
176
+ ]
177
+ }
178
+ },
179
+ "uniqueConstraints": {},
180
+ "policies": {},
181
+ "checkConstraints": {},
182
+ "isRLSEnabled": false
183
+ },
184
+ "public.junior_conversation_events": {
185
+ "name": "junior_conversation_events",
186
+ "schema": "",
187
+ "columns": {
188
+ "conversation_id": {
189
+ "name": "conversation_id",
190
+ "type": "text",
191
+ "primaryKey": false,
192
+ "notNull": true
193
+ },
194
+ "seq": {
195
+ "name": "seq",
196
+ "type": "integer",
197
+ "primaryKey": false,
198
+ "notNull": true
199
+ },
200
+ "history_version": {
201
+ "name": "history_version",
202
+ "type": "integer",
203
+ "primaryKey": false,
204
+ "notNull": true
205
+ },
206
+ "schema_version": {
207
+ "name": "schema_version",
208
+ "type": "integer",
209
+ "primaryKey": false,
210
+ "notNull": true,
211
+ "default": 1
212
+ },
213
+ "idempotency_key": {
214
+ "name": "idempotency_key",
215
+ "type": "text",
216
+ "primaryKey": false,
217
+ "notNull": false
218
+ },
219
+ "type": {
220
+ "name": "type",
221
+ "type": "text",
222
+ "primaryKey": false,
223
+ "notNull": true
224
+ },
225
+ "payload": {
226
+ "name": "payload",
227
+ "type": "jsonb",
228
+ "primaryKey": false,
229
+ "notNull": true
230
+ },
231
+ "created_at": {
232
+ "name": "created_at",
233
+ "type": "timestamp with time zone",
234
+ "primaryKey": false,
235
+ "notNull": true
236
+ }
237
+ },
238
+ "indexes": {
239
+ "junior_conversation_events_history_version_idx": {
240
+ "name": "junior_conversation_events_history_version_idx",
241
+ "columns": [
242
+ {
243
+ "expression": "conversation_id",
244
+ "isExpression": false,
245
+ "asc": true,
246
+ "nulls": "last"
247
+ },
248
+ {
249
+ "expression": "history_version",
250
+ "isExpression": false,
251
+ "asc": true,
252
+ "nulls": "last"
253
+ },
254
+ {
255
+ "expression": "seq",
256
+ "isExpression": false,
257
+ "asc": true,
258
+ "nulls": "last"
259
+ }
260
+ ],
261
+ "isUnique": false,
262
+ "with": {},
263
+ "method": "btree",
264
+ "concurrently": false
265
+ },
266
+ "junior_conversation_events_type_idx": {
267
+ "name": "junior_conversation_events_type_idx",
268
+ "columns": [
269
+ {
270
+ "expression": "conversation_id",
271
+ "isExpression": false,
272
+ "asc": true,
273
+ "nulls": "last"
274
+ },
275
+ {
276
+ "expression": "type",
277
+ "isExpression": false,
278
+ "asc": true,
279
+ "nulls": "last"
280
+ },
281
+ {
282
+ "expression": "seq",
283
+ "isExpression": false,
284
+ "asc": true,
285
+ "nulls": "last"
286
+ }
287
+ ],
288
+ "isUnique": false,
289
+ "with": {},
290
+ "method": "btree",
291
+ "concurrently": false
292
+ },
293
+ "junior_conversation_events_message_search_idx": {
294
+ "name": "junior_conversation_events_message_search_idx",
295
+ "columns": [
296
+ {
297
+ "expression": "to_tsvector('english', \"payload\"->>'text')",
298
+ "isExpression": true,
299
+ "asc": true,
300
+ "nulls": "last"
301
+ }
302
+ ],
303
+ "isUnique": false,
304
+ "with": {},
305
+ "method": "gin",
306
+ "where": "\"junior_conversation_events\".\"type\" = 'message'",
307
+ "concurrently": false
308
+ },
309
+ "junior_conversation_events_idempotency_idx": {
310
+ "name": "junior_conversation_events_idempotency_idx",
311
+ "columns": [
312
+ {
313
+ "expression": "conversation_id",
314
+ "isExpression": false,
315
+ "asc": true,
316
+ "nulls": "last"
317
+ },
318
+ {
319
+ "expression": "idempotency_key",
320
+ "isExpression": false,
321
+ "asc": true,
322
+ "nulls": "last"
323
+ }
324
+ ],
325
+ "isUnique": true,
326
+ "with": {},
327
+ "method": "btree",
328
+ "concurrently": false
329
+ }
330
+ },
331
+ "foreignKeys": {
332
+ "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk": {
333
+ "name": "junior_conversation_events_conversation_id_junior_conversations_conversation_id_fk",
334
+ "tableFrom": "junior_conversation_events",
335
+ "columnsFrom": [
336
+ "conversation_id"
337
+ ],
338
+ "tableTo": "junior_conversations",
339
+ "columnsTo": [
340
+ "conversation_id"
341
+ ],
342
+ "onUpdate": "no action",
343
+ "onDelete": "no action"
344
+ }
345
+ },
346
+ "compositePrimaryKeys": {
347
+ "junior_conversation_events_conversation_id_seq_pk": {
348
+ "name": "junior_conversation_events_conversation_id_seq_pk",
349
+ "columns": [
350
+ "conversation_id",
351
+ "seq"
352
+ ]
353
+ }
354
+ },
355
+ "uniqueConstraints": {},
356
+ "policies": {},
357
+ "checkConstraints": {},
358
+ "isRLSEnabled": false
359
+ },
360
+ "public.junior_conversations": {
361
+ "name": "junior_conversations",
362
+ "schema": "",
363
+ "columns": {
364
+ "conversation_id": {
365
+ "name": "conversation_id",
366
+ "type": "text",
367
+ "primaryKey": true,
368
+ "notNull": true
369
+ },
370
+ "schema_version": {
371
+ "name": "schema_version",
372
+ "type": "integer",
373
+ "primaryKey": false,
374
+ "notNull": true,
375
+ "default": 1
376
+ },
377
+ "source": {
378
+ "name": "source",
379
+ "type": "text",
380
+ "primaryKey": false,
381
+ "notNull": false
382
+ },
383
+ "origin_type": {
384
+ "name": "origin_type",
385
+ "type": "text",
386
+ "primaryKey": false,
387
+ "notNull": false
388
+ },
389
+ "origin_id": {
390
+ "name": "origin_id",
391
+ "type": "text",
392
+ "primaryKey": false,
393
+ "notNull": false
394
+ },
395
+ "origin_run_id": {
396
+ "name": "origin_run_id",
397
+ "type": "text",
398
+ "primaryKey": false,
399
+ "notNull": false
400
+ },
401
+ "destination_id": {
402
+ "name": "destination_id",
403
+ "type": "text",
404
+ "primaryKey": false,
405
+ "notNull": false
406
+ },
407
+ "destination_json": {
408
+ "name": "destination_json",
409
+ "type": "jsonb",
410
+ "primaryKey": false,
411
+ "notNull": false
412
+ },
413
+ "actor_identity_id": {
414
+ "name": "actor_identity_id",
415
+ "type": "text",
416
+ "primaryKey": false,
417
+ "notNull": false
418
+ },
419
+ "creator_identity_id": {
420
+ "name": "creator_identity_id",
421
+ "type": "text",
422
+ "primaryKey": false,
423
+ "notNull": false
424
+ },
425
+ "credential_subject_identity_id": {
426
+ "name": "credential_subject_identity_id",
427
+ "type": "text",
428
+ "primaryKey": false,
429
+ "notNull": false
430
+ },
431
+ "actor_json": {
432
+ "name": "actor_json",
433
+ "type": "jsonb",
434
+ "primaryKey": false,
435
+ "notNull": false
436
+ },
437
+ "channel_name": {
438
+ "name": "channel_name",
439
+ "type": "text",
440
+ "primaryKey": false,
441
+ "notNull": false
442
+ },
443
+ "title": {
444
+ "name": "title",
445
+ "type": "text",
446
+ "primaryKey": false,
447
+ "notNull": false
448
+ },
449
+ "created_at": {
450
+ "name": "created_at",
451
+ "type": "timestamp with time zone",
452
+ "primaryKey": false,
453
+ "notNull": true
454
+ },
455
+ "last_activity_at": {
456
+ "name": "last_activity_at",
457
+ "type": "timestamp with time zone",
458
+ "primaryKey": false,
459
+ "notNull": true
460
+ },
461
+ "updated_at": {
462
+ "name": "updated_at",
463
+ "type": "timestamp with time zone",
464
+ "primaryKey": false,
465
+ "notNull": true
466
+ },
467
+ "execution_updated_at": {
468
+ "name": "execution_updated_at",
469
+ "type": "timestamp with time zone",
470
+ "primaryKey": false,
471
+ "notNull": false
472
+ },
473
+ "execution_status": {
474
+ "name": "execution_status",
475
+ "type": "text",
476
+ "primaryKey": false,
477
+ "notNull": true
478
+ },
479
+ "run_id": {
480
+ "name": "run_id",
481
+ "type": "text",
482
+ "primaryKey": false,
483
+ "notNull": false
484
+ },
485
+ "last_checkpoint_at": {
486
+ "name": "last_checkpoint_at",
487
+ "type": "timestamp with time zone",
488
+ "primaryKey": false,
489
+ "notNull": false
490
+ },
491
+ "last_enqueued_at": {
492
+ "name": "last_enqueued_at",
493
+ "type": "timestamp with time zone",
494
+ "primaryKey": false,
495
+ "notNull": false
496
+ },
497
+ "parent_conversation_id": {
498
+ "name": "parent_conversation_id",
499
+ "type": "text",
500
+ "primaryKey": false,
501
+ "notNull": false
502
+ },
503
+ "root_conversation_id": {
504
+ "name": "root_conversation_id",
505
+ "type": "text",
506
+ "primaryKey": false,
507
+ "notNull": false
508
+ },
509
+ "transcript_purged_at": {
510
+ "name": "transcript_purged_at",
511
+ "type": "timestamp with time zone",
512
+ "primaryKey": false,
513
+ "notNull": false
514
+ },
515
+ "duration_ms": {
516
+ "name": "duration_ms",
517
+ "type": "integer",
518
+ "primaryKey": false,
519
+ "notNull": true,
520
+ "default": 0
521
+ },
522
+ "usage_json": {
523
+ "name": "usage_json",
524
+ "type": "jsonb",
525
+ "primaryKey": false,
526
+ "notNull": false
527
+ },
528
+ "execution_duration_ms": {
529
+ "name": "execution_duration_ms",
530
+ "type": "integer",
531
+ "primaryKey": false,
532
+ "notNull": true,
533
+ "default": 0
534
+ },
535
+ "execution_usage_json": {
536
+ "name": "execution_usage_json",
537
+ "type": "jsonb",
538
+ "primaryKey": false,
539
+ "notNull": false
540
+ },
541
+ "metric_run_id": {
542
+ "name": "metric_run_id",
543
+ "type": "text",
544
+ "primaryKey": false,
545
+ "notNull": false
546
+ },
547
+ "archived_at": {
548
+ "name": "archived_at",
549
+ "type": "timestamp with time zone",
550
+ "primaryKey": false,
551
+ "notNull": false
552
+ }
553
+ },
554
+ "indexes": {
555
+ "junior_conversations_last_activity_idx": {
556
+ "name": "junior_conversations_last_activity_idx",
557
+ "columns": [
558
+ {
559
+ "expression": "last_activity_at",
560
+ "isExpression": false,
561
+ "asc": false,
562
+ "nulls": "last"
563
+ },
564
+ {
565
+ "expression": "conversation_id",
566
+ "isExpression": false,
567
+ "asc": true,
568
+ "nulls": "last"
569
+ }
570
+ ],
571
+ "isUnique": false,
572
+ "with": {},
573
+ "method": "btree",
574
+ "concurrently": false
575
+ },
576
+ "junior_conversations_active_idx": {
577
+ "name": "junior_conversations_active_idx",
578
+ "columns": [
579
+ {
580
+ "expression": "coalesce(\"execution_updated_at\", \"updated_at\")",
581
+ "isExpression": true,
582
+ "asc": true,
583
+ "nulls": "last"
584
+ },
585
+ {
586
+ "expression": "conversation_id",
587
+ "isExpression": false,
588
+ "asc": true,
589
+ "nulls": "last"
590
+ }
591
+ ],
592
+ "isUnique": false,
593
+ "with": {},
594
+ "method": "btree",
595
+ "where": "\"junior_conversations\".\"execution_status\" <> 'idle'",
596
+ "concurrently": false
597
+ },
598
+ "junior_conversations_destination_activity_idx": {
599
+ "name": "junior_conversations_destination_activity_idx",
600
+ "columns": [
601
+ {
602
+ "expression": "destination_id",
603
+ "isExpression": false,
604
+ "asc": true,
605
+ "nulls": "last"
606
+ },
607
+ {
608
+ "expression": "last_activity_at",
609
+ "isExpression": false,
610
+ "asc": false,
611
+ "nulls": "last"
612
+ }
613
+ ],
614
+ "isUnique": false,
615
+ "with": {},
616
+ "method": "btree",
617
+ "concurrently": false
618
+ },
619
+ "junior_conversations_actor_activity_idx": {
620
+ "name": "junior_conversations_actor_activity_idx",
621
+ "columns": [
622
+ {
623
+ "expression": "actor_identity_id",
624
+ "isExpression": false,
625
+ "asc": true,
626
+ "nulls": "last"
627
+ },
628
+ {
629
+ "expression": "last_activity_at",
630
+ "isExpression": false,
631
+ "asc": false,
632
+ "nulls": "last"
633
+ }
634
+ ],
635
+ "isUnique": false,
636
+ "with": {},
637
+ "method": "btree",
638
+ "concurrently": false
639
+ },
640
+ "junior_conversations_origin_idx": {
641
+ "name": "junior_conversations_origin_idx",
642
+ "columns": [
643
+ {
644
+ "expression": "origin_type",
645
+ "isExpression": false,
646
+ "asc": true,
647
+ "nulls": "last"
648
+ },
649
+ {
650
+ "expression": "origin_id",
651
+ "isExpression": false,
652
+ "asc": true,
653
+ "nulls": "last"
654
+ },
655
+ {
656
+ "expression": "last_activity_at",
657
+ "isExpression": false,
658
+ "asc": false,
659
+ "nulls": "last"
660
+ }
661
+ ],
662
+ "isUnique": false,
663
+ "with": {},
664
+ "method": "btree",
665
+ "concurrently": false
666
+ },
667
+ "junior_conversations_parent_idx": {
668
+ "name": "junior_conversations_parent_idx",
669
+ "columns": [
670
+ {
671
+ "expression": "parent_conversation_id",
672
+ "isExpression": false,
673
+ "asc": true,
674
+ "nulls": "last"
675
+ }
676
+ ],
677
+ "isUnique": false,
678
+ "with": {},
679
+ "method": "btree",
680
+ "concurrently": false
681
+ },
682
+ "junior_conversations_root_idx": {
683
+ "name": "junior_conversations_root_idx",
684
+ "columns": [
685
+ {
686
+ "expression": "root_conversation_id",
687
+ "isExpression": false,
688
+ "asc": true,
689
+ "nulls": "last"
690
+ }
691
+ ],
692
+ "isUnique": false,
693
+ "with": {},
694
+ "method": "btree",
695
+ "concurrently": false
696
+ }
697
+ },
698
+ "foreignKeys": {
699
+ "junior_conversations_destination_id_junior_destinations_id_fk": {
700
+ "name": "junior_conversations_destination_id_junior_destinations_id_fk",
701
+ "tableFrom": "junior_conversations",
702
+ "columnsFrom": [
703
+ "destination_id"
704
+ ],
705
+ "tableTo": "junior_destinations",
706
+ "columnsTo": [
707
+ "id"
708
+ ],
709
+ "onUpdate": "no action",
710
+ "onDelete": "no action"
711
+ },
712
+ "junior_conversations_actor_identity_id_junior_identities_id_fk": {
713
+ "name": "junior_conversations_actor_identity_id_junior_identities_id_fk",
714
+ "tableFrom": "junior_conversations",
715
+ "columnsFrom": [
716
+ "actor_identity_id"
717
+ ],
718
+ "tableTo": "junior_identities",
719
+ "columnsTo": [
720
+ "id"
721
+ ],
722
+ "onUpdate": "no action",
723
+ "onDelete": "no action"
724
+ },
725
+ "junior_conversations_creator_identity_id_junior_identities_id_fk": {
726
+ "name": "junior_conversations_creator_identity_id_junior_identities_id_fk",
727
+ "tableFrom": "junior_conversations",
728
+ "columnsFrom": [
729
+ "creator_identity_id"
730
+ ],
731
+ "tableTo": "junior_identities",
732
+ "columnsTo": [
733
+ "id"
734
+ ],
735
+ "onUpdate": "no action",
736
+ "onDelete": "no action"
737
+ },
738
+ "junior_conversations_credential_subject_identity_id_junior_identities_id_fk": {
739
+ "name": "junior_conversations_credential_subject_identity_id_junior_identities_id_fk",
740
+ "tableFrom": "junior_conversations",
741
+ "columnsFrom": [
742
+ "credential_subject_identity_id"
743
+ ],
744
+ "tableTo": "junior_identities",
745
+ "columnsTo": [
746
+ "id"
747
+ ],
748
+ "onUpdate": "no action",
749
+ "onDelete": "no action"
750
+ },
751
+ "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk": {
752
+ "name": "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk",
753
+ "tableFrom": "junior_conversations",
754
+ "columnsFrom": [
755
+ "parent_conversation_id"
756
+ ],
757
+ "tableTo": "junior_conversations",
758
+ "columnsTo": [
759
+ "conversation_id"
760
+ ],
761
+ "onUpdate": "no action",
762
+ "onDelete": "no action"
763
+ },
764
+ "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk": {
765
+ "name": "junior_conversations_root_conversation_id_junior_conversations_conversation_id_fk",
766
+ "tableFrom": "junior_conversations",
767
+ "columnsFrom": [
768
+ "root_conversation_id"
769
+ ],
770
+ "tableTo": "junior_conversations",
771
+ "columnsTo": [
772
+ "conversation_id"
773
+ ],
774
+ "onUpdate": "no action",
775
+ "onDelete": "no action"
776
+ }
777
+ },
778
+ "compositePrimaryKeys": {},
779
+ "uniqueConstraints": {},
780
+ "policies": {},
781
+ "checkConstraints": {},
782
+ "isRLSEnabled": false
783
+ },
784
+ "public.junior_destinations": {
785
+ "name": "junior_destinations",
786
+ "schema": "",
787
+ "columns": {
788
+ "id": {
789
+ "name": "id",
790
+ "type": "text",
791
+ "primaryKey": true,
792
+ "notNull": true
793
+ },
794
+ "provider": {
795
+ "name": "provider",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": true
799
+ },
800
+ "provider_tenant_id": {
801
+ "name": "provider_tenant_id",
802
+ "type": "text",
803
+ "primaryKey": false,
804
+ "notNull": true,
805
+ "default": "''"
806
+ },
807
+ "provider_destination_id": {
808
+ "name": "provider_destination_id",
809
+ "type": "text",
810
+ "primaryKey": false,
811
+ "notNull": true
812
+ },
813
+ "kind": {
814
+ "name": "kind",
815
+ "type": "text",
816
+ "primaryKey": false,
817
+ "notNull": true
818
+ },
819
+ "parent_destination_id": {
820
+ "name": "parent_destination_id",
821
+ "type": "text",
822
+ "primaryKey": false,
823
+ "notNull": false
824
+ },
825
+ "display_name": {
826
+ "name": "display_name",
827
+ "type": "text",
828
+ "primaryKey": false,
829
+ "notNull": false
830
+ },
831
+ "visibility": {
832
+ "name": "visibility",
833
+ "type": "text",
834
+ "primaryKey": false,
835
+ "notNull": true,
836
+ "default": "'unknown'"
837
+ },
838
+ "metadata_json": {
839
+ "name": "metadata_json",
840
+ "type": "jsonb",
841
+ "primaryKey": false,
842
+ "notNull": false
843
+ },
844
+ "created_at": {
845
+ "name": "created_at",
846
+ "type": "timestamp with time zone",
847
+ "primaryKey": false,
848
+ "notNull": true
849
+ },
850
+ "updated_at": {
851
+ "name": "updated_at",
852
+ "type": "timestamp with time zone",
853
+ "primaryKey": false,
854
+ "notNull": true
855
+ }
856
+ },
857
+ "indexes": {
858
+ "junior_destinations_provider_destination_uidx": {
859
+ "name": "junior_destinations_provider_destination_uidx",
860
+ "columns": [
861
+ {
862
+ "expression": "provider",
863
+ "isExpression": false,
864
+ "asc": true,
865
+ "nulls": "last"
866
+ },
867
+ {
868
+ "expression": "provider_tenant_id",
869
+ "isExpression": false,
870
+ "asc": true,
871
+ "nulls": "last"
872
+ },
873
+ {
874
+ "expression": "provider_destination_id",
875
+ "isExpression": false,
876
+ "asc": true,
877
+ "nulls": "last"
878
+ }
879
+ ],
880
+ "isUnique": true,
881
+ "with": {},
882
+ "method": "btree",
883
+ "concurrently": false
884
+ },
885
+ "junior_destinations_provider_kind_idx": {
886
+ "name": "junior_destinations_provider_kind_idx",
887
+ "columns": [
888
+ {
889
+ "expression": "provider",
890
+ "isExpression": false,
891
+ "asc": true,
892
+ "nulls": "last"
893
+ },
894
+ {
895
+ "expression": "kind",
896
+ "isExpression": false,
897
+ "asc": true,
898
+ "nulls": "last"
899
+ }
900
+ ],
901
+ "isUnique": false,
902
+ "with": {},
903
+ "method": "btree",
904
+ "concurrently": false
905
+ }
906
+ },
907
+ "foreignKeys": {},
908
+ "compositePrimaryKeys": {},
909
+ "uniqueConstraints": {},
910
+ "policies": {},
911
+ "checkConstraints": {},
912
+ "isRLSEnabled": false
913
+ },
914
+ "public.junior_identities": {
915
+ "name": "junior_identities",
916
+ "schema": "",
917
+ "columns": {
918
+ "id": {
919
+ "name": "id",
920
+ "type": "text",
921
+ "primaryKey": true,
922
+ "notNull": true
923
+ },
924
+ "kind": {
925
+ "name": "kind",
926
+ "type": "text",
927
+ "primaryKey": false,
928
+ "notNull": true
929
+ },
930
+ "provider": {
931
+ "name": "provider",
932
+ "type": "text",
933
+ "primaryKey": false,
934
+ "notNull": true
935
+ },
936
+ "provider_tenant_id": {
937
+ "name": "provider_tenant_id",
938
+ "type": "text",
939
+ "primaryKey": false,
940
+ "notNull": true,
941
+ "default": "''"
942
+ },
943
+ "provider_subject_id": {
944
+ "name": "provider_subject_id",
945
+ "type": "text",
946
+ "primaryKey": false,
947
+ "notNull": true
948
+ },
949
+ "display_name": {
950
+ "name": "display_name",
951
+ "type": "text",
952
+ "primaryKey": false,
953
+ "notNull": false
954
+ },
955
+ "handle": {
956
+ "name": "handle",
957
+ "type": "text",
958
+ "primaryKey": false,
959
+ "notNull": false
960
+ },
961
+ "email": {
962
+ "name": "email",
963
+ "type": "text",
964
+ "primaryKey": false,
965
+ "notNull": false
966
+ },
967
+ "avatar_url": {
968
+ "name": "avatar_url",
969
+ "type": "text",
970
+ "primaryKey": false,
971
+ "notNull": false
972
+ },
973
+ "metadata_json": {
974
+ "name": "metadata_json",
975
+ "type": "jsonb",
976
+ "primaryKey": false,
977
+ "notNull": false
978
+ },
979
+ "created_at": {
980
+ "name": "created_at",
981
+ "type": "timestamp with time zone",
982
+ "primaryKey": false,
983
+ "notNull": true
984
+ },
985
+ "updated_at": {
986
+ "name": "updated_at",
987
+ "type": "timestamp with time zone",
988
+ "primaryKey": false,
989
+ "notNull": true
990
+ },
991
+ "user_id": {
992
+ "name": "user_id",
993
+ "type": "text",
994
+ "primaryKey": false,
995
+ "notNull": false
996
+ },
997
+ "email_normalized": {
998
+ "name": "email_normalized",
999
+ "type": "text",
1000
+ "primaryKey": false,
1001
+ "notNull": false
1002
+ },
1003
+ "email_verified": {
1004
+ "name": "email_verified",
1005
+ "type": "boolean",
1006
+ "primaryKey": false,
1007
+ "notNull": true,
1008
+ "default": false
1009
+ }
1010
+ },
1011
+ "indexes": {
1012
+ "junior_identities_provider_subject_uidx": {
1013
+ "name": "junior_identities_provider_subject_uidx",
1014
+ "columns": [
1015
+ {
1016
+ "expression": "provider",
1017
+ "isExpression": false,
1018
+ "asc": true,
1019
+ "nulls": "last"
1020
+ },
1021
+ {
1022
+ "expression": "provider_tenant_id",
1023
+ "isExpression": false,
1024
+ "asc": true,
1025
+ "nulls": "last"
1026
+ },
1027
+ {
1028
+ "expression": "provider_subject_id",
1029
+ "isExpression": false,
1030
+ "asc": true,
1031
+ "nulls": "last"
1032
+ }
1033
+ ],
1034
+ "isUnique": true,
1035
+ "with": {},
1036
+ "method": "btree",
1037
+ "concurrently": false
1038
+ },
1039
+ "junior_identities_user_idx": {
1040
+ "name": "junior_identities_user_idx",
1041
+ "columns": [
1042
+ {
1043
+ "expression": "user_id",
1044
+ "isExpression": false,
1045
+ "asc": true,
1046
+ "nulls": "last"
1047
+ }
1048
+ ],
1049
+ "isUnique": false,
1050
+ "with": {},
1051
+ "method": "btree",
1052
+ "concurrently": false
1053
+ },
1054
+ "junior_identities_verified_email_idx": {
1055
+ "name": "junior_identities_verified_email_idx",
1056
+ "columns": [
1057
+ {
1058
+ "expression": "email_normalized",
1059
+ "isExpression": false,
1060
+ "asc": true,
1061
+ "nulls": "last"
1062
+ }
1063
+ ],
1064
+ "isUnique": false,
1065
+ "with": {},
1066
+ "method": "btree",
1067
+ "where": "\"junior_identities\".\"email_verified\" = true AND \"junior_identities\".\"email_normalized\" IS NOT NULL",
1068
+ "concurrently": false
1069
+ },
1070
+ "junior_identities_kind_provider_idx": {
1071
+ "name": "junior_identities_kind_provider_idx",
1072
+ "columns": [
1073
+ {
1074
+ "expression": "kind",
1075
+ "isExpression": false,
1076
+ "asc": true,
1077
+ "nulls": "last"
1078
+ },
1079
+ {
1080
+ "expression": "provider",
1081
+ "isExpression": false,
1082
+ "asc": true,
1083
+ "nulls": "last"
1084
+ }
1085
+ ],
1086
+ "isUnique": false,
1087
+ "with": {},
1088
+ "method": "btree",
1089
+ "concurrently": false
1090
+ }
1091
+ },
1092
+ "foreignKeys": {
1093
+ "junior_identities_user_id_junior_users_id_fk": {
1094
+ "name": "junior_identities_user_id_junior_users_id_fk",
1095
+ "tableFrom": "junior_identities",
1096
+ "columnsFrom": [
1097
+ "user_id"
1098
+ ],
1099
+ "tableTo": "junior_users",
1100
+ "columnsTo": [
1101
+ "id"
1102
+ ],
1103
+ "onUpdate": "no action",
1104
+ "onDelete": "no action"
1105
+ }
1106
+ },
1107
+ "compositePrimaryKeys": {},
1108
+ "uniqueConstraints": {},
1109
+ "policies": {},
1110
+ "checkConstraints": {},
1111
+ "isRLSEnabled": false
1112
+ },
1113
+ "public.junior_stats": {
1114
+ "name": "junior_stats",
1115
+ "schema": "",
1116
+ "columns": {
1117
+ "date": {
1118
+ "name": "date",
1119
+ "type": "date",
1120
+ "primaryKey": false,
1121
+ "notNull": true
1122
+ },
1123
+ "namespace": {
1124
+ "name": "namespace",
1125
+ "type": "text",
1126
+ "primaryKey": false,
1127
+ "notNull": true
1128
+ },
1129
+ "metric": {
1130
+ "name": "metric",
1131
+ "type": "text",
1132
+ "primaryKey": false,
1133
+ "notNull": true
1134
+ },
1135
+ "name": {
1136
+ "name": "name",
1137
+ "type": "text",
1138
+ "primaryKey": false,
1139
+ "notNull": true
1140
+ },
1141
+ "count": {
1142
+ "name": "count",
1143
+ "type": "integer",
1144
+ "primaryKey": false,
1145
+ "notNull": true,
1146
+ "default": 0
1147
+ }
1148
+ },
1149
+ "indexes": {},
1150
+ "foreignKeys": {},
1151
+ "compositePrimaryKeys": {
1152
+ "junior_stats_date_namespace_metric_name_pk": {
1153
+ "name": "junior_stats_date_namespace_metric_name_pk",
1154
+ "columns": [
1155
+ "date",
1156
+ "namespace",
1157
+ "metric",
1158
+ "name"
1159
+ ]
1160
+ }
1161
+ },
1162
+ "uniqueConstraints": {},
1163
+ "policies": {},
1164
+ "checkConstraints": {},
1165
+ "isRLSEnabled": false
1166
+ },
1167
+ "public.junior_users": {
1168
+ "name": "junior_users",
1169
+ "schema": "",
1170
+ "columns": {
1171
+ "id": {
1172
+ "name": "id",
1173
+ "type": "text",
1174
+ "primaryKey": true,
1175
+ "notNull": true
1176
+ },
1177
+ "primary_email": {
1178
+ "name": "primary_email",
1179
+ "type": "text",
1180
+ "primaryKey": false,
1181
+ "notNull": true
1182
+ },
1183
+ "primary_email_normalized": {
1184
+ "name": "primary_email_normalized",
1185
+ "type": "text",
1186
+ "primaryKey": false,
1187
+ "notNull": true
1188
+ },
1189
+ "display_name": {
1190
+ "name": "display_name",
1191
+ "type": "text",
1192
+ "primaryKey": false,
1193
+ "notNull": false
1194
+ },
1195
+ "created_at": {
1196
+ "name": "created_at",
1197
+ "type": "timestamp with time zone",
1198
+ "primaryKey": false,
1199
+ "notNull": true
1200
+ },
1201
+ "updated_at": {
1202
+ "name": "updated_at",
1203
+ "type": "timestamp with time zone",
1204
+ "primaryKey": false,
1205
+ "notNull": true
1206
+ }
1207
+ },
1208
+ "indexes": {
1209
+ "junior_users_primary_email_normalized_uidx": {
1210
+ "name": "junior_users_primary_email_normalized_uidx",
1211
+ "columns": [
1212
+ {
1213
+ "expression": "primary_email_normalized",
1214
+ "isExpression": false,
1215
+ "asc": true,
1216
+ "nulls": "last"
1217
+ }
1218
+ ],
1219
+ "isUnique": true,
1220
+ "with": {},
1221
+ "method": "btree",
1222
+ "concurrently": false
1223
+ }
1224
+ },
1225
+ "foreignKeys": {},
1226
+ "compositePrimaryKeys": {},
1227
+ "uniqueConstraints": {},
1228
+ "policies": {},
1229
+ "checkConstraints": {},
1230
+ "isRLSEnabled": false
1231
+ }
1232
+ },
1233
+ "enums": {},
1234
+ "schemas": {},
1235
+ "views": {},
1236
+ "sequences": {},
1237
+ "roles": {},
1238
+ "policies": {},
1239
+ "_meta": {
1240
+ "columns": {},
1241
+ "schemas": {},
1242
+ "tables": {}
1243
+ }
1244
+ }