@happyvertical/smrt-users 0.60.9 → 0.60.11

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.
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-users",
5
- "packageVersion": "0.60.9",
5
+ "packageVersion": "0.60.11",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-users:AccessRequestCollection": {
8
8
  "name": "accessrequestcollection",
@@ -87,8 +87,14 @@
87
87
  ],
88
88
  "schema": {
89
89
  "tableName": "access_requests",
90
- "ddl": "CREATE TABLE IF NOT EXISTS \"access_requests\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"email\" TEXT NOT NULL DEFAULT '',\n \"name\" TEXT,\n \"status\" TEXT,\n \"source\" TEXT DEFAULT '',\n \"request_context\" TEXT DEFAULT '{}',\n \"note\" TEXT,\n \"requested_at\" TIMESTAMP,\n \"decided_at\" TIMESTAMP,\n \"decided_by\" TEXT,\n \"resulting_user_id\" TEXT,\n \"tenant_hint\" TEXT\n);",
90
+ "ddl": "CREATE TABLE IF NOT EXISTS \"access_requests\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"email\" TEXT NOT NULL DEFAULT '',\n \"name\" TEXT,\n \"status\" TEXT,\n \"source\" TEXT DEFAULT '',\n \"request_context\" TEXT DEFAULT '{}',\n \"note\" TEXT,\n \"requested_at\" TIMESTAMP,\n \"decided_at\" TIMESTAMP,\n \"decided_by\" TEXT,\n \"resulting_user_id\" TEXT,\n \"tenant_hint\" TEXT\n);",
91
91
  "columns": {
92
+ "_sync_origin_device_id": {
93
+ "type": "TEXT"
94
+ },
95
+ "_sync_revision": {
96
+ "type": "INTEGER"
97
+ },
92
98
  "id": {
93
99
  "type": "UUID",
94
100
  "primaryKey": true,
@@ -206,7 +212,7 @@
206
212
  ]
207
213
  }
208
214
  ],
209
- "version": "f396996f"
215
+ "version": "ba226925"
210
216
  },
211
217
  "importPath": "@happyvertical/smrt-users"
212
218
  },
@@ -275,8 +281,14 @@
275
281
  ],
276
282
  "schema": {
277
283
  "tableName": "users_cli_auth_approve_limits",
278
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_cli_auth_approve_limits\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL UNIQUE,\n \"attempt_count\" INTEGER NOT NULL DEFAULT 0,\n \"window_started_at\" TIMESTAMP NOT NULL\n);",
284
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_cli_auth_approve_limits\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL UNIQUE,\n \"attempt_count\" INTEGER NOT NULL DEFAULT 0,\n \"window_started_at\" TIMESTAMP NOT NULL\n);",
279
285
  "columns": {
286
+ "_sync_origin_device_id": {
287
+ "type": "TEXT"
288
+ },
289
+ "_sync_revision": {
290
+ "type": "INTEGER"
291
+ },
280
292
  "id": {
281
293
  "type": "UUID",
282
294
  "primaryKey": true,
@@ -342,7 +354,7 @@
342
354
  ]
343
355
  }
344
356
  ],
345
- "version": "c45c02de"
357
+ "version": "b000ec40"
346
358
  },
347
359
  "importPath": "@happyvertical/smrt-users"
348
360
  },
@@ -451,8 +463,14 @@
451
463
  ],
452
464
  "schema": {
453
465
  "tableName": "users_cli_auth_requests",
454
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_cli_auth_requests\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_code\" TEXT NOT NULL UNIQUE,\n \"device_code_hash\" TEXT NOT NULL UNIQUE,\n \"status\" TEXT,\n \"user_id\" UUID,\n \"tenant_id\" UUID,\n \"session_id\" UUID,\n \"expires_at\" TIMESTAMP,\n \"approved_at\" TIMESTAMP\n);",
466
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_cli_auth_requests\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_code\" TEXT NOT NULL UNIQUE,\n \"device_code_hash\" TEXT NOT NULL UNIQUE,\n \"status\" TEXT,\n \"user_id\" UUID,\n \"tenant_id\" UUID,\n \"session_id\" UUID,\n \"expires_at\" TIMESTAMP,\n \"approved_at\" TIMESTAMP\n);",
455
467
  "columns": {
468
+ "_sync_origin_device_id": {
469
+ "type": "TEXT"
470
+ },
471
+ "_sync_revision": {
472
+ "type": "INTEGER"
473
+ },
456
474
  "id": {
457
475
  "type": "UUID",
458
476
  "primaryKey": true,
@@ -576,7 +594,7 @@
576
594
  ]
577
595
  }
578
596
  ],
579
- "version": "713ae04c"
597
+ "version": "a73e3a31"
580
598
  },
581
599
  "importPath": "@happyvertical/smrt-users"
582
600
  },
@@ -656,8 +674,14 @@
656
674
  ],
657
675
  "schema": {
658
676
  "tableName": "groups",
659
- "ddl": "CREATE TABLE IF NOT EXISTS \"groups\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT ''\n);",
677
+ "ddl": "CREATE TABLE IF NOT EXISTS \"groups\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT ''\n);",
660
678
  "columns": {
679
+ "_sync_origin_device_id": {
680
+ "type": "TEXT"
681
+ },
682
+ "_sync_revision": {
683
+ "type": "INTEGER"
684
+ },
661
685
  "id": {
662
686
  "type": "UUID",
663
687
  "primaryKey": true,
@@ -725,7 +749,7 @@
725
749
  ]
726
750
  }
727
751
  ],
728
- "version": "1824c19b"
752
+ "version": "99e0fcb4"
729
753
  },
730
754
  "importPath": "@happyvertical/smrt-users"
731
755
  },
@@ -904,8 +928,14 @@
904
928
  ],
905
929
  "schema": {
906
930
  "tableName": "group_members",
907
- "ddl": "CREATE TABLE IF NOT EXISTS \"group_members\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"group_id\" UUID NOT NULL,\n \"user_id\" UUID NOT NULL\n);",
931
+ "ddl": "CREATE TABLE IF NOT EXISTS \"group_members\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"group_id\" UUID NOT NULL,\n \"user_id\" UUID NOT NULL\n);",
908
932
  "columns": {
933
+ "_sync_origin_device_id": {
934
+ "type": "TEXT"
935
+ },
936
+ "_sync_revision": {
937
+ "type": "INTEGER"
938
+ },
909
939
  "id": {
910
940
  "type": "UUID",
911
941
  "primaryKey": true,
@@ -985,7 +1015,7 @@
985
1015
  ]
986
1016
  }
987
1017
  ],
988
- "version": "ed4d1187"
1018
+ "version": "84ef2776"
989
1019
  },
990
1020
  "importPath": "@happyvertical/smrt-users"
991
1021
  },
@@ -1131,8 +1161,14 @@
1131
1161
  ],
1132
1162
  "schema": {
1133
1163
  "tableName": "group_roles",
1134
- "ddl": "CREATE TABLE IF NOT EXISTS \"group_roles\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"group_id\" UUID NOT NULL,\n \"role_id\" UUID NOT NULL\n);",
1164
+ "ddl": "CREATE TABLE IF NOT EXISTS \"group_roles\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"group_id\" UUID NOT NULL,\n \"role_id\" UUID NOT NULL\n);",
1135
1165
  "columns": {
1166
+ "_sync_origin_device_id": {
1167
+ "type": "TEXT"
1168
+ },
1169
+ "_sync_revision": {
1170
+ "type": "INTEGER"
1171
+ },
1136
1172
  "id": {
1137
1173
  "type": "UUID",
1138
1174
  "primaryKey": true,
@@ -1211,7 +1247,7 @@
1211
1247
  ]
1212
1248
  }
1213
1249
  ],
1214
- "version": "b1e35f93"
1250
+ "version": "75d9841d"
1215
1251
  },
1216
1252
  "importPath": "@happyvertical/smrt-users"
1217
1253
  },
@@ -1315,8 +1351,14 @@
1315
1351
  ],
1316
1352
  "schema": {
1317
1353
  "tableName": "users_login_attempts",
1318
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_login_attempts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"limiter_key\" TEXT NOT NULL UNIQUE,\n \"scope\" TEXT NOT NULL,\n \"attempt_count\" INTEGER NOT NULL DEFAULT 0,\n \"window_started_at\" TIMESTAMP NOT NULL,\n \"failure_streak\" INTEGER NOT NULL DEFAULT 0,\n \"locked_until\" TIMESTAMP,\n \"last_failed_at\" TIMESTAMP,\n \"retain_until\" TIMESTAMP NOT NULL\n);",
1354
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_login_attempts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"limiter_key\" TEXT NOT NULL UNIQUE,\n \"scope\" TEXT NOT NULL,\n \"attempt_count\" INTEGER NOT NULL DEFAULT 0,\n \"window_started_at\" TIMESTAMP NOT NULL,\n \"failure_streak\" INTEGER NOT NULL DEFAULT 0,\n \"locked_until\" TIMESTAMP,\n \"last_failed_at\" TIMESTAMP,\n \"retain_until\" TIMESTAMP NOT NULL\n);",
1319
1355
  "columns": {
1356
+ "_sync_origin_device_id": {
1357
+ "type": "TEXT"
1358
+ },
1359
+ "_sync_revision": {
1360
+ "type": "INTEGER"
1361
+ },
1320
1362
  "id": {
1321
1363
  "type": "UUID",
1322
1364
  "primaryKey": true,
@@ -1413,7 +1455,7 @@
1413
1455
  ]
1414
1456
  }
1415
1457
  ],
1416
- "version": "89dfe336"
1458
+ "version": "23f377c9"
1417
1459
  },
1418
1460
  "importPath": "@happyvertical/smrt-users"
1419
1461
  },
@@ -1467,8 +1509,14 @@
1467
1509
  ],
1468
1510
  "schema": {
1469
1511
  "tableName": "users_login_audit_events",
1470
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_login_audit_events\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"kind\" TEXT NOT NULL,\n \"outcome\" TEXT NOT NULL,\n \"subject_key_hash\" TEXT,\n \"source_key_hash\" TEXT,\n \"retry_after_seconds\" INTEGER,\n \"occurred_at\" TIMESTAMP NOT NULL,\n \"metadata\" TEXT\n);",
1512
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_login_audit_events\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"kind\" TEXT NOT NULL,\n \"outcome\" TEXT NOT NULL,\n \"subject_key_hash\" TEXT,\n \"source_key_hash\" TEXT,\n \"retry_after_seconds\" INTEGER,\n \"occurred_at\" TIMESTAMP NOT NULL,\n \"metadata\" TEXT\n);",
1471
1513
  "columns": {
1514
+ "_sync_origin_device_id": {
1515
+ "type": "TEXT"
1516
+ },
1517
+ "_sync_revision": {
1518
+ "type": "INTEGER"
1519
+ },
1472
1520
  "id": {
1473
1521
  "type": "UUID",
1474
1522
  "primaryKey": true,
@@ -1564,7 +1612,7 @@
1564
1612
  ]
1565
1613
  }
1566
1614
  ],
1567
- "version": "485105a9"
1615
+ "version": "707a8055"
1568
1616
  },
1569
1617
  "importPath": "@happyvertical/smrt-users"
1570
1618
  },
@@ -1665,8 +1713,14 @@
1665
1713
  ],
1666
1714
  "schema": {
1667
1715
  "tableName": "users_magic_link_tokens",
1668
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_magic_link_tokens\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"nonce\" TEXT NOT NULL UNIQUE DEFAULT '',\n \"email\" TEXT DEFAULT '',\n \"used\" BOOLEAN DEFAULT FALSE,\n \"expires_at\" TIMESTAMP\n);",
1716
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_magic_link_tokens\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"nonce\" TEXT NOT NULL UNIQUE DEFAULT '',\n \"email\" TEXT DEFAULT '',\n \"used\" BOOLEAN DEFAULT FALSE,\n \"expires_at\" TIMESTAMP\n);",
1669
1717
  "columns": {
1718
+ "_sync_origin_device_id": {
1719
+ "type": "TEXT"
1720
+ },
1721
+ "_sync_revision": {
1722
+ "type": "INTEGER"
1723
+ },
1670
1724
  "id": {
1671
1725
  "type": "UUID",
1672
1726
  "primaryKey": true,
@@ -1738,7 +1792,7 @@
1738
1792
  ]
1739
1793
  }
1740
1794
  ],
1741
- "version": "537853d3"
1795
+ "version": "cfeb535f"
1742
1796
  },
1743
1797
  "importPath": "@happyvertical/smrt-users"
1744
1798
  },
@@ -1888,8 +1942,14 @@
1888
1942
  ],
