import { z } from "zod"; /** * Generic token-bucket rate-limit primitive. * * Any module that needs token-bucket rate limiting (channel push, * operator-configured webhooks, third-party integrations, future use * cases) uses this table with its own scope key. Channel push wraps it * with channel-specific scope construction: * * "channel:" + channelId + ":" + connectionId * * The `acquireToken(scope, config, priority)` helper does the atomic * refill + decrement in one round-trip; see distribution's rate-limit * service for the canonical implementation. * * Per docs/architecture/channel-push-architecture.md ยง14.2. */ export declare const infraRateLimitBucketsTable: Omit; tokensAvailable: import("drizzle-orm/pg-core").PgColumn<{ name: "tokens_available"; tableName: "rate_limit_buckets"; dataType: "string"; columnType: "PgNumeric"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; capacity: import("drizzle-orm/pg-core").PgColumn<{ name: "capacity"; tableName: "rate_limit_buckets"; dataType: "string"; columnType: "PgNumeric"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; refillRatePerSec: import("drizzle-orm/pg-core").PgColumn<{ name: "refill_rate_per_sec"; tableName: "rate_limit_buckets"; dataType: "string"; columnType: "PgNumeric"; data: string; driverParam: string; notNull: true; hasDefault: false; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; lastRefillAt: import("drizzle-orm/pg-core").PgColumn<{ name: "last_refill_at"; tableName: "rate_limit_buckets"; dataType: "date"; columnType: "PgTimestamp"; data: Date; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; updatedAt: import("drizzle-orm/pg-core").PgColumn<{ name: "updated_at"; tableName: "rate_limit_buckets"; dataType: "date"; columnType: "PgTimestamp"; data: Date; driverParam: string; notNull: true; hasDefault: true; isPrimaryKey: false; isAutoincrement: false; hasRuntimeDefault: false; enumValues: undefined; baseColumn: never; identity: undefined; generated: undefined; }, {}, {}>; }; dialect: "pg"; }>, "enableRLS">; export type InsertInfraRateLimitBucket = typeof infraRateLimitBucketsTable.$inferInsert; export type SelectInfraRateLimitBucket = typeof infraRateLimitBucketsTable.$inferSelect; export declare const infraRateLimitBucketSelectSchema: z.ZodObject<{ scope: z.ZodString; tokensAvailable: z.ZodString; capacity: z.ZodString; refillRatePerSec: z.ZodString; lastRefillAt: z.ZodDate; updatedAt: z.ZodDate; }, z.core.$strip>; export type InfraRateLimitBucket = z.infer; //# sourceMappingURL=rate_limit_buckets.d.ts.map