@openora/core 0.4.1-canary.122 → 0.4.1-canary.124

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 (25) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/contracts/adapters/admin-user-directory.d.ts +7 -1
  3. package/dist/contracts/adapters/admin-user-directory.d.ts.map +1 -1
  4. package/dist/contracts/adapters/admin-user-directory.js.map +1 -1
  5. package/dist/contracts/adapters/index.d.ts +1 -1
  6. package/dist/contracts/adapters/index.d.ts.map +1 -1
  7. package/dist/contracts/adapters/index.js.map +1 -1
  8. package/dist/engagement/chat/drizzle/migrations/0011_light_changeling.sql +1 -0
  9. package/dist/engagement/chat/drizzle/migrations/meta/0011_snapshot.json +1489 -0
  10. package/dist/engagement/chat/drizzle/migrations/meta/_journal.json +7 -0
  11. package/dist/engagement/chat/schema/index.d.ts.map +1 -1
  12. package/dist/engagement/chat/schema/index.js +1 -0
  13. package/dist/engagement/chat/schema/index.js.map +1 -1
  14. package/dist/engagement/chat-commands/service/__tests__/chat-commands.service.test.js +110 -0
  15. package/dist/engagement/chat-commands/service/__tests__/chat-commands.service.test.js.map +1 -1
  16. package/dist/engagement/chat-commands/service/chat-commands.service.d.ts.map +1 -1
  17. package/dist/engagement/chat-commands/service/chat-commands.service.js +23 -17
  18. package/dist/engagement/chat-commands/service/chat-commands.service.js.map +1 -1
  19. package/dist/pam/identity/__tests__/admin-user-directory.int.test.js +17 -0
  20. package/dist/pam/identity/__tests__/admin-user-directory.int.test.js.map +1 -1
  21. package/dist/pam/identity/admin-user-directory.d.ts +2 -2
  22. package/dist/pam/identity/admin-user-directory.d.ts.map +1 -1
  23. package/dist/pam/identity/admin-user-directory.js +7 -4
  24. package/dist/pam/identity/admin-user-directory.js.map +1 -1
  25. package/package.json +1 -1
