@theventures/caret
Version:
Unofficial Node.js API client for the Caret HTTP API
41 lines (40 loc) • 1.28 kB
TypeScript
import { Notes } from "./resources/notes.js";
import type { ResponseBody } from "./types/common.js";
export interface CaretOptions {
apiKey?: string;
baseURL?: string;
timeout?: number;
maxRetries?: number;
}
export declare class Caret {
readonly apiKey: string;
readonly baseURL: string;
readonly timeout: number;
readonly maxRetries: number;
notes: Notes;
constructor(options?: CaretOptions);
request(method: string, path: string, options?: {
params?: Record<string, unknown>;
body?: unknown;
headers?: Record<string, string>;
}): Promise<ResponseBody>;
get(path: string, options?: {
params?: Record<string, unknown>;
headers?: Record<string, string>;
}): Promise<ResponseBody>;
post(path: string, options?: {
body?: unknown;
headers?: Record<string, string>;
}): Promise<ResponseBody>;
patch(path: string, options?: {
body?: unknown;
headers?: Record<string, string>;
}): Promise<ResponseBody>;
put(path: string, options?: {
body?: unknown;
headers?: Record<string, string>;
}): Promise<ResponseBody>;
delete(path: string, options?: {
headers?: Record<string, string>;
}): Promise<ResponseBody>;
}