@happyvertical/smrt-users 0.55.18 → 0.55.19
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.
- package/README.md +47 -0
- package/agents/oauth-authorization.md +124 -0
- package/agents/retention.md +18 -0
- package/dist/chunks/{TerminalAuthService-DjGsRtqb.js → TerminalAuthService-DWPeKl3k.js} +2 -2
- package/dist/chunks/TerminalAuthService-DWPeKl3k.js.map +1 -0
- package/dist/collections/OAuthAuthorizationCollection.d.ts +31 -0
- package/dist/collections/OAuthAuthorizationCollection.d.ts.map +1 -0
- package/dist/collections/index.d.ts +1 -0
- package/dist/collections/index.d.ts.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +832 -33
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +4590 -2529
- package/dist/models/OAuthAuthorization.d.ts +70 -0
- package/dist/models/OAuthAuthorization.d.ts.map +1 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/retention.d.ts +3 -1
- package/dist/retention.d.ts.map +1 -1
- package/dist/services/OAuthAuthorizationService.d.ts +52 -0
- package/dist/services/OAuthAuthorizationService.d.ts.map +1 -0
- package/dist/services/OAuthAuthorizationStorage.d.ts +39 -0
- package/dist/services/OAuthAuthorizationStorage.d.ts.map +1 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/oauth-retention.d.ts +14 -0
- package/dist/services/oauth-retention.d.ts.map +1 -0
- package/dist/services/oauth-transaction.d.ts +4 -0
- package/dist/services/oauth-transaction.d.ts.map +1 -0
- package/dist/smrt-knowledge.json +925 -48
- package/dist/sveltekit/index.d.ts +1 -0
- package/dist/sveltekit/index.d.ts.map +1 -1
- package/dist/sveltekit/oauth-handlers.d.ts +25 -0
- package/dist/sveltekit/oauth-handlers.d.ts.map +1 -0
- package/dist/sveltekit.js +93 -25
- package/dist/sveltekit.js.map +1 -1
- package/package.json +13 -12
- package/dist/chunks/TerminalAuthService-DjGsRtqb.js.map +0 -1
package/dist/smrt-knowledge.json
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/smrt-users",
|
|
6
|
-
"packageVersion": "0.55.
|
|
6
|
+
"packageVersion": "0.55.19",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "76d9496f05f791bfd683b74ce6e73943c80c812aefb14bb9db66ce7d321386af",
|
|
11
|
+
"packageJson": "ea75194d38a17533bbdab1fdbdaa5b251b913168d1ece5f982fb35717b2b1373",
|
|
12
12
|
"agents": "eb74cdf8186c27e8721515cff653c688567284015ce9845a9b7714ac898620bc",
|
|
13
13
|
"moduleDoc:agents/permissions.md": "832a684513d831d3cb9bd8d0c73295d756ca7cf9bc32de1ca3254691160371b1",
|
|
14
14
|
"moduleDoc:agents/oidc-provisioning.md": "b73f3fdaf61136720132a614c7e14237b7bd35f7bf5d43eabb29f565485803b9",
|
|
15
15
|
"moduleDoc:agents/mobile-auth.md": "25e85e83f43e3a46383a92fa809f3a003b4545c3026e78dbe1bccbbc35161e18",
|
|
16
16
|
"moduleDoc:agents/terminal-auth-testing.md": "8a84c16a19e381427aed81d3b1882344c427fe22a70e87f5ac2db836b1a6822d",
|
|
17
|
-
"moduleDoc:agents/retention.md": "
|
|
17
|
+
"moduleDoc:agents/retention.md": "99fb97718347e06ae3d886718aec5ec1ae8cb2d312b8ac79de2609821d230a35"
|
|
18
18
|
},
|
|
19
19
|
"exports": [
|
|
20
20
|
".",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"./sveltekit"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
+
"@happyvertical/auth": "catalog:",
|
|
29
30
|
"@happyvertical/logger": "catalog:",
|
|
30
31
|
"@happyvertical/smrt-config": "workspace:*",
|
|
31
32
|
"@happyvertical/smrt-core": "workspace:*",
|
|
@@ -1650,6 +1651,302 @@
|
|
|
1650
1651
|
"tags": [],
|
|
1651
1652
|
"risks": []
|
|
1652
1653
|
},
|
|
1654
|
+
{
|
|
1655
|
+
"name": "UsersOAuthClientCollection",
|
|
1656
|
+
"qualifiedName": "@happyvertical/smrt-users:UsersOAuthClientCollection",
|
|
1657
|
+
"collection": "usersoauthclients",
|
|
1658
|
+
"tableName": "users_oauth_clients",
|
|
1659
|
+
"packageName": "@happyvertical/smrt-users",
|
|
1660
|
+
"extends": "SmrtCollection",
|
|
1661
|
+
"fields": [],
|
|
1662
|
+
"relationships": [],
|
|
1663
|
+
"methods": [
|
|
1664
|
+
"findByClientId"
|
|
1665
|
+
],
|
|
1666
|
+
"methodSignatures": [
|
|
1667
|
+
{
|
|
1668
|
+
"name": "findByClientId",
|
|
1669
|
+
"params": [
|
|
1670
|
+
"clientId: string"
|
|
1671
|
+
],
|
|
1672
|
+
"returns": "Promise<UsersOAuthClient | null>"
|
|
1673
|
+
}
|
|
1674
|
+
],
|
|
1675
|
+
"surfaces": [
|
|
1676
|
+
{
|
|
1677
|
+
"kind": "api",
|
|
1678
|
+
"name": "usersoauthclients.findByClientId",
|
|
1679
|
+
"operation": "findByClientId",
|
|
1680
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthClientCollection",
|
|
1681
|
+
"path": "/usersoauthclients/findByClientId",
|
|
1682
|
+
"method": "POST"
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
"kind": "mcp",
|
|
1686
|
+
"name": "usersoauthclientcollection_findbyclientid",
|
|
1687
|
+
"operation": "findByClientId",
|
|
1688
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthClientCollection"
|
|
1689
|
+
}
|
|
1690
|
+
],
|
|
1691
|
+
"relationshipFeatures": [
|
|
1692
|
+
"uuidColumns"
|
|
1693
|
+
],
|
|
1694
|
+
"tags": [],
|
|
1695
|
+
"risks": []
|
|
1696
|
+
},
|
|
1697
|
+
{
|
|
1698
|
+
"name": "UsersOAuthAuthorizationCodeCollection",
|
|
1699
|
+
"qualifiedName": "@happyvertical/smrt-users:UsersOAuthAuthorizationCodeCollection",
|
|
1700
|
+
"collection": "usersoauthauthorizationcodes",
|
|
1701
|
+
"tableName": "users_oauth_authorization_codes",
|
|
1702
|
+
"packageName": "@happyvertical/smrt-users",
|
|
1703
|
+
"extends": "SmrtCollection",
|
|
1704
|
+
"fields": [],
|
|
1705
|
+
"relationships": [],
|
|
1706
|
+
"methods": [
|
|
1707
|
+
"consume"
|
|
1708
|
+
],
|
|
1709
|
+
"methodSignatures": [
|
|
1710
|
+
{
|
|
1711
|
+
"name": "consume",
|
|
1712
|
+
"async": true,
|
|
1713
|
+
"params": [
|
|
1714
|
+
"id: string",
|
|
1715
|
+
"codeHash: string",
|
|
1716
|
+
"clientId: string",
|
|
1717
|
+
"redirectUri: string",
|
|
1718
|
+
"resource: string | null",
|
|
1719
|
+
"now: Date"
|
|
1720
|
+
],
|
|
1721
|
+
"returns": "Promise<boolean>"
|
|
1722
|
+
}
|
|
1723
|
+
],
|
|
1724
|
+
"surfaces": [
|
|
1725
|
+
{
|
|
1726
|
+
"kind": "api",
|
|
1727
|
+
"name": "usersoauthauthorizationcodes.consume",
|
|
1728
|
+
"operation": "consume",
|
|
1729
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthAuthorizationCodeCollection",
|
|
1730
|
+
"path": "/usersoauthauthorizationcodes/consume",
|
|
1731
|
+
"method": "POST"
|
|
1732
|
+
},
|
|
1733
|
+
{
|
|
1734
|
+
"kind": "mcp",
|
|
1735
|
+
"name": "usersoauthauthorizationcodecollection_consume",
|
|
1736
|
+
"operation": "consume",
|
|
1737
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthAuthorizationCodeCollection"
|
|
1738
|
+
}
|
|
1739
|
+
],
|
|
1740
|
+
"relationshipFeatures": [
|
|
1741
|
+
"uuidColumns"
|
|
1742
|
+
],
|
|
1743
|
+
"tags": [],
|
|
1744
|
+
"risks": []
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
"name": "UsersOAuthRefreshGrantCollection",
|
|
1748
|
+
"qualifiedName": "@happyvertical/smrt-users:UsersOAuthRefreshGrantCollection",
|
|
1749
|
+
"collection": "usersoauthrefreshgrants",
|
|
1750
|
+
"tableName": "users_oauth_refresh_grants",
|
|
1751
|
+
"packageName": "@happyvertical/smrt-users",
|
|
1752
|
+
"extends": "SmrtCollection",
|
|
1753
|
+
"fields": [],
|
|
1754
|
+
"relationships": [],
|
|
1755
|
+
"methods": [
|
|
1756
|
+
"consume",
|
|
1757
|
+
"revokeFamily"
|
|
1758
|
+
],
|
|
1759
|
+
"methodSignatures": [
|
|
1760
|
+
{
|
|
1761
|
+
"name": "consume",
|
|
1762
|
+
"async": true,
|
|
1763
|
+
"params": [
|
|
1764
|
+
"id: string",
|
|
1765
|
+
"tokenHash: string",
|
|
1766
|
+
"clientId: string",
|
|
1767
|
+
"resource: string | null",
|
|
1768
|
+
"now: Date"
|
|
1769
|
+
],
|
|
1770
|
+
"returns": "Promise<boolean>"
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
"name": "revokeFamily",
|
|
1774
|
+
"async": true,
|
|
1775
|
+
"params": [
|
|
1776
|
+
"familyId: string",
|
|
1777
|
+
"now: Date"
|
|
1778
|
+
],
|
|
1779
|
+
"returns": "Promise<void>"
|
|
1780
|
+
}
|
|
1781
|
+
],
|
|
1782
|
+
"surfaces": [
|
|
1783
|
+
{
|
|
1784
|
+
"kind": "api",
|
|
1785
|
+
"name": "usersoauthrefreshgrants.consume",
|
|
1786
|
+
"operation": "consume",
|
|
1787
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshGrantCollection",
|
|
1788
|
+
"path": "/usersoauthrefreshgrants/consume",
|
|
1789
|
+
"method": "POST"
|
|
1790
|
+
},
|
|
1791
|
+
{
|
|
1792
|
+
"kind": "api",
|
|
1793
|
+
"name": "usersoauthrefreshgrants.revokeFamily",
|
|
1794
|
+
"operation": "revokeFamily",
|
|
1795
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshGrantCollection",
|
|
1796
|
+
"path": "/usersoauthrefreshgrants/revokeFamily",
|
|
1797
|
+
"method": "POST"
|
|
1798
|
+
},
|
|
1799
|
+
{
|
|
1800
|
+
"kind": "mcp",
|
|
1801
|
+
"name": "usersoauthrefreshgrantcollection_consume",
|
|
1802
|
+
"operation": "consume",
|
|
1803
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshGrantCollection"
|
|
1804
|
+
},
|
|
1805
|
+
{
|
|
1806
|
+
"kind": "mcp",
|
|
1807
|
+
"name": "usersoauthrefreshgrantcollection_revokefamily",
|
|
1808
|
+
"operation": "revokeFamily",
|
|
1809
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshGrantCollection"
|
|
1810
|
+
}
|
|
1811
|
+
],
|
|
1812
|
+
"relationshipFeatures": [
|
|
1813
|
+
"uuidColumns"
|
|
1814
|
+
],
|
|
1815
|
+
"tags": [],
|
|
1816
|
+
"risks": []
|
|
1817
|
+
},
|
|
1818
|
+
{
|
|
1819
|
+
"name": "UsersOAuthAccessTokenRevocationCollection",
|
|
1820
|
+
"qualifiedName": "@happyvertical/smrt-users:UsersOAuthAccessTokenRevocationCollection",
|
|
1821
|
+
"collection": "usersoauthaccesstokenrevocations",
|
|
1822
|
+
"tableName": "users_oauth_access_token_revocations",
|
|
1823
|
+
"packageName": "@happyvertical/smrt-users",
|
|
1824
|
+
"extends": "SmrtCollection",
|
|
1825
|
+
"fields": [],
|
|
1826
|
+
"relationships": [],
|
|
1827
|
+
"methods": [
|
|
1828
|
+
"findByJti"
|
|
1829
|
+
],
|
|
1830
|
+
"methodSignatures": [
|
|
1831
|
+
{
|
|
1832
|
+
"name": "findByJti",
|
|
1833
|
+
"async": true,
|
|
1834
|
+
"params": [
|
|
1835
|
+
"jti: string"
|
|
1836
|
+
],
|
|
1837
|
+
"returns": "Promise<UsersOAuthAccessTokenRevocation | null>"
|
|
1838
|
+
}
|
|
1839
|
+
],
|
|
1840
|
+
"surfaces": [
|
|
1841
|
+
{
|
|
1842
|
+
"kind": "api",
|
|
1843
|
+
"name": "usersoauthaccesstokenrevocations.findByJti",
|
|
1844
|
+
"operation": "findByJti",
|
|
1845
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthAccessTokenRevocationCollection",
|
|
1846
|
+
"path": "/usersoauthaccesstokenrevocations/findByJti",
|
|
1847
|
+
"method": "POST"
|
|
1848
|
+
},
|
|
1849
|
+
{
|
|
1850
|
+
"kind": "mcp",
|
|
1851
|
+
"name": "usersoauthaccesstokenrevocationcollection_findbyjti",
|
|
1852
|
+
"operation": "findByJti",
|
|
1853
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthAccessTokenRevocationCollection"
|
|
1854
|
+
}
|
|
1855
|
+
],
|
|
1856
|
+
"relationshipFeatures": [
|
|
1857
|
+
"uuidColumns"
|
|
1858
|
+
],
|
|
1859
|
+
"tags": [],
|
|
1860
|
+
"risks": []
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
"name": "UsersOAuthAuthorizationCollection",
|
|
1864
|
+
"qualifiedName": "@happyvertical/smrt-users:UsersOAuthAuthorizationCollection",
|
|
1865
|
+
"collection": "usersoauthauthorizations",
|
|
1866
|
+
"description": "Consent storage is intentionally inaccessible through generated surfaces.",
|
|
1867
|
+
"tableName": "users_oauth_authorizations",
|
|
1868
|
+
"packageName": "@happyvertical/smrt-users",
|
|
1869
|
+
"extends": "SmrtCollection",
|
|
1870
|
+
"fields": [],
|
|
1871
|
+
"relationships": [],
|
|
1872
|
+
"methods": [],
|
|
1873
|
+
"surfaces": [],
|
|
1874
|
+
"relationshipFeatures": [
|
|
1875
|
+
"uuidColumns"
|
|
1876
|
+
],
|
|
1877
|
+
"tags": [],
|
|
1878
|
+
"risks": []
|
|
1879
|
+
},
|
|
1880
|
+
{
|
|
1881
|
+
"name": "UsersOAuthRefreshFamilyCollection",
|
|
1882
|
+
"qualifiedName": "@happyvertical/smrt-users:UsersOAuthRefreshFamilyCollection",
|
|
1883
|
+
"collection": "usersoauthrefreshfamilies",
|
|
1884
|
+
"description": "Family rows exist for the entire lifetime of every descendant refresh token.",
|
|
1885
|
+
"tableName": "users_oauth_refresh_families",
|
|
1886
|
+
"packageName": "@happyvertical/smrt-users",
|
|
1887
|
+
"extends": "SmrtCollection",
|
|
1888
|
+
"fields": [],
|
|
1889
|
+
"relationships": [],
|
|
1890
|
+
"methods": [
|
|
1891
|
+
"lock",
|
|
1892
|
+
"revoke"
|
|
1893
|
+
],
|
|
1894
|
+
"methodSignatures": [
|
|
1895
|
+
{
|
|
1896
|
+
"name": "lock",
|
|
1897
|
+
"async": true,
|
|
1898
|
+
"params": [
|
|
1899
|
+
"id: string",
|
|
1900
|
+
"now: Date"
|
|
1901
|
+
],
|
|
1902
|
+
"returns": "Promise<boolean>"
|
|
1903
|
+
},
|
|
1904
|
+
{
|
|
1905
|
+
"name": "revoke",
|
|
1906
|
+
"async": true,
|
|
1907
|
+
"params": [
|
|
1908
|
+
"id: string",
|
|
1909
|
+
"now: Date"
|
|
1910
|
+
],
|
|
1911
|
+
"returns": "Promise<void>"
|
|
1912
|
+
}
|
|
1913
|
+
],
|
|
1914
|
+
"surfaces": [
|
|
1915
|
+
{
|
|
1916
|
+
"kind": "api",
|
|
1917
|
+
"name": "usersoauthrefreshfamilies.lock",
|
|
1918
|
+
"operation": "lock",
|
|
1919
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshFamilyCollection",
|
|
1920
|
+
"path": "/usersoauthrefreshfamilies/lock",
|
|
1921
|
+
"method": "POST"
|
|
1922
|
+
},
|
|
1923
|
+
{
|
|
1924
|
+
"kind": "api",
|
|
1925
|
+
"name": "usersoauthrefreshfamilies.revoke",
|
|
1926
|
+
"operation": "revoke",
|
|
1927
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshFamilyCollection",
|
|
1928
|
+
"path": "/usersoauthrefreshfamilies/revoke",
|
|
1929
|
+
"method": "POST"
|
|
1930
|
+
},
|
|
1931
|
+
{
|
|
1932
|
+
"kind": "mcp",
|
|
1933
|
+
"name": "usersoauthrefreshfamilycollection_lock",
|
|
1934
|
+
"operation": "lock",
|
|
1935
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshFamilyCollection"
|
|
1936
|
+
},
|
|
1937
|
+
{
|
|
1938
|
+
"kind": "mcp",
|
|
1939
|
+
"name": "usersoauthrefreshfamilycollection_revoke",
|
|
1940
|
+
"operation": "revoke",
|
|
1941
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshFamilyCollection"
|
|
1942
|
+
}
|
|
1943
|
+
],
|
|
1944
|
+
"relationshipFeatures": [
|
|
1945
|
+
"uuidColumns"
|
|
1946
|
+
],
|
|
1947
|
+
"tags": [],
|
|
1948
|
+
"risks": []
|
|
1949
|
+
},
|
|
1653
1950
|
{
|
|
1654
1951
|
"name": "UsersPasswordCredentialCollection",
|
|
1655
1952
|
"qualifiedName": "@happyvertical/smrt-users:UsersPasswordCredentialCollection",
|
|
@@ -5381,71 +5678,553 @@
|
|
|
5381
5678
|
"risks": []
|
|
5382
5679
|
},
|
|
5383
5680
|
{
|
|
5384
|
-
"name": "
|
|
5385
|
-
"qualifiedName": "@happyvertical/smrt-users:
|
|
5386
|
-
"collection": "
|
|
5387
|
-
"tableName": "
|
|
5681
|
+
"name": "UsersOAuthClient",
|
|
5682
|
+
"qualifiedName": "@happyvertical/smrt-users:UsersOAuthClient",
|
|
5683
|
+
"collection": "usersoauthclients",
|
|
5684
|
+
"tableName": "users_oauth_clients",
|
|
5388
5685
|
"packageName": "@happyvertical/smrt-users",
|
|
5389
5686
|
"extends": "SmrtObject",
|
|
5390
5687
|
"fields": [
|
|
5391
5688
|
{
|
|
5392
|
-
"name": "
|
|
5393
|
-
"type": "
|
|
5689
|
+
"name": "clientId",
|
|
5690
|
+
"type": "text",
|
|
5394
5691
|
"required": true,
|
|
5395
|
-
"
|
|
5396
|
-
"columnType": "UUID"
|
|
5692
|
+
"columnType": "TEXT"
|
|
5397
5693
|
},
|
|
5398
5694
|
{
|
|
5399
|
-
"name": "
|
|
5400
|
-
"type": "
|
|
5401
|
-
"required":
|
|
5402
|
-
"columnType": "
|
|
5403
|
-
"default": 1
|
|
5695
|
+
"name": "redirectUris",
|
|
5696
|
+
"type": "text",
|
|
5697
|
+
"required": false,
|
|
5698
|
+
"columnType": "TEXT"
|
|
5404
5699
|
},
|
|
5405
5700
|
{
|
|
5406
|
-
"name": "
|
|
5407
|
-
"type": "
|
|
5408
|
-
"required":
|
|
5409
|
-
"columnType": "
|
|
5410
|
-
"default": false
|
|
5701
|
+
"name": "allowedScopes",
|
|
5702
|
+
"type": "text",
|
|
5703
|
+
"required": false,
|
|
5704
|
+
"columnType": "TEXT"
|
|
5411
5705
|
},
|
|
5412
5706
|
{
|
|
5413
|
-
"name": "
|
|
5414
|
-
"type": "
|
|
5707
|
+
"name": "tokenEndpointAuthMethod",
|
|
5708
|
+
"type": "text",
|
|
5415
5709
|
"required": false,
|
|
5416
|
-
"columnType": "
|
|
5710
|
+
"columnType": "TEXT",
|
|
5711
|
+
"default": "none"
|
|
5417
5712
|
},
|
|
5418
5713
|
{
|
|
5419
|
-
"name": "
|
|
5714
|
+
"name": "allowedResources",
|
|
5420
5715
|
"type": "text",
|
|
5421
5716
|
"required": false,
|
|
5422
5717
|
"columnType": "TEXT"
|
|
5718
|
+
},
|
|
5719
|
+
{
|
|
5720
|
+
"name": "createdAt",
|
|
5721
|
+
"type": "datetime",
|
|
5722
|
+
"required": false,
|
|
5723
|
+
"columnType": "TIMESTAMP"
|
|
5423
5724
|
}
|
|
5424
5725
|
],
|
|
5425
|
-
"relationships": [
|
|
5726
|
+
"relationships": [],
|
|
5727
|
+
"methods": [
|
|
5728
|
+
"getAllowedResources",
|
|
5729
|
+
"getAllowedScopes",
|
|
5730
|
+
"getRedirectUris"
|
|
5731
|
+
],
|
|
5732
|
+
"methodSignatures": [
|
|
5426
5733
|
{
|
|
5427
|
-
"name": "
|
|
5428
|
-
"
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
"
|
|
5734
|
+
"name": "getAllowedResources",
|
|
5735
|
+
"returns": "string[] | undefined"
|
|
5736
|
+
},
|
|
5737
|
+
{
|
|
5738
|
+
"name": "getAllowedScopes",
|
|
5739
|
+
"returns": "string[]"
|
|
5740
|
+
},
|
|
5741
|
+
{
|
|
5742
|
+
"name": "getRedirectUris",
|
|
5743
|
+
"returns": "string[]"
|
|
5432
5744
|
}
|
|
5433
5745
|
],
|
|
5434
|
-
"methods": [],
|
|
5435
5746
|
"surfaces": [],
|
|
5436
|
-
"
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5747
|
+
"withheldSurfaces": [
|
|
5748
|
+
{
|
|
5749
|
+
"kind": "api",
|
|
5750
|
+
"operation": "getAllowedResources",
|
|
5751
|
+
"code": "not-included",
|
|
5752
|
+
"reason": "not listed in api.include",
|
|
5753
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthClient"
|
|
5754
|
+
},
|
|
5755
|
+
{
|
|
5756
|
+
"kind": "api",
|
|
5757
|
+
"operation": "getAllowedScopes",
|
|
5758
|
+
"code": "not-included",
|
|
5759
|
+
"reason": "not listed in api.include",
|
|
5760
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthClient"
|
|
5761
|
+
},
|
|
5762
|
+
{
|
|
5763
|
+
"kind": "api",
|
|
5764
|
+
"operation": "getRedirectUris",
|
|
5765
|
+
"code": "not-included",
|
|
5766
|
+
"reason": "not listed in api.include",
|
|
5767
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthClient"
|
|
5768
|
+
}
|
|
5769
|
+
],
|
|
5770
|
+
"relationshipFeatures": [
|
|
5771
|
+
"uuidColumns"
|
|
5772
|
+
],
|
|
5773
|
+
"tags": [],
|
|
5774
|
+
"risks": []
|
|
5775
|
+
},
|
|
5776
|
+
{
|
|
5777
|
+
"name": "UsersOAuthAuthorizationCode",
|
|
5778
|
+
"qualifiedName": "@happyvertical/smrt-users:UsersOAuthAuthorizationCode",
|
|
5779
|
+
"collection": "usersoauthauthorizationcodes",
|
|
5780
|
+
"tableName": "users_oauth_authorization_codes",
|
|
5781
|
+
"packageName": "@happyvertical/smrt-users",
|
|
5782
|
+
"extends": "SmrtObject",
|
|
5783
|
+
"fields": [
|
|
5784
|
+
{
|
|
5785
|
+
"name": "authorizationId",
|
|
5786
|
+
"type": "text",
|
|
5787
|
+
"required": false,
|
|
5788
|
+
"columnType": "TEXT"
|
|
5789
|
+
},
|
|
5790
|
+
{
|
|
5791
|
+
"name": "clientId",
|
|
5792
|
+
"type": "text",
|
|
5793
|
+
"required": false,
|
|
5794
|
+
"columnType": "TEXT"
|
|
5795
|
+
},
|
|
5796
|
+
{
|
|
5797
|
+
"name": "subject",
|
|
5798
|
+
"type": "text",
|
|
5799
|
+
"required": false,
|
|
5800
|
+
"columnType": "TEXT"
|
|
5801
|
+
},
|
|
5802
|
+
{
|
|
5803
|
+
"name": "tenantId",
|
|
5804
|
+
"type": "text",
|
|
5805
|
+
"required": false,
|
|
5806
|
+
"columnType": "TEXT"
|
|
5807
|
+
},
|
|
5808
|
+
{
|
|
5809
|
+
"name": "claims",
|
|
5810
|
+
"type": "text",
|
|
5811
|
+
"required": false,
|
|
5812
|
+
"columnType": "TEXT"
|
|
5813
|
+
},
|
|
5814
|
+
{
|
|
5815
|
+
"name": "redirectUri",
|
|
5816
|
+
"type": "text",
|
|
5817
|
+
"required": false,
|
|
5818
|
+
"columnType": "TEXT"
|
|
5819
|
+
},
|
|
5820
|
+
{
|
|
5821
|
+
"name": "scopes",
|
|
5822
|
+
"type": "text",
|
|
5823
|
+
"required": false,
|
|
5824
|
+
"columnType": "TEXT"
|
|
5825
|
+
},
|
|
5826
|
+
{
|
|
5827
|
+
"name": "resource",
|
|
5828
|
+
"type": "text",
|
|
5829
|
+
"required": false,
|
|
5830
|
+
"columnType": "TEXT"
|
|
5831
|
+
},
|
|
5832
|
+
{
|
|
5833
|
+
"name": "codeChallenge",
|
|
5834
|
+
"type": "text",
|
|
5835
|
+
"required": false,
|
|
5836
|
+
"columnType": "TEXT"
|
|
5837
|
+
},
|
|
5838
|
+
{
|
|
5839
|
+
"name": "expiresAt",
|
|
5840
|
+
"type": "datetime",
|
|
5841
|
+
"required": false,
|
|
5842
|
+
"columnType": "TIMESTAMP"
|
|
5843
|
+
},
|
|
5844
|
+
{
|
|
5845
|
+
"name": "consumedAt",
|
|
5846
|
+
"type": "datetime",
|
|
5847
|
+
"required": false,
|
|
5848
|
+
"columnType": "TIMESTAMP"
|
|
5849
|
+
}
|
|
5850
|
+
],
|
|
5851
|
+
"relationships": [],
|
|
5852
|
+
"methods": [
|
|
5853
|
+
"getClaims",
|
|
5854
|
+
"getScopes"
|
|
5855
|
+
],
|
|
5856
|
+
"methodSignatures": [
|
|
5857
|
+
{
|
|
5858
|
+
"name": "getClaims",
|
|
5859
|
+
"returns": "OAuthTokenClaims"
|
|
5860
|
+
},
|
|
5861
|
+
{
|
|
5862
|
+
"name": "getScopes",
|
|
5863
|
+
"returns": "string[]"
|
|
5864
|
+
}
|
|
5865
|
+
],
|
|
5866
|
+
"conflictColumns": [
|
|
5867
|
+
"tenant_id",
|
|
5868
|
+
"slug",
|
|
5869
|
+
"context"
|
|
5870
|
+
],
|
|
5871
|
+
"surfaces": [],
|
|
5872
|
+
"withheldSurfaces": [
|
|
5873
|
+
{
|
|
5874
|
+
"kind": "api",
|
|
5875
|
+
"operation": "getClaims",
|
|
5876
|
+
"code": "not-included",
|
|
5877
|
+
"reason": "not listed in api.include",
|
|
5878
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthAuthorizationCode"
|
|
5879
|
+
},
|
|
5880
|
+
{
|
|
5881
|
+
"kind": "api",
|
|
5882
|
+
"operation": "getScopes",
|
|
5883
|
+
"code": "not-included",
|
|
5884
|
+
"reason": "not listed in api.include",
|
|
5885
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthAuthorizationCode"
|
|
5886
|
+
}
|
|
5887
|
+
],
|
|
5888
|
+
"relationshipFeatures": [
|
|
5889
|
+
"uuidColumns"
|
|
5890
|
+
],
|
|
5891
|
+
"tags": [],
|
|
5892
|
+
"risks": []
|
|
5893
|
+
},
|
|
5894
|
+
{
|
|
5895
|
+
"name": "UsersOAuthRefreshGrant",
|
|
5896
|
+
"qualifiedName": "@happyvertical/smrt-users:UsersOAuthRefreshGrant",
|
|
5897
|
+
"collection": "usersoauthrefreshgrants",
|
|
5898
|
+
"tableName": "users_oauth_refresh_grants",
|
|
5899
|
+
"packageName": "@happyvertical/smrt-users",
|
|
5900
|
+
"extends": "SmrtObject",
|
|
5901
|
+
"fields": [
|
|
5902
|
+
{
|
|
5903
|
+
"name": "authorizationId",
|
|
5904
|
+
"type": "text",
|
|
5905
|
+
"required": false,
|
|
5906
|
+
"columnType": "TEXT"
|
|
5907
|
+
},
|
|
5908
|
+
{
|
|
5909
|
+
"name": "familyId",
|
|
5910
|
+
"type": "text",
|
|
5911
|
+
"required": false,
|
|
5912
|
+
"columnType": "TEXT"
|
|
5913
|
+
},
|
|
5914
|
+
{
|
|
5915
|
+
"name": "clientId",
|
|
5916
|
+
"type": "text",
|
|
5917
|
+
"required": false,
|
|
5918
|
+
"columnType": "TEXT"
|
|
5919
|
+
},
|
|
5920
|
+
{
|
|
5921
|
+
"name": "subject",
|
|
5922
|
+
"type": "text",
|
|
5923
|
+
"required": false,
|
|
5924
|
+
"columnType": "TEXT"
|
|
5925
|
+
},
|
|
5926
|
+
{
|
|
5927
|
+
"name": "tenantId",
|
|
5928
|
+
"type": "text",
|
|
5929
|
+
"required": false,
|
|
5930
|
+
"columnType": "TEXT"
|
|
5931
|
+
},
|
|
5932
|
+
{
|
|
5933
|
+
"name": "claims",
|
|
5934
|
+
"type": "text",
|
|
5935
|
+
"required": false,
|
|
5936
|
+
"columnType": "TEXT"
|
|
5937
|
+
},
|
|
5938
|
+
{
|
|
5939
|
+
"name": "scopes",
|
|
5940
|
+
"type": "text",
|
|
5941
|
+
"required": false,
|
|
5942
|
+
"columnType": "TEXT"
|
|
5943
|
+
},
|
|
5944
|
+
{
|
|
5945
|
+
"name": "resource",
|
|
5946
|
+
"type": "text",
|
|
5947
|
+
"required": false,
|
|
5948
|
+
"columnType": "TEXT"
|
|
5949
|
+
},
|
|
5950
|
+
{
|
|
5951
|
+
"name": "expiresAt",
|
|
5952
|
+
"type": "datetime",
|
|
5953
|
+
"required": false,
|
|
5954
|
+
"columnType": "TIMESTAMP"
|
|
5955
|
+
},
|
|
5956
|
+
{
|
|
5957
|
+
"name": "consumedAt",
|
|
5958
|
+
"type": "datetime",
|
|
5959
|
+
"required": false,
|
|
5960
|
+
"columnType": "TIMESTAMP"
|
|
5961
|
+
},
|
|
5962
|
+
{
|
|
5963
|
+
"name": "revokedAt",
|
|
5964
|
+
"type": "datetime",
|
|
5965
|
+
"required": false,
|
|
5966
|
+
"columnType": "TIMESTAMP"
|
|
5967
|
+
}
|
|
5968
|
+
],
|
|
5969
|
+
"relationships": [],
|
|
5970
|
+
"methods": [
|
|
5971
|
+
"getClaims",
|
|
5972
|
+
"getScopes"
|
|
5973
|
+
],
|
|
5974
|
+
"methodSignatures": [
|
|
5975
|
+
{
|
|
5976
|
+
"name": "getClaims",
|
|
5977
|
+
"returns": "OAuthTokenClaims"
|
|
5978
|
+
},
|
|
5979
|
+
{
|
|
5980
|
+
"name": "getScopes",
|
|
5981
|
+
"returns": "string[]"
|
|
5982
|
+
}
|
|
5983
|
+
],
|
|
5984
|
+
"conflictColumns": [
|
|
5985
|
+
"tenant_id",
|
|
5986
|
+
"slug",
|
|
5987
|
+
"context"
|
|
5988
|
+
],
|
|
5989
|
+
"surfaces": [],
|
|
5990
|
+
"withheldSurfaces": [
|
|
5991
|
+
{
|
|
5992
|
+
"kind": "api",
|
|
5993
|
+
"operation": "getClaims",
|
|
5994
|
+
"code": "not-included",
|
|
5995
|
+
"reason": "not listed in api.include",
|
|
5996
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshGrant"
|
|
5997
|
+
},
|
|
5998
|
+
{
|
|
5999
|
+
"kind": "api",
|
|
6000
|
+
"operation": "getScopes",
|
|
6001
|
+
"code": "not-included",
|
|
6002
|
+
"reason": "not listed in api.include",
|
|
6003
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshGrant"
|
|
6004
|
+
}
|
|
6005
|
+
],
|
|
6006
|
+
"relationshipFeatures": [
|
|
6007
|
+
"uuidColumns"
|
|
6008
|
+
],
|
|
6009
|
+
"tags": [],
|
|
6010
|
+
"risks": []
|
|
6011
|
+
},
|
|
6012
|
+
{
|
|
6013
|
+
"name": "UsersOAuthAccessTokenRevocation",
|
|
6014
|
+
"qualifiedName": "@happyvertical/smrt-users:UsersOAuthAccessTokenRevocation",
|
|
6015
|
+
"collection": "usersoauthaccesstokenrevocations",
|
|
6016
|
+
"tableName": "users_oauth_access_token_revocations",
|
|
6017
|
+
"packageName": "@happyvertical/smrt-users",
|
|
6018
|
+
"extends": "SmrtObject",
|
|
6019
|
+
"fields": [
|
|
6020
|
+
{
|
|
6021
|
+
"name": "expiresAt",
|
|
6022
|
+
"type": "datetime",
|
|
6023
|
+
"required": false,
|
|
6024
|
+
"columnType": "TIMESTAMP"
|
|
6025
|
+
}
|
|
6026
|
+
],
|
|
6027
|
+
"relationships": [],
|
|
6028
|
+
"methods": [],
|
|
6029
|
+
"surfaces": [],
|
|
6030
|
+
"relationshipFeatures": [
|
|
6031
|
+
"uuidColumns"
|
|
6032
|
+
],
|
|
6033
|
+
"tags": [],
|
|
6034
|
+
"risks": []
|
|
6035
|
+
},
|
|
6036
|
+
{
|
|
6037
|
+
"name": "UsersOAuthAuthorization",
|
|
6038
|
+
"qualifiedName": "@happyvertical/smrt-users:UsersOAuthAuthorization",
|
|
6039
|
+
"collection": "usersoauthauthorizations",
|
|
6040
|
+
"description": "A consent decision bound to a server-side session; never exposes its bearer.",
|
|
6041
|
+
"tableName": "users_oauth_authorizations",
|
|
6042
|
+
"packageName": "@happyvertical/smrt-users",
|
|
6043
|
+
"extends": "SmrtObject",
|
|
6044
|
+
"fields": [
|
|
6045
|
+
{
|
|
6046
|
+
"name": "subject",
|
|
6047
|
+
"type": "text",
|
|
6048
|
+
"required": false,
|
|
6049
|
+
"columnType": "TEXT"
|
|
6050
|
+
},
|
|
6051
|
+
{
|
|
6052
|
+
"name": "clientId",
|
|
6053
|
+
"type": "text",
|
|
6054
|
+
"required": false,
|
|
6055
|
+
"columnType": "TEXT"
|
|
6056
|
+
},
|
|
6057
|
+
{
|
|
6058
|
+
"name": "tenantId",
|
|
6059
|
+
"type": "text",
|
|
6060
|
+
"required": false,
|
|
6061
|
+
"columnType": "TEXT"
|
|
6062
|
+
},
|
|
6063
|
+
{
|
|
6064
|
+
"name": "scopes",
|
|
6065
|
+
"type": "text",
|
|
6066
|
+
"required": false,
|
|
6067
|
+
"columnType": "TEXT"
|
|
6068
|
+
},
|
|
6069
|
+
{
|
|
6070
|
+
"name": "permissionCeiling",
|
|
6071
|
+
"type": "text",
|
|
6072
|
+
"required": false,
|
|
6073
|
+
"columnType": "TEXT"
|
|
6074
|
+
},
|
|
6075
|
+
{
|
|
6076
|
+
"name": "resource",
|
|
6077
|
+
"type": "text",
|
|
6078
|
+
"required": false,
|
|
6079
|
+
"columnType": "TEXT"
|
|
6080
|
+
},
|
|
6081
|
+
{
|
|
6082
|
+
"name": "revokedAt",
|
|
6083
|
+
"type": "datetime",
|
|
6084
|
+
"required": false,
|
|
6085
|
+
"columnType": "TIMESTAMP"
|
|
6086
|
+
}
|
|
6087
|
+
],
|
|
6088
|
+
"relationships": [],
|
|
6089
|
+
"methods": [
|
|
6090
|
+
"getPermissionCeiling",
|
|
6091
|
+
"getScopes"
|
|
6092
|
+
],
|
|
6093
|
+
"methodSignatures": [
|
|
6094
|
+
{
|
|
6095
|
+
"name": "getPermissionCeiling",
|
|
6096
|
+
"returns": "string[]"
|
|
6097
|
+
},
|
|
6098
|
+
{
|
|
6099
|
+
"name": "getScopes",
|
|
6100
|
+
"returns": "string[]"
|
|
6101
|
+
}
|
|
6102
|
+
],
|
|
6103
|
+
"conflictColumns": [
|
|
6104
|
+
"tenant_id",
|
|
6105
|
+
"slug",
|
|
6106
|
+
"context"
|
|
6107
|
+
],
|
|
6108
|
+
"surfaces": [],
|
|
6109
|
+
"withheldSurfaces": [
|
|
6110
|
+
{
|
|
6111
|
+
"kind": "api",
|
|
6112
|
+
"operation": "getPermissionCeiling",
|
|
6113
|
+
"code": "not-included",
|
|
6114
|
+
"reason": "not listed in api.include",
|
|
6115
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthAuthorization"
|
|
6116
|
+
},
|
|
6117
|
+
{
|
|
6118
|
+
"kind": "api",
|
|
6119
|
+
"operation": "getScopes",
|
|
6120
|
+
"code": "not-included",
|
|
6121
|
+
"reason": "not listed in api.include",
|
|
6122
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthAuthorization"
|
|
6123
|
+
}
|
|
6124
|
+
],
|
|
6125
|
+
"relationshipFeatures": [
|
|
6126
|
+
"uuidColumns"
|
|
6127
|
+
],
|
|
6128
|
+
"tags": [],
|
|
6129
|
+
"risks": []
|
|
6130
|
+
},
|
|
6131
|
+
{
|
|
6132
|
+
"name": "UsersOAuthRefreshFamily",
|
|
6133
|
+
"qualifiedName": "@happyvertical/smrt-users:UsersOAuthRefreshFamily",
|
|
6134
|
+
"collection": "usersoauthrefreshfamilies",
|
|
6135
|
+
"description": "Stable lock row: rotation and revocation always serialize on this family.",
|
|
6136
|
+
"tableName": "users_oauth_refresh_families",
|
|
6137
|
+
"packageName": "@happyvertical/smrt-users",
|
|
6138
|
+
"extends": "SmrtObject",
|
|
6139
|
+
"fields": [
|
|
6140
|
+
{
|
|
6141
|
+
"name": "authorizationId",
|
|
6142
|
+
"type": "text",
|
|
6143
|
+
"required": false,
|
|
6144
|
+
"columnType": "TEXT"
|
|
6145
|
+
},
|
|
6146
|
+
{
|
|
6147
|
+
"name": "revokedAt",
|
|
6148
|
+
"type": "datetime",
|
|
6149
|
+
"required": false,
|
|
6150
|
+
"columnType": "TIMESTAMP"
|
|
6151
|
+
}
|
|
6152
|
+
],
|
|
6153
|
+
"relationships": [],
|
|
6154
|
+
"methods": [],
|
|
6155
|
+
"surfaces": [],
|
|
6156
|
+
"relationshipFeatures": [
|
|
6157
|
+
"uuidColumns"
|
|
6158
|
+
],
|
|
6159
|
+
"tags": [],
|
|
6160
|
+
"risks": []
|
|
6161
|
+
},
|
|
6162
|
+
{
|
|
6163
|
+
"name": "UsersPasswordCredential",
|
|
6164
|
+
"qualifiedName": "@happyvertical/smrt-users:UsersPasswordCredential",
|
|
6165
|
+
"collection": "userspasswordcredentials",
|
|
6166
|
+
"tableName": "users_password_credentials",
|
|
6167
|
+
"packageName": "@happyvertical/smrt-users",
|
|
6168
|
+
"extends": "SmrtObject",
|
|
6169
|
+
"fields": [
|
|
6170
|
+
{
|
|
6171
|
+
"name": "userId",
|
|
6172
|
+
"type": "foreignKey",
|
|
6173
|
+
"required": true,
|
|
6174
|
+
"related": "User",
|
|
6175
|
+
"columnType": "UUID"
|
|
6176
|
+
},
|
|
6177
|
+
{
|
|
6178
|
+
"name": "version",
|
|
6179
|
+
"type": "integer",
|
|
6180
|
+
"required": true,
|
|
6181
|
+
"columnType": "INTEGER",
|
|
6182
|
+
"default": 1
|
|
6183
|
+
},
|
|
6184
|
+
{
|
|
6185
|
+
"name": "mustChange",
|
|
6186
|
+
"type": "boolean",
|
|
6187
|
+
"required": true,
|
|
6188
|
+
"columnType": "BOOLEAN",
|
|
6189
|
+
"default": false
|
|
6190
|
+
},
|
|
6191
|
+
{
|
|
6192
|
+
"name": "rotatedAt",
|
|
6193
|
+
"type": "datetime",
|
|
6194
|
+
"required": false,
|
|
6195
|
+
"columnType": "TIMESTAMP"
|
|
6196
|
+
},
|
|
6197
|
+
{
|
|
6198
|
+
"name": "rotatedBy",
|
|
6199
|
+
"type": "text",
|
|
6200
|
+
"required": false,
|
|
6201
|
+
"columnType": "TEXT"
|
|
6202
|
+
}
|
|
6203
|
+
],
|
|
6204
|
+
"relationships": [
|
|
6205
|
+
{
|
|
6206
|
+
"name": "userId",
|
|
6207
|
+
"type": "foreignKey",
|
|
6208
|
+
"required": true,
|
|
6209
|
+
"related": "User",
|
|
6210
|
+
"columnType": "UUID"
|
|
6211
|
+
}
|
|
6212
|
+
],
|
|
6213
|
+
"methods": [],
|
|
6214
|
+
"surfaces": [],
|
|
6215
|
+
"relationshipFeatures": [
|
|
6216
|
+
"foreignKey",
|
|
6217
|
+
"uuidColumns"
|
|
6218
|
+
],
|
|
6219
|
+
"tags": [],
|
|
6220
|
+
"risks": []
|
|
6221
|
+
},
|
|
6222
|
+
{
|
|
6223
|
+
"name": "Permission",
|
|
6224
|
+
"qualifiedName": "@happyvertical/smrt-users:Permission",
|
|
6225
|
+
"displayLabelField": "name",
|
|
6226
|
+
"collection": "permissions",
|
|
6227
|
+
"description": "Permission represents a named capability in the system.",
|
|
5449
6228
|
"tableName": "permissions",
|
|
5450
6229
|
"packageName": "@happyvertical/smrt-users",
|
|
5451
6230
|
"extends": "SmrtObject",
|
|
@@ -7968,6 +8747,104 @@
|
|
|
7968
8747
|
"operation": "denyPermission",
|
|
7969
8748
|
"objectName": "@happyvertical/smrt-users:MembershipOverrideCollection"
|
|
7970
8749
|
},
|
|
8750
|
+
{
|
|
8751
|
+
"kind": "api",
|
|
8752
|
+
"name": "usersoauthclients.findByClientId",
|
|
8753
|
+
"operation": "findByClientId",
|
|
8754
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthClientCollection",
|
|
8755
|
+
"path": "/usersoauthclients/findByClientId",
|
|
8756
|
+
"method": "POST"
|
|
8757
|
+
},
|
|
8758
|
+
{
|
|
8759
|
+
"kind": "mcp",
|
|
8760
|
+
"name": "usersoauthclientcollection_findbyclientid",
|
|
8761
|
+
"operation": "findByClientId",
|
|
8762
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthClientCollection"
|
|
8763
|
+
},
|
|
8764
|
+
{
|
|
8765
|
+
"kind": "api",
|
|
8766
|
+
"name": "usersoauthauthorizationcodes.consume",
|
|
8767
|
+
"operation": "consume",
|
|
8768
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthAuthorizationCodeCollection",
|
|
8769
|
+
"path": "/usersoauthauthorizationcodes/consume",
|
|
8770
|
+
"method": "POST"
|
|
8771
|
+
},
|
|
8772
|
+
{
|
|
8773
|
+
"kind": "mcp",
|
|
8774
|
+
"name": "usersoauthauthorizationcodecollection_consume",
|
|
8775
|
+
"operation": "consume",
|
|
8776
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthAuthorizationCodeCollection"
|
|
8777
|
+
},
|
|
8778
|
+
{
|
|
8779
|
+
"kind": "api",
|
|
8780
|
+
"name": "usersoauthrefreshgrants.consume",
|
|
8781
|
+
"operation": "consume",
|
|
8782
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshGrantCollection",
|
|
8783
|
+
"path": "/usersoauthrefreshgrants/consume",
|
|
8784
|
+
"method": "POST"
|
|
8785
|
+
},
|
|
8786
|
+
{
|
|
8787
|
+
"kind": "api",
|
|
8788
|
+
"name": "usersoauthrefreshgrants.revokeFamily",
|
|
8789
|
+
"operation": "revokeFamily",
|
|
8790
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshGrantCollection",
|
|
8791
|
+
"path": "/usersoauthrefreshgrants/revokeFamily",
|
|
8792
|
+
"method": "POST"
|
|
8793
|
+
},
|
|
8794
|
+
{
|
|
8795
|
+
"kind": "mcp",
|
|
8796
|
+
"name": "usersoauthrefreshgrantcollection_consume",
|
|
8797
|
+
"operation": "consume",
|
|
8798
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshGrantCollection"
|
|
8799
|
+
},
|
|
8800
|
+
{
|
|
8801
|
+
"kind": "mcp",
|
|
8802
|
+
"name": "usersoauthrefreshgrantcollection_revokefamily",
|
|
8803
|
+
"operation": "revokeFamily",
|
|
8804
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshGrantCollection"
|
|
8805
|
+
},
|
|
8806
|
+
{
|
|
8807
|
+
"kind": "api",
|
|
8808
|
+
"name": "usersoauthaccesstokenrevocations.findByJti",
|
|
8809
|
+
"operation": "findByJti",
|
|
8810
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthAccessTokenRevocationCollection",
|
|
8811
|
+
"path": "/usersoauthaccesstokenrevocations/findByJti",
|
|
8812
|
+
"method": "POST"
|
|
8813
|
+
},
|
|
8814
|
+
{
|
|
8815
|
+
"kind": "mcp",
|
|
8816
|
+
"name": "usersoauthaccesstokenrevocationcollection_findbyjti",
|
|
8817
|
+
"operation": "findByJti",
|
|
8818
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthAccessTokenRevocationCollection"
|
|
8819
|
+
},
|
|
8820
|
+
{
|
|
8821
|
+
"kind": "api",
|
|
8822
|
+
"name": "usersoauthrefreshfamilies.lock",
|
|
8823
|
+
"operation": "lock",
|
|
8824
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshFamilyCollection",
|
|
8825
|
+
"path": "/usersoauthrefreshfamilies/lock",
|
|
8826
|
+
"method": "POST"
|
|
8827
|
+
},
|
|
8828
|
+
{
|
|
8829
|
+
"kind": "api",
|
|
8830
|
+
"name": "usersoauthrefreshfamilies.revoke",
|
|
8831
|
+
"operation": "revoke",
|
|
8832
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshFamilyCollection",
|
|
8833
|
+
"path": "/usersoauthrefreshfamilies/revoke",
|
|
8834
|
+
"method": "POST"
|
|
8835
|
+
},
|
|
8836
|
+
{
|
|
8837
|
+
"kind": "mcp",
|
|
8838
|
+
"name": "usersoauthrefreshfamilycollection_lock",
|
|
8839
|
+
"operation": "lock",
|
|
8840
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshFamilyCollection"
|
|
8841
|
+
},
|
|
8842
|
+
{
|
|
8843
|
+
"kind": "mcp",
|
|
8844
|
+
"name": "usersoauthrefreshfamilycollection_revoke",
|
|
8845
|
+
"operation": "revoke",
|
|
8846
|
+
"objectName": "@happyvertical/smrt-users:UsersOAuthRefreshFamilyCollection"
|
|
8847
|
+
},
|
|
7971
8848
|
{
|
|
7972
8849
|
"kind": "api",
|
|
7973
8850
|
"name": "permissions.findByCategory",
|
|
@@ -9950,7 +10827,7 @@
|
|
|
9950
10827
|
"junctionCollections": 0,
|
|
9951
10828
|
"hierarchicalObjects": 0,
|
|
9952
10829
|
"polymorphicAssociations": 0,
|
|
9953
|
-
"uuidColumns":
|
|
10830
|
+
"uuidColumns": 116
|
|
9954
10831
|
},
|
|
9955
10832
|
"agentDoc": "# @happyvertical/smrt-users\n\nMulti-tenant identity, RBAC, hierarchical tenants, sessions, and SvelteKit auth.\n\n## Modules\n\nRead only the module relevant to the change; protocol and provisioning details\nare not prerequisites for unrelated user-package work.\n\n| Module | Scope | Module doc |\n|---|---|---|\n| `src/services/PermissionResolver.ts` | permission precedence, inherited memberships, guards, RLS, role seeding | [agents/permissions.md](agents/permissions.md) |\n| `src/services/OidcLoginService.ts`, collections and OIDC handlers | identity reconciliation, transaction boundaries, migration readiness | [agents/oidc-provisioning.md](agents/oidc-provisioning.md) |\n| `src/services/MobileAuthService.ts` | mobile handshake, bearer sessions, bootstrap extension boundary | [agents/mobile-auth.md](agents/mobile-auth.md) |\n| `src/services/TerminalAuthService.ts`, `src/services/LoginAttemptLimiter.ts`, `src/collections/LoginAttemptCollection.ts` | terminal approval concurrency, shared login budget and lockout (#3273), retry-safe database fixtures | [agents/terminal-auth-testing.md](agents/terminal-auth-testing.md) |\n| `src/services/DeviceCredentialService.ts` | per-person PIN layered on a device session (#3276), verifier seam for other credential kinds | this file, \"Security boundaries\" |\n| `src/services/PasswordCredentialService.ts`, `src/sveltekit/password-handlers.ts` | email + password sign-in and password lifecycle (#3274); shared scrypt in `credential-hash.ts` | this file, \"Security boundaries\"; README \"Password sign-in\" |\n| `src/retention.ts` | expired session/token/CLI-auth reaping and retention sweep wiring | [agents/retention.md](agents/retention.md) |\n\n## Models and authority\n\n- Users are global; tenant access comes through Membership (unique user/tenant).\n User email is normalized and globally unique through readonly nullable\n `emailKey`. `profileId` is a unique cross-package reference: at most one User\n owns each non-null Profile.\n- Tenant uses STI and a materialized hierarchy, maximum depth 10.\n `hierarchyPath`/`hierarchyLevel` are derived from `parentTenantId` by\n `Tenant.save()` on every save (any caller-supplied value is recomputed) and\n descendants are re-materialized when they change; never hand-maintain them.\n Legacy rows are backfilled with `smrt db:materialize-tenant-hierarchy`\n (`materializeTenantHierarchy()`). Tests that need a corrupt path must write it\n with raw SQL (#3036).\n- Role with `tenantId = null` is available to all tenants; `isSystem` prevents\n deletion. `inheritsToDescendants` is opt-in. Seed owner/admin/member/viewer\n through `RoleCollection.seedSystemRoles()` at application initialization.\n- Group roles apply only in their own tenant. Use `getGroupIdsForTenant()`,\n never cross-tenant `getGroupIds()`, for authorization.\n- Upward visibility is opt-in and read-only: `permissions.ancestorRead`\n ({ roles, collections, maxDepth? }) lets a DESCENDANT membership contribute\n declared `<collection>.read` at an ancestor, only when no membership resolved\n there, intersected with BOTH the role's own catalog grants and the\n principal's effective permissions in that descendant, and only for SYSTEM\n roles (a tenant-scoped role sharing a declared slug is ignored). Off by default, never\n write, never lateral, and never row visibility — sibling rows stay scoped by\n tenancy/RLS. Read the permissions module before changing it.\n- Membership DENY always wins. Direct inactive membership blocks inherited\n authority; a direct active membership pins resolution instead of unioning it\n with ancestors. Read the permissions module before changing these rules.\n- AccessRequest has no generated API/MCP/CLI operations; access it through\n `AccessRequestService`. Its JSON field is `requestContext`, not reserved\n slug-scoping `context`.\n\n## Security boundaries\n\n- Generated REST/MCP operations on identity/RBAC models are list/get only.\n Route authentication does not authorize authority mutations, and these models\n are not tenant-scoped. Use permission-gated services or explicitly checked\n consumer handlers. Generated CLI is list/get or closed (`cli: false` for\n credential/grant models) because agents shell out to it; a `cli` without\n `include` is full CRUD (#3742). Their catalog slugs stay full via\n `USERS_AUTHORITY_CATALOG_MODELS`. Preserve the registry assertions in\n `security-audit-1400.test.ts` and `issue-3742-cli-surface-lockdown.test.ts`.\n- Resource guards take the resource tenant, not the session tenant. Omit a\n session membership when targeting a different tenant; mismatches fail closed.\n `loadSessionContext().tenantAuthorization` must be checked by required-tenant\n consumers: null membership can represent inherited authority.\n- Sessions use secure UUIDs; TTL is seconds (default seven days). Access marks\n expired sessions EXPIRED. Magic-link tokens are single use.\n- `Session.authMethod` is server-set at mint time and never read from the\n client; every mint site in this package sets it. A session with\n `parentSessionId` is valid only while its parent validates\n (`loadSessionContext` enforces this; there is no FK cascade by design), may\n not switch to a tenant other than the parent's, and is revoked with its\n parent by `destroySession`.\n- Credential sign-ins reserve through `LoginAttemptLimiter` BEFORE credential\n work and key the subject on the submitted identifier, never a resolved user,\n so unknown and wrong take the same path. Reservations are fail-closed: keep\n them on failure, release on success or abort, never skip the reserve.\n Limiter writes are raw SQL and bypass the change feed; the audit sink is the\n observability seam, and it must never throw into the sign-in path.\n- `DeviceCredentialService` accepts a person credential only from a\n first-class session whose `authMethod` is a device-enrollment method\n (`terminal` by default) and that the host's `assertEnrolledDevice` confirms.\n A layered or PIN session can never administer PINs regardless of\n permissions. PIN hashes carry a per-row salt and the configured pepper;\n treat an unset pepper as a production misconfiguration.\n- A person session carries the PERSON's authority (resolved from their own\n membership on every load), never the device account's. `Session.data` keys\n in `SESSION_DATA_KEYS` are server-set controls enforced by the model:\n `permissionCeiling` only ever intersects (malformed fails closed to none)\n and suppresses `superAdminBypass`/`systemContext`; `absoluteExpiresAt`\n bounds `extend()` and `isValid()`; `idleSeconds` overrides the resolving\n service's TTL policy. Never write them from client input. The ceiling is a\n sign-in snapshot; `singleOccupant` revokes other children only AFTER a\n successful mint. A `mustReset` sign-in mints with an empty ceiling and\n `setPin` ends that session; do not grant it authority another way.\n- `UsersPasswordCredential` is one row per person, sensitive, with no\n generated surface; `PasswordCredentialService` and its handlers are its only\n read/write paths. Sign-in normalizes the email like `emailKey`, reserves\n before work, always runs one scrypt verify (dummy hash when absent), never\n creates a user, and maps every non-rate-limit refusal to one\n `PasswordCredentialError`. It re-checks the credential after the mint (a\n rehash that keeps row and version is confirmed by re-verifying); the\n parameter-upgrade write is a guarded UPDATE that must never replace a\n rotated password, and verification against a weaker stored hash is padded\n to the policy's scrypt cost. Self-service writes are guarded on the proven\n credential (first set insert-only); session sweeps run before and after\n each write. Self-service needs the current password except for a first\n set; `users.password.manage` follows the PIN's single-tenant target\n rule and never resets the actor's own. Layered sessions never manage\n passwords; a `mustChange` sign-in mints an empty ceiling.\n- A layered session whose tenant differs from its parent's never loads (null\n is allowed: narrower). Limiter rows carry `retain_until`; retention must\n not fall back to a process-wide horizon.\n- `Session.parentSessionId` is the parent's bearer: sensitive, never a\n `list()` filter (raw-SQL id reads, which also keep revocation sweeps free of\n caller list bounds), never serialized to clients. `users.pin.manage` reaches\n only people whose every active membership is in the actor's tenant (the PIN\n is global per person). A sign-in re-checks the verified\n credential generation AFTER the mint (`stillValid`); keep that ordering.\n Operation guards deny outside a session's ceiling; `loadPersonSession`\n re-checks device enrollment.\n- Tenant switching verifies active membership before writing and rotates the\n session ID for non-null targets, revoking the old session. Persist the returned\n `SwitchTenantResult.sessionId`; `switchSessionTenant()` updates the cookie and\n preserves its security settings. Failed switches mutate nothing; null clears\n do not rotate, and layered sessions never rotate (a replacement would escape\n the revocation sweeps they depend on). Layers do not nest. `SessionCollection.setSessionTenant()` is unguarded and must\n never receive an untrusted tenant ID.\n- OIDC provisioning is atomic and fail-closed. Preserve exact issuer/subject\n identifiers, claim-source email verification, unique global Person ownership,\n and transaction-bound reconciliation. Read the OIDC module and canonical\n scenario matrix before changing any provisioning path.\n\n## Entry points and validation\n\n`src/sveltekit/` owns `createSessionHandler`, `createSessionCookie`,\n`destroySessionCookie`, and `switchSessionTenant`. Use README integration examples\nrather than copying application setup into these instructions.\n\nFrom the repository root:\n\n```bash\npnpm --filter @happyvertical/smrt-users test\npnpm --filter @happyvertical/smrt-users typecheck\npnpm --filter @happyvertical/smrt-users test:postgres\n```\n\nStart with the relevant test file via `test -- src/__tests__/<file>.test.ts`.\nRun `test:postgres` for RLS, principal context, OIDC, or terminal-auth database\nchanges. `typecheck` includes Svelte accessibility checks; plain `tsc` is\ninsufficient. Follow root knowledge freshness checks before shipping.\n",
|
|
9956
10833
|
"moduleDocs": [
|
|
@@ -9977,7 +10854,7 @@
|
|
|
9977
10854
|
{
|
|
9978
10855
|
"path": "agents/retention.md",
|
|
9979
10856
|
"module": "retention",
|
|
9980
|
-
"content": "# smrt-users/credential retention\n\nModule semantics for `src/retention.ts` and the three `deleteExpired()` paths\nit drives. Package orientation, the permission model, and the security rules\nthat apply before editing anything live in [../AGENTS.md](../AGENTS.md) — read\nthat first.\n\n## Credential retention (#2375)\n\n`SessionCollection.deleteExpired()`,\n`UsersMagicLinkTokenCollection.deleteExpired()` and\n`UsersCliAuthRequestCollection.deleteExpired()` all existed, and all waited for\nan application to remember to call them. Expired credential rows are the worst\nkind of unbounded growth: worthless the moment they expire, and exactly the\nrows an attacker would like to still find in the table.\n\n`src/retention.ts` contributes the three to the framework retention sweep in\n`@happyvertical/smrt-core`, so `smrt db:prune` and a running jobs `TaskRunner`\nreap them.\n\n- **The entry point registers on import.** `src/index.ts` calls\n `registerUserRetentionTasks()`, so any process that loaded this package\n contributes the tasks — including `smrt db:prune`, which imports the package\n optionally for exactly that reason. Registering is not scheduling: nothing is\n deleted until something runs a sweep.\n- **Task names** are `users-sessions`, `users-magic-link-tokens`,\n `users-cli-auth-requests`, `users-login-attempts`, `users-login-audit-events`\n — prefixed with the package's short name because the retention registry is\n one process-global namespace. Opt one out with\n `runRetentionSweep(db, { tasks: { 'users-sessions': false } })` or\n `smrt db:prune --skip users-sessions`; `unregisterUserRetentionTasks()`\n removes all of them.\n- **The credential tasks have no retention window to configure.** An expired\n credential has nothing worth retaining, so each deletes only already-expired\n rows. An application that keeps expired sessions for audit should opt the\n task out and archive them itself. The two #3273 tasks differ: limiter rows\n are pruned once past their own `retain_until` — written by the limiter from\n its configured window and streak-forgiveness horizon, so a custom-configured\n limiter is never swept early — and never while a lockout is live; audit\n events are pruned after\n `DEFAULT_LOGIN_AUDIT_RETENTION_DAYS` (90). A host that needs longer audit\n retention opts `users-login-audit-events` out and archives.\n- **All three are a single counted DELETE**, not a hydrate-and-delete loop.\n They now run unattended on a timer, and a per-row delete that throws part-way\n leaves the rest of the expired rows un-reaped — the #1400 reasoning that\n already applied to sessions, now applied to the other two. Counting first\n also gives a usable figure where `rowCount` is not populated, and is what\n makes `{ dryRun }` preview the same predicate rather than an estimate. The\n count and the delete are not one transaction, so the figure is approximate\n under concurrent writers.\n- **`expiresAt` is `@field({ indexed: true })`** on `Session`,\n `UsersMagicLinkToken` and `UsersCliAuthRequest`: the prune predicate scans\n that column on every pass.\n- **CLI bearer handoff is single-use.** An approved request becomes `consumed`\n and clears its `sessionId` when one poller wins the exchange. The CLI\n retention task deletes pending requests past their TTL, requests already\n marked `expired` by lazy expiry, and consumed history; it retains approved\n requests until exchange so a near-expiry approval cannot orphan its bearer\n session.\n"
|
|
10857
|
+
"content": "# smrt-users/credential retention\n\nModule semantics for `src/retention.ts` and the three `deleteExpired()` paths\nit drives. Package orientation, the permission model, and the security rules\nthat apply before editing anything live in [../AGENTS.md](../AGENTS.md) — read\nthat first.\n\n## Credential retention (#2375)\n\n`SessionCollection.deleteExpired()`,\n`UsersMagicLinkTokenCollection.deleteExpired()` and\n`UsersCliAuthRequestCollection.deleteExpired()` all existed, and all waited for\nan application to remember to call them. Expired credential rows are the worst\nkind of unbounded growth: worthless the moment they expire, and exactly the\nrows an attacker would like to still find in the table.\n\n`src/retention.ts` contributes the three to the framework retention sweep in\n`@happyvertical/smrt-core`, so `smrt db:prune` and a running jobs `TaskRunner`\nreap them.\n\n- **The entry point registers on import.** `src/index.ts` calls\n `registerUserRetentionTasks()`, so any process that loaded this package\n contributes the tasks — including `smrt db:prune`, which imports the package\n optionally for exactly that reason. Registering is not scheduling: nothing is\n deleted until something runs a sweep.\n- **Task names** are `users-sessions`, `users-magic-link-tokens`,\n `users-cli-auth-requests`, `users-login-attempts`, `users-login-audit-events`\n — prefixed with the package's short name because the retention registry is\n one process-global namespace. Opt one out with\n `runRetentionSweep(db, { tasks: { 'users-sessions': false } })` or\n `smrt db:prune --skip users-sessions`; `unregisterUserRetentionTasks()`\n removes all of them.\n- **The credential tasks have no retention window to configure.** An expired\n credential has nothing worth retaining, so each deletes only already-expired\n rows. An application that keeps expired sessions for audit should opt the\n task out and archive them itself. The two #3273 tasks differ: limiter rows\n are pruned once past their own `retain_until` — written by the limiter from\n its configured window and streak-forgiveness horizon, so a custom-configured\n limiter is never swept early — and never while a lockout is live; audit\n events are pruned after\n `DEFAULT_LOGIN_AUDIT_RETENTION_DAYS` (90). A host that needs longer audit\n retention opts `users-login-audit-events` out and archives.\n- **All three are a single counted DELETE**, not a hydrate-and-delete loop.\n They now run unattended on a timer, and a per-row delete that throws part-way\n leaves the rest of the expired rows un-reaped — the #1400 reasoning that\n already applied to sessions, now applied to the other two. Counting first\n also gives a usable figure where `rowCount` is not populated, and is what\n makes `{ dryRun }` preview the same predicate rather than an estimate. The\n count and the delete are not one transaction, so the figure is approximate\n under concurrent writers.\n- **`expiresAt` is `@field({ indexed: true })`** on `Session`,\n `UsersMagicLinkToken` and `UsersCliAuthRequest`: the prune predicate scans\n that column on every pass.\n- **CLI bearer handoff is single-use.** An approved request becomes `consumed`\n and clears its `sessionId` when one poller wins the exchange. The CLI\n retention task deletes pending requests past their TTL, requests already\n marked `expired` by lazy expiry, and consumed history; it retains approved\n requests until exchange so a near-expiry approval cannot orphan its bearer\n session.\n\n## OAuth credential retention\n\n`users-oauth-credentials` prunes expired authorization codes and access-token\nrevocations. Refresh grants (including consumed or revoked hashes) remain until\n30 days after their own expiry, so replay within their validity period and this\ngrace period still revokes the family. Later replay fails as an unknown token.\nThis bounds retained rotation history even for continuously active families.\nThe sweep locks each candidate family using the same row as token rotation,\nrechecks its descendants, and deletes the family only when none remain. Live\ngrants and revocations are never swept. Each family is a separate transaction;\nrolled-back contention retries follow the OAuth transaction policy. If the SQL\nadapter invalidates a connection (for example SQLite SQLITE_BUSY), the sweep\nreports failure; the host must acquire a fresh connection before retrying. It\nnever continues on an invalidated connection. Dry runs write nothing and\nreport approximate counts under concurrent writes. Clients and consent records\nremain for application-managed lifecycle/audit. Opt-out and unregister work as\nfor the other retention tasks. No raw bearer or credential hash is logged.\n"
|
|
9981
10858
|
}
|
|
9982
10859
|
],
|
|
9983
10860
|
"recipes": [
|