@fiado/api-invoker 3.0.29 → 3.0.31

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "3.0.29",
3
+ "version": "3.0.31",
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.2",
19
+ "@fiado/type-kit": "^3.1.4",
20
20
  "dotenv": "^16.4.7",
21
21
  "i": "^0.3.7",
22
22
  "inversify": "^6.2.2",
@@ -132,6 +132,8 @@ import PlatformErrorEventsPublisher from "./platform-error-events/queue/Platform
132
132
  // Teams connector - SQS publisher
133
133
  import { ITeamsNotificationPublisher } from "./teams-connector";
134
134
  import TeamsNotificationPublisher from "./teams-connector/queue/TeamsNotificationPublisher";
135
+ // Legal document
136
+ import { ILegalDocumentApi, LegalDocumentApi } from "./legalDocument";
135
137
 
136
138
  export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) => {
137
139
  // UTILS bindings
@@ -229,4 +231,7 @@ export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) =>
229
231
 
230
232
  // Teams connector - SQS publisher
231
233
  bind<ITeamsNotificationPublisher>("ITeamsNotificationPublisher").to(TeamsNotificationPublisher);
234
+
235
+ // Legal document
236
+ bind<ILegalDocumentApi>("ILegalDocumentApi").to(LegalDocumentApi);
232
237
  });
@@ -1,10 +1,11 @@
1
- import { inject } from "inversify";
1
+ import { inject, injectable } from "inversify";
2
2
  import { ILegalDocumentApi } from "./interfaces/ILegalDocumentApi";
3
3
  import { IHttpRequest } from "@fiado/http-client";
4
4
 
5
5
 
6
6
 
7
7
 
8
+ @injectable()
8
9
  export class LegalDocumentApi implements ILegalDocumentApi {
9
10
 
10
11
  private readonly baseUrl = process.env.LEGAL_DOCUMENT_LAMBDA_URL || "";
@@ -22,5 +23,16 @@ export class LegalDocumentApi implements ILegalDocumentApi {
22
23
 
23
24
  return await this.httpRequest.get<any>(url);
24
25
  }
26
+
27
+ async getDirectoryAcceptanceByDirectoryId(directoryId: string): Promise<any> {
28
+
29
+ if (!directoryId) {
30
+ throw new Error("Directory ID is required.")
31
+ }
32
+
33
+ const url = `${this.baseUrl}directories/${directoryId}`;
34
+
35
+ return await this.httpRequest.get<any>(url);
36
+ }
25
37
  }
26
38
 
@@ -3,5 +3,6 @@
3
3
  export interface ILegalDocumentApi {
4
4
 
5
5
  getPendingSign(directoryId: string): Promise<any>;
6
+ getDirectoryAcceptanceByDirectoryId(directoryId: string): Promise<any>;
6
7
 
7
8
  }
@@ -1,33 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(npx tsc:*)",
5
- "Bash(find node_modules/@fiado/type-kit/bin/credit -name *.d.ts)",
6
- "mcp__fiado-mcp-server__get_type_kit_domain",
7
- "mcp__fiado-mcp-server__search_type_kit",
8
- "Bash(find /Users/yhon/fsrc/fiado-api-invoker/node_modules/@fiado/type-kit/bin -name *QueueMessage* -o -name *Publisher*)",
9
- "Bash(ls -la /Users/yhon/fsrc/fiado-api-invoker/*.md)",
10
- "Bash(ls -1d */)",
11
- "Bash(for dir:*)",
12
- "Bash(do echo:*)",
13
- "Read(//Users/yhon/fsrc/fiado-api-invoker/**)",
14
- "Bash(done)",
15
- "Bash(grep \"\\\\.ts$\")",
16
- "Read(//Users/yhon/fsrc/fiado-type-kit/src/credit/**)",
17
- "Read(//Users/yhon/fsrc/type-kit/src/**)",
18
- "Read(//Users/yhon/fsrc/**)",
19
- "Bash(git commit:*)",
20
- "Bash(npm publish:*)",
21
- "Bash(git push:*)",
22
- "Bash(git -C /Users/yhon/fsrc/fiado-type-kit push origin develop)",
23
- "Bash(npm install:*)",
24
- "Bash(git add:*)"
25
- ],
26
- "additionalDirectories": [
27
- "/Users/yhon/fsrc/fiado-type-kit/src/credit/dtos",
28
- "/Users/yhon/fsrc/fiado-type-kit/src/credit",
29
- "/Users/yhon/fsrc/fiado-type-kit/bin/credit/dtos/internal",
30
- "/Users/yhon/fsrc/fiado-type-kit"
31
- ]
32
- }
33
- }
@@ -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 });
File without changes
File without changes
@@ -1,3 +0,0 @@
1
- export interface IReportProcessorBusiness {
2
- processReports(key: string): Promise<void>;
3
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });