import type { ApiClient } from './ApiClient'; import type { CrudApi, GetByIdQuery, ListQuery, Paginated } from './types'; export type { WhereClause, IncludeItem, ListQuery, GetByIdQuery, Paginated, HasGetMany, HasGetById, HasCreate, HasUpdateById, HasDeleteById, CrudApi, } from './types'; export declare class BaseCrudApi = ListQuery> implements CrudApi { readonly client: ApiClient; readonly basePath: string; constructor(client: ApiClient, basePath: string); getMany(query: TQuery & { paginate: false; }, headers?: Record): Promise; getMany(query?: TQuery & { paginate?: true; }, headers?: Record): Promise>; /** * Returns the first resource matching the query, or `null` when none match. * Convenience over `getMany` with `limit: 1`. * @permissions $resourceName.view */ getOne(query?: TQuery, headers?: Record): Promise; /** * Returns a single resource by ID. * @permissions $resourceName.view */ getById(id: string, query?: GetByIdQuery, headers?: Record): Promise; /** * Creates a new resource. * @permissions $resourceName.create */ create(body: TCreate, headers?: Record): Promise; /** * Updates an existing resource by ID. * @permissions $resourceName.update */ updateById(id: string, body: TUpdate, headers?: Record): Promise; /** * Deletes a resource by ID. * @permissions $resourceName.delete */ deleteById(id: string, headers?: Record): Promise; } //# sourceMappingURL=BaseCrudApi.d.ts.map