# DutyRule

Industry: Workforce

One hours-of-work rule over a duty log, every number the caller's. A regime is an array of rules the caller assembles and labels; nested caps are separate rules, reported separately.

```ts
import type { DutyRule } from "@northguild/gmt";
```

## Definition

```ts
type DutyRule<S extends string = string> =
  | CumulativeCapRule<S>
  | ElapsedWindowRule<S>
  | RequiredInterruptionRule<S>
  | RollingCapRule<S>
  | FixedPeriodCapRule<S>
  | RestRequirementRule<S>
  | FreePeriodRule<S>
  | RestBeforeDutyRule<S>
  | QuotaRule<S>
  | DueByRule<S>
  | PatternRule<S>
  | OccurrenceCapRule<S>
  | UsageLookbackRule<S>;
```

## Used by

- [`dutyViolations`](/gmt/reference/workforce/calculate/dutyViolations/)
- [`evaluateDutyLog`](/gmt/reference/workforce/calculate/evaluateDutyLog/)

## Source

[types/duty.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/types/duty.ts)
