/**
 * Alibaba Cloud Model Studio Node - Version 1
 * Discriminator: resource=video, operation=imageToVideo
 */


interface Credentials {
  alibabaCloudApi: CredentialReference;
}

/** Generate a video from one or more images using Wan models */
export type LcAlibabaCloudV1VideoImageToVideoParams = {
  resource: 'video';
  operation: 'imageToVideo';
/**
 * The model to use for image-to-video generation
 * @default wan2.6-i2v-flash
 */
    modelId?: 'wan2.6-i2v-flash' | 'wan2.6-i2v' | Expression<string>;
/**
 * Input Type
 * @default url
 */
    inputType?: 'url' | 'binary' | Expression<string>;
/**
 * The URL of the first-frame image to generate video from
 * @displayOptions.show { inputType: ["url"] }
 */
    imgUrl: string | Expression<string>;
/**
 * Input Data Field Name
 * @hint The name of the input field containing the binary file data to be processed
 * @displayOptions.show { inputType: ["binary"] }
 * @default data
 */
    binaryPropertyName?: string | Expression<string>;
/**
 * A text prompt describing the desired content and visual characteristics for the generated video
 */
    prompt?: string | Expression<string>;
/**
 * Resolution tier of the generated video
 * @default 1080P
 */
    resolution?: '720P' | '1080P' | Expression<string>;
/**
 * Duration of the generated video in seconds (2–15)
 * @default 5
 */
    duration?: number | Expression<number>;
/**
 * Whether to generate a single-shot or multi-shot narrative video
 * @default single
 */
    shotType?: 'single' | 'multi' | Expression<string>;
/**
 * Whether to download the generated video as binary data. When disabled, only the video URL is returned.
 * @default true
 */
    downloadVideo?: boolean | Expression<boolean>;
/**
 * Whether to return a simplified version of the response instead of the raw data
 * @default true
 */
    simplify?: boolean | Expression<boolean>;
/**
 * Options
 * @default {}
 */
    imageToVideoOptions?: {
    /** Whether to automatically extend and enhance the prompt
     * @default false
     */
    promptExtend?: boolean | Expression<boolean>;
    /** Whether to generate audio for the video
     * @default true
     */
    audio?: boolean | Expression<boolean>;
    /** Audio Input Type
     * @default url
     */
    audioInputType?: 'url' | 'binary' | Expression<string>;
    /** URL of the audio file to use for the video
     * @displayOptions.show { audioInputType: ["url"] }
     */
    audioUrl?: string | Expression<string>;
    /** Audio Data Field Name
     * @hint The name of the input field containing the binary audio data
     * @displayOptions.show { audioInputType: ["binary"] }
     * @default audio
     */
    audioBinaryPropertyName?: string | Expression<string>;
  };
};

export interface LcAlibabaCloudV1VideoImageToVideoSubnodeConfig {
  tools?: ToolInstance[];
}

export type LcAlibabaCloudV1VideoImageToVideoNode = {
  type: '@n8n/n8n-nodes-langchain.alibabaCloud';
  version: 1;
  credentials?: Credentials;
  isTrigger: true;
  config: NodeConfig<LcAlibabaCloudV1VideoImageToVideoParams> & { subnodes?: LcAlibabaCloudV1VideoImageToVideoSubnodeConfig };
};