@fiado/api-invoker 3.0.40 → 3.0.42

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 });
@@ -33,4 +33,7 @@ export declare class CollectorApi implements ICollectorApi {
33
33
  * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
34
34
  */
35
35
  updateCreditContractByRenewalPreAuth(req: CreditContractUpdateRequest): Promise<FiadoApiResponse<any>>;
36
+ getCreditContractsByTenant(tenantId: string, startDate: string, endDate: string): Promise<any>;
37
+ getCVContractsByTenant(tenantId: string, startDate: string, endDate: string): Promise<any>;
38
+ getCollectorTransactionsByTenant(tenantId: string, startDate: string, endDate: string): Promise<any>;
36
39
  }
@@ -76,6 +76,19 @@ let CollectorApi = class CollectorApi {
76
76
  const url = `${this.baseUrl}collector/creditcontracts/renewal/preauth`;
77
77
  return await this.httpRequest.put(url, req);
78
78
  }
79
+ // Reconciliation — query by tenant + date range
80
+ async getCreditContractsByTenant(tenantId, startDate, endDate) {
81
+ const url = `${this.baseUrl}collector/creditcontracts/by-tenant?tenantId=${tenantId}&startDate=${startDate}&endDate=${endDate}`;
82
+ return await this.httpRequest.get(url, { 'operationName': 'getCreditContractsByTenant' });
83
+ }
84
+ async getCVContractsByTenant(tenantId, startDate, endDate) {
85
+ const url = `${this.baseUrl}collector/cvcontracts/by-tenant?tenantId=${tenantId}&startDate=${startDate}&endDate=${endDate}`;
86
+ return await this.httpRequest.get(url, { 'operationName': 'getCVContractsByTenant' });
87
+ }
88
+ async getCollectorTransactionsByTenant(tenantId, startDate, endDate) {
89
+ const url = `${this.baseUrl}collector/collectortransactions/by-tenant?tenantId=${tenantId}&startDate=${startDate}&endDate=${endDate}`;
90
+ return await this.httpRequest.get(url, { 'operationName': 'getCollectorTransactionsByTenant' });
91
+ }
79
92
  };
80
93
  exports.CollectorApi = CollectorApi;
81
94
  exports.CollectorApi = CollectorApi = __decorate([
@@ -31,4 +31,7 @@ export interface ICollectorApi {
31
31
  * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
32
32
  */
33
33
  updateCreditContractByRenewalPreAuth(req: CreditContractUpdateRequest): Promise<FiadoApiResponse<any>>;
34
+ getCreditContractsByTenant(tenantId: string, startDate: string, endDate: string): Promise<any>;
35
+ getCVContractsByTenant(tenantId: string, startDate: string, endDate: string): Promise<any>;
36
+ getCollectorTransactionsByTenant(tenantId: string, startDate: string, endDate: string): Promise<any>;
34
37
  }
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ export interface IReportProcessorBusiness {
2
+ processReports(key: string): Promise<void>;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "3.0.40",
3
+ "version": "3.0.42",
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.50",
17
17
  "@fiado/http-client": "^1.0.7",
18
18
  "@fiado/logger": "^1.0.3",
19
- "@fiado/type-kit": "^3.1.13",
19
+ "@fiado/type-kit": "^3.1.8",
20
20
  "dotenv": "^16.4.7",
21
21
  "i": "^0.3.7",
22
22
  "inversify": "^6.2.2",
@@ -78,5 +78,21 @@ export class CollectorApi implements ICollectorApi {
78
78
  async updateCreditContractByRenewalPreAuth(req: CreditContractUpdateRequest): Promise<FiadoApiResponse<any>> {
79
79
  const url = `${this.baseUrl}collector/creditcontracts/renewal/preauth`;
80
80
  return await this.httpRequest.put(url, req);
81
- }
81
+ }
82
+
83
+ // Reconciliation — query by tenant + date range
84
+ async getCreditContractsByTenant(tenantId: string, startDate: string, endDate: string): Promise<any> {
85
+ const url = `${this.baseUrl}collector/creditcontracts/by-tenant?tenantId=${tenantId}&startDate=${startDate}&endDate=${endDate}`;
86
+ return await this.httpRequest.get(url, { 'operationName': 'getCreditContractsByTenant' });
87
+ }
88
+
89
+ async getCVContractsByTenant(tenantId: string, startDate: string, endDate: string): Promise<any> {
90
+ const url = `${this.baseUrl}collector/cvcontracts/by-tenant?tenantId=${tenantId}&startDate=${startDate}&endDate=${endDate}`;
91
+ return await this.httpRequest.get(url, { 'operationName': 'getCVContractsByTenant' });
92
+ }
93
+
94
+ async getCollectorTransactionsByTenant(tenantId: string, startDate: string, endDate: string): Promise<any> {
95
+ const url = `${this.baseUrl}collector/collectortransactions/by-tenant?tenantId=${tenantId}&startDate=${startDate}&endDate=${endDate}`;
96
+ return await this.httpRequest.get(url, { 'operationName': 'getCollectorTransactionsByTenant' });
97
+ }
82
98
  }
@@ -39,4 +39,9 @@ export interface ICollectorApi {
39
39
  * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
40
40
  */
41
41
  updateCreditContractByRenewalPreAuth(req: CreditContractUpdateRequest): Promise<FiadoApiResponse<any>>;
42
+
43
+ // Reconciliation — query by tenant + date range
44
+ getCreditContractsByTenant(tenantId: string, startDate: string, endDate: string): Promise<any>;
45
+ getCVContractsByTenant(tenantId: string, startDate: string, endDate: string): Promise<any>;
46
+ getCollectorTransactionsByTenant(tenantId: string, startDate: string, endDate: string): Promise<any>;
42
47
  }