(
key: IntegrationTaskKey,
callback: (client: DummyClient, task: IOTask, io: IO) => Promise<TResult>,
options?: RunTaskOptions,
errorCallback?: RunTaskErrorCallback
)
| 46 | } |
| 47 | |
| 48 | runTask<T, TResult extends Json<T> | void>( |
| 49 | key: IntegrationTaskKey, |
| 50 | callback: (client: DummyClient, task: IOTask, io: IO) => Promise<TResult>, |
| 51 | options?: RunTaskOptions, |
| 52 | errorCallback?: RunTaskErrorCallback |
| 53 | ): Promise<TResult> { |
| 54 | if (!this._io) throw new Error("No IO"); |
| 55 | if (!this._connectionKey) throw new Error("No connection key"); |
| 56 | return this._io.runTask( |
| 57 | key, |
| 58 | (task, io) => { |
| 59 | if (!this._client) throw new Error("No client"); |
| 60 | return callback(this._client, task, io); |
| 61 | }, |
| 62 | { |
| 63 | icon: "dummy", |
| 64 | retry: retry.standardBackoff, |
| 65 | ...(options ?? {}), |
| 66 | connectionKey: this._connectionKey, |
| 67 | }, |
| 68 | errorCallback |
| 69 | ); |
| 70 | } |
| 71 | |
| 72 | taskOne(key: IntegrationTaskKey, params: Record<string, any>): Promise<void> { |
| 73 | return this.runTask( |
no outgoing calls
no test coverage detected