@fiado/api-invoker 1.3.66 → 1.3.69
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/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/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
|
@@ -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.69",
|
|
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": "^2.0.
|
|
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"
|
|
@@ -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
|
}
|