Skip to content
File

Blob: src/client/lib/constants.ts

typescript30 lines
1export const STORAGE_KEYS = {
2 D1_BOOKMARK: "bland:d1:bookmark",
3 USER: "bland:user",
4 WORKSPACE: "bland:workspace",
5 LAYOUT: "bland:layout",
6 SIDEBAR: "bland:sidebar",
7 CACHED_DOCS: "bland:cached-docs",
8 EMOJI_RECENTS: "bland:emoji-recents",
9} as const;
10 
11export const SECURITY_VERIFICATION_UNAVAILABLE_MESSAGE =
12 "Security verification is unavailable right now. Please try again.";
13 
14export const SESSION_MODES = {
15 AUTHENTICATED: "authenticated",
16 LOCAL_ONLY: "local-only",
17 EXPIRED: "expired",
18 ANONYMOUS: "anonymous",
19} as const;
20 
21export type SessionMode = (typeof SESSION_MODES)[keyof typeof SESSION_MODES];
22 
23export function getCachedDocKey(pageId: string): string {
24 return `bland:doc:${pageId}`;
25}
26 
27export function getCachedCanvasKey(pageId: string): string {
28 return `bland:canvas:${pageId}`;
29}