@fiado/api-invoker 5.150.0 → 5.152.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.
@@ -1,6 +1,6 @@
1
1
  import type { IHttpRequest } from "@fiado/http-client";
2
2
  import { StandardResponse } from "@fiado/gateway-adapter";
3
- import { ActivationCheckRequest, ActivationCheckResponse, CancelLoanCreditRequest, CreditPaymentAppliedRequest, CreditPaymentAppliedResponse, CreditSettledRequest, CreditSettledResponse, LoanBorrowerResponse, ListMessagingCandidatesRequest, ListMessagingCandidatesResponse, LoanCreditResponse, OriginateLoanCreditRequest, OriginateLoanCreditResponse, QuoteLoanCreditRequest, QuoteLoanCreditResponse, SignLoanCreditRequest, SignLoanCreditResponse, PreviewLoanContractRequest, LoanContractPreview, UpdateLoanBorrowerSciRequest, UpsertLoanBorrowerRequest, LoanBorrowerCreditItem, LoanContractDownloadUrl, LoanContractResponse, LoanCreditDetail, LoanInstallmentResponse, LoanPaymentListResponse, CreateCustomerPaymentRequest, LoanCustomerPaymentOptions, LoanCustomerPaymentResult } from "@fiado/type-kit/bin/loanCredit/index.js";
3
+ import { ActivationCheckRequest, ActivationCheckResponse, CancelLoanCreditRequest, CreditPaymentAppliedRequest, CreditPaymentAppliedResponse, CreditSettledRequest, CreditSettledResponse, LoanBorrowerResponse, ListMessagingCandidatesRequest, ListMessagingCandidatesResponse, LoanCreditResponse, OriginateLoanCreditRequest, OriginateLoanCreditResponse, QuoteLoanCreditRequest, QuoteLoanCreditResponse, SignLoanCreditRequest, SignLoanCreditResponse, PreviewLoanContractRequest, LoanContractPreview, UpdateLoanBorrowerSciRequest, UpsertLoanBorrowerRequest, LoanBorrowerCreditItem, LoanContractDownloadUrl, LoanContractResponse, ContractTypeEnum, LoanCustomerCreditDocument, LoanCustomerCreditDocumentUrl, LoanCreditDetail, LoanInstallmentResponse, LoanPaymentListResponse, CreateCustomerPaymentRequest, LoanCustomerPaymentOptions, LoanCustomerPaymentResult } from "@fiado/type-kit/bin/loanCredit/index.js";
4
4
  import { CreditSummariesBatchRequest, CreditSummariesBatchResponse } from "./dtos/CreditSummariesBatch.js";
5
5
  import { LoanCreditAnalyticsBatchRequest, LoanCreditAnalyticsBatchResponse } from "./dtos/LoanCreditAnalyticsBatch.js";
6
6
  import type { GetCreditOptions } from "./dtos/GetCreditOptions.js";
@@ -51,6 +51,8 @@ export default class LoanCreditBusinessApi implements ILoanCreditBusinessApi {
51
51
  }): Promise<StandardResponse<LoanPaymentListResponse>>;
52
52
  listCustomerCreditContracts(directoryId: string, creditId: string, tenantId: string): Promise<StandardResponse<LoanContractResponse[]>>;
53
53
  getCustomerCreditContractUrl(directoryId: string, creditId: string, contractId: string, tenantId: string): Promise<StandardResponse<LoanContractDownloadUrl>>;
54
+ listCustomerCreditDocuments(directoryId: string, creditId: string, type: ContractTypeEnum, tenantId: string): Promise<StandardResponse<LoanCustomerCreditDocument[]>>;
55
+ getCustomerCreditDocumentUrl(directoryId: string, creditId: string, documentType: ContractTypeEnum, documentKey: string, tenantId: string): Promise<StandardResponse<LoanCustomerCreditDocumentUrl>>;
54
56
  getCustomerPaymentOptions(directoryId: string, creditId: string, tenantId: string): Promise<StandardResponse<LoanCustomerPaymentOptions>>;
55
57
  createCustomerPayment(directoryId: string, creditId: string, tenantId: string, body: CreateCustomerPaymentRequest): Promise<StandardResponse<LoanCustomerPaymentResult>>;
56
58
  }
