api-url.d.ts 1006 B

12345678910111213141516171819
  1. /**
  2. * @description Get a Base URL for Snyk APIs
  3. * @export
  4. * @param {string} defaultUrl URL to default to, should be the one defined in the config.default.json file
  5. * @param {(string | undefined)} envvarDefinedApiUrl if there is an URL defined in the SNYK_API envvar
  6. * @param {(string | undefined)} configDefinedApiUrl if there is an URL defined in the 'endpoint' key of the config
  7. * @returns {string} Returns a Base URL - without the /v1. Use this to construct derived URLs
  8. */
  9. export declare function getBaseApiUrl(defaultUrl: string, envvarDefinedApiUrl?: string, configDefinedApiUrl?: string): string;
  10. export declare function getV1ApiUrl(baseApiUrl: string): string;
  11. /**
  12. * @description Return Snyk REST API URL
  13. * @export
  14. * @param {string} baseApiUrl
  15. * @param {string} envvarDefinedRestApiUrl
  16. * @param {string} envvarDefinedRestV3Url
  17. * @returns {string}
  18. */
  19. export declare function getRestApiUrl(baseApiUrl: string, envvarDefinedRestApiUrl?: string, envvarDefinedRestV3Url?: string): string;