handoff-app 2.0.0-8 → 2.0.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 (322) hide show
  1. package/{Changelog.md → CHANGELOG.md} +85 -1
  2. package/{License.md → LICENSE.md} +1 -1
  3. package/README.md +816 -393
  4. package/RECIPES.md +975 -0
  5. package/UPGRADE.md +57 -9
  6. package/components.json +20 -20
  7. package/config/docs/foundations/colors/guidelines.md +0 -1
  8. package/config/docs/foundations/colors.md +0 -1
  9. package/config/docs/foundations/effects/guidelines.md +0 -1
  10. package/config/docs/foundations/effects/resources.md +0 -1
  11. package/config/docs/foundations/effects.md +0 -1
  12. package/config/docs/foundations/fonts.md +0 -1
  13. package/config/docs/foundations/grid.md +0 -1
  14. package/config/docs/foundations/icon.md +0 -1
  15. package/config/docs/foundations/icons/guidelines.md +0 -1
  16. package/config/docs/foundations/icons.md +0 -1
  17. package/config/docs/foundations/images/guidelines.md +0 -1
  18. package/config/docs/foundations/images/resources.md +0 -1
  19. package/config/docs/foundations/images.md +0 -1
  20. package/config/docs/foundations/logo/resources.md +0 -1
  21. package/config/docs/foundations/logo.md +0 -1
  22. package/config/docs/foundations/typography/guidelines.md +0 -1
  23. package/config/docs/foundations/typography/resources.md +0 -1
  24. package/config/docs/foundations/typography.md +0 -1
  25. package/config/docs/foundations.md +0 -1
  26. package/config/docs/guidelines.md +0 -1
  27. package/config/docs/index.md +0 -1
  28. package/config/docs/system/tokens/foundations/colors.md +0 -4
  29. package/config/docs/system/tokens/foundations/effects.md +0 -4
  30. package/config/docs/system/tokens/foundations/typography.md +0 -2
  31. package/config/docs/system.md +0 -2
  32. package/config/templates/page.md +2 -1
  33. package/config/templates/page.mdx +2 -1
  34. package/dist/ai/connections.d.ts +66 -0
  35. package/dist/ai/connections.js +149 -0
  36. package/dist/ai/define.d.ts +10 -0
  37. package/dist/ai/define.js +13 -0
  38. package/dist/ai/types.d.ts +26 -0
  39. package/dist/ai/types.js +10 -0
  40. package/dist/app-builder/build.d.ts +14 -7
  41. package/dist/app-builder/build.js +195 -66
  42. package/dist/app-builder/client-config.js +3 -2
  43. package/dist/app-builder/paths.d.ts +0 -12
  44. package/dist/app-builder/paths.js +3 -20
  45. package/dist/app-builder/static-export.js +1 -1
  46. package/dist/app-builder/vercel-output.d.ts +1 -1
  47. package/dist/app-builder/vercel-output.js +5 -4
  48. package/dist/cache/build-cache.d.ts +27 -4
  49. package/dist/cache/build-cache.js +114 -47
  50. package/dist/cache/build-inputs.d.ts +13 -0
  51. package/dist/cache/build-inputs.js +19 -0
  52. package/dist/cache/index.d.ts +2 -1
  53. package/dist/cache/index.js +5 -1
  54. package/dist/catalog/normalize.js +3 -0
  55. package/dist/catalog/previews.js +5 -4
  56. package/dist/catalog/types.d.ts +8 -0
  57. package/dist/cli/create.js +1 -2
  58. package/dist/commands/build/index.d.ts +1 -1
  59. package/dist/commands/build/index.js +1 -1
  60. package/dist/commands/utils.d.ts +3 -3
  61. package/dist/config/defaults.js +7 -4
  62. package/dist/config/from-env.d.ts +4 -0
  63. package/dist/config/from-env.js +38 -1
  64. package/dist/config/helpers.js +2 -2
  65. package/dist/config/index.d.ts +0 -1
  66. package/dist/config/index.js +1 -4
  67. package/dist/config/loader.js +28 -2
  68. package/dist/config/resolve-env.d.ts +2 -1
  69. package/dist/config/resolve-env.js +28 -12
  70. package/dist/config/runtime.js +9 -11
  71. package/dist/handlebars.d.ts +10 -2
  72. package/dist/index.d.ts +12 -7
  73. package/dist/index.js +18 -22
  74. package/dist/nav/index.d.ts +2 -2
  75. package/dist/nav/registry.d.ts +3 -3
  76. package/dist/nav/registry.js +1 -1
  77. package/dist/nav/workspace.d.ts +3 -3
  78. package/dist/nav/workspace.js +1 -1
  79. package/dist/pipeline/figma.d.ts +13 -2
  80. package/dist/pipeline/figma.js +86 -46
  81. package/dist/pipeline/styles.js +1 -1
  82. package/dist/pipeline/validation.d.ts +1 -1
  83. package/dist/pipeline/validation.js +3 -3
  84. package/dist/providers.d.ts +10 -0
  85. package/dist/providers.js +13 -0
  86. package/dist/registry/asset-storage/define.d.ts +5 -5
  87. package/dist/registry/asset-storage/define.js +4 -4
  88. package/dist/registry/asset-storage/resolve.d.ts +9 -19
  89. package/dist/registry/asset-storage/resolve.js +33 -21
  90. package/dist/registry/asset-storage/types.d.ts +37 -17
  91. package/dist/registry/asset-storage/types.js +5 -5
  92. package/dist/registry/auth/ai-keys.d.ts +32 -0
  93. package/dist/registry/auth/ai-keys.js +69 -0
  94. package/dist/registry/auth/crypto.d.ts +17 -0
  95. package/dist/registry/auth/crypto.js +61 -1
  96. package/dist/registry/auth/index.d.ts +2 -1
  97. package/dist/registry/auth/index.js +11 -2
  98. package/dist/registry/checkout/index.d.ts +2 -1
  99. package/dist/registry/checkout/index.js +57 -127
  100. package/dist/registry/client.js +53 -17
  101. package/dist/registry/db/driver.js +3 -3
  102. package/dist/registry/db/schema.d.ts +261 -3
  103. package/dist/registry/db/schema.js +29 -4
  104. package/dist/registry/email/define.d.ts +10 -0
  105. package/dist/registry/email/define.js +13 -0
  106. package/dist/registry/email/providers/smtp.d.ts +10 -0
  107. package/dist/registry/email/providers/smtp.js +73 -0
  108. package/dist/registry/email/resolve.d.ts +28 -0
  109. package/dist/registry/email/resolve.js +74 -0
  110. package/dist/registry/email/types.d.ts +24 -0
  111. package/dist/registry/email/types.js +6 -0
  112. package/dist/registry/path.d.ts +2 -0
  113. package/dist/registry/path.js +11 -1
  114. package/dist/registry/publish/package.js +8 -0
  115. package/dist/registry/transfer.d.ts +4 -0
  116. package/dist/store/registry.d.ts +3 -3
  117. package/dist/store/registry.js +4 -4
  118. package/dist/transformers/plugins/ssr-render.js +40 -15
  119. package/dist/transformers/preview/component/builder.d.ts +1 -9
  120. package/dist/transformers/preview/component/builder.js +17 -17
  121. package/dist/transformers/preview/component/css.d.ts +3 -1
  122. package/dist/transformers/preview/component/css.js +92 -51
  123. package/dist/transformers/preview/component/html.d.ts +3 -1
  124. package/dist/transformers/preview/component/html.js +6 -2
  125. package/dist/transformers/preview/component/javascript.d.ts +2 -1
  126. package/dist/transformers/preview/component/javascript.js +10 -4
  127. package/dist/transformers/preview/pattern/html.js +3 -1
  128. package/dist/transformers/preview/types.d.ts +13 -0
  129. package/dist/transformers/utils/build.d.ts +24 -0
  130. package/dist/transformers/utils/build.js +100 -1
  131. package/dist/transformers/utils/module.js +2 -1
  132. package/dist/types/config.d.ts +135 -18
  133. package/dist/utils/path.d.ts +1 -5
  134. package/dist/utils/path.js +6 -23
  135. package/docs/api.md +6 -4
  136. package/docs/cli.md +275 -54
  137. package/drizzle/0007_add_ai_keys.sql +11 -0
  138. package/drizzle/0008_add_source_dir.sql +2 -0
  139. package/drizzle/meta/0007_snapshot.json +2013 -0
  140. package/drizzle/meta/0008_snapshot.json +2025 -0
  141. package/drizzle/meta/_journal.json +14 -0
  142. package/package.json +19 -8
  143. package/src/ai/README.md +42 -0
  144. package/src/ai/connections.ts +189 -0
  145. package/src/ai/define.ts +15 -0
  146. package/src/ai/types.ts +30 -0
  147. package/src/app/components/AiAssistant/AiAssistantPanel.tsx +144 -0
  148. package/src/app/components/AiAssistant/AiAssistantProvider.tsx +215 -0
  149. package/src/app/components/AiAssistant/AiConversation.tsx +737 -0
  150. package/src/app/components/AiAssistant/AiToolResult.tsx +99 -0
  151. package/src/app/components/AiAssistant/dockState.ts +86 -0
  152. package/src/app/components/AiAssistant/toolLabel.ts +24 -0
  153. package/src/app/components/AiAssistant/useAiChat.ts +147 -0
  154. package/src/app/components/AiAssistant/useAiConnections.ts +86 -0
  155. package/src/app/components/AiAssistant/usePageContext.ts +63 -0
  156. package/src/app/components/Auth/AccountLayout.tsx +58 -19
  157. package/src/app/components/Auth/AuthShell.tsx +27 -33
  158. package/src/app/components/Auth/RegistryInstallGate.tsx +4 -8
  159. package/src/app/components/Auth/installStatus.ts +29 -0
  160. package/src/app/components/Component/PageSliceResolver.tsx +1 -0
  161. package/src/app/components/Component/Preview.tsx +383 -189
  162. package/src/app/components/Component/slices/ComponentDisplaySlice.tsx +4 -0
  163. package/src/app/components/Foundations/ColorGrid.tsx +13 -14
  164. package/src/app/components/Layout/Header.tsx +21 -15
  165. package/src/app/components/Layout/Main.tsx +2 -2
  166. package/src/app/components/Markdown/MarkdownComponents.tsx +30 -32
  167. package/src/app/components/McpIntegration/McpConfigDialog.tsx +12 -51
  168. package/src/app/components/Navigation/MobileNav.tsx +2 -2
  169. package/src/app/components/Navigation/SideNav.tsx +1 -15
  170. package/src/app/components/context/NavProvider.tsx +7 -3
  171. package/src/app/components/ui/attachment.tsx +50 -0
  172. package/src/app/components/ui/bubble.tsx +57 -0
  173. package/src/app/components/ui/button.tsx +3 -1
  174. package/src/app/components/ui/confirm-dialog.tsx +87 -0
  175. package/src/app/components/ui/dialog.tsx +7 -2
  176. package/src/app/components/ui/marker.tsx +56 -0
  177. package/src/app/components/ui/sidebar.tsx +3 -1
  178. package/src/app/components/util/index.ts +3 -12
  179. package/src/app/css/index.css +64 -0
  180. package/src/app/lib/ai/auth.ts +33 -0
  181. package/src/app/lib/ai/context.ts +99 -0
  182. package/src/app/lib/ai/model.ts +79 -0
  183. package/src/app/lib/ai/prompt.ts +36 -0
  184. package/src/app/lib/ai/resolve.ts +97 -0
  185. package/src/app/lib/ai/tools.ts +120 -0
  186. package/src/app/lib/api/methods.ts +13 -0
  187. package/src/app/lib/asset-storage.ts +35 -36
  188. package/src/app/lib/auth/api.ts +4 -12
  189. package/src/app/lib/auth/email.ts +96 -23
  190. package/src/app/lib/docs-api/page-rendering.ts +1 -1
  191. package/src/app/lib/docs-api/registry.ts +2 -3
  192. package/src/app/lib/docs-api/runtime-config.ts +47 -21
  193. package/src/app/lib/mcp/components.ts +523 -0
  194. package/src/app/lib/mcp/page-url.ts +24 -0
  195. package/src/app/lib/mcp/pages.ts +84 -0
  196. package/src/app/lib/mcp/result.ts +33 -0
  197. package/src/app/lib/mcp/server.ts +39 -318
  198. package/src/app/lib/mcp/tokens.ts +334 -0
  199. package/src/app/lib/mcp/tool.ts +19 -0
  200. package/src/app/lib/registry-api/asset-transfer.ts +119 -11
  201. package/src/app/lib/registry-api/errors.ts +2 -0
  202. package/src/app/lib/registry-api/handler.ts +7 -1
  203. package/src/app/lib/registry-api/transfer.ts +28 -6
  204. package/src/app/lib/server-module.ts +34 -0
  205. package/src/app/lib/utils.ts +20 -0
  206. package/src/app/next.config.mjs +26 -24
  207. package/src/app/pages/[...slug]/index.tsx +2 -1
  208. package/src/app/pages/_app.tsx +6 -2
  209. package/src/app/pages/_document.tsx +6 -0
  210. package/src/app/pages/account/ai.tsx +183 -0
  211. package/src/app/pages/account/index.tsx +68 -68
  212. package/src/app/pages/account/tokens.tsx +37 -7
  213. package/src/app/pages/account/users.tsx +75 -15
  214. package/src/app/pages/api/account/ai/keys/[connectionId].ts +60 -0
  215. package/src/app/pages/api/account/ai/keys/index.ts +20 -0
  216. package/src/app/pages/api/admin/users/[id]/[action].ts +80 -11
  217. package/src/app/pages/api/admin/users/index.ts +2 -2
  218. package/src/app/pages/api/ai/chat.ts +115 -0
  219. package/src/app/pages/api/ai/connections.ts +23 -0
  220. package/src/app/pages/api/auth/request-reset.ts +14 -16
  221. package/src/app/pages/api/docs/nav.json.ts +1 -1
  222. package/src/app/pages/api/install.ts +3 -3
  223. package/src/app/pages/api/mcp.ts +6 -0
  224. package/src/app/pages/api/registry/transfer/assets/blobs/[hash]/complete.ts +11 -0
  225. package/src/app/pages/api/registry/transfer/assets/blobs/[hash]/upload.ts +12 -0
  226. package/src/app/pages/api/registry/transfer/assets/blobs/[hash].ts +1 -1
  227. package/src/app/pages/cli/device.tsx +10 -5
  228. package/src/app/pages/foundations/colors.tsx +9 -8
  229. package/src/app/pages/foundations/index.tsx +3 -3
  230. package/src/app/pages/index.tsx +2 -2
  231. package/src/app/pages/install.tsx +7 -2
  232. package/src/app/pages/login.tsx +32 -27
  233. package/src/app/pages/reset-password.tsx +21 -20
  234. package/src/app/pages/system/component/[component]/index.tsx +2 -5
  235. package/src/app/pages/system/index.tsx +11 -11
  236. package/src/app/pages/system/pattern/[pattern]/index.tsx +2 -2
  237. package/src/app/pages/system/tokens/components/[component]/index.tsx +0 -4
  238. package/src/app-builder/README.md +2 -1
  239. package/src/app-builder/build.ts +218 -73
  240. package/src/app-builder/client-config.ts +3 -2
  241. package/src/app-builder/paths.ts +3 -22
  242. package/src/app-builder/static-export.ts +1 -1
  243. package/src/app-builder/vercel-output.ts +5 -4
  244. package/src/cache/README.md +4 -1
  245. package/src/cache/build-cache.ts +128 -43
  246. package/src/cache/build-inputs.ts +28 -0
  247. package/src/cache/index.ts +4 -0
  248. package/src/catalog/README.md +3 -0
  249. package/src/catalog/normalize.ts +2 -0
  250. package/src/catalog/previews.ts +6 -3
  251. package/src/catalog/types.ts +8 -0
  252. package/src/cli/create.ts +1 -2
  253. package/src/commands/build/index.ts +1 -1
  254. package/src/config/README.md +10 -9
  255. package/src/config/defaults.ts +7 -4
  256. package/src/config/from-env.ts +33 -0
  257. package/src/config/helpers.ts +1 -3
  258. package/src/config/index.ts +0 -3
  259. package/src/config/loader.ts +27 -3
  260. package/src/config/resolve-env.ts +28 -15
  261. package/src/config/runtime.ts +10 -5
  262. package/src/handlebars.ts +8 -2
  263. package/src/index.ts +33 -29
  264. package/src/nav/index.ts +2 -2
  265. package/src/nav/registry.ts +3 -3
  266. package/src/nav/workspace.ts +3 -3
  267. package/src/pipeline/README.md +1 -1
  268. package/src/pipeline/figma.ts +98 -49
  269. package/src/pipeline/styles.ts +1 -1
  270. package/src/pipeline/validation.ts +3 -3
  271. package/src/providers.ts +18 -0
  272. package/src/registry/asset-storage/define.ts +6 -6
  273. package/src/registry/asset-storage/resolve.ts +38 -37
  274. package/src/registry/asset-storage/types.ts +39 -17
  275. package/src/registry/auth/ai-keys.ts +62 -0
  276. package/src/registry/auth/crypto.ts +63 -1
  277. package/src/registry/auth/index.ts +11 -1
  278. package/src/registry/checkout/index.ts +60 -138
  279. package/src/registry/client.ts +60 -20
  280. package/src/registry/db/driver.ts +2 -2
  281. package/src/registry/db/schema.ts +49 -22
  282. package/src/registry/email/define.ts +15 -0
  283. package/src/registry/email/providers/smtp.ts +39 -0
  284. package/src/registry/email/resolve.ts +94 -0
  285. package/src/registry/email/types.ts +28 -0
  286. package/src/registry/path.ts +11 -0
  287. package/src/registry/publish/package.ts +9 -0
  288. package/src/registry/transfer.ts +4 -0
  289. package/src/store/registry.ts +7 -7
  290. package/src/transformers/plugins/ssr-render.ts +53 -16
  291. package/src/transformers/preview/component/builder.ts +19 -25
  292. package/src/transformers/preview/component/css.ts +101 -53
  293. package/src/transformers/preview/component/html.ts +6 -2
  294. package/src/transformers/preview/component/javascript.ts +14 -4
  295. package/src/transformers/preview/pattern/html.ts +3 -1
  296. package/src/transformers/preview/types.ts +14 -0
  297. package/src/transformers/utils/build.ts +93 -0
  298. package/src/transformers/utils/module.ts +4 -2
  299. package/src/types/config.ts +148 -20
  300. package/src/utils/README.md +1 -1
  301. package/src/utils/path.ts +6 -29
  302. package/templates/default/handoff.config.js.tpl +10 -2
  303. package/templates/default/handoff.config.ts.tpl +10 -2
  304. package/templates/default/handoff.config.with-examples.js.tpl +10 -2
  305. package/templates/default/handoff.config.with-examples.ts.tpl +10 -2
  306. package/templates/default/package.json.tpl +2 -2
  307. package/.editorconfig +0 -19
  308. package/.eslintrc.json +0 -4
  309. package/.prettierignore +0 -0
  310. package/.prettierrc.json +0 -8
  311. package/.vscode/settings.json +0 -17
  312. package/dist/config/validator.d.ts +0 -9
  313. package/dist/config/validator.js +0 -24
  314. package/dist/registry/asset-storage/adapters/vercel-blob.d.ts +0 -17
  315. package/dist/registry/asset-storage/adapters/vercel-blob.js +0 -87
  316. package/src/app/components/old/Header.tsx +0 -89
  317. package/src/app/lib/mcp/shape.ts +0 -596
  318. package/src/app/pages/assets/fonts.tsx +0 -129
  319. package/src/app/pages/assets/index.tsx +0 -91
  320. package/src/app/pages/assets/logos.tsx +0 -75
  321. package/src/config/validator.ts +0 -22
  322. package/src/registry/asset-storage/adapters/vercel-blob.ts +0 -51
