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:
57
frontend/node_modules/date-fns/parse/_lib/Setter.js
generated
vendored
Normal file
57
frontend/node_modules/date-fns/parse/_lib/Setter.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
import { constructFrom } from "../../constructFrom.js";
|
||||
import { transpose } from "../../transpose.js";
|
||||
|
||||
const TIMEZONE_UNIT_PRIORITY = 10;
|
||||
|
||||
export class Setter {
|
||||
subPriority = 0;
|
||||
|
||||
validate(_utcDate, _options) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export class ValueSetter extends Setter {
|
||||
constructor(
|
||||
value,
|
||||
|
||||
validateValue,
|
||||
|
||||
setValue,
|
||||
|
||||
priority,
|
||||
subPriority,
|
||||
) {
|
||||
super();
|
||||
this.value = value;
|
||||
this.validateValue = validateValue;
|
||||
this.setValue = setValue;
|
||||
this.priority = priority;
|
||||
if (subPriority) {
|
||||
this.subPriority = subPriority;
|
||||
}
|
||||
}
|
||||
|
||||
validate(date, options) {
|
||||
return this.validateValue(date, this.value, options);
|
||||
}
|
||||
|
||||
set(date, flags, options) {
|
||||
return this.setValue(date, flags, this.value, options);
|
||||
}
|
||||
}
|
||||
|
||||
export class DateTimezoneSetter extends Setter {
|
||||
priority = TIMEZONE_UNIT_PRIORITY;
|
||||
subPriority = -1;
|
||||
|
||||
constructor(context, reference) {
|
||||
super();
|
||||
this.context = context || ((date) => constructFrom(reference, date));
|
||||
}
|
||||
|
||||
set(date, flags) {
|
||||
if (flags.timestampIsSet) return date;
|
||||
return constructFrom(date, transpose(date, this.context));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user