rate-limits.ts
This file
Path
apps/platform/src/rate-limits.ts
16 lines · 443 bytes · TypeScript
Last changed by
Merge build/comments-platform into mainoscabrielbefore adoptionddf09e8
History of this fileTake it
1234567891011121314151617import type { Handle } from "@repo/protocol/ids";import type { CapReached } from "@repo/protocol/refusal";import { Context } from "effect";import type { Effect } from "effect";
export type Limited = "claim" | "proposal" | "draft";
export class RateLimits extends Context.Service< RateLimits, { readonly check: ( kind: Limited, handle: Handle ) => Effect.Effect<void, CapReached>; }>()("platform/RateLimits") {}