@imgly/plugin-ai-video-generation-web
Version:
AI video generation plugin for the CE.SDK editor
39 lines (38 loc) • 1.43 kB
TypeScript
import { type OpenAPIV3 } from 'openapi-types';
import CreativeEditorSDK, { CreativeEngine } from '@cesdk/cesdk-js';
import { Provider, RenderCustomProperty, VideoOutput, GetBlockInput, Middleware } from '@imgly/plugin-ai-generation-web';
import { VideoQuickActionSupportMap } from '../types';
type VideoProviderConfiguration = {
proxyUrl: string;
debug?: boolean;
middlewares?: Middleware<any, any>[];
/**
* @deprecated Use `middlewares` instead.
*/
middleware?: Middleware<any, any>[];
};
/**
* Creates a base provider from schema. This should work out of the box
* but may be rough around the edges and should/can be further customized.
*/
declare function createVideoProvider<I extends Record<string, any>>(options: {
modelKey: string;
name?: string;
schema: OpenAPIV3.Document;
inputReference: string;
useFlow?: 'placeholder' | 'generation-only';
initialize?: (context: {
cesdk?: CreativeEditorSDK;
engine: CreativeEngine;
}) => void;
renderCustomProperty?: RenderCustomProperty;
getBlockInput: GetBlockInput<'video', I>;
supportedQuickActions?: VideoQuickActionSupportMap<I>;
middleware?: Middleware<I, VideoOutput>[];
headers?: Record<string, string>;
cesdk?: CreativeEditorSDK;
}, config: VideoProviderConfiguration): Provider<'video', I, {
kind: 'video';
url: string;
}>;
export default createVideoProvider;