@rfc0/patty 0.0.0-stage → 1.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 (465) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +214 -2
  3. package/dist/adapters/access-tokens.js +7 -0
  4. package/dist/adapters/accounts.js +37 -0
  5. package/dist/adapters/auth.js +11 -0
  6. package/dist/adapters/bills.js +32 -0
  7. package/dist/adapters/budgets.js +29 -0
  8. package/dist/adapters/categories.js +32 -0
  9. package/dist/adapters/client-grants.js +7 -0
  10. package/dist/adapters/credit-cards.js +33 -0
  11. package/dist/adapters/currencies.js +2 -0
  12. package/dist/adapters/currency-rates.js +18 -0
  13. package/dist/adapters/dashboards.js +43 -0
  14. package/dist/adapters/demo.js +13 -0
  15. package/dist/adapters/instance-settings.js +7 -0
  16. package/dist/adapters/invites.js +7 -0
  17. package/dist/adapters/recurring.js +55 -0
  18. package/dist/adapters/sessions.js +7 -0
  19. package/dist/adapters/settings.js +4 -0
  20. package/dist/adapters/setup-codes.js +7 -0
  21. package/dist/adapters/tags.js +9 -0
  22. package/dist/adapters/transactions.js +95 -0
  23. package/dist/adapters/users.js +7 -0
  24. package/dist/common/build-version.js +5 -0
  25. package/dist/common/errors.js +118 -0
  26. package/dist/common/net.js +71 -0
  27. package/dist/common/result.js +7 -0
  28. package/dist/composition/auth.js +106 -0
  29. package/dist/composition/boot.js +27 -0
  30. package/dist/composition/cli.js +86 -0
  31. package/dist/composition/demo/seed.js +92 -0
  32. package/dist/composition/demo/shell.js +107 -0
  33. package/dist/composition/export.js +89 -0
  34. package/dist/composition/http.js +110 -0
  35. package/dist/composition/import.js +55 -0
  36. package/dist/composition/lazy-modules.js +2 -0
  37. package/dist/composition/runtime.js +115 -0
  38. package/dist/composition/sign-in/interpreter.js +154 -0
  39. package/dist/composition/sign-in/server.js +36 -0
  40. package/dist/composition/sign-in/wiring.js +23 -0
  41. package/dist/composition/stdio.js +69 -0
  42. package/dist/config.js +136 -0
  43. package/dist/controllers/account/account.js +88 -0
  44. package/dist/controllers/account/transaction.js +119 -0
  45. package/dist/controllers/account/transfer.js +34 -0
  46. package/dist/controllers/aggregate.js +40 -0
  47. package/dist/controllers/auth/access-tokens.js +61 -0
  48. package/dist/controllers/auth/grants.js +136 -0
  49. package/dist/controllers/auth/key-export.js +20 -0
  50. package/dist/controllers/auth/owner.js +80 -0
  51. package/dist/controllers/auth/password.js +35 -0
  52. package/dist/controllers/auth/session.js +50 -0
  53. package/dist/controllers/auth/step-up.js +8 -0
  54. package/dist/controllers/auth/users.js +183 -0
  55. package/dist/controllers/budgets.js +87 -0
  56. package/dist/controllers/categories.js +67 -0
  57. package/dist/controllers/correlations.js +112 -0
  58. package/dist/controllers/credit-card/bill.js +105 -0
  59. package/dist/controllers/credit-card/credit-card.js +129 -0
  60. package/dist/controllers/credit-card/transaction.js +181 -0
  61. package/dist/controllers/currencies.js +1 -0
  62. package/dist/controllers/currency-rates.js +40 -0
  63. package/dist/controllers/dashboards.js +68 -0
  64. package/dist/controllers/demo/seed.js +31 -0
  65. package/dist/controllers/demo/tour.js +12 -0
  66. package/dist/controllers/deps.js +6 -0
  67. package/dist/controllers/instance.js +6 -0
  68. package/dist/controllers/merchants.js +12 -0
  69. package/dist/controllers/recurring.js +70 -0
  70. package/dist/controllers/resolve.js +37 -0
  71. package/dist/controllers/settings.js +47 -0
  72. package/dist/controllers/status.js +19 -0
  73. package/dist/controllers/summary.js +21 -0
  74. package/dist/controllers/tags.js +19 -0
  75. package/dist/controllers/transaction/bulk.js +6 -0
  76. package/dist/controllers/transaction/core.js +49 -0
  77. package/dist/controllers/transaction/read.js +28 -0
  78. package/dist/diplomat/auth/credentials.js +58 -0
  79. package/dist/diplomat/auth/sign-in-store.js +18 -0
  80. package/dist/diplomat/cli/commands/auth.js +100 -0
  81. package/dist/diplomat/cli/commands/db.js +72 -0
  82. package/dist/diplomat/cli/commands/demo.js +68 -0
  83. package/dist/diplomat/cli/commands/key.js +119 -0
  84. package/dist/diplomat/cli/commands/login.js +151 -0
  85. package/dist/diplomat/cli/commands/setup.js +132 -0
  86. package/dist/diplomat/cli/commands/users.js +123 -0
  87. package/dist/diplomat/cli/commands.js +61 -0
  88. package/dist/diplomat/cli/export-file.js +37 -0
  89. package/dist/diplomat/cli/import-file.js +44 -0
  90. package/dist/diplomat/cli/io.js +61 -0
  91. package/dist/diplomat/cli/key-export-approval.js +37 -0
  92. package/dist/diplomat/cli/messages.js +96 -0
  93. package/dist/diplomat/cli/prompt.js +74 -0
  94. package/dist/diplomat/cli/terminal.js +81 -0
  95. package/dist/diplomat/client-config/clients.js +150 -0
  96. package/dist/diplomat/client-config/merge.js +41 -0
  97. package/dist/diplomat/db/bootstrap.js +98 -0
  98. package/dist/diplomat/db/database-files.js +147 -0
  99. package/dist/diplomat/db/driver.js +167 -0
  100. package/dist/diplomat/db/effects.js +101 -0
  101. package/dist/diplomat/db/engine.js +9 -0
  102. package/dist/diplomat/db/export.js +22 -0
  103. package/dist/diplomat/db/file-lock.js +82 -0
  104. package/dist/diplomat/db/key-lock.js +14 -0
  105. package/dist/diplomat/db/locale-cache.js +23 -0
  106. package/dist/diplomat/db/migration-barrier.js +57 -0
  107. package/dist/diplomat/db/migration-journal.js +18 -0
  108. package/dist/diplomat/db/migration-lock.js +15 -0
  109. package/dist/diplomat/db/migrations.js +11 -0
  110. package/dist/diplomat/db/present.js +17 -0
  111. package/dist/diplomat/db/queries/aggregate-whitelist.js +35 -0
  112. package/dist/diplomat/db/queries/filters.js +59 -0
  113. package/dist/diplomat/db/queries/fts.js +18 -0
  114. package/dist/diplomat/db/queries/scope.js +8 -0
  115. package/dist/diplomat/db/queries/transaction-select.js +26 -0
  116. package/dist/diplomat/db/queries/tx-predicates.js +13 -0
  117. package/dist/diplomat/db/repos/access-tokens.js +27 -0
  118. package/dist/diplomat/db/repos/accounts.js +91 -0
  119. package/dist/diplomat/db/repos/bills.js +93 -0
  120. package/dist/diplomat/db/repos/budgets.js +72 -0
  121. package/dist/diplomat/db/repos/categories.js +53 -0
  122. package/dist/diplomat/db/repos/client-grants.js +67 -0
  123. package/dist/diplomat/db/repos/correlations.js +66 -0
  124. package/dist/diplomat/db/repos/credit-cards.js +67 -0
  125. package/dist/diplomat/db/repos/currencies.js +8 -0
  126. package/dist/diplomat/db/repos/currency-rates.js +40 -0
  127. package/dist/diplomat/db/repos/dashboards.js +123 -0
  128. package/dist/diplomat/db/repos/health.js +12 -0
  129. package/dist/diplomat/db/repos/instance-settings.js +14 -0
  130. package/dist/diplomat/db/repos/instance.js +58 -0
  131. package/dist/diplomat/db/repos/invites.js +43 -0
  132. package/dist/diplomat/db/repos/merchants.js +121 -0
  133. package/dist/diplomat/db/repos/recurring.js +29 -0
  134. package/dist/diplomat/db/repos/sessions.js +19 -0
  135. package/dist/diplomat/db/repos/settings.js +41 -0
  136. package/dist/diplomat/db/repos/setup-codes.js +28 -0
  137. package/dist/diplomat/db/repos/sub-categories.js +67 -0
  138. package/dist/diplomat/db/repos/tags.js +51 -0
  139. package/dist/diplomat/db/repos/transaction-tags.js +57 -0
  140. package/dist/diplomat/db/repos/transactions.js +163 -0
  141. package/dist/diplomat/db/repos/users.js +47 -0
  142. package/dist/diplomat/db/safety-copy.js +87 -0
  143. package/dist/diplomat/db/schema.js +348 -0
  144. package/dist/diplomat/db/seed/categories.js +112 -0
  145. package/dist/diplomat/db/seed/currencies.js +9 -0
  146. package/dist/diplomat/db/seed/demo/br.js +98 -0
  147. package/dist/diplomat/db/seed/demo/co.js +89 -0
  148. package/dist/diplomat/db/seed/demo/index.js +12 -0
  149. package/dist/diplomat/db/seed/demo/mx.js +90 -0
  150. package/dist/diplomat/db/seed/demo/shared.js +39 -0
  151. package/dist/diplomat/db/seed/demo/us.js +90 -0
  152. package/dist/diplomat/db/seed/merchant-rules.js +188 -0
  153. package/dist/diplomat/db/sqlite-errors.js +40 -0
  154. package/dist/diplomat/db/tenancy-integrity.js +45 -0
  155. package/dist/diplomat/db/version-guard.js +16 -0
  156. package/dist/diplomat/http/auth-pages.js +41 -0
  157. package/dist/diplomat/http/auth-paths.js +46 -0
  158. package/dist/diplomat/http/bearer.js +15 -0
  159. package/dist/diplomat/http/connect-pages.js +51 -0
  160. package/dist/diplomat/http/context.js +17 -0
  161. package/dist/diplomat/http/cookies.js +27 -0
  162. package/dist/diplomat/http/form-pages.js +38 -0
  163. package/dist/diplomat/http/hooks/auth.js +106 -0
  164. package/dist/diplomat/http/hooks/demo-marker.js +59 -0
  165. package/dist/diplomat/http/openapi.js +73 -0
  166. package/dist/diplomat/http/principal.js +1 -0
  167. package/dist/diplomat/http/rate-limiter.js +78 -0
  168. package/dist/diplomat/http/remedy.js +26 -0
  169. package/dist/diplomat/http/respond.js +50 -0
  170. package/dist/diplomat/http/routes/account.js +226 -0
  171. package/dist/diplomat/http/routes/aggregate.js +28 -0
  172. package/dist/diplomat/http/routes/auth.js +105 -0
  173. package/dist/diplomat/http/routes/budget.js +34 -0
  174. package/dist/diplomat/http/routes/category.js +109 -0
  175. package/dist/diplomat/http/routes/connect.js +124 -0
  176. package/dist/diplomat/http/routes/credit-card.js +263 -0
  177. package/dist/diplomat/http/routes/currency-rates.js +60 -0
  178. package/dist/diplomat/http/routes/currency.js +16 -0
  179. package/dist/diplomat/http/routes/dashboard.js +93 -0
  180. package/dist/diplomat/http/routes/invite.js +63 -0
  181. package/dist/diplomat/http/routes/recurring.js +65 -0
  182. package/dist/diplomat/http/routes/settings.js +38 -0
  183. package/dist/diplomat/http/routes/summary.js +23 -0
  184. package/dist/diplomat/http/routes/system.js +29 -0
  185. package/dist/diplomat/http/routes/tag.js +51 -0
  186. package/dist/diplomat/http/routes/tokens.js +72 -0
  187. package/dist/diplomat/http/routes/transaction.js +55 -0
  188. package/dist/diplomat/http/routes/transfer.js +35 -0
  189. package/dist/diplomat/http/routes/ui.js +110 -0
  190. package/dist/diplomat/http/routes/users.js +156 -0
  191. package/dist/diplomat/http/routes/well-known.js +26 -0
  192. package/dist/diplomat/http/routes.js +85 -0
  193. package/dist/diplomat/http/session.js +34 -0
  194. package/dist/diplomat/http/token-pages.js +75 -0
  195. package/dist/diplomat/http/ui-files.js +21 -0
  196. package/dist/diplomat/http/user-pages.js +93 -0
  197. package/dist/diplomat/mcp/annotations.js +8 -0
  198. package/dist/diplomat/mcp/auth-info.js +20 -0
  199. package/dist/diplomat/mcp/context.js +14 -0
  200. package/dist/diplomat/mcp/definition.js +3 -0
  201. package/dist/diplomat/mcp/gate.js +15 -0
  202. package/dist/diplomat/mcp/instructions.js +19 -0
  203. package/dist/diplomat/mcp/prompts.js +125 -0
  204. package/dist/diplomat/mcp/register.js +12 -0
  205. package/dist/diplomat/mcp/remedy.js +17 -0
  206. package/dist/diplomat/mcp/resources.js +93 -0
  207. package/dist/diplomat/mcp/respond.js +20 -0
  208. package/dist/diplomat/mcp/route.js +62 -0
  209. package/dist/diplomat/mcp/scopes.js +53 -0
  210. package/dist/diplomat/mcp/server.js +26 -0
  211. package/dist/diplomat/mcp/shared.js +5 -0
  212. package/dist/diplomat/mcp/stdio-session.js +94 -0
  213. package/dist/diplomat/mcp/stdio.js +23 -0
  214. package/dist/diplomat/mcp/tool-name.js +59 -0
  215. package/dist/diplomat/mcp/tools/account.js +218 -0
  216. package/dist/diplomat/mcp/tools/aggregate.js +32 -0
  217. package/dist/diplomat/mcp/tools/budget.js +99 -0
  218. package/dist/diplomat/mcp/tools/category.js +103 -0
  219. package/dist/diplomat/mcp/tools/correlations.js +70 -0
  220. package/dist/diplomat/mcp/tools/credit-card.js +239 -0
  221. package/dist/diplomat/mcp/tools/currency-rates.js +62 -0
  222. package/dist/diplomat/mcp/tools/dashboard.js +75 -0
  223. package/dist/diplomat/mcp/tools/index.js +31 -0
  224. package/dist/diplomat/mcp/tools/recurring.js +62 -0
  225. package/dist/diplomat/mcp/tools/summary.js +30 -0
  226. package/dist/diplomat/mcp/tools/system.js +83 -0
  227. package/dist/diplomat/mcp/tools/tag.js +48 -0
  228. package/dist/diplomat/mcp/tools/transaction.js +53 -0
  229. package/dist/diplomat/mcp/tools/transfer.js +28 -0
  230. package/dist/diplomat/mcp/tour.js +87 -0
  231. package/dist/logic/account.js +79 -0
  232. package/dist/logic/aggregate.js +37 -0
  233. package/dist/logic/auth/bearer.js +35 -0
  234. package/dist/logic/auth/grant.js +126 -0
  235. package/dist/logic/auth/key-export.js +10 -0
  236. package/dist/logic/auth/keychain.js +3 -0
  237. package/dist/logic/auth/message.js +22 -0
  238. package/dist/logic/auth/origin.js +57 -0
  239. package/dist/logic/auth/owner.js +22 -0
  240. package/dist/logic/auth/password.js +3 -0
  241. package/dist/logic/auth/redact.js +25 -0
  242. package/dist/logic/auth/revoke.js +28 -0
  243. package/dist/logic/auth/scope.js +17 -0
  244. package/dist/logic/auth/session.js +30 -0
  245. package/dist/logic/auth/sign-in-flow.js +305 -0
  246. package/dist/logic/auth/time.js +2 -0
  247. package/dist/logic/auth/token.js +74 -0
  248. package/dist/logic/auth/user-plans.js +84 -0
  249. package/dist/logic/auth/users.js +78 -0
  250. package/dist/logic/balance.js +2 -0
  251. package/dist/logic/bill.js +74 -0
  252. package/dist/logic/budget.js +78 -0
  253. package/dist/logic/category.js +37 -0
  254. package/dist/logic/classify.js +21 -0
  255. package/dist/logic/correlations.js +147 -0
  256. package/dist/logic/credit-card.js +2 -0
  257. package/dist/logic/currency-rate.js +69 -0
  258. package/dist/logic/dashboard.js +40 -0
  259. package/dist/logic/demo/database.js +30 -0
  260. package/dist/logic/demo/plan.js +308 -0
  261. package/dist/logic/demo/tour.js +33 -0
  262. package/dist/logic/export-destination.js +12 -0
  263. package/dist/logic/key-import.js +15 -0
  264. package/dist/logic/locale.js +5 -0
  265. package/dist/logic/localize.js +12 -0
  266. package/dist/logic/merchant.js +31 -0
  267. package/dist/logic/migration.js +1 -0
  268. package/dist/logic/money.js +12 -0
  269. package/dist/logic/period.js +45 -0
  270. package/dist/logic/persistence.js +48 -0
  271. package/dist/logic/recurring.js +51 -0
  272. package/dist/logic/resolve.js +44 -0
  273. package/dist/logic/summary.js +29 -0
  274. package/dist/logic/tag.js +13 -0
  275. package/dist/logic/transaction.js +197 -0
  276. package/dist/main.js +42 -0
  277. package/dist/models/account.js +197 -0
  278. package/dist/models/aggregate.js +61 -0
  279. package/dist/models/auth/bearer.js +11 -0
  280. package/dist/models/auth/entity.js +17 -0
  281. package/dist/models/auth/errors.js +42 -0
  282. package/dist/models/auth/grant.js +58 -0
  283. package/dist/models/auth/key-export.js +11 -0
  284. package/dist/models/auth/message.js +50 -0
  285. package/dist/models/auth/mode.js +7 -0
  286. package/dist/models/auth/origin.js +16 -0
  287. package/dist/models/auth/owner.js +36 -0
  288. package/dist/models/auth/password.js +24 -0
  289. package/dist/models/auth/principal.js +26 -0
  290. package/dist/models/auth/redact.js +4 -0
  291. package/dist/models/auth/scope.js +9 -0
  292. package/dist/models/auth/session.js +19 -0
  293. package/dist/models/auth/sign-in-flow.js +102 -0
  294. package/dist/models/auth/sign-in.js +41 -0
  295. package/dist/models/auth/time.js +5 -0
  296. package/dist/models/auth/token.js +50 -0
  297. package/dist/models/auth/users.js +52 -0
  298. package/dist/models/bill.js +55 -0
  299. package/dist/models/budget.js +106 -0
  300. package/dist/models/category.js +52 -0
  301. package/dist/models/client-config.js +18 -0
  302. package/dist/models/correlations.js +215 -0
  303. package/dist/models/credit-card.js +156 -0
  304. package/dist/models/currency-rate.js +83 -0
  305. package/dist/models/dashboard.js +54 -0
  306. package/dist/models/database.js +16 -0
  307. package/dist/models/date.js +8 -0
  308. package/dist/models/demo/core.js +58 -0
  309. package/dist/models/demo/tour.js +41 -0
  310. package/dist/models/encryption-key.js +2 -0
  311. package/dist/models/error.js +13 -0
  312. package/dist/models/export.js +9 -0
  313. package/dist/models/id.js +2 -0
  314. package/dist/models/instance.js +7 -0
  315. package/dist/models/key-import.js +6 -0
  316. package/dist/models/locale.js +25 -0
  317. package/dist/models/merchant.js +12 -0
  318. package/dist/models/money.js +14 -0
  319. package/dist/models/package.js +12 -0
  320. package/dist/models/page.js +56 -0
  321. package/dist/models/persistence.js +1 -0
  322. package/dist/models/prompts.js +5 -0
  323. package/dist/models/recurring.js +54 -0
  324. package/dist/models/remedy.js +17 -0
  325. package/dist/models/resolution.js +1 -0
  326. package/dist/models/startup.js +7 -0
  327. package/dist/models/summary.js +24 -0
  328. package/dist/models/tag.js +14 -0
  329. package/dist/models/tenancy.js +10 -0
  330. package/dist/models/transaction-tag.js +6 -0
  331. package/dist/models/transaction.js +275 -0
  332. package/dist/wire/db/access-tokens.js +1 -0
  333. package/dist/wire/db/accounts.js +7 -0
  334. package/dist/wire/db/aggregate.js +16 -0
  335. package/dist/wire/db/bills.js +14 -0
  336. package/dist/wire/db/budgets.js +33 -0
  337. package/dist/wire/db/categories.js +14 -0
  338. package/dist/wire/db/client-grants.js +1 -0
  339. package/dist/wire/db/correlations.js +49 -0
  340. package/dist/wire/db/credit-cards.js +1 -0
  341. package/dist/wire/db/currencies.js +1 -0
  342. package/dist/wire/db/currency-rates.js +1 -0
  343. package/dist/wire/db/dashboards.js +1 -0
  344. package/dist/wire/db/instance-settings.js +1 -0
  345. package/dist/wire/db/invites.js +1 -0
  346. package/dist/wire/db/merchants.js +18 -0
  347. package/dist/wire/db/recurring.js +19 -0
  348. package/dist/wire/db/sessions.js +1 -0
  349. package/dist/wire/db/settings.js +1 -0
  350. package/dist/wire/db/setup-codes.js +1 -0
  351. package/dist/wire/db/tags.js +1 -0
  352. package/dist/wire/db/tenancy.js +1 -0
  353. package/dist/wire/db/transactions.js +89 -0
  354. package/dist/wire/db/users.js +1 -0
  355. package/dist/wire/in/accounts.js +26 -0
  356. package/dist/wire/in/aggregate.js +10 -0
  357. package/dist/wire/in/auth.js +107 -0
  358. package/dist/wire/in/bills.js +11 -0
  359. package/dist/wire/in/budgets.js +11 -0
  360. package/dist/wire/in/categories.js +9 -0
  361. package/dist/wire/in/cli.js +106 -0
  362. package/dist/wire/in/coerce.js +6 -0
  363. package/dist/wire/in/common.js +17 -0
  364. package/dist/wire/in/credit-cards.js +16 -0
  365. package/dist/wire/in/currency-rates.js +8 -0
  366. package/dist/wire/in/period.js +7 -0
  367. package/dist/wire/in/recurring.js +6 -0
  368. package/dist/wire/in/settings.js +5 -0
  369. package/dist/wire/in/summary.js +5 -0
  370. package/dist/wire/in/tags.js +2 -0
  371. package/dist/wire/in/transactions.js +31 -0
  372. package/dist/wire/out/bills.js +9 -0
  373. package/dist/wire/out/budgets.js +10 -0
  374. package/dist/wire/out/client-config.js +2 -0
  375. package/dist/wire/out/common.js +4 -0
  376. package/dist/wire/out/credit-cards.js +15 -0
  377. package/dist/wire/out/currency-rates.js +11 -0
  378. package/dist/wire/out/errors.js +58 -0
  379. package/dist/wire/out/recurring.js +6 -0
  380. package/dist/wire/out/status.js +10 -0
  381. package/dist/wire/out/summary.js +9 -0
  382. package/dist/wire/out/transactions.js +52 -0
  383. package/drizzle/0000_futuristic_umar.sql +124 -0
  384. package/drizzle/0001_fts5_search.sql +23 -0
  385. package/drizzle/0002_rename_graph_to_history.sql +7 -0
  386. package/drizzle/0003_lyrical_hairball.sql +2 -0
  387. package/drizzle/0004_misty_ikaris.sql +7 -0
  388. package/drizzle/0005_credit-liability-accounts.sql +14 -0
  389. package/drizzle/0006_smart_aqueduct.sql +1 -0
  390. package/drizzle/0007_add_dashboards.sql +5 -0
  391. package/drizzle/0008_yummy_madripoor.sql +1 -0
  392. package/drizzle/0009_version_groundwork.sql +9 -0
  393. package/drizzle/0010_category_merchant_association_cascade.sql +16 -0
  394. package/drizzle/0011_dashboard_id_normalization.sql +16 -0
  395. package/drizzle/0012_hot_the_spike.sql +12 -0
  396. package/drizzle/0013_recurring_rules_merchant.sql +1 -0
  397. package/drizzle/0014_dashboard_source_discriminator.sql +17 -0
  398. package/drizzle/0015_currencies_decimals.sql +1 -0
  399. package/drizzle/0016_unusual_zaran.sql +13 -0
  400. package/drizzle/0017_premium_blur.sql +1 -0
  401. package/drizzle/0018_auth_identity.sql +39 -0
  402. package/drizzle/0019_access_tokens.sql +16 -0
  403. package/drizzle/0020_stdio_sign_in.sql +27 -0
  404. package/drizzle/0021_tenancy_data.sql +289 -0
  405. package/drizzle/0022_user_management.sql +17 -0
  406. package/drizzle/0023_instance_settings_row.sql +2 -0
  407. package/drizzle/0024_credentials_changed_at.sql +2 -0
  408. package/drizzle/0025_instance_kind.sql +2 -0
  409. package/drizzle/0026_demo_seeded_at.sql +2 -0
  410. package/drizzle/0027_demo_country.sql +2 -0
  411. package/drizzle/0028_reset_sign_ins.sql +2 -0
  412. package/drizzle/meta/0000_snapshot.json +894 -0
  413. package/drizzle/meta/0003_snapshot.json +910 -0
  414. package/drizzle/meta/0004_snapshot.json +951 -0
  415. package/drizzle/meta/0005_snapshot.json +991 -0
  416. package/drizzle/meta/0006_snapshot.json +998 -0
  417. package/drizzle/meta/0007_snapshot.json +1029 -0
  418. package/drizzle/meta/0008_snapshot.json +1049 -0
  419. package/drizzle/meta/0009_snapshot.json +1121 -0
  420. package/drizzle/meta/0010_snapshot.json +1121 -0
  421. package/drizzle/meta/0011_snapshot.json +1136 -0
  422. package/drizzle/meta/0012_snapshot.json +1227 -0
  423. package/drizzle/meta/0013_snapshot.json +1247 -0
  424. package/drizzle/meta/0014_snapshot.json +1267 -0
  425. package/drizzle/meta/0015_snapshot.json +1275 -0
  426. package/drizzle/meta/0016_snapshot.json +1371 -0
  427. package/drizzle/meta/0017_snapshot.json +1392 -0
  428. package/drizzle/meta/0018_snapshot.json +1603 -0
  429. package/drizzle/meta/0019_snapshot.json +1713 -0
  430. package/drizzle/meta/0020_snapshot.json +1904 -0
  431. package/drizzle/meta/0021_snapshot.json +2186 -0
  432. package/drizzle/meta/0022_snapshot.json +2311 -0
  433. package/drizzle/meta/0023_snapshot.json +2311 -0
  434. package/drizzle/meta/0024_snapshot.json +2318 -0
  435. package/drizzle/meta/0025_snapshot.json +2326 -0
  436. package/drizzle/meta/0026_snapshot.json +2333 -0
  437. package/drizzle/meta/0027_snapshot.json +2340 -0
  438. package/drizzle/meta/0028_snapshot.json +2340 -0
  439. package/drizzle/meta/_journal.json +209 -0
  440. package/package.json +106 -4
  441. package/skills/dashboard-building/SKILL.md +201 -0
  442. package/skills/patty-tour/SKILL.md +34 -0
  443. package/ui/app.css +758 -0
  444. package/ui/app.js +493 -0
  445. package/ui/connect-result.html +16 -0
  446. package/ui/connect.html +53 -0
  447. package/ui/dashboards/accounts.html +3189 -0
  448. package/ui/dashboards/budget.html +1716 -0
  449. package/ui/dashboards/cards.html +4032 -0
  450. package/ui/dashboards/categories.html +4694 -0
  451. package/ui/dashboards/comparative.html +2464 -0
  452. package/ui/dashboards/dashboards.html +839 -0
  453. package/ui/dashboards/overview.html +2405 -0
  454. package/ui/dashboards/pending.html +2973 -0
  455. package/ui/dashboards/projections.html +2517 -0
  456. package/ui/dashboards/tags.html +1365 -0
  457. package/ui/invite.html +44 -0
  458. package/ui/login.html +26 -0
  459. package/ui/money.js +175 -0
  460. package/ui/setup.html +29 -0
  461. package/ui/shell.html +96 -0
  462. package/ui/token-created.html +24 -0
  463. package/ui/tokens.html +58 -0
  464. package/ui/user-invited.html +27 -0
  465. package/ui/users.html +60 -0
