mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-19 02:56:24 +00:00
67 lines
1.6 KiB
TypeScript
67 lines
1.6 KiB
TypeScript
import got from 'got';
|
|
|
|
export interface GotApiOptions {
|
|
useCache?: boolean;
|
|
hostType?: string;
|
|
body?: any;
|
|
}
|
|
|
|
export type GotResponse<T extends object = any> = got.Response<T>;
|
|
|
|
export interface GotApi<TOptions extends object = any> {
|
|
get<T extends object = any>(
|
|
url: string,
|
|
options?: GotApiOptions & TOptions
|
|
): Promise<GotResponse<T>>;
|
|
post<T extends object = any>(
|
|
url: string,
|
|
options?: GotApiOptions & TOptions
|
|
): Promise<GotResponse<T>>;
|
|
put<T extends object = any>(
|
|
url: string,
|
|
options?: GotApiOptions & TOptions
|
|
): Promise<GotResponse<T>>;
|
|
patch<T extends object = any>(
|
|
url: string,
|
|
options?: GotApiOptions & TOptions
|
|
): Promise<GotResponse<T>>;
|
|
head<T extends object = any>(
|
|
url: string,
|
|
options?: GotApiOptions & TOptions
|
|
): Promise<GotResponse<T>>;
|
|
delete<T extends object = any>(
|
|
url: string,
|
|
options?: GotApiOptions & TOptions
|
|
): Promise<GotResponse<T>>;
|
|
|
|
reset(): void;
|
|
|
|
setBaseUrl(endpoint: string): void;
|
|
}
|
|
|
|
export interface PlatformConfig {
|
|
endpoint: string;
|
|
renovateUsername?: any;
|
|
gitAuthor?: any;
|
|
}
|
|
|
|
export interface RepoConfig {
|
|
endpoint?: string;
|
|
renovateUsername?: any;
|
|
gitAuthor?: any;
|
|
isFork: boolean;
|
|
}
|
|
|
|
export interface RepoParams {
|
|
azureWorkItemId?: number; // shouldn't this be configurable within a renovate.json?
|
|
bbUseDefaultReviewers?: boolean; // shouldn't this be configurable within a renovate.json?
|
|
gitPrivateKey?: string;
|
|
localDir: string;
|
|
optimizeForDisabled: boolean;
|
|
repository: string;
|
|
endpoint?: string;
|
|
forkMode?: string;
|
|
forkToken?: string;
|
|
includeForks?: boolean;
|
|
renovateUsername?: string;
|
|
}
|