pocketbase-tools
Version:
A TypeScript toolkit for PocketBase, featuring a standard service/action/types layered structure. It provides interfaces and implementations for common business logic such as users, products, company profiles, and file utilities, making it suitable for se
15 lines (14 loc) • 596 B
TypeScript
import PocketBase from "pocketbase";
import { IBaseService } from "../types";
import { ErrorHandler } from "../utils/errorHandler";
export declare abstract class BaseService implements IBaseService {
protected client: PocketBase;
protected collection: string;
protected errorHandler: ErrorHandler;
constructor(client: PocketBase, collection: string);
getById(id: string): Promise<any>;
getList(page?: number, perPage?: number): Promise<any>;
create(data: any): Promise<any>;
update(id: string, data: any): Promise<any>;
delete(id: string): Promise<boolean>;
}