public
imalexnord
read
Slot
Calendar-first scheduling powered by Cloudflare Workers and Google Calendar.
Languages
Repository composition by tracked source files.
TypeScript
79%
CSS
19%
SQL
2%
HTML
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/user/imalexnord/slot.git
ssh://[email protected]:2222/user/imalexnord/slot.git
Trace
worker/types.ts
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
Author
Date
Commit
Line
Code
1
export interface Env {
2
DB: D1Database;
3
ASSETS?: Fetcher;
4
APP_URL: string;
5
ADMIN_EMAIL: string;
6
GOOGLE_CLIENT_ID: string;
7
GOOGLE_CLIENT_SECRET: string;
8
SESSION_SECRET: string;
9
TOKEN_ENCRYPTION_KEY: string;
10
STRIPE_SECRET_KEY?: string;
11
STRIPE_WEBHOOK_SECRET?: string;
12
}
14
export interface AppSettings {
15
title: string;
16
subtitle: string;
17
timezone: string;
18
bookingWindowDays: number;
19
minimumNoticeMinutes: number;
20
bufferBeforeMinutes: number;
21
bufferAfterMinutes: number;
22
slotIncrementMinutes: number;
23
durations: number[];
24
calendarId: string;
25
busyCalendarIds: string[];
26
defaultMeetingMode: MeetingMode;
27
allowMeetingModes: MeetingMode[];
28
inPersonLocation: string;
29
paymentEnabled: boolean;
30
paymentRatePerMinute: number;
31
paymentFreeDurations: number[];
32
paymentCurrency: string;
33
paymentLabel: string;
34
availability: WeeklyAvailability;
35
}
37
export type MeetingMode = 'google_meet' | 'phone' | 'in_person' | 'decide_later';
39
export interface AvailabilityInterval {
40
start: string;
41
end: string;
42
}
44
export type WeeklyAvailability = Record<string, AvailabilityInterval[]>;
46
export interface BusyRange {
47
start: number;
48
end: number;
49
}
51
export interface RecurringUnavailablePeriod {
52
id: string;
53
weekdays: number[];
54
start: string;
55
end: string;
56
label?: string;
57
}
59
export interface AvailabilityBlock {
60
id: string;
61
date: string;
62
start?: string;
63
end?: string;
64
allDay: boolean;
65
label?: string;
66
}
68
export interface BookingRequest {
69
start: string;
70
duration: number;
71
name: string;
72
email: string;
73
phone?: string;
74
message?: string;
75
meetingMode: MeetingMode;
76
website?: string;
77
}