/**
 * OpenAI Node - Version 1.1
 * Discriminator: resource=image, operation=generate
 */


interface Credentials {
  openAiApi: CredentialReference;
}

/** Creates audio from a text prompt */
export type LcOpenAiV11ImageGenerateParams = {
  resource: 'image';
  operation: 'generate';
/**
 * The model to use for image generation
 * @default dall-e-3
 */
    model?: 'dall-e-2' | 'dall-e-3' | 'gpt-image-1' | Expression<string>;
/**
 * A text description of the desired image(s). The maximum length is 1000 characters for dall-e-2 and 4000 characters for dall-e-3.
 */
    prompt?: string | Expression<string>;
/**
 * Options
 * @default {}
 */
    options?: {
    /** Number of images to generate
     * @displayOptions.show { /model: ["dall-e-2"] }
     * @default 1
     */
    n?: number | Expression<number>;
    /** The quality of the image that will be generated, HD creates images with finer details and greater consistency across the image
     * @displayOptions.show { /model: ["dall-e-3"] }
     * @default standard
     */
    dalleQuality?: 'hd' | 'standard' | Expression<string>;
    /** The quality of the image that will be generated, High creates images with finer details and greater consistency across the image
     * @displayOptions.show { /model: ["gpt-image-1"] }
     * @default medium
     */
    quality?: 'high' | 'medium' | 'low' | Expression<string>;
    /** Resolution
     * @displayOptions.show { /model: ["dall-e-2"] }
     * @default 1024x1024
     */
    size?: '256x256' | '512x512' | '1024x1024' | Expression<string>;
    /** Resolution
     * @displayOptions.show { /model: ["dall-e-3"] }
     * @default 1024x1024
     */
    size?: '1024x1024' | '1792x1024' | '1024x1792' | Expression<string>;
    /** Resolution
     * @displayOptions.show { /model: ["gpt-image-1"] }
     * @default 1024x1024
     */
    size?: '1024x1024' | '1024x1536' | '1536x1024' | Expression<string>;
    /** Style
     * @displayOptions.show { /model: ["dall-e-3"] }
     * @default vivid
     */
    style?: 'natural' | 'vivid' | Expression<string>;
    /** Whether to return image URL(s) instead of binary file(s)
     * @displayOptions.hide { /model: ["gpt-image-1"] }
     * @default false
     */
    returnImageUrls?: boolean | Expression<boolean>;
    /** Put Output in Field
     * @hint The name of the output field to put the binary file data in
     * @displayOptions.show { returnImageUrls: [false] }
     * @default data
     */
    binaryPropertyOutput?: string | Expression<string>;
  };
};

export interface LcOpenAiV11ImageGenerateSubnodeConfig {
  tools?: ToolInstance[];
  memory?: MemoryInstance;
}

export type LcOpenAiV11ImageGenerateNode = {
  type: '@n8n/n8n-nodes-langchain.openAi';
  version: 1.1;
  credentials?: Credentials;
  isTrigger: true;
  config: NodeConfig<LcOpenAiV11ImageGenerateParams> & { subnodes?: LcOpenAiV11ImageGenerateSubnodeConfig };
};