open-banking-pfm-sdk
Version:
The Open Banking PFM SDK uses Client classes and with **Promises** to get responses from the Open Banking PFM API in an easier way and structured as data models.
11 lines (10 loc) • 588 B
TypeScript
import { Category } from '../models';
import CategoryPayload from '../payloads/CategoryPayload';
import ICategoryUpdatePayload from '../interfaces/ICategoryUpdatePayload';
export default interface ICategoriesClient {
getList: (userId: string | number, isUserCategory?: boolean) => Promise<Category[]>;
get: (id: string | number) => Promise<Category>;
create: (transactionToCreate: CategoryPayload) => Promise<Category>;
edit: (id: string | number, transactionToUpdate: ICategoryUpdatePayload) => Promise<Category>;
delete: (id: string | number) => Promise<boolean>;
}