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

Method updateSource

packages/trigger-sdk/src/apiClient.ts:305–330  ·  view source on GitHub ↗
(
    client: string,
    key: string,
    source: UpdateTriggerSourceBodyV2
  )

Source from the content-addressed store, hash-verified

303 }
304
305 async updateSource(
306 client: string,
307 key: string,
308 source: UpdateTriggerSourceBodyV2
309 ): Promise<TriggerSource> {
310 const apiKey = await this.#apiKey();
311
312 this.#logger.debug("activating http source", {
313 source,
314 });
315
316 const response = await zodfetch(
317 TriggerSourceSchema,
318 `${this.#apiUrl}/api/v2/${client}/sources/${key}`,
319 {
320 method: "PUT",
321 headers: {
322 "Content-Type": "application/json",
323 Authorization: `Bearer ${apiKey}`,
324 },
325 body: JSON.stringify(source),
326 }
327 );
328
329 return response;
330 }
331
332 async updateWebhook(key: string, webhookData: UpdateWebhookBody): Promise<TriggerSource> {
333 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