/// import { Host, Options, QingStorError } from '../typings'; import { IReqOptionsWithBodyResOnly, PicGo } from 'picgo'; /** * Generate signature of qingstor. * @param options {Options} PicGo options, AKA infos user entered. * @param fileName {string} The upload image's name, AKA object key in oss. * @param extname {string} extname for Content-Type in request headers. * @return {string} The generated signature. */ export declare function generateSignature(options: Options, fileName: string, extname: string): string; /** * Generate the upload path. * @param path {string} User entered path. * @return {string} the encoded path. */ export declare function generatePath(path: string): string; /** * Get the request host. * @param customUrl {string} Custom url user entered. * @return {Host} The Host, which contains protocol and host. */ export declare function getHost(customUrl: string): Host; /** * Get the upload options. * @param options {Options} User entered infos. * @param fileName {string} The file's name. * @param signature {string} The signature for upload. * @param image {Buffer} The image file's buffer. * @param extname {string} ext name. * @return {typeof request} The request info. */ export declare function uploadOptions(options: Options, fileName: string, signature: string, image: Buffer, extname: string): IReqOptionsWithBodyResOnly; /** * Handle the request error and notify the user with the message. * @param ctx {PicGo} The context to show the notification. * @param err {QingStorError} The request error. */ export declare function handleError(ctx: PicGo, err: QingStorError): void;