feat(shell,api,keys): firefly v1 shell over the api with cookie auth, period, palette and keymap

This commit is contained in:
hh committed 2026-10-16 02:21:45 +00:00
1 parent ae4de7911b
commit c74dac3e00
37 files changed
+58163 -79

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import { defineParams } from "@sveltejs/kit/params";
const ISO_DATE = /^\d{4}-\d{2}-\d{2}$/;
const ID = /^\d+$/;
const ACCOUNT_TYPES = new Set(["asset", "expense", "revenue", "liabilities"]);
const TRANSACTION_TYPES = new Set([
"withdrawal",
"deposit",
"transfers",
"transfer",
"all",
]);
export const params = defineParams({
accounttype: (value) => (ACCOUNT_TYPES.has(value) ? value : undefined),
date: (value) => (ISO_DATE.test(value) ? value : undefined),
id: (value) => (ID.test(value) ? value : undefined),
txtype: (value) => (TRANSACTION_TYPES.has(value) ? value : undefined),
});