@noves/intent-typescript-sdk
Version:
Noves Intent Typescript SDK
17 lines (16 loc) • 950 B
TypeScript
import { IntentSDKBase } from '../shared/base';
import { Intent } from '../shared/types';
import { IntentResponse, IntentMap } from '../types/generated';
import { ValueIntentId, StreamableIntentId } from '../types/generated';
export declare class ClientSideIntentSDK extends IntentSDKBase {
private activeWebSocketConnections;
private wsUrl;
constructor();
protected loadIntents(): Promise<void>;
getValue<T extends ValueIntentId>(intentId: T, params?: IntentMap[T]['params'], pageSize?: number): Promise<IntentResponse<T>>;
getStream<T extends StreamableIntentId>(intentId: T, params: IntentMap[T]['params'], onData: (data: IntentResponse<T>) => void, onError?: (error: Error) => void, onComplete?: () => void): Promise<void>;
private stringifyParams;
stopStream(intentId: string): void;
getIntents(): Promise<Intent[]>;
protected executeIntent(intentId: string, params: Record<string, any>): Promise<any>;
}