UNPKG

beeswax-node-client

Version:

TypeScript/JavaScript client library for the Beeswax DSP API

16 lines 846 B
import { BeeswaxClient } from '../BeeswaxClient'; import { BeeswaxResponse } from '../types'; export declare abstract class BaseResource<T> { protected client: BeeswaxClient; protected endpoint: string; protected idField: string; constructor(client: BeeswaxClient, endpoint: string, idField: string); find(id: number | string): Promise<BeeswaxResponse<T>>; query(body?: Record<string, any>): Promise<BeeswaxResponse<T[]>>; queryAll(body?: Record<string, any>): Promise<BeeswaxResponse<T[]>>; create(body: Partial<T>): Promise<BeeswaxResponse<T>>; edit(id: number | string, body: Partial<T>, failOnNotFound?: boolean): Promise<BeeswaxResponse<T>>; delete(id: number | string, failOnNotFound?: boolean): Promise<BeeswaxResponse<any>>; private isNotFoundError; } //# sourceMappingURL=BaseResource.d.ts.map