@crediblex.io/fineract-api-client
Version:
TypeScript client for Fineract APIs
39 lines • 1.8 kB
TypeScript
import { HttpClient } from "../utils/http-client";
import { CreateSmeRequest, CreateSmeResponse, SmeDetails } from "../types";
/**
* API client for Fineract SME related operations.
* It uses the HttpClient for making requests.
*/
export declare class FineractSmeApi {
private readonly httpClient;
constructor(httpClient: HttpClient);
/**
* Creates a new sme in Fineract.
* Corresponds to the POST /create endpoint in your `clients.ts`.
*
* @param smeData The data for the new sme.
* @returns A promise that resolves to the creation response or rejects with an error.
* @remarks SME is referred as client in fineract system
*/
create(smeData: CreateSmeRequest): Promise<CreateSmeResponse>;
/**
* Retrieves details for a specific client from Fineract.
* Corresponds to the GET /details/:clientId endpoint in your `clients.ts`.
*
* @param clientId The ID of the client to retrieve.
* @returns A promise that resolves to the client details or rejects with an error.
* @remarks The actual API path for retrieving client details (e.g., `/clients/${clientId}`)
* needs to be verified from your Fineract API documentation or the SDK.
*/
getDetails(clientId: number): Promise<SmeDetails>;
/**
* Retrieves details for a specific client from Fineract using external ID.
* Corresponds to the GET /v1/clients/external-id/{externalId} endpoint.
*
* @param externalId The external ID of the client to retrieve.
* @returns A promise that resolves to the client details or rejects with an error.
* @remarks SME is referred as client in fineract system
*/
getDetailsByExternalId(externalId: string): Promise<SmeDetails>;
}
//# sourceMappingURL=fineract-sme-api.d.ts.map