minimax-client
Version:
TypeScript client library for the Minimax accounting API (https://moj.minimax.rs/RS/API/)
83 lines (82 loc) • 1.89 kB
TypeScript
/**
* Journal Types module
*
* Module for interacting with journal types in the Minimax API
*/
import { BaseResource } from './base-resource';
/**
* Journal Type resource
*/
export interface JournalType {
/**
* Unique identifier
*/
Id: string;
/**
* Journal type code
*/
Code: string;
/**
* Journal type name
*/
Name: string;
/**
* Row version for concurrency control
*/
RowVersion: string;
}
/**
* Journal type filter options
*/
export interface JournalTypeFilterOptions {
/**
* Search string - queries search for specified value across various predefined fields
*/
searchString?: string;
/**
* Current page index starting with 1 for first page
*/
currentPage?: number;
/**
* Page size defines number of records returned per page
*/
pageSize?: number;
/**
* Field name that is used for sorting/ordering result rows
*/
sortField?: string;
/**
* Sort order: A - ascending; D - descending
*/
order?: 'A' | 'D';
}
/**
* Journal types module
*/
export declare class JournalTypesModule extends BaseResource {
/**
* Base endpoint for journal types
*/
protected readonly endpoint = "journaltypes";
/**
* Get all journal types
*
* @param options Filter options
* @returns Promise resolving to an array of journal types
*/
getAll(options?: JournalTypeFilterOptions): Promise<JournalType[]>;
/**
* Get a journal type by ID
*
* @param id Journal type ID
* @returns Promise resolving to the journal type
*/
get(id: string): Promise<JournalType>;
/**
* Get a journal type by code
*
* @param code Journal type code
* @returns Promise resolving to the journal type
*/
getByCode(code: string): Promise<JournalType>;
}