export interface Env { SITEMAP_KV: KVNamespace; SITEMAP_BUCKET: R2Bucket; HYDRANT?: Fetcher; BASE_URL?: string; HYDRANT_URL?: string; SHARD_MAX_URLS?: string; SHARD_MAX_BYTES?: string; } export type DbAction = 'create' | 'update' | 'delete'; export interface HydrantRecordValue { name?: string; createdAt?: string; handle?: string; description?: string; [key: string]: unknown; } export interface HydrantRecordPayload { live?: boolean; did: string; handle?: string; rev?: string; collection: string; rkey: string; action: DbAction; record?: HydrantRecordValue; cid?: string; } export interface HydrantIdentityPayload { did: string; handle?: string; } export interface HydrantEvent { id: number; type: 'record' | 'identity' | 'account'; record?: HydrantRecordPayload; identity?: HydrantIdentityPayload; } export interface UrlEntry { loc: string; lastmod?: string; changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never'; priority?: number; } export interface ShardInfo { index: number; filename: string; count: number; uncompressedBytes: number; sealed: boolean; lastmod: string; } export interface WorkerState { cursor: string; lastSyncAt: string; totalUrls: number; shards: ShardInfo[]; urlLocator: Record; }