mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-15 00:56:26 +00:00
42 lines
1,012 B
TypeScript
42 lines
1,012 B
TypeScript
import got from 'got';
|
|
|
|
export interface IGotApiOptions {
|
|
useCache?: boolean;
|
|
hostType?: string;
|
|
body?: any;
|
|
}
|
|
|
|
export interface IGotApi<TOptions extends object = any> {
|
|
get<T extends object = any>(
|
|
url: string,
|
|
options?: IGotApiOptions & TOptions
|
|
): Promise<got.Response<T>>;
|
|
post<T extends object = any>(
|
|
url: string,
|
|
options?: IGotApiOptions & TOptions
|
|
): Promise<got.Response<T>>;
|
|
put<T extends object = any>(
|
|
url: string,
|
|
options?: IGotApiOptions & TOptions
|
|
): Promise<got.Response<T>>;
|
|
patch<T extends object = any>(
|
|
url: string,
|
|
options?: IGotApiOptions & TOptions
|
|
): Promise<got.Response<T>>;
|
|
head<T extends object = any>(
|
|
url: string,
|
|
options?: IGotApiOptions & TOptions
|
|
): Promise<got.Response<T>>;
|
|
delete<T extends object = any>(
|
|
url: string,
|
|
options?: IGotApiOptions & TOptions
|
|
): Promise<got.Response<T>>;
|
|
|
|
reset(): void;
|
|
|
|
setBaseUrl(endpoint: string): void;
|
|
}
|
|
|
|
export interface PlatformConfig {
|
|
isFork: boolean;
|
|
}
|