@fiado/api-invoker 1.5.4 → 1.5.5

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.
@@ -64,6 +64,7 @@ const firebase_connector_1 = require("./firebase-connector");
64
64
  const OnboardingApi_1 = __importDefault(require("./onboarding/api/OnboardingApi"));
65
65
  const OnboardingBusinessApi_1 = __importDefault(require("./onboarding-business/api/OnboardingBusinessApi"));
66
66
  const payroll_business_1 = require("./payroll-business");
67
+ const referral_business_1 = require("./referral-business");
67
68
  exports.apiInvokerBindings = new inversify_1.ContainerModule((bind) => {
68
69
  // UTILS bindings
69
70
  bind("InvokerUtils").to(InvokerUtils_1.InvokerUtils);
@@ -126,4 +127,5 @@ exports.apiInvokerBindings = new inversify_1.ContainerModule((bind) => {
126
127
  bind("IOnboardingApi").to(OnboardingApi_1.default);
127
128
  bind("IOnboardingBusinessApi").to(OnboardingBusinessApi_1.default);
128
129
  bind("IPayrollApi").to(payroll_business_1.PayrollApi);
130
+ bind("IReferralBusinessApi").to(referral_business_1.ReferralBusinessApi);
129
131
  });
package/bin/index.d.ts CHANGED
@@ -51,3 +51,4 @@ export * from "./firebase-connector";
51
51
  export * from "./onboarding";
52
52
  export * from "./onboarding-business";
53
53
  export * from "./payroll-business";
54
+ export * from "./referral-business";
package/bin/index.js CHANGED
@@ -67,3 +67,4 @@ __exportStar(require("./firebase-connector"), exports);
67
67
  __exportStar(require("./onboarding"), exports);
68
68
  __exportStar(require("./onboarding-business"), exports);
69
69
  __exportStar(require("./payroll-business"), exports);
70
+ __exportStar(require("./referral-business"), exports);
@@ -0,0 +1,9 @@
1
+ import { IHttpRequest } from "@fiado/http-client";
2
+ import { IReferralBusinessApi } from "./interfaces/IReferralBusinessApi";
3
+ import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
4
+ export declare class ReferralBusinessApi implements IReferralBusinessApi {
5
+ private httpRequest;
6
+ private readonly baseUrl;
7
+ constructor(httpRequest: IHttpRequest);
8
+ getByDirectoryId(directoryId: string): Promise<FiadoApiResponse<any>>;
9
+ }
@@ -0,0 +1,37 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
15
+ return (mod && mod.__esModule) ? mod : { "default": mod };
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ReferralBusinessApi = void 0;
19
+ const inversify_1 = require("inversify");
20
+ const dotenv_1 = __importDefault(require("dotenv"));
21
+ dotenv_1.default.config();
22
+ let ReferralBusinessApi = class ReferralBusinessApi {
23
+ constructor(httpRequest) {
24
+ this.httpRequest = httpRequest;
25
+ this.baseUrl = process.env.PAYROLL_BUSINESS_LAMBDA_URL || "";
26
+ }
27
+ async getByDirectoryId(directoryId) {
28
+ const url = `${this.baseUrl}private/agents/directoryId/${directoryId}`;
29
+ return await this.httpRequest.get(url);
30
+ }
31
+ };
32
+ exports.ReferralBusinessApi = ReferralBusinessApi;
33
+ exports.ReferralBusinessApi = ReferralBusinessApi = __decorate([
34
+ (0, inversify_1.injectable)(),
35
+ __param(0, (0, inversify_1.inject)("IHttpRequest")),
36
+ __metadata("design:paramtypes", [Object])
37
+ ], ReferralBusinessApi);
@@ -1,2 +1,2 @@
1
1
  export * from './interfaces/IReferralBusinessApi';
2
- export * from './PayrollApi';
2
+ export * from './ReferralBusinessApi';
@@ -15,4 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./interfaces/IReferralBusinessApi"), exports);
18
- __exportStar(require("./PayrollApi"), exports);
18
+ __exportStar(require("./ReferralBusinessApi"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
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",
@@ -82,6 +82,7 @@ import OnboardingApi from "./onboarding/api/OnboardingApi";
82
82
  import OnboardingBusinessApi from "./onboarding-business/api/OnboardingBusinessApi";
83
83
  import { IOnboardingBusinessApi } from "./onboarding-business";
84
84
  import { IPayrollApi, PayrollApi } from "./payroll-business";
85
+ import { IReferralBusinessApi, ReferralBusinessApi } from "./referral-business";
85
86
 
86
87
  export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) => {
87
88
  // UTILS bindings
@@ -146,4 +147,5 @@ export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) =>
146
147
  bind<IOnboardingApi>("IOnboardingApi").to(OnboardingApi);
147
148
  bind<IOnboardingBusinessApi>("IOnboardingBusinessApi").to(OnboardingBusinessApi);
148
149
  bind<IPayrollApi>("IPayrollApi").to(PayrollApi);
150
+ bind<IReferralBusinessApi>("IReferralBusinessApi").to(ReferralBusinessApi);
149
151
  });
package/src/index.ts CHANGED
@@ -51,6 +51,7 @@ export * from "./firebase-connector";
51
51
  export * from "./onboarding";
52
52
  export * from "./onboarding-business";
53
53
  export * from "./payroll-business";
54
+ export * from "./referral-business";
54
55
 
55
56
 
56
57
 
@@ -1,2 +1,2 @@
1
1
  export * from './interfaces/IReferralBusinessApi';
2
- export * from './PayrollApi';
2
+ export * from './ReferralBusinessApi';