picgo-plugin-gitee-uploader
Version:
picgo uploader for gitee
58 lines (57 loc) • 1.62 kB
TypeScript
import picgo from 'picgo';
import { PluginConfig, ImgType } from './interface';
import { ImgInfo } from 'picgo/dist/utils/interfaces';
export declare class Octo {
username: string;
password: string;
clientId: string;
clientSecret: string;
owner: string;
repo: string;
branch: string;
path: string;
token: string;
customUrl: string;
ctx: picgo;
baseUrl: string;
constructor({ repo, branch, path, token, customPath, customUrl }: PluginConfig, ctx: picgo);
getTree(sha: any): Promise<{
path: string;
sha: string;
}[]>;
getPathTree(): Promise<{
sha: string;
tree: any[];
}>;
getDataJson(): Promise<{
lastSync: string;
data: any[];
sha?: string;
}>;
updateDataJson({ data, sha }: {
data: any;
sha: any;
}): Promise<boolean>;
createDataJson(data: any): Promise<boolean>;
upload(img: ImgInfo): Promise<{
imgUrl: any;
sha: any;
}>;
removeFile(img: ImgType): Promise<any>;
uploadOptions: (url: any, method: any, content: any, msg: any) => {
method: any;
json: boolean;
resolveWithFullResponse: boolean;
url: any;
formData: {
access_token: any;
content: any;
message: any;
branch: any;
};
};
fileOptions: (fileName: any) => any;
parseUrl(fileName: any): any;
}
export declare function getIns(config: PluginConfig, ctx: picgo): Octo;
export declare function clearIns(): void;