RequiredInterruptionRule
A required break after a stretch of counted time: “30 minutes after 8 hours driving”.
import type { RequiredInterruptionRule } 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 | "requiredInterruption" | Selects this rule kind. |
countedStatuses | S[] | The statuses that count towards the stretch. |
after | string | The most counted time allowed without an interruption, a positive ISO 8601 duration. |
interruption | object | What counts as an interruption. |
interruption.minimum | string | The shortest single run that interrupts, a positive ISO 8601 duration of exact time. |
interruption.outsideStatuses? | S[] | The statuses an interruption may be made of. |
interruption.orderedSplit? | string[] | Shorter runs that together interrupt when taken in this order: ["PT15M", "PT30M"] is a run of at least 15 minutes followed later by one of at least 30, and not the reverse. |
Definition
Section titled “Definition”type RequiredInterruptionRule<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: "requiredInterruption"; /** The statuses that count towards the stretch. */ countedStatuses: S[]; /** The most counted time allowed without an interruption, a positive ISO 8601 duration. */ after: string; /** What counts as an interruption. */ interruption: { /** The shortest single run that interrupts, a positive ISO 8601 duration of exact time. */ minimum: string; /** * The statuses an interruption may be made of. * * @defaultValue None. Any logged status outside `countedStatuses` interrupts. */ outsideStatuses?: S[]; /** * Shorter runs that together interrupt when taken in this order: `["PT15M", "PT30M"]` is a * run of at least 15 minutes followed later by one of at least 30, and not the reverse. * * @defaultValue None. Only a run of `minimum` interrupts. */ orderedSplit?: string[]; };};