1889
1943
  "schema": {
1890
1944
  "tableName": "memberships",
1891
- "ddl": "CREATE TABLE IF NOT EXISTS \"memberships\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL,\n \"tenant_id\" UUID NOT NULL,\n \"role_id\" UUID NOT NULL,\n \"status\" TEXT\n);",
1945
+ "ddl": "CREATE TABLE IF NOT EXISTS \"memberships\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL,\n \"tenant_id\" UUID NOT NULL,\n \"role_id\" UUID NOT NULL,\n \"status\" TEXT\n);",
1892
1946
  "columns": {
1947
+ "_sync_origin_device_id": {
1948
+ "type": "TEXT"
1949
+ },
1950
+ "_sync_revision": {
1951
+ "type": "INTEGER"
1952
+ },
1893
1953
  "id": {
1894
1954
  "type": "UUID",
1895
1955
  "primaryKey": true,
@@ -1993,7 +2053,7 @@
1993
2053
  ]
1994
2054
  }
1995
2055
  ],
1996
- "version": "ebfd11e0"
2056
+ "version": "de55caaf"
1997
2057
  },
1998
2058
  "importPath": "@happyvertical/smrt-users"
1999
2059
  },
@@ -2191,8 +2251,14 @@
2191
2251
  ],
2192
2252
  "schema": {
2193
2253
  "tableName": "membership_overrides",
2194
- "ddl": "CREATE TABLE IF NOT EXISTS \"membership_overrides\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"membership_id\" UUID NOT NULL,\n \"permission_id\" UUID NOT NULL,\n \"effect\" TEXT\n);",
2254
+ "ddl": "CREATE TABLE IF NOT EXISTS \"membership_overrides\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"membership_id\" UUID NOT NULL,\n \"permission_id\" UUID NOT NULL,\n \"effect\" TEXT\n);",
2195
2255
  "columns": {
2256
+ "_sync_origin_device_id": {
2257
+ "type": "TEXT"
2258
+ },
2259
+ "_sync_revision": {
2260
+ "type": "INTEGER"
2261
+ },
2196
2262
  "id": {
2197
2263
  "type": "UUID",
2198
2264
  "primaryKey": true,
@@ -2277,7 +2343,7 @@
2277
2343
  ]
2278
2344
  }
2279
2345
  ],
2280
- "version": "25fe9da8"
2346
+ "version": "e94d813f"
2281
2347
  },
2282
2348
  "importPath": "@happyvertical/smrt-users"
2283
2349
  },
@@ -2327,8 +2393,14 @@
2327
2393
  ],
2328
2394
  "schema": {
2329
2395
  "tableName": "users_oauth_clients",
2330
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_clients\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"client_id\" TEXT NOT NULL UNIQUE,\n \"redirect_uris\" TEXT,\n \"allowed_scopes\" TEXT,\n \"token_endpoint_auth_method\" TEXT DEFAULT 'none',\n \"secret_hash\" TEXT,\n \"allowed_resources\" TEXT\n);",
2396
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_clients\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"client_id\" TEXT NOT NULL UNIQUE,\n \"redirect_uris\" TEXT,\n \"allowed_scopes\" TEXT,\n \"token_endpoint_auth_method\" TEXT DEFAULT 'none',\n \"secret_hash\" TEXT,\n \"allowed_resources\" TEXT\n);",
2331
2397
  "columns": {
2398
+ "_sync_origin_device_id": {
2399
+ "type": "TEXT"
2400
+ },
2401
+ "_sync_revision": {
2402
+ "type": "INTEGER"
2403
+ },
2332
2404
  "id": {
2333
2405
  "type": "UUID",
2334
2406
  "primaryKey": true,
@@ -2402,7 +2474,7 @@
2402
2474
  ]
2403
2475
  }
2404
2476
  ],
2405
- "version": "0ecda18c"
2477
+ "version": "94ce5e54"
2406
2478
  },
2407
2479
  "importPath": "@happyvertical/smrt-users"
2408
2480
  },
@@ -2485,8 +2557,14 @@
2485
2557
  ],
2486
2558
  "schema": {
2487
2559
  "tableName": "users_oauth_authorization_codes",
2488
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_authorization_codes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"authorization_id\" TEXT,\n \"code_hash\" TEXT NOT NULL UNIQUE,\n \"client_id\" TEXT,\n \"subject\" TEXT,\n \"tenant_id\" TEXT,\n \"claims\" TEXT,\n \"redirect_uri\" TEXT,\n \"scopes\" TEXT,\n \"resource\" TEXT,\n \"code_challenge\" TEXT,\n \"expires_at\" TIMESTAMP,\n \"consumed_at\" TIMESTAMP\n);",
2560
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_authorization_codes\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"authorization_id\" TEXT,\n \"code_hash\" TEXT NOT NULL UNIQUE,\n \"client_id\" TEXT,\n \"subject\" TEXT,\n \"tenant_id\" TEXT,\n \"claims\" TEXT,\n \"redirect_uri\" TEXT,\n \"scopes\" TEXT,\n \"resource\" TEXT,\n \"code_challenge\" TEXT,\n \"expires_at\" TIMESTAMP,\n \"consumed_at\" TIMESTAMP\n);",
2489
2561
  "columns": {
2562
+ "_sync_origin_device_id": {
2563
+ "type": "TEXT"
2564
+ },
2565
+ "_sync_revision": {
2566
+ "type": "INTEGER"
2567
+ },
2490
2568
  "id": {
2491
2569
  "type": "UUID",
2492
2570
  "primaryKey": true,
@@ -2621,7 +2699,7 @@
2621
2699
  ]
2622
2700
  }
2623
2701
  ],
2624
- "version": "f5c5d615"
2702
+ "version": "1d19700b"
2625
2703
  },
2626
2704
  "importPath": "@happyvertical/smrt-users"
2627
2705
  },
@@ -2718,8 +2796,14 @@
2718
2796
  ],
2719
2797
  "schema": {
2720
2798
  "tableName": "users_oauth_refresh_grants",
2721
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_refresh_grants\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"authorization_id\" TEXT,\n \"token_hash\" TEXT NOT NULL UNIQUE,\n \"family_id\" TEXT,\n \"client_id\" TEXT,\n \"subject\" TEXT,\n \"tenant_id\" TEXT,\n \"claims\" TEXT,\n \"scopes\" TEXT,\n \"resource\" TEXT,\n \"expires_at\" TIMESTAMP,\n \"consumed_at\" TIMESTAMP,\n \"revoked_at\" TIMESTAMP\n);",
2799
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_refresh_grants\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"authorization_id\" TEXT,\n \"token_hash\" TEXT NOT NULL UNIQUE,\n \"family_id\" TEXT,\n \"client_id\" TEXT,\n \"subject\" TEXT,\n \"tenant_id\" TEXT,\n \"claims\" TEXT,\n \"scopes\" TEXT,\n \"resource\" TEXT,\n \"expires_at\" TIMESTAMP,\n \"consumed_at\" TIMESTAMP,\n \"revoked_at\" TIMESTAMP\n);",
2722
2800
  "columns": {
2801
+ "_sync_origin_device_id": {
2802
+ "type": "TEXT"
2803
+ },
2804
+ "_sync_revision": {
2805
+ "type": "INTEGER"
2806
+ },
2723
2807
  "id": {
2724
2808
  "type": "UUID",
2725
2809
  "primaryKey": true,
@@ -2866,7 +2950,7 @@
2866
2950
  ]
2867
2951
  }
2868
2952
  ],
2869
- "version": "d332998e"
2953
+ "version": "30b5c2be"
2870
2954
  },
2871
2955
  "importPath": "@happyvertical/smrt-users"
2872
2956
  },
@@ -2916,8 +3000,14 @@
2916
3000
  ],
2917
3001
  "schema": {
2918
3002
  "tableName": "users_oauth_access_token_revocations",
2919
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_access_token_revocations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"jti\" TEXT NOT NULL UNIQUE,\n \"expires_at\" TIMESTAMP\n);",
3003
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_access_token_revocations\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"jti\" TEXT NOT NULL UNIQUE,\n \"expires_at\" TIMESTAMP\n);",
2920
3004
  "columns": {
3005
+ "_sync_origin_device_id": {
3006
+ "type": "TEXT"
3007
+ },
3008
+ "_sync_revision": {
3009
+ "type": "INTEGER"
3010
+ },
2921
3011
  "id": {
2922
3012
  "type": "UUID",
2923
3013
  "primaryKey": true,
@@ -2976,7 +3066,7 @@
2976
3066
  ]
2977
3067
  }
2978
3068
  ],
2979
- "version": "79147089"
3069
+ "version": "1a4eab94"
2980
3070
  },
2981
3071
  "importPath": "@happyvertical/smrt-users"
2982
3072
  },
@@ -3012,8 +3102,14 @@
3012
3102
  ],
3013
3103
  "schema": {
3014
3104
  "tableName": "users_oauth_authorizations",
3015
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_authorizations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"subject\" TEXT,\n \"session_id\" TEXT,\n \"client_id\" TEXT,\n \"tenant_id\" TEXT,\n \"scopes\" TEXT,\n \"permission_ceiling\" TEXT,\n \"resource\" TEXT,\n \"revoked_at\" TIMESTAMP\n);",
3105
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_authorizations\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"subject\" TEXT,\n \"session_id\" TEXT,\n \"client_id\" TEXT,\n \"tenant_id\" TEXT,\n \"scopes\" TEXT,\n \"permission_ceiling\" TEXT,\n \"resource\" TEXT,\n \"revoked_at\" TIMESTAMP\n);",
3016
3106
  "columns": {
3107
+ "_sync_origin_device_id": {
3108
+ "type": "TEXT"
3109
+ },
3110
+ "_sync_revision": {
3111
+ "type": "INTEGER"
3112
+ },
3017
3113
  "id": {
3018
3114
  "type": "UUID",
3019
3115
  "primaryKey": true,
@@ -3110,7 +3206,7 @@
3110
3206
  ]
3111
3207
  }
3112
3208
  ],
3113
- "version": "291f8816"
3209
+ "version": "5015c6b8"
3114
3210
  },
3115
3211
  "importPath": "@happyvertical/smrt-users"
3116
3212
  },
@@ -3185,8 +3281,14 @@
3185
3281
  ],
3186
3282
  "schema": {
3187
3283
  "tableName": "users_oauth_refresh_families",
3188
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_refresh_families\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"authorization_id\" TEXT,\n \"revoked_at\" TIMESTAMP\n);",
3284
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_refresh_families\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"authorization_id\" TEXT,\n \"revoked_at\" TIMESTAMP\n);",
3189
3285
  "columns": {
3286
+ "_sync_origin_device_id": {
3287
+ "type": "TEXT"
3288
+ },
3289
+ "_sync_revision": {
3290
+ "type": "INTEGER"
3291
+ },
3190
3292
  "id": {
3191
3293
  "type": "UUID",
3192
3294
  "primaryKey": true,
@@ -3245,7 +3347,7 @@
3245
3347
  ]
3246
3348
  }
3247
3349
  ],
3248
- "version": "37392f31"
3350
+ "version": "23fbdf28"
3249
3351
  },
3250
3352
  "importPath": "@happyvertical/smrt-users"
3251
3353
  },
@@ -3318,8 +3420,14 @@
3318
3420
  ],
3319
3421
  "schema": {
3320
3422
  "tableName": "users_passkey_challenges",
3321
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_passkey_challenges\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"challenge_hash\" TEXT NOT NULL UNIQUE,\n \"purpose\" TEXT NOT NULL,\n \"expires_at\" TIMESTAMP NOT NULL\n);",
3423
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_passkey_challenges\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"challenge_hash\" TEXT NOT NULL UNIQUE,\n \"purpose\" TEXT NOT NULL,\n \"expires_at\" TIMESTAMP NOT NULL\n);",
3322
3424
  "columns": {
3425
+ "_sync_origin_device_id": {
3426
+ "type": "TEXT"
3427
+ },
3428
+ "_sync_revision": {
3429
+ "type": "INTEGER"
3430
+ },
3323
3431
  "id": {
3324
3432
  "type": "UUID",
3325
3433
  "primaryKey": true,
@@ -3383,7 +3491,7 @@
3383
3491
  ]
3384
3492
  }
3385
3493
  ],
3386
- "version": "895dcef7"
3494
+ "version": "b41ad578"
3387
3495
  },
3388
3496
  "importPath": "@happyvertical/smrt-users"
3389
3497
  },
@@ -3586,8 +3694,14 @@
3586
3694
  ],
