watchtower-node-sdk
Version:
A TypeScript Node.js SDK for the Watchtower API, providing API key management, connection string generation, and more
32 lines (31 loc) • 1.43 kB
TypeScript
import { BaseEndpoint } from '../base';
import { PredictRequest, PredictResponse, PredictConfigResponse, DecideRequest, DecideResponse } from './types';
export declare class IntelligenceEndpoint extends BaseEndpoint {
constructor(client: any);
private validateRequiredKeys;
/**
* Get prediction configuration and available options
* @returns Promise with the prediction configuration
* @throws {AuthenticationError} If API keys are invalid
* @throws {ServerError} If server encounters an error
*/
getPredictConfig(): Promise<PredictConfigResponse>;
/**
* Get a prediction for an item
* @param data - The prediction request parameters
* @returns Promise with the prediction response
* @throws {InvalidRequestError} If required fields are missing or invalid
* @throws {AuthenticationError} If API keys are invalid
* @throws {ServerError} If server encounters an error
*/
predict(data: PredictRequest): Promise<PredictResponse>;
/**
* Get a decision based on log data
* @param data - The decision request parameters
* @returns Promise with the decision response
* @throws {InvalidRequestError} If required fields are missing or invalid
* @throws {AuthenticationError} If API keys are invalid
* @throws {ServerError} If server encounters an error
*/
decide(data: DecideRequest): Promise<DecideResponse>;
}