(
key: IntegrationTaskKey,
params: UpsertCustomTimelineEntryParams
)
| 160 | } |
| 161 | |
| 162 | upsertCustomTimelineEntry( |
| 163 | key: IntegrationTaskKey, |
| 164 | params: UpsertCustomTimelineEntryParams |
| 165 | ): Promise<UpsertCustomTimelineEntryResponse> { |
| 166 | return this.runTask( |
| 167 | key, |
| 168 | async (client) => { |
| 169 | const response = await client.upsertCustomTimelineEntry(params); |
| 170 | |
| 171 | if (response.error) { |
| 172 | throw response.error; |
| 173 | } else { |
| 174 | return recursivelyRemoveTypenameProperties(response.data); |
| 175 | } |
| 176 | }, |
| 177 | { |
| 178 | name: "Upsert Customer Timeline Entry", |
| 179 | params, |
| 180 | icon: "plain", |
| 181 | properties: [ |
| 182 | { label: "Customer ID", text: params.customerId }, |
| 183 | { label: "Title", text: params.title }, |
| 184 | { |
| 185 | label: "Components count", |
| 186 | text: params.components.length.toString(), |
| 187 | }, |
| 188 | ], |
| 189 | } |
| 190 | ); |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | function isPlainError(error: unknown): error is PlainSDKError { |
no test coverage detected