{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lenius-app/json-schema/lenius-app-store-sync-response-schema.json",
  "title": "StoreSyncResponse",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lenius-app-openapi.json#/components/schemas/StoreSyncResponse",
  "type": "object",
  "required": [
    "store",
    "storeCategories",
    "createdStoreCategoryNames"
  ],
  "properties": {
    "store": {
      "$ref": "#/$defs/Store"
    },
    "storeCategories": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/StoreCategoryReference"
      }
    },
    "createdStoreCategoryNames": {
      "type": "array",
      "description": "Kategorier der blev oprettet under denne synkronisering.",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "Store": {
      "type": "object",
      "required": [
        "id",
        "slug",
        "name",
        "description",
        "storeCategoryGroup",
        "street",
        "postalCode",
        "city",
        "latitude",
        "longitude",
        "acceptingOrders"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "storeCategoryGroup": {
          "$ref": "#/$defs/StoreCategoryGroup",
          "nullable": true
        },
        "teaser": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        },
        "phone": {
          "type": [
            "string",
            "null"
          ]
        },
        "cvr": {
          "type": [
            "string",
            "null"
          ]
        },
        "imageUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "imageVariants": {
          "$ref": "#/$defs/StoreImageVariants",
          "nullable": true
        },
        "images": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StoreImage"
          }
        },
        "logoUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "logoVariants": {
          "$ref": "#/$defs/StoreImageVariants",
          "nullable": true
        },
        "facebookUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "instagramUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "trustPilotUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "googleReviewUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "orderUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "woltUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "leniusUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "smileyUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "street": {
          "type": "string"
        },
        "postalCode": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "latitude": {
          "type": "number",
          "format": "double"
        },
        "longitude": {
          "type": "number",
          "format": "double"
        },
        "ratingAverage": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "partnerStore": {
          "type": "boolean"
        },
        "acceptingOrders": {
          "type": "boolean"
        }
      }
    },
    "StoreCategoryGroup": {
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "StoreCategoryReference": {
      "type": "object",
      "required": [
        "id",
        "name",
        "backgroundColor"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "backgroundColor": {
          "type": "string",
          "pattern": "^#[0-9A-Fa-f]{6}$"
        }
      }
    },
    "StoreImage": {
      "type": "object",
      "required": [
        "url",
        "variants"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "variants": {
          "$ref": "#/$defs/StoreImageVariants",
          "nullable": true
        }
      }
    },
    "StoreImageVariants": {
      "type": "object",
      "required": [
        "mobile",
        "desktop"
      ],
      "properties": {
        "mobile": {
          "type": "string",
          "format": "uri",
          "description": "URL til mobilvariant"
        },
        "desktop": {
          "type": "string",
          "format": "uri",
          "description": "URL til desktopvariant"
        }
      }
    }
  }
}