offer.where
Offers the catalogue entries that match your conditions.
Signature
offer.where(where: ContentWhere, opts?: { maxItems?: number; flag?: { by: string; map: Record<string, string> } }): ContentOfferParameters
| Name | Type | Required | Description |
|---|---|---|---|
where | ContentWhere | Required | The field conditions an entry must meet. |
opts | { maxItems?: number; flag?: { by: string; map: Record<string, string> } } | Optional | Extra settings, such as maxItems for the most entries to offer. |
Returns
ContentOffer The offer, to pass to list.add or list.addRow.
Example
list.add(self, "pack", trinket, offer.where({ weight: { lte: 3 } }));