3587
3695
  "schema": {
3588
3696
  "tableName": "users_passkey_credentials",
3589
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_passkey_credentials\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL,\n \"credential_id\" TEXT NOT NULL UNIQUE,\n \"public_key\" TEXT NOT NULL,\n \"sign_count\" INTEGER NOT NULL DEFAULT 0,\n \"transports\" TEXT,\n \"name\" TEXT NOT NULL,\n \"aaguid\" TEXT,\n \"backed_up\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"device_type\" TEXT,\n \"last_used_at\" TIMESTAMP,\n \"created_by\" TEXT\n);",
3697
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_passkey_credentials\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL,\n \"credential_id\" TEXT NOT NULL UNIQUE,\n \"public_key\" TEXT NOT NULL,\n \"sign_count\" INTEGER NOT NULL DEFAULT 0,\n \"transports\" TEXT,\n \"name\" TEXT NOT NULL,\n \"aaguid\" TEXT,\n \"backed_up\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"device_type\" TEXT,\n \"last_used_at\" TIMESTAMP,\n \"created_by\" TEXT\n);",
3590
3698
  "columns": {
3699
+ "_sync_origin_device_id": {
3700
+ "type": "TEXT"
3701
+ },
3702
+ "_sync_revision": {
3703
+ "type": "INTEGER"
3704
+ },
3591
3705
  "id": {
3592
3706
  "type": "UUID",
3593
3707
  "primaryKey": true,
@@ -3700,7 +3814,7 @@
3700
3814
  ]
3701
3815
  }
3702
3816
  ],
3703
- "version": "4483d2e2"
3817
+ "version": "ae2ccc46"
3704
3818
  },
3705
3819
  "importPath": "@happyvertical/smrt-users"
3706
3820
  },
@@ -3855,8 +3969,14 @@
3855
3969
  ],
3856
3970
  "schema": {
3857
3971
  "tableName": "users_password_credentials",
3858
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_password_credentials\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL UNIQUE,\n \"password_hash\" TEXT NOT NULL,\n \"version\" INTEGER NOT NULL DEFAULT 1,\n \"must_change\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"rotated_at\" TIMESTAMP,\n \"rotated_by\" TEXT\n);",
3972
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_password_credentials\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL UNIQUE,\n \"password_hash\" TEXT NOT NULL,\n \"version\" INTEGER NOT NULL DEFAULT 1,\n \"must_change\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"rotated_at\" TIMESTAMP,\n \"rotated_by\" TEXT\n);",
3859
3973
  "columns": {
3974
+ "_sync_origin_device_id": {
3975
+ "type": "TEXT"
3976
+ },
3977
+ "_sync_revision": {
3978
+ "type": "INTEGER"
3979
+ },
3860
3980
  "id": {
3861
3981
  "type": "UUID",
3862
3982
  "primaryKey": true,
@@ -3938,7 +4058,7 @@
3938
4058
  ]
3939
4059
  }
3940
4060
  ],
3941
- "version": "9a828f77"
4061
+ "version": "d2f942da"
3942
4062
  },
3943
4063
  "importPath": "@happyvertical/smrt-users"
3944
4064
  },
@@ -4057,8 +4177,14 @@
4057
4177
  ],
4058
4178
  "schema": {
4059
4179
  "tableName": "permissions",
4060
- "ddl": "CREATE TABLE IF NOT EXISTS \"permissions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"category\" TEXT DEFAULT ''\n);",
4180
+ "ddl": "CREATE TABLE IF NOT EXISTS \"permissions\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"category\" TEXT DEFAULT ''\n);",
4061
4181
  "columns": {
4182
+ "_sync_origin_device_id": {
4183
+ "type": "TEXT"
4184
+ },
4185
+ "_sync_revision": {
4186
+ "type": "INTEGER"
4187
+ },
4062
4188
  "id": {
4063
4189
  "type": "UUID",
4064
4190
  "primaryKey": true,
@@ -4119,7 +4245,7 @@
4119
4245
  ]
4120
4246
  }
4121
4247
  ],
4122
- "version": "4c81b2af"
4248
+ "version": "cf1047b8"
4123
4249
  },
4124
4250
  "importPath": "@happyvertical/smrt-users"
4125
4251
  },
@@ -4198,8 +4324,14 @@
4198
4324
  ],
4199
4325
  "schema": {
4200
4326
  "tableName": "users_pin_credentials",
4201
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_pin_credentials\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL UNIQUE,\n \"pin_hash\" TEXT NOT NULL,\n \"version\" INTEGER NOT NULL DEFAULT 1,\n \"must_reset\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"rotated_at\" TIMESTAMP,\n \"rotated_by\" TEXT\n);",
4327
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_pin_credentials\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL UNIQUE,\n \"pin_hash\" TEXT NOT NULL,\n \"version\" INTEGER NOT NULL DEFAULT 1,\n \"must_reset\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"rotated_at\" TIMESTAMP,\n \"rotated_by\" TEXT\n);",
4202
4328
  "columns": {
4329
+ "_sync_origin_device_id": {
4330
+ "type": "TEXT"
4331
+ },
4332
+ "_sync_revision": {
4333
+ "type": "INTEGER"
4334
+ },
4203
4335
  "id": {
4204
4336
  "type": "UUID",
4205
4337
  "primaryKey": true,
@@ -4281,7 +4413,7 @@
4281
4413
  ]
4282
4414
  }
4283
4415
  ],
4284
- "version": "0e2fa003"
4416
+ "version": "e03f06b6"
4285
4417
  },
4286
4418
  "importPath": "@happyvertical/smrt-users"
4287
4419
  },
@@ -4364,8 +4496,14 @@
4364
4496
  ],
4365
4497
  "schema": {
4366
4498
  "tableName": "resource_grants",
4367
- "ddl": "CREATE TABLE IF NOT EXISTS \"resource_grants\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"user_id\" UUID NOT NULL,\n \"resource_type\" TEXT,\n \"resource_id\" TEXT,\n \"permission\" TEXT,\n \"effect\" TEXT,\n \"can_delegate\" BOOLEAN DEFAULT FALSE,\n \"parent_grant_id\" UUID,\n \"revoked_at\" TEXT\n);",
4499
+ "ddl": "CREATE TABLE IF NOT EXISTS \"resource_grants\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"user_id\" UUID NOT NULL,\n \"resource_type\" TEXT,\n \"resource_id\" TEXT,\n \"permission\" TEXT,\n \"effect\" TEXT,\n \"can_delegate\" BOOLEAN DEFAULT FALSE,\n \"parent_grant_id\" UUID,\n \"revoked_at\" TEXT\n);",
4368
4500
  "columns": {
4501
+ "_sync_origin_device_id": {
4502
+ "type": "TEXT"
4503
+ },
4504
+ "_sync_revision": {
4505
+ "type": "INTEGER"
4506
+ },
4369
4507
  "id": {
4370
4508
  "type": "UUID",
4371
4509
  "primaryKey": true,
@@ -4490,7 +4628,7 @@
4490
4628
  ]
4491
4629
  }
4492
4630
  ],
4493
- "version": "52e03776"
4631
+ "version": "712ca782"
4494
4632
  },
4495
4633
  "importPath": "@happyvertical/smrt-users"
4496
4634
  },
@@ -4620,8 +4758,14 @@
4620
4758
  ],
4621
4759
  "schema": {
4622
4760
  "tableName": "roles",
4623
- "ddl": "CREATE TABLE IF NOT EXISTS \"roles\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"is_system\" BOOLEAN DEFAULT FALSE,\n \"inherits_to_descendants\" BOOLEAN DEFAULT FALSE\n);",
4761
+ "ddl": "CREATE TABLE IF NOT EXISTS \"roles\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"is_system\" BOOLEAN DEFAULT FALSE,\n \"inherits_to_descendants\" BOOLEAN DEFAULT FALSE\n);",
4624
4762
  "columns": {
4763
+ "_sync_origin_device_id": {
4764
+ "type": "TEXT"
4765
+ },
4766
+ "_sync_revision": {
4767
+ "type": "INTEGER"
4768
+ },
4625
4769
  "id": {
4626
4770
  "type": "UUID",
4627
4771
  "primaryKey": true,
@@ -4702,7 +4846,7 @@
4702
4846
  ]
4703
4847
  }
4704
4848
  ],
4705
- "version": "47369d9d"
4849
+ "version": "e1dc010f"
4706
4850
  },
4707
4851
  "importPath": "@happyvertical/smrt-users"
4708
4852
  },
@@ -4881,8 +5025,14 @@
4881
5025
  ],
4882
5026
  "schema": {
4883
5027
  "tableName": "role_permissions",
4884
- "ddl": "CREATE TABLE IF NOT EXISTS \"role_permissions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"role_id\" UUID NOT NULL,\n \"permission_id\" UUID NOT NULL\n);",
5028
+ "ddl": "CREATE TABLE IF NOT EXISTS \"role_permissions\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"role_id\" UUID NOT NULL,\n \"permission_id\" UUID NOT NULL\n);",
4885
5029
  "columns": {
5030
+ "_sync_origin_device_id": {
5031
+ "type": "TEXT"
5032
+ },
5033
+ "_sync_revision": {
5034
+ "type": "INTEGER"
5035
+ },
4886
5036
  "id": {
4887
5037
  "type": "UUID",
4888
5038
  "primaryKey": true,
@@ -4962,7 +5112,7 @@
4962
5112
  ]
4963
5113
  }
4964
5114
  ],
4965
- "version": "4dfed3ac"
5115
+ "version": "5e31df57"
4966
5116
  },
4967
5117
  "importPath": "@happyvertical/smrt-users"
4968
5118
  },
@@ -5281,8 +5431,14 @@
5281
5431
  ],
5282
5432
  "schema": {
5283
5433
  "tableName": "sessions",
5284
- "ddl": "CREATE TABLE IF NOT EXISTS \"sessions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID,\n \"tenant_id\" UUID,\n \"status\" TEXT,\n \"expires_at\" TIMESTAMP,\n \"user_agent\" TEXT DEFAULT '',\n \"ip_address\" TEXT DEFAULT '',\n \"last_accessed_at\" TIMESTAMP,\n \"data\" JSON DEFAULT '{}',\n \"auth_method\" TEXT,\n \"parent_session_id\" UUID\n);",
5434
+ "ddl": "CREATE TABLE IF NOT EXISTS \"sessions\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID,\n \"tenant_id\" UUID,\n \"status\" TEXT,\n \"expires_at\" TIMESTAMP,\n \"user_agent\" TEXT DEFAULT '',\n \"ip_address\" TEXT DEFAULT '',\n \"last_accessed_at\" TIMESTAMP,\n \"data\" JSON DEFAULT '{}',\n \"auth_method\" TEXT,\n \"parent_session_id\" UUID\n);",
5285
5435
  "columns": {
5436
+ "_sync_origin_device_id": {
5437
+ "type": "TEXT"
5438
+ },
5439
+ "_sync_revision": {
5440
+ "type": "INTEGER"
5441
+ },
5286
5442
  "id": {
5287
5443
  "type": "UUID",
5288
5444
  "primaryKey": true,
@@ -5412,7 +5568,7 @@
5412
5568
  ]
5413
5569
  }
5414
5570
  ],
5415
- "version": "b4260a0f"
5571
+ "version": "862e7f51"
5416
5572
  },
5417
5573
  "importPath": "@happyvertical/smrt-users"
5418
5574
  },
@@ -5803,8 +5959,14 @@
5803
5959
  ],
5804
5960
  "schema": {
5805
5961
  "tableName": "tenants",
5806
- "ddl": "CREATE TABLE IF NOT EXISTS \"tenants\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"name\" TEXT DEFAULT '',\n \"status\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"parent_tenant_id\" UUID,\n \"hierarchy_level\" INTEGER DEFAULT 0,\n \"hierarchy_path\" TEXT DEFAULT '',\n \"cascade_permissions\" BOOLEAN DEFAULT TRUE,\n \"inherit_permissions\" BOOLEAN DEFAULT TRUE\n);",
5962
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tenants\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"name\" TEXT DEFAULT '',\n \"status\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"parent_tenant_id\" UUID,\n \"hierarchy_level\" INTEGER DEFAULT 0,\n \"hierarchy_path\" TEXT DEFAULT '',\n \"cascade_permissions\" BOOLEAN DEFAULT TRUE,\n \"inherit_permissions\" BOOLEAN DEFAULT TRUE\n);",
5807
5963
  "columns": {
5964
+ "_sync_origin_device_id": {
5965
+ "type": "TEXT"
5966
+ },
5967
+ "_sync_revision": {
5968
+ "type": "INTEGER"
5969
+ },
5808
5970
  "id": {
5809
5971
  "type": "UUID",
5810
5972
  "primaryKey": true,
@@ -5913,7 +6075,7 @@
5913
6075
  ]
5914
6076
  }
5915
6077
  ],
5916
- "version": "934f7025"
6078
+ "version": "7a37a7d7"
5917
6079
  },
5918
6080
  "importPath": "@happyvertical/smrt-users"
5919
6081
  },
@@ -6012,8 +6174,14 @@
6012
6174
  ],
