@fiado/api-invoker 1.2.92 → 1.2.94
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/centralPayments/CentralPaymentsConnectorApi.d.ts +2 -2
- package/bin/centralPayments/interfaces/ICentralPaymentsConnectorApi.d.ts +2 -2
- package/bin/pricelist-business/PriceListApi.d.ts +6 -1
- package/bin/pricelist-business/PriceListApi.js +14 -0
- package/bin/pricelist-business/interfaces/IPriceListApi.d.ts +6 -1
- package/package.json +2 -2
- package/src/centralPayments/CentralPaymentsConnectorApi.ts +2 -2
- package/src/centralPayments/interfaces/ICentralPaymentsConnectorApi.ts +4 -4
- package/src/pricelist-business/PriceListApi.ts +19 -2
- package/src/pricelist-business/interfaces/IPriceListApi.ts +2 -2
|
@@ -6,7 +6,7 @@ import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBa
|
|
|
6
6
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
7
7
|
import { CentralPaymentsQueryParams, CentralPaymentsTransactionItem, TransactionListResponse } from "@fiado/type-kit/bin/transaction";
|
|
8
8
|
import { InvokerUtils } from "../utils/InvokerUtils";
|
|
9
|
-
import { ProviderDocumentUploadRequest } from "@fiado/type-kit/bin/provider";
|
|
9
|
+
import { ProviderDocumentUploadRequest, ProviderDocumentUploadResponse } from "@fiado/type-kit/bin/provider";
|
|
10
10
|
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
11
11
|
import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
|
|
12
12
|
import { BankAccountP2pTransferResponse } from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
|
|
@@ -22,7 +22,7 @@ export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConn
|
|
|
22
22
|
deleteCardholder(externalUserId: string): Promise<FiadoApiResponse<null>>;
|
|
23
23
|
getOOWQuestions(externalUserId: string): Promise<FiadoApiResponse<OOWQuestionsResponse[]>>;
|
|
24
24
|
submitOOWQuestionAnswers(externalUserId: string, request: SubmitOOWQuestionAnswersRequest[]): Promise<FiadoApiResponse<GetBankAccountUserResponse>>;
|
|
25
|
-
uploadDocuments(externalUserId: string, request: ProviderDocumentUploadRequest): Promise<FiadoApiResponse<
|
|
25
|
+
uploadDocuments(externalUserId: string, request: ProviderDocumentUploadRequest): Promise<FiadoApiResponse<ProviderDocumentUploadResponse>>;
|
|
26
26
|
changePin(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<UpdateBankAccountCardResponse>>;
|
|
27
27
|
getCardsById(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
28
28
|
getCardSensitiveInformation(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
@@ -3,7 +3,7 @@ import { HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequ
|
|
|
3
3
|
import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBatchRequest, CardBatchResponse, CardStatementListResponse, CreateBankAccountCardRequest, CreateBankAccountCardResponse, GetBankAccountCardBalanceResponse, GetBankAccountCardResponse, StatementDocumentResponse, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
|
|
4
4
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
5
5
|
import { CentralPaymentsQueryParams, CentralPaymentsTransactionItem, TransactionListResponse } from "@fiado/type-kit/bin/transaction";
|
|
6
|
-
import { ProviderDocumentUploadRequest } from "@fiado/type-kit/bin/provider";
|
|
6
|
+
import { ProviderDocumentUploadRequest, ProviderDocumentUploadResponse } from "@fiado/type-kit/bin/provider";
|
|
7
7
|
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
8
8
|
import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
|
|
9
9
|
import { BankAccountP2pTransferResponse } from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
|
|
@@ -15,7 +15,7 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
15
15
|
deleteCardholder(externalUserId: string): Promise<FiadoApiResponse<null>>;
|
|
16
16
|
getOOWQuestions(externalUserId: string): Promise<FiadoApiResponse<OOWQuestionsResponse[]>>;
|
|
17
17
|
submitOOWQuestionAnswers(externalUserId: string, request: SubmitOOWQuestionAnswersRequest[]): Promise<FiadoApiResponse<GetBankAccountUserResponse>>;
|
|
18
|
-
uploadDocuments(externalUserId: string, request: ProviderDocumentUploadRequest): Promise<FiadoApiResponse<
|
|
18
|
+
uploadDocuments(externalUserId: string, request: ProviderDocumentUploadRequest): Promise<FiadoApiResponse<ProviderDocumentUploadResponse>>;
|
|
19
19
|
changePin(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<UpdateBankAccountCardResponse>>;
|
|
20
20
|
getCardsById(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
21
21
|
getCardSensitiveInformation(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
3
3
|
import { IPriceListApi } from "./interfaces/IPriceListApi";
|
|
4
|
-
import { GetPriceListDirectoriesResponse } from "@fiado/type-kit/bin/pricelist";
|
|
4
|
+
import { GetPriceListDirectoriesResponse, GetServiceMembershipListResponse } from "@fiado/type-kit/bin/pricelist";
|
|
5
5
|
export declare class PriceListApi implements IPriceListApi {
|
|
6
6
|
private httpRequest;
|
|
7
7
|
private readonly baseUrl;
|
|
8
8
|
constructor(httpRequest: IHttpRequest);
|
|
9
|
+
getList(params: {
|
|
10
|
+
pageSize?: number;
|
|
11
|
+
index?: string;
|
|
12
|
+
serviceId?: string;
|
|
13
|
+
}): Promise<FiadoApiResponse<GetServiceMembershipListResponse>>;
|
|
9
14
|
getDiscountByServiceIdAndDirectories(directories: string[], serviceId: string): Promise<FiadoApiResponse<GetPriceListDirectoriesResponse>>;
|
|
10
15
|
}
|
|
@@ -24,6 +24,20 @@ let PriceListApi = class PriceListApi {
|
|
|
24
24
|
this.httpRequest = httpRequest;
|
|
25
25
|
this.baseUrl = process.env.PRICELIST_BUSINESS_URL || "";
|
|
26
26
|
}
|
|
27
|
+
async getList(params) {
|
|
28
|
+
const queryParams = [];
|
|
29
|
+
if (params.pageSize) {
|
|
30
|
+
queryParams.push(`pageSize=${params.pageSize}`);
|
|
31
|
+
}
|
|
32
|
+
if (params.index) {
|
|
33
|
+
queryParams.push(`index=${params.index}`);
|
|
34
|
+
}
|
|
35
|
+
if (params.serviceId) {
|
|
36
|
+
queryParams.push(`serviceId=${params.serviceId}`);
|
|
37
|
+
}
|
|
38
|
+
const url = `${this.baseUrl}pricelist?${queryParams.join('&')}`;
|
|
39
|
+
return await this.httpRequest.get(`${url}`);
|
|
40
|
+
}
|
|
27
41
|
async getDiscountByServiceIdAndDirectories(directories, serviceId) {
|
|
28
42
|
const queryParams = [];
|
|
29
43
|
directories.forEach(directory => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
2
|
-
import { GetPriceListDirectoriesResponse } from "@fiado/type-kit/bin/pricelist";
|
|
2
|
+
import { GetPriceListDirectoriesResponse, GetServiceMembershipListResponse } from "@fiado/type-kit/bin/pricelist";
|
|
3
3
|
/**
|
|
4
4
|
* Interfaz para el servicio Directory que permite operaciones sobre directorios.
|
|
5
5
|
*/
|
|
@@ -10,4 +10,9 @@ export interface IPriceListApi {
|
|
|
10
10
|
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
11
11
|
*/
|
|
12
12
|
getDiscountByServiceIdAndDirectories(directories: string[], serviceId: string): Promise<FiadoApiResponse<GetPriceListDirectoriesResponse>>;
|
|
13
|
+
getList(params: {
|
|
14
|
+
pageSize?: number;
|
|
15
|
+
index?: string;
|
|
16
|
+
serviceId?: string;
|
|
17
|
+
}): Promise<FiadoApiResponse<GetServiceMembershipListResponse>>;
|
|
13
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.94",
|
|
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",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@fiado/gateway-adapter": "^1.1.40",
|
|
17
17
|
"@fiado/http-client": "^1.0.5",
|
|
18
18
|
"@fiado/logger": "^1.0.3",
|
|
19
|
-
"@fiado/type-kit": "^1.8.
|
|
19
|
+
"@fiado/type-kit": "^1.8.61",
|
|
20
20
|
"dotenv": "^16.4.7",
|
|
21
21
|
"inversify": "^6.2.2",
|
|
22
22
|
"reflect-metadata": "^0.2.2"
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
TransactionListResponse
|
|
36
36
|
} from "@fiado/type-kit/bin/transaction";
|
|
37
37
|
import {InvokerUtils} from "../utils/InvokerUtils";
|
|
38
|
-
import {ProviderDocumentUploadRequest} from "@fiado/type-kit/bin/provider";
|
|
38
|
+
import {ProviderDocumentUploadRequest, ProviderDocumentUploadResponse} from "@fiado/type-kit/bin/provider";
|
|
39
39
|
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
40
40
|
import {CreateExternalBankAccountRequest, CreateExternalBankAccountResponse} from "@fiado/type-kit/bin/bankAccount";
|
|
41
41
|
import {BankAccountP2pTransferResponse} from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
|
|
@@ -89,7 +89,7 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
|
|
|
89
89
|
return await this.httpRequest.post(url, request);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
async uploadDocuments(externalUserId: string, request: ProviderDocumentUploadRequest): Promise<FiadoApiResponse<
|
|
92
|
+
async uploadDocuments(externalUserId: string, request: ProviderDocumentUploadRequest): Promise<FiadoApiResponse<ProviderDocumentUploadResponse>> {
|
|
93
93
|
const url = `${this.baseUrl}/kyc/${externalUserId}/documents/upload`;
|
|
94
94
|
return await this.httpRequest.post(url, request);
|
|
95
95
|
}
|
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
CentralPaymentsTransactionItem,
|
|
32
32
|
TransactionListResponse
|
|
33
33
|
} from "@fiado/type-kit/bin/transaction";
|
|
34
|
-
import {ProviderDocumentUploadRequest} from "@fiado/type-kit/bin/provider";
|
|
34
|
+
import { ProviderDocumentUploadRequest, ProviderDocumentUploadResponse } from "@fiado/type-kit/bin/provider";
|
|
35
35
|
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
36
|
-
import {CreateExternalBankAccountRequest, CreateExternalBankAccountResponse} from "@fiado/type-kit/bin/bankAccount";
|
|
37
|
-
import {BankAccountP2pTransferResponse} from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
|
|
36
|
+
import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
|
|
37
|
+
import { BankAccountP2pTransferResponse } from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
|
|
38
38
|
|
|
39
39
|
export interface ICentralPaymentsConnectorApi {
|
|
40
40
|
healthcheck(): Promise<FiadoApiResponse<HealthcheckResponse>>;
|
|
@@ -51,7 +51,7 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
51
51
|
|
|
52
52
|
submitOOWQuestionAnswers(externalUserId: string, request: SubmitOOWQuestionAnswersRequest[]): Promise<FiadoApiResponse<GetBankAccountUserResponse>>;
|
|
53
53
|
|
|
54
|
-
uploadDocuments(externalUserId: string, request: ProviderDocumentUploadRequest): Promise<FiadoApiResponse<
|
|
54
|
+
uploadDocuments(externalUserId: string, request: ProviderDocumentUploadRequest): Promise<FiadoApiResponse<ProviderDocumentUploadResponse>>;
|
|
55
55
|
|
|
56
56
|
changePin(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<UpdateBankAccountCardResponse>>;
|
|
57
57
|
|
|
@@ -3,7 +3,7 @@ import { IHttpRequest } from "@fiado/http-client";
|
|
|
3
3
|
import dotenv from 'dotenv';
|
|
4
4
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
5
5
|
import { IPriceListApi } from "./interfaces/IPriceListApi";
|
|
6
|
-
import { GetPriceListDirectoriesResponse } from "@fiado/type-kit/bin/pricelist";
|
|
6
|
+
import { GetPriceListDirectoriesResponse, GetServiceMembershipListResponse } from "@fiado/type-kit/bin/pricelist";
|
|
7
7
|
|
|
8
8
|
dotenv.config();
|
|
9
9
|
|
|
@@ -13,7 +13,24 @@ export class PriceListApi implements IPriceListApi {
|
|
|
13
13
|
private readonly baseUrl = process.env.PRICELIST_BUSINESS_URL || "";
|
|
14
14
|
|
|
15
15
|
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
async getList(params: { pageSize?: number; index?: string; serviceId?: string; }): Promise<FiadoApiResponse<GetServiceMembershipListResponse>> {
|
|
18
|
+
const queryParams = []
|
|
19
|
+
if (params.pageSize) {
|
|
20
|
+
queryParams.push(`pageSize=${params.pageSize}`)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (params.index) {
|
|
24
|
+
queryParams.push(`index=${params.index}`)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (params.serviceId) {
|
|
28
|
+
queryParams.push(`serviceId=${params.serviceId}`)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const url = `${this.baseUrl}pricelist?${queryParams.join('&')}`;
|
|
32
|
+
return await this.httpRequest.get(`${url}`);
|
|
33
|
+
}
|
|
17
34
|
|
|
18
35
|
async getDiscountByServiceIdAndDirectories(directories: string[], serviceId: string): Promise<FiadoApiResponse<GetPriceListDirectoriesResponse>> {
|
|
19
36
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
2
|
-
import { GetPriceListDirectoriesResponse } from "@fiado/type-kit/bin/pricelist";
|
|
2
|
+
import { GetPriceListDirectoriesResponse, GetServiceMembershipListResponse } from "@fiado/type-kit/bin/pricelist";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Interfaz para el servicio Directory que permite operaciones sobre directorios.
|
|
@@ -12,5 +12,5 @@ export interface IPriceListApi {
|
|
|
12
12
|
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
13
13
|
*/
|
|
14
14
|
getDiscountByServiceIdAndDirectories(directories:string[], serviceId:string): Promise<FiadoApiResponse<GetPriceListDirectoriesResponse>>;
|
|
15
|
-
|
|
15
|
+
getList(params: {pageSize?: number;index?: string;serviceId?: string;}): Promise<FiadoApiResponse<GetServiceMembershipListResponse>>;
|
|
16
16
|
}
|