UNPKG

minimax-client

Version:

TypeScript client library for the Minimax accounting API (https://moj.minimax.rs/RS/API/)

54 lines (53 loc) 1.09 kB
/** * Base resource module * * Base class for all API resource modules */ import { MinimaxClient } from '../minimax-client'; /** * Generic list response interface */ export interface ListResponse<T> { /** * Array of items */ Rows: T[]; /** * Total rows */ TotalRows: number; /** * Current page number */ CurrentPageNumber: number; /** * Page size */ PageSize: number; } /** * Base resource module */ export declare abstract class BaseResource { /** * Base endpoint for the resource */ protected abstract readonly endpoint: string; /** * Minimax client instance */ protected readonly client: MinimaxClient; /** * Create a new resource module * * @param client Minimax client instance */ constructor(client: MinimaxClient); /** * Get the full endpoint URL for a resource * * @param path Optional path to append to the base endpoint * @returns Full endpoint URL */ protected getEndpoint(path?: string): string; }