import { Client } from './client'; import { Card } from './classes/card'; import { Set } from './classes/set'; import { IQuery } from './interfaces/query'; export class QueryBuilder { static all(type: {new (): T}): Promise { const t = new type(); const params: IQuery[] = [{ name: 'pageSize', value: 250, }]; return Client.get(t.resource(), params); } static find(type: {new (): T}, id: string): Promise { const t = new type(); return Client.get(t.resource(), id); } static where(type: {new (): T}, params: IQuery[]): Promise { const t = new type(); return Client.get(t.resource(), params); } }