daisy-client / src /lib /config.ts
Jessedbrown's picture
feat/init-daisy-client
6d643ca
Raw History Blame Contribute Delete
704 Bytes
// API configuration
export const API_CONFIG = {
BASE_URL:
(import.meta.env.VITE_API_BASE_URL as string) ||
'http://localhost:3000/api/v1',
TIMEOUT: 10000, // 10 seconds
} as const;
// Upload configuration
export const UPLOAD_CONFIG = {
MAX_FILE_SIZE: 25 * 1024 * 1024, // 25MB in bytes
MAX_FILE_SIZE_MB: 25,
ALLOWED_TYPES: ['image/jpeg', 'image/png', 'image/webp', 'image/heic'],
} as const;
// Cache and stale time constants (in milliseconds)
export const CACHE_CONFIG = {
STALE_TIME: 1000 * 60 * 2, // 2 minutes
GC_TIME: 1000 * 60 * 5, // 5 minutes
REFETCH_INTERVAL: 1000 * 30, // 30 seconds
RETRY: {
MAX_QUERY_RETRIES: 3,
MAX_MUTATION_RETRIES: 2,
},
} as const;