MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / sendEvent

Method sendEvent

packages/trigger-sdk/src/apiClient.ts:213–228  ·  view source on GitHub ↗
(event: SendEvent, options: SendEventOptions = {})

Source from the content-addressed store, hash-verified

211 }
212
213 async sendEvent(event: SendEvent, options: SendEventOptions = {}) {
214 const apiKey = await this.#apiKey();
215
216 this.#logger.debug("Sending event", {
217 event,
218 });
219
220 return await zodfetch(ApiEventLogSchema, `${this.#apiUrl}/api/v1/events`, {
221 method: "POST",
222 headers: {
223 "Content-Type": "application/json",
224 Authorization: `Bearer ${apiKey}`,
225 },
226 body: JSON.stringify({ event, options }),
227 });
228 }
229
230 async sendEvents(events: SendEvent[], options: SendEventOptions = {}) {
231 const apiKey = await this.#apiKey();

Callers

nothing calls this directly

Calls 3

#apiKeyMethod · 0.95
zodfetchFunction · 0.70
debugMethod · 0.65

Tested by

no test coverage detected