@spfn/auth 0.2.1 → 0.3.0-beta.2

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 (61) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1091 -2385
  3. package/dist/authenticate-55LeXHqZ.d.ts +1447 -0
  4. package/dist/client-proof.d.ts +606 -0
  5. package/dist/client-proof.js +1842 -0
  6. package/dist/client-proof.js.map +1 -0
  7. package/dist/config.d.ts +319 -3
  8. package/dist/config.js +155 -5
  9. package/dist/config.js.map +1 -1
  10. package/dist/crypto.d.ts +61 -0
  11. package/dist/crypto.js +108 -0
  12. package/dist/crypto.js.map +1 -0
  13. package/dist/errors.d.ts +180 -3
  14. package/dist/errors.js +116 -1
  15. package/dist/errors.js.map +1 -1
  16. package/dist/index.d.ts +166 -18
  17. package/dist/index.js +132 -8
  18. package/dist/index.js.map +1 -1
  19. package/dist/nextjs/api.js +404 -96
  20. package/dist/nextjs/api.js.map +1 -1
  21. package/dist/nextjs/server.d.ts +5 -4
  22. package/dist/nextjs/server.js +165 -26
  23. package/dist/nextjs/server.js.map +1 -1
  24. package/dist/server.d.ts +2356 -1053
  25. package/dist/server.js +5153 -736
  26. package/dist/server.js.map +1 -1
  27. package/dist/session-DTHahDQ9.d.ts +53 -0
  28. package/dist/types-DYyhze28.d.ts +98 -0
  29. package/dist/wire-version-CtzMKvBB.d.ts +134 -0
  30. package/migrations/20251125021229_premium_famine/snapshot.json +2641 -0
  31. package/migrations/20260225130050_smooth_the_fury/snapshot.json +2686 -0
  32. package/migrations/20260308141417_deep_iceman/snapshot.json +2686 -0
  33. package/migrations/20260308151309_perfect_deathbird/snapshot.json +2731 -0
  34. package/migrations/20260308201135_concerned_rawhide_kid/snapshot.json +2786 -0
  35. package/migrations/20260629103209_lethal_lifeguard/migration.sql +32 -0
  36. package/migrations/20260629103209_lethal_lifeguard/snapshot.json +2786 -0
  37. package/migrations/20260709073531_easy_hardball/migration.sql +24 -0
  38. package/migrations/20260709073531_easy_hardball/snapshot.json +3119 -0
  39. package/migrations/20260714081434_glossy_major_mapleleaf/migration.sql +1 -0
  40. package/migrations/20260714081434_glossy_major_mapleleaf/snapshot.json +3112 -0
  41. package/migrations/20260804105939_amazing_bushwacker/migration.sql +3 -0
  42. package/migrations/20260804105939_amazing_bushwacker/snapshot.json +3112 -0
  43. package/migrations/20260804110033_fat_piledriver/migration.sql +2 -0
  44. package/migrations/20260804110033_fat_piledriver/snapshot.json +3138 -0
  45. package/migrations/20260805143152_vengeful_ravenous/migration.sql +4 -0
  46. package/migrations/20260805143152_vengeful_ravenous/snapshot.json +3190 -0
  47. package/migrations/20260807145911_mixed_invisible_woman/migration.sql +11 -0
  48. package/migrations/20260807145911_mixed_invisible_woman/snapshot.json +3334 -0
  49. package/package.json +59 -40
  50. package/dist/authenticate-eucncHxN.d.ts +0 -940
  51. package/migrations/meta/0000_snapshot.json +0 -1632
  52. package/migrations/meta/0001_snapshot.json +0 -1660
  53. package/migrations/meta/0002_snapshot.json +0 -1660
  54. package/migrations/meta/0003_snapshot.json +0 -1689
  55. package/migrations/meta/0004_snapshot.json +0 -1721
  56. package/migrations/meta/_journal.json +0 -41
  57. /package/migrations/{0000_premium_famine.sql → 20251125021229_premium_famine/migration.sql} +0 -0
  58. /package/migrations/{0001_smooth_the_fury.sql → 20260225130050_smooth_the_fury/migration.sql} +0 -0
  59. /package/migrations/{0002_deep_iceman.sql → 20260308141417_deep_iceman/migration.sql} +0 -0
  60. /package/migrations/{0003_perfect_deathbird.sql → 20260308151309_perfect_deathbird/migration.sql} +0 -0
  61. /package/migrations/{0004_concerned_rawhide_kid.sql → 20260308201135_concerned_rawhide_kid/migration.sql} +0 -0