@@ -136,6 +136,13 @@ let LoanCreditBusinessApi = class LoanCreditBusinessApi {
136
136
  async getCustomerCreditContractUrl(directoryId, creditId, contractId, tenantId) {
137
137
  return await this.httpRequest.get(`${this.customerCreditsUrl(directoryId, creditId)}/contracts/${encodeURIComponent(contractId)}/url?tenantId=${encodeURIComponent(tenantId)}`);
138
138
  }
139
+ async listCustomerCreditDocuments(directoryId, creditId, type, tenantId) {
140
+ const query = new URLSearchParams({ tenantId, type });
141
+ return await this.httpRequest.get(`${this.customerCreditsUrl(directoryId, creditId)}/documents?${query.toString()}`);
142
+ }
143
+ async getCustomerCreditDocumentUrl(directoryId, creditId, documentType, documentKey, tenantId) {
144
+ return await this.httpRequest.get(`${this.customerCreditsUrl(directoryId, creditId)}/documents/${encodeURIComponent(documentType)}/${encodeURIComponent(documentKey)}/url?tenantId=${encodeURIComponent(tenantId)}`);
145
+ }
139
146
  // ─── Pagos de cliente (retail-loan-business) ────────────────────────────────
140
147
  async getCustomerPaymentOptions(directoryId, creditId, tenantId) {
141
148
  return await this.httpRequest.get(`${this.customerCreditsUrl(directoryId, creditId)}/payment-options?tenantId=${encodeURIComponent(tenantId)}`);
@@ -1,5 +1,5 @@
1
1
  import { StandardResponse } from "@fiado/gateway-adapter";
2
- import { ActivationCheckRequest, CreditPaymentAppliedRequest, CreditPaymentAppliedResponse, CreditSettledRequest, CreditSettledResponse, ActivationCheckResponse, CancelLoanCreditRequest, LoanBorrowerResponse, ListMessagingCandidatesRequest, ListMessagingCandidatesResponse, LoanCreditResponse, OriginateLoanCreditRequest, OriginateLoanCreditResponse, QuoteLoanCreditRequest, QuoteLoanCreditResponse, SignLoanCreditRequest, PreviewLoanContractRequest, LoanContractPreview, SignLoanCreditResponse, UpdateLoanBorrowerSciRequest, UpsertLoanBorrowerRequest, LoanBorrowerCreditItem, LoanContractDownloadUrl, LoanContractResponse, LoanCreditDetail, LoanInstallmentResponse, LoanPaymentListResponse, CreateCustomerPaymentRequest, LoanCustomerPaymentOptions, LoanCustomerPaymentResult } from "@fiado/type-kit/bin/loanCredit/index.js";
2
+ import { ActivationCheckRequest, CreditPaymentAppliedRequest, CreditPaymentAppliedResponse, CreditSettledRequest, CreditSettledResponse, ActivationCheckResponse, CancelLoanCreditRequest, LoanBorrowerResponse, ListMessagingCandidatesRequest, ListMessagingCandidatesResponse, LoanCreditResponse, OriginateLoanCreditRequest, OriginateLoanCreditResponse, QuoteLoanCreditRequest, QuoteLoanCreditResponse, SignLoanCreditRequest, PreviewLoanContractRequest, LoanContractPreview, SignLoanCreditResponse, UpdateLoanBorrowerSciRequest, UpsertLoanBorrowerRequest, LoanBorrowerCreditItem, LoanContractDownloadUrl, LoanContractResponse, ContractTypeEnum, LoanCustomerCreditDocument, LoanCustomerCreditDocumentUrl, LoanCreditDetail, LoanInstallmentResponse, LoanPaymentListResponse, CreateCustomerPaymentRequest, LoanCustomerPaymentOptions, LoanCustomerPaymentResult } from "@fiado/type-kit/bin/loanCredit/index.js";
3
3
  import { CreditSummariesBatchRequest, CreditSummariesBatchResponse } from "../dtos/CreditSummariesBatch.js";
4
4
  import { LoanCreditAnalyticsBatchRequest, LoanCreditAnalyticsBatchResponse } from "../dtos/LoanCreditAnalyticsBatch.js";
5
5
  import type { GetCreditOptions } from "../dtos/GetCreditOptions.js";
@@ -156,6 +156,10 @@ export interface ILoanCreditBusinessApi {
156
156
  listCustomerCreditContracts(directoryId: string, creditId: string, tenantId: string): Promise<StandardResponse<LoanContractResponse[]>>;
157
157
  /** URL prefirmada del PDF de un contrato. 404 CONTRACT_NOT_FOUND · 409 CONTRACT_PDF_NOT_READY. */
158
158
  getCustomerCreditContractUrl(directoryId: string, creditId: string, contractId: string, tenantId: string): Promise<StandardResponse<LoanContractDownloadUrl>>;
159
+ /** Documentos de un tipo del ciclo de vida del crédito (comprobantes, estados de cuenta), el más reciente primero. */
160
+ listCustomerCreditDocuments(directoryId: string, creditId: string, type: ContractTypeEnum, tenantId: string): Promise<StandardResponse<LoanCustomerCreditDocument[]>>;
161
+ /** URL prefirmada del PDF de un documento del ciclo de vida. 404 CREDIT_DOCUMENT_NOT_FOUND si no existe o no tiene PDF. */
162
+ getCustomerCreditDocumentUrl(directoryId: string, creditId: string, documentType: ContractTypeEnum, documentKey: string, tenantId: string): Promise<StandardResponse<LoanCustomerCreditDocumentUrl>>;
159
163
  /** Opciones de pago de un crédito del cliente, con montos ya calculados. */
160
164
  getCustomerPaymentOptions(directoryId: string, creditId: string, tenantId: string): Promise<StandardResponse<LoanCustomerPaymentOptions>>;
161
165
  /**
@@ -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, SegmentCatalogResponse, SegmentStatusEnum, SkuPromotionsResponse, SettlePromotionBonusRequest, PromotionBonusResponse, SimulateCreditPlanRequest, SimulationResultResponse } from "@fiado/type-kit/bin/loanOfferings/index.js";
3
+ import { AmortizationScheduleResponse, ComputeAmortizationScheduleRequest, ConsumePromotionRequest, PromotedSkusResponse, ConsumePromotionResponse, CreditPlanLevelEnum, CreditPlanResponse, FinancierResponse, ListPromotedSkusRequest, ListSkuPromotionsRequest, 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
  /**
@@ -26,10 +26,12 @@ export default class LoanOfferingsBusinessApi implements ILoanOfferingsBusinessA
26
26
  computeAmortizationSchedule(input: ComputeAmortizationScheduleRequest, tenantId: string): Promise<StandardResponse<AmortizationScheduleResponse>>;
27
27
  consumePromotion(promotionId: string, input: ConsumePromotionRequest, tenantId: string): Promise<StandardResponse<ConsumePromotionResponse>>;
28
28
  listPromotedSkus(storeId: string, tenantId: string, level?: CreditPlanLevelEnum, segmentId?: string): Promise<StandardResponse<PromotedSkusResponse>>;
29
+ listPromotedSkusBatch(input: ListPromotedSkusRequest, tenantId: string): Promise<StandardResponse<PromotedSkusResponse>>;
29
30
  resolveCustomerSegments(input: ResolveCustomerSegmentsRequest, tenantId: string): Promise<StandardResponse<ResolveCustomerSegmentsResponse>>;
30
31
  reservePromotionBonus(promotionId: string, input: ReservePromotionBonusRequest, tenantId: string): Promise<StandardResponse<ReservePromotionBonusResponse>>;
31
32
  settlePromotionBonus(promotionId: string, input: SettlePromotionBonusRequest, tenantId: string): Promise<StandardResponse<PromotionBonusResponse>>;
32
33
  listSkuPromotions(storeId: string, tenantId: string, level?: CreditPlanLevelEnum, segmentId?: string): Promise<StandardResponse<SkuPromotionsResponse>>;
34
+ listSkuPromotionsBatch(input: ListSkuPromotionsRequest, tenantId: string): Promise<StandardResponse<SkuPromotionsResponse>>;
33
35
  listScopeWidePromotions(storeId: string, tenantId: string, level?: CreditPlanLevelEnum, segmentId?: string): Promise<StandardResponse<ScopeWidePromotionsResponse>>;
34
36
  getSegmentMembers(retailCustomerIds: string[], tenantId: string): Promise<StandardResponse<SegmentMembersResponse>>;
35
37
  listSegments(tenantId: string, status?: SegmentStatusEnum): Promise<StandardResponse<SegmentCatalogResponse>>;
@@ -62,6 +62,10 @@ let LoanOfferingsBusinessApi = class LoanOfferingsBusinessApi {
62
62
  url += `&segmentId=${encodeURIComponent(segmentId)}`;
63
63
  return await this.httpRequest.get(url);
64
64
  }
65
+ async listPromotedSkusBatch(input, tenantId) {
66
+ const url = `${this.baseUrl}/private/promotions/promoted-skus?tenantId=${encodeURIComponent(tenantId)}`;
67
+ return await this.httpRequest.post(url, input);
68
+ }
65
69
  async resolveCustomerSegments(input, tenantId) {
66
70
  const url = `${this.baseUrl}/private/segments/resolve?tenantId=${encodeURIComponent(tenantId)}`;
67
71
  return await this.httpRequest.post(url, input);
@@ -82,6 +86,10 @@ let LoanOfferingsBusinessApi = class LoanOfferingsBusinessApi {
82
86
  url += `&segmentId=${encodeURIComponent(segmentId)}`;
83
87
  return await this.httpRequest.get(url);
84
88
  }
89
+ async listSkuPromotionsBatch(input, tenantId) {
90
+ const url = `${this.baseUrl}/private/promotions/by-sku?tenantId=${encodeURIComponent(tenantId)}`;
91
+ return await this.httpRequest.post(url, input);
92
+ }
85
93
  async listScopeWidePromotions(storeId, tenantId, level, segmentId) {
86
94
  let url = `${this.baseUrl}/private/promotions/scope-wide?storeId=${encodeURIComponent(storeId)}&tenantId=${encodeURIComponent(tenantId)}`;
87
95
  if (level)
@@ -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, SegmentCatalogResponse, SegmentStatusEnum, SkuPromotionsResponse, SettlePromotionBonusRequest, PromotionBonusResponse, SimulateCreditPlanRequest, SimulationResultResponse } from "@fiado/type-kit/bin/loanOfferings/index.js";
3
+ import { ListPromotedSkusRequest, ListSkuPromotionsRequest, 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
@@ -92,6 +92,11 @@ export interface ILoanOfferingsBusinessApi {
92
92
  * vienen, el lambda destino descarta las promociones que acotan por esa dimensión.
93
93
  */
94
94
  listPromotedSkus(storeId: string, tenantId: string, level?: CreditPlanLevelEnum, segmentId?: string): Promise<StandardResponse<PromotedSkusResponse>>;
95
+ /**
96
+ * `POST /private/promotions/promoted-skus` — versión en lote de {@link listPromotedSkus}: cada SKU
97
+ * viaja con su tipo y gama, así entran las promos acotadas por tipo o gama. Hasta 100 SKUs.
98
+ */
99
+ listPromotedSkusBatch(input: ListPromotedSkusRequest, tenantId: string): Promise<StandardResponse<PromotedSkusResponse>>;
95
100
  /**
96
101
  * POST /private/segments/resolve — los segmentos a los que pertenece el cliente HOY, evaluados
97
102
  * en línea contra los hechos que manda el caller. No hay segmento persistido en el cliente.
@@ -129,6 +134,11 @@ export interface ILoanOfferingsBusinessApi {
129
134
  * vienen, el lambda destino descarta las promociones que acotan por esa dimensión.
130
135
  */
131
136
  listSkuPromotions(storeId: string, tenantId: string, level?: CreditPlanLevelEnum, segmentId?: string): Promise<StandardResponse<SkuPromotionsResponse>>;
137
+ /**
138
+ * `POST /private/promotions/by-sku` — versión en lote de {@link listSkuPromotions}: cada SKU
139
+ * viaja con su tipo y gama, así entran las promos acotadas por tipo o gama. Hasta 100 SKUs.
140
+ */
141
+ listSkuPromotionsBatch(input: ListSkuPromotionsRequest, tenantId: string): Promise<StandardResponse<SkuPromotionsResponse>>;
132
142
  /**
133
143
  * `GET /private/promotions/scope-wide` — promociones que NO acotan por SKU (tienda, nivel,
134
144
  * segmento o universales), para el banner de pantalla completa del paso 03 del wizard.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "5.150.0",
3
+ "version": "5.152.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.14.0",
35
35
  "@fiado/http-client": "^2.0.1",
36
36
  "@fiado/logger": "^1.1.3",
37
- "@fiado/type-kit": "^3.594.0",
37
+ "@fiado/type-kit": "^3.611.0",
38
38
  "dotenv": "^16.4.7"
39
39
  },
40
40
  "peerDependencies": {
@@ -26,6 +26,9 @@ import {
26
26
  LoanBorrowerCreditItem,
27
27
  LoanContractDownloadUrl,
28
28
  LoanContractResponse,
29
+ ContractTypeEnum,
30
+ LoanCustomerCreditDocument,
31
+ LoanCustomerCreditDocumentUrl,
29
32
  LoanCreditDetail,
30
33
  LoanInstallmentResponse,
31
34
  LoanPaymentListResponse,
@@ -294,6 +297,28 @@ export default class LoanCreditBusinessApi implements ILoanCreditBusinessApi {
294
297
  );
295
298
  }
296
299
 
300
+ async listCustomerCreditDocuments(
301
+ directoryId: string,
302
+ creditId: string,
303
+ type: ContractTypeEnum,
304
+ tenantId: string,
305
+ ): Promise<StandardResponse<LoanCustomerCreditDocument[]>> {
306
+ const query = new URLSearchParams({ tenantId, type });
307
+ return await this.httpRequest.get(`${this.customerCreditsUrl(directoryId, creditId)}/documents?${query.toString()}`);
308
+ }
309
+
310
+ async getCustomerCreditDocumentUrl(
311
+ directoryId: string,
312
+ creditId: string,
313
+ documentType: ContractTypeEnum,
314
+ documentKey: string,
315
+ tenantId: string,
316
+ ): Promise<StandardResponse<LoanCustomerCreditDocumentUrl>> {
317
+ return await this.httpRequest.get(
318
+ `${this.customerCreditsUrl(directoryId, creditId)}/documents/${encodeURIComponent(documentType)}/${encodeURIComponent(documentKey)}/url?tenantId=${encodeURIComponent(tenantId)}`,
319
+ );
320
+ }
321
+
297
322
  // ─── Pagos de cliente (retail-loan-business) ────────────────────────────────
298
323
 
299
324
  async getCustomerPaymentOptions(
@@ -24,6 +24,9 @@ import {
24
24
  LoanBorrowerCreditItem,
25
25
  LoanContractDownloadUrl,
26
26
  LoanContractResponse,
27
+ ContractTypeEnum,
28
+ LoanCustomerCreditDocument,
29
+ LoanCustomerCreditDocumentUrl,
27
30
  LoanCreditDetail,
28
31
  LoanInstallmentResponse,
29
32
  LoanPaymentListResponse,
@@ -311,6 +314,23 @@ export interface ILoanCreditBusinessApi {
311
314
  tenantId: string,
312
315
  ): Promise<StandardResponse<LoanContractDownloadUrl>>;
313
316
 
317
+ /** Documentos de un tipo del ciclo de vida del crédito (comprobantes, estados de cuenta), el más reciente primero. */
318
+ listCustomerCreditDocuments(
319
+ directoryId: string,
320
+ creditId: string,
321
+ type: ContractTypeEnum,
322
+ tenantId: string,
323
+ ): Promise<StandardResponse<LoanCustomerCreditDocument[]>>;
324
+
325
+ /** URL prefirmada del PDF de un documento del ciclo de vida. 404 CREDIT_DOCUMENT_NOT_FOUND si no existe o no tiene PDF. */
326
+ getCustomerCreditDocumentUrl(
327
+ directoryId: string,
328
+ creditId: string,
329
+ documentType: ContractTypeEnum,
330
+ documentKey: string,
331
+ tenantId: string,
332
+ ): Promise<StandardResponse<LoanCustomerCreditDocumentUrl>>;
333
+
314
334
  // ─── Pagos de cliente (retail-loan-business) ────────────────────────────────
315
335
 
316
336
  /** Opciones de pago de un crédito del cliente, con montos ya calculados. */
@@ -10,6 +10,8 @@ import {
10
10
  CreditPlanLevelEnum,
11
11
  CreditPlanResponse,
12
12
  FinancierResponse,
13
+ ListPromotedSkusRequest,
14
+ ListSkuPromotionsRequest,
13
15
  ReservePromotionBonusRequest,
14
16
  ReservePromotionBonusResponse,
15
17
  ResolveCustomerSegmentsRequest,
@@ -106,6 +108,14 @@ export default class LoanOfferingsBusinessApi implements ILoanOfferingsBusinessA
106
108
  return await this.httpRequest.get(url);
107
109
  }
108
110
 
111
+ async listPromotedSkusBatch(
112
+ input: ListPromotedSkusRequest,
113
+ tenantId: string,
114
+ ): Promise<StandardResponse<PromotedSkusResponse>> {
115
+ const url = `${this.baseUrl}/private/promotions/promoted-skus?tenantId=${encodeURIComponent(tenantId)}`;
116
+ return await this.httpRequest.post(url, input);
117
+ }
118
+
109
119
  async resolveCustomerSegments(
110
120
  input: ResolveCustomerSegmentsRequest,
111
121
  tenantId: string,
@@ -144,6 +154,14 @@ export default class LoanOfferingsBusinessApi implements ILoanOfferingsBusinessA
144
154
  return await this.httpRequest.get(url);
145
155
  }
146
156
 
157
+ async listSkuPromotionsBatch(
158
+ input: ListSkuPromotionsRequest,
159
+ tenantId: string,
160
+ ): Promise<StandardResponse<SkuPromotionsResponse>> {
161
+ const url = `${this.baseUrl}/private/promotions/by-sku?tenantId=${encodeURIComponent(tenantId)}`;
162
+ return await this.httpRequest.post(url, input);
163
+ }
164
+
147
165
  async listScopeWidePromotions(
148
166
  storeId: string,
149
167
  tenantId: string,
@@ -1,6 +1,8 @@
1
1
  import { StandardResponse } from "@fiado/gateway-adapter";
2
2
  import { SegmentMembersResponse } from "../dtos/SegmentMembers.js";
3
3
  import {
4
+ ListPromotedSkusRequest,
5
+ ListSkuPromotionsRequest,
4
6
  AmortizationScheduleResponse,
5
7
  ComputeAmortizationScheduleRequest,
6
8
  ConsumePromotionRequest,
@@ -145,6 +147,15 @@ export interface ILoanOfferingsBusinessApi {
145
147
  segmentId?: string,
146
148
  ): Promise<StandardResponse<PromotedSkusResponse>>;
147
149
 
150
+ /**
151
+ * `POST /private/promotions/promoted-skus` — versión en lote de {@link listPromotedSkus}: cada SKU
152
+ * viaja con su tipo y gama, así entran las promos acotadas por tipo o gama. Hasta 100 SKUs.
153
+ */
154
+ listPromotedSkusBatch(
155
+ input: ListPromotedSkusRequest,
156
+ tenantId: string,
157
+ ): Promise<StandardResponse<PromotedSkusResponse>>;
158
+
148
159
  /**
149
160
  * POST /private/segments/resolve — los segmentos a los que pertenece el cliente HOY, evaluados
150
161
  * en línea contra los hechos que manda el caller. No hay segmento persistido en el cliente.
@@ -202,6 +213,15 @@ export interface ILoanOfferingsBusinessApi {
202
213
  segmentId?: string,
203
214
  ): Promise<StandardResponse<SkuPromotionsResponse>>;
204
215
 
216
+ /**
217
+ * `POST /private/promotions/by-sku` — versión en lote de {@link listSkuPromotions}: cada SKU
218
+ * viaja con su tipo y gama, así entran las promos acotadas por tipo o gama. Hasta 100 SKUs.
219
+ */
220
+ listSkuPromotionsBatch(
221
+ input: ListSkuPromotionsRequest,
222
+ tenantId: string,
223
+ ): Promise<StandardResponse<SkuPromotionsResponse>>;
224
+
205
225
  /**
206
226
  * `GET /private/promotions/scope-wide` — promociones que NO acotan por SKU (tienda, nivel,
207
227
  * segmento o universales), para el banner de pantalla completa del paso 03 del wizard.