Method
get
(
key: IntegrationTaskKey,
payload: Parameters<Resend["contacts"]["get"]>[0]
)
Source from the content-addressed store, hash-verified
| 51 | } |
| 52 | |
| 53 | get( |
| 54 | key: IntegrationTaskKey, |
| 55 | payload: Parameters<Resend["contacts"]["get"]>[0] |
| 56 | ): Promise<GetContactResult> { |
| 57 | return this.runTask( |
| 58 | key, |
| 59 | async (client, task) => { |
| 60 | const { error, data } = await client.contacts.get(payload); |
| 61 | |
| 62 | if (error) { |
| 63 | throw error; |
| 64 | } |
| 65 | |
| 66 | if (!data) { |
| 67 | throw new Error("No data returned from Resend"); |
| 68 | } |
| 69 | |
| 70 | return data; |
| 71 | }, |
| 72 | { |
| 73 | name: "Get Contact", |
| 74 | params: payload, |
| 75 | properties: [ |
| 76 | { |
| 77 | label: "Id", |
| 78 | text: payload.id, |
| 79 | }, |
| 80 | ], |
| 81 | retry: retry.standardBackoff, |
| 82 | }, |
| 83 | handleResendError |
| 84 | ); |
| 85 | } |
| 86 | |
| 87 | update( |
| 88 | key: IntegrationTaskKey, |
Callers
nothing calls this directly
Tested by
no test coverage detected