/** * Returns a promise that will be fulfilled with the result of an HTTP GET request to a YouTrack REST resource. * * This method sets the HTTP Authorization header if it is known due to a previous call to * {@link handlePotentialOauthRedirect}(). If no authorization is available, this method rejects the promise * immediately. * * @typeparam T the type of the response by YouTrack (after parsing the JSON) * @param baseUrl The YouTrack base URL to which relative paths like `youtrack/api/...` or `hub/api/...` will be * appended. The base URL is expected to end in a slash (/). For an InCloud instance, this is of form * `https://.myjetbrains.com/`. * @param resourcePath relative path to the REST API resource requested * @param queryParams parameters that will be added to the query string * @return A promise that in case of success will be fulfilled with the retrieved object. In case of any failure, it * will be rejected with a {@link Failure}. */ export declare function httpGet(baseUrl: string, resourcePath: string, queryParams?: { [param: string]: string; }): Promise; /** * Returns a promise that will be fulfilled with the result of an HTTP GET request to a YouTrack REST array resource. * * This method sets the HTTP Authorization header if it is known due to a previous call to * {@link handlePotentialOauthRedirect}(). If no authorization is available, this method rejects the promise * immediately. * * @typeparam T the element type of the array response by YouTrack (after parsing the JSON) * @param baseUrl The YouTrack base URL. See also {@link httpGet}(). * @param resourcePath relative path to the REST API resource requested * @param queryParams parameters that will be added to the query string * @param restBatchSize Number of elements per HTTP request. Larger values are faster, but increase the risk of * transmission problems (or outright rejection by future YouTrack versions that may have rate limitations). * @return A promise that in case of success will be fulfilled with the retrieved array. In case of any failure, it * will be rejected with a {@link Failure}. */ export declare function httpGetAll(baseUrl: string, resourcePath: string, queryParams: { [param: string]: string; }, restBatchSize: number): Promise; /** * Returns a promise that will be fulfilled with a transformation of the result of an HTTP GET request to a YouTrack * REST array resource. * * This method sets the HTTP Authorization header if it is known due to a previous call to * {@link handlePotentialOauthRedirect}(). If no authorization is available, this method rejects the promise * immediately. * * @typeparam T the element type of the array response by YouTrack (after parsing the JSON) * @typeparam U the return type of `processBatch()` and therefore also this function * @param baseUrl The YouTrack base URL. See also {@link httpGet}(). * @param resourcePath relative path to the REST API resource requested * @param queryParams parameters that will be added to the query string * @param restBatchSize Number of elements per HTTP request. See also {@link httpGetAll}(). * @param processBatch callback called for the result of each individual HTTP request * @param processBatch.batch the retrieved array * @param processBatch.previous the state returned by the previous invocation of `processBatch()`, or the value of * `initial` if this is the first invocation * @param initial the value passed to the first invocation of `processBatch()` as argument `initial` * @return A promise that in case of success will be fulfilled with the last result of `processBatch()`. In case of any * failure, it will be rejected with a {@link Failure}. */ export declare function httpGetAllWithOptions(baseUrl: string, resourcePath: string, queryParams: { [param: string]: string; }, restBatchSize: number, processBatch: (batch: T[], previous: U) => U, initial: U): Promise; //# sourceMappingURL=you-track-http.d.ts.map