Skip to content

Variable: WorkflowTriggerConfig ​

ts
const WorkflowTriggerConfig: z.ZodObject<{
  debounceSeconds: z.ZodDefault<z.ZodNumber>;
  eventTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
  filter: z.ZodOptional<z.ZodString>;
  maxRunsPerMinute: z.ZodOptional<z.ZodNumber>;
  subjectKinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
     merchant: "merchant";
     seller: "seller";
     user: "user";
  }>>>;
}, z.core.$strip>;

What starts a published workflow by itself (trigger event or subject.created): eventTypes an ingested event must have (an event trigger needs at least one), the subjectKinds a new subject must be (subject.created; any when unset), and a CEL filter over event, subject and now that must answer true. debounceSeconds holds a subject's starts apart: the first matching event starts a run at once, those within the window after it start one more run at its end, for the newest of them. maxRunsPerMinute caps the workflow's starts across subjects; starts over it wait for the next minute.

Released under the Apache-2.0 License.