@@ -0,0 +1,2013 @@
1
+ {
2
+ "id": "fefea61e-b074-4115-9c23-796fe559f6b9",
3
+ "prevId": "ceb3ce18-c04c-4e14-b937-5bd4fbb402da",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.asset_blobs": {
8
+ "name": "asset_blobs",
9
+ "schema": "",
10
+ "columns": {
11
+ "hash": {
12
+ "name": "hash",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "storage_provider": {
18
+ "name": "storage_provider",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "content": {
24
+ "name": "content",
25
+ "type": "bytea",
26
+ "primaryKey": false,
27
+ "notNull": false
28
+ },
29
+ "storage_ref": {
30
+ "name": "storage_ref",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": false
34
+ },
35
+ "content_type": {
36
+ "name": "content_type",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "size": {
42
+ "name": "size",
43
+ "type": "integer",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "created_at": {
48
+ "name": "created_at",
49
+ "type": "timestamp with time zone",
50
+ "primaryKey": false,
51
+ "notNull": true,
52
+ "default": "now()"
53
+ }
54
+ },
55
+ "indexes": {},
56
+ "foreignKeys": {},
57
+ "compositePrimaryKeys": {},
58
+ "uniqueConstraints": {},
59
+ "policies": {},
60
+ "checkConstraints": {},
61
+ "isRLSEnabled": false
62
+ },
63
+ "public.asset_collections": {
64
+ "name": "asset_collections",
65
+ "schema": "",
66
+ "columns": {
67
+ "collection": {
68
+ "name": "collection",
69
+ "type": "text",
70
+ "primaryKey": true,
71
+ "notNull": true
72
+ },
73
+ "source_hash": {
74
+ "name": "source_hash",
75
+ "type": "text",
76
+ "primaryKey": false,
77
+ "notNull": false
78
+ },
79
+ "status": {
80
+ "name": "status",
81
+ "type": "text",
82
+ "primaryKey": false,
83
+ "notNull": false
84
+ },
85
+ "built_at": {
86
+ "name": "built_at",
87
+ "type": "timestamp with time zone",
88
+ "primaryKey": false,
89
+ "notNull": false
90
+ },
91
+ "builder_version": {
92
+ "name": "builder_version",
93
+ "type": "text",
94
+ "primaryKey": false,
95
+ "notNull": false
96
+ },
97
+ "metadata": {
98
+ "name": "metadata",
99
+ "type": "jsonb",
100
+ "primaryKey": false,
101
+ "notNull": false
102
+ },
103
+ "created_at": {
104
+ "name": "created_at",
105
+ "type": "timestamp with time zone",
106
+ "primaryKey": false,
107
+ "notNull": true,
108
+ "default": "now()"
109
+ },
110
+ "updated_at": {
111
+ "name": "updated_at",
112
+ "type": "timestamp with time zone",
113
+ "primaryKey": false,
114
+ "notNull": true,
115
+ "default": "now()"
116
+ }
117
+ },
118
+ "indexes": {},
119
+ "foreignKeys": {},
120
+ "compositePrimaryKeys": {},
121
+ "uniqueConstraints": {},
122
+ "policies": {},
123
+ "checkConstraints": {},
124
+ "isRLSEnabled": false
125
+ },
126
+ "public.assets": {
127
+ "name": "assets",
128
+ "schema": "",
129
+ "columns": {
130
+ "collection": {
131
+ "name": "collection",
132
+ "type": "text",
133
+ "primaryKey": false,
134
+ "notNull": true
135
+ },
136
+ "path": {
137
+ "name": "path",
138
+ "type": "text",
139
+ "primaryKey": false,
140
+ "notNull": true
141
+ },
142
+ "name": {
143
+ "name": "name",
144
+ "type": "text",
145
+ "primaryKey": false,
146
+ "notNull": true
147
+ },
148
+ "content_type": {
149
+ "name": "content_type",
150
+ "type": "text",
151
+ "primaryKey": false,
152
+ "notNull": true
153
+ },
154
+ "size": {
155
+ "name": "size",
156
+ "type": "integer",
157
+ "primaryKey": false,
158
+ "notNull": false
159
+ },
160
+ "content_hash": {
161
+ "name": "content_hash",
162
+ "type": "text",
163
+ "primaryKey": false,
164
+ "notNull": true
165
+ },
166
+ "metadata": {
167
+ "name": "metadata",
168
+ "type": "jsonb",
169
+ "primaryKey": false,
170
+ "notNull": false
171
+ },
172
+ "blob_hash": {
173
+ "name": "blob_hash",
174
+ "type": "text",
175
+ "primaryKey": false,
176
+ "notNull": true
177
+ },
178
+ "created_at": {
179
+ "name": "created_at",
180
+ "type": "timestamp with time zone",
181
+ "primaryKey": false,
182
+ "notNull": true,
183
+ "default": "now()"
184
+ },
185
+ "updated_at": {
186
+ "name": "updated_at",
187
+ "type": "timestamp with time zone",
188
+ "primaryKey": false,
189
+ "notNull": true,
190
+ "default": "now()"
191
+ }
192
+ },
193
+ "indexes": {},
194
+ "foreignKeys": {
195
+ "assets_collection_asset_collections_collection_fk": {
196
+ "name": "assets_collection_asset_collections_collection_fk",
197
+ "tableFrom": "assets",
198
+ "tableTo": "asset_collections",
199
+ "columnsFrom": [
200
+ "collection"
201
+ ],
202
+ "columnsTo": [
203
+ "collection"
204
+ ],
205
+ "onDelete": "cascade",
206
+ "onUpdate": "no action"
207
+ },
208
+ "assets_blob_hash_asset_blobs_hash_fk": {
209
+ "name": "assets_blob_hash_asset_blobs_hash_fk",
210
+ "tableFrom": "assets",
211
+ "tableTo": "asset_blobs",
212
+ "columnsFrom": [
213
+ "blob_hash"
214
+ ],
215
+ "columnsTo": [
216
+ "hash"
217
+ ],
218
+ "onDelete": "no action",
219
+ "onUpdate": "no action"
220
+ }
221
+ },
222
+ "compositePrimaryKeys": {
223
+ "assets_collection_path_pk": {
224
+ "name": "assets_collection_path_pk",
225
+ "columns": [
226
+ "collection",
227
+ "path"
228
+ ]
229
+ }
230
+ },
231
+ "uniqueConstraints": {},
232
+ "policies": {},
233
+ "checkConstraints": {},
234
+ "isRLSEnabled": false
235
+ },
236
+ "public.build_metadata": {
237
+ "name": "build_metadata",
238
+ "schema": "",
239
+ "columns": {
240
+ "entity_kind": {
241
+ "name": "entity_kind",
242
+ "type": "text",
243
+ "primaryKey": false,
244
+ "notNull": true
245
+ },
246
+ "entity_id": {
247
+ "name": "entity_id",
248
+ "type": "text",
249
+ "primaryKey": false,
250
+ "notNull": true
251
+ },
252
+ "status": {
253
+ "name": "status",
254
+ "type": "text",
255
+ "primaryKey": false,
256
+ "notNull": true
257
+ },
258
+ "built_at": {
259
+ "name": "built_at",
260
+ "type": "timestamp with time zone",
261
+ "primaryKey": false,
262
+ "notNull": false
263
+ },
264
+ "builder_version": {
265
+ "name": "builder_version",
266
+ "type": "text",
267
+ "primaryKey": false,
268
+ "notNull": false
269
+ },
270
+ "artifact_hash": {
271
+ "name": "artifact_hash",
272
+ "type": "text",
273
+ "primaryKey": false,
274
+ "notNull": false
275
+ },
276
+ "source_hash": {
277
+ "name": "source_hash",
278
+ "type": "text",
279
+ "primaryKey": false,
280
+ "notNull": false
281
+ },
282
+ "warnings": {
283
+ "name": "warnings",
284
+ "type": "jsonb",
285
+ "primaryKey": false,
286
+ "notNull": false
287
+ },
288
+ "error": {
289
+ "name": "error",
290
+ "type": "text",
291
+ "primaryKey": false,
292
+ "notNull": false
293
+ },
294
+ "created_at": {
295
+ "name": "created_at",
296
+ "type": "timestamp with time zone",
297
+ "primaryKey": false,
298
+ "notNull": true,
299
+ "default": "now()"
300
+ },
301
+ "updated_at": {
302
+ "name": "updated_at",
303
+ "type": "timestamp with time zone",
304
+ "primaryKey": false,
305
+ "notNull": true,
306
+ "default": "now()"
307
+ }
308
+ },
309
+ "indexes": {},
310
+ "foreignKeys": {},
311
+ "compositePrimaryKeys": {
312
+ "build_metadata_entity_kind_entity_id_pk": {
313
+ "name": "build_metadata_entity_kind_entity_id_pk",
314
+ "columns": [
315
+ "entity_kind",
316
+ "entity_id"
317
+ ]
318
+ }
319
+ },
320
+ "uniqueConstraints": {},
321
+ "policies": {},
322
+ "checkConstraints": {},
323
+ "isRLSEnabled": false
324
+ },
325
+ "public.component_files": {
326
+ "name": "component_files",
327
+ "schema": "",
328
+ "columns": {
329
+ "component_id": {
330
+ "name": "component_id",
331
+ "type": "text",
332
+ "primaryKey": false,
333
+ "notNull": true
334
+ },
335
+ "path": {
336
+ "name": "path",
337
+ "type": "text",
338
+ "primaryKey": false,
339
+ "notNull": true
340
+ },
341
+ "kind": {
342
+ "name": "kind",
343
+ "type": "text",
344
+ "primaryKey": false,
345
+ "notNull": true
346
+ },
347
+ "content": {
348
+ "name": "content",
349
+ "type": "text",
350
+ "primaryKey": false,
351
+ "notNull": false
352
+ },
353
+ "storage_ref": {
354
+ "name": "storage_ref",
355
+ "type": "text",
356
+ "primaryKey": false,
357
+ "notNull": false
358
+ },
359
+ "content_type": {
360
+ "name": "content_type",
361
+ "type": "text",
362
+ "primaryKey": false,
363
+ "notNull": true
364
+ },
365
+ "created_at": {
366
+ "name": "created_at",
367
+ "type": "timestamp with time zone",
368
+ "primaryKey": false,
369
+ "notNull": true,
370
+ "default": "now()"
371
+ },
372
+ "updated_at": {
373
+ "name": "updated_at",
374
+ "type": "timestamp with time zone",
375
+ "primaryKey": false,
376
+ "notNull": true,
377
+ "default": "now()"
378
+ }
379
+ },
380
+ "indexes": {},
381
+ "foreignKeys": {
382
+ "component_files_component_id_components_id_fk": {
383
+ "name": "component_files_component_id_components_id_fk",
384
+ "tableFrom": "component_files",
385
+ "tableTo": "components",
386
+ "columnsFrom": [
387
+ "component_id"
388
+ ],
389
+ "columnsTo": [
390
+ "id"
391
+ ],
392
+ "onDelete": "cascade",
393
+ "onUpdate": "no action"
394
+ }
395
+ },
396
+ "compositePrimaryKeys": {
397
+ "component_files_component_id_path_pk": {
398
+ "name": "component_files_component_id_path_pk",
399
+ "columns": [
400
+ "component_id",
401
+ "path"
402
+ ]
403
+ }
404
+ },
405
+ "uniqueConstraints": {},
406
+ "policies": {},
407
+ "checkConstraints": {
408
+ "component_files_kind_not_declaration": {
409
+ "name": "component_files_kind_not_declaration",
410
+ "value": "\"component_files\".\"kind\" <> 'declaration'"
411
+ }
412
+ },
413
+ "isRLSEnabled": false
414
+ },
415
+ "public.components": {
416
+ "name": "components",
417
+ "schema": "",
418
+ "columns": {
419
+ "id": {
420
+ "name": "id",
421
+ "type": "text",
422
+ "primaryKey": true,
423
+ "notNull": true
424
+ },
425
+ "path": {
426
+ "name": "path",
427
+ "type": "text",
428
+ "primaryKey": false,
429
+ "notNull": true
430
+ },
431
+ "title": {
432
+ "name": "title",
433
+ "type": "text",
434
+ "primaryKey": false,
435
+ "notNull": false
436
+ },
437
+ "description": {
438
+ "name": "description",
439
+ "type": "text",
440
+ "primaryKey": false,
441
+ "notNull": false
442
+ },
443
+ "group": {
444
+ "name": "group",
445
+ "type": "text",
446
+ "primaryKey": false,
447
+ "notNull": false
448
+ },
449
+ "type": {
450
+ "name": "type",
451
+ "type": "text",
452
+ "primaryKey": false,
453
+ "notNull": false
454
+ },
455
+ "renderer": {
456
+ "name": "renderer",
457
+ "type": "text",
458
+ "primaryKey": false,
459
+ "notNull": false
460
+ },
461
+ "source_format": {
462
+ "name": "source_format",
463
+ "type": "text",
464
+ "primaryKey": false,
465
+ "notNull": false
466
+ },
467
+ "tags": {
468
+ "name": "tags",
469
+ "type": "jsonb",
470
+ "primaryKey": false,
471
+ "notNull": false
472
+ },
473
+ "categories": {
474
+ "name": "categories",
475
+ "type": "jsonb",
476
+ "primaryKey": false,
477
+ "notNull": false
478
+ },
479
+ "record": {
480
+ "name": "record",
481
+ "type": "jsonb",
482
+ "primaryKey": false,
483
+ "notNull": true
484
+ },
485
+ "metadata": {
486
+ "name": "metadata",
487
+ "type": "jsonb",
488
+ "primaryKey": false,
489
+ "notNull": false
490
+ },
491
+ "created_at": {
492
+ "name": "created_at",
493
+ "type": "timestamp with time zone",
494
+ "primaryKey": false,
495
+ "notNull": true,
496
+ "default": "now()"
497
+ },
498
+ "updated_at": {
499
+ "name": "updated_at",
500
+ "type": "timestamp with time zone",
501
+ "primaryKey": false,
502
+ "notNull": true,
503
+ "default": "now()"
504
+ }
505
+ },
506
+ "indexes": {
507
+ "components_group_idx": {
508
+ "name": "components_group_idx",
509
+ "columns": [
510
+ {
511
+ "expression": "group",
512
+ "isExpression": false,
513
+ "asc": true,
514
+ "nulls": "last"
515
+ }
516
+ ],
517
+ "isUnique": false,
518
+ "concurrently": false,
519
+ "method": "btree",
520
+ "with": {}
521
+ }
522
+ },
523
+ "foreignKeys": {},
524
+ "compositePrimaryKeys": {},
525
+ "uniqueConstraints": {},
526
+ "policies": {},
527
+ "checkConstraints": {},
528
+ "isRLSEnabled": false
529
+ },
530
+ "public.docs_artifacts": {
531
+ "name": "docs_artifacts",
532
+ "schema": "",
533
+ "columns": {
534
+ "path": {
535
+ "name": "path",
536
+ "type": "text",
537
+ "primaryKey": true,
538
+ "notNull": true
539
+ },
540
+ "entity_kind": {
541
+ "name": "entity_kind",
542
+ "type": "text",
543
+ "primaryKey": false,
544
+ "notNull": true
545
+ },
546
+ "entity_id": {
547
+ "name": "entity_id",
548
+ "type": "text",
549
+ "primaryKey": false,
550
+ "notNull": false
551
+ },
552
+ "artifact_kind": {
553
+ "name": "artifact_kind",
554
+ "type": "text",
555
+ "primaryKey": false,
556
+ "notNull": true
557
+ },
558
+ "content": {
559
+ "name": "content",
560
+ "type": "text",
561
+ "primaryKey": false,
562
+ "notNull": false
563
+ },
564
+ "storage_ref": {
565
+ "name": "storage_ref",
566
+ "type": "text",
567
+ "primaryKey": false,
568
+ "notNull": false
569
+ },
570
+ "content_type": {
571
+ "name": "content_type",
572
+ "type": "text",
573
+ "primaryKey": false,
574
+ "notNull": true
575
+ },
576
+ "owner_kind": {
577
+ "name": "owner_kind",
578
+ "type": "text",
579
+ "primaryKey": false,
580
+ "notNull": false
581
+ },
582
+ "owner_id": {
583
+ "name": "owner_id",
584
+ "type": "text",
585
+ "primaryKey": false,
586
+ "notNull": false
587
+ },
588
+ "references": {
589
+ "name": "references",
590
+ "type": "jsonb",
591
+ "primaryKey": false,
592
+ "notNull": false
593
+ },
594
+ "format_version": {
595
+ "name": "format_version",
596
+ "type": "text",
597
+ "primaryKey": false,
598
+ "notNull": false
599
+ },
600
+ "build_id": {
601
+ "name": "build_id",
602
+ "type": "text",
603
+ "primaryKey": false,
604
+ "notNull": false
605
+ },
606
+ "hash": {
607
+ "name": "hash",
608
+ "type": "text",
609
+ "primaryKey": false,
610
+ "notNull": false
611
+ },
612
+ "size": {
613
+ "name": "size",
614
+ "type": "integer",
615
+ "primaryKey": false,
616
+ "notNull": false
617
+ },
618
+ "gzip_size": {
619
+ "name": "gzip_size",
620
+ "type": "integer",
621
+ "primaryKey": false,
622
+ "notNull": false
623
+ },
624
+ "created_at": {
625
+ "name": "created_at",
626
+ "type": "timestamp with time zone",
627
+ "primaryKey": false,
628
+ "notNull": true,
629
+ "default": "now()"
630
+ },
631
+ "updated_at": {
632
+ "name": "updated_at",
633
+ "type": "timestamp with time zone",
634
+ "primaryKey": false,
635
+ "notNull": true,
636
+ "default": "now()"
637
+ }
638
+ },
639
+ "indexes": {
640
+ "docs_artifacts_entity_idx": {
641
+ "name": "docs_artifacts_entity_idx",
642
+ "columns": [
643
+ {
644
+ "expression": "entity_kind",
645
+ "isExpression": false,
646
+ "asc": true,
647
+ "nulls": "last"
648
+ },
649
+ {
650
+ "expression": "entity_id",
651
+ "isExpression": false,
652
+ "asc": true,
653
+ "nulls": "last"
654
+ }
655
+ ],
656
+ "isUnique": false,
657
+ "concurrently": false,
658
+ "method": "btree",
659
+ "with": {}
660
+ },
661
+ "docs_artifacts_owner_idx": {
662
+ "name": "docs_artifacts_owner_idx",
663
+ "columns": [
664
+ {
665
+ "expression": "owner_kind",
666
+ "isExpression": false,
667
+ "asc": true,
668
+ "nulls": "last"
669
+ },
670
+ {
671
+ "expression": "owner_id",
672
+ "isExpression": false,
673
+ "asc": true,
674
+ "nulls": "last"
675
+ }
676
+ ],
677
+ "isUnique": false,
678
+ "concurrently": false,
679
+ "method": "btree",
680
+ "with": {}
681
+ }
682
+ },
683
+ "foreignKeys": {},
684
+ "compositePrimaryKeys": {},
685
+ "uniqueConstraints": {},
686
+ "policies": {},
687
+ "checkConstraints": {},
688
+ "isRLSEnabled": false
689
+ },
690
+ "public.page_files": {
691
+ "name": "page_files",
692
+ "schema": "",
693
+ "columns": {
694
+ "page_id": {
695
+ "name": "page_id",
696
+ "type": "text",
697
+ "primaryKey": false,
698
+ "notNull": true
699
+ },
700
+ "path": {
701
+ "name": "path",
702
+ "type": "text",
703
+ "primaryKey": false,
704
+ "notNull": true
705
+ },
706
+ "kind": {
707
+ "name": "kind",
708
+ "type": "text",
709
+ "primaryKey": false,
710
+ "notNull": true
711
+ },
712
+ "content": {
713
+ "name": "content",
714
+ "type": "text",
715
+ "primaryKey": false,
716
+ "notNull": false
717
+ },
718
+ "body": {
719
+ "name": "body",
720
+ "type": "text",
721
+ "primaryKey": false,
722
+ "notNull": true
723
+ },
724
+ "storage_ref": {
725
+ "name": "storage_ref",
726
+ "type": "text",
727
+ "primaryKey": false,
728
+ "notNull": false
729
+ },
730
+ "content_type": {
731
+ "name": "content_type",
732
+ "type": "text",
733
+ "primaryKey": false,
734
+ "notNull": true
735
+ },
736
+ "created_at": {
737
+ "name": "created_at",
738
+ "type": "timestamp with time zone",
739
+ "primaryKey": false,
740
+ "notNull": true,
741
+ "default": "now()"
742
+ },
743
+ "updated_at": {
744
+ "name": "updated_at",
745
+ "type": "timestamp with time zone",
746
+ "primaryKey": false,
747
+ "notNull": true,
748
+ "default": "now()"
749
+ }
750
+ },
751
+ "indexes": {},
752
+ "foreignKeys": {
753
+ "page_files_page_id_pages_id_fk": {
754
+ "name": "page_files_page_id_pages_id_fk",
755
+ "tableFrom": "page_files",
756
+ "tableTo": "pages",
757
+ "columnsFrom": [
758
+ "page_id"
759
+ ],
760
+ "columnsTo": [
761
+ "id"
762
+ ],
763
+ "onDelete": "cascade",
764
+ "onUpdate": "no action"
765
+ }
766
+ },
767
+ "compositePrimaryKeys": {
768
+ "page_files_page_id_pk": {
769
+ "name": "page_files_page_id_pk",
770
+ "columns": [
771
+ "page_id"
772
+ ]
773
+ }
774
+ },
775
+ "uniqueConstraints": {},
776
+ "policies": {},
777
+ "checkConstraints": {
778
+ "page_files_kind_markdown": {
779
+ "name": "page_files_kind_markdown",
780
+ "value": "\"page_files\".\"kind\" = 'markdown'"
781
+ },
782
+ "page_files_canonical_path": {
783
+ "name": "page_files_canonical_path",
784
+ "value": "\"page_files\".\"path\" = \"page_files\".\"page_id\" || '.md'"
785
+ }
786
+ },
787
+ "isRLSEnabled": false
788
+ },
789
+ "public.pages": {
790
+ "name": "pages",
791
+ "schema": "",
792
+ "columns": {
793
+ "id": {
794
+ "name": "id",
795
+ "type": "text",
796
+ "primaryKey": true,
797
+ "notNull": true
798
+ },
799
+ "path": {
800
+ "name": "path",
801
+ "type": "text",
802
+ "primaryKey": false,
803
+ "notNull": true
804
+ },
805
+ "title": {
806
+ "name": "title",
807
+ "type": "text",
808
+ "primaryKey": false,
809
+ "notNull": false
810
+ },
811
+ "description": {
812
+ "name": "description",
813
+ "type": "text",
814
+ "primaryKey": false,
815
+ "notNull": false
816
+ },
817
+ "group": {
818
+ "name": "group",
819
+ "type": "text",
820
+ "primaryKey": false,
821
+ "notNull": false
822
+ },
823
+ "weight": {
824
+ "name": "weight",
825
+ "type": "integer",
826
+ "primaryKey": false,
827
+ "notNull": false
828
+ },
829
+ "record": {
830
+ "name": "record",
831
+ "type": "jsonb",
832
+ "primaryKey": false,
833
+ "notNull": true
834
+ },
835
+ "metadata": {
836
+ "name": "metadata",
837
+ "type": "jsonb",
838
+ "primaryKey": false,
839
+ "notNull": false
840
+ },
841
+ "created_at": {
842
+ "name": "created_at",
843
+ "type": "timestamp with time zone",
844
+ "primaryKey": false,
845
+ "notNull": true,
846
+ "default": "now()"
847
+ },
848
+ "updated_at": {
849
+ "name": "updated_at",
850
+ "type": "timestamp with time zone",
851
+ "primaryKey": false,
852
+ "notNull": true,
853
+ "default": "now()"
854
+ }
855
+ },
856
+ "indexes": {
857
+ "pages_group_idx": {
858
+ "name": "pages_group_idx",
859
+ "columns": [
860
+ {
861
+ "expression": "group",
862
+ "isExpression": false,
863
+ "asc": true,
864
+ "nulls": "last"
865
+ }
866
+ ],
867
+ "isUnique": false,
868
+ "concurrently": false,
869
+ "method": "btree",
870
+ "with": {}
871
+ }
872
+ },
873
+ "foreignKeys": {},
874
+ "compositePrimaryKeys": {},
875
+ "uniqueConstraints": {},
876
+ "policies": {},
877
+ "checkConstraints": {},
878
+ "isRLSEnabled": false
879
+ },
880
+ "public.pattern_files": {
881
+ "name": "pattern_files",
882
+ "schema": "",
883
+ "columns": {
884
+ "pattern_id": {
885
+ "name": "pattern_id",
886
+ "type": "text",
887
+ "primaryKey": false,
888
+ "notNull": true
889
+ },
890
+ "path": {
891
+ "name": "path",
892
+ "type": "text",
893
+ "primaryKey": false,
894
+ "notNull": true
895
+ },
896
+ "kind": {
897
+ "name": "kind",
898
+ "type": "text",
899
+ "primaryKey": false,
900
+ "notNull": true
901
+ },
902
+ "content": {
903
+ "name": "content",
904
+ "type": "text",
905
+ "primaryKey": false,
906
+ "notNull": false
907
+ },
908
+ "storage_ref": {
909
+ "name": "storage_ref",
910
+ "type": "text",
911
+ "primaryKey": false,
912
+ "notNull": false
913
+ },
914
+ "content_type": {
915
+ "name": "content_type",
916
+ "type": "text",
917
+ "primaryKey": false,
918
+ "notNull": true
919
+ },
920
+ "created_at": {
921
+ "name": "created_at",
922
+ "type": "timestamp with time zone",
923
+ "primaryKey": false,
924
+ "notNull": true,
925
+ "default": "now()"
926
+ },
927
+ "updated_at": {
928
+ "name": "updated_at",
929
+ "type": "timestamp with time zone",
930
+ "primaryKey": false,
931
+ "notNull": true,
932
+ "default": "now()"
933
+ }
934
+ },
935
+ "indexes": {},
936
+ "foreignKeys": {
937
+ "pattern_files_pattern_id_patterns_id_fk": {
938
+ "name": "pattern_files_pattern_id_patterns_id_fk",
939
+ "tableFrom": "pattern_files",
940
+ "tableTo": "patterns",
941
+ "columnsFrom": [
942
+ "pattern_id"
943
+ ],
944
+ "columnsTo": [
945
+ "id"
946
+ ],
947
+ "onDelete": "cascade",
948
+ "onUpdate": "no action"
949
+ }
950
+ },
951
+ "compositePrimaryKeys": {
952
+ "pattern_files_pattern_id_path_pk": {
953
+ "name": "pattern_files_pattern_id_path_pk",
954
+ "columns": [
955
+ "pattern_id",
956
+ "path"
957
+ ]
958
+ }
959
+ },
960
+ "uniqueConstraints": {},
961
+ "policies": {},
962
+ "checkConstraints": {
963
+ "pattern_files_kind_not_declaration": {
964
+ "name": "pattern_files_kind_not_declaration",
965
+ "value": "\"pattern_files\".\"kind\" <> 'declaration'"
966
+ }
967
+ },
968
+ "isRLSEnabled": false
969
+ },
970
+ "public.patterns": {
971
+ "name": "patterns",
972
+ "schema": "",
973
+ "columns": {
974
+ "id": {
975
+ "name": "id",
976
+ "type": "text",
977
+ "primaryKey": true,
978
+ "notNull": true
979
+ },
980
+ "path": {
981
+ "name": "path",
982
+ "type": "text",
983
+ "primaryKey": false,
984
+ "notNull": true
985
+ },
986
+ "title": {
987
+ "name": "title",
988
+ "type": "text",
989
+ "primaryKey": false,
990
+ "notNull": false
991
+ },
992
+ "description": {
993
+ "name": "description",
994
+ "type": "text",
995
+ "primaryKey": false,
996
+ "notNull": false
997
+ },
998
+ "group": {
999
+ "name": "group",
1000
+ "type": "text",
1001
+ "primaryKey": false,
1002
+ "notNull": false
1003
+ },
1004
+ "tags": {
1005
+ "name": "tags",
1006
+ "type": "jsonb",
1007
+ "primaryKey": false,
1008
+ "notNull": false
1009
+ },
1010
+ "components": {
1011
+ "name": "components",
1012
+ "type": "jsonb",
1013
+ "primaryKey": false,
1014
+ "notNull": false
1015
+ },
1016
+ "record": {
1017
+ "name": "record",
1018
+ "type": "jsonb",
1019
+ "primaryKey": false,
1020
+ "notNull": true
1021
+ },
1022
+ "metadata": {
1023
+ "name": "metadata",
1024
+ "type": "jsonb",
1025
+ "primaryKey": false,
1026
+ "notNull": false
1027
+ },
1028
+ "created_at": {
1029
+ "name": "created_at",
1030
+ "type": "timestamp with time zone",
1031
+ "primaryKey": false,
1032
+ "notNull": true,
1033
+ "default": "now()"
1034
+ },
1035
+ "updated_at": {
1036
+ "name": "updated_at",
1037
+ "type": "timestamp with time zone",
1038
+ "primaryKey": false,
1039
+ "notNull": true,
1040
+ "default": "now()"
1041
+ }
1042
+ },
1043
+ "indexes": {
1044
+ "patterns_group_idx": {
1045
+ "name": "patterns_group_idx",
1046
+ "columns": [
1047
+ {
1048
+ "expression": "group",
1049
+ "isExpression": false,
1050
+ "asc": true,
1051
+ "nulls": "last"
1052
+ }
1053
+ ],
1054
+ "isUnique": false,
1055
+ "concurrently": false,
1056
+ "method": "btree",
1057
+ "with": {}
1058
+ }
1059
+ },
1060
+ "foreignKeys": {},
1061
+ "compositePrimaryKeys": {},
1062
+ "uniqueConstraints": {},
1063
+ "policies": {},
1064
+ "checkConstraints": {},
1065
+ "isRLSEnabled": false
1066
+ },
1067
+ "public.registry_access_tokens": {
1068
+ "name": "registry_access_tokens",
1069
+ "schema": "",
1070
+ "columns": {
1071
+ "id": {
1072
+ "name": "id",
1073
+ "type": "text",
1074
+ "primaryKey": true,
1075
+ "notNull": true
1076
+ },
1077
+ "user_id": {
1078
+ "name": "user_id",
1079
+ "type": "text",
1080
+ "primaryKey": false,
1081
+ "notNull": true
1082
+ },
1083
+ "name": {
1084
+ "name": "name",
1085
+ "type": "text",
1086
+ "primaryKey": false,
1087
+ "notNull": true
1088
+ },
1089
+ "secret_hash": {
1090
+ "name": "secret_hash",
1091
+ "type": "text",
1092
+ "primaryKey": false,
1093
+ "notNull": true
1094
+ },
1095
+ "scopes": {
1096
+ "name": "scopes",
1097
+ "type": "jsonb",
1098
+ "primaryKey": false,
1099
+ "notNull": true
1100
+ },
1101
+ "expires_at": {
1102
+ "name": "expires_at",
1103
+ "type": "timestamp with time zone",
1104
+ "primaryKey": false,
1105
+ "notNull": true
1106
+ },
1107
+ "last_used_at": {
1108
+ "name": "last_used_at",
1109
+ "type": "timestamp with time zone",
1110
+ "primaryKey": false,
1111
+ "notNull": false
1112
+ },
1113
+ "revoked_at": {
1114
+ "name": "revoked_at",
1115
+ "type": "timestamp with time zone",
1116
+ "primaryKey": false,
1117
+ "notNull": false
1118
+ },
1119
+ "created_at": {
1120
+ "name": "created_at",
1121
+ "type": "timestamp with time zone",
1122
+ "primaryKey": false,
1123
+ "notNull": true,
1124
+ "default": "now()"
1125
+ }
1126
+ },
1127
+ "indexes": {
1128
+ "registry_access_tokens_user_idx": {
1129
+ "name": "registry_access_tokens_user_idx",
1130
+ "columns": [
1131
+ {
1132
+ "expression": "user_id",
1133
+ "isExpression": false,
1134
+ "asc": true,
1135
+ "nulls": "last"
1136
+ }
1137
+ ],
1138
+ "isUnique": false,
1139
+ "concurrently": false,
1140
+ "method": "btree",
1141
+ "with": {}
1142
+ },
1143
+ "registry_access_tokens_expires_idx": {
1144
+ "name": "registry_access_tokens_expires_idx",
1145
+ "columns": [
1146
+ {
1147
+ "expression": "expires_at",
1148
+ "isExpression": false,
1149
+ "asc": true,
1150
+ "nulls": "last"
1151
+ }
1152
+ ],
1153
+ "isUnique": false,
1154
+ "concurrently": false,
1155
+ "method": "btree",
1156
+ "with": {}
1157
+ }
1158
+ },
1159
+ "foreignKeys": {
1160
+ "registry_access_tokens_user_id_registry_users_id_fk": {
1161
+ "name": "registry_access_tokens_user_id_registry_users_id_fk",
1162
+ "tableFrom": "registry_access_tokens",
1163
+ "tableTo": "registry_users",
1164
+ "columnsFrom": [
1165
+ "user_id"
1166
+ ],
1167
+ "columnsTo": [
1168
+ "id"
1169
+ ],
1170
+ "onDelete": "cascade",
1171
+ "onUpdate": "no action"
1172
+ }
1173
+ },
1174
+ "compositePrimaryKeys": {},
1175
+ "uniqueConstraints": {},
1176
+ "policies": {},
1177
+ "checkConstraints": {
1178
+ "registry_access_tokens_name_not_blank": {
1179
+ "name": "registry_access_tokens_name_not_blank",
1180
+ "value": "length(btrim(\"registry_access_tokens\".\"name\")) > 0"
1181
+ },
1182
+ "registry_access_tokens_scopes_array": {
1183
+ "name": "registry_access_tokens_scopes_array",
1184
+ "value": "jsonb_typeof(\"registry_access_tokens\".\"scopes\") = 'array'"
1185
+ }
1186
+ },
1187
+ "isRLSEnabled": false
1188
+ },
1189
+ "public.registry_ai_keys": {
1190
+ "name": "registry_ai_keys",
1191
+ "schema": "",
1192
+ "columns": {
1193
+ "user_id": {
1194
+ "name": "user_id",
1195
+ "type": "text",
1196
+ "primaryKey": false,
1197
+ "notNull": true
1198
+ },
1199
+ "connection_id": {
1200
+ "name": "connection_id",
1201
+ "type": "text",
1202
+ "primaryKey": false,
1203
+ "notNull": true
1204
+ },
1205
+ "encrypted_key": {
1206
+ "name": "encrypted_key",
1207
+ "type": "text",
1208
+ "primaryKey": false,
1209
+ "notNull": true
1210
+ },
1211
+ "created_at": {
1212
+ "name": "created_at",
1213
+ "type": "timestamp with time zone",
1214
+ "primaryKey": false,
1215
+ "notNull": true,
1216
+ "default": "now()"
1217
+ },
1218
+ "updated_at": {
1219
+ "name": "updated_at",
1220
+ "type": "timestamp with time zone",
1221
+ "primaryKey": false,
1222
+ "notNull": true,
1223
+ "default": "now()"
1224
+ }
1225
+ },
1226
+ "indexes": {},
1227
+ "foreignKeys": {
1228
+ "registry_ai_keys_user_id_registry_users_id_fk": {
1229
+ "name": "registry_ai_keys_user_id_registry_users_id_fk",
1230
+ "tableFrom": "registry_ai_keys",
1231
+ "tableTo": "registry_users",
1232
+ "columnsFrom": [
1233
+ "user_id"
1234
+ ],
1235
+ "columnsTo": [
1236
+ "id"
1237
+ ],
1238
+ "onDelete": "cascade",
1239
+ "onUpdate": "no action"
1240
+ }
1241
+ },
1242
+ "compositePrimaryKeys": {
1243
+ "registry_ai_keys_user_id_connection_id_pk": {
1244
+ "name": "registry_ai_keys_user_id_connection_id_pk",
1245
+ "columns": [
1246
+ "user_id",
1247
+ "connection_id"
1248
+ ]
1249
+ }
1250
+ },
1251
+ "uniqueConstraints": {},
1252
+ "policies": {},
1253
+ "checkConstraints": {
1254
+ "registry_ai_keys_connection_not_blank": {
1255
+ "name": "registry_ai_keys_connection_not_blank",
1256
+ "value": "length(btrim(\"registry_ai_keys\".\"connection_id\")) > 0"
1257
+ }
1258
+ },
1259
+ "isRLSEnabled": false
1260
+ },
1261
+ "public.registry_auth_action_tokens": {
1262
+ "name": "registry_auth_action_tokens",
1263
+ "schema": "",
1264
+ "columns": {
1265
+ "id": {
1266
+ "name": "id",
1267
+ "type": "text",
1268
+ "primaryKey": true,
1269
+ "notNull": true
1270
+ },
1271
+ "user_id": {
1272
+ "name": "user_id",
1273
+ "type": "text",
1274
+ "primaryKey": false,
1275
+ "notNull": true
1276
+ },
1277
+ "purpose": {
1278
+ "name": "purpose",
1279
+ "type": "text",
1280
+ "primaryKey": false,
1281
+ "notNull": true
1282
+ },
1283
+ "token_hash": {
1284
+ "name": "token_hash",
1285
+ "type": "text",
1286
+ "primaryKey": false,
1287
+ "notNull": true
1288
+ },
1289
+ "expires_at": {
1290
+ "name": "expires_at",
1291
+ "type": "timestamp with time zone",
1292
+ "primaryKey": false,
1293
+ "notNull": true
1294
+ },
1295
+ "used_at": {
1296
+ "name": "used_at",
1297
+ "type": "timestamp with time zone",
1298
+ "primaryKey": false,
1299
+ "notNull": false
1300
+ },
1301
+ "created_at": {
1302
+ "name": "created_at",
1303
+ "type": "timestamp with time zone",
1304
+ "primaryKey": false,
1305
+ "notNull": true,
1306
+ "default": "now()"
1307
+ }
1308
+ },
1309
+ "indexes": {
1310
+ "registry_auth_action_tokens_hash_idx": {
1311
+ "name": "registry_auth_action_tokens_hash_idx",
1312
+ "columns": [
1313
+ {
1314
+ "expression": "token_hash",
1315
+ "isExpression": false,
1316
+ "asc": true,
1317
+ "nulls": "last"
1318
+ }
1319
+ ],
1320
+ "isUnique": true,
1321
+ "concurrently": false,
1322
+ "method": "btree",
1323
+ "with": {}
1324
+ },
1325
+ "registry_auth_action_tokens_user_purpose_idx": {
1326
+ "name": "registry_auth_action_tokens_user_purpose_idx",
1327
+ "columns": [
1328
+ {
1329
+ "expression": "user_id",
1330
+ "isExpression": false,
1331
+ "asc": true,
1332
+ "nulls": "last"
1333
+ },
1334
+ {
1335
+ "expression": "purpose",
1336
+ "isExpression": false,
1337
+ "asc": true,
1338
+ "nulls": "last"
1339
+ }
1340
+ ],
1341
+ "isUnique": false,
1342
+ "concurrently": false,
1343
+ "method": "btree",
1344
+ "with": {}
1345
+ }
1346
+ },
1347
+ "foreignKeys": {
1348
+ "registry_auth_action_tokens_user_id_registry_users_id_fk": {
1349
+ "name": "registry_auth_action_tokens_user_id_registry_users_id_fk",
1350
+ "tableFrom": "registry_auth_action_tokens",
1351
+ "tableTo": "registry_users",
1352
+ "columnsFrom": [
1353
+ "user_id"
1354
+ ],
1355
+ "columnsTo": [
1356
+ "id"
1357
+ ],
1358
+ "onDelete": "cascade",
1359
+ "onUpdate": "no action"
1360
+ }
1361
+ },
1362
+ "compositePrimaryKeys": {},
1363
+ "uniqueConstraints": {},
1364
+ "policies": {},
1365
+ "checkConstraints": {
1366
+ "registry_auth_action_tokens_purpose_valid": {
1367
+ "name": "registry_auth_action_tokens_purpose_valid",
1368
+ "value": "\"registry_auth_action_tokens\".\"purpose\" in ('invite', 'password_reset')"
1369
+ }
1370
+ },
1371
+ "isRLSEnabled": false
1372
+ },
1373
+ "public.registry_auth_rate_limits": {
1374
+ "name": "registry_auth_rate_limits",
1375
+ "schema": "",
1376
+ "columns": {
1377
+ "bucket": {
1378
+ "name": "bucket",
1379
+ "type": "text",
1380
+ "primaryKey": false,
1381
+ "notNull": true
1382
+ },
1383
+ "identifier_hash": {
1384
+ "name": "identifier_hash",
1385
+ "type": "text",
1386
+ "primaryKey": false,
1387
+ "notNull": true
1388
+ },
1389
+ "window_started_at": {
1390
+ "name": "window_started_at",
1391
+ "type": "timestamp with time zone",
1392
+ "primaryKey": false,
1393
+ "notNull": true
1394
+ },
1395
+ "attempts": {
1396
+ "name": "attempts",
1397
+ "type": "integer",
1398
+ "primaryKey": false,
1399
+ "notNull": true,
1400
+ "default": 1
1401
+ },
1402
+ "expires_at": {
1403
+ "name": "expires_at",
1404
+ "type": "timestamp with time zone",
1405
+ "primaryKey": false,
1406
+ "notNull": true
1407
+ },
1408
+ "updated_at": {
1409
+ "name": "updated_at",
1410
+ "type": "timestamp with time zone",
1411
+ "primaryKey": false,
1412
+ "notNull": true,
1413
+ "default": "now()"
1414
+ }
1415
+ },
1416
+ "indexes": {
1417
+ "registry_auth_rate_limits_expires_idx": {
1418
+ "name": "registry_auth_rate_limits_expires_idx",
1419
+ "columns": [
1420
+ {
1421
+ "expression": "expires_at",
1422
+ "isExpression": false,
1423
+ "asc": true,
1424
+ "nulls": "last"
1425
+ }
1426
+ ],
1427
+ "isUnique": false,
1428
+ "concurrently": false,
1429
+ "method": "btree",
1430
+ "with": {}
1431
+ }
1432
+ },
1433
+ "foreignKeys": {},
1434
+ "compositePrimaryKeys": {
1435
+ "registry_auth_rate_limits_bucket_identifier_hash_window_started_at_pk": {
1436
+ "name": "registry_auth_rate_limits_bucket_identifier_hash_window_started_at_pk",
1437
+ "columns": [
1438
+ "bucket",
1439
+ "identifier_hash",
1440
+ "window_started_at"
1441
+ ]
1442
+ }
1443
+ },
1444
+ "uniqueConstraints": {},
1445
+ "policies": {},
1446
+ "checkConstraints": {
1447
+ "registry_auth_rate_limits_bucket_valid": {
1448
+ "name": "registry_auth_rate_limits_bucket_valid",
1449
+ "value": "\"registry_auth_rate_limits\".\"bucket\" in ('login', 'password_reset', 'device')"
1450
+ },
1451
+ "registry_auth_rate_limits_attempts_positive": {
1452
+ "name": "registry_auth_rate_limits_attempts_positive",
1453
+ "value": "\"registry_auth_rate_limits\".\"attempts\" > 0"
1454
+ }
1455
+ },
1456
+ "isRLSEnabled": false
1457
+ },
1458
+ "public.registry_device_authorizations": {
1459
+ "name": "registry_device_authorizations",
1460
+ "schema": "",
1461
+ "columns": {
1462
+ "id": {
1463
+ "name": "id",
1464
+ "type": "text",
1465
+ "primaryKey": true,
1466
+ "notNull": true
1467
+ },
1468
+ "device_code_hash": {
1469
+ "name": "device_code_hash",
1470
+ "type": "text",
1471
+ "primaryKey": false,
1472
+ "notNull": true
1473
+ },
1474
+ "user_code": {
1475
+ "name": "user_code",
1476
+ "type": "text",
1477
+ "primaryKey": false,
1478
+ "notNull": true
1479
+ },
1480
+ "status": {
1481
+ "name": "status",
1482
+ "type": "text",
1483
+ "primaryKey": false,
1484
+ "notNull": true,
1485
+ "default": "'pending'"
1486
+ },
1487
+ "user_id": {
1488
+ "name": "user_id",
1489
+ "type": "text",
1490
+ "primaryKey": false,
1491
+ "notNull": false
1492
+ },
1493
+ "scopes": {
1494
+ "name": "scopes",
1495
+ "type": "jsonb",
1496
+ "primaryKey": false,
1497
+ "notNull": true
1498
+ },
1499
+ "expires_at": {
1500
+ "name": "expires_at",
1501
+ "type": "timestamp with time zone",
1502
+ "primaryKey": false,
1503
+ "notNull": true
1504
+ },
1505
+ "approved_at": {
1506
+ "name": "approved_at",
1507
+ "type": "timestamp with time zone",
1508
+ "primaryKey": false,
1509
+ "notNull": false
1510
+ },
1511
+ "consumed_at": {
1512
+ "name": "consumed_at",
1513
+ "type": "timestamp with time zone",
1514
+ "primaryKey": false,
1515
+ "notNull": false
1516
+ },
1517
+ "created_at": {
1518
+ "name": "created_at",
1519
+ "type": "timestamp with time zone",
1520
+ "primaryKey": false,
1521
+ "notNull": true,
1522
+ "default": "now()"
1523
+ }
1524
+ },
1525
+ "indexes": {
1526
+ "registry_device_authorizations_device_hash_idx": {
1527
+ "name": "registry_device_authorizations_device_hash_idx",
1528
+ "columns": [
1529
+ {
1530
+ "expression": "device_code_hash",
1531
+ "isExpression": false,
1532
+ "asc": true,
1533
+ "nulls": "last"
1534
+ }
1535
+ ],
1536
+ "isUnique": true,
1537
+ "concurrently": false,
1538
+ "method": "btree",
1539
+ "with": {}
1540
+ },
1541
+ "registry_device_authorizations_user_code_idx": {
1542
+ "name": "registry_device_authorizations_user_code_idx",
1543
+ "columns": [
1544
+ {
1545
+ "expression": "user_code",
1546
+ "isExpression": false,
1547
+ "asc": true,
1548
+ "nulls": "last"
1549
+ }
1550
+ ],
1551
+ "isUnique": true,
1552
+ "concurrently": false,
1553
+ "method": "btree",
1554
+ "with": {}
1555
+ },
1556
+ "registry_device_authorizations_expires_idx": {
1557
+ "name": "registry_device_authorizations_expires_idx",
1558
+ "columns": [
1559
+ {
1560
+ "expression": "expires_at",
1561
+ "isExpression": false,
1562
+ "asc": true,
1563
+ "nulls": "last"
1564
+ }
1565
+ ],
1566
+ "isUnique": false,
1567
+ "concurrently": false,
1568
+ "method": "btree",
1569
+ "with": {}
1570
+ }
1571
+ },
1572
+ "foreignKeys": {
1573
+ "registry_device_authorizations_user_id_registry_users_id_fk": {
1574
+ "name": "registry_device_authorizations_user_id_registry_users_id_fk",
1575
+ "tableFrom": "registry_device_authorizations",
1576
+ "tableTo": "registry_users",
1577
+ "columnsFrom": [
1578
+ "user_id"
1579
+ ],
1580
+ "columnsTo": [
1581
+ "id"
1582
+ ],
1583
+ "onDelete": "set null",
1584
+ "onUpdate": "no action"
1585
+ }
1586
+ },
1587
+ "compositePrimaryKeys": {},
1588
+ "uniqueConstraints": {},
1589
+ "policies": {},
1590
+ "checkConstraints": {
1591
+ "registry_device_authorizations_status_valid": {
1592
+ "name": "registry_device_authorizations_status_valid",
1593
+ "value": "\"registry_device_authorizations\".\"status\" in ('pending', 'approved', 'denied', 'consumed')"
1594
+ },
1595
+ "registry_device_authorizations_scopes_array": {
1596
+ "name": "registry_device_authorizations_scopes_array",
1597
+ "value": "jsonb_typeof(\"registry_device_authorizations\".\"scopes\") = 'array'"
1598
+ }
1599
+ },
1600
+ "isRLSEnabled": false
1601
+ },
1602
+ "public.registry_installations": {
1603
+ "name": "registry_installations",
1604
+ "schema": "",
1605
+ "columns": {
1606
+ "id": {
1607
+ "name": "id",
1608
+ "type": "text",
1609
+ "primaryKey": true,
1610
+ "notNull": true,
1611
+ "default": "'default'"
1612
+ },
1613
+ "status": {
1614
+ "name": "status",
1615
+ "type": "text",
1616
+ "primaryKey": false,
1617
+ "notNull": true,
1618
+ "default": "'installed'"
1619
+ },
1620
+ "schema_version": {
1621
+ "name": "schema_version",
1622
+ "type": "integer",
1623
+ "primaryKey": false,
1624
+ "notNull": true
1625
+ },
1626
+ "initial_admin_user_id": {
1627
+ "name": "initial_admin_user_id",
1628
+ "type": "text",
1629
+ "primaryKey": false,
1630
+ "notNull": true
1631
+ },
1632
+ "installed_at": {
1633
+ "name": "installed_at",
1634
+ "type": "timestamp with time zone",
1635
+ "primaryKey": false,
1636
+ "notNull": true,
1637
+ "default": "now()"
1638
+ }
1639
+ },
1640
+ "indexes": {},
1641
+ "foreignKeys": {
1642
+ "registry_installations_initial_admin_user_id_registry_users_id_fk": {
1643
+ "name": "registry_installations_initial_admin_user_id_registry_users_id_fk",
1644
+ "tableFrom": "registry_installations",
1645
+ "tableTo": "registry_users",
1646
+ "columnsFrom": [
1647
+ "initial_admin_user_id"
1648
+ ],
1649
+ "columnsTo": [
1650
+ "id"
1651
+ ],
1652
+ "onDelete": "restrict",
1653
+ "onUpdate": "no action"
1654
+ }
1655
+ },
1656
+ "compositePrimaryKeys": {},
1657
+ "uniqueConstraints": {},
1658
+ "policies": {},
1659
+ "checkConstraints": {
1660
+ "registry_installations_singleton": {
1661
+ "name": "registry_installations_singleton",
1662
+ "value": "\"registry_installations\".\"id\" = 'default'"
1663
+ },
1664
+ "registry_installations_status_valid": {
1665
+ "name": "registry_installations_status_valid",
1666
+ "value": "\"registry_installations\".\"status\" = 'installed'"
1667
+ },
1668
+ "registry_installations_schema_version_positive": {
1669
+ "name": "registry_installations_schema_version_positive",
1670
+ "value": "\"registry_installations\".\"schema_version\" > 0"
1671
+ }
1672
+ },
1673
+ "isRLSEnabled": false
1674
+ },
1675
+ "public.registry_users": {
1676
+ "name": "registry_users",
1677
+ "schema": "",
1678
+ "columns": {
1679
+ "id": {
1680
+ "name": "id",
1681
+ "type": "text",
1682
+ "primaryKey": true,
1683
+ "notNull": true
1684
+ },
1685
+ "email": {
1686
+ "name": "email",
1687
+ "type": "text",
1688
+ "primaryKey": false,
1689
+ "notNull": true
1690
+ },
1691
+ "name": {
1692
+ "name": "name",
1693
+ "type": "text",
1694
+ "primaryKey": false,
1695
+ "notNull": false
1696
+ },
1697
+ "image": {
1698
+ "name": "image",
1699
+ "type": "text",
1700
+ "primaryKey": false,
1701
+ "notNull": false
1702
+ },
1703
+ "role": {
1704
+ "name": "role",
1705
+ "type": "text",
1706
+ "primaryKey": false,
1707
+ "notNull": true,
1708
+ "default": "'member'"
1709
+ },
1710
+ "status": {
1711
+ "name": "status",
1712
+ "type": "text",
1713
+ "primaryKey": false,
1714
+ "notNull": true,
1715
+ "default": "'invited'"
1716
+ },
1717
+ "password_hash": {
1718
+ "name": "password_hash",
1719
+ "type": "text",
1720
+ "primaryKey": false,
1721
+ "notNull": false
1722
+ },
1723
+ "email_verified_at": {
1724
+ "name": "email_verified_at",
1725
+ "type": "timestamp with time zone",
1726
+ "primaryKey": false,
1727
+ "notNull": false
1728
+ },
1729
+ "auth_version": {
1730
+ "name": "auth_version",
1731
+ "type": "integer",
1732
+ "primaryKey": false,
1733
+ "notNull": true,
1734
+ "default": 1
1735
+ },
1736
+ "created_at": {
1737
+ "name": "created_at",
1738
+ "type": "timestamp with time zone",
1739
+ "primaryKey": false,
1740
+ "notNull": true,
1741
+ "default": "now()"
1742
+ },
1743
+ "updated_at": {
1744
+ "name": "updated_at",
1745
+ "type": "timestamp with time zone",
1746
+ "primaryKey": false,
1747
+ "notNull": true,
1748
+ "default": "now()"
1749
+ }
1750
+ },
1751
+ "indexes": {
1752
+ "registry_users_normalized_email_idx": {
1753
+ "name": "registry_users_normalized_email_idx",
1754
+ "columns": [
1755
+ {
1756
+ "expression": "lower(btrim(\"email\"))",
1757
+ "asc": true,
1758
+ "isExpression": true,
1759
+ "nulls": "last"
1760
+ }
1761
+ ],
1762
+ "isUnique": true,
1763
+ "concurrently": false,
1764
+ "method": "btree",
1765
+ "with": {}
1766
+ },
1767
+ "registry_users_status_role_idx": {
1768
+ "name": "registry_users_status_role_idx",
1769
+ "columns": [
1770
+ {
1771
+ "expression": "status",
1772
+ "isExpression": false,
1773
+ "asc": true,
1774
+ "nulls": "last"
1775
+ },
1776
+ {
1777
+ "expression": "role",
1778
+ "isExpression": false,
1779
+ "asc": true,
1780
+ "nulls": "last"
1781
+ }
1782
+ ],
1783
+ "isUnique": false,
1784
+ "concurrently": false,
1785
+ "method": "btree",
1786
+ "with": {}
1787
+ }
1788
+ },
1789
+ "foreignKeys": {},
1790
+ "compositePrimaryKeys": {},
1791
+ "uniqueConstraints": {},
1792
+ "policies": {},
1793
+ "checkConstraints": {
1794
+ "registry_users_email_normalized": {
1795
+ "name": "registry_users_email_normalized",
1796
+ "value": "\"registry_users\".\"email\" = lower(btrim(\"registry_users\".\"email\"))"
1797
+ },
1798
+ "registry_users_role_valid": {
1799
+ "name": "registry_users_role_valid",
1800
+ "value": "\"registry_users\".\"role\" in ('admin', 'member')"
1801
+ },
1802
+ "registry_users_status_valid": {
1803
+ "name": "registry_users_status_valid",
1804
+ "value": "\"registry_users\".\"status\" in ('invited', 'active', 'deactivated')"
1805
+ },
1806
+ "registry_users_auth_version_positive": {
1807
+ "name": "registry_users_auth_version_positive",
1808
+ "value": "\"registry_users\".\"auth_version\" > 0"
1809
+ }
1810
+ },
1811
+ "isRLSEnabled": false
1812
+ },
1813
+ "public.token_artifacts": {
1814
+ "name": "token_artifacts",
1815
+ "schema": "",
1816
+ "columns": {
1817
+ "token_set_id": {
1818
+ "name": "token_set_id",
1819
+ "type": "text",
1820
+ "primaryKey": false,
1821
+ "notNull": true
1822
+ },
1823
+ "path": {
1824
+ "name": "path",
1825
+ "type": "text",
1826
+ "primaryKey": false,
1827
+ "notNull": true
1828
+ },
1829
+ "format": {
1830
+ "name": "format",
1831
+ "type": "text",
1832
+ "primaryKey": false,
1833
+ "notNull": true
1834
+ },
1835
+ "content": {
1836
+ "name": "content",
1837
+ "type": "text",
1838
+ "primaryKey": false,
1839
+ "notNull": false
1840
+ },
1841
+ "storage_ref": {
1842
+ "name": "storage_ref",
1843
+ "type": "text",
1844
+ "primaryKey": false,
1845
+ "notNull": false
1846
+ },
1847
+ "content_type": {
1848
+ "name": "content_type",
1849
+ "type": "text",
1850
+ "primaryKey": false,
1851
+ "notNull": true
1852
+ },
1853
+ "hash": {
1854
+ "name": "hash",
1855
+ "type": "text",
1856
+ "primaryKey": false,
1857
+ "notNull": false
1858
+ },
1859
+ "size": {
1860
+ "name": "size",
1861
+ "type": "integer",
1862
+ "primaryKey": false,
1863
+ "notNull": false
1864
+ },
1865
+ "created_at": {
1866
+ "name": "created_at",
1867
+ "type": "timestamp with time zone",
1868
+ "primaryKey": false,
1869
+ "notNull": true,
1870
+ "default": "now()"
1871
+ },
1872
+ "updated_at": {
1873
+ "name": "updated_at",
1874
+ "type": "timestamp with time zone",
1875
+ "primaryKey": false,
1876
+ "notNull": true,
1877
+ "default": "now()"
1878
+ }
1879
+ },
1880
+ "indexes": {},
1881
+ "foreignKeys": {
1882
+ "token_artifacts_token_set_id_token_sets_id_fk": {
1883
+ "name": "token_artifacts_token_set_id_token_sets_id_fk",
1884
+ "tableFrom": "token_artifacts",
1885
+ "tableTo": "token_sets",
1886
+ "columnsFrom": [
1887
+ "token_set_id"
1888
+ ],
1889
+ "columnsTo": [
1890
+ "id"
1891
+ ],
1892
+ "onDelete": "cascade",
1893
+ "onUpdate": "no action"
1894
+ }
1895
+ },
1896
+ "compositePrimaryKeys": {
1897
+ "token_artifacts_token_set_id_path_pk": {
1898
+ "name": "token_artifacts_token_set_id_path_pk",
1899
+ "columns": [
1900
+ "token_set_id",
1901
+ "path"
1902
+ ]
1903
+ }
1904
+ },
1905
+ "uniqueConstraints": {},
1906
+ "policies": {},
1907
+ "checkConstraints": {},
1908
+ "isRLSEnabled": false
1909
+ },
1910
+ "public.token_sets": {
1911
+ "name": "token_sets",
1912
+ "schema": "",
1913
+ "columns": {
1914
+ "id": {
1915
+ "name": "id",
1916
+ "type": "text",
1917
+ "primaryKey": true,
1918
+ "notNull": true
1919
+ },
1920
+ "kind": {
1921
+ "name": "kind",
1922
+ "type": "text",
1923
+ "primaryKey": false,
1924
+ "notNull": true
1925
+ },
1926
+ "record": {
1927
+ "name": "record",
1928
+ "type": "jsonb",
1929
+ "primaryKey": false,
1930
+ "notNull": true
1931
+ },
1932
+ "source_hash": {
1933
+ "name": "source_hash",
1934
+ "type": "text",
1935
+ "primaryKey": false,
1936
+ "notNull": false
1937
+ },
1938
+ "status": {
1939
+ "name": "status",
1940
+ "type": "text",
1941
+ "primaryKey": false,
1942
+ "notNull": false
1943
+ },
1944
+ "built_at": {
1945
+ "name": "built_at",
1946
+ "type": "timestamp with time zone",
1947
+ "primaryKey": false,
1948
+ "notNull": false
1949
+ },
1950
+ "builder_version": {
1951
+ "name": "builder_version",
1952
+ "type": "text",
1953
+ "primaryKey": false,
1954
+ "notNull": false
1955
+ },
1956
+ "metadata": {
1957
+ "name": "metadata",
1958
+ "type": "jsonb",
1959
+ "primaryKey": false,
1960
+ "notNull": false
1961
+ },
1962
+ "created_at": {
1963
+ "name": "created_at",
1964
+ "type": "timestamp with time zone",
1965
+ "primaryKey": false,
1966
+ "notNull": true,
1967
+ "default": "now()"
1968
+ },
1969
+ "updated_at": {
1970
+ "name": "updated_at",
1971
+ "type": "timestamp with time zone",
1972
+ "primaryKey": false,
1973
+ "notNull": true,
1974
+ "default": "now()"
1975
+ }
1976
+ },
1977
+ "indexes": {
1978
+ "token_sets_kind_idx": {
1979
+ "name": "token_sets_kind_idx",
1980
+ "columns": [
1981
+ {
1982
+ "expression": "kind",
1983
+ "isExpression": false,
1984
+ "asc": true,
1985
+ "nulls": "last"
1986
+ }
1987
+ ],
1988
+ "isUnique": false,
1989
+ "concurrently": false,
1990
+ "method": "btree",
1991
+ "with": {}
1992
+ }
1993
+ },
1994
+ "foreignKeys": {},
1995
+ "compositePrimaryKeys": {},
1996
+ "uniqueConstraints": {},
1997
+ "policies": {},
1998
+ "checkConstraints": {},
1999
+ "isRLSEnabled": false
2000
+ }
2001
+ },
2002
+ "enums": {},
2003
+ "schemas": {},
2004
+ "sequences": {},
2005
+ "roles": {},
2006
+ "policies": {},
2007
+ "views": {},
2008
+ "_meta": {
2009
+ "columns": {},
2010
+ "schemas": {},
2011
+ "tables": {}
2012
+ }
2013
+ }