import { RpgPublicationBucket } from './publication'; /** Bindings enabling private, versioned Cloudflare map publication. */ export interface RpgPublicationOptions { /** Private R2 bucket binding containing immutable publication artifacts. */ bucket: string; /** Namespace binding for RpgPublicationDurableObject, one instance per project. */ coordinator: string; } interface Namespace { idFromName(name: string): unknown; get(id: unknown): { fetch(request: Request): Promise; }; } interface Storage { get(key: string): Promise; put(key: string, value: unknown): Promise; delete(key: string): Promise; list(options: { prefix: string; limit?: number; startAfter?: string; }): Promise>; setAlarm(time: number): Promise; transaction(callback: (storage: Storage) => Promise): Promise; } interface Configuration extends RpgPublicationOptions { rooms: string; partiesPath: string; } export declare function configurePublications(options: Configuration | undefined): void; export declare function publicationBindings(env: Record): { config: Configuration; bucket: RpgPublicationBucket; coordinator: Namespace; rooms: Namespace; }; export declare function publicationHeaders(env: Record): { 'content-type': string; 'x-rpgjs-map-update-token': string; }; export declare function authorizedPublication(request: Request, env: Record): boolean; export declare function coordinatorRequest(env: Record, projectId: string, path: string, body?: unknown): Promise; /** * Per-project Durable Object that atomically activates versions and durably * retries notifications to registered rooms. Export from the Worker module and * bind a new SQLite namespace; never expose its internal room registration API. * @example * export { RpgPublicationDurableObject } from '@rpgjs/server/cloudflare'; */ export declare class RpgPublicationDurableObject { private readonly ctx; private readonly env; constructor(ctx: { storage: Storage; }, env: Record); /** Handle authenticated publication activation/status and internal room lifecycle messages. */ fetch(request: Request): Promise; private activate; /** Retry a bounded batch; persisted pending entries survive failures/restarts. */ alarm(): Promise; } export {};