import type { StrictUnion } from 'simplytyped'; import Fellow from 'fellow'; import { MultiOptions } from '@bevry/github-repos'; import { GitHubCredentials } from '@bevry/github-api'; /** Collection of fellows */ export type Fellows = Set; /** Export some types we consume, so that others can also use them. */ export { Fellow }; export type { MultiOptions }; /** GitHub's response when an error occurs. */ interface GitHubError { message: string; } /** * GitHub's response to getting a repository. * https://developer.github.com/v3/repos/#list-contributors */ export interface GitHubContributor { login: string; id: number; node_id: string; avatar_url: string; gravatar_id: string; url: string; html_url: string; followers_url: string; following_url: string; gists_url: string; starred_url: string; subscriptions_url: string; organizations_url: string; repos_url: string; events_url: string; received_events_url: string; type: string; site_admin: boolean; /** Count of how many contributions */ contributions: number; } export type GitHubContributorsResponse = StrictUnion>; /** * GitHub's response to getting a user. * https://developer.github.com/v3/users/#get-a-single-user */ export interface GitHubProfile { login: string; id: number; node_id: string; avatar_url: string; gravatar_id: string; url: string; html_url: string; followers_url: string; following_url: string; gists_url: string; starred_url: string; subscriptions_url: string; organizations_url: string; repos_url: string; events_url: string; received_events_url: string; type: string; site_admin: false; name: string; company: string; blog: string; location: string; email: string; hireable: boolean; bio: string; public_repos: number; public_gists: number; followers: number; following: number; created_at: string; updated_at: string; } export type GitHubProfileResponse = StrictUnion; /** * Fetch the full profile information for a contributor. * @param url the full api url for the contributor data * @param credentials custom github credentials, omit to use the environment variables */ export declare function getContributorProfile(url: string, credentials?: GitHubCredentials): Promise; /** * Fetch contributors from a Repository's GitHub Contributor API. * @param slug the repository slug to fetch the contributors for, e.g. `"bevry/github-contributors"` * @param opts custom search options * @param credentials custom github credentials, omit to use the environment variables */ export declare function getContributorsFromRepoContributorData(slug: string, opts?: MultiOptions, credentials?: GitHubCredentials): Promise; /** * Fetch contributors from a repository's `package.json` file. * @param slug the repository slug for the package to fetch the contributors for, e.g. `"bevry/github-contributors"` */ export declare function getContributorsFromRepoPackageData(slug: string): Promise; /** * Fetch contributors from a GitHub repository slug. * @param slug the repository slug to fetch the contributors for, e.g. `"bevry/github-contributors"` * @param opts custom search options * @param credentials custom github credentials, omit to use the environment variables */ export declare function getContributorsFromRepo(slug: string, opts?: MultiOptions, credentials?: GitHubCredentials): Promise; /** * Fetch contributors from GitHub repository slugs. * @param slugs array of repository slugs to fetch the contributors for, e.g. `["bevry/github-contributors"]` * @param opts custom search options * @param credentials custom github credentials, omit to use the environment variables */ export declare function getContributorsFromRepos(slugs: Array, opts?: MultiOptions, credentials?: GitHubCredentials): Promise; /** * Fetch contributors for all repositories, within the GitHub organizations and usernames. * @param orgs fetch repositories for these orgs/users, such as `['bevry', 'browserstate']` * @param opts custom search options * @param credentials custom github credentials, omit to use the environment variables */ export declare function getContributorsFromOrgs(orgs: Array, opts?: MultiOptions, credentials?: GitHubCredentials): Promise; /** * Fetch contributors for all repositories that match a certain search query. * @param search the search query to send to GitHub, such as `@bevry language:typescript` * @param opts custom search options * @param credentials custom github credentials, omit to use the environment variables */ export declare function getContributorsFromSearch(query: string, opts?: MultiOptions, credentials?: GitHubCredentials): Promise; //# sourceMappingURL=index.d.ts.map