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

Method sendEvents

packages/trigger-sdk/src/apiClient.ts:230–245  ·  view source on GitHub ↗
(events: SendEvent[], options: SendEventOptions = {})

Source from the content-addressed store, hash-verified

228 }
229
230 async sendEvents(events: SendEvent[], options: SendEventOptions = {}) {
231 const apiKey = await this.#apiKey();
232
233 this.#logger.debug("Sending multiple events", {
234 events,
235 });
236
237 return await zodfetch(ApiEventLogSchema.array(), `${this.#apiUrl}/api/v1/events/bulk`, {
238 method: "POST",
239 headers: {
240 "Content-Type": "application/json",
241 Authorization: `Bearer ${apiKey}`,
242 },
243 body: JSON.stringify({ events, options }),
244 });
245 }
246
247 async cancelEvent(eventId: string) {
248 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