MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / update

Method update

integrations/resend/src/contacts.ts:87–119  ·  view source on GitHub ↗
(
    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

Calls 1

runTaskMethod · 0.45

Tested by

no test coverage detected