Skip to content
Français

TriggerEvent

import type { TriggerEvent } from "@elie-laloum/outpost";
  • sourceRequired
    string
    Source name, such as github, gitlab, slack or standard.
  • deliveryRequired
    string
    Sender delivery identifier, shared by retries of one delivery; 1 to 200 visible ASCII characters.
  • kindRequired
    string
    Event type: the GitHub event name, the GitLab object_kind, command or the Slack interaction type, or the Standard Webhooks payload type.
  • actionOptional
    string | undefined
    Sub-action when the sender provides one, such as labeled, update or the Slack command name.
  • actorOptional
    string | undefined
    Sender-authenticated identity such as github:octocat, gitlab:user or slack:U123; not an Outpost gate actor.
  • payloadRequired
    WorkflowJson
    Parsed body: the JSON document, the form fields of a Slack slash command or the JSON payload of a Slack interaction. Narrow it before use, or read it with labelAdded() and commandIssued().
  • receivedAtRequired
    string
    ISO time at which the server verified the request.
export interface TriggerEvent {
  readonly source: string;
  /** Sender delivery identifier; retries of one delivery share it. */
  readonly delivery: string;
  readonly kind: string;
  readonly action?: string;
  /** Sender-authenticated identity such as `github:octocat`; not an Outpost actor. */
  readonly actor?: string;
  readonly payload: WorkflowJson;
  readonly receivedAt: string;
}