diff --git a/docs/sdk/eventtrigger.mdx b/docs/sdk/eventtrigger.mdx index fe94f8c961f..5c7b30c95a6 100644 --- a/docs/sdk/eventtrigger.mdx +++ b/docs/sdk/eventtrigger.mdx @@ -45,6 +45,26 @@ You can have multiple Jobs that subscribe to the same event, they will all trigg ``` + + Used to provide example payloads that are accepted by the job. + + This will be available in the dashboard and can be used to trigger test runs. + + + + The example's ID. + + + The name that's displayed in the dashboard. + + + The payload that's accepted by the job. + + + The icon to use for this example in the dashboard. + + + @@ -70,6 +90,19 @@ client.defineJob({ filter: { tier: ["pro"], }, + //(optional) example event object + examples: [ + { + id: "issue.opened", + name: "Issue opened", + payload: { + userId: "1234", + tier: "free", + }, + //optional + icon: "github", + }, + ], }), run: async (payload, io, ctx) => { await io.logger.log("New pro user created", { userId: payload.userId });