approval
approval<
TSubjectArgs extends void | object = void,
TBodyArgs extends void | object = TSubjectArgs,
>(
spec: ApprovalSpec<TSubjectArgs, TBodyArgs>,
): HITLTask<HITLTextArgs<TSubjectArgs, TBodyArgs>>Source: spec.ts:232
A task that asks a human to approve or reject, passed to dag.task in place of a handler.
Offers exactly "Approve" and "Reject", which is what the Airflow UI shows as an approval. On "Reject" it skips what follows, or fails when ApprovalSpec.failOnReject is set.
CODE
dag.task("sign_off", approval({ subject: "Ship it?" }))().before(publish());Type Parameters
TSubjectArgsextendsvoid | object=voidTBodyArgsextendsvoid | object=TSubjectArgs
Parameters
spec(ApprovalSpec<TSubjectArgs, TBodyArgs>)
Returns
HITLTask<HITLTextArgs<TSubjectArgs, TBodyArgs>>