6013
6175
  "schema": {
6014
6176
  "tableName": "tenant_integrations",
6015
- "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_integrations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"provider\" TEXT DEFAULT 'aws',\n \"external_ids\" TEXT,\n \"status\" TEXT DEFAULT 'unprovisioned',\n \"last_checked_at\" TIMESTAMP,\n \"last_check_summary\" TEXT,\n \"last_error\" TEXT\n);",
6177
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_integrations\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"provider\" TEXT DEFAULT 'aws',\n \"external_ids\" TEXT,\n \"status\" TEXT DEFAULT 'unprovisioned',\n \"last_checked_at\" TIMESTAMP,\n \"last_check_summary\" TEXT,\n \"last_error\" TEXT\n);",
6016
6178
  "columns": {
6179
+ "_sync_origin_device_id": {
6180
+ "type": "TEXT"
6181
+ },
6182
+ "_sync_revision": {
6183
+ "type": "INTEGER"
6184
+ },
6017
6185
  "id": {
6018
6186
  "type": "UUID",
6019
6187
  "primaryKey": true,
@@ -6103,7 +6271,7 @@
6103
6271
  ]
6104
6272
  }
6105
6273
  ],
6106
- "version": "3ed31966"
6274
+ "version": "b45fbe92"
6107
6275
  },
6108
6276
  "importPath": "@happyvertical/smrt-users"
6109
6277
  },
@@ -6418,8 +6586,14 @@
6418
6586
  ],
6419
6587
  "schema": {
6420
6588
  "tableName": "tenant_permission_overrides",
6421
- "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_permission_overrides\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"permission_id\" UUID NOT NULL,\n \"effect\" TEXT\n);",
6589
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_permission_overrides\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"permission_id\" UUID NOT NULL,\n \"effect\" TEXT\n);",
6422
6590
  "columns": {
6591
+ "_sync_origin_device_id": {
6592
+ "type": "TEXT"
6593
+ },
6594
+ "_sync_revision": {
6595
+ "type": "INTEGER"
6596
+ },
6423
6597
  "id": {
6424
6598
  "type": "UUID",
6425
6599
  "primaryKey": true,
@@ -6504,7 +6678,7 @@
6504
6678
  ]
6505
6679
  }
6506
6680
  ],
6507
- "version": "95b78bdd"
6681
+ "version": "f2453713"
6508
6682
  },
6509
6683
  "importPath": "@happyvertical/smrt-users"
6510
6684
  },
@@ -6693,8 +6867,14 @@
6693
6867
  ],
6694
6868
  "schema": {
6695
6869
  "tableName": "users",
6696
- "ddl": "CREATE TABLE IF NOT EXISTS \"users\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"profile_id\" UUID UNIQUE,\n \"email\" TEXT DEFAULT '',\n \"email_key\" TEXT UNIQUE,\n \"username\" TEXT,\n \"username_key\" TEXT UNIQUE,\n \"status\" TEXT,\n \"last_login_at\" TIMESTAMP\n);",
6870
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"profile_id\" UUID UNIQUE,\n \"email\" TEXT DEFAULT '',\n \"email_key\" TEXT UNIQUE,\n \"username\" TEXT,\n \"username_key\" TEXT UNIQUE,\n \"status\" TEXT,\n \"last_login_at\" TIMESTAMP\n);",
6697
6871
  "columns": {
6872
+ "_sync_origin_device_id": {
6873
+ "type": "TEXT"
6874
+ },
6875
+ "_sync_revision": {
6876
+ "type": "INTEGER"
6877
+ },
6698
6878
  "id": {
6699
6879
  "type": "UUID",
6700
6880
  "primaryKey": true,
@@ -6786,7 +6966,7 @@
6786
6966
  ]
6787
6967
  }
6788
6968
  ],
6789
- "version": "3ee8f0f4"
6969
+ "version": "a57edfbd"
6790
6970
  },
6791
6971
  "importPath": "@happyvertical/smrt-users"
6792
6972
  },
@@ -6874,8 +7054,14 @@
6874
7054
  "validationRules": [],
6875
7055
  "schema": {
6876
7056
  "tableName": "member_classes",
6877
- "ddl": "CREATE TABLE IF NOT EXISTS \"member_classes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"key\" TEXT,\n \"name\" TEXT,\n \"description\" TEXT,\n \"policy_metadata\" JSON\n);",
7057
+ "ddl": "CREATE TABLE IF NOT EXISTS \"member_classes\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"key\" TEXT,\n \"name\" TEXT,\n \"description\" TEXT,\n \"policy_metadata\" JSON\n);",
6878
7058
  "columns": {
7059
+ "_sync_origin_device_id": {
7060
+ "type": "TEXT"
7061
+ },
7062
+ "_sync_revision": {
7063
+ "type": "INTEGER"
7064
+ },
6879
7065
  "id": {
6880
7066
  "type": "UUID",
6881
7067
  "primaryKey": true,
@@ -6954,7 +7140,7 @@
6954
7140
  ]
6955
7141
  }
6956
7142
  ],
6957
- "version": "0fa7a152"
7143
+ "version": "1a54d931"
6958
7144
  },
6959
7145
  "importPath": "@happyvertical/smrt-users"
6960
7146
  },
@@ -7097,8 +7283,14 @@
7097
7283
  "validationRules": [],
7098
7284
  "schema": {
7099
7285
  "tableName": "legal_members",
7100
- "ddl": "CREATE TABLE IF NOT EXISTS \"legal_members\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_class_id\" UUID,\n \"kind\" TEXT,\n \"display_name\" TEXT,\n \"user_id\" UUID,\n \"profile_id\" UUID,\n \"external_party_ref\" TEXT,\n \"joined_on\" TEXT,\n \"left_on\" TEXT,\n \"status\" TEXT\n);",
7286
+ "ddl": "CREATE TABLE IF NOT EXISTS \"legal_members\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_class_id\" UUID,\n \"kind\" TEXT,\n \"display_name\" TEXT,\n \"user_id\" UUID,\n \"profile_id\" UUID,\n \"external_party_ref\" TEXT,\n \"joined_on\" TEXT,\n \"left_on\" TEXT,\n \"status\" TEXT\n);",
7101
7287
  "columns": {
7288
+ "_sync_origin_device_id": {
7289
+ "type": "TEXT"
7290
+ },
7291
+ "_sync_revision": {
7292
+ "type": "INTEGER"
7293
+ },
7102
7294
  "id": {
7103
7295
  "type": "UUID",
7104
7296
  "primaryKey": true,
@@ -7242,7 +7434,7 @@
7242
7434
  ]
7243
7435
  }
7244
7436
  ],
7245
- "version": "b05fd9f3"
7437
+ "version": "fb9611af"
7246
7438
  },
7247
7439
  "importPath": "@happyvertical/smrt-users"
7248
7440
  },
@@ -7372,8 +7564,14 @@
7372
7564
  "validationRules": [],
7373
7565
  "schema": {
7374
7566
  "tableName": "legal_member_status_history",
7375
- "ddl": "CREATE TABLE IF NOT EXISTS \"legal_member_status_history\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"status\" TEXT,\n \"effective_on\" TEXT,\n \"sequence\" INTEGER,\n \"reason\" TEXT,\n \"actor_ref\" TEXT\n);",
7567
+ "ddl": "CREATE TABLE IF NOT EXISTS \"legal_member_status_history\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"status\" TEXT,\n \"effective_on\" TEXT,\n \"sequence\" INTEGER,\n \"reason\" TEXT,\n \"actor_ref\" TEXT\n);",
7376
7568
  "columns": {
7569
+ "_sync_origin_device_id": {
7570
+ "type": "TEXT"
7571
+ },
7572
+ "_sync_revision": {
7573
+ "type": "INTEGER"
7574
+ },
7377
7575
  "id": {
7378
7576
  "type": "UUID",
7379
7577
  "primaryKey": true,
@@ -7475,7 +7673,7 @@
7475
7673
  ]
7476
7674
  }
7477
7675
  ],
7478
- "version": "3885f61f"
7676
+ "version": "2d85e6ff"
7479
7677
  },
7480
7678
  "importPath": "@happyvertical/smrt-users"
7481
7679
  },
@@ -7619,8 +7817,14 @@
7619
7817
  "validationRules": [],
7620
7818
  "schema": {
7621
7819
  "tableName": "legal_member_references",
7622
- "ddl": "CREATE TABLE IF NOT EXISTS \"legal_member_references\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"kind\" TEXT,\n \"source_type\" TEXT,\n \"source_id\" TEXT,\n \"authoritative\" BOOLEAN,\n \"effective_from\" TEXT,\n \"effective_to\" TEXT,\n \"revokes_id\" UUID\n);",
7820
+ "ddl": "CREATE TABLE IF NOT EXISTS \"legal_member_references\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"kind\" TEXT,\n \"source_type\" TEXT,\n \"source_id\" TEXT,\n \"authoritative\" BOOLEAN,\n \"effective_from\" TEXT,\n \"effective_to\" TEXT,\n \"revokes_id\" UUID\n);",
7623
7821
  "columns": {
7822
+ "_sync_origin_device_id": {
7823
+ "type": "TEXT"
7824
+ },
7825
+ "_sync_revision": {
7826
+ "type": "INTEGER"
7827
+ },
7624
7828
  "id": {
7625
7829
  "type": "UUID",
7626
7830
  "primaryKey": true,
@@ -7745,7 +7949,7 @@
7745
7949
  ]
7746
7950
  }
7747
7951
  ],
7748
- "version": "30237bd4"
7952
+ "version": "33b8009a"
7749
7953
  },
7750
7954
  "importPath": "@happyvertical/smrt-users"
7751
7955
  },
@@ -7844,8 +8048,14 @@
7844
8048
  "validationRules": [],
7845
8049
  "schema": {
7846
8050
  "tableName": "member_officer_appointments",
7847
- "ddl": "CREATE TABLE IF NOT EXISTS \"member_officer_appointments\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"role\" TEXT,\n \"effective_from\" TEXT,\n \"effective_to\" TEXT,\n \"authority\" JSON\n);",
8051
+ "ddl": "CREATE TABLE IF NOT EXISTS \"member_officer_appointments\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"role\" TEXT,\n \"effective_from\" TEXT,\n \"effective_to\" TEXT,\n \"authority\" JSON\n);",
7848
8052
  "columns": {
8053
+ "_sync_origin_device_id": {
8054
+ "type": "TEXT"
8055
+ },
8056
+ "_sync_revision": {
8057
+ "type": "INTEGER"
8058
+ },
7849
8059
  "id": {
7850
8060
  "type": "UUID",
7851
8061
  "primaryKey": true,
@@ -7942,7 +8152,7 @@
7942
8152
  ]
7943
8153
  }
7944
8154
  ],
7945
- "version": "eed54759"
8155
+ "version": "5a60ad96"
7946
8156
  },
7947
8157
  "importPath": "@happyvertical/smrt-users"
7948
8158
  },
@@ -8059,8 +8269,14 @@
8059
8269
  "validationRules": [],
8060
8270
  "schema": {
8061
8271
  "tableName": "member_eligibility_snapshots",
8062
- "ddl": "CREATE TABLE IF NOT EXISTS \"member_eligibility_snapshots\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"record_date\" TEXT,\n \"eligible\" BOOLEAN,\n \"reason\" TEXT,\n \"evidence\" JSON\n);",
8272
+ "ddl": "CREATE TABLE IF NOT EXISTS \"member_eligibility_snapshots\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"record_date\" TEXT,\n \"eligible\" BOOLEAN,\n \"reason\" TEXT,\n \"evidence\" JSON\n);",
8063
8273
  "columns": {
8274
+ "_sync_origin_device_id": {
8275
+ "type": "TEXT"
8276
+ },
8277
+ "_sync_revision": {
8278
+ "type": "INTEGER"
8279
+ },
8064
8280
  "id": {
8065
8281
  "type": "UUID",
8066
8282
  "primaryKey": true,
@@ -8156,7 +8372,7 @@
8156
8372
  ]
8157
8373
  }
8158
8374
  ],
8159
- "version": "f3899c14"
8375
+ "version": "8a5a4773"
8160
8376
  },
8161
8377
  "importPath": "@happyvertical/smrt-users"
8162
8378
  },
@@ -8186,8 +8402,14 @@
8186
8402
  "collectionOf": "@happyvertical/smrt-users:MemberClass",
