{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/damdafa-com/json-schema/damdafa-com-screenshot-group-schema.json",
  "title": "ScreenshotGroup",
  "description": "Represents a document in the 'screenshots' sub-collection.\nUsed for batching screens (e.g. \"Onboarding Flow\", \"Settings\").",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mockupper-damdafa-com-openapi.json#/components/schemas/ScreenshotGroup",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "title": {
      "type": "string",
      "title": "Title"
    },
    "screens": {
      "items": {
        "$ref": "#/$defs/MockupScreen"
      },
      "type": "array",
      "title": "Screens"
    },
    "versionId": {
      "type": "string",
      "title": "Versionid"
    },
    "projectId": {
      "type": "string",
      "title": "Projectid"
    },
    "outputSettings": {
      "anyOf": [
        {
          "$ref": "#/$defs/ScreenshotGroupOutputSettings"
        },
        {
          "type": "null"
        }
      ]
    },
    "selections": {
      "additionalProperties": {
        "additionalProperties": {
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/$defs/SpecialSelection"
              }
            ]
          },
          "propertyNames": {
            "$ref": "#/$defs/Platform"
          },
          "type": "object"
        },
        "type": "object"
      },
      "type": "object",
      "title": "Selections"
    },
    "mainLanguage": {
      "anyOf": [
        {
          "$ref": "#/$defs/MockupperLocale"
        },
        {
          "type": "null"
        }
      ],
      "default": "en-US"
    },
    "additionalLanguages": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/MockupperLocale"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Additionallanguages"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "title": "Createdat"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "title": "Updatedat"
    }
  },
  "type": "object",
  "required": [
    "id",
    "title",
    "versionId",
    "projectId",
    "createdAt",
    "updatedAt"
  ],
  "$defs": {
    "AspectRatio": {
      "type": "string",
      "enum": [
        "9:19.5",
        "3:4",
        "9:16",
        "16:9"
      ],
      "title": "AspectRatio",
      "description": "Centralized canvas defaults for preview rendering."
    },
    "BackendCanvasRenderSpec": {
      "properties": {
        "canvasSizePx": {
          "anyOf": [
            {
              "$ref": "#/$defs/PixelRect"
            },
            {
              "type": "null"
            }
          ]
        },
        "deviceRectPx": {
          "anyOf": [
            {
              "$ref": "#/$defs/PixelRect"
            },
            {
              "type": "null"
            }
          ]
        },
        "imageRectPx": {
          "anyOf": [
            {
              "$ref": "#/$defs/PixelRect"
            },
            {
              "type": "null"
            }
          ]
        },
        "screenViewportRectPx": {
          "anyOf": [
            {
              "$ref": "#/$defs/PixelRect"
            },
            {
              "type": "null"
            }
          ]
        },
        "screenViewportBorderRadiusPx": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Screenviewportborderradiuspx",
          "default": 0.0
        },
        "titleTextLayout": {
          "anyOf": [
            {
              "$ref": "#/$defs/TextLayoutSpecPx"
            },
            {
              "type": "null"
            }
          ]
        },
        "descriptionTextLayout": {
          "anyOf": [
            {
              "$ref": "#/$defs/TextLayoutSpecPx"
            },
            {
              "type": "null"
            }
          ]
        },
        "imageRotationDeg": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Imagerotationdeg",
          "default": 0.0
        },
        "imageBorderRadiusPx": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Imageborderradiuspx",
          "default": 0.0
        },
        "colorBorderEnabled": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Colorborderenabled",
          "default": false
        },
        "colorBorderWidth": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Colorborderwidth",
          "default": 10
        },
        "colorBorderColor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Colorbordercolor",
          "default": "auto"
        }
      },
      "type": "object",
      "title": "BackendCanvasRenderSpec",
      "description": "Backend-only render inputs for pixel-perfect rendering.\n\nThis is intentionally isolated from gesture/editor fields like imagePositionX/Y.\nThe client should persist absolute rectangles in a *known source canvas* coordinate space\n(typically the editor preview canvas). The backend will scale these rects up to the\ncanonical render output size."
    },
    "DevicePosition": {
      "type": "string",
      "enum": [
        "bottom",
        "bottomLeft",
        "bottomRight",
        "center",
        "left",
        "right",
        "top",
        "topLeft",
        "topRight"
      ],
      "title": "DevicePosition"
    },
    "DeviceTargetSize": {
      "properties": {
        "deviceId": {
          "type": "string",
          "title": "Deviceid"
        },
        "width": {
          "type": "integer",
          "title": "Width"
        },
        "height": {
          "type": "integer",
          "title": "Height"
        }
      },
      "type": "object",
      "required": [
        "deviceId",
        "width",
        "height"
      ],
      "title": "DeviceTargetSize"
    },
    "MagnifierSelection": {
      "properties": {
        "xRatio": {
          "type": "number",
          "title": "Xratio"
        },
        "yRatio": {
          "type": "number",
          "title": "Yratio"
        },
        "widthRatio": {
          "type": "number",
          "title": "Widthratio"
        },
        "heightRatio": {
          "type": "number",
          "title": "Heightratio"
        }
      },
      "type": "object",
      "required": [
        "xRatio",
        "yRatio",
        "widthRatio",
        "heightRatio"
      ],
      "title": "MagnifierSelection",
      "description": "Relative coordinates (0.0 to 1.0) defining a selected region on the entire canvas.\nUsed for magnifying part of the mockup for AI generation context."
    },
    "MockupScreen": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "imageUrl": {
          "type": "string",
          "title": "Imageurl"
        },
        "localizedImageUrls": {
          "anyOf": [
            {
              "additionalProperties": {
                "type": "string"
              },
              "propertyNames": {
                "$ref": "#/$defs/MockupperLocale"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Localizedimageurls"
        },
        "imagePositionX": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Imagepositionx"
        },
        "imagePositionY": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Imagepositiony"
        },
        "imageScale": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Imagescale"
        },
        "backendRenderSpec": {
          "anyOf": [
            {
              "$ref": "#/$defs/BackendCanvasRenderSpec"
            },
            {
              "type": "null"
            }
          ]
        },
        "localizedBackendRenderSpecs": {
          "anyOf": [
            {
              "additionalProperties": {
                "$ref": "#/$defs/BackendCanvasRenderSpec"
              },
              "propertyNames": {
                "$ref": "#/$defs/MockupperLocale"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Localizedbackendrenderspecs"
        },
        "title": {
          "anyOf": [
            {
              "$ref": "#/$defs/TextElement"
            },
            {
              "type": "null"
            }
          ]
        },
        "description": {
          "anyOf": [
            {
              "$ref": "#/$defs/TextElement"
            },
            {
              "type": "null"
            }
          ]
        },
        "aiInstructions": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Aiinstructions"
        },
        "magnifierSelection": {
          "anyOf": [
            {
              "$ref": "#/$defs/MagnifierSelection"
            },
            {
              "type": "null"
            }
          ]
        },
        "batteryFixEnabled": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Batteryfixenabled",
          "default": false
        },
        "designStyle": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Designstyle"
        },
        "skipGroupDeviceFrame": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Skipgroupdeviceframe"
        },
        "aspectRatio": {
          "$ref": "#/$defs/AspectRatio",
          "default": "9:19.5"
        },
        "devicePosition": {
          "anyOf": [
            {
              "$ref": "#/$defs/DevicePosition"
            },
            {
              "type": "null"
            }
          ]
        },
        "canvasRenderKey": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Canvasrenderkey"
        },
        "canvasRenderVersion": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Canvasrenderversion",
          "default": 1
        },
        "guideScreenshotIds": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Guidescreenshotids"
        },
        "aiAssetUrls": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Aiasseturls"
        },
        "createdAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Createdat"
        },
        "updatedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Updatedat"
        }
      },
      "type": "object",
      "required": [
        "id",
        "imageUrl"
      ],
      "title": "MockupScreen",
      "description": "Represents a single screen embedded within a ScreenshotGroup document.\nIdeally, a single group shouldn't exceed ~50-100 screens."
    },
    "MockupperLocale": {
      "type": "string",
      "enum": [
        "ar-SA",
        "ca",
        "cs",
        "da",
        "de-DE",
        "el",
        "en-AU",
        "en-CA",
        "en-GB",
        "en-US",
        "es-ES",
        "es-MX",
        "fi",
        "fr-CA",
        "fr-FR",
        "he",
        "hi",
        "hr",
        "hu",
        "id",
        "it",
        "ja",
        "ko",
        "ms",
        "nl-NL",
        "no",
        "pl",
        "pt-BR",
        "pt-PT",
        "ro",
        "ru",
        "sk",
        "sv",
        "th",
        "tr",
        "uk",
        "vi",
        "zh-Hans",
        "zh-Hant"
      ],
      "title": "MockupperLocale"
    },
    "PixelRect": {
      "properties": {
        "x": {
          "type": "number",
          "title": "X"
        },
        "y": {
          "type": "number",
          "title": "Y"
        },
        "width": {
          "type": "number",
          "title": "Width"
        },
        "height": {
          "type": "number",
          "title": "Height"
        }
      },
      "type": "object",
      "required": [
        "x",
        "y",
        "width",
        "height"
      ],
      "title": "PixelRect",
      "description": "Rectangle in absolute output pixels."
    },
    "Platform": {
      "type": "string",
      "enum": [
        "iphone",
        "ipad",
        "androidPhone",
        "androidTablet"
      ],
      "title": "Platform"
    },
    "PlatformConfig": {
      "properties": {
        "status": {
          "$ref": "#/$defs/PlatformStatus",
          "default": "active"
        },
        "targetSizes": {
          "items": {
            "$ref": "#/$defs/DeviceTargetSize"
          },
          "type": "array",
          "title": "Targetsizes"
        }
      },
      "type": "object",
      "title": "PlatformConfig",
      "description": "Configuration for platform outputs."
    },
    "PlatformStatus": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ],
      "title": "PlatformStatus"
    },
    "ScreenshotGroupOutputSettings": {
      "properties": {
        "deviceFrameId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Deviceframeid"
        },
        "platforms": {
          "additionalProperties": {
            "$ref": "#/$defs/PlatformConfig"
          },
          "propertyNames": {
            "$ref": "#/$defs/Platform"
          },
          "type": "object",
          "title": "Platforms"
        }
      },
      "type": "object",
      "title": "ScreenshotGroupOutputSettings",
      "description": "Output settings for a screenshot group.\nEmbedded directly in the ScreenshotGroup document."
    },
    "SpecialSelection": {
      "type": "string",
      "enum": [
        "raw"
      ],
      "title": "SpecialSelection",
      "description": "Special values for generation selections."
    },
    "TextAlign": {
      "type": "string",
      "enum": [
        "left",
        "center",
        "right"
      ],
      "title": "TextAlign"
    },
    "TextElement": {
      "properties": {
        "content": {
          "type": "string",
          "title": "Content"
        },
        "translations": {
          "additionalProperties": {
            "type": "string"
          },
          "propertyNames": {
            "$ref": "#/$defs/MockupperLocale"
          },
          "type": "object",
          "title": "Translations"
        },
        "layouts": {
          "additionalProperties": {
            "$ref": "#/$defs/TextElementLayout"
          },
          "propertyNames": {
            "$ref": "#/$defs/MockupperLocale"
          },
          "type": "object",
          "title": "Layouts"
        },
        "fontType": {
          "type": "string",
          "title": "Fonttype"
        },
        "color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Color"
        },
        "visible": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Visible",
          "default": true
        },
        "textAlign": {
          "anyOf": [
            {
              "$ref": "#/$defs/TextAlign"
            },
            {
              "type": "null"
            }
          ]
        },
        "fontSize": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fontsize"
        },
        "positionX": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Positionx"
        },
        "positionY": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Positiony"
        },
        "wrapperWidthPx": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Wrapperwidthpx"
        }
      },
      "type": "object",
      "required": [
        "content",
        "fontType"
      ],
      "title": "TextElement",
      "description": "Represents text on the canvas.\n- 'content': Holds the text for the ProjectVersion's 'mainLanguage'.\n- 'translations': Holds overrides for 'additionalLanguages' (key=locale code)."
    },
    "TextElementLayout": {
      "properties": {
        "fontSize": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fontsize"
        },
        "positionX": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Positionx"
        },
        "positionY": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Positiony"
        },
        "wrapperWidthPx": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Wrapperwidthpx"
        },
        "isManuallyAdjusted": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ismanuallyadjusted",
          "default": false
        }
      },
      "type": "object",
      "title": "TextElementLayout",
      "description": "Layout properties for a specific locale."
    },
    "TextLayoutSpecPx": {
      "properties": {
        "textRectPx": {
          "$ref": "#/$defs/PixelRect"
        },
        "lines": {
          "items": {
            "$ref": "#/$defs/TextLineLayoutPx"
          },
          "type": "array",
          "title": "Lines"
        },
        "fontType": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fonttype"
        }
      },
      "type": "object",
      "required": [
        "textRectPx"
      ],
      "title": "TextLayoutSpecPx",
      "description": "Pixel-perfect text layout (origin rect + line-by-line layout)."
    },
    "TextLineLayoutPx": {
      "properties": {
        "text": {
          "type": "string",
          "title": "Text"
        },
        "x": {
          "type": "number",
          "title": "X"
        },
        "y": {
          "type": "number",
          "title": "Y"
        },
        "width": {
          "type": "number",
          "title": "Width"
        },
        "height": {
          "type": "number",
          "title": "Height"
        }
      },
      "type": "object",
      "required": [
        "text",
        "x",
        "y",
        "width",
        "height"
      ],
      "title": "TextLineLayoutPx",
      "description": "A single pre-wrapped line as measured by React Native via onTextLayout."
    }
  }
}