import { type OpenAPIV3 } from 'openapi-types'; import type CreativeEditorSDK from '@cesdk/cesdk-js'; import type { CreativeEngine } from '@cesdk/cesdk-js'; import { ImageOutput, RenderCustomProperty, GetBlockInput, Provider, Middleware } from '@imgly/plugin-ai-generation-web'; import { ImageQuickActionSupportMap } from '../types'; export interface BytedanceProviderConfiguration { proxyUrl: string; debug?: boolean; middlewares?: Middleware[]; /** * @deprecated Use `middlewares` instead. */ middleware?: Middleware[]; history?: false | '@imgly/local' | '@imgly/indexedDB' | (string & {}); supportedQuickActions?: { [quickActionId: string]: Partial[string]> | false | null; }; } interface CreateProviderOptions> { providerId: string; name: string; schema: OpenAPIV3.Document; inputReference: string; useFlow?: 'placeholder' | 'generation-only'; initialize?: (context: { cesdk?: CreativeEditorSDK; engine: CreativeEngine; }) => void; renderCustomProperty?: RenderCustomProperty; supportedQuickActions?: ImageQuickActionSupportMap; getBlockInput?: GetBlockInput<'image', I>; getImageSize?: (input: I) => { width: number; height: number; }; mapInput?: (input: I) => Record; middleware?: Middleware[]; headers?: Record; cesdk?: CreativeEditorSDK; } declare function createImageProvider>(options: CreateProviderOptions, config: BytedanceProviderConfiguration): Provider<'image', I, ImageOutput>; export default createImageProvider;