@hilbras/keystone 1.6.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (604) hide show
  1. package/CHANGELOG.md +625 -0
  2. package/README.md +198 -50
  3. package/dist/cli.js +25 -27
  4. package/dist/cli.js.map +1 -1
  5. package/dist/config.d.ts +23 -1
  6. package/dist/config.d.ts.map +1 -1
  7. package/dist/config.js +53 -8
  8. package/dist/config.js.map +1 -1
  9. package/dist/container.d.ts +4 -1
  10. package/dist/container.d.ts.map +1 -1
  11. package/dist/container.js.map +1 -1
  12. package/dist/db/migrations/0008_flashy_firestar.sql +5 -0
  13. package/dist/db/migrations/0009_daffy_changeling.sql +1 -0
  14. package/dist/db/migrations/0010_wealthy_shadow_king.sql +37 -0
  15. package/dist/db/migrations/0011_overrated_vector.sql +18 -0
  16. package/dist/db/migrations/0012_brave_darkhawk.sql +28 -0
  17. package/dist/db/migrations/0013_wonderful_chimera.sql +5 -0
  18. package/dist/db/migrations/0014_magical_morph.sql +48 -0
  19. package/dist/db/migrations/0015_chief_vargas.sql +7 -0
  20. package/dist/db/migrations/0016_gorgeous_charles_xavier.sql +5 -0
  21. package/dist/db/migrations/0017_flashy_nekra.sql +1 -0
  22. package/{src/db/migrations/meta/0007_snapshot.json → dist/db/migrations/meta/0008_snapshot.json} +136 -32
  23. package/{src/db/migrations/meta/0006_snapshot.json → dist/db/migrations/meta/0009_snapshot.json} +359 -30
  24. package/{src/db/migrations/meta/0005_snapshot.json → dist/db/migrations/meta/0010_snapshot.json} +459 -29
  25. package/{src/db/migrations/meta/0004_snapshot.json → dist/db/migrations/meta/0011_snapshot.json} +594 -30
  26. package/dist/db/migrations/meta/0012_snapshot.json +3891 -0
  27. package/dist/db/migrations/meta/0013_snapshot.json +3919 -0
  28. package/dist/db/migrations/meta/0014_snapshot.json +4311 -0
  29. package/dist/db/migrations/meta/0015_snapshot.json +4340 -0
  30. package/dist/db/migrations/meta/0016_snapshot.json +4363 -0
  31. package/dist/db/migrations/meta/0017_snapshot.json +4370 -0
  32. package/dist/db/migrations/meta/_journal.json +70 -0
  33. package/dist/db/reencryptOidcSecrets.d.ts +2 -0
  34. package/dist/db/reencryptOidcSecrets.d.ts.map +1 -0
  35. package/dist/db/reencryptOidcSecrets.js +41 -0
  36. package/dist/db/reencryptOidcSecrets.js.map +1 -0
  37. package/dist/db/schema.d.ts +2693 -88
  38. package/dist/db/schema.d.ts.map +1 -1
  39. package/dist/db/schema.js +157 -4
  40. package/dist/db/schema.js.map +1 -1
  41. package/dist/db/seed.js +67 -40
  42. package/dist/db/seed.js.map +1 -1
  43. package/dist/di.d.ts.map +1 -1
  44. package/dist/di.js +11 -3
  45. package/dist/di.js.map +1 -1
  46. package/dist/index.d.ts +2 -2
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +34 -3
  49. package/dist/index.js.map +1 -1
  50. package/dist/lib/errors.d.ts +2 -1
  51. package/dist/lib/errors.d.ts.map +1 -1
  52. package/dist/lib/errors.js +10 -0
  53. package/dist/lib/errors.js.map +1 -1
  54. package/dist/plugins/appContext.d.ts.map +1 -1
  55. package/dist/plugins/appContext.js +3 -12
  56. package/dist/plugins/appContext.js.map +1 -1
  57. package/dist/plugins/audit.d.ts.map +1 -1
  58. package/dist/plugins/audit.js +26 -6
  59. package/dist/plugins/audit.js.map +1 -1
  60. package/dist/plugins/auth.d.ts.map +1 -1
  61. package/dist/plugins/auth.js +32 -7
  62. package/dist/plugins/auth.js.map +1 -1
  63. package/dist/plugins/headerSanitization.d.ts +15 -0
  64. package/dist/plugins/headerSanitization.d.ts.map +1 -0
  65. package/dist/plugins/headerSanitization.js +39 -0
  66. package/dist/plugins/headerSanitization.js.map +1 -0
  67. package/dist/plugins/metrics.d.ts.map +1 -1
  68. package/dist/plugins/mtls.d.ts +21 -2
  69. package/dist/plugins/mtls.d.ts.map +1 -1
  70. package/dist/plugins/mtls.js +94 -47
  71. package/dist/plugins/mtls.js.map +1 -1
  72. package/dist/plugins/permissions.d.ts.map +1 -1
  73. package/dist/plugins/permissions.js +29 -9
  74. package/dist/plugins/permissions.js.map +1 -1
  75. package/dist/plugins/rateLimit.d.ts +16 -0
  76. package/dist/plugins/rateLimit.d.ts.map +1 -1
  77. package/dist/plugins/rateLimit.js +16 -3
  78. package/dist/plugins/rateLimit.js.map +1 -1
  79. package/dist/plugins/requestLogger.d.ts.map +1 -1
  80. package/dist/repositories/apiKey.d.ts.map +1 -1
  81. package/dist/repositories/application.d.ts +1 -1
  82. package/dist/repositories/application.d.ts.map +1 -1
  83. package/dist/repositories/application.js +9 -3
  84. package/dist/repositories/application.js.map +1 -1
  85. package/dist/repositories/audit.d.ts.map +1 -1
  86. package/dist/repositories/index.d.ts +3 -0
  87. package/dist/repositories/index.d.ts.map +1 -1
  88. package/dist/repositories/index.js +3 -0
  89. package/dist/repositories/index.js.map +1 -1
  90. package/dist/repositories/mfaChallenge.d.ts +23 -0
  91. package/dist/repositories/mfaChallenge.d.ts.map +1 -0
  92. package/dist/repositories/mfaChallenge.js +71 -0
  93. package/dist/repositories/mfaChallenge.js.map +1 -0
  94. package/dist/repositories/oidcConnection.d.ts +27 -43
  95. package/dist/repositories/oidcConnection.d.ts.map +1 -1
  96. package/dist/repositories/oidcConnection.js +15 -6
  97. package/dist/repositories/oidcConnection.js.map +1 -1
  98. package/dist/repositories/organization.d.ts +9 -9
  99. package/dist/repositories/organization.d.ts.map +1 -1
  100. package/dist/repositories/organization.js +91 -37
  101. package/dist/repositories/organization.js.map +1 -1
  102. package/dist/repositories/permission.d.ts.map +1 -1
  103. package/dist/repositories/permission.js +27 -5
  104. package/dist/repositories/permission.js.map +1 -1
  105. package/dist/repositories/samlConnection.d.ts +28 -28
  106. package/dist/repositories/samlConnection.d.ts.map +1 -1
  107. package/dist/repositories/samlConnection.js +12 -4
  108. package/dist/repositories/samlConnection.js.map +1 -1
  109. package/dist/repositories/scimConnection.d.ts +38 -0
  110. package/dist/repositories/scimConnection.d.ts.map +1 -0
  111. package/dist/repositories/scimConnection.js +123 -0
  112. package/dist/repositories/scimConnection.js.map +1 -0
  113. package/dist/repositories/scimGroup.d.ts +36 -0
  114. package/dist/repositories/scimGroup.d.ts.map +1 -0
  115. package/dist/repositories/scimGroup.js +113 -0
  116. package/dist/repositories/scimGroup.js.map +1 -0
  117. package/dist/repositories/session.d.ts +24 -13
  118. package/dist/repositories/session.d.ts.map +1 -1
  119. package/dist/repositories/session.js +13 -1
  120. package/dist/repositories/session.js.map +1 -1
  121. package/dist/repositories/types.d.ts +117 -6
  122. package/dist/repositories/types.d.ts.map +1 -1
  123. package/dist/repositories/types.js +7 -1
  124. package/dist/repositories/types.js.map +1 -1
  125. package/dist/repositories/user.d.ts +23 -1
  126. package/dist/repositories/user.d.ts.map +1 -1
  127. package/dist/repositories/user.js +180 -4
  128. package/dist/repositories/user.js.map +1 -1
  129. package/dist/routes/admin/billing.js +4 -4
  130. package/dist/routes/admin/billing.js.map +1 -1
  131. package/dist/routes/admin/helpers.d.ts +16 -20
  132. package/dist/routes/admin/helpers.d.ts.map +1 -1
  133. package/dist/routes/admin/helpers.js +53 -10
  134. package/dist/routes/admin/helpers.js.map +1 -1
  135. package/dist/routes/admin/organizations.d.ts.map +1 -1
  136. package/dist/routes/admin/organizations.js +105 -69
  137. package/dist/routes/admin/organizations.js.map +1 -1
  138. package/dist/routes/admin/permissions.d.ts.map +1 -1
  139. package/dist/routes/admin/permissions.js +48 -14
  140. package/dist/routes/admin/permissions.js.map +1 -1
  141. package/dist/routes/admin/platform.d.ts.map +1 -1
  142. package/dist/routes/admin/platform.js +86 -35
  143. package/dist/routes/admin/platform.js.map +1 -1
  144. package/dist/routes/admin/sso.d.ts.map +1 -1
  145. package/dist/routes/admin/sso.js +143 -12
  146. package/dist/routes/admin/sso.js.map +1 -1
  147. package/dist/routes/admin/webhooks.js +8 -8
  148. package/dist/routes/admin/webhooks.js.map +1 -1
  149. package/dist/routes/apiKeys.d.ts.map +1 -1
  150. package/dist/routes/apiKeys.js +23 -5
  151. package/dist/routes/apiKeys.js.map +1 -1
  152. package/dist/routes/auth.d.ts.map +1 -1
  153. package/dist/routes/auth.js +112 -22
  154. package/dist/routes/auth.js.map +1 -1
  155. package/dist/routes/authz.d.ts.map +1 -1
  156. package/dist/routes/authz.js +16 -4
  157. package/dist/routes/authz.js.map +1 -1
  158. package/dist/routes/config.d.ts.map +1 -1
  159. package/dist/routes/config.js +16 -14
  160. package/dist/routes/config.js.map +1 -1
  161. package/dist/routes/federation.d.ts.map +1 -1
  162. package/dist/routes/federation.js +17 -3
  163. package/dist/routes/federation.js.map +1 -1
  164. package/dist/routes/magicLinks.d.ts.map +1 -1
  165. package/dist/routes/magicLinks.js +15 -3
  166. package/dist/routes/magicLinks.js.map +1 -1
  167. package/dist/routes/oauth.d.ts.map +1 -1
  168. package/dist/routes/oauth.js +60 -5
  169. package/dist/routes/oauth.js.map +1 -1
  170. package/dist/routes/oauth2.d.ts.map +1 -1
  171. package/dist/routes/oauth2.js +188 -22
  172. package/dist/routes/oauth2.js.map +1 -1
  173. package/dist/routes/oidcEnterprise.d.ts.map +1 -1
  174. package/dist/routes/oidcEnterprise.js +67 -21
  175. package/dist/routes/oidcEnterprise.js.map +1 -1
  176. package/dist/routes/password.d.ts.map +1 -1
  177. package/dist/routes/password.js.map +1 -1
  178. package/dist/routes/profile.js +4 -4
  179. package/dist/routes/profile.js.map +1 -1
  180. package/dist/routes/saml.d.ts +33 -0
  181. package/dist/routes/saml.d.ts.map +1 -1
  182. package/dist/routes/saml.js +217 -12
  183. package/dist/routes/saml.js.map +1 -1
  184. package/dist/routes/scim.d.ts +13 -0
  185. package/dist/routes/scim.d.ts.map +1 -1
  186. package/dist/routes/scim.js +885 -110
  187. package/dist/routes/scim.js.map +1 -1
  188. package/dist/routes/sdk.d.ts.map +1 -1
  189. package/dist/routes/sdk.js +24 -8
  190. package/dist/routes/sdk.js.map +1 -1
  191. package/dist/routes/serviceAccounts.d.ts.map +1 -1
  192. package/dist/routes/serviceAccounts.js +63 -2
  193. package/dist/routes/serviceAccounts.js.map +1 -1
  194. package/dist/routes/setup.d.ts.map +1 -1
  195. package/dist/routes/setup.js +15 -16
  196. package/dist/routes/setup.js.map +1 -1
  197. package/dist/routes/smsOtp.js +1 -1
  198. package/dist/routes/smsOtp.js.map +1 -1
  199. package/dist/routes/totp.d.ts.map +1 -1
  200. package/dist/routes/totp.js +112 -23
  201. package/dist/routes/totp.js.map +1 -1
  202. package/dist/routes/webauthn.d.ts.map +1 -1
  203. package/dist/routes/webauthn.js +44 -8
  204. package/dist/routes/webauthn.js.map +1 -1
  205. package/dist/routes/workflows.d.ts.map +1 -1
  206. package/dist/routes/workflows.js +58 -25
  207. package/dist/routes/workflows.js.map +1 -1
  208. package/dist/sdk/index.d.ts.map +1 -1
  209. package/dist/sdk/index.js +141 -40
  210. package/dist/sdk/index.js.map +1 -1
  211. package/dist/sdk/types.d.ts +64 -30
  212. package/dist/sdk/types.d.ts.map +1 -1
  213. package/dist/services/application/authentication.d.ts +39 -1
  214. package/dist/services/application/authentication.d.ts.map +1 -1
  215. package/dist/services/application/authentication.js +43 -1
  216. package/dist/services/application/authentication.js.map +1 -1
  217. package/dist/services/application/identity.d.ts +10 -7
  218. package/dist/services/application/identity.d.ts.map +1 -1
  219. package/dist/services/application/identity.js +13 -10
  220. package/dist/services/application/identity.js.map +1 -1
  221. package/dist/services/application/organization.d.ts +16 -8
  222. package/dist/services/application/organization.d.ts.map +1 -1
  223. package/dist/services/application/organization.js +160 -12
  224. package/dist/services/application/organization.js.map +1 -1
  225. package/dist/services/applications.js +2 -2
  226. package/dist/services/applications.js.map +1 -1
  227. package/dist/services/audit.d.ts +1 -0
  228. package/dist/services/audit.d.ts.map +1 -1
  229. package/dist/services/audit.js +13 -0
  230. package/dist/services/audit.js.map +1 -1
  231. package/dist/services/cache.d.ts.map +1 -1
  232. package/dist/services/configuration/profiles.d.ts +4 -0
  233. package/dist/services/configuration/profiles.d.ts.map +1 -1
  234. package/dist/services/configuration/profiles.js +50 -0
  235. package/dist/services/configuration/profiles.js.map +1 -1
  236. package/dist/services/configuration.d.ts.map +1 -1
  237. package/dist/services/configuration.js.map +1 -1
  238. package/dist/services/connectors/google.d.ts +18 -1
  239. package/dist/services/connectors/google.d.ts.map +1 -1
  240. package/dist/services/connectors/google.js +27 -4
  241. package/dist/services/connectors/google.js.map +1 -1
  242. package/dist/services/connectors/oidc.d.ts +14 -2
  243. package/dist/services/connectors/oidc.d.ts.map +1 -1
  244. package/dist/services/connectors/oidc.js +35 -6
  245. package/dist/services/connectors/oidc.js.map +1 -1
  246. package/dist/services/connectors/types.d.ts +13 -1
  247. package/dist/services/connectors/types.d.ts.map +1 -1
  248. package/dist/services/connectors/zitadel.d.ts.map +1 -1
  249. package/dist/services/connectors/zitadel.js +4 -3
  250. package/dist/services/connectors/zitadel.js.map +1 -1
  251. package/dist/services/domain/authentication.d.ts +43 -4
  252. package/dist/services/domain/authentication.d.ts.map +1 -1
  253. package/dist/services/domain/authentication.js +119 -40
  254. package/dist/services/domain/authentication.js.map +1 -1
  255. package/dist/services/domain/authorization.d.ts +11 -0
  256. package/dist/services/domain/authorization.d.ts.map +1 -1
  257. package/dist/services/domain/authorization.js +36 -1
  258. package/dist/services/domain/authorization.js.map +1 -1
  259. package/dist/services/domain/identity.d.ts +21 -9
  260. package/dist/services/domain/identity.d.ts.map +1 -1
  261. package/dist/services/domain/identity.js +187 -10
  262. package/dist/services/domain/identity.js.map +1 -1
  263. package/dist/services/domain/organization.d.ts +11 -10
  264. package/dist/services/domain/organization.d.ts.map +1 -1
  265. package/dist/services/domain/organization.js +48 -30
  266. package/dist/services/domain/organization.js.map +1 -1
  267. package/dist/services/emailVerification.d.ts +2 -2
  268. package/dist/services/enterpriseSso.d.ts +13 -6
  269. package/dist/services/enterpriseSso.d.ts.map +1 -1
  270. package/dist/services/enterpriseSso.js +75 -6
  271. package/dist/services/enterpriseSso.js.map +1 -1
  272. package/dist/services/events/subscribers/auditLog.js +1 -1
  273. package/dist/services/events/subscribers/auditLog.js.map +1 -1
  274. package/dist/services/events/types.d.ts +7 -1
  275. package/dist/services/events/types.d.ts.map +1 -1
  276. package/dist/services/events/types.js.map +1 -1
  277. package/dist/services/events/validate.d.ts.map +1 -1
  278. package/dist/services/events/validate.js +33 -0
  279. package/dist/services/events/validate.js.map +1 -1
  280. package/dist/services/features.d.ts.map +1 -1
  281. package/dist/services/features.js.map +1 -1
  282. package/dist/services/federation.d.ts +6 -1
  283. package/dist/services/federation.d.ts.map +1 -1
  284. package/dist/services/federation.js +31 -4
  285. package/dist/services/federation.js.map +1 -1
  286. package/dist/services/ipControls.js +2 -2
  287. package/dist/services/ipControls.js.map +1 -1
  288. package/dist/services/magicLinks.d.ts +2 -2
  289. package/dist/services/magicLinks.d.ts.map +1 -1
  290. package/dist/services/magicLinks.js +13 -9
  291. package/dist/services/magicLinks.js.map +1 -1
  292. package/dist/services/mfa.d.ts +53 -0
  293. package/dist/services/mfa.d.ts.map +1 -0
  294. package/dist/services/mfa.js +157 -0
  295. package/dist/services/mfa.js.map +1 -0
  296. package/dist/services/oauth2.d.ts +88 -14
  297. package/dist/services/oauth2.d.ts.map +1 -1
  298. package/dist/services/oauth2.js +125 -16
  299. package/dist/services/oauth2.js.map +1 -1
  300. package/dist/services/oidcSecretFormat.d.ts +3 -0
  301. package/dist/services/oidcSecretFormat.d.ts.map +1 -0
  302. package/dist/services/oidcSecretFormat.js +5 -0
  303. package/dist/services/oidcSecretFormat.js.map +1 -0
  304. package/dist/services/organizations.d.ts +4 -16
  305. package/dist/services/organizations.d.ts.map +1 -1
  306. package/dist/services/organizations.js +0 -62
  307. package/dist/services/organizations.js.map +1 -1
  308. package/dist/services/permissions.d.ts.map +1 -1
  309. package/dist/services/permissions.js +9 -1
  310. package/dist/services/permissions.js.map +1 -1
  311. package/dist/services/plugins/registry.d.ts.map +1 -1
  312. package/dist/services/plugins/registry.js.map +1 -1
  313. package/dist/services/plugins/types.d.ts.map +1 -1
  314. package/dist/services/queue/bullmq.d.ts.map +1 -1
  315. package/dist/services/queue/inProcess.d.ts.map +1 -1
  316. package/dist/services/redirectUri.d.ts +56 -0
  317. package/dist/services/redirectUri.d.ts.map +1 -0
  318. package/dist/services/redirectUri.js +129 -0
  319. package/dist/services/redirectUri.js.map +1 -0
  320. package/dist/services/redis.d.ts +1 -1
  321. package/dist/services/redis.d.ts.map +1 -1
  322. package/dist/services/scimCredentials.d.ts +46 -0
  323. package/dist/services/scimCredentials.d.ts.map +1 -0
  324. package/dist/services/scimCredentials.js +123 -0
  325. package/dist/services/scimCredentials.js.map +1 -0
  326. package/dist/services/scimLegacyMigration.d.ts +12 -0
  327. package/dist/services/scimLegacyMigration.d.ts.map +1 -0
  328. package/dist/services/scimLegacyMigration.js +44 -0
  329. package/dist/services/scimLegacyMigration.js.map +1 -0
  330. package/dist/services/secrets/awsKms.d.ts +2 -2
  331. package/dist/services/secrets/awsKms.d.ts.map +1 -1
  332. package/dist/services/secrets/awsKms.js +3 -5
  333. package/dist/services/secrets/awsKms.js.map +1 -1
  334. package/dist/services/secrets/azureKeyVault.d.ts.map +1 -1
  335. package/dist/services/secrets/database.d.ts.map +1 -1
  336. package/dist/services/secrets/database.js.map +1 -1
  337. package/dist/services/secrets/environment.d.ts.map +1 -1
  338. package/dist/services/secrets/environment.js.map +1 -1
  339. package/dist/services/secrets/index.d.ts.map +1 -1
  340. package/dist/services/secrets/password.d.ts.map +1 -1
  341. package/dist/services/secrets/password.js +0 -4
  342. package/dist/services/secrets/password.js.map +1 -1
  343. package/dist/services/secrets/provider.d.ts +2 -3
  344. package/dist/services/secrets/provider.d.ts.map +1 -1
  345. package/dist/services/secrets/vault.d.ts.map +1 -1
  346. package/dist/services/serviceAccounts.d.ts +20 -0
  347. package/dist/services/serviceAccounts.d.ts.map +1 -1
  348. package/dist/services/serviceAccounts.js +47 -1
  349. package/dist/services/serviceAccounts.js.map +1 -1
  350. package/dist/services/sessionRevocation.d.ts +76 -0
  351. package/dist/services/sessionRevocation.d.ts.map +1 -0
  352. package/dist/services/sessionRevocation.js +86 -0
  353. package/dist/services/sessionRevocation.js.map +1 -0
  354. package/dist/services/setup/configWriter.d.ts.map +1 -1
  355. package/dist/services/setup/configWriter.js.map +1 -1
  356. package/dist/services/singleUse.d.ts +68 -0
  357. package/dist/services/singleUse.d.ts.map +1 -0
  358. package/dist/services/singleUse.js +54 -0
  359. package/dist/services/singleUse.js.map +1 -0
  360. package/dist/services/smsOtp.d.ts.map +1 -1
  361. package/dist/services/smsOtp.js +12 -8
  362. package/dist/services/smsOtp.js.map +1 -1
  363. package/dist/services/ssoEndpointPolicy.d.ts +8 -0
  364. package/dist/services/ssoEndpointPolicy.d.ts.map +1 -0
  365. package/dist/services/ssoEndpointPolicy.js +136 -0
  366. package/dist/services/ssoEndpointPolicy.js.map +1 -0
  367. package/dist/services/stepUp.d.ts +35 -0
  368. package/dist/services/stepUp.d.ts.map +1 -0
  369. package/dist/services/stepUp.js +65 -0
  370. package/dist/services/stepUp.js.map +1 -0
  371. package/dist/services/tokens.d.ts +39 -11
  372. package/dist/services/tokens.d.ts.map +1 -1
  373. package/dist/services/tokens.js +80 -14
  374. package/dist/services/tokens.js.map +1 -1
  375. package/dist/services/totp.d.ts +46 -0
  376. package/dist/services/totp.d.ts.map +1 -1
  377. package/dist/services/totp.js +178 -41
  378. package/dist/services/totp.js.map +1 -1
  379. package/dist/services/trustedProxies.d.ts +90 -0
  380. package/dist/services/trustedProxies.d.ts.map +1 -0
  381. package/dist/services/trustedProxies.js +283 -0
  382. package/dist/services/trustedProxies.js.map +1 -0
  383. package/dist/services/users.d.ts +20 -12
  384. package/dist/services/users.d.ts.map +1 -1
  385. package/dist/services/users.js +24 -51
  386. package/dist/services/users.js.map +1 -1
  387. package/dist/services/webauthn.d.ts +8 -4
  388. package/dist/services/webauthn.d.ts.map +1 -1
  389. package/dist/services/webauthn.js +4 -4
  390. package/dist/services/webauthn.js.map +1 -1
  391. package/dist/services/webhooks.d.ts +20 -20
  392. package/dist/services/workflows/engine.d.ts +4 -2
  393. package/dist/services/workflows/engine.d.ts.map +1 -1
  394. package/dist/services/workflows/engine.js +181 -12
  395. package/dist/services/workflows/engine.js.map +1 -1
  396. package/dist/services/workflows/steps.d.ts +2 -0
  397. package/dist/services/workflows/steps.d.ts.map +1 -1
  398. package/dist/services/workflows/steps.js +8 -75
  399. package/dist/services/workflows/steps.js.map +1 -1
  400. package/dist/setup-server.js +2 -1
  401. package/dist/setup-server.js.map +1 -1
  402. package/dist/types.d.ts +33 -4
  403. package/dist/types.d.ts.map +1 -1
  404. package/dist/types.js +26 -2
  405. package/dist/types.js.map +1 -1
  406. package/package.json +25 -3
  407. package/dist/tests/errors.test.d.ts +0 -2
  408. package/dist/tests/errors.test.d.ts.map +0 -1
  409. package/dist/tests/errors.test.js +0 -64
  410. package/dist/tests/errors.test.js.map +0 -1
  411. package/dist/tests/events.test.d.ts +0 -2
  412. package/dist/tests/events.test.d.ts.map +0 -1
  413. package/dist/tests/events.test.js +0 -45
  414. package/dist/tests/events.test.js.map +0 -1
  415. package/dist/tests/featureFlags.test.d.ts +0 -2
  416. package/dist/tests/featureFlags.test.d.ts.map +0 -1
  417. package/dist/tests/featureFlags.test.js +0 -24
  418. package/dist/tests/featureFlags.test.js.map +0 -1
  419. package/dist/tests/integration/queue.test.d.ts +0 -2
  420. package/dist/tests/integration/queue.test.d.ts.map +0 -1
  421. package/dist/tests/integration/queue.test.js +0 -49
  422. package/dist/tests/integration/queue.test.js.map +0 -1
  423. package/dist/tests/plugins.test.d.ts +0 -2
  424. package/dist/tests/plugins.test.d.ts.map +0 -1
  425. package/dist/tests/plugins.test.js +0 -56
  426. package/dist/tests/plugins.test.js.map +0 -1
  427. package/dist/tests/result.test.d.ts +0 -2
  428. package/dist/tests/result.test.d.ts.map +0 -1
  429. package/dist/tests/result.test.js +0 -46
  430. package/dist/tests/result.test.js.map +0 -1
  431. package/dist/tests/setup/configWriter.test.d.ts +0 -2
  432. package/dist/tests/setup/configWriter.test.d.ts.map +0 -1
  433. package/dist/tests/setup/configWriter.test.js +0 -55
  434. package/dist/tests/setup/configWriter.test.js.map +0 -1
  435. package/dist/tests/setup/validation.test.d.ts +0 -2
  436. package/dist/tests/setup/validation.test.d.ts.map +0 -1
  437. package/dist/tests/setup/validation.test.js +0 -26
  438. package/dist/tests/setup/validation.test.js.map +0 -1
  439. package/dist/tests/smoke.test.d.ts +0 -2
  440. package/dist/tests/smoke.test.d.ts.map +0 -1
  441. package/dist/tests/smoke.test.js +0 -124
  442. package/dist/tests/smoke.test.js.map +0 -1
  443. package/src/cli.ts +0 -172
  444. package/src/config.ts +0 -143
  445. package/src/container.ts +0 -48
  446. package/src/db/index.ts +0 -53
  447. package/src/db/migrations/0000_skinny_ben_parker.sql +0 -553
  448. package/src/db/migrations/0001_brief_joseph.sql +0 -10
  449. package/src/db/migrations/0002_add_account_lockout.sql +0 -3
  450. package/src/db/migrations/0003_steep_rachel_grey.sql +0 -1
  451. package/src/db/migrations/0004_clever_bill_hollister.sql +0 -20
  452. package/src/db/migrations/0005_steep_the_call.sql +0 -2
  453. package/src/db/migrations/0006_ambitious_boomer.sql +0 -17
  454. package/src/db/migrations/0007_greedy_vindicator.sql +0 -40
  455. package/src/db/migrations/meta/0000_snapshot.json +0 -2964
  456. package/src/db/migrations/meta/0001_snapshot.json +0 -3031
  457. package/src/db/migrations/meta/0003_snapshot.json +0 -3051
  458. package/src/db/migrations/meta/_journal.json +0 -62
  459. package/src/db/schema.ts +0 -676
  460. package/src/db/seed.ts +0 -146
  461. package/src/di.ts +0 -81
  462. package/src/index.ts +0 -326
  463. package/src/lib/errors.ts +0 -139
  464. package/src/lib/result.ts +0 -44
  465. package/src/lib/webhookSignature.ts +0 -41
  466. package/src/plugins/appContext.ts +0 -76
  467. package/src/plugins/audit.ts +0 -42
  468. package/src/plugins/auth.ts +0 -230
  469. package/src/plugins/metrics.ts +0 -41
  470. package/src/plugins/mtls.ts +0 -94
  471. package/src/plugins/permissions.ts +0 -29
  472. package/src/plugins/rateLimit.ts +0 -133
  473. package/src/plugins/requestLogger.ts +0 -25
  474. package/src/plugins/tracing.ts +0 -22
  475. package/src/repositories/apiKey.ts +0 -158
  476. package/src/repositories/application.ts +0 -70
  477. package/src/repositories/audit.ts +0 -32
  478. package/src/repositories/index.ts +0 -9
  479. package/src/repositories/oidcConnection.ts +0 -111
  480. package/src/repositories/organization.ts +0 -167
  481. package/src/repositories/permission.ts +0 -153
  482. package/src/repositories/samlConnection.ts +0 -96
  483. package/src/repositories/session.ts +0 -86
  484. package/src/repositories/types.ts +0 -134
  485. package/src/repositories/user.ts +0 -161
  486. package/src/routes/admin/billing.ts +0 -48
  487. package/src/routes/admin/helpers.ts +0 -50
  488. package/src/routes/admin/index.ts +0 -16
  489. package/src/routes/admin/organizations.ts +0 -299
  490. package/src/routes/admin/permissions.ts +0 -80
  491. package/src/routes/admin/platform.ts +0 -335
  492. package/src/routes/admin/sso.ts +0 -138
  493. package/src/routes/admin/webhooks.ts +0 -73
  494. package/src/routes/admin.ts +0 -1
  495. package/src/routes/apiKeys.ts +0 -60
  496. package/src/routes/auth.ts +0 -214
  497. package/src/routes/authz.ts +0 -38
  498. package/src/routes/config.ts +0 -67
  499. package/src/routes/emailVerification.ts +0 -73
  500. package/src/routes/federation.ts +0 -156
  501. package/src/routes/helpers.ts +0 -17
  502. package/src/routes/magicLinks.ts +0 -107
  503. package/src/routes/oauth.ts +0 -167
  504. package/src/routes/oauth2.ts +0 -284
  505. package/src/routes/oidcEnterprise.ts +0 -166
  506. package/src/routes/password.ts +0 -90
  507. package/src/routes/profile.ts +0 -44
  508. package/src/routes/saml.ts +0 -209
  509. package/src/routes/scim.ts +0 -199
  510. package/src/routes/sdk.ts +0 -141
  511. package/src/routes/serviceAccounts.ts +0 -124
  512. package/src/routes/sessions.ts +0 -62
  513. package/src/routes/setup.ts +0 -315
  514. package/src/routes/smsOtp.ts +0 -67
  515. package/src/routes/totp.ts +0 -122
  516. package/src/routes/webauthn.ts +0 -147
  517. package/src/routes/workflows.ts +0 -157
  518. package/src/sdk/index.ts +0 -152
  519. package/src/sdk/types.ts +0 -54
  520. package/src/services/anomalyDetection.ts +0 -73
  521. package/src/services/application/authentication.ts +0 -75
  522. package/src/services/application/identity.ts +0 -56
  523. package/src/services/application/index.ts +0 -3
  524. package/src/services/application/organization.ts +0 -77
  525. package/src/services/applications.ts +0 -89
  526. package/src/services/audit.ts +0 -41
  527. package/src/services/auditExport.ts +0 -59
  528. package/src/services/billing.ts +0 -87
  529. package/src/services/cache.ts +0 -131
  530. package/src/services/configuration/profiles.ts +0 -115
  531. package/src/services/configuration.ts +0 -120
  532. package/src/services/connectors/google.ts +0 -92
  533. package/src/services/connectors/oidc.ts +0 -111
  534. package/src/services/connectors/registry.ts +0 -124
  535. package/src/services/connectors/types.ts +0 -38
  536. package/src/services/connectors/zitadel.ts +0 -77
  537. package/src/services/devices.ts +0 -76
  538. package/src/services/domain/authentication.ts +0 -279
  539. package/src/services/domain/authorization.ts +0 -49
  540. package/src/services/domain/identity.ts +0 -108
  541. package/src/services/domain/index.ts +0 -4
  542. package/src/services/domain/organization.ts +0 -114
  543. package/src/services/email.ts +0 -167
  544. package/src/services/emailVerification.ts +0 -75
  545. package/src/services/enterpriseSso.ts +0 -58
  546. package/src/services/events/bus.ts +0 -43
  547. package/src/services/events/subscribers/anomaly.ts +0 -13
  548. package/src/services/events/subscribers/auditLog.ts +0 -21
  549. package/src/services/events/subscribers/webhook.ts +0 -39
  550. package/src/services/events/subscribers/webhookDispatch.ts +0 -14
  551. package/src/services/events/types.ts +0 -106
  552. package/src/services/events/validate.ts +0 -118
  553. package/src/services/featureFlags.ts +0 -90
  554. package/src/services/features.ts +0 -22
  555. package/src/services/federation.ts +0 -30
  556. package/src/services/hibp.ts +0 -28
  557. package/src/services/ipControls.ts +0 -99
  558. package/src/services/magicLinks.ts +0 -51
  559. package/src/services/oauth2.ts +0 -216
  560. package/src/services/organizations.ts +0 -171
  561. package/src/services/permissions.ts +0 -146
  562. package/src/services/plugins/registry.ts +0 -242
  563. package/src/services/plugins/types.ts +0 -98
  564. package/src/services/queue/bullmq.ts +0 -104
  565. package/src/services/queue/inProcess.ts +0 -75
  566. package/src/services/queue/index.ts +0 -19
  567. package/src/services/queue/types.ts +0 -26
  568. package/src/services/redis.ts +0 -16
  569. package/src/services/secrets/awsKms.ts +0 -97
  570. package/src/services/secrets/azureKeyVault.ts +0 -171
  571. package/src/services/secrets/database.ts +0 -166
  572. package/src/services/secrets/environment.ts +0 -117
  573. package/src/services/secrets/index.ts +0 -50
  574. package/src/services/secrets/password.ts +0 -73
  575. package/src/services/secrets/provider.ts +0 -36
  576. package/src/services/secrets/vault.ts +0 -149
  577. package/src/services/secrets.ts +0 -2
  578. package/src/services/serviceAccounts.ts +0 -74
  579. package/src/services/setup/configWriter.ts +0 -200
  580. package/src/services/setup/diagnostics.ts +0 -76
  581. package/src/services/setup/token.ts +0 -42
  582. package/src/services/setup/types.ts +0 -40
  583. package/src/services/setup/validation.ts +0 -205
  584. package/src/services/sms.ts +0 -81
  585. package/src/services/smsOtp.ts +0 -74
  586. package/src/services/tokens.ts +0 -287
  587. package/src/services/totp.ts +0 -113
  588. package/src/services/users.ts +0 -239
  589. package/src/services/webauthn.ts +0 -193
  590. package/src/services/webhooks.ts +0 -190
  591. package/src/services/workflows/engine.ts +0 -125
  592. package/src/services/workflows/steps.ts +0 -129
  593. package/src/services/zitadel.ts +0 -277
  594. package/src/setup-server.ts +0 -71
  595. package/src/tests/errors.test.ts +0 -74
  596. package/src/tests/events.test.ts +0 -52
  597. package/src/tests/featureFlags.test.ts +0 -26
  598. package/src/tests/integration/queue.test.ts +0 -54
  599. package/src/tests/plugins.test.ts +0 -73
  600. package/src/tests/result.test.ts +0 -52
  601. package/src/tests/setup/configWriter.test.ts +0 -69
  602. package/src/tests/setup/validation.test.ts +0 -29
  603. package/src/tests/smoke.test.ts +0 -136
  604. package/src/types.ts +0 -70
