Skip to content

ArgumentSpec

ArgumentSpec = ArgumentType | { max?: number; min?: number; optional?: boolean; precision?: number; scale?: number; type: ArgumentType; values?: string[]; }

Defined in: packages/schema/src/job-arguments.ts:26

One argument of a job, as plain data: its type, such as 'bigint', or the type with its options, such as { type: 'enum', values: ['day', 'week'] }, { type: 'integer', min: 1, optional: true } or { type: 'decimal', precision: 8, scale: 2 }. A value is checked as a field of that type checks it.

ArgumentType


{ max?: number; min?: number; optional?: boolean; precision?: number; scale?: number; type: ArgumentType; values?: string[]; }

optional max?: number

The greatest value, or for text the longest length.

optional min?: number

The least value, or for text the shortest length.

optional optional?: boolean

It may be left out.

optional precision?: number

A decimal’s number of digits.

optional scale?: number

A decimal’s number of digits after the point.

type: ArgumentType

The argument’s type.

optional values?: string[]

An enum’s values.