@sentry/junior 0.103.0 → 0.104.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 (77) hide show
  1. package/dist/{agent-hooks-NHIXBJW3.js → agent-hooks-EOFSY2PD.js} +3 -3
  2. package/dist/api/conversations/archive.d.ts +7 -0
  3. package/dist/api/conversations/detail.d.ts +7 -0
  4. package/dist/api/conversations/list.d.ts +109 -0
  5. package/dist/api/conversations/routes.d.ts +3 -0
  6. package/dist/api/conversations/schema.d.ts +72 -69
  7. package/dist/api/conversations/stats.d.ts +7 -0
  8. package/dist/api/conversations/subagent.d.ts +7 -0
  9. package/dist/api/http.d.ts +5 -0
  10. package/dist/api/locations/detail.d.ts +10 -2
  11. package/dist/api/locations/list.d.ts +7 -0
  12. package/dist/api/locations/routes.d.ts +3 -0
  13. package/dist/api/locations/schema.d.ts +4 -3
  14. package/dist/api/people/list.d.ts +7 -0
  15. package/dist/api/people/profile.d.ts +7 -0
  16. package/dist/api/people/routes.d.ts +3 -0
  17. package/dist/api/people/schema.d.ts +35 -33
  18. package/dist/api/people/shared.d.ts +3 -3
  19. package/dist/api/route.d.ts +7 -0
  20. package/dist/api/schema.js +11 -17
  21. package/dist/api.js +2184 -88
  22. package/dist/app.js +107 -101
  23. package/dist/chat/conversations/history.d.ts +6 -6
  24. package/dist/chat/conversations/store.d.ts +1 -0
  25. package/dist/chat/pi/messages.d.ts +2 -2
  26. package/dist/chat/plugins/agent-hooks.d.ts +2 -2
  27. package/dist/chat/resource-events/store.d.ts +2 -2
  28. package/dist/chat/slack/tools/conversation-search.d.ts +2 -2
  29. package/dist/chat/state/session-log.d.ts +2 -2
  30. package/dist/chat/task-execution/store.d.ts +2 -2
  31. package/dist/chat/tools/search-tools.d.ts +2 -2
  32. package/dist/chunk-AIRE7Q2W.js +362 -0
  33. package/dist/{chunk-HOBDQQJY.js → chunk-BCULHGZK.js} +23 -3
  34. package/dist/{chunk-DEQZ23O3.js → chunk-O7ILGCMJ.js} +77 -0
  35. package/dist/{chunk-C4BT2P2K.js → chunk-QDKRE3LS.js} +339 -8
  36. package/dist/{chunk-GY5ZRYPH.js → chunk-QVTVCJR4.js} +5 -5
  37. package/dist/{chunk-JXQWOCBE.js → chunk-RMZ65YAA.js} +2 -2
  38. package/dist/{chunk-E2VS47AZ.js → chunk-RYDF4GOX.js} +2 -2
  39. package/dist/{chunk-OE453VRG.js → chunk-TMWUGGSA.js} +26 -28
  40. package/dist/{chunk-JPXLAJUU.js → chunk-VDHMFCDY.js} +9 -10
  41. package/dist/cli/chat.js +10 -11
  42. package/dist/cli/plugins.js +4 -4
  43. package/dist/cli/upgrade.js +3 -4
  44. package/dist/db/schema/conversations.d.ts +17 -0
  45. package/dist/db/schema.d.ts +17 -0
  46. package/dist/{db-I343BSOM.js → db-PDMC67T3.js} +1 -1
  47. package/dist/{legacy-import-M7VBOQTK.js → legacy-import-G333RHJZ.js} +2 -2
  48. package/dist/reporting-schema.d.ts +4 -4
  49. package/dist/{runner-IEE5G4NV.js → runner-6A7MQRUE.js} +7 -8
  50. package/migrations/0004_useful_magus.sql +1 -0
  51. package/migrations/meta/0004_snapshot.json +1041 -0
  52. package/migrations/meta/_journal.json +7 -0
  53. package/package.json +6 -6
  54. package/dist/api/conversations/list.query.d.ts +0 -103
  55. package/dist/chunk-2RNOB32R.js +0 -17
  56. package/dist/chunk-6FPTHPXF.js +0 -77
  57. package/dist/chunk-6LBNXC4F.js +0 -66
  58. package/dist/chunk-7LLRS2OK.js +0 -215
  59. package/dist/chunk-B43K4C5K.js +0 -102
  60. package/dist/chunk-BQCPAIAB.js +0 -319
  61. package/dist/chunk-FW7DVHTL.js +0 -673
  62. package/dist/chunk-GCGRQJR5.js +0 -84
  63. package/dist/chunk-HRDWLE7Q.js +0 -273
  64. package/dist/chunk-LVUKF5CE.js +0 -63
  65. package/dist/chunk-QNVHH5PU.js +0 -20
  66. package/dist/chunk-QOZOJNSE.js +0 -96
  67. package/dist/chunk-VKFOVMZL.js +0 -331
  68. package/dist/detail-ENVV4HIY.js +0 -68
  69. package/dist/detail-UIOKVIET.js +0 -29
  70. package/dist/list-WR5U6JVM.js +0 -30
  71. package/dist/list-XZ4HKQ4R.js +0 -121
  72. package/dist/list-ZOUSMSEH.js +0 -30
  73. package/dist/plugin-conversations-DTUP4RH6.js +0 -37
  74. package/dist/profile-UO2N3XXG.js +0 -212
  75. package/dist/reporting/plugin-conversations.d.ts +0 -3
  76. package/dist/stats-NZIET4LT.js +0 -174
  77. package/dist/subagent-DY6XKTJ5.js +0 -49
