UNPKG

coconut-open-api-js

Version:
34 lines (33 loc) 961 B
import { AxiosInstance } from 'axios'; import { Filterable, Pageable } from '../index'; export interface FormFilter { type?: number; } export interface FormFilterable<T> extends Filterable<T> { include?: string; } export interface FormUrlParameters { include?: string; } interface FormParameters { type?: number; } export interface FormResource extends Pageable { cancellations(): this; } export default class Form implements FormResource { protected client: AxiosInstance; protected filters: FormFilter; protected page: number | null; protected parameters: FormUrlParameters; protected sortable: string | null; protected limit: number | null; constructor(client: AxiosInstance); cancellations(): this; get(): Promise<any>; on(page: number): this; sortBy(sortable: string): this; take(limit: number): this; protected params(): FormParameters; } export {};