@fiado/api-invoker 1.3.65 → 1.3.68
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 +2 -1
- package/bin/card/CardApi.js +4 -0
- package/bin/card/interfaces/ICardApi.d.ts +2 -1
- package/bin/document-image-processor/DocumentImageProcessorApi.d.ts +2 -1
- package/bin/document-image-processor/DocumentImageProcessorApi.js +4 -0
- package/bin/document-image-processor/interfaces/IDocumentImageProcessorApi.d.ts +1 -0
- package/bin/estafeta/api/EstafetaApi.d.ts +2 -0
- package/bin/estafeta/api/EstafetaApi.js +4 -0
- package/package.json +2 -2
- package/src/card/CardApi.ts +8 -2
- package/src/card/interfaces/ICardApi.ts +3 -1
- package/src/document-image-processor/DocumentImageProcessorApi.ts +6 -1
- package/src/document-image-processor/interfaces/IDocumentImageProcessorApi.ts +4 -2
- package/src/estafeta/api/EstafetaApi.ts +7 -1
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.d.ts +0 -46
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.js +0 -2
package/bin/card/CardApi.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
2
|
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
-
import { CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest } from "@fiado/type-kit/bin/card";
|
|
3
|
+
import { CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
|
|
4
4
|
import { ICardApi } from "./interfaces/ICardApi";
|
|
5
5
|
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
6
6
|
import { InfoSelfVerifiedStatus } from "@fiado/type-kit/bin/identity";
|
|
@@ -16,4 +16,5 @@ export declare class CardApi implements ICardApi {
|
|
|
16
16
|
updateIssuance(provider: Provider, input: CardUpdateIssuanceRequest): Promise<ApiGatewayResponse<void>>;
|
|
17
17
|
updateIssuanceObservation(directoryId: string, input: CardIssuanceObservationUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
18
18
|
issuance(directoryId: string, USA_InfoSelfVerified: InfoSelfVerifiedStatus): Promise<void>;
|
|
19
|
+
updateShipping(provider: Provider, shippingId: string, input: UpdateBankAccountCardRequest): Promise<ApiGatewayResponse<void>>;
|
|
19
20
|
}
|
package/bin/card/CardApi.js
CHANGED
|
@@ -52,6 +52,10 @@ let CardApi = class CardApi {
|
|
|
52
52
|
const url = `${this.baseUrl}`;
|
|
53
53
|
await this.httpRequest.post(url, { USA_InfoSelfVerified, directoryId });
|
|
54
54
|
}
|
|
55
|
+
async updateShipping(provider, shippingId, input) {
|
|
56
|
+
const url = `${this.baseUrl}${provider}/shipping/${shippingId}`;
|
|
57
|
+
return await this.httpRequest.put(url, input);
|
|
58
|
+
}
|
|
55
59
|
};
|
|
56
60
|
exports.CardApi = CardApi;
|
|
57
61
|
exports.CardApi = CardApi = __decorate([
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import { CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest } from "@fiado/type-kit/bin/card";
|
|
2
|
+
import { CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
|
|
3
3
|
import { InfoSelfVerifiedStatus } from "@fiado/type-kit/bin/identity";
|
|
4
4
|
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
5
5
|
export interface ICardApi {
|
|
@@ -10,4 +10,5 @@ export interface ICardApi {
|
|
|
10
10
|
updateIssuance(provider: Provider, input: CardUpdateIssuanceRequest): Promise<ApiGatewayResponse<void>>;
|
|
11
11
|
updateIssuanceObservation(directoryId: string, input: CardIssuanceObservationUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
12
12
|
issuance(directoryId: string, USA_InfoSelfVerified: InfoSelfVerifiedStatus): Promise<void>;
|
|
13
|
+
updateShipping(provider: Provider, shippingId: string, input: UpdateBankAccountCardRequest): Promise<ApiGatewayResponse<void>>;
|
|
13
14
|
}
|
|
@@ -3,8 +3,9 @@ import { IHttpRequest } from "@fiado/http-client";
|
|
|
3
3
|
import { ProviderDocumentImages } from "@fiado/type-kit/bin/provider";
|
|
4
4
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
5
5
|
export declare class DocumentImageProcessorApi implements IDocumentImageProcessorApi {
|
|
6
|
-
private httpRequest;
|
|
6
|
+
private readonly httpRequest;
|
|
7
7
|
private readonly baseUrl;
|
|
8
8
|
constructor(httpRequest: IHttpRequest);
|
|
9
9
|
scaleDocumentImage(request: ProviderDocumentImages): Promise<FiadoApiResponse<any>>;
|
|
10
|
+
adjustImageDimensions(request: ProviderDocumentImages): Promise<FiadoApiResponse<any>>;
|
|
10
11
|
}
|
|
@@ -23,6 +23,10 @@ let DocumentImageProcessorApi = class DocumentImageProcessorApi {
|
|
|
23
23
|
const url = `${this.baseUrl}scale`;
|
|
24
24
|
return await this.httpRequest.post(url, request);
|
|
25
25
|
}
|
|
26
|
+
async adjustImageDimensions(request) {
|
|
27
|
+
const url = `${this.baseUrl}adjust`;
|
|
28
|
+
return await this.httpRequest.post(url, request);
|
|
29
|
+
}
|
|
26
30
|
};
|
|
27
31
|
exports.DocumentImageProcessorApi = DocumentImageProcessorApi;
|
|
28
32
|
exports.DocumentImageProcessorApi = DocumentImageProcessorApi = __decorate([
|
|
@@ -2,4 +2,5 @@ import { ProviderDocumentImages } from "@fiado/type-kit/bin/provider";
|
|
|
2
2
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
3
3
|
export interface IDocumentImageProcessorApi {
|
|
4
4
|
scaleDocumentImage(request: ProviderDocumentImages): Promise<FiadoApiResponse<any>>;
|
|
5
|
+
adjustImageDimensions(request: ProviderDocumentImages): Promise<FiadoApiResponse<any>>;
|
|
5
6
|
}
|
|
@@ -4,6 +4,7 @@ import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCar
|
|
|
4
4
|
import { CreateBankAccountCardShippingResponse } from "@fiado/type-kit/bin/card";
|
|
5
5
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
6
6
|
import { UpdateBankAccountUserRequest, CreateBankAccountUserRequest, CreateBankAccountRequest } from "@fiado/type-kit/bin/account";
|
|
7
|
+
import { OfficeDetails } from "@fiado/type-kit/bin/address";
|
|
7
8
|
export default class EstafetaApi implements IEstafetaApi {
|
|
8
9
|
private httpRequest;
|
|
9
10
|
private readonly baseUrl;
|
|
@@ -21,4 +22,5 @@ export default class EstafetaApi implements IEstafetaApi {
|
|
|
21
22
|
assignCardToUser(request: AssignCardRequest): Promise<any>;
|
|
22
23
|
getShipment(object: GetBankAccountShippingRequest): Promise<any>;
|
|
23
24
|
createShipment(object: CreateBankAccountCardShippingRequest): Promise<FiadoApiResponse<CreateBankAccountCardShippingResponse>>;
|
|
25
|
+
getLocations(params: any): Promise<FiadoApiResponse<OfficeDetails[]>>;
|
|
24
26
|
}
|
|
@@ -58,6 +58,10 @@ let EstafetaApi = class EstafetaApi {
|
|
|
58
58
|
const url = `${this.baseUrl}estafeta/shipping/card`;
|
|
59
59
|
return await this.httpRequest.post(url, object);
|
|
60
60
|
}
|
|
61
|
+
async getLocations(params) {
|
|
62
|
+
const url = `${this.baseUrl}estafeta/locations`;
|
|
63
|
+
return await this.httpRequest.get(url, { params: params });
|
|
64
|
+
}
|
|
61
65
|
};
|
|
62
66
|
EstafetaApi = __decorate([
|
|
63
67
|
(0, inversify_1.injectable)(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.68",
|
|
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.43",
|
|
17
17
|
"@fiado/http-client": "^1.0.7",
|
|
18
18
|
"@fiado/logger": "^1.0.3",
|
|
19
|
-
"@fiado/type-kit": "^
|
|
19
|
+
"@fiado/type-kit": "^2.0.10",
|
|
20
20
|
"dotenv": "^16.4.7",
|
|
21
21
|
"inversify": "^6.2.2",
|
|
22
22
|
"reflect-metadata": "^0.2.2"
|
package/src/card/CardApi.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
2
|
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
-
import { CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest } from "@fiado/type-kit/bin/card";
|
|
3
|
+
import { CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
|
|
4
4
|
import { inject, injectable } from "inversify";
|
|
5
5
|
import { ICardApi } from "./interfaces/ICardApi";
|
|
6
6
|
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
@@ -13,7 +13,7 @@ export class CardApi implements ICardApi {
|
|
|
13
13
|
|
|
14
14
|
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
async getByDirectoryId(provider: Provider, directoryId: string, onlyDb: boolean = false): Promise<ApiGatewayResponse<CardResponse>> {
|
|
18
18
|
|
|
19
19
|
const url = `${this.baseUrl}${provider}/${directoryId}/find?onlyDb=${onlyDb}`;
|
|
@@ -66,6 +66,12 @@ export class CardApi implements ICardApi {
|
|
|
66
66
|
await this.httpRequest.post(url, { USA_InfoSelfVerified, directoryId });
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
async updateShipping(provider: Provider, shippingId: string, input: UpdateBankAccountCardRequest): Promise<ApiGatewayResponse<void>> {
|
|
70
|
+
|
|
71
|
+
const url = `${this.baseUrl}${provider}/shipping/${shippingId}`;
|
|
72
|
+
return await this.httpRequest.put(url, input);
|
|
73
|
+
}
|
|
74
|
+
|
|
69
75
|
}
|
|
70
76
|
|
|
71
77
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import { CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest } from "@fiado/type-kit/bin/card";
|
|
2
|
+
import { CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
|
|
3
3
|
import { InfoSelfVerifiedStatus } from "@fiado/type-kit/bin/identity";
|
|
4
4
|
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
5
5
|
|
|
@@ -19,4 +19,6 @@ export interface ICardApi {
|
|
|
19
19
|
|
|
20
20
|
issuance(directoryId: string, USA_InfoSelfVerified: InfoSelfVerifiedStatus): Promise<void>;
|
|
21
21
|
|
|
22
|
+
updateShipping(provider: Provider, shippingId: string, input: UpdateBankAccountCardRequest): Promise<ApiGatewayResponse<void>>;
|
|
23
|
+
|
|
22
24
|
}
|
|
@@ -8,11 +8,16 @@ import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiRespo
|
|
|
8
8
|
export class DocumentImageProcessorApi implements IDocumentImageProcessorApi {
|
|
9
9
|
private readonly baseUrl = process.env.DOCUMENT_IMAGE_PROCESSOR_LAMBDA_URL || "";
|
|
10
10
|
|
|
11
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
11
|
+
constructor(@inject("IHttpRequest") private readonly httpRequest: IHttpRequest) {
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
async scaleDocumentImage(request: ProviderDocumentImages): Promise<FiadoApiResponse<any>> {
|
|
15
15
|
const url = `${this.baseUrl}scale`;
|
|
16
16
|
return await this.httpRequest.post(url, request);
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
async adjustImageDimensions(request: ProviderDocumentImages): Promise<FiadoApiResponse<any>> {
|
|
20
|
+
const url = `${this.baseUrl}adjust`;
|
|
21
|
+
return await this.httpRequest.post(url, request);
|
|
22
|
+
}
|
|
18
23
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {ProviderDocumentImages} from "@fiado/type-kit/bin/provider";
|
|
2
2
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
3
3
|
|
|
4
4
|
export interface IDocumentImageProcessorApi {
|
|
5
|
-
scaleDocumentImage(request: ProviderDocumentImages): Promise<FiadoApiResponse<any
|
|
5
|
+
scaleDocumentImage(request: ProviderDocumentImages): Promise<FiadoApiResponse<any>>;
|
|
6
|
+
|
|
7
|
+
adjustImageDimensions(request: ProviderDocumentImages): Promise<FiadoApiResponse<any>>;
|
|
6
8
|
}
|
|
@@ -7,6 +7,7 @@ import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCar
|
|
|
7
7
|
import { CreateBankAccountCardShippingResponse } from "@fiado/type-kit/bin/card";
|
|
8
8
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
9
9
|
import { UpdateBankAccountUserRequest, CreateBankAccountUserRequest, CreateBankAccountRequest } from "@fiado/type-kit/bin/account";
|
|
10
|
+
import { OfficeDetails } from "@fiado/type-kit/bin/address";
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
@injectable()
|
|
@@ -53,9 +54,14 @@ export default class EstafetaApi implements IEstafetaApi {
|
|
|
53
54
|
getShipment(object: GetBankAccountShippingRequest): Promise<any> {
|
|
54
55
|
throw new Error("Method not implemented.");
|
|
55
56
|
}
|
|
56
|
-
|
|
57
|
+
|
|
57
58
|
public async createShipment(object: CreateBankAccountCardShippingRequest): Promise<FiadoApiResponse<CreateBankAccountCardShippingResponse>> {
|
|
58
59
|
const url: string = `${this.baseUrl}estafeta/shipping/card`;
|
|
59
60
|
return await this.httpRequest.post(url, object);
|
|
60
61
|
}
|
|
62
|
+
|
|
63
|
+
public async getLocations(params: any): Promise<FiadoApiResponse<OfficeDetails[]>> {
|
|
64
|
+
const url = `${this.baseUrl}estafeta/locations`;
|
|
65
|
+
return await this.httpRequest.get(url, { params: params });
|
|
66
|
+
}
|
|
61
67
|
}
|
|
@@ -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
|
-
}
|