Gateways
Purpose
The Gateways collection defines the structure of gateways used to group and expose catalogues.
Its purpose is to link one or more catalogues to a specific gateway (e.g., roadshow events, branded experiences).
Document schema
{
"list_catalogues": ["string"],
"nameGateway": "string"
}
Indexes
- list_catalogues is a
[]ofstrings that refer to the IDs of theCataloguescollection
Query examples
// Fetch the Reference Doc from Firebase
const gatewayRefDoc = doc(db, "Gateways", gatewayId);
// Get the Document Snapshot from the Reference Doc
const gatewayRefSnap = await getDoc(gatewayRefDoc);
// Query gateways by catalogue reference
const gatewaysByCatalogue = query(
collection(db, "Gateways"),
where("list_catalogues", "array-contains", catalogueId)
);