Add OpenAPI docs, frontend, migrations, and API updates

- OpenAPI: add missing endpoints (add-from-url, subscriptions, public availability)
- OpenAPI: CalendarSubscription schema, Subscriptions tag
- Frontend app
- Migrations: count_for_availability, subscriptions_sync, user_preferences, calendar_settings
- Config, rate limit, auth, calendar, booking, ICS, availability, user service updates

Made-with: Cursor
This commit is contained in:
Michilis
2026-03-02 14:07:55 +00:00
parent 2cb9d72a7f
commit 75105b8b46
8120 changed files with 1486881 additions and 314 deletions

View File

@@ -0,0 +1,39 @@
import { Parser } from "../Parser.js";
export class EraParser extends Parser {
priority = 140;
parse(dateString, token, match) {
switch (token) {
// AD, BC
case "G":
case "GG":
case "GGG":
return (
match.era(dateString, { width: "abbreviated" }) ||
match.era(dateString, { width: "narrow" })
);
// A, B
case "GGGGG":
return match.era(dateString, { width: "narrow" });
// Anno Domini, Before Christ
case "GGGG":
default:
return (
match.era(dateString, { width: "wide" }) ||
match.era(dateString, { width: "abbreviated" }) ||
match.era(dateString, { width: "narrow" })
);
}
}
set(date, flags, value) {
flags.era = value;
date.setFullYear(value, 0, 1);
date.setHours(0, 0, 0, 0);
return date;
}
incompatibleTokens = ["R", "u", "t", "T"];
}