diff --git a/src/index.ts b/src/index.ts index 7e41dce..325614d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -409,4 +409,20 @@ export class GelatoRelay { offError = (handler: (error: Error) => void): void => { this.#websocketHandler.offError(handler); }; + + /** + * @param {string} taskId - Task Id + * + */ + subscribeTaskStatusUpdate = async (taskId: string): Promise => { + await this.#websocketHandler.subscribe(taskId); + }; + + /** + * @param {string} taskId - Task Id + * + */ + unsubscribeTaskStatusUpdate = async (taskId: string): Promise => { + await this.#websocketHandler.unsubscribe(taskId); + }; }