@fiado/api-invoker 5.98.0 → 5.99.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 +7 -0
- package/bin/loanOfferings/api/interfaces/ILoanOfferingsBusinessApi.d.ts +6 -1
- package/package.json +2 -2
- package/src/loanOfferings/api/LoanOfferingsBusinessApi.ts +12 -0
- package/src/loanOfferings/api/interfaces/ILoanOfferingsBusinessApi.ts +11 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
3
|
-
import { AmortizationScheduleResponse, ComputeAmortizationScheduleRequest, ConsumePromotionRequest, PromotedSkusResponse, ConsumePromotionResponse, CreditPlanLevelEnum, CreditPlanResponse, FinancierResponse, ReservePromotionBonusRequest, ReservePromotionBonusResponse, ResolveCustomerSegmentsRequest, ResolveCustomerSegmentsResponse, ScopeWidePromotionsResponse, SkuPromotionsResponse, SettlePromotionBonusRequest, PromotionBonusResponse, SimulateCreditPlanRequest, SimulationResultResponse } from "@fiado/type-kit/bin/loanOfferings/index.js";
|
|
3
|
+
import { AmortizationScheduleResponse, ComputeAmortizationScheduleRequest, ConsumePromotionRequest, PromotedSkusResponse, ConsumePromotionResponse, CreditPlanLevelEnum, CreditPlanResponse, FinancierResponse, ReservePromotionBonusRequest, ReservePromotionBonusResponse, ResolveCustomerSegmentsRequest, ResolveCustomerSegmentsResponse, ScopeWidePromotionsResponse, SegmentCatalogResponse, SegmentStatusEnum, SkuPromotionsResponse, SettlePromotionBonusRequest, PromotionBonusResponse, SimulateCreditPlanRequest, SimulationResultResponse } from "@fiado/type-kit/bin/loanOfferings/index.js";
|
|
4
4
|
import { SegmentMembersResponse } from "./dtos/SegmentMembers.js";
|
|
5
5
|
import { ILoanOfferingsBusinessApi } from "./interfaces/ILoanOfferingsBusinessApi.js";
|
|
6
6
|
/**
|
|
@@ -32,4 +32,5 @@ export default class LoanOfferingsBusinessApi implements ILoanOfferingsBusinessA
|
|
|
32
32
|
listSkuPromotions(storeId: string, tenantId: string, level?: CreditPlanLevelEnum, segmentId?: string): Promise<StandardResponse<SkuPromotionsResponse>>;
|
|
33
33
|
listScopeWidePromotions(storeId: string, tenantId: string, level?: CreditPlanLevelEnum, segmentId?: string): Promise<StandardResponse<ScopeWidePromotionsResponse>>;
|
|
34
34
|
getSegmentMembers(retailCustomerIds: string[], tenantId: string): Promise<StandardResponse<SegmentMembersResponse>>;
|
|
35
|
+
listSegments(tenantId: string, status?: SegmentStatusEnum): Promise<StandardResponse<SegmentCatalogResponse>>;
|
|
35
36
|
}
|
|
@@ -98,6 +98,13 @@ let LoanOfferingsBusinessApi = class LoanOfferingsBusinessApi {
|
|
|
98
98
|
const url = `${this.baseUrl}/private/segments/members?${params.toString()}`;
|
|
99
99
|
return await this.httpRequest.get(url);
|
|
100
100
|
}
|
|
101
|
+
async listSegments(tenantId, status) {
|
|
102
|
+
const params = new URLSearchParams({ tenantId });
|
|
103
|
+
if (status)
|
|
104
|
+
params.set("status", status);
|
|
105
|
+
const url = `${this.baseUrl}/private/segments?${params.toString()}`;
|
|
106
|
+
return await this.httpRequest.get(url);
|
|
107
|
+
}
|
|
101
108
|
};
|
|
102
109
|
LoanOfferingsBusinessApi = __decorate([
|
|
103
110
|
injectable(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
2
2
|
import { SegmentMembersResponse } from "../dtos/SegmentMembers.js";
|
|
3
|
-
import { AmortizationScheduleResponse, ComputeAmortizationScheduleRequest, ConsumePromotionRequest, PromotedSkusResponse, ConsumePromotionResponse, CreditPlanLevelEnum, CreditPlanResponse, FinancierResponse, ReservePromotionBonusRequest, ReservePromotionBonusResponse, ResolveCustomerSegmentsRequest, ResolveCustomerSegmentsResponse, ScopeWidePromotionsResponse, SkuPromotionsResponse, SettlePromotionBonusRequest, PromotionBonusResponse, SimulateCreditPlanRequest, SimulationResultResponse } from "@fiado/type-kit/bin/loanOfferings/index.js";
|
|
3
|
+
import { AmortizationScheduleResponse, ComputeAmortizationScheduleRequest, ConsumePromotionRequest, PromotedSkusResponse, ConsumePromotionResponse, CreditPlanLevelEnum, CreditPlanResponse, FinancierResponse, ReservePromotionBonusRequest, ReservePromotionBonusResponse, ResolveCustomerSegmentsRequest, ResolveCustomerSegmentsResponse, ScopeWidePromotionsResponse, SegmentCatalogResponse, SegmentStatusEnum, SkuPromotionsResponse, SettlePromotionBonusRequest, PromotionBonusResponse, SimulateCreditPlanRequest, SimulationResultResponse } from "@fiado/type-kit/bin/loanOfferings/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* Contrato del publisher HTTP del lambda `loan-offerings-business` (componente 07 SureKeep Fase 1)
|
|
6
6
|
* para sus endpoints privados service-to-service (VPC-only): LECTURAS del catálogo SOFOM y
|
|
@@ -152,4 +152,9 @@ export interface ILoanOfferingsBusinessApi {
|
|
|
152
152
|
* @throws `400 UNKNOWN_TENANT` si el `tenantId` viene ausente o desconocido.
|
|
153
153
|
*/
|
|
154
154
|
getSegmentMembers(retailCustomerIds: string[], tenantId: string): Promise<StandardResponse<SegmentMembersResponse>>;
|
|
155
|
+
/**
|
|
156
|
+
* `GET /private/segments` — catálogo de segmentos del silo, sin miembros; el catch-all viaja con `isDefault: true`.
|
|
157
|
+
* Sin `status` devuelve todos los estados.
|
|
158
|
+
*/
|
|
159
|
+
listSegments(tenantId: string, status?: SegmentStatusEnum): Promise<StandardResponse<SegmentCatalogResponse>>;
|
|
155
160
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.99.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.481.0",
|
|
38
38
|
"dotenv": "^16.4.7"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -15,6 +15,8 @@ import {
|
|
|
15
15
|
ResolveCustomerSegmentsRequest,
|
|
16
16
|
ResolveCustomerSegmentsResponse,
|
|
17
17
|
ScopeWidePromotionsResponse,
|
|
18
|
+
SegmentCatalogResponse,
|
|
19
|
+
SegmentStatusEnum,
|
|
18
20
|
SkuPromotionsResponse,
|
|
19
21
|
SettlePromotionBonusRequest,
|
|
20
22
|
PromotionBonusResponse,
|
|
@@ -165,4 +167,14 @@ export default class LoanOfferingsBusinessApi implements ILoanOfferingsBusinessA
|
|
|
165
167
|
const url = `${this.baseUrl}/private/segments/members?${params.toString()}`;
|
|
166
168
|
return await this.httpRequest.get(url);
|
|
167
169
|
}
|
|
170
|
+
|
|
171
|
+
async listSegments(
|
|
172
|
+
tenantId: string,
|
|
173
|
+
status?: SegmentStatusEnum,
|
|
174
|
+
): Promise<StandardResponse<SegmentCatalogResponse>> {
|
|
175
|
+
const params = new URLSearchParams({ tenantId });
|
|
176
|
+
if (status) params.set("status", status);
|
|
177
|
+
const url = `${this.baseUrl}/private/segments?${params.toString()}`;
|
|
178
|
+
return await this.httpRequest.get(url);
|
|
179
|
+
}
|
|
168
180
|
}
|
|
@@ -14,6 +14,8 @@ import {
|
|
|
14
14
|
ResolveCustomerSegmentsRequest,
|
|
15
15
|
ResolveCustomerSegmentsResponse,
|
|
16
16
|
ScopeWidePromotionsResponse,
|
|
17
|
+
SegmentCatalogResponse,
|
|
18
|
+
SegmentStatusEnum,
|
|
17
19
|
SkuPromotionsResponse,
|
|
18
20
|
SettlePromotionBonusRequest,
|
|
19
21
|
PromotionBonusResponse,
|
|
@@ -232,4 +234,13 @@ export interface ILoanOfferingsBusinessApi {
|
|
|
232
234
|
retailCustomerIds: string[],
|
|
233
235
|
tenantId: string,
|
|
234
236
|
): Promise<StandardResponse<SegmentMembersResponse>>;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* `GET /private/segments` — catálogo de segmentos del silo, sin miembros; el catch-all viaja con `isDefault: true`.
|
|
240
|
+
* Sin `status` devuelve todos los estados.
|
|
241
|
+
*/
|
|
242
|
+
listSegments(
|
|
243
|
+
tenantId: string,
|
|
244
|
+
status?: SegmentStatusEnum,
|
|
245
|
+
): Promise<StandardResponse<SegmentCatalogResponse>>;
|
|
235
246
|
}
|