@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,998 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "b313d797-e4b4-4201-abd4-371ff4303add",
5
+ "prevId": "2d41b5af-0b42-4f7e-a26e-0af1c117989d",
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
+ },
47
+ "indexes": {},
48
+ "foreignKeys": {
49
+ "accounts_currency_currencies_code_fk": {
50
+ "name": "accounts_currency_currencies_code_fk",
51
+ "tableFrom": "accounts",
52
+ "tableTo": "currencies",
53
+ "columnsFrom": [
54
+ "currency"
55
+ ],
56
+ "columnsTo": [
57
+ "code"
58
+ ],
59
+ "onDelete": "no action",
60
+ "onUpdate": "no action"
61
+ }
62
+ },
63
+ "compositePrimaryKeys": {},
64
+ "uniqueConstraints": {},
65
+ "checkConstraints": {}
66
+ },
67
+ "bills": {
68
+ "name": "bills",
69
+ "columns": {
70
+ "id": {
71
+ "name": "id",
72
+ "type": "text",
73
+ "primaryKey": true,
74
+ "notNull": true,
75
+ "autoincrement": false
76
+ },
77
+ "credit_card_id": {
78
+ "name": "credit_card_id",
79
+ "type": "text",
80
+ "primaryKey": false,
81
+ "notNull": true,
82
+ "autoincrement": false
83
+ },
84
+ "month": {
85
+ "name": "month",
86
+ "type": "integer",
87
+ "primaryKey": false,
88
+ "notNull": true,
89
+ "autoincrement": false
90
+ },
91
+ "year": {
92
+ "name": "year",
93
+ "type": "integer",
94
+ "primaryKey": false,
95
+ "notNull": true,
96
+ "autoincrement": false
97
+ },
98
+ "close_date": {
99
+ "name": "close_date",
100
+ "type": "text",
101
+ "primaryKey": false,
102
+ "notNull": true,
103
+ "autoincrement": false
104
+ },
105
+ "due_date": {
106
+ "name": "due_date",
107
+ "type": "text",
108
+ "primaryKey": false,
109
+ "notNull": true,
110
+ "autoincrement": false
111
+ },
112
+ "status": {
113
+ "name": "status",
114
+ "type": "text",
115
+ "primaryKey": false,
116
+ "notNull": true,
117
+ "autoincrement": false
118
+ }
119
+ },
120
+ "indexes": {
121
+ "bills_card_month_year": {
122
+ "name": "bills_card_month_year",
123
+ "columns": [
124
+ "credit_card_id",
125
+ "month",
126
+ "year"
127
+ ],
128
+ "isUnique": true
129
+ }
130
+ },
131
+ "foreignKeys": {
132
+ "bills_credit_card_id_credit_cards_id_fk": {
133
+ "name": "bills_credit_card_id_credit_cards_id_fk",
134
+ "tableFrom": "bills",
135
+ "tableTo": "credit_cards",
136
+ "columnsFrom": [
137
+ "credit_card_id"
138
+ ],
139
+ "columnsTo": [
140
+ "id"
141
+ ],
142
+ "onDelete": "no action",
143
+ "onUpdate": "no action"
144
+ }
145
+ },
146
+ "compositePrimaryKeys": {},
147
+ "uniqueConstraints": {},
148
+ "checkConstraints": {}
149
+ },
150
+ "categories": {
151
+ "name": "categories",
152
+ "columns": {
153
+ "id": {
154
+ "name": "id",
155
+ "type": "text",
156
+ "primaryKey": true,
157
+ "notNull": true,
158
+ "autoincrement": false
159
+ },
160
+ "name": {
161
+ "name": "name",
162
+ "type": "text",
163
+ "primaryKey": false,
164
+ "notNull": true,
165
+ "autoincrement": false
166
+ },
167
+ "kind": {
168
+ "name": "kind",
169
+ "type": "text",
170
+ "primaryKey": false,
171
+ "notNull": true,
172
+ "autoincrement": false
173
+ },
174
+ "parent_id": {
175
+ "name": "parent_id",
176
+ "type": "text",
177
+ "primaryKey": false,
178
+ "notNull": false,
179
+ "autoincrement": false
180
+ },
181
+ "names": {
182
+ "name": "names",
183
+ "type": "text",
184
+ "primaryKey": false,
185
+ "notNull": false,
186
+ "autoincrement": false
187
+ }
188
+ },
189
+ "indexes": {},
190
+ "foreignKeys": {
191
+ "categories_parent_id_categories_id_fk": {
192
+ "name": "categories_parent_id_categories_id_fk",
193
+ "tableFrom": "categories",
194
+ "tableTo": "categories",
195
+ "columnsFrom": [
196
+ "parent_id"
197
+ ],
198
+ "columnsTo": [
199
+ "id"
200
+ ],
201
+ "onDelete": "no action",
202
+ "onUpdate": "no action"
203
+ }
204
+ },
205
+ "compositePrimaryKeys": {},
206
+ "uniqueConstraints": {},
207
+ "checkConstraints": {}
208
+ },
209
+ "credit_cards": {
210
+ "name": "credit_cards",
211
+ "columns": {
212
+ "id": {
213
+ "name": "id",
214
+ "type": "text",
215
+ "primaryKey": true,
216
+ "notNull": true,
217
+ "autoincrement": false
218
+ },
219
+ "name": {
220
+ "name": "name",
221
+ "type": "text",
222
+ "primaryKey": false,
223
+ "notNull": true,
224
+ "autoincrement": false
225
+ },
226
+ "closing_day": {
227
+ "name": "closing_day",
228
+ "type": "integer",
229
+ "primaryKey": false,
230
+ "notNull": true,
231
+ "autoincrement": false
232
+ },
233
+ "due_day": {
234
+ "name": "due_day",
235
+ "type": "integer",
236
+ "primaryKey": false,
237
+ "notNull": true,
238
+ "autoincrement": false
239
+ },
240
+ "limit_amount": {
241
+ "name": "limit_amount",
242
+ "type": "real",
243
+ "primaryKey": false,
244
+ "notNull": false,
245
+ "autoincrement": false
246
+ },
247
+ "currency": {
248
+ "name": "currency",
249
+ "type": "text",
250
+ "primaryKey": false,
251
+ "notNull": true,
252
+ "autoincrement": false
253
+ },
254
+ "account_id": {
255
+ "name": "account_id",
256
+ "type": "text",
257
+ "primaryKey": false,
258
+ "notNull": true,
259
+ "autoincrement": false
260
+ },
261
+ "payment_account_id": {
262
+ "name": "payment_account_id",
263
+ "type": "text",
264
+ "primaryKey": false,
265
+ "notNull": false,
266
+ "autoincrement": false
267
+ }
268
+ },
269
+ "indexes": {},
270
+ "foreignKeys": {
271
+ "credit_cards_currency_currencies_code_fk": {
272
+ "name": "credit_cards_currency_currencies_code_fk",
273
+ "tableFrom": "credit_cards",
274
+ "tableTo": "currencies",
275
+ "columnsFrom": [
276
+ "currency"
277
+ ],
278
+ "columnsTo": [
279
+ "code"
280
+ ],
281
+ "onDelete": "no action",
282
+ "onUpdate": "no action"
283
+ },
284
+ "credit_cards_account_id_accounts_id_fk": {
285
+ "name": "credit_cards_account_id_accounts_id_fk",
286
+ "tableFrom": "credit_cards",
287
+ "tableTo": "accounts",
288
+ "columnsFrom": [
289
+ "account_id"
290
+ ],
291
+ "columnsTo": [
292
+ "id"
293
+ ],
294
+ "onDelete": "no action",
295
+ "onUpdate": "no action"
296
+ },
297
+ "credit_cards_payment_account_id_accounts_id_fk": {
298
+ "name": "credit_cards_payment_account_id_accounts_id_fk",
299
+ "tableFrom": "credit_cards",
300
+ "tableTo": "accounts",
301
+ "columnsFrom": [
302
+ "payment_account_id"
303
+ ],
304
+ "columnsTo": [
305
+ "id"
306
+ ],
307
+ "onDelete": "no action",
308
+ "onUpdate": "no action"
309
+ }
310
+ },
311
+ "compositePrimaryKeys": {},
312
+ "uniqueConstraints": {},
313
+ "checkConstraints": {}
314
+ },
315
+ "currencies": {
316
+ "name": "currencies",
317
+ "columns": {
318
+ "code": {
319
+ "name": "code",
320
+ "type": "text",
321
+ "primaryKey": true,
322
+ "notNull": true,
323
+ "autoincrement": false
324
+ },
325
+ "symbol": {
326
+ "name": "symbol",
327
+ "type": "text",
328
+ "primaryKey": false,
329
+ "notNull": true,
330
+ "autoincrement": false
331
+ },
332
+ "name": {
333
+ "name": "name",
334
+ "type": "text",
335
+ "primaryKey": false,
336
+ "notNull": true,
337
+ "autoincrement": false
338
+ }
339
+ },
340
+ "indexes": {},
341
+ "foreignKeys": {},
342
+ "compositePrimaryKeys": {},
343
+ "uniqueConstraints": {},
344
+ "checkConstraints": {}
345
+ },
346
+ "merchant_category": {
347
+ "name": "merchant_category",
348
+ "columns": {
349
+ "merchant_key": {
350
+ "name": "merchant_key",
351
+ "type": "text",
352
+ "primaryKey": false,
353
+ "notNull": true,
354
+ "autoincrement": false
355
+ },
356
+ "category_id": {
357
+ "name": "category_id",
358
+ "type": "text",
359
+ "primaryKey": false,
360
+ "notNull": true,
361
+ "autoincrement": false
362
+ },
363
+ "weight": {
364
+ "name": "weight",
365
+ "type": "real",
366
+ "primaryKey": false,
367
+ "notNull": true,
368
+ "autoincrement": false,
369
+ "default": 1
370
+ },
371
+ "origin": {
372
+ "name": "origin",
373
+ "type": "text",
374
+ "primaryKey": false,
375
+ "notNull": true,
376
+ "autoincrement": false
377
+ },
378
+ "last_seen": {
379
+ "name": "last_seen",
380
+ "type": "integer",
381
+ "primaryKey": false,
382
+ "notNull": false,
383
+ "autoincrement": false
384
+ }
385
+ },
386
+ "indexes": {},
387
+ "foreignKeys": {
388
+ "merchant_category_merchant_key_merchants_key_fk": {
389
+ "name": "merchant_category_merchant_key_merchants_key_fk",
390
+ "tableFrom": "merchant_category",
391
+ "tableTo": "merchants",
392
+ "columnsFrom": [
393
+ "merchant_key"
394
+ ],
395
+ "columnsTo": [
396
+ "key"
397
+ ],
398
+ "onDelete": "no action",
399
+ "onUpdate": "no action"
400
+ },
401
+ "merchant_category_category_id_categories_id_fk": {
402
+ "name": "merchant_category_category_id_categories_id_fk",
403
+ "tableFrom": "merchant_category",
404
+ "tableTo": "categories",
405
+ "columnsFrom": [
406
+ "category_id"
407
+ ],
408
+ "columnsTo": [
409
+ "id"
410
+ ],
411
+ "onDelete": "no action",
412
+ "onUpdate": "no action"
413
+ }
414
+ },
415
+ "compositePrimaryKeys": {
416
+ "merchant_category_merchant_key_category_id_pk": {
417
+ "columns": [
418
+ "merchant_key",
419
+ "category_id"
420
+ ],
421
+ "name": "merchant_category_merchant_key_category_id_pk"
422
+ }
423
+ },
424
+ "uniqueConstraints": {},
425
+ "checkConstraints": {}
426
+ },
427
+ "merchants": {
428
+ "name": "merchants",
429
+ "columns": {
430
+ "key": {
431
+ "name": "key",
432
+ "type": "text",
433
+ "primaryKey": true,
434
+ "notNull": true,
435
+ "autoincrement": false
436
+ }
437
+ },
438
+ "indexes": {},
439
+ "foreignKeys": {},
440
+ "compositePrimaryKeys": {},
441
+ "uniqueConstraints": {},
442
+ "checkConstraints": {}
443
+ },
444
+ "recurring_rules": {
445
+ "name": "recurring_rules",
446
+ "columns": {
447
+ "id": {
448
+ "name": "id",
449
+ "type": "text",
450
+ "primaryKey": true,
451
+ "notNull": true,
452
+ "autoincrement": false
453
+ },
454
+ "description": {
455
+ "name": "description",
456
+ "type": "text",
457
+ "primaryKey": false,
458
+ "notNull": true,
459
+ "autoincrement": false
460
+ },
461
+ "amount": {
462
+ "name": "amount",
463
+ "type": "real",
464
+ "primaryKey": false,
465
+ "notNull": true,
466
+ "autoincrement": false
467
+ },
468
+ "type": {
469
+ "name": "type",
470
+ "type": "text",
471
+ "primaryKey": false,
472
+ "notNull": true,
473
+ "autoincrement": false
474
+ },
475
+ "period": {
476
+ "name": "period",
477
+ "type": "text",
478
+ "primaryKey": false,
479
+ "notNull": true,
480
+ "autoincrement": false
481
+ },
482
+ "next_due": {
483
+ "name": "next_due",
484
+ "type": "text",
485
+ "primaryKey": false,
486
+ "notNull": true,
487
+ "autoincrement": false
488
+ },
489
+ "currency": {
490
+ "name": "currency",
491
+ "type": "text",
492
+ "primaryKey": false,
493
+ "notNull": true,
494
+ "autoincrement": false
495
+ },
496
+ "account_id": {
497
+ "name": "account_id",
498
+ "type": "text",
499
+ "primaryKey": false,
500
+ "notNull": false,
501
+ "autoincrement": false
502
+ },
503
+ "category_id": {
504
+ "name": "category_id",
505
+ "type": "text",
506
+ "primaryKey": false,
507
+ "notNull": false,
508
+ "autoincrement": false
509
+ }
510
+ },
511
+ "indexes": {},
512
+ "foreignKeys": {
513
+ "recurring_rules_currency_currencies_code_fk": {
514
+ "name": "recurring_rules_currency_currencies_code_fk",
515
+ "tableFrom": "recurring_rules",
516
+ "tableTo": "currencies",
517
+ "columnsFrom": [
518
+ "currency"
519
+ ],
520
+ "columnsTo": [
521
+ "code"
522
+ ],
523
+ "onDelete": "no action",
524
+ "onUpdate": "no action"
525
+ },
526
+ "recurring_rules_account_id_accounts_id_fk": {
527
+ "name": "recurring_rules_account_id_accounts_id_fk",
528
+ "tableFrom": "recurring_rules",
529
+ "tableTo": "accounts",
530
+ "columnsFrom": [
531
+ "account_id"
532
+ ],
533
+ "columnsTo": [
534
+ "id"
535
+ ],
536
+ "onDelete": "no action",
537
+ "onUpdate": "no action"
538
+ },
539
+ "recurring_rules_category_id_categories_id_fk": {
540
+ "name": "recurring_rules_category_id_categories_id_fk",
541
+ "tableFrom": "recurring_rules",
542
+ "tableTo": "categories",
543
+ "columnsFrom": [
544
+ "category_id"
545
+ ],
546
+ "columnsTo": [
547
+ "id"
548
+ ],
549
+ "onDelete": "no action",
550
+ "onUpdate": "no action"
551
+ }
552
+ },
553
+ "compositePrimaryKeys": {},
554
+ "uniqueConstraints": {},
555
+ "checkConstraints": {}
556
+ },
557
+ "settings": {
558
+ "name": "settings",
559
+ "columns": {
560
+ "id": {
561
+ "name": "id",
562
+ "type": "text",
563
+ "primaryKey": true,
564
+ "notNull": true,
565
+ "autoincrement": false,
566
+ "default": "'singleton'"
567
+ },
568
+ "locale": {
569
+ "name": "locale",
570
+ "type": "text",
571
+ "primaryKey": false,
572
+ "notNull": true,
573
+ "autoincrement": false,
574
+ "default": "'en'"
575
+ },
576
+ "locale_source": {
577
+ "name": "locale_source",
578
+ "type": "text",
579
+ "primaryKey": false,
580
+ "notNull": true,
581
+ "autoincrement": false,
582
+ "default": "'default'"
583
+ }
584
+ },
585
+ "indexes": {},
586
+ "foreignKeys": {},
587
+ "compositePrimaryKeys": {},
588
+ "uniqueConstraints": {},
589
+ "checkConstraints": {}
590
+ },
591
+ "tags": {
592
+ "name": "tags",
593
+ "columns": {
594
+ "id": {
595
+ "name": "id",
596
+ "type": "text",
597
+ "primaryKey": true,
598
+ "notNull": true,
599
+ "autoincrement": false
600
+ },
601
+ "name": {
602
+ "name": "name",
603
+ "type": "text",
604
+ "primaryKey": false,
605
+ "notNull": true,
606
+ "autoincrement": false
607
+ }
608
+ },
609
+ "indexes": {
610
+ "tags_name_unique": {
611
+ "name": "tags_name_unique",
612
+ "columns": [
613
+ "name"
614
+ ],
615
+ "isUnique": true
616
+ }
617
+ },
618
+ "foreignKeys": {},
619
+ "compositePrimaryKeys": {},
620
+ "uniqueConstraints": {},
621
+ "checkConstraints": {}
622
+ },
623
+ "transaction_tags": {
624
+ "name": "transaction_tags",
625
+ "columns": {
626
+ "transaction_id": {
627
+ "name": "transaction_id",
628
+ "type": "text",
629
+ "primaryKey": false,
630
+ "notNull": true,
631
+ "autoincrement": false
632
+ },
633
+ "tag_id": {
634
+ "name": "tag_id",
635
+ "type": "text",
636
+ "primaryKey": false,
637
+ "notNull": true,
638
+ "autoincrement": false
639
+ }
640
+ },
641
+ "indexes": {},
642
+ "foreignKeys": {
643
+ "transaction_tags_transaction_id_transactions_id_fk": {
644
+ "name": "transaction_tags_transaction_id_transactions_id_fk",
645
+ "tableFrom": "transaction_tags",
646
+ "tableTo": "transactions",
647
+ "columnsFrom": [
648
+ "transaction_id"
649
+ ],
650
+ "columnsTo": [
651
+ "id"
652
+ ],
653
+ "onDelete": "cascade",
654
+ "onUpdate": "no action"
655
+ },
656
+ "transaction_tags_tag_id_tags_id_fk": {
657
+ "name": "transaction_tags_tag_id_tags_id_fk",
658
+ "tableFrom": "transaction_tags",
659
+ "tableTo": "tags",
660
+ "columnsFrom": [
661
+ "tag_id"
662
+ ],
663
+ "columnsTo": [
664
+ "id"
665
+ ],
666
+ "onDelete": "cascade",
667
+ "onUpdate": "no action"
668
+ }
669
+ },
670
+ "compositePrimaryKeys": {
671
+ "transaction_tags_transaction_id_tag_id_pk": {
672
+ "columns": [
673
+ "transaction_id",
674
+ "tag_id"
675
+ ],
676
+ "name": "transaction_tags_transaction_id_tag_id_pk"
677
+ }
678
+ },
679
+ "uniqueConstraints": {},
680
+ "checkConstraints": {}
681
+ },
682
+ "transactions": {
683
+ "name": "transactions",
684
+ "columns": {
685
+ "id": {
686
+ "name": "id",
687
+ "type": "text",
688
+ "primaryKey": true,
689
+ "notNull": true,
690
+ "autoincrement": false
691
+ },
692
+ "description": {
693
+ "name": "description",
694
+ "type": "text",
695
+ "primaryKey": false,
696
+ "notNull": true,
697
+ "autoincrement": false
698
+ },
699
+ "amount": {
700
+ "name": "amount",
701
+ "type": "real",
702
+ "primaryKey": false,
703
+ "notNull": true,
704
+ "autoincrement": false
705
+ },
706
+ "type": {
707
+ "name": "type",
708
+ "type": "text",
709
+ "primaryKey": false,
710
+ "notNull": true,
711
+ "autoincrement": false
712
+ },
713
+ "status": {
714
+ "name": "status",
715
+ "type": "text",
716
+ "primaryKey": false,
717
+ "notNull": true,
718
+ "autoincrement": false,
719
+ "default": "'effective'"
720
+ },
721
+ "date": {
722
+ "name": "date",
723
+ "type": "text",
724
+ "primaryKey": false,
725
+ "notNull": true,
726
+ "autoincrement": false
727
+ },
728
+ "currency": {
729
+ "name": "currency",
730
+ "type": "text",
731
+ "primaryKey": false,
732
+ "notNull": true,
733
+ "autoincrement": false
734
+ },
735
+ "source": {
736
+ "name": "source",
737
+ "type": "text",
738
+ "primaryKey": false,
739
+ "notNull": true,
740
+ "autoincrement": false
741
+ },
742
+ "idempotency_key": {
743
+ "name": "idempotency_key",
744
+ "type": "text",
745
+ "primaryKey": false,
746
+ "notNull": true,
747
+ "autoincrement": false
748
+ },
749
+ "classification_method": {
750
+ "name": "classification_method",
751
+ "type": "text",
752
+ "primaryKey": false,
753
+ "notNull": true,
754
+ "autoincrement": false
755
+ },
756
+ "confidence": {
757
+ "name": "confidence",
758
+ "type": "real",
759
+ "primaryKey": false,
760
+ "notNull": true,
761
+ "autoincrement": false
762
+ },
763
+ "raw_input": {
764
+ "name": "raw_input",
765
+ "type": "text",
766
+ "primaryKey": false,
767
+ "notNull": false,
768
+ "autoincrement": false
769
+ },
770
+ "from_account_id": {
771
+ "name": "from_account_id",
772
+ "type": "text",
773
+ "primaryKey": false,
774
+ "notNull": false,
775
+ "autoincrement": false
776
+ },
777
+ "to_account_id": {
778
+ "name": "to_account_id",
779
+ "type": "text",
780
+ "primaryKey": false,
781
+ "notNull": false,
782
+ "autoincrement": false
783
+ },
784
+ "credit_card_id": {
785
+ "name": "credit_card_id",
786
+ "type": "text",
787
+ "primaryKey": false,
788
+ "notNull": false,
789
+ "autoincrement": false
790
+ },
791
+ "category_id": {
792
+ "name": "category_id",
793
+ "type": "text",
794
+ "primaryKey": false,
795
+ "notNull": false,
796
+ "autoincrement": false
797
+ },
798
+ "subcategory_id": {
799
+ "name": "subcategory_id",
800
+ "type": "text",
801
+ "primaryKey": false,
802
+ "notNull": false,
803
+ "autoincrement": false
804
+ },
805
+ "merchant_key": {
806
+ "name": "merchant_key",
807
+ "type": "text",
808
+ "primaryKey": false,
809
+ "notNull": false,
810
+ "autoincrement": false
811
+ },
812
+ "note": {
813
+ "name": "note",
814
+ "type": "text",
815
+ "primaryKey": false,
816
+ "notNull": false,
817
+ "autoincrement": false
818
+ },
819
+ "bill_id": {
820
+ "name": "bill_id",
821
+ "type": "text",
822
+ "primaryKey": false,
823
+ "notNull": false,
824
+ "autoincrement": false
825
+ }
826
+ },
827
+ "indexes": {
828
+ "transactions_idempotency_key_unique": {
829
+ "name": "transactions_idempotency_key_unique",
830
+ "columns": [
831
+ "idempotency_key"
832
+ ],
833
+ "isUnique": true
834
+ },
835
+ "idx_transactions_date": {
836
+ "name": "idx_transactions_date",
837
+ "columns": [
838
+ "date"
839
+ ],
840
+ "isUnique": false
841
+ },
842
+ "idx_transactions_from_account": {
843
+ "name": "idx_transactions_from_account",
844
+ "columns": [
845
+ "from_account_id"
846
+ ],
847
+ "isUnique": false
848
+ },
849
+ "idx_transactions_to_account": {
850
+ "name": "idx_transactions_to_account",
851
+ "columns": [
852
+ "to_account_id"
853
+ ],
854
+ "isUnique": false
855
+ },
856
+ "idx_transactions_category": {
857
+ "name": "idx_transactions_category",
858
+ "columns": [
859
+ "category_id"
860
+ ],
861
+ "isUnique": false
862
+ },
863
+ "idx_transactions_status_date": {
864
+ "name": "idx_transactions_status_date",
865
+ "columns": [
866
+ "status",
867
+ "date"
868
+ ],
869
+ "isUnique": false
870
+ }
871
+ },
872
+ "foreignKeys": {
873
+ "transactions_currency_currencies_code_fk": {
874
+ "name": "transactions_currency_currencies_code_fk",
875
+ "tableFrom": "transactions",
876
+ "tableTo": "currencies",
877
+ "columnsFrom": [
878
+ "currency"
879
+ ],
880
+ "columnsTo": [
881
+ "code"
882
+ ],
883
+ "onDelete": "no action",
884
+ "onUpdate": "no action"
885
+ },
886
+ "transactions_from_account_id_accounts_id_fk": {
887
+ "name": "transactions_from_account_id_accounts_id_fk",
888
+ "tableFrom": "transactions",
889
+ "tableTo": "accounts",
890
+ "columnsFrom": [
891
+ "from_account_id"
892
+ ],
893
+ "columnsTo": [
894
+ "id"
895
+ ],
896
+ "onDelete": "no action",
897
+ "onUpdate": "no action"
898
+ },
899
+ "transactions_to_account_id_accounts_id_fk": {
900
+ "name": "transactions_to_account_id_accounts_id_fk",
901
+ "tableFrom": "transactions",
902
+ "tableTo": "accounts",
903
+ "columnsFrom": [
904
+ "to_account_id"
905
+ ],
906
+ "columnsTo": [
907
+ "id"
908
+ ],
909
+ "onDelete": "no action",
910
+ "onUpdate": "no action"
911
+ },
912
+ "transactions_credit_card_id_credit_cards_id_fk": {
913
+ "name": "transactions_credit_card_id_credit_cards_id_fk",
914
+ "tableFrom": "transactions",
915
+ "tableTo": "credit_cards",
916
+ "columnsFrom": [
917
+ "credit_card_id"
918
+ ],
919
+ "columnsTo": [
920
+ "id"
921
+ ],
922
+ "onDelete": "no action",
923
+ "onUpdate": "no action"
924
+ },
925
+ "transactions_category_id_categories_id_fk": {
926
+ "name": "transactions_category_id_categories_id_fk",
927
+ "tableFrom": "transactions",
928
+ "tableTo": "categories",
929
+ "columnsFrom": [
930
+ "category_id"
931
+ ],
932
+ "columnsTo": [
933
+ "id"
934
+ ],
935
+ "onDelete": "no action",
936
+ "onUpdate": "no action"
937
+ },
938
+ "transactions_subcategory_id_categories_id_fk": {
939
+ "name": "transactions_subcategory_id_categories_id_fk",
940
+ "tableFrom": "transactions",
941
+ "tableTo": "categories",
942
+ "columnsFrom": [
943
+ "subcategory_id"
944
+ ],
945
+ "columnsTo": [
946
+ "id"
947
+ ],
948
+ "onDelete": "no action",
949
+ "onUpdate": "no action"
950
+ },
951
+ "transactions_merchant_key_merchants_key_fk": {
952
+ "name": "transactions_merchant_key_merchants_key_fk",
953
+ "tableFrom": "transactions",
954
+ "tableTo": "merchants",
955
+ "columnsFrom": [
956
+ "merchant_key"
957
+ ],
958
+ "columnsTo": [
959
+ "key"
960
+ ],
961
+ "onDelete": "no action",
962
+ "onUpdate": "no action"
963
+ },
964
+ "transactions_bill_id_bills_id_fk": {
965
+ "name": "transactions_bill_id_bills_id_fk",
966
+ "tableFrom": "transactions",
967
+ "tableTo": "bills",
968
+ "columnsFrom": [
969
+ "bill_id"
970
+ ],
971
+ "columnsTo": [
972
+ "id"
973
+ ],
974
+ "onDelete": "no action",
975
+ "onUpdate": "no action"
976
+ }
977
+ },
978
+ "compositePrimaryKeys": {},
979
+ "uniqueConstraints": {},
980
+ "checkConstraints": {
981
+ "subcategory_requires_category": {
982
+ "name": "subcategory_requires_category",
983
+ "value": "\"transactions\".\"subcategory_id\" IS NULL OR \"transactions\".\"category_id\" IS NOT NULL"
984
+ }
985
+ }
986
+ }
987
+ },
988
+ "views": {},
989
+ "enums": {},
990
+ "_meta": {
991
+ "schemas": {},
992
+ "tables": {},
993
+ "columns": {}
994
+ },
995
+ "internal": {
996
+ "indexes": {}
997
+ }
998
+ }