ApprovalSpec

interface ApprovalSpec<TSubjectArgs extends object | void = void, TBodyArgs extends object | void = TSubjectArgs> extends HITLBaseSpec<TSubjectArgs, TBodyArgs> { assignedUsers?: readonly HITLUser[]; body?: HITLText<TBodyArgs, string | null>; defaults?: 'Approve' | 'Reject'; failOnReject?: boolean; ignoreDownstreamTriggerRules?: boolean; params?: Readonly<Record<string, HITLParam>>; responseTimeout?: number; subject: HITLText<TSubjectArgs>; }

Source: spec.ts:92

The ApprovalOperator options, named as TypeScript spells them.

Type Parameters

  • TSubjectArgs extends object | void = void
  • TBodyArgs extends object | void = TSubjectArgs

Hierarchy

  • HITLBaseSpec<TSubjectArgs, TBodyArgs>
  • ApprovalSpec

Properties

assignedUsers: readonly HITLUser[]

readonly
spec.ts:68

Inherited from assignedUsers

Users allowed to respond. Anyone who can act on the task may respond when unset.

body: HITLText<TBodyArgs, string | null>

readonly
spec.ts:66

Inherited from body

Markdown shown below the headline.

defaults: 'Approve' | 'Reject'

readonly
spec.ts:97

The answer given for the responder when responseTimeout passes without a response.

failOnReject: boolean

readonly
spec.ts:108

On "Reject", fail this task rather than skip what follows it. Defaults to false, so a rejection succeeds. A retry asks the reviewer again, so retries with this option repeats the request on each attempt.

ignoreDownstreamTriggerRules: boolean

readonly
spec.ts:102

On "Reject", skip every task downstream rather than only the tasks directly downstream. Defaults to false.

params: Readonly<Record<string, HITLParam>>

readonly
spec.ts:70

Inherited from params

Form fields the responder fills in, by name. Their answers are the result's paramsInput.

responseTimeout: number

readonly
spec.ts:75

Inherited from responseTimeout

Whole seconds to wait for a response, since TypeScript has no timedelta. Waits indefinitely when unset. Use this rather than executionTimeout, which a HITL task does not enforce.

subject: HITLText<TSubjectArgs>

readonly
spec.ts:64

Inherited from subject

Headline of the request.