UNPKG

hud-ai

Version:
26 lines (25 loc) 980 B
/// <reference types="bluebird" /> import * as Promise from 'bluebird'; import { RequestOptions, RequestManager } from '../RequestManager'; export interface HudAiListAttributes { limit?: number; offset?: number; } export interface HudAiCreateAttributes { } export interface HudAiUpdateAttributes { } export declare abstract class Resource<T, L extends HudAiListAttributes, C extends HudAiCreateAttributes, U extends HudAiUpdateAttributes> { protected basePath: string; protected requestManager: RequestManager; constructor(basePath: string, requestManager: RequestManager); makeRequest(options: RequestOptions): Promise<any>; protected _get(id: string | number): Promise<T>; protected _list(listArgs: L): Promise<{ count: number; rows: T[]; }>; protected _update(id: string | number, updateArgs: U): Promise<T>; protected _create(createArgs: C): Promise<T>; protected _destroy(id: string | number): Promise<void>; }