8187
8403
  "schema": {
8188
8404
  "tableName": "member_classes",
8189
- "ddl": "CREATE TABLE IF NOT EXISTS \"member_classes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"key\" TEXT,\n \"name\" TEXT,\n \"description\" TEXT,\n \"policy_metadata\" JSON\n);",
8405
+ "ddl": "CREATE TABLE IF NOT EXISTS \"member_classes\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"key\" TEXT,\n \"name\" TEXT,\n \"description\" TEXT,\n \"policy_metadata\" JSON\n);",
8190
8406
  "columns": {
8407
+ "_sync_origin_device_id": {
8408
+ "type": "TEXT"
8409
+ },
8410
+ "_sync_revision": {
8411
+ "type": "INTEGER"
8412
+ },
8191
8413
  "id": {
8192
8414
  "type": "UUID",
8193
8415
  "primaryKey": true,
@@ -8266,7 +8488,7 @@
8266
8488
  ]
8267
8489
  }
8268
8490
  ],
8269
- "version": "0fa7a152"
8491
+ "version": "1a54d931"
8270
8492
  },
8271
8493
  "importPath": "@happyvertical/smrt-users"
8272
8494
  },
@@ -8296,8 +8518,14 @@
8296
8518
  "collectionOf": "@happyvertical/smrt-users:LegalMember",
8297
8519
  "schema": {
8298
8520
  "tableName": "legal_members",
8299
- "ddl": "CREATE TABLE IF NOT EXISTS \"legal_members\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_class_id\" UUID,\n \"kind\" TEXT,\n \"display_name\" TEXT,\n \"user_id\" UUID,\n \"profile_id\" UUID,\n \"external_party_ref\" TEXT,\n \"joined_on\" TEXT,\n \"left_on\" TEXT,\n \"status\" TEXT\n);",
8521
+ "ddl": "CREATE TABLE IF NOT EXISTS \"legal_members\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_class_id\" UUID,\n \"kind\" TEXT,\n \"display_name\" TEXT,\n \"user_id\" UUID,\n \"profile_id\" UUID,\n \"external_party_ref\" TEXT,\n \"joined_on\" TEXT,\n \"left_on\" TEXT,\n \"status\" TEXT\n);",
8300
8522
  "columns": {
8523
+ "_sync_origin_device_id": {
8524
+ "type": "TEXT"
8525
+ },
8526
+ "_sync_revision": {
8527
+ "type": "INTEGER"
8528
+ },
8301
8529
  "id": {
8302
8530
  "type": "UUID",
8303
8531
  "primaryKey": true,
@@ -8441,7 +8669,7 @@
8441
8669
  ]
8442
8670
  }
8443
8671
  ],
8444
- "version": "b05fd9f3"
8672
+ "version": "fb9611af"
8445
8673
  },
8446
8674
  "importPath": "@happyvertical/smrt-users"
8447
8675
  },
@@ -8471,8 +8699,14 @@
8471
8699
  "collectionOf": "@happyvertical/smrt-users:LegalMemberStatusHistory",
8472
8700
  "schema": {
8473
8701
  "tableName": "legal_member_status_history",
8474
- "ddl": "CREATE TABLE IF NOT EXISTS \"legal_member_status_history\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"status\" TEXT,\n \"effective_on\" TEXT,\n \"sequence\" INTEGER,\n \"reason\" TEXT,\n \"actor_ref\" TEXT\n);",
8702
+ "ddl": "CREATE TABLE IF NOT EXISTS \"legal_member_status_history\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"status\" TEXT,\n \"effective_on\" TEXT,\n \"sequence\" INTEGER,\n \"reason\" TEXT,\n \"actor_ref\" TEXT\n);",
8475
8703
  "columns": {
8704
+ "_sync_origin_device_id": {
8705
+ "type": "TEXT"
8706
+ },
8707
+ "_sync_revision": {
8708
+ "type": "INTEGER"
8709
+ },
8476
8710
  "id": {
8477
8711
  "type": "UUID",
8478
8712
  "primaryKey": true,
@@ -8574,7 +8808,7 @@
8574
8808
  ]
8575
8809
  }
8576
8810
  ],
8577
- "version": "3885f61f"
8811
+ "version": "2d85e6ff"
8578
8812
  },
8579
8813
  "importPath": "@happyvertical/smrt-users"
8580
8814
  },
@@ -8604,8 +8838,14 @@
8604
8838
  "collectionOf": "@happyvertical/smrt-users:LegalMemberReference",
8605
8839
  "schema": {
8606
8840
  "tableName": "legal_member_references",
8607
- "ddl": "CREATE TABLE IF NOT EXISTS \"legal_member_references\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"kind\" TEXT,\n \"source_type\" TEXT,\n \"source_id\" TEXT,\n \"authoritative\" BOOLEAN,\n \"effective_from\" TEXT,\n \"effective_to\" TEXT,\n \"revokes_id\" UUID\n);",
8841
+ "ddl": "CREATE TABLE IF NOT EXISTS \"legal_member_references\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"kind\" TEXT,\n \"source_type\" TEXT,\n \"source_id\" TEXT,\n \"authoritative\" BOOLEAN,\n \"effective_from\" TEXT,\n \"effective_to\" TEXT,\n \"revokes_id\" UUID\n);",
8608
8842
  "columns": {
8843
+ "_sync_origin_device_id": {
8844
+ "type": "TEXT"
8845
+ },
8846
+ "_sync_revision": {
8847
+ "type": "INTEGER"
8848
+ },
8609
8849
  "id": {
8610
8850
  "type": "UUID",
8611
8851
  "primaryKey": true,
@@ -8730,7 +8970,7 @@
8730
8970
  ]
8731
8971
  }
8732
8972
  ],
8733
- "version": "30237bd4"
8973
+ "version": "33b8009a"
8734
8974
  },
8735
8975
  "importPath": "@happyvertical/smrt-users"
8736
8976
  },
@@ -8760,8 +9000,14 @@
8760
9000
  "collectionOf": "@happyvertical/smrt-users:MemberOfficerAppointment",
8761
9001
  "schema": {
8762
9002
  "tableName": "member_officer_appointments",
8763
- "ddl": "CREATE TABLE IF NOT EXISTS \"member_officer_appointments\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"role\" TEXT,\n \"effective_from\" TEXT,\n \"effective_to\" TEXT,\n \"authority\" JSON\n);",
9003
+ "ddl": "CREATE TABLE IF NOT EXISTS \"member_officer_appointments\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"role\" TEXT,\n \"effective_from\" TEXT,\n \"effective_to\" TEXT,\n \"authority\" JSON\n);",
8764
9004
  "columns": {
9005
+ "_sync_origin_device_id": {
9006
+ "type": "TEXT"
9007
+ },
9008
+ "_sync_revision": {
9009
+ "type": "INTEGER"
9010
+ },
8765
9011
  "id": {
8766
9012
  "type": "UUID",
8767
9013
  "primaryKey": true,
@@ -8858,7 +9104,7 @@
8858
9104
  ]
8859
9105
  }
8860
9106
  ],
8861
- "version": "eed54759"
9107
+ "version": "5a60ad96"
8862
9108
  },
8863
9109
  "importPath": "@happyvertical/smrt-users"
8864
9110
  },
@@ -8888,8 +9134,14 @@
8888
9134
  "collectionOf": "@happyvertical/smrt-users:MemberEligibilitySnapshot",
8889
9135
  "schema": {
8890
9136
  "tableName": "member_eligibility_snapshots",
8891
- "ddl": "CREATE TABLE IF NOT EXISTS \"member_eligibility_snapshots\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"record_date\" TEXT,\n \"eligible\" BOOLEAN,\n \"reason\" TEXT,\n \"evidence\" JSON\n);",
9137
+ "ddl": "CREATE TABLE IF NOT EXISTS \"member_eligibility_snapshots\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"member_id\" UUID,\n \"record_date\" TEXT,\n \"eligible\" BOOLEAN,\n \"reason\" TEXT,\n \"evidence\" JSON\n);",
8892
9138
  "columns": {
9139
+ "_sync_origin_device_id": {
9140
+ "type": "TEXT"
9141
+ },
9142
+ "_sync_revision": {
9143
+ "type": "INTEGER"
9144
+ },
8893
9145
  "id": {
8894
9146
  "type": "UUID",
8895
9147
  "primaryKey": true,
@@ -8985,7 +9237,7 @@
8985
9237
  ]
8986
9238
  }
8987
9239
  ],
8988
- "version": "f3899c14"
9240
+ "version": "8a5a4773"
8989
9241
  },
8990
9242
  "importPath": "@happyvertical/smrt-users"
8991
9243
  },
@@ -9178,8 +9430,14 @@
9178
9430
  ],
9179
9431
  "schema": {
9180
9432
  "tableName": "access_requests",
9181
- "ddl": "CREATE TABLE IF NOT EXISTS \"access_requests\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"email\" TEXT NOT NULL DEFAULT '',\n \"name\" TEXT,\n \"status\" TEXT,\n \"source\" TEXT DEFAULT '',\n \"request_context\" TEXT DEFAULT '{}',\n \"note\" TEXT,\n \"requested_at\" TIMESTAMP,\n \"decided_at\" TIMESTAMP,\n \"decided_by\" TEXT,\n \"resulting_user_id\" TEXT,\n \"tenant_hint\" TEXT\n);",
9433
+ "ddl": "CREATE TABLE IF NOT EXISTS \"access_requests\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"email\" TEXT NOT NULL DEFAULT '',\n \"name\" TEXT,\n \"status\" TEXT,\n \"source\" TEXT DEFAULT '',\n \"request_context\" TEXT DEFAULT '{}',\n \"note\" TEXT,\n \"requested_at\" TIMESTAMP,\n \"decided_at\" TIMESTAMP,\n \"decided_by\" TEXT,\n \"resulting_user_id\" TEXT,\n \"tenant_hint\" TEXT\n);",
9182
9434
  "columns": {
9435
+ "_sync_origin_device_id": {
9436
+ "type": "TEXT"
9437
+ },
9438
+ "_sync_revision": {
9439
+ "type": "INTEGER"
9440
+ },
9183
9441
  "id": {
9184
9442
  "type": "UUID",
9185
9443
  "primaryKey": true,
@@ -9297,7 +9555,7 @@
9297
9555
  ]
9298
9556
  }
9299
9557
  ],
9300
- "version": "f396996f"
9558
+ "version": "ba226925"
9301
9559
  },
9302
9560
  "importPath": "@happyvertical/smrt-users"
9303
9561
  },
@@ -9365,8 +9623,14 @@
9365
9623
  ],
9366
9624
  "schema": {
9367
9625
  "tableName": "users_cli_auth_approve_limits",
9368
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_cli_auth_approve_limits\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL UNIQUE,\n \"attempt_count\" INTEGER NOT NULL DEFAULT 0,\n \"window_started_at\" TIMESTAMP NOT NULL\n);",
9626
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_cli_auth_approve_limits\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL UNIQUE,\n \"attempt_count\" INTEGER NOT NULL DEFAULT 0,\n \"window_started_at\" TIMESTAMP NOT NULL\n);",
9369
9627
  "columns": {
9628
+ "_sync_origin_device_id": {
9629
+ "type": "TEXT"
9630
+ },
9631
+ "_sync_revision": {
9632
+ "type": "INTEGER"
9633
+ },
9370
9634
  "id": {
9371
9635
  "type": "UUID",
9372
9636
  "primaryKey": true,
@@ -9432,7 +9696,7 @@
9432
9696
  ]
9433
9697
  }
9434
9698
  ],
9435
- "version": "c45c02de"
9699
+ "version": "b000ec40"
9436
9700
  },
9437
9701
  "importPath": "@happyvertical/smrt-users"
9438
9702
  },
@@ -9544,8 +9808,14 @@
9544
9808
  ],
9545
9809
  "schema": {
9546
9810
  "tableName": "users_cli_auth_requests",
9547
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_cli_auth_requests\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_code\" TEXT NOT NULL UNIQUE,\n \"device_code_hash\" TEXT NOT NULL UNIQUE,\n \"status\" TEXT,\n \"user_id\" UUID,\n \"tenant_id\" UUID,\n \"session_id\" UUID,\n \"expires_at\" TIMESTAMP,\n \"approved_at\" TIMESTAMP\n);",
9811
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_cli_auth_requests\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_code\" TEXT NOT NULL UNIQUE,\n \"device_code_hash\" TEXT NOT NULL UNIQUE,\n \"status\" TEXT,\n \"user_id\" UUID,\n \"tenant_id\" UUID,\n \"session_id\" UUID,\n \"expires_at\" TIMESTAMP,\n \"approved_at\" TIMESTAMP\n);",
9548
9812
  "columns": {
9813
+ "_sync_origin_device_id": {
9814
+ "type": "TEXT"
9815
+ },
9816
+ "_sync_revision": {
9817
+ "type": "INTEGER"
9818
+ },
9549
9819
  "id": {
9550
9820
  "type": "UUID",
9551
9821
  "primaryKey": true,
@@ -9669,7 +9939,7 @@
9669
9939
  ]
9670
9940
  }
9671
9941
  ],
9672
- "version": "713ae04c"
9942
+ "version": "a73e3a31"
9673
9943
  },
