@openora/core 0.4.1-canary.155 → 0.4.1-canary.156

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 (114) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/admin-console/plugin.d.ts +1 -0
  3. package/dist/admin-console/plugin.d.ts.map +1 -1
  4. package/dist/analytics/plugin.d.ts +1 -0
  5. package/dist/analytics/plugin.d.ts.map +1 -1
  6. package/dist/audit/plugin.d.ts +1 -0
  7. package/dist/audit/plugin.d.ts.map +1 -1
  8. package/dist/audit/plugin.js +19 -0
  9. package/dist/audit/plugin.js.map +1 -1
  10. package/dist/casino/gaming/__tests__/gaming.service.int.test.js +65 -11
  11. package/dist/casino/gaming/__tests__/gaming.service.int.test.js.map +1 -1
  12. package/dist/casino/gaming/plugin.d.ts +1 -0
  13. package/dist/casino/gaming/plugin.d.ts.map +1 -1
  14. package/dist/casino/gaming/plugin.js +2 -2
  15. package/dist/casino/gaming/plugin.js.map +1 -1
  16. package/dist/casino/gaming/router/index.d.ts.map +1 -1
  17. package/dist/casino/gaming/router/index.js +3 -3
  18. package/dist/casino/gaming/router/index.js.map +1 -1
  19. package/dist/casino/gaming/service/gaming.service.d.ts +13 -3
  20. package/dist/casino/gaming/service/gaming.service.d.ts.map +1 -1
  21. package/dist/casino/gaming/service/gaming.service.js +20 -3
  22. package/dist/casino/gaming/service/gaming.service.js.map +1 -1
  23. package/dist/casino/lobby/plugin.d.ts +1 -0
  24. package/dist/casino/lobby/plugin.d.ts.map +1 -1
  25. package/dist/cms/plugin.d.ts +1 -0
  26. package/dist/cms/plugin.d.ts.map +1 -1
  27. package/dist/compliance/__tests__/compliance.service.int.test.js +152 -3
  28. package/dist/compliance/__tests__/compliance.service.int.test.js.map +1 -1
  29. package/dist/compliance/contract/index.d.ts +59 -2
  30. package/dist/compliance/contract/index.d.ts.map +1 -1
  31. package/dist/compliance/contract/index.js +28 -2
  32. package/dist/compliance/contract/index.js.map +1 -1
  33. package/dist/compliance/drizzle/migrations/0009_living_felicia_hardy.sql +12 -0
  34. package/dist/compliance/drizzle/migrations/meta/0009_snapshot.json +974 -0
  35. package/dist/compliance/drizzle/migrations/meta/_journal.json +7 -0
  36. package/dist/compliance/plugin.d.ts +1 -0
  37. package/dist/compliance/plugin.d.ts.map +1 -1
  38. package/dist/compliance/plugin.js +2 -1
  39. package/dist/compliance/plugin.js.map +1 -1
  40. package/dist/compliance/router/index.d.ts +34 -1
  41. package/dist/compliance/router/index.d.ts.map +1 -1
  42. package/dist/compliance/router/index.js +13 -1
  43. package/dist/compliance/router/index.js.map +1 -1
  44. package/dist/compliance/schema/index.d.ts +110 -0
  45. package/dist/compliance/schema/index.d.ts.map +1 -1
  46. package/dist/compliance/schema/index.js +16 -0
  47. package/dist/compliance/schema/index.js.map +1 -1
  48. package/dist/compliance/service/compliance.service.d.ts +49 -2
  49. package/dist/compliance/service/compliance.service.d.ts.map +1 -1
  50. package/dist/compliance/service/compliance.service.js +111 -4
  51. package/dist/compliance/service/compliance.service.js.map +1 -1
  52. package/dist/contracts/adapters/__tests__/geo-ip.test.d.ts +2 -0
  53. package/dist/contracts/adapters/__tests__/geo-ip.test.d.ts.map +1 -0
  54. package/dist/contracts/adapters/__tests__/geo-ip.test.js +13 -0
  55. package/dist/contracts/adapters/__tests__/geo-ip.test.js.map +1 -0
  56. package/dist/contracts/adapters/game-geo-check.d.ts +33 -0
  57. package/dist/contracts/adapters/game-geo-check.d.ts.map +1 -0
  58. package/dist/contracts/adapters/game-geo-check.js +23 -0
  59. package/dist/contracts/adapters/game-geo-check.js.map +1 -0
  60. package/dist/contracts/adapters/geo-ip.d.ts +2 -4
  61. package/dist/contracts/adapters/geo-ip.d.ts.map +1 -1
  62. package/dist/contracts/adapters/geo-ip.js +9 -0
  63. package/dist/contracts/adapters/geo-ip.js.map +1 -1
  64. package/dist/contracts/adapters/index.d.ts +3 -1
  65. package/dist/contracts/adapters/index.d.ts.map +1 -1
  66. package/dist/contracts/adapters/index.js +2 -1
  67. package/dist/contracts/adapters/index.js.map +1 -1
  68. package/dist/contracts/schemas/__tests__/events.test.js +39 -0
  69. package/dist/contracts/schemas/__tests__/events.test.js.map +1 -1
  70. package/dist/contracts/schemas/compliance.d.ts +1 -0
  71. package/dist/contracts/schemas/compliance.d.ts.map +1 -1
  72. package/dist/contracts/schemas/compliance.js +1 -0
  73. package/dist/contracts/schemas/compliance.js.map +1 -1
  74. package/dist/contracts/schemas/events.d.ts +43 -0
  75. package/dist/contracts/schemas/events.d.ts.map +1 -1
  76. package/dist/contracts/schemas/events.js +27 -1
  77. package/dist/contracts/schemas/events.js.map +1 -1
  78. package/dist/contracts/schemas/iam.d.ts +1 -1
  79. package/dist/contracts/schemas/iam.js +1 -1
  80. package/dist/contracts/schemas/iam.js.map +1 -1
  81. package/dist/engagement/chat/plugin.d.ts +1 -0
  82. package/dist/engagement/chat/plugin.d.ts.map +1 -1
  83. package/dist/engagement/chat-commands/plugin.d.ts +1 -0
  84. package/dist/engagement/chat-commands/plugin.d.ts.map +1 -1
  85. package/dist/engagement/notifications/plugin.d.ts +1 -0
  86. package/dist/engagement/notifications/plugin.d.ts.map +1 -1
  87. package/dist/engagement/social/plugin.d.ts +1 -0
  88. package/dist/engagement/social/plugin.d.ts.map +1 -1
  89. package/dist/fx/exchange-rate/plugin.d.ts +1 -0
  90. package/dist/fx/exchange-rate/plugin.d.ts.map +1 -1
  91. package/dist/iam/plugin.d.ts +1 -0
  92. package/dist/iam/plugin.d.ts.map +1 -1
  93. package/dist/mail/plugin.d.ts +1 -0
  94. package/dist/mail/plugin.d.ts.map +1 -1
  95. package/dist/pam/identity/plugin.d.ts +1 -0
  96. package/dist/pam/identity/plugin.d.ts.map +1 -1
  97. package/dist/pam/player-management/plugin.d.ts +1 -0
  98. package/dist/pam/player-management/plugin.d.ts.map +1 -1
  99. package/dist/pam/player-note/plugin.d.ts +1 -0
  100. package/dist/pam/player-note/plugin.d.ts.map +1 -1
  101. package/dist/pam/profile/plugin.d.ts +1 -0
  102. package/dist/pam/profile/plugin.d.ts.map +1 -1
  103. package/dist/pam/tag/plugin.d.ts +1 -0
  104. package/dist/pam/tag/plugin.d.ts.map +1 -1
  105. package/dist/server/auth/permissions.d.ts +12 -12
  106. package/dist/server/auth/permissions.js +1 -1
  107. package/dist/server/auth/permissions.js.map +1 -1
  108. package/dist/server/runtime/core-token-catalog.d.ts +1 -0
  109. package/dist/server/runtime/core-token-catalog.d.ts.map +1 -1
  110. package/dist/server/runtime/core-token-catalog.js +2 -1
  111. package/dist/server/runtime/core-token-catalog.js.map +1 -1
  112. package/dist/wallet/plugin.d.ts +1 -0
  113. package/dist/wallet/plugin.d.ts.map +1 -1
  114. package/package.json +1 -1
