@fiado/api-invoker 5.56.0 → 5.57.0
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/loanOfferings/api/LoanOfferingsBusinessApi.d.ts +2 -1
- package/bin/loanOfferings/api/LoanOfferingsBusinessApi.js +4 -0
- package/bin/loanOfferings/api/interfaces/ILoanOfferingsBusinessApi.d.ts +6 -1
- package/package.json +2 -2
- package/src/loanOfferings/api/LoanOfferingsBusinessApi.ts +9 -0
- package/src/loanOfferings/api/interfaces/ILoanOfferingsBusinessApi.ts +10 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
3
|
-
import { ConsumePromotionRequest, PromotedSkusResponse, ConsumePromotionResponse, CreditPlanResponse, FinancierResponse, ReservePromotionBonusRequest, ReservePromotionBonusResponse, ResolveCustomerSegmentsRequest, ResolveCustomerSegmentsResponse, SettlePromotionBonusRequest, PromotionBonusResponse, SimulateCreditPlanRequest, SimulationResultResponse } from "@fiado/type-kit/bin/loanOfferings/index.js";
|
|
3
|
+
import { ConsumePromotionRequest, PromotedSkusResponse, ConsumePromotionResponse, CreditPlanResponse, FinancierResponse, ReservePromotionBonusRequest, ReservePromotionBonusResponse, ResolveCustomerSegmentsRequest, ResolveCustomerSegmentsResponse, SkuPromotionsResponse, SettlePromotionBonusRequest, PromotionBonusResponse, SimulateCreditPlanRequest, SimulationResultResponse } from "@fiado/type-kit/bin/loanOfferings/index.js";
|
|
4
4
|
import { ILoanOfferingsBusinessApi } from "./interfaces/ILoanOfferingsBusinessApi.js";
|
|
5
5
|
/**
|
|
6
6
|
* Publisher HTTP del lambda `loan-offerings-business` (componente 07 SureKeep Fase 1) para sus
|
|
@@ -27,4 +27,5 @@ export default class LoanOfferingsBusinessApi implements ILoanOfferingsBusinessA
|
|
|
27
27
|
resolveCustomerSegments(input: ResolveCustomerSegmentsRequest, tenantId: string): Promise<StandardResponse<ResolveCustomerSegmentsResponse>>;
|
|
28
28
|
reservePromotionBonus(promotionId: string, input: ReservePromotionBonusRequest, tenantId: string): Promise<StandardResponse<ReservePromotionBonusResponse>>;
|
|
29
29
|
settlePromotionBonus(promotionId: string, input: SettlePromotionBonusRequest, tenantId: string): Promise<StandardResponse<PromotionBonusResponse>>;
|
|
30
|
+
listSkuPromotions(storeId: string, tenantId: string): Promise<StandardResponse<SkuPromotionsResponse>>;
|
|
30
31
|
}
|
|
@@ -66,6 +66,10 @@ let LoanOfferingsBusinessApi = class LoanOfferingsBusinessApi {
|
|
|
66
66
|
const url = `${this.baseUrl}/private/promotions/${encodeURIComponent(promotionId)}/bonus-payment/result?tenantId=${encodeURIComponent(tenantId)}`;
|
|
67
67
|
return await this.httpRequest.put(url, input);
|
|
68
68
|
}
|
|
69
|
+
async listSkuPromotions(storeId, tenantId) {
|
|
70
|
+
const url = `${this.baseUrl}/private/promotions/by-sku?storeId=${encodeURIComponent(storeId)}&tenantId=${encodeURIComponent(tenantId)}`;
|
|
71
|
+
return await this.httpRequest.get(url);
|
|
72
|
+
}
|
|
69
73
|
};
|
|
70
74
|
LoanOfferingsBusinessApi = __decorate([
|
|
71
75
|
injectable(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import { ConsumePromotionRequest, PromotedSkusResponse, ConsumePromotionResponse, CreditPlanResponse, FinancierResponse, ReservePromotionBonusRequest, ReservePromotionBonusResponse, ResolveCustomerSegmentsRequest, ResolveCustomerSegmentsResponse, SettlePromotionBonusRequest, PromotionBonusResponse, SimulateCreditPlanRequest, SimulationResultResponse } from "@fiado/type-kit/bin/loanOfferings/index.js";
|
|
2
|
+
import { ConsumePromotionRequest, PromotedSkusResponse, ConsumePromotionResponse, CreditPlanResponse, FinancierResponse, ReservePromotionBonusRequest, ReservePromotionBonusResponse, ResolveCustomerSegmentsRequest, ResolveCustomerSegmentsResponse, SkuPromotionsResponse, SettlePromotionBonusRequest, PromotionBonusResponse, SimulateCreditPlanRequest, SimulationResultResponse } from "@fiado/type-kit/bin/loanOfferings/index.js";
|
|
3
3
|
/**
|
|
4
4
|
* Contrato del publisher HTTP del lambda `loan-offerings-business` (componente 07 SureKeep Fase 1)
|
|
5
5
|
* para sus endpoints privados service-to-service (VPC-only): LECTURAS del catálogo SOFOM y
|
|
@@ -112,4 +112,9 @@ export interface ILoanOfferingsBusinessApi {
|
|
|
112
112
|
* contestó el processor. Se llama SIEMPRE, haya pagado o no.
|
|
113
113
|
*/
|
|
114
114
|
settlePromotionBonus(promotionId: string, input: SettlePromotionBonusRequest, tenantId: string): Promise<StandardResponse<PromotionBonusResponse>>;
|
|
115
|
+
/**
|
|
116
|
+
* `GET /private/promotions/by-sku` — promociones vivas por SKU con su efecto y sus niveles.
|
|
117
|
+
* Es el detalle del panel del paso 03; el badge lo resuelve {@link listPromotedSkus}.
|
|
118
|
+
*/
|
|
119
|
+
listSkuPromotions(storeId: string, tenantId: string): Promise<StandardResponse<SkuPromotionsResponse>>;
|
|
115
120
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.57.0",
|
|
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.386.0",
|
|
38
38
|
"dotenv": "^16.4.7"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
ReservePromotionBonusResponse,
|
|
12
12
|
ResolveCustomerSegmentsRequest,
|
|
13
13
|
ResolveCustomerSegmentsResponse,
|
|
14
|
+
SkuPromotionsResponse,
|
|
14
15
|
SettlePromotionBonusRequest,
|
|
15
16
|
PromotionBonusResponse,
|
|
16
17
|
SimulateCreditPlanRequest,
|
|
@@ -111,4 +112,12 @@ export default class LoanOfferingsBusinessApi implements ILoanOfferingsBusinessA
|
|
|
111
112
|
const url = `${this.baseUrl}/private/promotions/${encodeURIComponent(promotionId)}/bonus-payment/result?tenantId=${encodeURIComponent(tenantId)}`;
|
|
112
113
|
return await this.httpRequest.put(url, input);
|
|
113
114
|
}
|
|
115
|
+
|
|
116
|
+
async listSkuPromotions(
|
|
117
|
+
storeId: string,
|
|
118
|
+
tenantId: string,
|
|
119
|
+
): Promise<StandardResponse<SkuPromotionsResponse>> {
|
|
120
|
+
const url = `${this.baseUrl}/private/promotions/by-sku?storeId=${encodeURIComponent(storeId)}&tenantId=${encodeURIComponent(tenantId)}`;
|
|
121
|
+
return await this.httpRequest.get(url);
|
|
122
|
+
}
|
|
114
123
|
}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
ReservePromotionBonusResponse,
|
|
10
10
|
ResolveCustomerSegmentsRequest,
|
|
11
11
|
ResolveCustomerSegmentsResponse,
|
|
12
|
+
SkuPromotionsResponse,
|
|
12
13
|
SettlePromotionBonusRequest,
|
|
13
14
|
PromotionBonusResponse,
|
|
14
15
|
SimulateCreditPlanRequest,
|
|
@@ -165,4 +166,13 @@ export interface ILoanOfferingsBusinessApi {
|
|
|
165
166
|
input: SettlePromotionBonusRequest,
|
|
166
167
|
tenantId: string,
|
|
167
168
|
): Promise<StandardResponse<PromotionBonusResponse>>;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* `GET /private/promotions/by-sku` — promociones vivas por SKU con su efecto y sus niveles.
|
|
172
|
+
* Es el detalle del panel del paso 03; el badge lo resuelve {@link listPromotedSkus}.
|
|
173
|
+
*/
|
|
174
|
+
listSkuPromotions(
|
|
175
|
+
storeId: string,
|
|
176
|
+
tenantId: string,
|
|
177
|
+
): Promise<StandardResponse<SkuPromotionsResponse>>;
|
|
168
178
|
}
|