socaity
Version:
SDK for Generative AI. Build AI-powered applications with ease
39 lines (38 loc) • 1.1 kB
TypeScript
import { SocaityJob } from '../../types';
/**
* Parses API responses into standardized SocaityJob format
*/
export declare class ResponseParser {
/**
* Parse response into standardized job format
* @param response - API response object or string
* @returns Standardized SocaityJob object
*/
parse(response: unknown): Promise<SocaityJob>;
/**
* Parse object responses into SocaityJob
* @param response - Object to parse
*/
private parseObject;
/**
* Creates a standard error job response
* @param errorMessage - Error message to include
*/
private createErrorJob;
/**
* Parse date from various formats
* @param dateValue - Date value to parse
*/
private parseDate;
/**
* Parse status from different API formats
* @param status - Status string to parse
*/
private parseStatus;
/**
* Parse progress from different API formats
* @param response - Response object containing progress information
* @param status - Parsed job status
*/
private parseProgress;
}