createFixedWindowRateLimitTransitionInput()
Create and strictly normalize one fixed-window-v1 evaluator input.
Import
Section titled “Import”import { createFixedWindowRateLimitTransitionInput } from "@graphrefly/ts/rate-limit";Signature
Section titled “Signature”function createFixedWindowRateLimitTransitionInput( request: unknown, policy: unknown, state: unknown, observedAtMs: unknown,): FixedWindowRateLimitTransitionInputParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
request | unknown | Complete strict request to evaluate. |
policy | unknown | Exact scoped fixed-window policy. |
state | unknown | Exact scoped state, or null only when the host atomically confirms that no exact scoped state exists and authorizes this evaluation to perform first initialization. |
observedAtMs | unknown | Externally supplied authoritative Unix epoch milliseconds. |
Returns
Section titled “Returns”The immutable normalized fixed-window evaluator input.
Example
Section titled “Example”import { createFixedWindowRateLimitTransitionInput } from "@graphrefly/ts/rate-limit";Source
Section titled “Source”packages/ts/src/rate-limit/keyed-rate-limit-algorithms.ts