(key: IntegrationTaskKey, status: StatusUpdate)
| 9 | ) {} |
| 10 | |
| 11 | async update(key: IntegrationTaskKey, status: StatusUpdate) { |
| 12 | const properties: DisplayProperty[] = []; |
| 13 | |
| 14 | if (status.label) { |
| 15 | properties.push({ |
| 16 | label: "Label", |
| 17 | text: status.label, |
| 18 | }); |
| 19 | } |
| 20 | |
| 21 | if (status.state) { |
| 22 | properties.push({ |
| 23 | label: "State", |
| 24 | text: status.state, |
| 25 | }); |
| 26 | } |
| 27 | |
| 28 | return await this.io.runTask( |
| 29 | key, |
| 30 | async (task) => { |
| 31 | return await this.io.triggerClient.updateStatus(this.io.runId, this.id, status); |
| 32 | }, |
| 33 | { |
| 34 | name: status.label ?? `Status update`, |
| 35 | icon: "bell", |
| 36 | params: { |
| 37 | ...status, |
| 38 | }, |
| 39 | properties, |
| 40 | } |
| 41 | ); |
| 42 | } |
| 43 | } |
no test coverage detected