9674
9944
  "importPath": "@happyvertical/smrt-users"
9675
9945
  },
@@ -9740,8 +10010,14 @@
9740
10010
  ],
9741
10011
  "schema": {
9742
10012
  "tableName": "groups",
9743
- "ddl": "CREATE TABLE IF NOT EXISTS \"groups\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT ''\n);",
10013
+ "ddl": "CREATE TABLE IF NOT EXISTS \"groups\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT ''\n);",
9744
10014
  "columns": {
10015
+ "_sync_origin_device_id": {
10016
+ "type": "TEXT"
10017
+ },
10018
+ "_sync_revision": {
10019
+ "type": "INTEGER"
10020
+ },
9745
10021
  "id": {
9746
10022
  "type": "UUID",
9747
10023
  "primaryKey": true,
@@ -9809,7 +10085,7 @@
9809
10085
  ]
9810
10086
  }
9811
10087
  ],
9812
- "version": "1824c19b"
10088
+ "version": "99e0fcb4"
9813
10089
  },
9814
10090
  "importPath": "@happyvertical/smrt-users"
9815
10091
  },
@@ -9883,8 +10159,14 @@
9883
10159
  ],
9884
10160
  "schema": {
9885
10161
  "tableName": "group_members",
9886
- "ddl": "CREATE TABLE IF NOT EXISTS \"group_members\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"group_id\" UUID NOT NULL,\n \"user_id\" UUID NOT NULL\n);",
10162
+ "ddl": "CREATE TABLE IF NOT EXISTS \"group_members\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"group_id\" UUID NOT NULL,\n \"user_id\" UUID NOT NULL\n);",
9887
10163
  "columns": {
10164
+ "_sync_origin_device_id": {
10165
+ "type": "TEXT"
10166
+ },
10167
+ "_sync_revision": {
10168
+ "type": "INTEGER"
10169
+ },
9888
10170
  "id": {
9889
10171
  "type": "UUID",
9890
10172
  "primaryKey": true,
@@ -9964,7 +10246,7 @@
9964
10246
  ]
9965
10247
  }
9966
10248
  ],
9967
- "version": "ed4d1187"
10249
+ "version": "84ef2776"
9968
10250
  },
9969
10251
  "importPath": "@happyvertical/smrt-users"
9970
10252
  },
@@ -10032,8 +10314,14 @@
10032
10314
  ],
10033
10315
  "schema": {
10034
10316
  "tableName": "group_roles",
10035
- "ddl": "CREATE TABLE IF NOT EXISTS \"group_roles\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"group_id\" UUID NOT NULL,\n \"role_id\" UUID NOT NULL\n);",
10317
+ "ddl": "CREATE TABLE IF NOT EXISTS \"group_roles\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"group_id\" UUID NOT NULL,\n \"role_id\" UUID NOT NULL\n);",
10036
10318
  "columns": {
10319
+ "_sync_origin_device_id": {
10320
+ "type": "TEXT"
10321
+ },
10322
+ "_sync_revision": {
10323
+ "type": "INTEGER"
10324
+ },
10037
10325
  "id": {
10038
10326
  "type": "UUID",
10039
10327
  "primaryKey": true,
@@ -10112,7 +10400,7 @@
10112
10400
  ]
10113
10401
  }
10114
10402
  ],
10115
- "version": "b1e35f93"
10403
+ "version": "75d9841d"
10116
10404
  },
10117
10405
  "importPath": "@happyvertical/smrt-users"
10118
10406
  },
@@ -10238,8 +10526,14 @@
10238
10526
  ],
10239
10527
  "schema": {
10240
10528
  "tableName": "users_login_attempts",
10241
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_login_attempts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"limiter_key\" TEXT NOT NULL UNIQUE,\n \"scope\" TEXT NOT NULL,\n \"attempt_count\" INTEGER NOT NULL DEFAULT 0,\n \"window_started_at\" TIMESTAMP NOT NULL,\n \"failure_streak\" INTEGER NOT NULL DEFAULT 0,\n \"locked_until\" TIMESTAMP,\n \"last_failed_at\" TIMESTAMP,\n \"retain_until\" TIMESTAMP NOT NULL\n);",
10529
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_login_attempts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"limiter_key\" TEXT NOT NULL UNIQUE,\n \"scope\" TEXT NOT NULL,\n \"attempt_count\" INTEGER NOT NULL DEFAULT 0,\n \"window_started_at\" TIMESTAMP NOT NULL,\n \"failure_streak\" INTEGER NOT NULL DEFAULT 0,\n \"locked_until\" TIMESTAMP,\n \"last_failed_at\" TIMESTAMP,\n \"retain_until\" TIMESTAMP NOT NULL\n);",
10242
10530
  "columns": {
10531
+ "_sync_origin_device_id": {
10532
+ "type": "TEXT"
10533
+ },
10534
+ "_sync_revision": {
10535
+ "type": "INTEGER"
10536
+ },
10243
10537
  "id": {
10244
10538
  "type": "UUID",
10245
10539
  "primaryKey": true,
@@ -10336,7 +10630,7 @@
10336
10630
  ]
10337
10631
  }
10338
10632
  ],
10339
- "version": "89dfe336"
10633
+ "version": "23f377c9"
10340
10634
  },
10341
10635
  "importPath": "@happyvertical/smrt-users"
10342
10636
  },
@@ -10460,8 +10754,14 @@
10460
10754
  ],
10461
10755
  "schema": {
10462
10756
  "tableName": "users_login_audit_events",
10463
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_login_audit_events\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"kind\" TEXT NOT NULL,\n \"outcome\" TEXT NOT NULL,\n \"subject_key_hash\" TEXT,\n \"source_key_hash\" TEXT,\n \"retry_after_seconds\" INTEGER,\n \"occurred_at\" TIMESTAMP NOT NULL,\n \"metadata\" TEXT\n);",
10757
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_login_audit_events\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"kind\" TEXT NOT NULL,\n \"outcome\" TEXT NOT NULL,\n \"subject_key_hash\" TEXT,\n \"source_key_hash\" TEXT,\n \"retry_after_seconds\" INTEGER,\n \"occurred_at\" TIMESTAMP NOT NULL,\n \"metadata\" TEXT\n);",
10464
10758
  "columns": {
10759
+ "_sync_origin_device_id": {
10760
+ "type": "TEXT"
10761
+ },
10762
+ "_sync_revision": {
10763
+ "type": "INTEGER"
10764
+ },
10465
10765
  "id": {
10466
10766
  "type": "UUID",
10467
10767
  "primaryKey": true,
@@ -10557,7 +10857,7 @@
10557
10857
  ]
10558
10858
  }
10559
10859
  ],
10560
- "version": "485105a9"
10860
+ "version": "707a8055"
10561
10861
  },
10562
10862
  "importPath": "@happyvertical/smrt-users"
10563
10863
  },
@@ -10637,8 +10937,14 @@
10637
10937
  ],
10638
10938
  "schema": {
10639
10939
  "tableName": "users_magic_link_tokens",
10640
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_magic_link_tokens\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"nonce\" TEXT NOT NULL UNIQUE DEFAULT '',\n \"email\" TEXT DEFAULT '',\n \"used\" BOOLEAN DEFAULT FALSE,\n \"expires_at\" TIMESTAMP\n);",
10940
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_magic_link_tokens\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"nonce\" TEXT NOT NULL UNIQUE DEFAULT '',\n \"email\" TEXT DEFAULT '',\n \"used\" BOOLEAN DEFAULT FALSE,\n \"expires_at\" TIMESTAMP\n);",
10641
10941
  "columns": {
10942
+ "_sync_origin_device_id": {
10943
+ "type": "TEXT"
10944
+ },
10945
+ "_sync_revision": {
10946
+ "type": "INTEGER"
10947
+ },
10642
10948
  "id": {
10643
10949
  "type": "UUID",
10644
10950
  "primaryKey": true,
@@ -10710,7 +11016,7 @@
10710
11016
  ]
10711
11017
  }
10712
11018
  ],
10713
- "version": "537853d3"
11019
+ "version": "cfeb535f"
10714
11020
  },
10715
11021
  "importPath": "@happyvertical/smrt-users"
10716
11022
  },
@@ -10834,8 +11140,14 @@
10834
11140
  ],
10835
11141
  "schema": {
10836
11142
  "tableName": "memberships",
10837
- "ddl": "CREATE TABLE IF NOT EXISTS \"memberships\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL,\n \"tenant_id\" UUID NOT NULL,\n \"role_id\" UUID NOT NULL,\n \"status\" TEXT\n);",
11143
+ "ddl": "CREATE TABLE IF NOT EXISTS \"memberships\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL,\n \"tenant_id\" UUID NOT NULL,\n \"role_id\" UUID NOT NULL,\n \"status\" TEXT\n);",
10838
11144
  "columns": {
11145
+ "_sync_origin_device_id": {
11146
+ "type": "TEXT"
11147
+ },
11148
+ "_sync_revision": {
11149
+ "type": "INTEGER"
11150
+ },
10839
11151
  "id": {
10840
11152
  "type": "UUID",
10841
11153
  "primaryKey": true,
@@ -10939,7 +11251,7 @@
10939
11251
  ]
10940
11252
  }
10941
11253
  ],
10942
- "version": "ebfd11e0"
11254
+ "version": "de55caaf"
10943
11255
  },
10944
11256
  "importPath": "@happyvertical/smrt-users"
10945
11257
  },
@@ -11035,8 +11347,14 @@
11035
11347
  ],
11036
11348
  "schema": {
11037
11349
  "tableName": "membership_overrides",
11038
- "ddl": "CREATE TABLE IF NOT EXISTS \"membership_overrides\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"membership_id\" UUID NOT NULL,\n \"permission_id\" UUID NOT NULL,\n \"effect\" TEXT\n);",
11350
+ "ddl": "CREATE TABLE IF NOT EXISTS \"membership_overrides\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"membership_id\" UUID NOT NULL,\n \"permission_id\" UUID NOT NULL,\n \"effect\" TEXT\n);",
11039
11351
  "columns": {
11352
+ "_sync_origin_device_id": {
11353
+ "type": "TEXT"
11354
+ },
11355
+ "_sync_revision": {
11356
+ "type": "INTEGER"
11357
+ },
11040
11358
  "id": {
11041
11359
  "type": "UUID",
11042
11360
  "primaryKey": true,
@@ -11121,7 +11439,7 @@
11121
11439
  ]
11122
11440
  }
11123
11441
  ],
11124
- "version": "25fe9da8"
11442
+ "version": "e94d813f"
11125
11443
  },
11126
11444
  "importPath": "@happyvertical/smrt-users"
11127
11445
  },
@@ -11226,8 +11544,14 @@
11226
11544
  ],
11227
11545
  "schema": {
11228
11546
  "tableName": "users_oauth_clients",
11229
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_clients\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"client_id\" TEXT NOT NULL UNIQUE,\n \"redirect_uris\" TEXT,\n \"allowed_scopes\" TEXT,\n \"token_endpoint_auth_method\" TEXT DEFAULT 'none',\n \"secret_hash\" TEXT,\n \"allowed_resources\" TEXT\n);",
11547
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_clients\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"client_id\" TEXT NOT NULL UNIQUE,\n \"redirect_uris\" TEXT,\n \"allowed_scopes\" TEXT,\n \"token_endpoint_auth_method\" TEXT DEFAULT 'none',\n \"secret_hash\" TEXT,\n \"allowed_resources\" TEXT\n);",
11230
11548
  "columns": {
11549
+ "_sync_origin_device_id": {
11550
+ "type": "TEXT"
11551
+ },
11552
+ "_sync_revision": {
11553
+ "type": "INTEGER"
11554
+ },
11231
11555
  "id": {
11232
11556
  "type": "UUID",
11233
11557
  "primaryKey": true,
@@ -11301,7 +11625,7 @@
11301
11625
  ]
11302
11626
  }
11303
11627
  ],
11304
- "version": "0ecda18c"
11628
+ "version": "94ce5e54"
11305
11629
  },
11306
11630
  "importPath": "@happyvertical/smrt-users"
11307
11631
  },
@@ -11437,8 +11761,14 @@
11437
11761
  ],
