(
key: IntegrationTaskKey,
params: { id: string; input: L.WebhookUpdateInput }
)
| 106 | } |
| 107 | |
| 108 | updateWebhook( |
| 109 | key: IntegrationTaskKey, |
| 110 | params: { id: string; input: L.WebhookUpdateInput } |
| 111 | ): LinearReturnType<Omit<WebhookPayload, "webhook"> & { webhook: Webhook | undefined }> { |
| 112 | return this.runTask( |
| 113 | key, |
| 114 | async (client, task) => { |
| 115 | const payload = await client.updateWebhook(params.id, params.input); |
| 116 | return serializeLinearOutput({ |
| 117 | ...payload, |
| 118 | webhook: await payload.webhook, |
| 119 | }); |
| 120 | }, |
| 121 | { |
| 122 | name: "Update Webhook", |
| 123 | params, |
| 124 | properties: [ |
| 125 | { label: "Webhook ID", text: params.id }, |
| 126 | ...(params.input.url ? [{ label: "Webhook URL", text: params.input.url }] : []), |
| 127 | ...(params.input.resourceTypes |
| 128 | ? [{ label: "Resource Types", text: params.input.resourceTypes.join(", ") }] |
| 129 | : []), |
| 130 | ], |
| 131 | } |
| 132 | ); |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | type LinearEvents = (typeof events)[keyof typeof events]; |
no test coverage detected