UNPKG

imgproxyjs

Version:

ImgProxy javascript client for node/browser

83 lines (82 loc) 3.9 kB
/// <reference types="node" /> import { Buffer } from 'buffer'; import { Transformers } from './transformer'; import { Abbreviations, Options, Settings, ValueOf } from './types'; export declare class ImgProxy extends Transformers { private options; private abbreviations; private transformers; constructor({ url, key, salt, autoreset }: Settings, options?: Options); setAutoreset(autoreset: boolean): this; setOption(option: keyof Options, value: ValueOf<Options>): this; private setOptions; setDefaultOptions(options: Options): this; resetDefaultOptions(): this; resetOptions(): this; resetOption(option: ValueOf<Abbreviations>): this; resize(val: Options['resize']): this; crop(val: Options['crop']): this; size(val: Options['size']): this; fallbackImageUrl(val: Options['fallback_image_url']): this; skipProcessing(val: Options['skip_processing']): this; expires(val: Options['expires']): this; extend(val: Options['extend']): this; trim(val: Options['trim']): this; adjust(val: Options['adjust']): this; maxSrcResolution(val: Options['max_src_resolution']): this; maxSrcFileSize(val: Options['max_src_file_size']): this; maxAnimationFrames(val: Options['max_animation_frames']): this; maxAnimationFramesResolution(val: Options['max_animation_frame_resolution']): this; resizingType(val: Options['resizing_type']): this; enforceThumbnail(val: Options['enforce_thumbnail']): this; formatQuality(val: Options['format_quality']): this; resizingAlgorithm(val: Options['resizing_algorithm']): this; width(width: Options['width']): this; height(height: Options['height']): this; minWidth(minWidth: Options['min_width']): this; minHeight(minHeight: Options['min_height']): this; dpr(val: Options['dpr']): this; dpi(val: Options['dpi']): this; gradient(val: Options['gradient']): this; maxBytes(val: Options['max_bytes']): this; padding(val: Options['padding']): this; enlarge(val: Options['enlarge']): this; pixelate(val: Options['pixelate']): this; gravity(val: Options['gravity']): this; quality(quality: Options['quality']): this; background(color: Options['background']): this; backgroundAlpha(val: Options['background_alpha']): this; blur(val: Options['blur']): this; blurDetections(val: Options['blur_detections']): this; unsharpMasking(val: Options['unsharp_masking']): this; drawDetections(val: Options['draw_detections']): this; raw(val: Options['raw']): this; returnAttachment(val: Options['return_attachment']): this; saturation(val: Options['saturation']): this; contrast(val: Options['contrast']): this; brightness(val: Options['brightness']): this; sharpen(val: Options['sharpen']): this; watermark(val: Options['watermark']): this; watermarkUrl(val: Options['watermark_url']): this; preset(val: Options['preset']): this; cacheBuster(val: Options['cachebuster']): this; format(val: Options['format']): this; filename(val: Options['filename']): this; rotate(val: Options['rotate']): this; autoRotate(val: Options['auto_rotate']): this; style(val: Options['style']): this; page(val: Options['page']): this; zoom(val: Options['zoom']): this; videoThumbnailSecond(val: Options['video_thumbnail_second']): this; webpOptions(val: Options['webp_options']): this; stripMetadata(val: Options['strip_metadata']): this; keepCopyright(val: Options['keep_copyright']): this; stripColorProfile(val: Options['strip_color_profile']): this; gifOptions(val: Options['gif_options']): this; pngOptions(val: Options['png_options']): this; private sign; static hexDecode(hex: string): Buffer; static urlSafeBase64(string: Buffer | string): string; get(originalImage: string): string; } export default ImgProxy;