@@ -0,0 +1,1041 @@
1
+ {
2
+ "id": "f4f247d8-7b7d-420b-a78f-7a36ba8c1472",
3
+ "prevId": "3668b705-7991-4e7e-8fb2-6e4ef8147aac",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.junior_agent_steps": {
8
+ "name": "junior_agent_steps",
9
+ "schema": "",
10
+ "columns": {
11
+ "conversation_id": {
12
+ "name": "conversation_id",
13
+ "type": "text",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "seq": {
18
+ "name": "seq",
19
+ "type": "integer",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "context_epoch": {
24
+ "name": "context_epoch",
25
+ "type": "integer",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "type": {
30
+ "name": "type",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "role": {
36
+ "name": "role",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": false
40
+ },
41
+ "payload": {
42
+ "name": "payload",
43
+ "type": "jsonb",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "created_at": {
48
+ "name": "created_at",
49
+ "type": "timestamp with time zone",
50
+ "primaryKey": false,
51
+ "notNull": true
52
+ }
53
+ },
54
+ "indexes": {
55
+ "junior_agent_steps_epoch_idx": {
56
+ "name": "junior_agent_steps_epoch_idx",
57
+ "columns": [
58
+ {
59
+ "expression": "conversation_id",
60
+ "isExpression": false,
61
+ "asc": true,
62
+ "nulls": "last"
63
+ },
64
+ {
65
+ "expression": "context_epoch",
66
+ "isExpression": false,
67
+ "asc": true,
68
+ "nulls": "last"
69
+ },
70
+ {
71
+ "expression": "seq",
72
+ "isExpression": false,
73
+ "asc": true,
74
+ "nulls": "last"
75
+ }
76
+ ],
77
+ "isUnique": false,
78
+ "concurrently": false,
79
+ "method": "btree",
80
+ "with": {}
81
+ }
82
+ },
83
+ "foreignKeys": {
84
+ "junior_agent_steps_conversation_id_junior_conversations_conversation_id_fk": {
85
+ "name": "junior_agent_steps_conversation_id_junior_conversations_conversation_id_fk",
86
+ "tableFrom": "junior_agent_steps",
87
+ "tableTo": "junior_conversations",
88
+ "columnsFrom": [
89
+ "conversation_id"
90
+ ],
91
+ "columnsTo": [
92
+ "conversation_id"
93
+ ],
94
+ "onDelete": "no action",
95
+ "onUpdate": "no action"
96
+ }
97
+ },
98
+ "compositePrimaryKeys": {
99
+ "junior_agent_steps_conversation_id_seq_pk": {
100
+ "name": "junior_agent_steps_conversation_id_seq_pk",
101
+ "columns": [
102
+ "conversation_id",
103
+ "seq"
104
+ ]
105
+ }
106
+ },
107
+ "uniqueConstraints": {},
108
+ "policies": {},
109
+ "checkConstraints": {},
110
+ "isRLSEnabled": false
111
+ },
112
+ "public.junior_conversation_messages": {
113
+ "name": "junior_conversation_messages",
114
+ "schema": "",
115
+ "columns": {
116
+ "conversation_id": {
117
+ "name": "conversation_id",
118
+ "type": "text",
119
+ "primaryKey": false,
120
+ "notNull": true
121
+ },
122
+ "message_id": {
123
+ "name": "message_id",
124
+ "type": "text",
125
+ "primaryKey": false,
126
+ "notNull": true
127
+ },
128
+ "role": {
129
+ "name": "role",
130
+ "type": "text",
131
+ "primaryKey": false,
132
+ "notNull": true
133
+ },
134
+ "author_identity_id": {
135
+ "name": "author_identity_id",
136
+ "type": "text",
137
+ "primaryKey": false,
138
+ "notNull": false
139
+ },
140
+ "text": {
141
+ "name": "text",
142
+ "type": "text",
143
+ "primaryKey": false,
144
+ "notNull": true
145
+ },
146
+ "meta": {
147
+ "name": "meta",
148
+ "type": "jsonb",
149
+ "primaryKey": false,
150
+ "notNull": false
151
+ },
152
+ "replied_at": {
153
+ "name": "replied_at",
154
+ "type": "timestamp with time zone",
155
+ "primaryKey": false,
156
+ "notNull": false
157
+ },
158
+ "created_at": {
159
+ "name": "created_at",
160
+ "type": "timestamp with time zone",
161
+ "primaryKey": false,
162
+ "notNull": true
163
+ }
164
+ },
165
+ "indexes": {
166
+ "junior_conversation_messages_activity_idx": {
167
+ "name": "junior_conversation_messages_activity_idx",
168
+ "columns": [
169
+ {
170
+ "expression": "conversation_id",
171
+ "isExpression": false,
172
+ "asc": true,
173
+ "nulls": "last"
174
+ },
175
+ {
176
+ "expression": "created_at",
177
+ "isExpression": false,
178
+ "asc": true,
179
+ "nulls": "last"
180
+ }
181
+ ],
182
+ "isUnique": false,
183
+ "concurrently": false,
184
+ "method": "btree",
185
+ "with": {}
186
+ },
187
+ "junior_conversation_messages_search_idx": {
188
+ "name": "junior_conversation_messages_search_idx",
189
+ "columns": [
190
+ {
191
+ "expression": "to_tsvector('english', \"text\")",
192
+ "asc": true,
193
+ "isExpression": true,
194
+ "nulls": "last"
195
+ }
196
+ ],
197
+ "isUnique": false,
198
+ "concurrently": false,
199
+ "method": "gin",
200
+ "with": {}
201
+ }
202
+ },
203
+ "foreignKeys": {
204
+ "junior_conversation_messages_conversation_id_junior_conversations_conversation_id_fk": {
205
+ "name": "junior_conversation_messages_conversation_id_junior_conversations_conversation_id_fk",
206
+ "tableFrom": "junior_conversation_messages",
207
+ "tableTo": "junior_conversations",
208
+ "columnsFrom": [
209
+ "conversation_id"
210
+ ],
211
+ "columnsTo": [
212
+ "conversation_id"
213
+ ],
214
+ "onDelete": "no action",
215
+ "onUpdate": "no action"
216
+ },
217
+ "junior_conversation_messages_author_identity_id_junior_identities_id_fk": {
218
+ "name": "junior_conversation_messages_author_identity_id_junior_identities_id_fk",
219
+ "tableFrom": "junior_conversation_messages",
220
+ "tableTo": "junior_identities",
221
+ "columnsFrom": [
222
+ "author_identity_id"
223
+ ],
224
+ "columnsTo": [
225
+ "id"
226
+ ],
227
+ "onDelete": "no action",
228
+ "onUpdate": "no action"
229
+ }
230
+ },
231
+ "compositePrimaryKeys": {
232
+ "junior_conversation_messages_conversation_id_message_id_pk": {
233
+ "name": "junior_conversation_messages_conversation_id_message_id_pk",
234
+ "columns": [
235
+ "conversation_id",
236
+ "message_id"
237
+ ]
238
+ }
239
+ },
240
+ "uniqueConstraints": {},
241
+ "policies": {},
242
+ "checkConstraints": {},
243
+ "isRLSEnabled": false
244
+ },
245
+ "public.junior_conversations": {
246
+ "name": "junior_conversations",
247
+ "schema": "",
248
+ "columns": {
249
+ "conversation_id": {
250
+ "name": "conversation_id",
251
+ "type": "text",
252
+ "primaryKey": true,
253
+ "notNull": true
254
+ },
255
+ "schema_version": {
256
+ "name": "schema_version",
257
+ "type": "integer",
258
+ "primaryKey": false,
259
+ "notNull": true,
260
+ "default": 1
261
+ },
262
+ "source": {
263
+ "name": "source",
264
+ "type": "text",
265
+ "primaryKey": false,
266
+ "notNull": false
267
+ },
268
+ "origin_type": {
269
+ "name": "origin_type",
270
+ "type": "text",
271
+ "primaryKey": false,
272
+ "notNull": false
273
+ },
274
+ "origin_id": {
275
+ "name": "origin_id",
276
+ "type": "text",
277
+ "primaryKey": false,
278
+ "notNull": false
279
+ },
280
+ "origin_run_id": {
281
+ "name": "origin_run_id",
282
+ "type": "text",
283
+ "primaryKey": false,
284
+ "notNull": false
285
+ },
286
+ "destination_id": {
287
+ "name": "destination_id",
288
+ "type": "text",
289
+ "primaryKey": false,
290
+ "notNull": false
291
+ },
292
+ "destination_json": {
293
+ "name": "destination_json",
294
+ "type": "jsonb",
295
+ "primaryKey": false,
296
+ "notNull": false
297
+ },
298
+ "actor_identity_id": {
299
+ "name": "actor_identity_id",
300
+ "type": "text",
301
+ "primaryKey": false,
302
+ "notNull": false
303
+ },
304
+ "creator_identity_id": {
305
+ "name": "creator_identity_id",
306
+ "type": "text",
307
+ "primaryKey": false,
308
+ "notNull": false
309
+ },
310
+ "credential_subject_identity_id": {
311
+ "name": "credential_subject_identity_id",
312
+ "type": "text",
313
+ "primaryKey": false,
314
+ "notNull": false
315
+ },
316
+ "actor_json": {
317
+ "name": "actor_json",
318
+ "type": "jsonb",
319
+ "primaryKey": false,
320
+ "notNull": false
321
+ },
322
+ "channel_name": {
323
+ "name": "channel_name",
324
+ "type": "text",
325
+ "primaryKey": false,
326
+ "notNull": false
327
+ },
328
+ "title": {
329
+ "name": "title",
330
+ "type": "text",
331
+ "primaryKey": false,
332
+ "notNull": false
333
+ },
334
+ "created_at": {
335
+ "name": "created_at",
336
+ "type": "timestamp with time zone",
337
+ "primaryKey": false,
338
+ "notNull": true
339
+ },
340
+ "last_activity_at": {
341
+ "name": "last_activity_at",
342
+ "type": "timestamp with time zone",
343
+ "primaryKey": false,
344
+ "notNull": true
345
+ },
346
+ "updated_at": {
347
+ "name": "updated_at",
348
+ "type": "timestamp with time zone",
349
+ "primaryKey": false,
350
+ "notNull": true
351
+ },
352
+ "execution_updated_at": {
353
+ "name": "execution_updated_at",
354
+ "type": "timestamp with time zone",
355
+ "primaryKey": false,
356
+ "notNull": false
357
+ },
358
+ "execution_status": {
359
+ "name": "execution_status",
360
+ "type": "text",
361
+ "primaryKey": false,
362
+ "notNull": true
363
+ },
364
+ "run_id": {
365
+ "name": "run_id",
366
+ "type": "text",
367
+ "primaryKey": false,
368
+ "notNull": false
369
+ },
370
+ "last_checkpoint_at": {
371
+ "name": "last_checkpoint_at",
372
+ "type": "timestamp with time zone",
373
+ "primaryKey": false,
374
+ "notNull": false
375
+ },
376
+ "last_enqueued_at": {
377
+ "name": "last_enqueued_at",
378
+ "type": "timestamp with time zone",
379
+ "primaryKey": false,
380
+ "notNull": false
381
+ },
382
+ "parent_conversation_id": {
383
+ "name": "parent_conversation_id",
384
+ "type": "text",
385
+ "primaryKey": false,
386
+ "notNull": false
387
+ },
388
+ "transcript_purged_at": {
389
+ "name": "transcript_purged_at",
390
+ "type": "timestamp with time zone",
391
+ "primaryKey": false,
392
+ "notNull": false
393
+ },
394
+ "archived_at": {
395
+ "name": "archived_at",
396
+ "type": "timestamp with time zone",
397
+ "primaryKey": false,
398
+ "notNull": false
399
+ },
400
+ "duration_ms": {
401
+ "name": "duration_ms",
402
+ "type": "integer",
403
+ "primaryKey": false,
404
+ "notNull": true,
405
+ "default": 0
406
+ },
407
+ "usage_json": {
408
+ "name": "usage_json",
409
+ "type": "jsonb",
410
+ "primaryKey": false,
411
+ "notNull": false
412
+ },
413
+ "execution_duration_ms": {
414
+ "name": "execution_duration_ms",
415
+ "type": "integer",
416
+ "primaryKey": false,
417
+ "notNull": true,
418
+ "default": 0
419
+ },
420
+ "execution_usage_json": {
421
+ "name": "execution_usage_json",
422
+ "type": "jsonb",
423
+ "primaryKey": false,
424
+ "notNull": false
425
+ },
426
+ "metric_run_id": {
427
+ "name": "metric_run_id",
428
+ "type": "text",
429
+ "primaryKey": false,
430
+ "notNull": false
431
+ }
432
+ },
433
+ "indexes": {
434
+ "junior_conversations_last_activity_idx": {
435
+ "name": "junior_conversations_last_activity_idx",
436
+ "columns": [
437
+ {
438
+ "expression": "last_activity_at",
439
+ "isExpression": false,
440
+ "asc": false,
441
+ "nulls": "last"
442
+ },
443
+ {
444
+ "expression": "conversation_id",
445
+ "isExpression": false,
446
+ "asc": true,
447
+ "nulls": "last"
448
+ }
449
+ ],
450
+ "isUnique": false,
451
+ "concurrently": false,
452
+ "method": "btree",
453
+ "with": {}
454
+ },
455
+ "junior_conversations_active_idx": {
456
+ "name": "junior_conversations_active_idx",
457
+ "columns": [
458
+ {
459
+ "expression": "coalesce(\"execution_updated_at\", \"updated_at\")",
460
+ "asc": true,
461
+ "isExpression": true,
462
+ "nulls": "last"
463
+ },
464
+ {
465
+ "expression": "conversation_id",
466
+ "isExpression": false,
467
+ "asc": true,
468
+ "nulls": "last"
469
+ }
470
+ ],
471
+ "isUnique": false,
472
+ "where": "\"junior_conversations\".\"execution_status\" <> 'idle'",
473
+ "concurrently": false,
474
+ "method": "btree",
475
+ "with": {}
476
+ },
477
+ "junior_conversations_destination_activity_idx": {
478
+ "name": "junior_conversations_destination_activity_idx",
479
+ "columns": [
480
+ {
481
+ "expression": "destination_id",
482
+ "isExpression": false,
483
+ "asc": true,
484
+ "nulls": "last"
485
+ },
486
+ {
487
+ "expression": "last_activity_at",
488
+ "isExpression": false,
489
+ "asc": false,
490
+ "nulls": "last"
491
+ }
492
+ ],
493
+ "isUnique": false,
494
+ "concurrently": false,
495
+ "method": "btree",
496
+ "with": {}
497
+ },
498
+ "junior_conversations_actor_activity_idx": {
499
+ "name": "junior_conversations_actor_activity_idx",
500
+ "columns": [
501
+ {
502
+ "expression": "actor_identity_id",
503
+ "isExpression": false,
504
+ "asc": true,
505
+ "nulls": "last"
506
+ },
507
+ {
508
+ "expression": "last_activity_at",
509
+ "isExpression": false,
510
+ "asc": false,
511
+ "nulls": "last"
512
+ }
513
+ ],
514
+ "isUnique": false,
515
+ "concurrently": false,
516
+ "method": "btree",
517
+ "with": {}
518
+ },
519
+ "junior_conversations_origin_idx": {
520
+ "name": "junior_conversations_origin_idx",
521
+ "columns": [
522
+ {
523
+ "expression": "origin_type",
524
+ "isExpression": false,
525
+ "asc": true,
526
+ "nulls": "last"
527
+ },
528
+ {
529
+ "expression": "origin_id",
530
+ "isExpression": false,
531
+ "asc": true,
532
+ "nulls": "last"
533
+ },
534
+ {
535
+ "expression": "last_activity_at",
536
+ "isExpression": false,
537
+ "asc": false,
538
+ "nulls": "last"
539
+ }
540
+ ],
541
+ "isUnique": false,
542
+ "concurrently": false,
543
+ "method": "btree",
544
+ "with": {}
545
+ },
546
+ "junior_conversations_parent_idx": {
547
+ "name": "junior_conversations_parent_idx",
548
+ "columns": [
549
+ {
550
+ "expression": "parent_conversation_id",
551
+ "isExpression": false,
552
+ "asc": true,
553
+ "nulls": "last"
554
+ }
555
+ ],
556
+ "isUnique": false,
557
+ "concurrently": false,
558
+ "method": "btree",
559
+ "with": {}
560
+ }
561
+ },
562
+ "foreignKeys": {
563
+ "junior_conversations_destination_id_junior_destinations_id_fk": {
564
+ "name": "junior_conversations_destination_id_junior_destinations_id_fk",
565
+ "tableFrom": "junior_conversations",
566
+ "tableTo": "junior_destinations",
567
+ "columnsFrom": [
568
+ "destination_id"
569
+ ],
570
+ "columnsTo": [
571
+ "id"
572
+ ],
573
+ "onDelete": "no action",
574
+ "onUpdate": "no action"
575
+ },
576
+ "junior_conversations_actor_identity_id_junior_identities_id_fk": {
577
+ "name": "junior_conversations_actor_identity_id_junior_identities_id_fk",
578
+ "tableFrom": "junior_conversations",
579
+ "tableTo": "junior_identities",
580
+ "columnsFrom": [
581
+ "actor_identity_id"
582
+ ],
583
+ "columnsTo": [
584
+ "id"
585
+ ],
586
+ "onDelete": "no action",
587
+ "onUpdate": "no action"
588
+ },
589
+ "junior_conversations_creator_identity_id_junior_identities_id_fk": {
590
+ "name": "junior_conversations_creator_identity_id_junior_identities_id_fk",
591
+ "tableFrom": "junior_conversations",
592
+ "tableTo": "junior_identities",
593
+ "columnsFrom": [
594
+ "creator_identity_id"
595
+ ],
596
+ "columnsTo": [
597
+ "id"
598
+ ],
599
+ "onDelete": "no action",
600
+ "onUpdate": "no action"
601
+ },
602
+ "junior_conversations_credential_subject_identity_id_junior_identities_id_fk": {
603
+ "name": "junior_conversations_credential_subject_identity_id_junior_identities_id_fk",
604
+ "tableFrom": "junior_conversations",
605
+ "tableTo": "junior_identities",
606
+ "columnsFrom": [
607
+ "credential_subject_identity_id"
608
+ ],
609
+ "columnsTo": [
610
+ "id"
611
+ ],
612
+ "onDelete": "no action",
613
+ "onUpdate": "no action"
614
+ },
615
+ "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk": {
616
+ "name": "junior_conversations_parent_conversation_id_junior_conversations_conversation_id_fk",
617
+ "tableFrom": "junior_conversations",
618
+ "tableTo": "junior_conversations",
619
+ "columnsFrom": [
620
+ "parent_conversation_id"
621
+ ],
622
+ "columnsTo": [
623
+ "conversation_id"
624
+ ],
625
+ "onDelete": "no action",
626
+ "onUpdate": "no action"
627
+ }
628
+ },
629
+ "compositePrimaryKeys": {},
630
+ "uniqueConstraints": {},
631
+ "policies": {},
632
+ "checkConstraints": {},
633
+ "isRLSEnabled": false
634
+ },
635
+ "public.junior_destinations": {
636
+ "name": "junior_destinations",
637
+ "schema": "",
638
+ "columns": {
639
+ "id": {
640
+ "name": "id",
641
+ "type": "text",
642
+ "primaryKey": true,
643
+ "notNull": true
644
+ },
645
+ "provider": {
646
+ "name": "provider",
647
+ "type": "text",
648
+ "primaryKey": false,
649
+ "notNull": true
650
+ },
651
+ "provider_tenant_id": {
652
+ "name": "provider_tenant_id",
653
+ "type": "text",
654
+ "primaryKey": false,
655
+ "notNull": true,
656
+ "default": "''"
657
+ },
658
+ "provider_destination_id": {
659
+ "name": "provider_destination_id",
660
+ "type": "text",
661
+ "primaryKey": false,
662
+ "notNull": true
663
+ },
664
+ "kind": {
665
+ "name": "kind",
666
+ "type": "text",
667
+ "primaryKey": false,
668
+ "notNull": true
669
+ },
670
+ "parent_destination_id": {
671
+ "name": "parent_destination_id",
672
+ "type": "text",
673
+ "primaryKey": false,
674
+ "notNull": false
675
+ },
676
+ "display_name": {
677
+ "name": "display_name",
678
+ "type": "text",
679
+ "primaryKey": false,
680
+ "notNull": false
681
+ },
682
+ "visibility": {
683
+ "name": "visibility",
684
+ "type": "text",
685
+ "primaryKey": false,
686
+ "notNull": true,
687
+ "default": "'unknown'"
688
+ },
689
+ "metadata_json": {
690
+ "name": "metadata_json",
691
+ "type": "jsonb",
692
+ "primaryKey": false,
693
+ "notNull": false
694
+ },
695
+ "created_at": {
696
+ "name": "created_at",
697
+ "type": "timestamp with time zone",
698
+ "primaryKey": false,
699
+ "notNull": true
700
+ },
701
+ "updated_at": {
702
+ "name": "updated_at",
703
+ "type": "timestamp with time zone",
704
+ "primaryKey": false,
705
+ "notNull": true
706
+ }
707
+ },
708
+ "indexes": {
709
+ "junior_destinations_provider_destination_uidx": {
710
+ "name": "junior_destinations_provider_destination_uidx",
711
+ "columns": [
712
+ {
713
+ "expression": "provider",
714
+ "isExpression": false,
715
+ "asc": true,
716
+ "nulls": "last"
717
+ },
718
+ {
719
+ "expression": "provider_tenant_id",
720
+ "isExpression": false,
721
+ "asc": true,
722
+ "nulls": "last"
723
+ },
724
+ {
725
+ "expression": "provider_destination_id",
726
+ "isExpression": false,
727
+ "asc": true,
728
+ "nulls": "last"
729
+ }
730
+ ],
731
+ "isUnique": true,
732
+ "concurrently": false,
733
+ "method": "btree",
734
+ "with": {}
735
+ },
736
+ "junior_destinations_provider_kind_idx": {
737
+ "name": "junior_destinations_provider_kind_idx",
738
+ "columns": [
739
+ {
740
+ "expression": "provider",
741
+ "isExpression": false,
742
+ "asc": true,
743
+ "nulls": "last"
744
+ },
745
+ {
746
+ "expression": "kind",
747
+ "isExpression": false,
748
+ "asc": true,
749
+ "nulls": "last"
750
+ }
751
+ ],
752
+ "isUnique": false,
753
+ "concurrently": false,
754
+ "method": "btree",
755
+ "with": {}
756
+ }
757
+ },
758
+ "foreignKeys": {},
759
+ "compositePrimaryKeys": {},
760
+ "uniqueConstraints": {},
761
+ "policies": {},
762
+ "checkConstraints": {},
763
+ "isRLSEnabled": false
764
+ },
765
+ "public.junior_identities": {
766
+ "name": "junior_identities",
767
+ "schema": "",
768
+ "columns": {
769
+ "id": {
770
+ "name": "id",
771
+ "type": "text",
772
+ "primaryKey": true,
773
+ "notNull": true
774
+ },
775
+ "kind": {
776
+ "name": "kind",
777
+ "type": "text",
778
+ "primaryKey": false,
779
+ "notNull": true
780
+ },
781
+ "provider": {
782
+ "name": "provider",
783
+ "type": "text",
784
+ "primaryKey": false,
785
+ "notNull": true
786
+ },
787
+ "provider_tenant_id": {
788
+ "name": "provider_tenant_id",
789
+ "type": "text",
790
+ "primaryKey": false,
791
+ "notNull": true,
792
+ "default": "''"
793
+ },
794
+ "provider_subject_id": {
795
+ "name": "provider_subject_id",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": true
799
+ },
800
+ "display_name": {
801
+ "name": "display_name",
802
+ "type": "text",
803
+ "primaryKey": false,
804
+ "notNull": false
805
+ },
806
+ "handle": {
807
+ "name": "handle",
808
+ "type": "text",
809
+ "primaryKey": false,
810
+ "notNull": false
811
+ },
812
+ "email": {
813
+ "name": "email",
814
+ "type": "text",
815
+ "primaryKey": false,
816
+ "notNull": false
817
+ },
818
+ "avatar_url": {
819
+ "name": "avatar_url",
820
+ "type": "text",
821
+ "primaryKey": false,
822
+ "notNull": false
823
+ },
824
+ "metadata_json": {
825
+ "name": "metadata_json",
826
+ "type": "jsonb",
827
+ "primaryKey": false,
828
+ "notNull": false
829
+ },
830
+ "created_at": {
831
+ "name": "created_at",
832
+ "type": "timestamp with time zone",
833
+ "primaryKey": false,
834
+ "notNull": true
835
+ },
836
+ "updated_at": {
837
+ "name": "updated_at",
838
+ "type": "timestamp with time zone",
839
+ "primaryKey": false,
840
+ "notNull": true
841
+ },
842
+ "user_id": {
843
+ "name": "user_id",
844
+ "type": "text",
845
+ "primaryKey": false,
846
+ "notNull": false
847
+ },
848
+ "email_normalized": {
849
+ "name": "email_normalized",
850
+ "type": "text",
851
+ "primaryKey": false,
852
+ "notNull": false
853
+ },
854
+ "email_verified": {
855
+ "name": "email_verified",
856
+ "type": "boolean",
857
+ "primaryKey": false,
858
+ "notNull": true,
859
+ "default": false
860
+ }
861
+ },
862
+ "indexes": {
863
+ "junior_identities_provider_subject_uidx": {
864
+ "name": "junior_identities_provider_subject_uidx",
865
+ "columns": [
866
+ {
867
+ "expression": "provider",
868
+ "isExpression": false,
869
+ "asc": true,
870
+ "nulls": "last"
871
+ },
872
+ {
873
+ "expression": "provider_tenant_id",
874
+ "isExpression": false,
875
+ "asc": true,
876
+ "nulls": "last"
877
+ },
878
+ {
879
+ "expression": "provider_subject_id",
880
+ "isExpression": false,
881
+ "asc": true,
882
+ "nulls": "last"
883
+ }
884
+ ],
885
+ "isUnique": true,
886
+ "concurrently": false,
887
+ "method": "btree",
888
+ "with": {}
889
+ },
890
+ "junior_identities_user_idx": {
891
+ "name": "junior_identities_user_idx",
892
+ "columns": [
893
+ {
894
+ "expression": "user_id",
895
+ "isExpression": false,
896
+ "asc": true,
897
+ "nulls": "last"
898
+ }
899
+ ],
900
+ "isUnique": false,
901
+ "concurrently": false,
902
+ "method": "btree",
903
+ "with": {}
904
+ },
905
+ "junior_identities_verified_email_idx": {
906
+ "name": "junior_identities_verified_email_idx",
907
+ "columns": [
908
+ {
909
+ "expression": "email_normalized",
910
+ "isExpression": false,
911
+ "asc": true,
912
+ "nulls": "last"
913
+ }
914
+ ],
915
+ "isUnique": false,
916
+ "where": "\"junior_identities\".\"email_verified\" = true AND \"junior_identities\".\"email_normalized\" IS NOT NULL",
917
+ "concurrently": false,
918
+ "method": "btree",
919
+ "with": {}
920
+ },
921
+ "junior_identities_kind_provider_idx": {
922
+ "name": "junior_identities_kind_provider_idx",
923
+ "columns": [
924
+ {
925
+ "expression": "kind",
926
+ "isExpression": false,
927
+ "asc": true,
928
+ "nulls": "last"
929
+ },
930
+ {
931
+ "expression": "provider",
932
+ "isExpression": false,
933
+ "asc": true,
934
+ "nulls": "last"
935
+ }
936
+ ],
937
+ "isUnique": false,
938
+ "concurrently": false,
939
+ "method": "btree",
940
+ "with": {}
941
+ }
942
+ },
943
+ "foreignKeys": {
944
+ "junior_identities_user_id_junior_users_id_fk": {
945
+ "name": "junior_identities_user_id_junior_users_id_fk",
946
+ "tableFrom": "junior_identities",
947
+ "tableTo": "junior_users",
948
+ "columnsFrom": [
949
+ "user_id"
950
+ ],
951
+ "columnsTo": [
952
+ "id"
953
+ ],
954
+ "onDelete": "no action",
955
+ "onUpdate": "no action"
956
+ }
957
+ },
958
+ "compositePrimaryKeys": {},
959
+ "uniqueConstraints": {},
960
+ "policies": {},
961
+ "checkConstraints": {},
962
+ "isRLSEnabled": false
963
+ },
964
+ "public.junior_users": {
965
+ "name": "junior_users",
966
+ "schema": "",
967
+ "columns": {
968
+ "id": {
969
+ "name": "id",
970
+ "type": "text",
971
+ "primaryKey": true,
972
+ "notNull": true
973
+ },
974
+ "primary_email": {
975
+ "name": "primary_email",
976
+ "type": "text",
977
+ "primaryKey": false,
978
+ "notNull": true
979
+ },
980
+ "primary_email_normalized": {
981
+ "name": "primary_email_normalized",
982
+ "type": "text",
983
+ "primaryKey": false,
984
+ "notNull": true
985
+ },
986
+ "display_name": {
987
+ "name": "display_name",
988
+ "type": "text",
989
+ "primaryKey": false,
990
+ "notNull": false
991
+ },
992
+ "created_at": {
993
+ "name": "created_at",
994
+ "type": "timestamp with time zone",
995
+ "primaryKey": false,
996
+ "notNull": true
997
+ },
998
+ "updated_at": {
999
+ "name": "updated_at",
1000
+ "type": "timestamp with time zone",
1001
+ "primaryKey": false,
1002
+ "notNull": true
1003
+ }
1004
+ },
1005
+ "indexes": {
1006
+ "junior_users_primary_email_normalized_uidx": {
1007
+ "name": "junior_users_primary_email_normalized_uidx",
1008
+ "columns": [
1009
+ {
1010
+ "expression": "primary_email_normalized",
1011
+ "isExpression": false,
1012
+ "asc": true,
1013
+ "nulls": "last"
1014
+ }
1015
+ ],
1016
+ "isUnique": true,
1017
+ "concurrently": false,
1018
+ "method": "btree",
1019
+ "with": {}
1020
+ }
1021
+ },
1022
+ "foreignKeys": {},
1023
+ "compositePrimaryKeys": {},
1024
+ "uniqueConstraints": {},
1025
+ "policies": {},
1026
+ "checkConstraints": {},
1027
+ "isRLSEnabled": false
1028
+ }
1029
+ },
1030
+ "enums": {},
1031
+ "schemas": {},
1032
+ "sequences": {},
1033
+ "roles": {},
1034
+ "policies": {},
1035
+ "views": {},
1036
+ "_meta": {
1037
+ "columns": {},
1038
+ "schemas": {},
1039
+ "tables": {}
1040
+ }
1041
+ }