@crediblex.io/fineract-api-client
Version:
TypeScript client for Fineract APIs
28 lines • 1.19 kB
TypeScript
import { HttpClient } from "../utils/http-client";
import { WorkingDaysResponse } from "../types/workingdays";
/**
* API client for Fineract Working Days related operations.
* It uses the HttpClient for making requests.
*/
export declare class FineractWorkingDaysApi {
private readonly httpClient;
constructor(httpClient: HttpClient);
/**
* Retrieves working days configuration from Fineract and formats it for easy consumption.
* Corresponds to the GET /workingdays endpoint.
* Returns a formatted object with each day of the week mapped to a boolean indicating if it's a working day.
*
* @returns A promise that resolves to the formatted working days configuration or rejects with an error.
*/
getWorkingDays(): Promise<WorkingDaysResponse>;
/**
* Parses the RRULE recurrence string to determine which days are working days.
* Expected format: "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,"
*
* @param recurrence The recurrence string from Fineract API
* @returns Formatted working days object
* @private
*/
private parseRecurrenceString;
}
//# sourceMappingURL=fineract-workingdays-api.d.ts.map