UNPKG

coconut-open-api-js

Version:
27 lines (26 loc) 1.03 kB
import { AxiosInstance } from 'axios'; import { Pageable } from '../index'; import Conditional, { ConditionalResource } from './conditional'; export interface QuestionFilter { services?: number | number[] | string | string[]; } export interface QuestionParameters { matching?: number | number[] | string | string[]; } export interface QuestionResource extends Pageable, ConditionalResource { for(services: number | number[] | string | string[]): this; } export default class Question extends Conditional implements QuestionResource { protected client: AxiosInstance; protected filters: QuestionFilter; protected page: number | null; protected sortable: string | null; protected limit: number | null; constructor(client: AxiosInstance); for(services: number | number[] | string | string[]): this; get(): Promise<any>; on(page: number): this; sortBy(sortable: string): this; take(limit: number): this; protected params(): QuestionParameters; }