(
key: IntegrationTaskKey,
params: L.WebhookCreateInput
)
| 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( |
no test coverage detected