Skip to main content
Version: 1.0.0

PrivacyPolicy

Purpose​

The PrivacyPolicy collection defines the structure of privacy policy documents in different languages.
Its purpose is to store and version privacy information, both in English and Italian, that will be displayed in the ARShades application.

Document schema​

{
"privacy_policy": [
{
"paragrafo": "string",
"titolo": "string"
}
],
"privacy_policy_it": [
{
"paragrafo": "string",
"titolo": "string"
}
],
"privacy_version": "number"
}

Indexes​

  • privacy_version → used to fetch the latest version of the Privacy Policy
  • privacy_policy / privacy_policy_it → structured arrays containing sections of the document

Query examples​

// Fetch the Reference Doc from Firebase
const privacyPolicyRefDoc = doc(db, "PrivacyPolicy", privacyId);

// Get the Document Snapshot from the Reference Doc
const privacyPolicyRefSnap = await getDoc(privacyPolicyRefDoc);

// Query the latest privacy policy version
const latestPrivacyPolicy = query(
collection(db, "PrivacyPolicy"),
orderBy("privacy_version", "desc"),
limit(1)
);