{
    "schema": "https://json-schema.org/draft/2019-09/schema",
    "$id": "https://raw.githubusercontent.com/merokudao/dapp-store-registry/main/src/schemas/merokuDappStore.dAppStore.json",
    "title": "dApp Store Schema",
    "description": "A dApp store schema",
    "type": "object",
    "properties": {
        "githubId": {
            "description": "Who owns this dApp Store",
            "type": "string"
        },
        "featuredSections": {
            "type": "array",
            "description": "List of featured sections",
            "items": {
                "$ref": "merokuDappStore.featuredSchema.json"
            }
        },
        "storeId": {
            "description": "NFT ID of this dApp Store",
            "type": "string"
        },
        "key": {
            "description": "Unique ID of this dApp Store",
            "type": "string"
        },
        "name": {
            "description": "name of the dApp Store",
            "type": "string",
            "maxLength": 100
        },
        "description": {
            "description": "description of the dApp Store",
            "type": "string"
        },
        "minAge": {
            "type": "integer",
            "description": "The min age of user who should access this dApp Store",
            "exclusiveMinimum": 3
        },
        "isForMatureAudience": {
            "type": "boolean",
            "description": "Boolean to signify if the dApp Store is for mature audience"
        },
        "images": { "$ref": "merokuDappStore.dAppImagesSchema.json" },
        "cdn": {
            "images": { "$ref": "merokuDappStore.dAppImagesSchema.json" }
        },
        "geoRestrictions": {
            "type": "object",
            "description": "A list of countries where the dApp Store is available or unavailable. If this is not present, the dApp is available everywhere. If this is present, then one of either allowedCountries or blockedCountries should be present. If both are present, then the dApp is available in allowedCountries and unavailable in blockedCountries. The name of countries should be in ISO-3661-1 Alpha-2 Code.",
            "properties": {
                "allowedCountries": {
                    "type": "array",
                    "description": "A list of countries where the dApp Store is available",
                    "items": {
                        "type": "string"
                    }
                },
                "blockedCountries": {
                    "type": "array",
                    "description": "A list of countries where the dApp Store is unavailable",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "url": {
            "type": "string",
            "description": "The URL of the dApp Store",
            "format": "uri",
            "pattern": "^(https?|http?|ipfs?)://",
            "minLength": 1
        },
        "language": {
            "type": "array",
            "items": {
                "type": "string"
            },
            "minItems": 1,
            "description": "A string in ISO-639-1 which signifies the language of the dApp Store"
        },
        "tags": {
            "type": "array",
            "items": {
                "type": "string"
            },
            "minItems": 1,
            "uniqueItems": true
        },
        "whitelistedDAppIds": {
            "type": "array",
            "description": "List of dApp IDs that are listed in this store. The dApp IDs should be the same as the ones in the dApp Store's dApps list.",
            "items": {
                "type": "string"
            }
        },
        "bannedDAppIds": {
            "type": "array",
            "description": "List of dApp IDs that are banned in this store. The dApp IDs should be the same as the ones in the dApp Store's dApps list.",
            "items": {
                "type": "string"
            }
        },
        "category": {
            "type": "string",
            "description": "The category of the dApp store. You can assign one category to your dApp store. The category you select is particularly important for your dapp store's discoverability on the dApp Stores. This will be the category in which the dapp store appears when users browse the dApp Stores or filter search results, and it determines placement on the dApp stores tab or Games",
            "enum": [
                "games",
                "finance",
                "browsers",
                "wallets",
                "nft-social",
                "universal",
                "others"
            ]
        },
        "dappsEnrich": {
            "type": "array",
            "description": "List of a dapp with properties to change values for the dapp store",
            "items": {
                "$ref": "merokuDappStore.dAppEnrich.json"
            }
        },
        "external_url": {
            "type": "string",
            "description": "The URL of the dApp. This is used by OpenSea. This should be set to Meroku Protocol Explorer.",
            "format": "uri",
            "pattern": "^(https?|http?|ipfs?)://",
            "minLength": 1
        },
        "image": {
            "type": "string",
            "format": "uri",
            "pattern": "^(https?|http?|ipfs?)://",
            "minLength": 1,
            "description": "A URL to the logo of the dApp. Should be square and 512x512 in PNG format. Used by OpenSea. This should automatically be set to the app logo from images field."
        },
        "attributes": {
            "type": "array",
            "items": {
                "type": "object",
                "required": ["trait_type", "value"],
                "properties": {
                    "display_type": {
                        "type": "string",
                        "description": "The display type of the trait"
                    },
                    "trait_type": {
                        "type": "string",
                        "description": "The trait type of the trait"
                    },
                    "value": {
                        "type": "string",
                        "description": "The value of the trait type"
                    }
                }
            }
        },
        "developer": { "$ref": "merokuDappStore.developerSchema.json" },
        "isListed": {
            "type": "boolean",
            "description": "Boolean to signify if the dApp store is listed on the dApp store"
        },
        "listDate": {
            "type": "string",
            "format": "date",
            "description": "The date on which this dApp store is listed on dApp store. This date can be a future date as well. This can not be in past."
        }
    },
    "required": [
        "key",
        "storeId",
        "name",
        "description",
        "url",
        "language",
        "minAge",
        "isForMatureAudience",
        "isListed",
        "listDate",
        "category"
    ],
    "additionalProperties": false
}
