@crediblex.io/fineract-api-client
Version:
TypeScript client for Fineract APIs
29 lines • 1.34 kB
TypeScript
import { HttpClient } from "../utils/http-client";
import { GetHolidaysResponse, GetHolidaysParams } from "../types/holidays";
/**
* API client for Fineract Holidays related operations.
* It uses the HttpClient for making requests.
*/
export declare class FineractHolidaysApi {
private readonly httpClient;
constructor(httpClient: HttpClient);
/**
* Retrieves holidays from Fineract.
* Corresponds to the GET /holidays endpoint.
* Only returns holidays with status.code === "holidayStatusType.active"
*
* @param params Optional parameters for filtering holidays.
* @returns A promise that resolves to the list of active holidays or rejects with an error.
*/
getHolidays(params?: GetHolidaysParams): Promise<GetHolidaysResponse>;
/**
* Retrieves holidays for a specific office from Fineract.
* This is a convenience method that wraps getHolidays with officeId parameter.
* Only returns holidays with status.code === "holidayStatusType.active"
*
* @param officeId The ID of the office to get holidays for.
* @returns A promise that resolves to the list of active holidays for the specified office or rejects with an error.
*/
getHolidaysByOffice(officeId: number): Promise<GetHolidaysResponse>;
}
//# sourceMappingURL=fineract-holidays-api.d.ts.map