offer.where
Ofrece las entradas del catálogo que cumplen tus condiciones.
Firma
offer.where(where: ContentWhere, opts?: { maxItems?: number; flag?: { by: string; map: Record<string, string> } }): ContentOfferParámetros
| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
where | ContentWhere | Obligatorio | Las condiciones de campo que debe cumplir una entrada. |
opts | { maxItems?: number; flag?: { by: string; map: Record<string, string> } } | Opcional | Ajustes adicionales, como maxItems para el máximo de entradas ofrecidas. |
Devuelve
ContentOffer La oferta, para pasarla a list.add o list.addRow.
Ejemplo
list.add(self, "pack", trinket, offer.where({ weight: { lte: 3 } }));
