import type { GenericMessage } from '@enbox/dwn-sdk-js'; import type { JsonRpcId } from '@enbox/dwn-clients'; import type { HandlerResponse, JsonRpcHandler } from '../../lib/json-rpc-router.js'; type InboundDwnMessageParams = { context: Parameters[1]; hasEncodedData?: boolean; message: GenericMessage; requestId: JsonRpcId; target: string; allowDatalessRecordsWriteOverNonHttp?: boolean; allowRecordsWriteOverNonHttp?: boolean; }; type QuotaOptions = { storageBytesToAdd?: number; /** Same-CID data completion moves an existing row instead of adding a message. */ skipMessageCount?: boolean; }; export declare function validateInboundDwnMessageTransport(params: InboundDwnMessageParams): HandlerResponse | undefined; export declare function enforceInboundDwnMessageLimits(params: InboundDwnMessageParams): Promise; export declare function enforceTenantRateLimit(params: InboundDwnMessageParams): HandlerResponse | undefined; /** * Checks whether the tenant has exceeded their message count or storage quota. * Returns a JSON-RPC error response if the quota is exceeded, or `undefined` to proceed. */ export declare function enforceQuota(target: string, message: GenericMessage, context: Parameters[1], options?: QuotaOptions): Promise; export {}; //# sourceMappingURL=inbound-message.d.ts.map