@@ -0,0 +1,974 @@
1
+ {
2
+ "id": "0014b3e6-dee4-47d5-abca-655323901090",
3
+ "prevId": "cb111cb0-3745-47e1-bce9-48640f303fe0",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.geo_rule": {
8
+ "name": "geo_rule",
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
+ "country_code": {
19
+ "name": "country_code",
20
+ "type": "text",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "action": {
25
+ "name": "action",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "redirect_ip": {
31
+ "name": "redirect_ip",
32
+ "type": "boolean",
33
+ "primaryKey": false,
34
+ "notNull": true,
35
+ "default": false
36
+ },
37
+ "kyc_required": {
38
+ "name": "kyc_required",
39
+ "type": "boolean",
40
+ "primaryKey": false,
41
+ "notNull": true,
42
+ "default": true
43
+ },
44
+ "created_at": {
45
+ "name": "created_at",
46
+ "type": "timestamp with time zone",
47
+ "primaryKey": false,
48
+ "notNull": true,
49
+ "default": "now()"
50
+ },
51
+ "updated_at": {
52
+ "name": "updated_at",
53
+ "type": "timestamp with time zone",
54
+ "primaryKey": false,
55
+ "notNull": false
56
+ },
57
+ "updated_by": {
58
+ "name": "updated_by",
59
+ "type": "uuid",
60
+ "primaryKey": false,
61
+ "notNull": false
62
+ }
63
+ },
64
+ "indexes": {},
65
+ "foreignKeys": {},
66
+ "compositePrimaryKeys": {},
67
+ "uniqueConstraints": {
68
+ "geo_rule_country_code_unique": {
69
+ "name": "geo_rule_country_code_unique",
70
+ "nullsNotDistinct": false,
71
+ "columns": ["country_code"]
72
+ }
73
+ },
74
+ "policies": {},
75
+ "checkConstraints": {},
76
+ "isRLSEnabled": false
77
+ },
78
+ "public.game_geo_rule": {
79
+ "name": "game_geo_rule",
80
+ "schema": "",
81
+ "columns": {
82
+ "id": {
83
+ "name": "id",
84
+ "type": "uuid",
85
+ "primaryKey": true,
86
+ "notNull": true,
87
+ "default": "gen_random_uuid()"
88
+ },
89
+ "game_id": {
90
+ "name": "game_id",
91
+ "type": "uuid",
92
+ "primaryKey": false,
93
+ "notNull": true
94
+ },
95
+ "country_code": {
96
+ "name": "country_code",
97
+ "type": "text",
98
+ "primaryKey": false,
99
+ "notNull": true
100
+ },
101
+ "reason": {
102
+ "name": "reason",
103
+ "type": "text",
104
+ "primaryKey": false,
105
+ "notNull": true
106
+ },
107
+ "created_at": {
108
+ "name": "created_at",
109
+ "type": "timestamp with time zone",
110
+ "primaryKey": false,
111
+ "notNull": true,
112
+ "default": "now()"
113
+ },
114
+ "updated_at": {
115
+ "name": "updated_at",
116
+ "type": "timestamp with time zone",
117
+ "primaryKey": false,
118
+ "notNull": true,
119
+ "default": "now()"
120
+ }
121
+ },
122
+ "indexes": {
123
+ "game_geo_rule_game_id_country_code_key": {
124
+ "name": "game_geo_rule_game_id_country_code_key",
125
+ "columns": [
126
+ {
127
+ "expression": "game_id",
128
+ "isExpression": false,
129
+ "asc": true,
130
+ "nulls": "last"
131
+ },
132
+ {
133
+ "expression": "country_code",
134
+ "isExpression": false,
135
+ "asc": true,
136
+ "nulls": "last"
137
+ }
138
+ ],
139
+ "isUnique": true,
140
+ "concurrently": false,
141
+ "method": "btree",
142
+ "with": {}
143
+ },
144
+ "game_geo_rule_game_id_idx": {
145
+ "name": "game_geo_rule_game_id_idx",
146
+ "columns": [
147
+ {
148
+ "expression": "game_id",
149
+ "isExpression": false,
150
+ "asc": true,
151
+ "nulls": "last"
152
+ }
153
+ ],
154
+ "isUnique": false,
155
+ "concurrently": false,
156
+ "method": "btree",
157
+ "with": {}
158
+ },
159
+ "game_geo_rule_country_code_idx": {
160
+ "name": "game_geo_rule_country_code_idx",
161
+ "columns": [
162
+ {
163
+ "expression": "country_code",
164
+ "isExpression": false,
165
+ "asc": true,
166
+ "nulls": "last"
167
+ }
168
+ ],
169
+ "isUnique": false,
170
+ "concurrently": false,
171
+ "method": "btree",
172
+ "with": {}
173
+ }
174
+ },
175
+ "foreignKeys": {},
176
+ "compositePrimaryKeys": {},
177
+ "uniqueConstraints": {},
178
+ "policies": {},
179
+ "checkConstraints": {},
180
+ "isRLSEnabled": false
181
+ },
182
+ "public.global_kyc_config": {
183
+ "name": "global_kyc_config",
184
+ "schema": "",
185
+ "columns": {
186
+ "id": {
187
+ "name": "id",
188
+ "type": "uuid",
189
+ "primaryKey": true,
190
+ "notNull": true,
191
+ "default": "gen_random_uuid()"
192
+ },
193
+ "singleton_key": {
194
+ "name": "singleton_key",
195
+ "type": "text",
196
+ "primaryKey": false,
197
+ "notNull": true,
198
+ "default": "'global'"
199
+ },
200
+ "enabled": {
201
+ "name": "enabled",
202
+ "type": "boolean",
203
+ "primaryKey": false,
204
+ "notNull": true,
205
+ "default": true
206
+ },
207
+ "created_at": {
208
+ "name": "created_at",
209
+ "type": "timestamp with time zone",
210
+ "primaryKey": false,
211
+ "notNull": true,
212
+ "default": "now()"
213
+ },
214
+ "updated_at": {
215
+ "name": "updated_at",
216
+ "type": "timestamp with time zone",
217
+ "primaryKey": false,
218
+ "notNull": false
219
+ },
220
+ "updated_by": {
221
+ "name": "updated_by",
222
+ "type": "uuid",
223
+ "primaryKey": false,
224
+ "notNull": false
225
+ }
226
+ },
227
+ "indexes": {},
228
+ "foreignKeys": {},
229
+ "compositePrimaryKeys": {},
230
+ "uniqueConstraints": {
231
+ "global_kyc_config_singleton_key_unique": {
232
+ "name": "global_kyc_config_singleton_key_unique",
233
+ "nullsNotDistinct": false,
234
+ "columns": ["singleton_key"]
235
+ }
236
+ },
237
+ "policies": {},
238
+ "checkConstraints": {},
239
+ "isRLSEnabled": false
240
+ },
241
+ "public.kyc_verification": {
242
+ "name": "kyc_verification",
243
+ "schema": "",
244
+ "columns": {
245
+ "id": {
246
+ "name": "id",
247
+ "type": "uuid",
248
+ "primaryKey": true,
249
+ "notNull": true,
250
+ "default": "gen_random_uuid()"
251
+ },
252
+ "user_id": {
253
+ "name": "user_id",
254
+ "type": "uuid",
255
+ "primaryKey": false,
256
+ "notNull": true
257
+ },
258
+ "provider": {
259
+ "name": "provider",
260
+ "type": "text",
261
+ "primaryKey": false,
262
+ "notNull": true
263
+ },
264
+ "reference_id": {
265
+ "name": "reference_id",
266
+ "type": "text",
267
+ "primaryKey": false,
268
+ "notNull": true
269
+ },
270
+ "tier": {
271
+ "name": "tier",
272
+ "type": "kyc_verification_tier",
273
+ "typeSchema": "public",
274
+ "primaryKey": false,
275
+ "notNull": true,
276
+ "default": "'basic'"
277
+ },
278
+ "status": {
279
+ "name": "status",
280
+ "type": "kyc_verification_status",
281
+ "typeSchema": "public",
282
+ "primaryKey": false,
283
+ "notNull": true
284
+ },
285
+ "document_types": {
286
+ "name": "document_types",
287
+ "type": "jsonb",
288
+ "primaryKey": false,
289
+ "notNull": true,
290
+ "default": "'[]'::jsonb"
291
+ },
292
+ "decision_reason": {
293
+ "name": "decision_reason",
294
+ "type": "text",
295
+ "primaryKey": false,
296
+ "notNull": false
297
+ },
298
+ "risk_signals": {
299
+ "name": "risk_signals",
300
+ "type": "jsonb",
301
+ "primaryKey": false,
302
+ "notNull": false
303
+ },
304
+ "checks": {
305
+ "name": "checks",
306
+ "type": "jsonb",
307
+ "primaryKey": false,
308
+ "notNull": false
309
+ },
310
+ "triggered_by": {
311
+ "name": "triggered_by",
312
+ "type": "kyc_triggered_by",
313
+ "typeSchema": "public",
314
+ "primaryKey": false,
315
+ "notNull": true
316
+ },
317
+ "trigger_deposits": {
318
+ "name": "trigger_deposits",
319
+ "type": "numeric(18, 2)",
320
+ "primaryKey": false,
321
+ "notNull": false
322
+ },
323
+ "decision_received_at": {
324
+ "name": "decision_received_at",
325
+ "type": "timestamp with time zone",
326
+ "primaryKey": false,
327
+ "notNull": false
328
+ },
329
+ "submitted_at": {
330
+ "name": "submitted_at",
331
+ "type": "timestamp with time zone",
332
+ "primaryKey": false,
333
+ "notNull": true,
334
+ "default": "now()"
335
+ },
336
+ "decided_at": {
337
+ "name": "decided_at",
338
+ "type": "timestamp with time zone",
339
+ "primaryKey": false,
340
+ "notNull": false
341
+ },
342
+ "created_at": {
343
+ "name": "created_at",
344
+ "type": "timestamp with time zone",
345
+ "primaryKey": false,
346
+ "notNull": true,
347
+ "default": "now()"
348
+ },
349
+ "updated_at": {
350
+ "name": "updated_at",
351
+ "type": "timestamp with time zone",
352
+ "primaryKey": false,
353
+ "notNull": true
354
+ }
355
+ },
356
+ "indexes": {
357
+ "kyc_verification_user_id_tier_created_at_idx": {
358
+ "name": "kyc_verification_user_id_tier_created_at_idx",
359
+ "columns": [
360
+ {
361
+ "expression": "user_id",
362
+ "isExpression": false,
363
+ "asc": true,
364
+ "nulls": "last"
365
+ },
366
+ {
367
+ "expression": "tier",
368
+ "isExpression": false,
369
+ "asc": true,
370
+ "nulls": "last"
371
+ },
372
+ {
373
+ "expression": "created_at",
374
+ "isExpression": false,
375
+ "asc": true,
376
+ "nulls": "last"
377
+ }
378
+ ],
379
+ "isUnique": false,
380
+ "concurrently": false,
381
+ "method": "btree",
382
+ "with": {}
383
+ },
384
+ "kyc_verification_user_id_reference_id_tier_key": {
385
+ "name": "kyc_verification_user_id_reference_id_tier_key",
386
+ "columns": [
387
+ {
388
+ "expression": "user_id",
389
+ "isExpression": false,
390
+ "asc": true,
391
+ "nulls": "last"
392
+ },
393
+ {
394
+ "expression": "reference_id",
395
+ "isExpression": false,
396
+ "asc": true,
397
+ "nulls": "last"
398
+ },
399
+ {
400
+ "expression": "tier",
401
+ "isExpression": false,
402
+ "asc": true,
403
+ "nulls": "last"
404
+ }
405
+ ],
406
+ "isUnique": true,
407
+ "concurrently": false,
408
+ "method": "btree",
409
+ "with": {}
410
+ },
411
+ "kyc_verification_status_idx": {
412
+ "name": "kyc_verification_status_idx",
413
+ "columns": [
414
+ {
415
+ "expression": "status",
416
+ "isExpression": false,
417
+ "asc": true,
418
+ "nulls": "last"
419
+ }
420
+ ],
421
+ "isUnique": false,
422
+ "concurrently": false,
423
+ "method": "btree",
424
+ "with": {}
425
+ }
426
+ },
427
+ "foreignKeys": {},
428
+ "compositePrimaryKeys": {},
429
+ "uniqueConstraints": {},
430
+ "policies": {},
431
+ "checkConstraints": {},
432
+ "isRLSEnabled": false
433
+ },
434
+ "public.rg_exclusion": {
435
+ "name": "rg_exclusion",
436
+ "schema": "",
437
+ "columns": {
438
+ "id": {
439
+ "name": "id",
440
+ "type": "uuid",
441
+ "primaryKey": true,
442
+ "notNull": true,
443
+ "default": "gen_random_uuid()"
444
+ },
445
+ "user_id": {
446
+ "name": "user_id",
447
+ "type": "uuid",
448
+ "primaryKey": false,
449
+ "notNull": true
450
+ },
451
+ "kind": {
452
+ "name": "kind",
453
+ "type": "rg_exclusion_kind",
454
+ "typeSchema": "public",
455
+ "primaryKey": false,
456
+ "notNull": true
457
+ },
458
+ "status": {
459
+ "name": "status",
460
+ "type": "rg_exclusion_status",
461
+ "typeSchema": "public",
462
+ "primaryKey": false,
463
+ "notNull": true,
464
+ "default": "'active'"
465
+ },
466
+ "reason": {
467
+ "name": "reason",
468
+ "type": "text",
469
+ "primaryKey": false,
470
+ "notNull": true
471
+ },
472
+ "is_permanent": {
473
+ "name": "is_permanent",
474
+ "type": "boolean",
475
+ "primaryKey": false,
476
+ "notNull": true,
477
+ "default": false
478
+ },
479
+ "starts_at": {
480
+ "name": "starts_at",
481
+ "type": "timestamp with time zone",
482
+ "primaryKey": false,
483
+ "notNull": true,
484
+ "default": "now()"
485
+ },
486
+ "expires_at": {
487
+ "name": "expires_at",
488
+ "type": "timestamp with time zone",
489
+ "primaryKey": false,
490
+ "notNull": false
491
+ },
492
+ "lifted_at": {
493
+ "name": "lifted_at",
494
+ "type": "timestamp with time zone",
495
+ "primaryKey": false,
496
+ "notNull": false
497
+ },
498
+ "lifted_reason": {
499
+ "name": "lifted_reason",
500
+ "type": "text",
501
+ "primaryKey": false,
502
+ "notNull": false
503
+ },
504
+ "lifted_by": {
505
+ "name": "lifted_by",
506
+ "type": "uuid",
507
+ "primaryKey": false,
508
+ "notNull": false
509
+ },
510
+ "created_by": {
511
+ "name": "created_by",
512
+ "type": "uuid",
513
+ "primaryKey": false,
514
+ "notNull": true
515
+ },
516
+ "created_at": {
517
+ "name": "created_at",
518
+ "type": "timestamp with time zone",
519
+ "primaryKey": false,
520
+ "notNull": true,
521
+ "default": "now()"
522
+ },
523
+ "updated_at": {
524
+ "name": "updated_at",
525
+ "type": "timestamp with time zone",
526
+ "primaryKey": false,
527
+ "notNull": true
528
+ }
529
+ },
530
+ "indexes": {
531
+ "rg_exclusion_user_id_idx": {
532
+ "name": "rg_exclusion_user_id_idx",
533
+ "columns": [
534
+ {
535
+ "expression": "user_id",
536
+ "isExpression": false,
537
+ "asc": true,
538
+ "nulls": "last"
539
+ }
540
+ ],
541
+ "isUnique": false,
542
+ "concurrently": false,
543
+ "method": "btree",
544
+ "with": {}
545
+ },
546
+ "rg_exclusion_user_id_status_idx": {
547
+ "name": "rg_exclusion_user_id_status_idx",
548
+ "columns": [
549
+ {
550
+ "expression": "user_id",
551
+ "isExpression": false,
552
+ "asc": true,
553
+ "nulls": "last"
554
+ },
555
+ {
556
+ "expression": "status",
557
+ "isExpression": false,
558
+ "asc": true,
559
+ "nulls": "last"
560
+ }
561
+ ],
562
+ "isUnique": false,
563
+ "concurrently": false,
564
+ "method": "btree",
565
+ "with": {}
566
+ },
567
+ "rg_exclusion_kind_status_idx": {
568
+ "name": "rg_exclusion_kind_status_idx",
569
+ "columns": [
570
+ {
571
+ "expression": "kind",
572
+ "isExpression": false,
573
+ "asc": true,
574
+ "nulls": "last"
575
+ },
576
+ {
577
+ "expression": "status",
578
+ "isExpression": false,
579
+ "asc": true,
580
+ "nulls": "last"
581
+ }
582
+ ],
583
+ "isUnique": false,
584
+ "concurrently": false,
585
+ "method": "btree",
586
+ "with": {}
587
+ },
588
+ "rg_exclusion_active_kind_key": {
589
+ "name": "rg_exclusion_active_kind_key",
590
+ "columns": [
591
+ {
592
+ "expression": "user_id",
593
+ "isExpression": false,
594
+ "asc": true,
595
+ "nulls": "last"
596
+ },
597
+ {
598
+ "expression": "kind",
599
+ "isExpression": false,
600
+ "asc": true,
601
+ "nulls": "last"
602
+ }
603
+ ],
604
+ "isUnique": true,
605
+ "where": "\"rg_exclusion\".\"status\" = 'active'",
606
+ "concurrently": false,
607
+ "method": "btree",
608
+ "with": {}
609
+ }
610
+ },
611
+ "foreignKeys": {},
612
+ "compositePrimaryKeys": {},
613
+ "uniqueConstraints": {},
614
+ "policies": {},
615
+ "checkConstraints": {},
616
+ "isRLSEnabled": false
617
+ },
618
+ "public.rg_flag": {
619
+ "name": "rg_flag",
620
+ "schema": "",
621
+ "columns": {
622
+ "id": {
623
+ "name": "id",
624
+ "type": "uuid",
625
+ "primaryKey": true,
626
+ "notNull": true,
627
+ "default": "gen_random_uuid()"
628
+ },
629
+ "user_id": {
630
+ "name": "user_id",
631
+ "type": "uuid",
632
+ "primaryKey": false,
633
+ "notNull": true
634
+ },
635
+ "flag_type": {
636
+ "name": "flag_type",
637
+ "type": "rg_flag_type",
638
+ "typeSchema": "public",
639
+ "primaryKey": false,
640
+ "notNull": true
641
+ },
642
+ "limit_type": {
643
+ "name": "limit_type",
644
+ "type": "text",
645
+ "primaryKey": false,
646
+ "notNull": false
647
+ },
648
+ "detail": {
649
+ "name": "detail",
650
+ "type": "jsonb",
651
+ "primaryKey": false,
652
+ "notNull": true,
653
+ "default": "'{}'::jsonb"
654
+ },
655
+ "status": {
656
+ "name": "status",
657
+ "type": "rg_flag_status",
658
+ "typeSchema": "public",
659
+ "primaryKey": false,
660
+ "notNull": true,
661
+ "default": "'active'"
662
+ },
663
+ "flagged_at": {
664
+ "name": "flagged_at",
665
+ "type": "timestamp with time zone",
666
+ "primaryKey": false,
667
+ "notNull": true,
668
+ "default": "now()"
669
+ },
670
+ "cleared_at": {
671
+ "name": "cleared_at",
672
+ "type": "timestamp with time zone",
673
+ "primaryKey": false,
674
+ "notNull": false
675
+ }
676
+ },
677
+ "indexes": {
678
+ "rg_flag_status_flagged_at_idx": {
679
+ "name": "rg_flag_status_flagged_at_idx",
680
+ "columns": [
681
+ {
682
+ "expression": "status",
683
+ "isExpression": false,
684
+ "asc": true,
685
+ "nulls": "last"
686
+ },
687
+ {
688
+ "expression": "flagged_at",
689
+ "isExpression": false,
690
+ "asc": true,
691
+ "nulls": "last"
692
+ }
693
+ ],
694
+ "isUnique": false,
695
+ "concurrently": false,
696
+ "method": "btree",
697
+ "with": {}
698
+ },
699
+ "rg_flag_user_id_idx": {
700
+ "name": "rg_flag_user_id_idx",
701
+ "columns": [
702
+ {
703
+ "expression": "user_id",
704
+ "isExpression": false,
705
+ "asc": true,
706
+ "nulls": "last"
707
+ }
708
+ ],
709
+ "isUnique": false,
710
+ "concurrently": false,
711
+ "method": "btree",
712
+ "with": {}
713
+ },
714
+ "rg_flag_flag_type_idx": {
715
+ "name": "rg_flag_flag_type_idx",
716
+ "columns": [
717
+ {
718
+ "expression": "flag_type",
719
+ "isExpression": false,
720
+ "asc": true,
721
+ "nulls": "last"
722
+ }
723
+ ],
724
+ "isUnique": false,
725
+ "concurrently": false,
726
+ "method": "btree",
727
+ "with": {}
728
+ }
729
+ },
730
+ "foreignKeys": {},
731
+ "compositePrimaryKeys": {},
732
+ "uniqueConstraints": {},
733
+ "policies": {},
734
+ "checkConstraints": {},
735
+ "isRLSEnabled": false
736
+ },
737
+ "public.user_limit": {
738
+ "name": "user_limit",
739
+ "schema": "",
740
+ "columns": {
741
+ "id": {
742
+ "name": "id",
743
+ "type": "uuid",
744
+ "primaryKey": true,
745
+ "notNull": true,
746
+ "default": "gen_random_uuid()"
747
+ },
748
+ "user_id": {
749
+ "name": "user_id",
750
+ "type": "uuid",
751
+ "primaryKey": false,
752
+ "notNull": true
753
+ },
754
+ "type": {
755
+ "name": "type",
756
+ "type": "text",
757
+ "primaryKey": false,
758
+ "notNull": true
759
+ },
760
+ "amount": {
761
+ "name": "amount",
762
+ "type": "numeric(38, 18)",
763
+ "primaryKey": false,
764
+ "notNull": false
765
+ },
766
+ "minutes": {
767
+ "name": "minutes",
768
+ "type": "integer",
769
+ "primaryKey": false,
770
+ "notNull": false
771
+ },
772
+ "currency": {
773
+ "name": "currency",
774
+ "type": "text",
775
+ "primaryKey": false,
776
+ "notNull": false
777
+ },
778
+ "period": {
779
+ "name": "period",
780
+ "type": "text",
781
+ "primaryKey": false,
782
+ "notNull": true
783
+ },
784
+ "pending_kind": {
785
+ "name": "pending_kind",
786
+ "type": "limit_change_kind",
787
+ "typeSchema": "public",
788
+ "primaryKey": false,
789
+ "notNull": false
790
+ },
791
+ "pending_amount": {
792
+ "name": "pending_amount",
793
+ "type": "numeric(38, 18)",
794
+ "primaryKey": false,
795
+ "notNull": false
796
+ },
797
+ "pending_minutes": {
798
+ "name": "pending_minutes",
799
+ "type": "integer",
800
+ "primaryKey": false,
801
+ "notNull": false
802
+ },
803
+ "pending_currency": {
804
+ "name": "pending_currency",
805
+ "type": "text",
806
+ "primaryKey": false,
807
+ "notNull": false
808
+ },
809
+ "pending_requested_at": {
810
+ "name": "pending_requested_at",
811
+ "type": "timestamp with time zone",
812
+ "primaryKey": false,
813
+ "notNull": false
814
+ },
815
+ "pending_effective_at": {
816
+ "name": "pending_effective_at",
817
+ "type": "timestamp with time zone",
818
+ "primaryKey": false,
819
+ "notNull": false
820
+ },
821
+ "pending_expires_at": {
822
+ "name": "pending_expires_at",
823
+ "type": "timestamp with time zone",
824
+ "primaryKey": false,
825
+ "notNull": false
826
+ },
827
+ "created_at": {
828
+ "name": "created_at",
829
+ "type": "timestamp with time zone",
830
+ "primaryKey": false,
831
+ "notNull": true,
832
+ "default": "now()"
833
+ },
834
+ "updated_at": {
835
+ "name": "updated_at",
836
+ "type": "timestamp with time zone",
837
+ "primaryKey": false,
838
+ "notNull": true
839
+ }
840
+ },
841
+ "indexes": {
842
+ "user_limit_user_id_type_period_currency_key": {
843
+ "name": "user_limit_user_id_type_period_currency_key",
844
+ "columns": [
845
+ {
846
+ "expression": "user_id",
847
+ "isExpression": false,
848
+ "asc": true,
849
+ "nulls": "last"
850
+ },
851
+ {
852
+ "expression": "type",
853
+ "isExpression": false,
854
+ "asc": true,
855
+ "nulls": "last"
856
+ },
857
+ {
858
+ "expression": "period",
859
+ "isExpression": false,
860
+ "asc": true,
861
+ "nulls": "last"
862
+ },
863
+ {
864
+ "expression": "currency",
865
+ "isExpression": false,
866
+ "asc": true,
867
+ "nulls": "last"
868
+ }
869
+ ],
870
+ "isUnique": true,
871
+ "concurrently": false,
872
+ "method": "btree",
873
+ "with": {}
874
+ },
875
+ "user_limit_user_id_idx": {
876
+ "name": "user_limit_user_id_idx",
877
+ "columns": [
878
+ {
879
+ "expression": "user_id",
880
+ "isExpression": false,
881
+ "asc": true,
882
+ "nulls": "last"
883
+ }
884
+ ],
885
+ "isUnique": false,
886
+ "concurrently": false,
887
+ "method": "btree",
888
+ "with": {}
889
+ },
890
+ "user_limit_pending_expires_at_idx": {
891
+ "name": "user_limit_pending_expires_at_idx",
892
+ "columns": [
893
+ {
894
+ "expression": "pending_expires_at",
895
+ "isExpression": false,
896
+ "asc": true,
897
+ "nulls": "last"
898
+ }
899
+ ],
900
+ "isUnique": false,
901
+ "concurrently": false,
902
+ "method": "btree",
903
+ "with": {}
904
+ }
905
+ },
906
+ "foreignKeys": {},
907
+ "compositePrimaryKeys": {},
908
+ "uniqueConstraints": {},
909
+ "policies": {},
910
+ "checkConstraints": {},
911
+ "isRLSEnabled": false
912
+ }
913
+ },
914
+ "enums": {
915
+ "public.kyc_triggered_by": {
916
+ "name": "kyc_triggered_by",
917
+ "schema": "public",
918
+ "values": ["submission", "reverify_threshold", "manual"]
919
+ },
920
+ "public.kyc_verification_status": {
921
+ "name": "kyc_verification_status",
922
+ "schema": "public",
923
+ "values": [
924
+ "not_started",
925
+ "pending",
926
+ "approved",
927
+ "verified",
928
+ "rejected",
929
+ "resubmission_requested",
930
+ "manually_overridden"
931
+ ]
932
+ },
933
+ "public.kyc_verification_tier": {
934
+ "name": "kyc_verification_tier",
935
+ "schema": "public",
936
+ "values": ["basic", "advanced"]
937
+ },
938
+ "public.limit_change_kind": {
939
+ "name": "limit_change_kind",
940
+ "schema": "public",
941
+ "values": ["increase", "removal"]
942
+ },
943
+ "public.rg_exclusion_kind": {
944
+ "name": "rg_exclusion_kind",
945
+ "schema": "public",
946
+ "values": ["cooling_off", "self_exclusion"]
947
+ },
948
+ "public.rg_exclusion_status": {
949
+ "name": "rg_exclusion_status",
950
+ "schema": "public",
951
+ "values": ["active", "lifted", "expired"]
952
+ },
953
+ "public.rg_flag_status": {
954
+ "name": "rg_flag_status",
955
+ "schema": "public",
956
+ "values": ["active", "cleared"]
957
+ },
958
+ "public.rg_flag_type": {
959
+ "name": "rg_flag_type",
960
+ "schema": "public",
961
+ "values": ["limit_threshold", "session_time", "self_excluded_login"]
962
+ }
963
+ },
964
+ "schemas": {},
965
+ "sequences": {},
966
+ "roles": {},
967
+ "policies": {},
968
+ "views": {},
969
+ "_meta": {
970
+ "columns": {},
971
+ "schemas": {},
972
+ "tables": {}
973
+ }
974
+ }