UNPKG

@theventures/caret

Version:

Unofficial Node.js API client for the Caret HTTP API

45 lines 1.46 kB
import { Notes } from "./resources/notes.js"; import { Tags } from "./resources/tags.js"; import { Workspace } from "./resources/workspace.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; tags: Tags; workspace: Workspace; 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>; } //# sourceMappingURL=client.d.ts.map