@fiado/api-invoker 1.3.66 → 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.
@@ -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.66",
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": "^2.0.8",
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 { ProviderDocumentImages } from "@fiado/type-kit/bin/provider";
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
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });