@fiado/api-invoker 3.4.1 → 3.4.3
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.
- package/bin/credit-engine/CreditEngineApi.d.ts +5 -0
- package/bin/credit-engine/CreditEngineApi.js +10 -0
- package/bin/credit-engine/interfaces/ICreditEngineApi.d.ts +13 -0
- package/bin/credit-payment/CreditPaymentApi.d.ts +1 -0
- package/bin/credit-payment/CreditPaymentApi.js +5 -0
- package/bin/credit-payment/interfaces/ICreditPaymentApi.d.ts +5 -0
- package/package.json +1 -1
- package/src/credit-engine/CreditEngineApi.ts +12 -0
- package/src/credit-engine/interfaces/ICreditEngineApi.ts +12 -0
- package/src/credit-payment/CreditPaymentApi.ts +6 -0
- package/src/credit-payment/interfaces/ICreditPaymentApi.ts +6 -0
|
@@ -16,4 +16,9 @@ export declare class CreditEngineApi implements ICreditEngineApi {
|
|
|
16
16
|
}>;
|
|
17
17
|
getCreditProfile(directoryId: string, partnerId: string): Promise<CreditProfileResponse>;
|
|
18
18
|
getActiveCredit(directoryId: string): Promise<CreditDetailResponse | null>;
|
|
19
|
+
enrichDirectories(directoryIds: string[]): Promise<any>;
|
|
20
|
+
getCreditProgress(credits: Array<{
|
|
21
|
+
credit_id: string;
|
|
22
|
+
term_weeks?: number;
|
|
23
|
+
}>): Promise<any>;
|
|
19
24
|
}
|
|
@@ -40,6 +40,16 @@ let CreditEngineApi = class CreditEngineApi {
|
|
|
40
40
|
const url = `${this.baseUrl}credit/active/${directoryId}`;
|
|
41
41
|
return await this.httpRequest.get(url, undefined, { operationName: "getActiveCredit" });
|
|
42
42
|
}
|
|
43
|
+
async enrichDirectories(directoryIds) {
|
|
44
|
+
const url = `${this.baseUrl}credit/private/enrich-directories`;
|
|
45
|
+
const operationName = "privateEnrichDirectories";
|
|
46
|
+
return await this.httpRequest.post(url, { directoryIds }, { 'operationName': operationName });
|
|
47
|
+
}
|
|
48
|
+
async getCreditProgress(credits) {
|
|
49
|
+
const url = `${this.baseUrl}credit/private/credit-progress`;
|
|
50
|
+
const operationName = "privateGetCreditProgress";
|
|
51
|
+
return await this.httpRequest.post(url, { credits }, { 'operationName': operationName });
|
|
52
|
+
}
|
|
43
53
|
};
|
|
44
54
|
exports.CreditEngineApi = CreditEngineApi;
|
|
45
55
|
exports.CreditEngineApi = CreditEngineApi = __decorate([
|
|
@@ -30,4 +30,17 @@ export interface ICreditEngineApi {
|
|
|
30
30
|
* @returns Detalle del crédito activo, o `null` si no hay crédito activo.
|
|
31
31
|
*/
|
|
32
32
|
getActiveCredit(directoryId: string): Promise<CreditDetailResponse | null>;
|
|
33
|
+
/**
|
|
34
|
+
* Resuelve full_name + phone_number para una lista de directoryIds.
|
|
35
|
+
* Endpoint: POST /credit/private/enrich-directories
|
|
36
|
+
*/
|
|
37
|
+
enrichDirectories(directoryIds: string[]): Promise<any>;
|
|
38
|
+
/**
|
|
39
|
+
* Resuelve weeks_paid + weeks_total + next_due_date para una lista de creditos.
|
|
40
|
+
* Endpoint: POST /credit/private/credit-progress
|
|
41
|
+
*/
|
|
42
|
+
getCreditProgress(credits: Array<{
|
|
43
|
+
credit_id: string;
|
|
44
|
+
term_weeks?: number;
|
|
45
|
+
}>): Promise<any>;
|
|
33
46
|
}
|
|
@@ -13,4 +13,5 @@ export declare class CreditPaymentApi implements ICreditPaymentApi {
|
|
|
13
13
|
reverse(request: any): Promise<any>;
|
|
14
14
|
getBalance(creditId: string): Promise<any>;
|
|
15
15
|
getHistory(creditId: string): Promise<any>;
|
|
16
|
+
listFundingInstructions(partnerId: string, year: number): Promise<any>;
|
|
16
17
|
}
|
|
@@ -69,6 +69,11 @@ let CreditPaymentApi = class CreditPaymentApi {
|
|
|
69
69
|
const operationName = "creditHistory";
|
|
70
70
|
return await this.httpRequest.post(url, null, { 'operationName': operationName });
|
|
71
71
|
}
|
|
72
|
+
async listFundingInstructions(partnerId, year) {
|
|
73
|
+
const url = `${this.baseUrl}credit-payment/funding-instructions`;
|
|
74
|
+
const operationName = "privateListFundingInstructions";
|
|
75
|
+
return await this.httpRequest.post(url, { partnerId, year }, { 'operationName': operationName });
|
|
76
|
+
}
|
|
72
77
|
};
|
|
73
78
|
exports.CreditPaymentApi = CreditPaymentApi;
|
|
74
79
|
exports.CreditPaymentApi = CreditPaymentApi = __decorate([
|
|
@@ -35,4 +35,9 @@ export interface ICreditPaymentApi {
|
|
|
35
35
|
* Obtiene historial de transacciones de un crédito.
|
|
36
36
|
*/
|
|
37
37
|
getHistory(creditId: string): Promise<any>;
|
|
38
|
+
/**
|
|
39
|
+
* Lista funding instructions del partner del año, filtradas SENT/CONFIRMED.
|
|
40
|
+
* Para conciliacion bancaria PCF en credit-worker-business.
|
|
41
|
+
*/
|
|
42
|
+
listFundingInstructions(partnerId: string, year: number): Promise<any>;
|
|
38
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.3",
|
|
4
4
|
"description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a través de invocaciones http",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -39,4 +39,16 @@ export class CreditEngineApi implements ICreditEngineApi {
|
|
|
39
39
|
{ operationName: "getActiveCredit" },
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
|
+
|
|
43
|
+
public async enrichDirectories(directoryIds: string[]): Promise<any> {
|
|
44
|
+
const url = `${this.baseUrl}credit/private/enrich-directories`;
|
|
45
|
+
const operationName = "privateEnrichDirectories";
|
|
46
|
+
return await this.httpRequest.post(url, { directoryIds }, { 'operationName': operationName });
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public async getCreditProgress(credits: Array<{ credit_id: string; term_weeks?: number }>): Promise<any> {
|
|
50
|
+
const url = `${this.baseUrl}credit/private/credit-progress`;
|
|
51
|
+
const operationName = "privateGetCreditProgress";
|
|
52
|
+
return await this.httpRequest.post(url, { credits }, { 'operationName': operationName });
|
|
53
|
+
}
|
|
42
54
|
}
|
|
@@ -31,4 +31,16 @@ export interface ICreditEngineApi {
|
|
|
31
31
|
* @returns Detalle del crédito activo, o `null` si no hay crédito activo.
|
|
32
32
|
*/
|
|
33
33
|
getActiveCredit(directoryId: string): Promise<CreditDetailResponse | null>;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Resuelve full_name + phone_number para una lista de directoryIds.
|
|
37
|
+
* Endpoint: POST /credit/private/enrich-directories
|
|
38
|
+
*/
|
|
39
|
+
enrichDirectories(directoryIds: string[]): Promise<any>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Resuelve weeks_paid + weeks_total + next_due_date para una lista de creditos.
|
|
43
|
+
* Endpoint: POST /credit/private/credit-progress
|
|
44
|
+
*/
|
|
45
|
+
getCreditProgress(credits: Array<{ credit_id: string; term_weeks?: number }>): Promise<any>;
|
|
34
46
|
}
|
|
@@ -64,4 +64,10 @@ export class CreditPaymentApi implements ICreditPaymentApi {
|
|
|
64
64
|
const operationName = "creditHistory";
|
|
65
65
|
return await this.httpRequest.post(url, null, { 'operationName': operationName });
|
|
66
66
|
}
|
|
67
|
+
|
|
68
|
+
public async listFundingInstructions(partnerId: string, year: number): Promise<any> {
|
|
69
|
+
const url = `${this.baseUrl}credit-payment/funding-instructions`;
|
|
70
|
+
const operationName = "privateListFundingInstructions";
|
|
71
|
+
return await this.httpRequest.post(url, { partnerId, year }, { 'operationName': operationName });
|
|
72
|
+
}
|
|
67
73
|
}
|
|
@@ -43,4 +43,10 @@ export interface ICreditPaymentApi {
|
|
|
43
43
|
* Obtiene historial de transacciones de un crédito.
|
|
44
44
|
*/
|
|
45
45
|
getHistory(creditId: string): Promise<any>;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Lista funding instructions del partner del año, filtradas SENT/CONFIRMED.
|
|
49
|
+
* Para conciliacion bancaria PCF en credit-worker-business.
|
|
50
|
+
*/
|
|
51
|
+
listFundingInstructions(partnerId: string, year: number): Promise<any>;
|
|
46
52
|
}
|