@@ -0,0 +1,1713 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "abda2583-4dbb-43e5-9bad-5d5c343d34f4",
5
+ "prevId": "06500735-b64f-40c9-b0fb-7d51cbfdd337",
6
+ "tables": {
7
+ "access_tokens": {
8
+ "name": "access_tokens",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "user_id": {
18
+ "name": "user_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "name": {
25
+ "name": "name",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "token_hash": {
32
+ "name": "token_hash",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "prefix": {
39
+ "name": "prefix",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "scopes": {
46
+ "name": "scopes",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "created_at": {
53
+ "name": "created_at",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": true,
57
+ "autoincrement": false
58
+ },
59
+ "last_used_at": {
60
+ "name": "last_used_at",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": false,
64
+ "autoincrement": false
65
+ },
66
+ "expires_at": {
67
+ "name": "expires_at",
68
+ "type": "text",
69
+ "primaryKey": false,
70
+ "notNull": false,
71
+ "autoincrement": false
72
+ },
73
+ "revoked_at": {
74
+ "name": "revoked_at",
75
+ "type": "text",
76
+ "primaryKey": false,
77
+ "notNull": false,
78
+ "autoincrement": false
79
+ },
80
+ "version": {
81
+ "name": "version",
82
+ "type": "integer",
83
+ "primaryKey": false,
84
+ "notNull": true,
85
+ "autoincrement": false,
86
+ "default": 0
87
+ }
88
+ },
89
+ "indexes": {
90
+ "access_tokens_token_hash_unique": {
91
+ "name": "access_tokens_token_hash_unique",
92
+ "columns": [
93
+ "token_hash"
94
+ ],
95
+ "isUnique": true
96
+ }
97
+ },
98
+ "foreignKeys": {
99
+ "access_tokens_user_id_users_id_fk": {
100
+ "name": "access_tokens_user_id_users_id_fk",
101
+ "tableFrom": "access_tokens",
102
+ "tableTo": "users",
103
+ "columnsFrom": [
104
+ "user_id"
105
+ ],
106
+ "columnsTo": [
107
+ "id"
108
+ ],
109
+ "onDelete": "cascade",
110
+ "onUpdate": "no action"
111
+ }
112
+ },
113
+ "compositePrimaryKeys": {},
114
+ "uniqueConstraints": {},
115
+ "checkConstraints": {}
116
+ },
117
+ "accounts": {
118
+ "name": "accounts",
119
+ "columns": {
120
+ "id": {
121
+ "name": "id",
122
+ "type": "text",
123
+ "primaryKey": true,
124
+ "notNull": true,
125
+ "autoincrement": false
126
+ },
127
+ "name": {
128
+ "name": "name",
129
+ "type": "text",
130
+ "primaryKey": false,
131
+ "notNull": true,
132
+ "autoincrement": false
133
+ },
134
+ "type": {
135
+ "name": "type",
136
+ "type": "text",
137
+ "primaryKey": false,
138
+ "notNull": true,
139
+ "autoincrement": false
140
+ },
141
+ "initial_balance": {
142
+ "name": "initial_balance",
143
+ "type": "real",
144
+ "primaryKey": false,
145
+ "notNull": true,
146
+ "autoincrement": false,
147
+ "default": 0
148
+ },
149
+ "currency": {
150
+ "name": "currency",
151
+ "type": "text",
152
+ "primaryKey": false,
153
+ "notNull": true,
154
+ "autoincrement": false
155
+ },
156
+ "version": {
157
+ "name": "version",
158
+ "type": "integer",
159
+ "primaryKey": false,
160
+ "notNull": true,
161
+ "autoincrement": false,
162
+ "default": 0
163
+ }
164
+ },
165
+ "indexes": {},
166
+ "foreignKeys": {
167
+ "accounts_currency_currencies_code_fk": {
168
+ "name": "accounts_currency_currencies_code_fk",
169
+ "tableFrom": "accounts",
170
+ "tableTo": "currencies",
171
+ "columnsFrom": [
172
+ "currency"
173
+ ],
174
+ "columnsTo": [
175
+ "code"
176
+ ],
177
+ "onDelete": "no action",
178
+ "onUpdate": "no action"
179
+ }
180
+ },
181
+ "compositePrimaryKeys": {},
182
+ "uniqueConstraints": {},
183
+ "checkConstraints": {}
184
+ },
185
+ "bills": {
186
+ "name": "bills",
187
+ "columns": {
188
+ "id": {
189
+ "name": "id",
190
+ "type": "text",
191
+ "primaryKey": true,
192
+ "notNull": true,
193
+ "autoincrement": false
194
+ },
195
+ "credit_card_id": {
196
+ "name": "credit_card_id",
197
+ "type": "text",
198
+ "primaryKey": false,
199
+ "notNull": true,
200
+ "autoincrement": false
201
+ },
202
+ "month": {
203
+ "name": "month",
204
+ "type": "integer",
205
+ "primaryKey": false,
206
+ "notNull": true,
207
+ "autoincrement": false
208
+ },
209
+ "year": {
210
+ "name": "year",
211
+ "type": "integer",
212
+ "primaryKey": false,
213
+ "notNull": true,
214
+ "autoincrement": false
215
+ },
216
+ "close_date": {
217
+ "name": "close_date",
218
+ "type": "text",
219
+ "primaryKey": false,
220
+ "notNull": true,
221
+ "autoincrement": false
222
+ },
223
+ "due_date": {
224
+ "name": "due_date",
225
+ "type": "text",
226
+ "primaryKey": false,
227
+ "notNull": true,
228
+ "autoincrement": false
229
+ },
230
+ "status": {
231
+ "name": "status",
232
+ "type": "text",
233
+ "primaryKey": false,
234
+ "notNull": true,
235
+ "autoincrement": false
236
+ },
237
+ "payment_transaction_id": {
238
+ "name": "payment_transaction_id",
239
+ "type": "text",
240
+ "primaryKey": false,
241
+ "notNull": false,
242
+ "autoincrement": false
243
+ },
244
+ "version": {
245
+ "name": "version",
246
+ "type": "integer",
247
+ "primaryKey": false,
248
+ "notNull": true,
249
+ "autoincrement": false,
250
+ "default": 0
251
+ }
252
+ },
253
+ "indexes": {
254
+ "bills_card_month_year": {
255
+ "name": "bills_card_month_year",
256
+ "columns": [
257
+ "credit_card_id",
258
+ "month",
259
+ "year"
260
+ ],
261
+ "isUnique": true
262
+ }
263
+ },
264
+ "foreignKeys": {
265
+ "bills_credit_card_id_credit_cards_id_fk": {
266
+ "name": "bills_credit_card_id_credit_cards_id_fk",
267
+ "tableFrom": "bills",
268
+ "tableTo": "credit_cards",
269
+ "columnsFrom": [
270
+ "credit_card_id"
271
+ ],
272
+ "columnsTo": [
273
+ "id"
274
+ ],
275
+ "onDelete": "no action",
276
+ "onUpdate": "no action"
277
+ },
278
+ "bills_payment_transaction_id_transactions_id_fk": {
279
+ "name": "bills_payment_transaction_id_transactions_id_fk",
280
+ "tableFrom": "bills",
281
+ "tableTo": "transactions",
282
+ "columnsFrom": [
283
+ "payment_transaction_id"
284
+ ],
285
+ "columnsTo": [
286
+ "id"
287
+ ],
288
+ "onDelete": "no action",
289
+ "onUpdate": "no action"
290
+ }
291
+ },
292
+ "compositePrimaryKeys": {},
293
+ "uniqueConstraints": {},
294
+ "checkConstraints": {}
295
+ },
296
+ "budgets": {
297
+ "name": "budgets",
298
+ "columns": {
299
+ "id": {
300
+ "name": "id",
301
+ "type": "text",
302
+ "primaryKey": true,
303
+ "notNull": true,
304
+ "autoincrement": false
305
+ },
306
+ "category_id": {
307
+ "name": "category_id",
308
+ "type": "text",
309
+ "primaryKey": false,
310
+ "notNull": true,
311
+ "autoincrement": false
312
+ },
313
+ "currency": {
314
+ "name": "currency",
315
+ "type": "text",
316
+ "primaryKey": false,
317
+ "notNull": true,
318
+ "autoincrement": false
319
+ },
320
+ "limit_amount": {
321
+ "name": "limit_amount",
322
+ "type": "real",
323
+ "primaryKey": false,
324
+ "notNull": true,
325
+ "autoincrement": false
326
+ },
327
+ "period": {
328
+ "name": "period",
329
+ "type": "text",
330
+ "primaryKey": false,
331
+ "notNull": true,
332
+ "autoincrement": false,
333
+ "default": "'monthly'"
334
+ },
335
+ "version": {
336
+ "name": "version",
337
+ "type": "integer",
338
+ "primaryKey": false,
339
+ "notNull": true,
340
+ "autoincrement": false,
341
+ "default": 0
342
+ }
343
+ },
344
+ "indexes": {
345
+ "budgets_category_currency_period": {
346
+ "name": "budgets_category_currency_period",
347
+ "columns": [
348
+ "category_id",
349
+ "currency",
350
+ "period"
351
+ ],
352
+ "isUnique": true
353
+ }
354
+ },
355
+ "foreignKeys": {
356
+ "budgets_category_id_categories_id_fk": {
357
+ "name": "budgets_category_id_categories_id_fk",
358
+ "tableFrom": "budgets",
359
+ "tableTo": "categories",
360
+ "columnsFrom": [
361
+ "category_id"
362
+ ],
363
+ "columnsTo": [
364
+ "id"
365
+ ],
366
+ "onDelete": "no action",
367
+ "onUpdate": "no action"
368
+ },
369
+ "budgets_currency_currencies_code_fk": {
370
+ "name": "budgets_currency_currencies_code_fk",
371
+ "tableFrom": "budgets",
372
+ "tableTo": "currencies",
373
+ "columnsFrom": [
374
+ "currency"
375
+ ],
376
+ "columnsTo": [
377
+ "code"
378
+ ],
379
+ "onDelete": "no action",
380
+ "onUpdate": "no action"
381
+ }
382
+ },
383
+ "compositePrimaryKeys": {},
384
+ "uniqueConstraints": {},
385
+ "checkConstraints": {}
386
+ },
387
+ "categories": {
388
+ "name": "categories",
389
+ "columns": {
390
+ "id": {
391
+ "name": "id",
392
+ "type": "text",
393
+ "primaryKey": true,
394
+ "notNull": true,
395
+ "autoincrement": false
396
+ },
397
+ "name": {
398
+ "name": "name",
399
+ "type": "text",
400
+ "primaryKey": false,
401
+ "notNull": true,
402
+ "autoincrement": false
403
+ },
404
+ "kind": {
405
+ "name": "kind",
406
+ "type": "text",
407
+ "primaryKey": false,
408
+ "notNull": true,
409
+ "autoincrement": false
410
+ },
411
+ "parent_id": {
412
+ "name": "parent_id",
413
+ "type": "text",
414
+ "primaryKey": false,
415
+ "notNull": false,
416
+ "autoincrement": false
417
+ },
418
+ "names": {
419
+ "name": "names",
420
+ "type": "text",
421
+ "primaryKey": false,
422
+ "notNull": false,
423
+ "autoincrement": false
424
+ },
425
+ "version": {
426
+ "name": "version",
427
+ "type": "integer",
428
+ "primaryKey": false,
429
+ "notNull": true,
430
+ "autoincrement": false,
431
+ "default": 0
432
+ }
433
+ },
434
+ "indexes": {},
435
+ "foreignKeys": {
436
+ "categories_parent_id_categories_id_fk": {
437
+ "name": "categories_parent_id_categories_id_fk",
438
+ "tableFrom": "categories",
439
+ "tableTo": "categories",
440
+ "columnsFrom": [
441
+ "parent_id"
442
+ ],
443
+ "columnsTo": [
444
+ "id"
445
+ ],
446
+ "onDelete": "no action",
447
+ "onUpdate": "no action"
448
+ }
449
+ },
450
+ "compositePrimaryKeys": {},
451
+ "uniqueConstraints": {},
452
+ "checkConstraints": {}
453
+ },
454
+ "credit_cards": {
455
+ "name": "credit_cards",
456
+ "columns": {
457
+ "id": {
458
+ "name": "id",
459
+ "type": "text",
460
+ "primaryKey": true,
461
+ "notNull": true,
462
+ "autoincrement": false
463
+ },
464
+ "name": {
465
+ "name": "name",
466
+ "type": "text",
467
+ "primaryKey": false,
468
+ "notNull": true,
469
+ "autoincrement": false
470
+ },
471
+ "closing_day": {
472
+ "name": "closing_day",
473
+ "type": "integer",
474
+ "primaryKey": false,
475
+ "notNull": true,
476
+ "autoincrement": false
477
+ },
478
+ "due_day": {
479
+ "name": "due_day",
480
+ "type": "integer",
481
+ "primaryKey": false,
482
+ "notNull": true,
483
+ "autoincrement": false
484
+ },
485
+ "limit_amount": {
486
+ "name": "limit_amount",
487
+ "type": "real",
488
+ "primaryKey": false,
489
+ "notNull": false,
490
+ "autoincrement": false
491
+ },
492
+ "currency": {
493
+ "name": "currency",
494
+ "type": "text",
495
+ "primaryKey": false,
496
+ "notNull": true,
497
+ "autoincrement": false
498
+ },
499
+ "account_id": {
500
+ "name": "account_id",
501
+ "type": "text",
502
+ "primaryKey": false,
503
+ "notNull": true,
504
+ "autoincrement": false
505
+ },
506
+ "payment_account_id": {
507
+ "name": "payment_account_id",
508
+ "type": "text",
509
+ "primaryKey": false,
510
+ "notNull": false,
511
+ "autoincrement": false
512
+ },
513
+ "version": {
514
+ "name": "version",
515
+ "type": "integer",
516
+ "primaryKey": false,
517
+ "notNull": true,
518
+ "autoincrement": false,
519
+ "default": 0
520
+ }
521
+ },
522
+ "indexes": {},
523
+ "foreignKeys": {
524
+ "credit_cards_currency_currencies_code_fk": {
525
+ "name": "credit_cards_currency_currencies_code_fk",
526
+ "tableFrom": "credit_cards",
527
+ "tableTo": "currencies",
528
+ "columnsFrom": [
529
+ "currency"
530
+ ],
531
+ "columnsTo": [
532
+ "code"
533
+ ],
534
+ "onDelete": "no action",
535
+ "onUpdate": "no action"
536
+ },
537
+ "credit_cards_account_id_accounts_id_fk": {
538
+ "name": "credit_cards_account_id_accounts_id_fk",
539
+ "tableFrom": "credit_cards",
540
+ "tableTo": "accounts",
541
+ "columnsFrom": [
542
+ "account_id"
543
+ ],
544
+ "columnsTo": [
545
+ "id"
546
+ ],
547
+ "onDelete": "no action",
548
+ "onUpdate": "no action"
549
+ },
550
+ "credit_cards_payment_account_id_accounts_id_fk": {
551
+ "name": "credit_cards_payment_account_id_accounts_id_fk",
552
+ "tableFrom": "credit_cards",
553
+ "tableTo": "accounts",
554
+ "columnsFrom": [
555
+ "payment_account_id"
556
+ ],
557
+ "columnsTo": [
558
+ "id"
559
+ ],
560
+ "onDelete": "no action",
561
+ "onUpdate": "no action"
562
+ }
563
+ },
564
+ "compositePrimaryKeys": {},
565
+ "uniqueConstraints": {},
566
+ "checkConstraints": {}
567
+ },
568
+ "currencies": {
569
+ "name": "currencies",
570
+ "columns": {
571
+ "code": {
572
+ "name": "code",
573
+ "type": "text",
574
+ "primaryKey": true,
575
+ "notNull": true,
576
+ "autoincrement": false
577
+ },
578
+ "symbol": {
579
+ "name": "symbol",
580
+ "type": "text",
581
+ "primaryKey": false,
582
+ "notNull": true,
583
+ "autoincrement": false
584
+ },
585
+ "name": {
586
+ "name": "name",
587
+ "type": "text",
588
+ "primaryKey": false,
589
+ "notNull": true,
590
+ "autoincrement": false
591
+ },
592
+ "decimals": {
593
+ "name": "decimals",
594
+ "type": "integer",
595
+ "primaryKey": false,
596
+ "notNull": true,
597
+ "autoincrement": false,
598
+ "default": 2
599
+ }
600
+ },
601
+ "indexes": {},
602
+ "foreignKeys": {},
603
+ "compositePrimaryKeys": {},
604
+ "uniqueConstraints": {},
605
+ "checkConstraints": {}
606
+ },
607
+ "currency_rates": {
608
+ "name": "currency_rates",
609
+ "columns": {
610
+ "id": {
611
+ "name": "id",
612
+ "type": "text",
613
+ "primaryKey": true,
614
+ "notNull": true,
615
+ "autoincrement": false
616
+ },
617
+ "from_code": {
618
+ "name": "from_code",
619
+ "type": "text",
620
+ "primaryKey": false,
621
+ "notNull": true,
622
+ "autoincrement": false
623
+ },
624
+ "to_code": {
625
+ "name": "to_code",
626
+ "type": "text",
627
+ "primaryKey": false,
628
+ "notNull": true,
629
+ "autoincrement": false
630
+ },
631
+ "rate": {
632
+ "name": "rate",
633
+ "type": "real",
634
+ "primaryKey": false,
635
+ "notNull": true,
636
+ "autoincrement": false
637
+ },
638
+ "as_of": {
639
+ "name": "as_of",
640
+ "type": "text",
641
+ "primaryKey": false,
642
+ "notNull": true,
643
+ "autoincrement": false
644
+ },
645
+ "source": {
646
+ "name": "source",
647
+ "type": "text",
648
+ "primaryKey": false,
649
+ "notNull": false,
650
+ "autoincrement": false
651
+ },
652
+ "version": {
653
+ "name": "version",
654
+ "type": "integer",
655
+ "primaryKey": false,
656
+ "notNull": true,
657
+ "autoincrement": false,
658
+ "default": 0
659
+ }
660
+ },
661
+ "indexes": {
662
+ "currency_rates_from_to": {
663
+ "name": "currency_rates_from_to",
664
+ "columns": [
665
+ "from_code",
666
+ "to_code"
667
+ ],
668
+ "isUnique": true
669
+ }
670
+ },
671
+ "foreignKeys": {
672
+ "currency_rates_from_code_currencies_code_fk": {
673
+ "name": "currency_rates_from_code_currencies_code_fk",
674
+ "tableFrom": "currency_rates",
675
+ "tableTo": "currencies",
676
+ "columnsFrom": [
677
+ "from_code"
678
+ ],
679
+ "columnsTo": [
680
+ "code"
681
+ ],
682
+ "onDelete": "no action",
683
+ "onUpdate": "no action"
684
+ },
685
+ "currency_rates_to_code_currencies_code_fk": {
686
+ "name": "currency_rates_to_code_currencies_code_fk",
687
+ "tableFrom": "currency_rates",
688
+ "tableTo": "currencies",
689
+ "columnsFrom": [
690
+ "to_code"
691
+ ],
692
+ "columnsTo": [
693
+ "code"
694
+ ],
695
+ "onDelete": "no action",
696
+ "onUpdate": "no action"
697
+ }
698
+ },
699
+ "compositePrimaryKeys": {},
700
+ "uniqueConstraints": {},
701
+ "checkConstraints": {}
702
+ },
703
+ "dashboards": {
704
+ "name": "dashboards",
705
+ "columns": {
706
+ "id": {
707
+ "name": "id",
708
+ "type": "text",
709
+ "primaryKey": true,
710
+ "notNull": true,
711
+ "autoincrement": false
712
+ },
713
+ "name": {
714
+ "name": "name",
715
+ "type": "text",
716
+ "primaryKey": false,
717
+ "notNull": true,
718
+ "autoincrement": false
719
+ },
720
+ "html": {
721
+ "name": "html",
722
+ "type": "text",
723
+ "primaryKey": false,
724
+ "notNull": false,
725
+ "autoincrement": false
726
+ },
727
+ "source": {
728
+ "name": "source",
729
+ "type": "text",
730
+ "primaryKey": false,
731
+ "notNull": true,
732
+ "autoincrement": false,
733
+ "default": "'inline'"
734
+ },
735
+ "path": {
736
+ "name": "path",
737
+ "type": "text",
738
+ "primaryKey": false,
739
+ "notNull": false,
740
+ "autoincrement": false
741
+ },
742
+ "updated_at": {
743
+ "name": "updated_at",
744
+ "type": "text",
745
+ "primaryKey": false,
746
+ "notNull": true,
747
+ "autoincrement": false
748
+ },
749
+ "version": {
750
+ "name": "version",
751
+ "type": "integer",
752
+ "primaryKey": false,
753
+ "notNull": true,
754
+ "autoincrement": false,
755
+ "default": 0
756
+ }
757
+ },
758
+ "indexes": {
759
+ "dashboards_name_unique": {
760
+ "name": "dashboards_name_unique",
761
+ "columns": [
762
+ "name"
763
+ ],
764
+ "isUnique": true
765
+ }
766
+ },
767
+ "foreignKeys": {},
768
+ "compositePrimaryKeys": {},
769
+ "uniqueConstraints": {},
770
+ "checkConstraints": {
771
+ "dashboard_source_content": {
772
+ "name": "dashboard_source_content",
773
+ "value": "(\"dashboards\".\"source\" = 'inline' AND \"dashboards\".\"html\" IS NOT NULL AND \"dashboards\".\"path\" IS NULL) OR (\"dashboards\".\"source\" = 'file' AND \"dashboards\".\"html\" IS NULL AND \"dashboards\".\"path\" IS NOT NULL)"
774
+ }
775
+ }
776
+ },
777
+ "merchant_category": {
778
+ "name": "merchant_category",
779
+ "columns": {
780
+ "merchant_key": {
781
+ "name": "merchant_key",
782
+ "type": "text",
783
+ "primaryKey": false,
784
+ "notNull": true,
785
+ "autoincrement": false
786
+ },
787
+ "category_id": {
788
+ "name": "category_id",
789
+ "type": "text",
790
+ "primaryKey": false,
791
+ "notNull": true,
792
+ "autoincrement": false
793
+ },
794
+ "weight": {
795
+ "name": "weight",
796
+ "type": "real",
797
+ "primaryKey": false,
798
+ "notNull": true,
799
+ "autoincrement": false,
800
+ "default": 1
801
+ },
802
+ "origin": {
803
+ "name": "origin",
804
+ "type": "text",
805
+ "primaryKey": false,
806
+ "notNull": true,
807
+ "autoincrement": false
808
+ },
809
+ "last_seen": {
810
+ "name": "last_seen",
811
+ "type": "integer",
812
+ "primaryKey": false,
813
+ "notNull": false,
814
+ "autoincrement": false
815
+ }
816
+ },
817
+ "indexes": {},
818
+ "foreignKeys": {
819
+ "merchant_category_merchant_key_merchants_key_fk": {
820
+ "name": "merchant_category_merchant_key_merchants_key_fk",
821
+ "tableFrom": "merchant_category",
822
+ "tableTo": "merchants",
823
+ "columnsFrom": [
824
+ "merchant_key"
825
+ ],
826
+ "columnsTo": [
827
+ "key"
828
+ ],
829
+ "onDelete": "no action",
830
+ "onUpdate": "no action"
831
+ },
832
+ "merchant_category_category_id_categories_id_fk": {
833
+ "name": "merchant_category_category_id_categories_id_fk",
834
+ "tableFrom": "merchant_category",
835
+ "tableTo": "categories",
836
+ "columnsFrom": [
837
+ "category_id"
838
+ ],
839
+ "columnsTo": [
840
+ "id"
841
+ ],
842
+ "onDelete": "cascade",
843
+ "onUpdate": "no action"
844
+ }
845
+ },
846
+ "compositePrimaryKeys": {
847
+ "merchant_category_merchant_key_category_id_pk": {
848
+ "columns": [
849
+ "merchant_key",
850
+ "category_id"
851
+ ],
852
+ "name": "merchant_category_merchant_key_category_id_pk"
853
+ }
854
+ },
855
+ "uniqueConstraints": {},
856
+ "checkConstraints": {}
857
+ },
858
+ "merchants": {
859
+ "name": "merchants",
860
+ "columns": {
861
+ "key": {
862
+ "name": "key",
863
+ "type": "text",
864
+ "primaryKey": true,
865
+ "notNull": true,
866
+ "autoincrement": false
867
+ }
868
+ },
869
+ "indexes": {},
870
+ "foreignKeys": {},
871
+ "compositePrimaryKeys": {},
872
+ "uniqueConstraints": {},
873
+ "checkConstraints": {}
874
+ },
875
+ "recurring_rules": {
876
+ "name": "recurring_rules",
877
+ "columns": {
878
+ "id": {
879
+ "name": "id",
880
+ "type": "text",
881
+ "primaryKey": true,
882
+ "notNull": true,
883
+ "autoincrement": false
884
+ },
885
+ "description": {
886
+ "name": "description",
887
+ "type": "text",
888
+ "primaryKey": false,
889
+ "notNull": true,
890
+ "autoincrement": false
891
+ },
892
+ "amount": {
893
+ "name": "amount",
894
+ "type": "real",
895
+ "primaryKey": false,
896
+ "notNull": true,
897
+ "autoincrement": false
898
+ },
899
+ "type": {
900
+ "name": "type",
901
+ "type": "text",
902
+ "primaryKey": false,
903
+ "notNull": true,
904
+ "autoincrement": false
905
+ },
906
+ "period": {
907
+ "name": "period",
908
+ "type": "text",
909
+ "primaryKey": false,
910
+ "notNull": true,
911
+ "autoincrement": false
912
+ },
913
+ "next_due": {
914
+ "name": "next_due",
915
+ "type": "text",
916
+ "primaryKey": false,
917
+ "notNull": true,
918
+ "autoincrement": false
919
+ },
920
+ "currency": {
921
+ "name": "currency",
922
+ "type": "text",
923
+ "primaryKey": false,
924
+ "notNull": true,
925
+ "autoincrement": false
926
+ },
927
+ "account_id": {
928
+ "name": "account_id",
929
+ "type": "text",
930
+ "primaryKey": false,
931
+ "notNull": false,
932
+ "autoincrement": false
933
+ },
934
+ "category_id": {
935
+ "name": "category_id",
936
+ "type": "text",
937
+ "primaryKey": false,
938
+ "notNull": false,
939
+ "autoincrement": false
940
+ },
941
+ "merchant_key": {
942
+ "name": "merchant_key",
943
+ "type": "text",
944
+ "primaryKey": false,
945
+ "notNull": false,
946
+ "autoincrement": false
947
+ },
948
+ "version": {
949
+ "name": "version",
950
+ "type": "integer",
951
+ "primaryKey": false,
952
+ "notNull": true,
953
+ "autoincrement": false,
954
+ "default": 0
955
+ }
956
+ },
957
+ "indexes": {},
958
+ "foreignKeys": {
959
+ "recurring_rules_currency_currencies_code_fk": {
960
+ "name": "recurring_rules_currency_currencies_code_fk",
961
+ "tableFrom": "recurring_rules",
962
+ "tableTo": "currencies",
963
+ "columnsFrom": [
964
+ "currency"
965
+ ],
966
+ "columnsTo": [
967
+ "code"
968
+ ],
969
+ "onDelete": "no action",
970
+ "onUpdate": "no action"
971
+ },
972
+ "recurring_rules_account_id_accounts_id_fk": {
973
+ "name": "recurring_rules_account_id_accounts_id_fk",
974
+ "tableFrom": "recurring_rules",
975
+ "tableTo": "accounts",
976
+ "columnsFrom": [
977
+ "account_id"
978
+ ],
979
+ "columnsTo": [
980
+ "id"
981
+ ],
982
+ "onDelete": "no action",
983
+ "onUpdate": "no action"
984
+ },
985
+ "recurring_rules_category_id_categories_id_fk": {
986
+ "name": "recurring_rules_category_id_categories_id_fk",
987
+ "tableFrom": "recurring_rules",
988
+ "tableTo": "categories",
989
+ "columnsFrom": [
990
+ "category_id"
991
+ ],
992
+ "columnsTo": [
993
+ "id"
994
+ ],
995
+ "onDelete": "no action",
996
+ "onUpdate": "no action"
997
+ },
998
+ "recurring_rules_merchant_key_merchants_key_fk": {
999
+ "name": "recurring_rules_merchant_key_merchants_key_fk",
1000
+ "tableFrom": "recurring_rules",
1001
+ "tableTo": "merchants",
1002
+ "columnsFrom": [
1003
+ "merchant_key"
1004
+ ],
1005
+ "columnsTo": [
1006
+ "key"
1007
+ ],
1008
+ "onDelete": "no action",
1009
+ "onUpdate": "no action"
1010
+ }
1011
+ },
1012
+ "compositePrimaryKeys": {},
1013
+ "uniqueConstraints": {},
1014
+ "checkConstraints": {}
1015
+ },
1016
+ "sessions": {
1017
+ "name": "sessions",
1018
+ "columns": {
1019
+ "id": {
1020
+ "name": "id",
1021
+ "type": "text",
1022
+ "primaryKey": true,
1023
+ "notNull": true,
1024
+ "autoincrement": false
1025
+ },
1026
+ "user_id": {
1027
+ "name": "user_id",
1028
+ "type": "text",
1029
+ "primaryKey": false,
1030
+ "notNull": true,
1031
+ "autoincrement": false
1032
+ },
1033
+ "token_hash": {
1034
+ "name": "token_hash",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": true,
1038
+ "autoincrement": false
1039
+ },
1040
+ "created_at": {
1041
+ "name": "created_at",
1042
+ "type": "text",
1043
+ "primaryKey": false,
1044
+ "notNull": true,
1045
+ "autoincrement": false
1046
+ },
1047
+ "last_seen_at": {
1048
+ "name": "last_seen_at",
1049
+ "type": "text",
1050
+ "primaryKey": false,
1051
+ "notNull": true,
1052
+ "autoincrement": false
1053
+ },
1054
+ "expires_at": {
1055
+ "name": "expires_at",
1056
+ "type": "text",
1057
+ "primaryKey": false,
1058
+ "notNull": true,
1059
+ "autoincrement": false
1060
+ },
1061
+ "version": {
1062
+ "name": "version",
1063
+ "type": "integer",
1064
+ "primaryKey": false,
1065
+ "notNull": true,
1066
+ "autoincrement": false,
1067
+ "default": 0
1068
+ }
1069
+ },
1070
+ "indexes": {
1071
+ "sessions_token_hash_unique": {
1072
+ "name": "sessions_token_hash_unique",
1073
+ "columns": [
1074
+ "token_hash"
1075
+ ],
1076
+ "isUnique": true
1077
+ }
1078
+ },
1079
+ "foreignKeys": {
1080
+ "sessions_user_id_users_id_fk": {
1081
+ "name": "sessions_user_id_users_id_fk",
1082
+ "tableFrom": "sessions",
1083
+ "tableTo": "users",
1084
+ "columnsFrom": [
1085
+ "user_id"
1086
+ ],
1087
+ "columnsTo": [
1088
+ "id"
1089
+ ],
1090
+ "onDelete": "cascade",
1091
+ "onUpdate": "no action"
1092
+ }
1093
+ },
1094
+ "compositePrimaryKeys": {},
1095
+ "uniqueConstraints": {},
1096
+ "checkConstraints": {}
1097
+ },
1098
+ "settings": {
1099
+ "name": "settings",
1100
+ "columns": {
1101
+ "id": {
1102
+ "name": "id",
1103
+ "type": "text",
1104
+ "primaryKey": true,
1105
+ "notNull": true,
1106
+ "autoincrement": false,
1107
+ "default": "'singleton'"
1108
+ },
1109
+ "locale": {
1110
+ "name": "locale",
1111
+ "type": "text",
1112
+ "primaryKey": false,
1113
+ "notNull": true,
1114
+ "autoincrement": false,
1115
+ "default": "'en'"
1116
+ },
1117
+ "locale_source": {
1118
+ "name": "locale_source",
1119
+ "type": "text",
1120
+ "primaryKey": false,
1121
+ "notNull": true,
1122
+ "autoincrement": false,
1123
+ "default": "'default'"
1124
+ },
1125
+ "base_currency": {
1126
+ "name": "base_currency",
1127
+ "type": "text",
1128
+ "primaryKey": false,
1129
+ "notNull": false,
1130
+ "autoincrement": false
1131
+ },
1132
+ "version": {
1133
+ "name": "version",
1134
+ "type": "integer",
1135
+ "primaryKey": false,
1136
+ "notNull": true,
1137
+ "autoincrement": false,
1138
+ "default": 0
1139
+ }
1140
+ },
1141
+ "indexes": {},
1142
+ "foreignKeys": {
1143
+ "settings_base_currency_currencies_code_fk": {
1144
+ "name": "settings_base_currency_currencies_code_fk",
1145
+ "tableFrom": "settings",
1146
+ "tableTo": "currencies",
1147
+ "columnsFrom": [
1148
+ "base_currency"
1149
+ ],
1150
+ "columnsTo": [
1151
+ "code"
1152
+ ],
1153
+ "onDelete": "no action",
1154
+ "onUpdate": "no action"
1155
+ }
1156
+ },
1157
+ "compositePrimaryKeys": {},
1158
+ "uniqueConstraints": {},
1159
+ "checkConstraints": {}
1160
+ },
1161
+ "setup_codes": {
1162
+ "name": "setup_codes",
1163
+ "columns": {
1164
+ "id": {
1165
+ "name": "id",
1166
+ "type": "text",
1167
+ "primaryKey": true,
1168
+ "notNull": true,
1169
+ "autoincrement": false
1170
+ },
1171
+ "code_hash": {
1172
+ "name": "code_hash",
1173
+ "type": "text",
1174
+ "primaryKey": false,
1175
+ "notNull": true,
1176
+ "autoincrement": false
1177
+ },
1178
+ "created_at": {
1179
+ "name": "created_at",
1180
+ "type": "text",
1181
+ "primaryKey": false,
1182
+ "notNull": true,
1183
+ "autoincrement": false
1184
+ },
1185
+ "expires_at": {
1186
+ "name": "expires_at",
1187
+ "type": "text",
1188
+ "primaryKey": false,
1189
+ "notNull": true,
1190
+ "autoincrement": false
1191
+ },
1192
+ "used_at": {
1193
+ "name": "used_at",
1194
+ "type": "text",
1195
+ "primaryKey": false,
1196
+ "notNull": false,
1197
+ "autoincrement": false
1198
+ },
1199
+ "version": {
1200
+ "name": "version",
1201
+ "type": "integer",
1202
+ "primaryKey": false,
1203
+ "notNull": true,
1204
+ "autoincrement": false,
1205
+ "default": 0
1206
+ }
1207
+ },
1208
+ "indexes": {
1209
+ "setup_codes_code_hash_unique": {
1210
+ "name": "setup_codes_code_hash_unique",
1211
+ "columns": [
1212
+ "code_hash"
1213
+ ],
1214
+ "isUnique": true
1215
+ }
1216
+ },
1217
+ "foreignKeys": {},
1218
+ "compositePrimaryKeys": {},
1219
+ "uniqueConstraints": {},
1220
+ "checkConstraints": {}
1221
+ },
1222
+ "tags": {
1223
+ "name": "tags",
1224
+ "columns": {
1225
+ "id": {
1226
+ "name": "id",
1227
+ "type": "text",
1228
+ "primaryKey": true,
1229
+ "notNull": true,
1230
+ "autoincrement": false
1231
+ },
1232
+ "name": {
1233
+ "name": "name",
1234
+ "type": "text",
1235
+ "primaryKey": false,
1236
+ "notNull": true,
1237
+ "autoincrement": false
1238
+ },
1239
+ "version": {
1240
+ "name": "version",
1241
+ "type": "integer",
1242
+ "primaryKey": false,
1243
+ "notNull": true,
1244
+ "autoincrement": false,
1245
+ "default": 0
1246
+ }
1247
+ },
1248
+ "indexes": {
1249
+ "tags_name_unique": {
1250
+ "name": "tags_name_unique",
1251
+ "columns": [
1252
+ "name"
1253
+ ],
1254
+ "isUnique": true
1255
+ }
1256
+ },
1257
+ "foreignKeys": {},
1258
+ "compositePrimaryKeys": {},
1259
+ "uniqueConstraints": {},
1260
+ "checkConstraints": {}
1261
+ },
1262
+ "transaction_tags": {
1263
+ "name": "transaction_tags",
1264
+ "columns": {
1265
+ "transaction_id": {
1266
+ "name": "transaction_id",
1267
+ "type": "text",
1268
+ "primaryKey": false,
1269
+ "notNull": true,
1270
+ "autoincrement": false
1271
+ },
1272
+ "tag_id": {
1273
+ "name": "tag_id",
1274
+ "type": "text",
1275
+ "primaryKey": false,
1276
+ "notNull": true,
1277
+ "autoincrement": false
1278
+ }
1279
+ },
1280
+ "indexes": {},
1281
+ "foreignKeys": {
1282
+ "transaction_tags_transaction_id_transactions_id_fk": {
1283
+ "name": "transaction_tags_transaction_id_transactions_id_fk",
1284
+ "tableFrom": "transaction_tags",
1285
+ "tableTo": "transactions",
1286
+ "columnsFrom": [
1287
+ "transaction_id"
1288
+ ],
1289
+ "columnsTo": [
1290
+ "id"
1291
+ ],
1292
+ "onDelete": "cascade",
1293
+ "onUpdate": "no action"
1294
+ },
1295
+ "transaction_tags_tag_id_tags_id_fk": {
1296
+ "name": "transaction_tags_tag_id_tags_id_fk",
1297
+ "tableFrom": "transaction_tags",
1298
+ "tableTo": "tags",
1299
+ "columnsFrom": [
1300
+ "tag_id"
1301
+ ],
1302
+ "columnsTo": [
1303
+ "id"
1304
+ ],
1305
+ "onDelete": "cascade",
1306
+ "onUpdate": "no action"
1307
+ }
1308
+ },
1309
+ "compositePrimaryKeys": {
1310
+ "transaction_tags_transaction_id_tag_id_pk": {
1311
+ "columns": [
1312
+ "transaction_id",
1313
+ "tag_id"
1314
+ ],
1315
+ "name": "transaction_tags_transaction_id_tag_id_pk"
1316
+ }
1317
+ },
1318
+ "uniqueConstraints": {},
1319
+ "checkConstraints": {}
1320
+ },
1321
+ "transactions": {
1322
+ "name": "transactions",
1323
+ "columns": {
1324
+ "id": {
1325
+ "name": "id",
1326
+ "type": "text",
1327
+ "primaryKey": true,
1328
+ "notNull": true,
1329
+ "autoincrement": false
1330
+ },
1331
+ "description": {
1332
+ "name": "description",
1333
+ "type": "text",
1334
+ "primaryKey": false,
1335
+ "notNull": true,
1336
+ "autoincrement": false
1337
+ },
1338
+ "amount": {
1339
+ "name": "amount",
1340
+ "type": "real",
1341
+ "primaryKey": false,
1342
+ "notNull": true,
1343
+ "autoincrement": false
1344
+ },
1345
+ "type": {
1346
+ "name": "type",
1347
+ "type": "text",
1348
+ "primaryKey": false,
1349
+ "notNull": true,
1350
+ "autoincrement": false
1351
+ },
1352
+ "status": {
1353
+ "name": "status",
1354
+ "type": "text",
1355
+ "primaryKey": false,
1356
+ "notNull": true,
1357
+ "autoincrement": false,
1358
+ "default": "'effective'"
1359
+ },
1360
+ "date": {
1361
+ "name": "date",
1362
+ "type": "text",
1363
+ "primaryKey": false,
1364
+ "notNull": true,
1365
+ "autoincrement": false
1366
+ },
1367
+ "currency": {
1368
+ "name": "currency",
1369
+ "type": "text",
1370
+ "primaryKey": false,
1371
+ "notNull": true,
1372
+ "autoincrement": false
1373
+ },
1374
+ "source": {
1375
+ "name": "source",
1376
+ "type": "text",
1377
+ "primaryKey": false,
1378
+ "notNull": true,
1379
+ "autoincrement": false
1380
+ },
1381
+ "idempotency_key": {
1382
+ "name": "idempotency_key",
1383
+ "type": "text",
1384
+ "primaryKey": false,
1385
+ "notNull": true,
1386
+ "autoincrement": false
1387
+ },
1388
+ "classification_method": {
1389
+ "name": "classification_method",
1390
+ "type": "text",
1391
+ "primaryKey": false,
1392
+ "notNull": true,
1393
+ "autoincrement": false
1394
+ },
1395
+ "confidence": {
1396
+ "name": "confidence",
1397
+ "type": "real",
1398
+ "primaryKey": false,
1399
+ "notNull": true,
1400
+ "autoincrement": false
1401
+ },
1402
+ "raw_input": {
1403
+ "name": "raw_input",
1404
+ "type": "text",
1405
+ "primaryKey": false,
1406
+ "notNull": false,
1407
+ "autoincrement": false
1408
+ },
1409
+ "from_account_id": {
1410
+ "name": "from_account_id",
1411
+ "type": "text",
1412
+ "primaryKey": false,
1413
+ "notNull": false,
1414
+ "autoincrement": false
1415
+ },
1416
+ "to_account_id": {
1417
+ "name": "to_account_id",
1418
+ "type": "text",
1419
+ "primaryKey": false,
1420
+ "notNull": false,
1421
+ "autoincrement": false
1422
+ },
1423
+ "credit_card_id": {
1424
+ "name": "credit_card_id",
1425
+ "type": "text",
1426
+ "primaryKey": false,
1427
+ "notNull": false,
1428
+ "autoincrement": false
1429
+ },
1430
+ "category_id": {
1431
+ "name": "category_id",
1432
+ "type": "text",
1433
+ "primaryKey": false,
1434
+ "notNull": false,
1435
+ "autoincrement": false
1436
+ },
1437
+ "subcategory_id": {
1438
+ "name": "subcategory_id",
1439
+ "type": "text",
1440
+ "primaryKey": false,
1441
+ "notNull": false,
1442
+ "autoincrement": false
1443
+ },
1444
+ "merchant_key": {
1445
+ "name": "merchant_key",
1446
+ "type": "text",
1447
+ "primaryKey": false,
1448
+ "notNull": false,
1449
+ "autoincrement": false
1450
+ },
1451
+ "note": {
1452
+ "name": "note",
1453
+ "type": "text",
1454
+ "primaryKey": false,
1455
+ "notNull": false,
1456
+ "autoincrement": false
1457
+ },
1458
+ "bill_id": {
1459
+ "name": "bill_id",
1460
+ "type": "text",
1461
+ "primaryKey": false,
1462
+ "notNull": false,
1463
+ "autoincrement": false
1464
+ },
1465
+ "version": {
1466
+ "name": "version",
1467
+ "type": "integer",
1468
+ "primaryKey": false,
1469
+ "notNull": true,
1470
+ "autoincrement": false,
1471
+ "default": 0
1472
+ }
1473
+ },
1474
+ "indexes": {
1475
+ "transactions_idempotency_key_unique": {
1476
+ "name": "transactions_idempotency_key_unique",
1477
+ "columns": [
1478
+ "idempotency_key"
1479
+ ],
1480
+ "isUnique": true
1481
+ },
1482
+ "idx_transactions_date": {
1483
+ "name": "idx_transactions_date",
1484
+ "columns": [
1485
+ "date"
1486
+ ],
1487
+ "isUnique": false
1488
+ },
1489
+ "idx_transactions_from_account": {
1490
+ "name": "idx_transactions_from_account",
1491
+ "columns": [
1492
+ "from_account_id"
1493
+ ],
1494
+ "isUnique": false
1495
+ },
1496
+ "idx_transactions_to_account": {
1497
+ "name": "idx_transactions_to_account",
1498
+ "columns": [
1499
+ "to_account_id"
1500
+ ],
1501
+ "isUnique": false
1502
+ },
1503
+ "idx_transactions_category": {
1504
+ "name": "idx_transactions_category",
1505
+ "columns": [
1506
+ "category_id"
1507
+ ],
1508
+ "isUnique": false
1509
+ },
1510
+ "idx_transactions_status_date": {
1511
+ "name": "idx_transactions_status_date",
1512
+ "columns": [
1513
+ "status",
1514
+ "date"
1515
+ ],
1516
+ "isUnique": false
1517
+ }
1518
+ },
1519
+ "foreignKeys": {
1520
+ "transactions_currency_currencies_code_fk": {
1521
+ "name": "transactions_currency_currencies_code_fk",
1522
+ "tableFrom": "transactions",
1523
+ "tableTo": "currencies",
1524
+ "columnsFrom": [
1525
+ "currency"
1526
+ ],
1527
+ "columnsTo": [
1528
+ "code"
1529
+ ],
1530
+ "onDelete": "no action",
1531
+ "onUpdate": "no action"
1532
+ },
1533
+ "transactions_from_account_id_accounts_id_fk": {
1534
+ "name": "transactions_from_account_id_accounts_id_fk",
1535
+ "tableFrom": "transactions",
1536
+ "tableTo": "accounts",
1537
+ "columnsFrom": [
1538
+ "from_account_id"
1539
+ ],
1540
+ "columnsTo": [
1541
+ "id"
1542
+ ],
1543
+ "onDelete": "no action",
1544
+ "onUpdate": "no action"
1545
+ },
1546
+ "transactions_to_account_id_accounts_id_fk": {
1547
+ "name": "transactions_to_account_id_accounts_id_fk",
1548
+ "tableFrom": "transactions",
1549
+ "tableTo": "accounts",
1550
+ "columnsFrom": [
1551
+ "to_account_id"
1552
+ ],
1553
+ "columnsTo": [
1554
+ "id"
1555
+ ],
1556
+ "onDelete": "no action",
1557
+ "onUpdate": "no action"
1558
+ },
1559
+ "transactions_credit_card_id_credit_cards_id_fk": {
1560
+ "name": "transactions_credit_card_id_credit_cards_id_fk",
1561
+ "tableFrom": "transactions",
1562
+ "tableTo": "credit_cards",
1563
+ "columnsFrom": [
1564
+ "credit_card_id"
1565
+ ],
1566
+ "columnsTo": [
1567
+ "id"
1568
+ ],
1569
+ "onDelete": "no action",
1570
+ "onUpdate": "no action"
1571
+ },
1572
+ "transactions_category_id_categories_id_fk": {
1573
+ "name": "transactions_category_id_categories_id_fk",
1574
+ "tableFrom": "transactions",
1575
+ "tableTo": "categories",
1576
+ "columnsFrom": [
1577
+ "category_id"
1578
+ ],
1579
+ "columnsTo": [
1580
+ "id"
1581
+ ],
1582
+ "onDelete": "no action",
1583
+ "onUpdate": "no action"
1584
+ },
1585
+ "transactions_subcategory_id_categories_id_fk": {
1586
+ "name": "transactions_subcategory_id_categories_id_fk",
1587
+ "tableFrom": "transactions",
1588
+ "tableTo": "categories",
1589
+ "columnsFrom": [
1590
+ "subcategory_id"
1591
+ ],
1592
+ "columnsTo": [
1593
+ "id"
1594
+ ],
1595
+ "onDelete": "no action",
1596
+ "onUpdate": "no action"
1597
+ },
1598
+ "transactions_merchant_key_merchants_key_fk": {
1599
+ "name": "transactions_merchant_key_merchants_key_fk",
1600
+ "tableFrom": "transactions",
1601
+ "tableTo": "merchants",
1602
+ "columnsFrom": [
1603
+ "merchant_key"
1604
+ ],
1605
+ "columnsTo": [
1606
+ "key"
1607
+ ],
1608
+ "onDelete": "no action",
1609
+ "onUpdate": "no action"
1610
+ },
1611
+ "transactions_bill_id_bills_id_fk": {
1612
+ "name": "transactions_bill_id_bills_id_fk",
1613
+ "tableFrom": "transactions",
1614
+ "tableTo": "bills",
1615
+ "columnsFrom": [
1616
+ "bill_id"
1617
+ ],
1618
+ "columnsTo": [
1619
+ "id"
1620
+ ],
1621
+ "onDelete": "no action",
1622
+ "onUpdate": "no action"
1623
+ }
1624
+ },
1625
+ "compositePrimaryKeys": {},
1626
+ "uniqueConstraints": {},
1627
+ "checkConstraints": {
1628
+ "subcategory_requires_category": {
1629
+ "name": "subcategory_requires_category",
1630
+ "value": "\"transactions\".\"subcategory_id\" IS NULL OR \"transactions\".\"category_id\" IS NOT NULL"
1631
+ }
1632
+ }
1633
+ },
1634
+ "users": {
1635
+ "name": "users",
1636
+ "columns": {
1637
+ "id": {
1638
+ "name": "id",
1639
+ "type": "text",
1640
+ "primaryKey": true,
1641
+ "notNull": true,
1642
+ "autoincrement": false
1643
+ },
1644
+ "username": {
1645
+ "name": "username",
1646
+ "type": "text",
1647
+ "primaryKey": false,
1648
+ "notNull": false,
1649
+ "autoincrement": false
1650
+ },
1651
+ "password_hash": {
1652
+ "name": "password_hash",
1653
+ "type": "text",
1654
+ "primaryKey": false,
1655
+ "notNull": false,
1656
+ "autoincrement": false
1657
+ },
1658
+ "role": {
1659
+ "name": "role",
1660
+ "type": "text",
1661
+ "primaryKey": false,
1662
+ "notNull": true,
1663
+ "autoincrement": false
1664
+ },
1665
+ "created_at": {
1666
+ "name": "created_at",
1667
+ "type": "text",
1668
+ "primaryKey": false,
1669
+ "notNull": true,
1670
+ "autoincrement": false
1671
+ },
1672
+ "disabled_at": {
1673
+ "name": "disabled_at",
1674
+ "type": "text",
1675
+ "primaryKey": false,
1676
+ "notNull": false,
1677
+ "autoincrement": false
1678
+ },
1679
+ "version": {
1680
+ "name": "version",
1681
+ "type": "integer",
1682
+ "primaryKey": false,
1683
+ "notNull": true,
1684
+ "autoincrement": false,
1685
+ "default": 0
1686
+ }
1687
+ },
1688
+ "indexes": {
1689
+ "users_username_unique": {
1690
+ "name": "users_username_unique",
1691
+ "columns": [
1692
+ "username"
1693
+ ],
1694
+ "isUnique": true
1695
+ }
1696
+ },
1697
+ "foreignKeys": {},
1698
+ "compositePrimaryKeys": {},
1699
+ "uniqueConstraints": {},
1700
+ "checkConstraints": {}
1701
+ }
1702
+ },
1703
+ "views": {},
1704
+ "enums": {},
1705
+ "_meta": {
1706
+ "schemas": {},
1707
+ "tables": {},
1708
+ "columns": {}
1709
+ },
1710
+ "internal": {
1711
+ "indexes": {}
1712
+ }
1713
+ }