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/google.ts
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
google.ts
on main
Author
Date
Commit
Line
Code
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 1
import { decryptToken, encryptToken } from './crypto';
import { decryptToken, encryptToken } from './crypto';
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 2
import type { AppSettings, Env, MeetingMode } from './types';
import type { AppSettings, Env, MeetingMode } from './types';
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 3
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 4
const GOOGLE_SCOPES = [
const GOOGLE_SCOPES = [
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 5
'openid',
'openid',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 6
'email',
'email',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 7
'profile',
'profile',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 8
'https://www.googleapis.com/auth/calendar.events',
'https://www.googleapis.com/auth/calendar.events',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 9
'https://www.googleapis.com/auth/calendar.events.freebusy',
'https://www.googleapis.com/auth/calendar.events.freebusy',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 10
];
];
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 11
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 12
interface TokenResponse {
interface TokenResponse {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 13
access_token: string;
access_token: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 14
expires_in: number;
expires_in: number;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 15
refresh_token?: string;
refresh_token?: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 16
scope?: string;
scope?: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 17
token_type: string;
token_type: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 18
error?: string;
error?: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 19
error_description?: string;
error_description?: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 20
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 21
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 22
interface GoogleUser {
interface GoogleUser {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 23
email: string;
email: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 24
name?: string;
name?: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 25
picture?: string;
picture?: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 26
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 27
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 28
interface GoogleEventResponse {
interface GoogleEventResponse {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 29
id: string;
id: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 30
htmlLink?: string;
htmlLink?: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 31
hangoutLink?: string;
hangoutLink?: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 32
conferenceData?: {
conferenceData?: {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 33
entryPoints?: Array<{ entryPointType: string; uri: string }>;
entryPoints?: Array<{ entryPointType: string; uri: string }>;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 34
};
};
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 35
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 36
Alex Nord
3 days ago
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 37
export class GoogleCalendarError extends Error {
export class GoogleCalendarError extends Error {
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 38
public readonly publicMessage: string;
public readonly publicMessage: string;
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 39
public readonly status: number;
public readonly status: number;
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 40
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 41
constructor(operation: string, status: number, details: string) {
constructor(operation: string, status: number, details: string) {
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 42
super(`${operation} failed (${status})`);
super(`${operation} failed (${status})`);
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 43
this.name = 'GoogleCalendarError';
this.name = 'GoogleCalendarError';
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 44
this.status = status;
this.status = status;
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 45
this.publicMessage = status === 403
this.publicMessage = status === 403
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 46
? 'Calendar setup needs attention. The owner needs to enable the Google Calendar API, then reconnect Google Calendar.'
? 'Calendar setup needs attention. The owner needs to enable the Google Calendar API, then reconnect Google Calendar.'
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 47
: 'Calendar setup needs attention. The owner needs to reconnect Google Calendar or check the calendar settings.';
: 'Calendar setup needs attention. The owner needs to reconnect Google Calendar or check the calendar settings.';
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 48
console.warn(`${operation} failed (${status}): ${details.slice(0, 1000)}`);
console.warn(`${operation} failed (${status}): ${details.slice(0, 1000)}`);
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 49
}
}
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 50
}
}
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 51
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 52
async function throwGoogleCalendarError(response: Response, operation: string): Promise<never> {
async function throwGoogleCalendarError(response: Response, operation: string): Promise<never> {
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 53
const details = await response.text().catch(() => '');
const details = await response.text().catch(() => '');
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 54
throw new GoogleCalendarError(operation, response.status, details);
throw new GoogleCalendarError(operation, response.status, details);
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 55
}
}
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 56
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 57
function redirectUri(env: Env): string {
function redirectUri(env: Env): string {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 58
return `${env.APP_URL.replace(/\/$/, '')}/auth/google/callback`;
return `${env.APP_URL.replace(/\/$/, '')}/auth/google/callback`;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 59
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 60
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 61
export async function hasGoogleConnection(env: Env): Promise<boolean> {
export async function hasGoogleConnection(env: Env): Promise<boolean> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 62
const row = await env.DB.prepare('SELECT 1 AS ok FROM oauth_tokens WHERE provider = ?1')
const row = await env.DB.prepare('SELECT 1 AS ok FROM oauth_tokens WHERE provider = ?1')
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 63
.bind('google')
.bind('google')
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 64
.first<{ ok: number }>();
.first<{ ok: number }>();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 65
return Boolean(row?.ok);
return Boolean(row?.ok);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 66
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 67
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 68
export async function createGoogleAuthUrl(env: Env, forceConsent = false): Promise<string> {
export async function createGoogleAuthUrl(env: Env, forceConsent = false): Promise<string> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 69
const state = crypto.randomUUID();
const state = crypto.randomUUID();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 70
const expires = Date.now() + 10 * 60_000;
const expires = Date.now() + 10 * 60_000;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 71
await env.DB.prepare('INSERT INTO oauth_states (state, expires_at) VALUES (?1, ?2)')
await env.DB.prepare('INSERT INTO oauth_states (state, expires_at) VALUES (?1, ?2)')
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 72
.bind(state, expires)
.bind(state, expires)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 73
.run();
.run();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 74
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 75
const connected = await hasGoogleConnection(env);
const connected = await hasGoogleConnection(env);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 76
const params = new URLSearchParams({
const params = new URLSearchParams({
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 77
client_id: env.GOOGLE_CLIENT_ID,
client_id: env.GOOGLE_CLIENT_ID,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 78
redirect_uri: redirectUri(env),
redirect_uri: redirectUri(env),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 79
response_type: 'code',
response_type: 'code',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 80
scope: GOOGLE_SCOPES.join(' '),
scope: GOOGLE_SCOPES.join(' '),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 81
access_type: 'offline',
access_type: 'offline',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 82
include_granted_scopes: 'true',
include_granted_scopes: 'true',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 83
state,
state,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 84
});
});
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 85
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 86
params.set('prompt', forceConsent || !connected ? 'consent' : 'select_account');
params.set('prompt', forceConsent || !connected ? 'consent' : 'select_account');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 87
if (env.ADMIN_EMAIL) params.set('login_hint', env.ADMIN_EMAIL);
if (env.ADMIN_EMAIL) params.set('login_hint', env.ADMIN_EMAIL);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 88
return `https://accounts.google.com/o/oauth2/v2/auth?${params.toString()}`;
return `https://accounts.google.com/o/oauth2/v2/auth?${params.toString()}`;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 89
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 90
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 91
async function exchangeCode(env: Env, code: string): Promise<TokenResponse> {
async function exchangeCode(env: Env, code: string): Promise<TokenResponse> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 92
const body = new URLSearchParams({
const body = new URLSearchParams({
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 93
code,
code,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 94
client_id: env.GOOGLE_CLIENT_ID,
client_id: env.GOOGLE_CLIENT_ID,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 95
client_secret: env.GOOGLE_CLIENT_SECRET,
client_secret: env.GOOGLE_CLIENT_SECRET,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 96
redirect_uri: redirectUri(env),
redirect_uri: redirectUri(env),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 97
grant_type: 'authorization_code',
grant_type: 'authorization_code',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 98
});
});
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 99
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 100
const response = await fetch('https://oauth2.googleapis.com/token', {
const response = await fetch('https://oauth2.googleapis.com/token', {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 101
method: 'POST',
method: 'POST',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 102
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 103
body,
body,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 104
});
});
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 105
const data = (await response.json()) as TokenResponse;
const data = (await response.json()) as TokenResponse;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 106
if (!response.ok || data.error) {
if (!response.ok || data.error) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 107
throw new Error(data.error_description || data.error || `Google token exchange failed (${response.status})`);
throw new Error(data.error_description || data.error || `Google token exchange failed (${response.status})`);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 108
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 109
return data;
return data;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 110
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 111
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 112
async function fetchGoogleUser(accessToken: string): Promise<GoogleUser> {
async function fetchGoogleUser(accessToken: string): Promise<GoogleUser> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 113
const response = await fetch('https://www.googleapis.com/oauth2/v2/userinfo', {
const response = await fetch('https://www.googleapis.com/oauth2/v2/userinfo', {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 114
headers: { Authorization: `Bearer ${accessToken}` },
headers: { Authorization: `Bearer ${accessToken}` },
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 115
});
});
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 116
if (!response.ok) throw new Error('Could not read Google account identity');
if (!response.ok) throw new Error('Could not read Google account identity');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 117
return (await response.json()) as GoogleUser;
return (await response.json()) as GoogleUser;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 118
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 119
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 120
export async function completeGoogleOAuth(
export async function completeGoogleOAuth(
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 121
env: Env,
env: Env,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 122
state: string,
state: string,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 123
code: string,
code: string,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 124
): Promise<string> {
): Promise<string> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 125
const stateRow = await env.DB.prepare('SELECT expires_at FROM oauth_states WHERE state = ?1')
const stateRow = await env.DB.prepare('SELECT expires_at FROM oauth_states WHERE state = ?1')
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 126
.bind(state)
.bind(state)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 127
.first<{ expires_at: number }>();
.first<{ expires_at: number }>();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 128
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 129
await env.DB.prepare('DELETE FROM oauth_states WHERE state = ?1').bind(state).run();
await env.DB.prepare('DELETE FROM oauth_states WHERE state = ?1').bind(state).run();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 130
if (!stateRow || stateRow.expires_at < Date.now()) throw new Error('OAuth state expired or invalid');
if (!stateRow || stateRow.expires_at < Date.now()) throw new Error('OAuth state expired or invalid');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 131
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 132
const token = await exchangeCode(env, code);
const token = await exchangeCode(env, code);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 133
const user = await fetchGoogleUser(token.access_token);
const user = await fetchGoogleUser(token.access_token);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 134
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 135
if (user.email.toLowerCase() !== env.ADMIN_EMAIL.toLowerCase()) {
if (user.email.toLowerCase() !== env.ADMIN_EMAIL.toLowerCase()) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 136
throw new Error(`This Google account is not the configured admin (${env.ADMIN_EMAIL})`);
throw new Error(`This Google account is not the configured admin (${env.ADMIN_EMAIL})`);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 137
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 138
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 139
if (token.refresh_token) {
if (token.refresh_token) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 140
const encrypted = await encryptToken(env, token.refresh_token);
const encrypted = await encryptToken(env, token.refresh_token);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 141
await env.DB.prepare(`
await env.DB.prepare(`
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 142
INSERT INTO oauth_tokens (provider, refresh_token_enc, account_email, updated_at)
INSERT INTO oauth_tokens (provider, refresh_token_enc, account_email, updated_at)
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 143
VALUES ('google', ?1, ?2, datetime('now'))
VALUES ('google', ?1, ?2, datetime('now'))
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 144
ON CONFLICT(provider) DO UPDATE SET
ON CONFLICT(provider) DO UPDATE SET
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 145
refresh_token_enc = excluded.refresh_token_enc,
refresh_token_enc = excluded.refresh_token_enc,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 146
account_email = excluded.account_email,
account_email = excluded.account_email,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 147
updated_at = excluded.updated_at
updated_at = excluded.updated_at
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 148
`).bind(encrypted, user.email).run();
`).bind(encrypted, user.email).run();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 149
} else {
} else {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 150
const existing = await hasGoogleConnection(env);
const existing = await hasGoogleConnection(env);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 151
if (!existing) {
if (!existing) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 152
throw new Error('Google did not return a refresh token. Revoke app access and connect again.');
throw new Error('Google did not return a refresh token. Revoke app access and connect again.');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 153
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 154
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 155
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 156
return user.email;
return user.email;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 157
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 158
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 159
async function accessToken(env: Env): Promise<string> {
async function accessToken(env: Env): Promise<string> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 160
const row = await env.DB.prepare(
const row = await env.DB.prepare(
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 161
'SELECT refresh_token_enc FROM oauth_tokens WHERE provider = ?1',
'SELECT refresh_token_enc FROM oauth_tokens WHERE provider = ?1',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 162
).bind('google').first<{ refresh_token_enc: string }>();
).bind('google').first<{ refresh_token_enc: string }>();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 163
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 164
if (!row?.refresh_token_enc) throw new Error('Google Calendar is not connected');
if (!row?.refresh_token_enc) throw new Error('Google Calendar is not connected');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 165
const refreshToken = await decryptToken(env, row.refresh_token_enc);
const refreshToken = await decryptToken(env, row.refresh_token_enc);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 166
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 167
const response = await fetch('https://oauth2.googleapis.com/token', {
const response = await fetch('https://oauth2.googleapis.com/token', {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 168
method: 'POST',
method: 'POST',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 169
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 170
body: new URLSearchParams({
body: new URLSearchParams({
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 171
client_id: env.GOOGLE_CLIENT_ID,
client_id: env.GOOGLE_CLIENT_ID,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 172
client_secret: env.GOOGLE_CLIENT_SECRET,
client_secret: env.GOOGLE_CLIENT_SECRET,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 173
refresh_token: refreshToken,
refresh_token: refreshToken,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 174
grant_type: 'refresh_token',
grant_type: 'refresh_token',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 175
}),
}),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 176
});
});
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 177
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 178
const data = (await response.json()) as TokenResponse;
const data = (await response.json()) as TokenResponse;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 179
if (!response.ok || !data.access_token) {
if (!response.ok || !data.access_token) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 180
throw new Error(data.error_description || data.error || 'Google refresh token failed');
throw new Error(data.error_description || data.error || 'Google refresh token failed');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 181
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 182
return data.access_token;
return data.access_token;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 183
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 184
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 185
export async function queryBusy(
export async function queryBusy(
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 186
env: Env,
env: Env,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 187
settings: AppSettings,
settings: AppSettings,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 188
timeMin: string,
timeMin: string,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 189
timeMax: string,
timeMax: string,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 190
): Promise<Array<{ start: string; end: string }>> {
): Promise<Array<{ start: string; end: string }>> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 191
const token = await accessToken(env);
const token = await accessToken(env);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 192
const calendars = settings.busyCalendarIds.length ? settings.busyCalendarIds : [settings.calendarId];
const calendars = settings.busyCalendarIds.length ? settings.busyCalendarIds : [settings.calendarId];
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 193
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 194
const response = await fetch('https://www.googleapis.com/calendar/v3/freeBusy', {
const response = await fetch('https://www.googleapis.com/calendar/v3/freeBusy', {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 195
method: 'POST',
method: 'POST',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 196
headers: {
headers: {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 197
Authorization: `Bearer ${token}`,
Authorization: `Bearer ${token}`,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 198
'Content-Type': 'application/json',
'Content-Type': 'application/json',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 199
},
},
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 200
body: JSON.stringify({
body: JSON.stringify({
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 201
timeMin,
timeMin,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 202
timeMax,
timeMax,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 203
timeZone: settings.timezone,
timeZone: settings.timezone,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 204
items: calendars.map((id) => ({ id })),
items: calendars.map((id) => ({ id })),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 205
}),
}),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 206
});
});
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 207
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 208
if (!response.ok) {
if (!response.ok) {
Alex Nord
3 days ago
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 209
await throwGoogleCalendarError(response, 'Google FreeBusy');
await throwGoogleCalendarError(response, 'Google FreeBusy');
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 210
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 211
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 212
const data = (await response.json()) as {
const data = (await response.json()) as {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 213
calendars?: Record<string, { busy?: Array<{ start: string; end: string }> }>;
calendars?: Record<string, { busy?: Array<{ start: string; end: string }> }>;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 214
};
};
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 215
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 216
return Object.values(data.calendars ?? {}).flatMap((calendar) => calendar.busy ?? []);
return Object.values(data.calendars ?? {}).flatMap((calendar) => calendar.busy ?? []);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 217
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 218
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 219
export async function createCalendarEvent(
export async function createCalendarEvent(
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 220
env: Env,
env: Env,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 221
settings: AppSettings,
settings: AppSettings,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 222
booking: {
booking: {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 223
id: string;
id: string;
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 224
publicBookingId: string;
publicBookingId: string;
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 225
name: string;
name: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 226
email: string;
email: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 227
phone?: string;
phone?: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 228
message?: string;
message?: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 229
start: string;
start: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 230
end: string;
end: string;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 231
meetingMode: MeetingMode;
meetingMode: MeetingMode;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 232
},
},
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 233
): Promise<{ eventId: string; meetUrl: string | null; htmlLink: string | null }> {
): Promise<{ eventId: string; meetUrl: string | null; htmlLink: string | null }> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 234
const token = await accessToken(env);
const token = await accessToken(env);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 235
const params = new URLSearchParams({
const params = new URLSearchParams({
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 236
sendUpdates: 'all',
sendUpdates: 'all',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 237
conferenceDataVersion: '1',
conferenceDataVersion: '1',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 238
});
});
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 239
const calendarId = encodeURIComponent(settings.calendarId || 'primary');
const calendarId = encodeURIComponent(settings.calendarId || 'primary');
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 240
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 241
const descriptionLines = [
const descriptionLines = [
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 242
`Booked through ${env.APP_URL}`,
`Booked through ${env.APP_URL}`,
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 243
`Booking ID: ${booking.publicBookingId}`,
`Booking ID: ${booking.publicBookingId}`,
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 244
booking.phone ? `Phone: ${booking.phone}` : '',
booking.phone ? `Phone: ${booking.phone}` : '',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 245
booking.message ? `Message: ${booking.message}` : '',
booking.message ? `Message: ${booking.message}` : '',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 246
].filter(Boolean);
].filter(Boolean);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 247
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 248
const event: Record<string, unknown> = {
const event: Record<string, unknown> = {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 249
summary: `Meeting with ${booking.name}`,
summary: `Meeting with ${booking.name}`,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 250
description: descriptionLines.join('\n\n'),
description: descriptionLines.join('\n\n'),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 251
start: { dateTime: booking.start, timeZone: settings.timezone },
start: { dateTime: booking.start, timeZone: settings.timezone },
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 252
end: { dateTime: booking.end, timeZone: settings.timezone },
end: { dateTime: booking.end, timeZone: settings.timezone },
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 253
attendees: [{ email: booking.email, displayName: booking.name }],
attendees: [{ email: booking.email, displayName: booking.name }],
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 254
};
};
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 255
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 256
if (booking.meetingMode === 'google_meet') {
if (booking.meetingMode === 'google_meet') {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 257
event.conferenceData = {
event.conferenceData = {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 258
createRequest: {
createRequest: {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 259
requestId: booking.id,
requestId: booking.id,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 260
conferenceSolutionKey: { type: 'hangoutsMeet' },
conferenceSolutionKey: { type: 'hangoutsMeet' },
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 261
},
},
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 262
};
};
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 263
} else if (booking.meetingMode === 'in_person' && settings.inPersonLocation) {
} else if (booking.meetingMode === 'in_person' && settings.inPersonLocation) {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 264
event.location = settings.inPersonLocation;
event.location = settings.inPersonLocation;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 265
} else if (booking.meetingMode === 'phone') {
} else if (booking.meetingMode === 'phone') {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 266
event.location = 'Phone call';
event.location = 'Phone call';
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 267
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 268
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 269
const response = await fetch(
const response = await fetch(
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 270
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events?${params.toString()}`,
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events?${params.toString()}`,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 271
{
{
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 272
method: 'POST',
method: 'POST',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 273
headers: {
headers: {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 274
Authorization: `Bearer ${token}`,
Authorization: `Bearer ${token}`,
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 275
'Content-Type': 'application/json',
'Content-Type': 'application/json',
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 276
},
},
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 277
body: JSON.stringify(event),
body: JSON.stringify(event),
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 278
},
},
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 279
);
);
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 280
Alex Nord
3 days ago
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 281
if (!response.ok) {
if (!response.ok) {
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 282
await throwGoogleCalendarError(response, 'Google event creation');
await throwGoogleCalendarError(response, 'Google event creation');
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 283
}
}
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 284
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 285
const data = (await response.json()) as GoogleEventResponse & { error?: { message?: string } };
const data = (await response.json()) as GoogleEventResponse & { error?: { message?: string } };
Alex Nord
3 days ago
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 286
if (!data.id) {
if (!data.id) {
same change
7bda237
Brand app as Slot and sanitize calendar errors
- Full commit hash
7bda2375c94992d8bd86dc0ea0b320d0f23dfa86- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 287
throw new GoogleCalendarError('Google event creation', 502, data.error?.message ?? 'Missing event id');
throw new GoogleCalendarError('Google event creation', 502, data.error?.message ?? 'Missing event id');
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 288
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 289
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 290
const meetUrl =
const meetUrl =
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 291
data.hangoutLink ??
data.hangoutLink ??
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 292
data.conferenceData?.entryPoints?.find((entry) => entry.entryPointType === 'video')?.uri ??
data.conferenceData?.entryPoints?.find((entry) => entry.entryPointType === 'video')?.uri ??
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 293
null;
null;
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 294
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 295
return { eventId: data.id, meetUrl, htmlLink: data.htmlLink ?? null };
return { eventId: data.id, meetUrl, htmlLink: data.htmlLink ?? null };
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 296
}
}
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 297
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 298
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 299
export async function createCalendarHold(
export async function createCalendarHold(
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 300
env: Env,
env: Env,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 301
settings: AppSettings,
settings: AppSettings,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 302
booking: {
booking: {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 303
id: string;
id: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 304
start: string;
start: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 305
end: string;
end: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 306
meetingMode: MeetingMode;
meetingMode: MeetingMode;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 307
},
},
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 308
): Promise<{ eventId: string; meetUrl: string | null }> {
): Promise<{ eventId: string; meetUrl: string | null }> {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 309
const token = await accessToken(env);
const token = await accessToken(env);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 310
const params = new URLSearchParams({
const params = new URLSearchParams({
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 311
sendUpdates: 'none',
sendUpdates: 'none',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 312
conferenceDataVersion: '1',
conferenceDataVersion: '1',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 313
});
});
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 314
const calendarId = encodeURIComponent(settings.calendarId || 'primary');
const calendarId = encodeURIComponent(settings.calendarId || 'primary');
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 315
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 316
const event: Record<string, unknown> = {
const event: Record<string, unknown> = {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 317
summary: 'Pending booking payment',
summary: 'Pending booking payment',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 318
description: `Temporary hold created by ${env.APP_URL}. No invitation is sent until payment succeeds.`,
description: `Temporary hold created by ${env.APP_URL}. No invitation is sent until payment succeeds.`,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 319
start: { dateTime: booking.start, timeZone: settings.timezone },
start: { dateTime: booking.start, timeZone: settings.timezone },
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 320
end: { dateTime: booking.end, timeZone: settings.timezone },
end: { dateTime: booking.end, timeZone: settings.timezone },
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 321
visibility: 'private',
visibility: 'private',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 322
transparency: 'opaque',
transparency: 'opaque',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 323
};
};
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 324
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 325
if (booking.meetingMode === 'google_meet') {
if (booking.meetingMode === 'google_meet') {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 326
event.conferenceData = {
event.conferenceData = {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 327
createRequest: {
createRequest: {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 328
requestId: `hold-${booking.id}`,
requestId: `hold-${booking.id}`,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 329
conferenceSolutionKey: { type: 'hangoutsMeet' },
conferenceSolutionKey: { type: 'hangoutsMeet' },
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 330
},
},
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 331
};
};
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 332
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 333
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 334
const response = await fetch(
const response = await fetch(
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 335
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events?${params.toString()}`,
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events?${params.toString()}`,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 336
{
{
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 337
method: 'POST',
method: 'POST',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 338
headers: {
headers: {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 339
Authorization: `Bearer ${token}`,
Authorization: `Bearer ${token}`,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 340
'Content-Type': 'application/json',
'Content-Type': 'application/json',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 341
},
},
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 342
body: JSON.stringify(event),
body: JSON.stringify(event),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 343
},
},
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 344
);
);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 345
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 346
if (!response.ok) await throwGoogleCalendarError(response, 'Google payment hold creation');
if (!response.ok) await throwGoogleCalendarError(response, 'Google payment hold creation');
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 347
const data = (await response.json()) as GoogleEventResponse & { error?: { message?: string } };
const data = (await response.json()) as GoogleEventResponse & { error?: { message?: string } };
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 348
if (!data.id) throw new GoogleCalendarError('Google payment hold creation', 502, data.error?.message ?? 'Missing event id');
if (!data.id) throw new GoogleCalendarError('Google payment hold creation', 502, data.error?.message ?? 'Missing event id');
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 349
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 350
const meetUrl = data.hangoutLink
const meetUrl = data.hangoutLink
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 351
?? data.conferenceData?.entryPoints?.find((entry) => entry.entryPointType === 'video')?.uri
?? data.conferenceData?.entryPoints?.find((entry) => entry.entryPointType === 'video')?.uri
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 352
?? null;
?? null;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 353
return { eventId: data.id, meetUrl };
return { eventId: data.id, meetUrl };
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 354
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 355
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 356
export async function confirmCalendarHold(
export async function confirmCalendarHold(
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 357
env: Env,
env: Env,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 358
settings: AppSettings,
settings: AppSettings,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 359
eventId: string,
eventId: string,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 360
booking: {
booking: {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 361
id: string;
id: string;
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 362
publicBookingId: string;
publicBookingId: string;
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 363
name: string;
name: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 364
email: string;
email: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 365
phone?: string;
phone?: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 366
message?: string;
message?: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 367
start: string;
start: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 368
end: string;
end: string;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 369
meetingMode: MeetingMode;
meetingMode: MeetingMode;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 370
},
},
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 371
): Promise<{ eventId: string; meetUrl: string | null; htmlLink: string | null }> {
): Promise<{ eventId: string; meetUrl: string | null; htmlLink: string | null }> {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 372
const token = await accessToken(env);
const token = await accessToken(env);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 373
const calendarId = encodeURIComponent(settings.calendarId || 'primary');
const calendarId = encodeURIComponent(settings.calendarId || 'primary');
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 374
const encodedEventId = encodeURIComponent(eventId);
const encodedEventId = encodeURIComponent(eventId);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 375
const params = new URLSearchParams({ sendUpdates: 'all', conferenceDataVersion: '1' });
const params = new URLSearchParams({ sendUpdates: 'all', conferenceDataVersion: '1' });
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 376
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 377
const descriptionLines = [
const descriptionLines = [
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 378
`Booked through ${env.APP_URL}`,
`Booked through ${env.APP_URL}`,
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 379
`Booking ID: ${booking.publicBookingId}`,
`Booking ID: ${booking.publicBookingId}`,
Alex Nord
1 day ago
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 380
booking.phone ? `Phone: ${booking.phone}` : '',
booking.phone ? `Phone: ${booking.phone}` : '',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 381
booking.message ? `Message: ${booking.message}` : '',
booking.message ? `Message: ${booking.message}` : '',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 382
'Payment received via Stripe.',
'Payment received via Stripe.',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 383
].filter(Boolean);
].filter(Boolean);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 384
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 385
const event: Record<string, unknown> = {
const event: Record<string, unknown> = {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 386
summary: `Meeting with ${booking.name}`,
summary: `Meeting with ${booking.name}`,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 387
description: descriptionLines.join('\n\n'),
description: descriptionLines.join('\n\n'),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 388
start: { dateTime: booking.start, timeZone: settings.timezone },
start: { dateTime: booking.start, timeZone: settings.timezone },
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 389
end: { dateTime: booking.end, timeZone: settings.timezone },
end: { dateTime: booking.end, timeZone: settings.timezone },
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 390
attendees: [{ email: booking.email, displayName: booking.name }],
attendees: [{ email: booking.email, displayName: booking.name }],
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 391
visibility: 'default',
visibility: 'default',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 392
transparency: 'opaque',
transparency: 'opaque',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 393
};
};
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 394
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 395
// Google Meet was created on the private hold already. Omitting conferenceData
// Google Meet was created on the private hold already. Omitting conferenceData
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 396
// here preserves that conference while the PATCH adds the attendee and sends the invite.
// here preserves that conference while the PATCH adds the attendee and sends the invite.
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 397
if (booking.meetingMode === 'in_person' && settings.inPersonLocation) {
if (booking.meetingMode === 'in_person' && settings.inPersonLocation) {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 398
event.location = settings.inPersonLocation;
event.location = settings.inPersonLocation;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 399
} else if (booking.meetingMode === 'phone') {
} else if (booking.meetingMode === 'phone') {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 400
event.location = 'Phone call';
event.location = 'Phone call';
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 401
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 402
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 403
const response = await fetch(
const response = await fetch(
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 404
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events/${encodedEventId}?${params.toString()}`,
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events/${encodedEventId}?${params.toString()}`,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 405
{
{
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 406
method: 'PATCH',
method: 'PATCH',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 407
headers: {
headers: {
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 408
Authorization: `Bearer ${token}`,
Authorization: `Bearer ${token}`,
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 409
'Content-Type': 'application/json',
'Content-Type': 'application/json',
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 410
},
},
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 411
body: JSON.stringify(event),
body: JSON.stringify(event),
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 412
},
},
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 413
);
);
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 414
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 415
if (!response.ok) await throwGoogleCalendarError(response, 'Google paid booking confirmation');
if (!response.ok) await throwGoogleCalendarError(response, 'Google paid booking confirmation');
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 416
const data = (await response.json()) as GoogleEventResponse & { error?: { message?: string } };
const data = (await response.json()) as GoogleEventResponse & { error?: { message?: string } };
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 417
if (!data.id) throw new GoogleCalendarError('Google paid booking confirmation', 502, data.error?.message ?? 'Missing event id');
if (!data.id) throw new GoogleCalendarError('Google paid booking confirmation', 502, data.error?.message ?? 'Missing event id');
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 418
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 419
const meetUrl = data.hangoutLink
const meetUrl = data.hangoutLink
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 420
?? data.conferenceData?.entryPoints?.find((entry) => entry.entryPointType === 'video')?.uri
?? data.conferenceData?.entryPoints?.find((entry) => entry.entryPointType === 'video')?.uri
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 421
?? null;
?? null;
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 422
return { eventId: data.id, meetUrl, htmlLink: data.htmlLink ?? null };
return { eventId: data.id, meetUrl, htmlLink: data.htmlLink ?? null };
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 423
}
}
same change
110f91e
Adding indication for test/live key
- Full commit hash
110f91e747192b16de709ea11c5eea17eaeadd48- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 424
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 425
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 426
function managedBookingDescription(
function managedBookingDescription(
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 427
env: Env,
env: Env,
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 428
booking: { phone?: string; message?: string; paid?: boolean; publicBookingId?: string },
booking: { phone?: string; message?: string; paid?: boolean; publicBookingId?: string },
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 429
extraLines: string[] = [],
extraLines: string[] = [],
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 430
): string {
): string {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 431
return [
return [
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 432
`Booked through ${env.APP_URL}`,
`Booked through ${env.APP_URL}`,
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 433
booking.publicBookingId ? `Booking ID: ${booking.publicBookingId}` : '',
booking.publicBookingId ? `Booking ID: ${booking.publicBookingId}` : '',
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 434
booking.phone ? `Phone: ${booking.phone}` : '',
booking.phone ? `Phone: ${booking.phone}` : '',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 435
booking.message ? `Message: ${booking.message}` : '',
booking.message ? `Message: ${booking.message}` : '',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 436
booking.paid ? 'Payment received via Stripe.' : '',
booking.paid ? 'Payment received via Stripe.' : '',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 437
...extraLines,
...extraLines,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 438
].filter(Boolean).join('\n\n');
].filter(Boolean).join('\n\n');
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 439
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 440
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 441
export async function rescheduleCalendarEvent(
export async function rescheduleCalendarEvent(
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 442
env: Env,
env: Env,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 443
settings: AppSettings,
settings: AppSettings,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 444
eventId: string,
eventId: string,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 445
booking: {
booking: {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 446
phone?: string;
phone?: string;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 447
message?: string;
message?: string;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 448
paid?: boolean;
paid?: boolean;
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 449
publicBookingId?: string;
publicBookingId?: string;
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 450
start: string;
start: string;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 451
end: string;
end: string;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 452
},
},
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 453
): Promise<{ eventId: string; meetUrl: string | null }> {
): Promise<{ eventId: string; meetUrl: string | null }> {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 454
const token = await accessToken(env);
const token = await accessToken(env);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 455
const calendarId = encodeURIComponent(settings.calendarId || 'primary');
const calendarId = encodeURIComponent(settings.calendarId || 'primary');
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 456
const encodedEventId = encodeURIComponent(eventId);
const encodedEventId = encodeURIComponent(eventId);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 457
const params = new URLSearchParams({ sendUpdates: 'all', conferenceDataVersion: '1' });
const params = new URLSearchParams({ sendUpdates: 'all', conferenceDataVersion: '1' });
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 458
const response = await fetch(
const response = await fetch(
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 459
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events/${encodedEventId}?${params.toString()}`,
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events/${encodedEventId}?${params.toString()}`,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 460
{
{
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 461
method: 'PATCH',
method: 'PATCH',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 462
headers: {
headers: {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 463
Authorization: `Bearer ${token}`,
Authorization: `Bearer ${token}`,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 464
'Content-Type': 'application/json',
'Content-Type': 'application/json',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 465
},
},
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 466
body: JSON.stringify({
body: JSON.stringify({
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 467
start: { dateTime: booking.start, timeZone: settings.timezone },
start: { dateTime: booking.start, timeZone: settings.timezone },
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 468
end: { dateTime: booking.end, timeZone: settings.timezone },
end: { dateTime: booking.end, timeZone: settings.timezone },
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 469
description: managedBookingDescription(env, booking),
description: managedBookingDescription(env, booking),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 470
}),
}),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 471
},
},
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 472
);
);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 473
if (!response.ok) await throwGoogleCalendarError(response, 'Google event reschedule');
if (!response.ok) await throwGoogleCalendarError(response, 'Google event reschedule');
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 474
const data = (await response.json()) as GoogleEventResponse & { error?: { message?: string } };
const data = (await response.json()) as GoogleEventResponse & { error?: { message?: string } };
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 475
if (!data.id) throw new GoogleCalendarError('Google event reschedule', 502, data.error?.message ?? 'Missing event id');
if (!data.id) throw new GoogleCalendarError('Google event reschedule', 502, data.error?.message ?? 'Missing event id');
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 476
const meetUrl = data.hangoutLink
const meetUrl = data.hangoutLink
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 477
?? data.conferenceData?.entryPoints?.find((entry) => entry.entryPointType === 'video')?.uri
?? data.conferenceData?.entryPoints?.find((entry) => entry.entryPointType === 'video')?.uri
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 478
?? null;
?? null;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 479
return { eventId: data.id, meetUrl };
return { eventId: data.id, meetUrl };
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 480
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 481
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 482
export async function sendRescheduleSuggestion(
export async function sendRescheduleSuggestion(
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 483
env: Env,
env: Env,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 484
settings: AppSettings,
settings: AppSettings,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 485
eventId: string,
eventId: string,
Alex Nord
about 23 hours ago
92deb90
feat: add public booking IDs and self-service cancellation
- Full commit hash
92deb90d0872b02f6bac0f855281cdb9a73596db- Author
- Alex Nord <[email protected]>
- Date
- about 23 hours ago
- Selected line
- 486
booking: { phone?: string; message?: string; paid?: boolean; publicBookingId?: string },
booking: { phone?: string; message?: string; paid?: boolean; publicBookingId?: string },
Alex Nord
1 day ago
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 487
proposal: { start: string; end: string; url: string },
proposal: { start: string; end: string; url: string },
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 488
): Promise<void> {
): Promise<void> {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 489
const token = await accessToken(env);
const token = await accessToken(env);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 490
const calendarId = encodeURIComponent(settings.calendarId || 'primary');
const calendarId = encodeURIComponent(settings.calendarId || 'primary');
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 491
const encodedEventId = encodeURIComponent(eventId);
const encodedEventId = encodeURIComponent(eventId);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 492
const params = new URLSearchParams({ sendUpdates: 'all' });
const params = new URLSearchParams({ sendUpdates: 'all' });
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 493
const formatter = new Intl.DateTimeFormat('en-US', {
const formatter = new Intl.DateTimeFormat('en-US', {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 494
timeZone: settings.timezone,
timeZone: settings.timezone,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 495
weekday: 'long',
weekday: 'long',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 496
month: 'long',
month: 'long',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 497
day: 'numeric',
day: 'numeric',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 498
hour: '2-digit',
hour: '2-digit',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 499
minute: '2-digit',
minute: '2-digit',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 500
hourCycle: 'h23',
hourCycle: 'h23',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 501
});
});
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 502
const proposedText = `${formatter.format(new Date(proposal.start))} – ${new Intl.DateTimeFormat('en-US', {
const proposedText = `${formatter.format(new Date(proposal.start))} – ${new Intl.DateTimeFormat('en-US', {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 503
timeZone: settings.timezone,
timeZone: settings.timezone,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 504
hour: '2-digit',
hour: '2-digit',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 505
minute: '2-digit',
minute: '2-digit',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 506
hourCycle: 'h23',
hourCycle: 'h23',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 507
}).format(new Date(proposal.end))} (${settings.timezone})`;
}).format(new Date(proposal.end))} (${settings.timezone})`;
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 508
const description = managedBookingDescription(env, booking, [
const description = managedBookingDescription(env, booking, [
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 509
'Slot reschedule suggestion',
'Slot reschedule suggestion',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 510
`Suggested new time: ${proposedText}`,
`Suggested new time: ${proposedText}`,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 511
`Review and accept: ${proposal.url}`,
`Review and accept: ${proposal.url}`,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 512
'The existing meeting time stays confirmed until the suggestion is accepted.',
'The existing meeting time stays confirmed until the suggestion is accepted.',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 513
]);
]);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 514
const response = await fetch(
const response = await fetch(
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 515
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events/${encodedEventId}?${params.toString()}`,
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events/${encodedEventId}?${params.toString()}`,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 516
{
{
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 517
method: 'PATCH',
method: 'PATCH',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 518
headers: {
headers: {
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 519
Authorization: `Bearer ${token}`,
Authorization: `Bearer ${token}`,
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 520
'Content-Type': 'application/json',
'Content-Type': 'application/json',
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 521
},
},
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 522
body: JSON.stringify({ description }),
body: JSON.stringify({ description }),
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 523
},
},
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 524
);
);
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 525
if (!response.ok) await throwGoogleCalendarError(response, 'Google reschedule suggestion');
if (!response.ok) await throwGoogleCalendarError(response, 'Google reschedule suggestion');
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 526
}
}
same change
9aa588b
feat: add rescheduling, time proposals and Stripe cancellation refunds
- Full commit hash
9aa588b368f7c46ba3d287199a3d95506867c927- Author
- Alex Nord <[email protected]>
- Date
- 1 day ago
- Selected line
- 527
Alex Nord
3 days ago
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 528
export async function deleteCalendarEvent(
export async function deleteCalendarEvent(
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 529
env: Env,
env: Env,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 530
settings: AppSettings,
settings: AppSettings,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 531
eventId: string,
eventId: string,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 532
): Promise<void> {
): Promise<void> {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 533
const token = await accessToken(env);
const token = await accessToken(env);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 534
const calendarId = encodeURIComponent(settings.calendarId || 'primary');
const calendarId = encodeURIComponent(settings.calendarId || 'primary');
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 535
const encodedEventId = encodeURIComponent(eventId);
const encodedEventId = encodeURIComponent(eventId);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 536
const params = new URLSearchParams({ sendUpdates: 'all' });
const params = new URLSearchParams({ sendUpdates: 'all' });
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 537
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 538
const response = await fetch(
const response = await fetch(
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 539
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events/${encodedEventId}?${params.toString()}`,
`https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events/${encodedEventId}?${params.toString()}`,
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 540
{
{
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 541
method: 'DELETE',
method: 'DELETE',
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 542
headers: { Authorization: `Bearer ${token}` },
headers: { Authorization: `Bearer ${token}` },
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 543
},
},
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 544
);
);
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 545
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 546
if (response.status === 410 || response.status === 404) return;
if (response.status === 410 || response.status === 404) return;
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 547
if (!response.ok) {
if (!response.ok) {
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 548
await throwGoogleCalendarError(response, 'Google event cancellation');
await throwGoogleCalendarError(response, 'Google event cancellation');
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 549
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 550
}
}
same change
5562973
Add cancellation and availability blocks
- Full commit hash
556297329383149d17cc0ffa9568836eeae97d2c- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 551
Alex Nord
3 days ago
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 552
export async function disconnectGoogle(env: Env): Promise<void> {
export async function disconnectGoogle(env: Env): Promise<void> {
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 553
await env.DB.prepare("DELETE FROM oauth_tokens WHERE provider = 'google'").run();
await env.DB.prepare("DELETE FROM oauth_tokens WHERE provider = 'google'").run();
same change
45c38c3
Prepare Slot booking worker
- Full commit hash
45c38c3ae5284118e8d65aa9d49e90850b1209f5- Author
- Alex Nord <[email protected]>
- Date
- 3 days ago
- Selected line
- 554
}
}