@@ -1,1689 +0,0 @@
1
- {
2
- "id": "550bd6cc-4be9-4e6b-897b-d094949823ae",
3
- "prevId": "eb2d27a0-ac55-4fdc-8aef-27b7f8c5f8ce",
4
- "version": "7",
5
- "dialect": "postgresql",
6
- "tables": {
7
- "spfn_auth.users": {
8
- "name": "users",
9
- "schema": "spfn_auth",
10
- "columns": {
11
- "id": {
12
- "name": "id",
13
- "type": "bigserial",
14
- "primaryKey": true,
15
- "notNull": true
16
- },
17
- "public_id": {
18
- "name": "public_id",
19
- "type": "uuid",
20
- "primaryKey": false,
21
- "notNull": true,
22
- "default": "gen_random_uuid()"
23
- },
24
- "email": {
25
- "name": "email",
26
- "type": "text",
27
- "primaryKey": false,
28
- "notNull": false
29
- },
30
- "phone": {
31
- "name": "phone",
32
- "type": "text",
33
- "primaryKey": false,
34
- "notNull": false
35
- },
36
- "username": {
37
- "name": "username",
38
- "type": "text",
39
- "primaryKey": false,
40
- "notNull": false
41
- },
42
- "password_hash": {
43
- "name": "password_hash",
44
- "type": "text",
45
- "primaryKey": false,
46
- "notNull": false
47
- },
48
- "password_change_required": {
49
- "name": "password_change_required",
50
- "type": "boolean",
51
- "primaryKey": false,
52
- "notNull": true,
53
- "default": false
54
- },
55
- "role_id": {
56
- "name": "role_id",
57
- "type": "bigint",
58
- "primaryKey": false,
59
- "notNull": true
60
- },
61
- "status": {
62
- "name": "status",
63
- "type": "text",
64
- "primaryKey": false,
65
- "notNull": true,
66
- "default": "'active'"
67
- },
68
- "email_verified_at": {
69
- "name": "email_verified_at",
70
- "type": "timestamp with time zone",
71
- "primaryKey": false,
72
- "notNull": false
73
- },
74
- "phone_verified_at": {
75
- "name": "phone_verified_at",
76
- "type": "timestamp with time zone",
77
- "primaryKey": false,
78
- "notNull": false
79
- },
80
- "last_login_at": {
81
- "name": "last_login_at",
82
- "type": "timestamp with time zone",
83
- "primaryKey": false,
84
- "notNull": false
85
- },
86
- "created_at": {
87
- "name": "created_at",
88
- "type": "timestamp with time zone",
89
- "primaryKey": false,
90
- "notNull": true,
91
- "default": "now()"
92
- },
93
- "updated_at": {
94
- "name": "updated_at",
95
- "type": "timestamp with time zone",
96
- "primaryKey": false,
97
- "notNull": true,
98
- "default": "now()"
99
- }
100
- },
101
- "indexes": {
102
- "users_public_id_idx": {
103
- "name": "users_public_id_idx",
104
- "columns": [
105
- {
106
- "expression": "public_id",
107
- "isExpression": false,
108
- "asc": true,
109
- "nulls": "last"
110
- }
111
- ],
112
- "isUnique": false,
113
- "concurrently": false,
114
- "method": "btree",
115
- "with": {}
116
- },
117
- "users_email_idx": {
118
- "name": "users_email_idx",
119
- "columns": [
120
- {
121
- "expression": "email",
122
- "isExpression": false,
123
- "asc": true,
124
- "nulls": "last"
125
- }
126
- ],
127
- "isUnique": false,
128
- "concurrently": false,
129
- "method": "btree",
130
- "with": {}
131
- },
132
- "users_phone_idx": {
133
- "name": "users_phone_idx",
134
- "columns": [
135
- {
136
- "expression": "phone",
137
- "isExpression": false,
138
- "asc": true,
139
- "nulls": "last"
140
- }
141
- ],
142
- "isUnique": false,
143
- "concurrently": false,
144
- "method": "btree",
145
- "with": {}
146
- },
147
- "users_username_idx": {
148
- "name": "users_username_idx",
149
- "columns": [
150
- {
151
- "expression": "username",
152
- "isExpression": false,
153
- "asc": true,
154
- "nulls": "last"
155
- }
156
- ],
157
- "isUnique": false,
158
- "concurrently": false,
159
- "method": "btree",
160
- "with": {}
161
- },
162
- "users_status_idx": {
163
- "name": "users_status_idx",
164
- "columns": [
165
- {
166
- "expression": "status",
167
- "isExpression": false,
168
- "asc": true,
169
- "nulls": "last"
170
- }
171
- ],
172
- "isUnique": false,
173
- "concurrently": false,
174
- "method": "btree",
175
- "with": {}
176
- },
177
- "users_role_id_idx": {
178
- "name": "users_role_id_idx",
179
- "columns": [
180
- {
181
- "expression": "role_id",
182
- "isExpression": false,
183
- "asc": true,
184
- "nulls": "last"
185
- }
186
- ],
187
- "isUnique": false,
188
- "concurrently": false,
189
- "method": "btree",
190
- "with": {}
191
- }
192
- },
193
- "foreignKeys": {
194
- "users_role_id_roles_id_fk": {
195
- "name": "users_role_id_roles_id_fk",
196
- "tableFrom": "users",
197
- "tableTo": "roles",
198
- "schemaTo": "spfn_auth",
199
- "columnsFrom": [
200
- "role_id"
201
- ],
202
- "columnsTo": [
203
- "id"
204
- ],
205
- "onDelete": "cascade",
206
- "onUpdate": "no action"
207
- }
208
- },
209
- "compositePrimaryKeys": {},
210
- "uniqueConstraints": {
211
- "users_public_id_unique": {
212
- "name": "users_public_id_unique",
213
- "nullsNotDistinct": false,
214
- "columns": [
215
- "public_id"
216
- ]
217
- },
218
- "users_email_unique": {
219
- "name": "users_email_unique",
220
- "nullsNotDistinct": false,
221
- "columns": [
222
- "email"
223
- ]
224
- },
225
- "users_phone_unique": {
226
- "name": "users_phone_unique",
227
- "nullsNotDistinct": false,
228
- "columns": [
229
- "phone"
230
- ]
231
- },
232
- "users_username_unique": {
233
- "name": "users_username_unique",
234
- "nullsNotDistinct": false,
235
- "columns": [
236
- "username"
237
- ]
238
- }
239
- },
240
- "policies": {},
241
- "checkConstraints": {
242
- "email_or_phone_check": {
243
- "name": "email_or_phone_check",
244
- "value": "\"spfn_auth\".\"users\".\"email\" IS NOT NULL OR \"spfn_auth\".\"users\".\"phone\" IS NOT NULL"
245
- }
246
- },
247
- "isRLSEnabled": false
248
- },
249
- "spfn_auth.user_profiles": {
250
- "name": "user_profiles",
251
- "schema": "spfn_auth",
252
- "columns": {
253
- "id": {
254
- "name": "id",
255
- "type": "bigserial",
256
- "primaryKey": true,
257
- "notNull": true
258
- },
259
- "user_id": {
260
- "name": "user_id",
261
- "type": "bigint",
262
- "primaryKey": false,
263
- "notNull": true
264
- },
265
- "display_name": {
266
- "name": "display_name",
267
- "type": "text",
268
- "primaryKey": false,
269
- "notNull": false
270
- },
271
- "first_name": {
272
- "name": "first_name",
273
- "type": "text",
274
- "primaryKey": false,
275
- "notNull": false
276
- },
277
- "last_name": {
278
- "name": "last_name",
279
- "type": "text",
280
- "primaryKey": false,
281
- "notNull": false
282
- },
283
- "avatar_url": {
284
- "name": "avatar_url",
285
- "type": "text",
286
- "primaryKey": false,
287
- "notNull": false
288
- },
289
- "bio": {
290
- "name": "bio",
291
- "type": "text",
292
- "primaryKey": false,
293
- "notNull": false
294
- },
295
- "locale": {
296
- "name": "locale",
297
- "type": "text",
298
- "primaryKey": false,
299
- "notNull": false,
300
- "default": "'en'"
301
- },
302
- "timezone": {
303
- "name": "timezone",
304
- "type": "text",
305
- "primaryKey": false,
306
- "notNull": false,
307
- "default": "'UTC'"
308
- },
309
- "date_of_birth": {
310
- "name": "date_of_birth",
311
- "type": "text",
312
- "primaryKey": false,
313
- "notNull": false
314
- },
315
- "gender": {
316
- "name": "gender",
317
- "type": "text",
318
- "primaryKey": false,
319
- "notNull": false
320
- },
321
- "website": {
322
- "name": "website",
323
- "type": "text",
324
- "primaryKey": false,
325
- "notNull": false
326
- },
327
- "location": {
328
- "name": "location",
329
- "type": "text",
330
- "primaryKey": false,
331
- "notNull": false
332
- },
333
- "company": {
334
- "name": "company",
335
- "type": "text",
336
- "primaryKey": false,
337
- "notNull": false
338
- },
339
- "job_title": {
340
- "name": "job_title",
341
- "type": "text",
342
- "primaryKey": false,
343
- "notNull": false
344
- },
345
- "metadata": {
346
- "name": "metadata",
347
- "type": "jsonb",
348
- "primaryKey": false,
349
- "notNull": false
350
- },
351
- "created_at": {
352
- "name": "created_at",
353
- "type": "timestamp with time zone",
354
- "primaryKey": false,
355
- "notNull": true,
356
- "default": "now()"
357
- },
358
- "updated_at": {
359
- "name": "updated_at",
360
- "type": "timestamp with time zone",
361
- "primaryKey": false,
362
- "notNull": true,
363
- "default": "now()"
364
- }
365
- },
366
- "indexes": {
367
- "user_profiles_user_id_idx": {
368
- "name": "user_profiles_user_id_idx",
369
- "columns": [
370
- {
371
- "expression": "user_id",
372
- "isExpression": false,
373
- "asc": true,
374
- "nulls": "last"
375
- }
376
- ],
377
- "isUnique": false,
378
- "concurrently": false,
379
- "method": "btree",
380
- "with": {}
381
- },
382
- "user_profiles_display_name_idx": {
383
- "name": "user_profiles_display_name_idx",
384
- "columns": [
385
- {
386
- "expression": "display_name",
387
- "isExpression": false,
388
- "asc": true,
389
- "nulls": "last"
390
- }
391
- ],
392
- "isUnique": false,
393
- "concurrently": false,
394
- "method": "btree",
395
- "with": {}
396
- },
397
- "user_profiles_locale_idx": {
398
- "name": "user_profiles_locale_idx",
399
- "columns": [
400
- {
401
- "expression": "locale",
402
- "isExpression": false,
403
- "asc": true,
404
- "nulls": "last"
405
- }
406
- ],
407
- "isUnique": false,
408
- "concurrently": false,
409
- "method": "btree",
410
- "with": {}
411
- }
412
- },
413
- "foreignKeys": {
414
- "user_profiles_user_id_users_id_fk": {
415
- "name": "user_profiles_user_id_users_id_fk",
416
- "tableFrom": "user_profiles",
417
- "tableTo": "users",
418
- "schemaTo": "spfn_auth",
419
- "columnsFrom": [
420
- "user_id"
421
- ],
422
- "columnsTo": [
423
- "id"
424
- ],
425
- "onDelete": "cascade",
426
- "onUpdate": "no action"
427
- }
428
- },
429
- "compositePrimaryKeys": {},
430
- "uniqueConstraints": {
431
- "user_profiles_user_id_unique": {
432
- "name": "user_profiles_user_id_unique",
433
- "nullsNotDistinct": false,
434
- "columns": [
435
- "user_id"
436
- ]
437
- }
438
- },
439
- "policies": {},
440
- "checkConstraints": {},
441
- "isRLSEnabled": false
442
- },
443
- "spfn_auth.user_public_keys": {
444
- "name": "user_public_keys",
445
- "schema": "spfn_auth",
446
- "columns": {
447
- "id": {
448
- "name": "id",
449
- "type": "bigserial",
450
- "primaryKey": true,
451
- "notNull": true
452
- },
453
- "user_id": {
454
- "name": "user_id",
455
- "type": "bigint",
456
- "primaryKey": false,
457
- "notNull": true
458
- },
459
- "key_id": {
460
- "name": "key_id",
461
- "type": "text",
462
- "primaryKey": false,
463
- "notNull": true
464
- },
465
- "public_key": {
466
- "name": "public_key",
467
- "type": "text",
468
- "primaryKey": false,
469
- "notNull": true
470
- },
471
- "algorithm": {
472
- "name": "algorithm",
473
- "type": "text",
474
- "primaryKey": false,
475
- "notNull": true,
476
- "default": "'ES256'"
477
- },
478
- "fingerprint": {
479
- "name": "fingerprint",
480
- "type": "text",
481
- "primaryKey": false,
482
- "notNull": true
483
- },
484
- "is_active": {
485
- "name": "is_active",
486
- "type": "boolean",
487
- "primaryKey": false,
488
- "notNull": true,
489
- "default": true
490
- },
491
- "created_at": {
492
- "name": "created_at",
493
- "type": "timestamp with time zone",
494
- "primaryKey": false,
495
- "notNull": true,
496
- "default": "now()"
497
- },
498
- "last_used_at": {
499
- "name": "last_used_at",
500
- "type": "timestamp with time zone",
501
- "primaryKey": false,
502
- "notNull": false
503
- },
504
- "expires_at": {
505
- "name": "expires_at",
506
- "type": "timestamp with time zone",
507
- "primaryKey": false,
508
- "notNull": false
509
- },
510
- "revoked_at": {
511
- "name": "revoked_at",
512
- "type": "timestamp with time zone",
513
- "primaryKey": false,
514
- "notNull": false
515
- },
516
- "revoked_reason": {
517
- "name": "revoked_reason",
518
- "type": "text",
519
- "primaryKey": false,
520
- "notNull": false
521
- }
522
- },
523
- "indexes": {
524
- "user_public_keys_user_id_idx": {
525
- "name": "user_public_keys_user_id_idx",
526
- "columns": [
527
- {
528
- "expression": "user_id",
529
- "isExpression": false,
530
- "asc": true,
531
- "nulls": "last"
532
- }
533
- ],
534
- "isUnique": false,
535
- "concurrently": false,
536
- "method": "btree",
537
- "with": {}
538
- },
539
- "user_public_keys_key_id_idx": {
540
- "name": "user_public_keys_key_id_idx",
541
- "columns": [
542
- {
543
- "expression": "key_id",
544
- "isExpression": false,
545
- "asc": true,
546
- "nulls": "last"
547
- }
548
- ],
549
- "isUnique": false,
550
- "concurrently": false,
551
- "method": "btree",
552
- "with": {}
553
- },
554
- "user_public_keys_active_idx": {
555
- "name": "user_public_keys_active_idx",
556
- "columns": [
557
- {
558
- "expression": "is_active",
559
- "isExpression": false,
560
- "asc": true,
561
- "nulls": "last"
562
- }
563
- ],
564
- "isUnique": false,
565
- "concurrently": false,
566
- "method": "btree",
567
- "with": {}
568
- },
569
- "user_public_keys_fingerprint_idx": {
570
- "name": "user_public_keys_fingerprint_idx",
571
- "columns": [
572
- {
573
- "expression": "fingerprint",
574
- "isExpression": false,
575
- "asc": true,
576
- "nulls": "last"
577
- }
578
- ],
579
- "isUnique": false,
580
- "concurrently": false,
581
- "method": "btree",
582
- "with": {}
583
- }
584
- },
585
- "foreignKeys": {
586
- "user_public_keys_user_id_users_id_fk": {
587
- "name": "user_public_keys_user_id_users_id_fk",
588
- "tableFrom": "user_public_keys",
589
- "tableTo": "users",
590
- "schemaTo": "spfn_auth",
591
- "columnsFrom": [
592
- "user_id"
593
- ],
594
- "columnsTo": [
595
- "id"
596
- ],
597
- "onDelete": "cascade",
598
- "onUpdate": "no action"
599
- }
600
- },
601
- "compositePrimaryKeys": {},
602
- "uniqueConstraints": {
603
- "user_public_keys_key_id_unique": {
604
- "name": "user_public_keys_key_id_unique",
605
- "nullsNotDistinct": false,
606
- "columns": [
607
- "key_id"
608
- ]
609
- }
610
- },
611
- "policies": {},
612
- "checkConstraints": {},
613
- "isRLSEnabled": false
614
- },
615
- "spfn_auth.user_social_accounts": {
616
- "name": "user_social_accounts",
617
- "schema": "spfn_auth",
618
- "columns": {
619
- "id": {
620
- "name": "id",
621
- "type": "bigserial",
622
- "primaryKey": true,
623
- "notNull": true
624
- },
625
- "user_id": {
626
- "name": "user_id",
627
- "type": "bigint",
628
- "primaryKey": false,
629
- "notNull": true
630
- },
631
- "provider": {
632
- "name": "provider",
633
- "type": "text",
634
- "primaryKey": false,
635
- "notNull": true
636
- },
637
- "provider_user_id": {
638
- "name": "provider_user_id",
639
- "type": "text",
640
- "primaryKey": false,
641
- "notNull": true
642
- },
643
- "provider_email": {
644
- "name": "provider_email",
645
- "type": "text",
646
- "primaryKey": false,
647
- "notNull": false
648
- },
649
- "access_token": {
650
- "name": "access_token",
651
- "type": "text",
652
- "primaryKey": false,
653
- "notNull": false
654
- },
655
- "refresh_token": {
656
- "name": "refresh_token",
657
- "type": "text",
658
- "primaryKey": false,
659
- "notNull": false
660
- },
661
- "token_expires_at": {
662
- "name": "token_expires_at",
663
- "type": "timestamp with time zone",
664
- "primaryKey": false,
665
- "notNull": false
666
- },
667
- "created_at": {
668
- "name": "created_at",
669
- "type": "timestamp with time zone",
670
- "primaryKey": false,
671
- "notNull": true,
672
- "default": "now()"
673
- },
674
- "updated_at": {
675
- "name": "updated_at",
676
- "type": "timestamp with time zone",
677
- "primaryKey": false,
678
- "notNull": true,
679
- "default": "now()"
680
- }
681
- },
682
- "indexes": {
683
- "user_social_accounts_user_id_idx": {
684
- "name": "user_social_accounts_user_id_idx",
685
- "columns": [
686
- {
687
- "expression": "user_id",
688
- "isExpression": false,
689
- "asc": true,
690
- "nulls": "last"
691
- }
692
- ],
693
- "isUnique": false,
694
- "concurrently": false,
695
- "method": "btree",
696
- "with": {}
697
- },
698
- "user_social_accounts_provider_idx": {
699
- "name": "user_social_accounts_provider_idx",
700
- "columns": [
701
- {
702
- "expression": "provider",
703
- "isExpression": false,
704
- "asc": true,
705
- "nulls": "last"
706
- }
707
- ],
708
- "isUnique": false,
709
- "concurrently": false,
710
- "method": "btree",
711
- "with": {}
712
- },
713
- "provider_user_unique_idx": {
714
- "name": "provider_user_unique_idx",
715
- "columns": [
716
- {
717
- "expression": "provider",
718
- "isExpression": false,
719
- "asc": true,
720
- "nulls": "last"
721
- },
722
- {
723
- "expression": "provider_user_id",
724
- "isExpression": false,
725
- "asc": true,
726
- "nulls": "last"
727
- }
728
- ],
729
- "isUnique": true,
730
- "concurrently": false,
731
- "method": "btree",
732
- "with": {}
733
- }
734
- },
735
- "foreignKeys": {
736
- "user_social_accounts_user_id_users_id_fk": {
737
- "name": "user_social_accounts_user_id_users_id_fk",
738
- "tableFrom": "user_social_accounts",
739
- "tableTo": "users",
740
- "schemaTo": "spfn_auth",
741
- "columnsFrom": [
742
- "user_id"
743
- ],
744
- "columnsTo": [
745
- "id"
746
- ],
747
- "onDelete": "cascade",
748
- "onUpdate": "no action"
749
- }
750
- },
751
- "compositePrimaryKeys": {},
752
- "uniqueConstraints": {},
753
- "policies": {},
754
- "checkConstraints": {},
755
- "isRLSEnabled": false
756
- },
757
- "spfn_auth.verification_codes": {
758
- "name": "verification_codes",
759
- "schema": "spfn_auth",
760
- "columns": {
761
- "id": {
762
- "name": "id",
763
- "type": "bigserial",
764
- "primaryKey": true,
765
- "notNull": true
766
- },
767
- "target": {
768
- "name": "target",
769
- "type": "text",
770
- "primaryKey": false,
771
- "notNull": true
772
- },
773
- "target_type": {
774
- "name": "target_type",
775
- "type": "text",
776
- "primaryKey": false,
777
- "notNull": true
778
- },
779
- "code": {
780
- "name": "code",
781
- "type": "text",
782
- "primaryKey": false,
783
- "notNull": true
784
- },
785
- "purpose": {
786
- "name": "purpose",
787
- "type": "text",
788
- "primaryKey": false,
789
- "notNull": true
790
- },
791
- "expires_at": {
792
- "name": "expires_at",
793
- "type": "timestamp with time zone",
794
- "primaryKey": false,
795
- "notNull": true
796
- },
797
- "used_at": {
798
- "name": "used_at",
799
- "type": "timestamp with time zone",
800
- "primaryKey": false,
801
- "notNull": false
802
- },
803
- "attempts": {
804
- "name": "attempts",
805
- "type": "integer",
806
- "primaryKey": false,
807
- "notNull": true,
808
- "default": 0
809
- },
810
- "created_at": {
811
- "name": "created_at",
812
- "type": "timestamp with time zone",
813
- "primaryKey": false,
814
- "notNull": true,
815
- "default": "now()"
816
- },
817
- "updated_at": {
818
- "name": "updated_at",
819
- "type": "timestamp with time zone",
820
- "primaryKey": false,
821
- "notNull": true,
822
- "default": "now()"
823
- }
824
- },
825
- "indexes": {
826
- "target_purpose_idx": {
827
- "name": "target_purpose_idx",
828
- "columns": [
829
- {
830
- "expression": "target",
831
- "isExpression": false,
832
- "asc": true,
833
- "nulls": "last"
834
- },
835
- {
836
- "expression": "purpose",
837
- "isExpression": false,
838
- "asc": true,
839
- "nulls": "last"
840
- },
841
- {
842
- "expression": "expires_at",
843
- "isExpression": false,
844
- "asc": true,
845
- "nulls": "last"
846
- }
847
- ],
848
- "isUnique": false,
849
- "concurrently": false,
850
- "method": "btree",
851
- "with": {}
852
- }
853
- },
854
- "foreignKeys": {},
855
- "compositePrimaryKeys": {},
856
- "uniqueConstraints": {},
857
- "policies": {},
858
- "checkConstraints": {
859
- "attempts_limit_check": {
860
- "name": "attempts_limit_check",
861
- "value": "\"spfn_auth\".\"verification_codes\".\"attempts\" >= 0 AND \"spfn_auth\".\"verification_codes\".\"attempts\" <= 10"
862
- }
863
- },
864
- "isRLSEnabled": false
865
- },
866
- "spfn_auth.user_invitations": {
867
- "name": "user_invitations",
868
- "schema": "spfn_auth",
869
- "columns": {
870
- "id": {
871
- "name": "id",
872
- "type": "bigserial",
873
- "primaryKey": true,
874
- "notNull": true
875
- },
876
- "email": {
877
- "name": "email",
878
- "type": "text",
879
- "primaryKey": false,
880
- "notNull": true
881
- },
882
- "token": {
883
- "name": "token",
884
- "type": "text",
885
- "primaryKey": false,
886
- "notNull": true
887
- },
888
- "role_id": {
889
- "name": "role_id",
890
- "type": "bigint",
891
- "primaryKey": false,
892
- "notNull": true
893
- },
894
- "invited_by_id": {
895
- "name": "invited_by_id",
896
- "type": "bigint",
897
- "primaryKey": false,
898
- "notNull": true
899
- },
900
- "status": {
901
- "name": "status",
902
- "type": "text",
903
- "primaryKey": false,
904
- "notNull": true,
905
- "default": "'pending'"
906
- },
907
- "expires_at": {
908
- "name": "expires_at",
909
- "type": "timestamp with time zone",
910
- "primaryKey": false,
911
- "notNull": true
912
- },
913
- "accepted_at": {
914
- "name": "accepted_at",
915
- "type": "timestamp with time zone",
916
- "primaryKey": false,
917
- "notNull": false
918
- },
919
- "cancelled_at": {
920
- "name": "cancelled_at",
921
- "type": "timestamp with time zone",
922
- "primaryKey": false,
923
- "notNull": false
924
- },
925
- "metadata": {
926
- "name": "metadata",
927
- "type": "jsonb",
928
- "primaryKey": false,
929
- "notNull": false
930
- },
931
- "created_at": {
932
- "name": "created_at",
933
- "type": "timestamp with time zone",
934
- "primaryKey": false,
935
- "notNull": true,
936
- "default": "now()"
937
- },
938
- "updated_at": {
939
- "name": "updated_at",
940
- "type": "timestamp with time zone",
941
- "primaryKey": false,
942
- "notNull": true,
943
- "default": "now()"
944
- }
945
- },
946
- "indexes": {
947
- "invitations_token_idx": {
948
- "name": "invitations_token_idx",
949
- "columns": [
950
- {
951
- "expression": "token",
952
- "isExpression": false,
953
- "asc": true,
954
- "nulls": "last"
955
- }
956
- ],
957
- "isUnique": false,
958
- "concurrently": false,
959
- "method": "btree",
960
- "with": {}
961
- },
962
- "invitations_email_idx": {
963
- "name": "invitations_email_idx",
964
- "columns": [
965
- {
966
- "expression": "email",
967
- "isExpression": false,
968
- "asc": true,
969
- "nulls": "last"
970
- }
971
- ],
972
- "isUnique": false,
973
- "concurrently": false,
974
- "method": "btree",
975
- "with": {}
976
- },
977
- "invitations_status_idx": {
978
- "name": "invitations_status_idx",
979
- "columns": [
980
- {
981
- "expression": "status",
982
- "isExpression": false,
983
- "asc": true,
984
- "nulls": "last"
985
- }
986
- ],
987
- "isUnique": false,
988
- "concurrently": false,
989
- "method": "btree",
990
- "with": {}
991
- },
992
- "invitations_invited_by_idx": {
993
- "name": "invitations_invited_by_idx",
994
- "columns": [
995
- {
996
- "expression": "invited_by_id",
997
- "isExpression": false,
998
- "asc": true,
999
- "nulls": "last"
1000
- }
1001
- ],
1002
- "isUnique": false,
1003
- "concurrently": false,
1004
- "method": "btree",
1005
- "with": {}
1006
- },
1007
- "invitations_expires_at_idx": {
1008
- "name": "invitations_expires_at_idx",
1009
- "columns": [
1010
- {
1011
- "expression": "expires_at",
1012
- "isExpression": false,
1013
- "asc": true,
1014
- "nulls": "last"
1015
- }
1016
- ],
1017
- "isUnique": false,
1018
- "concurrently": false,
1019
- "method": "btree",
1020
- "with": {}
1021
- },
1022
- "invitations_role_id_idx": {
1023
- "name": "invitations_role_id_idx",
1024
- "columns": [
1025
- {
1026
- "expression": "role_id",
1027
- "isExpression": false,
1028
- "asc": true,
1029
- "nulls": "last"
1030
- }
1031
- ],
1032
- "isUnique": false,
1033
- "concurrently": false,
1034
- "method": "btree",
1035
- "with": {}
1036
- }
1037
- },
1038
- "foreignKeys": {
1039
- "user_invitations_role_id_roles_id_fk": {
1040
- "name": "user_invitations_role_id_roles_id_fk",
1041
- "tableFrom": "user_invitations",
1042
- "tableTo": "roles",
1043
- "schemaTo": "spfn_auth",
1044
- "columnsFrom": [
1045
- "role_id"
1046
- ],
1047
- "columnsTo": [
1048
- "id"
1049
- ],
1050
- "onDelete": "cascade",
1051
- "onUpdate": "no action"
1052
- },
1053
- "user_invitations_invited_by_id_users_id_fk": {
1054
- "name": "user_invitations_invited_by_id_users_id_fk",
1055
- "tableFrom": "user_invitations",
1056
- "tableTo": "users",
1057
- "schemaTo": "spfn_auth",
1058
- "columnsFrom": [
1059
- "invited_by_id"
1060
- ],
1061
- "columnsTo": [
1062
- "id"
1063
- ],
1064
- "onDelete": "cascade",
1065
- "onUpdate": "no action"
1066
- }
1067
- },
1068
- "compositePrimaryKeys": {},
1069
- "uniqueConstraints": {
1070
- "user_invitations_token_unique": {
1071
- "name": "user_invitations_token_unique",
1072
- "nullsNotDistinct": false,
1073
- "columns": [
1074
- "token"
1075
- ]
1076
- }
1077
- },
1078
- "policies": {},
1079
- "checkConstraints": {},
1080
- "isRLSEnabled": false
1081
- },
1082
- "spfn_auth.roles": {
1083
- "name": "roles",
1084
- "schema": "spfn_auth",
1085
- "columns": {
1086
- "id": {
1087
- "name": "id",
1088
- "type": "bigserial",
1089
- "primaryKey": true,
1090
- "notNull": true
1091
- },
1092
- "name": {
1093
- "name": "name",
1094
- "type": "text",
1095
- "primaryKey": false,
1096
- "notNull": true
1097
- },
1098
- "display_name": {
1099
- "name": "display_name",
1100
- "type": "text",
1101
- "primaryKey": false,
1102
- "notNull": true
1103
- },
1104
- "description": {
1105
- "name": "description",
1106
- "type": "text",
1107
- "primaryKey": false,
1108
- "notNull": false
1109
- },
1110
- "is_builtin": {
1111
- "name": "is_builtin",
1112
- "type": "boolean",
1113
- "primaryKey": false,
1114
- "notNull": true,
1115
- "default": false
1116
- },
1117
- "is_system": {
1118
- "name": "is_system",
1119
- "type": "boolean",
1120
- "primaryKey": false,
1121
- "notNull": true,
1122
- "default": false
1123
- },
1124
- "is_active": {
1125
- "name": "is_active",
1126
- "type": "boolean",
1127
- "primaryKey": false,
1128
- "notNull": true,
1129
- "default": true
1130
- },
1131
- "priority": {
1132
- "name": "priority",
1133
- "type": "integer",
1134
- "primaryKey": false,
1135
- "notNull": true,
1136
- "default": 10
1137
- },
1138
- "created_at": {
1139
- "name": "created_at",
1140
- "type": "timestamp with time zone",
1141
- "primaryKey": false,
1142
- "notNull": true,
1143
- "default": "now()"
1144
- },
1145
- "updated_at": {
1146
- "name": "updated_at",
1147
- "type": "timestamp with time zone",
1148
- "primaryKey": false,
1149
- "notNull": true,
1150
- "default": "now()"
1151
- }
1152
- },
1153
- "indexes": {
1154
- "roles_name_idx": {
1155
- "name": "roles_name_idx",
1156
- "columns": [
1157
- {
1158
- "expression": "name",
1159
- "isExpression": false,
1160
- "asc": true,
1161
- "nulls": "last"
1162
- }
1163
- ],
1164
- "isUnique": false,
1165
- "concurrently": false,
1166
- "method": "btree",
1167
- "with": {}
1168
- },
1169
- "roles_is_system_idx": {
1170
- "name": "roles_is_system_idx",
1171
- "columns": [
1172
- {
1173
- "expression": "is_system",
1174
- "isExpression": false,
1175
- "asc": true,
1176
- "nulls": "last"
1177
- }
1178
- ],
1179
- "isUnique": false,
1180
- "concurrently": false,
1181
- "method": "btree",
1182
- "with": {}
1183
- },
1184
- "roles_is_active_idx": {
1185
- "name": "roles_is_active_idx",
1186
- "columns": [
1187
- {
1188
- "expression": "is_active",
1189
- "isExpression": false,
1190
- "asc": true,
1191
- "nulls": "last"
1192
- }
1193
- ],
1194
- "isUnique": false,
1195
- "concurrently": false,
1196
- "method": "btree",
1197
- "with": {}
1198
- },
1199
- "roles_is_builtin_idx": {
1200
- "name": "roles_is_builtin_idx",
1201
- "columns": [
1202
- {
1203
- "expression": "is_builtin",
1204
- "isExpression": false,
1205
- "asc": true,
1206
- "nulls": "last"
1207
- }
1208
- ],
1209
- "isUnique": false,
1210
- "concurrently": false,
1211
- "method": "btree",
1212
- "with": {}
1213
- },
1214
- "roles_priority_idx": {
1215
- "name": "roles_priority_idx",
1216
- "columns": [
1217
- {
1218
- "expression": "priority",
1219
- "isExpression": false,
1220
- "asc": true,
1221
- "nulls": "last"
1222
- }
1223
- ],
1224
- "isUnique": false,
1225
- "concurrently": false,
1226
- "method": "btree",
1227
- "with": {}
1228
- }
1229
- },
1230
- "foreignKeys": {},
1231
- "compositePrimaryKeys": {},
1232
- "uniqueConstraints": {
1233
- "roles_name_unique": {
1234
- "name": "roles_name_unique",
1235
- "nullsNotDistinct": false,
1236
- "columns": [
1237
- "name"
1238
- ]
1239
- }
1240
- },
1241
- "policies": {},
1242
- "checkConstraints": {},
1243
- "isRLSEnabled": false
1244
- },
1245
- "spfn_auth.permissions": {
1246
- "name": "permissions",
1247
- "schema": "spfn_auth",
1248
- "columns": {
1249
- "id": {
1250
- "name": "id",
1251
- "type": "bigserial",
1252
- "primaryKey": true,
1253
- "notNull": true
1254
- },
1255
- "name": {
1256
- "name": "name",
1257
- "type": "text",
1258
- "primaryKey": false,
1259
- "notNull": true
1260
- },
1261
- "display_name": {
1262
- "name": "display_name",
1263
- "type": "text",
1264
- "primaryKey": false,
1265
- "notNull": true
1266
- },
1267
- "description": {
1268
- "name": "description",
1269
- "type": "text",
1270
- "primaryKey": false,
1271
- "notNull": false
1272
- },
1273
- "category": {
1274
- "name": "category",
1275
- "type": "text",
1276
- "primaryKey": false,
1277
- "notNull": false
1278
- },
1279
- "is_builtin": {
1280
- "name": "is_builtin",
1281
- "type": "boolean",
1282
- "primaryKey": false,
1283
- "notNull": true,
1284
- "default": false
1285
- },
1286
- "is_system": {
1287
- "name": "is_system",
1288
- "type": "boolean",
1289
- "primaryKey": false,
1290
- "notNull": true,
1291
- "default": false
1292
- },
1293
- "is_active": {
1294
- "name": "is_active",
1295
- "type": "boolean",
1296
- "primaryKey": false,
1297
- "notNull": true,
1298
- "default": true
1299
- },
1300
- "metadata": {
1301
- "name": "metadata",
1302
- "type": "jsonb",
1303
- "primaryKey": false,
1304
- "notNull": false
1305
- },
1306
- "created_at": {
1307
- "name": "created_at",
1308
- "type": "timestamp with time zone",
1309
- "primaryKey": false,
1310
- "notNull": true,
1311
- "default": "now()"
1312
- },
1313
- "updated_at": {
1314
- "name": "updated_at",
1315
- "type": "timestamp with time zone",
1316
- "primaryKey": false,
1317
- "notNull": true,
1318
- "default": "now()"
1319
- }
1320
- },
1321
- "indexes": {
1322
- "permissions_name_idx": {
1323
- "name": "permissions_name_idx",
1324
- "columns": [
1325
- {
1326
- "expression": "name",
1327
- "isExpression": false,
1328
- "asc": true,
1329
- "nulls": "last"
1330
- }
1331
- ],
1332
- "isUnique": false,
1333
- "concurrently": false,
1334
- "method": "btree",
1335
- "with": {}
1336
- },
1337
- "permissions_category_idx": {
1338
- "name": "permissions_category_idx",
1339
- "columns": [
1340
- {
1341
- "expression": "category",
1342
- "isExpression": false,
1343
- "asc": true,
1344
- "nulls": "last"
1345
- }
1346
- ],
1347
- "isUnique": false,
1348
- "concurrently": false,
1349
- "method": "btree",
1350
- "with": {}
1351
- },
1352
- "permissions_is_system_idx": {
1353
- "name": "permissions_is_system_idx",
1354
- "columns": [
1355
- {
1356
- "expression": "is_system",
1357
- "isExpression": false,
1358
- "asc": true,
1359
- "nulls": "last"
1360
- }
1361
- ],
1362
- "isUnique": false,
1363
- "concurrently": false,
1364
- "method": "btree",
1365
- "with": {}
1366
- },
1367
- "permissions_is_active_idx": {
1368
- "name": "permissions_is_active_idx",
1369
- "columns": [
1370
- {
1371
- "expression": "is_active",
1372
- "isExpression": false,
1373
- "asc": true,
1374
- "nulls": "last"
1375
- }
1376
- ],
1377
- "isUnique": false,
1378
- "concurrently": false,
1379
- "method": "btree",
1380
- "with": {}
1381
- },
1382
- "permissions_is_builtin_idx": {
1383
- "name": "permissions_is_builtin_idx",
1384
- "columns": [
1385
- {
1386
- "expression": "is_builtin",
1387
- "isExpression": false,
1388
- "asc": true,
1389
- "nulls": "last"
1390
- }
1391
- ],
1392
- "isUnique": false,
1393
- "concurrently": false,
1394
- "method": "btree",
1395
- "with": {}
1396
- }
1397
- },
1398
- "foreignKeys": {},
1399
- "compositePrimaryKeys": {},
1400
- "uniqueConstraints": {
1401
- "permissions_name_unique": {
1402
- "name": "permissions_name_unique",
1403
- "nullsNotDistinct": false,
1404
- "columns": [
1405
- "name"
1406
- ]
1407
- }
1408
- },
1409
- "policies": {},
1410
- "checkConstraints": {},
1411
- "isRLSEnabled": false
1412
- },
1413
- "spfn_auth.role_permissions": {
1414
- "name": "role_permissions",
1415
- "schema": "spfn_auth",
1416
- "columns": {
1417
- "id": {
1418
- "name": "id",
1419
- "type": "bigserial",
1420
- "primaryKey": true,
1421
- "notNull": true
1422
- },
1423
- "role_id": {
1424
- "name": "role_id",
1425
- "type": "bigint",
1426
- "primaryKey": false,
1427
- "notNull": true
1428
- },
1429
- "permission_id": {
1430
- "name": "permission_id",
1431
- "type": "bigint",
1432
- "primaryKey": false,
1433
- "notNull": true
1434
- },
1435
- "created_at": {
1436
- "name": "created_at",
1437
- "type": "timestamp with time zone",
1438
- "primaryKey": false,
1439
- "notNull": true,
1440
- "default": "now()"
1441
- },
1442
- "updated_at": {
1443
- "name": "updated_at",
1444
- "type": "timestamp with time zone",
1445
- "primaryKey": false,
1446
- "notNull": true,
1447
- "default": "now()"
1448
- }
1449
- },
1450
- "indexes": {
1451
- "role_permissions_role_id_idx": {
1452
- "name": "role_permissions_role_id_idx",
1453
- "columns": [
1454
- {
1455
- "expression": "role_id",
1456
- "isExpression": false,
1457
- "asc": true,
1458
- "nulls": "last"
1459
- }
1460
- ],
1461
- "isUnique": false,
1462
- "concurrently": false,
1463
- "method": "btree",
1464
- "with": {}
1465
- },
1466
- "role_permissions_permission_id_idx": {
1467
- "name": "role_permissions_permission_id_idx",
1468
- "columns": [
1469
- {
1470
- "expression": "permission_id",
1471
- "isExpression": false,
1472
- "asc": true,
1473
- "nulls": "last"
1474
- }
1475
- ],
1476
- "isUnique": false,
1477
- "concurrently": false,
1478
- "method": "btree",
1479
- "with": {}
1480
- }
1481
- },
1482
- "foreignKeys": {
1483
- "role_permissions_role_id_roles_id_fk": {
1484
- "name": "role_permissions_role_id_roles_id_fk",
1485
- "tableFrom": "role_permissions",
1486
- "tableTo": "roles",
1487
- "schemaTo": "spfn_auth",
1488
- "columnsFrom": [
1489
- "role_id"
1490
- ],
1491
- "columnsTo": [
1492
- "id"
1493
- ],
1494
- "onDelete": "cascade",
1495
- "onUpdate": "no action"
1496
- },
1497
- "role_permissions_permission_id_permissions_id_fk": {
1498
- "name": "role_permissions_permission_id_permissions_id_fk",
1499
- "tableFrom": "role_permissions",
1500
- "tableTo": "permissions",
1501
- "schemaTo": "spfn_auth",
1502
- "columnsFrom": [
1503
- "permission_id"
1504
- ],
1505
- "columnsTo": [
1506
- "id"
1507
- ],
1508
- "onDelete": "cascade",
1509
- "onUpdate": "no action"
1510
- }
1511
- },
1512
- "compositePrimaryKeys": {},
1513
- "uniqueConstraints": {
1514
- "role_permissions_unique": {
1515
- "name": "role_permissions_unique",
1516
- "nullsNotDistinct": false,
1517
- "columns": [
1518
- "role_id",
1519
- "permission_id"
1520
- ]
1521
- }
1522
- },
1523
- "policies": {},
1524
- "checkConstraints": {},
1525
- "isRLSEnabled": false
1526
- },
1527
- "spfn_auth.user_permissions": {
1528
- "name": "user_permissions",
1529
- "schema": "spfn_auth",
1530
- "columns": {
1531
- "id": {
1532
- "name": "id",
1533
- "type": "bigserial",
1534
- "primaryKey": true,
1535
- "notNull": true
1536
- },
1537
- "user_id": {
1538
- "name": "user_id",
1539
- "type": "bigint",
1540
- "primaryKey": false,
1541
- "notNull": true
1542
- },
1543
- "permission_id": {
1544
- "name": "permission_id",
1545
- "type": "bigint",
1546
- "primaryKey": false,
1547
- "notNull": true
1548
- },
1549
- "granted": {
1550
- "name": "granted",
1551
- "type": "boolean",
1552
- "primaryKey": false,
1553
- "notNull": true,
1554
- "default": true
1555
- },
1556
- "reason": {
1557
- "name": "reason",
1558
- "type": "text",
1559
- "primaryKey": false,
1560
- "notNull": false
1561
- },
1562
- "expires_at": {
1563
- "name": "expires_at",
1564
- "type": "timestamp with time zone",
1565
- "primaryKey": false,
1566
- "notNull": false
1567
- },
1568
- "created_at": {
1569
- "name": "created_at",
1570
- "type": "timestamp with time zone",
1571
- "primaryKey": false,
1572
- "notNull": true,
1573
- "default": "now()"
1574
- },
1575
- "updated_at": {
1576
- "name": "updated_at",
1577
- "type": "timestamp with time zone",
1578
- "primaryKey": false,
1579
- "notNull": true,
1580
- "default": "now()"
1581
- }
1582
- },
1583
- "indexes": {
1584
- "user_permissions_user_id_idx": {
1585
- "name": "user_permissions_user_id_idx",
1586
- "columns": [
1587
- {
1588
- "expression": "user_id",
1589
- "isExpression": false,
1590
- "asc": true,
1591
- "nulls": "last"
1592
- }
1593
- ],
1594
- "isUnique": false,
1595
- "concurrently": false,
1596
- "method": "btree",
1597
- "with": {}
1598
- },
1599
- "user_permissions_permission_id_idx": {
1600
- "name": "user_permissions_permission_id_idx",
1601
- "columns": [
1602
- {
1603
- "expression": "permission_id",
1604
- "isExpression": false,
1605
- "asc": true,
1606
- "nulls": "last"
1607
- }
1608
- ],
1609
- "isUnique": false,
1610
- "concurrently": false,
1611
- "method": "btree",
1612
- "with": {}
1613
- },
1614
- "user_permissions_expires_at_idx": {
1615
- "name": "user_permissions_expires_at_idx",
1616
- "columns": [
1617
- {
1618
- "expression": "expires_at",
1619
- "isExpression": false,
1620
- "asc": true,
1621
- "nulls": "last"
1622
- }
1623
- ],
1624
- "isUnique": false,
1625
- "concurrently": false,
1626
- "method": "btree",
1627
- "with": {}
1628
- }
1629
- },
1630
- "foreignKeys": {
1631
- "user_permissions_user_id_users_id_fk": {
1632
- "name": "user_permissions_user_id_users_id_fk",
1633
- "tableFrom": "user_permissions",
1634
- "tableTo": "users",
1635
- "schemaTo": "spfn_auth",
1636
- "columnsFrom": [
1637
- "user_id"
1638
- ],
1639
- "columnsTo": [
1640
- "id"
1641
- ],
1642
- "onDelete": "cascade",
1643
- "onUpdate": "no action"
1644
- },
1645
- "user_permissions_permission_id_permissions_id_fk": {
1646
- "name": "user_permissions_permission_id_permissions_id_fk",
1647
- "tableFrom": "user_permissions",
1648
- "tableTo": "permissions",
1649
- "schemaTo": "spfn_auth",
1650
- "columnsFrom": [
1651
- "permission_id"
1652
- ],
1653
- "columnsTo": [
1654
- "id"
1655
- ],
1656
- "onDelete": "cascade",
1657
- "onUpdate": "no action"
1658
- }
1659
- },
1660
- "compositePrimaryKeys": {},
1661
- "uniqueConstraints": {
1662
- "user_permissions_unique": {
1663
- "name": "user_permissions_unique",
1664
- "nullsNotDistinct": false,
1665
- "columns": [
1666
- "user_id",
1667
- "permission_id"
1668
- ]
1669
- }
1670
- },
1671
- "policies": {},
1672
- "checkConstraints": {},
1673
- "isRLSEnabled": false
1674
- }
1675
- },
1676
- "enums": {},
1677
- "schemas": {
1678
- "spfn_auth": "spfn_auth"
1679
- },
1680
- "sequences": {},
1681
- "roles": {},
1682
- "policies": {},
1683
- "views": {},
1684
- "_meta": {
1685
- "columns": {},
1686
- "schemas": {},
1687
- "tables": {}
1688
- }
1689
- }