@fiado/api-invoker 5.67.0 → 5.68.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/loanCredit/api/LoanCreditDeviceApi.d.ts +4 -1
- package/bin/loanCredit/api/LoanCreditDeviceApi.js +17 -0
- package/bin/loanCredit/api/interfaces/ILoanCreditDeviceApi.d.ts +35 -7
- package/bin/retailCatalog/api/RetailCatalogBusinessApi.d.ts +3 -2
- package/bin/retailCatalog/api/RetailCatalogBusinessApi.js +4 -10
- package/bin/retailCatalog/api/interfaces/IRetailCatalogBusinessApi.d.ts +17 -48
- package/bin/retailCatalog/api/interfaces/IRetailCatalogBusinessApi.js +0 -2
- package/package.json +1 -1
- package/src/loanCredit/api/LoanCreditDeviceApi.ts +30 -0
- package/src/loanCredit/api/interfaces/ILoanCreditDeviceApi.ts +46 -6
- package/src/retailCatalog/api/RetailCatalogBusinessApi.ts +12 -14
- package/src/retailCatalog/api/interfaces/IRetailCatalogBusinessApi.ts +25 -52
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
3
|
-
import { LoanDeviceEnrollRequest, LoanDeviceEnrollResponse, LoanDeviceEnrollStatusRequest, LoanDeviceEnrollStatusResponse, LoanDeviceLastSeenRequest, LoanDeviceLastSeenResponse, LoanDeviceManualLockRequest, LoanDeviceManualLockResponse, LoanDeviceManualUnlockRequest, LoanDeviceManualUnlockResponse, LoanDeviceStatusRequest, LoanDeviceStatusResponse } from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
3
|
+
import { LoanDeviceEnrollRequest, LoanDeviceEnrollResponse, LoanDeviceEnrollStatusRequest, LoanDeviceEnrollStatusResponse, LoanDeviceLastSeenRequest, LoanDeviceLastSeenResponse, LoanDeviceManualLockRequest, LoanDeviceManualLockResponse, LoanDeviceManualUnlockRequest, LoanDeviceManualUnlockResponse, LoanDeviceNotifyRequest, LoanDeviceNotifyResponse, LoanDeviceReleaseRequest, LoanDeviceReleaseResponse, LoanDeviceStatusRequest, LoanDeviceStatusResponse } from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
4
4
|
import { ILoanCreditDeviceApi } from "./interfaces/ILoanCreditDeviceApi.js";
|
|
5
5
|
/**
|
|
6
6
|
* Publisher HTTP de los endpoints de dispositivo/MDM del lambda `loan-credit-business`
|
|
@@ -18,10 +18,13 @@ export default class LoanCreditDeviceApi implements ILoanCreditDeviceApi {
|
|
|
18
18
|
private httpRequest;
|
|
19
19
|
private readonly baseUrl;
|
|
20
20
|
constructor(httpRequest: IHttpRequest);
|
|
21
|
+
private assertBatchSize;
|
|
21
22
|
enroll(input: LoanDeviceEnrollRequest, tenantId: string): Promise<StandardResponse<LoanDeviceEnrollResponse>>;
|
|
22
23
|
getEnrollStatus(input: LoanDeviceEnrollStatusRequest, tenantId: string): Promise<StandardResponse<LoanDeviceEnrollStatusResponse>>;
|
|
23
24
|
getStatus(input: LoanDeviceStatusRequest, tenantId: string): Promise<StandardResponse<LoanDeviceStatusResponse>>;
|
|
24
25
|
getLastSeen(input: LoanDeviceLastSeenRequest, tenantId: string): Promise<StandardResponse<LoanDeviceLastSeenResponse>>;
|
|
25
26
|
manualLock(input: LoanDeviceManualLockRequest, tenantId: string): Promise<StandardResponse<LoanDeviceManualLockResponse>>;
|
|
26
27
|
manualUnlock(input: LoanDeviceManualUnlockRequest, tenantId: string): Promise<StandardResponse<LoanDeviceManualUnlockResponse>>;
|
|
28
|
+
notify(input: LoanDeviceNotifyRequest, tenantId: string): Promise<StandardResponse<LoanDeviceNotifyResponse>>;
|
|
29
|
+
release(input: LoanDeviceReleaseRequest, tenantId: string): Promise<StandardResponse<LoanDeviceReleaseResponse>>;
|
|
27
30
|
}
|
|
@@ -11,6 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
import { inject, injectable } from "inversify";
|
|
14
|
+
import { LOAN_DEVICE_MAX_BATCH, } from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
14
15
|
/**
|
|
15
16
|
* Publisher HTTP de los endpoints de dispositivo/MDM del lambda `loan-credit-business`
|
|
16
17
|
* (componente 09 SureKeep F2). Contrato y semántica completos → `ILoanCreditDeviceApi`
|
|
@@ -30,6 +31,12 @@ let LoanCreditDeviceApi = class LoanCreditDeviceApi {
|
|
|
30
31
|
constructor(httpRequest) {
|
|
31
32
|
this.httpRequest = httpRequest;
|
|
32
33
|
}
|
|
34
|
+
// Se corta aquí: mandar un lote que el destino va a rechazar solo gasta un round-trip.
|
|
35
|
+
assertBatchSize(itemCount) {
|
|
36
|
+
if (itemCount > LOAN_DEVICE_MAX_BATCH) {
|
|
37
|
+
throw new Error(`El lote admite hasta ${LOAN_DEVICE_MAX_BATCH} ítems y llegaron ${itemCount}`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
33
40
|
async enroll(input, tenantId) {
|
|
34
41
|
const url = `${this.baseUrl}/private/devices/enroll?tenantId=${encodeURIComponent(tenantId)}`;
|
|
35
42
|
return await this.httpRequest.post(url, input);
|
|
@@ -54,6 +61,16 @@ let LoanCreditDeviceApi = class LoanCreditDeviceApi {
|
|
|
54
61
|
const url = `${this.baseUrl}/private/devices/manual-unlock?tenantId=${encodeURIComponent(tenantId)}`;
|
|
55
62
|
return await this.httpRequest.post(url, input);
|
|
56
63
|
}
|
|
64
|
+
async notify(input, tenantId) {
|
|
65
|
+
this.assertBatchSize(input.items.length);
|
|
66
|
+
const url = `${this.baseUrl}/private/devices/notify?tenantId=${encodeURIComponent(tenantId)}`;
|
|
67
|
+
return await this.httpRequest.post(url, input);
|
|
68
|
+
}
|
|
69
|
+
async release(input, tenantId) {
|
|
70
|
+
this.assertBatchSize(input.items.length);
|
|
71
|
+
const url = `${this.baseUrl}/private/devices/release?tenantId=${encodeURIComponent(tenantId)}`;
|
|
72
|
+
return await this.httpRequest.post(url, input);
|
|
73
|
+
}
|
|
57
74
|
};
|
|
58
75
|
LoanCreditDeviceApi = __decorate([
|
|
59
76
|
injectable(),
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import { LoanDeviceEnrollRequest, LoanDeviceEnrollResponse, LoanDeviceEnrollStatusRequest, LoanDeviceEnrollStatusResponse, LoanDeviceLastSeenRequest, LoanDeviceLastSeenResponse, LoanDeviceManualLockRequest, LoanDeviceManualLockResponse, LoanDeviceManualUnlockRequest, LoanDeviceManualUnlockResponse, LoanDeviceStatusRequest, LoanDeviceStatusResponse } from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
2
|
+
import { LoanDeviceEnrollRequest, LoanDeviceEnrollResponse, LoanDeviceEnrollStatusRequest, LoanDeviceEnrollStatusResponse, LoanDeviceLastSeenRequest, LoanDeviceLastSeenResponse, LoanDeviceManualLockRequest, LoanDeviceManualLockResponse, LoanDeviceManualUnlockRequest, LoanDeviceManualUnlockResponse, LoanDeviceNotifyRequest, LoanDeviceNotifyResponse, LoanDeviceReleaseRequest, LoanDeviceReleaseResponse, LoanDeviceStatusRequest, LoanDeviceStatusResponse } from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
3
3
|
/**
|
|
4
4
|
* Contrato del publisher de dispositivo/MDM de `loan-credit-business` (componente 09 SureKeep F2).
|
|
5
|
-
* Endpoints PRIVADOS (VPC) que envuelven al motor MDM: enrolamiento del equipo, consulta de estado
|
|
6
|
-
*
|
|
5
|
+
* Endpoints PRIVADOS (VPC) que envuelven al motor MDM: enrolamiento del equipo, consulta de estado,
|
|
6
|
+
* bloqueo/desbloqueo manual, aviso de cobranza y liberación definitiva. El contrato de crédito vive
|
|
7
|
+
* en `ILoanCreditBusinessApi`.
|
|
7
8
|
*
|
|
8
9
|
* Convenciones (idénticas a `ILoanCreditBusinessApi`):
|
|
9
10
|
* - `tenantId` OBLIGATORIO en todos los métodos — viaja por query `?tenantId=` (convención de los
|
|
@@ -12,9 +13,12 @@ import { LoanDeviceEnrollRequest, LoanDeviceEnrollResponse, LoanDeviceEnrollStat
|
|
|
12
13
|
* - Errores de transporte (falla el lambda entero, no un ítem): el publisher RECHAZA con el
|
|
13
14
|
* `DomainError` tipado del motor — `400 UNKNOWN_TENANT` / `400` de validación del body /
|
|
14
15
|
* `5xx` del motor. Nunca fallback: el caller jamás recibe un batch vacío disfrazado de éxito.
|
|
15
|
-
* -
|
|
16
|
-
*
|
|
17
|
-
*
|
|
16
|
+
* - Techo de lote: `notify` y `release` cortan acá el lote de más de `LOAN_DEVICE_MAX_BATCH` ítems,
|
|
17
|
+
* sin salir a la red. DEUDA: los otros seis mandan el body tal cual y devuelven el 400 del
|
|
18
|
+
* destino, que valida el mismo techo — dos formas de error para la misma causa.
|
|
19
|
+
* - Idempotencia: las mutaciones (`enroll`, `manualLock`, `manualUnlock`, `notify`, `release`) son
|
|
20
|
+
* idempotentes por `input.operationReference` — es el idempotencyKey del caller. Reintentar el
|
|
21
|
+
* mismo lote con la misma referencia no repite la operación; sin ella un retry tras timeout duplica.
|
|
18
22
|
*
|
|
19
23
|
* Granularidad POR ÍTEM — el batch NUNCA falla entero:
|
|
20
24
|
* - Cada `results[i]` trae su propio `status` (`SUCCESS` | `PENDING` | `ERROR`) y un `error`
|
|
@@ -52,6 +56,30 @@ export interface ILoanCreditDeviceApi {
|
|
|
52
56
|
getLastSeen(input: LoanDeviceLastSeenRequest, tenantId: string): Promise<StandardResponse<LoanDeviceLastSeenResponse>>;
|
|
53
57
|
/** Bloqueo manual del dispositivo disparado desde el backoffice (acción de un operador). */
|
|
54
58
|
manualLock(input: LoanDeviceManualLockRequest, tenantId: string): Promise<StandardResponse<LoanDeviceManualLockResponse>>;
|
|
55
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Desbloqueo manual del dispositivo disparado desde el backoffice (acción de un operador).
|
|
61
|
+
*
|
|
62
|
+
* ⚠️ El `unlockUntil` del ítem solo aplica en modo `SCHEDULED` y HOY `loan-credit-business` no
|
|
63
|
+
* lo lee: su `IDeviceControlService.manualUnlock` recibe `{ creditId }` y lo descarta en silencio.
|
|
64
|
+
*/
|
|
56
65
|
manualUnlock(input: LoanDeviceManualUnlockRequest, tenantId: string): Promise<StandardResponse<LoanDeviceManualUnlockResponse>>;
|
|
66
|
+
/**
|
|
67
|
+
* Manda al dispositivo el aviso de cobranza (banner o pantalla completa) sin bloquearlo.
|
|
68
|
+
*
|
|
69
|
+
* ⚠️ `loan-credit-business` TODAVÍA NO publica esta ruta: no está en su `openapi/private.yaml`
|
|
70
|
+
* ni en su `PrivateController`. Cablear un consumer antes de ese deploy devuelve 403/404.
|
|
71
|
+
*
|
|
72
|
+
* @throws Error si el lote supera `LOAN_DEVICE_MAX_BATCH` ítems (se corta acá, sin salir a la red).
|
|
73
|
+
*/
|
|
74
|
+
notify(input: LoanDeviceNotifyRequest, tenantId: string): Promise<StandardResponse<LoanDeviceNotifyResponse>>;
|
|
75
|
+
/**
|
|
76
|
+
* Libera el dispositivo del MDM de forma DEFINITIVA (crédito liquidado o castigado contablemente).
|
|
77
|
+
* No es un desbloqueo: saca el equipo del control del proveedor y no se revierte con `manualLock`.
|
|
78
|
+
*
|
|
79
|
+
* ⚠️ `loan-credit-business` TODAVÍA NO publica esta ruta: no está en su `openapi/private.yaml`
|
|
80
|
+
* ni en su `PrivateController`. Cablear un consumer antes de ese deploy devuelve 403/404.
|
|
81
|
+
*
|
|
82
|
+
* @throws Error si el lote supera `LOAN_DEVICE_MAX_BATCH` ítems (se corta acá, sin salir a la red).
|
|
83
|
+
*/
|
|
84
|
+
release(input: LoanDeviceReleaseRequest, tenantId: string): Promise<StandardResponse<LoanDeviceReleaseResponse>>;
|
|
57
85
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
3
|
-
import {
|
|
3
|
+
import type { ValidateProductResponse } from "@fiado/type-kit/bin/retailCatalog/index.js";
|
|
4
|
+
import { IRetailCatalogBusinessApi, ProductsByRetailersResponse, ReleaseReservationBody, ReserveInventoryBody, ReserveInventoryResult, SellInventoryBody, StoreCatalogItem } from "./interfaces/IRetailCatalogBusinessApi.js";
|
|
4
5
|
/**
|
|
5
6
|
* Publisher HTTP del lambda `retail-catalog-business` (SureKeep Fase 1, pista Retail) para sus
|
|
6
7
|
* endpoints privados del ciclo de venta del IMEI. Contrato y semántica completos →
|
|
@@ -20,7 +21,7 @@ export default class RetailCatalogBusinessApi implements IRetailCatalogBusinessA
|
|
|
20
21
|
constructor(httpRequest: IHttpRequest);
|
|
21
22
|
private tenantHeader;
|
|
22
23
|
getStoreCatalog(storeId: string, issuer: string): Promise<StandardResponse<StoreCatalogItem[]>>;
|
|
23
|
-
|
|
24
|
+
validateProduct(retailerId: string, sku: string, issuer: string): Promise<StandardResponse<ValidateProductResponse>>;
|
|
24
25
|
getProductsByRetailers(retailerIds: string[], tenantId: string): Promise<StandardResponse<ProductsByRetailersResponse>>;
|
|
25
26
|
reserveInventory(imei: string, body: ReserveInventoryBody, issuer: string): Promise<StandardResponse<ReserveInventoryResult>>;
|
|
26
27
|
sellInventory(imei: string, body: SellInventoryBody, issuer: string): Promise<StandardResponse<void>>;
|
|
@@ -11,7 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
13
|
import { inject, injectable } from "inversify";
|
|
14
|
-
import {
|
|
14
|
+
import { RETAILER_PRODUCTS_BATCH_MAX, } from "./interfaces/IRetailCatalogBusinessApi.js";
|
|
15
15
|
/** Header por el que el destino resuelve el silo (issuer Cognito forwardeado por el caller). */
|
|
16
16
|
const TENANT_ISSUER_HEADER = "x-tenant-issuer";
|
|
17
17
|
/**
|
|
@@ -41,15 +41,9 @@ let RetailCatalogBusinessApi = class RetailCatalogBusinessApi {
|
|
|
41
41
|
const url = `${this.baseUrl}/private/stores/${encodeURIComponent(storeId)}/catalog`;
|
|
42
42
|
return await this.httpRequest.get(url, undefined, this.tenantHeader(issuer));
|
|
43
43
|
}
|
|
44
|
-
async
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
throw new Error(`El lote admite hasta ${IMEI_PRODUCT_BATCH_MAX} IMEIs y llegaron ${imeis.length}`);
|
|
48
|
-
}
|
|
49
|
-
// `URLSearchParams` codifica la coma del separador; el destino hace `split(',')` sobre el
|
|
50
|
-
// valor ya decodificado por API Gateway.
|
|
51
|
-
const query = new URLSearchParams({ imeis: imeis.join(","), tenantId });
|
|
52
|
-
return await this.httpRequest.get(`${this.baseUrl}/private/products/by-imei?${query.toString()}`);
|
|
44
|
+
async validateProduct(retailerId, sku, issuer) {
|
|
45
|
+
const path = `${encodeURIComponent(retailerId)}/${encodeURIComponent(sku)}`;
|
|
46
|
+
return await this.httpRequest.get(`${this.baseUrl}/private/products/${path}`, undefined, this.tenantHeader(issuer));
|
|
53
47
|
}
|
|
54
48
|
async getProductsByRetailers(retailerIds, tenantId) {
|
|
55
49
|
// Se corta aquí: mandar un lote que el destino va a rechazar solo gasta un round-trip.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import type { MdmLockModeEnum, MdmProviderEnum } from "@fiado/type-kit/bin/retailCatalog/index.js";
|
|
2
|
+
import type { MdmLockModeEnum, MdmProviderEnum, ValidateProductResponse } from "@fiado/type-kit/bin/retailCatalog/index.js";
|
|
3
3
|
/**
|
|
4
4
|
* Contrato del publisher HTTP del lambda `retail-catalog-business` (SureKeep Fase 1, pista Retail)
|
|
5
5
|
* para sus endpoints privados del ciclo de venta del IMEI, consumidos por el wizard F2.
|
|
@@ -7,15 +7,15 @@ import type { MdmLockModeEnum, MdmProviderEnum } from "@fiado/type-kit/bin/retai
|
|
|
7
7
|
* ─────────────────────────────────────────────────────────────────────────────
|
|
8
8
|
* TENANT — DOS convenciones conviven acá. Mirá la firma de cada método.
|
|
9
9
|
* ─────────────────────────────────────────────────────────────────────────────
|
|
10
|
-
*
|
|
10
|
+
* Todos los métodos menos `getProductsByRetailers` toman `issuer` y lo mandan en el header
|
|
11
11
|
* `x-tenant-issuer` (`PrivateController.issuerFromHeader` → `TenantContextService.withContext`).
|
|
12
|
-
* `
|
|
12
|
+
* `getProductsByRetailers` toma `tenantId` y lo manda por `?tenantId=`
|
|
13
13
|
* (→ `TenantContextService.withContextByTenantId`), porque su consumidor es un backoffice que no
|
|
14
14
|
* tiene el issuer Cognito. Los privados son `Feature.ANONIMUS` (sin RBAC; la protección es la red
|
|
15
15
|
* VPC), así que el caller DEBE declarar uno de los dos — no hay default.
|
|
16
16
|
*
|
|
17
|
-
* TD: converger los
|
|
18
|
-
*
|
|
17
|
+
* TD: converger los que van por header a `?tenantId=`, el camino canónico para service-to-service
|
|
18
|
+
* (TD-014 del destino). No se migran acá para no romper al wizard, que ya consume el header.
|
|
19
19
|
*
|
|
20
20
|
* ⚠️ Retorno `StandardResponse<T>` — el consumer lee `result.data`, NO `result.body`.
|
|
21
21
|
* Errores: el destino lanza `DomainError` tipado → el publisher RECHAZA (no devuelve null); cada
|
|
@@ -58,28 +58,6 @@ export interface StoreCatalogItem {
|
|
|
58
58
|
/** Modo de bloqueo pactado; `null` si el producto no lleva MDM. */
|
|
59
59
|
mdmLockMode: MdmLockModeEnum | null;
|
|
60
60
|
}
|
|
61
|
-
/** Techo de IMEIs por request del lote IMEI->producto. Lo declara y lo honra el destino. */
|
|
62
|
-
export declare const IMEI_PRODUCT_BATCH_MAX = 100;
|
|
63
|
-
/** Por que se pudo (o no) resolver el producto de un IMEI del lote. */
|
|
64
|
-
export type ImeiProductLookupStatus = "OK" | "NOT_FOUND" | "UNAVAILABLE" | "INVALID_ID";
|
|
65
|
-
/** Una entrada del lote IMEI->producto (espeja `ImeiProductLookupEntry` del destino). */
|
|
66
|
-
export interface ImeiProductLookupEntry {
|
|
67
|
-
imei: string;
|
|
68
|
-
/**
|
|
69
|
-
* `OK` trae sku/brand/model · `NOT_FOUND` el catalogo no llega al producto (dato POSITIVO) ·
|
|
70
|
-
* `UNAVAILABLE` no se pudo leer ese IMEI, reintentalo · `INVALID_ID` no tiene forma de IMEI.
|
|
71
|
-
*/
|
|
72
|
-
status: ImeiProductLookupStatus;
|
|
73
|
-
sku?: string;
|
|
74
|
-
/** Marca comercial (p. ej. "Apple"). Solo viene con `status: OK`. */
|
|
75
|
-
brand?: string;
|
|
76
|
-
/** Modelo (p. ej. "iPhone 15 Pro"). Solo viene con `status: OK`. */
|
|
77
|
-
model?: string;
|
|
78
|
-
}
|
|
79
|
-
/** Respuesta del lote: UNA entrada por IMEI pedido, en el MISMO orden. */
|
|
80
|
-
export interface ImeiProductLookupResponse {
|
|
81
|
-
items: ImeiProductLookupEntry[];
|
|
82
|
-
}
|
|
83
61
|
/** Techo de cadenas por request del lote cadena->catálogo. Lo declara y lo honra el destino. */
|
|
84
62
|
export declare const RETAILER_PRODUCTS_BATCH_MAX = 100;
|
|
85
63
|
/** Body de POST `/private/products/by-retailers`. */
|
|
@@ -126,29 +104,20 @@ export interface IRetailCatalogBusinessApi {
|
|
|
126
104
|
/** GET `/private/stores/{storeId}/catalog` — catálogo vendible (sku, imei, precio de contado, disponibilidad). */
|
|
127
105
|
getStoreCatalog(storeId: string, issuer: string): Promise<StandardResponse<StoreCatalogItem[]>>;
|
|
128
106
|
/**
|
|
129
|
-
* GET `/private/products/
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* ─────────────────────────────────────────────────────────────────────────────
|
|
133
|
-
* ⚠️ El tenant va por `?tenantId=`, NO por el header `x-tenant-issuer` del resto de este publisher.
|
|
134
|
-
* ─────────────────────────────────────────────────────────────────────────────
|
|
135
|
-
* El consumidor es un backoffice que solo tiene el `tenantId` de su contexto; el issuer Cognito
|
|
136
|
-
* no existe de su lado. El destino entra por `TenantContextService.withContextByTenantId`, con las
|
|
137
|
-
* mismas garantías (mismo diccionario, AssumeRole del silo, fail-closed sin tenant).
|
|
107
|
+
* GET `/private/products/{retailerId}/{sku}` — valida que el producto exista y devuelve su
|
|
108
|
+
* `status`, su `tier`, sus financieras elegibles y su política MDM.
|
|
138
109
|
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* repetidos se consultan una sola vez pero salen repetidos. Techo de `IMEI_PRODUCT_BATCH_MAX`
|
|
142
|
-
* IMEIs por request; el caller parte los lotes mayores.
|
|
110
|
+
* ⚠️ El tenant va en el header `x-tenant-issuer`, NO por `?tenantId=` — el destino lo resuelve
|
|
111
|
+
* con `issuerFromHeader` y su `openapi/private.yaml` no declara ningún parámetro de tenant.
|
|
143
112
|
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* Solo un fallo total del destino rechaza la promesa.
|
|
113
|
+
* La política MDM viaja completa cuando `mdmEnabled: true`; con `false`, `mdmProvider` y
|
|
114
|
+
* `mdmLockMode` vienen en `null` (invariante `validateMdmCoherence` del catálogo).
|
|
147
115
|
*
|
|
148
|
-
* @throws
|
|
149
|
-
* `400
|
|
116
|
+
* @throws `404 PRODUCT_NOT_FOUND` el producto no existe para esa cadena ·
|
|
117
|
+
* `400 UNKNOWN_TENANT` falta o no se reconoce el issuer ·
|
|
118
|
+
* `500 TENANT_ASSUME_ROLE_FAILED` fallo de infra del silo.
|
|
150
119
|
*/
|
|
151
|
-
|
|
120
|
+
validateProduct(retailerId: string, sku: string, issuer: string): Promise<StandardResponse<ValidateProductResponse>>;
|
|
152
121
|
/**
|
|
153
122
|
* POST `/private/products/by-retailers?tenantId=` — catálogo de productos de VARIAS cadenas en
|
|
154
123
|
* una sola llamada, para el consumidor que arma su vista con N cadenas y no quiere N requests.
|
|
@@ -156,8 +125,8 @@ export interface IRetailCatalogBusinessApi {
|
|
|
156
125
|
* ─────────────────────────────────────────────────────────────────────────────
|
|
157
126
|
* ⚠️ El tenant va por `?tenantId=`, NO por el header `x-tenant-issuer` del resto de este publisher.
|
|
158
127
|
* ─────────────────────────────────────────────────────────────────────────────
|
|
159
|
-
* Es obligatorio. El destino entra por `TenantContextService.withContextByTenantId`,
|
|
160
|
-
*
|
|
128
|
+
* Es obligatorio. El destino entra por `TenantContextService.withContextByTenantId`, con las
|
|
129
|
+
* mismas garantías (mismo diccionario, AssumeRole del silo, fail-closed sin tenant).
|
|
161
130
|
*
|
|
162
131
|
* ── El contrato del lote ────────────────────────────────────────────────────────────────────
|
|
163
132
|
* `retailerIds` no puede venir vacío, sin repetidos y con un techo de
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
/** Techo de IMEIs por request del lote IMEI->producto. Lo declara y lo honra el destino. */
|
|
2
|
-
export const IMEI_PRODUCT_BATCH_MAX = 100;
|
|
3
1
|
/** Techo de cadenas por request del lote cadena->catálogo. Lo declara y lo honra el destino. */
|
|
4
2
|
export const RETAILER_PRODUCTS_BATCH_MAX = 100;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.68.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",
|
|
@@ -2,6 +2,7 @@ import { inject, injectable } from "inversify";
|
|
|
2
2
|
import type { IHttpRequest } from "@fiado/http-client";
|
|
3
3
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
4
4
|
import {
|
|
5
|
+
LOAN_DEVICE_MAX_BATCH,
|
|
5
6
|
LoanDeviceEnrollRequest,
|
|
6
7
|
LoanDeviceEnrollResponse,
|
|
7
8
|
LoanDeviceEnrollStatusRequest,
|
|
@@ -12,6 +13,10 @@ import {
|
|
|
12
13
|
LoanDeviceManualLockResponse,
|
|
13
14
|
LoanDeviceManualUnlockRequest,
|
|
14
15
|
LoanDeviceManualUnlockResponse,
|
|
16
|
+
LoanDeviceNotifyRequest,
|
|
17
|
+
LoanDeviceNotifyResponse,
|
|
18
|
+
LoanDeviceReleaseRequest,
|
|
19
|
+
LoanDeviceReleaseResponse,
|
|
15
20
|
LoanDeviceStatusRequest,
|
|
16
21
|
LoanDeviceStatusResponse,
|
|
17
22
|
} from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
@@ -36,6 +41,13 @@ export default class LoanCreditDeviceApi implements ILoanCreditDeviceApi {
|
|
|
36
41
|
|
|
37
42
|
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {}
|
|
38
43
|
|
|
44
|
+
// Se corta aquí: mandar un lote que el destino va a rechazar solo gasta un round-trip.
|
|
45
|
+
private assertBatchSize(itemCount: number): void {
|
|
46
|
+
if (itemCount > LOAN_DEVICE_MAX_BATCH) {
|
|
47
|
+
throw new Error(`El lote admite hasta ${LOAN_DEVICE_MAX_BATCH} ítems y llegaron ${itemCount}`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
39
51
|
async enroll(
|
|
40
52
|
input: LoanDeviceEnrollRequest,
|
|
41
53
|
tenantId: string,
|
|
@@ -83,4 +95,22 @@ export default class LoanCreditDeviceApi implements ILoanCreditDeviceApi {
|
|
|
83
95
|
const url = `${this.baseUrl}/private/devices/manual-unlock?tenantId=${encodeURIComponent(tenantId)}`;
|
|
84
96
|
return await this.httpRequest.post(url, input);
|
|
85
97
|
}
|
|
98
|
+
|
|
99
|
+
async notify(
|
|
100
|
+
input: LoanDeviceNotifyRequest,
|
|
101
|
+
tenantId: string,
|
|
102
|
+
): Promise<StandardResponse<LoanDeviceNotifyResponse>> {
|
|
103
|
+
this.assertBatchSize(input.items.length);
|
|
104
|
+
const url = `${this.baseUrl}/private/devices/notify?tenantId=${encodeURIComponent(tenantId)}`;
|
|
105
|
+
return await this.httpRequest.post(url, input);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
async release(
|
|
109
|
+
input: LoanDeviceReleaseRequest,
|
|
110
|
+
tenantId: string,
|
|
111
|
+
): Promise<StandardResponse<LoanDeviceReleaseResponse>> {
|
|
112
|
+
this.assertBatchSize(input.items.length);
|
|
113
|
+
const url = `${this.baseUrl}/private/devices/release?tenantId=${encodeURIComponent(tenantId)}`;
|
|
114
|
+
return await this.httpRequest.post(url, input);
|
|
115
|
+
}
|
|
86
116
|
}
|
|
@@ -10,14 +10,19 @@ import {
|
|
|
10
10
|
LoanDeviceManualLockResponse,
|
|
11
11
|
LoanDeviceManualUnlockRequest,
|
|
12
12
|
LoanDeviceManualUnlockResponse,
|
|
13
|
+
LoanDeviceNotifyRequest,
|
|
14
|
+
LoanDeviceNotifyResponse,
|
|
15
|
+
LoanDeviceReleaseRequest,
|
|
16
|
+
LoanDeviceReleaseResponse,
|
|
13
17
|
LoanDeviceStatusRequest,
|
|
14
18
|
LoanDeviceStatusResponse,
|
|
15
19
|
} from "@fiado/type-kit/bin/loanCredit/index.js";
|
|
16
20
|
|
|
17
21
|
/**
|
|
18
22
|
* Contrato del publisher de dispositivo/MDM de `loan-credit-business` (componente 09 SureKeep F2).
|
|
19
|
-
* Endpoints PRIVADOS (VPC) que envuelven al motor MDM: enrolamiento del equipo, consulta de estado
|
|
20
|
-
*
|
|
23
|
+
* Endpoints PRIVADOS (VPC) que envuelven al motor MDM: enrolamiento del equipo, consulta de estado,
|
|
24
|
+
* bloqueo/desbloqueo manual, aviso de cobranza y liberación definitiva. El contrato de crédito vive
|
|
25
|
+
* en `ILoanCreditBusinessApi`.
|
|
21
26
|
*
|
|
22
27
|
* Convenciones (idénticas a `ILoanCreditBusinessApi`):
|
|
23
28
|
* - `tenantId` OBLIGATORIO en todos los métodos — viaja por query `?tenantId=` (convención de los
|
|
@@ -26,9 +31,12 @@ import {
|
|
|
26
31
|
* - Errores de transporte (falla el lambda entero, no un ítem): el publisher RECHAZA con el
|
|
27
32
|
* `DomainError` tipado del motor — `400 UNKNOWN_TENANT` / `400` de validación del body /
|
|
28
33
|
* `5xx` del motor. Nunca fallback: el caller jamás recibe un batch vacío disfrazado de éxito.
|
|
29
|
-
* -
|
|
30
|
-
*
|
|
31
|
-
*
|
|
34
|
+
* - Techo de lote: `notify` y `release` cortan acá el lote de más de `LOAN_DEVICE_MAX_BATCH` ítems,
|
|
35
|
+
* sin salir a la red. DEUDA: los otros seis mandan el body tal cual y devuelven el 400 del
|
|
36
|
+
* destino, que valida el mismo techo — dos formas de error para la misma causa.
|
|
37
|
+
* - Idempotencia: las mutaciones (`enroll`, `manualLock`, `manualUnlock`, `notify`, `release`) son
|
|
38
|
+
* idempotentes por `input.operationReference` — es el idempotencyKey del caller. Reintentar el
|
|
39
|
+
* mismo lote con la misma referencia no repite la operación; sin ella un retry tras timeout duplica.
|
|
32
40
|
*
|
|
33
41
|
* Granularidad POR ÍTEM — el batch NUNCA falla entero:
|
|
34
42
|
* - Cada `results[i]` trae su propio `status` (`SUCCESS` | `PENDING` | `ERROR`) y un `error`
|
|
@@ -86,9 +94,41 @@ export interface ILoanCreditDeviceApi {
|
|
|
86
94
|
tenantId: string,
|
|
87
95
|
): Promise<StandardResponse<LoanDeviceManualLockResponse>>;
|
|
88
96
|
|
|
89
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* Desbloqueo manual del dispositivo disparado desde el backoffice (acción de un operador).
|
|
99
|
+
*
|
|
100
|
+
* ⚠️ El `unlockUntil` del ítem solo aplica en modo `SCHEDULED` y HOY `loan-credit-business` no
|
|
101
|
+
* lo lee: su `IDeviceControlService.manualUnlock` recibe `{ creditId }` y lo descarta en silencio.
|
|
102
|
+
*/
|
|
90
103
|
manualUnlock(
|
|
91
104
|
input: LoanDeviceManualUnlockRequest,
|
|
92
105
|
tenantId: string,
|
|
93
106
|
): Promise<StandardResponse<LoanDeviceManualUnlockResponse>>;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Manda al dispositivo el aviso de cobranza (banner o pantalla completa) sin bloquearlo.
|
|
110
|
+
*
|
|
111
|
+
* ⚠️ `loan-credit-business` TODAVÍA NO publica esta ruta: no está en su `openapi/private.yaml`
|
|
112
|
+
* ni en su `PrivateController`. Cablear un consumer antes de ese deploy devuelve 403/404.
|
|
113
|
+
*
|
|
114
|
+
* @throws Error si el lote supera `LOAN_DEVICE_MAX_BATCH` ítems (se corta acá, sin salir a la red).
|
|
115
|
+
*/
|
|
116
|
+
notify(
|
|
117
|
+
input: LoanDeviceNotifyRequest,
|
|
118
|
+
tenantId: string,
|
|
119
|
+
): Promise<StandardResponse<LoanDeviceNotifyResponse>>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Libera el dispositivo del MDM de forma DEFINITIVA (crédito liquidado o castigado contablemente).
|
|
123
|
+
* No es un desbloqueo: saca el equipo del control del proveedor y no se revierte con `manualLock`.
|
|
124
|
+
*
|
|
125
|
+
* ⚠️ `loan-credit-business` TODAVÍA NO publica esta ruta: no está en su `openapi/private.yaml`
|
|
126
|
+
* ni en su `PrivateController`. Cablear un consumer antes de ese deploy devuelve 403/404.
|
|
127
|
+
*
|
|
128
|
+
* @throws Error si el lote supera `LOAN_DEVICE_MAX_BATCH` ítems (se corta acá, sin salir a la red).
|
|
129
|
+
*/
|
|
130
|
+
release(
|
|
131
|
+
input: LoanDeviceReleaseRequest,
|
|
132
|
+
tenantId: string,
|
|
133
|
+
): Promise<StandardResponse<LoanDeviceReleaseResponse>>;
|
|
94
134
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { inject, injectable } from "inversify";
|
|
2
2
|
import type { IHttpRequest } from "@fiado/http-client";
|
|
3
3
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
4
|
+
import type { ValidateProductResponse } from "@fiado/type-kit/bin/retailCatalog/index.js";
|
|
4
5
|
import {
|
|
5
|
-
IMEI_PRODUCT_BATCH_MAX,
|
|
6
|
-
ImeiProductLookupResponse,
|
|
7
6
|
IRetailCatalogBusinessApi,
|
|
8
7
|
ProductsByRetailersBody,
|
|
9
8
|
ProductsByRetailersResponse,
|
|
@@ -47,18 +46,17 @@ export default class RetailCatalogBusinessApi implements IRetailCatalogBusinessA
|
|
|
47
46
|
return await this.httpRequest.get(url, undefined, this.tenantHeader(issuer));
|
|
48
47
|
}
|
|
49
48
|
|
|
50
|
-
async
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return await this.httpRequest.get(`${this.baseUrl}/private/products/by-imei?${query.toString()}`);
|
|
49
|
+
async validateProduct(
|
|
50
|
+
retailerId: string,
|
|
51
|
+
sku: string,
|
|
52
|
+
issuer: string,
|
|
53
|
+
): Promise<StandardResponse<ValidateProductResponse>> {
|
|
54
|
+
const path = `${encodeURIComponent(retailerId)}/${encodeURIComponent(sku)}`;
|
|
55
|
+
return await this.httpRequest.get(
|
|
56
|
+
`${this.baseUrl}/private/products/${path}`,
|
|
57
|
+
undefined,
|
|
58
|
+
this.tenantHeader(issuer),
|
|
59
|
+
);
|
|
62
60
|
}
|
|
63
61
|
|
|
64
62
|
async getProductsByRetailers(
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
MdmLockModeEnum,
|
|
4
|
+
MdmProviderEnum,
|
|
5
|
+
ValidateProductResponse,
|
|
6
|
+
} from "@fiado/type-kit/bin/retailCatalog/index.js";
|
|
3
7
|
|
|
4
8
|
/**
|
|
5
9
|
* Contrato del publisher HTTP del lambda `retail-catalog-business` (SureKeep Fase 1, pista Retail)
|
|
@@ -8,15 +12,15 @@ import type { MdmLockModeEnum, MdmProviderEnum } from "@fiado/type-kit/bin/retai
|
|
|
8
12
|
* ─────────────────────────────────────────────────────────────────────────────
|
|
9
13
|
* TENANT — DOS convenciones conviven acá. Mirá la firma de cada método.
|
|
10
14
|
* ─────────────────────────────────────────────────────────────────────────────
|
|
11
|
-
*
|
|
15
|
+
* Todos los métodos menos `getProductsByRetailers` toman `issuer` y lo mandan en el header
|
|
12
16
|
* `x-tenant-issuer` (`PrivateController.issuerFromHeader` → `TenantContextService.withContext`).
|
|
13
|
-
* `
|
|
17
|
+
* `getProductsByRetailers` toma `tenantId` y lo manda por `?tenantId=`
|
|
14
18
|
* (→ `TenantContextService.withContextByTenantId`), porque su consumidor es un backoffice que no
|
|
15
19
|
* tiene el issuer Cognito. Los privados son `Feature.ANONIMUS` (sin RBAC; la protección es la red
|
|
16
20
|
* VPC), así que el caller DEBE declarar uno de los dos — no hay default.
|
|
17
21
|
*
|
|
18
|
-
* TD: converger los
|
|
19
|
-
*
|
|
22
|
+
* TD: converger los que van por header a `?tenantId=`, el camino canónico para service-to-service
|
|
23
|
+
* (TD-014 del destino). No se migran acá para no romper al wizard, que ya consume el header.
|
|
20
24
|
*
|
|
21
25
|
* ⚠️ Retorno `StandardResponse<T>` — el consumer lee `result.data`, NO `result.body`.
|
|
22
26
|
* Errores: el destino lanza `DomainError` tipado → el publisher RECHAZA (no devuelve null); cada
|
|
@@ -67,32 +71,6 @@ export interface StoreCatalogItem {
|
|
|
67
71
|
mdmLockMode: MdmLockModeEnum | null;
|
|
68
72
|
}
|
|
69
73
|
|
|
70
|
-
/** Techo de IMEIs por request del lote IMEI->producto. Lo declara y lo honra el destino. */
|
|
71
|
-
export const IMEI_PRODUCT_BATCH_MAX = 100;
|
|
72
|
-
|
|
73
|
-
/** Por que se pudo (o no) resolver el producto de un IMEI del lote. */
|
|
74
|
-
export type ImeiProductLookupStatus = "OK" | "NOT_FOUND" | "UNAVAILABLE" | "INVALID_ID";
|
|
75
|
-
|
|
76
|
-
/** Una entrada del lote IMEI->producto (espeja `ImeiProductLookupEntry` del destino). */
|
|
77
|
-
export interface ImeiProductLookupEntry {
|
|
78
|
-
imei: string;
|
|
79
|
-
/**
|
|
80
|
-
* `OK` trae sku/brand/model · `NOT_FOUND` el catalogo no llega al producto (dato POSITIVO) ·
|
|
81
|
-
* `UNAVAILABLE` no se pudo leer ese IMEI, reintentalo · `INVALID_ID` no tiene forma de IMEI.
|
|
82
|
-
*/
|
|
83
|
-
status: ImeiProductLookupStatus;
|
|
84
|
-
sku?: string;
|
|
85
|
-
/** Marca comercial (p. ej. "Apple"). Solo viene con `status: OK`. */
|
|
86
|
-
brand?: string;
|
|
87
|
-
/** Modelo (p. ej. "iPhone 15 Pro"). Solo viene con `status: OK`. */
|
|
88
|
-
model?: string;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/** Respuesta del lote: UNA entrada por IMEI pedido, en el MISMO orden. */
|
|
92
|
-
export interface ImeiProductLookupResponse {
|
|
93
|
-
items: ImeiProductLookupEntry[];
|
|
94
|
-
}
|
|
95
|
-
|
|
96
74
|
/** Techo de cadenas por request del lote cadena->catálogo. Lo declara y lo honra el destino. */
|
|
97
75
|
export const RETAILER_PRODUCTS_BATCH_MAX = 100;
|
|
98
76
|
|
|
@@ -148,29 +126,24 @@ export interface IRetailCatalogBusinessApi {
|
|
|
148
126
|
getStoreCatalog(storeId: string, issuer: string): Promise<StandardResponse<StoreCatalogItem[]>>;
|
|
149
127
|
|
|
150
128
|
/**
|
|
151
|
-
* GET `/private/products/
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* ─────────────────────────────────────────────────────────────────────────────
|
|
155
|
-
* ⚠️ El tenant va por `?tenantId=`, NO por el header `x-tenant-issuer` del resto de este publisher.
|
|
156
|
-
* ─────────────────────────────────────────────────────────────────────────────
|
|
157
|
-
* El consumidor es un backoffice que solo tiene el `tenantId` de su contexto; el issuer Cognito
|
|
158
|
-
* no existe de su lado. El destino entra por `TenantContextService.withContextByTenantId`, con las
|
|
159
|
-
* mismas garantías (mismo diccionario, AssumeRole del silo, fail-closed sin tenant).
|
|
129
|
+
* GET `/private/products/{retailerId}/{sku}` — valida que el producto exista y devuelve su
|
|
130
|
+
* `status`, su `tier`, sus financieras elegibles y su política MDM.
|
|
160
131
|
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* repetidos se consultan una sola vez pero salen repetidos. Techo de `IMEI_PRODUCT_BATCH_MAX`
|
|
164
|
-
* IMEIs por request; el caller parte los lotes mayores.
|
|
132
|
+
* ⚠️ El tenant va en el header `x-tenant-issuer`, NO por `?tenantId=` — el destino lo resuelve
|
|
133
|
+
* con `issuerFromHeader` y su `openapi/private.yaml` no declara ningún parámetro de tenant.
|
|
165
134
|
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* Solo un fallo total del destino rechaza la promesa.
|
|
135
|
+
* La política MDM viaja completa cuando `mdmEnabled: true`; con `false`, `mdmProvider` y
|
|
136
|
+
* `mdmLockMode` vienen en `null` (invariante `validateMdmCoherence` del catálogo).
|
|
169
137
|
*
|
|
170
|
-
* @throws
|
|
171
|
-
* `400
|
|
138
|
+
* @throws `404 PRODUCT_NOT_FOUND` el producto no existe para esa cadena ·
|
|
139
|
+
* `400 UNKNOWN_TENANT` falta o no se reconoce el issuer ·
|
|
140
|
+
* `500 TENANT_ASSUME_ROLE_FAILED` fallo de infra del silo.
|
|
172
141
|
*/
|
|
173
|
-
|
|
142
|
+
validateProduct(
|
|
143
|
+
retailerId: string,
|
|
144
|
+
sku: string,
|
|
145
|
+
issuer: string,
|
|
146
|
+
): Promise<StandardResponse<ValidateProductResponse>>;
|
|
174
147
|
|
|
175
148
|
/**
|
|
176
149
|
* POST `/private/products/by-retailers?tenantId=` — catálogo de productos de VARIAS cadenas en
|
|
@@ -179,8 +152,8 @@ export interface IRetailCatalogBusinessApi {
|
|
|
179
152
|
* ─────────────────────────────────────────────────────────────────────────────
|
|
180
153
|
* ⚠️ El tenant va por `?tenantId=`, NO por el header `x-tenant-issuer` del resto de este publisher.
|
|
181
154
|
* ─────────────────────────────────────────────────────────────────────────────
|
|
182
|
-
* Es obligatorio. El destino entra por `TenantContextService.withContextByTenantId`,
|
|
183
|
-
*
|
|
155
|
+
* Es obligatorio. El destino entra por `TenantContextService.withContextByTenantId`, con las
|
|
156
|
+
* mismas garantías (mismo diccionario, AssumeRole del silo, fail-closed sin tenant).
|
|
184
157
|
*
|
|
185
158
|
* ── El contrato del lote ────────────────────────────────────────────────────────────────────
|
|
186
159
|
* `retailerIds` no puede venir vacío, sin repetidos y con un techo de
|