UNPKG

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

28 lines (27 loc) 704 B
export interface IBaseService { 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>; } export interface PaginatedResponse<T> { items: T[]; page: number; perPage: number; totalItems: number; totalPages: number; } export interface ApiError { code: string; message: string; details?: Record<string, any>; } export interface ClientConfig { baseUrl: string; apiKey?: string; timeout?: number; } export * from "./product.types"; export * from "./profile.types"; export * from "./user.types";