import type { APIPromise } from '../core/api-promise'; import type { RequestOptions } from '../internal/request-options'; import { Generate, type GenerateCaptionParams, type GenerateCaptionResponse, type GenerateDescribeStyleParams, type GenerateDescribeStyleResponse, type GenerateDetectParams, type GenerateDetectResponse, type GenerateEmbedParams, type GenerateEmbedResponse, type GeneratePatchParams, type GeneratePatchResponse, type GenerateRunModelParams, type GenerateRunModelResponse, type GenerateTranslateParams, type GenerateTranslateResponse, } from '../resources/generate'; import { type WithJob, enhanceJob } from './job'; /** * Enhanced Generate resource. * All original methods are inherited. Job-producing methods return * responses where `job` has `.wait()`. */ export class EnhancedGenerate extends Generate { override caption( params: GenerateCaptionParams, options?: RequestOptions, ): APIPromise> { return enhanceJob(this._client, super.caption(params, options), options); } override describeStyle( params: GenerateDescribeStyleParams, options?: RequestOptions, ): APIPromise> { return enhanceJob(this._client, super.describeStyle(params, options), options); } override detect( params: GenerateDetectParams, options?: RequestOptions, ): APIPromise> { return enhanceJob(this._client, super.detect(params, options), options); } override embed( params: GenerateEmbedParams, options?: RequestOptions, ): APIPromise> { return enhanceJob(this._client, super.embed(params, options), options); } override patch( params: GeneratePatchParams, options?: RequestOptions, ): APIPromise> { return enhanceJob(this._client, super.patch(params, options), options); } override runModel( modelID: string, params: GenerateRunModelParams, options?: RequestOptions, ): APIPromise> { return enhanceJob(this._client, super.runModel(modelID, params, options), options); } override translate( params: GenerateTranslateParams, options?: RequestOptions, ): APIPromise> { return enhanceJob(this._client, super.translate(params, options), options); } }