(key: IntegrationTaskKey, { baseId, webhookId }: { baseId: string; webhookId: string })
| 156 | } |
| 157 | |
| 158 | delete(key: IntegrationTaskKey, { baseId, webhookId }: { baseId: string; webhookId: string }) { |
| 159 | return this.runTask( |
| 160 | key, |
| 161 | async (client, task, io) => { |
| 162 | const response = await fetch(`${apiUrl}/${baseId}/webhooks/${webhookId}`, { |
| 163 | method: "DELETE", |
| 164 | headers: { |
| 165 | Authorization: `Bearer ${client._apiKey}`, |
| 166 | }, |
| 167 | redirect: "follow", |
| 168 | }); |
| 169 | |
| 170 | if (!response.ok) { |
| 171 | await handleWebhookError(response, "WEBHOOK_DELETE"); |
| 172 | } |
| 173 | }, |
| 174 | { |
| 175 | name: "Delete webhook", |
| 176 | params: { |
| 177 | baseId, |
| 178 | webhookId, |
| 179 | }, |
| 180 | } |
| 181 | ); |
| 182 | } |
| 183 | |
| 184 | async update( |
| 185 | key: IntegrationTaskKey, |
no test coverage detected