(
key: IntegrationTaskKey,
payload: Parameters<Resend["contacts"]["remove"]>[0]
)
| 119 | } |
| 120 | |
| 121 | remove( |
| 122 | key: IntegrationTaskKey, |
| 123 | payload: Parameters<Resend["contacts"]["remove"]>[0] |
| 124 | ): Promise<DeleteContactResult> { |
| 125 | return this.runTask( |
| 126 | key, |
| 127 | async (client, task) => { |
| 128 | const { error, data } = await client.contacts.remove(payload); |
| 129 | |
| 130 | if (error) { |
| 131 | throw error; |
| 132 | } |
| 133 | |
| 134 | if (!data) { |
| 135 | throw new Error("No data returned from Resend"); |
| 136 | } |
| 137 | |
| 138 | return data; |
| 139 | }, |
| 140 | { |
| 141 | name: "Remove Contact", |
| 142 | params: payload, |
| 143 | properties: [ |
| 144 | { |
| 145 | label: "Id", |
| 146 | text: payload.id, |
| 147 | }, |
| 148 | ], |
| 149 | retry: retry.standardBackoff, |
| 150 | }, |
| 151 | handleResendError |
| 152 | ); |
| 153 | } |
| 154 | |
| 155 | list( |
| 156 | key: IntegrationTaskKey, |
no test coverage detected