11438
11762
  "schema": {
11439
11763
  "tableName": "users_oauth_authorization_codes",
11440
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_authorization_codes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"authorization_id\" TEXT,\n \"code_hash\" TEXT NOT NULL UNIQUE,\n \"client_id\" TEXT,\n \"subject\" TEXT,\n \"tenant_id\" TEXT,\n \"claims\" TEXT,\n \"redirect_uri\" TEXT,\n \"scopes\" TEXT,\n \"resource\" TEXT,\n \"code_challenge\" TEXT,\n \"expires_at\" TIMESTAMP,\n \"consumed_at\" TIMESTAMP\n);",
11764
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_authorization_codes\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"authorization_id\" TEXT,\n \"code_hash\" TEXT NOT NULL UNIQUE,\n \"client_id\" TEXT,\n \"subject\" TEXT,\n \"tenant_id\" TEXT,\n \"claims\" TEXT,\n \"redirect_uri\" TEXT,\n \"scopes\" TEXT,\n \"resource\" TEXT,\n \"code_challenge\" TEXT,\n \"expires_at\" TIMESTAMP,\n \"consumed_at\" TIMESTAMP\n);",
11441
11765
  "columns": {
11766
+ "_sync_origin_device_id": {
11767
+ "type": "TEXT"
11768
+ },
11769
+ "_sync_revision": {
11770
+ "type": "INTEGER"
11771
+ },
11442
11772
  "id": {
11443
11773
  "type": "UUID",
11444
11774
  "primaryKey": true,
@@ -11573,7 +11903,7 @@
11573
11903
  ]
11574
11904
  }
11575
11905
  ],
11576
- "version": "f5c5d615"
11906
+ "version": "1d19700b"
11577
11907
  },
11578
11908
  "importPath": "@happyvertical/smrt-users"
11579
11909
  },
@@ -11716,8 +12046,14 @@
11716
12046
  ],
11717
12047
  "schema": {
11718
12048
  "tableName": "users_oauth_refresh_grants",
11719
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_refresh_grants\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"authorization_id\" TEXT,\n \"token_hash\" TEXT NOT NULL UNIQUE,\n \"family_id\" TEXT,\n \"client_id\" TEXT,\n \"subject\" TEXT,\n \"tenant_id\" TEXT,\n \"claims\" TEXT,\n \"scopes\" TEXT,\n \"resource\" TEXT,\n \"expires_at\" TIMESTAMP,\n \"consumed_at\" TIMESTAMP,\n \"revoked_at\" TIMESTAMP\n);",
12049
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_refresh_grants\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"authorization_id\" TEXT,\n \"token_hash\" TEXT NOT NULL UNIQUE,\n \"family_id\" TEXT,\n \"client_id\" TEXT,\n \"subject\" TEXT,\n \"tenant_id\" TEXT,\n \"claims\" TEXT,\n \"scopes\" TEXT,\n \"resource\" TEXT,\n \"expires_at\" TIMESTAMP,\n \"consumed_at\" TIMESTAMP,\n \"revoked_at\" TIMESTAMP\n);",
11720
12050
  "columns": {
12051
+ "_sync_origin_device_id": {
12052
+ "type": "TEXT"
12053
+ },
12054
+ "_sync_revision": {
12055
+ "type": "INTEGER"
12056
+ },
11721
12057
  "id": {
11722
12058
  "type": "UUID",
11723
12059
  "primaryKey": true,
@@ -11864,7 +12200,7 @@
11864
12200
  ]
11865
12201
  }
11866
12202
  ],
11867
- "version": "d332998e"
12203
+ "version": "30b5c2be"
11868
12204
  },
11869
12205
  "importPath": "@happyvertical/smrt-users"
11870
12206
  },
@@ -11918,8 +12254,14 @@
11918
12254
  ],
11919
12255
  "schema": {
11920
12256
  "tableName": "users_oauth_access_token_revocations",
11921
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_access_token_revocations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"jti\" TEXT NOT NULL UNIQUE,\n \"expires_at\" TIMESTAMP\n);",
12257
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_access_token_revocations\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"jti\" TEXT NOT NULL UNIQUE,\n \"expires_at\" TIMESTAMP\n);",
11922
12258
  "columns": {
12259
+ "_sync_origin_device_id": {
12260
+ "type": "TEXT"
12261
+ },
12262
+ "_sync_revision": {
12263
+ "type": "INTEGER"
12264
+ },
11923
12265
  "id": {
11924
12266
  "type": "UUID",
11925
12267
  "primaryKey": true,
@@ -11978,7 +12320,7 @@
11978
12320
  ]
11979
12321
  }
11980
12322
  ],
11981
- "version": "79147089"
12323
+ "version": "1a4eab94"
11982
12324
  },
11983
12325
  "importPath": "@happyvertical/smrt-users"
11984
12326
  },
@@ -12082,8 +12424,14 @@
12082
12424
  "collectionExportName": "UsersOAuthAuthorizationCollection",
12083
12425
  "schema": {
12084
12426
  "tableName": "users_oauth_authorizations",
12085
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_authorizations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"subject\" TEXT,\n \"session_id\" TEXT,\n \"client_id\" TEXT,\n \"tenant_id\" TEXT,\n \"scopes\" TEXT,\n \"permission_ceiling\" TEXT,\n \"resource\" TEXT,\n \"revoked_at\" TIMESTAMP\n);",
12427
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_authorizations\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"subject\" TEXT,\n \"session_id\" TEXT,\n \"client_id\" TEXT,\n \"tenant_id\" TEXT,\n \"scopes\" TEXT,\n \"permission_ceiling\" TEXT,\n \"resource\" TEXT,\n \"revoked_at\" TIMESTAMP\n);",
12086
12428
  "columns": {
12429
+ "_sync_origin_device_id": {
12430
+ "type": "TEXT"
12431
+ },
12432
+ "_sync_revision": {
12433
+ "type": "INTEGER"
12434
+ },
12087
12435
  "id": {
12088
12436
  "type": "UUID",
12089
12437
  "primaryKey": true,
@@ -12180,7 +12528,7 @@
12180
12528
  ]
12181
12529
  }
12182
12530
  ],
12183
- "version": "291f8816"
12531
+ "version": "5015c6b8"
12184
12532
  },
12185
12533
  "importPath": "@happyvertical/smrt-users"
12186
12534
  },
@@ -12226,8 +12574,14 @@
12226
12574
  "collectionExportName": "UsersOAuthRefreshFamilyCollection",
12227
12575
  "schema": {
12228
12576
  "tableName": "users_oauth_refresh_families",
12229
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_refresh_families\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"authorization_id\" TEXT,\n \"revoked_at\" TIMESTAMP\n);",
12577
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_oauth_refresh_families\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"authorization_id\" TEXT,\n \"revoked_at\" TIMESTAMP\n);",
12230
12578
  "columns": {
12579
+ "_sync_origin_device_id": {
12580
+ "type": "TEXT"
12581
+ },
12582
+ "_sync_revision": {
12583
+ "type": "INTEGER"
12584
+ },
12231
12585
  "id": {
12232
12586
  "type": "UUID",
12233
12587
  "primaryKey": true,
@@ -12286,7 +12640,7 @@
12286
12640
  ]
12287
12641
  }
12288
12642
  ],
12289
- "version": "37392f31"
12643
+ "version": "23fbdf28"
12290
12644
  },
12291
12645
  "importPath": "@happyvertical/smrt-users"
12292
12646
  },
@@ -12356,8 +12710,14 @@
12356
12710
  ],
12357
12711
  "schema": {
12358
12712
  "tableName": "users_passkey_challenges",
12359
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_passkey_challenges\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"challenge_hash\" TEXT NOT NULL UNIQUE,\n \"purpose\" TEXT NOT NULL,\n \"expires_at\" TIMESTAMP NOT NULL\n);",
12713
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_passkey_challenges\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"challenge_hash\" TEXT NOT NULL UNIQUE,\n \"purpose\" TEXT NOT NULL,\n \"expires_at\" TIMESTAMP NOT NULL\n);",
12360
12714
  "columns": {
12715
+ "_sync_origin_device_id": {
12716
+ "type": "TEXT"
12717
+ },
12718
+ "_sync_revision": {
12719
+ "type": "INTEGER"
12720
+ },
12361
12721
  "id": {
12362
12722
  "type": "UUID",
12363
12723
  "primaryKey": true,
@@ -12421,7 +12781,7 @@
12421
12781
  ]
12422
12782
  }
12423
12783
  ],
12424
- "version": "895dcef7"
12784
+ "version": "b41ad578"
12425
12785
  },
12426
12786
  "importPath": "@happyvertical/smrt-users"
12427
12787
  },
@@ -12595,8 +12955,14 @@
12595
12955
  ],
12596
12956
  "schema": {
12597
12957
  "tableName": "users_passkey_credentials",
12598
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_passkey_credentials\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL,\n \"credential_id\" TEXT NOT NULL UNIQUE,\n \"public_key\" TEXT NOT NULL,\n \"sign_count\" INTEGER NOT NULL DEFAULT 0,\n \"transports\" TEXT,\n \"name\" TEXT NOT NULL,\n \"aaguid\" TEXT,\n \"backed_up\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"device_type\" TEXT,\n \"last_used_at\" TIMESTAMP,\n \"created_by\" TEXT\n);",
12958
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_passkey_credentials\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL,\n \"credential_id\" TEXT NOT NULL UNIQUE,\n \"public_key\" TEXT NOT NULL,\n \"sign_count\" INTEGER NOT NULL DEFAULT 0,\n \"transports\" TEXT,\n \"name\" TEXT NOT NULL,\n \"aaguid\" TEXT,\n \"backed_up\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"device_type\" TEXT,\n \"last_used_at\" TIMESTAMP,\n \"created_by\" TEXT\n);",
12599
12959
  "columns": {
12960
+ "_sync_origin_device_id": {
12961
+ "type": "TEXT"
12962
+ },
12963
+ "_sync_revision": {
12964
+ "type": "INTEGER"
12965
+ },
12600
12966
  "id": {
12601
12967
  "type": "UUID",
12602
12968
  "primaryKey": true,
@@ -12709,7 +13075,7 @@
12709
13075
  ]
12710
13076
  }
12711
13077
  ],
12712
- "version": "4483d2e2"
13078
+ "version": "ae2ccc46"
12713
13079
  },
12714
13080
  "importPath": "@happyvertical/smrt-users"
12715
13081
  },
@@ -12807,8 +13173,14 @@
12807
13173
  ],
12808
13174
  "schema": {
12809
13175
  "tableName": "users_password_credentials",
12810
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_password_credentials\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL UNIQUE,\n \"password_hash\" TEXT NOT NULL,\n \"version\" INTEGER NOT NULL DEFAULT 1,\n \"must_change\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"rotated_at\" TIMESTAMP,\n \"rotated_by\" TEXT\n);",
13176
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_password_credentials\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL UNIQUE,\n \"password_hash\" TEXT NOT NULL,\n \"version\" INTEGER NOT NULL DEFAULT 1,\n \"must_change\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"rotated_at\" TIMESTAMP,\n \"rotated_by\" TEXT\n);",
12811
13177
  "columns": {
13178
+ "_sync_origin_device_id": {
13179
+ "type": "TEXT"
13180
+ },
13181
+ "_sync_revision": {
13182
+ "type": "INTEGER"
13183
+ },
12812
13184
  "id": {
12813
13185
  "type": "UUID",
12814
13186
  "primaryKey": true,
@@ -12890,7 +13262,7 @@
12890
13262
  ]
12891
13263
  }
12892
13264
  ],
12893
- "version": "9a828f77"
13265
+ "version": "d2f942da"
12894
13266
  },
12895
13267
  "importPath": "@happyvertical/smrt-users"
12896
13268
  },
@@ -12991,8 +13363,14 @@
12991
13363
  "displayLabelField": "name",
12992
13364
  "schema": {
12993
13365
  "tableName": "permissions",
12994
- "ddl": "CREATE TABLE IF NOT EXISTS \"permissions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"category\" TEXT DEFAULT ''\n);",
13366
+ "ddl": "CREATE TABLE IF NOT EXISTS \"permissions\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"category\" TEXT DEFAULT ''\n);",
12995
13367
  "columns": {
13368
+ "_sync_origin_device_id": {
13369
+ "type": "TEXT"
13370
+ },
13371
+ "_sync_revision": {
13372
+ "type": "INTEGER"
13373
+ },
12996
13374
  "id": {
12997
13375
  "type": "UUID",
12998
13376
  "primaryKey": true,
@@ -13053,7 +13431,7 @@
13053
13431
  ]
13054
13432
  }
13055
13433
  ],
13056
- "version": "4c81b2af"
13434
+ "version": "cf1047b8"
13057
13435
  },
13058
13436
  "importPath": "@happyvertical/smrt-users"
13059
13437
  },
@@ -13151,8 +13529,14 @@
13151
13529
  ],
