Skip to content

@maxhealth.tech/prefab / actions / SubscribeOpts

Interface: SubscribeOpts ​

Defined in: actions/subscribe.ts:12

Properties ​

stateKey ​

ts
stateKey: string;

Defined in: actions/subscribe.ts:14

Reactive store key where incoming data is written.


push? ​

ts
optional push?: boolean;

Defined in: actions/subscribe.ts:16

false always polls, even on a host with subscriptions: a stateless server sends no resource notifications. Defaults to true.


fallbackInterval? ​

ts
optional fallbackInterval?: number;

Defined in: actions/subscribe.ts:18

Poll interval (ms) when the host does not support push subscriptions. Defaults to 2000.


fallbackTool? ​

ts
optional fallbackTool?: string;

Defined in: actions/subscribe.ts:20

Tool to call when polling in fallback mode.


fallbackArgs? ​

ts
optional fallbackArgs?: Record<string, unknown>;

Defined in: actions/subscribe.ts:22

Arguments passed to the fallback tool call.


onData? ​

ts
optional onData?: Action | Action[];

Defined in: actions/subscribe.ts:24

Action(s) executed whenever new data arrives (push or poll).


onError? ​

ts
optional onError?: Action | Action[];

Defined in: actions/subscribe.ts:26

Action(s) executed on subscription or poll error.

Released under the MIT License.