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

Method upsertCustomer

integrations/plain/src/index.ts:128–160  ·  view source on GitHub ↗
(
    key: IntegrationTaskKey,
    params: UpsertCustomerParams
  )

Source from the content-addressed store, hash-verified

126 }
127
128 upsertCustomer(
129 key: IntegrationTaskKey,
130 params: UpsertCustomerParams
131 ): Promise<UpsertCustomerResponse> {
132 return this.runTask(
133 key,
134 async (client) => {
135 const response = await client.upsertCustomer(params);
136
137 if (response.error) {
138 throw response.error;
139 } else {
140 return recursivelyRemoveTypenameProperties(response.data);
141 }
142 },
143 {
144 name: "Upsert Customer",
145 params,
146 icon: "plain",
147 properties: [
148 ...(params.identifier.customerId
149 ? [{ label: "Customer ID", text: params.identifier.customerId }]
150 : []),
151 ...(params.identifier.emailAddress
152 ? [{ label: "Email", text: params.identifier.emailAddress }]
153 : []),
154 ...(params.identifier.externalId
155 ? [{ label: "External ID", text: params.identifier.externalId }]
156 : []),
157 ],
158 }
159 );
160 }
161
162 upsertCustomTimelineEntry(
163 key: IntegrationTaskKey,

Callers 3

actionFunction · 0.80
actionFunction · 0.80
plain.tsFile · 0.80

Calls 2

runTaskMethod · 0.95

Tested by

no test coverage detected