circleci-api
Version:
A Node and Browser client for the CircleCI API, written in TypeScript.
28 lines (27 loc) • 1.3 kB
TypeScript
import { GitInfo, SSHKey, AddSSHKeyResponse, HerokuKey, AddHerokuResponse, CircleOptions } from "../types";
/**
* Creates an ssh key that will be used to access the external system identified by
* the hostname parameter for SSH key-based authentication.
*
* @see https://circleci.com/docs/api/v1-reference/#ssh-keys
* @example POST - https://circleci.com/api/v1.1/project/:vcs-type/:username/:project/ssh-key
*
* @param token CircleCI API token
* @param vcs Git information for project
* @param key SSH key details to add to project
* @param circleHost Provide custom url for CircleCI
* @returns nothing unless error
*/
export declare function addSSHKey(token: string, vcs: GitInfo, key: SSHKey, { circleHost }?: CircleOptions): Promise<AddSSHKeyResponse>;
/**
* Adds your Heroku API key to CircleCI
*
* @see https://circleci.com/docs/api/v1-reference/#ssh-keys
* @example POST - https://circleci.com/api/v1.1/project/:vcs-type/:username/:project/ssh-key
*
* @param token CircleCI API token
* @param key Heroku key to add to project
* @param circleHost Provide custom url for CircleCI
* @returns nothing unless error
*/
export declare function addHerokuKey(token: string, key: HerokuKey, { circleHost }?: CircleOptions): Promise<AddHerokuResponse>;