Skip to main content
Version: 1.0.0

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 [] of strings that refer to the IDs of the Catalogues collection

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)
);