@rfc0/patty 0.0.0-stage → 1.0.2

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 +543 -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 +1734 -0
  449. package/ui/dashboards/cards.html +4032 -0
  450. package/ui/dashboards/categories.html +4694 -0
  451. package/ui/dashboards/comparative.html +2475 -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 +2528 -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,1247 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "66706e2d-47cd-4fd3-b0ff-5312a3b1ab2b",
5
+ "prevId": "7e28dc09-baf4-4d96-8705-5f1761c4ffef",
6
+ "tables": {
7
+ "accounts": {
8
+ "name": "accounts",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "name": {
18
+ "name": "name",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "type": {
25
+ "name": "type",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "initial_balance": {
32
+ "name": "initial_balance",
33
+ "type": "real",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false,
37
+ "default": 0
38
+ },
39
+ "currency": {
40
+ "name": "currency",
41
+ "type": "text",
42
+ "primaryKey": false,
43
+ "notNull": true,
44
+ "autoincrement": false
45
+ },
46
+ "version": {
47
+ "name": "version",
48
+ "type": "integer",
49
+ "primaryKey": false,
50
+ "notNull": true,
51
+ "autoincrement": false,
52
+ "default": 0
53
+ }
54
+ },
55
+ "indexes": {},
56
+ "foreignKeys": {
57
+ "accounts_currency_currencies_code_fk": {
58
+ "name": "accounts_currency_currencies_code_fk",
59
+ "tableFrom": "accounts",
60
+ "tableTo": "currencies",
61
+ "columnsFrom": [
62
+ "currency"
63
+ ],
64
+ "columnsTo": [
65
+ "code"
66
+ ],
67
+ "onDelete": "no action",
68
+ "onUpdate": "no action"
69
+ }
70
+ },
71
+ "compositePrimaryKeys": {},
72
+ "uniqueConstraints": {},
73
+ "checkConstraints": {}
74
+ },
75
+ "bills": {
76
+ "name": "bills",
77
+ "columns": {
78
+ "id": {
79
+ "name": "id",
80
+ "type": "text",
81
+ "primaryKey": true,
82
+ "notNull": true,
83
+ "autoincrement": false
84
+ },
85
+ "credit_card_id": {
86
+ "name": "credit_card_id",
87
+ "type": "text",
88
+ "primaryKey": false,
89
+ "notNull": true,
90
+ "autoincrement": false
91
+ },
92
+ "month": {
93
+ "name": "month",
94
+ "type": "integer",
95
+ "primaryKey": false,
96
+ "notNull": true,
97
+ "autoincrement": false
98
+ },
99
+ "year": {
100
+ "name": "year",
101
+ "type": "integer",
102
+ "primaryKey": false,
103
+ "notNull": true,
104
+ "autoincrement": false
105
+ },
106
+ "close_date": {
107
+ "name": "close_date",
108
+ "type": "text",
109
+ "primaryKey": false,
110
+ "notNull": true,
111
+ "autoincrement": false
112
+ },
113
+ "due_date": {
114
+ "name": "due_date",
115
+ "type": "text",
116
+ "primaryKey": false,
117
+ "notNull": true,
118
+ "autoincrement": false
119
+ },
120
+ "status": {
121
+ "name": "status",
122
+ "type": "text",
123
+ "primaryKey": false,
124
+ "notNull": true,
125
+ "autoincrement": false
126
+ },
127
+ "payment_transaction_id": {
128
+ "name": "payment_transaction_id",
129
+ "type": "text",
130
+ "primaryKey": false,
131
+ "notNull": false,
132
+ "autoincrement": false
133
+ },
134
+ "version": {
135
+ "name": "version",
136
+ "type": "integer",
137
+ "primaryKey": false,
138
+ "notNull": true,
139
+ "autoincrement": false,
140
+ "default": 0
141
+ }
142
+ },
143
+ "indexes": {
144
+ "bills_card_month_year": {
145
+ "name": "bills_card_month_year",
146
+ "columns": [
147
+ "credit_card_id",
148
+ "month",
149
+ "year"
150
+ ],
151
+ "isUnique": true
152
+ }
153
+ },
154
+ "foreignKeys": {
155
+ "bills_credit_card_id_credit_cards_id_fk": {
156
+ "name": "bills_credit_card_id_credit_cards_id_fk",
157
+ "tableFrom": "bills",
158
+ "tableTo": "credit_cards",
159
+ "columnsFrom": [
160
+ "credit_card_id"
161
+ ],
162
+ "columnsTo": [
163
+ "id"
164
+ ],
165
+ "onDelete": "no action",
166
+ "onUpdate": "no action"
167
+ },
168
+ "bills_payment_transaction_id_transactions_id_fk": {
169
+ "name": "bills_payment_transaction_id_transactions_id_fk",
170
+ "tableFrom": "bills",
171
+ "tableTo": "transactions",
172
+ "columnsFrom": [
173
+ "payment_transaction_id"
174
+ ],
175
+ "columnsTo": [
176
+ "id"
177
+ ],
178
+ "onDelete": "no action",
179
+ "onUpdate": "no action"
180
+ }
181
+ },
182
+ "compositePrimaryKeys": {},
183
+ "uniqueConstraints": {},
184
+ "checkConstraints": {}
185
+ },
186
+ "budgets": {
187
+ "name": "budgets",
188
+ "columns": {
189
+ "id": {
190
+ "name": "id",
191
+ "type": "text",
192
+ "primaryKey": true,
193
+ "notNull": true,
194
+ "autoincrement": false
195
+ },
196
+ "category_id": {
197
+ "name": "category_id",
198
+ "type": "text",
199
+ "primaryKey": false,
200
+ "notNull": true,
201
+ "autoincrement": false
202
+ },
203
+ "currency": {
204
+ "name": "currency",
205
+ "type": "text",
206
+ "primaryKey": false,
207
+ "notNull": true,
208
+ "autoincrement": false
209
+ },
210
+ "limit_amount": {
211
+ "name": "limit_amount",
212
+ "type": "real",
213
+ "primaryKey": false,
214
+ "notNull": true,
215
+ "autoincrement": false
216
+ },
217
+ "period": {
218
+ "name": "period",
219
+ "type": "text",
220
+ "primaryKey": false,
221
+ "notNull": true,
222
+ "autoincrement": false,
223
+ "default": "'monthly'"
224
+ },
225
+ "version": {
226
+ "name": "version",
227
+ "type": "integer",
228
+ "primaryKey": false,
229
+ "notNull": true,
230
+ "autoincrement": false,
231
+ "default": 0
232
+ }
233
+ },
234
+ "indexes": {
235
+ "budgets_category_currency_period": {
236
+ "name": "budgets_category_currency_period",
237
+ "columns": [
238
+ "category_id",
239
+ "currency",
240
+ "period"
241
+ ],
242
+ "isUnique": true
243
+ }
244
+ },
245
+ "foreignKeys": {
246
+ "budgets_category_id_categories_id_fk": {
247
+ "name": "budgets_category_id_categories_id_fk",
248
+ "tableFrom": "budgets",
249
+ "tableTo": "categories",
250
+ "columnsFrom": [
251
+ "category_id"
252
+ ],
253
+ "columnsTo": [
254
+ "id"
255
+ ],
256
+ "onDelete": "no action",
257
+ "onUpdate": "no action"
258
+ },
259
+ "budgets_currency_currencies_code_fk": {
260
+ "name": "budgets_currency_currencies_code_fk",
261
+ "tableFrom": "budgets",
262
+ "tableTo": "currencies",
263
+ "columnsFrom": [
264
+ "currency"
265
+ ],
266
+ "columnsTo": [
267
+ "code"
268
+ ],
269
+ "onDelete": "no action",
270
+ "onUpdate": "no action"
271
+ }
272
+ },
273
+ "compositePrimaryKeys": {},
274
+ "uniqueConstraints": {},
275
+ "checkConstraints": {}
276
+ },
277
+ "categories": {
278
+ "name": "categories",
279
+ "columns": {
280
+ "id": {
281
+ "name": "id",
282
+ "type": "text",
283
+ "primaryKey": true,
284
+ "notNull": true,
285
+ "autoincrement": false
286
+ },
287
+ "name": {
288
+ "name": "name",
289
+ "type": "text",
290
+ "primaryKey": false,
291
+ "notNull": true,
292
+ "autoincrement": false
293
+ },
294
+ "kind": {
295
+ "name": "kind",
296
+ "type": "text",
297
+ "primaryKey": false,
298
+ "notNull": true,
299
+ "autoincrement": false
300
+ },
301
+ "parent_id": {
302
+ "name": "parent_id",
303
+ "type": "text",
304
+ "primaryKey": false,
305
+ "notNull": false,
306
+ "autoincrement": false
307
+ },
308
+ "names": {
309
+ "name": "names",
310
+ "type": "text",
311
+ "primaryKey": false,
312
+ "notNull": false,
313
+ "autoincrement": false
314
+ },
315
+ "version": {
316
+ "name": "version",
317
+ "type": "integer",
318
+ "primaryKey": false,
319
+ "notNull": true,
320
+ "autoincrement": false,
321
+ "default": 0
322
+ }
323
+ },
324
+ "indexes": {},
325
+ "foreignKeys": {
326
+ "categories_parent_id_categories_id_fk": {
327
+ "name": "categories_parent_id_categories_id_fk",
328
+ "tableFrom": "categories",
329
+ "tableTo": "categories",
330
+ "columnsFrom": [
331
+ "parent_id"
332
+ ],
333
+ "columnsTo": [
334
+ "id"
335
+ ],
336
+ "onDelete": "no action",
337
+ "onUpdate": "no action"
338
+ }
339
+ },
340
+ "compositePrimaryKeys": {},
341
+ "uniqueConstraints": {},
342
+ "checkConstraints": {}
343
+ },
344
+ "credit_cards": {
345
+ "name": "credit_cards",
346
+ "columns": {
347
+ "id": {
348
+ "name": "id",
349
+ "type": "text",
350
+ "primaryKey": true,
351
+ "notNull": true,
352
+ "autoincrement": false
353
+ },
354
+ "name": {
355
+ "name": "name",
356
+ "type": "text",
357
+ "primaryKey": false,
358
+ "notNull": true,
359
+ "autoincrement": false
360
+ },
361
+ "closing_day": {
362
+ "name": "closing_day",
363
+ "type": "integer",
364
+ "primaryKey": false,
365
+ "notNull": true,
366
+ "autoincrement": false
367
+ },
368
+ "due_day": {
369
+ "name": "due_day",
370
+ "type": "integer",
371
+ "primaryKey": false,
372
+ "notNull": true,
373
+ "autoincrement": false
374
+ },
375
+ "limit_amount": {
376
+ "name": "limit_amount",
377
+ "type": "real",
378
+ "primaryKey": false,
379
+ "notNull": false,
380
+ "autoincrement": false
381
+ },
382
+ "currency": {
383
+ "name": "currency",
384
+ "type": "text",
385
+ "primaryKey": false,
386
+ "notNull": true,
387
+ "autoincrement": false
388
+ },
389
+ "account_id": {
390
+ "name": "account_id",
391
+ "type": "text",
392
+ "primaryKey": false,
393
+ "notNull": true,
394
+ "autoincrement": false
395
+ },
396
+ "payment_account_id": {
397
+ "name": "payment_account_id",
398
+ "type": "text",
399
+ "primaryKey": false,
400
+ "notNull": false,
401
+ "autoincrement": false
402
+ },
403
+ "version": {
404
+ "name": "version",
405
+ "type": "integer",
406
+ "primaryKey": false,
407
+ "notNull": true,
408
+ "autoincrement": false,
409
+ "default": 0
410
+ }
411
+ },
412
+ "indexes": {},
413
+ "foreignKeys": {
414
+ "credit_cards_currency_currencies_code_fk": {
415
+ "name": "credit_cards_currency_currencies_code_fk",
416
+ "tableFrom": "credit_cards",
417
+ "tableTo": "currencies",
418
+ "columnsFrom": [
419
+ "currency"
420
+ ],
421
+ "columnsTo": [
422
+ "code"
423
+ ],
424
+ "onDelete": "no action",
425
+ "onUpdate": "no action"
426
+ },
427
+ "credit_cards_account_id_accounts_id_fk": {
428
+ "name": "credit_cards_account_id_accounts_id_fk",
429
+ "tableFrom": "credit_cards",
430
+ "tableTo": "accounts",
431
+ "columnsFrom": [
432
+ "account_id"
433
+ ],
434
+ "columnsTo": [
435
+ "id"
436
+ ],
437
+ "onDelete": "no action",
438
+ "onUpdate": "no action"
439
+ },
440
+ "credit_cards_payment_account_id_accounts_id_fk": {
441
+ "name": "credit_cards_payment_account_id_accounts_id_fk",
442
+ "tableFrom": "credit_cards",
443
+ "tableTo": "accounts",
444
+ "columnsFrom": [
445
+ "payment_account_id"
446
+ ],
447
+ "columnsTo": [
448
+ "id"
449
+ ],
450
+ "onDelete": "no action",
451
+ "onUpdate": "no action"
452
+ }
453
+ },
454
+ "compositePrimaryKeys": {},
455
+ "uniqueConstraints": {},
456
+ "checkConstraints": {}
457
+ },
458
+ "currencies": {
459
+ "name": "currencies",
460
+ "columns": {
461
+ "code": {
462
+ "name": "code",
463
+ "type": "text",
464
+ "primaryKey": true,
465
+ "notNull": true,
466
+ "autoincrement": false
467
+ },
468
+ "symbol": {
469
+ "name": "symbol",
470
+ "type": "text",
471
+ "primaryKey": false,
472
+ "notNull": true,
473
+ "autoincrement": false
474
+ },
475
+ "name": {
476
+ "name": "name",
477
+ "type": "text",
478
+ "primaryKey": false,
479
+ "notNull": true,
480
+ "autoincrement": false
481
+ }
482
+ },
483
+ "indexes": {},
484
+ "foreignKeys": {},
485
+ "compositePrimaryKeys": {},
486
+ "uniqueConstraints": {},
487
+ "checkConstraints": {}
488
+ },
489
+ "dashboards": {
490
+ "name": "dashboards",
491
+ "columns": {
492
+ "id": {
493
+ "name": "id",
494
+ "type": "text",
495
+ "primaryKey": true,
496
+ "notNull": true,
497
+ "autoincrement": false
498
+ },
499
+ "name": {
500
+ "name": "name",
501
+ "type": "text",
502
+ "primaryKey": false,
503
+ "notNull": true,
504
+ "autoincrement": false
505
+ },
506
+ "html": {
507
+ "name": "html",
508
+ "type": "text",
509
+ "primaryKey": false,
510
+ "notNull": true,
511
+ "autoincrement": false
512
+ },
513
+ "updated_at": {
514
+ "name": "updated_at",
515
+ "type": "text",
516
+ "primaryKey": false,
517
+ "notNull": true,
518
+ "autoincrement": false
519
+ },
520
+ "version": {
521
+ "name": "version",
522
+ "type": "integer",
523
+ "primaryKey": false,
524
+ "notNull": true,
525
+ "autoincrement": false,
526
+ "default": 0
527
+ }
528
+ },
529
+ "indexes": {
530
+ "dashboards_name_unique": {
531
+ "name": "dashboards_name_unique",
532
+ "columns": [
533
+ "name"
534
+ ],
535
+ "isUnique": true
536
+ }
537
+ },
538
+ "foreignKeys": {},
539
+ "compositePrimaryKeys": {},
540
+ "uniqueConstraints": {},
541
+ "checkConstraints": {}
542
+ },
543
+ "merchant_category": {
544
+ "name": "merchant_category",
545
+ "columns": {
546
+ "merchant_key": {
547
+ "name": "merchant_key",
548
+ "type": "text",
549
+ "primaryKey": false,
550
+ "notNull": true,
551
+ "autoincrement": false
552
+ },
553
+ "category_id": {
554
+ "name": "category_id",
555
+ "type": "text",
556
+ "primaryKey": false,
557
+ "notNull": true,
558
+ "autoincrement": false
559
+ },
560
+ "weight": {
561
+ "name": "weight",
562
+ "type": "real",
563
+ "primaryKey": false,
564
+ "notNull": true,
565
+ "autoincrement": false,
566
+ "default": 1
567
+ },
568
+ "origin": {
569
+ "name": "origin",
570
+ "type": "text",
571
+ "primaryKey": false,
572
+ "notNull": true,
573
+ "autoincrement": false
574
+ },
575
+ "last_seen": {
576
+ "name": "last_seen",
577
+ "type": "integer",
578
+ "primaryKey": false,
579
+ "notNull": false,
580
+ "autoincrement": false
581
+ }
582
+ },
583
+ "indexes": {},
584
+ "foreignKeys": {
585
+ "merchant_category_merchant_key_merchants_key_fk": {
586
+ "name": "merchant_category_merchant_key_merchants_key_fk",
587
+ "tableFrom": "merchant_category",
588
+ "tableTo": "merchants",
589
+ "columnsFrom": [
590
+ "merchant_key"
591
+ ],
592
+ "columnsTo": [
593
+ "key"
594
+ ],
595
+ "onDelete": "no action",
596
+ "onUpdate": "no action"
597
+ },
598
+ "merchant_category_category_id_categories_id_fk": {
599
+ "name": "merchant_category_category_id_categories_id_fk",
600
+ "tableFrom": "merchant_category",
601
+ "tableTo": "categories",
602
+ "columnsFrom": [
603
+ "category_id"
604
+ ],
605
+ "columnsTo": [
606
+ "id"
607
+ ],
608
+ "onDelete": "cascade",
609
+ "onUpdate": "no action"
610
+ }
611
+ },
612
+ "compositePrimaryKeys": {
613
+ "merchant_category_merchant_key_category_id_pk": {
614
+ "columns": [
615
+ "merchant_key",
616
+ "category_id"
617
+ ],
618
+ "name": "merchant_category_merchant_key_category_id_pk"
619
+ }
620
+ },
621
+ "uniqueConstraints": {},
622
+ "checkConstraints": {}
623
+ },
624
+ "merchants": {
625
+ "name": "merchants",
626
+ "columns": {
627
+ "key": {
628
+ "name": "key",
629
+ "type": "text",
630
+ "primaryKey": true,
631
+ "notNull": true,
632
+ "autoincrement": false
633
+ }
634
+ },
635
+ "indexes": {},
636
+ "foreignKeys": {},
637
+ "compositePrimaryKeys": {},
638
+ "uniqueConstraints": {},
639
+ "checkConstraints": {}
640
+ },
641
+ "recurring_rules": {
642
+ "name": "recurring_rules",
643
+ "columns": {
644
+ "id": {
645
+ "name": "id",
646
+ "type": "text",
647
+ "primaryKey": true,
648
+ "notNull": true,
649
+ "autoincrement": false
650
+ },
651
+ "description": {
652
+ "name": "description",
653
+ "type": "text",
654
+ "primaryKey": false,
655
+ "notNull": true,
656
+ "autoincrement": false
657
+ },
658
+ "amount": {
659
+ "name": "amount",
660
+ "type": "real",
661
+ "primaryKey": false,
662
+ "notNull": true,
663
+ "autoincrement": false
664
+ },
665
+ "type": {
666
+ "name": "type",
667
+ "type": "text",
668
+ "primaryKey": false,
669
+ "notNull": true,
670
+ "autoincrement": false
671
+ },
672
+ "period": {
673
+ "name": "period",
674
+ "type": "text",
675
+ "primaryKey": false,
676
+ "notNull": true,
677
+ "autoincrement": false
678
+ },
679
+ "next_due": {
680
+ "name": "next_due",
681
+ "type": "text",
682
+ "primaryKey": false,
683
+ "notNull": true,
684
+ "autoincrement": false
685
+ },
686
+ "currency": {
687
+ "name": "currency",
688
+ "type": "text",
689
+ "primaryKey": false,
690
+ "notNull": true,
691
+ "autoincrement": false
692
+ },
693
+ "account_id": {
694
+ "name": "account_id",
695
+ "type": "text",
696
+ "primaryKey": false,
697
+ "notNull": false,
698
+ "autoincrement": false
699
+ },
700
+ "category_id": {
701
+ "name": "category_id",
702
+ "type": "text",
703
+ "primaryKey": false,
704
+ "notNull": false,
705
+ "autoincrement": false
706
+ },
707
+ "merchant_key": {
708
+ "name": "merchant_key",
709
+ "type": "text",
710
+ "primaryKey": false,
711
+ "notNull": false,
712
+ "autoincrement": false
713
+ },
714
+ "version": {
715
+ "name": "version",
716
+ "type": "integer",
717
+ "primaryKey": false,
718
+ "notNull": true,
719
+ "autoincrement": false,
720
+ "default": 0
721
+ }
722
+ },
723
+ "indexes": {},
724
+ "foreignKeys": {
725
+ "recurring_rules_currency_currencies_code_fk": {
726
+ "name": "recurring_rules_currency_currencies_code_fk",
727
+ "tableFrom": "recurring_rules",
728
+ "tableTo": "currencies",
729
+ "columnsFrom": [
730
+ "currency"
731
+ ],
732
+ "columnsTo": [
733
+ "code"
734
+ ],
735
+ "onDelete": "no action",
736
+ "onUpdate": "no action"
737
+ },
738
+ "recurring_rules_account_id_accounts_id_fk": {
739
+ "name": "recurring_rules_account_id_accounts_id_fk",
740
+ "tableFrom": "recurring_rules",
741
+ "tableTo": "accounts",
742
+ "columnsFrom": [
743
+ "account_id"
744
+ ],
745
+ "columnsTo": [
746
+ "id"
747
+ ],
748
+ "onDelete": "no action",
749
+ "onUpdate": "no action"
750
+ },
751
+ "recurring_rules_category_id_categories_id_fk": {
752
+ "name": "recurring_rules_category_id_categories_id_fk",
753
+ "tableFrom": "recurring_rules",
754
+ "tableTo": "categories",
755
+ "columnsFrom": [
756
+ "category_id"
757
+ ],
758
+ "columnsTo": [
759
+ "id"
760
+ ],
761
+ "onDelete": "no action",
762
+ "onUpdate": "no action"
763
+ },
764
+ "recurring_rules_merchant_key_merchants_key_fk": {
765
+ "name": "recurring_rules_merchant_key_merchants_key_fk",
766
+ "tableFrom": "recurring_rules",
767
+ "tableTo": "merchants",
768
+ "columnsFrom": [
769
+ "merchant_key"
770
+ ],
771
+ "columnsTo": [
772
+ "key"
773
+ ],
774
+ "onDelete": "no action",
775
+ "onUpdate": "no action"
776
+ }
777
+ },
778
+ "compositePrimaryKeys": {},
779
+ "uniqueConstraints": {},
780
+ "checkConstraints": {}
781
+ },
782
+ "settings": {
783
+ "name": "settings",
784
+ "columns": {
785
+ "id": {
786
+ "name": "id",
787
+ "type": "text",
788
+ "primaryKey": true,
789
+ "notNull": true,
790
+ "autoincrement": false,
791
+ "default": "'singleton'"
792
+ },
793
+ "locale": {
794
+ "name": "locale",
795
+ "type": "text",
796
+ "primaryKey": false,
797
+ "notNull": true,
798
+ "autoincrement": false,
799
+ "default": "'en'"
800
+ },
801
+ "locale_source": {
802
+ "name": "locale_source",
803
+ "type": "text",
804
+ "primaryKey": false,
805
+ "notNull": true,
806
+ "autoincrement": false,
807
+ "default": "'default'"
808
+ },
809
+ "version": {
810
+ "name": "version",
811
+ "type": "integer",
812
+ "primaryKey": false,
813
+ "notNull": true,
814
+ "autoincrement": false,
815
+ "default": 0
816
+ }
817
+ },
818
+ "indexes": {},
819
+ "foreignKeys": {},
820
+ "compositePrimaryKeys": {},
821
+ "uniqueConstraints": {},
822
+ "checkConstraints": {}
823
+ },
824
+ "tags": {
825
+ "name": "tags",
826
+ "columns": {
827
+ "id": {
828
+ "name": "id",
829
+ "type": "text",
830
+ "primaryKey": true,
831
+ "notNull": true,
832
+ "autoincrement": false
833
+ },
834
+ "name": {
835
+ "name": "name",
836
+ "type": "text",
837
+ "primaryKey": false,
838
+ "notNull": true,
839
+ "autoincrement": false
840
+ },
841
+ "version": {
842
+ "name": "version",
843
+ "type": "integer",
844
+ "primaryKey": false,
845
+ "notNull": true,
846
+ "autoincrement": false,
847
+ "default": 0
848
+ }
849
+ },
850
+ "indexes": {
851
+ "tags_name_unique": {
852
+ "name": "tags_name_unique",
853
+ "columns": [
854
+ "name"
855
+ ],
856
+ "isUnique": true
857
+ }
858
+ },
859
+ "foreignKeys": {},
860
+ "compositePrimaryKeys": {},
861
+ "uniqueConstraints": {},
862
+ "checkConstraints": {}
863
+ },
864
+ "transaction_tags": {
865
+ "name": "transaction_tags",
866
+ "columns": {
867
+ "transaction_id": {
868
+ "name": "transaction_id",
869
+ "type": "text",
870
+ "primaryKey": false,
871
+ "notNull": true,
872
+ "autoincrement": false
873
+ },
874
+ "tag_id": {
875
+ "name": "tag_id",
876
+ "type": "text",
877
+ "primaryKey": false,
878
+ "notNull": true,
879
+ "autoincrement": false
880
+ }
881
+ },
882
+ "indexes": {},
883
+ "foreignKeys": {
884
+ "transaction_tags_transaction_id_transactions_id_fk": {
885
+ "name": "transaction_tags_transaction_id_transactions_id_fk",
886
+ "tableFrom": "transaction_tags",
887
+ "tableTo": "transactions",
888
+ "columnsFrom": [
889
+ "transaction_id"
890
+ ],
891
+ "columnsTo": [
892
+ "id"
893
+ ],
894
+ "onDelete": "cascade",
895
+ "onUpdate": "no action"
896
+ },
897
+ "transaction_tags_tag_id_tags_id_fk": {
898
+ "name": "transaction_tags_tag_id_tags_id_fk",
899
+ "tableFrom": "transaction_tags",
900
+ "tableTo": "tags",
901
+ "columnsFrom": [
902
+ "tag_id"
903
+ ],
904
+ "columnsTo": [
905
+ "id"
906
+ ],
907
+ "onDelete": "cascade",
908
+ "onUpdate": "no action"
909
+ }
910
+ },
911
+ "compositePrimaryKeys": {
912
+ "transaction_tags_transaction_id_tag_id_pk": {
913
+ "columns": [
914
+ "transaction_id",
915
+ "tag_id"
916
+ ],
917
+ "name": "transaction_tags_transaction_id_tag_id_pk"
918
+ }
919
+ },
920
+ "uniqueConstraints": {},
921
+ "checkConstraints": {}
922
+ },
923
+ "transactions": {
924
+ "name": "transactions",
925
+ "columns": {
926
+ "id": {
927
+ "name": "id",
928
+ "type": "text",
929
+ "primaryKey": true,
930
+ "notNull": true,
931
+ "autoincrement": false
932
+ },
933
+ "description": {
934
+ "name": "description",
935
+ "type": "text",
936
+ "primaryKey": false,
937
+ "notNull": true,
938
+ "autoincrement": false
939
+ },
940
+ "amount": {
941
+ "name": "amount",
942
+ "type": "real",
943
+ "primaryKey": false,
944
+ "notNull": true,
945
+ "autoincrement": false
946
+ },
947
+ "type": {
948
+ "name": "type",
949
+ "type": "text",
950
+ "primaryKey": false,
951
+ "notNull": true,
952
+ "autoincrement": false
953
+ },
954
+ "status": {
955
+ "name": "status",
956
+ "type": "text",
957
+ "primaryKey": false,
958
+ "notNull": true,
959
+ "autoincrement": false,
960
+ "default": "'effective'"
961
+ },
962
+ "date": {
963
+ "name": "date",
964
+ "type": "text",
965
+ "primaryKey": false,
966
+ "notNull": true,
967
+ "autoincrement": false
968
+ },
969
+ "currency": {
970
+ "name": "currency",
971
+ "type": "text",
972
+ "primaryKey": false,
973
+ "notNull": true,
974
+ "autoincrement": false
975
+ },
976
+ "source": {
977
+ "name": "source",
978
+ "type": "text",
979
+ "primaryKey": false,
980
+ "notNull": true,
981
+ "autoincrement": false
982
+ },
983
+ "idempotency_key": {
984
+ "name": "idempotency_key",
985
+ "type": "text",
986
+ "primaryKey": false,
987
+ "notNull": true,
988
+ "autoincrement": false
989
+ },
990
+ "classification_method": {
991
+ "name": "classification_method",
992
+ "type": "text",
993
+ "primaryKey": false,
994
+ "notNull": true,
995
+ "autoincrement": false
996
+ },
997
+ "confidence": {
998
+ "name": "confidence",
999
+ "type": "real",
1000
+ "primaryKey": false,
1001
+ "notNull": true,
1002
+ "autoincrement": false
1003
+ },
1004
+ "raw_input": {
1005
+ "name": "raw_input",
1006
+ "type": "text",
1007
+ "primaryKey": false,
1008
+ "notNull": false,
1009
+ "autoincrement": false
1010
+ },
1011
+ "from_account_id": {
1012
+ "name": "from_account_id",
1013
+ "type": "text",
1014
+ "primaryKey": false,
1015
+ "notNull": false,
1016
+ "autoincrement": false
1017
+ },
1018
+ "to_account_id": {
1019
+ "name": "to_account_id",
1020
+ "type": "text",
1021
+ "primaryKey": false,
1022
+ "notNull": false,
1023
+ "autoincrement": false
1024
+ },
1025
+ "credit_card_id": {
1026
+ "name": "credit_card_id",
1027
+ "type": "text",
1028
+ "primaryKey": false,
1029
+ "notNull": false,
1030
+ "autoincrement": false
1031
+ },
1032
+ "category_id": {
1033
+ "name": "category_id",
1034
+ "type": "text",
1035
+ "primaryKey": false,
1036
+ "notNull": false,
1037
+ "autoincrement": false
1038
+ },
1039
+ "subcategory_id": {
1040
+ "name": "subcategory_id",
1041
+ "type": "text",
1042
+ "primaryKey": false,
1043
+ "notNull": false,
1044
+ "autoincrement": false
1045
+ },
1046
+ "merchant_key": {
1047
+ "name": "merchant_key",
1048
+ "type": "text",
1049
+ "primaryKey": false,
1050
+ "notNull": false,
1051
+ "autoincrement": false
1052
+ },
1053
+ "note": {
1054
+ "name": "note",
1055
+ "type": "text",
1056
+ "primaryKey": false,
1057
+ "notNull": false,
1058
+ "autoincrement": false
1059
+ },
1060
+ "bill_id": {
1061
+ "name": "bill_id",
1062
+ "type": "text",
1063
+ "primaryKey": false,
1064
+ "notNull": false,
1065
+ "autoincrement": false
1066
+ },
1067
+ "version": {
1068
+ "name": "version",
1069
+ "type": "integer",
1070
+ "primaryKey": false,
1071
+ "notNull": true,
1072
+ "autoincrement": false,
1073
+ "default": 0
1074
+ }
1075
+ },
1076
+ "indexes": {
1077
+ "transactions_idempotency_key_unique": {
1078
+ "name": "transactions_idempotency_key_unique",
1079
+ "columns": [
1080
+ "idempotency_key"
1081
+ ],
1082
+ "isUnique": true
1083
+ },
1084
+ "idx_transactions_date": {
1085
+ "name": "idx_transactions_date",
1086
+ "columns": [
1087
+ "date"
1088
+ ],
1089
+ "isUnique": false
1090
+ },
1091
+ "idx_transactions_from_account": {
1092
+ "name": "idx_transactions_from_account",
1093
+ "columns": [
1094
+ "from_account_id"
1095
+ ],
1096
+ "isUnique": false
1097
+ },
1098
+ "idx_transactions_to_account": {
1099
+ "name": "idx_transactions_to_account",
1100
+ "columns": [
1101
+ "to_account_id"
1102
+ ],
1103
+ "isUnique": false
1104
+ },
1105
+ "idx_transactions_category": {
1106
+ "name": "idx_transactions_category",
1107
+ "columns": [
1108
+ "category_id"
1109
+ ],
1110
+ "isUnique": false
1111
+ },
1112
+ "idx_transactions_status_date": {
1113
+ "name": "idx_transactions_status_date",
1114
+ "columns": [
1115
+ "status",
1116
+ "date"
1117
+ ],
1118
+ "isUnique": false
1119
+ }
1120
+ },
1121
+ "foreignKeys": {
1122
+ "transactions_currency_currencies_code_fk": {
1123
+ "name": "transactions_currency_currencies_code_fk",
1124
+ "tableFrom": "transactions",
1125
+ "tableTo": "currencies",
1126
+ "columnsFrom": [
1127
+ "currency"
1128
+ ],
1129
+ "columnsTo": [
1130
+ "code"
1131
+ ],
1132
+ "onDelete": "no action",
1133
+ "onUpdate": "no action"
1134
+ },
1135
+ "transactions_from_account_id_accounts_id_fk": {
1136
+ "name": "transactions_from_account_id_accounts_id_fk",
1137
+ "tableFrom": "transactions",
1138
+ "tableTo": "accounts",
1139
+ "columnsFrom": [
1140
+ "from_account_id"
1141
+ ],
1142
+ "columnsTo": [
1143
+ "id"
1144
+ ],
1145
+ "onDelete": "no action",
1146
+ "onUpdate": "no action"
1147
+ },
1148
+ "transactions_to_account_id_accounts_id_fk": {
1149
+ "name": "transactions_to_account_id_accounts_id_fk",
1150
+ "tableFrom": "transactions",
1151
+ "tableTo": "accounts",
1152
+ "columnsFrom": [
1153
+ "to_account_id"
1154
+ ],
1155
+ "columnsTo": [
1156
+ "id"
1157
+ ],
1158
+ "onDelete": "no action",
1159
+ "onUpdate": "no action"
1160
+ },
1161
+ "transactions_credit_card_id_credit_cards_id_fk": {
1162
+ "name": "transactions_credit_card_id_credit_cards_id_fk",
1163
+ "tableFrom": "transactions",
1164
+ "tableTo": "credit_cards",
1165
+ "columnsFrom": [
1166
+ "credit_card_id"
1167
+ ],
1168
+ "columnsTo": [
1169
+ "id"
1170
+ ],
1171
+ "onDelete": "no action",
1172
+ "onUpdate": "no action"
1173
+ },
1174
+ "transactions_category_id_categories_id_fk": {
1175
+ "name": "transactions_category_id_categories_id_fk",
1176
+ "tableFrom": "transactions",
1177
+ "tableTo": "categories",
1178
+ "columnsFrom": [
1179
+ "category_id"
1180
+ ],
1181
+ "columnsTo": [
1182
+ "id"
1183
+ ],
1184
+ "onDelete": "no action",
1185
+ "onUpdate": "no action"
1186
+ },
1187
+ "transactions_subcategory_id_categories_id_fk": {
1188
+ "name": "transactions_subcategory_id_categories_id_fk",
1189
+ "tableFrom": "transactions",
1190
+ "tableTo": "categories",
1191
+ "columnsFrom": [
1192
+ "subcategory_id"
1193
+ ],
1194
+ "columnsTo": [
1195
+ "id"
1196
+ ],
1197
+ "onDelete": "no action",
1198
+ "onUpdate": "no action"
1199
+ },
1200
+ "transactions_merchant_key_merchants_key_fk": {
1201
+ "name": "transactions_merchant_key_merchants_key_fk",
1202
+ "tableFrom": "transactions",
1203
+ "tableTo": "merchants",
1204
+ "columnsFrom": [
1205
+ "merchant_key"
1206
+ ],
1207
+ "columnsTo": [
1208
+ "key"
1209
+ ],
1210
+ "onDelete": "no action",
1211
+ "onUpdate": "no action"
1212
+ },
1213
+ "transactions_bill_id_bills_id_fk": {
1214
+ "name": "transactions_bill_id_bills_id_fk",
1215
+ "tableFrom": "transactions",
1216
+ "tableTo": "bills",
1217
+ "columnsFrom": [
1218
+ "bill_id"
1219
+ ],
1220
+ "columnsTo": [
1221
+ "id"
1222
+ ],
1223
+ "onDelete": "no action",
1224
+ "onUpdate": "no action"
1225
+ }
1226
+ },
1227
+ "compositePrimaryKeys": {},
1228
+ "uniqueConstraints": {},
1229
+ "checkConstraints": {
1230
+ "subcategory_requires_category": {
1231
+ "name": "subcategory_requires_category",
1232
+ "value": "\"transactions\".\"subcategory_id\" IS NULL OR \"transactions\".\"category_id\" IS NOT NULL"
1233
+ }
1234
+ }
1235
+ }
1236
+ },
1237
+ "views": {},
1238
+ "enums": {},
1239
+ "_meta": {
1240
+ "schemas": {},
1241
+ "tables": {},
1242
+ "columns": {}
1243
+ },
1244
+ "internal": {
1245
+ "indexes": {}
1246
+ }
1247
+ }