import type { ExtendOptions, Got } from 'got/dist/source'; import { RequestParams } from '../utils/buildSearchParams'; export declare type RequestHeaders = Record; export declare class Request { /** * Creates a client instance that connects to the Clickup API * * @constructor * @param {import('got/dist/source').ExtendOptions} requestOptions Options for the created request instance. */ private readonly _token; readonly _instance: Got; constructor(token: string, requestOptions?: ExtendOptions); /** * Makes an HTTP GET request * * @param {Object} options Options to pass to the api call * @param {String} options.endpoint The endpoint to make a request to * @param {Object} options.params The parameters to add to the endpoint */ get({ endpoint, params }: { endpoint: string; params?: RequestParams; }): Promise>; /** * Makes an HTTP POST request * * @param {Object} options Options to pass to the api call * @param {String} options.endpoint The endpoint to make a request to * @param {Object} options.params The query parameters to add to the request * @param {Object} options.data The data to send in the body of the request * @param {Object} options.headers The headers to send along with the request */ post({ endpoint, params, data, headers, }: { endpoint: string; params?: RequestParams; data?: Object; headers?: RequestHeaders; }): Promise>; /** * Makes an HTTP PUT request * * @param {Object} options Options to pass to the api call * @param {String} options.endpoint The endpoint to make a request to * @param {Object} options.params The query parameters to add to the request * @param {Object} options.data The data to send in the body of the request */ put({ endpoint, params, data }: { endpoint: string; params?: RequestParams; data?: object; }): Promise>; /** * Makes an HTTP DELETE request * * @param {Object} options Options to pass to the api call * @param {String} options.endpoint The endpoint to make a request to * @param {Object} options.params The query parameters to add to the request */ delete(requestOptions: { endpoint: string; params?: RequestParams; data?: object; }): Promise>; /** * Makes an HTTP request * * @param {Object} options Options to pass to the api call * @param {String} options.endpoint The endpoint to make a request to * @param {String} options.method The request method to use in the request * @param {Object} options.params The query parameters to add to the request * @param {Object} options.data The data to send in the body of the request * @param {Object} options.headers The headers to send along with the request */ private _request; /** * Helper to obtain the instance headers */ getHeaders(): import("got/dist/source").Headers; /** * Helper to obtain a specific header */ getHeader(name: string): string | string[] | undefined; /** * Helper to obtain the access token */ getToken(): string; /** * Helper to obtain the options */ getOptions(): import("got/dist/source").Defaults; }