oxylabs-ai-studio
Version:
JavaScript SDK for Oxylabs AI Studio API services
128 lines • 3.14 kB
TypeScript
export interface SDKConfig {
apiUrl?: string;
apiKey?: string;
timeout?: number;
retryAttempts?: number;
debug?: boolean;
}
export declare enum RunStatus {
PENDING = "pending",
RUNNING = "running",
COMPLETED = "completed",
SUCCESS = "success",
FAILED = "failed",
ERROR = "error"
}
export declare enum OutputFormat {
MARKDOWN = "markdown",
JSON = "json"
}
export interface ApiResponse<T = any> {
data?: T;
message?: string;
error?: string;
status?: string;
}
export interface RunResponse {
run_id: string;
id?: string;
status: RunStatus;
message?: string;
error?: string;
}
export interface RunStatusResponse {
status: RunStatus;
message?: string;
error?: string;
}
export interface SchemaResponse {
openapi_schema: Record<string, any>;
}
export interface GenerateSchemaOptions {
user_prompt: string;
}
export interface ScrapeOptions {
url: string;
output_format?: OutputFormat | string;
schema?: Record<string, any>;
render_javascript?: boolean;
geo_location?: string;
}
export interface ScrapeWithAutoSchemaOptions {
url: string;
parse_prompt: string;
output_format?: OutputFormat | string;
render_javascript?: boolean;
geo_location?: string;
}
export interface CrawlOptions {
url: string;
user_prompt: string;
output_format?: OutputFormat | string;
schema?: Record<string, any>;
render_javascript?: boolean;
return_sources_limit?: number;
geo_location?: string;
}
export interface CrawlWithAutoSchemaOptions {
url: string;
user_prompt: string;
parse_prompt: string;
output_format: OutputFormat | string;
schema?: Record<string, any>;
render_javascript?: boolean;
return_sources_limit?: number;
geo_location?: string;
}
export interface BrowseOptions {
url: string;
user_prompt: string;
output_format: OutputFormat | string;
schema?: Record<string, any>;
geo_location?: string;
}
export interface BrowseWithAutoSchemaOptions {
url: string;
user_prompt: string;
parse_prompt: string;
output_format?: OutputFormat | string;
render_javascript?: boolean;
geo_location?: string;
}
export interface HttpRequestConfig {
headers?: Record<string, string>;
timeout?: number;
[key: string]: any;
}
export interface SearchOptions {
query: string;
limit?: number;
render_javascript?: boolean;
return_content?: boolean;
geo_location?: string;
}
export interface SearchResult {
url: string;
title: string;
description: string;
content?: string | null;
}
export interface SearchRunDataResponse {
status: 'processing' | 'completed' | 'failed';
message?: string | null;
data?: SearchResult[] | null;
}
export interface AiSearchRun {
run_id: string;
message: string | null;
data: SearchResult[] | null;
}
export interface MapOptions {
url: string;
user_prompt?: string;
max_depth?: number;
return_sources_limit?: number;
geo_location?: string;
render_javascript?: boolean;
}
//# sourceMappingURL=types.d.ts.map