UsageLookbackRule
An allowance used at most once inside a window, restored by a rest: “not used within the previous 7 days unless 34 hours off came between”.
import type { UsageLookbackRule } from "@northguild/gmt";Members
Section titled “Members”| Member | Type | Description |
|---|---|---|
label | string | The caller’s name for the rule. The report is keyed by it; labels must be unique. |
severity? | "violation" | "advisory" (DutySeverity) | Whether a failure is a violation or an advisory. |
kind | "usageLookback" | Selects this rule kind. |
uses | string[] | The instants the allowance was used, as ISO 8601 instant strings. |
notWithin | Period | The window no second use may fall in. |
reset | Reset<S> (Reset) | The rest that restores the allowance. |
Definition
Section titled “Definition”type UsageLookbackRule<S extends string = string> = { /** The caller's name for the rule. The report is keyed by it; labels must be unique. */ label: string; /** * Whether a failure is a violation or an advisory. * * @defaultValue `"violation"`. */ severity?: DutySeverity; /** Selects this rule kind. */ kind: "usageLookback"; /** The instants the allowance was used, as ISO 8601 instant strings. */ uses: string[]; /** The window no second use may fall in. */ notWithin: Period; /** The rest that restores the allowance. */ reset: Reset<S>;};Used by
Section titled “Used by”Source
Section titled “Source”Accessibility
© 2026 NorthGuild · Licences
Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.