@fiado/api-invoker 1.0.56 → 1.0.58
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/card/CardApi.d.ts
CHANGED
|
@@ -8,4 +8,5 @@ export declare class CardApi implements ICardApi {
|
|
|
8
8
|
private readonly baseUrl;
|
|
9
9
|
constructor(httpRequest: IHttpRequest);
|
|
10
10
|
getById(id: string, countryId: CountryId): Promise<ApiGatewayResponse<CardResponse>>;
|
|
11
|
+
getByExternalId(externalId: string, countryId: CountryId): Promise<ApiGatewayResponse<CardResponse>>;
|
|
11
12
|
}
|
package/bin/card/CardApi.js
CHANGED
|
@@ -20,7 +20,11 @@ let CardApi = class CardApi {
|
|
|
20
20
|
this.baseUrl = process.env.CARD_LAMBDA_URL || "";
|
|
21
21
|
}
|
|
22
22
|
async getById(id, countryId) {
|
|
23
|
-
const url = `${this.baseUrl}/${countryId}/${
|
|
23
|
+
const url = `${this.baseUrl}/${countryId}/${id}`;
|
|
24
|
+
return await this.httpRequest.get(url);
|
|
25
|
+
}
|
|
26
|
+
async getByExternalId(externalId, countryId) {
|
|
27
|
+
const url = `${this.baseUrl}/${countryId}/${externalId}`;
|
|
24
28
|
return await this.httpRequest.get(url);
|
|
25
29
|
}
|
|
26
30
|
};
|
|
@@ -3,4 +3,5 @@ import { CardResponse } from "@fiado/type-kit/bin/card";
|
|
|
3
3
|
import { CountryId } from "@fiado/type-kit/bin/country";
|
|
4
4
|
export interface ICardApi {
|
|
5
5
|
getById(id: string, countryId: CountryId): Promise<ApiGatewayResponse<CardResponse>>;
|
|
6
|
+
getByExternalId(externalId: string, countryId: CountryId): Promise<ApiGatewayResponse<CardResponse>>;
|
|
6
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.58",
|
|
4
4
|
"description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a traves de invocaciones http",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
package/src/card/CardApi.ts
CHANGED
|
@@ -16,7 +16,14 @@ export class CardApi implements ICardApi {
|
|
|
16
16
|
|
|
17
17
|
async getById(id: string, countryId: CountryId): Promise<ApiGatewayResponse<CardResponse>> {
|
|
18
18
|
|
|
19
|
-
const url = `${this.baseUrl}/${countryId}/${
|
|
19
|
+
const url = `${this.baseUrl}/${countryId}/${id}`;
|
|
20
|
+
return await this.httpRequest.get(url);
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async getByExternalId(externalId: string, countryId: CountryId): Promise<ApiGatewayResponse<CardResponse>> {
|
|
25
|
+
|
|
26
|
+
const url = `${this.baseUrl}/${countryId}/${externalId}`;
|
|
20
27
|
return await this.httpRequest.get(url);
|
|
21
28
|
|
|
22
29
|
}
|