@fiado/api-invoker 5.155.0 → 5.157.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,16 +1,17 @@
1
- import { KycVerificationChangedV1, KycStepCompletedV1, KycProofOfAddressCompletedV1 } from "@fiado/type-kit/bin/kyc/index.js";
1
+ import { KycVerificationChangedV1, KycStepCompletedV1, KycProofOfAddressCompletedV1, KycVerificationProgressV1 } from "@fiado/type-kit/bin/kyc/index.js";
2
2
  /**
3
3
  * Todo lo que `RetailKycInboundQueue` transporta:
4
4
  * - `KycVerificationChangedV1` — el CIERRE de la verificación, con el resultado consolidado.
5
5
  * - `KycStepCompletedV1` — el resultado de UNA estación, en cuanto Metamap la cierra.
6
6
  * - `KycProofOfAddressCompletedV1` — el resultado del COMPROBANTE DE DOMICILIO, un flow aparte del
7
7
  * documento de identidad.
8
+ * - `KycVerificationProgressV1` — el avance de la verificación (iniciada, datos cargados, vencida).
8
9
  *
9
10
  * Es una unión cerrada y no un `unknown` a propósito: el consumidor rutea por `eventType`, así que
10
11
  * agregar un tipo acá obliga a tocar también el consumidor — que es exactamente la conversación que
11
12
  * tiene que pasar antes de meter un mensaje nuevo en una cola compartida.
12
13
  */
13
- export type RetailKycInboundMessage = KycVerificationChangedV1 | KycStepCompletedV1 | KycProofOfAddressCompletedV1;
14
+ export type RetailKycInboundMessage = KycVerificationChangedV1 | KycStepCompletedV1 | KycProofOfAddressCompletedV1 | KycVerificationProgressV1;
14
15
  /**
15
16
  * Publisher del KYC hacia `RetailKycInboundQueue`, que consume `retail-wizard-business` (SureKeep F2).
16
17
  *
@@ -31,7 +31,7 @@ export default class LoanOfferingsBusinessApi implements ILoanOfferingsBusinessA
31
31
  settlePromotionBonus(promotionId: string, input: SettlePromotionBonusRequest, tenantId: string): Promise<StandardResponse<PromotionBonusResponse>>;
32
32
  listSkuPromotions(storeId: string, tenantId: string, level?: CreditPlanLevelEnum, segmentId?: string): Promise<StandardResponse<SkuPromotionsResponse>>;
33
33
  listSkuPromotionsBatch(input: ListSkuPromotionsRequest, tenantId: string): Promise<StandardResponse<SkuPromotionsResponse>>;
34
- listScopeWidePromotions(storeId: string, tenantId: string, level?: CreditPlanLevelEnum, segmentId?: string): Promise<StandardResponse<ScopeWidePromotionsResponse>>;
34
+ listScopeWidePromotions(storeId: string, tenantId: string, level?: CreditPlanLevelEnum, segmentId?: string, retailerId?: string): Promise<StandardResponse<ScopeWidePromotionsResponse>>;
35
35
  /** @deprecated Usar `resolveSegmentMembers`: este GET solo mira la lista manual. */
36
36
  getSegmentMembers(retailCustomerIds: string[], tenantId: string): Promise<StandardResponse<SegmentMembersResponse>>;
37
37
  resolveSegmentMembers(input: ResolveSegmentMembersRequest, tenantId: string): Promise<StandardResponse<SegmentMembersResponse>>;
@@ -90,12 +90,14 @@ let LoanOfferingsBusinessApi = class LoanOfferingsBusinessApi {
90
90
  const url = `${this.baseUrl}/private/promotions/by-sku?tenantId=${encodeURIComponent(tenantId)}`;
91
91
  return await this.httpRequest.post(url, input);
92
92
  }
