github.d.ts 949 B

12345678910111213141516171819202122232425
  1. import { graphql as GraphQL } from '@octokit/graphql/dist-types/types';
  2. import { Octokit } from '@octokit/rest';
  3. import * as Context from './context';
  4. export declare const context: Context.Context;
  5. export declare class GitHub extends Octokit {
  6. graphql: GraphQL;
  7. /**
  8. * Sets up the REST client and GraphQL client with auth and proxy support.
  9. * The parameter `token` or `opts.auth` must be supplied. The GraphQL client
  10. * authorization is not setup when `opts.auth` is a function or object.
  11. *
  12. * @param token Auth token
  13. * @param opts Octokit options
  14. */
  15. constructor(token: string, opts?: Omit<Octokit.Options, 'auth'>);
  16. constructor(opts: Octokit.Options);
  17. /**
  18. * Disambiguates the constructor overload parameters
  19. */
  20. private static disambiguate;
  21. private static getOctokitOptions;
  22. private static getGraphQL;
  23. private static getAuthString;
  24. private static getProxyAgent;
  25. }