@fiado/api-invoker 1.3.33 → 1.3.34

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.
@@ -0,0 +1,10 @@
1
+ import { IDocumentImageProcessorApi } from "./interfaces/IDocumentImageProcessorApi";
2
+ import { IHttpRequest } from "@fiado/http-client";
3
+ import { ProviderDocumentImages } from "@fiado/type-kit/bin/provider";
4
+ import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
5
+ export declare class DocumentImageProcessorApi implements IDocumentImageProcessorApi {
6
+ private httpRequest;
7
+ private readonly baseUrl;
8
+ constructor(httpRequest: IHttpRequest);
9
+ scaleDocumentImage(request: ProviderDocumentImages): Promise<FiadoApiResponse<any>>;
10
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.DocumentImageProcessorApi = void 0;
16
+ const inversify_1 = require("inversify");
17
+ let DocumentImageProcessorApi = class DocumentImageProcessorApi {
18
+ constructor(httpRequest) {
19
+ this.httpRequest = httpRequest;
20
+ this.baseUrl = process.env.DOCUMENT_IMAGE_PROCESSOR_LAMBDA_URL || "";
21
+ }
22
+ async scaleDocumentImage(request) {
23
+ const url = `${this.baseUrl}/scale`;
24
+ return await this.httpRequest.post(url, request);
25
+ }
26
+ };
27
+ exports.DocumentImageProcessorApi = DocumentImageProcessorApi;
28
+ exports.DocumentImageProcessorApi = DocumentImageProcessorApi = __decorate([
29
+ (0, inversify_1.injectable)(),
30
+ __param(0, (0, inversify_1.inject)("IHttpRequest")),
31
+ __metadata("design:paramtypes", [Object])
32
+ ], DocumentImageProcessorApi);
@@ -0,0 +1,2 @@
1
+ export * from "./DocumentImageProcessorApi";
2
+ export * from "./interfaces/IDocumentImageProcessorApi";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./DocumentImageProcessorApi"), exports);
18
+ __exportStar(require("./interfaces/IDocumentImageProcessorApi"), exports);
@@ -0,0 +1,5 @@
1
+ import { ProviderDocumentImages } from "@fiado/type-kit/bin/provider";
2
+ import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
3
+ export interface IDocumentImageProcessorApi {
4
+ scaleDocumentImage(request: ProviderDocumentImages): Promise<FiadoApiResponse<any>>;
5
+ }
package/bin/index.d.ts CHANGED
@@ -42,3 +42,4 @@ export * from "./observations";
42
42
  export * from "./service-business";
43
43
  export * from "./pricelist-business";
44
44
  export * from "./card";
45
+ export * from "./document-image-processor";
package/bin/index.js CHANGED
@@ -58,3 +58,4 @@ __exportStar(require("./observations"), exports);
58
58
  __exportStar(require("./service-business"), exports);
59
59
  __exportStar(require("./pricelist-business"), exports);
60
60
  __exportStar(require("./card"), exports);
61
+ __exportStar(require("./document-image-processor"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.3.33",
3
+ "version": "1.3.34",
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",
@@ -0,0 +1,18 @@
1
+ import { IDocumentImageProcessorApi } from "./interfaces/IDocumentImageProcessorApi";
2
+ import { inject, injectable } from "inversify";
3
+ import { IHttpRequest } from "@fiado/http-client";
4
+ import { ProviderDocumentImages } from "@fiado/type-kit/bin/provider";
5
+ import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
6
+
7
+ @injectable()
8
+ export class DocumentImageProcessorApi implements IDocumentImageProcessorApi {
9
+ private readonly baseUrl = process.env.DOCUMENT_IMAGE_PROCESSOR_LAMBDA_URL || "";
10
+
11
+ constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
12
+ }
13
+
14
+ async scaleDocumentImage(request: ProviderDocumentImages): Promise<FiadoApiResponse<any>> {
15
+ const url = `${this.baseUrl}/scale`;
16
+ return await this.httpRequest.post(url, request);
17
+ }
18
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./DocumentImageProcessorApi";
2
+ export * from "./interfaces/IDocumentImageProcessorApi";
@@ -0,0 +1,6 @@
1
+ import { ProviderDocumentImages } from "@fiado/type-kit/bin/provider";
2
+ import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
3
+
4
+ export interface IDocumentImageProcessorApi {
5
+ scaleDocumentImage(request: ProviderDocumentImages): Promise<FiadoApiResponse<any>>
6
+ }
package/src/index.ts CHANGED
@@ -42,4 +42,5 @@ export * from "./observations";
42
42
  export * from "./service-business";
43
43
  export * from "./pricelist-business";
44
44
  export * from "./card";
45
+ export * from "./document-image-processor";
45
46
 
@@ -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
- }