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

Method createWebhook

integrations/linear/src/webhooks.ts:70–92  ·  view source on GitHub ↗
(
    key: IntegrationTaskKey,
    params: L.WebhookCreateInput
  )

Source from the content-addressed store, hash-verified

68 }
69
70 createWebhook(
71 key: IntegrationTaskKey,
72 params: L.WebhookCreateInput
73 ): LinearReturnType<Omit<WebhookPayload, "webhook"> & { webhook: Webhook | undefined }> {
74 return this.runTask(
75 key,
76 async (client, task, io) => {
77 const payload = await client.createWebhook({ ...params, allPublicTeams: !params.teamId });
78 return serializeLinearOutput({
79 ...payload,
80 webhook: await payload.webhook,
81 });
82 },
83 {
84 name: "Create Webhook",
85 params,
86 properties: [
87 { label: "Webhook URL", text: params.url },
88 { label: "Resource Types", text: params.resourceTypes.join(", ") },
89 ],
90 }
91 );
92 }
93
94 deleteWebhook(key: IntegrationTaskKey, params: { id: string }): LinearReturnType<DeletePayload> {
95 return this.runTask(

Callers 1

createWebhookEventSourceFunction · 0.45

Calls 2

serializeLinearOutputFunction · 0.90
runTaskMethod · 0.45

Tested by

no test coverage detected