diff --git a/libs/client/package.json b/libs/client/package.json index 4c5ed4e..4a32c32 100644 --- a/libs/client/package.json +++ b/libs/client/package.json @@ -1,7 +1,7 @@ { "name": "@fal-ai/serverless-client", "description": "The fal serverless JS/TS client", - "version": "0.4.0", + "version": "0.4.1", "license": "MIT", "repository": { "type": "git", diff --git a/libs/client/src/function.ts b/libs/client/src/function.ts index 72ac996..5713ea8 100644 --- a/libs/client/src/function.ts +++ b/libs/client/src/function.ts @@ -126,7 +126,6 @@ export async function subscribe( if (options.onEnqueue) { options.onEnqueue(requestId); } - const path = options.path ?? ''; return new Promise((resolve, reject) => { let timeoutId: ReturnType; const pollInterval = options.pollInterval ?? 1000; @@ -135,7 +134,6 @@ export async function subscribe( const requestStatus = await queue.status(id, { requestId, logs: options.logs ?? false, - path, }); if (options.onQueueUpdate) { options.onQueueUpdate(requestStatus); @@ -143,7 +141,7 @@ export async function subscribe( if (requestStatus.status === 'COMPLETED') { clearTimeout(timeoutId); try { - const result = await queue.result(id, { requestId, path }); + const result = await queue.result(id, { requestId }); resolve(result); } catch (error) { reject(error); @@ -194,10 +192,6 @@ type BaseQueueOptions = { * The unique identifier for the enqueued request. */ requestId: string; - /** - * The path to the function, if any. Defaults to ``. - */ - path?: string; }; type QueueStatusOptions = BaseQueueOptions & { @@ -268,11 +262,11 @@ export const queue: Queue = { }, async status( id: string, - { requestId, logs = false, path = '' }: QueueStatusOptions + { requestId, logs = false }: QueueStatusOptions ): Promise { return run(id, { method: 'get', - path: `/fal/queue/requests/${requestId}/status${path}`, + path: `/fal/queue/requests/${requestId}/status`, input: { logs: logs ? '1' : '0', }, @@ -280,11 +274,11 @@ export const queue: Queue = { }, async result( id: string, - { requestId, path = '' }: BaseQueueOptions + { requestId }: BaseQueueOptions ): Promise { return run(id, { method: 'get', - path: `/fal/queue/requests/${requestId}/response${path}`, + path: `/fal/queue/requests/${requestId}/response`, }); }, subscribe,