@crediblex.io/fineract-api-client 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,151 @@
1
+ import { HttpClient } from "../utils/http-client";
2
+ import { GetInvoicesRequest, GetInvoicesResponse, CreateInvoiceRequest, CreateInvoiceResponse, FetchRepaymentDetailsRequest, FetchRepaymentDetailsResponse } from "../types/invoices";
3
+ import { ApproveLoanAccountRequest, ApproveLoanAccountResponse } from "../types/loansaccounts";
4
+ /**
5
+ * API client for Fineract Invoices related operations.
6
+ * This API provides functionality to retrieve invoices against a line of credit.
7
+ * It uses the HttpClient for making requests.
8
+ */
9
+ export declare class FineractInvoicesApi {
10
+ private readonly httpClient;
11
+ constructor(httpClient: HttpClient);
12
+ /**
13
+ * Retrieves invoices against a line of credit from Fineract.
14
+ * This method fetches loan data associated with a specific client and line of credit.
15
+ *
16
+ * @param params Parameters including clientId, locId, offset, and limit
17
+ * @returns A promise that resolves to the invoices response or rejects with an error.
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * const invoices = await fineractSDK.invoices.get({
22
+ * clientId: 6709,
23
+ * locId: 1804,
24
+ * offset: 0,
25
+ * limit: 10
26
+ * });
27
+ * ```
28
+ */
29
+ get(params: GetInvoicesRequest): Promise<GetInvoicesResponse>;
30
+ /**
31
+ * Retrieves invoices with simplified parameters.
32
+ * This is a convenience method that provides a simpler interface for the most common use case.
33
+ *
34
+ * @param clientId The client ID to get invoices for
35
+ * @param locId The line of credit ID
36
+ * @param offset Starting record offset for pagination (default: 0)
37
+ * @param limit Maximum number of records to return (default: 10)
38
+ * @returns A promise that resolves to the invoices response or rejects with an error.
39
+ *
40
+ * @example
41
+ * ```typescript
42
+ * const invoices = await fineractSDK.invoices.getByClientAndLoc(6709, 1804, 0, 10);
43
+ * ```
44
+ */
45
+ getByClientAndLoc(clientId: number, locId: number, offset?: number, limit?: number): Promise<GetInvoicesResponse>;
46
+ /**
47
+ * Retrieves all invoices for a specific client and line of credit without pagination.
48
+ * This method automatically handles pagination to retrieve all available invoices.
49
+ *
50
+ * @param clientId The client ID to get invoices for
51
+ * @param locId The line of credit ID
52
+ * @param batchSize Number of records to fetch per request (default: 50)
53
+ * @returns A promise that resolves to all invoices or rejects with an error.
54
+ *
55
+ * @example
56
+ * ```typescript
57
+ * const allInvoices = await fineractSDK.invoices.getAll(6709, 1804);
58
+ * ```
59
+ */
60
+ getAll(clientId: number, locId: number, batchSize?: number): Promise<GetInvoicesResponse>;
61
+ /**
62
+ * Retrieves a specific invoice (loan/drawdown) by ID from Fineract.
63
+ * This mirrors the loanaccounts.getById behavior since an invoice is a loan under a credit facility.
64
+ *
65
+ * GET /fineract-provider/api/v1/loans/{loanId}
66
+ *
67
+ * @param loanId The ID of the invoice (loan) to retrieve.
68
+ * @returns A promise that resolves to the invoice (loan) details.
69
+ */
70
+ getById(loanId: number): Promise<any>;
71
+ /**
72
+ * Creates an invoice (loan) against a line of credit product.
73
+ * This method accepts both Receivables and Payables payload variants.
74
+ *
75
+ * POST /fineract-provider/api/v1/loans
76
+ *
77
+ * @param payload Create invoice payload (receivables or payables variant)
78
+ * @returns A promise that resolves to the creation response containing resource identifiers.
79
+ *
80
+ * @example
81
+ * ```typescript
82
+ * const res = await fineractSDK.invoices.create({
83
+ * // Receivables example
84
+ * productId: 265,
85
+ * loanOfficerId: 1,
86
+ * submittedOnDate: "10 December 2025",
87
+ * expectedDisbursementDate: "10 December 2025",
88
+ * externalId: "",
89
+ * linkAccountId: 5718,
90
+ * createStandingInstructionAtDisbursement: true,
91
+ * lineOfCreditId: "568",
92
+ * factorRateEnabled: false,
93
+ * loanTermFrequency: 365,
94
+ * loanTermFrequencyType: 2,
95
+ * numberOfRepayments: 1,
96
+ * repaymentEvery: 365,
97
+ * repaymentFrequencyType: 2,
98
+ * interestType: 0,
99
+ * isEqualAmortization: false,
100
+ * amortizationType: 1,
101
+ * interestCalculationPeriodType: 1,
102
+ * transactionProcessingStrategyCode: "creocore-strategy",
103
+ * interestRateFrequencyType: 2,
104
+ * interestRatePerPeriod: 12,
105
+ * charges: [],
106
+ * collateral: [],
107
+ * invoiceNo: "1212121",
108
+ * invoiceDate: "01 December 2025",
109
+ * invoiceDueDate: "31 December 2025",
110
+ * invoiceAmount: 1222,
111
+ * invoiceCurrency: "AED",
112
+ * disapprovedAmount: 0,
113
+ * approvedReceivableAmount: 1222,
114
+ * advancePercentage: 100,
115
+ * amountAfterAdvance: 1222,
116
+ * buyerDetails: [253],
117
+ * markup: 0,
118
+ * amountInFacilityCurrency: 0,
119
+ * dateFormat: "dd MMMM yyyy",
120
+ * locale: "en",
121
+ * clientId: 4643,
122
+ * loanType: "individual",
123
+ * principal: 1222,
124
+ * allowPartialPeriodInterestCalcualtion: false,
125
+ * });
126
+ * ```
127
+ */
128
+ create(payload: CreateInvoiceRequest): Promise<CreateInvoiceResponse>;
129
+ /**
130
+ * Approves an invoice (loan) in Fineract. This mirrors the loanaccounts.approve behavior
131
+ * and reuses the same request/response types.
132
+ *
133
+ * POST /fineract-provider/api/v1/loans/{loanId}?command=approve
134
+ *
135
+ * @param loanId The ID of the loan (invoice) to approve.
136
+ * @param approvalData The approval payload (same as loanaccounts.approve).
137
+ * @returns A promise resolving to the approval response.
138
+ */
139
+ approve(loanId: number, approvalData: ApproveLoanAccountRequest): Promise<ApproveLoanAccountResponse>;
140
+ /**
141
+ * Fetches repayment schedule/details for an invoice (loan/drawdown).
142
+ * Uses the same endpoint as loansaccounts.getRepaymentSchedule.
143
+ *
144
+ * POST /fineract-provider/api/v1/loans?command=calculateLoanSchedule
145
+ *
146
+ * @param payload Repayment calculation payload. For payables/receivables, use the extended variants.
147
+ * @returns Repayment schedule response.
148
+ */
149
+ fetchRepaymentDetails(payload: FetchRepaymentDetailsRequest): Promise<FetchRepaymentDetailsResponse>;
150
+ }
151
+ //# sourceMappingURL=fineract-invoices-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fineract-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,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,6BAA6B,CAAC;CAuB1C"}
@@ -0,0 +1,274 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FineractInvoicesApi = void 0;
4
+ const errors_1 = require("../types/errors");
5
+ /**
6
+ * API client for Fineract Invoices related operations.
7
+ * This API provides functionality to retrieve invoices against a line of credit.
8
+ * It uses the HttpClient for making requests.
9
+ */
10
+ class FineractInvoicesApi {
11
+ constructor(httpClient) {
12
+ this.httpClient = httpClient;
13
+ }
14
+ /**
15
+ * Retrieves invoices against a line of credit from Fineract.
16
+ * This method fetches loan data associated with a specific client and line of credit.
17
+ *
18
+ * @param params Parameters including clientId, locId, offset, and limit
19
+ * @returns A promise that resolves to the invoices response or rejects with an error.
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * const invoices = await fineractSDK.invoices.get({
24
+ * clientId: 6709,
25
+ * locId: 1804,
26
+ * offset: 0,
27
+ * limit: 10
28
+ * });
29
+ * ```
30
+ */
31
+ async get(params) {
32
+ try {
33
+ const queryParams = new URLSearchParams();
34
+ // Add required parameters
35
+ queryParams.append("clientId", params.clientId.toString());
36
+ queryParams.append("locId", params.locId.toString());
37
+ // Add optional parameters with defaults
38
+ queryParams.append("offset", (params.offset ?? 0).toString());
39
+ queryParams.append("limit", (params.limit ?? 10).toString());
40
+ // Add any additional parameters
41
+ for (const [key, value] of Object.entries(params)) {
42
+ if (!["clientId", "locId", "offset", "limit"].includes(key) &&
43
+ value !== undefined) {
44
+ queryParams.append(key, value.toString());
45
+ }
46
+ }
47
+ const apiPath = `/fineract-provider/api/v1/loans?${queryParams.toString()}`;
48
+ const response = await this.httpClient.get(apiPath);
49
+ return response.data;
50
+ }
51
+ catch (rawError) {
52
+ const errorPayload = rawError;
53
+ const message = errorPayload?.message ||
54
+ errorPayload?.error ||
55
+ "Failed to retrieve invoices from Fineract";
56
+ throw new errors_1.FineractApiError(message, errorPayload?.statusCode, errorPayload?.details, errorPayload?.error);
57
+ }
58
+ }
59
+ /**
60
+ * Retrieves invoices with simplified parameters.
61
+ * This is a convenience method that provides a simpler interface for the most common use case.
62
+ *
63
+ * @param clientId The client ID to get invoices for
64
+ * @param locId The line of credit ID
65
+ * @param offset Starting record offset for pagination (default: 0)
66
+ * @param limit Maximum number of records to return (default: 10)
67
+ * @returns A promise that resolves to the invoices response or rejects with an error.
68
+ *
69
+ * @example
70
+ * ```typescript
71
+ * const invoices = await fineractSDK.invoices.getByClientAndLoc(6709, 1804, 0, 10);
72
+ * ```
73
+ */
74
+ async getByClientAndLoc(clientId, locId, offset = 0, limit = 10) {
75
+ return this.get({
76
+ clientId,
77
+ locId,
78
+ offset,
79
+ limit,
80
+ });
81
+ }
82
+ /**
83
+ * Retrieves all invoices for a specific client and line of credit without pagination.
84
+ * This method automatically handles pagination to retrieve all available invoices.
85
+ *
86
+ * @param clientId The client ID to get invoices for
87
+ * @param locId The line of credit ID
88
+ * @param batchSize Number of records to fetch per request (default: 50)
89
+ * @returns A promise that resolves to all invoices or rejects with an error.
90
+ *
91
+ * @example
92
+ * ```typescript
93
+ * const allInvoices = await fineractSDK.invoices.getAll(6709, 1804);
94
+ * ```
95
+ */
96
+ async getAll(clientId, locId, batchSize = 50) {
97
+ try {
98
+ let allInvoices = [];
99
+ let offset = 0;
100
+ let hasMore = true;
101
+ while (hasMore) {
102
+ const batch = await this.get({
103
+ clientId,
104
+ locId,
105
+ offset,
106
+ limit: batchSize,
107
+ });
108
+ if (batch.pageItems && batch.pageItems.length > 0) {
109
+ allInvoices = allInvoices.concat(batch.pageItems);
110
+ offset += batchSize;
111
+ // Check if we've retrieved all records
112
+ hasMore = batch.pageItems.length === batchSize;
113
+ }
114
+ else {
115
+ hasMore = false;
116
+ }
117
+ }
118
+ return {
119
+ pageItems: allInvoices,
120
+ totalFilteredRecords: allInvoices.length,
121
+ };
122
+ }
123
+ catch (rawError) {
124
+ const errorPayload = rawError;
125
+ const message = errorPayload?.message ||
126
+ errorPayload?.error ||
127
+ "Failed to retrieve all invoices from Fineract";
128
+ throw new errors_1.FineractApiError(message, errorPayload?.statusCode, errorPayload?.details, errorPayload?.error);
129
+ }
130
+ }
131
+ /**
132
+ * Retrieves a specific invoice (loan/drawdown) by ID from Fineract.
133
+ * This mirrors the loanaccounts.getById behavior since an invoice is a loan under a credit facility.
134
+ *
135
+ * GET /fineract-provider/api/v1/loans/{loanId}
136
+ *
137
+ * @param loanId The ID of the invoice (loan) to retrieve.
138
+ * @returns A promise that resolves to the invoice (loan) details.
139
+ */
140
+ async getById(loanId) {
141
+ try {
142
+ const apiPath = `/fineract-provider/api/v1/loans/${loanId}`;
143
+ const response = await this.httpClient.get(apiPath);
144
+ return response.data;
145
+ }
146
+ catch (rawError) {
147
+ const errorPayload = rawError;
148
+ const message = errorPayload?.message ||
149
+ errorPayload?.error ||
150
+ "Failed to retrieve invoice (loan) from Fineract";
151
+ throw new errors_1.FineractApiError(message, errorPayload?.statusCode, errorPayload?.details, errorPayload?.error);
152
+ }
153
+ }
154
+ /**
155
+ * Creates an invoice (loan) against a line of credit product.
156
+ * This method accepts both Receivables and Payables payload variants.
157
+ *
158
+ * POST /fineract-provider/api/v1/loans
159
+ *
160
+ * @param payload Create invoice payload (receivables or payables variant)
161
+ * @returns A promise that resolves to the creation response containing resource identifiers.
162
+ *
163
+ * @example
164
+ * ```typescript
165
+ * const res = await fineractSDK.invoices.create({
166
+ * // Receivables example
167
+ * productId: 265,
168
+ * loanOfficerId: 1,
169
+ * submittedOnDate: "10 December 2025",
170
+ * expectedDisbursementDate: "10 December 2025",
171
+ * externalId: "",
172
+ * linkAccountId: 5718,
173
+ * createStandingInstructionAtDisbursement: true,
174
+ * lineOfCreditId: "568",
175
+ * factorRateEnabled: false,
176
+ * loanTermFrequency: 365,
177
+ * loanTermFrequencyType: 2,
178
+ * numberOfRepayments: 1,
179
+ * repaymentEvery: 365,
180
+ * repaymentFrequencyType: 2,
181
+ * interestType: 0,
182
+ * isEqualAmortization: false,
183
+ * amortizationType: 1,
184
+ * interestCalculationPeriodType: 1,
185
+ * transactionProcessingStrategyCode: "creocore-strategy",
186
+ * interestRateFrequencyType: 2,
187
+ * interestRatePerPeriod: 12,
188
+ * charges: [],
189
+ * collateral: [],
190
+ * invoiceNo: "1212121",
191
+ * invoiceDate: "01 December 2025",
192
+ * invoiceDueDate: "31 December 2025",
193
+ * invoiceAmount: 1222,
194
+ * invoiceCurrency: "AED",
195
+ * disapprovedAmount: 0,
196
+ * approvedReceivableAmount: 1222,
197
+ * advancePercentage: 100,
198
+ * amountAfterAdvance: 1222,
199
+ * buyerDetails: [253],
200
+ * markup: 0,
201
+ * amountInFacilityCurrency: 0,
202
+ * dateFormat: "dd MMMM yyyy",
203
+ * locale: "en",
204
+ * clientId: 4643,
205
+ * loanType: "individual",
206
+ * principal: 1222,
207
+ * allowPartialPeriodInterestCalcualtion: false,
208
+ * });
209
+ * ```
210
+ */
211
+ async create(payload) {
212
+ try {
213
+ const apiPath = "/fineract-provider/api/v1/loans";
214
+ const response = await this.httpClient.post(apiPath, payload);
215
+ return response.data;
216
+ }
217
+ catch (rawError) {
218
+ const errorPayload = rawError;
219
+ const message = errorPayload?.message ||
220
+ errorPayload?.error ||
221
+ "Failed to create invoice (loan) in Fineract";
222
+ throw new errors_1.FineractApiError(message, errorPayload?.statusCode, errorPayload?.details, errorPayload?.error);
223
+ }
224
+ }
225
+ /**
226
+ * Approves an invoice (loan) in Fineract. This mirrors the loanaccounts.approve behavior
227
+ * and reuses the same request/response types.
228
+ *
229
+ * POST /fineract-provider/api/v1/loans/{loanId}?command=approve
230
+ *
231
+ * @param loanId The ID of the loan (invoice) to approve.
232
+ * @param approvalData The approval payload (same as loanaccounts.approve).
233
+ * @returns A promise resolving to the approval response.
234
+ */
235
+ async approve(loanId, approvalData) {
236
+ try {
237
+ const apiPath = `/fineract-provider/api/v1/loans/${loanId}?command=approve`;
238
+ const response = await this.httpClient.post(apiPath, approvalData);
239
+ return response.data;
240
+ }
241
+ catch (rawError) {
242
+ const errorPayload = rawError;
243
+ const message = errorPayload?.message ||
244
+ errorPayload?.error ||
245
+ "Failed to approve invoice (loan) in Fineract";
246
+ throw new errors_1.FineractApiError(message, errorPayload?.statusCode, errorPayload?.details, errorPayload?.error);
247
+ }
248
+ }
249
+ /**
250
+ * Fetches repayment schedule/details for an invoice (loan/drawdown).
251
+ * Uses the same endpoint as loansaccounts.getRepaymentSchedule.
252
+ *
253
+ * POST /fineract-provider/api/v1/loans?command=calculateLoanSchedule
254
+ *
255
+ * @param payload Repayment calculation payload. For payables/receivables, use the extended variants.
256
+ * @returns Repayment schedule response.
257
+ */
258
+ async fetchRepaymentDetails(payload) {
259
+ try {
260
+ const apiPath = "/fineract-provider/api/v1/loans?command=calculateLoanSchedule";
261
+ const response = await this.httpClient.post(apiPath, payload);
262
+ return response.data;
263
+ }
264
+ catch (rawError) {
265
+ const errorPayload = rawError;
266
+ const message = errorPayload?.message ||
267
+ errorPayload?.error ||
268
+ "Failed to fetch invoice repayment details from Fineract";
269
+ throw new errors_1.FineractApiError(message, errorPayload?.statusCode, errorPayload?.details, errorPayload?.error);
270
+ }
271
+ }
272
+ }
273
+ exports.FineractInvoicesApi = FineractInvoicesApi;
274
+ //# sourceMappingURL=fineract-invoices-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fineract-invoices-api.js","sourceRoot":"","sources":["../../src/api/fineract-invoices-api.ts"],"names":[],"mappings":";;;AAEA,4CAAmD;AAcnD;;;;GAIG;AACH,MAAa,mBAAmB;IAG9B,YAAY,UAAsB;QAChC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,GAAG,CAAC,MAA0B;QAClC,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,IAAI,eAAe,EAAE,CAAC;YAE1C,0BAA0B;YAC1B,WAAW,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,QAAQ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