@@ -1,3051 +0,0 @@
1
- {
2
- "id": "957dc892-e65e-435b-876c-4a09aa034ed7",
3
- "prevId": "8d81eee5-635c-4ce8-b476-f4336c81520b",
4
- "version": "7",
5
- "dialect": "postgresql",
6
- "tables": {
7
- "public.api_keys": {
8
- "name": "api_keys",
9
- "schema": "",
10
- "columns": {
11
- "id": {
12
- "name": "id",
13
- "type": "uuid",
14
- "primaryKey": true,
15
- "notNull": true,
16
- "default": "gen_random_uuid()"
17
- },
18
- "user_id": {
19
- "name": "user_id",
20
- "type": "uuid",
21
- "primaryKey": false,
22
- "notNull": false
23
- },
24
- "service_account_id": {
25
- "name": "service_account_id",
26
- "type": "uuid",
27
- "primaryKey": false,
28
- "notNull": false
29
- },
30
- "org_id": {
31
- "name": "org_id",
32
- "type": "uuid",
33
- "primaryKey": false,
34
- "notNull": false
35
- },
36
- "app_id": {
37
- "name": "app_id",
38
- "type": "uuid",
39
- "primaryKey": false,
40
- "notNull": false
41
- },
42
- "name": {
43
- "name": "name",
44
- "type": "text",
45
- "primaryKey": false,
46
- "notNull": false
47
- },
48
- "prefix": {
49
- "name": "prefix",
50
- "type": "text",
51
- "primaryKey": false,
52
- "notNull": true
53
- },
54
- "key_hash": {
55
- "name": "key_hash",
56
- "type": "text",
57
- "primaryKey": false,
58
- "notNull": true
59
- },
60
- "scopes": {
61
- "name": "scopes",
62
- "type": "text[]",
63
- "primaryKey": false,
64
- "notNull": true,
65
- "default": "'{\"api:read\"}'::text[]"
66
- },
67
- "last_used_at": {
68
- "name": "last_used_at",
69
- "type": "timestamp with time zone",
70
- "primaryKey": false,
71
- "notNull": false
72
- },
73
- "expires_at": {
74
- "name": "expires_at",
75
- "type": "timestamp with time zone",
76
- "primaryKey": false,
77
- "notNull": false
78
- },
79
- "revoked_at": {
80
- "name": "revoked_at",
81
- "type": "timestamp with time zone",
82
- "primaryKey": false,
83
- "notNull": false
84
- },
85
- "created_at": {
86
- "name": "created_at",
87
- "type": "timestamp with time zone",
88
- "primaryKey": false,
89
- "notNull": true,
90
- "default": "now()"
91
- }
92
- },
93
- "indexes": {
94
- "api_keys_user_idx": {
95
- "name": "api_keys_user_idx",
96
- "columns": [
97
- {
98
- "expression": "user_id",
99
- "isExpression": false,
100
- "asc": true,
101
- "nulls": "last"
102
- }
103
- ],
104
- "isUnique": false,
105
- "concurrently": false,
106
- "method": "btree",
107
- "with": {}
108
- },
109
- "api_keys_service_account_idx": {
110
- "name": "api_keys_service_account_idx",
111
- "columns": [
112
- {
113
- "expression": "service_account_id",
114
- "isExpression": false,
115
- "asc": true,
116
- "nulls": "last"
117
- }
118
- ],
119
- "isUnique": false,
120
- "concurrently": false,
121
- "method": "btree",
122
- "with": {}
123
- },
124
- "api_keys_prefix_idx": {
125
- "name": "api_keys_prefix_idx",
126
- "columns": [
127
- {
128
- "expression": "prefix",
129
- "isExpression": false,
130
- "asc": true,
131
- "nulls": "last"
132
- }
133
- ],
134
- "isUnique": false,
135
- "concurrently": false,
136
- "method": "btree",
137
- "with": {}
138
- }
139
- },
140
- "foreignKeys": {
141
- "api_keys_user_id_users_id_fk": {
142
- "name": "api_keys_user_id_users_id_fk",
143
- "tableFrom": "api_keys",
144
- "tableTo": "users",
145
- "columnsFrom": [
146
- "user_id"
147
- ],
148
- "columnsTo": [
149
- "id"
150
- ],
151
- "onDelete": "cascade",
152
- "onUpdate": "no action"
153
- },
154
- "api_keys_service_account_id_service_accounts_id_fk": {
155
- "name": "api_keys_service_account_id_service_accounts_id_fk",
156
- "tableFrom": "api_keys",
157
- "tableTo": "service_accounts",
158
- "columnsFrom": [
159
- "service_account_id"
160
- ],
161
- "columnsTo": [
162
- "id"
163
- ],
164
- "onDelete": "cascade",
165
- "onUpdate": "no action"
166
- },
167
- "api_keys_org_id_organizations_id_fk": {
168
- "name": "api_keys_org_id_organizations_id_fk",
169
- "tableFrom": "api_keys",
170
- "tableTo": "organizations",
171
- "columnsFrom": [
172
- "org_id"
173
- ],
174
- "columnsTo": [
175
- "id"
176
- ],
177
- "onDelete": "set null",
178
- "onUpdate": "no action"
179
- },
180
- "api_keys_app_id_applications_id_fk": {
181
- "name": "api_keys_app_id_applications_id_fk",
182
- "tableFrom": "api_keys",
183
- "tableTo": "applications",
184
- "columnsFrom": [
185
- "app_id"
186
- ],
187
- "columnsTo": [
188
- "id"
189
- ],
190
- "onDelete": "set null",
191
- "onUpdate": "no action"
192
- }
193
- },
194
- "compositePrimaryKeys": {},
195
- "uniqueConstraints": {}
196
- },
197
- "public.applications": {
198
- "name": "applications",
199
- "schema": "",
200
- "columns": {
201
- "id": {
202
- "name": "id",
203
- "type": "uuid",
204
- "primaryKey": true,
205
- "notNull": true,
206
- "default": "gen_random_uuid()"
207
- },
208
- "org_id": {
209
- "name": "org_id",
210
- "type": "uuid",
211
- "primaryKey": false,
212
- "notNull": true
213
- },
214
- "client_id": {
215
- "name": "client_id",
216
- "type": "text",
217
- "primaryKey": false,
218
- "notNull": true
219
- },
220
- "client_secret_hash": {
221
- "name": "client_secret_hash",
222
- "type": "text",
223
- "primaryKey": false,
224
- "notNull": true
225
- },
226
- "name": {
227
- "name": "name",
228
- "type": "text",
229
- "primaryKey": false,
230
- "notNull": true
231
- },
232
- "redirect_uris": {
233
- "name": "redirect_uris",
234
- "type": "text[]",
235
- "primaryKey": false,
236
- "notNull": true,
237
- "default": "'{}'::text[]"
238
- },
239
- "allowed_origins": {
240
- "name": "allowed_origins",
241
- "type": "text[]",
242
- "primaryKey": false,
243
- "notNull": true,
244
- "default": "'{}'::text[]"
245
- },
246
- "branding": {
247
- "name": "branding",
248
- "type": "jsonb",
249
- "primaryKey": false,
250
- "notNull": true,
251
- "default": "'{}'::jsonb"
252
- },
253
- "is_active": {
254
- "name": "is_active",
255
- "type": "boolean",
256
- "primaryKey": false,
257
- "notNull": true,
258
- "default": true
259
- },
260
- "created_at": {
261
- "name": "created_at",
262
- "type": "timestamp with time zone",
263
- "primaryKey": false,
264
- "notNull": true,
265
- "default": "now()"
266
- },
267
- "updated_at": {
268
- "name": "updated_at",
269
- "type": "timestamp with time zone",
270
- "primaryKey": false,
271
- "notNull": true,
272
- "default": "now()"
273
- }
274
- },
275
- "indexes": {
276
- "applications_org_idx": {
277
- "name": "applications_org_idx",
278
- "columns": [
279
- {
280
- "expression": "org_id",
281
- "isExpression": false,
282
- "asc": true,
283
- "nulls": "last"
284
- }
285
- ],
286
- "isUnique": false,
287
- "concurrently": false,
288
- "method": "btree",
289
- "with": {}
290
- },
291
- "applications_client_id_idx": {
292
- "name": "applications_client_id_idx",
293
- "columns": [
294
- {
295
- "expression": "client_id",
296
- "isExpression": false,
297
- "asc": true,
298
- "nulls": "last"
299
- }
300
- ],
301
- "isUnique": false,
302
- "concurrently": false,
303
- "method": "btree",
304
- "with": {}
305
- }
306
- },
307
- "foreignKeys": {
308
- "applications_org_id_organizations_id_fk": {
309
- "name": "applications_org_id_organizations_id_fk",
310
- "tableFrom": "applications",
311
- "tableTo": "organizations",
312
- "columnsFrom": [
313
- "org_id"
314
- ],
315
- "columnsTo": [
316
- "id"
317
- ],
318
- "onDelete": "cascade",
319
- "onUpdate": "no action"
320
- }
321
- },
322
- "compositePrimaryKeys": {},
323
- "uniqueConstraints": {
324
- "applications_client_id_unique": {
325
- "name": "applications_client_id_unique",
326
- "nullsNotDistinct": false,
327
- "columns": [
328
- "client_id"
329
- ]
330
- }
331
- }
332
- },
333
- "public.audit_log": {
334
- "name": "audit_log",
335
- "schema": "",
336
- "columns": {
337
- "id": {
338
- "name": "id",
339
- "type": "uuid",
340
- "primaryKey": true,
341
- "notNull": true,
342
- "default": "gen_random_uuid()"
343
- },
344
- "user_id": {
345
- "name": "user_id",
346
- "type": "uuid",
347
- "primaryKey": false,
348
- "notNull": false
349
- },
350
- "org_id": {
351
- "name": "org_id",
352
- "type": "uuid",
353
- "primaryKey": false,
354
- "notNull": false
355
- },
356
- "app_id": {
357
- "name": "app_id",
358
- "type": "uuid",
359
- "primaryKey": false,
360
- "notNull": false
361
- },
362
- "request_id": {
363
- "name": "request_id",
364
- "type": "text",
365
- "primaryKey": false,
366
- "notNull": false
367
- },
368
- "event": {
369
- "name": "event",
370
- "type": "varchar(64)",
371
- "primaryKey": false,
372
- "notNull": true
373
- },
374
- "ip_address": {
375
- "name": "ip_address",
376
- "type": "text",
377
- "primaryKey": false,
378
- "notNull": false
379
- },
380
- "user_agent": {
381
- "name": "user_agent",
382
- "type": "text",
383
- "primaryKey": false,
384
- "notNull": false
385
- },
386
- "metadata": {
387
- "name": "metadata",
388
- "type": "jsonb",
389
- "primaryKey": false,
390
- "notNull": false
391
- },
392
- "created_at": {
393
- "name": "created_at",
394
- "type": "timestamp with time zone",
395
- "primaryKey": false,
396
- "notNull": true,
397
- "default": "now()"
398
- }
399
- },
400
- "indexes": {
401
- "audit_log_user_idx": {
402
- "name": "audit_log_user_idx",
403
- "columns": [
404
- {
405
- "expression": "user_id",
406
- "isExpression": false,
407
- "asc": true,
408
- "nulls": "last"
409
- }
410
- ],
411
- "isUnique": false,
412
- "concurrently": false,
413
- "method": "btree",
414
- "with": {}
415
- },
416
- "audit_log_event_idx": {
417
- "name": "audit_log_event_idx",
418
- "columns": [
419
- {
420
- "expression": "event",
421
- "isExpression": false,
422
- "asc": true,
423
- "nulls": "last"
424
- }
425
- ],
426
- "isUnique": false,
427
- "concurrently": false,
428
- "method": "btree",
429
- "with": {}
430
- },
431
- "audit_log_created_at_idx": {
432
- "name": "audit_log_created_at_idx",
433
- "columns": [
434
- {
435
- "expression": "created_at",
436
- "isExpression": false,
437
- "asc": true,
438
- "nulls": "last"
439
- }
440
- ],
441
- "isUnique": false,
442
- "concurrently": false,
443
- "method": "btree",
444
- "with": {}
445
- },
446
- "audit_log_org_idx": {
447
- "name": "audit_log_org_idx",
448
- "columns": [
449
- {
450
- "expression": "org_id",
451
- "isExpression": false,
452
- "asc": true,
453
- "nulls": "last"
454
- }
455
- ],
456
- "isUnique": false,
457
- "concurrently": false,
458
- "method": "btree",
459
- "with": {}
460
- },
461
- "audit_log_app_idx": {
462
- "name": "audit_log_app_idx",
463
- "columns": [
464
- {
465
- "expression": "app_id",
466
- "isExpression": false,
467
- "asc": true,
468
- "nulls": "last"
469
- }
470
- ],
471
- "isUnique": false,
472
- "concurrently": false,
473
- "method": "btree",
474
- "with": {}
475
- }
476
- },
477
- "foreignKeys": {
478
- "audit_log_user_id_users_id_fk": {
479
- "name": "audit_log_user_id_users_id_fk",
480
- "tableFrom": "audit_log",
481
- "tableTo": "users",
482
- "columnsFrom": [
483
- "user_id"
484
- ],
485
- "columnsTo": [
486
- "id"
487
- ],
488
- "onDelete": "set null",
489
- "onUpdate": "no action"
490
- },
491
- "audit_log_org_id_organizations_id_fk": {
492
- "name": "audit_log_org_id_organizations_id_fk",
493
- "tableFrom": "audit_log",
494
- "tableTo": "organizations",
495
- "columnsFrom": [
496
- "org_id"
497
- ],
498
- "columnsTo": [
499
- "id"
500
- ],
501
- "onDelete": "set null",
502
- "onUpdate": "no action"
503
- },
504
- "audit_log_app_id_applications_id_fk": {
505
- "name": "audit_log_app_id_applications_id_fk",
506
- "tableFrom": "audit_log",
507
- "tableTo": "applications",
508
- "columnsFrom": [
509
- "app_id"
510
- ],
511
- "columnsTo": [
512
- "id"
513
- ],
514
- "onDelete": "set null",
515
- "onUpdate": "no action"
516
- }
517
- },
518
- "compositePrimaryKeys": {},
519
- "uniqueConstraints": {}
520
- },
521
- "public.feature_flags": {
522
- "name": "feature_flags",
523
- "schema": "",
524
- "columns": {
525
- "id": {
526
- "name": "id",
527
- "type": "uuid",
528
- "primaryKey": true,
529
- "notNull": true,
530
- "default": "gen_random_uuid()"
531
- },
532
- "key": {
533
- "name": "key",
534
- "type": "text",
535
- "primaryKey": false,
536
- "notNull": true
537
- },
538
- "enabled": {
539
- "name": "enabled",
540
- "type": "boolean",
541
- "primaryKey": false,
542
- "notNull": true,
543
- "default": false
544
- },
545
- "description": {
546
- "name": "description",
547
- "type": "text",
548
- "primaryKey": false,
549
- "notNull": false
550
- },
551
- "updated_at": {
552
- "name": "updated_at",
553
- "type": "timestamp with time zone",
554
- "primaryKey": false,
555
- "notNull": true,
556
- "default": "now()"
557
- }
558
- },
559
- "indexes": {
560
- "feature_flags_key_idx": {
561
- "name": "feature_flags_key_idx",
562
- "columns": [
563
- {
564
- "expression": "key",
565
- "isExpression": false,
566
- "asc": true,
567
- "nulls": "last"
568
- }
569
- ],
570
- "isUnique": false,
571
- "concurrently": false,
572
- "method": "btree",
573
- "with": {}
574
- }
575
- },
576
- "foreignKeys": {},
577
- "compositePrimaryKeys": {},
578
- "uniqueConstraints": {
579
- "feature_flags_key_unique": {
580
- "name": "feature_flags_key_unique",
581
- "nullsNotDistinct": false,
582
- "columns": [
583
- "key"
584
- ]
585
- }
586
- }
587
- },
588
- "public.identity_providers": {
589
- "name": "identity_providers",
590
- "schema": "",
591
- "columns": {
592
- "id": {
593
- "name": "id",
594
- "type": "uuid",
595
- "primaryKey": true,
596
- "notNull": true,
597
- "default": "gen_random_uuid()"
598
- },
599
- "org_id": {
600
- "name": "org_id",
601
- "type": "uuid",
602
- "primaryKey": false,
603
- "notNull": true
604
- },
605
- "provider_type": {
606
- "name": "provider_type",
607
- "type": "text",
608
- "primaryKey": false,
609
- "notNull": true
610
- },
611
- "name": {
612
- "name": "name",
613
- "type": "text",
614
- "primaryKey": false,
615
- "notNull": true
616
- },
617
- "issuer": {
618
- "name": "issuer",
619
- "type": "text",
620
- "primaryKey": false,
621
- "notNull": false
622
- },
623
- "authorization_endpoint": {
624
- "name": "authorization_endpoint",
625
- "type": "text",
626
- "primaryKey": false,
627
- "notNull": false
628
- },
629
- "token_endpoint": {
630
- "name": "token_endpoint",
631
- "type": "text",
632
- "primaryKey": false,
633
- "notNull": false
634
- },
635
- "userinfo_endpoint": {
636
- "name": "userinfo_endpoint",
637
- "type": "text",
638
- "primaryKey": false,
639
- "notNull": false
640
- },
641
- "jwks_uri": {
642
- "name": "jwks_uri",
643
- "type": "text",
644
- "primaryKey": false,
645
- "notNull": false
646
- },
647
- "client_id": {
648
- "name": "client_id",
649
- "type": "text",
650
- "primaryKey": false,
651
- "notNull": false
652
- },
653
- "client_secret_encrypted": {
654
- "name": "client_secret_encrypted",
655
- "type": "text",
656
- "primaryKey": false,
657
- "notNull": false
658
- },
659
- "scopes": {
660
- "name": "scopes",
661
- "type": "text[]",
662
- "primaryKey": false,
663
- "notNull": true,
664
- "default": "'{\"openid\",\"profile\",\"email\"}'::text[]"
665
- },
666
- "attribute_mapping": {
667
- "name": "attribute_mapping",
668
- "type": "jsonb",
669
- "primaryKey": false,
670
- "notNull": true,
671
- "default": "'{}'::jsonb"
672
- },
673
- "is_active": {
674
- "name": "is_active",
675
- "type": "boolean",
676
- "primaryKey": false,
677
- "notNull": true,
678
- "default": true
679
- },
680
- "is_federation": {
681
- "name": "is_federation",
682
- "type": "boolean",
683
- "primaryKey": false,
684
- "notNull": true,
685
- "default": true
686
- },
687
- "created_at": {
688
- "name": "created_at",
689
- "type": "timestamp with time zone",
690
- "primaryKey": false,
691
- "notNull": true,
692
- "default": "now()"
693
- },
694
- "updated_at": {
695
- "name": "updated_at",
696
- "type": "timestamp with time zone",
697
- "primaryKey": false,
698
- "notNull": true,
699
- "default": "now()"
700
- }
701
- },
702
- "indexes": {
703
- "identity_providers_org_idx": {
704
- "name": "identity_providers_org_idx",
705
- "columns": [
706
- {
707
- "expression": "org_id",
708
- "isExpression": false,
709
- "asc": true,
710
- "nulls": "last"
711
- }
712
- ],
713
- "isUnique": false,
714
- "concurrently": false,
715
- "method": "btree",
716
- "with": {}
717
- },
718
- "identity_providers_type_idx": {
719
- "name": "identity_providers_type_idx",
720
- "columns": [
721
- {
722
- "expression": "provider_type",
723
- "isExpression": false,
724
- "asc": true,
725
- "nulls": "last"
726
- }
727
- ],
728
- "isUnique": false,
729
- "concurrently": false,
730
- "method": "btree",
731
- "with": {}
732
- }
733
- },
734
- "foreignKeys": {
735
- "identity_providers_org_id_organizations_id_fk": {
736
- "name": "identity_providers_org_id_organizations_id_fk",
737
- "tableFrom": "identity_providers",
738
- "tableTo": "organizations",
739
- "columnsFrom": [
740
- "org_id"
741
- ],
742
- "columnsTo": [
743
- "id"
744
- ],
745
- "onDelete": "cascade",
746
- "onUpdate": "no action"
747
- }
748
- },
749
- "compositePrimaryKeys": {},
750
- "uniqueConstraints": {}
751
- },
752
- "public.magic_links": {
753
- "name": "magic_links",
754
- "schema": "",
755
- "columns": {
756
- "id": {
757
- "name": "id",
758
- "type": "uuid",
759
- "primaryKey": true,
760
- "notNull": true,
761
- "default": "gen_random_uuid()"
762
- },
763
- "user_id": {
764
- "name": "user_id",
765
- "type": "uuid",
766
- "primaryKey": false,
767
- "notNull": true
768
- },
769
- "token_hash": {
770
- "name": "token_hash",
771
- "type": "text",
772
- "primaryKey": false,
773
- "notNull": true
774
- },
775
- "used_at": {
776
- "name": "used_at",
777
- "type": "timestamp with time zone",
778
- "primaryKey": false,
779
- "notNull": false
780
- },
781
- "expires_at": {
782
- "name": "expires_at",
783
- "type": "timestamp with time zone",
784
- "primaryKey": false,
785
- "notNull": true
786
- },
787
- "created_at": {
788
- "name": "created_at",
789
- "type": "timestamp with time zone",
790
- "primaryKey": false,
791
- "notNull": true,
792
- "default": "now()"
793
- }
794
- },
795
- "indexes": {
796
- "magic_links_user_idx": {
797
- "name": "magic_links_user_idx",
798
- "columns": [
799
- {
800
- "expression": "user_id",
801
- "isExpression": false,
802
- "asc": true,
803
- "nulls": "last"
804
- }
805
- ],
806
- "isUnique": false,
807
- "concurrently": false,
808
- "method": "btree",
809
- "with": {}
810
- },
811
- "magic_links_hash_idx": {
812
- "name": "magic_links_hash_idx",
813
- "columns": [
814
- {
815
- "expression": "token_hash",
816
- "isExpression": false,
817
- "asc": true,
818
- "nulls": "last"
819
- }
820
- ],
821
- "isUnique": false,
822
- "concurrently": false,
823
- "method": "btree",
824
- "with": {}
825
- }
826
- },
827
- "foreignKeys": {
828
- "magic_links_user_id_users_id_fk": {
829
- "name": "magic_links_user_id_users_id_fk",
830
- "tableFrom": "magic_links",
831
- "tableTo": "users",
832
- "columnsFrom": [
833
- "user_id"
834
- ],
835
- "columnsTo": [
836
- "id"
837
- ],
838
- "onDelete": "cascade",
839
- "onUpdate": "no action"
840
- }
841
- },
842
- "compositePrimaryKeys": {},
843
- "uniqueConstraints": {}
844
- },
845
- "public.oauth2_authorization_codes": {
846
- "name": "oauth2_authorization_codes",
847
- "schema": "",
848
- "columns": {
849
- "id": {
850
- "name": "id",
851
- "type": "uuid",
852
- "primaryKey": true,
853
- "notNull": true,
854
- "default": "gen_random_uuid()"
855
- },
856
- "app_id": {
857
- "name": "app_id",
858
- "type": "uuid",
859
- "primaryKey": false,
860
- "notNull": true
861
- },
862
- "user_id": {
863
- "name": "user_id",
864
- "type": "uuid",
865
- "primaryKey": false,
866
- "notNull": true
867
- },
868
- "code_hash": {
869
- "name": "code_hash",
870
- "type": "text",
871
- "primaryKey": false,
872
- "notNull": true
873
- },
874
- "challenge": {
875
- "name": "challenge",
876
- "type": "text",
877
- "primaryKey": false,
878
- "notNull": false
879
- },
880
- "challenge_method": {
881
- "name": "challenge_method",
882
- "type": "text",
883
- "primaryKey": false,
884
- "notNull": false
885
- },
886
- "redirect_uri": {
887
- "name": "redirect_uri",
888
- "type": "text",
889
- "primaryKey": false,
890
- "notNull": false
891
- },
892
- "scopes": {
893
- "name": "scopes",
894
- "type": "text[]",
895
- "primaryKey": false,
896
- "notNull": true,
897
- "default": "'{}'::text[]"
898
- },
899
- "nonce": {
900
- "name": "nonce",
901
- "type": "text",
902
- "primaryKey": false,
903
- "notNull": false
904
- },
905
- "expires_at": {
906
- "name": "expires_at",
907
- "type": "timestamp with time zone",
908
- "primaryKey": false,
909
- "notNull": true
910
- },
911
- "used_at": {
912
- "name": "used_at",
913
- "type": "timestamp with time zone",
914
- "primaryKey": false,
915
- "notNull": false
916
- },
917
- "created_at": {
918
- "name": "created_at",
919
- "type": "timestamp with time zone",
920
- "primaryKey": false,
921
- "notNull": true,
922
- "default": "now()"
923
- }
924
- },
925
- "indexes": {
926
- "oauth2_authorization_codes_app_idx": {
927
- "name": "oauth2_authorization_codes_app_idx",
928
- "columns": [
929
- {
930
- "expression": "app_id",
931
- "isExpression": false,
932
- "asc": true,
933
- "nulls": "last"
934
- }
935
- ],
936
- "isUnique": false,
937
- "concurrently": false,
938
- "method": "btree",
939
- "with": {}
940
- },
941
- "oauth2_authorization_codes_user_idx": {
942
- "name": "oauth2_authorization_codes_user_idx",
943
- "columns": [
944
- {
945
- "expression": "user_id",
946
- "isExpression": false,
947
- "asc": true,
948
- "nulls": "last"
949
- }
950
- ],
951
- "isUnique": false,
952
- "concurrently": false,
953
- "method": "btree",
954
- "with": {}
955
- },
956
- "oauth2_authorization_codes_hash_idx": {
957
- "name": "oauth2_authorization_codes_hash_idx",
958
- "columns": [
959
- {
960
- "expression": "code_hash",
961
- "isExpression": false,
962
- "asc": true,
963
- "nulls": "last"
964
- }
965
- ],
966
- "isUnique": false,
967
- "concurrently": false,
968
- "method": "btree",
969
- "with": {}
970
- }
971
- },
972
- "foreignKeys": {
973
- "oauth2_authorization_codes_app_id_applications_id_fk": {
974
- "name": "oauth2_authorization_codes_app_id_applications_id_fk",
975
- "tableFrom": "oauth2_authorization_codes",
976
- "tableTo": "applications",
977
- "columnsFrom": [
978
- "app_id"
979
- ],
980
- "columnsTo": [
981
- "id"
982
- ],
983
- "onDelete": "cascade",
984
- "onUpdate": "no action"
985
- },
986
- "oauth2_authorization_codes_user_id_users_id_fk": {
987
- "name": "oauth2_authorization_codes_user_id_users_id_fk",
988
- "tableFrom": "oauth2_authorization_codes",
989
- "tableTo": "users",
990
- "columnsFrom": [
991
- "user_id"
992
- ],
993
- "columnsTo": [
994
- "id"
995
- ],
996
- "onDelete": "cascade",
997
- "onUpdate": "no action"
998
- }
999
- },
1000
- "compositePrimaryKeys": {},
1001
- "uniqueConstraints": {}
1002
- },
1003
- "public.oauth2_consents": {
1004
- "name": "oauth2_consents",
1005
- "schema": "",
1006
- "columns": {
1007
- "id": {
1008
- "name": "id",
1009
- "type": "uuid",
1010
- "primaryKey": true,
1011
- "notNull": true,
1012
- "default": "gen_random_uuid()"
1013
- },
1014
- "app_id": {
1015
- "name": "app_id",
1016
- "type": "uuid",
1017
- "primaryKey": false,
1018
- "notNull": true
1019
- },
1020
- "user_id": {
1021
- "name": "user_id",
1022
- "type": "uuid",
1023
- "primaryKey": false,
1024
- "notNull": true
1025
- },
1026
- "scopes": {
1027
- "name": "scopes",
1028
- "type": "text[]",
1029
- "primaryKey": false,
1030
- "notNull": true,
1031
- "default": "'{}'::text[]"
1032
- },
1033
- "granted_at": {
1034
- "name": "granted_at",
1035
- "type": "timestamp with time zone",
1036
- "primaryKey": false,
1037
- "notNull": true,
1038
- "default": "now()"
1039
- },
1040
- "revoked_at": {
1041
- "name": "revoked_at",
1042
- "type": "timestamp with time zone",
1043
- "primaryKey": false,
1044
- "notNull": false
1045
- }
1046
- },
1047
- "indexes": {
1048
- "oauth2_consents_app_idx": {
1049
- "name": "oauth2_consents_app_idx",
1050
- "columns": [
1051
- {
1052
- "expression": "app_id",
1053
- "isExpression": false,
1054
- "asc": true,
1055
- "nulls": "last"
1056
- }
1057
- ],
1058
- "isUnique": false,
1059
- "concurrently": false,
1060
- "method": "btree",
1061
- "with": {}
1062
- },
1063
- "oauth2_consents_user_idx": {
1064
- "name": "oauth2_consents_user_idx",
1065
- "columns": [
1066
- {
1067
- "expression": "user_id",
1068
- "isExpression": false,
1069
- "asc": true,
1070
- "nulls": "last"
1071
- }
1072
- ],
1073
- "isUnique": false,
1074
- "concurrently": false,
1075
- "method": "btree",
1076
- "with": {}
1077
- }
1078
- },
1079
- "foreignKeys": {
1080
- "oauth2_consents_app_id_applications_id_fk": {
1081
- "name": "oauth2_consents_app_id_applications_id_fk",
1082
- "tableFrom": "oauth2_consents",
1083
- "tableTo": "applications",
1084
- "columnsFrom": [
1085
- "app_id"
1086
- ],
1087
- "columnsTo": [
1088
- "id"
1089
- ],
1090
- "onDelete": "cascade",
1091
- "onUpdate": "no action"
1092
- },
1093
- "oauth2_consents_user_id_users_id_fk": {
1094
- "name": "oauth2_consents_user_id_users_id_fk",
1095
- "tableFrom": "oauth2_consents",
1096
- "tableTo": "users",
1097
- "columnsFrom": [
1098
- "user_id"
1099
- ],
1100
- "columnsTo": [
1101
- "id"
1102
- ],
1103
- "onDelete": "cascade",
1104
- "onUpdate": "no action"
1105
- }
1106
- },
1107
- "compositePrimaryKeys": {},
1108
- "uniqueConstraints": {
1109
- "oauth2_consents_unique": {
1110
- "name": "oauth2_consents_unique",
1111
- "nullsNotDistinct": false,
1112
- "columns": [
1113
- "app_id",
1114
- "user_id"
1115
- ]
1116
- }
1117
- }
1118
- },
1119
- "public.oidc_connections": {
1120
- "name": "oidc_connections",
1121
- "schema": "",
1122
- "columns": {
1123
- "id": {
1124
- "name": "id",
1125
- "type": "uuid",
1126
- "primaryKey": true,
1127
- "notNull": true,
1128
- "default": "gen_random_uuid()"
1129
- },
1130
- "org_id": {
1131
- "name": "org_id",
1132
- "type": "uuid",
1133
- "primaryKey": false,
1134
- "notNull": true
1135
- },
1136
- "name": {
1137
- "name": "name",
1138
- "type": "text",
1139
- "primaryKey": false,
1140
- "notNull": true
1141
- },
1142
- "issuer": {
1143
- "name": "issuer",
1144
- "type": "text",
1145
- "primaryKey": false,
1146
- "notNull": true
1147
- },
1148
- "authorization_endpoint": {
1149
- "name": "authorization_endpoint",
1150
- "type": "text",
1151
- "primaryKey": false,
1152
- "notNull": true
1153
- },
1154
- "token_endpoint": {
1155
- "name": "token_endpoint",
1156
- "type": "text",
1157
- "primaryKey": false,
1158
- "notNull": true
1159
- },
1160
- "userinfo_endpoint": {
1161
- "name": "userinfo_endpoint",
1162
- "type": "text",
1163
- "primaryKey": false,
1164
- "notNull": false
1165
- },
1166
- "jwks_uri": {
1167
- "name": "jwks_uri",
1168
- "type": "text",
1169
- "primaryKey": false,
1170
- "notNull": false
1171
- },
1172
- "client_id": {
1173
- "name": "client_id",
1174
- "type": "text",
1175
- "primaryKey": false,
1176
- "notNull": true
1177
- },
1178
- "client_secret": {
1179
- "name": "client_secret",
1180
- "type": "text",
1181
- "primaryKey": false,
1182
- "notNull": true
1183
- },
1184
- "scopes": {
1185
- "name": "scopes",
1186
- "type": "text[]",
1187
- "primaryKey": false,
1188
- "notNull": true,
1189
- "default": "'{\"openid\",\"profile\",\"email\"}'::text[]"
1190
- },
1191
- "attribute_mapping": {
1192
- "name": "attribute_mapping",
1193
- "type": "jsonb",
1194
- "primaryKey": false,
1195
- "notNull": true,
1196
- "default": "'{}'::jsonb"
1197
- },
1198
- "is_active": {
1199
- "name": "is_active",
1200
- "type": "boolean",
1201
- "primaryKey": false,
1202
- "notNull": true,
1203
- "default": true
1204
- },
1205
- "created_at": {
1206
- "name": "created_at",
1207
- "type": "timestamp with time zone",
1208
- "primaryKey": false,
1209
- "notNull": true,
1210
- "default": "now()"
1211
- },
1212
- "updated_at": {
1213
- "name": "updated_at",
1214
- "type": "timestamp with time zone",
1215
- "primaryKey": false,
1216
- "notNull": true,
1217
- "default": "now()"
1218
- }
1219
- },
1220
- "indexes": {
1221
- "oidc_connections_org_idx": {
1222
- "name": "oidc_connections_org_idx",
1223
- "columns": [
1224
- {
1225
- "expression": "org_id",
1226
- "isExpression": false,
1227
- "asc": true,
1228
- "nulls": "last"
1229
- }
1230
- ],
1231
- "isUnique": false,
1232
- "concurrently": false,
1233
- "method": "btree",
1234
- "with": {}
1235
- }
1236
- },
1237
- "foreignKeys": {
1238
- "oidc_connections_org_id_organizations_id_fk": {
1239
- "name": "oidc_connections_org_id_organizations_id_fk",
1240
- "tableFrom": "oidc_connections",
1241
- "tableTo": "organizations",
1242
- "columnsFrom": [
1243
- "org_id"
1244
- ],
1245
- "columnsTo": [
1246
- "id"
1247
- ],
1248
- "onDelete": "cascade",
1249
- "onUpdate": "no action"
1250
- }
1251
- },
1252
- "compositePrimaryKeys": {},
1253
- "uniqueConstraints": {}
1254
- },
1255
- "public.org_memberships": {
1256
- "name": "org_memberships",
1257
- "schema": "",
1258
- "columns": {
1259
- "id": {
1260
- "name": "id",
1261
- "type": "uuid",
1262
- "primaryKey": true,
1263
- "notNull": true,
1264
- "default": "gen_random_uuid()"
1265
- },
1266
- "org_id": {
1267
- "name": "org_id",
1268
- "type": "uuid",
1269
- "primaryKey": false,
1270
- "notNull": true
1271
- },
1272
- "user_id": {
1273
- "name": "user_id",
1274
- "type": "uuid",
1275
- "primaryKey": false,
1276
- "notNull": true
1277
- },
1278
- "role": {
1279
- "name": "role",
1280
- "type": "text",
1281
- "primaryKey": false,
1282
- "notNull": true,
1283
- "default": "'member'"
1284
- },
1285
- "created_at": {
1286
- "name": "created_at",
1287
- "type": "timestamp with time zone",
1288
- "primaryKey": false,
1289
- "notNull": true,
1290
- "default": "now()"
1291
- },
1292
- "updated_at": {
1293
- "name": "updated_at",
1294
- "type": "timestamp with time zone",
1295
- "primaryKey": false,
1296
- "notNull": true,
1297
- "default": "now()"
1298
- }
1299
- },
1300
- "indexes": {
1301
- "org_memberships_org_idx": {
1302
- "name": "org_memberships_org_idx",
1303
- "columns": [
1304
- {
1305
- "expression": "org_id",
1306
- "isExpression": false,
1307
- "asc": true,
1308
- "nulls": "last"
1309
- }
1310
- ],
1311
- "isUnique": false,
1312
- "concurrently": false,
1313
- "method": "btree",
1314
- "with": {}
1315
- },
1316
- "org_memberships_user_idx": {
1317
- "name": "org_memberships_user_idx",
1318
- "columns": [
1319
- {
1320
- "expression": "user_id",
1321
- "isExpression": false,
1322
- "asc": true,
1323
- "nulls": "last"
1324
- }
1325
- ],
1326
- "isUnique": false,
1327
- "concurrently": false,
1328
- "method": "btree",
1329
- "with": {}
1330
- }
1331
- },
1332
- "foreignKeys": {
1333
- "org_memberships_org_id_organizations_id_fk": {
1334
- "name": "org_memberships_org_id_organizations_id_fk",
1335
- "tableFrom": "org_memberships",
1336
- "tableTo": "organizations",
1337
- "columnsFrom": [
1338
- "org_id"
1339
- ],
1340
- "columnsTo": [
1341
- "id"
1342
- ],
1343
- "onDelete": "cascade",
1344
- "onUpdate": "no action"
1345
- },
1346
- "org_memberships_user_id_users_id_fk": {
1347
- "name": "org_memberships_user_id_users_id_fk",
1348
- "tableFrom": "org_memberships",
1349
- "tableTo": "users",
1350
- "columnsFrom": [
1351
- "user_id"
1352
- ],
1353
- "columnsTo": [
1354
- "id"
1355
- ],
1356
- "onDelete": "cascade",
1357
- "onUpdate": "no action"
1358
- }
1359
- },
1360
- "compositePrimaryKeys": {},
1361
- "uniqueConstraints": {
1362
- "org_memberships_unique": {
1363
- "name": "org_memberships_unique",
1364
- "nullsNotDistinct": false,
1365
- "columns": [
1366
- "org_id",
1367
- "user_id"
1368
- ]
1369
- }
1370
- }
1371
- },
1372
- "public.organizations": {
1373
- "name": "organizations",
1374
- "schema": "",
1375
- "columns": {
1376
- "id": {
1377
- "name": "id",
1378
- "type": "uuid",
1379
- "primaryKey": true,
1380
- "notNull": true,
1381
- "default": "gen_random_uuid()"
1382
- },
1383
- "name": {
1384
- "name": "name",
1385
- "type": "text",
1386
- "primaryKey": false,
1387
- "notNull": true
1388
- },
1389
- "slug": {
1390
- "name": "slug",
1391
- "type": "text",
1392
- "primaryKey": false,
1393
- "notNull": true
1394
- },
1395
- "plan": {
1396
- "name": "plan",
1397
- "type": "text",
1398
- "primaryKey": false,
1399
- "notNull": true,
1400
- "default": "'free'"
1401
- },
1402
- "branding": {
1403
- "name": "branding",
1404
- "type": "jsonb",
1405
- "primaryKey": false,
1406
- "notNull": true,
1407
- "default": "'{}'::jsonb"
1408
- },
1409
- "created_at": {
1410
- "name": "created_at",
1411
- "type": "timestamp with time zone",
1412
- "primaryKey": false,
1413
- "notNull": true,
1414
- "default": "now()"
1415
- },
1416
- "updated_at": {
1417
- "name": "updated_at",
1418
- "type": "timestamp with time zone",
1419
- "primaryKey": false,
1420
- "notNull": true,
1421
- "default": "now()"
1422
- }
1423
- },
1424
- "indexes": {
1425
- "organizations_slug_idx": {
1426
- "name": "organizations_slug_idx",
1427
- "columns": [
1428
- {
1429
- "expression": "slug",
1430
- "isExpression": false,
1431
- "asc": true,
1432
- "nulls": "last"
1433
- }
1434
- ],
1435
- "isUnique": false,
1436
- "concurrently": false,
1437
- "method": "btree",
1438
- "with": {}
1439
- }
1440
- },
1441
- "foreignKeys": {},
1442
- "compositePrimaryKeys": {},
1443
- "uniqueConstraints": {
1444
- "organizations_slug_unique": {
1445
- "name": "organizations_slug_unique",
1446
- "nullsNotDistinct": false,
1447
- "columns": [
1448
- "slug"
1449
- ]
1450
- }
1451
- }
1452
- },
1453
- "public.password_reset_tokens": {
1454
- "name": "password_reset_tokens",
1455
- "schema": "",
1456
- "columns": {
1457
- "id": {
1458
- "name": "id",
1459
- "type": "uuid",
1460
- "primaryKey": true,
1461
- "notNull": true,
1462
- "default": "gen_random_uuid()"
1463
- },
1464
- "user_id": {
1465
- "name": "user_id",
1466
- "type": "uuid",
1467
- "primaryKey": false,
1468
- "notNull": true
1469
- },
1470
- "token_hash": {
1471
- "name": "token_hash",
1472
- "type": "text",
1473
- "primaryKey": false,
1474
- "notNull": true
1475
- },
1476
- "used_at": {
1477
- "name": "used_at",
1478
- "type": "timestamp with time zone",
1479
- "primaryKey": false,
1480
- "notNull": false
1481
- },
1482
- "expires_at": {
1483
- "name": "expires_at",
1484
- "type": "timestamp with time zone",
1485
- "primaryKey": false,
1486
- "notNull": true
1487
- },
1488
- "created_at": {
1489
- "name": "created_at",
1490
- "type": "timestamp with time zone",
1491
- "primaryKey": false,
1492
- "notNull": true,
1493
- "default": "now()"
1494
- }
1495
- },
1496
- "indexes": {
1497
- "password_reset_tokens_user_idx": {
1498
- "name": "password_reset_tokens_user_idx",
1499
- "columns": [
1500
- {
1501
- "expression": "user_id",
1502
- "isExpression": false,
1503
- "asc": true,
1504
- "nulls": "last"
1505
- }
1506
- ],
1507
- "isUnique": false,
1508
- "concurrently": false,
1509
- "method": "btree",
1510
- "with": {}
1511
- },
1512
- "password_reset_tokens_hash_idx": {
1513
- "name": "password_reset_tokens_hash_idx",
1514
- "columns": [
1515
- {
1516
- "expression": "token_hash",
1517
- "isExpression": false,
1518
- "asc": true,
1519
- "nulls": "last"
1520
- }
1521
- ],
1522
- "isUnique": false,
1523
- "concurrently": false,
1524
- "method": "btree",
1525
- "with": {}
1526
- }
1527
- },
1528
- "foreignKeys": {
1529
- "password_reset_tokens_user_id_users_id_fk": {
1530
- "name": "password_reset_tokens_user_id_users_id_fk",
1531
- "tableFrom": "password_reset_tokens",
1532
- "tableTo": "users",
1533
- "columnsFrom": [
1534
- "user_id"
1535
- ],
1536
- "columnsTo": [
1537
- "id"
1538
- ],
1539
- "onDelete": "cascade",
1540
- "onUpdate": "no action"
1541
- }
1542
- },
1543
- "compositePrimaryKeys": {},
1544
- "uniqueConstraints": {}
1545
- },
1546
- "public.permissions": {
1547
- "name": "permissions",
1548
- "schema": "",
1549
- "columns": {
1550
- "id": {
1551
- "name": "id",
1552
- "type": "uuid",
1553
- "primaryKey": true,
1554
- "notNull": true,
1555
- "default": "gen_random_uuid()"
1556
- },
1557
- "resource": {
1558
- "name": "resource",
1559
- "type": "text",
1560
- "primaryKey": false,
1561
- "notNull": true
1562
- },
1563
- "action": {
1564
- "name": "action",
1565
- "type": "text",
1566
- "primaryKey": false,
1567
- "notNull": true
1568
- },
1569
- "description": {
1570
- "name": "description",
1571
- "type": "text",
1572
- "primaryKey": false,
1573
- "notNull": false
1574
- },
1575
- "created_at": {
1576
- "name": "created_at",
1577
- "type": "timestamp with time zone",
1578
- "primaryKey": false,
1579
- "notNull": true,
1580
- "default": "now()"
1581
- }
1582
- },
1583
- "indexes": {},
1584
- "foreignKeys": {},
1585
- "compositePrimaryKeys": {},
1586
- "uniqueConstraints": {
1587
- "permissions_resource_action_idx": {
1588
- "name": "permissions_resource_action_idx",
1589
- "nullsNotDistinct": false,
1590
- "columns": [
1591
- "resource",
1592
- "action"
1593
- ]
1594
- }
1595
- }
1596
- },
1597
- "public.refresh_tokens": {
1598
- "name": "refresh_tokens",
1599
- "schema": "",
1600
- "columns": {
1601
- "id": {
1602
- "name": "id",
1603
- "type": "uuid",
1604
- "primaryKey": true,
1605
- "notNull": true,
1606
- "default": "gen_random_uuid()"
1607
- },
1608
- "user_id": {
1609
- "name": "user_id",
1610
- "type": "uuid",
1611
- "primaryKey": false,
1612
- "notNull": true
1613
- },
1614
- "app_id": {
1615
- "name": "app_id",
1616
- "type": "uuid",
1617
- "primaryKey": false,
1618
- "notNull": false
1619
- },
1620
- "token_hash": {
1621
- "name": "token_hash",
1622
- "type": "text",
1623
- "primaryKey": false,
1624
- "notNull": true
1625
- },
1626
- "expires_at": {
1627
- "name": "expires_at",
1628
- "type": "timestamp with time zone",
1629
- "primaryKey": false,
1630
- "notNull": true
1631
- },
1632
- "revoked_at": {
1633
- "name": "revoked_at",
1634
- "type": "timestamp with time zone",
1635
- "primaryKey": false,
1636
- "notNull": false
1637
- },
1638
- "created_at": {
1639
- "name": "created_at",
1640
- "type": "timestamp with time zone",
1641
- "primaryKey": false,
1642
- "notNull": true,
1643
- "default": "now()"
1644
- },
1645
- "ip_address": {
1646
- "name": "ip_address",
1647
- "type": "text",
1648
- "primaryKey": false,
1649
- "notNull": false
1650
- },
1651
- "user_agent": {
1652
- "name": "user_agent",
1653
- "type": "text",
1654
- "primaryKey": false,
1655
- "notNull": false
1656
- },
1657
- "device_fingerprint": {
1658
- "name": "device_fingerprint",
1659
- "type": "text",
1660
- "primaryKey": false,
1661
- "notNull": false
1662
- }
1663
- },
1664
- "indexes": {
1665
- "refresh_tokens_user_idx": {
1666
- "name": "refresh_tokens_user_idx",
1667
- "columns": [
1668
- {
1669
- "expression": "user_id",
1670
- "isExpression": false,
1671
- "asc": true,
1672
- "nulls": "last"
1673
- }
1674
- ],
1675
- "isUnique": false,
1676
- "concurrently": false,
1677
- "method": "btree",
1678
- "with": {}
1679
- },
1680
- "refresh_tokens_app_idx": {
1681
- "name": "refresh_tokens_app_idx",
1682
- "columns": [
1683
- {
1684
- "expression": "app_id",
1685
- "isExpression": false,
1686
- "asc": true,
1687
- "nulls": "last"
1688
- }
1689
- ],
1690
- "isUnique": false,
1691
- "concurrently": false,
1692
- "method": "btree",
1693
- "with": {}
1694
- },
1695
- "refresh_tokens_hash_idx": {
1696
- "name": "refresh_tokens_hash_idx",
1697
- "columns": [
1698
- {
1699
- "expression": "token_hash",
1700
- "isExpression": false,
1701
- "asc": true,
1702
- "nulls": "last"
1703
- }
1704
- ],
1705
- "isUnique": false,
1706
- "concurrently": false,
1707
- "method": "btree",
1708
- "with": {}
1709
- }
1710
- },
1711
- "foreignKeys": {
1712
- "refresh_tokens_user_id_users_id_fk": {
1713
- "name": "refresh_tokens_user_id_users_id_fk",
1714
- "tableFrom": "refresh_tokens",
1715
- "tableTo": "users",
1716
- "columnsFrom": [
1717
- "user_id"
1718
- ],
1719
- "columnsTo": [
1720
- "id"
1721
- ],
1722
- "onDelete": "cascade",
1723
- "onUpdate": "no action"
1724
- },
1725
- "refresh_tokens_app_id_applications_id_fk": {
1726
- "name": "refresh_tokens_app_id_applications_id_fk",
1727
- "tableFrom": "refresh_tokens",
1728
- "tableTo": "applications",
1729
- "columnsFrom": [
1730
- "app_id"
1731
- ],
1732
- "columnsTo": [
1733
- "id"
1734
- ],
1735
- "onDelete": "set null",
1736
- "onUpdate": "no action"
1737
- }
1738
- },
1739
- "compositePrimaryKeys": {},
1740
- "uniqueConstraints": {}
1741
- },
1742
- "public.role_permissions": {
1743
- "name": "role_permissions",
1744
- "schema": "",
1745
- "columns": {
1746
- "id": {
1747
- "name": "id",
1748
- "type": "uuid",
1749
- "primaryKey": true,
1750
- "notNull": true,
1751
- "default": "gen_random_uuid()"
1752
- },
1753
- "role": {
1754
- "name": "role",
1755
- "type": "text",
1756
- "primaryKey": false,
1757
- "notNull": true
1758
- },
1759
- "permission_id": {
1760
- "name": "permission_id",
1761
- "type": "uuid",
1762
- "primaryKey": false,
1763
- "notNull": true
1764
- },
1765
- "created_at": {
1766
- "name": "created_at",
1767
- "type": "timestamp with time zone",
1768
- "primaryKey": false,
1769
- "notNull": true,
1770
- "default": "now()"
1771
- }
1772
- },
1773
- "indexes": {},
1774
- "foreignKeys": {
1775
- "role_permissions_permission_id_permissions_id_fk": {
1776
- "name": "role_permissions_permission_id_permissions_id_fk",
1777
- "tableFrom": "role_permissions",
1778
- "tableTo": "permissions",
1779
- "columnsFrom": [
1780
- "permission_id"
1781
- ],
1782
- "columnsTo": [
1783
- "id"
1784
- ],
1785
- "onDelete": "cascade",
1786
- "onUpdate": "no action"
1787
- }
1788
- },
1789
- "compositePrimaryKeys": {},
1790
- "uniqueConstraints": {
1791
- "role_permissions_idx": {
1792
- "name": "role_permissions_idx",
1793
- "nullsNotDistinct": false,
1794
- "columns": [
1795
- "role",
1796
- "permission_id"
1797
- ]
1798
- }
1799
- }
1800
- },
1801
- "public.saml_connections": {
1802
- "name": "saml_connections",
1803
- "schema": "",
1804
- "columns": {
1805
- "id": {
1806
- "name": "id",
1807
- "type": "uuid",
1808
- "primaryKey": true,
1809
- "notNull": true,
1810
- "default": "gen_random_uuid()"
1811
- },
1812
- "org_id": {
1813
- "name": "org_id",
1814
- "type": "uuid",
1815
- "primaryKey": false,
1816
- "notNull": true
1817
- },
1818
- "name": {
1819
- "name": "name",
1820
- "type": "text",
1821
- "primaryKey": false,
1822
- "notNull": true
1823
- },
1824
- "idp_entity_id": {
1825
- "name": "idp_entity_id",
1826
- "type": "text",
1827
- "primaryKey": false,
1828
- "notNull": false
1829
- },
1830
- "idp_sso_url": {
1831
- "name": "idp_sso_url",
1832
- "type": "text",
1833
- "primaryKey": false,
1834
- "notNull": false
1835
- },
1836
- "idp_certificate": {
1837
- "name": "idp_certificate",
1838
- "type": "text",
1839
- "primaryKey": false,
1840
- "notNull": false
1841
- },
1842
- "sp_entity_id": {
1843
- "name": "sp_entity_id",
1844
- "type": "text",
1845
- "primaryKey": false,
1846
- "notNull": true
1847
- },
1848
- "sp_acs_url": {
1849
- "name": "sp_acs_url",
1850
- "type": "text",
1851
- "primaryKey": false,
1852
- "notNull": true
1853
- },
1854
- "attribute_mapping": {
1855
- "name": "attribute_mapping",
1856
- "type": "jsonb",
1857
- "primaryKey": false,
1858
- "notNull": true,
1859
- "default": "'{}'::jsonb"
1860
- },
1861
- "is_active": {
1862
- "name": "is_active",
1863
- "type": "boolean",
1864
- "primaryKey": false,
1865
- "notNull": true,
1866
- "default": true
1867
- },
1868
- "created_at": {
1869
- "name": "created_at",
1870
- "type": "timestamp with time zone",
1871
- "primaryKey": false,
1872
- "notNull": true,
1873
- "default": "now()"
1874
- },
1875
- "updated_at": {
1876
- "name": "updated_at",
1877
- "type": "timestamp with time zone",
1878
- "primaryKey": false,
1879
- "notNull": true,
1880
- "default": "now()"
1881
- }
1882
- },
1883
- "indexes": {
1884
- "saml_connections_org_idx": {
1885
- "name": "saml_connections_org_idx",
1886
- "columns": [
1887
- {
1888
- "expression": "org_id",
1889
- "isExpression": false,
1890
- "asc": true,
1891
- "nulls": "last"
1892
- }
1893
- ],
1894
- "isUnique": false,
1895
- "concurrently": false,
1896
- "method": "btree",
1897
- "with": {}
1898
- }
1899
- },
1900
- "foreignKeys": {
1901
- "saml_connections_org_id_organizations_id_fk": {
1902
- "name": "saml_connections_org_id_organizations_id_fk",
1903
- "tableFrom": "saml_connections",
1904
- "tableTo": "organizations",
1905
- "columnsFrom": [
1906
- "org_id"
1907
- ],
1908
- "columnsTo": [
1909
- "id"
1910
- ],
1911
- "onDelete": "cascade",
1912
- "onUpdate": "no action"
1913
- }
1914
- },
1915
- "compositePrimaryKeys": {},
1916
- "uniqueConstraints": {}
1917
- },
1918
- "public.secrets": {
1919
- "name": "secrets",
1920
- "schema": "",
1921
- "columns": {
1922
- "id": {
1923
- "name": "id",
1924
- "type": "uuid",
1925
- "primaryKey": true,
1926
- "notNull": true,
1927
- "default": "gen_random_uuid()"
1928
- },
1929
- "key_id": {
1930
- "name": "key_id",
1931
- "type": "text",
1932
- "primaryKey": false,
1933
- "notNull": true
1934
- },
1935
- "type": {
1936
- "name": "type",
1937
- "type": "text",
1938
- "primaryKey": false,
1939
- "notNull": true
1940
- },
1941
- "value": {
1942
- "name": "value",
1943
- "type": "text",
1944
- "primaryKey": false,
1945
- "notNull": true
1946
- },
1947
- "algorithm": {
1948
- "name": "algorithm",
1949
- "type": "text",
1950
- "primaryKey": false,
1951
- "notNull": false
1952
- },
1953
- "is_active": {
1954
- "name": "is_active",
1955
- "type": "boolean",
1956
- "primaryKey": false,
1957
- "notNull": true,
1958
- "default": true
1959
- },
1960
- "rotated_at": {
1961
- "name": "rotated_at",
1962
- "type": "timestamp with time zone",
1963
- "primaryKey": false,
1964
- "notNull": false
1965
- },
1966
- "expires_at": {
1967
- "name": "expires_at",
1968
- "type": "timestamp with time zone",
1969
- "primaryKey": false,
1970
- "notNull": false
1971
- },
1972
- "created_at": {
1973
- "name": "created_at",
1974
- "type": "timestamp with time zone",
1975
- "primaryKey": false,
1976
- "notNull": true,
1977
- "default": "now()"
1978
- }
1979
- },
1980
- "indexes": {
1981
- "secrets_type_active_idx": {
1982
- "name": "secrets_type_active_idx",
1983
- "columns": [
1984
- {
1985
- "expression": "type",
1986
- "isExpression": false,
1987
- "asc": true,
1988
- "nulls": "last"
1989
- },
1990
- {
1991
- "expression": "is_active",
1992
- "isExpression": false,
1993
- "asc": true,
1994
- "nulls": "last"
1995
- }
1996
- ],
1997
- "isUnique": false,
1998
- "concurrently": false,
1999
- "method": "btree",
2000
- "with": {}
2001
- }
2002
- },
2003
- "foreignKeys": {},
2004
- "compositePrimaryKeys": {},
2005
- "uniqueConstraints": {
2006
- "secrets_key_id_unique": {
2007
- "name": "secrets_key_id_unique",
2008
- "nullsNotDistinct": false,
2009
- "columns": [
2010
- "key_id"
2011
- ]
2012
- }
2013
- }
2014
- },
2015
- "public.service_accounts": {
2016
- "name": "service_accounts",
2017
- "schema": "",
2018
- "columns": {
2019
- "id": {
2020
- "name": "id",
2021
- "type": "uuid",
2022
- "primaryKey": true,
2023
- "notNull": true,
2024
- "default": "gen_random_uuid()"
2025
- },
2026
- "org_id": {
2027
- "name": "org_id",
2028
- "type": "uuid",
2029
- "primaryKey": false,
2030
- "notNull": true
2031
- },
2032
- "name": {
2033
- "name": "name",
2034
- "type": "text",
2035
- "primaryKey": false,
2036
- "notNull": true
2037
- },
2038
- "description": {
2039
- "name": "description",
2040
- "type": "text",
2041
- "primaryKey": false,
2042
- "notNull": false
2043
- },
2044
- "is_active": {
2045
- "name": "is_active",
2046
- "type": "boolean",
2047
- "primaryKey": false,
2048
- "notNull": true,
2049
- "default": true
2050
- },
2051
- "created_at": {
2052
- "name": "created_at",
2053
- "type": "timestamp with time zone",
2054
- "primaryKey": false,
2055
- "notNull": true,
2056
- "default": "now()"
2057
- },
2058
- "updated_at": {
2059
- "name": "updated_at",
2060
- "type": "timestamp with time zone",
2061
- "primaryKey": false,
2062
- "notNull": true,
2063
- "default": "now()"
2064
- }
2065
- },
2066
- "indexes": {
2067
- "service_accounts_org_idx": {
2068
- "name": "service_accounts_org_idx",
2069
- "columns": [
2070
- {
2071
- "expression": "org_id",
2072
- "isExpression": false,
2073
- "asc": true,
2074
- "nulls": "last"
2075
- }
2076
- ],
2077
- "isUnique": false,
2078
- "concurrently": false,
2079
- "method": "btree",
2080
- "with": {}
2081
- }
2082
- },
2083
- "foreignKeys": {
2084
- "service_accounts_org_id_organizations_id_fk": {
2085
- "name": "service_accounts_org_id_organizations_id_fk",
2086
- "tableFrom": "service_accounts",
2087
- "tableTo": "organizations",
2088
- "columnsFrom": [
2089
- "org_id"
2090
- ],
2091
- "columnsTo": [
2092
- "id"
2093
- ],
2094
- "onDelete": "cascade",
2095
- "onUpdate": "no action"
2096
- }
2097
- },
2098
- "compositePrimaryKeys": {},
2099
- "uniqueConstraints": {}
2100
- },
2101
- "public.sms_otp_codes": {
2102
- "name": "sms_otp_codes",
2103
- "schema": "",
2104
- "columns": {
2105
- "id": {
2106
- "name": "id",
2107
- "type": "uuid",
2108
- "primaryKey": true,
2109
- "notNull": true,
2110
- "default": "gen_random_uuid()"
2111
- },
2112
- "user_id": {
2113
- "name": "user_id",
2114
- "type": "uuid",
2115
- "primaryKey": false,
2116
- "notNull": true
2117
- },
2118
- "phone_number": {
2119
- "name": "phone_number",
2120
- "type": "text",
2121
- "primaryKey": false,
2122
- "notNull": true
2123
- },
2124
- "code_hash": {
2125
- "name": "code_hash",
2126
- "type": "text",
2127
- "primaryKey": false,
2128
- "notNull": true
2129
- },
2130
- "used_at": {
2131
- "name": "used_at",
2132
- "type": "timestamp with time zone",
2133
- "primaryKey": false,
2134
- "notNull": false
2135
- },
2136
- "expires_at": {
2137
- "name": "expires_at",
2138
- "type": "timestamp with time zone",
2139
- "primaryKey": false,
2140
- "notNull": true
2141
- },
2142
- "created_at": {
2143
- "name": "created_at",
2144
- "type": "timestamp with time zone",
2145
- "primaryKey": false,
2146
- "notNull": true,
2147
- "default": "now()"
2148
- }
2149
- },
2150
- "indexes": {
2151
- "sms_otp_codes_user_idx": {
2152
- "name": "sms_otp_codes_user_idx",
2153
- "columns": [
2154
- {
2155
- "expression": "user_id",
2156
- "isExpression": false,
2157
- "asc": true,
2158
- "nulls": "last"
2159
- }
2160
- ],
2161
- "isUnique": false,
2162
- "concurrently": false,
2163
- "method": "btree",
2164
- "with": {}
2165
- }
2166
- },
2167
- "foreignKeys": {
2168
- "sms_otp_codes_user_id_users_id_fk": {
2169
- "name": "sms_otp_codes_user_id_users_id_fk",
2170
- "tableFrom": "sms_otp_codes",
2171
- "tableTo": "users",
2172
- "columnsFrom": [
2173
- "user_id"
2174
- ],
2175
- "columnsTo": [
2176
- "id"
2177
- ],
2178
- "onDelete": "cascade",
2179
- "onUpdate": "no action"
2180
- }
2181
- },
2182
- "compositePrimaryKeys": {},
2183
- "uniqueConstraints": {}
2184
- },
2185
- "public.totp_backup_codes": {
2186
- "name": "totp_backup_codes",
2187
- "schema": "",
2188
- "columns": {
2189
- "id": {
2190
- "name": "id",
2191
- "type": "uuid",
2192
- "primaryKey": true,
2193
- "notNull": true,
2194
- "default": "gen_random_uuid()"
2195
- },
2196
- "user_id": {
2197
- "name": "user_id",
2198
- "type": "uuid",
2199
- "primaryKey": false,
2200
- "notNull": true
2201
- },
2202
- "code_hash": {
2203
- "name": "code_hash",
2204
- "type": "text",
2205
- "primaryKey": false,
2206
- "notNull": true
2207
- },
2208
- "used_at": {
2209
- "name": "used_at",
2210
- "type": "timestamp with time zone",
2211
- "primaryKey": false,
2212
- "notNull": false
2213
- },
2214
- "created_at": {
2215
- "name": "created_at",
2216
- "type": "timestamp with time zone",
2217
- "primaryKey": false,
2218
- "notNull": true,
2219
- "default": "now()"
2220
- }
2221
- },
2222
- "indexes": {
2223
- "totp_backup_codes_user_idx": {
2224
- "name": "totp_backup_codes_user_idx",
2225
- "columns": [
2226
- {
2227
- "expression": "user_id",
2228
- "isExpression": false,
2229
- "asc": true,
2230
- "nulls": "last"
2231
- }
2232
- ],
2233
- "isUnique": false,
2234
- "concurrently": false,
2235
- "method": "btree",
2236
- "with": {}
2237
- },
2238
- "totp_backup_codes_hash_idx": {
2239
- "name": "totp_backup_codes_hash_idx",
2240
- "columns": [
2241
- {
2242
- "expression": "code_hash",
2243
- "isExpression": false,
2244
- "asc": true,
2245
- "nulls": "last"
2246
- }
2247
- ],
2248
- "isUnique": false,
2249
- "concurrently": false,
2250
- "method": "btree",
2251
- "with": {}
2252
- }
2253
- },
2254
- "foreignKeys": {
2255
- "totp_backup_codes_user_id_users_id_fk": {
2256
- "name": "totp_backup_codes_user_id_users_id_fk",
2257
- "tableFrom": "totp_backup_codes",
2258
- "tableTo": "users",
2259
- "columnsFrom": [
2260
- "user_id"
2261
- ],
2262
- "columnsTo": [
2263
- "id"
2264
- ],
2265
- "onDelete": "cascade",
2266
- "onUpdate": "no action"
2267
- }
2268
- },
2269
- "compositePrimaryKeys": {},
2270
- "uniqueConstraints": {}
2271
- },
2272
- "public.user_devices": {
2273
- "name": "user_devices",
2274
- "schema": "",
2275
- "columns": {
2276
- "id": {
2277
- "name": "id",
2278
- "type": "uuid",
2279
- "primaryKey": true,
2280
- "notNull": true,
2281
- "default": "gen_random_uuid()"
2282
- },
2283
- "user_id": {
2284
- "name": "user_id",
2285
- "type": "uuid",
2286
- "primaryKey": false,
2287
- "notNull": true
2288
- },
2289
- "fingerprint_hash": {
2290
- "name": "fingerprint_hash",
2291
- "type": "text",
2292
- "primaryKey": false,
2293
- "notNull": true
2294
- },
2295
- "ip_address": {
2296
- "name": "ip_address",
2297
- "type": "text",
2298
- "primaryKey": false,
2299
- "notNull": false
2300
- },
2301
- "user_agent": {
2302
- "name": "user_agent",
2303
- "type": "text",
2304
- "primaryKey": false,
2305
- "notNull": false
2306
- },
2307
- "first_seen_at": {
2308
- "name": "first_seen_at",
2309
- "type": "timestamp with time zone",
2310
- "primaryKey": false,
2311
- "notNull": true,
2312
- "default": "now()"
2313
- },
2314
- "last_seen_at": {
2315
- "name": "last_seen_at",
2316
- "type": "timestamp with time zone",
2317
- "primaryKey": false,
2318
- "notNull": true,
2319
- "default": "now()"
2320
- },
2321
- "trust_score": {
2322
- "name": "trust_score",
2323
- "type": "smallint",
2324
- "primaryKey": false,
2325
- "notNull": true,
2326
- "default": 50
2327
- },
2328
- "new_device_alert_sent": {
2329
- "name": "new_device_alert_sent",
2330
- "type": "boolean",
2331
- "primaryKey": false,
2332
- "notNull": true,
2333
- "default": false
2334
- }
2335
- },
2336
- "indexes": {
2337
- "user_devices_user_idx": {
2338
- "name": "user_devices_user_idx",
2339
- "columns": [
2340
- {
2341
- "expression": "user_id",
2342
- "isExpression": false,
2343
- "asc": true,
2344
- "nulls": "last"
2345
- }
2346
- ],
2347
- "isUnique": false,
2348
- "concurrently": false,
2349
- "method": "btree",
2350
- "with": {}
2351
- }
2352
- },
2353
- "foreignKeys": {
2354
- "user_devices_user_id_users_id_fk": {
2355
- "name": "user_devices_user_id_users_id_fk",
2356
- "tableFrom": "user_devices",
2357
- "tableTo": "users",
2358
- "columnsFrom": [
2359
- "user_id"
2360
- ],
2361
- "columnsTo": [
2362
- "id"
2363
- ],
2364
- "onDelete": "cascade",
2365
- "onUpdate": "no action"
2366
- }
2367
- },
2368
- "compositePrimaryKeys": {},
2369
- "uniqueConstraints": {
2370
- "user_devices_unique": {
2371
- "name": "user_devices_unique",
2372
- "nullsNotDistinct": false,
2373
- "columns": [
2374
- "user_id",
2375
- "fingerprint_hash"
2376
- ]
2377
- }
2378
- }
2379
- },
2380
- "public.user_identities": {
2381
- "name": "user_identities",
2382
- "schema": "",
2383
- "columns": {
2384
- "id": {
2385
- "name": "id",
2386
- "type": "uuid",
2387
- "primaryKey": true,
2388
- "notNull": true,
2389
- "default": "gen_random_uuid()"
2390
- },
2391
- "user_id": {
2392
- "name": "user_id",
2393
- "type": "uuid",
2394
- "primaryKey": false,
2395
- "notNull": true
2396
- },
2397
- "provider_id": {
2398
- "name": "provider_id",
2399
- "type": "uuid",
2400
- "primaryKey": false,
2401
- "notNull": true
2402
- },
2403
- "provider_type": {
2404
- "name": "provider_type",
2405
- "type": "text",
2406
- "primaryKey": false,
2407
- "notNull": true
2408
- },
2409
- "external_sub": {
2410
- "name": "external_sub",
2411
- "type": "text",
2412
- "primaryKey": false,
2413
- "notNull": true
2414
- },
2415
- "email": {
2416
- "name": "email",
2417
- "type": "text",
2418
- "primaryKey": false,
2419
- "notNull": false
2420
- },
2421
- "profile": {
2422
- "name": "profile",
2423
- "type": "jsonb",
2424
- "primaryKey": false,
2425
- "notNull": true,
2426
- "default": "'{}'::jsonb"
2427
- },
2428
- "linked_at": {
2429
- "name": "linked_at",
2430
- "type": "timestamp with time zone",
2431
- "primaryKey": false,
2432
- "notNull": true,
2433
- "default": "now()"
2434
- }
2435
- },
2436
- "indexes": {
2437
- "user_identities_user_idx": {
2438
- "name": "user_identities_user_idx",
2439
- "columns": [
2440
- {
2441
- "expression": "user_id",
2442
- "isExpression": false,
2443
- "asc": true,
2444
- "nulls": "last"
2445
- }
2446
- ],
2447
- "isUnique": false,
2448
- "concurrently": false,
2449
- "method": "btree",
2450
- "with": {}
2451
- },
2452
- "user_identities_provider_sub_idx": {
2453
- "name": "user_identities_provider_sub_idx",
2454
- "columns": [
2455
- {
2456
- "expression": "provider_id",
2457
- "isExpression": false,
2458
- "asc": true,
2459
- "nulls": "last"
2460
- },
2461
- {
2462
- "expression": "external_sub",
2463
- "isExpression": false,
2464
- "asc": true,
2465
- "nulls": "last"
2466
- }
2467
- ],
2468
- "isUnique": false,
2469
- "concurrently": false,
2470
- "method": "btree",
2471
- "with": {}
2472
- }
2473
- },
2474
- "foreignKeys": {
2475
- "user_identities_user_id_users_id_fk": {
2476
- "name": "user_identities_user_id_users_id_fk",
2477
- "tableFrom": "user_identities",
2478
- "tableTo": "users",
2479
- "columnsFrom": [
2480
- "user_id"
2481
- ],
2482
- "columnsTo": [
2483
- "id"
2484
- ],
2485
- "onDelete": "cascade",
2486
- "onUpdate": "no action"
2487
- },
2488
- "user_identities_provider_id_identity_providers_id_fk": {
2489
- "name": "user_identities_provider_id_identity_providers_id_fk",
2490
- "tableFrom": "user_identities",
2491
- "tableTo": "identity_providers",
2492
- "columnsFrom": [
2493
- "provider_id"
2494
- ],
2495
- "columnsTo": [
2496
- "id"
2497
- ],
2498
- "onDelete": "cascade",
2499
- "onUpdate": "no action"
2500
- }
2501
- },
2502
- "compositePrimaryKeys": {},
2503
- "uniqueConstraints": {}
2504
- },
2505
- "public.users": {
2506
- "name": "users",
2507
- "schema": "",
2508
- "columns": {
2509
- "id": {
2510
- "name": "id",
2511
- "type": "uuid",
2512
- "primaryKey": true,
2513
- "notNull": true,
2514
- "default": "gen_random_uuid()"
2515
- },
2516
- "zitadel_user_id": {
2517
- "name": "zitadel_user_id",
2518
- "type": "text",
2519
- "primaryKey": false,
2520
- "notNull": false
2521
- },
2522
- "email": {
2523
- "name": "email",
2524
- "type": "text",
2525
- "primaryKey": false,
2526
- "notNull": true
2527
- },
2528
- "username": {
2529
- "name": "username",
2530
- "type": "text",
2531
- "primaryKey": false,
2532
- "notNull": true
2533
- },
2534
- "name": {
2535
- "name": "name",
2536
- "type": "text",
2537
- "primaryKey": false,
2538
- "notNull": false
2539
- },
2540
- "avatar_url": {
2541
- "name": "avatar_url",
2542
- "type": "text",
2543
- "primaryKey": false,
2544
- "notNull": false
2545
- },
2546
- "email_verified": {
2547
- "name": "email_verified",
2548
- "type": "boolean",
2549
- "primaryKey": false,
2550
- "notNull": true,
2551
- "default": false
2552
- },
2553
- "email_verified_token": {
2554
- "name": "email_verified_token",
2555
- "type": "text",
2556
- "primaryKey": false,
2557
- "notNull": false
2558
- },
2559
- "provider": {
2560
- "name": "provider",
2561
- "type": "text",
2562
- "primaryKey": false,
2563
- "notNull": true,
2564
- "default": "'password'"
2565
- },
2566
- "plan": {
2567
- "name": "plan",
2568
- "type": "text",
2569
- "primaryKey": false,
2570
- "notNull": true,
2571
- "default": "'free'"
2572
- },
2573
- "role": {
2574
- "name": "role",
2575
- "type": "text",
2576
- "primaryKey": false,
2577
- "notNull": true,
2578
- "default": "'user'"
2579
- },
2580
- "default_org_id": {
2581
- "name": "default_org_id",
2582
- "type": "uuid",
2583
- "primaryKey": false,
2584
- "notNull": false
2585
- },
2586
- "phone_number": {
2587
- "name": "phone_number",
2588
- "type": "text",
2589
- "primaryKey": false,
2590
- "notNull": false
2591
- },
2592
- "phone_verified": {
2593
- "name": "phone_verified",
2594
- "type": "boolean",
2595
- "primaryKey": false,
2596
- "notNull": true,
2597
- "default": false
2598
- },
2599
- "metadata": {
2600
- "name": "metadata",
2601
- "type": "jsonb",
2602
- "primaryKey": false,
2603
- "notNull": true,
2604
- "default": "'{}'::jsonb"
2605
- },
2606
- "password_hash": {
2607
- "name": "password_hash",
2608
- "type": "text",
2609
- "primaryKey": false,
2610
- "notNull": false
2611
- },
2612
- "totp_secret": {
2613
- "name": "totp_secret",
2614
- "type": "text",
2615
- "primaryKey": false,
2616
- "notNull": false
2617
- },
2618
- "totp_enabled": {
2619
- "name": "totp_enabled",
2620
- "type": "boolean",
2621
- "primaryKey": false,
2622
- "notNull": true,
2623
- "default": false
2624
- },
2625
- "totp_verified_at": {
2626
- "name": "totp_verified_at",
2627
- "type": "timestamp with time zone",
2628
- "primaryKey": false,
2629
- "notNull": false
2630
- },
2631
- "failed_login_attempts": {
2632
- "name": "failed_login_attempts",
2633
- "type": "integer",
2634
- "primaryKey": false,
2635
- "notNull": true,
2636
- "default": 0
2637
- },
2638
- "locked_until": {
2639
- "name": "locked_until",
2640
- "type": "timestamp with time zone",
2641
- "primaryKey": false,
2642
- "notNull": false
2643
- },
2644
- "created_at": {
2645
- "name": "created_at",
2646
- "type": "timestamp with time zone",
2647
- "primaryKey": false,
2648
- "notNull": true,
2649
- "default": "now()"
2650
- },
2651
- "updated_at": {
2652
- "name": "updated_at",
2653
- "type": "timestamp with time zone",
2654
- "primaryKey": false,
2655
- "notNull": true,
2656
- "default": "now()"
2657
- }
2658
- },
2659
- "indexes": {
2660
- "users_email_idx": {
2661
- "name": "users_email_idx",
2662
- "columns": [
2663
- {
2664
- "expression": "email",
2665
- "isExpression": false,
2666
- "asc": true,
2667
- "nulls": "last"
2668
- }
2669
- ],
2670
- "isUnique": false,
2671
- "concurrently": false,
2672
- "method": "btree",
2673
- "with": {}
2674
- },
2675
- "users_zitadel_idx": {
2676
- "name": "users_zitadel_idx",
2677
- "columns": [
2678
- {
2679
- "expression": "zitadel_user_id",
2680
- "isExpression": false,
2681
- "asc": true,
2682
- "nulls": "last"
2683
- }
2684
- ],
2685
- "isUnique": false,
2686
- "concurrently": false,
2687
- "method": "btree",
2688
- "with": {}
2689
- },
2690
- "users_default_org_idx": {
2691
- "name": "users_default_org_idx",
2692
- "columns": [
2693
- {
2694
- "expression": "default_org_id",
2695
- "isExpression": false,
2696
- "asc": true,
2697
- "nulls": "last"
2698
- }
2699
- ],
2700
- "isUnique": false,
2701
- "concurrently": false,
2702
- "method": "btree",
2703
- "with": {}
2704
- }
2705
- },
2706
- "foreignKeys": {
2707
- "users_default_org_id_organizations_id_fk": {
2708
- "name": "users_default_org_id_organizations_id_fk",
2709
- "tableFrom": "users",
2710
- "tableTo": "organizations",
2711
- "columnsFrom": [
2712
- "default_org_id"
2713
- ],
2714
- "columnsTo": [
2715
- "id"
2716
- ],
2717
- "onDelete": "set null",
2718
- "onUpdate": "no action"
2719
- }
2720
- },
2721
- "compositePrimaryKeys": {},
2722
- "uniqueConstraints": {
2723
- "users_zitadel_user_id_unique": {
2724
- "name": "users_zitadel_user_id_unique",
2725
- "nullsNotDistinct": false,
2726
- "columns": [
2727
- "zitadel_user_id"
2728
- ]
2729
- },
2730
- "users_email_unique": {
2731
- "name": "users_email_unique",
2732
- "nullsNotDistinct": false,
2733
- "columns": [
2734
- "email"
2735
- ]
2736
- },
2737
- "users_username_unique": {
2738
- "name": "users_username_unique",
2739
- "nullsNotDistinct": false,
2740
- "columns": [
2741
- "username"
2742
- ]
2743
- }
2744
- }
2745
- },
2746
- "public.webauthn_credentials": {
2747
- "name": "webauthn_credentials",
2748
- "schema": "",
2749
- "columns": {
2750
- "id": {
2751
- "name": "id",
2752
- "type": "uuid",
2753
- "primaryKey": true,
2754
- "notNull": true,
2755
- "default": "gen_random_uuid()"
2756
- },
2757
- "user_id": {
2758
- "name": "user_id",
2759
- "type": "uuid",
2760
- "primaryKey": false,
2761
- "notNull": true
2762
- },
2763
- "credential_id": {
2764
- "name": "credential_id",
2765
- "type": "text",
2766
- "primaryKey": false,
2767
- "notNull": true
2768
- },
2769
- "public_key": {
2770
- "name": "public_key",
2771
- "type": "text",
2772
- "primaryKey": false,
2773
- "notNull": true
2774
- },
2775
- "counter": {
2776
- "name": "counter",
2777
- "type": "integer",
2778
- "primaryKey": false,
2779
- "notNull": true,
2780
- "default": 0
2781
- },
2782
- "transports": {
2783
- "name": "transports",
2784
- "type": "text[]",
2785
- "primaryKey": false,
2786
- "notNull": true,
2787
- "default": "'{}'::text[]"
2788
- },
2789
- "aaguid": {
2790
- "name": "aaguid",
2791
- "type": "text",
2792
- "primaryKey": false,
2793
- "notNull": false
2794
- },
2795
- "device_name": {
2796
- "name": "device_name",
2797
- "type": "text",
2798
- "primaryKey": false,
2799
- "notNull": false
2800
- },
2801
- "last_used_at": {
2802
- "name": "last_used_at",
2803
- "type": "timestamp with time zone",
2804
- "primaryKey": false,
2805
- "notNull": false
2806
- },
2807
- "created_at": {
2808
- "name": "created_at",
2809
- "type": "timestamp with time zone",
2810
- "primaryKey": false,
2811
- "notNull": true,
2812
- "default": "now()"
2813
- }
2814
- },
2815
- "indexes": {
2816
- "webauthn_credentials_user_idx": {
2817
- "name": "webauthn_credentials_user_idx",
2818
- "columns": [
2819
- {
2820
- "expression": "user_id",
2821
- "isExpression": false,
2822
- "asc": true,
2823
- "nulls": "last"
2824
- }
2825
- ],
2826
- "isUnique": false,
2827
- "concurrently": false,
2828
- "method": "btree",
2829
- "with": {}
2830
- }
2831
- },
2832
- "foreignKeys": {
2833
- "webauthn_credentials_user_id_users_id_fk": {
2834
- "name": "webauthn_credentials_user_id_users_id_fk",
2835
- "tableFrom": "webauthn_credentials",
2836
- "tableTo": "users",
2837
- "columnsFrom": [
2838
- "user_id"
2839
- ],
2840
- "columnsTo": [
2841
- "id"
2842
- ],
2843
- "onDelete": "cascade",
2844
- "onUpdate": "no action"
2845
- }
2846
- },
2847
- "compositePrimaryKeys": {},
2848
- "uniqueConstraints": {
2849
- "webauthn_credentials_credential_id_unique": {
2850
- "name": "webauthn_credentials_credential_id_unique",
2851
- "nullsNotDistinct": false,
2852
- "columns": [
2853
- "credential_id"
2854
- ]
2855
- }
2856
- }
2857
- },
2858
- "public.workflow_runs": {
2859
- "name": "workflow_runs",
2860
- "schema": "",
2861
- "columns": {
2862
- "id": {
2863
- "name": "id",
2864
- "type": "uuid",
2865
- "primaryKey": true,
2866
- "notNull": true,
2867
- "default": "gen_random_uuid()"
2868
- },
2869
- "workflow_id": {
2870
- "name": "workflow_id",
2871
- "type": "uuid",
2872
- "primaryKey": false,
2873
- "notNull": true
2874
- },
2875
- "trigger_event": {
2876
- "name": "trigger_event",
2877
- "type": "text",
2878
- "primaryKey": false,
2879
- "notNull": true
2880
- },
2881
- "payload": {
2882
- "name": "payload",
2883
- "type": "jsonb",
2884
- "primaryKey": false,
2885
- "notNull": true,
2886
- "default": "'{}'::jsonb"
2887
- },
2888
- "status": {
2889
- "name": "status",
2890
- "type": "text",
2891
- "primaryKey": false,
2892
- "notNull": true,
2893
- "default": "'pending'"
2894
- },
2895
- "started_at": {
2896
- "name": "started_at",
2897
- "type": "timestamp with time zone",
2898
- "primaryKey": false,
2899
- "notNull": false
2900
- },
2901
- "finished_at": {
2902
- "name": "finished_at",
2903
- "type": "timestamp with time zone",
2904
- "primaryKey": false,
2905
- "notNull": false
2906
- },
2907
- "log": {
2908
- "name": "log",
2909
- "type": "jsonb",
2910
- "primaryKey": false,
2911
- "notNull": true,
2912
- "default": "'[]'::jsonb"
2913
- }
2914
- },
2915
- "indexes": {
2916
- "workflow_runs_workflow_idx": {
2917
- "name": "workflow_runs_workflow_idx",
2918
- "columns": [
2919
- {
2920
- "expression": "workflow_id",
2921
- "isExpression": false,
2922
- "asc": true,
2923
- "nulls": "last"
2924
- }
2925
- ],
2926
- "isUnique": false,
2927
- "concurrently": false,
2928
- "method": "btree",
2929
- "with": {}
2930
- }
2931
- },
2932
- "foreignKeys": {
2933
- "workflow_runs_workflow_id_workflows_id_fk": {
2934
- "name": "workflow_runs_workflow_id_workflows_id_fk",
2935
- "tableFrom": "workflow_runs",
2936
- "tableTo": "workflows",
2937
- "columnsFrom": [
2938
- "workflow_id"
2939
- ],
2940
- "columnsTo": [
2941
- "id"
2942
- ],
2943
- "onDelete": "cascade",
2944
- "onUpdate": "no action"
2945
- }
2946
- },
2947
- "compositePrimaryKeys": {},
2948
- "uniqueConstraints": {}
2949
- },
2950
- "public.workflows": {
2951
- "name": "workflows",
2952
- "schema": "",
2953
- "columns": {
2954
- "id": {
2955
- "name": "id",
2956
- "type": "uuid",
2957
- "primaryKey": true,
2958
- "notNull": true,
2959
- "default": "gen_random_uuid()"
2960
- },
2961
- "org_id": {
2962
- "name": "org_id",
2963
- "type": "uuid",
2964
- "primaryKey": false,
2965
- "notNull": false
2966
- },
2967
- "name": {
2968
- "name": "name",
2969
- "type": "text",
2970
- "primaryKey": false,
2971
- "notNull": true
2972
- },
2973
- "trigger": {
2974
- "name": "trigger",
2975
- "type": "text",
2976
- "primaryKey": false,
2977
- "notNull": true
2978
- },
2979
- "definition": {
2980
- "name": "definition",
2981
- "type": "jsonb",
2982
- "primaryKey": false,
2983
- "notNull": true,
2984
- "default": "'{}'::jsonb"
2985
- },
2986
- "is_active": {
2987
- "name": "is_active",
2988
- "type": "boolean",
2989
- "primaryKey": false,
2990
- "notNull": true,
2991
- "default": true
2992
- },
2993
- "created_at": {
2994
- "name": "created_at",
2995
- "type": "timestamp with time zone",
2996
- "primaryKey": false,
2997
- "notNull": true,
2998
- "default": "now()"
2999
- },
3000
- "updated_at": {
3001
- "name": "updated_at",
3002
- "type": "timestamp with time zone",
3003
- "primaryKey": false,
3004
- "notNull": true,
3005
- "default": "now()"
3006
- }
3007
- },
3008
- "indexes": {
3009
- "workflows_trigger_idx": {
3010
- "name": "workflows_trigger_idx",
3011
- "columns": [
3012
- {
3013
- "expression": "trigger",
3014
- "isExpression": false,
3015
- "asc": true,
3016
- "nulls": "last"
3017
- }
3018
- ],
3019
- "isUnique": false,
3020
- "concurrently": false,
3021
- "method": "btree",
3022
- "with": {}
3023
- }
3024
- },
3025
- "foreignKeys": {
3026
- "workflows_org_id_organizations_id_fk": {
3027
- "name": "workflows_org_id_organizations_id_fk",
3028
- "tableFrom": "workflows",
3029
- "tableTo": "organizations",
3030
- "columnsFrom": [
3031
- "org_id"
3032
- ],
3033
- "columnsTo": [
3034
- "id"
3035
- ],
3036
- "onDelete": "cascade",
3037
- "onUpdate": "no action"
3038
- }
3039
- },
3040
- "compositePrimaryKeys": {},
3041
- "uniqueConstraints": {}
3042
- }
3043
- },
3044
- "enums": {},
3045
- "schemas": {},
3046
- "_meta": {
3047
- "columns": {},
3048
- "schemas": {},
3049
- "tables": {}
3050
- }
3051
- }