93
- async listScopeWidePromotions(storeId, tenantId, level, segmentId) {
93
+ async listScopeWidePromotions(storeId, tenantId, level, segmentId, retailerId) {
94
94
  let url = `${this.baseUrl}/private/promotions/scope-wide?storeId=${encodeURIComponent(storeId)}&tenantId=${encodeURIComponent(tenantId)}`;
95
95
  if (level)
96
96
  url += `&level=${encodeURIComponent(level)}`;
97
97
  if (segmentId)
98
98
  url += `&segmentId=${encodeURIComponent(segmentId)}`;
99
+ if (retailerId)
100
+ url += `&retailerId=${encodeURIComponent(retailerId)}`;
99
101
  return await this.httpRequest.get(url);
100
102
  }
101
103
  /** @deprecated Usar `resolveSegmentMembers`: este GET solo mira la lista manual. */
@@ -144,9 +144,9 @@ export interface ILoanOfferingsBusinessApi {
144
144
  * `level`/`segmentId` son opcionales: si el score todavía no corrió o el segmento no se
145
145
  * resolvió, se omiten y el lambda destino descarta las promociones que acotan por esa
146
146
  * dimensión (mismo criterio que `listSkuPromotions`/`by-sku`). Devuelve `{ items: [] }` si no
147
- * hay ninguna vigente; nunca 404.
147
+ * hay ninguna vigente; nunca 404. `retailerId` resuelve las promociones acotadas por cadena.
148
148
  */
149
- listScopeWidePromotions(storeId: string, tenantId: string, level?: CreditPlanLevelEnum, segmentId?: string): Promise<StandardResponse<ScopeWidePromotionsResponse>>;
149
+ listScopeWidePromotions(storeId: string, tenantId: string, level?: CreditPlanLevelEnum, segmentId?: string, retailerId?: string): Promise<StandardResponse<ScopeWidePromotionsResponse>>;
150
150
  /**
151
151
  * `GET /private/segments/members?retailCustomerIds=<csv>` — pertenencia a segmentos EN LOTE.
152
152
  * Es la alternativa a resolver segmento por cliente: una llamada por página de tabla.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "5.155.0",
3
+ "version": "5.157.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",
@@ -1,4 +1,4 @@
1
- import { KycVerificationChangedV1, KycStepCompletedV1, KycProofOfAddressCompletedV1 } from "@fiado/type-kit/bin/kyc/index.js";
1
+ import { KycVerificationChangedV1, KycStepCompletedV1, KycProofOfAddressCompletedV1, KycVerificationProgressV1 } from "@fiado/type-kit/bin/kyc/index.js";
2
2
 
3
3
  /**
4
4
  * Todo lo que `RetailKycInboundQueue` transporta:
@@ -6,12 +6,17 @@ import { KycVerificationChangedV1, KycStepCompletedV1, KycProofOfAddressComplete
6
6
  * - `KycStepCompletedV1` — el resultado de UNA estación, en cuanto Metamap la cierra.
7
7
  * - `KycProofOfAddressCompletedV1` — el resultado del COMPROBANTE DE DOMICILIO, un flow aparte del
8
8
  * documento de identidad.
9
+ * - `KycVerificationProgressV1` — el avance de la verificación (iniciada, datos cargados, vencida).
9
10
  *
10
11
  * Es una unión cerrada y no un `unknown` a propósito: el consumidor rutea por `eventType`, así que
11
12
  * agregar un tipo acá obliga a tocar también el consumidor — que es exactamente la conversación que
12
13
  * tiene que pasar antes de meter un mensaje nuevo en una cola compartida.
13
14
  */
14
- export type RetailKycInboundMessage = KycVerificationChangedV1 | KycStepCompletedV1 | KycProofOfAddressCompletedV1;
15
+ export type RetailKycInboundMessage =
16
+ | KycVerificationChangedV1
17
+ | KycStepCompletedV1
18
+ | KycProofOfAddressCompletedV1
19
+ | KycVerificationProgressV1;
15
20
 
16
21
  /**
17
22
  * Publisher del KYC hacia `RetailKycInboundQueue`, que consume `retail-wizard-business` (SureKeep F2).
@@ -168,10 +168,12 @@ export default class LoanOfferingsBusinessApi implements ILoanOfferingsBusinessA
168
168
  tenantId: string,
169
169
  level?: CreditPlanLevelEnum,
170
170
  segmentId?: string,
171
+ retailerId?: string,
171
172
  ): Promise<StandardResponse<ScopeWidePromotionsResponse>> {
172
173
  let url = `${this.baseUrl}/private/promotions/scope-wide?storeId=${encodeURIComponent(storeId)}&tenantId=${encodeURIComponent(tenantId)}`;
173
174
  if (level) url += `&level=${encodeURIComponent(level)}`;
174
175
  if (segmentId) url += `&segmentId=${encodeURIComponent(segmentId)}`;
176
+ if (retailerId) url += `&retailerId=${encodeURIComponent(retailerId)}`;
175
177
  return await this.httpRequest.get(url);
176
178
  }
177
179
 
@@ -229,13 +229,14 @@ export interface ILoanOfferingsBusinessApi {
229
229
  * `level`/`segmentId` son opcionales: si el score todavía no corrió o el segmento no se
230
230
  * resolvió, se omiten y el lambda destino descarta las promociones que acotan por esa
231
231
  * dimensión (mismo criterio que `listSkuPromotions`/`by-sku`). Devuelve `{ items: [] }` si no
232
- * hay ninguna vigente; nunca 404.
232
+ * hay ninguna vigente; nunca 404. `retailerId` resuelve las promociones acotadas por cadena.
233
233
  */
234
234
  listScopeWidePromotions(
235
235
  storeId: string,
236
236
  tenantId: string,
237
237
  level?: CreditPlanLevelEnum,
238
238
  segmentId?: string,
239
+ retailerId?: string,
239
240
  ): Promise<StandardResponse<ScopeWidePromotionsResponse>>;
240
241
 
241
242
  /**