diff --git a/apps/demo-nextjs-app-router/app/api/fal/proxy/route.ts b/apps/demo-nextjs-app-router/app/api/fal/proxy/route.ts
index 998ab54..9a14c5c 100644
--- a/apps/demo-nextjs-app-router/app/api/fal/proxy/route.ts
+++ b/apps/demo-nextjs-app-router/app/api/fal/proxy/route.ts
@@ -1,3 +1,3 @@
import { route } from '@fal-ai/serverless-proxy/nextjs';
-export const { GET, POST } = route;
+export const { GET, POST, PUT } = route;
diff --git a/libs/client/package.json b/libs/client/package.json
index 4601abb..6e979c5 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.14.0-alpha.2",
+ "version": "0.14.0-alpha.3",
"license": "MIT",
"repository": {
"type": "git",
diff --git a/libs/client/src/function.ts b/libs/client/src/function.ts
index aa306a0..be10835 100644
--- a/libs/client/src/function.ts
+++ b/libs/client/src/function.ts
@@ -2,7 +2,12 @@ import { getTemporaryAuthToken } from './auth';
import { dispatchRequest } from './request';
import { storageImpl } from './storage';
import { FalStream } from './streaming';
-import { EnqueueResult, QueueStatus, RequestLog } from './types';
+import {
+ CompletedQueueStatus,
+ EnqueueResult,
+ QueueStatus,
+ RequestLog,
+} from './types';
import { ensureAppIdFormat, isUUIDv4, isValidUrl, parseAppId } from './utils';
/**
@@ -110,6 +115,9 @@ export async function send(
);
}
+export type QueueStatusSubscriptionOptions = QueueStatusOptions &
+ Omit;
+
/**
* Runs a fal serverless function identified by its `id`.
*
@@ -123,93 +131,10 @@ export async function run(
return send(id, options);
}
-type TimeoutId = ReturnType;
+type TimeoutId = ReturnType | undefined;
const DEFAULT_POLL_INTERVAL = 500;
-/**
- * Subscribes to updates for a specific request in the queue.
- *
- * @param id - The ID or URL of the function web endpoint.
- * @param options - Options to configure how the request is run and how updates are received.
- * @returns A promise that resolves to the result of the request once it's completed.
- */
-export async function subscribe(
- id: string,
- options: RunOptions & QueueSubscribeOptions = {}
-): Promise