@@ -0,0 +1,1489 @@
1
+ {
2
+ "id": "1416988b-f7d3-4953-a048-6a3e5857a58f",
3
+ "prevId": "d8417b73-ad9f-44b4-8ed8-a78d17a757a2",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.chat_message": {
8
+ "name": "chat_message",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "room_id": {
19
+ "name": "room_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": false
23
+ },
24
+ "user_id": {
25
+ "name": "user_id",
26
+ "type": "uuid",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "username": {
31
+ "name": "username",
32
+ "type": "text",
33
+ "primaryKey": false,
34
+ "notNull": true
35
+ },
36
+ "content": {
37
+ "name": "content",
38
+ "type": "text",
39
+ "primaryKey": false,
40
+ "notNull": true
41
+ },
42
+ "type": {
43
+ "name": "type",
44
+ "type": "chat_message_type",
45
+ "typeSchema": "public",
46
+ "primaryKey": false,
47
+ "notNull": true,
48
+ "default": "'user'"
49
+ },
50
+ "metadata": {
51
+ "name": "metadata",
52
+ "type": "jsonb",
53
+ "primaryKey": false,
54
+ "notNull": false
55
+ },
56
+ "attachment": {
57
+ "name": "attachment",
58
+ "type": "jsonb",
59
+ "primaryKey": false,
60
+ "notNull": false
61
+ },
62
+ "is_deleted": {
63
+ "name": "is_deleted",
64
+ "type": "boolean",
65
+ "primaryKey": false,
66
+ "notNull": true,
67
+ "default": false
68
+ },
69
+ "deleted_at": {
70
+ "name": "deleted_at",
71
+ "type": "timestamp with time zone",
72
+ "primaryKey": false,
73
+ "notNull": false
74
+ },
75
+ "created_at": {
76
+ "name": "created_at",
77
+ "type": "timestamp with time zone",
78
+ "primaryKey": false,
79
+ "notNull": true,
80
+ "default": "now()"
81
+ }
82
+ },
83
+ "indexes": {
84
+ "chat_msg_room_id_created_at_idx": {
85
+ "name": "chat_msg_room_id_created_at_idx",
86
+ "columns": [
87
+ {
88
+ "expression": "room_id",
89
+ "isExpression": false,
90
+ "asc": true,
91
+ "nulls": "last"
92
+ },
93
+ {
94
+ "expression": "created_at",
95
+ "isExpression": false,
96
+ "asc": true,
97
+ "nulls": "last"
98
+ }
99
+ ],
100
+ "isUnique": false,
101
+ "concurrently": false,
102
+ "method": "btree",
103
+ "with": {}
104
+ },
105
+ "chat_msg_created_at_idx": {
106
+ "name": "chat_msg_created_at_idx",
107
+ "columns": [
108
+ {
109
+ "expression": "created_at",
110
+ "isExpression": false,
111
+ "asc": true,
112
+ "nulls": "last"
113
+ }
114
+ ],
115
+ "isUnique": false,
116
+ "concurrently": false,
117
+ "method": "btree",
118
+ "with": {}
119
+ },
120
+ "chat_msg_deleted_at_idx": {
121
+ "name": "chat_msg_deleted_at_idx",
122
+ "columns": [
123
+ {
124
+ "expression": "deleted_at",
125
+ "isExpression": false,
126
+ "asc": true,
127
+ "nulls": "last"
128
+ }
129
+ ],
130
+ "isUnique": false,
131
+ "concurrently": false,
132
+ "method": "btree",
133
+ "with": {}
134
+ },
135
+ "chat_msg_user_id_created_at_idx": {
136
+ "name": "chat_msg_user_id_created_at_idx",
137
+ "columns": [
138
+ {
139
+ "expression": "user_id",
140
+ "isExpression": false,
141
+ "asc": true,
142
+ "nulls": "last"
143
+ },
144
+ {
145
+ "expression": "created_at",
146
+ "isExpression": false,
147
+ "asc": true,
148
+ "nulls": "last"
149
+ }
150
+ ],
151
+ "isUnique": false,
152
+ "concurrently": false,
153
+ "method": "btree",
154
+ "with": {}
155
+ }
156
+ },
157
+ "foreignKeys": {
158
+ "chat_message_room_id_chat_room_id_fk": {
159
+ "name": "chat_message_room_id_chat_room_id_fk",
160
+ "tableFrom": "chat_message",
161
+ "tableTo": "chat_room",
162
+ "columnsFrom": ["room_id"],
163
+ "columnsTo": ["id"],
164
+ "onDelete": "no action",
165
+ "onUpdate": "no action"
166
+ }
167
+ },
168
+ "compositePrimaryKeys": {},
169
+ "uniqueConstraints": {},
170
+ "policies": {},
171
+ "checkConstraints": {},
172
+ "isRLSEnabled": false
173
+ },
174
+ "public.chat_mute": {
175
+ "name": "chat_mute",
176
+ "schema": "",
177
+ "columns": {
178
+ "id": {
179
+ "name": "id",
180
+ "type": "uuid",
181
+ "primaryKey": true,
182
+ "notNull": true,
183
+ "default": "gen_random_uuid()"
184
+ },
185
+ "user_id": {
186
+ "name": "user_id",
187
+ "type": "uuid",
188
+ "primaryKey": false,
189
+ "notNull": true
190
+ },
191
+ "room_id": {
192
+ "name": "room_id",
193
+ "type": "uuid",
194
+ "primaryKey": false,
195
+ "notNull": false
196
+ },
197
+ "scope": {
198
+ "name": "scope",
199
+ "type": "chat_moderation_scope",
200
+ "typeSchema": "public",
201
+ "primaryKey": false,
202
+ "notNull": true,
203
+ "default": "'__global'"
204
+ },
205
+ "muted_by": {
206
+ "name": "muted_by",
207
+ "type": "uuid",
208
+ "primaryKey": false,
209
+ "notNull": true
210
+ },
211
+ "reason": {
212
+ "name": "reason",
213
+ "type": "text",
214
+ "primaryKey": false,
215
+ "notNull": true
216
+ },
217
+ "created_at": {
218
+ "name": "created_at",
219
+ "type": "timestamp with time zone",
220
+ "primaryKey": false,
221
+ "notNull": true,
222
+ "default": "now()"
223
+ },
224
+ "expires_at": {
225
+ "name": "expires_at",
226
+ "type": "timestamp with time zone",
227
+ "primaryKey": false,
228
+ "notNull": false
229
+ },
230
+ "lifted_at": {
231
+ "name": "lifted_at",
232
+ "type": "timestamp with time zone",
233
+ "primaryKey": false,
234
+ "notNull": false
235
+ },
236
+ "lifted_by": {
237
+ "name": "lifted_by",
238
+ "type": "uuid",
239
+ "primaryKey": false,
240
+ "notNull": false
241
+ }
242
+ },
243
+ "indexes": {
244
+ "chat_mute_user_room_idx": {
245
+ "name": "chat_mute_user_room_idx",
246
+ "columns": [
247
+ {
248
+ "expression": "user_id",
249
+ "isExpression": false,
250
+ "asc": true,
251
+ "nulls": "last"
252
+ },
253
+ {
254
+ "expression": "room_id",
255
+ "isExpression": false,
256
+ "asc": true,
257
+ "nulls": "last"
258
+ }
259
+ ],
260
+ "isUnique": false,
261
+ "concurrently": false,
262
+ "method": "btree",
263
+ "with": {}
264
+ },
265
+ "chat_mute_expires_at_idx": {
266
+ "name": "chat_mute_expires_at_idx",
267
+ "columns": [
268
+ {
269
+ "expression": "expires_at",
270
+ "isExpression": false,
271
+ "asc": true,
272
+ "nulls": "last"
273
+ }
274
+ ],
275
+ "isUnique": false,
276
+ "concurrently": false,
277
+ "method": "btree",
278
+ "with": {}
279
+ }
280
+ },
281
+ "foreignKeys": {},
282
+ "compositePrimaryKeys": {},
283
+ "uniqueConstraints": {},
284
+ "policies": {},
285
+ "checkConstraints": {},
286
+ "isRLSEnabled": false
287
+ },
288
+ "public.chat_platform_ban": {
289
+ "name": "chat_platform_ban",
290
+ "schema": "",
291
+ "columns": {
292
+ "id": {
293
+ "name": "id",
294
+ "type": "uuid",
295
+ "primaryKey": true,
296
+ "notNull": true,
297
+ "default": "gen_random_uuid()"
298
+ },
299
+ "user_id": {
300
+ "name": "user_id",
301
+ "type": "uuid",
302
+ "primaryKey": false,
303
+ "notNull": true
304
+ },
305
+ "banned_by": {
306
+ "name": "banned_by",
307
+ "type": "uuid",
308
+ "primaryKey": false,
309
+ "notNull": true
310
+ },
311
+ "scope": {
312
+ "name": "scope",
313
+ "type": "chat_moderation_scope",
314
+ "typeSchema": "public",
315
+ "primaryKey": false,
316
+ "notNull": true,
317
+ "default": "'__all_public'"
318
+ },
319
+ "room_id": {
320
+ "name": "room_id",
321
+ "type": "uuid",
322
+ "primaryKey": false,
323
+ "notNull": false
324
+ },
325
+ "reason": {
326
+ "name": "reason",
327
+ "type": "text",
328
+ "primaryKey": false,
329
+ "notNull": true
330
+ },
331
+ "created_at": {
332
+ "name": "created_at",
333
+ "type": "timestamp with time zone",
334
+ "primaryKey": false,
335
+ "notNull": true,
336
+ "default": "now()"
337
+ },
338
+ "expires_at": {
339
+ "name": "expires_at",
340
+ "type": "timestamp with time zone",
341
+ "primaryKey": false,
342
+ "notNull": false
343
+ },
344
+ "lifted_at": {
345
+ "name": "lifted_at",
346
+ "type": "timestamp with time zone",
347
+ "primaryKey": false,
348
+ "notNull": false
349
+ },
350
+ "lifted_by": {
351
+ "name": "lifted_by",
352
+ "type": "uuid",
353
+ "primaryKey": false,
354
+ "notNull": false
355
+ }
356
+ },
357
+ "indexes": {
358
+ "chat_platform_ban_active_scope_key": {
359
+ "name": "chat_platform_ban_active_scope_key",
360
+ "columns": [
361
+ {
362
+ "expression": "user_id",
363
+ "isExpression": false,
364
+ "asc": true,
365
+ "nulls": "last"
366
+ },
367
+ {
368
+ "expression": "scope",
369
+ "isExpression": false,
370
+ "asc": true,
371
+ "nulls": "last"
372
+ }
373
+ ],
374
+ "isUnique": true,
375
+ "where": "\"chat_platform_ban\".\"lifted_at\" IS NULL AND \"chat_platform_ban\".\"room_id\" IS NULL",
376
+ "concurrently": false,
377
+ "method": "btree",
378
+ "with": {}
379
+ },
380
+ "chat_platform_ban_active_room_key": {
381
+ "name": "chat_platform_ban_active_room_key",
382
+ "columns": [
383
+ {
384
+ "expression": "user_id",
385
+ "isExpression": false,
386
+ "asc": true,
387
+ "nulls": "last"
388
+ },
389
+ {
390
+ "expression": "scope",
391
+ "isExpression": false,
392
+ "asc": true,
393
+ "nulls": "last"
394
+ },
395
+ {
396
+ "expression": "room_id",
397
+ "isExpression": false,
398
+ "asc": true,
399
+ "nulls": "last"
400
+ }
401
+ ],
402
+ "isUnique": true,
403
+ "where": "\"chat_platform_ban\".\"lifted_at\" IS NULL AND \"chat_platform_ban\".\"room_id\" IS NOT NULL",
404
+ "concurrently": false,
405
+ "method": "btree",
406
+ "with": {}
407
+ },
408
+ "chat_platform_ban_user_idx": {
409
+ "name": "chat_platform_ban_user_idx",
410
+ "columns": [
411
+ {
412
+ "expression": "user_id",
413
+ "isExpression": false,
414
+ "asc": true,
415
+ "nulls": "last"
416
+ }
417
+ ],
418
+ "isUnique": false,
419
+ "concurrently": false,
420
+ "method": "btree",
421
+ "with": {}
422
+ }
423
+ },
424
+ "foreignKeys": {
425
+ "chat_platform_ban_room_id_chat_room_id_fk": {
426
+ "name": "chat_platform_ban_room_id_chat_room_id_fk",
427
+ "tableFrom": "chat_platform_ban",
428
+ "tableTo": "chat_room",
429
+ "columnsFrom": ["room_id"],
430
+ "columnsTo": ["id"],
431
+ "onDelete": "no action",
432
+ "onUpdate": "no action"
433
+ }
434
+ },
435
+ "compositePrimaryKeys": {},
436
+ "uniqueConstraints": {},
437
+ "policies": {},
438
+ "checkConstraints": {},
439
+ "isRLSEnabled": false
440
+ },
441
+ "public.chat_room": {
442
+ "name": "chat_room",
443
+ "schema": "",
444
+ "columns": {
445
+ "id": {
446
+ "name": "id",
447
+ "type": "uuid",
448
+ "primaryKey": true,
449
+ "notNull": true,
450
+ "default": "gen_random_uuid()"
451
+ },
452
+ "name": {
453
+ "name": "name",
454
+ "type": "text",
455
+ "primaryKey": false,
456
+ "notNull": true
457
+ },
458
+ "slug": {
459
+ "name": "slug",
460
+ "type": "text",
461
+ "primaryKey": false,
462
+ "notNull": true
463
+ },
464
+ "category": {
465
+ "name": "category",
466
+ "type": "chat_room_category",
467
+ "typeSchema": "public",
468
+ "primaryKey": false,
469
+ "notNull": false
470
+ },
471
+ "is_public": {
472
+ "name": "is_public",
473
+ "type": "boolean",
474
+ "primaryKey": false,
475
+ "notNull": true,
476
+ "default": true
477
+ },
478
+ "join_code": {
479
+ "name": "join_code",
480
+ "type": "text",
481
+ "primaryKey": false,
482
+ "notNull": false
483
+ },
484
+ "creator_id": {
485
+ "name": "creator_id",
486
+ "type": "uuid",
487
+ "primaryKey": false,
488
+ "notNull": false
489
+ },
490
+ "created_at": {
491
+ "name": "created_at",
492
+ "type": "timestamp with time zone",
493
+ "primaryKey": false,
494
+ "notNull": true,
495
+ "default": "now()"
496
+ },
497
+ "deleted_at": {
498
+ "name": "deleted_at",
499
+ "type": "timestamp with time zone",
500
+ "primaryKey": false,
501
+ "notNull": false
502
+ }
503
+ },
504
+ "indexes": {
505
+ "chat_room_slug_key": {
506
+ "name": "chat_room_slug_key",
507
+ "columns": [
508
+ {
509
+ "expression": "slug",
510
+ "isExpression": false,
511
+ "asc": true,
512
+ "nulls": "last"
513
+ }
514
+ ],
515
+ "isUnique": true,
516
+ "concurrently": false,
517
+ "method": "btree",
518
+ "with": {}
519
+ },
520
+ "chat_room_join_code_key": {
521
+ "name": "chat_room_join_code_key",
522
+ "columns": [
523
+ {
524
+ "expression": "join_code",
525
+ "isExpression": false,
526
+ "asc": true,
527
+ "nulls": "last"
528
+ }
529
+ ],
530
+ "isUnique": true,
531
+ "concurrently": false,
532
+ "method": "btree",
533
+ "with": {}
534
+ },
535
+ "chat_room_deleted_at_idx": {
536
+ "name": "chat_room_deleted_at_idx",
537
+ "columns": [
538
+ {
539
+ "expression": "deleted_at",
540
+ "isExpression": false,
541
+ "asc": true,
542
+ "nulls": "last"
543
+ }
544
+ ],
545
+ "isUnique": false,
546
+ "concurrently": false,
547
+ "method": "btree",
548
+ "with": {}
549
+ },
550
+ "chat_room_creator_public_deleted_at_idx": {
551
+ "name": "chat_room_creator_public_deleted_at_idx",
552
+ "columns": [
553
+ {
554
+ "expression": "creator_id",
555
+ "isExpression": false,
556
+ "asc": true,
557
+ "nulls": "last"
558
+ },
559
+ {
560
+ "expression": "is_public",
561
+ "isExpression": false,
562
+ "asc": true,
563
+ "nulls": "last"
564
+ },
565
+ {
566
+ "expression": "deleted_at",
567
+ "isExpression": false,
568
+ "asc": true,
569
+ "nulls": "last"
570
+ }
571
+ ],
572
+ "isUnique": false,
573
+ "concurrently": false,
574
+ "method": "btree",
575
+ "with": {}
576
+ }
577
+ },
578
+ "foreignKeys": {},
579
+ "compositePrimaryKeys": {},
580
+ "uniqueConstraints": {},
581
+ "policies": {},
582
+ "checkConstraints": {},
583
+ "isRLSEnabled": false
584
+ },
585
+ "public.chat_room_ban": {
586
+ "name": "chat_room_ban",
587
+ "schema": "",
588
+ "columns": {
589
+ "id": {
590
+ "name": "id",
591
+ "type": "uuid",
592
+ "primaryKey": true,
593
+ "notNull": true,
594
+ "default": "gen_random_uuid()"
595
+ },
596
+ "room_id": {
597
+ "name": "room_id",
598
+ "type": "uuid",
599
+ "primaryKey": false,
600
+ "notNull": true
601
+ },
602
+ "user_id": {
603
+ "name": "user_id",
604
+ "type": "uuid",
605
+ "primaryKey": false,
606
+ "notNull": true
607
+ },
608
+ "banned_by": {
609
+ "name": "banned_by",
610
+ "type": "uuid",
611
+ "primaryKey": false,
612
+ "notNull": true
613
+ },
614
+ "created_at": {
615
+ "name": "created_at",
616
+ "type": "timestamp with time zone",
617
+ "primaryKey": false,
618
+ "notNull": true,
619
+ "default": "now()"
620
+ },
621
+ "expires_at": {
622
+ "name": "expires_at",
623
+ "type": "timestamp with time zone",
624
+ "primaryKey": false,
625
+ "notNull": false
626
+ },
627
+ "lifted_at": {
628
+ "name": "lifted_at",
629
+ "type": "timestamp with time zone",
630
+ "primaryKey": false,
631
+ "notNull": false
632
+ },
633
+ "lifted_by": {
634
+ "name": "lifted_by",
635
+ "type": "uuid",
636
+ "primaryKey": false,
637
+ "notNull": false
638
+ }
639
+ },
640
+ "indexes": {
641
+ "chat_room_ban_active_room_user_key": {
642
+ "name": "chat_room_ban_active_room_user_key",
643
+ "columns": [
644
+ {
645
+ "expression": "room_id",
646
+ "isExpression": false,
647
+ "asc": true,
648
+ "nulls": "last"
649
+ },
650
+ {
651
+ "expression": "user_id",
652
+ "isExpression": false,
653
+ "asc": true,
654
+ "nulls": "last"
655
+ }
656
+ ],
657
+ "isUnique": true,
658
+ "where": "\"chat_room_ban\".\"lifted_at\" IS NULL",
659
+ "concurrently": false,
660
+ "method": "btree",
661
+ "with": {}
662
+ },
663
+ "chat_room_ban_room_idx": {
664
+ "name": "chat_room_ban_room_idx",
665
+ "columns": [
666
+ {
667
+ "expression": "room_id",
668
+ "isExpression": false,
669
+ "asc": true,
670
+ "nulls": "last"
671
+ }
672
+ ],
673
+ "isUnique": false,
674
+ "concurrently": false,
675
+ "method": "btree",
676
+ "with": {}
677
+ },
678
+ "chat_room_ban_user_idx": {
679
+ "name": "chat_room_ban_user_idx",
680
+ "columns": [
681
+ {
682
+ "expression": "user_id",
683
+ "isExpression": false,
684
+ "asc": true,
685
+ "nulls": "last"
686
+ }
687
+ ],
688
+ "isUnique": false,
689
+ "concurrently": false,
690
+ "method": "btree",
691
+ "with": {}
692
+ },
693
+ "chat_room_ban_expires_at_idx": {
694
+ "name": "chat_room_ban_expires_at_idx",
695
+ "columns": [
696
+ {
697
+ "expression": "expires_at",
698
+ "isExpression": false,
699
+ "asc": true,
700
+ "nulls": "last"
701
+ }
702
+ ],
703
+ "isUnique": false,
704
+ "concurrently": false,
705
+ "method": "btree",
706
+ "with": {}
707
+ }
708
+ },
709
+ "foreignKeys": {
710
+ "chat_room_ban_room_id_chat_room_id_fk": {
711
+ "name": "chat_room_ban_room_id_chat_room_id_fk",
712
+ "tableFrom": "chat_room_ban",
713
+ "tableTo": "chat_room",
714
+ "columnsFrom": ["room_id"],
715
+ "columnsTo": ["id"],
716
+ "onDelete": "cascade",
717
+ "onUpdate": "no action"
718
+ }
719
+ },
720
+ "compositePrimaryKeys": {},
721
+ "uniqueConstraints": {},
722
+ "policies": {},
723
+ "checkConstraints": {},
724
+ "isRLSEnabled": false
725
+ },
726
+ "public.chat_room_configuration": {
727
+ "name": "chat_room_configuration",
728
+ "schema": "",
729
+ "columns": {
730
+ "id": {
731
+ "name": "id",
732
+ "type": "uuid",
733
+ "primaryKey": true,
734
+ "notNull": true,
735
+ "default": "gen_random_uuid()"
736
+ },
737
+ "room_id": {
738
+ "name": "room_id",
739
+ "type": "uuid",
740
+ "primaryKey": false,
741
+ "notNull": true
742
+ },
743
+ "slow_mode": {
744
+ "name": "slow_mode",
745
+ "type": "boolean",
746
+ "primaryKey": false,
747
+ "notNull": true,
748
+ "default": false
749
+ },
750
+ "slow_mode_seconds": {
751
+ "name": "slow_mode_seconds",
752
+ "type": "integer",
753
+ "primaryKey": false,
754
+ "notNull": true,
755
+ "default": 0
756
+ },
757
+ "read_only_mode": {
758
+ "name": "read_only_mode",
759
+ "type": "boolean",
760
+ "primaryKey": false,
761
+ "notNull": true,
762
+ "default": false
763
+ },
764
+ "only_invited_can_join": {
765
+ "name": "only_invited_can_join",
766
+ "type": "boolean",
767
+ "primaryKey": false,
768
+ "notNull": true,
769
+ "default": false
770
+ },
771
+ "lock_room": {
772
+ "name": "lock_room",
773
+ "type": "boolean",
774
+ "primaryKey": false,
775
+ "notNull": true,
776
+ "default": false
777
+ },
778
+ "moderator_invite": {
779
+ "name": "moderator_invite",
780
+ "type": "boolean",
781
+ "primaryKey": false,
782
+ "notNull": true,
783
+ "default": false
784
+ },
785
+ "created_at": {
786
+ "name": "created_at",
787
+ "type": "timestamp with time zone",
788
+ "primaryKey": false,
789
+ "notNull": true,
790
+ "default": "now()"
791
+ },
792
+ "updated_at": {
793
+ "name": "updated_at",
794
+ "type": "timestamp with time zone",
795
+ "primaryKey": false,
796
+ "notNull": true,
797
+ "default": "now()"
798
+ }
799
+ },
800
+ "indexes": {
801
+ "chat_room_configuration_room_key": {
802
+ "name": "chat_room_configuration_room_key",
803
+ "columns": [
804
+ {
805
+ "expression": "room_id",
806
+ "isExpression": false,
807
+ "asc": true,
808
+ "nulls": "last"
809
+ }
810
+ ],
811
+ "isUnique": true,
812
+ "concurrently": false,
813
+ "method": "btree",
814
+ "with": {}
815
+ }
816
+ },
817
+ "foreignKeys": {
818
+ "chat_room_configuration_room_id_chat_room_id_fk": {
819
+ "name": "chat_room_configuration_room_id_chat_room_id_fk",
820
+ "tableFrom": "chat_room_configuration",
821
+ "tableTo": "chat_room",
822
+ "columnsFrom": ["room_id"],
823
+ "columnsTo": ["id"],
824
+ "onDelete": "cascade",
825
+ "onUpdate": "no action"
826
+ }
827
+ },
828
+ "compositePrimaryKeys": {},
829
+ "uniqueConstraints": {},
830
+ "policies": {},
831
+ "checkConstraints": {},
832
+ "isRLSEnabled": false
833
+ },
834
+ "public.chat_room_member": {
835
+ "name": "chat_room_member",
836
+ "schema": "",
837
+ "columns": {
838
+ "id": {
839
+ "name": "id",
840
+ "type": "uuid",
841
+ "primaryKey": true,
842
+ "notNull": true,
843
+ "default": "gen_random_uuid()"
844
+ },
845
+ "room_id": {
846
+ "name": "room_id",
847
+ "type": "uuid",
848
+ "primaryKey": false,
849
+ "notNull": true
850
+ },
851
+ "user_id": {
852
+ "name": "user_id",
853
+ "type": "uuid",
854
+ "primaryKey": false,
855
+ "notNull": true
856
+ },
857
+ "role": {
858
+ "name": "role",
859
+ "type": "chat_room_role",
860
+ "typeSchema": "public",
861
+ "primaryKey": false,
862
+ "notNull": true,
863
+ "default": "'member'"
864
+ },
865
+ "role_assigned_at": {
866
+ "name": "role_assigned_at",
867
+ "type": "timestamp with time zone",
868
+ "primaryKey": false,
869
+ "notNull": false
870
+ },
871
+ "joined_at": {
872
+ "name": "joined_at",
873
+ "type": "timestamp with time zone",
874
+ "primaryKey": false,
875
+ "notNull": true,
876
+ "default": "now()"
877
+ }
878
+ },
879
+ "indexes": {
880
+ "chat_room_member_room_user_key": {
881
+ "name": "chat_room_member_room_user_key",
882
+ "columns": [
883
+ {
884
+ "expression": "room_id",
885
+ "isExpression": false,
886
+ "asc": true,
887
+ "nulls": "last"
888
+ },
889
+ {
890
+ "expression": "user_id",
891
+ "isExpression": false,
892
+ "asc": true,
893
+ "nulls": "last"
894
+ }
895
+ ],
896
+ "isUnique": true,
897
+ "concurrently": false,
898
+ "method": "btree",
899
+ "with": {}
900
+ },
901
+ "chat_room_member_room_idx": {
902
+ "name": "chat_room_member_room_idx",
903
+ "columns": [
904
+ {
905
+ "expression": "room_id",
906
+ "isExpression": false,
907
+ "asc": true,
908
+ "nulls": "last"
909
+ }
910
+ ],
911
+ "isUnique": false,
912
+ "concurrently": false,
913
+ "method": "btree",
914
+ "with": {}
915
+ },
916
+ "chat_room_member_user_idx": {
917
+ "name": "chat_room_member_user_idx",
918
+ "columns": [
919
+ {
920
+ "expression": "user_id",
921
+ "isExpression": false,
922
+ "asc": true,
923
+ "nulls": "last"
924
+ }
925
+ ],
926
+ "isUnique": false,
927
+ "concurrently": false,
928
+ "method": "btree",
929
+ "with": {}
930
+ }
931
+ },
932
+ "foreignKeys": {
933
+ "chat_room_member_room_id_chat_room_id_fk": {
934
+ "name": "chat_room_member_room_id_chat_room_id_fk",
935
+ "tableFrom": "chat_room_member",
936
+ "tableTo": "chat_room",
937
+ "columnsFrom": ["room_id"],
938
+ "columnsTo": ["id"],
939
+ "onDelete": "cascade",
940
+ "onUpdate": "no action"
941
+ }
942
+ },
943
+ "compositePrimaryKeys": {},
944
+ "uniqueConstraints": {},
945
+ "policies": {},
946
+ "checkConstraints": {},
947
+ "isRLSEnabled": false
948
+ },
949
+ "public.chat_room_mute": {
950
+ "name": "chat_room_mute",
951
+ "schema": "",
952
+ "columns": {
953
+ "id": {
954
+ "name": "id",
955
+ "type": "uuid",
956
+ "primaryKey": true,
957
+ "notNull": true,
958
+ "default": "gen_random_uuid()"
959
+ },
960
+ "room_id": {
961
+ "name": "room_id",
962
+ "type": "uuid",
963
+ "primaryKey": false,
964
+ "notNull": true
965
+ },
966
+ "user_id": {
967
+ "name": "user_id",
968
+ "type": "uuid",
969
+ "primaryKey": false,
970
+ "notNull": true
971
+ },
972
+ "muted_by": {
973
+ "name": "muted_by",
974
+ "type": "uuid",
975
+ "primaryKey": false,
976
+ "notNull": true
977
+ },
978
+ "reason": {
979
+ "name": "reason",
980
+ "type": "text",
981
+ "primaryKey": false,
982
+ "notNull": true
983
+ },
984
+ "created_at": {
985
+ "name": "created_at",
986
+ "type": "timestamp with time zone",
987
+ "primaryKey": false,
988
+ "notNull": true,
989
+ "default": "now()"
990
+ },
991
+ "expires_at": {
992
+ "name": "expires_at",
993
+ "type": "timestamp with time zone",
994
+ "primaryKey": false,
995
+ "notNull": false
996
+ },
997
+ "lifted_at": {
998
+ "name": "lifted_at",
999
+ "type": "timestamp with time zone",
1000
+ "primaryKey": false,
1001
+ "notNull": false
1002
+ },
1003
+ "lifted_by": {
1004
+ "name": "lifted_by",
1005
+ "type": "uuid",
1006
+ "primaryKey": false,
1007
+ "notNull": false
1008
+ }
1009
+ },
1010
+ "indexes": {
1011
+ "chat_room_mute_active_room_user_key": {
1012
+ "name": "chat_room_mute_active_room_user_key",
1013
+ "columns": [
1014
+ {
1015
+ "expression": "room_id",
1016
+ "isExpression": false,
1017
+ "asc": true,
1018
+ "nulls": "last"
1019
+ },
1020
+ {
1021
+ "expression": "user_id",
1022
+ "isExpression": false,
1023
+ "asc": true,
1024
+ "nulls": "last"
1025
+ }
1026
+ ],
1027
+ "isUnique": true,
1028
+ "where": "\"chat_room_mute\".\"lifted_at\" IS NULL",
1029
+ "concurrently": false,
1030
+ "method": "btree",
1031
+ "with": {}
1032
+ },
1033
+ "chat_room_mute_room_user_idx": {
1034
+ "name": "chat_room_mute_room_user_idx",
1035
+ "columns": [
1036
+ {
1037
+ "expression": "room_id",
1038
+ "isExpression": false,
1039
+ "asc": true,
1040
+ "nulls": "last"
1041
+ },
1042
+ {
1043
+ "expression": "user_id",
1044
+ "isExpression": false,
1045
+ "asc": true,
1046
+ "nulls": "last"
1047
+ }
1048
+ ],
1049
+ "isUnique": false,
1050
+ "concurrently": false,
1051
+ "method": "btree",
1052
+ "with": {}
1053
+ },
1054
+ "chat_room_mute_expires_at_idx": {
1055
+ "name": "chat_room_mute_expires_at_idx",
1056
+ "columns": [
1057
+ {
1058
+ "expression": "expires_at",
1059
+ "isExpression": false,
1060
+ "asc": true,
1061
+ "nulls": "last"
1062
+ }
1063
+ ],
1064
+ "isUnique": false,
1065
+ "concurrently": false,
1066
+ "method": "btree",
1067
+ "with": {}
1068
+ }
1069
+ },
1070
+ "foreignKeys": {
1071
+ "chat_room_mute_room_id_chat_room_id_fk": {
1072
+ "name": "chat_room_mute_room_id_chat_room_id_fk",
1073
+ "tableFrom": "chat_room_mute",
1074
+ "tableTo": "chat_room",
1075
+ "columnsFrom": ["room_id"],
1076
+ "columnsTo": ["id"],
1077
+ "onDelete": "cascade",
1078
+ "onUpdate": "no action"
1079
+ }
1080
+ },
1081
+ "compositePrimaryKeys": {},
1082
+ "uniqueConstraints": {},
1083
+ "policies": {},
1084
+ "checkConstraints": {},
1085
+ "isRLSEnabled": false
1086
+ },
1087
+ "public.chat_room_remove": {
1088
+ "name": "chat_room_remove",
1089
+ "schema": "",
1090
+ "columns": {
1091
+ "id": {
1092
+ "name": "id",
1093
+ "type": "uuid",
1094
+ "primaryKey": true,
1095
+ "notNull": true,
1096
+ "default": "gen_random_uuid()"
1097
+ },
1098
+ "room_id": {
1099
+ "name": "room_id",
1100
+ "type": "uuid",
1101
+ "primaryKey": false,
1102
+ "notNull": true
1103
+ },
1104
+ "user_id": {
1105
+ "name": "user_id",
1106
+ "type": "uuid",
1107
+ "primaryKey": false,
1108
+ "notNull": true
1109
+ },
1110
+ "removed_by": {
1111
+ "name": "removed_by",
1112
+ "type": "uuid",
1113
+ "primaryKey": false,
1114
+ "notNull": true
1115
+ },
1116
+ "reason": {
1117
+ "name": "reason",
1118
+ "type": "text",
1119
+ "primaryKey": false,
1120
+ "notNull": true
1121
+ },
1122
+ "created_at": {
1123
+ "name": "created_at",
1124
+ "type": "timestamp with time zone",
1125
+ "primaryKey": false,
1126
+ "notNull": true,
1127
+ "default": "now()"
1128
+ }
1129
+ },
1130
+ "indexes": {
1131
+ "chat_room_remove_room_created_at_idx": {
1132
+ "name": "chat_room_remove_room_created_at_idx",
1133
+ "columns": [
1134
+ {
1135
+ "expression": "room_id",
1136
+ "isExpression": false,
1137
+ "asc": true,
1138
+ "nulls": "last"
1139
+ },
1140
+ {
1141
+ "expression": "created_at",
1142
+ "isExpression": false,
1143
+ "asc": true,
1144
+ "nulls": "last"
1145
+ }
1146
+ ],
1147
+ "isUnique": false,
1148
+ "concurrently": false,
1149
+ "method": "btree",
1150
+ "with": {}
1151
+ },
1152
+ "chat_room_remove_user_idx": {
1153
+ "name": "chat_room_remove_user_idx",
1154
+ "columns": [
1155
+ {
1156
+ "expression": "user_id",
1157
+ "isExpression": false,
1158
+ "asc": true,
1159
+ "nulls": "last"
1160
+ }
1161
+ ],
1162
+ "isUnique": false,
1163
+ "concurrently": false,
1164
+ "method": "btree",
1165
+ "with": {}
1166
+ }
1167
+ },
1168
+ "foreignKeys": {
1169
+ "chat_room_remove_room_id_chat_room_id_fk": {
1170
+ "name": "chat_room_remove_room_id_chat_room_id_fk",
1171
+ "tableFrom": "chat_room_remove",
1172
+ "tableTo": "chat_room",
1173
+ "columnsFrom": ["room_id"],
1174
+ "columnsTo": ["id"],
1175
+ "onDelete": "cascade",
1176
+ "onUpdate": "no action"
1177
+ }
1178
+ },
1179
+ "compositePrimaryKeys": {},
1180
+ "uniqueConstraints": {},
1181
+ "policies": {},
1182
+ "checkConstraints": {},
1183
+ "isRLSEnabled": false
1184
+ },
1185
+ "public.chat_room_rule": {
1186
+ "name": "chat_room_rule",
1187
+ "schema": "",
1188
+ "columns": {
1189
+ "id": {
1190
+ "name": "id",
1191
+ "type": "uuid",
1192
+ "primaryKey": true,
1193
+ "notNull": true,
1194
+ "default": "gen_random_uuid()"
1195
+ },
1196
+ "room_id": {
1197
+ "name": "room_id",
1198
+ "type": "uuid",
1199
+ "primaryKey": false,
1200
+ "notNull": true
1201
+ },
1202
+ "created_by": {
1203
+ "name": "created_by",
1204
+ "type": "uuid",
1205
+ "primaryKey": false,
1206
+ "notNull": true
1207
+ },
1208
+ "order_num": {
1209
+ "name": "order_num",
1210
+ "type": "integer",
1211
+ "primaryKey": false,
1212
+ "notNull": true
1213
+ },
1214
+ "content": {
1215
+ "name": "content",
1216
+ "type": "text",
1217
+ "primaryKey": false,
1218
+ "notNull": true
1219
+ },
1220
+ "created_at": {
1221
+ "name": "created_at",
1222
+ "type": "timestamp with time zone",
1223
+ "primaryKey": false,
1224
+ "notNull": true,
1225
+ "default": "now()"
1226
+ },
1227
+ "updated_at": {
1228
+ "name": "updated_at",
1229
+ "type": "timestamp with time zone",
1230
+ "primaryKey": false,
1231
+ "notNull": true,
1232
+ "default": "now()"
1233
+ }
1234
+ },
1235
+ "indexes": {
1236
+ "chat_room_rule_room_order_idx": {
1237
+ "name": "chat_room_rule_room_order_idx",
1238
+ "columns": [
1239
+ {
1240
+ "expression": "room_id",
1241
+ "isExpression": false,
1242
+ "asc": true,
1243
+ "nulls": "last"
1244
+ },
1245
+ {
1246
+ "expression": "order_num",
1247
+ "isExpression": false,
1248
+ "asc": true,
1249
+ "nulls": "last"
1250
+ }
1251
+ ],
1252
+ "isUnique": false,
1253
+ "concurrently": false,
1254
+ "method": "btree",
1255
+ "with": {}
1256
+ },
1257
+ "chat_room_rule_room_idx": {
1258
+ "name": "chat_room_rule_room_idx",
1259
+ "columns": [
1260
+ {
1261
+ "expression": "room_id",
1262
+ "isExpression": false,
1263
+ "asc": true,
1264
+ "nulls": "last"
1265
+ }
1266
+ ],
1267
+ "isUnique": false,
1268
+ "concurrently": false,
1269
+ "method": "btree",
1270
+ "with": {}
1271
+ }
1272
+ },
1273
+ "foreignKeys": {
1274
+ "chat_room_rule_room_id_chat_room_id_fk": {
1275
+ "name": "chat_room_rule_room_id_chat_room_id_fk",
1276
+ "tableFrom": "chat_room_rule",
1277
+ "tableTo": "chat_room",
1278
+ "columnsFrom": ["room_id"],
1279
+ "columnsTo": ["id"],
1280
+ "onDelete": "cascade",
1281
+ "onUpdate": "no action"
1282
+ }
1283
+ },
1284
+ "compositePrimaryKeys": {},
1285
+ "uniqueConstraints": {},
1286
+ "policies": {},
1287
+ "checkConstraints": {},
1288
+ "isRLSEnabled": false
1289
+ },
1290
+ "public.chat_user_block": {
1291
+ "name": "chat_user_block",
1292
+ "schema": "",
1293
+ "columns": {
1294
+ "id": {
1295
+ "name": "id",
1296
+ "type": "uuid",
1297
+ "primaryKey": true,
1298
+ "notNull": true,
1299
+ "default": "gen_random_uuid()"
1300
+ },
1301
+ "blocker_id": {
1302
+ "name": "blocker_id",
1303
+ "type": "uuid",
1304
+ "primaryKey": false,
1305
+ "notNull": true
1306
+ },
1307
+ "blocked_id": {
1308
+ "name": "blocked_id",
1309
+ "type": "uuid",
1310
+ "primaryKey": false,
1311
+ "notNull": true
1312
+ },
1313
+ "created_at": {
1314
+ "name": "created_at",
1315
+ "type": "timestamp with time zone",
1316
+ "primaryKey": false,
1317
+ "notNull": true,
1318
+ "default": "now()"
1319
+ },
1320
+ "removed_at": {
1321
+ "name": "removed_at",
1322
+ "type": "timestamp with time zone",
1323
+ "primaryKey": false,
1324
+ "notNull": false
1325
+ }
1326
+ },
1327
+ "indexes": {
1328
+ "chat_user_block_pair_key": {
1329
+ "name": "chat_user_block_pair_key",
1330
+ "columns": [
1331
+ {
1332
+ "expression": "blocker_id",
1333
+ "isExpression": false,
1334
+ "asc": true,
1335
+ "nulls": "last"
1336
+ },
1337
+ {
1338
+ "expression": "blocked_id",
1339
+ "isExpression": false,
1340
+ "asc": true,
1341
+ "nulls": "last"
1342
+ }
1343
+ ],
1344
+ "isUnique": true,
1345
+ "where": "\"chat_user_block\".\"removed_at\" IS NULL",
1346
+ "concurrently": false,
1347
+ "method": "btree",
1348
+ "with": {}
1349
+ },
1350
+ "chat_user_block_blocker_idx": {
1351
+ "name": "chat_user_block_blocker_idx",
1352
+ "columns": [
1353
+ {
1354
+ "expression": "blocker_id",
1355
+ "isExpression": false,
1356
+ "asc": true,
1357
+ "nulls": "last"
1358
+ }
1359
+ ],
1360
+ "isUnique": false,
1361
+ "concurrently": false,
1362
+ "method": "btree",
1363
+ "with": {}
1364
+ }
1365
+ },
1366
+ "foreignKeys": {},
1367
+ "compositePrimaryKeys": {},
1368
+ "uniqueConstraints": {},
1369
+ "policies": {},
1370
+ "checkConstraints": {},
1371
+ "isRLSEnabled": false
1372
+ },
1373
+ "public.chat_user_ignore": {
1374
+ "name": "chat_user_ignore",
1375
+ "schema": "",
1376
+ "columns": {
1377
+ "id": {
1378
+ "name": "id",
1379
+ "type": "uuid",
1380
+ "primaryKey": true,
1381
+ "notNull": true,
1382
+ "default": "gen_random_uuid()"
1383
+ },
1384
+ "ignorer_id": {
1385
+ "name": "ignorer_id",
1386
+ "type": "uuid",
1387
+ "primaryKey": false,
1388
+ "notNull": true
1389
+ },
1390
+ "ignored_id": {
1391
+ "name": "ignored_id",
1392
+ "type": "uuid",
1393
+ "primaryKey": false,
1394
+ "notNull": true
1395
+ },
1396
+ "created_at": {
1397
+ "name": "created_at",
1398
+ "type": "timestamp with time zone",
1399
+ "primaryKey": false,
1400
+ "notNull": true,
1401
+ "default": "now()"
1402
+ },
1403
+ "removed_at": {
1404
+ "name": "removed_at",
1405
+ "type": "timestamp with time zone",
1406
+ "primaryKey": false,
1407
+ "notNull": false
1408
+ }
1409
+ },
1410
+ "indexes": {
1411
+ "chat_user_ignore_pair_key": {
1412
+ "name": "chat_user_ignore_pair_key",
1413
+ "columns": [
1414
+ {
1415
+ "expression": "ignorer_id",
1416
+ "isExpression": false,
1417
+ "asc": true,
1418
+ "nulls": "last"
1419
+ },
1420
+ {
1421
+ "expression": "ignored_id",
1422
+ "isExpression": false,
1423
+ "asc": true,
1424
+ "nulls": "last"
1425
+ }
1426
+ ],
1427
+ "isUnique": true,
1428
+ "where": "\"chat_user_ignore\".\"removed_at\" IS NULL",
1429
+ "concurrently": false,
1430
+ "method": "btree",
1431
+ "with": {}
1432
+ },
1433
+ "chat_user_ignore_ignorer_idx": {
1434
+ "name": "chat_user_ignore_ignorer_idx",
1435
+ "columns": [
1436
+ {
1437
+ "expression": "ignorer_id",
1438
+ "isExpression": false,
1439
+ "asc": true,
1440
+ "nulls": "last"
1441
+ }
1442
+ ],
1443
+ "isUnique": false,
1444
+ "concurrently": false,
1445
+ "method": "btree",
1446
+ "with": {}
1447
+ }
1448
+ },
1449
+ "foreignKeys": {},
1450
+ "compositePrimaryKeys": {},
1451
+ "uniqueConstraints": {},
1452
+ "policies": {},
1453
+ "checkConstraints": {},
1454
+ "isRLSEnabled": false
1455
+ }
1456
+ },
1457
+ "enums": {
1458
+ "public.chat_message_type": {
1459
+ "name": "chat_message_type",
1460
+ "schema": "public",
1461
+ "values": ["user", "system"]
1462
+ },
1463
+ "public.chat_moderation_scope": {
1464
+ "name": "chat_moderation_scope",
1465
+ "schema": "public",
1466
+ "values": ["__global", "__all_public", "__all", "room"]
1467
+ },
1468
+ "public.chat_room_category": {
1469
+ "name": "chat_room_category",
1470
+ "schema": "public",
1471
+ "values": ["games-sports", "regions", "languages", "private-channels"]
1472
+ },
1473
+ "public.chat_room_role": {
1474
+ "name": "chat_room_role",
1475
+ "schema": "public",
1476
+ "values": ["member", "moderator", "owner"]
1477
+ }
1478
+ },
1479
+ "schemas": {},
1480
+ "sequences": {},
1481
+ "roles": {},
1482
+ "policies": {},
1483
+ "views": {},
1484
+ "_meta": {
1485
+ "columns": {},
1486
+ "schemas": {},
1487
+ "tables": {}
1488
+ }
1489
+ }