@fiado/api-invoker 1.3.59 → 1.3.61

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,46 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -57,6 +57,7 @@ const pricelist_business_1 = require("./pricelist-business");
57
57
  const service_business_1 = require("./service-business");
58
58
  const document_image_processor_1 = require("./document-image-processor");
59
59
  const order_collector_business_1 = require("./order-collector-business");
60
+ const EstafetaApi_1 = __importDefault(require("./estafeta/api/EstafetaApi"));
60
61
  exports.apiInvokerBindings = new inversify_1.ContainerModule((bind) => {
61
62
  // UTILS bindings
62
63
  bind("InvokerUtils").to(InvokerUtils_1.InvokerUtils);
@@ -112,4 +113,5 @@ exports.apiInvokerBindings = new inversify_1.ContainerModule((bind) => {
112
113
  bind("IServiceApi").to(service_business_1.ServiceApi);
113
114
  bind("IDocumentImageProcessorApi").to(document_image_processor_1.DocumentImageProcessorApi);
114
115
  bind("IOrderCollectorApi").to(order_collector_business_1.OrderCollectorApi);
116
+ bind("IEstafetaApi").to(EstafetaApi_1.default);
115
117
  });
@@ -1,11 +0,0 @@
1
- import { IHttpRequest } from "@fiado/http-client";
2
- import { IEstafetaApi } from "./api/interfaces/IEstafetaApi";
3
- import { CreateBankAccountCardShippingRequest } from "@fiado/type-kit/bin/card";
4
- import { CreateBankAccountCardShippingResponse } from "@fiado/type-kit/bin/card";
5
- import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
6
- export default class EstafetaApi implements IEstafetaApi {
7
- private httpRequest;
8
- private readonly baseUrl;
9
- constructor(httpRequest: IHttpRequest);
10
- createShipment(object: CreateBankAccountCardShippingRequest): Promise<FiadoApiResponse<CreateBankAccountCardShippingResponse>>;
11
- }
@@ -1,32 +0,0 @@
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
- const inversify_1 = require("inversify");
16
- const esm_1 = require("inversify/lib/esm");
17
- let EstafetaApi = class EstafetaApi {
18
- constructor(httpRequest) {
19
- this.httpRequest = httpRequest;
20
- this.baseUrl = process.env.ESTAFETA_LAMBDA_URL || "";
21
- }
22
- async createShipment(object) {
23
- const url = `${this.baseUrl}estafeta/shipping/card`;
24
- return await this.httpRequest.post(url, object);
25
- }
26
- };
27
- EstafetaApi = __decorate([
28
- (0, inversify_1.injectable)(),
29
- __param(0, (0, esm_1.inject)("IHttpRequest")),
30
- __metadata("design:paramtypes", [Object])
31
- ], EstafetaApi);
32
- exports.default = EstafetaApi;
@@ -1,11 +1,24 @@
1
1
  import { IHttpRequest } from "@fiado/http-client";
2
2
  import { IEstafetaApi } from "./interfaces/IEstafetaApi";
3
- import { CreateBankAccountCardShippingRequest } from "@fiado/type-kit/bin/card";
3
+ import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardShippingRequest, GetBankAccountShippingRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
4
4
  import { CreateBankAccountCardShippingResponse } from "@fiado/type-kit/bin/card";
5
5
  import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
6
+ import { UpdateBankAccountUserRequest, CreateBankAccountUserRequest, CreateBankAccountRequest } from "@fiado/type-kit/bin/account";
6
7
  export default class EstafetaApi implements IEstafetaApi {
7
8
  private httpRequest;
8
9
  private readonly baseUrl;
9
10
  constructor(httpRequest: IHttpRequest);
11
+ updateUser(object: UpdateBankAccountUserRequest): Promise<any>;
12
+ getUserById(externalUserId: string): Promise<any>;
13
+ createUser(request: CreateBankAccountUserRequest): Promise<any>;
14
+ getCardSensitiveInformation(externalCardId: string, externalUserId?: string): Promise<any>;
15
+ getCardsById(externalCardId: string): Promise<any>;
16
+ getCardsByUserId(externalUserId: string): Promise<any>;
17
+ createCard(object: CreateBankAccountRequest): Promise<any>;
18
+ blockCard(object: UpdateBankAccountCardRequest): Promise<any>;
19
+ changePin(object: UpdateBankAccountCardRequest): Promise<any>;
20
+ activateCard(object: ActivateBankAccountCardRequest): Promise<any>;
21
+ assignCardToUser(request: AssignCardRequest): Promise<any>;
22
+ getShipment(object: GetBankAccountShippingRequest): Promise<any>;
10
23
  createShipment(object: CreateBankAccountCardShippingRequest): Promise<FiadoApiResponse<CreateBankAccountCardShippingResponse>>;
11
24
  }
@@ -18,6 +18,42 @@ let EstafetaApi = class EstafetaApi {
18
18
  this.httpRequest = httpRequest;
19
19
  this.baseUrl = process.env.ESTAFETA_LAMBDA_URL || "";
20
20
  }
21
+ updateUser(object) {
22
+ throw new Error("Method not implemented.");
23
+ }
24
+ getUserById(externalUserId) {
25
+ throw new Error("Method not implemented.");
26
+ }
27
+ createUser(request) {
28
+ throw new Error("Method not implemented.");
29
+ }
30
+ getCardSensitiveInformation(externalCardId, externalUserId) {
31
+ throw new Error("Method not implemented.");
32
+ }
33
+ getCardsById(externalCardId) {
34
+ throw new Error("Method not implemented.");
35
+ }
36
+ getCardsByUserId(externalUserId) {
37
+ throw new Error("Method not implemented.");
38
+ }
39
+ createCard(object) {
40
+ throw new Error("Method not implemented.");
41
+ }
42
+ blockCard(object) {
43
+ throw new Error("Method not implemented.");
44
+ }
45
+ changePin(object) {
46
+ throw new Error("Method not implemented.");
47
+ }
48
+ activateCard(object) {
49
+ throw new Error("Method not implemented.");
50
+ }
51
+ assignCardToUser(request) {
52
+ throw new Error("Method not implemented.");
53
+ }
54
+ getShipment(object) {
55
+ throw new Error("Method not implemented.");
56
+ }
21
57
  async createShipment(object) {
22
58
  const url = `${this.baseUrl}estafeta/shipping/card`;
23
59
  return await this.httpRequest.post(url, object);
@@ -1,5 +1,18 @@
1
- import { CreateBankAccountCardShippingRequest, CreateBankAccountCardShippingResponse } from "@fiado/type-kit/bin/card";
1
+ import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardShippingRequest, CreateBankAccountCardShippingResponse, GetBankAccountShippingRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
2
2
  import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
3
+ import { CreateBankAccountRequest, CreateBankAccountUserRequest, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
3
4
  export interface IEstafetaApi {
4
5
  createShipment(object: CreateBankAccountCardShippingRequest): Promise<FiadoApiResponse<CreateBankAccountCardShippingResponse>>;
6
+ updateUser(object: UpdateBankAccountUserRequest): Promise<any>;
7
+ getUserById(externalUserId: string): Promise<any>;
8
+ createUser(request: CreateBankAccountUserRequest): Promise<any>;
9
+ getCardSensitiveInformation(externalCardId: string, externalUserId?: string): Promise<any>;
10
+ getCardsById(externalCardId: string): Promise<any>;
11
+ getCardsByUserId(externalUserId: string): Promise<any>;
12
+ createCard(object: CreateBankAccountRequest): Promise<any>;
13
+ blockCard(object: UpdateBankAccountCardRequest): Promise<any>;
14
+ changePin(object: UpdateBankAccountCardRequest): Promise<any>;
15
+ activateCard(object: ActivateBankAccountCardRequest): Promise<any>;
16
+ assignCardToUser(request: AssignCardRequest): Promise<any>;
17
+ getShipment(object: GetBankAccountShippingRequest): Promise<any>;
5
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.3.59",
3
+ "version": "1.3.61",
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",
@@ -72,6 +72,8 @@ import { IPriceListApi, PriceListApi } from "./pricelist-business";
72
72
  import { IServiceApi, ServiceApi } from "./service-business";
73
73
  import { IDocumentImageProcessorApi, DocumentImageProcessorApi } from "./document-image-processor";
74
74
  import { IOrderCollectorApi, OrderCollectorApi } from "./order-collector-business";
75
+ import { IEstafetaApi } from "./estafeta";
76
+ import EstafetaApi from "./estafeta/api/EstafetaApi";
75
77
 
76
78
  export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) => {
77
79
  // UTILS bindings
@@ -129,6 +131,7 @@ export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) =>
129
131
  bind<IServiceApi>("IServiceApi").to(ServiceApi);
130
132
  bind<IDocumentImageProcessorApi>("IDocumentImageProcessorApi").to(DocumentImageProcessorApi);
131
133
  bind<IOrderCollectorApi>("IOrderCollectorApi").to(OrderCollectorApi);
134
+ bind<IEstafetaApi>("IEstafetaApi").to(EstafetaApi);
132
135
 
133
136
 
134
137
  });
@@ -1,11 +1,12 @@
1
- import {injectable,inject} from "inversify";
1
+ import { injectable, inject } from "inversify";
2
2
 
3
- import {IHttpRequest} from "@fiado/http-client";
3
+ import { IHttpRequest } from "@fiado/http-client";
4
4
 
5
- import {IEstafetaApi} from "./interfaces/IEstafetaApi";
6
- import {CreateBankAccountCardShippingRequest} from "@fiado/type-kit/bin/card";
7
- import {CreateBankAccountCardShippingResponse} from "@fiado/type-kit/bin/card";
5
+ import { IEstafetaApi } from "./interfaces/IEstafetaApi";
6
+ import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardShippingRequest, GetBankAccountShippingRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
7
+ import { CreateBankAccountCardShippingResponse } from "@fiado/type-kit/bin/card";
8
8
  import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
9
+ import { UpdateBankAccountUserRequest, CreateBankAccountUserRequest, CreateBankAccountRequest } from "@fiado/type-kit/bin/account";
9
10
 
10
11
 
11
12
  @injectable()
@@ -15,6 +16,44 @@ export default class EstafetaApi implements IEstafetaApi {
15
16
 
16
17
  constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
17
18
  }
19
+
20
+ updateUser(object: UpdateBankAccountUserRequest): Promise<any> {
21
+ throw new Error("Method not implemented.");
22
+ }
23
+ getUserById(externalUserId: string): Promise<any> {
24
+ throw new Error("Method not implemented.");
25
+ }
26
+ createUser(request: CreateBankAccountUserRequest): Promise<any> {
27
+ throw new Error("Method not implemented.");
28
+ }
29
+ getCardSensitiveInformation(externalCardId: string, externalUserId?: string): Promise<any> {
30
+ throw new Error("Method not implemented.");
31
+ }
32
+ getCardsById(externalCardId: string): Promise<any> {
33
+ throw new Error("Method not implemented.");
34
+ }
35
+ getCardsByUserId(externalUserId: string): Promise<any> {
36
+ throw new Error("Method not implemented.");
37
+ }
38
+ createCard(object: CreateBankAccountRequest): Promise<any> {
39
+ throw new Error("Method not implemented.");
40
+ }
41
+ blockCard(object: UpdateBankAccountCardRequest): Promise<any> {
42
+ throw new Error("Method not implemented.");
43
+ }
44
+ changePin(object: UpdateBankAccountCardRequest): Promise<any> {
45
+ throw new Error("Method not implemented.");
46
+ }
47
+ activateCard(object: ActivateBankAccountCardRequest): Promise<any> {
48
+ throw new Error("Method not implemented.");
49
+ }
50
+ assignCardToUser(request: AssignCardRequest): Promise<any> {
51
+ throw new Error("Method not implemented.");
52
+ }
53
+ getShipment(object: GetBankAccountShippingRequest): Promise<any> {
54
+ throw new Error("Method not implemented.");
55
+ }
56
+
18
57
  public async createShipment(object: CreateBankAccountCardShippingRequest): Promise<FiadoApiResponse<CreateBankAccountCardShippingResponse>> {
19
58
  const url: string = `${this.baseUrl}estafeta/shipping/card`;
20
59
  return await this.httpRequest.post(url, object);
@@ -1,6 +1,26 @@
1
- import {CreateBankAccountCardShippingRequest, CreateBankAccountCardShippingResponse} from "@fiado/type-kit/bin/card";
1
+ import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardShippingRequest, CreateBankAccountCardShippingResponse, GetBankAccountShippingRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
2
2
  import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
3
+ import { CreateBankAccountRequest, CreateBankAccountUserRequest, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
3
4
 
4
5
  export interface IEstafetaApi {
6
+
7
+
5
8
  createShipment(object: CreateBankAccountCardShippingRequest): Promise<FiadoApiResponse<CreateBankAccountCardShippingResponse>>
9
+
10
+ updateUser(object: UpdateBankAccountUserRequest): Promise<any>
11
+ getUserById(externalUserId: string): Promise<any>
12
+ createUser(request: CreateBankAccountUserRequest): Promise<any>;
13
+ // //Card
14
+ getCardSensitiveInformation(externalCardId: string, externalUserId?: string): Promise<any>
15
+ getCardsById(externalCardId: string): Promise<any>
16
+ getCardsByUserId(externalUserId: string): Promise<any>
17
+ createCard(object: CreateBankAccountRequest): Promise<any>
18
+ blockCard(object: UpdateBankAccountCardRequest): Promise<any>
19
+ changePin(object: UpdateBankAccountCardRequest): Promise<any>
20
+ activateCard(object: ActivateBankAccountCardRequest): Promise<any>
21
+
22
+ assignCardToUser(request: AssignCardRequest): Promise<any>;
23
+ // //Shipping
24
+
25
+ getShipment(object: GetBankAccountShippingRequest): Promise<any>
6
26
  }