@openora/core 0.4.1-canary.113 → 0.4.1-canary.115

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