@fiado/api-invoker 3.0.48 → 3.1.0
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/multicommServicePayment/api/MulticommServicePaymentApi.d.ts +5 -0
- package/bin/multicommServicePayment/api/MulticommServicePaymentApi.js +12 -0
- package/bin/multicommServicePayment/api/interfaces/IMulticommServicePaymentApi.d.ts +5 -0
- package/bin/stpServicePayment/api/StpServicePaymentApi.d.ts +5 -0
- package/bin/stpServicePayment/api/StpServicePaymentApi.js +12 -0
- package/bin/stpServicePayment/api/interfaces/IStpServicePaymentApi.d.ts +5 -0
- package/package.json +2 -2
- package/src/multicommServicePayment/api/MulticommServicePaymentApi.ts +13 -0
- package/src/multicommServicePayment/api/interfaces/IMulticommServicePaymentApi.ts +5 -0
- package/src/stpServicePayment/api/StpServicePaymentApi.ts +13 -0
- package/src/stpServicePayment/api/interfaces/IStpServicePaymentApi.ts +6 -1
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.d.ts +0 -46
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.js +0 -2
- package/bin/estafeta/EstafetaApi.d.ts +0 -0
- package/bin/estafeta/EstafetaApi.js +0 -0
- package/bin/report-processor-business/api/IReportProcessorBusiness.d.ts +0 -3
- package/bin/report-processor-business/api/IReportProcessorBusiness.js +0 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IMulticommServicePaymentApi } from "./interfaces/IMulticommServicePaymentApi";
|
|
2
2
|
import { IHttpRequest } from "@fiado/http-client";
|
|
3
3
|
import { GetCatalogParams, GetFavoritesParams, GetFavoritesResponse, ServicePaymentRequest } from "@fiado/type-kit/bin/servicePayment";
|
|
4
|
+
import { ConnectorCatalogResponse } from "@fiado/type-kit/bin/benefitCenter";
|
|
4
5
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
5
6
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
6
7
|
export default class MulticommServicePaymentApi implements IMulticommServicePaymentApi {
|
|
@@ -24,4 +25,8 @@ export default class MulticommServicePaymentApi implements IMulticommServicePaym
|
|
|
24
25
|
serviceId: string;
|
|
25
26
|
}): Promise<ApiGatewayResponse<any>>;
|
|
26
27
|
getTransactions(params: GetFavoritesParams): Promise<FiadoApiResponse<GetFavoritesResponse>>;
|
|
28
|
+
getStandardCatalog(params?: {
|
|
29
|
+
benefitId?: string;
|
|
30
|
+
includeDisabled?: boolean;
|
|
31
|
+
}): Promise<ApiGatewayResponse<ConnectorCatalogResponse>>;
|
|
27
32
|
}
|
|
@@ -60,6 +60,18 @@ let MulticommServicePaymentApi = class MulticommServicePaymentApi {
|
|
|
60
60
|
url += `?${query}`;
|
|
61
61
|
return await this.httpRequest.get(url);
|
|
62
62
|
}
|
|
63
|
+
async getStandardCatalog(params) {
|
|
64
|
+
let url = `${this.baseUrl}/catalog/standard`;
|
|
65
|
+
if (params) {
|
|
66
|
+
const query = Object.keys(params)
|
|
67
|
+
.filter(key => params[key] !== undefined)
|
|
68
|
+
.map(key => `${key}=${encodeURIComponent(String(params[key]))}`)
|
|
69
|
+
.join('&');
|
|
70
|
+
if (query)
|
|
71
|
+
url += `?${query}`;
|
|
72
|
+
}
|
|
73
|
+
return await this.httpRequest.get(url);
|
|
74
|
+
}
|
|
63
75
|
};
|
|
64
76
|
MulticommServicePaymentApi = __decorate([
|
|
65
77
|
(0, inversify_1.injectable)(),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GetCatalogParams, GetFavoritesParams, GetFavoritesResponse, ServicePaymentRequest } from "@fiado/type-kit/bin/servicePayment";
|
|
2
|
+
import { ConnectorCatalogResponse } from "@fiado/type-kit/bin/benefitCenter";
|
|
2
3
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
3
4
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
4
5
|
export interface IMulticommServicePaymentApi {
|
|
@@ -19,4 +20,8 @@ export interface IMulticommServicePaymentApi {
|
|
|
19
20
|
serviceId: string;
|
|
20
21
|
}): Promise<ApiGatewayResponse<any>>;
|
|
21
22
|
getTransactions(params: GetFavoritesParams): Promise<FiadoApiResponse<GetFavoritesResponse>>;
|
|
23
|
+
getStandardCatalog(params?: {
|
|
24
|
+
benefitId?: string;
|
|
25
|
+
includeDisabled?: boolean;
|
|
26
|
+
}): Promise<ApiGatewayResponse<ConnectorCatalogResponse>>;
|
|
22
27
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IStpServicePaymentApi } from "./interfaces/IStpServicePaymentApi";
|
|
2
2
|
import { IHttpRequest } from "@fiado/http-client";
|
|
3
3
|
import { GetCatalogParams, ServicePaymentRequest, ReferenceVerificationRequest, ReferenceVerificationResponse, GetFavoritesParams, GetFavoritesResponse } from "@fiado/type-kit/bin/servicePayment";
|
|
4
|
+
import { ConnectorCatalogResponse } from "@fiado/type-kit/bin/benefitCenter";
|
|
4
5
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
5
6
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
6
7
|
export default class StpServicePaymentApi implements IStpServicePaymentApi {
|
|
@@ -20,4 +21,8 @@ export default class StpServicePaymentApi implements IStpServicePaymentApi {
|
|
|
20
21
|
getCatalog(params: GetCatalogParams): Promise<ApiGatewayResponse<any>>;
|
|
21
22
|
verificateReference(request: ReferenceVerificationRequest): Promise<ApiGatewayResponse<ReferenceVerificationResponse>>;
|
|
22
23
|
getTransactions(params: GetFavoritesParams): Promise<FiadoApiResponse<GetFavoritesResponse>>;
|
|
24
|
+
getStandardCatalog(params?: {
|
|
25
|
+
benefitId?: string;
|
|
26
|
+
includeDisabled?: boolean;
|
|
27
|
+
}): Promise<ApiGatewayResponse<ConnectorCatalogResponse>>;
|
|
23
28
|
}
|
|
@@ -60,6 +60,18 @@ let StpServicePaymentApi = class StpServicePaymentApi {
|
|
|
60
60
|
url += `?${query}`;
|
|
61
61
|
return await this.httpRequest.get(url);
|
|
62
62
|
}
|
|
63
|
+
async getStandardCatalog(params) {
|
|
64
|
+
let url = `${this.baseUrl}/catalog/standard`;
|
|
65
|
+
if (params) {
|
|
66
|
+
const query = Object.keys(params)
|
|
67
|
+
.filter(key => params[key] !== undefined)
|
|
68
|
+
.map(key => `${key}=${encodeURIComponent(String(params[key]))}`)
|
|
69
|
+
.join('&');
|
|
70
|
+
if (query)
|
|
71
|
+
url += `?${query}`;
|
|
72
|
+
}
|
|
73
|
+
return await this.httpRequest.get(url);
|
|
74
|
+
}
|
|
63
75
|
};
|
|
64
76
|
StpServicePaymentApi = __decorate([
|
|
65
77
|
(0, inversify_1.injectable)(),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GetCatalogParams, ServicePaymentRequest, ReferenceVerificationRequest, ReferenceVerificationResponse, GetFavoritesParams, GetFavoritesResponse } from "@fiado/type-kit/bin/servicePayment";
|
|
2
|
+
import { ConnectorCatalogResponse } from "@fiado/type-kit/bin/benefitCenter";
|
|
2
3
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
3
4
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
4
5
|
export interface IStpServicePaymentApi {
|
|
@@ -15,4 +16,8 @@ export interface IStpServicePaymentApi {
|
|
|
15
16
|
}): Promise<ApiGatewayResponse<any>>;
|
|
16
17
|
verificateReference(request: ReferenceVerificationRequest): Promise<ApiGatewayResponse<ReferenceVerificationResponse>>;
|
|
17
18
|
getTransactions(params: GetFavoritesParams): Promise<FiadoApiResponse<GetFavoritesResponse>>;
|
|
19
|
+
getStandardCatalog(params?: {
|
|
20
|
+
benefitId?: string;
|
|
21
|
+
includeDisabled?: boolean;
|
|
22
|
+
}): Promise<ApiGatewayResponse<ConnectorCatalogResponse>>;
|
|
18
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
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.50",
|
|
17
17
|
"@fiado/http-client": "^1.0.7",
|
|
18
18
|
"@fiado/logger": "^1.0.3",
|
|
19
|
-
"@fiado/type-kit": "^3.1.
|
|
19
|
+
"@fiado/type-kit": "^3.1.30",
|
|
20
20
|
"dotenv": "^16.4.7",
|
|
21
21
|
"i": "^0.3.7",
|
|
22
22
|
"inversify": "^6.2.2",
|
|
@@ -2,6 +2,7 @@ import {IMulticommServicePaymentApi} from "./interfaces/IMulticommServicePayment
|
|
|
2
2
|
import {inject, injectable} from "inversify";
|
|
3
3
|
import {IHttpRequest} from "@fiado/http-client";
|
|
4
4
|
import {GetCatalogParams, GetFavoritesParams, GetFavoritesResponse, ServicePaymentRequest} from "@fiado/type-kit/bin/servicePayment";
|
|
5
|
+
import {ConnectorCatalogResponse} from "@fiado/type-kit/bin/benefitCenter";
|
|
5
6
|
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
6
7
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
7
8
|
|
|
@@ -59,4 +60,16 @@ export default class MulticommServicePaymentApi implements IMulticommServicePaym
|
|
|
59
60
|
if (query) url += `?${query}`;
|
|
60
61
|
return await this.httpRequest.get(url);
|
|
61
62
|
}
|
|
63
|
+
|
|
64
|
+
async getStandardCatalog(params?: { benefitId?: string; includeDisabled?: boolean }): Promise<ApiGatewayResponse<ConnectorCatalogResponse>> {
|
|
65
|
+
let url = `${this.baseUrl}/catalog/standard`;
|
|
66
|
+
if (params) {
|
|
67
|
+
const query = Object.keys(params)
|
|
68
|
+
.filter(key => params[key as keyof typeof params] !== undefined)
|
|
69
|
+
.map(key => `${key}=${encodeURIComponent(String(params[key as keyof typeof params]))}`)
|
|
70
|
+
.join('&');
|
|
71
|
+
if (query) url += `?${query}`;
|
|
72
|
+
}
|
|
73
|
+
return await this.httpRequest.get(url);
|
|
74
|
+
}
|
|
62
75
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {GetCatalogParams, GetFavoritesParams, GetFavoritesResponse, ServicePaymentRequest} from "@fiado/type-kit/bin/servicePayment";
|
|
2
|
+
import {ConnectorCatalogResponse} from "@fiado/type-kit/bin/benefitCenter";
|
|
2
3
|
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
3
4
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
4
5
|
|
|
@@ -18,4 +19,8 @@ export interface IMulticommServicePaymentApi {
|
|
|
18
19
|
consultTransaction(params: {transactionNumber: string, date: string, serviceId: string}): Promise<ApiGatewayResponse<any>>;
|
|
19
20
|
|
|
20
21
|
getTransactions(params: GetFavoritesParams): Promise<FiadoApiResponse<GetFavoritesResponse>>;
|
|
22
|
+
|
|
23
|
+
// Agregado en v3.1.0 — consume GET /catalog/standard del conector.
|
|
24
|
+
// Consumido por CatalogTreeBuilder en benefits-marketplace-business.
|
|
25
|
+
getStandardCatalog(params?: { benefitId?: string; includeDisabled?: boolean }): Promise<ApiGatewayResponse<ConnectorCatalogResponse>>;
|
|
21
26
|
}
|
|
@@ -2,6 +2,7 @@ import {IStpServicePaymentApi} from "./interfaces/IStpServicePaymentApi";
|
|
|
2
2
|
import {inject, injectable} from "inversify";
|
|
3
3
|
import {IHttpRequest} from "@fiado/http-client";
|
|
4
4
|
import {GetCatalogParams, ServicePaymentRequest, ReferenceVerificationRequest, ReferenceVerificationResponse, GetFavoritesParams, GetFavoritesResponse} from "@fiado/type-kit/bin/servicePayment";
|
|
5
|
+
import {ConnectorCatalogResponse} from "@fiado/type-kit/bin/benefitCenter";
|
|
5
6
|
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
6
7
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
7
8
|
|
|
@@ -59,4 +60,16 @@ export default class StpServicePaymentApi implements IStpServicePaymentApi {
|
|
|
59
60
|
if (query) url += `?${query}`;
|
|
60
61
|
return await this.httpRequest.get(url);
|
|
61
62
|
}
|
|
63
|
+
|
|
64
|
+
async getStandardCatalog(params?: { benefitId?: string; includeDisabled?: boolean }): Promise<ApiGatewayResponse<ConnectorCatalogResponse>> {
|
|
65
|
+
let url = `${this.baseUrl}/catalog/standard`;
|
|
66
|
+
if (params) {
|
|
67
|
+
const query = Object.keys(params)
|
|
68
|
+
.filter(key => params[key as keyof typeof params] !== undefined)
|
|
69
|
+
.map(key => `${key}=${encodeURIComponent(String(params[key as keyof typeof params]))}`)
|
|
70
|
+
.join('&');
|
|
71
|
+
if (query) url += `?${query}`;
|
|
72
|
+
}
|
|
73
|
+
return await this.httpRequest.get(url);
|
|
74
|
+
}
|
|
62
75
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {GetCatalogParams, ServicePaymentRequest, ReferenceVerificationRequest, ReferenceVerificationResponse, GetFavoritesParams, GetFavoritesResponse} from "@fiado/type-kit/bin/servicePayment";
|
|
2
|
+
import {ConnectorCatalogResponse} from "@fiado/type-kit/bin/benefitCenter";
|
|
2
3
|
import {ApiGatewayResponse} from "@fiado/gateway-adapter";
|
|
3
4
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
4
5
|
|
|
@@ -17,5 +18,9 @@ export interface IStpServicePaymentApi {
|
|
|
17
18
|
|
|
18
19
|
verificateReference(request: ReferenceVerificationRequest): Promise<ApiGatewayResponse<ReferenceVerificationResponse>>;
|
|
19
20
|
|
|
20
|
-
getTransactions(params: GetFavoritesParams): Promise<FiadoApiResponse<GetFavoritesResponse
|
|
21
|
+
getTransactions(params: GetFavoritesParams): Promise<FiadoApiResponse<GetFavoritesResponse>>;
|
|
22
|
+
|
|
23
|
+
// Agregado en v3.1.0 — consume GET /catalog/standard del conector.
|
|
24
|
+
// Consumido por CatalogTreeBuilder en benefits-marketplace-business.
|
|
25
|
+
getStandardCatalog(params?: { benefitId?: string; includeDisabled?: boolean }): Promise<ApiGatewayResponse<ConnectorCatalogResponse>>;
|
|
21
26
|
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ChangePasswordRequest, GetUserRequest, GetUserResponse, RefreshTokenRequest, RefreshTokenResponse, RespondToAuthChallengeRequest, SetPasswordRequest, SignInRequest, SignInResponse, SignUpConfirmRequest, SignUpRequest, SignUpResponse } from "@fiado/type-kit/bin/cognitoConnector";
|
|
2
|
-
export interface ICognitoApi {
|
|
3
|
-
/**
|
|
4
|
-
* Healthcheck for the cognito-connector
|
|
5
|
-
*/
|
|
6
|
-
healthcheck(): Promise<HealthcheckResponse>;
|
|
7
|
-
/**
|
|
8
|
-
* Create a new user in Cognito
|
|
9
|
-
*/
|
|
10
|
-
signUp(request: SignUpRequest): Promise<SignUpResponse>;
|
|
11
|
-
/**
|
|
12
|
-
* Confirm sign-up for a user in Cognito
|
|
13
|
-
*/
|
|
14
|
-
signUpConfirm(request: SignUpConfirmRequest): Promise<void>;
|
|
15
|
-
/**
|
|
16
|
-
* Sign in a user
|
|
17
|
-
*/
|
|
18
|
-
signIn(request: SignInRequest): Promise<SignInResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* Sign out a user
|
|
21
|
-
*/
|
|
22
|
-
signOut(): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* Change a user's password
|
|
25
|
-
*/
|
|
26
|
-
changePassword(request: ChangePasswordRequest): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Retrieve user details
|
|
29
|
-
*/
|
|
30
|
-
getUser(request: GetUserRequest): Promise<GetUserResponse>;
|
|
31
|
-
/**
|
|
32
|
-
* Refresh a user's tokens
|
|
33
|
-
*/
|
|
34
|
-
refreshToken(request: RefreshTokenRequest): Promise<RefreshTokenResponse>;
|
|
35
|
-
/**
|
|
36
|
-
* Respond to an auth challenge
|
|
37
|
-
*/
|
|
38
|
-
respondToAuthChallenge(request: RespondToAuthChallengeRequest): Promise<any>;
|
|
39
|
-
/**
|
|
40
|
-
* Reset a user's password
|
|
41
|
-
*/
|
|
42
|
-
resetPassword(request: SetPasswordRequest): Promise<void>;
|
|
43
|
-
}
|
|
44
|
-
export interface HealthcheckResponse {
|
|
45
|
-
status: string;
|
|
46
|
-
}
|
|
File without changes
|
|
File without changes
|