@fiado/api-invoker 5.31.0 → 5.32.1
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/bin/card/CardApi.d.ts +2 -1
- package/bin/card/CardApi.js +4 -0
- package/bin/card/interfaces/ICardApi.d.ts +9 -1
- package/bin/legalDocument/api/LegalDocumentApi.js +1 -1
- package/package.json +3 -3
- package/src/card/CardApi.ts +7 -1
- package/src/card/interfaces/ICardApi.ts +10 -1
- package/src/legalDocument/api/LegalDocumentApi.ts +1 -1
package/bin/card/CardApi.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
2
|
import type { IHttpRequest } from "@fiado/http-client";
|
|
3
|
-
import { CardApplicationRequest, CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, Status, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
3
|
+
import { CardApplicationRequest, CardIssuanceBySideRequest, CardIssuanceBySideResponse, CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, Status, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
4
4
|
import { CardsByStatusResponse, ICardApi } from "./interfaces/ICardApi.js";
|
|
5
5
|
import { Provider } from "@fiado/type-kit/bin/provider/index.js";
|
|
6
6
|
import { InfoSelfVerifiedStatus } from "@fiado/type-kit/bin/identity/index.js";
|
|
@@ -18,6 +18,7 @@ export declare class CardApi implements ICardApi {
|
|
|
18
18
|
updateIssuance(provider: Provider, input: CardUpdateIssuanceRequest): Promise<ApiGatewayResponse<void>>;
|
|
19
19
|
updateIssuanceObservation(directoryId: string, input: CardIssuanceObservationUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
20
20
|
issuance(directoryId: string, USA_InfoSelfVerified: InfoSelfVerifiedStatus): Promise<void>;
|
|
21
|
+
issuanceBySide(request: CardIssuanceBySideRequest): Promise<ApiGatewayResponse<CardIssuanceBySideResponse>>;
|
|
21
22
|
updateShipping(provider: Provider, shippingId: string, input: UpdateBankAccountCardRequest): Promise<ApiGatewayResponse<void>>;
|
|
22
23
|
cardApplication(directoryId: string, provider: Provider, input: CardApplicationRequest): Promise<void>;
|
|
23
24
|
}
|
package/bin/card/CardApi.js
CHANGED
|
@@ -66,6 +66,10 @@ let CardApi = class CardApi {
|
|
|
66
66
|
const url = `${this.baseUrl}`;
|
|
67
67
|
await this.httpRequest.post(url, { USA_InfoSelfVerified, directoryId });
|
|
68
68
|
}
|
|
69
|
+
async issuanceBySide(request) {
|
|
70
|
+
const url = `${this.baseUrl}`;
|
|
71
|
+
return await this.httpRequest.post(url, request);
|
|
72
|
+
}
|
|
69
73
|
async updateShipping(provider, shippingId, input) {
|
|
70
74
|
const url = `${this.baseUrl}${provider}/shipping/${shippingId}`;
|
|
71
75
|
return await this.httpRequest.put(url, input);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import { CardApplicationRequest, CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, Status, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
2
|
+
import { CardApplicationRequest, CardIssuanceBySideRequest, CardIssuanceBySideResponse, CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, Status, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
3
3
|
import { InfoSelfVerifiedStatus } from "@fiado/type-kit/bin/identity/index.js";
|
|
4
4
|
import { Provider } from "@fiado/type-kit/bin/provider/index.js";
|
|
5
5
|
export interface CardsByStatusResponse {
|
|
@@ -16,6 +16,14 @@ export interface ICardApi {
|
|
|
16
16
|
updateIssuance(provider: Provider, input: CardUpdateIssuanceRequest): Promise<ApiGatewayResponse<void>>;
|
|
17
17
|
updateIssuanceObservation(directoryId: string, input: CardIssuanceObservationUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
18
18
|
issuance(directoryId: string, USA_InfoSelfVerified: InfoSelfVerifiedStatus): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Emisión por lado (DEC-025 de onboarding-business). `trigger: AUTOMATIC` activa
|
|
21
|
+
* el guard estricto en fiado-card-business (nunca re-emite un lado FAILED);
|
|
22
|
+
* la respuesta distingue `CREATED` de `SKIPPED {reason}` — SKIPPED es resultado
|
|
23
|
+
* normal del guard atómico, no un error. Mismo endpoint raíz que `issuance`
|
|
24
|
+
* (operationId `privateIssuance`), body superset retrocompatible.
|
|
25
|
+
*/
|
|
26
|
+
issuanceBySide(request: CardIssuanceBySideRequest): Promise<ApiGatewayResponse<CardIssuanceBySideResponse>>;
|
|
19
27
|
updateShipping(provider: Provider, shippingId: string, input: UpdateBankAccountCardRequest): Promise<ApiGatewayResponse<void>>;
|
|
20
28
|
/**
|
|
21
29
|
* Emite la tarjeta virtual de un directorio y la registra en
|
|
@@ -21,7 +21,7 @@ let LegalDocumentApi = class LegalDocumentApi {
|
|
|
21
21
|
if (!directoryId) {
|
|
22
22
|
throw new Error("Directory ID is required.");
|
|
23
23
|
}
|
|
24
|
-
const url = `${this.baseUrl}documents/directories
|
|
24
|
+
const url = `${this.baseUrl}documents/directories/${directoryId}`;
|
|
25
25
|
return await this.httpRequest.get(url);
|
|
26
26
|
}
|
|
27
27
|
async getDirectoryAcceptanceByDirectoryId(directoryId) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.32.1",
|
|
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
|
"type": "module",
|
|
6
6
|
"main": "bin/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@fiado/gateway-adapter": "^3.9.0",
|
|
35
35
|
"@fiado/http-client": "^2.0.1",
|
|
36
36
|
"@fiado/logger": "^1.1.3",
|
|
37
|
-
"@fiado/type-kit": "^3.
|
|
37
|
+
"@fiado/type-kit": "^3.316.0",
|
|
38
38
|
"dotenv": "^16.4.7"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -53,4 +53,4 @@
|
|
|
53
53
|
"ts-jest": "^29.4.11",
|
|
54
54
|
"typescript": "^6.0.3"
|
|
55
55
|
}
|
|
56
|
-
}
|
|
56
|
+
}
|
package/src/card/CardApi.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
|
5
5
|
// que si tienen suite (p. ej. `RetailCardsBusinessApi`). No cambia el runtime:
|
|
6
6
|
// tsc borra las dos formas por igual.
|
|
7
7
|
import type { IHttpRequest } from "@fiado/http-client";
|
|
8
|
-
import { CardApplicationRequest, CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, Status, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
8
|
+
import { CardApplicationRequest, CardIssuanceBySideRequest, CardIssuanceBySideResponse, CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, Status, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
9
9
|
import { inject, injectable } from "inversify";
|
|
10
10
|
import { CardsByStatusResponse, ICardApi } from "./interfaces/ICardApi.js";
|
|
11
11
|
import { Provider } from "@fiado/type-kit/bin/provider/index.js";
|
|
@@ -95,6 +95,12 @@ export class CardApi implements ICardApi {
|
|
|
95
95
|
await this.httpRequest.post(url, { USA_InfoSelfVerified, directoryId });
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
async issuanceBySide(request: CardIssuanceBySideRequest): Promise<ApiGatewayResponse<CardIssuanceBySideResponse>> {
|
|
99
|
+
|
|
100
|
+
const url = `${this.baseUrl}`;
|
|
101
|
+
return await this.httpRequest.post(url, request);
|
|
102
|
+
}
|
|
103
|
+
|
|
98
104
|
async updateShipping(provider: Provider, shippingId: string, input: UpdateBankAccountCardRequest): Promise<ApiGatewayResponse<void>> {
|
|
99
105
|
|
|
100
106
|
const url = `${this.baseUrl}${provider}/shipping/${shippingId}`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import { CardApplicationRequest, CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, Status, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
2
|
+
import { CardApplicationRequest, CardIssuanceBySideRequest, CardIssuanceBySideResponse, CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, Status, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
3
3
|
import { InfoSelfVerifiedStatus } from "@fiado/type-kit/bin/identity/index.js";
|
|
4
4
|
import { Provider } from "@fiado/type-kit/bin/provider/index.js";
|
|
5
5
|
|
|
@@ -28,6 +28,15 @@ export interface ICardApi {
|
|
|
28
28
|
|
|
29
29
|
issuance(directoryId: string, USA_InfoSelfVerified: InfoSelfVerifiedStatus): Promise<void>;
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Emisión por lado (DEC-025 de onboarding-business). `trigger: AUTOMATIC` activa
|
|
33
|
+
* el guard estricto en fiado-card-business (nunca re-emite un lado FAILED);
|
|
34
|
+
* la respuesta distingue `CREATED` de `SKIPPED {reason}` — SKIPPED es resultado
|
|
35
|
+
* normal del guard atómico, no un error. Mismo endpoint raíz que `issuance`
|
|
36
|
+
* (operationId `privateIssuance`), body superset retrocompatible.
|
|
37
|
+
*/
|
|
38
|
+
issuanceBySide(request: CardIssuanceBySideRequest): Promise<ApiGatewayResponse<CardIssuanceBySideResponse>>;
|
|
39
|
+
|
|
31
40
|
updateShipping(provider: Provider, shippingId: string, input: UpdateBankAccountCardRequest): Promise<ApiGatewayResponse<void>>;
|
|
32
41
|
|
|
33
42
|
/**
|
|
@@ -19,7 +19,7 @@ export class LegalDocumentApi implements ILegalDocumentApi {
|
|
|
19
19
|
throw new Error("Directory ID is required.")
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
const url = `${this.baseUrl}documents/directories
|
|
22
|
+
const url = `${this.baseUrl}documents/directories/${directoryId}`;
|
|
23
23
|
|
|
24
24
|
return await this.httpRequest.get<any>(url);
|
|
25
25
|
}
|