@fluxbase/sdk 2026.1.6 → 2026.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -4938,13 +4938,17 @@ interface RPCInvokeOptions {
4938
4938
  namespace?: string;
4939
4939
  /** Execute asynchronously (returns execution ID immediately) */
4940
4940
  async?: boolean;
4941
+ /** Request timeout in milliseconds (default: 30000) */
4942
+ timeout?: number;
4941
4943
  }
4942
4944
  /**
4943
4945
  * Fetch interface for RPC operations
4944
4946
  */
4945
4947
  interface RPCFetch {
4946
4948
  get: <T>(path: string) => Promise<T>;
4947
- post: <T>(path: string, body?: unknown) => Promise<T>;
4949
+ post: <T>(path: string, body?: unknown, options?: {
4950
+ timeout?: number;
4951
+ }) => Promise<T>;
4948
4952
  }
4949
4953
  /**
4950
4954
  * FluxbaseRPC provides methods for invoking RPC procedures
package/dist/index.d.ts CHANGED
@@ -4938,13 +4938,17 @@ interface RPCInvokeOptions {
4938
4938
  namespace?: string;
4939
4939
  /** Execute asynchronously (returns execution ID immediately) */
4940
4940
  async?: boolean;
4941
+ /** Request timeout in milliseconds (default: 30000) */
4942
+ timeout?: number;
4941
4943
  }
4942
4944
  /**
4943
4945
  * Fetch interface for RPC operations
4944
4946
  */
4945
4947
  interface RPCFetch {
4946
4948
  get: <T>(path: string) => Promise<T>;
4947
- post: <T>(path: string, body?: unknown) => Promise<T>;
4949
+ post: <T>(path: string, body?: unknown, options?: {
4950
+ timeout?: number;
4951
+ }) => Promise<T>;
4948
4952
  }
4949
4953
  /**
4950
4954
  * FluxbaseRPC provides methods for invoking RPC procedures
package/dist/index.js CHANGED
@@ -3714,9 +3714,7 @@ var FluxbaseRPC = class {
3714
3714
  async list(namespace) {
3715
3715
  try {
3716
3716
  const params = namespace ? `?namespace=${encodeURIComponent(namespace)}` : "";
3717
- const response = await this.fetch.get(
3718
- `/api/v1/rpc/procedures${params}`
3719
- );
3717
+ const response = await this.fetch.get(`/api/v1/rpc/procedures${params}`);
3720
3718
  return { data: response.procedures || [], error: null };
3721
3719
  } catch (error) {
3722
3720
  return { data: null, error };
@@ -3754,7 +3752,8 @@ var FluxbaseRPC = class {
3754
3752
  {
3755
3753
  params,
3756
3754
  async: options?.async
3757
- }
3755
+ },
3756
+ { timeout: options?.timeout }
3758
3757
  );
3759
3758
  return { data: response, error: null };
3760
3759
  } catch (error) {
@@ -3853,7 +3852,10 @@ var FluxbaseRPC = class {
3853
3852
  await new Promise((resolve) => setTimeout(resolve, interval));
3854
3853
  interval = Math.min(interval * 1.5, maxInterval);
3855
3854
  }
3856
- return { data: null, error: new Error("Timeout waiting for execution to complete") };
3855
+ return {
3856
+ data: null,
3857
+ error: new Error("Timeout waiting for execution to complete")
3858
+ };
3857
3859
  }
3858
3860
  };
3859
3861