13152
13530
  "schema": {
13153
13531
  "tableName": "users_pin_credentials",
13154
- "ddl": "CREATE TABLE IF NOT EXISTS \"users_pin_credentials\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL UNIQUE,\n \"pin_hash\" TEXT NOT NULL,\n \"version\" INTEGER NOT NULL DEFAULT 1,\n \"must_reset\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"rotated_at\" TIMESTAMP,\n \"rotated_by\" TEXT\n);",
13532
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users_pin_credentials\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID NOT NULL UNIQUE,\n \"pin_hash\" TEXT NOT NULL,\n \"version\" INTEGER NOT NULL DEFAULT 1,\n \"must_reset\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"rotated_at\" TIMESTAMP,\n \"rotated_by\" TEXT\n);",
13155
13533
  "columns": {
13534
+ "_sync_origin_device_id": {
13535
+ "type": "TEXT"
13536
+ },
13537
+ "_sync_revision": {
13538
+ "type": "INTEGER"
13539
+ },
13156
13540
  "id": {
13157
13541
  "type": "UUID",
13158
13542
  "primaryKey": true,
@@ -13234,7 +13618,7 @@
13234
13618
  ]
13235
13619
  }
13236
13620
  ],
13237
- "version": "0e2fa003"
13621
+ "version": "e03f06b6"
13238
13622
  },
13239
13623
  "importPath": "@happyvertical/smrt-users"
13240
13624
  },
@@ -13383,8 +13767,14 @@
13383
13767
  ],
13384
13768
  "schema": {
13385
13769
  "tableName": "resource_grants",
13386
- "ddl": "CREATE TABLE IF NOT EXISTS \"resource_grants\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"user_id\" UUID NOT NULL,\n \"resource_type\" TEXT,\n \"resource_id\" TEXT,\n \"permission\" TEXT,\n \"effect\" TEXT,\n \"can_delegate\" BOOLEAN DEFAULT FALSE,\n \"parent_grant_id\" UUID,\n \"revoked_at\" TEXT\n);",
13770
+ "ddl": "CREATE TABLE IF NOT EXISTS \"resource_grants\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"user_id\" UUID NOT NULL,\n \"resource_type\" TEXT,\n \"resource_id\" TEXT,\n \"permission\" TEXT,\n \"effect\" TEXT,\n \"can_delegate\" BOOLEAN DEFAULT FALSE,\n \"parent_grant_id\" UUID,\n \"revoked_at\" TEXT\n);",
13387
13771
  "columns": {
13772
+ "_sync_origin_device_id": {
13773
+ "type": "TEXT"
13774
+ },
13775
+ "_sync_revision": {
13776
+ "type": "INTEGER"
13777
+ },
13388
13778
  "id": {
13389
13779
  "type": "UUID",
13390
13780
  "primaryKey": true,
@@ -13509,7 +13899,7 @@
13509
13899
  ]
13510
13900
  }
13511
13901
  ],
13512
- "version": "52e03776"
13902
+ "version": "712ca782"
13513
13903
  },
13514
13904
  "importPath": "@happyvertical/smrt-users"
13515
13905
  },
@@ -13632,8 +14022,14 @@
13632
14022
  "displayLabelField": "name",
13633
14023
  "schema": {
13634
14024
  "tableName": "roles",
13635
- "ddl": "CREATE TABLE IF NOT EXISTS \"roles\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"is_system\" BOOLEAN DEFAULT FALSE,\n \"inherits_to_descendants\" BOOLEAN DEFAULT FALSE\n);",
14025
+ "ddl": "CREATE TABLE IF NOT EXISTS \"roles\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"is_system\" BOOLEAN DEFAULT FALSE,\n \"inherits_to_descendants\" BOOLEAN DEFAULT FALSE\n);",
13636
14026
  "columns": {
14027
+ "_sync_origin_device_id": {
14028
+ "type": "TEXT"
14029
+ },
14030
+ "_sync_revision": {
14031
+ "type": "INTEGER"
14032
+ },
13637
14033
  "id": {
13638
14034
  "type": "UUID",
13639
14035
  "primaryKey": true,
@@ -13714,7 +14110,7 @@
13714
14110
  ]
13715
14111
  }
13716
14112
  ],
13717
- "version": "47369d9d"
14113
+ "version": "e1dc010f"
13718
14114
  },
13719
14115
  "importPath": "@happyvertical/smrt-users"
13720
14116
  },
@@ -13788,8 +14184,14 @@
13788
14184
  ],
13789
14185
  "schema": {
13790
14186
  "tableName": "role_permissions",
13791
- "ddl": "CREATE TABLE IF NOT EXISTS \"role_permissions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"role_id\" UUID NOT NULL,\n \"permission_id\" UUID NOT NULL\n);",
14187
+ "ddl": "CREATE TABLE IF NOT EXISTS \"role_permissions\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"role_id\" UUID NOT NULL,\n \"permission_id\" UUID NOT NULL\n);",
13792
14188
  "columns": {
14189
+ "_sync_origin_device_id": {
14190
+ "type": "TEXT"
14191
+ },
14192
+ "_sync_revision": {
14193
+ "type": "INTEGER"
14194
+ },
13793
14195
  "id": {
13794
14196
  "type": "UUID",
13795
14197
  "primaryKey": true,
@@ -13869,7 +14271,7 @@
13869
14271
  ]
13870
14272
  }
13871
14273
  ],
13872
- "version": "4dfed3ac"
14274
+ "version": "5e31df57"
13873
14275
  },
13874
14276
  "importPath": "@happyvertical/smrt-users"
13875
14277
  },
@@ -14179,8 +14581,14 @@
14179
14581
  "collectionExportName": "SessionCollection",
14180
14582
  "schema": {
14181
14583
  "tableName": "sessions",
14182
- "ddl": "CREATE TABLE IF NOT EXISTS \"sessions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID,\n \"tenant_id\" UUID,\n \"status\" TEXT,\n \"expires_at\" TIMESTAMP,\n \"user_agent\" TEXT DEFAULT '',\n \"ip_address\" TEXT DEFAULT '',\n \"last_accessed_at\" TIMESTAMP,\n \"data\" JSON DEFAULT '{}',\n \"auth_method\" TEXT,\n \"parent_session_id\" UUID\n);",
14584
+ "ddl": "CREATE TABLE IF NOT EXISTS \"sessions\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"user_id\" UUID,\n \"tenant_id\" UUID,\n \"status\" TEXT,\n \"expires_at\" TIMESTAMP,\n \"user_agent\" TEXT DEFAULT '',\n \"ip_address\" TEXT DEFAULT '',\n \"last_accessed_at\" TIMESTAMP,\n \"data\" JSON DEFAULT '{}',\n \"auth_method\" TEXT,\n \"parent_session_id\" UUID\n);",
14183
14585
  "columns": {
14586
+ "_sync_origin_device_id": {
14587
+ "type": "TEXT"
14588
+ },
14589
+ "_sync_revision": {
14590
+ "type": "INTEGER"
14591
+ },
14184
14592
  "id": {
14185
14593
  "type": "UUID",
14186
14594
  "primaryKey": true,
@@ -14310,7 +14718,7 @@
14310
14718
  ]
14311
14719
  }
14312
14720
  ],
14313
- "version": "b4260a0f"
14721
+ "version": "862e7f51"
14314
14722
  },
14315
14723
  "importPath": "@happyvertical/smrt-users"
14316
14724
  },
@@ -14466,8 +14874,14 @@
14466
14874
  "displayLabelField": "name",
14467
14875
  "schema": {
14468
14876
  "tableName": "tenants",
14469
- "ddl": "CREATE TABLE IF NOT EXISTS \"tenants\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"name\" TEXT DEFAULT '',\n \"status\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"parent_tenant_id\" UUID,\n \"hierarchy_level\" INTEGER DEFAULT 0,\n \"hierarchy_path\" TEXT DEFAULT '',\n \"cascade_permissions\" BOOLEAN DEFAULT TRUE,\n \"inherit_permissions\" BOOLEAN DEFAULT TRUE\n);",
14877
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tenants\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"name\" TEXT DEFAULT '',\n \"status\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"parent_tenant_id\" UUID,\n \"hierarchy_level\" INTEGER DEFAULT 0,\n \"hierarchy_path\" TEXT DEFAULT '',\n \"cascade_permissions\" BOOLEAN DEFAULT TRUE,\n \"inherit_permissions\" BOOLEAN DEFAULT TRUE\n);",
14470
14878
  "columns": {
14879
+ "_sync_origin_device_id": {
14880
+ "type": "TEXT"
14881
+ },
14882
+ "_sync_revision": {
14883
+ "type": "INTEGER"
14884
+ },
14471
14885
  "id": {
14472
14886
  "type": "UUID",
14473
14887
  "primaryKey": true,
@@ -14576,7 +14990,7 @@
14576
14990
  ]
14577
14991
  }
14578
14992
  ],
14579
- "version": "934f7025"
14993
+ "version": "7a37a7d7"
14580
14994
  },
14581
14995
  "importPath": "@happyvertical/smrt-users"
14582
14996
  },
@@ -14803,8 +15217,14 @@
14803
15217
  "validationRules": [],
14804
15218
  "schema": {
14805
15219
  "tableName": "tenant_integrations",
14806
- "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_integrations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"provider\" TEXT DEFAULT 'aws',\n \"external_ids\" TEXT,\n \"status\" TEXT DEFAULT 'unprovisioned',\n \"last_checked_at\" TIMESTAMP,\n \"last_check_summary\" TEXT,\n \"last_error\" TEXT\n);",
15220
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_integrations\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"provider\" TEXT DEFAULT 'aws',\n \"external_ids\" TEXT,\n \"status\" TEXT DEFAULT 'unprovisioned',\n \"last_checked_at\" TIMESTAMP,\n \"last_check_summary\" TEXT,\n \"last_error\" TEXT\n);",
14807
15221
  "columns": {
15222
+ "_sync_origin_device_id": {
15223
+ "type": "TEXT"
15224
+ },
15225
+ "_sync_revision": {
15226
+ "type": "INTEGER"
15227
+ },
14808
15228
  "id": {
14809
15229
  "type": "UUID",
14810
15230
  "primaryKey": true,
@@ -14894,7 +15314,7 @@
14894
15314
  ]
14895
15315
  }
14896
15316
  ],
14897
- "version": "3ed31966"
15317
+ "version": "b45fbe92"
14898
15318
  },
14899
15319
  "importPath": "@happyvertical/smrt-users"
14900
15320
  },
@@ -15006,8 +15426,14 @@
15006
15426
  ],
15007
15427
  "schema": {
15008
15428
  "tableName": "tenant_permission_overrides",
15009
- "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_permission_overrides\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"permission_id\" UUID NOT NULL,\n \"effect\" TEXT\n);",
15429
+ "ddl": "CREATE TABLE IF NOT EXISTS \"tenant_permission_overrides\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"permission_id\" UUID NOT NULL,\n \"effect\" TEXT\n);",
15010
15430
  "columns": {
15431
+ "_sync_origin_device_id": {
15432
+ "type": "TEXT"
15433
+ },
15434
+ "_sync_revision": {
15435
+ "type": "INTEGER"
15436
+ },
15011
15437
  "id": {
15012
15438
  "type": "UUID",
15013
15439
  "primaryKey": true,
@@ -15092,7 +15518,7 @@
15092
15518
  ]
15093
15519
  }
15094
15520
  ],
15095
- "version": "95b78bdd"
15521
+ "version": "f2453713"
15096
15522
  },
15097
15523
  "importPath": "@happyvertical/smrt-users"
15098
15524
  },
@@ -15257,8 +15683,14 @@
15257
15683
  "collectionExportName": "UserCollection",
15258
15684
  "schema": {
15259
15685
  "tableName": "users",
15260
- "ddl": "CREATE TABLE IF NOT EXISTS \"users\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"profile_id\" UUID UNIQUE,\n \"email\" TEXT DEFAULT '',\n \"email_key\" TEXT UNIQUE,\n \"username\" TEXT,\n \"username_key\" TEXT UNIQUE,\n \"status\" TEXT,\n \"last_login_at\" TIMESTAMP\n);",
15686
+ "ddl": "CREATE TABLE IF NOT EXISTS \"users\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"profile_id\" UUID UNIQUE,\n \"email\" TEXT DEFAULT '',\n \"email_key\" TEXT UNIQUE,\n \"username\" TEXT,\n \"username_key\" TEXT UNIQUE,\n \"status\" TEXT,\n \"last_login_at\" TIMESTAMP\n);",
15261
15687
  "columns": {
15688
+ "_sync_origin_device_id": {
15689
+ "type": "TEXT"
15690
+ },
15691
+ "_sync_revision": {
15692
+ "type": "INTEGER"
15693
+ },
15262
15694
  "id": {
15263
15695
  "type": "UUID",
15264
15696
  "primaryKey": true,
@@ -15350,7 +15782,7 @@
15350
15782
  ]
15351
15783
  }
15352
15784
  ],
15353
- "version": "3ee8f0f4"
15785
+ "version": "a57edfbd"
15354
15786
  },
15355
15787
  "importPath": "@happyvertical/smrt-users"
15356
15788
  }