diff --git a/src/types/module.ts b/src/types/module.ts index 30880e8f3..6d27e60fc 100644 --- a/src/types/module.ts +++ b/src/types/module.ts @@ -1,5 +1,5 @@ import type { IPXOptions } from 'ipx' -import type { ImageOptions, CreateImageOptions } from './image' +import type { ImageOptions, CreateImageOptions, ImageModifiers } from './image' // eslint-disable-next-line no-use-before-define export type ProviderSetup = (providerOptions: ImageModuleProvider, moduleOptions: ModuleOptions, nuxt: any) @@ -12,8 +12,35 @@ export interface InputProvider { setup?: ProviderSetup } +export interface CloudinaryModifiers extends ImageModifiers { + format: string + quality: string + background: string + rotate: 'auto_right' | 'auto_left' | 'ignore' | 'vflip' | 'hflip' | number + roundCorner: string + gravity: string + effect: string + color: string + flags: string + dpr: string + opacity: number + overlay: string + underlay: string + transformation: string + zoom: number + colorSpace: string + customFunc: string + density: number +} + +export interface CloudinaryOptions { + baseURL: string + modifiers: Partial + [key: string]: any +} + export interface ImageProviders { - cloudinary?: any + cloudinary?: Partial contentful?: any fastly?: any glide?: any