Hi there. The TS typings for workflows.trigger are incorrect.
Recipients are marked as optional:
recipients?: (Recipient | RecipientWithUpsert)[];
However, if we trigger workflows without recipients, we get an error:
"The following errors occurred: recipients(required): can't be blank"
Firstly, there are many valid use cases to kick off a workflow without a designated recipient. In our case, these are backoffice support alerts and do not have a dynamic recipient.
Secondly, if recipients truly cannot be blank, the typings should be corrected to prevent valid TS code from throwing errors.
Hi there. The TS typings for
workflows.trigger
are incorrect.Recipients are marked as optional:
However, if we trigger workflows without recipients, we get an error:
Firstly, there are many valid use cases to kick off a workflow without a designated recipient. In our case, these are backoffice support alerts and do not have a dynamic recipient.
Secondly, if recipients truly cannot be blank, the typings should be corrected to prevent valid TS code from throwing errors.