@fiado/api-invoker 5.60.0 → 5.61.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 +1 -1
- package/bin/loanOfferings/api/LoanOfferingsBusinessApi.js +6 -2
- package/bin/loanOfferings/api/interfaces/ILoanOfferingsBusinessApi.d.ts +4 -1
- package/package.json +1 -1
- package/src/loanOfferings/api/LoanOfferingsBusinessApi.ts +5 -1
- package/src/loanOfferings/api/interfaces/ILoanOfferingsBusinessApi.ts +5 -0
|
@@ -23,7 +23,7 @@ export default class LoanOfferingsBusinessApi implements ILoanOfferingsBusinessA
|
|
|
23
23
|
listActiveFinanciers(tenantId: string): Promise<StandardResponse<FinancierResponse[]>>;
|
|
24
24
|
simulate(planId: string, input: SimulateCreditPlanRequest, tenantId: string): Promise<StandardResponse<SimulationResultResponse>>;
|
|
25
25
|
consumePromotion(promotionId: string, input: ConsumePromotionRequest, tenantId: string): Promise<StandardResponse<ConsumePromotionResponse>>;
|
|
26
|
-
listPromotedSkus(storeId: string, tenantId: string): Promise<StandardResponse<PromotedSkusResponse>>;
|
|
26
|
+
listPromotedSkus(storeId: string, tenantId: string, level?: CreditPlanLevelEnum, segmentId?: string): Promise<StandardResponse<PromotedSkusResponse>>;
|
|
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>>;
|
|
@@ -50,8 +50,12 @@ let LoanOfferingsBusinessApi = class LoanOfferingsBusinessApi {
|
|
|
50
50
|
const url = `${this.baseUrl}/private/promotions/${encodeURIComponent(promotionId)}/consume?tenantId=${encodeURIComponent(tenantId)}`;
|
|
51
51
|
return await this.httpRequest.post(url, input);
|
|
52
52
|
}
|
|
53
|
-
async listPromotedSkus(storeId, tenantId) {
|
|
54
|
-
|
|
53
|
+
async listPromotedSkus(storeId, tenantId, level, segmentId) {
|
|
54
|
+
let url = `${this.baseUrl}/private/promotions/promoted-skus?storeId=${encodeURIComponent(storeId)}&tenantId=${encodeURIComponent(tenantId)}`;
|
|
55
|
+
if (level)
|
|
56
|
+
url += `&level=${encodeURIComponent(level)}`;
|
|
57
|
+
if (segmentId)
|
|
58
|
+
url += `&segmentId=${encodeURIComponent(segmentId)}`;
|
|
55
59
|
return await this.httpRequest.get(url);
|
|
56
60
|
}
|
|
57
61
|
async resolveCustomerSegments(input, tenantId) {
|
|
@@ -81,8 +81,11 @@ export interface ILoanOfferingsBusinessApi {
|
|
|
81
81
|
* El filtrado vive en el lambda, no acá: solo entran las promociones que alcanzan a CUALQUIER
|
|
82
82
|
* nivel (el catálogo se pinta antes del score) y las que ACOTAN por SKU (una general marcaría
|
|
83
83
|
* el catálogo entero). El caller no puede aflojar ese criterio.
|
|
84
|
+
*
|
|
85
|
+
* `level`/`segmentId` son opcionales, mismo criterio que {@link listSkuPromotions}: si no
|
|
86
|
+
* vienen, el lambda destino descarta las promociones que acotan por esa dimensión.
|
|
84
87
|
*/
|
|
85
|
-
listPromotedSkus(storeId: string, tenantId: string): Promise<StandardResponse<PromotedSkusResponse>>;
|
|
88
|
+
listPromotedSkus(storeId: string, tenantId: string, level?: CreditPlanLevelEnum, segmentId?: string): Promise<StandardResponse<PromotedSkusResponse>>;
|
|
86
89
|
/**
|
|
87
90
|
* POST /private/segments/resolve — los segmentos a los que pertenece el cliente HOY, evaluados
|
|
88
91
|
* en línea contra los hechos que manda el caller. No hay segmento persistido en el cliente.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.61.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",
|
|
@@ -84,8 +84,12 @@ export default class LoanOfferingsBusinessApi implements ILoanOfferingsBusinessA
|
|
|
84
84
|
async listPromotedSkus(
|
|
85
85
|
storeId: string,
|
|
86
86
|
tenantId: string,
|
|
87
|
+
level?: CreditPlanLevelEnum,
|
|
88
|
+
segmentId?: string,
|
|
87
89
|
): Promise<StandardResponse<PromotedSkusResponse>> {
|
|
88
|
-
|
|
90
|
+
let url = `${this.baseUrl}/private/promotions/promoted-skus?storeId=${encodeURIComponent(storeId)}&tenantId=${encodeURIComponent(tenantId)}`;
|
|
91
|
+
if (level) url += `&level=${encodeURIComponent(level)}`;
|
|
92
|
+
if (segmentId) url += `&segmentId=${encodeURIComponent(segmentId)}`;
|
|
89
93
|
return await this.httpRequest.get(url);
|
|
90
94
|
}
|
|
91
95
|
|
|
@@ -120,10 +120,15 @@ export interface ILoanOfferingsBusinessApi {
|
|
|
120
120
|
* El filtrado vive en el lambda, no acá: solo entran las promociones que alcanzan a CUALQUIER
|
|
121
121
|
* nivel (el catálogo se pinta antes del score) y las que ACOTAN por SKU (una general marcaría
|
|
122
122
|
* el catálogo entero). El caller no puede aflojar ese criterio.
|
|
123
|
+
*
|
|
124
|
+
* `level`/`segmentId` son opcionales, mismo criterio que {@link listSkuPromotions}: si no
|
|
125
|
+
* vienen, el lambda destino descarta las promociones que acotan por esa dimensión.
|
|
123
126
|
*/
|
|
124
127
|
listPromotedSkus(
|
|
125
128
|
storeId: string,
|
|
126
129
|
tenantId: string,
|
|
130
|
+
level?: CreditPlanLevelEnum,
|
|
131
|
+
segmentId?: string,
|
|
127
132
|
): Promise<StandardResponse<PromotedSkusResponse>>;
|
|
128
133
|
|
|
129
134
|
/**
|