Method
update
(
key: IntegrationTaskKey,
payload: Parameters<Resend["contacts"]["update"]>[0]
)
Source from the content-addressed store, hash-verified
| 85 | } |
| 86 | |
| 87 | update( |
| 88 | key: IntegrationTaskKey, |
| 89 | payload: Parameters<Resend["contacts"]["update"]>[0] |
| 90 | ): Promise<UpdateContactResult> { |
| 91 | return this.runTask( |
| 92 | key, |
| 93 | async (client, task) => { |
| 94 | const { error, data } = await client.contacts.update(payload); |
| 95 | |
| 96 | if (error) { |
| 97 | throw error; |
| 98 | } |
| 99 | |
| 100 | if (!data) { |
| 101 | throw new Error("No data returned from Resend"); |
| 102 | } |
| 103 | |
| 104 | return data; |
| 105 | }, |
| 106 | { |
| 107 | name: "Update Contact", |
| 108 | params: payload, |
| 109 | properties: [ |
| 110 | { |
| 111 | label: "Id", |
| 112 | text: payload.id, |
| 113 | }, |
| 114 | ], |
| 115 | retry: retry.standardBackoff, |
| 116 | }, |
| 117 | handleResendError |
| 118 | ); |
| 119 | } |
| 120 | |
| 121 | remove( |
| 122 | key: IntegrationTaskKey, |
Callers
nothing calls this directly
Tested by
no test coverage detected